diff --git a/src/message_window.py b/src/message_window.py index 2d8f187a2..ea79c55ed 100644 --- a/src/message_window.py +++ b/src/message_window.py @@ -97,9 +97,7 @@ class MessageWindow: # window received focus, so if we had urgency REMOVE IT # NOTE: we do not have to read the message (it maybe in a bg tab) # to remove urgency hint so this functions does that - if gtk.gtk_version >= (2, 8, 0) and gtk.pygtk_version >= (2, 8, 0): - if widget.props.urgency_hint: - widget.props.urgency_hint = False + gtkgui_helpers.set_unset_urgency_hint(self.window, False) ctrl = self.get_active_control() if ctrl: @@ -208,6 +206,8 @@ class MessageWindow: if urgent: gtkgui_helpers.set_unset_urgency_hint(self.window, unread) + else: + gtkgui_helpers.set_unset_urgency_hint(self.window, False) def set_active_tab(self, jid): ctrl = self._controls[jid] diff --git a/src/roster_window.py b/src/roster_window.py index 8163404b2..bd5111dc9 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -1910,9 +1910,7 @@ _('If "%s" accepts this request you will know his or her status.') % jid) # roster received focus, so if we had urgency REMOVE IT # NOTE: we do not have to read the message to remove urgency # so this functions does that - if gtk.gtk_version >= (2, 8, 0) and gtk.pygtk_version >= (2, 8, 0): - if widget.props.urgency_hint: - widget.props.urgency_hint = False + gtkgui_helpers.set_unset_urgency_hint(widget, False) # if a contact row is selected, update colors (eg. for status msg) # because gtk engines may differ in bg when window is selected