comparison gtk3/dw.c @ 2115:79e5842fb609

GTK: Fixes for building with GTK after the notification image changes.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 23 Jun 2020 08:13:24 +0000
parents 251d050d306b
children 37060de79102
comparison
equal deleted inserted replaced
2114:251d050d306b 2115:79e5842fb609
11088 vsnprintf(outbuf, 1024, description, args); 11088 vsnprintf(outbuf, 1024, description, args);
11089 va_end(args); 11089 va_end(args);
11090 11090
11091 g_notification_set_body(notification, outbuf); 11091 g_notification_set_body(notification, outbuf);
11092 } 11092 }
11093 if(imagepath) 11093 /* check if we can read from this file (it exists and read permission) */
11094 if(imagepath && access(imagepath, 04 ) != 0)
11094 { 11095 {
11095 GFile *file = g_file_new_for_path(imagepath); 11096 GFile *file = g_file_new_for_path(imagepath);
11096 11097
11097 if(file) 11098 if(file)
11098 { 11099 {
11099 GFileIcon *icon = g_file_icon_new(file); 11100 GIcon *icon = g_file_icon_new(file);
11100 11101
11101 if(icon) 11102 if(icon)
11102 g_notification_set_icon(notification, G_ICON(icon)); 11103 g_notification_set_icon(notification, G_ICON(icon));
11103 } 11104 }
11104 } 11105 }