[gnome-flashback] notifications: rename icon to app_icon and remove unused function



commit 1ff9311332a1b86beaa27848df926d2b99846cd4
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Thu Jan 2 21:08:48 2020 +0200

    notifications: rename icon to app_icon and remove unused function

 gnome-flashback/libnotifications/nd-notification.c | 24 ++++++++--------------
 gnome-flashback/libnotifications/nd-notification.h |  3 +--
 2 files changed, 9 insertions(+), 18 deletions(-)
---
diff --git a/gnome-flashback/libnotifications/nd-notification.c 
b/gnome-flashback/libnotifications/nd-notification.c
index 5827b2f..bbf3e1f 100644
--- a/gnome-flashback/libnotifications/nd-notification.c
+++ b/gnome-flashback/libnotifications/nd-notification.c
@@ -45,7 +45,7 @@ struct _NdNotification {
         char         *sender;
         guint32       id;
         char         *app_name;
-        char         *icon;
+        char         *app_icon;
         char         *summary;
         char         *body;
         char        **actions;
@@ -234,7 +234,7 @@ nd_notification_init (NdNotification *notification)
         notification->id = get_next_notification_serial ();
 
         notification->app_name = NULL;
-        notification->icon = NULL;
+        notification->app_icon = NULL;
         notification->summary = NULL;
         notification->body = NULL;
         notification->actions = NULL;
@@ -253,7 +253,7 @@ nd_notification_finalize (GObject *object)
 
         g_free (notification->sender);
         g_free (notification->app_name);
-        g_free (notification->icon);
+        g_free (notification->app_icon);
         g_free (notification->summary);
         g_free (notification->body);
         g_strfreev (notification->actions);
@@ -269,7 +269,7 @@ nd_notification_finalize (GObject *object)
 gboolean
 nd_notification_update (NdNotification     *notification,
                         const gchar        *app_name,
-                        const gchar        *icon,
+                        const gchar        *app_icon,
                         const gchar        *summary,
                         const gchar        *body,
                         const gchar *const *actions,
@@ -284,8 +284,8 @@ nd_notification_update (NdNotification     *notification,
         g_free (notification->app_name);
         notification->app_name = g_strdup (app_name);
 
-        g_free (notification->icon);
-        notification->icon = g_strdup (icon);
+        g_free (notification->app_icon);
+        notification->app_icon = g_strdup (app_icon);
 
         g_free (notification->summary);
         notification->summary = g_strdup (summary);
@@ -448,14 +448,6 @@ nd_notification_get_body (NdNotification *notification)
         return notification->body;
 }
 
-const char *
-nd_notification_get_icon (NdNotification *notification)
-{
-        g_return_val_if_fail (ND_IS_NOTIFICATION (notification), NULL);
-
-        return notification->icon;
-}
-
 int
 nd_notification_get_timeout (NdNotification *notification)
 {
@@ -641,8 +633,8 @@ nd_notification_load_image (NdNotification *notification,
                 } else {
                         g_warning ("Expected image_path hint to be of type string");
                 }
-        } else if (*notification->icon != '\0') {
-                pixbuf = _notify_daemon_pixbuf_from_path (notification->icon, size);
+        } else if (*notification->app_icon != '\0') {
+                pixbuf = _notify_daemon_pixbuf_from_path (notification->app_icon, size);
         } else if ((data = (GVariant *) g_hash_table_lookup (notification->hints, "icon_data"))) {
                 g_warning("\"icon_data\" hint is deprecated, please use \"image_data\" instead");
                 pixbuf = _notify_daemon_pixbuf_from_data_hint (data, size);
diff --git a/gnome-flashback/libnotifications/nd-notification.h 
b/gnome-flashback/libnotifications/nd-notification.h
index 1ef341a..3cf5249 100644
--- a/gnome-flashback/libnotifications/nd-notification.h
+++ b/gnome-flashback/libnotifications/nd-notification.h
@@ -47,7 +47,7 @@ GType                 nd_notification_get_type            (void) G_GNUC_CONST;
 NdNotification *      nd_notification_new                 (const char     *sender);
 gboolean              nd_notification_update              (NdNotification     *notification,
                                                            const gchar        *app_name,
-                                                           const gchar        *icon,
+                                                           const gchar        *app_icon,
                                                            const gchar        *summary,
                                                            const gchar        *body,
                                                            const gchar *const *actions,
@@ -65,7 +65,6 @@ guint                 nd_notification_get_id              (NdNotification *notif
 int                   nd_notification_get_timeout         (NdNotification *notification);
 const char *          nd_notification_get_sender          (NdNotification *notification);
 const char *          nd_notification_get_app_name        (NdNotification *notification);
-const char *          nd_notification_get_icon            (NdNotification *notification);
 const char *          nd_notification_get_summary         (NdNotification *notification);
 const char *          nd_notification_get_body            (NdNotification *notification);
 char **               nd_notification_get_actions         (NdNotification *notification);


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