From: Hugo Villeneuve Date: Sat, 1 Jun 2013 15:48:42 +0000 (-0400) Subject: Replaced deprecated function gdk_pixmap_create_from_xpm_d() X-Git-Tag: v1.1.0~23 X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=5249a2a8cf17160c88006c3844fe83fe1ac4db86;p=dockapps%2Fhvclock.git Replaced deprecated function gdk_pixmap_create_from_xpm_d() --- diff --git a/src/dockapp.c b/src/dockapp.c index d3953de..531fc61 100644 --- a/src/dockapp.c +++ b/src/dockapp.c @@ -101,12 +101,17 @@ dockapp_gtk_withdrawn_hack(GtkWidget *dockwin, GtkWidget *iconwin) static void dockapp_set_mask(GtkWidget *dockwin, GtkWidget *iconwin) { + GdkPixbuf *pixbuf; GdkPixmap *pixmap; GdkBitmap *mask; - pixmap = gdk_pixmap_create_from_xpm_d(iconwin->window, &mask, NULL, - master_xpm); - if(!pixmap) { + pixbuf = gdk_pixbuf_new_from_xpm_data((const char **)master_xpm); + + gdk_pixbuf_render_pixmap_and_mask(pixbuf, &pixmap, &mask, 127); + + g_object_unref(pixbuf); + + if (!pixmap) { printf("Could not load master pixmap\n"); exit(1); }