don't allow to send custom status nor revoke subscription for transport contacts. fixes #3984

This commit is contained in:
Yann Leboulanger 2008-06-02 10:27:16 +00:00
parent e5f682a81a
commit 3fe89676ac
1 changed files with 6 additions and 2 deletions

View File

@ -5021,7 +5021,10 @@ class RosterWindow:
if group in gajim.connections[account].blocked_groups:
blocked = True
break
if blocked:
if gajim.get_transport_name_from_jid(jid, use_config_setting=False):
# Transport contact, send custom status unavailable
send_custom_status_menuitem.set_sensitive(False)
elif blocked:
send_custom_status_menuitem.set_image( \
gtkgui_helpers.load_icon('offline'))
send_custom_status_menuitem.set_sensitive(False)
@ -5137,7 +5140,8 @@ class RosterWindow:
ask_auth_menuitem.connect('activate', self.req_sub, jid,
_('I would like to add you to my roster'), account,
contact.groups, contact.name)
if contact.sub in ('to', 'none'):
if contact.sub in ('to', 'none') or gajim.get_transport_name_from_jid(
jid, use_config_setting=False):
revoke_auth_menuitem.set_sensitive(False)
else:
revoke_auth_menuitem.connect('activate', self.revoke_auth, jid,