From ba55600c4370908a49166591d467dc7acfc5b147 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sun, 29 Mar 2015 14:38:10 +0200 Subject: [PATCH] improve pasting xmpp uri in join groupchat dialogs. Fixes #7905 --- src/dialogs.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/dialogs.py b/src/dialogs.py index c387e2d6e..fa6897f49 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -2533,11 +2533,16 @@ class JoinGroupchatWindow: if not self._empty_required_widgets and self.account: self.xml.get_object('join_button').set_sensitive(True) text = self._room_jid_entry.get_text() + if widget == self._room_jid_entry and text.startswith('xmpp:'): + text = text[5:] + self._room_jid_entry.set_text(text) if widget == self._room_jid_entry and '@' in text: # Don't allow @ char in room entry room_jid, server = text.split('@', 1) self._room_jid_entry.set_text(room_jid) if server: + if '?' in server: + server = server.split('?')[0] self.server_comboboxtext.get_child().set_text(server) self.server_comboboxtext.grab_focus()