Re: attaching a callback that updates combo_box entries
- From: Stefan Kost <kost imn htwk-leipzig de>
- To: gtk-app-devel-list gnome org
- Subject: Re: attaching a callback that updates combo_box entries
- Date: Thu, 09 Dec 2004 19:24:10 +0100
A last reply for today,
I've read the API docs and Tims TreeView tutorial and I am still lost.
What use is a GtkTreeRowReference (that refrences a path in a model) when I
can't get hold of the GtkTreeModel.
To me it sound like
GtkTreeModel *gtk_tree_row_reference_get_model(GtkRowReference *reference);
just has been forgotten. At least it would be just what I need in my case.
I could pass the GtkRowReference as user_data to my callback and in there get
model and path. from model and path in turn I could get the iter.
I have filed it under
http://bugzilla.gnome.org/show_bug.cgi?id=160879
If there is agreement, I add a patch (if needed as implementation is trivial).
Ciao
Stefan
Stefan Kost wrote:
hi hi,
I've updated my code to use gtk_combox_box instead of option_menu. Yes, I've
read the little migration guide in the gtk+ api docs.
I must say that as soon as it gets a little dynamic gtk_combox_box_new_text() is
fairly useless. No way to rename items, re-populate the list etc.
So I've chosen the hard way using an ListStore.
In the old version I attached callbacks to each menu-items label, that where
triggered by notify::id of the underlying object. mean when the objects id
changed the menu changed as well.
Now with the ComboBox I would need to change the text in the model, like
gtk_list_store_set(store,&iter,0,new_id,-1);
now the big question is what can I pass to user_data of the callback that I can
use to get store and iter from. Don't tell me I should use a struct. In that
case the design is broken - I wouldn't accept that in my code.
Can't I get the label thats behind the cell?
Stefan
------------------------------------------------------------------------
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
--
\|/ Stefan Kost
<@ @> private business
+-oOO-(_)-OOo------------------------------------------------------ - - - - -
| __ Address Simildenstr. 5 HTWK Leipzig, Fb IMN, Postfach 301166
| /// 04277 Leipzig 04251 Leipzig
| __ /// Germany Germany
| \\\/// Phone +49341 2253538 +49341 30766101
| \__/ EMail st_kost_at_gmx.net kost_at_imn.htwk-leipzig.de
| WWW www.sonicpulse.de www.imn.htwk-leipzig.de/~kost/about.html
===-=-=--=---=---------------------------------- - - - - -
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]