summaryrefslogtreecommitdiff
path: root/gtk2_ardour/location_ui.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-12-11 17:26:48 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-12-11 17:26:48 +0000
commit33f62360a253511f8b8112012cd13e59b26095a6 (patch)
treee31c2b045684019e99d28c69e5c1469e215b6a32 /gtk2_ardour/location_ui.cc
parent1b3b9633b0990d7e90b9843c94a16d896c4a393e (diff)
add middle-clock-on-range/marker-clock to locate there
git-svn-id: svn://localhost/ardour2/branches/3.0@10980 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/location_ui.cc')
-rw-r--r--gtk2_ardour/location_ui.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/gtk2_ardour/location_ui.cc b/gtk2_ardour/location_ui.cc
index f3029cd062..6f7db62593 100644
--- a/gtk2_ardour/location_ui.cc
+++ b/gtk2_ardour/location_ui.cc
@@ -131,6 +131,7 @@ LocationEditRow::LocationEditRow(Session * sess, Location * loc, int32_t num)
start_to_playhead_button.signal_clicked().connect (sigc::bind (sigc::mem_fun (*this, &LocationEditRow::to_playhead_button_pressed), 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);
end_hbox.set_spacing (2);
end_hbox.pack_start (end_clock, false, false);
@@ -138,6 +139,7 @@ LocationEditRow::LocationEditRow(Session * sess, Location * loc, int32_t num)
end_to_playhead_button.signal_clicked().connect (sigc::bind (sigc::mem_fun (*this, &LocationEditRow::to_playhead_button_pressed), 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);
length_clock.ValueChanged.connect (sigc::bind ( sigc::mem_fun(*this, &LocationEditRow::clock_changed), LocLength));
@@ -237,6 +239,8 @@ LocationEditRow::set_location (Location *loc)
name_label.set_text (location->name());
name_label.set_size_request (80, -1);
+ remove_button.hide ();
+
if (!name_label.get_parent()) {
item_table.attach (name_label, 1, 2, 0, 1, FILL, FILL, 4, 0);
}
@@ -402,6 +406,16 @@ LocationEditRow::to_playhead_button_pressed (LocationPart part)
}
}
+bool
+LocationEditRow::locate_to_clock (GdkEventButton* ev, AudioClock* clock)
+{
+ if (Keyboard::is_button2_event (ev)) {
+ _session->request_locate (clock->current_time());
+ return true;
+ }
+ return false;
+}
+
void
LocationEditRow::clock_changed (LocationPart part)
{