use accessor functions
[geeqie.git] / src / dnd.c
index 6464a19..c50addb 100644 (file)
--- a/src/dnd.c
+++ b/src/dnd.c
@@ -99,8 +99,6 @@ static void pixbuf_draw_rect(GdkPixbuf *pixbuf, gint x, gint y, gint w, gint h,
 
 void dnd_set_drag_icon(GtkWidget *widget, GdkDragContext *context, GdkPixbuf *pixbuf, gint items)
 {
-       GdkPixmap *pixmap;
-       GdkBitmap *mask;
        GdkPixbuf *dest;
        gint w, h;
        gint sw, sh;
@@ -151,21 +149,17 @@ void dnd_set_drag_icon(GtkWidget *widget, GdkDragContext *context, GdkPixbuf *pi
                pixbuf_draw_rect(dest, x, y, lw, lh, 128);
                }
 
-       gdk_pixbuf_render_pixmap_and_mask(dest, &pixmap, &mask, 128);
-       g_object_unref(dest);
-
        if (layout)
                {
-               gdk_draw_layout(pixmap, widget->style->black_gc, x+1, y+1, layout);
-               gdk_draw_layout(pixmap, widget->style->white_gc, x, y, layout);
+               pixbuf_draw_layout(dest, layout, NULL, x+1, y+1, 0, 0, 0, 255);
+               pixbuf_draw_layout(dest, layout, NULL, x, y, 255, 255, 255, 255);
 
                g_object_unref(G_OBJECT(layout));
                }
 
-       gtk_drag_set_icon_pixmap(context, gtk_widget_get_colormap(widget), pixmap, mask, -8, -6);
+       gtk_drag_set_icon_pixbuf(context, dest, -8, -6);
 
-       g_object_unref(pixmap);
-       if (mask) g_object_unref(mask);
+       g_object_unref(dest);
 }
 
 static void dnd_set_drag_label_end_cb(GtkWidget *widget, GdkDragContext *context, gpointer data)