One fix.
[ardour.git] / gtk2_ardour / ardour_ui_ed.cc
index 5882e45afbd8ad854ebdd2a504a405352627c808..737400c7afb93b9a5f269095e7e09e6e0b18c4ce 100644 (file)
@@ -68,7 +68,7 @@
 
 #include "control_protocol/control_protocol.h"
 
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 using namespace std;
 using namespace ARDOUR;
@@ -114,6 +114,12 @@ ARDOUR_UI::escape ()
        Escape (); /* EMIT SIGNAL */
 }
 
+void
+ARDOUR_UI::close_current_dialog ()
+{
+       Keyboard::close_current_dialog ();
+}
+
 void
 ARDOUR_UI::install_actions ()
 {
@@ -122,6 +128,11 @@ ARDOUR_UI::install_actions ()
        Glib::RefPtr<Action> act;
 
        global_actions.register_action (main_actions, X_("Escape"), _("Escape"), sigc::mem_fun (*this, &ARDOUR_UI::escape));
+       /* This is hard-wired into the Keyboard code as "Primary-w". Maybe it
+          doesn't need to be. This action makes it possible to do this from a
+          control surface.
+       */
+       global_actions.register_action (main_actions, X_("close-current-dialog"), _("Close Current Dialog"), sigc::mem_fun (*this, &ARDOUR_UI::close_current_dialog));
 
        /* menus + submenus that need action items */
 
@@ -156,9 +167,10 @@ ARDOUR_UI::install_actions ()
        act = global_actions.register_action (main_actions, X_("Close"), _("Close"),  sigc::mem_fun(*this, &ARDOUR_UI::close_session));
        ActionManager::session_sensitive_actions.push_back (act);
 
-       act = global_actions.register_action (main_actions, X_("AddTrackBus"), _("Add Track or Bus..."), sigc::mem_fun(*this, &ARDOUR_UI::add_route));
+       act = global_actions.register_action (main_actions, X_("AddTrackBus"), _("Add Track, Bus or VCA..."), sigc::mem_fun(*this, &ARDOUR_UI::add_route));
        ActionManager::session_sensitive_actions.push_back (act);
        ActionManager::write_sensitive_actions.push_back (act);
+       ActionManager::rec_sensitive_actions.push_back (act);
 
        act = global_actions.register_action (main_actions, X_("duplicate-routes"), _("Duplicate Tracks/Busses..."),
                                              sigc::mem_fun(*this, &ARDOUR_UI::start_duplicate_routes));
@@ -207,6 +219,9 @@ ARDOUR_UI::install_actions ()
        act = global_actions.register_action (main_actions, X_("SaveAs"), _("Save As..."), sigc::mem_fun(*this, &ARDOUR_UI::save_session_as));
        ActionManager::session_sensitive_actions.push_back (act);
 
+       act = global_actions.register_action (main_actions, X_("Archive"), _("Archive..."), sigc::mem_fun(*this, &ARDOUR_UI::archive_session));
+       ActionManager::session_sensitive_actions.push_back (act);
+
        act = global_actions.register_action (main_actions, X_("Rename"), _("Rename..."), sigc::mem_fun(*this, &ARDOUR_UI::rename_session));
        ActionManager::session_sensitive_actions.push_back (act);
        ActionManager::write_sensitive_actions.push_back (act);
@@ -596,18 +611,6 @@ ARDOUR_UI::build_menu_bar ()
        use_menubar_as_top_menubar ();
 #endif
 
-       bool wall_clock = false;
-       bool disk_space = false;
-
-       if (!Profile->get_small_screen()) {
-#ifndef __APPLE__
-               // OSX provides its own wallclock, thank you very much
-               wall_clock = true;
-#endif
-               disk_space = true;
-       }
-
-
        hbox->pack_end (error_alert_button, false, false, 2);
 
        hbox->pack_end (wall_clock_label, false, false, 2);
@@ -626,9 +629,10 @@ ARDOUR_UI::build_menu_bar ()
        menu_bar_base.add (menu_hbox);
 
 #ifndef __APPLE__
-       _status_bar_visibility.add (&wall_clock_label,      X_("WallClock"), _("Wall Clock"), wall_clock);
+       // OSX provides its own wallclock, thank you very much
+       _status_bar_visibility.add (&wall_clock_label,      X_("WallClock"), _("Wall Clock"), true);
 #endif
-       _status_bar_visibility.add (&disk_space_label,      X_("Disk"),      _("Disk Space"), disk_space);
+       _status_bar_visibility.add (&disk_space_label,      X_("Disk"),      _("Disk Space"), !Profile->get_small_screen());
        _status_bar_visibility.add (&cpu_load_label,        X_("DSP"),       _("DSP"), true);
        _status_bar_visibility.add (&xrun_label,            X_("XRun"),      _("X-run"), false);
        _status_bar_visibility.add (&peak_thread_work_label,X_("Peakfile"),  _("Active Peak-file Work"), false);
@@ -781,8 +785,7 @@ ARDOUR_UI::resize_text_widgets ()
 void
 ARDOUR_UI::focus_on_clock ()
 {
-       if (editor && primary_clock) {
-               editor->present ();
+       if (primary_clock) {
                primary_clock->focus ();
        }
 }