add a use_urgency_hit option
This commit is contained in:
parent
ff7aa9b765
commit
9abc57d0ae
|
@ -172,6 +172,7 @@ class Config:
|
||||||
'restored_messages_color': [opt_str, 'grey'],
|
'restored_messages_color': [opt_str, 'grey'],
|
||||||
'hide_avatar_of_transport': [opt_bool, False],
|
'hide_avatar_of_transport': [opt_bool, False],
|
||||||
'roster_window_skip_taskbar': [opt_bool, False],
|
'roster_window_skip_taskbar': [opt_bool, False],
|
||||||
|
'use_urgency_hit': [opt_bool, True, _('If True and installed GTK / PyGTK version are at least 2.8, use urgency hit')],
|
||||||
}
|
}
|
||||||
|
|
||||||
__options_per_key = {
|
__options_per_key = {
|
||||||
|
|
|
@ -264,7 +264,8 @@ def parse_server_xml(path_to_file):
|
||||||
def set_unset_urgency_hint(window, unread_messages_no):
|
def set_unset_urgency_hint(window, unread_messages_no):
|
||||||
'''sets/unsets urgency hint in window argument
|
'''sets/unsets urgency hint in window argument
|
||||||
depending if we have unread messages or not'''
|
depending if we have unread messages or not'''
|
||||||
if gtk.gtk_version >= (2, 8, 0) and gtk.pygtk_version >= (2, 8, 0):
|
if gtk.gtk_version >= (2, 8, 0) and gtk.pygtk_version >= (2, 8, 0) and \
|
||||||
|
gajim.config.get('use_urgency_hit'):
|
||||||
if unread_messages_no > 0:
|
if unread_messages_no > 0:
|
||||||
window.props.urgency_hint = True
|
window.props.urgency_hint = True
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue