Mercurial > audlegacy-plugins
annotate src/console/Audacious_Config.cxx @ 3199:263c7d983100
alsa-ng: 0.1 sec hard minimum buffer size.
author | John Lindgren <john.lindgren@tds.net> |
---|---|
date | Thu, 23 Jul 2009 14:26:10 -0400 |
parents | 13a0e4377c20 |
children |
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> |
2971
3134a0987162
- changed include path from audacious to audlegacy.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
2523
diff
changeset
|
14 #include <audlegacy/i18n.h> |
3134a0987162
- changed include path from audacious to audlegacy.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
2523
diff
changeset
|
15 #include <audlegacy/plugin.h> |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
16 #include <gtk/gtk.h> |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
17 #include "Audacious_Config.h" |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
18 |
316
fb513e10174e
[svn] - merge libconsole-blargg into mainline libconsole:
nenolod
parents:
12
diff
changeset
|
19 // TODO: add UI for echo |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
20 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
21 void console_cfg_load( void ) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
22 { |
2523
769e17da93dd
Replaced s/ConfigDb/mcs_handle_t/g, as per changes in the core.
Matti Hamalainen <ccr@tnsp.org>
parents:
2497
diff
changeset
|
23 mcs_handle_t *db = aud_cfg_db_open(); |
2124 | 24 aud_cfg_db_get_int(db, "console", "loop_length", &audcfg.loop_length); |
25 aud_cfg_db_get_bool(db, "console", "resample", &audcfg.resample); | |
26 aud_cfg_db_get_int(db, "console", "resample_rate", &audcfg.resample_rate); | |
27 aud_cfg_db_get_int(db, "console", "treble", &audcfg.treble); | |
28 aud_cfg_db_get_int(db, "console", "bass", &audcfg.bass); | |
29 aud_cfg_db_get_bool(db, "console", "ignore_spc_length", &audcfg.ignore_spc_length); | |
30 aud_cfg_db_get_int(db, "console", "echo", &audcfg.echo); | |
31 aud_cfg_db_get_bool(db, "console", "inc_spc_reverb", &audcfg.inc_spc_reverb); | |
32 aud_cfg_db_close(db); | |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
33 } |
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 void console_cfg_save( void ) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
37 { |
2523
769e17da93dd
Replaced s/ConfigDb/mcs_handle_t/g, as per changes in the core.
Matti Hamalainen <ccr@tnsp.org>
parents:
2497
diff
changeset
|
38 mcs_handle_t *db = aud_cfg_db_open(); |
2124 | 39 aud_cfg_db_set_int(db, "console", "loop_length", audcfg.loop_length); |
40 aud_cfg_db_set_bool(db, "console", "resample", audcfg.resample); | |
41 aud_cfg_db_set_int(db, "console", "resample_rate", audcfg.resample_rate); | |
42 aud_cfg_db_set_int(db, "console", "treble", audcfg.treble); | |
43 aud_cfg_db_set_int(db, "console", "bass", audcfg.bass); | |
44 aud_cfg_db_set_bool(db, "console", "ignore_spc_length", audcfg.ignore_spc_length); | |
45 aud_cfg_db_set_int(db, "console", "echo", audcfg.echo); | |
46 aud_cfg_db_set_bool(db, "console", "inc_spc_reverb", audcfg.inc_spc_reverb); | |
47 aud_cfg_db_close(db); | |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
48 } |
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 // CONFIGURATION PANEL (GTK+2 GUI) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
52 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
53 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
|
54 { |
1532 | 55 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
|
56 } |
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 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
|
59 { |
1532 | 60 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
|
61 } |
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 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
|
64 { |
1532 | 65 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
|
66 } |
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 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
|
69 { |
1532 | 70 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
|
71 } |
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 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
|
74 { |
1532 | 75 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
|
76 } |
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 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
|
79 { |
1532 | 80 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
|
81 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
82 |
1498
a1fccf242404
made SPC playback reverb a configuration option till the problem can be
mf0102 <0102@gmx.at>
parents:
528
diff
changeset
|
83 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
|
84 { |
1532 | 85 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
|
86 } |
a1fccf242404
made SPC playback reverb a configuration option till the problem can be
mf0102 <0102@gmx.at>
parents:
528
diff
changeset
|
87 |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
88 static void i_cfg_ev_bok( gpointer configwin ) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
89 { |
1532 | 90 console_cfg_save(); |
91 gtk_widget_destroy( GTK_WIDGET(configwin) ); | |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
92 } |
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 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
|
95 { |
1532 | 96 gtk_widget_set_sensitive( GTK_WIDGET(val_hbox) , |
97 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
|
98 } |
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 void console_cfg_ui( void ) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
102 { |
1532 | 103 static GtkWidget *configwin = NULL; |
104 GtkWidget *configwin_vbox; | |
105 GtkWidget *configwin_gen_vbox, *configwin_spc_vbox; | |
106 GtkWidget *configwin_gen_resample_frame, *configwin_gen_resample_vbox; | |
107 GtkWidget *configwin_gen_resample_cbt, *configwin_gen_resample_val_hbox; | |
108 GtkWidget *configwin_gen_resample_val_spbt; | |
109 GtkWidget *configwin_gen_playback_frame, *configwin_gen_playback_vbox; | |
110 GtkWidget *configwin_gen_playback_tb_hbox; | |
111 GtkWidget *configwin_gen_playback_tb_bass_hbox, *configwin_gen_playback_tb_bass_spbt; | |
112 GtkWidget *configwin_gen_playback_tb_treble_hbox, *configwin_gen_playback_tb_treble_spbt; | |
113 GtkWidget *configwin_gen_playback_deflen_hbox, *configwin_gen_playback_deflen_spbt; | |
114 GtkWidget *configwin_spc_ignorespclen_cbt, *configwin_spc_increverb_cbt; | |
115 GtkWidget /* *hseparator, */ *hbuttonbox, *button_ok, *button_cancel; | |
116 GtkWidget *configwin_notebook; | |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
117 |
1532 | 118 if ( configwin != NULL ) |
119 return; | |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
120 |
1532 | 121 configwin = gtk_window_new( GTK_WINDOW_TOPLEVEL ); |
122 gtk_window_set_type_hint( GTK_WINDOW(configwin), GDK_WINDOW_TYPE_HINT_DIALOG ); | |
123 gtk_window_set_title( GTK_WINDOW(configwin), _("Console Music Decoder") ); | |
124 gtk_container_set_border_width( GTK_CONTAINER(configwin), 10 ); | |
125 g_signal_connect( G_OBJECT(configwin) , "destroy" , | |
126 G_CALLBACK(gtk_widget_destroyed) , &configwin ); | |
127 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
|
128 |
1532 | 129 configwin_vbox = gtk_vbox_new( FALSE , 6 ); |
130 gtk_container_add( GTK_CONTAINER(configwin) , configwin_vbox ); | |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
131 |
1532 | 132 configwin_notebook = gtk_notebook_new(); |
133 gtk_notebook_set_tab_pos( GTK_NOTEBOOK(configwin_notebook) , GTK_POS_TOP ); | |
134 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
|
135 |
1532 | 136 // GENERAL PAGE |
137 configwin_gen_vbox = gtk_vbox_new( FALSE , 3 ); | |
138 gtk_container_set_border_width( GTK_CONTAINER(configwin_gen_vbox), 5 ); | |
139 gtk_notebook_append_page( GTK_NOTEBOOK(configwin_notebook) , | |
140 configwin_gen_vbox , gtk_label_new( _("General") ) ); | |
141 // GENERAL PAGE - PLAYBACK FRAME | |
142 configwin_gen_playback_frame = gtk_frame_new( _("Playback") ); | |
143 gtk_box_pack_start( GTK_BOX(configwin_gen_vbox) , | |
144 configwin_gen_playback_frame , TRUE , TRUE , 0 ); | |
145 configwin_gen_playback_vbox = gtk_vbox_new( FALSE , 4 ); | |
146 gtk_container_set_border_width( GTK_CONTAINER(configwin_gen_playback_vbox), 4 ); | |
147 gtk_container_add( GTK_CONTAINER(configwin_gen_playback_frame) , configwin_gen_playback_vbox ); | |
148 configwin_gen_playback_tb_hbox = gtk_hbox_new( FALSE , 0 ); | |
149 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_vbox) , | |
150 configwin_gen_playback_tb_hbox , FALSE , FALSE , 0 ); | |
151 configwin_gen_playback_tb_bass_hbox = gtk_hbox_new( FALSE , 4 ); | |
152 configwin_gen_playback_tb_bass_spbt = gtk_spin_button_new_with_range( -100 , 100 , 1 ); | |
153 gtk_spin_button_set_value( GTK_SPIN_BUTTON(configwin_gen_playback_tb_bass_spbt) , audcfg.bass ); | |
154 g_signal_connect_swapped( G_OBJECT(button_ok) , "clicked" , | |
155 G_CALLBACK(i_cfg_ev_bass_value_commit) , configwin_gen_playback_tb_bass_spbt ); | |
156 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_tb_bass_hbox) , | |
157 gtk_label_new(_("Bass:")) , FALSE , FALSE , 0 ); | |
158 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_tb_bass_hbox) , | |
159 configwin_gen_playback_tb_bass_spbt , FALSE , FALSE , 0 ); | |
160 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_tb_bass_hbox) , | |
161 gtk_label_new(_("secs")) , FALSE , FALSE , 0 ); | |
162 configwin_gen_playback_tb_treble_hbox = gtk_hbox_new( FALSE , 4 ); | |
163 configwin_gen_playback_tb_treble_spbt = gtk_spin_button_new_with_range( -100 , 100 , 1 ); | |
164 gtk_spin_button_set_value( GTK_SPIN_BUTTON(configwin_gen_playback_tb_treble_spbt) , audcfg.treble ); | |
165 g_signal_connect_swapped( G_OBJECT(button_ok) , "clicked" , | |
166 G_CALLBACK(i_cfg_ev_treble_value_commit) , configwin_gen_playback_tb_treble_spbt ); | |
167 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_tb_treble_hbox) , | |
168 gtk_label_new(_("Treble:")) , FALSE , FALSE , 0 ); | |
169 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_tb_treble_hbox) , | |
170 configwin_gen_playback_tb_treble_spbt , FALSE , FALSE , 0 ); | |
171 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_tb_treble_hbox) , | |
172 gtk_label_new(_("secs")) , FALSE , FALSE , 0 ); | |
173 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_tb_hbox) , | |
174 configwin_gen_playback_tb_bass_hbox , TRUE , TRUE , 0 ); | |
175 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_tb_hbox) , | |
176 gtk_vseparator_new() , FALSE , FALSE , 4 ); | |
177 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_tb_hbox) , | |
178 configwin_gen_playback_tb_treble_hbox , TRUE , TRUE , 0 ); | |
179 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_vbox) , | |
180 gtk_hseparator_new() , FALSE , FALSE , 0 ); | |
181 configwin_gen_playback_deflen_hbox = gtk_hbox_new( FALSE , 4 ); | |
182 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_vbox) , | |
183 configwin_gen_playback_deflen_hbox , FALSE , FALSE , 0 ); | |
184 configwin_gen_playback_deflen_spbt = gtk_spin_button_new_with_range( 1 , 7200 , 10 ); | |
185 gtk_spin_button_set_value( GTK_SPIN_BUTTON(configwin_gen_playback_deflen_spbt) , audcfg.loop_length ); | |
186 g_signal_connect_swapped( G_OBJECT(button_ok) , "clicked" , | |
187 G_CALLBACK(i_cfg_ev_deflen_value_commit) , configwin_gen_playback_deflen_spbt ); | |
188 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_deflen_hbox) , | |
189 gtk_label_new(_("Default song length:")) , FALSE , FALSE , 0 ); | |
190 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_deflen_hbox) , | |
191 configwin_gen_playback_deflen_spbt , FALSE , FALSE , 0 ); | |
192 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_deflen_hbox) , | |
193 gtk_label_new(_("secs")) , FALSE , FALSE , 0 ); | |
194 // GENERAL PAGE - RESAMPLING FRAME | |
195 configwin_gen_resample_frame = gtk_frame_new( _("Resampling") ); | |
196 gtk_box_pack_start( GTK_BOX(configwin_gen_vbox) , | |
197 configwin_gen_resample_frame , TRUE , TRUE , 0 ); | |
198 configwin_gen_resample_vbox = gtk_vbox_new( FALSE , 4 ); | |
199 gtk_container_set_border_width( GTK_CONTAINER(configwin_gen_resample_vbox), 4 ); | |
200 gtk_container_add( GTK_CONTAINER(configwin_gen_resample_frame) , configwin_gen_resample_vbox ); | |
201 configwin_gen_resample_cbt = gtk_check_button_new_with_label( _("Enable audio resampling") ); | |
202 g_signal_connect_swapped( G_OBJECT(button_ok) , "clicked" , | |
203 G_CALLBACK(i_cfg_ev_resample_enable_commit) , configwin_gen_resample_cbt ); | |
204 gtk_box_pack_start( GTK_BOX(configwin_gen_resample_vbox) , | |
205 configwin_gen_resample_cbt , FALSE , FALSE , 0 ); | |
206 gtk_box_pack_start( GTK_BOX(configwin_gen_resample_vbox) , | |
207 gtk_hseparator_new() , FALSE , FALSE , 0 ); | |
208 configwin_gen_resample_val_hbox = gtk_hbox_new( FALSE , 4 ); | |
209 configwin_gen_resample_val_spbt = gtk_spin_button_new_with_range( 11025 , 96000 , 100 ); | |
210 gtk_spin_button_set_value( GTK_SPIN_BUTTON(configwin_gen_resample_val_spbt) , audcfg.resample_rate ); | |
211 g_signal_connect_swapped( G_OBJECT(button_ok) , "clicked" , | |
212 G_CALLBACK(i_cfg_ev_resample_value_commit) , configwin_gen_resample_val_spbt ); | |
213 gtk_box_pack_start( GTK_BOX(configwin_gen_resample_vbox) , | |
214 configwin_gen_resample_val_hbox , FALSE , FALSE , 0 ); | |
215 gtk_box_pack_start( GTK_BOX(configwin_gen_resample_val_hbox) , | |
216 gtk_label_new(_("Resampling rate:")) , FALSE , FALSE , 0 ); | |
217 gtk_box_pack_start( GTK_BOX(configwin_gen_resample_val_hbox) , | |
218 configwin_gen_resample_val_spbt , FALSE , FALSE , 0 ); | |
219 gtk_box_pack_start( GTK_BOX(configwin_gen_resample_val_hbox) , | |
220 gtk_label_new(_("Hz")) , FALSE , FALSE , 0 ); | |
221 gtk_widget_set_sensitive( GTK_WIDGET(configwin_gen_resample_val_hbox) , audcfg.resample ); | |
222 g_signal_connect( G_OBJECT(configwin_gen_resample_cbt) , "toggled" , | |
223 G_CALLBACK(i_cfg_ev_toggle_resample) , configwin_gen_resample_val_hbox ); | |
224 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
|
225 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
226 |
1532 | 227 // SPC PAGE |
228 configwin_spc_vbox = gtk_vbox_new( FALSE , 3 ); | |
229 gtk_container_set_border_width( GTK_CONTAINER(configwin_spc_vbox), 5 ); | |
230 gtk_notebook_append_page( GTK_NOTEBOOK(configwin_notebook) , | |
231 configwin_spc_vbox , gtk_label_new( _("SPC") ) ); | |
232 configwin_spc_ignorespclen_cbt = gtk_check_button_new_with_label( _("Ignore length from SPC tags") ); | |
233 configwin_spc_increverb_cbt = gtk_check_button_new_with_label( _("Increase reverb") ); | |
234 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(configwin_spc_ignorespclen_cbt) , audcfg.ignore_spc_length ); | |
235 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(configwin_spc_increverb_cbt) , audcfg.inc_spc_reverb ); | |
236 g_signal_connect_swapped( G_OBJECT(button_ok) , "clicked" , | |
237 G_CALLBACK(i_cfg_ev_ignorespclen_enable_commit) , configwin_spc_ignorespclen_cbt ); | |
238 g_signal_connect_swapped( G_OBJECT(button_ok) , "clicked" , | |
239 G_CALLBACK(i_cfg_ev_incspcreverb_enable_commit) , configwin_spc_increverb_cbt ); | |
240 gtk_box_pack_start( GTK_BOX(configwin_spc_vbox) , | |
241 configwin_spc_ignorespclen_cbt , FALSE , FALSE , 0 ); | |
242 gtk_box_pack_start( GTK_BOX(configwin_spc_vbox) , | |
243 configwin_spc_increverb_cbt , FALSE , FALSE , 0 ); | |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
244 |
1532 | 245 // horizontal separator and buttons |
246 hbuttonbox = gtk_hbutton_box_new(); | |
247 gtk_button_box_set_layout( GTK_BUTTON_BOX(hbuttonbox) , GTK_BUTTONBOX_END ); | |
248 button_cancel = gtk_button_new_from_stock( GTK_STOCK_CANCEL ); | |
249 g_signal_connect_swapped( G_OBJECT(button_cancel) , "clicked" , | |
250 G_CALLBACK(gtk_widget_destroy) , configwin ); | |
251 gtk_container_add( GTK_CONTAINER(hbuttonbox) , button_cancel ); | |
252 g_signal_connect_swapped( G_OBJECT(button_ok) , "clicked" , | |
253 G_CALLBACK(i_cfg_ev_bok) , configwin ); | |
254 gtk_container_add( GTK_CONTAINER(hbuttonbox) , button_ok ); | |
255 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
|
256 |
3035
13a0e4377c20
Don't use deprecated gtk functions
Tomasz Mon <desowin@gmail.com>
parents:
2971
diff
changeset
|
257 gtk_widget_set_tooltip_text( configwin_gen_playback_deflen_spbt , |
13a0e4377c20
Don't use deprecated gtk functions
Tomasz Mon <desowin@gmail.com>
parents:
2971
diff
changeset
|
258 _("The default song length, expressed in seconds, is used for songs " |
13a0e4377c20
Don't use deprecated gtk functions
Tomasz Mon <desowin@gmail.com>
parents:
2971
diff
changeset
|
259 "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
|
260 |
1532 | 261 gtk_widget_show_all( configwin ); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
262 } |