[Glade-devel] a question about use glade

Tristan Van Berkom tristan.van.berkom at gmail.com
Mon May 19 13:09:23 EDT 2008


Please dont mail me off list with these questions, its what the list is for.

2008/5/18 xiongyix <xiongyix at gmail.com>:
[...]
> now, I modify my code, make it work normally.
>
> GladeXML* pGladeA = glade_xml_new("my.glade", NULL, NULL) ;
> GtkWindow* pWindowA = GTK_WINDOW(glade_xml_get_widget(pGladeA, "mywindow");
> gtk_widget_show(pWindowA);
> gtk_widget_hide(pWindowA);
> g_object_unref(pGladeA);            // insert this.
>
> GladeXML* pGladeB = glade_xml_new("my.glade", NULL, NULL) ;
> GtkWindow* pWindowB = GTK_WINDOW(glade_xml_get_widget(pGladeB, "mywindow");
> gtk_widget_show(pWindowB);
> gtk_widget_hide(pWindowB);
> g_object_unref(pGladeB);            // insert this.
>
> // show again
> GladeXML* pGladeA = glade_xml_new("my.glade", NULL, NULL) ;
> GtkWindow* pWindowA = GTK_WINDOW(glade_xml_get_widget(pGladeA, "mywindow");
> gtk_widget_show(pWindowA);
> gtk_widget_hide(pWindowA);
> g_object_unref(pGladeA);

Ok, the third portion here is creating an entirely new window
and then hiding it (note that in C, you must declare variables
before calling functions, and in normal C circumstances, you are
losing the value of pWindowA when you re-assign it here, I dont
know what language lets you /redeclare/ the variable).

>
> I do not know other way to make it work normally.
> Can you tell me the more friendly way to do this.

I havent understood your definition of "working normally"/"this".

Why dont you send us some code that compiles, tell
us what you want it to do - and then we can tell you
why it doesnt do that.

Cheers,
                   -Tristan


More information about the Glade-devel mailing list