Add missing files.
[ardour.git] / gtk2_ardour / ardour_ui.cc
index 33b079da1e551ed9c896d91212eab7ff169dbc43..7319be632edb946652152d731a2fd05de9b5a506 100644 (file)
@@ -178,6 +178,8 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[])
 
        , error_log_button (_("Errors"))
 
+       , _status_bar_visibility (X_("status-bar"))
+
 {
        using namespace Gtk::Menu_Helpers;
 
@@ -329,6 +331,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[])
 
        starting.connect (sigc::mem_fun(*this, &ARDOUR_UI::startup));
        stopping.connect (sigc::mem_fun(*this, &ARDOUR_UI::shutdown));
+
 }
 
 /** @return true if a session was chosen and `apply' clicked, otherwise false if `cancel' was clicked */
@@ -409,6 +412,12 @@ ARDOUR_UI::post_engine ()
                throw failed_constructor ();
        }
 
+       /* Do this after setup_windows (), as that's when the _status_bar_visibility is created */
+       XMLNode* n = Config->extra_xml (X_("UI"));
+       if (n) {
+               _status_bar_visibility.set_state (*n);
+       }
+       
        check_memory_locking();
 
        /* this is the first point at which all the keybindings are available */
@@ -712,6 +721,11 @@ ARDOUR_UI::startup ()
                add_window_proxy (_global_port_matrix[*i]);
        }
 
+       /* We have to do this here since goto_editor_window() ends up calling show_all() on the
+        * editor window, and we may want stuff to be hidden.
+        */
+       _status_bar_visibility.update ();
+
        BootMessage (string_compose (_("%1 is ready for use"), PROGRAM_NAME));
 }