Remove advanced commandline handling

Its enough to connect to the handle-local-options signal for what we
currently want to do.
This commit is contained in:
Philipp Hörist 2017-10-31 16:43:52 +01:00
parent 0b21c12c41
commit 417464d9c5
1 changed files with 5 additions and 9 deletions

View File

@ -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