indentation is a bit better now

This commit is contained in:
Yann Leboulanger 2005-04-21 17:43:47 +00:00
parent dd2ca4dcd4
commit 8d808eaa30
2 changed files with 40 additions and 40 deletions

View File

@ -145,8 +145,7 @@ class Roster_window:
if not iterG:
IterAcct = self.get_account_iter(account)
iterG = model.append(IterAcct,
(self.pixbufs['closed'], g, 'group',
g, account, False))
(self.pixbufs['closed'], g, 'group', g, account, False))
if not self.groups[account].has_key(g): #It can probably never append
if account+g in self.hidden_lines:
self.groups[account][g] = {'expand': False}
@ -160,8 +159,8 @@ class Roster_window:
if g == 'Agents':
typestr = 'agent'
model.append(iterG, (self.pixbufs[user.show],
user.name, typestr, user.jid, account, False))
model.append(iterG, (self.pixbufs[user.show], user.name,
typestr, user.jid, account, False))
if self.groups[account][g]['expand']:
self.tree.expand_row(model.get_path(iterG), False)
@ -316,8 +315,8 @@ class Roster_window:
#join_gc
if not self.join_gc_handler_id:
self.join_gc_handler_id = join_gc_menuitem.connect(
'activate', self.on_join_gc_activate, gajim.connections.keys()
[0])
'activate', self.on_join_gc_activate,
gajim.connections.keys()[0])
if not self.new_message_menuitem_handler_id:
self.new_message_menuitem_handler_id = new_message_menuitem.\
connect('activate', self.on_new_message_menuitem_activate,
@ -359,8 +358,8 @@ class Roster_window:
show = 'offline'
user1 = User(ji, name, array[jid]['groups'], show,
array[jid]['status'], array[jid]['sub'], array[jid]['ask'],
resource, 0, '')
array[jid]['status'], array[jid]['sub'],
array[jid]['ask'], resource, 0, '')
#when we draw the roster, we can't have twice the same user with
# 2 resources
self.contacts[account][ji] = [user1]
@ -608,8 +607,8 @@ class Roster_window:
if not self.contacts[account].has_key(jid):
if not group:
group = 'General'
user1 = User(jid, pseudo, [group], 'requested',
'requested', 'none', 'subscribe', '', 0, '')
user1 = User(jid, pseudo, [group], 'requested', 'requested',
'none', 'subscribe', '', 0, '')
self.contacts[account][jid] = [user1]
self.add_user_to_roster(jid, account)
@ -706,8 +705,9 @@ class Roster_window:
save_pass = gajim.config.get_per('accounts', account, 'savepass')
if not save_pass and gajim.connections[account].connected < 2:
passphrase = ''
w = dialogs.Passphrase_dialog(_('Enter your password for account %s')
% account, 'Save password', autoconnect)
w = dialogs.Passphrase_dialog(
_('Enter your password for account %s') % account,
'Save password', autoconnect)
passphrase, save = w.run()
if passphrase == -1:
if accountIter:
@ -805,8 +805,8 @@ class Roster_window:
self.status_combobox.handler_block(self.id_signal_cb)
self.status_combobox.set_active(table[maxi])
self.status_combobox.handler_unblock(self.id_signal_cb)
statuss = ['offline', 'connecting', 'online', 'chat', 'away', 'xa', 'dnd',
'invisible']
statuss = ['offline', 'connecting', 'online', 'chat', 'away',
'xa', 'dnd', 'invisible']
if self.plugin.systray_enabled:
self.plugin.systray.set_status(statuss[maxi])
image = self.pixbufs[statuss[maxi]]
@ -824,8 +824,8 @@ class Roster_window:
accountIter = self.get_account_iter(account)
if accountIter:
model.set_value(accountIter, 0, self.pixbufs[status])
statuss = ['offline', 'connecting', 'online', 'chat', 'away', 'xa', 'dnd',
'invisible']
statuss = ['offline', 'connecting', 'online', 'chat', 'away',
'xa', 'dnd', 'invisible']
if status == 'offline':
for jid in self.contacts[account]:
luser = self.contacts[account][jid]
@ -871,8 +871,8 @@ class Roster_window:
def on_message(self, jid, msg, tim, account):
'''when we receive a message'''
if not self.contacts[account].has_key(jid):
user1 = User(jid, jid, ['not in the roster'],
'not in the roster', 'not in the roster', 'none', None, '', 0, '')
user1 = User(jid, jid, ['not in the roster'], 'not in the roster',
'not in the roster', 'none', None, '', 0, '')
self.contacts[account][jid] = [user1]
self.add_user_to_roster(jid, account)
iters = self.get_user_iter(jid, account)