On Fri, 2006-03-10 at 21:02 +0100, David Necas (Yeti) wrote:

> 
> If you have gtk_main_quit() connected to the "destroy"
> signal of the window, you should not be surprised that it
> does what you told it to do (quits Gtk main loop when the
> window it destroyed).

you are absolutely right - I've totally overlooked this. this is how I
solved the problem:

void
on_window1_destroy                     (GtkObject       *object,
                                        gpointer         user_data)
{
 if (destroy == TRUE) gtk_main_quit();
}


void
on_button4_clicked                     (GtkButton       *button,
                                        gpointer         user_data)
{

 destroy = FALSE;
 reset_variables;

 gtk_widget_destroy(gtk_widget_get_toplevel(GTK_WIDGET(button)));
 
 GtkWidget *window1;
 window1 = create_window1 ();
 gtk_widget_show (window1);
 
 destroy = TRUE;
}


andreas

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to