summaryrefslogtreecommitdiff
path: root/src/daemon/daemon.c
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-03-25 13:01:14 +0100
committerraveit65 <[email protected]>2021-04-03 14:44:00 +0200
commit2335bf9e46fe4f37cc0b162d9c37c59ae1c17925 (patch)
tree11552bd09c4722a49e17ed7a4544df03459c5938 /src/daemon/daemon.c
parent9e3ec7d1ff7b963232d02766e42c766582eeeaad (diff)
downloadmate-notification-daemon-2335bf9e46fe4f37cc0b162d9c37c59ae1c17925.tar.bz2
mate-notification-daemon-2335bf9e46fe4f37cc0b162d9c37c59ae1c17925.tar.xz
daemon: g_memdup is dreprecated from glib 2.68
Diffstat (limited to 'src/daemon/daemon.c')
-rw-r--r--src/daemon/daemon.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c
index d3b3c65..2eaeaaa 100644
--- a/src/daemon/daemon.c
+++ b/src/daemon/daemon.c
@@ -909,7 +909,11 @@ static NotifyTimeout* _store_notification(NotifyDaemon* daemon, GtkWindow* nw, i
_calculate_timeout(daemon, nt, timeout);
+#if GLIB_CHECK_VERSION (2, 68, 0)
+ g_hash_table_insert(daemon->notification_hash, g_memdup2(&id, sizeof(guint)), nt);
+#else
g_hash_table_insert(daemon->notification_hash, g_memdup(&id, sizeof(guint)), nt);
+#endif
remove_exit_timeout(daemon);
return nt;
@@ -950,8 +954,11 @@ static GdkPixbuf * _notify_daemon_pixbuf_from_data_hint (GVariant *icon_data)
}
data_size = g_variant_get_size (data_variant);
+#if GLIB_CHECK_VERSION (2, 68, 0)
+ data = (guchar *) g_memdup2 (g_variant_get_data (data_variant), data_size);
+#else
data = (guchar *) g_memdup (g_variant_get_data (data_variant), (guint) data_size);
-
+#endif
pixbuf = gdk_pixbuf_new_from_data (data,
GDK_COLORSPACE_RGB,
has_alpha,