SF.net SVN: geany:[3760] branches/unstable

ntrel at users.sourceforge.net ntrel at xxxxx
Fri May 1 14:45:31 UTC 2009


Revision: 3760
          http://geany.svn.sourceforge.net/geany/?rev=3760&view=rev
Author:   ntrel
Date:     2009-05-01 14:45:31 +0000 (Fri, 01 May 2009)

Log Message:
-----------
Show the number of tags in a user global tags file (instead of the
running total) in the debug message.

Modified Paths:
--------------
    branches/unstable/ChangeLog
    branches/unstable/src/symbols.c

Modified: branches/unstable/ChangeLog
===================================================================
--- branches/unstable/ChangeLog	2009-05-01 14:27:58 UTC (rev 3759)
+++ branches/unstable/ChangeLog	2009-05-01 14:45:31 UTC (rev 3760)
@@ -1,3 +1,10 @@
+2009-05-01  Nick Treleaven  <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * src/symbols.c:
+   Show the number of tags in a user global tags file (instead of the
+   running total) in the debug message.
+
+
 2009-04-30  Nick Treleaven  <nick(dot)treleaven(at)btinternet(dot)com>
 
  * src/symbols.c:

Modified: branches/unstable/src/symbols.c
===================================================================
--- branches/unstable/src/symbols.c	2009-05-01 14:27:58 UTC (rev 3759)
+++ branches/unstable/src/symbols.c	2009-05-01 14:45:31 UTC (rev 3760)
@@ -1457,6 +1457,15 @@
 }
 
 
+static gsize get_tag_count()
+{
+	GPtrArray *tags = tm_get_workspace()->global_tags;
+	gsize count = tags ? tags->len : 0;
+
+	return count;
+}
+
+
 static void load_user_tags(filetype_id ft_id)
 {
 	static guchar tags_loaded[GEANY_MAX_BUILT_IN_FILETYPES] = {0};
@@ -1481,11 +1490,12 @@
 	{
 		const gint tm_lang = ft->lang;
 		const gchar *fname = node->data;
+		gsize old_tag_count = get_tag_count();
 
 		if (tm_workspace_load_global_tags(fname, tm_lang))
 		{
-			geany_debug("Loaded %s (%s), total tags: %u.", fname, ft->name,
-				tm_get_workspace()->global_tags->len);
+			geany_debug("Loaded %s (%s), %u tag(s).", fname, ft->name,
+				get_tag_count() - old_tag_count);
 		}
 	}
 	g_list_foreach(fnames, (GFunc) g_free, NULL);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list