[roidelapluie] coding standards. see #253
This commit is contained in:
parent
680088ea2f
commit
86eb5f7120
2 changed files with 11 additions and 12 deletions
|
@ -1429,15 +1429,15 @@ class RosterWindow:
|
|||
self.dialog = dialogs.ConfirmationDialog(pritext, sectext,
|
||||
on_response_ok = (remove, list_))
|
||||
|
||||
def on_block(self, widget, iter, blockedlist):
|
||||
def on_block(self, widget, iter, group_list):
|
||||
''' When clicked on the 'block' button in context menu. '''
|
||||
model = self.tree.get_model()
|
||||
accounts = []
|
||||
if blockedlist == None:
|
||||
msg = self.get_status_message('offline')
|
||||
if group_list == None:
|
||||
jid = model[iter][C_JID].decode('utf-8')
|
||||
account = model[iter][C_ACCOUNT].decode('utf-8')
|
||||
accounts.append(account)
|
||||
msg = self.get_status_message('offline')
|
||||
self.send_status(account, 'offline', msg, to = jid)
|
||||
new_rule = {'order': u'1', 'type': u'jid', 'action': u'deny',
|
||||
'value' : jid, 'child': [u'message', u'iq', u'presence-out']}
|
||||
|
@ -1446,9 +1446,8 @@ class RosterWindow:
|
|||
gajim.connections[account].blocked_contacts.append(jid)
|
||||
self.draw_contact(jid, account)
|
||||
else:
|
||||
msg = self.get_status_message('offline')
|
||||
if iter == None:
|
||||
for (contact, account) in blockedlist:
|
||||
for (contact, account) in group_list:
|
||||
if account not in accounts:
|
||||
if not gajim.connections[account].privacy_rules_supported:
|
||||
continue
|
||||
|
@ -1464,7 +1463,7 @@ class RosterWindow:
|
|||
else:
|
||||
group = model[iter][C_JID].decode('utf-8')
|
||||
msg = self.get_status_message('offline')
|
||||
for (contact, account) in blockedlist:
|
||||
for (contact, account) in group_list:
|
||||
if account not in accounts:
|
||||
if not gajim.connections[account].privacy_rules_supported:
|
||||
continue
|
||||
|
|
Loading…
Add table
Reference in a new issue