anjuta r4375 - in trunk: . plugins/symbol-db plugins/symbol-db/test
- From: mcora svn gnome org
- To: svn-commits-list gnome org
- Subject: anjuta r4375 - in trunk: . plugins/symbol-db plugins/symbol-db/test
- Date: Tue, 4 Nov 2008 17:53:02 +0000 (UTC)
Author: mcora
Date: Tue Nov 4 17:53:02 2008
New Revision: 4375
URL: http://svn.gnome.org/viewvc/anjuta?rev=4375&view=rev
Log:
* plugins/symbol-db/symbol-db-engine.c (symbol_db_engine_open_db):
* plugins/symbol-db/symbol-db-view.c
(symbol_db_view_get_file_and_line):
fixed bug #559252
* plugins/symbol-db/test/benchmark.c (main):
added gda_init () otherwise the benchmark was crashing.
Modified:
trunk/ChangeLog
trunk/plugins/symbol-db/symbol-db-engine.c
trunk/plugins/symbol-db/symbol-db-view.c
trunk/plugins/symbol-db/test/benchmark.c
Modified: trunk/plugins/symbol-db/symbol-db-engine.c
==============================================================================
--- trunk/plugins/symbol-db/symbol-db-engine.c (original)
+++ trunk/plugins/symbol-db/symbol-db-engine.c Tue Nov 4 17:53:02 2008
@@ -2987,7 +2987,8 @@
cnc_string = g_strdup_printf ("DB_DIR=%s;DB_NAME=%s", base_db_path,
ANJUTA_DB_FILE);
- DEBUG_PRINT ("symbol_db_engine_open_db (): opening/connecting to database...");
+ DEBUG_PRINT ("symbol_db_engine_open_db (): opening/connecting to "
+ "database with %s...", cnc_string);
sdb_engine_connect_to_db (dbe, cnc_string);
if (needs_tables_creation == TRUE)
Modified: trunk/plugins/symbol-db/symbol-db-view.c
==============================================================================
--- trunk/plugins/symbol-db/symbol-db-view.c (original)
+++ trunk/plugins/symbol-db/symbol-db-view.c Tue Nov 4 17:53:02 2008
@@ -1634,7 +1634,7 @@
if (store)
{
gint symbol_id;
- const gchar* relative_file;
+ const gchar* file;
SymbolDBEngineIteratorNode *node;
gtk_tree_model_get (GTK_TREE_MODEL
@@ -1652,10 +1652,9 @@
if (node != NULL)
{
*OUT_line = symbol_db_engine_iterator_node_get_symbol_file_pos (node);
- relative_file =
- symbol_db_engine_iterator_node_get_symbol_extra_string (node,
+ file = symbol_db_engine_iterator_node_get_symbol_extra_string (node,
SYMINFO_FILE_PATH);
- *OUT_file = symbol_db_engine_get_full_local_path (dbe, relative_file);
+ *OUT_file = g_strdup (file);
return TRUE;
}
}
Modified: trunk/plugins/symbol-db/test/benchmark.c
==============================================================================
--- trunk/plugins/symbol-db/test/benchmark.c (original)
+++ trunk/plugins/symbol-db/test/benchmark.c Tue Nov 4 17:53:02 2008
@@ -5,8 +5,6 @@
#include <gtk/gtk.h>
#include <libgnomevfs/gnome-vfs.h>
-#define BASE_PATH "/home/pescio/svnroot/anjuta/plugins/symbol-db"
-
static void on_single_file_scan_end (SymbolDBEngine* engine, GPtrArray* files)
{
static int i = 0;
@@ -60,6 +58,7 @@
gtk_init(&argc, &argv);
g_thread_init (NULL);
+ gda_init ();
gnome_vfs_init();
if (argc != 2)
@@ -71,13 +70,14 @@
engine = symbol_db_engine_new ("/usr/bin/ctags");
+
if (!symbol_db_engine_open_db (engine, root_dir, root_dir))
{
g_message ("Could not open database: %s", root_dir);
- return 1;
+ return -1;
}
-
+
symbol_db_engine_add_new_project (engine, NULL, root_dir);
files = get_files (root_dir);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]