Templates/TemplatePropertiesDialog.py

changeset 541
00e1a5d060c5
parent 538
7f1a56e80124
child 564
b3d966393ba9
--- a/Templates/TemplatePropertiesDialog.py	Tue Aug 31 13:39:24 2010 +0200
+++ b/Templates/TemplatePropertiesDialog.py	Tue Aug 31 16:38:06 2010 +0200
@@ -92,14 +92,10 @@
         @param ev key event (QKeyEvent)
         """
         if ev.key() == Qt.Key_Escape:
-            res = E5MessageBox.question(self,
+            res = E5MessageBox.yesNo(self,
                 self.trUtf8("Close dialog"),
-                self.trUtf8("""Do you really want to close the dialog?"""),
-                QMessageBox.StandardButtons(\
-                    QMessageBox.No | \
-                    QMessageBox.Yes),
-                QMessageBox.No)
-            if res == QMessageBox.Yes:
+                self.trUtf8("""Do you really want to close the dialog?"""))
+            if not res:
                 self.reject()
     
     @pyqtSlot()
@@ -198,4 +194,4 @@
                     self.descriptionEdit.text(), 
                     self.groupCombo.currentText(),
                     self.templateEdit.toPlainText()
-                   )
\ No newline at end of file
+                   )

eric ide

mercurial