Re: GtkDialog and `delete-event'
- From: Paul Pogonyshev <pogonyshev gmx net>
- To: gtk-app-devel-list gnome org
- Subject: Re: GtkDialog and `delete-event'
- Date: Wed, 17 Mar 2004 03:26:43 +0200
I wrote:
Hi.
Is there any way I could cleanly prevent a GtkDialog from being deleted?
The normal procedure is to connect gtk_true() to `delete-event', but it
won't work for GtkDialog (GtkFileSelection more precisely). Apparently,
the GtkDialog's handler of that event prevents any other handlers from
being run, but I don't understand how.
This code doesn't work:
g_signal_connect(dialog, "delete-event",
G_CALLBACK(gtk_true), NULL);
[...]
Of course it was my fault, not GTK+'s :( I used to write response
handlers like
if (response_id == ...) {
...
}
else
gtk_widget_destroy(...)
So, the widget was destroyed from within my own code, not by GTK+'s
handling of `delete' event. Now I write
else if (response_id == GTK_RESPONSE_CANCEL)
gtk_widget_destroy(...)
instead. Oh well, at least I know signal propagation guts better
now :), result accumulators and stuff.
Paul
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]