Mercurial > audlegacy-plugins
annotate src/skins/ui_playlist_evlisteners.c @ 3123:a2093254960a
Sanity check to work around a WMA decoding error.
author | John Lindgren <john.lindgren@tds.net> |
---|---|
date | Wed, 06 May 2009 12:11:06 -0400 |
parents | 8e4af29f7e17 |
children | 1ffcad5f406c |
rev | line source |
---|---|
2620 | 1 /* |
2 * Audacious | |
3 * Copyright (c) 2006-2007 Audacious development team. | |
4 * | |
5 * This program is free software; you can redistribute it and/or modify | |
6 * it under the terms of the GNU General Public License as published by | |
7 * the Free Software Foundation; under version 3 of the License. | |
8 * | |
9 * This program is distributed in the hope that it will be useful, | |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 * GNU General Public License for more details. | |
13 * | |
14 * You should have received a copy of the GNU General Public License | |
15 * along with this program. If not, see <http://www.gnu.org/licenses>. | |
16 * | |
17 * The Audacious team does not consider modular code linking to | |
18 * Audacious or using our public API to be a derived work. | |
19 */ | |
20 | |
21 #include "ui_playlist_evlisteners.h" | |
22 | |
23 #include <glib.h> | |
24 #if 0 | |
25 #include "hook.h" | |
26 #include "playlist.h" | |
27 #endif | |
28 #include "ui_playlist.h" | |
29 #if 0 | |
30 #include "ui_playlist_manager.h" | |
31 #endif | |
32 static void | |
33 ui_playlist_evlistener_playlist_update(gpointer hook_data, gpointer user_data) | |
34 { | |
35 Playlist *playlist = (Playlist *) hook_data; | |
36 if (playlist != NULL) | |
37 playlistwin_update_list(playlist); | |
38 #if 0 | |
39 playlist_manager_update(); | |
40 #endif | |
41 } | |
42 | |
43 static void | |
44 ui_playlist_evlistener_playlistwin_show(gpointer hook_data, gpointer user_data) | |
45 { | |
46 gboolean *show = (gboolean*)hook_data; | |
47 if (*show == TRUE) | |
48 playlistwin_show(); | |
49 else | |
50 playlistwin_hide(); | |
51 } | |
52 | |
53 void ui_playlist_evlistener_init(void) | |
54 { | |
55 aud_hook_associate("playlist update", ui_playlist_evlistener_playlist_update, NULL); | |
56 aud_hook_associate("playlistwin show", ui_playlist_evlistener_playlistwin_show, NULL); | |
57 } | |
2633
8e4af29f7e17
dissociate hooks at plugin cleanup
Tomasz Mon <desowin@gmail.com>
parents:
2620
diff
changeset
|
58 |
8e4af29f7e17
dissociate hooks at plugin cleanup
Tomasz Mon <desowin@gmail.com>
parents:
2620
diff
changeset
|
59 void ui_playlist_evlistener_dissociate(void) |
8e4af29f7e17
dissociate hooks at plugin cleanup
Tomasz Mon <desowin@gmail.com>
parents:
2620
diff
changeset
|
60 { |
8e4af29f7e17
dissociate hooks at plugin cleanup
Tomasz Mon <desowin@gmail.com>
parents:
2620
diff
changeset
|
61 aud_hook_dissociate("playlist update", ui_playlist_evlistener_playlist_update); |
8e4af29f7e17
dissociate hooks at plugin cleanup
Tomasz Mon <desowin@gmail.com>
parents:
2620
diff
changeset
|
62 aud_hook_dissociate("playlistwin show", ui_playlist_evlistener_playlistwin_show); |
8e4af29f7e17
dissociate hooks at plugin cleanup
Tomasz Mon <desowin@gmail.com>
parents:
2620
diff
changeset
|
63 } |
8e4af29f7e17
dissociate hooks at plugin cleanup
Tomasz Mon <desowin@gmail.com>
parents:
2620
diff
changeset
|
64 |