[nautilus-actions] Remove the function na_object_item_set_new_uuid()
- From: Pierre Wieser <pwieser src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Remove the function na_object_item_set_new_uuid()
- Date: Sat, 26 Sep 2009 22:48:10 +0000 (UTC)
commit ac0d72598750764242116460141e0df514b3eb36
Author: Pierre Wieser <pwieser trychlos org>
Date: Sat Sep 19 19:23:02 2009 +0200
Remove the function na_object_item_set_new_uuid()
Replacing it with na_object_set_new_id() macro, which actually points to na_object_id_set_new_id(),
which itself makes use of virtual get_id() to get a new id of the derived class.
ChangeLog | 6 ++++++
src/common/na-obj-action.c | 2 +-
src/common/na-obj-menu.c | 3 +--
src/common/na-object-item-fn.h | 1 -
src/common/na-object-item.c | 21 ---------------------
5 files changed, 8 insertions(+), 25 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 3e609da..19640a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,6 +16,12 @@
Remove traces at instance_dispose() and instance_finalize().
na_object_menu_rebuild_items_list(): New function.
+ * src/common/na-obj-action.c:
+ * src/common/na-obj-menu.c:
+ * src/common/na-object-item-fn.h:
+ * src/common/na-object-item.c:
+ na_object_item_set_new_uuid(): Replace function by na_object_set_new_id().
+
* src/nact/nact-clipboard.c:
* src/nact/nact-clipboard.h:
All functions in use for cut/copy/paste functions are renamed as
diff --git a/src/common/na-obj-action.c b/src/common/na-obj-action.c
index 4572d4c..8231003 100644
--- a/src/common/na-obj-action.c
+++ b/src/common/na-obj-action.c
@@ -297,7 +297,7 @@ na_object_action_new( void )
action = g_object_new( NA_OBJECT_ACTION_TYPE, NULL );
- na_object_item_set_new_uuid( NA_OBJECT_ITEM( action ));
+ na_object_set_new_id( NA_OBJECT_ITEM( action ));
/* i18n: default label for a new action */
na_object_set_label( action, NA_OBJECT_ACTION_DEFAULT_LABEL );
diff --git a/src/common/na-obj-menu.c b/src/common/na-obj-menu.c
index 6cab221..f17f59a 100644
--- a/src/common/na-obj-menu.c
+++ b/src/common/na-obj-menu.c
@@ -203,8 +203,7 @@ na_object_menu_new( void )
menu = g_object_new( NA_OBJECT_MENU_TYPE, NULL );
- na_object_item_set_new_uuid( NA_OBJECT_ITEM( menu ));
-
+ na_object_set_new_id( menu );
na_object_set_label( menu, NA_OBJECT_MENU_DEFAULT_LABEL );
return( menu );
diff --git a/src/common/na-object-item-fn.h b/src/common/na-object-item-fn.h
index 907c8d8..b04badf 100644
--- a/src/common/na-object-item-fn.h
+++ b/src/common/na-object-item-fn.h
@@ -58,7 +58,6 @@ GList *na_object_item_get_items( const NAObjectItem *item );
guint na_object_item_get_items_count( const NAObjectItem *item );
void na_object_item_free_items( GList *items );
-void na_object_item_set_new_uuid( NAObjectItem *item );
void na_object_item_set_tooltip( NAObjectItem *item, const gchar *tooltip );
void na_object_item_set_icon( NAObjectItem *item, const gchar *icon_name );
void na_object_item_set_enabled( NAObjectItem *item, gboolean enabled );
diff --git a/src/common/na-object-item.c b/src/common/na-object-item.c
index f474150..c7d89d0 100644
--- a/src/common/na-object-item.c
+++ b/src/common/na-object-item.c
@@ -590,27 +590,6 @@ na_object_item_is_enabled( const NAObjectItem *item )
}
/**
- * na_object_item_set_new_uuid:
- * @item: the #NAObjectItem object to be updated.
- *
- * Set a new UUID for the item (an action or a menu).
- */
-void
-na_object_item_set_new_uuid( NAObjectItem *item )
-{
- uuid_t uuid;
- gchar uuid_str[64];
-
- g_return_if_fail( NA_IS_OBJECT_ITEM( item ));
- g_return_if_fail( !item->private->dispose_has_run );
-
- uuid_generate( uuid );
- uuid_unparse_lower( uuid, uuid_str );
-
- na_object_set_id( item, uuid_str );
-}
-
-/**
* na_object_item_set_tooltip:
* @item: the #NAObjectItem object to be updated.
* @tooltip: the tooltip to be set.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]