[nautilus-actions] Parent is not always an action, may be a menu
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Parent is not always an action, may be a menu
- Date: Fri, 2 Apr 2010 00:45:13 +0000 (UTC)
commit 6d824496b8ac6e479385aa14c6108f01e7c9497b
Author: Pierre Wieser <pwieser trychlos org>
Date: Thu Apr 1 20:55:07 2010 +0200
Parent is not always an action, may be a menu
ChangeLog | 6 ++++++
src/api/na-object-api.h | 4 ++--
src/core/na-object-id.c | 15 ++++++++-------
3 files changed, 16 insertions(+), 9 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index cec277f..6ae214d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-04-01 Pierre Wieser <pwieser trychlos org>
+
+ * src/api/na-object-api.h (na_object_prepare_for_paste):
+ * src/core/na-object-id.c (na_object_id_prepare_for_paste):
+ Parent is not always an action, may be a menu.
+
2009-03-28 Pierre Wieser <pwieser trychlos org>
* src/api/na-data-boxed.h:
diff --git a/src/api/na-object-api.h b/src/api/na-object-api.h
index 4835fc7..0c61b01 100644
--- a/src/api/na-object-api.h
+++ b/src/api/na-object-api.h
@@ -89,8 +89,8 @@ G_BEGIN_DECLS
#define na_object_sort_alpha_asc( a, b ) na_object_id_sort_alpha_asc( NA_OBJECT_ID( a ), NA_OBJECT_ID( b ))
#define na_object_sort_alpha_desc( a, b ) na_object_id_sort_alpha_desc( NA_OBJECT_ID( a ), NA_OBJECT_ID( b ))
-#define na_object_prepare_for_paste( obj, relabel, renumber, action ) \
- na_object_id_prepare_for_paste( NA_OBJECT_ID( obj ), ( relabel ), ( renumber ), ( NAObjectId * )( action ))
+#define na_object_prepare_for_paste( obj, relabel, renumber, parent ) \
+ na_object_id_prepare_for_paste( NA_OBJECT_ID( obj ), ( relabel ), ( renumber ), ( NAObjectId * )( parent ))
#define na_object_set_copy_of_label( obj ) na_object_id_set_copy_of_label( NA_OBJECT_ID( obj ))
#define na_object_set_new_id( obj, parent ) na_object_id_set_new_id( NA_OBJECT_ID( obj ), ( NAObjectId * )( parent ))
diff --git a/src/core/na-object-id.c b/src/core/na-object-id.c
index 8e868a7..1f4afdc 100644
--- a/src/core/na-object-id.c
+++ b/src/core/na-object-id.c
@@ -266,7 +266,7 @@ na_object_id_sort_alpha_desc( const NAObjectId *a, const NAObjectId *b )
* @object: the #NAObjectId object to be pasted.
* @relabel: whether this object should be relabeled when pasted.
* @relabel: whether this item should be renumbered ?
- * @action: if @object is a #NAObjectProfile, the parent #NAObjectAction.
+ * @parent: the parent of @object, or %NULL.
*
* Prepares @object to be pasted.
*
@@ -281,21 +281,22 @@ na_object_id_sort_alpha_desc( const NAObjectId *a, const NAObjectId *b )
* user preferences.
*/
void
-na_object_id_prepare_for_paste( NAObjectId *object, gboolean relabel, gboolean renumber, NAObjectId *action )
+na_object_id_prepare_for_paste( NAObjectId *object, gboolean relabel, gboolean renumber, NAObjectId *parent )
{
static const gchar *thisfn = "na_object_id_prepare_for_paste";
GList *subitems, *it;
- g_debug( "%s: object=%p, relabel=%s, renumber=%s, action=%p",
- thisfn, ( void * ) object, relabel ? "True":"False", renumber ? "True":"False", ( void * ) action );
+ g_debug( "%s: object=%p, relabel=%s, renumber=%s, parent=%p",
+ thisfn, ( void * ) object, relabel ? "True":"False", renumber ? "True":"False", ( void * ) parent );
+
g_return_if_fail( NA_IS_OBJECT_ID( object ));
- g_return_if_fail( !action || NA_IS_OBJECT_ACTION( action ));
+ g_return_if_fail( !parent || NA_IS_OBJECT_ITEM( parent ));
if( !object->private->dispose_has_run ){
if( NA_IS_OBJECT_PROFILE( object )){
- na_object_set_parent( object, action );
- na_object_set_new_id( object, action );
+ na_object_set_parent( object, parent );
+ na_object_set_new_id( object, parent );
if( renumber && relabel ){
na_object_set_copy_of_label( object );
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]