Fixed an issue with the py regexp dialog and the QRegExp dialog. They showed too many buttons when called as a stand-alone application.

Fri, 28 Jun 2013 19:49:58 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 28 Jun 2013 19:49:58 +0200
changeset 2752
5d556f9040e3
parent 2751
5f7d5ce932fc
child 2754
2b3a46d8905b

Fixed an issue with the py regexp dialog and the QRegExp dialog. They showed too many buttons when called as a stand-alone application.

Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardDialog.py file | annotate | diff | comparison | revisions
Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardDialog.py file | annotate | diff | comparison | revisions
--- a/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardDialog.py	Fri Jun 28 19:45:25 2013 +0200
+++ b/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardDialog.py	Fri Jun 28 19:49:58 2013 +0200
@@ -82,15 +82,15 @@
         self.nextButton.setEnabled(False)
         
         if fromEric:
-            self.buttonBox.button(QDialogButtonBox.Close).hide()
+            self.buttonBox.setStandardButtons(
+                QDialogButtonBox.Cancel | QDialogButtonBox.Ok)
             self.copyButton = None
         else:
             self.copyButton = \
                 self.buttonBox.addButton(self.trUtf8("Copy"), QDialogButtonBox.ActionRole)
             self.copyButton.setToolTip(
                 self.trUtf8("Copy the regular expression to the clipboard"))
-            self.buttonBox.button(QDialogButtonBox.Ok).hide()
-            self.buttonBox.button(QDialogButtonBox.Cancel).hide()
+            self.buttonBox.setStandardButtons(QDialogButtonBox.Close)
             self.variableLabel.hide()
             self.variableLineEdit.hide()
             self.variableLine.hide()
--- a/Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardDialog.py	Fri Jun 28 19:45:25 2013 +0200
+++ b/Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardDialog.py	Fri Jun 28 19:49:58 2013 +0200
@@ -95,15 +95,15 @@
         self.nextButton.setEnabled(False)
         
         if fromEric:
-            self.buttonBox.button(QDialogButtonBox.Close).hide()
+            self.buttonBox.setStandardButtons(
+                QDialogButtonBox.Cancel | QDialogButtonBox.Ok)
             self.copyButton = None
         else:
             self.copyButton = \
                 self.buttonBox.addButton(self.trUtf8("Copy"), QDialogButtonBox.ActionRole)
             self.copyButton.setToolTip(
                 self.trUtf8("Copy the regular expression to the clipboard"))
-            self.buttonBox.button(QDialogButtonBox.Ok).hide()
-            self.buttonBox.button(QDialogButtonBox.Cancel).hide()
+            self.buttonBox.setStandardButtons(QDialogButtonBox.Close)
             self.variableLabel.hide()
             self.variableLineEdit.hide()
             self.variableLine.hide()

eric ide

mercurial