On 2001.05.09 01:16:45 +0200 Havoc Pennington wrote:
> 
> Ronald Bultje <[EMAIL PROTECTED]> writes:
> > On 2001.05.08 20:53:10 +0200 Havoc Pennington wrote:
> > > Do you gtk_main_quit() to exit gtk_main()?
> > 
> > yes
> ...
> > #4  0x400b9043 in gtk_main () from /usr/lib/libgtk-1.2.so.0
> 
> You are still in gtk_main(), so the answer is "no" not "yes" ;-)
> 
> Maybe you are not calling it when the window closes. Try
> connecting to "destroy" on the window being closed, and
> gtk_main_quit() then.

I already had:

gint delete_event( GtkWidget *widget, GdkEvent *event, gpointer data )
{
        return(FALSE);
}

void destroy( GtkWidget *widget, gpointer data )
{
        gtk_main_quit();
}

int main( int argc, char *argv[] )
{
        [...]
        gtk_signal_connect (GTK_OBJECT (window), "delete_event",
GTK_SIGNAL_FUNC (delete_event), NULL);
        gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC
(destroy), NULL);
        [...]
}

This is weird....:-\

> I forgot to mention that you need to GTK_WIDGET_SET_FLAGS (widget,
> GTK_CAN_FOCUS) in the init function for the widget.
> 

Ah, now it works :-), thanks

Ronald

-- 
---------------------------------------------------.
--   .-.    | Ronald Bultje                        |
--   /V\    | Running: Linux 2.4.4 and OpenBSD 2.8 |
--  // \\   | E-mail : [EMAIL PROTECTED] |
-- /(   )\  | WWW    : http://ronald.bitfreak.net/ |
--  ^^-^^   |    *** Warning: Unix Addicted ***    |
---------------------------------------------------'


_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list

Reply via email to