GtkListStore: forcing a sort



I have looked through the API reference and mailing lists, and I can't
seem to find an answer to this somewhat simple question.  I have a
GtkTreeView which uses a GtkListStore model.  The list store is
populated with a struct (ie, store = gtk_list_store_new(1, G_TYPE_POINTER);
I add many columns and use gtk_tree_view_column_set_cell_data_func() to
display various records of my structure in the columns in different
ways.  Now, this works very well, as I only have one copy of the data,
and any change takes effect immediately.  However, I would like to sort
the list after any change has been made to the data.

I have found the automatic sorting features unsatisfactory for two
reasons.  First, I need to sort based on 2 columns simultaneously (one
has priority), and it doesn't seem like I can do this.  Second, I want
to be able to issue a sort command whenever I want, rather than wait for
the user to click on the title of one of the columns.  It seems like
such a sort function would be fairly standard.  Where can I find this
functionality?

Thanks,
Matt Perry

-- 
const char* mattPerry = "mjperry2 uiuc edu";

"You look lovely this evening.  Have you decreased in mass?"
        -- Kang, The Simpsons



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]