eric6/UI/UserInterface.py

changeset 7759
51aa6c6b66f7
parent 7729
f2f7b7b24879
child 7781
607a6098cb44
equal deleted inserted replaced
7758:dd54d33d21d2 7759:51aa6c6b66f7
3720 logFile = os.path.join(Utilities.getConfigDir(), 3720 logFile = os.path.join(Utilities.getConfigDir(),
3721 self.ErrorLogFileName) 3721 self.ErrorLogFileName)
3722 if os.path.exists(logFile): 3722 if os.path.exists(logFile):
3723 from .ErrorLogDialog import ErrorLogDialog 3723 from .ErrorLogDialog import ErrorLogDialog
3724 dlg = ErrorLogDialog(logFile, False, self) 3724 dlg = ErrorLogDialog(logFile, False, self)
3725 dlg.exec_() 3725 dlg.exec()
3726 3726
3727 def __hasErrorLog(self): 3727 def __hasErrorLog(self):
3728 """ 3728 """
3729 Private method to check, if an error log file exists. 3729 Private method to check, if an error log file exists.
3730 3730
4755 Private slot to handle the tools configuration menu entry. 4755 Private slot to handle the tools configuration menu entry.
4756 """ 4756 """
4757 from Preferences.ToolConfigurationDialog import ToolConfigurationDialog 4757 from Preferences.ToolConfigurationDialog import ToolConfigurationDialog
4758 dlg = ToolConfigurationDialog( 4758 dlg = ToolConfigurationDialog(
4759 self.toolGroups[self.currentToolGroup][1], self) 4759 self.toolGroups[self.currentToolGroup][1], self)
4760 if dlg.exec_() == QDialog.Accepted: 4760 if dlg.exec() == QDialog.Accepted:
4761 self.toolGroups[self.currentToolGroup][1] = dlg.getToollist() 4761 self.toolGroups[self.currentToolGroup][1] = dlg.getToollist()
4762 self.__updateExternalToolsActions() 4762 self.__updateExternalToolsActions()
4763 4763
4764 def __toolGroupsConfiguration(self): 4764 def __toolGroupsConfiguration(self):
4765 """ 4765 """
4768 from Preferences.ToolGroupConfigurationDialog import ( 4768 from Preferences.ToolGroupConfigurationDialog import (
4769 ToolGroupConfigurationDialog 4769 ToolGroupConfigurationDialog
4770 ) 4770 )
4771 dlg = ToolGroupConfigurationDialog( 4771 dlg = ToolGroupConfigurationDialog(
4772 self.toolGroups, self.currentToolGroup, self) 4772 self.toolGroups, self.currentToolGroup, self)
4773 if dlg.exec_() == QDialog.Accepted: 4773 if dlg.exec() == QDialog.Accepted:
4774 self.toolGroups, self.currentToolGroup = dlg.getToolGroups() 4774 self.toolGroups, self.currentToolGroup = dlg.getToolGroups()
4775 4775
4776 def __createUnitTestDialog(self): 4776 def __createUnitTestDialog(self):
4777 """ 4777 """
4778 Private slot to generate the unit test dialog on demand. 4778 Private slot to generate the unit test dialog on demand.
5946 elif self.__lastConfigurationPageName: 5946 elif self.__lastConfigurationPageName:
5947 self.__configurationDialog.showConfigurationPageByName( 5947 self.__configurationDialog.showConfigurationPageByName(
5948 self.__lastConfigurationPageName) 5948 self.__lastConfigurationPageName)
5949 else: 5949 else:
5950 self.__configurationDialog.showConfigurationPageByName("empty") 5950 self.__configurationDialog.showConfigurationPageByName("empty")
5951 self.__configurationDialog.exec_() 5951 self.__configurationDialog.exec()
5952 QApplication.processEvents() 5952 QApplication.processEvents()
5953 if self.__configurationDialog.result() == QDialog.Accepted: 5953 if self.__configurationDialog.result() == QDialog.Accepted:
5954 self.__configurationDialog.setPreferences() 5954 self.__configurationDialog.setPreferences()
5955 Preferences.syncPreferences() 5955 Preferences.syncPreferences()
5956 self.__preferencesChanged() 5956 self.__preferencesChanged()
6087 Private slot to configure the various view profiles. 6087 Private slot to configure the various view profiles.
6088 """ 6088 """
6089 from Preferences.ViewProfileDialog import ViewProfileDialog 6089 from Preferences.ViewProfileDialog import ViewProfileDialog
6090 dlg = ViewProfileDialog(self.__layoutType, self.profiles['edit'][1], 6090 dlg = ViewProfileDialog(self.__layoutType, self.profiles['edit'][1],
6091 self.profiles['debug'][1]) 6091 self.profiles['debug'][1])
6092 if dlg.exec_() == QDialog.Accepted: 6092 if dlg.exec() == QDialog.Accepted:
6093 edit, debug = dlg.getVisibilities() 6093 edit, debug = dlg.getVisibilities()
6094 self.profiles['edit'][1] = edit 6094 self.profiles['edit'][1] = edit
6095 self.profiles['debug'][1] = debug 6095 self.profiles['debug'][1] = debug
6096 Preferences.setUI("ViewProfiles2", self.profiles) 6096 Preferences.setUI("ViewProfiles2", self.profiles)
6097 if self.currentProfile == "edit": 6097 if self.currentProfile == "edit":
6103 """ 6103 """
6104 Private slot to configure the various toolbars. 6104 Private slot to configure the various toolbars.
6105 """ 6105 """
6106 from E5Gui.E5ToolBarDialog import E5ToolBarDialog 6106 from E5Gui.E5ToolBarDialog import E5ToolBarDialog
6107 dlg = E5ToolBarDialog(self.toolbarManager) 6107 dlg = E5ToolBarDialog(self.toolbarManager)
6108 if dlg.exec_() == QDialog.Accepted: 6108 if dlg.exec() == QDialog.Accepted:
6109 Preferences.setUI( 6109 Preferences.setUI(
6110 "ToolbarManagerState", self.toolbarManager.saveState()) 6110 "ToolbarManagerState", self.toolbarManager.saveState())
6111 6111
6112 def __configShortcuts(self): 6112 def __configShortcuts(self):
6113 """ 6113 """
6162 Private slot to show the certificates management dialog. 6162 Private slot to show the certificates management dialog.
6163 """ 6163 """
6164 from E5Network.E5SslCertificatesDialog import E5SslCertificatesDialog 6164 from E5Network.E5SslCertificatesDialog import E5SslCertificatesDialog
6165 6165
6166 dlg = E5SslCertificatesDialog(self) 6166 dlg = E5SslCertificatesDialog(self)
6167 dlg.exec_() 6167 dlg.exec()
6168 6168
6169 def __clearPrivateData(self): 6169 def __clearPrivateData(self):
6170 """ 6170 """
6171 Private slot to clear the private data lists. 6171 Private slot to clear the private data lists.
6172 """ 6172 """
6173 from .ClearPrivateDataDialog import ClearPrivateDataDialog 6173 from .ClearPrivateDataDialog import ClearPrivateDataDialog
6174 dlg = ClearPrivateDataDialog(self) 6174 dlg = ClearPrivateDataDialog(self)
6175 if dlg.exec_() == QDialog.Accepted: 6175 if dlg.exec() == QDialog.Accepted:
6176 # recent files, recent projects, recent multi projects, 6176 # recent files, recent projects, recent multi projects,
6177 # debug histories, shell histories 6177 # debug histories, shell histories
6178 (files, projects, multiProjects, debug, shell, vcs, plugins) = ( 6178 (files, projects, multiProjects, debug, shell, vcs, plugins) = (
6179 dlg.getData() 6179 dlg.getData()
6180 ) 6180 )
6627 from PluginManager.PluginInstallDialog import PluginInstallDialog 6627 from PluginManager.PluginInstallDialog import PluginInstallDialog
6628 dlg = PluginInstallDialog( 6628 dlg = PluginInstallDialog(
6629 self.pluginManager, 6629 self.pluginManager,
6630 [] if pluginFileNames is None else pluginFileNames[:], 6630 [] if pluginFileNames is None else pluginFileNames[:],
6631 self) 6631 self)
6632 dlg.exec_() 6632 dlg.exec()
6633 if dlg.restartNeeded(): 6633 if dlg.restartNeeded():
6634 self.__restart(ask=True) 6634 self.__restart(ask=True)
6635 6635
6636 def __deinstallPlugin(self): 6636 def __deinstallPlugin(self):
6637 """ 6637 """
6638 Private slot to show a dialog to uninstall a plugin. 6638 Private slot to show a dialog to uninstall a plugin.
6639 """ 6639 """
6640 from PluginManager.PluginUninstallDialog import PluginUninstallDialog 6640 from PluginManager.PluginUninstallDialog import PluginUninstallDialog
6641 dlg = PluginUninstallDialog(self.pluginManager, self) 6641 dlg = PluginUninstallDialog(self.pluginManager, self)
6642 dlg.exec_() 6642 dlg.exec()
6643 6643
6644 def showPluginsAvailable(self): 6644 def showPluginsAvailable(self):
6645 """ 6645 """
6646 Public slot to show the plugins available for download. 6646 Public slot to show the plugins available for download.
6647 """ 6647 """
6648 from PluginManager.PluginRepositoryDialog import PluginRepositoryDialog 6648 from PluginManager.PluginRepositoryDialog import PluginRepositoryDialog
6649 dlg = PluginRepositoryDialog(self.pluginManager, self) 6649 dlg = PluginRepositoryDialog(self.pluginManager, self)
6650 res = dlg.exec_() 6650 res = dlg.exec()
6651 if res == (QDialog.Accepted + 1): 6651 if res == (QDialog.Accepted + 1):
6652 self.__installPlugins(dlg.getDownloadedPlugins()) 6652 self.__installPlugins(dlg.getDownloadedPlugins())
6653 6653
6654 def __pluginsConfigure(self): 6654 def __pluginsConfigure(self):
6655 """ 6655 """

eric ide

mercurial