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





----- Original Message ----
From: Jim George <jimgeorge gmail com>
To: Lukasz Gromotowicz <gromot gmail com>
Cc: gtk-app-devel-list gnome org
Sent: Thursday, December 6, 2007 8:45:24 AM
Subject: 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?

-----------

As far as I'm concerned, you should look at the glade file as one of the source files.  If it is changed, 
other things may need to be changed to reflect it.  It isn't an unrelated file, as config files can be.





      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping



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