Mercurial > pidgin
changeset 18348:1f9db757efc2
Oops. I missed this. This allows setting tree-column titles one by one.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Fri, 29 Jun 2007 04:05:49 +0000 |
parents | a90f9a0b90c8 |
children | 11cb1436e392 a421561f12d7 |
files | finch/libgnt/gnttree.c finch/libgnt/gnttree.h |
diffstat | 2 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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;
--- 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 */