Re: Closing a window



On Thu, 2004-03-18 at 11:46, Ruben Rubio wrote:
Hi,

My name is Ruben and i just have been join to the mailing list.

I have started to programming in GTK, but I have a question, that i
think that it will be very easy but im not able to find in docs how to
do it.

The think is, im creating a GTK app using Glade, and I want when a
person click on next it will create a new window and will close the
first one.

I have tried a lot. Im able to open the new window but I dont know how
to close the first one. This is my last code:

on_cmdNext_clicked (GtkButton *button,
                                        gpointer         user_data)
{
                                                                                                                             
  GtkWidget *nextstep;
       GtkWidget     *oldwindow;
  nextstep = create_srcStepTwo();
  gtk_widget_show(nextstep);
      oldwindow=lookup_widget( button , "window1");
        // in interface.c : GLADE_HOOKUP_OBJECT_NO_REF (window1, window1, "window1");
      gtk_widget_destroy( oldwindow );
  //gtk_widget_destroy (button); //Here fails How can i get the pointer to
			       // the first window??
}

The name of the window is srcStepOne.

Probably will be somethink is very simple but Im not able to do it !!!

Thanks in advance.

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


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