changeset 93a3916f2788 in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=93a3916f2788
description: fix error dialog. Fixes #6906
diffstat:
src/gui_interface.py | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
diffs (57 lines):
diff -r 4f267c122997 -r 93a3916f2788 src/gui_interface.py
--- a/src/gui_interface.py Thu Jun 30 08:06:03 2011 +0200
+++ b/src/gui_interface.py Fri Jul 01 16:08:15 2011 +0200
@@ -2689,7 +2689,8 @@
Join the room immediately
"""
- if gajim.contacts.get_contact(account, room_jid):
+ if gajim.contacts.get_contact(account, room_jid) and \
+ not gajim.contacts.get_contact(account, room_jid).is_groupchat():
dialogs.ErrorDialog(_('This is not a group chat'),
_('%s is not the name of a group chat.') % room_jid)
return
@@ -2697,11 +2698,17 @@
if not nick:
nick = gajim.nicks[account]
- if self.msg_win_mgr.has_window(room_jid, account) and \
- gajim.gc_connected[account][room_jid]:
- gc_ctrl = self.msg_win_mgr.get_gc_control(room_jid, account)
- win = gc_ctrl.parent_win
- win.set_active_tab(gc_ctrl)
+ minimized_control = gajim.interface.minimized_controls[account].get(
+ room_jid, None)
+
+ if (self.msg_win_mgr.has_window(room_jid, account) or \
+ minimized_control) and gajim.gc_connected[account][room_jid]:
+ if self.msg_win_mgr.has_window(room_jid, account):
+ gc_ctrl = self.msg_win_mgr.get_gc_control(room_jid, account)
+ win = gc_ctrl.parent_win
+ win.set_active_tab(gc_ctrl)
+ else:
+ self.roster.on_groupchat_maximized(None, room_jid, account)
dialogs.ErrorDialog(_('You are already in group chat %s') % \
room_jid)
return
@@ -2712,9 +2719,6 @@
_('You cannot join a group chat while you are invisible'))
return
- minimized_control = gajim.interface.minimized_controls[account].get(
- room_jid, None)
-
if minimized_control is None and not self.msg_win_mgr.has_window(
room_jid, account):
# Join new groupchat
@@ -2734,10 +2738,6 @@
gc_control = self.msg_win_mgr.get_gc_control(room_jid, account)
gc_control.nick = nick
gc_control.parent_win.set_active_tab(gc_control)
- else:
- # We are already in this groupchat and it is minimized
- minimized_control.nick = nick
- self.roster.add_groupchat(room_jid, account)
# Connect
gajim.connections[account].join_gc(nick, room_jid, password)
changeset 2b6d2460a2b6 in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=2b6d2460a2b6
description: fix error dialog. Fixes #6906
diffstat:
src/gui_interface.py | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
diffs (57 lines):
diff -r 5b0d36675b14 -r 2b6d2460a2b6 src/gui_interface.py
--- a/src/gui_interface.py Sun Jun 26 00:28:42 2011 +0400
+++ b/src/gui_interface.py Fri Jul 01 16:08:15 2011 +0200
@@ -1925,7 +1925,8 @@
Join the room immediately
"""
- if gajim.contacts.get_contact(account, room_jid):
+ if gajim.contacts.get_contact(account, room_jid) and \
+ not gajim.contacts.get_contact(account, room_jid).is_groupchat():
dialogs.ErrorDialog(_('This is not a group chat'),
_('%s is not the name of a group chat.') % room_jid)
return
@@ -1933,11 +1934,17 @@
if not nick:
nick = gajim.nicks[account]
- if self.msg_win_mgr.has_window(room_jid, account) and \
- gajim.gc_connected[account][room_jid]:
- gc_ctrl = self.msg_win_mgr.get_gc_control(room_jid, account)
- win = gc_ctrl.parent_win
- win.set_active_tab(gc_ctrl)
+ minimized_control = gajim.interface.minimized_controls[account].get(
+ room_jid, None)
+
+ if (self.msg_win_mgr.has_window(room_jid, account) or \
+ minimized_control) and gajim.gc_connected[account][room_jid]:
+ if self.msg_win_mgr.has_window(room_jid, account):
+ gc_ctrl = self.msg_win_mgr.get_gc_control(room_jid, account)
+ win = gc_ctrl.parent_win
+ win.set_active_tab(gc_ctrl)
+ else:
+ self.roster.on_groupchat_maximized(None, room_jid, account)
dialogs.ErrorDialog(_('You are already in group chat %s') % \
room_jid)
return
@@ -1948,9 +1955,6 @@
_('You cannot join a group chat while you are invisible'))
return
- minimized_control = gajim.interface.minimized_controls[account].get(
- room_jid, None)
-
if minimized_control is None and not self.msg_win_mgr.has_window(
room_jid, account):
# Join new groupchat
@@ -1970,10 +1974,6 @@
gc_control = self.msg_win_mgr.get_gc_control(room_jid, account)
gc_control.nick = nick
gc_control.parent_win.set_active_tab(gc_control)
- else:
- # We are already in this groupchat and it is minimized
- minimized_control.nick = nick
- self.roster.add_groupchat(room_jid, account)
# Connect
gajim.connections[account].join_gc(nick, room_jid, password)