Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardDialog.py

changeset 546
c3e7bf5648be
parent 539
87f9bce38a44
child 553
5af61623ae3c
--- a/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardDialog.py	Thu Sep 02 08:58:41 2010 +0200
+++ b/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardDialog.py	Thu Sep 02 16:36:23 2010 +0200
@@ -311,15 +311,12 @@
                 if ex:
                     fname += ex
             if QFileInfo(fname).exists():
-                res = E5MessageBox.warning(self,
+                res = E5MessageBox.yesNo(self,
                     self.trUtf8("Save regular expression"),
-                    self.trUtf8("<p>The file <b>{0}</b> already exists.</p>")
-                        .format(fname),
-                    QMessageBox.StandardButtons(\
-                        QMessageBox.Abort | \
-                        QMessageBox.Save),
-                    QMessageBox.Abort)
-                if res == QMessageBox.Abort or res == QMessageBox.Cancel:
+                    self.trUtf8("<p>The file <b>{0}</b> already exists."
+                            " Overwrite it?</p>").format(fname),
+                    type_ = E5MessageBox.Warning)
+                if not res:
                     return
             
             try:
@@ -680,4 +677,4 @@
         self.resize(size)
         
         self.cw.buttonBox.accepted[()].connect(self.close)
-        self.cw.buttonBox.rejected[()].connect(self.close)
\ No newline at end of file
+        self.cw.buttonBox.rejected[()].connect(self.close)

eric ide

mercurial