print account row between [] if row is collapsed. Fixes #2152
This commit is contained in:
parent
fab576e10f
commit
0491be8d66
|
@ -64,7 +64,7 @@ class RosterWindow:
|
||||||
if self.regroup:
|
if self.regroup:
|
||||||
return account_iter
|
return account_iter
|
||||||
while account_iter:
|
while account_iter:
|
||||||
account_name = model[account_iter][C_NAME].decode('utf-8')
|
account_name = model[account_iter][C_ACCOUNT].decode('utf-8')
|
||||||
if name == account_name:
|
if name == account_name:
|
||||||
break
|
break
|
||||||
account_iter = model.iter_next(account_iter)
|
account_iter = model.iter_next(account_iter)
|
||||||
|
@ -191,6 +191,11 @@ class RosterWindow:
|
||||||
model[iter][C_SECPIXBUF] = tls_pixbuf
|
model[iter][C_SECPIXBUF] = tls_pixbuf
|
||||||
else:
|
else:
|
||||||
model[iter][C_SECPIXBUF] = None
|
model[iter][C_SECPIXBUF] = None
|
||||||
|
path = model.get_path(iter)
|
||||||
|
if self.tree.row_expanded(path):
|
||||||
|
model[iter][C_NAME] = account
|
||||||
|
else:
|
||||||
|
model[iter][C_NAME] = '[%s]' % account
|
||||||
|
|
||||||
def remove_newly_added(self, jid, account):
|
def remove_newly_added(self, jid, account):
|
||||||
if jid in gajim.newly_added[account]:
|
if jid in gajim.newly_added[account]:
|
||||||
|
@ -2895,6 +2900,7 @@ _('If "%s" accepts this request you will know his or her status.') % jid)
|
||||||
if groupIter and gajim.groups[account][g]['expand']:
|
if groupIter and gajim.groups[account][g]['expand']:
|
||||||
pathG = model.get_path(groupIter)
|
pathG = model.get_path(groupIter)
|
||||||
self.tree.expand_row(pathG, False)
|
self.tree.expand_row(pathG, False)
|
||||||
|
self.draw_account(account)
|
||||||
elif type == 'contact':
|
elif type == 'contact':
|
||||||
jid = model[iter][C_JID].decode('utf-8')
|
jid = model[iter][C_JID].decode('utf-8')
|
||||||
account = model[iter][C_ACCOUNT].decode('utf-8')
|
account = model[iter][C_ACCOUNT].decode('utf-8')
|
||||||
|
@ -2921,6 +2927,7 @@ _('If "%s" accepts this request you will know his or her status.') % jid)
|
||||||
account = accounts[0] # There is only one cause we don't use merge
|
account = accounts[0] # There is only one cause we don't use merge
|
||||||
if not account in self.collapsed_rows:
|
if not account in self.collapsed_rows:
|
||||||
self.collapsed_rows.append(account)
|
self.collapsed_rows.append(account)
|
||||||
|
self.draw_account(account)
|
||||||
elif type == 'contact':
|
elif type == 'contact':
|
||||||
jid = model[iter][C_JID].decode('utf-8')
|
jid = model[iter][C_JID].decode('utf-8')
|
||||||
account = model[iter][C_ACCOUNT].decode('utf-8')
|
account = model[iter][C_ACCOUNT].decode('utf-8')
|
||||||
|
@ -3299,6 +3306,10 @@ _('If "%s" accepts this request you will know his or her status.') % jid)
|
||||||
return 0
|
return 0
|
||||||
account1 = account1.decode('utf-8')
|
account1 = account1.decode('utf-8')
|
||||||
account2 = account2.decode('utf-8')
|
account2 = account2.decode('utf-8')
|
||||||
|
if type1 == 'account':
|
||||||
|
if account1 < account2:
|
||||||
|
return -1
|
||||||
|
return 1
|
||||||
jid1 = model[iter1][C_JID].decode('utf-8')
|
jid1 = model[iter1][C_JID].decode('utf-8')
|
||||||
jid2 = model[iter2][C_JID].decode('utf-8')
|
jid2 = model[iter2][C_JID].decode('utf-8')
|
||||||
if type1 == 'contact':
|
if type1 == 'contact':
|
||||||
|
|
Loading…
Reference in New Issue