summaryrefslogtreecommitdiff
path: root/src/leap/gui/mainwindow.py
diff options
context:
space:
mode:
authorkali <kali@leap.se>2013-06-15 01:17:35 +0900
committerkali <kali@leap.se>2013-06-15 02:00:27 +0900
commitfdda95c92d22b4ede61bfb7587320ddb36da5cd7 (patch)
tree02a71620594cb175ccd2078faf2d52ed42d7e603 /src/leap/gui/mainwindow.py
parent4494b396385d1f9f84a43201cf25c3afd87a823d (diff)
working openvpn termination: SIGTERM, then SIGKILL.
Closes: #2753
Diffstat (limited to 'src/leap/gui/mainwindow.py')
-rw-r--r--src/leap/gui/mainwindow.py19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py
index 42148836..dd9fb148 100644
--- a/src/leap/gui/mainwindow.py
+++ b/src/leap/gui/mainwindow.py
@@ -994,19 +994,21 @@ class MainWindow(QtGui.QMainWindow):
self._status_panel.set_startstop_enabled(True)
def _stop_eip(self):
+ """
+ Stops vpn process and makes gui adjustments to reflect
+ the change of state.
+ """
self._vpn.terminate()
+
self._status_panel.set_eip_status(self.tr("Off"))
self._status_panel.set_eip_status_icon("error")
-
self._status_panel.eip_stopped()
-
self._action_eip_startstop.setText(self.tr("Turn ON"))
self._action_eip_startstop.disconnect(self)
self._action_eip_startstop.triggered.connect(
self._start_eip)
self._already_started_eip = False
self._settings.set_defaultprovider(None)
-
if self._logged_user:
self._status_panel.set_provider(
"%s@%s" % (self._logged_user,
@@ -1204,12 +1206,12 @@ class MainWindow(QtGui.QMainWindow):
"""
logger.debug('About to quit, doing cleanup...')
- logger.debug('Killing vpn')
- self._vpn.terminate()
-
logger.debug('Cleaning pidfiles')
self._cleanup_pidfiles()
+ logger.debug('Terminating vpn')
+ self._vpn.terminate()
+
def quit(self):
"""
Cleanup and tidely close the main window before quitting.
@@ -1223,13 +1225,14 @@ class MainWindow(QtGui.QMainWindow):
if self._logger_window:
self._logger_window.close()
- self.close()
-
if self._login_defer:
self._login_defer.cancel()
+ self.close()
+
if self._quit_callback:
self._quit_callback()
+
logger.debug('Bye.')