[nautilus-actions] NAIContextConditions interface is renamed as NAIContextual



commit 3d3ca6762bad8c4355df296f4e20dcd30f215ab5
Author: Pierre Wieser <pwieser trychlos org>
Date:   Tue Mar 9 21:35:28 2010 +0100

    NAIContextConditions interface is renamed as NAIContextual

 ChangeLog                                          |   21 +++-
 po/POTFILES.in                                     |    2 +-
 src/api/Makefile.am                                |    2 +-
 .../{na-icontext-conditions.h => na-icontextual.h} |   50 +++++-----
 src/api/na-object-api.h                            |    8 +-
 src/core/Makefile.am                               |    4 +-
 ...nditions-factory.c => na-icontextual-factory.c} |    0
 .../{na-icontext-conditions.c => na-icontextual.c} |  108 ++++++++++----------
 src/core/na-object-action.c                        |    2 +-
 src/core/na-object-profile.c                       |    8 +-
 src/plugin-menu/nautilus-actions.c                 |    6 +-
 src/utils/nautilus-actions-run.c                   |    2 +-
 12 files changed, 113 insertions(+), 100 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 3e70e8c..c3924af 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,22 @@
-2009-03-05 Pierre Wieser <pwieser trychlos org>
+2009-03-09 Pierre Wieser <pwieser trychlos org>
 
-	* src/core/na-selected-info.c:
-	* src/core/na-selected-info.h: New files.
+	* src/api/na-icontext-conditions.h: Renamed as na-icontextual.h.
+	* src/core/na-icontext-conditions.c: Renamed as na-icontextual.c.
+	* src/core/na-icontext-conditions-factory.c:
+	Renamed as na-icontextual-factory.c.
 
-	* src/core/Makefile.am: Updated accordingly.
+	* po/POTFILES.in:
+	* src/api/Makefile.am:
+	* src/api/na-icontextual.h:
+	* src/api/na-object-api.h:
+	* src/core/Makefile.am:
+	* src/core/na-icontextual.c:
+	* src/core/na-object-action.c:
+	* src/core/na-object-profile.c:
+	* src/plugin-menu/nautilus-actions.c:
+	* src/utils/nautilus-actions-run.c: Updated accordingly.
+
+2009-03-09 Pierre Wieser <pwieser trychlos org>
 
 	Refactor NactIBackgroundTab class as NactIFoldersTab.
 
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 7a1fa96..6aa80d2 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,7 +1,7 @@
 data/nautilus-actions.schemas.in
 src/core/na-exporter.c
 src/core/na-iabout.c
-src/core/na-icontext-conditions-factory.c
+src/core/na-icontextual-factory.c
 src/core/na-importer-ask.c
 src/core/na-importer-ask.ui
 src/core/na-io-provider.c
diff --git a/src/api/Makefile.am b/src/api/Makefile.am
index d467413..3ab2927 100644
--- a/src/api/Makefile.am
+++ b/src/api/Makefile.am
@@ -44,7 +44,7 @@ api_include_HEADERS = \
 	na-data-types.h										\
 	na-gconf-monitor.h									\
 	na-gconf-utils.h									\
-	na-icontext-conditions.h							\
+	na-icontextual.h									\
 	na-iduplicable.h									\
 	na-ifactory-object.h								\
 	na-ifactory-object-data.h							\
diff --git a/src/api/na-icontext-conditions.h b/src/api/na-icontextual.h
similarity index 51%
rename from src/api/na-icontext-conditions.h
rename to src/api/na-icontextual.h
index b6f38a1..3084ab0 100644
--- a/src/api/na-icontext-conditions.h
+++ b/src/api/na-icontextual.h
@@ -28,17 +28,17 @@
  *   ... and many others (see AUTHORS)
  */
 
