Revision: 1491
http://geeqie.svn.sourceforge.net/geeqie/?rev=1491&view=rev
Author: nadvornik
Date: 2009-03-08 11:32:12 +0000 (Sun, 08 Mar 2009)
Log Message:
-----------
dnd fixes
Modified Paths:
--------------
trunk/src/bar_keywords.c
Modified: trunk/src/bar_keywords.c
===================================================================
--- trunk/src/bar_keywords.c 2009-03-08 10:38:51 UTC (rev 1490)
+++ trunk/src/bar_keywords.c 2009-03-08 11:32:12 UTC (rev 1491)
@@ -572,6 +572,11 @@
gtk_tree_path_free(tpath);
gtk_tree_model_filter_convert_iter_to_child_iter(GTK_TREE_MODEL_FILTER(model),
&dest_kw_iter, &dest_iter);
+ if (src_valid &&
gtk_tree_store_is_ancestor(GTK_TREE_STORE(keyword_tree), &src_kw_iter,
&dest_kw_iter))
+ {
+ /* can't move to it's own child */
+ return;
+ }
if ((pos == GTK_TREE_VIEW_DROP_INTO_OR_BEFORE || pos ==
GTK_TREE_VIEW_DROP_INTO_OR_AFTER) &&
!gtk_tree_model_iter_has_child(keyword_tree, &dest_kw_iter))
@@ -640,7 +645,12 @@
gtk_tree_view_set_drag_dest_row(GTK_TREE_VIEW(tree_view), tpath, pos);
gtk_tree_path_free(tpath);
- gdk_drag_status(context, GDK_ACTION_COPY, time);
+
+ if (tree_view == gtk_drag_get_source_widget(context))
+ gdk_drag_status(context, GDK_ACTION_MOVE, time);
+ else
+ gdk_drag_status(context, GDK_ACTION_COPY, time);
+
return TRUE;
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Geeqie-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geeqie-svn