Re: Finding a widget in a Glade interface



dhk wrote:
I should have mentioned that by time I want to call
glade_xml_get_widget() the GladeXML *xml created by xml =
glade_xml_new("filename.glade", NULL, NULL); is out of scope.  If I call
  open the file again to get the widget it has no affect on the running
window.  I need to get the widget from the running window from some
callback.  Any ideas?

In the old days glade would assign data points to each widget that
worked out to essentially astatic string.  You could then take the
widget that was passed to the callback, look for the parent until you
got to the head of the widget tree, then start searching for the data
point you were looking for.  If I recall, glade used to provide a
function to make this searching easy.  I am pretty sure libglade still
allows for something similar.  Actually, looking at the docs, I'm pretty
sure that if you traced your way up to the root node in the widget tree,
and used the glade_get_widget_name() on all the children nodes, you
should be able to find the widget by name (string).



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]