changeset fe49adb8ec1c in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=fe49adb8ec1c description: [Darlan and I].added the ability to restore the old tray icon (envelope).'trayicon_blink' in the ACE. Fixes #7176
diffstat:
src/common/config.py | 1 + src/statusicon.py | 26 +++++++++++++++++--------- 2 files changed, 18 insertions(+), 9 deletions(-)
diffs (60 lines):
diff -r d0cfa7938e57 -r fe49adb8ec1c src/common/config.py --- a/src/common/config.py Sun Aug 12 22:04:20 2012 +0400 +++ b/src/common/config.py Tue Aug 14 22:36:16 2012 +0400 @@ -207,6 +207,7 @@ '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, ''], diff -r d0cfa7938e57 -r fe49adb8ec1c src/statusicon.py --- a/src/statusicon.py Sun Aug 12 22:04:20 2012 +0400 +++ b/src/statusicon.py Tue Aug 14 22:36:16 2012 +0400 @@ -129,13 +129,28 @@ """ 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 @@
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): """