1 /*                                                     -*- linux-c -*-
2     Copyright (C) 2004 Tom Szilagyi
3 
4     This program is free software; you can redistribute it and/or modify
5     it under the terms of the GNU General Public License as published by
6     the Free Software Foundation; either version 2 of the License, or
7     (at your option) any later version.
8 
9     This program is distributed in the hope that it will be useful,
10     but WITHOUT ANY WARRANTY; without even the implied warranty of
11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12     GNU General Public License for more details.
13 
14     You should have received a copy of the GNU General Public License
15     along with this program; if not, write to the Free Software
16     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 
18     $Id: options.h 1234 2012-02-04 10:27:18Z assworth $
19 */
20 
21 #ifndef AQUALUNG_OPTIONS_H
22 #define AQUALUNG_OPTIONS_H
23 
24 #include "common.h"
25 
26 typedef struct {
27 	int button_nr;
28 	int command;
29 } mouse_button_command_t;
30 
31 typedef struct {
32 
33 	/* home directory */
34 	char home[MAXLEN];
35 
36 	/* normally $HOME/.aqualung */
37 	char confdir[MAXLEN];
38 
39 	/* current working directory when program is started */
40 	char cwd[MAXLEN];
41 
42 	/* to keep track of file selector dialogs; start with $HOME */
43 	char audiodir[MAXLEN];
44 	char currdir[MAXLEN];
45 	char exportdir[MAXLEN];
46 	char plistdir[MAXLEN];
47 	char podcastdir[MAXLEN];
48 	char ripdir[MAXLEN];
49 	char storedir[MAXLEN];
50 
51 	/* directory of skin in use */
52 	char skin[MAXLEN];
53 
54 	/* Misc - not accessible from the Settings dialog */
55 	float vol;
56 	float bal;
57 	int time_idx[3];
58 	int main_pos_x;
59 	int main_pos_y;
60 	int main_size_x;
61 	int main_size_y;
62 	int browser_pos_x;
63 	int browser_pos_y;
64 	int browser_size_x;
65 	int browser_size_y;
66 	int browser_on;
67 	int browser_paned_pos;
68 	int playlist_pos_x;
69 	int playlist_pos_y;
70 	int playlist_size_x;
71 	int playlist_size_y;
72 	int playlist_on;
73 	int repeat_on;
74 	int repeat_all_on;
75 	int shuffle_on;
76 
77 	int search_pl_flags;
78 	int search_ms_flags;
79         int ifpmanager_size_x;
80         int ifpmanager_size_y;
81 	float loop_range_start;
82 	float loop_range_end;
83 	int wm_systray_warn;
84 	int podcasts_autocheck;
85 
86 	int cdrip_deststore;
87         int cdrip_file_format;
88         int cdrip_bitrate;
89         int cdrip_vbr;
90         int cdrip_metadata;
91 
92 	char export_template[MAXLEN];
93 	int export_subdir_artist;
94 	int export_subdir_album;
95 	int export_subdir_limit;
96         int export_file_format;
97         int export_bitrate;
98         int export_vbr;
99         int export_metadata;
100 	int export_filter_same;
101 	int export_excl_enabled;
102 	char export_excl_pattern[MAXLEN];
103 
104 	int batch_tag_flags;
105 
106 	/* General */
107 	char title_format[MAXLEN];
108 	char default_param[MAXLEN];
109 	int enable_tooltips;
110    	int disable_buttons_relief;
111 	int combine_play_pause;
112 	int combine_play_pause_shadow;
113 	int simple_view_in_fx;
114 	int simple_view_in_fx_shadow;
115 	int show_sn_title;
116 	int united_minimization;
117 	int show_hidden;
118    	int main_window_always_on_top;
119 	int tags_tab_first;
120 	int dont_show_cover;
121 	int use_external_cover_first;
122 	int show_cover_for_ms_tracks_only;
123 	int use_systray;
124 	int systray_start_minimized;
125 	int systray_mouse_wheel_horizontal;
126 	int systray_mouse_wheel_vertical;
127 	int systray_mouse_buttons_count;
128 	mouse_button_command_t * systray_mouse_buttons;
129 
130 	/* Playlist */
131 	int playlist_is_embedded;
132 	int playlist_is_embedded_shadow;
133 	int buttons_at_the_bottom;
134 	int buttons_at_the_bottom_shadow;
135 	int playlist_always_show_tabs;
136 	int playlist_show_close_button_in_tab;
137 	int playlist_is_tree;
138 	int album_shuffle_mode;
139 	int auto_save_playlist;
140 	int playlist_auto_save;
141 	int playlist_auto_save_int;
142 	int enable_playlist_statusbar;
143 	int enable_playlist_statusbar_shadow;
144 	int pl_statusbar_show_size;
145 	int show_rva_in_playlist;
146 	int show_length_in_playlist;
147 	int show_active_track_name_in_bold;
148 	int auto_roll_to_active_track;
149 	int enable_pl_rules_hint;
150 	int plcol_idx[3];
151 
152 	/* Music Store */
153 	int hide_comment_pane;
154 	int hide_comment_pane_shadow;
155 	int enable_mstore_statusbar;
156 	int enable_mstore_statusbar_shadow;
157 	int ms_statusbar_show_size;
158    	int enable_mstore_toolbar;
159 	int enable_mstore_toolbar_shadow;
160 	int autoexpand_stores;
161 	int enable_ms_rules_hint;
162 	int enable_ms_tree_icons;
163 	int enable_ms_tree_icons_shadow;
164 	int ms_confirm_removal;
165 	int cover_width;
166 	int magnify_smaller_images;
167 
168 	/* DSP */
169 	int ladspa_is_postfader;
170 	int src_type;
171 
172 	/* RVA */
173 	int rva_is_enabled;
174 	int rva_env;
175 	float rva_refvol;
176 	float rva_steepness;
177 	int rva_use_averaging;
178 	int rva_use_linear_thresh;
179 	float rva_avg_linear_thresh;
180 	float rva_avg_stddev_thresh;
181 	float rva_no_rva_voladj;
182 
183 	/* Metadata */
184 	int replaygain_tag_to_use;
185 	int batch_mpeg_add_id3v1;
186 	int batch_mpeg_add_id3v2;
187 	int batch_mpeg_add_ape;
188 	char encode_set[MAXLEN];
189 	int metaedit_auto_clone;
190 	int meta_use_basename_only;
191 	int meta_rm_extension;
192 	int meta_us_to_space;
193 
194 	/* CD audio */
195 	int cdda_drive_speed;
196 	int cdda_paranoia_mode;
197 	int cdda_paranoia_maxretries;
198 	int cdda_force_drive_rescan;
199 	int cdda_add_to_playlist;
200 	int cdda_remove_from_playlist;
201 
202 	/* CDDB */
203 	char cddb_server[MAXLEN];
204 	int cddb_timeout;
205 	char cddb_email[MAXLEN];
206 	char cddb_local[MAXLEN];
207 	int cddb_cache_only;
208 	int cddb_use_http;
209 
210 	/* Internet */
211 	int inet_use_proxy;
212 	char inet_proxy[MAXLEN];
213 	int inet_proxy_port;
214 	char inet_noproxy_domains[MAXLEN];
215 	int inet_timeout;
216 
217 	/* Appearance */
218 	int disable_skin_support_settings;
219 	int override_skin_settings;
220 	char playlist_font[MAX_FONTNAME_LEN];
221 	char browser_font[MAX_FONTNAME_LEN];
222 	char bigtimer_font[MAX_FONTNAME_LEN];
223 	char smalltimer_font[MAX_FONTNAME_LEN];
224 	char songtitle_font[MAX_FONTNAME_LEN];
225 	char songinfo_font[MAX_FONTNAME_LEN];
226 	char statusbar_font[MAX_FONTNAME_LEN];
227 	char song_color[MAX_COLORNAME_LEN];
228 	char activesong_color[MAX_COLORNAME_LEN];
229 
230 	/* Lua */
231 	char ext_title_format_file[MAXLEN];
232 	int use_ext_title_format;
233 } options_t;
234 
235 enum {
236         SONG_COLOR = 1,
237         ACTIVE_SONG_COLOR
238 };
239 
240 // Mouse wheel commands on systray.
241 enum {
242 	SYSTRAY_MW_CMD_DO_NOTHING,
243 	SYSTRAY_MW_CMD_VOLUME,
244 	SYSTRAY_MW_CMD_BALANCE,
245 	SYSTRAY_MW_CMD_SONG_POSITION,
246 	SYSTRAY_MW_CMD_NEXT_PREV_SONG
247 };
248 
249 // Mouse buttons commands on systray.
250 enum {
251 	SYSTRAY_MB_CMD_PLAY_STOP_SONG,
252 	SYSTRAY_MB_CMD_PLAY_PAUSE_SONG,
253 	SYSTRAY_MB_CMD_PREV_SONG,
254 	SYSTRAY_MB_CMD_NEXT_SONG,
255 	SYSTRAY_MB_CMD_LAST
256 };
257 
258 enum {
259 	SYSTRAY_MB_COL_BUTTON,
260 	SYSTRAY_MB_COL_COMMAND,
261 	SYSTRAY_MB_LAST
262 };
263 
264 void create_options_window(void);
265 void append_ms_pathlist(char * path, char * name);
266 
267 void options_store_watcher_start(void);
268 
269 void save_config(void);
270 void load_config(void);
271 void finalize_options(void);
272 
273 
274 #endif /* AQUALUNG_OPTIONS_H */
275 
276 
277 // vim: shiftwidth=8:tabstop=8:softtabstop=8 :
278