Commit 1e830475 authored by Philipp Hörist's avatar Philipp Hörist

Convert xmpp uris not to GFiles

We dont need to use the ::open handler to handle xmpp uris
parent 1f3a3211
......@@ -102,7 +102,6 @@ class GajimApplication(Gtk.Application):
self.connect('command-line', self._handle_remote_options)
self.connect('startup', self._startup)
self.connect('activate', self._activate)
self.connect('open', self._open)
self.profile = ''
self.config_path = None
......@@ -250,10 +249,9 @@ class GajimApplication(Gtk.Application):
from gajim import gui_menu_builder
def _open(self, application, file, hint, *args):
def _open_uris(self, uris):
from gajim.common import app
for arg in file:
uri = arg.get_uri()
for uri in uris:
app.log('uri_handler').info('open %s', uri)
if not uri.startswith('xmpp:'):
......@@ -297,22 +295,19 @@ class GajimApplication(Gtk.Application):
return 0
gfiles = self._parse_file_args(command_line)
if gfiles is not None:, '')
uri = self._parse_uris(command_line)
if uri is not None:
return 0
return 0
def _parse_file_args(command_line):
def _parse_uris(command_line):
args = command_line.get_arguments()
if len(args) > 1:
gfiles = []
for arg in args[1:]:
return gfiles
return args[1:]
def _handle_local_options(self, application,
options: GLib.VariantDict) -> int:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment