summaryrefslogtreecommitdiff
path: root/gtk/gtktextview.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2010-08-15 21:24:55 +0200
committerBenjamin Otte <otte@redhat.com>2010-09-26 15:03:01 +0200
commit4138e86ad458fe157d47e1244addbd6939f3f7be (patch)
tree262ff2dc36f111cd0e592d02aa70bb7a29b78c59 /gtk/gtktextview.c
parent331999d84db1dfaa14a00a1dc423be12dc33e9a9 (diff)
downloadgtk+-4138e86ad458fe157d47e1244addbd6939f3f7be.tar.gz
testview: Convert _gtk_text_util_create_rich_drag_icon() to use surfaces
Diffstat (limited to 'gtk/gtktextview.c')
-rw-r--r--gtk/gtktextview.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 49ef851173..29da030b93 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -6905,25 +6905,21 @@ drag_begin_cb (GtkWidget *widget,
GdkDragContext *context,
gpointer data)
{
- GtkTextView *text_view = GTK_TEXT_VIEW (widget);
- GtkTextBuffer *buffer = gtk_text_view_get_buffer (text_view);
- GtkTextIter start;
- GtkTextIter end;
- GdkPixmap *pixmap = NULL;
+ GtkTextView *text_view = GTK_TEXT_VIEW (widget);
+ GtkTextBuffer *buffer = gtk_text_view_get_buffer (text_view);
+ GtkTextIter start;
+ GtkTextIter end;
+ cairo_surface_t *surface = NULL;
g_signal_handlers_disconnect_by_func (widget, drag_begin_cb, NULL);
if (gtk_text_buffer_get_selection_bounds (buffer, &start, &end))
- pixmap = _gtk_text_util_create_rich_drag_icon (widget, buffer, &start, &end);
+ surface = _gtk_text_util_create_rich_drag_icon (widget, buffer, &start, &end);
- if (pixmap)
+ if (surface)
{
- gtk_drag_set_icon_pixmap (context,
- gdk_drawable_get_colormap (pixmap),
- pixmap,
- NULL,
- -2, -2);
- g_object_unref (pixmap);
+ gtk_drag_set_icon_surface (context, surface);
+ cairo_surface_destroy (surface);
}
else
{