Author: asterix Date: 2009-04-08 09:55:52 +0200 (Wed, 08 Apr 2009) New Revision: 11213
Modified: trunk/src/gajim.py trunk/src/roster_window.py trunk/src/session.py Log: don't expand big brother when we get a message in a metacontact. Fixes #4867
Modified: trunk/src/gajim.py =================================================================== --- trunk/src/gajim.py 2009-04-08 07:31:56 UTC (rev 11212) +++ trunk/src/gajim.py 2009-04-08 07:55:52 UTC (rev 11213) @@ -2357,8 +2357,15 @@ 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) + # Select the big brother contact in roster, it's visible because it has + # events. + family = gajim.contacts.get_metacontacts_family(account, jid) + if family: + nearby_family, bb_jid, bb_account = \ + self.roster._get_nearby_family_and_big_brother(family, account) + else: + bb_jid, bb_account = jid, account + self.roster.select_contact(bb_jid, bb_account)
def handle_event(self, account, fjid, type_): w = None
Modified: trunk/src/roster_window.py =================================================================== --- trunk/src/roster_window.py 2009-04-08 07:31:56 UTC (rev 11212) +++ trunk/src/roster_window.py 2009-04-08 07:55:52 UTC (rev 11213) @@ -1374,7 +1374,8 @@ if self.dragging or not gajim.config.get('scroll_roster_to_last_message'): # do not change selection while DND'ing return - self.tree.expand_to_path(path) + # Expand his parent, so this path is visible, don't expand it. + self.tree.expand_to_path(path[:-1]) self.tree.scroll_to_cell(path) self.tree.set_cursor(path)
Modified: trunk/src/session.py =================================================================== --- trunk/src/session.py 2009-04-08 07:31:56 UTC (rev 11212) +++ trunk/src/session.py 2009-04-08 07:55:52 UTC (rev 11213) @@ -365,8 +365,16 @@ gajim.interface.roster.draw_contact(jid, self.conn.name)
gajim.interface.roster.show_title() # we show the * or [n] - # Select contact row in roster. - gajim.interface.roster.select_contact(jid, self.conn.name) + # Select the big brother contact in roster, it's visible because it has + # events. + family = gajim.contacts.get_metacontacts_family(self.conn.name, jid) + if family: + nearby_family, bb_jid, bb_account = \ + gajim.interface.roster._get_nearby_family_and_big_brother(family, + self.conn.name) + else: + bb_jid, bb_account = jid, self.conn.name + gajim.interface.roster.select_contact(bb_jid, bb_account)
# ---- ESessions stuff ---