Mercurial > audlegacy-plugins
annotate src/console/Audacious_Config.cxx @ 1928:b68bcc6a39c7
Automated merge with ssh://hg.atheme.org//hg/audacious-plugins
author | Kiyoshi Aman <kiyoshi.aman@gmail.com> |
---|---|
date | Wed, 19 Sep 2007 11:03:57 -0500 |
parents | d19b625f9144 |
children | c3fdb0e5a306 |
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 |
528 | 11 #ifdef HAVE_CONFIG_H |
12 # include "config.h" | |
13 #endif | |
14 | |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
15 #include <glib.h> |
527
d124034ebea3
[svn] - glib/gi18n.h -> audacious/i18n.h for automatic dgettext support
nenolod
parents:
316
diff
changeset
|
16 #include <audacious/i18n.h> |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
17 #include <gtk/gtk.h> |
3
088092a52fea
[svn] - move from (internal) libaudacious/ include path to audacious/ include path
nenolod
parents:
0
diff
changeset
|
18 #include "audacious/configdb.h" |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
19 #include "Audacious_Config.h" |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
20 |
316
fb513e10174e
[svn] - merge libconsole-blargg into mainline libconsole:
nenolod
parents:
12
diff
changeset
|
21 // TODO: add UI for echo |
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 void console_cfg_load( void ) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
24 { |
1532 | 25 ConfigDb *db = bmp_cfg_db_open(); |
26 bmp_cfg_db_get_int(db, "console", "loop_length", &audcfg.loop_length); | |
27 bmp_cfg_db_get_bool(db, "console", "resample", &audcfg.resample); | |
28 bmp_cfg_db_get_int(db, "console", "resample_rate", &audcfg.resample_rate); | |
29 bmp_cfg_db_get_int(db, "console", "treble", &audcfg.treble); | |
30 bmp_cfg_db_get_int(db, "console", "bass", &audcfg.bass); | |
31 bmp_cfg_db_get_bool(db, "console", "ignore_spc_length", &audcfg.ignore_spc_length); | |
32 bmp_cfg_db_get_int(db, "console", "echo", &audcfg.echo); | |
33 bmp_cfg_db_get_bool(db, "console", "inc_spc_reverb", &audcfg.inc_spc_reverb); | |
34 bmp_cfg_db_close(db); | |
0
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 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
38 void console_cfg_save( void ) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
39 { |
1532 | 40 ConfigDb *db = bmp_cfg_db_open(); |
41 bmp_cfg_db_set_int(db, "console", "loop_length", audcfg.loop_length); | |
42 bmp_cfg_db_set_bool(db, "console", "resample", audcfg.resample); | |
43 bmp_cfg_db_set_int(db, "console", "resample_rate", audcfg.resample_rate); | |
44 bmp_cfg_db_set_int(db, "console", "treble", audcfg.treble); | |
45 bmp_cfg_db_set_int(db, "console", "bass", audcfg.bass); | |
46 bmp_cfg_db_set_bool(db, "console", "ignore_spc_length", audcfg.ignore_spc_length); | |
47 bmp_cfg_db_set_int(db, "console", "echo", audcfg.echo); | |
48 bmp_cfg_db_set_bool(db, "console", "inc_spc_reverb", audcfg.inc_spc_reverb); | |
49 bmp_cfg_db_close(db); | |
0
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 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
53 // CONFIGURATION PANEL (GTK+2 GUI) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
54 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
55 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
|
56 { |
1532 | 57 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
|
58 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
59 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
60 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
|
61 { |
1532 | 62 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
|
63 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
64 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
65 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
|
66 { |
1532 | 67 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
|
68 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
69 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
70 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
|
71 { |
1532 | 72 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
|
73 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
74 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
75 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
|
76 { |
1532 | 77 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
|
78 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
79 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
80 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
|
81 { |
1532 | 82 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
|
83 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
84 |
1498
a1fccf242404
made SPC playback reverb a configuration option till the problem can be
mf0102 <0102@gmx.at>
parents:
528
diff
changeset
|
85 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
|
86 { |
1532 | 87 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
|
88 } |
a1fccf242404
made SPC playback reverb a configuration option till the problem can be
mf0102 <0102@gmx.at>
parents:
528
diff
changeset
|
89 |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
90 static void i_cfg_ev_bok( gpointer configwin ) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
91 { |
1532 | 92 console_cfg_save(); |
93 gtk_widget_destroy( GTK_WIDGET(configwin) ); | |
0
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 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
96 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
|
97 { |
1532 | 98 gtk_widget_set_sensitive( GTK_WIDGET(val_hbox) , |
99 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
|
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 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
103 void console_cfg_ui( void ) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
104 { |
1532 | 105 static GtkWidget *configwin = NULL; |
106 GtkWidget *configwin_vbox; | |
107 GtkWidget *configwin_gen_vbox, *configwin_spc_vbox; | |
108 GtkWidget *configwin_gen_resample_frame, *configwin_gen_resample_vbox; | |
109 GtkWidget *configwin_gen_resample_cbt, *configwin_gen_resample_val_hbox; | |
110 GtkWidget *configwin_gen_resample_val_spbt; | |
111 GtkWidget *configwin_gen_playback_frame, *configwin_gen_playback_vbox; | |
112 GtkWidget *configwin_gen_playback_tb_hbox; | |
113 GtkWidget *configwin_gen_playback_tb_bass_hbox, *configwin_gen_playback_tb_bass_spbt; | |
114 GtkWidget *configwin_gen_playback_tb_treble_hbox, *configwin_gen_playback_tb_treble_spbt; | |
115 GtkWidget *configwin_gen_playback_deflen_hbox, *configwin_gen_playback_deflen_spbt; | |
116 GtkWidget *configwin_spc_ignorespclen_cbt, *configwin_spc_increverb_cbt; | |
117 GtkWidget /* *hseparator, */ *hbuttonbox, *button_ok, *button_cancel; | |
118 GtkWidget *configwin_notebook; | |
119 GtkTooltips *tips; | |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
120 |
1532 | 121 if ( configwin != NULL ) |
122 return; | |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
123 |
1532 | 124 configwin = gtk_window_new( GTK_WINDOW_TOPLEVEL ); |
125 gtk_window_set_type_hint( GTK_WINDOW(configwin), GDK_WINDOW_TYPE_HINT_DIALOG ); | |
126 gtk_window_set_title( GTK_WINDOW(configwin), _("Console Music Decoder") ); | |
127 gtk_container_set_border_width( GTK_CONTAINER(configwin), 10 ); | |
128 g_signal_connect( G_OBJECT(configwin) , "destroy" , | |
129 G_CALLBACK(gtk_widget_destroyed) , &configwin ); | |
130 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
|
131 |
1532 | 132 configwin_vbox = gtk_vbox_new( FALSE , 6 ); |
133 gtk_container_add( GTK_CONTAINER(configwin) , configwin_vbox ); | |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
134 |
1532 | 135 tips = gtk_tooltips_new(); |
136 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
|
137 |
1532 | 138 configwin_notebook = gtk_notebook_new(); |
139 gtk_notebook_set_tab_pos( GTK_NOTEBOOK(configwin_notebook) , GTK_POS_TOP ); | |
140 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
|
141 |
1532 | 142 // GENERAL PAGE |
143 configwin_gen_vbox = gtk_vbox_new( FALSE , 3 ); | |
144 gtk_container_set_border_width( GTK_CONTAINER(configwin_gen_vbox), 5 ); | |
145 gtk_notebook_append_page( GTK_NOTEBOOK(configwin_notebook) , | |
146 configwin_gen_vbox , gtk_label_new( _("General") ) ); | |
147 // GENERAL PAGE - PLAYBACK FRAME | |
148 configwin_gen_playback_frame = gtk_frame_new( _("Playback") ); | |
149 gtk_box_pack_start( GTK_BOX(configwin_gen_vbox) , | |
150 configwin_gen_playback_frame , TRUE , TRUE , 0 ); | |
151 configwin_gen_playback_vbox = gtk_vbox_new( FALSE , 4 ); | |
152 gtk_container_set_border_width( GTK_CONTAINER(configwin_gen_playback_vbox), 4 ); | |
153 gtk_container_add( GTK_CONTAINER(configwin_gen_playback_frame) , configwin_gen_playback_vbox ); | |
154 configwin_gen_playback_tb_hbox = gtk_hbox_new( FALSE , 0 ); | |
155 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_vbox) , | |
156 configwin_gen_playback_tb_hbox , FALSE , FALSE , 0 ); | |
157 configwin_gen_playback_tb_bass_hbox = gtk_hbox_new( FALSE , 4 ); | |
158 configwin_gen_playback_tb_bass_spbt = gtk_spin_button_new_with_range( -100 , 100 , 1 ); | |
159 gtk_spin_button_set_value( GTK_SPIN_BUTTON(configwin_gen_playback_tb_bass_spbt) , audcfg.bass ); | |
160 g_signal_connect_swapped( G_OBJECT(button_ok) , "clicked" , | |
161 G_CALLBACK(i_cfg_ev_bass_value_commit) , configwin_gen_playback_tb_bass_spbt ); | |
162 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_tb_bass_hbox) , | |
163 gtk_label_new(_("Bass:")) , FALSE , FALSE , 0 ); | |
164 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_tb_bass_hbox) , | |
165 configwin_gen_playback_tb_bass_spbt , FALSE , FALSE , 0 ); | |
166 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_tb_bass_hbox) , | |
167 gtk_label_new(_("secs")) , FALSE , FALSE , 0 ); | |
168 configwin_gen_playback_tb_treble_hbox = gtk_hbox_new( FALSE , 4 ); | |
169 configwin_gen_playback_tb_treble_spbt = gtk_spin_button_new_with_range( -100 , 100 , 1 ); | |
170 gtk_spin_button_set_value( GTK_SPIN_BUTTON(configwin_gen_playback_tb_treble_spbt) , audcfg.treble ); | |
171 g_signal_connect_swapped( G_OBJECT(button_ok) , "clicked" , | |
172 G_CALLBACK(i_cfg_ev_treble_value_commit) , configwin_gen_playback_tb_treble_spbt ); | |
173 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_tb_treble_hbox) , | |
174 gtk_label_new(_("Treble:")) , FALSE , FALSE , 0 ); | |
175 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_tb_treble_hbox) , | |
176 configwin_gen_playback_tb_treble_spbt , FALSE , FALSE , 0 ); | |
177 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_tb_treble_hbox) , | |
178 gtk_label_new(_("secs")) , FALSE , FALSE , 0 ); | |
179 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_tb_hbox) , | |
180 configwin_gen_playback_tb_bass_hbox , TRUE , TRUE , 0 ); | |
181 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_tb_hbox) , | |
182 gtk_vseparator_new() , FALSE , FALSE , 4 ); | |
183 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_tb_hbox) , | |
184 configwin_gen_playback_tb_treble_hbox , TRUE , TRUE , 0 ); | |
185 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_vbox) , | |
186 gtk_hseparator_new() , FALSE , FALSE , 0 ); | |
187 configwin_gen_playback_deflen_hbox = gtk_hbox_new( FALSE , 4 ); | |
188 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_vbox) , | |
189 configwin_gen_playback_deflen_hbox , FALSE , FALSE , 0 ); | |
190 configwin_gen_playback_deflen_spbt = gtk_spin_button_new_with_range( 1 , 7200 , 10 ); | |
191 gtk_spin_button_set_value( GTK_SPIN_BUTTON(configwin_gen_playback_deflen_spbt) , audcfg.loop_length ); | |
192 g_signal_connect_swapped( G_OBJECT(button_ok) , "clicked" , | |
193 G_CALLBACK(i_cfg_ev_deflen_value_commit) , configwin_gen_playback_deflen_spbt ); | |
194 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_deflen_hbox) , | |
195 gtk_label_new(_("Default song length:")) , FALSE , FALSE , 0 ); | |
196 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_deflen_hbox) , | |
197 configwin_gen_playback_deflen_spbt , FALSE , FALSE , 0 ); | |
198 gtk_box_pack_start( GTK_BOX(configwin_gen_playback_deflen_hbox) , | |
199 gtk_label_new(_("secs")) , FALSE , FALSE , 0 ); | |
200 // GENERAL PAGE - RESAMPLING FRAME | |
201 configwin_gen_resample_frame = gtk_frame_new( _("Resampling") ); | |
202 gtk_box_pack_start( GTK_BOX(configwin_gen_vbox) , | |
203 configwin_gen_resample_frame , TRUE , TRUE , 0 ); | |
204 configwin_gen_resample_vbox = gtk_vbox_new( FALSE , 4 ); | |
205 gtk_container_set_border_width( GTK_CONTAINER(configwin_gen_resample_vbox), 4 ); | |
206 gtk_container_add( GTK_CONTAINER(configwin_gen_resample_frame) , configwin_gen_resample_vbox ); | |
207 configwin_gen_resample_cbt = gtk_check_button_new_with_label( _("Enable audio resampling") ); | |
208 g_signal_connect_swapped( G_OBJECT(button_ok) , "clicked" , | |
209 G_CALLBACK(i_cfg_ev_resample_enable_commit) , configwin_gen_resample_cbt ); | |
210 gtk_box_pack_start( GTK_BOX(configwin_gen_resample_vbox) , | |
211 configwin_gen_resample_cbt , FALSE , FALSE , 0 ); | |
212 gtk_box_pack_start( GTK_BOX(configwin_gen_resample_vbox) , | |
213 gtk_hseparator_new() , FALSE , FALSE , 0 ); | |
214 configwin_gen_resample_val_hbox = gtk_hbox_new( FALSE , 4 ); | |
215 configwin_gen_resample_val_spbt = gtk_spin_button_new_with_range( 11025 , 96000 , 100 ); | |
216 gtk_spin_button_set_value( GTK_SPIN_BUTTON(configwin_gen_resample_val_spbt) , audcfg.resample_rate ); | |
217 g_signal_connect_swapped( G_OBJECT(button_ok) , "clicked" , | |
218 G_CALLBACK(i_cfg_ev_resample_value_commit) , configwin_gen_resample_val_spbt ); | |
219 gtk_box_pack_start( GTK_BOX(configwin_gen_resample_vbox) , | |
220 configwin_gen_resample_val_hbox , FALSE , FALSE , 0 ); | |
221 gtk_box_pack_start( GTK_BOX(configwin_gen_resample_val_hbox) , | |
222 gtk_label_new(_("Resampling rate:")) , FALSE , FALSE , 0 ); | |
223 gtk_box_pack_start( GTK_BOX(configwin_gen_resample_val_hbox) , | |
224 configwin_gen_resample_val_spbt , FALSE , FALSE , 0 ); | |
225 gtk_box_pack_start( GTK_BOX(configwin_gen_resample_val_hbox) , | |
226 gtk_label_new(_("Hz")) , FALSE , FALSE , 0 ); | |
227 gtk_widget_set_sensitive( GTK_WIDGET(configwin_gen_resample_val_hbox) , audcfg.resample ); | |
228 g_signal_connect( G_OBJECT(configwin_gen_resample_cbt) , "toggled" , | |
229 G_CALLBACK(i_cfg_ev_toggle_resample) , configwin_gen_resample_val_hbox ); | |
230 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
|
231 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
232 |
1532 | 233 // SPC PAGE |
234 configwin_spc_vbox = gtk_vbox_new( FALSE , 3 ); | |
235 gtk_container_set_border_width( GTK_CONTAINER(configwin_spc_vbox), 5 ); | |
236 gtk_notebook_append_page( GTK_NOTEBOOK(configwin_notebook) , | |
237 configwin_spc_vbox , gtk_label_new( _("SPC") ) ); | |
238 configwin_spc_ignorespclen_cbt = gtk_check_button_new_with_label( _("Ignore length from SPC tags") ); | |
239 configwin_spc_increverb_cbt = gtk_check_button_new_with_label( _("Increase reverb") ); | |
240 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(configwin_spc_ignorespclen_cbt) , audcfg.ignore_spc_length ); | |
241 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(configwin_spc_increverb_cbt) , audcfg.inc_spc_reverb ); | |
242 g_signal_connect_swapped( G_OBJECT(button_ok) , "clicked" , | |
243 G_CALLBACK(i_cfg_ev_ignorespclen_enable_commit) , configwin_spc_ignorespclen_cbt ); | |
244 g_signal_connect_swapped( G_OBJECT(button_ok) , "clicked" , | |
245 G_CALLBACK(i_cfg_ev_incspcreverb_enable_commit) , configwin_spc_increverb_cbt ); | |
246 gtk_box_pack_start( GTK_BOX(configwin_spc_vbox) , | |
247 configwin_spc_ignorespclen_cbt , FALSE , FALSE , 0 ); | |
248 gtk_box_pack_start( GTK_BOX(configwin_spc_vbox) , | |
249 configwin_spc_increverb_cbt , FALSE , FALSE , 0 ); | |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
250 |
1532 | 251 // horizontal separator and buttons |
252 hbuttonbox = gtk_hbutton_box_new(); | |
253 gtk_button_box_set_layout( GTK_BUTTON_BOX(hbuttonbox) , GTK_BUTTONBOX_END ); | |
254 button_cancel = gtk_button_new_from_stock( GTK_STOCK_CANCEL ); | |
255 g_signal_connect_swapped( G_OBJECT(button_cancel) , "clicked" , | |
256 G_CALLBACK(gtk_widget_destroy) , configwin ); | |
257 gtk_container_add( GTK_CONTAINER(hbuttonbox) , button_cancel ); | |
258 g_signal_connect_swapped( G_OBJECT(button_ok) , "clicked" , | |
259 G_CALLBACK(i_cfg_ev_bok) , configwin ); | |
260 gtk_container_add( GTK_CONTAINER(hbuttonbox) , button_ok ); | |
261 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
|
262 |
1532 | 263 gtk_tooltips_set_tip( GTK_TOOLTIPS(tips) , configwin_gen_playback_deflen_spbt , |
264 _("The default song length, expressed in seconds, is used for songs " | |
265 "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
|
266 |
1532 | 267 gtk_widget_show_all( configwin ); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
268 } |