NO-OP whitespace & foratting of header files
[ardour.git] / gtk2_ardour / ardour_ui_ed.cc
index 1b14cba012e0dc66d1a2e28e38eb216f37d94a72..b0e0bc1006c03d21ccc8bac004d4738d2559a7a6 100644 (file)
@@ -161,7 +161,7 @@ ARDOUR_UI::install_actions ()
 
        /* the real actions */
 
-       act = global_actions.register_action (main_actions, X_("New"), _("New..."),  hide_return (sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::get_session_parameters), false, true, "")));
+       act = global_actions.register_action (main_actions, X_("New"), _("New..."),  hide_return (sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::get_session_parameters), true, true, "")));
 
        global_actions.register_action (main_actions, X_("Open"), _("Open..."),  sigc::mem_fun(*this, &ARDOUR_UI::open_session));
        global_actions.register_action (main_actions, X_("Recent"), _("Recent..."),  sigc::mem_fun(*this, &ARDOUR_UI::open_recent_session));
@@ -186,19 +186,11 @@ ARDOUR_UI::install_actions ()
        act = global_actions.register_action (main_actions, X_("Scripting"), S_("Session|Scripting"));
        ActionManager::session_sensitive_actions.push_back (act);
 
-       act = global_actions.register_action (main_actions, X_("AddLuaScript"), _("Add Lua Script..."),
-                     sigc::mem_fun (*this, &ARDOUR_UI::add_lua_script));
-       ActionManager::session_sensitive_actions.push_back (act);
-
-       act = global_actions.register_action (main_actions, X_("RemoveLuaScript"), _("Remove Lua Script"),
-                     sigc::mem_fun (*this, &ARDOUR_UI::remove_lua_script));
-       ActionManager::session_sensitive_actions.push_back (act);
-
        act = global_actions.register_action (main_actions, X_("OpenVideo"), _("Open Video..."),
-                                             sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::add_video), (Gtk::Window*) 0));
+                                             sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::add_video), (Gtk::Window*) 0));
        ActionManager::session_sensitive_actions.push_back (act);
        act = global_actions.register_action (main_actions, X_("CloseVideo"), _("Remove Video"),
-                                             sigc::mem_fun (*this, &ARDOUR_UI::remove_video));
+                                             sigc::mem_fun (*this, &ARDOUR_UI::remove_video));
        act->set_sensitive (false);
        act = global_actions.register_action (main_actions, X_("ExportVideo"), _("Export to Video File..."),
                                              hide_return (sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::export_video), false)));
@@ -267,8 +259,6 @@ ARDOUR_UI::install_actions ()
        global_actions.register_action (common_actions, X_("Quit"), _("Quit"), (hide_return (sigc::mem_fun(*this, &ARDOUR_UI::finish))));
        global_actions.register_action (common_actions, X_("Hide"), _("Hide"), sigc::mem_fun (*this, &ARDOUR_UI::hide_application));
 
-       global_actions.register_action (common_actions, X_("show-editor"), _("Show"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::show_tabbable), editor));
-       global_actions.register_action (common_actions, X_("show-mixer"), _("Show"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::show_tabbable), mixer));
        global_actions.register_action (common_actions, X_("show-preferences"), _("Show"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::show_tabbable), rc_option_editor));
        global_actions.register_action (common_actions, X_("menu-show-preferences"), _("Preferences"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::show_tabbable), rc_option_editor));
 
@@ -284,6 +274,9 @@ ARDOUR_UI::install_actions ()
        global_actions.register_action (common_actions, X_("detach-mixer"), _("Detach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::detach_tabbable), mixer));
        global_actions.register_action (common_actions, X_("detach-preferences"), _("Detach"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::detach_tabbable), rc_option_editor));
 
+       Glib::RefPtr<Gtk::ActionGroup> window_actions = ARDOUR_UI::instance()->global_actions.create_action_group (X_("Window"));
+       global_actions.register_action (window_actions, X_("show-mixer"), _("Show Mixer"), sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::show_tabbable), mixer));
+
        /* these actions are all currently implemented by the Editor, but need
         * to be accessible from anywhere as actions.
         */
