# HG changeset patch # User Sadrul Habib Chowdhury # Date 1183089949 0 # Node ID 1f9db757efc213b2446f5deb4820bd7835659fbe # Parent a90f9a0b90c8a98b485334dddb0fabe11812f003 Oops. I missed this. This allows setting tree-column titles one by one. diff -r a90f9a0b90c8 -r 1f9db757efc2 finch/libgnt/gnttree.c --- a/finch/libgnt/gnttree.c Fri Jun 29 01:52:09 2007 +0000 +++ b/finch/libgnt/gnttree.c Fri Jun 29 04:05:49 2007 +0000 @@ -1526,6 +1526,12 @@ tree->columns[col].width = width; } +void gnt_tree_set_column_title(GntTree *tree, int index, const char *title) +{ + g_free(tree->columns[index].title); + tree->columns[index].title = g_strdup(title); +} + void gnt_tree_set_column_titles(GntTree *tree, ...) { int i; diff -r a90f9a0b90c8 -r 1f9db757efc2 finch/libgnt/gnttree.h --- a/finch/libgnt/gnttree.h Fri Jun 29 01:52:09 2007 +0000 +++ b/finch/libgnt/gnttree.h Fri Jun 29 04:05:49 2007 +0000 @@ -302,6 +302,15 @@ void gnt_tree_set_col_width(GntTree *tree, int col, int width); /** + * Set the title for a column. + * + * @param tree The tree + * @param index The index of the column + * @param title The title for the column + */ +void gnt_tree_set_column_title(GntTree *tree, int index, const char *title); + +/** * * @param tree */