From 2e06ec6d7e423961953f599c410ec187c5b8cd77 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 3 May 2006 13:22:05 +0000 Subject: [PATCH] new ACE option: print_status_in_muc. Fixes #1502 --- src/chat_control.py | 2 ++ src/common/config.py | 4 ++-- src/conversation_textview.py | 2 -- src/groupchat_control.py | 2 ++ 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/chat_control.py b/src/chat_control.py index 5b00b4368..9ec0350cb 100644 --- a/src/chat_control.py +++ b/src/chat_control.py @@ -1067,6 +1067,8 @@ class ChatControl(ChatControlBase): jid = contact.jid if frm == 'status': + if not gajim.config.get('print_status_in_chats'): + return kind = 'status' name = '' elif frm == 'info': diff --git a/src/common/config.py b/src/common/config.py index 23a184b74..264a65bab 100644 --- a/src/common/config.py +++ b/src/common/config.py @@ -180,8 +180,8 @@ class Config: 'show_status_msgs_in_roster': [opt_bool, True, _('If True, Gajim will display the status message, if not empty, for every contact under the contact name in roster window'), True], 'show_avatars_in_roster': [opt_bool, True, '', True], 'ask_avatars_on_startup': [opt_bool, True, _('If True, Gajim will ask for avatar each contact that did not have an avatar last time or has one cached that is too old.')], - #FIXME: remove you and make it Gajim will not; and/or his or *her* status messages - 'print_status_in_chats': [opt_bool, True, _('If False, you will no longer see status line in chats when a contact changes his or her status and/or his status message.')], + 'print_status_in_chats': [opt_bool, True, _('If False, Gajim will no longer print status line in chats when a contact changes his or her status and/or his or her status message.')], + 'print_status_in_muc': [opt_bool, True, _('If False, Gajim will no longer print status line in groupchats when a member changes his or her status and/or his or her status message.')], 'log_contact_status_changes': [opt_bool, False], 'restored_messages_color': [opt_str, 'grey'], 'hide_avatar_of_transport': [opt_bool, False], diff --git a/src/conversation_textview.py b/src/conversation_textview.py index 3faed1609..325343fdd 100644 --- a/src/conversation_textview.py +++ b/src/conversation_textview.py @@ -569,8 +569,6 @@ class ConversationTextview: other_tags_for_name = [], other_tags_for_time = [], other_tags_for_text = [], subject = None): '''prints 'chat' type messages''' - if kind == 'status' and not gajim.config.get('print_status_in_chats'): - return # kind = info, we print things as if it was a status: same color, ... if kind == 'info': kind = 'status' diff --git a/src/groupchat_control.py b/src/groupchat_control.py index 3838950d5..9d148ec60 100644 --- a/src/groupchat_control.py +++ b/src/groupchat_control.py @@ -505,6 +505,8 @@ class GroupchatControl(ChatControlBase): # muc-specific chatstate self.parent_win.redraw_tab(self, 'newmsg') else: + if not gajim.config.get('print_status_in_muc'): + return kind = 'status' if kind == 'incoming': # it's a message NOT from us