[anjuta] Revert "symbol-db: added db-ready signal to interface."



commit 6eec7a1b06f34d84374827328c0bb34f5f938dd1
Author: Massimo Corà <mcora src gnome org>
Date:   Tue Jun 29 22:48:58 2010 +0200

    Revert "symbol-db: added db-ready signal to interface."
    
    This reverts commit 1427f969525431465f9144dc64c955a9ccacbe93.

 libanjuta/interfaces/libanjuta.idl  |   14 --------------
 plugins/symbol-db/plugin.c          |   23 +++++------------------
 plugins/symbol-db/symbol-db-query.c |    3 +--
 3 files changed, 6 insertions(+), 34 deletions(-)
---
diff --git a/libanjuta/interfaces/libanjuta.idl b/libanjuta/interfaces/libanjuta.idl
index a70920a..af4179f 100644
--- a/libanjuta/interfaces/libanjuta.idl
+++ b/libanjuta/interfaces/libanjuta.idl
@@ -5768,20 +5768,6 @@ interface IAnjutaSymbolManager
 	void ::sys_scan_end (gint process_id);
 
 	/**
-	 * IAnjutaSymbolManager::db_ready:
-	 * @obj: Self
-	 * 
-	 * This signal is emitted when databases are ready for queries. 
-	 * A new database is created with tables, then it becomes ready.
-	 * A connection is made to an existing database, then it becomes ready.
-	 * Note that the signal may be emitted when no symbols are yet present on it:
-	 * you should rely on #IAnjutaSymbolManager::prj_scan_end and 
-	 * #IAnjutaSymbolManager::sys_scan_end to be sure that something has actually
-	 * been inserted into the dbs.
-	 */
-	void ::db_ready ();
-		
-	/**
 	 * ianjuta_symbol_manager_create_query:
 	 * @obj: Self
 	 * @name: Name of the query. It decides what query type it is.
diff --git a/plugins/symbol-db/plugin.c b/plugins/symbol-db/plugin.c
index 06054a8..1a4e661 100644
--- a/plugins/symbol-db/plugin.c
+++ b/plugins/symbol-db/plugin.c
@@ -1572,7 +1572,6 @@ on_project_root_added (AnjutaPlugin *plugin, const gchar *name,
 					const GValue *value, gpointer user_data)
 {
 	IAnjutaProjectManager *pm;
-	IAnjutaSymbolManager *sm;
 	SymbolDBPlugin *sdb_plugin;
 	const gchar *root_uri;
 	gchar *root_dir;
@@ -1595,9 +1594,7 @@ on_project_root_added (AnjutaPlugin *plugin, const gchar *name,
 							  PROJECT_GLOBALS,
 		    				  FALSE) == DB_OPEN_STATUS_FATAL)
 		{
-			g_critical ("Opening global project under %s", anjuta_cache_path);
-			g_free (anjuta_cache_path);
-			return;
+			g_error ("Opening global project under %s", anjuta_cache_path);
 		}
 		g_free (anjuta_cache_path);
 	
@@ -1616,9 +1613,6 @@ on_project_root_added (AnjutaPlugin *plugin, const gchar *name,
 	
 	pm = anjuta_shell_get_interface (ANJUTA_PLUGIN (sdb_plugin)->shell,
 									 IAnjutaProjectManager, NULL);
-
-	sm = anjuta_shell_get_interface (ANJUTA_PLUGIN (sdb_plugin)->shell,
-									 IAnjutaSymbolManager, NULL);
 	
 	/*
 	 *   The Project thing
@@ -1682,15 +1676,7 @@ on_project_root_added (AnjutaPlugin *plugin, const gchar *name,
 			default:
 				break;
 		}
-
-
-		/* if we reach this point we have both databases connected. 
-		 * we can then emit the signal for db ready. 
-		 */
-		DEBUG_PRINT ("DBs are ready");
-		g_signal_emit_by_name (sm, "db-ready", NULL);
-
-		
+			
 		/* if project did not exist add a new project */
 		if (project_exist == FALSE)
 		{
@@ -1956,6 +1942,8 @@ symbol_db_activate (AnjutaPlugin *plugin)
 	 */
 	if (ctags_path == NULL) 
 	{
+		DEBUG_PRINT ("ctags is not in preferences. Trying a default one %s", 
+				   CTAGS_PATH);
 		ctags_path = g_strdup (CTAGS_PATH);
 	}
 	
@@ -2009,8 +1997,7 @@ symbol_db_activate (AnjutaPlugin *plugin)
 							  PROJECT_GLOBALS,
 	    					  TRUE) == DB_OPEN_STATUS_FATAL)
 	{
-		g_critical ("Opening global project under %s", anjuta_cache_path);
-		return FALSE;
+		g_error ("Opening global project under %s", anjuta_cache_path);
 	}
 	
 	g_free (anjuta_cache_path);
diff --git a/plugins/symbol-db/symbol-db-query.c b/plugins/symbol-db/symbol-db-query.c
index ab2109c..a00ae0f 100644
--- a/plugins/symbol-db/symbol-db-query.c
+++ b/plugins/symbol-db/symbol-db-query.c
@@ -496,8 +496,7 @@ sdb_query_execute_real (SymbolDBQuery *query)
 
 	if (!symbol_db_engine_is_connected (priv->dbe_selected))
 	{
-		g_warning ("Attempt to make a query when database (%s) is not connected",
-		    symbol_db_engine_get_project_directory (priv->dbe_selected));
+		g_warning ("Attempt to make a query when database is not connected");
 		return GINT_TO_POINTER (-1);
 	}
 	if (symbol_db_engine_is_scanning (priv->dbe_selected))



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