mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 07:14:56 +01:00
return of the location GoTo Button
Despite the tooltip, middle-click to locate is not very discoverable, and tricky to not-available on MacBooks.
This commit is contained in:
parent
77a36d6392
commit
674fa50fb8
2 changed files with 36 additions and 10 deletions
|
|
@ -48,18 +48,20 @@ using namespace Gtkmm2ext;
|
||||||
|
|
||||||
LocationEditRow::LocationEditRow(Session * sess, Location * loc, int32_t num)
|
LocationEditRow::LocationEditRow(Session * sess, Location * loc, int32_t num)
|
||||||
: SessionHandlePtr (0) /* explicitly set below */
|
: SessionHandlePtr (0) /* explicitly set below */
|
||||||
, location(0)
|
, location(0)
|
||||||
, item_table (1, 6, false)
|
, item_table (1, 6, false)
|
||||||
, start_clock (X_("locationstart"), true, "", true, false)
|
, start_clock (X_("locationstart"), true, "", true, false)
|
||||||
, start_to_playhead_button (_("Use PH"))
|
, start_to_playhead_button (_("Use PH"))
|
||||||
, end_clock (X_("locationend"), true, "", true, false)
|
, locate_to_start_button (_("Goto"))
|
||||||
|
, end_clock (X_("locationend"), true, "", true, false)
|
||||||
, end_to_playhead_button (_("Use PH"))
|
, end_to_playhead_button (_("Use PH"))
|
||||||
, length_clock (X_("locationlength"), true, "", true, false, true)
|
, locate_to_end_button (_("Goto"))
|
||||||
, cd_check_button (_("CD"))
|
, length_clock (X_("locationlength"), true, "", true, false, true)
|
||||||
, hide_check_button (_("Hide"))
|
, cd_check_button (_("CD"))
|
||||||
, lock_check_button (_("Lock"))
|
, hide_check_button (_("Hide"))
|
||||||
, glue_check_button (_("Glue"))
|
, lock_check_button (_("Lock"))
|
||||||
, _clock_group (0)
|
, glue_check_button (_("Glue"))
|
||||||
|
, _clock_group (0)
|
||||||
{
|
{
|
||||||
i_am_the_modifier = 0;
|
i_am_the_modifier = 0;
|
||||||
|
|
||||||
|
|
@ -67,6 +69,8 @@ LocationEditRow::LocationEditRow(Session * sess, Location * loc, int32_t num)
|
||||||
|
|
||||||
start_to_playhead_button.set_name ("LocationEditCdButton");
|
start_to_playhead_button.set_name ("LocationEditCdButton");
|
||||||
end_to_playhead_button.set_name ("LocationEditCdButton");
|
end_to_playhead_button.set_name ("LocationEditCdButton");
|
||||||
|
locate_to_start_button.set_name ("LocationEditCdButton");
|
||||||
|
locate_to_end_button.set_name ("LocationEditCdButton");
|
||||||
|
|
||||||
number_label.set_name ("LocationEditNumberLabel");
|
number_label.set_name ("LocationEditNumberLabel");
|
||||||
name_label.set_name ("LocationEditNameLabel");
|
name_label.set_name ("LocationEditNameLabel");
|
||||||
|
|
@ -133,6 +137,7 @@ LocationEditRow::LocationEditRow(Session * sess, Location * loc, int32_t num)
|
||||||
start_hbox.set_spacing (2);
|
start_hbox.set_spacing (2);
|
||||||
start_hbox.pack_start (start_clock, false, false);
|
start_hbox.pack_start (start_clock, false, false);
|
||||||
start_hbox.pack_start (start_to_playhead_button, false, false);
|
start_hbox.pack_start (start_to_playhead_button, false, false);
|
||||||
|
start_hbox.pack_start (locate_to_start_button, false, false);
|
||||||
|
|
||||||
/* this is always in this location, no matter what the location is */
|
/* this is always in this location, no matter what the location is */
|
||||||
|
|
||||||
|
|
@ -143,14 +148,17 @@ LocationEditRow::LocationEditRow(Session * sess, Location * loc, int32_t num)
|
||||||
item_table.attach (start_hbox, 2, 3, 0, 1, FILL, Gtk::AttachOptions(0), 4, 0);
|
item_table.attach (start_hbox, 2, 3, 0, 1, FILL, Gtk::AttachOptions(0), 4, 0);
|
||||||
|
|
||||||
start_to_playhead_button.signal_clicked().connect (sigc::bind (sigc::mem_fun (*this, &LocationEditRow::to_playhead_button_pressed), LocStart));
|
start_to_playhead_button.signal_clicked().connect (sigc::bind (sigc::mem_fun (*this, &LocationEditRow::to_playhead_button_pressed), LocStart));
|
||||||
|
locate_to_start_button.signal_clicked().connect (sigc::bind (sigc::mem_fun (*this, &LocationEditRow::locate_button_pressed), LocStart));
|
||||||
start_clock.ValueChanged.connect (sigc::bind (sigc::mem_fun (*this, &LocationEditRow::clock_changed), LocStart));
|
start_clock.ValueChanged.connect (sigc::bind (sigc::mem_fun (*this, &LocationEditRow::clock_changed), LocStart));
|
||||||
start_clock.signal_button_press_event().connect (sigc::bind (sigc::mem_fun (*this, &LocationEditRow::locate_to_clock), &start_clock), false);
|
start_clock.signal_button_press_event().connect (sigc::bind (sigc::mem_fun (*this, &LocationEditRow::locate_to_clock), &start_clock), false);
|
||||||
|
|
||||||
end_hbox.set_spacing (2);
|
end_hbox.set_spacing (2);
|
||||||
end_hbox.pack_start (end_clock, false, false);
|
end_hbox.pack_start (end_clock, false, false);
|
||||||
end_hbox.pack_start (end_to_playhead_button, false, false);
|
end_hbox.pack_start (end_to_playhead_button, false, false);
|
||||||
|
end_hbox.pack_start (locate_to_end_button, false, false);
|
||||||
|
|
||||||
end_to_playhead_button.signal_clicked().connect (sigc::bind (sigc::mem_fun (*this, &LocationEditRow::to_playhead_button_pressed), LocEnd));
|
end_to_playhead_button.signal_clicked().connect (sigc::bind (sigc::mem_fun (*this, &LocationEditRow::to_playhead_button_pressed), LocEnd));
|
||||||
|
locate_to_end_button.signal_clicked().connect (sigc::bind (sigc::mem_fun (*this, &LocationEditRow::locate_button_pressed), LocEnd));
|
||||||
end_clock.ValueChanged.connect (sigc::bind (sigc::mem_fun (*this, &LocationEditRow::clock_changed), LocEnd));
|
end_clock.ValueChanged.connect (sigc::bind (sigc::mem_fun (*this, &LocationEditRow::clock_changed), LocEnd));
|
||||||
end_clock.signal_button_press_event().connect (sigc::bind (sigc::mem_fun (*this, &LocationEditRow::locate_to_clock), &end_clock), false);
|
end_clock.signal_button_press_event().connect (sigc::bind (sigc::mem_fun (*this, &LocationEditRow::locate_to_clock), &end_clock), false);
|
||||||
|
|
||||||
|
|
@ -426,6 +434,21 @@ LocationEditRow::to_playhead_button_pressed (LocationPart part)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
LocationEditRow::locate_button_pressed (LocationPart part)
|
||||||
|
{
|
||||||
|
switch (part) {
|
||||||
|
case LocStart:
|
||||||
|
_session->request_locate (start_clock.current_time());
|
||||||
|
break;
|
||||||
|
case LocEnd:
|
||||||
|
_session->request_locate (end_clock.current_time());
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
LocationEditRow::locate_to_clock (GdkEventButton* ev, AudioClock* clock)
|
LocationEditRow::locate_to_clock (GdkEventButton* ev, AudioClock* clock)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -81,10 +81,12 @@ class LocationEditRow : public Gtk::HBox, public ARDOUR::SessionHandlePtr
|
||||||
Gtk::HBox start_hbox;
|
Gtk::HBox start_hbox;
|
||||||
AudioClock start_clock;
|
AudioClock start_clock;
|
||||||
Gtk::Button start_to_playhead_button;
|
Gtk::Button start_to_playhead_button;
|
||||||
|
Gtk::Button locate_to_start_button;
|
||||||
|
|
||||||
Gtk::HBox end_hbox;
|
Gtk::HBox end_hbox;
|
||||||
AudioClock end_clock;
|
AudioClock end_clock;
|
||||||
Gtk::Button end_to_playhead_button;
|
Gtk::Button end_to_playhead_button;
|
||||||
|
Gtk::Button locate_to_end_button;
|
||||||
|
|
||||||
AudioClock length_clock;
|
AudioClock length_clock;
|
||||||
Gtk::CheckButton cd_check_button;
|
Gtk::CheckButton cd_check_button;
|
||||||
|
|
@ -118,6 +120,7 @@ class LocationEditRow : public Gtk::HBox, public ARDOUR::SessionHandlePtr
|
||||||
void composer_entry_changed ();
|
void composer_entry_changed ();
|
||||||
|
|
||||||
void to_playhead_button_pressed (LocationPart part);
|
void to_playhead_button_pressed (LocationPart part);
|
||||||
|
void locate_button_pressed (LocationPart part);
|
||||||
|
|
||||||
void clock_changed (LocationPart part);
|
void clock_changed (LocationPart part);
|
||||||
bool locate_to_clock (GdkEventButton*, AudioClock*);
|
bool locate_to_clock (GdkEventButton*, AudioClock*);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue