Tue, 31 Aug 2010 12:17:02 +0200
Continued replacing QMessageBox methods with own methods.
--- a/Cooperation/ChatWidget.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Cooperation/ChatWidget.py Tue Aug 31 12:17:02 2010 +0200 @@ -12,6 +12,7 @@ QMessageBox, QApplication from E5Gui.E5Application import e5App +from E5Gui import E5MessageBox from Globals import recentNameHosts @@ -560,7 +561,7 @@ f.write(txt) f.close() except IOError as err: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Error saving Chat"), self.trUtf8("""<p>The chat contents could not be written""" """ to <b>{0}</b></p><p>Reason: {1}</p>""")\ @@ -671,4 +672,4 @@ QDateTime.currentDateTime().toString(Qt.SystemLocaleLongDate) + ":") self.chatEdit.append(self.trUtf8("* {0} has been banned and kicked.\n").format( itm.text().split(":")[0])) - self.chatEdit.setTextColor(color) + self.chatEdit.setTextColor(color) \ No newline at end of file
--- a/DataViews/PyProfileDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/DataViews/PyProfileDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -13,6 +13,8 @@ from PyQt4.QtCore import * from PyQt4.QtGui import * +from E5Gui import E5MessageBox + from .Ui_PyProfileDialog import Ui_PyProfileDialog import Utilities @@ -218,7 +220,7 @@ self.stats = pickle.load(f) f.close() except (EnvironmentError, pickle.PickleError): - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Loading Profiling Data"), self.trUtf8("""<p>The profiling data could not be""" """ read from file <b>{0}</b>.</p>""") @@ -308,4 +310,4 @@ self.exclude = True self.filterItm.setText(self.trUtf8('Exclude Python Library')) self.__populateLists(False) - self.__finish() + self.__finish() \ No newline at end of file
--- a/Debugger/DebugUI.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Debugger/DebugUI.py Tue Aug 31 12:17:02 2010 +0200 @@ -963,13 +963,13 @@ self.ui.activateWindow() if message is None: - QMessageBox.critical(self.ui,Program, + E5MessageBox.critical(self.ui,Program, self.trUtf8('The program being debugged contains an unspecified' ' syntax error.')) return self.viewmanager.setFileLine(filename, lineNo, True, True) - QMessageBox.critical(self.ui,Program, + E5MessageBox.critical(self.ui,Program, self.trUtf8('<p>The file <b>{0}</b> contains the syntax error' ' <b>{1}</b> at line <b>{2}</b>, character <b>{3}</b>.</p>') .format(filename, message, lineNo, characterNo)) @@ -986,7 +986,7 @@ self.ui.activateWindow() QApplication.processEvents() if exceptionType is None: - QMessageBox.critical(self.ui,Program, + E5MessageBox.critical(self.ui,Program, self.trUtf8('An unhandled exception occured.' ' See the shell window for details.')) return @@ -1011,7 +1011,7 @@ QMessageBox.No | \ QMessageBox.Yes | \ QMessageBox.Ignore) - res = QMessageBox.critical(self.ui, Program, + res = E5MessageBox.critical(self.ui, Program, self.trUtf8('<p>The debugged program raised the exception' ' <b>{0}</b><br>"<b>{1}</b>"<br>File: <b>{2}</b>,' ' Line: <b>{3}</b></p><p>Break here?</p>') @@ -1022,7 +1022,7 @@ buttons, QMessageBox.No) else: - res = QMessageBox.critical(self.ui, Program, + res = E5MessageBox.critical(self.ui, Program, self.trUtf8('<p>The debugged program raised the exception' ' <b>{0}</b><br>"<b>{1}</b>"</p>') .format(exceptionType, @@ -1125,7 +1125,7 @@ @param filename filename of the breakpoint (string) @param lineno linenumber of the breakpoint (integer) """ - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Breakpoint Condition Error"), self.trUtf8("""<p>The condition of the breakpoint <b>{0}, {1}</b>""" """ contains a syntax error.</p>""")\ @@ -1156,7 +1156,7 @@ @param cond expression of the watch expression (string) """ - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Watch Expression Error"), self.trUtf8("""<p>The watch expression <b>{0}</b>""" """ contains a syntax error.</p>""")\ @@ -1348,7 +1348,7 @@ if runProject: fn = self.project.getMainScript(1) if fn is None: - QMessageBox.critical(self.ui, + E5MessageBox.critical(self.ui, self.trUtf8("Coverage of Project"), self.trUtf8("There is no main script defined for the" " current project. Aborting")) @@ -1452,7 +1452,7 @@ if runProject: fn = self.project.getMainScript(1) if fn is None: - QMessageBox.critical(self.ui, + E5MessageBox.critical(self.ui, self.trUtf8("Profile of Project"), self.trUtf8("There is no main script defined for the" " current project. Aborting")) @@ -1558,7 +1558,7 @@ if runProject: fn = self.project.getMainScript(1) if fn is None: - QMessageBox.critical(self.ui, + E5MessageBox.critical(self.ui, self.trUtf8("Run Project"), self.trUtf8("There is no main script defined for the" " current project. Aborting")) @@ -1666,7 +1666,7 @@ if debugProject: fn = self.project.getMainScript(True) if fn is None: - QMessageBox.critical(self.ui, + E5MessageBox.critical(self.ui, self.trUtf8("Debug Project"), self.trUtf8("There is no main script defined for the" " current project. No debugging possible."))
--- a/Debugger/DebuggerInterfacePython.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Debugger/DebuggerInterfacePython.py Tue Aug 31 12:17:02 2010 +0200 @@ -11,9 +11,10 @@ import os from PyQt4.QtCore import * -from PyQt4.QtGui import QInputDialog, QMessageBox +from PyQt4.QtGui import QInputDialog from E5Gui.E5Application import e5App +from E5Gui import E5MessageBox from .DebugProtocol import * from . import DebugClientCapabilities @@ -144,7 +145,7 @@ """ interpreter = Preferences.getDebugger("PythonInterpreter") if interpreter == "": - QMessageBox.critical(None, + E5MessageBox.critical(None, self.trUtf8("Start Debugger"), self.trUtf8(\ """<p>No Python2 interpreter configured.</p>""")) @@ -180,7 +181,7 @@ args[0] = Utilities.getExecutablePath(args[0]) process = self.__startProcess(args[0], args[1:]) if process is None: - QMessageBox.critical(None, + E5MessageBox.critical(None, self.trUtf8("Start Debugger"), self.trUtf8(\ """<p>The debugger backend could not be started.</p>""")) @@ -225,7 +226,7 @@ args[0] = Utilities.getExecutablePath(args[0]) process = self.__startProcess(args[0], args[1:], clientEnv) if process is None: - QMessageBox.critical(None, + E5MessageBox.critical(None, self.trUtf8("Start Debugger"), self.trUtf8(\ """<p>The debugger backend could not be started.</p>""")) @@ -235,7 +236,7 @@ [debugClient, noencoding, str(port), redirect, ipaddr], clientEnv) if process is None: - QMessageBox.critical(None, + E5MessageBox.critical(None, self.trUtf8("Start Debugger"), self.trUtf8("""<p>The debugger backend could not be started.</p>""")) return process, self.__isNetworked @@ -275,7 +276,7 @@ args[0] = Utilities.getExecutablePath(args[0]) process = self.__startProcess(args[0], args[1:]) if process is None: - QMessageBox.critical(None, + E5MessageBox.critical(None, self.trUtf8("Start Debugger"), self.trUtf8(\ """<p>The debugger backend could not be started.</p>""")) @@ -318,7 +319,7 @@ args[0] = Utilities.getExecutablePath(args[0]) process = self.__startProcess(args[0], args[1:], clientEnv) if process is None: - QMessageBox.critical(None, + E5MessageBox.critical(None, self.trUtf8("Start Debugger"), self.trUtf8(\ """<p>The debugger backend could not be started.</p>""")) @@ -328,7 +329,7 @@ [debugClient, noencoding, str(port), redirect, ipaddr], clientEnv) if process is None: - QMessageBox.critical(None, + E5MessageBox.critical(None, self.trUtf8("Start Debugger"), self.trUtf8("""<p>The debugger backend could not be started.</p>""")) return process, self.__isNetworked
--- a/Debugger/DebuggerInterfacePython3.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Debugger/DebuggerInterfacePython3.py Tue Aug 31 12:17:02 2010 +0200 @@ -11,9 +11,10 @@ import os from PyQt4.QtCore import * -from PyQt4.QtGui import QInputDialog, QMessageBox +from PyQt4.QtGui import QInputDialog from E5Gui.E5Application import e5App +from E5Gui import E5MessageBox from .DebugProtocol import * from . import DebugClientCapabilities @@ -179,7 +180,7 @@ args[0] = Utilities.getExecutablePath(args[0]) process = self.__startProcess(args[0], args[1:]) if process is None: - QMessageBox.critical(None, + E5MessageBox.critical(None, self.trUtf8("Start Debugger"), self.trUtf8(\ """<p>The debugger backend could not be started.</p>""")) @@ -224,7 +225,7 @@ args[0] = Utilities.getExecutablePath(args[0]) process = self.__startProcess(args[0], args[1:], clientEnv) if process is None: - QMessageBox.critical(None, + E5MessageBox.critical(None, self.trUtf8("Start Debugger"), self.trUtf8(\ """<p>The debugger backend could not be started.</p>""")) @@ -234,7 +235,7 @@ [debugClient, noencoding, str(port), redirect, ipaddr], clientEnv) if process is None: - QMessageBox.critical(None, + E5MessageBox.critical(None, self.trUtf8("Start Debugger"), self.trUtf8("""<p>The debugger backend could not be started.</p>""")) return process, self.__isNetworked @@ -274,7 +275,7 @@ args[0] = Utilities.getExecutablePath(args[0]) process = self.__startProcess(args[0], args[1:]) if process is None: - QMessageBox.critical(None, + E5MessageBox.critical(None, self.trUtf8("Start Debugger"), self.trUtf8(\ """<p>The debugger backend could not be started.</p>""")) @@ -317,7 +318,7 @@ args[0] = Utilities.getExecutablePath(args[0]) process = self.__startProcess(args[0], args[1:], clientEnv) if process is None: - QMessageBox.critical(None, + E5MessageBox.critical(None, self.trUtf8("Start Debugger"), self.trUtf8(\ """<p>The debugger backend could not be started.</p>""")) @@ -327,7 +328,7 @@ [debugClient, noencoding, str(port), redirect, ipaddr], clientEnv) if process is None: - QMessageBox.critical(None, + E5MessageBox.critical(None, self.trUtf8("Start Debugger"), self.trUtf8("""<p>The debugger backend could not be started.</p>""")) return process, self.__isNetworked
--- a/Debugger/DebuggerInterfaceRuby.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Debugger/DebuggerInterfaceRuby.py Tue Aug 31 12:17:02 2010 +0200 @@ -10,9 +10,9 @@ import os from PyQt4.QtCore import * -from PyQt4.QtGui import QMessageBox from E5Gui.E5Application import e5App +from E5Gui import E5MessageBox from .DebugProtocol import * from . import DebugClientCapabilities @@ -158,7 +158,7 @@ args[0] = Utilities.getExecutablePath(args[0]) process = self.__startProcess(args[0], args[1:]) if process is None: - QMessageBox.critical(None, + E5MessageBox.critical(None, self.trUtf8("Start Debugger"), self.trUtf8(\ """<p>The debugger backend could not be started.</p>""")) @@ -203,7 +203,7 @@ args[0] = Utilities.getExecutablePath(args[0]) process = self.__startProcess(args[0], args[1:], clientEnv) if process is None: - QMessageBox.critical(None, + E5MessageBox.critical(None, self.trUtf8("Start Debugger"), self.trUtf8(\ """<p>The debugger backend could not be started.</p>""")) @@ -213,7 +213,7 @@ [debugClient, str(port), redirect, ipaddr], clientEnv) if process is None: - QMessageBox.critical(None, + E5MessageBox.critical(None, self.trUtf8("Start Debugger"), self.trUtf8("""<p>The debugger backend could not be started.</p>""")) return process, self.__isNetworked @@ -251,7 +251,7 @@ args[0] = Utilities.getExecutablePath(args[0]) process = self.__startProcess(args[0], args[1:]) if process is None: - QMessageBox.critical(None, + E5MessageBox.critical(None, self.trUtf8("Start Debugger"), self.trUtf8(\ """<p>The debugger backend could not be started.</p>""")) @@ -294,7 +294,7 @@ args[0] = Utilities.getExecutablePath(args[0]) process = self.__startProcess(args[0], args[1:], clientEnv) if process is None: - QMessageBox.critical(None, + E5MessageBox.critical(None, self.trUtf8("Start Debugger"), self.trUtf8(\ """<p>The debugger backend could not be started.</p>""")) @@ -304,7 +304,7 @@ [debugClient, str(port), redirect, ipaddr], clientEnv) if process is None: - QMessageBox.critical(None, + E5MessageBox.critical(None, self.trUtf8("Start Debugger"), self.trUtf8("""<p>The debugger backend could not be started.</p>""")) return process, self.__isNetworked
--- a/E5Gui/E5MessageBox.py Mon Aug 30 20:16:34 2010 +0200 +++ b/E5Gui/E5MessageBox.py Tue Aug 31 12:17:02 2010 +0200 @@ -10,14 +10,15 @@ from PyQt4.QtCore import Qt from PyQt4.QtGui import QMessageBox, QApplication -def information(parent, title, text, - buttons = QMessageBox.Ok, defaultButton = QMessageBox.NoButton): +def __messageBox(parent, title, text, icon, + buttons = QMessageBox.Ok, defaultButton = QMessageBox.NoButton): """ - Function to show a modal information message box. + Private module function to show a modal 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 parent parent widget of the message box (QWidget) + @param title caption of the message box (string) + @param text text to be shown by the message box (string) + @param icon type of icon to be shown (QMessageBox.Icon) @param buttons flags indicating which buttons to show (QMessageBox.StandardButtons) @param defaultButton flag indicating the default button @@ -26,7 +27,7 @@ (QMessageBox.StandardButton) """ messageBox = QMessageBox(parent) - messageBox.setIcon(QMessageBox.Information) + messageBox.setIcon(icon) if parent is not None: messageBox.setWindowModality(Qt.WindowModal) messageBox.setWindowTitle("{0} - {1}".format( @@ -40,3 +41,75 @@ return QMessageBox.NoButton else: return messageBox.standardButton(clickedButton) + +def critical(parent, title, text, + buttons = QMessageBox.Ok, defaultButton = QMessageBox.NoButton): + """ + Function to show a modal critical message box. + + @param parent parent widget of the message box (QWidget) + @param title caption of the message box (string) + @param text text to be shown by the message box (string) + @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) + """ + return __messageBox(parent, title, text, QMessageBox.Critical, + buttons, defaultButton) + +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 (QWidget) + @param title caption of the message box (string) + @param text text to be shown by the message box (string) + @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) + """ + return __messageBox(parent, title, text, QMessageBox.Information, + buttons, defaultButton) + +def question(parent, title, text, + buttons = QMessageBox.Ok, defaultButton = QMessageBox.NoButton): + """ + Function to show a modal question message box. + + @param parent parent widget of the message box (QWidget) + @param title caption of the message box (string) + @param text text to be shown by the message box (string) + @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) + """ + return __messageBox(parent, title, text, QMessageBox.Question, + buttons, defaultButton) + +def warning(parent, title, text, + buttons = QMessageBox.Ok, defaultButton = QMessageBox.NoButton): + """ + Function to show a modal warning message box. + + @param parent parent widget of the message box (QWidget) + @param title caption of the message box (string) + @param text text to be shown by the message box (string) + @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) + """ + return __messageBox(parent, title, text, QMessageBox.Warning, + buttons, defaultButton)
--- a/E5Gui/E5ToolBarDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/E5Gui/E5ToolBarDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -10,6 +10,8 @@ from PyQt4.QtGui import * from PyQt4.QtCore import * +from E5Gui import E5MessageBox + from .Ui_E5ToolBarDialog import Ui_E5ToolBarDialog import UI.PixmapCache @@ -126,7 +128,7 @@ if ok and name: if self.toolbarComboBox.findText(name) != -1: # toolbar with this name already exists - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("New Toolbar"), self.trUtf8("""A toolbar with the name <b>{0}</b> already exists.""")\ .format(name)) @@ -185,7 +187,7 @@ return if self.toolbarComboBox.findText(newName) != -1: # toolbar with this name already exists - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Rename Toolbar"), self.trUtf8("""A toolbar with the name <b>{0}</b> already exists.""")\ .format(newName)) @@ -454,4 +456,4 @@ tbID = self.__currentToolBarItem.toolBarId actions = self.__manager.defaultToolBarActions(tbID) self.__restoreCurrentToolbar(actions) - self.__currentToolBarItem.isChanged = True + self.__currentToolBarItem.isChanged = True \ No newline at end of file
--- a/E5Network/E5NetworkProxyFactory.py Mon Aug 30 20:16:34 2010 +0200 +++ b/E5Network/E5NetworkProxyFactory.py Tue Aug 31 12:17:02 2010 +0200 @@ -11,9 +11,11 @@ import os from PyQt4.QtCore import QUrl, Qt, QCoreApplication -from PyQt4.QtGui import QMessageBox, QDialog +from PyQt4.QtGui import QDialog from PyQt4.QtNetwork import QNetworkProxyFactory, QNetworkProxy, QNetworkProxyQuery +from E5Gui import E5MessageBox + from UI.AuthenticationDialog import AuthenticationDialog import Preferences @@ -124,7 +126,7 @@ protocol = query.protocolTag().capitalize() host = Preferences.getUI("ProxyHost/{0}".format(protocol)) if not host: - QMessageBox.critical(None, + E5MessageBox.critical(None, QCoreApplication.translate("E5NetworkProxyFactory", "Proxy Configuration Error"), QCoreApplication.translate("E5NetworkProxyFactory",
--- a/Graphics/UMLGraphicsView.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Graphics/UMLGraphicsView.py Tue Aug 31 12:17:02 2010 +0200 @@ -12,6 +12,8 @@ from E5Graphics.E5GraphicsView import E5GraphicsView +from E5Gui import E5MessageBox + from .UMLItem import UMLItem from .UMLSceneSizeDialog import UMLSceneSizeDialog from .ZoomDialog import ZoomDialog @@ -348,7 +350,7 @@ success = self.saveImage(fname, QFileInfo(fname).suffix().upper()) if not success: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Save Diagram"), self.trUtf8("""<p>The file <b>{0}</b> could not be saved.</p>""") .format(fname)) @@ -487,4 +489,4 @@ (itemrect.y() + itemrect.height() // 2) item.moveBy(xOffset, yOffset) - self.scene().update() + self.scene().update() \ No newline at end of file
--- a/Helpviewer/Bookmarks/BookmarksManager.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Helpviewer/Bookmarks/BookmarksManager.py Tue Aug 31 12:17:02 2010 +0200 @@ -13,6 +13,8 @@ from PyQt4.QtGui import * from PyQt4.QtWebKit import QWebPage +from E5Gui import E5MessageBox + from .BookmarkNode import BookmarkNode from .BookmarksModel import BookmarksModel from .DefaultBookmarks import DefaultBookmarks @@ -392,7 +394,7 @@ writer = XbelWriter() if not writer.write(fileName, self.__bookmarkRootNode): - QMessageBox.critical(None, + E5MessageBox.critical(None, self.trUtf8("Exporting Bookmarks"), self.trUtf8("""Error exporting bookmarks to <b>{0}</b>.""")\ .format(bookmarkFile)) @@ -532,4 +534,4 @@ self._node.title = self._newValue else: self._node.url = self._newValue - self._bookmarksManager.entryChanged.emit(self._node) + self._bookmarksManager.entryChanged.emit(self._node) \ No newline at end of file
--- a/Helpviewer/HelpBrowserWV.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Helpviewer/HelpBrowserWV.py Tue Aug 31 12:17:02 2010 +0200 @@ -19,6 +19,8 @@ from PyQt4.QtNetwork import QNetworkReply, QNetworkRequest import sip +from E5Gui import E5MessageBox + import Preferences from .DownloadDialog import DownloadDialog @@ -478,7 +480,7 @@ name = QUrl.fromLocalFile(name.toString()) if not QFileInfo(name.toLocalFile()).exists(): - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Web Browser"), self.trUtf8("""<p>The file <b>{0}</b> does not exist.</p>""")\ .format(name.toLocalFile())) @@ -490,7 +492,7 @@ name.toLocalFile().endswith(".CHM"): started = QDesktopServices.openUrl(name) if not started: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Web Browser"), self.trUtf8("""<p>Could not start a viewer""" """ for file <b>{0}</b>.</p>""").format(name.path())) @@ -498,7 +500,7 @@ elif name.scheme() in ["mailto"]: started = QDesktopServices.openUrl(name) if not started: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Web Browser"), self.trUtf8("""<p>Could not start an application""" """ for URL <b>{0}</b>.</p>""").format(name.toString())) @@ -516,7 +518,7 @@ name.toString().endswith(".CHM"): started = QDesktopServices.openUrl(name) if not started: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Web Browser"), self.trUtf8("""<p>Could not start a viewer""" """ for file <b>{0}</b>.</p>""").format(name.path())) @@ -1247,4 +1249,4 @@ """ Public method to indicate a change of the settings. """ - self.reload() + self.reload() \ No newline at end of file
--- a/Helpviewer/HelpWindow.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Helpviewer/HelpWindow.py Tue Aug 31 12:17:02 2010 +0200 @@ -45,6 +45,7 @@ from E5Gui.E5TabWidget import E5TabWidget from E5Gui.E5Action import E5Action +from E5Gui import E5MessageBox from E5Network.E5NetworkMonitor import E5NetworkMonitor @@ -1647,7 +1648,7 @@ try: frame.print_(printer) except AttributeError: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Eric Web Browser"), self.trUtf8("""<p>Printing is not available due to a bug in PyQt4.""" """Please upgrade.</p>""")) @@ -1688,7 +1689,7 @@ try: frame.print_(printer) except AttributeError: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Eric Web Browser"), self.trUtf8("""<p>Printing is not available due to a bug in PyQt4.""" """Please upgrade.</p>""")) @@ -1730,7 +1731,7 @@ try: self.__printPreviewBrowser.print_(printer) except AttributeError: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Eric Web Browser"), self.trUtf8("""<p>Printing is not available due to a bug in PyQt4.""" """Please upgrade.</p>""")) @@ -2972,4 +2973,4 @@ else: print(codecs[offset]) QWebSettings.globalSettings().setDefaultTextEncoding(codecs[offset]) - Preferences.setHelp("DefaultTextEncoding", codecs[offset]) + Preferences.setHelp("DefaultTextEncoding", codecs[offset]) \ No newline at end of file
--- a/Helpviewer/OpenSearch/OpenSearchDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Helpviewer/OpenSearch/OpenSearchDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -7,9 +7,11 @@ Module implementing a dialog for the configuration of search engines. """ -from PyQt4.QtGui import QDialog, QFileDialog, QMessageBox +from PyQt4.QtGui import QDialog, QFileDialog from PyQt4.QtCore import pyqtSlot +from E5Gui import E5MessageBox + from .OpenSearchEngineModel import OpenSearchEngineModel from .OpenSearchEditDialog import OpenSearchEditDialog @@ -57,7 +59,7 @@ osm = self.__mw.openSearchManager() for fileName in fileNames: if not osm.addEngine(fileName): - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Add search engine"), self.trUtf8("""{0} is not a valid OpenSearch 1.1 description or""" """ is already on your list.""").format(fileName)) @@ -68,7 +70,7 @@ Private slot to delete the selected search engines. """ if self.enginesTable.model().rowCount() == 1: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Delete selected engines"), self.trUtf8("""You must have at least one search engine."""))
--- a/Helpviewer/Passwords/PasswordManager.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Helpviewer/Passwords/PasswordManager.py Tue Aug 31 12:17:02 2010 +0200 @@ -14,6 +14,8 @@ from PyQt4.QtNetwork import QNetworkRequest from PyQt4.QtWebKit import * +from E5Gui import E5MessageBox + from Helpviewer.JavaScriptResources import parseForms_js from Utilities.AutoSaver import AutoSaver @@ -187,7 +189,7 @@ f.write("{0}\n".format(key)) f.close() except IOError as err: - QMessageBox.critical(None, + E5MessageBox.critical(None, self.trUtf8("Saving login data"), self.trUtf8("""<p>Login data could not be saved to <b>{0}</b></p>""" """<p>Reason: {1}</p>""").format(loginFile, str(err))) @@ -204,7 +206,7 @@ lines = f.read() f.close() except IOError as err: - QMessageBox.critical(None, + E5MessageBox.critical(None, self.trUtf8("Loading login data"), self.trUtf8("""<p>Login data could not be loaded """ """from <b>{0}</b></p>""" @@ -227,7 +229,7 @@ data.append(line) else: if len(data) != 3: - QMessageBox.critical(None, + E5MessageBox.critical(None, self.trUtf8("Loading login data"), self.trUtf8("""<p>Login data could not be loaded """ """from <b>{0}</b></p>""" @@ -562,4 +564,4 @@ value = value.replace('"', '\\"') javascript = 'document.forms[{0}].elements["{1}"].{2}="{3}";'.format( formName, name, setType, value) - page.mainFrame().evaluateJavaScript(javascript) + page.mainFrame().evaluateJavaScript(javascript) \ No newline at end of file
--- a/Helpviewer/UserAgent/UserAgentMenu.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Helpviewer/UserAgent/UserAgentMenu.py Tue Aug 31 12:17:02 2010 +0200 @@ -8,8 +8,9 @@ """ from PyQt4.QtCore import QByteArray, QXmlStreamReader -from PyQt4.QtGui import QMenu, QAction, QActionGroup, QMessageBox, QInputDialog, \ - QLineEdit +from PyQt4.QtGui import QMenu, QAction, QActionGroup, QInputDialog, QLineEdit + +from E5Gui import E5MessageBox from .UserAgentDefaults import UserAgentDefaults @@ -118,7 +119,7 @@ self.addAction(act) if xml.hasError(): - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Parsing default user agents"), self.trUtf8("""<p>Error parsing default user agents.</p><p>{0}</p>""")\ .format(xml.errorString()))
--- a/MultiProject/MultiProject.py Mon Aug 30 20:16:34 2010 +0200 +++ b/MultiProject/MultiProject.py Tue Aug 31 12:17:02 2010 +0200 @@ -20,6 +20,7 @@ from E5Gui.E5Action import E5Action, createActionGroup from E5Gui import E5FileDialog +from E5Gui import E5MessageBox from E5XML.XMLUtilities import make_parser from E5XML.XMLErrorHandler import XMLErrorHandler, XMLFatalParseError @@ -207,7 +208,7 @@ import gzip except ImportError: QApplication.restoreOverrideCursor() - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Read multiproject file"), self.trUtf8("""Compressed multiproject files not supported.""" """ The compression library is missing.""")) @@ -222,7 +223,7 @@ f.close() except EnvironmentError: QApplication.restoreOverrideCursor() - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Read multiproject file"), self.trUtf8("<p>The multiproject file <b>{0}</b> could not be read.</p>")\ .format(fn)) @@ -234,7 +235,7 @@ # now read the file if not line.startswith('<?xml'): QApplication.restoreOverrideCursor() - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Read multiproject file"), self.trUtf8("<p>The multiproject file <b>{0}</b> has an unsupported" " format.</p>").format(fn)) @@ -280,7 +281,7 @@ import gzip except ImportError: QApplication.restoreOverrideCursor() - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Read multiproject file"), self.trUtf8("""Compressed multiproject files not supported.""" """ The compression library is missing.""")) @@ -301,14 +302,14 @@ f.close() except IOError: QApplication.restoreOverrideCursor() - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Read multiproject file"), self.trUtf8("<p>The multiproject file <b>{0}</b> could not be read.</p>")\ .format(fn)) return False except XMLFatalParseError: QApplication.restoreOverrideCursor() - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Read multiproject file"), self.trUtf8("<p>The multiproject file <b>{0}</b> has invalid " "contents.</p>").format(fn)) @@ -359,7 +360,7 @@ try: import gzip except ImportError: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Save multiproject file"), self.trUtf8("""Compressed multiproject files not supported.""" """ The compression library is missing.""")) @@ -377,7 +378,7 @@ g.close() f.close() except IOError: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Save multiproject file"), self.trUtf8("<p>The multiproject file <b>{0}</b> could not be " "written.</p>").format(fn)) @@ -986,4 +987,4 @@ for project in self.projects: if not project['master']: files.append(project['file']) - return files + return files \ No newline at end of file
--- a/PluginManager/PluginManager.py Mon Aug 30 20:16:34 2010 +0200 +++ b/PluginManager/PluginManager.py Tue Aug 31 12:17:02 2010 +0200 @@ -12,7 +12,9 @@ import imp from PyQt4.QtCore import * -from PyQt4.QtGui import QPixmap, QMessageBox +from PyQt4.QtGui import QPixmap + +from E5Gui import E5MessageBox from .PluginExceptions import * @@ -946,7 +948,7 @@ try: os.mkdir(downloadDir, 0o755) except (OSError, IOError) as err: - QMessageBox.critical(self.__ui, + E5MessageBox.critical(self.__ui, self.trUtf8("Plugin Manager Error"), self.trUtf8("""<p>The plugin download directory <b>{0}</b> """ """could not be created. Please configure it """
--- a/PluginManager/PluginRepositoryDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/PluginManager/PluginRepositoryDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -265,7 +265,7 @@ dtdLine = f.readline() f.close() except IOError: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Read plugins repository file"), self.trUtf8("<p>The plugins repository file <b>{0}</b> " "could not be read. Select Update</p>")\ @@ -295,7 +295,7 @@ finally: f.close() except IOError: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Read plugins repository file"), self.trUtf8("<p>The plugins repository file <b>{0}</b> " "could not be read. Select Update</p>")\ @@ -311,7 +311,7 @@ self.repositoryList.resizeColumnToContents(2) self.__resortRepositoryList() else: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Read plugins repository file"), self.trUtf8("<p>The plugins repository file <b>{0}</b> " "has an unsupported format.</p>")\ @@ -595,7 +595,7 @@ args += self.cw.getDownloadedPlugins() if not os.path.isfile(applPath) or not proc.startDetached(sys.executable, args): - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8('Process Generation Error'), self.trUtf8( '<p>Could not start the process.<br>'
--- a/PluginManager/PluginUninstallDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/PluginManager/PluginUninstallDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -89,7 +89,7 @@ .itemData(self.pluginNameCombo.currentIndex()) if not self.__pluginManager.unloadPlugin(pluginName, pluginDirectory): - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Plugin Uninstallation"), self.trUtf8("""<p>The plugin <b>{0}</b> could not be unloaded.""" """ Aborting...</p>""").format(pluginName)) @@ -99,7 +99,7 @@ sys.path.insert(2, pluginDirectory) module = imp.load_source(pluginName, pluginFile) if not hasattr(module, "packageName"): - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Plugin Uninstallation"), self.trUtf8("""<p>The plugin <b>{0}</b> has no 'packageName' attribute.""" """ Aborting...</p>""").format(pluginName)) @@ -137,7 +137,7 @@ os.remove(pluginFile) except OSError as err: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Plugin Uninstallation"), self.trUtf8("""<p>The plugin package <b>{0}</b> could not be""" """ removed. Aborting...</p>"""
--- a/Plugins/DocumentationPlugins/Ericapi/EricapiExecDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/DocumentationPlugins/Ericapi/EricapiExecDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -12,6 +12,8 @@ from PyQt4.QtCore import * from PyQt4.QtGui import * +from E5Gui import E5MessageBox + from .Ui_EricapiExecDialog import Ui_EricapiExecDialog import Preferences @@ -79,7 +81,7 @@ self.process.start(program, args) procStarted = self.process.waitForStarted() if not procStarted: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8('Process Generation Error'), self.trUtf8( 'The process {0} could not be started. ' @@ -152,4 +154,4 @@ Preferences.getSystem("IOEncoding"), 'replace') self.errors.insertPlainText(s) - self.errors.ensureCursorVisible() + self.errors.ensureCursorVisible() \ No newline at end of file
--- a/Plugins/DocumentationPlugins/Ericdoc/EricdocExecDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/DocumentationPlugins/Ericdoc/EricdocExecDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -12,6 +12,8 @@ from PyQt4.QtCore import * from PyQt4.QtGui import * +from E5Gui import E5MessageBox + from .Ui_EricdocExecDialog import Ui_EricdocExecDialog import Preferences @@ -79,7 +81,7 @@ self.process.start(program, args) procStarted = self.process.waitForStarted() if not procStarted: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8('Process Generation Error'), self.trUtf8( 'The process {0} could not be started. ' @@ -152,4 +154,4 @@ Preferences.getSystem("IOEncoding"), 'replace') self.errors.insertPlainText(s) - self.errors.ensureCursorVisible() + self.errors.ensureCursorVisible() \ No newline at end of file
--- a/Plugins/PluginWizardPyRegExp.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/PluginWizardPyRegExp.py Tue Aug 31 12:17:02 2010 +0200 @@ -8,10 +8,11 @@ """ from PyQt4.QtCore import QObject -from PyQt4.QtGui import QDialog, QMessageBox +from PyQt4.QtGui import QDialog from E5Gui.E5Application import e5App from E5Gui.E5Action import E5Action +from E5Gui import E5MessageBox from WizardPlugins.PyRegExpWizard.PyRegExpWizardDialog import \ PyRegExpWizardDialog @@ -116,7 +117,7 @@ editor = e5App().getObject("ViewManager").activeWindow() if editor == None: - QMessageBox.critical(None, + E5MessageBox.critical(self.__ui, self.trUtf8('No current editor'), self.trUtf8('Please open or create a file first.')) else:
--- a/Plugins/PluginWizardQColorDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/PluginWizardQColorDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -8,10 +8,11 @@ """ from PyQt4.QtCore import QObject -from PyQt4.QtGui import QDialog, QMessageBox +from PyQt4.QtGui import QDialog from E5Gui.E5Application import e5App from E5Gui.E5Action import E5Action +from E5Gui import E5MessageBox from WizardPlugins.ColorDialogWizard.ColorDialogWizardDialog import \ ColorDialogWizardDialog @@ -116,7 +117,7 @@ editor = e5App().getObject("ViewManager").activeWindow() if editor == None: - QMessageBox.critical(None, + E5MessageBox.critical(self.__ui, self.trUtf8('No current editor'), self.trUtf8('Please open or create a file first.')) else:
--- a/Plugins/PluginWizardQFileDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/PluginWizardQFileDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -8,10 +8,11 @@ """ from PyQt4.QtCore import QObject -from PyQt4.QtGui import QDialog, QMessageBox +from PyQt4.QtGui import QDialog from E5Gui.E5Application import e5App from E5Gui.E5Action import E5Action +from E5Gui import E5MessageBox from WizardPlugins.FileDialogWizard.FileDialogWizardDialog import \ FileDialogWizardDialog @@ -116,7 +117,7 @@ editor = e5App().getObject("ViewManager").activeWindow() if editor == None: - QMessageBox.critical(None, + E5MessageBox.critical(self.__ui, self.trUtf8('No current editor'), self.trUtf8('Please open or create a file first.')) else:
--- a/Plugins/PluginWizardQFontDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/PluginWizardQFontDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -8,10 +8,11 @@ """ from PyQt4.QtCore import QObject -from PyQt4.QtGui import QDialog, QMessageBox +from PyQt4.QtGui import QDialog from E5Gui.E5Application import e5App from E5Gui.E5Action import E5Action +from E5Gui import E5MessageBox from WizardPlugins.FontDialogWizard.FontDialogWizardDialog import \ FontDialogWizardDialog @@ -116,7 +117,7 @@ editor = e5App().getObject("ViewManager").activeWindow() if editor == None: - QMessageBox.critical(None, + E5MessageBox.critical(self.__ui, self.trUtf8('No current editor'), self.trUtf8('Please open or create a file first.')) else:
--- a/Plugins/PluginWizardQInputDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/PluginWizardQInputDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -8,10 +8,11 @@ """ from PyQt4.QtCore import QObject -from PyQt4.QtGui import QDialog, QMessageBox +from PyQt4.QtGui import QDialog from E5Gui.E5Application import e5App from E5Gui.E5Action import E5Action +from E5Gui import E5MessageBox from WizardPlugins.InputDialogWizard.InputDialogWizardDialog import \ InputDialogWizardDialog @@ -116,7 +117,7 @@ editor = e5App().getObject("ViewManager").activeWindow() if editor == None: - QMessageBox.critical(None, + E5MessageBox.critical(self.__ui, self.trUtf8('No current editor'), self.trUtf8('Please open or create a file first.')) else:
--- a/Plugins/PluginWizardQMessageBox.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/PluginWizardQMessageBox.py Tue Aug 31 12:17:02 2010 +0200 @@ -8,10 +8,11 @@ """ from PyQt4.QtCore import QObject -from PyQt4.QtGui import QDialog, QMessageBox +from PyQt4.QtGui import QDialog from E5Gui.E5Application import e5App from E5Gui.E5Action import E5Action +from E5Gui import E5MessageBox from WizardPlugins.MessageBoxWizard.MessageBoxWizardDialog import \ MessageBoxWizardDialog @@ -116,7 +117,7 @@ editor = e5App().getObject("ViewManager").activeWindow() if editor == None: - QMessageBox.critical(None, + E5MessageBox.critical(self.__ui, self.trUtf8('No current editor'), self.trUtf8('Please open or create a file first.')) else:
--- a/Plugins/PluginWizardQRegExp.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/PluginWizardQRegExp.py Tue Aug 31 12:17:02 2010 +0200 @@ -8,10 +8,11 @@ """ from PyQt4.QtCore import QObject -from PyQt4.QtGui import QDialog, QMessageBox +from PyQt4.QtGui import QDialog from E5Gui.E5Application import e5App from E5Gui.E5Action import E5Action +from E5Gui import E5MessageBox from WizardPlugins.QRegExpWizard.QRegExpWizardDialog import \ QRegExpWizardDialog @@ -116,7 +117,7 @@ editor = e5App().getObject("ViewManager").activeWindow() if editor == None: - QMessageBox.critical(None, + E5MessageBox.critical(self.__ui, self.trUtf8('No current editor'), self.trUtf8('Please open or create a file first.')) else:
--- a/Plugins/VcsPlugins/vcsMercurial/HgAnnotateDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/VcsPlugins/vcsMercurial/HgAnnotateDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -10,9 +10,11 @@ import os from PyQt4.QtCore import pyqtSlot, QProcess, QTimer, Qt -from PyQt4.QtGui import QDialog, QDialogButtonBox, QFont, QMessageBox, QHeaderView, \ +from PyQt4.QtGui import QDialog, QDialogButtonBox, QFont, QHeaderView, \ QTreeWidgetItem, QLineEdit +from E5Gui import E5MessageBox + from .Ui_HgAnnotateDialog import Ui_HgAnnotateDialog import Preferences @@ -104,7 +106,7 @@ if not procStarted: self.inputGroup.setEnabled(False) self.inputGroup.hide() - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8('Process Generation Error'), self.trUtf8( 'The process {0} could not be started. '
--- a/Plugins/VcsPlugins/vcsMercurial/HgDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/VcsPlugins/vcsMercurial/HgDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -10,7 +10,9 @@ import os from PyQt4.QtCore import QProcess, QTimer, pyqtSlot, Qt -from PyQt4.QtGui import QDialog, QDialogButtonBox, QMessageBox, QLineEdit +from PyQt4.QtGui import QDialog, QDialogButtonBox, QLineEdit + +from E5Gui import E5MessageBox from .Ui_HgDialog import Ui_HgDialog @@ -130,7 +132,7 @@ if not procStarted: self.buttonBox.setFocus() self.inputGroup.setEnabled(False) - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8('Process Generation Error'), self.trUtf8( 'The process {0} could not be started. '
--- a/Plugins/VcsPlugins/vcsMercurial/HgDiffDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/VcsPlugins/vcsMercurial/HgDiffDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -13,6 +13,8 @@ from PyQt4.QtGui import QWidget, QDialogButtonBox, QBrush, QColor, QMessageBox, \ QTextCursor, QFileDialog, QLineEdit +from E5Gui import E5MessageBox + from .Ui_HgDiffDialog import Ui_HgDiffDialog import Utilities @@ -149,7 +151,7 @@ procStarted = self.process.waitForStarted() if not procStarted: self.inputGroup.setEnabled(False) - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8('Process Generation Error'), self.trUtf8( 'The process {0} could not be started. ' @@ -292,7 +294,7 @@ f.write(self.contents.toPlainText()) f.close() except IOError as why: - QMessageBox.critical(self, self.trUtf8('Save Diff'), + E5MessageBox.critical(self, self.trUtf8('Save Diff'), self.trUtf8('<p>The patch file <b>{0}</b> could not be saved.' '<br>Reason: {1}</p>') .format(fname, str(why))) @@ -345,4 +347,4 @@ self.intercept = False evt.accept() return - QWidget.keyPressEvent(self, evt) + QWidget.keyPressEvent(self, evt) \ No newline at end of file
--- a/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -11,10 +11,11 @@ from PyQt4.QtCore import pyqtSlot, Qt, QDate, QProcess, QTimer, QRegExp, QSize from PyQt4.QtGui import QDialog, QDialogButtonBox, QHeaderView, QTreeWidgetItem, \ - QApplication, QMessageBox, QCursor, QWidget, QLineEdit, QColor, QPixmap, \ + QApplication, QCursor, QWidget, QLineEdit, QColor, QPixmap, \ QPainter, QPen, QBrush, QIcon from E5Gui.E5Application import e5App +from E5Gui import E5MessageBox from .Ui_HgLogBrowserDialog import Ui_HgLogBrowserDialog from .HgDiffDialog import HgDiffDialog @@ -342,7 +343,7 @@ errMsg = self.trUtf8("Could not start the hg executable.") if errMsg: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Mercurial Error"), errMsg) @@ -379,7 +380,7 @@ errMsg = self.trUtf8("Could not start the hg executable.") if errMsg: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Mercurial Error"), errMsg) @@ -529,7 +530,7 @@ procStarted = self.process.waitForStarted() if not procStarted: self.inputGroup.setEnabled(False) - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8('Process Generation Error'), self.trUtf8( 'The process {0} could not be started. '
--- a/Plugins/VcsPlugins/vcsMercurial/HgLogDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/VcsPlugins/vcsMercurial/HgLogDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -10,10 +10,11 @@ import os from PyQt4.QtCore import pyqtSlot, QProcess, QTimer, QUrl, QByteArray -from PyQt4.QtGui import QWidget, QDialogButtonBox, QApplication, QMessageBox, \ +from PyQt4.QtGui import QWidget, QDialogButtonBox, QApplication, \ QLineEdit, QTextCursor from E5Gui.E5Application import e5App +from E5Gui import E5MessageBox from .Ui_HgLogDialog import Ui_HgLogDialog from .HgDiffDialog import HgDiffDialog @@ -144,7 +145,7 @@ procStarted = self.process.waitForStarted() if not procStarted: self.inputGroup.setEnabled(False) - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8('Process Generation Error'), self.trUtf8( 'The process {0} could not be started. ' @@ -196,7 +197,7 @@ errMsg = self.trUtf8("Could not start the hg executable.") if errMsg: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Mercurial Error"), errMsg)
--- a/Plugins/VcsPlugins/vcsMercurial/HgServeDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/VcsPlugins/vcsMercurial/HgServeDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -11,9 +11,10 @@ from PyQt4.QtCore import QProcess, Qt, QSize from PyQt4.QtGui import QMainWindow, QAction, QToolBar, QPlainTextEdit, \ - QMessageBox, QTextCursor, QBrush, QSpinBox, QComboBox + QTextCursor, QBrush, QSpinBox, QComboBox from E5Gui.E5Application import e5App +from E5Gui import E5MessageBox import UI.PixmapCache @@ -128,7 +129,7 @@ self.vcs.getPlugin().setPreferences("ServerPort", port) self.vcs.getPlugin().setPreferences("ServerStyle", style) else: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8('Process Generation Error'), self.trUtf8( 'The process {0} could not be started. ' @@ -215,4 +216,4 @@ else: self.__log.setCurrentCharFormat(self.cNormalFormat) self.__log.insertPlainText(txt) - self.__log.ensureCursorVisible() \ No newline at end of file + self.__log.ensureCursorVisible()
--- a/Plugins/VcsPlugins/vcsMercurial/HgStatusDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/VcsPlugins/vcsMercurial/HgStatusDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -11,7 +11,7 @@ from PyQt4.QtCore import pyqtSlot, Qt, QProcess, QTimer from PyQt4.QtGui import QWidget, QDialogButtonBox, QMenu, QHeaderView, QTreeWidgetItem, \ - QMessageBox, QLineEdit + QLineEdit from E5Gui.E5Application import e5App from E5Gui import E5MessageBox @@ -186,7 +186,7 @@ if not procStarted: self.inputGroup.setEnabled(False) self.inputGroup.hide() - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8('Process Generation Error'), self.trUtf8( 'The process {0} could not be started. ' @@ -476,4 +476,4 @@ for itm in self.statusList.selectedItems(): if itm.text(self.__statusColumn) in self.missingIndicators: missingItems.append(itm) - return missingItems \ No newline at end of file + return missingItems
--- a/Plugins/VcsPlugins/vcsMercurial/HgTagBranchListDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/VcsPlugins/vcsMercurial/HgTagBranchListDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -11,7 +11,9 @@ from PyQt4.QtCore import pyqtSlot, QProcess, Qt, QTimer from PyQt4.QtGui import QDialog, QDialogButtonBox, QHeaderView, QTreeWidgetItem, \ - QMessageBox, QLineEdit + QLineEdit + +from E5Gui import E5MessageBox from .Ui_HgTagBranchListDialog import Ui_HgTagBranchListDialog @@ -106,7 +108,7 @@ if not procStarted: self.inputGroup.setEnabled(False) self.inputGroup.hide() - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8('Process Generation Error'), self.trUtf8( 'The process {0} could not be started. '
--- a/Plugins/VcsPlugins/vcsMercurial/hg.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/VcsPlugins/vcsMercurial/hg.py Tue Aug 31 12:17:02 2010 +0200 @@ -15,6 +15,7 @@ from PyQt4.QtGui import QMessageBox, QApplication, QDialog, QInputDialog, QFileDialog from E5Gui.E5Application import e5App +from E5Gui import E5MessageBox from QScintilla.MiniEditor import MiniEditor @@ -199,7 +200,7 @@ """ success = self.vcsImport(vcsDataDict, project.ppath)[0] if not success: - QMessageBox.critical(None, + E5MessageBox.critical(self.__ui, self.trUtf8("Create project repository"), self.trUtf8("""The project repository could not be created.""")) else: @@ -2046,4 +2047,4 @@ @param interval check interval for the monitor thread in seconds (integer) @return reference to the monitor thread (QThread) """ - return HgStatusMonitorThread(interval, project, self) + return HgStatusMonitorThread(interval, project, self) \ No newline at end of file
--- a/Plugins/VcsPlugins/vcsPySvn/SvnDiffDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/VcsPlugins/vcsPySvn/SvnDiffDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -15,6 +15,7 @@ from PyQt4.QtGui import * from E5Gui.E5Application import e5App +from E5Gui import E5MessageBox from .SvnDialogMixin import SvnDialogMixin from .Ui_SvnDiffDialog import Ui_SvnDiffDialog @@ -146,7 +147,7 @@ elif os.path.exists('/tmp'): tmpdir = '/tmp' else: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Subversion Diff"), self.trUtf8("""There is no temporary directory available.""")) return @@ -346,7 +347,7 @@ f.write(self.contents.toPlainText()) f.close() except IOError as why: - QMessageBox.critical(self, self.trUtf8('Save Diff'), + E5MessageBox.critical(self, self.trUtf8('Save Diff'), self.trUtf8('<p>The patch file <b>{0}</b> could not be saved.' '<br>Reason: {1}</p>') .format(fname, str(why))) @@ -359,4 +360,4 @@ """ self.errorGroup.show() self.errors.insertPlainText(msg) - self.errors.ensureCursorVisible() + self.errors.ensureCursorVisible() \ No newline at end of file
--- a/Plugins/VcsPlugins/vcsPySvn/SvnLogBrowserDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/VcsPlugins/vcsPySvn/SvnLogBrowserDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -14,6 +14,8 @@ from PyQt4.QtCore import * from PyQt4.QtGui import * +from E5Gui import E5MessageBox + from .SvnUtilities import formatTime, dateFromTime_t from .SvnDialogMixin import SvnDialogMixin from .SvnDiffDialog import SvnDiffDialog @@ -420,7 +422,7 @@ @param msg error message to show (string) """ - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Subversion Error"), msg) @@ -511,4 +513,4 @@ self.vcs.getPlugin().setPreferences("StopLogOnCopy", int(self.stopCheckBox.isChecked())) self.nextButton.setEnabled(True) - self.limitSpinBox.setEnabled(True) + self.limitSpinBox.setEnabled(True) \ No newline at end of file
--- a/Plugins/VcsPlugins/vcsPySvn/SvnRepoBrowserDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/VcsPlugins/vcsPySvn/SvnRepoBrowserDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -12,6 +12,8 @@ from PyQt4.QtGui import * from PyQt4.QtCore import * +from E5Gui import E5MessageBox + from .SvnUtilities import formatTime from .SvnDialogMixin import SvnDialogMixin @@ -262,7 +264,7 @@ @param msg error message to show (string) """ - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Subversion Error"), msg) @@ -285,4 +287,4 @@ if len(items) == 1: return items[0].data(0, self.__urlRole) else: - return "" + return "" \ No newline at end of file
--- a/Plugins/VcsPlugins/vcsPySvn/SvnTagBranchListDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/VcsPlugins/vcsPySvn/SvnTagBranchListDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -14,6 +14,8 @@ from PyQt4.QtCore import * from PyQt4.QtGui import * +from E5Gui import E5MessageBox + from .SvnUtilities import formatTime from .SvnDialogMixin import SvnDialogMixin @@ -69,7 +71,7 @@ reposURL = self.vcs.svnGetReposName(dname) if reposURL is None: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Subversion Error"), self.trUtf8("""The URL of the project repository could not be""" """ retrieved from the working copy. The list operation will""" @@ -81,7 +83,7 @@ # determine the base path of the project in the repository rx_base = QRegExp('(.+)/(trunk|tags|branches).*') if not rx_base.exactMatch(reposURL): - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Subversion Error"), self.trUtf8("""The URL of the project repository has an""" """ invalid format. The list operation will""" @@ -105,7 +107,7 @@ self.close() return False if not reposPath: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Subversion List"), self.trUtf8("""The repository URL is empty. Aborting...""")) self.close() @@ -212,4 +214,4 @@ @return list of tags (list of strings) """ - return self.tagsList + return self.tagsList \ No newline at end of file
--- a/Plugins/VcsPlugins/vcsPySvn/SvnUrlSelectionDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/VcsPlugins/vcsPySvn/SvnUrlSelectionDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -11,12 +11,12 @@ from PyQt4.QtGui import * from E5Gui.E5Application import e5App +from E5Gui import E5MessageBox import pysvn from .Ui_SvnUrlSelectionDialog import Ui_SvnUrlSelectionDialog - class SvnUrlSelectionDialog(QDialog, Ui_SvnUrlSelectionDialog): """ Class implementing a dialog to enter the URLs for the svn diff command. @@ -47,7 +47,7 @@ reposURL = self.vcs.svnGetReposName(path) if reposURL is None: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Subversion Error"), self.trUtf8("""The URL of the project repository could not be""" """ retrieved from the working copy. The operation will""" @@ -59,7 +59,7 @@ # determine the base path of the project in the repository rx_base = QRegExp('(.+/)(trunk|tags|branches).*') if not rx_base.exactMatch(reposURL): - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Subversion Error"), self.trUtf8("""The URL of the project repository has an""" """ invalid format. The operation will"""
--- a/Plugins/VcsPlugins/vcsPySvn/subversion.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/VcsPlugins/vcsPySvn/subversion.py Tue Aug 31 12:17:02 2010 +0200 @@ -16,6 +16,7 @@ from PyQt4.QtGui import * from E5Gui.E5Application import e5App +from E5Gui import E5MessageBox from VCS.VersionControl import VersionControl @@ -211,7 +212,7 @@ """ success = self.vcsImport(vcsDataDict, project.ppath)[0] if not success: - QMessageBox.critical(None, + E5MessageBox.critical(self.__ui, self.trUtf8("Create project in repository"), self.trUtf8("""The project could not be created in the repository.""" """ Maybe the given repository doesn't exist or the""" @@ -233,7 +234,7 @@ if not os.path.isfile(pfn): pfn += "z" if not os.path.isfile(pfn): - QMessageBox.critical(None, + E5MessageBox.critical(self.__ui, self.trUtf8("New project"), self.trUtf8("""The project could not be checked out of the""" """ repository.<br />""" @@ -917,7 +918,7 @@ reposURL = self.svnGetReposName(dname) if reposURL is None: - QMessageBox.critical(None, + E5MessageBox.critical(self.__ui, self.trUtf8("Subversion Error"), self.trUtf8("""The URL of the project repository could not be""" """ retrieved from the working copy. The tag operation will""" @@ -941,7 +942,7 @@ if self.otherData["standardLayout"]: rx_base = QRegExp('(.+)/(trunk|tags|branches).*') if not rx_base.exactMatch(reposURL): - QMessageBox.critical(None, + E5MessageBox.critical(self.__ui, self.trUtf8("Subversion Error"), self.trUtf8("""The URL of the project repository has an""" """ invalid format. The tag operation will""" @@ -1030,7 +1031,7 @@ reposURL = self.svnGetReposName(dname) if reposURL is None: - QMessageBox.critical(None, + E5MessageBox.critical(self.__ui, self.trUtf8("Subversion Error"), self.trUtf8("""The URL of the project repository could not be""" """ retrieved from the working copy. The switch operation will""" @@ -1054,7 +1055,7 @@ if self.otherData["standardLayout"]: rx_base = QRegExp('(.+)/(trunk|tags|branches).*') if not rx_base.exactMatch(reposURL): - QMessageBox.critical(None, + E5MessageBox.critical(self.__ui, self.trUtf8("Subversion Error"), self.trUtf8("""The URL of the project repository has an""" """ invalid format. The switch operation will""" @@ -1526,7 +1527,7 @@ if dlg.exec_() == QDialog.Accepted: propName, propValue, recurse = dlg.getData() if not propName: - QMessageBox.critical(None, + E5MessageBox.critical(self.__ui, self.trUtf8("Subversion Set Property"), self.trUtf8("""You have to supply a property name. Aborting.""")) return @@ -1577,7 +1578,7 @@ propName, recurse = dlg.getData() if not propName: - QMessageBox.critical(None, + E5MessageBox.critical(self.__ui, self.trUtf8("Subversion Delete Property"), self.trUtf8("""You have to supply a property name. Aborting.""")) return @@ -2044,4 +2045,4 @@ @param interval check interval for the monitor thread in seconds (integer) @return reference to the monitor thread (QThread) """ - return SvnStatusMonitorThread(interval, project, self) + return SvnStatusMonitorThread(interval, project, self) \ No newline at end of file
--- a/Plugins/VcsPlugins/vcsSubversion/SvnBlameDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/VcsPlugins/vcsSubversion/SvnBlameDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -10,6 +10,8 @@ from PyQt4.QtCore import * from PyQt4.QtGui import * +from E5Gui import E5MessageBox + from .Ui_SvnBlameDialog import Ui_SvnBlameDialog import Preferences @@ -90,7 +92,7 @@ procStarted = self.process.waitForStarted() if not procStarted: self.inputGroup.setEnabled(False) - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8('Process Generation Error'), self.trUtf8( 'The process {0} could not be started. ' @@ -242,4 +244,4 @@ self.intercept = False evt.accept() return - QDialog.keyPressEvent(self, evt) + QDialog.keyPressEvent(self, evt) \ No newline at end of file
--- a/Plugins/VcsPlugins/vcsSubversion/SvnDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/VcsPlugins/vcsSubversion/SvnDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -12,6 +12,8 @@ from PyQt4.QtCore import * from PyQt4.QtGui import * +from E5Gui import E5MessageBox + from .Ui_SvnDialog import Ui_SvnDialog import Preferences @@ -127,7 +129,7 @@ if not procStarted: self.buttonBox.setFocus() self.inputGroup.setEnabled(False) - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8('Process Generation Error'), self.trUtf8( 'The process {0} could not be started. ' @@ -236,4 +238,4 @@ @return flag indicating the presence of an add or delete (boolean) """ - return self.__hasAddOrDelete + return self.__hasAddOrDelete \ No newline at end of file
--- a/Plugins/VcsPlugins/vcsSubversion/SvnDiffDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/VcsPlugins/vcsSubversion/SvnDiffDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -13,6 +13,7 @@ from PyQt4.QtGui import * from E5Gui.E5Application import e5App +from E5Gui import E5MessageBox from .Ui_SvnDiffDialog import Ui_SvnDiffDialog @@ -161,7 +162,7 @@ procStarted = self.process.waitForStarted() if not procStarted: self.inputGroup.setEnabled(False) - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8('Process Generation Error'), self.trUtf8( 'The process {0} could not be started. ' @@ -306,7 +307,7 @@ f.write(self.contents.toPlainText()) f.close() except IOError as why: - QMessageBox.critical(self, self.trUtf8('Save Diff'), + E5MessageBox.critical(self, self.trUtf8('Save Diff'), self.trUtf8('<p>The patch file <b>{0}</b> could not be saved.' '<br>Reason: {1}</p>') .format(fname, str(why))) @@ -359,4 +360,4 @@ self.intercept = False evt.accept() return - QWidget.keyPressEvent(self, evt) + QWidget.keyPressEvent(self, evt) \ No newline at end of file
--- a/Plugins/VcsPlugins/vcsSubversion/SvnLogBrowserDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/VcsPlugins/vcsSubversion/SvnLogBrowserDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -12,6 +12,8 @@ from PyQt4.QtCore import * from PyQt4.QtGui import * +from E5Gui import E5MessageBox + from .SvnDiffDialog import SvnDiffDialog from .Ui_SvnLogBrowserDialog import Ui_SvnLogBrowserDialog @@ -236,7 +238,7 @@ procStarted = self.process.waitForStarted() if not procStarted: self.inputGroup.setEnabled(False) - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8('Process Generation Error'), self.trUtf8( 'The process {0} could not be started. ' @@ -640,4 +642,4 @@ self.intercept = False evt.accept() return - QWidget.keyPressEvent(self, evt) + QWidget.keyPressEvent(self, evt) \ No newline at end of file
--- a/Plugins/VcsPlugins/vcsSubversion/SvnLogDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/VcsPlugins/vcsSubversion/SvnLogDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -12,6 +12,8 @@ from PyQt4.QtCore import * from PyQt4.QtGui import * +from E5Gui import E5MessageBox + from .Ui_SvnLogDialog import Ui_SvnLogDialog from .SvnDiffDialog import SvnDiffDialog @@ -122,7 +124,7 @@ procStarted = self.process.waitForStarted() if not procStarted: self.inputGroup.setEnabled(False) - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8('Process Generation Error'), self.trUtf8( 'The process {0} could not be started. ' @@ -317,4 +319,4 @@ self.intercept = False evt.accept() return - QWidget.keyPressEvent(self, evt) + QWidget.keyPressEvent(self, evt) \ No newline at end of file
--- a/Plugins/VcsPlugins/vcsSubversion/SvnPropListDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/VcsPlugins/vcsSubversion/SvnPropListDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -10,6 +10,8 @@ from PyQt4.QtCore import * from PyQt4.QtGui import * +from E5Gui import E5MessageBox + from .Ui_SvnPropListDialog import Ui_SvnPropListDialog import Preferences @@ -114,7 +116,7 @@ self.process.start('svn', args) procStarted = self.process.waitForStarted() if not procStarted: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8('Process Generation Error'), self.trUtf8( 'The process {0} could not be started. ' @@ -206,4 +208,4 @@ Preferences.getSystem("IOEncoding"), 'replace') self.errors.insertPlainText(s) - self.errors.ensureCursorVisible() + self.errors.ensureCursorVisible() \ No newline at end of file
--- a/Plugins/VcsPlugins/vcsSubversion/SvnRepoBrowserDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/VcsPlugins/vcsSubversion/SvnRepoBrowserDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -12,6 +12,8 @@ from PyQt4.QtGui import * from PyQt4.QtCore import * +from E5Gui import E5MessageBox + from .Ui_SvnRepoBrowserDialog import Ui_SvnRepoBrowserDialog import UI.PixmapCache @@ -166,7 +168,7 @@ self.errors.ensureCursorVisible() else: QApplication.restoreOverrideCursor() - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8('Process Generation Error'), self.trUtf8( 'The process {0} could not be started. ' @@ -235,7 +237,7 @@ if not procStarted: self.__finish() self.inputGroup.setEnabled(False) - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8('Process Generation Error'), self.trUtf8( 'The process {0} could not be started. ' @@ -451,4 +453,4 @@ self.intercept = False evt.accept() return - QWidget.keyPressEvent(self, evt) + QWidget.keyPressEvent(self, evt) \ No newline at end of file
--- a/Plugins/VcsPlugins/vcsSubversion/SvnStatusDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/VcsPlugins/vcsSubversion/SvnStatusDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -302,7 +302,7 @@ procStarted = self.process.waitForStarted() if not procStarted: self.inputGroup.setEnabled(False) - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8('Process Generation Error'), self.trUtf8( 'The process {0} could not be started. '
--- a/Plugins/VcsPlugins/vcsSubversion/SvnTagBranchListDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/VcsPlugins/vcsSubversion/SvnTagBranchListDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -10,6 +10,8 @@ from PyQt4.QtCore import * from PyQt4.QtGui import * +from E5Gui import E5MessageBox + from .Ui_SvnTagBranchListDialog import Ui_SvnTagBranchListDialog import Preferences @@ -85,7 +87,7 @@ reposURL = self.vcs.svnGetReposName(dname) if reposURL is None: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Subversion Error"), self.trUtf8("""The URL of the project repository could not be""" """ retrieved from the working copy. The list operation will""" @@ -102,7 +104,7 @@ # determine the base path of the project in the repository rx_base = QRegExp('(.+)/(trunk|tags|branches).*') if not rx_base.exactMatch(reposURL): - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Subversion Error"), self.trUtf8("""The URL of the project repository has an""" """ invalid format. The list operation will""" @@ -127,7 +129,7 @@ self.close() return if not reposPath: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Subversion List"), self.trUtf8("""The repository URL is empty. Aborting...""")) self.close() @@ -141,7 +143,7 @@ procStarted = self.process.waitForStarted() if not procStarted: self.inputGroup.setEnabled(False) - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8('Process Generation Error'), self.trUtf8( 'The process {0} could not be started. ' @@ -307,4 +309,4 @@ self.intercept = False evt.accept() return - QDialog.keyPressEvent(self, evt) + QDialog.keyPressEvent(self, evt) \ No newline at end of file
--- a/Plugins/VcsPlugins/vcsSubversion/SvnUrlSelectionDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/VcsPlugins/vcsSubversion/SvnUrlSelectionDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -11,6 +11,7 @@ from PyQt4.QtGui import * from E5Gui.E5Application import e5App +from E5Gui import E5MessageBox from .Ui_SvnUrlSelectionDialog import Ui_SvnUrlSelectionDialog @@ -45,7 +46,7 @@ reposURL = self.vcs.svnGetReposName(path) if reposURL is None: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Subversion Error"), self.trUtf8("""The URL of the project repository could not be""" """ retrieved from the working copy. The operation will""" @@ -57,7 +58,7 @@ # determine the base path of the project in the repository rx_base = QRegExp('(.+/)(trunk|tags|branches).*') if not rx_base.exactMatch(reposURL): - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Subversion Error"), self.trUtf8("""The URL of the project repository has an""" """ invalid format. The list operation will"""
--- a/Plugins/VcsPlugins/vcsSubversion/subversion.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/VcsPlugins/vcsSubversion/subversion.py Tue Aug 31 12:17:02 2010 +0200 @@ -15,6 +15,7 @@ from PyQt4.QtGui import * from E5Gui.E5Application import e5App +from E5Gui import E5MessageBox from VCS.VersionControl import VersionControl @@ -204,7 +205,7 @@ """ success = self.vcsImport(vcsDataDict, project.ppath)[0] if not success: - QMessageBox.critical(None, + E5MessageBox.critical(self.__ui, self.trUtf8("Create project in repository"), self.trUtf8("""The project could not be created in the repository.""" """ Maybe the given repository doesn't exist or the""" @@ -226,7 +227,7 @@ if not os.path.isfile(pfn): pfn += "z" if not os.path.isfile(pfn): - QMessageBox.critical(None, + E5MessageBox.critical(self.__ui, self.trUtf8("New project"), self.trUtf8("""The project could not be checked out of the""" """ repository.<br />""" @@ -808,7 +809,7 @@ reposURL = self.svnGetReposName(dname) if reposURL is None: - QMessageBox.critical(None, + E5MessageBox.critical(self.__ui, self.trUtf8("Subversion Error"), self.trUtf8("""The URL of the project repository could not be""" """ retrieved from the working copy. The tag operation will""" @@ -832,7 +833,7 @@ if self.otherData["standardLayout"]: rx_base = QRegExp('(.+)/(trunk|tags|branches).*') if not rx_base.exactMatch(reposURL): - QMessageBox.critical(None, + E5MessageBox.critical(self.__ui, self.trUtf8("Subversion Error"), self.trUtf8("""The URL of the project repository has an""" """ invalid format. The tag operation will""" @@ -902,7 +903,7 @@ reposURL = self.svnGetReposName(dname) if reposURL is None: - QMessageBox.critical(None, + E5MessageBox.critical(self.__ui, self.trUtf8("Subversion Error"), self.trUtf8("""The URL of the project repository could not be""" """ retrieved from the working copy. The switch operation will""" @@ -926,7 +927,7 @@ if self.otherData["standardLayout"]: rx_base = QRegExp('(.+)/(trunk|tags|branches).*') if not rx_base.exactMatch(reposURL): - QMessageBox.critical(None, + E5MessageBox.critical(self.__ui, self.trUtf8("Subversion Error"), self.trUtf8("""The URL of the project repository has an""" """ invalid format. The switch operation will""" @@ -1384,7 +1385,7 @@ if dlg.exec_() == QDialog.Accepted: propName, fileFlag, propValue = dlg.getData() if not propName: - QMessageBox.critical(None, + E5MessageBox.critical(self.__ui, self.trUtf8("Subversion Set Property"), self.trUtf8("""You have to supply a property name. Aborting.""")) return @@ -1427,7 +1428,7 @@ return if not propName: - QMessageBox.critical(None, + E5MessageBox.critical(self.__ui, self.trUtf8("Subversion Delete Property"), self.trUtf8("""You have to supply a property name. Aborting.""")) return @@ -1826,4 +1827,4 @@ @param interval check interval for the monitor thread in seconds (integer) @return reference to the monitor thread (QThread) """ - return SvnStatusMonitorThread(interval, project, self) + return SvnStatusMonitorThread(interval, project, self) \ No newline at end of file
--- a/Plugins/WizardPlugins/ColorDialogWizard/ColorDialogWizardDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/WizardPlugins/ColorDialogWizard/ColorDialogWizardDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -12,6 +12,8 @@ from PyQt4.QtCore import * from PyQt4.QtGui import * +from E5Gui import E5MessageBox + from .Ui_ColorDialogWizardDialog import Ui_ColorDialogWizardDialog class ColorDialogWizardDialog(QDialog, Ui_ColorDialogWizardDialog): @@ -68,7 +70,7 @@ else: exec('QColorDialog.getColor({0})'.format(coStr)) except: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("QColorDialog Wizard Error"), self.trUtf8("""<p>The colour <b>{0}</b> is not valid.</p>""") .format(coStr)) @@ -180,4 +182,4 @@ code += self.eRGB.text() code += '){0}'.format(estring) - return code + return code \ No newline at end of file
--- a/Plugins/WizardPlugins/MessageBoxWizard/MessageBoxWizardDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/WizardPlugins/MessageBoxWizard/MessageBoxWizardDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -147,28 +147,28 @@ defaultButton = self.buttonsCodeListBinary[self.defaultCombo.currentIndex()] if self.rInformation.isChecked(): - QMessageBox.information(None, + QMessageBox.information(self, self.eCaption.text(), self.eMessage.toPlainText(), QMessageBox.StandardButtons(buttons), defaultButton ) elif self.rQuestion.isChecked(): - QMessageBox.question(None, + QMessageBox.question(self, self.eCaption.text(), self.eMessage.toPlainText(), QMessageBox.StandardButtons(buttons), defaultButton ) elif self.rWarning.isChecked(): - QMessageBox.warning(None, + QMessageBox.warning(self, self.eCaption.text(), self.eMessage.toPlainText(), QMessageBox.StandardButtons(buttons), defaultButton ) elif self.rCritical.isChecked(): - QMessageBox.critical(None, + QMessageBox.critical(self, self.eCaption.text(), self.eMessage.toPlainText(), QMessageBox.StandardButtons(buttons),
--- a/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -396,18 +396,18 @@ self.trUtf8(""), self.trUtf8("""The regular expression is valid.""")) except re.error as e: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Error"), self.trUtf8("""Invalid regular expression: {0}""") .format(str(e))) return except IndexError: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Error"), self.trUtf8("""Invalid regular expression: missing group name""")) return else: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Error"), self.trUtf8("""A regular expression must be given.""")) @@ -523,18 +523,18 @@ self.resultTable.verticalHeader().hide() self.resultTable.horizontalHeader().hide() except re.error as e: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Error"), self.trUtf8("""Invalid regular expression: {0}""") .format(str(e))) return except IndexError: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Error"), self.trUtf8("""Invalid regular expression: missing group name""")) return else: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Error"), self.trUtf8("""A regular expression and a text must be given."""))
--- a/Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -305,13 +305,13 @@ self.trUtf8(""), self.trUtf8("""The regular expression is valid.""")) else: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Error"), self.trUtf8("""Invalid regular expression: {0}""") .format(re.errorString())) return else: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Error"), self.trUtf8("""A regular expression must be given.""")) @@ -340,7 +340,7 @@ else: re.setPatternSyntax(QRegExp.RegExp) if not re.isValid(): - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Error"), self.trUtf8("""Invalid regular expression: {0}""") .format(re.errorString())) @@ -424,7 +424,7 @@ self.resultTable.verticalHeader().hide() self.resultTable.horizontalHeader().hide() else: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Error"), self.trUtf8("""A regular expression and a text must be given."""))
--- a/Preferences/ConfigurationDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Preferences/ConfigurationDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -14,6 +14,7 @@ from PyQt4.QtGui import * from E5Gui.E5Application import e5App +from E5Gui import E5MessageBox import QScintilla.Lexers @@ -421,7 +422,7 @@ mod = getattr(mod, comp) return mod except ImportError: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Configuration Page Error"), self.trUtf8("""<p>The configuration page <b>{0}</b>""" """ could not be loaded.</p>""").format(name)) @@ -671,4 +672,4 @@ self.cw.setPreferences() Preferences.saveResetLayout() Preferences.syncPreferences() - self.close() + self.close() \ No newline at end of file
--- a/Preferences/ConfigurationPages/DebuggerGeneralPage.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Preferences/ConfigurationPages/DebuggerGeneralPage.py Tue Aug 31 12:17:02 2010 +0200 @@ -14,8 +14,8 @@ from PyQt4.QtNetwork import * from E5Gui.E5Application import e5App - from E5Gui.E5Completers import E5FileCompleter, E5DirCompleter +from E5Gui import E5MessageBox from .ConfigurationPageBase import ConfigurationPageBase from .Ui_DebuggerGeneralPage import Ui_DebuggerGeneralPage @@ -218,7 +218,7 @@ [QAbstractSocket.IPv4Protocol, QAbstractSocket.IPv6Protocol]: self.allowedHostsList.addItem(allowedHost) else: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Add allowed host"), self.trUtf8("""<p>The entered address <b>{0}</b> is not""" """ a valid IP v4 or IP v6 address. Aborting...</p>""")\ @@ -248,7 +248,7 @@ [QAbstractSocket.IPv4Protocol, QAbstractSocket.IPv6Protocol]: self.allowedHostsList.currentItem().setText(allowedHost) else: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Edit allowed host"), self.trUtf8("""<p>The entered address <b>{0}</b> is not""" """ a valid IP v4 or IP v6 address. Aborting...</p>""")\
--- a/Preferences/ConfigurationPages/EditorHighlightingStylesPage.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Preferences/ConfigurationPages/EditorHighlightingStylesPage.py Tue Aug 31 12:17:02 2010 +0200 @@ -11,11 +11,13 @@ from PyQt4.QtCore import pyqtSlot, QFileInfo from PyQt4.QtGui import QPalette, QFileDialog, QColorDialog, QFontDialog, \ - QInputDialog, QMessageBox, QFont, QMenu + QInputDialog, QFont, QMenu from .ConfigurationPageBase import ConfigurationPageBase from .Ui_EditorHighlightingStylesPage import Ui_EditorHighlightingStylesPage +from E5Gui import E5MessageBox + from E5XML.XMLUtilities import make_parser from E5XML.XMLErrorHandler import XMLErrorHandler, XMLFatalParseError from E5XML.XMLEntityResolver import XMLEntityResolver @@ -388,7 +390,7 @@ HighlightingStylesWriter(f, lexers).writeXML() f.close() except IOError as err: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Export Highlighting Styles"), self.trUtf8("""<p>The highlighting styles could not be exported""" """ to file <b>{0}</b>.</p><p>Reason: {1}</p>""")\ @@ -418,7 +420,7 @@ finally: f.close() except IOError as err: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Import Highlighting Styles"), self.trUtf8("""<p>The highlighting styles could not be read""" """ from file <b>{0}</b>.</p><p>Reason: {1}</p>""")\ @@ -448,7 +450,7 @@ finally: f.close() except IOError as err: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Import Highlighting Styles"), self.trUtf8("""<p>The highlighting styles could not be read""" """ from file <b>{0}</b>.</p><p>Reason: {1}</p>""")\ @@ -456,7 +458,7 @@ ) return except XMLFatalParseError: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Import Highlighting Styles"), self.trUtf8("""<p>The highlighting styles file <b>{0}</b>""" """ has invalid contents.</p>""").format(fn))
--- a/Preferences/Shortcuts.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Preferences/Shortcuts.py Tue Aug 31 12:17:02 2010 +0200 @@ -13,6 +13,7 @@ from PyQt4.QtGui import * from E5Gui.E5Application import e5App +from E5Gui import E5MessageBox from Preferences import Prefs, syncPreferences @@ -195,7 +196,7 @@ try: import gzip except ImportError: - QMessageBox.critical(None, + E5MessageBox.critical(None, QApplication.translate("Shortcuts", "Export Keyboard Shortcuts"), QApplication.translate("Shortcuts", """Compressed keyboard shortcut files""" @@ -228,7 +229,7 @@ try: import gzip except ImportError: - QMessageBox.critical(None, + E5MessageBox.critical(None, QApplication.translate("Shortcuts", "Import Keyboard Shortcuts"), QApplication.translate("Shortcuts", """Compressed keyboard shortcut files""" @@ -245,7 +246,7 @@ finally: f.close() except IOError: - QMessageBox.critical(None, + E5MessageBox.critical(None, QApplication.translate("Shortcuts", "Import Keyboard Shortcuts"), QApplication.translate("Shortcuts", "<p>The keyboard shortcuts could not be read from file <b>{0}</b>.</p>") @@ -271,7 +272,7 @@ try: import gzip except ImportError: - QMessageBox.critical(None, + E5MessageBox.critical(None, QApplication.translate("Shortcuts", "Import Keyboard Shortcuts"), QApplication.translate("Shortcuts", """Compressed keyboard shortcut files""" @@ -292,7 +293,7 @@ finally: f.close() except IOError: - QMessageBox.critical(None, + E5MessageBox.critical(None, QApplication.translate("Shortcuts", "Import Keyboard Shortcuts"), QApplication.translate("Shortcuts", "<p>The keyboard shortcuts could not be read from file <b>{0}</b>.</p>") @@ -300,7 +301,7 @@ return False except XMLFatalParseError: - QMessageBox.critical(None, + E5MessageBox.critical(None, QApplication.translate("Shortcuts", "Import Keyboard Shortcuts"), QApplication.translate("Shortcuts", "<p>The keyboard shortcuts file <b>{0}</b> has invalid contents.</p>") @@ -398,4 +399,4 @@ if "HelpViewer" in shortcuts: __setAction(e5App().getObject("DummyHelpViewer").getActions(), - shortcuts["HelpViewer"]) + shortcuts["HelpViewer"]) \ No newline at end of file
--- a/Preferences/ToolConfigurationDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Preferences/ToolConfigurationDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -13,6 +13,7 @@ from PyQt4.QtGui import * from E5Gui.E5Completers import E5FileCompleter +from E5Gui import E5MessageBox from .Ui_ToolConfigurationDialog import Ui_ToolConfigurationDialog import Utilities @@ -94,21 +95,21 @@ redirect = self.redirectionModes[self.redirectCombo.currentIndex()][0] if not executable: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Add tool entry"), self.trUtf8("You have to set an executable to add to the" " Tools-Menu first.")) return if not menutext: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Add tool entry"), self.trUtf8("You have to insert a menuentry text to add the" " selected program to the Tools-Menu first.")) return if not Utilities.isinpath(executable): - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Add tool entry"), self.trUtf8("The selected file could not be found or" " is not an executable." @@ -116,7 +117,7 @@ return if len(self.toolsList.findItems(menutext, Qt.MatchFlags(Qt.MatchExactly))): - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Add tool entry"), self.trUtf8("An entry for the menu text {0} already exists.")\ .format(menutext)) @@ -148,21 +149,21 @@ redirect = self.redirectionModes[self.redirectCombo.currentIndex()][0] if not executable: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Change tool entry"), self.trUtf8("You have to set an executable to change the" " Tools-Menu entry.")) return if not menutext: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Change tool entry"), self.trUtf8("You have to insert a menuentry text to change the" " selected Tools-Menu entry.")) return if not Utilities.isinpath(executable): - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Change tool entry"), self.trUtf8("The selected file could not be found or" " is not an executable." @@ -254,7 +255,7 @@ if execfile: execfile = Utilities.toNativeSeparators(execfile) if not Utilities.isinpath(execfile): - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Select executable"), self.trUtf8("The selected file is not an executable." " Please choose an executable filename.")) @@ -387,4 +388,4 @@ """ tmp = self.toollist[itm1] self.toollist[itm1] = self.toollist[itm2] - self.toollist[itm2] = tmp + self.toollist[itm2] = tmp \ No newline at end of file
--- a/Preferences/ToolGroupConfigurationDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Preferences/ToolGroupConfigurationDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -12,6 +12,8 @@ from PyQt4.QtCore import * from PyQt4.QtGui import * +from E5Gui import E5MessageBox + from .Ui_ToolGroupConfigurationDialog import Ui_ToolGroupConfigurationDialog class ToolGroupConfigurationDialog(QDialog, Ui_ToolGroupConfigurationDialog): @@ -53,13 +55,13 @@ groupName = self.nameEdit.text() if not groupName: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Add tool group entry"), self.trUtf8("You have to give a name for the group to add.")) return if len(self.groupsList.findItems(groupName, Qt.MatchFlags(Qt.MatchExactly))): - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Add tool group entry"), self.trUtf8("An entry for the group name {0} already exists.")\ .format(groupName)) @@ -80,13 +82,13 @@ groupName = self.nameEdit.text() if not groupName: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Add tool group entry"), self.trUtf8("You have to give a name for the group to add.")) return if len(self.groupsList.findItems(groupName, Qt.MatchFlags(Qt.MatchExactly))): - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Add tool group entry"), self.trUtf8("An entry for the group name {0} already exists.")\ .format(groupName)) @@ -205,4 +207,4 @@ """ tmp = self.toolGroups[itm1] self.toolGroups[itm1] = self.toolGroups[itm2] - self.toolGroups[itm2] = tmp + self.toolGroups[itm2] = tmp \ No newline at end of file
--- a/Project/CreateDialogCodeDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Project/CreateDialogCodeDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -14,6 +14,7 @@ from PyQt4 import uic from E5Gui.E5Application import e5App +from E5Gui import E5MessageBox from .NewDialogClassDialog import NewDialogClassDialog from .Ui_CreateDialogCodeDialog import Ui_CreateDialogCodeDialog @@ -85,7 +86,7 @@ if os.path.exists(self.srcFile) and self.classNameCombo.count() == 0: self.__initError = True - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Create Dialog Code"), self.trUtf8("""The file <b>{0}</b> exists but does not contain""" """ any classes.""").format(self.srcFile)) @@ -112,7 +113,7 @@ dlg = uic.loadUi(self.formFile) return dlg.objectName() except AttributeError as err: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("uic error"), self.trUtf8("""<p>There was an error loading the form <b>{0}</b>.</p>""" """<p>{1}</p>""").format(self.formFile, str(err))) @@ -128,7 +129,7 @@ dlg = uic.loadUi(self.formFile) return dlg.metaObject().className() except AttributeError as err: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("uic error"), self.trUtf8("""<p>There was an error loading the form <b>{0}</b>.</p>""" """<p>{1}</p>""").format(self.formFile, str(err))) @@ -257,7 +258,7 @@ self.slotsView.sortByColumn(0, Qt.AscendingOrder) except (AttributeError, ImportError) as err: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("uic error"), self.trUtf8("""<p>There was an error loading the form <b>{0}</b>.</p>""" """<p>{1}</p>""").format(self.formFile, str(err))) @@ -299,7 +300,7 @@ template = tmplFile.read() tmplFile.close() except IOError as why: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Code Generation"), self.trUtf8("""<p>Could not open the code template file "{0}".</p>""" """<p>Reason: {1}</p>""")\ @@ -332,7 +333,7 @@ if not sourceImpl[-1].endswith("\n"): sourceImpl[-1] = "{0}{1}".format(sourceImpl[-1], "\n") except IOError as why: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Code Generation"), self.trUtf8("""<p>Could not open the source file "{0}".</p>""" """<p>Reason: {1}</p>""")\ @@ -391,7 +392,7 @@ srcFile.write("".join(sourceImpl)) srcFile.close() except IOError as why: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Code Generation"), self.trUtf8("""<p>Could not write the source file "{0}".</p>""" """<p>Reason: {1}</p>""")\ @@ -453,4 +454,4 @@ """ if button == self.okButton: self.__generateCode() - self.accept() + self.accept() \ No newline at end of file
--- a/Project/Project.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Project/Project.py Tue Aug 31 12:17:02 2010 +0200 @@ -275,7 +275,7 @@ a file """ if type_ in self.__projectTypes: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Registering Project Type"), self.trUtf8("""<p>The Project type <b>{0}</b> already exists.</p>""")\ .format(type_) @@ -579,7 +579,7 @@ import gzip except ImportError: QApplication.restoreOverrideCursor() - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Read project file"), self.trUtf8("""Compressed project files not supported.""" """ The compression library is missing.""")) @@ -594,7 +594,7 @@ f.close() except EnvironmentError: QApplication.restoreOverrideCursor() - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Read project file"), self.trUtf8("<p>The project file <b>{0}</b> could not be read.</p>")\ .format(fn)) @@ -613,7 +613,7 @@ # now read the file if not line.startswith('<?xml'): QApplication.restoreOverrideCursor() - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Read project file"), self.trUtf8("<p>The project file <b>{0}</b> has an unsupported" " format.</p>").format(fn)) @@ -697,7 +697,7 @@ import gzip except ImportError: QApplication.restoreOverrideCursor() - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Read project file"), self.trUtf8("""Compressed project files not supported.""" """ The compression library is missing.""")) @@ -718,14 +718,14 @@ f.close() except IOError: QApplication.restoreOverrideCursor() - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Read project file"), self.trUtf8("<p>The project file <b>{0}</b> could not be read.</p>")\ .format(fn)) return False except XMLFatalParseError: QApplication.restoreOverrideCursor() - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Read project file"), self.trUtf8("<p>The project file <b>{0}</b> has invalid contents.</p>")\ .format(fn)) @@ -789,7 +789,7 @@ try: import gzip except ImportError: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Save project file"), self.trUtf8("""Compressed project files not supported.""" """ The compression library is missing.""")) @@ -807,7 +807,7 @@ f.close() except IOError: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Save project file"), self.trUtf8("<p>The project file <b>{0}</b> could not be written.</p>")\ .format(fn)) @@ -848,7 +848,7 @@ finally: f.close() except IOError: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Read user project properties"), self.trUtf8("<p>The user specific project properties file <b>{0}</b>" " could not be read.</p>").format(fn)) @@ -876,7 +876,7 @@ f.close() except IOError: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Save user project properties"), self.trUtf8("<p>The user specific project properties file <b>{0}</b>" " could not be written.</p>").format(fn)) @@ -891,7 +891,7 @@ """ if self.pfile is None: if not quiet: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Read project session"), self.trUtf8("Please save the project first.")) return @@ -906,7 +906,7 @@ import gzip except ImportError: if not quiet: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Read project session"), self.trUtf8("""Compressed project session files not""" """ supported. The compression library is missing.""")) @@ -923,7 +923,7 @@ f.close() except EnvironmentError: if not quiet: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Read project session"), self.trUtf8("<p>The project session <b>{0}</b>" " could not be read.</p>")\ @@ -935,7 +935,7 @@ self.__readXMLSession(fn, dtdLine.startswith("<!DOCTYPE"), quiet) else: if not quiet: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Read project session"), self.trUtf8("<p>The project session <b>{0}</b> has an unsupported" " format.</p>").format(fn)) @@ -981,7 +981,7 @@ import gzip except ImportError: if not quiet: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Read project session"), self.trUtf8("<p>The project session <b>{0}</b> could not" " be read.</p>").format(fn)) @@ -1002,7 +1002,7 @@ f.close() except IOError: if not quiet: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Read project session"), self.trUtf8("<p>The project session file <b>{0}</b> could not be" " read.</p>").format(fn)) @@ -1035,7 +1035,7 @@ """ if self.pfile is None: if not quiet: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Save project session"), self.trUtf8("Please save the project first.")) return @@ -1050,7 +1050,7 @@ import gzip except ImportError: if not quiet: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Save project session"), self.trUtf8("""Compressed project session files not""" """ supported. The compression library is missing.""")) @@ -1071,7 +1071,7 @@ except IOError: if not quiet: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Save project session"), self.trUtf8("<p>The project session file <b>{0}</b> could not be" " written.</p>").format(fn)) @@ -1082,7 +1082,7 @@ """ if self.pfile is None: if not quiet: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Delete project session"), self.trUtf8("Please save the project first.")) return @@ -1095,7 +1095,7 @@ try: os.remove(fn) except OSError: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Delete project session"), self.trUtf8("<p>The project session file <b>{0}</b> could not be" " deleted.</p>").format(fn)) @@ -1105,7 +1105,7 @@ Private method to read in the project tasks file (.e4t) """ if self.pfile is None: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Read tasks"), self.trUtf8("Please save the project first.")) return @@ -1120,7 +1120,7 @@ try: import gzip except ImportError: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Read tasks"), self.trUtf8("""Compressed tasks files not supported.""" """ The compression library is missing.""")) @@ -1137,7 +1137,7 @@ dtdLine = f.readline() f.close() except EnvironmentError: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Read tasks"), self.trUtf8("<p>The tasks file <b>{0}</b> could not be read.</p>")\ .format(fn)) @@ -1147,7 +1147,7 @@ if line.startswith('<?xml'): self.__readXMLTasks(fn, dtdLine.startswith("<!DOCTYPE")) else: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Read project session"), self.trUtf8("<p>The tasks file <b>{0}</b> has an unsupported" " format.</p>")\ @@ -1179,7 +1179,7 @@ try: import gzip except ImportError: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Read tasks"), self.trUtf8("""Compressed tasks files not supported.""" """ The compression library is missing.""")) @@ -1199,7 +1199,7 @@ finally: f.close() except IOError: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Read tasks"), self.trUtf8("<p>The tasks file <b>{0}</b> could not be read.</p>")\ .format(fn)) @@ -1224,7 +1224,7 @@ try: import gzip except ImportError: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Save tasks"), self.trUtf8("""Compressed tasks files not supported.""" """ The compression library is missing.""")) @@ -1243,7 +1243,7 @@ f.close() except IOError: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Save tasks"), self.trUtf8("<p>The tasks file <b>{0}</b> could not be written.</p>") .format(fn)) @@ -1257,7 +1257,7 @@ """ if self.pfile is None: if not quiet: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Read debugger properties"), self.trUtf8("Please save the project first.")) return @@ -1271,7 +1271,7 @@ import gzip except ImportError: if not quiet: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Read debugger properties"), self.trUtf8("""Compressed project session files not""" """ supported. The compression library is""" @@ -1288,7 +1288,7 @@ f.close() except EnvironmentError: if not quiet: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Read debugger properties"), self.trUtf8("<p>The project debugger properties file <b>{0}</b> could" " not be read.</p>").format(fn)) @@ -1299,7 +1299,7 @@ self.__readXMLDebugProperties(fn, dtdLine.startswith("<!DOCTYPE"), quiet) else: if not quiet: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Read debugger properties"), self.trUtf8("<p>The project debugger properties file <b>{0}</b> has" " an unsupported format.</p>").format(fn)) @@ -1334,7 +1334,7 @@ import gzip except ImportError: if not quiet: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Read debugger properties"), self.trUtf8("<p>The project debugger properties file" " <b>{0}</b> could not be read.</p>").format(fn)) @@ -1359,7 +1359,7 @@ f.close() except IOError: if not quiet: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Read debugger properties"), self.trUtf8("<p>The project debugger properties file <b>{0}</b> could" " not be read.</p>") @@ -1380,7 +1380,7 @@ """ if self.pfile is None: if not quiet: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Save debugger properties"), self.trUtf8("Please save the project first.")) return @@ -1394,7 +1394,7 @@ import gzip except ImportError: if not quiet: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Save debugger properties"), self.trUtf8("""Compressed project debugger properties files""" """ not supported. The compression library is""" @@ -1416,7 +1416,7 @@ except IOError: if not quiet: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Save debugger properties"), self.trUtf8("<p>The project debugger properties file <b>{0}</b> could" " not be written.</p>") @@ -1428,7 +1428,7 @@ """ if self.pfile is None: if not quiet: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Delete debugger properties"), self.trUtf8("Please save the project first.")) return @@ -1441,7 +1441,7 @@ try: os.remove(fn) except OSError: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Delete debugger properties"), self.trUtf8("<p>The project debugger properties file <b>{0}</b>" " could not be deleted.</p>") @@ -1525,7 +1525,7 @@ ["Qt4", "Qt4C", "E4Plugin", "PySide", "PySideC"] and \ (len(self.pdata["TRANSLATIONPATTERN"]) == 0 or \ self.pdata["TRANSLATIONPATTERN"][0] == ''): - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Add Language"), self.trUtf8("You have to specify a translation pattern first.")) return @@ -1615,7 +1615,7 @@ if os.path.exists(fn): os.remove(fn) except IOError: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Delete translation"), self.trUtf8("<p>The selected translation file <b>{0}</b> could not be" " deleted.</p>").format(langFile)) @@ -1634,7 +1634,7 @@ if os.path.exists(fn): os.remove(fn) except IOError: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Delete translation"), self.trUtf8("<p>The selected translation file <b>{0}</b> could not be" " deleted.</p>").format(qmFile)) @@ -1767,7 +1767,7 @@ shutil.copy(fn, target) except IOError as why: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Add file"), self.trUtf8("<p>The selected file <b>{0}</b> could not be" " added to <b>{1}</b>.</p><p>Reason: {2}</p>") @@ -1776,7 +1776,7 @@ self.appendFile(targetfile, isSource or filter == 'source') else: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Add file"), self.trUtf8("The target directory must not be empty.")) @@ -1815,7 +1815,7 @@ try: os.makedirs(target) except IOError as why: - QMessageBox.critical(self.ui, + E5MessageBox.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>") @@ -1883,7 +1883,7 @@ if dlg.exec_() == QDialog.Accepted: filetype, source, target, recursive = dlg.getData() if target == '': - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Add directory"), self.trUtf8("The target directory must not be empty.")) return @@ -1893,7 +1893,7 @@ return if source == '': - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Add directory"), self.trUtf8("The source directory must not be empty.")) return @@ -2039,7 +2039,7 @@ try: os.rename(oldfn, newfn) except OSError as msg: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Rename File"), self.trUtf8("""<p>The file <b>{0}</b> could not be renamed.<br />""" """Reason: {1}</p>""").format(oldfn, str(msg))) @@ -2209,7 +2209,7 @@ if os.path.isfile(fn2): os.remove(fn2) except EnvironmentError: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Delete file"), self.trUtf8("<p>The selected file <b>{0}</b> could not be deleted.</p>") .format(fn)) @@ -2232,7 +2232,7 @@ try: shutil.rmtree(dn, True) except EnvironmentError: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Delete directory"), self.trUtf8("<p>The selected directory <b>{0}</b> could not be" " deleted.</p>").format(fn)) @@ -2311,7 +2311,7 @@ try: os.makedirs(self.ppath) except EnvironmentError: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Create project directory"), self.trUtf8("<p>The project directory <b>{0}</b> could not" " be created.</p>") @@ -3074,7 +3074,7 @@ filesWithSyntaxErrors += 1 if reportSyntaxErrors and filesWithSyntaxErrors > 0: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Syntax errors detected"), self.trUtf8("""The project contains %n file(s) with syntax errors.""", "", filesWithSyntaxErrors) @@ -4147,7 +4147,7 @@ if override: # override failed, revert to original QApplication.restoreOverrideCursor() - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Version Control System"), self.trUtf8("<p>The selected VCS <b>{0}</b> could not be found." "<br/>Reverting override.</p><p>{1}</p>")\ @@ -4156,7 +4156,7 @@ return self.initVCS(nooverride = True) QApplication.restoreOverrideCursor() - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Version Control System"), self.trUtf8("<p>The selected VCS <b>{0}</b> could not be found.<br/>" "Disabling version control.</p><p>{1}</p>")\ @@ -4248,7 +4248,7 @@ """ fn = self.getMainScript(True) if fn is None: - QMessageBox.critical(self.ui, + E5MessageBox.critical(self.ui, self.trUtf8("Coverage Data"), self.trUtf8("There is no main script defined for the" " current project. Aborting")) @@ -4294,7 +4294,7 @@ """ fn = self.getMainScript(True) if fn is None: - QMessageBox.critical(self.ui, + E5MessageBox.critical(self.ui, self.trUtf8("Profile Data"), self.trUtf8("There is no main script defined for the" " current project. Aborting")) @@ -4505,7 +4505,7 @@ pkglistFile.write("\n".join(lst)) pkglistFile.close() except IOError as why: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Create Package List"), self.trUtf8("""<p>The file <b>PKGLIST</b> could not be created.</p>""" """<p>Reason: {0}</p>""").format(str(why))) @@ -4522,7 +4522,7 @@ """ pkglist = os.path.join(self.ppath, "PKGLIST") if not os.path.exists(pkglist): - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Create Plugin Archive"), self.trUtf8("""<p>The file <b>PKGLIST</b> does not exist. """ """Aborting...</p>""")) @@ -4530,7 +4530,7 @@ if len(self.pdata["MAINSCRIPT"]) == 0 or \ len(self.pdata["MAINSCRIPT"][0]) == 0: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Create Plugin Archive"), self.trUtf8("""The project does not have a main script defined. """ """Aborting...""")) @@ -4542,7 +4542,7 @@ pkglistFile.close() names = sorted(names.splitlines()) except IOError as why: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Create Plugin Archive"), self.trUtf8("""<p>The file <b>PKGLIST</b> could not be read.</p>""" """<p>Reason: {0}</p>""").format(str(why))) @@ -4556,7 +4556,7 @@ except RuntimeError: archiveFile = zipfile.ZipFile(archive, "w") except IOError as why: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Create Plugin Archive"), self.trUtf8("""<p>The eric5 plugin archive file <b>{0}</b> could """ """not be created.</p>""" @@ -4576,7 +4576,7 @@ version = self.__pluginExtractVersion(\ os.path.join(self.ppath, self.pdata["MAINSCRIPT"][0])) except OSError as why: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Create Plugin Archive"), self.trUtf8("""<p>The file <b>{0}</b> could not be stored """ """in the archive. Ignoring it.</p>""" @@ -4631,7 +4631,7 @@ sourcelines, encoding = Utilities.readEncodedFile(filename) sourcelines = sourcelines.splitlines(True) except (IOError, UnicodeError) as why: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Create Plugin Archive"), self.trUtf8("""<p>The plugin file <b>{0}</b> could """ """not be read.</p>""" @@ -4668,7 +4668,7 @@ sourcelines = Utilities.readEncodedFile(filename)[0] sourcelines = sourcelines.splitlines(True) except (IOError, UnicodeError) as why: - QMessageBox.critical(None, + E5MessageBox.critical(self.ui, self.trUtf8("Create Plugin Archive"), self.trUtf8("""<p>The plugin file <b>{0}</b> could """ """not be read.</p>"""
--- a/Project/ProjectFormsBrowser.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Project/ProjectFormsBrowser.py Tue Aug 31 12:17:02 2010 +0200 @@ -525,7 +525,7 @@ try: shutil.copy(templateFile, fname) except IOError as e: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("New Form"), self.trUtf8("<p>The new form file <b>{0}</b> could not be created.<br>" "Problem: {1}</p>").format(fname, str(e))) @@ -701,7 +701,7 @@ self.compileRunning = False if progress is not None: progress.cancel() - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8('Process Generation Error'), self.trUtf8( 'Could not start {0}.<br>'
--- a/Project/ProjectInterfacesBrowser.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Project/ProjectInterfacesBrowser.py Tue Aug 31 12:17:02 2010 +0200 @@ -495,7 +495,7 @@ self.compileRunning = False if progress is not None: progress.cancel() - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8('Process Generation Error'), self.trUtf8( '<p>Could not start {0}.<br>'
--- a/Project/ProjectResourcesBrowser.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Project/ProjectResourcesBrowser.py Tue Aug 31 12:17:02 2010 +0200 @@ -429,7 +429,7 @@ rcfile.write('</RCC>\n') rcfile.close() except IOError as e: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("New Resource"), self.trUtf8("<p>The new resource file <b>{0}</b> could not" " be created.<br>Problem: {1}</p>")\ @@ -607,7 +607,7 @@ self.compileRunning = False if progress is not None: progress.cancel() - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8('Process Generation Error'), self.trUtf8( 'Could not start {0}.<br>'
--- a/Project/ProjectSourcesBrowser.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Project/ProjectSourcesBrowser.py Tue Aug 31 12:17:02 2010 +0200 @@ -12,6 +12,8 @@ from PyQt4.QtCore import * from PyQt4.QtGui import * +from E5Gui import E5MessageBox + from UI.BrowserModel import BrowserFileItem, BrowserClassItem, BrowserMethodItem, \ BrowserClassAttributeItem from UI.DeleteFilesConfirmationDialog import DeleteFilesConfirmationDialog @@ -571,7 +573,7 @@ try: os.mkdir(packagePath) except IOError as err: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Add new Python package"), self.trUtf8("""<p>The package directory <b>{0}</b> could""" """ not be created. Aborting...</p>""" @@ -584,7 +586,7 @@ f = open(packageFile, "w", encoding = "utf-8") f.close() except IOError as err: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Add new Python package"), self.trUtf8("""<p>The package file <b>{0}</b> could""" """ not be created. Aborting...</p>""" @@ -867,4 +869,4 @@ QMessageBox.Yes) self.applicationDiagram = ApplicationDiagram(self.project, self, noModules = (res != QMessageBox.Yes)) - self.applicationDiagram.show() + self.applicationDiagram.show() \ No newline at end of file
--- a/Project/ProjectTranslationsBrowser.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Project/ProjectTranslationsBrowser.py Tue Aug 31 12:17:02 2010 +0200 @@ -732,7 +732,7 @@ self.tmpProject = pfile return True except IOError: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Write temporary project file"), self.trUtf8("<p>The temporary project file <b>{0}</b> could not" " be written.</p>").format(pfile)) @@ -836,7 +836,7 @@ self.trUtf8("The generation of the translation files (*.ts)" " was successful.")) else: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Translation file generation"), self.trUtf8("The generation of the translation files (*.ts) has failed.")) self.pylupdateProc = None @@ -921,7 +921,7 @@ if procStarted: self.pylupdateProcRunning = True else: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8('Process Generation Error'), self.trUtf8( 'Could not start {0}.<br>' @@ -984,7 +984,7 @@ if os.path.exists(qmFile): shutil.move(qmFile, target) else: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Translation file release"), self.trUtf8("The release of the translation files (*.qm) has failed.")) self.lreleaseProc = None @@ -1050,7 +1050,7 @@ if procStarted: self.lreleaseProcRunning = True else: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8('Process Generation Error'), self.trUtf8( '<p>Could not start lrelease.<br>'
--- a/PyUnit/UnittestDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/PyUnit/UnittestDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -19,6 +19,7 @@ from E5Gui.E5Application import e5App from E5Gui.E5Completers import E5FileCompleter +from E5Gui import E5MessageBox from .Ui_UnittestDialog import Ui_UnittestDialog from .Ui_UnittestStacktraceDialog import Ui_UnittestStacktraceDialog @@ -210,7 +211,7 @@ prog = self.testsuiteComboBox.currentText() if not prog: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Unittest"), self.trUtf8("You must enter a test suite file.")) return @@ -257,7 +258,7 @@ test = unittest.defaultTestLoader.loadTestsFromModule(module) except: exc_type, exc_value, exc_tb = sys.exc_info() - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Unittest"), self.trUtf8("<p>Unable to run test <b>{0}</b>.<br>{1}<br>{2}</p>") .format(self.testName, str(exc_type), str(exc_value))) @@ -306,7 +307,7 @@ @param exc_value value of exception occured during preparation (string) """ if nrTests == 0: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Unittest"), self.trUtf8("<p>Unable to run test <b>{0}</b>.<br>{1}<br>{2}</p>") .format(self.testName, exc_type, exc_value)) @@ -590,4 +591,4 @@ QApplication.exit() return True - return False + return False \ No newline at end of file
--- a/QScintilla/Editor.py Mon Aug 30 20:16:34 2010 +0200 +++ b/QScintilla/Editor.py Tue Aug 31 12:17:02 2010 +0200 @@ -1078,13 +1078,13 @@ if exporter: exporter.exportSource() else: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Export source"), self.trUtf8("""<p>No exporter available for the """ """export format <b>{0}</b>. Aborting...</p>""")\ .format(exporterFormat)) else: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Export source"), self.trUtf8("""No export format given. Aborting...""")) @@ -2235,7 +2235,7 @@ txt, self.encoding = Utilities.readEncodedFile(fn) except (UnicodeDecodeError, IOError) as why: QApplication.restoreOverrideCursor() - QMessageBox.critical(self.vm, self.trUtf8('Open File'), + E5MessageBox.critical(self.vm, self.trUtf8('Open File'), self.trUtf8('<p>The file <b>{0}</b> could not be opened.</p>' '<p>Reason: {1}</p>') .format(fn, str(why))) @@ -2333,7 +2333,7 @@ os.chmod(fn, permissions) return True except (IOError, Utilities.CodingError, UnicodeError) as why: - QMessageBox.critical(self, self.trUtf8('Save File'), + E5MessageBox.critical(self, self.trUtf8('Save File'), self.trUtf8('<p>The file <b>{0}</b> could not be saved.<br/>' 'Reason: {1}</p>') .format(fn, str(why))) @@ -4417,12 +4417,12 @@ for handle in list(self.syntaxerrors.keys()): if self.markerLine(handle) == line: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Syntax Error"), self.syntaxerrors[handle]) break else: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Syntax Error"), self.trUtf8("No syntax error message available.")) @@ -4603,14 +4603,14 @@ lines = f.readlines() f.close() except IOError: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Error loading macro"), self.trUtf8("<p>The macro file <b>{0}</b> could not be read.</p>") .format(fname)) return if len(lines) != 2: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Error loading macro"), self.trUtf8("<p>The macro file <b>{0}</b> is corrupt.</p>") .format(fname)) @@ -4664,7 +4664,7 @@ f.write(self.macros[name].save()) f.close() except IOError: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Error saving macro"), self.trUtf8("<p>The macro file <b>{0}</b> could not be written.</p>") .format(fname))
--- a/QScintilla/Exporters/ExporterHTML.py Mon Aug 30 20:16:34 2010 +0200 +++ b/QScintilla/Exporters/ExporterHTML.py Tue Aug 31 12:17:02 2010 +0200 @@ -16,6 +16,8 @@ from PyQt4.QtGui import * from PyQt4.Qsci import QsciScintilla +from E5Gui import E5MessageBox + from .ExporterBase import ExporterBase import Preferences @@ -391,11 +393,11 @@ f.close() except IOError as err: QApplication.restoreOverrideCursor() - QMessageBox.critical(self.editor, + E5MessageBox.critical(self.editor, self.trUtf8("Export source"), self.trUtf8(\ """<p>The source could not be exported to <b>{0}</b>.</p>""" """<p>Reason: {1}</p>""")\ .format(filename, str(err))) finally: - QApplication.restoreOverrideCursor() + QApplication.restoreOverrideCursor() \ No newline at end of file
--- a/QScintilla/Exporters/ExporterODT.py Mon Aug 30 20:16:34 2010 +0200 +++ b/QScintilla/Exporters/ExporterODT.py Tue Aug 31 12:17:02 2010 +0200 @@ -8,8 +8,9 @@ """ from PyQt4.QtCore import Qt -from PyQt4.QtGui import QApplication, QCursor, QTextDocument, QTextDocumentWriter, \ - QMessageBox +from PyQt4.QtGui import QApplication, QCursor, QTextDocument, QTextDocumentWriter + +from E5Gui import E5MessageBox from .ExporterBase import ExporterBase from .ExporterHTML import HTMLGenerator @@ -65,7 +66,7 @@ ok = writer.write(doc) QApplication.restoreOverrideCursor() if not ok: - QMessageBox.critical(self.editor, + E5MessageBox.critical(self.editor, self.trUtf8("Export source"), self.trUtf8(\ """<p>The source could not be exported to <b>{0}</b>.</p>""")\
--- a/QScintilla/Exporters/ExporterPDF.py Mon Aug 30 20:16:34 2010 +0200 +++ b/QScintilla/Exporters/ExporterPDF.py Tue Aug 31 12:17:02 2010 +0200 @@ -15,6 +15,8 @@ from PyQt4.QtGui import * from PyQt4.Qsci import QsciScintilla +from E5Gui import E5MessageBox + from .ExporterBase import ExporterBase import Preferences @@ -578,11 +580,11 @@ f.close() except IOError as err: QApplication.restoreOverrideCursor() - QMessageBox.critical(self.editor, + E5MessageBox.critical(self.editor, self.trUtf8("Export source"), self.trUtf8( """<p>The source could not be exported to <b>{0}</b>.</p>""" """<p>Reason: {1}</p>""")\ .format(filename, str(err))) finally: - QApplication.restoreOverrideCursor() + QApplication.restoreOverrideCursor() \ No newline at end of file
--- a/QScintilla/Exporters/ExporterRTF.py Mon Aug 30 20:16:34 2010 +0200 +++ b/QScintilla/Exporters/ExporterRTF.py Tue Aug 31 12:17:02 2010 +0200 @@ -16,6 +16,8 @@ from PyQt4.QtGui import * from PyQt4.Qsci import QsciScintilla +from E5Gui import E5MessageBox + from .ExporterBase import ExporterBase import Preferences @@ -334,11 +336,11 @@ f.close() except IOError as err: QApplication.restoreOverrideCursor() - QMessageBox.critical(self.editor, + E5MessageBox.critical(self.editor, self.trUtf8("Export source"), self.trUtf8( """<p>The source could not be exported to <b>{0}</b>.</p>""" """<p>Reason: {1}</p>""")\ .format(filename, str(err))) finally: - QApplication.restoreOverrideCursor() + QApplication.restoreOverrideCursor() \ No newline at end of file
--- a/QScintilla/Exporters/ExporterTEX.py Mon Aug 30 20:16:34 2010 +0200 +++ b/QScintilla/Exporters/ExporterTEX.py Tue Aug 31 12:17:02 2010 +0200 @@ -16,6 +16,8 @@ from PyQt4.QtGui import * from PyQt4.Qsci import QsciScintilla +from E5Gui import E5MessageBox + from .ExporterBase import ExporterBase import Preferences @@ -253,11 +255,11 @@ f.close() except IOError as err: QApplication.restoreOverrideCursor() - QMessageBox.critical(self.editor, + E5MessageBox.critical(self.editor, self.trUtf8("Export source"), self.trUtf8(\ """<p>The source could not be exported to <b>{0}</b>.</p>""" """<p>Reason: {1}</p>""")\ .format(filename, str(err))) finally: - QApplication.restoreOverrideCursor() + QApplication.restoreOverrideCursor() \ No newline at end of file
--- a/QScintilla/MiniEditor.py Mon Aug 30 20:16:34 2010 +0200 +++ b/QScintilla/MiniEditor.py Tue Aug 31 12:17:02 2010 +0200 @@ -15,6 +15,7 @@ from PyQt4.Qsci import QsciScintilla from E5Gui.E5Action import E5Action, createActionGroup +from E5Gui import E5MessageBox from . import Lexers from .QsciScintillaCompat import QsciScintillaCompat @@ -1503,7 +1504,7 @@ txt, self.encoding = Utilities.readEncodedFile(fileName) except (UnicodeDecodeError, IOError) as why: QApplication.restoreOverrideCursor() - QMessageBox.critical(self, self.trUtf8('Open File'), + E5MessageBox.critical(self, self.trUtf8('Open File'), self.trUtf8('<p>The file <b>{0}</b> could not be opened.</p>' '<p>Reason: {1}</p>') .format(fileName, str(why))) @@ -1536,7 +1537,7 @@ try: self.encoding = Utilities.writeEncodedFile(fileName, txt, self.encoding) except (IOError, Utilities.CodingError, UnicodeError) as why: - QMessageBox.critical(self, self.trUtf8('Save File'), + E5MessageBox.critical(self, self.trUtf8('Save File'), self.trUtf8('<p>The file <b>{0}</b> could not be saved.<br/>' 'Reason: {1}</p>') .format(fileName, str(why))) @@ -2286,4 +2287,4 @@ fileEol = self.__textEdit.detectEolString(txt) self.__textEdit.setEolModeByEolString(fileEol) - self.__textEdit.setModified(False) + self.__textEdit.setModified(False) \ No newline at end of file
--- a/Templates/TemplateViewer.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Templates/TemplateViewer.py Tue Aug 31 12:17:02 2010 +0200 @@ -100,7 +100,7 @@ """ if name in self.entries: if not quiet: - QMessageBox.critical(None, + E5MessageBox.critical(None, QApplication.translate("TemplateGroup", "Add Template"), QApplication.translate("TemplateGroup", """<p>The group <b>{0}</b> already contains a""" @@ -871,7 +871,7 @@ f.close() except IOError: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Save templates"), self.trUtf8("<p>The templates file <b>{0}</b> could not be written.</p>") .format(filename)) @@ -892,7 +892,7 @@ dtdLine = f.readline() f.close() except IOError: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Read templates"), self.trUtf8("<p>The templates file <b>{0}</b> could not be read.</p>") .format(filename)) @@ -921,7 +921,7 @@ finally: f.close() except IOError: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Read templates"), self.trUtf8("<p>The templates file <b>{0}</b> could not be read.</p>") .format(filename)) @@ -931,7 +931,7 @@ eh.showParseMessages() else: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Read templates"), self.trUtf8("<p>The templates file <b>{0}</b> has an" " unsupported format.</p>")
--- a/Tools/TrayStarter.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Tools/TrayStarter.py Tue Aug 31 12:17:02 2010 +0200 @@ -13,6 +13,8 @@ from PyQt4.QtCore import QProcess, QSettings, QFileInfo from PyQt4.QtGui import QSystemTrayIcon, QMenu, qApp, QCursor, QMessageBox +from E5Gui import E5MessageBox + import Globals import UI.PixmapCache @@ -193,7 +195,7 @@ args.append(arg) if not os.path.isfile(applPath) or not proc.startDetached(sys.executable, args): - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8('Process Generation Error'), self.trUtf8( '<p>Could not start the process.<br>' @@ -381,4 +383,4 @@ """ filename = act.data() if filename: - self.__startProc("eric5.py", filename) + self.__startProc("eric5.py", filename) \ No newline at end of file
--- a/Tools/UIPreviewer.py Mon Aug 30 20:16:34 2010 +0200 +++ b/Tools/UIPreviewer.py Tue Aug 31 12:17:02 2010 +0200 @@ -11,11 +11,12 @@ from PyQt4.QtGui import * from PyQt4 import uic +from E5Gui import E5MessageBox + import Preferences import UI.PixmapCache import UI.Config - class UIPreviewer(QMainWindow): """ Class implementing the UI Previewer main window. @@ -412,7 +413,7 @@ Private slot to handle the Save Image menu action. """ if self.mainWidget is None: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Save Image"), self.trUtf8("""There is no UI file loaded.""")) return @@ -440,7 +441,7 @@ pix = QPixmap.grabWidget(self.mainWidget) self.__updateChildren(self.lastStyle) if not pix.save(fname, str(ext)): - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Save Image"), self.trUtf8("""<p>The file <b>{0}</b> could not be saved.</p>""") .format(fname)) @@ -450,7 +451,7 @@ Private slot to handle the Copy Image menu action. """ if self.mainWidget is None: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Save Image"), self.trUtf8("""There is no UI file loaded.""")) return @@ -464,7 +465,7 @@ Private slot to handle the Print Image menu action. """ if self.mainWidget is None: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Print Image"), self.trUtf8("""There is no UI file loaded.""")) return @@ -503,7 +504,7 @@ from PyQt4.QtGui import QPrintPreviewDialog if self.mainWidget is None: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Print Preview"), self.trUtf8("""There is no UI file loaded.""")) return @@ -549,4 +550,4 @@ p.drawImage(marginX, marginY, img.scaled(width, height, Qt.KeepAspectRatio, Qt.SmoothTransformation)) - p.end() + p.end() \ No newline at end of file
--- a/UI/CompareDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/UI/CompareDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -14,6 +14,7 @@ from PyQt4.QtGui import * from E5Gui.E5Completers import E5FileCompleter +from E5Gui import E5MessageBox import UI.PixmapCache @@ -219,7 +220,7 @@ lines1 = f1.readlines() f1.close() except IOError: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Compare Files"), self.trUtf8("""<p>The file <b>{0}</b> could not be read.</p>""") .format(filename1)) @@ -231,7 +232,7 @@ lines2 = f2.readlines() f2.close() except IOError: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Compare Files"), self.trUtf8("""<p>The file <b>{0}</b> could not be read.</p>""") .format(filename2)) @@ -449,4 +450,4 @@ QApplication.exit() return True - return False + return False \ No newline at end of file
--- a/UI/DiffDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/UI/DiffDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -14,6 +14,7 @@ from PyQt4.QtGui import * from E5Gui.E5Completers import E5FileCompleter +from E5Gui import E5MessageBox from .Ui_DiffDialog import Ui_DiffDialog import Utilities @@ -306,7 +307,7 @@ pass f.close() except IOError as why: - QMessageBox.critical(self, self.trUtf8('Save Diff'), + E5MessageBox.critical(self, self.trUtf8('Save Diff'), self.trUtf8('<p>The patch file <b>{0}</b> could not be saved.<br />' 'Reason: {1}</p>') .format(fname, str(why))) @@ -326,7 +327,7 @@ lines1 = f1.readlines() f1.close() except IOError: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Compare Files"), self.trUtf8("""<p>The file <b>{0}</b> could not be read.</p>""") .format(self.filename1)) @@ -342,7 +343,7 @@ lines2 = f2.readlines() f2.close() except IOError: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Compare Files"), self.trUtf8("""<p>The file <b>{0}</b> could not be read.</p>""") .format(self.filename2)) @@ -511,4 +512,4 @@ QApplication.exit() return True - return False + return False \ No newline at end of file
--- a/UI/EmailDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/UI/EmailDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -15,6 +15,8 @@ from PyQt4.QtCore import * from PyQt4.QtGui import * +from E5Gui import E5MessageBox + from .Ui_EmailDialog import Ui_EmailDialog from .Info import BugAddress, FeatureAddress @@ -288,7 +290,7 @@ server.login(Preferences.getUser("MailServerUser"), password) except (smtplib.SMTPException, socket.error) as e: - res = QMessageBox.critical(self, + res = E5MessageBox.critical(self, self.trUtf8("Send bug report"), self.trUtf8("""<p>Authentication failed.<br>Reason: {0}</p>""") .format(str(e)), @@ -308,7 +310,7 @@ QApplication.restoreOverrideCursor() except (smtplib.SMTPException, socket.error) as e: QApplication.restoreOverrideCursor() - res = QMessageBox.critical(self, + res = E5MessageBox.critical(self, self.trUtf8("Send bug report"), self.trUtf8("""<p>Message could not be sent.<br>Reason: {0}</p>""") .format(str(e)), @@ -380,4 +382,4 @@ """ self.sendButton.setEnabled(\ self.subject.text() != "" and \ - self.message.toPlainText() != "") + self.message.toPlainText() != "") \ No newline at end of file
--- a/UI/FindFileDialog.py Mon Aug 30 20:16:34 2010 +0200 +++ b/UI/FindFileDialog.py Tue Aug 31 12:17:02 2010 +0200 @@ -14,6 +14,7 @@ from PyQt4.QtGui import * from E5Gui.E5Application import e5App +from E5Gui import E5MessageBox from .Ui_FindFileDialog import Ui_FindFileDialog @@ -332,7 +333,7 @@ try: search = re.compile(txt, flags) except re.error as why: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Invalid search expression"), self.trUtf8("""<p>The search expression is not valid.</p>""" """<p>Error: {0}</p>""").format(str(why))) @@ -554,7 +555,7 @@ text, encoding = Utilities.readEncodedFile(fn) lines = text.splitlines() except (UnicodeError, IOError): - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Replace in Files"), self.trUtf8("""<p>Could not read the file <b>{0}</b>.""" """ Skipping it.</p><p>Reason: {1}</p>""")\ @@ -577,7 +578,7 @@ try: Utilities.writeEncodedFile(fn, txt, encoding) except (IOError, Utilities.CodingError, UnicodeError) as err: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Replace in Files"), self.trUtf8("""<p>Could not save the file <b>{0}</b>.""" """ Skipping it.</p><p>Reason: {1}</p>""")\ @@ -625,4 +626,4 @@ fn = itm.text(0) cb = QApplication.clipboard() - cb.setText(fn) + cb.setText(fn) \ No newline at end of file
--- a/UI/UserInterface.py Mon Aug 30 20:16:34 2010 +0200 +++ b/UI/UserInterface.py Tue Aug 31 12:17:02 2010 +0200 @@ -18,8 +18,6 @@ from PyQt4.QtNetwork import QNetworkProxyFactory, QNetworkAccessManager, \ QNetworkRequest, QNetworkReply -from E5Gui.E5Application import e5App - from Debugger.DebugUI import DebugUI from Debugger.DebugServer import DebugServer from Debugger.DebugViewer import DebugViewer @@ -80,6 +78,7 @@ from E5Gui.E5ToolBox import E5VerticalToolBox, E5HorizontalToolBox from E5Gui.E5SideBar import E5SideBar from E5Gui import E5MessageBox +from E5Gui.E5Application import e5App from VCS.StatusMonitorLed import StatusMonitorLed @@ -2729,7 +2728,7 @@ else: if Preferences.getUser("Email") == "" or \ Preferences.getUser("MailServer") == "": - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Report Bug"), self.trUtf8("""Email address or mail server address is empty.""" """ Please configure your Email settings in the""" @@ -3944,7 +3943,7 @@ else: prog = fn else: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8("Unittest Project"), self.trUtf8("There is no main script defined for the" " current project. Aborting")) @@ -4002,14 +4001,14 @@ if os.path.isfile(fn) and os.path.getsize(fn): args.append(fn) else: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8('Problem'), self.trUtf8('<p>The file <b>{0}</b> does not exist or' ' is zero length.</p>') .format(fn)) return except EnvironmentError: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8('Problem'), self.trUtf8('<p>The file <b>{0}</b> does not exist or' ' is zero length.</p>') @@ -4026,7 +4025,7 @@ proc = QProcess() if not proc.startDetached(designer, args): - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8('Process Generation Error'), self.trUtf8( '<p>Could not start Qt-Designer.<br>' @@ -4059,14 +4058,14 @@ if os.path.isfile(fn) and os.path.getsize(fn) and fn not in args: args.append(fn) else: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8('Problem'), self.trUtf8('<p>The file <b>{0}</b> does not exist or' ' is zero length.</p>') .format(fn)) return except EnvironmentError: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8('Problem'), self.trUtf8('<p>The file <b>{0}</b> does not exist or' ' is zero length.</p>') @@ -4083,7 +4082,7 @@ proc = QProcess() if not proc.startDetached(linguist, args): - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8('Process Generation Error'), self.trUtf8( '<p>Could not start Qt-Linguist.<br>' @@ -4127,7 +4126,7 @@ proc = QProcess() if not proc.startDetached(assistant, args): - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8('Process Generation Error'), self.trUtf8( '<p>Could not start Qt-Assistant.<br>' @@ -4168,7 +4167,7 @@ args.append(home) if not proc.startDetached(customViewer, args): - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8('Process Generation Error'), self.trUtf8( '<p>Could not start custom viewer.<br>' @@ -4187,7 +4186,7 @@ args.append(home) if not proc.startDetached("hh", args): - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8('Process Generation Error'), self.trUtf8( '<p>Could not start the help viewer.<br>' @@ -4212,14 +4211,14 @@ if os.path.isfile(fn) and os.path.getsize(fn): args.append(fn) else: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8('Problem'), self.trUtf8('<p>The file <b>{0}</b> does not exist or' ' is zero length.</p>') .format(fn)) return except EnvironmentError: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8('Problem'), self.trUtf8('<p>The file <b>{0}</b> does not exist or' ' is zero length.</p>') @@ -4227,7 +4226,7 @@ return if not os.path.isfile(viewer) or not proc.startDetached(sys.executable, args): - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8('Process Generation Error'), self.trUtf8( '<p>Could not start UI Previewer.<br>' @@ -4256,7 +4255,7 @@ args.append(fn) else: if not ignore: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8('Problem'), self.trUtf8('<p>The file <b>{0}</b> does not exist or' ' is zero length.</p>') @@ -4264,7 +4263,7 @@ return except EnvironmentError: if not ignore: - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8('Problem'), self.trUtf8('<p>The file <b>{0}</b> does not exist or' ' is zero length.</p>') @@ -4272,7 +4271,7 @@ return if not os.path.isfile(viewer) or not proc.startDetached(sys.executable, args): - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8('Process Generation Error'), self.trUtf8( '<p>Could not start Translation Previewer.<br>' @@ -4291,7 +4290,7 @@ args.append(browser) if not os.path.isfile(browser) or not proc.startDetached(sys.executable, args): - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8('Process Generation Error'), self.trUtf8( '<p>Could not start SQL Browser.<br>' @@ -4397,7 +4396,7 @@ proc.start(program, args) if not proc.waitForStarted(): - QMessageBox.critical(self, + E5MessageBox.critical(self, self.trUtf8('Process Generation Error'), self.trUtf8( '<p>Could not start the tool entry <b>{0}</b>.<br>' @@ -4907,7 +4906,7 @@ res = Shortcuts.exportShortcuts(fn) if not res: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Export Keyboard Shortcuts"), self.trUtf8("<p>The keyboard shortcuts could not be written to file" " <b>{0}</b>.</p>").format(fn)) @@ -5040,7 +5039,7 @@ f.close() except IOError: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Save tasks"), self.trUtf8("<p>The tasks file <b>{0}</b> could not be written.</p>") .format(fn)) @@ -5058,7 +5057,7 @@ dtdLine = f.readline() f.close() except IOError: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Read tasks"), self.trUtf8("<p>The tasks file <b>{0}</b> could not be read.</p>") .format(fn)) @@ -5087,7 +5086,7 @@ finally: f.close() except IOError: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Read tasks"), self.trUtf8("<p>The tasks file <b>{0}</b> could not be read.</p>")\ .format(fn)) @@ -5097,10 +5096,10 @@ eh.showParseMessages() else: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Read tasks"), - self.trUtf8("<p>The tasks file <b>{0}</b> has an unsupported format.</p>")\ - .format(fn)) + self.trUtf8("<p>The tasks file <b>{0}</b> has an unsupported" + " format.</p>").format(fn)) def __writeSession(self): """ @@ -5115,7 +5114,7 @@ f.close() except IOError: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Save session"), self.trUtf8("<p>The session file <b>{0}</b> could not be written.</p>") .format(fn)) @@ -5127,7 +5126,7 @@ try: fn = os.path.join(Utilities.getConfigDir(), "eric5session.e4s") if not os.path.exists(fn): - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Read session"), self.trUtf8("<p>The session file <b>{0}</b> could not be read.</p>")\ .format(fn)) @@ -5137,7 +5136,7 @@ dtdLine = f.readline() f.close() except IOError: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Read session"), self.trUtf8("<p>The session file <b>{0}</b> could not be read.</p>")\ .format(fn)) @@ -5166,7 +5165,7 @@ finally: f.close() except IOError: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Read session"), self.trUtf8("<p>The session file <b>{0}</b> could not be read.</p>")\ .format(fn)) @@ -5176,7 +5175,7 @@ eh.showParseMessages() else: - QMessageBox.critical(None, + E5MessageBox.critical(self, self.trUtf8("Read session"), self.trUtf8("<p>The session file <b>{0}</b> has an unsupported" " format.</p>").format(fn))
--- a/VCS/ProjectHelper.py Mon Aug 30 20:16:34 2010 +0200 +++ b/VCS/ProjectHelper.py Tue Aug 31 12:17:02 2010 +0200 @@ -14,13 +14,12 @@ from PyQt4.QtCore import * from PyQt4.QtGui import * -from E5Gui.E5Application import e5App - from .CommandOptionsDialog import vcsCommandOptionsDialog from .RepositoryInfoDialog import VcsRepositoryInfoDialog from E5Gui.E5Action import E5Action from E5Gui import E5MessageBox +from E5Gui.E5Application import e5App import Preferences @@ -173,7 +172,7 @@ try: os.makedirs(projectdir) except EnvironmentError: - QMessageBox.critical(self.parent(), + E5MessageBox.critical(self.parent(), self.trUtf8("Create project directory"), self.trUtf8("<p>The project directory <b>{0}</b> could not" " be created.</p>").format(projectdir)) @@ -255,7 +254,7 @@ if res == QMessageBox.Yes: self.project.vcs.vcsAdd(self.project.pfile) else: - QMessageBox.critical(self.parent(), + E5MessageBox.critical(self.parent(), self.trUtf8("New project from repository"), self.trUtf8("""The project could not be retrieved from""" """ the repository.""")) @@ -470,4 +469,4 @@ """ info = self.vcs.vcsRepositoryInfos(self.project.ppath) dlg = VcsRepositoryInfoDialog(None, info) - dlg.exec_() + dlg.exec_() \ No newline at end of file
--- a/VCS/VersionControl.py Mon Aug 30 20:16:34 2010 +0200 +++ b/VCS/VersionControl.py Tue Aug 31 12:17:02 2010 +0200 @@ -12,7 +12,9 @@ from PyQt4.QtCore import QObject, QThread, QMutex, QProcess, \ Qt, pyqtSignal -from PyQt4.QtGui import QApplication, QMessageBox +from PyQt4.QtGui import QApplication + +from E5Gui import E5MessageBox import Preferences @@ -34,7 +36,7 @@ canBeCommitted = 1 # Indicates that a file/directory is in the vcs. canBeAdded = 2 # Indicates that a file/directory is not in vcs. - def __init__(self, parent=None, name=None): + def __init__(self, parent = None, name = None): """ Constructor @@ -528,7 +530,7 @@ proc.start(program, arguments) procStarted = proc.waitForStarted() if not procStarted: - QMessageBox.critical(None, + E5MessageBox.critical(None, self.trUtf8('Process Generation Error'), self.trUtf8( 'The process {0} could not be started. '