[nautilus-actions] Move gnome_vfs_init call to nact_action_profile_parse_parameters



commit 23eebd218c94d419b37fbec72ba40fa9c63ecc8b
Author: Pierre Wieser <pwieser trychlos org>
Date:   Wed Jun 10 20:10:04 2009 +0200

    Move gnome_vfs_init call to nact_action_profile_parse_parameters
---
 ChangeLog                        |    7 ++++++-
 src/common/nact-action-profile.c |   14 ++++++++++++++
 src/plugin/nautilus-actions.c    |   16 ----------------
 3 files changed, 20 insertions(+), 17 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ecd7e36..a39b3c0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,7 +5,12 @@
 	* src/common/nact-action-profile.c (nact_action_profile_free):
 	Fix disallocation of the profile by calling g_object_unref.
 
-	* src/plugin/nautilus-actions.c: Remove useless include files.
+	* src/common/nact-action-profile.c:
+	This is now the only file which makes use of gnome_vfs subsystem.
+
+	* src/plugin/nautilus-actions.c:
+	Move gnome_vfs_init call to nact_action_profile_parse_parameters.
+	Remove useless include files.
 
 2009-06-09 Pierre Wieser <pwieser trychlos org>
 
diff --git a/src/common/nact-action-profile.c b/src/common/nact-action-profile.c
index 6736c14..44155c8 100644
--- a/src/common/nact-action-profile.c
+++ b/src/common/nact-action-profile.c
@@ -940,6 +940,20 @@ nact_action_profile_parse_parameters( const NactActionProfile *profile, GList* f
 	gchar* retv = NULL;
 	g_return_val_if_fail( NACT_IS_ACTION_PROFILE( profile ), NULL );
 
+	/* Patch from Bruce van der Kooij <brucevdkooij gmail com>
+	 *
+	 * TODO: GnomeVFS needs to be initialized before gnome_vfs methods
+	 * can be used. Since GnomeVFS has been deprecated it would be
+	 * a good idea to rewrite this extension to use equivalent methods
+	 * from GIO/GVFS.
+	 *
+	 * src/common/nact-action-profile.c:nact_action_profile_parse_parameters
+	 * is the only function that makes use of gnome_vfs methods.
+	 *
+	 * See: Bug #574919
+	 */
+	gnome_vfs_init ();
+
 	if (files != NULL){
 		const gchar *param_template = profile->private->parameters;
 		GString* tmp_string = g_string_new ("");
diff --git a/src/plugin/nautilus-actions.c b/src/plugin/nautilus-actions.c
index 3f2b177..c9b6228 100644
--- a/src/plugin/nautilus-actions.c
+++ b/src/plugin/nautilus-actions.c
@@ -34,8 +34,6 @@
 
 #include <string.h>
 
-#include <libgnomevfs/gnome-vfs.h>
-
 #include <libnautilus-extension/nautilus-extension-types.h>
 #include <libnautilus-extension/nautilus-file-info.h>
 #include <libnautilus-extension/nautilus-menu-provider.h>
@@ -189,20 +187,6 @@ instance_init( GTypeInstance *instance, gpointer klass )
 	g_assert( NAUTILUS_IS_ACTIONS( instance ));
 	NautilusActions *self = NAUTILUS_ACTIONS( instance );
 
-	/* Patch from Bruce van der Kooij <brucevdkooij gmail com>
-	 *
-	 * TODO: GnomeVFS needs to be initialized before gnome_vfs methods
-	 * can be used. Since GnomeVFS has been deprecated it would be
-	 * a good idea to rewrite this extension to use equivalent methods
-	 * from GIO/GVFS.
-	 *
-	 * src/common/nact-action-profile.c:nact_action_profile_parse_parameters
-	 * is the only function that makes use of gnome_vfs methods.
-	 *
-	 * See: Bug #574919
-	 */
-	gnome_vfs_init ();
-
 	self->private = g_new0( NautilusActionsPrivate, 1 );
 	self->private->dispose_has_run = FALSE;
 



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