80 |
80 |
aud_set_bool (nullptr, "equalizer_active", button->get_active ());
|
81 |
81 |
}
|
82 |
82 |
|
|
83 |
static void eq_preset_cb (Button * button, GdkEventButton * event)
|
|
84 |
{
|
|
85 |
audgui_show_eq_preset_window ();
|
|
86 |
button->set_active (aud_get_bool ("audacious", "equalizer_songauto"));
|
|
87 |
}
|
|
88 |
|
|
89 |
static void eq_auto_cb (Button * button, GdkEventButton * event)
|
|
90 |
{
|
|
91 |
aud_set_bool (nullptr, "equalizer_autoload", button->get_active ());
|
|
92 |
}
|
|
93 |
|
83 |
94 |
static void update_from_config (void *, void *)
|
84 |
95 |
{
|
85 |
96 |
equalizerwin_on->set_active (aud_get_bool (nullptr, "equalizer_active"));
|
|
97 |
equalizerwin_auto->set_active (aud_get_bool (nullptr, "equalizer_autoload"));
|
86 |
98 |
equalizerwin_preamp->set_value (aud_get_double (nullptr, "equalizer_preamp"));
|
|
99 |
equalizerwin_presets->set_active (aud_get_bool ("audacious", "equalizer_songauto"));
|
87 |
100 |
|
88 |
101 |
double bands[AUD_EQ_NBANDS];
|
89 |
102 |
aud_eq_get_bands (bands);
|
... | ... | |
189 |
202 |
|
190 |
203 |
static void equalizerwin_create_widgets ()
|
191 |
204 |
{
|
|
205 |
/* w, h, offx, offy, offpressedx, y, activex, activey, onpressedx, y */
|
192 |
206 |
equalizerwin_on = new Button (25, 12, 10, 119, 128, 119, 69, 119, 187, 119, SKIN_EQMAIN, SKIN_EQMAIN);
|
193 |
207 |
equalizerwin->put_widget (false, equalizerwin_on, 14, 18);
|
194 |
208 |
equalizerwin_on->set_active (aud_get_bool (nullptr, "equalizer_active"));
|
... | ... | |
197 |
211 |
// AUTO button currently does nothing
|
198 |
212 |
equalizerwin_auto = new Button (33, 12, 35, 119, 153, 119, 94, 119, 212, 119, SKIN_EQMAIN, SKIN_EQMAIN);
|
199 |
213 |
equalizerwin->put_widget (false, equalizerwin_auto, 39, 18);
|
|
214 |
// JWT:NEXT 2 ADDED TO RESTORE [Auto] BUTTON ON EQUALIZER:
|
|
215 |
equalizerwin_auto->set_active (aud_get_bool (nullptr, "equalizer_autoload"));
|
|
216 |
equalizerwin_auto->on_release (eq_auto_cb);
|
200 |
217 |
|
201 |
|
equalizerwin_presets = new Button (44, 12, 224, 164, 224, 176, SKIN_EQMAIN, SKIN_EQMAIN);
|
|
218 |
equalizerwin_presets = new Button (44, 12, 224, 164, 224, 176, 224, 176, 224, 164, SKIN_EQMAIN, SKIN_EQMAIN);
|
202 |
219 |
equalizerwin->put_widget (false, equalizerwin_presets, 217, 18);
|
203 |
|
equalizerwin_presets->on_release ((ButtonCB) audgui_show_eq_preset_window);
|
|
220 |
// JWT:NEXT ADDED TO SET BUTTON TO ACTIVE IF SONG USING SONG-SPECIFIC EQ PRESET FILE:
|
|
221 |
equalizerwin_presets->set_active (aud_get_bool ("audacious", "equalizer_songauto"));
|
|
222 |
equalizerwin_presets->on_release (eq_preset_cb);
|
204 |
223 |
|
205 |
224 |
equalizerwin_close = new Button (9, 9, 0, 116, 0, 125, SKIN_EQMAIN, SKIN_EQMAIN);
|
206 |
225 |
equalizerwin->put_widget (false, equalizerwin_close, 264, 3);
|
... | ... | |
268 |
287 |
shaded = false;
|
269 |
288 |
|
270 |
289 |
equalizerwin = new EqWindow (shaded);
|
271 |
|
equalizerwin->setWindowTitle (_("Audacious Equalizer"));
|
|
290 |
equalizerwin->setWindowTitle (_("Fauxdacious Equalizer"));
|
272 |
291 |
}
|
273 |
292 |
|
274 |
293 |
void equalizerwin_unhook ()
|
... | ... | |
276 |
295 |
hook_dissociate ("set equalizer_active", (HookFunction) update_from_config);
|
277 |
296 |
hook_dissociate ("set equalizer_bands", (HookFunction) update_from_config);
|
278 |
297 |
hook_dissociate ("set equalizer_preamp", (HookFunction) update_from_config);
|
|
298 |
hook_dissociate ("set equalizer_presets", (HookFunction) update_from_config);
|
279 |
299 |
}
|
280 |
300 |
|
281 |
301 |
void equalizerwin_create ()
|
... | ... | |
286 |
306 |
hook_associate ("set equalizer_active", (HookFunction) update_from_config, nullptr);
|
287 |
307 |
hook_associate ("set equalizer_bands", (HookFunction) update_from_config, nullptr);
|
288 |
308 |
hook_associate ("set equalizer_preamp", (HookFunction) update_from_config, nullptr);
|
|
309 |
hook_associate ("set equalizer_presets", (HookFunction) update_from_config, nullptr);
|
289 |
310 |
}
|