how to destroy window if ptr to mainWindow not known



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?


regards,
LUK



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