Mercurial > audlegacy-plugins
comparison src/skins/ui_main_evlisteners.c @ 2640:dd255ad225f3
use more hooks
author | Tomasz Mon <desowin@gmail.com> |
---|---|
date | Fri, 23 May 2008 13:47:15 +0200 |
parents | 8e4af29f7e17 |
children | ba91ea50f214 |
comparison
equal
deleted
inserted
replaced
2639:6a881c49db96 | 2640:dd255ad225f3 |
---|---|
30 #include "visualization.h" | 30 #include "visualization.h" |
31 #endif | 31 #endif |
32 #include <audacious/plugin.h> | 32 #include <audacious/plugin.h> |
33 #if 0 | 33 #if 0 |
34 #include "ui_credits.h" | 34 #include "ui_credits.h" |
35 #endif | |
35 #include "ui_equalizer.h" | 36 #include "ui_equalizer.h" |
36 #include "ui_jumptotrack.h" | |
37 #endif | |
38 #include "ui_fileopener.h" | |
39 #include "ui_main.h" | 37 #include "ui_main.h" |
40 #if 0 | |
41 #include "ui_playlist.h" | 38 #include "ui_playlist.h" |
39 #if 0 | |
42 #include "ui_preferences.h" | 40 #include "ui_preferences.h" |
43 #endif | 41 #endif |
44 #include "ui_skinned_playstatus.h" | 42 #include "ui_skinned_playstatus.h" |
45 #include "ui_skinned_textbox.h" | 43 #include "ui_skinned_textbox.h" |
46 #include "ui_skinned_window.h" | 44 #include "ui_skinned_window.h" |
190 | 188 |
191 static void | 189 static void |
192 ui_main_evlistener_playlist_end_reached(gpointer hook_data, gpointer user_data) | 190 ui_main_evlistener_playlist_end_reached(gpointer hook_data, gpointer user_data) |
193 { | 191 { |
194 mainwin_clear_song_info(); | 192 mainwin_clear_song_info(); |
195 #if 0 | 193 |
196 if (cfg.stopaftersong) | 194 if (aud_cfg->stopaftersong) |
197 mainwin_set_stopaftersong(FALSE); | 195 mainwin_set_stopaftersong(FALSE); |
198 #endif | |
199 } | 196 } |
200 | 197 |
201 static void | 198 static void |
202 ui_main_evlistener_playlist_info_change(gpointer hook_data, gpointer user_data) | 199 ui_main_evlistener_playlist_info_change(gpointer hook_data, gpointer user_data) |
203 { | 200 { |
223 static void | 220 static void |
224 ui_main_evlistener_equalizerwin_show(gpointer hook_data, gpointer user_data) | 221 ui_main_evlistener_equalizerwin_show(gpointer hook_data, gpointer user_data) |
225 { | 222 { |
226 gboolean *show = (gboolean*)hook_data; | 223 gboolean *show = (gboolean*)hook_data; |
227 equalizerwin_show(*show); | 224 equalizerwin_show(*show); |
228 } | |
229 | |
230 static void | |
231 ui_main_evlistener_prefswin_show(gpointer hook_data, gpointer user_data) | |
232 { | |
233 #if 0 | |
234 gboolean *show = (gboolean*)hook_data; | |
235 if (*show == TRUE) | |
236 show_prefs_window(); | |
237 else | |
238 hide_prefs_window(); | |
239 #endif | |
240 } | |
241 | |
242 static void | |
243 ui_main_evlistener_aboutwin_show(gpointer hook_data, gpointer user_data) | |
244 { | |
245 #if 0 | |
246 gboolean *show = (gboolean*)hook_data; | |
247 if (*show == TRUE) | |
248 show_about_window(); | |
249 else | |
250 hide_about_window(); | |
251 #endif | |
252 } | |
253 | |
254 | |
255 static void | |
256 ui_main_evlistener_ui_jump_to_track_show(gpointer hook_data, gpointer user_data) | |
257 { | |
258 #if 0 | |
259 gboolean *show = (gboolean*)hook_data; | |
260 if (*show == TRUE) | |
261 ui_jump_to_track(); | |
262 else | |
263 ui_jump_to_track_hide(); | |
264 #endif | |
265 } | |
266 | |
267 static void | |
268 ui_main_evlistener_filebrowser_show(gpointer hook_data, gpointer user_data) | |
269 { | |
270 #if 0 | |
271 gboolean *play_button = (gboolean*)hook_data; | |
272 run_filebrowser(*play_button); | |
273 #endif | |
274 } | |
275 | |
276 static void | |
277 ui_main_evlistener_filebrowser_hide(gpointer hook_data, gpointer user_data) | |
278 { | |
279 #if 0 | |
280 hide_filebrowser(); | |
281 #endif | |
282 } | 225 } |
283 | 226 |
284 static void | 227 static void |
285 ui_main_evlistener_visualization_timeout(gpointer hook_data, gpointer user_data) | 228 ui_main_evlistener_visualization_timeout(gpointer hook_data, gpointer user_data) |
286 { | 229 { |
321 aud_hook_associate("playlist end reached", ui_main_evlistener_playlist_end_reached, NULL); | 264 aud_hook_associate("playlist end reached", ui_main_evlistener_playlist_end_reached, NULL); |
322 aud_hook_associate("playlist info change", ui_main_evlistener_playlist_info_change, NULL); | 265 aud_hook_associate("playlist info change", ui_main_evlistener_playlist_info_change, NULL); |
323 aud_hook_associate("mainwin set always on top", ui_main_evlistener_mainwin_set_always_on_top, NULL); | 266 aud_hook_associate("mainwin set always on top", ui_main_evlistener_mainwin_set_always_on_top, NULL); |
324 aud_hook_associate("mainwin show", ui_main_evlistener_mainwin_show, NULL); | 267 aud_hook_associate("mainwin show", ui_main_evlistener_mainwin_show, NULL); |
325 aud_hook_associate("equalizerwin show", ui_main_evlistener_equalizerwin_show, NULL); | 268 aud_hook_associate("equalizerwin show", ui_main_evlistener_equalizerwin_show, NULL); |
326 #if 0 | |
327 aud_hook_associate("prefswin show", ui_main_evlistener_prefswin_show, NULL); | |
328 aud_hook_associate("aboutwin show", ui_main_evlistener_aboutwin_show, NULL); | |
329 aud_hook_associate("ui jump to track show", ui_main_evlistener_ui_jump_to_track_show, NULL); | |
330 aud_hook_associate("filebrowser show", ui_main_evlistener_filebrowser_show, NULL); | |
331 aud_hook_associate("filebrowser hide", ui_main_evlistener_filebrowser_hide, NULL); | |
332 #endif | |
333 aud_hook_associate("visualization timeout", ui_main_evlistener_visualization_timeout, NULL); | 269 aud_hook_associate("visualization timeout", ui_main_evlistener_visualization_timeout, NULL); |
334 aud_hook_associate("config save", ui_main_evlistener_config_save, NULL); | 270 aud_hook_associate("config save", ui_main_evlistener_config_save, NULL); |
335 | 271 |
336 aud_hook_associate("playback audio error", (void *) mainwin_stop_pushed, NULL); | 272 aud_hook_associate("playback audio error", (void *) mainwin_stop_pushed, NULL); |
337 aud_hook_associate("playback audio error", (void *) run_no_output_device_dialog, NULL); | 273 aud_hook_associate("playback audio error", (void *) run_no_output_device_dialog, NULL); |
358 aud_hook_dissociate("equalizerwin show", ui_main_evlistener_equalizerwin_show); | 294 aud_hook_dissociate("equalizerwin show", ui_main_evlistener_equalizerwin_show); |
359 #if 0 | 295 #if 0 |
360 aud_hook_dissociate("prefswin show", ui_main_evlistener_prefswin_show); | 296 aud_hook_dissociate("prefswin show", ui_main_evlistener_prefswin_show); |
361 aud_hook_dissociate("aboutwin show", ui_main_evlistener_aboutwin_show); | 297 aud_hook_dissociate("aboutwin show", ui_main_evlistener_aboutwin_show); |
362 aud_hook_dissociate("ui jump to track show", ui_main_evlistener_ui_jump_to_track_show); | 298 aud_hook_dissociate("ui jump to track show", ui_main_evlistener_ui_jump_to_track_show); |
363 aud_hook_dissociate("filebrowser show", ui_main_evlistener_filebrowser_show); | |
364 aud_hook_dissociate("filebrowser hide", ui_main_evlistener_filebrowser_hide); | |
365 #endif | 299 #endif |
366 aud_hook_dissociate("visualization timeout", ui_main_evlistener_visualization_timeout); | 300 aud_hook_dissociate("visualization timeout", ui_main_evlistener_visualization_timeout); |
367 aud_hook_dissociate("config save", ui_main_evlistener_config_save); | 301 aud_hook_dissociate("config save", ui_main_evlistener_config_save); |
368 | 302 |
369 aud_hook_dissociate("playback audio error", (void *) mainwin_stop_pushed); | 303 aud_hook_dissociate("playback audio error", (void *) mainwin_stop_pushed); |