strip keyboard.cc of noxious focus handling stuff, and cleanup
authorPaul Davis <paul@linuxaudiosystems.com>
Wed, 23 Nov 2005 04:13:32 +0000 (04:13 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Wed, 23 Nov 2005 04:13:32 +0000 (04:13 +0000)
git-svn-id: svn://localhost/trunk/ardour2@106 d708f5d6-7413-0410-9779-e7cbd77b26cf

40 files changed:
gtk2_ardour/actions.cc
gtk2_ardour/actions.h
gtk2_ardour/ardour_dialog.cc
gtk2_ardour/ardour_dialog.h
gtk2_ardour/ardour_ui.cc
gtk2_ardour/ardour_ui.h
gtk2_ardour/ardour_ui2.cc
gtk2_ardour/ardour_ui_dependents.cc
gtk2_ardour/ardour_ui_dialogs.cc
gtk2_ardour/ardour_ui_ed.cc
gtk2_ardour/audio_clock.cc
gtk2_ardour/audio_time_axis.cc
gtk2_ardour/audio_time_axis.h
gtk2_ardour/default_keys.cc
gtk2_ardour/editor.cc
gtk2_ardour/editor_actions.cc
gtk2_ardour/editor_ops.cc
gtk2_ardour/export_dialog.cc
gtk2_ardour/export_dialog.h
gtk2_ardour/gain_meter.cc
gtk2_ardour/gain_meter.h
gtk2_ardour/keyboard.cc
gtk2_ardour/keyboard.h
gtk2_ardour/location_ui.cc
gtk2_ardour/location_ui.h
gtk2_ardour/mixer_strip.cc
gtk2_ardour/mixer_ui.cc
gtk2_ardour/option_editor.cc
gtk2_ardour/option_editor.h
gtk2_ardour/panner_ui.cc
gtk2_ardour/panner_ui.h
gtk2_ardour/plugin_ui.cc
gtk2_ardour/plugin_ui.h
gtk2_ardour/prompter.cc
gtk2_ardour/public_editor.h
gtk2_ardour/region_editor.cc
gtk2_ardour/region_editor.h
gtk2_ardour/time_axis_view.cc
gtk2_ardour/utils.cc
gtk2_ardour/visual_time_axis.cc

index 86ca2284f3a1118a39f40f21fb442794d0f8f954..81c226843d3545a8ddb225aa98cadda2b2b3aa2c 100644 (file)
@@ -29,7 +29,6 @@ using namespace std;
 using namespace Gtk;
 using namespace Glib;
 using namespace sigc;
-using namespace ActionManager;
 
 vector<RefPtr<Gtk::Action> > ActionManager::session_sensitive_actions;
 vector<RefPtr<Gtk::Action> > ActionManager::region_list_selection_sensitive_actions;
@@ -40,16 +39,9 @@ vector<RefPtr<Gtk::Action> > ActionManager::range_sensitive_actions;
 vector<RefPtr<Gtk::Action> > ActionManager::jack_sensitive_actions;
 string ActionManager::unbound_string = "--";
 
-static vector<RefPtr<UIManager> > ui_managers;
-
-void
-register_ui_manager (RefPtr<UIManager> uim)
-{
-       ui_managers.push_back (uim);
-}
 
 RefPtr<Action>
-register_action (RefPtr<ActionGroup> group, string name, string label, slot<void> sl, guint key, Gdk::ModifierType mods)
+ActionManager::register_action (RefPtr<ActionGroup> group, string name, string label, slot<void> sl, guint key, Gdk::ModifierType mods)
 {
        RefPtr<Action> act = register_action (group, name, label, sl);
        AccelMap::add_entry (act->get_accel_path(), key, mods);
@@ -58,7 +50,7 @@ register_action (RefPtr<ActionGroup> group, string name, string label, slot<void
 }
 
 RefPtr<Action>
-register_action (RefPtr<ActionGroup> group, string name, string label, slot<void> sl)
+ActionManager::register_action (RefPtr<ActionGroup> group, string name, string label, slot<void> sl)
 {
        RefPtr<Action> act = register_action (group, name, label);
        group->add (act, sl);
@@ -67,7 +59,7 @@ register_action (RefPtr<ActionGroup> group, string name, string label, slot<void
 }
 
 RefPtr<Action>
-register_action (RefPtr<ActionGroup> group, string name, string label)
+ActionManager::register_action (RefPtr<ActionGroup> group, string name, string label)
 {
        RefPtr<Action> act;
 
@@ -79,7 +71,7 @@ register_action (RefPtr<ActionGroup> group, string name, string label)
 
 
 RefPtr<Action>
-register_radio_action (RefPtr<ActionGroup> group, RadioAction::Group rgroup, string name, string label, slot<void> sl, guint key, Gdk::ModifierType mods)
+ActionManager::register_radio_action (RefPtr<ActionGroup> group, RadioAction::Group rgroup, string name, string label, slot<void> sl, guint key, Gdk::ModifierType mods)
 {
        RefPtr<Action> act = register_radio_action (group, rgroup, name, label, sl);
        AccelMap::add_entry (act->get_accel_path(), key, mods);
@@ -88,7 +80,7 @@ register_radio_action (RefPtr<ActionGroup> group, RadioAction::Group rgroup, str
 }
 
 RefPtr<Action>
-register_radio_action (RefPtr<ActionGroup> group, RadioAction::Group rgroup, string name, string label, slot<void> sl)
+ActionManager::register_radio_action (RefPtr<ActionGroup> group, RadioAction::Group rgroup, string name, string label, slot<void> sl)
 {
        RefPtr<Action> act;
 
@@ -100,7 +92,7 @@ register_radio_action (RefPtr<ActionGroup> group, RadioAction::Group rgroup, str
 
 
 RefPtr<Action>
-register_toggle_action (RefPtr<ActionGroup> group, string name, string label, slot<void> sl, guint key, Gdk::ModifierType mods)
+ActionManager::register_toggle_action (RefPtr<ActionGroup> group, string name, string label, slot<void> sl, guint key, Gdk::ModifierType mods)
 {
        RefPtr<Action> act = register_toggle_action (group,name, label, sl);
        AccelMap::add_entry (act->get_accel_path(), key, mods);
@@ -109,7 +101,7 @@ register_toggle_action (RefPtr<ActionGroup> group, string name, string label, sl
 }
 
 RefPtr<Action>
-register_toggle_action (RefPtr<ActionGroup> group, string name, string label, slot<void> sl)
+ActionManager::register_toggle_action (RefPtr<ActionGroup> group, string name, string label, slot<void> sl)
 {
        RefPtr<Action> act;
 
@@ -119,7 +111,8 @@ register_toggle_action (RefPtr<ActionGroup> group, string name, string label, sl
        return act;
 }
 
-bool lookup_entry (const ustring accel_path, Gtk::AccelKey& key)
+bool 
+ActionManager::lookup_entry (const ustring accel_path, Gtk::AccelKey& key)
 {
        GtkAccelKey gkey;
        bool known = gtk_accel_map_lookup_entry (accel_path.c_str(), &gkey);
@@ -134,47 +127,39 @@ bool lookup_entry (const ustring accel_path, Gtk::AccelKey& key)
 }
 
 void
-merge_actions (RefPtr<ActionGroup> dst, const RefPtr<ActionGroup> src)
+ActionManager::get_all_actions (vector<string>& names, vector<string>& paths, vector<string>& keys, vector<AccelKey>& bindings)
 {
-       ListHandle<RefPtr<Action> > group_actions = src->get_actions();
-
-       for (ListHandle<RefPtr<Action> >::iterator a = group_actions.begin(); a != group_actions.end(); ++a) {
-               RefPtr<Action> act = Action::create ((*a)->get_name(), (*a)->property_label());
-               dst->add (act);
+       ListHandle<RefPtr<ActionGroup> > uim_groups = ui_manager.get_action_groups ();
+       
+       for (ListHandle<RefPtr<ActionGroup> >::iterator g = uim_groups.begin(); g != uim_groups.end(); ++g) {
+               
+               ListHandle<RefPtr<Action> > group_actions = (*g)->get_actions();
+               
+               for (ListHandle<RefPtr<Action> >::iterator a = group_actions.begin(); a != group_actions.end(); ++a) {
+                       
+                       ustring accel_path;
+                       
+                       accel_path = (*a)->get_accel_path();
+                       
+                       names.push_back ((*a)->get_name());
+                       paths.push_back (accel_path);
+                       
+                       AccelKey key;
+                       bool known = lookup_entry (accel_path, key);
+                       
+                       if (known) {
+                               keys.push_back (ui_manager.get_accel_group()->name (key.get_key(), Gdk::ModifierType (key.get_mod())));
+                       } else {
+                               keys.push_back (unbound_string);
+                       }
+                       
+                       bindings.push_back (AccelKey (key.get_key(), Gdk::ModifierType (key.get_mod())));
+               }
        }
 }
 
 void
-get_all_actions (vector<string>& names, vector<string>& paths, vector<string>& keys, vector<AccelKey>& bindings)
+ActionManager::add_action_group (RefPtr<ActionGroup> grp)
 {
-       for (vector<RefPtr<UIManager> >::iterator u = ui_managers.begin(); u != ui_managers.end(); ++u) {
-
-               ListHandle<RefPtr<ActionGroup> > uim_groups = (*u)->get_action_groups ();
-
-               for (ListHandle<RefPtr<ActionGroup> >::iterator g = uim_groups.begin(); g != uim_groups.end(); ++g) {
-
-                       ListHandle<RefPtr<Action> > group_actions = (*g)->get_actions();
-
-                       for (ListHandle<RefPtr<Action> >::iterator a = group_actions.begin(); a != group_actions.end(); ++a) {
-                               
-                               ustring accel_path;
-                               
-                               accel_path = (*a)->get_accel_path();
-                               
-                               names.push_back ((*a)->get_name());
-                               paths.push_back (accel_path);
-
-                               AccelKey key;
-                               bool known = lookup_entry (accel_path, key);
-
-                               if (known) {
-                                       keys.push_back ((*u)->get_accel_group()->name (key.get_key(), Gdk::ModifierType (key.get_mod())));
-                               } else {
-                                       keys.push_back (unbound_string);
-                               }
-
-                               bindings.push_back (AccelKey (key.get_key(), Gdk::ModifierType (key.get_mod())));
-                       }
-               }
-       }
+       ui_manager.insert_action_group (grp);
 }
index e0d7fa020f3736d3dc9032535d4086e85645c0d7..3c831d0aff19dcdd940f479980b21c7c187e6f5e 100644 (file)
@@ -6,47 +6,58 @@
 #include <gtkmm/radioaction.h>
 #include <gtkmm/toggleaction.h>
 #include <gtkmm/actiongroup.h>
+#include <gtkmm/accelkey.h>
 
 namespace Gtk {
        class UIManager;
 }
 
-namespace ActionManager
+class ActionManager
 {
-       extern std::vector<Glib::RefPtr<Gtk::Action> > session_sensitive_actions;
-       extern std::vector<Glib::RefPtr<Gtk::Action> > region_list_selection_sensitive_actions;
-       extern std::vector<Glib::RefPtr<Gtk::Action> > region_selection_sensitive_actions;
-       extern std::vector<Glib::RefPtr<Gtk::Action> > track_selection_sensitive_actions;
-       extern std::vector<Glib::RefPtr<Gtk::Action> > plugin_selection_sensitive_actions;
-       extern std::vector<Glib::RefPtr<Gtk::Action> > range_sensitive_actions;
-       extern std::vector<Glib::RefPtr<Gtk::Action> > jack_sensitive_actions;
+  public:
+       ActionManager() {}
+       virtual ~ActionManager () {}
 
-       extern std::string unbound_string;  /* the key string returned if an action is not bound */
+       static std::vector<Glib::RefPtr<Gtk::Action> > session_sensitive_actions;
+       static std::vector<Glib::RefPtr<Gtk::Action> > region_list_selection_sensitive_actions;
+       static std::vector<Glib::RefPtr<Gtk::Action> > region_selection_sensitive_actions;
+       static std::vector<Glib::RefPtr<Gtk::Action> > track_selection_sensitive_actions;
+       static std::vector<Glib::RefPtr<Gtk::Action> > plugin_selection_sensitive_actions;
+       static std::vector<Glib::RefPtr<Gtk::Action> > range_sensitive_actions;
+       static std::vector<Glib::RefPtr<Gtk::Action> > jack_sensitive_actions;
 
-       void register_ui_manager (Glib::RefPtr<Gtk::UIManager>);
+       static std::string unbound_string;  /* the key string returned if an action is not bound */
+       static Gtk::UIManager ui_manager;
 
-       Glib::RefPtr<Gtk::Action> register_action (Glib::RefPtr<Gtk::ActionGroup> group, 
+       static void add_action_group (Glib::RefPtr<Gtk::ActionGroup>);
+
+       static Glib::RefPtr<Gtk::Action> register_action (Glib::RefPtr<Gtk::ActionGroup> group, 
                                                   std::string name, std::string label);
-       Glib::RefPtr<Gtk::Action> register_action (Glib::RefPtr<Gtk::ActionGroup> group, 
+       static Glib::RefPtr<Gtk::Action> register_action (Glib::RefPtr<Gtk::ActionGroup> group, 
                                                   std::string name, std::string label, sigc::slot<void> sl, 
                                                   guint key, Gdk::ModifierType mods);
-       Glib::RefPtr<Gtk::Action> register_action (Glib::RefPtr<Gtk::ActionGroup> group, 
+       static Glib::RefPtr<Gtk::Action> register_action (Glib::RefPtr<Gtk::ActionGroup> group, 
                                                   std::string name, std::string label, sigc::slot<void> sl);
        
-       Glib::RefPtr<Gtk::Action> register_radio_action (Glib::RefPtr<Gtk::ActionGroup> group, Gtk::RadioAction::Group, 
+       static Glib::RefPtr<Gtk::Action> register_radio_action (Glib::RefPtr<Gtk::ActionGroup> group, Gtk::RadioAction::Group, 
                                                         std::string name, std::string label, sigc::slot<void> sl, 
                                                         guint key, Gdk::ModifierType mods);
-       Glib::RefPtr<Gtk::Action> register_radio_action (Glib::RefPtr<Gtk::ActionGroup> group, Gtk::RadioAction::Group, 
+       static Glib::RefPtr<Gtk::Action> register_radio_action (Glib::RefPtr<Gtk::ActionGroup> group, Gtk::RadioAction::Group, 
                                                         std::string name, std::string label, sigc::slot<void> sl);
        
-       Glib::RefPtr<Gtk::Action> register_toggle_action (Glib::RefPtr<Gtk::ActionGroup> group, 
+       static Glib::RefPtr<Gtk::Action> register_toggle_action (Glib::RefPtr<Gtk::ActionGroup> group, 
                                                          std::string name, std::string label, sigc::slot<void> sl, 
                                                          guint key, Gdk::ModifierType mods);
-       Glib::RefPtr<Gtk::Action> register_toggle_action (Glib::RefPtr<Gtk::ActionGroup> group, 
+       static Glib::RefPtr<Gtk::Action> register_toggle_action (Glib::RefPtr<Gtk::ActionGroup> group, 
                                                          std::string name, std::string label, sigc::slot<void> sl);
 
-       void merge_actions (Glib::RefPtr<Gtk::ActionGroup> dst, const Glib::RefPtr<Gtk::ActionGroup> src);
+       static bool lookup_entry (const Glib::ustring accel_path, Gtk::AccelKey& key);
 
+       static void get_all_actions (std::vector<std::string>& names, 
+                                    std::vector<std::string>& paths, 
+                                    std::vector<std::string>& keys, 
+                                    std::vector<Gtk::AccelKey>& bindings);
+       
 };
 
 #endif /* __ardour_gtk_actions_h__ */
index 3af944d85ccafb3c8e17375d4aab6b90464f3d3a..030be0486e4bf3e11a66a0c9917e1dca55cffc29 100644 (file)
@@ -27,8 +27,7 @@
 
 
 ArdourDialog::ArdourDialog (string name)
-       : Dialog (name), 
-         KeyboardTarget (*this, name)
+       : Dialog (name)
 {
        session = 0;
        kbd_input = false;
@@ -46,25 +45,26 @@ bool
 ArdourDialog::on_enter_notify_event (GdkEventCrossing *ev)
 {
        if (ev->detail != GDK_NOTIFY_INFERIOR) {
-               Keyboard::the_keyboard().set_current_dialog (this);
+               // GTK2FIX
+               //Keyboard::the_keyboard().set_current_dialog (this);
        }
-       return FALSE;
+       return false;
 }
 
 bool
 ArdourDialog::on_leave_notify_event (GdkEventCrossing *ev)
 {
        if (ev->detail != GDK_NOTIFY_INFERIOR) {
-               Keyboard::the_keyboard().set_current_dialog (0);
+               // GTK2FIX
+               //Keyboard::the_keyboard().set_current_dialog (0);
        }
-       return FALSE;
+       return false;
 }
 
 void
 ArdourDialog::on_unmap ()
 {
        _within_hiding = true;
-       Hiding (); /* EMIT_SIGNAL */
        _within_hiding = false;
        Dialog::on_unmap ();
 }
@@ -79,12 +79,7 @@ void
 ArdourDialog::stop (int rr)
 {
        if (hide_on_stop) {
-               Hiding (); /* EMIT_SIGNAL */
                hide_all ();
-
-               if (kbd_input) {
-                       ARDOUR_UI::instance()->allow_focus (false);
-               }
        }
 
        if (running) {
@@ -102,10 +97,6 @@ ArdourDialog::run ()
 {
        show_all ();
 
-       if (kbd_input) {
-               ARDOUR_UI::instance()->allow_focus (true);
-       }
-
        running = true;
        switch (Dialog::run ()) {
        case GTK_RESPONSE_ACCEPT:
@@ -121,10 +112,6 @@ ArdourDialog::run ()
        }
 
        hide_all ();
-
-       if (kbd_input) {
-               ARDOUR_UI::instance()->allow_focus (false);
-       }
 }
 
 void
index d2665c0ed8797c9eb319061b1e5f11d86529f49c..9af434993acba57ebd331efac963fa03aa75c1e4 100644 (file)
@@ -24,8 +24,6 @@
 #include <gtkmm/window.h>
 #include <gtkmm/dialog.h>
 
-#include "keyboard_target.h"
-
 namespace ARDOUR {
        class Session;
 };
@@ -35,7 +33,7 @@ namespace ARDOUR {
  * same mechanism to declare its closing, and to have a common
  * method of connecting and disconnecting from a Session.
  */
-class ArdourDialog : public Gtk::Dialog, public KeyboardTarget
+class ArdourDialog : public Gtk::Dialog
 {
   public:
        ArdourDialog (string name);
index f66b6ff0d1d817d3230cbd408337663b7f814466..9165d08a2492dab0f81ce5e2b5e20304a878382a 100644 (file)
@@ -2550,14 +2550,6 @@ ARDOUR_UI::restore_state (string name)
        }
 }
 
-void
-ARDOUR_UI::allow_focus (bool yn)
-{
-       if (keyboard) {
-               keyboard->allow_focus (yn);
-       }
-}
-
 void
 ARDOUR_UI::primary_clock_value_changed ()
 {
@@ -2632,20 +2624,6 @@ ARDOUR_UI::transport_rec_enable_blink (bool onoff)
        }
 }
 
-gint
-ARDOUR_UI::generic_focus_in_event (GdkEventFocus *ev)
-{
-       ARDOUR_UI::instance()->allow_focus (true);
-       return FALSE;
-}
-
-gint
-ARDOUR_UI::generic_focus_out_event (GdkEventFocus *ev)
-{
-       ARDOUR_UI::instance()->allow_focus (false);
-       return FALSE;
-}
-
 gint
 ARDOUR_UI::hide_and_quit (GdkEventAny *ev, ArdourDialog *window)
 {
index 49b1272d24a4daa920b9942b5f313bafd864124c..088d819b7ed95ad1aca1f5f670a1bfe6522d8adc 100644 (file)
@@ -145,11 +145,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
        PublicEditor&     the_editor(){return *editor;}
        Mixer_UI* the_mixer() { return mixer; }
        
-       void allow_focus (bool yn);
-
-       static gint generic_focus_in_event (GdkEventFocus *);
-       static gint generic_focus_out_event (GdkEventFocus *);
-
        void toggle_location_window ();
        void toggle_big_clock_window ();
        void toggle_connection_editor ();
index f375594cc6e316e95ebabe019f5213f00b29686b..64f85c019251ef6b9ce7f18354603394d1740112 100644 (file)
@@ -434,7 +434,7 @@ ARDOUR_UI::setup_clock ()
 
        big_clock_window->signal_delete_event().connect (bind (sigc::ptr_fun (just_hide_it), static_cast<Gtk::Window*>(big_clock_window)));
 
-       big_clock_window->Hiding.connect (mem_fun(*this, &ARDOUR_UI::big_clock_hiding));
+       big_clock_window->signal_unmap().connect (mem_fun(*this, &ARDOUR_UI::big_clock_hiding));
 }
 
 void
index 68c1edd3e8aaebd24ea485fc5f4447d5e9020ffa..f2b41bd47a4d39ab3caef2acb2f8dcac8e711b24 100644 (file)
@@ -59,24 +59,8 @@ ARDOUR_UI::we_have_dependents ()
 void
 ARDOUR_UI::setup_keybindings ()
 {
-       /* install default bindings */
-
-       KeyboardTarget *defaults = new KeyboardTarget (editor->window(), X_("default"));
-
-       XMLNode* keynode = ARDOUR::Config->get_keys();
-
-       if (keynode != 0) {
-               defaults->set_binding_state (*keynode);
-               editor->set_binding_state (*keynode);
-               mixer->set_binding_state (*keynode);
-               meter_bridge->set_binding_state (*keynode);
-       } else {
-               error << _("keyboard_target: error setting binding state: invalid node") << endmsg;
-       }
-       
-       /* use the default keyboard target for now */
-
-       keyboard->set_default_target (defaults);
+       // GTK2FIX
+       editor->register_actions ();
 }
 
 void
index 0af47c0c198cb7e08aca0ff079af1bfe46a991e7..5324cfe464406344ae2d974e4f8bcfd6772903ce 100644 (file)
@@ -141,7 +141,7 @@ ARDOUR_UI::connect_to_session (Session *s)
        start_blinking ();
 
        if (editor) {
-               editor->window().present();
+               editor->present();
        }
 
        transport_stopped ();
@@ -232,7 +232,7 @@ ARDOUR_UI::create_meter_bridge ()
 {
        if (meter_bridge == 0) {
                meter_bridge = new MeterBridge ();
-               meter_bridge->Hiding.connect (mem_fun(*this, &ARDOUR_UI::meter_bridge_hiding));
+               meter_bridge->signal_unmap().connect (mem_fun(*this, &ARDOUR_UI::meter_bridge_hiding));
        }
        return 0;
 }
@@ -248,7 +248,7 @@ ARDOUR_UI::create_connection_editor ()
 {
        if (connection_editor == 0) {
                connection_editor = new ConnectionEditor ();
-               connection_editor->Hiding.connect (mem_fun(*this, &ARDOUR_UI::connection_editor_hiding));
+               connection_editor->signal_unmap().connect (mem_fun(*this, &ARDOUR_UI::connection_editor_hiding));
        }
 
        if (session) {
@@ -308,7 +308,7 @@ ARDOUR_UI::toggle_options_window ()
 {
        if (option_editor == 0) {
                option_editor = new OptionEditor (*this, *editor, *mixer);
-               option_editor->Hiding.connect(mem_fun(*this, &ARDOUR_UI::option_hiding));
+               option_editor->signal_unmap().connect(mem_fun(*this, &ARDOUR_UI::option_hiding));
                option_editor->set_session (session);
        } else if (option_editor->within_hiding()) {
                return;
@@ -354,7 +354,7 @@ ARDOUR_UI::create_location_ui ()
        if (location_ui == 0) {
                location_ui = new LocationUI ();
                location_ui->set_session (session);
-               location_ui->Hiding.connect (mem_fun(*this, &ARDOUR_UI::location_ui_hiding));
+               location_ui->signal_unmap().connect (mem_fun(*this, &ARDOUR_UI::location_ui_hiding));
        } 
        return 0;
 }
@@ -389,7 +389,7 @@ ARDOUR_UI::create_route_params ()
        if (route_params == 0) {
                route_params = new RouteParams_UI (*engine);
                route_params->set_session (session);
-               route_params->Hiding.connect (mem_fun(*this, &ARDOUR_UI::route_params_hiding));
+               route_params->signal_unmap().connect (mem_fun(*this, &ARDOUR_UI::route_params_hiding));
        }
        return 0;
 }
index d653df9942f2d61f55a81f0ec7d342b3f2c073dc..1af3ba4a58dce2b500086431fbc80f6d4cb1af3d 100644 (file)
@@ -39,7 +39,6 @@
 using namespace ARDOUR;
 using namespace Gtk;
 using namespace Gtkmm2ext;
-using namespace ActionManager;
 
 int
 ARDOUR_UI::create_editor ()
@@ -64,14 +63,14 @@ ARDOUR_UI::install_actions ()
        Glib::RefPtr<ActionGroup> main_actions = ActionGroup::create (X_("Main"));
        Glib::RefPtr<Action> act;
 
-       register_action (main_actions, X_("New"), _("New"),  bind (mem_fun(*this, &ARDOUR_UI::new_session), false, string ()));
-       register_action (main_actions, X_("Open"), _("Open"),  mem_fun(*this, &ARDOUR_UI::open_session));
-       register_action (main_actions, X_("Recent"), _("Recent"),  mem_fun(*this, &ARDOUR_UI::open_recent_session));
-       act = register_action (main_actions, X_("Close"), _("Close"),  mem_fun(*this, &ARDOUR_UI::close_session));
-       session_sensitive_actions.push_back (act);
+       ActionManager::ActionManager::register_action (main_actions, X_("New"), _("New"),  bind (mem_fun(*this, &ARDOUR_UI::new_session), false, string ()));
+       ActionManager::ActionManager::register_action (main_actions, X_("Open"), _("Open"),  mem_fun(*this, &ARDOUR_UI::open_session));
+       ActionManager::ActionManager::register_action (main_actions, X_("Recent"), _("Recent"),  mem_fun(*this, &ARDOUR_UI::open_recent_session));
+       act = ActionManager::register_action (main_actions, X_("Close"), _("Close"),  mem_fun(*this, &ARDOUR_UI::close_session));
+       ActionManager::session_sensitive_actions.push_back (act);
 
-       act = register_action (main_actions, X_("AddTrackBus"), _("Add Track/Bus"),  mem_fun(*this, &ARDOUR_UI::add_route));
-       session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (main_actions, X_("AddTrackBus"), _("Add Track/Bus"),  mem_fun(*this, &ARDOUR_UI::add_route));
+       ActionManager::session_sensitive_actions.push_back (act);
 
        
        /* <CMT Additions> */
@@ -81,200 +80,198 @@ ARDOUR_UI::install_actions ()
 
        if (results) {
                if (!results->empty()) {
-                       act = register_action (main_actions, X_("aniConnect"), _("Connect"),  (mem_fun (*editor, &PublicEditor::connect_to_image_compositor)));
-                       session_sensitive_actions.push_back (act);
+                       act = ActionManager::register_action (main_actions, X_("aniConnect"), _("Connect"),  (mem_fun (*editor, &PublicEditor::connect_to_image_compositor)));
+                       ActionManager::session_sensitive_actions.push_back (act);
                }
                delete results;
        }
 
        /* </CMT Additions> */
 
-       act = register_action (main_actions, X_("Snapshot"), _("Snapshot"),  mem_fun(*this, &ARDOUR_UI::snapshot_session));
-       session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (main_actions, X_("Snapshot"), _("Snapshot"),  mem_fun(*this, &ARDOUR_UI::snapshot_session));
+       ActionManager::session_sensitive_actions.push_back (act);
 
-       act = register_action (main_actions, X_("Save Template..."), _("Save Template..."),  mem_fun(*this, &ARDOUR_UI::save_template));
-       session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (main_actions, X_("Save Template..."), _("Save Template..."),  mem_fun(*this, &ARDOUR_UI::save_template));
+       ActionManager::session_sensitive_actions.push_back (act);
 
-       act = register_action (main_actions, X_("ExportSession"), _("Export session to audiofile..."),  mem_fun (*editor, &PublicEditor::export_session));
-       session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (main_actions, X_("ExportSession"), _("Export session to audiofile..."),  mem_fun (*editor, &PublicEditor::export_session));
+       ActionManager::session_sensitive_actions.push_back (act);
 
-       act = register_action (main_actions, X_("ExportRange"), _("Export range to audiofile..."),  mem_fun (*editor, &PublicEditor::export_selection));
-       session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (main_actions, X_("ExportRange"), _("Export range to audiofile..."),  mem_fun (*editor, &PublicEditor::export_selection));
+       ActionManager::session_sensitive_actions.push_back (act);
 
-       act = register_action (main_actions, X_("Export"), _("Export"));
-       session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (main_actions, X_("Export"), _("Export"));
+       ActionManager::session_sensitive_actions.push_back (act);
 
-       act = register_action (main_actions, X_("CleanupUnused"), _("Cleanup unused sources"),  mem_fun (*(ARDOUR_UI::instance()), &ARDOUR_UI::cleanup));
-       session_sensitive_actions.push_back (act);
-       act = register_action (main_actions, X_("FlushWastebasket"), _("Flush wastebasket"),  mem_fun (*(ARDOUR_UI::instance()), &ARDOUR_UI::flush_trash));
-       session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (main_actions, X_("CleanupUnused"), _("Cleanup unused sources"),  mem_fun (*(ARDOUR_UI::instance()), &ARDOUR_UI::cleanup));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (main_actions, X_("FlushWastebasket"), _("Flush wastebasket"),  mem_fun (*(ARDOUR_UI::instance()), &ARDOUR_UI::flush_trash));
+       ActionManager::session_sensitive_actions.push_back (act);
        
        /* JACK actions for controlling ... JACK */
 
        Glib::RefPtr<ActionGroup> jack_actions = ActionGroup::create (X_("JACK"));
 
-       act = register_action (jack_actions, X_("JACKDisconnect"), _("Disconnect"), mem_fun (*(ARDOUR_UI::instance()), &ARDOUR_UI::disconnect_from_jack));
-       jack_sensitive_actions.push_back (act);
-       act = register_action (jack_actions, X_("JACKReconnect"), _("Reconnect"), mem_fun (*(ARDOUR_UI::instance()), &ARDOUR_UI::reconnect_to_jack));
-       jack_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (jack_actions, X_("JACKDisconnect"), _("Disconnect"), mem_fun (*(ARDOUR_UI::instance()), &ARDOUR_UI::disconnect_from_jack));
+       ActionManager::jack_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (jack_actions, X_("JACKReconnect"), _("Reconnect"), mem_fun (*(ARDOUR_UI::instance()), &ARDOUR_UI::reconnect_to_jack));
+       ActionManager::jack_sensitive_actions.push_back (act);
        
        RadioAction::Group jack_latency_group;
        
-       act = register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency32"), X_("32"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 32));
-       jack_sensitive_actions.push_back (act);
-       act =   register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency64"), X_("64"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 64));
-       jack_sensitive_actions.push_back (act);
-       act =   register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency128"), X_("128"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 128));
-       jack_sensitive_actions.push_back (act);
-       act =   register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency256"), X_("256"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 256));
-       jack_sensitive_actions.push_back (act);
-       act =   register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency512"), X_("512"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 512));
-       jack_sensitive_actions.push_back (act);
-       act =   register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency1024"), X_("1024"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 1024));
-       jack_sensitive_actions.push_back (act);
-       act =   register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency2048"), X_("2048"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 2048));
-       jack_sensitive_actions.push_back (act);
-       act =   register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency4096"), X_("4096"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 4096));
-       jack_sensitive_actions.push_back (act);
-       act =   register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency8192"), X_("8192"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 8192));
-       jack_sensitive_actions.push_back (act);
+       act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency32"), X_("32"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 32));
+       ActionManager::jack_sensitive_actions.push_back (act);
+       act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency64"), X_("64"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 64));
+       ActionManager::jack_sensitive_actions.push_back (act);
+       act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency128"), X_("128"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 128));
+       ActionManager::jack_sensitive_actions.push_back (act);
+       act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency256"), X_("256"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 256));
+       ActionManager::jack_sensitive_actions.push_back (act);
+       act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency512"), X_("512"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 512));
+       ActionManager::jack_sensitive_actions.push_back (act);
+       act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency1024"), X_("1024"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 1024));
+       ActionManager::jack_sensitive_actions.push_back (act);
+       act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency2048"), X_("2048"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 2048));
+       ActionManager::jack_sensitive_actions.push_back (act);
+       act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency4096"), X_("4096"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 4096));
+       ActionManager::jack_sensitive_actions.push_back (act);
+       act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency8192"), X_("8192"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (jack_nframes_t) 8192));
+       ActionManager::jack_sensitive_actions.push_back (act);
        
        /* these actions are intended to be shared across all windows */
        
        common_actions = ActionGroup::create (X_("Common"));
 
-       register_action (common_actions, X_("Start-Prefix"), _("start prefix"), mem_fun(*this, &ARDOUR_UI::start_keyboard_prefix));
-       register_action (common_actions, X_("Quit"), _("quit"), (mem_fun(*this, &ARDOUR_UI::finish)));
+       ActionManager::register_action (common_actions, X_("Start-Prefix"), _("start prefix"), mem_fun(*this, &ARDOUR_UI::start_keyboard_prefix));
+       ActionManager::register_action (common_actions, X_("Quit"), _("quit"), (mem_fun(*this, &ARDOUR_UI::finish)));
 
         /* windows visibility actions */
 
-       register_action (common_actions, X_("GotoEditor"), _("Editor"),  mem_fun(*this, &ARDOUR_UI::goto_editor_window));
-       register_action (common_actions, X_("GotoMixer"), _("Mixer"),  mem_fun(*this, &ARDOUR_UI::goto_mixer_window));
-       register_toggle_action (common_actions, X_("ToggleSoundFileBrowser"), _("Sound File Browser"), mem_fun(*this, &ARDOUR_UI::toggle_sound_file_browser));
-       register_toggle_action (common_actions, X_("ToggleOptionsEditor"), _("Options Editor"), mem_fun(*this, &ARDOUR_UI::toggle_options_window));
-       register_toggle_action (common_actions, X_("ToggleAudioLibrary"), _("Audio Library"), mem_fun(*this, &ARDOUR_UI::toggle_sound_file_browser));
-       act = register_toggle_action (common_actions, X_("ToggleInspector"), _("Track/Bus Inspector"), mem_fun(*this, &ARDOUR_UI::toggle_route_params_window));
-       session_sensitive_actions.push_back (act);
-       act = register_toggle_action (common_actions, X_("ToggleConnections"), _("Connections"), mem_fun(*this, &ARDOUR_UI::toggle_connection_editor));
-       session_sensitive_actions.push_back (act);
-       act = register_toggle_action (common_actions, X_("ToggleLocations"), _("Locations"), mem_fun(*this, &ARDOUR_UI::toggle_location_window));
-       session_sensitive_actions.push_back (act);
-       act = register_toggle_action (common_actions, X_("ToggleBigClock"), _("Big Clock"), mem_fun(*this, &ARDOUR_UI::toggle_big_clock_window));
-       session_sensitive_actions.push_back (act);
-       register_action (common_actions, X_("About"), _("About"),  mem_fun(*this, &ARDOUR_UI::show_splash));
+       ActionManager::register_action (common_actions, X_("GotoEditor"), _("Editor"),  mem_fun(*this, &ARDOUR_UI::goto_editor_window));
+       ActionManager::register_action (common_actions, X_("GotoMixer"), _("Mixer"),  mem_fun(*this, &ARDOUR_UI::goto_mixer_window));
+       ActionManager::register_toggle_action (common_actions, X_("ToggleSoundFileBrowser"), _("Sound File Browser"), mem_fun(*this, &ARDOUR_UI::toggle_sound_file_browser));
+       ActionManager::ActionManager::register_toggle_action (common_actions, X_("ToggleOptionsEditor"), _("Options Editor"), mem_fun(*this, &ARDOUR_UI::toggle_options_window));
+       ActionManager::register_toggle_action (common_actions, X_("ToggleAudioLibrary"), _("Audio Library"), mem_fun(*this, &ARDOUR_UI::toggle_sound_file_browser));
+       act = ActionManager::register_toggle_action (common_actions, X_("ToggleInspector"), _("Track/Bus Inspector"), mem_fun(*this, &ARDOUR_UI::toggle_route_params_window));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_toggle_action (common_actions, X_("ToggleConnections"), _("Connections"), mem_fun(*this, &ARDOUR_UI::toggle_connection_editor));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_toggle_action (common_actions, X_("ToggleLocations"), _("Locations"), mem_fun(*this, &ARDOUR_UI::toggle_location_window));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_toggle_action (common_actions, X_("ToggleBigClock"), _("Big Clock"), mem_fun(*this, &ARDOUR_UI::toggle_big_clock_window));
+       ActionManager::session_sensitive_actions.push_back (act);
+       ActionManager::register_action (common_actions, X_("About"), _("About"),  mem_fun(*this, &ARDOUR_UI::show_splash));
        
-       act = register_action (common_actions, X_("ToggleAutoLoop"), _("toggle auto loop"), mem_fun(*this, &ARDOUR_UI::toggle_session_auto_loop));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("TogglePunchIn"), _("toggle punch in"), mem_fun(*this, &ARDOUR_UI::toggle_session_punch_in));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("NewSession"), _("new session"), bind (mem_fun(*this, &ARDOUR_UI::new_session), false, string()));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("AddAudioTrack"), _("add audio track"), bind (mem_fun(*this, &ARDOUR_UI::session_add_audio_track), 1, 1));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("AddAudioBus"), _("add audio bus"), bind (mem_fun(*this, &ARDOUR_UI::session_add_audio_bus), 1, 1));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("Save"), _("Save"),  bind (mem_fun(*this, &ARDOUR_UI::save_state), string("")));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("RemoveLastCapture"), _("remove last capture"), mem_fun(*this, &ARDOUR_UI::remove_last_capture));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("TransportStop"), _("transport stop"), mem_fun(*this, &ARDOUR_UI::transport_stop));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("TransportStopAndForgetCapture"), _("transport stop and forget capture"), mem_fun(*this, &ARDOUR_UI::transport_stop_and_forget_capture));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("TransportRoll"), _("transport roll"), mem_fun(*this, &ARDOUR_UI::transport_roll));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("TransportLoop"), _("transport loop"), mem_fun(*this, &ARDOUR_UI::transport_loop));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("TransportRecord"), _("transport record"), mem_fun(*this, &ARDOUR_UI::transport_record));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("TransportRewind"), _("transport rewind"), bind (mem_fun(*this, &ARDOUR_UI::transport_rewind), 0));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("TransportRewindSlow"), _("transport rewind slow"), bind (mem_fun(*this, &ARDOUR_UI::transport_rewind), -1));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("TransportRewindFast"), _("transport rewind fast"), bind (mem_fun(*this, &ARDOUR_UI::transport_rewind), 1));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("TransportForward"), _("transport forward"), bind (mem_fun(*this, &ARDOUR_UI::transport_forward), 0));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("TransportForwardSlow"), _("transport forward slow"), bind (mem_fun(*this, &ARDOUR_UI::transport_forward), -1));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("TransportForwardFast"), _("transport forward fast"), bind (mem_fun(*this, &ARDOUR_UI::transport_forward), 1));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("TransportGotoStart"), _("transport goto start"), mem_fun(*this, &ARDOUR_UI::transport_goto_start));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("TransportGotoEnd"), _("transport goto end"), mem_fun(*this, &ARDOUR_UI::transport_goto_end));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("SendAllMidiFeedback"), _("send all midi feedback"), mem_fun(*this, &ARDOUR_UI::send_all_midi_feedback));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("ToggleRecordEnableTrack1"), _("toggle record enable track1"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable),  0U));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("ToggleRecordEnableTrack2"), _("toggle record enable track2"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable),  1U));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("ToggleRecordEnableTrack3"), _("toggle record enable track3"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable),  2U));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("ToggleRecordEnableTrack4"), _("toggle record enable track4"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable),  3U));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("ToggleRecordEnableTrack5"), _("toggle record enable track5"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable),  4U));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("ToggleRecordEnableTrack6"), _("toggle record enable track6"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable),  5U));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("ToggleRecordEnableTrack7"), _("toggle record enable track7"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable),  6U));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("ToggleRecordEnableTrack8"), _("toggle record enable track8"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable),  7U));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("ToggleRecordEnableTrack9"), _("toggle record enable track9"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable),  8U));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("ToggleRecordEnableTrack10"), _("toggle record enable track10"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 9U));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("ToggleRecordEnableTrack11"), _("toggle record enable track11"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 10U));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("ToggleRecordEnableTrack12"), _("toggle record enable track12"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 11U));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("ToggleRecordEnableTrack13"), _("toggle record enable track13"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 12U));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("ToggleRecordEnableTrack14"), _("toggle record enable track14"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 13U));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("ToggleRecordEnableTrack15"), _("toggle record enable track15"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 14U));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("ToggleRecordEnableTrack16"), _("toggle record enable track16"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 15U));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("ToggleRecordEnableTrack17"), _("toggle record enable track17"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 16U));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("ToggleRecordEnableTrack18"), _("toggle record enable track18"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 17U));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("ToggleRecordEnableTrack19"), _("toggle record enable track19"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 18U));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("ToggleRecordEnableTrack20"), _("toggle record enable track20"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 19U));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("ToggleRecordEnableTrack21"), _("toggle record enable track21"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 20U));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("ToggleRecordEnableTrack22"), _("toggle record enable track22"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 21U));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("ToggleRecordEnableTrack23"), _("toggle record enable track23"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 22U));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("ToggleRecordEnableTrack24"), _("toggle record enable track24"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 23U));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("ToggleRecordEnableTrack25"), _("toggle record enable track25"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 24U));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("ToggleRecordEnableTrack26"), _("toggle record enable track26"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 25U));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("ToggleRecordEnableTrack27"), _("toggle record enable track27"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 26U));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("ToggleRecordEnableTrack28"), _("toggle record enable track28"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 27U));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("ToggleRecordEnableTrack29"), _("toggle record enable track29"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 28U));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("ToggleRecordEnableTrack30"), _("toggle record enable track30"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 29U));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("ToggleRecordEnableTrack31"), _("toggle record enable track31"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 30U));
-       session_sensitive_actions.push_back (act);
-       act = register_action (common_actions, X_("ToggleRecordEnableTrack32"), _("toggle record enable track32"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 31U));
-       session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("ToggleAutoLoop"), _("toggle auto loop"), mem_fun(*this, &ARDOUR_UI::toggle_session_auto_loop));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("TogglePunchIn"), _("toggle punch in"), mem_fun(*this, &ARDOUR_UI::toggle_session_punch_in));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("NewSession"), _("new session"), bind (mem_fun(*this, &ARDOUR_UI::new_session), false, string()));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("AddAudioTrack"), _("add audio track"), bind (mem_fun(*this, &ARDOUR_UI::session_add_audio_track), 1, 1));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("AddAudioBus"), _("add audio bus"), bind (mem_fun(*this, &ARDOUR_UI::session_add_audio_bus), 1, 1));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("Save"), _("Save"),  bind (mem_fun(*this, &ARDOUR_UI::save_state), string("")));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("RemoveLastCapture"), _("remove last capture"), mem_fun(*this, &ARDOUR_UI::remove_last_capture));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("TransportStop"), _("transport stop"), mem_fun(*this, &ARDOUR_UI::transport_stop));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("TransportStopAndForgetCapture"), _("transport stop and forget capture"), mem_fun(*this, &ARDOUR_UI::transport_stop_and_forget_capture));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("TransportRoll"), _("transport roll"), mem_fun(*this, &ARDOUR_UI::transport_roll));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("TransportLoop"), _("transport loop"), mem_fun(*this, &ARDOUR_UI::transport_loop));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("TransportRecord"), _("transport record"), mem_fun(*this, &ARDOUR_UI::transport_record));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("TransportRewind"), _("transport rewind"), bind (mem_fun(*this, &ARDOUR_UI::transport_rewind), 0));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("TransportRewindSlow"), _("transport rewind slow"), bind (mem_fun(*this, &ARDOUR_UI::transport_rewind), -1));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("TransportRewindFast"), _("transport rewind fast"), bind (mem_fun(*this, &ARDOUR_UI::transport_rewind), 1));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("TransportForward"), _("transport forward"), bind (mem_fun(*this, &ARDOUR_UI::transport_forward), 0));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("TransportForwardSlow"), _("transport forward slow"), bind (mem_fun(*this, &ARDOUR_UI::transport_forward), -1));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("TransportForwardFast"), _("transport forward fast"), bind (mem_fun(*this, &ARDOUR_UI::transport_forward), 1));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("TransportGotoStart"), _("transport goto start"), mem_fun(*this, &ARDOUR_UI::transport_goto_start));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("TransportGotoEnd"), _("transport goto end"), mem_fun(*this, &ARDOUR_UI::transport_goto_end));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("SendAllMidiFeedback"), _("send all midi feedback"), mem_fun(*this, &ARDOUR_UI::send_all_midi_feedback));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("ToggleRecordEnableTrack1"), _("toggle record enable track1"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable),  0U));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("ToggleRecordEnableTrack2"), _("toggle record enable track2"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable),  1U));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("ToggleRecordEnableTrack3"), _("toggle record enable track3"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable),  2U));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("ToggleRecordEnableTrack4"), _("toggle record enable track4"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable),  3U));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("ToggleRecordEnableTrack5"), _("toggle record enable track5"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable),  4U));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("ToggleRecordEnableTrack6"), _("toggle record enable track6"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable),  5U));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("ToggleRecordEnableTrack7"), _("toggle record enable track7"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable),  6U));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("ToggleRecordEnableTrack8"), _("toggle record enable track8"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable),  7U));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("ToggleRecordEnableTrack9"), _("toggle record enable track9"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable),  8U));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("ToggleRecordEnableTrack10"), _("toggle record enable track10"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 9U));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("ToggleRecordEnableTrack11"), _("toggle record enable track11"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 10U));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("ToggleRecordEnableTrack12"), _("toggle record enable track12"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 11U));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("ToggleRecordEnableTrack13"), _("toggle record enable track13"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 12U));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("ToggleRecordEnableTrack14"), _("toggle record enable track14"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 13U));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("ToggleRecordEnableTrack15"), _("toggle record enable track15"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 14U));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("ToggleRecordEnableTrack16"), _("toggle record enable track16"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 15U));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("ToggleRecordEnableTrack17"), _("toggle record enable track17"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 16U));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("ToggleRecordEnableTrack18"), _("toggle record enable track18"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 17U));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("ToggleRecordEnableTrack19"), _("toggle record enable track19"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 18U));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("ToggleRecordEnableTrack20"), _("toggle record enable track20"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 19U));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("ToggleRecordEnableTrack21"), _("toggle record enable track21"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 20U));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("ToggleRecordEnableTrack22"), _("toggle record enable track22"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 21U));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("ToggleRecordEnableTrack23"), _("toggle record enable track23"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 22U));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("ToggleRecordEnableTrack24"), _("toggle record enable track24"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 23U));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("ToggleRecordEnableTrack25"), _("toggle record enable track25"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 24U));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("ToggleRecordEnableTrack26"), _("toggle record enable track26"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 25U));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("ToggleRecordEnableTrack27"), _("toggle record enable track27"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 26U));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("ToggleRecordEnableTrack28"), _("toggle record enable track28"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 27U));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("ToggleRecordEnableTrack29"), _("toggle record enable track29"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 28U));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("ToggleRecordEnableTrack30"), _("toggle record enable track30"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 29U));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("ToggleRecordEnableTrack31"), _("toggle record enable track31"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 30U));
+       ActionManager::session_sensitive_actions.push_back (act);
+       act = ActionManager::register_action (common_actions, X_("ToggleRecordEnableTrack32"), _("toggle record enable track32"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 31U));
+       ActionManager::session_sensitive_actions.push_back (act);
        
