Re: how to destroy window if ptr to mainWindow not known



On Dec 6, 2007 4:46 AM, Lukasz Gromotowicz <gromot gmail com> wrote:
Hi all,

the problem is when loading windows from the xml file:

      glade_xml = glade_xml_new("ami.glade",NULL,NULL);

I need to know the reference to main window (GtkWindow) to be able to
destroy it, yes?
I can get it like this:
       window = glade_xml_get_widget(glade_xml,"window1");
and destroy:
      gtk_widget_destroy(window);

But what if there is no "window1" in the glade file? Let's say updated xml
changed the name to "mainWindow"?

Window exists on the screen, but how to delete it?

I don't think the glade file should be edited while the program is
running... or is that what you are doing?



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