don't allow to block a transport contact. Fixes #3984

This commit is contained in:
Yann Leboulanger 2008-06-16 07:31:26 +00:00
parent df1be596e4
commit c967351d36
1 changed files with 5 additions and 2 deletions

View File

@ -5135,12 +5135,15 @@ class RosterWindow:
privacy_rules_supported:
if jid in gajim.connections[account].blocked_contacts:
block_menuitem.set_no_show_all(True)
unblock_menuitem.connect('activate', self.on_unblock, titer, None)
block_menuitem.hide()
unblock_menuitem.connect('activate', self.on_unblock, titer, None)
else:
unblock_menuitem.set_no_show_all(True)
block_menuitem.connect('activate', self.on_block, titer, None)
unblock_menuitem.hide()
if gajim.get_transport_name_from_jid(jid, use_config_setting=False):
block_menuitem.set_sensitive(False)
else:
block_menuitem.connect('activate', self.on_block, titer, None)
else:
unblock_menuitem.set_no_show_all(True)
block_menuitem.set_sensitive(False)