[nautilus-actions] Fix when moving a subitem down
- From: Pierre Wieser <pwieser src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Fix when moving a subitem down
- Date: Wed, 14 Oct 2009 17:31:57 +0000 (UTC)
commit 3c9b6ab764daaf3fd4e4ccc18a963bb21b67b08b
Author: pierre <pierre vfedora10 virtuals pwi>
Date: Wed Oct 14 16:36:19 2009 +0200
Fix when moving a subitem down
ChangeLog | 1 +
src/nact/nact-tree-model.c | 6 +++++-
2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 5724da8..a0220b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,7 @@
* src/nact/nact-tree-model.c (drop_inside_adjust_dest):
Also used to validate when dropping an uri.
(drop_uri_list): Check status of imported actions.
+ (drop_inside_move_dest): Fix when moving a subitem down.
* src/plugin/nautilus-actions.c (instance_init):
Check status of loaded items.
diff --git a/src/nact/nact-tree-model.c b/src/nact/nact-tree-model.c
index 6eb8902..8a6a411 100644
--- a/src/nact/nact-tree-model.c
+++ b/src/nact/nact-tree-model.c
@@ -1640,11 +1640,15 @@ drop_inside_move_dest( NactTreeModel *model, GList *rows, GtkTreePath **dest )
gint i;
gint *indices;
+ g_return_if_fail( dest );
+
before = 0;
for( it = rows ; it ; it = it->next ){
path = gtk_tree_row_reference_get_path(( GtkTreeRowReference * ) it->data );
if( path ){
- if( gtk_tree_path_compare( path, *dest ) == -1 ){
+ if( gtk_tree_path_get_depth( path ) == 1 &&
+ gtk_tree_path_compare( path, *dest ) == -1 ){
+
before += 1;
}
gtk_tree_path_free( path );
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]