diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2009-01-31 01:08:29 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2009-01-31 01:08:29 +0800 |
commit | 969df6cdc59df3e57c8c1619bd9a197124939c2d (patch) | |
tree | 811af868c2c3536ce320d2208a2b97fb2eb622be /src/empathy-status-icon.c | |
parent | 885555ee46acc4f4fe96b04b554ee3a0f2ae4baa (diff) | |
download | gsoc2013-empathy-969df6cdc59df3e57c8c1619bd9a197124939c2d.tar gsoc2013-empathy-969df6cdc59df3e57c8c1619bd9a197124939c2d.tar.gz gsoc2013-empathy-969df6cdc59df3e57c8c1619bd9a197124939c2d.tar.bz2 gsoc2013-empathy-969df6cdc59df3e57c8c1619bd9a197124939c2d.tar.lz gsoc2013-empathy-969df6cdc59df3e57c8c1619bd9a197124939c2d.tar.xz gsoc2013-empathy-969df6cdc59df3e57c8c1619bd9a197124939c2d.tar.zst gsoc2013-empathy-969df6cdc59df3e57c8c1619bd9a197124939c2d.zip |
Factor out some common code.
svn path=/trunk/; revision=2302
Diffstat (limited to 'src/empathy-status-icon.c')
-rw-r--r-- | src/empathy-status-icon.c | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/src/empathy-status-icon.c b/src/empathy-status-icon.c index 197b22401..d19075318 100644 --- a/src/empathy-status-icon.c +++ b/src/empathy-status-icon.c @@ -101,7 +101,7 @@ status_icon_notification_closed_cb (NotifyNotification *notification, /* the notification has been closed by the user, see the * DesktopNotification spec. */ - if (reason == 2) { + if (reason == NOTIFICATION_CLOSED_DISMISSED) { g_idle_add ((GSourceFunc) activate_event, priv->event); } else { /* inhibit other updates for this event */ @@ -109,24 +109,6 @@ status_icon_notification_closed_cb (NotifyNotification *notification, } } -static GdkPixbuf * -get_pixbuf_for_event (EmpathyEvent *event) -{ - GdkPixbuf *pixbuf = NULL; - - if (event->contact != NULL) { - pixbuf = empathy_pixbuf_avatar_from_contact_scaled (event->contact, - 48, 48); - } - - if (!pixbuf) { - pixbuf = empathy_pixbuf_from_icon_name_sized - (event->icon_name, 48); - } - - return pixbuf; -} - static void notification_close_helper (EmpathyStatusIconPriv *priv) { @@ -150,7 +132,8 @@ status_icon_update_notification (EmpathyStatusIcon *icon) } if (priv->event) { - pixbuf = get_pixbuf_for_event (priv->event); + pixbuf = empathy_misc_get_pixbuf_for_notification (priv->event->contact, + priv->event->icon_name); if (priv->notification) { notify_notification_update (priv->notification, |