diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-03-11 22:51:24 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-03-11 22:51:24 +0000 |
commit | c5dab0e2a8df77725f34f53462a4f08d7b581e57 (patch) | |
tree | 49b9f1aa8f17bd34507de3fdad7b177cb5c01f14 /gtk2_ardour | |
parent | 100d7c0f82602f6225537342f6df7dee12479e9d (diff) |
save/restore monitor processor state; key handling in torn off monitor section window
git-svn-id: svn://localhost/ardour2/branches/3.0@6748 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/monitor_section.cc | 9 | ||||
-rw-r--r-- | gtk2_ardour/monitor_section.h | 2 | ||||
-rw-r--r-- | gtk2_ardour/public_editor.h | 1 | ||||
-rw-r--r-- | gtk2_ardour/utils.cc | 6 | ||||
-rw-r--r-- | gtk2_ardour/utils.h | 1 |
5 files changed, 19 insertions, 0 deletions
diff --git a/gtk2_ardour/monitor_section.cc b/gtk2_ardour/monitor_section.cc index 15840fc280..59801c767c 100644 --- a/gtk2_ardour/monitor_section.cc +++ b/gtk2_ardour/monitor_section.cc @@ -14,6 +14,7 @@ #include "ardour_ui.h" #include "monitor_section.h" +#include "public_editor.h" #include "utils.h" #include "volume_controller.h" @@ -245,6 +246,7 @@ MonitorSection::MonitorSection (Session* s) /* if torn off, make this a normal window */ _tearoff->tearoff_window().set_type_hint (Gdk::WINDOW_TYPE_HINT_NORMAL); _tearoff->tearoff_window().set_title (X_("Monitor")); + _tearoff->tearoff_window().signal_key_press_event().connect (sigc::mem_fun (*this, &MonitorSection::tearoff_key_press_event), false); } MonitorSection::~MonitorSection () @@ -255,6 +257,13 @@ MonitorSection::~MonitorSection () delete _tearoff; } +bool +MonitorSection::tearoff_key_press_event (GdkEventKey* ev) +{ + cerr << "T key event\n"; + return forward_key_press (ev); +} + void MonitorSection::populate_buttons () { diff --git a/gtk2_ardour/monitor_section.h b/gtk2_ardour/monitor_section.h index e12a94b089..87b619e7d0 100644 --- a/gtk2_ardour/monitor_section.h +++ b/gtk2_ardour/monitor_section.h @@ -104,4 +104,6 @@ class MonitorSection : public RouteUI void solo_blink (bool); bool cancel_solo (GdkEventButton*); + + bool tearoff_key_press_event (GdkEventKey*); }; diff --git a/gtk2_ardour/public_editor.h b/gtk2_ardour/public_editor.h index 24a62e5113..e91f2911e3 100644 --- a/gtk2_ardour/public_editor.h +++ b/gtk2_ardour/public_editor.h @@ -360,6 +360,7 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible { static PublicEditor* _instance; friend bool relay_key_press (GdkEventKey*, Gtk::Window*); + friend bool forward_key_press (GdkEventKey*); }; #endif // __gtk_ardour_public_editor_h__ diff --git a/gtk2_ardour/utils.cc b/gtk2_ardour/utils.cc index b8d7569414..0bf7c5657f 100644 --- a/gtk2_ardour/utils.cc +++ b/gtk2_ardour/utils.cc @@ -520,6 +520,12 @@ relay_key_press (GdkEventKey* ev, Gtk::Window* win) } bool +forward_key_press (GdkEventKey* ev) +{ + return PublicEditor::instance().on_key_press_event(ev); +} + +bool key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev) { GtkWindow* win = window.gobj(); diff --git a/gtk2_ardour/utils.h b/gtk2_ardour/utils.h index 9ee66729fc..ca1d751539 100644 --- a/gtk2_ardour/utils.h +++ b/gtk2_ardour/utils.h @@ -67,6 +67,7 @@ bool canvas_item_visible (ArdourCanvas::Item* item); void set_color (Gdk::Color&, int); bool relay_key_press (GdkEventKey* ev, Gtk::Window* win); +bool forward_key_press (GdkEventKey* ev); bool key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev); bool possibly_translate_keyval_to_make_legal_accelerator (uint32_t& keyval); uint32_t possibly_translate_legal_accelerator_to_real_key (uint32_t keyval); |