Started replaceing QMessageBox methods with own methods.

Mon, 30 Aug 2010 20:16:34 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 30 Aug 2010 20:16:34 +0200
changeset 536
6d8d39753c82
parent 535
4b00d7336e19
child 537
72b32daeb8d6

Started replaceing QMessageBox methods with own methods.

Debugger/DebugUI.py file | annotate | diff | comparison | revisions
E5Gui/E5MessageBox.py file | annotate | diff | comparison | revisions
Helpviewer/QtHelpDocumentationDialog.py file | annotate | diff | comparison | revisions
PluginManager/PluginRepositoryDialog.py file | annotate | diff | comparison | revisions
PluginManager/PluginUninstallDialog.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsMercurial/HgStatusDialog.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsPySvn/SvnStatusDialog.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsSubversion/SvnStatusDialog.py file | annotate | diff | comparison | revisions
Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardDialog.py file | annotate | diff | comparison | revisions
Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardDialog.py file | annotate | diff | comparison | revisions
Project/Project.py file | annotate | diff | comparison | revisions
Project/ProjectBaseBrowser.py file | annotate | diff | comparison | revisions
Project/ProjectFormsBrowser.py file | annotate | diff | comparison | revisions
Project/ProjectInterfacesBrowser.py file | annotate | diff | comparison | revisions
Project/ProjectResourcesBrowser.py file | annotate | diff | comparison | revisions
Project/ProjectTranslationsBrowser.py file | annotate | diff | comparison | revisions
QScintilla/Editor.py file | annotate | diff | comparison | revisions
QScintilla/SearchReplaceWidget.py file | annotate | diff | comparison | revisions
QScintilla/Shell.py file | annotate | diff | comparison | revisions
SqlBrowser/SqlBrowserWidget.py file | annotate | diff | comparison | revisions
Tasks/TaskViewer.py file | annotate | diff | comparison | revisions
Templates/TemplatePropertiesDialog.py file | annotate | diff | comparison | revisions
Templates/TemplateViewer.py file | annotate | diff | comparison | revisions
UI/UserInterface.py file | annotate | diff | comparison | revisions
VCS/ProjectHelper.py file | annotate | diff | comparison | revisions
eric5.e4p file | annotate | diff | comparison | revisions
--- a/Debugger/DebugUI.py	Mon Aug 30 19:03:34 2010 +0200
+++ b/Debugger/DebugUI.py	Mon Aug 30 20:16:34 2010 +0200
@@ -25,6 +25,7 @@
 import UI.Config
 
 from E5Gui.E5Action import E5Action, createActionGroup
+from E5Gui import E5MessageBox
 
 from eric5config import getConfig
 
@@ -939,11 +940,11 @@
         
         if not Preferences.getDebugger("SuppressClientExit") or status != 0:
             if self.ui.currentProg is None:
