update some calls to use new get_preferred_edit_position; needs testing
[ardour.git] / gtk2_ardour / ardour_ui_ed.cc
index 275d681603d957cd9c391f7fed8cff49c30517f8..7c3db7a7e3d6bab572dc6bf46c497e8dd250cb4e 100644 (file)
@@ -138,14 +138,18 @@ ARDOUR_UI::install_actions ()
                                              sigc::mem_fun (*this, &ARDOUR_UI::remove_video));
        act->set_sensitive (false);
        act = ActionManager::register_action (main_actions, X_("ExportVideo"), _("Export To Video File"),
-                       hide_return (sigc::bind (sigc::mem_fun(*editor, &PublicEditor::export_video), false)));
+                       hide_return (sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::export_video), false)));
        ActionManager::session_sensitive_actions.push_back (act);
 
-       act = ActionManager::register_action (main_actions, X_("Snapshot"), _("Snapshot..."), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::snapshot_session), false));
+       act = ActionManager::register_action (main_actions, X_("SnapshotStay"), _("Snapshot (& keep working on current version) ..."), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::snapshot_session), false));
        ActionManager::session_sensitive_actions.push_back (act);
        ActionManager::write_sensitive_actions.push_back (act);
 
-       act = ActionManager::register_action (main_actions, X_("SaveAs"), _("Save As..."), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::snapshot_session), true));
+       act = ActionManager::register_action (main_actions, X_("SnapshotSwitch"), _("Snapshot (& switch to new version) ..."), sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::snapshot_session), true));
+       ActionManager::session_sensitive_actions.push_back (act);
+       ActionManager::write_sensitive_actions.push_back (act);
+
+       act = ActionManager::register_action (main_actions, X_("SaveAs"), _("Save As..."), sigc::mem_fun(*this, &ARDOUR_UI::save_session_as));
        ActionManager::session_sensitive_actions.push_back (act);
        ActionManager::write_sensitive_actions.push_back (act);
 
@@ -194,6 +198,7 @@ ARDOUR_UI::install_actions ()
        act = ActionManager::register_toggle_action (common_actions, X_("KeepTearoffs"), _("Show Toolbars"), mem_fun (*this, &ARDOUR_UI::toggle_keep_tearoffs));
        ActionManager::session_sensitive_actions.push_back (act);
 
+if (Profile->get_mixbus())
        ActionManager::register_action (common_actions, X_("show-ui-prefs"), _("Show more UI preferences"), sigc::mem_fun (*this, &ARDOUR_UI::show_ui_prefs));
 
        ActionManager::register_toggle_action (common_actions, X_("toggle-mixer"), S_("Window|Mixer"),  sigc::mem_fun(*this, &ARDOUR_UI::toggle_mixer_window));
@@ -208,6 +213,12 @@ ARDOUR_UI::install_actions ()
        /** TRANSLATORS: This is `Manual' in the sense of an instruction book that tells a user how to use Ardour */
        ActionManager::register_action (common_actions, X_("Manual"), S_("Help|Manual"),  mem_fun(*this, &ARDOUR_UI::launch_manual));
        ActionManager::register_action (common_actions, X_("Reference"), _("Reference"),  mem_fun(*this, &ARDOUR_UI::launch_reference));
+       ActionManager::register_action (common_actions, X_("Tracker"), _("Report A Bug"), mem_fun(*this, &ARDOUR_UI::launch_tracker));
+       ActionManager::register_action (common_actions, X_("Cheat_Sheet"), _("Cheat Sheet"), mem_fun(*this, &ARDOUR_UI::launch_cheat_sheet));
+       ActionManager::register_action (common_actions, X_("Website"), _("Ardour Website"), mem_fun(*this, &ARDOUR_UI::launch_website));
+       ActionManager::register_action (common_actions, X_("Website_Dev"), _("Ardour Development"), mem_fun(*this, &ARDOUR_UI::launch_website_dev));
+       ActionManager::register_action (common_actions, X_("Forums"), _("User Forums"), mem_fun(*this, &ARDOUR_UI::launch_forums));
+       ActionManager::register_action (common_actions, X_("Howto_Report"), _("How to report a bug"), mem_fun(*this, &ARDOUR_UI::launch_howto_report));
 
        act = ActionManager::register_action (common_actions, X_("Save"), _("Save"),  sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::save_state), string(""), false));
        ActionManager::session_sensitive_actions.push_back (act);
