add a use_urgency_hit option

This commit is contained in:
Yann Leboulanger 2005-12-28 22:30:41 +00:00
parent ff7aa9b765
commit 9abc57d0ae
2 changed files with 3 additions and 1 deletions

View File

@ -172,6 +172,7 @@ class Config:
'restored_messages_color': [opt_str, 'grey'],
'hide_avatar_of_transport': [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 = {

View File

@ -264,7 +264,8 @@ def parse_server_xml(path_to_file):
def set_unset_urgency_hint(window, unread_messages_no):
'''sets/unsets urgency hint in window argument
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:
window.props.urgency_hint = True
else: