diff options
author | elijah <elijah@riseup.net> | 2014-09-17 16:42:51 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2014-09-19 14:23:14 -0700 |
commit | d8105d53e3aa66448094df3f34eda54c3dcab865 (patch) | |
tree | ce1866e9390af1374fd5fc9a0be054e5ff3b5e66 /src/leap/bitmask/gui/preferences_account_page.py | |
parent | 5f56629884da77c3f1427ef5ceb8a830654eb424 (diff) |
single pref win: minor linting & add changes file
Diffstat (limited to 'src/leap/bitmask/gui/preferences_account_page.py')
-rw-r--r-- | src/leap/bitmask/gui/preferences_account_page.py | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/leap/bitmask/gui/preferences_account_page.py b/src/leap/bitmask/gui/preferences_account_page.py index 00dbe626..ec6a7716 100644 --- a/src/leap/bitmask/gui/preferences_account_page.py +++ b/src/leap/bitmask/gui/preferences_account_page.py @@ -21,10 +21,9 @@ import logging from functools import partial from PySide import QtCore, QtGui -from ui_preferences_account_page import Ui_PreferencesAccountPage -from passwordwindow import PasswordWindow +from leap.bitmask.gui.ui_preferences_account_page import Ui_PreferencesAccountPage +from leap.bitmask.gui.passwordwindow import PasswordWindow from leap.bitmask.services import get_service_display_name -from leap.bitmask.config.leapsettings import LeapSettings logger = logging.getLogger(__name__) @@ -33,6 +32,14 @@ class PreferencesAccountPage(QtGui.QWidget): def __init__(self, parent, account, app): """ + :param parent: parent object of the PreferencesWindow. + :parent type: QWidget + + :param account: user account (user + provider or just provider) + :type account: Account + + :param app: the current App object + :type app: App """ QtGui.QWidget.__init__(self, parent) self.ui = Ui_PreferencesAccountPage() @@ -103,7 +110,11 @@ class PreferencesAccountPage(QtGui.QWidget): self._selected_services = set() - # remove existing checkboxes + # Remove existing checkboxes + # (the new widget is deleted when its parent is deleted. + # We need to loop backwards because removing things from the + # beginning shifts items and changes the order of items in the layout. + # Using `QObject.deleteLater` doesn't seem to work.) layout = self.ui.provider_services_layout for i in reversed(range(layout.count())): layout.itemAt(i).widget().setParent(None) |