[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,
|
self.dialog = dialogs.ConfirmationDialog(pritext, sectext,
|
||||||
on_response_ok = (remove, list_))
|
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. '''
|
''' When clicked on the 'block' button in context menu. '''
|
||||||
model = self.tree.get_model()
|
model = self.tree.get_model()
|
||||||
accounts = []
|
accounts = []
|
||||||
if blockedlist == None:
|
msg = self.get_status_message('offline')
|
||||||
|
if group_list == None:
|
||||||
jid = model[iter][C_JID].decode('utf-8')
|
jid = model[iter][C_JID].decode('utf-8')
|
||||||
account = model[iter][C_ACCOUNT].decode('utf-8')
|
account = model[iter][C_ACCOUNT].decode('utf-8')
|
||||||
accounts.append(account)
|
accounts.append(account)
|
||||||
msg = self.get_status_message('offline')
|
|
||||||
self.send_status(account, 'offline', msg, to = jid)
|
self.send_status(account, 'offline', msg, to = jid)
|
||||||
new_rule = {'order': u'1', 'type': u'jid', 'action': u'deny',
|
new_rule = {'order': u'1', 'type': u'jid', 'action': u'deny',
|
||||||
'value' : jid, 'child': [u'message', u'iq', u'presence-out']}
|
'value' : jid, 'child': [u'message', u'iq', u'presence-out']}
|
||||||
|
@ -1446,9 +1446,8 @@ class RosterWindow:
|
||||||
gajim.connections[account].blocked_contacts.append(jid)
|
gajim.connections[account].blocked_contacts.append(jid)
|
||||||
self.draw_contact(jid, account)
|
self.draw_contact(jid, account)
|
||||||
else:
|
else:
|
||||||
msg = self.get_status_message('offline')
|
|
||||||
if iter == None:
|
if iter == None:
|
||||||
for (contact, account) in blockedlist:
|
for (contact, account) in group_list:
|
||||||
if account not in accounts:
|
if account not in accounts:
|
||||||
if not gajim.connections[account].privacy_rules_supported:
|
if not gajim.connections[account].privacy_rules_supported:
|
||||||
continue
|
continue
|
||||||
|
@ -1464,7 +1463,7 @@ class RosterWindow:
|
||||||
else:
|
else:
|
||||||
group = model[iter][C_JID].decode('utf-8')
|
group = model[iter][C_JID].decode('utf-8')
|
||||||
msg = self.get_status_message('offline')
|
msg = self.get_status_message('offline')
|
||||||
for (contact, account) in blockedlist:
|
for (contact, account) in group_list:
|
||||||
if account not in accounts:
|
if account not in accounts:
|
||||||
if not gajim.connections[account].privacy_rules_supported:
|
if not gajim.connections[account].privacy_rules_supported:
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Add table
Reference in a new issue