Make 'Insert time' dialogue do for 'Cut time' too
Add a bool cut parameter to InsertTimeDialog's constructor, so it can do double duty as 'Cut time'. The class probably ought to be renamed too.
This commit is contained in:
parent
292f704b30
commit
0d21c15375
@ -28,8 +28,8 @@
|
|||||||
using namespace Gtk;
|
using namespace Gtk;
|
||||||
using namespace Editing;
|
using namespace Editing;
|
||||||
|
|
||||||
InsertTimeDialog::InsertTimeDialog (PublicEditor& e)
|
InsertTimeDialog::InsertTimeDialog (PublicEditor& e, bool cut)
|
||||||
: ArdourDialog (_("Insert Time"))
|
: ArdourDialog (cut ? _("Cut time") : _("Insert Time"))
|
||||||
, _editor (e)
|
, _editor (e)
|
||||||
, _clock ("insertTimeClock", true, "", true, false, true, false)
|
, _clock ("insertTimeClock", true, "", true, false, true, false)
|
||||||
{
|
{
|
||||||
@ -43,7 +43,7 @@ InsertTimeDialog::InsertTimeDialog (PublicEditor& e)
|
|||||||
Table* table = manage (new Table (2, 2));
|
Table* table = manage (new Table (2, 2));
|
||||||
table->set_spacings (4);
|
table->set_spacings (4);
|
||||||
|
|
||||||
Label* time_label = manage (new Label (_("Time to insert:")));
|
Label* time_label = manage (new Label (cut ? _("Time to cut") : _("Time to insert:")));
|
||||||
time_label->set_alignment (1, 0.5);
|
time_label->set_alignment (1, 0.5);
|
||||||
table->attach (*time_label, 0, 1, 0, 1, FILL | EXPAND);
|
table->attach (*time_label, 0, 1, 0, 1, FILL | EXPAND);
|
||||||
_clock.set (0);
|
_clock.set (0);
|
||||||
@ -51,6 +51,7 @@ InsertTimeDialog::InsertTimeDialog (PublicEditor& e)
|
|||||||
_clock.set_bbt_reference (pos);
|
_clock.set_bbt_reference (pos);
|
||||||
table->attach (_clock, 1, 2, 0, 1);
|
table->attach (_clock, 1, 2, 0, 1);
|
||||||
|
|
||||||
|
if (!cut) {
|
||||||
Label* intersected_label = manage (new Label (_("Intersected regions should:")));
|
Label* intersected_label = manage (new Label (_("Intersected regions should:")));
|
||||||
intersected_label->set_alignment (1, 0.5);
|
intersected_label->set_alignment (1, 0.5);
|
||||||
table->attach (*intersected_label, 0, 1, 1, 2, FILL | EXPAND);
|
table->attach (*intersected_label, 0, 1, 1, 2, FILL | EXPAND);
|
||||||
@ -59,10 +60,11 @@ InsertTimeDialog::InsertTimeDialog (PublicEditor& e)
|
|||||||
_intersected_combo.append_text (_("be split"));
|
_intersected_combo.append_text (_("be split"));
|
||||||
_intersected_combo.set_active (0);
|
_intersected_combo.set_active (0);
|
||||||
table->attach (_intersected_combo, 1, 2, 1, 2);
|
table->attach (_intersected_combo, 1, 2, 1, 2);
|
||||||
|
}
|
||||||
|
|
||||||
get_vbox()->pack_start (*table);
|
get_vbox()->pack_start (*table);
|
||||||
|
|
||||||
_all_playlists.set_label (_("Insert time on all the track's playlists"));
|
_all_playlists.set_label (_("Apply to all the track's playlists"));
|
||||||
get_vbox()->pack_start (_all_playlists);
|
get_vbox()->pack_start (_all_playlists);
|
||||||
|
|
||||||
_move_glued.set_label (_("Move glued regions"));
|
_move_glued.set_label (_("Move glued regions"));
|
||||||
@ -88,7 +90,7 @@ InsertTimeDialog::InsertTimeDialog (PublicEditor& e)
|
|||||||
get_vbox()->pack_start (*tempo_box);
|
get_vbox()->pack_start (*tempo_box);
|
||||||
|
|
||||||
add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
|
add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
|
||||||
add_button (_("Insert time"), Gtk::RESPONSE_OK);
|
add_button (cut ? _("Cut time") : _("Insert time"), Gtk::RESPONSE_OK);
|
||||||
show_all ();
|
show_all ();
|
||||||
|
|
||||||
move_markers_toggled ();
|
move_markers_toggled ();
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
class InsertTimeDialog : public ArdourDialog
|
class InsertTimeDialog : public ArdourDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
InsertTimeDialog (PublicEditor &);
|
InsertTimeDialog (PublicEditor &, bool cut = false);
|
||||||
|
|
||||||
Editing::InsertTimeOption intersected_region_action ();
|
Editing::InsertTimeOption intersected_region_action ();
|
||||||
bool all_playlists () const;
|
bool all_playlists () const;
|
||||||
|
Loading…
Reference in New Issue
Block a user