aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-status-icon.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2009-01-31 01:07:04 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2009-01-31 01:07:04 +0800
commit60f7a0a0e0da33647710236f5c23295cf17271e2 (patch)
tree55f9319c8570531aa52b5bcca9658e05065f03f0 /src/empathy-status-icon.c
parentc207d996572b2a0bb16556815ddbd97f6a777b94 (diff)
downloadgsoc2013-empathy-60f7a0a0e0da33647710236f5c23295cf17271e2.tar
gsoc2013-empathy-60f7a0a0e0da33647710236f5c23295cf17271e2.tar.gz
gsoc2013-empathy-60f7a0a0e0da33647710236f5c23295cf17271e2.tar.bz2
gsoc2013-empathy-60f7a0a0e0da33647710236f5c23295cf17271e2.tar.lz
gsoc2013-empathy-60f7a0a0e0da33647710236f5c23295cf17271e2.tar.xz
gsoc2013-empathy-60f7a0a0e0da33647710236f5c23295cf17271e2.tar.zst
gsoc2013-empathy-60f7a0a0e0da33647710236f5c23295cf17271e2.zip
Insert an image in the notify baloon.
svn path=/trunk/; revision=2276
Diffstat (limited to 'src/empathy-status-icon.c')
-rw-r--r--src/empathy-status-icon.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/empathy-status-icon.c b/src/empathy-status-icon.c
index 738b7b926..1951e419f 100644
--- a/src/empathy-status-icon.c
+++ b/src/empathy-status-icon.c
@@ -106,12 +106,29 @@ status_icon_update_notification (EmpathyStatusIcon *icon)
EmpathyStatusIconPriv *priv = GET_PRIV (icon);
if (priv->event) {
+ GdkPixbuf *pixbuf = NULL;
+
+ if (g_strcmp0 (priv->event->icon_name, EMPATHY_IMAGE_NEW_MESSAGE) == 0) {
+ pixbuf = empathy_pixbuf_avatar_from_contact_scaled (priv->event->contact,
+ 48, 48);
+ }
+
+ if (!pixbuf) {
+ /* we use INVALID here so we fall pack to 48px */
+ pixbuf = empathy_pixbuf_from_icon_name (priv->event->icon_name,
+ GTK_ICON_SIZE_INVALID);
+ }
+
priv->notification = notify_notification_new_with_status_icon
- ("New Event", priv->event->message, priv->event->icon_name, priv->icon);
+ (priv->event->header, priv->event->message, NULL, priv->icon);
notify_notification_set_timeout (priv->notification,
NOTIFY_EXPIRES_DEFAULT);
+ notify_notification_set_icon_from_pixbuf (priv->notification,
+ pixbuf);
+
g_signal_connect (priv->notification, "closed",
- G_CALLBACK (status_icon_notification_closed_cb), icon);
+ G_CALLBACK (status_icon_notification_closed_cb), icon);
+
notify_notification_show (priv->notification, NULL);
} else {
if (priv->notification) {