[nautilus-actions] NAIContext: deprecate is_valid_isfiledir() function



commit 58d61bc9532d4c2978d393109b1a85dbd36efb85
Author: Pierre Wieser <pwieser trychlos org>
Date:   Mon Feb 21 17:41:35 2011 +0100

    NAIContext: deprecate is_valid_isfiledir() function

 ChangeLog              |    2 ++
 src/core/na-icontext.c |   26 ++++----------------------
 2 files changed, 6 insertions(+), 22 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 4b45b20..529758e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2011-02-21 Pierre Wieser <pwieser trychlos org>
 
+	* src/core/na-icontext.c (is_valid_isfiledir): Deprecated function.
+
 	* src/core/na-icontext.c (na_icontext_get_running_environment):
 	Fix value test.
 
diff --git a/src/core/na-icontext.c b/src/core/na-icontext.c
index 943b722..102ce11 100644
--- a/src/core/na-icontext.c
+++ b/src/core/na-icontext.c
@@ -84,7 +84,6 @@ static gboolean     is_candidate_for_capabilities( const NAIContext *object, gui
 
 static gboolean     is_valid_basenames( const NAIContext *object );
 static gboolean     is_valid_mimetypes( const NAIContext *object );
-static gboolean     is_valid_isfiledir( const NAIContext *object );
 static gboolean     is_valid_schemes( const NAIContext *object );
 static gboolean     is_valid_folders( const NAIContext *object );
 
@@ -245,7 +244,6 @@ na_icontext_is_valid( const NAIContext *context )
 	is_valid =
 		is_valid_basenames( context ) &&
 		is_valid_mimetypes( context ) &&
-		is_valid_isfiledir( context ) &&
 		is_valid_schemes( context ) &&
 		is_valid_folders( context );
 
@@ -574,6 +572,8 @@ is_candidate_for_show_in( const NAIContext *object, guint target, GList *files )
 #define DESKTOP_KDE   "KDE"
 #define DESKTOP_GNOME "GNOME"
 #define DESKTOP_XFCE  "XFCE"
+#define DESKTOP_ROX   "ROX"
+#define DESKTOP_LXDE  "LXDE"
 #define DESKTOP_OLD   "Old"
 
 static const gchar *
@@ -634,8 +634,8 @@ get_running_environment( void )
 		g_error_free( error );
 	}
 
-	/* do not know how to identify ROX or LXFCE environments
-	 * other desktops are identified as 'Old' (legacy systems)
+	/* do not know how to identify ROX or LXDE (Hong Jen Yee <pcman.tw (at) gmail.com>)
+	 * environments; so other desktops are just identified as 'Old' (legacy systems)
 	 */
 	return( DESKTOP_OLD );
 }
@@ -1299,24 +1299,6 @@ is_valid_mimetypes( const NAIContext *object )
 }
 
 static gboolean
-is_valid_isfiledir( const NAIContext *object )
-{
-	gboolean valid;
-	gboolean isfile, isdir;
-
-	isfile = na_object_is_file( object );
-	isdir = na_object_is_dir( object );
-
-	valid = isfile || isdir;
-
-	if( !valid ){
-		na_object_debug_invalid( object, "isfiledir" );
-	}
-
-	return( valid );
-}
-
-static gboolean
 is_valid_schemes( const NAIContext *object )
 {
 	gboolean valid;



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