summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2008-09-14 15:52:55 +0000
committerjstebbins <[email protected]>2008-09-14 15:52:55 +0000
commite407a68f9e6c11f107760a36134aa8dff51a2fcb (patch)
tree4a32019d76273caba6908ece456a95ddbfad09a4
parent36c8c170dbe8b42bafc4fe7bf9e0411691ed5057 (diff)
LinGui: refine the drop zone for queue drag n drop. now it only highlights
the zone between rows. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1695 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--gtk/src/callbacks.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
index 05a7cba73..6faa6bf5f 100644
--- a/gtk/src/callbacks.c
+++ b/gtk/src/callbacks.c
@@ -2913,6 +2913,17 @@ queue_drag_motion_cb(
gdk_drag_status(ctx, GDK_ACTION_MOVE, time);
return TRUE;
}
+ // Don't allow *drop into*
+ if (pos == GTK_TREE_VIEW_DROP_INTO_OR_BEFORE)
+ pos = GTK_TREE_VIEW_DROP_BEFORE;
+ if (pos == GTK_TREE_VIEW_DROP_INTO_OR_AFTER)
+ pos = GTK_TREE_VIEW_DROP_AFTER;
+ // Don't allow droping int child items
+ if (gtk_tree_path_get_depth(path) > 1)
+ {
+ gtk_tree_path_up(path);
+ pos = GTK_TREE_VIEW_DROP_AFTER;
+ }
indices = gtk_tree_path_get_indices(path);
row = indices[0];
js = ghb_array_get_nth(ud->queue, row);