@@ -260,7 +271,7 @@ ARDOUR_UI::install_actions ()
        act = ActionManager::register_action (transport_actions, X_("Loop"), _("Play Loop Range"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_session_auto_loop));
        ActionManager::session_sensitive_actions.push_back (act);
        ActionManager::transport_sensitive_actions.push_back (act);
-       act = ActionManager::register_action (transport_actions, X_("PlaySelection"), _("Play Selected Range"), sigc::mem_fun(*this, &ARDOUR_UI::transport_play_selection));
+       act = ActionManager::register_action (transport_actions, X_("PlaySelection"), _("Play Selection"), sigc::mem_fun(*this, &ARDOUR_UI::transport_play_selection));
        ActionManager::session_sensitive_actions.push_back (act);
        ActionManager::transport_sensitive_actions.push_back (act);
        act = ActionManager::register_action (transport_actions, X_("PlayPreroll"), _("Play Selection w/Preroll"), sigc::mem_fun(*this, &ARDOUR_UI::transport_play_preroll));
@@ -507,7 +518,9 @@ ARDOUR_UI::build_menu_bar ()
 #endif
                disk_space = true;
        }
-       
+
+       hbox->pack_end (error_alert_button, false, false, 2);
+
        hbox->pack_end (wall_clock_label, false, false, 2);
        hbox->pack_end (disk_space_label, false, false, 4);
        hbox->pack_end (cpu_load_label, false, false, 4);
@@ -516,12 +529,14 @@ ARDOUR_UI::build_menu_bar ()
        hbox->pack_end (timecode_format_label, false, false, 4);
        hbox->pack_end (format_label, false, false, 4);
 
-       menu_hbox.pack_end (*ev, false, false, 6);
+       menu_hbox.pack_end (*ev, false, false, 2);
 
        menu_bar_base.set_name ("MainMenuBar");
        menu_bar_base.add (menu_hbox);
 
+#ifndef GTKOSX
        _status_bar_visibility.add (&wall_clock_label,      X_("WallClock"), _("Wall Clock"), wall_clock);
+#endif
        _status_bar_visibility.add (&disk_space_label,      X_("Disk"),      _("Disk Space"), disk_space);
        _status_bar_visibility.add (&cpu_load_label,        X_("DSP"),       _("DSP"), true);
        _status_bar_visibility.add (&buffer_load_label,     X_("Buffers"),   _("Buffers"), true);
@@ -596,13 +611,13 @@ ARDOUR_UI::save_ardour_state ()
                tearoff_node->add_child_nocopy (*t);
        }
 
-       if (mixer && mixer->monitor_section()) {
+       if (mixer->monitor_section()) {
                XMLNode* t = new XMLNode (X_("monitor-section"));
                mixer->monitor_section()->tearoff().add_state (*t);
                tearoff_node->add_child_nocopy (*t);
        }
 
-       if (editor && editor->mouse_mode_tearoff()) {
+       if (editor->mouse_mode_tearoff()) {
                XMLNode* t = new XMLNode (X_("mouse-mode"));
                editor->mouse_mode_tearoff ()->add_state (*t);
                tearoff_node->add_child_nocopy (*t);
@@ -615,9 +630,7 @@ ARDOUR_UI::save_ardour_state ()
 
        Config->save_state();
 
-       if (ui_config->dirty()) {
-               ui_config->save_state ();
-       }
+       ui_config->save_state ();
 
        XMLNode& enode (static_cast<Stateful*>(editor)->get_state());
        XMLNode& mnode (mixer->get_state());