diff options
author | Robin Gareus <robin@gareus.org> | 2015-01-17 21:02:00 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-01-17 21:03:56 +0100 |
commit | d2cbb28f79860889c0e0e7800b2d37a1fe12ccfb (patch) | |
tree | 4a8f57dec60df13fcd9e0d2a8d903a7fcba01444 /gtk2_ardour/engine_dialog.cc | |
parent | f77c923bee113ab64f1a2d30976ee83dc183c77c (diff) |
Engine Dialog: fix various signal connections
connect/disconnect button was connected multiple times
Also the button allowed to start a backend with
invalid settings (after changing backend).
Q: does “Connect to” make sense? It’s redundant with
“Apply”.
Diffstat (limited to 'gtk2_ardour/engine_dialog.cc')
-rw-r--r-- | gtk2_ardour/engine_dialog.cc | 10 |
1 files changed, 8 insertions, 2 deletions
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); |