summaryrefslogtreecommitdiff
path: root/src/leap
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2014-04-22 13:33:37 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2014-04-22 13:33:37 -0300
commitb0dc286e5381d3328f3408b97541818e47865ad5 (patch)
tree25ae1ed2b89969d2a85623c9cb684c4fb1533a4e /src/leap
parenteb940b04bd2921974b094150a763ad8b9bbae8ca (diff)
Use QDialog as base for AKM.
This allows the akm to be treated as a preferences dialog instead of an extra 'main window'.
Diffstat (limited to 'src/leap')
-rw-r--r--src/leap/bitmask/gui/advanced_key_management.py8
-rw-r--r--src/leap/bitmask/gui/mainwindow.py6
-rw-r--r--src/leap/bitmask/gui/ui/advanced_key_management.ui2
3 files changed, 9 insertions, 7 deletions
diff --git a/src/leap/bitmask/gui/advanced_key_management.py b/src/leap/bitmask/gui/advanced_key_management.py
index cbc8c3e3..95e5eedf 100644
--- a/src/leap/bitmask/gui/advanced_key_management.py
+++ b/src/leap/bitmask/gui/advanced_key_management.py
@@ -30,12 +30,14 @@ from ui_advanced_key_management import Ui_AdvancedKeyManagement
logger = logging.getLogger(__name__)
-class AdvancedKeyManagement(QtGui.QWidget):
+class AdvancedKeyManagement(QtGui.QDialog):
"""
Advanced Key Management
"""
- def __init__(self, user, keymanager, soledad):
+ def __init__(self, parent, user, keymanager, soledad):
"""
+ :param parent: parent object of AdvancedKeyManagement.
+ :parent type: QWidget
:param user: the current logged in user.
:type user: unicode
:param keymanager: the existing keymanager instance
@@ -43,7 +45,7 @@ class AdvancedKeyManagement(QtGui.QWidget):
:param soledad: a loaded instance of Soledad
:type soledad: Soledad
"""
- QtGui.QWidget.__init__(self)
+ QtGui.QDialog.__init__(self, parent)
self.ui = Ui_AdvancedKeyManagement()
self.ui.setupUi(self)
diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py
index b911e5d8..3296bb04 100644
--- a/src/leap/bitmask/gui/mainwindow.py
+++ b/src/leap/bitmask/gui/mainwindow.py
@@ -566,9 +566,9 @@ class MainWindow(QtGui.QMainWindow):
"""
domain = self._login_widget.get_selected_provider()
logged_user = "{0}@{1}".format(self._logged_user, domain)
- self._akm = AdvancedKeyManagement(
- logged_user, self._keymanager, self._soledad)
- self._akm.show()
+ akm = AdvancedKeyManagement(
+ self, logged_user, self._keymanager, self._soledad)
+ akm.show()
@QtCore.Slot()
def _show_preferences(self):
diff --git a/src/leap/bitmask/gui/ui/advanced_key_management.ui b/src/leap/bitmask/gui/ui/advanced_key_management.ui
index 1112670f..3b567347 100644
--- a/src/leap/bitmask/gui/ui/advanced_key_management.ui
+++ b/src/leap/bitmask/gui/ui/advanced_key_management.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AdvancedKeyManagement</class>
- <widget class="QWidget" name="AdvancedKeyManagement">
+ <widget class="QDialog" name="AdvancedKeyManagement">
<property name="geometry">
<rect>
<x>0</x>