account row is back even if we have only one account
This commit is contained in:
parent
15bede7a5f
commit
95fc6741a8
|
@ -62,7 +62,7 @@ class RosterWindow:
|
||||||
'''Class for main window of gtkgui plugin'''
|
'''Class for main window of gtkgui plugin'''
|
||||||
|
|
||||||
def get_account_iter(self, name):
|
def get_account_iter(self, name):
|
||||||
if self.regroup or len(gajim.connections) == 1:
|
if self.regroup:
|
||||||
return
|
return
|
||||||
model = self.tree.get_model()
|
model = self.tree.get_model()
|
||||||
if model is None:
|
if model is None:
|
||||||
|
@ -102,7 +102,7 @@ class RosterWindow:
|
||||||
return found
|
return found
|
||||||
|
|
||||||
def add_account_to_roster(self, account):
|
def add_account_to_roster(self, account):
|
||||||
if self.regroup or len(gajim.connections) == 1:
|
if self.regroup:
|
||||||
return
|
return
|
||||||
model = self.tree.get_model()
|
model = self.tree.get_model()
|
||||||
if self.get_account_iter(account):
|
if self.get_account_iter(account):
|
||||||
|
@ -159,8 +159,7 @@ class RosterWindow:
|
||||||
ishidden = True
|
ishidden = True
|
||||||
gajim.groups[account][g] = { 'expand': ishidden }
|
gajim.groups[account][g] = { 'expand': ishidden }
|
||||||
if not account in self.collapsed_rows and \
|
if not account in self.collapsed_rows and \
|
||||||
not gajim.config.get('mergeaccounts') and \
|
not gajim.config.get('mergeaccounts'):
|
||||||
len(gajim.connections) > 1: #if one acct: don't show acct line
|
|
||||||
self.tree.expand_row((model.get_path(iterG)[0]), False)
|
self.tree.expand_row((model.get_path(iterG)[0]), False)
|
||||||
|
|
||||||
typestr = 'contact'
|
typestr = 'contact'
|
||||||
|
@ -1649,7 +1648,7 @@ _('If "%s" accepts this request you will know his status.') %jid)
|
||||||
def on_roster_treeview_row_expanded(self, widget, iter, path):
|
def on_roster_treeview_row_expanded(self, widget, iter, path):
|
||||||
'''When a row is expanded change the icon of the arrow'''
|
'''When a row is expanded change the icon of the arrow'''
|
||||||
model = self.tree.get_model()
|
model = self.tree.get_model()
|
||||||
if gajim.config.get('mergeaccounts') or len(gajim.connections) == 1:
|
if gajim.config.get('mergeaccounts'):
|
||||||
accounts = gajim.connections.keys()
|
accounts = gajim.connections.keys()
|
||||||
else:
|
else:
|
||||||
accounts = [model[iter][C_ACCOUNT].decode('utf-8')]
|
accounts = [model[iter][C_ACCOUNT].decode('utf-8')]
|
||||||
|
@ -1676,7 +1675,7 @@ _('If "%s" accepts this request you will know his status.') %jid)
|
||||||
'''When a row is collapsed :
|
'''When a row is collapsed :
|
||||||
change the icon of the arrow'''
|
change the icon of the arrow'''
|
||||||
model = self.tree.get_model()
|
model = self.tree.get_model()
|
||||||
if gajim.config.get('mergeaccounts') or len(gajim.connections) == 1:
|
if gajim.config.get('mergeaccounts'):
|
||||||
accounts = gajim.connections.keys()
|
accounts = gajim.connections.keys()
|
||||||
else:
|
else:
|
||||||
accounts = [model[iter][C_ACCOUNT].decode('utf-8')]
|
accounts = [model[iter][C_ACCOUNT].decode('utf-8')]
|
||||||
|
@ -1988,7 +1987,7 @@ _('If "%s" accepts this request you will know his status.') %jid)
|
||||||
path = model.get_path(iter)
|
path = model.get_path(iter)
|
||||||
data = ''
|
data = ''
|
||||||
merge = 0
|
merge = 0
|
||||||
if gajim.config.get('mergeaccounts') or len(gajim.connections) == 1:
|
if gajim.config.get('mergeaccounts'):
|
||||||
merge = 1
|
merge = 1
|
||||||
if len(path) == 3 - merge:
|
if len(path) == 3 - merge:
|
||||||
data = model[iter][C_JID]
|
data = model[iter][C_JID]
|
||||||
|
@ -1997,7 +1996,7 @@ _('If "%s" accepts this request you will know his status.') %jid)
|
||||||
def drag_data_received_data(self, treeview, context, x, y, selection, info,
|
def drag_data_received_data(self, treeview, context, x, y, selection, info,
|
||||||
etime):
|
etime):
|
||||||
merge = 0
|
merge = 0
|
||||||
if gajim.config.get('mergeaccounts') or len(gajim.connections) == 1:
|
if gajim.config.get('mergeaccounts'):
|
||||||
merge = 1
|
merge = 1
|
||||||
model = treeview.get_model()
|
model = treeview.get_model()
|
||||||
if not selection.data:
|
if not selection.data:
|
||||||
|
|
Loading…
Reference in New Issue