-       ui_manager->insert_action_group (jack_actions);
-       ui_manager->insert_action_group (main_actions);
-       ui_manager->insert_action_group (common_actions);
-
-       register_ui_manager (ui_manager);
+       ActionManager::add_action_group (jack_actions);
+       ActionManager::add_action_group (main_actions);
+       ActionManager::add_action_group (common_actions);
 }
 
 void
index 217ec690ace426aa024fc0b5f5bb8b1df153e9b3..83d8f6644cd84cc562a927f4930825fc3e4774e8 100644 (file)
@@ -696,8 +696,6 @@ AudioClock::field_key_release_event (GdkEventKey *ev, Field field)
 gint
 AudioClock::field_focus_in_event (GdkEventFocus *ev, Field field)
 {
-       ARDOUR_UI::instance()->allow_focus (true);
-
        key_entry_state = 0;
 
        switch (field) {
@@ -755,8 +753,6 @@ AudioClock::field_focus_in_event (GdkEventFocus *ev, Field field)
 gint
 AudioClock::field_focus_out_event (GdkEventFocus *ev, Field field)
 {
-       ARDOUR_UI::instance()->allow_focus (false);
-
        switch (field) {
 
        case SMPTE_Hours:
@@ -1657,9 +1653,8 @@ AudioClock::set_mode (Mode m)
           started editing the clock and then we switch clock mode.
        */
 
-       if (ARDOUR_UI::instance()) {
-               ARDOUR_UI::instance()->allow_focus (false);
-       }
+       // GTK2FIX might need an equivalent here for drop focus
+
 
        if (_mode == m) {
                return;
index 4e77ae1f74b0da42de047785b63586400dc034e3..1c25863e23203ed5cdba33249076bd8e2d0aebb3 100644 (file)
@@ -169,7 +169,6 @@ AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session& sess, Route& rt
        hide_button.signal_clicked().connect (mem_fun(*this, &AudioTimeAxisView::hide_click));
 
        name_entry.signal_activate().connect (mem_fun(*this, &AudioTimeAxisView::name_entry_activated));
-       name_entry.signal_focus_out_event().connect (mem_fun(*this, &AudioTimeAxisView::name_entry_focus_out_handler));
        name_entry.signal_button_press_event().connect (mem_fun(*this, &AudioTimeAxisView::name_entry_button_press_handler));
        name_entry.signal_button_release_event().connect (mem_fun(*this, &AudioTimeAxisView::name_entry_button_release_handler));
        name_entry.signal_key_release_event().connect (mem_fun(*this, &AudioTimeAxisView::name_entry_key_release_handler));
@@ -1108,13 +1107,6 @@ AudioTimeAxisView::name_entry_button_release_handler (GdkEventButton *ev)
        return FALSE;
 }
 
-gint
-AudioTimeAxisView::name_entry_focus_out_handler (GdkEventFocus* ev)
-{
-       name_entry_changed ();
-       return TRUE;
-}
-
 gint
 AudioTimeAxisView::name_entry_key_release_handler (GdkEventKey* ev)
 {
@@ -1144,8 +1136,6 @@ AudioTimeAxisView::name_entry_changed ()
 {
        string x;
 
-       ARDOUR_UI::generic_focus_out_event (0);
-
        x = name_entry.get_text ();
        
        if (x == _route.name()) {
index ca8aabf305c2b71b865faef62f116356d476deb6..c9a0e69ce537161bc7a5d8588afc5889f23d3d13 100644 (file)
@@ -173,7 +173,6 @@ class AudioTimeAxisView : public RouteUI, public TimeAxisView
        void route_name_changed (void *);
        void name_entry_activated ();
        void name_entry_changed ();
-       gint name_entry_focus_out_handler (GdkEventFocus*);
        gint name_entry_key_release_handler (GdkEventKey*);
        gint name_entry_button_release_handler (GdkEventButton*);
        gint name_entry_button_press_handler (GdkEventButton*);
index a15e12cfae25338f5dd24db6a4185ce802e8d3b5..5209a4e277243e49b5cfb4e1ddd6791cd985b373 100644 (file)
@@ -32,80 +32,4 @@ using namespace sigc;
 void
 ARDOUR_UI::install_keybindings ()
 {
-       register_action (shared_actions, "start-prefix", _("start-prefix"), mem_fun(*this, &ARDOUR_UI::start_keyboard_prefix));
-
-       register_action (shared_actions, "toggle-editor-window", _("toggle-editor-window"), mem_fun(*this, &ARDOUR_UI::goto_editor_window));
-       register_action (shared_actions, "toggle-mixer-window", _("toggle-mixer-window"), mem_fun(*this, &ARDOUR_UI::goto_mixer_window));
-       register_action (shared_actions, "toggle-locations-window", _("toggle-locations-window"), mem_fun(*this, &ARDOUR_UI::toggle_location_window));
-       register_action (shared_actions, "toggle-big-clock-window", _("toggle-big-clock-window"), mem_fun(*this, &ARDOUR_UI::toggle_big_clock_window));
-       register_action (shared_actions, "toggle-options-window", _("toggle-options-window"), mem_fun(*this, &ARDOUR_UI::toggle_options_window));
-       register_action (shared_actions, "toggle-auto-loop", _("toggle-auto-loop"), mem_fun(*this, &ARDOUR_UI::toggle_session_auto_loop));
-       register_action (shared_actions, "toggle-punch-in", _("toggle-punch-in"), mem_fun(*this, &ARDOUR_UI::toggle_session_punch_in));
-
-       register_action (shared_actions, "new-session", _("new-session"), bind (mem_fun(*this, &ARDOUR_UI::new_session), false, string()));
-       register_action (shared_actions, "add-audio-track", _("add-audio-track"), bind (mem_fun(*this, &ARDOUR_UI::session_add_audio_track), 1, 1));
-       register_action (shared_actions, "add-audio-bus", _("add-audio-bus"), bind (mem_fun(*this, &ARDOUR_UI::session_add_audio_bus), 1, 1));
-
-       register_action (shared_actions, "save-state", _("save-state"), bind (mem_fun(*this, &ARDOUR_UI::save_state), string ("")));
-       register_action (shared_actions, "quit", _("quit"), (mem_fun(*this, &ARDOUR_UI::finish)));
-       register_action (shared_actions, "remove-last-capture", _("remove-last-capture"), mem_fun(*this, &ARDOUR_UI::remove_last_capture));
-
-       register_action (shared_actions, "transport-stop", _("transport-stop"), mem_fun(*this, &ARDOUR_UI::transport_stop));
-       register_action (shared_actions, "transport-stop-and-forget-capture", _("transport-stop-and-forget-capture"), mem_fun(*this, &ARDOUR_UI::transport_stop_and_forget_capture));
-       register_action (shared_actions, "transport-roll", _("transport-roll"), mem_fun(*this, &ARDOUR_UI::transport_roll));
-       register_action (shared_actions, "transport-loop", _("transport-loop"), mem_fun(*this, &ARDOUR_UI::transport_loop));
-       register_action (shared_actions, "transport-record", _("transport-record"), mem_fun(*this, &ARDOUR_UI::transport_record));
-       register_action (shared_actions, "transport-rewind", _("transport-rewind"), bind (mem_fun(*this, &ARDOUR_UI::transport_rewind), 0));
-       register_action (shared_actions, "transport-rewind-slow", _("transport-rewind-slow"), bind (mem_fun(*this, &ARDOUR_UI::transport_rewind), -1));
-       register_action (shared_actions, "transport-rewind-fast", _("transport-rewind-fast"), bind (mem_fun(*this, &ARDOUR_UI::transport_rewind), 1));
-       register_action (shared_actions, "transport-forward", _("transport-forward"), bind (mem_fun(*this, &ARDOUR_UI::transport_forward), 0));
-       register_action (shared_actions, "transport-forward-slow", _("transport-forward-slow"), bind (mem_fun(*this, &ARDOUR_UI::transport_forward), -1));
-       register_action (shared_actions, "transport-forward-fast", _("transport-forward-fast"), bind (mem_fun(*this, &ARDOUR_UI::transport_forward), 1));
-
-       register_action (shared_actions, "transport-goto-start", _("transport-goto-start"), mem_fun(*this, &ARDOUR_UI::transport_goto_start));
-       register_action (shared_actions, "transport-goto-end", _("transport-goto-end"), mem_fun(*this, &ARDOUR_UI::transport_goto_end));
-
-       register_action (shared_actions, "send-all-midi-feedback", _("send-all-midi-feedback"), mem_fun(*this, &ARDOUR_UI::send_all_midi_feedback));
-       
-       register_action (shared_actions, "toggle-record-enable-track1", _("toggle-record-enable-track1"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable),  0U));
-       register_action (shared_actions, "toggle-record-enable-track2", _("toggle-record-enable-track2"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable),  1U));
-       register_action (shared_actions, "toggle-record-enable-track3", _("toggle-record-enable-track3"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable),  2U));
-       register_action (shared_actions, "toggle-record-enable-track4", _("toggle-record-enable-track4"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable),  3U));
-       register_action (shared_actions, "toggle-record-enable-track5", _("toggle-record-enable-track5"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable),  4U));
-       register_action (shared_actions, "toggle-record-enable-track6", _("toggle-record-enable-track6"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable),  5U));
-       register_action (shared_actions, "toggle-record-enable-track7", _("toggle-record-enable-track7"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable),  6U));
-       register_action (shared_actions, "toggle-record-enable-track8", _("toggle-record-enable-track8"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable),  7U));
-       register_action (shared_actions, "toggle-record-enable-track9", _("toggle-record-enable-track9"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable),  8U));
-       register_action (shared_actions, "toggle-record-enable-track10", _("toggle-record-enable-track10"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 9U));
-       register_action (shared_actions, "toggle-record-enable-track11", _("toggle-record-enable-track11"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 10U));
-       register_action (shared_actions, "toggle-record-enable-track12", _("toggle-record-enable-track12"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 11U));
-       register_action (shared_actions, "toggle-record-enable-track13", _("toggle-record-enable-track13"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 12U));
-       register_action (shared_actions, "toggle-record-enable-track14", _("toggle-record-enable-track14"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 13U));
-       register_action (shared_actions, "toggle-record-enable-track15", _("toggle-record-enable-track15"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 14U));
-       register_action (shared_actions, "toggle-record-enable-track16", _("toggle-record-enable-track16"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 15U));
-       register_action (shared_actions, "toggle-record-enable-track17", _("toggle-record-enable-track17"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 16U));
-       register_action (shared_actions, "toggle-record-enable-track18", _("toggle-record-enable-track18"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 17U));
-       register_action (shared_actions, "toggle-record-enable-track19", _("toggle-record-enable-track19"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 18U));
-       register_action (shared_actions, "toggle-record-enable-track20", _("toggle-record-enable-track20"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 19U));
-       register_action (shared_actions, "toggle-record-enable-track21", _("toggle-record-enable-track21"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 20U));
-       register_action (shared_actions, "toggle-record-enable-track22", _("toggle-record-enable-track22"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 21U));
-       register_action (shared_actions, "toggle-record-enable-track23", _("toggle-record-enable-track23"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 22U));
-       register_action (shared_actions, "toggle-record-enable-track24", _("toggle-record-enable-track24"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 23U));
-       register_action (shared_actions, "toggle-record-enable-track25", _("toggle-record-enable-track25"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 24U));
-       register_action (shared_actions, "toggle-record-enable-track26", _("toggle-record-enable-track26"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 25U));
-       register_action (shared_actions, "toggle-record-enable-track27", _("toggle-record-enable-track27"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 26U));
-       register_action (shared_actions, "toggle-record-enable-track28", _("toggle-record-enable-track28"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 27U));
-       register_action (shared_actions, "toggle-record-enable-track29", _("toggle-record-enable-track29"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 28U));
-       register_action (shared_actions, "toggle-record-enable-track30", _("toggle-record-enable-track30"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 29U));
-       register_action (shared_actions, "toggle-record-enable-track31", _("toggle-record-enable-track31"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 30U));
-       register_action (shared_actions, "toggle-record-enable-track32", _("toggle-record-enable-track32"), bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 31U));
-       
-#if 0
-       ADD ME TO ARDOUR RC SOMEDAY
-       add_binding ("Shift-F1",, bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 0+12U));
-       add_binding ("Control-F1",, bind (mem_fun(*this, &ARDOUR_UI::toggle_record_enable), 0+24U));
-       add_binding ("Alt-F1",, bind (mem_fun(*this, &ARDOUR_UI::toggle_monitor_enable), 0U));
-       add_binding ("Alt-Shift-F1",, bind (mem_fun(*this, &ARDOUR_UI::toggle_monitor_enable), 0+12U));
-       add_binding ("Alt-Control-F1",, bind (mem_fun(*this, &ARDOUR_UI::toggle_monitor_enable), 0+24U));
-#endif
 }
