diff console/libgnt/gnttree.c @ 13935:cd2da4b079cf

[gaim-migrate @ 16466] New widget GntComboBox. I have addde a test file as an example as well. Rename gntutils.* to gntmarshal.* I am going to have some util-functions in gntutils.* later. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sat, 08 Jul 2006 23:58:20 +0000
parents ef0d515b9f97
children 669898e6aa11
line wrap: on
line diff
--- a/console/libgnt/gnttree.c	Sat Jul 08 19:06:59 2006 +0000
+++ b/console/libgnt/gnttree.c	Sat Jul 08 23:58:20 2006 +0000
@@ -1,5 +1,5 @@
 #include "gnttree.h"
-#include "gntutils.h"
+#include "gntmarshal.h"
 
 #include <string.h>
 
@@ -592,6 +592,13 @@
 	return NULL;
 }
 
+const char *gnt_tree_get_selection_text(GntTree *tree)
+{
+	if (tree->current)
+		return tree->current->text;
+	return NULL;
+}
+
 /* XXX: Should this also remove all the children of the row being removed? */
 void gnt_tree_remove(GntTree *tree, gpointer key)
 {
@@ -707,6 +714,6 @@
 		return;
 
 	row->flags = flags;
-	redraw_tree(tree);	/* XXX: Is shouldn't be necessary to redraw the whole darned tree */
+	redraw_tree(tree);	/* XXX: It shouldn't be necessary to redraw the whole darned tree */
 }