summaryrefslogtreecommitdiff
path: root/src/leap/baseapp/dialogs.py
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-08-03 09:42:14 +0900
committerkali <kali@leap.se>2012-08-03 09:42:14 +0900
commit81613b2ef70e5d73b7c34eb4b78ee63189b45ab6 (patch)
tree126f60090306475820cefd1c0c175ea6c1c9272e /src/leap/baseapp/dialogs.py
parentb9c9b5536f9d1648a196e741cdf4570f64c3fb11 (diff)
pkexec check
Diffstat (limited to 'src/leap/baseapp/dialogs.py')
-rw-r--r--src/leap/baseapp/dialogs.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/leap/baseapp/dialogs.py b/src/leap/baseapp/dialogs.py
new file mode 100644
index 00000000..d4e51a39
--- /dev/null
+++ b/src/leap/baseapp/dialogs.py
@@ -0,0 +1,22 @@
+from PyQt4.QtGui import (QDialog, QFrame, QPushButton, QLabel, QMessageBox)
+
+
+class ErrorDialog(QDialog):
+ def __init__(self, parent=None):
+ super(ErrorDialog, self).__init__(parent)
+
+ frameStyle = QFrame.Sunken | QFrame.Panel
+ self.warningLabel = QLabel()
+ self.warningLabel.setFrameStyle(frameStyle)
+ self.warningButton = QPushButton("QMessageBox.&warning()")
+
+ def warningMessage(self, msg, label):
+ msgBox = QMessageBox(QMessageBox.Warning,
+ "QMessageBox.warning()", msg,
+ QMessageBox.NoButton, self)
+ msgBox.addButton("&Ok", QMessageBox.AcceptRole)
+ msgBox.addButton("&Cancel", QMessageBox.RejectRole)
+ if msgBox.exec_() == QMessageBox.AcceptRole:
+ self.warningLabel.setText("Save Again")
+ else:
+ self.warningLabel.setText("Continue")