From aa3a8c7f467d723eda231d5a435a8f40ae8b0fce Mon Sep 17 00:00:00 2001
From: Yann Leboulanger <asterix@lagaule.org>
Date: Sat, 4 Aug 2012 17:14:34 +0200
Subject: [PATCH] hide invite contacts buttons in zeroconf chat controls. Fixes
 #7188

---
 src/chat_control.py | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/chat_control.py b/src/chat_control.py
index 4e9c68b7ac..6b3c601b38 100644
--- a/src/chat_control.py
+++ b/src/chat_control.py
@@ -1744,10 +1744,14 @@ class ChatControl(ChatControlBase):
                     "him or her a file."))
 
         # Convert to GC
-        if self.contact.supports(NS_MUC):
-            self._convert_to_gc_button.set_sensitive(True)
+        if gajim.config.get_per('accounts', self.account, 'is_zeroconf'):
+            self._convert_to_gc_button.set_no_show_all(True)
+            self._convert_to_gc_button.hide()
         else:
-            self._convert_to_gc_button.set_sensitive(False)
+            if self.contact.supports(NS_MUC):
+                self._convert_to_gc_button.set_sensitive(True)
+            else:
+                self._convert_to_gc_button.set_sensitive(False)
 
         # Information
         if gajim.account_is_disconnected(self.account):
-- 
GitLab