[nautilus-actions: 11/19] Cleanup the code
- From: Pierre Wieser <pwieser src gnome org>
- To: svn-commits-list gnome org
- Subject: [nautilus-actions: 11/19] Cleanup the code
- Date: Tue, 9 Jun 2009 16:55:53 -0400 (EDT)
commit 7d4139347095f6bc4e1f8e5eee2e206dbd556f65
Author: Pierre Wieser <pwieser trychlos org>
Date: Tue Jun 9 21:45:09 2009 +0200
Cleanup the code
---
ChangeLog | 4 +++-
src/common/nact-object.c | 33 ---------------------------------
src/common/nact-object.h | 2 --
3 files changed, 3 insertions(+), 36 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 87d6a23..17e736b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,7 +16,9 @@
Cleanup the code, adding documentation to public functions.
* src/common/nact-object.c:
- * src/common/nact-object.h:
+ * src/common/nact-object.h
+ (nact_object_empty_property): Remove function and cleanup the code.
+
* src/common/nact-pivot.c:
* src/common/nact-pivot.h:
* src/plugin/nautilus-actions.c:
diff --git a/src/common/nact-object.c b/src/common/nact-object.c
index 76e0995..400ddd0 100644
--- a/src/common/nact-object.c
+++ b/src/common/nact-object.c
@@ -55,7 +55,6 @@ static void instance_dispose( GObject *object );
static void instance_finalize( GObject *object );
static void do_dump( const NactObject *object );
-static void do_empty_property( NactObject *object, const gchar *property );
static gchar *do_get_id( const NactObject *object );
static gchar *do_get_label( const NactObject *object );
@@ -104,7 +103,6 @@ class_init( NactObjectClass *klass )
klass->private = g_new0( NactObjectClassPrivate, 1 );
klass->dump = do_dump;
- klass->empty_property = do_empty_property;
klass->get_id = do_get_id;
klass->get_label = do_get_label;
}
@@ -175,37 +173,6 @@ nact_object_dump( const NactObject *object )
NACT_OBJECT_GET_CLASS( object )->dump( object );
}
-static void
-do_empty_property( NactObject *object, const gchar *property )
-{
- /*static const char *thisfn = "nact_object_do_empty_property";*/
- g_assert( NACT_IS_OBJECT( object ));
-
- GParamSpec *spec;
- spec = g_object_class_find_property( G_OBJECT_GET_CLASS( object ), property );
- if( spec ){
- g_object_set( G_OBJECT( object ), property, NULL );
- }
-}
-
-/**
- * Empty a property.
- *
- * This is a virtual function which may be implemented by the derived
- * class ; the derived class may also call its parent class to get a
- * empty_property of parent object.
- *
- * @object: object whose property is to be emptied.
- *
- * @property: the name of the property.
- */
-void
-nact_object_empty_property( NactObject *object, const gchar *property )
-{
- g_assert( NACT_IS_OBJECT( object ));
- NACT_OBJECT_GET_CLASS( object )->empty_property( object, property );
-}
-
static gchar *
do_get_id( const NactObject *object )
{
diff --git a/src/common/nact-object.h b/src/common/nact-object.h
index d900df0..fc66e55 100644
--- a/src/common/nact-object.h
+++ b/src/common/nact-object.h
@@ -68,7 +68,6 @@ typedef struct {
/* virtual public functions */
void ( *dump )( const NactObject *object );
- void ( *empty_property )( NactObject *object, const gchar *property );
gchar * ( *get_id )( const NactObject *object );
gchar * ( *get_label )( const NactObject *object );
}
@@ -77,7 +76,6 @@ typedef struct {
GType nact_object_get_type( void );
void nact_object_dump( const NactObject *object );
-void nact_object_empty_property( NactObject *object, const gchar *property );
gchar *nact_object_get_id( const NactObject *object );
gchar *nact_object_get_label( const NactObject *object );
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]