Mercurial > audlegacy-plugins
annotate src/sid/xs_config.c @ 2883:67d527114af5
wrong variable current_device
author | Paula Stanciu <paula.stanciu@gmail.com> |
---|---|
date | Thu, 07 Aug 2008 20:39:35 +0300 |
parents | 45ef6d7c0174 |
children | 3134a0987162 |
rev | line source |
---|---|
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1 /* |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
2 XMMS-SID - SIDPlay input plugin for X MultiMedia System (XMMS) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
3 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
4 Configuration dialog |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
5 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
6 Programmed and designed by Matti 'ccr' Hamalainen <ccr@tnsp.org> |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
7 (C) Copyright 1999-2007 Tecnic Software productions (TNSP) |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
8 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
9 This program is free software; you can redistribute it and/or modify |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
10 it under the terms of the GNU General Public License as published by |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
11 the Free Software Foundation; either version 2 of the License, or |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
12 (at your option) any later version. |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
13 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
14 This program is distributed in the hope that it will be useful, |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
15 but WITHOUT ANY WARRANTY; without even the implied warranty of |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
17 GNU General Public License for more details. |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
18 |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
19 You should have received a copy of the GNU General Public License along |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
20 with this program; if not, write to the Free Software Foundation, Inc., |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
21 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
22 */ |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
23 #include "xs_config.h" |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
24 |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
25 #ifdef AUDACIOUS_PLUGIN |
2036 | 26 #include <audacious/plugin.h> |
2595
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
27 #define XS_CONFIG_FILE ConfigDb |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
28 #define XS_CONFIG_OPEN aud_cfg_db_open |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
29 #define XS_CONFIG_FREE aud_cfg_db_close |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
30 |
2595
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
31 #define XS_CFG_SET_STRING aud_cfg_db_set_string |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
32 #define XS_CFG_SET_FLOAT aud_cfg_db_set_float |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
33 #define XS_CFG_SET_INT aud_cfg_db_set_int |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
34 #define XS_CFG_SET_BOOL aud_cfg_db_set_bool |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
35 #define XS_CFG_GET_STRING aud_cfg_db_get_string |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
36 #define XS_CFG_GET_FLOAT aud_cfg_db_get_float |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
37 #define XS_CFG_GET_INT aud_cfg_db_get_int |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
38 #define XS_CFG_GET_BOOL aud_cfg_db_get_bool |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
39 #else |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
40 #include <xmms/configfile.h> |
2595
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
41 #define XS_CONFIG_FILE ConfigFile |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
42 #define XS_CONFIG_OPEN xmms_cfg_open_default_file |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
43 #define XS_CONFIG_FREE xmms_cfg_free |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
44 |
2595
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
45 #define XS_CFG_SET_STRING xmms_cfg_write_string |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
46 #define XS_CFG_SET_FLOAT xmms_cfg_write_float |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
47 #define XS_CFG_SET_INT xmms_cfg_write_int |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
48 #define XS_CFG_SET_BOOL xmms_cfg_write_boolean |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
49 #define XS_CFG_GET_STRING xmms_cfg_read_string |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
50 #define XS_CFG_GET_FLOAT xmms_cfg_read_float |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
51 #define XS_CFG_GET_INT xmms_cfg_read_int |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
52 #define XS_CFG_GET_BOOL xmms_cfg_read_boolean |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
53 #endif |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
54 #include <stdio.h> |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
55 #include <ctype.h> |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
56 #include "xs_glade.h" |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
57 #include "xs_interface.h" |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
58 #include "xs_support.h" |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
59 |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
60 |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
61 /* |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
62 * Global widgets |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
63 */ |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
64 static GtkWidget *xs_configwin = NULL, |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
65 *xs_sldb_fileselector = NULL, |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
66 *xs_stil_fileselector = NULL, |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
67 *xs_hvsc_selector = NULL, |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
68 *xs_filt_importselector = NULL, |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
69 *xs_filt_exportselector = NULL; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
70 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
71 #define LUW(x) lookup_widget(xs_configwin, x) |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
72 |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
73 /* Samplerates |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
74 */ |
1590 | 75 static const gchar *xs_samplerates_table[] = { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
76 "8000", "11025", "22050", |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
77 "44100", "48000", "64000", |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
78 "96000" |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
79 }; |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
80 |
1590 | 81 static const gint xs_nsamplerates_table = (sizeof(xs_samplerates_table) / sizeof(xs_samplerates_table[0])); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
82 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
83 /* |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
84 * Configuration specific stuff |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
85 */ |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
86 XS_MUTEX(xs_cfg); |
2643
45ef6d7c0174
Synchronized typedef name changes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2595
diff
changeset
|
87 struct xs_cfg_t xs_cfg; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
88 |
2643
45ef6d7c0174
Synchronized typedef name changes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2595
diff
changeset
|
89 static xs_cfg_item_t xs_cfgtable[] = { |
2595
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
90 { CTYPE_INT, &xs_cfg.audioBitsPerSample, "audioBitsPerSample" }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
91 { CTYPE_INT, &xs_cfg.audioChannels, "audioChannels" }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
92 { CTYPE_INT, &xs_cfg.audioFrequency, "audioFrequency" }, |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
93 |
2595
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
94 { CTYPE_BOOL, &xs_cfg.mos8580, "mos8580" }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
95 { CTYPE_BOOL, &xs_cfg.forceModel, "forceModel" }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
96 { CTYPE_BOOL, &xs_cfg.emulateFilters, "emulateFilters" }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
97 { CTYPE_FLOAT, &xs_cfg.sid1FilterFs, "filterFs" }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
98 { CTYPE_FLOAT, &xs_cfg.sid1FilterFm, "filterFm" }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
99 { CTYPE_FLOAT, &xs_cfg.sid1FilterFt, "filterFt" }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
100 { CTYPE_INT, &xs_cfg.memoryMode, "memoryMode" }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
101 { CTYPE_INT, &xs_cfg.clockSpeed, "clockSpeed" }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
102 { CTYPE_BOOL, &xs_cfg.forceSpeed, "forceSpeed" }, |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
103 |
2595
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
104 { CTYPE_INT, &xs_cfg.playerEngine, "playerEngine" }, |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
105 |
2595
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
106 { CTYPE_INT, &xs_cfg.sid2Builder, "sid2Builder" }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
107 { CTYPE_INT, &xs_cfg.sid2OptLevel, "sid2OptLevel" }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
108 { CTYPE_INT, &xs_cfg.sid2NFilterPresets, "sid2NFilterPresets" }, |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
109 |
2595
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
110 { CTYPE_BOOL, &xs_cfg.oversampleEnable, "oversampleEnable" }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
111 { CTYPE_INT, &xs_cfg.oversampleFactor, "oversampleFactor" }, |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
112 |
2595
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
113 { CTYPE_BOOL, &xs_cfg.playMaxTimeEnable, "playMaxTimeEnable" }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
114 { CTYPE_BOOL, &xs_cfg.playMaxTimeUnknown, "playMaxTimeUnknown" }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
115 { CTYPE_INT, &xs_cfg.playMaxTime, "playMaxTime" }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
116 { CTYPE_BOOL, &xs_cfg.playMinTimeEnable, "playMinTimeEnable" }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
117 { CTYPE_INT, &xs_cfg.playMinTime, "playMinTime" }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
118 { CTYPE_BOOL, &xs_cfg.songlenDBEnable, "songlenDBEnable" }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
119 { CTYPE_STR, &xs_cfg.songlenDBPath, "songlenDBPath" }, |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
120 |
2595
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
121 { CTYPE_BOOL, &xs_cfg.stilDBEnable, "stilDBEnable" }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
122 { CTYPE_STR, &xs_cfg.stilDBPath, "stilDBPath" }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
123 { CTYPE_STR, &xs_cfg.hvscPath, "hvscPath" }, |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
124 |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
125 #ifndef AUDACIOUS_PLUGIN |
2595
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
126 { CTYPE_INT, &xs_cfg.subsongControl, "subsongControl" }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
127 { CTYPE_BOOL, &xs_cfg.detectMagic, "detectMagic" }, |
1605
75b8e7737bcd
Added support for SID-plugin specific Tuplez format string (see config
Matti Hamalainen <ccr@tnsp.org>
parents:
1604
diff
changeset
|
128 #endif |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
129 |
2595
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
130 { CTYPE_BOOL, &xs_cfg.titleOverride, "titleOverride" }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
131 { CTYPE_STR, &xs_cfg.titleFormat, "titleFormat" }, |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
132 |
2595
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
133 { CTYPE_BOOL, &xs_cfg.subAutoEnable, "subAutoEnable" }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
134 { CTYPE_BOOL, &xs_cfg.subAutoMinOnly, "subAutoMinOnly" }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
135 { CTYPE_INT, &xs_cfg.subAutoMinTime, "subAutoMinTime" }, |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
136 }; |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
137 |
2643
45ef6d7c0174
Synchronized typedef name changes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2595
diff
changeset
|
138 static const gint xs_cfgtable_max = (sizeof(xs_cfgtable) / sizeof(xs_cfgtable[0])); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
139 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
140 |
2643
45ef6d7c0174
Synchronized typedef name changes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2595
diff
changeset
|
141 static xs_wid_item_t xs_widtable[] = { |
2595
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
142 { WTYPE_BGROUP, CTYPE_INT, "cfg_res_16bit", &xs_cfg.audioBitsPerSample, XS_RES_16BIT }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
143 { WTYPE_BGROUP, CTYPE_INT, "cfg_res_8bit", &xs_cfg.audioBitsPerSample, XS_RES_8BIT }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
144 { WTYPE_BGROUP, CTYPE_INT, "cfg_chn_mono", &xs_cfg.audioChannels, XS_CHN_MONO }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
145 { WTYPE_BGROUP, CTYPE_INT, "cfg_chn_stereo", &xs_cfg.audioChannels, XS_CHN_STEREO }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
146 { WTYPE_BGROUP, CTYPE_INT, "cfg_chn_autopan", &xs_cfg.audioChannels, XS_CHN_AUTOPAN }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
147 { WTYPE_COMBO, CTYPE_INT, "cfg_samplerate", &xs_cfg.audioFrequency, XS_AUDIO_FREQ }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
148 { WTYPE_BUTTON, CTYPE_BOOL, "cfg_oversample", &xs_cfg.oversampleEnable, 0 }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
149 { WTYPE_SPIN, CTYPE_INT, "cfg_oversample_factor",&xs_cfg.oversampleFactor, 0 }, |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
150 |
2595
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
151 { WTYPE_BGROUP, CTYPE_INT, "cfg_emu_sidplay1", &xs_cfg.playerEngine, XS_ENG_SIDPLAY1 }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
152 { WTYPE_BGROUP, CTYPE_INT, "cfg_emu_sidplay2", &xs_cfg.playerEngine, XS_ENG_SIDPLAY2 }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
153 { WTYPE_BGROUP, CTYPE_INT, "cfg_emu_mem_real", &xs_cfg.memoryMode, XS_MPU_REAL }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
154 { WTYPE_BGROUP, CTYPE_INT, "cfg_emu_mem_banksw", &xs_cfg.memoryMode, XS_MPU_BANK_SWITCHING }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
155 { WTYPE_BGROUP, CTYPE_INT, "cfg_emu_mem_transrom", &xs_cfg.memoryMode, XS_MPU_TRANSPARENT_ROM }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
156 { WTYPE_BGROUP, CTYPE_INT, "cfg_emu_mem_playsid", &xs_cfg.memoryMode, XS_MPU_PLAYSID_ENVIRONMENT }, |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
157 |
2595
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
158 { WTYPE_BUTTON, CTYPE_BOOL, "cfg_emu_mos8580", &xs_cfg.mos8580, 0 }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
159 { WTYPE_BUTTON, CTYPE_BOOL, "cfg_emu_sid_force", &xs_cfg.forceModel, 0 }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
160 { WTYPE_BGROUP, CTYPE_INT, "cfg_emu_clock_ntsc", &xs_cfg.clockSpeed, XS_CLOCK_NTSC }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
161 { WTYPE_BGROUP, CTYPE_INT, "cfg_emu_clock_pal", &xs_cfg.clockSpeed, XS_CLOCK_PAL }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
162 { WTYPE_BUTTON, CTYPE_BOOL, "cfg_emu_clock_force", &xs_cfg.forceSpeed, 0 }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
163 { WTYPE_BUTTON, CTYPE_BOOL, "cfg_emu_sp2_opt", &xs_cfg.sid2OptLevel, 0 }, |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
164 |
2595
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
165 { WTYPE_BGROUP, CTYPE_INT, "cfg_emu_sp2_resid", &xs_cfg.sid2Builder, XS_BLD_RESID }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
166 { WTYPE_BGROUP, CTYPE_INT, "cfg_emu_sp2_hardsid", &xs_cfg.sid2Builder, XS_BLD_HARDSID }, |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
167 |
2595
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
168 { WTYPE_BUTTON, CTYPE_BOOL, "cfg_emu_filters", &xs_cfg.emulateFilters, 0 }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
169 { WTYPE_SCALE, CTYPE_FLOAT, "cfg_sp1_filter_fs", &xs_cfg.sid1FilterFs, 0 }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
170 { WTYPE_SCALE, CTYPE_FLOAT, "cfg_sp1_filter_fm", &xs_cfg.sid1FilterFm, 0 }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
171 { WTYPE_SCALE, CTYPE_FLOAT, "cfg_sp1_filter_ft", &xs_cfg.sid1FilterFt, 0 }, |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
172 |
2595
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
173 { WTYPE_BUTTON, CTYPE_BOOL, "cfg_maxtime_enable", &xs_cfg.playMaxTimeEnable, 0 }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
174 { WTYPE_BUTTON, CTYPE_BOOL, "cfg_maxtime_unknown", &xs_cfg.playMaxTimeUnknown, 0 }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
175 { WTYPE_SPIN, CTYPE_INT, "cfg_maxtime", &xs_cfg.playMaxTime, 0 }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
176 { WTYPE_BUTTON, CTYPE_BOOL, "cfg_mintime_enable", &xs_cfg.playMinTimeEnable, 0 }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
177 { WTYPE_SPIN, CTYPE_INT, "cfg_mintime", &xs_cfg.playMinTime, 0 }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
178 { WTYPE_BUTTON, CTYPE_BOOL, "cfg_sld_enable", &xs_cfg.songlenDBEnable, 0 }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
179 { WTYPE_TEXT, CTYPE_STR, "cfg_sld_dbpath", &xs_cfg.songlenDBPath, 0 }, |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
180 |
2595
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
181 { WTYPE_BUTTON, CTYPE_BOOL, "cfg_stil_enable", &xs_cfg.stilDBEnable, 0 }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
182 { WTYPE_TEXT, CTYPE_STR, "cfg_stil_dbpath", &xs_cfg.stilDBPath, 0 }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
183 { WTYPE_TEXT, CTYPE_STR, "cfg_hvsc_path", &xs_cfg.hvscPath, 0 }, |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
184 |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
185 #ifndef AUDACIOUS_PLUGIN |
2595
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
186 { WTYPE_BGROUP, CTYPE_INT, "cfg_subctrl_none", &xs_cfg.subsongControl, XS_SSC_NONE }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
187 { WTYPE_BGROUP, CTYPE_INT, "cfg_subctrl_seek", &xs_cfg.subsongControl, XS_SSC_SEEK }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
188 { WTYPE_BGROUP, CTYPE_INT, "cfg_subctrl_popup", &xs_cfg.subsongControl, XS_SSC_POPUP }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
189 { WTYPE_BGROUP, CTYPE_INT, "cfg_subctrl_patch", &xs_cfg.subsongControl, XS_SSC_PATCH }, |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
190 |
2595
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
191 { WTYPE_BUTTON, CTYPE_BOOL, "cfg_detectmagic", &xs_cfg.detectMagic, 0 }, |
1605
75b8e7737bcd
Added support for SID-plugin specific Tuplez format string (see config
Matti Hamalainen <ccr@tnsp.org>
parents:
1604
diff
changeset
|
192 #endif |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
193 |
2595
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
194 { WTYPE_BUTTON, CTYPE_BOOL, "cfg_ftitle_override", &xs_cfg.titleOverride, 0 }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
195 { WTYPE_TEXT, CTYPE_STR, "cfg_ftitle_format", &xs_cfg.titleFormat, 0 }, |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
196 |
2595
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
197 { WTYPE_BUTTON, CTYPE_BOOL, "cfg_subauto_enable", &xs_cfg.subAutoEnable, 0 }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
198 { WTYPE_BUTTON, CTYPE_BOOL, "cfg_subauto_min_only", &xs_cfg.subAutoMinOnly, 0 }, |
cde42a37ccf6
More indentation cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
2523
diff
changeset
|
199 { WTYPE_SPIN, CTYPE_INT, "cfg_subauto_mintime", &xs_cfg.subAutoMinTime, 0 }, |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
200 }; |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
201 |
2643
45ef6d7c0174
Synchronized typedef name changes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2595
diff
changeset
|
202 static const gint xs_widtable_max = (sizeof(xs_widtable) / sizeof(xs_widtable[0])); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
203 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
204 |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
205 /* Reset/initialize the configuration |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
206 */ |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
207 void xs_init_configuration(void) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
208 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
209 /* Lock configuration mutex */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
210 XSDEBUG("initializing configuration ...\n"); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
211 XS_MUTEX_LOCK(xs_cfg); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
212 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
213 memset(&xs_cfg, 0, sizeof(xs_cfg)); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
214 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
215 /* Initialize values with sensible defaults */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
216 xs_cfg.audioBitsPerSample = XS_RES_16BIT; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
217 xs_cfg.audioChannels = XS_CHN_MONO; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
218 xs_cfg.audioFrequency = XS_AUDIO_FREQ; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
219 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
220 xs_cfg.mos8580 = FALSE; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
221 xs_cfg.forceModel = FALSE; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
222 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
223 /* Filter values */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
224 xs_cfg.emulateFilters = TRUE; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
225 xs_cfg.sid1FilterFs = XS_SIDPLAY1_FS; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
226 xs_cfg.sid1FilterFm = XS_SIDPLAY1_FM; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
227 xs_cfg.sid1FilterFt = XS_SIDPLAY1_FT; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
228 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
229 #ifdef HAVE_SIDPLAY2 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
230 xs_cfg.playerEngine = XS_ENG_SIDPLAY2; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
231 xs_cfg.memoryMode = XS_MPU_REAL; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
232 #else |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
233 #ifdef HAVE_SIDPLAY1 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
234 xs_cfg.playerEngine = XS_ENG_SIDPLAY1; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
235 xs_cfg.memoryMode = XS_MPU_BANK_SWITCHING; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
236 #else |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
237 #error This should not happen! No emulator engines configured in! |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
238 #endif |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
239 #endif |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
240 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
241 xs_cfg.clockSpeed = XS_CLOCK_PAL; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
242 xs_cfg.forceSpeed = FALSE; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
243 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
244 xs_cfg.sid2OptLevel = 0; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
245 xs_cfg.sid2NFilterPresets = 0; |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
246 |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
247 #ifdef HAVE_RESID_BUILDER |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
248 xs_cfg.sid2Builder = XS_BLD_RESID; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
249 #else |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
250 #ifdef HAVE_HARDSID_BUILDER |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
251 xs_cfg.sid2Builder = XS_BLD_HARDSID; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
252 #else |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
253 #ifdef HAVE_SIDPLAY2 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
254 #error This should not happen! No supported SIDPlay2 builders configured in! |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
255 #endif |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
256 #endif |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
257 #endif |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
258 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
259 xs_cfg.oversampleEnable = FALSE; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
260 xs_cfg.oversampleFactor = XS_MIN_OVERSAMPLE; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
261 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
262 xs_cfg.playMaxTimeEnable = FALSE; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
263 xs_cfg.playMaxTimeUnknown = FALSE; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
264 xs_cfg.playMaxTime = 150; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
265 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
266 xs_cfg.playMinTimeEnable = FALSE; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
267 xs_cfg.playMinTime = 15; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
268 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
269 xs_cfg.songlenDBEnable = FALSE; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
270 xs_pstrcpy(&xs_cfg.songlenDBPath, "~/C64Music/Songlengths.txt"); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
271 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
272 xs_cfg.stilDBEnable = FALSE; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
273 xs_pstrcpy(&xs_cfg.stilDBPath, "~/C64Music/DOCUMENTS/STIL.txt"); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
274 xs_pstrcpy(&xs_cfg.hvscPath, "~/C64Music"); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
275 |
1605
75b8e7737bcd
Added support for SID-plugin specific Tuplez format string (see config
Matti Hamalainen <ccr@tnsp.org>
parents:
1604
diff
changeset
|
276 #if defined(HAVE_SONG_POSITION) && !defined(AUDACIOUS_PLUGIN) |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
277 xs_cfg.subsongControl = XS_SSC_PATCH; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
278 #else |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
279 xs_cfg.subsongControl = XS_SSC_POPUP; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
280 #endif |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
281 xs_cfg.detectMagic = FALSE; |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
282 |
1605
75b8e7737bcd
Added support for SID-plugin specific Tuplez format string (see config
Matti Hamalainen <ccr@tnsp.org>
parents:
1604
diff
changeset
|
283 #ifndef HAVE_XMMSEXTRA |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
284 xs_cfg.titleOverride = TRUE; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
285 #endif |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
286 |
1607
4a03fd025aa2
Default Tuplez format string.
Matti Hamalainen <ccr@tnsp.org>
parents:
1605
diff
changeset
|
287 #ifdef AUDACIOUS_PLUGIN |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
288 xs_pstrcpy(&xs_cfg.titleFormat, "${artist} - ${title} (${copyright}) <${subsong-id}/${subsong-num}> [${sid-model}/${sid-speed}]"); |
1607
4a03fd025aa2
Default Tuplez format string.
Matti Hamalainen <ccr@tnsp.org>
parents:
1605
diff
changeset
|
289 #else |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
290 xs_pstrcpy(&xs_cfg.titleFormat, "%p - %t (%c) <%n/%N> [%m/%C]"); |
1607
4a03fd025aa2
Default Tuplez format string.
Matti Hamalainen <ccr@tnsp.org>
parents:
1605
diff
changeset
|
291 #endif |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
292 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
293 xs_cfg.subAutoEnable = FALSE; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
294 xs_cfg.subAutoMinOnly = TRUE; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
295 xs_cfg.subAutoMinTime = 15; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
296 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
297 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
298 /* Unlock the configuration */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
299 XS_MUTEX_UNLOCK(xs_cfg); |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
300 } |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
301 |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
302 |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
303 /* Filter configuration handling |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
304 */ |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
305 #define XS_FITEM (4 * 2) |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
306 |
2643
45ef6d7c0174
Synchronized typedef name changes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2595
diff
changeset
|
307 static gboolean xs_filter_load_into(XS_CONFIG_FILE *cfg, gint nFilter, xs_sid2_filter_t *pResult) |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
308 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
309 gchar tmpKey[64], *tmpStr; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
310 gint i, j; |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
311 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
312 /* Get fields from config */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
313 g_snprintf(tmpKey, sizeof(tmpKey), "filter%dNPoints", nFilter); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
314 if (!XS_CFG_GET_INT(cfg, XS_CONFIG_IDENT, tmpKey, &(pResult->npoints))) |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
315 return FALSE; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
316 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
317 g_snprintf(tmpKey, sizeof(tmpKey), "filter%dName", nFilter); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
318 if (!XS_CFG_GET_STRING(cfg, XS_CONFIG_IDENT, tmpKey, &tmpStr)) |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
319 return FALSE; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
320 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
321 pResult->name = g_strdup(tmpStr); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
322 if (pResult->name == NULL) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
323 g_free(pResult); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
324 return FALSE; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
325 } |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
326 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
327 g_snprintf(tmpKey, sizeof(tmpKey), "filter%dPoints", nFilter); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
328 if (!XS_CFG_GET_STRING(cfg, XS_CONFIG_IDENT, tmpKey, &tmpStr)) |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
329 return FALSE; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
330 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
331 for (i = 0, j = 0; i < pResult->npoints; i++, j += XS_FITEM) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
332 if (sscanf(&tmpStr[j], "%4x%4x", |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
333 &(pResult->points[i].x), |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
334 &(pResult->points[i].y)) != 2) |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
335 return FALSE; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
336 } |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
337 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
338 return TRUE; |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
339 } |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
340 |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
341 |
2643
45ef6d7c0174
Synchronized typedef name changes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2595
diff
changeset
|
342 static xs_sid2_filter_t * xs_filter_load(XS_CONFIG_FILE *cfg, gint nFilter) |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
343 { |
2643
45ef6d7c0174
Synchronized typedef name changes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2595
diff
changeset
|
344 xs_sid2_filter_t *pResult; |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
345 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
346 /* Allocate filter struct */ |
2643
45ef6d7c0174
Synchronized typedef name changes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2595
diff
changeset
|
347 if ((pResult = g_malloc0(sizeof(xs_sid2_filter_t))) == NULL) |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
348 return NULL; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
349 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
350 if (!xs_filter_load_into(cfg, nFilter, pResult)) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
351 g_free(pResult); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
352 return NULL; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
353 } else |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
354 return pResult; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
355 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
356 |
1973
f86cb7fc1d4f
Add -pipe -Wall if gcc and fix a few warnings.
Jonathan Schleifer <js@h3c.de>
parents:
1956
diff
changeset
|
357 #if 0 |
2643
45ef6d7c0174
Synchronized typedef name changes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2595
diff
changeset
|
358 static gboolean xs_filter_save(XS_CONFIG_FILE *cfg, xs_sid2_filter_t *pFilter, gint nFilter) |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
359 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
360 gchar *tmpValue, tmpKey[64]; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
361 gint i, j; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
362 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
363 /* Allocate memory for value string */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
364 tmpValue = g_malloc(sizeof(gchar) * XS_FITEM * (pFilter->npoints + 1)); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
365 if (tmpValue == NULL) |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
366 return FALSE; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
367 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
368 /* Make value string */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
369 for (i = 0, j = 0; i < pFilter->npoints; i++, j += XS_FITEM) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
370 g_snprintf(&tmpValue[j], XS_FITEM+1, "%04x%04x", |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
371 pFilter->points[i].x, |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
372 pFilter->points[i].y); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
373 } |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
374 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
375 /* Write into the configuration */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
376 g_snprintf(tmpKey, sizeof(tmpKey), "filter%dName", nFilter); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
377 XS_CFG_SET_STRING(cfg, XS_CONFIG_IDENT, tmpKey, pFilter->name); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
378 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
379 g_snprintf(tmpKey, sizeof(tmpKey), "filter%dNPoints", nFilter); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
380 XS_CFG_SET_INT(cfg, XS_CONFIG_IDENT, tmpKey, pFilter->npoints); |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
381 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
382 g_snprintf(tmpKey, sizeof(tmpKey), "filter%dPoints", nFilter); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
383 XS_CFG_SET_STRING(cfg, XS_CONFIG_IDENT, tmpKey, tmpValue); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
384 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
385 g_free(tmpValue); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
386 return TRUE; |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
387 } |
1973
f86cb7fc1d4f
Add -pipe -Wall if gcc and fix a few warnings.
Jonathan Schleifer <js@h3c.de>
parents:
1956
diff
changeset
|
388 #endif |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
389 |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
390 /* Filter exporting and importing. These functions export/import |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
391 * filter settings to/from SIDPlay2 INI-type files. |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
392 */ |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
393 static gboolean xs_fgetitem(gchar *inLine, size_t *linePos, gchar sep, gchar *tmpStr, size_t tmpMax) |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
394 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
395 size_t i; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
396 for (i = 0; i < tmpMax && inLine[*linePos] && |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
397 !isspace(inLine[*linePos]) && |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
398 inLine[*linePos] != sep; i++, (*linePos)++) |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
399 tmpStr[i] = inLine[*linePos]; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
400 tmpStr[i] = 0; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
401 xs_findnext(inLine, linePos); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
402 return (inLine[*linePos] == sep); |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
403 } |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
404 |
2643
45ef6d7c0174
Synchronized typedef name changes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2595
diff
changeset
|
405 static gboolean xs_filters_import(const gchar *pcFilename, xs_sid2_filter_t **pFilters, gint *nFilters) |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
406 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
407 FILE *inFile; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
408 gchar inLine[XS_BUF_SIZE], tmpStr[XS_BUF_SIZE]; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
409 gchar *sectName = NULL; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
410 gboolean sectBegin; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
411 size_t lineNum, i; |
2643
45ef6d7c0174
Synchronized typedef name changes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2595
diff
changeset
|
412 xs_sid2_filter_t *tmpFilter; |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
413 |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
414 fprintf(stderr, "xs_filters_import(%s)\n", pcFilename); |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
415 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
416 if ((inFile = fopen(pcFilename, "ra")) == NULL) |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
417 return FALSE; |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
418 |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
419 fprintf(stderr, "importing...\n"); |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
420 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
421 sectBegin = FALSE; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
422 lineNum = 0; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
423 while (fgets(inLine, XS_BUF_SIZE, inFile) != NULL) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
424 size_t linePos = 0; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
425 lineNum++; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
426 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
427 xs_findnext(inLine, &linePos); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
428 if (isalpha(inLine[linePos]) && sectBegin) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
429 /* A new key/value pair */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
430 if (!xs_fgetitem(inLine, &linePos, '=', tmpStr, XS_BUF_SIZE)) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
431 fprintf(stderr, "invalid line: %s [expect =']'", inLine); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
432 } else { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
433 linePos++; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
434 xs_findnext(inLine, &linePos); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
435 if (!strncmp(tmpStr, "points", 6)) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
436 fprintf(stderr, "points=%s\n", &inLine[linePos]); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
437 } else if (!strncmp(tmpStr, "point", 5)) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
438 } else if (!strncmp(tmpStr, "type", 4)) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
439 } else { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
440 fprintf(stderr, "warning: ukn def: %s @ %s\n", |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
441 tmpStr, sectName); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
442 } |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
443 } |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
444 } else if (inLine[linePos] == '[') { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
445 /* Check for existing section */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
446 if (sectBegin) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
447 /* Submit definition */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
448 fprintf(stderr, "filter ends: %s\n", sectName); |
2643
45ef6d7c0174
Synchronized typedef name changes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2595
diff
changeset
|
449 if ((tmpFilter = g_malloc0(sizeof(xs_sid2_filter_t))) == NULL) { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
450 fprintf(stderr, "could not allocate ..\n"); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
451 } else { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
452 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
453 } |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
454 g_free(sectName); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
455 } |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
456 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
457 /* New filter(?) section starts */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
458 linePos++; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
459 for (i = 0; i < XS_BUF_SIZE && inLine[linePos] && inLine[linePos] != ']'; i++, linePos++) |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
460 tmpStr[i] = inLine[linePos]; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
461 tmpStr[i] = 0; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
462 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
463 if (inLine[linePos] != ']') { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
464 fprintf(stderr, "invalid! expected ']': %s\n", inLine); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
465 } else { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
466 sectName = strdup(tmpStr); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
467 fprintf(stderr, "filter: %s\n", sectName); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
468 sectBegin = TRUE; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
469 } |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
470 } else if ((inLine[linePos] != ';') && (inLine[linePos] != 0)) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
471 /* Syntax error */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
472 fprintf(stderr, "syntax error: %s\n", inLine); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
473 } |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
474 } |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
475 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
476 fclose(inFile); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
477 return TRUE; |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
478 } |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
479 |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
480 |
2643
45ef6d7c0174
Synchronized typedef name changes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2595
diff
changeset
|
481 static gboolean xs_filters_export(const gchar *pcFilename, xs_sid2_filter_t **pFilters, gint nFilters) |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
482 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
483 FILE *outFile; |
2643
45ef6d7c0174
Synchronized typedef name changes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2595
diff
changeset
|
484 xs_sid2_filter_t *f; |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
485 gint n; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
486 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
487 /* Open/create the file */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
488 if ((outFile = fopen(pcFilename, "wa")) == NULL) |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
489 return FALSE; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
490 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
491 /* Header */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
492 fprintf(outFile, |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
493 "; SIDPlay2 compatible filter definition file\n" |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
494 "; Exported by " PACKAGE_STRING "\n\n"); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
495 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
496 /* Write each filter spec in "INI"-style format */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
497 for (n = 0; n < nFilters; n++) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
498 gint i; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
499 f = pFilters[n]; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
500 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
501 fprintf(outFile, |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
502 "[%s]\n" |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
503 "type=1\n" |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
504 "points=%d\n", |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
505 f->name, f->npoints); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
506 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
507 for (i = 0; i < f->npoints; i++) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
508 fprintf(outFile, |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
509 "point%d=%d,%d\n", |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
510 i + 1, |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
511 f->points[i].x, |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
512 f->points[i].y); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
513 } |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
514 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
515 fprintf(outFile, "\n"); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
516 f++; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
517 } |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
518 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
519 fclose(outFile); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
520 return TRUE; |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
521 } |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
522 |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
523 /* Get the configuration (from file or default) |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
524 */ |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
525 void xs_read_configuration(void) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
526 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
527 XS_CONFIG_FILE *cfg; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
528 gint i; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
529 gchar *tmpStr; |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
530 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
531 /* Try to open the XMMS configuration file */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
532 XS_MUTEX_LOCK(xs_cfg); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
533 XSDEBUG("loading from config-file ...\n"); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
534 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
535 cfg = XS_CONFIG_OPEN(); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
536 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
537 if (cfg == NULL) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
538 XSDEBUG("Could not open configuration, trying to write defaults...\n"); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
539 xs_write_configuration(); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
540 return; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
541 } |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
542 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
543 /* Read the new settings from XMMS configuration file */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
544 for (i = 0; i < xs_cfgtable_max; i++) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
545 switch (xs_cfgtable[i].itemType) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
546 case CTYPE_INT: |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
547 XS_CFG_GET_INT(cfg, XS_CONFIG_IDENT, |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
548 xs_cfgtable[i].itemName, |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
549 (gint *) xs_cfgtable[i].itemData); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
550 break; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
551 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
552 case CTYPE_BOOL: |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
553 XS_CFG_GET_BOOL(cfg, XS_CONFIG_IDENT, |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
554 xs_cfgtable[i].itemName, |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
555 (gboolean *) xs_cfgtable[i].itemData); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
556 break; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
557 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
558 case CTYPE_FLOAT: |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
559 XS_CFG_GET_FLOAT(cfg, XS_CONFIG_IDENT, |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
560 xs_cfgtable[i].itemName, |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
561 (gfloat *) xs_cfgtable[i].itemData); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
562 break; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
563 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
564 case CTYPE_STR: |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
565 if (XS_CFG_GET_STRING(cfg, XS_CONFIG_IDENT, |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
566 xs_cfgtable[i].itemName, (gchar **) &tmpStr)) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
567 xs_pstrcpy((gchar **) xs_cfgtable[i].itemData, tmpStr); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
568 g_free(tmpStr); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
569 } |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
570 break; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
571 } |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
572 } |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
573 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
574 /* Filters and presets are a special case */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
575 xs_filter_load_into(cfg, 0, &xs_cfg.sid2Filter); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
576 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
577 if (xs_cfg.sid2NFilterPresets > 0) { |
2643
45ef6d7c0174
Synchronized typedef name changes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2595
diff
changeset
|
578 xs_cfg.sid2FilterPresets = g_malloc0(xs_cfg.sid2NFilterPresets * sizeof(xs_sid2_filter_t *)); |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
579 if (!xs_cfg.sid2FilterPresets) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
580 xs_error("Allocation of sid2FilterPresets structure failed!\n"); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
581 } else { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
582 for (i = 0; i < xs_cfg.sid2NFilterPresets; i++) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
583 xs_cfg.sid2FilterPresets[i] = xs_filter_load(cfg, i); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
584 } |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
585 } |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
586 } |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
587 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
588 XS_CONFIG_FREE(cfg); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
589 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
590 XS_MUTEX_UNLOCK(xs_cfg); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
591 XSDEBUG("OK\n"); |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
592 } |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
593 |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
594 |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
595 /* Write the current configuration |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
596 */ |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
597 gint xs_write_configuration(void) |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
598 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
599 XS_CONFIG_FILE *cfg; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
600 gint i; |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
601 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
602 XSDEBUG("writing configuration ...\n"); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
603 XS_MUTEX_LOCK(xs_cfg); |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
604 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
605 /* Try to open the XMMS configuration file */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
606 cfg = XS_CONFIG_OPEN(); |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
607 |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
608 #ifndef AUDACIOUS_PLUGIN |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
609 if (!cfg) cfg = xmms_cfg_new(); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
610 if (!cfg) return -1; |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
611 #endif |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
612 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
613 /* Write the new settings to XMMS configuration file */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
614 for (i = 0; i < xs_cfgtable_max; i++) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
615 switch (xs_cfgtable[i].itemType) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
616 case CTYPE_INT: |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
617 XS_CFG_SET_INT(cfg, XS_CONFIG_IDENT, |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
618 xs_cfgtable[i].itemName, |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
619 *(gint *) xs_cfgtable[i].itemData); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
620 break; |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
621 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
622 case CTYPE_BOOL: |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
623 XS_CFG_SET_BOOL(cfg, XS_CONFIG_IDENT, |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
624 xs_cfgtable[i].itemName, |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
625 *(gboolean *) xs_cfgtable[i].itemData); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
626 break; |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
627 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
628 case CTYPE_FLOAT: |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
629 XS_CFG_SET_FLOAT(cfg, XS_CONFIG_IDENT, |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
630 xs_cfgtable[i].itemName, |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
631 *(gfloat *) xs_cfgtable[i].itemData); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
632 break; |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
633 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
634 case CTYPE_STR: |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
635 XS_CFG_SET_STRING(cfg, XS_CONFIG_IDENT, |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
636 xs_cfgtable[i].itemName, |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
637 *(gchar **) xs_cfgtable[i].itemData); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
638 break; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
639 } |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
640 } |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
641 |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
642 |
2036 | 643 #ifndef AUDACIOUS_PLUGIN |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
644 xmms_cfg_write_default_file(cfg); |
2036 | 645 #endif |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
646 XS_CONFIG_FREE(cfg); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
647 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
648 XS_MUTEX_UNLOCK(xs_cfg); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
649 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
650 return 0; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
651 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
652 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
653 |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
654 /* Configuration panel was canceled |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
655 */ |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
656 XS_DEF_WINDOW_CLOSE(cfg_cancel, configwin) |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
657 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
658 |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
659 /* Configuration was accepted, save the settings |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
660 */ |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
661 void xs_cfg_ok(void) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
662 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
663 gint i; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
664 gfloat tmpValue; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
665 gint tmpInt; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
666 const gchar *tmpStr; |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
667 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
668 /* Get lock on configuration */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
669 XS_MUTEX_LOCK(xs_cfg); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
670 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
671 XSDEBUG("get data from widgets to config...\n"); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
672 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
673 for (i = 0; i < xs_widtable_max; i++) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
674 switch (xs_widtable[i].widType) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
675 case WTYPE_BGROUP: |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
676 /* Check if toggle-button is active */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
677 if (GTK_TOGGLE_BUTTON(LUW(xs_widtable[i].widName))->active) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
678 /* Yes, set the constant value */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
679 *((gint *) xs_widtable[i].itemData) = xs_widtable[i].itemSet; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
680 } |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
681 break; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
682 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
683 case WTYPE_COMBO: |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
684 /* Get text from text-widget */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
685 tmpStr = gtk_entry_get_text(GTK_ENTRY(LUW(xs_widtable[i].widName))); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
686 if (sscanf(tmpStr, "%d", &tmpInt) != 1) |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
687 tmpInt = xs_widtable[i].itemSet; |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
688 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
689 *((gint *) xs_widtable[i].itemData) = tmpInt; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
690 break; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
691 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
692 case WTYPE_SPIN: |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
693 case WTYPE_SCALE: |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
694 /* Get the value */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
695 switch (xs_widtable[i].widType) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
696 case WTYPE_SPIN: |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
697 tmpValue = gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(LUW(xs_widtable[i].widName)))->value; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
698 break; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
699 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
700 case WTYPE_SCALE: |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
701 tmpValue = gtk_range_get_adjustment(GTK_RANGE(LUW(xs_widtable[i].widName)))->value; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
702 break; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
703 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
704 default: |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
705 tmpValue = -1; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
706 break; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
707 } |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
708 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
709 /* Set the value */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
710 switch (xs_widtable[i].itemType) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
711 case CTYPE_INT: |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
712 *((gint *) xs_widtable[i].itemData) = (gint) tmpValue; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
713 break; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
714 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
715 case CTYPE_FLOAT: |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
716 *((gfloat *) xs_widtable[i].itemData) = tmpValue; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
717 break; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
718 } |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
719 break; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
720 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
721 case WTYPE_BUTTON: |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
722 /* Check if toggle-button is active */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
723 *((gboolean *) xs_widtable[i].itemData) = |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
724 (GTK_TOGGLE_BUTTON(LUW(xs_widtable[i].widName))->active); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
725 break; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
726 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
727 case WTYPE_TEXT: |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
728 /* Get text from text-widget */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
729 xs_pstrcpy((gchar **) xs_widtable[i].itemData, |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
730 gtk_entry_get_text(GTK_ENTRY(LUW(xs_widtable[i].widName)))); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
731 break; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
732 } |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
733 } |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
734 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
735 /* Get filter settings */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
736 /* |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
737 if (!xs_curve_get_points(XS_CURVE(LUW("")), &xs_cfg.sid2Filter.points, &xs_cfg.sid2Filter.npoints)) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
738 xs_error("Warning: Could not get filter curve widget points!\n"); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
739 } |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
740 */ |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
741 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
742 /* Release lock */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
743 XS_MUTEX_UNLOCK(xs_cfg); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
744 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
745 /* Close window */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
746 gtk_widget_destroy(xs_configwin); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
747 xs_configwin = NULL; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
748 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
749 /* Write settings */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
750 xs_write_configuration(); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
751 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
752 /* Re-initialize */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
753 xs_reinit(); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
754 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
755 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
756 |
1956 | 757 /* Confirmation window |
758 */ | |
759 gboolean xs_confirmwin_delete(GtkWidget *widget, GdkEvent *event, gpointer user_data) | |
760 { | |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
761 (void) widget; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
762 (void) event; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
763 (void) user_data; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
764 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
765 return FALSE; |
1956 | 766 } |
767 | |
768 | |
769 | |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
770 /* HVSC songlength-database file selector response-functions |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
771 */ |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
772 void xs_cfg_sldb_browse(GtkButton * button, gpointer user_data) |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
773 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
774 (void) button; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
775 (void) user_data; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
776 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
777 if (xs_sldb_fileselector != NULL) { |
2511
da7e2ec2ea27
Use macro wrapping for Gtk+ v1 vs v2 differences, yet again.
Matti Hamalainen <ccr@tnsp.org>
parents:
2509
diff
changeset
|
778 XS_WINDOW_PRESENT(xs_sldb_fileselector); |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
779 return; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
780 } |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
781 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
782 xs_sldb_fileselector = create_xs_sldb_fs(); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
783 XS_MUTEX_LOCK(xs_cfg); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
784 gtk_file_selection_set_filename(GTK_FILE_SELECTION(xs_sldb_fileselector), xs_cfg.songlenDBPath); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
785 XS_MUTEX_UNLOCK(xs_cfg); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
786 gtk_widget_show(xs_sldb_fileselector); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
787 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
788 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
789 |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
790 void xs_sldb_fs_ok(GtkButton *button, gpointer user_data) |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
791 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
792 (void) button; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
793 (void) user_data; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
794 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
795 /* Selection was accepted! */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
796 gtk_entry_set_text(GTK_ENTRY(LUW("cfg_sld_dbpath")), |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
797 gtk_file_selection_get_filename(GTK_FILE_SELECTION(xs_sldb_fileselector))); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
798 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
799 /* Close file selector window */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
800 gtk_widget_destroy(xs_sldb_fileselector); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
801 xs_sldb_fileselector = NULL; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
802 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
803 |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
804 XS_DEF_WINDOW_CLOSE(sldb_fs_cancel, sldb_fileselector) |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
805 XS_DEF_WINDOW_DELETE(sldb_fs, sldb_fileselector) |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
806 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
807 |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
808 /* STIL-database file selector response-functions |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
809 */ |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
810 void xs_cfg_stil_browse(GtkButton * button, gpointer user_data) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
811 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
812 (void) button; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
813 (void) user_data; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
814 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
815 if (xs_stil_fileselector != NULL) { |
2511
da7e2ec2ea27
Use macro wrapping for Gtk+ v1 vs v2 differences, yet again.
Matti Hamalainen <ccr@tnsp.org>
parents:
2509
diff
changeset
|
816 XS_WINDOW_PRESENT(xs_stil_fileselector); |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
817 return; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
818 } |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
819 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
820 xs_stil_fileselector = create_xs_stil_fs(); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
821 XS_MUTEX_LOCK(xs_cfg); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
822 gtk_file_selection_set_filename(GTK_FILE_SELECTION(xs_stil_fileselector), xs_cfg.stilDBPath); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
823 XS_MUTEX_UNLOCK(xs_cfg); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
824 gtk_widget_show(xs_stil_fileselector); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
825 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
826 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
827 |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
828 void xs_stil_fs_ok(GtkButton *button, gpointer user_data) |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
829 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
830 (void) button; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
831 (void) user_data; |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
832 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
833 /* Selection was accepted! */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
834 gtk_entry_set_text(GTK_ENTRY(LUW("cfg_stil_dbpath")), |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
835 gtk_file_selection_get_filename(GTK_FILE_SELECTION(xs_stil_fileselector))); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
836 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
837 /* Close file selector window */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
838 gtk_widget_destroy(xs_stil_fileselector); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
839 xs_stil_fileselector = NULL; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
840 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
841 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
842 |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
843 XS_DEF_WINDOW_CLOSE(stil_fs_cancel, stil_fileselector) |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
844 XS_DEF_WINDOW_DELETE(stil_fs, stil_fileselector) |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
845 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
846 |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
847 /* HVSC location selector response-functions |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
848 */ |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
849 void xs_cfg_hvsc_browse(GtkButton * button, gpointer user_data) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
850 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
851 (void) button; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
852 (void) user_data; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
853 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
854 if (xs_hvsc_selector != NULL) { |
2511
da7e2ec2ea27
Use macro wrapping for Gtk+ v1 vs v2 differences, yet again.
Matti Hamalainen <ccr@tnsp.org>
parents:
2509
diff
changeset
|
855 XS_WINDOW_PRESENT(xs_hvsc_selector); |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
856 return; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
857 } |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
858 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
859 xs_hvsc_selector = create_xs_hvsc_fs(); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
860 XS_MUTEX_LOCK(xs_cfg); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
861 gtk_file_selection_set_filename(GTK_FILE_SELECTION(xs_hvsc_selector), xs_cfg.hvscPath); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
862 XS_MUTEX_UNLOCK(xs_cfg); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
863 gtk_widget_show(xs_hvsc_selector); |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
864 } |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
865 |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
866 |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
867 void xs_hvsc_fs_ok(GtkButton *button, gpointer user_data) |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
868 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
869 (void) button; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
870 (void) user_data; |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
871 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
872 /* Selection was accepted! */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
873 gtk_entry_set_text(GTK_ENTRY(LUW("cfg_hvsc_path")), |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
874 gtk_file_selection_get_filename(GTK_FILE_SELECTION(xs_hvsc_selector))); |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
875 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
876 /* Close file selector window */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
877 gtk_widget_destroy(xs_hvsc_selector); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
878 xs_hvsc_selector = NULL; |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
879 } |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
880 |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
881 |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
882 XS_DEF_WINDOW_CLOSE(hvsc_fs_cancel, hvsc_selector) |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
883 XS_DEF_WINDOW_DELETE(hvsc_fs, hvsc_selector) |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
884 |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
885 |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
886 /* Filter handling |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
887 */ |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
888 void xs_cfg_sp1_filter_reset(GtkButton * button, gpointer user_data) |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
889 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
890 (void) button; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
891 (void) user_data; |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
892 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
893 gtk_adjustment_set_value(gtk_range_get_adjustment(GTK_RANGE(LUW("cfg_sp1_filter_fs"))), XS_SIDPLAY1_FS); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
894 gtk_adjustment_set_value(gtk_range_get_adjustment(GTK_RANGE(LUW("cfg_sp1_filter_fm"))), XS_SIDPLAY1_FM); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
895 gtk_adjustment_set_value(gtk_range_get_adjustment(GTK_RANGE(LUW("cfg_sp1_filter_ft"))), XS_SIDPLAY1_FT); |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
896 } |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
897 |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
898 |
2643
45ef6d7c0174
Synchronized typedef name changes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2595
diff
changeset
|
899 void xs_cfg_sp2_filter_update(XSCurve *curve, xs_sid2_filter_t *f) |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
900 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
901 assert(curve); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
902 assert(f); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
903 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
904 xs_curve_reset(curve); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
905 xs_curve_set_range(curve, 0,0, XS_SIDPLAY2_NFPOINTS, XS_SIDPLAY2_FMAX); |
2511
da7e2ec2ea27
Use macro wrapping for Gtk+ v1 vs v2 differences, yet again.
Matti Hamalainen <ccr@tnsp.org>
parents:
2509
diff
changeset
|
906 if (!xs_curve_set_points(curve, f->points, f->npoints)) { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
907 // FIXME |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
908 xs_error("Warning: Could not set filter curve widget points!\n"); |
2511
da7e2ec2ea27
Use macro wrapping for Gtk+ v1 vs v2 differences, yet again.
Matti Hamalainen <ccr@tnsp.org>
parents:
2509
diff
changeset
|
909 } |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
910 } |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
911 |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
912 |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
913 void xs_cfg_sp2_presets_update(void) |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
914 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
915 GList *tmpList = NULL; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
916 gint i; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
917 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
918 for (i = 0; i < xs_cfg.sid2NFilterPresets; i++) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
919 tmpList = g_list_append(tmpList, |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
920 (gpointer) xs_cfg.sid2FilterPresets[i]->name); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
921 } |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
922 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
923 gtk_combo_set_popdown_strings(GTK_COMBO(LUW("cfg_sp2_filter_combo")), tmpList); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
924 g_list_free(tmpList); |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
925 } |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
926 |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
927 |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
928 void xs_cfg_sp2_filter_load(GtkButton *button, gpointer user_data) |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
929 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
930 const gchar *tmpStr; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
931 gint i, j; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
932 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
933 (void) button; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
934 (void) user_data; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
935 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
936 XS_MUTEX_LOCK(xs_cfg); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
937 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
938 tmpStr = gtk_entry_get_text(GTK_ENTRY(LUW("cfg_sp2_filter_combo_entry"))); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
939 for (i = 0, j = -1; i < xs_cfg.sid2NFilterPresets; i++) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
940 if (!strcmp(tmpStr, xs_cfg.sid2FilterPresets[i]->name)) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
941 j = i; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
942 break; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
943 } |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
944 } |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
945 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
946 if (j != -1) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
947 fprintf(stderr, "Updating from '%s'\n", tmpStr); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
948 xs_cfg_sp2_filter_update( |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
949 XS_CURVE(LUW("cfg_sp2_filter_curve")), |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
950 xs_cfg.sid2FilterPresets[i]); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
951 } else { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
952 /* error/warning: no such filter preset */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
953 fprintf(stderr, "No such filter preset '%s'!\n", tmpStr); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
954 } |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
955 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
956 XS_MUTEX_UNLOCK(xs_cfg); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
957 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
958 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
959 |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
960 void xs_cfg_sp2_filter_save(GtkButton *button, gpointer user_data) |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
961 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
962 /* |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
963 1) check if textentry matches any current filter name |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
964 yes) ask if saving over ok? |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
965 no) ... |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
966 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
967 2) save current filter to the name |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
968 */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
969 const gchar *tmpStr; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
970 gint i, j; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
971 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
972 (void) button; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
973 (void) user_data; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
974 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
975 XS_MUTEX_LOCK(xs_cfg); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
976 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
977 tmpStr = gtk_entry_get_text(GTK_ENTRY(LUW("cfg_sp2_filter_combo_entry"))); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
978 for (i = 0, j = -1; i < xs_cfg.sid2NFilterPresets; i++) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
979 if (!strcmp(tmpStr, xs_cfg.sid2FilterPresets[i]->name)) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
980 j = i; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
981 break; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
982 } |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
983 } |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
984 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
985 if (j != -1) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
986 fprintf(stderr, "Found, confirm overwrite?\n"); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
987 } |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
988 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
989 fprintf(stderr, "saving!\n"); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
990 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
991 xs_cfg_sp2_presets_update(); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
992 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
993 XS_MUTEX_UNLOCK(xs_cfg); |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
994 } |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
995 |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
996 |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
997 void xs_cfg_sp2_filter_delete(GtkButton *button, gpointer user_data) |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
998 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
999 (void) button; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1000 (void) user_data; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1001 /* |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1002 1) confirm |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1003 2) delete |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1004 */ |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1005 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1006 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1007 |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1008 void xs_cfg_sp2_filter_import(GtkButton *button, gpointer user_data) |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1009 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1010 (void) button; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1011 (void) user_data; |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1012 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1013 if (xs_filt_importselector != NULL) { |
2511
da7e2ec2ea27
Use macro wrapping for Gtk+ v1 vs v2 differences, yet again.
Matti Hamalainen <ccr@tnsp.org>
parents:
2509
diff
changeset
|
1014 XS_WINDOW_PRESENT(xs_filt_importselector); |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1015 return; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1016 } |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1017 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1018 xs_filt_importselector = create_xs_filter_import_fs(); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1019 gtk_widget_show(xs_filt_importselector); |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1020 } |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1021 |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1022 |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1023 void xs_filter_import_fs_ok(GtkButton *button, gpointer user_data) |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1024 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1025 const gchar *tmpStr; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1026 (void) button; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1027 (void) user_data; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1028 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1029 XS_MUTEX_LOCK(xs_cfg); |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1030 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1031 /* Selection was accepted! */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1032 tmpStr = gtk_file_selection_get_filename(GTK_FILE_SELECTION(xs_filt_importselector)); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1033 xs_filters_import(tmpStr, xs_cfg.sid2FilterPresets, &xs_cfg.sid2NFilterPresets); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1034 xs_cfg_sp2_presets_update(); |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1035 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1036 /* Close file selector window */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1037 gtk_widget_destroy(xs_filt_importselector); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1038 xs_filt_importselector = NULL; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1039 XS_MUTEX_UNLOCK(xs_cfg); |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1040 } |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1041 |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1042 |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1043 XS_DEF_WINDOW_CLOSE(filter_import_fs_cancel, filt_importselector) |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1044 XS_DEF_WINDOW_DELETE(filter_import_fs, filt_importselector) |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1045 |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1046 |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1047 void xs_cfg_sp2_filter_export(GtkButton *button, gpointer user_data) |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1048 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1049 (void) button; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1050 (void) user_data; |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1051 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1052 if (xs_filt_exportselector != NULL) { |
2511
da7e2ec2ea27
Use macro wrapping for Gtk+ v1 vs v2 differences, yet again.
Matti Hamalainen <ccr@tnsp.org>
parents:
2509
diff
changeset
|
1053 XS_WINDOW_PRESENT(xs_filt_exportselector); |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1054 return; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1055 } |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1056 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1057 xs_filt_exportselector = create_xs_filter_export_fs(); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1058 gtk_widget_show(xs_filt_exportselector); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1059 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1060 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1061 |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1062 void xs_filter_export_fs_ok(GtkButton *button, gpointer user_data) |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1063 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1064 const gchar *tmpStr; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1065 (void) button; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1066 (void) user_data; |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1067 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1068 XS_MUTEX_LOCK(xs_cfg); |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1069 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1070 /* Selection was accepted! */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1071 tmpStr = gtk_file_selection_get_filename(GTK_FILE_SELECTION(xs_filt_exportselector)); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1072 xs_filters_export(tmpStr, xs_cfg.sid2FilterPresets, xs_cfg.sid2NFilterPresets); |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1073 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1074 /* Close file selector window */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1075 gtk_widget_destroy(xs_filt_exportselector); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1076 xs_filt_exportselector = NULL; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1077 XS_MUTEX_UNLOCK(xs_cfg); |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1078 } |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1079 |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1080 |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1081 XS_DEF_WINDOW_CLOSE(filter_export_fs_cancel, filt_exportselector) |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1082 XS_DEF_WINDOW_DELETE(filter_export_fs, filt_exportselector) |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1083 |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1084 |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
1085 /* Selection toggle handlers |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1086 */ |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1087 void xs_cfg_emu_filters_toggled(GtkToggleButton * togglebutton, gpointer user_data) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1088 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1089 gboolean isActive = GTK_TOGGLE_BUTTON(togglebutton)->active; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1090 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1091 (void) user_data; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1092 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1093 gtk_widget_set_sensitive(LUW("cfg_filters_notebook"), isActive); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1094 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1095 |
1605
75b8e7737bcd
Added support for SID-plugin specific Tuplez format string (see config
Matti Hamalainen <ccr@tnsp.org>
parents:
1604
diff
changeset
|
1096 |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1097 void xs_cfg_ftitle_override_toggled(GtkToggleButton * togglebutton, gpointer user_data) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1098 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1099 gboolean isActive = GTK_TOGGLE_BUTTON(togglebutton)->active; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1100 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1101 (void) user_data; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1102 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1103 gtk_widget_set_sensitive(LUW("cfg_ftitle_box"), isActive); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1104 } |
1605
75b8e7737bcd
Added support for SID-plugin specific Tuplez format string (see config
Matti Hamalainen <ccr@tnsp.org>
parents:
1604
diff
changeset
|
1105 |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1106 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1107 void xs_cfg_emu_sidplay1_toggled(GtkToggleButton * togglebutton, gpointer user_data) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1108 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1109 (void) togglebutton; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1110 (void) user_data; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1111 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1112 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1113 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1114 void xs_cfg_emu_sidplay2_toggled(GtkToggleButton * togglebutton, gpointer user_data) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1115 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1116 gboolean isActive = GTK_TOGGLE_BUTTON(togglebutton)->active; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1117 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1118 (void) user_data; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1119 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1120 gtk_widget_set_sensitive(LUW("cfg_emu_mem_real"), isActive); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1121 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1122 gtk_widget_set_sensitive(LUW("cfg_sidplay2_frame"), isActive); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1123 gtk_widget_set_sensitive(LUW("cfg_emu_sp2_opt"), isActive); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1124 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1125 gtk_widget_set_sensitive(LUW("cfg_chn_autopan"), !isActive); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1126 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1127 #ifdef HAVE_RESID_BUILDER |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1128 gtk_widget_set_sensitive(LUW("cfg_emu_sp2_resid"), isActive); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1129 #else |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1130 gtk_widget_set_sensitive(LUW("cfg_emu_sp2_resid"), FALSE); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1131 #endif |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1132 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1133 #ifdef HAVE_HARDSID_BUILDER |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1134 gtk_widget_set_sensitive(LUW("cfg_emu_sp2_hardsid"), isActive); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1135 #else |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1136 gtk_widget_set_sensitive(LUW("cfg_emu_sp2_hardsid"), FALSE); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1137 #endif |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1138 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1139 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1140 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1141 void xs_cfg_oversample_toggled(GtkToggleButton * togglebutton, gpointer user_data) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1142 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1143 gboolean isActive = GTK_TOGGLE_BUTTON(togglebutton)->active; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1144 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1145 (void) user_data; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1146 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1147 gtk_widget_set_sensitive(LUW("cfg_oversample_box"), isActive); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1148 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1149 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1150 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1151 void xs_cfg_mintime_enable_toggled(GtkToggleButton * togglebutton, gpointer user_data) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1152 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1153 gboolean isActive = GTK_TOGGLE_BUTTON(togglebutton)->active; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1154 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1155 (void) user_data; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1156 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1157 gtk_widget_set_sensitive(LUW("cfg_mintime_box"), isActive); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1158 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1159 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1160 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1161 void xs_cfg_maxtime_enable_toggled(GtkToggleButton * togglebutton, gpointer user_data) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1162 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1163 gboolean isActive = GTK_TOGGLE_BUTTON(LUW("cfg_maxtime_enable"))->active; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1164 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1165 (void) togglebutton; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1166 (void) user_data; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1167 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1168 gtk_widget_set_sensitive(LUW("cfg_maxtime_unknown"), isActive); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1169 gtk_widget_set_sensitive(LUW("cfg_maxtime_box"), isActive); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1170 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1171 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1172 |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1173 void xs_cfg_sldb_enable_toggled(GtkToggleButton * togglebutton, gpointer user_data) |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1174 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1175 gboolean isActive = GTK_TOGGLE_BUTTON(togglebutton)->active; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1176 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1177 (void) user_data; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1178 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1179 gtk_widget_set_sensitive(LUW("cfg_sld_box"), isActive); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1180 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1181 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1182 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1183 void xs_cfg_stil_enable_toggled(GtkToggleButton * togglebutton, gpointer user_data) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1184 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1185 gboolean isActive = GTK_TOGGLE_BUTTON(togglebutton)->active; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1186 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1187 (void) user_data; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1188 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1189 gtk_widget_set_sensitive(LUW("cfg_stil_box1"), isActive); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1190 gtk_widget_set_sensitive(LUW("cfg_stil_box2"), isActive); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1191 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1192 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1193 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1194 void xs_cfg_subauto_enable_toggled(GtkToggleButton * togglebutton, gpointer user_data) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1195 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1196 gboolean isActive = GTK_TOGGLE_BUTTON(togglebutton)->active; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1197 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1198 (void) user_data; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1199 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1200 gtk_widget_set_sensitive(LUW("cfg_subauto_min_only"), isActive); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1201 gtk_widget_set_sensitive(LUW("cfg_subauto_box"), isActive); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1202 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1203 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1204 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1205 void xs_cfg_subauto_min_only_toggled(GtkToggleButton * togglebutton, gpointer user_data) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1206 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1207 gboolean isActive = GTK_TOGGLE_BUTTON(togglebutton)->active && |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1208 GTK_TOGGLE_BUTTON(LUW("cfg_subauto_enable"))->active; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1209 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1210 (void) user_data; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1211 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1212 gtk_widget_set_sensitive(LUW("cfg_subauto_box"), isActive); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1213 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1214 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1215 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1216 void xs_cfg_mintime_changed(GtkEditable * editable, gpointer user_data) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1217 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1218 gint tmpValue; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1219 GtkAdjustment *tmpAdj; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1220 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1221 (void) user_data; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1222 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1223 tmpAdj = gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(LUW("cfg_maxtime"))); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1224 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1225 tmpValue = (gint) gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(editable))->value; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1226 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1227 if (tmpValue > tmpAdj->value) |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1228 gtk_adjustment_set_value(tmpAdj, tmpValue); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1229 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1230 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1231 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1232 void xs_cfg_maxtime_changed(GtkEditable * editable, gpointer user_data) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1233 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1234 gint tmpValue; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1235 GtkAdjustment *tmpAdj; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1236 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1237 (void) user_data; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1238 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1239 tmpAdj = gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(LUW("cfg_mintime"))); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1240 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1241 tmpValue = (gint) gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(editable))->value; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1242 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1243 if (tmpValue < tmpAdj->value) |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1244 gtk_adjustment_set_value(tmpAdj, tmpValue); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1245 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1246 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1247 |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1248 XS_DEF_WINDOW_DELETE(configwin, configwin) |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1249 |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1250 |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
1251 /* Execute the configuration panel |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1252 */ |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1253 void xs_configure(void) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1254 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1255 gint i; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1256 gfloat tmpValue; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1257 gchar tmpStr[64]; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1258 GList *tmpList = NULL; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1259 GtkWidget *tmpCurve; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1260 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1261 /* Check if the window already exists */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1262 if (xs_configwin) { |
2511
da7e2ec2ea27
Use macro wrapping for Gtk+ v1 vs v2 differences, yet again.
Matti Hamalainen <ccr@tnsp.org>
parents:
2509
diff
changeset
|
1263 XS_WINDOW_PRESENT(xs_configwin); |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1264 return; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1265 } |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1266 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1267 /* Create the window */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1268 xs_configwin = create_xs_configwin(); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1269 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1270 /* Get lock on configuration */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1271 XS_MUTEX_LOCK(xs_cfg); |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
1272 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1273 /* Add samplerates */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1274 for (i = 0; i < xs_nsamplerates_table; i++) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1275 tmpList = g_list_append (tmpList, |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1276 (gpointer) xs_samplerates_table[i]); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1277 } |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1278 gtk_combo_set_popdown_strings(GTK_COMBO(LUW("cfg_samplerate_combo")), tmpList); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1279 g_list_free(tmpList); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1280 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1281 /* Create the custom filter curve widget for libSIDPlay2 */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1282 xs_cfg_sp2_presets_update(); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1283 tmpCurve = xs_curve_new(); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1284 xs_cfg_sp2_filter_update(XS_CURVE(tmpCurve), &xs_cfg.sid2Filter); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1285 gtk_widget_set_name(tmpCurve, "cfg_sp2_filter_curve"); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1286 gtk_widget_ref(tmpCurve); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1287 gtk_object_set_data_full(GTK_OBJECT(xs_configwin), |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1288 "cfg_sp2_filter_curve", tmpCurve, (GtkDestroyNotify) gtk_widget_unref); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1289 gtk_widget_show(tmpCurve); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1290 gtk_container_add(GTK_CONTAINER(LUW("cfg_sp2_filter_frame")), tmpCurve); |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
464
diff
changeset
|
1291 |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1292 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1293 /* Based on available optional parts, gray out options */ |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1294 #ifndef HAVE_SIDPLAY1 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1295 gtk_widget_set_sensitive(LUW("cfg_emu_sidplay1"), FALSE); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1296 gtk_widget_set_sensitive(LUW("cfg_box_filter_sidplay1"), FALSE); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1297 #endif |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1298 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1299 #ifndef HAVE_SIDPLAY2 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1300 gtk_widget_set_sensitive(LUW("cfg_emu_sidplay2"), FALSE); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1301 gtk_widget_set_sensitive(LUW("cfg_box_filter_sidplay2"), FALSE); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1302 #endif |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1303 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1304 gtk_widget_set_sensitive(LUW("cfg_resid_frame"), FALSE); |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1564
diff
changeset
|
1305 |
1605
75b8e7737bcd
Added support for SID-plugin specific Tuplez format string (see config
Matti Hamalainen <ccr@tnsp.org>
parents:
1604
diff
changeset
|
1306 #if !defined(HAVE_XMMSEXTRA) && !defined(AUDACIOUS_PLUGIN) |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1307 gtk_widget_set_sensitive(LUW("cfg_ftitle_override"), FALSE); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1308 xs_cfg.titleOverride = TRUE; |
1605
75b8e7737bcd
Added support for SID-plugin specific Tuplez format string (see config
Matti Hamalainen <ccr@tnsp.org>
parents:
1604
diff
changeset
|
1309 #endif |
75b8e7737bcd
Added support for SID-plugin specific Tuplez format string (see config
Matti Hamalainen <ccr@tnsp.org>
parents:
1604
diff
changeset
|
1310 |
75b8e7737bcd
Added support for SID-plugin specific Tuplez format string (see config
Matti Hamalainen <ccr@tnsp.org>
parents:
1604
diff
changeset
|
1311 #if !defined(HAVE_SONG_POSITION) && !defined(AUDACIOUS_PLUGIN) |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1312 gtk_widget_set_sensitive(LUW("cfg_subctrl_patch"), FALSE); |
1605
75b8e7737bcd
Added support for SID-plugin specific Tuplez format string (see config
Matti Hamalainen <ccr@tnsp.org>
parents:
1604
diff
changeset
|
1313 #endif |
1604
b46e7f445e88
Fixed configuration dialog, thanks to Joker for pointing out the flaws.
Matti Hamalainen <ccr@tnsp.org>
parents:
1590
diff
changeset
|
1314 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1315 xs_cfg_ftitle_override_toggled(GTK_TOGGLE_BUTTON(LUW("cfg_ftitle_override")), NULL); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1316 xs_cfg_emu_filters_toggled(GTK_TOGGLE_BUTTON(LUW("cfg_emu_filters")), NULL); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1317 xs_cfg_emu_sidplay1_toggled(GTK_TOGGLE_BUTTON(LUW("cfg_emu_sidplay1")), NULL); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1318 xs_cfg_emu_sidplay2_toggled(GTK_TOGGLE_BUTTON(LUW("cfg_emu_sidplay2")), NULL); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1319 xs_cfg_oversample_toggled(GTK_TOGGLE_BUTTON(LUW("cfg_oversample")), NULL); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1320 xs_cfg_mintime_enable_toggled(GTK_TOGGLE_BUTTON(LUW("cfg_mintime_enable")), NULL); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1321 xs_cfg_maxtime_enable_toggled(GTK_TOGGLE_BUTTON(LUW("cfg_maxtime_enable")), NULL); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1322 xs_cfg_sldb_enable_toggled(GTK_TOGGLE_BUTTON(LUW("cfg_sld_enable")), NULL); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1323 xs_cfg_stil_enable_toggled(GTK_TOGGLE_BUTTON(LUW("cfg_stil_enable")), NULL); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1324 xs_cfg_subauto_enable_toggled(GTK_TOGGLE_BUTTON(LUW("cfg_subauto_enable")), NULL); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1325 xs_cfg_subauto_min_only_toggled(GTK_TOGGLE_BUTTON(LUW("cfg_subauto_min_only")), NULL); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1326 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1327 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1328 /* Set current data to widgets */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1329 for (i = 0; i < xs_widtable_max; i++) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1330 switch (xs_widtable[i].widType) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1331 case WTYPE_BGROUP: |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1332 assert(xs_widtable[i].itemType == CTYPE_INT); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1333 /* Check if current value matches the given one */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1334 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(LUW(xs_widtable[i].widName)), |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1335 (*((gint *) xs_widtable[i].itemData) == xs_widtable[i].itemSet)); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1336 break; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1337 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1338 case WTYPE_COMBO: |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1339 assert(xs_widtable[i].itemType == CTYPE_INT); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1340 g_snprintf(tmpStr, sizeof(tmpStr), "%d", *(gint *) xs_widtable[i].itemData); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1341 gtk_entry_set_text(GTK_ENTRY(LUW(xs_widtable[i].widName)), tmpStr); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1342 break; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1343 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1344 case WTYPE_SPIN: |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1345 case WTYPE_SCALE: |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1346 /* Get the value */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1347 switch (xs_widtable[i].itemType) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1348 case CTYPE_INT: |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1349 tmpValue = (gfloat) * ((gint *) xs_widtable[i].itemData); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1350 break; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1351 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1352 case CTYPE_FLOAT: |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1353 tmpValue = *((gfloat *) xs_widtable[i].itemData); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1354 break; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1355 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1356 default: |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1357 tmpValue = -1; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1358 assert(0); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1359 break; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1360 } |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1361 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1362 /* Set the value */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1363 switch (xs_widtable[i].widType) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1364 case WTYPE_SPIN: |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1365 gtk_adjustment_set_value(gtk_spin_button_get_adjustment |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1366 (GTK_SPIN_BUTTON(LUW(xs_widtable[i].widName))), tmpValue); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1367 break; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1368 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1369 case WTYPE_SCALE: |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1370 gtk_adjustment_set_value(gtk_range_get_adjustment |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1371 (GTK_RANGE(LUW(xs_widtable[i].widName))), tmpValue); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1372 break; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1373 } |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1374 break; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1375 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1376 case WTYPE_BUTTON: |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1377 assert(xs_widtable[i].itemType == CTYPE_BOOL); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1378 /* Set toggle-button */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1379 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(LUW(xs_widtable[i].widName)), |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1380 *((gboolean *) xs_widtable[i].itemData)); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1381 break; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1382 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1383 case WTYPE_TEXT: |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1384 assert(xs_widtable[i].itemType == CTYPE_STR); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1385 /* Set text to text-widget */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1386 if (*(gchar **) xs_widtable[i].itemData != NULL) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1387 gtk_entry_set_text(GTK_ENTRY(LUW(xs_widtable[i].widName)), |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1388 *(gchar **) xs_widtable[i].itemData); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1389 } |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1390 break; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1391 } |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1392 } |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1393 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1394 /* Release the configuration */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1395 XS_MUTEX_UNLOCK(xs_cfg); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1396 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1397 /* Show the widget */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2478
diff
changeset
|
1398 gtk_widget_show(xs_configwin); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1399 } |