-#ifndef __NAUTILUS_ACTIONS_API_NA_ICONTEXT_CONDITIONS_H__
-#define __NAUTILUS_ACTIONS_API_NA_ICONTEXT_CONDITIONS_H__
+#ifndef __NAUTILUS_ACTIONS_API_NA_ICONTEXTUAL_H__
+#define __NAUTILUS_ACTIONS_API_NA_ICONTEXTUAL_H__
 
 /**
- * SECTION: na_icontext_conditions
- * @short_description: #NAIContextConditions interface definition.
- * @include: nautilus-actions/na-icontext_conditions.h
+ * SECTION: na_icontextual
+ * @short_description: #NAIContextual interface definition.
+ * @include: nautilus-actions/na-icontextual.h
  *
  * This interface is implemented by all #NAObject-derived objects
- * which must met some conditions in order to be displayed in the
- * Nautilus context menu.
+ * whose the display in the Nautilus context menu is subject to some
+ * conditions.
  *
  * Implementors, typically actions, profiles and menus, host the required
  * data as #NADataBoxed in a dedicated NA_FACTORY_CONDITIONS_GROUP
@@ -49,22 +49,22 @@
 
 G_BEGIN_DECLS
 
-#define NA_ICONTEXT_CONDITIONS_TYPE							( na_icontext_conditions_get_type())
-#define NA_ICONTEXT_CONDITIONS( instance )					( G_TYPE_CHECK_INSTANCE_CAST( instance, NA_ICONTEXT_CONDITIONS_TYPE, NAIContextConditions ))
-#define NA_IS_ICONTEXT_CONDITIONS( instance )				( G_TYPE_CHECK_INSTANCE_TYPE( instance, NA_ICONTEXT_CONDITIONS_TYPE ))
-#define NA_ICONTEXT_CONDITIONS_GET_INTERFACE( instance )	( G_TYPE_INSTANCE_GET_INTERFACE(( instance ), NA_ICONTEXT_CONDITIONS_TYPE, NAIContextConditionsInterface ))
+#define NA_ICONTEXTUAL_TYPE							( na_icontextual_get_type())
+#define NA_ICONTEXTUAL( instance )					( G_TYPE_CHECK_INSTANCE_CAST( instance, NA_ICONTEXTUAL_TYPE, NAIContextual ))
+#define NA_IS_ICONTEXTUAL( instance )				( G_TYPE_CHECK_INSTANCE_TYPE( instance, NA_ICONTEXTUAL_TYPE ))
+#define NA_ICONTEXTUAL_GET_INTERFACE( instance )	( G_TYPE_INSTANCE_GET_INTERFACE(( instance ), NA_ICONTEXTUAL_TYPE, NAIContextualInterface ))
 
-typedef struct NAIContextConditions                 NAIContextConditions;
+typedef struct NAIContextual                 NAIContextual;
 
-typedef struct NAIContextConditionsInterfacePrivate NAIContextConditionsInterfacePrivate;
+typedef struct NAIContextualInterfacePrivate NAIContextualInterfacePrivate;
 
 typedef struct {
-	GTypeInterface                        parent;
-	NAIContextConditionsInterfacePrivate *private;
+	GTypeInterface                 parent;
+	NAIContextualInterfacePrivate *private;
 
 	/**
 	 * is_candidate:
-	 * @object: this #NAIContextConditions object.
+	 * @object: this #NAIContextual object.
 	 * @target: the initial target which triggered this function's stack.
 	 *  This target is defined in na-object-item.h.
 	 * @selection: the current selection as a #GList of #NautilusFileInfo.
@@ -72,23 +72,23 @@ typedef struct {
 	 * Returns: %TRUE if the @object may be a potential candidate, %FALSE
 	 * else.
 	 *
-	 * The #NAIContextConditions implementor may take advantage of this
+	 * The #NAIContextual implementor may take advantage of this
 	 * virtual function to check for its own specific data. Only if the
 	 * implementor does return %TRUE (or just doesn't implement this
 	 * virtual), the conditions themselves will be checked.
 	 */
