Re: how to browse values from a GtkListStore ?
- From: Tadej BorovÅak <tadeboro gmail com>
- To: for ad free fr
- Cc: gtk-app-devel-list gnome org
- Subject: Re: how to browse values from a GtkListStore ?
- Date: Sun, 15 Nov 2009 17:06:41 +0100
Hello.
Ok, here a sample of code used :
GtkListStore *list;
GtkTreeIter iter;
funct3(GtkListStore *list)
{
 Âgtk_list_store_append(list, &iter);
 Âgtk_list_store_set(list, &iter, 0,"apple", -1);
}
funct2()
{
 Âfunct3(list);
 Â// I would like to return some value here.
}
funct1()
{
 Âlist = gtk_list_store_new(1, G_TYPE_STRING);
 Â// CellRenderer code here
}
This is all I need. To retrieve string from store, simply use
something like this:
---- CODE ----
gchar *string;
gtk_tree_model_get( GTK_TREE_MODEL( store ), &iter, 0, &string, -1 );
/* Do something with string here */
g_free( string );
---- CODE ----
Tadej
--
Tadej BorovÅak
tadeboro.blogspot.com
tadeboro gmail com
tadej borovsak gmail com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]