changeset a3fd689bca05 in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=a3fd689bca05
description: Prevent join groupchat (using local account). Fixes #6849
diffstat:
src/dialogs.py | 4 ++++
src/gajim-remote.py | 3 ++-
src/groupchat_control.py | 4 ++--
src/remote_control.py | 10 ++++++++--
4 files changed, 16 insertions(+), 5 deletions(-)
diffs (63 lines):
diff -r e2fc975b384e -r a3fd689bca05 src/dialogs.py
--- a/src/dialogs.py Sun Mar 27 21:41:10 2011 +0400
+++ b/src/dialogs.py Tue Mar 29 17:18:50 2011 +0400
@@ -2466,6 +2466,10 @@
if self.automatic:
gajim.automatic_rooms[self.account][room_jid] = self.automatic
+ if gajim.connections[self.account].is_zeroconf:
+ ErrorDialog(_('Impossible join groupchat'),
+ _('local account does not support groupchats.'))
+ return
gajim.interface.join_gc_room(self.account, room_jid, nickname,
password)
self.window.destroy()
diff -r e2fc975b384e -r a3fd689bca05 src/gajim-remote.py
--- a/src/gajim-remote.py Sun Mar 27 21:41:10 2011 +0400
+++ b/src/gajim-remote.py Tue Mar 29 17:18:50 2011 +0400
@@ -339,7 +339,8 @@
Print retrieved result to the output
"""
if res is not None:
- if self.command in ('open_chat', 'send_chat_message',
'send_single_message', 'start_chat'):
+ if self.command in ('open_chat', 'send_chat_message',
+ 'send_single_message', 'start_chat'):
if self.command in ('send_message', 'send_single_message'):
self.argv_len -= 2
diff -r e2fc975b384e -r a3fd689bca05 src/groupchat_control.py
--- a/src/groupchat_control.py Sun Mar 27 21:41:10 2011 +0400
+++ b/src/groupchat_control.py Tue Mar 29 17:18:50 2011 +0400
@@ -1897,8 +1897,8 @@
# logs. We do it only when connected because if connection was lost
# there may be new messages since disconnection.
gajim.connections[self.account].gc_got_disconnected(self.room_jid)
- gajim.connections[self.account].send_gc_status(self.nick,
self.room_jid,
- show='offline', status=status)
+ gajim.connections[self.account].send_gc_status(self.nick,
+ self.room_jid, show='offline', status=status)
nick_list = gajim.contacts.get_nick_list(self.account, self.room_jid)
for nick in nick_list:
# Update pm chat window
diff -r e2fc975b384e -r a3fd689bca05 src/remote_control.py
--- a/src/remote_control.py Sun Mar 27 21:41:10 2011 +0400
+++ b/src/remote_control.py Tue Mar 29 17:18:50 2011 +0400
@@ -901,10 +901,16 @@
accounts = gajim.connections.keys()
for acct in accounts:
if gajim.account_is_connected(acct):
- account = acct
- break
+ if not gajim.connections[acct].is_zeroconf:
+ account = acct
+ break
if not account:
return
+
+ if gajim.connections[account].is_zeroconf:
+ # zeroconf not support groupchats
+ return
+
if not nick:
nick = ''
gajim.interface.instances[account]['join_gc'] = \
_______________________________________________
Commits mailing list
[email protected]
http://lists.gajim.org/cgi-bin/listinfo/commits