diff options
author | kali <kali@leap.se> | 2012-09-12 08:50:31 +0900 |
---|---|---|
committer | kali <kali@leap.se> | 2012-09-12 08:50:31 +0900 |
commit | a7c77a931dadd6e4b94c00551d34fddff961e25b (patch) | |
tree | 42698f48d5a13b0e7bcf78c840390657b52a2ac0 /src/leap/baseapp/dialogs.py | |
parent | 77f4686d43443d08f3b1bb1bb364d24dd127c8ce (diff) | |
parent | ddd11604a5ae376ba27f70c9eb9a6971e749b1f9 (diff) |
Merge branch 'feature/unity-checks' into develop
Closes #340.
Diffstat (limited to 'src/leap/baseapp/dialogs.py')
-rw-r--r-- | src/leap/baseapp/dialogs.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/leap/baseapp/dialogs.py b/src/leap/baseapp/dialogs.py index d4acb09d..3cb539cf 100644 --- a/src/leap/baseapp/dialogs.py +++ b/src/leap/baseapp/dialogs.py @@ -1,3 +1,4 @@ +# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 import logging from PyQt4.QtGui import (QDialog, QFrame, QPushButton, QLabel, QMessageBox) @@ -45,3 +46,13 @@ class ErrorDialog(QDialog): logger.info('Quitting') import sys sys.exit() + + def confirmMessage(self, msg, label, action): + msgBox = QMessageBox(QMessageBox.Critical, + "QMessageBox.critical()", msg, + QMessageBox.NoButton, self) + msgBox.addButton("&Ok", QMessageBox.AcceptRole) + msgBox.addButton("&Cancel", QMessageBox.RejectRole) + + if msgBox.exec_() == QMessageBox.AcceptRole: + action() |