summaryrefslogtreecommitdiff
path: root/src/leap
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap')
-rw-r--r--src/leap/bitmask/gui/mainwindow.py6
-rw-r--r--src/leap/bitmask/gui/preferenceswindow.py9
-rw-r--r--src/leap/bitmask/services/eip/linuxvpnlauncher.py17
3 files changed, 18 insertions, 14 deletions
diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py
index e21d6cd2..25e25e45 100644
--- a/src/leap/bitmask/gui/mainwindow.py
+++ b/src/leap/bitmask/gui/mainwindow.py
@@ -467,9 +467,9 @@ class MainWindow(QtGui.QMainWindow):
Displays the preferences window.
"""
- preferences_window = PreferencesWindow(self, self._srp_auth,
- self._provider_config,
- self._soledad)
+ preferences_window = PreferencesWindow(
+ self, self._srp_auth, self._provider_config, self._soledad,
+ self._login_widget.get_selected_provider())
self.soledad_ready.connect(preferences_window.set_soledad_ready)
preferences_window.show()
diff --git a/src/leap/bitmask/gui/preferenceswindow.py b/src/leap/bitmask/gui/preferenceswindow.py
index 8e9ef95a..b4bddef2 100644
--- a/src/leap/bitmask/gui/preferenceswindow.py
+++ b/src/leap/bitmask/gui/preferenceswindow.py
@@ -42,7 +42,7 @@ class PreferencesWindow(QtGui.QDialog):
"""
Window that displays the preferences.
"""
- def __init__(self, parent, srp_auth, provider_config, soledad):
+ def __init__(self, parent, srp_auth, provider_config, soledad, domain):
"""
:param parent: parent object of the PreferencesWindow.
:parent type: QWidget
@@ -52,6 +52,8 @@ class PreferencesWindow(QtGui.QDialog):
:type provider_config: ProviderConfig
:param soledad: Soledad instance
:type soledad: Soledad
+ :param domain: the selected domain in the login widget
+ :type domain: unicode
"""
QtGui.QDialog.__init__(self, parent)
self.AUTOMATIC_GATEWAY_LABEL = self.tr("Automatic")
@@ -83,9 +85,6 @@ class PreferencesWindow(QtGui.QDialog):
# check if the user is logged in
if srp_auth is not None and srp_auth.get_token() is not None:
# check if provider has 'mx' ...
- domain = provider_config.get_domain()
- self._select_provider_by_name(domain)
-
if provider_config.provides_mx():
enabled_services = self._settings.get_enabled_services(domain)
mx_name = get_service_display_name(MX_SERVICE)
@@ -111,6 +110,8 @@ class PreferencesWindow(QtGui.QDialog):
"In order to change your password you need to be logged in.")
self._set_password_change_status(msg)
+ self._select_provider_by_name(domain)
+
self.ui.gbPasswordChange.setEnabled(pw_enabled)
def set_soledad_ready(self):
diff --git a/src/leap/bitmask/services/eip/linuxvpnlauncher.py b/src/leap/bitmask/services/eip/linuxvpnlauncher.py
index d02f6f96..d24e7ae7 100644
--- a/src/leap/bitmask/services/eip/linuxvpnlauncher.py
+++ b/src/leap/bitmask/services/eip/linuxvpnlauncher.py
@@ -77,7 +77,7 @@ def _try_to_launch_agent():
Tries to launch a polkit daemon.
"""
env = None
- if flags.STANDALONE is True:
+ if flags.STANDALONE:
env = {"PYTHONPATH": os.path.abspath('../../../../lib/')}
try:
# We need to quote the command because subprocess call
@@ -148,18 +148,21 @@ class LinuxVPNLauncher(VPNLauncher):
def missing_other_files(kls):
"""
'Extend' the VPNLauncher's missing_other_files to check if the polkit
- files is outdated. If the polkit file that is in OTHER_FILES exists but
- is not up to date, it is added to the missing list.
+ files is outdated, in the case of an standalone bundle.
+ If the polkit file that is in OTHER_FILES exists but is not up to date,
+ it is added to the missing list.
:returns: a list of missing files
:rtype: list of str
"""
# we use `super` in order to send the class to use
missing = super(LinuxVPNLauncher, kls).missing_other_files()
- polkit_file = LinuxPolicyChecker.get_polkit_path()
- if polkit_file not in missing:
- if privilege_policies.is_policy_outdated(kls.OPENVPN_BIN_PATH):
- missing.append(polkit_file)
+
+ if flags.STANDALONE:
+ polkit_file = LinuxPolicyChecker.get_polkit_path()
+ if polkit_file not in missing:
+ if privilege_policies.is_policy_outdated(kls.OPENVPN_BIN_PATH):
+ missing.append(polkit_file)
return missing