diff options
author | elijah <elijah@riseup.net> | 2014-09-19 14:22:42 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2014-09-19 14:23:14 -0700 |
commit | d47adca6cb7494e55c4a9fbc88896c62c06affa5 (patch) | |
tree | 7b53fbd9344baeadd569ca972a401cd4d52b1771 /src/leap/bitmask/gui/preferenceswindow.py | |
parent | 0ad8c8ea3f8d5130f44aa90b55da59622d0048c7 (diff) |
single pref win: fix problems with cleaning up closed windows (lambdas were keeping the python object from getting garbage collected, and this keeps the old signal connections active)
Diffstat (limited to 'src/leap/bitmask/gui/preferenceswindow.py')
-rw-r--r-- | src/leap/bitmask/gui/preferenceswindow.py | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/leap/bitmask/gui/preferenceswindow.py b/src/leap/bitmask/gui/preferenceswindow.py index e18be976..f1252301 100644 --- a/src/leap/bitmask/gui/preferenceswindow.py +++ b/src/leap/bitmask/gui/preferenceswindow.py @@ -59,7 +59,7 @@ class PreferencesWindow(QtGui.QDialog): self.ui = Ui_Preferences() self.ui.setupUi(self) - self.ui.close_button.clicked.connect(self.close_window) + self.ui.close_button.clicked.connect(self.close) self.ui.account_label.setText(account.address) self.app.service_selection_changed.connect(self._update_icons) @@ -129,26 +129,20 @@ class PreferencesWindow(QtGui.QDialog): self.ui.pages_widget.addWidget(self._vpn_page) self.ui.pages_widget.addWidget(self._email_page) - def closeEvent(self, e): - """ - Override closeEvent to capture when user closes the window. - """ - self.close_window() - # # Slots # - @QtCore.Slot() - def close_window(self): + def closeEvent(self, e): """ TRIGGERS: self.ui.close_button.clicked + (since self.close() will trigger closeEvent) + whenever the window is closed Close this dialog and destroy it. """ PreferencesWindow._current_window = None - self.close() # deleteLater does not seem to cascade to items in stackLayout # (even with QtCore.Qt.WA_DeleteOnClose attribute). |