From c3fa54bc8628ba1618aba7b09a0daf458e798d3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Thu, 13 Jun 2013 15:39:21 -0300 Subject: Don't autostart EIP if the user explicitly stops the service --- src/leap/config/leapsettings.py | 8 +++++--- src/leap/gui/mainwindow.py | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src/leap') diff --git a/src/leap/config/leapsettings.py b/src/leap/config/leapsettings.py index 88b7d8c9..35010280 100644 --- a/src/leap/config/leapsettings.py +++ b/src/leap/config/leapsettings.py @@ -227,10 +227,12 @@ class LeapSettings(object): Sets the default provider to be used for autostarting EIP :param provider: provider to use - :type provider: str + :type provider: str or None """ - leap_assert(len(provider) > 0, "We cannot save an empty provider") - self._settings.setValue(self.DEFAULTPROVIDER_KEY, provider) + if provider is None: + self._settings.remove(self.DEFAULTPROVIDER_KEY) + else: + self._settings.setValue(self.DEFAULTPROVIDER_KEY, provider) def get_alert_missing_scripts(self): """ diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py index e135c798..381dbf19 100644 --- a/src/leap/gui/mainwindow.py +++ b/src/leap/gui/mainwindow.py @@ -1012,6 +1012,7 @@ class MainWindow(QtGui.QMainWindow): self._action_eip_startstop.triggered.connect( self._start_eip) self._already_started_eip = False + self._settings.set_defaultprovider(None) def _get_best_provider_config(self): """ -- cgit v1.2.3