Hi

I startet playing with libglade and run into the following problem. I wanted to run 
an small application, developed with glade, with libglade. The application has five 
toplevel windows and I reused some names for corresponding widgets in the different 
windows. In glade this is no problem, because the function to find a widget by name 
'lookup_wdiget' only looks in one window. This scheme has the advantage, that one can 
reuse the names in different windows but to find a widget in another window is rather 
tedious. (I suggestet a solution in this list some weeks ago.)

Now in libgalde there are two functions to find a widget by names: 
'glade_xml_get_widget' 
and 'glade_xml_get_widget_bylong_name'. I can't use the first one, because of my reuse 
of some names. The second one should work, but it has the drawback, that it requires 
the full path name of the widget, so if I rearrange the widgets in my application, 
I also have to change the pathname in the function calls.

To avoid all these problems a would like to suggest a uniform solution for both glade 
and libglade. What about a function

glade_find_widget_by_name(SomeType *handle, 
                          gchar *toplevel_window_name, 
                          gchar *widget_to_find_name).

Unfortunately I don't know what to use for the handle in glade, 
in libglade it obviously would be 'GladeXML *xml';

May by there is a much better solution for my problem, that I don't see.

Comments desired.

Thanks
Gerhard



+---------------------------------------------------------------------+
To unsubscribe from this list, send a message to [EMAIL PROTECTED]
with the line "unsubscribe glade-devel" in the body of the message.

Reply via email to