From 9c9a7efd6d640210c89ed48416c31a9df0eecdf4 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Tue, 7 Feb 2006 13:31:20 +0000 Subject: [PATCH] make configure_room unsensitive when we can't configure anything --- src/groupchat_control.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/groupchat_control.py b/src/groupchat_control.py index 7dd4efca6..ae0deb5e9 100644 --- a/src/groupchat_control.py +++ b/src/groupchat_control.py @@ -292,13 +292,14 @@ class GroupchatControl(ChatControlBase): def prepare_context_menu(self): '''sets compact view menuitem active state - sets active and sensitivity state for toggle_gpg_menuitem - and remove possible 'Switch to' menuitems''' + sets sensitivity state for configure_room''' menu = self.gc_popup_menu childs = menu.get_children() # compact_view_menuitem childs[5].set_active(self.compact_view_current) - menu = self.remove_possible_switch_to_menuitems(menu) + c = gajim.contacts.get_gc_contact(self.account, self.room_jid, self.nick) + if c.affiliation not in ('owner', 'admin'): + childs[1].set_sensitive(False) return menu def on_message(self, nick, msg, tim):