Re: Deactivate window close button

From: Date: Fri, 17 Sep 2004 18:04:38 +0000
Subject: Re: Deactivate window close button
References: 1 2 3 4 5 6 7 8 9 10 11 12  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-5094@lists.php.net to get a copy of this message
Hello Gonzalo only I need deactivate the windows destroy event show and hide my windows is ok ... my code is ok in this my aplicaciton is in a glade file, 15 windows +/- invoce form a php code thanks hola Gonzalo mi aplicacion funcion ok, solo quiero desactivar el boton de cerrar ventana ya que me destruye la clase que autogenera el php del glade odnde estan las ventanas dibujadas, me escribieron (no muy amablemente) con una solucion al respecto voy a tentar suerte con eso .. ojala funcione muchas gracias por tu ayuda saludos Gonzalo Monzón dijo: > 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 >> >> >> > > Hi 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 > > -- > PHP-GTK General Mailing List (http://gtk.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.gtk.general (#5094) next »