static void gnc_column_view_edit_destroy(gnc_column_view_edit * view) { gnc_options_dialog_destroy(view->optwin); scm_gc_unprotect_object(view->options); scm_gc_unprotect_object(view->view); gnc_option_db_destroy(view->odb); g_free(view); }
/******************************************************** * For a new book the assistant will also allow the user * to set default book options, because this impacts how * transactions are created. * Ideally, the book options code can cleanly provide us * with a page to insert in the assistant and be done with * it. Unfortunately this is not possible without a serious * rewrite of the options dialog code. * So instead the following hack is used: * we create the complete dialog, but only use the notebook * part of it to create a new page. * To make sure this dialog is cleaned up properly * when the assistant closes, the close callback is set up anyway * and at the finish we'll send a "close" response signal to the * dialog to make it clean up after itself. */ static void book_options_dialog_close_cb(GNCOptionWin * optionwin, gpointer user_data) { GNCOptionDB * options = user_data; gnc_options_dialog_destroy(optionwin); gnc_option_db_destroy(options); }
static void gnc_style_sheet_options_close_cb(GNCOptionWin * propertybox, gpointer user_data) { ss_info * ssi = user_data; GtkTreeIter iter; if (gtk_tree_row_reference_valid (ssi->row_ref)) { StyleSheetDialog * ss = gnc_style_sheet_dialog; GtkTreePath *path = gtk_tree_row_reference_get_path (ssi->row_ref); if (gtk_tree_model_get_iter (GTK_TREE_MODEL(ss->list_store), &iter, path)) gtk_list_store_set (ss->list_store, &iter, COLUMN_DIALOG, NULL, -1); gtk_tree_path_free(path); } gtk_tree_row_reference_free (ssi->row_ref); gnc_options_dialog_destroy(ssi->odialog); gnc_option_db_destroy(ssi->odb); scm_gc_unprotect_object(ssi->stylesheet); g_free(ssi); }