Always use gtkgui_helpers.set_unset_urgency_hint to toggle urgency
This commit is contained in:
parent
b0f4dd6d8e
commit
0650f0e493
|
@ -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]
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue