11 """ |
11 """ |
12 |
12 |
13 import sys |
13 import sys |
14 import os |
14 import os |
15 |
15 |
16 sys.path.insert(1, os.path.dirname(__file__)) |
|
17 |
|
18 for arg in sys.argv[:]: |
16 for arg in sys.argv[:]: |
19 if arg.startswith("--config="): |
17 if arg.startswith("--config="): |
20 import Globals |
18 from eric7 import Globals |
21 |
19 |
22 configDir = arg.replace("--config=", "") |
20 configDir = arg.replace("--config=", "") |
23 Globals.setConfigDir(configDir) |
21 Globals.setConfigDir(configDir) |
24 sys.argv.remove(arg) |
22 sys.argv.remove(arg) |
25 elif arg.startswith("--settings="): |
23 elif arg.startswith("--settings="): |
31 QSettings.setPath( |
29 QSettings.setPath( |
32 QSettings.Format.IniFormat, QSettings.Scope.UserScope, settingsDir |
30 QSettings.Format.IniFormat, QSettings.Scope.UserScope, settingsDir |
33 ) |
31 ) |
34 sys.argv.remove(arg) |
32 sys.argv.remove(arg) |
35 |
33 |
36 from Globals import AppInfo |
34 from eric7.Globals import AppInfo |
37 |
35 |
38 from Toolbox import Startup |
36 from eric7.Toolbox import Startup |
39 |
37 |
40 |
38 |
41 def createMainWidget(argv): |
39 def createMainWidget(argv): |
42 """ |
40 """ |
43 Function to create the main widget. |
41 Function to create the main widget. |
44 |
42 |
45 @param argv list of commandline parameters (list of strings) |
43 @param argv list of commandline parameters (list of strings) |
46 @return reference to the main widget (QWidget) |
44 @return reference to the main widget (QWidget) |
47 """ |
45 """ |
48 from Preferences.ConfigurationDialog import ConfigurationWindow |
46 from eric7.Preferences.ConfigurationDialog import ConfigurationWindow |
49 |
47 |
50 w = ConfigurationWindow() |
48 w = ConfigurationWindow() |
51 w.show() |
49 w.show() |
52 w.showConfigurationPageByName("empty") |
50 w.showConfigurationPageByName("empty") |
53 return w |
51 return w |