Re: reinitialize application



On Fri, Mar 10, 2006 at 08:57:09PM +0100, Andreas Kotowicz wrote:
I tried the destroy and construct way:

void
on_button4_clicked                     (GtkButton       *button,
                                        gpointer         user_data)
{

 gtk_widget_destroy(gtk_widget_get_toplevel(GTK_WIDGET(button)));

 *GtkWidget *window1;
 window1 = create_window1 ();
 gtk_widget_show (window1); 
}

the widget gets destroyed, but the app closes.

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).

Gtk itself definitely does not terminate your app when some
window is closed, you had to explicitely set it up so.

Yeti


--
That's enough.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]