]> git.0d.be Git - empathy.git/commitdiff
Stop using deprecated API from libnotify (#653739)
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Thu, 30 Jun 2011 12:58:35 +0000 (14:58 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Thu, 30 Jun 2011 12:58:35 +0000 (14:58 +0200)
src/empathy-notifications-approver.c

index 4d795108720476f0305ba9a8fca80d55c07a407b..aa46308493d4526d0da5f4f3d3e066c159624023 100644 (file)
@@ -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);
     }