SF.net SVN: geany:[3289] trunk/src/symbols.c

eht16 at users.sourceforge.net eht16 at xxxxx
Sat Nov 29 12:51:05 UTC 2008


Revision: 3289
          http://geany.svn.sourceforge.net/geany/?rev=3289&view=rev
Author:   eht16
Date:     2008-11-29 12:51:05 +0000 (Sat, 29 Nov 2008)

Log Message:
-----------
Generate and set the tooltip text only if it is actually necessary.

Modified Paths:
--------------
    trunk/src/symbols.c

Modified: trunk/src/symbols.c
===================================================================
--- trunk/src/symbols.c	2008-11-29 12:50:52 UTC (rev 3288)
+++ trunk/src/symbols.c	2008-11-29 12:51:05 UTC (rev 3289)
@@ -1004,7 +1004,6 @@
 	{
 		const gchar *name;
 		const gchar *parent_name = get_parent_name(tag, ft_id);
-		gchar *tooltip;
 		GtkTreeIter iter;
 		GtkTreeIter *icon_iter = NULL, *child = NULL;
 		GdkPixbuf *icon = NULL;
@@ -1041,15 +1040,19 @@
 		gtk_tree_store_append(tree_store, child, parent);
 
 		name = get_symbol_name(doc, tag, (parent_name != NULL));
-		tooltip = get_symbol_tooltip(doc, tag);
 		gtk_tree_store_set(tree_store, child,
 			SYMBOLS_COLUMN_ICON, icon,
 			SYMBOLS_COLUMN_NAME, name,
 			SYMBOLS_COLUMN_TAG, tag,
-			SYMBOLS_COLUMN_TOOLTIP, tooltip,
 			-1);
 
-		g_free(tooltip);
+		if (gtk_check_version(2, 12, 0) == NULL)
+		{
+			gchar *tooltip = get_symbol_tooltip(doc, tag);
+			gtk_tree_store_set(tree_store, child, SYMBOLS_COLUMN_TOOLTIP, tooltip, -1);
+			g_free(tooltip);
+		}
+
 		if (G_LIKELY(G_IS_OBJECT(icon)))
 			g_object_unref(icon);
 	}


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