[anjuta] Replace "project_root_uri" by constant defined in ianjuta-project-manager.h



commit 3473789c511d7cacaf3de31d682a1962ea1124c5
Author: Sébastien Granjoux <seb sfo free fr>
Date:   Sun Jun 21 19:27:23 2009 +0200

    Replace "project_root_uri" by constant defined in ianjuta-project-manager.h

 plugins/debug-manager/start.c           |    2 +-
 plugins/patch/patch-plugin.c            |    3 ++-
 plugins/run-program/parameters.c        |    2 +-
 plugins/search/search-replace.c         |    6 +++---
 plugins/search/search-replace_backend.c |    4 ++--
 plugins/tools/variable.c                |    2 +-
 6 files changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/plugins/debug-manager/start.c b/plugins/debug-manager/start.c
index a1387d5..ac4a4f8 100644
--- a/plugins/debug-manager/start.c
+++ b/plugins/debug-manager/start.c
@@ -189,7 +189,7 @@ get_source_directories (AnjutaPlugin *plugin)
 	g_free (cwd);
 
 	/* Check if a project is already open */
-	anjuta_shell_get_value (plugin->shell, "project_root_uri", &value, NULL);
+	anjuta_shell_get_value (plugin->shell, IANJUTA_PROJECT_MANAGER_PROJECT_ROOT_URI, &value, NULL);
 	
 	/* Set source file search directories */
 	if (g_value_get_string (&value) != NULL)
diff --git a/plugins/patch/patch-plugin.c b/plugins/patch/patch-plugin.c
index c0e6e36..0917af4 100644
--- a/plugins/patch/patch-plugin.c
+++ b/plugins/patch/patch-plugin.c
@@ -18,6 +18,7 @@
  
 #include <libanjuta/anjuta-launcher.h>
 #include <libanjuta/anjuta-debug.h>
+#include <libanjuta/interfaces/ianjuta-project-manager.h>
 
 #include "plugin.h"
 #include "patch-plugin.h"
@@ -55,7 +56,7 @@ static gchar* get_project_uri(PatchPlugin *plugin)
 	gchar* uri;
 	GError* err = NULL;
 	anjuta_shell_get_value (ANJUTA_PLUGIN (plugin)->shell,
-													"project_root_uri",
+													IANJUTA_PROJECT_MANAGER_PROJECT_ROOT_URI,
 													&value,
 													&err);
 	if (err)
diff --git a/plugins/run-program/parameters.c b/plugins/run-program/parameters.c
index 40452d1..2f7c6d9 100644
--- a/plugins/run-program/parameters.c
+++ b/plugins/run-program/parameters.c
@@ -664,7 +664,7 @@ run_dialog_init (RunDialog *dlg, RunProgramPlugin *plugin)
 	gtk_combo_box_entry_set_text_column( GTK_COMBO_BOX_ENTRY(dlg->target), 0);
 	g_list_foreach (plugin->recent_target, on_add_uri_in_model, model);
 
-    anjuta_shell_get_value (ANJUTA_PLUGIN (plugin)->shell, "project_root_uri", &value, NULL);
+    anjuta_shell_get_value (ANJUTA_PLUGIN (plugin)->shell, IANJUTA_PROJECT_MANAGER_PROJECT_ROOT_URI, &value, NULL);
 	project_root_uri = G_VALUE_HOLDS_STRING (&value) ? g_value_get_string (&value) : NULL;
 	if (project_root_uri != NULL)
 	{
diff --git a/plugins/search/search-replace.c b/plugins/search/search-replace.c
index 3f82dc3..86f6b34 100644
--- a/plugins/search/search-replace.c
+++ b/plugins/search/search-replace.c
@@ -660,7 +660,7 @@ write_message_pane(IAnjutaMessageView* view, FileBuffer *fb, SearchEntry *se,
 		gchar *dir_uri = NULL;	
 		
 		anjuta_shell_get (ANJUTA_PLUGIN(sr->docman)->shell,
-							  "project_root_uri", G_TYPE_STRING,
+							  IANJUTA_PROJECT_MANAGER_PROJECT_ROOT_URI, G_TYPE_STRING,
 							  &dir_uri, NULL);
 		if (dir_uri != NULL)
 		{
@@ -722,7 +722,7 @@ on_message_clicked (GObject* object, gchar* message, gpointer data)
 	line = atoi(nline);
 	
 	anjuta_shell_get (ANJUTA_PLUGIN(sr->docman)->shell,
-	                  "project_root_uri", G_TYPE_STRING,
+	                  IANJUTA_PROJECT_MANAGER_PROJECT_ROOT_URI, G_TYPE_STRING,
 	                  &project_uri, NULL);
 	
 	if (project_uri && strlen(project_uri))
@@ -1870,7 +1870,7 @@ void search_replace_find_usage(const gchar *symbol)
 	g_object_get(G_OBJECT(sr->docman), "shell", &shell, NULL);
 	
 	anjuta_shell_get (shell,
-					  "project_root_uri", G_TYPE_STRING,
+					  IANJUTA_PROJECT_MANAGER_PROJECT_ROOT_URI, G_TYPE_STRING,
 					  &project_root_uri, NULL);
 	
 	sr->search.range.type =
diff --git a/plugins/search/search-replace_backend.c b/plugins/search/search-replace_backend.c
index e3b7811..8b1fa17 100644
--- a/plugins/search/search-replace_backend.c
+++ b/plugins/search/search-replace_backend.c
@@ -290,7 +290,7 @@ get_project_file_list(void)
 	gchar *project_root_uri = NULL;
 	
 	anjuta_shell_get (ANJUTA_PLUGIN(sr->docman)->shell,
-					  "project_root_uri", G_TYPE_STRING,
+					  IANJUTA_PROJECT_MANAGER_PROJECT_ROOT_URI, G_TYPE_STRING,
 					  &project_root_uri, NULL);
 	
 	if (project_root_uri)
@@ -794,7 +794,7 @@ create_search_entries (Search *s)
 			gchar *dir_uri = NULL;		
 					
 			anjuta_shell_get (ANJUTA_PLUGIN(sr->docman)->shell,
-							  "project_root_uri", G_TYPE_STRING,
+							  IANJUTA_PROJECT_MANAGER_PROJECT_ROOT_URI, G_TYPE_STRING,
 							  &dir_uri, NULL);
 			// FIXME : Replace Standard UNIX IO functions by gio 
 			if (dir_uri)			
diff --git a/plugins/tools/variable.c b/plugins/tools/variable.c
index f67e925..78293ae 100644
--- a/plugins/tools/variable.c
+++ b/plugins/tools/variable.c
@@ -81,7 +81,7 @@ static const struct
 	char *help;
 	ATPFlags flag;
 } variable_list[] = {
- {"project_root_uri", "project root URI", ATP_DEFAULT_VARIABLE},
+ {IANJUTA_PROJECT_MANAGER_PROJECT_ROOT_URI, "project root URI", ATP_DEFAULT_VARIABLE},
  {"project_root_directory", "project root path", ATP_DIRECTORY_VARIABLE },
  {"file_manager_current_uri", "selected file manager URI", ATP_DEFAULT_VARIABLE },
  {"file_manager_current_directory", "selected file manager directory", ATP_DIRECTORY_VARIABLE },



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