gnome-dialog question



I have a gnome_dialog with two buttons:

d=gnome_dialog_new(title,GNOME_STOCK_BUTTON_CANCEL,_("Create"),NULL);

The CANCEL button schould close the dialog, so i've done the following:

list = g_list_nth (GNOME_DIALOG(d)->buttons,0);
gtk_signal_connect_object(GTK_OBJECT(list->data), "clicked",
                       GTK_SIGNAL_FUNC(gtk_widget_destroy),(gpointer)d);

gnome_dialog_button_connect(GNOME_DIALOG(d),1,
                              GTK_SIGNAL_FUNC(partition_create),
                              NULL);

Is there a better way? I think I nedd something like this:

gnome_dialog_button_connect_object(GNOME_DIALOG(d),0,
                              GTK_SIGNAL_FUNC(gtk_widget_destroy),
                              (gpointer)d);



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