From a29e9589f6bd54e258805bef367528a18d7b0c2b Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 20 May 2015 16:43:48 +0100 Subject: Change how GDK image resources are compiled in. The compiled in image resources were being created as a structure in a generated c source file. The generation of this file caused constness warning as a guint8 * was initialised from a const char array. This changes the generation and use of these compiled in resources to use the raw inline form as suggested by the documentation removing the const warning. --- gtk/Makefile.target | 2 +- gtk/window.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gtk/Makefile.target b/gtk/Makefile.target index ee757f5f0..0b2eaab9a 100644 --- a/gtk/Makefile.target +++ b/gtk/Makefile.target @@ -92,7 +92,7 @@ S_PIXBUF += $(2) $(2): $(1) $(Q)echo "#include " > $(2) - $(Q)gdk-pixbuf-csource --extern --struct --name=$(3) $(1) >> $(2) || \ + $(Q)gdk-pixbuf-csource --extern --raw --name=$(3) $(1) >> $(2) || \ ( rm -f $(2) && false ) endef diff --git a/gtk/window.c b/gtk/window.c index 7fa089a5c..9acdb3d03 100644 --- a/gtk/window.c +++ b/gtk/window.c @@ -56,7 +56,7 @@ #include "gtk/gdk.h" -extern const GdkPixdata menu_cursor_pixdata; +extern const guint8 *menu_cursor_pixdata; static GtkWidget *select_menu; static struct form_control *select_menu_control; @@ -1080,7 +1080,7 @@ static GdkCursor *nsgtk_create_menu_cursor(void) { GdkCursor *cursor = NULL; GdkPixbuf *pixbuf; - pixbuf = gdk_pixbuf_from_pixdata(&menu_cursor_pixdata, FALSE, NULL); + pixbuf = gdk_pixbuf_new_from_inline(-1, menu_cursor_pixdata, FALSE, NULL); cursor = gdk_cursor_new_from_pixbuf(gdk_display_get_default(), pixbuf, 0, 3); g_object_unref (pixbuf); -- cgit v1.2.3