From a33b571766c3e6764903a00222dfcc356b4a1a9c Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 12 Oct 2005 19:28:31 +0000 Subject: [PATCH] send_file menuitem is unsensitive if contact doesn't have a resource --- src/chat.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/chat.py b/src/chat.py index 0c3ed4c26..4761d61d6 100644 --- a/src/chat.py +++ b/src/chat.py @@ -413,6 +413,12 @@ class Chat: issensitive = gpg_btn.get_property('sensitive') childs[3].set_active(isactive) childs[3].set_property('sensitive', issensitive) + # If we don't have resource, we can't do file transfert + c = gajim.get_first_contact_instance_from_jid(self.account, jid) + if not c.resource: + childs[2].set_sensitive(False) + else: + childs[2].set_sensitive(True) # compact_view_menuitem childs[4].set_active(self.compact_view_current_state) menu = self.remove_possible_switch_to_menuitems(menu)