161 RightSide = 3 |
161 RightSide = 3 |
162 |
162 |
163 ErrorLogFileName = "eric6_error.log" |
163 ErrorLogFileName = "eric6_error.log" |
164 |
164 |
165 def __init__(self, app, locale, splash, plugin, noOpenAtStartup, |
165 def __init__(self, app, locale, splash, plugin, noOpenAtStartup, |
166 restartArguments): |
166 noCrashOpenAtStartup, restartArguments): |
167 """ |
167 """ |
168 Constructor |
168 Constructor |
169 |
169 |
170 @param app reference to the application object (E5Application) |
170 @param app reference to the application object (E5Application) |
171 @param locale locale to be used by the UI (string) |
171 @param locale locale to be used by the UI (string) |
173 (UI.SplashScreen.SplashScreen) |
173 (UI.SplashScreen.SplashScreen) |
174 @param plugin filename of a plugin to be loaded (used for plugin |
174 @param plugin filename of a plugin to be loaded (used for plugin |
175 development) |
175 development) |
176 @param noOpenAtStartup flag indicating that the open at startup option |
176 @param noOpenAtStartup flag indicating that the open at startup option |
177 should not be executed (boolean) |
177 should not be executed (boolean) |
|
178 @param noCrashOpenAtStartup flag indicating to ignore any crash session |
|
179 file found at statup (boolean) |
178 @param restartArguments list of command line parameters to be used for |
180 @param restartArguments list of command line parameters to be used for |
179 a restart (list of strings) |
181 a restart (list of strings) |
180 """ |
182 """ |
181 super(UserInterface, self).__init__() |
183 super(UserInterface, self).__init__() |
182 |
184 |
186 Preferences.getUI("StyleSheet")) |
188 Preferences.getUI("StyleSheet")) |
187 |
189 |
188 self.maxEditorPathLen = Preferences.getUI("CaptionFilenameLength") |
190 self.maxEditorPathLen = Preferences.getUI("CaptionFilenameLength") |
189 self.locale = locale |
191 self.locale = locale |
190 self.__noOpenAtStartup = noOpenAtStartup |
192 self.__noOpenAtStartup = noOpenAtStartup |
|
193 self.__noCrashOpenAtStartup = noCrashOpenAtStartup |
191 |
194 |
192 self.layoutType, self.embeddedShell, self.embeddedFileBrowser = \ |
195 self.layoutType, self.embeddedShell, self.embeddedFileBrowser = \ |
193 Preferences.getUILayout() |
196 Preferences.getUILayout() |
194 |
197 |
195 self.passiveMode = Preferences.getDebugger("PassiveDbgEnabled") |
198 self.passiveMode = Preferences.getDebugger("PassiveDbgEnabled") |
5973 |
5976 |
5974 @return flag indicating a crash session file was found and read |
5977 @return flag indicating a crash session file was found and read |
5975 @rtype bool |
5978 @rtype bool |
5976 """ |
5979 """ |
5977 res = False |
5980 res = False |
5978 fn = os.path.join(Utilities.getConfigDir(), |
5981 if not self.__noCrashOpenAtStartup and \ |
5979 "eric6_crash_session.e5s") |
5982 Preferences.getUI("OpenCrashSessionOnStartup"): |
5980 if os.path.exists(fn): |
5983 fn = os.path.join(Utilities.getConfigDir(), |
5981 yes = E5MessageBox.yesNo( |
5984 "eric6_crash_session.e5s") |
5982 self, |
5985 if os.path.exists(fn): |
5983 self.tr("Crash Session found!"), |
5986 yes = E5MessageBox.yesNo( |
5984 self.tr("""A session file of a crashed session was found.""" |
5987 self, |
5985 """ Shall this session be restored?""")) |
5988 self.tr("Crash Session found!"), |
5986 if yes: |
5989 self.tr("""A session file of a crashed session was""" |
5987 res = self.__readSession(filename=fn) |
5990 """ found. Shall this session be restored?""")) |
|
5991 if yes: |
|
5992 res = self.__readSession(filename=fn) |
5988 |
5993 |
5989 return res |
5994 return res |
5990 |
5995 |
5991 def showFindFileByNameDialog(self): |
5996 def showFindFileByNameDialog(self): |
5992 """ |
5997 """ |