Fixed overflow issue. Code originally meant to truncate the 64 bit integer did not...
[ardour.git] / gtk2_ardour / ardour_ui_dialogs.cc
index aa3455b7da6e7c0c9b99ad802f7a828336d221ba..239327229b26b40b46266a1828eca1ee90950f79 100644 (file)
@@ -50,7 +50,7 @@ ARDOUR_UI::connect_to_session (Session *s)
 {
        session = s;
 
-       session->HaltOnXrun.connect (mem_fun(*this, &ARDOUR_UI::halt_on_xrun_message));
+       session->Xrun.connect (mem_fun(*this, &ARDOUR_UI::xrun_handler));
        session->RecordStateChanged.connect (mem_fun (*this, &ARDOUR_UI::record_state_changed));
 
        /* sensitize menu bar options that are now valid */
@@ -79,7 +79,6 @@ ARDOUR_UI::connect_to_session (Session *s)
 
        /* there are never any selections on startup */
 
-       ActionManager::set_sensitive (ActionManager::region_selection_sensitive_actions, false);
        ActionManager::set_sensitive (ActionManager::time_selection_sensitive_actions, false);
        ActionManager::set_sensitive (ActionManager::track_selection_sensitive_actions, false);
        ActionManager::set_sensitive (ActionManager::line_selection_sensitive_actions, false);
@@ -180,6 +179,7 @@ ARDOUR_UI::unload_session (bool hide_stuff)
        if (hide_stuff) {
                editor->hide ();
                mixer->hide ();
+               theme_manager->hide ();
        }
 
        second_connection.disconnect ();
@@ -408,3 +408,24 @@ ARDOUR_UI::handle_locations_change (Location* ignored)
                }
        }
 }
+
+bool
+ARDOUR_UI::main_window_state_event_handler (GdkEventWindowState* ev, bool window_was_editor)
+{
+       if (window_was_editor) {
+
+               if ((ev->changed_mask & GDK_WINDOW_STATE_FULLSCREEN) && 
+                   (ev->new_window_state & GDK_WINDOW_STATE_FULLSCREEN)) {
+                       float_big_clock (editor);
+               }
+
+       } else {
+
+               if ((ev->changed_mask & GDK_WINDOW_STATE_FULLSCREEN) && 
+                   (ev->new_window_state & GDK_WINDOW_STATE_FULLSCREEN)) {
+                       float_big_clock (mixer);
+               }
+       }
+
+       return false;
+}