Always use gtkgui_helpers.set_unset_urgency_hint to toggle urgency

This commit is contained in:
Travis Shirk 2006-01-23 00:03:28 +00:00
parent b0f4dd6d8e
commit 0650f0e493
2 changed files with 4 additions and 6 deletions

View File

@ -97,9 +97,7 @@ class MessageWindow:
# window received focus, so if we had urgency REMOVE IT # 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) # NOTE: we do not have to read the message (it maybe in a bg tab)
# to remove urgency hint so this functions does that # to remove urgency hint so this functions does that
if gtk.gtk_version >= (2, 8, 0) and gtk.pygtk_version >= (2, 8, 0): gtkgui_helpers.set_unset_urgency_hint(self.window, False)
if widget.props.urgency_hint:
widget.props.urgency_hint = False
ctrl = self.get_active_control() ctrl = self.get_active_control()
if ctrl: if ctrl:
@ -208,6 +206,8 @@ class MessageWindow:
if urgent: if urgent:
gtkgui_helpers.set_unset_urgency_hint(self.window, unread) 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): def set_active_tab(self, jid):
ctrl = self._controls[jid] ctrl = self._controls[jid]

View File

@ -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 # roster received focus, so if we had urgency REMOVE IT
# NOTE: we do not have to read the message to remove urgency # NOTE: we do not have to read the message to remove urgency
# so this functions does that # so this functions does that
if gtk.gtk_version >= (2, 8, 0) and gtk.pygtk_version >= (2, 8, 0): gtkgui_helpers.set_unset_urgency_hint(widget, False)
if widget.props.urgency_hint:
widget.props.urgency_hint = False
# if a contact row is selected, update colors (eg. for status msg) # if a contact row is selected, update colors (eg. for status msg)
# because gtk engines may differ in bg when window is selected # because gtk engines may differ in bg when window is selected