pike.git / src / post_modules / GTK2 / source / gladexml.pre

version» Context lines:

pike.git/src/post_modules/GTK2/source/gladexml.pre:81:   //! Note also that the XML parse tree is cached to speed up creating another   //! GladeXML object from the same file. The third optional argument is used to   //! specify a different translation domain from the default to be used.   //! If xml description is in a string buffer instead, specify the size (or -1   //! to auto-calculate). If size is 0, then it will assume a file with root   //! and/or domain specified.   {    pgtk_verify_not_inited();    pgtk_verify_setup();    { +  GladeXML *gl;    char *fname,*root=NULL,*dom=NULL;    int size=0;    if (args==1)    get_all_args("create",args,"%s",&fname);    else if (args==2)    get_all_args("create",args,"%s%i",&fname,&size);    else if (args==3)    get_all_args("create",args,"%s%i%s",&fname,&size,&root);    else    get_all_args("create",args,"%s%i%s%s",&fname,&size,&root,&dom);    if (size==0) -  THIS->obj=G_OBJECT(glade_xml_new(fname,root,dom)); +  gl=glade_xml_new(fname,root,dom);    else if (size==-1) -  THIS->obj=G_OBJECT(glade_xml_new_from_buffer(fname,strlen(fname),root,dom)); +  gl=glade_xml_new_from_buffer(fname,strlen(fname),root,dom);    else -  THIS->obj=G_OBJECT(glade_xml_new_from_buffer(fname,size,root,dom)); +  gl=glade_xml_new_from_buffer(fname,size,root,dom); +  THIS->obj=G_OBJECT(gl);    }    my_pop_n_elems(args);    pgtk__init_this_object();   }      GTK2.Widget get_widget(string name)   //! This function is used to get the widget corresponding to name in the   //! interface description. You would use this if you have to do anything to   //! the widget after loading.   {