Fri, 18 Oct 2013 18:42:10 +0200
Fixed a bunch of visible indentation issues.
--- a/Project/AddDirectoryDialog.py Fri Oct 18 18:00:02 2013 +0200 +++ b/Project/AddDirectoryDialog.py Fri Oct 18 18:42:10 2013 +0200 @@ -151,7 +151,8 @@ """ filetype = \ self.filterComboBox.itemData(self.filterComboBox.currentIndex()) - return (filetype, + return ( + filetype, Utilities.toNativeSeparators(self.sourceDirEdit.text()), Utilities.toNativeSeparators(self.targetDirEdit.text()), self.recursiveCheckBox.isChecked())
--- a/Project/CreateDialogCodeDialog.py Fri Oct 18 18:00:02 2013 +0200 +++ b/Project/CreateDialogCodeDialog.py Fri Oct 18 18:42:10 2013 +0200 @@ -261,8 +261,8 @@ else: method = "on_{0}_{1}".format( name, metaMethod.signature().split("(")[0]) - method2 = "{0}({1})".format(method, - ", ".join( + method2 = "{0}({1})".format( + method, ", ".join( [self.__mapType(t) for t in metaMethod.parameterTypes()]))
--- a/Project/DebuggerPropertiesDialog.py Fri Oct 18 18:00:02 2013 +0200 +++ b/Project/DebuggerPropertiesDialog.py Fri Oct 18 18:42:10 2013 +0200 @@ -70,7 +70,8 @@ getConfig('ericDir'), "DebugClients", "Python3", "DebugClient.py") elif self.project.pdata["PROGLANGUAGE"][0] == "Ruby": - debugClient = os.path.join(getConfig('ericDir'), + debugClient = os.path.join( + getConfig('ericDir'), "DebugClients", "Ruby", "DebugClient.rb") else: debugClient = "" @@ -156,7 +157,8 @@ getConfig('ericDir'), "DebugClients", "Python3", "DebugClient.py") elif self.project.pdata["PROGLANGUAGE"][0] == "Ruby": - debugClient = os.path.join(getConfig('ericDir'), + debugClient = os.path.join( + getConfig('ericDir'), "DebugClients", "Ruby", "DebugClient.rb") else: debugClient = ""
--- a/Project/LexerAssociationDialog.py Fri Oct 18 18:00:02 2013 +0200 +++ b/Project/LexerAssociationDialog.py Fri Oct 18 18:42:10 2013 +0200 @@ -87,7 +87,8 @@ self.editorFileExtEdit.clear() self.editorLexerCombo.setCurrentIndex(0) self.pygmentsLexerCombo.setCurrentIndex(0) - self.editorLexerList.sortItems(self.editorLexerList.sortColumn(), + self.editorLexerList.sortItems( + self.editorLexerList.sortColumn(), self.editorLexerList.header().sortIndicatorOrder()) @pyqtSlot()
--- a/Project/Project.py Fri Oct 18 18:00:02 2013 +0200 +++ b/Project/Project.py Fri Oct 18 18:42:10 2013 +0200 @@ -289,8 +289,8 @@ return type_ in self.__projectTypes def registerProjectType(self, type_, description, fileTypeCallback=None, - binaryTranslationsCallback=None, lexerAssociationCallback=None, - progLanguages=None): + binaryTranslationsCallback=None, + lexerAssociationCallback=None, progLanguages=None): """ Public method to register a project type. @@ -1274,7 +1274,7 @@ if self.pdata["TRANSLATIONSBINPATH"]: qmFile = self.getRelativePath( os.path.join(self.pdata["TRANSLATIONSBINPATH"][0], - os.path.basename(qmFile))) + os.path.basename(qmFile))) self.pdata["TRANSLATIONS"].remove(qmFile) self.__model.removeItem(qmFile) except ValueError: @@ -1311,7 +1311,7 @@ if self.pdata["TRANSLATIONSBINPATH"]: qmFile = self.getRelativePath( os.path.join(self.pdata["TRANSLATIONSBINPATH"][0], - os.path.basename(qmFile))) + os.path.basename(qmFile))) fn = os.path.join(self.ppath, qmFile) if os.path.exists(fn): os.remove(fn) @@ -1500,7 +1500,8 @@ E5MessageBox.information( self.ui, self.trUtf8("Add directory"), - self.trUtf8("<p>The source directory doesn't contain" + self.trUtf8( + "<p>The source directory doesn't contain" " any files belonging to the selected category.</p>")) return @@ -1960,7 +1961,8 @@ E5MessageBox.critical( self.ui, self.trUtf8("Delete directory"), - self.trUtf8("<p>The selected directory <b>{0}</b> could not be" + self.trUtf8( + "<p>The selected directory <b>{0}</b> could not be" " deleted.</p>").format(dn)) return False @@ -3249,10 +3251,11 @@ self.actGrp1 = createActionGroup(self) - act = E5Action(self.trUtf8('New project'), - UI.PixmapCache.getIcon("projectNew.png"), - self.trUtf8('&New...'), 0, 0, - self.actGrp1, 'project_new') + act = E5Action( + self.trUtf8('New project'), + UI.PixmapCache.getIcon("projectNew.png"), + self.trUtf8('&New...'), 0, 0, + self.actGrp1, 'project_new') act.setStatusTip(self.trUtf8('Generate a new project')) act.setWhatsThis(self.trUtf8( """<b>New...</b>""" @@ -3262,10 +3265,11 @@ act.triggered[()].connect(self.createNewProject) self.actions.append(act) - act = E5Action(self.trUtf8('Open project'), - UI.PixmapCache.getIcon("projectOpen.png"), - self.trUtf8('&Open...'), 0, 0, - self.actGrp1, 'project_open') + act = E5Action( + self.trUtf8('Open project'), + UI.PixmapCache.getIcon("projectOpen.png"), + self.trUtf8('&Open...'), 0, 0, + self.actGrp1, 'project_open') act.setStatusTip(self.trUtf8('Open an existing project')) act.setWhatsThis(self.trUtf8( """<b>Open...</b>""" @@ -3274,9 +3278,10 @@ act.triggered[()].connect(self.openProject) self.actions.append(act) - self.closeAct = E5Action(self.trUtf8('Close project'), - UI.PixmapCache.getIcon("projectClose.png"), - self.trUtf8('&Close'), 0, 0, self, 'project_close') + self.closeAct = E5Action( + self.trUtf8('Close project'), + UI.PixmapCache.getIcon("projectClose.png"), + self.trUtf8('&Close'), 0, 0, self, 'project_close') self.closeAct.setStatusTip(self.trUtf8('Close the current project')) self.closeAct.setWhatsThis(self.trUtf8( """<b>Close</b>""" @@ -3285,9 +3290,10 @@ self.closeAct.triggered[()].connect(self.closeProject) self.actions.append(self.closeAct) - self.saveAct = E5Action(self.trUtf8('Save project'), - UI.PixmapCache.getIcon("projectSave.png"), - self.trUtf8('&Save'), 0, 0, self, 'project_save') + self.saveAct = E5Action( + self.trUtf8('Save project'), + UI.PixmapCache.getIcon("projectSave.png"), + self.trUtf8('&Save'), 0, 0, self, 'project_save') self.saveAct.setStatusTip(self.trUtf8('Save the current project')) self.saveAct.setWhatsThis(self.trUtf8( """<b>Save</b>""" @@ -3296,9 +3302,10 @@ self.saveAct.triggered[()].connect(self.saveProject) self.actions.append(self.saveAct) - self.saveasAct = E5Action(self.trUtf8('Save project as'), - UI.PixmapCache.getIcon("projectSaveAs.png"), - self.trUtf8('Save &as...'), 0, 0, self, 'project_save_as') + self.saveasAct = E5Action( + self.trUtf8('Save project as'), + UI.PixmapCache.getIcon("projectSaveAs.png"), + self.trUtf8('Save &as...'), 0, 0, self, 'project_save_as') self.saveasAct.setStatusTip(self.trUtf8( 'Save the current project to a new file')) self.saveasAct.setWhatsThis(self.trUtf8( @@ -3310,10 +3317,11 @@ self.actGrp2 = createActionGroup(self) - self.addFilesAct = E5Action(self.trUtf8('Add files to project'), - UI.PixmapCache.getIcon("fileMisc.png"), - self.trUtf8('Add &files...'), 0, 0, - self.actGrp2, 'project_add_file') + self.addFilesAct = E5Action( + self.trUtf8('Add files to project'), + UI.PixmapCache.getIcon("fileMisc.png"), + self.trUtf8('Add &files...'), 0, 0, + self.actGrp2, 'project_add_file') self.addFilesAct.setStatusTip(self.trUtf8( 'Add files to the current project')) self.addFilesAct.setWhatsThis(self.trUtf8( @@ -3355,9 +3363,10 @@ self.addLanguageAct.triggered[()].connect(self.addLanguage) self.actions.append(self.addLanguageAct) - act = E5Action(self.trUtf8('Search new files'), - self.trUtf8('Searc&h new files...'), 0, 0, - self.actGrp2, 'project_search_new_files') + act = E5Action( + self.trUtf8('Search new files'), + self.trUtf8('Searc&h new files...'), 0, 0, + self.actGrp2, 'project_search_new_files') act.setStatusTip(self.trUtf8( 'Search new files in the project directory.')) act.setWhatsThis(self.trUtf8( @@ -3368,10 +3377,11 @@ act.triggered[()].connect(self.__searchNewFiles) self.actions.append(act) - self.propsAct = E5Action(self.trUtf8('Project properties'), - UI.PixmapCache.getIcon("projectProps.png"), - self.trUtf8('&Properties...'), 0, 0, self, - 'project_properties') + self.propsAct = E5Action( + self.trUtf8('Project properties'), + UI.PixmapCache.getIcon("projectProps.png"), + self.trUtf8('&Properties...'), 0, 0, self, + 'project_properties') self.propsAct.setStatusTip(self.trUtf8('Show the project properties')) self.propsAct.setWhatsThis(self.trUtf8( """<b>Properties...</b>""" @@ -3380,10 +3390,11 @@ self.propsAct.triggered[()].connect(self.__showProperties) self.actions.append(self.propsAct) - self.userPropsAct = E5Action(self.trUtf8('User project properties'), - UI.PixmapCache.getIcon("projectUserProps.png"), - self.trUtf8('&User Properties...'), 0, 0, self, - 'project_user_properties') + self.userPropsAct = E5Action( + self.trUtf8('User project properties'), + UI.PixmapCache.getIcon("projectUserProps.png"), + self.trUtf8('&User Properties...'), 0, 0, self, + 'project_user_properties') self.userPropsAct.setStatusTip(self.trUtf8( 'Show the user specific project properties')) self.userPropsAct.setWhatsThis(self.trUtf8( @@ -3394,9 +3405,10 @@ self.userPropsAct.triggered[()].connect(self.__showUserProperties) self.actions.append(self.userPropsAct) - self.filetypesAct = E5Action(self.trUtf8('Filetype Associations'), - self.trUtf8('Filetype Associations...'), 0, 0, - self, 'project_filetype_associatios') + self.filetypesAct = E5Action( + self.trUtf8('Filetype Associations'), + self.trUtf8('Filetype Associations...'), 0, 0, + self, 'project_filetype_associatios') self.filetypesAct.setStatusTip( self.trUtf8('Show the project filetype associations')) self.filetypesAct.setWhatsThis(self.trUtf8( @@ -3411,9 +3423,10 @@ self.__showFiletypeAssociations) self.actions.append(self.filetypesAct) - self.lexersAct = E5Action(self.trUtf8('Lexer Associations'), - self.trUtf8('Lexer Associations...'), 0, 0, - self, 'project_lexer_associatios') + self.lexersAct = E5Action( + self.trUtf8('Lexer Associations'), + self.trUtf8('Lexer Associations...'), 0, 0, + self, 'project_lexer_associatios') self.lexersAct.setStatusTip(self.trUtf8( 'Show the project lexer associations (overriding defaults)')) self.lexersAct.setWhatsThis(self.trUtf8( @@ -3428,9 +3441,10 @@ self.dbgActGrp = createActionGroup(self) - act = E5Action(self.trUtf8('Debugger Properties'), - self.trUtf8('Debugger &Properties...'), 0, 0, - self.dbgActGrp, 'project_debugger_properties') + act = E5Action( + self.trUtf8('Debugger Properties'), + self.trUtf8('Debugger &Properties...'), 0, 0, + self.dbgActGrp, 'project_debugger_properties') act.setStatusTip(self.trUtf8('Show the debugger properties')) act.setWhatsThis(self.trUtf8( """<b>Debugger Properties...</b>""" @@ -3440,9 +3454,10 @@ act.triggered[()].connect(self.__showDebugProperties) self.actions.append(act) - act = E5Action(self.trUtf8('Load'), - self.trUtf8('&Load'), 0, 0, - self.dbgActGrp, 'project_debugger_properties_load') + act = E5Action( + self.trUtf8('Load'), + self.trUtf8('&Load'), 0, 0, + self.dbgActGrp, 'project_debugger_properties_load') act.setStatusTip(self.trUtf8('Load the debugger properties')) act.setWhatsThis(self.trUtf8( """<b>Load Debugger Properties</b>""" @@ -3451,9 +3466,10 @@ act.triggered[()].connect(self.__readDebugProperties) self.actions.append(act) - act = E5Action(self.trUtf8('Save'), - self.trUtf8('&Save'), 0, 0, - self.dbgActGrp, 'project_debugger_properties_save') + act = E5Action( + self.trUtf8('Save'), + self.trUtf8('&Save'), 0, 0, + self.dbgActGrp, 'project_debugger_properties_save') act.setStatusTip(self.trUtf8('Save the debugger properties')) act.setWhatsThis(self.trUtf8( """<b>Save Debugger Properties</b>""" @@ -3462,9 +3478,10 @@ act.triggered[()].connect(self.__writeDebugProperties) self.actions.append(act) - act = E5Action(self.trUtf8('Delete'), - self.trUtf8('&Delete'), 0, 0, - self.dbgActGrp, 'project_debugger_properties_delete') + act = E5Action( + self.trUtf8('Delete'), + self.trUtf8('&Delete'), 0, 0, + self.dbgActGrp, 'project_debugger_properties_delete') act.setStatusTip(self.trUtf8('Delete the debugger properties')) act.setWhatsThis(self.trUtf8( """<b>Delete Debugger Properties</b>""" @@ -3474,9 +3491,10 @@ act.triggered[()].connect(self.__deleteDebugProperties) self.actions.append(act) - act = E5Action(self.trUtf8('Reset'), - self.trUtf8('&Reset'), 0, 0, - self.dbgActGrp, 'project_debugger_properties_resets') + act = E5Action( + self.trUtf8('Reset'), + self.trUtf8('&Reset'), 0, 0, + self.dbgActGrp, 'project_debugger_properties_resets') act.setStatusTip(self.trUtf8('Reset the debugger properties')) act.setWhatsThis(self.trUtf8( """<b>Reset Debugger Properties</b>""" @@ -3487,9 +3505,10 @@ self.sessActGrp = createActionGroup(self) - act = E5Action(self.trUtf8('Load session'), - self.trUtf8('Load session'), 0, 0, - self.sessActGrp, 'project_load_session') + act = E5Action( + self.trUtf8('Load session'), + self.trUtf8('Load session'), 0, 0, + self.sessActGrp, 'project_load_session') act.setStatusTip(self.trUtf8('Load the projects session file.')) act.setWhatsThis(self.trUtf8( """<b>Load session</b>""" @@ -3504,9 +3523,10 @@ act.triggered[()].connect(self.__readSession) self.actions.append(act) - act = E5Action(self.trUtf8('Save session'), - self.trUtf8('Save session'), 0, 0, - self.sessActGrp, 'project_save_session') + act = E5Action( + self.trUtf8('Save session'), + self.trUtf8('Save session'), 0, 0, + self.sessActGrp, 'project_save_session') act.setStatusTip(self.trUtf8('Save the projects session file.')) act.setWhatsThis(self.trUtf8( """<b>Save session</b>""" @@ -3521,9 +3541,10 @@ act.triggered[()].connect(self.__writeSession) self.actions.append(act) - act = E5Action(self.trUtf8('Delete session'), - self.trUtf8('Delete session'), 0, 0, - self.sessActGrp, 'project_delete_session') + act = E5Action( + self.trUtf8('Delete session'), + self.trUtf8('Delete session'), 0, 0, + self.sessActGrp, 'project_delete_session') act.setStatusTip(self.trUtf8('Delete the projects session file.')) act.setWhatsThis(self.trUtf8( """<b>Delete session</b>""" @@ -3534,9 +3555,10 @@ self.chkGrp = createActionGroup(self) - self.codeMetricsAct = E5Action(self.trUtf8('Code Metrics'), - self.trUtf8('&Code Metrics...'), 0, 0, - self.chkGrp, 'project_code_metrics') + self.codeMetricsAct = E5Action( + self.trUtf8('Code Metrics'), + self.trUtf8('&Code Metrics...'), 0, 0, + self.chkGrp, 'project_code_metrics') self.codeMetricsAct.setStatusTip( self.trUtf8('Show some code metrics for the project.')) self.codeMetricsAct.setWhatsThis(self.trUtf8( @@ -3547,9 +3569,10 @@ self.codeMetricsAct.triggered[()].connect(self.__showCodeMetrics) self.actions.append(self.codeMetricsAct) - self.codeCoverageAct = E5Action(self.trUtf8('Python Code Coverage'), - self.trUtf8('Code Co&verage...'), 0, 0, - self.chkGrp, 'project_code_coverage') + self.codeCoverageAct = E5Action( + self.trUtf8('Python Code Coverage'), + self.trUtf8('Code Co&verage...'), 0, 0, + self.chkGrp, 'project_code_coverage') self.codeCoverageAct.setStatusTip( self.trUtf8('Show code coverage information for the project.')) self.codeCoverageAct.setWhatsThis(self.trUtf8( @@ -3560,9 +3583,10 @@ self.codeCoverageAct.triggered[()].connect(self.__showCodeCoverage) self.actions.append(self.codeCoverageAct) - self.codeProfileAct = E5Action(self.trUtf8('Profile Data'), - self.trUtf8('&Profile Data...'), 0, 0, - self.chkGrp, 'project_profile_data') + self.codeProfileAct = E5Action( + self.trUtf8('Profile Data'), + self.trUtf8('&Profile Data...'), 0, 0, + self.chkGrp, 'project_profile_data') self.codeProfileAct.setStatusTip( self.trUtf8('Show profiling data for the project.')) self.codeProfileAct.setWhatsThis(self.trUtf8( @@ -3588,9 +3612,10 @@ self.handleApplicationDiagram) self.actions.append(self.applicationDiagramAct) - self.loadDiagramAct = E5Action(self.trUtf8('Load Diagram'), - self.trUtf8('&Load Diagram...'), 0, 0, - self.graphicsGrp, 'project_load_diagram') + self.loadDiagramAct = E5Action( + self.trUtf8('Load Diagram'), + self.trUtf8('&Load Diagram...'), 0, 0, + self.graphicsGrp, 'project_load_diagram') self.loadDiagramAct.setStatusTip( self.trUtf8('Load a diagram from file.')) self.loadDiagramAct.setWhatsThis(self.trUtf8( @@ -3602,10 +3627,11 @@ self.pluginGrp = createActionGroup(self) - self.pluginPkgListAct = E5Action(self.trUtf8('Create Package List'), - UI.PixmapCache.getIcon("pluginArchiveList.png"), - self.trUtf8('Create &Package List'), 0, 0, - self.pluginGrp, 'project_plugin_pkglist') + self.pluginPkgListAct = E5Action( + self.trUtf8('Create Package List'), + UI.PixmapCache.getIcon("pluginArchiveList.png"), + self.trUtf8('Create &Package List'), 0, 0, + self.pluginGrp, 'project_plugin_pkglist') self.pluginPkgListAct.setStatusTip( self.trUtf8('Create an initial PKGLIST file for an eric5 plugin.')) self.pluginPkgListAct.setWhatsThis(self.trUtf8( @@ -3617,10 +3643,11 @@ self.pluginPkgListAct.triggered[()].connect(self.__pluginCreatePkgList) self.actions.append(self.pluginPkgListAct) - self.pluginArchiveAct = E5Action(self.trUtf8('Create Plugin Archive'), - UI.PixmapCache.getIcon("pluginArchive.png"), - self.trUtf8('Create Plugin &Archive'), 0, 0, - self.pluginGrp, 'project_plugin_archive') + self.pluginArchiveAct = E5Action( + self.trUtf8('Create Plugin Archive'), + UI.PixmapCache.getIcon("pluginArchive.png"), + self.trUtf8('Create Plugin &Archive'), 0, 0, + self.pluginGrp, 'project_plugin_archive') self.pluginArchiveAct.setStatusTip( self.trUtf8('Create an eric5 plugin archive file.')) self.pluginArchiveAct.setWhatsThis(self.trUtf8( @@ -3843,7 +3870,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()) @@ -4219,8 +4247,8 @@ """ Private slot used to calculate some code metrics for the project files. """ - files = [os.path.join(self.ppath, file) \ - for file in self.pdata["SOURCES"] if file.endswith(".py")] + files = [os.path.join(self.ppath, file) + for file in self.pdata["SOURCES"] if file.endswith(".py")] from DataViews.CodeMetricsDialog import CodeMetricsDialog self.codemetrics = CodeMetricsDialog() self.codemetrics.show() @@ -4236,7 +4264,8 @@ E5MessageBox.critical( self.ui, self.trUtf8("Coverage Data"), - self.trUtf8("There is no main script defined for the" + self.trUtf8( + "There is no main script defined for the" " current project. Aborting")) return @@ -4268,8 +4297,8 @@ else: return - files = [os.path.join(self.ppath, file) \ - for file in self.pdata["SOURCES"] if file.endswith(".py")] + files = [os.path.join(self.ppath, file) + for file in self.pdata["SOURCES"] if file.endswith(".py")] from DataViews.PyCoverageDialog import PyCoverageDialog self.codecoverage = PyCoverageDialog() self.codecoverage.show() @@ -4284,7 +4313,8 @@ E5MessageBox.critical( self.ui, self.trUtf8("Profile Data"), - self.trUtf8("There is no main script defined for the" + self.trUtf8( + "There is no main script defined for the" " current project. Aborting")) return @@ -4478,7 +4508,8 @@ res = E5MessageBox.yesNo( self.ui, self.trUtf8("Create Package List"), - self.trUtf8("<p>The file <b>PKGLIST</b> already" + self.trUtf8( + "<p>The file <b>PKGLIST</b> already" " exists.</p><p>Overwrite it?</p>"), icon=E5MessageBox.Warning) if not res: @@ -4492,8 +4523,9 @@ lst = [] for entry in lst_: if os.path.isdir(self.getAbsolutePath(entry)): - lst.extend([self.getRelativePath(p) for p in - Utilities.direntries(self.getAbsolutePath(entry), True)]) + lst.extend( + [self.getRelativePath(p) for p in + Utilities.direntries(self.getAbsolutePath(entry), True)]) continue else: lst.append(entry) @@ -4678,8 +4710,9 @@ datestr = time.strftime("%Y%m%d") lineend = sourcelines[lineno]\ .replace(sourcelines[lineno].rstrip(), "") - sversion = "{0}-snapshot-{1}".format(sourcelines[lineno]\ - .replace("version = ", "").strip()[1:-1], + sversion = "{0}-snapshot-{1}".format( + sourcelines[lineno].replace("version = ", "") + .strip()[1:-1], datestr) sourcelines[lineno] = '{0} + "-snapshot-{1}"{2}'.format( sourcelines[lineno].rstrip(), datestr, lineend)
--- a/Project/ProjectBaseBrowser.py Fri Oct 18 18:00:02 2013 +0200 +++ b/Project/ProjectBaseBrowser.py Fri Oct 18 18:42:10 2013 +0200 @@ -172,8 +172,8 @@ @param selected flag giving the new selection status (boolean) """ if index.isValid(): - self.selectionModel().select(index, - selected and self.SelectFlags or self.DeselectFlags) + self.selectionModel().select( + index, selected and self.SelectFlags or self.DeselectFlags) def _setItemRangeSelected(self, startIndex, endIndex, selected): """ @@ -184,8 +184,8 @@ @param selected flag giving the new selection status (boolean) """ selection = QItemSelection(startIndex, endIndex) - self.selectionModel().select(selection, - selected and self.SelectFlags or self.DeselectFlags) + self.selectionModel().select( + selection, selected and self.SelectFlags or self.DeselectFlags) def __modelRowsInserted(self, parent, start, end): """ @@ -226,10 +226,11 @@ self.backMenu.setEnabled(True) if self.project.vcs is not None: - self.vcsHelper = self.project.vcs.vcsGetProjectBrowserHelper(self, - self.project, self.isTranslationsBrowser) - self.vcsHelper.addVCSMenus(self.mainMenu, self.multiMenu, - self.backMenu, self.dirMenu, self.dirMultiMenu) + self.vcsHelper = self.project.vcs.vcsGetProjectBrowserHelper( + self, self.project, self.isTranslationsBrowser) + self.vcsHelper.addVCSMenus( + self.mainMenu, self.multiMenu, self.backMenu, + self.dirMenu, self.dirMultiMenu) def _newProject(self): """ @@ -245,10 +246,11 @@ self.backMenu.setEnabled(True) if self.project.vcs is not None: - self.vcsHelper = self.project.vcs.vcsGetProjectBrowserHelper(self, - self.project, self.isTranslationsBrowser) - self.vcsHelper.addVCSMenus(self.mainMenu, self.multiMenu, - self.backMenu, self.dirMenu, self.dirMultiMenu) + self.vcsHelper = self.project.vcs.vcsGetProjectBrowserHelper( + self, self.project, self.isTranslationsBrowser) + self.vcsHelper.addVCSMenus( + self.mainMenu, self.multiMenu, self.backMenu, + self.dirMenu, self.dirMultiMenu) def _removeFile(self): """ @@ -288,7 +290,8 @@ from UI.DeleteFilesConfirmationDialog import \ DeleteFilesConfirmationDialog - dlg = DeleteFilesConfirmationDialog(self.parent(), + dlg = DeleteFilesConfirmationDialog( + self.parent(), self.trUtf8("Delete directories"), self.trUtf8("Do you really want to delete these directories from" " the project?"), @@ -526,7 +529,8 @@ E5MessageBox.information( self, QApplication.translate('ProjectBaseBrowser', "Select entries"), - QApplication.translate('ProjectBaseBrowser', + QApplication.translate( + 'ProjectBaseBrowser', """There were no matching entries found.""")) def selectLocalEntries(self): @@ -546,7 +550,8 @@ Public slot to handle the select local directories context menu entries. """ - self._selectEntries(local=True, + self._selectEntries( + local=True, filter=[ProjectBrowserSimpleDirectoryItem, ProjectBrowserDirectoryItem]) @@ -554,7 +559,8 @@ """ Public slot to handle the select VCS directories context menu entries. """ - self._selectEntries(local=False, + self._selectEntries( + local=False, filter=[ProjectBrowserSimpleDirectoryItem, ProjectBrowserDirectoryItem])
--- a/Project/ProjectBrowser.py Fri Oct 18 18:00:02 2013 +0200 +++ b/Project/ProjectBrowser.py Fri Oct 18 18:42:10 2013 +0200 @@ -163,37 +163,44 @@ # step 2: add browsers if browserFlags & SourcesBrowserFlag: - index = self.addTab(self.psBrowser, + index = self.addTab( + self.psBrowser, UI.PixmapCache.getIcon("projectSources.png"), '') self.setTabToolTip(index, self.psBrowser.windowTitle()) if browserFlags & FormsBrowserFlag: - index = self.addTab(self.pfBrowser, + index = self.addTab( + self.pfBrowser, UI.PixmapCache.getIcon("projectForms.png"), '') self.setTabToolTip(index, self.pfBrowser.windowTitle()) if browserFlags & ResourcesBrowserFlag: - index = self.addTab(self.prBrowser, + index = self.addTab( + self.prBrowser, UI.PixmapCache.getIcon("projectResources.png"), '') self.setTabToolTip(index, self.prBrowser.windowTitle()) if browserFlags & TranslationsBrowserFlag: - index = self.addTab(self.ptBrowser, + index = self.addTab( + self.ptBrowser, UI.PixmapCache.getIcon("projectTranslations.png"), '') self.setTabToolTip(index, self.ptBrowser.windowTitle()) if browserFlags & InterfacesBrowserFlag: - index = self.addTab(self.piBrowser, + index = self.addTab( + self.piBrowser, UI.PixmapCache.getIcon("projectInterfaces.png"), '') self.setTabToolTip(index, self.piBrowser.windowTitle()) if browserFlags & OthersBrowserFlag: - index = self.addTab(self.poBrowser, + index = self.addTab( + self.poBrowser, UI.PixmapCache.getIcon("projectOthers.png"), '') self.setTabToolTip(index, self.poBrowser.windowTitle()) if self.embeddedBrowser: - index = self.addTab(self.fileBrowser, + index = self.addTab( + self.fileBrowser, UI.PixmapCache.getIcon("browser.png"), '') self.setTabToolTip(index, self.fileBrowser.windowTitle())
--- a/Project/ProjectBrowserModel.py Fri Oct 18 18:00:02 2013 +0200 +++ b/Project/ProjectBrowserModel.py Fri Oct 18 18:42:10 2013 +0200 @@ -354,11 +354,13 @@ for f in entryInfoList: if f.isDir(): - node = ProjectBrowserDirectoryItem(parentItem, + node = ProjectBrowserDirectoryItem( + parentItem, Utilities.toNativeSeparators(f.absoluteFilePath()), parentItem.getProjectTypes()[0], False) else: - node = ProjectBrowserFileItem(parentItem, + node = ProjectBrowserFileItem( + parentItem, Utilities.toNativeSeparators(f.absoluteFilePath()), parentItem.getProjectTypes()[0]) if self.project.vcs is not None: @@ -429,12 +431,13 @@ parentItem, dt = self.findParentItemByName( self.projectBrowserTypes[key], fn) if os.path.isdir(fname): - itm = ProjectBrowserDirectoryItem(parentItem, fname, - self.projectBrowserTypes[key], False, bold) + itm = ProjectBrowserDirectoryItem( + parentItem, fname, self.projectBrowserTypes[key], + False, bold) else: - itm = ProjectBrowserFileItem(parentItem, fname, - self.projectBrowserTypes[key], False, bold, - sourceLanguage=sourceLanguage) + itm = ProjectBrowserFileItem( + parentItem, fname, self.projectBrowserTypes[key], + False, bold, sourceLanguage=sourceLanguage) self._addItem(itm, parentItem) if self.project.vcs is not None: if states[os.path.normcase(fname)] == \ @@ -536,16 +539,17 @@ else: parentIndex = self.createIndex(parentItem.row(), 0, parentItem) if os.path.isdir(fname): - itm = ProjectBrowserDirectoryItem(parentItem, fname, - self.projectBrowserTypes[typeString], False, bold) + itm = ProjectBrowserDirectoryItem( + parentItem, fname, self.projectBrowserTypes[typeString], + False, bold) else: if typeString == "SOURCES": sourceLanguage = self.project.pdata["PROGLANGUAGE"][0] else: sourceLanguage = "" - itm = ProjectBrowserFileItem(parentItem, fname, - self.projectBrowserTypes[typeString], False, bold, - sourceLanguage=sourceLanguage) + itm = ProjectBrowserFileItem( + parentItem, fname, self.projectBrowserTypes[typeString], + False, bold, sourceLanguage=sourceLanguage) self.__addVCSStatus(itm, fname) if additionalTypeStrings: for additionalTypeString in additionalTypeStrings: @@ -680,15 +684,17 @@ continue cnt = itm.childCount() - self.beginInsertRows(self.createIndex(itm.row(), 0, itm), - cnt, cnt) + self.beginInsertRows( + self.createIndex(itm.row(), 0, itm), cnt, cnt) if f.isDir(): - node = ProjectBrowserDirectoryItem(itm, + node = ProjectBrowserDirectoryItem( + itm, Utilities.toNativeSeparators(f.absoluteFilePath()), itm.getProjectTypes()[0], False) else: - node = ProjectBrowserFileItem(itm, + node = ProjectBrowserFileItem( + itm, Utilities.toNativeSeparators(f.absoluteFilePath()), itm.getProjectTypes()[0]) self._addItem(node, itm) @@ -716,8 +722,8 @@ continue self._removeWatchedItem(child) - self.beginRemoveRows(self.createIndex(itm.row(), 0, itm), - row, row) + self.beginRemoveRows( + self.createIndex(itm.row(), 0, itm), row, row) itm.removeChild(child) self.endRemoveRows() @@ -868,8 +874,8 @@ if itm: itm.setVcsState(state) index1 = self.createIndex(itm.row(), 0, itm) - index2 = self.createIndex(itm.row(), - self.rootItem.columnCount(), itm) + index2 = self.createIndex( + itm.row(), self.rootItem.columnCount(), itm) self.dataChanged.emit(index1, index2) head, tail = os.path.split(name) @@ -908,8 +914,8 @@ if state != itm.vcsState: itm.setVcsState(state) index1 = self.createIndex(itm.row(), 0, itm) - index2 = self.createIndex(itm.row(), - self.rootItem.columnCount(), itm) + index2 = self.createIndex( + itm.row(), self.rootItem.columnCount(), itm) self.dataChanged.emit(index1, index2) path, tail = os.path.split(path)
--- a/Project/ProjectFormsBrowser.py Fri Oct 18 18:00:02 2013 +0200 +++ b/Project/ProjectFormsBrowser.py Fri Oct 18 18:42:10 2013 +0200 @@ -77,13 +77,15 @@ # templates for Qt4 # these two lists have to stay in sync - self.templates4 = ['dialog4.tmpl', 'widget4.tmpl', 'mainwindow4.tmpl', + self.templates4 = [ + 'dialog4.tmpl', 'widget4.tmpl', 'mainwindow4.tmpl', 'dialogbuttonboxbottom4.tmpl', 'dialogbuttonboxright4.tmpl', 'dialogbuttonsbottom4.tmpl', 'dialogbuttonsbottomcenter4.tmpl', 'dialogbuttonsright4.tmpl', '', 'wizard4.tmpl', 'wizardpage4.tmpl', 'qdockwidget4.tmpl', 'qframe4.tmpl', 'qgroupbox4.tmpl', 'qscrollarea4.tmpl', 'qmdiarea4.tmpl', 'qtabwidget4.tmpl', - 'qtoolbox4.tmpl', 'qstackedwidget4.tmpl'] + 'qtoolbox4.tmpl', 'qstackedwidget4.tmpl' + ] self.templateTypes4 = [ self.trUtf8("Dialog"), self.trUtf8("Widget"), @@ -124,9 +126,11 @@ ["Qt4", "PyQt5", "E4Plugin", "PySide"]: self.menu.addAction( self.trUtf8('Compile form'), self.__compileForm) - self.menu.addAction(self.trUtf8('Compile all forms'), + self.menu.addAction( + self.trUtf8('Compile all forms'), self.__compileAllForms) - self.menu.addAction(self.trUtf8('Generate Dialog Code...'), + self.menu.addAction( + self.trUtf8('Generate Dialog Code...'), self.__generateDialogCode) self.menu.addSeparator() self.menu.addAction( @@ -140,16 +144,19 @@ else: if self.hooks["compileForm"] is not None: self.menu.addAction( - self.hooksMenuEntries.get("compileForm", + self.hooksMenuEntries.get( + "compileForm", self.trUtf8('Compile form')), self.__compileForm) if self.hooks["compileAllForms"] is not None: self.menu.addAction( - self.hooksMenuEntries.get("compileAllForms", + self.hooksMenuEntries.get( + "compileAllForms", self.trUtf8('Compile all forms')), self.__compileAllForms) if self.hooks["generateDialogCode"] is not None: self.menu.addAction( - self.hooksMenuEntries.get("generateDialogCode", + self.hooksMenuEntries.get( + "generateDialogCode", self.trUtf8('Generate Dialog Code...')), self.__generateDialogCode) if self.hooks["compileForm"] is not None or \ @@ -176,19 +183,19 @@ else: if self.hooks["newForm"] is not None: self.menu.addAction( - self.hooksMenuEntries.get("newForm", - self.trUtf8('New form...')), self.__newForm) + self.hooksMenuEntries.get( + "newForm", self.trUtf8('New form...')), self.__newForm) self.menu.addAction(self.trUtf8('Add forms...'), self.__addFormFiles) - self.menu.addAction(self.trUtf8('Add forms directory...'), - self.__addFormsDirectory) + self.menu.addAction( + self.trUtf8('Add forms directory...'), self.__addFormsDirectory) self.menu.addSeparator() - self.menu.addAction(self.trUtf8('Copy Path to Clipboard'), - self._copyToClipboard) + self.menu.addAction( + self.trUtf8('Copy Path to Clipboard'), self._copyToClipboard) self.menu.addSeparator() - self.menu.addAction(self.trUtf8('Expand all directories'), - self._expandAllDirs) - self.menu.addAction(self.trUtf8('Collapse all directories'), - self._collapseAllDirs) + self.menu.addAction( + self.trUtf8('Expand all directories'), self._expandAllDirs) + self.menu.addAction( + self.trUtf8('Collapse all directories'), self._collapseAllDirs) self.menu.addSeparator() self.menu.addAction(self.trUtf8('Configure...'), self._configure) @@ -196,24 +203,24 @@ if self.project.getProjectType() in \ ["Qt4", "PyQt5", "E4Plugin", "PySide"] or \ self.hooks["compileAllForms"] is not None: - self.backMenu.addAction(self.trUtf8('Compile all forms'), - self.__compileAllForms) + self.backMenu.addAction( + self.trUtf8('Compile all forms'), self.__compileAllForms) self.backMenu.addSeparator() self.backMenu.addAction(self.trUtf8('New form...'), self.__newForm) else: if self.hooks["newForm"] is not None: self.backMenu.addAction( - self.hooksMenuEntries.get("newForm", - self.trUtf8('New form...')), self.__newForm) + self.hooksMenuEntries.get( + "newForm", self.trUtf8('New form...')), self.__newForm) self.backMenu.addAction( self.trUtf8('Add forms...'), self.project.addUiFiles) - self.backMenu.addAction(self.trUtf8('Add forms directory...'), - self.project.addUiDir) + self.backMenu.addAction( + self.trUtf8('Add forms directory...'), self.project.addUiDir) self.backMenu.addSeparator() - self.backMenu.addAction(self.trUtf8('Expand all directories'), - self._expandAllDirs) - self.backMenu.addAction(self.trUtf8('Collapse all directories'), - self._collapseAllDirs) + self.backMenu.addAction( + self.trUtf8('Expand all directories'), self._expandAllDirs) + self.backMenu.addAction( + self.trUtf8('Collapse all directories'), self._collapseAllDirs) self.backMenu.addSeparator() self.backMenu.addAction(self.trUtf8('Configure...'), self._configure) self.backMenu.setEnabled(False) @@ -222,20 +229,21 @@ self.multiMenu = QMenu(self) if self.project.getProjectType() in \ ["Qt4", "PyQt5", "E4Plugin", "PySide"]: - act = self.multiMenu.addAction(self.trUtf8('Compile forms'), - self.__compileSelectedForms) + act = self.multiMenu.addAction( + self.trUtf8('Compile forms'), self.__compileSelectedForms) self.multiMenu.addSeparator() - self.multiMenu.addAction(self.trUtf8('Open in Qt-Designer'), - self.__openFile) - self.multiMenu.addAction(self.trUtf8('Open in Editor'), - self.__openFileInEditor) + self.multiMenu.addAction( + self.trUtf8('Open in Qt-Designer'), self.__openFile) + self.multiMenu.addAction( + self.trUtf8('Open in Editor'), self.__openFileInEditor) self.multiMenu.addSeparator() - self.multiMenu.addAction(self.trUtf8('Preview translations'), - self.__TRPreview) + self.multiMenu.addAction( + self.trUtf8('Preview translations'), self.__TRPreview) else: if self.hooks["compileSelectedForms"] is not None: act = self.multiMenu.addAction( - self.hooksMenuEntries.get("compileSelectedForms", + self.hooksMenuEntries.get( + "compileSelectedForms", self.trUtf8('Compile forms')), self.__compileSelectedForms) self.multiMenu.addSeparator() @@ -246,30 +254,31 @@ self.multiMenu.addAction( self.trUtf8('Open'), self.__openFileInEditor) self.multiMenu.addSeparator() - act = self.multiMenu.addAction(self.trUtf8('Remove from project'), - self._removeFile) + act = self.multiMenu.addAction( + self.trUtf8('Remove from project'), self._removeFile) self.multiMenuActions.append(act) act = self.multiMenu.addAction( self.trUtf8('Delete'), self.__deleteFile) self.multiMenuActions.append(act) self.multiMenu.addSeparator() - self.multiMenu.addAction(self.trUtf8('Expand all directories'), - self._expandAllDirs) - self.multiMenu.addAction(self.trUtf8('Collapse all directories'), - self._collapseAllDirs) + self.multiMenu.addAction( + self.trUtf8('Expand all directories'), self._expandAllDirs) + self.multiMenu.addAction( + self.trUtf8('Collapse all directories'), self._collapseAllDirs) self.multiMenu.addSeparator() self.multiMenu.addAction(self.trUtf8('Configure...'), self._configure) self.dirMenu = QMenu(self) if self.project.getProjectType() in \ ["Qt4", "PyQt5", "E4Plugin", "PySide"]: - self.dirMenu.addAction(self.trUtf8('Compile all forms'), - self.__compileAllForms) + self.dirMenu.addAction( + self.trUtf8('Compile all forms'), self.__compileAllForms) self.dirMenu.addSeparator() else: if self.hooks["compileAllForms"] is not None: self.dirMenu.addAction( - self.hooksMenuEntries.get("compileAllForms", + self.hooksMenuEntries.get( + "compileAllForms", self.trUtf8('Compile all forms')), self.__compileAllForms) self.dirMenu.addSeparator() @@ -286,45 +295,47 @@ else: if self.hooks["newForm"] is not None: self.dirMenu.addAction( - self.hooksMenuEntries.get("newForm", + self.hooksMenuEntries.get( + "newForm", self.trUtf8('New form...')), self.__newForm) self.dirMenu.addAction( self.trUtf8('Add forms...'), self.__addFormFiles) - self.dirMenu.addAction(self.trUtf8('Add forms directory...'), - self.__addFormsDirectory) + self.dirMenu.addAction( + self.trUtf8('Add forms directory...'), self.__addFormsDirectory) self.dirMenu.addSeparator() - self.dirMenu.addAction(self.trUtf8('Copy Path to Clipboard'), - self._copyToClipboard) + self.dirMenu.addAction( + self.trUtf8('Copy Path to Clipboard'), self._copyToClipboard) self.dirMenu.addSeparator() - self.dirMenu.addAction(self.trUtf8('Expand all directories'), - self._expandAllDirs) - self.dirMenu.addAction(self.trUtf8('Collapse all directories'), - self._collapseAllDirs) + self.dirMenu.addAction( + self.trUtf8('Expand all directories'), self._expandAllDirs) + self.dirMenu.addAction( + self.trUtf8('Collapse all directories'), self._collapseAllDirs) self.dirMenu.addSeparator() self.dirMenu.addAction(self.trUtf8('Configure...'), self._configure) self.dirMultiMenu = QMenu(self) if self.project.getProjectType() in \ ["Qt4", "PyQt5", "E4Plugin", "PySide"]: - self.dirMultiMenu.addAction(self.trUtf8('Compile all forms'), - self.__compileAllForms) + self.dirMultiMenu.addAction( + self.trUtf8('Compile all forms'), self.__compileAllForms) self.dirMultiMenu.addSeparator() else: if self.hooks["compileAllForms"] is not None: self.dirMultiMenu.addAction( - self.hooksMenuEntries.get("compileAllForms", + self.hooksMenuEntries.get( + "compileAllForms", self.trUtf8('Compile all forms')), self.__compileAllForms) self.dirMultiMenu.addSeparator() - self.dirMultiMenu.addAction(self.trUtf8('Add forms...'), - self.project.addUiFiles) - self.dirMultiMenu.addAction(self.trUtf8('Add forms directory...'), - self.project.addUiDir) + self.dirMultiMenu.addAction( + self.trUtf8('Add forms...'), self.project.addUiFiles) + self.dirMultiMenu.addAction( + self.trUtf8('Add forms directory...'), self.project.addUiDir) self.dirMultiMenu.addSeparator() - self.dirMultiMenu.addAction(self.trUtf8('Expand all directories'), - self._expandAllDirs) - self.dirMultiMenu.addAction(self.trUtf8('Collapse all directories'), - self._collapseAllDirs) + self.dirMultiMenu.addAction( + self.trUtf8('Expand all directories'), self._expandAllDirs) + self.dirMultiMenu.addAction( + self.trUtf8('Collapse all directories'), self._collapseAllDirs) self.dirMultiMenu.addSeparator() self.dirMultiMenu.addAction( self.trUtf8('Configure...'), self._configure) @@ -543,8 +554,8 @@ return templateIndex = self.templateTypes4.index(selectedForm) - templateFile = os.path.join(getConfig('ericTemplatesDir'), - self.templates4[templateIndex]) + templateFile = os.path.join( + getConfig('ericTemplatesDir'), self.templates4[templateIndex]) fname, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( self, @@ -604,7 +615,8 @@ from UI.DeleteFilesConfirmationDialog import \ DeleteFilesConfirmationDialog - dlg = DeleteFilesConfirmationDialog(self.parent(), + dlg = DeleteFilesConfirmationDialog( + self.parent(), self.trUtf8("Delete forms"), self.trUtf8( "Do you really want to delete these forms from the project?"), @@ -678,13 +690,13 @@ self, self.trUtf8("Form Compilation"), self.trUtf8("The compilation of the form file" - " was successful.")) + " was successful.")) else: ui.showNotification( UI.PixmapCache.getPixmap("designer48.png"), self.trUtf8("Form Compilation"), self.trUtf8("The compilation of the form file" - " was successful.")) + " was successful.")) self.project.projectFormCompiled.emit(self.compiledFile) except IOError as msg: if not self.noDialog: @@ -708,7 +720,8 @@ self.trUtf8("Form Compilation"), self.trUtf8("The compilation of the form file failed.")) else: - ui.showNotification(UI.PixmapCache.getPixmap("designer48.png"), + ui.showNotification( + UI.PixmapCache.getPixmap("designer48.png"), self.trUtf8("Form Compilation"), self.trUtf8("The compilation of the form file failed.")) self.compileProc = None @@ -839,7 +852,8 @@ self.hooks["compileAllForms"](self.project.pdata["FORMS"]) else: numForms = len(self.project.pdata["FORMS"]) - progress = QProgressDialog(self.trUtf8("Compiling forms..."), + progress = QProgressDialog( + self.trUtf8("Compiling forms..."), self.trUtf8("Abort"), 0, numForms, self) progress.setModal(True) progress.setMinimumDuration(0) @@ -874,7 +888,8 @@ self.hooks["compileSelectedForms"](files) else: numForms = len(files) - progress = QProgressDialog(self.trUtf8("Compiling forms..."), + progress = QProgressDialog( + self.trUtf8("Compiling forms..."), self.trUtf8("Abort"), 0, numForms, self) progress.setModal(True) progress.setMinimumDuration(0)
--- a/Project/ProjectInterfacesBrowser.py Fri Oct 18 18:00:02 2013 +0200 +++ b/Project/ProjectInterfacesBrowser.py Fri Oct 18 18:42:10 2013 +0200 @@ -91,34 +91,36 @@ self.sourceMenu = QMenu(self) if self.omniidl is not None: - self.sourceMenu.addAction(self.trUtf8('Compile interface'), - self.__compileInterface) - self.sourceMenu.addAction(self.trUtf8('Compile all interfaces'), + self.sourceMenu.addAction( + self.trUtf8('Compile interface'), self.__compileInterface) + self.sourceMenu.addAction( + self.trUtf8('Compile all interfaces'), self.__compileAllInterfaces) self.sourceMenu.addAction(self.trUtf8('Open'), self._openItem) self.sourceMenu.addSeparator() act = self.sourceMenu.addAction( self.trUtf8('Rename file'), self._renameFile) self.menuActions.append(act) - act = self.sourceMenu.addAction(self.trUtf8('Remove from project'), - self._removeFile) + act = self.sourceMenu.addAction( + self.trUtf8('Remove from project'), self._removeFile) self.menuActions.append(act) act = self.sourceMenu.addAction( self.trUtf8('Delete'), self.__deleteFile) self.menuActions.append(act) self.sourceMenu.addSeparator() - self.sourceMenu.addAction(self.trUtf8('Add interfaces...'), - self.__addInterfaceFiles) - self.sourceMenu.addAction(self.trUtf8('Add interfaces directory...'), + self.sourceMenu.addAction( + self.trUtf8('Add interfaces...'), self.__addInterfaceFiles) + self.sourceMenu.addAction( + self.trUtf8('Add interfaces directory...'), self.__addInterfacesDirectory) self.sourceMenu.addSeparator() - self.sourceMenu.addAction(self.trUtf8('Copy Path to Clipboard'), - self._copyToClipboard) + self.sourceMenu.addAction( + self.trUtf8('Copy Path to Clipboard'), self._copyToClipboard) self.sourceMenu.addSeparator() - self.sourceMenu.addAction(self.trUtf8('Expand all directories'), - self._expandAllDirs) - self.sourceMenu.addAction(self.trUtf8('Collapse all directories'), - self._collapseAllDirs) + self.sourceMenu.addAction( + self.trUtf8('Expand all directories'), self._expandAllDirs) + self.sourceMenu.addAction( + self.trUtf8('Collapse all directories'), self._collapseAllDirs) self.sourceMenu.addSeparator() self.sourceMenu.addAction(self.trUtf8('Configure...'), self._configure) self.sourceMenu.addAction( @@ -128,19 +130,21 @@ if self.omniidl is not None: self.menu.addAction( self.trUtf8('Compile interface'), self.__compileInterface) - self.menu.addAction(self.trUtf8('Compile all interfaces'), + self.menu.addAction( + self.trUtf8('Compile all interfaces'), self.__compileAllInterfaces) self.menu.addAction(self.trUtf8('Open'), self._openItem) self.menu.addSeparator() self.menu.addAction( self.trUtf8('Add interfaces...'), self.__addInterfaceFiles) - self.menu.addAction(self.trUtf8('Add interfaces directory...'), + self.menu.addAction( + self.trUtf8('Add interfaces directory...'), self.__addInterfacesDirectory) self.menu.addSeparator() - self.menu.addAction(self.trUtf8('Expand all directories'), - self._expandAllDirs) - self.menu.addAction(self.trUtf8('Collapse all directories'), - self._collapseAllDirs) + self.menu.addAction( + self.trUtf8('Expand all directories'), self._expandAllDirs) + self.menu.addAction( + self.trUtf8('Collapse all directories'), self._collapseAllDirs) self.menu.addSeparator() self.menu.addAction(self.trUtf8('Configure...'), self._configure) self.menu.addAction( @@ -148,18 +152,19 @@ self.backMenu = QMenu(self) if self.omniidl is not None: - self.backMenu.addAction(self.trUtf8('Compile all interfaces'), + self.backMenu.addAction( + self.trUtf8('Compile all interfaces'), self.__compileAllInterfaces) self.backMenu.addSeparator() - self.backMenu.addAction(self.trUtf8('Add interfaces...'), - self.project.addIdlFiles) - self.backMenu.addAction(self.trUtf8('Add interfaces directory...'), - self.project.addIdlDir) + self.backMenu.addAction( + self.trUtf8('Add interfaces...'), self.project.addIdlFiles) + self.backMenu.addAction( + self.trUtf8('Add interfaces directory...'), self.project.addIdlDir) self.backMenu.addSeparator() - self.backMenu.addAction(self.trUtf8('Expand all directories'), - self._expandAllDirs) - self.backMenu.addAction(self.trUtf8('Collapse all directories'), - self._collapseAllDirs) + self.backMenu.addAction( + self.trUtf8('Expand all directories'), self._expandAllDirs) + self.backMenu.addAction( + self.trUtf8('Collapse all directories'), self._collapseAllDirs) self.backMenu.addSeparator() self.backMenu.addAction(self.trUtf8('Configure...'), self._configure) self.backMenu.addAction( @@ -169,21 +174,22 @@ # create the menu for multiple selected files self.multiMenu = QMenu(self) if self.omniidl is not None: - self.multiMenu.addAction(self.trUtf8('Compile interfaces'), + self.multiMenu.addAction( + self.trUtf8('Compile interfaces'), self.__compileSelectedInterfaces) self.multiMenu.addAction(self.trUtf8('Open'), self._openItem) self.multiMenu.addSeparator() - act = self.multiMenu.addAction(self.trUtf8('Remove from project'), - self._removeFile) + act = self.multiMenu.addAction( + self.trUtf8('Remove from project'), self._removeFile) self.multiMenuActions.append(act) act = self.multiMenu.addAction( self.trUtf8('Delete'), self.__deleteFile) self.multiMenuActions.append(act) self.multiMenu.addSeparator() - self.multiMenu.addAction(self.trUtf8('Expand all directories'), - self._expandAllDirs) - self.multiMenu.addAction(self.trUtf8('Collapse all directories'), - self._collapseAllDirs) + self.multiMenu.addAction( + self.trUtf8('Expand all directories'), self._expandAllDirs) + self.multiMenu.addAction( + self.trUtf8('Collapse all directories'), self._collapseAllDirs) self.multiMenu.addSeparator() self.multiMenu.addAction(self.trUtf8('Configure...'), self._configure) self.multiMenu.addAction( @@ -191,7 +197,8 @@ self.dirMenu = QMenu(self) if self.omniidl is not None: - self.dirMenu.addAction(self.trUtf8('Compile all interfaces'), + self.dirMenu.addAction( + self.trUtf8('Compile all interfaces'), self.__compileAllInterfaces) self.dirMenu.addSeparator() act = self.dirMenu.addAction( @@ -203,16 +210,17 @@ self.dirMenu.addSeparator() self.dirMenu.addAction( self.trUtf8('Add interfaces...'), self.__addInterfaceFiles) - self.dirMenu.addAction(self.trUtf8('Add interfaces directory...'), + self.dirMenu.addAction( + self.trUtf8('Add interfaces directory...'), self.__addInterfacesDirectory) self.dirMenu.addSeparator() - self.dirMenu.addAction(self.trUtf8('Copy Path to Clipboard'), - self._copyToClipboard) + self.dirMenu.addAction( + self.trUtf8('Copy Path to Clipboard'), self._copyToClipboard) self.dirMenu.addSeparator() - self.dirMenu.addAction(self.trUtf8('Expand all directories'), - self._expandAllDirs) - self.dirMenu.addAction(self.trUtf8('Collapse all directories'), - self._collapseAllDirs) + self.dirMenu.addAction( + self.trUtf8('Expand all directories'), self._expandAllDirs) + self.dirMenu.addAction( + self.trUtf8('Collapse all directories'), self._collapseAllDirs) self.dirMenu.addSeparator() self.dirMenu.addAction(self.trUtf8('Configure...'), self._configure) self.dirMenu.addAction( @@ -220,18 +228,19 @@ self.dirMultiMenu = QMenu(self) if self.omniidl is not None: - self.dirMultiMenu.addAction(self.trUtf8('Compile all interfaces'), + self.dirMultiMenu.addAction( + self.trUtf8('Compile all interfaces'), self.__compileAllInterfaces) self.dirMultiMenu.addSeparator() - self.dirMultiMenu.addAction(self.trUtf8('Add interfaces...'), - self.project.addIdlFiles) - self.dirMultiMenu.addAction(self.trUtf8('Add interfaces directory...'), - self.project.addIdlDir) + self.dirMultiMenu.addAction( + self.trUtf8('Add interfaces...'), self.project.addIdlFiles) + self.dirMultiMenu.addAction( + self.trUtf8('Add interfaces directory...'), self.project.addIdlDir) self.dirMultiMenu.addSeparator() - self.dirMultiMenu.addAction(self.trUtf8('Expand all directories'), - self._expandAllDirs) - self.dirMultiMenu.addAction(self.trUtf8('Collapse all directories'), - self._collapseAllDirs) + self.dirMultiMenu.addAction( + self.trUtf8('Expand all directories'), self._expandAllDirs) + self.dirMultiMenu.addAction( + self.trUtf8('Collapse all directories'), self._collapseAllDirs) self.dirMultiMenu.addSeparator() self.dirMultiMenu.addAction( self.trUtf8('Configure...'), self._configure) @@ -349,14 +358,14 @@ if isinstance(itm, BrowserFileItem): self.sourceFile[str].emit(itm.fileName()) elif isinstance(itm, BrowserClassItem): - self.sourceFile[str, int].emit(itm.fileName(), - itm.classObject().lineno) + self.sourceFile[str, int].emit( + itm.fileName(), itm.classObject().lineno) elif isinstance(itm, BrowserMethodItem): - self.sourceFile[str, int].emit(itm.fileName(), - itm.functionObject().lineno) + self.sourceFile[str, int].emit( + itm.fileName(), itm.functionObject().lineno) elif isinstance(itm, BrowserClassAttributeItem): - self.sourceFile[str, int].emit(itm.fileName(), - itm.attributeObject().lineno) + self.sourceFile[str, int].emit( + itm.fileName(), itm.attributeObject().lineno) def __addInterfaceFiles(self): """ @@ -406,10 +415,11 @@ from UI.DeleteFilesConfirmationDialog import \ DeleteFilesConfirmationDialog - dlg = DeleteFilesConfirmationDialog(self.parent(), + dlg = DeleteFilesConfirmationDialog( + self.parent(), self.trUtf8("Delete interfaces"), self.trUtf8("Do you really want to delete these interfaces from" - " the project?"), + " the project?"), files) if dlg.exec_() == QDialog.Accepted: @@ -481,7 +491,8 @@ "The compilation of the interface file was" " successful.")) else: - ui.showNotification(UI.PixmapCache.getPixmap("corba48.png"), + ui.showNotification( + UI.PixmapCache.getPixmap("corba48.png"), self.trUtf8("Interface Compilation"), self.trUtf8( "The compilation of the interface file was" @@ -494,7 +505,8 @@ self.trUtf8( "The compilation of the interface file failed.")) else: - ui.showNotification(UI.PixmapCache.getPixmap("corba48.png"), + ui.showNotification( + UI.PixmapCache.getPixmap("corba48.png"), self.trUtf8("Interface Compilation"), self.trUtf8( "The compilation of the interface file failed.")) @@ -559,7 +571,8 @@ """ if self.omniidl is not None: numIDLs = len(self.project.pdata["INTERFACES"]) - progress = QProgressDialog(self.trUtf8("Compiling interfaces..."), + progress = QProgressDialog( + self.trUtf8("Compiling interfaces..."), self.trUtf8("Abort"), 0, numIDLs, self) progress.setModal(True) progress.setMinimumDuration(0) @@ -591,7 +604,8 @@ files = [self.project.getRelativePath(itm.fileName()) \ for itm in items] numIDLs = len(files) - progress = QProgressDialog(self.trUtf8("Compiling interfaces..."), + progress = QProgressDialog( + self.trUtf8("Compiling interfaces..."), self.trUtf8("Abort"), 0, numIDLs, self) progress.setModal(True) progress.setMinimumDuration(0)
--- a/Project/ProjectOthersBrowser.py Fri Oct 18 18:00:02 2013 +0200 +++ b/Project/ProjectOthersBrowser.py Fri Oct 18 18:42:10 2013 +0200 @@ -68,12 +68,11 @@ """ ProjectBaseBrowser._createPopupMenus(self) - self.editPixmapAct = \ - self.menu.addAction(self.trUtf8('Open in Icon Editor'), - self._editPixmap) + self.editPixmapAct = self.menu.addAction( + self.trUtf8('Open in Icon Editor'), self._editPixmap) self.menu.addSeparator() - self.renameFileAct = self.menu.addAction(self.trUtf8('Rename file'), - self._renameFile) + self.renameFileAct = self.menu.addAction( + self.trUtf8('Rename file'), self._renameFile) self.menuActions.append(self.renameFileAct) act = self.menu.addAction( self.trUtf8('Remove from project'), self.__removeItem) @@ -88,42 +87,42 @@ self.menu.addSeparator() self.menu.addAction(self.trUtf8('Refresh'), self.__refreshItem) self.menu.addSeparator() - self.menu.addAction(self.trUtf8('Copy Path to Clipboard'), - self._copyToClipboard) + self.menu.addAction( + self.trUtf8('Copy Path to Clipboard'), self._copyToClipboard) self.menu.addSeparator() - self.menu.addAction(self.trUtf8('Expand all directories'), - self._expandAllDirs) - self.menu.addAction(self.trUtf8('Collapse all directories'), - self._collapseAllDirs) + self.menu.addAction( + self.trUtf8('Expand all directories'), self._expandAllDirs) + self.menu.addAction( + self.trUtf8('Collapse all directories'), self._collapseAllDirs) self.menu.addSeparator() self.menu.addAction(self.trUtf8('Configure...'), self._configure) self.backMenu = QMenu(self) - self.backMenu.addAction(self.trUtf8('Add files...'), - self.project.addOthersFiles) - self.backMenu.addAction(self.trUtf8('Add directory...'), - self.project.addOthersDir) + self.backMenu.addAction( + self.trUtf8('Add files...'), self.project.addOthersFiles) + self.backMenu.addAction( + self.trUtf8('Add directory...'), self.project.addOthersDir) self.backMenu.addSeparator() - self.backMenu.addAction(self.trUtf8('Expand all directories'), - self._expandAllDirs) - self.backMenu.addAction(self.trUtf8('Collapse all directories'), - self._collapseAllDirs) + self.backMenu.addAction( + self.trUtf8('Expand all directories'), self._expandAllDirs) + self.backMenu.addAction( + self.trUtf8('Collapse all directories'), self._collapseAllDirs) self.backMenu.addSeparator() self.backMenu.addAction(self.trUtf8('Configure...'), self._configure) self.backMenu.setEnabled(False) self.multiMenu.addSeparator() - act = self.multiMenu.addAction(self.trUtf8('Remove from project'), - self.__removeItem) + act = self.multiMenu.addAction( + self.trUtf8('Remove from project'), self.__removeItem) self.multiMenuActions.append(act) act = self.multiMenu.addAction( self.trUtf8('Delete'), self.__deleteItem) self.multiMenuActions.append(act) self.multiMenu.addSeparator() - self.multiMenu.addAction(self.trUtf8('Expand all directories'), - self._expandAllDirs) - self.multiMenu.addAction(self.trUtf8('Collapse all directories'), - self._collapseAllDirs) + self.multiMenu.addAction( + self.trUtf8('Expand all directories'), self._expandAllDirs) + self.multiMenu.addAction( + self.trUtf8('Collapse all directories'), self._collapseAllDirs) self.multiMenu.addSeparator() self.multiMenu.addAction(self.trUtf8('Configure...'), self._configure) @@ -292,7 +291,8 @@ from UI.DeleteFilesConfirmationDialog import \ DeleteFilesConfirmationDialog - dlg = DeleteFilesConfirmationDialog(self.parent(), + dlg = DeleteFilesConfirmationDialog( + self.parent(), self.trUtf8("Delete files/directories"), self.trUtf8( "Do you really want to delete these entries from the"
--- a/Project/ProjectResourcesBrowser.py Fri Oct 18 18:00:02 2013 +0200 +++ b/Project/ProjectResourcesBrowser.py Fri Oct 18 18:42:10 2013 +0200 @@ -80,20 +80,24 @@ self.menu = QMenu(self) if self.project.getProjectType() in \ ["Qt4", "PyQt5", "E4Plugin", "PySide"]: - self.menu.addAction(self.trUtf8('Compile resource'), + self.menu.addAction( + self.trUtf8('Compile resource'), self.__compileResource) - self.menu.addAction(self.trUtf8('Compile all resources'), + self.menu.addAction( + self.trUtf8('Compile all resources'), self.__compileAllResources) self.menu.addSeparator() else: if self.hooks["compileResource"] is not None: self.menu.addAction( - self.hooksMenuEntries.get("compileResource", + self.hooksMenuEntries.get( + "compileResource", self.trUtf8('Compile resource')), self.__compileResource) if self.hooks["compileAllResources"] is not None: self.menu.addAction( - self.hooksMenuEntries.get("compileAllResources", + self.hooksMenuEntries.get( + "compileAllResources", self.trUtf8('Compile all resources')), self.__compileAllResources) if self.hooks["compileResource"] is not None or \ @@ -116,27 +120,30 @@ else: if self.hooks["newResource"] is not None: self.menu.addAction( - self.hooksMenuEntries.get("newResource", + self.hooksMenuEntries.get( + "newResource", self.trUtf8('New resource...')), self.__newResource) self.menu.addAction( self.trUtf8('Add resources...'), self.__addResourceFiles) - self.menu.addAction(self.trUtf8('Add resources directory...'), + self.menu.addAction( + self.trUtf8('Add resources directory...'), self.__addResourcesDirectory) self.menu.addSeparator() - self.menu.addAction(self.trUtf8('Copy Path to Clipboard'), - self._copyToClipboard) + self.menu.addAction( + self.trUtf8('Copy Path to Clipboard'), self._copyToClipboard) self.menu.addSeparator() - self.menu.addAction(self.trUtf8('Expand all directories'), - self._expandAllDirs) - self.menu.addAction(self.trUtf8('Collapse all directories'), - self._collapseAllDirs) + self.menu.addAction( + self.trUtf8('Expand all directories'), self._expandAllDirs) + self.menu.addAction( + self.trUtf8('Collapse all directories'), self._collapseAllDirs) self.menu.addSeparator() self.menu.addAction(self.trUtf8('Configure...'), self._configure) self.backMenu = QMenu(self) if self.project.getProjectType() in \ ["Qt4", "PyQt5", "E4Plugin", "PySide"]: - self.backMenu.addAction(self.trUtf8('Compile all resources'), + self.backMenu.addAction( + self.trUtf8('Compile all resources'), self.__compileAllResources) self.backMenu.addSeparator() self.backMenu.addAction( @@ -144,23 +151,26 @@ else: if self.hooks["compileAllResources"] is not None: self.backMenu.addAction( - self.hooksMenuEntries.get("compileAllResources", + self.hooksMenuEntries.get( + "compileAllResources", self.trUtf8('Compile all resources')), self.__compileAllResources) self.backMenu.addSeparator() if self.hooks["newResource"] is not None: self.backMenu.addAction( - self.hooksMenuEntries.get("newResource", + self.hooksMenuEntries.get( + "newResource", self.trUtf8('New resource...')), self.__newResource) - self.backMenu.addAction(self.trUtf8('Add resources...'), - self.project.addResourceFiles) - self.backMenu.addAction(self.trUtf8('Add resources directory...'), + self.backMenu.addAction( + self.trUtf8('Add resources...'), self.project.addResourceFiles) + self.backMenu.addAction( + self.trUtf8('Add resources directory...'), self.project.addResourceDir) self.backMenu.addSeparator() - self.backMenu.addAction(self.trUtf8('Expand all directories'), - self._expandAllDirs) - self.backMenu.addAction(self.trUtf8('Collapse all directories'), - self._collapseAllDirs) + self.backMenu.addAction( + self.trUtf8('Expand all directories'), self._expandAllDirs) + self.backMenu.addAction( + self.trUtf8('Collapse all directories'), self._collapseAllDirs) self.backMenu.addSeparator() self.backMenu.addAction(self.trUtf8('Configure...'), self._configure) self.backMenu.setEnabled(False) @@ -169,42 +179,46 @@ self.multiMenu = QMenu(self) if self.project.getProjectType() in \ ["Qt4", "PyQt5", "E4Plugin", "PySide"]: - act = self.multiMenu.addAction(self.trUtf8('Compile resources'), + act = self.multiMenu.addAction( + self.trUtf8('Compile resources'), self.__compileSelectedResources) self.multiMenu.addSeparator() else: if self.hooks["compileSelectedResources"] is not None: act = self.multiMenu.addAction( - self.hooksMenuEntries.get("compileSelectedResources", + self.hooksMenuEntries.get( + "compileSelectedResources", self.trUtf8('Compile resources')), self.__compileSelectedResources) self.multiMenu.addSeparator() self.multiMenu.addAction(self.trUtf8('Open'), self.__openFile) self.multiMenu.addSeparator() - act = self.multiMenu.addAction(self.trUtf8('Remove from project'), - self._removeFile) + act = self.multiMenu.addAction( + self.trUtf8('Remove from project'), self._removeFile) self.multiMenuActions.append(act) act = self.multiMenu.addAction( self.trUtf8('Delete'), self.__deleteFile) self.multiMenuActions.append(act) self.multiMenu.addSeparator() - self.multiMenu.addAction(self.trUtf8('Expand all directories'), - self._expandAllDirs) - self.multiMenu.addAction(self.trUtf8('Collapse all directories'), - self._collapseAllDirs) + self.multiMenu.addAction( + self.trUtf8('Expand all directories'), self._expandAllDirs) + self.multiMenu.addAction( + self.trUtf8('Collapse all directories'), self._collapseAllDirs) self.multiMenu.addSeparator() self.multiMenu.addAction(self.trUtf8('Configure...'), self._configure) self.dirMenu = QMenu(self) if self.project.getProjectType() in \ ["Qt4", "PyQt5", "E4Plugin", "PySide"]: - self.dirMenu.addAction(self.trUtf8('Compile all resources'), + self.dirMenu.addAction( + self.trUtf8('Compile all resources'), self.__compileAllResources) self.dirMenu.addSeparator() else: if self.hooks["compileAllResources"] is not None: self.dirMenu.addAction( - self.hooksMenuEntries.get("compileAllResources", + self.hooksMenuEntries.get( + "compileAllResources", self.trUtf8('Compile all resources')), self.__compileAllResources) self.dirMenu.addSeparator() @@ -219,41 +233,46 @@ self.trUtf8('New resource...'), self.__newResource) self.dirMenu.addAction( self.trUtf8('Add resources...'), self.__addResourceFiles) - self.dirMenu.addAction(self.trUtf8('Add resources directory...'), + self.dirMenu.addAction( + self.trUtf8('Add resources directory...'), self.__addResourcesDirectory) self.dirMenu.addSeparator() - self.dirMenu.addAction(self.trUtf8('Copy Path to Clipboard'), - self._copyToClipboard) + self.dirMenu.addAction( + self.trUtf8('Copy Path to Clipboard'), self._copyToClipboard) self.dirMenu.addSeparator() - self.dirMenu.addAction(self.trUtf8('Expand all directories'), - self._expandAllDirs) - self.dirMenu.addAction(self.trUtf8('Collapse all directories'), - self._collapseAllDirs) + self.dirMenu.addAction( + self.trUtf8('Expand all directories'), self._expandAllDirs) + self.dirMenu.addAction( + self.trUtf8('Collapse all directories'), self._collapseAllDirs) self.dirMenu.addSeparator() self.dirMenu.addAction(self.trUtf8('Configure...'), self._configure) self.dirMultiMenu = QMenu(self) if self.project.getProjectType() in \ ["Qt4", "PyQt5", "E4Plugin", "PySide"]: - self.dirMultiMenu.addAction(self.trUtf8('Compile all resources'), + self.dirMultiMenu.addAction( + self.trUtf8('Compile all resources'), self.__compileAllResources) self.dirMultiMenu.addSeparator() else: if self.hooks["compileAllResources"] is not None: self.dirMultiMenu.addAction( - self.hooksMenuEntries.get("compileAllResources", + self.hooksMenuEntries.get( + "compileAllResources", self.trUtf8('Compile all resources')), self.__compileAllResources) self.dirMultiMenu.addSeparator() - self.dirMultiMenu.addAction(self.trUtf8('Add resources...'), + self.dirMultiMenu.addAction( + self.trUtf8('Add resources...'), self.project.addResourceFiles) - self.dirMultiMenu.addAction(self.trUtf8('Add resources directory...'), + self.dirMultiMenu.addAction( + self.trUtf8('Add resources directory...'), self.project.addResourceDir) self.dirMultiMenu.addSeparator() - self.dirMultiMenu.addAction(self.trUtf8('Expand all directories'), - self._expandAllDirs) - self.dirMultiMenu.addAction(self.trUtf8('Collapse all directories'), - self._collapseAllDirs) + self.dirMultiMenu.addAction( + self.trUtf8('Expand all directories'), self._expandAllDirs) + self.dirMultiMenu.addAction( + self.trUtf8('Collapse all directories'), self._collapseAllDirs) self.dirMultiMenu.addSeparator() self.dirMultiMenu.addAction( self.trUtf8('Configure...'), self._configure) @@ -453,7 +472,8 @@ E5MessageBox.critical( self, self.trUtf8("New Resource"), - self.trUtf8("<p>The new resource file <b>{0}</b> could not" + self.trUtf8( + "<p>The new resource file <b>{0}</b> could not" " be created.<br>Problem: {1}</p>")\ .format(fname, str(e))) return @@ -477,7 +497,8 @@ from UI.DeleteFilesConfirmationDialog import \ DeleteFilesConfirmationDialog - dlg = DeleteFilesConfirmationDialog(self.parent(), + dlg = DeleteFilesConfirmationDialog( + self.parent(), self.trUtf8("Delete resources"), self.trUtf8( "Do you really want to delete these resources from the" @@ -553,13 +574,13 @@ self, self.trUtf8("Resource Compilation"), self.trUtf8("The compilation of the resource file" - " was successful.")) + " was successful.")) else: ui.showNotification( UI.PixmapCache.getPixmap("resourcesCompiler48.png"), self.trUtf8("Resource Compilation"), self.trUtf8("The compilation of the resource file" - " was successful.")) + " was successful.")) except IOError as msg: if not self.noDialog: E5MessageBox.information( @@ -691,7 +712,8 @@ self.hooks["compileAllResources"](self.project.pdata["RESOURCES"]) else: numResources = len(self.project.pdata["RESOURCES"]) - progress = QProgressDialog(self.trUtf8("Compiling resources..."), + progress = QProgressDialog( + self.trUtf8("Compiling resources..."), self.trUtf8("Abort"), 0, numResources, self) progress.setModal(True) progress.setMinimumDuration(0) @@ -725,7 +747,8 @@ self.hooks["compileSelectedResources"](files) else: numResources = len(files) - progress = QProgressDialog(self.trUtf8("Compiling resources..."), + progress = QProgressDialog( + self.trUtf8("Compiling resources..."), self.trUtf8("Abort"), 0, numResources, self) progress.setModal(True) progress.setMinimumDuration(0)
--- a/Project/ProjectSourcesBrowser.py Fri Oct 18 18:00:02 2013 +0200 +++ b/Project/ProjectSourcesBrowser.py Fri Oct 18 18:42:10 2013 +0200 @@ -136,7 +136,8 @@ self.trUtf8("Application Diagram..."), self.__showApplicationDiagram) self.graphicsMenu.addSeparator() - self.graphicsMenu.addAction(UI.PixmapCache.getIcon("open.png"), + self.graphicsMenu.addAction( + UI.PixmapCache.getIcon("open.png"), self.trUtf8("Load Diagram..."), self.__loadDiagram) self.graphicsMenu.aboutToShow.connect(self.__showContextMenuGraphics) @@ -146,49 +147,48 @@ act = self.sourceMenu.addAction( self.trUtf8('Rename file'), self._renameFile) self.menuActions.append(act) - act = self.sourceMenu.addAction(self.trUtf8('Remove from project'), - self._removeFile) + act = self.sourceMenu.addAction( + self.trUtf8('Remove from project'), self._removeFile) self.menuActions.append(act) act = self.sourceMenu.addAction( self.trUtf8('Delete'), self.__deleteFile) self.menuActions.append(act) self.sourceMenu.addSeparator() - self.sourceMenu.addAction(self.trUtf8('New package...'), - self.__addNewPackage) - self.sourceMenu.addAction(self.trUtf8('Add source files...'), - self.__addSourceFiles) - self.sourceMenu.addAction(self.trUtf8('Add source directory...'), - self.__addSourceDirectory) + self.sourceMenu.addAction( + self.trUtf8('New package...'), self.__addNewPackage) + self.sourceMenu.addAction( + self.trUtf8('Add source files...'), self.__addSourceFiles) + self.sourceMenu.addAction( + self.trUtf8('Add source directory...'), self.__addSourceDirectory) self.sourceMenu.addSeparator() act = self.sourceMenu.addMenu(self.graphicsMenu) self.sourceMenu.addSeparator() self.sourceMenu.addMenu(self.checksMenu) self.sourceMenu.addSeparator() - self.sourceMenuActions["Show"] = \ - self.sourceMenu.addMenu(self.menuShow) + self.sourceMenuActions["Show"] = self.sourceMenu.addMenu(self.menuShow) + self.sourceMenu.addSeparator() + self.sourceMenu.addAction( + self.trUtf8('Copy Path to Clipboard'), self._copyToClipboard) self.sourceMenu.addSeparator() - self.sourceMenu.addAction(self.trUtf8('Copy Path to Clipboard'), - self._copyToClipboard) - self.sourceMenu.addSeparator() - self.sourceMenu.addAction(self.trUtf8('Expand all directories'), - self._expandAllDirs) - self.sourceMenu.addAction(self.trUtf8('Collapse all directories'), - self._collapseAllDirs) + self.sourceMenu.addAction( + self.trUtf8('Expand all directories'), self._expandAllDirs) + self.sourceMenu.addAction( + self.trUtf8('Collapse all directories'), self._collapseAllDirs) self.sourceMenu.addSeparator() self.sourceMenu.addAction(self.trUtf8('Configure...'), self._configure) self.menu.addSeparator() - self.menu.addAction(self.trUtf8('New package...'), - self.__addNewPackage) - self.menu.addAction(self.trUtf8('Add source files...'), - self.__addSourceFiles) - self.menu.addAction(self.trUtf8('Add source directory...'), - self.__addSourceDirectory) + self.menu.addAction( + self.trUtf8('New package...'), self.__addNewPackage) + self.menu.addAction( + self.trUtf8('Add source files...'), self.__addSourceFiles) + self.menu.addAction( + self.trUtf8('Add source directory...'), self.__addSourceDirectory) self.menu.addSeparator() - self.menu.addAction(self.trUtf8('Expand all directories'), - self._expandAllDirs) - self.menu.addAction(self.trUtf8('Collapse all directories'), - self._collapseAllDirs) + self.menu.addAction( + self.trUtf8('Expand all directories'), self._expandAllDirs) + self.menu.addAction( + self.trUtf8('Collapse all directories'), self._collapseAllDirs) self.menu.addSeparator() self.menu.addAction(self.trUtf8('Configure...'), self._configure) @@ -200,49 +200,49 @@ self.attributeMenu = QMenu(self) self.attributeMenu.addMenu(self.gotoMenu) self.attributeMenu.addSeparator() - self.attributeMenu.addAction(self.trUtf8('New package...'), - self.__addNewPackage) - self.attributeMenu.addAction(self.trUtf8('Add source files...'), - self.project.addSourceFiles) - self.attributeMenu.addAction(self.trUtf8('Add source directory...'), - self.project.addSourceDir) + self.attributeMenu.addAction( + self.trUtf8('New package...'), self.__addNewPackage) + self.attributeMenu.addAction( + self.trUtf8('Add source files...'), self.project.addSourceFiles) + self.attributeMenu.addAction( + self.trUtf8('Add source directory...'), self.project.addSourceDir) self.attributeMenu.addSeparator() - self.attributeMenu.addAction(self.trUtf8('Expand all directories'), - self._expandAllDirs) - self.attributeMenu.addAction(self.trUtf8('Collapse all directories'), - self._collapseAllDirs) + self.attributeMenu.addAction( + self.trUtf8('Expand all directories'), self._expandAllDirs) + self.attributeMenu.addAction( + self.trUtf8('Collapse all directories'), self._collapseAllDirs) self.attributeMenu.addSeparator() self.attributeMenu.addAction( self.trUtf8('Configure...'), self._configure) self.backMenu = QMenu(self) - self.backMenu.addAction(self.trUtf8('New package...'), - self.__addNewPackage) - self.backMenu.addAction(self.trUtf8('Add source files...'), - self.project.addSourceFiles) - self.backMenu.addAction(self.trUtf8('Add source directory...'), - self.project.addSourceDir) + self.backMenu.addAction( + self.trUtf8('New package...'), self.__addNewPackage) + self.backMenu.addAction( + self.trUtf8('Add source files...'), self.project.addSourceFiles) + self.backMenu.addAction( + self.trUtf8('Add source directory...'), self.project.addSourceDir) self.backMenu.addSeparator() - self.backMenu.addAction(self.trUtf8('Expand all directories'), - self._expandAllDirs) - self.backMenu.addAction(self.trUtf8('Collapse all directories'), - self._collapseAllDirs) + self.backMenu.addAction( + self.trUtf8('Expand all directories'), self._expandAllDirs) + self.backMenu.addAction( + self.trUtf8('Collapse all directories'), self._collapseAllDirs) self.backMenu.addSeparator() self.backMenu.addAction(self.trUtf8('Configure...'), self._configure) self.backMenu.setEnabled(False) self.multiMenu.addSeparator() - act = self.multiMenu.addAction(self.trUtf8('Remove from project'), - self._removeFile) + act = self.multiMenu.addAction( + self.trUtf8('Remove from project'), self._removeFile) self.multiMenuActions.append(act) act = self.multiMenu.addAction( self.trUtf8('Delete'), self.__deleteFile) self.multiMenuActions.append(act) self.multiMenu.addSeparator() - self.multiMenu.addAction(self.trUtf8('Expand all directories'), - self._expandAllDirs) - self.multiMenu.addAction(self.trUtf8('Collapse all directories'), - self._collapseAllDirs) + self.multiMenu.addAction( + self.trUtf8('Expand all directories'), self._expandAllDirs) + self.multiMenu.addAction( + self.trUtf8('Collapse all directories'), self._collapseAllDirs) self.multiMenu.addSeparator() self.multiMenu.addAction(self.trUtf8('Configure...'), self._configure) @@ -258,28 +258,28 @@ self.trUtf8('New package...'), self.__addNewPackage) self.dirMenu.addAction( self.trUtf8('Add source files...'), self.__addSourceFiles) - self.dirMenu.addAction(self.trUtf8('Add source directory...'), - self.__addSourceDirectory) + self.dirMenu.addAction( + self.trUtf8('Add source directory...'), self.__addSourceDirectory) self.dirMenu.addSeparator() act = self.dirMenu.addMenu(self.graphicsMenu) self.dirMenu.addSeparator() self.dirMenu.addMenu(self.checksMenu) self.dirMenu.addSeparator() - self.dirMenu.addAction(self.trUtf8('Copy Path to Clipboard'), - self._copyToClipboard) + self.dirMenu.addAction( + self.trUtf8('Copy Path to Clipboard'), self._copyToClipboard) self.dirMenu.addSeparator() - self.dirMenu.addAction(self.trUtf8('Expand all directories'), - self._expandAllDirs) - self.dirMenu.addAction(self.trUtf8('Collapse all directories'), - self._collapseAllDirs) + self.dirMenu.addAction( + self.trUtf8('Expand all directories'), self._expandAllDirs) + self.dirMenu.addAction( + self.trUtf8('Collapse all directories'), self._collapseAllDirs) self.dirMenu.addSeparator() self.dirMenu.addAction(self.trUtf8('Configure...'), self._configure) self.dirMultiMenu = QMenu(self) - self.dirMultiMenu.addAction(self.trUtf8('Expand all directories'), - self._expandAllDirs) - self.dirMultiMenu.addAction(self.trUtf8('Collapse all directories'), - self._collapseAllDirs) + self.dirMultiMenu.addAction( + self.trUtf8('Expand all directories'), self._expandAllDirs) + self.dirMultiMenu.addAction( + self.trUtf8('Collapse all directories'), self._collapseAllDirs) self.dirMultiMenu.addSeparator() self.dirMultiMenu.addAction( self.trUtf8('Configure...'), self._configure) @@ -298,49 +298,51 @@ self.graphicsMenu = QMenu(self.trUtf8('Diagrams')) self.classDiagramAction = self.graphicsMenu.addAction( self.trUtf8("Class Diagram..."), self.__showClassDiagram) - self.graphicsMenu.addAction(self.trUtf8("Package Diagram..."), - self.__showPackageDiagram) - self.graphicsMenu.addAction(self.trUtf8("Application Diagram..."), + self.graphicsMenu.addAction( + self.trUtf8("Package Diagram..."), self.__showPackageDiagram) + self.graphicsMenu.addAction( + self.trUtf8("Application Diagram..."), self.__showApplicationDiagram) self.graphicsMenu.addSeparator() - self.graphicsMenu.addAction(UI.PixmapCache.getIcon("fileOpen.png"), + self.graphicsMenu.addAction( + UI.PixmapCache.getIcon("fileOpen.png"), self.trUtf8("Load Diagram..."), self.__loadDiagram) self.sourceMenu.addSeparator() act = self.sourceMenu.addAction( self.trUtf8('Rename file'), self._renameFile) self.menuActions.append(act) - act = self.sourceMenu.addAction(self.trUtf8('Remove from project'), - self._removeFile) + act = self.sourceMenu.addAction( + self.trUtf8('Remove from project'), self._removeFile) self.menuActions.append(act) act = self.sourceMenu.addAction( self.trUtf8('Delete'), self.__deleteFile) self.menuActions.append(act) self.sourceMenu.addSeparator() - self.sourceMenu.addAction(self.trUtf8('Add source files...'), - self.__addSourceFiles) - self.sourceMenu.addAction(self.trUtf8('Add source directory...'), - self.__addSourceDirectory) + self.sourceMenu.addAction( + self.trUtf8('Add source files...'), self.__addSourceFiles) + self.sourceMenu.addAction( + self.trUtf8('Add source directory...'), self.__addSourceDirectory) self.sourceMenu.addSeparator() act = self.sourceMenu.addMenu(self.graphicsMenu) self.sourceMenu.addSeparator() - self.sourceMenu.addAction(self.trUtf8('Expand all directories'), - self._expandAllDirs) - self.sourceMenu.addAction(self.trUtf8('Collapse all directories'), - self._collapseAllDirs) + self.sourceMenu.addAction( + self.trUtf8('Expand all directories'), self._expandAllDirs) + self.sourceMenu.addAction( + self.trUtf8('Collapse all directories'), self._collapseAllDirs) self.sourceMenu.addSeparator() self.sourceMenu.addAction(self.trUtf8('Configure...'), self._configure) self.menu.addSeparator() self.menu.addAction( self.trUtf8('Add source files...'), self.__addSourceFiles) - self.menu.addAction(self.trUtf8('Add source directory...'), - self.__addSourceDirectory) + self.menu.addAction( + self.trUtf8('Add source directory...'), self.__addSourceDirectory) self.menu.addSeparator() - self.menu.addAction(self.trUtf8('Expand all directories'), - self._expandAllDirs) - self.menu.addAction(self.trUtf8('Collapse all directories'), - self._collapseAllDirs) + self.menu.addAction( + self.trUtf8('Expand all directories'), self._expandAllDirs) + self.menu.addAction( + self.trUtf8('Collapse all directories'), self._collapseAllDirs) self.menu.addSeparator() self.menu.addAction(self.trUtf8('Configure...'), self._configure) @@ -352,47 +354,47 @@ self.attributeMenu = QMenu(self) self.attributeMenu.addMenu(self.gotoMenu) self.attributeMenu.addSeparator() - self.attributeMenu.addAction(self.trUtf8('New package...'), - self.__addNewPackage) - self.attributeMenu.addAction(self.trUtf8('Add source files...'), - self.project.addSourceFiles) - self.attributeMenu.addAction(self.trUtf8('Add source directory...'), - self.project.addSourceDir) + self.attributeMenu.addAction( + self.trUtf8('New package...'), self.__addNewPackage) + self.attributeMenu.addAction( + self.trUtf8('Add source files...'), self.project.addSourceFiles) + self.attributeMenu.addAction( + self.trUtf8('Add source directory...'), self.project.addSourceDir) self.attributeMenu.addSeparator() - self.attributeMenu.addAction(self.trUtf8('Expand all directories'), - self._expandAllDirs) - self.attributeMenu.addAction(self.trUtf8('Collapse all directories'), - self._collapseAllDirs) + self.attributeMenu.addAction( + self.trUtf8('Expand all directories'), self._expandAllDirs) + self.attributeMenu.addAction( + self.trUtf8('Collapse all directories'), self._collapseAllDirs) self.attributeMenu.addSeparator() self.attributeMenu.addAction( self.trUtf8('Configure...'), self._configure) self.backMenu = QMenu(self) - self.backMenu.addAction(self.trUtf8('Add source files...'), - self.project.addSourceFiles) - self.backMenu.addAction(self.trUtf8('Add source directory...'), - self.project.addSourceDir) + self.backMenu.addAction( + self.trUtf8('Add source files...'), self.project.addSourceFiles) + self.backMenu.addAction( + self.trUtf8('Add source directory...'), self.project.addSourceDir) self.backMenu.addSeparator() - self.backMenu.addAction(self.trUtf8('Expand all directories'), - self._expandAllDirs) - self.backMenu.addAction(self.trUtf8('Collapse all directories'), - self._collapseAllDirs) + self.backMenu.addAction( + self.trUtf8('Expand all directories'), self._expandAllDirs) + self.backMenu.addAction( + self.trUtf8('Collapse all directories'), self._collapseAllDirs) self.backMenu.setEnabled(False) self.backMenu.addSeparator() self.backMenu.addAction(self.trUtf8('Configure...'), self._configure) self.multiMenu.addSeparator() - act = self.multiMenu.addAction(self.trUtf8('Remove from project'), - self._removeFile) + act = self.multiMenu.addAction( + self.trUtf8('Remove from project'), self._removeFile) self.multiMenuActions.append(act) act = self.multiMenu.addAction( self.trUtf8('Delete'), self.__deleteFile) self.multiMenuActions.append(act) self.multiMenu.addSeparator() - self.multiMenu.addAction(self.trUtf8('Expand all directories'), - self._expandAllDirs) - self.multiMenu.addAction(self.trUtf8('Collapse all directories'), - self._collapseAllDirs) + self.multiMenu.addAction( + self.trUtf8('Expand all directories'), self._expandAllDirs) + self.multiMenu.addAction( + self.trUtf8('Collapse all directories'), self._collapseAllDirs) self.multiMenu.addSeparator() self.multiMenu.addAction(self.trUtf8('Configure...'), self._configure) @@ -403,23 +405,23 @@ self.dirMenu.addSeparator() self.dirMenu.addAction( self.trUtf8('Add source files...'), self.__addSourceFiles) - self.dirMenu.addAction(self.trUtf8('Add source directory...'), - self.__addSourceDirectory) + self.dirMenu.addAction( + self.trUtf8('Add source directory...'), self.__addSourceDirectory) self.dirMenu.addSeparator() act = self.dirMenu.addMenu(self.graphicsMenu) self.dirMenu.addSeparator() - self.dirMenu.addAction(self.trUtf8('Expand all directories'), - self._expandAllDirs) - self.dirMenu.addAction(self.trUtf8('Collapse all directories'), - self._collapseAllDirs) + self.dirMenu.addAction( + self.trUtf8('Expand all directories'), self._expandAllDirs) + self.dirMenu.addAction( + self.trUtf8('Collapse all directories'), self._collapseAllDirs) self.dirMenu.addSeparator() self.dirMenu.addAction(self.trUtf8('Configure...'), self._configure) self.dirMultiMenu = QMenu(self) - self.dirMultiMenu.addAction(self.trUtf8('Expand all directories'), - self._expandAllDirs) - self.dirMultiMenu.addAction(self.trUtf8('Collapse all directories'), - self._collapseAllDirs) + self.dirMultiMenu.addAction( + self.trUtf8('Expand all directories'), self._expandAllDirs) + self.dirMultiMenu.addAction( + self.trUtf8('Collapse all directories'), self._collapseAllDirs) self.dirMultiMenu.addSeparator() self.dirMultiMenu.addAction( self.trUtf8('Configure...'), self._configure) @@ -576,8 +578,8 @@ os.path.isfile("{0}.profile".format(basename)) or \ os.path.isfile("{0}.profile".format(tbasename)) coEnable = (coEnable or \ - os.path.isfile("{0}.coverage".format(basename)) or \ - os.path.isfile("{0}.coverage".format(tbasename))) and \ + os.path.isfile("{0}.coverage".format(basename)) or \ + os.path.isfile("{0}.coverage".format(tbasename))) and \ self.project.isPy3Project() # now check the selected item @@ -588,7 +590,7 @@ prEnable = prEnable or \ os.path.isfile("{0}.profile".format(basename)) coEnable = (coEnable or \ - os.path.isfile("{0}.coverage".format(basename))) and \ + os.path.isfile("{0}.coverage".format(basename))) and \ itm.isPython3File() self.profileMenuAction.setEnabled(prEnable) @@ -735,7 +737,8 @@ from UI.DeleteFilesConfirmationDialog import \ DeleteFilesConfirmationDialog - dlg = DeleteFilesConfirmationDialog(self.parent(), + dlg = DeleteFilesConfirmationDialog( + self.parent(), self.trUtf8("Delete files"), self.trUtf8( "Do you really want to delete these files from the project?"),
--- a/Project/ProjectTranslationsBrowser.py Fri Oct 18 18:00:02 2013 +0200 +++ b/Project/ProjectTranslationsBrowser.py Fri Oct 18 18:42:10 2013 +0200 @@ -109,8 +109,8 @@ if self.project.getProjectType() in \ ["Qt4", "Qt4C", "PyQt5", "PyQt5C", "E4Plugin", "PySide", "PySideC"]: - act = self.menu.addAction(self.trUtf8('Generate translation'), - self.__generateSelected) + act = self.menu.addAction( + self.trUtf8('Generate translation'), self.__generateSelected) self.tsMenuActions.append(act) self.tsprocMenuActions.append(act) act = self.menu.addAction( @@ -118,66 +118,71 @@ self.__generateObsoleteSelected) self.tsMenuActions.append(act) self.tsprocMenuActions.append(act) - act = self.menu.addAction(self.trUtf8('Generate all translations'), - self.__generateAll) + act = self.menu.addAction( + self.trUtf8('Generate all translations'), self.__generateAll) self.tsprocMenuActions.append(act) act = self.menu.addAction( self.trUtf8('Generate all translations (with obsolete)'), self.__generateObsoleteAll) self.tsprocMenuActions.append(act) self.menu.addSeparator() - act = self.menu.addAction(self.trUtf8('Open in Qt-Linguist'), - self._openItem) + act = self.menu.addAction( + self.trUtf8('Open in Qt-Linguist'), self._openItem) self.tsMenuActions.append(act) - act = self.menu.addAction(self.trUtf8('Open in Editor'), - self.__openFileInEditor) + act = self.menu.addAction( + self.trUtf8('Open in Editor'), self.__openFileInEditor) self.tsMenuActions.append(act) self.menu.addSeparator() - act = self.menu.addAction(self.trUtf8('Release translation'), - self.__releaseSelected) + act = self.menu.addAction( + self.trUtf8('Release translation'), self.__releaseSelected) self.tsMenuActions.append(act) self.qmprocMenuActions.append(act) - act = self.menu.addAction(self.trUtf8('Release all translations'), - self.__releaseAll) + act = self.menu.addAction( + self.trUtf8('Release all translations'), self.__releaseAll) self.qmprocMenuActions.append(act) self.menu.addSeparator() - act = self.menu.addAction(self.trUtf8('Preview translation'), - self.__TRPreview) + act = self.menu.addAction( + self.trUtf8('Preview translation'), self.__TRPreview) self.qmMenuActions.append(act) - act = self.menu.addAction(self.trUtf8('Preview all translations'), - self.__TRPreviewAll) + act = self.menu.addAction( + self.trUtf8('Preview all translations'), self.__TRPreviewAll) self.menu.addSeparator() else: if self.hooks["extractMessages"] is not None: act = self.menu.addAction( - self.hooksMenuEntries.get("extractMessages", + self.hooksMenuEntries.get( + "extractMessages", self.trUtf8('Extract messages')), self.__extractMessages) self.menuActions.append(act) self.menu.addSeparator() if self.hooks["generateSelected"] is not None: act = self.menu.addAction( - self.hooksMenuEntries.get("generateSelected", + self.hooksMenuEntries.get( + "generateSelected", self.trUtf8('Generate translation')), self.__generateSelected) self.tsMenuActions.append(act) self.tsprocMenuActions.append(act) if self.hooks["generateSelectedWithObsolete"] is not None: act = self.menu.addAction( - self.hooksMenuEntries.get("generateSelectedWithObsolete", + self.hooksMenuEntries.get( + "generateSelectedWithObsolete", self.trUtf8('Generate translation (with obsolete)')), self.__generateObsoleteSelected) self.tsMenuActions.append(act) self.tsprocMenuActions.append(act) if self.hooks["generateAll"] is not None: act = self.menu.addAction( - self.hooksMenuEntries.get("generateAll", + self.hooksMenuEntries.get( + "generateAll", self.trUtf8('Generate all translations')), self.__generateAll) self.tsprocMenuActions.append(act) if self.hooks["generateAllWithObsolete"] is not None: act = self.menu.addAction( - self.hooksMenuEntries.get("generateAllWithObsolete", + self.hooksMenuEntries.get( + "generateAllWithObsolete", self.trUtf8( 'Generate all translations (with obsolete)')), self.__generateObsoleteAll) @@ -185,30 +190,32 @@ self.menu.addSeparator() if self.hooks["open"] is not None: act = self.menu.addAction( - self.hooksMenuEntries.get("open", - self.trUtf8('Open')), + self.hooksMenuEntries.get( + "open", self.trUtf8('Open')), self._openItem) self.tsMenuActions.append(act) - act = self.menu.addAction(self.trUtf8('Open in Editor'), - self.__openFileInEditor) + act = self.menu.addAction( + self.trUtf8('Open in Editor'), self.__openFileInEditor) self.tsMenuActions.append(act) self.menu.addSeparator() if self.hooks["releaseSelected"] is not None: act = self.menu.addAction( - self.hooksMenuEntries.get("releaseSelected", + self.hooksMenuEntries.get( + "releaseSelected", self.trUtf8('Release translation')), self.__releaseSelected) self.tsMenuActions.append(act) self.qmprocMenuActions.append(act) if self.hooks["releaseAll"] is not None: act = self.menu.addAction( - self.hooksMenuEntries.get("releaseAll", + self.hooksMenuEntries.get( + "releaseAll", self.trUtf8('Release all translations')), self.__releaseAll) self.qmprocMenuActions.append(act) self.menu.addSeparator() - act = self.menu.addAction(self.trUtf8('Remove from project'), - self.__removeLanguageFile) + act = self.menu.addAction( + self.trUtf8('Remove from project'), self.__removeLanguageFile) self.menuActions.append(act) act = self.menu.addAction( self.trUtf8('Delete'), self.__deleteLanguageFile) @@ -216,11 +223,12 @@ self.menu.addSeparator() self.__addTranslationAct = self.menu.addAction( self.trUtf8('Add translation...'), self.project.addLanguage) - self.menu.addAction(self.trUtf8('Add translation files...'), + self.menu.addAction( + self.trUtf8('Add translation files...'), self.__addTranslationFiles) self.menu.addSeparator() - self.menu.addAction(self.trUtf8('Copy Path to Clipboard'), - self._copyToClipboard) + self.menu.addAction( + self.trUtf8('Copy Path to Clipboard'), self._copyToClipboard) self.menu.addSeparator() self.menu.addAction(self.trUtf8('Configure...'), self._configure) @@ -247,33 +255,38 @@ else: if self.hooks["extractMessages"] is not None: act = self.backMenu.addAction( - self.hooksMenuEntries.get("extractMessages", + self.hooksMenuEntries.get( + "extractMessages", self.trUtf8('Extract messages')), self.__extractMessages) self.backMenu.addSeparator() if self.hooks["generateAll"] is not None: act = self.backMenu.addAction( - self.hooksMenuEntries.get("generateAll", + self.hooksMenuEntries.get( + "generateAll", self.trUtf8('Generate all translations')), self.__generateAll) self.tsprocBackMenuActions.append(act) if self.hooks["generateAllWithObsolete"] is not None: act = self.backMenu.addAction( - self.hooksMenuEntries.get("generateAllWithObsolete", + self.hooksMenuEntries.get( + "generateAllWithObsolete", self.trUtf8( 'Generate all translations (with obsolete)')), self.__generateObsoleteAll) self.tsprocBackMenuActions.append(act) if self.hooks["releaseAll"] is not None: act = self.backMenu.addAction( - self.hooksMenuEntries.get("releaseAll", + self.hooksMenuEntries.get( + "releaseAll", self.trUtf8('Release all translations')), self.__releaseAll) self.qmprocBackMenuActions.append(act) self.backMenu.addSeparator() self.__addTranslationBackAct = self.backMenu.addAction( self.trUtf8('Add translation...'), self.project.addLanguage) - self.backMenu.addAction(self.trUtf8('Add translation files...'), + self.backMenu.addAction( + self.trUtf8('Add translation files...'), self.__addTranslationFiles) self.backMenu.addSeparator() self.backMenu.addAction(self.trUtf8('Configure...'), self._configure) @@ -298,36 +311,39 @@ act = self.multiMenu.addAction( self.trUtf8('Open in Qt-Linguist'), self._openItem) self.tsMultiMenuActions.append(act) - act = self.multiMenu.addAction(self.trUtf8('Open in Editor'), - self.__openFileInEditor) + act = self.multiMenu.addAction( + self.trUtf8('Open in Editor'), self.__openFileInEditor) self.tsMultiMenuActions.append(act) self.multiMenu.addSeparator() - act = self.multiMenu.addAction(self.trUtf8('Release translations'), - self.__releaseSelected) + act = self.multiMenu.addAction( + self.trUtf8('Release translations'), self.__releaseSelected) self.tsMultiMenuActions.append(act) self.qmprocMultiMenuActions.append(act) self.multiMenu.addSeparator() - act = self.multiMenu.addAction(self.trUtf8('Preview translations'), - self.__TRPreview) + act = self.multiMenu.addAction( + self.trUtf8('Preview translations'), self.__TRPreview) self.qmMultiMenuActions.append(act) else: if self.hooks["extractMessages"] is not None: act = self.multiMenu.addAction( - self.hooksMenuEntries.get("extractMessages", + self.hooksMenuEntries.get( + "extractMessages", self.trUtf8('Extract messages')), self.__extractMessages) self.multiMenuActions.append(act) self.multiMenu.addSeparator() if self.hooks["generateSelected"] is not None: act = self.multiMenu.addAction( - self.hooksMenuEntries.get("generateSelected", + self.hooksMenuEntries.get( + "generateSelected", self.trUtf8('Generate translations')), self.__generateSelected) self.tsMultiMenuActions.append(act) self.tsprocMultiMenuActions.append(act) if self.hooks["generateSelectedWithObsolete"] is not None: act = self.multiMenu.addAction( - self.hooksMenuEntries.get("generateSelectedWithObsolete", + self.hooksMenuEntries.get( + "generateSelectedWithObsolete", self.trUtf8('Generate translations (with obsolete)')), self.__generateObsoleteSelected) self.tsMultiMenuActions.append(act) @@ -335,24 +351,25 @@ self.multiMenu.addSeparator() if self.hooks["open"] is not None: act = self.multiMenu.addAction( - self.hooksMenuEntries.get("open", - self.trUtf8('Open')), + self.hooksMenuEntries.get( + "open", self.trUtf8('Open')), self._openItem) self.tsMultiMenuActions.append(act) - act = self.multiMenu.addAction(self.trUtf8('Open in Editor'), - self.__openFileInEditor) + act = self.multiMenu.addAction( + self.trUtf8('Open in Editor'), self.__openFileInEditor) self.tsMultiMenuActions.append(act) self.multiMenu.addSeparator() if self.hooks["releaseSelected"] is not None: act = self.multiMenu.addAction( - self.hooksMenuEntries.get("releaseSelected", + self.hooksMenuEntries.get( + "releaseSelected", self.trUtf8('Release translations')), self.__releaseSelected) self.tsMultiMenuActions.append(act) self.qmprocMultiMenuActions.append(act) self.multiMenu.addSeparator() - act = self.multiMenu.addAction(self.trUtf8('Remove from project'), - self.__removeLanguageFile) + act = self.multiMenu.addAction( + self.trUtf8('Remove from project'), self.__removeLanguageFile) self.multiMenuActions.append(act) act = self.multiMenu.addAction( self.trUtf8('Delete'), self.__deleteLanguageFile) @@ -383,27 +400,31 @@ else: if self.hooks["extractMessages"] is not None: act = self.dirMenu.addAction( - self.hooksMenuEntries.get("extractMessages", + self.hooksMenuEntries.get( + "extractMessages", self.trUtf8('Extract messages')), self.__extractMessages) self.dirMenuActions.append(act) self.dirMenu.addSeparator() if self.hooks["generateAll"] is not None: act = self.dirMenu.addAction( - self.hooksMenuEntries.get("generateAll", + self.hooksMenuEntries.get( + "generateAll", self.trUtf8('Generate all translations')), self.__generateAll) self.tsprocDirMenuActions.append(act) if self.hooks["generateAllWithObsolete"] is not None: act = self.dirMenu.addAction( - self.hooksMenuEntries.get("generateAllWithObsolete", + self.hooksMenuEntries.get( + "generateAllWithObsolete", self.trUtf8( 'Generate all translations (with obsolete)')), self.__generateObsoleteAll) self.tsprocDirMenuActions.append(act) if self.hooks["releaseAll"] is not None: act = self.dirMenu.addAction( - self.hooksMenuEntries.get("releaseAll", + self.hooksMenuEntries.get( + "releaseAll", self.trUtf8('Release all translations')), self.__releaseAll) self.qmprocDirMenuActions.append(act) @@ -414,11 +435,12 @@ self.dirMenu.addSeparator() self.__addTranslationDirAct = self.dirMenu.addAction( self.trUtf8('Add translation...'), self.project.addLanguage) - self.dirMenu.addAction(self.trUtf8('Add translation files...'), + self.dirMenu.addAction( + self.trUtf8('Add translation files...'), self.__addTranslationFiles) self.dirMenu.addSeparator() - self.dirMenu.addAction(self.trUtf8('Copy Path to Clipboard'), - self._copyToClipboard) + self.dirMenu.addAction( + self.trUtf8('Copy Path to Clipboard'), self._copyToClipboard) self.dirMenu.addSeparator() self.dirMenu.addAction(self.trUtf8('Configure...'), self._configure) @@ -651,10 +673,11 @@ from UI.DeleteFilesConfirmationDialog import \ DeleteFilesConfirmationDialog - dlg = DeleteFilesConfirmationDialog(self.parent(), + dlg = DeleteFilesConfirmationDialog( + self.parent(), self.trUtf8("Delete translation files"), self.trUtf8("Do you really want to delete these translation files" - " from the project?"), + " from the project?"), translationFiles) if dlg.exec_() == QDialog.Accepted: @@ -719,7 +742,7 @@ # only consider files satisfying the filter criteria _sources = [s for s in self.project.pdata["SOURCES"] \ - if os.path.splitext(s)[1] in filter] + if os.path.splitext(s)[1] in filter] sources = [] for s in _sources: addIt = True @@ -743,13 +766,13 @@ if langs: langs = [self.project.getRelativePath(lang.fileName()) \ - for lang in langs if lang.fileName().endswith('.ts')] + for lang in langs if lang.fileName().endswith('.ts')] else: try: pattern = self.project.pdata["TRANSLATIONPATTERN"][0]\ .replace("%language%", "*") langs = [lang for lang in self.project.pdata["TRANSLATIONS"] \ - if fnmatch.fnmatch(lang, pattern)] + if fnmatch.fnmatch(lang, pattern)] except IndexError: langs = [] if not langs: @@ -769,12 +792,15 @@ for level, langs in langLevel.items(): prefix = '../' * level - sections = [("SOURCES", - [prefix + src for src in sources])] - sections.append(("FORMS", - [prefix + form for form in forms])) - sections.append(("TRANSLATIONS", - [prefix + lang for lang in langs])) + sections = [ + ("SOURCES", + [prefix + src for src in sources])] + sections.append( + ("FORMS", + [prefix + form for form in forms])) + sections.append( + ("TRANSLATIONS", + [prefix + lang for lang in langs])) dir, name = os.path.split(pfile) outFile = os.path.join(dir, os.path.dirname(langs[0]), name) @@ -908,7 +934,8 @@ if exitStatus == QProcess.NormalExit and exitCode == 0: ui = e5App().getObject("UserInterface") if ui.notificationsEnabled(): - ui.showNotification(UI.PixmapCache.getPixmap("linguist48.png"), + ui.showNotification( + UI.PixmapCache.getPixmap("linguist48.png"), self.trUtf8("Translation file generation"), self.trUtf8( "The generation of the translation files (*.ts)" @@ -1092,16 +1119,17 @@ if exitStatus == QProcess.NormalExit and exitCode == 0: ui = e5App().getObject("UserInterface") if ui.notificationsEnabled(): - ui.showNotification(UI.PixmapCache.getPixmap("linguist48.png"), + ui.showNotification( + UI.PixmapCache.getPixmap("linguist48.png"), self.trUtf8("Translation file release"), self.trUtf8("The release of the translation files (*.qm)" - " was successful.")) + " was successful.")) else: E5MessageBox.information( self, self.trUtf8("Translation file release"), self.trUtf8("The release of the translation files (*.qm)" - " was successful.")) + " was successful.")) if self.project.pdata["TRANSLATIONSBINPATH"] and \ self.project.pdata["TRANSLATIONSBINPATH"][0]: target = os.path.join(
--- a/PyUnit/UnittestDialog.py Fri Oct 18 18:00:02 2013 +0200 +++ b/PyUnit/UnittestDialog.py Fri Oct 18 18:42:10 2013 +0200 @@ -295,8 +295,8 @@ else: failed = [] self.__failedTests = [] - self.dbs.remoteUTPrepare(prog, self.testName, testFunctionName, - failed, + self.dbs.remoteUTPrepare( + prog, self.testName, testFunctionName, failed, self.coverageCheckBox.isChecked(), mainScript, self.coverageEraseCheckBox.isChecked(), clientType=clientType) else:
--- a/QScintilla/Editor.py Fri Oct 18 18:00:02 2013 +0200 +++ b/QScintilla/Editor.py Fri Oct 18 18:42:10 2013 +0200 @@ -618,89 +618,89 @@ self.encodingsMenu = self.__initContextMenuEncodings() self.__menus["Encodings"] = self.encodingsMenu - self.menuActs["Undo"] = \ - self.menu.addAction(UI.PixmapCache.getIcon("editUndo.png"), + self.menuActs["Undo"] = self.menu.addAction( + UI.PixmapCache.getIcon("editUndo.png"), self.trUtf8('Undo'), self.undo) - self.menuActs["Redo"] = \ - self.menu.addAction(UI.PixmapCache.getIcon("editRedo.png"), + self.menuActs["Redo"] = self.menu.addAction( + UI.PixmapCache.getIcon("editRedo.png"), self.trUtf8('Redo'), self.redo) - self.menuActs["Revert"] = \ - self.menu.addAction(self.trUtf8("Revert to last saved state"), - self.revertToUnmodified) + self.menuActs["Revert"] = self.menu.addAction( + self.trUtf8("Revert to last saved state"), + self.revertToUnmodified) self.menu.addSeparator() - self.menuActs["Cut"] = \ - self.menu.addAction(UI.PixmapCache.getIcon("editCut.png"), + self.menuActs["Cut"] = self.menu.addAction( + UI.PixmapCache.getIcon("editCut.png"), self.trUtf8('Cut'), self.cut) - self.menuActs["Copy"] = \ - self.menu.addAction(UI.PixmapCache.getIcon("editCopy.png"), + self.menuActs["Copy"] = self.menu.addAction( + UI.PixmapCache.getIcon("editCopy.png"), self.trUtf8('Copy'), self.copy) - self.menu.addAction(UI.PixmapCache.getIcon("editPaste.png"), + self.menu.addAction( + UI.PixmapCache.getIcon("editPaste.png"), self.trUtf8('Paste'), self.paste) if not self.miniMenu: self.menu.addSeparator() - self.menu.addAction(UI.PixmapCache.getIcon("editIndent.png"), + self.menu.addAction( + UI.PixmapCache.getIcon("editIndent.png"), self.trUtf8('Indent'), self.indentLineOrSelection) - self.menu.addAction(UI.PixmapCache.getIcon("editUnindent.png"), + self.menu.addAction( + UI.PixmapCache.getIcon("editUnindent.png"), self.trUtf8('Unindent'), self.unindentLineOrSelection) - self.menuActs["Comment"] = \ - self.menu.addAction(UI.PixmapCache.getIcon("editComment.png"), - self.trUtf8('Comment'), self.commentLineOrSelection) - self.menuActs["Uncomment"] = \ - self.menu.addAction( - UI.PixmapCache.getIcon("editUncomment.png"), - self.trUtf8('Uncomment'), self.uncommentLineOrSelection) - self.menuActs["StreamComment"] = \ - self.menu.addAction(self.trUtf8('Stream Comment'), - self.streamCommentLineOrSelection) - self.menuActs["BoxComment"] = \ - self.menu.addAction(self.trUtf8('Box Comment'), - self.boxCommentLineOrSelection) + self.menuActs["Comment"] = self.menu.addAction( + UI.PixmapCache.getIcon("editComment.png"), + self.trUtf8('Comment'), self.commentLineOrSelection) + self.menuActs["Uncomment"] = self.menu.addAction( + UI.PixmapCache.getIcon("editUncomment.png"), + self.trUtf8('Uncomment'), self.uncommentLineOrSelection) + self.menuActs["StreamComment"] = self.menu.addAction( + self.trUtf8('Stream Comment'), + self.streamCommentLineOrSelection) + self.menuActs["BoxComment"] = self.menu.addAction( + self.trUtf8('Box Comment'), + self.boxCommentLineOrSelection) self.menu.addSeparator() - self.menu.addAction(self.trUtf8('Select to brace'), - self.selectToMatchingBrace) + self.menu.addAction( + self.trUtf8('Select to brace'), self.selectToMatchingBrace) self.menu.addAction(self.trUtf8('Select all'), self.__selectAll) self.menu.addAction( self.trUtf8('Deselect all'), self.__deselectAll) self.menu.addSeparator() - self.menuActs["SpellCheck"] = \ - self.menu.addAction(UI.PixmapCache.getIcon("spellchecking.png"), - self.trUtf8('Check spelling...'), self.checkSpelling) - self.menuActs["SpellCheckSelection"] = \ - self.menu.addAction(UI.PixmapCache.getIcon("spellchecking.png"), - self.trUtf8('Check spelling of selection...'), - self.__checkSpellingSelection) - self.menuActs["SpellCheckRemove"] = \ - self.menu.addAction(self.trUtf8("Remove from dictionary"), - self.__removeFromSpellingDictionary) + self.menuActs["SpellCheck"] = self.menu.addAction( + UI.PixmapCache.getIcon("spellchecking.png"), + self.trUtf8('Check spelling...'), self.checkSpelling) + self.menuActs["SpellCheckSelection"] = self.menu.addAction( + UI.PixmapCache.getIcon("spellchecking.png"), + self.trUtf8('Check spelling of selection...'), + self.__checkSpellingSelection) + self.menuActs["SpellCheckRemove"] = self.menu.addAction( + self.trUtf8("Remove from dictionary"), + self.__removeFromSpellingDictionary) self.menu.addSeparator() - self.menu.addAction(self.trUtf8('Shorten empty lines'), - self.shortenEmptyLines) + self.menu.addAction( + self.trUtf8('Shorten empty lines'), self.shortenEmptyLines) self.menu.addSeparator() self.menuActs["Languages"] = self.menu.addMenu(self.languagesMenu) self.menuActs["Encodings"] = self.menu.addMenu(self.encodingsMenu) self.menuActs["Eol"] = self.menu.addMenu(self.eolMenu) self.menu.addSeparator() - self.menuActs["MonospacedFont"] = \ - self.menu.addAction(self.trUtf8("Use Monospaced Font"), - self.handleMonospacedEnable) + self.menuActs["MonospacedFont"] = self.menu.addAction( + self.trUtf8("Use Monospaced Font"), + self.handleMonospacedEnable) self.menuActs["MonospacedFont"].setCheckable(True) self.menuActs["MonospacedFont"].setChecked(self.useMonospaced) - self.menuActs["AutosaveEnable"] = \ - self.menu.addAction(self.trUtf8("Autosave enabled"), - self.__autosaveEnable) + self.menuActs["AutosaveEnable"] = self.menu.addAction( + self.trUtf8("Autosave enabled"), self.__autosaveEnable) self.menuActs["AutosaveEnable"].setCheckable(True) self.menuActs["AutosaveEnable"].setChecked(self.autosaveEnabled) - self.menuActs["TypingAidsEnabled"] = \ - self.menu.addAction(self.trUtf8("Typing aids enabled"), - self.__toggleTypingAids) + self.menuActs["TypingAidsEnabled"] = self.menu.addAction( + self.trUtf8("Typing aids enabled"), self.__toggleTypingAids) self.menuActs["TypingAidsEnabled"].setCheckable(True) self.menuActs["TypingAidsEnabled"].setEnabled( self.completer is not None) self.menuActs["TypingAidsEnabled"].setChecked( self.completer is not None and self.completer.isEnabled()) - self.menuActs["AutoCompletionEnable"] = \ - self.menu.addAction(self.trUtf8("Autocompletion enabled"), - self.__toggleAutoCompletionEnable) + self.menuActs["AutoCompletionEnable"] = self.menu.addAction( + self.trUtf8("Autocompletion enabled"), + self.__toggleAutoCompletionEnable) self.menuActs["AutoCompletionEnable"].setCheckable(True) self.menuActs["AutoCompletionEnable"].setChecked( self.autoCompletionThreshold() != -1) @@ -717,28 +717,32 @@ self.menuActs["Diagrams"] = self.menu.addMenu(self.graphicsMenu) self.menu.addSeparator() self.menu.addAction(self.trUtf8('New view'), self.__newView) - act = self.menu.addAction(self.trUtf8('New view (with new split)'), - self.__newViewNewSplit) + act = self.menu.addAction( + self.trUtf8('New view (with new split)'), self.__newViewNewSplit) if not self.vm.canSplit(): act.setEnabled(False) - self.menu.addAction(UI.PixmapCache.getIcon("close.png"), + self.menu.addAction( + UI.PixmapCache.getIcon("close.png"), self.trUtf8('Close'), self.__contextClose) self.menu.addSeparator() - self.menuActs["Save"] = \ - self.menu.addAction(UI.PixmapCache.getIcon("fileSave.png"), + self.menuActs["Save"] = self.menu.addAction( + UI.PixmapCache.getIcon("fileSave.png"), self.trUtf8('Save'), self.__contextSave) - self.menu.addAction(UI.PixmapCache.getIcon("fileSaveAs.png"), + self.menu.addAction( + UI.PixmapCache.getIcon("fileSaveAs.png"), self.trUtf8('Save As...'), self.__contextSaveAs) if not self.miniMenu: self.menu.addMenu(self.exportersMenu) self.menu.addSeparator() - self.menuActs["OpenRejections"] = \ - self.menu.addAction(self.trUtf8("Open 'rejection' file"), - self.__contextOpenRejections) + self.menuActs["OpenRejections"] = self.menu.addAction( + self.trUtf8("Open 'rejection' file"), + self.__contextOpenRejections) self.menu.addSeparator() - self.menu.addAction(UI.PixmapCache.getIcon("printPreview.png"), - self.trUtf8("Print Preview"), self.printPreviewFile) - self.menu.addAction(UI.PixmapCache.getIcon("print.png"), + self.menu.addAction( + UI.PixmapCache.getIcon("printPreview.png"), + self.trUtf8("Print Preview"), self.printPreviewFile) + self.menu.addAction( + UI.PixmapCache.getIcon("print.png"), self.trUtf8('Print'), self.printFile) else: self.menuActs["OpenRejections"] = None @@ -760,21 +764,18 @@ """ menu = QMenu(self.trUtf8('Autocomplete')) - self.menuActs["acDynamic"] = \ - menu.addAction(self.trUtf8('dynamic'), - self.autoComplete) + self.menuActs["acDynamic"] = menu.addAction( + self.trUtf8('dynamic'), self.autoComplete) menu.addSeparator() - menu.addAction(self.trUtf8('from Document'), - self.autoCompleteFromDocument) - self.menuActs["acAPI"] = \ - menu.addAction(self.trUtf8('from APIs'), - self.autoCompleteFromAPIs) - self.menuActs["acAPIDocument"] = \ - menu.addAction(self.trUtf8('from Document and APIs'), - self.autoCompleteFromAll) + menu.addAction( + self.trUtf8('from Document'), self.autoCompleteFromDocument) + self.menuActs["acAPI"] = menu.addAction( + self.trUtf8('from APIs'), self.autoCompleteFromAPIs) + self.menuActs["acAPIDocument"] = menu.addAction( + self.trUtf8('from Document and APIs'), self.autoCompleteFromAll) menu.addSeparator() - self.menuActs["calltip"] = \ - menu.addAction(self.trUtf8('Calltip'), self.callTip) + self.menuActs["calltip"] = menu.addAction( + self.trUtf8('Calltip'), self.callTip) menu.aboutToShow.connect(self.__showContextMenuAutocompletion) @@ -822,17 +823,18 @@ """ menu = QMenu(self.trUtf8('Diagrams')) - menu.addAction(self.trUtf8('Class Diagram...'), - self.__showClassDiagram) - menu.addAction(self.trUtf8('Package Diagram...'), - self.__showPackageDiagram) - menu.addAction(self.trUtf8('Imports Diagram...'), - self.__showImportsDiagram) - self.applicationDiagramMenuAct = \ - menu.addAction(self.trUtf8('Application Diagram...'), - self.__showApplicationDiagram) + menu.addAction( + self.trUtf8('Class Diagram...'), self.__showClassDiagram) + menu.addAction( + self.trUtf8('Package Diagram...'), self.__showPackageDiagram) + menu.addAction( + self.trUtf8('Imports Diagram...'), self.__showImportsDiagram) + self.applicationDiagramMenuAct = menu.addAction( + self.trUtf8('Application Diagram...'), + self.__showApplicationDiagram) menu.addSeparator() - menu.addAction(UI.PixmapCache.getIcon("open.png"), + menu.addAction( + UI.PixmapCache.getIcon("open.png"), self.trUtf8("Load Diagram..."), self.__loadDiagram) menu.aboutToShow.connect(self.__showContextMenuGraphics) @@ -983,45 +985,38 @@ # bookmark margin self.bmMarginMenu = QMenu() - self.bmMarginMenu.addAction(self.trUtf8('Toggle bookmark'), - self.menuToggleBookmark) - self.marginMenuActs["NextBookmark"] = \ - self.bmMarginMenu.addAction(self.trUtf8('Next bookmark'), - self.nextBookmark) - self.marginMenuActs["PreviousBookmark"] = \ - self.bmMarginMenu.addAction(self.trUtf8('Previous bookmark'), - self.previousBookmark) - self.marginMenuActs["ClearBookmark"] = \ - self.bmMarginMenu.addAction(self.trUtf8('Clear all bookmarks'), - self.clearBookmarks) + self.bmMarginMenu.addAction( + self.trUtf8('Toggle bookmark'), self.menuToggleBookmark) + self.marginMenuActs["NextBookmark"] = self.bmMarginMenu.addAction( + self.trUtf8('Next bookmark'), self.nextBookmark) + self.marginMenuActs["PreviousBookmark"] = self.bmMarginMenu.addAction( + self.trUtf8('Previous bookmark'), self.previousBookmark) + self.marginMenuActs["ClearBookmark"] = self.bmMarginMenu.addAction( + self.trUtf8('Clear all bookmarks'), self.clearBookmarks) self.bmMarginMenu.aboutToShow.connect(self.__showContextMenuMargin) # breakpoint margin self.bpMarginMenu = QMenu() - self.marginMenuActs["Breakpoint"] = \ - self.bpMarginMenu.addAction(self.trUtf8('Toggle breakpoint'), - self.menuToggleBreakpoint) - self.marginMenuActs["TempBreakpoint"] = \ + self.marginMenuActs["Breakpoint"] = self.bpMarginMenu.addAction( + self.trUtf8('Toggle breakpoint'), self.menuToggleBreakpoint) + self.marginMenuActs["TempBreakpoint"] = self.bpMarginMenu.addAction( + self.trUtf8('Toggle temporary breakpoint'), + self.__menuToggleTemporaryBreakpoint) + self.marginMenuActs["EditBreakpoint"] = self.bpMarginMenu.addAction( + self.trUtf8('Edit breakpoint...'), self.menuEditBreakpoint) + self.marginMenuActs["EnableBreakpoint"] = self.bpMarginMenu.addAction( + self.trUtf8('Enable breakpoint'), + self.__menuToggleBreakpointEnabled) + self.marginMenuActs["NextBreakpoint"] = self.bpMarginMenu.addAction( + self.trUtf8('Next breakpoint'), self.menuNextBreakpoint) + self.marginMenuActs["PreviousBreakpoint"] = \ self.bpMarginMenu.addAction( - self.trUtf8('Toggle temporary breakpoint'), - self.__menuToggleTemporaryBreakpoint) - self.marginMenuActs["EditBreakpoint"] = \ - self.bpMarginMenu.addAction(self.trUtf8('Edit breakpoint...'), - self.menuEditBreakpoint) - self.marginMenuActs["EnableBreakpoint"] = \ - self.bpMarginMenu.addAction(self.trUtf8('Enable breakpoint'), - self.__menuToggleBreakpointEnabled) - self.marginMenuActs["NextBreakpoint"] = \ - self.bpMarginMenu.addAction(self.trUtf8('Next breakpoint'), - self.menuNextBreakpoint) - self.marginMenuActs["PreviousBreakpoint"] = \ - self.bpMarginMenu.addAction(self.trUtf8('Previous breakpoint'), + self.trUtf8('Previous breakpoint'), self.menuPreviousBreakpoint) - self.marginMenuActs["ClearBreakpoint"] = \ - self.bpMarginMenu.addAction(self.trUtf8('Clear all breakpoints'), - self.__menuClearBreakpoints) + self.marginMenuActs["ClearBreakpoint"] = self.bpMarginMenu.addAction( + self.trUtf8('Clear all breakpoints'), self.__menuClearBreakpoints) self.bpMarginMenu.aboutToShow.connect(self.__showContextMenuMargin) @@ -1029,50 +1024,49 @@ self.indicMarginMenu = QMenu() self.marginMenuActs["GotoSyntaxError"] = \ - self.indicMarginMenu.addAction(self.trUtf8('Goto syntax error'), - self.gotoSyntaxError) + self.indicMarginMenu.addAction( + self.trUtf8('Goto syntax error'), self.gotoSyntaxError) self.marginMenuActs["ShowSyntaxError"] = \ self.indicMarginMenu.addAction( self.trUtf8('Show syntax error message'), self.__showSyntaxError) self.marginMenuActs["ClearSyntaxError"] = \ - self.indicMarginMenu.addAction(self.trUtf8('Clear syntax error'), - self.clearSyntaxError) + self.indicMarginMenu.addAction( + self.trUtf8('Clear syntax error'), self.clearSyntaxError) self.indicMarginMenu.addSeparator() self.marginMenuActs["NextWarningMarker"] = \ - self.indicMarginMenu.addAction(self.trUtf8("Next warning"), - self.nextFlakesWarning) + self.indicMarginMenu.addAction( + self.trUtf8("Next warning"), self.nextFlakesWarning) self.marginMenuActs["PreviousWarningMarker"] = \ - self.indicMarginMenu.addAction(self.trUtf8("Previous warning"), - self.previousFlakesWarning) + self.indicMarginMenu.addAction( + self.trUtf8("Previous warning"), self.previousFlakesWarning) self.marginMenuActs["ShowWarning"] = \ - self.indicMarginMenu.addAction(self.trUtf8('Show warning message'), - self.__showFlakesWarning) + self.indicMarginMenu.addAction( + self.trUtf8('Show warning message'), self.__showFlakesWarning) self.marginMenuActs["ClearWarnings"] = \ - self.indicMarginMenu.addAction(self.trUtf8('Clear warnings'), - self.clearFlakesWarnings) + self.indicMarginMenu.addAction( + self.trUtf8('Clear warnings'), self.clearFlakesWarnings) self.indicMarginMenu.addSeparator() self.marginMenuActs["NextCoverageMarker"] = \ - self.indicMarginMenu.addAction(self.trUtf8('Next uncovered line'), - self.nextUncovered) + self.indicMarginMenu.addAction( + self.trUtf8('Next uncovered line'), self.nextUncovered) self.marginMenuActs["PreviousCoverageMarker"] = \ self.indicMarginMenu.addAction( - self.trUtf8('Previous uncovered line'), - self.previousUncovered) + self.trUtf8('Previous uncovered line'), self.previousUncovered) self.indicMarginMenu.addSeparator() self.marginMenuActs["NextTaskMarker"] = \ - self.indicMarginMenu.addAction(self.trUtf8('Next task'), - self.nextTask) + self.indicMarginMenu.addAction( + self.trUtf8('Next task'), self.nextTask) self.marginMenuActs["PreviousTaskMarker"] = \ - self.indicMarginMenu.addAction(self.trUtf8('Previous task'), - self.previousTask) + self.indicMarginMenu.addAction( + self.trUtf8('Previous task'), self.previousTask) self.indicMarginMenu.addSeparator() self.marginMenuActs["NextChangeMarker"] = \ - self.indicMarginMenu.addAction(self.trUtf8('Next change'), - self.nextChange) + self.indicMarginMenu.addAction( + self.trUtf8('Next change'), self.nextChange) self.marginMenuActs["PreviousChangeMarker"] = \ - self.indicMarginMenu.addAction(self.trUtf8('Previous change'), - self.previousChange) + self.indicMarginMenu.addAction( + self.trUtf8('Previous change'), self.previousChange) self.indicMarginMenu.aboutToShow.connect(self.__showContextMenuMargin) @@ -1082,93 +1076,72 @@ """ self.marginMenu = QMenu() - self.marginMenu.addAction(self.trUtf8('Toggle bookmark'), - self.menuToggleBookmark) - self.marginMenuActs["NextBookmark"] = \ - self.marginMenu.addAction(self.trUtf8('Next bookmark'), - self.nextBookmark) - self.marginMenuActs["PreviousBookmark"] = \ - self.marginMenu.addAction(self.trUtf8('Previous bookmark'), - self.previousBookmark) - self.marginMenuActs["ClearBookmark"] = \ - self.marginMenu.addAction(self.trUtf8('Clear all bookmarks'), - self.clearBookmarks) + self.marginMenu.addAction( + self.trUtf8('Toggle bookmark'), self.menuToggleBookmark) + self.marginMenuActs["NextBookmark"] = self.marginMenu.addAction( + self.trUtf8('Next bookmark'), self.nextBookmark) + self.marginMenuActs["PreviousBookmark"] = self.marginMenu.addAction( + self.trUtf8('Previous bookmark'), self.previousBookmark) + self.marginMenuActs["ClearBookmark"] = self.marginMenu.addAction( + self.trUtf8('Clear all bookmarks'), self.clearBookmarks) self.marginMenu.addSeparator() - self.marginMenuActs["GotoSyntaxError"] = \ - self.marginMenu.addAction(self.trUtf8('Goto syntax error'), - self.gotoSyntaxError) - self.marginMenuActs["ShowSyntaxError"] = \ - self.marginMenu.addAction(self.trUtf8('Show syntax error message'), - self.__showSyntaxError) - self.marginMenuActs["ClearSyntaxError"] = \ - self.marginMenu.addAction(self.trUtf8('Clear syntax error'), - self.clearSyntaxError) + self.marginMenuActs["GotoSyntaxError"] = self.marginMenu.addAction( + self.trUtf8('Goto syntax error'), self.gotoSyntaxError) + self.marginMenuActs["ShowSyntaxError"] = self.marginMenu.addAction( + self.trUtf8('Show syntax error message'), self.__showSyntaxError) + self.marginMenuActs["ClearSyntaxError"] = self.marginMenu.addAction( + self.trUtf8('Clear syntax error'), self.clearSyntaxError) self.marginMenu.addSeparator() - self.marginMenuActs["NextWarningMarker"] = \ - self.marginMenu.addAction(self.trUtf8("Next warning"), - self.nextFlakesWarning) + self.marginMenuActs["NextWarningMarker"] = self.marginMenu.addAction( + self.trUtf8("Next warning"), self.nextFlakesWarning) self.marginMenuActs["PreviousWarningMarker"] = \ - self.marginMenu.addAction(self.trUtf8("Previous warning"), - self.previousFlakesWarning) - self.marginMenuActs["ShowWarning"] = \ - self.marginMenu.addAction(self.trUtf8('Show warning message'), - self.__showFlakesWarning) - self.marginMenuActs["ClearWarnings"] = \ - self.marginMenu.addAction(self.trUtf8('Clear warnings'), - self.clearFlakesWarnings) - self.marginMenu.addSeparator() - self.marginMenuActs["Breakpoint"] = \ - self.marginMenu.addAction(self.trUtf8('Toggle breakpoint'), - self.menuToggleBreakpoint) - self.marginMenuActs["TempBreakpoint"] = \ self.marginMenu.addAction( - self.trUtf8('Toggle temporary breakpoint'), - self.__menuToggleTemporaryBreakpoint) - self.marginMenuActs["EditBreakpoint"] = \ - self.marginMenu.addAction(self.trUtf8('Edit breakpoint...'), - self.menuEditBreakpoint) - self.marginMenuActs["EnableBreakpoint"] = \ - self.marginMenu.addAction(self.trUtf8('Enable breakpoint'), - self.__menuToggleBreakpointEnabled) - self.marginMenuActs["NextBreakpoint"] = \ - self.marginMenu.addAction(self.trUtf8('Next breakpoint'), - self.menuNextBreakpoint) - self.marginMenuActs["PreviousBreakpoint"] = \ - self.marginMenu.addAction(self.trUtf8('Previous breakpoint'), - self.menuPreviousBreakpoint) - self.marginMenuActs["ClearBreakpoint"] = \ - self.marginMenu.addAction(self.trUtf8('Clear all breakpoints'), - self.__menuClearBreakpoints) + self.trUtf8("Previous warning"), self.previousFlakesWarning) + self.marginMenuActs["ShowWarning"] = self.marginMenu.addAction( + self.trUtf8('Show warning message'), self.__showFlakesWarning) + self.marginMenuActs["ClearWarnings"] = self.marginMenu.addAction( + self.trUtf8('Clear warnings'), self.clearFlakesWarnings) self.marginMenu.addSeparator() - self.marginMenuActs["NextCoverageMarker"] = \ - self.marginMenu.addAction(self.trUtf8('Next uncovered line'), - self.nextUncovered) - self.marginMenuActs["PreviousCoverageMarker"] = \ - self.marginMenu.addAction(self.trUtf8('Previous uncovered line'), - self.previousUncovered) + self.marginMenuActs["Breakpoint"] = self.marginMenu.addAction( + self.trUtf8('Toggle breakpoint'), self.menuToggleBreakpoint) + self.marginMenuActs["TempBreakpoint"] = self.marginMenu.addAction( + self.trUtf8('Toggle temporary breakpoint'), + self.__menuToggleTemporaryBreakpoint) + self.marginMenuActs["EditBreakpoint"] = self.marginMenu.addAction( + self.trUtf8('Edit breakpoint...'), self.menuEditBreakpoint) + self.marginMenuActs["EnableBreakpoint"] = self.marginMenu.addAction( + self.trUtf8('Enable breakpoint'), + self.__menuToggleBreakpointEnabled) + self.marginMenuActs["NextBreakpoint"] = self.marginMenu.addAction( + self.trUtf8('Next breakpoint'), self.menuNextBreakpoint) + self.marginMenuActs["PreviousBreakpoint"] = self.marginMenu.addAction( + self.trUtf8('Previous breakpoint'), self.menuPreviousBreakpoint) + self.marginMenuActs["ClearBreakpoint"] = self.marginMenu.addAction( + self.trUtf8('Clear all breakpoints'), self.__menuClearBreakpoints) self.marginMenu.addSeparator() - self.marginMenuActs["NextTaskMarker"] = \ - self.marginMenu.addAction(self.trUtf8('Next task'), - self.nextTask) - self.marginMenuActs["PreviousTaskMarker"] = \ - self.marginMenu.addAction(self.trUtf8('Previous task'), - self.previousTask) + self.marginMenuActs["NextCoverageMarker"] = self.marginMenu.addAction( + self.trUtf8('Next uncovered line'), self.nextUncovered) + self.marginMenuActs["PreviousCoverageMarker"] = \ + self.marginMenu.addAction( + self.trUtf8('Previous uncovered line'), self.previousUncovered) self.marginMenu.addSeparator() - self.marginMenuActs["NextChangeMarker"] = \ - self.marginMenu.addAction(self.trUtf8('Next change'), - self.nextChange) + self.marginMenuActs["NextTaskMarker"] = self.marginMenu.addAction( + self.trUtf8('Next task'), self.nextTask) + self.marginMenuActs["PreviousTaskMarker"] = self.marginMenu.addAction( + self.trUtf8('Previous task'), self.previousTask) + self.marginMenu.addSeparator() + self.marginMenuActs["NextChangeMarker"] = self.marginMenu.addAction( + self.trUtf8('Next change'), self.nextChange) self.marginMenuActs["PreviousChangeMarker"] = \ - self.marginMenu.addAction(self.trUtf8('Previous change'), - self.previousChange) + self.marginMenu.addAction( + self.trUtf8('Previous change'), self.previousChange) self.marginMenu.addSeparator() - self.marginMenuActs["LMBbookmarks"] = \ - self.marginMenu.addAction(self.trUtf8('LMB toggles bookmarks'), - self.__lmBbookmarks) + self.marginMenuActs["LMBbookmarks"] = self.marginMenu.addAction( + self.trUtf8('LMB toggles bookmarks'), self.__lmBbookmarks) self.marginMenuActs["LMBbookmarks"].setCheckable(True) self.marginMenuActs["LMBbookmarks"].setChecked(False) - self.marginMenuActs["LMBbreakpoints"] = \ - self.marginMenu.addAction(self.trUtf8('LMB toggles breakpoints'), - self.__lmBbreakpoints) + self.marginMenuActs["LMBbreakpoints"] = self.marginMenu.addAction( + self.trUtf8('LMB toggles breakpoints'), self.__lmBbreakpoints) self.marginMenuActs["LMBbreakpoints"].setCheckable(True) self.marginMenuActs["LMBbreakpoints"].setChecked(True) @@ -1780,8 +1753,8 @@ return isProjectPy2 else: # 3) determine by compiling the sources - syntaxError = Utilities.py2compile(self.fileName, - checkFlakes=False)[0] + syntaxError = Utilities.py2compile( + self.fileName, checkFlakes=False)[0] if not syntaxError: self.filetype = "Python2" return True @@ -2087,8 +2060,8 @@ """ if self.fileName and \ (self.isPy3File() or self.isPy2File() or self.isRubyFile()): - self.breakpointModel.addBreakPoint(self.fileName, line, - ('', temporary, True, 0)) + self.breakpointModel.addBreakPoint( + self.fileName, line, ('', temporary, True, 0)) self.breakpointToggled.emit(self) def __toggleBreakpointEnabled(self, line): @@ -2181,13 +2154,15 @@ return from Debugger.EditBreakpointDialog import EditBreakpointDialog - dlg = EditBreakpointDialog((self.fileName, ln), + dlg = EditBreakpointDialog( + (self.fileName, ln), (cond, temp, enabled, ignorecount), self.condHistory, self, modal=True) if dlg.exec_() == QDialog.Accepted: cond, temp, enabled, ignorecount = dlg.getData() - self.breakpointModel.setBreakPointByIndex(index, - self.fileName, ln, (cond, temp, enabled, ignorecount)) + self.breakpointModel.setBreakPointByIndex( + index, self.fileName, ln, + (cond, temp, enabled, ignorecount)) self.line = -1 @@ -4097,7 +4072,8 @@ self.zoomTo(Preferences.getEditor("ZoomFactor")) self.searchIndicator = QsciScintilla.INDIC_CONTAINER - self.indicatorDefine(self.searchIndicator, QsciScintilla.INDIC_BOX, + self.indicatorDefine( + self.searchIndicator, QsciScintilla.INDIC_BOX, Preferences.getEditorColour("SearchMarkers")) if not Preferences.getEditor("SearchMarkersEnabled") and \ not Preferences.getEditor("QuickSearchMarkersEnabled") and \ @@ -4228,7 +4204,8 @@ E5MessageBox.information( self, self.trUtf8("Autocompletion"), - self.trUtf8("""Autocompletion is not available because""" + self.trUtf8( + """Autocompletion is not available because""" """ there is no autocompletion source set.""")) def setAutoCompletionEnabled(self, enable): @@ -4494,7 +4471,8 @@ """ ct = pos if ctshift: - ctmin = self.SendScintilla(QsciScintilla.SCI_POSITIONFROMLINE, + ctmin = self.SendScintilla( + QsciScintilla.SCI_POSITIONFROMLINE, self.SendScintilla(QsciScintilla.SCI_LINEFROMPOSITION, ct)) if ct - ctshift < ctmin: ct = ctmin @@ -4674,7 +4652,8 @@ prEnable = prEnable or \ os.path.isfile("{0}.profile".format(basename)) or \ os.path.isfile("{0}.profile".format(tbasename)) - coEnable = (coEnable or \ + coEnable = ( + coEnable or \ os.path.isfile("{0}.coverage".format(basename)) or \ os.path.isfile("{0}.coverage".format(tbasename))) and \ self.project.isPy3Project() @@ -4688,7 +4667,8 @@ prEnable = prEnable or \ os.path.isfile("{0}.profile".format(basename)) or \ os.path.isfile("{0}.profile".format(tbasename)) - coEnable = (coEnable or \ + coEnable = ( + coEnable or \ os.path.isfile("{0}.coverage".format(basename)) or \ os.path.isfile("{0}.coverage".format(tbasename))) and \ self.isPy3File() @@ -5596,20 +5576,20 @@ annotationStyleTxt = "\n".join(styleAnnotations) if warningAnnotations or errorAnnotations: annotationStyleTxt += "\n" - annotations.append(QsciStyledText(annotationStyleTxt, - self.annotationStyleStyle)) + annotations.append(QsciStyledText( + annotationStyleTxt, self.annotationStyleStyle)) if warningAnnotations: annotationWarningTxt = "\n".join(warningAnnotations) if errorAnnotations: annotationWarningTxt += "\n" - annotations.append(QsciStyledText(annotationWarningTxt, - self.annotationWarningStyle)) + annotations.append(QsciStyledText( + annotationWarningTxt, self.annotationWarningStyle)) if errorAnnotations: annotationErrorTxt = "\n".join(errorAnnotations) - annotations.append(QsciStyledText(annotationErrorTxt, - self.annotationErrorStyle)) + annotations.append(QsciStyledText( + annotationErrorTxt, self.annotationErrorStyle)) if annotations: self.annotate(line, annotations) @@ -6201,17 +6181,19 @@ """ menu = QMenu(self.trUtf8('Resources')) - menu.addAction(self.trUtf8('Add file...'), - self.__addFileResource) - menu.addAction(self.trUtf8('Add files...'), - self.__addFileResources) - menu.addAction(self.trUtf8('Add aliased file...'), + menu.addAction( + self.trUtf8('Add file...'), self.__addFileResource) + menu.addAction( + self.trUtf8('Add files...'), self.__addFileResources) + menu.addAction( + self.trUtf8('Add aliased file...'), self.__addFileAliasResource) - menu.addAction(self.trUtf8('Add localized resource...'), + menu.addAction( + self.trUtf8('Add localized resource...'), self.__addLocalizedResource) menu.addSeparator() - menu.addAction(self.trUtf8('Add resource frame'), - self.__addResourceFrame) + menu.addAction( + self.trUtf8('Add resource frame'), self.__addResourceFrame) menu.aboutToShow.connect(self.__showContextMenuResources) @@ -6432,7 +6414,8 @@ self.getLanguage()) return elif len(templateNames) > 1: - self.showUserList(TemplateCompletionListID, + self.showUserList( + TemplateCompletionListID, ["{0}?{1:d}".format(t, self.TemplateImageID) \ for t in templateNames]) return @@ -6660,10 +6643,10 @@ self.spellingMenu.addAction( UI.PixmapCache.getIcon("spellchecking.png"), self.trUtf8("Check spelling..."), self.__checkSpellingWord) - self.spellingMenu.addAction(self.trUtf8("Add to dictionary"), - self.__addToSpellingDictionary) - self.spellingMenu.addAction(self.trUtf8("Ignore All"), - self.__ignoreSpellingAlways) + self.spellingMenu.addAction( + self.trUtf8("Add to dictionary"), self.__addToSpellingDictionary) + self.spellingMenu.addAction( + self.trUtf8("Ignore All"), self.__ignoreSpellingAlways) self.showMenu.emit("Spelling", self.spellingMenu, self)
--- a/QScintilla/Lexers/Lexer.py Fri Oct 18 18:00:02 2013 +0200 +++ b/QScintilla/Lexers/Lexer.py Fri Oct 18 18:42:10 2013 +0200 @@ -164,8 +164,8 @@ editor.beginUndoAction() # iterate over the lines for line in range(lineFrom, endLine + 1): - editor.setIndentation(line, - editor.indentation(line) + indentDifference) + editor.setIndentation( + line, editor.indentation(line) + indentDifference) editor.endUndoAction() if self.lastIndentedIndex != 0:
--- a/QScintilla/Lexers/__init__.py Fri Oct 18 18:00:02 2013 +0200 +++ b/QScintilla/Lexers/__init__.py Fri Oct 18 18:42:10 2013 +0200 @@ -133,7 +133,7 @@ "TeX": [QApplication.translate('Lexers', "TeX"), 'dummy.tex', "lexerTeX.png"], "VHDL": [QApplication.translate('Lexers', "VHDL"), 'dummy.vhd', - "lexerVHDL.png"], + "lexerVHDL.png"], "XML": [QApplication.translate('Lexers', "XML"), 'dummy.xml', "lexerXML.png"], "YAML": [QApplication.translate('Lexers', "YAML"), 'dummy.yml', @@ -193,7 +193,8 @@ return LexerPython(language, parent) elif language == "C++": from .LexerCPP import LexerCPP - return LexerCPP(parent, + return LexerCPP( + parent, Preferences.getEditor("CppCaseInsensitiveKeywords")) elif language == "C#": from .LexerCSharp import LexerCSharp
--- a/QScintilla/MiniEditor.py Fri Oct 18 18:00:02 2013 +0200 +++ b/QScintilla/MiniEditor.py Fri Oct 18 18:42:10 2013 +0200 @@ -250,7 +250,8 @@ E5MessageBox.about( self, self.trUtf8("About eric5 Mini Editor"), - self.trUtf8("The eric5 Mini Editor is an editor component" + self.trUtf8( + "The eric5 Mini Editor is an editor component" " based on QScintilla. It may be used for simple" " editing tasks, that don't need the power of" " a full blown editor.")) @@ -362,11 +363,12 @@ """ Private method to create the File actions. """ - self.newAct = E5Action(self.trUtf8('New'), - UI.PixmapCache.getIcon("new.png"), - self.trUtf8('&New'), - QKeySequence(self.trUtf8("Ctrl+N", "File|New")), - 0, self, 'vm_file_new') + self.newAct = E5Action( + self.trUtf8('New'), + UI.PixmapCache.getIcon("new.png"), + self.trUtf8('&New'), + QKeySequence(self.trUtf8("Ctrl+N", "File|New")), + 0, self, 'vm_file_new') self.newAct.setStatusTip(self.trUtf8('Open an empty editor window')) self.newAct.setWhatsThis(self.trUtf8( """<b>New</b>""" @@ -375,11 +377,12 @@ self.newAct.triggered[()].connect(self.__newFile) self.fileActions.append(self.newAct) - self.openAct = E5Action(self.trUtf8('Open'), - UI.PixmapCache.getIcon("open.png"), - self.trUtf8('&Open...'), - QKeySequence(self.trUtf8("Ctrl+O", "File|Open")), - 0, self, 'vm_file_open') + self.openAct = E5Action( + self.trUtf8('Open'), + UI.PixmapCache.getIcon("open.png"), + self.trUtf8('&Open...'), + QKeySequence(self.trUtf8("Ctrl+O", "File|Open")), + 0, self, 'vm_file_open') self.openAct.setStatusTip(self.trUtf8('Open a file')) self.openAct.setWhatsThis(self.trUtf8( """<b>Open a file</b>""" @@ -388,11 +391,12 @@ self.openAct.triggered[()].connect(self.__open) self.fileActions.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, 'vm_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, 'vm_file_save') self.saveAct.setStatusTip(self.trUtf8('Save the current file')) self.saveAct.setWhatsThis(self.trUtf8( """<b>Save File</b>""" @@ -401,11 +405,12 @@ self.saveAct.triggered[()].connect(self.__save) self.fileActions.append(self.saveAct) - 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")), - 0, self, 'vm_file_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")), + 0, self, 'vm_file_save_as') self.saveAsAct.setStatusTip(self.trUtf8( 'Save the current file to a new one')) self.saveAsAct.setWhatsThis(self.trUtf8( @@ -416,11 +421,12 @@ self.saveAsAct.triggered[()].connect(self.__saveAs) self.fileActions.append(self.saveAsAct) - self.closeAct = E5Action(self.trUtf8('Close'), - UI.PixmapCache.getIcon("close.png"), - self.trUtf8('&Close'), - QKeySequence(self.trUtf8("Ctrl+W", "File|Close")), - 0, self, 'vm_file_close') + self.closeAct = E5Action( + self.trUtf8('Close'), + UI.PixmapCache.getIcon("close.png"), + self.trUtf8('&Close'), + QKeySequence(self.trUtf8("Ctrl+W", "File|Close")), + 0, self, 'vm_file_close') self.closeAct.setStatusTip(self.trUtf8('Close the editor window')) self.closeAct.setWhatsThis(self.trUtf8( """<b>Close Window</b>""" @@ -429,11 +435,12 @@ self.closeAct.triggered[()].connect(self.close) self.fileActions.append(self.closeAct) - self.printAct = E5Action(self.trUtf8('Print'), - UI.PixmapCache.getIcon("print.png"), - self.trUtf8('&Print'), - QKeySequence(self.trUtf8("Ctrl+P", "File|Print")), - 0, self, 'vm_file_print') + self.printAct = E5Action( + self.trUtf8('Print'), + UI.PixmapCache.getIcon("print.png"), + self.trUtf8('&Print'), + QKeySequence(self.trUtf8("Ctrl+P", "File|Print")), + 0, self, 'vm_file_print') self.printAct.setStatusTip(self.trUtf8('Print the current file')) self.printAct.setWhatsThis(self.trUtf8( """<b>Print File</b>""" @@ -442,11 +449,11 @@ self.printAct.triggered[()].connect(self.__printFile) self.fileActions.append(self.printAct) - self.printPreviewAct = \ - E5Action(self.trUtf8('Print Preview'), - UI.PixmapCache.getIcon("printPreview.png"), - QApplication.translate('ViewManager', 'Print Preview'), - 0, 0, self, 'vm_file_print_preview') + self.printPreviewAct = E5Action( + self.trUtf8('Print Preview'), + UI.PixmapCache.getIcon("printPreview.png"), + QApplication.translate('ViewManager', 'Print Preview'), + 0, 0, self, 'vm_file_print_preview') self.printPreviewAct.setStatusTip(self.trUtf8( 'Print preview of the current file')) self.printPreviewAct.setWhatsThis(self.trUtf8( @@ -460,12 +467,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, 'vm_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, 'vm_edit_undo') self.undoAct.setStatusTip(self.trUtf8('Undo the last change')) self.undoAct.setWhatsThis(self.trUtf8( """<b>Undo</b>""" @@ -474,11 +482,12 @@ self.undoAct.triggered[()].connect(self.__undo) self.editActions.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, 'vm_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, 'vm_edit_redo') self.redoAct.setStatusTip(self.trUtf8('Redo the last change')) self.redoAct.setWhatsThis(self.trUtf8( """<b>Redo</b>""" @@ -487,12 +496,13 @@ self.redoAct.triggered[()].connect(self.__redo) self.editActions.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, 'vm_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, 'vm_edit_cut') self.cutAct.setStatusTip(self.trUtf8('Cut the selection')) self.cutAct.setWhatsThis(self.trUtf8( """<b>Cut</b>""" @@ -502,12 +512,13 @@ self.cutAct.triggered[()].connect(self.__textEdit.cut) self.editActions.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, 'vm_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, 'vm_edit_copy') self.copyAct.setStatusTip(self.trUtf8('Copy the selection')) self.copyAct.setWhatsThis(self.trUtf8( """<b>Copy</b>""" @@ -517,12 +528,13 @@ self.copyAct.triggered[()].connect(self.__textEdit.copy) self.editActions.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, 'vm_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, 'vm_edit_paste') self.pasteAct.setStatusTip(self.trUtf8( 'Paste the last cut/copied text')) self.pasteAct.setWhatsThis(self.trUtf8( @@ -533,12 +545,13 @@ self.pasteAct.triggered[()].connect(self.__textEdit.paste) self.editActions.append(self.pasteAct) - 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, 'vm_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, 'vm_edit_clear') self.deleteAct.setStatusTip(self.trUtf8('Clear all text')) self.deleteAct.setWhatsThis(self.trUtf8( """<b>Clear</b>""" @@ -663,12 +676,15 @@ act.triggered[()].connect(self.esm.map) self.editActions.append(act) - act = E5Action(QApplication.translate('ViewManager', - 'Move to first visible character in document line'), - QApplication.translate('ViewManager', - 'Move to first visible character in document line'), - 0, 0, - self.editorActGrp, 'vm_edit_move_first_visible_char') + act = E5Action( + QApplication.translate( + 'ViewManager', + 'Move to first visible character in document line'), + QApplication.translate( + 'ViewManager', + 'Move to first visible character in document line'), + 0, 0, + self.editorActGrp, 'vm_edit_move_first_visible_char') if not isMacPlatform(): act.setShortcut(QKeySequence( QApplication.translate('ViewManager', 'Home'))) @@ -676,12 +692,15 @@ act.triggered[()].connect(self.esm.map) self.editActions.append(act) - act = E5Action(QApplication.translate('ViewManager', - 'Move to start of display line'), - QApplication.translate('ViewManager', - 'Move to start of display line'), - 0, 0, - self.editorActGrp, 'vm_edit_move_start_line') + act = E5Action( + QApplication.translate( + 'ViewManager', + 'Move to start of display line'), + QApplication.translate( + 'ViewManager', + 'Move to start of display line'), + 0, 0, + self.editorActGrp, 'vm_edit_move_start_line') if isMacPlatform(): act.setShortcut(QKeySequence( QApplication.translate('ViewManager', 'Ctrl+Left'))) @@ -692,12 +711,15 @@ act.triggered[()].connect(self.esm.map) self.editActions.append(act) - act = E5Action(QApplication.translate('ViewManager', - 'Move to end of document line'), - QApplication.translate('ViewManager', - 'Move to end of document line'), - 0, 0, - self.editorActGrp, 'vm_edit_move_end_line') + act = E5Action( + QApplication.translate( + 'ViewManager', + 'Move to end of document line'), + QApplication.translate( + 'ViewManager', + 'Move to end of document line'), + 0, 0, + self.editorActGrp, 'vm_edit_move_end_line') if isMacPlatform(): act.setShortcut(QKeySequence( QApplication.translate('ViewManager', 'Meta+E'))) @@ -908,12 +930,13 @@ act.triggered[()].connect(self.esm.map) self.editActions.append(act) - act = E5Action(QApplication.translate('ViewManager', - 'Extend selection left one word'), - QApplication.translate('ViewManager', - 'Extend selection left one word'), - 0, 0, - self.editorActGrp, 'vm_edit_extend_selection_left_word') + act = E5Action( + QApplication.translate( + 'ViewManager', 'Extend selection left one word'), + QApplication.translate( + 'ViewManager', 'Extend selection left one word'), + 0, 0, + self.editorActGrp, 'vm_edit_extend_selection_left_word') if isMacPlatform(): act.setShortcut(QKeySequence( QApplication.translate('ViewManager', 'Alt+Shift+Left'))) @@ -924,12 +947,13 @@ act.triggered[()].connect(self.esm.map) self.editActions.append(act) - act = E5Action(QApplication.translate('ViewManager', - 'Extend selection right one word'), - QApplication.translate('ViewManager', - 'Extend selection right one word'), - 0, 0, - self.editorActGrp, 'vm_edit_extend_selection_right_word') + act = E5Action( + QApplication.translate( + 'ViewManager', 'Extend selection right one word'), + QApplication.translate( + 'ViewManager', 'Extend selection right one word'), + 0, 0, + self.editorActGrp, 'vm_edit_extend_selection_right_word') if isMacPlatform(): act.setShortcut(QKeySequence( QApplication.translate('ViewManager', 'Alt+Shift+Right'))) @@ -958,12 +982,13 @@ act.triggered[()].connect(self.esm.map) self.editActions.append(act) - act = E5Action(QApplication.translate('ViewManager', - 'Extend selection to end of document line'), - QApplication.translate('ViewManager', - 'Extend selection to end of document line'), - 0, 0, - self.editorActGrp, 'vm_edit_extend_selection_end_line') + act = E5Action( + QApplication.translate( + 'ViewManager', 'Extend selection to end of document line'), + QApplication.translate( + 'ViewManager', 'Extend selection to end of document line'), + 0, 0, + self.editorActGrp, 'vm_edit_extend_selection_end_line') if isMacPlatform(): act.setShortcut(QKeySequence( QApplication.translate('ViewManager', 'Meta+Shift+E'))) @@ -988,14 +1013,15 @@ act.triggered[()].connect(self.esm.map) self.editActions.append(act) - act = E5Action(QApplication.translate('ViewManager', - 'Extend selection down one paragraph'), - QApplication.translate('ViewManager', - 'Extend selection down one paragraph'), - QKeySequence(QApplication.translate('ViewManager', - 'Alt+Shift+Down')), - 0, - self.editorActGrp, 'vm_edit_extend_selection_down_para') + act = E5Action( + QApplication.translate( + 'ViewManager', 'Extend selection down one paragraph'), + QApplication.translate( + 'ViewManager', 'Extend selection down one paragraph'), + QKeySequence(QApplication.translate('ViewManager', + 'Alt+Shift+Down')), + 0, + self.editorActGrp, 'vm_edit_extend_selection_down_para') self.esm.setMapping(act, QsciScintilla.SCI_PARADOWNEXTEND) act.triggered[()].connect(self.esm.map) self.editActions.append(act) @@ -1030,12 +1056,13 @@ act.triggered[()].connect(self.esm.map) self.editActions.append(act) - act = E5Action(QApplication.translate('ViewManager', - 'Extend selection to start of document'), - QApplication.translate('ViewManager', - 'Extend selection to start of document'), - 0, 0, - self.editorActGrp, 'vm_edit_extend_selection_start_text') + act = E5Action( + QApplication.translate( + 'ViewManager', 'Extend selection to start of document'), + QApplication.translate( + 'ViewManager', 'Extend selection to start of document'), + 0, 0, + self.editorActGrp, 'vm_edit_extend_selection_start_text') if isMacPlatform(): act.setShortcut(QKeySequence( QApplication.translate('ViewManager', 'Ctrl+Shift+Up'))) @@ -1046,12 +1073,13 @@ act.triggered[()].connect(self.esm.map) self.editActions.append(act) - act = E5Action(QApplication.translate('ViewManager', - 'Extend selection to end of document'), - QApplication.translate('ViewManager', - 'Extend selection to end of document'), - 0, 0, - self.editorActGrp, 'vm_edit_extend_selection_end_text') + act = E5Action( + QApplication.translate( + 'ViewManager', 'Extend selection to end of document'), + QApplication.translate( + 'ViewManager', 'Extend selection to end of document'), + 0, 0, + self.editorActGrp, 'vm_edit_extend_selection_end_text') if isMacPlatform(): act.setShortcut(QKeySequence( QApplication.translate('ViewManager', 'Ctrl+Shift+Down'))) @@ -1245,12 +1273,13 @@ act.triggered[()].connect(self.esm.map) self.editActions.append(act) - act = E5Action(QApplication.translate('ViewManager', - 'Move to end of display line'), - QApplication.translate('ViewManager', - 'Move to end of display line'), - 0, 0, - self.editorActGrp, 'vm_edit_move_end_displayed_line') + act = E5Action( + QApplication.translate( + 'ViewManager', 'Move to end of display line'), + QApplication.translate( + 'ViewManager', 'Move to end of display line'), + 0, 0, + self.editorActGrp, 'vm_edit_move_end_displayed_line') if isMacPlatform(): act.setShortcut(QKeySequence( QApplication.translate('ViewManager', 'Ctrl+Right'))) @@ -1277,10 +1306,11 @@ act.triggered[()].connect(self.esm.map) self.editActions.append(act) - act = E5Action(QApplication.translate('ViewManager', 'Formfeed'), - QApplication.translate('ViewManager', 'Formfeed'), - 0, 0, - self.editorActGrp, 'vm_edit_formfeed') + act = E5Action( + QApplication.translate('ViewManager', 'Formfeed'), + QApplication.translate('ViewManager', 'Formfeed'), + 0, 0, + self.editorActGrp, 'vm_edit_formfeed') self.esm.setMapping(act, QsciScintilla.SCI_FORMFEED) act.triggered[()].connect(self.esm.map) self.editActions.append(act) @@ -1361,15 +1391,18 @@ act.triggered[()].connect(self.esm.map) self.editActions.append(act) - act = E5Action(QApplication.translate('ViewManager', - 'Extend rectangular selection to first' - ' visible character in document line'), - QApplication.translate('ViewManager', - 'Extend rectangular selection to first' - ' visible character in document line'), - 0, 0, - self.editorActGrp, - 'vm_edit_extend_rect_selection_first_visible_char') + act = E5Action( + QApplication.translate( + 'ViewManager', + 'Extend rectangular selection to first' + ' visible character in document line'), + QApplication.translate( + 'ViewManager', + 'Extend rectangular selection to first' + ' visible character in document line'), + 0, 0, + self.editorActGrp, + 'vm_edit_extend_rect_selection_first_visible_char') if not isMacPlatform(): act.setShortcut(QKeySequence( QApplication.translate('ViewManager', 'Alt+Shift+Home'))) @@ -1442,12 +1475,13 @@ self.editActions.append(act) if hasattr(QsciScintilla, "SCI_SCROLLTOSTART"): - act = E5Action(QApplication.translate('ViewManager', - 'Scroll to start of document'), - QApplication.translate('ViewManager', - 'Scroll to start of document'), - 0, 0, - self.editorActGrp, 'vm_edit_scroll_start_text') + act = E5Action( + QApplication.translate( + 'ViewManager', 'Scroll to start of document'), + QApplication.translate( + 'ViewManager', 'Scroll to start of document'), + 0, 0, + self.editorActGrp, 'vm_edit_scroll_start_text') if isMacPlatform(): act.setShortcut(QKeySequence( QApplication.translate('ViewManager', 'Home'))) @@ -1456,12 +1490,13 @@ self.editActions.append(act) if hasattr(QsciScintilla, "SCI_SCROLLTOEND"): - act = E5Action(QApplication.translate('ViewManager', - 'Scroll to end of document'), - QApplication.translate('ViewManager', - 'Scroll to end of document'), - 0, 0, - self.editorActGrp, 'vm_edit_scroll_end_text') + act = E5Action( + QApplication.translate( + 'ViewManager', 'Scroll to end of document'), + QApplication.translate( + 'ViewManager', 'Scroll to end of document'), + 0, 0, + self.editorActGrp, 'vm_edit_scroll_end_text') if isMacPlatform(): act.setShortcut(QKeySequence( QApplication.translate('ViewManager', 'End'))) @@ -1470,12 +1505,13 @@ self.editActions.append(act) if hasattr(QsciScintilla, "SCI_VERTICALCENTRECARET"): - act = E5Action(QApplication.translate('ViewManager', - 'Scroll vertically to center current line'), - QApplication.translate('ViewManager', - 'Scroll vertically to center current line'), - 0, 0, - self.editorActGrp, 'vm_edit_scroll_vertically_center') + act = E5Action( + QApplication.translate( + 'ViewManager', 'Scroll vertically to center current line'), + QApplication.translate( + 'ViewManager', 'Scroll vertically to center current line'), + 0, 0, + self.editorActGrp, 'vm_edit_scroll_vertically_center') if isMacPlatform(): act.setShortcut(QKeySequence( QApplication.translate('ViewManager', 'Meta+L'))) @@ -1484,12 +1520,13 @@ self.editActions.append(act) if hasattr(QsciScintilla, "SCI_WORDRIGHTEND"): - act = E5Action(QApplication.translate('ViewManager', - 'Move to end of next word'), - QApplication.translate('ViewManager', - 'Move to end of next word'), - 0, 0, - self.editorActGrp, 'vm_edit_move_end_next_word') + act = E5Action( + QApplication.translate( + 'ViewManager', 'Move to end of next word'), + QApplication.translate( + 'ViewManager', 'Move to end of next word'), + 0, 0, + self.editorActGrp, 'vm_edit_move_end_next_word') if isMacPlatform(): act.setShortcut(QKeySequence( QApplication.translate('ViewManager', 'Alt+Right'))) @@ -1498,12 +1535,13 @@ self.editActions.append(act) if hasattr(QsciScintilla, "SCI_WORDRIGHTENDEXTEND"): - act = E5Action(QApplication.translate('ViewManager', - 'Extend selection to end of next word'), - QApplication.translate('ViewManager', - 'Extend selection to end of next word'), - 0, 0, - self.editorActGrp, 'vm_edit_select_end_next_word') + act = E5Action( + QApplication.translate( + 'ViewManager', 'Extend selection to end of next word'), + QApplication.translate( + 'ViewManager', 'Extend selection to end of next word'), + 0, 0, + self.editorActGrp, 'vm_edit_select_end_next_word') if isMacPlatform(): act.setShortcut(QKeySequence( QApplication.translate('ViewManager', 'Alt+Shift+Right'))) @@ -1512,34 +1550,37 @@ self.editActions.append(act) if hasattr(QsciScintilla, "SCI_WORDLEFTEND"): - act = E5Action(QApplication.translate('ViewManager', - 'Move to end of previous word'), - QApplication.translate('ViewManager', - 'Move to end of previous word'), - 0, 0, - self.editorActGrp, 'vm_edit_move_end_previous_word') + act = E5Action( + QApplication.translate( + 'ViewManager', 'Move to end of previous word'), + QApplication.translate( + 'ViewManager', 'Move to end of previous word'), + 0, 0, + self.editorActGrp, 'vm_edit_move_end_previous_word') self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTEND) act.triggered[()].connect(self.esm.map) self.editActions.append(act) if hasattr(QsciScintilla, "SCI_WORDLEFTENDEXTEND"): - act = E5Action(QApplication.translate('ViewManager', - 'Extend selection to end of previous word'), - QApplication.translate('ViewManager', - 'Extend selection to end of previous word'), - 0, 0, - self.editorActGrp, 'vm_edit_select_end_previous_word') + act = E5Action( + QApplication.translate( + 'ViewManager', 'Extend selection to end of previous word'), + QApplication.translate( + 'ViewManager', 'Extend selection to end of previous word'), + 0, 0, + self.editorActGrp, 'vm_edit_select_end_previous_word') self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTENDEXTEND) act.triggered[()].connect(self.esm.map) self.editActions.append(act) if hasattr(QsciScintilla, "SCI_HOME"): - act = E5Action(QApplication.translate('ViewManager', - 'Move to start of document line'), - QApplication.translate('ViewManager', - 'Move to start of document line'), - 0, 0, - self.editorActGrp, 'vm_edit_move_start_document_line') + act = E5Action( + QApplication.translate( + 'ViewManager', 'Move to start of document line'), + QApplication.translate( + 'ViewManager', 'Move to start of document line'), + 0, 0, + self.editorActGrp, 'vm_edit_move_start_document_line') if isMacPlatform(): act.setShortcut(QKeySequence( QApplication.translate('ViewManager', 'Meta+A'))) @@ -1630,15 +1671,18 @@ self.editActions.append(act) if hasattr(QsciScintilla, "SCI_VCHOMEWRAP"): - act = E5Action(QApplication.translate('ViewManager', - 'Move to first visible character in display' - ' or document line'), - QApplication.translate('ViewManager', - 'Move to first visible character in display' - ' or document line'), - 0, 0, - self.editorActGrp, - 'vm_edit_move_first_visible_char_document_line') + act = E5Action( + QApplication.translate( + 'ViewManager', + 'Move to first visible character in display' + ' or document line'), + QApplication.translate( + 'ViewManager', + 'Move to first visible character in display' + ' or document line'), + 0, 0, + self.editorActGrp, + 'vm_edit_move_first_visible_char_document_line') self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEWRAP) act.triggered[()].connect(self.esm.map) self.editActions.append(act) @@ -1690,12 +1734,13 @@ self.editActions.append(act) if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEUP"): - act = E5Action(QApplication.translate('ViewManager', - 'Stuttered move up one page'), - QApplication.translate('ViewManager', - 'Stuttered move up one page'), - 0, 0, - self.editorActGrp, 'vm_edit_stuttered_move_up_page') + act = E5Action( + QApplication.translate( + 'ViewManager', 'Stuttered move up one page'), + QApplication.translate( + 'ViewManager', 'Stuttered move up one page'), + 0, 0, + self.editorActGrp, 'vm_edit_stuttered_move_up_page') self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEUP) act.triggered[()].connect(self.esm.map) self.editActions.append(act) @@ -1716,12 +1761,13 @@ self.editActions.append(act) if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEDOWN"): - act = E5Action(QApplication.translate('ViewManager', - 'Stuttered move down one page'), - QApplication.translate('ViewManager', - 'Stuttered move down one page'), - 0, 0, - self.editorActGrp, 'vm_edit_stuttered_move_down_page') + act = E5Action( + QApplication.translate( + 'ViewManager', 'Stuttered move down one page'), + QApplication.translate( + 'ViewManager', 'Stuttered move down one page'), + 0, 0, + self.editorActGrp, 'vm_edit_stuttered_move_down_page') self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEDOWN) act.triggered[()].connect(self.esm.map) self.editActions.append(act) @@ -1815,9 +1861,10 @@ 'ViewManager', "Ctrl+F", "Search|Search")), 0, self, 'vm_search') - self.searchAct.setStatusTip(QApplication.translate('ViewManager', - 'Search for a text')) - self.searchAct.setWhatsThis(QApplication.translate('ViewManager', + self.searchAct.setStatusTip( + QApplication.translate('ViewManager', 'Search for a text')) + self.searchAct.setWhatsThis(QApplication.translate( + 'ViewManager', """<b>Search</b>""" """<p>Search for some text in the current editor. A""" """ dialog is shown to enter the searchtext and options""" @@ -1826,17 +1873,18 @@ self.searchAct.triggered[()].connect(self.__search) self.searchActions.append(self.searchAct) - self.searchNextAct = E5Action(QApplication.translate('ViewManager', - 'Search next'), - UI.PixmapCache.getIcon("findNext.png"), - QApplication.translate('ViewManager', 'Search &next'), - QKeySequence(QApplication.translate('ViewManager', - "F3", "Search|Search next")), - 0, - self, 'vm_search_next') - self.searchNextAct.setStatusTip(QApplication.translate('ViewManager', - 'Search next occurrence of text')) - self.searchNextAct.setWhatsThis(QApplication.translate('ViewManager', + self.searchNextAct = E5Action( + QApplication.translate('ViewManager', 'Search next'), + UI.PixmapCache.getIcon("findNext.png"), + QApplication.translate('ViewManager', 'Search &next'), + QKeySequence(QApplication.translate( + 'ViewManager', "F3", "Search|Search next")), + 0, + self, 'vm_search_next') + self.searchNextAct.setStatusTip(QApplication.translate( + 'ViewManager', 'Search next occurrence of text')) + self.searchNextAct.setWhatsThis(QApplication.translate( + 'ViewManager', """<b>Search next</b>""" """<p>Search the next occurrence of some text in the current""" """ editor. The previously entered searchtext and options are""" @@ -1845,17 +1893,18 @@ self.searchNextAct.triggered[()].connect(self.searchDlg.findNext) self.searchActions.append(self.searchNextAct) - self.searchPrevAct = E5Action(QApplication.translate('ViewManager', - 'Search previous'), - UI.PixmapCache.getIcon("findPrev.png"), - QApplication.translate('ViewManager', 'Search &previous'), - QKeySequence(QApplication.translate('ViewManager', - "Shift+F3", "Search|Search previous")), - 0, - self, 'vm_search_previous') - self.searchPrevAct.setStatusTip(QApplication.translate('ViewManager', - 'Search previous occurrence of text')) - self.searchPrevAct.setWhatsThis(QApplication.translate('ViewManager', + self.searchPrevAct = E5Action( + QApplication.translate('ViewManager', 'Search previous'), + UI.PixmapCache.getIcon("findPrev.png"), + QApplication.translate('ViewManager', 'Search &previous'), + QKeySequence(QApplication.translate( + 'ViewManager', "Shift+F3", "Search|Search previous")), + 0, + self, 'vm_search_previous') + self.searchPrevAct.setStatusTip(QApplication.translate( + 'ViewManager', 'Search previous occurrence of text')) + self.searchPrevAct.setWhatsThis(QApplication.translate( + 'ViewManager', """<b>Search previous</b>""" """<p>Search the previous occurrence of some text in the""" """ current editor. The previously entered searchtext and""" @@ -1891,9 +1940,10 @@ 'ViewManager', "Ctrl+R", "Search|Replace")), 0, self, 'vm_search_replace') - self.replaceAct.setStatusTip(QApplication.translate('ViewManager', - 'Replace some text')) - self.replaceAct.setWhatsThis(QApplication.translate('ViewManager', + self.replaceAct.setStatusTip(QApplication.translate( + 'ViewManager', 'Replace some text')) + self.replaceAct.setWhatsThis(QApplication.translate( + 'ViewManager', """<b>Replace</b>""" """<p>Search for some text in the current editor and replace""" """ it. A dialog is shown to enter the searchtext, the""" @@ -1906,9 +1956,10 @@ """ Private method to create the Help actions. """ - self.aboutAct = E5Action(self.trUtf8('About'), - self.trUtf8('&About'), - 0, 0, self, 'about_eric') + self.aboutAct = E5Action( + self.trUtf8('About'), + self.trUtf8('&About'), + 0, 0, self, 'about_eric') self.aboutAct.setStatusTip(self.trUtf8( 'Display information about this software')) self.aboutAct.setWhatsThis(self.trUtf8( @@ -1917,8 +1968,10 @@ self.aboutAct.triggered[()].connect(self.__about) self.helpActions.append(self.aboutAct) - self.aboutQtAct = E5Action(self.trUtf8('About Qt'), - self.trUtf8('About &Qt'), 0, 0, self, 'about_qt') + self.aboutQtAct = E5Action( + self.trUtf8('About Qt'), + 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( @@ -1928,7 +1981,8 @@ self.aboutQtAct.triggered[()].connect(self.__aboutQt) self.helpActions.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?'")), @@ -2955,9 +3009,8 @@ return self.clearSearchIndicators() - ok = self.__textEdit.findFirstTarget(word, - False, self.__textEdit.caseSensitive(), True, - 0, 0) + ok = self.__textEdit.findFirstTarget( + word, False, self.__textEdit.caseSensitive(), True, 0, 0) while ok: tgtPos, tgtLen = self.__textEdit.getFoundTarget() self.setSearchIndicator(tgtPos, tgtLen)
--- a/QScintilla/QsciScintillaCompat.py Fri Oct 18 18:00:02 2013 +0200 +++ b/QScintilla/QsciScintillaCompat.py Fri Oct 18 18:42:10 2013 +0200 @@ -82,9 +82,11 @@ """ palette = QApplication.palette() self.SendScintilla(QsciScintilla.SCI_STYLESETFORE, - QsciScintilla.STYLE_DEFAULT, palette.color(QPalette.Text)) + QsciScintilla.STYLE_DEFAULT, + palette.color(QPalette.Text)) self.SendScintilla(QsciScintilla.SCI_STYLESETBACK, - QsciScintilla.STYLE_DEFAULT, palette.color(QPalette.Base)) + QsciScintilla.STYLE_DEFAULT, + palette.color(QPalette.Base)) self.SendScintilla(QsciScintilla.SCI_STYLECLEARALL) self.SendScintilla(QsciScintilla.SCI_CLEARDOCUMENTSTYLE) @@ -100,7 +102,7 @@ rangeLow = list(range(32)) try: rangeHigh = list(range(self.STYLE_LASTPREDEFINED + 1, - self.STYLE_MAX + 1)) + self.STYLE_MAX + 1)) except AttributeError: rangeHigh = list(range(40, 128)) @@ -758,8 +760,8 @@ return (0, 0) def findFirstTarget(self, expr_, re_, cs_, wo_, - begline=-1, begindex=-1, endline=-1, endindex=-1, - ws_=False): + begline=-1, begindex=-1, endline=-1, endindex=-1, + ws_=False): """ Public method to search in a specified range of text without setting the selection. @@ -982,9 +984,9 @@ if mark != QsciScintilla.SC_MARK_EMPTY: self.SendScintilla(QsciScintilla.SCI_MARKERSETFORE, - marknr, QColor(Qt.white)) + marknr, QColor(Qt.white)) self.SendScintilla(QsciScintilla.SCI_MARKERSETBACK, - marknr, QColor(Qt.black)) + marknr, QColor(Qt.black)) def setFolding(self, style, margin=2): """ @@ -1034,39 +1036,39 @@ @param backColor background color (QColor) """ self.SendScintilla(QsciScintilla.SCI_MARKERSETFORE, - QsciScintilla.SC_MARKNUM_FOLDER, foreColor) + QsciScintilla.SC_MARKNUM_FOLDER, foreColor) self.SendScintilla(QsciScintilla.SCI_MARKERSETBACK, - QsciScintilla.SC_MARKNUM_FOLDER, backColor) + QsciScintilla.SC_MARKNUM_FOLDER, backColor) self.SendScintilla(QsciScintilla.SCI_MARKERSETFORE, - QsciScintilla.SC_MARKNUM_FOLDEROPEN, foreColor) + QsciScintilla.SC_MARKNUM_FOLDEROPEN, foreColor) self.SendScintilla(QsciScintilla.SCI_MARKERSETBACK, - QsciScintilla.SC_MARKNUM_FOLDEROPEN, backColor) + QsciScintilla.SC_MARKNUM_FOLDEROPEN, backColor) self.SendScintilla(QsciScintilla.SCI_MARKERSETFORE, - QsciScintilla.SC_MARKNUM_FOLDEROPENMID, foreColor) + QsciScintilla.SC_MARKNUM_FOLDEROPENMID, foreColor) self.SendScintilla(QsciScintilla.SCI_MARKERSETBACK, - QsciScintilla.SC_MARKNUM_FOLDEROPENMID, backColor) + QsciScintilla.SC_MARKNUM_FOLDEROPENMID, backColor) self.SendScintilla(QsciScintilla.SCI_MARKERSETFORE, - QsciScintilla.SC_MARKNUM_FOLDERSUB, foreColor) + QsciScintilla.SC_MARKNUM_FOLDERSUB, foreColor) self.SendScintilla(QsciScintilla.SCI_MARKERSETBACK, - QsciScintilla.SC_MARKNUM_FOLDERSUB, backColor) + QsciScintilla.SC_MARKNUM_FOLDERSUB, backColor) self.SendScintilla(QsciScintilla.SCI_MARKERSETFORE, - QsciScintilla.SC_MARKNUM_FOLDERTAIL, foreColor) + QsciScintilla.SC_MARKNUM_FOLDERTAIL, foreColor) self.SendScintilla(QsciScintilla.SCI_MARKERSETBACK, - QsciScintilla.SC_MARKNUM_FOLDERTAIL, backColor) + QsciScintilla.SC_MARKNUM_FOLDERTAIL, backColor) self.SendScintilla(QsciScintilla.SCI_MARKERSETFORE, - QsciScintilla.SC_MARKNUM_FOLDERMIDTAIL, foreColor) + QsciScintilla.SC_MARKNUM_FOLDERMIDTAIL, foreColor) self.SendScintilla(QsciScintilla.SCI_MARKERSETBACK, - QsciScintilla.SC_MARKNUM_FOLDERMIDTAIL, backColor) + QsciScintilla.SC_MARKNUM_FOLDERMIDTAIL, backColor) self.SendScintilla(QsciScintilla.SCI_MARKERSETFORE, - QsciScintilla.SC_MARKNUM_FOLDEREND, foreColor) + QsciScintilla.SC_MARKNUM_FOLDEREND, foreColor) self.SendScintilla(QsciScintilla.SCI_MARKERSETBACK, - QsciScintilla.SC_MARKNUM_FOLDEREND, backColor) + QsciScintilla.SC_MARKNUM_FOLDEREND, backColor) ########################################################################### # interface methods to the standard keyboard command set @@ -1149,7 +1151,7 @@ self.SendScintilla(QsciScintilla.SCI_AUTOCSETSEPARATOR, ord(self.UserSeparator)) self.SendScintilla(QsciScintilla.SCI_USERLISTSHOW, id, - self._encodeString(self.UserSeparator.join(lst))) + self._encodeString(self.UserSeparator.join(lst))) ########################################################################### # utility methods
--- a/QScintilla/SearchReplaceWidget.py Fri Oct 18 18:00:02 2013 +0200 +++ b/QScintilla/SearchReplaceWidget.py Fri Oct 18 18:42:10 2013 +0200 @@ -139,16 +139,18 @@ self.ui.replacetextCombo.lineEdit().returnPressed.connect( self.on_replaceButton_clicked) - self.findNextAct = E5Action(self.trUtf8('Find Next'), - self.trUtf8('Find Next'), - 0, 0, self, 'search_widget_find_next') + self.findNextAct = E5Action( + self.trUtf8('Find Next'), + self.trUtf8('Find Next'), + 0, 0, self, 'search_widget_find_next') self.findNextAct.triggered[()].connect(self.on_findNextButton_clicked) self.findNextAct.setEnabled(False) self.ui.findtextCombo.addAction(self.findNextAct) - self.findPrevAct = E5Action(self.trUtf8('Find Prev'), - self.trUtf8('Find Prev'), - 0, 0, self, 'search_widget_find_prev') + self.findPrevAct = E5Action( + self.trUtf8('Find Prev'), + self.trUtf8('Find Prev'), + 0, 0, self, 'search_widget_find_prev') self.findPrevAct.triggered[()].connect(self.on_findPrevButton_clicked) self.findPrevAct.setEnabled(False) self.ui.findtextCombo.addAction(self.findPrevAct) @@ -307,11 +309,12 @@ lineFrom, indexFrom, lineTo, indexTo = self.__selectionBoundary() aw.clearSearchIndicators() - ok = aw.findFirstTarget(txt, - self.ui.regexpCheckBox.isChecked(), - self.ui.caseCheckBox.isChecked(), - self.ui.wordCheckBox.isChecked(), - lineFrom, indexFrom, lineTo, indexTo) + ok = aw.findFirstTarget( + txt, + self.ui.regexpCheckBox.isChecked(), + self.ui.caseCheckBox.isChecked(), + self.ui.wordCheckBox.isChecked(), + lineFrom, indexFrom, lineTo, indexTo) while ok: tgtPos, tgtLen = aw.getFoundTarget() if tgtLen == 0: @@ -400,7 +403,8 @@ index = indexTo if ok: - ok = aw.findFirst(txt, + ok = aw.findFirst( + txt, self.ui.regexpCheckBox.isChecked(), self.ui.caseCheckBox.isChecked(), self.ui.wordCheckBox.isChecked(), @@ -450,7 +454,8 @@ break else: break - ok = aw.findFirst(txt, + ok = aw.findFirst( + txt, self.ui.regexpCheckBox.isChecked(), self.ui.caseCheckBox.isChecked(), self.ui.wordCheckBox.isChecked(), @@ -475,7 +480,8 @@ line, index = boundary[2:] else: line, index = boundary[:2] - ok = aw.findFirst(txt, + ok = aw.findFirst( + txt, self.ui.regexpCheckBox.isChecked(), self.ui.caseCheckBox.isChecked(), self.ui.wordCheckBox.isChecked(), @@ -495,11 +501,11 @@ else: ok = False elif (lineFrom == boundary[0] and \ - indexFrom >= boundary[1]) or \ - (lineFrom > boundary[0] and \ - lineFrom < boundary[2]) or \ - (lineFrom == boundary[2] \ - and indexFrom <= boundary[3]): + indexFrom >= boundary[1]) or \ + (lineFrom > boundary[0] and \ + lineFrom < boundary[2]) or \ + (lineFrom == boundary[2] \ + and indexFrom <= boundary[3]): ok = True else: ok = False @@ -670,11 +676,12 @@ else: line = 0 index = 0 - ok = aw.findFirst(ftxt, - self.ui.regexpCheckBox.isChecked(), - self.ui.caseCheckBox.isChecked(), - self.ui.wordCheckBox.isChecked(), - False, True, line, index) + ok = aw.findFirst( + ftxt, + self.ui.regexpCheckBox.isChecked(), + self.ui.caseCheckBox.isChecked(), + self.ui.wordCheckBox.isChecked(), + False, True, line, index) if ok and self.ui.selectionCheckBox.isChecked(): lineFrom, indexFrom, lineTo, indexTo = aw.getSelection() @@ -708,11 +715,12 @@ break else: break - ok = aw.findFirst(ftxt, - self.ui.regexpCheckBox.isChecked(), - self.ui.caseCheckBox.isChecked(), - self.ui.wordCheckBox.isChecked(), - False, True, line, index) + ok = aw.findFirst( + ftxt, + self.ui.regexpCheckBox.isChecked(), + self.ui.caseCheckBox.isChecked(), + self.ui.wordCheckBox.isChecked(), + False, True, line, index) if ok: lineFrom, indexFrom, lineTo, indexTo = \ aw.getSelection()
--- a/QScintilla/Shell.py Fri Oct 18 18:00:02 2013 +0200 +++ b/QScintilla/Shell.py Fri Oct 18 18:42:10 2013 +0200 @@ -223,8 +223,8 @@ self.menu.addSeparator() self.menu.addAction(self.trUtf8('Clear'), self.clear) self.menu.addAction(self.trUtf8('Reset'), self.__reset) - self.menu.addAction(self.trUtf8('Reset and Clear'), - self.__resetAndClear) + self.menu.addAction( + self.trUtf8('Reset and Clear'), self.__resetAndClear) self.menu.addSeparator() self.menu.addMenu(self.lmenu) self.menu.addSeparator() @@ -1654,8 +1654,8 @@ only (boolean) """ self.__lastSearch = (txt, caseSensitive, wholeWord) - ok = self.findFirst(txt, False, caseSensitive, wholeWord, False, - forward=True) + ok = self.findFirst( + txt, False, caseSensitive, wholeWord, False, forward=True) self.searchStringFound.emit(ok) def __searchPrev(self): @@ -1680,7 +1680,7 @@ line, index = self.getSelection()[:2] else: line, index = -1, -1 - ok = self.findFirst(txt, False, caseSensitive, wholeWord, False, - forward=False, - line=line, index=index) + ok = self.findFirst( + txt, False, caseSensitive, wholeWord, False, + forward=False, line=line, index=index) self.searchStringFound.emit(ok)
--- a/QScintilla/ShellHistoryDialog.py Fri Oct 18 18:00:02 2013 +0200 +++ b/QScintilla/ShellHistoryDialog.py Fri Oct 18 18:42:10 2013 +0200 @@ -31,8 +31,8 @@ self.setupUi(self) self.historyList.addItems(history) - self.historyList.setCurrentRow(self.historyList.count() - 1, - QItemSelectionModel.Clear) + self.historyList.setCurrentRow( + self.historyList.count() - 1, QItemSelectionModel.Clear) self.historyList.scrollToItem(self.historyList.currentItem()) self.vm = vm @@ -113,8 +113,8 @@ history = self.shell.getHistory(None) self.historyList.clear() self.historyList.addItems(history) - self.historyList.setCurrentRow(self.historyList.count() - 1, - QItemSelectionModel.Clear) + self.historyList.setCurrentRow( + self.historyList.count() - 1, QItemSelectionModel.Clear) self.historyList.scrollToItem(self.historyList.currentItem()) def getHistory(self):
--- a/Snapshot/SnapWidget.py Fri Oct 18 18:00:02 2013 +0200 +++ b/Snapshot/SnapWidget.py Fri Oct 18 18:42:10 2013 +0200 @@ -72,7 +72,8 @@ Preferences.Prefs.settings.value("Snapshot/Delay", 0)) self.delaySpin.setValue(self.__delay) - self.__filename = Preferences.Prefs.settings.value("Snapshot/Filename", + self.__filename = Preferences.Prefs.settings.value( + "Snapshot/Filename", os.path.join( QDesktopServices.storageLocation( QDesktopServices.PicturesLocation), @@ -145,23 +146,25 @@ self.__quitShortcut = QShortcut( QKeySequence(QKeySequence.Quit), self, self.close) - self.__copyShortcut = QShortcut(QKeySequence(QKeySequence.Copy), self, + self.__copyShortcut = QShortcut( + QKeySequence(QKeySequence.Copy), self, self.copyButton.animateClick) - self.__quickSaveShortcut = QShortcut(QKeySequence(Qt.Key_Q), self, - self.__quickSave) + self.__quickSaveShortcut = QShortcut( + QKeySequence(Qt.Key_Q), self, self.__quickSave) - self.__save1Shortcut = QShortcut(QKeySequence(QKeySequence.Save), self, - self.saveButton.animateClick) - self.__save2Shortcut = QShortcut(QKeySequence(Qt.Key_S), self, + self.__save1Shortcut = QShortcut( + QKeySequence(QKeySequence.Save), self, self.saveButton.animateClick) + self.__save2Shortcut = QShortcut( + QKeySequence(Qt.Key_S), self, self.saveButton.animateClick) - self.__grab1Shortcut = QShortcut(QKeySequence(QKeySequence.New), self, - self.takeButton.animateClick) - self.__grab2Shortcut = QShortcut(QKeySequence(Qt.Key_N), self, - self.takeButton.animateClick) - self.__grab3Shortcut = QShortcut(QKeySequence(Qt.Key_Space), self, - self.takeButton.animateClick) + self.__grab1Shortcut = QShortcut( + QKeySequence(QKeySequence.New), self, self.takeButton.animateClick) + self.__grab2Shortcut = QShortcut( + QKeySequence(Qt.Key_N), self, self.takeButton.animateClick) + self.__grab3Shortcut = QShortcut( + QKeySequence(Qt.Key_Space), self, self.takeButton.animateClick) def __quickSave(self): """
--- a/Snapshot/SnapshotFreehandGrabber.py Fri Oct 18 18:00:02 2013 +0200 +++ b/Snapshot/SnapshotFreehandGrabber.py Fri Oct 18 18:42:10 2013 +0200 @@ -48,7 +48,8 @@ """ Constructor """ - super().__init__(None, + super().__init__( + None, Qt.X11BypassWindowManagerHint | Qt.WindowStaysOnTopHint | Qt.FramelessWindowHint | Qt.Tool) @@ -85,7 +86,8 @@ self.__desktop.winId(), x, y, self.__desktop.width(), self.__desktop.height()) else: - self.__pixmap = QPixmap.grabWindow(self.__desktop.winId(), x, y, + self.__pixmap = QPixmap.grabWindow( + self.__desktop.winId(), x, y, self.__desktop.width(), self.__desktop.height()) self.resize(self.__pixmap.size()) self.move(x, y) @@ -146,7 +148,8 @@ self.__helpTextRect.adjust(-2, -2, 4, 2) drawPolygon(painter, self.__helpTextRect, textColor, textBackgroundColor) - painter.drawText(self.__helpTextRect.adjusted(3, 3, -3, -3), + painter.drawText( + self.__helpTextRect.adjusted(3, 3, -3, -3), Qt.TextWordWrap, self.__helpText) if self.__selection.isEmpty():
--- a/Snapshot/SnapshotRegionGrabber.py Fri Oct 18 18:00:02 2013 +0200 +++ b/Snapshot/SnapshotRegionGrabber.py Fri Oct 18 18:42:10 2013 +0200 @@ -57,7 +57,8 @@ @param mode region grabber mode (SnapshotRegionGrabber.Rectangle or SnapshotRegionGrabber.Ellipse) """ - super().__init__(None, + super().__init__( + None, Qt.X11BypassWindowManagerHint | Qt.WindowStaysOnTopHint | Qt.FramelessWindowHint | Qt.Tool) @@ -113,7 +114,8 @@ self.__desktop.winId(), x, y, self.__desktop.width(), self.__desktop.height()) else: - self.__pixmap = QPixmap.grabWindow(self.__desktop.winId(), x, y, + self.__pixmap = QPixmap.grabWindow( + self.__desktop.winId(), x, y, self.__desktop.width(), self.__desktop.height()) self.resize(self.__pixmap.size()) self.move(x, y) @@ -169,7 +171,8 @@ self.__helpTextRect.adjust(-2, -2, 4, 2) drawRect(painter, self.__helpTextRect, textColor, textBackgroundColor) - painter.drawText(self.__helpTextRect.adjusted(3, 3, -3, -3), + painter.drawText( + self.__helpTextRect.adjusted(3, 3, -3, -3), Qt.TextWordWrap, self.__helpText) if self.__selection.isNull(): @@ -294,8 +297,8 @@ s = self.__selectionBeforeDrag.normalized() p = s.topLeft() + evt.pos() - self.__dragStartPoint r.setBottomRight( - r.bottomRight() - QPoint(s.width(), - s.height()) + QPoint(1, 1)) + r.bottomRight() - QPoint(s.width(), s.height()) + + QPoint(1, 1)) if not r.isNull() and r.isValid(): self.__selection.moveTo(self.__limitPointToRect(p, r)) else:
--- a/Snapshot/SnapshotTimer.py Fri Oct 18 18:00:02 2013 +0200 +++ b/Snapshot/SnapshotTimer.py Fri Oct 18 18:42:10 2013 +0200 @@ -99,7 +99,8 @@ painter.setBrush(textBackgroundColor) helpText = self.trUtf8("Snapshot will be taken in %n seconds", "", self.__length - self.__time) - textRect = painter.boundingRect(self.rect().adjusted(2, 2, -2, -2), + textRect = painter.boundingRect( + self.rect().adjusted(2, 2, -2, -2), Qt.AlignHCenter | Qt.TextSingleLine, helpText) painter.drawText(textRect, Qt.AlignHCenter | Qt.TextSingleLine, helpText) @@ -113,8 +114,8 @@ screenGeom = QApplication.desktop().screenGeometry() if self.x() == screenGeom.left(): self.move( - screenGeom.x() + (screenGeom.width() // 2 - \ - self.size().width() // 2), + screenGeom.x() + + (screenGeom.width() // 2 - self.size().width() // 2), screenGeom.top()) else: self.move(screenGeom.topLeft())
--- a/SqlBrowser/SqlBrowser.py Fri Oct 18 18:00:02 2013 +0200 +++ b/SqlBrowser/SqlBrowser.py Fri Oct 18 18:42:10 2013 +0200 @@ -94,7 +94,8 @@ # list of all actions self.__actions = [] - self.addConnectionAct = E5Action(self.trUtf8('Add Connection'), + self.addConnectionAct = E5Action( + self.trUtf8('Add Connection'), UI.PixmapCache.getIcon("databaseConnection.png"), self.trUtf8('Add &Connection...'), 0, 0, self, 'sql_file_add_connection') @@ -109,7 +110,8 @@ self.__browser.addConnectionByDialog) self.__actions.append(self.addConnectionAct) - 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")), @@ -121,7 +123,8 @@ )) self.exitAct.triggered[()].connect(qApp.closeAllWindows) - self.aboutAct = E5Action(self.trUtf8('About'), + self.aboutAct = E5Action( + self.trUtf8('About'), self.trUtf8('&About'), 0, 0, self, 'sql_help_about') self.aboutAct.setStatusTip(self.trUtf8( @@ -133,7 +136,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, 'sql_help_about_qt') self.aboutQtAct.setStatusTip(
--- a/Tasks/TaskViewer.py Fri Oct 18 18:00:02 2013 +0200 +++ b/Tasks/TaskViewer.py Fri Oct 18 18:42:10 2013 +0200 @@ -53,8 +53,9 @@ self.setItemsExpandable(False) self.setSortingEnabled(True) - self.__headerItem = QTreeWidgetItem(["", "", self.trUtf8("Summary"), - self.trUtf8("Filename"), self.trUtf8("Line"), ""]) + self.__headerItem = QTreeWidgetItem( + ["", "", self.trUtf8("Summary"), self.trUtf8("Filename"), + self.trUtf8("Line"), ""]) self.__headerItem.setIcon( 0, UI.PixmapCache.getIcon("taskCompleted.png")) self.__headerItem.setIcon( @@ -265,8 +266,8 @@ @param description explanatory text of the task (string) """ task = Task(summary, priority, filename, lineno, completed, - _time, isProjectTask, taskType, - self.project, description) + _time, isProjectTask, taskType, + self.project, description) self.tasks.append(task) if self.taskFilter.showTask(task): self.addTopLevelItem(task) @@ -541,7 +542,8 @@ self.clearProjectTasks(fileOnly=True) # now process them - progress = QProgressDialog(self.trUtf8("Extracting project tasks..."), + progress = QProgressDialog( + self.trUtf8("Extracting project tasks..."), self.trUtf8("Abort"), 0, len(files)) progress.setMinimumDuration(0) count = 0
--- a/Toolbox/Startup.py Fri Oct 18 18:00:02 2013 +0200 +++ b/Toolbox/Startup.py Fri Oct 18 18:42:10 2013 +0200 @@ -186,7 +186,7 @@ def simpleAppStartup(argv, appinfo, mwFactory, quitOnLastWindowClosed=True, - app=None, raiseIt=True, installErrorHandler=False): + app=None, raiseIt=True, installErrorHandler=False): """ Module function to start up an application that doesn't need a specialized start up.
--- a/Tools/TRPreviewer.py Fri Oct 18 18:00:02 2013 +0200 +++ b/Tools/TRPreviewer.py Fri Oct 18 18:42:10 2013 +0200 @@ -155,8 +155,9 @@ """ Private method to define the user interface actions. """ - self.openUIAct = QAction(UI.PixmapCache.getIcon("openUI.png"), - self.trUtf8('&Open UI Files...'), self) + self.openUIAct = QAction( + UI.PixmapCache.getIcon("openUI.png"), + self.trUtf8('&Open UI Files...'), self) self.openUIAct.setStatusTip(self.trUtf8('Open UI files for display')) self.openUIAct.setWhatsThis(self.trUtf8( """<b>Open UI Files</b>""" @@ -164,8 +165,9 @@ )) self.openUIAct.triggered[()].connect(self.__openWidget) - self.openQMAct = QAction(UI.PixmapCache.getIcon("openQM.png"), - self.trUtf8('Open &Translation Files...'), self) + self.openQMAct = QAction( + UI.PixmapCache.getIcon("openQM.png"), + self.trUtf8('Open &Translation Files...'), self) self.openQMAct.setStatusTip(self.trUtf8( 'Open Translation files for display')) self.openQMAct.setWhatsThis(self.trUtf8( @@ -174,8 +176,9 @@ )) self.openQMAct.triggered[()].connect(self.__openTranslation) - self.reloadAct = QAction(UI.PixmapCache.getIcon("reload.png"), - self.trUtf8('&Reload Translations'), self) + self.reloadAct = QAction( + UI.PixmapCache.getIcon("reload.png"), + self.trUtf8('&Reload Translations'), self) self.reloadAct.setStatusTip(self.trUtf8( 'Reload the loaded translations')) self.reloadAct.setWhatsThis(self.trUtf8( @@ -185,8 +188,8 @@ )) self.reloadAct.triggered[()].connect(self.translations.reload) - self.exitAct = QAction(UI.PixmapCache.getIcon("exit.png"), - self.trUtf8('&Quit'), self) + self.exitAct = QAction( + UI.PixmapCache.getIcon("exit.png"), self.trUtf8('&Quit'), self) self.exitAct.setShortcut(QKeySequence( self.trUtf8("Ctrl+Q", "File|Quit"))) self.exitAct.setStatusTip(self.trUtf8('Quit the application')) @@ -196,8 +199,9 @@ )) self.exitAct.triggered[()].connect(qApp.closeAllWindows) - self.whatsThisAct = QAction(UI.PixmapCache.getIcon("whatsThis.png"), - self.trUtf8('&What\'s This?'), self) + self.whatsThisAct = QAction( + UI.PixmapCache.getIcon("whatsThis.png"), + self.trUtf8('&What\'s This?'), self) self.whatsThisAct.setShortcut(QKeySequence(self.trUtf8("Shift+F1"))) self.whatsThisAct.setStatusTip(self.trUtf8('Context sensitive help')) self.whatsThisAct.setWhatsThis(self.trUtf8( @@ -246,8 +250,8 @@ )) self.cascadeAct.triggered[()].connect(self.preview.cascadeSubWindows) - self.closeAct = QAction(UI.PixmapCache.getIcon("close.png"), - self.trUtf8('&Close'), self) + self.closeAct = QAction( + UI.PixmapCache.getIcon("close.png"), self.trUtf8('&Close'), self) self.closeAct.setShortcut(QKeySequence(self.trUtf8( "Ctrl+W", "File|Close"))) self.closeAct.setStatusTip(self.trUtf8('Close the current window')) @@ -474,7 +478,8 @@ E5MessageBox.warning( self.parent(), self.trUtf8("Set Translator"), - self.trUtf8("""<p>The translation filename <b>{0}</b>""" + self.trUtf8( + """<p>The translation filename <b>{0}</b>""" """ is invalid.</p>""").format(fileName)) return
--- a/Tools/TrayStarter.py Fri Oct 18 18:00:02 2013 +0200 +++ b/Tools/TrayStarter.py Fri Oct 18 18:42:10 2013 +0200 @@ -39,7 +39,8 @@ self.maxMenuFilePathLen = 75 - self.rsettings = QSettings(QSettings.IniFormat, + self.rsettings = QSettings( + QSettings.IniFormat, QSettings.UserScope, Globals.settingsNameOrganization, Globals.settingsNameRecent) @@ -84,63 +85,80 @@ self.trUtf8("Python re editor"), self.__startPyRe) self.__menu.addSeparator() - self.__menu.addAction(UI.PixmapCache.getIcon("uiPreviewer.png"), + self.__menu.addAction( + UI.PixmapCache.getIcon("uiPreviewer.png"), self.trUtf8("UI Previewer"), self.__startUIPreviewer) - self.__menu.addAction(UI.PixmapCache.getIcon("trPreviewer.png"), + self.__menu.addAction( + UI.PixmapCache.getIcon("trPreviewer.png"), self.trUtf8("Translations Previewer"), self.__startTRPreviewer) - self.__menu.addAction(UI.PixmapCache.getIcon("unittest.png"), + self.__menu.addAction( + UI.PixmapCache.getIcon("unittest.png"), self.trUtf8("Unittest"), self.__startUnittest) - self.__menu.addAction(UI.PixmapCache.getIcon("ericWeb.png"), + self.__menu.addAction( + UI.PixmapCache.getIcon("ericWeb.png"), self.trUtf8("eric5 Web Browser"), self.__startHelpViewer) self.__menu.addSeparator() - self.__menu.addAction(UI.PixmapCache.getIcon("diffFiles.png"), + self.__menu.addAction( + UI.PixmapCache.getIcon("diffFiles.png"), self.trUtf8("Compare Files"), self.__startDiff) - self.__menu.addAction(UI.PixmapCache.getIcon("compareFiles.png"), + self.__menu.addAction( + UI.PixmapCache.getIcon("compareFiles.png"), self.trUtf8("Compare Files side by side"), self.__startCompare) self.__menu.addSeparator() - self.__menu.addAction(UI.PixmapCache.getIcon("sqlBrowser.png"), + self.__menu.addAction( + UI.PixmapCache.getIcon("sqlBrowser.png"), self.trUtf8("SQL Browser"), self.__startSqlBrowser) self.__menu.addSeparator() - self.__menu.addAction(UI.PixmapCache.getIcon("ericSnap.png"), + self.__menu.addAction( + UI.PixmapCache.getIcon("ericSnap.png"), self.trUtf8("Snapshot"), self.__startSnapshot) - self.__menu.addAction(UI.PixmapCache.getIcon("iconEditor.png"), + self.__menu.addAction( + UI.PixmapCache.getIcon("iconEditor.png"), self.trUtf8("Icon Editor"), self.__startIconEditor) self.__menu.addSeparator() - self.__menu.addAction(UI.PixmapCache.getIcon("pluginInstall.png"), + self.__menu.addAction( + UI.PixmapCache.getIcon("pluginInstall.png"), self.trUtf8("Install Plugin"), self.__startPluginInstall) - self.__menu.addAction(UI.PixmapCache.getIcon("pluginUninstall.png"), + self.__menu.addAction( + UI.PixmapCache.getIcon("pluginUninstall.png"), self.trUtf8("Uninstall Plugin"), self.__startPluginUninstall) - self.__menu.addAction(UI.PixmapCache.getIcon("pluginRepository.png"), + self.__menu.addAction( + UI.PixmapCache.getIcon("pluginRepository.png"), self.trUtf8("Plugin Repository"), self.__startPluginRepository) self.__menu.addSeparator() - self.__menu.addAction(UI.PixmapCache.getIcon("configure.png"), + self.__menu.addAction( + UI.PixmapCache.getIcon("configure.png"), self.trUtf8('Preferences'), self.__startPreferences) - self.__menu.addAction(UI.PixmapCache.getIcon("erict.png"), + self.__menu.addAction( + UI.PixmapCache.getIcon("erict.png"), self.trUtf8("eric5 IDE"), self.__startEric) - self.__menu.addAction(UI.PixmapCache.getIcon("editor.png"), + self.__menu.addAction( + UI.PixmapCache.getIcon("editor.png"), self.trUtf8("eric5 Mini Editor"), self.__startMiniEditor) self.__menu.addSeparator() - self.__menu.addAction(UI.PixmapCache.getIcon("configure.png"), + self.__menu.addAction( + UI.PixmapCache.getIcon("configure.png"), self.trUtf8('Configure Tray Starter'), self.__showPreferences) self.__menu.addSeparator() # recent files self.menuRecentFilesAct = self.__menu.addMenu(self.recentFilesMenu) # recent multi projects - self.menuRecentMultiProjectsAct = \ - self.__menu.addMenu(self.recentMultiProjectsMenu) + self.menuRecentMultiProjectsAct = self.__menu.addMenu( + self.recentMultiProjectsMenu) # recent projects self.menuRecentProjectsAct = self.__menu.addMenu( self.recentProjectsMenu) self.__menu.addSeparator() - self.__menu.addAction(UI.PixmapCache.getIcon("exit.png"), + self.__menu.addAction( + UI.PixmapCache.getIcon("exit.png"), self.trUtf8('Quit'), qApp.quit) def __loadRecentProjects(self): @@ -364,8 +382,8 @@ else: formatStr = '{0:d}. {1}' act = self.recentProjectsMenu.addAction( - formatStr.format(idx, - Utilities.compactPath(rp, self.maxMenuFilePathLen))) + formatStr.format( + idx, Utilities.compactPath(rp, self.maxMenuFilePathLen))) act.setData(rp) idx += 1 @@ -386,8 +404,8 @@ else: formatStr = '{0:d}. {1}' act = self.recentMultiProjectsMenu.addAction( - formatStr.format(idx, - Utilities.compactPath(rmp, self.maxMenuFilePathLen))) + formatStr.format( + idx, Utilities.compactPath(rmp, self.maxMenuFilePathLen))) act.setData(rmp) idx += 1 @@ -408,8 +426,8 @@ else: formatStr = '{0:d}. {1}' act = self.recentFilesMenu.addAction( - formatStr.format(idx, - Utilities.compactPath(rf, self.maxMenuFilePathLen))) + formatStr.format( + idx, Utilities.compactPath(rf, self.maxMenuFilePathLen))) act.setData(rf) idx += 1
--- a/Tools/UIPreviewer.py Fri Oct 18 18:00:02 2013 +0200 +++ b/Tools/UIPreviewer.py Fri Oct 18 18:42:10 2013 +0200 @@ -124,8 +124,9 @@ """ Private method to define the user interface actions. """ - self.openAct = QAction(UI.PixmapCache.getIcon("openUI.png"), - self.trUtf8('&Open File'), self) + self.openAct = QAction( + UI.PixmapCache.getIcon("openUI.png"), + self.trUtf8('&Open File'), self) self.openAct.setShortcut( QKeySequence(self.trUtf8("Ctrl+O", "File|Open"))) self.openAct.setStatusTip(self.trUtf8('Open a UI file for display')) @@ -135,8 +136,9 @@ )) self.openAct.triggered[()].connect(self.__openFile) - self.printAct = QAction(UI.PixmapCache.getIcon("print.png"), - self.trUtf8('&Print'), self) + self.printAct = QAction( + UI.PixmapCache.getIcon("print.png"), + self.trUtf8('&Print'), self) self.printAct.setShortcut( QKeySequence(self.trUtf8("Ctrl+P", "File|Print"))) self.printAct.setStatusTip(self.trUtf8('Print a screen capture')) @@ -157,8 +159,9 @@ )) self.printPreviewAct.triggered[()].connect(self.__printPreviewImage) - self.imageAct = QAction(UI.PixmapCache.getIcon("screenCapture.png"), - self.trUtf8('&Screen Capture'), self) + self.imageAct = QAction( + UI.PixmapCache.getIcon("screenCapture.png"), + self.trUtf8('&Screen Capture'), self) self.imageAct.setShortcut( QKeySequence(self.trUtf8("Ctrl+S", "File|Screen Capture"))) self.imageAct.setStatusTip(self.trUtf8( @@ -169,8 +172,8 @@ )) self.imageAct.triggered[()].connect(self.__saveImage) - self.exitAct = QAction(UI.PixmapCache.getIcon("exit.png"), - self.trUtf8('&Quit'), self) + self.exitAct = QAction( + UI.PixmapCache.getIcon("exit.png"), self.trUtf8('&Quit'), self) self.exitAct.setShortcut( QKeySequence(self.trUtf8("Ctrl+Q", "File|Quit"))) self.exitAct.setStatusTip(self.trUtf8('Quit the application')) @@ -180,8 +183,8 @@ )) self.exitAct.triggered[()].connect(qApp.closeAllWindows) - self.copyAct = QAction(UI.PixmapCache.getIcon("editCopy.png"), - self.trUtf8('&Copy'), self) + self.copyAct = QAction( + UI.PixmapCache.getIcon("editCopy.png"), self.trUtf8('&Copy'), self) self.copyAct.setShortcut( QKeySequence(self.trUtf8("Ctrl+C", "Edit|Copy"))) self.copyAct.setStatusTip( @@ -192,8 +195,9 @@ )) self.copyAct.triggered[()].connect(self.__copyImageToClipboard) - self.whatsThisAct = QAction(UI.PixmapCache.getIcon("whatsThis.png"), - self.trUtf8('&What\'s This?'), self) + self.whatsThisAct = QAction( + UI.PixmapCache.getIcon("whatsThis.png"), + self.trUtf8('&What\'s This?'), self) self.whatsThisAct.setShortcut(QKeySequence(self.trUtf8("Shift+F1"))) self.whatsThisAct.setStatusTip(self.trUtf8('Context sensitive help')) self.whatsThisAct.setWhatsThis(self.trUtf8( @@ -383,8 +387,8 @@ self.lastQStyle = qstyle self.lastStyle = sstyle - Preferences.Prefs.settings.setValue('UIPreviewer/style', - self.styleCombo.currentIndex()) + Preferences.Prefs.settings.setValue( + 'UIPreviewer/style', self.styleCombo.currentIndex()) QApplication.restoreOverrideCursor() def __updateActions(self):
--- a/UI/Browser.py Fri Oct 18 18:00:02 2013 +0200 +++ b/UI/Browser.py Fri Oct 18 18:42:10 2013 +0200 @@ -187,8 +187,8 @@ """ # create the popup menu for source files self.sourceMenu = QMenu(self) - self.sourceMenu.addAction(QApplication.translate('Browser', 'Open'), - self._openItem) + self.sourceMenu.addAction( + QApplication.translate('Browser', 'Open'), self._openItem) self.unittestAct = self.sourceMenu.addAction( QApplication.translate('Browser', 'Run unittest...'), self.handleUnittest) @@ -214,8 +214,8 @@ # create the menu for multiple selected files self.multiMenu = QMenu(self) - self.multiMenu.addAction(QApplication.translate('Browser', 'Open'), - self._openItem) + self.multiMenu.addAction( + QApplication.translate('Browser', 'Open'), self._openItem) if self.__embeddedBrowser in [1, 2]: self.multiMenu.addSeparator() self.multiMenu.addAction( @@ -224,8 +224,8 @@ # create the directory menu self.dirMenu = QMenu(self) - self.dirMenu.addAction(QApplication.translate('Browser', - 'New toplevel directory...'), + self.dirMenu.addAction( + QApplication.translate('Browser', 'New toplevel directory...'), self.__newToplevelDir) self.addAsTopLevelAct = self.dirMenu.addAction( QApplication.translate('Browser', 'Add as toplevel directory'), @@ -234,15 +234,16 @@ QApplication.translate('Browser', 'Remove from toplevel'), self.__removeToplevel) self.dirMenu.addSeparator() - self.dirMenu.addAction(QApplication.translate('Browser', - 'Refresh directory'), + self.dirMenu.addAction( + QApplication.translate('Browser', 'Refresh directory'), self.__refreshDirectory) self.dirMenu.addSeparator() - self.dirMenu.addAction(QApplication.translate('Browser', - 'Find in this directory'), + self.dirMenu.addAction( + QApplication.translate('Browser', 'Find in this directory'), self.__findInDirectory) - self.dirMenu.addAction(QApplication.translate('Browser', - 'Find&&Replace in this directory'), + self.dirMenu.addAction( + QApplication.translate( + 'Browser', 'Find&&Replace in this directory'), self.__replaceInDirectory) self.dirMenu.addAction( QApplication.translate('Browser', 'Copy Path to Clipboard'), @@ -259,8 +260,8 @@ self.gotoMenu.triggered.connect(self._gotoAttribute) self.attributeMenu = QMenu(self) - self.attributeMenu.addAction(QApplication.translate('Browser', - 'New toplevel directory...'), + self.attributeMenu.addAction( + QApplication.translate('Browser', 'New toplevel directory...'), self.__newToplevelDir) self.attributeMenu.addSeparator() self.attributeMenu.addMenu(self.gotoMenu) @@ -272,8 +273,8 @@ # create the background menu self.backMenu = QMenu(self) - self.backMenu.addAction(QApplication.translate('Browser', - 'New toplevel directory...'), + self.backMenu.addAction( + QApplication.translate('Browser', 'New toplevel directory...'), self.__newToplevelDir) if self.__embeddedBrowser in [1, 2]: self.backMenu.addSeparator() @@ -426,14 +427,14 @@ else: QDesktopServices.openUrl(QUrl(itm.fileName())) elif isinstance(itm, BrowserClassItem): - self.sourceFile[str, int].emit(itm.fileName(), - itm.classObject().lineno) + self.sourceFile[str, int].emit( + itm.fileName(), itm.classObject().lineno) elif isinstance(itm, BrowserMethodItem): - self.sourceFile[str, int].emit(itm.fileName(), - itm.functionObject().lineno) + self.sourceFile[str, int].emit( + itm.fileName(), itm.functionObject().lineno) elif isinstance(itm, BrowserClassAttributeItem): - self.sourceFile[str, int].emit(itm.fileName(), - itm.attributeObject().lineno) + self.sourceFile[str, int].emit( + itm.fileName(), itm.attributeObject().lineno) self._activating = False def _editPixmap(self):
--- a/UI/BrowserModel.py Fri Oct 18 18:00:02 2013 +0200 +++ b/UI/BrowserModel.py Fri Oct 18 18:42:10 2013 +0200 @@ -312,14 +312,16 @@ continue cnt = itm.childCount() - self.beginInsertRows(self.createIndex(itm.row(), 0, itm), - cnt, cnt) + self.beginInsertRows( + self.createIndex(itm.row(), 0, itm), cnt, cnt) if f.isDir(): - node = BrowserDirectoryItem(itm, + node = BrowserDirectoryItem( + itm, Utilities.toNativeSeparators(f.absoluteFilePath()), False) else: - node = BrowserFileItem(itm, + node = BrowserFileItem( + itm, Utilities.toNativeSeparators(f.absoluteFilePath())) self._addItem(node, itm) self.endInsertRows() @@ -339,8 +341,8 @@ continue self._removeWatchedItem(child) - self.beginRemoveRows(self.createIndex(itm.row(), 0, itm), - row, row) + self.beginRemoveRows( + self.createIndex(itm.row(), 0, itm), row, row) itm.removeChild(child) self.endRemoveRows() @@ -421,8 +423,8 @@ """ Public slot to save the toplevel directories. """ - Preferences.Prefs.settings.setValue('BrowserModel/ToplevelDirs', - self.toplevelDirs) + Preferences.Prefs.settings.setValue( + 'BrowserModel/ToplevelDirs', self.toplevelDirs) def _addItem(self, itm, parentItem): """ @@ -494,7 +496,8 @@ 0, len(entryInfoList) - 1) for f in entryInfoList: if f.isDir(): - node = BrowserDirectoryItem(parentItem, + node = BrowserDirectoryItem( + parentItem, Utilities.toNativeSeparators(f.absoluteFilePath()), False) else: @@ -505,7 +508,8 @@ if any([fnmatch.fnmatch(fn, ff.strip()) for ff in fileFilters]): continue - node = BrowserFileItem(parentItem, + node = BrowserFileItem( + parentItem, Utilities.toNativeSeparators(f.absoluteFilePath())) self._addItem(node, parentItem) if repopulate: @@ -567,12 +571,14 @@ except AttributeError: pass if "@@Coding@@" in keys: - node = BrowserCodingItem(parentItem, + node = BrowserCodingItem( + parentItem, QApplication.translate("BrowserModel", "Coding: {0}")\ .format(dict["@@Coding@@"].coding)) self._addItem(node, parentItem) if "@@Globals@@" in keys: - node = BrowserClassAttributesItem(parentItem, + node = BrowserClassAttributesItem( + parentItem, dict["@@Globals@@"].globals, QApplication.translate("BrowserModel", "Globals")) self._addItem(node, parentItem) @@ -619,8 +625,8 @@ parentItem, cl.attributes, QApplication.translate("BrowserModel", "Attributes")) if repopulate: - self.addItem(node, - self.createIndex(parentItem.row(), 0, parentItem)) + self.addItem( + node, self.createIndex(parentItem.row(), 0, parentItem)) else: self._addItem(node, parentItem) @@ -630,8 +636,8 @@ QApplication.translate("BrowserModel", "Class Attributes"), True) if repopulate: - self.addItem(node, - self.createIndex(parentItem.row(), 0, parentItem)) + self.addItem( + node, self.createIndex(parentItem.row(), 0, parentItem)) else: self._addItem(node, parentItem)
--- a/UI/CompareDialog.py Fri Oct 18 18:00:02 2013 +0200 +++ b/UI/CompareDialog.py Fri Oct 18 18:42:10 2013 +0200 @@ -341,9 +341,11 @@ self.vsb2.setValue(0) self.firstButton.setEnabled(False) self.upButton.setEnabled(False) - self.downButton.setEnabled(len(self.diffParas) > 0 and + self.downButton.setEnabled( + len(self.diffParas) > 0 and (self.vsb1.isVisible() or self.vsb2.isVisible())) - self.lastButton.setEnabled(len(self.diffParas) > 0 and + self.lastButton.setEnabled( + len(self.diffParas) > 0 and (self.vsb1.isVisible() or self.vsb2.isVisible())) self.totalLabel.setText(self.trUtf8('Total: {0}')\
--- a/UI/DiffDialog.py Fri Oct 18 18:00:02 2013 +0200 +++ b/UI/DiffDialog.py Fri Oct 18 18:42:10 2013 +0200 @@ -399,7 +399,7 @@ self.contents.insertPlainText(txt) def __generateUnifiedDiff(self, a, b, fromfile, tofile, - fromfiledate, tofiledate): + fromfiledate, tofiledate): """ Private slot to generate a unified diff output. @@ -412,7 +412,7 @@ """ paras = 0 for line in unified_diff(a, b, fromfile, tofile, - fromfiledate, tofiledate): + fromfiledate, tofiledate): if line.startswith('+') or line.startswith('>'): format = self.cAddedFormat elif line.startswith('-') or line.startswith('<'): @@ -431,7 +431,7 @@ self.trUtf8('There is no difference.'), self.cNormalFormat) def __generateContextDiff(self, a, b, fromfile, tofile, - fromfiledate, tofiledate): + fromfiledate, tofiledate): """ Private slot to generate a context diff output. @@ -444,7 +444,7 @@ """ paras = 0 for line in context_diff(a, b, fromfile, tofile, - fromfiledate, tofiledate): + fromfiledate, tofiledate): if line.startswith('+ '): format = self.cAddedFormat elif line.startswith('- '):
--- a/UI/EmailDialog.py Fri Oct 18 18:00:02 2013 +0200 +++ b/UI/EmailDialog.py Fri Oct 18 18:42:10 2013 +0200 @@ -220,8 +220,8 @@ @return string containing the mail message """ mpPreamble = ("This is a MIME-encoded message with attachments. " - "If you see this message, your mail client is not " - "capable of displaying the attachments.") + "If you see this message, your mail client is not " + "capable of displaying the attachments.") msgtext = "{0}\r\n----\r\n{1}----\r\n{2}----\r\n{3}".format( self.message.toPlainText(),
--- a/UI/ErrorLogDialog.py Fri Oct 18 18:00:02 2013 +0200 +++ b/UI/ErrorLogDialog.py Fri Oct 18 18:42:10 2013 +0200 @@ -50,8 +50,8 @@ Private slot to send an email. """ self.accept() - self.__ui.showEmailDialog("bug", - attachFile=self.__logFile, deleteAttachFile=True) + self.__ui.showEmailDialog( + "bug", attachFile=self.__logFile, deleteAttachFile=True) @pyqtSlot() def on_deleteButton_clicked(self):
--- a/UI/FindFileDialog.py Fri Oct 18 18:00:02 2013 +0200 +++ b/UI/FindFileDialog.py Fri Oct 18 18:42:10 2013 +0200 @@ -143,7 +143,8 @@ self.__lastFileItem.setFirstColumnSpanned(True) self.__lastFileItem.setExpanded(True) if self.__replaceMode: - self.__lastFileItem.setFlags(self.__lastFileItem.flags() | \ + self.__lastFileItem.setFlags( + self.__lastFileItem.flags() | \ Qt.ItemFlags(Qt.ItemIsUserCheckable | Qt.ItemIsTristate)) # Qt bug: # item is not user checkable if setFirstColumnSpanned
--- a/UI/FindFileNameDialog.py Fri Oct 18 18:00:02 2013 +0200 +++ b/UI/FindFileNameDialog.py Fri Oct 18 18:42:10 2013 +0200 @@ -108,8 +108,8 @@ return patternFormat = fileExt and "{0}{1}{2}" or "{0}*{1}{2}" - fileNamePattern = patternFormat.format(fileName, os.extsep, - fileExt and fileExt or '*') + fileNamePattern = patternFormat.format( + fileName, os.extsep, fileExt and fileExt or '*') searchPaths = [] if self.searchDirCheckBox.isChecked() and \
--- a/UI/SearchWidget.py Fri Oct 18 18:00:02 2013 +0200 +++ b/UI/SearchWidget.py Fri Oct 18 18:42:10 2013 +0200 @@ -95,7 +95,8 @@ self.findtextCombo.clear() self.findtextCombo.addItems(self.findHistory) - self.searchNext.emit(txt, + self.searchNext.emit( + txt, self.caseCheckBox.isChecked(), self.wordCheckBox.isChecked()) @@ -115,7 +116,8 @@ self.findtextCombo.clear() self.findtextCombo.addItems(self.findHistory) - self.searchPrevious.emit(txt, + self.searchPrevious.emit( + txt, self.caseCheckBox.isChecked(), self.wordCheckBox.isChecked())
--- a/UI/SymbolsWidget.py Fri Oct 18 18:00:02 2013 +0200 +++ b/UI/SymbolsWidget.py Fri Oct 18 18:42:10 2013 +0200 @@ -509,7 +509,8 @@ int(Preferences.Prefs.settings.value("Symbols/Top", 0)), 0) self.symbolsTable.scrollTo(index, QAbstractItemView.PositionAtTop) - self.symbolsTable.selectionModel().setCurrentIndex(index, + self.symbolsTable.selectionModel().setCurrentIndex( + index, QItemSelectionModel.SelectCurrent | QItemSelectionModel.Rows) @pyqtSlot(QModelIndex)
--- a/UI/UserInterface.py Fri Oct 18 18:00:02 2013 +0200 +++ b/UI/UserInterface.py Fri Oct 18 18:42:10 2013 +0200 @@ -631,7 +631,8 @@ # Create the project browser from Project.ProjectBrowser import ProjectBrowser - self.projectBrowser = ProjectBrowser(self.project, None, + self.projectBrowser = ProjectBrowser( + self.project, None, embeddedBrowser=(self.embeddedFileBrowser == 2)) self.lToolbox.addItem(self.projectBrowser, UI.PixmapCache.getIcon("projectViewer.png"), @@ -654,8 +655,8 @@ # Create the debug viewer maybe without the embedded shell from Debugger.DebugViewer import DebugViewer - self.debugViewer = DebugViewer(debugServer, True, self.viewmanager, - None, + self.debugViewer = DebugViewer( + debugServer, True, self.viewmanager, None, embeddedShell=self.embeddedShell, embeddedBrowser=(self.embeddedFileBrowser == 1)) self.rToolbox.addItem(self.debugViewer, @@ -751,34 +752,38 @@ # Create the project browser logging.debug("Creating Project Browser...") from Project.ProjectBrowser import ProjectBrowser - self.projectBrowser = ProjectBrowser(self.project, None, + self.projectBrowser = ProjectBrowser( + self.project, None, embeddedBrowser=(self.embeddedFileBrowser == 2)) - self.leftSidebar.addTab(self.projectBrowser, - UI.PixmapCache.getIcon("projectViewer.png"), - self.trUtf8("Project-Viewer")) + self.leftSidebar.addTab( + self.projectBrowser, + UI.PixmapCache.getIcon("projectViewer.png"), + self.trUtf8("Project-Viewer")) # Create the multi project browser logging.debug("Creating Multiproject Browser...") from MultiProject.MultiProjectBrowser import MultiProjectBrowser self.multiProjectBrowser = MultiProjectBrowser(self.multiProject) - self.leftSidebar.addTab(self.multiProjectBrowser, - UI.PixmapCache.getIcon("multiProjectViewer.png"), - self.trUtf8("Multiproject-Viewer")) + self.leftSidebar.addTab( + self.multiProjectBrowser, + UI.PixmapCache.getIcon("multiProjectViewer.png"), + self.trUtf8("Multiproject-Viewer")) # Create the template viewer part of the user interface logging.debug("Creating Template Viewer...") from Templates.TemplateViewer import TemplateViewer self.templateViewer = TemplateViewer(None, self.viewmanager) - self.leftSidebar.addTab(self.templateViewer, - UI.PixmapCache.getIcon("templateViewer.png"), - self.trUtf8("Template-Viewer")) + self.leftSidebar.addTab( + self.templateViewer, + UI.PixmapCache.getIcon("templateViewer.png"), + self.trUtf8("Template-Viewer")) # Create the debug viewer maybe without the embedded shell logging.debug("Creating Debug Viewer...") from Debugger.DebugViewer import DebugViewer - self.debugViewer = DebugViewer(debugServer, True, self.viewmanager, - None, + self.debugViewer = DebugViewer( + debugServer, True, self.viewmanager, None, embeddedShell=self.embeddedShell, embeddedBrowser=(self.embeddedFileBrowser == 1)) self.rightSidebar.addTab( @@ -797,8 +802,8 @@ logging.debug("Creating IRC Widget...") from Network.IRC.IrcWidget import IrcWidget self.irc = IrcWidget(self) - self.rightSidebar.addTab(self.irc, - UI.PixmapCache.getIcon("irc.png"), self.trUtf8("IRC")) + self.rightSidebar.addTab( + self.irc, UI.PixmapCache.getIcon("irc.png"), self.trUtf8("IRC")) # Create the task viewer part of the user interface logging.debug("Creating Task Viewer...") @@ -1169,11 +1174,12 @@ self.actions = [] self.wizardsActions = [] - self.exitAct = E5Action(self.trUtf8('Quit'), - UI.PixmapCache.getIcon("exit.png"), - self.trUtf8('&Quit'), - QKeySequence(self.trUtf8("Ctrl+Q", "File|Quit")), - 0, self, 'quit') + self.exitAct = E5Action( + self.trUtf8('Quit'), + UI.PixmapCache.getIcon("exit.png"), + self.trUtf8('&Quit'), + QKeySequence(self.trUtf8("Ctrl+Q", "File|Quit")), + 0, self, 'quit') self.exitAct.setStatusTip(self.trUtf8('Quit the IDE')) self.exitAct.setWhatsThis(self.trUtf8( """<b>Quit the IDE</b>""" @@ -1185,11 +1191,12 @@ self.exitAct.setMenuRole(QAction.QuitRole) self.actions.append(self.exitAct) - self.newWindowAct = E5Action(self.trUtf8('New Window'), - UI.PixmapCache.getIcon("newWindow.png"), - self.trUtf8('New &Window'), - QKeySequence(self.trUtf8("Ctrl+Shift+N", "File|New Window")), - 0, self, 'new_window') + self.newWindowAct = E5Action( + self.trUtf8('New Window'), + UI.PixmapCache.getIcon("newWindow.png"), + self.trUtf8('New &Window'), + QKeySequence(self.trUtf8("Ctrl+Shift+N", "File|New Window")), + 0, self, 'new_window') self.newWindowAct.setStatusTip(self.trUtf8( 'Open a new eric5 instance')) self.newWindowAct.setWhatsThis(self.trUtf8( @@ -1203,11 +1210,12 @@ self.viewProfileActGrp = createActionGroup(self, "viewprofiles", True) - self.setEditProfileAct = E5Action(self.trUtf8('Edit Profile'), - UI.PixmapCache.getIcon("viewProfileEdit.png"), - self.trUtf8('Edit Profile'), - 0, 0, - self.viewProfileActGrp, 'edit_profile', True) + self.setEditProfileAct = E5Action( + self.trUtf8('Edit Profile'), + UI.PixmapCache.getIcon("viewProfileEdit.png"), + self.trUtf8('Edit Profile'), + 0, 0, + self.viewProfileActGrp, 'edit_profile', True) self.setEditProfileAct.setStatusTip(self.trUtf8( 'Activate the edit view profile')) self.setEditProfileAct.setWhatsThis(self.trUtf8( @@ -1219,11 +1227,12 @@ self.setEditProfileAct.triggered[()].connect(self.__setEditProfile) self.actions.append(self.setEditProfileAct) - self.setDebugProfileAct = E5Action(self.trUtf8('Debug Profile'), - UI.PixmapCache.getIcon("viewProfileDebug.png"), - self.trUtf8('Debug Profile'), - 0, 0, - self.viewProfileActGrp, 'debug_profile', True) + self.setDebugProfileAct = E5Action( + self.trUtf8('Debug Profile'), + UI.PixmapCache.getIcon("viewProfileDebug.png"), + self.trUtf8('Debug Profile'), + 0, 0, + self.viewProfileActGrp, 'debug_profile', True) self.setDebugProfileAct.setStatusTip( self.trUtf8('Activate the debug view profile')) self.setDebugProfileAct.setWhatsThis(self.trUtf8( @@ -1235,11 +1244,12 @@ self.setDebugProfileAct.triggered[()].connect(self.setDebugProfile) self.actions.append(self.setDebugProfileAct) - self.pbActivateAct = E5Action(self.trUtf8('Project-Viewer'), - self.trUtf8('&Project-Viewer'), - QKeySequence(self.trUtf8("Alt+Shift+P")), - 0, self, - 'project_viewer_activate') + self.pbActivateAct = E5Action( + self.trUtf8('Project-Viewer'), + self.trUtf8('&Project-Viewer'), + QKeySequence(self.trUtf8("Alt+Shift+P")), + 0, self, + 'project_viewer_activate') self.pbActivateAct.setStatusTip(self.trUtf8( "Switch the input focus to the Project-Viewer window.")) self.pbActivateAct.setWhatsThis(self.trUtf8( @@ -1251,11 +1261,12 @@ self.actions.append(self.pbActivateAct) self.addAction(self.pbActivateAct) - self.mpbActivateAct = E5Action(self.trUtf8('Multiproject-Viewer'), - self.trUtf8('&Multiproject-Viewer'), - QKeySequence(self.trUtf8("Alt+Shift+M")), - 0, self, - 'multi_project_viewer_activate') + self.mpbActivateAct = E5Action( + self.trUtf8('Multiproject-Viewer'), + self.trUtf8('&Multiproject-Viewer'), + QKeySequence(self.trUtf8("Alt+Shift+M")), + 0, self, + 'multi_project_viewer_activate') self.mpbActivateAct.setStatusTip(self.trUtf8( "Switch the input focus to the Multiproject-Viewer window.")) self.mpbActivateAct.setWhatsThis(self.trUtf8( @@ -1268,11 +1279,12 @@ self.actions.append(self.mpbActivateAct) self.addAction(self.mpbActivateAct) - self.debugViewerActivateAct = E5Action(self.trUtf8('Debug-Viewer'), - self.trUtf8('&Debug-Viewer'), - QKeySequence(self.trUtf8("Alt+Shift+D")), - 0, self, - 'debug_viewer_activate') + self.debugViewerActivateAct = E5Action( + self.trUtf8('Debug-Viewer'), + self.trUtf8('&Debug-Viewer'), + QKeySequence(self.trUtf8("Alt+Shift+D")), + 0, self, + 'debug_viewer_activate') self.debugViewerActivateAct.setStatusTip(self.trUtf8( "Switch the input focus to the Debug-Viewer window.")) self.debugViewerActivateAct.setWhatsThis(self.trUtf8( @@ -1285,11 +1297,12 @@ self.actions.append(self.debugViewerActivateAct) self.addAction(self.debugViewerActivateAct) - self.shellActivateAct = E5Action(self.trUtf8('Shell'), - self.trUtf8('&Shell'), - QKeySequence(self.trUtf8("Alt+Shift+S")), - 0, self, - 'interprter_shell_activate') + self.shellActivateAct = E5Action( + self.trUtf8('Shell'), + self.trUtf8('&Shell'), + QKeySequence(self.trUtf8("Alt+Shift+S")), + 0, self, + 'interprter_shell_activate') self.shellActivateAct.setStatusTip(self.trUtf8( "Switch the input focus to the Shell window.")) self.shellActivateAct.setWhatsThis(self.trUtf8( @@ -1300,11 +1313,12 @@ self.actions.append(self.shellActivateAct) self.addAction(self.shellActivateAct) - self.browserActivateAct = E5Action(self.trUtf8('File-Browser'), - self.trUtf8('&File-Browser'), - QKeySequence(self.trUtf8("Alt+Shift+F")), - 0, self, - 'file_browser_activate') + self.browserActivateAct = E5Action( + self.trUtf8('File-Browser'), + self.trUtf8('&File-Browser'), + QKeySequence(self.trUtf8("Alt+Shift+F")), + 0, self, + 'file_browser_activate') self.browserActivateAct.setStatusTip(self.trUtf8( "Switch the input focus to the File-Browser window.")) self.browserActivateAct.setWhatsThis(self.trUtf8( @@ -1316,11 +1330,12 @@ self.actions.append(self.browserActivateAct) self.addAction(self.browserActivateAct) - self.logViewerActivateAct = E5Action(self.trUtf8('Log-Viewer'), - self.trUtf8('Lo&g-Viewer'), - QKeySequence(self.trUtf8("Alt+Shift+G")), - 0, self, - 'log_viewer_activate') + self.logViewerActivateAct = E5Action( + self.trUtf8('Log-Viewer'), + self.trUtf8('Lo&g-Viewer'), + QKeySequence(self.trUtf8("Alt+Shift+G")), + 0, self, + 'log_viewer_activate') self.logViewerActivateAct.setStatusTip(self.trUtf8( "Switch the input focus to the Log-Viewer window.")) self.logViewerActivateAct.setWhatsThis(self.trUtf8( @@ -1333,11 +1348,12 @@ self.actions.append(self.logViewerActivateAct) self.addAction(self.logViewerActivateAct) - self.taskViewerActivateAct = E5Action(self.trUtf8('Task-Viewer'), - self.trUtf8('&Task-Viewer'), - QKeySequence(self.trUtf8("Alt+Shift+T")), - 0, self, - 'task_viewer_activate') + self.taskViewerActivateAct = E5Action( + self.trUtf8('Task-Viewer'), + self.trUtf8('&Task-Viewer'), + QKeySequence(self.trUtf8("Alt+Shift+T")), + 0, self, + 'task_viewer_activate') self.taskViewerActivateAct.setStatusTip(self.trUtf8( "Switch the input focus to the Task-Viewer window.")) self.taskViewerActivateAct.setWhatsThis(self.trUtf8( @@ -1393,9 +1409,10 @@ self.rtAct.triggered[()].connect(self.__toggleRightToolbox) self.actions.append(self.rtAct) - self.htAct = E5Action(self.trUtf8('Horizontal Toolbox'), - self.trUtf8('&Horizontal Toolbox'), 0, 0, self, - 'horizontal_toolbox', True) + self.htAct = E5Action( + self.trUtf8('Horizontal Toolbox'), + self.trUtf8('&Horizontal Toolbox'), 0, 0, self, + 'horizontal_toolbox', True) self.htAct.setStatusTip(self.trUtf8( 'Toggle the Horizontal Toolbox window')) self.htAct.setWhatsThis(self.trUtf8( @@ -1406,8 +1423,10 @@ self.htAct.triggered[()].connect(self.__toggleHorizontalToolbox) self.actions.append(self.htAct) - self.lsbAct = E5Action(self.trUtf8('Left Sidebar'), - self.trUtf8('&Left Sidebar'), 0, 0, self, 'left_sidebar', True) + self.lsbAct = E5Action( + self.trUtf8('Left Sidebar'), + self.trUtf8('&Left Sidebar'), + 0, 0, self, 'left_sidebar', True) self.lsbAct.setStatusTip(self.trUtf8('Toggle the left sidebar window')) self.lsbAct.setWhatsThis(self.trUtf8( """<b>Toggle the left sidebar window</b>""" @@ -1419,7 +1438,8 @@ self.rsbAct = E5Action( self.trUtf8('Right Sidebar'), - self.trUtf8('&Right Sidebar'), 0, 0, self, 'right_sidebar', True) + self.trUtf8('&Right Sidebar'), + 0, 0, self, 'right_sidebar', True) self.rsbAct.setStatusTip(self.trUtf8( 'Toggle the right sidebar window')) self.rsbAct.setWhatsThis(self.trUtf8( @@ -1430,9 +1450,10 @@ self.rsbAct.triggered[()].connect(self.__toggleRightSidebar) self.actions.append(self.rsbAct) - self.bsbAct = E5Action(self.trUtf8('Bottom Sidebar'), - self.trUtf8('&Bottom Sidebar'), 0, 0, self, - 'bottom_sidebar', True) + self.bsbAct = E5Action( + self.trUtf8('Bottom Sidebar'), + self.trUtf8('&Bottom Sidebar'), 0, 0, self, + 'bottom_sidebar', True) self.bsbAct.setStatusTip(self.trUtf8( 'Toggle the bottom sidebar window')) self.bsbAct.setWhatsThis(self.trUtf8( @@ -1444,11 +1465,11 @@ self.actions.append(self.bsbAct) self.cooperationViewerActivateAct = E5Action( - self.trUtf8('Cooperation-Viewer'), - self.trUtf8('Co&operation-Viewer'), - QKeySequence(self.trUtf8("Alt+Shift+O")), - 0, self, - 'cooperation_viewer_activate') + self.trUtf8('Cooperation-Viewer'), + self.trUtf8('Co&operation-Viewer'), + QKeySequence(self.trUtf8("Alt+Shift+O")), + 0, self, + 'cooperation_viewer_activate') self.cooperationViewerActivateAct.setStatusTip(self.trUtf8( "Switch the input focus to the Cooperation-Viewer window.")) self.cooperationViewerActivateAct.setWhatsThis(self.trUtf8( @@ -1462,11 +1483,11 @@ self.addAction(self.cooperationViewerActivateAct) self.ircActivateAct = E5Action( - self.trUtf8('IRC'), - self.trUtf8('&IRC'), - QKeySequence(self.trUtf8("Meta+Shift+I")), - 0, self, - 'irc_widget_activate') + self.trUtf8('IRC'), + self.trUtf8('&IRC'), + QKeySequence(self.trUtf8("Meta+Shift+I")), + 0, self, + 'irc_widget_activate') self.ircActivateAct.setStatusTip(self.trUtf8( "Switch the input focus to the IRC window.")) self.ircActivateAct.setWhatsThis(self.trUtf8( @@ -1479,11 +1500,11 @@ self.addAction(self.ircActivateAct) self.symbolsViewerActivateAct = E5Action( - self.trUtf8('Symbols-Viewer'), - self.trUtf8('S&ymbols-Viewer'), - QKeySequence(self.trUtf8("Alt+Shift+Y")), - 0, self, - 'symbols_viewer_activate') + self.trUtf8('Symbols-Viewer'), + self.trUtf8('S&ymbols-Viewer'), + QKeySequence(self.trUtf8("Alt+Shift+Y")), + 0, self, + 'symbols_viewer_activate') self.symbolsViewerActivateAct.setStatusTip(self.trUtf8( "Switch the input focus to the Symbols-Viewer window.")) self.symbolsViewerActivateAct.setWhatsThis(self.trUtf8( @@ -1497,11 +1518,11 @@ self.addAction(self.symbolsViewerActivateAct) self.numbersViewerActivateAct = E5Action( - self.trUtf8('Numbers-Viewer'), - self.trUtf8('Num&bers-Viewer'), - QKeySequence(self.trUtf8("Alt+Shift+B")), - 0, self, - 'numbers_viewer_activate') + self.trUtf8('Numbers-Viewer'), + self.trUtf8('Num&bers-Viewer'), + QKeySequence(self.trUtf8("Alt+Shift+B")), + 0, self, + 'numbers_viewer_activate') self.numbersViewerActivateAct.setStatusTip(self.trUtf8( "Switch the input focus to the Numbers-Viewer window.")) self.numbersViewerActivateAct.setWhatsThis(self.trUtf8( @@ -1514,11 +1535,12 @@ self.actions.append(self.numbersViewerActivateAct) self.addAction(self.numbersViewerActivateAct) - self.whatsThisAct = E5Action(self.trUtf8('What\'s This?'), - UI.PixmapCache.getIcon("whatsThis.png"), - self.trUtf8('&What\'s This?'), - QKeySequence(self.trUtf8("Shift+F1")), - 0, self, 'whatsThis') + self.whatsThisAct = E5Action( + self.trUtf8('What\'s This?'), + UI.PixmapCache.getIcon("whatsThis.png"), + self.trUtf8('&What\'s This?'), + QKeySequence(self.trUtf8("Shift+F1")), + 0, self, 'whatsThis') self.whatsThisAct.setStatusTip(self.trUtf8('Context sensitive help')) self.whatsThisAct.setWhatsThis(self.trUtf8( """<b>Display context sensitive help</b>""" @@ -1531,11 +1553,12 @@ self.whatsThisAct.triggered[()].connect(self.__whatsThis) self.actions.append(self.whatsThisAct) - self.helpviewerAct = E5Action(self.trUtf8('Helpviewer'), - UI.PixmapCache.getIcon("help.png"), - self.trUtf8('&Helpviewer...'), - QKeySequence(self.trUtf8("F1")), - 0, self, 'helpviewer') + self.helpviewerAct = E5Action( + self.trUtf8('Helpviewer'), + UI.PixmapCache.getIcon("help.png"), + self.trUtf8('&Helpviewer...'), + QKeySequence(self.trUtf8("F1")), + 0, self, 'helpviewer') self.helpviewerAct.setStatusTip(self.trUtf8( 'Open the helpviewer window')) self.helpviewerAct.setWhatsThis(self.trUtf8( @@ -1555,8 +1578,10 @@ self.__initEricDocAction() self.__initPySideDocAction() - self.versionAct = E5Action(self.trUtf8('Show Versions'), - self.trUtf8('Show &Versions'), 0, 0, self, 'show_versions') + self.versionAct = E5Action( + self.trUtf8('Show Versions'), + self.trUtf8('Show &Versions'), + 0, 0, self, 'show_versions') self.versionAct.setStatusTip(self.trUtf8( 'Display version information')) self.versionAct.setWhatsThis(self.trUtf8( @@ -1592,8 +1617,10 @@ self.showAvailableVersionsInfo) self.actions.append(self.showVersionsAct) - self.reportBugAct = E5Action(self.trUtf8('Report Bug'), - self.trUtf8('Report &Bug...'), 0, 0, self, 'report_bug') + self.reportBugAct = E5Action( + self.trUtf8('Report Bug'), + self.trUtf8('Report &Bug...'), + 0, 0, self, 'report_bug') self.reportBugAct.setStatusTip(self.trUtf8('Report a bug')) self.reportBugAct.setWhatsThis(self.trUtf8( """<b>Report Bug...</b>""" @@ -1604,7 +1631,8 @@ self.requestFeatureAct = E5Action( self.trUtf8('Request Feature'), - self.trUtf8('Request &Feature...'), 0, 0, self, 'request_feature') + self.trUtf8('Request &Feature...'), + 0, 0, self, 'request_feature') self.requestFeatureAct.setStatusTip(self.trUtf8( 'Send a feature request')) self.requestFeatureAct.setWhatsThis(self.trUtf8( @@ -1616,10 +1644,11 @@ self.utActGrp = createActionGroup(self) - self.utDialogAct = E5Action(self.trUtf8('Unittest'), - UI.PixmapCache.getIcon("unittest.png"), - self.trUtf8('&Unittest...'), - 0, 0, self.utActGrp, 'unittest') + self.utDialogAct = E5Action( + self.trUtf8('Unittest'), + UI.PixmapCache.getIcon("unittest.png"), + self.trUtf8('&Unittest...'), + 0, 0, self.utActGrp, 'unittest') self.utDialogAct.setStatusTip(self.trUtf8('Start unittest dialog')) self.utDialogAct.setWhatsThis(self.trUtf8( """<b>Unittest</b>""" @@ -1629,7 +1658,8 @@ self.utDialogAct.triggered[()].connect(self.__unittest) self.actions.append(self.utDialogAct) - self.utRestartAct = E5Action(self.trUtf8('Unittest Restart'), + self.utRestartAct = E5Action( + self.trUtf8('Unittest Restart'), UI.PixmapCache.getIcon("unittestRestart.png"), self.trUtf8('&Restart Unittest...'), 0, 0, self.utActGrp, 'unittest_restart') @@ -1642,7 +1672,8 @@ self.utRestartAct.setEnabled(False) self.actions.append(self.utRestartAct) - self.utRerunFailedAct = E5Action(self.trUtf8('Unittest Rerun Failed'), + self.utRerunFailedAct = E5Action( + self.trUtf8('Unittest Rerun Failed'), UI.PixmapCache.getIcon("unittestRerunFailed.png"), self.trUtf8('Rerun Failed Tests...'), 0, 0, self.utActGrp, 'unittest_rerun_failed') @@ -1657,7 +1688,8 @@ self.utRerunFailedAct.setEnabled(False) self.actions.append(self.utRerunFailedAct) - self.utScriptAct = E5Action(self.trUtf8('Unittest Script'), + self.utScriptAct = E5Action( + self.trUtf8('Unittest Script'), UI.PixmapCache.getIcon("unittestScript.png"), self.trUtf8('Unittest &Script...'), 0, 0, self.utActGrp, 'unittest_script') @@ -1671,7 +1703,8 @@ self.utScriptAct.setEnabled(False) self.actions.append(self.utScriptAct) - self.utProjectAct = E5Action(self.trUtf8('Unittest Project'), + self.utProjectAct = E5Action( + self.trUtf8('Unittest Project'), UI.PixmapCache.getIcon("unittestProject.png"), self.trUtf8('Unittest &Project...'), 0, 0, self.utActGrp, 'unittest_project') @@ -1687,17 +1720,21 @@ # check for Qt4/Qt5 designer and linguist if Utilities.isWindowsPlatform(): - designerExe = os.path.join(Utilities.getQtBinariesPath(), + designerExe = os.path.join( + Utilities.getQtBinariesPath(), "{0}.exe".format(Utilities.generateQtToolName("designer"))) elif Utilities.isMacPlatform(): designerExe = Utilities.getQtMacBundle("designer") else: - designerExe = os.path.join(Utilities.getQtBinariesPath(), + designerExe = os.path.join( + Utilities.getQtBinariesPath(), Utilities.generateQtToolName("designer")) if os.path.exists(designerExe): - self.designer4Act = E5Action(self.trUtf8('Qt-Designer'), - UI.PixmapCache.getIcon("designer4.png"), - self.trUtf8('Qt-&Designer...'), 0, 0, self, 'qt_designer4') + self.designer4Act = E5Action( + self.trUtf8('Qt-Designer'), + UI.PixmapCache.getIcon("designer4.png"), + self.trUtf8('Qt-&Designer...'), + 0, 0, self, 'qt_designer4') self.designer4Act.setStatusTip(self.trUtf8('Start Qt-Designer')) self.designer4Act.setWhatsThis(self.trUtf8( """<b>Qt-Designer</b>""" @@ -1709,17 +1746,21 @@ self.designer4Act = None if Utilities.isWindowsPlatform(): - linguistExe = os.path.join(Utilities.getQtBinariesPath(), + linguistExe = os.path.join( + Utilities.getQtBinariesPath(), "{0}.exe".format(Utilities.generateQtToolName("linguist"))) elif Utilities.isMacPlatform(): linguistExe = Utilities.getQtMacBundle("linguist") else: - linguistExe = os.path.join(Utilities.getQtBinariesPath(), + linguistExe = os.path.join( + Utilities.getQtBinariesPath(), Utilities.generateQtToolName("linguist")) if os.path.exists(linguistExe): - self.linguist4Act = E5Action(self.trUtf8('Qt-Linguist'), - UI.PixmapCache.getIcon("linguist4.png"), - self.trUtf8('Qt-&Linguist...'), 0, 0, self, 'qt_linguist4') + self.linguist4Act = E5Action( + self.trUtf8('Qt-Linguist'), + UI.PixmapCache.getIcon("linguist4.png"), + self.trUtf8('Qt-&Linguist...'), + 0, 0, self, 'qt_linguist4') self.linguist4Act.setStatusTip(self.trUtf8('Start Qt-Linguist')) self.linguist4Act.setWhatsThis(self.trUtf8( """<b>Qt-Linguist</b>""" @@ -1730,9 +1771,11 @@ else: self.linguist4Act = None - self.uipreviewerAct = E5Action(self.trUtf8('UI Previewer'), - UI.PixmapCache.getIcon("uiPreviewer.png"), - self.trUtf8('&UI Previewer...'), 0, 0, self, 'ui_previewer') + self.uipreviewerAct = E5Action( + self.trUtf8('UI Previewer'), + UI.PixmapCache.getIcon("uiPreviewer.png"), + self.trUtf8('&UI Previewer...'), + 0, 0, self, 'ui_previewer') self.uipreviewerAct.setStatusTip(self.trUtf8('Start the UI Previewer')) self.uipreviewerAct.setWhatsThis(self.trUtf8( """<b>UI Previewer</b>""" @@ -1755,9 +1798,11 @@ self.trpreviewerAct.triggered[()].connect(self.__TRPreviewer) self.actions.append(self.trpreviewerAct) - self.diffAct = E5Action(self.trUtf8('Compare Files'), - UI.PixmapCache.getIcon("diffFiles.png"), - self.trUtf8('&Compare Files...'), 0, 0, self, 'diff_files') + self.diffAct = E5Action( + self.trUtf8('Compare Files'), + UI.PixmapCache.getIcon("diffFiles.png"), + self.trUtf8('&Compare Files...'), + 0, 0, self, 'diff_files') self.diffAct.setStatusTip(self.trUtf8('Compare two files')) self.diffAct.setWhatsThis(self.trUtf8( """<b>Compare Files</b>""" @@ -1766,10 +1811,11 @@ self.diffAct.triggered[()].connect(self.__compareFiles) self.actions.append(self.diffAct) - self.compareAct = E5Action(self.trUtf8('Compare Files side by side'), - UI.PixmapCache.getIcon("compareFiles.png"), - self.trUtf8('Compare &Files side by side...'), - 0, 0, self, 'compare_files') + self.compareAct = E5Action( + self.trUtf8('Compare Files side by side'), + UI.PixmapCache.getIcon("compareFiles.png"), + self.trUtf8('Compare &Files side by side...'), + 0, 0, self, 'compare_files') self.compareAct.setStatusTip(self.trUtf8('Compare two files')) self.compareAct.setWhatsThis(self.trUtf8( """<b>Compare Files side by side</b>""" @@ -1779,10 +1825,11 @@ self.compareAct.triggered[()].connect(self.__compareFilesSbs) self.actions.append(self.compareAct) - self.sqlBrowserAct = E5Action(self.trUtf8('SQL Browser'), - UI.PixmapCache.getIcon("sqlBrowser.png"), - self.trUtf8('SQL &Browser...'), - 0, 0, self, 'sql_browser') + self.sqlBrowserAct = E5Action( + self.trUtf8('SQL Browser'), + UI.PixmapCache.getIcon("sqlBrowser.png"), + self.trUtf8('SQL &Browser...'), + 0, 0, self, 'sql_browser') self.sqlBrowserAct.setStatusTip(self.trUtf8('Browse a SQL database')) self.sqlBrowserAct.setWhatsThis(self.trUtf8( """<b>SQL Browser</b>""" @@ -1791,10 +1838,11 @@ self.sqlBrowserAct.triggered[()].connect(self.__sqlBrowser) self.actions.append(self.sqlBrowserAct) - self.miniEditorAct = E5Action(self.trUtf8('Mini Editor'), - UI.PixmapCache.getIcon("editor.png"), - self.trUtf8('Mini &Editor...'), - 0, 0, self, 'mini_editor') + self.miniEditorAct = E5Action( + self.trUtf8('Mini Editor'), + UI.PixmapCache.getIcon("editor.png"), + self.trUtf8('Mini &Editor...'), + 0, 0, self, 'mini_editor') self.miniEditorAct.setStatusTip(self.trUtf8('Mini Editor')) self.miniEditorAct.setWhatsThis(self.trUtf8( """<b>Mini Editor</b>""" @@ -1803,10 +1851,11 @@ self.miniEditorAct.triggered[()].connect(self.__openMiniEditor) self.actions.append(self.miniEditorAct) - self.webBrowserAct = E5Action(self.trUtf8('eric5 Web Browser'), - UI.PixmapCache.getIcon("ericWeb.png"), - self.trUtf8('eric5 &Web Browser...'), - 0, 0, self, 'web_browser') + self.webBrowserAct = E5Action( + self.trUtf8('eric5 Web Browser'), + UI.PixmapCache.getIcon("ericWeb.png"), + self.trUtf8('eric5 &Web Browser...'), + 0, 0, self, 'web_browser') self.webBrowserAct.setStatusTip(self.trUtf8( 'Start the eric5 Web Browser')) self.webBrowserAct.setWhatsThis(self.trUtf8( @@ -1816,10 +1865,11 @@ self.webBrowserAct.triggered[()].connect(self.__startWebBrowser) self.actions.append(self.webBrowserAct) - self.iconEditorAct = E5Action(self.trUtf8('Icon Editor'), - UI.PixmapCache.getIcon("iconEditor.png"), - self.trUtf8('&Icon Editor...'), - 0, 0, self, 'icon_editor') + self.iconEditorAct = E5Action( + self.trUtf8('Icon Editor'), + UI.PixmapCache.getIcon("iconEditor.png"), + self.trUtf8('&Icon Editor...'), + 0, 0, self, 'icon_editor') self.iconEditorAct.setStatusTip(self.trUtf8( 'Start the eric5 Icon Editor')) self.iconEditorAct.setWhatsThis(self.trUtf8( @@ -1829,10 +1879,11 @@ self.iconEditorAct.triggered[()].connect(self.__editPixmap) self.actions.append(self.iconEditorAct) - self.snapshotAct = E5Action(self.trUtf8('Snapshot'), - UI.PixmapCache.getIcon("ericSnap.png"), - self.trUtf8('&Snapshot...'), - 0, 0, self, 'snapshot') + self.snapshotAct = E5Action( + self.trUtf8('Snapshot'), + UI.PixmapCache.getIcon("ericSnap.png"), + self.trUtf8('&Snapshot...'), + 0, 0, self, 'snapshot') self.snapshotAct.setStatusTip(self.trUtf8( 'Take snapshots of a screen region')) self.snapshotAct.setWhatsThis(self.trUtf8( @@ -1843,9 +1894,11 @@ self.snapshotAct.triggered[()].connect(self.__snapshot) self.actions.append(self.snapshotAct) - self.prefAct = E5Action(self.trUtf8('Preferences'), - UI.PixmapCache.getIcon("configure.png"), - self.trUtf8('&Preferences...'), 0, 0, self, 'preferences') + self.prefAct = E5Action( + self.trUtf8('Preferences'), + UI.PixmapCache.getIcon("configure.png"), + self.trUtf8('&Preferences...'), + 0, 0, self, 'preferences') self.prefAct.setStatusTip(self.trUtf8( 'Set the prefered configuration')) self.prefAct.setWhatsThis(self.trUtf8( @@ -1885,8 +1938,10 @@ self.prefImportAct.triggered[()].connect(self.__importPreferences) self.actions.append(self.prefImportAct) - self.reloadAPIsAct = E5Action(self.trUtf8('Reload APIs'), - self.trUtf8('Reload &APIs'), 0, 0, self, 'reload_apis') + self.reloadAPIsAct = E5Action( + self.trUtf8('Reload APIs'), + self.trUtf8('Reload &APIs'), + 0, 0, self, 'reload_apis') self.reloadAPIsAct.setStatusTip(self.trUtf8( 'Reload the API information')) self.reloadAPIsAct.setWhatsThis(self.trUtf8( @@ -1912,9 +1967,11 @@ self.__showExternalTools) self.actions.append(self.showExternalToolsAct) - self.configViewProfilesAct = E5Action(self.trUtf8('View Profiles'), - UI.PixmapCache.getIcon("configureViewProfiles.png"), - self.trUtf8('&View Profiles...'), 0, 0, self, 'view_profiles') + self.configViewProfilesAct = E5Action( + self.trUtf8('View Profiles'), + UI.PixmapCache.getIcon("configureViewProfiles.png"), + self.trUtf8('&View Profiles...'), + 0, 0, self, 'view_profiles') self.configViewProfilesAct.setStatusTip(self.trUtf8( 'Configure view profiles')) self.configViewProfilesAct.setWhatsThis(self.trUtf8( @@ -1927,9 +1984,11 @@ self.__configViewProfiles) self.actions.append(self.configViewProfilesAct) - self.configToolBarsAct = E5Action(self.trUtf8('Toolbars'), - UI.PixmapCache.getIcon("toolbarsConfigure.png"), - self.trUtf8('Tool&bars...'), 0, 0, self, 'configure_toolbars') + self.configToolBarsAct = E5Action( + self.trUtf8('Toolbars'), + UI.PixmapCache.getIcon("toolbarsConfigure.png"), + self.trUtf8('Tool&bars...'), + 0, 0, self, 'configure_toolbars') self.configToolBarsAct.setStatusTip(self.trUtf8('Configure toolbars')) self.configToolBarsAct.setWhatsThis(self.trUtf8( """<b>Toolbars</b>""" @@ -2027,33 +2086,37 @@ self.actions.append(self.viewmanagerActivateAct) self.addAction(self.viewmanagerActivateAct) - self.nextTabAct = E5Action(self.trUtf8('Show next'), - self.trUtf8('Show next'), - QKeySequence(self.trUtf8('Ctrl+Alt+Tab')), 0, - self, 'view_next_tab') + self.nextTabAct = E5Action( + self.trUtf8('Show next'), + self.trUtf8('Show next'), + QKeySequence(self.trUtf8('Ctrl+Alt+Tab')), 0, + self, 'view_next_tab') self.nextTabAct.triggered[()].connect(self.__showNext) self.actions.append(self.nextTabAct) self.addAction(self.nextTabAct) - self.prevTabAct = E5Action(self.trUtf8('Show previous'), - self.trUtf8('Show previous'), - QKeySequence(self.trUtf8('Shift+Ctrl+Alt+Tab')), 0, - self, 'view_previous_tab') + self.prevTabAct = E5Action( + self.trUtf8('Show previous'), + self.trUtf8('Show previous'), + QKeySequence(self.trUtf8('Shift+Ctrl+Alt+Tab')), 0, + self, 'view_previous_tab') self.prevTabAct.triggered[()].connect(self.__showPrevious) self.actions.append(self.prevTabAct) self.addAction(self.prevTabAct) - self.switchTabAct = E5Action(self.trUtf8('Switch between tabs'), - self.trUtf8('Switch between tabs'), - QKeySequence(self.trUtf8('Ctrl+1')), 0, - self, 'switch_tabs') + self.switchTabAct = E5Action( + self.trUtf8('Switch between tabs'), + self.trUtf8('Switch between tabs'), + QKeySequence(self.trUtf8('Ctrl+1')), 0, + self, 'switch_tabs') self.switchTabAct.triggered[()].connect(self.__switchTab) self.actions.append(self.switchTabAct) self.addAction(self.switchTabAct) - self.pluginInfoAct = E5Action(self.trUtf8('Plugin Infos'), - UI.PixmapCache.getIcon("plugin.png"), - self.trUtf8('&Plugin Infos...'), 0, 0, self, 'plugin_infos') + self.pluginInfoAct = E5Action( + self.trUtf8('Plugin Infos'), + UI.PixmapCache.getIcon("plugin.png"), + self.trUtf8('&Plugin Infos...'), 0, 0, self, 'plugin_infos') self.pluginInfoAct.setStatusTip(self.trUtf8('Show Plugin Infos')) self.pluginInfoAct.setWhatsThis(self.trUtf8( """<b>Plugin Infos...</b>""" @@ -2669,7 +2732,8 @@ """ of the current editor.</p>""" )) - self.sbZoom = E5ZoomWidget(UI.PixmapCache.getPixmap("zoomOut.png"), + self.sbZoom = E5ZoomWidget( + UI.PixmapCache.getPixmap("zoomOut.png"), UI.PixmapCache.getPixmap("zoomIn.png"), UI.PixmapCache.getPixmap("zoomReset.png"), self.__statusBar) @@ -3902,7 +3966,8 @@ E5MessageBox.critical( self, self.trUtf8("Unittest Project"), - self.trUtf8("There is no main script defined for the" + self.trUtf8( + "There is no main script defined for the" " current project. Aborting")) return @@ -3976,7 +4041,8 @@ E5MessageBox.critical( self, self.trUtf8('Problem'), - self.trUtf8('<p>The file <b>{0}</b> does not exist or' + self.trUtf8( + '<p>The file <b>{0}</b> does not exist or' ' is zero length.</p>') .format(fn)) return @@ -3984,7 +4050,8 @@ E5MessageBox.critical( self, self.trUtf8('Problem'), - self.trUtf8('<p>The file <b>{0}</b> does not exist or' + self.trUtf8( + '<p>The file <b>{0}</b> does not exist or' ' is zero length.</p>') .format(fn)) return @@ -4041,7 +4108,8 @@ E5MessageBox.critical( self, self.trUtf8('Problem'), - self.trUtf8('<p>The file <b>{0}</b> does not exist or' + self.trUtf8( + '<p>The file <b>{0}</b> does not exist or' ' is zero length.</p>') .format(fn)) return @@ -4049,7 +4117,8 @@ E5MessageBox.critical( self, self.trUtf8('Problem'), - self.trUtf8('<p>The file <b>{0}</b> does not exist or' + self.trUtf8( + '<p>The file <b>{0}</b> does not exist or' ' is zero length.</p>') .format(fn)) return @@ -4207,7 +4276,8 @@ E5MessageBox.critical( self, self.trUtf8('Problem'), - self.trUtf8('<p>The file <b>{0}</b> does not exist or' + self.trUtf8( + '<p>The file <b>{0}</b> does not exist or' ' is zero length.</p>') .format(fn)) return @@ -4215,7 +4285,8 @@ E5MessageBox.critical( self, self.trUtf8('Problem'), - self.trUtf8('<p>The file <b>{0}</b> does not exist or' + self.trUtf8( + '<p>The file <b>{0}</b> does not exist or' ' is zero length.</p>') .format(fn)) return @@ -4518,10 +4589,12 @@ pythonDocDir = Preferences.getHelp("PythonDocDir") if not pythonDocDir: if Utilities.isWindowsPlatform(): - pythonDocDir = Utilities.getEnvironmentEntry("PYTHON3DOCDIR", + pythonDocDir = Utilities.getEnvironmentEntry( + "PYTHON3DOCDIR", os.path.join(os.path.dirname(sys.executable), "doc")) else: - pythonDocDir = Utilities.getEnvironmentEntry("PYTHON3DOCDIR", + pythonDocDir = Utilities.getEnvironmentEntry( + "PYTHON3DOCDIR", '/usr/share/doc/packages/python/html') if not pythonDocDir.startswith("http://") and \ not pythonDocDir.startswith("https://"): @@ -4584,7 +4657,8 @@ pythonDocDir = \ Utilities.getEnvironmentEntry("PYTHON2DOCDIR", default) else: - pythonDocDir = Utilities.getEnvironmentEntry("PYTHON2DOCDIR", + pythonDocDir = Utilities.getEnvironmentEntry( + "PYTHON2DOCDIR", '/usr/share/doc/packages/python/html/python-docs-html') if not pythonDocDir.startswith("http://") and \ not pythonDocDir.startswith("https://"): @@ -4814,8 +4888,8 @@ """ Private slot to show the Eric documentation. """ - home = Utilities.normjoinpath(getConfig('ericDocDir'), - "Source", "index.html") + home = Utilities.normjoinpath( + getConfig('ericDocDir'), "Source", "index.html") if not home.startswith("http://") and \ not home.startswith("https://") and \ @@ -5100,8 +5174,8 @@ Private slot to configure the various view profiles. """ from Preferences.ViewProfileDialog import ViewProfileDialog - dlg = ViewProfileDialog(self.layout, - self.profiles['edit'][1], self.profiles['debug'][1]) + dlg = ViewProfileDialog( + self.layout, self.profiles['edit'][1], self.profiles['debug'][1]) if dlg.exec_() == QDialog.Accepted: edit, debug = dlg.getVisibilities() self.profiles['edit'][1] = edit
--- a/Utilities/ClassBrowsers/idlclbr.py Fri Oct 18 18:00:02 2013 +0200 +++ b/Utilities/ClassBrowsers/idlclbr.py Fri Oct 18 18:42:10 2013 +0200 @@ -22,7 +22,8 @@ SUPPORTED_TYPES = [ClassBrowsers.IDL_SOURCE] -_getnext = re.compile(r""" +_getnext = re.compile( +r""" (?P<String> " [^"\\\n]* (?: \\. [^"\\\n]*)* " ) @@ -301,7 +302,7 @@ inherit = [_commentsub('', inherit)] # remember this interface cur_class = Interface(module, class_name, inherit, - file, lineno) + file, lineno) if not classstack: dict[class_name] = cur_class else:
--- a/Utilities/ClassBrowsers/pyclbr.py Fri Oct 18 18:00:02 2013 +0200 +++ b/Utilities/ClassBrowsers/pyclbr.py Fri Oct 18 18:42:10 2013 +0200 @@ -26,7 +26,8 @@ SUPPORTED_TYPES = [ClassBrowsers.PY_SOURCE, ClassBrowsers.PTL_SOURCE] -_getnext = re.compile(r""" +_getnext = re.compile( +r""" (?P<String> \""" [^"\\]* (?: (?: \\. | "(?!"") )
--- a/Utilities/ClassBrowsers/rbclbr.py Fri Oct 18 18:00:02 2013 +0200 +++ b/Utilities/ClassBrowsers/rbclbr.py Fri Oct 18 18:42:10 2013 +0200 @@ -20,7 +20,8 @@ SUPPORTED_TYPES = [ClassBrowsers.RB_SOURCE] -_getnext = re.compile(r""" +_getnext = re.compile( +r""" (?P<String> =begin .*? =end
--- a/Utilities/FtpUtilities.py Fri Oct 18 18:00:02 2013 +0200 +++ b/Utilities/FtpUtilities.py Fri Oct 18 18:42:10 2013 +0200 @@ -296,9 +296,9 @@ ext = os.path.splitext(name.lower())[1] urlInfo.setSymLink(ext == ".lnk") - permissions = (E5UrlInfo.ReadOwner | E5UrlInfo.WriteOwner - | E5UrlInfo.ReadGroup | E5UrlInfo.WriteGroup - | E5UrlInfo.ReadOther | E5UrlInfo.WriteOther) + permissions = (E5UrlInfo.ReadOwner | E5UrlInfo.WriteOwner | + E5UrlInfo.ReadGroup | E5UrlInfo.WriteGroup | + E5UrlInfo.ReadOther | E5UrlInfo.WriteOther) if ext in [".exe", ".com", ".bat", ".cmd"]: permissions |= E5UrlInfo.ExeOwner | E5UrlInfo.ExeGroup | \ E5UrlInfo.ExeOther
--- a/Utilities/ModuleParser.py Fri Oct 18 18:00:02 2013 +0200 +++ b/Utilities/ModuleParser.py Fri Oct 18 18:42:10 2013 +0200 @@ -56,7 +56,8 @@ return -1 -_py_getnext = re.compile(r""" +_py_getnext = re.compile( +r""" (?P<String> \""" (?P<StringContents1> [^"\\]* (?: @@ -189,7 +190,8 @@ ) """, re.VERBOSE | re.DOTALL | re.MULTILINE).search -_rb_getnext = re.compile(r""" +_rb_getnext = re.compile( +r""" (?P<Docstring> =begin [ \t]+ edoc (?P<DocstringContents> .*? ) =end ) @@ -959,7 +961,7 @@ module_name = m.group("ModuleName") # remember this class cur_class = RbModule(self.name, module_name, - self.file, lineno) + self.file, lineno) # add nested Ruby modules to the file if module_name in self.modules: cur_class = self.modules[module_name] @@ -1152,8 +1154,8 @@ self.addPathToHierarchy( exhausted, result, self.addPathToHierarchy) else: - rv[cls] = self.assembleHierarchy(cls, - classes, path + [cls], result) + rv[cls] = self.assembleHierarchy( + cls, classes, path + [cls], result) if len(rv) == 0: exhausted = path
--- a/Utilities/__init__.py Fri Oct 18 18:00:02 2013 +0200 +++ b/Utilities/__init__.py Fri Oct 18 18:42:10 2013 +0200 @@ -67,22 +67,24 @@ (1, re.compile(r'''<\?xml.*\bencoding\s*=\s*['"]([-\w_.]+)['"]\?>''')), ] -supportedCodecs = ['utf-8', - 'iso8859-1', 'iso8859-15', 'iso8859-2', 'iso8859-3', - 'iso8859-4', 'iso8859-5', 'iso8859-6', 'iso8859-7', - 'iso8859-8', 'iso8859-9', 'iso8859-10', 'iso8859-11', - 'iso8859-13', 'iso8859-14', 'iso8859-16', 'latin-1', - 'koi8-r', 'koi8-u', - 'utf-16', 'utf-32', - 'cp037', 'cp424', 'cp437', 'cp500', 'cp737', 'cp775', - 'cp850', 'cp852', 'cp855', 'cp856', 'cp857', 'cp860', - 'cp861', 'cp862', 'cp863', 'cp864', 'cp865', 'cp866', - 'cp869', 'cp874', 'cp875', 'cp932', 'cp949', 'cp950', - 'cp1006', 'cp1026', 'cp1140', 'cp1250', 'cp1251', - 'cp1252', 'cp1253', 'cp1254', 'cp1255', 'cp1256', - 'cp1257', 'cp1258', - 'gb2312', 'gb18030', - 'ascii'] +supportedCodecs = [ + 'utf-8', + 'iso8859-1', 'iso8859-15', 'iso8859-2', 'iso8859-3', + 'iso8859-4', 'iso8859-5', 'iso8859-6', 'iso8859-7', + 'iso8859-8', 'iso8859-9', 'iso8859-10', 'iso8859-11', + 'iso8859-13', 'iso8859-14', 'iso8859-16', 'latin-1', + 'koi8-r', 'koi8-u', + 'utf-16', 'utf-32', + 'cp037', 'cp424', 'cp437', 'cp500', 'cp737', 'cp775', + 'cp850', 'cp852', 'cp855', 'cp856', 'cp857', 'cp860', + 'cp861', 'cp862', 'cp863', 'cp864', 'cp865', 'cp866', + 'cp869', 'cp874', 'cp875', 'cp932', 'cp949', 'cp950', + 'cp1006', 'cp1026', 'cp1140', 'cp1250', 'cp1251', + 'cp1252', 'cp1253', 'cp1254', 'cp1255', 'cp1256', + 'cp1257', 'cp1258', + 'gb2312', 'gb18030', + 'ascii' +] class CodingError(Exception): @@ -96,7 +98,8 @@ @param coding coding to include in the message (string) """ - self.errorMessage = QCoreApplication.translate("CodingError", + self.errorMessage = QCoreApplication.translate( + "CodingError", "The coding '{0}' is wrong for the given text.").format(coding) def __repr__(self): @@ -1162,7 +1165,8 @@ @returns help text (string) """ - return QCoreApplication.translate("Utilities", + return QCoreApplication.translate( + "Utilities", """<p>You may use %-codes as placeholders in the string.""" """ Supported codes are:""" """<table>""" @@ -1294,7 +1298,8 @@ code = "" error = "" lines = traceback.format_exception_only(SyntaxError, detail) - match = re.match('\s*File "(.+)", line (\d+)', + match = re.match( + '\s*File "(.+)", line (\d+)', lines[0].replace('<string>', '{0}'.format(file))) if match is not None: fn, line = match.group(1, 2) @@ -1405,9 +1410,9 @@ return (False, "", "", "", "", "", []) return (True, file, "1", "0", "", - QCoreApplication.translate( - "Utilities", "Python2 interpreter did not finish within 30s."), - []) + QCoreApplication.translate( + "Utilities", "Python2 interpreter did not finish within 30s."), + []) ###############################################################################
--- a/Utilities/binplistlib.py Fri Oct 18 18:00:02 2013 +0200 +++ b/Utilities/binplistlib.py Fri Oct 18 18:42:10 2013 +0200 @@ -233,10 +233,12 @@ else: return False -PlistTrailer = namedtuple('PlistTrailer', +PlistTrailer = namedtuple( + 'PlistTrailer', 'offsetSize, objectRefSize, offsetCount, topLevelObjectNumber,' ' offsetTableOffset') -PlistByteCounts = namedtuple('PlistByteCounts', +PlistByteCounts = namedtuple( + 'PlistByteCounts', 'nullBytes, boolBytes, intBytes, realBytes, dateBytes, dataBytes,' ' stringBytes, uidBytes, arrayBytes, setBytes, dictBytes') @@ -502,7 +504,8 @@ @param length length of the string (integer) @return ASCII encoded string """ - result = str(unpack("!{0}s".format(length), + result = str(unpack( + "!{0}s".format(length), self.contents[self.currentOffset:self.currentOffset + length])[0], encoding="ascii") self.currentOffset += length @@ -529,7 +532,8 @@ @return date object (datetime.datetime) """ global apple_reference_date_offset - result = unpack(">d", + result = unpack( + ">d", self.contents[self.currentOffset:self.currentOffset + 8])[0] result = datetime.datetime.utcfromtimestamp( result + apple_reference_date_offset)
--- a/Utilities/crypto/__init__.py Fri Oct 18 18:00:02 2013 +0200 +++ b/Utilities/crypto/__init__.py Fri Oct 18 18:42:10 2013 +0200 @@ -87,13 +87,15 @@ E5MessageBox.critical( None, QCoreApplication.translate("Crypto", "Master Password"), - QCoreApplication.translate("Crypto", + QCoreApplication.translate( + "Crypto", """There is no master password registered.""")) except ValueError as why: E5MessageBox.warning( None, QCoreApplication.translate("Crypto", "Master Password"), - QCoreApplication.translate("Crypto", + QCoreApplication.translate( + "Crypto", """<p>The given password cannot be verified.</p>""" """<p>Reason: {0}""".format(str(why))))
--- a/Utilities/py3flakes/messages.py Fri Oct 18 18:00:02 2013 +0200 +++ b/Utilities/py3flakes/messages.py Fri Oct 18 18:42:10 2013 +0200 @@ -49,14 +49,15 @@ (string, integer, string) """ return (self.filename, self.lineno, - self.message.format(*self.message_args)) + self.message.format(*self.message_args)) class UnusedImport(Message): """ Class defining the "Unused Import" message. """ - message = QCoreApplication.translate('py3Flakes', + message = QCoreApplication.translate( + 'py3Flakes', '{0!r} imported but unused.') def __init__(self, filename, lineno, name): @@ -75,7 +76,8 @@ """ Class defining the "Redefined While Unused" message. """ - message = QCoreApplication.translate('py3Flakes', + message = QCoreApplication.translate( + 'py3Flakes', 'Redefinition of unused {0!r} from line {1!r}.') def __init__(self, filename, lineno, name, orig_lineno): @@ -95,7 +97,8 @@ """ Class defining the "Import Shadowed By Loop Var" message. """ - message = QCoreApplication.translate('py3Flakes', + message = QCoreApplication.translate( + 'py3Flakes', 'Import {0!r} from line {1!r} shadowed by loop variable.') def __init__(self, filename, lineno, name, orig_lineno): @@ -115,7 +118,8 @@ """ Class defining the "Import Star Used" message. """ - message = QCoreApplication.translate('py3Flakes', + message = QCoreApplication.translate( + 'py3Flakes', "'from {0} import *' used; unable to detect undefined names.") def __init__(self, filename, lineno, modname): @@ -171,7 +175,8 @@ """ Class defining the "Undefined Local Variable" message. """ - message = QCoreApplication.translate('py3Flakes', + message = QCoreApplication.translate( + 'py3Flakes', "Local variable {0!r} (defined in enclosing scope on line {1!r})" " referenced before assignment.") @@ -192,7 +197,8 @@ """ Class defining the "Duplicate Argument" message. """ - message = QCoreApplication.translate('py3Flakes', + message = QCoreApplication.translate( + 'py3Flakes', 'Duplicate argument {0!r} in function definition.') def __init__(self, filename, lineno, name): @@ -211,7 +217,8 @@ """ Class defining the "Redefined Function" message. """ - message = QCoreApplication.translate('py3Flakes', + message = QCoreApplication.translate( + 'py3Flakes', 'Redefinition of function {0!r} from line {1!r}.') def __init__(self, filename, lineno, name, orig_lineno): @@ -231,7 +238,8 @@ """ Class defining the "Late Future Import" message. """ - message = QCoreApplication.translate('py3Flakes', + message = QCoreApplication.translate( + 'py3Flakes', 'Future import(s) {0!r} after other statements.') def __init__(self, filename, lineno, names): @@ -253,7 +261,8 @@ Indicates that a variable has been explicitly assigned to but not actually used. """ - message = QCoreApplication.translate('py3Flakes', + message = QCoreApplication.translate( + 'py3Flakes', 'Local variable {0!r} is assigned to but never used.') def __init__(self, filename, lineno, name):