diff --git a/gtk2_ardour/engine_dialog.cc b/gtk2_ardour/engine_dialog.cc index 0ce413246d..35876d5c37 100644 --- a/gtk2_ardour/engine_dialog.cc +++ b/gtk2_ardour/engine_dialog.cc @@ -298,6 +298,10 @@ EngineControl::EngineControl () output_channels.signal_changed().connect (sigc::mem_fun (*this, &EngineControl::parameter_changed)); notebook.signal_switch_page().connect (sigc::mem_fun (*this, &EngineControl::on_switch_page)); + + connect_disconnect_button.signal_clicked().connect (sigc::mem_fun (*this, &EngineControl::connect_disconnect_click)); + connect_disconnect_button.set_no_show_all(); + } void @@ -512,8 +516,6 @@ EngineControl::build_no_control_notebook () row++; } - connect_disconnect_button.signal_clicked().connect (sigc::mem_fun (*this, &EngineControl::connect_disconnect_click)); - basic_packer.attach (connect_disconnect_button, 0, 2, row, row+1, FILL, AttachOptions (0)); row++; } @@ -759,6 +761,8 @@ EngineControl::backend_changed () } } + connect_disconnect_button.hide(); + midi_option_changed(); started_at_least_once = false; @@ -2109,6 +2113,7 @@ EngineControl::engine_running () sample_rate_combo.set_sensitive (true); connect_disconnect_button.set_label (string_compose (_("Disconnect from %1"), backend->name())); + connect_disconnect_button.show(); started_at_least_once = true; } @@ -2121,6 +2126,7 @@ EngineControl::engine_stopped () buffer_size_combo.set_sensitive (false); connect_disconnect_button.set_label (string_compose (_("Connect to %1"), backend->name())); + connect_disconnect_button.show(); sample_rate_combo.set_sensitive (true); buffer_size_combo.set_sensitive (true); diff --git a/gtk2_ardour/engine_dialog.h b/gtk2_ardour/engine_dialog.h index 4ace11efff..5cef6be9ac 100644 --- a/gtk2_ardour/engine_dialog.h +++ b/gtk2_ardour/engine_dialog.h @@ -246,7 +246,7 @@ class EngineControl : public ArdourDialog, public PBD::ScopedConnectionList { void engine_running (); void engine_stopped (); PBD::ScopedConnection running_connection; - PBD::ScopedConnection stopped_connection; + PBD::ScopedConnectionList stopped_connection; void connect_disconnect_click (); void calibrate_audio_latency ();