From 417464d9c56d43e5ad2f01b5ef2267d442572338 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Tue, 31 Oct 2017 16:43:52 +0100 Subject: [PATCH] Remove advanced commandline handling Its enough to connect to the handle-local-options signal for what we currently want to do. --- gajim/gajim.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/gajim/gajim.py b/gajim/gajim.py index 2263ac531..53182222b 100644 --- a/gajim/gajim.py +++ b/gajim/gajim.py @@ -60,8 +60,7 @@ class GajimApplication(Gtk.Application): '''Main class handling activation and command line.''' def __init__(self): - Gtk.Application.__init__(self, application_id='org.gajim.Gajim', - flags=Gio.ApplicationFlags.HANDLES_COMMAND_LINE) + Gtk.Application.__init__(self, application_id='org.gajim.Gajim') self.add_main_option('version', ord('V'), GLib.OptionFlags.NONE, GLib.OptionArg.NONE, @@ -94,6 +93,8 @@ class GajimApplication(Gtk.Application): GLib.OptionArg.STRING_ARRAY, "") + self.connect('handle-local-options', self._handle_local_options) + self.profile = '' self.config_path = None self.profile_separation = False @@ -243,7 +244,8 @@ class GajimApplication(Gtk.Application): from gajim.common import app app.logger.commit() - def do_handle_local_options(self, options: GLib.VariantDict) -> int: + def _handle_local_options(self, application, + options: GLib.VariantDict) -> int: logging_helpers.init() @@ -277,12 +279,6 @@ class GajimApplication(Gtk.Application): return 0 return -1 - def do_command_line(self, command_line: Gio.ApplicationCommandLine) -> int: - Gtk.Application.do_command_line(self, command_line) - if not command_line.get_is_remote(): - self.activate() - return 0 - def show_warnings(self): import traceback import warnings