Re: Just need to close a secondary window via a button.



Mahlon Smith <reich internetcds com> writes: 
  if (fatal == 0) {
    /* just close the error window */
    gtk_signal_connect(GTK_OBJECT(errbutton), "clicked",
                     GTK_SIGNAL_FUNC(gtk_widget_destroy),
                     GTK_WIDGET(errwindow));

The callback for clicked looks like:
 void clicked_callback (GtkWidget *emitting_object, gpointer data);

You use gtk_widget_destroy as callback, it is:
 void gtk_widget_destroy (GtkWidget *widget);

ergo, you destroy the emitting object. You want to destroy the data,
which you pass in as the window.

Havoc




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