don't look for a contact when we double click on an account row
This commit is contained in:
parent
d23612c904
commit
56598c447b
1 changed files with 45 additions and 42 deletions
|
@ -3456,16 +3456,17 @@ class RosterWindow:
|
||||||
model = self.modelfilter
|
model = self.modelfilter
|
||||||
account = model[path][C_ACCOUNT].decode('utf-8')
|
account = model[path][C_ACCOUNT].decode('utf-8')
|
||||||
type_ = model[path][C_TYPE]
|
type_ = model[path][C_TYPE]
|
||||||
jid = model[path][C_JID].decode('utf-8')
|
|
||||||
resource = None
|
|
||||||
contact = gajim.contacts.get_first_contact_from_jid(account, jid)
|
|
||||||
titer = model.get_iter(path)
|
|
||||||
if type_ in ('group', 'account'):
|
if type_ in ('group', 'account'):
|
||||||
if self.tree.row_expanded(path):
|
if self.tree.row_expanded(path):
|
||||||
self.tree.collapse_row(path)
|
self.tree.collapse_row(path)
|
||||||
else:
|
else:
|
||||||
self.tree.expand_row(path, False)
|
self.tree.expand_row(path, False)
|
||||||
elif contact.is_groupchat():
|
return
|
||||||
|
jid = model[path][C_JID].decode('utf-8')
|
||||||
|
resource = None
|
||||||
|
contact = gajim.contacts.get_first_contact_from_jid(account, jid)
|
||||||
|
titer = model.get_iter(path)
|
||||||
|
if contact.is_groupchat():
|
||||||
first_ev = gajim.events.get_first_event(account, jid)
|
first_ev = gajim.events.get_first_event(account, jid)
|
||||||
if first_ev and self.open_event(account, jid, first_ev):
|
if first_ev and self.open_event(account, jid, first_ev):
|
||||||
# We are invited to a GC
|
# We are invited to a GC
|
||||||
|
@ -3473,7 +3474,9 @@ class RosterWindow:
|
||||||
self.remove_groupchat(jid, account)
|
self.remove_groupchat(jid, account)
|
||||||
else:
|
else:
|
||||||
self.on_groupchat_maximized(None, jid, account)
|
self.on_groupchat_maximized(None, jid, account)
|
||||||
else:
|
return
|
||||||
|
|
||||||
|
# else
|
||||||
first_ev = gajim.events.get_first_event(account, jid)
|
first_ev = gajim.events.get_first_event(account, jid)
|
||||||
if not first_ev:
|
if not first_ev:
|
||||||
# look in other resources
|
# look in other resources
|
||||||
|
@ -3504,8 +3507,8 @@ class RosterWindow:
|
||||||
# else
|
# else
|
||||||
contact = gajim.contacts.get_contact(account, jid, resource)
|
contact = gajim.contacts.get_contact(account, jid, resource)
|
||||||
if not contact or isinstance(contact, list):
|
if not contact or isinstance(contact, list):
|
||||||
contact = \
|
contact = gajim.contacts.get_contact_with_highest_priority(account,
|
||||||
gajim.contacts.get_contact_with_highest_priority(account, jid)
|
jid)
|
||||||
if jid == gajim.get_jid_from_account(account):
|
if jid == gajim.get_jid_from_account(account):
|
||||||
resource = contact.resource
|
resource = contact.resource
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue