annotate src/xs_config.c @ 50:dae6d3c2268d

Minor fixes, updated to support default XMMS configfile
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 21 Jun 2003 21:11:02 +0000
parents 84214a409d19
children 85811bcd049e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 /*
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
2 XMMS-SID - SIDPlay input plugin for X MultiMedia System (XMMS)
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
4 Configuration dialog
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
5
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
6 Written by Matti "ccr" Hamalainen <ccr@tnsp.org>
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
7
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8 This program is free software; you can redistribute it and/or modify
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
9 it under the terms of the GNU General Public License as published by
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
10 the Free Software Foundation; either version 2 of the License, or
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
11 (at your option) any later version.
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
12
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
13 This program is distributed in the hope that it will be useful,
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16 GNU General Public License for more details.
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
17
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
18 You should have received a copy of the GNU General Public License
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
19 along with this program; if not, write to the Free Software
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
20 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
21 */
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
22 #include "xs_config.h"
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
23 #include <xmms/configfile.h>
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
24 #include <stdio.h>
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
25 #include "xs_glade.h"
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
26 #include "xs_interface.h"
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
27
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
28
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
29 /*
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
30 * Global widgets
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
31 */
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
32 static GtkWidget *xs_configwin = NULL,
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
33 *xs_sldb_fileselector = NULL,
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
34 *xs_stil_fileselector = NULL;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
35
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
36 #define LUW(x...) lookup_widget(xs_configwin, ## x)
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
37
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
38
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
39 /*
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
40 * Configuration specific stuff
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
41 */
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
42 t_xs_cfg_item xs_cfgtable[] = {
44
90cd38b28a72 Various fixes and transmogrifying for dual emulation engine environment
Matti Hamalainen <ccr@tnsp.org>
parents: 42
diff changeset
43 {ATYPE_INT, &xs_cfg.fmtBitsPerSample,"fmtBitsPerSample"},
90cd38b28a72 Various fixes and transmogrifying for dual emulation engine environment
Matti Hamalainen <ccr@tnsp.org>
parents: 42
diff changeset
44 {ATYPE_INT, &xs_cfg.fmtChannels, "fmtChannels"},
90cd38b28a72 Various fixes and transmogrifying for dual emulation engine environment
Matti Hamalainen <ccr@tnsp.org>
parents: 42
diff changeset
45 {ATYPE_INT, &xs_cfg.fmtFrequency, "fmtFrequency"},
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
46
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
47 {ATYPE_BOOL, &xs_cfg.mos8580, "mos8580"},
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
48 {ATYPE_BOOL, &xs_cfg.emulateFilters, "emulateFilters"},
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
49 {ATYPE_FLOAT, &xs_cfg.filterFs, "filterFs"},
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
50 {ATYPE_FLOAT, &xs_cfg.filterFm, "filterFm"},
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
51 {ATYPE_FLOAT, &xs_cfg.filterFt, "filterFt"},
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
52 {ATYPE_INT, &xs_cfg.memoryMode, "memoryMode"},
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
53 {ATYPE_INT, &xs_cfg.clockSpeed, "clockSpeed"},
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
54 {ATYPE_BOOL, &xs_cfg.forceSpeed, "forceSpeed"},
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
55
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
56 {ATYPE_BOOL, &xs_cfg.oversampleEnable,"oversampleEnable"},
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
57 {ATYPE_INT, &xs_cfg.oversampleFactor,"oversampleFactor"},
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
58
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
59 {ATYPE_BOOL, &xs_cfg.playMaxTimeEnable,"playMaxTimeEnable"},
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
60 {ATYPE_INT, &xs_cfg.playMaxTime, "playMaxTime"},
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
61 {ATYPE_BOOL, &xs_cfg.songlenDBEnable,"songlenDBEnable"},
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
62 {ATYPE_STR, &xs_cfg.songlenDBPath, "songlenDBPath"},
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
63
44
90cd38b28a72 Various fixes and transmogrifying for dual emulation engine environment
Matti Hamalainen <ccr@tnsp.org>
parents: 42
diff changeset
64 {ATYPE_BOOL, &xs_cfg.stilDBEnable, "stilDBEnable"},
90cd38b28a72 Various fixes and transmogrifying for dual emulation engine environment
Matti Hamalainen <ccr@tnsp.org>
parents: 42
diff changeset
65 {ATYPE_STR, &xs_cfg.stilDBPath, "stilDBPath"},
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
66
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
67 {ATYPE_BOOL, &xs_cfg.detectMagic, "detectMagic"},
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
68
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
69 {ATYPE_BOOL, &xs_cfg.titleOverride, "titleOverride"},
44
90cd38b28a72 Various fixes and transmogrifying for dual emulation engine environment
Matti Hamalainen <ccr@tnsp.org>
parents: 42
diff changeset
70 {ATYPE_STR, &xs_cfg.titleFormat, "titleFormat"}
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
71 };
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
72
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
73 const gint XS_CFGTABLE_MAX = (sizeof(xs_cfgtable) / sizeof(t_xs_cfg_item));
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
74
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
75
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
76 /*
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
77 * Reset the filter settings
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
78 */
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
79 void xs_reset_filters(void)
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
80 {
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
81 /* Reset filter values */
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
82 /*
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
83 xs_cfg.filterFs = SIDEMU_DEFAULTFILTERFS;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
84 xs_cfg.filterFm = SIDEMU_DEFAULTFILTERFM;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
85 xs_cfg.filterFt = SIDEMU_DEFAULTFILTERFT;
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
86 */
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
87 }
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
88
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
89
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
90 /*
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
91 * Get the configuration (from file or default)
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
92 */
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
93 void xs_read_configuration(void)
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
94 {
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
95 gchar *cfgFilename, *tmpStr;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
96 ConfigFile *cfgFile;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
97 gint i;
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
98
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
99 XSDEBUG("initializing configuration ...\n");
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
100
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
101 /* Pre-initialize configuration structure */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
102 xs_cfg.fmtBitsPerSample = 16;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
103 xs_cfg.fmtChannels = XS_CHN_MONO;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
104 xs_cfg.fmtFrequency = 44100;
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
105
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
106 xs_cfg.mos8580 = FALSE;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
107 xs_cfg.emulateFilters = TRUE;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
108 xs_reset_filters();
44
90cd38b28a72 Various fixes and transmogrifying for dual emulation engine environment
Matti Hamalainen <ccr@tnsp.org>
parents: 42
diff changeset
109
90cd38b28a72 Various fixes and transmogrifying for dual emulation engine environment
Matti Hamalainen <ccr@tnsp.org>
parents: 42
diff changeset
110 #ifdef HAVE_SIDPLAY2
90cd38b28a72 Various fixes and transmogrifying for dual emulation engine environment
Matti Hamalainen <ccr@tnsp.org>
parents: 42
diff changeset
111 xs_cfg.memoryMode = XS_MPU_REAL;
90cd38b28a72 Various fixes and transmogrifying for dual emulation engine environment
Matti Hamalainen <ccr@tnsp.org>
parents: 42
diff changeset
112 #else
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
113 xs_cfg.memoryMode = XS_MPU_BANK_SWITCHING;
44
90cd38b28a72 Various fixes and transmogrifying for dual emulation engine environment
Matti Hamalainen <ccr@tnsp.org>
parents: 42
diff changeset
114 #endif
90cd38b28a72 Various fixes and transmogrifying for dual emulation engine environment
Matti Hamalainen <ccr@tnsp.org>
parents: 42
diff changeset
115
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
116 xs_cfg.clockSpeed = XS_CLOCK_PAL;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
117 xs_cfg.forceSpeed = FALSE;
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
118
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
119 xs_cfg.oversampleEnable = FALSE;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
120 xs_cfg.oversampleFactor = XS_MIN_OVERSAMPLE;
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
121
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
122 xs_cfg.playMaxTimeEnable = FALSE;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
123 xs_cfg.playMaxTime = 150;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
124 xs_cfg.songlenDBEnable = FALSE;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
125 xs_strcalloc(&xs_cfg.songlenDBPath, "~/C64Music/Songlengths.txt");
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
126
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
127 xs_cfg.stilDBEnable = FALSE;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
128 xs_strcalloc(&xs_cfg.stilDBPath, "~/C64Music/DOCUMENTS/STIL.txt");
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
129
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
130 xs_cfg.detectMagic = FALSE;
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
131
45
84214a409d19 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 44
diff changeset
132 #ifdef HAVE_XMMSEXTRA
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
133 xs_cfg.titleOverride = FALSE;
45
84214a409d19 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 44
diff changeset
134 #else
84214a409d19 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 44
diff changeset
135 xs_cfg.titleOverride = TRUE;
84214a409d19 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 44
diff changeset
136 #endif
84214a409d19 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 44
diff changeset
137 xs_strcalloc(&xs_cfg.titleFormat, "%1 - %2 (%3)");
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
138
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
139
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
140 /* Try to open the XMMS configuration file */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
141 XSDEBUG("loading from config-file ...\n");
50
dae6d3c2268d Minor fixes, updated to support default XMMS configfile
Matti Hamalainen <ccr@tnsp.org>
parents: 45
diff changeset
142 #ifdef HAVE_NODEFAULTCFG
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
143 cfgFilename = g_strconcat(g_get_home_dir(), XS_CONFIG_FILE, NULL);
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
144 cfgFile = xmms_cfg_open_file(cfgFilename);
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
145 g_free(cfgFilename);
50
dae6d3c2268d Minor fixes, updated to support default XMMS configfile
Matti Hamalainen <ccr@tnsp.org>
parents: 45
diff changeset
146 #else
dae6d3c2268d Minor fixes, updated to support default XMMS configfile
Matti Hamalainen <ccr@tnsp.org>
parents: 45
diff changeset
147 cfgFile = xmms_cfg_open_default_file();
dae6d3c2268d Minor fixes, updated to support default XMMS configfile
Matti Hamalainen <ccr@tnsp.org>
parents: 45
diff changeset
148 #endif
dae6d3c2268d Minor fixes, updated to support default XMMS configfile
Matti Hamalainen <ccr@tnsp.org>
parents: 45
diff changeset
149
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
150 if (cfgFile == NULL)
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
151 {
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
152 XSDEBUG("could not open configuration file, trying to write defaults...\n");
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
153 xs_write_configuration();
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
154 return;
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
155 }
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
156
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
157 /* Read the new settings from XMMS configuration file */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
158 for (i = 0; i < XS_CFGTABLE_MAX; i++)
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
159 {
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
160 switch (xs_cfgtable[i].atype) {
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
161 case ATYPE_INT:
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
162 xmms_cfg_read_int(cfgFile, XS_CONFIG_IDENT, xs_cfgtable[i].aname, (gint *) xs_cfgtable[i].adata);
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
163 break;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
164
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
165 case ATYPE_BOOL:
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
166 xmms_cfg_read_boolean(cfgFile, XS_CONFIG_IDENT, xs_cfgtable[i].aname, (gboolean *) xs_cfgtable[i].adata);
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
167 break;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
168
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
169 case ATYPE_FLOAT:
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
170 xmms_cfg_read_float(cfgFile, XS_CONFIG_IDENT, xs_cfgtable[i].aname, (gfloat *) xs_cfgtable[i].adata);
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
171 break;
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
172
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
173 case ATYPE_STR:
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
174 if (xmms_cfg_read_string(cfgFile, XS_CONFIG_IDENT, xs_cfgtable[i].aname, (gchar **) &tmpStr))
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
175 {
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
176 /* Read was successfull */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
177 xs_strcalloc((gchar **) xs_cfgtable[i].adata, tmpStr);
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
178 g_free(tmpStr);
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
179 }
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
180 break;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
181
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
182 default:
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
183 XSERR("Internal: Unsupported setting type found while reading configuration file. Please report to author!\n");
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
184 break;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
185 }
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
186 }
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
187
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
188
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
189 /* Free the config file */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
190 xmms_cfg_free(cfgFile);
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
191
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
192 XSDEBUG("OK\n");
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
193 }
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
194
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
195
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
196
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
197 /*
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
198 * Write the current configuration
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
199 */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
200 gint xs_write_configuration(void)
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
201 {
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
202 gchar *cfgFilename;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
203 ConfigFile *cfgFile;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
204 gint i;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
205
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
206 XSDEBUG("writing configuration ...\n");
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
207
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
208 /*
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
209 * Try to open the XMMS configuration file
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
210 */
50
dae6d3c2268d Minor fixes, updated to support default XMMS configfile
Matti Hamalainen <ccr@tnsp.org>
parents: 45
diff changeset
211 #ifdef HAVE_NODEFAULTCFG
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
212 cfgFilename = g_strconcat(g_get_home_dir(), XS_CONFIG_FILE, NULL);
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
213 cfgFile = xmms_cfg_open_file(cfgFilename);
50
dae6d3c2268d Minor fixes, updated to support default XMMS configfile
Matti Hamalainen <ccr@tnsp.org>
parents: 45
diff changeset
214 #else
dae6d3c2268d Minor fixes, updated to support default XMMS configfile
Matti Hamalainen <ccr@tnsp.org>
parents: 45
diff changeset
215 cfgFile = xmms_cfg_open_default_file();
dae6d3c2268d Minor fixes, updated to support default XMMS configfile
Matti Hamalainen <ccr@tnsp.org>
parents: 45
diff changeset
216 #endif
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
217
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
218 if (!cfgFile)
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
219 cfgFile = xmms_cfg_new();
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
220
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
221
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
222 /* Write the new settings to XMMS configuration file */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
223 for (i = 0; i < XS_CFGTABLE_MAX; i++)
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
224 {
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
225 switch (xs_cfgtable[i].atype) {
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
226 case ATYPE_INT:
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
227 xmms_cfg_write_int(cfgFile, XS_CONFIG_IDENT, xs_cfgtable[i].aname, *(gint *) xs_cfgtable[i].adata);
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
228 break;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
229
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
230 case ATYPE_BOOL:
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
231 xmms_cfg_write_boolean(cfgFile, XS_CONFIG_IDENT, xs_cfgtable[i].aname, *(gboolean *) xs_cfgtable[i].adata);
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
232 break;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
233
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
234 case ATYPE_FLOAT:
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
235 xmms_cfg_write_float(cfgFile, XS_CONFIG_IDENT, xs_cfgtable[i].aname, *(gfloat *) xs_cfgtable[i].adata);
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
236 break;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
237
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
238 case ATYPE_STR:
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
239 xmms_cfg_write_string(cfgFile, XS_CONFIG_IDENT, xs_cfgtable[i].aname, *(gchar **) xs_cfgtable[i].adata);
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
240 break;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
241
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
242 default:
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
243 XSERR("Internal: Unsupported setting type found while writing configuration file. Please report to author!\n");
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
244 break;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
245 }
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
246 }
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
247
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
248 /* Flush the file */
50
dae6d3c2268d Minor fixes, updated to support default XMMS configfile
Matti Hamalainen <ccr@tnsp.org>
parents: 45
diff changeset
249 #ifdef HAVE_NODEFAULTCFG
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
250 xmms_cfg_write_file(cfgFile, cfgFilename);
50
dae6d3c2268d Minor fixes, updated to support default XMMS configfile
Matti Hamalainen <ccr@tnsp.org>
parents: 45
diff changeset
251 g_free(cfgFilename);
dae6d3c2268d Minor fixes, updated to support default XMMS configfile
Matti Hamalainen <ccr@tnsp.org>
parents: 45
diff changeset
252 #else
dae6d3c2268d Minor fixes, updated to support default XMMS configfile
Matti Hamalainen <ccr@tnsp.org>
parents: 45
diff changeset
253 xmms_cfg_write_default_file(cfgFile);
dae6d3c2268d Minor fixes, updated to support default XMMS configfile
Matti Hamalainen <ccr@tnsp.org>
parents: 45
diff changeset
254 #endif
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
255
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
256 /* Free the memory areas */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
257 xmms_cfg_free(cfgFile);
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
258
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
259 return 0;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
260 }
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
261
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
262
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
263 /*
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
264 * Configuration panel was canceled
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
265 */
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
266 void xs_cfg_cancel(void)
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
267 {
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
268 gtk_widget_destroy(xs_configwin);
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
269 xs_configwin = NULL;
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
270 }
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
271
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
272
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
273 /*
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
274 * Configuration was accepted (OK), save the settings
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
275 */
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
276 void xs_cfg_ok(void)
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
277 {
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
278 XSDEBUG("get data from widgets to config...\n");
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
279
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
280 /* Check the resolution settings */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
281 if (GTK_TOGGLE_BUTTON(LUW("cfg_res_16bit"))->active)
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
282 xs_cfg.fmtBitsPerSample = XS_RES_16BIT;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
283 else
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
284 xs_cfg.fmtBitsPerSample = XS_RES_8BIT;
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
285
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
286
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
287 /* Channel settings */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
288 if (GTK_TOGGLE_BUTTON(LUW("cfg_chn_mono"))->active)
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
289 xs_cfg.fmtChannels = XS_CHN_MONO;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
290 else
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
291 if (GTK_TOGGLE_BUTTON(LUW("cfg_chn_stereo"))->active)
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
292 xs_cfg.fmtChannels = XS_CHN_STEREO;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
293 else
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
294 if (GTK_TOGGLE_BUTTON(LUW("cfg_chn_autopan"))->active)
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
295 xs_cfg.fmtChannels = XS_CHN_AUTOPAN;
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
296
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
297
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
298 /* Frequency setting */
42
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
299 xs_cfg.fmtFrequency = (gint) GTK_ADJUSTMENT(LUW("cfg_samplerate"))->value;
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
300
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
301
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
302 /* Filter and waveform settings */
42
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
303 xs_cfg.mos8580 = GTK_TOGGLE_BUTTON(LUW("cfg_emu_mos8580"))->active;
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
304
42
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
305 xs_cfg.emulateFilters = GTK_TOGGLE_BUTTON(LUW("cfg_emu_filters"))->active;
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
306
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
307 xs_cfg.filterFs = GTK_ADJUSTMENT(LUW("cfg_filt_fs_adj"))->value;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
308 xs_cfg.filterFm = GTK_ADJUSTMENT(LUW("cfg_filt_fm_adj"))->value;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
309 xs_cfg.filterFt = GTK_ADJUSTMENT(LUW("cfg_filt_ft_adj"))->value;
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
310
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
311
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
312 /* Memorymode settings */
45
84214a409d19 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 44
diff changeset
313 if (GTK_TOGGLE_BUTTON(LUW("cfg_emu_mem_real"))->active)
84214a409d19 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 44
diff changeset
314 xs_cfg.memoryMode = XS_MPU_REAL;
84214a409d19 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 44
diff changeset
315 else
42
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
316 if (GTK_TOGGLE_BUTTON(LUW("cfg_emu_mem_banksw"))->active)
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
317 xs_cfg.memoryMode = XS_MPU_BANK_SWITCHING;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
318 else
42
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
319 if (GTK_TOGGLE_BUTTON(LUW("cfg_emu_mem_transrom"))->active)
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
320 xs_cfg.memoryMode = XS_MPU_TRANSPARENT_ROM;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
321 else
42
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
322 if (GTK_TOGGLE_BUTTON(LUW("cfg_emu_mem_playsid"))->active)
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
323 xs_cfg.memoryMode = XS_MPU_PLAYSID_ENVIRONMENT;
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
324
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
325 /* Clockspeed settings */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
326 if (GTK_TOGGLE_BUTTON(LUW("cfg_clock_ntsc"))->active)
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
327 xs_cfg.clockSpeed = XS_CLOCK_NTSC;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
328 else
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
329 xs_cfg.clockSpeed = XS_CLOCK_PAL;
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
330
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
331 xs_cfg.forceSpeed = GTK_TOGGLE_BUTTON(LUW("cfg_clock_force"))->active;
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
332
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
333
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
334 /* Songlength-detection settings */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
335 xs_cfg.playMaxTimeEnable = GTK_TOGGLE_BUTTON(LUW("cfg_sld_usemaxtime"))->active;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
336 xs_cfg.playMaxTime = GTK_ADJUSTMENT(LUW("cfg_sld_maxtime_adj"))->value;
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
337
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
338 xs_cfg.songlenDBEnable = (GTK_TOGGLE_BUTTON(LUW("cfg_sld"))->active);
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
339 xs_strcalloc(&xs_cfg.songlenDBPath, gtk_entry_get_text(GTK_ENTRY(LUW("cfg_sld_dbpath"))));
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
340
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
341
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
342 /* STIL and miscellaneous settings */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
343 xs_cfg.stilDBEnable = GTK_TOGGLE_BUTTON(LUW("cfg_stil_use"))->active;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
344 xs_strcalloc(&xs_cfg.stilDBPath, gtk_entry_get_text(GTK_ENTRY(LUW("cfg_stil_path"))));
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
345
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
346 xs_cfg.detectMagic = GTK_TOGGLE_BUTTON(LUW("cfg_detectmagic"))->active;
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
347
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
348 /* Title settings */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
349 xs_cfg.titleOverride = GTK_TOGGLE_BUTTON(LUW("cfg_ftitle_override"))->active;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
350 xs_strcalloc(&xs_cfg.titleFormat, gtk_entry_get_text(GTK_ENTRY(LUW("cfg_ftitle_format"))));
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
351
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
352
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
353 /* Write settings */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
354 xs_write_configuration();
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
355
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
356 /* NOTICE/FIXME FIX ME: if songlendb or stildb settings changed, we need to flush and reread them */
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
357
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
358 /* Close window */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
359 gtk_widget_destroy(xs_configwin);
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
360 xs_configwin = NULL;
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
361 }
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
362
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
363
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
364 /*
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
365 * Update filter setting sliders
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
366 */
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
367 void xs_update_filters(void)
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
368 {
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
369 gtk_adjustment_set_value(GTK_ADJUSTMENT(LUW("cfg_filt_fs_adj")), xs_cfg.filterFs);
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
370 gtk_adjustment_set_value(GTK_ADJUSTMENT(LUW("cfg_filt_fm_adj")), xs_cfg.filterFm);
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
371 gtk_adjustment_set_value(GTK_ADJUSTMENT(LUW("cfg_filt_ft_adj")), xs_cfg.filterFt);
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
372 }
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
373
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
374
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
375 /*
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
376 * Reset filter settings to defaults
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
377 */
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
378 void xs_cfg_filter_reset(void)
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
379 {
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
380 xs_reset_filters();
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
381 xs_update_filters();
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
382 }
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
383
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
384
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
385 /*
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
386 * HVSC songlength-database file selector response-functions
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
387 */
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
388 void xs_cfg_sld_dbbrowse(GtkButton *button, gpointer user_data)
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
389 {
42
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
390 if (xs_sldb_fileselector != NULL)
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
391 {
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
392 gdk_window_raise(xs_sldb_fileselector->window);
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
393 return;
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
394 }
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
395
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
396 xs_sldb_fileselector = create_xs_sldbfileselector();
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
397 gtk_widget_show(xs_sldb_fileselector);
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
398 }
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
399
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
400
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
401 void xs_cfg_sldb_fs_ok(void)
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
402 {
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
403 /* Selection was accepted! */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
404 gtk_entry_set_text(GTK_ENTRY(LUW("cfg_sld_dbpath")),
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
405 gtk_file_selection_get_filename(GTK_FILE_SELECTION(xs_sldb_fileselector))
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
406 );
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
407
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
408 /* Close file selector window */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
409 gtk_widget_destroy(xs_sldb_fileselector);
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
410 xs_sldb_fileselector = NULL;
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
411 }
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
412
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
413
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
414 void xs_cfg_sldb_fs_cancel(void)
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
415 {
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
416 /* Close file selector window */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
417 gtk_widget_destroy(xs_sldb_fileselector);
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
418 xs_sldb_fileselector = NULL;
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
419 }
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
420
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
421
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
422 /*
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
423 * STIL-database file selector response-functions
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
424 */
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
425 void xs_cfg_stil_browse(GtkButton *button, gpointer user_data)
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
426 {
42
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
427 if (xs_stil_fileselector != NULL)
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
428 {
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
429 gdk_window_raise(xs_stil_fileselector->window);
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
430 return;
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
431 }
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
432
42
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
433 xs_stil_fileselector = create_xs_stilfileselector();
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
434 gtk_widget_show(xs_stil_fileselector);
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
435 }
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
436
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
437
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
438 void xs_cfg_stil_fs_ok(void)
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
439 {
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
440 /* Selection was accepted! */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
441 gtk_entry_set_text(GTK_ENTRY(LUW("cfg_stil_path")),
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
442 gtk_file_selection_get_filename(GTK_FILE_SELECTION(xs_stil_fileselector)));
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
443
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
444 /* Close file selector window */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
445 gtk_widget_destroy(xs_stil_fileselector);
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
446 xs_stil_fileselector = NULL;
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
447 }
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
448
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
449
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
450 void xs_cfg_stil_fs_cancel(void)
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
451 {
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
452 /* Close file selector window */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
453 gtk_widget_destroy(xs_stil_fileselector);
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
454 xs_stil_fileselector = NULL;
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
455 }
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
456
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
457
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
458 /*
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
459 * Execute the configuration panel
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
460 */
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
461 void xs_configure(void)
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
462 {
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
463 /* Check if the window already exists */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
464 if (xs_configwin != NULL)
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
465 {
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
466 gdk_window_raise(xs_configwin->window);
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
467 return;
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
468 }
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
469
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
470 /* Create the window */
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
471 xs_configwin = create_xs_configwin();
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
472
42
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
473 /* Based on selected emulation library, disable options */
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
474 #ifdef HAVE_SIDPLAY1
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
475 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(LUW("cfg_emu_sidplay1")), TRUE);
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
476 #else
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
477 gtk_widget_set_sensitive(LUW("cfg_emu_sidplay1"), FALSE);
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
478 #endif
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
479
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
480 #ifdef HAVE_SIDPLAY2
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
481 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(LUW("cfg_emu_sidplay2")), TRUE);
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
482 #else
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
483 gtk_widget_set_sensitive(LUW("cfg_emu_sidplay2"), FALSE);
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
484 gtk_widget_set_sensitive(LUW("cfg_emu_sidplay2_opt"), FALSE);
45
84214a409d19 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 44
diff changeset
485
84214a409d19 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 44
diff changeset
486 gtk_widget_set_sensitive(LUW("cfg_emu_mem_real"), FALSE);
84214a409d19 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 44
diff changeset
487
84214a409d19 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 44
diff changeset
488 gtk_widget_set_sensitive(LUW("cfg_oversample_grp"), FALSE);
84214a409d19 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 44
diff changeset
489 gtk_widget_set_sensitive(LUW("cfg_oversample"), FALSE);
84214a409d19 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 44
diff changeset
490 gtk_widget_set_sensitive(LUW("cfg_oversample_factor"), FALSE);
42
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
491 #endif
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
492
45
84214a409d19 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 44
diff changeset
493 #ifndef HAVE_XMMSEXTRA
84214a409d19 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 44
diff changeset
494 gtk_widget_set_sensitive(LUW("cfg_ftitle_override"), FALSE);
84214a409d19 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 44
diff changeset
495 xs_cfg.titleOverride = TRUE;
84214a409d19 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 44
diff changeset
496 #endif
42
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
497
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
498 /* Sound resolution settings */
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
499 switch (xs_cfg.fmtBitsPerSample) {
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
500 case XS_RES_16BIT:
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
501 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(LUW("cfg_res_16bit")), TRUE);
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
502 break;
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
503 case XS_RES_8BIT:
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
504 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(LUW("cfg_res_8bit")), TRUE);
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
505 break;
42
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
506 }
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
507
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
508 gtk_adjustment_set_value(GTK_ADJUSTMENT(LUW("cfg_samplerate_adj")), xs_cfg.fmtFrequency);
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
509
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
510 /* Channel settings */
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
511 switch (xs_cfg.fmtChannels) {
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
512 case XS_CHN_MONO:
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
513 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(LUW("cfg_chn_mono")), TRUE);
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
514 break;
42
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
515 case XS_CHN_STEREO:
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
516 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(LUW("cfg_chn_stereo")), TRUE);
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
517 break;
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
518 case XS_CHN_AUTOPAN:
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
519 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(LUW("cfg_chn_autopan")), TRUE);
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
520 break;
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
521 }
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
522
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
523
42
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
524 /* Memorymode settings */
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
525 switch (xs_cfg.memoryMode) {
45
84214a409d19 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 44
diff changeset
526 case XS_MPU_REAL:
84214a409d19 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 44
diff changeset
527 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(LUW("cfg_emu_mem_real")), TRUE);
84214a409d19 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 44
diff changeset
528 break;
84214a409d19 Minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 44
diff changeset
529
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
530 case XS_MPU_BANK_SWITCHING:
42
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
531 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(LUW("cfg_emu_mem_banksw")), TRUE);
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
532 break;
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
533
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
534 case XS_MPU_TRANSPARENT_ROM:
42
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
535 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(LUW("cfg_emu_mem_transrom")), TRUE);
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
536 break;
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
537
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
538 case XS_MPU_PLAYSID_ENVIRONMENT:
42
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
539 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(LUW("cfg_emu_mem_playsid")), TRUE);
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
540 break;
42
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
541 }
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
542
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
543
42
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
544 /* Filter and waveform settings */
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
545 if (xs_cfg.mos8580)
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
546 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(LUW("cfg_emu_mos8580")), TRUE);
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
547 else
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
548 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(LUW("cfg_emu_mos6581")), TRUE);
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
549
42
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
550 if (xs_cfg.emulateFilters)
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
551 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(LUW("cfg_emu_filters")), TRUE);
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
552
42
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
553 xs_update_filters();
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
554
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
555
42
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
556 /* Song-length database */
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
557 if (xs_cfg.playMaxTimeEnable)
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
558 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(LUW("cfg_sld_usemaxtime")), TRUE);
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
559
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
560 gtk_adjustment_set_value(GTK_ADJUSTMENT(LUW("cfg_sld_maxtime_adj")), xs_cfg.playMaxTime);
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
561
42
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
562 if (xs_cfg.songlenDBEnable)
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
563 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(LUW("cfg_sld")), TRUE);
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
564
42
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
565 if (xs_cfg.songlenDBPath != NULL)
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
566 gtk_entry_set_text(GTK_ENTRY(LUW("cfg_sld_dbpath")), xs_cfg.songlenDBPath);
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
567
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
568
42
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
569 /* STIL and miscellaneous settings */
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
570 if (xs_cfg.stilDBEnable)
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
571 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(LUW("cfg_stil_use")), TRUE);
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
572
42
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
573 if (xs_cfg.stilDBPath != NULL)
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
574 gtk_entry_set_text(GTK_ENTRY(LUW("cfg_stil_path")), xs_cfg.stilDBPath);
3
279b1e12df2b Updated to version 0.8-devel
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
575
42
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
576 if (xs_cfg.detectMagic)
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
577 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(LUW("cfg_detectmagic")), TRUE);
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
578
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
579
42
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
580 /* Title-settings */
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
581 if (xs_cfg.titleOverride)
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
582 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(LUW("cfg_ftitle_override")), TRUE);
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
583
42
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
584 if (xs_cfg.titleFormat != NULL)
Matti Hamalainen <ccr@tnsp.org>
parents: 40
diff changeset
585 gtk_entry_set_text(GTK_ENTRY(LUW("cfg_ftitle_format")), xs_cfg.titleFormat);
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
586
40
1788f4ce6a44 Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents: 24
diff changeset
587 gtk_widget_show(xs_configwin);
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
588 }
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
589