Mercurial > audlegacy
annotate src/audacious/bmpconfig.c @ 4367:99b6e2bac92a
write window positions to config only when windows are valid
author | mf0102 <0102@gmx.at> |
---|---|
date | Tue, 25 Mar 2008 17:53:41 +0100 |
parents | 6478692415a0 |
children | 335f4ac3993a |
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 | 26 #ifdef HAVE_CONFIG_H |
27 # include "config.h" | |
28 #endif | |
29 | |
30 #ifdef USE_SRC | |
31 # include <samplerate.h> | |
32 #endif | |
33 | |
4352
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
34 #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
|
35 #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
|
36 #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
|
37 #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
|
38 #include "skin.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 "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
|
40 #include "ui_playlist.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_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
|
42 #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
|
43 #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
|
44 #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
|
45 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
46 #include "bmpconfig.h" |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
47 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
48 BmpConfig bmp_default_config = { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
49 MAINWIN_DEFAULT_POS_X, /* mainwin x position */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
50 MAINWIN_DEFAULT_POS_Y, /* mainwin y position */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
51 EQUALIZER_DEFAULT_POS_X, /* equalizer x position */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
52 EQUALIZER_DEFAULT_POS_Y, /* equalizer y position */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
53 PLAYLISTWIN_DEFAULT_POS_X, /* playlistwin x position */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
54 PLAYLISTWIN_DEFAULT_POS_Y, /* playlistwin y position */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
55 PLAYLISTWIN_DEFAULT_WIDTH, /* playlistwin width */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
56 PLAYLISTWIN_DEFAULT_HEIGHT, /* playlistwin height */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
57 10, /* snap distance */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
58 FALSE, /* real-time priority */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
59 FALSE, FALSE, /* shuffle, repeat */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
60 FALSE, /* scaling */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
61 TRUE, /* autoscroll */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
62 TRUE, /* analyzer peaks */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
63 FALSE, /* equalizer autoload */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
64 FALSE, /* easy move */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
65 FALSE, /* equalizer active */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
66 FALSE, /* playlistwin visible */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
67 FALSE, /* equalizer visible */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
68 TRUE, /* player visible */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
69 FALSE, /* player shaded */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
70 FALSE, /* playlistwin shaded */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
71 FALSE, /* equalizer shaded */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
72 FALSE, /* allow multiple instances */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
73 TRUE, /* always show cb */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
74 TRUE, TRUE, TRUE, /* convert '_', %20 and '\' */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
75 TRUE, /* show numbers in playlist */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
76 TRUE, /* snap windows */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
77 TRUE, /* save window positions */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
78 TRUE, /* dim titlebar */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
79 FALSE, /* get playlist 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
|
80 TRUE, /* get playlist info on demand */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
81 TRUE, /* equalizer scale linked */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
82 FALSE, /* sort jump to file */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
83 FALSE, /* use effect plugins */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
84 FALSE, /* always on top */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
85 FALSE, /* sticky */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
86 FALSE, /* no playlist advance */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
87 FALSE, /* stop after current song */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
88 TRUE, /* refresh file list */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
89 TRUE, /* UNUSED (smooth title scrolling) */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
90 TRUE, /* use playlist metadata */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
91 TRUE, /* deprecated */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
92 TRUE, /* warn about windows visibility */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
93 FALSE, /* use \ as directory delimiter */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
94 FALSE, /* random skin on play */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
95 FALSE, /* use fontsets */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
96 TRUE, /* use bitmap font for mainwin */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
97 TRUE, /* use custom cursors */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
98 TRUE, /* close dialog on open */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
99 TRUE, /* close dialog on add */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
100 0.0, /* equalizer preamp */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
101 {0.0, 0.0, 0.0, 0.0, 0.0, /* equalizer bands */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
102 0.0, 0.0, 0.0, 0.0, 0.0}, |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
103 1.2, /* GUI scale factor, hardcoded for testing purposes --majeru */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
104 NULL, /* skin */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
105 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
|
106 NULL, /* file selector path */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
107 NULL, /* playlist path */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
108 NULL, /* playlist font */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
109 NULL, /* mainwin font */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
110 NULL, /* disabled input plugins */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
111 NULL, /* enabled general plugins */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
112 NULL, /* enabled visualization plugins */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
113 NULL, /* enabled effect plugins */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
114 NULL, /* enabled discovery plugins */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
115 NULL, /* equalizer preset default file */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
116 NULL, /* equalizer preset extension */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
117 NULL, /* URL history */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
118 0, /* timer mode */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
119 VIS_ANALYZER, /* visualizer type */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
120 ANALYZER_NORMAL, /* analyzer mode */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
121 ANALYZER_BARS, /* analyzer type */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
122 SCOPE_DOT, /* scope mode */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
123 VOICEPRINT_NORMAL, /* voiceprint mode */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
124 VU_SMOOTH, /* VU mode */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
125 REFRESH_FULL, /* visualizer refresh rate */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
126 FALLOFF_FAST, /* analyzer fall off rate */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
127 FALLOFF_SLOW, /* peaks fall off rate */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
128 0, /* playlist position */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
129 2, /* pause between songs time */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
130 FALSE, /* pause between songs */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
131 FALSE, /* show window decorations */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
132 8, /* mouse wheel scroll step */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
133 FALSE, /* playlist transparent */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
134 2, /* 3rd preset (ARTIST - ALBUM - TITLE) */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
135 NULL, /* title format */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
136 FALSE, /* software volume control enabled */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
137 TRUE, /* UNUSED (XMMS compatibility mode) */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
138 TRUE, /* extra eq filtering */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
139 3, /* scroll pl by */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
140 FALSE, /* resume playback on startup */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
141 -1, /* 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
|
142 TRUE, /* show seperators in pl */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
143 NULL, /* chardet_detector */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
144 NULL, /* chardet_fallback */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
145 500, /* audio buffer size */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
146 TRUE, /* whether or not to postpone format detection on initial add */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
147 TRUE, /* show filepopup for tuple */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
148 NULL, /* words identifying covers */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
149 NULL, /* words that might not show up in cover names */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
150 FALSE, |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
151 0, |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
152 NULL, /* default session uri base (non-NULL = custom 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
|
153 150, /* short side length of the picture in the filepopup */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
154 20, /* delay until the filepopup comes up */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
155 FALSE, /* use filename.jpg for coverart */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
156 FALSE, /* use XMMS-style file selection */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
157 TRUE, /* use extension probing */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
158 255, 255, 255, /* colorize r, g, b */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
159 FALSE, /* internal: whether or not to terminate */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
160 TRUE, /* whether show progress bar in filepopup or not */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
161 TRUE, /* close jtf dialog on jump */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
162 TRUE, /* use back and forth scroll */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
163 FALSE, /* use software volume control */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
164 .warn_about_broken_gtk_engines = TRUE, /* warn about broken gtk themes */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
165 FALSE, /* disable inline themes */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
166 TRUE, /* remember jtf text entry */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
167 16, /* output bit depth */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
168 TRUE, /* enable replay gain */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
169 TRUE, /* enable clipping prevention */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
170 TRUE, /* track mode */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
171 FALSE, /* album mode */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
172 FALSE, /* enable adaptive scaler */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
173 0.0, /* preamp */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
174 -9.0, /* default gain */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
175 #ifdef USE_SRC |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
176 FALSE, /* enable resampling */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
177 48000, /* samplerate */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
178 SRC_SINC_BEST_QUALITY, /* default interpolation method */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
179 #endif |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
180 FALSE, /* bypass dsp */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
181 }; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
182 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
183 typedef struct bmp_cfg_boolent_t { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
184 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
|
185 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
|
186 gboolean be_wrt; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
187 } bmp_cfg_boolent; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
188 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
189 typedef struct bmp_cfg_nument_t { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
190 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
|
191 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
|
192 gboolean ie_wrt; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
193 } bmp_cfg_nument; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
194 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
195 typedef struct bmp_cfg_strent_t { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
196 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
|
197 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
|
198 gboolean se_wrt; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
199 } bmp_cfg_strent; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
200 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
201 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
202 /* 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
|
203 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
|
204 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
|
205 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
|
206 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
|
207 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
|
208 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
|
209 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
|
210 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
|
211 NULL |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
212 }; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
213 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
214 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
215 static bmp_cfg_boolent bmp_boolents[] = { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
216 {"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
|
217 {"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
|
218 {"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
|
219 {"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
|
220 {"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
|
221 {"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
|
222 {"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
|
223 {"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
|
224 {"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
|
225 {"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
|
226 {"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
|
227 {"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
|
228 {"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
|
229 {"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
|
230 {"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
|
231 {"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
|
232 {"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
|
233 {"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
|
234 {"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
|
235 {"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
|
236 {"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
|
237 {"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
|
238 {"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
|
239 {"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
|
240 {"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
|
241 {"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
|
242 {"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
|
243 {"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
|
244 {"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
|
245 {"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
|
246 {"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
|
247 {"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
|
248 {"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
|
249 {"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
|
250 {"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
|
251 {"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
|
252 {"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
|
253 {"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
|
254 {"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
|
255 {"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
|
256 {"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
|
257 {"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
|
258 {"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
|
259 {"analyzer_peaks", &cfg.analyzer_peaks, TRUE}, |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
260 {"custom_cursors", &cfg.custom_cursors, TRUE}, |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
261 {"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
|
262 {"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
|
263 {"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
|
264 {"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
|
265 {"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
|
266 {"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
|
267 {"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
|
268 {"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
|
269 {"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
|
270 {"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
|
271 {"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
|
272 {"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
|
273 {"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
|
274 {"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
|
275 {"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
|
276 {"remember_jtf_entry", &cfg.remember_jtf_entry, TRUE}, |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
277 {"enable_replay_gain", &cfg.enable_replay_gain, TRUE}, |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
278 {"enable_clipping_prevention", &cfg.enable_clipping_prevention, TRUE}, |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
279 {"replay_gain_track", &cfg.replay_gain_track, TRUE}, |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
280 {"replay_gain_album", &cfg.replay_gain_album, TRUE}, |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
281 {"enable_adaptive_scaler", &cfg.enable_adaptive_scaler, TRUE}, |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
282 #ifdef USE_SRC |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
283 {"enable_src", &cfg.enable_src, TRUE}, |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
284 #endif |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
285 {"bypass_dsp", &cfg.bypass_dsp, TRUE}, |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
286 }; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
287 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
288 static gint ncfgbent = G_N_ELEMENTS(bmp_boolents); |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
289 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
290 static bmp_cfg_nument bmp_numents[] = { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
291 {"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
|
292 {"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
|
293 {"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
|
294 {"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
|
295 {"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
|
296 {"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
|
297 {"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
|
298 {"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
|
299 {"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
|
300 {"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
|
301 {"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
|
302 {"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
|
303 {"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
|
304 {"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
|
305 {"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
|
306 {"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
|
307 {"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
|
308 {"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
|
309 {"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
|
310 {"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
|
311 {"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
|
312 {"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
|
313 {"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
|
314 {"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
|
315 {"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
|
316 {"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
|
317 {"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
|
318 {"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
|
319 {"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
|
320 {"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
|
321 {"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
|
322 {"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
|
323 {"output_bit_depth", &cfg.output_bit_depth, TRUE}, |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
324 #ifdef USE_SRC |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
325 {"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
|
326 {"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
|
327 #endif |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
328 }; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
329 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
330 static gint ncfgient = G_N_ELEMENTS(bmp_numents); |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
331 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
332 static bmp_cfg_strent bmp_strents[] = { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
333 {"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
|
334 {"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
|
335 {"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
|
336 {"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
|
337 {"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
|
338 {"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
|
339 {"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
|
340 {"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
|
341 {"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
|
342 {"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
|
343 {"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
|
344 {"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
|
345 {"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
|
346 {"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
|
347 {"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
|
348 {"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
|
349 {"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
|
350 {"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
|
351 }; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
352 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
353 static gint ncfgsent = G_N_ELEMENTS(bmp_strents); |
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 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
356 static gboolean |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
357 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
|
358 gpointer savedlist) |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
359 { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
360 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
|
361 GList **saved; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
362 Playlist *playlist; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
363 int found; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
364 gchar *filename; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
365 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
366 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
|
367 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
|
368 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
369 found = 0; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
370 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
|
371 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
|
372 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
|
373 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
|
374 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
|
375 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
|
376 /* Save playlist */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
377 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
|
378 *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
|
379 found = 1; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
380 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
|
381 break; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
382 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
383 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
|
384 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
385 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
386 if(!found) { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
387 /* Remove playlist */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
388 unlink(path); |
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 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
391 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
|
392 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
393 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
394 static void |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
395 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
|
396 { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
397 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
|
398 Playlist *playlist; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
399 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
|
400 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
|
401 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
402 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
|
403 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
|
404 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
|
405 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
|
406 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
|
407 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
|
408 || 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
|
409 /* default basename */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
410 #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
|
411 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
|
412 #else |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
413 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
|
414 #endif |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
415 } else { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
416 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
|
417 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
418 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
|
419 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
|
420 *pos = '\0'; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
421 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
422 #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
|
423 ext = ".xspf"; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
424 #else |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
425 ext = ".m3u"; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
426 #endif |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
427 num = -1; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
428 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
|
429 isdigits = 0; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
430 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
|
431 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
|
432 isdigits = 0; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
433 break; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
434 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
435 isdigits = 1; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
436 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
437 if (isdigits) { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
438 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
|
439 *pos = '\0'; |
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 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
442 /* 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
|
443 filename = NULL; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
444 do { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
445 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
|
446 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
|
447 /* 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
|
448 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
|
449 num = 1; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
450 } else { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
451 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
|
452 num++; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
453 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
|
454 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
|
455 " 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
|
456 goto cleanup; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
457 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
458 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
459 filename = g_build_filename(bmp_paths[BMP_PATH_PLAYLISTS_DIR], |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
460 newbasename, NULL); |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
461 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
|
462 } 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
|
463 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
464 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
|
465 cleanup: |
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(filename); |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
467 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
|
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 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
472 void |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
473 bmp_config_free(void) |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
474 { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
475 gint i; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
476 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
|
477 if ( *(bmp_strents[i].se_vloc) != NULL ) |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
478 { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
479 g_free( *(bmp_strents[i].se_vloc) ); |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
480 *(bmp_strents[i].se_vloc) = NULL; |
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 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
485 void |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
486 bmp_config_load(void) |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
487 { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
488 ConfigDb *db; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
489 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
|
490 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
491 memcpy(&cfg, &bmp_default_config, sizeof(BmpConfig)); |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
492 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
493 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
|
494 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
|
495 cfg_db_get_bool(db, NULL, |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
496 bmp_boolents[i].be_vname, |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
497 bmp_boolents[i].be_vloc); |
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 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
500 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
|
501 cfg_db_get_int(db, NULL, |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
502 bmp_numents[i].ie_vname, |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
503 bmp_numents[i].ie_vloc); |
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 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
506 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
|
507 cfg_db_get_string(db, NULL, |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
508 bmp_strents[i].se_vname, |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
509 bmp_strents[i].se_vloc); |
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 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
512 /* Preset */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
513 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
|
514 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
|
515 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
|
516 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
517 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
|
518 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
|
519 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
520 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
521 /* 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
|
522 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
|
523 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
524 /* History */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
525 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
|
526 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
|
527 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
|
528 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
529 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
|
530 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
|
531 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
|
532 } |
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 /* RG settings */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
536 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
|
537 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
|
538 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
539 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
|
540 |
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 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
|
543 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
|
544 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
|
545 } |
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 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
|
548 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
|
549 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
|
550 } |
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 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
|
553 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
|
554 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
555 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
|
556 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
|
557 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
558 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
|
559 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
|
560 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
561 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
|
562 gint iter; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
563 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
|
564 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
565 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
|
566 { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
567 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
|
568 } |
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 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
|
571 } |
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 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
|
574 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
|
575 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
576 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
|
577 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
|
578 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
579 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
|
580 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
|
581 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
582 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
|
583 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
|
584 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
585 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
|
586 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
|
587 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
588 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
|
589 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
|
590 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
591 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
|
592 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
|
593 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
594 /* 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
|
595 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
|
596 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
|
597 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
598 /* 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
|
599 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
|
600 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
|
601 } |
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 void |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
604 bmp_config_save(void) |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
605 { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
606 GList *node; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
607 gchar *str; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
608 gint i, 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
|
609 ConfigDb *db; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
610 GList *saved; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
611 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
|
612 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
613 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
|
614 |
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 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
|
617 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
618 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
|
619 if (bmp_boolents[i].be_wrt) |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
620 cfg_db_set_bool(db, NULL, |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
621 bmp_boolents[i].be_vname, |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
622 *bmp_boolents[i].be_vloc); |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
623 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
624 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
|
625 if (bmp_numents[i].ie_wrt) |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
626 cfg_db_set_int(db, NULL, |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
627 bmp_numents[i].ie_vname, |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
628 *bmp_numents[i].ie_vloc); |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
629 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
630 /* 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
|
631 * could do with being done a bit neater. -larne */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
632 cfg_db_set_int(db, NULL, "playlist_position", |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
633 playlist_get_position(playlist)); |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
634 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
635 /* 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
|
636 * 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
|
637 */ |
4367
99b6e2bac92a
write window positions to config only when windows are valid
mf0102 <0102@gmx.at>
parents:
4358
diff
changeset
|
638 if ( playlistwin && |
99b6e2bac92a
write window positions to config only when windows are valid
mf0102 <0102@gmx.at>
parents:
4358
diff
changeset
|
639 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
|
640 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
|
641 { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
642 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
|
643 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
|
644 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
|
645 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
|
646 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
647 |
4367
99b6e2bac92a
write window positions to config only when windows are valid
mf0102 <0102@gmx.at>
parents:
4358
diff
changeset
|
648 if ( mainwin && |
99b6e2bac92a
write window positions to config only when windows are valid
mf0102 <0102@gmx.at>
parents:
4358
diff
changeset
|
649 SKINNED_WINDOW(mainwin)->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
|
650 SKINNED_WINDOW(mainwin)->y != -1 ) |
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 cfg_db_set_int(db, NULL, "player_x", |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
653 SKINNED_WINDOW(mainwin)->x); |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
654 cfg_db_set_int(db, NULL, "player_y", |
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(mainwin)->y); |
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 |
4367
99b6e2bac92a
write window positions to config only when windows are valid
mf0102 <0102@gmx.at>
parents:
4358
diff
changeset
|
658 if ( equalizerwin && |
99b6e2bac92a
write window positions to config only when windows are valid
mf0102 <0102@gmx.at>
parents:
4358
diff
changeset
|
659 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
|
660 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
|
661 { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
662 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
|
663 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
|
664 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
|
665 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
|
666 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
667 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
668 cfg_db_set_bool(db, NULL, "mainwin_use_bitmapfont", |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
669 cfg.mainwin_use_bitmapfont); |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
670 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
671 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
|
672 if (bmp_strents[i].se_wrt) |
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_string(db, NULL, |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
674 bmp_strents[i].se_vname, |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
675 *bmp_strents[i].se_vloc); |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
676 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
677 |
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, "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
|
679 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
680 /* RG settings */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
681 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
|
682 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
|
683 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
684 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
|
685 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
|
686 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
|
687 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
|
688 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
689 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
690 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
|
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 (bmp_active_skin != NULL) |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
693 { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
694 if (bmp_active_skin->path) |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
695 cfg_db_set_string(db, NULL, "skin", bmp_active_skin->path); |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
696 else |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
697 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
|
698 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
699 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
700 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
|
701 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
|
702 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
|
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, "output_plugin"); |
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 = 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
|
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_gplugins", 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_gplugins"); |
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 = 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
|
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_vplugins", 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_vplugins"); |
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 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
|
723 if (str) { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
724 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
|
725 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
|
726 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
727 else |
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_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
|
729 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
730 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
|
731 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
|
732 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
733 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
|
734 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
|
735 |
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_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
|
737 g_list_length(cfg.url_history)); |
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 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
|
740 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
|
741 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
|
742 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
|
743 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
744 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
745 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
|
746 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
|
747 } else |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
748 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
|
749 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
|
750 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
|
751 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
|
752 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
753 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
|
754 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
755 playlist_save(playlist, bmp_paths[BMP_PATH_PLAYLIST_FILE]); |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
756 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
757 /* 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
|
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 saved = g_list_prepend(saved, playlist); /* don't save default again */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
760 if(!dir_foreach(bmp_paths[BMP_PATH_PLAYLISTS_DIR], save_extra_playlist, |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
761 &saved, NULL)) { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
762 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
|
763 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
764 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
765 /* 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
|
766 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
|
767 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
|
768 } |