Destroying a Dialog Box....



within a dialog box called 'popup',

I've this cancel button in the action area..

button = gtk_button_new_with_label ("Cancel");
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (close_dialog), (gpointer) popup);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (popup)->action_area),
                        button, TRUE, TRUE, 0);
gtk_widget_show (button);
	
and in the callback, I'm doing this..

static void close_dialog( GtkWidget *widget,
               GtkWidget *parent ){

	      gtk_widget_destroy(parent);

}

Basically, I'm trying to put a cancel button which closes the dialog..
	
Is this a proper method or is there any 'proper' way of doing this?


-h.p	
	
hpnadig
http://www.hpnadig.com



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