summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-12-08 19:47:07 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-12-08 19:47:07 +0000
commit3039691723ae9fb11f05d763c2813222488a59e3 (patch)
tree9bed14531e87847637df70fc5a0bf0e0a744dcaf /gtk2_ardour
parenta0fadfa4f304b97cc178d23658dbf2847ae3e87a (diff)
make follow-playhead available again; remove special pane handling
git-svn-id: svn://localhost/ardour2/trunk@1197 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/ardour.bindings1
-rw-r--r--gtk2_ardour/mixer_ui.cc3
-rw-r--r--gtk2_ardour/utils.cc58
-rw-r--r--gtk2_ardour/utils.h1
4 files changed, 1 insertions, 62 deletions
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 "<Actions>/Editor/crop" "c")
(gtk_accel_path "<Actions>/Editor/duplicate-region" "d")
(gtk_accel_path "<Actions>/Editor/set-edit-cursor" "e")
+(gtk_accel_path "<Actions>/Editor/toggle-follow-playhead" "f")
(gtk_accel_path "<Actions>/MouseMode/set-mouse-mode-gain" "g")
(gtk_accel_path "<Actions>/Editor/split-region" "s")
(gtk_accel_path "<Actions>/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<Paned*>(&rhs_pane1)));
- list_hpane.signal_button_release_event().connect (bind (sigc::ptr_fun (pane_handler), static_cast<Paned*>(&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<VPaned*>(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<VPaned*>(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);