Mercurial > audlegacy-plugins
annotate src/console/Audacious_Config.cxx @ 2189:549009824758
demac: added MIME type (audio/x-ape) to provided tuple
author | Eugene Zagidullin <e.asphyx@gmail.com> |
---|---|
date | Sun, 25 Nov 2007 23:45:10 +0300 |
parents | b8da6a0b0da2 |
children | ed6c81bd9016 |
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 * Audacious: Cross platform multimedia player |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
3 * Copyright (c) 2005 Audacious Team |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
4 * |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
5 * Driver for Game_Music_Emu library. See details at: |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
6 * http://www.slack.net/~ant/libs/ |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
7 * |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
8 * Libconsole preferences GUI by Giacomo Lozito |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
9 */ |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
10 |
1766
c3fdb0e5a306
Convert some makefiles, remove some -DHAVE_CONFIG_H.
William Pitcock <nenolod@atheme.org>
parents:
1532
diff
changeset
|
11 #include "config.h" |
528 | 12 |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
13 #include <glib.h> |
527
d124034ebea3
[svn] - glib/gi18n.h -> audacious/i18n.h for automatic dgettext support
nenolod
parents:
316
diff
changeset
|
14 #include <audacious/i18n.h> |
1969 | 15 #include <audacious/plugin.h> |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
16 #include <gtk/gtk.h> |
1950
2ebeb7816c5e
Change from "" to <>-style includes. With thanks to ccr for the correct sed voodoo.
chainsaw@localhost
parents:
1766
diff
changeset
|
17 #include <audacious/configdb.h> |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
18 #include "Audacious_Config.h" |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
19 |
316
fb513e10174e
[svn] - merge libconsole-blargg into mainline libconsole:
nenolod
parents:
12
diff
changeset
|
20 // TODO: add UI for echo |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
21 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
22 void console_cfg_load( void ) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
23 { |
2124 | 24 ConfigDb *db = aud_cfg_db_open(); |
25 aud_cfg_db_get_int(db, "console", "loop_length", &audcfg.loop_length); | |
26 aud_cfg_db_get_bool(db, "console", "resample", &audcfg.resample); | |
27 aud_cfg_db_get_int(db, "console", "resample_rate", &audcfg.resample_rate); | |
28 aud_cfg_db_get_int(db, "console", "treble", &audcfg.treble); | |
29 aud_cfg_db_get_int(db, "console", "bass", &audcfg.bass); | |
30 aud_cfg_db_get_bool(db, "console", "ignore_spc_length", &audcfg.ignore_spc_length); | |
31 aud_cfg_db_get_int(db, "console", "echo", &audcfg.echo); | |
32 aud_cfg_db_get_bool(db, "console", "inc_spc_reverb", &audcfg.inc_spc_reverb); | |
33 aud_cfg_db_close(db); | |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
34 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
35 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
36 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
37 void console_cfg_save( void ) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
38 { |
2124 | 39 ConfigDb *db = aud_cfg_db_open(); |
40 aud_cfg_db_set_int(db, "console", "loop_length", audcfg.loop_length); | |
41 aud_cfg_db_set_bool(db, "console", "resample", audcfg.resample); | |
42 aud_cfg_db_set_int(db, "console", "resample_rate", audcfg.resample_rate); | |
43 aud_cfg_db_set_int(db, "console", "treble", audcfg.treble); | |
44 aud_cfg_db_set_int(db, "console", "bass", audcfg.bass); | |
45 aud_cfg_db_set_bool(db, "console", "ignore_spc_length", audcfg.ignore_spc_length); | |
46 aud_cfg_db_set_int(db, "console", "echo", audcfg.echo); | |
47 aud_cfg_db_set_bool(db, "console", "inc_spc_reverb", audcfg.inc_spc_reverb); | |
48 aud_cfg_db_close(db); | |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
49 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
50 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
51 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
52 // CONFIGURATION PANEL (GTK+2 GUI) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
53 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
54 static void i_cfg_ev_resample_enable_commit( gpointer cbt ) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
55 { |
1532 | 56 audcfg.resample = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(cbt) ); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
57 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
58 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
59 static void i_cfg_ev_resample_value_commit( gpointer spbt ) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
60 { |
1532 | 61 audcfg.resample_rate = (gint)gtk_spin_button_get_value( GTK_SPIN_BUTTON(spbt) ); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
62 } |
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 void i_cfg_ev_bass_value_commit( gpointer spbt ) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
65 { |
1532 | 66 audcfg.bass = (gint)gtk_spin_button_get_value( GTK_SPIN_BUTTON(spbt) ); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
67 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
68 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
69 static void i_cfg_ev_treble_value_commit( gpointer spbt ) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
70 { |
1532 | 71 audcfg.treble = (gint)gtk_spin_button_get_value( GTK_SPIN_BUTTON(spbt) ); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
72 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
73 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
74 static void i_cfg_ev_deflen_value_commit( gpointer spbt ) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
75 { |
1532 | 76 audcfg.loop_length = (gint)gtk_spin_button_get_value( GTK_SPIN_BUTTON(spbt) ); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
77 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
78 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
79 static void i_cfg_ev_ignorespclen_enable_commit( gpointer cbt ) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
80 { |
1532 | 81 audcfg.ignore_spc_length = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(cbt) ); |
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 |
1498
a1fccf242404
made SPC playback reverb a configuration option till the problem can be
mf0102 <0102@gmx.at>
parents:
528
diff
changeset
|
84 static void i_cfg_ev_incspcreverb_enable_commit( gpointer cbt ) |
a1fccf242404
made SPC playback reverb a configuration option till the problem can be
mf0102 <0102@gmx.at>
parents:
528
diff
changeset
|
85 { |
1532 | 86 audcfg.inc_spc_reverb = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(cbt) ); |
1498
a1fccf242404
made SPC playback reverb a configuration option till the problem can be
mf0102 <0102@gmx.at>
parents:
528
diff
changeset
|
87 } |
a1fccf242404
made SPC playback reverb a configuration option till the problem can be
mf0102 <0102@gmx.at>
parents:
528
diff
changeset
|
88 |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
89 static void i_cfg_ev_bok( gpointer configwin ) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
90 { |
1532 | 91 console_cfg_save(); |
92 gtk_widget_destroy( GTK_WIDGET(configwin) ); | |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
93 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
94 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
95 static void i_cfg_ev_toggle_resample( GtkToggleButton *tbt , gpointer val_hbox ) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
96 { |
1532 | 97 gtk_widget_set_sensitive( GTK_WIDGET(val_hbox) , |
98 gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(tbt) ) ); | |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
99 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
100 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
101 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
102 void console_cfg_ui( void ) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
103 { |
1532 | 104 static GtkWidget *configwin = NULL; |
105 GtkWidget *configwin_vbox; | |
106 GtkWidget *configwin_gen_vbox, *configwin_spc_vbox; | |
107 GtkWidget *configwin_gen_resample_frame, *configwin_gen_resample_vbox; | |
108 GtkWidget *configwin_gen_resample_cbt, *configwin_gen_resample_val_hbox; | |
109 GtkWidget *configwin_gen_resample_val_spbt; | |
110 GtkWidget *configwin_gen_playback_frame, *configwin_gen_playback_vbox; | |
111 GtkWidget *configwin_gen_playback_tb_hbox; | |
112 GtkWidget *configwin_gen_playback_tb_bass_hbox, *configwin_gen_playback_tb_bass_spbt; | |
113 GtkWidget *configwin_gen_playback_tb_treble_hbox, *configwin_gen_playback_tb_treble_spbt; | |
114 GtkWidget *configwin_gen_playback_deflen_hbox, *configwin_gen_playback_deflen_spbt; | |
115 GtkWidget *configwin_spc_ignorespclen_cbt, *configwin_spc_increverb_cbt; | |
116 GtkWidget /* *hseparator, */ *hbuttonbox, *button_ok, *button_cancel; | |
117 GtkWidget *configwin_notebook; | |
118 GtkTooltips *tips; | |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
119 |
1532 | 120 if ( configwin != NULL ) |
121 return; | |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
122 |
1532 | 123 configwin = gtk_window_new( GTK_WINDOW_TOPLEVEL ); |
124 gtk_window_set_type_hint( GTK_WINDOW(configwin), GDK_WINDOW_TYPE_HINT_DIALOG ); | |
125 gtk_window_set_title( GTK_WINDOW(configwin), _("Console Music Decoder") ); | |
126 gtk_container_set_border_width( GTK_CONTAINER(configwin), 10 ); | |
127 g_signal_connect( G_OBJECT(configwin) , "destroy" , | |
128 G_CALLBACK(gtk_widget_destroyed) , &configwin ); | |
129 button_ok = gtk_button_new_from_stock( GTK_STOCK_OK ); | |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
130 |
1532 | 131 configwin_vbox = gtk_vbox_new( FALSE , 6 ); |
132 gtk_container_add( GTK_CONTAINER(configwin) , configwin_vbox ); | |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
133 |
1532 | 134 tips = gtk_tooltips_new(); |
135 g_object_set_data_full( G_OBJECT(configwin) , "tt" , tips , g_object_unref ); | |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
136 |
1532 | 137 configwin_notebook = gtk_notebook_new(); |
138 gtk_notebook_set_tab_pos( GTK_NOTEBOOK(configwin_notebook) , GTK_POS_TOP ); | |
139 gtk_box_pack_start( GTK_BOX(configwin_vbox) , configwin_notebook , TRUE , TRUE , 2 ); | |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
140 |
1532 | 141 // GENERAL PAGE |
142 configwin_gen_vbox = gtk_vbox_new( FALSE , 3 ); | |
143 gtk_container_set_border_width( GTK_CONTAINER(configwin_gen_vbox), 5 ); | |
144 gtk_notebook_append_page( GTK_NOTEBOOK(configwin_notebook) , | |
145 configwin_gen_vbox , gtk_label_new( _("General") ) ); | |
146 // GENERAL PAGE - PLAYBACK FRAME | |
147 configwin_gen_playback_frame = gtk_frame_new( _("Playback") ); | |
148 gtk_box_pack_start( GTK_BOX(configwin_gen_vbox) , | |
149 configwin_gen_playback_frame , TRUE , TRUE , 0 ); | |
150 configwin_gen_playback_vbox = gtk_vbox_new( FALSE , 4 ); | |
151 gtk_container_set_border_width( GTK_CONTAINER(configwin_gen_playback_vbox), 4 ); | |
152 gtk_container_add( GTK_CONTAINER(configwin_gen_playback_frame) , configwin_gen_playback_vbox ); | |
153 configwin_gen_playback_tb_hbox = gtk_hbox_new( FALSE , 0 ); | |
154 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_vbox) , | |
155 configwin_gen_playback_tb_hbox , FALSE , FALSE , 0 ); | |
156 configwin_gen_playback_tb_bass_hbox = gtk_hbox_new( FALSE , 4 ); | |
157 configwin_gen_playback_tb_bass_spbt = gtk_spin_button_new_with_range( -100 , 100 , 1 ); | |
158 gtk_spin_button_set_value( GTK_SPIN_BUTTON(configwin_gen_playback_tb_bass_spbt) , audcfg.bass ); | |
159 g_signal_connect_swapped( G_OBJECT(button_ok) , "clicked" , | |
160 G_CALLBACK(i_cfg_ev_bass_value_commit) , configwin_gen_playback_tb_bass_spbt ); | |
161 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_tb_bass_hbox) , | |
162 gtk_label_new(_("Bass:")) , FALSE , FALSE , 0 ); | |
163 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_tb_bass_hbox) , | |
164 configwin_gen_playback_tb_bass_spbt , FALSE , FALSE , 0 ); | |
165 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_tb_bass_hbox) , | |
166 gtk_label_new(_("secs")) , FALSE , FALSE , 0 ); | |
167 configwin_gen_playback_tb_treble_hbox = gtk_hbox_new( FALSE , 4 ); | |
168 configwin_gen_playback_tb_treble_spbt = gtk_spin_button_new_with_range( -100 , 100 , 1 ); | |
169 gtk_spin_button_set_value( GTK_SPIN_BUTTON(configwin_gen_playback_tb_treble_spbt) , audcfg.treble ); | |
170 g_signal_connect_swapped( G_OBJECT(button_ok) , "clicked" , | |
171 G_CALLBACK(i_cfg_ev_treble_value_commit) , configwin_gen_playback_tb_treble_spbt ); | |
172 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_tb_treble_hbox) , | |
173 gtk_label_new(_("Treble:")) , FALSE , FALSE , 0 ); | |
174 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_tb_treble_hbox) , | |
175 configwin_gen_playback_tb_treble_spbt , FALSE , FALSE , 0 ); | |
176 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_tb_treble_hbox) , | |
177 gtk_label_new(_("secs")) , FALSE , FALSE , 0 ); | |
178 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_tb_hbox) , | |
179 configwin_gen_playback_tb_bass_hbox , TRUE , TRUE , 0 ); | |
180 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_tb_hbox) , | |
181 gtk_vseparator_new() , FALSE , FALSE , 4 ); | |
182 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_tb_hbox) , | |
183 configwin_gen_playback_tb_treble_hbox , TRUE , TRUE , 0 ); | |
184 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_vbox) , | |
185 gtk_hseparator_new() , FALSE , FALSE , 0 ); | |
186 configwin_gen_playback_deflen_hbox = gtk_hbox_new( FALSE , 4 ); | |
187 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_vbox) , | |
188 configwin_gen_playback_deflen_hbox , FALSE , FALSE , 0 ); | |
189 configwin_gen_playback_deflen_spbt = gtk_spin_button_new_with_range( 1 , 7200 , 10 ); | |
190 gtk_spin_button_set_value( GTK_SPIN_BUTTON(configwin_gen_playback_deflen_spbt) , audcfg.loop_length ); | |
191 g_signal_connect_swapped( G_OBJECT(button_ok) , "clicked" , | |
192 G_CALLBACK(i_cfg_ev_deflen_value_commit) , configwin_gen_playback_deflen_spbt ); | |
193 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_deflen_hbox) , | |
194 gtk_label_new(_("Default song length:")) , FALSE , FALSE , 0 ); | |
195 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_deflen_hbox) , | |
196 configwin_gen_playback_deflen_spbt , FALSE , FALSE , 0 ); | |
197 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_deflen_hbox) , | |
198 gtk_label_new(_("secs")) , FALSE , FALSE , 0 ); | |
199 // GENERAL PAGE - RESAMPLING FRAME | |
200 configwin_gen_resample_frame = gtk_frame_new( _("Resampling") ); | |
201 gtk_box_pack_start( GTK_BOX(configwin_gen_vbox) , | |
202 configwin_gen_resample_frame , TRUE , TRUE , 0 ); | |
203 configwin_gen_resample_vbox = gtk_vbox_new( FALSE , 4 ); | |
204 gtk_container_set_border_width( GTK_CONTAINER(configwin_gen_resample_vbox), 4 ); | |
205 gtk_container_add( GTK_CONTAINER(configwin_gen_resample_frame) , configwin_gen_resample_vbox ); | |
206 configwin_gen_resample_cbt = gtk_check_button_new_with_label( _("Enable audio resampling") ); | |
207 g_signal_connect_swapped( G_OBJECT(button_ok) , "clicked" , | |
208 G_CALLBACK(i_cfg_ev_resample_enable_commit) , configwin_gen_resample_cbt ); | |
209 gtk_box_pack_start( GTK_BOX(configwin_gen_resample_vbox) , | |
210 configwin_gen_resample_cbt , FALSE , FALSE , 0 ); | |
211 gtk_box_pack_start( GTK_BOX(configwin_gen_resample_vbox) , | |
212 gtk_hseparator_new() , FALSE , FALSE , 0 ); | |
213 configwin_gen_resample_val_hbox = gtk_hbox_new( FALSE , 4 ); | |
214 configwin_gen_resample_val_spbt = gtk_spin_button_new_with_range( 11025 , 96000 , 100 ); | |
215 gtk_spin_button_set_value( GTK_SPIN_BUTTON(configwin_gen_resample_val_spbt) , audcfg.resample_rate ); | |
216 g_signal_connect_swapped( G_OBJECT(button_ok) , "clicked" , | |
217 G_CALLBACK(i_cfg_ev_resample_value_commit) , configwin_gen_resample_val_spbt ); | |
218 gtk_box_pack_start( GTK_BOX(configwin_gen_resample_vbox) , | |
219 configwin_gen_resample_val_hbox , FALSE , FALSE , 0 ); | |
220 gtk_box_pack_start( GTK_BOX(configwin_gen_resample_val_hbox) , | |
221 gtk_label_new(_("Resampling rate:")) , FALSE , FALSE , 0 ); | |
222 gtk_box_pack_start( GTK_BOX(configwin_gen_resample_val_hbox) , | |
223 configwin_gen_resample_val_spbt , FALSE , FALSE , 0 ); | |
224 gtk_box_pack_start( GTK_BOX(configwin_gen_resample_val_hbox) , | |
225 gtk_label_new(_("Hz")) , FALSE , FALSE , 0 ); | |
226 gtk_widget_set_sensitive( GTK_WIDGET(configwin_gen_resample_val_hbox) , audcfg.resample ); | |
227 g_signal_connect( G_OBJECT(configwin_gen_resample_cbt) , "toggled" , | |
228 G_CALLBACK(i_cfg_ev_toggle_resample) , configwin_gen_resample_val_hbox ); | |
229 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(configwin_gen_resample_cbt) , audcfg.resample ); | |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
230 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
231 |
1532 | 232 // SPC PAGE |
233 configwin_spc_vbox = gtk_vbox_new( FALSE , 3 ); | |
234 gtk_container_set_border_width( GTK_CONTAINER(configwin_spc_vbox), 5 ); | |
235 gtk_notebook_append_page( GTK_NOTEBOOK(configwin_notebook) , | |
236 configwin_spc_vbox , gtk_label_new( _("SPC") ) ); | |
237 configwin_spc_ignorespclen_cbt = gtk_check_button_new_with_label( _("Ignore length from SPC tags") ); | |
238 configwin_spc_increverb_cbt = gtk_check_button_new_with_label( _("Increase reverb") ); | |
239 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(configwin_spc_ignorespclen_cbt) , audcfg.ignore_spc_length ); | |
240 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(configwin_spc_increverb_cbt) , audcfg.inc_spc_reverb ); | |
241 g_signal_connect_swapped( G_OBJECT(button_ok) , "clicked" , | |
242 G_CALLBACK(i_cfg_ev_ignorespclen_enable_commit) , configwin_spc_ignorespclen_cbt ); | |
243 g_signal_connect_swapped( G_OBJECT(button_ok) , "clicked" , | |
244 G_CALLBACK(i_cfg_ev_incspcreverb_enable_commit) , configwin_spc_increverb_cbt ); | |
245 gtk_box_pack_start( GTK_BOX(configwin_spc_vbox) , | |
246 configwin_spc_ignorespclen_cbt , FALSE , FALSE , 0 ); | |
247 gtk_box_pack_start( GTK_BOX(configwin_spc_vbox) , | |
248 configwin_spc_increverb_cbt , FALSE , FALSE , 0 ); | |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
249 |
1532 | 250 // horizontal separator and buttons |
251 hbuttonbox = gtk_hbutton_box_new(); | |
252 gtk_button_box_set_layout( GTK_BUTTON_BOX(hbuttonbox) , GTK_BUTTONBOX_END ); | |
253 button_cancel = gtk_button_new_from_stock( GTK_STOCK_CANCEL ); | |
254 g_signal_connect_swapped( G_OBJECT(button_cancel) , "clicked" , | |
255 G_CALLBACK(gtk_widget_destroy) , configwin ); | |
256 gtk_container_add( GTK_CONTAINER(hbuttonbox) , button_cancel ); | |
257 g_signal_connect_swapped( G_OBJECT(button_ok) , "clicked" , | |
258 G_CALLBACK(i_cfg_ev_bok) , configwin ); | |
259 gtk_container_add( GTK_CONTAINER(hbuttonbox) , button_ok ); | |
260 gtk_box_pack_start( GTK_BOX(configwin_vbox) , hbuttonbox , FALSE , FALSE , 0 ); | |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
261 |
1532 | 262 gtk_tooltips_set_tip( GTK_TOOLTIPS(tips) , configwin_gen_playback_deflen_spbt , |
263 _("The default song length, expressed in seconds, is used for songs " | |
264 "that do not provide length information (i.e. looping tracks).") , "" ); | |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
265 |
1532 | 266 gtk_widget_show_all( configwin ); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
267 } |