Philipp Hörist pushed to branch master at gajim / gajim

Commits:
1e830475 by Philipp Hörist at 2018-02-06T20:41:24+01:00
Convert xmpp uris not to GFiles

We dont need to use the ::open handler to handle xmpp uris

- - - - -


1 changed file:

- gajim/gajim.py


Changes:

=====================================
gajim/gajim.py
=====================================
--- a/gajim/gajim.py
+++ b/gajim/gajim.py
@@ -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
         gui_menu_builder.build_accounts_menu()
 
-    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:'):
                 continue
@@ -297,22 +295,19 @@ class GajimApplication(Gtk.Application):
             self.activate_action('ipython')
             return 0
 
-        gfiles = self._parse_file_args(command_line)
-        if gfiles is not None:
-            self.open(gfiles, '')
+        uri = self._parse_uris(command_line)
+        if uri is not None:
+            self._open_uris(uri)
             return 0
 
         self.activate()
         return 0
 
     @staticmethod
-    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:]:
-                gfiles.append(command_line.create_file_for_arg(arg))
-            return gfiles
+            return args[1:]
 
     def _handle_local_options(self, application,
                               options: GLib.VariantDict) -> int:



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/commit/1e8304755fde705750bcac3b1101589b0a8afedb

---
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/commit/1e8304755fde705750bcac3b1101589b0a8afedb
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to