Destroying a Dialog Box....

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

 



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
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list


[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux