Add option to disable blinking alert buttons.
[ardour.git] / gtk2_ardour / engine_dialog.cc
index a9b4dbdce04d868194747050546aaf4e14001f91..57a30abc9906df4a0c8f051419194118ccadc6d7 100644 (file)
@@ -53,6 +53,7 @@
 #include "engine_dialog.h"
 #include "gui_thread.h"
 #include "ui_config.h"
+#include "public_editor.h"
 #include "utils.h"
 #include "pbd/i18n.h"
 #include "splash.h"
@@ -114,12 +115,6 @@ EngineControl::EngineControl ()
 
        set_name (X_("AudioMIDISetup"));
 
-       if (UIConfiguration::instance().get_all_floating_windows_are_dialogs()) {
-               set_type_hint (Gdk::WINDOW_TYPE_HINT_DIALOG);
-       } else {
-               set_type_hint (Gdk::WINDOW_TYPE_HINT_UTILITY);
-       }
-
        /* the backend combo is the one thing that is ALWAYS visible */
 
        vector<const ARDOUR::AudioBackendInfo*> backends = ARDOUR::AudioEngine::instance()->available_backends();
@@ -285,6 +280,7 @@ EngineControl::EngineControl ()
        start_stop_button.set_name ("generic button");
        start_stop_button.set_can_focus(true);
        start_stop_button.set_can_default(true);
+       start_stop_button.set_act_on_release (false);
 
        update_devices_button.signal_clicked.connect (mem_fun (*this, &EngineControl::update_devices_button_clicked));
        update_devices_button.set_sensitive (false);
@@ -432,6 +428,19 @@ EngineControl::on_show ()
        start_stop_button.grab_focus();
 }
 
+void
+EngineControl::on_map ()
+{
+       if (!ARDOUR_UI::instance()->session_loaded && !PublicEditor::_instance) {
+               set_type_hint (Gdk::WINDOW_TYPE_HINT_NORMAL);
+       } else if (UIConfiguration::instance().get_all_floating_windows_are_dialogs()) {
+               set_type_hint (Gdk::WINDOW_TYPE_HINT_DIALOG);
+       } else {
+               set_type_hint (Gdk::WINDOW_TYPE_HINT_UTILITY);
+       }
+       ArdourDialog::on_map ();
+}
+
 bool
 EngineControl::try_autostart ()
 {