On 7 Sep 2000, Andreas Rottmann wrote:

> Know that, tried it. My Prog always crashes then, complaining the
> widget got out of libglade is of unknown type and then
> segfaulting. (That was the error when I did a gtk_widget_unparent on
> the widget to be embedded, because previously it did complain about
> having a parent when I wanted to add the glade component to a
> container).
> 
> I helped myself by editing the XML by hand. Works great, but is tedious.

What exactly did you try?  I have never had any problems myself.

The basic steps are to create a toplevel GtkWindow in glade (doesn't
matter what the name is).  Place the container you really want to build in
the window.  Give that container some name you will remember (say
"toplevel" for instance).  Then pack all other widgets inside it.

Then from glade, do:
  xml = glade_xml_new("filename.glade", "toplevel");
  widget = glade_xml_get_widget(xml, "toplevel");

The widget returned shouldn't have any other one as its parent, and you
shouldn't need to do any weird reparenting.

> 
> g, Andy
> 

James.

-- 
Email: [EMAIL PROTECTED]
WWW:   http://www.daa.com.au/~james/



_______________________________________________
Glade-devel maillist  -  [EMAIL PROTECTED]
http://lists.helixcode.com/mailman/listinfo/glade-devel

Reply via email to