diff options
author | Anders Broman <anders.broman@ericsson.com> | 2009-08-27 06:57:53 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2009-08-27 06:57:53 +0000 |
commit | beb57e259bef95cead6fe7ff0dceaceae2e754ab (patch) | |
tree | d20f41c943cbeb51fd849505766f069ff2541de8 /gtk/gui_utils.h | |
parent | 0267ffb01c08da9fb9bb524e1279cc09465b5111 (diff) |
make the columns sortable.
svn path=/trunk/; revision=29583
Diffstat (limited to 'gtk/gui_utils.h')
-rw-r--r-- | gtk/gui_utils.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gtk/gui_utils.h b/gtk/gui_utils.h index 3073a78feb..289118ca22 100644 --- a/gtk/gui_utils.h +++ b/gtk/gui_utils.h @@ -337,4 +337,20 @@ void present_as_hex_func (GtkTreeViewColumn *column, GtkCellRenderer *renderer, */ void str_ptr_data_func(GtkTreeViewColumn *column, GtkCellRenderer *renderer, GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data); +/** This function can be called from gtk_tree_sortable_set_sort_func() + * the user data must be the colum number. + * Used together with str_ptr_data_func to sort the corresponding column. + * @param model The GtkTreeModel the comparison is within + * @param a A GtkTreeIter in model + * @param b Another GtkTreeIter in model + * @param user_data must be the colum number to fetch the data from + */ + +gint str_ptr_sort_func(GtkTreeModel *model, + GtkTreeIter *a, + GtkTreeIter *b, + gpointer user_data); + + + #endif /* __GTKGUIUI_UTIL_H__ */ |