Re: How to prevent a window from being closed?
| From: | Tabber Watts | Date: | Tue, 15 Nov 2005 00:38:02 +0000 |
| Subject: | Re: How to prevent a window from being closed? | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-6341@lists.php.net to get a copy of this message | ||
You can accomplish this with by using the call of 'delete-event' and connect
it to any function that will return true. Hope this helps.
$window->connect_simple('delete-event', 'close_button_disabler');
function close_button_disabler() {
return true;
}
~Tabber
On 11/14/05, Florian Breit <florian@phpws.org> wrote:
>
> Hi folks!
>
> Currently I'm looking for a way to prevent a GtkWindow from being closed
> when the destroy signal is emitted (in this case by click on the X at
> the window).
> I tried something like connecting the destroy signal and then redraw the
> widget and so on, but doesn't work correctly.
> Are there any ideas how I may "disconnect" the internal destroy handler
> of php-gtk to ask the user if he really wants quit before closing the
> window?
>
> --
> PHP-GTK General Mailing List (http://gtk.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>