109 |
109 |
110 searchWord = None |
110 searchWord = None |
111 private = False |
111 private = False |
112 qthelp = False |
112 qthelp = False |
113 single = False |
113 single = False |
|
114 name = "" |
114 |
115 |
115 for arg in reversed(argv): |
116 for arg in reversed(argv): |
116 if arg.startswith("--search="): |
117 if arg.startswith("--search="): |
117 searchWord = argv[1].split("=", 1)[1] |
118 searchWord = argv[1].split("=", 1)[1] |
|
119 argv.remove(arg) |
|
120 elif arg.startswith("--name="): |
|
121 name = arg.replace("--name=", "") |
|
122 argv.remove(arg) |
|
123 elif arg.startswith("--newtab="): |
|
124 # only used for single application client |
118 argv.remove(arg) |
125 argv.remove(arg) |
119 elif arg == "--private": |
126 elif arg == "--private": |
120 private = True |
127 private = True |
121 argv.remove(arg) |
128 argv.remove(arg) |
122 elif arg == "--qthelp": |
129 elif arg == "--qthelp": |
134 home = "" |
141 home = "" |
135 |
142 |
136 browser = WebBrowserWindow(home, '.', None, 'web_browser', |
143 browser = WebBrowserWindow(home, '.', None, 'web_browser', |
137 searchWord=searchWord, private=private, |
144 searchWord=searchWord, private=private, |
138 settingsDir=SettingsDir, qthelp=qthelp, |
145 settingsDir=SettingsDir, qthelp=qthelp, |
139 single=single) |
146 single=single, saname=name) |
140 return browser |
147 return browser |
141 |
148 |
142 |
149 |
143 def main(): |
150 def main(): |
144 """ |
151 """ |
161 options) |
168 options) |
162 |
169 |
163 if not Globals.checkBlacklistedVersions(): |
170 if not Globals.checkBlacklistedVersions(): |
164 sys.exit(100) |
171 sys.exit(100) |
165 |
172 |
166 |
|
167 # set the library paths for plugins |
173 # set the library paths for plugins |
168 Startup.setLibraryPaths() |
174 Startup.setLibraryPaths() |
169 |
175 |
170 app = E5Application(sys.argv) |
176 app = E5Application(sys.argv) |
171 if not "--private" in sys.argv: |
177 if "--private" not in sys.argv: |
172 client = WebBrowserSingleApplicationClient() |
178 client = WebBrowserSingleApplicationClient() |
173 res = client.connect() |
179 res = client.connect() |
174 if res > 0: |
180 if res > 0: |
175 if len(sys.argv) > 1: |
181 if len(sys.argv) > 1: |
176 client.processArgs(sys.argv[1:]) |
182 client.processArgs(sys.argv[1:]) |
177 sys.exit(0) |
183 sys.exit(0) |
178 elif res < 0: |
184 elif res < 0: |
179 print("eric6_trpreviewer: {0}".format(client.errstr())) |
185 print("eric6_browser: {0}".format(client.errstr())) |
|
186 # __IGNORE_WARNING_M801__ |
180 sys.exit(res) |
187 sys.exit(res) |
181 |
188 |
182 res = Startup.simpleAppStartup(sys.argv, |
189 res = Startup.simpleAppStartup(sys.argv, |
183 appinfo, |
190 appinfo, |
184 createMainWidget, |
191 createMainWidget, |