77 sys.path.insert(2, os.path.join(os.path.dirname(__file__), |
77 sys.path.insert(2, os.path.join(os.path.dirname(__file__), |
78 "ThirdParty", "Jasy")) |
78 "ThirdParty", "Jasy")) |
79 sys.path.insert(2, os.path.join(os.path.dirname(__file__), |
79 sys.path.insert(2, os.path.join(os.path.dirname(__file__), |
80 "DebugClients", "Python")) |
80 "DebugClients", "Python")) |
81 |
81 |
82 from E5Gui.E5Application import E5Application |
82 from E5Gui.EricApplication import EricApplication |
83 |
83 |
84 |
84 |
85 def handleSingleApplication(ddindex): |
85 def handleSingleApplication(ddindex): |
86 """ |
86 """ |
87 Global function to handle the single application mode. |
87 Global function to handle the single application mode. |
88 |
88 |
89 @param ddindex index of a '--' option in the options list |
89 @param ddindex index of a '--' option in the options list |
90 """ |
90 """ |
91 from E5Gui.E5SingleApplication import E5SingleApplicationClient |
91 from E5Gui.EricSingleApplication import EricSingleApplicationClient |
92 |
92 |
93 client = E5SingleApplicationClient() |
93 client = EricSingleApplicationClient() |
94 res = client.connect() |
94 res = client.connect() |
95 if res > 0: |
95 if res > 0: |
96 if ( |
96 if ( |
97 "--no-splash" in sys.argv and |
97 "--no-splash" in sys.argv and |
98 sys.argv.index("--no-splash") < ddindex |
98 sys.argv.index("--no-splash") < ddindex |
292 |
292 |
293 from Toolbox import Startup |
293 from Toolbox import Startup |
294 # set the library paths for plugins |
294 # set the library paths for plugins |
295 Startup.setLibraryPaths() |
295 Startup.setLibraryPaths() |
296 |
296 |
297 app = E5Application(sys.argv) |
297 app = EricApplication(sys.argv) |
298 ddindex = Startup.handleArgs(sys.argv, appinfo) |
298 ddindex = Startup.handleArgs(sys.argv, appinfo) |
299 |
299 |
300 logging.debug("Importing Preferences") |
300 logging.debug("Importing Preferences") |
301 import Preferences |
301 import Preferences |
302 |
302 |
384 # Initialize SSL stuff |
384 # Initialize SSL stuff |
385 from EricNetwork.EricSslUtilities import initSSL |
385 from EricNetwork.EricSslUtilities import initSSL |
386 initSSL() |
386 initSSL() |
387 |
387 |
388 splash.showMessage(QCoreApplication.translate("eric7", "Starting...")) |
388 splash.showMessage(QCoreApplication.translate("eric7", "Starting...")) |
389 # We can only import these after creating the E5Application because they |
389 # We can only import these after creating the EricApplication because they |
390 # make Qt calls that need the E5Application to exist. |
390 # make Qt calls that need the EricApplication to exist. |
391 from UI.UserInterface import UserInterface |
391 from UI.UserInterface import UserInterface |
392 |
392 |
393 splash.showMessage( |
393 splash.showMessage( |
394 QCoreApplication.translate("eric7", "Generating Main Window...")) |
394 QCoreApplication.translate("eric7", "Generating Main Window...")) |
395 mainWindow = UserInterface(app, loc, splash, pluginFile, disabledPlugins, |
395 mainWindow = UserInterface(app, loc, splash, pluginFile, disabledPlugins, |
399 mainWindow.show() |
399 mainWindow.show() |
400 |
400 |
401 QTimer.singleShot(0, uiStartUp) |
401 QTimer.singleShot(0, uiStartUp) |
402 |
402 |
403 # generate a graphical error handler |
403 # generate a graphical error handler |
404 from E5Gui import E5ErrorMessage |
404 from E5Gui import EricErrorMessage |
405 eMsg = E5ErrorMessage.qtHandler() |
405 eMsg = EricErrorMessage.qtHandler() |
406 eMsg.setMinimumSize(600, 400) |
406 eMsg.setMinimumSize(600, 400) |
407 |
407 |
408 # start the event loop |
408 # start the event loop |
409 inMainLoop = True |
409 inMainLoop = True |
410 res = app.exec() |
410 res = app.exec() |