#include <gtkmm/accelmap.h>
#include <gtk/gtk.h>
+#include "pbd/file_utils.h"
+#include "pbd/fpu.h"
+#include "pbd/convert.h"
+
#include "gtkmm2ext/cairo_packer.h"
-#include "gtkmm2ext/tearoff.h"
#include "gtkmm2ext/utils.h"
#include "gtkmm2ext/window_title.h"
-#include "pbd/file_utils.h"
-#include "pbd/fpu.h"
-#include "pbd/convert.h"
+#include "widgets/tearoff.h"
#include "ardour_ui.h"
#include "public_editor.h"
/* 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));
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)));
act = global_actions.register_action (main_actions, X_("SaveTemplate"), _("Save Template..."), sigc::mem_fun(*this, &ARDOUR_UI::save_template));
ActionManager::session_sensitive_actions.push_back (act);
+ act = global_actions.register_action (main_actions, X_("ManageTemplates"), _("Templates"), sigc::mem_fun(*this, &ARDOUR_UI::manage_templates));
+ ActionManager::session_sensitive_actions.push_back (act);
+
act = global_actions.register_action (main_actions, X_("Metadata"), _("Metadata"));
ActionManager::session_sensitive_actions.push_back (act);
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));
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.
*/
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 */
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);
}
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 */
_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 ();
current_tab = "preferences";
}
- main_window_node.add_property (X_("current-tab"), current_tab);
+ main_window_node.set_property (X_("current-tab"), current_tab);
/* Windows */