annotate src/audacious/audconfig.c @ 4551:d09dd0960a6a

kill skin_load_cursor
author Tomasz Mon <desowin@gmail.com>
date Sun, 18 May 2008 08:59:01 +0200
parents d8920be7275a
children 51d82bf6ba63
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
1 /* Audacious - Cross-platform multimedia player
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
2 * Copyright (C) 2005-2008 Audacious development team.
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
3 *
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
4 * Based on BMP:
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
5 * Copyright (C) 2003-2004 BMP development team.
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
6 *
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
7 * Based on XMMS:
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
8 * Copyright (C) 1998-2003 XMMS development team.
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
9 *
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
10 * This program is free software; you can redistribute it and/or modify
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
11 * it under the terms of the GNU General Public License as published by
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
12 * the Free Software Foundation; under version 3 of the License.
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
13 *
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful,
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
17 * GNU General Public License for more details.
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
18 *
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
20 * along with this program. If not, see <http://www.gnu.org/licenses>.
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
21 *
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
22 * The Audacious team does not consider modular code linking to
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
23 * Audacious or using our public API to be a derived work.
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
24 */
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
25
4358
6478692415a0 fixed FTBFS
Eugene Zagidullin <e.asphyx@gmail.com>
parents: 4352
diff changeset
26 #ifdef HAVE_CONFIG_H
6478692415a0 fixed FTBFS
Eugene Zagidullin <e.asphyx@gmail.com>
parents: 4352
diff changeset
27 # include "config.h"
6478692415a0 fixed FTBFS
Eugene Zagidullin <e.asphyx@gmail.com>
parents: 4352
diff changeset
28 #endif
6478692415a0 fixed FTBFS
Eugene Zagidullin <e.asphyx@gmail.com>
parents: 4352
diff changeset
29
4523
b3e4f5c31546 Conditional USE_SRC was changed to USE_SAMPLERATE earlier.
Matti Hamalainen <ccr@tnsp.org>
parents: 4517
diff changeset
30 #ifdef USE_SAMPLERATE
4358
6478692415a0 fixed FTBFS
Eugene Zagidullin <e.asphyx@gmail.com>
parents: 4352
diff changeset
31 # include <samplerate.h>
6478692415a0 fixed FTBFS
Eugene Zagidullin <e.asphyx@gmail.com>
parents: 4352
diff changeset
32 #endif
6478692415a0 fixed FTBFS
Eugene Zagidullin <e.asphyx@gmail.com>
parents: 4352
diff changeset
33
4517
6e412073cf28 cleaned up some more
mf0102 <0102@gmx.at>
parents: 4513
diff changeset
34 #include "audconfig.h"
6e412073cf28 cleaned up some more
mf0102 <0102@gmx.at>
parents: 4513
diff changeset
35
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
36 #include "effect.h"
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
37 #include "general.h"
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
38 #include "playback.h"
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
39 #include "pluginenum.h"
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
40 #include "ui_equalizer.h"
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
41 #include "ui_playlist.h"
4517
6e412073cf28 cleaned up some more
mf0102 <0102@gmx.at>
parents: 4513
diff changeset
42 #include "ui_skin.h"
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
43 #include "ui_skinned_window.h"
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
44 #include "ui_vis.h"
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
45 #include "util.h"
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
46 #include "visualization.h"
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
47
4517
6e412073cf28 cleaned up some more
mf0102 <0102@gmx.at>
parents: 4513
diff changeset
48 AudConfig cfg;
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
49
4411
628926f505f8 BmpConfig -> AudConfig, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 4404
diff changeset
50 AudConfig aud_default_config = {
4456
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
51 .player_x = MAINWIN_DEFAULT_POS_X,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
52 .player_y = MAINWIN_DEFAULT_POS_Y,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
53 .equalizer_x = EQUALIZER_DEFAULT_POS_X,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
54 .equalizer_y = EQUALIZER_DEFAULT_POS_Y,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
55 .playlist_x = PLAYLISTWIN_DEFAULT_POS_X,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
56 .playlist_y = PLAYLISTWIN_DEFAULT_POS_Y,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
57 .playlist_width = PLAYLISTWIN_DEFAULT_WIDTH,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
58 .playlist_height = PLAYLISTWIN_DEFAULT_HEIGHT,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
59 .snap_distance = 10,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
60 .use_realtime = FALSE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
61 .shuffle = FALSE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
62 .repeat = FALSE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
63 .scaled = FALSE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
64 .autoscroll = TRUE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
65 .analyzer_peaks = TRUE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
66 .equalizer_autoload = FALSE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
67 .easy_move = FALSE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
68 .equalizer_active = FALSE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
69 .playlist_visible = FALSE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
70 .equalizer_visible = FALSE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
71 .player_visible = TRUE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
72 .player_shaded = FALSE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
73 .playlist_shaded = FALSE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
74 .equalizer_shaded = FALSE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
75 .allow_multiple_instances = FALSE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
76 .always_show_cb = TRUE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
77 .convert_underscore = TRUE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
78 .convert_twenty = TRUE, /* convert %20 */
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
79 .convert_slash = TRUE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
80 .show_numbers_in_pl = TRUE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
81 .snap_windows = TRUE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
82 .save_window_position = TRUE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
83 .dim_titlebar = TRUE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
84 .get_info_on_load = FALSE, /* get playlist info on load */
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
85 .get_info_on_demand = TRUE, /* get playlist info on demand */
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
86 .eq_scaled_linked = TRUE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
87 .sort_jump_to_file = FALSE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
88 .use_eplugins = FALSE, /* use effect plugins */
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
89 .always_on_top = FALSE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
90 .sticky = FALSE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
91 .no_playlist_advance = FALSE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
92 .stopaftersong = FALSE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
93 .refresh_file_list = TRUE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
94 .use_pl_metadata = TRUE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
95 .warn_about_win_visibility = TRUE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
96 .use_backslash_as_dir_delimiter = FALSE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
97 .random_skin_on_play = FALSE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
98 .use_fontsets = FALSE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
99 .mainwin_use_bitmapfont = TRUE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
100 .allow_broken_skins = FALSE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
101 .close_dialog_open = TRUE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
102 .close_dialog_add = TRUE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
103 .equalizer_preamp = 0.0,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
104 .equalizer_bands = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
4541
d8920be7275a set default scale_factor to 2.0, custom scale factor can be manually specified in config file anyway; use GDK_INTERP_NEAREST and GDK_RGB_DITHER_NONE when drawing scaled widgets
Tomasz Mon <desowin@gmail.com>
parents: 4526
diff changeset
105 .scale_factor = 2.0,
4456
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
106 .skin = NULL,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
107 .outputplugin = NULL,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
108 .filesel_path = NULL,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
109 .playlist_path = NULL,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
110 .playlist_font = NULL,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
111 .mainwin_font = NULL,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
112 .disabled_iplugins = NULL, /* disabled input plugins */
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
113 .enabled_gplugins = NULL, /* enabled general plugins */
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
114 .enabled_vplugins = NULL, /* enabled visualization plugins */
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
115 .enabled_eplugins = NULL, /* enabled effect plugins */
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
116 .enabled_dplugins = NULL, /* enabled discovery plugins */
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
117 .eqpreset_default_file = NULL,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
118 .eqpreset_extension = NULL,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
119 .url_history = NULL,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
120 .timer_mode = 0,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
121 .vis_type = VIS_ANALYZER,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
122 .analyzer_mode = ANALYZER_NORMAL,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
123 .analyzer_type = ANALYZER_BARS,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
124 .scope_mode = SCOPE_DOT,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
125 .voiceprint_mode = VOICEPRINT_NORMAL,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
126 .vu_mode = VU_SMOOTH,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
127 .vis_refresh = REFRESH_FULL,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
128 .analyzer_falloff = FALLOFF_FAST,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
129 .peaks_falloff = FALLOFF_SLOW,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
130 .playlist_position = 0,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
131 .pause_between_songs_time = 2,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
132 .pause_between_songs = FALSE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
133 .show_wm_decorations = FALSE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
134 .mouse_change = 8, /* mouse wheel scroll step */
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
135 .playlist_transparent = FALSE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
136 .eq_extra_filtering = TRUE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
137 .scroll_pl_by = 3,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
138 .resume_playback_on_startup = FALSE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
139 .resume_playback_on_startup_time = -1,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
140 .show_separator_in_pl = TRUE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
141 .chardet_detector = NULL,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
142 .chardet_fallback = NULL,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
143 .output_buffer_size = 500,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
144 .playlist_detect = TRUE, /* whether or not to postpone format detection on initial add */
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
145 .show_filepopup_for_tuple = TRUE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
146 .cover_name_include = NULL, /* words identifying covers */
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
147 .cover_name_exclude = NULL, /* words that might not show up in cover names */
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
148 .recurse_for_cover = FALSE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
149 .recurse_for_cover_depth = 0,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
150 .session_uri_base = NULL, /* default session uri base (non-NULL = custom session uri base) */
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
151 .filepopup_pixelsize = 150, /* short side length of the picture in the filepopup */
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
152 .filepopup_delay = 20, /* delay until the filepopup comes up */
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
153 .use_file_cover = FALSE, /* use filename.jpg for coverart */
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
154 .use_xmms_style_fileselector = FALSE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
155 .use_extension_probing = TRUE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
156 .colorize_r = 255, .colorize_g = 255, .colorize_b = 255,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
157 .filepopup_showprogressbar = TRUE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
158 .close_jtf_dialog = TRUE, /* close jtf dialog on jump */
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
159 .twoway_scroll = TRUE, /* use back and forth scroll */
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
160 .software_volume_control = FALSE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
161 .warn_about_broken_gtk_engines = TRUE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
162 .disable_inline_gtk = FALSE, /* disable inline themes */
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
163 .remember_jtf_entry = TRUE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
164 .output_bit_depth = 16,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
165 .enable_replay_gain = TRUE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
166 .enable_clipping_prevention = TRUE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
167 .replay_gain_track = TRUE, /* track mode */
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
168 .replay_gain_album = FALSE, /* album mode */
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
169 .enable_adaptive_scaler = FALSE,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
170 .replay_gain_preamp = 0.0,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
171 .default_gain = -9.0,
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
172 .saved_volume = 0x6464, /* for both channels; 0x64=100 */
4523
b3e4f5c31546 Conditional USE_SRC was changed to USE_SAMPLERATE earlier.
Matti Hamalainen <ccr@tnsp.org>
parents: 4517
diff changeset
173 #ifdef USE_SAMPLERATE
4456
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
174 .enable_src = FALSE, /* enable resampling */
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
175 .src_rate = 48000, /* samplerate */
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
176 .src_type = SRC_SINC_BEST_QUALITY, /* default interpolation method */
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
177 #endif
4456
3638e4151bae little cleanup; no functional change
mf0102 <0102@gmx.at>
parents: 4455
diff changeset
178 .bypass_dsp = FALSE,
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
179 };
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
180
4413
de33c83aa06f Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents: 4412
diff changeset
181 typedef struct aud_cfg_boolent_t {
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
182 char const *be_vname;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
183 gboolean *be_vloc;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
184 gboolean be_wrt;
4413
de33c83aa06f Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents: 4412
diff changeset
185 } aud_cfg_boolent;
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
186
4413
de33c83aa06f Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents: 4412
diff changeset
187 typedef struct aud_cfg_nument_t {
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
188 char const *ie_vname;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
189 gint *ie_vloc;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
190 gboolean ie_wrt;
4413
de33c83aa06f Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents: 4412
diff changeset
191 } aud_cfg_nument;
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
192
4413
de33c83aa06f Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents: 4412
diff changeset
193 typedef struct aud_cfg_strent_t {
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
194 char const *se_vname;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
195 char **se_vloc;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
196 gboolean se_wrt;
4413
de33c83aa06f Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents: 4412
diff changeset
197 } aud_cfg_strent;
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
198
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
199
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
200 /* XXX: case-sensitivity is bad for lazy nenolods. :( -nenolod */
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
201 static gchar *pl_candidates[] = {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
202 PLUGIN_FILENAME("ALSA"),
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
203 PLUGIN_FILENAME("coreaudio"),
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
204 PLUGIN_FILENAME("OSS"),
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
205 PLUGIN_FILENAME("sun"),
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
206 PLUGIN_FILENAME("ESD"),
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
207 PLUGIN_FILENAME("pulse_audio"),
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
208 PLUGIN_FILENAME("disk_writer"),
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
209 NULL
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
210 };
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
211
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
212
4413
de33c83aa06f Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents: 4412
diff changeset
213 static aud_cfg_boolent aud_boolents[] = {
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
214 {"allow_multiple_instances", &cfg.allow_multiple_instances, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
215 {"use_realtime", &cfg.use_realtime, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
216 {"always_show_cb", &cfg.always_show_cb, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
217 {"convert_underscore", &cfg.convert_underscore, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
218 {"convert_twenty", &cfg.convert_twenty, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
219 {"convert_slash", &cfg.convert_slash, TRUE },
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
220 {"show_numbers_in_pl", &cfg.show_numbers_in_pl, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
221 {"show_separator_in_pl", &cfg.show_separator_in_pl, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
222 {"snap_windows", &cfg.snap_windows, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
223 {"save_window_positions", &cfg.save_window_position, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
224 {"dim_titlebar", &cfg.dim_titlebar, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
225 {"get_info_on_load", &cfg.get_info_on_load, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
226 {"get_info_on_demand", &cfg.get_info_on_demand, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
227 {"eq_scaled_linked", &cfg.eq_scaled_linked, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
228 {"no_playlist_advance", &cfg.no_playlist_advance, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
229 {"refresh_file_list", &cfg.refresh_file_list, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
230 {"sort_jump_to_file", &cfg.sort_jump_to_file, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
231 {"use_pl_metadata", &cfg.use_pl_metadata, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
232 {"warn_about_win_visibility", &cfg.warn_about_win_visibility, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
233 {"use_backslash_as_dir_delimiter", &cfg.use_backslash_as_dir_delimiter, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
234 {"player_shaded", &cfg.player_shaded, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
235 {"player_visible", &cfg.player_visible, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
236 {"shuffle", &cfg.shuffle, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
237 {"repeat", &cfg.repeat, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
238 {"scaled", &cfg.scaled, TRUE}, /* toggles custom scale */
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
239 {"autoscroll_songname", &cfg.autoscroll, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
240 {"stop_after_current_song", &cfg.stopaftersong, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
241 {"playlist_shaded", &cfg.playlist_shaded, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
242 {"playlist_visible", &cfg.playlist_visible, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
243 {"use_fontsets", &cfg.use_fontsets, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
244 {"mainwin_use_bitmapfont", &cfg.mainwin_use_bitmapfont, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
245 {"equalizer_visible", &cfg.equalizer_visible, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
246 {"equalizer_active", &cfg.equalizer_active, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
247 {"equalizer_shaded", &cfg.equalizer_shaded, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
248 {"equalizer_autoload", &cfg.equalizer_autoload, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
249 {"easy_move", &cfg.easy_move, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
250 {"use_eplugins", &cfg.use_eplugins, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
251 {"always_on_top", &cfg.always_on_top, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
252 {"sticky", &cfg.sticky, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
253 {"random_skin_on_play", &cfg.random_skin_on_play, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
254 {"pause_between_songs", &cfg.pause_between_songs, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
255 {"show_wm_decorations", &cfg.show_wm_decorations, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
256 {"eq_extra_filtering", &cfg.eq_extra_filtering, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
257 {"analyzer_peaks", &cfg.analyzer_peaks, TRUE},
4455
5125b5910d0e add checkbox to make it possible to load broken skins
Tomasz Mon <desowin@gmail.com>
parents: 4433
diff changeset
258 {"allow_broken_skins", &cfg.allow_broken_skins, TRUE},
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
259 {"close_dialog_open", &cfg.close_dialog_open, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
260 {"close_dialog_add", &cfg.close_dialog_add, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
261 {"resume_playback_on_startup", &cfg.resume_playback_on_startup, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
262 {"playlist_detect", &cfg.playlist_detect, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
263 {"show_filepopup_for_tuple", &cfg.show_filepopup_for_tuple, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
264 {"recurse_for_cover", &cfg.recurse_for_cover, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
265 {"use_file_cover", &cfg.use_file_cover, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
266 {"use_xmms_style_fileselector", &cfg.use_xmms_style_fileselector, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
267 {"use_extension_probing", &cfg.use_extension_probing, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
268 {"filepopup_showprogressbar", &cfg.filepopup_showprogressbar, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
269 {"close_jtf_dialog", &cfg.close_jtf_dialog, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
270 {"twoway_scroll", &cfg.twoway_scroll, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
271 {"software_volume_control", &cfg.software_volume_control, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
272 {"warn_about_broken_gtk_engines", &cfg.warn_about_broken_gtk_engines, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
273 {"disable_inline_gtk", &cfg.disable_inline_gtk, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
274 {"remember_jtf_entry", &cfg.remember_jtf_entry, TRUE},
4513
867d7caeb95b - indentation of ui_main.c
mf0102 <0102@gmx.at>
parents: 4508
diff changeset
275 {"enable_replay_gain", &cfg.enable_replay_gain, TRUE},
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
276 {"enable_clipping_prevention", &cfg.enable_clipping_prevention, TRUE},
4513
867d7caeb95b - indentation of ui_main.c
mf0102 <0102@gmx.at>
parents: 4508
diff changeset
277 {"replay_gain_track", &cfg.replay_gain_track, TRUE},
867d7caeb95b - indentation of ui_main.c
mf0102 <0102@gmx.at>
parents: 4508
diff changeset
278 {"replay_gain_album", &cfg.replay_gain_album, TRUE},
867d7caeb95b - indentation of ui_main.c
mf0102 <0102@gmx.at>
parents: 4508
diff changeset
279 {"enable_adaptive_scaler", &cfg.enable_adaptive_scaler, TRUE},
4523
b3e4f5c31546 Conditional USE_SRC was changed to USE_SAMPLERATE earlier.
Matti Hamalainen <ccr@tnsp.org>
parents: 4517
diff changeset
280 #ifdef USE_SAMPLERATE
4513
867d7caeb95b - indentation of ui_main.c
mf0102 <0102@gmx.at>
parents: 4508
diff changeset
281 {"enable_src", &cfg.enable_src, TRUE},
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
282 #endif
4513
867d7caeb95b - indentation of ui_main.c
mf0102 <0102@gmx.at>
parents: 4508
diff changeset
283 {"bypass_dsp", &cfg.bypass_dsp, TRUE},
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
284 };
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
285
4413
de33c83aa06f Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents: 4412
diff changeset
286 static gint ncfgbent = G_N_ELEMENTS(aud_boolents);
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
287
4413
de33c83aa06f Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents: 4412
diff changeset
288 static aud_cfg_nument aud_numents[] = {
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
289 {"player_x", &cfg.player_x, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
290 {"player_y", &cfg.player_y, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
291 {"timer_mode", &cfg.timer_mode, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
292 {"vis_type", &cfg.vis_type, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
293 {"analyzer_mode", &cfg.analyzer_mode, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
294 {"analyzer_type", &cfg.analyzer_type, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
295 {"scope_mode", &cfg.scope_mode, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
296 {"vu_mode", &cfg.vu_mode, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
297 {"voiceprint_mode", &cfg.voiceprint_mode, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
298 {"vis_refresh_rate", &cfg.vis_refresh, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
299 {"analyzer_falloff", &cfg.analyzer_falloff, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
300 {"peaks_falloff", &cfg.peaks_falloff, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
301 {"playlist_x", &cfg.playlist_x, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
302 {"playlist_y", &cfg.playlist_y, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
303 {"playlist_width", &cfg.playlist_width, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
304 {"playlist_height", &cfg.playlist_height, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
305 {"playlist_position", &cfg.playlist_position, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
306 {"equalizer_x", &cfg.equalizer_x, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
307 {"equalizer_y", &cfg.equalizer_y, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
308 {"snap_distance", &cfg.snap_distance, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
309 {"pause_between_songs_time", &cfg.pause_between_songs_time, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
310 {"mouse_wheel_change", &cfg.mouse_change, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
311 {"scroll_pl_by", &cfg.scroll_pl_by, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
312 {"titlestring_preset", &cfg.titlestring_preset, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
313 {"resume_playback_on_startup_time", &cfg.resume_playback_on_startup_time, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
314 {"output_buffer_size", &cfg.output_buffer_size, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
315 {"recurse_for_cover_depth", &cfg.recurse_for_cover_depth, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
316 {"filepopup_pixelsize", &cfg.filepopup_pixelsize, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
317 {"filepopup_delay", &cfg.filepopup_delay, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
318 {"colorize_r", &cfg.colorize_r, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
319 {"colorize_g", &cfg.colorize_g, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
320 {"colorize_b", &cfg.colorize_b, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
321 {"output_bit_depth", &cfg.output_bit_depth, TRUE},
4374
335f4ac3993a save volume between sessions
Paula Stanciu <paula.stanciu@gmail.com>
parents: 4367
diff changeset
322 {"saved_volume", &cfg.saved_volume, TRUE},
4523
b3e4f5c31546 Conditional USE_SRC was changed to USE_SAMPLERATE earlier.
Matti Hamalainen <ccr@tnsp.org>
parents: 4517
diff changeset
323 #ifdef USE_SAMPLERATE
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
324 {"src_rate", &cfg.src_rate, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
325 {"src_type", &cfg.src_type, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
326 #endif
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
327 };
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
328
4413
de33c83aa06f Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents: 4412
diff changeset
329 static gint ncfgient = G_N_ELEMENTS(aud_numents);
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
330
4413
de33c83aa06f Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents: 4412
diff changeset
331 static aud_cfg_strent aud_strents[] = {
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
332 {"playlist_font", &cfg.playlist_font, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
333 {"mainwin_font", &cfg.mainwin_font, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
334 {"eqpreset_default_file", &cfg.eqpreset_default_file, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
335 {"eqpreset_extension", &cfg.eqpreset_extension, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
336 {"skin", &cfg.skin, FALSE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
337 {"output_plugin", &cfg.outputplugin, FALSE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
338 {"disabled_iplugins", &cfg.disabled_iplugins, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
339 {"enabled_gplugins", &cfg.enabled_gplugins, FALSE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
340 {"enabled_vplugins", &cfg.enabled_vplugins, FALSE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
341 {"enabled_eplugins", &cfg.enabled_eplugins, FALSE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
342 {"filesel_path", &cfg.filesel_path, FALSE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
343 {"playlist_path", &cfg.playlist_path, FALSE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
344 {"generic_title_format", &cfg.gentitle_format, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
345 {"chardet_detector", &cfg.chardet_detector, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
346 {"chardet_fallback", &cfg.chardet_fallback, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
347 {"cover_name_include", &cfg.cover_name_include, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
348 {"cover_name_exclude", &cfg.cover_name_exclude, TRUE},
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
349 {"session_uri_base", &cfg.session_uri_base, TRUE}
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
350 };
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
351
4413
de33c83aa06f Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents: 4412
diff changeset
352 static gint ncfgsent = G_N_ELEMENTS(aud_strents);
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
353
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
354
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
355 static gboolean
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
356 save_extra_playlist(const gchar * path, const gchar * basename,
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
357 gpointer savedlist)
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
358 {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
359 GList *playlists, *iter;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
360 GList **saved;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
361 Playlist *playlist;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
362 int found;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
363 gchar *filename;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
364
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
365 playlists = playlist_get_playlists();
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
366 saved = (GList **) savedlist;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
367
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
368 found = 0;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
369 for (iter = playlists; iter; iter = iter->next) {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
370 playlist = (Playlist *) iter->data;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
371 if (g_list_find(*saved, playlist)) continue;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
372 filename = playlist_filename_get(playlist);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
373 if (!filename) continue;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
374 if (strcmp(filename, path) == 0) {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
375 /* Save playlist */
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
376 playlist_save(playlist, path);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
377 *saved = g_list_prepend(*saved, playlist);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
378 found = 1;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
379 g_free(filename);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
380 break;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
381 }
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
382 g_free(filename);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
383 }
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
384
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
385 if(!found) {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
386 /* Remove playlist */
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
387 unlink(path);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
388 }
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
389
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
390 return FALSE; /* process other playlists */
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
391 }
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
392
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
393 static void
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
394 save_other_playlists(GList *saved)
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
395 {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
396 GList *playlists, *iter;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
397 Playlist *playlist;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
398 gchar *pos, *ext, *basename, *filename, *newbasename;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
399 int i, num, isdigits;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
400
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
401 playlists = playlist_get_playlists();
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
402 for(iter = playlists; iter; iter = iter->next) {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
403 playlist = (Playlist *) iter->data;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
404 if (g_list_find(saved, playlist)) continue;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
405 filename = playlist_filename_get(playlist);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
406 if (!filename || !filename[0]
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
407 || g_file_test(filename, G_FILE_TEST_IS_DIR)) {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
408 /* default basename */
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
409 #ifdef HAVE_XSPF_PLAYLIST
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
410 basename = g_strdup("playlist_01.xspf");
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
411 #else
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
412 basename = g_strdup("playlist_01.m3u");
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
413 #endif
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
414 } else {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
415 basename = g_path_get_basename(filename);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
416 }
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
417 g_free(filename);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
418 if ((pos = strrchr(basename, '.'))) {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
419 *pos = '\0';
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
420 }
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
421 #ifdef HAVE_XSPF_PLAYLIST
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
422 ext = ".xspf";
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
423 #else
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
424 ext = ".m3u";
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
425 #endif
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
426 num = -1;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
427 if ((pos = strrchr(basename, '_'))) {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
428 isdigits = 0;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
429 for (i=1; pos[i]; i++) {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
430 if (!g_ascii_isdigit(pos[i])) {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
431 isdigits = 0;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
432 break;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
433 }
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
434 isdigits = 1;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
435 }
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
436 if (isdigits) {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
437 num = atoi(pos+1) + 1;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
438 *pos = '\0';
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
439 }
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
440 }
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
441 /* attempt to generate unique filename */
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
442 filename = NULL;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
443 do {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
444 g_free(filename);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
445 if (num < 0) {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
446 /* try saving without number first */
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
447 newbasename = g_strdup_printf("%s%s", basename, ext);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
448 num = 1;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
449 } else {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
450 newbasename = g_strdup_printf("%s_%02d%s", basename, num, ext);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
451 num++;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
452 if (num < 0) {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
453 g_warning("Playlist number in filename overflowed."
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
454 " Not saving playlist.\n");
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
455 goto cleanup;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
456 }
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
457 }
4413
de33c83aa06f Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents: 4412
diff changeset
458 filename = g_build_filename(aud_paths[BMP_PATH_PLAYLISTS_DIR],
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
459 newbasename, NULL);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
460 g_free(newbasename);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
461 } while (g_file_test(filename, G_FILE_TEST_EXISTS));
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
462
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
463 playlist_save(playlist, filename);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
464 cleanup:
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
465 g_free(filename);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
466 g_free(basename);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
467 }
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
468 }
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
469
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
470
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
471 void
4412
180996fcf12a bmp_config_* -> aud_config_*
Matti Hamalainen <ccr@tnsp.org>
parents: 4411
diff changeset
472 aud_config_free(void)
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
473 {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
474 gint i;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
475 for (i = 0; i < ncfgsent; ++i) {
4413
de33c83aa06f Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents: 4412
diff changeset
476 if ( *(aud_strents[i].se_vloc) != NULL )
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
477 {
4413
de33c83aa06f Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents: 4412
diff changeset
478 g_free( *(aud_strents[i].se_vloc) );
de33c83aa06f Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents: 4412
diff changeset
479 *(aud_strents[i].se_vloc) = NULL;
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
480 }
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
481 }
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
482 }
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
483
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
484 void
4412
180996fcf12a bmp_config_* -> aud_config_*
Matti Hamalainen <ccr@tnsp.org>
parents: 4411
diff changeset
485 aud_config_load(void)
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
486 {
4433
a6a2e84e2b2e Use mcs_handle_t directly instead of ConfigDb struct to remove the useless wrapper.
Matti Hamalainen <ccr@tnsp.org>
parents: 4413
diff changeset
487 mcs_handle_t *db;
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
488 gint i, length;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
489
4411
628926f505f8 BmpConfig -> AudConfig, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 4404
diff changeset
490 memcpy(&cfg, &aud_default_config, sizeof(AudConfig));
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
491
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
492 db = cfg_db_open();
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
493 for (i = 0; i < ncfgbent; ++i) {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
494 cfg_db_get_bool(db, NULL,
4413
de33c83aa06f Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents: 4412
diff changeset
495 aud_boolents[i].be_vname,
de33c83aa06f Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents: 4412
diff changeset
496 aud_boolents[i].be_vloc);
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
497 }
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
498
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
499 for (i = 0; i < ncfgient; ++i) {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
500 cfg_db_get_int(db, NULL,
4413
de33c83aa06f Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents: 4412
diff changeset
501 aud_numents[i].ie_vname,
de33c83aa06f Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents: 4412
diff changeset
502 aud_numents[i].ie_vloc);
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
503 }
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
504
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
505 for (i = 0; i < ncfgsent; ++i) {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
506 cfg_db_get_string(db, NULL,
4413
de33c83aa06f Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents: 4412
diff changeset
507 aud_strents[i].se_vname,
de33c83aa06f Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents: 4412
diff changeset
508 aud_strents[i].se_vloc);
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
509 }
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
510
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
511 /* Preset */
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
512 cfg_db_get_float(db, NULL, "equalizer_preamp", &cfg.equalizer_preamp);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
513 for (i = 0; i < 10; i++) {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
514 gchar eqtext[18];
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
515
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
516 g_snprintf(eqtext, sizeof(eqtext), "equalizer_band%d", i);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
517 cfg_db_get_float(db, NULL, eqtext, &cfg.equalizer_bands[i]);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
518 }
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
519
4374
335f4ac3993a save volume between sessions
Paula Stanciu <paula.stanciu@gmail.com>
parents: 4367
diff changeset
520 cfg_db_get_int(db,NULL, "saved_volume", &cfg.saved_volume);
335f4ac3993a save volume between sessions
Paula Stanciu <paula.stanciu@gmail.com>
parents: 4367
diff changeset
521
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
522 /* custom scale factor */
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
523 cfg_db_get_float(db, NULL, "scale_factor", &cfg.scale_factor);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
524
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
525 /* History */
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
526 if (cfg_db_get_int(db, NULL, "url_history_length", &length)) {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
527 for (i = 1; i <= length; i++) {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
528 gchar str[19], *tmp;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
529
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
530 g_snprintf(str, sizeof(str), "url_history%d", i);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
531 if (cfg_db_get_string(db, NULL, str, &tmp))
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
532 cfg.url_history = g_list_append(cfg.url_history, tmp);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
533 }
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
534 }
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
535
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
536 /* RG settings */
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
537 cfg_db_get_float(db, NULL, "replay_gain_preamp", &cfg.replay_gain_preamp);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
538 cfg_db_get_float(db, NULL, "default_gain", &cfg.default_gain);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
539
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
540 cfg_db_close(db);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
541
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
542
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
543 if (cfg.playlist_font && strlen(cfg.playlist_font) == 0) {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
544 g_free(cfg.playlist_font);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
545 cfg.playlist_font = NULL;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
546 }
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
547
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
548 if (cfg.mainwin_font && strlen(cfg.mainwin_font) == 0) {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
549 g_free(cfg.mainwin_font);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
550 cfg.mainwin_font = NULL;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
551 }
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
552
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
553 if (!cfg.playlist_font)
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
554 cfg.playlist_font = g_strdup(MAINWIN_DEFAULT_FONT);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
555
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
556 if (!cfg.mainwin_font)
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
557 cfg.mainwin_font = g_strdup(PLAYLISTWIN_DEFAULT_FONT);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
558
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
559 if (!cfg.gentitle_format)
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
560 cfg.gentitle_format = g_strdup("${?artist:${artist} - }${?album:${album} - }${title}");
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
561
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
562 if (!cfg.outputplugin) {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
563 gint iter;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
564 gchar *pl_path = g_build_filename(PLUGIN_DIR, plugin_dir_list[0], NULL);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
565
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
566 for (iter = 0; pl_candidates[iter] != NULL && cfg.outputplugin == NULL; iter++)
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
567 {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
568 cfg.outputplugin = find_file_recursively(pl_path, pl_candidates[iter]);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
569 }
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
570
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
571 g_free(pl_path);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
572 }
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
573
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
574 if (!cfg.eqpreset_default_file)
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
575 cfg.eqpreset_default_file = g_strdup(EQUALIZER_DEFAULT_DIR_PRESET);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
576
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
577 if (!cfg.eqpreset_extension)
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
578 cfg.eqpreset_extension = g_strdup(EQUALIZER_DEFAULT_PRESET_EXT);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
579
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
580 if (!cfg.chardet_detector)
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
581 cfg.chardet_detector = g_strdup("");
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
582
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
583 if (!cfg.chardet_fallback)
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
584 cfg.chardet_fallback = g_strdup("");
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
585
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
586 if (!cfg.cover_name_include)
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
587 cfg.cover_name_include = g_strdup("");
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
588
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
589 if (!cfg.cover_name_exclude)
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
590 cfg.cover_name_exclude = g_strdup("back");
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
591
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
592 if (!cfg.session_uri_base)
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
593 cfg.session_uri_base = g_strdup("");
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
594
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
595 /* at least one of these should be true */
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
596 if ((!cfg.get_info_on_demand) && (!cfg.get_info_on_load))
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
597 cfg.get_info_on_demand = TRUE;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
598
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
599 /* playlist width and height can't be smaller than minimum */
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
600 cfg.playlist_width = MAX(cfg.playlist_width, PLAYLISTWIN_MIN_WIDTH);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
601 cfg.playlist_height = MAX(cfg.playlist_height, PLAYLISTWIN_MIN_HEIGHT);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
602 }
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
603
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
604 void
4412
180996fcf12a bmp_config_* -> aud_config_*
Matti Hamalainen <ccr@tnsp.org>
parents: 4411
diff changeset
605 aud_config_save(void)
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
606 {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
607 GList *node;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
608 gchar *str;
4374
335f4ac3993a save volume between sessions
Paula Stanciu <paula.stanciu@gmail.com>
parents: 4367
diff changeset
609 gint i, cur_pb_time, vol_l, vol_r;
4433
a6a2e84e2b2e Use mcs_handle_t directly instead of ConfigDb struct to remove the useless wrapper.
Matti Hamalainen <ccr@tnsp.org>
parents: 4413
diff changeset
610 mcs_handle_t *db;
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
611 GList *saved;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
612 Playlist *playlist = playlist_get_active();
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
613
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
614 cfg.disabled_iplugins = input_stringify_disabled_list();
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
615
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
616
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
617 db = cfg_db_open();
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
618
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
619 for (i = 0; i < ncfgbent; ++i)
4413
de33c83aa06f Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents: 4412
diff changeset
620 if (aud_boolents[i].be_wrt)
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
621 cfg_db_set_bool(db, NULL,
4413
de33c83aa06f Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents: 4412
diff changeset
622 aud_boolents[i].be_vname,
de33c83aa06f Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents: 4412
diff changeset
623 *aud_boolents[i].be_vloc);
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
624
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
625 for (i = 0; i < ncfgient; ++i)
4413
de33c83aa06f Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents: 4412
diff changeset
626 if (aud_numents[i].ie_wrt)
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
627 cfg_db_set_int(db, NULL,
4413
de33c83aa06f Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents: 4412
diff changeset
628 aud_numents[i].ie_vname,
de33c83aa06f Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents: 4412
diff changeset
629 *aud_numents[i].ie_vloc);
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
630
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
631 /* This is a bit lame .. it'll end up being written twice,
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
632 * could do with being done a bit neater. -larne */
4526
8465e73d5584 Check for NULL playlist pointer in configuration saving. This situation may occur if the process is interrupted by a signal.
Matti Hamalainen <ccr@tnsp.org>
parents: 4523
diff changeset
633 if (playlist) {
8465e73d5584 Check for NULL playlist pointer in configuration saving. This situation may occur if the process is interrupted by a signal.
Matti Hamalainen <ccr@tnsp.org>
parents: 4523
diff changeset
634 cfg_db_set_int(db, NULL, "playlist_position",
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
635 playlist_get_position(playlist));
4526
8465e73d5584 Check for NULL playlist pointer in configuration saving. This situation may occur if the process is interrupted by a signal.
Matti Hamalainen <ccr@tnsp.org>
parents: 4523
diff changeset
636 }
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
637
4513
867d7caeb95b - indentation of ui_main.c
mf0102 <0102@gmx.at>
parents: 4508
diff changeset
638 hook_call("config save", db);
867d7caeb95b - indentation of ui_main.c
mf0102 <0102@gmx.at>
parents: 4508
diff changeset
639
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
640 /* FIXME: we're looking up SkinnedWindow::x &c ourselves here.
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
641 * this isn't exactly right. -nenolod
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
642 */
4367
99b6e2bac92a write window positions to config only when windows are valid
mf0102 <0102@gmx.at>
parents: 4358
diff changeset
643 if ( playlistwin &&
99b6e2bac92a write window positions to config only when windows are valid
mf0102 <0102@gmx.at>
parents: 4358
diff changeset
644 SKINNED_WINDOW(playlistwin)->x != -1 &&
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
645 SKINNED_WINDOW(playlistwin)->y != -1 )
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
646 {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
647 cfg_db_set_int(db, NULL, "playlist_x",
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
648 SKINNED_WINDOW(playlistwin)->x);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
649 cfg_db_set_int(db, NULL, "playlist_y",
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
650 SKINNED_WINDOW(playlistwin)->y);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
651 }
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
652
4367
99b6e2bac92a write window positions to config only when windows are valid
mf0102 <0102@gmx.at>
parents: 4358
diff changeset
653 if ( equalizerwin &&
99b6e2bac92a write window positions to config only when windows are valid
mf0102 <0102@gmx.at>
parents: 4358
diff changeset
654 SKINNED_WINDOW(equalizerwin)->x != -1 &&
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
655 SKINNED_WINDOW(equalizerwin)->y != -1 )
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
656 {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
657 cfg_db_set_int(db, NULL, "equalizer_x",
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
658 SKINNED_WINDOW(equalizerwin)->x);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
659 cfg_db_set_int(db, NULL, "equalizer_y",
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
660 SKINNED_WINDOW(equalizerwin)->y);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
661 }
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
662
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
663 for (i = 0; i < ncfgsent; ++i) {
4413
de33c83aa06f Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents: 4412
diff changeset
664 if (aud_strents[i].se_wrt)
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
665 cfg_db_set_string(db, NULL,
4413
de33c83aa06f Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents: 4412
diff changeset
666 aud_strents[i].se_vname,
de33c83aa06f Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents: 4412
diff changeset
667 *aud_strents[i].se_vloc);
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
668 }
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
669
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
670 cfg_db_set_float(db, NULL, "equalizer_preamp", cfg.equalizer_preamp);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
671
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
672 /* RG settings */
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
673 cfg_db_set_float(db, NULL, "replay_gain_preamp", cfg.replay_gain_preamp);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
674 cfg_db_set_float(db, NULL, "default_gain", cfg.default_gain);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
675
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
676 for (i = 0; i < 10; i++) {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
677 str = g_strdup_printf("equalizer_band%d", i);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
678 cfg_db_set_float(db, NULL, str, cfg.equalizer_bands[i]);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
679 g_free(str);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
680 }
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
681
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
682 cfg_db_set_float(db, NULL, "scale_factor", cfg.scale_factor);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
683
4413
de33c83aa06f Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents: 4412
diff changeset
684 if (aud_active_skin != NULL)
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
685 {
4413
de33c83aa06f Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents: 4412
diff changeset
686 if (aud_active_skin->path)
de33c83aa06f Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents: 4412
diff changeset
687 cfg_db_set_string(db, NULL, "skin", aud_active_skin->path);
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
688 else
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
689 cfg_db_unset_key(db, NULL, "skin");
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
690 }
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
691
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
692 if (get_current_output_plugin())
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
693 cfg_db_set_string(db, NULL, "output_plugin",
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
694 get_current_output_plugin()->filename);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
695 else
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
696 cfg_db_unset_key(db, NULL, "output_plugin");
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
697
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
698 str = general_stringify_enabled_list();
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
699 if (str) {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
700 cfg_db_set_string(db, NULL, "enabled_gplugins", str);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
701 g_free(str);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
702 }
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
703 else
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
704 cfg_db_unset_key(db, NULL, "enabled_gplugins");
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
705
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
706 str = vis_stringify_enabled_list();
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
707 if (str) {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
708 cfg_db_set_string(db, NULL, "enabled_vplugins", str);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
709 g_free(str);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
710 }
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
711 else
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
712 cfg_db_unset_key(db, NULL, "enabled_vplugins");
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
713
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
714 str = effect_stringify_enabled_list();
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
715 if (str) {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
716 cfg_db_set_string(db, NULL, "enabled_eplugins", str);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
717 g_free(str);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
718 }
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
719 else
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
720 cfg_db_unset_key(db, NULL, "enabled_eplugins");
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
721
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
722 if (cfg.filesel_path)
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
723 cfg_db_set_string(db, NULL, "filesel_path", cfg.filesel_path);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
724
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
725 if (cfg.playlist_path)
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
726 cfg_db_set_string(db, NULL, "playlist_path", cfg.playlist_path);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
727
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
728 cfg_db_set_int(db, NULL, "url_history_length",
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
729 g_list_length(cfg.url_history));
4374
335f4ac3993a save volume between sessions
Paula Stanciu <paula.stanciu@gmail.com>
parents: 4367
diff changeset
730
335f4ac3993a save volume between sessions
Paula Stanciu <paula.stanciu@gmail.com>
parents: 4367
diff changeset
731 input_get_volume(&vol_l,&vol_r);
335f4ac3993a save volume between sessions
Paula Stanciu <paula.stanciu@gmail.com>
parents: 4367
diff changeset
732 cfg_db_set_int(db, NULL, "saved_volume", (vol_l<<8) | vol_r );
335f4ac3993a save volume between sessions
Paula Stanciu <paula.stanciu@gmail.com>
parents: 4367
diff changeset
733
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
734 for (node = cfg.url_history, i = 1; node; node = g_list_next(node), i++) {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
735 str = g_strdup_printf("url_history%d", i);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
736 cfg_db_set_string(db, NULL, str, node->data);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
737 g_free(str);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
738 }
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
739
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
740 if (playback_get_playing()) {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
741 cur_pb_time = playback_get_time();
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
742 } else
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
743 cur_pb_time = -1;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
744 cfg.resume_playback_on_startup_time = cur_pb_time;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
745 cfg_db_set_int(db, NULL, "resume_playback_on_startup_time",
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
746 cfg.resume_playback_on_startup_time);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
747
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
748 cfg_db_close(db);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
749
4526
8465e73d5584 Check for NULL playlist pointer in configuration saving. This situation may occur if the process is interrupted by a signal.
Matti Hamalainen <ccr@tnsp.org>
parents: 4523
diff changeset
750 if (!playlist_save(playlist, aud_paths[BMP_PATH_PLAYLIST_FILE])) {
8465e73d5584 Check for NULL playlist pointer in configuration saving. This situation may occur if the process is interrupted by a signal.
Matti Hamalainen <ccr@tnsp.org>
parents: 4523
diff changeset
751 g_warning("Could not save main playlist\n");
8465e73d5584 Check for NULL playlist pointer in configuration saving. This situation may occur if the process is interrupted by a signal.
Matti Hamalainen <ccr@tnsp.org>
parents: 4523
diff changeset
752 }
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
753
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
754 /* Save extra playlists that were loaded from PLAYLISTS_DIR */
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
755 saved = NULL;
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
756 saved = g_list_prepend(saved, playlist); /* don't save default again */
4413
de33c83aa06f Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents: 4412
diff changeset
757 if(!dir_foreach(aud_paths[BMP_PATH_PLAYLISTS_DIR], save_extra_playlist,
4352
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
758 &saved, NULL)) {
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
759 g_warning("Could not save extra playlists\n");
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
760 }
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
761
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
762 /* Save other playlists to PLAYLISTS_DIR */
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
763 save_other_playlists(saved);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
764 g_list_free(saved);
ac1f6d211223 Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff changeset
765 }