[Glade-users] Suppressing states of File Chooser Button, Data retrieving from a dialog
Umut Emin
js_bach at freenet.de
Sat Jun 27 11:22:44 EDT 2009
On Wed, 2009-06-24 at 14:22 -0400, Tristan Van Berkom wrote:
> What Ive done in similar cases is just use a GtkButton with an icon
> (choose size button or size menu depending), and when the button
> is clicked I use the GTK+ api to fire a filechooser dialog on the fly
> and run it.
okay, i've done it like that. For some reason i can't manipulate the
entry after I have chosen and set the text. But at least it looks okay
now.
> When you load your UI, use gtk_builder_get_object() at initialization time
> for every specific widget that you need, load these addresses to a control
> object in your application (i.e. the actual object that creates the UI and
> calls gtk_builder_add_from_file()), add a member to your application object
> for every widget you actually need a pointer to.
>
Sounds a better way in comparison to look up dynamically for names. I am
now copying widget pointers via gtk_builder_get_object() to a structure
at the initialization.
Btw, is it possible to give some numeric id's to widgets at Glade so
that a search on a GSList could be made ( return val of
gtk_builder_get_objects()) with integers.
Thanks,
Umut
More information about the Glade-users
mailing list