]> Dogcows Code - chaz/homebank/blob - src/hb-preferences.h
import homebank-5.2.6
[chaz/homebank] / src / hb-preferences.h
1 /* HomeBank -- Free, easy, personal accounting for everyone.
2 * Copyright (C) 1995-2019 Maxime DOYEN
3 *
4 * This file is part of HomeBank.
5 *
6 * HomeBank is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * HomeBank 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, see <http://www.gnu.org/licenses/>.
18 */
19
20 #ifndef __HB_PREFERENCES_H__
21 #define __HB_PREFERENCES_H__
22
23 #include "hb-currency.h"
24
25
26 #define DEFAULT_FORMAT_DATE "%x"
27
28 #define MAX_FRAC_DIGIT 6
29
30 //Tango light
31 #define LIGHT_EXP_COLOR "#fcaf3e" //Orange
32 #define LIGHT_INC_COLOR "#8ae234" //Chameleon
33 #define LIGHT_WARN_COLOR "#ef2929" //Scarlett Red
34
35 //Tango medium
36 #define MEDIUM_EXP_COLOR "#f57900" //Orange
37 #define MEDIUM_INC_COLOR "#73d216" //Chameleon
38 #define MEDIUM_WARN_COLOR "#cc0000" //Scarlett Red
39
40 //Tango dark
41 #define DEFAULT_EXP_COLOR "#ce5c00" //Orange
42 #define DEFAULT_INC_COLOR "#4e9a36" //Chameleon
43 #define DEFAULT_WARN_COLOR "#a40000" //Scarlett Red
44
45
46 #define PRF_DTEX_CSVSEP_BUFFER "\t,; "
47 enum {
48 PRF_DTEX_CSVSEP_TAB,
49 PRF_DTEX_CSVSEP_COMMA,
50 PRF_DTEX_CSVSEP_SEMICOLON,
51 PRF_DTEX_CSVSEP_SPACE,
52 };
53
54
55 /*
56 ** Preference datas
57 */
58
59 struct WinGeometry
60 {
61 gint l, t, w, h, s;
62 };
63
64
65 struct Preferences
66 {
67 //general
68 gboolean showsplash;
69 gboolean loadlast;
70 gboolean appendscheduled;
71 gboolean do_update_currency;
72 gint date_range_wal;
73
74 //interface
75 gshort toolbar_style;
76
77 gboolean icon_symbolic;
78 gshort grid_lines;
79 gboolean custom_colors;
80 gchar *color_exp;
81 gchar *color_inc;
82 gchar *color_warn;
83
84 //locale
85 gchar *language;
86 gchar *date_format;
87 gshort fisc_year_day;
88 gshort fisc_year_month;
89 gboolean vehicle_unit_ismile; // true if unit is mile, default Km
90 gboolean vehicle_unit_isgal; // true if unit is gallon, default Liter
91
92 //transactions
93 gint date_range_txn;
94 gint date_future_nbdays;
95 gboolean hidereconciled;
96 gboolean showremind;
97 gboolean heritdate;
98 gboolean txn_memoacp;
99 gshort txn_memoacp_days;
100
101 //import/export
102 gint dtex_datefmt;
103 gint dtex_ofxname;
104 gint dtex_ofxmemo;
105 gboolean dtex_qifmemo;
106 gboolean dtex_qifswap;
107 gboolean dtex_ucfirst;
108 gint dtex_csvsep;
109
110 //report options
111 gint date_range_rep;
112 gint report_color_scheme;
113 gboolean stat_byamount;
114 gboolean stat_showrate;
115 gboolean stat_showdetail;
116 gboolean budg_showdetail;
117
118 //backup option
119 gboolean bak_is_automatic;
120 gshort bak_max_num_copies;
121
122 //folders
123 gchar *path_hbfile;
124
125 gchar *path_import;
126 gchar *path_export;
127 gchar *path_attach;
128
129 //euro zone
130 gboolean euro_active;
131 gint euro_country;
132 gdouble euro_value;
133 Currency minor_cur;
134
135
136 //---- others data -----
137 gboolean dtex_nointro;
138 gchar IntCurrSymbol[8];
139 gint lst_impope_columns[NUM_LST_DSPOPE+1];
140 gint lst_ope_columns[NUM_LST_DSPOPE+1];
141 gint lst_ope_col_width[NUM_LST_DSPOPE+1];
142 gint lst_ope_sort_id; // -- implicit --
143 gint lst_ope_sort_order; // -- implicit --
144
145 /* windows/dialogs size an position */
146 struct WinGeometry wal_wg;
147 struct WinGeometry acc_wg;
148
149 struct WinGeometry sta_wg;
150 struct WinGeometry tme_wg;
151 struct WinGeometry ove_wg;
152 struct WinGeometry bud_wg;
153 struct WinGeometry cst_wg;
154
155 struct WinGeometry txn_wg;
156
157 // main window stuffs
158 gboolean wal_toolbar;
159 gboolean wal_spending;
160 gboolean wal_upcoming;
161
162 gint wal_vpaned;
163 gint wal_hpaned;
164
165 //home panel
166 gshort pnl_acc_col_acc_width;
167 gshort pnl_acc_show_by;
168 gshort pnl_upc_col_pay_width;
169 gshort pnl_upc_col_mem_width;
170 gchar *pnl_list_tab;
171
172 //vehiclecost units (mile/gal or km/liters)
173
174 gchar *vehicle_unit_dist;
175 gchar *vehicle_unit_vol;
176 gchar *vehicle_unit_100;
177 gchar *vehicle_unit_distbyvol;
178
179 };
180
181
182 void homebank_prefs_set_default(void);
183 void homebank_pref_free(void);
184 void homebank_pref_createformat(void);
185 void homebank_pref_init_measurement_units(void);
186 gboolean homebank_pref_load(void);
187 gboolean homebank_pref_save(void);
188 void homebank_pref_setdefault(void);
189
190 #endif
This page took 0.040873 seconds and 5 git commands to generate.