[nautilus-actions] NAIDuplicable: are_equal, is valid default to TRUE



commit 3ca2b4f7cfd24a3d8d05db16baf90e6051960acc
Author: Pierre Wieser <pwieser trychlos org>
Date:   Mon Feb 21 19:44:50 2011 +0100

    NAIDuplicable: are_equal, is valid default to TRUE
    
    Rationale: if the implementation has not taken care of implementing the corresponding interfaces,
    then it is probably because this does not make sense in the given context. There is so no reason
    to suppose anything other here.

 ChangeLog                 |    3 +++
 src/api/na-iduplicable.h  |    3 +++
 src/core/na-iduplicable.c |    4 ++--
 3 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c53370a..7547c55 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2011-02-21 Pierre Wieser <pwieser trychlos org>
 
+	* src/api/na-iduplicable.h:
+	* src/api/na-iduplicable.c (v_are_equal, v_is_valid): Default to TRUE.
+
 	* src/core/na-icontext.c (is_candidate_for_mimetypes): Fix check.
 
 	* src/api/na-icontext.h:
diff --git a/src/api/na-iduplicable.h b/src/api/na-iduplicable.h
index 1204ae9..fefed11 100644
--- a/src/api/na-iduplicable.h
+++ b/src/api/na-iduplicable.h
@@ -159,6 +159,9 @@ typedef struct {
 	 * care itself of calling each function in the class hierarchy,
 	 * from topmost base class to most-derived one.
 	 *
+	 * When testing for the modification status of an object, @a stands for
+	 * the original object, while @b stands for the duplicated one.
+	 *
 	 * Returns: TRUE if @a and @b are identical, FALSE else.
 	 *
 	 * Since: 2.30
diff --git a/src/core/na-iduplicable.c b/src/core/na-iduplicable.c
index 3e6bb39..ed79e40 100644
--- a/src/core/na-iduplicable.c
+++ b/src/core/na-iduplicable.c
@@ -553,7 +553,7 @@ v_are_equal( const NAIDuplicable *a, const NAIDuplicable *b )
 		return( NA_IDUPLICABLE_GET_INTERFACE( a )->are_equal( a, b ));
 	}
 
-	return( FALSE );
+	return( TRUE );
 }
 
 static gboolean
@@ -563,7 +563,7 @@ v_is_valid( const NAIDuplicable *object )
 		return( NA_IDUPLICABLE_GET_INTERFACE( object )->is_valid( object ));
 	}
 
-	return( FALSE );
+	return( TRUE );
 }
 
 /**



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