-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi.
On Tue, 19 Feb 2008 09:49:12 -0600
Darren Enns <[EMAIL PROTECTED]> wrote:
> I am trying to convert my command-line Python program into a
> PyGTK/Hildonized version for my Nokia N800.
>
> I am *very new* at doing this, so the best that I can do is look for
> examples that other people have written, and this is what I have been
> using for my 'child' window, but it does not work -- since when I
> close the window my entire application ends:
>
> def button_clicked(widget, data):
> window2 = hildon.Window()
> window2.connect("destroy", gtk.main_quit)
> label = gtk.Label("blah")
> label.set_text("You clicked on button "+data+"!!!")
> label.show()
>
> window2.add(label)
> window2.show()
> return
>
> Can anyone tell me the 'trick' of being able to close a 'child'
> window without the entire application shutting down?
>
Try changing the line:
window2.connect("destroy", gtk.main_quit)
with:
window2.connect("destroy", window2.destroy)
You have more information about gtk.main_quit function in:
http://pygtk.org/docs/pygtk/gtk-functions.html#function-gtk--main-quit
Regards.
- --
Daniel Martin Yerga
http://yerga.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFHuvz1cnvB1T3xmfMRAvSrAJkBfWVdm3DaVEM+izrwyx3xCPSoPQCeOhzY
DE6E6WeIIeBIbnkQocKkNZ4=
=ktrq
-----END PGP SIGNATURE-----
_______________________________________________
maemo-developers mailing list
[email protected]
https://lists.maemo.org/mailman/listinfo/maemo-developers