show() widgets explicitly, one little file at a time
[ardour.git] / gtk2_ardour / ardour_ui_dialogs.cc
index c3b82c74a84a9e2bb599c2958471821cc52a7d1a..532b7ce76b3d6cb7db0d621f3c26f9d3a6a6bb01 100644 (file)
@@ -34,7 +34,7 @@
 #include "public_editor.h"
 #include "route_params_ui.h"
 #include "sfdb_ui.h"
-#include "color_manager.h"
+#include "theme_manager.h"
 
 #include "i18n.h"
 
@@ -126,6 +126,10 @@ ARDOUR_UI::connect_to_session (Session *s)
 
        solo_alert_button.set_active (session->soloing());
 
+       /* update autochange callback on dirty state changing */
+
+       session->DirtyChanged.connect (mem_fun(*this, &ARDOUR_UI::update_autosave));
+
        /* can't be auditioning here */
 
        primary_clock.set_session (s);
@@ -158,13 +162,14 @@ ARDOUR_UI::connect_to_session (Session *s)
        point_zero_one_second_connection = Glib::signal_timeout().connect (mem_fun(*this, &ARDOUR_UI::every_point_zero_one_seconds), 40);
 }
 
-int
+bool
 ARDOUR_UI::unload_session ()
 {
        if (session && session->dirty()) {
                switch (ask_about_saving_session (_("close"))) {
                case -1:
-                       return 1;
+                       // cancel
+                       return false;
                        
                case 1:
                        session->save_state ("");
@@ -208,7 +213,7 @@ ARDOUR_UI::unload_session ()
 
        update_buffer_load ();
 
-       return 0;
+       return true;
 }
 
 int
@@ -320,17 +325,17 @@ ARDOUR_UI::toggle_location_window ()
 }
 
 void
-ARDOUR_UI::toggle_color_manager ()
+ARDOUR_UI::toggle_theme_manager ()
 {
-       RefPtr<Action> act = ActionManager::get_action (X_("Common"), X_("ToggleColorManager"));
+       RefPtr<Action> act = ActionManager::get_action (X_("Common"), X_("ToggleThemeManager"));
        if (act) {
                RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic(act);
        
                if (tact->get_active()) {
-                       color_manager->show_all ();
-                       color_manager->present ();
+                       theme_manager->show_all ();
+                       theme_manager->present ();
                } else {
-                       color_manager->hide ();
+                       theme_manager->hide ();
                } 
        }
 }