wmmenu: Fix -Wdeprecated-declarations compiler warnings.

The function gdk_pixbuf_unref is deprecated.  We replace it with
g_object_unref.  This requires linking against gobject-2.0.
This commit is contained in:
Doug Torrance 2015-01-24 12:05:40 -06:00 committed by Carlos R. Mafra
parent aa1149d5f9
commit 1bda233d76
2 changed files with 3 additions and 3 deletions

View file

@ -11,7 +11,7 @@ ifdef GDKPIXBUF2
PIXBUF_CFG = pkg-config gdk-pixbuf-xlib-2.0 PIXBUF_CFG = pkg-config gdk-pixbuf-xlib-2.0
PIXBUF_DEF = -DWITH_GDKPIXBUF PIXBUF_DEF = -DWITH_GDKPIXBUF
PIXBUF_INC := $(shell $(PIXBUF_CFG) --cflags) PIXBUF_INC := $(shell $(PIXBUF_CFG) --cflags)
PIXBUF_LIB := -rdynamic -L$(shell $(PIXBUF_CFG) --variable=prefix)/lib -lgdk_pixbuf_xlib-2.0 -lgdk_pixbuf-2.0 PIXBUF_LIB := -rdynamic -L$(shell $(PIXBUF_CFG) --variable=prefix)/lib -lgdk_pixbuf_xlib-2.0 -lgdk_pixbuf-2.0 -lgobject-2.0
endif endif
CC = gcc #-g CC = gcc #-g

View file

@ -97,7 +97,7 @@ extern void Pixmaps_FindLoad (const char * name,
scaled = gdk_pixbuf_scale_simple (pix, scaled = gdk_pixbuf_scale_simple (pix,
width, height, GDK_INTERP_HYPER) ; width, height, GDK_INTERP_HYPER) ;
gdk_pixbuf_unref (pix) ; g_object_unref (pix) ;
pix = scaled ; pix = scaled ;
} }
@ -105,7 +105,7 @@ extern void Pixmaps_FindLoad (const char * name,
if (hP != NULL) *hP = height ; if (hP != NULL) *hP = height ;
gdk_pixbuf_xlib_render_pixmap_and_mask (pix, imageP, maskP, 128) ; gdk_pixbuf_xlib_render_pixmap_and_mask (pix, imageP, maskP, 128) ;
/* don't forget to free now we've done pixmaps */ /* don't forget to free now we've done pixmaps */
gdk_pixbuf_unref (pix) ; g_object_unref (pix) ;
} }
/* /*