-                QMessageBox.information(self.ui,Program,
+                E5MessageBox.information(self.ui,Program,
                     self.trUtf8('<p>The program has terminated with an exit'
                                 ' status of {0}.</p>').format(status))
             else:
-                QMessageBox.information(self.ui,Program,
+                E5MessageBox.information(self.ui,Program,
                     self.trUtf8('<p><b>{0}</b> has terminated with an exit'
                                 ' status of {1}.</p>')
                         .format(Utilities.normabspath(self.ui.currentProg), status))
@@ -1055,7 +1056,7 @@
         """
         self.__resetUI()
         if unplanned:
-            QMessageBox.information(self.ui,Program,
+            E5MessageBox.information(self.ui,Program,
                 self.trUtf8('The program being debugged has terminated unexpectedly.'))
         
     def __getThreadList(self):
@@ -1977,4 +1978,4 @@
         
         @return list of all actions (list of E5Action)
         """
-        return self.actions[:]
+        return self.actions[:]
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/E5Gui/E5MessageBox.py	Mon Aug 30 20:16:34 2010 +0200
@@ -0,0 +1,42 @@
+# -*- coding: utf-8 -*-
+
+# Copyright (c) 2010 Detlev Offenbach <detlev@die-offenbachs.de>
+#
+
+"""
+Module implementing QMessageBox replacements and more convenience function.
+"""
+
+from PyQt4.QtCore import Qt
+from PyQt4.QtGui import QMessageBox, QApplication
+
+def information(parent, title, text, 
+                buttons = QMessageBox.Ok, defaultButton = QMessageBox.NoButton):
+    """
+    Function to show a modal information message box.
+    
+    @param parent parent widget of the message box
+    @param title caption of the message box
+    @param text text to be shown by the message box
+    @param buttons flags indicating which buttons to show 
+        (QMessageBox.StandardButtons)
+    @param defaultButton flag indicating the default button
+        (QMessageBox.StandardButton)
+    @return button pressed by the user 
+        (QMessageBox.StandardButton)
+    """
+    messageBox = QMessageBox(parent)
+    messageBox.setIcon(QMessageBox.Information)
+    if parent is not None:
+        messageBox.setWindowModality(Qt.WindowModal)
+    messageBox.setWindowTitle("{0} - {1}".format(
+        QApplication.applicationName(), title))
+    messageBox.setText(text)
+    messageBox.setStandardButtons(buttons)
+    messageBox.setDefaultButton(defaultButton)
+    messageBox.exec_()
+    clickedButton = messageBox.clickedButton()
+    if clickedButton is None:
+        return QMessageBox.NoButton
+    else:
+        return messageBox.standardButton(clickedButton)
--- a/Helpviewer/QtHelpDocumentationDialog.py	Mon Aug 30 19:03:34 2010 +0200
+++ b/Helpviewer/QtHelpDocumentationDialog.py	Mon Aug 30 20:16:34 2010 +0200
@@ -11,6 +11,8 @@
 from PyQt4.QtCore import *
 from PyQt4.QtHelp import QHelpEngineCore
 
+from E5Gui import E5MessageBox
+
 from .Ui_QtHelpDocumentationDialog import Ui_QtHelpDocumentationDialog
 
 class QtHelpDocumentationDialog(QDialog, Ui_QtHelpDocumentationDialog):
@@ -105,7 +107,7 @@
         for item in items:
             ns = item.text()
             if ns in list(openedDocs.values()):
-                res = QMessageBox.information(self,
+                res = QMessageBox.warning(self,
                     self.trUtf8("Remove Documentation"),
                     self.trUtf8("""Some documents currently opened reference the """
                                 """documentation you are attempting to remove. """
--- a/PluginManager/PluginRepositoryDialog.py	Mon Aug 30 19:03:34 2010 +0200
+++ b/PluginManager/PluginRepositoryDialog.py	Mon Aug 30 20:16:34 2010 +0200
@@ -19,6 +19,8 @@
 
 from .Ui_PluginRepositoryDialog import Ui_PluginRepositoryDialog
 
+from E5Gui import E5MessageBox
+
 from E5XML.XMLUtilities import make_parser
 from E5XML.XMLErrorHandler import XMLErrorHandler, XMLFatalParseError
 from E5XML.XMLEntityResolver import XMLEntityResolver
@@ -228,7 +230,7 @@
         self.__downloadButton.setEnabled(len(self.__selectedItems()))
         self.__installButton.setEnabled(True)
         self.__doneMethod = None
-        QMessageBox.information(None,
+        E5MessageBox.information(self,
             self.trUtf8("Download Plugin Files"),
             self.trUtf8("""The requested plugins were downloaded."""))
         self.downloadProgress.setValue(0)
@@ -601,4 +603,4 @@
                 ).format(applPath),
                 self.trUtf8('OK'))
         
-        self.close()
+        self.close()
\ No newline at end of file
--- a/PluginManager/PluginUninstallDialog.py	Mon Aug 30 19:03:34 2010 +0200
+++ b/PluginManager/PluginUninstallDialog.py	Mon Aug 30 20:16:34 2010 +0200
@@ -15,6 +15,8 @@
 from PyQt4.QtGui import *
 from PyQt4.QtCore import *
 
+from E5Gui import E5MessageBox
+
 from .PluginManager import PluginManager
 from .Ui_PluginUninstallDialog import Ui_PluginUninstallDialog
 
@@ -135,14 +137,14 @@
             
             os.remove(pluginFile)
         except OSError as err:
-            QMessageBox.critical(None,
+            QMessageBox.critical(self,
                 self.trUtf8("Plugin Uninstallation"),
                 self.trUtf8("""<p>The plugin package <b>{0}</b> could not be"""
                             """ removed. Aborting...</p>"""
                             """<p>Reason: {1}</p>""").format(packageDir, str(err)))
             return False
         
-        QMessageBox.information(None,
+        E5MessageBox.information(self,
             self.trUtf8("Plugin Uninstallation"),
             self.trUtf8("""<p>The plugin <b>{0}</b> was uninstalled successfully"""
                         """ from {1}.</p>""")\
@@ -192,4 +194,4 @@
         self.resize(size)
         
         self.cw.accepted[()].connect(self.close)
-        self.cw.buttonBox.rejected[()].connect(self.close)
+        self.cw.buttonBox.rejected[()].connect(self.close)
\ No newline at end of file
--- a/Plugins/VcsPlugins/vcsMercurial/HgStatusDialog.py	Mon Aug 30 19:03:34 2010 +0200
+++ b/Plugins/VcsPlugins/vcsMercurial/HgStatusDialog.py	Mon Aug 30 20:16:34 2010 +0200
@@ -14,6 +14,7 @@
     QMessageBox, QLineEdit
 
 from E5Gui.E5Application import e5App
+from E5Gui import E5MessageBox
 
 from .Ui_HgStatusDialog import Ui_HgStatusDialog
 
@@ -367,7 +368,7 @@
         names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \
                  for itm in self.__getModifiedItems()]
         if not names:
-            QMessageBox.information(self,
+            E5MessageBox.information(self,
                 self.trUtf8("Commit"),
                 self.trUtf8("""There are no uncommitted changes available/selected."""))
             return
@@ -393,7 +394,7 @@
         names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \
                  for itm in self.__getUnversionedItems()]
         if not names:
-            QMessageBox.information(self,
+            E5MessageBox.information(self,
                 self.trUtf8("Add"),
                 self.trUtf8("""There are no unversioned entries available/selected."""))
             return
@@ -413,7 +414,7 @@
         names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \
                  for itm in self.__getMissingItems()]
         if not names:
-            QMessageBox.information(self,
+            E5MessageBox.information(self,
                 self.trUtf8("Remove"),
                 self.trUtf8("""There are no missing entries available/selected."""))
             return
@@ -428,7 +429,7 @@
         names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \
                  for itm in self.__getModifiedItems()]
         if not names:
-            QMessageBox.information(self,
+            E5MessageBox.information(self,
                 self.trUtf8("Revert"),
                 self.trUtf8("""There are no uncommitted changes available/selected."""))
             return
@@ -475,4 +476,4 @@
         for itm in self.statusList.selectedItems():
             if itm.text(self.__statusColumn) in self.missingIndicators:
                 missingItems.append(itm)
-        return missingItems
+        return missingItems
\ No newline at end of file
--- a/Plugins/VcsPlugins/vcsPySvn/SvnStatusDialog.py	Mon Aug 30 19:03:34 2010 +0200
+++ b/Plugins/VcsPlugins/vcsPySvn/SvnStatusDialog.py	Mon Aug 30 20:16:34 2010 +0200
@@ -15,6 +15,7 @@
 from PyQt4.QtGui import *
 
 from E5Gui.E5Application import e5App
+from E5Gui import E5MessageBox
 
 from .SvnConst import svnStatusMap
 from .SvnDialogMixin import SvnDialogMixin
@@ -387,7 +388,7 @@
         names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \
                  for itm in self.__getModifiedItems()]
         if not names:
-            QMessageBox.information(self,
+            E5MessageBox.information(self,
                 self.trUtf8("Commit"),
                 self.trUtf8("""There are no uncommitted changes available/selected."""))
             return
@@ -413,7 +414,7 @@
         names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \
                  for itm in self.__getUnversionedItems()]
         if not names:
-            QMessageBox.information(self,
+            E5MessageBox.information(self,
                 self.trUtf8("Add"),
                 self.trUtf8("""There are no unversioned entries available/selected."""))
             return
@@ -433,7 +434,7 @@
         names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \
                  for itm in self.__getModifiedItems()]
         if not names:
-            QMessageBox.information(self,
+            E5MessageBox.information(self,
                 self.trUtf8("Revert"),
                 self.trUtf8("""There are no uncommitted changes available/selected."""))
             return
@@ -453,7 +454,7 @@
         names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \
                  for itm in self.__getLockActionItems(self.unlockedIndicators)]
         if not names:
-            QMessageBox.information(self,
+            E5MessageBox.information(self,
                 self.trUtf8("Lock"),
                 self.trUtf8("""There are no unlocked files available/selected."""))
             return
@@ -468,7 +469,7 @@
         names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \
                  for itm in self.__getLockActionItems(self.lockedIndicators)]
         if not names:
-            QMessageBox.information(self,
+            E5MessageBox.information(self,
                 self.trUtf8("Unlock"),
                 self.trUtf8("""There are no locked files available/selected."""))
             return
@@ -483,7 +484,7 @@
         names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \
                  for itm in self.__getLockActionItems(self.stealBreakLockIndicators)]
         if not names:
-            QMessageBox.information(self,
+            E5MessageBox.information(self,
                 self.trUtf8("Break Lock"),
                 self.trUtf8("""There are no locked files available/selected."""))
             return
@@ -498,7 +499,7 @@
         names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \
                  for itm in self.__getLockActionItems(self.stealBreakLockIndicators)]
         if not names:
-            QMessageBox.information(self,
+            E5MessageBox.information(self,
                 self.trUtf8("Steal Lock"),
                 self.trUtf8("""There are no locked files available/selected."""))
             return
@@ -513,7 +514,7 @@
         names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \
                  for itm in self.__getNonChangelistItems()]
         if not names:
-            QMessageBox.information(self,
+            E5MessageBox.information(self,
                 self.trUtf8("Remove from Changelist"),
                 self.trUtf8(
                     """There are no files available/selected not """
@@ -531,7 +532,7 @@
         names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \
                  for itm in self.__getChangelistItems()]
         if not names:
-            QMessageBox.information(self,
+            E5MessageBox.information(self,
                 self.trUtf8("Remove from Changelist"),
                 self.trUtf8(
                     """There are no files available/selected belonging to a changelist."""
@@ -600,4 +601,4 @@
         for itm in self.statusList.selectedItems():
             if not itm.text(self.__changelistColumn):
                 clitems.append(itm)
-        return clitems
+        return clitems
\ No newline at end of file
--- a/Plugins/VcsPlugins/vcsSubversion/SvnStatusDialog.py	Mon Aug 30 19:03:34 2010 +0200
+++ b/Plugins/VcsPlugins/vcsSubversion/SvnStatusDialog.py	Mon Aug 30 20:16:34 2010 +0200
@@ -13,6 +13,7 @@
 from PyQt4.QtGui import *
 
 from E5Gui.E5Application import e5App
+from E5Gui import E5MessageBox
 
 from .Ui_SvnStatusDialog import Ui_SvnStatusDialog
 
@@ -495,7 +496,7 @@
         names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \
                  for itm in self.__getModifiedItems()]
         if not names:
-            QMessageBox.information(self,
+            E5MessageBox.information(self,
                 self.trUtf8("Commit"),
                 self.trUtf8("""There are no uncommitted changes available/selected."""))
             return
@@ -521,7 +522,7 @@
         names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \
                  for itm in self.__getUnversionedItems()]
         if not names:
-            QMessageBox.information(self,
+            E5MessageBox.information(self,
                 self.trUtf8("Add"),
                 self.trUtf8("""There are no unversioned entries available/selected."""))
             return
@@ -541,7 +542,7 @@
         names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \
                  for itm in self.__getModifiedItems()]
         if not names:
-            QMessageBox.information(self,
+            E5MessageBox.information(self,
                 self.trUtf8("Revert"),
                 self.trUtf8("""There are no uncommitted changes available/selected."""))
             return
@@ -561,7 +562,7 @@
         names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \
                  for itm in self.__getLockActionItems(self.unlockedIndicators)]
         if not names:
-            QMessageBox.information(self,
+            E5MessageBox.information(self,
                 self.trUtf8("Lock"),
                 self.trUtf8("""There are no unlocked files available/selected."""))
             return
@@ -576,7 +577,7 @@
         names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \
                  for itm in self.__getLockActionItems(self.lockedIndicators)]
         if not names:
-            QMessageBox.information(self,
+            E5MessageBox.information(self,
                 self.trUtf8("Unlock"),
                 self.trUtf8("""There are no locked files available/selected."""))
             return
@@ -591,7 +592,7 @@
         names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \
                  for itm in self.__getLockActionItems(self.stealBreakLockIndicators)]
         if not names:
-            QMessageBox.information(self,
+            E5MessageBox.information(self,
                 self.trUtf8("Break Lock"),
                 self.trUtf8("""There are no locked files available/selected."""))
             return
@@ -606,7 +607,7 @@
         names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \
                  for itm in self.__getLockActionItems(self.stealBreakLockIndicators)]
         if not names:
-            QMessageBox.information(self,
+            E5MessageBox.information(self,
                 self.trUtf8("Steal Lock"),
                 self.trUtf8("""There are no locked files available/selected."""))
             return
@@ -621,7 +622,7 @@
         names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \
                  for itm in self.__getNonChangelistItems()]
         if not names:
-            QMessageBox.information(self,
+            E5MessageBox.information(self,
                 self.trUtf8("Remove from Changelist"),
                 self.trUtf8(
                     """There are no files available/selected not """
@@ -639,7 +640,7 @@
         names = [os.path.join(self.dname, itm.text(self.__pathColumn)) \
                  for itm in self.__getChangelistItems()]
         if not names:
-            QMessageBox.information(self,
+            E5MessageBox.information(self,
                 self.trUtf8("Remove from Changelist"),
                 self.trUtf8(
                     """There are no files available/selected belonging to a changelist."""
@@ -708,4 +709,4 @@
         for itm in self.statusList.selectedItems():
             if itm.text(self.__changelistColumn) == "":
                 clitems.append(itm)
-        return clitems
+        return clitems
\ No newline at end of file
--- a/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardDialog.py	Mon Aug 30 19:03:34 2010 +0200
+++ b/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardDialog.py	Mon Aug 30 20:16:34 2010 +0200
@@ -13,6 +13,8 @@
 from PyQt4.QtCore import *
 from PyQt4.QtGui import *
 
+from E5Gui import E5MessageBox
+
 from .Ui_PyRegExpWizardDialog import Ui_PyRegExpWizardDialog
 
 from .PyRegExpWizardRepeatDialog import PyRegExpWizardRepeatDialog
@@ -162,13 +164,13 @@
         regex = self.regexpTextEdit.toPlainText()[:length]
         names = self.namedGroups(regex)
         if not names:
-            QMessageBox.information(None,
+            E5MessageBox.information(self,
                 self.trUtf8("Named reference"),
                 self.trUtf8("""No named groups have been defined yet."""))
             return
         
         groupName, ok = QInputDialog.getItem(\
-            None,
+            self,
             self.trUtf8("Named reference"),
             self.trUtf8("Select group name:"),
             names,
@@ -325,7 +327,7 @@
                 f.write(self.regexpTextEdit.toPlainText())
                 f.close()
             except IOError as err:
-                QMessageBox.information(self,
+                E5MessageBox.information(self,
                     self.trUtf8("Save regular expression"),
                     self.trUtf8("""<p>The regular expression could not be saved.</p>"""
                                 """<p>Reason: {0}</p>""").format(str(err)))
@@ -347,7 +349,7 @@
                 f.close()
                 self.regexpTextEdit.setPlainText(regexp)
             except IOError as err:
-                QMessageBox.information(self,
+                E5MessageBox.information(self,
                     self.trUtf8("Save regular expression"),
                     self.trUtf8("""<p>The regular expression could not be saved.</p>"""
                                 """<p>Reason: {0}</p>""").format(str(err)))
@@ -390,22 +392,22 @@
                         self.dotallCheckBox.isChecked() and re.DOTALL or 0 | \
                         self.verboseCheckBox.isChecked() and re.VERBOSE or 0 | \
                         (not self.unicodeCheckBox.isChecked() and re.UNICODE or 0))
-                QMessageBox.information(None,
+                E5MessageBox.information(self,
                     self.trUtf8(""),
                     self.trUtf8("""The regular expression is valid."""))
             except re.error as e:
-                QMessageBox.critical(None,
+                QMessageBox.critical(self,
                     self.trUtf8("Error"),
                     self.trUtf8("""Invalid regular expression: {0}""")
                         .format(str(e)))
                 return
             except IndexError:
-                QMessageBox.critical(None,
+                QMessageBox.critical(self,
                     self.trUtf8("Error"),
                     self.trUtf8("""Invalid regular expression: missing group name"""))
                 return
         else:
-            QMessageBox.critical(None,
+            QMessageBox.critical(self,
                 self.trUtf8("Error"),
                 self.trUtf8("""A regular expression must be given."""))
 
--- a/Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardDialog.py	Mon Aug 30 19:03:34 2010 +0200
+++ b/Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardDialog.py	Mon Aug 30 20:16:34 2010 +0200
@@ -12,6 +12,8 @@
 from PyQt4.QtCore import *
 from PyQt4.QtGui import *
 
+from E5Gui import E5MessageBox
+
 from .Ui_QRegExpWizardDialog import Ui_QRegExpWizardDialog
 
 from .QRegExpWizardRepeatDialog import QRegExpWizardRepeatDialog
@@ -239,7 +241,7 @@
                 f.write(self.regexpLineEdit.text())
                 f.close()
             except IOError as err:
-                QMessageBox.information(self,
+                E5MessageBox.information(self,
                     self.trUtf8("Save regular expression"),
                     self.trUtf8("""<p>The regular expression could not be saved.</p>"""
                                 """<p>Reason: {0}</p>""").format(str(err)))
@@ -261,7 +263,7 @@
                 f.close()
                 self.regexpLineEdit.setText(regexp)
             except IOError as err:
-                QMessageBox.information(self,
+                E5MessageBox.information(self,
                     self.trUtf8("Save regular expression"),
                     self.trUtf8("""<p>The regular expression could not be saved.</p>"""
                                 """<p>Reason: {0}</p>""").format(str(err)))
@@ -299,17 +301,17 @@
             else:
                 re.setPatternSyntax(QRegExp.RegExp)
             if re.isValid():
-                QMessageBox.information(None,
+                E5MessageBox.information(self,
                     self.trUtf8(""),
                     self.trUtf8("""The regular expression is valid."""))
             else:
-                QMessageBox.critical(None,
+                QMessageBox.critical(self,
                     self.trUtf8("Error"),
                     self.trUtf8("""Invalid regular expression: {0}""")
                         .format(re.errorString()))
                 return
         else:
-            QMessageBox.critical(None,
+            QMessageBox.critical(self,
                 self.trUtf8("Error"),
                 self.trUtf8("""A regular expression must be given."""))
 
--- a/Project/Project.py	Mon Aug 30 19:03:34 2010 +0200
+++ b/Project/Project.py	Mon Aug 30 20:16:34 2010 +0200
@@ -21,7 +21,7 @@
 from PyQt4.QtGui import *
 
 from E5Gui.E5Application import e5App
-from E5Gui import E5FileDialog
+from E5Gui import E5FileDialog, E5MessageBox
 
 from Globals import recentNameProject
 
@@ -1805,7 +1805,7 @@
         
         if len(files) == 0:
             if not quiet:
-                QMessageBox.information(None,
+                E5MessageBox.information(self.ui,
                     self.trUtf8("Add directory"),
                     self.trUtf8("<p>The source directory doesn't contain"
                         " any files belonging to the selected category.</p>"))
@@ -1815,7 +1815,7 @@
             try:
                 os.makedirs(target)
             except IOError as why:
-                QMessageBox.critical(None,
+                QMessageBox.critical(self.ui,
                     self.trUtf8("Add directory"),
                     self.trUtf8("<p>The target directory <b>{0}</b> could not be"
                         " created.</p><p>Reason: {1}</p>")
@@ -1831,7 +1831,7 @@
             if not Utilities.samepath(target, source):
                 try:
                     if os.path.exists(targetfile):
-                        res = QMessageBox.warning(None,
+                        res = QMessageBox.warning(self.ui,
                             self.trUtf8("Add directory"),
                             self.trUtf8("<p>The file <b>{0}</b> already exists.</p>"
                                         "<p>Overwrite it?</p>")
@@ -4018,7 +4018,7 @@
         # if newfiles is empty, put up message box informing user nothing found
         if not newFiles:
             if onUserDemand:
-                QMessageBox.information(None,
+                E5MessageBox.information(self.ui,
                     self.trUtf8("Search New Files"),
                     self.trUtf8("There were no new files found to be added."))
             return
@@ -4588,7 +4588,7 @@
         if not archive in self.pdata["OTHERS"]:
             self.appendFile(archive)
         
-        QMessageBox.information(None,
+        E5MessageBox.information(self.ui,
             self.trUtf8("Create Plugin Archive"),
             self.trUtf8("""<p>The eric5 plugin archive file <b>{0}</b> was """
                         """created successfully.</p>""").format(archive))
@@ -4681,4 +4681,4 @@
                             .replace('"', "").replace("'", "")
                 break
         
-        return version
+        return version
\ No newline at end of file
--- a/Project/ProjectBaseBrowser.py	Mon Aug 30 19:03:34 2010 +0200
+++ b/Project/ProjectBaseBrowser.py	Mon Aug 30 20:16:34 2010 +0200
@@ -13,6 +13,7 @@
 from PyQt4.QtGui import *
 
 from E5Gui.E5Application import e5App
+from E5Gui import E5MessageBox
 
 from UI.Browser import *
 
@@ -477,7 +478,7 @@
         QApplication.processEvents()
         
         if selectedEntries == 0:
-            QMessageBox.information(None,
+            E5MessageBox.information(self,
             QApplication.translate('ProjectBaseBrowser', "Select entries"),
             QApplication.translate('ProjectBaseBrowser', 
                 """There were no matching entries found."""))
@@ -637,4 +638,4 @@
         """
         Protected method to open the configuration dialog.
         """
-        e5App().getObject("UserInterface").showPreferences("projectBrowserPage")
+        e5App().getObject("UserInterface").showPreferences("projectBrowserPage")
\ No newline at end of file
--- a/Project/ProjectFormsBrowser.py	Mon Aug 30 19:03:34 2010 +0200
+++ b/Project/ProjectFormsBrowser.py	Mon Aug 30 20:16:34 2010 +0200
@@ -15,6 +15,7 @@
 from PyQt4.QtGui import *
 
 from E5Gui.E5Application import e5App
+from E5Gui import E5MessageBox
 
 from .ProjectBrowserModel import ProjectBrowserFileItem, \
     ProjectBrowserSimpleDirectoryItem, ProjectBrowserDirectoryItem, \
@@ -616,19 +617,19 @@
                 if self.compiledFile not in self.project.pdata["SOURCES"]:
                     self.project.appendFile(ofn)
                 if not self.noDialog:
-                    QMessageBox.information(None,
+                    E5MessageBox.information(self,
                         self.trUtf8("Form Compilation"),
                         self.trUtf8("The compilation of the form file"
                             " was successful."))
             except IOError as msg:
                 if not self.noDialog:
-                    QMessageBox.information(None,
+                    E5MessageBox.information(self,
                         self.trUtf8("Form Compilation"),
                         self.trUtf8("<p>The compilation of the form file failed.</p>"
                             "<p>Reason: {0}</p>").format(str(msg)))
         else:
             if not self.noDialog:
-                QMessageBox.information(None,
+                E5MessageBox.information(self,
                     self.trUtf8("Form Compilation"),
                     self.trUtf8("The compilation of the form file failed."))
         self.compileProc = None
@@ -902,4 +903,4 @@
             "compileSelectedForms"  : None, 
             "generateDialogCode"    : None, 
             "newForm"               : None, 
-        }
+        }
\ No newline at end of file
--- a/Project/ProjectInterfacesBrowser.py	Mon Aug 30 19:03:34 2010 +0200
+++ b/Project/ProjectInterfacesBrowser.py	Mon Aug 30 20:16:34 2010 +0200
@@ -14,6 +14,7 @@
 from PyQt4.QtGui import *
 
 from E5Gui.E5Application import e5App
+from E5Gui import E5MessageBox
 
 from .ProjectBrowserModel import ProjectBrowserFileItem, \
     ProjectBrowserSimpleDirectoryItem, ProjectBrowserDirectoryItem, \
@@ -450,12 +451,12 @@
             for file in fileList:
                 self.project.appendFile(file)
             if not self.noDialog:
-                QMessageBox.information(None,
+                E5MessageBox.information(self,
                     self.trUtf8("Interface Compilation"),
                     self.trUtf8("The compilation of the interface file was successful."))
         else:
             if not self.noDialog:
-                QMessageBox.information(None,
+                E5MessageBox.information(self,
                     self.trUtf8("Interface Compilation"),
                     self.trUtf8("The compilation of the interface file failed."))
         self.compileProc = None
@@ -576,4 +577,4 @@
         """
         Private method to open the configuration dialog.
         """
-        e5App().getObject("UserInterface").showPreferences("corbaPage")
+        e5App().getObject("UserInterface").showPreferences("corbaPage")
\ No newline at end of file
--- a/Project/ProjectResourcesBrowser.py	Mon Aug 30 19:03:34 2010 +0200
+++ b/Project/ProjectResourcesBrowser.py	Mon Aug 30 20:16:34 2010 +0200
@@ -13,6 +13,7 @@
 from PyQt4.QtGui import *
 
 from E5Gui.E5Application import e5App
+from E5Gui import E5MessageBox
 
 from .ProjectBrowserModel import ProjectBrowserFileItem, \
     ProjectBrowserSimpleDirectoryItem, ProjectBrowserDirectoryItem, \
@@ -521,19 +522,19 @@
                 if self.compiledFile not in self.project.pdata["SOURCES"]:
                     self.project.appendFile(ofn)
                 if not self.noDialog:
-                    QMessageBox.information(None,
+                    E5MessageBox.information(self,
                         self.trUtf8("Resource Compilation"),
                         self.trUtf8("The compilation of the resource file"
                             " was successful."))
             except IOError as msg:
                 if not self.noDialog:
-                    QMessageBox.information(None,
+                    E5MessageBox.information(self,
                         self.trUtf8("Resource Compilation"),
                         self.trUtf8("<p>The compilation of the resource file failed.</p>"
                             "<p>Reason: {0}</p>").format(str(msg)))
         else:
             if not self.noDialog:
-                QMessageBox.information(None,
+                E5MessageBox.information(self,
                     self.trUtf8("Resource Compilation"),
                     self.trUtf8("The compilation of the resource file failed."))
         self.compileProc = None
@@ -816,4 +817,4 @@
             "compileChangedResources"   : None, 
             "compileSelectedResources"  : None, 
             "newResource"               : None, 
-        }
+        }
\ No newline at end of file
--- a/Project/ProjectTranslationsBrowser.py	Mon Aug 30 19:03:34 2010 +0200
+++ b/Project/ProjectTranslationsBrowser.py	Mon Aug 30 20:16:34 2010 +0200
@@ -14,6 +14,8 @@
 from PyQt4.QtCore import *
 from PyQt4.QtGui import *
 
+from E5Gui import E5MessageBox
+
 from .ProjectBrowserModel import ProjectBrowserFileItem, \
     ProjectBrowserSimpleDirectoryItem, ProjectBrowserDirectoryItem, \
     ProjectBrowserTranslationType
@@ -829,12 +831,12 @@
         """
         self.pylupdateProcRunning = False
         if exitStatus == QProcess.NormalExit and exitCode == 0:
-            QMessageBox.information(None,
+            E5MessageBox.information(self,
                 self.trUtf8("Translation file generation"),
                 self.trUtf8("The generation of the translation files (*.ts)"
                     " was successful."))
         else:
-            QMessageBox.critical(None,
+            QMessageBox.critical(self,
                 self.trUtf8("Translation file generation"),
                 self.trUtf8("The generation of the translation files (*.ts) has failed."))
         self.pylupdateProc = None
@@ -968,7 +970,7 @@
         """
         self.lreleaseProcRunning = False
         if exitStatus == QProcess.NormalExit and exitCode == 0:
-            QMessageBox.information(None,
+            E5MessageBox.information(self,
                 self.trUtf8("Translation file release"),
                 self.trUtf8("The release of the translation files (*.qm)"
                     " was successful."))
@@ -982,7 +984,7 @@
                         if os.path.exists(qmFile):
                             shutil.move(qmFile, target)
         else:
-            QMessageBox.critical(None,
+            QMessageBox.critical(self,
                 self.trUtf8("Translation file release"),
                 self.trUtf8("The release of the translation files (*.qm) has failed."))
         self.lreleaseProc = None
@@ -1096,4 +1098,4 @@
             "generateSelectedWithObsolete"  : None, 
             "releaseAll"                    : None, 
             "releaseSelected"               : None, 
-        }
+        }
\ No newline at end of file
--- a/QScintilla/Editor.py	Mon Aug 30 19:03:34 2010 +0200
+++ b/QScintilla/Editor.py	Mon Aug 30 20:16:34 2010 +0200
@@ -16,7 +16,7 @@
 from PyQt4.QtGui import *
 
 from E5Gui.E5Application import e5App
-from E5Gui import E5FileDialog
+from E5Gui import E5FileDialog, E5MessageBox
 
 from . import Exporters
 from . import Lexers
@@ -3431,7 +3431,7 @@
         elif acs == QsciScintilla.AcsAll:
             self.autoCompleteFromAll()
         else:
-            QMessageBox.information(None,
+            E5MessageBox.information(self,
                 self.trUtf8("Autocompletion"),
                 self.trUtf8("""Autocompletion is not available because"""
                     """ there is no autocompletion source set."""))
@@ -4210,11 +4210,11 @@
                     self.coverageMarkersShown.emit(True)
                     self.__coverageMarkersShown = True
             else:
-                QMessageBox.information(None,
+                E5MessageBox.information(self,
                     self.trUtf8("Show Code Coverage Annotations"),
                     self.trUtf8("""All lines have been covered."""))
         else:
-            QMessageBox.warning(None,
+            QMessageBox.warning(self,
                 self.trUtf8("Show Code Coverage Annotations"),
                 self.trUtf8("""There is no coverage file available."""))
         
@@ -5022,7 +5022,7 @@
                     if not QFileInfo(fname).isDir():
                         self.vm.openSourceFile(fname)
                     else:
-                        QMessageBox.information(None,
+                        E5MessageBox.information(self,
                             self.trUtf8("Drop Error"),
                             self.trUtf8("""<p><b>{0}</b> is not a file.</p>""")
                                 .format(fname))
@@ -5758,4 +5758,4 @@
                command = self.__receivedWhileSyncing.pop(0) 
                self.__dispatchCommand(command)
             
-            self.__isSyncing = False
+            self.__isSyncing = False
\ No newline at end of file
--- a/QScintilla/SearchReplaceWidget.py	Mon Aug 30 19:03:34 2010 +0200
+++ b/QScintilla/SearchReplaceWidget.py	Mon Aug 30 20:16:34 2010 +0200
@@ -16,6 +16,7 @@
 from .Editor import Editor
 
 from E5Gui.E5Action import E5Action
+from E5Gui import E5MessageBox
 
 import Preferences
 
@@ -189,7 +190,7 @@
             if self.replace:
                 self.ui.replaceButton.setEnabled(True)
         else:
-            QMessageBox.information(self, self.windowTitle(),
+            E5MessageBox.information(self, self.windowTitle(),
                 self.trUtf8("'{0}' was not found.").format(txt))
 
     @pyqtSlot()
@@ -224,7 +225,7 @@
             if self.replace:
                 self.ui.replaceButton.setEnabled(True)
         else:
-            QMessageBox.information(self, self.windowTitle(),
+            E5MessageBox.information(self, self.windowTitle(),
                 self.trUtf8("'{0}' was not found.").format(txt))
     
     def __findByReturnPressed(self):
@@ -471,7 +472,7 @@
         
         if not ok:
             self.ui.replaceButton.setEnabled(False)
-            QMessageBox.information(self, self.windowTitle(),
+            E5MessageBox.information(self, self.windowTitle(),
                 self.trUtf8("'{0}' was not found.").format(ftxt))
         
         self.__finding = False
@@ -543,11 +544,11 @@
         self.ui.replaceButton.setEnabled(False)
         
         if found:
-            QMessageBox.information(self, self.windowTitle(),
+            E5MessageBox.information(self, self.windowTitle(),
                 self.trUtf8("Replaced {0} occurrences.")
                     .format(replacements))
         else:
-            QMessageBox.information(self, self.windowTitle(),
+            E5MessageBox.information(self, self.windowTitle(),
                 self.trUtf8("Nothing replaced because '{0}' was not found.")
                     .format(ftxt))
         
@@ -628,4 +629,4 @@
             if aw:
                 aw.setFocus(Qt.ActiveWindowFocusReason)
             event.accept()
-            self.close()
+            self.close()
\ No newline at end of file
--- a/QScintilla/Shell.py	Mon Aug 30 19:03:34 2010 +0200
+++ b/QScintilla/Shell.py	Mon Aug 30 20:16:34 2010 +0200
@@ -15,6 +15,7 @@
 from PyQt4.Qsci import QsciScintilla
 
 from E5Gui.E5Application import e5App
+from E5Gui import E5MessageBox
 
 from . import Lexers
 from .QsciScintillaCompat import QsciScintillaCompat
@@ -1356,7 +1357,7 @@
                     if not QFileInfo(fname).isDir():
                         self.vm.openSourceFile(fname)
                     else:
-                        QMessageBox.information(None,
+                        E5MessageBox.information(self,
                             self.trUtf8("Drop Error"),
                             self.trUtf8("""<p><b>{0}</b> is not a file.</p>""")
                                 .format(fname))
@@ -1428,4 +1429,4 @@
         """
         Private method to open the configuration dialog.
         """
-        e5App().getObject("UserInterface").showPreferences("shellPage")
+        e5App().getObject("UserInterface").showPreferences("shellPage")
\ No newline at end of file
--- a/SqlBrowser/SqlBrowserWidget.py	Mon Aug 30 19:03:34 2010 +0200
+++ b/SqlBrowser/SqlBrowserWidget.py	Mon Aug 30 20:16:34 2010 +0200
@@ -11,8 +11,9 @@
 from PyQt4.QtGui import *
 from PyQt4.QtSql import QSqlDatabase, QSqlError, QSqlTableModel, QSqlQueryModel, QSqlQuery
 
+from E5Gui import E5MessageBox
+
 from .SqlConnectionDialog import SqlConnectionDialog
-
 from .Ui_SqlBrowserWidget import Ui_SqlBrowserWidget
 
 class SqlBrowserWidget(QWidget, Ui_SqlBrowserWidget):
@@ -38,7 +39,7 @@
         self.table.addAction(self.deleteRowAction)
         
         if len(QSqlDatabase.drivers()) == 0:
-            QMessageBox.information(None,
+            E5MessageBox.information(self,
                 self.trUtf8("No database drivers found"),
                 self.trUtf8("""This tool requires at least one Qt database driver. """
                 """Please check the Qt documentation how to build the """
@@ -294,4 +295,4 @@
         
         self.table.resizeColumnsToContents()
         
-        self.updateActions()
+        self.updateActions()
\ No newline at end of file
--- a/Tasks/TaskViewer.py	Mon Aug 30 19:03:34 2010 +0200
+++ b/Tasks/TaskViewer.py	Mon Aug 30 20:16:34 2010 +0200
@@ -18,6 +18,7 @@
 from PyQt4.QtGui import *
 
 from E5Gui.E5Application import e5App
+from E5Gui import E5MessageBox
 
 from .TaskPropertiesDialog import TaskPropertiesDialog
 from .TaskFilterConfigDialog import TaskFilterConfigDialog
@@ -711,7 +712,7 @@
         @param on flag indicating the filter state (boolean)
         """
         if on and not self.taskFilter.hasActiveFilter():
-            res = QMessageBox.information(None,
+            res = QMessageBox.question(self,
                 self.trUtf8("Activate task filter"),
                 self.trUtf8("""The task filter doesn't have any active filters."""
                             """ Do you want to configure the filter settings?"""),
--- a/Templates/TemplatePropertiesDialog.py	Mon Aug 30 19:03:34 2010 +0200
+++ b/Templates/TemplatePropertiesDialog.py	Mon Aug 30 20:16:34 2010 +0200
@@ -14,6 +14,7 @@
 
 from .Ui_TemplatePropertiesDialog import Ui_TemplatePropertiesDialog
 
+from E5Gui import E5MessageBox
 
 class TemplatePropertiesDialog(QDialog, Ui_TemplatePropertiesDialog):
     """
@@ -106,7 +107,7 @@
         """
         Public slot to show some help.
         """
-        QMessageBox.information(self,
+        E5MessageBox.information(self,
             self.trUtf8("Template Help"),
             self.trUtf8(\
                 """<p>To use variables in a template, you just have to enclose"""
--- a/Templates/TemplateViewer.py	Mon Aug 30 19:03:34 2010 +0200
+++ b/Templates/TemplateViewer.py	Mon Aug 30 20:16:34 2010 +0200
@@ -16,6 +16,7 @@
 from PyQt4.QtGui import *
 
 from E5Gui.E5Application import e5App
+from E5Gui import E5MessageBox
 
 from .TemplatePropertiesDialog import TemplatePropertiesDialog
 from .TemplateMultipleVariablesDialog import TemplateMultipleVariablesDialog
@@ -560,7 +561,7 @@
         """
         Private method to show some help.
         """
-        QMessageBox.information(self,
+        E5MessageBox.information(self,
             self.trUtf8("Template Help"),
             self.trUtf8("""<p><b>Template groups</b> are a means of grouping individual"""
                         """ templates. Groups have an attribute that specifies,"""
@@ -965,4 +966,4 @@
         names = []
         for group in list(self.groups.values()):
             names.extend(group.getEntryNames(start))
-        return sorted(names)
+        return sorted(names)
\ No newline at end of file
--- a/UI/UserInterface.py	Mon Aug 30 19:03:34 2010 +0200
+++ b/UI/UserInterface.py	Mon Aug 30 20:16:34 2010 +0200
@@ -79,6 +79,7 @@
 from E5Gui.E5SqueezeLabels import E5SqueezeLabelPath
 from E5Gui.E5ToolBox import E5VerticalToolBox, E5HorizontalToolBox
 from E5Gui.E5SideBar import E5SideBar
+from E5Gui import E5MessageBox
 
 from VCS.StatusMonitorLed import StatusMonitorLed
 
@@ -3990,7 +3991,7 @@
                 pass
         
         if version == 3:
-            QMessageBox.information(None,
+            E5MessageBox.information(self,
                 self.trUtf8("Qt 3 support"),
                 self.trUtf8("""Qt v.3 is not supported by eric5."""))
             return
@@ -4046,7 +4047,7 @@
         @param version indication for the requested version (Qt 4) (integer)
         """
         if version < 4:
-            QMessageBox.information(None,
+            E5MessageBox.information(self,
                 self.trUtf8("Qt 3 support"),
                 self.trUtf8("""Qt v.3 is not supported by eric5."""))
             return
@@ -4105,7 +4106,7 @@
         @param version indication for the requested version (Qt 4) (integer)
         """
         if version < 4:
-            QMessageBox.information(None,
+            E5MessageBox.information(self,
                 self.trUtf8("Qt 3 support"),
                 self.trUtf8("""Qt v.3 is not supported by eric5."""))
             return
@@ -4155,7 +4156,7 @@
         """
         customViewer = Preferences.getHelp("CustomViewer")
         if not customViewer:
-            QMessageBox.information(self,
+            E5MessageBox.information(self,
                 self.trUtf8("Help"),
                 self.trUtf8("""Currently no custom viewer is selected."""
                             """ Please use the preferences dialog to specify one."""))
@@ -4338,13 +4339,13 @@
                         self.__startToolProcess(tool)
                         return
                 
-                QMessageBox.information(self,
+                E5MessageBox.information(self,
                     self.trUtf8("External Tools"),
                     self.trUtf8("""No tool entry found for external tool '{0}' """
                         """in tool group '{1}'.""").format(toolMenuText, toolGroupName))
                 return
         
-        QMessageBox.information(self,
+        E5MessageBox.information(self,
             self.trUtf8("External Tools"),
             self.trUtf8("""No toolgroup entry '{0}' found.""").format(toolGroupName))
     
@@ -5293,7 +5294,7 @@
                     if QFileInfo(fname).isFile():
                         self.viewmanager.openSourceFile(fname)
                     else:
-                        QMessageBox.information(None,
+                        E5MessageBox.information(self,
                             self.trUtf8("Drop Error"),
                             self.trUtf8("""<p><b>{0}</b> is not a file.</p>""")
                                 .format(fname))
@@ -5520,7 +5521,7 @@
             if "-snapshot-" in Version:
                 # check snapshot version
                 if versions[2] > Version:
-                    res = QMessageBox.information(None,
+                    res = QMessageBox.question(self,
                         self.trUtf8("Update available"),
                         self.trUtf8("""The update to <b>{0}</b> of eric5 is available"""
                                     """ at <b>{1}</b>. Would you like to get it?""")\
@@ -5531,7 +5532,7 @@
                         QMessageBox.Yes)
                     url = res == QMessageBox.Yes and versions[3] or ''
                 elif versions[0] > Version:
-                    res = QMessageBox.information(None,
+                    res = QMessageBox.question(self,
                         self.trUtf8("Update available"),
                         self.trUtf8("""The update to <b>{0}</b> of eric5 is available"""
                                     """ at <b>{1}</b>. Would you like to get it?""")\
@@ -5543,13 +5544,13 @@
                     url = res == QMessageBox.Yes and versions[1] or ''
                 else:
                     if self.manualUpdatesCheck:
-                        QMessageBox.information(None,
+                        E5MessageBox.information(self,
                             self.trUtf8("Eric5 is up to date"),
                             self.trUtf8("""You are using the latest version of eric5"""))
             else:
                 # check release version
                 if versions[0] > Version:
-                    res = QMessageBox.information(None,
+                    res = QMessageBox.question(self,
                         self.trUtf8("Update available"),
                         self.trUtf8("""The update to <b>{0}</b> of eric5 is available"""
                                     """ at <b>{1}</b>. Would you like to get it?""")\
@@ -5561,11 +5562,11 @@
                     url = res == QMessageBox.Yes and versions[1] or ''
                 else:
                     if self.manualUpdatesCheck:
-                        QMessageBox.information(None,
+                        E5MessageBox.information(self,
                             self.trUtf8("Eric5 is up to date"),
                             self.trUtf8("""You are using the latest version of eric5"""))
         except IndexError:
-            QMessageBox.warning(None,
+            QMessageBox.warning(self,
                 self.trUtf8("Error during updates check"),
                 self.trUtf8("""Could not perform updates check."""))
         
@@ -5640,7 +5641,7 @@
         the configuration dialog is shown.
         """
         if not Preferences.isConfigured():
-            QMessageBox.information(None,
+            E5MessageBox.information(self,
                 self.trUtf8("First time usage"),
                 self.trUtf8("""eric5 has not been configured yet. """
                             """The configuration dialog will be started."""))
@@ -5698,4 +5699,4 @@
         if self.__startup:
             if Preferences.getGeometry("MainMaximized"):
                 self.setWindowState(Qt.WindowStates(Qt.WindowMaximized))
-            self.__startup = False
+            self.__startup = False
\ No newline at end of file
--- a/VCS/ProjectHelper.py	Mon Aug 30 19:03:34 2010 +0200
+++ b/VCS/ProjectHelper.py	Mon Aug 30 20:16:34 2010 +0200
@@ -20,6 +20,7 @@
 from .RepositoryInfoDialog import VcsRepositoryInfoDialog
 
 from E5Gui.E5Action import E5Action
+from E5Gui import E5MessageBox
 
 import Preferences
 
@@ -155,7 +156,7 @@
                 self.project.pdata["VCS"] = [vcsSystem]
                 self.project.vcs = self.project.initVCS(vcsSystem)
                 # edit VCS command options
-                vcores = QMessageBox.question(None,
+                vcores = QMessageBox.question(self.parent(),
                     self.trUtf8("New Project"),
                     self.trUtf8("""Would you like to edit the VCS command options?"""),
                     QMessageBox.StandardButtons(\
@@ -172,7 +173,7 @@
                     try:
                         os.makedirs(projectdir)
                     except EnvironmentError:
-                        QMessageBox.critical(None,
+                        QMessageBox.critical(self.parent(),
                             self.trUtf8("Create project directory"),
                             self.trUtf8("<p>The project directory <b>{0}</b> could not"
                                 " be created.</p>").format(projectdir))
@@ -212,7 +213,7 @@
                             self.project.setDirty(True)
                             self.project.saveProject()
                     else:
-                        res = QMessageBox.question(None,
+                        res = QMessageBox.question(self.parent(),
                             self.trUtf8("New project from repository"),
                             self.trUtf8("The project retrieved from the repository"
                                 " does not contain an eric project file"
@@ -243,7 +244,7 @@
                                 self.project.saveProject()
                                 self.project.openProject(self.project.pfile)
                                 if not export:
-                                    res = QMessageBox.question(None,
+                                    res = QMessageBox.question(self.parent(),
                                         self.trUtf8("New project from repository"),
                                         self.trUtf8("Shall the project file be added to"
                                             " the repository?"),
@@ -254,7 +255,7 @@
                                     if res == QMessageBox.Yes:
                                         self.project.vcs.vcsAdd(self.project.pfile)
                 else:
-                    QMessageBox.critical(None,
+                    QMessageBox.critical(self.parent(),
                         self.trUtf8("New project from repository"),
                         self.trUtf8("""The project could not be retrieved from"""
                             """ the repository."""))
@@ -323,7 +324,7 @@
             if vcsdlg.exec_() == QDialog.Accepted:
                 vcsDataDict = vcsdlg.getData()
                 # edit VCS command options
-                vcores = QMessageBox.question(None,
+                vcores = QMessageBox.question(self.parent(),
                     self.trUtf8("Import Project"),
                     self.trUtf8("""Would you like to edit the VCS command options?"""),
                     QMessageBox.StandardButtons(\
@@ -356,7 +357,7 @@
         """
         shouldReopen = self.vcs.vcsUpdate(self.project.ppath)
         if shouldReopen:
-            res = QMessageBox.information(None,
+            res = QMessageBox.question(self.parent(),
                 self.trUtf8("Update"),
                 self.trUtf8("""The project should be reread. Do this now?"""),
                 QMessageBox.StandardButtons(\
@@ -383,7 +384,7 @@
         Depending on the parameters set in the vcs object the project
         may be removed from the local disk as well.
         """
-        res = QMessageBox.warning(None,
+        res = QMessageBox.question(self.parent(),
             self.trUtf8("Remove project from repository"),
             self.trUtf8("Dou you really want to remove this project from"
                 " the repository (and disk)?"),
--- a/eric5.e4p	Mon Aug 30 19:03:34 2010 +0200
+++ b/eric5.e4p	Mon Aug 30 20:16:34 2010 +0200
@@ -815,6 +815,7 @@
     <Source>Helpviewer/UserAgent/UserAgentDefaults.py</Source>
     <Source>E5Gui/E5FileDialog.py</Source>
     <Source>QScintilla/Exporters/ExporterODT.py</Source>
+    <Source>E5Gui/E5MessageBox.py</Source>
   </Sources>
   <Forms>
     <Form>PyUnit/UnittestDialog.ui</Form>

eric ide

mercurial