summaryrefslogtreecommitdiff
path: root/src/leap/baseapp/dialogs.py
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-09-12 21:29:49 +0000
committerkali <kali@leap.se>2012-09-12 08:42:29 +0900
commit18109193b239be6e7ecc4c2d07c9c999e33081f8 (patch)
tree6346f7251578a0c0e7375a4ce7c2c22ea8e3f6bd /src/leap/baseapp/dialogs.py
parent3fa754c39bcdea355a4ec6b0ddfaeead2040a86a (diff)
checks for systray in unity
Diffstat (limited to 'src/leap/baseapp/dialogs.py')
-rw-r--r--src/leap/baseapp/dialogs.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/leap/baseapp/dialogs.py b/src/leap/baseapp/dialogs.py
index d4acb09d..af531154 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)
@@ -31,6 +32,7 @@ class ErrorDialog(QDialog):
# closing the dialog. we can pass that
# in the constructor
+
def criticalMessage(self, msg, label):
msgBox = QMessageBox(QMessageBox.Critical,
"QMessageBox.critical()", msg,
@@ -45,3 +47,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()