index cfbb6ddd4de657d674d25fdfd4663a04f36c6c03..b1307e398918e7cd8b4ab34e1955bbb3f05a3f13 100644 (file)
@@ -706,8 +706,6 @@ Editor::Editor (AudioEngine& eng)
 
        fade_context_menu.set_name ("ArdourContextMenu");
 
-       install_keybindings ();
-
        set_title (_("ardour: editor"));
        set_wmclass (_("ardour_editor"), "Ardour");
 
@@ -3813,9 +3811,6 @@ Editor::duplicate_dialog (bool dup_region)
        entry.signal_activate().connect (bind (mem_fun (win, &ArdourDialog::stop), 0));
        cancel_button.signal_clicked().connect (bind (mem_fun (win, &ArdourDialog::stop), 1));
 
-       entry.signal_focus_in_event().connect (sigc::ptr_fun (ARDOUR_UI::generic_focus_in_event));
-       entry.signal_focus_out_event().connect (sigc::ptr_fun (ARDOUR_UI::generic_focus_out_event));
-       
        entry.set_text ("1");
        set_size_request_to_display_given_text (entry, X_("12345678"), 20, 15);
        entry.select_region (0, entry.get_text_length());
@@ -4069,7 +4064,6 @@ Editor::point_selection_changed ()
 void
 Editor::run_sub_event_loop ()
 {
-       Keyboard::the_keyboard().allow_focus (true);
        sub_event_loop_status = 0;
        Main::run ();
 }
