GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
gnc-csv-trans-settings.h
Go to the documentation of this file.
1 /*******************************************************************\
2  * gnc-csv-trans-settings.h -- Save and Load CSV Import Settings *
3  * *
4  * Copyright (C) 2014 Robert Fewell *
5  * *
6  * This program is free software; you can redistribute it and/or *
7  * modify it under the terms of the GNU General Public License as *
8  * published by the Free Software Foundation; either version 2 of *
9  * the License, or (at your option) any later version. *
10  * *
11  * This program is distributed in the hope that it will be useful, *
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14  * GNU General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU General Public License*
17  * along with this program; if not, contact: *
18  * *
19  * Free Software Foundation Voice: +1-617-542-5942 *
20  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
21  * Boston, MA 02110-1301, USA [email protected] *
22 \********************************************************************/
27 #ifndef GNC_CSV_TRANS_SETTINGS_H
28 #define GNC_CSV_TRANS_SETTINGS_H
29 
33 enum SEP_BUTTON_TYPES {SEP_SPACE, SEP_TAB, SEP_COMMA, SEP_COLON, SEP_SEMICOLON, SEP_HYPHEN,
34  SEP_NUM_OF_TYPES};
35 
37 enum SETTINGS_COL {SET_GROUP, SET_NAME};
38 
39 typedef struct
40 {
41  int header_rows; // Number of header rows
42  int footer_rows; // Number of footer rows
43  gboolean csv_format; // CSV import Format
44  gboolean skip_alt_rows; // Skip alternate rows
45 
46  const gchar *encoding; // File encoding
47 
48  gboolean separator[SEP_NUM_OF_TYPES]; // The seperators
49 
50  gboolean custom; // Custom entry set
51  const gchar *custom_entry; // Custom Entry
52 
53  int date_active; // Date Active id
54  int currency_active; // Currency Active id
55  const gchar *column_types; // The Column types in order
56  const gchar *column_widths; // The Column widths
57 } CsvSettings;
58 
65 void gnc_csv_trans_find_settings (GtkTreeModel *settings_store);
66 
76 gboolean gnc_csv_trans_save_settings (CsvSettings *settings_data, gchar *settings_name);
77 
88 gboolean gnc_csv_trans_load_settings (CsvSettings *settings_data, gchar *group);
89 
95 
98 void gnc_csv_trans_settings_data_free (CsvSettings *settings_data);
99 
100 #endif
CsvSettings * gnc_csv_trans_new_settings_data(void)
gboolean gnc_csv_trans_save_settings(CsvSettings *settings_data, gchar *settings_name)
void gnc_csv_trans_settings_data_free(CsvSettings *settings_data)
void gnc_csv_trans_find_settings(GtkTreeModel *settings_store)
gboolean gnc_csv_trans_load_settings(CsvSettings *settings_data, gchar *group)