Re: reinitialize application
- From: Andreas Kotowicz <kotoml mynetix de>
- To: "David Necas (Yeti)" <yeti physics muni cz>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: reinitialize application
- Date: Fri, 10 Mar 2006 20:57:09 +0100
On Fri, 2006-03-10 at 20:19 +0100, David Necas (Yeti) wrote:
On Fri, Mar 10, 2006 at 07:40:25PM +0100, Andreas Kotowicz wrote:
so what I'm looking after is a way to clear all those entry fields any
other variables which might have changed during the running program.
so just reinitialize the app :)
If you want to reset state of some widgets to a predefined
state, just iterate through them and set their state. Or
destroy them and construct anew.
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. no new widget gets
created or displayed.
andreas
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]