Mercurial > hg > xmms-sid
annotate src/xs_config.c @ 156:a57fb0799259
Cleanups
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 09 Mar 2004 21:12:00 +0000 |
parents | a7abcda7a86c |
children | 02bbce56d6b0 |
rev | line source |
---|---|
1 | 1 /* |
3 | 2 XMMS-SID - SIDPlay input plugin for X MultiMedia System (XMMS) |
1 | 3 |
4 Configuration dialog | |
5 | |
3 | 6 Written by Matti "ccr" Hamalainen <ccr@tnsp.org> |
1 | 7 |
8 This program is free software; you can redistribute it and/or modify | |
9 it under the terms of the GNU General Public License as published by | |
10 the Free Software Foundation; either version 2 of the License, or | |
11 (at your option) any later version. | |
12 | |
13 This program is distributed in the hope that it will be useful, | |
14 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 GNU General Public License for more details. | |
17 | |
18 You should have received a copy of the GNU General Public License | |
19 along with this program; if not, write to the Free Software | |
20 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
21 */ | |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
22 #include "xs_config.h" |
3 | 23 #include <xmms/configfile.h> |
24 #include <stdio.h> | |
25 #include "xs_glade.h" | |
26 #include "xs_interface.h" | |
63 | 27 #include "xs_support.h" |
1 | 28 |
29 /* | |
3 | 30 * Global widgets |
1 | 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, |
127
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
34 *xs_stil_fileselector = NULL, |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
35 *xs_hvsc_pathselector = NULL; |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
36 |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
37 #define LUW(x...) lookup_widget(xs_configwin, ## x) |
1 | 38 |
39 | |
40 /* | |
41 * Configuration specific stuff | |
42 */ | |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
43 t_xs_cfg_item xs_cfgtable[] = { |
127
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
44 {CTYPE_INT, &xs_cfg.audioBitsPerSample, "audioBitsPerSample"}, |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
45 {CTYPE_INT, &xs_cfg.audioChannels, "audioChannels"}, |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
46 {CTYPE_INT, &xs_cfg.audioFrequency, "audioFrequency"}, |
3 | 47 |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
48 {CTYPE_BOOL, &xs_cfg.mos8580, "mos8580"}, |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
49 {CTYPE_BOOL, &xs_cfg.emulateFilters, "emulateFilters"}, |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
50 {CTYPE_FLOAT, &xs_cfg.filterFs, "filterFs"}, |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
51 {CTYPE_FLOAT, &xs_cfg.filterFm, "filterFm"}, |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
52 {CTYPE_FLOAT, &xs_cfg.filterFt, "filterFt"}, |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
53 {CTYPE_INT, &xs_cfg.memoryMode, "memoryMode"}, |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
54 {CTYPE_INT, &xs_cfg.clockSpeed, "clockSpeed"}, |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
55 {CTYPE_BOOL, &xs_cfg.forceSpeed, "forceSpeed"}, |
75
653c9b0d1320
SIDPlay2 support "works" now. Borked problems with threads.
Matti Hamalainen <ccr@tnsp.org>
parents:
72
diff
changeset
|
56 |
78
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
57 {CTYPE_INT, &xs_cfg.sid2Builder, "sid2Builder"}, |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
58 {CTYPE_INT, &xs_cfg.sid2OptLevel, "sid2OptLevel"}, |
75
653c9b0d1320
SIDPlay2 support "works" now. Borked problems with threads.
Matti Hamalainen <ccr@tnsp.org>
parents:
72
diff
changeset
|
59 |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
60 {CTYPE_BOOL, &xs_cfg.oversampleEnable, "oversampleEnable"}, |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
61 {CTYPE_INT, &xs_cfg.oversampleFactor, "oversampleFactor"}, |
75
653c9b0d1320
SIDPlay2 support "works" now. Borked problems with threads.
Matti Hamalainen <ccr@tnsp.org>
parents:
72
diff
changeset
|
62 {CTYPE_INT, &xs_cfg.oversampleFilter, "oversampleFilter"}, |
3 | 63 |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
64 {CTYPE_BOOL, &xs_cfg.playMaxTimeEnable, "playMaxTimeEnable"}, |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
65 {CTYPE_INT, &xs_cfg.playMaxTime, "playMaxTime"}, |
65
bf7b647b3239
The fabled 0.8-rewrite now works to some extent
Matti Hamalainen <ccr@tnsp.org>
parents:
64
diff
changeset
|
66 {CTYPE_BOOL, &xs_cfg.playMaxTimeUnknown, "playMaxTimeUnknown"}, |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
67 {CTYPE_BOOL, &xs_cfg.songlenDBEnable, "songlenDBEnable"}, |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
68 {CTYPE_STR, &xs_cfg.songlenDBPath, "songlenDBPath"}, |
3 | 69 |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
70 {CTYPE_BOOL, &xs_cfg.stilDBEnable, "stilDBEnable"}, |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
71 {CTYPE_STR, &xs_cfg.stilDBPath, "stilDBPath"}, |
109
578b71b62eeb
Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents:
102
diff
changeset
|
72 {CTYPE_STR, &xs_cfg.hvscPath, "hvscPath"}, |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
73 |
78
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
74 {CTYPE_INT, &xs_cfg.subsongControl, "subsongControl"}, |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
75 {CTYPE_BOOL, &xs_cfg.detectMagic, "detectMagic"}, |
3 | 76 |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
77 {CTYPE_BOOL, &xs_cfg.titleOverride, "titleOverride"}, |
72
e3b205a6bc7e
Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents:
69
diff
changeset
|
78 {CTYPE_STR, &xs_cfg.titleFormat, "titleFormat"}, |
e3b205a6bc7e
Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents:
69
diff
changeset
|
79 |
e3b205a6bc7e
Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents:
69
diff
changeset
|
80 {CTYPE_INT, &xs_cfg.playerEngine, "playerEngine"}, |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
81 }; |
3 | 82 |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
83 const gint xs_cfgtable_max = (sizeof(xs_cfgtable) / sizeof(t_xs_cfg_item)); |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
84 |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
85 |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
86 t_xs_wid_item xs_widtable[] = { |
127
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
87 { WTYPE_BGROUP, CTYPE_INT, "cfg_res_16bit", &xs_cfg.audioBitsPerSample, XS_RES_16BIT }, |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
88 { WTYPE_BGROUP, CTYPE_INT, "cfg_res_8bit", &xs_cfg.audioBitsPerSample, XS_RES_8BIT }, |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
89 { WTYPE_BGROUP, CTYPE_INT, "cfg_chn_mono", &xs_cfg.audioChannels, XS_CHN_MONO }, |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
90 { WTYPE_BGROUP, CTYPE_INT, "cfg_chn_stereo", &xs_cfg.audioChannels, XS_CHN_STEREO }, |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
91 { WTYPE_BGROUP, CTYPE_INT, "cfg_chn_autopan", &xs_cfg.audioChannels, XS_CHN_AUTOPAN }, |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
92 { WTYPE_SPIN, CTYPE_INT, "cfg_samplerate", &xs_cfg.audioFrequency, 0 }, |
69 | 93 { WTYPE_BUTTON, CTYPE_BOOL, "cfg_oversample", &xs_cfg.oversampleEnable, 0 }, |
94 { WTYPE_SPIN, CTYPE_INT, "cfg_oversample_factor",&xs_cfg.oversampleFactor, 0 }, | |
75
653c9b0d1320
SIDPlay2 support "works" now. Borked problems with threads.
Matti Hamalainen <ccr@tnsp.org>
parents:
72
diff
changeset
|
95 { WTYPE_BGROUP, CTYPE_INT, "cfg_overfilter_average",&xs_cfg.oversampleFilter, XS_FILTER_AVERAGE }, |
653c9b0d1320
SIDPlay2 support "works" now. Borked problems with threads.
Matti Hamalainen <ccr@tnsp.org>
parents:
72
diff
changeset
|
96 { WTYPE_BGROUP, CTYPE_INT, "cfg_overfilter_sinc", &xs_cfg.oversampleFilter, XS_FILTER_SINC }, |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
97 |
75
653c9b0d1320
SIDPlay2 support "works" now. Borked problems with threads.
Matti Hamalainen <ccr@tnsp.org>
parents:
72
diff
changeset
|
98 { WTYPE_BGROUP, CTYPE_INT, "cfg_emu_sidplay1", &xs_cfg.playerEngine, XS_ENG_SIDPLAY1 }, |
653c9b0d1320
SIDPlay2 support "works" now. Borked problems with threads.
Matti Hamalainen <ccr@tnsp.org>
parents:
72
diff
changeset
|
99 { WTYPE_BGROUP, CTYPE_INT, "cfg_emu_sidplay2", &xs_cfg.playerEngine, XS_ENG_SIDPLAY2 }, |
653c9b0d1320
SIDPlay2 support "works" now. Borked problems with threads.
Matti Hamalainen <ccr@tnsp.org>
parents:
72
diff
changeset
|
100 { WTYPE_BGROUP, CTYPE_INT, "cfg_emu_nanosid", &xs_cfg.playerEngine, XS_ENG_NANOSID }, |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
101 { WTYPE_BGROUP, CTYPE_INT, "cfg_emu_mem_real", &xs_cfg.memoryMode, XS_MPU_REAL }, |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
102 { WTYPE_BGROUP, CTYPE_INT, "cfg_emu_mem_banksw", &xs_cfg.memoryMode, XS_MPU_BANK_SWITCHING }, |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
103 { WTYPE_BGROUP, CTYPE_INT, "cfg_emu_mem_transrom", &xs_cfg.memoryMode, XS_MPU_TRANSPARENT_ROM }, |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
104 { WTYPE_BGROUP, CTYPE_INT, "cfg_emu_mem_playsid", &xs_cfg.memoryMode, XS_MPU_PLAYSID_ENVIRONMENT }, |
78
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
105 |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
106 { WTYPE_BUTTON, CTYPE_BOOL, "cfg_emu_mos8580", &xs_cfg.mos8580, 0 }, |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
107 { WTYPE_BGROUP, CTYPE_INT, "cfg_emu_clock_ntsc", &xs_cfg.clockSpeed, XS_CLOCK_NTSC }, |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
108 { WTYPE_BGROUP, CTYPE_INT, "cfg_emu_clock_pal", &xs_cfg.clockSpeed, XS_CLOCK_PAL }, |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
109 { WTYPE_BUTTON, CTYPE_BOOL, "cfg_emu_clock_force", &xs_cfg.forceSpeed, 0 }, |
78
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
110 { WTYPE_BUTTON, CTYPE_BOOL, "cfg_emu_sidplay2_opt", &xs_cfg.sid2OptLevel, 0 }, |
87
94497283affa
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
78
diff
changeset
|
111 |
94497283affa
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
78
diff
changeset
|
112 { WTYPE_BGROUP, CTYPE_INT, "cfg_emu_sidplay2_resid",&xs_cfg.sid2Builder, XS_BLD_RESID }, |
94497283affa
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
78
diff
changeset
|
113 { WTYPE_BGROUP, CTYPE_INT, "cfg_emu_sidplay2_hardsid",&xs_cfg.sid2Builder, XS_BLD_HARDSID }, |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
114 |
75
653c9b0d1320
SIDPlay2 support "works" now. Borked problems with threads.
Matti Hamalainen <ccr@tnsp.org>
parents:
72
diff
changeset
|
115 { WTYPE_BUTTON, CTYPE_BOOL, "cfg_emu_filters", &xs_cfg.emulateFilters, 0 }, |
653c9b0d1320
SIDPlay2 support "works" now. Borked problems with threads.
Matti Hamalainen <ccr@tnsp.org>
parents:
72
diff
changeset
|
116 { WTYPE_SCALE, CTYPE_FLOAT, "cfg_emu_filt_fs", &xs_cfg.filterFs, 0 }, |
653c9b0d1320
SIDPlay2 support "works" now. Borked problems with threads.
Matti Hamalainen <ccr@tnsp.org>
parents:
72
diff
changeset
|
117 { WTYPE_SCALE, CTYPE_FLOAT, "cfg_emu_filt_fm", &xs_cfg.filterFm, 0 }, |
653c9b0d1320
SIDPlay2 support "works" now. Borked problems with threads.
Matti Hamalainen <ccr@tnsp.org>
parents:
72
diff
changeset
|
118 { WTYPE_SCALE, CTYPE_FLOAT, "cfg_emu_filt_ft", &xs_cfg.filterFt, 0 }, |
64 | 119 |
69 | 120 { WTYPE_BUTTON, CTYPE_BOOL, "cfg_maxtime_enable", &xs_cfg.playMaxTimeEnable, 0 }, |
121 { WTYPE_SPIN, CTYPE_INT, "cfg_maxtime", &xs_cfg.playMaxTime, 0 }, | |
122 { WTYPE_BUTTON, CTYPE_BOOL, "cfg_maxtime_unknown", &xs_cfg.playMaxTimeUnknown, 0 }, | |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
123 { WTYPE_BUTTON, CTYPE_BOOL, "cfg_sld_enable", &xs_cfg.songlenDBEnable, 0 }, |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
124 { WTYPE_TEXT, CTYPE_STR, "cfg_sld_dbpath", &xs_cfg.songlenDBPath, 0 }, |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
125 |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
126 { WTYPE_BUTTON, CTYPE_BOOL, "cfg_stil_enable", &xs_cfg.stilDBEnable, 0 }, |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
127 { WTYPE_TEXT, CTYPE_STR, "cfg_stil_dbpath", &xs_cfg.stilDBPath, 0 }, |
109
578b71b62eeb
Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents:
102
diff
changeset
|
128 { WTYPE_TEXT, CTYPE_STR, "cfg_hvsc_path", &xs_cfg.hvscPath, 0 }, |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
129 |
78
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
130 { WTYPE_BGROUP, CTYPE_INT, "cfg_subsong_none", &xs_cfg.subsongControl, XS_SSC_NONE }, |
132
4162a5370b9e
Added "seek"-subsong control option, in style of xmms-sidplay.
Matti Hamalainen <ccr@tnsp.org>
parents:
130
diff
changeset
|
131 { WTYPE_BGROUP, CTYPE_INT, "cfg_subsong_seek", &xs_cfg.subsongControl, XS_SSC_SEEK }, |
78
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
132 { WTYPE_BGROUP, CTYPE_INT, "cfg_subsong_popup", &xs_cfg.subsongControl, XS_SSC_POPUP }, |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
133 { WTYPE_BGROUP, CTYPE_INT, "cfg_subsong_patch", &xs_cfg.subsongControl, XS_SSC_PATCH }, |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
134 |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
135 { WTYPE_BUTTON, CTYPE_BOOL, "cfg_detectmagic", &xs_cfg.detectMagic, 0 }, |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
136 |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
137 { WTYPE_BUTTON, CTYPE_BOOL, "cfg_ftitle_override", &xs_cfg.titleOverride, 0 }, |
72
e3b205a6bc7e
Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents:
69
diff
changeset
|
138 { WTYPE_TEXT, CTYPE_STR, "cfg_ftitle_format", &xs_cfg.titleFormat, 0 }, |
e3b205a6bc7e
Lots re-arranging and new code for upcoming modularization.
Matti Hamalainen <ccr@tnsp.org>
parents:
69
diff
changeset
|
139 |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
140 }; |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
141 |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
142 const gint xs_widtable_max = (sizeof(xs_widtable) / sizeof(t_xs_wid_item)); |
1 | 143 |
144 | |
3 | 145 /* |
146 * Reset the filter settings | |
147 */ | |
148 void xs_reset_filters(void) | |
149 { | |
136
92952aeccb77
Minor fixes and improvements, nanosid support.
Matti Hamalainen <ccr@tnsp.org>
parents:
132
diff
changeset
|
150 /* Reset filter values (copied from libsidplay1's headers) */ |
92952aeccb77
Minor fixes and improvements, nanosid support.
Matti Hamalainen <ccr@tnsp.org>
parents:
132
diff
changeset
|
151 xs_cfg.filterFs = 400.0f; |
92952aeccb77
Minor fixes and improvements, nanosid support.
Matti Hamalainen <ccr@tnsp.org>
parents:
132
diff
changeset
|
152 xs_cfg.filterFm = 60.0f; |
92952aeccb77
Minor fixes and improvements, nanosid support.
Matti Hamalainen <ccr@tnsp.org>
parents:
132
diff
changeset
|
153 xs_cfg.filterFt = 0.05f; |
3 | 154 } |
155 | |
1 | 156 |
157 /* | |
158 * Get the configuration (from file or default) | |
159 */ | |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
160 void xs_read_configuration(void) |
1 | 161 { |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
162 gchar *cfgFilename, *tmpStr; |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
163 ConfigFile *cfgFile; |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
164 gint i; |
3 | 165 |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
166 XSDEBUG("initializing configuration ...\n"); |
3 | 167 |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
168 /* Pre-initialize configuration structure */ |
127
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
169 xs_cfg.audioBitsPerSample = XS_RES_16BIT; |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
170 xs_cfg.audioChannels = XS_CHN_MONO; |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
171 xs_cfg.audioFrequency = 44100; |
3 | 172 |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
173 xs_cfg.mos8580 = FALSE; |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
174 xs_cfg.emulateFilters = TRUE; |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
175 xs_reset_filters(); |
44
90cd38b28a72
Various fixes and transmogrifying for dual emulation engine environment
Matti Hamalainen <ccr@tnsp.org>
parents:
42
diff
changeset
|
176 |
90cd38b28a72
Various fixes and transmogrifying for dual emulation engine environment
Matti Hamalainen <ccr@tnsp.org>
parents:
42
diff
changeset
|
177 #ifdef HAVE_SIDPLAY2 |
77
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
178 xs_cfg.playerEngine = XS_ENG_SIDPLAY2; |
44
90cd38b28a72
Various fixes and transmogrifying for dual emulation engine environment
Matti Hamalainen <ccr@tnsp.org>
parents:
42
diff
changeset
|
179 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
|
180 #else |
77
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
181 #ifdef HAVE_SIDPLAY1 |
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
182 xs_cfg.playerEngine = XS_ENG_SIDPLAY1; |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
183 xs_cfg.memoryMode = XS_MPU_BANK_SWITCHING; |
77
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
184 #else |
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
185 #ifdef HAVE_NANOSID |
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
186 xs_cfg.playerEngine = XS_ENG_NANOSID; |
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
187 #else |
141 | 188 #error This should not happen! No emulator engines configured in! |
77
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
189 #endif |
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
190 #endif |
44
90cd38b28a72
Various fixes and transmogrifying for dual emulation engine environment
Matti Hamalainen <ccr@tnsp.org>
parents:
42
diff
changeset
|
191 #endif |
90cd38b28a72
Various fixes and transmogrifying for dual emulation engine environment
Matti Hamalainen <ccr@tnsp.org>
parents:
42
diff
changeset
|
192 |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
193 xs_cfg.clockSpeed = XS_CLOCK_PAL; |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
194 xs_cfg.forceSpeed = FALSE; |
75
653c9b0d1320
SIDPlay2 support "works" now. Borked problems with threads.
Matti Hamalainen <ccr@tnsp.org>
parents:
72
diff
changeset
|
195 |
78
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
196 xs_cfg.sid2OptLevel = FALSE; |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
197 #ifdef HAVE_RESID_BUILDER |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
198 xs_cfg.sid2Builder = XS_BLD_RESID; |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
199 #else |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
200 #ifdef HAVE_HARDSID_BUILDER |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
201 xs_cfg.sid2Builder = XS_BLD_HARDSID; |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
202 #else |
89
b3f5b731a3fe
Fixed a problem with only libsidplay1 installed
Matti Hamalainen <ccr@tnsp.org>
parents:
87
diff
changeset
|
203 #ifdef HAVE_SIDPLAY2 |
b3f5b731a3fe
Fixed a problem with only libsidplay1 installed
Matti Hamalainen <ccr@tnsp.org>
parents:
87
diff
changeset
|
204 #error This should not happen! No SIDPlay2 builders! |
b3f5b731a3fe
Fixed a problem with only libsidplay1 installed
Matti Hamalainen <ccr@tnsp.org>
parents:
87
diff
changeset
|
205 #endif |
78
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
206 #endif |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
207 #endif |
75
653c9b0d1320
SIDPlay2 support "works" now. Borked problems with threads.
Matti Hamalainen <ccr@tnsp.org>
parents:
72
diff
changeset
|
208 |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
209 xs_cfg.oversampleEnable = FALSE; |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
210 xs_cfg.oversampleFactor = XS_MIN_OVERSAMPLE; |
75
653c9b0d1320
SIDPlay2 support "works" now. Borked problems with threads.
Matti Hamalainen <ccr@tnsp.org>
parents:
72
diff
changeset
|
211 xs_cfg.oversampleFilter = XS_FILTER_AVERAGE; |
1 | 212 |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
213 xs_cfg.playMaxTimeEnable = FALSE; |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
214 xs_cfg.playMaxTime = 150; |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
215 xs_cfg.songlenDBEnable = FALSE; |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
216 xs_strcalloc(&xs_cfg.songlenDBPath, "~/C64Music/Songlengths.txt"); |
3 | 217 |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
218 xs_cfg.stilDBEnable = FALSE; |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
219 xs_strcalloc(&xs_cfg.stilDBPath, "~/C64Music/DOCUMENTS/STIL.txt"); |
109
578b71b62eeb
Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents:
102
diff
changeset
|
220 xs_strcalloc(&xs_cfg.hvscPath, "~/C64Music"); |
3 | 221 |
78
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
222 #ifdef HAVE_SONG_POSITION |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
223 xs_cfg.subsongControl = XS_SSC_PATCH; |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
224 #else |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
225 xs_cfg.subsongControl = XS_SSC_POPUP; |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
226 #endif |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
227 |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
228 xs_cfg.detectMagic = FALSE; |
1 | 229 |
45 | 230 #ifdef HAVE_XMMSEXTRA |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
231 xs_cfg.titleOverride = FALSE; |
45 | 232 #else |
233 xs_cfg.titleOverride = TRUE; | |
234 #endif | |
116
01496c6f85c3
Updated default formatstring to match recent changes.
Matti Hamalainen <ccr@tnsp.org>
parents:
109
diff
changeset
|
235 xs_strcalloc(&xs_cfg.titleFormat, "%p - %t (%c) [%n]"); |
3 | 236 |
237 | |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
238 /* Try to open the XMMS configuration file */ |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
239 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
|
240 #ifdef HAVE_NODEFAULTCFG |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
241 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
|
242 cfgFile = xmms_cfg_open_file(cfgFilename); |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
243 g_free(cfgFilename); |
50
dae6d3c2268d
Minor fixes, updated to support default XMMS configfile
Matti Hamalainen <ccr@tnsp.org>
parents:
45
diff
changeset
|
244 #else |
dae6d3c2268d
Minor fixes, updated to support default XMMS configfile
Matti Hamalainen <ccr@tnsp.org>
parents:
45
diff
changeset
|
245 cfgFile = xmms_cfg_open_default_file(); |
dae6d3c2268d
Minor fixes, updated to support default XMMS configfile
Matti Hamalainen <ccr@tnsp.org>
parents:
45
diff
changeset
|
246 #endif |
dae6d3c2268d
Minor fixes, updated to support default XMMS configfile
Matti Hamalainen <ccr@tnsp.org>
parents:
45
diff
changeset
|
247 |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
248 if (cfgFile == NULL) |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
249 { |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
250 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
|
251 xs_write_configuration(); |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
252 return; |
3 | 253 } |
1 | 254 |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
255 /* Read the new settings from XMMS configuration file */ |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
256 for (i = 0; i < xs_cfgtable_max; i++) |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
257 { |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
258 switch (xs_cfgtable[i].valType) { |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
259 case CTYPE_INT: |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
260 xmms_cfg_read_int(cfgFile, XS_CONFIG_IDENT, xs_cfgtable[i].valName, (gint *) xs_cfgtable[i].valData); |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
261 break; |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
262 |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
263 case CTYPE_BOOL: |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
264 xmms_cfg_read_boolean(cfgFile, XS_CONFIG_IDENT, xs_cfgtable[i].valName, (gboolean *) xs_cfgtable[i].valData); |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
265 break; |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
266 |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
267 case CTYPE_FLOAT: |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
268 xmms_cfg_read_float(cfgFile, XS_CONFIG_IDENT, xs_cfgtable[i].valName, (gfloat *) xs_cfgtable[i].valData); |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
269 break; |
3 | 270 |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
271 case CTYPE_STR: |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
272 if (xmms_cfg_read_string(cfgFile, XS_CONFIG_IDENT, xs_cfgtable[i].valName, (gchar **) &tmpStr)) |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
273 { |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
274 /* Read was successfull */ |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
275 xs_strcalloc((gchar **) xs_cfgtable[i].valData, tmpStr); |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
276 g_free(tmpStr); |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
277 } |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
278 break; |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
279 |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
280 default: |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
281 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
|
282 break; |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
283 } |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
284 } |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
285 |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
286 |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
287 /* Free the config file */ |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
288 xmms_cfg_free(cfgFile); |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
289 |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
290 XSDEBUG("OK\n"); |
1 | 291 } |
292 | |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
293 |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
294 |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
295 /* |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
296 * Write the current configuration |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
297 */ |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
298 gint xs_write_configuration(void) |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
299 { |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
300 gchar *cfgFilename; |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
301 ConfigFile *cfgFile; |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
302 gint i; |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
303 |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
304 XSDEBUG("writing configuration ...\n"); |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
305 |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
306 /* |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
307 * Try to open the XMMS configuration file |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
308 */ |
50
dae6d3c2268d
Minor fixes, updated to support default XMMS configfile
Matti Hamalainen <ccr@tnsp.org>
parents:
45
diff
changeset
|
309 #ifdef HAVE_NODEFAULTCFG |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
310 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
|
311 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
|
312 #else |
dae6d3c2268d
Minor fixes, updated to support default XMMS configfile
Matti Hamalainen <ccr@tnsp.org>
parents:
45
diff
changeset
|
313 cfgFile = xmms_cfg_open_default_file(); |
dae6d3c2268d
Minor fixes, updated to support default XMMS configfile
Matti Hamalainen <ccr@tnsp.org>
parents:
45
diff
changeset
|
314 #endif |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
315 |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
316 if (!cfgFile) |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
317 cfgFile = xmms_cfg_new(); |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
318 |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
319 |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
320 /* Write the new settings to XMMS configuration file */ |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
321 for (i = 0; i < xs_cfgtable_max; i++) |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
322 { |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
323 switch (xs_cfgtable[i].valType) { |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
324 case CTYPE_INT: |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
325 xmms_cfg_write_int(cfgFile, XS_CONFIG_IDENT, xs_cfgtable[i].valName, *(gint *) xs_cfgtable[i].valData); |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
326 break; |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
327 |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
328 case CTYPE_BOOL: |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
329 xmms_cfg_write_boolean(cfgFile, XS_CONFIG_IDENT, xs_cfgtable[i].valName, *(gboolean *) xs_cfgtable[i].valData); |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
330 break; |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
331 |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
332 case CTYPE_FLOAT: |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
333 xmms_cfg_write_float(cfgFile, XS_CONFIG_IDENT, xs_cfgtable[i].valName, *(gfloat *) xs_cfgtable[i].valData); |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
334 break; |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
335 |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
336 case CTYPE_STR: |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
337 xmms_cfg_write_string(cfgFile, XS_CONFIG_IDENT, xs_cfgtable[i].valName, *(gchar **) xs_cfgtable[i].valData); |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
338 break; |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
339 |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
340 default: |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
341 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
|
342 break; |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
343 } |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
344 } |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
345 |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
346 /* Flush the file */ |
50
dae6d3c2268d
Minor fixes, updated to support default XMMS configfile
Matti Hamalainen <ccr@tnsp.org>
parents:
45
diff
changeset
|
347 #ifdef HAVE_NODEFAULTCFG |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
348 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
|
349 g_free(cfgFilename); |
dae6d3c2268d
Minor fixes, updated to support default XMMS configfile
Matti Hamalainen <ccr@tnsp.org>
parents:
45
diff
changeset
|
350 #else |
dae6d3c2268d
Minor fixes, updated to support default XMMS configfile
Matti Hamalainen <ccr@tnsp.org>
parents:
45
diff
changeset
|
351 xmms_cfg_write_default_file(cfgFile); |
dae6d3c2268d
Minor fixes, updated to support default XMMS configfile
Matti Hamalainen <ccr@tnsp.org>
parents:
45
diff
changeset
|
352 #endif |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
353 |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
354 /* Free the memory areas */ |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
355 xmms_cfg_free(cfgFile); |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
356 |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
357 return 0; |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
358 } |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
359 |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
360 |
1 | 361 /* |
362 * Configuration panel was canceled | |
363 */ | |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
364 void xs_cfg_cancel(void) |
1 | 365 { |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
366 gtk_widget_destroy(xs_configwin); |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
367 xs_configwin = NULL; |
1 | 368 } |
369 | |
370 | |
371 /* | |
372 * Configuration was accepted (OK), save the settings | |
373 */ | |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
374 void xs_cfg_ok(void) |
1 | 375 { |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
376 gint i; |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
377 gfloat tmpValue; |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
378 |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
379 XSDEBUG("get data from widgets to config...\n"); |
3 | 380 |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
381 for (i = 0; i < xs_widtable_max; i++) |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
382 { |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
383 switch (xs_widtable[i].widType) { |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
384 case WTYPE_BGROUP: |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
385 /* Check if toggle-button is active */ |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
386 if (GTK_TOGGLE_BUTTON(LUW(xs_widtable[i].widName))->active) |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
387 { |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
388 /* Yes, set the constant value */ |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
389 *((gint *) xs_widtable[i].valData) = xs_widtable[i].valSet; |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
390 } |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
391 break; |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
392 |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
393 case WTYPE_SPIN: |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
394 case WTYPE_SCALE: |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
395 /* Get the value */ |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
396 switch (xs_widtable[i].widType) { |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
397 case WTYPE_SPIN: |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
398 tmpValue = gtk_spin_button_get_adjustment( |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
399 GTK_SPIN_BUTTON(LUW(xs_widtable[i].widName)))->value; |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
400 break; |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
401 |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
402 case WTYPE_SCALE: |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
403 tmpValue = gtk_range_get_adjustment( |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
404 GTK_RANGE(LUW(xs_widtable[i].widName)))->value; |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
405 break; |
63 | 406 |
407 default: | |
408 tmpValue = -1; | |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
409 } |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
410 |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
411 /* Set the value */ |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
412 switch (xs_widtable[i].valType) { |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
413 case CTYPE_INT: |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
414 *((gint *) xs_widtable[i].valData) = (gint) tmpValue; |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
415 break; |
1 | 416 |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
417 case CTYPE_FLOAT: |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
418 *((gfloat *) xs_widtable[i].valData) = tmpValue; |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
419 break; |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
420 } |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
421 break; |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
422 |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
423 case WTYPE_BUTTON: |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
424 /* Check if toggle-button is active */ |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
425 *((gboolean *) xs_widtable[i].valData) = |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
426 (GTK_TOGGLE_BUTTON(LUW(xs_widtable[i].widName))->active); |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
427 break; |
3 | 428 |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
429 case WTYPE_TEXT: |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
430 /* Get text from text-widget */ |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
431 xs_strcalloc((gchar **) xs_widtable[i].valData, |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
432 gtk_entry_get_text(GTK_ENTRY(LUW(xs_widtable[i].widName))) |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
433 ); |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
434 break; |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
435 } |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
436 } |
1 | 437 |
147
a7abcda7a86c
SLDB, STIL and emulation engine settings are now updated
Matti Hamalainen <ccr@tnsp.org>
parents:
141
diff
changeset
|
438 /* Close window */ |
a7abcda7a86c
SLDB, STIL and emulation engine settings are now updated
Matti Hamalainen <ccr@tnsp.org>
parents:
141
diff
changeset
|
439 gtk_widget_destroy(xs_configwin); |
a7abcda7a86c
SLDB, STIL and emulation engine settings are now updated
Matti Hamalainen <ccr@tnsp.org>
parents:
141
diff
changeset
|
440 xs_configwin = NULL; |
a7abcda7a86c
SLDB, STIL and emulation engine settings are now updated
Matti Hamalainen <ccr@tnsp.org>
parents:
141
diff
changeset
|
441 |
a7abcda7a86c
SLDB, STIL and emulation engine settings are now updated
Matti Hamalainen <ccr@tnsp.org>
parents:
141
diff
changeset
|
442 |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
443 /* Write settings */ |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
444 xs_write_configuration(); |
1 | 445 |
147
a7abcda7a86c
SLDB, STIL and emulation engine settings are now updated
Matti Hamalainen <ccr@tnsp.org>
parents:
141
diff
changeset
|
446 /* Re-initialize */ |
a7abcda7a86c
SLDB, STIL and emulation engine settings are now updated
Matti Hamalainen <ccr@tnsp.org>
parents:
141
diff
changeset
|
447 xs_reinit(); |
1 | 448 } |
449 | |
450 | |
451 /* | |
452 * Reset filter settings to defaults | |
453 */ | |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
454 void xs_cfg_filter_reset(void) |
3 | 455 { |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
456 xs_reset_filters(); |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
457 |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
458 gtk_adjustment_set_value(gtk_range_get_adjustment(GTK_RANGE(LUW("cfg_emu_filt_fs"))), xs_cfg.filterFs); |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
459 gtk_adjustment_set_value(gtk_range_get_adjustment(GTK_RANGE(LUW("cfg_emu_filt_fm"))), xs_cfg.filterFm); |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
460 gtk_adjustment_set_value(gtk_range_get_adjustment(GTK_RANGE(LUW("cfg_emu_filt_ft"))), xs_cfg.filterFt); |
3 | 461 } |
462 | |
463 | |
464 /* | |
465 * HVSC songlength-database file selector response-functions | |
466 */ | |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
467 void xs_cfg_sld_dbbrowse(GtkButton *button, gpointer user_data) |
1 | 468 { |
42 | 469 if (xs_sldb_fileselector != NULL) |
470 { | |
471 gdk_window_raise(xs_sldb_fileselector->window); | |
472 return; | |
473 } | |
474 | |
475 xs_sldb_fileselector = create_xs_sldbfileselector(); | |
476 gtk_widget_show(xs_sldb_fileselector); | |
3 | 477 } |
478 | |
479 | |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
480 void xs_cfg_sldb_fs_ok(void) |
3 | 481 { |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
482 /* Selection was accepted! */ |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
483 gtk_entry_set_text(GTK_ENTRY(LUW("cfg_sld_dbpath")), |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
484 gtk_file_selection_get_filename(GTK_FILE_SELECTION(xs_sldb_fileselector))); |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
485 |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
486 /* Close file selector window */ |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
487 gtk_widget_destroy(xs_sldb_fileselector); |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
488 xs_sldb_fileselector = NULL; |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
489 } |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
490 |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
491 |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
492 void xs_cfg_sldb_fs_cancel(void) |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
493 { |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
494 /* Close file selector window */ |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
495 gtk_widget_destroy(xs_sldb_fileselector); |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
496 xs_sldb_fileselector = NULL; |
1 | 497 } |
498 | |
499 | |
500 /* | |
501 * STIL-database file selector response-functions | |
502 */ | |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
503 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
|
504 { |
42 | 505 if (xs_stil_fileselector != NULL) |
506 { | |
507 gdk_window_raise(xs_stil_fileselector->window); | |
508 return; | |
509 } | |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
510 |
42 | 511 xs_stil_fileselector = create_xs_stilfileselector(); |
512 gtk_widget_show(xs_stil_fileselector); | |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
513 } |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
514 |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
515 |
3 | 516 void xs_cfg_stil_fs_ok(void) |
1 | 517 { |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
518 /* Selection was accepted! */ |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
519 gtk_entry_set_text(GTK_ENTRY(LUW("cfg_stil_dbpath")), |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
520 gtk_file_selection_get_filename(GTK_FILE_SELECTION(xs_stil_fileselector))); |
1 | 521 |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
522 /* Close file selector window */ |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
523 gtk_widget_destroy(xs_stil_fileselector); |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
524 xs_stil_fileselector = NULL; |
1 | 525 } |
526 | |
527 | |
3 | 528 void xs_cfg_stil_fs_cancel(void) |
1 | 529 { |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
530 /* Close file selector window */ |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
531 gtk_widget_destroy(xs_stil_fileselector); |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
532 xs_stil_fileselector = NULL; |
1 | 533 } |
534 | |
535 | |
127
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
536 /* |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
537 * HVSC location selector response-functions |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
538 */ |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
539 void xs_cfg_hvsc_browse(GtkButton *button, gpointer user_data) |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
540 { |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
541 if (xs_hvsc_pathselector != NULL) |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
542 { |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
543 gdk_window_raise(xs_hvsc_pathselector->window); |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
544 return; |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
545 } |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
546 |
130
84bff1a4bb1c
Fixed minor bugs in configuration dialog handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
127
diff
changeset
|
547 xs_hvsc_pathselector = create_xs_hvscpathselector(); |
127
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
548 gtk_widget_show(xs_hvsc_pathselector); |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
549 } |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
550 |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
551 |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
552 void xs_cfg_hvsc_fs_ok(void) |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
553 { |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
554 /* Selection was accepted! */ |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
555 gtk_entry_set_text(GTK_ENTRY(LUW("cfg_hvsc_path")), |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
556 gtk_file_selection_get_filename(GTK_FILE_SELECTION(xs_hvsc_pathselector))); |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
557 |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
558 /* Close file selector window */ |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
559 gtk_widget_destroy(xs_hvsc_pathselector); |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
560 xs_hvsc_pathselector = NULL; |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
561 } |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
562 |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
563 |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
564 void xs_cfg_hvsc_fs_cancel(void) |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
565 { |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
566 /* Close file selector window */ |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
567 gtk_widget_destroy(xs_hvsc_pathselector); |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
568 xs_hvsc_pathselector = NULL; |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
569 } |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
570 |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
571 |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
572 /* |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
573 * Selection toggle handlers |
ddb513bd2610
Improved audio format support, now supported formats are "queried" from
Matti Hamalainen <ccr@tnsp.org>
parents:
116
diff
changeset
|
574 */ |
78
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
575 void xs_cfg_emu_filters_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
77
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
576 { |
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
577 } |
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
578 |
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
579 |
78
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
580 void xs_cfg_ftitle_override_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
77
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
581 { |
78
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
582 gboolean isActive = GTK_TOGGLE_BUTTON(LUW("cfg_ftitle_override"))->active; |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
583 |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
584 gtk_widget_set_sensitive(LUW("cfg_ftitle_format"), isActive); |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
585 gtk_widget_set_sensitive(LUW("cfg_ftitle_desc1"), isActive); |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
586 gtk_widget_set_sensitive(LUW("cfg_ftitle_desc2"), isActive); |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
587 } |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
588 |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
589 |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
590 void xs_cfg_emu_sidplay1_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
591 { |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
592 } |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
593 |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
594 |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
595 void xs_cfg_emu_sidplay2_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
596 { |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
597 gboolean isActive = GTK_TOGGLE_BUTTON(LUW("cfg_emu_sidplay2"))->active; |
77
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
598 |
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
599 gtk_widget_set_sensitive(LUW("cfg_emu_mem_real"), isActive); |
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
600 |
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
601 gtk_widget_set_sensitive(LUW("cfg_oversample_grp"), isActive); |
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
602 gtk_widget_set_sensitive(LUW("cfg_oversample"), isActive); |
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
603 gtk_widget_set_sensitive(LUW("cfg_oversample_factor"), isActive); |
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
604 gtk_widget_set_sensitive(LUW("cfg_overfilter_average"), isActive); |
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
605 gtk_widget_set_sensitive(LUW("cfg_overfilter_sinc"), isActive); |
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
606 |
78
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
607 gtk_widget_set_sensitive(LUW("cfg_sidplay2_grp"), isActive); |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
608 gtk_widget_set_sensitive(LUW("cfg_emu_sidplay2_opt"), isActive); |
77
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
609 |
78
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
610 #ifdef HAVE_RESID_BUILDER |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
611 gtk_widget_set_sensitive(LUW("cfg_emu_sidplay2_resid"), isActive); |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
612 #else |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
613 gtk_widget_set_sensitive(LUW("cfg_emu_sidplay2_resid"), FALSE); |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
614 #endif |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
615 |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
616 #ifdef HAVE_HARDSID_BUILDER |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
617 gtk_widget_set_sensitive(LUW("cfg_emu_sidplay2_hardsid"), isActive); |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
618 #else |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
619 gtk_widget_set_sensitive(LUW("cfg_emu_sidplay2_hardsid"), FALSE); |
77
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
620 #endif |
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
621 } |
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
622 |
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
623 |
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
624 void xs_cfg_emu_nanosid_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
625 { |
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
626 } |
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
627 |
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
628 |
1 | 629 /* |
630 * Execute the configuration panel | |
631 */ | |
632 void xs_configure(void) | |
633 { | |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
634 gint i; |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
635 gfloat tmpValue; |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
636 |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
637 /* Check if the window already exists */ |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
638 if (xs_configwin != NULL) |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
639 { |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
640 gdk_window_raise(xs_configwin->window); |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
641 return; |
1 | 642 } |
643 | |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
644 /* Create the window */ |
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
645 xs_configwin = create_xs_configwin(); |
1 | 646 |
78
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
647 |
42 | 648 /* Based on selected emulation library, disable options */ |
75
653c9b0d1320
SIDPlay2 support "works" now. Borked problems with threads.
Matti Hamalainen <ccr@tnsp.org>
parents:
72
diff
changeset
|
649 #ifndef HAVE_SIDPLAY1 |
42 | 650 gtk_widget_set_sensitive(LUW("cfg_emu_sidplay1"), FALSE); |
651 #endif | |
652 | |
77
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
653 #ifndef HAVE_SIDPLAY2 |
42 | 654 gtk_widget_set_sensitive(LUW("cfg_emu_sidplay2"), FALSE); |
75
653c9b0d1320
SIDPlay2 support "works" now. Borked problems with threads.
Matti Hamalainen <ccr@tnsp.org>
parents:
72
diff
changeset
|
655 #endif |
653c9b0d1320
SIDPlay2 support "works" now. Borked problems with threads.
Matti Hamalainen <ccr@tnsp.org>
parents:
72
diff
changeset
|
656 |
653c9b0d1320
SIDPlay2 support "works" now. Borked problems with threads.
Matti Hamalainen <ccr@tnsp.org>
parents:
72
diff
changeset
|
657 #ifndef HAVE_NANOSID |
653c9b0d1320
SIDPlay2 support "works" now. Borked problems with threads.
Matti Hamalainen <ccr@tnsp.org>
parents:
72
diff
changeset
|
658 gtk_widget_set_sensitive(LUW("cfg_emu_nanosid"), FALSE); |
42 | 659 #endif |
1 | 660 |
78
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
661 /* Other UI options */ |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
662 #ifndef HAVE_XMMSEXTRA |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
663 gtk_widget_set_sensitive(LUW("cfg_ftitle_override"), FALSE); |
147
a7abcda7a86c
SLDB, STIL and emulation engine settings are now updated
Matti Hamalainen <ccr@tnsp.org>
parents:
141
diff
changeset
|
664 xs_cfg.titleOverride = TRUE; |
78
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
665 #endif |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
666 |
102
cf3bbfdb90ac
Disable song-pos patch option when song-pos support is not compiled in.
Matti Hamalainen <ccr@tnsp.org>
parents:
89
diff
changeset
|
667 #ifndef HAVE_SONG_POSITION |
cf3bbfdb90ac
Disable song-pos patch option when song-pos support is not compiled in.
Matti Hamalainen <ccr@tnsp.org>
parents:
89
diff
changeset
|
668 gtk_widget_set_sensitive(LUW("cfg_subsong_patch"), FALSE); |
cf3bbfdb90ac
Disable song-pos patch option when song-pos support is not compiled in.
Matti Hamalainen <ccr@tnsp.org>
parents:
89
diff
changeset
|
669 #endif |
78
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
670 |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
671 /* Update the widget sensitivities */ |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
672 xs_cfg_emu_filters_toggled(NULL, NULL); |
ab522ab65c85
Various fixes and improvements
Matti Hamalainen <ccr@tnsp.org>
parents:
77
diff
changeset
|
673 xs_cfg_ftitle_override_toggled(NULL, NULL); |
77
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
674 xs_cfg_emu_sidplay1_toggled(NULL, NULL); |
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
675 xs_cfg_emu_sidplay2_toggled(NULL, NULL); |
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
676 xs_cfg_emu_nanosid_toggled(NULL, NULL); |
3fca0b13a80a
Configuration panel tweaking
Matti Hamalainen <ccr@tnsp.org>
parents:
75
diff
changeset
|
677 |
3 | 678 |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
679 /* Set current data to widgets */ |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
680 for (i = 0; i < xs_widtable_max; i++) |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
681 { |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
682 switch (xs_widtable[i].widType) { |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
683 case WTYPE_BGROUP: |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
684 /* Check if current value matches the given one */ |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
685 gtk_toggle_button_set_active( |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
686 GTK_TOGGLE_BUTTON(LUW(xs_widtable[i].widName)), |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
687 (*((gint *) xs_widtable[i].valData) == xs_widtable[i].valSet) |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
688 ); |
45 | 689 break; |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
690 |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
691 |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
692 case WTYPE_SPIN: |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
693 case WTYPE_SCALE: |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
694 /* Get the value */ |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
695 switch (xs_widtable[i].valType) { |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
696 case CTYPE_INT: |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
697 tmpValue = (gfloat) *((gint *) xs_widtable[i].valData); |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
698 break; |
45 | 699 |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
700 case CTYPE_FLOAT: |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
701 tmpValue = *((gfloat *) xs_widtable[i].valData); |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
702 break; |
63 | 703 |
704 default: | |
705 tmpValue = -1; | |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
706 } |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
707 |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
708 /* Set the value */ |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
709 switch (xs_widtable[i].widType) { |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
710 case WTYPE_SPIN: |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
711 gtk_adjustment_set_value( |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
712 gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(LUW(xs_widtable[i].widName))), |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
713 tmpValue); |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
714 break; |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
715 |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
716 case WTYPE_SCALE: |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
717 gtk_adjustment_set_value( |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
718 gtk_range_get_adjustment(GTK_RANGE(LUW(xs_widtable[i].widName))), |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
719 tmpValue); |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
720 break; |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
721 } |
1 | 722 break; |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
723 |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
724 case WTYPE_BUTTON: |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
725 /* Set toggle-button */ |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
726 gtk_toggle_button_set_active( |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
727 GTK_TOGGLE_BUTTON(LUW(xs_widtable[i].widName)), |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
728 *((gboolean *) xs_widtable[i].valData) |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
729 ); |
1 | 730 break; |
3 | 731 |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
732 case WTYPE_TEXT: |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
733 /* Set text to text-widget */ |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
734 if (*(gchar **) xs_widtable[i].valData != NULL) |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
735 { |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
736 gtk_entry_set_text( |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
737 GTK_ENTRY(LUW(xs_widtable[i].widName)), |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
738 *(gchar **) xs_widtable[i].valData); |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
739 } |
1 | 740 break; |
57
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
741 } |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
742 } |
85811bcd049e
Improved, re-written configuration code and lots of minor fixes
Matti Hamalainen <ccr@tnsp.org>
parents:
50
diff
changeset
|
743 |
40
1788f4ce6a44
Numerous changes towards 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
24
diff
changeset
|
744 gtk_widget_show(xs_configwin); |
1 | 745 } |
746 |