From b58a76d8ee6d0cface5e608592d3f26d6ee5da73 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 6 May 2015 22:05:42 +0200 Subject: [PATCH] make urgency hint work correctly in one message window mode. Fixes #7806 --- src/roster_window.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/roster_window.py b/src/roster_window.py index e63a0a900..4bda87722 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -5004,15 +5004,7 @@ class RosterWindow: if not change_title_allowed: return - if gajim.config.get('one_message_window') == 'always_with_roster': - # always_with_roster mode defers to the MessageWindow - if not gajim.interface.msg_win_mgr.one_window_opened(): - # No MessageWindow to defer to - self.window.set_title('Gajim') - return - nb_unread = 0 - start = '' for account in gajim.connections: # Count events in roster title only if we don't auto open them if not helpers.allow_popup_window(account): @@ -5020,6 +5012,17 @@ class RosterWindow: 'file-request', 'file-error', 'file-completed', 'file-request-error', 'file-send-error', 'file-stopped', 'printed_chat'], account) + + + if gajim.config.get('one_message_window') == 'always_with_roster': + # always_with_roster mode defers to the MessageWindow + if not gajim.interface.msg_win_mgr.one_window_opened(): + # No MessageWindow to defer to + self.window.set_title('Gajim') + gtkgui_helpers.set_unset_urgency_hint(self.window, nb_unread) + return + + start = '' if nb_unread > 1: start = '[' + str(nb_unread) + '] ' elif nb_unread == 1: