summaryrefslogtreecommitdiffstats
path: root/src/gui/ConnectWindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/ConnectWindow.cpp')
-rw-r--r--src/gui/ConnectWindow.cpp24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/gui/ConnectWindow.cpp b/src/gui/ConnectWindow.cpp
index da801075..028ce1df 100644
--- a/src/gui/ConnectWindow.cpp
+++ b/src/gui/ConnectWindow.cpp
@@ -269,16 +269,30 @@ ConnectWindow::disconnect()
if (!_widgets_loaded)
return;
+ _activate_button->set_sensitive(false);
+ _deactivate_button->set_sensitive(false);
+
_progress_bar->set_fraction(0.0);
- _connect_button->set_sensitive(false);
- _disconnect_button->set_sensitive(false);
-
_connect_button->set_sensitive(true);
_disconnect_button->set_sensitive(false);
}
void
+ConnectWindow::activate()
+{
+ App::instance().engine()->activate();
+}
+
+
+void
+ConnectWindow::deactivate()
+{
+ App::instance().engine()->deactivate();
+}
+
+
+void
ConnectWindow::on_show()
{
if (!_widgets_loaded) {
@@ -302,6 +316,8 @@ ConnectWindow::load_widgets()
_xml->get_widget("connect_launch_radiobutton", _launch_radio);
_xml->get_widget("connect_port_spinbutton", _port_spinbutton);
_xml->get_widget("connect_internal_radiobutton", _internal_radio);
+ _xml->get_widget("connect_activate_button", _activate_button);
+ _xml->get_widget("connect_deactivate_button", _deactivate_button);
_xml->get_widget("connect_disconnect_button", _disconnect_button);
_xml->get_widget("connect_connect_button", _connect_button);
_xml->get_widget("connect_quit_button", _quit_button);
@@ -309,6 +325,8 @@ ConnectWindow::load_widgets()
_server_radio->signal_toggled().connect(sigc::mem_fun(this, &ConnectWindow::server_toggled));
_launch_radio->signal_toggled().connect(sigc::mem_fun(this, &ConnectWindow::launch_toggled));
_internal_radio->signal_clicked().connect(sigc::mem_fun(this, &ConnectWindow::internal_toggled));
+ _activate_button->signal_clicked().connect(sigc::mem_fun(this, &ConnectWindow::activate));
+ _deactivate_button->signal_clicked().connect(sigc::mem_fun(this, &ConnectWindow::deactivate));
_disconnect_button->signal_clicked().connect(sigc::mem_fun(this, &ConnectWindow::disconnect));
_connect_button->signal_clicked().connect(sigc::bind(
sigc::mem_fun(this, &ConnectWindow::connect), false));