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

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

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 28 Jun 2013 19:49:58 +0200
branch
5_3_x
changeset 2753
997fec8d8000
parent 2735
d40057b69abb
child 2756
6c0eeb003aac

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

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	Sat Jun 22 20:09:26 2013 +0200
+++ b/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardDialog.py	Fri Jun 28 19:49:58 2013 +0200
@@ -85,15 +85,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	Sat Jun 22 20:09:26 2013 +0200
+++ b/Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardDialog.py	Fri Jun 28 19:49:58 2013 +0200
@@ -98,15 +98,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