Mercurial > audlegacy
comparison src/audacious/ui_main_evlisteners.c @ 4586:5fa09aa0b14a
add equalizer changed hook
author | Tomasz Mon <desowin@gmail.com> |
---|---|
date | Fri, 23 May 2008 15:37:45 +0200 |
parents | 78e21c07ba6a |
children | a77d02342ee1 |
comparison
equal
deleted
inserted
replaced
4585:78e21c07ba6a | 4586:5fa09aa0b14a |
---|---|
104 { | 104 { |
105 PlaylistEntry *entry = (PlaylistEntry*)hook_data; | 105 PlaylistEntry *entry = (PlaylistEntry*)hook_data; |
106 g_return_if_fail(entry != NULL); | 106 g_return_if_fail(entry != NULL); |
107 | 107 |
108 equalizerwin_load_auto_preset(entry->filename); | 108 equalizerwin_load_auto_preset(entry->filename); |
109 input_set_eq(cfg.equalizer_active, cfg.equalizer_preamp, | 109 hook_call("equalizer changed", NULL); |
110 cfg.equalizer_bands); | |
111 output_set_eq(cfg.equalizer_active, cfg.equalizer_preamp, | |
112 cfg.equalizer_bands); | |
113 | 110 |
114 ui_vis_clear_data(mainwin_vis); | 111 ui_vis_clear_data(mainwin_vis); |
115 ui_svis_clear_data(mainwin_svis); | 112 ui_svis_clear_data(mainwin_svis); |
116 mainwin_disable_seekbar(); | 113 mainwin_disable_seekbar(); |
117 mainwin_update_song_info(); | 114 mainwin_update_song_info(); |
280 cfg_db_set_int(db, NULL, "player_y", SKINNED_WINDOW(mainwin)->y); | 277 cfg_db_set_int(db, NULL, "player_y", SKINNED_WINDOW(mainwin)->y); |
281 } | 278 } |
282 | 279 |
283 cfg_db_set_bool(db, NULL, "mainwin_use_bitmapfont", | 280 cfg_db_set_bool(db, NULL, "mainwin_use_bitmapfont", |
284 cfg.mainwin_use_bitmapfont); | 281 cfg.mainwin_use_bitmapfont); |
282 } | |
283 | |
284 static void | |
285 ui_main_evlistener_equalizer_changed(gpointer hook_data, gpointer user_data) | |
286 { | |
287 /* um .. i think we need both of these for xmms compatibility .. | |
288 not sure. -larne */ | |
289 input_set_eq(cfg.equalizer_active, cfg.equalizer_preamp, | |
290 cfg.equalizer_bands); | |
291 output_set_eq(cfg.equalizer_active, cfg.equalizer_preamp, | |
292 cfg.equalizer_bands); | |
285 } | 293 } |
286 | 294 |
287 void | 295 void |
288 ui_main_evlistener_init(void) | 296 ui_main_evlistener_init(void) |
289 { | 297 { |
307 hook_associate("ui jump to track show", ui_main_evlistener_ui_jump_to_track_show, NULL); | 315 hook_associate("ui jump to track show", ui_main_evlistener_ui_jump_to_track_show, NULL); |
308 hook_associate("filebrowser show", ui_main_evlistener_filebrowser_show, NULL); | 316 hook_associate("filebrowser show", ui_main_evlistener_filebrowser_show, NULL); |
309 hook_associate("filebrowser hide", ui_main_evlistener_filebrowser_hide, NULL); | 317 hook_associate("filebrowser hide", ui_main_evlistener_filebrowser_hide, NULL); |
310 hook_associate("visualization timeout", ui_main_evlistener_visualization_timeout, NULL); | 318 hook_associate("visualization timeout", ui_main_evlistener_visualization_timeout, NULL); |
311 hook_associate("config save", ui_main_evlistener_config_save, NULL); | 319 hook_associate("config save", ui_main_evlistener_config_save, NULL); |
312 } | 320 |
313 | 321 hook_associate("equalizer changed", ui_main_evlistener_equalizer_changed, NULL); |
322 } | |
323 |