Re: Deactivate window close button
| From: | Gonzalo Monzón | Date: | Sun, 19 Sep 2004 19:57:49 +0000 |
| Subject: | Re: Deactivate window close button | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-5099@lists.php.net to get a copy of this message | ||
Alessandro Sappia escribió:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Gonzalo Monzón wrote: | Ernesto Quiñones A. escribió: | |> Hello friends |> i need deactivate the window close button (X) |> the problem is when a user press this button destroy the window class and |> only need hide the window to show this later |> any body can help me? |> thanks |> |> pd. excuse me my bad english Well, it is easy. just connect the delete-event to a function that call hide method. $win= new GtkWindow(...); $win->connect('delete-event','hide_window'); function hide_window($object) { $object->hide_all(); } TO show up again that window you have to do $win->show_all(); bye - -- Alessandro Sappia GPG Public Key http://keyserver.linux.it/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBTBENyOULaTtxqPERApZaAJ0RXzyP9KjPLZ7xIUBd5fE0nA/0ZQCbBBip nFzdju7m0haCtVv2xV2u//U= =BbuN -----END PGP SIGNATURE----- . Hi Alessandro!But this doesn't work for me on non-modal dialog windows running on win32, I didn't tested it in linux or with popup or modal windows... maybe for these it works. For non-modal dialog windows you must call gtk::main again 'cause the window is always closed when you press the close button... and it's own gtk::main loop seems to be destroyed... I don't want to be a pain with this, maybe im wrong but thats just my experience... and running on win32. Gonzalo Monzon