don't expand big brother when we get a message in a metacontact. Fixes #4867
This commit is contained in:
parent
a562bfdcb6
commit
d3eb181758
11
src/gajim.py
11
src/gajim.py
|
@ -2357,8 +2357,15 @@ class Interface:
|
|||
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
|
||||
|
|
|
@ -1374,7 +1374,8 @@ class RosterWindow:
|
|||
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)
|
||||
|
||||
|
|
|
@ -365,8 +365,16 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession):
|
|||
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 ---
|
||||
|
||||
|
|
Loading…
Reference in New Issue