[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Cell Renderer Combo Callback
- From: dhk <dhkuhl optonline net>
- To: Damien Caliste <damien caliste cea fr>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Cell Renderer Combo Callback
- Date: Wed, 12 Sep 2007 18:49:49 -0400
O'm going to have to try another approach. I know this isn't wrong, but
the combo doesn't work correctly. I'm going to stuff this in a smaller
program and try to narrow down what's going on.
Thanks,
--dhk
On Wed, 2007-09-12 at 15:51 +0200, Damien Caliste wrote:
> Hello,
>
> Le 12/09/2007, dhk <dhkuhl optonline net> a écrit :
> > Thanks, but it still doesn't work. I think the problem is in getting
> > the iter for the list store which is used in the combo render or it
> > might be working and just not getting rendered to be visible. I'm
> > fairly sure the problem is in the callback.
> Ok, I test your code in some of mine to see what happen. The two points
> I spoke about are relevant and should be applied. Because, with the
> first ("text, "Stock") "Stock" is always drawn instead of the choice.
> With the second, nothing is printed in the cell.
>
> But, in the callback, going through a GtkTreePath (think to free it
> after use) doesn't work (don't know why exactly). In my experience, I
> use instead directly:
> valid = gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(list),
> &iter, path);
> to get the iter from the string 'path'.
>
> With these three points, it should work.
>
> Damien.
>
>
> PS: if you want a default value for your combo, like "Stock", just add
> "Stock" in your model.
> _______________________________________________
> 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]