@@ -4078,7 +4072,6 @@ void
 Editor::finish_sub_event_loop (int status)
 {
        Main::quit ();
-       Keyboard::the_keyboard().allow_focus (false);
        sub_event_loop_status = status;
 }
 
index 13b4769111ac40435b7c681c23adcdcbe53d05b0..d9b337853ea541dc7b906170f198e1a41fddb1f9 100644 (file)
@@ -12,7 +12,6 @@ using namespace std;
 using namespace sigc;
 using namespace ARDOUR;
 using namespace Editing;
-using namespace ActionManager;
 
 void
 Editor::register_actions ()
@@ -20,153 +19,149 @@ Editor::register_actions ()
 
        Glib::RefPtr<ActionGroup> editor_actions = ActionGroup::create (X_("Editor"));
 
-       /* start with actions shared between all top level (major) windows */
-
-       merge_actions (editor_actions, ARDOUR_UI::instance()::get_common_actions());
-
        /* add named actions for the editor */
 
-       register_action (editor_actions, "toggle-xfades-active", _("toggle xfades active"), mem_fun(*this, &Editor::toggle_xfades_active));
+       ActionManager::register_action (editor_actions, "toggle-xfades-active", _("toggle xfades active"), mem_fun(*this, &Editor::toggle_xfades_active));
 
-       register_action (editor_actions, "playhead-to-next-region-start", _("playhead to next region start"), bind (mem_fun(*this, &Editor::cursor_to_next_region_point), playhead_cursor, RegionPoint (Start)));
-       register_action (editor_actions, "playhead-to-next-region-end", _("playhead to next region end"), bind (mem_fun(*this, &Editor::cursor_to_next_region_point), playhead_cursor, RegionPoint (End)));
-       register_action (editor_actions, "playhead-to-next-region-sync", _("playhead to next region sync"), bind (mem_fun(*this, &Editor::cursor_to_next_region_point), playhead_cursor, RegionPoint (SyncPoint)));
+       ActionManager::register_action (editor_actions, "playhead-to-next-region-start", _("playhead to next region start"), bind (mem_fun(*this, &Editor::cursor_to_next_region_point), playhead_cursor, RegionPoint (Start)));
+       ActionManager::register_action (editor_actions, "playhead-to-next-region-end", _("playhead to next region end"), bind (mem_fun(*this, &Editor::cursor_to_next_region_point), playhead_cursor, RegionPoint (End)));
+       ActionManager::register_action (editor_actions, "playhead-to-next-region-sync", _("playhead to next region sync"), bind (mem_fun(*this, &Editor::cursor_to_next_region_point), playhead_cursor, RegionPoint (SyncPoint)));
 
-       register_action (editor_actions, "playhead-to-previous-region-start", _("playhead to previous region start"), bind (mem_fun(*this, &Editor::cursor_to_previous_region_point), playhead_cursor, RegionPoint (Start)));
-       register_action (editor_actions, "playhead-to-previous-region-end", _("playhead to previous region end"), bind (mem_fun(*this, &Editor::cursor_to_previous_region_point), playhead_cursor, RegionPoint (End)));
-       register_action (editor_actions, "playhead-to-previous-region-sync", _("playhead to previous region sync"), bind (mem_fun(*this, &Editor::cursor_to_previous_region_point), playhead_cursor, RegionPoint (SyncPoint)));
+       ActionManager::register_action (editor_actions, "playhead-to-previous-region-start", _("playhead to previous region start"), bind (mem_fun(*this, &Editor::cursor_to_previous_region_point), playhead_cursor, RegionPoint (Start)));
+       ActionManager::register_action (editor_actions, "playhead-to-previous-region-end", _("playhead to previous region end"), bind (mem_fun(*this, &Editor::cursor_to_previous_region_point), playhead_cursor, RegionPoint (End)));
+       ActionManager::register_action (editor_actions, "playhead-to-previous-region-sync", _("playhead to previous region sync"), bind (mem_fun(*this, &Editor::cursor_to_previous_region_point), playhead_cursor, RegionPoint (SyncPoint)));
 
-       register_action (editor_actions, "edit-cursor-to-next-region-start", _("edit cursor to next region start"), bind (mem_fun(*this, &Editor::cursor_to_next_region_point), edit_cursor, RegionPoint (Start)));
-       register_action (editor_actions, "edit-cursor-to-next-region-end", _("edit cursor to next region end"), bind (mem_fun(*this, &Editor::cursor_to_next_region_point), edit_cursor, RegionPoint (End)));
-       register_action (editor_actions, "edit-cursor-to-next-region-sync", _("edit cursor to next region sync"), bind (mem_fun(*this, &Editor::cursor_to_next_region_point), edit_cursor, RegionPoint (SyncPoint)));
+       ActionManager::register_action (editor_actions, "edit-cursor-to-next-region-start", _("edit cursor to next region start"), bind (mem_fun(*this, &Editor::cursor_to_next_region_point), edit_cursor, RegionPoint (Start)));
+       ActionManager::register_action (editor_actions, "edit-cursor-to-next-region-end", _("edit cursor to next region end"), bind (mem_fun(*this, &Editor::cursor_to_next_region_point), edit_cursor, RegionPoint (End)));
+       ActionManager::register_action (editor_actions, "edit-cursor-to-next-region-sync", _("edit cursor to next region sync"), bind (mem_fun(*this, &Editor::cursor_to_next_region_point), edit_cursor, RegionPoint (SyncPoint)));
 
-       register_action (editor_actions, "edit-cursor-to-previous-region-start", _("edit cursor to previous region start"), bind (mem_fun(*this, &Editor::cursor_to_previous_region_point), edit_cursor, RegionPoint (Start)));
-       register_action (editor_actions, "edit-cursor-to-previous-region-end", _("edit cursor to previous region end"), bind (mem_fun(*this, &Editor::cursor_to_previous_region_point), edit_cursor, RegionPoint (End)));
-       register_action (editor_actions, "edit-cursor-to-previous-region-sync", _("edit cursor to previous region sync"), bind (mem_fun(*this, &Editor::cursor_to_previous_region_point), edit_cursor, RegionPoint (SyncPoint)));
+       ActionManager::register_action (editor_actions, "edit-cursor-to-previous-region-start", _("edit cursor to previous region start"), bind (mem_fun(*this, &Editor::cursor_to_previous_region_point), edit_cursor, RegionPoint (Start)));
+       ActionManager::register_action (editor_actions, "edit-cursor-to-previous-region-end", _("edit cursor to previous region end"), bind (mem_fun(*this, &Editor::cursor_to_previous_region_point), edit_cursor, RegionPoint (End)));
+       ActionManager::register_action (editor_actions, "edit-cursor-to-previous-region-sync", _("edit cursor to previous region sync"), bind (mem_fun(*this, &Editor::cursor_to_previous_region_point), edit_cursor, RegionPoint (SyncPoint)));
 
