Closing a window



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;
  nextstep = create_srcStepTwo();
  gtk_widget_show(nextstep);
  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.




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