Mercurial > dwindows
diff gtk3/dw.c @ 2209:0b6e1b5c8b5e
GTK: Fix building with glib versions 2.40 to 2.51.
Notifications are supported starting with 2.40, but the image requires 2.52.
This disables the image unless building with 2.52 or higher.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sat, 05 Dec 2020 00:34:25 +0000 |
parents | 3343ae3ac327 |
children | 7677e1083d07 |
line wrap: on
line diff
--- a/gtk3/dw.c Fri Dec 04 23:56:11 2020 +0000 +++ b/gtk3/dw.c Sat Dec 05 00:34:25 2020 +0000 @@ -11125,6 +11125,7 @@ g_notification_set_body(notification, outbuf); } +#if GLIB_CHECK_VERSION(2,52,0) if(imagepath) { GFile *file = g_file_new_for_path(imagepath); @@ -11138,6 +11139,7 @@ g_notification_set_icon(notification, G_ICON(icon)); } } +#endif g_notification_set_default_action_and_target(notification, "app.notification", "t", (guint64)DW_POINTER_TO_ULONGLONG(notification)); }