UI/UserInterface.py

changeset 6581
8eb6220f2bb7
parent 6576
ea60ea85067a
child 6583
40ace3a73139
equal deleted inserted replaced
6580:082d58e2415e 6581:8eb6220f2bb7
164 164
165 ErrorLogFileName = "eric6_error.log" 165 ErrorLogFileName = "eric6_error.log"
166 166
167 def __init__(self, app, locale, splash, plugin, disabledPlugins, 167 def __init__(self, app, locale, splash, plugin, disabledPlugins,
168 noOpenAtStartup, noCrashOpenAtStartup, disableCrashSession, 168 noOpenAtStartup, noCrashOpenAtStartup, disableCrashSession,
169 restartArguments): 169 restartArguments, originalPathString):
170 """ 170 """
171 Constructor 171 Constructor
172 172
173 @param app reference to the application object 173 @param app reference to the application object
174 @type E5Application 174 @type E5Application
192 support 192 support
193 @type bool 193 @type bool
194 @param restartArguments list of command line parameters to be used for 194 @param restartArguments list of command line parameters to be used for
195 a restart 195 a restart
196 @type list of str 196 @type list of str
197 @param originalPathString original PATH environment variable
198 @type str
197 """ 199 """
198 super(UserInterface, self).__init__() 200 super(UserInterface, self).__init__()
199 201
200 self.__restartArgs = restartArguments[:] 202 self.__restartArgs = restartArguments[:]
201 203
207 self.__noOpenAtStartup = noOpenAtStartup 209 self.__noOpenAtStartup = noOpenAtStartup
208 self.__noCrashOpenAtStartup = noCrashOpenAtStartup 210 self.__noCrashOpenAtStartup = noCrashOpenAtStartup
209 self.__disableCrashSession = disableCrashSession 211 self.__disableCrashSession = disableCrashSession
210 self.__disabledPlugins = disabledPlugins[:] 212 self.__disabledPlugins = disabledPlugins[:]
211 213
214 self.__originalPathString = originalPathString
215
212 self.__layoutType = Preferences.getUI("LayoutType") 216 self.__layoutType = Preferences.getUI("LayoutType")
213 217
214 self.passiveMode = Preferences.getDebugger("PassiveDbgEnabled") 218 self.passiveMode = Preferences.getDebugger("PassiveDbgEnabled")
215 219
216 g = Preferences.getGeometry("MainGeometry") 220 g = Preferences.getGeometry("MainGeometry")
246 # register it early because it is needed very soon 250 # register it early because it is needed very soon
247 e5App().registerObject("VirtualEnvManager", self.virtualenvManager) 251 e5App().registerObject("VirtualEnvManager", self.virtualenvManager)
248 252
249 # Generate the debug server object 253 # Generate the debug server object
250 from Debugger.DebugServer import DebugServer 254 from Debugger.DebugServer import DebugServer
251 debugServer = DebugServer() 255 debugServer = DebugServer(self.__originalPathString)
252 256
253 # Create the background service object 257 # Create the background service object
254 from Utilities.BackgroundService import BackgroundService 258 from Utilities.BackgroundService import BackgroundService
255 self.backgroundService = BackgroundService() 259 self.backgroundService = BackgroundService()
256 260
696 if self.templateViewer is not None: 700 if self.templateViewer is not None:
697 # now read the saved templates 701 # now read the saved templates
698 splash.showMessage(self.tr("Reading Templates...")) 702 splash.showMessage(self.tr("Reading Templates..."))
699 self.templateViewer.readTemplates() 703 self.templateViewer.readTemplates()
700 704
701 # now start the debug client 705 # now start the debug client with the most recently used virtual
706 # environment
702 splash.showMessage(self.tr("Starting Debugger...")) 707 splash.showMessage(self.tr("Starting Debugger..."))
703 debugServer.startClient(False) 708 if Preferences.getShell("StartWithMostRecentlyUsedEnvironment"):
709 debugServer.startClient(
710 False, venvName=Preferences.getShell("LastVirtualEnvironment")
711 )
712 else:
713 debugServer.startClient(False)
704 714
705 # attributes for the network objects 715 # attributes for the network objects
706 self.__networkManager = QNetworkAccessManager(self) 716 self.__networkManager = QNetworkAccessManager(self)
707 self.__networkManager.proxyAuthenticationRequired.connect( 717 self.__networkManager.proxyAuthenticationRequired.connect(
708 proxyAuthenticationRequired) 718 proxyAuthenticationRequired)

eric ide

mercurial