anjuta r4557 - in trunk: . plugins/symbol-db
- From: mcora svn gnome org
- To: svn-commits-list gnome org
- Subject: anjuta r4557 - in trunk: . plugins/symbol-db
- Date: Fri, 9 Jan 2009 23:13:24 +0000 (UTC)
Author: mcora
Date: Fri Jan 9 23:13:24 2009
New Revision: 4557
URL: http://svn.gnome.org/viewvc/anjuta?rev=4557&view=rev
Log:
* plugins/symbol-db/symbol-db-system.c (sdb_system_class_init):
fixed #567203 â small signal error in symbol-db-system
* plugins/symbol-db/plugin.c (goto_file_tag):
added interface to the list of 'declaration' symbol kind.
* plugins/symbol-db/symbol-db-view-search.c
(sdb_view_search_on_tree_row_activate),
(sdb_view_search_on_entry_key_press_event),
(sdb_view_search_sort_iter_compare_func), (sdb_view_search_init):
fixed #566985 â sort multiple symbol matches by file path
Modified:
trunk/ChangeLog
trunk/plugins/symbol-db/plugin.c
trunk/plugins/symbol-db/symbol-db-system.c
trunk/plugins/symbol-db/symbol-db-view-search.c
Modified: trunk/plugins/symbol-db/plugin.c
==============================================================================
--- trunk/plugins/symbol-db/plugin.c (original)
+++ trunk/plugins/symbol-db/plugin.c Fri Jan 9 23:13:24 2009
@@ -152,7 +152,8 @@
symbol_kind = symbol_db_engine_iterator_node_get_symbol_extra_string (
iter_node, SYMINFO_KIND);
- if (g_strcmp0 (symbol_kind, "prototype") == 0)
+ if (g_strcmp0 (symbol_kind, "prototype") == 0 ||
+ g_strcmp0 (symbol_kind, "interface") == 0)
{
gint line =
symbol_db_engine_iterator_node_get_symbol_file_pos (iter_node);
Modified: trunk/plugins/symbol-db/symbol-db-system.c
==============================================================================
--- trunk/plugins/symbol-db/symbol-db-system.c (original)
+++ trunk/plugins/symbol-db/symbol-db-system.c Fri Jan 9 23:13:24 2009
@@ -191,7 +191,7 @@
NULL, NULL,
g_cclosure_marshal_VOID__UINT_POINTER, G_TYPE_NONE,
2,
- G_TYPE_INT,
+ G_TYPE_UINT,
G_TYPE_POINTER);
signals[SCAN_PACKAGE_END]
Modified: trunk/plugins/symbol-db/symbol-db-view-search.c
==============================================================================
--- trunk/plugins/symbol-db/symbol-db-view-search.c (original)
+++ trunk/plugins/symbol-db/symbol-db-view-search.c Fri Jan 9 23:13:24 2009
@@ -281,7 +281,7 @@
COLUMN_FILE, &file,
-1);
- DEBUG_PRINT ("sdb_view_search_on_tree_row_activate: file %s", file);
+ /*DEBUG_PRINT ("sdb_view_search_on_tree_row_activate: file %s", file);*/
g_signal_emit (search, signals[SYM_SELECTED], 0, line, file);
@@ -326,7 +326,7 @@
gint line;
gchar *file;
- DEBUG_PRINT("enter key pressed: getting the first entry found");
+ /*DEBUG_PRINT("enter key pressed: getting the first entry found");*/
/* Get the first entry found. */
if (gtk_tree_model_get_iter_first
@@ -412,6 +412,36 @@
}
}
+static gint
+sdb_view_search_sort_iter_compare_func (GtkTreeModel *model, GtkTreeIter *a,
+ GtkTreeIter *b, gpointer userdata)
+{
+ gchar *name1, *name2;
+ gchar *file1, *file2;
+ gint ret;
+
+ gtk_tree_model_get (model, a, COLUMN_NAME, &name1, COLUMN_FILE, &file1, -1);
+ gtk_tree_model_get (model, b, COLUMN_NAME, &name2, COLUMN_FILE, &file2, -1);
+
+ if (name1 == NULL || name2 == NULL || file1 == NULL || file2 == NULL)
+ {
+ ret = 0;
+ }
+ else if ((ret = g_strcmp0 (name1, name2)) == 0) /* they're equal */
+ {
+ /* process file name */
+ ret = g_strcmp0 (file1, file2);
+ }
+
+ g_free (name1);
+ g_free (name2);
+ g_free (file1);
+ g_free (file2);
+
+ return ret;
+}
+
+
static void
sdb_view_search_init (SymbolDBViewSearch * search)
{
@@ -439,7 +469,12 @@
gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (priv->model),
COLUMN_NAME,
GTK_SORT_ASCENDING);
-
+ gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE (priv->model),
+ COLUMN_NAME,
+ (GtkTreeIterCompareFunc )sdb_view_search_sort_iter_compare_func,
+ NULL,
+ NULL);
+
gtk_tree_view_set_model (GTK_TREE_VIEW (priv->hitlist), GTK_TREE_MODEL (priv->model));
gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (priv->hitlist), FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]