-	gboolean ( *is_candidate )( NAIContextConditions *object, guint target, GList *selection );
+	gboolean ( *is_candidate )( NAIContextual *object, guint target, GList *selection );
 }
-	NAIContextConditionsInterface;
+	NAIContextualInterface;
 
-GType    na_icontext_conditions_get_type( void );
+GType    na_icontextual_get_type( void );
 
-gboolean na_icontext_conditions_is_candidate( const NAIContextConditions *object, guint target, GList *selection );
-gboolean na_icontext_conditions_is_valid    ( const NAIContextConditions *object );
+gboolean na_icontextual_is_candidate( const NAIContextual *object, guint target, GList *selection );
+gboolean na_icontextual_is_valid    ( const NAIContextual *object );
 
-void     na_icontext_conditions_set_scheme    ( NAIContextConditions *object, const gchar *scheme, gboolean selected );
-void     na_icontext_conditions_replace_folder( NAIContextConditions *object, const gchar *old, const gchar *new );
+void     na_icontextual_set_scheme    ( NAIContextual *object, const gchar *scheme, gboolean selected );
+void     na_icontextual_replace_folder( NAIContextual *object, const gchar *old, const gchar *new );
 
 G_END_DECLS
 
-#endif /* __NAUTILUS_ACTIONS_API_NA_ICONTEXT_CONDITIONS_H__ */
+#endif /* __NAUTILUS_ACTIONS_API_NA_ICONTEXTUAL_H__ */
diff --git a/src/api/na-object-api.h b/src/api/na-object-api.h
index 7ae5a78..964f4f3 100644
--- a/src/api/na-object-api.h
+++ b/src/api/na-object-api.h
@@ -44,7 +44,7 @@
 #include "na-ifactory-object.h"
 #include "na-ifactory-object-data.h"
 #include "na-iduplicable.h"
-#include "na-icontext-conditions.h"
+#include "na-icontextual.h"
 #include "na-object-action.h"
 #include "na-object-profile.h"
 #include "na-object-menu.h"
@@ -170,10 +170,10 @@ G_BEGIN_DECLS
 #define na_object_set_schemes( obj, schemes )			na_ifactory_object_set_from_void( NA_IFACTORY_OBJECT( obj ), NAFO_DATA_SCHEMES, ( const void * )( schemes ))
 #define na_object_set_folders( obj, folders )			na_ifactory_object_set_from_void( NA_IFACTORY_OBJECT( obj ), NAFO_DATA_FOLDERS, ( const void * )( folders ))
 
-/* NAIContextConditions
+/* NAIContextual
  */
-#define na_object_set_scheme( obj, scheme, add )		na_icontext_conditions_set_scheme( NA_ICONTEXT_CONDITIONS( obj ), ( const gchar * )( scheme ), ( add ))
-#define na_object_replace_folder( obj, old, new )		na_icontext_conditions_replace_folder( NA_ICONTEXT_CONDITIONS( obj ), ( const gchar * )( old ), ( const gchar * )( new ))
+#define na_object_set_scheme( obj, scheme, add )		na_icontextual_set_scheme( NA_ICONTEXTUAL( obj ), ( const gchar * )( scheme ), ( add ))
+#define na_object_replace_folder( obj, old, new )		na_icontextual_replace_folder( NA_ICONTEXTUAL( obj ), ( const gchar * )( old ), ( const gchar * )( new ))
 
 G_END_DECLS
 
diff --git a/src/core/Makefile.am b/src/core/Makefile.am
index 7fb22ac..a398168 100644
--- a/src/core/Makefile.am
+++ b/src/core/Makefile.am
@@ -59,8 +59,8 @@ libna_core_la_SOURCES = \
 	na-gtk-utils.h										\
 	na-iabout.c											\
 	na-iabout.h											\
-	na-icontext-conditions.c							\
-	na-icontext-conditions-factory.c					\
+	na-icontextual.c									\
+	na-icontextual-factory.c							\
 	na-iduplicable.c									\
 	na-iexporter.c										\
 	na-ifactory-object.c								\
