Skip to content
Snippets Groups Projects
Commit 330ebb9c authored by nkour's avatar nkour
Browse files

use the blinking when systray holds pending events [only new api/only in windows atm]

parent 12c5820a
No related branches found
No related tags found
No related merge requests found
data/iconsets/transports/msn/32x32/offline.png

1.82 KiB | W: | H:

data/iconsets/transports/msn/32x32/offline.png

1.83 KiB | W: | H:

data/iconsets/transports/msn/32x32/offline.png
data/iconsets/transports/msn/32x32/offline.png
data/iconsets/transports/msn/32x32/offline.png
data/iconsets/transports/msn/32x32/offline.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -219,7 +219,7 @@ class Events:
return first_account, first_jid, first_event
def get_nb_systray_events(self, types = []):
'''returns the number of events displayedin roster'''
'''returns the number of events displayed in roster'''
return self._get_nb_events(attribute = 'systray', types = types)
def get_systray_events(self):
......
......@@ -26,8 +26,6 @@ class StatusIcon(systray.Systray):
#NOTE: gtk api does NOT allow:
# leave, enter motion notify
# and can't do cool tooltips we use
# and we could use blinking instead of unsupported animation
# or we could emulate animation by every foo ms chaning the image
def __init__(self):
systray.Systray.__init__(self)
self.status_icon = gtk.StatusIcon()
......@@ -55,9 +53,12 @@ class StatusIcon(systray.Systray):
text = helpers.get_notification_icon_tooltip_text()
self.status_icon.set_tooltip(text)
if gajim.events.get_nb_systray_events():
state = 'message'
state = 'message' # FIXME: this state should be called event, not message
self.status_icon.props.blinking = True
else:
state = self.status
self.status_icon.props.blinking = False
#FIXME: do not always use 16x16 (ask actually used size and use that)
image = gajim.interface.roster.jabber_state_images['16'][state]
if image.get_storage_type() == gtk.IMAGE_PIXBUF:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment