GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
assistant-csv-account-import.h
Go to the documentation of this file.
1 /*******************************************************************\
2  * assistant-csv-account-import.h -- An assistant for importing *
3  * Accounts from a file. *
4  * *
5  * Copyright (C) 2012 Robert Fewell *
6  * *
7  * This program is free software; you can redistribute it and/or *
8  * modify it under the terms of the GNU General Public License as *
9  * published by the Free Software Foundation; either version 2 of *
10  * the License, or (at your option) any later version. *
11  * *
12  * This program is distributed in the hope that it will be useful, *
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15  * GNU General Public License for more details. *
16  * *
17  * You should have received a copy of the GNU General Public License*
18  * along with this program; if not, contact: *
19  * *
20  * Free Software Foundation Voice: +1-617-542-5942 *
21  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
22  * Boston, MA 02110-1301, USA [email protected] *
23 \********************************************************************/
28 #ifndef GNC_ASSISTANT_CSV_IMPORT_H
29 #define GNC_ASSISTANT_CSV_IMPORT_H
30 
31 
32 // Account tree model
33 enum tree_import_model_columns
34 {
35  TYPE, FULL_NAME, NAME, CODE, DESCRIPTION, COLOR,
36  NOTES, COMMODITYM, COMMODITYN, HIDDEN, TAX, PLACE_HOLDER, ROW_COLOR,
37  N_COLUMNS
38 };
39 
40 typedef struct
41 {
42  GtkWidget *window;
43  GtkWidget *assistant;
44 
45  GtkWidget *file_chooser;
46  GtkWidget *tree_view;
47  GtkListStore *store;
48  GString *regexp;
49  GtkWidget *header_row_spin;
50  GtkWidget *finish_label;
51  GtkWidget *summary_label;
52  GtkWidget *summary_error_view;
53 
54  gchar *starting_dir;
55  gchar *file_name;
56  gchar *error;
57 
58  int header_rows;
59  int num_new;
60  int num_updates;
61  gboolean new_book;
63 
64 
68 void gnc_file_csv_account_import (void);
69 #endif
void gnc_file_csv_account_import(void)