im.pidgin.pidgin: fd65d4df88206e4dee702505a543e2ca35dfd5e8

sadrul at pidgin.im sadrul at pidgin.im
Tue Jan 22 09:11:34 EST 2008


-----------------------------------------------------------------
Revision: fd65d4df88206e4dee702505a543e2ca35dfd5e8
Ancestor: 5d3167fe2417fd61959da01eedea2878368f0349
Author: sadrul at pidgin.im
Date: 2008-01-22T07:28:11
Branch: im.pidgin.pidgin

Modified files:
        ChangeLog.API finch/libgnt/gnttree.c finch/libgnt/gnttree.h

ChangeLog: 

Function to get the parent key.

-------------- next part --------------
============================================================
--- ChangeLog.API	cad2f0da01d6aaf7370d87dfe75d30f710145ce6
+++ ChangeLog.API	69ccb8decd533d4d41558f4a92bb94b7e0513c04
@@ -70,6 +70,7 @@ version 2.4.0 (??/??/????):
 		  string.
 		* Added gnt_style_get_color to get a color pair from an entry in
 		  ~/.gntrc
+		* Added gnt_tree_get_parent_key to get the key for the parent row.
 
 version 2.3.0 (11/24/2007):
 	libpurple:
============================================================
--- finch/libgnt/gnttree.c	84f9a986284da48d5d3d87498ff3a8d215474b01
+++ finch/libgnt/gnttree.c	039ec1daeec31397b72c190a7524bad969475d12
@@ -1841,3 +1841,9 @@ void gnt_tree_set_search_function(GntTre
 	tree->priv->search_func = func;
 }
 
+gpointer gnt_tree_get_parent_key(GntTree *tree, gpointer key)
+{
+	GntTreeRow *row = g_hash_table_lookup(tree->hash, key);
+	return row ? row->parent : NULL;
+}
+
============================================================
--- finch/libgnt/gnttree.h	da90f6eb34b67ffd7bdd6d95a6f86cf69e792d3f
+++ finch/libgnt/gnttree.h	20624400eb5148666af36761e4e443a8c629f817
@@ -575,6 +575,17 @@ void gnt_tree_set_search_function(GntTre
 void gnt_tree_set_search_function(GntTree *tree,
 		gboolean (*func)(GntTree *tree, gpointer key, const char *search, const char *current));
 
+/**
+ * Get the parent key for a row.
+ *
+ * @param  tree  The tree
+ * @param  key   The key for the row.
+ *
+ * @return The key of the parent row.
+ * @since 2.4.0
+ */
+gpointer gnt_tree_get_parent_key(GntTree *tree, gpointer key);
+
 G_END_DECLS
 
 #endif /* GNT_TREE_H */


More information about the Commits mailing list