[empathy] Stop using deprecated API from libnotify (#653739)



commit 00b7ca3a4147cffe757d0fa59bab4c597f2a6991
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Thu Jun 30 14:58:35 2011 +0200

    Stop using deprecated API from libnotify (#653739)

 src/empathy-notifications-approver.c |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/src/empathy-notifications-approver.c b/src/empathy-notifications-approver.c
index 4d79510..aa46308 100644
--- a/src/empathy-notifications-approver.c
+++ b/src/empathy-notifications-approver.c
@@ -380,9 +380,11 @@ update_notification (EmpathyNotificationsApprover *self)
           NOTIFY_EXPIRES_DEFAULT);
 
       if (has_x_canonical_append)
-        /* We have to set a not empty string to keep libnotify happy */
-        notify_notification_set_hint_string (notification,
-            EMPATHY_NOTIFY_MANAGER_CAP_X_CANONICAL_APPEND, "1");
+        {
+          notify_notification_set_hint (notification,
+              EMPATHY_NOTIFY_MANAGER_CAP_X_CANONICAL_APPEND,
+              g_variant_new_boolean (TRUE));
+        }
 
       if (empathy_notify_manager_has_capability (self->priv->notify_mgr,
             EMPATHY_NOTIFY_MANAGER_CAP_ACTIONS))
@@ -393,8 +395,11 @@ update_notification (EmpathyNotificationsApprover *self)
 
       category = get_category_for_event_type (self->priv->event->type);
       if (category != NULL)
-        notify_notification_set_hint_string (notification,
-            EMPATHY_NOTIFY_MANAGER_CAP_CATEGORY, category);
+        {
+          notify_notification_set_hint (notification,
+              EMPATHY_NOTIFY_MANAGER_CAP_CATEGORY,
+              g_variant_new_string (category));
+        }
     }
 
   pixbuf = empathy_notify_manager_get_pixbuf_for_notification (
@@ -403,7 +408,7 @@ update_notification (EmpathyNotificationsApprover *self)
 
   if (pixbuf != NULL)
     {
-      notify_notification_set_icon_from_pixbuf (notification, pixbuf);
+      notify_notification_set_image_from_pixbuf (notification, pixbuf);
       g_object_unref (pixbuf);
     }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]