diff --git a/gtk2_ardour/ardour.bindings b/gtk2_ardour/ardour.bindings index 19a6b2d435..f7c39fba9e 100644 --- a/gtk2_ardour/ardour.bindings +++ b/gtk2_ardour/ardour.bindings @@ -12,6 +12,7 @@ (gtk_accel_path "/Editor/crop" "c") (gtk_accel_path "/Editor/duplicate-region" "d") (gtk_accel_path "/Editor/set-edit-cursor" "e") +(gtk_accel_path "/Editor/toggle-follow-playhead" "f") (gtk_accel_path "/MouseMode/set-mouse-mode-gain" "g") (gtk_accel_path "/Editor/split-region" "s") (gtk_accel_path "/Editor/set-region-sync-position" "v") diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc index 45b6eecee9..85c0aaff41 100644 --- a/gtk2_ardour/mixer_ui.cc +++ b/gtk2_ardour/mixer_ui.cc @@ -199,9 +199,6 @@ Mixer_UI::Mixer_UI (AudioEngine& eng) rhs_pane1.set_data ("collapse-direction", (gpointer) 0); list_hpane.set_data ("collapse-direction", (gpointer) 1); - rhs_pane1.signal_button_release_event().connect (bind (sigc::ptr_fun (pane_handler), static_cast(&rhs_pane1))); - list_hpane.signal_button_release_event().connect (bind (sigc::ptr_fun (pane_handler), static_cast(&list_hpane))); - global_vpacker.pack_start (list_hpane, true, true); add (global_vpacker); diff --git a/gtk2_ardour/utils.cc b/gtk2_ardour/utils.cc index 303c4a4c53..389d43d2f2 100644 --- a/gtk2_ardour/utils.cc +++ b/gtk2_ardour/utils.cc @@ -224,64 +224,6 @@ get_font_for_style (string widgetname) return style->get_font(); } -gint -pane_handler (GdkEventButton* ev, Gtk::Paned* pane) -{ - if (ev->window != Gtkmm2ext::get_paned_handle (*pane)) { - return FALSE; - } - - if (Keyboard::is_delete_event (ev)) { - - gint pos; - gint cmp; - - pos = pane->get_position (); - - if (dynamic_cast(pane)) { - cmp = pane->get_height(); - } else { - cmp = pane->get_width(); - } - - /* we have to use approximations here because we can't predict the - exact position or sizes of the pane (themes, etc) - */ - - if (pos < 10 || abs (pos - cmp) < 10) { - - /* already collapsed: restore it (note that this is cast from a pointer value to int, which is tricky on 64bit */ - - pane->set_position ((intptr_t) pane->get_data ("rpos")); - - } else { - - int collapse_direction; - - /* store the current position */ - - pane->set_data ("rpos", (gpointer) pos); - - /* collapse to show the relevant child in full */ - - collapse_direction = (intptr_t) pane->get_data ("collapse-direction"); - - if (collapse_direction) { - pane->set_position (1); - } else { - if (dynamic_cast(pane)) { - pane->set_position (pane->get_height()); - } else { - pane->set_position (pane->get_width()); - } - } - } - - return TRUE; - } - - return FALSE; -} uint32_t rgba_from_style (string style, uint32_t r, uint32_t g, uint32_t b, uint32_t a, string attr, int state, bool rgba) { diff --git a/gtk2_ardour/utils.h b/gtk2_ardour/utils.h index 0e6f3e61b1..244e45d260 100644 --- a/gtk2_ardour/utils.h +++ b/gtk2_ardour/utils.h @@ -65,7 +65,6 @@ ArdourCanvas::Points* get_canvas_points (std::string who, uint32_t npoints); Pango::FontDescription get_font_for_style (std::string widgetname); -gint pane_handler (GdkEventButton*, Gtk::Paned*); uint32_t rgba_from_style (std::string, uint32_t, uint32_t, uint32_t, uint32_t, std::string = "fg", int = Gtk::STATE_NORMAL, bool = true); void decorate (Gtk::Window& w, Gdk::WMDecoration d);