Mercurial > audlegacy
annotate src/audacious/bmpconfig.c @ 4387:aca39c7f748e
Automated merge with ssh://hg.atheme.org//hg/audacious
author | William Pitcock <nenolod@atheme.org> |
---|---|
date | Sat, 29 Mar 2008 08:55:47 -0500 |
parents | 335f4ac3993a |
children |
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 */ |
4374
335f4ac3993a
save volume between sessions
Paula Stanciu <paula.stanciu@gmail.com>
parents:
4367
diff
changeset
|
175 0x6464, /* saved volume for both channels, 0x64=100 */ |
4352
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
176 #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
|
177 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
|
178 48000, /* samplerate */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
179 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
|
180 #endif |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
181 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
|
182 }; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
183 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
184 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
|
185 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
|
186 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
|
187 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
|
188 } 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
|
189 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
190 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
|
191 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
|
192 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
|
193 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
|
194 } 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
|
195 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
196 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
|
197 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
|
198 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
|
199 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
|
200 } 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
|
201 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
202 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
203 /* 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
|
204 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
|
205 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
|
206 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
|
207 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
|
208 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
|
209 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
|
210 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
|
211 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
|
212 NULL |
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 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
216 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
|
217 {"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
|
218 {"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
|
219 {"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
|
220 {"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
|
221 {"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
|
222 {"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
|
223 {"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
|
224 {"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
|
225 {"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
|
226 {"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
|
227 {"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
|
228 {"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
|
229 {"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
|
230 {"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
|
231 {"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
|
232 {"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
|
233 {"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
|
234 {"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
|
235 {"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
|
236 {"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
|
237 {"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
|
238 {"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
|
239 {"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
|
240 {"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
|
241 {"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
|
242 {"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
|
243 {"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
|
244 {"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
|
245 {"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
|
246 {"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
|
247 {"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
|
248 {"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
|
249 {"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
|
250 {"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
|
251 {"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
|
252 {"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
|
253 {"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
|
254 {"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
|
255 {"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
|
256 {"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
|
257 {"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
|
258 {"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
|
259 {"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
|
260 {"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
|
261 {"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
|
262 {"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
|
263 {"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
|
264 {"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
|
265 {"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
|
266 {"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
|
267 {"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
|
268 {"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
|
269 {"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
|
270 {"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
|
271 {"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
|
272 {"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
|
273 {"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
|
274 {"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
|
275 {"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
|
276 {"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
|
277 {"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
|
278 {"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
|
279 {"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
|
280 {"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
|
281 {"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
|
282 {"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
|
283 #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
|
284 {"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
|
285 #endif |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
286 {"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
|
287 }; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
288 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
289 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
|
290 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
291 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
|
292 {"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
|
293 {"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
|
294 {"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
|
295 {"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
|
296 {"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
|
297 {"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
|
298 {"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
|
299 {"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
|
300 {"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
|
301 {"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
|
302 {"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
|
303 {"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
|
304 {"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
|
305 {"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
|
306 {"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
|
307 {"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
|
308 {"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
|
309 {"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
|
310 {"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
|
311 {"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
|
312 {"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
|
313 {"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
|
314 {"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
|
315 {"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
|
316 {"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
|
317 {"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
|
318 {"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
|
319 {"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
|
320 {"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
|
321 {"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
|
322 {"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
|
323 {"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
|
324 {"output_bit_depth", &cfg.output_bit_depth, TRUE}, |
4374
335f4ac3993a
save volume between sessions
Paula Stanciu <paula.stanciu@gmail.com>
parents:
4367
diff
changeset
|
325 {"saved_volume", &cfg.saved_volume, TRUE}, |
4352
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
326 #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
|
327 {"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
|
328 {"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
|
329 #endif |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
330 }; |
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 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
|
333 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
334 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
|
335 {"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
|
336 {"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
|
337 {"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
|
338 {"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
|
339 {"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
|
340 {"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
|
341 {"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
|
342 {"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
|
343 {"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
|
344 {"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
|
345 {"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
|
346 {"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
|
347 {"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
|
348 {"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
|
349 {"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
|
350 {"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
|
351 {"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
|
352 {"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
|
353 }; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
354 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
355 static 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
|
356 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
357 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
358 static gboolean |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
359 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
|
360 gpointer savedlist) |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
361 { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
362 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
|
363 GList **saved; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
364 Playlist *playlist; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
365 int found; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
366 gchar *filename; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
367 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
368 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
|
369 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
|
370 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
371 found = 0; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
372 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
|
373 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
|
374 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
|
375 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
|
376 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
|
377 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
|
378 /* Save playlist */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
379 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
|
380 *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
|
381 found = 1; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
382 g_free(filename); |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
383 break; |
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 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
|
386 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
387 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
388 if(!found) { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
389 /* Remove playlist */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
390 unlink(path); |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
391 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
392 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
393 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
|
394 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
395 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
396 static void |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
397 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
|
398 { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
399 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
|
400 Playlist *playlist; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
401 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
|
402 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
|
403 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
404 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
|
405 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
|
406 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
|
407 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
|
408 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
|
409 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
|
410 || 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
|
411 /* default basename */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
412 #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
|
413 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
|
414 #else |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
415 basename = g_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
|
416 #endif |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
417 } else { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
418 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
|
419 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
420 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
|
421 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
|
422 *pos = '\0'; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
423 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
424 #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
|
425 ext = ".xspf"; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
426 #else |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
427 ext = ".m3u"; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
428 #endif |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
429 num = -1; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
430 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
|
431 isdigits = 0; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
432 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
|
433 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
|
434 isdigits = 0; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
435 break; |
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 isdigits = 1; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
438 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
439 if (isdigits) { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
440 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
|
441 *pos = '\0'; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
442 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
443 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
444 /* 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
|
445 filename = NULL; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
446 do { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
447 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
|
448 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
|
449 /* 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
|
450 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
|
451 num = 1; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
452 } else { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
453 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
|
454 num++; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
455 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
|
456 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
|
457 " 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
|
458 goto cleanup; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
459 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
460 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
461 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
|
462 newbasename, NULL); |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
463 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
|
464 } 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
|
465 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
466 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
|
467 cleanup: |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
468 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
|
469 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
|
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 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
473 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
474 void |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
475 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
|
476 { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
477 gint i; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
478 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
|
479 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
|
480 { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
481 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
|
482 *(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
|
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 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
486 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
487 void |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
488 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
|
489 { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
490 ConfigDb *db; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
491 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
|
492 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
493 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
|
494 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
495 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
|
496 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
|
497 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
|
498 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
|
499 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
|
500 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
501 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
502 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
|
503 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
|
504 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
|
505 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
|
506 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
507 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
508 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
|
509 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
|
510 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
|
511 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
|
512 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
513 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
514 /* Preset */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
515 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
|
516 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
|
517 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
|
518 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
519 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
|
520 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
|
521 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
522 |
4374
335f4ac3993a
save volume between sessions
Paula Stanciu <paula.stanciu@gmail.com>
parents:
4367
diff
changeset
|
523 cfg_db_get_int(db,NULL, "saved_volume", &cfg.saved_volume); |
335f4ac3993a
save volume between sessions
Paula Stanciu <paula.stanciu@gmail.com>
parents:
4367
diff
changeset
|
524 |
4352
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
525 /* 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
|
526 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
|
527 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
528 /* History */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
529 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
|
530 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
|
531 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
|
532 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
533 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
|
534 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
|
535 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
|
536 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
537 } |
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 /* RG settings */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
540 cfg_db_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
|
541 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
|
542 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
543 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
|
544 |
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 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
|
547 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
|
548 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
|
549 } |
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 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
|
552 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
|
553 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
|
554 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
555 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
556 if (!cfg.playlist_font) |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
557 cfg.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
|
558 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
559 if (!cfg.mainwin_font) |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
560 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
|
561 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
562 if (!cfg.gentitle_format) |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
563 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
|
564 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
565 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
|
566 gint iter; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
567 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
|
568 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
569 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
|
570 { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
571 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
|
572 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
573 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
574 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
|
575 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
576 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
577 if (!cfg.eqpreset_default_file) |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
578 cfg.eqpreset_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
|
579 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
580 if (!cfg.eqpreset_extension) |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
581 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
|
582 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
583 if (!cfg.chardet_detector) |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
584 cfg.chardet_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
|
585 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
586 if (!cfg.chardet_fallback) |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
587 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
|
588 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
589 if (!cfg.cover_name_include) |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
590 cfg.cover_name_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
|
591 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
592 if (!cfg.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
|
593 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
|
594 |
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.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
|
596 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
|
597 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
598 /* 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
|
599 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
|
600 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
|
601 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
602 /* 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
|
603 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
|
604 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
|
605 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
606 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
607 void |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
608 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
|
609 { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
610 GList *node; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
611 gchar *str; |
4374
335f4ac3993a
save volume between sessions
Paula Stanciu <paula.stanciu@gmail.com>
parents:
4367
diff
changeset
|
612 gint i, cur_pb_time, vol_l, vol_r; |
4352
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
613 ConfigDb *db; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
614 GList *saved; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
615 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
|
616 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
617 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
|
618 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
619 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
620 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
|
621 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
622 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
|
623 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
|
624 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
|
625 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
|
626 *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
|
627 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
628 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
|
629 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
|
630 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
|
631 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
|
632 *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
|
633 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
634 /* 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
|
635 * 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
|
636 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
|
637 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
|
638 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
639 /* 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
|
640 * 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
|
641 */ |
4367
99b6e2bac92a
write window positions to config only when windows are valid
mf0102 <0102@gmx.at>
parents:
4358
diff
changeset
|
642 if ( playlistwin && |
99b6e2bac92a
write window positions to config only when windows are valid
mf0102 <0102@gmx.at>
parents:
4358
diff
changeset
|
643 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
|
644 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
|
645 { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
646 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
|
647 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
|
648 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
|
649 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
|
650 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
651 |
4367
99b6e2bac92a
write window positions to config only when windows are valid
mf0102 <0102@gmx.at>
parents:
4358
diff
changeset
|
652 if ( mainwin && |
99b6e2bac92a
write window positions to config only when windows are valid
mf0102 <0102@gmx.at>
parents:
4358
diff
changeset
|
653 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
|
654 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
|
655 { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
656 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
|
657 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
|
658 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
|
659 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
|
660 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
661 |
4367
99b6e2bac92a
write window positions to config only when windows are valid
mf0102 <0102@gmx.at>
parents:
4358
diff
changeset
|
662 if ( equalizerwin && |
99b6e2bac92a
write window positions to config only when windows are valid
mf0102 <0102@gmx.at>
parents:
4358
diff
changeset
|
663 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
|
664 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
|
665 { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
666 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
|
667 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
|
668 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
|
669 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
|
670 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
671 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
672 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
|
673 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
|
674 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
675 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
|
676 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
|
677 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
|
678 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
|
679 *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
|
680 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
681 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
682 cfg_db_set_float(db, NULL, "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
|
683 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
684 /* RG settings */ |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
685 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
|
686 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
|
687 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
688 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
|
689 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
|
690 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
|
691 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
|
692 } |
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 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
|
695 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
696 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
|
697 { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
698 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
|
699 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
|
700 else |
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_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
|
702 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
703 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
704 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
|
705 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
|
706 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
|
707 else |
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_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
|
709 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
710 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
|
711 if (str) { |
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_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
|
713 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
|
714 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
715 else |
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_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
|
717 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
718 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
|
719 if (str) { |
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_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
|
721 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
|
722 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
723 else |
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_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
|
725 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
726 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
|
727 if (str) { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
728 cfg_db_set_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
|
729 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
|
730 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
731 else |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
732 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
|
733 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
734 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
|
735 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
|
736 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
737 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
|
738 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
|
739 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
740 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
|
741 g_list_length(cfg.url_history)); |
4374
335f4ac3993a
save volume between sessions
Paula Stanciu <paula.stanciu@gmail.com>
parents:
4367
diff
changeset
|
742 |
335f4ac3993a
save volume between sessions
Paula Stanciu <paula.stanciu@gmail.com>
parents:
4367
diff
changeset
|
743 input_get_volume(&vol_l,&vol_r); |
335f4ac3993a
save volume between sessions
Paula Stanciu <paula.stanciu@gmail.com>
parents:
4367
diff
changeset
|
744 cfg_db_set_int(db, NULL, "saved_volume", (vol_l<<8) | vol_r ); |
335f4ac3993a
save volume between sessions
Paula Stanciu <paula.stanciu@gmail.com>
parents:
4367
diff
changeset
|
745 |
4352
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
746 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
|
747 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
|
748 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
|
749 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
|
750 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
751 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
752 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
|
753 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
|
754 } else |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
755 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
|
756 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
|
757 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
|
758 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
|
759 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
760 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
|
761 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
762 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
|
763 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
764 /* 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
|
765 saved = NULL; |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
766 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
|
767 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
|
768 &saved, NULL)) { |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
769 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
|
770 } |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
771 |
ac1f6d211223
Split BmpConfig from main.c and main.h; move around some other stuff too
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
772 /* 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
|
773 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
|
774 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
|
775 } |