Tue, 31 Aug 2010 13:23:27 +0200
Continued replacing QMessageBox methods with own methods.
--- a/Cooperation/ChatWidget.py Tue Aug 31 12:36:10 2010 +0200 +++ b/Cooperation/ChatWidget.py Tue Aug 31 13:23:27 2010 +0200 @@ -544,7 +544,7 @@ if ex: fname += ex if QFileInfo(fname).exists(): - res = QMessageBox.warning(self, + res = E5MessageBox.warning(self, self.trUtf8("Save Chat"), self.trUtf8("<p>The file <b>{0}</b> already exists.</p>") .format(fname),
--- a/DataViews/PyProfileDialog.py Tue Aug 31 12:36:10 2010 +0200 +++ b/DataViews/PyProfileDialog.py Tue Aug 31 13:23:27 2010 +0200 @@ -208,7 +208,7 @@ fname = "{0}.profile".format(self.basename) if not os.path.exists(fname): - QMessageBox.warning(None, + E5MessageBox.warning(self, self.trUtf8("Profile Results"), self.trUtf8("""<p>There is no profiling data""" """ available for <b>{0}</b>.</p>""")
--- a/Debugger/DebugServer.py Tue Aug 31 12:36:10 2010 +0200 +++ b/Debugger/DebugServer.py Tue Aug 31 13:23:27 2010 +0200 @@ -14,6 +14,7 @@ from PyQt4.QtNetwork import QTcpServer, QHostAddress, QHostInfo from E5Gui.E5Application import e5App +from E5Gui import E5MessageBox from .BreakPointModel import BreakPointModel from .WatchPointModel import WatchPointModel @@ -566,7 +567,7 @@ peerAddress = sock.peerAddress().toString() if peerAddress not in Preferences.getDebugger("AllowedHosts"): # the peer is not allowed to connect - res = QMessageBox.warning(None, + res = E5MessageBox.warning(None, self.trUtf8("Connection from illegal host"), self.trUtf8("""<p>A connection was attempted by the""" """ illegal host <b>{0}</b>. Accept this connection?</p>""")\ @@ -1276,4 +1277,4 @@ @return flag indicating a connection (boolean) """ - return self.debuggerInterface and self.debuggerInterface.isConnected() + return self.debuggerInterface and self.debuggerInterface.isConnected() \ No newline at end of file
--- a/Debugger/DebugUI.py Tue Aug 31 12:36:10 2010 +0200 +++ b/Debugger/DebugUI.py Tue Aug 31 13:23:27 2010 +0200 @@ -1191,7 +1191,7 @@ """ for the variable <b>{1}</b> already exists.</p>""")\ .format(special, Utilities.html_encode(cond)) - QMessageBox.warning(None, + E5MessageBox.warning(self, self.trUtf8("Watch expression already exists"), msg) model.deleteWatchPointByIndex(index)
--- a/Debugger/WatchPointViewer.py Tue Aug 31 12:36:10 2010 +0200 +++ b/Debugger/WatchPointViewer.py Tue Aug 31 13:23:27 2010 +0200 @@ -11,6 +11,7 @@ from PyQt4.QtGui import * from E5Gui.E5Application import e5App +from E5Gui import E5MessageBox from .EditWatchpointDialog import EditWatchpointDialog @@ -226,7 +227,7 @@ msg = self.trUtf8("""<p>A watch expression '<b>{0}</b>'""" """ for the variable <b>{1}</b> already exists.</p>""")\ .format(special, Utilities.html_encode(cond)) - QMessageBox.warning(None, + E5MessageBox.warning(self, self.trUtf8("Watch expression already exists"), msg) @@ -409,4 +410,4 @@ """ Private method to open the configuration dialog. """ - e5App().getObject("UserInterface").showPreferences("debuggerGeneralPage") + e5App().getObject("UserInterface").showPreferences("debuggerGeneralPage") \ No newline at end of file
--- a/Graphics/PixmapDiagram.py Tue Aug 31 12:36:10 2010 +0200 +++ b/Graphics/PixmapDiagram.py Tue Aug 31 13:23:27 2010 +0200 @@ -10,6 +10,8 @@ from PyQt4.QtCore import * from PyQt4.QtGui import * +from E5Gui import E5MessageBox + from .ZoomDialog import ZoomDialog import UI.Config @@ -154,7 +156,7 @@ """ image = QImage(filename) if image.isNull(): - QMessageBox.warning(self, + E5MessageBox.warning(self, self.trUtf8("Pixmap-Viewer"), self.trUtf8("""<p>The file <b>{0}</b> cannot be displayed.""" """ The format is not supported.</p>""").format(filename)) @@ -323,4 +325,4 @@ painter.setViewport(marginX + 5, marginY + 5, size.width(), size.height()) painter.setWindow(self.pixmapLabel.pixmap().rect()) painter.drawPixmap(0, 0, self.pixmapLabel.pixmap()) - painter.end() + painter.end() \ No newline at end of file
--- a/Graphics/UMLGraphicsView.py Tue Aug 31 12:36:10 2010 +0200 +++ b/Graphics/UMLGraphicsView.py Tue Aug 31 13:23:27 2010 +0200 @@ -337,7 +337,7 @@ if ex: fname += ex if QFileInfo(fname).exists(): - res = QMessageBox.warning(self, + res = E5MessageBox.warning(self, self.trUtf8("Save Diagram"), self.trUtf8("<p>The file <b>{0}</b> already exists.</p>") .format(fname),
--- a/Helpviewer/AdBlock/AdBlockSubscription.py Tue Aug 31 12:36:10 2010 +0200 +++ b/Helpviewer/AdBlock/AdBlockSubscription.py Tue Aug 31 13:23:27 2010 +0200 @@ -13,6 +13,8 @@ from PyQt4.QtNetwork import QNetworkRequest, QNetworkReply from PyQt4.QtGui import QMessageBox +from E5Gui import E5MessageBox + from .AdBlockRule import AdBlockRule import Helpviewer.HelpWindow @@ -199,7 +201,7 @@ f = QFile(fileName) if f.exists(): if not f.open(QIODevice.ReadOnly): - QMessageBox.warning(None, + E5MessageBox.warning(None, self.trUtf8("Load subscription rules"), self.trUtf8("""Unable to open adblock file '{0}' for reading.""")\ .format(fileName)) @@ -207,7 +209,7 @@ textStream = QTextStream(f) header = textStream.readLine(1024) if not header.startswith("[Adblock"): - QMessageBox.warning(None, + E5MessageBox.warning(None, self.trUtf8("Load subscription rules"), self.trUtf8("""Adblock file '{0}' does not start""" """ with [Adblock.""")\ @@ -260,7 +262,7 @@ self.__downloading = None if reply.error() != QNetworkReply.NoError: - QMessageBox.warning(None, + E5MessageBox.warning(None, self.trUtf8("Downloading subscription rules"), self.trUtf8("""<p>Subscription rules could not be downloaded.</p>""" """<p>Error: {0}</p>""").format(reply.errorString())) @@ -274,7 +276,7 @@ return if response.isEmpty(): - QMessageBox.warning(None, + E5MessageBox.warning(None, self.trUtf8("Downloading subscription rules"), self.trUtf8("""Got empty subscription rules.""")) return @@ -282,7 +284,7 @@ fileName = self.rulesFileName() f = QFile(fileName) if not f.open(QIODevice.ReadWrite): - QMessageBox.warning(None, + E5MessageBox.warning(None, self.trUtf8("Downloading subscription rules"), self.trUtf8("""Unable to open adblock file '{0}' for writing.""")\ .file(fileName)) @@ -303,7 +305,7 @@ f = QFile(fileName) if not f.open(QIODevice.ReadWrite | QIODevice.Truncate): - QMessageBox.warning(None, + E5MessageBox.warning(None, self.trUtf8("Saving subscription rules"), self.trUtf8("""Unable to open adblock file '{0}' for writing.""")\ .format(fileName)) @@ -407,4 +409,4 @@ elif rule.isException(): self.__networkExceptionRules.append(rule) else: - self.__networkBlockRules.append(rule) + self.__networkBlockRules.append(rule) \ No newline at end of file
--- a/Helpviewer/Bookmarks/BookmarksManager.py Tue Aug 31 12:36:10 2010 +0200 +++ b/Helpviewer/Bookmarks/BookmarksManager.py Tue Aug 31 13:23:27 2010 +0200 @@ -154,7 +154,7 @@ reader = XbelReader() self.__bookmarkRootNode = reader.read(bookmarkFile) if reader.error() != QXmlStreamReader.NoError: - QMessageBox.warning(None, + E5MessageBox.warning(None, self.trUtf8("Loading Bookmarks"), self.trUtf8("""Error when loading bookmarks on line {0}, column {1}:\n""" """{2}""")\ @@ -215,7 +215,7 @@ self.__menu.title = BOOKMARKMENU self.__toolbar.title = BOOKMARKBAR if not writer.write(bookmarkFile, self.__bookmarkRootNode): - QMessageBox.warning(None, + E5MessageBox.warning(None, self.trUtf8("Saving Bookmarks"), self.trUtf8("""Error saving bookmarks to <b>{0}</b>.""")\ .format(bookmarkFile)) @@ -344,7 +344,7 @@ inFile = QFile(fileName) inFile.open(QIODevice.ReadOnly) if inFile.openMode == QIODevice.NotOpen: - QMessageBox.warning(None, + E5MessageBox.warning(None, self.trUtf8("Import Bookmarks"), self.trUtf8("""Error opening bookmarks file <b>{0}</b>.""")\ .format(fileName)) @@ -360,7 +360,7 @@ importRootNode = reader.read(fileName) if reader.error() != QXmlStreamReader.NoError: - QMessageBox.warning(None, + E5MessageBox.warning(None, self.trUtf8("Import Bookmarks"), self.trUtf8("""Error when importing bookmarks on""" """ line {0}, column [1}:\n{2}""")\
--- a/Helpviewer/HelpBrowserWV.py Tue Aug 31 12:36:10 2010 +0200 +++ b/Helpviewer/HelpBrowserWV.py Tue Aug 31 13:23:27 2010 +0200 @@ -879,7 +879,7 @@ method = formElement.attribute("method", "get").lower() if method != "get": - QMessageBox.warning(self, + E5MessageBox.warning(self, self.trUtf8("Method not supported"), self.trUtf8("""{0} method is not supported.""").format(method.upper())) return
--- a/Helpviewer/HelpWindow.py Tue Aug 31 12:36:10 2010 +0200 +++ b/Helpviewer/HelpWindow.py Tue Aug 31 13:23:27 2010 +0200 @@ -2606,7 +2606,7 @@ @param message message to be shown (string) """ - QMessageBox.warning(self, + E5MessageBox.warning(self, self.trUtf8("eric5 Web Browser"), message) @@ -2646,7 +2646,7 @@ @param msg message sent by the help engine (string) """ - QMessageBox.warning(self, + E5MessageBox.warning(self, self.trUtf8("Help Engine"), msg) def __showNavigationMenu(self):
--- a/Helpviewer/History/HistoryManager.py Tue Aug 31 12:36:10 2010 +0200 +++ b/Helpviewer/History/HistoryManager.py Tue Aug 31 13:23:27 2010 +0200 @@ -11,6 +11,8 @@ from PyQt4.QtGui import * from PyQt4.QtWebKit import QWebHistoryInterface, QWebSettings +from E5Gui import E5MessageBox + from .HistoryModel import HistoryModel from .HistoryFilterModel import HistoryFilterModel from .HistoryTreeModel import HistoryTreeModel @@ -336,7 +338,7 @@ if not historyFile.exists(): return if not historyFile.open(QIODevice.ReadOnly): - QMessageBox.warning(None, + E5MessageBox.warning(None, self.trUtf8("Loading History"), self.trUtf8("""<p>Unable to open history file <b>{0}</b>.<br/>""" """Reason: {1}</p>""")\ @@ -412,7 +414,7 @@ opened = f.open(QIODevice.Append) if not opened: - QMessageBox.warning(None, + E5MessageBox.warning(None, self.trUtf8("Saving History"), self.trUtf8("""<p>Unable to open history file <b>{0}</b>.<br/>""" """Reason: {1}</p>""")\ @@ -432,13 +434,13 @@ f.close() if saveAll: if historyFile.exists() and not historyFile.remove(): - QMessageBox.warning(None, + E5MessageBox.warning(None, self.trUtf8("Saving History"), self.trUtf8("""<p>Error removing old history file <b>{0}</b>.""" """<br/>Reason: {1}</p>""")\ .format(historyFile.fileName(), historyFile.errorString())) if not f.copy(historyFile.fileName()): - QMessageBox.warning(None, + E5MessageBox.warning(None, self.trUtf8("Saving History"), self.trUtf8("""<p>Error moving new history file over old one """ """(<b>{0}</b>).<br/>Reason: {1}</p>""")\ @@ -461,4 +463,4 @@ Private method to start the timer to recalculate the frequencies. """ tomorrow = QDateTime(QDate.currentDate().addDays(1), QTime(3, 0)) - self.__frequencyTimer.start(QDateTime.currentDateTime().secsTo(tomorrow) * 1000) + self.__frequencyTimer.start(QDateTime.currentDateTime().secsTo(tomorrow) * 1000) \ No newline at end of file
--- a/Helpviewer/Network/NetworkAccessManager.py Tue Aug 31 12:36:10 2010 +0200 +++ b/Helpviewer/Network/NetworkAccessManager.py Tue Aug 31 13:23:27 2010 +0200 @@ -203,7 +203,7 @@ return errorString = '.</li><li>'.join(errorStrings) - ret = QMessageBox.warning(None, + ret = E5MessageBox.warning(None, self.trUtf8("SSL Errors"), self.trUtf8("""<p>SSL Errors for <br /><b>{0}</b>""" """<ul><li>{1}</li></ul></p>"""
--- a/Helpviewer/QtHelpDocumentationDialog.py Tue Aug 31 12:36:10 2010 +0200 +++ b/Helpviewer/QtHelpDocumentationDialog.py Tue Aug 31 13:23:27 2010 +0200 @@ -64,7 +64,7 @@ for fileName in fileNames: ns = QHelpEngineCore.namespaceName(fileName) if not ns: - QMessageBox.warning(self, + E5MessageBox.warning(self, self.trUtf8("Add Documentation"), self.trUtf8("""The file <b>{0}</b> is not a valid Qt Help File.""")\ .format(fileName) @@ -72,7 +72,7 @@ continue if len(self.documentsList.findItems(ns, Qt.MatchFixedString)): - QMessageBox.warning(self, + E5MessageBox.warning(self, self.trUtf8("Add Documentation"), self.trUtf8("""The namespace <b>{0}</b> is already registered.""")\ .format(ns) @@ -107,7 +107,7 @@ for item in items: ns = item.text() if ns in list(openedDocs.values()): - res = QMessageBox.warning(self, + res = E5MessageBox.warning(self, self.trUtf8("Remove Documentation"), self.trUtf8("""Some documents currently opened reference the """ """documentation you are attempting to remove. """
--- a/IconEditor/IconEditorGrid.py Tue Aug 31 12:36:10 2010 +0200 +++ b/IconEditor/IconEditorGrid.py Tue Aug 31 13:23:27 2010 +0200 @@ -914,7 +914,7 @@ self.__updateImageRect(self.__pasteRect.topLeft(), self.__pasteRect.bottomRight() + QPoint(1, 1)) else: - QMessageBox.warning(self, + E5MessageBox.warning(self, self.trUtf8("Pasting Image"), self.trUtf8("""Invalid image data in clipboard."""))
--- a/IconEditor/IconEditorWindow.py Tue Aug 31 12:36:10 2010 +0200 +++ b/IconEditor/IconEditorWindow.py Tue Aug 31 13:23:27 2010 +0200 @@ -11,7 +11,7 @@ from PyQt4.QtGui import * from E5Gui.E5Action import E5Action, createActionGroup -from E5Gui import E5FileDialog +from E5Gui import E5FileDialog, E5MessageBox from .IconEditorGrid import IconEditorGrid from .IconZoomDialog import IconZoomDialog @@ -1001,7 +1001,7 @@ if ex: fileName += ex if QFileInfo(fileName).exists(): - res = QMessageBox.warning(self, + res = E5MessageBox.warning(self, self.trUtf8("Save icon file"), self.trUtf8("<p>The file <b>{0}</b> already exists.</p>") .format(fileName), @@ -1030,13 +1030,13 @@ """ file= QFile(fileName) if not file.exists(): - QMessageBox.warning(self, self.trUtf8("eric5 Icon Editor"), + E5MessageBox.warning(self, self.trUtf8("eric5 Icon Editor"), self.trUtf8("The file '{0}' does not exist.")\ .format(fileName)) return if not file.open(QFile.ReadOnly): - QMessageBox.warning(self, self.trUtf8("eric5 Icon Editor"), + E5MessageBox.warning(self, self.trUtf8("eric5 Icon Editor"), self.trUtf8("Cannot read file '{0}:\n{1}.")\ .format(fileName, file.errorString())) return @@ -1055,7 +1055,7 @@ """ file = QFile(fileName) if not file.open(QFile.WriteOnly): - QMessageBox.warning(self, self.trUtf8("eric5 Icon Editor"), + E5MessageBox.warning(self, self.trUtf8("eric5 Icon Editor"), self.trUtf8("Cannot write file '{0}:\n{1}.")\ .format(fileName, file.errorString())) @@ -1068,7 +1068,7 @@ file.close() if not res: - QMessageBox.warning(self, self.trUtf8("eric5 Icon Editor"), + E5MessageBox.warning(self, self.trUtf8("eric5 Icon Editor"), self.trUtf8("Cannot write file '{0}:\n{1}.")\ .format(fileName, file.errorString())) @@ -1119,7 +1119,7 @@ @return flag indicating, if it is ok to continue (boolean) """ if self.__editor.isDirty(): - ret = QMessageBox.warning(self, + ret = E5MessageBox.warning(self, self.trUtf8("eric5 Icon Editor"), self.trUtf8("""The icon image has been modified.\n""" """Do you want to save your changes?"""), @@ -1223,4 +1223,4 @@ """ Private slot called in to enter Whats This mode. """ - QWhatsThis.enterWhatsThisMode() + QWhatsThis.enterWhatsThisMode() \ No newline at end of file
--- a/MultiProject/MultiProject.py Tue Aug 31 12:36:10 2010 +0200 +++ b/MultiProject/MultiProject.py Tue Aug 31 13:23:27 2010 +0200 @@ -600,7 +600,7 @@ if ex: fn += ex if QFileInfo(fn).exists(): - res = QMessageBox.warning(None, + res = E5MessageBox.warning(self.parent(), self.trUtf8("Save File"), self.trUtf8("""<p>The file <b>{0}</b> already exists.</p>""") .format(fn), @@ -627,7 +627,7 @@ @return flag indicating whether this operation was successful (boolean) """ if self.isDirty(): - res = QMessageBox.warning(self.parent(), + res = E5MessageBox.warning(self.parent(), self.trUtf8("Close Multiproject"), self.trUtf8("The current multiproject has unsaved changes."), QMessageBox.StandardButtons(\
--- a/PluginManager/PluginRepositoryDialog.py Tue Aug 31 12:36:10 2010 +0200 +++ b/PluginManager/PluginRepositoryDialog.py Tue Aug 31 13:23:27 2010 +0200 @@ -365,7 +365,7 @@ if reply.error() != QNetworkReply.NoError: ok = False if not self.__downloadCancelled: - QMessageBox.warning(None, + E5MessageBox.warning(self, self.trUtf8("Error downloading file"), self.trUtf8( """<p>Could not download the requested file from {0}.</p>""" @@ -499,7 +499,7 @@ for err in errors: errorStrings.append(err.errorString()) errorString = '.<br />'.join(errorStrings) - ret = QMessageBox.warning(self, + ret = E5MessageBox.warning(self, self.trUtf8("SSL Errors"), self.trUtf8("""<p>SSL Errors:</p>""" """<p>{0}</p>"""
--- a/Plugins/VcsPlugins/vcsMercurial/HgDiffDialog.py Tue Aug 31 12:36:10 2010 +0200 +++ b/Plugins/VcsPlugins/vcsMercurial/HgDiffDialog.py Tue Aug 31 13:23:27 2010 +0200 @@ -277,7 +277,7 @@ if ex: fname += ex if QFileInfo(fname).exists(): - res = QMessageBox.warning(self, + res = E5MessageBox.warning(self, self.trUtf8("Save Diff"), self.trUtf8("<p>The patch file <b>{0}</b> already exists.</p>") .format(fname),
--- a/Plugins/VcsPlugins/vcsMercurial/hg.py Tue Aug 31 12:36:10 2010 +0200 +++ b/Plugins/VcsPlugins/vcsMercurial/hg.py Tue Aug 31 13:23:27 2010 +0200 @@ -1672,7 +1672,7 @@ ignoreName = os.path.join(name, ".hgignore") if os.path.exists(ignoreName): - res = QMessageBox.warning(None, + res = E5MessageBox.warning(self.__ui, self.trUtf8("Create .hgignore file"), self.trUtf8("""<p>The file <b>{0}</b> exists already.""" """ Overwrite it?</p>""").format(ignoreName), @@ -1736,7 +1736,7 @@ if ex: fname += ex if QFileInfo(fname).exists(): - res = QMessageBox.warning(None, + res = E5MessageBox.warning(self.__ui, self.trUtf8("Create changegroup"), self.trUtf8("<p>The Mercurial changegroup file <b>{0}</b> " "already exists.</p>") @@ -1965,7 +1965,7 @@ if dlg.exec_() == QDialog.Accepted: rev, merge, date, user, message = dlg.getParameters() if not rev: - QMessageBox.warning(None, + E5MessageBox.warning(self.__ui, self.trUtf8("Backing out changeset"), self.trUtf8("""No revision given. Aborting...""")) return
--- a/Plugins/VcsPlugins/vcsPySvn/SvnDiffDialog.py Tue Aug 31 12:36:10 2010 +0200 +++ b/Plugins/VcsPlugins/vcsPySvn/SvnDiffDialog.py Tue Aug 31 13:23:27 2010 +0200 @@ -330,7 +330,7 @@ if ex: fname += ex if QFileInfo(fname).exists(): - res = QMessageBox.warning(self, + res = E5MessageBox.warning(self, self.trUtf8("Save Diff"), self.trUtf8("<p>The patch file <b>{0}</b> already exists.</p>") .format(fname),
--- a/Plugins/VcsPlugins/vcsSubversion/SvnDiffDialog.py Tue Aug 31 12:36:10 2010 +0200 +++ b/Plugins/VcsPlugins/vcsSubversion/SvnDiffDialog.py Tue Aug 31 13:23:27 2010 +0200 @@ -290,7 +290,7 @@ if ex: fname += ex if QFileInfo(fname).exists(): - res = QMessageBox.warning(self, + res = E5MessageBox.warning(self, self.trUtf8("Save Diff"), self.trUtf8("<p>The patch file <b>{0}</b> already exists.</p>") .format(fname),
--- a/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardDialog.py Tue Aug 31 12:36:10 2010 +0200 +++ b/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardDialog.py Tue Aug 31 13:23:27 2010 +0200 @@ -311,7 +311,7 @@ if ex: fname += ex if QFileInfo(fname).exists(): - res = QMessageBox.warning(self, + res = E5MessageBox.warning(self, self.trUtf8("Save regular expression"), self.trUtf8("<p>The file <b>{0}</b> already exists.</p>") .format(fname),
--- a/Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardDialog.py Tue Aug 31 12:36:10 2010 +0200 +++ b/Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardDialog.py Tue Aug 31 13:23:27 2010 +0200 @@ -225,7 +225,7 @@ if ex: fname += ex if QFileInfo(fname).exists(): - res = QMessageBox.warning(self, + res = E5MessageBox.warning(self, self.trUtf8("Save regular expression"), self.trUtf8("<p>The file <b>{0}</b> already exists.</p>") .format(fname),
--- a/Preferences/ShortcutsDialog.py Tue Aug 31 12:36:10 2010 +0200 +++ b/Preferences/ShortcutsDialog.py Tue Aug 31 13:23:27 2010 +0200 @@ -11,6 +11,7 @@ from PyQt4.QtGui import * from E5Gui.E5Application import e5App +from E5Gui import E5MessageBox from .Ui_ShortcutsDialog import Ui_ShortcutsDialog from .ShortcutDialog import ShortcutDialog @@ -292,7 +293,7 @@ itmseq = itm.text(col) # step 1: check if shortcut is already allocated if keystr == itmseq: - res = QMessageBox.warning(None, + res = E5MessageBox.warning(self, self.trUtf8("Edit shortcuts"), self.trUtf8(\ """<p><b>{0}</b> has already been allocated""" @@ -314,7 +315,7 @@ # step 2: check if shortcut hides an already allocated if itmseq.startswith("{0}+".format(keystr)): - res = QMessageBox.warning(None, + res = E5MessageBox.warning(self, self.trUtf8("Edit shortcuts"), self.trUtf8(\ """<p><b>{0}</b> hides the <b>{1}</b> action. """ @@ -332,7 +333,7 @@ # step 3: check if shortcut is hidden by an already allocated if keystr.startswith("{0}+".format(itmseq)): - res = QMessageBox.warning(None, + res = E5MessageBox.warning(self, self.trUtf8("Edit shortcuts"), self.trUtf8(\ """<p><b>{0}</b> is hidden by the """ @@ -461,4 +462,4 @@ @param checked state of the shortcuts radio button (boolean) """ if checked: - self.on_searchEdit_textChanged(self.searchEdit.text()) + self.on_searchEdit_textChanged(self.searchEdit.text()) \ No newline at end of file
--- a/Preferences/ToolGroupConfigurationDialog.py Tue Aug 31 12:36:10 2010 +0200 +++ b/Preferences/ToolGroupConfigurationDialog.py Tue Aug 31 13:23:27 2010 +0200 @@ -106,7 +106,7 @@ if row < 0: return - res = QMessageBox.warning(None, + res = E5MessageBox.warning(self, self.trUtf8("Delete tool group entry"), self.trUtf8("""<p>Do you really want to delete the tool group""" """ <b>"{0}"</b>?</p>""")\
--- a/Project/Project.py Tue Aug 31 12:36:10 2010 +0200 +++ b/Project/Project.py Tue Aug 31 13:23:27 2010 +0200 @@ -1753,7 +1753,7 @@ os.makedirs(target) if os.path.exists(targetfile): - res = QMessageBox.warning(None, + res = E5MessageBox.warning(self.ui, self.trUtf8("Add file"), self.trUtf8("<p>The file <b>{0}</b> already" " exists.</p><p>Overwrite it?</p>") @@ -1831,7 +1831,7 @@ if not Utilities.samepath(target, source): try: if os.path.exists(targetfile): - res = QMessageBox.warning(self.ui, + res = E5MessageBox.warning(self.ui, self.trUtf8("Add directory"), self.trUtf8("<p>The file <b>{0}</b> already exists.</p>" "<p>Overwrite it?</p>") @@ -2024,7 +2024,7 @@ newfn = Utilities.toNativeSeparators(newfn) if os.path.exists(newfn): - canceled = QMessageBox.warning(None, + canceled = E5MessageBox.warning(self.ui, self.trUtf8("Rename File"), self.trUtf8("""<p>The file <b>{0}</b> already exists.""" """ Overwrite it?</p>""") @@ -2897,7 +2897,7 @@ if ex: fn += ex if QFileInfo(fn).exists(): - res = QMessageBox.warning(None, + res = E5MessageBox.warning(self.ui, self.trUtf8("Save File"), self.trUtf8("""<p>The file <b>{0}</b> already exists.</p>""") .format(fn), @@ -2937,7 +2937,7 @@ @return flag indicating whether this operation was successful (boolean) """ if self.isDirty(): - res = QMessageBox.warning(self.parent(), + res = E5MessageBox.warning(self.parent(), self.trUtf8("Close Project"), self.trUtf8("The current project has unsaved changes."), QMessageBox.StandardButtons(\ @@ -4475,7 +4475,7 @@ """ pkglist = os.path.join(self.ppath, "PKGLIST") if os.path.exists(pkglist): - res = QMessageBox.warning(None, + res = E5MessageBox.warning(self.ui, self.trUtf8("Create Package List"), self.trUtf8("<p>The file <b>PKGLIST</b> already" " exists.</p><p>Overwrite it?</p>"),
--- a/Project/ProjectFormsBrowser.py Tue Aug 31 12:36:10 2010 +0200 +++ b/Project/ProjectFormsBrowser.py Tue Aug 31 13:23:27 2010 +0200 @@ -511,7 +511,7 @@ fname += ex if os.path.exists(fname): - res = QMessageBox.warning(self, + res = E5MessageBox.warning(self, self.trUtf8("New Form"), self.trUtf8("The file already exists! Overwrite it?"), QMessageBox.StandardButtons(\
--- a/Project/ProjectResourcesBrowser.py Tue Aug 31 12:36:10 2010 +0200 +++ b/Project/ProjectResourcesBrowser.py Tue Aug 31 13:23:27 2010 +0200 @@ -405,7 +405,7 @@ fname += ex if os.path.exists(fname): - res = QMessageBox.warning(self, + res = E5MessageBox.warning(self, self.trUtf8("New Resource"), self.trUtf8("The file already exists! Overwrite it?"), QMessageBox.StandardButtons(\
--- a/Project/ProjectTranslationsBrowser.py Tue Aug 31 12:36:10 2010 +0200 +++ b/Project/ProjectTranslationsBrowser.py Tue Aug 31 13:23:27 2010 +0200 @@ -705,7 +705,7 @@ if l: sections.append(("TRANSLATIONS", l)) else: - QMessageBox.warning(None, + E5MessageBox.warning(self, self.trUtf8("Write temporary project file"), self.trUtf8("""No translation files (*.ts) selected.""")) return False
--- a/QScintilla/Editor.py Tue Aug 31 12:36:10 2010 +0200 +++ b/QScintilla/Editor.py Tue Aug 31 13:23:27 2010 +0200 @@ -280,7 +280,7 @@ if self.fileName is not None: if (QFileInfo(self.fileName).size() // 1024) > \ Preferences.getEditor("WarnFilesize"): - res = QMessageBox.warning(None, + res = E5MessageBox.warning(self, self.trUtf8("Open File"), self.trUtf8("""<p>The size of the file <b>{0}</b>""" """ is <b>{1} KB</b>.""" @@ -1481,7 +1481,7 @@ """ Private slot to handle the modificationAttempted signal. """ - QMessageBox.warning(None, + E5MessageBox.warning(self, self.trUtf8("Modification of Read Only file"), self.trUtf8("""You are attempting to change a read only file. """ """Please save to a different file first.""")) @@ -2179,7 +2179,7 @@ fn = self.fileName if fn is None: fn = self.noName - res = QMessageBox.warning(self.vm, + res = E5MessageBox.warning(self.vm, self.trUtf8("File Modified"), self.trUtf8("<p>The file <b>{0}</b> has unsaved changes.</p>") .format(fn), @@ -2374,7 +2374,7 @@ if ex: fn += ex if QFileInfo(fn).exists(): - res = QMessageBox.warning(self, + res = E5MessageBox.warning(self, self.trUtf8("Save File"), self.trUtf8("<p>The file <b>{0}</b> already exists.</p>") .format(fn), @@ -4214,7 +4214,7 @@ self.trUtf8("Show Code Coverage Annotations"), self.trUtf8("""All lines have been covered.""")) else: - QMessageBox.warning(self, + E5MessageBox.warning(self, self.trUtf8("Show Code Coverage Annotations"), self.trUtf8("""There is no coverage file available.""")) @@ -4537,12 +4537,12 @@ for handle in list(self.warnings.keys()): if self.markerLine(handle) == line: - QMessageBox.warning(None, + E5MessageBox.warning(self, self.trUtf8("py3flakes Warning"), '\n'.join(self.warnings[handle])) break else: - QMessageBox.warning(None, + E5MessageBox.warning(self, self.trUtf8("py3flakes Warning"), self.trUtf8("No py3flakes warning message available.")) @@ -4646,7 +4646,7 @@ if ex: fname += ex if QFileInfo(fname).exists(): - res = QMessageBox.warning(self, + res = E5MessageBox.warning(self, self.trUtf8("Save macro"), self.trUtf8("<p>The macro file <b>{0}</b> already exists.</p>") .format(fname), @@ -4675,7 +4675,7 @@ Public method to start macro recording. """ if self.recording: - res = QMessageBox.warning(self, + res = E5MessageBox.warning(self, self.trUtf8("Start Macro Recording"), self.trUtf8("Macro recording is already active. Start new?"), QMessageBox.StandardButtons(\ @@ -4824,7 +4824,7 @@ """<br><b>Warning:</b> You will loose""" """ your changes upon reopening it.""") default = QMessageBox.No - res = QMessageBox.warning(None, + res = E5MessageBox.warning(self, self.trUtf8("File changed"), msg, QMessageBox.StandardButtons(\ QMessageBox.Yes | \
--- a/QScintilla/Exporters/ExporterBase.py Tue Aug 31 12:36:10 2010 +0200 +++ b/QScintilla/Exporters/ExporterBase.py Tue Aug 31 13:23:27 2010 +0200 @@ -10,6 +10,8 @@ from PyQt4.QtCore import * from PyQt4.QtGui import * +from E5Gui import E5MessageBox + import Utilities class ExporterBase(QObject): @@ -51,7 +53,7 @@ if ex: fn += ex if QFileInfo(fn).exists(): - res = QMessageBox.warning(self.editor, + res = E5MessageBox.warning(self.editor, self.trUtf8("Export source"), self.trUtf8("<p>The file <b>{0}</b> already exists.</p>") .format(fn), @@ -72,4 +74,4 @@ This method must be overridden by the real exporters. """ - raise NotImplementedError + raise NotImplementedError \ No newline at end of file
--- a/QScintilla/MiniEditor.py Tue Aug 31 12:36:10 2010 +0200 +++ b/QScintilla/MiniEditor.py Tue Aug 31 13:23:27 2010 +0200 @@ -1476,7 +1476,7 @@ @return flag indicating, if it is ok to continue (boolean) """ if self.__textEdit.isModified(): - ret = QMessageBox.warning(self, + ret = E5MessageBox.warning(self, self.trUtf8("eric5 Mini Editor"), self.trUtf8("The document has been modified.\n" "Do you want to save your changes?"),
--- a/SqlBrowser/SqlBrowser.py Tue Aug 31 12:36:10 2010 +0200 +++ b/SqlBrowser/SqlBrowser.py Tue Aug 31 13:23:27 2010 +0200 @@ -12,6 +12,7 @@ from PyQt4.QtSql import QSqlError, QSqlDatabase from E5Gui.E5Action import E5Action +from E5Gui import E5MessageBox from .SqlBrowserWidget import SqlBrowserWidget @@ -68,7 +69,7 @@ Private slot to do some actions after the UI has started and the main loop is up. """ for warning in self.__warnings: - QMessageBox.warning(self, + E5MessageBox.warning(self, self.trUtf8("SQL Browser startup problem"), warning) @@ -175,4 +176,4 @@ """ Private slot to show info about Qt. """ - QMessageBox.aboutQt(self, self.trUtf8("SQL Browser")) + QMessageBox.aboutQt(self, self.trUtf8("SQL Browser")) \ No newline at end of file
--- a/SqlBrowser/SqlBrowserWidget.py Tue Aug 31 12:36:10 2010 +0200 +++ b/SqlBrowser/SqlBrowserWidget.py Tue Aug 31 13:23:27 2010 +0200 @@ -148,7 +148,7 @@ err = self.addConnection(driver, dbName, user, password, host, port) if err.type() != QSqlError.NoError: - QMessageBox.warning(self, + E5MessageBox.warning(self, self.trUtf8("Unable to open database"), self.trUtf8("""An error occurred while opening the connection."""))
--- a/Templates/TemplateViewer.py Tue Aug 31 12:36:10 2010 +0200 +++ b/Templates/TemplateViewer.py Tue Aug 31 13:23:27 2010 +0200 @@ -776,7 +776,7 @@ """ if oldname != newname: if newname in self.groups: - QMessageBox.warning(self, + E5MessageBox.warning(self, self.trUtf8("Edit Template Group"), self.trUtf8("""<p>A template group with the name""" """ <b>{0}</b> already exists.</p>""")\
--- a/Tools/TRPreviewer.py Tue Aug 31 12:36:10 2010 +0200 +++ b/Tools/TRPreviewer.py Tue Aug 31 13:23:27 2010 +0200 @@ -13,6 +13,8 @@ from PyQt4.QtGui import * from PyQt4 import uic +from E5Gui import E5MessageBox + from .TRSingleApplication import TRSingleApplicationServer import UI.PixmapCache @@ -440,7 +442,7 @@ ntr.fileName = fileName ntr.name = self.__uniqueName(fileName) if ntr.name is None: - QMessageBox.warning(None, + E5MessageBox.warning(self.parent(), self.trUtf8("Set Translator"), self.trUtf8("""<p>The translation filename <b>{0}</b>""" """ is invalid.</p>""").format(fileName)) @@ -468,7 +470,7 @@ if name != noTranslationName: trans = self.__findName(name) if trans is None: - QMessageBox.warning(None, + E5MessageBox.warning(self.parent(), self.trUtf8("Set Translator"), self.trUtf8("""<p>The translator <b>{0}</b> is not known.</p>""")\ .format(name)) @@ -608,10 +610,10 @@ if tr.load(transFileName): return tr - QMessageBox.warning(None, + E5MessageBox.warning(self.parent(), self.trUtf8("Load Translator"), - self.trUtf8("""<p>The translation file <b>{0}</b> could not be loaded.</p>""")\ - .format(transFileName)) + self.trUtf8("""<p>The translation file <b>{0}</b> could""" + """ not be loaded.</p>""").format(transFileName)) return None def hasTranslations(self): @@ -680,7 +682,7 @@ pass if not self.__widget: - QMessageBox.warning(None, + E5MessageBox.warning(self, self.trUtf8("Load UI File"), self.trUtf8("""<p>The file <b>{0}</b> could not be loaded.</p>""")\ .format(self.__uiFileName)) @@ -733,7 +735,7 @@ if wview is None: name = os.path.basename(uiFileName) if not name: - QMessageBox.warning(None, + E5MessageBox.warning(self, self.trUtf8("Load UI File"), self.trUtf8("""<p>The file <b>{0}</b> could not be loaded.</p>""")\ .format(uiFileName)) @@ -851,4 +853,4 @@ @return flag signaling if any widget was loaded (boolean) """ - return len(self.widgets) > 0 + return len(self.widgets) > 0 \ No newline at end of file
--- a/Tools/UIPreviewer.py Tue Aug 31 12:36:10 2010 +0200 +++ b/Tools/UIPreviewer.py Tue Aug 31 13:23:27 2010 +0200 @@ -326,7 +326,7 @@ self.previewSV.setWidget(self.mainWidget) self.mainWidget.show() else: - QMessageBox.warning(self, + E5MessageBox.warning(self, self.trUtf8("Load UI File"), self.trUtf8("""<p>The file <b>{0}</b> could not be loaded.</p>""")\ .format(fn))
--- a/UI/DiffDialog.py Tue Aug 31 12:36:10 2010 +0200 +++ b/UI/DiffDialog.py Tue Aug 31 13:23:27 2010 +0200 @@ -286,7 +286,7 @@ if ex: fileName += ex if QFileInfo(fname).exists(): - res = QMessageBox.warning(self, + res = E5MessageBox.warning(self, self.trUtf8("Save Diff"), self.trUtf8("<p>The patch file <b>{0}</b> already exists.</p>") .format(fname),
--- a/UI/UserInterface.py Tue Aug 31 12:36:10 2010 +0200 +++ b/UI/UserInterface.py Tue Aug 31 13:23:27 2010 +0200 @@ -599,7 +599,7 @@ styleSheet = f.read() f.close() except IOError as msg: - QMessageBox.warning(None, + E5MessageBox.warning(self, self.trUtf8("Loading Style Sheet"), self.trUtf8("""<p>The Qt Style Sheet file <b>{0}</b> could""" """ not be read.<br>Reason: {1}</p>""") @@ -4503,7 +4503,7 @@ home = pythonDocDir if not os.path.exists(home): - QMessageBox.warning(None, + E5MessageBox.warning(self, self.trUtf8("Documentation Missing"), self.trUtf8("""<p>The documentation starting point""" """ "<b>{0}</b>" could not be found.</p>""")\ @@ -4555,7 +4555,7 @@ home = qt4DocDir if not os.path.exists(home): - QMessageBox.warning(None, + E5MessageBox.warning(self, self.trUtf8("Documentation Missing"), self.trUtf8("""<p>The documentation starting point""" """ "<b>{0}</b>" could not be found.</p>""")\ @@ -4586,7 +4586,7 @@ pyqt4DocDir = Utilities.getEnvironmentEntry("PYQT4DOCDIR", None) if not pyqt4DocDir: - QMessageBox.warning(None, + E5MessageBox.warning(self, self.trUtf8("Documentation"), self.trUtf8("""<p>The PyQt4 documentation starting point""" """ has not been configured.</p>""")) @@ -4612,7 +4612,7 @@ home = pyqt4DocDir if not home or not os.path.exists(home): - QMessageBox.warning(None, + E5MessageBox.warning(self, self.trUtf8("Documentation Missing"), self.trUtf8("""<p>The documentation starting point""" """ "<b>{0}</b>" could not be found.</p>""")\ @@ -4646,7 +4646,7 @@ if not home.startswith("http://") and \ not home.startswith("https://"): if not os.path.exists(home): - QMessageBox.warning(None, + E5MessageBox.warning(self, self.trUtf8("Documentation Missing"), self.trUtf8("""<p>The documentation starting point""" """ "<b>{0}</b>" could not be found.</p>""")\ @@ -4677,7 +4677,7 @@ pysideDocDir = Utilities.getEnvironmentEntry("PYSIDEDOCDIR", None) if not pysideDocDir: - QMessageBox.warning(None, + E5MessageBox.warning(self, self.trUtf8("Documentation"), self.trUtf8("""<p>The PySide documentation starting point""" """ has not been configured.</p>""")) @@ -4692,7 +4692,7 @@ else: home = pysideDocDir if not os.path.exists(home): - QMessageBox.warning(None, + E5MessageBox.warning(self, self.trUtf8("Documentation Missing"), self.trUtf8("""<p>The documentation starting point""" """ "<b>{0}</b>" could not be found.</p>""")\ @@ -5471,7 +5471,7 @@ if self.__versionCheckProgress is not None: self.__versionCheckProgress.reset() self.__versionCheckProgress = None - QMessageBox.warning(None, + E5MessageBox.warning(self, self.trUtf8("Error downloading versions file"), self.trUtf8("""Could not download the versions file.""")) return @@ -5565,7 +5565,7 @@ self.trUtf8("Eric5 is up to date"), self.trUtf8("""You are using the latest version of eric5""")) except IndexError: - QMessageBox.warning(self, + E5MessageBox.warning(self, self.trUtf8("Error during updates check"), self.trUtf8("""Could not perform updates check.""")) @@ -5614,7 +5614,7 @@ for err in sslErrors: errorStrings.append(err.errorString()) errorString = '.<br />'.join(errorStrings) - ret = QMessageBox.warning(self, + ret = E5MessageBox.warning(self, self.trUtf8("SSL Errors"), self.trUtf8("""<p>SSL Errors:</p>""" """<p>{0}</p>"""
--- a/ViewManager/ViewManager.py Tue Aug 31 12:36:10 2010 +0200 +++ b/ViewManager/ViewManager.py Tue Aug 31 13:23:27 2010 +0200 @@ -2997,7 +2997,7 @@ if autosave: res = QMessageBox.Save else: - res = QMessageBox.warning(self.ui, + res = E5MessageBox.warning(self.ui, QApplication.translate('ViewManager', "File Modified"), QApplication.translate('ViewManager', """<p>The file <b>{0}</b> has unsaved changes.</p>""") @@ -5101,4 +5101,4 @@ if aw is not None: if aw.hasSelectedText(): txt = aw.selectedText() - return txt + return txt \ No newline at end of file