Custom sorting GtkColumView sort order

GTK4.12.
I am using GktColumnView, with custom sorting on each column.
When i click on column header, the sorting widget change state: ascendant, descendant sorting etc…
My custom function is called, but i don’t know the current sorting order.

How can y get it ?
It is possible with defaut Columnview sorter, but not with custom sorter.

Functions used:
gtk_column_view_column_set_sorter(pGtkColumnViewColumn, GTK_SORTER(pgtkSorterCol));

The sorting function has no info on current sorting order
GtkOrdering Clistbase::sort_func(gconstpointer a, gconstpointer b, gpointer user_data);
My problem is that i want to force some row a first row, regardless of the current sorting order (ascendant, descendant…)
So these rows change their position each click on the column header
Firt, last, first , last …

in C.

You can use:

GtkSortType eGtkSorType = gtk_column_view_sorter_get_primary_sort_order(GTK_COLUMN_VIEW_SORTER(a_pgtkSorter));

It give the current sort column GtkSortType

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.