# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1607128465 0 # Node ID 0b6e1b5c8b5eb98f6b3e2e276c9c0772049042ec # Parent 3343ae3ac327e09e43d6af24fc4bbe0e3e6d920e 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. diff -r 3343ae3ac327 -r 0b6e1b5c8b5e gtk/dw.c --- a/gtk/dw.c Fri Dec 04 23:56:11 2020 +0000 +++ b/gtk/dw.c Sat Dec 05 00:34:25 2020 +0000 @@ -12460,6 +12460,7 @@ g_notification_set_body(notification, outbuf); } +#if GLIB_CHECK_VERSION(2,52,0) if(imagepath) { GFile *file = g_file_new_for_path(imagepath); @@ -12473,6 +12474,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)); } diff -r 3343ae3ac327 -r 0b6e1b5c8b5e gtk3/dw.c --- 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)); }