forked from AuroraMiddleware/gtk
treelistrowsorter: Fix a faulty example
gtk_tree_list_row_sorter_new() consumes the sorter, so we can't pass gtk_column_view_get_sorter(), since that is transfer none.
This commit is contained in:
parent
594ec3d822
commit
500dbaabc3
@ -39,7 +39,8 @@
|
|||||||
* a GtkTreeListSorter:
|
* a GtkTreeListSorter:
|
||||||
*
|
*
|
||||||
* |[
|
* |[
|
||||||
* sorter = gtk_tree_list_row_sorter_new (gtk_column_view_get_sorter (view));
|
* column_sorter = gtk_column_view_get_sorter (view);
|
||||||
|
* sorter = gtk_tree_list_row_sorter_new (g_object_ref (column_sorter));
|
||||||
* sort_model = gtk_sort_list_model_new (tree_model, sorter);
|
* sort_model = gtk_sort_list_model_new (tree_model, sorter);
|
||||||
* selection = gtk_single_selection_new (sort_model);
|
* selection = gtk_single_selection_new (sort_model);
|
||||||
* gtk_column_view_set_model (view, G_LIST_MODEL (selection));
|
* gtk_column_view_set_model (view, G_LIST_MODEL (selection));
|
||||||
|
Loading…
Reference in New Issue
Block a user