eric6/UI/UserInterface.py

branch
multi_processing
changeset 7802
eefe954f01e8
parent 7646
39e3db2b4936
parent 7785
9978016560ec
child 7818
5c9271c2f662
equal deleted inserted replaced
7646:39e3db2b4936 7802:eefe954f01e8
4 # 4 #
5 5
6 """ 6 """
7 Module implementing the main user interface. 7 Module implementing the main user interface.
8 """ 8 """
9
10 9
11 import os 10 import os
12 import sys 11 import sys
13 import logging 12 import logging
14 13
434 self.debuggerUI.compileResources.connect( 433 self.debuggerUI.compileResources.connect(
435 self.projectBrowser.prBrowser.compileChangedResources) 434 self.projectBrowser.prBrowser.compileChangedResources)
436 self.debuggerUI.executeMake.connect(self.project.executeMake) 435 self.debuggerUI.executeMake.connect(self.project.executeMake)
437 self.debuggerUI.appendStdout.connect(self.appendToStdout) 436 self.debuggerUI.appendStdout.connect(self.appendToStdout)
438 437
438 debugServer.clientDisassembly.connect(
439 self.debugViewer.disassemblyViewer.showDisassembly)
439 debugServer.clientProcessStdout.connect(self.appendToStdout) 440 debugServer.clientProcessStdout.connect(self.appendToStdout)
440 debugServer.clientProcessStderr.connect(self.appendToStderr) 441 debugServer.clientProcessStderr.connect(self.appendToStderr)
441 debugServer.appendStdout.connect(self.appendToStdout) 442 debugServer.appendStdout.connect(self.appendToStdout)
442 443
443 self.stdout.appendStdout.connect(self.appendToStdout) 444 self.stdout.appendStdout.connect(self.appendToStdout)
472 self.preferencesChanged.connect(debugServer.preferencesChanged) 473 self.preferencesChanged.connect(debugServer.preferencesChanged)
473 self.preferencesChanged.connect(self.debugViewer.preferencesChanged) 474 self.preferencesChanged.connect(self.debugViewer.preferencesChanged)
474 self.preferencesChanged.connect( 475 self.preferencesChanged.connect(
475 self.backgroundService.preferencesOrProjectChanged) 476 self.backgroundService.preferencesOrProjectChanged)
476 self.preferencesChanged.connect(self.__previewer.preferencesChanged) 477 self.preferencesChanged.connect(self.__previewer.preferencesChanged)
478 self.preferencesChanged.connect(self.__astViewer.preferencesChanged)
479 self.preferencesChanged.connect(self.__disViewer.preferencesChanged)
477 480
478 if self.browser is not None: 481 if self.browser is not None:
479 self.browser.sourceFile[str].connect( 482 self.browser.sourceFile[str].connect(
480 self.viewmanager.openSourceFile) 483 self.viewmanager.openSourceFile)
481 self.browser.sourceFile[str, int].connect( 484 self.browser.sourceFile[str, int].connect(
674 677
675 # now activate the initial view profile 678 # now activate the initial view profile
676 splash.showMessage(self.tr("Setting View Profile...")) 679 splash.showMessage(self.tr("Setting View Profile..."))
677 self.__setEditProfile() 680 self.__setEditProfile()
678 681
682 # special treatment for the VCS toolbars
683 for tb in self.getToolbarsByCategory("vcs"):
684 tb.setVisible(False)
685 tb.setEnabled(False)
686 tb = self.getToolbar("vcs")[1]
687 tb.setEnabled(True)
688 if Preferences.getVCS("ShowVcsToolbar"):
689 tb.setVisible(True)
690
679 # now read the saved tasks 691 # now read the saved tasks
680 splash.showMessage(self.tr("Reading Tasks...")) 692 splash.showMessage(self.tr("Reading Tasks..."))
681 self.__readTasks() 693 self.__readTasks()
682 694
683 if self.templateViewer is not None: 695 if self.templateViewer is not None:
766 # Create AST viewer 778 # Create AST viewer
767 logging.debug("Creating Python AST Viewer") 779 logging.debug("Creating Python AST Viewer")
768 from .PythonAstViewer import PythonAstViewer 780 from .PythonAstViewer import PythonAstViewer
769 self.__astViewer = PythonAstViewer(self.viewmanager, splitter) 781 self.__astViewer = PythonAstViewer(self.viewmanager, splitter)
770 splitter.addWidget(self.__astViewer) 782 splitter.addWidget(self.__astViewer)
783
784 # Create DIS viewer
785 logging.debug("Creating Python Disassembly Viewer")
786 from .PythonDisViewer import PythonDisViewer
787 self.__disViewer = PythonDisViewer(self.viewmanager, parent=splitter)
788 splitter.addWidget(self.__disViewer)
771 789
772 # Create layout with toolbox windows embedded in dock windows 790 # Create layout with toolbox windows embedded in dock windows
773 if self.__layoutType == "Toolboxes": 791 if self.__layoutType == "Toolboxes":
774 logging.debug("Creating toolboxes...") 792 logging.debug("Creating toolboxes...")
775 self.__createToolboxesLayout(debugServer) 793 self.__createToolboxesLayout(debugServer)
3285 unittesttb.hide() 3303 unittesttb.hide()
3286 pluginstb.hide() 3304 pluginstb.hide()
3287 3305
3288 # just add new toolbars to the end of the list 3306 # just add new toolbars to the end of the list
3289 self.__toolbars = {} 3307 self.__toolbars = {}
3290 self.__toolbars["file"] = [filetb.windowTitle(), filetb] 3308 self.__toolbars["file"] = [filetb.windowTitle(), filetb, ""]
3291 self.__toolbars["edit"] = [edittb.windowTitle(), edittb] 3309 self.__toolbars["edit"] = [edittb.windowTitle(), edittb, ""]
3292 self.__toolbars["search"] = [searchtb.windowTitle(), searchtb] 3310 self.__toolbars["search"] = [searchtb.windowTitle(), searchtb, ""]
3293 self.__toolbars["view"] = [viewtb.windowTitle(), viewtb] 3311 self.__toolbars["view"] = [viewtb.windowTitle(), viewtb, ""]
3294 self.__toolbars["start"] = [starttb.windowTitle(), starttb] 3312 self.__toolbars["start"] = [starttb.windowTitle(), starttb, ""]
3295 self.__toolbars["debug"] = [debugtb.windowTitle(), debugtb] 3313 self.__toolbars["debug"] = [debugtb.windowTitle(), debugtb, ""]
3296 self.__toolbars["project"] = [projecttb.windowTitle(), projecttb] 3314 self.__toolbars["project"] = [projecttb.windowTitle(), projecttb, ""]
3297 self.__toolbars["tools"] = [toolstb.windowTitle(), toolstb] 3315 self.__toolbars["tools"] = [toolstb.windowTitle(), toolstb, ""]
3298 self.__toolbars["help"] = [helptb.windowTitle(), helptb] 3316 self.__toolbars["help"] = [helptb.windowTitle(), helptb, ""]
3299 self.__toolbars["settings"] = [settingstb.windowTitle(), settingstb] 3317 self.__toolbars["settings"] = [settingstb.windowTitle(), settingstb,
3300 self.__toolbars["bookmarks"] = [bookmarktb.windowTitle(), bookmarktb] 3318 ""]
3301 self.__toolbars["unittest"] = [unittesttb.windowTitle(), unittesttb] 3319 self.__toolbars["bookmarks"] = [bookmarktb.windowTitle(), bookmarktb,
3320 ""]
3321 self.__toolbars["unittest"] = [unittesttb.windowTitle(), unittesttb,
3322 ""]
3302 self.__toolbars["view_profiles"] = [profilestb.windowTitle(), 3323 self.__toolbars["view_profiles"] = [profilestb.windowTitle(),
3303 profilestb] 3324 profilestb, ""]
3304 self.__toolbars["plugins"] = [pluginstb.windowTitle(), pluginstb] 3325 self.__toolbars["plugins"] = [pluginstb.windowTitle(), pluginstb, ""]
3305 self.__toolbars["quicksearch"] = [quicksearchtb.windowTitle(), 3326 self.__toolbars["quicksearch"] = [quicksearchtb.windowTitle(),
3306 quicksearchtb] 3327 quicksearchtb, ""]
3307 self.__toolbars["multiproject"] = [multiprojecttb.windowTitle(), 3328 self.__toolbars["multiproject"] = [multiprojecttb.windowTitle(),
3308 multiprojecttb] 3329 multiprojecttb, ""]
3309 self.__toolbars["spelling"] = [spellingtb.windowTitle(), spellingtb] 3330 self.__toolbars["spelling"] = [spellingtb.windowTitle(), spellingtb,
3310 self.__toolbars["vcs"] = [vcstb.windowTitle(), vcstb] 3331 ""]
3332 self.__toolbars["vcs"] = [vcstb.windowTitle(), vcstb, "vcs"]
3311 3333
3312 def __initDebugToolbarsLayout(self): 3334 def __initDebugToolbarsLayout(self):
3313 """ 3335 """
3314 Private slot to initialize the toolbars layout for the debug profile. 3336 Private slot to initialize the toolbars layout for the debug profile.
3315 """ 3337 """
3656 address = FeatureAddress 3678 address = FeatureAddress
3657 else: 3679 else:
3658 address = BugAddress 3680 address = BugAddress
3659 subject = "[eric6] " 3681 subject = "[eric6] "
3660 if attachFile is not None: 3682 if attachFile is not None:
3661 f = open(attachFile, "r", encoding="utf-8") 3683 with open(attachFile, "r", encoding="utf-8") as f:
3662 body = f.read() 3684 body = f.read()
3663 f.close()
3664 if deleteAttachFile: 3685 if deleteAttachFile:
3665 os.remove(attachFile) 3686 os.remove(attachFile)
3666 else: 3687 else:
3667 body = "\r\n----\r\n{0}----\r\n{1}----\r\n{2}".format( 3688 body = "\r\n----\r\n{0}\r\n----\r\n{1}\r\n----\r\n{2}".format(
3668 Utilities.generateVersionInfo("\r\n"), 3689 Utilities.generateVersionInfo("\r\n"),
3669 Utilities.generatePluginsVersionInfo("\r\n"), 3690 Utilities.generatePluginsVersionInfo("\r\n"),
3670 Utilities.generateDistroInfo("\r\n")) 3691 Utilities.generateDistroInfo("\r\n"))
3671 3692
3672 url = QUrl("mailto:{0}".format(address)) 3693 url = QUrl("mailto:{0}".format(address))
3685 logFile = os.path.join(Utilities.getConfigDir(), 3706 logFile = os.path.join(Utilities.getConfigDir(),
3686 self.ErrorLogFileName) 3707 self.ErrorLogFileName)
3687 if os.path.exists(logFile): 3708 if os.path.exists(logFile):
3688 from .ErrorLogDialog import ErrorLogDialog 3709 from .ErrorLogDialog import ErrorLogDialog
3689 dlg = ErrorLogDialog(logFile, False, self) 3710 dlg = ErrorLogDialog(logFile, False, self)
3690 dlg.exec_() 3711 dlg.exec()
3691 3712
3692 def __hasErrorLog(self): 3713 def __hasErrorLog(self):
3693 """ 3714 """
3694 Private method to check, if an error log file exists. 3715 Private method to check, if an error log file exists.
3695 3716
3829 try: 3850 try:
3830 return self.__menus[name] 3851 return self.__menus[name]
3831 except KeyError: 3852 except KeyError:
3832 return None 3853 return None
3833 3854
3834 def registerToolbar(self, name, text, toolbar): 3855 def registerToolbar(self, name, text, toolbar, category=""):
3835 """ 3856 """
3836 Public method to register a toolbar. 3857 Public method to register a toolbar.
3837 3858
3838 This method must be called in order to make a toolbar manageable by the 3859 This method must be called in order to make a toolbar manageable by the
3839 UserInterface object. 3860 UserInterface object.
3840 3861
3841 @param name name of the toolbar (string). This is used as the key into 3862 @param name name of the toolbar. This is used as the key into
3842 the dictionary of toolbar references. 3863 the dictionary of toolbar references.
3843 @param text user visible text for the toolbar entry (string) 3864 @type str
3844 @param toolbar reference to the toolbar to be registered (QToolBar) 3865 @param text user visible text for the toolbar entry
3866 @type str
3867 @param toolbar reference to the toolbar to be registered
3868 @type QToolBar
3869 @param category toolbar category
3870 @type str
3845 @exception KeyError raised, if a toolbar with the given name was 3871 @exception KeyError raised, if a toolbar with the given name was
3846 already registered 3872 already registered
3847 """ 3873 """
3848 if name in self.__toolbars: 3874 if name in self.__toolbars:
3849 raise KeyError("Toolbar '{0}' already registered.".format(name)) 3875 raise KeyError("Toolbar '{0}' already registered.".format(name))
3850 3876
3851 self.__toolbars[name] = [text, toolbar] 3877 self.__toolbars[name] = [text, toolbar, category]
3852 3878
3853 def reregisterToolbar(self, name, text): 3879 def reregisterToolbar(self, name, text, category=""):
3854 """ 3880 """
3855 Public method to change the visible text for the named toolbar. 3881 Public method to change the visible text for the named toolbar.
3856 3882
3857 @param name name of the toolbar to be changed (string) 3883 @param name name of the toolbar to be changed
3858 @param text new user visible text for the toolbar entry (string) 3884 @type str
3885 @param text new user visible text for the toolbar entry
3886 @type str
3887 @param category new toolbar category for the toolbar entry
3888 @type str
3859 """ 3889 """
3860 if name in self.__toolbars: 3890 if name in self.__toolbars:
3861 self.__toolbars[name][0] = text 3891 self.__toolbars[name][0] = text
3892 self.__toolbars[name][2] = category
3862 3893
3863 def unregisterToolbar(self, name): 3894 def unregisterToolbar(self, name):
3864 """ 3895 """
3865 Public method to unregister a toolbar. 3896 Public method to unregister a toolbar.
3866 3897
3878 """ 3909 """
3879 try: 3910 try:
3880 return self.__toolbars[name] 3911 return self.__toolbars[name]
3881 except KeyError: 3912 except KeyError:
3882 return None 3913 return None
3883 3914
3915 def getToolbarsByCategory(self, category):
3916 """
3917 Public method to get a list of toolbars belonging to a given toolbar
3918 category.
3919
3920 @param category toolbar category
3921 @type str
3922 @return list of toolbars
3923 @rtype list of QToolBar
3924 """
3925 toolbars = []
3926 for tbName in self.__toolbars:
3927 try:
3928 if self.__toolbars[tbName][2] == category:
3929 toolbars.append(self.__toolbars[tbName][1])
3930 except IndexError:
3931 # backward compatibility; category is not yet supported
3932 pass
3933
3934 return toolbars
3935
3884 def getLocale(self): 3936 def getLocale(self):
3885 """ 3937 """
3886 Public method to get the locale of the IDE. 3938 Public method to get the locale of the IDE.
3887 3939
3888 @return locale of the IDE (string or None) 3940 @return locale of the IDE (string or None)
4097 4149
4098 @param menu reference to the menu to be populated (QMenu) 4150 @param menu reference to the menu to be populated (QMenu)
4099 """ 4151 """
4100 menu.clear() 4152 menu.clear()
4101 4153
4102 for name, (text, tb) in sorted(self.__toolbars.items(), 4154 for name, (text, tb, _category) in sorted(
4103 key=lambda t: t[1][0]): 4155 self.__toolbars.items(), key=lambda t: t[1][0]
4156 ):
4104 act = menu.addAction(text) 4157 act = menu.addAction(text)
4105 act.setCheckable(True) 4158 act.setCheckable(True)
4106 act.setChecked(not tb.isHidden()) 4159 act.setChecked(not tb.isHidden())
4107 act.setData(name) 4160 act.setData(name)
4108 menu.addSeparator() 4161 menu.addSeparator()
4138 @param act reference to the action that was triggered (QAction) 4191 @param act reference to the action that was triggered (QAction)
4139 """ 4192 """
4140 name = act.data() 4193 name = act.data()
4141 if name: 4194 if name:
4142 if name == "__SHOW__": 4195 if name == "__SHOW__":
4143 for _text, tb in self.__toolbars.values(): 4196 for _text, tb, _category in self.__toolbars.values():
4144 tb.show() 4197 tb.show()
4145 if self.__menus["toolbars"].isTearOffMenuVisible(): 4198 if self.__menus["toolbars"].isTearOffMenuVisible():
4146 self.__menus["toolbars"].hideTearOffMenu() 4199 self.__menus["toolbars"].hideTearOffMenu()
4147 elif name == "__HIDE__": 4200 elif name == "__HIDE__":
4148 for _text, tb in self.__toolbars.values(): 4201 for _text, tb, _category in self.__toolbars.values():
4149 tb.hide() 4202 tb.hide()
4150 if self.__menus["toolbars"].isTearOffMenuVisible(): 4203 if self.__menus["toolbars"].isTearOffMenuVisible():
4151 self.__menus["toolbars"].hideTearOffMenu() 4204 self.__menus["toolbars"].hideTearOffMenu()
4152 else: 4205 else:
4153 tb = self.__toolbars[name][1] 4206 tb = self.__toolbars[name][1]
4154 if act.isChecked(): 4207 if act.isChecked():
4155 tb.show() 4208 tb.show()
4209 tb.setEnabled(True)
4156 else: 4210 else:
4157 tb.hide() 4211 tb.hide()
4158 4212
4159 def __TBPopupMenuTriggered(self, act): 4213 def __TBPopupMenuTriggered(self, act):
4160 """ 4214 """
4164 @param act reference to the action that was triggered (QAction) 4218 @param act reference to the action that was triggered (QAction)
4165 """ 4219 """
4166 name = act.data() 4220 name = act.data()
4167 if name: 4221 if name:
4168 if name == "__SHOW__": 4222 if name == "__SHOW__":
4169 for _text, tb in self.__toolbars.values(): 4223 for _text, tb, _category in self.__toolbars.values():
4170 tb.show() 4224 tb.show()
4171 elif name == "__HIDE__": 4225 elif name == "__HIDE__":
4172 for _text, tb in self.__toolbars.values(): 4226 for _text, tb, _category in self.__toolbars.values():
4173 tb.hide() 4227 tb.hide()
4174 else: 4228 else:
4175 tb = self.__toolbars[name][1] 4229 tb = self.__toolbars[name][1]
4176 if act.isChecked(): 4230 if act.isChecked():
4177 tb.show() 4231 tb.show()
4232 tb.setEnabled(True)
4178 else: 4233 else:
4179 tb.hide() 4234 tb.hide()
4180 if self.__menus["toolbars"].isTearOffMenuVisible(): 4235 if self.__menus["toolbars"].isTearOffMenuVisible():
4181 self.__menus["toolbars"].hideTearOffMenu() 4236 self.__menus["toolbars"].hideTearOffMenu()
4182 4237
4686 Private slot to handle the tools configuration menu entry. 4741 Private slot to handle the tools configuration menu entry.
4687 """ 4742 """
4688 from Preferences.ToolConfigurationDialog import ToolConfigurationDialog 4743 from Preferences.ToolConfigurationDialog import ToolConfigurationDialog
4689 dlg = ToolConfigurationDialog( 4744 dlg = ToolConfigurationDialog(
4690 self.toolGroups[self.currentToolGroup][1], self) 4745 self.toolGroups[self.currentToolGroup][1], self)
4691 if dlg.exec_() == QDialog.Accepted: 4746 if dlg.exec() == QDialog.Accepted:
4692 self.toolGroups[self.currentToolGroup][1] = dlg.getToollist() 4747 self.toolGroups[self.currentToolGroup][1] = dlg.getToollist()
4693 self.__updateExternalToolsActions() 4748 self.__updateExternalToolsActions()
4694 4749
4695 def __toolGroupsConfiguration(self): 4750 def __toolGroupsConfiguration(self):
4696 """ 4751 """
4699 from Preferences.ToolGroupConfigurationDialog import ( 4754 from Preferences.ToolGroupConfigurationDialog import (
4700 ToolGroupConfigurationDialog 4755 ToolGroupConfigurationDialog
4701 ) 4756 )
4702 dlg = ToolGroupConfigurationDialog( 4757 dlg = ToolGroupConfigurationDialog(
4703 self.toolGroups, self.currentToolGroup, self) 4758 self.toolGroups, self.currentToolGroup, self)
4704 if dlg.exec_() == QDialog.Accepted: 4759 if dlg.exec() == QDialog.Accepted:
4705 self.toolGroups, self.currentToolGroup = dlg.getToolGroups() 4760 self.toolGroups, self.currentToolGroup = dlg.getToolGroups()
4706 4761
4707 def __createUnitTestDialog(self): 4762 def __createUnitTestDialog(self):
4708 """ 4763 """
4709 Private slot to generate the unit test dialog on demand. 4764 Private slot to generate the unit test dialog on demand.
5877 elif self.__lastConfigurationPageName: 5932 elif self.__lastConfigurationPageName:
5878 self.__configurationDialog.showConfigurationPageByName( 5933 self.__configurationDialog.showConfigurationPageByName(
5879 self.__lastConfigurationPageName) 5934 self.__lastConfigurationPageName)
5880 else: 5935 else:
5881 self.__configurationDialog.showConfigurationPageByName("empty") 5936 self.__configurationDialog.showConfigurationPageByName("empty")
5882 self.__configurationDialog.exec_() 5937 self.__configurationDialog.exec()
5883 QApplication.processEvents() 5938 QApplication.processEvents()
5884 if self.__configurationDialog.result() == QDialog.Accepted: 5939 if self.__configurationDialog.result() == QDialog.Accepted:
5885 self.__configurationDialog.setPreferences() 5940 self.__configurationDialog.setPreferences()
5886 Preferences.syncPreferences() 5941 Preferences.syncPreferences()
5887 self.__preferencesChanged() 5942 self.__preferencesChanged()
6018 Private slot to configure the various view profiles. 6073 Private slot to configure the various view profiles.
6019 """ 6074 """
6020 from Preferences.ViewProfileDialog import ViewProfileDialog 6075 from Preferences.ViewProfileDialog import ViewProfileDialog
6021 dlg = ViewProfileDialog(self.__layoutType, self.profiles['edit'][1], 6076 dlg = ViewProfileDialog(self.__layoutType, self.profiles['edit'][1],
6022 self.profiles['debug'][1]) 6077 self.profiles['debug'][1])
6023 if dlg.exec_() == QDialog.Accepted: 6078 if dlg.exec() == QDialog.Accepted:
6024 edit, debug = dlg.getVisibilities() 6079 edit, debug = dlg.getVisibilities()
6025 self.profiles['edit'][1] = edit 6080 self.profiles['edit'][1] = edit
6026 self.profiles['debug'][1] = debug 6081 self.profiles['debug'][1] = debug
6027 Preferences.setUI("ViewProfiles2", self.profiles) 6082 Preferences.setUI("ViewProfiles2", self.profiles)
6028 if self.currentProfile == "edit": 6083 if self.currentProfile == "edit":
6034 """ 6089 """
6035 Private slot to configure the various toolbars. 6090 Private slot to configure the various toolbars.
6036 """ 6091 """
6037 from E5Gui.E5ToolBarDialog import E5ToolBarDialog 6092 from E5Gui.E5ToolBarDialog import E5ToolBarDialog
6038 dlg = E5ToolBarDialog(self.toolbarManager) 6093 dlg = E5ToolBarDialog(self.toolbarManager)
6039 if dlg.exec_() == QDialog.Accepted: 6094 if dlg.exec() == QDialog.Accepted:
6040 Preferences.setUI( 6095 Preferences.setUI(
6041 "ToolbarManagerState", self.toolbarManager.saveState()) 6096 "ToolbarManagerState", self.toolbarManager.saveState())
6042 6097
6043 def __configShortcuts(self): 6098 def __configShortcuts(self):
6044 """ 6099 """
6093 Private slot to show the certificates management dialog. 6148 Private slot to show the certificates management dialog.
6094 """ 6149 """
6095 from E5Network.E5SslCertificatesDialog import E5SslCertificatesDialog 6150 from E5Network.E5SslCertificatesDialog import E5SslCertificatesDialog
6096 6151
6097 dlg = E5SslCertificatesDialog(self) 6152 dlg = E5SslCertificatesDialog(self)
6098 dlg.exec_() 6153 dlg.exec()
6099 6154
6100 def __clearPrivateData(self): 6155 def __clearPrivateData(self):
6101 """ 6156 """
6102 Private slot to clear the private data lists. 6157 Private slot to clear the private data lists.
6103 """ 6158 """
6104 from .ClearPrivateDataDialog import ClearPrivateDataDialog 6159 from .ClearPrivateDataDialog import ClearPrivateDataDialog
6105 dlg = ClearPrivateDataDialog(self) 6160 dlg = ClearPrivateDataDialog(self)
6106 if dlg.exec_() == QDialog.Accepted: 6161 if dlg.exec() == QDialog.Accepted:
6107 # recent files, recent projects, recent multi projects, 6162 # recent files, recent projects, recent multi projects,
6108 # debug histories, shell histories 6163 # debug histories, shell histories
6109 (files, projects, multiProjects, debug, shell, vcs, plugins) = ( 6164 (files, projects, multiProjects, debug, shell, vcs, plugins) = (
6110 dlg.getData() 6165 dlg.getData()
6111 ) 6166 )
6558 from PluginManager.PluginInstallDialog import PluginInstallDialog 6613 from PluginManager.PluginInstallDialog import PluginInstallDialog
6559 dlg = PluginInstallDialog( 6614 dlg = PluginInstallDialog(
6560 self.pluginManager, 6615 self.pluginManager,
6561 [] if pluginFileNames is None else pluginFileNames[:], 6616 [] if pluginFileNames is None else pluginFileNames[:],
6562 self) 6617 self)
6563 dlg.exec_() 6618 dlg.exec()
6564 if dlg.restartNeeded(): 6619 if dlg.restartNeeded():
6565 self.__restart(ask=True) 6620 self.__restart(ask=True)
6566 6621
6567 def __deinstallPlugin(self): 6622 def __deinstallPlugin(self):
6568 """ 6623 """
6569 Private slot to show a dialog to uninstall a plugin. 6624 Private slot to show a dialog to uninstall a plugin.
6570 """ 6625 """
6571 from PluginManager.PluginUninstallDialog import PluginUninstallDialog 6626 from PluginManager.PluginUninstallDialog import PluginUninstallDialog
6572 dlg = PluginUninstallDialog(self.pluginManager, self) 6627 dlg = PluginUninstallDialog(self.pluginManager, self)
6573 dlg.exec_() 6628 dlg.exec()
6574 6629
6575 def showPluginsAvailable(self): 6630 def showPluginsAvailable(self):
6576 """ 6631 """
6577 Public slot to show the plugins available for download. 6632 Public slot to show the plugins available for download.
6578 """ 6633 """
6579 from PluginManager.PluginRepositoryDialog import PluginRepositoryDialog 6634 from PluginManager.PluginRepositoryDialog import PluginRepositoryDialog
6580 dlg = PluginRepositoryDialog(self.pluginManager, self) 6635 dlg = PluginRepositoryDialog(self.pluginManager, self)
6581 res = dlg.exec_() 6636 res = dlg.exec()
6582 if res == (QDialog.Accepted + 1): 6637 if res == (QDialog.Accepted + 1):
6583 self.__installPlugins(dlg.getDownloadedPlugins()) 6638 self.__installPlugins(dlg.getDownloadedPlugins())
6584 6639
6585 def __pluginsConfigure(self): 6640 def __pluginsConfigure(self):
6586 """ 6641 """

eric ide

mercurial