Replaced deprecated function gdk_pixmap_create_from_xpm_d()
authorHugo Villeneuve <hugo@hugovil.com>
Sat, 1 Jun 2013 15:48:42 +0000 (11:48 -0400)
committerHugo Villeneuve <hugo@hugovil.com>
Sat, 1 Jun 2013 15:48:42 +0000 (11:48 -0400)
src/dockapp.c

index d3953de..531fc61 100644 (file)
@@ -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);
        }