hiddenlines or hidden_lines ==> hidden_rows
This commit is contained in:
parent
a7bf88e8f1
commit
0d4084ead7
2 changed files with 14 additions and 14 deletions
|
@ -56,7 +56,7 @@ class Config:
|
||||||
'inmsgcolor': [ opt_color, '#ff0000' ],
|
'inmsgcolor': [ opt_color, '#ff0000' ],
|
||||||
'outmsgcolor': [ opt_color, '#0000ff' ],
|
'outmsgcolor': [ opt_color, '#0000ff' ],
|
||||||
'statusmsgcolor': [ opt_color, '#1eaa1e' ],
|
'statusmsgcolor': [ opt_color, '#1eaa1e' ],
|
||||||
'hiddenlines': [ opt_str, '' ],
|
'hidden_rows': [ opt_str, '' ],
|
||||||
'roster_theme': [ opt_str, 'green' ],
|
'roster_theme': [ opt_str, 'green' ],
|
||||||
'accounttextcolor': [ opt_color, '#ffffff' ],
|
'accounttextcolor': [ opt_color, '#ffffff' ],
|
||||||
'accountbgcolor': [ opt_color, '#94aa8c' ],
|
'accountbgcolor': [ opt_color, '#94aa8c' ],
|
||||||
|
|
|
@ -127,12 +127,12 @@ class Roster_window:
|
||||||
iterG = model.append(IterAcct,
|
iterG = model.append(IterAcct,
|
||||||
(self.jabber_state_images['closed'], g, 'group', g, account, False))
|
(self.jabber_state_images['closed'], g, 'group', g, account, False))
|
||||||
if not self.groups[account].has_key(g): #It can probably never append
|
if not self.groups[account].has_key(g): #It can probably never append
|
||||||
if account + g in self.hidden_lines:
|
if account + g in self.hidden_rows:
|
||||||
ishidden = False
|
ishidden = False
|
||||||
else:
|
else:
|
||||||
ishidden = True
|
ishidden = True
|
||||||
self.groups[account][g] = { 'expand': ishidden }
|
self.groups[account][g] = { 'expand': ishidden }
|
||||||
if not account in self.hidden_lines and \
|
if not account in self.hidden_rows and \
|
||||||
not gajim.config.get('mergeaccounts'):
|
not gajim.config.get('mergeaccounts'):
|
||||||
self.tree.expand_row((model.get_path(iterG)[0]), False)
|
self.tree.expand_row((model.get_path(iterG)[0]), False)
|
||||||
|
|
||||||
|
@ -386,7 +386,7 @@ class Roster_window:
|
||||||
if g in self.groups[account].keys():
|
if g in self.groups[account].keys():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if account + g in self.hidden_lines:
|
if account + g in self.hidden_rows:
|
||||||
ishidden = False
|
ishidden = False
|
||||||
else:
|
else:
|
||||||
ishidden = True
|
ishidden = True
|
||||||
|
@ -1021,7 +1021,7 @@ class Roster_window:
|
||||||
gajim.config.set('width', width)
|
gajim.config.set('width', width)
|
||||||
gajim.config.set('height', height)
|
gajim.config.set('height', height)
|
||||||
|
|
||||||
gajim.config.set('hiddenlines', '\t'.join(self.hidden_lines))
|
gajim.config.set('hidden_rows', '\t'.join(self.hidden_rows))
|
||||||
self.plugin.save_config()
|
self.plugin.save_config()
|
||||||
for account in gajim.connections:
|
for account in gajim.connections:
|
||||||
gajim.connections[account].quit(True)
|
gajim.connections[account].quit(True)
|
||||||
|
@ -1105,11 +1105,11 @@ class Roster_window:
|
||||||
model.set_value(iter, 0, self.jabber_state_images['opened'])
|
model.set_value(iter, 0, self.jabber_state_images['opened'])
|
||||||
jid = model.get_value(iter, 3)
|
jid = model.get_value(iter, 3)
|
||||||
self.groups[account][jid]['expand'] = True
|
self.groups[account][jid]['expand'] = True
|
||||||
if account + jid in self.hidden_lines:
|
if account + jid in self.hidden_rows:
|
||||||
self.hidden_lines.remove(account + jid)
|
self.hidden_rows.remove(account + jid)
|
||||||
elif type == 'account':
|
elif type == 'account':
|
||||||
if account in self.hidden_lines:
|
if account in self.hidden_rows:
|
||||||
self.hidden_lines.remove(account)
|
self.hidden_rows.remove(account)
|
||||||
for g in self.groups[account]:
|
for g in self.groups[account]:
|
||||||
groupIter = self.get_group_iter(g, account)
|
groupIter = self.get_group_iter(g, account)
|
||||||
if groupIter and self.groups[account][g]['expand']:
|
if groupIter and self.groups[account][g]['expand']:
|
||||||
|
@ -1127,11 +1127,11 @@ class Roster_window:
|
||||||
model.set_value(iter, 0, self.jabber_state_images['closed'])
|
model.set_value(iter, 0, self.jabber_state_images['closed'])
|
||||||
jid = model.get_value(iter, 3)
|
jid = model.get_value(iter, 3)
|
||||||
self.groups[account][jid]['expand'] = False
|
self.groups[account][jid]['expand'] = False
|
||||||
if not account + jid in self.hidden_lines:
|
if not account + jid in self.hidden_rows:
|
||||||
self.hidden_lines.append(account + jid)
|
self.hidden_rows.append(account + jid)
|
||||||
elif type == 'account':
|
elif type == 'account':
|
||||||
if not account in self.hidden_lines:
|
if not account in self.hidden_rows:
|
||||||
self.hidden_lines.append(account)
|
self.hidden_rows.append(account)
|
||||||
|
|
||||||
def on_editing_canceled (self, cell):
|
def on_editing_canceled (self, cell):
|
||||||
'''editing has been canceled'''
|
'''editing has been canceled'''
|
||||||
|
@ -1515,7 +1515,7 @@ class Roster_window:
|
||||||
self.id_signal_cb = self.status_combobox.connect('changed',
|
self.id_signal_cb = self.status_combobox.connect('changed',
|
||||||
self.on_status_combobox_changed)
|
self.on_status_combobox_changed)
|
||||||
|
|
||||||
self.hidden_lines = gajim.config.get('hiddenlines').split('\t')
|
self.hidden_rows = gajim.config.get('hidden_rows').split('\t')
|
||||||
self.draw_roster()
|
self.draw_roster()
|
||||||
if len(gajim.connections) == 0: # if no account
|
if len(gajim.connections) == 0: # if no account
|
||||||
self.plugin.windows['account_modification'] = \
|
self.plugin.windows['account_modification'] = \
|
||||||
|
|
Loading…
Add table
Reference in a new issue