[nautilus-actions] Recursively applies relabel strategy to menu subitems



commit a8722261aa609710f8a39ed32576bedfbb6cec43
Author: Pierre Wieser <pwieser trychlos org>
Date:   Mon Oct 19 06:25:37 2009 +0200

    Recursively applies relabel strategy to menu subitems

 ChangeLog                 |    3 +++
 src/common/na-object-id.c |    7 +++++++
 2 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index a93e713..d90bb08 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2009-10-19 Pierre Wieser <pwieser trychlos org>
 
+	* src/common/na-object-id.c (na_object_id_prepare_for_paste):
+	Recursively manage menu subitems.
+
 	* src/nact/nact-main-menubar.c:
 	* src/nact/nautilus-actions-maintainer.actions:
 	Add a 'Dump selection' item in maintainer menu.
diff --git a/src/common/na-object-id.c b/src/common/na-object-id.c
index 0c57340..400ba6d 100644
--- a/src/common/na-object-id.c
+++ b/src/common/na-object-id.c
@@ -137,6 +137,7 @@ na_object_id_prepare_for_paste( NAObjectId *object, NAPivot *pivot, gboolean ren
 {
 	static const gchar *thisfn = "na_object_id_prepare_for_paste";
 	gboolean user_relabel;
+	GList *subitems, *it;
 
 	g_return_if_fail( NA_IS_OBJECT_ID( object ));
 	g_return_if_fail( NA_IS_PIVOT( pivot ));
@@ -171,6 +172,12 @@ na_object_id_prepare_for_paste( NAObjectId *object, NAPivot *pivot, gboolean ren
 					na_object_set_copy_of_label( object );
 				}
 			}
+			if( NA_IS_OBJECT_MENU( object )){
+				subitems = na_object_get_items_list( object );
+				for( it = subitems ; it ; it = it->next ){
+					na_object_prepare_for_paste( it->data, pivot, renumber, NULL );
+				}
+			}
 		}
 	}
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]