-       register_action (editor_actions, "playhead-to-range-start", _("playhead to range start"), bind (mem_fun(*this, &Editor::cursor_to_selection_start), playhead_cursor));
-       register_action (editor_actions, "playhead-to-range-end", _("playhead to range end"), bind (mem_fun(*this, &Editor::cursor_to_selection_end), playhead_cursor));
+       ActionManager::register_action (editor_actions, "playhead-to-range-start", _("playhead to range start"), bind (mem_fun(*this, &Editor::cursor_to_selection_start), playhead_cursor));
+       ActionManager::register_action (editor_actions, "playhead-to-range-end", _("playhead to range end"), bind (mem_fun(*this, &Editor::cursor_to_selection_end), playhead_cursor));
 
-       register_action (editor_actions, "edit-cursor-to-range-start", _("edit cursor to range start"), bind (mem_fun(*this, &Editor::cursor_to_selection_start), edit_cursor));
-       register_action (editor_actions, "edit-cursor-to-range-end", _("edit cursor to range end"), bind (mem_fun(*this, &Editor::cursor_to_selection_end), edit_cursor));
+       ActionManager::register_action (editor_actions, "edit-cursor-to-range-start", _("edit cursor to range start"), bind (mem_fun(*this, &Editor::cursor_to_selection_start), edit_cursor));
+       ActionManager::register_action (editor_actions, "edit-cursor-to-range-end", _("edit cursor to range end"), bind (mem_fun(*this, &Editor::cursor_to_selection_end), edit_cursor));
 
-       register_action (editor_actions, "jump-forward-to-mark", _("jump forward to mark"), mem_fun(*this, &Editor::jump_forward_to_mark));
-       register_action (editor_actions, "jump-backward-to-mark", _("jump backward to mark"), mem_fun(*this, &Editor::jump_backward_to_mark));
-       register_action (editor_actions, "add-location-from-playhead", _("add location from playhead"), mem_fun(*this, &Editor::add_location_from_playhead_cursor));
+       ActionManager::register_action (editor_actions, "jump-forward-to-mark", _("jump forward to mark"), mem_fun(*this, &Editor::jump_forward_to_mark));
+       ActionManager::register_action (editor_actions, "jump-backward-to-mark", _("jump backward to mark"), mem_fun(*this, &Editor::jump_backward_to_mark));
+       ActionManager::register_action (editor_actions, "add-location-from-playhead", _("add location from playhead"), mem_fun(*this, &Editor::add_location_from_playhead_cursor));
 
-       register_action (editor_actions, "nudge-forward", _("nudge forward"), bind (mem_fun(*this, &Editor::nudge_forward), false));
-       register_action (editor_actions, "nudge-next-forward", _("nudge next forward"), bind (mem_fun(*this, &Editor::nudge_forward), true));
-       register_action (editor_actions, "nudge-backward", _("nudge backward"), bind (mem_fun(*this, &Editor::nudge_backward), false));
-       register_action (editor_actions, "nudge-next-backward", _("nudge next backward"), bind (mem_fun(*this, &Editor::nudge_backward), true));
+       ActionManager::register_action (editor_actions, "nudge-forward", _("nudge forward"), bind (mem_fun(*this, &Editor::nudge_forward), false));
+       ActionManager::register_action (editor_actions, "nudge-next-forward", _("nudge next forward"), bind (mem_fun(*this, &Editor::nudge_forward), true));
+       ActionManager::register_action (editor_actions, "nudge-backward", _("nudge backward"), bind (mem_fun(*this, &Editor::nudge_backward), false));
+       ActionManager::register_action (editor_actions, "nudge-next-backward", _("nudge next backward"), bind (mem_fun(*this, &Editor::nudge_backward), true));
 
-       register_action (editor_actions, "toggle-playback", _("toggle playback"), bind (mem_fun(*this, &Editor::toggle_playback), false));
-       register_action (editor_actions, "toggle-playback-forget-capture", _("toggle playback forget capture"), bind (mem_fun(*this, &Editor::toggle_playback), true));
+       ActionManager::register_action (editor_actions, "toggle-playback", _("toggle playback"), bind (mem_fun(*this, &Editor::toggle_playback), false));
+       ActionManager::register_action (editor_actions, "toggle-playback-forget-capture", _("toggle playback forget capture"), bind (mem_fun(*this, &Editor::toggle_playback), true));
 
-       register_action (editor_actions, "toggle-loop-playback", _("toggle loop playback"), mem_fun(*this, &Editor::toggle_loop_playback));
+       ActionManager::register_action (editor_actions, "toggle-loop-playback", _("toggle loop playback"), mem_fun(*this, &Editor::toggle_loop_playback));
        
-       register_action (editor_actions, "temporal-zoom-out", _("temporal zoom out"), bind (mem_fun(*this, &Editor::temporal_zoom_step), true));
-       register_action (editor_actions, "temporal-zoom-in", _("temporal zoom in"), bind (mem_fun(*this, &Editor::temporal_zoom_step), false));
-       register_action (editor_actions, "zoom-to-session", _("zoom to session"), mem_fun(*this, &Editor::temporal_zoom_session));
-
-       register_action (editor_actions, "scroll-tracks-up", _("scroll tracks up"), mem_fun(*this, &Editor::scroll_tracks_up));
-       register_action (editor_actions, "scroll-tracks-down", _("scroll tracks down"), mem_fun(*this, &Editor::scroll_tracks_down));
-       register_action (editor_actions, "step-tracks-up", _("step tracks up"), mem_fun(*this, &Editor::scroll_tracks_up_line));
-       register_action (editor_actions, "step-tracks-down", _("step tracks down"), mem_fun(*this, &Editor::scroll_tracks_down_line));
-
-       register_action (editor_actions, "scroll-backward", _("scroll backward"), bind (mem_fun(*this, &Editor::scroll_backward), 0.8f));
-       register_action (editor_actions, "scroll-forward", _("scroll forward"), bind (mem_fun(*this, &Editor::scroll_forward), 0.8f));
-       register_action (editor_actions, "goto", _("goto"), mem_fun(*this, &Editor::goto_frame));
-       register_action (editor_actions, "center-playhead", _("center playhead"), mem_fun(*this, &Editor::center_playhead));
-       register_action (editor_actions, "center-edit_cursor", _("center edit_cursor"), mem_fun(*this, &Editor::center_edit_cursor));
-       register_action (editor_actions, "playhead-forward", _("playhead forward"), mem_fun(*this, &Editor::playhead_forward));
-       register_action (editor_actions, "playhead-backward", _("playhead backward"), mem_fun(*this, &Editor::playhead_backward));
-       register_action (editor_actions, "playhead-to-edit", _("playhead to edit"), bind (mem_fun(*this, &Editor::cursor_align), true));
-       register_action (editor_actions, "edit-to-playhead", _("edit to playhead"), bind (mem_fun(*this, &Editor::cursor_align), false));
-
-       register_action (editor_actions, "align-regions-start", _("align regions start"), bind (mem_fun(*this, &Editor::align), ARDOUR::Start));
-       register_action (editor_actions, "align-regions-start-relative", _("align regions start relative"), bind (mem_fun(*this, &Editor::align_relative), ARDOUR::Start));
-       register_action (editor_actions, "align-regions-end", _("align regions end"), bind (mem_fun(*this, &Editor::align), ARDOUR::End));
-       register_action (editor_actions, "align-regions-end-relative", _("align regions end relative"), bind (mem_fun(*this, &Editor::align_relative), ARDOUR::End));
-       register_action (editor_actions, "align-regions-sync", _("align regions sync"), bind (mem_fun(*this, &Editor::align), ARDOUR::SyncPoint));
-       register_action (editor_actions, "align-regions-sync-relative", _("align regions sync relative"), bind (mem_fun(*this, &Editor::align_relative), ARDOUR::SyncPoint));
+       ActionManager::register_action (editor_actions, "temporal-zoom-out", _("temporal zoom out"), bind (mem_fun(*this, &Editor::temporal_zoom_step), true));
+       ActionManager::register_action (editor_actions, "temporal-zoom-in", _("temporal zoom in"), bind (mem_fun(*this, &Editor::temporal_zoom_step), false));
+       ActionManager::register_action (editor_actions, "zoom-to-session", _("zoom to session"), mem_fun(*this, &Editor::temporal_zoom_session));
+
+       ActionManager::register_action (editor_actions, "scroll-tracks-up", _("scroll tracks up"), mem_fun(*this, &Editor::scroll_tracks_up));
+       ActionManager::register_action (editor_actions, "scroll-tracks-down", _("scroll tracks down"), mem_fun(*this, &Editor::scroll_tracks_down));
+       ActionManager::register_action (editor_actions, "step-tracks-up", _("step tracks up"), mem_fun(*this, &Editor::scroll_tracks_up_line));
+       ActionManager::register_action (editor_actions, "step-tracks-down", _("step tracks down"), mem_fun(*this, &Editor::scroll_tracks_down_line));
+
+       ActionManager::register_action (editor_actions, "scroll-backward", _("scroll backward"), bind (mem_fun(*this, &Editor::scroll_backward), 0.8f));
+       ActionManager::register_action (editor_actions, "scroll-forward", _("scroll forward"), bind (mem_fun(*this, &Editor::scroll_forward), 0.8f));
+       ActionManager::register_action (editor_actions, "goto", _("goto"), mem_fun(*this, &Editor::goto_frame));
+       ActionManager::register_action (editor_actions, "center-playhead", _("center playhead"), mem_fun(*this, &Editor::center_playhead));
+       ActionManager::register_action (editor_actions, "center-edit_cursor", _("center edit_cursor"), mem_fun(*this, &Editor::center_edit_cursor));
+       ActionManager::register_action (editor_actions, "playhead-forward", _("playhead forward"), mem_fun(*this, &Editor::playhead_forward));
+       ActionManager::register_action (editor_actions, "playhead-backward", _("playhead backward"), mem_fun(*this, &Editor::playhead_backward));
+       ActionManager::register_action (editor_actions, "playhead-to-edit", _("playhead to edit"), bind (mem_fun(*this, &Editor::cursor_align), true));
+       ActionManager::register_action (editor_actions, "edit-to-playhead", _("edit to playhead"), bind (mem_fun(*this, &Editor::cursor_align), false));
+
+       ActionManager::register_action (editor_actions, "align-regions-start", _("align regions start"), bind (mem_fun(*this, &Editor::align), ARDOUR::Start));
+       ActionManager::register_action (editor_actions, "align-regions-start-relative", _("align regions start relative"), bind (mem_fun(*this, &Editor::align_relative), ARDOUR::Start));
+       ActionManager::register_action (editor_actions, "align-regions-end", _("align regions end"), bind (mem_fun(*this, &Editor::align), ARDOUR::End));
+       ActionManager::register_action (editor_actions, "align-regions-end-relative", _("align regions end relative"), bind (mem_fun(*this, &Editor::align_relative), ARDOUR::End));
+       ActionManager::register_action (editor_actions, "align-regions-sync", _("align regions sync"), bind (mem_fun(*this, &Editor::align), ARDOUR::SyncPoint));
+       ActionManager::register_action (editor_actions, "align-regions-sync-relative", _("align regions sync relative"), bind (mem_fun(*this, &Editor::align_relative), ARDOUR::SyncPoint));
        
-       register_action (editor_actions, "set-playhead", _("set playhead"), mem_fun(*this, &Editor::kbd_set_playhead_cursor));
-       register_action (editor_actions, "set-edit-cursor", _("set edit cursor"), mem_fun(*this, &Editor::kbd_set_edit_cursor));
+       ActionManager::register_action (editor_actions, "set-playhead", _("set playhead"), mem_fun(*this, &Editor::kbd_set_playhead_cursor));
+       ActionManager::register_action (editor_actions, "set-edit-cursor", _("set edit cursor"), mem_fun(*this, &Editor::kbd_set_edit_cursor));
 
-       register_action (editor_actions, "set-undo", _("set undo"), bind (mem_fun(*this, &Editor::undo), 1U));
-       register_action (editor_actions, "set-redo", _("set redo"), bind (mem_fun(*this, &Editor::redo), 1U));
+       ActionManager::register_action (editor_actions, "set-undo", _("set undo"), bind (mem_fun(*this, &Editor::undo), 1U));
+       ActionManager::register_action (editor_actions, "set-redo", _("set redo"), bind (mem_fun(*this, &Editor::redo), 1U));
 
-       register_action (editor_actions, "export-session", _("export session"), mem_fun(*this, &Editor::export_session));
-       register_action (editor_actions, "export-range", _("export range"), mem_fun(*this, &Editor::export_selection));
+       ActionManager::register_action (editor_actions, "export-session", _("export session"), mem_fun(*this, &Editor::export_session));
+       ActionManager::register_action (editor_actions, "export-range", _("export range"), mem_fun(*this, &Editor::export_selection));
 
-       register_action (editor_actions, "editor-cut", _("editor cut"), mem_fun(*this, &Editor::cut));
-       register_action (editor_actions, "editor-copy", _("editor copy"), mem_fun(*this, &Editor::copy));
-       register_action (editor_actions, "editor-paste", _("editor paste"), mem_fun(*this, &Editor::keyboard_paste));
-       register_action (editor_actions, "duplicate-region", _("duplicate region"), mem_fun(*this, &Editor::keyboard_duplicate_region));
-       register_action (editor_actions, "duplicate-range", _("duplicate range"), mem_fun(*this, &Editor::keyboard_duplicate_selection));
-       register_action (editor_actions, "insert-region", _("insert region"), mem_fun(*this, &Editor::keyboard_insert_region_list_selection));
-       register_action (editor_actions, "reverse-region", _("reverse region"), mem_fun(*this, &Editor::reverse_region));
-       register_action (editor_actions, "normalize-region", _("normalize region"), mem_fun(*this, &Editor::normalize_region));
-       register_action (editor_actions, "editor-crop", _("editor crop"), mem_fun(*this, &Editor::crop_region_to_selection));
-       register_action (editor_actions, "insert-chunk", _("insert chunk"), bind (mem_fun(*this, &Editor::paste_named_selection), 1.0f));
+       ActionManager::register_action (editor_actions, "editor-cut", _("editor cut"), mem_fun(*this, &Editor::cut));
+       ActionManager::register_action (editor_actions, "editor-copy", _("editor copy"), mem_fun(*this, &Editor::copy));
+       ActionManager::register_action (editor_actions, "editor-paste", _("editor paste"), mem_fun(*this, &Editor::keyboard_paste));
+       ActionManager::register_action (editor_actions, "duplicate-region", _("duplicate region"), mem_fun(*this, &Editor::keyboard_duplicate_region));
+       ActionManager::register_action (editor_actions, "duplicate-range", _("duplicate range"), mem_fun(*this, &Editor::keyboard_duplicate_selection));
+       ActionManager::register_action (editor_actions, "insert-region", _("insert region"), mem_fun(*this, &Editor::keyboard_insert_region_list_selection));
+       ActionManager::register_action (editor_actions, "reverse-region", _("reverse region"), mem_fun(*this, &Editor::reverse_region));
+       ActionManager::register_action (editor_actions, "normalize-region", _("normalize region"), mem_fun(*this, &Editor::normalize_region));
+       ActionManager::register_action (editor_actions, "editor-crop", _("editor crop"), mem_fun(*this, &Editor::crop_region_to_selection));
+       ActionManager::register_action (editor_actions, "insert-chunk", _("insert chunk"), bind (mem_fun(*this, &Editor::paste_named_selection), 1.0f));
 
-       register_action (editor_actions, "split-at-edit-cursor", _("split at edit cursor"), mem_fun(*this, &Editor::split_region));
-       register_action (editor_actions, "split-at-mouse", _("split at mouse"), mem_fun(*this, &Editor::kbd_split));
+       ActionManager::register_action (editor_actions, "split-at-edit-cursor", _("split at edit cursor"), mem_fun(*this, &Editor::split_region));
+       ActionManager::register_action (editor_actions, "split-at-mouse", _("split at mouse"), mem_fun(*this, &Editor::kbd_split));
 
-       register_action (editor_actions, "brush-at-mouse", _("brush at mouse"), mem_fun(*this, &Editor::kbd_brush));
-       register_action (editor_actions, "audition-at-mouse", _("audition at mouse"), mem_fun(*this, &Editor::kbd_audition));
+       ActionManager::register_action (editor_actions, "brush-at-mouse", _("brush at mouse"), mem_fun(*this, &Editor::kbd_brush));
+       ActionManager::register_action (editor_actions, "audition-at-mouse", _("audition at mouse"), mem_fun(*this, &Editor::kbd_audition));
 
-       register_action (editor_actions, "start-range", _("start range"), mem_fun(*this, &Editor::keyboard_selection_begin));
-       register_action (editor_actions, "finish-range", _("finish range"), bind (mem_fun(*this, &Editor::keyboard_selection_finish), false));
-       register_action (editor_actions, "finish-add-range", _("finish add range"), bind (mem_fun(*this, &Editor::keyboard_selection_finish), true));
+       ActionManager::register_action (editor_actions, "start-range", _("start range"), mem_fun(*this, &Editor::keyboard_selection_begin));
+       ActionManager::register_action (editor_actions, "finish-range", _("finish range"), bind (mem_fun(*this, &Editor::keyboard_selection_finish), false));
+       ActionManager::register_action (editor_actions, "finish-add-range", _("finish add range"), bind (mem_fun(*this, &Editor::keyboard_selection_finish), true));
 
-       register_action (editor_actions, "extend-range-to-end-of-region", _("extend range to end of region"), bind (mem_fun(*this, &Editor::extend_selection_to_end_of_region), false));
-       register_action (editor_actions, "extend-range-to-start-of-region", _("extend range to start of region"), bind (mem_fun(*this, &Editor::extend_selection_to_start_of_region), false));
+       ActionManager::register_action (editor_actions, "extend-range-to-end-of-region", _("extend range to end of region"), bind (mem_fun(*this, &Editor::extend_selection_to_end_of_region), false));
+       ActionManager::register_action (editor_actions, "extend-range-to-start-of-region", _("extend range to start of region"), bind (mem_fun(*this, &Editor::extend_selection_to_start_of_region), false));
 
