--- a/UI/UserInterface.py Thu Mar 23 18:58:56 2017 +0100 +++ b/UI/UserInterface.py Fri Apr 07 18:33:59 2017 +0200 @@ -3265,47 +3265,47 @@ editor = MiniEditor(parent=self) editor.show() - def addE5Actions(self, actions, type): + def addE5Actions(self, actions, actionType): """ Public method to add actions to the list of actions. @param actions list of actions to be added (list of E5Action) - @param type string denoting the action set to get. + @param actionType string denoting the action set to add to. It must be one of "ui" or "wizards". """ - if type == 'ui': + if actionType == 'ui': self.actions.extend(actions) - elif type == 'wizards': + elif actionType == 'wizards': self.wizardsActions.extend(actions) - def removeE5Actions(self, actions, type='ui'): + def removeE5Actions(self, actions, actionType='ui'): """ Public method to remove actions from the list of actions. @param actions list of actions (list of E5Action) - @param type string denoting the action set to get. + @param actionType string denoting the action set to remove from. It must be one of "ui" or "wizards". """ for act in actions: try: - if type == 'ui': + if actionType == 'ui': self.actions.remove(act) - elif type == 'wizards': + elif actionType == 'wizards': self.wizardsActions.remove(act) except ValueError: pass - def getActions(self, type): + def getActions(self, actionType): """ Public method to get a list of all actions. - @param type string denoting the action set to get. + @param actionType string denoting the action set to get. It must be one of "ui" or "wizards". @return list of all actions (list of E5Action) """ - if type == 'ui': + if actionType == 'ui': return self.actions[:] - elif type == 'wizards': + elif actionType == 'wizards': return self.wizardsActions[:] else: return [] @@ -5349,21 +5349,21 @@ if not single or self.helpWindow is None: if WEBENGINE_AVAILABLE: from WebBrowser.WebBrowserWindow import WebBrowserWindow - help = WebBrowserWindow(home, '.', None, 'web_browser', - True, searchWord=searchWord) + browser = WebBrowserWindow(home, '.', None, 'web_browser', + True, searchWord=searchWord) elif WEBKIT_AVAILABLE: from Helpviewer.HelpWindow import HelpWindow - help = HelpWindow(home, '.', None, 'help viewer', True, - searchWord=searchWord) + browser = HelpWindow(home, '.', None, 'help viewer', True, + searchWord=searchWord) if QApplication.desktop().width() > 400 and \ QApplication.desktop().height() > 500: - help.show() + browser.show() else: - help.showMaximized() + browser.showMaximized() if single: - self.helpWindow = help + self.helpWindow = browser try: self.helpWindow.webBrowserWindowClosed.connect( self.__helpClosed) @@ -6105,7 +6105,7 @@ self.__pluginInfoDialog.show() @pyqtSlot() - def __installPlugins(self, pluginFileNames=[]): + def __installPlugins(self, pluginFileNames=None): """ Private slot to show a dialog to install a new plugin. @@ -6113,7 +6113,10 @@ installation list of strings """ from PluginManager.PluginInstallDialog import PluginInstallDialog - dlg = PluginInstallDialog(self.pluginManager, pluginFileNames, self) + dlg = PluginInstallDialog( + self.pluginManager, + [] if pluginFileNames is None else pluginFileNames[:], + self) dlg.exec_() if dlg.restartNeeded(): self.__restart()