X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fardour_ui_ed.cc;h=d10e67339625287203914377f1b47dc6485a4fe5;hb=d13435a4e1d0e85654a8477ae99a7b41ff621159;hp=607b8e7327b9d77630b2fa9178a64675b66e5a00;hpb=5c9660b62e06666b2d9c71d993f56ae5cf935e4e;p=ardour.git diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc index 607b8e7327..d10e673396 100644 --- a/gtk2_ardour/ardour_ui_ed.cc +++ b/gtk2_ardour/ardour_ui_ed.cc @@ -68,7 +68,7 @@ #include "control_protocol/control_protocol.h" -#include "i18n.h" +#include "pbd/i18n.h" using namespace std; using namespace ARDOUR; @@ -108,6 +108,12 @@ ARDOUR_UI::create_luawindow () return 0; } +void +ARDOUR_UI::escape () +{ + Escape (); /* EMIT SIGNAL */ +} + void ARDOUR_UI::install_actions () { @@ -115,6 +121,8 @@ ARDOUR_UI::install_actions () Glib::RefPtr main_menu_actions = global_actions.create_action_group (X_("Main_menu")); Glib::RefPtr act; + global_actions.register_action (main_actions, X_("Escape"), _("Escape"), sigc::mem_fun (*this, &ARDOUR_UI::escape)); + /* menus + submenus that need action items */ global_actions.register_action (main_menu_actions, X_("Session"), _("Session")); @@ -148,8 +156,7 @@ 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 or Bus..."), sigc::mem_fun(*this, &ARDOUR_UI::add_route)); ActionManager::session_sensitive_actions.push_back (act); ActionManager::write_sensitive_actions.push_back (act); @@ -589,18 +596,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); @@ -619,9 +614,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); @@ -677,6 +673,7 @@ 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); Config->add_extra_xml (get_transport_controllable_state()); @@ -703,7 +700,7 @@ ARDOUR_UI::save_ardour_state () } else if (current_page_number == _tabs.page_num (mixer->contents())) { current_tab = "mixer"; } else if (current_page_number == _tabs.page_num (rc_option_editor->contents())) { - current_tab == "preferences"; + current_tab = "preferences"; } main_window_node.add_property (X_("current-tab"), current_tab); @@ -725,6 +722,7 @@ ARDOUR_UI::save_ardour_state () XMLNode& enode (editor->get_state()); XMLNode& mnode (mixer->get_state()); XMLNode& bnode (meterbridge->get_state()); + XMLNode& pnode (rc_option_editor->get_state()); Config->add_extra_xml (*window_node); Config->add_extra_xml (audio_midi_setup->get_state()); @@ -737,6 +735,7 @@ ARDOUR_UI::save_ardour_state () _session->add_instant_xml (main_window_node); _session->add_instant_xml (enode); _session->add_instant_xml (mnode); + _session->add_instant_xml (pnode); _session->add_instant_xml (bnode); if (location_ui) { _session->add_instant_xml (location_ui->ui().get_state ()); @@ -745,12 +744,17 @@ ARDOUR_UI::save_ardour_state () Config->add_instant_xml (main_window_node); Config->add_instant_xml (enode); Config->add_instant_xml (mnode); + Config->add_instant_xml (pnode); Config->add_instant_xml (bnode); if (location_ui) { Config->add_instant_xml (location_ui->ui().get_state ()); } } + delete &enode; + delete &mnode; + delete &bnode; + delete &pnode; Keyboard::save_keybindings (); }