@@ -364,8 +357,6 @@ ARDOUR_UI::install_actions ()
        global_actions.register_action (common_actions, X_("previous-tab"), _("Previous Tab"), sigc::mem_fun (*this, &ARDOUR_UI::step_up_through_tabs));
        global_actions.register_action (common_actions, X_("next-tab"), _("Next Tab"), sigc::mem_fun (*this, &ARDOUR_UI::step_down_through_tabs));
 
-       global_actions.register_action (common_actions, X_("toggle-editor-and-mixer"), _("Toggle Editor & Mixer"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_editor_and_mixer));
-
        /* windows visibility actions */
 
        global_actions.register_toggle_action (common_actions, X_("ToggleMaximalEditor"), _("Maximise Editor Space"), sigc::mem_fun (*this, &ARDOUR_UI::toggle_editing_space));
@@ -474,6 +465,10 @@ ARDOUR_UI::install_actions ()
        ActionManager::session_sensitive_actions.push_back (act);
        ActionManager::write_sensitive_actions.push_back (act);
 
+       act = global_actions.register_action (transport_actions, X_("RecordCountIn"), _("Record w/Count-In"), sigc::mem_fun(*this, &ARDOUR_UI::transport_rec_count_in));
+       ActionManager::session_sensitive_actions.push_back (act);
+       ActionManager::write_sensitive_actions.push_back (act);
+
        act = global_actions.register_action (transport_actions, X_("Record"), _("Enable Record"), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::transport_record), false));
        ActionManager::session_sensitive_actions.push_back (act);
        ActionManager::write_sensitive_actions.push_back (act);
@@ -735,8 +730,8 @@ ARDOUR_UI::use_menubar_as_top_menubar ()
        Gtk::Widget* widget;
        Application* app = Application::instance ();
 
-        /* the addresses ("/ui/Main...") used below are based on the menu definitions in the menus file
-         */
+       /* the addresses ("/ui/Main...") used below are based on the menu definitions in the menus file
+       */
 
        /* Quit will be taken care of separately */
 
@@ -752,11 +747,11 @@ ARDOUR_UI::use_menubar_as_top_menubar ()
 
        if ((widget = ActionManager::get_widget ("/ui/Main/Session/toggle-about"))) {
                app->add_app_menu_item (group, dynamic_cast<MenuItem*>(widget));
-        }
+       }
 
        if ((widget = ActionManager::get_widget ("/ui/Main/Edit/menu-show-preferences"))) {
                app->add_app_menu_item (group, dynamic_cast<MenuItem*>(widget));
-        }
+       }
 
        app->set_menu_bar (*menu_bar);
 }
@@ -772,12 +767,11 @@ ARDOUR_UI::save_ardour_state ()
           a different lifetime model from add_instant_xml().
        */
 
-       LocaleGuard lg; // one guard to rule them all
        XMLNode* node = new XMLNode (keyboard->get_state());
        Config->add_extra_xml (*node);
 
        XMLNode* window_node = new XMLNode (X_("UI"));
-       window_node->add_property (_status_bar_visibility.get_state_name().c_str(), _status_bar_visibility.get_state_value ());
+       window_node->set_property (_status_bar_visibility.get_state_name().c_str(), _status_bar_visibility.get_state_value ());
 
        /* main window */
 
@@ -786,10 +780,10 @@ ARDOUR_UI::save_ardour_state ()
        _main_window.get_size (mw, mh);
 
        XMLNode main_window_node (X_("Main"));
-       main_window_node.add_property (X_("x"), PBD::to_string (mx, std::dec));
-       main_window_node.add_property (X_("y"), PBD::to_string (my, std::dec));
-       main_window_node.add_property (X_("w"), PBD::to_string (mw, std::dec));
-       main_window_node.add_property (X_("h"), PBD::to_string (mh, std::dec));
+       main_window_node.set_property (X_("x"), mx);
+       main_window_node.set_property (X_("y"), my);
+       main_window_node.set_property (X_("w"), mw);
+       main_window_node.set_property (X_("h"), mh);
 
        string current_tab;
        int current_page_number = _tabs.get_current_page ();
@@ -801,7 +795,7 @@ ARDOUR_UI::save_ardour_state ()
                current_tab = "preferences";
        }
 
-       main_window_node.add_property (X_("current-tab"), current_tab);
+       main_window_node.set_property (X_("current-tab"), current_tab);
 
        /* Windows */