diff console/libgnt/gnttree.c @ 13934:ef0d515b9f97

[gaim-migrate @ 16462] Mark urgent-hinted windows in the window-list. Make the default size of some of the windows smaller. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sat, 08 Jul 2006 19:06:59 +0000
parents 917a71dd02eb
children cd2da4b079cf
line wrap: on
line diff
--- a/console/libgnt/gnttree.c	Sat Jul 08 15:38:45 2006 +0000
+++ b/console/libgnt/gnttree.c	Sat Jul 08 19:06:59 2006 +0000
@@ -201,6 +201,7 @@
 			g_snprintf(format, sizeof(format) - 1, "[%c] ", row->isselected ? 'X' : ' ');
 		}
 
+		/* XXX: Need a utf8 version of snprintf */
 		if ((wr = g_snprintf(str, widget->priv.width, "%s%s", format, row->text)) >= widget->priv.width)
 		{
 			/* XXX: ellipsize */
@@ -702,10 +703,10 @@
 void gnt_tree_set_row_flags(GntTree *tree, void *key, GntTextFormatFlags flags)
 {
 	GntTreeRow *row = g_hash_table_lookup(tree->hash, key);
-	if (!row)
+	if (!row || row->flags == flags)
 		return;
 
 	row->flags = flags;
-	redraw_tree(tree);
+	redraw_tree(tree);	/* XXX: Is shouldn't be necessary to redraw the whole darned tree */
 }