Commit 78353899 authored by Massimo Cora's avatar Massimo Cora

fixed bug #559252

	* 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.

svn path=/trunk/; revision=4375
parent 5fabbc81
2008-11-04 Massimo Cora' <mcora@svn.gnome.org>
* 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.
2008-11-03 Massimo Cora' <mcora@svn.gnome.org>
* plugins/symbol-db/symbol-db-engine.c
......@@ -2987,7 +2987,8 @@ symbol_db_engine_open_db (SymbolDBEngine * dbe, const gchar * base_db_path,
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)
......
......@@ -1634,7 +1634,7 @@ symbol_db_view_get_file_and_line (SymbolDBView *dbv, SymbolDBEngine *dbe,
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 @@ symbol_db_view_get_file_and_line (SymbolDBView *dbv, SymbolDBEngine *dbe,
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;
}
}
......
......@@ -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 @@ int main (int argc, char** argv)
gtk_init(&argc, &argv);
g_thread_init (NULL);
gda_init ();
gnome_vfs_init();
if (argc != 2)
......@@ -71,13 +70,14 @@ int main (int argc, char** argv)
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment