Author: asterix Date: 2008-02-27 22:33:50 +0100 (Wed, 27 Feb 2008) New Revision: 9344
Modified: trunk/src/chat_control.py trunk/src/notify.py Log: don't always show events in systray when notify_on_all_muc_mesages is False
Modified: trunk/src/chat_control.py =================================================================== --- trunk/src/chat_control.py 2008-02-27 18:25:42 UTC (rev 9343) +++ trunk/src/chat_control.py 2008-02-27 21:33:50 UTC (rev 9344) @@ -685,7 +685,7 @@ show_in_roster = notify.get_show_in_roster(event, self.account, self.contact) show_in_systray = notify.get_show_in_systray(event, - self.account, self.contact) + self.account, self.contact, type_) event = gajim.events.create_event(type_, None, show_in_roster = show_in_roster, show_in_systray = show_in_systray)
Modified: trunk/src/notify.py =================================================================== --- trunk/src/notify.py 2008-02-27 18:25:42 UTC (rev 9343) +++ trunk/src/notify.py 2008-02-27 21:33:50 UTC (rev 9344) @@ -70,7 +70,7 @@ return False return True
-def get_show_in_systray(event, account, contact): +def get_show_in_systray(event, account, contact, type_=None): '''Return True if this event must be shown in systray, else False''' num = get_advanced_notification(event, account, contact) if num != None: @@ -78,6 +78,10 @@ return True if gajim.config.get_per('notifications', str(num), 'systray') == 'no': return False + if type_ == 'printed_gc_msg' and not gajim.config.get( + 'notify_on_all_muc_messages'): + # it's not an highlighted message, don't show in systray + return False return gajim.config.get('trayicon_notification_on_events')
def get_advanced_notification(event, account, contact):