/********************************************************************\ * gnc_file_csv_export * * opens up a assistant to export accounts or transactions based on * * the type. * * Args: export_type * * Return: nothing * \********************************************************************/ void gnc_file_csv_export (CsvExportType export_type) { CsvExportInfo *info; info = g_new0 (CsvExportInfo, 1); info->export_type = export_type; csv_export_assistant_create (info); gnc_register_gui_component (ASSISTANT_CSV_EXPORT_CM_CLASS, NULL, csv_export_close_handler, info); gtk_widget_show_all (info->window); gnc_window_adjust_for_screen (GTK_WINDOW(info->window)); }
static void gnc_file_csv_export_internal (CsvExportType export_type, Query *q, Account *acc) { CsvExportInfo *info; info = g_new0 (CsvExportInfo, 1); info->export_type = export_type; if (q) info->query = q; if (acc) info->account = acc; if ((export_type == XML_EXPORT_REGISTER) && acc) info->csva.num_accounts = 1; csv_export_assistant_create (info); gnc_register_gui_component (ASSISTANT_CSV_EXPORT_CM_CLASS, NULL, csv_export_close_handler, info); gtk_widget_show_all (info->window); gnc_window_adjust_for_screen (GTK_WINDOW(info->window)); }