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