From 511d550730be922b64190c6fbbd22c387fe28774 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 29 Aug 2015 17:36:37 +0000 Subject: Fix crash when clicking activate before connection. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5716 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/ConnectWindow.cpp | 13 +++++++++++++ src/gui/ingen_gui.ui | 2 ++ 2 files changed, 15 insertions(+) (limited to 'src/gui') 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 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 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 D_eactivate False True + False True True True @@ -687,6 +688,7 @@ See COPYING file included with this distribution, or http://www.gnu.org/licenses _Activate False True + False True True True -- cgit v1.2.1