diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/leap/bitmask/gui/mainwindow.py | 18 | ||||
-rw-r--r-- | src/leap/bitmask/gui/preferenceswindow.py | 14 | ||||
-rw-r--r-- | src/leap/bitmask/services/eip/vpnprocess.py | 5 |
3 files changed, 20 insertions, 17 deletions
diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py index e4443434..b49717c9 100644 --- a/src/leap/bitmask/gui/mainwindow.py +++ b/src/leap/bitmask/gui/mainwindow.py @@ -585,9 +585,11 @@ class MainWindow(QtGui.QMainWindow): Displays the preferences window. """ + user = self._login_widget.get_user() + prov = self._login_widget.get_selected_provider() preferences = PreferencesWindow( self, self._backend, self._provider_config, self._soledad, - self._login_widget.get_selected_provider()) + user, prov) self.soledad_ready.connect(preferences.set_soledad_ready) preferences.show() @@ -1515,9 +1517,14 @@ class MainWindow(QtGui.QMainWindow): """ self._eip_connection.qtsigs.connected_signal.emit() - # check for connectivity provider_config = self._get_best_provider_config() domain = provider_config.get_domain() + + self._eip_status.set_provider(domain) + self._settings.set_defaultprovider(provider) + self._already_started_eip = True + + # check for connectivity self._check_name_resolution(domain) def _check_name_resolution(self, domain): @@ -1674,13 +1681,6 @@ class MainWindow(QtGui.QMainWindow): "system.").format(self._eip_name)) self._set_eipstatus_off() - def _on_eip_connected(self): - # XXX move to the state machine too - self._eip_status.set_provider(provider) - - self._settings.set_defaultprovider(provider) - self._already_started_eip = True - @QtCore.Slot() def _stop_eip(self): """ diff --git a/src/leap/bitmask/gui/preferenceswindow.py b/src/leap/bitmask/gui/preferenceswindow.py index 014a0a4f..2947c5db 100644 --- a/src/leap/bitmask/gui/preferenceswindow.py +++ b/src/leap/bitmask/gui/preferenceswindow.py @@ -43,7 +43,8 @@ class PreferencesWindow(QtGui.QDialog): """ preferences_saved = QtCore.Signal() - def __init__(self, parent, backend, provider_config, soledad, domain): + def __init__(self, parent, backend, provider_config, + soledad, username, domain): """ :param parent: parent object of the PreferencesWindow. :parent type: QWidget @@ -53,6 +54,8 @@ class PreferencesWindow(QtGui.QDialog): :type provider_config: ProviderConfig :param soledad: Soledad instance :type soledad: Soledad + :param username: the user set in the login widget + :type username: unicode :param domain: the selected domain in the login widget :type domain: unicode """ @@ -63,6 +66,7 @@ class PreferencesWindow(QtGui.QDialog): self._settings = LeapSettings() self._soledad = soledad self._provider_config = provider_config + self._username = username self._domain = domain self._backend_connect() @@ -191,7 +195,7 @@ class PreferencesWindow(QtGui.QDialog): Changes the user's password if the inputboxes are correctly filled. """ - username = self._srp_auth.get_username() + username = self._username current_password = self.ui.leCurrentPassword.text() new_password = self.ui.leNewPassword.text() new_password2 = self.ui.leNewPassword2.text() @@ -416,12 +420,10 @@ class PreferencesWindow(QtGui.QDialog): sig.srp_password_change_ok.connect(self._change_password_ok) - pwd_change_error = partial( - self._change_password_problem, + pwd_change_error = lambda: self._change_password_problem( self.tr("There was a problem changing the password.")) sig.srp_password_change_error.connect(pwd_change_error) - pwd_change_badpw = partial( - self._change_password_problem, + pwd_change_badpw = lambda: self._change_password_problem( self.tr("You did not enter a correct current password.")) sig.srp_password_change_badpw.connect(pwd_change_badpw) diff --git a/src/leap/bitmask/services/eip/vpnprocess.py b/src/leap/bitmask/services/eip/vpnprocess.py index 6e4580ac..c7b8071c 100644 --- a/src/leap/bitmask/services/eip/vpnprocess.py +++ b/src/leap/bitmask/services/eip/vpnprocess.py @@ -66,8 +66,9 @@ class VPNObserver(object): 'Network is unreachable (code=101)',), 'PROCESS_RESTART_TLS': ( "SIGUSR1[soft,tls-error]",), - 'PROCESS_RESTART_PING': ( - "SIGUSR1[soft,ping-restart]",), + # Let ping-restart work as it should + # 'PROCESS_RESTART_PING': ( + # "SIGUSR1[soft,ping-restart]",), 'INITIALIZATION_COMPLETED': ( "Initialization Sequence Completed",), } |