-       register_action (editor_actions, "toggle-follow-playhead", _("toggle follow playhead"), (mem_fun(*this, &Editor::toggle_follow_playhead)));
-       register_action (editor_actions, "remove-last-capture", _("remove last capture"), (mem_fun(*this, &Editor::remove_last_capture)));
+       ActionManager::register_action (editor_actions, "toggle-follow-playhead", _("toggle follow playhead"), (mem_fun(*this, &Editor::toggle_follow_playhead)));
+       ActionManager::register_action (editor_actions, "remove-last-capture", _("remove last capture"), (mem_fun(*this, &Editor::remove_last_capture)));
 
        Glib::RefPtr<ActionGroup> zoom_actions = ActionGroup::create (X_("Zoom"));
        RadioAction::Group zoom_group;
 
-       register_radio_action (zoom_actions, zoom_group, "zoom-focus-left", _("zoom focus left"), bind (mem_fun(*this, &Editor::set_zoom_focus), Editing::ZoomFocusLeft));
-       register_radio_action (zoom_actions, zoom_group, "zoom-focus-right", _("zoom focus right"), bind (mem_fun(*this, &Editor::set_zoom_focus), Editing::ZoomFocusRight));
-       register_radio_action (zoom_actions, zoom_group, "zoom-focus-center", _("zoom focus center"), bind (mem_fun(*this, &Editor::set_zoom_focus), Editing::ZoomFocusCenter));
-       register_radio_action (zoom_actions, zoom_group, "zoom-focus-playhead", _("zoom focus playhead"), bind (mem_fun(*this, &Editor::set_zoom_focus), Editing::ZoomFocusPlayhead));
-       register_radio_action (zoom_actions, zoom_group, "zoom-focus-edit", _("zoom focus edit"), bind (mem_fun(*this, &Editor::set_zoom_focus), Editing::ZoomFocusEdit));
+       ActionManager::register_radio_action (zoom_actions, zoom_group, "zoom-focus-left", _("zoom focus left"), bind (mem_fun(*this, &Editor::set_zoom_focus), Editing::ZoomFocusLeft));
+       ActionManager::register_radio_action (zoom_actions, zoom_group, "zoom-focus-right", _("zoom focus right"), bind (mem_fun(*this, &Editor::set_zoom_focus), Editing::ZoomFocusRight));
+       ActionManager::register_radio_action (zoom_actions, zoom_group, "zoom-focus-center", _("zoom focus center"), bind (mem_fun(*this, &Editor::set_zoom_focus), Editing::ZoomFocusCenter));
+       ActionManager::register_radio_action (zoom_actions, zoom_group, "zoom-focus-playhead", _("zoom focus playhead"), bind (mem_fun(*this, &Editor::set_zoom_focus), Editing::ZoomFocusPlayhead));
+       ActionManager::register_radio_action (zoom_actions, zoom_group, "zoom-focus-edit", _("zoom focus edit"), bind (mem_fun(*this, &Editor::set_zoom_focus), Editing::ZoomFocusEdit));
 
        Glib::RefPtr<ActionGroup> mouse_mode_actions = ActionGroup::create (X_("MouseMode"));
        RadioAction::Group mouse_mode_group;
 
-       register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-object", _("set mouse mode object"), bind (mem_fun(*this, &Editor::set_mouse_mode), Editing::MouseObject, false));
-       register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-range", _("set mouse mode range"), bind (mem_fun(*this, &Editor::set_mouse_mode), Editing::MouseRange, false));
-       register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-gain", _("set mouse mode gain"), bind (mem_fun(*this, &Editor::set_mouse_mode), Editing::MouseGain, false));
-       register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-zoom", _("set mouse mode zoom"), bind (mem_fun(*this, &Editor::set_mouse_mode), Editing::MouseZoom, false));
-       register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-timefx", _("set mouse mode timefx"), bind (mem_fun(*this, &Editor::set_mouse_mode), Editing::MouseTimeFX, false));
+       ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-object", _("set mouse mode object"), bind (mem_fun(*this, &Editor::set_mouse_mode), Editing::MouseObject, false));
+       ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-range", _("set mouse mode range"), bind (mem_fun(*this, &Editor::set_mouse_mode), Editing::MouseRange, false));
+       ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-gain", _("set mouse mode gain"), bind (mem_fun(*this, &Editor::set_mouse_mode), Editing::MouseGain, false));
+       ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-zoom", _("set mouse mode zoom"), bind (mem_fun(*this, &Editor::set_mouse_mode), Editing::MouseZoom, false));
+       ActionManager::register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-timefx", _("set mouse mode timefx"), bind (mem_fun(*this, &Editor::set_mouse_mode), Editing::MouseTimeFX, false));
 
        Glib::RefPtr<ActionGroup> snap_actions = ActionGroup::create (X_("Snap"));
        RadioAction::Group snap_choice_group;
 
-       register_radio_action (snap_actions, snap_choice_group, X_("snap-to-frame"), _("snap to frame"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToFrame)));
-       register_radio_action (snap_actions, snap_choice_group, X_("snap-to-cd-frame"), _("snap to cd frame"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToCDFrame)));
-       register_radio_action (snap_actions, snap_choice_group, X_("snap-to-smpte-frame"), _("snap to smpte frame"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToSMPTEFrame)));
-       register_radio_action (snap_actions, snap_choice_group, X_("snap-to-smpte-seconds"), _("snap to smpte seconds"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToSMPTESeconds)));
-       register_radio_action (snap_actions, snap_choice_group, X_("snap-to-smpte-minutes"), _("snap to smpte minutes"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToSMPTEMinutes)));
-       register_radio_action (snap_actions, snap_choice_group, X_("snap-to-seconds"), _("snap to seconds"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToSeconds)));
-       register_radio_action (snap_actions, snap_choice_group, X_("snap-to-minutes"), _("snap to minutes"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToMinutes)));
-       register_radio_action (snap_actions, snap_choice_group, X_("snap-to-thirtyseconds"), _("snap to thirtyseconds"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToAThirtysecondBeat)));
-       register_radio_action (snap_actions, snap_choice_group, X_("snap-to-asixteenthbeat"), _("snap to asixteenthbeat"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToASixteenthBeat)));
-       register_radio_action (snap_actions, snap_choice_group, X_("snap-to-eighths"), _("snap to eighths"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToAEighthBeat)));
-       register_radio_action (snap_actions, snap_choice_group, X_("snap-to-quarters"), _("snap to quarters"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToAQuarterBeat)));
-       register_radio_action (snap_actions, snap_choice_group, X_("snap-to-thirds"), _("snap to thirds"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToAThirdBeat)));
-       register_radio_action (snap_actions, snap_choice_group, X_("snap-to-beat"), _("snap to beat"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToBeat)));
-       register_radio_action (snap_actions, snap_choice_group, X_("snap-to-bar"), _("snap to bar"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToBar)));
-       register_radio_action (snap_actions, snap_choice_group, X_("snap-to-mark"), _("snap to mark"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToMark)));
-       register_radio_action (snap_actions, snap_choice_group, X_("snap-to-edit-cursor"), _("snap to edit cursor"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToEditCursor)));
-       register_radio_action (snap_actions, snap_choice_group, X_("snap-to-region-start"), _("snap to region start"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToRegionStart)));
-       register_radio_action (snap_actions, snap_choice_group, X_("snap-to-region-end"), _("snap to region end"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToRegionEnd)));
-       register_radio_action (snap_actions, snap_choice_group, X_("snap-to-region-sync"), _("snap to region sync"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToRegionSync)));
-       register_radio_action (snap_actions, snap_choice_group, X_("snap-to-region-boundary"), _("snap to region boundary"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToRegionBoundary)));
+       ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-frame"), _("snap to frame"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToFrame)));
+       ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-cd-frame"), _("snap to cd frame"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToCDFrame)));
+       ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-smpte-frame"), _("snap to smpte frame"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToSMPTEFrame)));
+       ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-smpte-seconds"), _("snap to smpte seconds"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToSMPTESeconds)));
+       ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-smpte-minutes"), _("snap to smpte minutes"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToSMPTEMinutes)));
+       ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-seconds"), _("snap to seconds"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToSeconds)));
+       ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-minutes"), _("snap to minutes"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToMinutes)));
+       ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-thirtyseconds"), _("snap to thirtyseconds"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToAThirtysecondBeat)));
+       ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-asixteenthbeat"), _("snap to asixteenthbeat"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToASixteenthBeat)));
+       ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-eighths"), _("snap to eighths"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToAEighthBeat)));
+       ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-quarters"), _("snap to quarters"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToAQuarterBeat)));
+       ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-thirds"), _("snap to thirds"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToAThirdBeat)));
+       ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-beat"), _("snap to beat"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToBeat)));
+       ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-bar"), _("snap to bar"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToBar)));
+       ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-mark"), _("snap to mark"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToMark)));
+       ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-edit-cursor"), _("snap to edit cursor"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToEditCursor)));
+       ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-region-start"), _("snap to region start"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToRegionStart)));
+       ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-region-end"), _("snap to region end"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToRegionEnd)));
+       ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-region-sync"), _("snap to region sync"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToRegionSync)));
+       ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-region-boundary"), _("snap to region boundary"), (bind (mem_fun(*this, &Editor::set_snap_to), Editing::SnapToRegionBoundary)));
 
        /* REGION LIST */
 
@@ -174,48 +169,44 @@ Editor::register_actions ()
        RadioAction::Group sort_type_group;
        RadioAction::Group sort_order_group;
 
-       register_action (rl_actions, X_("rlAudition"), _("Audition"), mem_fun(*this, &Editor::audition_region_from_region_list));
-       register_action (rl_actions, X_("rlHide"), _("Hide"), mem_fun(*this, &Editor::hide_region_from_region_list));
-       register_action (rl_actions, X_("rlRemove"), _("Remove"), mem_fun (*this, &Editor::remove_region_from_region_list));
-       register_action (rl_actions, X_("rlShowAll"), _("Show all"), mem_fun(*this, &Editor::toggle_full_region_list));
+       ActionManager::register_action (rl_actions, X_("rlAudition"), _("Audition"), mem_fun(*this, &Editor::audition_region_from_region_list));
+       ActionManager::register_action (rl_actions, X_("rlHide"), _("Hide"), mem_fun(*this, &Editor::hide_region_from_region_list));
+       ActionManager::register_action (rl_actions, X_("rlRemove"), _("Remove"), mem_fun (*this, &Editor::remove_region_from_region_list));
+       ActionManager::register_action (rl_actions, X_("rlShowAll"), _("Show all"), mem_fun(*this, &Editor::toggle_full_region_list));
 
