Hello. > Thank you, I'm sorry for that I didn't explain the problem clearer. What I > meant is that there is no similar function of > 'glade_get_widget_tree(widget)'. At the context where should call > gtk_builder_get_object(), there is no 'GtkBuilder* builder' available. In > the previous code, we can call 'glade_get_widget_tree(widget)' to get the > GladeXml object of the given 'widget'. However, I don't know how to do it in > GtkBuilder? > > If I can get the GtkBuilder object from 'assistant', then I can call > gtk_builder_get_object() to get the widget by its id. If I cannot get it, > then how to get the widget by id from the top level widget? Thanks.
I'm afraid that there is no equivalent for that in GtkBuilder (objects that are constructed by builder don't carry any information about who constructed them). You'll need to pass your builder object around manually (g_object_set_data() would be one option, global variable second, struct that is passed to all of the functions would be third, ...). Tadej -- Tadej Borovšak tadeboro.blogspot.com tadeb...@gmail.com tadej.borov...@gmail.com _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list