Re: Initilize a filter
- From: Stefan Kost <ensonic hora-obscura de>
- To: Bellicano Pascal <pascal_bellicano yahoo fr>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Initilize a filter
- Date: Wed, 22 Mar 2006 11:30:46 +0100
Hi,
this is what I do:
GtkListStore *store;
GtkTreeModel *filtered_store;
...
// create a filterd model
filtered_store=gtk_tree_model_filter_new(GTK_TREE_MODEL(store),NULL);
gtk_tree_model_filter_set_visible_func(GTK_TREE_MODEL_FILTER(filtered_store),visible_filter,(gpointer)self,NULL);
// active model
gtk_tree_view_set_model(tree_view,filtered_store);
Stefan
Am Mittwoch, den 22.03.2006, 11:20 +0100 schrieb Bellicano Pascal:
Here is my code :
GtkTreeModel *filter_model;
filter_model=gtk_tree_model_filter_new
(GTK_TREE_MODEL(store_ori),
NULL);
GtkTreeModelFilter *filter;
gtk_tree_model_filter_clear_cache(filter);
gtk_tree_view_set_model (GTK_TREE_VIEW(tree_view),
GTK_TREE_MODEL (filter_model));
...........
gtk_tree_model_filter_set_visible_column
(GTK_TREE_MODEL_FILTER(filter),7);
..........
(store_ori is a liststore)
gcc complains about filter not initialised.. ok but how to initialize it ?
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]