anjuta r4363 - in trunk: . libanjuta plugins/build-basic-autotools plugins/class-gen



Author: jhs
Date: Sat Oct 25 21:20:43 2008
New Revision: 4363
URL: http://svn.gnome.org/viewvc/anjuta?rev=4363&view=rev

Log:
2008-10-25  Johannes Schmid  <jhs gnome org>

	Patch by: Jens Georg <mail jensge org>

	* libanjuta/anjuta-utils.c:
	* libanjuta/anjuta-utils.h:
	* plugins/build-basic-autotools/executer.c
	(get_program_parameters), (execute_program):
	* plugins/build-basic-autotools/plugin.c
	(value_added_pm_current_uri), (ibuilder_is_built),
	(ibuilder_build):
	* plugins/class-gen/generator.c (cg_generator_make_absolute):
	* plugins/class-gen/plugin.c (project_root_added):
	
	#511589 â Anjuta uses GNOME-VFS

Modified:
   trunk/ChangeLog
   trunk/libanjuta/anjuta-utils.c
   trunk/libanjuta/anjuta-utils.h
   trunk/plugins/build-basic-autotools/executer.c
   trunk/plugins/build-basic-autotools/plugin.c
   trunk/plugins/class-gen/generator.c
   trunk/plugins/class-gen/plugin.c

Modified: trunk/libanjuta/anjuta-utils.c
==============================================================================
--- trunk/libanjuta/anjuta-utils.c	(original)
+++ trunk/libanjuta/anjuta-utils.c	Sat Oct 25 21:20:43 2008
@@ -1149,6 +1149,19 @@
 	return mime_type;
 }
 
+gchar *
+anjuta_util_get_local_path_from_uri (const gchar *uri)
+{
+	GFile *file;
+	gchar *local_path;
+
+	file = g_file_new_for_uri (uri);
+	local_path = g_file_get_path (file);
+	g_object_unref (file);
+
+	return local_path;
+}
+
 #ifndef HAVE_LIBUTIL
 #include <grp.h>
 

Modified: trunk/libanjuta/anjuta-utils.h
==============================================================================
--- trunk/libanjuta/anjuta-utils.h	(original)
+++ trunk/libanjuta/anjuta-utils.h	Sat Oct 25 21:20:43 2008
@@ -119,6 +119,7 @@
 										 guint        truncate_length);
 
 gchar* anjuta_util_get_uri_mime_type (const gchar *uri);
+gchar* anjuta_util_get_local_path_from_uri (const gchar *uri);
 
 void anjuta_util_help_display (GtkWindow   *parent,
 							   const gchar *doc_id,

Modified: trunk/plugins/build-basic-autotools/executer.c
==============================================================================
--- trunk/plugins/build-basic-autotools/executer.c	(original)
+++ trunk/plugins/build-basic-autotools/executer.c	Sat Oct 25 21:20:43 2008
@@ -26,7 +26,6 @@
 
 #include <gnome.h>
 #include <glade/glade.h>
-#include <libgnomevfs/gnome-vfs-utils.h>
 
 #include <libanjuta/resources.h>
 #include <libanjuta/anjuta-debug.h>
@@ -114,7 +113,7 @@
 			gchar *local_path;
 			const gchar *rel_path;
 		
-			local_path = gnome_vfs_get_local_path_from_uri ((gchar*)node->data);
+			local_path = anjuta_util_get_local_path_from_uri ((gchar *)node->data);
 			if (local_path == NULL)
 			{
 				g_free (node->data);
@@ -287,7 +286,7 @@
 		/* Check if target is local */
 		gchar *local_uri;
 		
-		local_uri = gnome_vfs_get_local_path_from_uri (target);
+		local_uri = anjuta_util_get_local_path_from_uri (target);
 		if (local_uri == NULL)
 		{
 			error_condition = TRUE;
@@ -332,7 +331,7 @@
 		anjuta_shell_get (ANJUTA_PLUGIN (plugin)->shell, "current_editor",
 						  G_TYPE_OBJECT, &te, NULL);
 		
-		filename = gnome_vfs_get_local_path_from_uri (target);
+		filename = anjuta_util_get_local_path_from_uri (target);
 		prog = NULL;
 		prog = g_strdup (filename);
 		temp = g_strrstr (prog, ".");

Modified: trunk/plugins/build-basic-autotools/plugin.c
==============================================================================
--- trunk/plugins/build-basic-autotools/plugin.c	(original)
+++ trunk/plugins/build-basic-autotools/plugin.c	Sat Oct 25 21:20:43 2008
@@ -2474,12 +2474,9 @@
 	const gchar *uri;
 	gchar *dirname, *filename;
 	gboolean makefile_exists, is_dir;
-	GFile* file;
 	
 	uri = g_value_get_string (value);
-	file = g_file_new_for_uri (uri);
-	filename = g_file_get_path (file);
-	g_object_unref (file);
+	filename = anjuta_util_get_local_path_from_uri (uri);
 	g_return_if_fail (filename != NULL);
 	
 	/*
@@ -3070,11 +3067,8 @@
 	BasicAutotoolsPlugin *plugin = ANJUTA_PLUGIN_BASIC_AUTOTOOLS (builder);
 	BuildContext *context;
 	gchar *filename;
-	GFile* file;
 
-	file = g_file_new_for_uri (uri);
-	filename = g_file_get_path (file);
-	g_object_unref (file);
+	filename = anjuta_util_get_local_path_from_uri (uri);
 	if (filename == NULL) return NULL;
 	
 	context = build_is_file_built (plugin, filename, callback, user_data, err);
@@ -3092,11 +3086,8 @@
 	BasicAutotoolsPlugin *plugin = ANJUTA_PLUGIN_BASIC_AUTOTOOLS (builder);
 	BuildContext *context;
 	gchar *filename;
-	GFile* file;
 	
-	file = g_file_new_for_uri (uri);
-	filename = g_file_get_path (file);
-	g_object_unref (file);
+	filename = anjuta_util_get_local_path_from_uri (uri);
 	if (filename == NULL) return NULL;
 	
 	context = build_build_file_or_dir (plugin, filename, callback, user_data, err);

Modified: trunk/plugins/class-gen/generator.c
==============================================================================
--- trunk/plugins/class-gen/generator.c	(original)
+++ trunk/plugins/class-gen/generator.c	Sat Oct 25 21:20:43 2008
@@ -70,7 +70,7 @@
 	gchar *current_dir;
 	gchar *abs_path;
 
-	/* TODO: Use gnome-vfs stuff here? */
+	/* TODO: Use gio stuff here? */
 	if (g_path_is_absolute (path))
 	{
 		abs_path = g_strdup (path);

Modified: trunk/plugins/class-gen/plugin.c
==============================================================================
--- trunk/plugins/class-gen/plugin.c	(original)
+++ trunk/plugins/class-gen/plugin.c	Sat Oct 25 21:20:43 2008
@@ -19,7 +19,6 @@
 
 #include <config.h>
 #include <gtk/gtkactiongroup.h>
-#include <libgnomevfs/gnome-vfs-utils.h>
 #include <glib/gi18n.h>
 #include <libanjuta/anjuta-preferences.h>
 #include <libanjuta/anjuta-debug.h>
@@ -54,7 +53,7 @@
 	
 	if (root_uri)
 	{
-		gchar *root_dir = gnome_vfs_get_local_path_from_uri (root_uri);
+		gchar *root_dir = anjuta_util_get_local_path_from_uri (root_uri);
 		if (root_dir)
 			cg_plugin->top_dir = g_strdup(root_dir);
 		else



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