diff --git a/src/core/na-icontext-conditions-factory.c b/src/core/na-icontextual-factory.c
similarity index 100%
rename from src/core/na-icontext-conditions-factory.c
rename to src/core/na-icontextual-factory.c
diff --git a/src/core/na-icontext-conditions.c b/src/core/na-icontextual.c
similarity index 78%
rename from src/core/na-icontext-conditions.c
rename to src/core/na-icontextual.c
index 547ae0e..5b85978 100644
--- a/src/core/na-icontext-conditions.c
+++ b/src/core/na-icontextual.c
@@ -45,7 +45,7 @@
 
 /* private interface data
  */
-struct NAIContextConditionsInterfacePrivate {
+struct NAIContextualInterfacePrivate {
 	void *empty;						/* so that gcc -pedantic is happy */
 };
 
@@ -53,30 +53,30 @@ static gboolean st_initialized = FALSE;
 static gboolean st_finalized   = FALSE;
 
 static GType    register_type( void );
-static void     interface_base_init( NAIContextConditionsInterface *klass );
-static void     interface_base_finalize( NAIContextConditionsInterface *klass );
+static void     interface_base_init( NAIContextualInterface *klass );
+static void     interface_base_finalize( NAIContextualInterface *klass );
 
-static gboolean v_is_candidate( NAIContextConditions *object, guint target, GList *selection );
+static gboolean v_is_candidate( NAIContextual *object, guint target, GList *selection );
 
-static gboolean is_target_background_candidate( const NAIContextConditions *object, NASelectedInfo *current_folder );
-static gboolean is_target_toolbar_candidate( const NAIContextConditions *object, NASelectedInfo *current_folder );
-static gboolean is_current_folder_inside( const NAIContextConditions *object, NASelectedInfo *current_folder );
-static gboolean is_target_selection_candidate( const NAIContextConditions *object, GList *files );
-static gboolean is_valid_basenames( const NAIContextConditions *object );
-static gboolean is_valid_mimetypes( const NAIContextConditions *object );
-static gboolean is_valid_isfiledir( const NAIContextConditions *object );
-static gboolean is_valid_schemes( const NAIContextConditions *object );
-static gboolean is_valid_folders( const NAIContextConditions *object );
+static gboolean is_target_background_candidate( const NAIContextual *object, NASelectedInfo *current_folder );
+static gboolean is_target_toolbar_candidate( const NAIContextual *object, NASelectedInfo *current_folder );
+static gboolean is_current_folder_inside( const NAIContextual *object, NASelectedInfo *current_folder );
+static gboolean is_target_selection_candidate( const NAIContextual *object, GList *files );
+static gboolean is_valid_basenames( const NAIContextual *object );
+static gboolean is_valid_mimetypes( const NAIContextual *object );
+static gboolean is_valid_isfiledir( const NAIContextual *object );
+static gboolean is_valid_schemes( const NAIContextual *object );
+static gboolean is_valid_folders( const NAIContextual *object );
 
 static gboolean validate_schemes( GSList *object_schemes, NASelectedInfo *iter );
 
 /**
- * na_icontext_conditions_get_type:
+ * na_icontextual_get_type:
  *
  * Returns: the #GType type of this interface.
  */
 GType
-na_icontext_conditions_get_type( void )
+na_icontextual_get_type( void )
 {
 	static GType type = 0;
 
@@ -88,18 +88,18 @@ na_icontext_conditions_get_type( void )
 }
 
 /*
- * na_icontext_conditions_register_type:
+ * na_icontextual_register_type:
  *
  * Registers this interface.
  */
 static GType
 register_type( void )
 {
-	static const gchar *thisfn = "na_icontext_conditions_register_type";
+	static const gchar *thisfn = "na_icontextual_register_type";
 	GType type;
 
 	static const GTypeInfo info = {
-		sizeof( NAIContextConditionsInterface ),
+		sizeof( NAIContextualInterface ),
 		( GBaseInitFunc ) interface_base_init,
 		( GBaseFinalizeFunc ) interface_base_finalize,
 		NULL,
@@ -112,7 +112,7 @@ register_type( void )
 
 	g_debug( "%s", thisfn );
 
-	type = g_type_register_static( G_TYPE_INTERFACE, "NAIContextConditions", &info, 0 );
+	type = g_type_register_static( G_TYPE_INTERFACE, "NAIContextual", &info, 0 );
 
 	g_type_interface_add_prerequisite( type, G_TYPE_OBJECT );
 
@@ -120,24 +120,24 @@ register_type( void )
 }
 
 static void
-interface_base_init( NAIContextConditionsInterface *klass )
+interface_base_init( NAIContextualInterface *klass )
 {
-	static const gchar *thisfn = "na_icontext_conditions_interface_base_init";
+	static const gchar *thisfn = "na_icontextual_interface_base_init";
 
 	if( !st_initialized ){
 
 		g_debug( "%s: klass%p (%s)", thisfn, ( void * ) klass, G_OBJECT_CLASS_NAME( klass ));
 
-		klass->private = g_new0( NAIContextConditionsInterfacePrivate, 1 );
+		klass->private = g_new0( NAIContextualInterfacePrivate, 1 );
 
 		st_initialized = TRUE;
 	}
 }
 
 static void
-interface_base_finalize( NAIContextConditionsInterface *klass )
+interface_base_finalize( NAIContextualInterface *klass )
 {
-	static const gchar *thisfn = "na_icontext_conditions_interface_base_finalize";
+	static const gchar *thisfn = "na_icontextual_interface_base_finalize";
 
 	if( st_initialized && !st_finalized ){
 
@@ -150,8 +150,8 @@ interface_base_finalize( NAIContextConditionsInterface *klass )
 }
 
 /**
- * na_icontext_conditions_is_candidate:
- * @object: a #NAIContextConditions to be checked.
+ * na_icontextual_is_candidate:
+ * @object: a #NAIContextual to be checked.
  * @target: the current target.
  * @files: the currently selected items, as provided by Nautilus.
  *
@@ -164,13 +164,13 @@ interface_base_finalize( NAIContextConditionsInterface *klass )
  * else.
  */
 gboolean
-na_icontext_conditions_is_candidate( const NAIContextConditions *object, guint target, GList *files )
+na_icontextual_is_candidate( const NAIContextual *object, guint target, GList *files )
 {
 	gboolean is_candidate;
 
-	g_return_val_if_fail( NA_IS_ICONTEXT_CONDITIONS( object ), FALSE );
+	g_return_val_if_fail( NA_IS_ICONTEXTUAL( object ), FALSE );
 
-	is_candidate = v_is_candidate( NA_ICONTEXT_CONDITIONS( object ), target, files );
+	is_candidate = v_is_candidate( NA_ICONTEXTUAL( object ), target, files );
 
 	switch( target ){
 		case ITEM_TARGET_BACKGROUND:
@@ -190,23 +190,23 @@ na_icontext_conditions_is_candidate( const NAIContextConditions *object, guint t
 }
 
 /**
- * na_icontext_conditions_is_valid:
+ * na_icontextual_is_valid:
  * @profile: the #NAObjectProfile to be checked.
  *
  * Returns: %TRUE if this profile is valid, %FALSE else.
  *
  * This function is part of NAIDuplicable::check_status() and is called
- * by NAIDuplicable objects which also implement NAIContextConditions
+ * by NAIDuplicable objects which also implement NAIContextual
  * interface. It so doesn't make sense of asking the object for its
  * validity status as it has already been checked before calling the
  * function.
  */
 gboolean
-na_icontext_conditions_is_valid( const NAIContextConditions *object )
+na_icontextual_is_valid( const NAIContextual *object )
 {
 	gboolean is_valid;
 
-	g_return_val_if_fail( NA_IS_ICONTEXT_CONDITIONS( object ), FALSE );
+	g_return_val_if_fail( NA_IS_ICONTEXTUAL( object ), FALSE );
 
 	is_valid =
 		is_valid_basenames( object ) &&
@@ -219,21 +219,21 @@ na_icontext_conditions_is_valid( const NAIContextConditions *object )
 }
 
 /**
- * na_icontext_conditions_set_scheme:
- * @profile: the #NAIContextConditions to be updated.
+ * na_icontextual_set_scheme:
+ * @profile: the #NAIContextual to be updated.
  * @scheme: name of the scheme.
  * @selected: whether this scheme is candidate to this profile.
  *
  * Sets the status of a scheme relative to this profile.
  */
 void
-na_icontext_conditions_set_scheme( NAIContextConditions *profile, const gchar *scheme, gboolean selected )
+na_icontextual_set_scheme( NAIContextual *profile, const gchar *scheme, gboolean selected )
 {
-	/*static const gchar *thisfn = "na_icontext_conditions_set_scheme";*/
+	/*static const gchar *thisfn = "na_icontextual_set_scheme";*/
 	gboolean exist;
 	GSList *schemes;
 
-	g_return_if_fail( NA_IS_ICONTEXT_CONDITIONS( profile ));
+	g_return_if_fail( NA_IS_ICONTEXTUAL( profile ));
 
 	schemes = na_object_get_schemes( profile );
 	exist = na_core_utils_slist_find( schemes, scheme );
@@ -250,19 +250,19 @@ na_icontext_conditions_set_scheme( NAIContextConditions *profile, const gchar *s
 }
 
 /**
- * na_icontext_conditions_replace_folder:
- * @profile: the #NAIContextConditions to be updated.
+ * na_icontextual_replace_folder:
+ * @profile: the #NAIContextual to be updated.
  * @old: the old uri.
  * @new: the new uri.
  *
  * Replaces the @old URI by the @new one.
  */
 void
-na_icontext_conditions_replace_folder( NAIContextConditions *profile, const gchar *old, const gchar *new )
+na_icontextual_replace_folder( NAIContextual *profile, const gchar *old, const gchar *new )
 {
 	GSList *folders;
 
-	g_return_if_fail( NA_IS_ICONTEXT_CONDITIONS( profile ));
+	g_return_if_fail( NA_IS_ICONTEXTUAL( profile ));
 
 	folders = na_object_get_folders( profile );
 	folders = na_core_utils_slist_remove_utf8( folders, old );
@@ -272,21 +272,21 @@ na_icontext_conditions_replace_folder( NAIContextConditions *profile, const gcha
 }
 
 static gboolean
-v_is_candidate( NAIContextConditions *object, guint target, GList *selection )
+v_is_candidate( NAIContextual *object, guint target, GList *selection )
 {
 	gboolean is_candidate;
 
 	is_candidate = TRUE;
 
-	if( NA_ICONTEXT_CONDITIONS_GET_INTERFACE( object )->is_candidate ){
-		is_candidate = NA_ICONTEXT_CONDITIONS_GET_INTERFACE( object )->is_candidate( object, target, selection );
+	if( NA_ICONTEXTUAL_GET_INTERFACE( object )->is_candidate ){
+		is_candidate = NA_ICONTEXTUAL_GET_INTERFACE( object )->is_candidate( object, target, selection );
 	}
 
 	return( is_candidate );
 }
 
 static gboolean
-is_target_background_candidate( const NAIContextConditions *object, NASelectedInfo *current_folder )
+is_target_background_candidate( const NAIContextual *object, NASelectedInfo *current_folder )
 {
 	gboolean is_candidate;
 
@@ -296,7 +296,7 @@ is_target_background_candidate( const NAIContextConditions *object, NASelectedIn
 }
 
 static gboolean
-is_target_toolbar_candidate( const NAIContextConditions *object, NASelectedInfo *current_folder )
+is_target_toolbar_candidate( const NAIContextual *object, NASelectedInfo *current_folder )
 {
 	gboolean is_candidate;
 
@@ -306,7 +306,7 @@ is_target_toolbar_candidate( const NAIContextConditions *object, NASelectedInfo
 }
 
 static gboolean
-is_current_folder_inside( const NAIContextConditions *object, NASelectedInfo *current_folder )
+is_current_folder_inside( const NAIContextual *object, NASelectedInfo *current_folder )
 {
 	gboolean is_inside;
 	GSList *folders, *ifold;
@@ -336,7 +336,7 @@ is_current_folder_inside( const NAIContextConditions *object, NASelectedInfo *cu
 }
 
 static gboolean
-is_target_selection_candidate( const NAIContextConditions *object, GList *files )
+is_target_selection_candidate( const NAIContextual *object, GList *files )
 {
 	gboolean retv = FALSE;
 	GSList *basenames, *mimetypes, *schemes;
@@ -530,7 +530,7 @@ is_target_selection_candidate( const NAIContextConditions *object, GList *files
 }
 
 static gboolean
-is_valid_basenames( const NAIContextConditions *object )
+is_valid_basenames( const NAIContextual *object )
 {
 	gboolean valid;
 	GSList *basenames;
@@ -547,7 +547,7 @@ is_valid_basenames( const NAIContextConditions *object )
 }
 
 static gboolean
-is_valid_mimetypes( const NAIContextConditions *object )
+is_valid_mimetypes( const NAIContextual *object )
 {
 	gboolean valid;
 	GSList *mimetypes;
@@ -564,7 +564,7 @@ is_valid_mimetypes( const NAIContextConditions *object )
 }
 
 static gboolean
-is_valid_isfiledir( const NAIContextConditions *object )
+is_valid_isfiledir( const NAIContextual *object )
 {
 	gboolean valid;
 	gboolean isfile, isdir;
@@ -582,7 +582,7 @@ is_valid_isfiledir( const NAIContextConditions *object )
 }
 
 static gboolean
-is_valid_schemes( const NAIContextConditions *object )
+is_valid_schemes( const NAIContextual *object )
 {
 	gboolean valid;
 	GSList *schemes;
@@ -599,7 +599,7 @@ is_valid_schemes( const NAIContextConditions *object )
 }
 
 static gboolean
-is_valid_folders( const NAIContextConditions *object )
+is_valid_folders( const NAIContextual *object )
 {
 	gboolean valid;
 	GSList *folders;
diff --git a/src/core/na-object-action.c b/src/core/na-object-action.c
index b53d7a8..0c55470 100644
--- a/src/core/na-object-action.c
+++ b/src/core/na-object-action.c
@@ -688,7 +688,7 @@ na_object_action_attach_profile( NAObjectAction *action, NAObjectProfile *profil
  *
  * Returns: %TRUE if the @action may be candidate for this @target.
  *
- * Note that this public function will become NAIContextConditions::is_candidate
+ * Note that this public function will become NAIContextual::is_candidate
  * when NAObjectAction will implement the interface.
  */
 gboolean
diff --git a/src/core/na-object-profile.c b/src/core/na-object-profile.c
index a209134..cda9c10 100644
--- a/src/core/na-object-profile.c
+++ b/src/core/na-object-profile.c
@@ -91,7 +91,7 @@ static guint        ifactory_object_write_done( NAIFactoryObject *instance, cons
 
 static void         set_target_background( NAObjectProfile *profile );
 
-static void         icontext_conditions_iface_init( NAIContextConditionsInterface *iface );
+static void         icontext_conditions_iface_init( NAIContextualInterface *iface );
 
 static gboolean     profile_is_valid( const NAObjectProfile *profile );
 static gboolean     is_valid_path_parameters( const NAObjectProfile *profile );
@@ -154,7 +154,7 @@ register_type( void )
 
 	type = g_type_register_static( NA_OBJECT_ID_TYPE, "NAObjectProfile", &info, 0 );
 
-	g_type_add_interface_static( type, NA_ICONTEXT_CONDITIONS_TYPE, &icontext_conditions_iface_info );
+	g_type_add_interface_static( type, NA_ICONTEXTUAL_TYPE, &icontext_conditions_iface_info );
 
 	g_type_add_interface_static( type, NA_IFACTORY_OBJECT_TYPE, &ifactory_object_iface_info );
 
@@ -397,7 +397,7 @@ ifactory_object_write_done( NAIFactoryObject *instance, const NAIFactoryProvider
 }
 
 static void
-icontext_conditions_iface_init( NAIContextConditionsInterface *iface )
+icontext_conditions_iface_init( NAIContextualInterface *iface )
 {
 	static const gchar *thisfn = "na_object_profile_icontext_conditions_iface_init";
 
@@ -415,7 +415,7 @@ profile_is_valid( const NAObjectProfile *profile )
 
 		is_valid = \
 				is_valid_path_parameters( profile ) &&
-				na_icontext_conditions_is_valid( NA_ICONTEXT_CONDITIONS( profile ));
+				na_icontextual_is_valid( NA_ICONTEXTUAL( profile ));
 	}
 
 	return( is_valid );
diff --git a/src/plugin-menu/nautilus-actions.c b/src/plugin-menu/nautilus-actions.c
index f25e38c..893ac06 100644
--- a/src/plugin-menu/nautilus-actions.c
+++ b/src/plugin-menu/nautilus-actions.c
@@ -566,7 +566,7 @@ build_nautilus_menus( NautilusActions *plugin, GList *tree, guint target, GList
 		}
 #endif
 
-		/*if( !na_icontext_conditions_is_candidate( it->data, target, files )){
+		/*if( !na_icontextual_is_candidate( it->data, target, files )){
 			continue;
 		}*/
 
@@ -591,7 +591,7 @@ build_nautilus_menus( NautilusActions *plugin, GList *tree, guint target, GList
 
 		g_return_val_if_fail( NA_IS_OBJECT_ACTION( it->data ), NULL );
 
-		/* to be removed when NAObjectAction will implement NAIContextConditions interface
+		/* to be removed when NAObjectAction will implement NAIContextual interface
 		 */
 		if( !na_object_action_is_candidate( it->data, target, files )){
 			continue;
@@ -625,7 +625,7 @@ get_candidate_profile( NautilusActions *plugin, NAObjectAction *action, guint ta
 	for( ip = profiles ; ip && !candidate ; ip = ip->next ){
 		NAObjectProfile *profile = NA_OBJECT_PROFILE( ip->data );
 
-		if( na_icontext_conditions_is_candidate( NA_ICONTEXT_CONDITIONS( profile ), target, files )){
+		if( na_icontextual_is_candidate( NA_ICONTEXTUAL( profile ), target, files )){
 			profile_label = na_object_get_label( profile );
 			g_debug( "%s: selecting %s (%s)", thisfn, action_label, profile_label );
 			g_free( profile_label );
diff --git a/src/utils/nautilus-actions-run.c b/src/utils/nautilus-actions-run.c
index e0ccd98..c435be4 100644
--- a/src/utils/nautilus-actions-run.c
+++ b/src/utils/nautilus-actions-run.c
@@ -362,7 +362,7 @@ get_profile_for_targets( NAObjectAction *action, GList *targets )
 	profiles = na_object_get_items( action );
 	for( ip = profiles ; ip && !candidate ; ip = ip->next ){
 
-		if( na_icontext_conditions_is_candidate( NA_ICONTEXT_CONDITIONS( ip->data ), ITEM_TARGET_SELECTION, targets )){
+		if( na_icontextual_is_candidate( NA_ICONTEXTUAL( ip->data ), ITEM_TARGET_SELECTION, targets )){
 			candidate = NA_OBJECT_PROFILE( ip->data );
 		}
 	}



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