Author: steve-e
Date: 2008-07-21 23:44:40 +0200 (Mon, 21 Jul 2008)
New Revision: 9978
Modified:
trunk/src/gajim.py
trunk/src/roster_window.py
Log:
Some cleanups and an attempt to fix the MUC highlight problem.
Modified: trunk/src/gajim.py
===================================================================
--- trunk/src/gajim.py 2008-07-21 20:17:35 UTC (rev 9977)
+++ trunk/src/gajim.py 2008-07-21 21:44:40 UTC (rev 9978)
@@ -710,7 +710,6 @@
if ji in jid_list:
# Update existing iter
self.roster.draw_contact(ji, account)
- self.roster.draw_group(_('Transports'), account)
if new_show > 1 and ji in gajim.transport_avatar[account]:
# transport just signed in. request avatars
for jid_ in gajim.transport_avatar[account][ji]:
@@ -2107,7 +2106,8 @@
else:
# add contact to roster ("Not In The Roster") if he is not
self.roster.add_to_not_in_the_roster(account, jid)
- self.roster.draw_contact(jid, account)
+ else:
+ self.roster.draw_contact(jid, account)
# Select the contact in roster, it's visible because it has events.
self.roster.select_contact(jid, account)
@@ -2124,8 +2124,8 @@
w = self.msg_win_mgr.get_window(jid, account)
if jid in self.minimized_controls[account]:
self.roster.on_groupchat_maximized(None, jid, account)
-
- if not ctrl:
+ return
+ else:
ctrl = self.msg_win_mgr.get_gc_control(jid, account)
elif type_ in ('printed_chat', 'chat', ''):
@@ -3134,7 +3134,6 @@
dialogs.AspellDictError(lang)
if gajim.config.get('soundplayer') == '':
- print 'first'
# only on first time Gajim starts
commands = ('aplay', 'play', 'esdplay', 'artsplay')
for command in commands:
Modified: trunk/src/roster_window.py
===================================================================
--- trunk/src/roster_window.py 2008-07-21 20:17:35 UTC (rev 9977)
+++ trunk/src/roster_window.py 2008-07-21 21:44:40 UTC (rev 9978)
@@ -759,7 +759,7 @@
contact = gajim.contacts.get_contact_with_highest_priority(account, jid)
if contact.is_groupchat():
if jid in gajim.interface.minimized_controls[account]:
- gajim.interface.minimized_controls[account][jid]
+ del gajim.interface.minimized_controls[account][jid]
self.remove_contact(jid, account, force=True, backend=True)
return True
else:
@@ -2720,15 +2720,14 @@
if not jid in gajim.interface.minimized_controls[account]:
return
ctrl = gajim.interface.minimized_controls[account][jid]
- mw = gajim.interface.msg_win_mgr.get_window(ctrl.contact.jid,
- ctrl.account)
+ mw = gajim.interface.msg_win_mgr.get_window(jid, account)
if not mw:
mw = gajim.interface.msg_win_mgr.create_window(ctrl.contact,
ctrl.account, ctrl.type_id)
ctrl.parent_win = mw
mw.new_tab(ctrl)
mw.set_active_tab(ctrl)
-
+ mw.window.window.focus()
self.remove_groupchat(jid, account)
def on_edit_account(self, widget, account):