-       register_radio_action (rl_actions, sort_order_group, X_("SortAscending"),  _("Ascending"),
+       ActionManager::register_radio_action (rl_actions, sort_order_group, X_("SortAscending"),  _("Ascending"),
                               bind (mem_fun(*this, &Editor::reset_region_list_sort_direction), true));
-       register_radio_action (rl_actions, sort_order_group, X_("SortDescending"),   _("Descending"),
+       ActionManager::register_radio_action (rl_actions, sort_order_group, X_("SortDescending"),   _("Descending"),
                               bind (mem_fun(*this, &Editor::reset_region_list_sort_direction), false));
        
-       register_radio_action (rl_actions, sort_type_group, X_("SortByRegionName"),  _("By Region Name"),
+       ActionManager::register_radio_action (rl_actions, sort_type_group, X_("SortByRegionName"),  _("By Region Name"),
                               bind (mem_fun(*this, &Editor::reset_region_list_sort_type), ByName));
-       register_radio_action (rl_actions, sort_type_group, X_("SortByRegionLength"),  _("By Region Length"),
+       ActionManager::register_radio_action (rl_actions, sort_type_group, X_("SortByRegionLength"),  _("By Region Length"),
                               bind (mem_fun(*this, &Editor::reset_region_list_sort_type), ByLength));
-       register_radio_action (rl_actions, sort_type_group, X_("SortByRegionPosition"),  _("By Region Position"),
+       ActionManager::register_radio_action (rl_actions, sort_type_group, X_("SortByRegionPosition"),  _("By Region Position"),
                               bind (mem_fun(*this, &Editor::reset_region_list_sort_type), ByPosition));
-       register_radio_action (rl_actions, sort_type_group, X_("SortByRegionTimestamp"),  _("By Region Timestamp"),
+       ActionManager::register_radio_action (rl_actions, sort_type_group, X_("SortByRegionTimestamp"),  _("By Region Timestamp"),
                               bind (mem_fun(*this, &Editor::reset_region_list_sort_type), ByTimestamp));
-       register_radio_action (rl_actions, sort_type_group, X_("SortByRegionStartinFile"),  _("By Region Start in File"),
+       ActionManager::register_radio_action (rl_actions, sort_type_group, X_("SortByRegionStartinFile"),  _("By Region Start in File"),
                               bind (mem_fun(*this, &Editor::reset_region_list_sort_type), ByStartInFile));
-       register_radio_action (rl_actions, sort_type_group, X_("SortByRegionEndinFile"),  _("By Region End in File"),
+       ActionManager::register_radio_action (rl_actions, sort_type_group, X_("SortByRegionEndinFile"),  _("By Region End in File"),
                               bind (mem_fun(*this, &Editor::reset_region_list_sort_type), ByEndInFile));
-       register_radio_action (rl_actions, sort_type_group, X_("SortBySourceFileName"),  _("By Source File Name"),
+       ActionManager::register_radio_action (rl_actions, sort_type_group, X_("SortBySourceFileName"),  _("By Source File Name"),
                               bind (mem_fun(*this, &Editor::reset_region_list_sort_type), BySourceFileName));
-       register_radio_action (rl_actions, sort_type_group, X_("SortBySourceFileLength"),  _("By Source File Length"),
+       ActionManager::register_radio_action (rl_actions, sort_type_group, X_("SortBySourceFileLength"),  _("By Source File Length"),
                               bind (mem_fun(*this, &Editor::reset_region_list_sort_type), BySourceFileLength));
-       register_radio_action (rl_actions, sort_type_group, X_("SortBySourceFileCreationDate"),  _("By Source File Creation Date"),
+       ActionManager::register_radio_action (rl_actions, sort_type_group, X_("SortBySourceFileCreationDate"),  _("By Source File Creation Date"),
                               bind (mem_fun(*this, &Editor::reset_region_list_sort_type), BySourceFileCreationDate));
-       register_radio_action (rl_actions, sort_type_group, X_("SortBySourceFilesystem"),  _("By Source Filesystem"),
+       ActionManager::register_radio_action (rl_actions, sort_type_group, X_("SortBySourceFilesystem"),  _("By Source Filesystem"),
                               bind (mem_fun(*this, &Editor::reset_region_list_sort_type), BySourceFileFS));
        
-       register_action (rl_actions, X_("rlEmbedAudio"), _("Embed audio (link)"), mem_fun(*this, &Editor::embed_audio));
-       register_action (rl_actions, X_("rlImportAudio"), _("Embed audio (link)"), bind (mem_fun(*this, &Editor::import_audio), false));
-
-       /* now add them all */
+       ActionManager::register_action (rl_actions, X_("rlEmbedAudio"), _("Embed audio (link)"), mem_fun(*this, &Editor::embed_audio));
+       ActionManager::register_action (rl_actions, X_("rlImportAudio"), _("Embed audio (link)"), bind (mem_fun(*this, &Editor::import_audio), false));
 
-       ui_manager->insert_action_group (rl_actions);
-       ui_manager->insert_action_group (mouse_mode_actions);
-       ui_manager->insert_action_group (snap_actions);
-       ui_manager->insert_action_group (editor_actions);
 
-       /* and tell the world about us */
+       ActionManager::add_action_group (rl_actions);
+       ActionManager::add_action_group (mouse_mode_actions);
+       ActionManager::add_action_group (snap_actions);
+       ActionManager::add_action_group (editor_actions);
 
-       register_ui_manager (ui_manager);
 }
index 2e486aa23a45a06ffa4ac093b62051bf2424b784..2f8d3a8cfd6fbf8e0ce7e6a9e3c136c6044c1873 100644 (file)
@@ -1766,9 +1766,7 @@ Editor::rename_region ()
        /* recurse */
 
        dialog.show_all ();
-       ARDOUR_UI::instance()->allow_focus (true);
        Main::run ();
-       ARDOUR_UI::instance()->allow_focus (false);
 
        if (region_renamed) {
                (*selection->audio_regions.begin())->region.set_name (entry.get_text());
index 1153f318f41037a6dea49b7c194bb5554a950aaa..9c594e456d826c8ebeb9e1af4e153264f27467fa 100644 (file)
@@ -130,9 +130,6 @@ ExportDialog::ExportDialog(PublicEditor& e, AudioRegion* r)
        file_selector = 0;
        spec.running = false;
 
-       file_entry.signal_focus_in_event().connect (sigc::ptr_fun (ARDOUR_UI::generic_focus_in_event));
-       file_entry.signal_focus_out_event().connect (sigc::ptr_fun (ARDOUR_UI::generic_focus_out_event));
-
        file_entry.set_name ("ExportFileNameEntry");
 
        master_list = ListStore::create (exp_cols);
@@ -1268,19 +1265,11 @@ ExportDialog::initiate_browse ()
 
                file_selector->get_cancel_button()->signal_clicked().connect (bind (mem_fun(*this, &ExportDialog::finish_browse), -1));
                file_selector->get_ok_button()->signal_clicked().connect (bind (mem_fun(*this, &ExportDialog::finish_browse), 1));
-               file_selector->signal_map_event().connect (bind (mem_fun(*this, &ExportDialog::change_focus_policy), true));
                file_selector->signal_unmap_event().connect (bind (mem_fun(*this, &ExportDialog::change_focus_policy), false));
        }
        file_selector->show_all ();
 }
 
-gint
-ExportDialog::change_focus_policy (GdkEventAny *ev, bool yn)
-{
-       Keyboard::the_keyboard().allow_focus (yn);
-       return FALSE;
-}
-
 void
 ExportDialog::finish_browse (int status)
 {
index 454b52389cba1a94fa45a4d9b46301d2865a967d..16343e55bc110789422382baba3f670a423d6cf8 100644 (file)
@@ -135,7 +135,6 @@ class ExportDialog : public ArdourDialog
        void export_cue_file (ARDOUR::Locations::LocationList& locations, const string& path);
        void export_toc_file (ARDOUR::Locations::LocationList& locations, const string& path);
        void do_export ();
-       gint change_focus_policy (GdkEventAny *, bool);
        gint window_closed (GdkEventAny *ignored);
 
        void track_selector_button_click ();
index 4899e58733c4bffe712d755ed2093f97a919789c..ccb65a5ae985d788b3b4b8e5b4ae833907a93d83 100644 (file)
@@ -552,18 +552,6 @@ GainMeter::gain_changed (void *src)
        Gtkmm2ext::UI::instance()->call_slot (mem_fun(*this, &GainMeter::effective_gain_display));
 }
 
-gint
-GainMeter::entry_focus_event (GdkEventFocus* ev)
-{
-       if (ev->in) {
-               ARDOUR_UI::instance()->allow_focus (true);
-       } else {
-               ARDOUR_UI::instance()->allow_focus (false);
-       }
-       return TRUE;
-}
-
-
 void
 GainMeter::set_meter_strip_name (string name)
 {
index 49c7d611bf1a47940ccb3fe4c6cba8a884dbdd99..a1dafafde960f020d737864388eaf81d3976b07a 100644 (file)
@@ -131,8 +131,6 @@ class GainMeter : public Gtk::VBox
        gint start_gain_touch (GdkEventButton*);
        gint end_gain_touch (GdkEventButton*);
 
-       gint entry_focus_event (GdkEventFocus* ev);
-
        void set_mix_group_meter_point (ARDOUR::Route&, ARDOUR::MeterPoint);
        void set_meter_point (ARDOUR::Route&, ARDOUR::MeterPoint);
        gint meter_release (GdkEventButton*);
index eeb73ea5aa0d32382bc5d3fb1e2e6418616b1328..3e187f15d3902e64c6ef60a24bc0d2857b203050 100644 (file)
@@ -31,8 +31,6 @@
 #include <pbd/error.h>
 
 #include "keyboard.h"
-#include "keyboard_target.h"
-#include "ardour_dialog.h"
 #include "gui_thread.h"
 
 #include "i18n.h"
@@ -65,23 +63,12 @@ Keyboard::Keyboard ()
                _the_keyboard = this;
        }
 
-       target = 0;
-       default_target = 0;
-       _queue_events = false;
-       _flush_queue = false;
-       playback_ignore_count = 0;
-       focus_allowed = false;
        collecting_prefix = false;
-       current_dialog = 0;
 
        get_modifier_masks ();
 
        snooper_id = gtk_key_snooper_install (_snooper, (gpointer) this);
 
-       /* some global key actions */
-
-       KeyboardTarget::add_action ("close-dialog", mem_fun(*this, &Keyboard::close_current_dialog));
-
        XMLNode* node = ARDOUR_UI::instance()->keyboard_settings();
        set_state (*node);
 }
@@ -149,26 +136,15 @@ Keyboard::_snooper (GtkWidget *widget, GdkEventKey *event, gpointer data)
 gint
 Keyboard::snooper (GtkWidget *widget, GdkEventKey *event)
 {
-       bool handled = false;
        uint32_t keyval;
 
 #if KBD_DEBUG
        if (debug_keyboard) {
                cerr << "snoop widget " << widget << " key " << event->keyval << " type: " << event->type 
-                    << " focus allowed? " << focus_allowed << " current dialog = " << current_dialog
                     << endl;
        }
 #endif
 
-       /* Only allow key events to propagate to the
-          usual GTK model when specifically allowed. 
-          Returning FALSE here does that.
-       */
-
-       if (focus_allowed) {
-               return FALSE;
-       }
-       
        if (event->keyval == GDK_Shift_R) {
                keyval = GDK_Shift_L;
 
@@ -178,7 +154,6 @@ Keyboard::snooper (GtkWidget *widget, GdkEventKey *event)
        } else {
                keyval = event->keyval;
        }
-       
                
        if (event->type == GDK_KEY_PRESS) {
                bool was_prefix = false;
@@ -241,57 +216,6 @@ Keyboard::snooper (GtkWidget *widget, GdkEventKey *event)
                        sort (state.begin(), state.end());
                }
 
-#if KBD_DEBUG
-               if (debug_keyboard) {
-                       cerr << "STATE: ";
-                       for (State::iterator i = state.begin(); i != state.end(); ++i) {
-                               cerr << (*i) << ' ';
-                       }
-                       cerr << endl;
-               }
-#endif
-
-               if (!was_prefix) {
-
-                       bool old_collecting_prefix = collecting_prefix;
-
-                       if (target) {
-#if KBD_DEBUG
-                               if (debug_keyboard) {
-                                       cerr << "PRESS: delivering to target " << target << endl;
-                               }
-#endif
-                               target->key_press_event (event, state, handled);
-                       }
-                       
-                       if (!handled && default_target) {
-#if KBD_DEBUG
-                               if (debug_keyboard) {
-                                       cerr << "PRESS: not handled, delivering to default target " << default_target << endl;
-                               }
-#endif
-                               default_target->key_press_event (event, state, handled);
-                       }
-
-#if KBD_DEBUG
-                       if (debug_keyboard) {
-                               cerr << "PRESS: handled ? " << handled << endl;
-                       }
-#endif
-
-                       if (handled) {
-                               
-                               /* don't reset collecting prefix is start_prefix()
-                                  was called by the handler.
-                               */
-                               
-                               if (collecting_prefix == old_collecting_prefix) {
-                                       collecting_prefix = false;
-                                       current_prefix = "";
-                               }
-                       }
-               }
-
        } else if (event->type == GDK_KEY_RELEASE) {
 
                State::iterator i;
@@ -301,26 +225,9 @@ Keyboard::snooper (GtkWidget *widget, GdkEventKey *event)
                        sort (state.begin(), state.end());
                } 
 
-               if (target) {
-#if KBD_DEBUG
-                       if (debug_keyboard) {
-                               cerr << "RELEASE: delivering to target " << target << endl;
-                       }
-#endif
-                       target->key_release_event (event, state);
-               } 
-
-               if (default_target) {
-#if KBD_DEBUG
-                       if (debug_keyboard) {
-                               cerr << "RELEASE: delivering to default target " << default_target << endl;
-                       }
-#endif
-                       default_target->key_release_event (event, state);
-               }
        }
 
-       return TRUE;
+       return false;
 }
 
 bool
@@ -329,35 +236,6 @@ Keyboard::key_is_down (uint32_t keyval)
        return find (state.begin(), state.end(), keyval) != state.end();
 }
 
-void
-Keyboard::set_target (KeyboardTarget *kt)
-{
-       /* XXX possible thread issues here */
-       target = kt;
-}
-
-void
-Keyboard::maybe_unset_target (KeyboardTarget* kt)
-{
-       if (target == kt) {
-               target = 0;
-       }
-}
-
-void
-Keyboard::set_default_target (KeyboardTarget *kt)
-{
-       /* XXX possible thread issues here */
-
-       default_target = kt;
-}
-
-void
-Keyboard::allow_focus (bool yn)
-{
-       focus_allowed = yn;
-}
-
 Keyboard::State
 Keyboard::translate_key_name (const string& name)
 
@@ -778,36 +656,24 @@ Keyboard::get_modifier_masks ()
        XFreeModifiermap (modifiers);
 }
 
-gint
-Keyboard::enter_window (GdkEventCrossing *ev, KeyboardTarget *kt)
+bool
+Keyboard::enter_window (GdkEventCrossing *ev)
 {
        switch (ev->detail) {
        case GDK_NOTIFY_INFERIOR:
-               if (debug_keyboard) {
-                       cerr << "INFERIOR crossing to " << kt->name() << endl;
-               }
                break;
 
        case GDK_NOTIFY_VIRTUAL:
-               if (debug_keyboard) {
-                       cerr << "VIRTUAL crossing to " << kt->name() << endl;
-               }
                /* fallthru */
 
        default:
-               if (debug_keyboard) {
-                       cerr << "REAL crossing to " << kt->name() << endl;
-                       cerr << "set current target to " << kt->name() << endl;
-               }
-
-               set_target (kt);
                check_modifier_state ();
        }
 
        return FALSE;
 }
 
-gint
+bool
 Keyboard::leave_window (GdkEventCrossing *ev)
 {
        switch (ev->detail) {
@@ -828,8 +694,6 @@ Keyboard::leave_window (GdkEventCrossing *ev)
                        cerr << "REAL CROSSING ... out\n";
                        cerr << "clearing current target\n";
                }
-
-               set_target (0);
                state.clear ();
                clear_modifier_state ();
        }
@@ -837,70 +701,6 @@ Keyboard::leave_window (GdkEventCrossing *ev)
 
 }
 
-void
-Keyboard::register_target (KeyboardTarget *kt)
-{
-       /* do not register the default - its not meant to be 
-          an actual window, just a fallback if the current
-          target for keyboard events doesn't handle an event.
-       */
-
-       if (kt->name() == X_("default")) {
-               return;
-       }
-
-       kt->window().signal_enter_notify_event().connect (bind (mem_fun(*this, &Keyboard::enter_window), kt));
-       kt->window().signal_leave_notify_event().connect (mem_fun(*this, &Keyboard::leave_window));
-
-       kt->GoingAway.connect (bind (mem_fun(*this, &Keyboard::maybe_unset_target), kt));
-       kt->Hiding.connect (bind (mem_fun(*this, &Keyboard::maybe_unset_target), kt));
-}
-
-void
-Keyboard::set_current_dialog (ArdourDialog* dialog)
-{
-       ENSURE_GUI_THREAD(bind (mem_fun(*this, &Keyboard::set_current_dialog), dialog));
-       
-       current_dialog = dialog;
-
-       if (current_dialog) {
-
-               if (find (known_dialogs.begin(), known_dialogs.end(), dialog) == known_dialogs.end()) {
-                       
-                       current_dialog->GoingAway.connect 
-                               (bind (mem_fun(*this, &Keyboard::set_current_dialog), 
-                                      reinterpret_cast<ArdourDialog *>(0)));
-                       current_dialog->Hiding.connect 
-                               (bind (mem_fun(*this, &Keyboard::set_current_dialog), 
-                                      reinterpret_cast<ArdourDialog *>(0)));
-                       
-                       current_dialog->signal_unmap_event().connect (mem_fun(*this, &Keyboard::current_dialog_vanished));
-                       
-                       known_dialogs.push_back (dialog);
-               }
-       }
-}
-
-gint
-Keyboard::current_dialog_vanished (GdkEventAny *ev)
-{
-       current_dialog = 0;
-       state.clear ();
-       focus_allowed = false;
-       clear_modifier_state ();
-       current_prefix = "";
-
-       return FALSE;
-}
-
-void
-Keyboard::close_current_dialog ()
-{
-       if (current_dialog) {
-               current_dialog->hide ();
-       }
-}
-
 void
 Keyboard::set_edit_button (guint but)
 {
@@ -991,16 +791,3 @@ Keyboard::modifier_state_equals (guint state, ModifierMask mask)
        return (state & RelevantModifierKeyMask) == (guint) mask;
 }
 
-gint
-Keyboard::focus_in_handler (GdkEventFocus* ev)
-{
-       allow_focus (true);
-       return FALSE;
-}
-
-gint
-Keyboard::focus_out_handler (GdkEventFocus* ev)
-{
-       allow_focus (false);
-       return FALSE;
-}
index 1b81f710f8fd8c21b9d1a3785f2db9732f2c362b..8e1c0f1b939ff3cfe21d40445d23f497c39cbc83 100644 (file)
@@ -33,9 +33,6 @@
 using std::vector;
 using std::string;
 
-class KeyboardTarget;
-class ArdourDialog;
-
 class Keyboard : public sigc::trackable, Stateful
 {
   public:
@@ -47,24 +44,12 @@ class Keyboard : public sigc::trackable, Stateful
 
        typedef vector<uint32_t> State;
        
-       void set_target (KeyboardTarget *);
-       void set_default_target (KeyboardTarget *);
-       void allow_focus (bool);
-
-       gint focus_in_handler (GdkEventFocus*);
-       gint focus_out_handler (GdkEventFocus*);
-
        int  get_prefix(float&, bool& was_floating);
        void start_prefix ();
 
        static State  translate_key_name (const string&);
        static string get_real_keyname (const string& name);
 
-       void register_target (KeyboardTarget *);
-
-       void set_current_dialog (ArdourDialog*);
-       void close_current_dialog ();
-
        typedef uint32_t ModifierMask;
 
        static uint32_t Control;
@@ -80,6 +65,9 @@ class Keyboard : public sigc::trackable, Stateful
                return (ev->state & RelevantModifierKeyMask) == 0;
        }
 
+       bool leave_window (GdkEventCrossing *ev);
+       bool enter_window (GdkEventCrossing *ev);
+
        static bool modifier_state_contains (guint state, ModifierMask);
        static bool modifier_state_equals   (guint state, ModifierMask);
 
@@ -111,21 +99,15 @@ class Keyboard : public sigc::trackable, Stateful
 
        bool   _queue_events;
        bool   _flush_queue;
-       guint32 playback_ignore_count;
 
        guint           snooper_id;
        State           state;
-       KeyboardTarget* target;
-       KeyboardTarget* default_target;
-       bool            focus_allowed;
        bool            collecting_prefix;
        string          current_prefix;
        int*            modifier_masks;
        int             modifier_mask;
        int             min_keycode;
        int             max_keycode;
-       ArdourDialog*   current_dialog;
-       std::vector<ArdourDialog*> known_dialogs;
 
        static guint     edit_but;
        static guint     edit_mod;
@@ -136,16 +118,10 @@ class Keyboard : public sigc::trackable, Stateful
        static gint _snooper (GtkWidget*, GdkEventKey*, gpointer);
        gint snooper (GtkWidget*, GdkEventKey*);
        
-       void maybe_unset_target (KeyboardTarget *);
        void queue_event (GdkEventKey*);
-       void playback_queue ();
-       void clear_queue ();
        void get_modifier_masks ();
        void check_modifier_state ();
        void clear_modifier_state ();
-       gint enter_window (GdkEventCrossing*, KeyboardTarget*);
-       gint leave_window (GdkEventCrossing*);
-       gint current_dialog_vanished (GdkEventAny*);
 
        void check_meta_numlock (char keycode, guint mod, string modname);
 };
index a6957a90175202023dbe281d1ca722d181e2c549..564cc4dca29296d3cdaf8a37c63ca071569491b0 100644 (file)
@@ -108,17 +108,8 @@ LocationEditRow::LocationEditRow(Session * sess, Location * loc, int32_t num)
        cd_track_details_hbox.pack_start (composer_entry, true, true);
 
        isrc_entry.signal_changed().connect (mem_fun(*this, &LocationEditRow::isrc_entry_changed)); 
-       isrc_entry.signal_focus_in_event().connect (mem_fun(*this, &LocationEditRow::entry_focus_event));
-       isrc_entry.signal_focus_out_event().connect (mem_fun(*this, &LocationEditRow::entry_focus_event));
-
        performer_entry.signal_changed().connect (mem_fun(*this, &LocationEditRow::performer_entry_changed));
-       performer_entry.signal_focus_in_event().connect (mem_fun(*this, &LocationEditRow::entry_focus_event));
-       performer_entry.signal_focus_out_event().connect (mem_fun(*this, &LocationEditRow::entry_focus_event));
-
        composer_entry.signal_changed().connect (mem_fun(*this, &LocationEditRow::composer_entry_changed));
-       composer_entry.signal_focus_in_event().connect (mem_fun(*this, &LocationEditRow::entry_focus_event));
-       composer_entry.signal_focus_out_event().connect (mem_fun(*this, &LocationEditRow::entry_focus_event));
-
        scms_check_button.signal_toggled().connect(mem_fun(*this, &LocationEditRow::scms_toggled));
        preemph_check_button.signal_toggled().connect(mem_fun(*this, &LocationEditRow::preemph_toggled));
 
@@ -240,8 +231,6 @@ LocationEditRow::set_location (Location *loc)
                name_entry.set_size_request (100, -1);
                name_entry.set_editable (true);
                name_entry.signal_changed().connect (mem_fun(*this, &LocationEditRow::name_entry_changed));  
-               name_entry.signal_focus_in_event().connect (mem_fun(*this, &LocationEditRow::entry_focus_event));
-               name_entry.signal_focus_out_event().connect (mem_fun(*this, &LocationEditRow::entry_focus_event));
 
                if (!name_entry.get_parent()) {
                        item_table.attach (name_entry, 1, 2, 0, 1, FILL | EXPAND, FILL, 4, 0);
@@ -302,18 +291,6 @@ LocationEditRow::set_location (Location *loc)
        
 }
 
-gint
-LocationEditRow::entry_focus_event (GdkEventFocus* ev)
-{
-       if (ev->in) {
-               ARDOUR_UI::instance()->allow_focus (true);
-       } else {
-               ARDOUR_UI::instance()->allow_focus (false);
-       }
-       return TRUE;
-}
-
-
 void
 LocationEditRow::name_entry_changed ()
 {
index 8f16e2b43ac135a8a4a9a48de4d0276e58e5faa0..4c6b2da8e2370b241b7ec606139e6f71c81d1b77 100644 (file)
@@ -124,8 +124,6 @@ class LocationEditRow  : public Gtk::HBox
        void scms_toggled ();
        void preemph_toggled ();
 
-       gint entry_focus_event (GdkEventFocus* ev);
-       
        void end_changed (ARDOUR::Location *);
        void start_changed (ARDOUR::Location *);
        void name_changed (ARDOUR::Location *);
index 3b5a2be8a98c4bce1bf42bf8340538eb0ca1a94b..f37076aaa3a442c677a1f964c094714d712f1fc1 100644 (file)
@@ -1131,8 +1131,6 @@ MixerStrip::setup_comment_editor ()
 
        comment_area.set_name ("MixerTrackCommentArea");
        comment_area.set_editable (true);
-       comment_area.signal_focus_in_event().connect (ptr_fun (ARDOUR_UI::generic_focus_in_event));
-       comment_area.signal_focus_out_event().connect (ptr_fun (ARDOUR_UI::generic_focus_out_event));
          comment_area.changed.connect (mem_fun(*this, &MixerStrip::comment_edited));
        // GTK2FIX
        // comment_area.signal_button_release_event().connect_after (ptr_fun (do_not_propagate));
index 83aa261895bd2ed9873f63e837063706a6783ddd..31e91fe3437172f5bc40f314637d6f37be86ff82 100644 (file)
@@ -278,8 +278,6 @@ Mixer_UI::strip_button_release_event (GdkEventButton *ev, MixerStrip *strip)
                   at the same time.
                */
                
-               ARDOUR_UI::instance()->allow_focus (false);
-               
                if (_selection.selected (&strip->route())) {
                        _selection.remove (&strip->route());
                } else {
index 1e98dda2d4e00d37656cf2131463bd0292db85ed..803e17d79b0f3d37afdcbed983c5ca503d6fba2b 100644 (file)
@@ -412,9 +412,6 @@ OptionEditor::setup_path_options()
 
        session_raid_entry.signal_activate().connect (mem_fun(*this, &OptionEditor::raid_path_changed));
 
-       session_raid_entry.signal_focus_in_event().connect (mem_fun (Keyboard::the_keyboard(), &Keyboard::focus_in_handler));
-       session_raid_entry.signal_focus_out_event().connect (bind (mem_fun(*this, &OptionEditor::focus_out_event_handler), &OptionEditor::raid_path_changed));
-
        label = manage(new Label(_("session RAID path")));
        label->set_name ("OptionsLabel");
        path_table.attach (*label, 0, 1, 0, 1, FILL|EXPAND, FILL);
@@ -1402,7 +1399,6 @@ void
 OptionEditor::just_close_win()
 {
        hide_all();
-       ARDOUR_UI::instance()->allow_focus(false);
 }
 
 void
@@ -1523,9 +1519,7 @@ OptionEditor::setup_click_editor ()
        click_path_entry.signal_activate().connect (mem_fun(*this, &OptionEditor::click_sound_changed));
        click_emphasis_path_entry.signal_activate().connect (mem_fun(*this, &OptionEditor::click_emphasis_sound_changed));
 
-       click_path_entry.signal_focus_in_event().connect (mem_fun (Keyboard::the_keyboard(), &Keyboard::focus_in_handler));
        click_path_entry.signal_focus_out_event().connect (bind (mem_fun(*this, &OptionEditor::focus_out_event_handler), &OptionEditor::click_sound_changed));
-       click_emphasis_path_entry.signal_focus_in_event().connect (mem_fun (Keyboard::the_keyboard(), &Keyboard::focus_in_handler));
        click_emphasis_path_entry.signal_focus_out_event().connect (bind (mem_fun(*this, &OptionEditor::focus_out_event_handler), &OptionEditor::click_emphasis_sound_changed));
 
        click_browse_button.set_name ("EditorGTKButton");
@@ -1606,11 +1600,11 @@ OptionEditor::connect_audition_editor ()
        auditioner_gpm->show_all ();
 }
 
-gint
+bool
 OptionEditor::focus_out_event_handler (GdkEventFocus* ev, void (OptionEditor::*pmf)()) 
 {
        (this->*pmf)();
-       return Keyboard::the_keyboard().focus_out_handler (ev);
+       return false;
 }
 
 void
index 2808b18dddef5c2a7b76a7e738b53f1ac967f0be..6eabe6a4c9b7fe5b56878aac3943491180db9ba1 100644 (file)
@@ -70,7 +70,7 @@ class OptionEditor : public ArdourDialog
        void map_some_session_state (Gtk::CheckButton& button, bool (ARDOUR::Session::*get)() const);
        gint wm_close (GdkEventAny *);
        void just_close_win();
-       gint focus_out_event_handler (GdkEventFocus*, void (OptionEditor::*pmf)());
+       bool focus_out_event_handler (GdkEventFocus*, void (OptionEditor::*pmf)());
 
        /* paths */
 
index 06ae10ef1f5bd8a29cdbfe8b6e991d863ae4349a..6d629118acd2390fbb728635c177c1a7d1aab110 100644 (file)
@@ -261,17 +261,6 @@ PannerUI::~PannerUI ()
 }
 
 
-gint
-PannerUI::entry_focus_event (GdkEventFocus* ev)
-{
-       if (ev->in) {
-               ARDOUR_UI::instance()->allow_focus (true);
-       } else {
-               ARDOUR_UI::instance()->allow_focus (false);
-       }
-       return TRUE;
-}
-
 void
 PannerUI::panner_changed ()
 {
@@ -337,8 +326,6 @@ PannerUI::setup_pan ()
                        bc->set_name ("PanSlider");
                        bc->set_shadow_type (Gtk::SHADOW_NONE);
                        bc->set_style (BarController::Line);
-                       bc->get_spin_button().signal_focus_in_event().connect (mem_fun(*this, &PannerUI::entry_focus_event));
-                       bc->get_spin_button().signal_focus_out_event().connect (mem_fun(*this, &PannerUI::entry_focus_event));
 
                        bc->StartGesture.connect (bind (mem_fun (_io, &IO::start_pan_touch), (uint32_t) asz));
                        bc->StopGesture.connect (bind (mem_fun (_io, &IO::end_pan_touch), (uint32_t) asz));
index e13be3684f2d95b8467a217115d3f9cc44675fd5..b028510de34e7f0613f3260c534bff1458561ff4 100644 (file)
@@ -108,8 +108,6 @@ class PannerUI : public Gtk::HBox
        gint start_pan_touch (GdkEventButton*);
        gint end_pan_touch (GdkEventButton*);
 
-       gint entry_focus_event (GdkEventFocus* ev);
-
        gint pan_button_event (GdkEventButton*, uint32_t which);
        Gtk::Menu* pan_menu;
        Gtk::CheckMenuItem* bypass_menu_item;
index d155db57c608900e24a007a226f692ad810f71dd..c426b5770235c0e25d892ee4ff0da925e0e6d908 100644 (file)
@@ -553,9 +553,6 @@ PluginUI::build_control_ui (AudioEngine &engine, guint32 port_index, MIDI::Contr
                        control_ui->control->set_style (BarController::LeftToRight);
                        control_ui->control->set_use_parent (true);
 
-                       control_ui->control->get_spin_button().signal_focus_in_event().connect (mem_fun(*this, &PluginUI::entry_focus_event));
-                       control_ui->control->get_spin_button().signal_focus_out_event().connect (mem_fun(*this, &PluginUI::entry_focus_event));
-
                        control_ui->control->StartGesture.connect (bind (mem_fun(*this, &PluginUI::start_touch), control_ui));
                        control_ui->control->StopGesture.connect (bind (mem_fun(*this, &PluginUI::stop_touch), control_ui));
                        
@@ -770,17 +767,6 @@ PluginUIWindow::plugin_going_away (ARDOUR::Redirect* ignored)
        delete_when_idle (this);
 }
 
-gint
-PluginUI::entry_focus_event (GdkEventFocus* ev)
-{
-       if (ev->in) {
-               ARDOUR_UI::instance()->allow_focus (true);
-       } else {
-               ARDOUR_UI::instance()->allow_focus (false);
-       }
-       return TRUE;
-}
-
 void
 PluginUI::redirect_active_changed (Redirect* r, void* src)
 {
index ef7ba1eb2afc6de170c25a03721239da17438535..dd16082489e923302a1dabb135120b6e0f5ba673 100644 (file)
@@ -187,7 +187,6 @@ class PluginUI : public PlugUIBase, public Gtk::VBox
        void update_control_display (ControlUI* cui);
        void control_port_toggled (ControlUI* cui);
        void control_combo_changed (GdkEventAny* ignored, ControlUI* cui);
-       gint entry_focus_event (GdkEventFocus* ev);
 
        void redirect_active_changed (ARDOUR::Redirect*, void*);
 
index 0839a5c8a7532339b8d4c6ec99788f0625e2f4ef..08f089f404c06327dd452903ff9a67c175f221cd 100644 (file)
@@ -26,7 +26,5 @@ using namespace sigc;
 ArdourPrompter::ArdourPrompter (bool modal)
        : Gtkmm2ext::Prompter (modal)
 {
-       the_entry().signal_focus_in_event().connect (ptr_fun (ARDOUR_UI::generic_focus_in_event));
-       the_entry().signal_focus_out_event().connect (ptr_fun (ARDOUR_UI::generic_focus_out_event));
 }
 
index 6ffbe098facab97580f953a967307a12a4ebb09c..9e73596b9f5fe1d07a86ee8db30faca05fd4dff6 100644 (file)
@@ -94,6 +94,7 @@ class PublicEditor : public Gtk::Window, public Stateful {
        virtual bool show_measures () const = 0;
        virtual void export_session() = 0;
        virtual void export_selection() = 0;
+       virtual void register_actions() = 0;
        virtual void add_toplevel_controls (Gtk::Container&) = 0;
        virtual void      set_zoom_focus (Editing::ZoomFocus) = 0;
        virtual Editing::ZoomFocus get_zoom_focus () const = 0;
index 616001ca7672edc75394768c78f71cc9efd8831d..dd3035cef65afe7a597c32238dfe0a2537523537 100644 (file)
@@ -70,9 +70,6 @@ AudioRegionEditor::AudioRegionEditor (Session&s, AudioRegion& r, AudioRegionView
        name_entry.set_name ("AudioRegionEditorEntry");
        name_label.set_name ("AudioRegionEditorLabel");
 
-       name_entry.signal_focus_in_event().connect (mem_fun(*this, &AudioRegionEditor::focus_change));
-       name_entry.signal_focus_out_event().connect (mem_fun(*this, &AudioRegionEditor::focus_change));
-       
        name_hbox.set_spacing (5);
        name_hbox.pack_start (name_label, false, false);
        name_hbox.pack_start (name_entry, false, false);
@@ -204,8 +201,6 @@ AudioRegionEditor::AudioRegionEditor (Session&s, AudioRegion& r, AudioRegionView
 
        fade_in_length_spinner.set_digits (3);
 
-       fade_in_length_spinner.signal_focus_in_event().connect (mem_fun(*this, &AudioRegionEditor::focus_change));
-       fade_in_length_spinner.signal_focus_out_event().connect (mem_fun(*this, &AudioRegionEditor::focus_change));
        fade_in_length_spinner.signal_activate().connect (mem_fun(*this, &AudioRegionEditor::activation));
 
        Gtkmm2ext::set_size_request_to_display_given_text (fade_in_length_spinner, "500g", 20, -1);
@@ -240,8 +235,6 @@ AudioRegionEditor::AudioRegionEditor (Session&s, AudioRegion& r, AudioRegionView
        
        fade_out_length_spinner.set_digits (3);
 
-       fade_out_length_spinner.signal_focus_in_event().connect (mem_fun(*this, &AudioRegionEditor::focus_change));
-       fade_out_length_spinner.signal_focus_out_event().connect (mem_fun(*this, &AudioRegionEditor::focus_change));
        fade_out_length_spinner.signal_activate().connect (mem_fun(*this, &AudioRegionEditor::activation));
 
        Gtkmm2ext::set_size_request_to_display_given_text (fade_out_length_spinner, "500g", 20, -1);
@@ -622,17 +615,6 @@ AudioRegionEditor::bounds_changed (Change what_changed)
        }
 }
 
-gint
-AudioRegionEditor::focus_change (GdkEventFocus *ev)
-{
-       if (ev->in) {
-               ARDOUR_UI::instance()->allow_focus (true);
-       } else {
-               ARDOUR_UI::instance()->allow_focus (false);
-       }
-       return TRUE;
-}
-
 void
 AudioRegionEditor::activation ()
 {
index fcf84beb3b1247c3c755bf4090a8387a18d86406..4c77e6186f28fc65b009bb815a4fb10db431a4d0 100644 (file)
@@ -137,7 +137,6 @@ class AudioRegionEditor : public ArdourDialog
        void fade_in_changed ();
        void fade_out_changed ();
 
-       gint focus_change (GdkEventFocus *);
        void activation ();
 
        void name_entry_changed ();
index 508ddb92609d6757066ff27eabe034eb3827d527..47156bf672f583f41363e017556b7373de988430 100644 (file)
@@ -88,9 +88,6 @@ TimeAxisView::TimeAxisView (ARDOUR::Session& sess, PublicEditor& ed, TimeAxisVie
        name_entry.signal_button_release_event().connect (mem_fun (*this, &TimeAxisView::name_entry_button_release));
        name_entry.signal_button_press_event().connect (mem_fun (*this, &TimeAxisView::name_entry_button_press));
        
-       name_entry.signal_focus_in_event().connect (sigc::ptr_fun (ARDOUR_UI::generic_focus_in_event));
-       name_entry.signal_focus_out_event().connect (sigc::ptr_fun (ARDOUR_UI::generic_focus_out_event));
-
        Gtkmm2ext::set_size_request_to_display_given_text (name_entry, N_("gTortnam"), 10, 10); // just represents a short name
 
        name_label.set_name ("TrackLabel");
index 0e1b3c80f5f94b7cb918e0532c369477a83b87b5..bccdeb22bc233d59da8def650cb2ef34a371ef2f 100644 (file)
@@ -185,17 +185,10 @@ internationalize (const char **array)
 gint
 just_hide_it (GdkEventAny *ev, Gtk::Window *win)
 {
-       ARDOUR_UI::instance()->allow_focus (false);
        win->hide_all ();
        return TRUE;
 }
 
-void
-allow_keyboard_focus (bool yn)
-{
-       ARDOUR_UI::instance()->allow_focus (yn);
-}
-
 /* xpm2rgb copied from nixieclock, which bore the legend:
 
     nixieclock - a nixie desktop timepiece
index 1f2de282d384ecf406ad386a191c33dd2fb7d76e..cb3d4d8c59a0fe0e6bdc9bff80da534e06840ca3 100644 (file)
@@ -95,7 +95,6 @@ VisualTimeAxis::VisualTimeAxis(std::string name, PublicEditor& ed, ARDOUR::Sessi
        _marked_for_display = true;
        
        name_entry.signal_activate().connect(mem_fun(*this, &VisualTimeAxis::name_entry_changed)) ;
-       name_entry.signal_focus_out_event().connect(mem_fun(*this, &VisualTimeAxis::name_entry_focus_out_handler)) ;
        name_entry.signal_button_press_event().connect(mem_fun(*this, &VisualTimeAxis::name_entry_button_press_handler)) ;
        name_entry.signal_button_release_event().connect(mem_fun(*this, &VisualTimeAxis::name_entry_button_release_handler)) ;
        name_entry.signal_key_release_event().connect(mem_fun(*this, &VisualTimeAxis::name_entry_key_release_handler)) ;
@@ -359,7 +358,6 @@ VisualTimeAxis::start_time_axis_rename()
        name_prompter = new ArdourPrompter() ;
 
        name_prompter->set_prompt (_("new name: ")) ;
-       ARDOUR_UI::instance()->allow_focus(true) ;
        name_prompter->show_all() ;
 
        switch (name_prompter->run ()) {
@@ -401,8 +399,6 @@ VisualTimeAxis::label_view()
 void
 VisualTimeAxis::name_entry_changed()
 {
-       ARDOUR_UI::generic_focus_out_event (0);
-
        string x = name_entry.get_text ();
        
        if (x == time_axis_name) {
@@ -439,13 +435,6 @@ VisualTimeAxis::name_entry_button_release_handler(GdkEventButton *ev)
        return FALSE;
 }
 
-gint
-VisualTimeAxis::name_entry_focus_out_handler(GdkEventFocus* ev)
-{
-       name_entry_changed();
-       return TRUE;
-}
-
 gint
 VisualTimeAxis::name_entry_key_release_handler(GdkEventKey* ev)
 {