Move cpu and disk gauges into the status bar at top.
[ardour.git] / gtk2_ardour / ardour_ui_ed.cc
index 4ace0b5f28e981f5cfc6fc146e9dd32cae0f56cd..55d01f3c0c1b757131af705020ac6ffad63abf65 100644 (file)
@@ -466,6 +466,10 @@ ARDOUR_UI::install_actions ()
        act = global_actions.register_action (transport_actions, X_("PlayPreroll"), _("Play w/Preroll"), sigc::mem_fun(*this, &ARDOUR_UI::transport_play_preroll));
        ActionManager::session_sensitive_actions.push_back (act);
        ActionManager::transport_sensitive_actions.push_back (act);
+       act = global_actions.register_action (transport_actions, X_("solo-selection"), _("Solo Selection"), sigc::bind (sigc::mem_fun(*editor, &PublicEditor::play_solo_selection), true));
+       ActionManager::session_sensitive_actions.push_back (act);
+       ActionManager::transport_sensitive_actions.push_back (act);
+
 
        act = global_actions.register_action (transport_actions, X_("RecordPreroll"), _("Record w/Preroll"), sigc::mem_fun(*this, &ARDOUR_UI::transport_rec_preroll));
        ActionManager::session_sensitive_actions.push_back (act);
@@ -653,27 +657,25 @@ ARDOUR_UI::install_actions ()
        /* MIDI */
 
        Glib::RefPtr<ActionGroup> midi_actions = global_actions.create_action_group (X_("MIDI"));
-       global_actions.register_action (midi_actions, X_("panic"), _("Panic (Send MIDI all-notes-off)"), sigc::mem_fun(*this, &ARDOUR_UI::midi_panic));
+       act = global_actions.register_action (midi_actions, X_("panic"), _("Panic (Send MIDI all-notes-off)"), sigc::mem_fun(*this, &ARDOUR_UI::midi_panic));
+       ActionManager::session_sensitive_actions.push_back (act);
+       ActionManager::transport_sensitive_actions.push_back (act);
 }
 
 void
 ARDOUR_UI::build_menu_bar ()
 {
        menu_bar = dynamic_cast<MenuBar*> (ActionManager::get_widget (X_("/Main")));
-       menu_bar->set_name ("MainMenuBar");
+       menu_bar->set_name ("gtk_background");
 
        EventBox* ev = manage (new EventBox);
        ev->show ();
        CairoHPacker* hbox = manage (new CairoHPacker);
-       hbox->set_name (X_("StatusBarBox"));
+       hbox->set_name (X_("gtk_background"));
        hbox->show ();
-       hbox->set_border_width (3);
-
-       VBox* vbox = manage (new VBox);
-       vbox->pack_start (*hbox, true, false);
-       vbox->show();
+       hbox->set_border_width (2);
 
-       ev->add (*vbox);
+       ev->add (*hbox);
 
        wall_clock_label.set_name ("WallClock");
        wall_clock_label.set_use_markup ();
@@ -694,35 +696,41 @@ ARDOUR_UI::build_menu_bar ()
        format_label.set_name ("Format");
        format_label.set_use_markup ();
 
-#ifndef TOP_MENUBAR
-       menu_hbox.pack_start (*menu_bar, false, false);
-#else
+#ifdef __APPLE__
        use_menubar_as_top_menubar ();
+#else
+       menu_hbox.pack_start (*menu_bar, false, false);
 #endif
 
        hbox->pack_end (error_alert_button, false, false, 2);
+       hbox->pack_end (dsp_load_indicator, false, false, 4);
 
        hbox->pack_end (wall_clock_label, false, false, 2);
+       hbox->pack_end (disk_space_indicator, false, false, 4);
+#if 0
        hbox->pack_end (disk_space_label, false, false, 4);
+#endif
        hbox->pack_end (xrun_label, false, false, 4);
-       hbox->pack_end (peak_thread_work_label, false, false, 4);
+#if 0
        hbox->pack_end (cpu_load_label, false, false, 4);
+#endif
        hbox->pack_end (buffer_load_label, false, false, 4);
        hbox->pack_end (sample_rate_label, false, false, 4);
        hbox->pack_end (timecode_format_label, false, false, 4);
        hbox->pack_end (format_label, false, false, 4);
+       hbox->pack_end (peak_thread_work_label, false, false, 4);
 
        menu_hbox.pack_end (*ev, false, false, 2);
 
-       menu_bar_base.set_name ("MainMenuBar");
+       menu_bar_base.set_name ("gtk_background");
        menu_bar_base.add (menu_hbox);
 
 #ifndef __APPLE__
        // 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"), !Profile->get_small_screen());
-       _status_bar_visibility.add (&cpu_load_label,        X_("DSP"),       _("DSP"), true);
+       _status_bar_visibility.add (&disk_space_indicator,  X_("Disk"),      _("Disk Space"), !Profile->get_small_screen());
+       _status_bar_visibility.add (&dsp_load_indicator,    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);
        _status_bar_visibility.add (&buffer_load_label,     X_("Buffers"),   _("Buffers"), true);