On Fri, Feb 05, 2010 at 06:26:39PM +0300, Andrey Nikitin wrote:
> > But I noticed that dialog.destroy() call really does not destroy the
> > dialog window.
> > 
> > Have solution?
> 
> I found the solution, see my code (I use the excellent ruby gtk
> binding) below:

Explicit main loop iterations are usually a sign of desperation.

============================================
import gtk

def response(dialog, id):
    print 'Dialog response:', id
    dialog.destroy()
    gtk.main_quit()

dialog = gtk.MessageDialog(buttons=gtk.BUTTONS_OK, message_format='Close me.')
dialog.connect('response', response)
dialog.show_all()
gtk.main()
print 'Done!'
# Ensure the program does not exit immediately
while True:
    pass
============================================

Yeti

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to