Commit de32ffcd authored by Yann Leboulanger's avatar Yann Leboulanger

[lemonyogster] don't allow to put @ in room entry in join groupchat dialog and...

[lemonyogster] don't allow to put @ in room entry in join groupchat dialog and automatically switch to server entry. see #5528
parent 8ca19513
......@@ -2245,6 +2245,14 @@ class JoinGroupchatWindow:
self._empty_required_widgets.remove(widget)
if len(self._empty_required_widgets) == 0 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.find('@') > -1:
# Don't allow @ char in room entry
room_jid, server = text.split('@', 1)
self._room_jid_entry.set_text(room_jid)
if server:
self.server_comboboxentry.child.set_text(server)
self.server_comboboxentry.grab_focus()
def on_account_combobox_changed(self, widget):
model = widget.get_model()
......
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