import homebank-5.1.2
[chaz/homebank] / src / hb-preferences.h
1 /* HomeBank -- Free, easy, personal accounting for everyone.
2 * Copyright (C) 1995-2016 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 #define DEFAULT_FORMAT_DATE "%x"
26
27 #define MAX_FRAC_DIGIT 6
28
29 //Tango light
30 #define LIGHT_EXP_COLOR "#fcaf3e" //Orange
31 #define LIGHT_INC_COLOR "#8ae234" //Chameleon
32 #define LIGHT_WARN_COLOR "#ef2929" //Scarlett Red
33
34 //Tango medium
35 #define MEDIUM_EXP_COLOR "#f57900" //Orange
36 #define MEDIUM_INC_COLOR "#73d216" //Chameleon
37 #define MEDIUM_WARN_COLOR "#cc0000" //Scarlett Red
38
39 //Tango dark
40 #define DEFAULT_EXP_COLOR "#ce5c00" //Orange
41 #define DEFAULT_INC_COLOR "#4e9a36" //Chameleon
42 #define DEFAULT_WARN_COLOR "#a40000" //Scarlett Red
43
44 /*
45 ** Preference datas
46 */
47
48 struct WinGeometry
49 {
50 gint l, t, w, h, s;
51 };
52
53
54 struct Preferences
55 {
56 //general
57 gboolean showsplash;
58 gboolean loadlast;
59 gboolean appendscheduled;
60 gboolean do_update_currency;
61 gshort fisc_year_day;
62 gshort fisc_year_month;
63 gint date_range_wal;
64 gchar *path_hbfile;
65
66 //interface
67 gchar *language;
68 gshort toolbar_style;
69 //gboolean rules_hint;
70 gshort grid_lines;
71 gboolean custom_colors;
72 gchar *color_exp;
73 gchar *color_inc;
74 gchar *color_warn;
75
76 //transactions
77 gint date_range_txn;
78 gint date_future_nbdays;
79 gboolean hidereconciled;
80 gboolean showremind;
81 gboolean heritdate;
82 gint lst_ope_columns[NUM_LST_DSPOPE+1];
83 gint lst_ope_col_size[NUM_LST_DSPOPE+1];
84 gint lst_ope_sort_id; // -- implicit --
85 gint lst_ope_sort_order; // -- implicit --
86
87 //display format
88 gchar *date_format;
89 gchar IntCurrSymbol[8];
90 gboolean vehicle_unit_ismile; // true if unit is mile, default Km
91 gboolean vehicle_unit_isgal; // true if unit is gallon, default Liter
92
93 //data exchange options
94 gboolean dtex_nointro;
95 gint dtex_datefmt;
96 gint dtex_ofxname;
97 gint dtex_ofxmemo;
98 gboolean dtex_qifmemo;
99 gboolean dtex_qifswap;
100 gchar *path_import;
101 gchar *path_export;
102
103 //report options
104 gint date_range_rep;
105 gint report_color_scheme;
106 gboolean stat_byamount;
107 gboolean stat_showrate;
108 gboolean stat_showdetail;
109 gboolean budg_showdetail;
110
111 //euro zone
112 gboolean euro_active;
113 gint euro_country;
114 gdouble euro_value;
115 Currency minor_cur;
116
117 //chart options
118 //gboolean chart_legend;
119
120 /* windows/dialogs size an position */
121 struct WinGeometry wal_wg;
122 struct WinGeometry acc_wg;
123 struct WinGeometry sta_wg;
124 struct WinGeometry tme_wg;
125 struct WinGeometry ove_wg;
126 struct WinGeometry bud_wg;
127 struct WinGeometry cst_wg;
128
129 struct WinGeometry txn_wg;
130
131 gboolean wal_toolbar;
132 gboolean wal_spending;
133 gboolean wal_upcoming;
134
135 gint wal_vpaned;
136 gint wal_hpaned;
137
138 //vehiclecost units (mile/gal or km/liters)
139
140 gchar *vehicle_unit_dist;
141 gchar *vehicle_unit_vol;
142 gchar *vehicle_unit_100;
143 gchar *vehicle_unit_distbyvol;
144
145 };
146
147
148 void homebank_prefs_set_default(void);
149 void homebank_pref_free(void);
150 void homebank_pref_createformat(void);
151 void homebank_pref_init_measurement_units(void);
152 gboolean homebank_pref_load(void);
153 gboolean homebank_pref_save(void);
154 void homebank_pref_setdefault(void);
155
156 #endif
This page took 0.045351 seconds and 4 git commands to generate.