Re: Deactivate window close button
| From: | Gonzalo Monzón | Date: | Fri, 17 Sep 2004 10:47:40 +0000 |
| Subject: | Re: Deactivate window close button | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-5093@lists.php.net to get a copy of this message | ||
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 englishHi Ernesto! Are you speaking about you need to hide the window... is this the main or a children window? In any way you can create another Gtk:main() loop in a children window, so when delete event is called in the window and is closed, still there's the parent Gtk::main() so your program doesn't close and you can open again that child window later... All you need is to call Gtk::main(); again from your children window, then it can be destroyed using the close button, and later the parent window wich gots the first main loop (Gtk::main()), can re-call the class object for this window and it will be created again and wait until the main loop of the Gtk children window process (Gtk::main) is destroyed or terminated. Or if you minimize the child window, and close the parent, both will close. Or you can just catch the destroy and delete-event signals of the window and force them to do what you need (confirmation message, etc...) I hope this may help you, 'cause the solution you tell in your email of deactivating close button in your child window doesn't look to be the best... have you looked at popup windows? i think they have'nt the close button but now I don't remember exactly. So test it by yourself! Gonzalo Monzon