yeah i'll try that...... but one more thing..... if I delete all those windows doesn't the main loop keep running?  Do I need to have all these seperate window classes reference the class that instansiates them to kill the mainloop? Or will it stop if there are no more windows?

Jeremy Moles wrote:
I can't think of a really easy to do it--there's a gtk.WindowGroup
object that might be better, but...

As long as you keep a container of "handles" to these windows, just make
the encompassing Window's call them iteratively:

windowlist = (window1(), window2(), window3())

foo.connect("delete-event", self.DeleteAllWindows)

def DeleteAllWindows(self, widget):
	for w in windowlist:
		w.delete()

Am I misunderstanding what you're asking? :)

On Thu, 2005-10-20 at 09:43 -0700, Chris Irish wrote:
  
Hi all,
  Let me setup my question real quick...... If I have four python 
classes and within each of these classes I have a different GUI window 
being created.  Meaning I have all the widget creation and functionality 
of each GUI within their respective class.  Then I import these four 
classes into another class making a instance of each imported class and 
calling the gtk main loop to start everything.

So far so good. But how do you handle delete-events when working with 
multiple windows from different classes?  Is there a default way you're 
suppose to handle things?  For example, how can I have all the windows 
close and the main loop quit by closing one of the imported windows?  
Right now when I close a window, just that window closes but the rest of 
the program keeps going.

Thanks in advance for any help,
Chris
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
    

  

_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to