[Darlan and I].added the ability to restore the old tray icon (envelope).'trayicon_blink' in the ACE. Fixes #7176

This commit is contained in:
Denis Fomin 2012-08-14 22:36:16 +04:00
parent 2959ca91a2
commit 3b860457ef
2 changed files with 18 additions and 9 deletions

View File

@ -207,6 +207,7 @@ class Config:
'use_kib_mib': [opt_bool, False, _('IEC standard says KiB = 1024 bytes, KB = 1000 bytes.')],
'notify_on_all_muc_messages': [opt_bool, False],
'trayicon_notification_on_events': [opt_bool, True, _('Notify of events in the notification area.')],
'trayicon_blink': [opt_bool, True, _('If False, Gajim will display a static event icon instead of the blinking status icon in the notification area when notifying on event.')],
'last_save_dir': [opt_str, ''],
'last_send_dir': [opt_str, ''],
'last_emoticons_dir': [opt_str, ''],

View File

@ -129,13 +129,28 @@ class StatusIcon:
"""
Apart from image, we also update tooltip text here
"""
def really_set_img():
if image.get_storage_type() == gtk.IMAGE_PIXBUF:
self.status_icon.set_from_pixbuf(image.get_pixbuf())
# FIXME: oops they forgot to support GIF animation?
# or they were lazy to get it to work under Windows! WTF!
elif image.get_storage_type() == gtk.IMAGE_ANIMATION:
self.status_icon.set_from_pixbuf(
image.get_animation().get_static_image())
# self.status_icon.set_from_animation(image.get_animation())
if not gajim.interface.systray_enabled:
return
if gajim.config.get('trayicon') == 'always':
self.status_icon.set_visible(True)
if gajim.events.get_nb_systray_events():
self.status_icon.set_visible(True)
self.status_icon.set_blinking(True)
if gajim.config.get('trayicon_blink'):
self.status_icon.set_blinking(True)
else:
image = gtkgui_helpers.load_icon('event')
really_set_img()
return
else:
if gajim.config.get('trayicon') == 'on_event':
self.status_icon.set_visible(False)
@ -143,14 +158,7 @@ class StatusIcon:
image = gajim.interface.jabber_state_images[self.statusicon_size][
self.status]
if image.get_storage_type() == gtk.IMAGE_PIXBUF:
self.status_icon.set_from_pixbuf(image.get_pixbuf())
# FIXME: oops they forgot to support GIF animation?
# or they were lazy to get it to work under Windows! WTF!
elif image.get_storage_type() == gtk.IMAGE_ANIMATION:
self.status_icon.set_from_pixbuf(
image.get_animation().get_static_image())
# self.img_tray.set_from_animation(image.get_animation())
really_set_img()
def change_status(self, global_status):
"""