]> Dogcows Code - chaz/homebank/blob - src/hb-preferences.h
add gitignore
[chaz/homebank] / src / hb-preferences.h
1 /* HomeBank -- Free, easy, personal accounting for everyone.
2 * Copyright (C) 1995-2014 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 #define DEFAULT_FORMAT_DATE "%x"
24
25 #define MAX_FRAC_DIGIT 6
26
27 //Tango light
28 #define LIGHT_EXP_COLOR "#fcaf3e" //Orange
29 #define LIGHT_INC_COLOR "#8ae234" //Chameleon
30 #define LIGHT_WARN_COLOR "#ef2929" //Scarlett Red
31
32 //Tango medium
33 #define MEDIUM_EXP_COLOR "#f57900" //Orange
34 #define MEDIUM_INC_COLOR "#73d216" //Chameleon
35 #define MEDIUM_WARN_COLOR "#cc0000" //Scarlett Red
36
37 //Tango dark
38 #define DEFAULT_EXP_COLOR "#ce5c00" //Orange
39 #define DEFAULT_INC_COLOR "#4e9a36" //Chameleon
40 #define DEFAULT_WARN_COLOR "#a40000" //Scarlett Red
41
42 /*
43 ** Preference datas
44 */
45 struct CurrencyFmt
46 {
47 //gchar *prefix_symbol; /* max symbol is 3 digits in unicode */
48 //gchar *suffix_symbol; /* but mostly is 1 digit, and most are prefix ~100 */
49 gchar *symbol;
50 gboolean is_prefix;
51 gchar *decimal_char;
52 gchar *grouping_char;
53 gshort frac_digits;
54 gchar format[8]; /* hold decimal format: '%.xf' */
55 gchar monfmt[32]; /* hold monetary format: 'prefix %s suffix' */
56 };
57
58 struct WinGeometry
59 {
60 gint l, t, w, h, s;
61 };
62
63
64 struct Preferences
65 {
66 //general
67 gboolean showsplash;
68 gboolean loadlast;
69 gboolean appendscheduled;
70
71 gchar *language;
72
73 gchar *path_hbfile;
74 gchar *path_import;
75 gchar *path_export;
76
77 gboolean heritdate;
78 gboolean hidereconciled;
79 gint date_range_wal;
80 gint date_range_txn;
81 gint date_range_rep;
82
83 gshort fisc_year_day;
84 gshort fisc_year_month;
85
86 //interface
87 gshort toolbar_style;
88 gboolean custom_colors;
89 gchar *color_exp;
90 gchar *color_inc;
91 gchar *color_warn;
92 gboolean rules_hint;
93
94 //display format
95 gchar *date_format;
96
97 struct CurrencyFmt base_cur;
98
99 //gshort num_nbdecimal;
100 //gboolean num_separator;
101 //gboolean imperial_unit;
102
103 //help system
104 //gboolean show_tooltips;
105 //gboolean show_help_button;
106 //gboolean show_tipofday;
107 //gchar *path_navigator;
108
109 //currency
110 //gchar *curr_default;
111
112 //euro zone
113 gboolean euro_active;
114 gint euro_country;
115 gdouble euro_value;
116
117 struct CurrencyFmt minor_cur;
118
119 //gshort euro_nbdec;
120 //gboolean euro_thsep;
121 //gchar *euro_symbol;
122
123 //report options
124 gboolean stat_byamount;
125 gboolean stat_showrate;
126 gboolean stat_showdetail;
127 gboolean budg_showdetail;
128 gint report_color_scheme;
129
130 //data exchange options
131 gint dtex_ofxmemo;
132 gint dtex_datefmt;
133
134 //chart options
135 gboolean chart_legend;
136
137
138
139 /* internal : not saved*/
140
141 gint lst_ope_columns[NUM_LST_DSPOPE+1];
142 gint lst_ope_sort_id;
143 gint lst_ope_sort_order;
144
145 /* windows size an position */
146 struct WinGeometry wal_wg;
147 struct WinGeometry acc_wg;
148 struct WinGeometry sta_wg;
149 struct WinGeometry tme_wg;
150 struct WinGeometry ove_wg;
151 struct WinGeometry bud_wg;
152 struct WinGeometry cst_wg;
153
154 gboolean wal_toolbar;
155 gboolean wal_spending;
156 gboolean wal_upcoming;
157
158 gint wal_vpaned;
159 gint wal_hpaned;
160
161 //vehiclecost units (mile/gal or km/liters)
162 gboolean vehicle_unit_ismile; // true is unit is mile, default Km
163 gboolean vehicle_unit_isgal; // true is unit is gallon, default Liter
164
165 gchar *vehicle_unit_dist;
166 gchar *vehicle_unit_vol;
167 gchar *vehicle_unit_100;
168 gchar *vehicle_unit_distbyvol;
169
170 };
171
172
173 void homebank_prefs_set_default(void);
174 void homebank_pref_free(void);
175 void homebank_pref_createformat(void);
176 void homebank_pref_init_measurement_units(void);
177 gboolean homebank_pref_load(void);
178 gboolean homebank_pref_save(void);
179 void homebank_pref_setdefault(void);
180
181 #endif
This page took 0.041344 seconds and 4 git commands to generate.