Remove unused declaration.
[ardour.git] / gtk2_ardour / ardour_ui_ed.cc
index 6932e891ca1451af76034adc440ca6ec7b458052..9f6b181b4d97083e488c04082f22dfce35776534 100644 (file)
@@ -35,6 +35,7 @@
 #include "gtkmm2ext/utils.h"
 #include "gtkmm2ext/window_title.h"
 #include "gtkmm2ext/tearoff.h"
+#include "gtkmm2ext/cairo_packer.h"
 
 #include "pbd/file_utils.h"
 #include "pbd/fpu.h"
@@ -53,6 +54,7 @@
 #include "utils.h"
 #include "window_proxy.h"
 #include "global_port_matrix.h"
+#include "location_ui.h"
 
 #include <gtkmm2ext/application.h>
 
@@ -225,7 +227,7 @@ ARDOUR_UI::install_actions ()
        act = ActionManager::register_toggle_action (common_actions, X_("KeepTearoffs"), _("Toolbars when Maximised"), mem_fun (*this, &ARDOUR_UI::toggle_keep_tearoffs));
        ActionManager::session_sensitive_actions.push_back (act);
 
-       ActionManager::register_toggle_action (common_actions, X_("toggle-mixer"), _("Mixer"),  sigc::mem_fun(*this, &ARDOUR_UI::toggle_mixer_window));
+       ActionManager::register_toggle_action (common_actions, X_("toggle-mixer"), S_("Window|Mixer"),  sigc::mem_fun(*this, &ARDOUR_UI::toggle_mixer_window));
        ActionManager::register_toggle_action (common_actions, X_("toggle-mixer-on-top"), _("Mixer on Top"),  sigc::mem_fun(*this, &ARDOUR_UI::toggle_mixer_on_top));
        ActionManager::register_toggle_action (common_actions, X_("ToggleRCOptionsEditor"), _("Preferences"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_rc_options_window));
        ActionManager::register_toggle_action (common_actions, X_("ToggleSessionOptionsEditor"), _("Properties"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_session_options_window));
@@ -531,37 +533,26 @@ ARDOUR_UI::build_menu_bar ()
 
        EventBox* ev = manage (new EventBox);
        ev->show ();
-       HBox* hbox = manage (new HBox);
+       CairoHPacker* hbox = manage (new CairoHPacker);
        hbox->show ();
-       
-       ev->add (*hbox);
+       hbox->set_border_width (3);
 
-       wall_clock_box.add (wall_clock_label);
-       wall_clock_box.set_name ("WallClock");
-       wall_clock_label.set_name ("WallClock");
+       VBox* vbox = manage (new VBox);
+       vbox->pack_start (*hbox, true, false);
+       vbox->show();
+
+       ev->add (*vbox);
 
-       disk_space_box.add (disk_space_label);
-       disk_space_box.set_name ("WallClock");
+       wall_clock_label.set_name ("WallClock");
+       wall_clock_label.set_use_markup ();
        disk_space_label.set_name ("WallClock");
        disk_space_label.set_use_markup ();
-
-       cpu_load_box.add (cpu_load_label);
-       cpu_load_box.set_name ("CPULoad");
        cpu_load_label.set_name ("CPULoad");
        cpu_load_label.set_use_markup ();
-
-       buffer_load_box.add (buffer_load_label);
-       buffer_load_box.set_name ("BufferLoad");
        buffer_load_label.set_name ("BufferLoad");
        buffer_load_label.set_use_markup ();
-
-       sample_rate_box.add (sample_rate_label);
-       sample_rate_box.set_name ("SampleRate");
        sample_rate_label.set_name ("SampleRate");
        sample_rate_label.set_use_markup ();
-
-       format_box.add (format_label);
-       format_box.set_name ("Format");
        format_label.set_name ("Format");
        format_label.set_use_markup ();
 
@@ -582,24 +573,24 @@ ARDOUR_UI::build_menu_bar ()
                disk_space = true;
        }
        
-       hbox->pack_end (wall_clock_box, false, false, 2);
-       hbox->pack_end (disk_space_box, false, false, 4);
-       hbox->pack_end (cpu_load_box, false, false, 4);
-       hbox->pack_end (buffer_load_box, false, false, 4);
-       hbox->pack_end (sample_rate_box, false, false, 4);
-       hbox->pack_end (format_box, false, false, 4);
+       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);
+       hbox->pack_end (buffer_load_label, false, false, 4);
+       hbox->pack_end (sample_rate_label, false, false, 4);
+       hbox->pack_end (format_label, false, false, 4);
 
-       menu_hbox.pack_end (*ev, false, false);
+       menu_hbox.pack_end (*ev, false, false, 6);
 
        menu_bar_base.set_name ("MainMenuBar");
        menu_bar_base.add (menu_hbox);
 
-       _status_bar_visibility.add (&wall_clock_box,  X_("WallClock"), _("Wall Clock"), wall_clock);
-       _status_bar_visibility.add (&disk_space_box,  X_("Disk"),      _("Disk Space"), disk_space);
-       _status_bar_visibility.add (&cpu_load_box,    X_("DSP"),       _("DSP"), true);
-       _status_bar_visibility.add (&buffer_load_box, X_("Buffers"),   _("Buffers"), true);
-       _status_bar_visibility.add (&sample_rate_box, X_("JACK"),      _("JACK Sampling Rate and Latency"), true);
-       _status_bar_visibility.add (&format_box,      X_("Format"),    _("File Format"), true);
+       _status_bar_visibility.add (&wall_clock_label,  X_("WallClock"), _("Wall Clock"), wall_clock);
+       _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);
+       _status_bar_visibility.add (&sample_rate_label, X_("JACK"),      _("JACK Sampling Rate and Latency"), true);
+       _status_bar_visibility.add (&format_label,      X_("Format"),    _("File Format"), true);
 
        ev->signal_button_press_event().connect (sigc::mem_fun (_status_bar_visibility, &VisibilityGroup::button_press_event));
 }
@@ -825,9 +816,15 @@ ARDOUR_UI::save_ardour_state ()
        if (_session) {
                _session->add_instant_xml (enode);
                _session->add_instant_xml (mnode);
+               if (location_ui->get ()) {
+                       _session->add_instant_xml (location_ui->get()->ui().get_state ());
+               }
        } else {
                Config->add_instant_xml (enode);
                Config->add_instant_xml (mnode);
+               if (location_ui->get ()) {
+                       Config->add_instant_xml (location_ui->get()->ui().get_state ());
+               }
        }
 
        Keyboard::save_keybindings ();