]> Dogcows Code - chaz/homebank/blob - src/hb-preferences.h
Merge branch 'upstream'
[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 ** Preference datas
47 */
48
49 struct WinGeometry
50 {
51 gint l, t, w, h, s;
52 };
53
54
55 struct Preferences
56 {
57 //general
58 gboolean showsplash;
59 gboolean loadlast;
60 gboolean appendscheduled;
61 gboolean do_update_currency;
62 gint date_range_wal;
63
64 //interface
65 gshort toolbar_style;
66
67 gboolean icon_symbolic;
68 gshort grid_lines;
69 gboolean custom_colors;
70 gchar *color_exp;
71 gchar *color_inc;
72 gchar *color_warn;
73
74 //locale
75 gchar *language;
76 gchar *date_format;
77 gshort fisc_year_day;
78 gshort fisc_year_month;
79 gboolean vehicle_unit_ismile; // true if unit is mile, default Km
80 gboolean vehicle_unit_isgal; // true if unit is gallon, default Liter
81
82 //transactions
83 gint date_range_txn;
84 gint date_future_nbdays;
85 gboolean hidereconciled;
86 gboolean showremind;
87 gboolean heritdate;
88 gboolean txn_memoacp;
89 gshort txn_memoacp_days;
90
91 //import/export
92 gint dtex_datefmt;
93 gint dtex_ofxname;
94 gint dtex_ofxmemo;
95 gboolean dtex_qifmemo;
96 gboolean dtex_qifswap;
97 gboolean dtex_ucfirst;
98
99 //report options
100 gint date_range_rep;
101 gint report_color_scheme;
102 gboolean stat_byamount;
103 gboolean stat_showrate;
104 gboolean stat_showdetail;
105 gboolean budg_showdetail;
106
107 //backup option
108 gboolean bak_is_automatic;
109 gshort bak_max_num_copies;
110
111 //folders
112 gchar *path_hbfile;
113
114 gchar *path_import;
115 gchar *path_export;
116 gchar *path_attach;
117
118 //euro zone
119 gboolean euro_active;
120 gint euro_country;
121 gdouble euro_value;
122 Currency minor_cur;
123
124
125 //---- others data -----
126 gboolean dtex_nointro;
127 gchar IntCurrSymbol[8];
128 gint lst_impope_columns[NUM_LST_DSPOPE+1];
129 gint lst_ope_columns[NUM_LST_DSPOPE+1];
130 gint lst_ope_col_width[NUM_LST_DSPOPE+1];
131 gint lst_ope_sort_id; // -- implicit --
132 gint lst_ope_sort_order; // -- implicit --
133
134 /* windows/dialogs size an position */
135 struct WinGeometry wal_wg;
136 struct WinGeometry acc_wg;
137
138 struct WinGeometry sta_wg;
139 struct WinGeometry tme_wg;
140 struct WinGeometry ove_wg;
141 struct WinGeometry bud_wg;
142 struct WinGeometry cst_wg;
143
144 struct WinGeometry txn_wg;
145
146 // main window stuffs
147 gboolean wal_toolbar;
148 gboolean wal_spending;
149 gboolean wal_upcoming;
150
151 gint wal_vpaned;
152 gint wal_hpaned;
153
154 //home panel
155 gshort pnl_acc_col_acc_width;
156 gshort pnl_acc_show_by;
157 gshort pnl_upc_col_pay_width;
158 gshort pnl_upc_col_mem_width;
159 gchar *pnl_list_tab;
160
161 //vehiclecost units (mile/gal or km/liters)
162
163 gchar *vehicle_unit_dist;
164 gchar *vehicle_unit_vol;
165 gchar *vehicle_unit_100;
166 gchar *vehicle_unit_distbyvol;
167
168 };
169
170
171 void homebank_prefs_set_default(void);
172 void homebank_pref_free(void);
173 void homebank_pref_createformat(void);
174 void homebank_pref_init_measurement_units(void);
175 gboolean homebank_pref_load(void);
176 gboolean homebank_pref_save(void);
177 void homebank_pref_setdefault(void);
178
179 #endif
This page took 0.039247 seconds and 4 git commands to generate.