UI/UserInterface.py

changeset 6267
350655a6c85f
parent 6244
233eea858c32
child 6273
0daf79d65080
child 6287
9a193ff6d24a
equal deleted inserted replaced
6266:c7bc0e516cd6 6267:350655a6c85f
162 BottomSide = 2 162 BottomSide = 2
163 RightSide = 3 163 RightSide = 3
164 164
165 ErrorLogFileName = "eric6_error.log" 165 ErrorLogFileName = "eric6_error.log"
166 166
167 def __init__(self, app, locale, splash, plugin, noOpenAtStartup, 167 def __init__(self, app, locale, splash, plugin, disabledPlugins,
168 noCrashOpenAtStartup, disableCrashSession, restartArguments): 168 noOpenAtStartup, noCrashOpenAtStartup, disableCrashSession,
169 restartArguments):
169 """ 170 """
170 Constructor 171 Constructor
171 172
172 @param app reference to the application object (E5Application) 173 @param app reference to the application object
173 @param locale locale to be used by the UI (string) 174 @type E5Application
175 @param locale locale to be used by the UI
176 @type str
174 @param splash reference to the splashscreen 177 @param splash reference to the splashscreen
175 (UI.SplashScreen.SplashScreen) 178 @type UI.SplashScreen.SplashScreen
176 @param plugin filename of a plugin to be loaded (used for plugin 179 @param plugin filename of a plug-in to be loaded (used for plugin
177 development) 180 development)
181 @type str
182 @param disabledPlugins list of plug-ins that have been disabled via
183 the command line parameters '--disable-plugin='
184 @type list of str
178 @param noOpenAtStartup flag indicating that the open at startup option 185 @param noOpenAtStartup flag indicating that the open at startup option
179 should not be executed (boolean) 186 should not be executed
187 @type bool
180 @param noCrashOpenAtStartup flag indicating to ignore any crash session 188 @param noCrashOpenAtStartup flag indicating to ignore any crash session
181 file found at statup (boolean) 189 file found at statup
190 @type bool
182 @param disableCrashSession flag indicating to disable the crash session 191 @param disableCrashSession flag indicating to disable the crash session
183 support (boolean) 192 support
193 @type bool
184 @param restartArguments list of command line parameters to be used for 194 @param restartArguments list of command line parameters to be used for
185 a restart (list of strings) 195 a restart
196 @type list of str
186 """ 197 """
187 super(UserInterface, self).__init__() 198 super(UserInterface, self).__init__()
188 199
189 self.__restartArgs = restartArguments[:] 200 self.__restartArgs = restartArguments[:]
190 201
194 self.maxEditorPathLen = Preferences.getUI("CaptionFilenameLength") 205 self.maxEditorPathLen = Preferences.getUI("CaptionFilenameLength")
195 self.locale = locale 206 self.locale = locale
196 self.__noOpenAtStartup = noOpenAtStartup 207 self.__noOpenAtStartup = noOpenAtStartup
197 self.__noCrashOpenAtStartup = noCrashOpenAtStartup 208 self.__noCrashOpenAtStartup = noCrashOpenAtStartup
198 self.__disableCrashSession = disableCrashSession 209 self.__disableCrashSession = disableCrashSession
210 self.__disabledPlugins = disabledPlugins[:]
199 211
200 self.layoutType, self.embeddedShell, self.embeddedFileBrowser = \ 212 self.layoutType, self.embeddedShell, self.embeddedFileBrowser = \
201 Preferences.getUILayout() 213 Preferences.getUILayout()
202 214
203 self.passiveMode = Preferences.getDebugger("PassiveDbgEnabled") 215 self.passiveMode = Preferences.getDebugger("PassiveDbgEnabled")
243 255
244 splash.showMessage(self.tr("Initializing Plugin Manager...")) 256 splash.showMessage(self.tr("Initializing Plugin Manager..."))
245 257
246 # Initialize the Plugin Manager (Plugins are initialized later 258 # Initialize the Plugin Manager (Plugins are initialized later
247 from PluginManager.PluginManager import PluginManager 259 from PluginManager.PluginManager import PluginManager
248 self.pluginManager = PluginManager(self, develPlugin=plugin) 260 self.pluginManager = PluginManager(self, self.__disabledPlugins,
261 develPlugin=plugin)
249 262
250 splash.showMessage(self.tr("Generating Main User Interface...")) 263 splash.showMessage(self.tr("Generating Main User Interface..."))
251 264
252 # Create the main window now so that we can connect QActions to it. 265 # Create the main window now so that we can connect QActions to it.
253 logging.debug("Creating Layout...") 266 logging.debug("Creating Layout...")

eric ide

mercurial