diff options
-rw-r--r-- | src/gui/ConnectWindow.cpp | 13 | ||||
-rw-r--r-- | src/gui/ingen_gui.ui | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/ConnectWindow.cpp b/src/gui/ConnectWindow.cpp index cb3012c3..cdf53e16 100644 --- a/src/gui/ConnectWindow.cpp +++ b/src/gui/ConnectWindow.cpp @@ -137,6 +137,9 @@ ConnectWindow::set_connected_to(SPtr<Ingen::Interface> engine) _port_spinbutton->set_sensitive(false); _launch_radio->set_sensitive(false); _internal_radio->set_sensitive(false); + _activate_button->set_sensitive(true); + _deactivate_button->set_sensitive(true); + } else { _icon->set(Gtk::Stock::DISCONNECT, Gtk::ICON_SIZE_LARGE_TOOLBAR); _progress_bar->set_fraction(0.0); @@ -145,6 +148,8 @@ ConnectWindow::set_connected_to(SPtr<Ingen::Interface> engine) _internal_radio->set_sensitive(true); _server_radio->set_sensitive(true); _launch_radio->set_sensitive(true); + _activate_button->set_sensitive(false); + _deactivate_button->set_sensitive(false); if (_mode == Mode::CONNECT_REMOTE) _url_entry->set_sensitive(true); @@ -278,6 +283,10 @@ ConnectWindow::disconnect() void ConnectWindow::activate() { + if (!_app->interface()) { + return; + } + _app->interface()->set_property(Raul::URI("ingen:/driver"), _app->uris().ingen_enabled, _app->forge().make(true)); @@ -286,6 +295,10 @@ ConnectWindow::activate() void ConnectWindow::deactivate() { + if (!_app->interface()) { + return; + } + _app->interface()->set_property(Raul::URI("ingen:/driver"), _app->uris().ingen_enabled, _app->forge().make(false)); diff --git a/src/gui/ingen_gui.ui b/src/gui/ingen_gui.ui index 21d67543..f3c61d23 100644 --- a/src/gui/ingen_gui.ui +++ b/src/gui/ingen_gui.ui @@ -672,6 +672,7 @@ See COPYING file included with this distribution, or http://www.gnu.org/licenses <property name="label" translatable="yes">D_eactivate</property> <property name="use_action_appearance">False</property> <property name="visible">True</property> + <property name="sensitive">False</property> <property name="can_focus">True</property> <property name="receives_default">True</property> <property name="use_underline">True</property> @@ -687,6 +688,7 @@ See COPYING file included with this distribution, or http://www.gnu.org/licenses <property name="label" translatable="yes">_Activate</property> <property name="use_action_appearance">False</property> <property name="visible">True</property> + <property name="sensitive">False</property> <property name="can_focus">True</property> <property name="receives_default">True</property> <property name="use_underline">True</property> |