summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-tree-view-drag-dest.c
diff options
context:
space:
mode:
authorJasmine Hassan <[email protected]>2012-11-08 00:05:37 +0200
committerJasmine Hassan <[email protected]>2012-11-16 09:45:52 +0200
commit2a4433a562b4a9fde5f81961c67fbee8810d63f0 (patch)
tree1ef7b55c2d3b141fb08f4ab40e0a913dbea6b84e /libcaja-private/caja-tree-view-drag-dest.c
parent40d77d2c4a371a546a35cbc8aa24bf9261e30fc0 (diff)
downloadcaja-2a4433a562b4a9fde5f81961c67fbee8810d63f0.tar.bz2
caja-2a4433a562b4a9fde5f81961c67fbee8810d63f0.tar.xz
[libcaja-private] Port to rendering-cleanup-next
http://git.gnome.org/browse/nautilus/commit/?id=910191ea13e5647e1b8c793e7585530c6ae4c9b1
Diffstat (limited to 'libcaja-private/caja-tree-view-drag-dest.c')
-rw-r--r--libcaja-private/caja-tree-view-drag-dest.c44
1 files changed, 28 insertions, 16 deletions
diff --git a/libcaja-private/caja-tree-view-drag-dest.c b/libcaja-private/caja-tree-view-drag-dest.c
index 1c25c452..d7a8d2b6 100644
--- a/libcaja-private/caja-tree-view-drag-dest.c
+++ b/libcaja-private/caja-tree-view-drag-dest.c
@@ -186,35 +186,42 @@ remove_expand_timeout (CajaTreeViewDragDest *dest)
}
static gboolean
+#if GTK_CHECK_VERSION(3,0,0)
+highlight_draw (GtkWidget *widget,
+ cairo_t *cr,
+ gpointer data)
+#else
highlight_expose (GtkWidget *widget,
GdkEventExpose *event,
gpointer data)
+#endif
{
GdkWindow *bin_window;
int width;
int height;
- if (gtk_widget_is_drawable (widget))
- {
- bin_window =
- gtk_tree_view_get_bin_window (GTK_TREE_VIEW (widget));
+ /* FIXMEchpe: is bin window right here??? */
+ bin_window = gtk_tree_view_get_bin_window (GTK_TREE_VIEW (widget));
#if GTK_CHECK_VERSION(3, 0, 0)
- width = gdk_window_get_width(GDK_WINDOW(bin_window));
- height = gdk_window_get_height(GDK_WINDOW(bin_window));
+ width = gdk_window_get_width(bin_window);
+ height = gdk_window_get_height(bin_window);
#else
- gdk_drawable_get_size(bin_window, &width, &height);
+ gdk_drawable_get_size(bin_window, &width, &height);
#endif
-
- gtk_paint_focus (gtk_widget_get_style (widget),
- bin_window,
- gtk_widget_get_state (widget),
- NULL,
- widget,
- "treeview-drop-indicator",
- 0, 0, width, height);
- }
+ gtk_paint_focus (gtk_widget_get_style (widget),
+#if GTK_CHECK_VERSION(3,0,0)
+ cr,
+ gtk_widget_get_state (widget),
+#else
+ bin_window,
+ gtk_widget_get_state (widget),
+ NULL,
+#endif
+ widget,
+ "treeview-drop-indicator",
+ 0, 0, width, height);
return FALSE;
}
@@ -234,8 +241,13 @@ set_widget_highlight (CajaTreeViewDragDest *dest, gboolean highlight)
{
dest->details->highlight_id =
g_signal_connect_object (dest->details->tree_view,
+#if GTK_CHECK_VERSION(3,0,0)
+ "draw",
+ G_CALLBACK (highlight_draw),
+#else
"expose_event",
G_CALLBACK (highlight_expose),
+#endif
dest, 0);
gtk_widget_queue_draw (GTK_WIDGET (dest->details->tree_view));
}