| ... |
... |
@@ -66,7 +66,6 @@ class GajimApplication(Gtk.Application): |
|
66
|
66
|
|
|
67
|
67
|
def __init__(self):
|
|
68
|
68
|
flags = (Gio.ApplicationFlags.HANDLES_COMMAND_LINE |
|
|
69
|
|
- Gio.ApplicationFlags.HANDLES_OPEN |
|
|
70
|
69
|
Gio.ApplicationFlags.CAN_OVERRIDE_APP_ID)
|
|
71
|
70
|
Gtk.Application.__init__(self,
|
|
72
|
71
|
application_id='org.gajim.Gajim',
|
| ... |
... |
@@ -158,7 +157,7 @@ class GajimApplication(Gtk.Application): |
|
158
|
157
|
self.add_main_option_entries(self._get_remaining_entry())
|
|
159
|
158
|
|
|
160
|
159
|
self.connect('handle-local-options', self._handle_local_options)
|
|
161
|
|
- self.connect('command-line', self._handle_remote_options)
|
|
|
160
|
+ self.connect('command-line', self._command_line)
|
|
162
|
161
|
self.connect('startup', self._startup)
|
|
163
|
162
|
self.connect('activate', self._activate)
|
|
164
|
163
|
|
| ... |
... |
@@ -180,7 +179,6 @@ class GajimApplication(Gtk.Application): |
|
180
|
179
|
return [option]
|
|
181
|
180
|
|
|
182
|
181
|
def _startup(self, _application):
|
|
183
|
|
-
|
|
184
|
182
|
# Create and initialize Application Paths & Databases
|
|
185
|
183
|
app.print_version()
|
|
186
|
184
|
app.detect_dependencies()
|
| ... |
... |
@@ -226,11 +224,6 @@ class GajimApplication(Gtk.Application): |
|
226
|
224
|
menubar = builder.get_object("menubar")
|
|
227
|
225
|
self.set_menubar(menubar)
|
|
228
|
226
|
|
|
229
|
|
- def _activate(self, _application):
|
|
230
|
|
- if self.interface is not None:
|
|
231
|
|
- self.interface.roster.window.present()
|
|
232
|
|
- return
|
|
233
|
|
-
|
|
234
|
227
|
from gajim.gui_interface import Interface
|
|
235
|
228
|
self.interface = Interface()
|
|
236
|
229
|
self.interface.run(self)
|
| ... |
... |
@@ -244,6 +237,9 @@ class GajimApplication(Gtk.Application): |
|
244
|
237
|
ged.CORE,
|
|
245
|
238
|
self._on_feature_discovered)
|
|
246
|
239
|
|
|
|
240
|
+ def _activate(self, _application):
|
|
|
241
|
+ self.interface.roster.window.present()
|
|
|
242
|
+
|
|
247
|
243
|
def _open_uris(self, uris):
|
|
248
|
244
|
accounts = list(app.connections.keys())
|
|
249
|
245
|
if not accounts:
|
| ... |
... |
@@ -310,8 +306,7 @@ class GajimApplication(Gtk.Application): |
|
310
|
306
|
app.storage.cache.shutdown()
|
|
311
|
307
|
app.storage.archive.shutdown()
|
|
312
|
308
|
|
|
313
|
|
- def _handle_remote_options(self, _application, command_line):
|
|
314
|
|
- # Parse all options that should be executed on a remote instance
|
|
|
309
|
+ def _command_line(self, _application, command_line):
|
|
315
|
310
|
options = command_line.get_options_dict()
|
|
316
|
311
|
|
|
317
|
312
|
remote_commands = [
|