Tue, 15 Oct 2013 18:29:32 +0200
Fixed a bunch of visible indentation issues.
--- a/E5Graphics/E5GraphicsView.py Mon Oct 14 20:08:19 2013 +0200 +++ b/E5Graphics/E5GraphicsView.py Tue Oct 15 18:29:32 2013 +0200 @@ -371,10 +371,10 @@ painter.setPen(tc) painter.drawRect(marginX, marginY, width, height) painter.drawLine(marginX, marginY + height + 2, - marginX + width, marginY + height + 2) + marginX + width, marginY + height + 2) painter.setFont(font) painter.drawText(marginX, marginY + height + 4, width, - fontHeight, Qt.AlignRight, s) + fontHeight, Qt.AlignRight, s) if not finishX or not finishY: printer.newPage() page += 1
--- a/E5Gui/E5ErrorMessage.py Mon Oct 14 20:08:19 2013 +0200 +++ b/E5Gui/E5ErrorMessage.py Tue Oct 15 18:29:32 2013 +0200 @@ -32,7 +32,8 @@ """ super().__init__(parent) - self.settings = QSettings(QSettings.IniFormat, + self.settings = QSettings( + QSettings.IniFormat, QSettings.UserScope, Globals.settingsNameOrganization, "eric5messagefilters") @@ -168,8 +169,8 @@ if __msgHandlerDialog: __msgHandlerDialog.editMessageFilters() else: - print(QCoreApplication.translate("E5ErrorMessage", - "No message handler installed.")) + print(QCoreApplication.translate( + "E5ErrorMessage", "No message handler installed.")) def messageHandlerInstalled():
--- a/E5Gui/E5FileDialog.py Mon Oct 14 20:08:19 2013 +0200 +++ b/E5Gui/E5FileDialog.py Tue Oct 15 18:29:32 2013 +0200 @@ -122,8 +122,8 @@ options |= QFileDialog.DontUseNativeDialog newfilter = __reorderFilter(filter, initialFilter) return QFileDialog.getOpenFileNamesAndFilter(parent, caption, directory, - newfilter, initialFilter, - options) + newfilter, initialFilter, + options) def getSaveFileName(parent=None, caption="", directory="",
--- a/E5Gui/E5ListView.py Mon Oct 14 20:08:19 2013 +0200 +++ b/E5Gui/E5ListView.py Tue Oct 15 18:29:32 2013 +0200 @@ -45,7 +45,8 @@ idx = self.model().index(row, 0, self.rootIndex()) if not idx.isValid(): idx = self.model().index(row - 1, 0, self.rootIndex()) - self.selectionModel().select(idx, + self.selectionModel().select( + idx, QItemSelectionModel.SelectCurrent | QItemSelectionModel.Rows) self.setCurrentIndex(idx)
--- a/E5Gui/E5MessageBox.py Mon Oct 14 20:08:19 2013 +0200 +++ b/E5Gui/E5MessageBox.py Tue Oct 15 18:29:32 2013 +0200 @@ -237,10 +237,11 @@ """ assert icon in [Critical, Information, Question, Warning] - res = __messageBox(parent, title, text, icon, - QMessageBox.StandardButtons(QMessageBox.Yes | QMessageBox.No), - yesDefault and QMessageBox.Yes or QMessageBox.No, - textFormat) + res = __messageBox( + parent, title, text, icon, + QMessageBox.StandardButtons(QMessageBox.Yes | QMessageBox.No), + yesDefault and QMessageBox.Yes or QMessageBox.No, + textFormat) return res == QMessageBox.Yes @@ -258,10 +259,11 @@ """ assert icon in [Critical, Information, Question, Warning] - res = __messageBox(parent, title, text, icon, - QMessageBox.StandardButtons(QMessageBox.Retry | QMessageBox.Abort), - QMessageBox.Retry, - textFormat) + res = __messageBox( + parent, title, text, icon, + QMessageBox.StandardButtons(QMessageBox.Retry | QMessageBox.Abort), + QMessageBox.Retry, + textFormat) return res == QMessageBox.Retry @@ -277,11 +279,12 @@ @param textFormat format of the text (Qt.TextFormat) @return flag indicating that it is ok to clear the data (boolean) """ - res = __messageBox(parent, title, text, QMessageBox.Warning, - QMessageBox.StandardButtons( - QMessageBox.Abort | QMessageBox.Discard | QMessageBox.Save), - QMessageBox.Save, - textFormat) + res = __messageBox( + parent, title, text, QMessageBox.Warning, + QMessageBox.StandardButtons( + QMessageBox.Abort | QMessageBox.Discard | QMessageBox.Save), + QMessageBox.Save, + textFormat) if res == QMessageBox.Abort: return False if res == QMessageBox.Save:
--- a/E5Gui/E5PassivePopup.py Mon Oct 14 20:08:19 2013 +0200 +++ b/E5Gui/E5PassivePopup.py Tue Oct 15 18:29:32 2013 +0200 @@ -209,5 +209,6 @@ DEFAULT_POPUP_TYPE = E5PassivePopup.Boxed DEFAULT_POPUP_TIME = 6 * 1000 -POPUP_FLAGS = Qt.WindowFlags(Qt.Tool | Qt.X11BypassWindowManagerHint | \ +POPUP_FLAGS = Qt.WindowFlags( + Qt.Tool | Qt.X11BypassWindowManagerHint | \ Qt.WindowStaysOnTopHint | Qt.FramelessWindowHint)
--- a/E5Gui/E5TableView.py Mon Oct 14 20:08:19 2013 +0200 +++ b/E5Gui/E5TableView.py Tue Oct 15 18:29:32 2013 +0200 @@ -45,7 +45,8 @@ idx = self.model().index(row, 0, self.rootIndex()) if not idx.isValid(): idx = self.model().index(row - 1, 0, self.rootIndex()) - self.selectionModel().select(idx, + self.selectionModel().select( + idx, QItemSelectionModel.SelectCurrent | QItemSelectionModel.Rows) self.setCurrentIndex(idx)
--- a/E5Network/E5Ftp.py Mon Oct 14 20:08:19 2013 +0200 +++ b/E5Network/E5Ftp.py Tue Oct 15 18:29:32 2013 +0200 @@ -274,7 +274,8 @@ " given") if self.__proxyType in [E5FtpProxyType.NonAuthorizing, - E5FtpProxyType.AuthResp, E5FtpProxyType.Bluecoat]: + E5FtpProxyType.AuthResp, + E5FtpProxyType.Bluecoat]: user += "@" + self.__host if self.__proxyType == E5FtpProxyType.Bluecoat: user += " " + self.__proxyUser
--- a/E5Network/E5NetworkProxyFactory.py Mon Oct 14 20:08:19 2013 +0200 +++ b/E5Network/E5NetworkProxyFactory.py Tue Oct 15 18:29:32 2013 +0200 @@ -47,7 +47,8 @@ @param proxy reference to the proxy object (QNetworkProxy) @param auth reference to the authenticator object (QAuthenticator) """ - info = QCoreApplication.translate("E5NetworkProxyFactory", + info = QCoreApplication.translate( + "E5NetworkProxyFactory", "<b>Connect to proxy '{0}' using:</b>")\ .format(Utilities.html_encode(proxy.hostName())) @@ -135,9 +136,11 @@ if not host: E5MessageBox.critical( None, - QCoreApplication.translate("E5NetworkProxyFactory", + QCoreApplication.translate( + "E5NetworkProxyFactory", "Proxy Configuration Error"), - QCoreApplication.translate("E5NetworkProxyFactory", + QCoreApplication.translate( + "E5NetworkProxyFactory", """Proxy usage was activated""" """ but no proxy host for protocol""" """ '{0}' configured.""").format(protocolKey)) @@ -150,7 +153,8 @@ proxyType = QNetworkProxy.HttpCachingProxy else: proxyType = QNetworkProxy.HttpProxy - proxy = QNetworkProxy(proxyType, host, + proxy = QNetworkProxy( + proxyType, host, Preferences.getUI("ProxyPort/" + protocolKey), Preferences.getUI("ProxyUser/" + protocolKey), Preferences.getUI("ProxyPassword/" + protocolKey))
--- a/E5Network/E5SslCertificatesDialog.py Mon Oct 14 20:08:19 2013 +0200 +++ b/E5Network/E5SslCertificatesDialog.py Tue Oct 15 18:29:32 2013 +0200 @@ -100,7 +100,8 @@ expiryDate = cert.expiryDate().toString("yyyy-MM-dd") # step 2: create the entry - items = self.serversCertificatesTree.findItems(organisation, + items = self.serversCertificatesTree.findItems( + organisation, Qt.MatchFixedString | Qt.MatchCaseSensitive) if len(items) == 0: parent = QTreeWidgetItem( @@ -184,7 +185,8 @@ certificateDict[server] = pems else: del certificateDict[server] - Preferences.Prefs.settings.setValue("Ssl/CaCertificatesDict", + Preferences.Prefs.settings.setValue( + "Ssl/CaCertificatesDict", certificateDict) # delete the certificate from the default certificates @@ -226,7 +228,8 @@ if server not in certificateDict: certificateDict[server] = QByteArray() certificateDict[server].append(pems) - Preferences.Prefs.settings.setValue("Ssl/CaCertificatesDict", + Preferences.Prefs.settings.setValue( + "Ssl/CaCertificatesDict", certificateDict) self.serversCertificatesTree.clear() @@ -308,7 +311,8 @@ expiryDate = cert.expiryDate().toString("yyyy-MM-dd") # step 2: create the entry - items = self.caCertificatesTree.findItems(organisation, + items = self.caCertificatesTree.findItems( + organisation, Qt.MatchFixedString | Qt.MatchCaseSensitive) if len(items) == 0: parent = QTreeWidgetItem(self.caCertificatesTree, [organisation])
--- a/E5Network/E5SslErrorHandler.py Mon Oct 14 20:08:19 2013 +0200 +++ b/E5Network/E5SslErrorHandler.py Tue Oct 15 18:29:32 2013 +0200 @@ -41,8 +41,8 @@ # port old entries stored under 'Help' certificateDict = Preferences.toDict( Preferences.Prefs.settings.value("Help/CaCertificatesDict")) - Preferences.Prefs.settings.setValue("Ssl/CaCertificatesDict", - certificateDict) + Preferences.Prefs.settings.setValue( + "Ssl/CaCertificatesDict", certificateDict) Preferences.Prefs.settings.remove("Help/CaCertificatesDict") else: certificateDict = Preferences.toDict(
--- a/E5Network/E5SslInfoWidget.py Mon Oct 14 20:08:19 2013 +0200 +++ b/E5Network/E5SslInfoWidget.py Tue Oct 15 18:29:32 2013 +0200 @@ -93,7 +93,8 @@ label = QLabel(self) label.setWordWrap(True) - label.setText('<a href="moresslinfos">' + + label.setText( + '<a href="moresslinfos">' + self.trUtf8("Certificate Information") + "</a>") label.linkActivated.connect(self.__showCertificateInfos) layout.addWidget(label, rows, 1)
--- a/E5XML/DebuggerPropertiesWriter.py Mon Oct 14 20:08:19 2013 +0200 +++ b/E5XML/DebuggerPropertiesWriter.py Tue Oct 15 18:29:32 2013 +0200 @@ -67,42 +67,43 @@ "DebugClient", self.project.debugProperties["DEBUGCLIENT"]) self.writeStartElement("Environment") - self.writeAttribute("override", + self.writeAttribute( + "override", str(int(self.project.debugProperties["ENVIRONMENTOVERRIDE"]))) self.writeCharacters(self.project.debugProperties["ENVIRONMENTSTRING"]) self.writeEndElement() self.writeStartElement("RemoteDebugger") - self.writeAttribute("on", - str(int(self.project.debugProperties["REMOTEDEBUGGER"]))) - self.writeTextElement("RemoteHost", - self.project.debugProperties["REMOTEHOST"]) - self.writeTextElement("RemoteCommand", - self.project.debugProperties["REMOTECOMMAND"]) + self.writeAttribute( + "on", str(int(self.project.debugProperties["REMOTEDEBUGGER"]))) + self.writeTextElement( + "RemoteHost", self.project.debugProperties["REMOTEHOST"]) + self.writeTextElement( + "RemoteCommand", self.project.debugProperties["REMOTECOMMAND"]) self.writeEndElement() self.writeStartElement("PathTranslation") - self.writeAttribute("on", - str(int(self.project.debugProperties["PATHTRANSLATION"]))) - self.writeTextElement("RemotePath", - self.project.debugProperties["REMOTEPATH"]) - self.writeTextElement("LocalPath", - self.project.debugProperties["LOCALPATH"]) + self.writeAttribute( + "on", str(int(self.project.debugProperties["PATHTRANSLATION"]))) + self.writeTextElement( + "RemotePath", self.project.debugProperties["REMOTEPATH"]) + self.writeTextElement( + "LocalPath", self.project.debugProperties["LOCALPATH"]) self.writeEndElement() self.writeStartElement("ConsoleDebugger") - self.writeAttribute("on", - str(int(self.project.debugProperties["CONSOLEDEBUGGER"]))) + self.writeAttribute( + "on", str(int(self.project.debugProperties["CONSOLEDEBUGGER"]))) self.writeCharacters(self.project.debugProperties["CONSOLECOMMAND"]) self.writeEndElement() self.writeEmptyElement("Redirect") - self.writeAttribute("on", - str(int(self.project.debugProperties["REDIRECT"]))) + self.writeAttribute( + "on", str(int(self.project.debugProperties["REDIRECT"]))) self.writeEmptyElement("Noencoding") - self.writeAttribute("on", - str(int(self.project.debugProperties["NOENCODING"]))) + self.writeAttribute( + "on", str(int(self.project.debugProperties["NOENCODING"]))) self.writeEndElement() self.writeEndDocument()
--- a/E5XML/HighlightingStylesReader.py Mon Oct 14 20:08:19 2013 +0200 +++ b/E5XML/HighlightingStylesReader.py Tue Oct 15 18:29:32 2013 +0200 @@ -41,7 +41,8 @@ self.readNext() if self.isStartElement(): if self.name() == "HighlightingStyles": - self.version = self.attribute("version", + self.version = self.attribute( + "version", highlightingStylesFileFormatVersion) if self.version not in self.supportedVersions: self.raiseUnsupportedFormatVersion(self.version)
--- a/E5XML/MultiProjectReader.py Mon Oct 14 20:08:19 2013 +0200 +++ b/E5XML/MultiProjectReader.py Tue Oct 15 18:29:32 2013 +0200 @@ -41,7 +41,8 @@ self.readNext() if self.isStartElement(): if self.name() == "MultiProject": - self.version = self.attribute("version", + self.version = self.attribute( + "version", multiProjectFileFormatVersion) if self.version not in self.supportedVersions: self.raiseUnsupportedFormatVersion(self.version)
--- a/E5XML/MultiProjectWriter.py Mon Oct 14 20:08:19 2013 +0200 +++ b/E5XML/MultiProjectWriter.py Tue Oct 15 18:29:32 2013 +0200 @@ -64,7 +64,8 @@ self.writeStartElement("Project") self.writeAttribute("isMaster", str(project['master'])) self.writeTextElement("ProjectName", project['name']) - self.writeTextElement("ProjectFile", + self.writeTextElement( + "ProjectFile", Utilities.fromNativeSeparators(project['file'])) self.writeTextElement("ProjectDescription", project['description']) self.writeEndElement()
--- a/E5XML/PluginRepositoryReader.py Mon Oct 14 20:08:19 2013 +0200 +++ b/E5XML/PluginRepositoryReader.py Tue Oct 15 18:29:32 2013 +0200 @@ -40,7 +40,8 @@ self.readNext() if self.isStartElement(): if self.name() == "Plugins": - self.version = self.attribute("version", + self.version = self.attribute( + "version", pluginRepositoryFileFormatVersion) if self.version not in self.supportedVersions: self.raiseUnsupportedFormatVersion(self.version)
--- a/E5XML/ProjectReader.py Mon Oct 14 20:08:19 2013 +0200 +++ b/E5XML/ProjectReader.py Tue Oct 15 18:29:32 2013 +0200 @@ -112,20 +112,22 @@ elif self.name() == "LexerAssociations": self.__readLexerAssociations() elif self.name() == "ProjectTypeSpecific": - self.__readBasicDataField("ProjectTypeSpecific", - "ProjectTypeSpecificData", "PROJECTTYPESPECIFICDATA") + self.__readBasicDataField( + "ProjectTypeSpecific", "ProjectTypeSpecificData", + "PROJECTTYPESPECIFICDATA") elif self.name() == "Documentation": - self.__readBasicDataField("Documentation", - "DocumentationParams", "DOCUMENTATIONPARMS") + self.__readBasicDataField( + "Documentation", "DocumentationParams", + "DOCUMENTATIONPARMS") elif self.name() == "Packagers": - self.__readBasicDataField("Packagers", - "PackagersParams", "PACKAGERSPARMS") + self.__readBasicDataField( + "Packagers", "PackagersParams", "PACKAGERSPARMS") elif self.name() == "Checkers": - self.__readBasicDataField("Checkers", - "CheckersParams", "CHECKERSPARMS") + self.__readBasicDataField( + "Checkers", "CheckersParams", "CHECKERSPARMS") elif self.name() == "OtherTools": - self.__readBasicDataField("OtherTools", - "OtherToolsParams", "OTHERTOOLSPARMS") + self.__readBasicDataField( + "OtherTools", "OtherToolsParams", "OTHERTOOLSPARMS") else: self.raiseUnexpectedStartTag(self.name())
--- a/E5XML/ProjectWriter.py Mon Oct 14 20:08:19 2013 +0200 +++ b/E5XML/ProjectWriter.py Tue Oct 15 18:29:32 2013 +0200 @@ -61,10 +61,12 @@ # do the language (used for spell checking) self.writeTextElement("Language", self.pdata["SPELLLANGUAGE"][0]) if len(self.pdata["SPELLWORDS"][0]) > 0: - self.writeTextElement("ProjectWordList", + self.writeTextElement( + "ProjectWordList", Utilities.fromNativeSeparators(self.pdata["SPELLWORDS"][0])) if len(self.pdata["SPELLEXCLUDES"][0]) > 0: - self.writeTextElement("ProjectExcludeList", + self.writeTextElement( + "ProjectExcludeList", Utilities.fromNativeSeparators(self.pdata["SPELLEXCLUDES"][0])) # do the hash @@ -131,7 +133,8 @@ if self.pdata["TRANSLATIONEXCEPTIONS"]: self.writeStartElement("TranslationExceptions") for name in self.pdata["TRANSLATIONEXCEPTIONS"]: - self.writeTextElement("TranslationException", + self.writeTextElement( + "TranslationException", Utilities.fromNativeSeparators(name)) self.writeEndElement() @@ -158,7 +161,8 @@ # do the main script if self.pdata["MAINSCRIPT"]: - self.writeTextElement("MainScript", + self.writeTextElement( + "MainScript", Utilities.fromNativeSeparators(self.pdata["MAINSCRIPT"][0])) # do the vcs stuff @@ -192,7 +196,8 @@ if len(self.pdata["PROJECTTYPESPECIFICDATA"]): self.writeStartElement("ProjectTypeSpecific") if self.pdata["PROJECTTYPESPECIFICDATA"]: - self.writeBasics("ProjectTypeSpecificData", + self.writeBasics( + "ProjectTypeSpecificData", self.pdata["PROJECTTYPESPECIFICDATA"]) self.writeEndElement() @@ -200,32 +205,32 @@ if len(self.pdata["DOCUMENTATIONPARMS"]): self.writeStartElement("Documentation") if self.pdata["DOCUMENTATIONPARMS"]: - self.writeBasics("DocumentationParams", - self.pdata["DOCUMENTATIONPARMS"]) + self.writeBasics( + "DocumentationParams", self.pdata["DOCUMENTATIONPARMS"]) self.writeEndElement() # do the packagers stuff if len(self.pdata["PACKAGERSPARMS"]): self.writeStartElement("Packagers") if self.pdata["PACKAGERSPARMS"]: - self.writeBasics("PackagersParams", - self.pdata["PACKAGERSPARMS"]) + self.writeBasics( + "PackagersParams", self.pdata["PACKAGERSPARMS"]) self.writeEndElement() # do the checkers stuff if len(self.pdata["CHECKERSPARMS"]): self.writeStartElement("Checkers") if self.pdata["CHECKERSPARMS"]: - self.writeBasics("CheckersParams", - self.pdata["CHECKERSPARMS"]) + self.writeBasics( + "CheckersParams", self.pdata["CHECKERSPARMS"]) self.writeEndElement() # do the other tools stuff if len(self.pdata["OTHERTOOLSPARMS"]): self.writeStartElement("OtherTools") if self.pdata["OTHERTOOLSPARMS"]: - self.writeBasics("OtherToolsParams", - self.pdata["OTHERTOOLSPARMS"]) + self.writeBasics( + "OtherToolsParams", self.pdata["OTHERTOOLSPARMS"]) self.writeEndElement() self.writeEndElement()
--- a/E5XML/SessionReader.py Mon Oct 14 20:08:19 2013 +0200 +++ b/E5XML/SessionReader.py Tue Oct 15 18:29:32 2013 +0200 @@ -156,8 +156,8 @@ while not self.atEnd(): self.readNext() if self.isEndElement() and self.name() == "Breakpoint": - self.dbs.getBreakPointModel().addBreakPoint(filename, lineno, - (bpCond, bpTemp, bpEnabled, bpCount)) + self.dbs.getBreakPointModel().addBreakPoint( + filename, lineno, (bpCond, bpTemp, bpEnabled, bpCount)) break if self.isStartElement(): @@ -206,8 +206,8 @@ while not self.atEnd(): self.readNext() if self.isEndElement() and self.name() == "Watchexpression": - self.dbs.getWatchPointModel().addWatchPoint(weCond, - (weTemp, weEnabled, weCount, weSpecialCond)) + self.dbs.getWatchPointModel().addWatchPoint( + weCond, (weTemp, weEnabled, weCount, weSpecialCond)) break if self.isStartElement():
--- a/E5XML/SessionWriter.py Mon Oct 14 20:08:19 2013 +0200 +++ b/E5XML/SessionWriter.py Tue Oct 15 18:29:32 2013 +0200 @@ -66,8 +66,8 @@ # step 0: save open multi project and project for the global session if isGlobal: if self.multiProject.isOpen(): - self.writeTextElement("MultiProject", - self.multiProject.getMultiProjectFile()) + self.writeTextElement( + "MultiProject", self.multiProject.getMultiProjectFile()) if self.project.isOpen(): self.writeTextElement("Project", self.project.getProjectFile())
--- a/E5XML/ShortcutsWriter.py Mon Oct 14 20:08:19 2013 +0200 +++ b/E5XML/ShortcutsWriter.py Tue Oct 15 18:29:32 2013 +0200 @@ -50,36 +50,49 @@ self.writeStartElement("Shortcuts") self.writeAttribute("version", shortcutsFileFormatVersion) - self.__writeActions("Project", + self.__writeActions( + "Project", e5App().getObject("Project").getActions()) - self.__writeActions("General", + self.__writeActions( + "General", e5App().getObject("UserInterface").getActions('ui')) - self.__writeActions("Wizards", + self.__writeActions( + "Wizards", e5App().getObject("UserInterface").getActions('wizards')) - self.__writeActions("Debug", + self.__writeActions( + "Debug", e5App().getObject("DebugUI").getActions()) - self.__writeActions("Edit", + self.__writeActions( + "Edit", e5App().getObject("ViewManager").getActions('edit')) - self.__writeActions("File", + self.__writeActions( + "File", e5App().getObject("ViewManager").getActions('file')) - self.__writeActions("Search", + self.__writeActions( + "Search", e5App().getObject("ViewManager").getActions('search')) - self.__writeActions("View", + self.__writeActions( + "View", e5App().getObject("ViewManager").getActions('view')) - self.__writeActions("Macro", + self.__writeActions( + "Macro", e5App().getObject("ViewManager").getActions('macro')) - self.__writeActions("Bookmarks", + self.__writeActions( + "Bookmarks", e5App().getObject("ViewManager").getActions('bookmark')) - self.__writeActions("Spelling", + self.__writeActions( + "Spelling", e5App().getObject("ViewManager").getActions('spelling')) - self.__writeActions("Window", + self.__writeActions( + "Window", e5App().getObject("ViewManager").getActions('window')) for category, ref in e5App().getPluginObjects(): if hasattr(ref, "getActions"): self.__writeActions(category, ref.getActions()) - self.__writeActions("HelpViewer", + self.__writeActions( + "HelpViewer", e5App().getObject("DummyHelpViewer").getActions()) # add the main end tag
--- a/E5XML/TasksReader.py Mon Oct 14 20:08:19 2013 +0200 +++ b/E5XML/TasksReader.py Tue Oct 15 18:29:32 2013 +0200 @@ -93,7 +93,8 @@ while not self.atEnd(): self.readNext() if self.isEndElement() and self.name() == "Task": - self.viewer.addTask(task["summary"], priority=task["priority"], + self.viewer.addTask( + task["summary"], priority=task["priority"], filename=task["filename"], lineno=task["linenumber"], completed=task["completed"], _time=task["created"], isProjectTask=self.forProject, taskType=task["type"],
--- a/E5XML/TasksWriter.py Mon Oct 14 20:08:19 2013 +0200 +++ b/E5XML/TasksWriter.py Tue Oct 15 18:29:32 2013 +0200 @@ -62,7 +62,8 @@ # write the project scan filter if self.forProject: - self.writeTextElement("ProjectScanFilter", + self.writeTextElement( + "ProjectScanFilter", e5App().getObject("TaskViewer").projectTasksScanFilter.strip()) # do the tasks @@ -81,7 +82,8 @@ "%Y-%m-%d, %H:%M:%S", time.localtime(task.created))) if task.filename: self.writeStartElement("Resource") - self.writeTextElement("Filename", + self.writeTextElement( + "Filename", Utilities.fromNativeSeparators(task.filename)) self.writeTextElement("Linenumber", str(task.lineno)) self.writeEndElement()
--- a/E5XML/UserProjectReader.py Mon Oct 14 20:08:19 2013 +0200 +++ b/E5XML/UserProjectReader.py Tue Oct 15 18:29:32 2013 +0200 @@ -49,7 +49,8 @@ self.project.pudata["VCSOVERRIDE"] = [ self.readElementText()] elif self.name() == "VcsStatusMonitorInterval": - interval = int(self.attribute("value", + interval = int(self.attribute( + "value", Preferences.getVCS("StatusMonitorInterval"))) self.project.pudata["VCSSTATUSMONITORINTERVAL"] = [ interval]
--- a/E5XML/XMLStreamReaderBase.py Mon Oct 14 20:08:19 2013 +0200 +++ b/E5XML/XMLStreamReaderBase.py Tue Oct 15 18:29:32 2013 +0200 @@ -48,7 +48,8 @@ Public method to show an error message. """ if self.hasError(): - msg = QCoreApplication.translate("XMLStreamReaderBase", + msg = QCoreApplication.translate( + "XMLStreamReaderBase", "<p>XML parse error in file <b>{0}</b>, line {1}," " column {2}</p><p>Error: {3}</p>").format( self.device().fileName(), @@ -66,8 +67,8 @@ @param tag name of the unexpected tag (string) """ - self.raiseError(QCoreApplication.translate("XMLStreamReaderBase", - "Unexpected start tag '{0}'.".format(tag))) + self.raiseError(QCoreApplication.translate( + "XMLStreamReaderBase", "Unexpected start tag '{0}'.".format(tag))) def raiseUnsupportedFormatVersion(self, version): """ @@ -75,7 +76,8 @@ @param version unsupported version (string) """ - self.raiseError(QCoreApplication.translate("XMLStreamReaderBase", + self.raiseError(QCoreApplication.translate( + "XMLStreamReaderBase", "File format version '{0}' is not supported.").format(version)) def raiseBadValue(self, value): @@ -84,8 +86,8 @@ @param value bad value (string) """ - self.raiseError(QCoreApplication.translate("XMLStreamReaderBase", - "Bad value: {0}").format(value)) + self.raiseError(QCoreApplication.translate( + "XMLStreamReaderBase", "Bad value: {0}").format(value)) def readXML(self): """
--- a/Graphics/ApplicationDiagramBuilder.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Graphics/ApplicationDiagramBuilder.py Tue Oct 15 18:29:32 2013 +0200 @@ -62,7 +62,8 @@ tot = len(modules) try: prog = 0 - progress = QProgressDialog(self.trUtf8("Parsing modules..."), + progress = QProgressDialog( + self.trUtf8("Parsing modules..."), None, 0, tot, self.parent()) progress.show() QApplication.processEvents()
--- a/Graphics/AssociationItem.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Graphics/AssociationItem.py Tue Oct 15 18:29:32 2013 +0200 @@ -67,7 +67,7 @@ arrowFilled = False E5ArrowItem.__init__(self, QPointF(0, 0), QPointF(100, 100), - arrowFilled, arrowType, parent) + arrowFilled, arrowType, parent) self.setFlag(QGraphicsItem.ItemIsMovable, False) self.setFlag(QGraphicsItem.ItemIsSelectable, False) @@ -128,7 +128,7 @@ rectB.y() + rectB.height()) else: startP = QPointF(rectA.x() + rectA.width() / 2.0, - rectA.y() + rectA.height()) + rectA.y() + rectA.height()) endP = QPointF(rectB.x() + rectB.width() / 2.0, rectB.y()) self.setPoints(startP.x(), startP.y(), endP.x(), endP.y())
--- a/Graphics/ImportsDiagramBuilder.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Graphics/ImportsDiagramBuilder.py Tue Oct 15 18:29:32 2013 +0200 @@ -87,7 +87,8 @@ tot = len(modules) try: prog = 0 - progress = QProgressDialog(self.trUtf8("Parsing modules..."), + progress = QProgressDialog( + self.trUtf8("Parsing modules..."), None, 0, tot, self.parent()) progress.show() QApplication.processEvents()
--- a/Graphics/PackageDiagramBuilder.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Graphics/PackageDiagramBuilder.py Tue Oct 15 18:29:32 2013 +0200 @@ -87,7 +87,8 @@ tot = len(modules) try: prog = 0 - progress = QProgressDialog(self.trUtf8("Parsing modules..."), + progress = QProgressDialog( + self.trUtf8("Parsing modules..."), None, 0, tot, self.parent()) progress.show() QApplication.processEvents() @@ -145,7 +146,8 @@ tot += len(glob.glob(Utilities.normjoinpath(subpackage, ext))) try: prog = 0 - progress = QProgressDialog(self.trUtf8("Parsing modules..."), + progress = QProgressDialog( + self.trUtf8("Parsing modules..."), None, 0, tot, self.parent()) progress.show() QApplication.processEvents()
--- a/Graphics/PixmapDiagram.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Graphics/PixmapDiagram.py Tue Oct 15 18:29:32 2013 +0200 @@ -152,7 +152,8 @@ E5MessageBox.warning( self, self.trUtf8("Pixmap-Viewer"), - self.trUtf8("""<p>The file <b>{0}</b> cannot be displayed.""" + self.trUtf8( + """<p>The file <b>{0}</b> cannot be displayed.""" """ The format is not supported.</p>""").format(filename)) return False @@ -381,15 +382,15 @@ painter.setPen(tc) painter.drawRect(marginX, marginY, width, height) painter.drawLine(marginX, marginY + height + 2, - marginX + width, marginY + height + 2) + marginX + width, marginY + height + 2) painter.setFont(font) painter.drawText(marginX, marginY + height + 4, width, - fontHeight, Qt.AlignRight, s) + fontHeight, Qt.AlignRight, s) # render the diagram size = self.pixmapLabel.pixmap().size() size.scale(QSize(width - 10, height - 10), # 5 px inner margin - Qt.KeepAspectRatio) + Qt.KeepAspectRatio) painter.setViewport(marginX + 5, marginY + 5, size.width(), size.height()) painter.setWindow(self.pixmapLabel.pixmap().rect())
--- a/Graphics/SvgDiagram.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Graphics/SvgDiagram.py Tue Oct 15 18:29:32 2013 +0200 @@ -349,10 +349,10 @@ painter.setPen(tc) painter.drawRect(marginX, marginY, width, height) painter.drawLine(marginX, marginY + height + 2, - marginX + width, marginY + height + 2) + marginX + width, marginY + height + 2) painter.setFont(font) painter.drawText(marginX, marginY + height + 4, width, - fontHeight, Qt.AlignRight, s) + fontHeight, Qt.AlignRight, s) # render the diagram painter.setViewport(marginX, marginY, width, height)
--- a/Graphics/UMLDialog.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Graphics/UMLDialog.py Tue Oct 15 18:29:32 2013 +0200 @@ -242,8 +242,8 @@ lines = [ "version: 1.0", - "diagram_type: {0} ({1})".format(self.__diagramType, - self.__diagramTypeString()), + "diagram_type: {0} ({1})".format( + self.__diagramType, self.__diagramTypeString()), "scene_size: {0};{1}".format(self.scene.width(), self.scene.height()), ]
--- a/Graphics/UMLGraphicsView.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Graphics/UMLGraphicsView.py Tue Oct 15 18:29:32 2013 +0200 @@ -744,7 +744,7 @@ AssociationItem.parseAssociationItemDataString( value.strip()) assoc = AssociationItem(umlItems[srcId], umlItems[dstId], - assocType, topToBottom) + assocType, topToBottom) self.scene().addItem(assoc) return True, -1
--- a/Helpviewer/AdBlock/AdBlockAccessHandler.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/AdBlock/AdBlockAccessHandler.py Tue Oct 15 18:29:32 2013 +0200 @@ -53,7 +53,8 @@ dlg = Helpviewer.HelpWindow.HelpWindow.adBlockManager()\ .showDialog() - subscription = AdBlockSubscription(url, False, + subscription = AdBlockSubscription( + url, False, Helpviewer.HelpWindow.HelpWindow.adBlockManager()) Helpviewer.HelpWindow.HelpWindow.adBlockManager()\ .addSubscription(subscription)
--- a/Helpviewer/AdBlock/AdBlockDialog.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/AdBlock/AdBlockDialog.py Tue Oct 15 18:29:32 2013 +0200 @@ -140,7 +140,8 @@ menu.addAction( self.trUtf8("Update Subscription"), self.__updateSubscription)\ .setEnabled(not subscriptionEditable) - menu.addAction(self.trUtf8("Update All Subscriptions"), + menu.addAction( + self.trUtf8("Update All Subscriptions"), self.__updateAllSubscriptions) menu.addSeparator() menu.addAction(self.trUtf8("Learn more about writing rules..."),
--- a/Helpviewer/AdBlock/AdBlockIcon.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/AdBlock/AdBlockIcon.py Tue Oct 15 18:29:32 2013 +0200 @@ -81,17 +81,21 @@ if manager.isEnabled() and \ self.__mw.currentBrowser().page().url().host(): if self.__isCurrentHostExcepted(): - menu.addAction(UI.PixmapCache.getIcon("adBlockPlus.png"), + menu.addAction( + UI.PixmapCache.getIcon("adBlockPlus.png"), self.trUtf8("Remove AdBlock Exception"), self.__setException).setData(False) else: - menu.addAction(UI.PixmapCache.getIcon("adBlockPlusGreen.png"), + menu.addAction( + UI.PixmapCache.getIcon("adBlockPlusGreen.png"), self.trUtf8("Add AdBlock Exception"), self.__setException).setData(True) - menu.addAction(UI.PixmapCache.getIcon("adBlockPlusGreen.png"), + menu.addAction( + UI.PixmapCache.getIcon("adBlockPlusGreen.png"), self.trUtf8("AdBlock Exceptions..."), manager.showExceptionsDialog) menu.addSeparator() - menu.addAction(UI.PixmapCache.getIcon("adBlockPlus.png"), + menu.addAction( + UI.PixmapCache.getIcon("adBlockPlus.png"), self.trUtf8("AdBlock Configuration..."), manager.showDialog) menu.addSeparator()
--- a/Helpviewer/AdBlock/AdBlockManager.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/AdBlock/AdBlockManager.py Tue Oct 15 18:29:32 2013 +0200 @@ -294,10 +294,11 @@ subscriptions.append(self.__customSubscriptionUrlString) else: subscriptions = [self.__defaultSubscriptionUrlString, - self.__customSubscriptionUrlString] + self.__customSubscriptionUrlString] for subscription in subscriptions: url = QUrl.fromEncoded(subscription.encode()) - adBlockSubscription = AdBlockSubscription(url, + adBlockSubscription = AdBlockSubscription( + url, subscription.startswith(self.__customSubscriptionUrlString), self, subscription.startswith(self.__defaultSubscriptionUrlString))
--- a/Helpviewer/AdBlock/AdBlockRule.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/AdBlock/AdBlockRule.py Tue Oct 15 18:29:32 2013 +0200 @@ -556,7 +556,8 @@ # escape special symbols pattern = re.sub(r"(\W)", r"\\\1", pattern) # process extended anchor at expression start - pattern = re.sub(r"^\\\|\\\|", + pattern = re.sub( + r"^\\\|\\\|", r"^[\w\-]+:\/+(?!\/)(?:[^\/]+\.)?", pattern) # process separator placeholders pattern = re.sub(r"\\\^", r"(?:[^\w\d\-.%]|$)", pattern)
--- a/Helpviewer/AdBlock/AdBlockSubscription.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/AdBlock/AdBlockSubscription.py Tue Oct 15 18:29:32 2013 +0200 @@ -355,7 +355,8 @@ import Helpviewer.HelpWindow from Helpviewer.Network.FollowRedirectReply import FollowRedirectReply - self.__downloading = FollowRedirectReply(self.location(), + self.__downloading = FollowRedirectReply( + self.location(), Helpviewer.HelpWindow.HelpWindow.networkAccessManager()) self.__downloading.finished[()].connect(self.__rulesDownloaded)
--- a/Helpviewer/AdBlock/AdBlockTreeWidget.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/AdBlock/AdBlockTreeWidget.py Tue Oct 15 18:29:32 2013 +0200 @@ -218,8 +218,8 @@ self.refresh() self.__itemChangingBlock = True - self.__topItem.setText(0, - self.trUtf8("{0} (recently updated)").format( + self.__topItem.setText( + 0, self.trUtf8("{0} (recently updated)").format( self.__subscription.title())) self.__itemChangingBlock = False
--- a/Helpviewer/Bookmarks/BookmarksImporters/ChromeImporter.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/Bookmarks/BookmarksImporters/ChromeImporter.py Tue Oct 15 18:29:32 2013 +0200 @@ -48,7 +48,8 @@ """Google Chrome stores its bookmarks in the""" """ <b>Bookmarks</b> text file. This file is usually""" """ located in"""), - QCoreApplication.translate("ChromeImporter", + QCoreApplication.translate( + "ChromeImporter", """Please choose the file to begin importing bookmarks."""), standardDir, ) @@ -67,7 +68,8 @@ "ChromeImporter", """Chromium stores its bookmarks in the <b>Bookmarks</b>""" """ text file. This file is usually located in"""), - QCoreApplication.translate("ChromeImporter", + QCoreApplication.translate( + "ChromeImporter", """Please choose the file to begin importing bookmarks."""), standardDir, )
--- a/Helpviewer/Bookmarks/BookmarksImporters/FirefoxImporter.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/Bookmarks/BookmarksImporters/FirefoxImporter.py Tue Oct 15 18:29:32 2013 +0200 @@ -42,11 +42,13 @@ UI.PixmapCache.getPixmap("chrome.png"), "Mozilla Firefox", "places.sqlite", - QCoreApplication.translate("FirefoxImporter", + QCoreApplication.translate( + "FirefoxImporter", """Mozilla Firefox stores its bookmarks in the""" """ <b>places.sqlite</b> SQLite database. This file is""" """ usually located in"""), - QCoreApplication.translate("FirefoxImporter", + QCoreApplication.translate( + "FirefoxImporter", """Please choose the file to begin importing bookmarks."""), standardDir, )
--- a/Helpviewer/Bookmarks/BookmarksImporters/OperaImporter.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/Bookmarks/BookmarksImporters/OperaImporter.py Tue Oct 15 18:29:32 2013 +0200 @@ -40,10 +40,12 @@ UI.PixmapCache.getPixmap("opera.png"), "Opera", "bookmarks.adr", - QCoreApplication.translate("OperaImporter", + QCoreApplication.translate( + "OperaImporter", """Opera stores its bookmarks in the <b>bookmarks.adr</b> """ """text file. This file is usually located in"""), - QCoreApplication.translate("OperaImporter", + QCoreApplication.translate( + "OperaImporter", """Please choose the file to begin importing bookmarks."""), standardDir, )
--- a/Helpviewer/Bookmarks/BookmarksImporters/SafariImporter.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/Bookmarks/BookmarksImporters/SafariImporter.py Tue Oct 15 18:29:32 2013 +0200 @@ -47,7 +47,8 @@ """Apple Safari stores its bookmarks in the""" """ <b>Bookmarks.plist</b> file. This file is usually""" """ located in"""), - QCoreApplication.translate("SafariImporter", + QCoreApplication.translate( + "SafariImporter", """Please choose the file to begin importing bookmarks."""), standardDir, )
--- a/Helpviewer/Bookmarks/BookmarksImporters/XbelImporter.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/Bookmarks/BookmarksImporters/XbelImporter.py Tue Oct 15 18:29:32 2013 +0200 @@ -39,7 +39,8 @@ """eric5 Web Browser stores its bookmarks in the""" """ <b>{0}</b> XML file. This file is usually located in""" ).format(os.path.basename(bookmarksFile)), - QCoreApplication.translate("XbelImporter", + QCoreApplication.translate( + "XbelImporter", """Please choose the file to begin importing bookmarks."""), os.path.dirname(bookmarksFile), ) @@ -59,7 +60,8 @@ """Konqueror stores its bookmarks in the""" """ <b>bookmarks.xml</b> XML file. This file is usually""" """ located in"""), - QCoreApplication.translate("XbelImporter", + QCoreApplication.translate( + "XbelImporter", """Please choose the file to begin importing bookmarks."""), standardDir, )
--- a/Helpviewer/Bookmarks/BookmarksToolBar.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/Bookmarks/BookmarksToolBar.py Tue Oct 15 18:29:32 2013 +0200 @@ -36,8 +36,9 @@ @param model reference to the bookmarks model (BookmarksModel) @param parent reference to the parent widget (QWidget) """ - E5ModelToolBar.__init__(self, - QApplication.translate("BookmarksToolBar", "Bookmarks"), parent) + E5ModelToolBar.__init__( + self, QApplication.translate("BookmarksToolBar", "Bookmarks"), + parent) self.__mw = mainWindow self.__bookmarksModel = model
--- a/Helpviewer/Bookmarks/NsHtmlWriter.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/Bookmarks/NsHtmlWriter.py Tue Oct 15 18:29:32 2013 +0200 @@ -53,7 +53,8 @@ @param root root node of the bookmark tree (BookmarkNode) @return flag indicating success (boolean) """ - self.__dev.write("<!DOCTYPE NETSCAPE-Bookmark-file-1>\n" + self.__dev.write( + "<!DOCTYPE NETSCAPE-Bookmark-file-1>\n" "<!-- This is an automatically generated file.\n" " It will be read and overwritten.\n" " DO NOT EDIT! -->\n"
--- a/Helpviewer/Download/DownloadManager.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/Download/DownloadManager.py Tue Oct 15 18:29:32 2013 +0200 @@ -80,22 +80,28 @@ row = self.downloadsView.selectionModel().selectedRows()[0].row() itm = self.__downloads[row] if itm.downloadCanceled(): - menu.addAction(UI.PixmapCache.getIcon("restart.png"), + menu.addAction( + UI.PixmapCache.getIcon("restart.png"), self.trUtf8("Retry"), self.__contextMenuRetry) else: if itm.downloadedSuccessfully(): - menu.addAction(UI.PixmapCache.getIcon("open.png"), + menu.addAction( + UI.PixmapCache.getIcon("open.png"), self.trUtf8("Open"), self.__contextMenuOpen) elif itm.downloading(): - menu.addAction(UI.PixmapCache.getIcon("stopLoading.png"), + menu.addAction( + UI.PixmapCache.getIcon("stopLoading.png"), self.trUtf8("Cancel"), self.__contextMenuCancel) menu.addSeparator() - menu.addAction(self.trUtf8("Open Containing Folder"), + menu.addAction( + self.trUtf8("Open Containing Folder"), self.__contextMenuOpenFolder) menu.addSeparator() - menu.addAction(self.trUtf8("Go to Download Page"), + menu.addAction( + self.trUtf8("Go to Download Page"), self.__contextMenuGotoPage) - menu.addAction(self.trUtf8("Copy Download Link"), + menu.addAction( + self.trUtf8("Copy Download Link"), self.__contextMenuCopyLink) menu.addSeparator() menu.addAction(self.trUtf8("Select All"), self.__contextMenuSelectAll) @@ -105,7 +111,8 @@ self.downloadsView.selectionModel().selectedRows()[0].row()]\ .downloading()): menu.addSeparator() - menu.addAction(self.trUtf8("Remove From List"), + menu.addAction( + self.trUtf8("Remove From List"), self.__contextMenuRemoveSelected) menu.exec_(QCursor.pos()) @@ -163,7 +170,8 @@ request = QNetworkRequest(requestOrUrl) if request.url().isEmpty(): return - self.handleUnsupportedContent(self.__manager.get(request), + self.handleUnsupportedContent( + self.__manager.get(request), requestFileName=requestFileName, download=True, mainWindow=mainWindow) @@ -251,7 +259,8 @@ itm.setIcon(icon) oldHeight = self.downloadsView.rowHeight(row) - self.downloadsView.setRowHeight(row, + self.downloadsView.setRowHeight( + row, max(oldHeight, itm.minimumSizeHint().height() * 1.5)) remove = False
--- a/Helpviewer/Download/DownloadUtilities.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/Download/DownloadUtilities.py Tue Oct 15 18:29:32 2013 +0200 @@ -26,7 +26,8 @@ QCoreApplication.UnicodeUTF8, minutes).format(seconds) else: seconds = int(timeRemaining) - remaining = QCoreApplication.translate("DownloadUtilities", + remaining = QCoreApplication.translate( + "DownloadUtilities", "%n seconds remaining", "", QCoreApplication.UnicodeUTF8, seconds) return remaining
--- a/Helpviewer/GreaseMonkey/GreaseMonkeyConfiguration/GreaseMonkeyConfigurationDialog.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/GreaseMonkey/GreaseMonkeyConfiguration/GreaseMonkeyConfigurationDialog.py Tue Oct 15 18:29:32 2013 +0200 @@ -89,9 +89,11 @@ itm = QListWidgetItem( UI.PixmapCache.getIcon("greaseMonkeyScript.png"), script.name(), self.scriptsList) - itm.setData(GreaseMonkeyConfigurationDialog.ScriptVersionRole, + itm.setData( + GreaseMonkeyConfigurationDialog.ScriptVersionRole, script.version()) - itm.setData(GreaseMonkeyConfigurationDialog.ScriptDescriptionRole, + itm.setData( + GreaseMonkeyConfigurationDialog.ScriptDescriptionRole, script.description()) itm.setFlags(itm.flags() | Qt.ItemIsUserCheckable) if script.isEnabled():
--- a/Helpviewer/GreaseMonkey/GreaseMonkeyConfiguration/GreaseMonkeyConfigurationListDelegate.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/GreaseMonkey/GreaseMonkeyConfiguration/GreaseMonkeyConfigurationListDelegate.py Tue Oct 15 18:29:32 2013 +0200 @@ -94,7 +94,8 @@ opt2.state |= QStyle.State_Off styleCheckBoxRect = style.subElementRect( QStyle.SE_ViewItemCheckIndicator, opt2, widget) - opt2.rect = QRect(leftPos, checkBoxYPos, + opt2.rect = QRect( + leftPos, checkBoxYPos, styleCheckBoxRect.width(), styleCheckBoxRect.height()) style.drawPrimitive(QStyle.PE_IndicatorViewItemCheck, opt2, painter, widget) @@ -103,8 +104,8 @@ # Draw icon iconYPos = center - GreaseMonkeyConfigurationListDelegate.IconSize // 2 iconRect = QRect(leftPos, iconYPos, - GreaseMonkeyConfigurationListDelegate.IconSize, - GreaseMonkeyConfigurationListDelegate.IconSize) + GreaseMonkeyConfigurationListDelegate.IconSize, + GreaseMonkeyConfigurationListDelegate.IconSize) pixmap = index.data(Qt.DecorationRole).pixmap( GreaseMonkeyConfigurationListDelegate.IconSize) painter.drawPixmap(iconRect, pixmap) @@ -116,14 +117,15 @@ rightTitleEdge = rightPos - self.__padding leftPosForVersion = titleMetrics.width(name) + self.__padding nameRect = QRect(leftTitleEdge, opt.rect.top() + self.__padding, - rightTitleEdge - leftTitleEdge, titleMetrics.height()) + rightTitleEdge - leftTitleEdge, titleMetrics.height()) painter.setFont(titleFont) style.drawItemText(painter, nameRect, Qt.AlignLeft, opt.palette, True, - name, colorRole) + name, colorRole) # Draw version version = index.data(Qt.UserRole) - versionRect = QRect(nameRect.x() + leftPosForVersion, nameRect.y(), + versionRect = QRect( + nameRect.x() + leftPosForVersion, nameRect.y(), rightTitleEdge - leftTitleEdge, titleMetrics.height()) versionFont = titleFont painter.setFont(versionFont) @@ -132,18 +134,20 @@ # Draw description infoYPos = nameRect.bottom() + opt.fontMetrics.leading() - infoRect = QRect(nameRect.x(), infoYPos, + infoRect = QRect( + nameRect.x(), infoYPos, nameRect.width(), opt.fontMetrics.height()) info = opt.fontMetrics.elidedText( index.data(Qt.UserRole + 1), Qt.ElideRight, infoRect.width()) painter.setFont(opt.font) style.drawItemText(painter, infoRect, Qt.AlignLeft | Qt.TextSingleLine, - opt.palette, True, info, colorRole) + opt.palette, True, info, colorRole) # Draw remove button removeIconYPos = center - \ GreaseMonkeyConfigurationListDelegate.RemoveIconSize // 2 - removeIconRect = QRect(rightPos, removeIconYPos, + removeIconRect = QRect( + rightPos, removeIconYPos, GreaseMonkeyConfigurationListDelegate.RemoveIconSize, GreaseMonkeyConfigurationListDelegate.RemoveIconSize) painter.drawPixmap(removeIconRect, self.__removePixmap)
--- a/Helpviewer/GreaseMonkey/GreaseMonkeyConfiguration/GreaseMonkeyConfigurationScriptInfoDialog.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/GreaseMonkey/GreaseMonkeyConfiguration/GreaseMonkeyConfigurationScriptInfoDialog.py Tue Oct 15 18:29:32 2013 +0200 @@ -18,8 +18,8 @@ import UI.PixmapCache -class GreaseMonkeyConfigurationScriptInfoDialog(QDialog, - Ui_GreaseMonkeyConfigurationScriptInfoDialog): +class GreaseMonkeyConfigurationScriptInfoDialog( + QDialog, Ui_GreaseMonkeyConfigurationScriptInfoDialog): """ Class implementing a dialog to show GreaseMonkey script information. """
--- a/Helpviewer/GreaseMonkey/GreaseMonkeyDownloader.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/GreaseMonkey/GreaseMonkeyDownloader.py Tue Oct 15 18:29:32 2013 +0200 @@ -37,7 +37,8 @@ self.__manager = manager - self.__reply = FollowRedirectReply(request.url(), + self.__reply = FollowRedirectReply( + request.url(), Helpviewer.HelpWindow.HelpWindow.networkAccessManager()) self.__reply.finished.connect(self.__scriptDownloaded) @@ -57,7 +58,8 @@ if self.__reply.error() == QNetworkReply.NoError and \ "// ==UserScript==" in response: from Helpviewer import HelpUtilities - filePath = os.path.join(self.__manager.scriptsDirectory(), + filePath = os.path.join( + self.__manager.scriptsDirectory(), HelpUtilities.getFileNameFromUrl(self.__reply.url())) self.__fileName = HelpUtilities.ensureUniqueFilename(filePath) @@ -144,7 +146,8 @@ Private slot to initiate the download of required scripts. """ if self.__requireUrls: - self.__reply = FollowRedirectReply(self.__requireUrls.pop(0), + self.__reply = FollowRedirectReply( + self.__requireUrls.pop(0), Helpviewer.HelpWindow.HelpWindow.networkAccessManager()) self.__reply.finished.connect(self.__requireDownloaded) else:
--- a/Helpviewer/HelpBrowserWV.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/HelpBrowserWV.py Tue Oct 15 18:29:32 2013 +0200 @@ -353,20 +353,24 @@ html = html.replace( "@H2@", self.trUtf8("When connecting to: {0}.")\ .format(urlString).encode("utf8")) - html = html.replace("@LI-1@", + html = html.replace( + "@LI-1@", self.trUtf8("Check the address for errors such as " "<b>ww</b>.example.org instead of " "<b>www</b>.example.org").encode("utf8")) - html = html.replace("@LI-2@", + html = html.replace( + "@LI-2@", self.trUtf8( "If the address is correct, try checking the network " "connection.").encode("utf8")) - html = html.replace("@LI-3@", + html = html.replace( + "@LI-3@", self.trUtf8( "If your computer or network is protected by a firewall " "or proxy, make sure that the browser is permitted to " "access the network.").encode("utf8")) - html = html.replace("@LI-4@", + html = html.replace( + "@LI-4@", self.trUtf8("If your cache policy is set to offline browsing," "only pages in the local cache are available.")\ .encode("utf8")) @@ -832,8 +836,10 @@ E5MessageBox.critical( self, self.trUtf8("eric5 Web Browser"), - self.trUtf8("""<p>Could not start a viewer""" - """ for file <b>{0}</b>.</p>""").format(name.path())) + self.trUtf8( + """<p>Could not start a viewer""" + """ for file <b>{0}</b>.</p>""") + .format(name.path())) return elif name.scheme() in ["mailto"]: started = QDesktopServices.openUrl(name) @@ -841,8 +847,10 @@ E5MessageBox.critical( self, self.trUtf8("eric5 Web Browser"), - self.trUtf8("""<p>Could not start an application""" - """ for URL <b>{0}</b>.</p>""").format(name.toString())) + self.trUtf8( + """<p>Could not start an application""" + """ for URL <b>{0}</b>.</p>""") + .format(name.toString())) return elif name.scheme() == "javascript": scriptSource = QUrl.fromPercentEncoding(name.toString( @@ -859,8 +867,10 @@ E5MessageBox.critical( self, self.trUtf8("eric5 Web Browser"), - self.trUtf8("""<p>Could not start a viewer""" - """ for file <b>{0}</b>.</p>""").format(name.path())) + self.trUtf8( + """<p>Could not start a viewer""" + """ for file <b>{0}</b>.</p>""") + .format(name.path())) return if requestData is not None: @@ -1064,17 +1074,21 @@ frameAtPos = self.page().frameAt(evt.pos()) hit = self.page().mainFrame().hitTestContent(evt.pos()) if not hit.linkUrl().isEmpty(): - menu.addAction(UI.PixmapCache.getIcon("openNewTab.png"), + menu.addAction( + UI.PixmapCache.getIcon("openNewTab.png"), self.trUtf8("Open Link in New Tab\tCtrl+LMB"), self.__openLinkInNewTab).setData(hit.linkUrl()) menu.addSeparator() - menu.addAction(UI.PixmapCache.getIcon("download.png"), + menu.addAction( + UI.PixmapCache.getIcon("download.png"), self.trUtf8("Save Lin&k"), self.__downloadLink) - menu.addAction(UI.PixmapCache.getIcon("bookmark22.png"), + menu.addAction( + UI.PixmapCache.getIcon("bookmark22.png"), self.trUtf8("Bookmark this Link"), self.__bookmarkLink)\ .setData(hit.linkUrl()) menu.addSeparator() - menu.addAction(UI.PixmapCache.getIcon("editCopy.png"), + menu.addAction( + UI.PixmapCache.getIcon("editCopy.png"), self.trUtf8("Copy Link to Clipboard"), self.__copyLink) menu.addAction( UI.PixmapCache.getIcon("mailSend.png"), @@ -1090,15 +1104,18 @@ if not hit.imageUrl().isEmpty(): if not menu.isEmpty(): menu.addSeparator() - menu.addAction(UI.PixmapCache.getIcon("openNewTab.png"), + menu.addAction( + UI.PixmapCache.getIcon("openNewTab.png"), self.trUtf8("Open Image in New Tab"), self.__openLinkInNewTab).setData(hit.imageUrl()) menu.addSeparator() - menu.addAction(UI.PixmapCache.getIcon("download.png"), + menu.addAction( + UI.PixmapCache.getIcon("download.png"), self.trUtf8("Save Image"), self.__downloadImage) menu.addAction( self.trUtf8("Copy Image to Clipboard"), self.__copyImage) - menu.addAction(UI.PixmapCache.getIcon("editCopy.png"), + menu.addAction( + UI.PixmapCache.getIcon("editCopy.png"), self.trUtf8("Copy Image Location to Clipboard"), self.__copyLocation).setData(hit.imageUrl().toString()) menu.addAction( @@ -1106,7 +1123,8 @@ self.trUtf8("Send Image Link"), self.__sendLink).setData(hit.imageUrl()) menu.addSeparator() - menu.addAction(UI.PixmapCache.getIcon("adBlockPlus.png"), + menu.addAction( + UI.PixmapCache.getIcon("adBlockPlus.png"), self.trUtf8("Block Image"), self.__blockImage)\ .setData(hit.imageUrl().toString()) if Preferences.getHelp("VirusTotalEnabled") and \ @@ -1145,13 +1163,16 @@ UI.PixmapCache.getIcon("audioVolumeMuted.png"), self.trUtf8("Mute"), self.__muteMedia) menu.addSeparator() - menu.addAction(UI.PixmapCache.getIcon("editCopy.png"), + menu.addAction( + UI.PixmapCache.getIcon("editCopy.png"), self.trUtf8("Copy Media Address to Clipboard"), self.__copyLocation).setData(videoUrl.toString()) - menu.addAction(UI.PixmapCache.getIcon("mailSend.png"), + menu.addAction( + UI.PixmapCache.getIcon("mailSend.png"), self.trUtf8("Send Media Address"), self.__sendLink)\ .setData(videoUrl) - menu.addAction(UI.PixmapCache.getIcon("download.png"), + menu.addAction( + UI.PixmapCache.getIcon("download.png"), self.trUtf8("Save Media"), self.__downloadMedia)\ .setData(videoUrl) @@ -1196,35 +1217,46 @@ fmenu = QMenu(self.trUtf8("This Frame")) frameUrl = self.__clickedFrame.url() if frameUrl.isValid(): - fmenu.addAction(self.trUtf8("Show &only this frame"), + fmenu.addAction( + self.trUtf8("Show &only this frame"), self.__loadClickedFrame) - fmenu.addAction(UI.PixmapCache.getIcon("openNewTab.png"), + fmenu.addAction( + UI.PixmapCache.getIcon("openNewTab.png"), self.trUtf8("Show in new &tab"), self.__openLinkInNewTab).setData(self.__clickedFrame.url()) fmenu.addSeparator() - fmenu.addAction(UI.PixmapCache.getIcon("print.png"), + fmenu.addAction( + UI.PixmapCache.getIcon("print.png"), self.trUtf8("&Print"), self.__printClickedFrame) - fmenu.addAction(UI.PixmapCache.getIcon("printPreview.png"), + fmenu.addAction( + UI.PixmapCache.getIcon("printPreview.png"), self.trUtf8("Print Preview"), self.__printPreviewClickedFrame) - fmenu.addAction(UI.PixmapCache.getIcon("printPdf.png"), + fmenu.addAction( + UI.PixmapCache.getIcon("printPdf.png"), self.trUtf8("Print as PDF"), self.__printPdfClickedFrame) fmenu.addSeparator() - fmenu.addAction(UI.PixmapCache.getIcon("zoomIn.png"), + fmenu.addAction( + UI.PixmapCache.getIcon("zoomIn.png"), self.trUtf8("Zoom &in"), self.__zoomInClickedFrame) - fmenu.addAction(UI.PixmapCache.getIcon("zoomReset.png"), + fmenu.addAction( + UI.PixmapCache.getIcon("zoomReset.png"), self.trUtf8("Zoom &reset"), self.__zoomResetClickedFrame) - fmenu.addAction(UI.PixmapCache.getIcon("zoomOut.png"), + fmenu.addAction( + UI.PixmapCache.getIcon("zoomOut.png"), self.trUtf8("Zoom &out"), self.__zoomOutClickedFrame) fmenu.addSeparator() - fmenu.addAction(self.trUtf8("Show frame so&urce"), + fmenu.addAction( + self.trUtf8("Show frame so&urce"), self.__showClickedFrameSource) menu.addMenu(fmenu) menu.addSeparator() - menu.addAction(UI.PixmapCache.getIcon("bookmark22.png"), + menu.addAction( + UI.PixmapCache.getIcon("bookmark22.png"), self.trUtf8("Bookmark this Page"), self.addBookmark) - menu.addAction(UI.PixmapCache.getIcon("mailSend.png"), + menu.addAction( + UI.PixmapCache.getIcon("mailSend.png"), self.trUtf8("Send Page Link"), self.__sendLink).setData(self.url()) menu.addSeparator() self.__userAgentMenu = UserAgentMenu(self.trUtf8("User Agent"), @@ -1264,7 +1296,8 @@ from .HelpLanguagesDialog import HelpLanguagesDialog languages = Preferences.toList( - Preferences.Prefs.settings.value("Help/AcceptLanguages", + Preferences.Prefs.settings.value( + "Help/AcceptLanguages", HelpLanguagesDialog.defaultAcceptLanguages())) if languages: language = languages[0] @@ -1272,13 +1305,15 @@ googleTranslatorUrl = QUrl( "http://translate.google.com/#auto|{0}|{1}".format( langCode, self.selectedText())) - menu.addAction(UI.PixmapCache.getIcon("translate.png"), + menu.addAction( + UI.PixmapCache.getIcon("translate.png"), self.trUtf8("Google Translate"), self.__openLinkInNewTab)\ .setData(googleTranslatorUrl) wiktionaryUrl = QUrl( "http://{0}.wiktionary.org/wiki/Special:Search?search={1}" .format(langCode, self.selectedText())) - menu.addAction(UI.PixmapCache.getIcon("wikipedia.png"), + menu.addAction( + UI.PixmapCache.getIcon("wikipedia.png"), self.trUtf8("Dictionary"), self.__openLinkInNewTab)\ .setData(wiktionaryUrl) menu.addSeparator() @@ -1298,7 +1333,8 @@ self.__addSearchEngine).setData(element) menu.addSeparator() - menu.addAction(UI.PixmapCache.getIcon("webInspector.png"), + menu.addAction( + UI.PixmapCache.getIcon("webInspector.png"), self.trUtf8("Web Inspector..."), self.__webInspector) menu.exec_(evt.globalPos()) @@ -1915,21 +1951,26 @@ html = html.replace("@FAVICON@", imageBuffer.buffer().toBase64()) html = html.replace("@TITLE@", title.encode("utf8")) html = html.replace("@H1@", reply.errorString().encode("utf8")) - html = html.replace("@H2@", self.trUtf8("When connecting to: {0}.")\ - .format(urlString).encode("utf8")) - html = html.replace("@LI-1@", + html = html.replace( + "@H2@", self.trUtf8("When connecting to: {0}.")\ + .format(urlString).encode("utf8")) + html = html.replace( + "@LI-1@", self.trUtf8("Check the address for errors such as " "<b>ww</b>.example.org instead of " "<b>www</b>.example.org").encode("utf8")) - html = html.replace("@LI-2@", + html = html.replace( + "@LI-2@", self.trUtf8("If the address is correct, try checking the network " "connection.").encode("utf8")) - html = html.replace("@LI-3@", + html = html.replace( + "@LI-3@", self.trUtf8( "If your computer or network is protected by a firewall " "or proxy, make sure that the browser is permitted to " "access the network.").encode("utf8")) - html = html.replace("@LI-4@", + html = html.replace( + "@LI-4@", self.trUtf8("If your cache policy is set to offline browsing," "only pages in the local cache are available.")\ .encode("utf8"))
--- a/Helpviewer/HelpDocsInstaller.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/HelpDocsInstaller.py Tue Oct 15 18:29:32 2013 +0200 @@ -122,7 +122,8 @@ files = docsPath.entryList(["*.qch"]) if not files: - engine.setCustomValue(versionKey, + engine.setCustomValue( + versionKey, QDateTime().toString(Qt.ISODate) + '|') return False @@ -153,7 +154,8 @@ ) return False - engine.setCustomValue(versionKey, + engine.setCustomValue( + versionKey, fi.lastModified().toString(Qt.ISODate) + '|' + \ fi.absoluteFilePath()) return True @@ -183,8 +185,8 @@ files = docsPath.entryList(["*.qch"]) if not files: - engine.setCustomValue(versionKey, - QDateTime().toString(Qt.ISODate) + '|') + engine.setCustomValue( + versionKey, QDateTime().toString(Qt.ISODate) + '|') return False for f in files: @@ -213,7 +215,8 @@ ) return False - engine.setCustomValue(versionKey, + engine.setCustomValue( + versionKey, fi.lastModified().toString(Qt.ISODate) + '|' + \ fi.absoluteFilePath()) return True
--- a/Helpviewer/HelpTabWidget.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/HelpTabWidget.py Tue Oct 15 18:29:32 2013 +0200 @@ -165,8 +165,8 @@ self.tabContextCloseOthersAct = self.__tabContextMenu.addAction( UI.PixmapCache.getIcon("tabCloseOther.png"), self.trUtf8("Close Others"), self.__tabContextMenuCloseOthers) - self.__tabContextMenu.addAction(self.trUtf8('Close All'), - self.closeAllBrowsers) + self.__tabContextMenu.addAction( + self.trUtf8('Close All'), self.closeAllBrowsers) self.__tabContextMenu.addSeparator() self.__tabContextMenu.addAction( UI.PixmapCache.getIcon("printPreview.png"), @@ -187,8 +187,8 @@ self.trUtf8('Bookmark All Tabs'), self.__mainWindow.bookmarkAll) self.__tabBackContextMenu = QMenu(self) - self.__tabBackContextMenu.addAction(self.trUtf8('Close All'), - self.closeAllBrowsers) + self.__tabBackContextMenu.addAction( + self.trUtf8('Close All'), self.closeAllBrowsers) self.__tabBackContextMenu.addAction( UI.PixmapCache.getIcon("reload.png"), self.trUtf8('Reload All'), self.reloadAllBrowsers) @@ -363,7 +363,8 @@ self.setTabText(index, self.__elide(linkName, Qt.ElideMiddle)) self.setTabToolTip(index, linkName) else: - self.setTabText(index, + self.setTabText( + index, self.__elide(browser.documentTitle().replace("&", "&&"))) self.setTabToolTip(index, browser.documentTitle()) elif requestData: @@ -749,7 +750,8 @@ if browser is not None: import Helpviewer.HelpWindow - self.setTabIcon(self.indexOf(browser), + self.setTabIcon( + self.indexOf(browser), Helpviewer.HelpWindow.HelpWindow.icon(browser.url())) Helpviewer.HelpWindow.HelpWindow.bookmarksManager()\ .iconChanged(browser.url()) @@ -833,8 +835,8 @@ self.newBrowser( None, (request, QNetworkAccessManager.GetOperation, b"")) else: - self.currentBrowser().setSource(None, - (request, QNetworkAccessManager.GetOperation, b"")) + self.currentBrowser().setSource( + None, (request, QNetworkAccessManager.GetOperation, b"")) self.currentBrowser().setFocus() def __pathSelected(self, path): @@ -948,10 +950,10 @@ self.restoreClosedTab).setData(index) index += 1 self.__closedTabsMenu.addSeparator() - self.__closedTabsMenu.addAction(self.trUtf8("Restore All Closed Tabs"), - self.restoreAllClosedTabs) - self.__closedTabsMenu.addAction(self.trUtf8("Clear List"), - self.clearClosedTabsList) + self.__closedTabsMenu.addAction( + self.trUtf8("Restore All Closed Tabs"), self.restoreAllClosedTabs) + self.__closedTabsMenu.addAction( + self.trUtf8("Clear List"), self.clearClosedTabsList) def closedTabsManager(self): """
--- a/Helpviewer/HelpWebSearchWidget.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/HelpWebSearchWidget.py Tue Oct 15 18:29:32 2013 +0200 @@ -332,8 +332,8 @@ """ Public method to save the recently performed web searches. """ - Preferences.Prefs.settings.setValue('Help/WebSearches', - self.__recentSearches) + Preferences.Prefs.settings.setValue( + 'Help/WebSearches', self.__recentSearches) def __loadSearches(self): """
--- a/Helpviewer/HelpWindow.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/HelpWindow.py Tue Oct 15 18:29:32 2013 +0200 @@ -317,25 +317,33 @@ styleSheet = Preferences.getHelp("UserStyleSheet") settings.setUserStyleSheetUrl(self.__userStyleSheet(styleSheet)) - settings.setAttribute(QWebSettings.AutoLoadImages, + settings.setAttribute( + QWebSettings.AutoLoadImages, Preferences.getHelp("AutoLoadImages")) - settings.setAttribute(QWebSettings.JavaEnabled, + settings.setAttribute( + QWebSettings.JavaEnabled, Preferences.getHelp("JavaEnabled")) - settings.setAttribute(QWebSettings.JavascriptEnabled, + settings.setAttribute( + QWebSettings.JavascriptEnabled, Preferences.getHelp("JavaScriptEnabled")) - settings.setAttribute(QWebSettings.JavascriptCanOpenWindows, + settings.setAttribute( + QWebSettings.JavascriptCanOpenWindows, Preferences.getHelp("JavaScriptCanOpenWindows")) - settings.setAttribute(QWebSettings.JavascriptCanAccessClipboard, + settings.setAttribute( + QWebSettings.JavascriptCanAccessClipboard, Preferences.getHelp("JavaScriptCanAccessClipboard")) - settings.setAttribute(QWebSettings.PluginsEnabled, + settings.setAttribute( + QWebSettings.PluginsEnabled, Preferences.getHelp("PluginsEnabled")) if hasattr(QWebSettings, "PrintElementBackgrounds"): - settings.setAttribute(QWebSettings.PrintElementBackgrounds, + settings.setAttribute( + QWebSettings.PrintElementBackgrounds, Preferences.getHelp("PrintBackgrounds")) if hasattr(QWebSettings, "setOfflineStoragePath"): - settings.setAttribute(QWebSettings.OfflineStorageDatabaseEnabled, + settings.setAttribute( + QWebSettings.OfflineStorageDatabaseEnabled, Preferences.getHelp("OfflineStorageDatabaseEnabled")) webDatabaseDir = os.path.join( Utilities.getConfigDir(), "browser", "webdatabases") @@ -360,7 +368,8 @@ 1024 * 1024) if hasattr(QWebSettings, "LocalStorageEnabled"): - settings.setAttribute(QWebSettings.LocalStorageEnabled, + settings.setAttribute( + QWebSettings.LocalStorageEnabled, Preferences.getHelp("LocalStorageEnabled")) localStorageDir = os.path.join( Utilities.getConfigDir(), "browser", "weblocalstorage") @@ -369,7 +378,8 @@ settings.setLocalStoragePath(localStorageDir) if hasattr(QWebSettings, "DnsPrefetchEnabled"): - settings.setAttribute(QWebSettings.DnsPrefetchEnabled, + settings.setAttribute( + QWebSettings.DnsPrefetchEnabled, Preferences.getHelp("DnsPrefetchEnabled")) if hasattr(QWebSettings, "defaultTextEncoding"): @@ -377,22 +387,28 @@ Preferences.getHelp("DefaultTextEncoding")) if hasattr(QWebSettings, "SpatialNavigationEnabled"): - settings.setAttribute(QWebSettings.SpatialNavigationEnabled, + settings.setAttribute( + QWebSettings.SpatialNavigationEnabled, Preferences.getHelp("SpatialNavigationEnabled")) if hasattr(QWebSettings, "LinksIncludedInFocusChain"): - settings.setAttribute(QWebSettings.LinksIncludedInFocusChain, + settings.setAttribute( + QWebSettings.LinksIncludedInFocusChain, Preferences.getHelp("LinksIncludedInFocusChain")) if hasattr(QWebSettings, "LocalContentCanAccessRemoteUrls"): - settings.setAttribute(QWebSettings.LocalContentCanAccessRemoteUrls, + settings.setAttribute( + QWebSettings.LocalContentCanAccessRemoteUrls, Preferences.getHelp("LocalContentCanAccessRemoteUrls")) if hasattr(QWebSettings, "LocalContentCanAccessFileUrls"): - settings.setAttribute(QWebSettings.LocalContentCanAccessFileUrls, + settings.setAttribute( + QWebSettings.LocalContentCanAccessFileUrls, Preferences.getHelp("LocalContentCanAccessFileUrls")) if hasattr(QWebSettings, "XSSAuditingEnabled"): - settings.setAttribute(QWebSettings.XSSAuditingEnabled, + settings.setAttribute( + QWebSettings.XSSAuditingEnabled, Preferences.getHelp("XSSAuditingEnabled")) if hasattr(QWebSettings, "SiteSpecificQuirksEnabled"): - settings.setAttribute(QWebSettings.SiteSpecificQuirksEnabled, + settings.setAttribute( + QWebSettings.SiteSpecificQuirksEnabled, Preferences.getHelp("SiteSpecificQuirksEnabled")) QWebSecurityOrigin.addLocalScheme("eric") @@ -404,7 +420,8 @@ # list of all actions self.__actions = [] - self.newTabAct = E5Action(self.trUtf8('New Tab'), + self.newTabAct = E5Action( + self.trUtf8('New Tab'), UI.PixmapCache.getIcon("tabNew.png"), self.trUtf8('&New Tab'), QKeySequence(self.trUtf8("Ctrl+T", "File|New Tab")), @@ -418,7 +435,8 @@ self.newTabAct.triggered[()].connect(self.newTab) self.__actions.append(self.newTabAct) - self.newAct = E5Action(self.trUtf8('New Window'), + self.newAct = E5Action( + self.trUtf8('New Window'), UI.PixmapCache.getIcon("newWindow.png"), self.trUtf8('New &Window'), QKeySequence(self.trUtf8("Ctrl+N", "File|New Window")), @@ -432,7 +450,8 @@ self.newAct.triggered[()].connect(self.newWindow) self.__actions.append(self.newAct) - self.openAct = E5Action(self.trUtf8('Open File'), + self.openAct = E5Action( + self.trUtf8('Open File'), UI.PixmapCache.getIcon("open.png"), self.trUtf8('&Open File'), QKeySequence(self.trUtf8("Ctrl+O", "File|Open")), @@ -447,7 +466,8 @@ self.openAct.triggered[()].connect(self.__openFile) self.__actions.append(self.openAct) - self.openTabAct = E5Action(self.trUtf8('Open File in New Tab'), + self.openTabAct = E5Action( + self.trUtf8('Open File in New Tab'), UI.PixmapCache.getIcon("openNewTab.png"), self.trUtf8('Open File in New &Tab'), QKeySequence(self.trUtf8("Shift+Ctrl+O", "File|Open in new tab")), @@ -463,7 +483,8 @@ self.openTabAct.triggered[()].connect(self.__openFileNewTab) self.__actions.append(self.openTabAct) - self.saveAsAct = E5Action(self.trUtf8('Save As'), + self.saveAsAct = E5Action( + self.trUtf8('Save As'), UI.PixmapCache.getIcon("fileSaveAs.png"), self.trUtf8('&Save As...'), QKeySequence(self.trUtf8("Shift+Ctrl+S", "File|Save As")), @@ -478,7 +499,8 @@ self.saveAsAct.triggered[()].connect(self.__savePageAs) self.__actions.append(self.saveAsAct) - self.savePageScreenAct = E5Action(self.trUtf8('Save Page Screen'), + self.savePageScreenAct = E5Action( + self.trUtf8('Save Page Screen'), UI.PixmapCache.getIcon("fileSavePixmap.png"), self.trUtf8('Save Page Screen...'), 0, 0, self, 'help_file_save_page_screen') @@ -511,7 +533,8 @@ self.__actions.append(self.saveVisiblePageScreenAct) bookmarksManager = self.bookmarksManager() - self.importBookmarksAct = E5Action(self.trUtf8('Import Bookmarks'), + self.importBookmarksAct = E5Action( + self.trUtf8('Import Bookmarks'), self.trUtf8('&Import Bookmarks...'), 0, 0, self, 'help_file_import_bookmarks') self.importBookmarksAct.setStatusTip( @@ -525,7 +548,8 @@ bookmarksManager.importBookmarks) self.__actions.append(self.importBookmarksAct) - self.exportBookmarksAct = E5Action(self.trUtf8('Export Bookmarks'), + self.exportBookmarksAct = E5Action( + self.trUtf8('Export Bookmarks'), self.trUtf8('&Export Bookmarks...'), 0, 0, self, 'help_file_export_bookmarks') self.exportBookmarksAct.setStatusTip( @@ -539,7 +563,8 @@ bookmarksManager.exportBookmarks) self.__actions.append(self.exportBookmarksAct) - self.printAct = E5Action(self.trUtf8('Print'), + self.printAct = E5Action( + self.trUtf8('Print'), UI.PixmapCache.getIcon("print.png"), self.trUtf8('&Print'), QKeySequence(self.trUtf8("Ctrl+P", "File|Print")), @@ -553,7 +578,8 @@ self.printAct.triggered[()].connect(self.tabWidget.printBrowser) self.__actions.append(self.printAct) - self.printPdfAct = E5Action(self.trUtf8('Print as PDF'), + self.printPdfAct = E5Action( + self.trUtf8('Print as PDF'), UI.PixmapCache.getIcon("printPdf.png"), self.trUtf8('Print as PDF'), 0, 0, self, 'help_file_print_pdf') @@ -568,7 +594,8 @@ self.tabWidget.printBrowserPdf) self.__actions.append(self.printPdfAct) - self.printPreviewAct = E5Action(self.trUtf8('Print Preview'), + self.printPreviewAct = E5Action( + self.trUtf8('Print Preview'), UI.PixmapCache.getIcon("printPreview.png"), self.trUtf8('Print Preview'), 0, 0, self, 'help_file_print_preview') @@ -583,7 +610,8 @@ self.tabWidget.printPreviewBrowser) self.__actions.append(self.printPreviewAct) - self.closeAct = E5Action(self.trUtf8('Close'), + self.closeAct = E5Action( + self.trUtf8('Close'), UI.PixmapCache.getIcon("close.png"), self.trUtf8('&Close'), QKeySequence(self.trUtf8("Ctrl+W", "File|Close")), @@ -598,7 +626,8 @@ self.closeAct.triggered[()].connect(self.tabWidget.closeBrowser) self.__actions.append(self.closeAct) - self.closeAllAct = E5Action(self.trUtf8('Close All'), + self.closeAllAct = E5Action( + self.trUtf8('Close All'), self.trUtf8('Close &All'), 0, 0, self, 'help_file_close_all') self.closeAllAct.setStatusTip(self.trUtf8('Close all help windows')) @@ -611,7 +640,8 @@ self.tabWidget.closeAllBrowsers) self.__actions.append(self.closeAllAct) - self.privateBrowsingAct = E5Action(self.trUtf8('Private Browsing'), + self.privateBrowsingAct = E5Action( + self.trUtf8('Private Browsing'), UI.PixmapCache.getIcon("privateBrowsing.png"), self.trUtf8('Private &Browsing'), 0, 0, self, 'help_file_private_browsing') @@ -627,7 +657,8 @@ self.privateBrowsingAct.setCheckable(True) self.__actions.append(self.privateBrowsingAct) - self.exitAct = E5Action(self.trUtf8('Quit'), + self.exitAct = E5Action( + self.trUtf8('Quit'), UI.PixmapCache.getIcon("exit.png"), self.trUtf8('&Quit'), QKeySequence(self.trUtf8("Ctrl+Q", "File|Quit")), @@ -644,7 +675,8 @@ self.exitAct.triggered[()].connect(self.__closeAllWindows) self.__actions.append(self.exitAct) - self.backAct = E5Action(self.trUtf8('Backward'), + self.backAct = E5Action( + self.trUtf8('Backward'), UI.PixmapCache.getIcon("back.png"), self.trUtf8('&Backward'), QKeySequence(self.trUtf8("Alt+Left", "Go|Backward")), @@ -660,7 +692,8 @@ self.backAct.triggered[()].connect(self.__backward) self.__actions.append(self.backAct) - self.forwardAct = E5Action(self.trUtf8('Forward'), + self.forwardAct = E5Action( + self.trUtf8('Forward'), UI.PixmapCache.getIcon("forward.png"), self.trUtf8('&Forward'), QKeySequence(self.trUtf8("Alt+Right", "Go|Forward")), @@ -677,7 +710,8 @@ self.forwardAct.triggered[()].connect(self.__forward) self.__actions.append(self.forwardAct) - self.homeAct = E5Action(self.trUtf8('Home'), + self.homeAct = E5Action( + self.trUtf8('Home'), UI.PixmapCache.getIcon("home.png"), self.trUtf8('&Home'), QKeySequence(self.trUtf8("Ctrl+Home", "Go|Home")), @@ -692,7 +726,8 @@ self.homeAct.triggered[()].connect(self.__home) self.__actions.append(self.homeAct) - self.reloadAct = E5Action(self.trUtf8('Reload'), + self.reloadAct = E5Action( + self.trUtf8('Reload'), UI.PixmapCache.getIcon("reload.png"), self.trUtf8('&Reload'), QKeySequence(self.trUtf8("Ctrl+R", "Go|Reload")), @@ -708,7 +743,8 @@ self.reloadAct.triggered[()].connect(self.__reload) self.__actions.append(self.reloadAct) - self.stopAct = E5Action(self.trUtf8('Stop'), + self.stopAct = E5Action( + self.trUtf8('Stop'), UI.PixmapCache.getIcon("stopLoading.png"), self.trUtf8('&Stop'), QKeySequence(self.trUtf8("Ctrl+.", "Go|Stop")), @@ -723,7 +759,8 @@ self.stopAct.triggered[()].connect(self.__stopLoading) self.__actions.append(self.stopAct) - self.copyAct = E5Action(self.trUtf8('Copy'), + self.copyAct = E5Action( + self.trUtf8('Copy'), UI.PixmapCache.getIcon("editCopy.png"), self.trUtf8('&Copy'), QKeySequence(self.trUtf8("Ctrl+C", "Edit|Copy")), @@ -737,7 +774,8 @@ self.copyAct.triggered[()].connect(self.__copy) self.__actions.append(self.copyAct) - self.findAct = E5Action(self.trUtf8('Find...'), + self.findAct = E5Action( + self.trUtf8('Find...'), UI.PixmapCache.getIcon("find.png"), self.trUtf8('&Find...'), QKeySequence(self.trUtf8("Ctrl+F", "Edit|Find")), @@ -751,7 +789,8 @@ self.findAct.triggered[()].connect(self.__find) self.__actions.append(self.findAct) - self.findNextAct = E5Action(self.trUtf8('Find next'), + self.findNextAct = E5Action( + self.trUtf8('Find next'), UI.PixmapCache.getIcon("findNext.png"), self.trUtf8('Find &next'), QKeySequence(self.trUtf8("F3", "Edit|Find next")), @@ -766,7 +805,8 @@ self.findNextAct.triggered[()].connect(self.findDlg.findNext) self.__actions.append(self.findNextAct) - self.findPrevAct = E5Action(self.trUtf8('Find previous'), + self.findPrevAct = E5Action( + self.trUtf8('Find previous'), UI.PixmapCache.getIcon("findPrev.png"), self.trUtf8('Find &previous'), QKeySequence(self.trUtf8("Shift+F3", "Edit|Find previous")), @@ -782,7 +822,8 @@ self.findPrevAct.triggered[()].connect(self.findDlg.findPrevious) self.__actions.append(self.findPrevAct) - self.bookmarksManageAct = E5Action(self.trUtf8('Manage Bookmarks'), + self.bookmarksManageAct = E5Action( + self.trUtf8('Manage Bookmarks'), self.trUtf8('&Manage Bookmarks...'), QKeySequence(self.trUtf8("Ctrl+Shift+B", "Help|Manage bookmarks")), 0, self, 'help_bookmarks_manage') @@ -797,7 +838,8 @@ self.__showBookmarksDialog) self.__actions.append(self.bookmarksManageAct) - self.bookmarksAddAct = E5Action(self.trUtf8('Add Bookmark'), + self.bookmarksAddAct = E5Action( + self.trUtf8('Add Bookmark'), UI.PixmapCache.getIcon("addBookmark.png"), self.trUtf8('Add &Bookmark...'), QKeySequence(self.trUtf8("Ctrl+D", "Help|Add bookmark")), @@ -813,7 +855,8 @@ self.bookmarksAddAct.triggered[()].connect(self.__addBookmark) self.__actions.append(self.bookmarksAddAct) - self.bookmarksAddFolderAct = E5Action(self.trUtf8('Add Folder'), + self.bookmarksAddFolderAct = E5Action( + self.trUtf8('Add Folder'), self.trUtf8('Add &Folder...'), 0, 0, self, 'help_bookmark_show_all') self.bookmarksAddFolderAct.setStatusTip(self.trUtf8( @@ -827,7 +870,8 @@ self.__addBookmarkFolder) self.__actions.append(self.bookmarksAddFolderAct) - self.bookmarksAllTabsAct = E5Action(self.trUtf8('Bookmark All Tabs'), + self.bookmarksAllTabsAct = E5Action( + self.trUtf8('Bookmark All Tabs'), self.trUtf8('Bookmark All Tabs...'), 0, 0, self, 'help_bookmark_all_tabs') self.bookmarksAllTabsAct.setStatusTip(self.trUtf8( @@ -841,7 +885,8 @@ self.bookmarksAllTabsAct.triggered[()].connect(self.bookmarkAll) self.__actions.append(self.bookmarksAllTabsAct) - self.whatsThisAct = E5Action(self.trUtf8('What\'s This?'), + self.whatsThisAct = E5Action( + self.trUtf8('What\'s This?'), UI.PixmapCache.getIcon("whatsThis.png"), self.trUtf8('&What\'s This?'), QKeySequence(self.trUtf8("Shift+F1", "Help|What's This?'")), @@ -859,7 +904,8 @@ self.whatsThisAct.triggered[()].connect(self.__whatsThis) self.__actions.append(self.whatsThisAct) - self.aboutAct = E5Action(self.trUtf8('About'), + self.aboutAct = E5Action( + self.trUtf8('About'), self.trUtf8('&About'), 0, 0, self, 'help_help_about') self.aboutAct.setStatusTip(self.trUtf8( @@ -872,7 +918,8 @@ self.aboutAct.triggered[()].connect(self.__about) self.__actions.append(self.aboutAct) - self.aboutQtAct = E5Action(self.trUtf8('About Qt'), + self.aboutQtAct = E5Action( + self.trUtf8('About Qt'), self.trUtf8('About &Qt'), 0, 0, self, 'help_help_about_qt') self.aboutQtAct.setStatusTip( @@ -885,7 +932,8 @@ self.aboutQtAct.triggered[()].connect(self.__aboutQt) self.__actions.append(self.aboutQtAct) - self.zoomInAct = E5Action(self.trUtf8('Zoom in'), + self.zoomInAct = E5Action( + self.trUtf8('Zoom in'), UI.PixmapCache.getIcon("zoomIn.png"), self.trUtf8('Zoom &in'), QKeySequence(self.trUtf8("Ctrl++", "View|Zoom in")), @@ -900,7 +948,8 @@ self.zoomInAct.triggered[()].connect(self.__zoomIn) self.__actions.append(self.zoomInAct) - self.zoomOutAct = E5Action(self.trUtf8('Zoom out'), + self.zoomOutAct = E5Action( + self.trUtf8('Zoom out'), UI.PixmapCache.getIcon("zoomOut.png"), self.trUtf8('Zoom &out'), QKeySequence(self.trUtf8("Ctrl+-", "View|Zoom out")), @@ -915,7 +964,8 @@ self.zoomOutAct.triggered[()].connect(self.__zoomOut) self.__actions.append(self.zoomOutAct) - self.zoomResetAct = E5Action(self.trUtf8('Zoom reset'), + self.zoomResetAct = E5Action( + self.trUtf8('Zoom reset'), UI.PixmapCache.getIcon("zoomReset.png"), self.trUtf8('Zoom &reset'), QKeySequence(self.trUtf8("Ctrl+0", "View|Zoom reset")), @@ -932,7 +982,8 @@ self.__actions.append(self.zoomResetAct) if hasattr(QWebSettings, 'ZoomTextOnly'): - self.zoomTextOnlyAct = E5Action(self.trUtf8('Zoom text only'), + self.zoomTextOnlyAct = E5Action( + self.trUtf8('Zoom text only'), self.trUtf8('Zoom &text only'), 0, 0, self, 'help_view_zoom_text_only') self.zoomTextOnlyAct.setCheckable(True) @@ -949,7 +1000,8 @@ else: self.zoomTextOnlyAct = None - self.pageSourceAct = E5Action(self.trUtf8('Show page source'), + self.pageSourceAct = E5Action( + self.trUtf8('Show page source'), self.trUtf8('Show page source'), QKeySequence(self.trUtf8('Ctrl+U')), 0, self, 'help_show_page_source') @@ -964,7 +1016,8 @@ self.__actions.append(self.pageSourceAct) self.addAction(self.pageSourceAct) - self.fullScreenAct = E5Action(self.trUtf8('Full Screen'), + self.fullScreenAct = E5Action( + self.trUtf8('Full Screen'), UI.PixmapCache.getIcon("windowFullscreen.png"), self.trUtf8('&Full Screen'), QKeySequence(self.trUtf8('F11')), 0, @@ -974,7 +1027,8 @@ self.__actions.append(self.fullScreenAct) self.addAction(self.fullScreenAct) - self.nextTabAct = E5Action(self.trUtf8('Show next tab'), + self.nextTabAct = E5Action( + self.trUtf8('Show next tab'), self.trUtf8('Show next tab'), QKeySequence(self.trUtf8('Ctrl+Alt+Tab')), 0, self, 'help_view_next_tab') @@ -983,7 +1037,8 @@ self.__actions.append(self.nextTabAct) self.addAction(self.nextTabAct) - self.prevTabAct = E5Action(self.trUtf8('Show previous tab'), + self.prevTabAct = E5Action( + self.trUtf8('Show previous tab'), self.trUtf8('Show previous tab'), QKeySequence(self.trUtf8('Shift+Ctrl+Alt+Tab')), 0, self, 'help_view_previous_tab') @@ -992,7 +1047,8 @@ self.__actions.append(self.prevTabAct) self.addAction(self.prevTabAct) - self.switchTabAct = E5Action(self.trUtf8('Switch between tabs'), + self.switchTabAct = E5Action( + self.trUtf8('Switch between tabs'), self.trUtf8('Switch between tabs'), QKeySequence(self.trUtf8('Ctrl+1')), 0, self, 'help_switch_tabs') @@ -1001,7 +1057,8 @@ self.__actions.append(self.switchTabAct) self.addAction(self.switchTabAct) - self.prefAct = E5Action(self.trUtf8('Preferences'), + self.prefAct = E5Action( + self.trUtf8('Preferences'), UI.PixmapCache.getIcon("configure.png"), self.trUtf8('&Preferences...'), 0, 0, self, 'help_preferences') self.prefAct.setStatusTip(self.trUtf8( @@ -1031,7 +1088,8 @@ self.__showAcceptedLanguages) self.__actions.append(self.acceptedLanguagesAct) - self.cookiesAct = E5Action(self.trUtf8('Cookies'), + self.cookiesAct = E5Action( + self.trUtf8('Cookies'), UI.PixmapCache.getIcon("cookie.png"), self.trUtf8('C&ookies...'), 0, 0, self, 'help_cookies') self.cookiesAct.setStatusTip(self.trUtf8( @@ -1045,7 +1103,8 @@ self.__showCookiesConfiguration) self.__actions.append(self.cookiesAct) - self.offlineStorageAct = E5Action(self.trUtf8('Offline Storage'), + self.offlineStorageAct = E5Action( + self.trUtf8('Offline Storage'), UI.PixmapCache.getIcon("preferences-html5.png"), self.trUtf8('Offline &Storage...'), 0, 0, self, 'help_offline_storage') @@ -1060,7 +1119,8 @@ self.__showOfflineStorageConfiguration) self.__actions.append(self.offlineStorageAct) - self.personalDataAct = E5Action(self.trUtf8('Personal Information'), + self.personalDataAct = E5Action( + self.trUtf8('Personal Information'), UI.PixmapCache.getIcon("pim.png"), self.trUtf8('Personal Information...'), 0, 0, @@ -1077,7 +1137,8 @@ self.__showPersonalInformationDialog) self.__actions.append(self.personalDataAct) - self.greaseMonkeyAct = E5Action(self.trUtf8('GreaseMonkey Scripts'), + self.greaseMonkeyAct = E5Action( + self.trUtf8('GreaseMonkey Scripts'), UI.PixmapCache.getIcon("greaseMonkey.png"), self.trUtf8('GreaseMonkey Scripts...'), 0, 0, @@ -1129,7 +1190,8 @@ self.syncTocAct.triggered[()].connect(self.__syncTOC) self.__actions.append(self.syncTocAct) - self.showTocAct = E5Action(self.trUtf8('Table of Contents'), + self.showTocAct = E5Action( + self.trUtf8('Table of Contents'), self.trUtf8('Table of Contents'), 0, 0, self, 'help_show_toc') self.showTocAct.setStatusTip(self.trUtf8( @@ -1142,7 +1204,8 @@ self.showTocAct.triggered[()].connect(self.__showTocWindow) self.__actions.append(self.showTocAct) - self.showIndexAct = E5Action(self.trUtf8('Index'), + self.showIndexAct = E5Action( + self.trUtf8('Index'), self.trUtf8('Index'), 0, 0, self, 'help_show_index') self.showIndexAct.setStatusTip(self.trUtf8( @@ -1155,7 +1218,8 @@ self.showIndexAct.triggered[()].connect(self.__showIndexWindow) self.__actions.append(self.showIndexAct) - self.showSearchAct = E5Action(self.trUtf8('Search'), + self.showSearchAct = E5Action( + self.trUtf8('Search'), self.trUtf8('Search'), 0, 0, self, 'help_show_search') self.showSearchAct.setStatusTip(self.trUtf8( @@ -1215,10 +1279,11 @@ self.__searchEngine.reindexDocumentation) self.__actions.append(self.reindexDocumentationAct) - self.clearPrivateDataAct = E5Action(self.trUtf8('Clear private data'), - self.trUtf8('&Clear private data'), - 0, 0, - self, 'help_clear_private_data') + self.clearPrivateDataAct = E5Action( + self.trUtf8('Clear private data'), + self.trUtf8('&Clear private data'), + 0, 0, + self, 'help_clear_private_data') self.clearPrivateDataAct.setStatusTip(self.trUtf8( 'Clear private data')) self.clearPrivateDataAct.setWhatsThis(self.trUtf8( @@ -1231,10 +1296,11 @@ self.__clearPrivateData) self.__actions.append(self.clearPrivateDataAct) - self.clearIconsAct = E5Action(self.trUtf8('Clear icons database'), - self.trUtf8('Clear &icons database'), - 0, 0, - self, 'help_clear_icons_db') + self.clearIconsAct = E5Action( + self.trUtf8('Clear icons database'), + self.trUtf8('Clear &icons database'), + 0, 0, + self, 'help_clear_icons_db') self.clearIconsAct.setStatusTip(self.trUtf8( 'Clear the database of favicons')) self.clearIconsAct.setWhatsThis(self.trUtf8( @@ -1263,11 +1329,12 @@ self.__showEnginesConfigurationDialog) self.__actions.append(self.searchEnginesAct) - self.passwordsAct = E5Action(self.trUtf8('Manage Saved Passwords'), - UI.PixmapCache.getIcon("passwords.png"), - self.trUtf8('Manage Saved Passwords...'), - 0, 0, - self, 'help_manage_passwords') + self.passwordsAct = E5Action( + self.trUtf8('Manage Saved Passwords'), + UI.PixmapCache.getIcon("passwords.png"), + self.trUtf8('Manage Saved Passwords...'), + 0, 0, + self, 'help_manage_passwords') self.passwordsAct.setStatusTip(self.trUtf8( 'Manage the saved passwords')) self.passwordsAct.setWhatsThis(self.trUtf8( @@ -1278,11 +1345,12 @@ self.passwordsAct.triggered[()].connect(self.__showPasswordsDialog) self.__actions.append(self.passwordsAct) - self.adblockAct = E5Action(self.trUtf8('Ad Block'), - UI.PixmapCache.getIcon("adBlockPlus.png"), - self.trUtf8('&Ad Block...'), - 0, 0, - self, 'help_adblock') + self.adblockAct = E5Action( + self.trUtf8('Ad Block'), + UI.PixmapCache.getIcon("adBlockPlus.png"), + self.trUtf8('&Ad Block...'), + 0, 0, + self, 'help_adblock') self.adblockAct.setStatusTip(self.trUtf8( 'Configure AdBlock subscriptions and rules')) self.adblockAct.setWhatsThis(self.trUtf8( @@ -1294,11 +1362,12 @@ self.adblockAct.triggered[()].connect(self.__showAdBlockDialog) self.__actions.append(self.adblockAct) - self.flashblockAct = E5Action(self.trUtf8('ClickToFlash'), - UI.PixmapCache.getIcon("flashBlock.png"), - self.trUtf8('&ClickToFlash...'), - 0, 0, - self, 'help_flashblock') + self.flashblockAct = E5Action( + self.trUtf8('ClickToFlash'), + UI.PixmapCache.getIcon("flashBlock.png"), + self.trUtf8('&ClickToFlash...'), + 0, 0, + self, 'help_flashblock') self.flashblockAct.setStatusTip(self.trUtf8( 'Configure ClickToFlash whitelist')) self.flashblockAct.setWhatsThis(self.trUtf8( @@ -1330,10 +1399,11 @@ self.__showCertificatesDialog) self.__actions.append(self.certificatesAct) - self.toolsMonitorAct = E5Action(self.trUtf8('Network Monitor'), - self.trUtf8('&Network Monitor...'), - 0, 0, - self, 'help_tools_network_monitor') + self.toolsMonitorAct = E5Action( + self.trUtf8('Network Monitor'), + self.trUtf8('&Network Monitor...'), + 0, 0, + self, 'help_tools_network_monitor') self.toolsMonitorAct.setStatusTip(self.trUtf8( 'Show the network monitor dialog')) self.toolsMonitorAct.setWhatsThis(self.trUtf8( @@ -1345,7 +1415,8 @@ self.__showNetworkMonitor) self.__actions.append(self.toolsMonitorAct) - self.showDownloadManagerAct = E5Action(self.trUtf8('Downloads'), + self.showDownloadManagerAct = E5Action( + self.trUtf8('Downloads'), self.trUtf8('Downloads'), 0, 0, self, 'help_show_downloads') self.showDownloadManagerAct.setStatusTip(self.trUtf8( @@ -1359,7 +1430,8 @@ self.__showDownloadsWindow) self.__actions.append(self.showDownloadManagerAct) - self.feedsManagerAct = E5Action(self.trUtf8('RSS Feeds Dialog'), + self.feedsManagerAct = E5Action( + self.trUtf8('RSS Feeds Dialog'), UI.PixmapCache.getIcon("rss22.png"), self.trUtf8('&RSS Feeds Dialog...'), QKeySequence(self.trUtf8("Ctrl+Shift+F", "Help|RSS Feeds Dialog")), @@ -1376,7 +1448,8 @@ self.feedsManagerAct.triggered[()].connect(self.__showFeedsManager) self.__actions.append(self.feedsManagerAct) - self.siteInfoAct = E5Action(self.trUtf8('Siteinfo Dialog'), + self.siteInfoAct = E5Action( + self.trUtf8('Siteinfo Dialog'), UI.PixmapCache.getIcon("helpAbout.png"), self.trUtf8('&Siteinfo Dialog...'), QKeySequence(self.trUtf8("Ctrl+Shift+I", "Help|Siteinfo Dialog")), @@ -1407,7 +1480,8 @@ self.__showUserAgentsDialog) self.__actions.append(self.userAgentManagerAct) - self.synchronizationAct = E5Action(self.trUtf8('Synchronize data'), + self.synchronizationAct = E5Action( + self.trUtf8('Synchronize data'), UI.PixmapCache.getIcon("sync.png"), self.trUtf8('&Synchronize Data...'), 0, 0, self, 'help_synchronize_data') @@ -2917,7 +2991,8 @@ if flashCookies: from .HelpLanguagesDialog import HelpLanguagesDialog languages = Preferences.toList( - Preferences.Prefs.settings.value("Help/AcceptLanguages", + Preferences.Prefs.settings.value( + "Help/AcceptLanguages", HelpLanguagesDialog.defaultAcceptLanguages())) if languages: language = languages[0] @@ -3491,7 +3566,8 @@ @param txt contents of the search (string) """ - self.virustotalSearchAct.setEnabled(txt != "" and \ + self.virustotalSearchAct.setEnabled( + txt != "" and \ Preferences.getHelp("VirusTotalEnabled") and \ Preferences.getHelp("VirusTotalServiceKey") != "")
--- a/Helpviewer/History/HistoryFilterModel.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/History/HistoryFilterModel.py Tue Oct 15 18:29:32 2013 +0200 @@ -300,8 +300,9 @@ self.beginInsertRows(QModelIndex(), 0, 0) self.__filteredRows.insert( - 0, HistoryData(self.sourceModel().rowCount(), - self.__frequencyScore(idx) + currentFrequency)) + 0, HistoryData( + self.sourceModel().rowCount(), + self.__frequencyScore(idx) + currentFrequency)) self.__historyDict[url] = self.sourceModel().rowCount() self.endInsertRows()
--- a/Helpviewer/History/HistoryMenu.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/History/HistoryMenu.py Tue Oct 15 18:29:32 2013 +0200 @@ -397,9 +397,11 @@ self.__tabWidget.restoreClosedTab).setData(index) index += 1 self.__closedTabsMenu.addSeparator() - self.__closedTabsMenu.addAction(self.trUtf8("Restore All Closed Tabs"), + self.__closedTabsMenu.addAction( + self.trUtf8("Restore All Closed Tabs"), self.__tabWidget.restoreAllClosedTabs) - self.__closedTabsMenu.addAction(self.trUtf8("Clear List"), + self.__closedTabsMenu.addAction( + self.trUtf8("Clear List"), self.__tabWidget.clearClosedTabsList) def __closedTabAvailable(self, avail):
--- a/Helpviewer/Network/FileReply.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/Network/FileReply.py Tue Oct 15 18:29:32 2013 +0200 @@ -177,7 +177,8 @@ pixmap.fill(Qt.transparent) imageBuffer.buffer().clear() pixmap.save(imageBuffer, "PNG") - return cssString.format(size + 4, + return cssString.format( + size + 4, str(imageBuffer.buffer().toBase64(), encoding="ascii")) def __loadDirectory(self):
--- a/Helpviewer/Network/FtpReply.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/Network/FtpReply.py Tue Oct 15 18:29:32 2013 +0200 @@ -140,7 +140,8 @@ else: proxyType = Preferences.getUI("ProxyType/Ftp") if proxyType != E5FtpProxyType.NoProxy: - self.__ftp.setProxy(proxyType, + self.__ftp.setProxy( + proxyType, Preferences.getUI("ProxyHost/Ftp"), Preferences.getUI("ProxyPort/Ftp")) if proxyType != E5FtpProxyType.NonAuthorizing: @@ -283,8 +284,8 @@ "<b>Connect to proxy '{0}' using:</b>")\ .format(Utilities.html_encode( Preferences.getUI("ProxyHost/Ftp"))) - dlg = AuthenticationDialog(info, - Preferences.getUI("ProxyUser/Ftp"), True) + dlg = AuthenticationDialog( + info, Preferences.getUI("ProxyUser/Ftp"), True) dlg.setData(Preferences.getUI("ProxyUser/Ftp"), Preferences.getUI("ProxyPassword/Ftp")) if dlg.exec_() == QDialog.Accepted: @@ -390,7 +391,8 @@ pixmap.fill(Qt.transparent) imageBuffer.buffer().clear() pixmap.save(imageBuffer, "PNG") - return cssString.format(size + 4, + return cssString.format( + size + 4, str(imageBuffer.buffer().toBase64(), encoding="ascii")) def __setListContent(self):
--- a/Helpviewer/Network/NetworkAccessManager.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/Network/NetworkAccessManager.py Tue Oct 15 18:29:32 2013 +0200 @@ -167,14 +167,17 @@ urlHost = req.url().host() for host in Preferences.getHelp("NoCacheHosts"): if host in urlHost: - req.setAttribute(QNetworkRequest.CacheLoadControlAttribute, + req.setAttribute( + QNetworkRequest.CacheLoadControlAttribute, QNetworkRequest.AlwaysNetwork) break else: - req.setAttribute(QNetworkRequest.CacheLoadControlAttribute, + req.setAttribute( + QNetworkRequest.CacheLoadControlAttribute, Preferences.getHelp("CachePolicy")) else: - req.setAttribute(QNetworkRequest.CacheLoadControlAttribute, + req.setAttribute( + QNetworkRequest.CacheLoadControlAttribute, QNetworkRequest.AlwaysNetwork) # Do Not Track feature @@ -246,7 +249,8 @@ """ from Helpviewer.HelpLanguagesDialog import HelpLanguagesDialog languages = Preferences.toList( - Preferences.Prefs.settings.value("Help/AcceptLanguages", + Preferences.Prefs.settings.value( + "Help/AcceptLanguages", HelpLanguagesDialog.defaultAcceptLanguages())) self.__acceptLanguage = HelpLanguagesDialog.httpString(languages)
--- a/Helpviewer/Network/QtHelpAccessHandler.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/Network/QtHelpAccessHandler.py Tue Oct 15 18:29:32 2013 +0200 @@ -115,7 +115,8 @@ if self.__engine.findFile(url).isValid(): data = self.__engine.fileData(url) else: - data = QByteArray(self.trUtf8("""<title>Error 404...</title>""" + data = QByteArray(self.trUtf8( + """<title>Error 404...</title>""" """<div align="center"><br><br>""" """<h1>The page could not be found</h1><br>""" """<h3>'{0}'</h3></div>""").format(strUrl).encode("utf-8"))
--- a/Helpviewer/OfflineStorage/OfflineStorageConfigDialog.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/OfflineStorage/OfflineStorageConfigDialog.py Tue Oct 15 18:29:32 2013 +0200 @@ -64,25 +64,32 @@ """ Public slot to store the configuration data. """ - Preferences.setHelp("OfflineStorageDatabaseEnabled", + Preferences.setHelp( + "OfflineStorageDatabaseEnabled", self.databaseEnabledCheckBox.isChecked()) - Preferences.setHelp("OfflineStorageDatabaseQuota", + Preferences.setHelp( + "OfflineStorageDatabaseQuota", self.databaseQuotaSpinBox.value()) if self.applicationCacheGroup.isEnabled(): - Preferences.setHelp("OfflineWebApplicationCacheEnabled", + Preferences.setHelp( + "OfflineWebApplicationCacheEnabled", self.applicationCacheEnabledCheckBox.isChecked()) - Preferences.setHelp("OfflineWebApplicationCacheQuota", + Preferences.setHelp( + "OfflineWebApplicationCacheQuota", self.applicationCacheQuotaSpinBox.value()) if self.localStorageGroup.isEnabled(): - Preferences.setHelp("LocalStorageEnabled", + Preferences.setHelp( + "LocalStorageEnabled", self.localStorageEnabledCheckBox.isChecked()) if self.localRemoteUrlsCheckBox.isVisible(): - Preferences.setHelp("LocalContentCanAccessRemoteUrls", + Preferences.setHelp( + "LocalContentCanAccessRemoteUrls", self.localRemoteUrlsCheckBox.isChecked()) if self.localFileUrlsCheckBox.isVisible(): - Preferences.setHelp("LocalContentCanAccessFileUrls", + Preferences.setHelp( + "LocalContentCanAccessFileUrls", self.localFileUrlsCheckBox.isChecked()) @pyqtSlot()
--- a/Helpviewer/OpenSearch/OpenSearchReader.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/OpenSearch/OpenSearchReader.py Tue Oct 15 18:29:32 2013 +0200 @@ -43,8 +43,9 @@ if self.name() != "OpenSearchDescription" or \ self.namespaceUri() != "http://a9.com/-/spec/opensearch/1.1/": - self.raiseError(QCoreApplication.translate("OpenSearchReader", - "The file is not an OpenSearch 1.1 file.")) + self.raiseError(QCoreApplication.translate( + "OpenSearchReader", + "The file is not an OpenSearch 1.1 file.")) return engine while not self.atEnd():
--- a/Helpviewer/SiteInfo/SiteInfoDialog.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/SiteInfo/SiteInfoDialog.py Tue Oct 15 18:29:32 2013 +0200 @@ -204,10 +204,12 @@ return menu = QMenu() - act = menu.addAction(self.trUtf8("Copy Image Location to Clipboard"), + act = menu.addAction( + self.trUtf8("Copy Image Location to Clipboard"), self.__copyAction) act.setData(itm.text(1)) - act = menu.addAction(self.trUtf8("Copy Image Name to Clipboard"), + act = menu.addAction( + self.trUtf8("Copy Image Name to Clipboard"), self.__copyAction) act.setData(itm.text(0)) menu.addSeparator()
--- a/Helpviewer/SpeedDial/SpeedDial.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/SpeedDial/SpeedDial.py Tue Oct 15 18:29:32 2013 +0200 @@ -101,7 +101,8 @@ @param url URL to generate the file name from (string) @return name of the image file (string) """ - return os.path.join(self.__thumbnailsDirectory, + return os.path.join( + self.__thumbnailsDirectory, str(QCryptographicHash.hash(QByteArray(url.encode("utf-8")), QCryptographicHash.Md5).toHex(), encoding="utf-8") + ".png") @@ -199,8 +200,8 @@ from .SpeedDialWriter import SpeedDialWriter speedDialFile = self.getFileName() writer = SpeedDialWriter() - if not writer.write(speedDialFile, - self.__webPages, self.__pagesPerRow, self.__speedDialSize): + if not writer.write(speedDialFile, self.__webPages, + self.__pagesPerRow, self.__speedDialSize): E5MessageBox.critical( None, self.trUtf8("Saving Speed Dial data"),
--- a/Helpviewer/Sync/DirectorySyncHandler.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/Sync/DirectorySyncHandler.py Tue Oct 15 18:29:32 2013 +0200 @@ -94,7 +94,8 @@ data = f.read() f.close() except IOError as err: - self.syncStatus.emit(type_, + self.syncStatus.emit( + type_, self.trUtf8("Cannot read remote file.\n{0}").format(str(err))) self.syncFinished.emit(type_, False, True) return @@ -153,7 +154,8 @@ QFileInfo(fileName).lastModified() <= QFileInfo( os.path.join(Preferences.getHelp("SyncDirectoryPath"), self._remoteFiles[type_])).lastModified(): - self.__downloadFile(type_, fileName, + self.__downloadFile( + type_, fileName, QFileInfo(os.path.join( Preferences.getHelp("SyncDirectoryPath"), self._remoteFiles[type_])).lastModified().toTime_t()) @@ -207,7 +209,8 @@ QCoreApplication.processEvents() # Speed Dial Settings if Preferences.getHelp("SyncSpeedDial"): - self.__initialSyncFile("speeddial", + self.__initialSyncFile( + "speeddial", Helpviewer.HelpWindow.HelpWindow.speedDial().getFileName()) self.__forceUpload = False @@ -229,35 +232,40 @@ """ Public method to synchronize the bookmarks. """ - self.__syncFile("bookmarks", + self.__syncFile( + "bookmarks", Helpviewer.HelpWindow.HelpWindow.bookmarksManager().getFileName()) def syncHistory(self): """ Public method to synchronize the history. """ - self.__syncFile("history", + self.__syncFile( + "history", Helpviewer.HelpWindow.HelpWindow.historyManager().getFileName()) def syncPasswords(self): """ Public method to synchronize the passwords. """ - self.__syncFile("passwords", + self.__syncFile( + "passwords", Helpviewer.HelpWindow.HelpWindow.passwordManager().getFileName()) def syncUserAgents(self): """ Public method to synchronize the user agents. """ - self.__syncFile("useragents", + self.__syncFile( + "useragents", Helpviewer.HelpWindow.HelpWindow.userAgentsManager().getFileName()) def syncSpeedDial(self): """ Public method to synchronize the speed dial data. """ - self.__syncFile("speeddial", + self.__syncFile( + "speeddial", Helpviewer.HelpWindow.HelpWindow.speedDial().getFileName()) def shutdown(self):
--- a/Helpviewer/Sync/FtpSyncHandler.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/Sync/FtpSyncHandler.py Tue Oct 15 18:29:32 2013 +0200 @@ -87,7 +87,8 @@ else: proxyType = Preferences.getUI("ProxyType/Ftp") if proxyType != E5FtpProxyType.NoProxy: - self.__ftp.setProxy(proxyType, + self.__ftp.setProxy( + proxyType, Preferences.getUI("ProxyHost/Ftp"), Preferences.getUI("ProxyPort/Ftp")) if proxyType != E5FtpProxyType.NonAuthorizing: @@ -345,35 +346,40 @@ """ Public method to synchronize the bookmarks. """ - self.__syncFile("bookmarks", + self.__syncFile( + "bookmarks", Helpviewer.HelpWindow.HelpWindow.bookmarksManager().getFileName()) def syncHistory(self): """ Public method to synchronize the history. """ - self.__syncFile("history", + self.__syncFile( + "history", Helpviewer.HelpWindow.HelpWindow.historyManager().getFileName()) def syncPasswords(self): """ Public method to synchronize the passwords. """ - self.__syncFile("passwords", + self.__syncFile( + "passwords", Helpviewer.HelpWindow.HelpWindow.passwordManager().getFileName()) def syncUserAgents(self): """ Public method to synchronize the user agents. """ - self.__syncFile("useragents", + self.__syncFile( + "useragents", Helpviewer.HelpWindow.HelpWindow.userAgentsManager().getFileName()) def syncSpeedDial(self): """ Public method to synchronize the speed dial data. """ - self.__syncFile("speeddial", + self.__syncFile( + "speeddial", Helpviewer.HelpWindow.HelpWindow.speedDial().getFileName()) def shutdown(self):
--- a/Helpviewer/Sync/SyncDirectorySettingsPage.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/Sync/SyncDirectorySettingsPage.py Tue Oct 15 18:29:32 2013 +0200 @@ -42,7 +42,8 @@ @return next wizard page ID (integer) """ # save the settings - Preferences.setHelp("SyncDirectoryPath", + Preferences.setHelp( + "SyncDirectoryPath", Utilities.toNativeSeparators(self.directoryEdit.text())) from . import SyncGlobals
--- a/Helpviewer/Sync/SyncHandler.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Helpviewer/Sync/SyncHandler.py Tue Oct 15 18:29:32 2013 +0200 @@ -107,8 +107,8 @@ "LocalMissing": self.trUtf8( "Local user agent settings file does NOT exist." " Skipping synchronization!"), - "Uploading": self.trUtf8("Uploading local user agent" - " settings file..."), + "Uploading": self.trUtf8( + "Uploading local user agent settings file..."), }, "speeddial": { "RemoteExists": self.trUtf8( @@ -123,8 +123,8 @@ "LocalMissing": self.trUtf8( "Local speed dial settings file does NOT exist." " Skipping synchronization!"), - "Uploading": self.trUtf8("Uploading local speed dial" - " settings file..."), + "Uploading": self.trUtf8( + "Uploading local speed dial settings file..."), }, } @@ -222,7 +222,8 @@ if not key: return QByteArray() - data, ok = dataEncrypt(data, key, + data, ok = dataEncrypt( + data, key, keyLength=Preferences.getHelp("SyncEncryptionKeyLength"), hashIterations=100) if not ok: @@ -258,7 +259,8 @@ if not key: return False, self.trUtf8("Invalid encryption key given.") - data, ok = dataDecrypt(data, key, + data, ok = dataDecrypt( + data, key, keyLength=Preferences.getHelp("SyncEncryptionKeyLength")) if not ok: return False, self.trUtf8("Data cannot be decrypted.")
--- a/IconEditor/IconEditorWindow.py Mon Oct 14 20:08:19 2013 +0200 +++ b/IconEditor/IconEditorWindow.py Tue Oct 15 18:29:32 2013 +0200 @@ -183,7 +183,8 @@ """ Private method to define the file related user interface actions. """ - self.newAct = E5Action(self.trUtf8('New'), + self.newAct = E5Action( + self.trUtf8('New'), UI.PixmapCache.getIcon("new.png"), self.trUtf8('&New'), QKeySequence(self.trUtf8("Ctrl+N", "File|New")), @@ -196,7 +197,8 @@ self.newAct.triggered[()].connect(self.__newIcon) self.__actions.append(self.newAct) - self.newWindowAct = E5Action(self.trUtf8('New Window'), + self.newWindowAct = E5Action( + self.trUtf8('New Window'), UI.PixmapCache.getIcon("newWindow.png"), self.trUtf8('New &Window'), 0, 0, self, 'iconEditor_file_new_window') @@ -209,7 +211,8 @@ self.newWindowAct.triggered[()].connect(self.__newWindow) self.__actions.append(self.newWindowAct) - self.openAct = E5Action(self.trUtf8('Open'), + self.openAct = E5Action( + self.trUtf8('Open'), UI.PixmapCache.getIcon("open.png"), self.trUtf8('&Open...'), QKeySequence(self.trUtf8("Ctrl+O", "File|Open")), @@ -223,11 +226,12 @@ self.openAct.triggered[()].connect(self.__openIcon) self.__actions.append(self.openAct) - self.saveAct = E5Action(self.trUtf8('Save'), - UI.PixmapCache.getIcon("fileSave.png"), - self.trUtf8('&Save'), - QKeySequence(self.trUtf8("Ctrl+S", "File|Save")), - 0, self, 'iconEditor_file_save') + self.saveAct = E5Action( + self.trUtf8('Save'), + UI.PixmapCache.getIcon("fileSave.png"), + self.trUtf8('&Save'), + QKeySequence(self.trUtf8("Ctrl+S", "File|Save")), + 0, self, 'iconEditor_file_save') self.saveAct.setStatusTip(self.trUtf8('Save the current icon')) self.saveAct.setWhatsThis(self.trUtf8( """<b>Save File</b>""" @@ -236,7 +240,8 @@ self.saveAct.triggered[()].connect(self.__saveIcon) self.__actions.append(self.saveAct) - self.saveAsAct = E5Action(self.trUtf8('Save As'), + self.saveAsAct = E5Action( + self.trUtf8('Save As'), UI.PixmapCache.getIcon("fileSaveAs.png"), self.trUtf8('Save &As...'), QKeySequence(self.trUtf8("Shift+Ctrl+S", "File|Save As")), @@ -250,7 +255,8 @@ self.saveAsAct.triggered[()].connect(self.__saveIconAs) self.__actions.append(self.saveAsAct) - self.closeAct = E5Action(self.trUtf8('Close'), + self.closeAct = E5Action( + self.trUtf8('Close'), UI.PixmapCache.getIcon("close.png"), self.trUtf8('&Close'), QKeySequence(self.trUtf8("Ctrl+W", "File|Close")), @@ -264,7 +270,8 @@ self.closeAct.triggered[()].connect(self.close) self.__actions.append(self.closeAct) - self.closeAllAct = E5Action(self.trUtf8('Close All'), + self.closeAllAct = E5Action( + self.trUtf8('Close All'), self.trUtf8('Close &All'), 0, 0, self, 'iconEditor_file_close_all') self.closeAllAct.setStatusTip(self.trUtf8( @@ -276,7 +283,8 @@ self.closeAllAct.triggered[()].connect(self.__closeAll) self.__actions.append(self.closeAllAct) - self.exitAct = E5Action(self.trUtf8('Quit'), + self.exitAct = E5Action( + self.trUtf8('Quit'), UI.PixmapCache.getIcon("exit.png"), self.trUtf8('&Quit'), QKeySequence(self.trUtf8("Ctrl+Q", "File|Quit")), @@ -294,12 +302,13 @@ """ Private method to create the Edit actions. """ - self.undoAct = E5Action(self.trUtf8('Undo'), - UI.PixmapCache.getIcon("editUndo.png"), - self.trUtf8('&Undo'), - QKeySequence(self.trUtf8("Ctrl+Z", "Edit|Undo")), - QKeySequence(self.trUtf8("Alt+Backspace", "Edit|Undo")), - self, 'iconEditor_edit_undo') + self.undoAct = E5Action( + self.trUtf8('Undo'), + UI.PixmapCache.getIcon("editUndo.png"), + self.trUtf8('&Undo'), + QKeySequence(self.trUtf8("Ctrl+Z", "Edit|Undo")), + QKeySequence(self.trUtf8("Alt+Backspace", "Edit|Undo")), + self, 'iconEditor_edit_undo') self.undoAct.setStatusTip(self.trUtf8('Undo the last change')) self.undoAct.setWhatsThis(self.trUtf8( """<b>Undo</b>""" @@ -308,11 +317,12 @@ self.undoAct.triggered[()].connect(self.__editor.editUndo) self.__actions.append(self.undoAct) - self.redoAct = E5Action(self.trUtf8('Redo'), - UI.PixmapCache.getIcon("editRedo.png"), - self.trUtf8('&Redo'), - QKeySequence(self.trUtf8("Ctrl+Shift+Z", "Edit|Redo")), - 0, self, 'iconEditor_edit_redo') + self.redoAct = E5Action( + self.trUtf8('Redo'), + UI.PixmapCache.getIcon("editRedo.png"), + self.trUtf8('&Redo'), + QKeySequence(self.trUtf8("Ctrl+Shift+Z", "Edit|Redo")), + 0, self, 'iconEditor_edit_redo') self.redoAct.setStatusTip(self.trUtf8('Redo the last change')) self.redoAct.setWhatsThis(self.trUtf8( """<b>Redo</b>""" @@ -321,12 +331,13 @@ self.redoAct.triggered[()].connect(self.__editor.editRedo) self.__actions.append(self.redoAct) - self.cutAct = E5Action(self.trUtf8('Cut'), - UI.PixmapCache.getIcon("editCut.png"), - self.trUtf8('Cu&t'), - QKeySequence(self.trUtf8("Ctrl+X", "Edit|Cut")), - QKeySequence(self.trUtf8("Shift+Del", "Edit|Cut")), - self, 'iconEditor_edit_cut') + self.cutAct = E5Action( + self.trUtf8('Cut'), + UI.PixmapCache.getIcon("editCut.png"), + self.trUtf8('Cu&t'), + QKeySequence(self.trUtf8("Ctrl+X", "Edit|Cut")), + QKeySequence(self.trUtf8("Shift+Del", "Edit|Cut")), + self, 'iconEditor_edit_cut') self.cutAct.setStatusTip(self.trUtf8('Cut the selection')) self.cutAct.setWhatsThis(self.trUtf8( """<b>Cut</b>""" @@ -335,12 +346,13 @@ self.cutAct.triggered[()].connect(self.__editor.editCut) self.__actions.append(self.cutAct) - self.copyAct = E5Action(self.trUtf8('Copy'), - UI.PixmapCache.getIcon("editCopy.png"), - self.trUtf8('&Copy'), - QKeySequence(self.trUtf8("Ctrl+C", "Edit|Copy")), - QKeySequence(self.trUtf8("Ctrl+Ins", "Edit|Copy")), - self, 'iconEditor_edit_copy') + self.copyAct = E5Action( + self.trUtf8('Copy'), + UI.PixmapCache.getIcon("editCopy.png"), + self.trUtf8('&Copy'), + QKeySequence(self.trUtf8("Ctrl+C", "Edit|Copy")), + QKeySequence(self.trUtf8("Ctrl+Ins", "Edit|Copy")), + self, 'iconEditor_edit_copy') self.copyAct.setStatusTip(self.trUtf8('Copy the selection')) self.copyAct.setWhatsThis(self.trUtf8( """<b>Copy</b>""" @@ -349,12 +361,13 @@ self.copyAct.triggered[()].connect(self.__editor.editCopy) self.__actions.append(self.copyAct) - self.pasteAct = E5Action(self.trUtf8('Paste'), - UI.PixmapCache.getIcon("editPaste.png"), - self.trUtf8('&Paste'), - QKeySequence(self.trUtf8("Ctrl+V", "Edit|Paste")), - QKeySequence(self.trUtf8("Shift+Ins", "Edit|Paste")), - self, 'iconEditor_edit_paste') + self.pasteAct = E5Action( + self.trUtf8('Paste'), + UI.PixmapCache.getIcon("editPaste.png"), + self.trUtf8('&Paste'), + QKeySequence(self.trUtf8("Ctrl+V", "Edit|Paste")), + QKeySequence(self.trUtf8("Shift+Ins", "Edit|Paste")), + self, 'iconEditor_edit_paste') self.pasteAct.setStatusTip(self.trUtf8('Paste the clipboard image')) self.pasteAct.setWhatsThis(self.trUtf8( """<b>Paste</b>""" @@ -363,9 +376,10 @@ self.pasteAct.triggered[()].connect(self.__editor.editPaste) self.__actions.append(self.pasteAct) - self.pasteNewAct = E5Action(self.trUtf8('Paste as New'), - self.trUtf8('Paste as &New'), - 0, 0, self, 'iconEditor_edit_paste_as_new') + self.pasteNewAct = E5Action( + self.trUtf8('Paste as New'), + self.trUtf8('Paste as &New'), + 0, 0, self, 'iconEditor_edit_paste_as_new') self.pasteNewAct.setStatusTip(self.trUtf8( 'Paste the clipboard image replacing the current one')) self.pasteNewAct.setWhatsThis(self.trUtf8( @@ -375,12 +389,13 @@ self.pasteNewAct.triggered[()].connect(self.__editor.editPasteAsNew) self.__actions.append(self.pasteNewAct) - self.deleteAct = E5Action(self.trUtf8('Clear'), - UI.PixmapCache.getIcon("editDelete.png"), - self.trUtf8('Cl&ear'), - QKeySequence(self.trUtf8("Alt+Shift+C", "Edit|Clear")), - 0, - self, 'iconEditor_edit_clear') + self.deleteAct = E5Action( + self.trUtf8('Clear'), + UI.PixmapCache.getIcon("editDelete.png"), + self.trUtf8('Cl&ear'), + QKeySequence(self.trUtf8("Alt+Shift+C", "Edit|Clear")), + 0, + self, 'iconEditor_edit_clear') self.deleteAct.setStatusTip(self.trUtf8('Clear the icon image')) self.deleteAct.setWhatsThis(self.trUtf8( """<b>Clear</b>""" @@ -390,11 +405,12 @@ self.deleteAct.triggered[()].connect(self.__editor.editClear) self.__actions.append(self.deleteAct) - self.selectAllAct = E5Action(self.trUtf8('Select All'), - self.trUtf8('&Select All'), - QKeySequence(self.trUtf8("Ctrl+A", "Edit|Select All")), - 0, - self, 'iconEditor_edit_select_all') + self.selectAllAct = E5Action( + self.trUtf8('Select All'), + self.trUtf8('&Select All'), + QKeySequence(self.trUtf8("Ctrl+A", "Edit|Select All")), + 0, + self, 'iconEditor_edit_select_all') self.selectAllAct.setStatusTip(self.trUtf8( 'Select the complete icon image')) self.selectAllAct.setWhatsThis(self.trUtf8( @@ -404,11 +420,12 @@ self.selectAllAct.triggered[()].connect(self.__editor.editSelectAll) self.__actions.append(self.selectAllAct) - self.resizeAct = E5Action(self.trUtf8('Change Size'), - UI.PixmapCache.getIcon("transformResize.png"), - self.trUtf8('Change Si&ze...'), - 0, 0, - self, 'iconEditor_edit_change_size') + self.resizeAct = E5Action( + self.trUtf8('Change Size'), + UI.PixmapCache.getIcon("transformResize.png"), + self.trUtf8('Change Si&ze...'), + 0, 0, + self, 'iconEditor_edit_change_size') self.resizeAct.setStatusTip(self.trUtf8('Change the icon size')) self.resizeAct.setWhatsThis(self.trUtf8( """<b>Change Size...</b>""" @@ -417,11 +434,12 @@ self.resizeAct.triggered[()].connect(self.__editor.editResize) self.__actions.append(self.resizeAct) - self.grayscaleAct = E5Action(self.trUtf8('Grayscale'), - UI.PixmapCache.getIcon("grayscale.png"), - self.trUtf8('&Grayscale'), - 0, 0, - self, 'iconEditor_edit_grayscale') + self.grayscaleAct = E5Action( + self.trUtf8('Grayscale'), + UI.PixmapCache.getIcon("grayscale.png"), + self.trUtf8('&Grayscale'), + 0, 0, + self, 'iconEditor_edit_grayscale') self.grayscaleAct.setStatusTip(self.trUtf8( 'Change the icon to grayscale')) self.grayscaleAct.setWhatsThis(self.trUtf8( @@ -453,7 +471,8 @@ """ Private method to create the View actions. """ - self.zoomInAct = E5Action(self.trUtf8('Zoom in'), + self.zoomInAct = E5Action( + self.trUtf8('Zoom in'), UI.PixmapCache.getIcon("zoomIn.png"), self.trUtf8('Zoom &in'), QKeySequence(self.trUtf8("Ctrl++", "View|Zoom in")), @@ -466,7 +485,8 @@ self.zoomInAct.triggered[()].connect(self.__zoomIn) self.__actions.append(self.zoomInAct) - self.zoomOutAct = E5Action(self.trUtf8('Zoom out'), + self.zoomOutAct = E5Action( + self.trUtf8('Zoom out'), UI.PixmapCache.getIcon("zoomOut.png"), self.trUtf8('Zoom &out'), QKeySequence(self.trUtf8("Ctrl+-", "View|Zoom out")), @@ -479,7 +499,8 @@ self.zoomOutAct.triggered[()].connect(self.__zoomOut) self.__actions.append(self.zoomOutAct) - self.zoomResetAct = E5Action(self.trUtf8('Zoom reset'), + self.zoomResetAct = E5Action( + self.trUtf8('Zoom reset'), UI.PixmapCache.getIcon("zoomReset.png"), self.trUtf8('Zoom &reset'), QKeySequence(self.trUtf8("Ctrl+0", "View|Zoom reset")), @@ -494,7 +515,8 @@ self.zoomResetAct.triggered[()].connect(self.__zoomReset) self.__actions.append(self.zoomResetAct) - self.showGridAct = E5Action(self.trUtf8('Show Grid'), + self.showGridAct = E5Action( + self.trUtf8('Show Grid'), UI.PixmapCache.getIcon("grid.png"), self.trUtf8('Show &Grid'), 0, 0, @@ -520,7 +542,8 @@ self.drawingActGrp = createActionGroup(self) self.drawingActGrp.setExclusive(True) - self.drawPencilAct = E5Action(self.trUtf8('Freehand'), + self.drawPencilAct = E5Action( + self.trUtf8('Freehand'), UI.PixmapCache.getIcon("drawBrush.png"), self.trUtf8('&Freehand'), 0, 0, @@ -534,7 +557,8 @@ self.drawPencilAct.triggered[()].connect(self.esm.map) self.__actions.append(self.drawPencilAct) - self.drawColorPickerAct = E5Action(self.trUtf8('Color Picker'), + self.drawColorPickerAct = E5Action( + self.trUtf8('Color Picker'), UI.PixmapCache.getIcon("colorPicker.png"), self.trUtf8('&Color Picker'), 0, 0, @@ -550,7 +574,8 @@ self.drawColorPickerAct.triggered[()].connect(self.esm.map) self.__actions.append(self.drawColorPickerAct) - self.drawRectangleAct = E5Action(self.trUtf8('Rectangle'), + self.drawRectangleAct = E5Action( + self.trUtf8('Rectangle'), UI.PixmapCache.getIcon("drawRectangle.png"), self.trUtf8('&Rectangle'), 0, 0, @@ -564,7 +589,8 @@ self.drawRectangleAct.triggered[()].connect(self.esm.map) self.__actions.append(self.drawRectangleAct) - self.drawFilledRectangleAct = E5Action(self.trUtf8('Filled Rectangle'), + self.drawFilledRectangleAct = E5Action( + self.trUtf8('Filled Rectangle'), UI.PixmapCache.getIcon("drawRectangleFilled.png"), self.trUtf8('F&illed Rectangle'), 0, 0, @@ -579,7 +605,8 @@ self.drawFilledRectangleAct.triggered[()].connect(self.esm.map) self.__actions.append(self.drawFilledRectangleAct) - self.drawCircleAct = E5Action(self.trUtf8('Circle'), + self.drawCircleAct = E5Action( + self.trUtf8('Circle'), UI.PixmapCache.getIcon("drawCircle.png"), self.trUtf8('Circle'), 0, 0, @@ -593,7 +620,8 @@ self.drawCircleAct.triggered[()].connect(self.esm.map) self.__actions.append(self.drawCircleAct) - self.drawFilledCircleAct = E5Action(self.trUtf8('Filled Circle'), + self.drawFilledCircleAct = E5Action( + self.trUtf8('Filled Circle'), UI.PixmapCache.getIcon("drawCircleFilled.png"), self.trUtf8('Fille&d Circle'), 0, 0, @@ -608,7 +636,8 @@ self.drawFilledCircleAct.triggered[()].connect(self.esm.map) self.__actions.append(self.drawFilledCircleAct) - self.drawEllipseAct = E5Action(self.trUtf8('Ellipse'), + self.drawEllipseAct = E5Action( + self.trUtf8('Ellipse'), UI.PixmapCache.getIcon("drawEllipse.png"), self.trUtf8('&Ellipse'), 0, 0, @@ -622,7 +651,8 @@ self.drawEllipseAct.triggered[()].connect(self.esm.map) self.__actions.append(self.drawEllipseAct) - self.drawFilledEllipseAct = E5Action(self.trUtf8('Filled Ellipse'), + self.drawFilledEllipseAct = E5Action( + self.trUtf8('Filled Ellipse'), UI.PixmapCache.getIcon("drawEllipseFilled.png"), self.trUtf8('Fille&d Elli&pse'), 0, 0, @@ -637,7 +667,8 @@ self.drawFilledEllipseAct.triggered[()].connect(self.esm.map) self.__actions.append(self.drawFilledEllipseAct) - self.drawFloodFillAct = E5Action(self.trUtf8('Flood Fill'), + self.drawFloodFillAct = E5Action( + self.trUtf8('Flood Fill'), UI.PixmapCache.getIcon("drawFill.png"), self.trUtf8('Fl&ood Fill'), 0, 0, @@ -652,7 +683,8 @@ self.drawFloodFillAct.triggered[()].connect(self.esm.map) self.__actions.append(self.drawFloodFillAct) - self.drawLineAct = E5Action(self.trUtf8('Line'), + self.drawLineAct = E5Action( + self.trUtf8('Line'), UI.PixmapCache.getIcon("drawLine.png"), self.trUtf8('&Line'), 0, 0, @@ -666,7 +698,8 @@ self.drawLineAct.triggered[()].connect(self.esm.map) self.__actions.append(self.drawLineAct) - self.drawEraserAct = E5Action(self.trUtf8('Eraser (Transparent)'), + self.drawEraserAct = E5Action( + self.trUtf8('Eraser (Transparent)'), UI.PixmapCache.getIcon("drawEraser.png"), self.trUtf8('Eraser (&Transparent)'), 0, 0, @@ -720,9 +753,10 @@ """ Private method to create the Help actions. """ - self.aboutAct = E5Action(self.trUtf8('About'), - self.trUtf8('&About'), - 0, 0, self, 'iconEditor_help_about') + self.aboutAct = E5Action( + self.trUtf8('About'), + self.trUtf8('&About'), + 0, 0, self, 'iconEditor_help_about') self.aboutAct.setStatusTip(self.trUtf8( 'Display information about this software')) self.aboutAct.setWhatsThis(self.trUtf8( @@ -731,9 +765,10 @@ self.aboutAct.triggered[()].connect(self.__about) self.__actions.append(self.aboutAct) - self.aboutQtAct = E5Action(self.trUtf8('About Qt'), - self.trUtf8('About &Qt'), - 0, 0, self, 'iconEditor_help_about_qt') + self.aboutQtAct = E5Action( + self.trUtf8('About Qt'), + self.trUtf8('About &Qt'), + 0, 0, self, 'iconEditor_help_about_qt') self.aboutQtAct.setStatusTip( self.trUtf8('Display information about the Qt toolkit')) self.aboutQtAct.setWhatsThis(self.trUtf8( @@ -743,7 +778,8 @@ self.aboutQtAct.triggered[()].connect(self.__aboutQt) self.__actions.append(self.aboutQtAct) - self.whatsThisAct = E5Action(self.trUtf8('What\'s This?'), + self.whatsThisAct = E5Action( + self.trUtf8('What\'s This?'), UI.PixmapCache.getIcon("whatsThis.png"), self.trUtf8('&What\'s This?'), QKeySequence(self.trUtf8("Shift+F1", "Help|What's This?'")),
--- a/MultiProject/MultiProject.py Mon Oct 14 20:08:19 2013 +0200 +++ b/MultiProject/MultiProject.py Tue Oct 15 18:29:32 2013 +0200 @@ -251,7 +251,8 @@ E5MessageBox.critical( self.ui, self.trUtf8("Save multiproject file"), - self.trUtf8("<p>The multiproject file <b>{0}</b> could not be " + self.trUtf8( + "<p>The multiproject file <b>{0}</b> could not be " "written.</p>").format(fn)) res = False @@ -569,10 +570,11 @@ self.actGrp1 = createActionGroup(self) - act = E5Action(self.trUtf8('New multiproject'), - UI.PixmapCache.getIcon("multiProjectNew.png"), - self.trUtf8('&New...'), 0, 0, - self.actGrp1, 'multi_project_new') + act = E5Action( + self.trUtf8('New multiproject'), + UI.PixmapCache.getIcon("multiProjectNew.png"), + self.trUtf8('&New...'), 0, 0, + self.actGrp1, 'multi_project_new') act.setStatusTip(self.trUtf8('Generate a new multiproject')) act.setWhatsThis(self.trUtf8( """<b>New...</b>""" @@ -582,10 +584,11 @@ act.triggered[()].connect(self.__newMultiProject) self.actions.append(act) - act = E5Action(self.trUtf8('Open multiproject'), - UI.PixmapCache.getIcon("multiProjectOpen.png"), - self.trUtf8('&Open...'), 0, 0, - self.actGrp1, 'multi_project_open') + act = E5Action( + self.trUtf8('Open multiproject'), + UI.PixmapCache.getIcon("multiProjectOpen.png"), + self.trUtf8('&Open...'), 0, 0, + self.actGrp1, 'multi_project_open') act.setStatusTip(self.trUtf8('Open an existing multiproject')) act.setWhatsThis(self.trUtf8( """<b>Open...</b>""" @@ -594,9 +597,10 @@ act.triggered[()].connect(self.openMultiProject) self.actions.append(act) - self.closeAct = E5Action(self.trUtf8('Close multiproject'), - UI.PixmapCache.getIcon("multiProjectClose.png"), - self.trUtf8('&Close'), 0, 0, self, 'multi_project_close') + self.closeAct = E5Action( + self.trUtf8('Close multiproject'), + UI.PixmapCache.getIcon("multiProjectClose.png"), + self.trUtf8('&Close'), 0, 0, self, 'multi_project_close') self.closeAct.setStatusTip(self.trUtf8( 'Close the current multiproject')) self.closeAct.setWhatsThis(self.trUtf8( @@ -606,9 +610,10 @@ self.closeAct.triggered[()].connect(self.closeMultiProject) self.actions.append(self.closeAct) - self.saveAct = E5Action(self.trUtf8('Save multiproject'), - UI.PixmapCache.getIcon("multiProjectSave.png"), - self.trUtf8('&Save'), 0, 0, self, 'multi_project_save') + self.saveAct = E5Action( + self.trUtf8('Save multiproject'), + UI.PixmapCache.getIcon("multiProjectSave.png"), + self.trUtf8('&Save'), 0, 0, self, 'multi_project_save') self.saveAct.setStatusTip(self.trUtf8('Save the current multiproject')) self.saveAct.setWhatsThis(self.trUtf8( """<b>Save</b>""" @@ -617,10 +622,11 @@ self.saveAct.triggered[()].connect(self.saveMultiProject) self.actions.append(self.saveAct) - self.saveasAct = E5Action(self.trUtf8('Save multiproject as'), - UI.PixmapCache.getIcon("multiProjectSaveAs.png"), - self.trUtf8('Save &as...'), 0, 0, self, - 'multi_project_save_as') + self.saveasAct = E5Action( + self.trUtf8('Save multiproject as'), + UI.PixmapCache.getIcon("multiProjectSaveAs.png"), + self.trUtf8('Save &as...'), 0, 0, self, + 'multi_project_save_as') self.saveasAct.setStatusTip(self.trUtf8( 'Save the current multiproject to a new file')) self.saveasAct.setWhatsThis(self.trUtf8( @@ -645,10 +651,11 @@ self.addProjectAct.triggered[()].connect(self.addProject) self.actions.append(self.addProjectAct) - self.propsAct = E5Action(self.trUtf8('Multiproject properties'), - UI.PixmapCache.getIcon("multiProjectProps.png"), - self.trUtf8('&Properties...'), 0, 0, self, - 'multi_project_properties') + self.propsAct = E5Action( + self.trUtf8('Multiproject properties'), + UI.PixmapCache.getIcon("multiProjectProps.png"), + self.trUtf8('&Properties...'), 0, 0, self, + 'multi_project_properties') self.propsAct.setStatusTip(self.trUtf8( 'Show the multiproject properties')) self.propsAct.setWhatsThis(self.trUtf8( @@ -764,7 +771,8 @@ else: formatStr = '{0:d}. {1}' act = self.recentMenu.addAction( - formatStr.format(idx, + formatStr.format( + idx, Utilities.compactPath(rp, self.ui.maxMenuFilePathLen))) act.setData(rp) act.setEnabled(QFileInfo(rp).exists())
--- a/Network/IRC/IrcChannelWidget.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Network/IRC/IrcChannelWidget.py Tue Oct 15 18:29:32 2013 +0200 @@ -190,7 +190,8 @@ channelClosed = pyqtSignal(str) openPrivateChat = pyqtSignal(str) - UrlRe = re.compile(r"""((?:http|ftp|https):\/\/[\w\-_]+(?:\.[\w\-_]+)+""" + UrlRe = re.compile( + r"""((?:http|ftp|https):\/\/[\w\-_]+(?:\.[\w\-_]+)+""" r"""(?:[\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?)""") JoinIndicator = "-->" @@ -645,12 +646,14 @@ if itm: itm.setName(match.group(2)) if match.group(1) == self.__userName: - self.__addManagementMessage(IrcChannelWidget.MessageIndicator, + self.__addManagementMessage( + IrcChannelWidget.MessageIndicator, self.trUtf8("You are now known as {0}.").format( match.group(2))) self.__userName = match.group(2) else: - self.__addManagementMessage(IrcChannelWidget.MessageIndicator, + self.__addManagementMessage( + IrcChannelWidget.MessageIndicator, self.trUtf8("User {0} is now known as {1}.").format( match.group(1), match.group(2))) @@ -687,7 +690,8 @@ @return flag indicating whether the message was handled (boolean) """ if match.group(1).lower() == self.__name.lower(): - self.__addManagementMessage(self.trUtf8("Away"), + self.__addManagementMessage( + self.trUtf8("Away"), self.trUtf8("{0} is away: {1}").format( match.group(2), match.group(3))) return True @@ -703,7 +707,8 @@ """ if match.group(1).lower() == self.__name.lower(): self.topicLabel.setText(match.group(2)) - self.__addManagementMessage(IrcChannelWidget.MessageIndicator, + self.__addManagementMessage( + IrcChannelWidget.MessageIndicator, ircFilter(self.trUtf8('The channel topic is: "{0}".').format( match.group(2)))) return True @@ -718,7 +723,8 @@ @return flag indicating whether the message was handled (boolean) """ if match.group(1).lower() == self.__name.lower(): - self.__addManagementMessage(IrcChannelWidget.MessageIndicator, + self.__addManagementMessage( + IrcChannelWidget.MessageIndicator, self.trUtf8("The topic was set by {0} on {1}.").format( match.group(2), QDateTime.fromTime_t(int(match.group(3)))\ .toString("yyyy-MM-dd hh:mm"))) @@ -734,7 +740,8 @@ @return flag indicating whether the message was handled (boolean) """ if match.group(1).lower() == self.__name.lower(): - self.__addManagementMessage(IrcChannelWidget.MessageIndicator, + self.__addManagementMessage( + IrcChannelWidget.MessageIndicator, ircFilter(self.trUtf8("Channel URL: {0}").format( match.group(2)))) return True @@ -769,7 +776,8 @@ else: modes.append(modeChar) - self.__addManagementMessage(IrcChannelWidget.MessageIndicator, + self.__addManagementMessage( + IrcChannelWidget.MessageIndicator, self.trUtf8("Channel modes: {0}.").format(", ".join(modes))) return True @@ -784,7 +792,8 @@ @return flag indicating whether the message was handled (boolean) """ if match.group(1).lower() == self.__name.lower(): - self.__addManagementMessage(IrcChannelWidget.MessageIndicator, + self.__addManagementMessage( + IrcChannelWidget.MessageIndicator, self.trUtf8("This channel was created on {0}.").format( QDateTime.fromTime_t(int(match.group(2)))\ .toString("yyyy-MM-dd hh:mm"))) @@ -959,7 +968,8 @@ if itm: itm.changePrivilege(match.group(3)) self.__setEditTopicButton() - self.__addManagementMessage(IrcChannelWidget.MessageIndicator, + self.__addManagementMessage( + IrcChannelWidget.MessageIndicator, self.trUtf8("{0} sets mode for {1}: {2}.").format( match.group(1), match.group(4), match.group(3))) return True @@ -985,7 +995,8 @@ @param match match object that matched the pattern @return flag indicating whether the message was handled (boolean) """ - self.__addManagementMessage(self.trUtf8("Help"), + self.__addManagementMessage( + self.trUtf8("Help"), "{0} {1}".format(match.group(1), ircFilter(match.group(2)))) return True @@ -1009,24 +1020,30 @@ ctcpRequest = ctcpRequest.lower() if ctcpRequest == "version": msg = "Eric IRC client {0}, {1}".format(Version, Copyright) - self.__addManagementMessage(self.trUtf8("CTCP"), + self.__addManagementMessage( + self.trUtf8("CTCP"), self.trUtf8("Received Version request from {0}.").format( match.group(1))) self.sendCtcpReply.emit(match.group(1), "VERSION " + msg) elif ctcpRequest == "ping": - self.__addManagementMessage(self.trUtf8("CTCP"), - self.trUtf8("Received CTCP-PING request from {0}," - " sending answer.").format(match.group(1))) + self.__addManagementMessage( + self.trUtf8("CTCP"), + self.trUtf8( + "Received CTCP-PING request from {0}," + " sending answer.").format(match.group(1))) self.sendCtcpReply.emit( match.group(1), "PING {0}".format(ctcpArg)) elif ctcpRequest == "clientinfo": - self.__addManagementMessage(self.trUtf8("CTCP"), - self.trUtf8("Received CTCP-CLIENTINFO request from {0}," + self.__addManagementMessage( + self.trUtf8("CTCP"), + self.trUtf8( + "Received CTCP-CLIENTINFO request from {0}," " sending answer.").format(match.group(1))) - self.sendCtcpReply.emit(match.group(1), - "CLIENTINFO CLIENTINFO PING VERSION") + self.sendCtcpReply.emit( + match.group(1), "CLIENTINFO CLIENTINFO PING VERSION") else: - self.__addManagementMessage(self.trUtf8("CTCP"), + self.__addManagementMessage( + self.trUtf8("CTCP"), self.trUtf8("Received unknown CTCP-{0} request from {1}.") .format(ctcpRequest, match.group(1))) return True @@ -1249,13 +1266,11 @@ UI.PixmapCache.getIcon("fileSave.png"), self.trUtf8("Save"), self.__saveMessages) self.__messagesMenu.addSeparator() - self.__setMarkerMessagesAct = \ - self.__messagesMenu.addAction(self.trUtf8("Mark Current Position"), - self.setMarkerLine) - self.__unsetMarkerMessagesAct = \ - self.__messagesMenu.addAction( - self.trUtf8("Remove Position Marker"), - self.unsetMarkerLine) + self.__setMarkerMessagesAct = self.__messagesMenu.addAction( + self.trUtf8("Mark Current Position"), self.setMarkerLine) + self.__unsetMarkerMessagesAct = self.__messagesMenu.addAction( + self.trUtf8("Remove Position Marker"), + self.unsetMarkerLine) self.on_messages_copyAvailable(False) @@ -1303,17 +1318,14 @@ Private slot to initialize the users list context menu. """ self.__usersMenu = QMenu(self) - self.__whoIsAct = \ - self.__usersMenu.addAction(self.trUtf8("Who Is"), - self.__whoIs) + self.__whoIsAct = self.__usersMenu.addAction( + self.trUtf8("Who Is"), self.__whoIs) self.__usersMenu.addSeparator() - self.__privateChatAct = \ - self.__usersMenu.addAction(self.trUtf8("Private Chat"), - self.__openPrivateChat) + self.__privateChatAct = self.__usersMenu.addAction( + self.trUtf8("Private Chat"), self.__openPrivateChat) self.__usersMenu.addSeparator() - self.__usersListRefreshAct = \ - self.__usersMenu.addAction(self.trUtf8("Refresh"), - self.__sendAutoWhoCommand) + self.__usersListRefreshAct = self.__usersMenu.addAction( + self.trUtf8("Refresh"), self.__sendAutoWhoCommand) @pyqtSlot(QPoint) def on_usersList_customContextMenuRequested(self, pos): @@ -1398,7 +1410,8 @@ self.__autoWhoRequested = False self.initAutoWho() else: - self.__addManagementMessage(self.trUtf8("Who"), + self.__addManagementMessage( + self.trUtf8("Who"), self.trUtf8("End of WHO list for {0}.").format( match.group(1))) return True @@ -1422,7 +1435,8 @@ if match.group(1).lower() == self.__name.lower(): away = self.trUtf8(" (Away)") if match.group(5).startswith("G") \ else "" - self.__addManagementMessage(self.trUtf8("Who"), + self.__addManagementMessage( + self.trUtf8("Who"), self.trUtf8("{0} is {1}@{2} ({3}){4}").format( match.group(4), match.group(2), match.group(3), match.group(6), away)) @@ -1443,9 +1457,10 @@ # group(4) real name if match.group(1) == self.__whoIsNick: realName = match.group(4).replace("<", "<").replace(">", ">") - self.__addManagementMessage(self.trUtf8("Whois"), - self.trUtf8("{0} is {1}@{2} ({3}).").format(match.group(1), - match.group(2), match.group(3), realName)) + self.__addManagementMessage( + self.trUtf8("Whois"), + self.trUtf8("{0} is {1}@{2} ({3}).").format( + match.group(1), match.group(2), match.group(3), realName)) return True return False @@ -1488,27 +1503,33 @@ # show messages if userChannels: - self.__addManagementMessage(self.trUtf8("Whois"), + self.__addManagementMessage( + self.trUtf8("Whois"), self.trUtf8("{0} is a user on channels: {1}").format( match.group(1), " ".join(userChannels))) if voiceChannels: - self.__addManagementMessage(self.trUtf8("Whois"), + self.__addManagementMessage( + self.trUtf8("Whois"), self.trUtf8("{0} has voice on channels: {1}").format( match.group(1), " ".join(voiceChannels))) if halfopChannels: - self.__addManagementMessage(self.trUtf8("Whois"), + self.__addManagementMessage( + self.trUtf8("Whois"), self.trUtf8("{0} is a halfop on channels: {1}").format( match.group(1), " ".join(halfopChannels))) if opChannels: - self.__addManagementMessage(self.trUtf8("Whois"), + self.__addManagementMessage( + self.trUtf8("Whois"), self.trUtf8("{0} is an operator on channels: {1}").format( match.group(1), " ".join(opChannels))) if ownerChannels: - self.__addManagementMessage(self.trUtf8("Whois"), + self.__addManagementMessage( + self.trUtf8("Whois"), self.trUtf8("{0} is owner of channels: {1}").format( match.group(1), " ".join(ownerChannels))) if adminChannels: - self.__addManagementMessage(self.trUtf8("Whois"), + self.__addManagementMessage( + self.trUtf8("Whois"), self.trUtf8("{0} is admin on channels: {1}").format( match.group(1), " ".join(adminChannels))) return True @@ -1526,7 +1547,8 @@ # group(2) server # group(3) server info if match.group(1) == self.__whoIsNick: - self.__addManagementMessage(self.trUtf8("Whois"), + self.__addManagementMessage( + self.trUtf8("Whois"), self.trUtf8("{0} is online via {1} ({2}).").format( match.group(1), match.group(2), match.group(3))) return True @@ -1544,11 +1566,13 @@ # group(2) message if match.group(1) == self.__whoIsNick: if match.group(2).lower().startswith("is an irc operator"): - self.__addManagementMessage(self.trUtf8("Whois"), + self.__addManagementMessage( + self.trUtf8("Whois"), self.trUtf8("{0} is an IRC Operator.").format( match.group(1))) else: - self.__addManagementMessage(self.trUtf8("Whois"), + self.__addManagementMessage( + self.trUtf8("Whois"), "{0} {1}".format(match.group(1), match.group(2))) return True @@ -1579,7 +1603,8 @@ hoursString = self.trUtf8("%n hour(s)", "", hours) minutesString = self.trUtf8("%n minute(s)", "", minutes) secondsString = self.trUtf8("%n second(s)", "", seconds) - self.__addManagementMessage(self.trUtf8("Whois"), + self.__addManagementMessage( + self.trUtf8("Whois"), self.trUtf8( "{0} has been idle for {1}, {2}, {3}, and {4}.", "{0} = name of person, {1} = (x days)," @@ -1591,7 +1616,8 @@ hoursString = self.trUtf8("%n hour(s)", "", hours) minutesString = self.trUtf8("%n minute(s)", "", minutes) secondsString = self.trUtf8("%n second(s)", "", seconds) - self.__addManagementMessage(self.trUtf8("Whois"), + self.__addManagementMessage( + self.trUtf8("Whois"), self.trUtf8("{0} has been idle for {1}, {2}, and {3}.", "{0} = name of person, {1} = (x hours), " "{2} = (x minutes), {3} = (x seconds)").format( @@ -1599,18 +1625,22 @@ elif minutes: minutesString = self.trUtf8("%n minute(s)", "", minutes) secondsString = self.trUtf8("%n second(s)", "", seconds) - self.__addManagementMessage(self.trUtf8("Whois"), + self.__addManagementMessage( + self.trUtf8("Whois"), self.trUtf8("{0} has been idle for {1} and {2}.", "{0} = name of person, {1} = (x minutes), " "{3} = (x seconds)").format( match.group(1), minutesString, secondsString)) else: - self.__addManagementMessage(self.trUtf8("Whois"), - self.trUtf8("{0} has been idle for %n second(s).", "", + self.__addManagementMessage( + self.trUtf8("Whois"), + self.trUtf8( + "{0} has been idle for %n second(s).", "", seconds).format(match.group(1))) if not signonTime.isNull(): - self.__addManagementMessage(self.trUtf8("Whois"), + self.__addManagementMessage( + self.trUtf8("Whois"), self.trUtf8("{0} has been online since {1}.").format( match.group(1), signonTime.toString("yyyy-MM-dd, hh:mm:ss"))) @@ -1629,7 +1659,8 @@ # group(2) end message if match.group(1) == self.__whoIsNick: self.__whoIsNick = "" - self.__addManagementMessage(self.trUtf8("Whois"), + self.__addManagementMessage( + self.trUtf8("Whois"), self.trUtf8("End of WHOIS list for {0}.").format( match.group(1))) return True @@ -1646,7 +1677,8 @@ # group(1) nick # group(2) identified message if match.group(1) == self.__whoIsNick: - self.__addManagementMessage(self.trUtf8("Whois"), + self.__addManagementMessage( + self.trUtf8("Whois"), self.trUtf8("{0} is an identified user.").format( match.group(1))) return True @@ -1663,7 +1695,8 @@ # group(1) nick # group(2) helper message if match.group(1) == self.__whoIsNick: - self.__addManagementMessage(self.trUtf8("Whois"), + self.__addManagementMessage( + self.trUtf8("Whois"), self.trUtf8("{0} is available for help.").format( match.group(1))) return True @@ -1680,9 +1713,10 @@ # group(1) nick # group(2) login name if match.group(1) == self.__whoIsNick: - self.__addManagementMessage(self.trUtf8("Whois"), - self.trUtf8("{0} is logged in as {1}.").format(match.group(1), - match.group(2))) + self.__addManagementMessage( + self.trUtf8("Whois"), + self.trUtf8("{0} is logged in as {1}.").format( + match.group(1), match.group(2))) return True return False @@ -1698,7 +1732,8 @@ # group(2) actual user@host # group(3) actual IP if match.group(1) == self.__whoIsNick: - self.__addManagementMessage(self.trUtf8("Whois"), + self.__addManagementMessage( + self.trUtf8("Whois"), self.trUtf8( "{0} is actually using the host {1} (IP: {2}).").format( match.group(1), match.group(2), match.group(3))) @@ -1715,7 +1750,8 @@ """ # group(1) nick if match.group(1) == self.__whoIsNick: - self.__addManagementMessage(self.trUtf8("Whois"), + self.__addManagementMessage( + self.trUtf8("Whois"), self.trUtf8("{0} is using a secure connection.").format( match.group(1))) return True @@ -1733,7 +1769,8 @@ # group(2) host name # group(3) IP if match.group(1) == self.__whoIsNick: - self.__addManagementMessage(self.trUtf8("Whois"), + self.__addManagementMessage( + self.trUtf8("Whois"), self.trUtf8("{0} is connecting from {1} (IP: {2}).").format( match.group(1), match.group(2), match.group(3))) return True
--- a/Network/IRC/IrcNetworkListDialog.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Network/IRC/IrcNetworkListDialog.py Tue Oct 15 18:29:32 2013 +0200 @@ -83,14 +83,18 @@ autoConnect = self.trUtf8("Yes") if network.autoConnect() \ else self.trUtf8("No") - QTreeWidgetItem(itm, + QTreeWidgetItem( + itm, [self.trUtf8("Identity"), identityName]) - QTreeWidgetItem(itm, + QTreeWidgetItem( + itm, [self.trUtf8("Server"), "{0}:{1}".format( server.getName(), server.getPort())]) - QTreeWidgetItem(itm, + QTreeWidgetItem( + itm, [self.trUtf8("Channels"), ", ".join(network.getChannelNames())]) - QTreeWidgetItem(itm, + QTreeWidgetItem( + itm, [self.trUtf8("Auto-Connect"), autoConnect]) self.__resizeColumns()
--- a/Network/IRC/IrcWidget.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Network/IRC/IrcWidget.py Tue Oct 15 18:29:32 2013 +0200 @@ -240,7 +240,8 @@ """ closed.</p>""")\ .format(self.__server.getName())) if ok: - self.networkWidget.addServerMessage(self.trUtf8("Info"), + self.networkWidget.addServerMessage( + self.trUtf8("Info"), self.trUtf8("Disconnecting from server {0}...").format( self.__server.getName())) self.__closeAllChannels() @@ -437,7 +438,8 @@ """ Private slot to indicate the host was found. """ - self.networkWidget.addServerMessage(self.trUtf8("Info"), + self.networkWidget.addServerMessage( + self.trUtf8("Info"), self.trUtf8("Server found,connecting...")) def __hostConnected(self): @@ -445,7 +447,8 @@ Private slot to log in to the server after the connection was established. """ - self.networkWidget.addServerMessage(self.trUtf8("Info"), + self.networkWidget.addServerMessage( + self.trUtf8("Info"), self.trUtf8("Connected,logging in...")) self.networkWidget.setConnected(True) @@ -478,7 +481,8 @@ """ if self.networkWidget.isConnected(): self.__closeAllChannels() - self.networkWidget.addServerMessage(self.trUtf8("Info"), + self.networkWidget.addServerMessage( + self.trUtf8("Info"), self.trUtf8("Server disconnected.")) self.networkWidget.setRegistered(False) self.networkWidget.setConnected(False) @@ -498,9 +502,10 @@ Private slot to read data from the socket. """ if self.__socket: - self.__buffer += str(self.__socket.readAll(), - Preferences.getSystem("IOEncoding"), - 'replace') + self.__buffer += str( + self.__socket.readAll(), + Preferences.getSystem("IOEncoding"), + 'replace') if self.__buffer.endswith("\r\n"): for line in self.__buffer.splitlines(): line = line.strip() @@ -662,7 +667,8 @@ message = self.trUtf8("End of message of the day") elif code == 4: parts = message.strip().split() - message = self.trUtf8("Server {0} (Version {1}), User-Modes: {2}," + message = self.trUtf8( + "Server {0} (Version {1}), User-Modes: {2}," " Channel-Modes: {3}").format( parts[1], parts[2], parts[3], parts[4]) elif code == 265: @@ -739,33 +745,39 @@ if error == QAbstractSocket.RemoteHostClosedError: # ignore this one, it's a disconnect if self.__sslErrorLock: - self.networkWidget.addErrorMessage(self.trUtf8("SSL Error"), + self.networkWidget.addErrorMessage( + self.trUtf8("SSL Error"), self.trUtf8( """Connection to server {0} (port {1}) lost while""" """ waiting for user response to an SSL error.""") .format(self.__server.getName(), self.__server.getPort())) self.__connectionState = IrcWidget.ServerDisconnected elif error == QAbstractSocket.HostNotFoundError: - self.networkWidget.addErrorMessage(self.trUtf8("Socket Error"), + self.networkWidget.addErrorMessage( + self.trUtf8("Socket Error"), self.trUtf8( "The host was not found. Please check the host name" " and port settings.")) elif error == QAbstractSocket.ConnectionRefusedError: - self.networkWidget.addErrorMessage(self.trUtf8("Socket Error"), + self.networkWidget.addErrorMessage( + self.trUtf8("Socket Error"), self.trUtf8( "The connection was refused by the peer. Please check the" " host name and port settings.")) elif error == QAbstractSocket.SslHandshakeFailedError: - self.networkWidget.addErrorMessage(self.trUtf8("Socket Error"), + self.networkWidget.addErrorMessage( + self.trUtf8("Socket Error"), self.trUtf8("The SSL handshake failed.")) else: if self.__socket: - self.networkWidget.addErrorMessage(self.trUtf8("Socket Error"), + self.networkWidget.addErrorMessage( + self.trUtf8("Socket Error"), self.trUtf8( "The following network error occurred:<br/>{0}") .format(self.__socket.errorString())) else: - self.networkWidget.addErrorMessage(self.trUtf8("Socket Error"), + self.networkWidget.addErrorMessage( + self.trUtf8("Socket Error"), self.trUtf8("A network error occurred.")) def __sslErrors(self, errors): @@ -777,7 +789,8 @@ ignored, defaultChanged = self.__sslErrorHandler.sslErrors( errors, self.__server.getName(), self.__server.getPort()) if ignored == E5SslErrorHandler.NotIgnored: - self.networkWidget.addErrorMessage(self.trUtf8("SSL Error"), + self.networkWidget.addErrorMessage( + self.trUtf8("SSL Error"), self.trUtf8( """Could not connect to {0} (port {1}) using an SSL""" """ encrypted connection. Either the server does not""" @@ -790,7 +803,8 @@ self.__socket.setSslConfiguration( QSslConfiguration.defaultConfiguration()) if ignored == E5SslErrorHandler.UserIgnored: - self.networkWidget.addErrorMessage(self.trUtf8("SSL Error"), + self.networkWidget.addErrorMessage( + self.trUtf8("SSL Error"), self.trUtf8( """The SSL certificate for the server {0} (port {1})""" """ failed the authenticity check. SSL errors""" @@ -847,24 +861,31 @@ else: vers = " " + Version msg = "Eric IRC client{0}, {1}".format(vers, Copyright) - self.networkWidget.addServerMessage(self.trUtf8("CTCP"), + self.networkWidget.addServerMessage( + self.trUtf8("CTCP"), self.trUtf8("Received Version request from {0}.").format( - match.group(1))) + match.group(1))) self.__sendCtcpReply(match.group(1), "VERSION " + msg) elif ctcpRequest == "ping": - self.networkWidget.addServerMessage(self.trUtf8("CTCP"), - self.trUtf8("Received CTCP-PING request from {0}," - " sending answer.").format(match.group(1))) + self.networkWidget.addServerMessage( + self.trUtf8("CTCP"), + self.trUtf8( + "Received CTCP-PING request from {0}," + " sending answer.").format(match.group(1))) self.__sendCtcpReply( match.group(1), "PING {0}".format(ctcpArg)) elif ctcpRequest == "clientinfo": - self.networkWidget.addServerMessage(self.trUtf8("CTCP"), - self.trUtf8("Received CTCP-CLIENTINFO request from {0}," + self.networkWidget.addServerMessage( + self.trUtf8("CTCP"), + self.trUtf8( + "Received CTCP-CLIENTINFO request from {0}," " sending answer.").format(match.group(1))) - self.__sendCtcpReply(match.group(1), + self.__sendCtcpReply( + match.group(1), "CLIENTINFO CLIENTINFO PING VERSION") else: - self.networkWidget.addServerMessage(self.trUtf8("CTCP"), + self.networkWidget.addServerMessage( + self.trUtf8("CTCP"), self.trUtf8( "Received unknown CTCP-{0} request from {1}.").format( ctcpRequest, match.group(1))) @@ -878,7 +899,8 @@ """ for channel in self.__channelList: index = self.channelsWidget.indexOf(channel) - self.channelsWidget.setTabText(index, + self.channelsWidget.setTabText( + index, self.trUtf8("{0} ({1})", "channel name, users count").format( channel.name(), channel.getUsersCount())) @@ -911,7 +933,8 @@ """ Private method to handle a 443 server error. """ - self.networkWidget.addServerMessage(self.trUtf8("Critical"), + self.networkWidget.addServerMessage( + self.trUtf8("Critical"), self.trUtf8("The given nickname is already in use.")) def __changeNick(self, nick):
--- a/PluginManager/PluginExceptions.py Mon Oct 14 20:08:19 2013 +0200 +++ b/PluginManager/PluginExceptions.py Tue Oct 15 18:29:32 2013 +0200 @@ -52,9 +52,9 @@ if msg: self._errorMessage = msg else: - self._errorMessage = \ - QApplication.translate("PluginError", - "Plugin paths not found or not creatable.") + self._errorMessage = QApplication.translate( + "PluginError", + "Plugin paths not found or not creatable.") class PluginModulesError(PluginError):
--- a/PluginManager/PluginManager.py Mon Oct 14 20:08:19 2013 +0200 +++ b/PluginManager/PluginManager.py Tue Oct 15 18:29:32 2013 +0200 @@ -159,7 +159,8 @@ f = open(fname, "w") f.close() except IOError: - return (False, + return ( + False, self.trUtf8("Could not create a package for {0}.")\ .format(self.__develPluginFile)) @@ -193,7 +194,8 @@ del self.pluginDirs["global"] if not os.path.exists(self.pluginDirs["eric5"]): - return (False, + return ( + False, self.trUtf8( "The internal plugin directory <b>{0}</b>" " does not exits.").format(self.pluginDirs["eric5"])) @@ -552,13 +554,16 @@ module.eric5PluginModuleName, className) pluginClass = getattr(module, className) if not hasattr(pluginClass, "__init__"): - raise PluginClassFormatError(module.eric5PluginModuleName, + raise PluginClassFormatError( + module.eric5PluginModuleName, className, "__init__") if not hasattr(pluginClass, "activate"): - raise PluginClassFormatError(module.eric5PluginModuleName, + raise PluginClassFormatError( + module.eric5PluginModuleName, className, "activate") if not hasattr(pluginClass, "deactivate"): - raise PluginClassFormatError(module.eric5PluginModuleName, + raise PluginClassFormatError( + module.eric5PluginModuleName, className, "deactivate") return True except PluginModuleFormatError as e:
--- a/PluginManager/PluginRepositoryDialog.py Mon Oct 14 20:08:19 2013 +0200 +++ b/PluginManager/PluginRepositoryDialog.py Tue Oct 15 18:29:32 2013 +0200 @@ -70,8 +70,8 @@ self.__downloadButton = self.buttonBox.addButton( self.trUtf8("Download"), QDialogButtonBox.ActionRole) self.__downloadButton.setEnabled(False) - self.__downloadInstallButton = \ - self.buttonBox.addButton(self.trUtf8("Download && Install"), + self.__downloadInstallButton = self.buttonBox.addButton( + self.trUtf8("Download && Install"), QDialogButtonBox.ActionRole) self.__downloadInstallButton.setEnabled(False) self.__downloadCancelButton = self.buttonBox.addButton( @@ -169,7 +169,8 @@ return self.urlEdit.setText(current.data(0, urlRole) or "") - self.descriptionEdit.setPlainText(current.data(0, descrRole) and \ + self.descriptionEdit.setPlainText( + current.data(0, descrRole) and \ self.__formatDescription(current.data(0, descrRole)) or "") self.authorEdit.setText(current.data(0, authorRole) or "") @@ -270,7 +271,8 @@ else: ui = None if ui and ui.notificationsEnabled(): - ui.showNotification(UI.PixmapCache.getPixmap("plugin48.png"), + ui.showNotification( + UI.PixmapCache.getPixmap("plugin48.png"), self.trUtf8("Download Plugin Files"), self.trUtf8("""The requested plugins were downloaded.""")) @@ -337,7 +339,8 @@ .format(self.pluginRepositoryFile)) else: self.__repositoryMissing = True - QTreeWidgetItem(self.repositoryList, + QTreeWidgetItem( + self.repositoryList, ["", self.trUtf8( "No plugin repository file available.\nSelect Update.") ])
--- a/PluginManager/PluginUninstallDialog.py Mon Oct 14 20:08:19 2013 +0200 +++ b/PluginManager/PluginUninstallDialog.py Tue Oct 15 18:29:32 2013 +0200 @@ -178,11 +178,12 @@ if not self.__external: ui = e5App().getObject("UserInterface") if ui.notificationsEnabled(): - ui.showNotification(UI.PixmapCache.getPixmap("plugin48.png"), - self.trUtf8("Plugin Uninstallation"), - self.trUtf8( - """<p>The plugin <b>{0}</b> was uninstalled successfully""" - """ from {1}.</p>""")\ + ui.showNotification( + UI.PixmapCache.getPixmap("plugin48.png"), + self.trUtf8("Plugin Uninstallation"), + self.trUtf8( + """<p>The plugin <b>{0}</b> was uninstalled""" + """ successfully from {1}.</p>""")\ .format(pluginName, pluginDirectory)) return True
--- a/Plugins/AboutPlugin/AboutDialog.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Plugins/AboutPlugin/AboutDialog.py Tue Oct 15 18:29:32 2013 +0200 @@ -19,7 +19,8 @@ titleText = "<b>{0} - {1}</b>".format(UI.Info.Program, UI.Info.Version) -aboutText = QApplication.translate("AboutDialog", +aboutText = QApplication.translate( + "AboutDialog", """<p>{0} is an Integrated Development Environment for the Python""" """ programming language. It is written using the PyQt Python bindings""" """ for the Qt GUI toolkit and the QScintilla editor widget.</p>"""
--- a/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleChecker.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleChecker.py Tue Oct 15 18:29:32 2013 +0200 @@ -51,8 +51,10 @@ interpreter = Preferences.getDebugger("PythonInterpreter") if interpreter == "" or not Utilities.isExecutable(interpreter): - self.errors.append((filename, 1, 1, - QCoreApplication.translate("CodeStyleCheckerPy2", + self.errors.append( + (filename, 1, 1, + QCoreApplication.translate( + "CodeStyleCheckerPy2", "Python2 interpreter not configured."))) return @@ -123,6 +125,8 @@ self.counters[code] = int(countStr) index += 1 else: - self.errors.append((filename, 1, 1, - QCoreApplication.translate("CodeStyleCheckerPy2", + self.errors.append( + (filename, 1, 1, + QCoreApplication.translate( + "CodeStyleCheckerPy2", "Python2 interpreter did not finish within 15s.")))
--- a/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py Tue Oct 15 18:29:32 2013 +0200 @@ -156,7 +156,8 @@ fixable = False code, message = message.split(None, 1) - itm = QTreeWidgetItem(self.__lastFileItem, + itm = QTreeWidgetItem( + self.__lastFileItem, ["{0:6}".format(line), code, message]) if code.startswith("W"): itm.setIcon(1, UI.PixmapCache.getIcon("warning.png")) @@ -395,7 +396,8 @@ source = source.splitlines(True) except (UnicodeError, IOError) as msg: self.noResults = False - self.__createResultItem(file, "1", "1", + self.__createResultItem( + file, "1", "1", self.trUtf8("Error: {0}").format(str(msg))\ .rstrip()[1:-1], False, False) progress += 1 @@ -406,9 +408,9 @@ ext = os.path.splitext(file)[1] if fixIssues: from .CodeStyleFixer import CodeStyleFixer - fixer = CodeStyleFixer(self.__project, file, source, - fixCodes, noFixCodes, maxLineLength, - True) # always fix in place + fixer = CodeStyleFixer( + self.__project, file, source, fixCodes, noFixCodes, + maxLineLength, True) # always fix in place else: fixer = None if ("FileType" in flags and @@ -421,7 +423,8 @@ self.__project.getProjectLanguage() in ["Python", "Python2"]): from .CodeStyleChecker import CodeStyleCheckerPy2 - report = CodeStyleCheckerPy2(file, [], + report = CodeStyleCheckerPy2( + file, [], repeat=repeatMessages, select=includeMessages, ignore=excludeMessages, @@ -738,26 +741,26 @@ Private slot to store the current configuration values as default values. """ - Preferences.Prefs.settings.setValue("PEP8/ExcludeFilePatterns", - self.excludeFilesEdit.text()) - Preferences.Prefs.settings.setValue("PEP8/ExcludeMessages", - self.excludeMessagesEdit.text()) - Preferences.Prefs.settings.setValue("PEP8/IncludeMessages", - self.includeMessagesEdit.text()) - Preferences.Prefs.settings.setValue("PEP8/RepeatMessages", - self.repeatCheckBox.isChecked()) - Preferences.Prefs.settings.setValue("PEP8/FixCodes", - self.fixIssuesEdit.text()) - Preferences.Prefs.settings.setValue("PEP8/NoFixCodes", - self.noFixIssuesEdit.text()) - Preferences.Prefs.settings.setValue("PEP8/FixIssues", - self.fixIssuesCheckBox.isChecked()) - Preferences.Prefs.settings.setValue("PEP8/MaxLineLength", - self.lineLengthSpinBox.value()) - Preferences.Prefs.settings.setValue("PEP8/HangClosing", - self.hangClosingCheckBox.isChecked()) - Preferences.Prefs.settings.setValue("PEP8/DocstringType", - self.docTypeComboBox.itemData( + Preferences.Prefs.settings.setValue( + "PEP8/ExcludeFilePatterns", self.excludeFilesEdit.text()) + Preferences.Prefs.settings.setValue( + "PEP8/ExcludeMessages", self.excludeMessagesEdit.text()) + Preferences.Prefs.settings.setValue( + "PEP8/IncludeMessages", self.includeMessagesEdit.text()) + Preferences.Prefs.settings.setValue( + "PEP8/RepeatMessages", self.repeatCheckBox.isChecked()) + Preferences.Prefs.settings.setValue( + "PEP8/FixCodes", self.fixIssuesEdit.text()) + Preferences.Prefs.settings.setValue( + "PEP8/NoFixCodes", self.noFixIssuesEdit.text()) + Preferences.Prefs.settings.setValue( + "PEP8/FixIssues", self.fixIssuesCheckBox.isChecked()) + Preferences.Prefs.settings.setValue( + "PEP8/MaxLineLength", self.lineLengthSpinBox.value()) + Preferences.Prefs.settings.setValue( + "PEP8/HangClosing", self.hangClosingCheckBox.isChecked()) + Preferences.Prefs.settings.setValue( + "PEP8/DocstringType", self.docTypeComboBox.itemData( self.docTypeComboBox.currentIndex())) @pyqtSlot() @@ -766,15 +769,15 @@ Private slot to reset the configuration values to their default values. """ Preferences.Prefs.settings.setValue("PEP8/ExcludeFilePatterns", "") - Preferences.Prefs.settings.setValue("PEP8/ExcludeMessages", - pep8.DEFAULT_IGNORE) + Preferences.Prefs.settings.setValue( + "PEP8/ExcludeMessages", pep8.DEFAULT_IGNORE) Preferences.Prefs.settings.setValue("PEP8/IncludeMessages", "") Preferences.Prefs.settings.setValue("PEP8/RepeatMessages", False) Preferences.Prefs.settings.setValue("PEP8/FixCodes", "") Preferences.Prefs.settings.setValue("PEP8/NoFixCodes", "E501") Preferences.Prefs.settings.setValue("PEP8/FixIssues", False) - Preferences.Prefs.settings.setValue("PEP8/MaxLineLength", - pep8.MAX_LINE_LENGTH) + Preferences.Prefs.settings.setValue( + "PEP8/MaxLineLength", pep8.MAX_LINE_LENGTH) Preferences.Prefs.settings.setValue("PEP8/HangClosing", False) Preferences.Prefs.settings.setValue("PEP8/DocstringType", "pep257") @@ -849,9 +852,9 @@ continue deferredFixes = {} - fixer = CodeStyleFixer(self.__project, file, source, - fixCodes, noFixCodes, maxLineLength, - True) # always fix in place + fixer = CodeStyleFixer( + self.__project, file, source, fixCodes, noFixCodes, + maxLineLength, True) # always fix in place errors = fixesDict[file] errors.sort(key=lambda a: a[0][0]) for error in errors:
--- a/Plugins/CheckerPlugins/CodeStyleChecker/DocStyleChecker.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Plugins/CheckerPlugins/CodeStyleChecker/DocStyleChecker.py Tue Oct 15 18:29:32 2013 +0200 @@ -705,8 +705,8 @@ end = line - 1, char startLine = classContext.start() + start[0] endLine = classContext.start() + end[0] - contexts.append( - DocStyleContext(self.__source[startLine:endLine], + contexts.append(DocStyleContext( + self.__source[startLine:endLine], startLine, "def")) except StopIteration: pass
--- a/Plugins/CheckerPlugins/CodeStyleChecker/NamingStyleChecker.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Plugins/CheckerPlugins/CodeStyleChecker/NamingStyleChecker.py Tue Oct 15 18:29:32 2013 +0200 @@ -29,34 +29,48 @@ "N811", "N812", "N813", "N814", "N821", "N831" ] Messages = { - "N801": QT_TRANSLATE_NOOP("NamingStyleChecker", + "N801": QT_TRANSLATE_NOOP( + "NamingStyleChecker", "class names should use CapWords convention"), - "N802": QT_TRANSLATE_NOOP("NamingStyleChecker", + "N802": QT_TRANSLATE_NOOP( + "NamingStyleChecker", "function name should be lowercase"), - "N803": QT_TRANSLATE_NOOP("NamingStyleChecker", + "N803": QT_TRANSLATE_NOOP( + "NamingStyleChecker", "argument name should be lowercase"), - "N804": QT_TRANSLATE_NOOP("NamingStyleChecker", + "N804": QT_TRANSLATE_NOOP( + "NamingStyleChecker", "first argument of a class method should be named 'cls'"), - "N805": QT_TRANSLATE_NOOP("NamingStyleChecker", + "N805": QT_TRANSLATE_NOOP( + "NamingStyleChecker", "first argument of a method should be named 'self'"), - "N806": QT_TRANSLATE_NOOP("NamingStyleChecker", + "N806": QT_TRANSLATE_NOOP( + "NamingStyleChecker", "first argument of a static method should not be named" " 'self' or 'cls"), - "N807": QT_TRANSLATE_NOOP("NamingStyleChecker", + "N807": QT_TRANSLATE_NOOP( + "NamingStyleChecker", "module names should be lowercase"), - "N808": QT_TRANSLATE_NOOP("NamingStyleChecker", + "N808": QT_TRANSLATE_NOOP( + "NamingStyleChecker", "package names should be lowercase"), - "N811": QT_TRANSLATE_NOOP("NamingStyleChecker", + "N811": QT_TRANSLATE_NOOP( + "NamingStyleChecker", "constant imported as non constant"), - "N812": QT_TRANSLATE_NOOP("NamingStyleChecker", + "N812": QT_TRANSLATE_NOOP( + "NamingStyleChecker", "lowercase imported as non lowercase"), - "N813": QT_TRANSLATE_NOOP("NamingStyleChecker", + "N813": QT_TRANSLATE_NOOP( + "NamingStyleChecker", "camelcase imported as lowercase"), - "N814": QT_TRANSLATE_NOOP("NamingStyleChecker", + "N814": QT_TRANSLATE_NOOP( + "NamingStyleChecker", "camelcase imported as constant"), - "N821": QT_TRANSLATE_NOOP("NamingStyleChecker", + "N821": QT_TRANSLATE_NOOP( + "NamingStyleChecker", "variable in function should be lowercase"), - "N831": QT_TRANSLATE_NOOP("NamingStyleChecker", + "N831": QT_TRANSLATE_NOOP( + "NamingStyleChecker", "names 'l', 'O' and 'I' should be avoided"), }
--- a/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheckerDialog.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheckerDialog.py Tue Oct 15 18:29:32 2013 +0200 @@ -189,7 +189,8 @@ source = Utilities.convertLineEnds(source, "\n") except (UnicodeError, IOError) as msg: self.noResults = False - self.__createResultItem(file, "1", 0, + self.__createResultItem( + file, "1", 0, self.trUtf8("Error: {0}").format(str(msg))\ .rstrip()[1:-1], "") progress += 1 @@ -208,7 +209,8 @@ "Python2"]): isPy3 = False nok, fname, line, index, code, error, warnings = \ - Utilities.py2compile(file, + Utilities.py2compile( + file, checkFlakes=Preferences.getFlakes( "IncludeInSyntaxCheck")) else:
--- a/Plugins/CheckerPlugins/Tabnanny/TabnannyDialog.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Plugins/CheckerPlugins/Tabnanny/TabnannyDialog.py Tue Oct 15 18:29:32 2013 +0200 @@ -149,7 +149,8 @@ source = Utilities.convertLineEnds(source, "\n") except (UnicodeError, IOError) as msg: self.noResults = False - self.__createResultItem(file, "1", + self.__createResultItem( + file, "1", "Error: {0}".format(str(msg)).rstrip()[1:-1]) progress += 1 continue @@ -265,7 +266,7 @@ interpreter = Preferences.getDebugger("PythonInterpreter") if interpreter == "" or not Utilities.isExecutable(interpreter): return (True, filename, "1", - self.trUtf8("Python2 interpreter not configured.")) + self.trUtf8("Python2 interpreter not configured.")) checker = os.path.join(getConfig('ericDir'), "UtilitiesPython2", "TabnannyChecker.py") @@ -290,4 +291,4 @@ return (False, None, None, None) return (True, filename, "1", - self.trUtf8("Python2 interpreter did not finish within 15s.")) + self.trUtf8("Python2 interpreter did not finish within 15s."))
--- a/Plugins/PluginAbout.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Plugins/PluginAbout.py Tue Oct 15 18:29:32 2013 +0200 @@ -88,9 +88,10 @@ self.aboutAct.setMenuRole(QAction.AboutRole) acts.append(self.aboutAct) - self.aboutQtAct = E5Action(self.trUtf8('About Qt'), - UI.PixmapCache.getIcon("helpAboutQt.png"), - self.trUtf8('About &Qt'), 0, 0, self, 'about_qt') + self.aboutQtAct = E5Action( + self.trUtf8('About Qt'), + UI.PixmapCache.getIcon("helpAboutQt.png"), + self.trUtf8('About &Qt'), 0, 0, self, 'about_qt') self.aboutQtAct.setStatusTip( self.trUtf8('Display information about the Qt toolkit')) self.aboutQtAct.setWhatsThis(self.trUtf8(
--- a/Plugins/PluginEricapi.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Plugins/PluginEricapi.py Tue Oct 15 18:29:32 2013 +0200 @@ -51,8 +51,8 @@ data = { "programEntry": True, - "header": QApplication.translate("EricapiPlugin", - "Eric5 API File Generator"), + "header": QApplication.translate( + "EricapiPlugin", "Eric5 API File Generator"), "exe": exe, "versionCommand": '--version', "versionStartsWith": 'eric5_',
--- a/Plugins/PluginEricdoc.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Plugins/PluginEricdoc.py Tue Oct 15 18:29:32 2013 +0200 @@ -53,8 +53,8 @@ exe = os.path.join(getConfig("bindir"), exe + '.bat') dataList.append({ "programEntry": True, - "header": QApplication.translate("EricdocPlugin", - "Eric5 Documentation Generator"), + "header": QApplication.translate( + "EricdocPlugin", "Eric5 Documentation Generator"), "exe": exe, "versionCommand": '--version', "versionStartsWith": 'eric5_', @@ -69,8 +69,8 @@ exe += '.exe' dataList.append({ "programEntry": True, - "header": QApplication.translate("EricdocPlugin", - "Qt Help Tools"), + "header": QApplication.translate( + "EricdocPlugin", "Qt Help Tools"), "exe": exe, "versionCommand": '-v', "versionStartsWith": 'Qt', @@ -85,8 +85,8 @@ exe += '.exe' dataList.append({ "programEntry": True, - "header": QApplication.translate("EricdocPlugin", - "Qt Help Tools"), + "header": QApplication.translate( + "EricdocPlugin", "Qt Help Tools"), "exe": exe, "versionCommand": '-v', "versionStartsWith": 'Qt', @@ -127,7 +127,8 @@ menu = e5App().getObject("Project").getMenu("Apidoc") if menu: self.__projectAct = \ - E5Action(self.trUtf8('Generate documentation (eric5_doc)'), + E5Action( + self.trUtf8('Generate documentation (eric5_doc)'), self.trUtf8('Generate &documentation (eric5_doc)'), 0, 0, self, 'doc_eric5_doc') self.__projectAct.setStatusTip(
--- a/Plugins/PluginSyntaxChecker.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Plugins/PluginSyntaxChecker.py Tue Oct 15 18:29:32 2013 +0200 @@ -71,9 +71,10 @@ """ menu = e5App().getObject("Project").getMenu("Checks") if menu: - self.__projectAct = E5Action(self.trUtf8('Check Syntax'), - self.trUtf8('&Syntax...'), 0, 0, - self, 'project_check_syntax') + self.__projectAct = E5Action( + self.trUtf8('Check Syntax'), + self.trUtf8('&Syntax...'), 0, 0, + self, 'project_check_syntax') self.__projectAct.setStatusTip( self.trUtf8('Check syntax.')) self.__projectAct.setWhatsThis(self.trUtf8( @@ -84,9 +85,10 @@ e5App().getObject("Project").addE5Actions([self.__projectAct]) menu.addAction(self.__projectAct) - self.__editorAct = E5Action(self.trUtf8('Check Syntax'), - self.trUtf8('&Syntax...'), 0, 0, - self, "") + self.__editorAct = E5Action( + self.trUtf8('Check Syntax'), + self.trUtf8('&Syntax...'), 0, 0, + self, "") self.__editorAct.setWhatsThis(self.trUtf8( """<b>Check Syntax...</b>""" """<p>This checks Python files for syntax errors.</p>""" @@ -183,8 +185,8 @@ project.saveAllScripts() ppath = project.getProjectPath() files = [os.path.join(ppath, file) \ - for file in project.pdata["SOURCES"] \ - if file.endswith( + for file in project.pdata["SOURCES"] \ + if file.endswith( tuple(Preferences.getPython("Python3Extensions")) + tuple(Preferences.getPython("PythonExtensions")))]
--- a/Plugins/PluginTabnanny.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Plugins/PluginTabnanny.py Tue Oct 15 18:29:32 2013 +0200 @@ -71,9 +71,10 @@ """ menu = e5App().getObject("Project").getMenu("Checks") if menu: - self.__projectAct = E5Action(self.trUtf8('Check Indentations'), - self.trUtf8('&Indentations...'), 0, 0, - self, 'project_check_indentations') + self.__projectAct = E5Action( + self.trUtf8('Check Indentations'), + self.trUtf8('&Indentations...'), 0, 0, + self, 'project_check_indentations') self.__projectAct.setStatusTip( self.trUtf8('Check indentations using tabnanny.')) self.__projectAct.setWhatsThis(self.trUtf8( @@ -85,9 +86,10 @@ e5App().getObject("Project").addE5Actions([self.__projectAct]) menu.addAction(self.__projectAct) - self.__editorAct = E5Action(self.trUtf8('Check Indentations'), - self.trUtf8('&Indentations...'), 0, 0, - self, "") + self.__editorAct = E5Action( + self.trUtf8('Check Indentations'), + self.trUtf8('&Indentations...'), 0, 0, + self, "") self.__editorAct.setWhatsThis(self.trUtf8( """<b>Check Indentations...</b>""" """<p>This checks Python files""" @@ -186,8 +188,8 @@ project.saveAllScripts() ppath = project.getProjectPath() files = [os.path.join(ppath, file) \ - for file in project.pdata["SOURCES"] \ - if file.endswith( + for file in project.pdata["SOURCES"] \ + if file.endswith( tuple(Preferences.getPython("Python3Extensions")) + tuple(Preferences.getPython("PythonExtensions")))]
--- a/Plugins/PluginVcsMercurial.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Plugins/PluginVcsMercurial.py Tue Oct 15 18:29:32 2013 +0200 @@ -53,8 +53,8 @@ data = { "programEntry": True, - "header": QApplication.translate("VcsMercurialPlugin", - "Version Control - Mercurial"), + "header": QApplication.translate( + "VcsMercurialPlugin", "Version Control - Mercurial"), "exe": exe, "versionCommand": 'version', "versionStartsWith": 'Mercurial',
--- a/Plugins/PluginVcsPySvn.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Plugins/PluginVcsPySvn.py Tue Oct 15 18:29:32 2013 +0200 @@ -57,8 +57,8 @@ data = { "programEntry": False, - "header": QApplication.translate("VcsPySvnPlugin", - "Version Control - Subversion (pysvn)"), + "header": QApplication.translate( + "VcsPySvnPlugin", "Version Control - Subversion (pysvn)"), "text": text, "version": version, } @@ -200,7 +200,8 @@ return Preferences.toBool(Preferences.Prefs.settings.value( "Subversion/" + key, self.__subversionDefaults[key])) elif key in ["LogLimit", "CommitMessages"]: - return int(Preferences.Prefs.settings.value("Subversion/" + key, + return int(Preferences.Prefs.settings.value( + "Subversion/" + key, self.__subversionDefaults[key])) elif key in ["Commits"]: return Preferences.toList(Preferences.Prefs.settings.value(
--- a/Plugins/PluginVcsSubversion.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Plugins/PluginVcsSubversion.py Tue Oct 15 18:29:32 2013 +0200 @@ -53,8 +53,8 @@ data = { "programEntry": True, - "header": QApplication.translate("VcsSubversionPlugin", - "Version Control - Subversion (svn)"), + "header": QApplication.translate( + "VcsSubversionPlugin", "Version Control - Subversion (svn)"), "exe": exe, "versionCommand": '--version', "versionStartsWith": 'svn', @@ -207,7 +207,8 @@ return Preferences.toBool(Preferences.Prefs.settings.value( "Subversion/" + key, self.__subversionDefaults[key])) elif key in ["LogLimit", "CommitMessages"]: - return int(Preferences.Prefs.settings.value("Subversion/" + key, + return int(Preferences.Prefs.settings.value( + "Subversion/" + key, self.__subversionDefaults[key])) elif key in ["Commits"]: return Preferences.toList(Preferences.Prefs.settings.value(
--- a/Plugins/PluginWizardPyRegExp.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Plugins/PluginWizardPyRegExp.py Tue Oct 15 18:29:32 2013 +0200 @@ -67,9 +67,10 @@ """ Private method to initialize the action. """ - self.action = E5Action(self.trUtf8('Python re Wizard'), - self.trUtf8('&Python re Wizard...'), 0, 0, self, - 'wizards_python_re') + self.action = E5Action( + self.trUtf8('Python re Wizard'), + self.trUtf8('&Python re Wizard...'), 0, 0, self, + 'wizards_python_re') self.action.setStatusTip(self.trUtf8('Python re Wizard')) self.action.setWhatsThis(self.trUtf8( """<b>Python re Wizard</b>"""
--- a/Plugins/PluginWizardQColorDialog.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Plugins/PluginWizardQColorDialog.py Tue Oct 15 18:29:32 2013 +0200 @@ -67,9 +67,10 @@ """ Private method to initialize the action. """ - self.action = E5Action(self.trUtf8('QColorDialog Wizard'), - self.trUtf8('Q&ColorDialog Wizard...'), 0, 0, self, - 'wizards_qcolordialog') + self.action = E5Action( + self.trUtf8('QColorDialog Wizard'), + self.trUtf8('Q&ColorDialog Wizard...'), 0, 0, self, + 'wizards_qcolordialog') self.action.setStatusTip(self.trUtf8('QColorDialog Wizard')) self.action.setWhatsThis(self.trUtf8( """<b>QColorDialog Wizard</b>"""
--- a/Plugins/PluginWizardQFileDialog.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Plugins/PluginWizardQFileDialog.py Tue Oct 15 18:29:32 2013 +0200 @@ -67,9 +67,10 @@ """ Private method to initialize the action. """ - self.action = E5Action(self.trUtf8('QFileDialog Wizard'), - self.trUtf8('Q&FileDialog Wizard...'), 0, 0, self, - 'wizards_qfiledialog') + self.action = E5Action( + self.trUtf8('QFileDialog Wizard'), + self.trUtf8('Q&FileDialog Wizard...'), 0, 0, self, + 'wizards_qfiledialog') self.action.setStatusTip(self.trUtf8('QFileDialog Wizard')) self.action.setWhatsThis(self.trUtf8( """<b>QFileDialog Wizard</b>"""
--- a/Plugins/PluginWizardQFontDialog.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Plugins/PluginWizardQFontDialog.py Tue Oct 15 18:29:32 2013 +0200 @@ -67,9 +67,10 @@ """ Private method to initialize the action. """ - self.action = E5Action(self.trUtf8('QFontDialog Wizard'), - self.trUtf8('Q&FontDialog Wizard...'), 0, 0, self, - 'wizards_qfontdialog') + self.action = E5Action( + self.trUtf8('QFontDialog Wizard'), + self.trUtf8('Q&FontDialog Wizard...'), 0, 0, self, + 'wizards_qfontdialog') self.action.setStatusTip(self.trUtf8('QFontDialog Wizard')) self.action.setWhatsThis(self.trUtf8( """<b>QFontDialog Wizard</b>"""
--- a/Plugins/PluginWizardQInputDialog.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Plugins/PluginWizardQInputDialog.py Tue Oct 15 18:29:32 2013 +0200 @@ -67,9 +67,10 @@ """ Private method to initialize the action. """ - self.action = E5Action(self.trUtf8('QInputDialog Wizard'), - self.trUtf8('Q&InputDialog Wizard...'), 0, 0, self, - 'wizards_qinputdialog') + self.action = E5Action( + self.trUtf8('QInputDialog Wizard'), + self.trUtf8('Q&InputDialog Wizard...'), 0, 0, self, + 'wizards_qinputdialog') self.action.setStatusTip(self.trUtf8('QInputDialog Wizard')) self.action.setWhatsThis(self.trUtf8( """<b>QInputDialog Wizard</b>"""
--- a/Plugins/PluginWizardQMessageBox.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Plugins/PluginWizardQMessageBox.py Tue Oct 15 18:29:32 2013 +0200 @@ -67,9 +67,10 @@ """ Private method to initialize the action. """ - self.action = E5Action(self.trUtf8('QMessageBox Wizard'), - self.trUtf8('Q&MessageBox Wizard...'), 0, 0, self, - 'wizards_qmessagebox') + self.action = E5Action( + self.trUtf8('QMessageBox Wizard'), + self.trUtf8('Q&MessageBox Wizard...'), 0, 0, self, + 'wizards_qmessagebox') self.action.setStatusTip(self.trUtf8('QMessageBox Wizard')) self.action.setWhatsThis(self.trUtf8( """<b>QMessageBox Wizard</b>"""
--- a/Plugins/PluginWizardQRegExp.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Plugins/PluginWizardQRegExp.py Tue Oct 15 18:29:32 2013 +0200 @@ -67,9 +67,10 @@ """ Private method to initialize the action. """ - self.action = E5Action(self.trUtf8('QRegExp Wizard'), - self.trUtf8('Q&RegExp Wizard...'), 0, 0, self, - 'wizards_qregexp') + self.action = E5Action( + self.trUtf8('QRegExp Wizard'), + self.trUtf8('Q&RegExp Wizard...'), 0, 0, self, + 'wizards_qregexp') self.action.setStatusTip(self.trUtf8('QRegExp Wizard')) self.action.setWhatsThis(self.trUtf8( """<b>QRegExp Wizard</b>"""
--- a/Plugins/PluginWizardQRegularExpression.py Mon Oct 14 20:08:19 2013 +0200 +++ b/Plugins/PluginWizardQRegularExpression.py Tue Oct 15 18:29:32 2013 +0200 @@ -67,9 +67,10 @@ """ Private method to initialize the action. """ - self.action = E5Action(self.trUtf8('QRegularExpression Wizard'), - self.trUtf8('QRegularE&xpression Wizard...'), 0, 0, self, - 'wizards_qregularexpression') + self.action = E5Action( + self.trUtf8('QRegularExpression Wizard'), + self.trUtf8('QRegularE&xpression Wizard...'), 0, 0, self, + 'wizards_qregularexpression') self.action.setStatusTip(self.trUtf8('QRegularExpression Wizard')) self.action.setWhatsThis(self.trUtf8( """<b>QRegularExpression Wizard</b>"""
--- a/eric5_api.py Mon Oct 14 20:08:19 2013 +0200 +++ b/eric5_api.py Tue Oct 15 18:29:32 2013 +0200 @@ -107,7 +107,8 @@ import getopt try: - opts, args = getopt.getopt(sys.argv[1:], "b:e:hl:o:pRrt:Vx:", + opts, args = getopt.getopt( + sys.argv[1:], "b:e:hl:o:pRrt:Vx:", ["base=", "eol=", "exclude=", "exclude-file=", "extension=", "help", "language=", "output=", "private", "recursive", "version", ]) @@ -195,8 +196,8 @@ for arg in args: if os.path.isdir(arg): - if os.path.exists(os.path.join(arg, - Utilities.joinext("__init__", ".py"))): + if os.path.exists(os.path.join( + arg, Utilities.joinext("__init__", ".py"))): basename = os.path.dirname(arg) if arg == '.': sys.stderr.write("The directory '.' is a package.\n") @@ -250,7 +251,8 @@ continue try: - module = Utilities.ModuleParser.readModule(file, + module = Utilities.ModuleParser.readModule( + file, basename=basename, inpackage=inpackage) apiGenerator = APIGenerator(module) api = apiGenerator.genAPI(True, basePackage,
--- a/eric5_doc.py Mon Oct 14 20:08:19 2013 +0200 +++ b/eric5_doc.py Tue Oct 15 18:29:32 2013 +0200 @@ -140,7 +140,8 @@ import getopt try: - opts, args = getopt.getopt(sys.argv[1:], "c:ehio:Rrt:Vx:", + opts, args = getopt.getopt( + sys.argv[1:], "c:ehio:Rrt:Vx:", ["exclude=", "extension=", "help", "noindex", "noempty", "outdir=", "recursive", "style-sheet=", "version", "exclude-file=", "eol=",
--- a/install.py Mon Oct 14 20:08:19 2013 +0200 +++ b/install.py Tue Oct 15 18:29:32 2013 +0200 @@ -100,10 +100,10 @@ " [-m name] [-p python]".format(progName)) elif sys.platform.startswith("win"): print(" {0} [-chxz] [-a dir] [-b dir] [-d dir] [-f file]"\ - .format(progName)) + .format(progName)) else: print(" {0} [-chxz] [-a dir] [-b dir] [-d dir] [-f file] [-i dir]"\ - .format(progName)) + .format(progName)) print("where:") print(" -h display this help message") print(" -a dir where the API files will be installed") @@ -238,20 +238,20 @@ if not os.path.exists(pyexec): pyexec = "{0}/bin/python3".format(sys.exec_prefix) wname = wfile - wrapper = \ + wrapper = ( '''#!/bin/sh exec "{0}" "{1}/{2}.py" "$@" -'''.format(pyexec, pydir, wfile) +'''.format(pyexec, pydir, wfile)) # *nix systems else: wname = wfile - wrapper = \ + wrapper = ( '''#!/bin/sh exec "{0}" "{1}/{2}.py" "$@" -'''.format(sys.executable, pydir, wfile) +'''.format(sys.executable, pydir, wfile)) copyToFile(wname, wrapper) os.chmod(wname, 0o755) @@ -498,21 +498,26 @@ shutilCopy(configName + 'c', modDir) # copy the various parts of eric5 - copyTree(sourceDir, cfg['ericDir'], + copyTree( + sourceDir, cfg['ericDir'], ['*.py', '*.pyc', '*.pyo', '*.pyw'], ['{1}{0}Examples'.format(os.sep, sourceDir)], excludePatterns=["eric5config.py*"]) - copyTree(sourceDir, cfg['ericDir'], ['*.rb'], + copyTree( + sourceDir, cfg['ericDir'], ['*.rb'], ['{1}{0}Examples'.format(os.sep, sourceDir)]) - copyTree('{1}{0}Plugins'.format(os.sep, sourceDir), + copyTree( + '{1}{0}Plugins'.format(os.sep, sourceDir), '{0}{1}Plugins'.format(cfg['ericDir'], os.sep), ['*.png', '*.style']) copyTree( '{1}{0}Documentation'.format(os.sep, sourceDir), cfg['ericDocDir'], ['*.html', '*.qch']) - copyTree('{1}{0}DTDs'.format(os.sep, sourceDir), cfg['ericDTDDir'], + copyTree( + '{1}{0}DTDs'.format(os.sep, sourceDir), cfg['ericDTDDir'], ['*.dtd']) - copyTree('{1}{0}CSSs'.format(os.sep, sourceDir), cfg['ericCSSDir'], + copyTree( + '{1}{0}CSSs'.format(os.sep, sourceDir), cfg['ericCSSDir'], ['*.css']) copyTree( '{1}{0}Styles'.format(os.sep, sourceDir), cfg['ericStylesDir'], @@ -520,14 +525,18 @@ copyTree( '{1}{0}i18n'.format(os.sep, sourceDir), cfg['ericTranslationsDir'], ['*.qm']) - copyTree('{1}{0}icons'.format(os.sep, sourceDir), cfg['ericIconDir'], + copyTree( + '{1}{0}icons'.format(os.sep, sourceDir), cfg['ericIconDir'], ['*.png', 'LICENSE*.*', 'readme.txt']) - copyTree('{1}{0}pixmaps'.format(os.sep, sourceDir), cfg['ericPixDir'], + copyTree( + '{1}{0}pixmaps'.format(os.sep, sourceDir), cfg['ericPixDir'], ['*.png', '*.xpm', '*.ico', '*.gif']) - copyTree('{1}{0}DesignerTemplates'.format(os.sep, sourceDir), + copyTree( + '{1}{0}DesignerTemplates'.format(os.sep, sourceDir), cfg['ericTemplatesDir'], ['*.tmpl']) - copyTree('{1}{0}CodeTemplates'.format(os.sep, sourceDir), + copyTree( + '{1}{0}CodeTemplates'.format(os.sep, sourceDir), cfg['ericCodeTemplatesDir'], ['*.tmpl']) copyTree( @@ -621,14 +630,17 @@ os.makedirs(dst) shutilCopy(os.path.join(sourceDir, "eric5.desktop"), dst) else: - shutilCopy(os.path.join(sourceDir, "icons", "default", "eric.png"), + shutilCopy(os.path.join( + sourceDir, "icons", "default", "eric.png"), "/usr/share/pixmaps/eric.png") - shutilCopy(os.path.join(sourceDir, "eric5.desktop"), + shutilCopy(os.path.join( + sourceDir, "eric5.desktop"), "/usr/share/applications") - shutilCopy( - os.path.join(sourceDir, "icons", "default", "ericWeb48.png"), + shutilCopy(os.path.join( + sourceDir, "icons", "default", "ericWeb48.png"), "/usr/share/pixmaps/ericWeb.png") - shutilCopy(os.path.join(sourceDir, "eric5_webbrowser.desktop"), + shutilCopy(os.path.join( + sourceDir, "eric5_webbrowser.desktop"), "/usr/share/applications") # Create a Mac application bundle @@ -669,25 +681,26 @@ if pybin not in pathlist: pathlist.insert(0, pybin) path = os.pathsep.join(pathlist) - wrapper = \ + wrapper = ( '''#!/bin/sh PATH={0} exec "{1}" "{2}/{3}.py" "$@" -'''.format(path, starter, pydir, "eric5") +'''.format(path, starter, pydir, "eric5")) else: - wrapper = \ + wrapper = ( '''#!/bin/sh exec "{0}" "{1}/{2}.py" "$@" -'''.format(starter, pydir, "eric5") +'''.format(starter, pydir, "eric5")) copyToFile(wname, wrapper) os.chmod(wname, 0o755) shutilCopy(os.path.join(sourceDir, "pixmaps", "eric_2.icns"), os.path.join(dirs["icns"], "eric.icns")) - copyToFile(os.path.join(dirs["contents"], "Info.plist"), + copyToFile( +os.path.join(dirs["contents"], "Info.plist"), '''<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> @@ -710,9 +723,7 @@ <key>CFBundleVersion</key> <string>1.0</string> </dict> -</plist> -'''.format(macAppBundleName.replace(".app", "")) - ) +</plist>\n'''.format(macAppBundleName.replace(".app", ""))) def createInstallConfig(): @@ -800,15 +811,15 @@ pass raise AttributeError('"{{0}}" is not a valid configuration value'.format( - name)) -""".format(cfg['ericDir'], cfg['ericPixDir'], cfg['ericIconDir'], - cfg['ericDTDDir'], cfg['ericCSSDir'], - cfg['ericStylesDir'], cfg['ericDocDir'], - cfg['ericExamplesDir'], cfg['ericTranslationsDir'], - cfg['ericTemplatesDir'], - cfg['ericCodeTemplatesDir'], cfg['ericOthersDir'], - cfg['bindir'], cfg['mdir'], - cfg['apidir'], apis) + name))\n""".format( + cfg['ericDir'], cfg['ericPixDir'], cfg['ericIconDir'], + cfg['ericDTDDir'], cfg['ericCSSDir'], + cfg['ericStylesDir'], cfg['ericDocDir'], + cfg['ericExamplesDir'], cfg['ericTranslationsDir'], + cfg['ericTemplatesDir'], + cfg['ericCodeTemplatesDir'], cfg['ericOthersDir'], + cfg['bindir'], cfg['mdir'], + cfg['apidir'], apis) copyToFile(fn, config) @@ -1162,7 +1173,8 @@ if doCompile: print("\nCompiling source files ...") if distDir: - compileall.compile_dir(sourceDir, + compileall.compile_dir( + sourceDir, ddir=os.path.join(distDir, modDir, cfg['ericDir']), rx=re.compile( r"DebugClients[\\/]Python[\\/]|UtilitiesPython2[\\/]"), @@ -1171,7 +1183,8 @@ configName, dfile=os.path.join(distDir, modDir, "eric5config.py")) else: - compileall.compile_dir(sourceDir, + compileall.compile_dir( + sourceDir, ddir=os.path.join(modDir, cfg['ericDir']), rx=re.compile( r"DebugClients[\\/]Python[\\/]|UtilitiesPython2[\\/]"),