Click and DESTROY



I have taken on the opportunity to learn Gtk+. Part of my program calls a function that displays a Dialog 
box, but I don't know how to destroy the Dialog window when by pressing the OK button.

I have attached a copy of a file that has the function in question in the hope that someone here would be 
able to tell me how to go about it.

Thanks in advance

--
The difference between a GRINGO and an AMERICAN is that the
AMERICAN believes that the name of his country is the name
of the continent his country is in, and the GRINGO... well
he is a US citizen who's stupid enough to believe it.


void work_in_progres{
        gchar msg[] = "Under construction...";
        GtkWidget *dialog, *lblMessage, *btnOK, *vbox, *hbox;
        
        
        dialog = gtk_dialog_new();
        
        lblMessage = gtk_label_new(msg);
        btnOK = gtk_button_new_with_label("OK");
        
        vbox = GTK_DIALOG(dialog)->vbox;
        gtk_box_pack_start(GTK_BOX(vbox),lblMessage, FALSE, FALSE, NO_PADING);
        
        hbox = GTK_DIALOG(dialog)->action_area;
        gtk_box_pack_start(GTK_BOX(hbox),btnOK, FALSE, FALSE, NO_PADING);
        
        gtk_widget_show_all(dialog);
        
        /* Callback */

gtk_signal_connect_object( GTK_OBJECT(dialog),"activate",
                           GTK_SIGNAL_FUNC(eventBtnOK),NULL);
}


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