Sat, 12 Oct 2013 18:25:29 +0200
Continued to shorten the code lines to max. 79 characters.
--- a/Preferences/ConfigurationDialog.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ConfigurationDialog.py Sat Oct 12 18:25:29 2013 +0200 @@ -11,9 +11,10 @@ import types from PyQt4.QtCore import QMetaObject, pyqtSignal, Qt, QRect, pyqtSlot -from PyQt4.QtGui import QSizePolicy, QSpacerItem, QWidget, QPixmap, QTreeWidget, \ - QStackedWidget, QDialog, QSplitter, QScrollArea, QApplication, QDialogButtonBox, \ - QFrame, QVBoxLayout, QTreeWidgetItem, QLabel +from PyQt4.QtGui import QSizePolicy, QSpacerItem, QWidget, QPixmap, \ + QTreeWidget, QStackedWidget, QDialog, QSplitter, QScrollArea, \ + QApplication, QDialogButtonBox, QFrame, QVBoxLayout, QTreeWidgetItem, \ + QLabel from E5Gui.E5Application import e5App from E5Gui.E5LineEdit import E5ClearableLineEdit @@ -37,7 +38,8 @@ """ Constructor - @param parent parent widget of the item (QTreeWidget or QTreeWidgetItem) + @param parent parent widget of the item (QTreeWidget or + QTreeWidgetItem) @param text text to be displayed (string) @param pageName name of the configuration page (string) @param iconFile file name of the icon to be shown (string) @@ -113,9 +115,9 @@ # key : [display string, pixmap name, dialog module name or # page creation function, parent key, # reference to configuration page (must always be last)] - # The dialog module must have the module function create to create - # the configuration page. This must have the method save to save - # the settings. + # The dialog module must have the module function create to + # create the configuration page. This must have the method + # save to save the settings. "applicationPage": \ [self.trUtf8("Application"), "preferences-application.png", "ApplicationPage", None, None], @@ -124,176 +126,186 @@ "CooperationPage", None, None], "corbaPage": \ [self.trUtf8("CORBA"), "preferences-orbit.png", - "CorbaPage", None, None], + "CorbaPage", None, None], "emailPage": \ [self.trUtf8("Email"), "preferences-mail_generic.png", - "EmailPage", None, None], + "EmailPage", None, None], "graphicsPage": \ [self.trUtf8("Graphics"), "preferences-graphics.png", - "GraphicsPage", None, None], + "GraphicsPage", None, None], "iconsPage": \ [self.trUtf8("Icons"), "preferences-icons.png", - "IconsPage", None, None], + "IconsPage", None, None], "ircPage": \ [self.trUtf8("IRC"), "irc.png", - "IrcPage", None, None], + "IrcPage", None, None], "networkPage": \ [self.trUtf8("Network"), "preferences-network.png", - "NetworkPage", None, None], + "NetworkPage", None, None], "notificationsPage": \ - [self.trUtf8("Notifications"), "preferences-notifications.png", - "NotificationsPage", None, None], + [self.trUtf8("Notifications"), + "preferences-notifications.png", + "NotificationsPage", None, None], "pluginManagerPage": \ - [self.trUtf8("Plugin Manager"), "preferences-pluginmanager.png", - "PluginManagerPage", None, None], + [self.trUtf8("Plugin Manager"), + "preferences-pluginmanager.png", + "PluginManagerPage", None, None], "printerPage": \ [self.trUtf8("Printer"), "preferences-printer.png", - "PrinterPage", None, None], + "PrinterPage", None, None], "pythonPage": \ [self.trUtf8("Python"), "preferences-python.png", - "PythonPage", None, None], + "PythonPage", None, None], "qtPage": \ [self.trUtf8("Qt"), "preferences-qtlogo.png", - "QtPage", None, None], + "QtPage", None, None], "securityPage": \ [self.trUtf8("Security"), "preferences-security.png", - "SecurityPage", None, None], + "SecurityPage", None, None], "shellPage": \ [self.trUtf8("Shell"), "preferences-shell.png", - "ShellPage", None, None], + "ShellPage", None, None], "tasksPage": \ [self.trUtf8("Tasks"), "task.png", - "TasksPage", None, None], + "TasksPage", None, None], "templatesPage": \ [self.trUtf8("Templates"), "preferences-template.png", - "TemplatesPage", None, None], + "TemplatesPage", None, None], "trayStarterPage": \ [self.trUtf8("Tray Starter"), "erict.png", - "TrayStarterPage", None, None], + "TrayStarterPage", None, None], "vcsPage": \ - [self.trUtf8("Version Control Systems"), "preferences-vcs.png", - "VcsPage", None, None], + [self.trUtf8("Version Control Systems"), + "preferences-vcs.png", + "VcsPage", None, None], "0debuggerPage": \ [self.trUtf8("Debugger"), "preferences-debugger.png", - None, None, None], + None, None, None], "debuggerGeneralPage": \ [self.trUtf8("General"), "preferences-debugger.png", - "DebuggerGeneralPage", "0debuggerPage", None], + "DebuggerGeneralPage", "0debuggerPage", None], "debuggerPythonPage": \ [self.trUtf8("Python"), "preferences-pyDebugger.png", - "DebuggerPythonPage", "0debuggerPage", None], + "DebuggerPythonPage", "0debuggerPage", None], "debuggerPython3Page": \ [self.trUtf8("Python3"), "preferences-pyDebugger.png", - "DebuggerPython3Page", "0debuggerPage", None], + "DebuggerPython3Page", "0debuggerPage", None], "debuggerRubyPage": \ [self.trUtf8("Ruby"), "preferences-rbDebugger.png", - "DebuggerRubyPage", "0debuggerPage", None], + "DebuggerRubyPage", "0debuggerPage", None], "0editorPage": \ [self.trUtf8("Editor"), "preferences-editor.png", - None, None, None], + None, None, None], "editorAPIsPage": \ [self.trUtf8("APIs"), "preferences-api.png", - "EditorAPIsPage", "0editorPage", None], + "EditorAPIsPage", "0editorPage", None], "editorAutocompletionPage": \ - [self.trUtf8("Autocompletion"), "preferences-autocompletion.png", - "EditorAutocompletionPage", "0editorPage", None], + [self.trUtf8("Autocompletion"), + "preferences-autocompletion.png", + "EditorAutocompletionPage", "0editorPage", None], "editorAutocompletionQScintillaPage": \ [self.trUtf8("QScintilla"), "qscintilla.png", - "EditorAutocompletionQScintillaPage", - "editorAutocompletionPage", None], + "EditorAutocompletionQScintillaPage", + "editorAutocompletionPage", None], "editorCalltipsPage": \ [self.trUtf8("Calltips"), "preferences-calltips.png", - "EditorCalltipsPage", "0editorPage", None], + "EditorCalltipsPage", "0editorPage", None], "editorCalltipsQScintillaPage": \ [self.trUtf8("QScintilla"), "qscintilla.png", - "EditorCalltipsQScintillaPage", "editorCalltipsPage", None], + "EditorCalltipsQScintillaPage", "editorCalltipsPage", + None], "editorGeneralPage": \ [self.trUtf8("General"), "preferences-general.png", - "EditorGeneralPage", "0editorPage", None], + "EditorGeneralPage", "0editorPage", None], "editorFilePage": \ - [self.trUtf8("Filehandling"), "preferences-filehandling.png", - "EditorFilePage", "0editorPage", None], + [self.trUtf8("Filehandling"), + "preferences-filehandling.png", + "EditorFilePage", "0editorPage", None], "editorSearchPage": \ [self.trUtf8("Searching"), "preferences-search.png", - "EditorSearchPage", "0editorPage", None], + "EditorSearchPage", "0editorPage", None], "editorSpellCheckingPage": \ - [self.trUtf8("Spell checking"), "preferences-spellchecking.png", - "EditorSpellCheckingPage", "0editorPage", None], + [self.trUtf8("Spell checking"), + "preferences-spellchecking.png", + "EditorSpellCheckingPage", "0editorPage", None], "editorStylesPage": \ [self.trUtf8("Style"), "preferences-styles.png", - "EditorStylesPage", "0editorPage", None], + "EditorStylesPage", "0editorPage", None], "editorSyntaxPage": \ [self.trUtf8("Code Checkers"), "preferences-debugger.png", - "EditorSyntaxPage", "0editorPage", None], + "EditorSyntaxPage", "0editorPage", None], "editorTypingPage": \ [self.trUtf8("Typing"), "preferences-typing.png", - "EditorTypingPage", "0editorPage", None], + "EditorTypingPage", "0editorPage", None], "editorExportersPage": \ [self.trUtf8("Exporters"), "preferences-exporters.png", - "EditorExportersPage", "0editorPage", None], + "EditorExportersPage", "0editorPage", None], "1editorLexerPage": \ - [self.trUtf8("Highlighters"), "preferences-highlighting-styles.png", - None, "0editorPage", None], + [self.trUtf8("Highlighters"), + "preferences-highlighting-styles.png", + None, "0editorPage", None], "editorHighlightersPage": \ [self.trUtf8("Filetype Associations"), - "preferences-highlighter-association.png", - "EditorHighlightersPage", "1editorLexerPage", None], + "preferences-highlighter-association.png", + "EditorHighlightersPage", "1editorLexerPage", None], "editorHighlightingStylesPage": \ [self.trUtf8("Styles"), - "preferences-highlighting-styles.png", - "EditorHighlightingStylesPage", "1editorLexerPage", None], + "preferences-highlighting-styles.png", + "EditorHighlightingStylesPage", "1editorLexerPage", None], "editorKeywordsPage": \ [self.trUtf8("Keywords"), "preferences-keywords.png", "EditorKeywordsPage", "1editorLexerPage", None], "editorPropertiesPage": \ [self.trUtf8("Properties"), "preferences-properties.png", - "EditorPropertiesPage", "1editorLexerPage", None], + "EditorPropertiesPage", "1editorLexerPage", None], "0helpPage": \ [self.trUtf8("Help"), "preferences-help.png", - None, None, None], + None, None, None], "helpAppearancePage": \ [self.trUtf8("Appearance"), "preferences-styles.png", - "HelpAppearancePage", "0helpPage", None], + "HelpAppearancePage", "0helpPage", None], "helpDocumentationPage": \ [self.trUtf8("Help Documentation"), - "preferences-helpdocumentation.png", - "HelpDocumentationPage", "0helpPage", None], + "preferences-helpdocumentation.png", + "HelpDocumentationPage", "0helpPage", None], "helpViewersPage": \ - [self.trUtf8("Help Viewers"), "preferences-helpviewers.png", - "HelpViewersPage", "0helpPage", None], + [self.trUtf8("Help Viewers"), + "preferences-helpviewers.png", + "HelpViewersPage", "0helpPage", None], "helpVirusTotalPage": \ [self.trUtf8("VirusTotal Interface"), "virustotal.png", - "HelpVirusTotalPage", "0helpPage", None], + "HelpVirusTotalPage", "0helpPage", None], "helpWebBrowserPage": \ [self.trUtf8("eric5 Web Browser"), "ericWeb.png", - "HelpWebBrowserPage", "0helpPage", None], + "HelpWebBrowserPage", "0helpPage", None], "0projectPage": \ [self.trUtf8("Project"), "preferences-project.png", - None, None, None], + None, None, None], "projectBrowserPage": \ [self.trUtf8("Project Viewer"), "preferences-project.png", - "ProjectBrowserPage", "0projectPage", None], + "ProjectBrowserPage", "0projectPage", None], "projectPage": \ [self.trUtf8("Project"), "preferences-project.png", - "ProjectPage", "0projectPage", None], + "ProjectPage", "0projectPage", None], "multiProjectPage": \ - [self.trUtf8("Multiproject"), "preferences-multiproject.png", - "MultiProjectPage", "0projectPage", None], + [self.trUtf8("Multiproject"), + "preferences-multiproject.png", + "MultiProjectPage", "0projectPage", None], "0interfacePage": \ [self.trUtf8("Interface"), "preferences-interface.png", - None, None, None], + None, None, None], "interfacePage": \ [self.trUtf8("Interface"), "preferences-interface.png", - "InterfacePage", "0interfacePage", None], + "InterfacePage", "0interfacePage", None], "viewmanagerPage": \ [self.trUtf8("Viewmanager"), "preferences-viewmanager.png", - "ViewmanagerPage", "0interfacePage", None], + "ViewmanagerPage", "0interfacePage", None], } self.configItems.update( @@ -303,50 +315,50 @@ # key : [display string, pixmap name, dialog module name or # page creation function, parent key, # reference to configuration page (must always be last)] - # The dialog module must have the module function create to create - # the configuration page. This must have the method save to save - # the settings. + # The dialog module must have the module function create to + # create the configuration page. This must have the method + # save to save the settings. "interfacePage": \ [self.trUtf8("Interface"), "preferences-interface.png", - "HelpInterfacePage", None, None], + "HelpInterfacePage", None, None], "networkPage": \ [self.trUtf8("Network"), "preferences-network.png", "NetworkPage", None, None], "printerPage": \ [self.trUtf8("Printer"), "preferences-printer.png", - "PrinterPage", None, None], + "PrinterPage", None, None], "securityPage": \ [self.trUtf8("Security"), "preferences-security.png", - "SecurityPage", None, None], + "SecurityPage", None, None], "0helpPage": \ [self.trUtf8("Help"), "preferences-help.png", - None, None, None], + None, None, None], "helpAppearancePage": \ [self.trUtf8("Appearance"), "preferences-styles.png", - "HelpAppearancePage", "0helpPage", None], + "HelpAppearancePage", "0helpPage", None], "helpDocumentationPage": \ [self.trUtf8("Help Documentation"), - "preferences-helpdocumentation.png", - "HelpDocumentationPage", "0helpPage", None], + "preferences-helpdocumentation.png", + "HelpDocumentationPage", "0helpPage", None], "helpVirusTotalPage": \ [self.trUtf8("VirusTotal Interface"), "virustotal.png", - "HelpVirusTotalPage", "0helpPage", None], + "HelpVirusTotalPage", "0helpPage", None], "helpWebBrowserPage": \ [self.trUtf8("eric5 Web Browser"), "ericWeb.png", - "HelpWebBrowserPage", "0helpPage", None], + "HelpWebBrowserPage", "0helpPage", None], } elif displayMode == ConfigurationWidget.TrayStarterMode: self.configItems = { # key : [display string, pixmap name, dialog module name or # page creation function, parent key, # reference to configuration page (must always be last)] - # The dialog module must have the module function create to create - # the configuration page. This must have the method save to save - # the settings. + # The dialog module must have the module function create to + # create the configuration page. This must have the method + # save to save the settings. "trayStarterPage": \ [self.trUtf8("Tray Starter"), "erict.png", - "TrayStarterPage", None, None], + "TrayStarterPage", None, None], } else: raise RuntimeError("Illegal mode value: {0}".format(displayMode)) @@ -358,7 +370,8 @@ pitm = self.itmDict[pageData[3]] # get the parent item else: pitm = self.configList - self.itmDict[key] = ConfigurationPageItem(pitm, pageData[0], key, pageData[1]) + self.itmDict[key] = ConfigurationPageItem(pitm, pageData[0], key, + pageData[1]) self.itmDict[key].setExpanded(True) self.configList.sortByColumn(0, Qt.AscendingOrder) @@ -386,7 +399,8 @@ def __setupUi(self): """ - Private method to perform the general setup of the configuration widget. + Private method to perform the general setup of the configuration + widget. """ self.setObjectName("ConfigurationDialog") self.resize(900, 650) @@ -433,7 +447,8 @@ self.vboxlayout.setSpacing(6) self.vboxlayout.setContentsMargins(6, 6, 6, 6) self.vboxlayout.setObjectName("vboxlayout") - spacerItem = QSpacerItem(20, 20, QSizePolicy.Minimum, QSizePolicy.Expanding) + spacerItem = QSpacerItem( + 20, 20, QSizePolicy.Minimum, QSizePolicy.Expanding) self.vboxlayout.addItem(spacerItem) self.emptyPagePixmap = QLabel(self.emptyPage) self.emptyPagePixmap.setAlignment(Qt.AlignCenter) @@ -445,7 +460,8 @@ self.textLabel1.setAlignment(Qt.AlignCenter) self.textLabel1.setObjectName("textLabel1") self.vboxlayout.addWidget(self.textLabel1) - spacerItem1 = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding) + spacerItem1 = QSpacerItem( + 20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding) self.vboxlayout.addItem(spacerItem1) self.configStack.addWidget(self.emptyPage) @@ -457,7 +473,8 @@ QDialogButtonBox.Apply | QDialogButtonBox.Cancel | \ QDialogButtonBox.Ok | QDialogButtonBox.Reset) self.buttonBox.setObjectName("buttonBox") - if not self.fromEric and self.displayMode == ConfigurationWidget.DefaultMode: + if not self.fromEric and \ + self.displayMode == ConfigurationWidget.DefaultMode: self.buttonBox.button(QDialogButtonBox.Apply).hide() self.buttonBox.button(QDialogButtonBox.Apply).setEnabled(False) self.buttonBox.button(QDialogButtonBox.Reset).setEnabled(False) @@ -468,8 +485,9 @@ self.configList.header().hide() self.configList.header().setSortIndicator(0, Qt.AscendingOrder) self.configList.setSortingEnabled(True) - self.textLabel1.setText(self.trUtf8("Please select an entry of the list \n" - "to display the configuration page.")) + self.textLabel1.setText( + self.trUtf8("Please select an entry of the list \n" + "to display the configuration page.")) QMetaObject.connectSlotsByName(self) self.setTabOrder(self.configList, self.configStack) @@ -513,7 +531,8 @@ Private method to initialize the dictionary of preferences lexers. """ import QScintilla.Lexers - from .PreferencesLexer import PreferencesLexer, PreferencesLexerLanguageError + from .PreferencesLexer import PreferencesLexer, \ + PreferencesLexerLanguageError self.lexers = {} for language in QScintilla.Lexers.getSupportedLanguages(): @@ -604,10 +623,12 @@ ssize = self.scrollArea.size() if self.scrollArea.horizontalScrollBar(): ssize.setHeight( - ssize.height() - self.scrollArea.horizontalScrollBar().height() - 2) + ssize.height() - + self.scrollArea.horizontalScrollBar().height() - 2) if self.scrollArea.verticalScrollBar(): ssize.setWidth( - ssize.width() - self.scrollArea.verticalScrollBar().width() - 2) + ssize.width() - + self.scrollArea.verticalScrollBar().width() - 2) psize = page.minimumSizeHint() self.configStack.resize(max(ssize.width(), psize.width()), max(ssize.height(), psize.height())) @@ -664,7 +685,8 @@ def setPreferences(self): """ - Public method called to store the selected values into the preferences storage. + Public method called to store the selected values into the preferences + storage. """ for key, pageData in list(self.configItems.items()): if pageData[-1]: @@ -795,7 +817,8 @@ def setPreferences(self): """ - Public method called to store the selected values into the preferences storage. + Public method called to store the selected values into the preferences + storage. """ self.cw.setPreferences() @@ -823,7 +846,8 @@ self.setCentralWidget(self.cw) self.resize(size) - self.setStyle(Preferences.getUI("Style"), Preferences.getUI("StyleSheet")) + self.setStyle(Preferences.getUI("Style"), + Preferences.getUI("StyleSheet")) self.cw.accepted[()].connect(self.accept) self.cw.rejected[()].connect(self.close)
--- a/Preferences/ConfigurationPages/ConfigurationPageBase.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ConfigurationPages/ConfigurationPageBase.py Sat Oct 12 18:25:29 2013 +0200 @@ -8,7 +8,8 @@ """ from PyQt4.QtCore import pyqtSlot -from PyQt4.QtGui import QWidget, QIcon, QPixmap, QColor, QColorDialog, QFontDialog +from PyQt4.QtGui import QWidget, QIcon, QPixmap, QColor, QColorDialog, \ + QFontDialog class ConfigurationPageBase(QWidget): @@ -43,14 +44,16 @@ """ return - def initColour(self, colourKey, button, prefMethod, byName=False, hasAlpha=False): + def initColour(self, colourKey, button, prefMethod, byName=False, + hasAlpha=False): """ Public method to initialize a colour selection button. @param colourKey key of the colour resource (string) @param button reference to a button to show the colour on (QPushButton) @param prefMethod preferences method to get the colour - @keyparam byName flag indicating to retrieve/save by colour name (boolean) + @keyparam byName flag indicating to retrieve/save by colour name + (boolean) @keyparam hasAlpha flag indicating to allow alpha channel (boolean) """ colour = QColor(prefMethod(colourKey)) @@ -74,7 +77,8 @@ hasAlpha = button.property("hasAlpha") if hasAlpha: - colour = QColorDialog.getColor(self.__coloursDict[colorKey][0], None, "", + colour = QColorDialog.getColor( + self.__coloursDict[colorKey][0], None, "", QColorDialog.ShowAlphaChannel) else: colour = QColorDialog.getColor(self.__coloursDict[colorKey][0])
--- a/Preferences/ConfigurationPages/DebuggerGeneralPage.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ConfigurationPages/DebuggerGeneralPage.py Sat Oct 12 18:25:29 2013 +0200 @@ -54,7 +54,8 @@ self.consoleDbgEdit.setWhatsThis(t) self.consoleDbgCompleter = E5FileCompleter(self.consoleDbgEdit) - self.dbgTranslationLocalCompleter = E5DirCompleter(self.dbgTranslationLocalEdit) + self.dbgTranslationLocalCompleter = E5DirCompleter( + self.dbgTranslationLocalEdit) # set initial values interfaces = [] @@ -63,11 +64,13 @@ addressEntries = networkInterface.addressEntries() if len(addressEntries) > 0: for addressEntry in addressEntries: - if ":" in addressEntry.ip().toString() and not socket.has_ipv6: + if ":" in addressEntry.ip().toString() and \ + not socket.has_ipv6: continue # IPv6 not supported by Python - interfaces.append("{0} ({1})"\ - .format(networkInterface.humanReadableName(), - addressEntry.ip().toString())) + interfaces.append( + "{0} ({1})".format( + networkInterface.humanReadableName(), + addressEntry.ip().toString())) self.interfacesCombo.addItems(interfaces) interface = Preferences.getDebugger("NetworkInterface") if not socket.has_ipv6: @@ -83,7 +86,8 @@ self.selectedInterfaceButton.setChecked(True) index = -1 for i in range(len(interfaces)): - if QRegExp(".*{0}.*".format(interface)).exactMatch(interfaces[i]): + if QRegExp(".*{0}.*".format(interface))\ + .exactMatch(interfaces[i]): index = i break self.interfacesCombo.setCurrentIndex(index) @@ -225,8 +229,10 @@ else: E5MessageBox.critical(self, self.trUtf8("Add allowed host"), - self.trUtf8("""<p>The entered address <b>{0}</b> is not""" - """ a valid IP v4 or IP v6 address. Aborting...</p>""")\ + self.trUtf8( + """<p>The entered address <b>{0}</b> is not""" + """ a valid IP v4 or IP v6 address.""" + """ Aborting...</p>""")\ .format(allowedHost)) @pyqtSlot() @@ -255,8 +261,10 @@ else: E5MessageBox.critical(self, self.trUtf8("Edit allowed host"), - self.trUtf8("""<p>The entered address <b>{0}</b> is not""" - """ a valid IP v4 or IP v6 address. Aborting...</p>""")\ + self.trUtf8( + """<p>The entered address <b>{0}</b> is not""" + """ a valid IP v4 or IP v6 address.""" + """ Aborting...</p>""")\ .format(allowedHost))
--- a/Preferences/ConfigurationPages/DebuggerRubyPage.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ConfigurationPages/DebuggerRubyPage.py Sat Oct 12 18:25:29 2013 +0200 @@ -31,7 +31,8 @@ self.setupUi(self) self.setObjectName("DebuggerRubyPage") - self.rubyInterpreterCompleter = E5FileCompleter(self.rubyInterpreterEdit) + self.rubyInterpreterCompleter = E5FileCompleter( + self.rubyInterpreterEdit) # set initial values self.rubyInterpreterEdit.setText(
--- a/Preferences/ConfigurationPages/EditorAPIsPage.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ConfigurationPages/EditorAPIsPage.py Sat Oct 12 18:25:29 2013 +0200 @@ -108,7 +108,8 @@ self.addInstalledApiFileButton.setEnabled(False) self.addPluginApiFileButton.setEnabled( - len(self.pluginManager.getPluginApiFiles(self.currentApiLanguage)) > 0) + len(self.pluginManager.getPluginApiFiles(self.currentApiLanguage)) + > 0) def __editorGetApisFromApiList(self): """ @@ -166,7 +167,8 @@ installedAPIFilesPath = QFileInfo(installedAPIFiles[0]).path() installedAPIFilesShort = [] for installedAPIFile in installedAPIFiles: - installedAPIFilesShort.append(QFileInfo(installedAPIFile).fileName()) + installedAPIFilesShort.append( + QFileInfo(installedAPIFile).fileName()) file, ok = QInputDialog.getItem( self, self.trUtf8("Add from installed APIs"), @@ -175,7 +177,8 @@ 0, False) if ok: self.apiList.addItem(Utilities.toNativeSeparators( - QFileInfo(QDir(installedAPIFilesPath), file).absoluteFilePath())) + QFileInfo(QDir(installedAPIFilesPath), file) + .absoluteFilePath())) else: E5MessageBox.warning(self, self.trUtf8("Add from installed APIs"), @@ -189,7 +192,8 @@ Private slot to add an API file from the list of API files installed by plugins for the selected lexer language. """ - pluginAPIFiles = self.pluginManager.getPluginApiFiles(self.currentApiLanguage) + pluginAPIFiles = self.pluginManager.getPluginApiFiles( + self.currentApiLanguage) pluginAPIFilesDict = {} for apiFile in pluginAPIFiles: pluginAPIFilesDict[QFileInfo(apiFile).fileName()] = apiFile @@ -207,7 +211,8 @@ @pyqtSlot() def on_prepareApiButton_clicked(self): """ - Private slot to prepare the API file for the currently selected language. + Private slot to prepare the API file for the currently selected + language. """ if self.__inPreparation: self.__currentAPI and self.__currentAPI.cancelPreparation() @@ -257,7 +262,8 @@ @param state state data generated by saveState """ self.apiLanguageComboBox.setCurrentIndex(state) - self.on_apiLanguageComboBox_activated(self.apiLanguageComboBox.currentText()) + self.on_apiLanguageComboBox_activated( + self.apiLanguageComboBox.currentText()) def create(dlg):
--- a/Preferences/ConfigurationPages/EditorAutocompletionPage.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ConfigurationPages/EditorAutocompletionPage.py Sat Oct 12 18:25:29 2013 +0200 @@ -13,7 +13,8 @@ import Preferences -class EditorAutocompletionPage(ConfigurationPageBase, Ui_EditorAutocompletionPage): +class EditorAutocompletionPage(ConfigurationPageBase, + Ui_EditorAutocompletionPage): """ Class implementing the Editor Autocompletion configuration page. """
--- a/Preferences/ConfigurationPages/EditorAutocompletionQScintillaPage.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ConfigurationPages/EditorAutocompletionQScintillaPage.py Sat Oct 12 18:25:29 2013 +0200 @@ -10,13 +10,14 @@ from PyQt4.Qsci import QsciScintilla from .ConfigurationPageBase import ConfigurationPageBase -from .Ui_EditorAutocompletionQScintillaPage import Ui_EditorAutocompletionQScintillaPage +from .Ui_EditorAutocompletionQScintillaPage import \ + Ui_EditorAutocompletionQScintillaPage import Preferences -class EditorAutocompletionQScintillaPage(ConfigurationPageBase, - Ui_EditorAutocompletionQScintillaPage): +class EditorAutocompletionQScintillaPage( + ConfigurationPageBase, Ui_EditorAutocompletionQScintillaPage): """ Class implementing the QScintilla Autocompletion configuration page. """ @@ -46,14 +47,16 @@ """ Public slot to save the Editor Autocompletion configuration. """ - Preferences.setEditor("AutoCompletionShowSingle", - self.acShowSingleCheckBox.isChecked()) - Preferences.setEditor("AutoCompletionFillups", - self.acFillupsCheckBox.isChecked()) + Preferences.setEditor( + "AutoCompletionShowSingle", self.acShowSingleCheckBox.isChecked()) + Preferences.setEditor( + "AutoCompletionFillups", self.acFillupsCheckBox.isChecked()) if self.acSourceDocumentRadioButton.isChecked(): - Preferences.setEditor("AutoCompletionSource", QsciScintilla.AcsDocument) + Preferences.setEditor( + "AutoCompletionSource", QsciScintilla.AcsDocument) elif self.acSourceAPIsRadioButton.isChecked(): - Preferences.setEditor("AutoCompletionSource", QsciScintilla.AcsAPIs) + Preferences.setEditor( + "AutoCompletionSource", QsciScintilla.AcsAPIs) elif self.acSourceAllRadioButton.isChecked(): Preferences.setEditor("AutoCompletionSource", QsciScintilla.AcsAll)
--- a/Preferences/ConfigurationPages/EditorCalltipsPage.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ConfigurationPages/EditorCalltipsPage.py Sat Oct 12 18:25:29 2013 +0200 @@ -50,8 +50,9 @@ Preferences.getEditor("CallTipsScintillaOnFail")) if QSCINTILLA_VERSION() >= 0x020700: - self.positionComboBox.setCurrentIndex(self.positionComboBox.findData( - Preferences.getEditor("CallTipsPosition"))) + self.positionComboBox.setCurrentIndex( + self.positionComboBox.findData( + Preferences.getEditor("CallTipsPosition"))) def save(self): """ @@ -69,7 +70,8 @@ if QSCINTILLA_VERSION() >= 0x020700: Preferences.setEditor("CallTipsPosition", - self.positionComboBox.itemData(self.positionComboBox.currentIndex())) + self.positionComboBox.itemData( + self.positionComboBox.currentIndex())) def create(dlg):
--- a/Preferences/ConfigurationPages/EditorCalltipsQScintillaPage.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ConfigurationPages/EditorCalltipsQScintillaPage.py Sat Oct 12 18:25:29 2013 +0200 @@ -42,14 +42,14 @@ Public slot to save the EditorCalltips configuration. """ if self.ctNoContextButton.isChecked(): - Preferences.setEditor("CallTipsStyle", - QsciScintilla.CallTipsNoContext) + Preferences.setEditor( + "CallTipsStyle", QsciScintilla.CallTipsNoContext) elif self.ctNoAutoCompletionButton.isChecked(): - Preferences.setEditor("CallTipsStyle", - QsciScintilla.CallTipsNoAutoCompletionContext) + Preferences.setEditor( + "CallTipsStyle", QsciScintilla.CallTipsNoAutoCompletionContext) elif self.ctContextButton.isChecked(): - Preferences.setEditor("CallTipsStyle", - QsciScintilla.CallTipsContext) + Preferences.setEditor( + "CallTipsStyle", QsciScintilla.CallTipsContext) def create(dlg):
--- a/Preferences/ConfigurationPages/EditorExportersPage.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ConfigurationPages/EditorExportersPage.py Sat Oct 12 18:25:29 2013 +0200 @@ -131,7 +131,8 @@ Preferences.setEditorExporter("PDF/Font", self.pdfFontCombo.itemData(self.pdfFontCombo.currentIndex())) Preferences.setEditorExporter("PDF/PageSize", - self.pdfPageSizeCombo.itemData(self.pdfPageSizeCombo.currentIndex())) + self.pdfPageSizeCombo.itemData( + self.pdfPageSizeCombo.currentIndex())) Preferences.setEditorExporter("PDF/MarginTop", self.pdfMarginTopSpin.value()) Preferences.setEditorExporter("PDF/MarginBottom",
--- a/Preferences/ConfigurationPages/EditorFilePage.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ConfigurationPages/EditorFilePage.py Sat Oct 12 18:25:29 2013 +0200 @@ -33,8 +33,10 @@ self.setObjectName("EditorFilePage") self.__showsOpenFilters = True - self.openFileFilters = Preferences.getEditor("AdditionalOpenFilters")[:] - self.saveFileFilters = Preferences.getEditor("AdditionalSaveFilters")[:] + self.openFileFilters = \ + Preferences.getEditor("AdditionalOpenFilters")[:] + self.saveFileFilters = \ + Preferences.getEditor("AdditionalSaveFilters")[:] self.fileFiltersList.addItems(self.openFileFilters) self.__setDefaultFiltersLists() @@ -79,7 +81,8 @@ self.previewHtmlExtensionsEdit.setText( " ".join(Preferences.getEditor("PreviewHtmlFileNameExtensions"))) self.previewMarkdownExtensionsEdit.setText( - " ".join(Preferences.getEditor("PreviewMarkdownFileNameExtensions"))) + " ".join( + Preferences.getEditor("PreviewMarkdownFileNameExtensions"))) self.previewRestExtensionsEdit.setText( " ".join(Preferences.getEditor("PreviewRestFileNameExtensions"))) @@ -124,11 +127,14 @@ Preferences.setEditor("AdditionalSaveFilters", self.saveFileFilters) Preferences.setEditor("PreviewHtmlFileNameExtensions", - [ext.strip() for ext in self.previewHtmlExtensionsEdit.text().split()]) + [ext.strip() for ext in + self.previewHtmlExtensionsEdit.text().split()]) Preferences.setEditor("PreviewMarkdownFileNameExtensions", - [ext.strip() for ext in self.previewMarkdownExtensionsEdit.text().split()]) + [ext.strip() for ext in + self.previewMarkdownExtensionsEdit.text().split()]) Preferences.setEditor("PreviewRestFileNameExtensions", - [ext.strip() for ext in self.previewRestExtensionsEdit.text().split()]) + [ext.strip() for ext in + self.previewRestExtensionsEdit.text().split()]) def __setDefaultFiltersLists(self, keepSelection=False): """ @@ -142,15 +148,13 @@ selectedSaveFilter = self.saveFilesFilterComboBox.currentText() import QScintilla.Lexers - openFileFiltersList = \ - QScintilla.Lexers.getOpenFileFiltersList(False, withAdditional=False) + \ - self.openFileFilters + openFileFiltersList = QScintilla.Lexers.getOpenFileFiltersList( + False, withAdditional=False) + self.openFileFilters openFileFiltersList.sort() self.openFilesFilterComboBox.clear() self.openFilesFilterComboBox.addItems(openFileFiltersList) - saveFileFiltersList = \ - QScintilla.Lexers.getSaveFileFiltersList(False, withAdditional=False) + \ - self.saveFileFilters + saveFileFiltersList = QScintilla.Lexers.getSaveFileFiltersList( + False, withAdditional=False) + self.saveFileFilters saveFileFiltersList.sort() self.saveFilesFilterComboBox.clear() self.saveFilesFilterComboBox.addItems(saveFileFiltersList)
--- a/Preferences/ConfigurationPages/EditorHighlightersPage.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ConfigurationPages/EditorHighlightersPage.py Sat Oct 12 18:25:29 2013 +0200 @@ -34,7 +34,8 @@ self.setupUi(self) self.setObjectName("EditorHighlightersPage") - self.editorLexerList.headerItem().setText(self.editorLexerList.columnCount(), "") + self.editorLexerList.headerItem().setText( + self.editorLexerList.columnCount(), "") header = self.editorLexerList.header() if qVersion() >= "5.0.0": header.setSectionResizeMode(QHeaderView.ResizeToContents)
--- a/Preferences/ConfigurationPages/EditorHighlightingStylesPage.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ConfigurationPages/EditorHighlightingStylesPage.py Sat Oct 12 18:25:29 2013 +0200 @@ -43,7 +43,8 @@ act = self.__fontButtonMenu.addAction(self.trUtf8("Font")) act.setData(self.FONT) self.__fontButtonMenu.addSeparator() - act = self.__fontButtonMenu.addAction(self.trUtf8("Family and Size only")) + act = self.__fontButtonMenu.addAction( + self.trUtf8("Family and Size only")) act.setData(self.FAMILYANDSIZE) act = self.__fontButtonMenu.addAction(self.trUtf8("Family only")) act.setData(self.FAMILYONLY) @@ -56,13 +57,15 @@ act = self.__allFontsButtonMenu.addAction(self.trUtf8("Font")) act.setData(self.FONT) self.__allFontsButtonMenu.addSeparator() - act = self.__allFontsButtonMenu.addAction(self.trUtf8("Family and Size only")) + act = self.__allFontsButtonMenu.addAction( + self.trUtf8("Family and Size only")) act.setData(self.FAMILYANDSIZE) act = self.__allFontsButtonMenu.addAction(self.trUtf8("Family only")) act.setData(self.FAMILYONLY) act = self.__allFontsButtonMenu.addAction(self.trUtf8("Size only")) act.setData(self.SIZEONLY) - self.__allFontsButtonMenu.triggered.connect(self.__allFontsButtonMenuTriggered) + self.__allFontsButtonMenu.triggered.connect( + self.__allFontsButtonMenuTriggered) self.allFontsButton.setMenu(self.__allFontsButtonMenu) self.lexer = None @@ -133,8 +136,8 @@ @pyqtSlot() def on_foregroundButton_clicked(self): """ - Private method used to select the foreground colour of the selected style - and lexer. + Private method used to select the foreground colour of the selected + style and lexer. """ colour = QColorDialog.getColor(self.lexer.color(self.style)) if colour.isValid(): @@ -144,7 +147,8 @@ self.sampleText.repaint() if len(self.styleElementList.selectedItems()) > 1: for selItem in self.styleElementList.selectedItems(): - style = self.lexer.ind2style[self.styleElementList.row(selItem)] + style = self.lexer.ind2style[ + self.styleElementList.row(selItem)] self.lexer.setColor(colour, style) else: self.lexer.setColor(colour, self.style) @@ -152,8 +156,8 @@ @pyqtSlot() def on_backgroundButton_clicked(self): """ - Private method used to select the background colour of the selected style - and lexer. + Private method used to select the background colour of the selected + style and lexer. """ colour = QColorDialog.getColor(self.lexer.paper(self.style)) if colour.isValid(): @@ -163,7 +167,8 @@ self.sampleText.repaint() if len(self.styleElementList.selectedItems()) > 1: for selItem in self.styleElementList.selectedItems(): - style = self.lexer.ind2style[self.styleElementList.row(selItem)] + style = self.lexer.ind2style[ + self.styleElementList.row(selItem)] self.lexer.setPaper(colour, style) else: self.lexer.setPaper(colour, self.style) @@ -187,7 +192,8 @@ """ Private slot to change the highlighter font. - @param doAll flag indicating to change the font for all styles (boolean) + @param doAll flag indicating to change the font for all styles + (boolean) @param familyOnly flag indicating to set the font family only (boolean) @param sizeOnly flag indicating to set the font size only (boolean """ @@ -197,7 +203,8 @@ @param font font to be set (QFont) @param style style to set the font for (integer) - @param familyOnly flag indicating to set the font family only (boolean) + @param familyOnly flag indicating to set the font family only + (boolean) @param sizeOnly flag indicating to set the font size only (boolean """ if familyOnly or sizeOnly: @@ -215,7 +222,8 @@ Local function to set the font of the sample text. @param font font to be set (QFont) - @param familyOnly flag indicating to set the font family only (boolean) + @param familyOnly flag indicating to set the font family only + (boolean) @param sizeOnly flag indicating to set the font size only (boolean """ if familyOnly or sizeOnly: @@ -236,7 +244,8 @@ setFont(font, style, familyOnly, sizeOnly) elif len(self.styleElementList.selectedItems()) > 1: for selItem in self.styleElementList.selectedItems(): - style = self.lexer.ind2style[self.styleElementList.row(selItem)] + style = self.lexer.ind2style[ + self.styleElementList.row(selItem)] setFont(font, style, familyOnly, sizeOnly) else: setFont(font, self.style, familyOnly, sizeOnly) @@ -269,7 +278,8 @@ def on_eolfillCheckBox_toggled(self, b): """ - Private method used to set the eolfill for the selected style and lexer. + Private method used to set the eolfill for the selected style and + lexer. @param b Flag indicating enabled or disabled state. """ @@ -278,7 +288,8 @@ @pyqtSlot() def on_allEolFillButton_clicked(self): """ - Private method used to set the eolfill for all styles of a selected lexer. + Private method used to set the eolfill for all styles of a selected + lexer. """ on = self.trUtf8("Enabled") off = self.trUtf8("Disabled") @@ -301,11 +312,13 @@ """ if len(self.styleElementList.selectedItems()) > 1: for selItem in self.styleElementList.selectedItems(): - style = self.lexer.ind2style[self.styleElementList.row(selItem)] + style = self.lexer.ind2style[ + self.styleElementList.row(selItem)] self.__setToDefault(style) else: self.__setToDefault(self.style) - self.on_styleElementList_currentRowChanged(self.styleElementList.currentRow()) + self.on_styleElementList_currentRowChanged( + self.styleElementList.currentRow()) @pyqtSlot() def on_allDefaultButton_clicked(self): @@ -314,7 +327,8 @@ """ for style in list(self.lexer.ind2style.values()): self.__setToDefault(style) - self.on_styleElementList_currentRowChanged(self.styleElementList.currentRow()) + self.on_styleElementList_currentRowChanged( + self.styleElementList.currentRow()) def __setToDefault(self, style): """ @@ -386,8 +400,9 @@ else: E5MessageBox.critical(self, self.trUtf8("Export Highlighting Styles"), - self.trUtf8("""<p>The highlighting styles could not be exported""" - """ to file <b>{0}</b>.</p><p>Reason: {1}</p>""")\ + self.trUtf8( + """<p>The highlighting styles could not be exported""" + """ to file <b>{0}</b>.</p><p>Reason: {1}</p>""")\ .format(fn, f.errorString()) ) @@ -395,7 +410,8 @@ """ Private method to import the styles of the given lexers. - @param lexers dictionary of lexer objects for which to import the styles + @param lexers dictionary of lexer objects for which to import the + styles """ fn = E5FileDialog.getOpenFileName( self, @@ -415,8 +431,9 @@ else: E5MessageBox.critical(self, self.trUtf8("Import Highlighting Styles"), - self.trUtf8("""<p>The highlighting styles could not be read""" - """ from file <b>{0}</b>.</p><p>Reason: {1}</p>""")\ + self.trUtf8( + """<p>The highlighting styles could not be read""" + """ from file <b>{0}</b>.</p><p>Reason: {1}</p>""")\ .format(fn, f.errorString()) ) return @@ -439,8 +456,8 @@ """ Public method to save the current state of the widget. - @return array containing the index of the selected lexer language (integer) - and the index of the selected lexer entry (integer) + @return array containing the index of the selected lexer language + (integer) and the index of the selected lexer entry (integer) """ savedState = [ self.lexerLanguageComboBox.currentIndex(), @@ -455,7 +472,8 @@ @param state state data generated by saveState """ self.lexerLanguageComboBox.setCurrentIndex(state[0]) - self.on_lexerLanguageComboBox_activated(self.lexerLanguageComboBox.currentText()) + self.on_lexerLanguageComboBox_activated( + self.lexerLanguageComboBox.currentText()) self.styleElementList.setCurrentRow(state[1])
--- a/Preferences/ConfigurationPages/EditorSpellCheckingPage.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ConfigurationPages/EditorSpellCheckingPage.py Sat Oct 12 18:25:29 2013 +0200 @@ -19,7 +19,8 @@ import Utilities -class EditorSpellCheckingPage(ConfigurationPageBase, Ui_EditorSpellCheckingPage): +class EditorSpellCheckingPage(ConfigurationPageBase, + Ui_EditorSpellCheckingPage): """ Class implementing the Editor Spellchecking configuration page. """ @@ -58,39 +59,46 @@ self.initColour("SpellingMarkers", self.spellingMarkerButton, Preferences.getEditorColour, hasAlpha=True) - self.pwlEdit.setText(Preferences.getEditor("SpellCheckingPersonalWordList")) - self.pelEdit.setText(Preferences.getEditor("SpellCheckingPersonalExcludeList")) + self.pwlEdit.setText( + Preferences.getEditor("SpellCheckingPersonalWordList")) + self.pelEdit.setText( + Preferences.getEditor("SpellCheckingPersonalExcludeList")) if self.spellingFrame.isEnabled(): self.enabledCheckBox.setChecked( Preferences.getEditor("AutoSpellCheckingEnabled")) else: self.enabledCheckBox.setChecked(False) # not available - self.chunkSizeSpinBox.setValue(Preferences.getEditor("AutoSpellCheckChunkSize")) + self.chunkSizeSpinBox.setValue( + Preferences.getEditor("AutoSpellCheckChunkSize")) def save(self): """ Public slot to save the Editor Search configuration. """ - Preferences.setEditor("SpellCheckingEnabled", - self.checkingEnabledCheckBox.isChecked()) + Preferences.setEditor( + "SpellCheckingEnabled", self.checkingEnabledCheckBox.isChecked()) - Preferences.setEditor("SpellCheckingDefaultLanguage", + Preferences.setEditor( + "SpellCheckingDefaultLanguage", self.defaultLanguageCombo.currentText()) - Preferences.setEditor("SpellCheckStringsOnly", - self.stringsOnlyCheckBox.isChecked()) - Preferences.setEditor("SpellCheckingMinWordSize", - self.minimumWordSizeSlider.value()) + Preferences.setEditor( + "SpellCheckStringsOnly", self.stringsOnlyCheckBox.isChecked()) + Preferences.setEditor( + "SpellCheckingMinWordSize", self.minimumWordSizeSlider.value()) self.saveColours(Preferences.setEditorColour) - Preferences.setEditor("SpellCheckingPersonalWordList", self.pwlEdit.text()) - Preferences.setEditor("SpellCheckingPersonalExcludeList", self.pelEdit.text()) + Preferences.setEditor( + "SpellCheckingPersonalWordList", self.pwlEdit.text()) + Preferences.setEditor( + "SpellCheckingPersonalExcludeList", self.pelEdit.text()) - Preferences.setEditor("AutoSpellCheckingEnabled", - self.enabledCheckBox.isChecked()) - Preferences.setEditor("AutoSpellCheckChunkSize", self.chunkSizeSpinBox.value()) + Preferences.setEditor( + "AutoSpellCheckingEnabled", self.enabledCheckBox.isChecked()) + Preferences.setEditor( + "AutoSpellCheckChunkSize", self.chunkSizeSpinBox.value()) @pyqtSlot() def on_pwlButton_clicked(self):
--- a/Preferences/ConfigurationPages/EmailPage.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ConfigurationPages/EmailPage.py Sat Oct 12 18:25:29 2013 +0200 @@ -141,7 +141,8 @@ errorStr = str(e) E5MessageBox.critical(self, self.trUtf8("Login Test"), - self.trUtf8("""<p>The login test failed.<br>Reason: {0}</p>""") + self.trUtf8( + """<p>The login test failed.<br>Reason: {0}</p>""") .format(errorStr)) server.quit() except (smtplib.SMTPException, socket.error) as e:
--- a/Preferences/ConfigurationPages/GraphicsPage.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ConfigurationPages/GraphicsPage.py Sat Oct 12 18:25:29 2013 +0200 @@ -42,7 +42,8 @@ """ Private method used to select the font for the graphics items. """ - self.graphicsFont = self.selectFont(self.graphicsFontSample, self.graphicsFont) + self.graphicsFont = self.selectFont(self.graphicsFontSample, + self.graphicsFont) def polishPage(self): """
--- a/Preferences/ConfigurationPages/HelpAppearancePage.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ConfigurationPages/HelpAppearancePage.py Sat Oct 12 18:25:29 2013 +0200 @@ -51,11 +51,13 @@ self.initColour("SaveUrlColor", self.secureURLsColourButton, Preferences.getHelp) - self.autoLoadImagesCheckBox.setChecked(Preferences.getHelp("AutoLoadImages")) + self.autoLoadImagesCheckBox.setChecked( + Preferences.getHelp("AutoLoadImages")) self.styleSheetEdit.setText(Preferences.getHelp("UserStyleSheet")) - self.tabsCloseButtonCheckBox.setChecked(Preferences.getUI("SingleCloseButton")) + self.tabsCloseButtonCheckBox.setChecked( + Preferences.getUI("SingleCloseButton")) self.warnOnMultipleCloseCheckBox.setChecked( Preferences.getHelp("WarnOnMultipleClose")) @@ -64,7 +66,8 @@ Public method to perform mode dependent setups. @param displayMode mode of the configuration dialog - (ConfigurationWidget.DefaultMode, ConfigurationWidget.HelpBrowserMode, + (ConfigurationWidget.DefaultMode, + ConfigurationWidget.HelpBrowserMode, ConfigurationWidget.TrayStarterMode) """ from ..ConfigurationDialog import ConfigurationWidget
--- a/Preferences/ConfigurationPages/HelpInterfacePage.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ConfigurationPages/HelpInterfacePage.py Sat Oct 12 18:25:29 2013 +0200 @@ -19,7 +19,8 @@ class HelpInterfacePage(ConfigurationPageBase, Ui_HelpInterfacePage): """ - Class implementing the Interface configuration page (variant for web browser). + Class implementing the Interface configuration page (variant for web + browser). """ def __init__(self): """ @@ -69,8 +70,9 @@ self, self.trUtf8("Select style sheet file"), self.styleSheetEdit.text(), - self.trUtf8("Qt Style Sheets (*.qss);;Cascading Style Sheets (*.css);;" - "All files (*)")) + self.trUtf8( + "Qt Style Sheets (*.qss);;Cascading Style Sheets (*.css);;" + "All files (*)")) if file: self.styleSheetEdit.setText(Utilities.toNativeSeparators(file))
--- a/Preferences/ConfigurationPages/HelpVirusTotalPage.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ConfigurationPages/HelpVirusTotalPage.py Sat Oct 12 18:25:29 2013 +0200 @@ -33,7 +33,8 @@ from Helpviewer.VirusTotalApi import VirusTotalAPI self.__vt = VirusTotalAPI(self) - self.__vt.checkServiceKeyFinished.connect(self.__checkServiceKeyFinished) + self.__vt.checkServiceKeyFinished.connect( + self.__checkServiceKeyFinished) # set initial values self.vtEnabledCheckBox.setChecked( @@ -75,7 +76,8 @@ protocol = "https" else: protocol = "http" - self.__vt.checkServiceKeyValidity(self.vtServiceKeyEdit.text(), protocol) + self.__vt.checkServiceKeyValidity( + self.vtServiceKeyEdit.text(), protocol) @pyqtSlot(bool, str) def __checkServiceKeyFinished(self, result, msg): @@ -86,14 +88,17 @@ @param msg network error message (str) """ if result: - self.testResultLabel.setText(self.trUtf8("The service key is valid.")) + self.testResultLabel.setText( + self.trUtf8("The service key is valid.")) else: if msg == "": self.testResultLabel.setText(self.trUtf8( - '<font color="#FF0000">The service key is not valid.</font>')) + '<font color="#FF0000">The service key is' + ' not valid.</font>')) else: self.testResultLabel.setText(self.trUtf8( - '<font color="#FF0000"><b>Error:</b> {0}</font>').format(msg)) + '<font color="#FF0000"><b>Error:</b> {0}</font>')\ + .format(msg)) def create(dlg):
--- a/Preferences/ConfigurationPages/HelpWebBrowserPage.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ConfigurationPages/HelpWebBrowserPage.py Sat Oct 12 18:25:29 2013 +0200 @@ -26,7 +26,8 @@ """ Constructor - @param configDialog reference to the configuration dialog (ConfigurationDialog) + @param configDialog reference to the configuration dialog + (ConfigurationDialog) """ super().__init__() self.setupUi(self) @@ -45,7 +46,8 @@ defaultSchemes = ["file://", "http://", "https://"] self.defaultSchemeCombo.addItems(defaultSchemes) - self.clickToFlashCheckBox.setIcon(UI.PixmapCache.getIcon("flashBlock.png")) + self.clickToFlashCheckBox.setIcon( + UI.PixmapCache.getIcon("flashBlock.png")) # set initial values self.singleHelpWindowCheckBox.setChecked( @@ -122,11 +124,13 @@ for language in range(2, QLocale.LastLanguage + 1): if len(QLocale.countriesForLanguage(language)) > 0: - self.languageCombo.addItem(QLocale.languageToString(language), language) + self.languageCombo.addItem( + QLocale.languageToString(language), language) self.languageCombo.model().sort(0) self.languageCombo.insertSeparator(0) self.languageCombo.insertItem(0, QLocale.languageToString(0), 0) - index = self.languageCombo.findData(Preferences.getHelp("SearchLanguage")) + index = self.languageCombo.findData( + Preferences.getHelp("SearchLanguage")) if index > -1: self.languageCombo.setCurrentIndex(index) @@ -264,7 +268,8 @@ @pyqtSlot(int) def on_startupCombo_currentIndexChanged(self, index): """ - Private slot to enable elements depending on the selected startup entry. + Private slot to enable elements depending on the selected startup + entry. @param index index of the selected entry (integer) """
--- a/Preferences/ConfigurationPages/IconsPage.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ConfigurationPages/IconsPage.py Sat Oct 12 18:25:29 2013 +0200 @@ -51,7 +51,8 @@ def on_iconDirectoryList_currentRowChanged(self, row): """ - Private slot to handle the currentRowChanged signal of the icons directory list. + Private slot to handle the currentRowChanged signal of the icons + directory list. @param row the current row (integer) """
--- a/Preferences/ConfigurationPages/InterfacePage.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ConfigurationPages/InterfacePage.py Sat Oct 12 18:25:29 2013 +0200 @@ -206,7 +206,8 @@ self.languageComboBox.clear() fnlist = glob.glob("eric5_*.qm") + \ - glob.glob(os.path.join(getConfig('ericTranslationsDir'), "eric5_*.qm")) + \ + glob.glob(os.path.join( + getConfig('ericTranslationsDir'), "eric5_*.qm")) + \ glob.glob(os.path.join(Utilities.getConfigDir(), "eric5_*.qm")) locales = {} for fn in fnlist: @@ -214,9 +215,9 @@ if locale not in locales: translator = QTranslator() translator.load(fn) - locales[locale] = \ - translator.translate("InterfacePage", "English", - "Translate this with your language") + \ + locales[locale] = translator.translate( + "InterfacePage", "English", + "Translate this with your language") + \ " ({0})".format(locale) localeList = sorted(list(locales.keys())) try: @@ -246,8 +247,9 @@ self, self.trUtf8("Select style sheet file"), self.styleSheetEdit.text(), - self.trUtf8("Qt Style Sheets (*.qss);;Cascading Style Sheets (*.css);;" - "All files (*)")) + self.trUtf8( + "Qt Style Sheets (*.qss);;Cascading Style Sheets (*.css);;" + "All files (*)")) if file: self.styleSheetEdit.setText(Utilities.toNativeSeparators(file))
--- a/Preferences/ConfigurationPages/IrcPage.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ConfigurationPages/IrcPage.py Sat Oct 12 18:25:29 2013 +0200 @@ -35,7 +35,8 @@ # set initial values # timestamps self.timestampGroup.setChecked(Preferences.getIrc("ShowTimestamps")) - self.showDateCheckBox.setChecked(Preferences.getIrc("TimestampIncludeDate")) + self.showDateCheckBox.setChecked( + Preferences.getIrc("TimestampIncludeDate")) self.timeFormatCombo.setCurrentIndex( self.timeFormatCombo.findText(Preferences.getIrc("TimeFormat"))) self.dateFormatCombo.setCurrentIndex( @@ -66,7 +67,8 @@ Preferences.getIrc, byName=True) # notifications - self.notificationsGroup.setChecked(Preferences.getIrc("ShowNotifications")) + self.notificationsGroup.setChecked( + Preferences.getIrc("ShowNotifications")) self.joinLeaveCheckBox.setChecked(Preferences.getIrc("NotifyJoinPart")) self.messageCheckBox.setChecked(Preferences.getIrc("NotifyMessage")) self.ownNickCheckBox.setChecked(Preferences.getIrc("NotifyNick")) @@ -108,14 +110,17 @@ # Automatic User Information Lookup self.whoGroup.setChecked(Preferences.getIrc("AutoUserInfoLookup")) self.whoUsersSpinBox.setValue(Preferences.getIrc("AutoUserInfoMax")) - self.whoIntervalSpinBox.setValue(Preferences.getIrc("AutoUserInfoInterval")) + self.whoIntervalSpinBox.setValue( + Preferences.getIrc("AutoUserInfoInterval")) # Markers self.markWhenHiddenCheckBox.setChecked( Preferences.getIrc("MarkPositionWhenHidden")) - self.initColour("MarkerLineForegroundColour", self.markerForegroundButton, + self.initColour("MarkerLineForegroundColour", + self.markerForegroundButton, Preferences.getIrc, byName=True) - self.initColour("MarkerLineBackgroundColour", self.markerBackgroundButton, + self.initColour("MarkerLineBackgroundColour", + self.markerBackgroundButton, Preferences.getIrc, byName=True) # Shutdown @@ -128,27 +133,32 @@ """ # timestamps Preferences.setIrc("ShowTimestamps", self.timestampGroup.isChecked()) - Preferences.setIrc("TimestampIncludeDate", self.showDateCheckBox.isChecked()) + Preferences.setIrc( + "TimestampIncludeDate", self.showDateCheckBox.isChecked()) Preferences.setIrc("TimeFormat", self.timeFormatCombo.currentText()) Preferences.setIrc("DateFormat", self.dateFormatCombo.currentText()) # notifications - Preferences.setIrc("ShowNotifications", self.notificationsGroup.isChecked()) - Preferences.setIrc("NotifyJoinPart", self.joinLeaveCheckBox.isChecked()) + Preferences.setIrc( + "ShowNotifications", self.notificationsGroup.isChecked()) + Preferences.setIrc( + "NotifyJoinPart", self.joinLeaveCheckBox.isChecked()) Preferences.setIrc("NotifyMessage", self.messageCheckBox.isChecked()) Preferences.setIrc("NotifyNick", self.ownNickCheckBox.isChecked()) # Automatic User Information Lookup Preferences.setIrc("AutoUserInfoLookup", self.whoGroup.isChecked()) Preferences.setIrc("AutoUserInfoMax", self.whoUsersSpinBox.value()) - Preferences.setIrc("AutoUserInfoInterval", self.whoIntervalSpinBox.value()) + Preferences.setIrc( + "AutoUserInfoInterval", self.whoIntervalSpinBox.value()) # Markers Preferences.setIrc("MarkPositionWhenHidden", self.markWhenHiddenCheckBox.isChecked()) # Shutdown - Preferences.setIrc("AskOnShutdown", self.confirmShutdownCheckBox.isChecked()) + Preferences.setIrc( + "AskOnShutdown", self.confirmShutdownCheckBox.isChecked()) # colours self.saveColours(Preferences.setIrc)
--- a/Preferences/ConfigurationPages/MasterPasswordEntryDialog.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ConfigurationPages/MasterPasswordEntryDialog.py Sat Oct 12 18:25:29 2013 +0200 @@ -44,8 +44,8 @@ error = "" if self.currentPasswordEdit.isEnabled(): from Utilities.crypto.py3PBKDF2 import verifyPassword - enable = \ - verifyPassword(self.currentPasswordEdit.text(), self.__oldPasswordHash) + enable = verifyPassword( + self.currentPasswordEdit.text(), self.__oldPasswordHash) if not enable: error = error or self.trUtf8("Wrong password entered.") @@ -61,7 +61,8 @@ if self.currentPasswordEdit.isEnabled(): if self.newPasswordEdit.text() == self.currentPasswordEdit.text(): enable = False - error = error or self.trUtf8("Old and new password must not be the same.") + error = error or \ + self.trUtf8("Old and new password must not be the same.") self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enable) self.errorLabel.setText(error)
--- a/Preferences/ConfigurationPages/MultiProjectPage.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ConfigurationPages/MultiProjectPage.py Sat Oct 12 18:25:29 2013 +0200 @@ -39,7 +39,8 @@ Preferences.getMultiProject("RecentNumber")) self.workspaceEdit.setText( Utilities.toNativeSeparators( - Preferences.getMultiProject("Workspace") or Utilities.getHomeDir())) + Preferences.getMultiProject("Workspace") or \ + Utilities.getHomeDir())) def save(self): """
--- a/Preferences/ConfigurationPages/NetworkPage.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ConfigurationPages/NetworkPage.py Sat Oct 12 18:25:29 2013 +0200 @@ -36,24 +36,26 @@ self.downloadDirCompleter = E5DirCompleter(self.downloadDirEdit) - self.ftpProxyTypeCombo.addItem(self.trUtf8("No FTP Proxy"), - E5FtpProxyType.NoProxy) - self.ftpProxyTypeCombo.addItem(self.trUtf8("No Proxy Authentication required"), - E5FtpProxyType.NonAuthorizing) - self.ftpProxyTypeCombo.addItem(self.trUtf8("User@Server"), - E5FtpProxyType.UserAtServer) - self.ftpProxyTypeCombo.addItem(self.trUtf8("SITE"), - E5FtpProxyType.Site) - self.ftpProxyTypeCombo.addItem(self.trUtf8("OPEN"), - E5FtpProxyType.Open) - self.ftpProxyTypeCombo.addItem(self.trUtf8("User@Proxyuser@Server"), - E5FtpProxyType.UserAtProxyuserAtServer) - self.ftpProxyTypeCombo.addItem(self.trUtf8("Proxyuser@Server"), - E5FtpProxyType.ProxyuserAtServer) - self.ftpProxyTypeCombo.addItem(self.trUtf8("AUTH and RESP"), - E5FtpProxyType.AuthResp) - self.ftpProxyTypeCombo.addItem(self.trUtf8("Bluecoat Proxy"), - E5FtpProxyType.Bluecoat) + self.ftpProxyTypeCombo.addItem( + self.trUtf8("No FTP Proxy"), E5FtpProxyType.NoProxy) + self.ftpProxyTypeCombo.addItem( + self.trUtf8("No Proxy Authentication required"), + E5FtpProxyType.NonAuthorizing) + self.ftpProxyTypeCombo.addItem( + self.trUtf8("User@Server"), E5FtpProxyType.UserAtServer) + self.ftpProxyTypeCombo.addItem( + self.trUtf8("SITE"), E5FtpProxyType.Site) + self.ftpProxyTypeCombo.addItem( + self.trUtf8("OPEN"), E5FtpProxyType.Open) + self.ftpProxyTypeCombo.addItem( + self.trUtf8("User@Proxyuser@Server"), + E5FtpProxyType.UserAtProxyuserAtServer) + self.ftpProxyTypeCombo.addItem( + self.trUtf8("Proxyuser@Server"), E5FtpProxyType.ProxyuserAtServer) + self.ftpProxyTypeCombo.addItem( + self.trUtf8("AUTH and RESP"), E5FtpProxyType.AuthResp) + self.ftpProxyTypeCombo.addItem( + self.trUtf8("Bluecoat Proxy"), E5FtpProxyType.Bluecoat) # set initial values self.downloadDirEdit.setText(Preferences.getUI("DownloadPath")) @@ -191,11 +193,14 @@ self.ftpProxyHostEdit.setEnabled(proxyType != E5FtpProxyType.NoProxy) self.ftpProxyPortSpin.setEnabled(proxyType != E5FtpProxyType.NoProxy) self.ftpProxyUserEdit.setEnabled( - proxyType not in [E5FtpProxyType.NoProxy, E5FtpProxyType.NonAuthorizing]) + proxyType not in [E5FtpProxyType.NoProxy, + E5FtpProxyType.NonAuthorizing]) self.ftpProxyPasswordEdit.setEnabled( - proxyType not in [E5FtpProxyType.NoProxy, E5FtpProxyType.NonAuthorizing]) + proxyType not in [E5FtpProxyType.NoProxy, + E5FtpProxyType.NonAuthorizing]) self.ftpProxyAccountEdit.setEnabled( - proxyType not in [E5FtpProxyType.NoProxy, E5FtpProxyType.NonAuthorizing]) + proxyType not in [E5FtpProxyType.NoProxy, + E5FtpProxyType.NonAuthorizing]) def create(dlg):
--- a/Preferences/ConfigurationPages/NotificationsPage.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ConfigurationPages/NotificationsPage.py Sat Oct 12 18:25:29 2013 +0200 @@ -46,7 +46,8 @@ self.__notification = None # set initial values - self.enableCheckBox.setChecked(Preferences.getUI("NotificationsEnabled")) + self.enableCheckBox.setChecked( + Preferences.getUI("NotificationsEnabled")) self.timeoutSpinBox.setValue(Preferences.getUI("NotificationTimeout")) point = Preferences.getUI("NotificationPosition") self.xSpinBox.setValue(point.x()) @@ -56,7 +57,8 @@ """ Public slot to save the Notifications configuration. """ - Preferences.setUI("NotificationsEnabled", self.enableCheckBox.isChecked()) + Preferences.setUI( + "NotificationsEnabled", self.enableCheckBox.isChecked()) Preferences.setUI("NotificationTimeout", self.timeoutSpinBox.value()) Preferences.setUI("NotificationPosition", QPoint( self.xSpinBox.value(), self.ySpinBox.value())) @@ -70,12 +72,16 @@ """ if checked: from UI.NotificationWidget import NotificationWidget - self.__notification = NotificationWidget(parent=self, setPosition=True) - self.__notification.setPixmap(UI.PixmapCache.getPixmap("notification48.png")) + self.__notification = NotificationWidget( + parent=self, setPosition=True) + self.__notification.setPixmap( + UI.PixmapCache.getPixmap("notification48.png")) self.__notification.setHeading(self.trUtf8("Visual Selection")) - self.__notification.setText(self.trUtf8("Drag the notification window to" - " the desired place and release the button.")) - self.__notification.move(QPoint(self.xSpinBox.value(), self.ySpinBox.value())) + self.__notification.setText( + self.trUtf8("Drag the notification window to" + " the desired place and release the button.")) + self.__notification.move( + QPoint(self.xSpinBox.value(), self.ySpinBox.value())) self.__notification.show() else: # retrieve the position
--- a/Preferences/ConfigurationPages/ProjectBrowserPage.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ConfigurationPages/ProjectBrowserPage.py Sat Oct 12 18:25:29 2013 +0200 @@ -84,9 +84,9 @@ @param projectType type of the selected project (string) """ - from Project.ProjectBrowserFlags import SourcesBrowserFlag, FormsBrowserFlag, \ - ResourcesBrowserFlag, TranslationsBrowserFlag, InterfacesBrowserFlag, \ - OthersBrowserFlag + from Project.ProjectBrowserFlags import SourcesBrowserFlag, \ + FormsBrowserFlag, ResourcesBrowserFlag, TranslationsBrowserFlag, \ + InterfacesBrowserFlag, OthersBrowserFlag flags = 0 if self.sourcesBrowserCheckBox.isChecked(): @@ -106,21 +106,24 @@ def __setProjectBrowsersCheckBoxes(self, projectType): """ - Private method to set the checkboxes according to the selected project type. + Private method to set the checkboxes according to the selected project + type. @param projectType type of the selected project (string) """ - from Project.ProjectBrowserFlags import SourcesBrowserFlag, FormsBrowserFlag, \ - ResourcesBrowserFlag, TranslationsBrowserFlag, InterfacesBrowserFlag, \ - OthersBrowserFlag + from Project.ProjectBrowserFlags import SourcesBrowserFlag, \ + FormsBrowserFlag, ResourcesBrowserFlag, TranslationsBrowserFlag, \ + InterfacesBrowserFlag, OthersBrowserFlag flags = self.__projectBrowserFlags[projectType] self.sourcesBrowserCheckBox.setChecked(flags & SourcesBrowserFlag) self.formsBrowserCheckBox.setChecked(flags & FormsBrowserFlag) self.resourcesBrowserCheckBox.setChecked(flags & ResourcesBrowserFlag) - self.translationsBrowserCheckBox.setChecked(flags & TranslationsBrowserFlag) - self.interfacesBrowserCheckBox.setChecked(flags & InterfacesBrowserFlag) + self.translationsBrowserCheckBox.setChecked( + flags & TranslationsBrowserFlag) + self.interfacesBrowserCheckBox.setChecked( + flags & InterfacesBrowserFlag) self.othersBrowserCheckBox.setChecked(flags & OthersBrowserFlag) @pyqtSlot(int)
--- a/Preferences/ConfigurationPages/SecurityPage.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ConfigurationPages/SecurityPage.py Sat Oct 12 18:25:29 2013 +0200 @@ -25,7 +25,8 @@ """ Constructor - @param configDialog reference to the configuration dialog (ConfigurationDialog) + @param configDialog reference to the configuration dialog + (ConfigurationDialog) """ super().__init__() self.setupUi(self) @@ -61,7 +62,8 @@ Preferences.setHelp("DnsPrefetchEnabled", self.dnsPrefetchCheckBox.isChecked()) - if self.__oldUseMasterPassword != self.masterPasswordCheckBox.isChecked(): + if self.__oldUseMasterPassword != \ + self.masterPasswordCheckBox.isChecked(): self.__configDlg.masterPasswordChanged.emit("", self.__newPassword) @pyqtSlot(bool) @@ -91,12 +93,14 @@ Private slot to change the master password. """ from .MasterPasswordEntryDialog import MasterPasswordEntryDialog - dlg = MasterPasswordEntryDialog(Preferences.getUser("MasterPassword"), self) + dlg = MasterPasswordEntryDialog( + Preferences.getUser("MasterPassword"), self) if dlg.exec_() == QDialog.Accepted: Preferences.setUser("MasterPassword", dlg.getMasterPassword()) - if self.__oldUseMasterPassword != self.masterPasswordCheckBox.isChecked(): + if self.__oldUseMasterPassword != \ + self.masterPasswordCheckBox.isChecked(): # the user is about to change the use of a master password # just save the changed password self.__newPassword = dlg.getMasterPassword()
--- a/Preferences/ConfigurationPages/ShellPage.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ConfigurationPages/ShellPage.py Sat Oct 12 18:25:29 2013 +0200 @@ -77,7 +77,8 @@ @pyqtSlot() def on_monospacedFontButton_clicked(self): """ - Private method used to select the font to be used as the monospaced font. + Private method used to select the font to be used as the monospaced + font. """ self.monospacedFont = \ self.selectFont(self.monospacedFontSample, self.monospacedFont) @@ -87,7 +88,8 @@ """ Private method used to select the font for the editor margins. """ - self.marginsFont = self.selectFont(self.marginsFontSample, self.marginsFont) + self.marginsFont = self.selectFont(self.marginsFontSample, + self.marginsFont) def polishPage(self): """
--- a/Preferences/ConfigurationPages/TasksPage.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ConfigurationPages/TasksPage.py Sat Oct 12 18:25:29 2013 +0200 @@ -50,15 +50,16 @@ """ Public slot to save the Tasks configuration. """ - Preferences.setTasks("TasksFixmeMarkers", - self.tasksMarkerFixmeEdit.text()) - Preferences.setTasks("TasksWarningMarkers", - self.tasksMarkerWarningEdit.text()) - Preferences.setTasks("TasksTodoMarkers", - self.tasksMarkerTodoEdit.text()) - Preferences.setTasks("TasksNoteMarkers", - self.tasksMarkerNoteEdit.text()) - Preferences.setTasks("ClearOnFileClose", self.clearCheckBox.isChecked()) + Preferences.setTasks( + "TasksFixmeMarkers", self.tasksMarkerFixmeEdit.text()) + Preferences.setTasks( + "TasksWarningMarkers", self.tasksMarkerWarningEdit.text()) + Preferences.setTasks( + "TasksTodoMarkers", self.tasksMarkerTodoEdit.text()) + Preferences.setTasks( + "TasksNoteMarkers", self.tasksMarkerNoteEdit.text()) + Preferences.setTasks( + "ClearOnFileClose", self.clearCheckBox.isChecked()) self.saveColours(Preferences.setTasks)
--- a/Preferences/ConfigurationPages/TrayStarterPage.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ConfigurationPages/TrayStarterPage.py Sat Oct 12 18:25:29 2013 +0200 @@ -31,7 +31,8 @@ self.standardButton.setIcon(UI.PixmapCache.getIcon("erict.png")) self.highContrastButton.setIcon(UI.PixmapCache.getIcon("erict-hc.png")) self.blackWhiteButton.setIcon(UI.PixmapCache.getIcon("erict-bw.png")) - self.blackWhiteInverseButton.setIcon(UI.PixmapCache.getIcon("erict-bwi.png")) + self.blackWhiteInverseButton.setIcon( + UI.PixmapCache.getIcon("erict-bwi.png")) # set initial values iconName = Preferences.getTrayStarter("TrayStarterIcon")
--- a/Preferences/ConfigurationPages/VcsPage.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ConfigurationPages/VcsPage.py Sat Oct 12 18:25:29 2013 +0200 @@ -27,7 +27,8 @@ # set initial values self.vcsAutoCloseCheckBox.setChecked(Preferences.getVCS("AutoClose")) - self.vcsAutoSaveCheckBox.setChecked(Preferences.getVCS("AutoSaveFiles")) + self.vcsAutoSaveCheckBox.setChecked( + Preferences.getVCS("AutoSaveFiles")) self.vcsAutoSaveProjectCheckBox.setChecked( Preferences.getVCS("AutoSaveProject")) self.vcsStatusMonitorIntervalSpinBox.setValue(
--- a/Preferences/ConfigurationPages/ViewmanagerPage.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ConfigurationPages/ViewmanagerPage.py Sat Oct 12 18:25:29 2013 +0200 @@ -31,19 +31,22 @@ # set initial values self.pluginManager = e5App().getObject("PluginManager") - self.viewmanagers = self.pluginManager.getPluginDisplayStrings("viewmanager") + self.viewmanagers = \ + self.pluginManager.getPluginDisplayStrings("viewmanager") self.windowComboBox.clear() currentVm = Preferences.getViewManager() keys = sorted(self.viewmanagers.keys()) for key in keys: - self.windowComboBox.addItem(self.trUtf8(self.viewmanagers[key]), key) + self.windowComboBox.addItem( + self.trUtf8(self.viewmanagers[key]), key) currentIndex = self.windowComboBox.findText( self.trUtf8(self.viewmanagers[currentVm])) self.windowComboBox.setCurrentIndex(currentIndex) self.on_windowComboBox_activated(currentIndex) - self.tabViewGroupBox.setTitle(self.trUtf8(self.viewmanagers["tabview"])) + self.tabViewGroupBox.setTitle( + self.trUtf8(self.viewmanagers["tabview"])) self.filenameLengthSpinBox.setValue( Preferences.getUI("TabViewManagerFilenameLength")) @@ -75,7 +78,8 @@ """ workspace = \ self.windowComboBox.itemData(self.windowComboBox.currentIndex()) - pixmap = self.pluginManager.getPluginPreviewPixmap("viewmanager", workspace) + pixmap = \ + self.pluginManager.getPluginPreviewPixmap("viewmanager", workspace) self.previewPixmap.setPixmap(pixmap) self.tabViewGroupBox.setEnabled(workspace == "tabview")
--- a/Preferences/ProgramsDialog.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ProgramsDialog.py Sat Oct 12 18:25:29 2013 +0200 @@ -38,11 +38,13 @@ self.__hasSearched = False - self.programsList.headerItem().setText(self.programsList.columnCount(), "") + self.programsList.headerItem().setText( + self.programsList.columnCount(), "") - self.searchButton = \ - self.buttonBox.addButton(self.trUtf8("Search"), QDialogButtonBox.ActionRole) - self.searchButton.setToolTip(self.trUtf8("Press to search for programs")) + self.searchButton = self.buttonBox.addButton( + self.trUtf8("Search"), QDialogButtonBox.ActionRole) + self.searchButton.setToolTip( + self.trUtf8("Press to search for programs")) def show(self): """ @@ -80,8 +82,9 @@ "{0}.exe".format(Utilities.generateQtToolName("lrelease")) or \ Utilities.generateQtToolName("lrelease") exe = os.path.join(Utilities.getQtBinariesPath(), exe) - version = self.__createProgramEntry(self.trUtf8("Translation Converter (Qt)"), - exe, '-version', 'lrelease', -1) + version = self.__createProgramEntry( + self.trUtf8("Translation Converter (Qt)"), exe, '-version', + 'lrelease', -1) # 1b. Qt Designer if Utilities.isWindowsPlatform(): exe = os.path.join(Utilities.getQtBinariesPath(), @@ -91,7 +94,8 @@ else: exe = os.path.join(Utilities.getQtBinariesPath(), Utilities.generateQtToolName("designer")) - self.__createProgramEntry(self.trUtf8("Qt Designer"), exe, version=version) + self.__createProgramEntry( + self.trUtf8("Qt Designer"), exe, version=version) # 1c. Qt Linguist if Utilities.isWindowsPlatform(): exe = os.path.join(Utilities.getQtBinariesPath(), @@ -101,7 +105,8 @@ else: exe = os.path.join(Utilities.getQtBinariesPath(), Utilities.generateQtToolName("linguist")) - self.__createProgramEntry(self.trUtf8("Qt Linguist"), exe, version=version) + self.__createProgramEntry( + self.trUtf8("Qt Linguist"), exe, version=version) # 1d. Qt Assistant if Utilities.isWindowsPlatform(): exe = os.path.join(Utilities.getQtBinariesPath(), @@ -111,45 +116,55 @@ else: exe = os.path.join(Utilities.getQtBinariesPath(), Utilities.generateQtToolName("assistant")) - self.__createProgramEntry(self.trUtf8("Qt Assistant"), exe, version=version) + self.__createProgramEntry( + self.trUtf8("Qt Assistant"), exe, version=version) # 2. do the PyQt programs # 2a. Translation Extractor PyQt4 - self.__createProgramEntry(self.trUtf8("Translation Extractor (Python, PyQt4)"), + self.__createProgramEntry( + self.trUtf8("Translation Extractor (Python, PyQt4)"), Utilities.isWindowsPlatform() and "pylupdate4.exe" or "pylupdate4", '-version', 'pylupdate', -1) # 2b. Forms Compiler PyQt4 - self.__createProgramEntry(self.trUtf8("Forms Compiler (Python, PyQt4)"), + self.__createProgramEntry( + self.trUtf8("Forms Compiler (Python, PyQt4)"), Utilities.isWindowsPlatform() and "pyuic4.bat" or "pyuic4", '--version', 'Python User', 4) # 2c. Resource Compiler PyQt4 - self.__createProgramEntry(self.trUtf8("Resource Compiler (Python, PyQt4)"), + self.__createProgramEntry( + self.trUtf8("Resource Compiler (Python, PyQt4)"), Utilities.isWindowsPlatform() and "pyrcc4.exe" or "pyrcc4", '-version', 'Resource Compiler', -1) # 2d. Translation Extractor PyQt5 - self.__createProgramEntry(self.trUtf8("Translation Extractor (Python, PyQt5)"), + self.__createProgramEntry( + self.trUtf8("Translation Extractor (Python, PyQt5)"), Utilities.isWindowsPlatform() and "pylupdate5.exe" or "pylupdate5", '-version', 'pylupdate', -1) # 2e. Forms Compiler PyQt4 - self.__createProgramEntry(self.trUtf8("Forms Compiler (Python, PyQt5)"), + self.__createProgramEntry( + self.trUtf8("Forms Compiler (Python, PyQt5)"), Utilities.isWindowsPlatform() and "pyuic5.bat" or "pyuic5", '--version', 'Python User', 4) # 2f. Resource Compiler PyQt4 - self.__createProgramEntry(self.trUtf8("Resource Compiler (Python, PyQt5)"), + self.__createProgramEntry( + self.trUtf8("Resource Compiler (Python, PyQt5)"), Utilities.isWindowsPlatform() and "pyrcc5.exe" or "pyrcc5", '-version', 'Resource Compiler', -1) # 3. do the PySide programs # 3a. Translation Extractor PySide - self.__createProgramEntry(self.trUtf8("Translation Extractor (Python, PySide)"), + self.__createProgramEntry( + self.trUtf8("Translation Extractor (Python, PySide)"), Utilities.generatePySideToolPath("pyside-lupdate"), '-version', '', -1, versionRe='lupdate') # 3b. Forms Compiler PySide - self.__createProgramEntry(self.trUtf8("Forms Compiler (Python, PySide)"), + self.__createProgramEntry( + self.trUtf8("Forms Compiler (Python, PySide)"), Utilities.generatePySideToolPath("pyside-uic"), '--version', 'PySide User', 5, versionCleanup=(0, -1)) # 3.c Resource Compiler PySide - self.__createProgramEntry(self.trUtf8("Resource Compiler (Python, PySide)"), + self.__createProgramEntry( + self.trUtf8("Resource Compiler (Python, PySide)"), Utilities.generatePySideToolPath("pyside-rcc"), '-version', 'Resource Compiler', -1) @@ -185,7 +200,8 @@ except (ImportError, AttributeError, OSError): text = "enchant" version = "" - self.__createEntry(self.trUtf8("Spell Checker - PyEnchant"), text, version) + self.__createEntry( + self.trUtf8("Spell Checker - PyEnchant"), text, version) # 7. do the pygments entry try: @@ -201,7 +217,8 @@ except (ImportError, AttributeError, OSError): text = "pygments" version = "" - self.__createEntry(self.trUtf8("Source Highlighter - Pygments"), text, version) + self.__createEntry( + self.trUtf8("Source Highlighter - Pygments"), text, version) # do the plugin related programs pm = e5App().getObject("PluginManager") @@ -237,10 +254,12 @@ @param description descriptive text (string) @param exe name of the executable program (string) - @param versionCommand command line switch to get the version info (string) - if this is empty, the given version will be shown. - @param versionStartsWith start of line identifying version info (string) - @param versionPosition index of part containing the version info (integer) + @param versionCommand command line switch to get the version info + (string) if this is empty, the given version will be shown. + @param versionStartsWith start of line identifying version info + (string) + @param versionPosition index of part containing the version info + (integer) @keyparam version version string to show (string) @keyparam versionCleanup tuple of two integers giving string positions start and stop for the version string (tuple of integers) @@ -248,7 +267,8 @@ info (string). Takes precedence over versionStartsWith. @return version string of detected or given version (string) """ - itmList = self.programsList.findItems(description, Qt.MatchCaseSensitive) + itmList = self.programsList.findItems( + description, Qt.MatchCaseSensitive) if itmList: itm = itmList[0] else: @@ -279,15 +299,17 @@ Preferences.getSystem("IOEncoding"), 'replace') if versionRe is None: - versionRe = "^{0}".format(re.escape(versionStartsWith)) + versionRe = "^{0}".format( + re.escape(versionStartsWith)) versionRe = re.compile(versionRe, re.UNICODE) for line in output.splitlines(): if versionRe.search(line): try: version = line.split()[versionPosition] if versionCleanup: - version = \ - version[versionCleanup[0]:versionCleanup[1]] + version = version[ + versionCleanup[0]:versionCleanup[1] + ] break except IndexError: version = self.trUtf8("(unknown)")
--- a/Preferences/ShortcutDialog.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ShortcutDialog.py Sat Oct 12 18:25:29 2013 +0200 @@ -165,7 +165,8 @@ if self.keyIndex == 1: self.__setKeyEditText(QKeySequence(self.keys[0]).toString()) elif self.keyIndex == 2: - self.__setKeyEditText(QKeySequence(self.keys[0], self.keys[1]).toString()) + self.__setKeyEditText( + QKeySequence(self.keys[0], self.keys[1]).toString()) elif self.keyIndex == 3: self.__setKeyEditText(QKeySequence(self.keys[0], self.keys[1], self.keys[2]).toString())
--- a/Preferences/Shortcuts.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/Shortcuts.py Sat Oct 12 18:25:29 2013 +0200 @@ -41,7 +41,8 @@ @keyparam prefClass preferences class used as the storage area @keyparam helpViewer reference to the help window object - @keyparam pluginName name of the plugin for which to load shortcuts (string) + @keyparam pluginName name of the plugin for which to load shortcuts + (string) """ if helpViewer is None and pluginName is None: for act in e5App().getObject("Project").getActions(): @@ -199,8 +200,10 @@ else: E5MessageBox.critical(None, QApplication.translate("Shortcuts", "Export Keyboard Shortcuts"), - QApplication.translate("Shortcuts", - "<p>The keyboard shortcuts could not be written to file <b>{0}</b>.</p>") + QApplication.translate( + "Shortcuts", + "<p>The keyboard shortcuts could not be written to file" + " <b>{0}</b>.</p>") .format(fn)) @@ -228,8 +231,10 @@ else: E5MessageBox.critical(None, QApplication.translate("Shortcuts", "Import Keyboard Shortcuts"), - QApplication.translate("Shortcuts", - "<p>The keyboard shortcuts could not be read from file <b>{0}</b>.</p>") + QApplication.translate( + "Shortcuts", + "<p>The keyboard shortcuts could not be read from file" + " <b>{0}</b>.</p>") .format(fn)) return
--- a/Preferences/ShortcutsDialog.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ShortcutsDialog.py Sat Oct 12 18:25:29 2013 +0200 @@ -4,7 +4,8 @@ # """ -Module implementing a dialog for the configuration of eric5s keyboard shortcuts. +Module implementing a dialog for the configuration of eric5's keyboard +shortcuts. """ from PyQt4.QtCore import pyqtSignal, QRegExp, Qt, pyqtSlot @@ -21,9 +22,11 @@ class ShortcutsDialog(QDialog, Ui_ShortcutsDialog): """ - Class implementing a dialog for the configuration of eric5s keyboard shortcuts. + Class implementing a dialog for the configuration of eric5's keyboard + shortcuts. - @signal updateShortcuts() emitted when the user pressed the dialogs OK button + @signal updateShortcuts() emitted when the user pressed the dialogs OK + button """ updateShortcuts = pyqtSignal() @@ -45,7 +48,8 @@ self.setModal(modal) self.setupUi(self) - self.shortcutsList.headerItem().setText(self.shortcutsList.columnCount(), "") + self.shortcutsList.headerItem().setText( + self.shortcutsList.columnCount(), "") self.shortcutsList.header().setSortIndicator(0, Qt.AscendingOrder) from .ShortcutDialog import ShortcutDialog @@ -63,7 +67,8 @@ """ Private method to resize the list columns. """ - self.shortcutsList.header().resizeSections(QHeaderView.ResizeToContents) + self.shortcutsList.header().resizeSections( + QHeaderView.ResizeToContents) self.shortcutsList.header().setStretchLastSection(True) def __generateCategoryItem(self, title): @@ -86,8 +91,8 @@ @param action reference to the keyboard action (E5Action) @keyparam noCheck flag indicating that no uniqueness check should be performed (boolean) - @keyparam objectType type of the object (string). Objects of the same type - are not checked for duplicate shortcuts. + @keyparam objectType type of the object (string). Objects of the same + type are not checked for duplicate shortcuts. """ itm = QTreeWidgetItem(category, [action.iconText(), action.shortcut().toString(), @@ -150,17 +155,20 @@ for act in e5App().getObject("ViewManager").getActions('macro'): self.__generateShortcutItem(self.macroItem, act) - self.bookmarkItem = self.__generateCategoryItem(self.trUtf8("Bookmarks")) + self.bookmarkItem = self.__generateCategoryItem( + self.trUtf8("Bookmarks")) for act in e5App().getObject("ViewManager").getActions('bookmark'): self.__generateShortcutItem(self.bookmarkItem, act) - self.spellingItem = self.__generateCategoryItem(self.trUtf8("Spelling")) + self.spellingItem = self.__generateCategoryItem( + self.trUtf8("Spelling")) for act in e5App().getObject("ViewManager").getActions('spelling'): self.__generateShortcutItem(self.spellingItem, act) actions = e5App().getObject("ViewManager").getActions('window') if actions: - self.windowItem = self.__generateCategoryItem(self.trUtf8("Window")) + self.windowItem = self.__generateCategoryItem( + self.trUtf8("Window")) for act in actions: self.__generateShortcutItem(self.windowItem, act) @@ -196,7 +204,9 @@ self.__editTopItem = itm.parent() - self.shortcutDialog.setKeys(QKeySequence(itm.text(1)), QKeySequence(itm.text(2)), + self.shortcutDialog.setKeys( + QKeySequence(itm.text(1)), + QKeySequence(itm.text(2)), itm.data(0, self.noCheckRole), itm.data(0, self.objectTypeRole)) self.shortcutDialog.show() @@ -231,9 +241,11 @@ itm.setText(column, keystr) self.shortcutsList.closePersistentEditor(itm, column) - def __shortcutChanged(self, keysequence, altKeysequence, noCheck, objectType): + def __shortcutChanged(self, keysequence, altKeysequence, noCheck, + objectType): """ - Private slot to handle the shortcutChanged signal of the shortcut dialog. + Private slot to handle the shortcutChanged signal of the shortcut + dialog. @param keysequence the keysequence of the changed action (QKeySequence) @param altKeysequence the alternative keysequence of the changed @@ -243,8 +255,10 @@ @param objectType type of the object (string). """ if not noCheck and \ - (not self.__checkShortcut(keysequence, objectType, self.__editTopItem) or \ - not self.__checkShortcut(altKeysequence, objectType, self.__editTopItem)): + (not self.__checkShortcut( + keysequence, objectType, self.__editTopItem) or \ + not self.__checkShortcut( + altKeysequence, objectType, self.__editTopItem)): return self.shortcutsList.currentItem().setText(1, keysequence.toString()) @@ -287,15 +301,16 @@ # 3. check key name if itm.text(0) != keyname: - for col in [1, 2]: # check against primary, then alternative binding + for col in [1, 2]: # check against primary, + # then alternative binding itmseq = itm.text(col) # step 1: check if shortcut is already allocated if keystr == itmseq: res = E5MessageBox.yesNo(self, self.trUtf8("Edit shortcuts"), self.trUtf8( - """<p><b>{0}</b> has already been allocated""" - """ to the <b>{1}</b> action. """ + """<p><b>{0}</b> has already been""" + """ allocated to the <b>{1}</b> action. """ """Remove this binding?</p>""") .format(keystr, itm.text(0)), icon=E5MessageBox.Warning) @@ -313,8 +328,8 @@ res = E5MessageBox.yesNo(self, self.trUtf8("Edit shortcuts"), self.trUtf8( - """<p><b>{0}</b> hides the <b>{1}</b> action. """ - """Remove this binding?</p>""") + """<p><b>{0}</b> hides the <b>{1}</b>""" + """ action. Remove this binding?</p>""") .format(keystr, itm.text(0)), icon=E5MessageBox.Warning) if res: @@ -323,7 +338,8 @@ else: return False - # step 3: check if shortcut is hidden by an already allocated + # step 3: check if shortcut is hidden by an + # already allocated if keystr.startswith("{0}+".format(itmseq)): res = E5MessageBox.yesNo(self, self.trUtf8("Edit shortcuts"), @@ -354,7 +370,8 @@ for act in actions: if txt == act.objectName(): act.setShortcut(QKeySequence(itm.text(1))) - act.setAlternateShortcut(QKeySequence(itm.text(2)), removeEmpty=True) + act.setAlternateShortcut( + QKeySequence(itm.text(2)), removeEmpty=True) break def on_buttonBox_accepted(self): @@ -416,7 +433,8 @@ for index in range(topItem.childCount()): itm = topItem.child(index) if (self.actionButton.isChecked() and \ - not QRegExp(txt, Qt.CaseInsensitive).indexIn(itm.text(0)) > -1) or \ + not QRegExp(txt, Qt.CaseInsensitive).indexIn(itm.text(0)) > + -1) or \ (self.shortcutButton.isChecked() and \ not txt.lower() in itm.text(1).lower() and \ not txt.lower() in itm.text(2).lower()):
--- a/Preferences/ToolConfigurationDialog.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ToolConfigurationDialog.py Sat Oct 12 18:25:29 2013 +0200 @@ -40,7 +40,8 @@ ("no", self.trUtf8("no redirection")), ("show", self.trUtf8("show output")), ("insert", self.trUtf8("insert into current editor")), - ("replaceSelection", self.trUtf8("replace selection of current editor")), + ("replaceSelection", + self.trUtf8("replace selection of current editor")), ] self.toollist = copy.deepcopy(toollist) @@ -117,7 +118,8 @@ " Please choose an executable filename.")) return - if len(self.toolsList.findItems(menutext, Qt.MatchFlags(Qt.MatchExactly))): + if len(self.toolsList.findItems( + menutext, Qt.MatchFlags(Qt.MatchExactly))): E5MessageBox.critical(self, self.trUtf8("Add tool entry"), self.trUtf8("An entry for the menu text {0} already exists.")\ @@ -246,7 +248,8 @@ @pyqtSlot() def on_executableButton_clicked(self): """ - Private slot to handle the executable selection via a file selection dialog. + Private slot to handle the executable selection via a file selection + dialog. """ execfile = E5FileDialog.getOpenFileName( self, @@ -296,7 +299,8 @@ self.iconEdit.setText(tool['icon']) self.executableEdit.setText(tool['executable']) self.argumentsEdit.setText(tool['arguments']) - self.redirectCombo.setCurrentIndex(self.__findModeIndex(tool['redirect'])) + self.redirectCombo.setCurrentIndex( + self.__findModeIndex(tool['redirect'])) self.changeButton.setEnabled(False) self.deleteButton.setEnabled(True)
--- a/Preferences/ToolGroupConfigurationDialog.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ToolGroupConfigurationDialog.py Sat Oct 12 18:25:29 2013 +0200 @@ -61,7 +61,8 @@ self.trUtf8("You have to give a name for the group to add.")) return - if len(self.groupsList.findItems(groupName, Qt.MatchFlags(Qt.MatchExactly))): + if len(self.groupsList.findItems( + groupName, Qt.MatchFlags(Qt.MatchExactly))): E5MessageBox.critical(self, self.trUtf8("Add tool group entry"), self.trUtf8("An entry for the group name {0} already exists.")\ @@ -88,7 +89,8 @@ self.trUtf8("You have to give a name for the group to add.")) return - if len(self.groupsList.findItems(groupName, Qt.MatchFlags(Qt.MatchExactly))): + if len(self.groupsList.findItems( + groupName, Qt.MatchFlags(Qt.MatchExactly))): E5MessageBox.critical(self, self.trUtf8("Add tool group entry"), self.trUtf8("An entry for the group name {0} already exists.")\
--- a/Preferences/ViewProfileDialog.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/ViewProfileDialog.py Sat Oct 12 18:25:29 2013 +0200 @@ -17,7 +17,8 @@ """ Class implementing a dialog to configure the various view profiles. """ - def __init__(self, layout, editVisibilities, debugVisibilities, parent=None): + def __init__(self, layout, editVisibilities, debugVisibilities, + parent=None): """ Constructor @@ -37,7 +38,8 @@ elif self.__layout == "Sidebars": self.ui = Ui_ViewProfileSidebarsDialog() else: - raise ValueError("Illegal layout given ({0}).".format(self.__layout)) + raise ValueError( + "Illegal layout given ({0}).".format(self.__layout)) self.ui.setupUi(self) if self.__layout in ["Toolboxes", "Sidebars"]:
--- a/Preferences/__init__.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Preferences/__init__.py Sat Oct 12 18:25:29 2013 +0200 @@ -11,9 +11,9 @@ values are read and written to the eric5 preferences file by module functions. The data is stored in a file in a subdirectory of the users home directory. The individual configuration data is accessed by accessor functions -defined on the module level. The module is simply imported wherever it is needed -with the statement 'import Preferences'. Do not use 'from Preferences import *' -to import it. +defined on the module level. The module is simply imported wherever it is +needed with the statement 'import Preferences'. Do not use +'from Preferences import *' to import it. """ import os @@ -21,8 +21,8 @@ import shutil import json -from PyQt4.QtCore import QDir, QPoint, QLocale, QSettings, QFileInfo, QCoreApplication, \ - QByteArray, QSize, QUrl, Qt, QLibraryInfo +from PyQt4.QtCore import QDir, QPoint, QLocale, QSettings, QFileInfo, \ + QCoreApplication, QByteArray, QSize, QUrl, Qt, QLibraryInfo from PyQt4.QtGui import QColor, QFont, QInputDialog, QPalette, QApplication from PyQt4.QtNetwork import QNetworkRequest from PyQt4.QtWebKit import QWebSettings @@ -32,8 +32,9 @@ from E5Network.E5Ftp import E5FtpProxyType -from Globals import settingsNameOrganization, settingsNameGlobal, settingsNameRecent, \ - isWindowsPlatform, findPython2Interpreters, getPyQt4ModulesDirectory +from Globals import settingsNameOrganization, settingsNameGlobal, \ + settingsNameRecent, isWindowsPlatform, findPython2Interpreters, \ + getPyQt4ModulesDirectory from Project.ProjectBrowserFlags import SourcesBrowserFlag, FormsBrowserFlag, \ ResourcesBrowserFlag, TranslationsBrowserFlag, InterfacesBrowserFlag, \ @@ -67,14 +68,16 @@ "Python3Interpreter": "", "CustomPython3Interpreter": False, "RubyInterpreter": "/usr/bin/ruby", - "DebugClientType": "standard", # supported "standard", "threaded", "custom" + "DebugClientType": "standard", # supported "standard", "threaded", + # "custom" "DebugClient": "", - "DebugClientType3": "standard", # supported "standard", "threaded", "custom" + "DebugClientType3": "standard", # supported "standard", "threaded", + # "custom" "DebugClient3": "", - "PythonExtensions": ".py2 .pyw2 .ptl", - # space separated list of Python extensions - "Python3Extensions": ".py .pyw .py3 .pyw3", - # space separated list of Python3 extensions + "PythonExtensions": ".py2 .pyw2 .ptl", # space separated list of + # Python extensions + "Python3Extensions": ".py .pyw .py3 .pyw3", # space separated list of + # Python3 extensions "DebugEnvironmentReplace": False, "DebugEnvironment": "", "PythonRedirect": True, @@ -137,8 +140,10 @@ # saved state main window with dock windows (1) OBSOLETE b"", # saved states floating windows (2) OBSOLETE - [b"", b"", b"", b"", b"", b"", b"", b"", b"", b"", b"", b""], - # saved state main window with floating windows (3) OBSOLETE + [b"", b"", b"", b"", b"", b"", b"", b"", b"", b"", b"", + b""], + # saved state main window with floating windows (3) + # OBSOLETE b"", # saved state main window with toolbox windows (4) b"", @@ -147,8 +152,8 @@ [True, True, True], # saved states of the splitters and sidebars of the # sidebars layout (6) - # left splitter, vertical splitter, left sidebar, bottom sidebar, - # right splitter, right sidebar + # left splitter, vertical splitter, left sidebar, + # bottom sidebar, right splitter, right sidebar [b"", b"", b"", b"", b"", b""], ], "debug": [ @@ -158,8 +163,10 @@ # saved state main window with dock windows (1) OBSOLETE b"", # saved states floating windows (2) OBSOLETE - [b"", b"", b"", b"", b"", b"", b"", b"", b"", b"", b"", b""], - # saved state main window with floating windows (3) OBSOLETE + [b"", b"", b"", b"", b"", b"", b"", b"", b"", b"", b"", + b""], + # saved state main window with floating windows (3) + # OBSOLETE b"", # saved state main window with toolbox windows (4) b"", @@ -168,8 +175,8 @@ [False, True, True], # saved states of the splitters and sidebars of the # sidebars layout (6) - # left splitter, vertical splitter, left sidebar, bottom sidebar, - # right splitter, right sidebar + # left splitter, vertical splitter, left sidebar, + # bottom sidebar, right splitter, right sidebar [b"", b"", b"", b"", b"", b""], ], }, @@ -182,8 +189,8 @@ [True, True, True], # saved states of the splitters and sidebars of the # sidebars layout (2) - # left splitter, vertical splitter, left sidebar, bottom sidebar, - # right splitter, right sidebar + # left splitter, vertical splitter, left sidebar, + # bottom sidebar, right splitter, right sidebar [QByteArray(), QByteArray(), QByteArray(), QByteArray(), QByteArray(), QByteArray()], ], @@ -195,8 +202,8 @@ [False, True, True], # saved states of the splitters and sidebars of the # sidebars layout (2) - # left splitter, vertical splitter, left sidebar, bottom sidebar, - # right splitter, right sidebar + # left splitter, vertical splitter, left sidebar, + # bottom sidebar, right splitter, right sidebar [QByteArray(), QByteArray(), QByteArray(), QByteArray(), QByteArray(), QByteArray()], ], @@ -232,7 +239,8 @@ "PluginRepositoryUrl5": \ "http://eric-ide.python-projects.org/plugins5/repository.xml", "VersionsUrls5": [ - "http://die-offenbachs.homelinux.org:48888/eric/snapshots5/versions", + "http://die-offenbachs.homelinux.org:48888/eric/snapshots5/" + "versions", "http://eric-ide.python-projects.org/snapshots5/versions", ], @@ -248,7 +256,8 @@ "LogStdErrColour": QColor(Qt.red), "NotificationsEnabled": True, - "NotificationTimeout": 5, # time in seconds the notification is shown + "NotificationTimeout": 5, # time in seconds the notification + # is shown "NotificationPosition": QPoint(10, 10), } viewProfilesLength = len(uiDefaults["ViewProfiles"]["edit"][0]) @@ -350,10 +359,10 @@ "SpellCheckingPersonalExcludeList": "", "DefaultEncoding": "utf-8", - "DefaultOpenFilter": QApplication.translate('Lexers', - 'Python Files (*.py *.py2 *.py3)'), - "DefaultSaveFilter": QApplication.translate('Lexers', - "Python3 Files (*.py)"), + "DefaultOpenFilter": QApplication.translate( + 'Lexers', 'Python Files (*.py *.py2 *.py3)'), + "DefaultSaveFilter": QApplication.translate( + 'Lexers', "Python3 Files (*.py)"), "AdditionalOpenFilters": [], "AdditionalSaveFilters": [], @@ -706,12 +715,13 @@ "HelpViewerState": QByteArray(), "WebSearchSuggestions": True, "WebSearchEngine": "Google", - "WebSearchKeywords": [], # array of two tuples (keyword, search engine name) + "WebSearchKeywords": [], # array of two tuples (keyword, + # search engine name) "DiskCacheEnabled": True, - "DiskCacheSize": 50, # 50 MB + "DiskCacheSize": 50, # 50 MB "CachePolicy": QNetworkRequest.PreferNetwork, - "AcceptCookies": 2, # CookieJar.AcceptOnlyFromSitesNavigatedTo - "KeepCookiesUntil": 0, # CookieJar.KeepUntilExpire + "AcceptCookies": 2, # CookieJar.AcceptOnlyFromSitesNavigatedTo + "KeepCookiesUntil": 0, # CookieJar.KeepUntilExpire "FilterTrackingCookies": True, "PrintBackgrounds": False, "StartupBehavior": 1, # show speed dial @@ -787,7 +797,8 @@ websettings = QWebSettings.globalSettings() fontFamily = websettings.fontFamily(QWebSettings.StandardFont) fontSize = websettings.fontSize(QWebSettings.DefaultFontSize) - cls.helpDefaults["StandardFont"] = QFont(fontFamily, fontSize).toString() + cls.helpDefaults["StandardFont"] = \ + QFont(fontFamily, fontSize).toString() fontFamily = websettings.fontFamily(QWebSettings.FixedFont) fontSize = websettings.fontSize(QWebSettings.DefaultFixedFontSize) cls.helpDefaults["FixedFont"] = QFont(fontFamily, fontSize).toString() @@ -801,13 +812,16 @@ "JavaScriptEnabled": websettings.testAttribute(QWebSettings.JavascriptEnabled), "JavaScriptCanOpenWindows": - websettings.testAttribute(QWebSettings.JavascriptCanOpenWindows), + websettings.testAttribute( + QWebSettings.JavascriptCanOpenWindows), "JavaScriptCanAccessClipboard": - websettings.testAttribute(QWebSettings.JavascriptCanAccessClipboard), + websettings.testAttribute( + QWebSettings.JavascriptCanAccessClipboard), "PluginsEnabled": websettings.testAttribute(QWebSettings.PluginsEnabled), "OfflineStorageDatabaseEnabled": - websettings.testAttribute(QWebSettings.OfflineStorageDatabaseEnabled), + websettings.testAttribute( + QWebSettings.OfflineStorageDatabaseEnabled), }) if hasattr(QWebSettings, "OfflineWebApplicationCacheEnabled"): cls.helpDefaults.update({ @@ -827,22 +841,27 @@ websettings.defaultTextEncoding() if hasattr(QWebSettings, "SpatialNavigationEnabled"): cls.helpDefaults["SpatialNavigationEnabled"] = \ - websettings.testAttribute(QWebSettings.SpatialNavigationEnabled) + websettings.testAttribute( + QWebSettings.SpatialNavigationEnabled) if hasattr(QWebSettings, "LinksIncludedInFocusChain"): cls.helpDefaults["LinksIncludedInFocusChain"] = \ - websettings.testAttribute(QWebSettings.LinksIncludedInFocusChain) + websettings.testAttribute( + QWebSettings.LinksIncludedInFocusChain) if hasattr(QWebSettings, "LocalContentCanAccessRemoteUrls"): cls.helpDefaults["LocalContentCanAccessRemoteUrls"] = \ - websettings.testAttribute(QWebSettings.LocalContentCanAccessRemoteUrls) + websettings.testAttribute( + QWebSettings.LocalContentCanAccessRemoteUrls) if hasattr(QWebSettings, "LocalContentCanAccessFileUrls"): cls.helpDefaults["LocalContentCanAccessFileUrls"] = \ - websettings.testAttribute(QWebSettings.LocalContentCanAccessFileUrls) + websettings.testAttribute( + QWebSettings.LocalContentCanAccessFileUrls) if hasattr(QWebSettings, "XSSAuditingEnabled"): cls.helpDefaults["XSSAuditingEnabled"] = \ websettings.testAttribute(QWebSettings.XSSAuditingEnabled) if hasattr(QWebSettings, "SiteSpecificQuirksEnabled"): cls.helpDefaults["SiteSpecificQuirksEnabled"] = \ - websettings.testAttribute(QWebSettings.SiteSpecificQuirksEnabled) + websettings.testAttribute( + QWebSettings.SiteSpecificQuirksEnabled) cls.webSettingsIntitialized = True @@ -1033,8 +1052,8 @@ toolGroups = [] groups = int(prefClass.settings.value("Toolgroups/Groups", 0)) for groupIndex in range(groups): - groupName = \ - prefClass.settings.value("Toolgroups/{0:02d}/Name".format(groupIndex)) + groupName = prefClass.settings.value( + "Toolgroups/{0:02d}/Name".format(groupIndex)) group = [groupName, []] items = int(prefClass.settings.value( "Toolgroups/{0:02d}/Items".format(groupIndex), 0)) @@ -1044,7 +1063,8 @@ icon = prefClass.settings.value( "Toolgroups/{0:02d}/{1:02d}/Icon".format(groupIndex, ind)) executable = prefClass.settings.value( - "Toolgroups/{0:02d}/{1:02d}/Executable".format(groupIndex, ind)) + "Toolgroups/{0:02d}/{1:02d}/Executable".format( + groupIndex, ind)) arguments = prefClass.settings.value( "Toolgroups/{0:02d}/{1:02d}/Arguments".format(groupIndex, ind)) redirect = prefClass.settings.value( @@ -1070,7 +1090,8 @@ } group[1].append(tool) toolGroups.append(group) - currentGroup = int(prefClass.settings.value("Toolgroups/Current Group", -1)) + currentGroup = int( + prefClass.settings.value("Toolgroups/Current Group", -1)) return toolGroups, currentGroup @@ -1102,7 +1123,8 @@ "Toolgroups/{0:02d}/{1:02d}/Icon".format(groupIndex, ind), tool['icon']) prefClass.settings.setValue( - "Toolgroups/{0:02d}/{1:02d}/Executable".format(groupIndex, ind), + "Toolgroups/{0:02d}/{1:02d}/Executable".format( + groupIndex, ind), tool['executable']) prefClass.settings.setValue( "Toolgroups/{0:02d}/{1:02d}/Arguments".format(groupIndex, ind), @@ -1134,7 +1156,8 @@ """ Module function to sync the preferences to disk. - In addition to syncing, the central configuration store is reinitialized as well. + In addition to syncing, the central configuration store is reinitialized + as well. @param prefClass preferences class used as the storage area """ @@ -1257,13 +1280,16 @@ prefClass.debuggerDefaults[key])) elif key in ["PassiveDbgPort"]: return int( - prefClass.settings.value("Debugger/" + key, prefClass.debuggerDefaults[key])) + prefClass.settings.value("Debugger/" + key, + prefClass.debuggerDefaults[key])) elif key in ["AllowedHosts"]: return toList( - prefClass.settings.value("Debugger/" + key, prefClass.debuggerDefaults[key])) + prefClass.settings.value("Debugger/" + key, + prefClass.debuggerDefaults[key])) elif key == "PythonInterpreter": interpreter = \ - prefClass.settings.value("Debugger/" + key, prefClass.debuggerDefaults[key]) + prefClass.settings.value("Debugger/" + key, + prefClass.debuggerDefaults[key]) if not interpreter: interpreters = findPython2Interpreters() if interpreters: @@ -1284,8 +1310,8 @@ setDebugger("PythonInterpreter", interpreter) return interpreter else: - return \ - prefClass.settings.value("Debugger/" + key, prefClass.debuggerDefaults[key]) + return prefClass.settings.value("Debugger/" + key, + prefClass.debuggerDefaults[key]) def setDebugger(key, value, prefClass=Prefs): @@ -1336,8 +1362,8 @@ @param prefClass preferences class used as the storage area @return the language for the UI """ - lang = \ - prefClass.settings.value("UI/Language", prefClass.uiDefaults["Language"]) + lang = prefClass.settings.value("UI/Language", + prefClass.uiDefaults["Language"]) if lang == "None" or lang == "" or lang is None: return None else: @@ -1463,7 +1489,8 @@ vpLength = len(viewProfiles[name][0]) if vpLength < prefClass.viewProfilesLength: viewProfiles[name][0].extend( - prefClass.uiDefaults["ViewProfiles"][name][0][vpLength:]) + prefClass.uiDefaults["ViewProfiles"][name][0] + [vpLength:]) # adjust profile vpLength = len(viewProfiles[name]) @@ -1473,13 +1500,17 @@ # adjust entries for toolboxes and sidebars vpLength = len(viewProfiles[name][5]) - if vpLength < len(prefClass.uiDefaults["ViewProfiles"][name][5]): + if vpLength < len( + prefClass.uiDefaults["ViewProfiles"][name][5]): viewProfiles[name][5].extend( - prefClass.uiDefaults["ViewProfiles"][name][5][vpLength:]) + prefClass.uiDefaults["ViewProfiles"][name][5] + [vpLength:]) vpLength = len(viewProfiles[name][6]) - if vpLength < len(prefClass.uiDefaults["ViewProfiles"][name][6]): + if vpLength < len( + prefClass.uiDefaults["ViewProfiles"][name][6]): viewProfiles[name][6].extend( - prefClass.uiDefaults["ViewProfiles"][name][6][vpLength:]) + prefClass.uiDefaults["ViewProfiles"][name][6] + [vpLength:]) else: viewProfiles = prefClass.uiDefaults["ViewProfiles"] return viewProfiles @@ -1495,7 +1526,8 @@ [] ] for bs in profiles[name][2]: - viewProfiles[name][2].append(QByteArray.fromBase64(bs.encode())) + viewProfiles[name][2].append( + QByteArray.fromBase64(bs.encode())) else: # migrate from the old ViewProfiles settings try: @@ -1523,7 +1555,8 @@ else: return prefClass.uiDefaults[key] elif key in ["VersionsUrls5"]: - urls = toList(prefClass.settings.value("UI/" + key, prefClass.uiDefaults[key])) + urls = toList( + prefClass.settings.value("UI/" + key, prefClass.uiDefaults[key])) if len(urls) == 0: return prefClass.uiDefaults[key] else: @@ -1633,11 +1666,13 @@ if key in ["DefaultEncoding", "DefaultOpenFilter", "DefaultSaveFilter", "SpellCheckingDefaultLanguage", "SpellCheckingPersonalWordList", "SpellCheckingPersonalExcludeList"]: - return prefClass.settings.value("Editor/" + key, prefClass.editorDefaults[key]) + return prefClass.settings.value("Editor/" + key, + prefClass.editorDefaults[key]) elif key in ["AutosaveInterval", "TabWidth", "IndentWidth", "FoldingStyle", "WarnFilesize", "EdgeMode", "EdgeColumn", - "CaretWidth", "AutoCompletionSource", "AutoCompletionThreshold", - "CallTipsVisible", "CallTipsStyle", "MarkOccurrencesTimeout", + "CaretWidth", "AutoCompletionSource", + "AutoCompletionThreshold", "CallTipsVisible", + "CallTipsStyle", "MarkOccurrencesTimeout", "AutoSpellCheckChunkSize", "SpellCheckingMinWordSize", "PostScriptLevel", "EOLMode", "ZoomFactor", "WhitespaceSize", "OnlineSyntaxCheckInterval", "OnlineChangeTraceInterval", @@ -1646,7 +1681,8 @@ return int(prefClass.settings.value("Editor/" + key, prefClass.editorDefaults[key])) elif key in ["AdditionalOpenFilters", "AdditionalSaveFilters", - "PreviewMarkdownFileNameExtensions", "PreviewRestFileNameExtensions", + "PreviewMarkdownFileNameExtensions", + "PreviewRestFileNameExtensions", "PreviewHtmlFileNameExtensions"]: return toList(prefClass.settings.value("Editor/" + key, prefClass.editorDefaults[key])) @@ -1708,7 +1744,8 @@ def getEditorOtherFonts(key, prefClass=Prefs): """ - Module function to retrieve the various editor fonts except the lexer fonts. + Module function to retrieve the various editor fonts except the lexer + fonts. @param key the key of the value to get @param prefClass preferences class used as the storage area @@ -1812,8 +1849,8 @@ defaultValue = editorLexerAssocDefaults[key] else: defaultValue = "" - editorLexerAssoc[key] = \ - prefClass.settings.value("Editor/LexerAssociations/" + key, defaultValue) + editorLexerAssoc[key] = prefClass.settings.value( + "Editor/LexerAssociations/" + key, defaultValue) # check for new default lexer associations for key in list(editorLexerAssocDefaults.keys()): @@ -1837,14 +1874,16 @@ if key not in assocs: prefClass.settings.remove("Editor/LexerAssociations/" + key) for key in assocs: - prefClass.settings.setValue("Editor/LexerAssociations/" + key, assocs[key]) + prefClass.settings.setValue("Editor/LexerAssociations/" + key, + assocs[key]) def getEditorLexerAssoc(filename, prefClass=Prefs): """ Module function to retrieve a lexer association. - @param filename filename used to determine the associated lexer language (string) + @param filename filename used to determine the associated lexer language + (string) @param prefClass preferences class used as the storage area @return the requested lexer language (string) """ @@ -1915,7 +1954,8 @@ @param prefClass preferences class used as the storage area """ if key in ["RTF/Font"]: - prefClass.settings.setValue("Editor/Exporters/" + key, value.toString()) + prefClass.settings.setValue("Editor/Exporters/" + key, + value.toString()) else: prefClass.settings.setValue("Editor/Exporters/" + key, value) @@ -2036,7 +2076,8 @@ except KeyError: default = AllBrowsersFlag - return int(prefClass.settings.value("Project/BrowserFlags/" + key, default)) + return int(prefClass.settings.value("Project/BrowserFlags/" + key, + default)) def setProjectBrowserFlags(key, value, prefClass=Prefs): @@ -2139,7 +2180,8 @@ if s == "": s = os.getenv("QT4DOCDIR", "") if s == "": - s = os.path.join(QLibraryInfo.location(QLibraryInfo.DocumentationPath), "html") + s = os.path.join( + QLibraryInfo.location(QLibraryInfo.DocumentationPath), "html") return s @@ -2155,7 +2197,8 @@ if s == "": s = os.getenv("QT5DOCDIR", "") if s == "": - s = os.path.join(QLibraryInfo.location(QLibraryInfo.DocumentationPath), "qtdoc") + s = os.path.join( + QLibraryInfo.location(QLibraryInfo.DocumentationPath), "qtdoc") return s @@ -2225,36 +2268,42 @@ prefClass.helpDefaults[key]), encode=False) elif key in ["HelpViewerType", "DiskCacheSize", "AcceptCookies", "KeepCookiesUntil", "StartupBehavior", "HistoryLimit", - "OfflineStorageDatabaseQuota", "OfflineWebApplicationCacheQuota", - "CachePolicy", "DownloadManagerRemovePolicy", "AdBlockUpdatePeriod", - "SearchLanguage", "SyncType", "SyncFtpPort", "SyncFtpIdleTimeout", - "SyncEncryptionKeyLength"]: + "OfflineStorageDatabaseQuota", + "OfflineWebApplicationCacheQuota", "CachePolicy", + "DownloadManagerRemovePolicy", "AdBlockUpdatePeriod", + "SearchLanguage", "SyncType", "SyncFtpPort", + "SyncFtpIdleTimeout", "SyncEncryptionKeyLength"]: return int(prefClass.settings.value("Help/" + key, prefClass.helpDefaults[key])) elif key in ["SingleHelpWindow", "SaveGeometry", "WebSearchSuggestions", - "DiskCacheEnabled", "FilterTrackingCookies", "PrintBackgrounds", - "AdBlockEnabled", "AutoLoadImages", - "JavaEnabled", "JavaScriptEnabled", "JavaScriptCanOpenWindows", - "JavaScriptCanAccessClipboard", "PluginsEnabled", "DnsPrefetchEnabled", - "OfflineStorageDatabaseEnabled", "OfflineWebApplicationCacheEnabled", - "LocalStorageEnabled", "ShowPreview", "AccessKeysEnabled", - "VirusTotalEnabled", "VirusTotalSecure", "DoNotTrack", "SendReferer", + "DiskCacheEnabled", "FilterTrackingCookies", + "PrintBackgrounds", "AdBlockEnabled", "AutoLoadImages", + "JavaEnabled", "JavaScriptEnabled", + "JavaScriptCanOpenWindows", "JavaScriptCanAccessClipboard", + "PluginsEnabled", "DnsPrefetchEnabled", + "OfflineStorageDatabaseEnabled", + "OfflineWebApplicationCacheEnabled", "LocalStorageEnabled", + "ShowPreview", "AccessKeysEnabled", "VirusTotalEnabled", + "VirusTotalSecure", "DoNotTrack", "SendReferer", "SpatialNavigationEnabled", "LinksIncludedInFocusChain", - "LocalContentCanAccessRemoteUrls", "LocalContentCanAccessFileUrls", - "XSSAuditingEnabled", "SiteSpecificQuirksEnabled", "SyncEnabled", - "SyncBookmarks", "SyncHistory", "SyncPasswords", "SyncUserAgents", - "SyncSpeedDial", "SyncEncryptData", "SyncEncryptPasswordsOnly", + "LocalContentCanAccessRemoteUrls", + "LocalContentCanAccessFileUrls", "XSSAuditingEnabled", + "SiteSpecificQuirksEnabled", "SyncEnabled", "SyncBookmarks", + "SyncHistory", "SyncPasswords", "SyncUserAgents", + "SyncSpeedDial", "SyncEncryptData", + "SyncEncryptPasswordsOnly", "WarnOnMultipleClose", "ClickToFlashEnabled" ]: return toBool(prefClass.settings.value("Help/" + key, prefClass.helpDefaults[key])) - elif key in ["AdBlockSubscriptions", "AdBlockExceptions", "ClickToFlashWhitelist", - "SendRefererWhitelist", "GreaseMonkeyDisabledScripts", - "NoCacheHosts"]: + elif key in ["AdBlockSubscriptions", "AdBlockExceptions", + "ClickToFlashWhitelist", "SendRefererWhitelist", + "GreaseMonkeyDisabledScripts", "NoCacheHosts"]: return toList(prefClass.settings.value("Help/" + key, prefClass.helpDefaults[key])) else: - return prefClass.settings.value("Help/" + key, prefClass.helpDefaults[key]) + return prefClass.settings.value("Help/" + key, + prefClass.helpDefaults[key]) def setHelp(key, value, prefClass=Prefs): @@ -2394,7 +2443,8 @@ @param prefClass preferences class used as the storage area @return the requested corba setting """ - return prefClass.settings.value("Corba/" + key, prefClass.corbaDefaults[key]) + return prefClass.settings.value("Corba/" + key, + prefClass.corbaDefaults[key]) def setCorba(key, value, prefClass=Prefs): @@ -2429,7 +2479,8 @@ return toBool(prefClass.settings.value("User/" + key, prefClass.userDefaults[key])) else: - return prefClass.settings.value("User/" + key, prefClass.userDefaults[key]) + return prefClass.settings.value("User/" + key, + prefClass.userDefaults[key]) def setUser(key, value, prefClass=Prefs): @@ -2461,9 +2512,11 @@ @return the requested user setting """ if key in ["StatusMonitorInterval"]: - return int(prefClass.settings.value("VCS/" + key, prefClass.vcsDefaults[key])) + return int(prefClass.settings.value("VCS/" + key, + prefClass.vcsDefaults[key])) else: - return toBool(prefClass.settings.value("VCS/" + key, prefClass.vcsDefaults[key])) + return toBool(prefClass.settings.value("VCS/" + key, + prefClass.vcsDefaults[key])) def setVCS(key, value, prefClass=Prefs): @@ -2688,15 +2741,17 @@ @return the requested user setting """ if key in ["TimestampIncludeDate", "ShowTimestamps", "ShowNotifications", - "NotifyJoinPart", "NotifyMessage", "NotifyNick", "EnableIrcColours", - "AutoUserInfoLookup", "MarkPositionWhenHidden", "AskOnShutdown"]: + "NotifyJoinPart", "NotifyMessage", "NotifyNick", + "EnableIrcColours", "AutoUserInfoLookup", + "MarkPositionWhenHidden", "AskOnShutdown"]: return toBool(prefClass.settings.value("IRC/" + key, prefClass.ircDefaults[key])) elif key in ["AutoUserInfoMax", "AutoUserInfoInterval"]: return int(prefClass.settings.value("IRC/" + key, prefClass.ircDefaults[key])) else: - return prefClass.settings.value("IRC/" + key, prefClass.ircDefaults[key]) + return prefClass.settings.value("IRC/" + key, + prefClass.ircDefaults[key]) def setIrc(key, value, prefClass=Prefs): @@ -2845,20 +2900,38 @@ from Utilities.crypto import pwRecode for key in ["ProxyPassword/Http", "ProxyPassword/Https", "ProxyPassword/Ftp", ]: - prefClass.settings.setValue("UI/" + key, pwRecode( - prefClass.settings.value("UI/" + key, prefClass.uiDefaults[key]), - oldPassword, - newPassword)) + prefClass.settings.setValue( + "UI/" + key, + pwRecode( + prefClass.settings.value("UI/" + key, + prefClass.uiDefaults[key] + ), + oldPassword, + newPassword + ) + ) for key in ["MailServerPassword"]: - prefClass.settings.setValue("User/" + key, pwRecode( - prefClass.settings.value("User/" + key, prefClass.userDefaults[key]), - oldPassword, - newPassword)) + prefClass.settings.setValue( + "User/" + key, + pwRecode( + prefClass.settings.value("User/" + key, + prefClass.userDefaults[key] + ), + oldPassword, + newPassword + ) + ) for key in ["SyncFtpPassword", "SyncEncryptionKey"]: - prefClass.settings.setValue("Help/" + key, pwRecode( - prefClass.settings.value("Help/" + key, prefClass.helpDefaults[key]), - oldPassword, - newPassword)) + prefClass.settings.setValue( + "Help/" + key, + pwRecode( + prefClass.settings.value("Help/" + key, + prefClass.helpDefaults[key] + ), + oldPassword, + newPassword + ) + ) initPreferences()
--- a/Project/FiletypeAssociationDialog.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Project/FiletypeAssociationDialog.py Sat Oct 12 18:25:29 2013 +0200 @@ -78,7 +78,8 @@ @param filetype file type of the entry (string) @return reference to the newly generated entry (QTreeWidgetItem) """ - itm = QTreeWidgetItem(self.filetypeAssociationList, [pattern, filetype]) + itm = QTreeWidgetItem( + self.filetypeAssociationList, [pattern, filetype]) return itm def on_filetypeAssociationList_currentItemChanged(self, itm, prevItm):
--- a/Project/LexerAssociationDialog.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Project/LexerAssociationDialog.py Sat Oct 12 18:25:29 2013 +0200 @@ -108,7 +108,8 @@ def on_editorLexerList_itemClicked(self, itm, column): """ - Private slot to handle the clicked signal of the lexer association list. + Private slot to handle the clicked signal of the lexer association + list. @param itm reference to the selecte item (QTreeWidgetItem) @param column column the item was clicked or activated (integer)
--- a/Project/Project.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Project/Project.py Sat Oct 12 18:25:29 2013 +0200 @@ -3870,7 +3870,8 @@ continue # set fn to project relative name - # then reset ns to fully qualified name for insertion, possibly. + # then reset ns to fully qualified name for insertion, + # possibly. if dir == "": fn = ns else: @@ -3887,7 +3888,8 @@ filetype = "" bfn = os.path.basename(fn) - for pattern in reversed(sorted(self.pdata["FILETYPES"].keys())): + for pattern in reversed( + sorted(self.pdata["FILETYPES"].keys())): if fnmatch.fnmatch(bfn, pattern): filetype = self.pdata["FILETYPES"][pattern] break @@ -4058,8 +4060,8 @@ E5MessageBox.critical(self.ui, self.trUtf8("Version Control System"), self.trUtf8( - "<p>The selected VCS <b>{0}</b> could not be found." - "<br/>Reverting override.</p><p>{1}</p>")\ + "<p>The selected VCS <b>{0}</b> could not be" + " found. <br/>Reverting override.</p><p>{1}</p>") .format(vcsSystem, msg)) self.pudata["VCSOVERRIDE"] = [] return self.initVCS(nooverride=True) @@ -4640,9 +4642,10 @@ except (IOError, UnicodeError) as why: E5MessageBox.critical(self.ui, self.trUtf8("Create Plugin Archive"), - self.trUtf8("""<p>The plugin file <b>{0}</b> could """ - """not be read.</p>""" - """<p>Reason: {1}</p>""").format(filename, str(why))) + self.trUtf8( + """<p>The plugin file <b>{0}</b> could """ + """not be read.</p> <p>Reason: {1}</p>""") + .format(filename, str(why))) return "" for sourceline in sourcelines:
--- a/Project/ProjectBaseBrowser.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Project/ProjectBaseBrowser.py Sat Oct 12 18:25:29 2013 +0200 @@ -542,7 +542,8 @@ def selectLocalDirEntries(self): """ - Public slot to handle the select local directories context menu entries. + Public slot to handle the select local directories context menu + entries. """ self._selectEntries(local=True, filter=[ProjectBrowserSimpleDirectoryItem,
--- a/Project/ProjectTranslationsBrowser.py Sat Oct 12 17:31:40 2013 +0200 +++ b/Project/ProjectTranslationsBrowser.py Sat Oct 12 18:25:29 2013 +0200 @@ -908,12 +908,14 @@ if ui.notificationsEnabled(): ui.showNotification(UI.PixmapCache.getPixmap("linguist48.png"), self.trUtf8("Translation file generation"), - self.trUtf8("The generation of the translation files (*.ts)" + self.trUtf8( + "The generation of the translation files (*.ts)" " was successful.")) else: E5MessageBox.information(self, self.trUtf8("Translation file generation"), - self.trUtf8("The generation of the translation files (*.ts)" + self.trUtf8( + "The generation of the translation files (*.ts)" " was successful.")) else: E5MessageBox.critical(self,