gajim
changeset 13943:fe49adb8ec1c
[Darlan and I].added the ability to restore the old tray icon (envelope).'trayicon_blink' in the ACE. Fixes #7176
| author | Fomin Denis <fominde@gmail.com> |
|---|---|
| date | Tue, 14 Aug 2012 22:36:16 +0400 |
| parents | d0cfa7938e57 |
| children | ee8ea17504e2 |
| files | src/common/config.py src/statusicon.py |
| diffstat | 2 files changed, 18 insertions(+), 9 deletions(-) [+] |
line diff
1.1 --- a/src/common/config.py Sun Aug 12 22:04:20 2012 +0400 1.2 +++ b/src/common/config.py Tue Aug 14 22:36:16 2012 +0400 1.3 @@ -207,6 +207,7 @@ 1.4 'use_kib_mib': [opt_bool, False, _('IEC standard says KiB = 1024 bytes, KB = 1000 bytes.')], 1.5 'notify_on_all_muc_messages': [opt_bool, False], 1.6 'trayicon_notification_on_events': [opt_bool, True, _('Notify of events in the notification area.')], 1.7 + '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.')], 1.8 'last_save_dir': [opt_str, ''], 1.9 'last_send_dir': [opt_str, ''], 1.10 'last_emoticons_dir': [opt_str, ''],
2.1 --- a/src/statusicon.py Sun Aug 12 22:04:20 2012 +0400 2.2 +++ b/src/statusicon.py Tue Aug 14 22:36:16 2012 +0400 2.3 @@ -129,13 +129,28 @@ 2.4 """ 2.5 Apart from image, we also update tooltip text here 2.6 """ 2.7 + def really_set_img(): 2.8 + if image.get_storage_type() == gtk.IMAGE_PIXBUF: 2.9 + self.status_icon.set_from_pixbuf(image.get_pixbuf()) 2.10 + # FIXME: oops they forgot to support GIF animation? 2.11 + # or they were lazy to get it to work under Windows! WTF! 2.12 + elif image.get_storage_type() == gtk.IMAGE_ANIMATION: 2.13 + self.status_icon.set_from_pixbuf( 2.14 + image.get_animation().get_static_image()) 2.15 + # self.status_icon.set_from_animation(image.get_animation()) 2.16 + 2.17 if not gajim.interface.systray_enabled: 2.18 return 2.19 if gajim.config.get('trayicon') == 'always': 2.20 self.status_icon.set_visible(True) 2.21 if gajim.events.get_nb_systray_events(): 2.22 self.status_icon.set_visible(True) 2.23 - self.status_icon.set_blinking(True) 2.24 + if gajim.config.get('trayicon_blink'): 2.25 + self.status_icon.set_blinking(True) 2.26 + else: 2.27 + image = gtkgui_helpers.load_icon('event') 2.28 + really_set_img() 2.29 + return 2.30 else: 2.31 if gajim.config.get('trayicon') == 'on_event': 2.32 self.status_icon.set_visible(False) 2.33 @@ -143,14 +158,7 @@ 2.34 2.35 image = gajim.interface.jabber_state_images[self.statusicon_size][ 2.36 self.status] 2.37 - if image.get_storage_type() == gtk.IMAGE_PIXBUF: 2.38 - self.status_icon.set_from_pixbuf(image.get_pixbuf()) 2.39 - # FIXME: oops they forgot to support GIF animation? 2.40 - # or they were lazy to get it to work under Windows! WTF! 2.41 - elif image.get_storage_type() == gtk.IMAGE_ANIMATION: 2.42 - self.status_icon.set_from_pixbuf( 2.43 - image.get_animation().get_static_image()) 2.44 - # self.img_tray.set_from_animation(image.get_animation()) 2.45 + really_set_img() 2.46 2.47 def change_status(self, global_status): 2.48 """
