diff options
author | David Robillard <d@drobilla.net> | 2015-08-29 17:36:37 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2015-08-29 17:36:37 +0000 |
commit | 511d550730be922b64190c6fbbd22c387fe28774 (patch) | |
tree | cef0d013e7bfe4e776d1a80d7ce8ebf258d57a7b /src/gui | |
parent | cec7f9f4ac1e601bc0e1b452d260c20a598361dd (diff) | |
download | ingen-511d550730be922b64190c6fbbd22c387fe28774.tar.gz ingen-511d550730be922b64190c6fbbd22c387fe28774.tar.bz2 ingen-511d550730be922b64190c6fbbd22c387fe28774.zip |
Fix crash when clicking activate before connection.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5716 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui')
-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> |