Stéphane Genaud wrote:
> 
> Thnaks jeff for your answer.
> >
> > The handler on the destroy event needs to "eat" the
> > signal that caused it by returning TRUE. If you don't
> > do that then the delete event signal will be
> > propagated and somewhere further along in the handler
> > chain the default delete event handler will generate a
> > destroy event, which will then destroy the window.  So
> > you need to roll a little callback that wraps
> > gtk_widget_hide and returns TRUE and hook it up to
> > delete event.
> >
> 
> I have tried your solution but it does not work either.
> within glade, i have trapped the following signals :
> destroy,delete_event and destroy_event.
> All now points to a callback that returns true.
> 
> gint on_preferences_destroy(GtkWidget *widget, gpointer user_data) {
>     gtk_widget_hide( pref_dialog );
>     return( TRUE );
> }
> 
> Still, the destroy event seems to propagate to widgets contained in
> the popup window, since the next window re-opening generates :
> 
> Gtk-WARNING **: invalid cast from `(unknown)' to `GtkEntry'
> Gtk-WARNING **: invalid cast from `(unknown)' to `GtkObject'
> 
> which seems to apply to an entry widget i have in that window.
> does anyone has a clue ?

Try running it in gdb using 'r --g-fatal-warnings'.
You can then see exactly where the problem is.

If you really did return TRUE from the "delete_event" handler then the
window is probably not being destroyed by the window manager. I've
never had problems with this.

Damon


+---------------------------------------------------------------------+
To unsubscribe from this list, send a message to [EMAIL PROTECTED]
with the line "unsubscribe glade-devel" in the body of the message.

Reply via email to