GitLab repository storage has been migrated to hashed layout. Please contact Infrastructure team if you notice any issues with repositories or hooks.

Commit 18a380af authored by Cosimo Cecchi's avatar Cosimo Cecchi

list-view: use the cairo surface as a drag icon

As we now store surfaces in the GtkListStore, we have to change the
drag method to use it instead of a pixbuf.
parent 6f32b422
......@@ -396,13 +396,13 @@ stop_drag_check (NautilusListView *view)
view->details->drag_button = 0;
static GdkPixbuf *
get_drag_pixbuf (NautilusListView *view)
static cairo_surface_t *
get_drag_surface (NautilusListView *view)
GtkTreeModel *model;
GtkTreePath *path;
GtkTreeIter iter;
GdkPixbuf *ret;
cairo_surface_t *ret;
GdkRectangle cell_area;
ret = NULL;
......@@ -503,14 +503,12 @@ drag_begin_callback (GtkWidget *widget,
NautilusListView *view)
GList *selection_cache;
GdkPixbuf *pixbuf;
pixbuf = get_drag_pixbuf (view);
if (pixbuf) {
gtk_drag_set_icon_pixbuf (context,
0, 0);
g_object_unref (pixbuf);
cairo_surface_t *surface;
surface = get_drag_surface (view);
if (surface) {
gtk_drag_set_icon_surface (context, surface);
cairo_surface_destroy (surface);
} else {
gtk_drag_set_icon_default (context);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment