Mercurial > audlegacy
annotate src/audacious/ui_playlist_evlisteners.c @ 4544:084dbc8d23da
removed variable "has_x11_connection" from main.c, needed to hookify some functions therefore
author | mf0102 <0102@gmx.at> |
---|---|
date | Mon, 12 May 2008 23:01:06 +0200 |
parents | 6e412073cf28 |
children |
rev | line source |
---|---|
4506 | 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 | |
25 #include "hook.h" | |
26 #include "playlist.h" | |
27 #include "ui_playlist.h" | |
4516 | 28 #include "ui_playlist_manager.h" |
4506 | 29 |
30 static void | |
4516 | 31 ui_playlist_evlistener_playlist_update(gpointer hook_data, gpointer user_data) |
4506 | 32 { |
33 Playlist *playlist = (Playlist *) hook_data; | |
4516 | 34 if (playlist != NULL) |
35 playlistwin_update_list(playlist); | |
4506 | 36 |
4516 | 37 playlist_manager_update(); |
4506 | 38 } |
39 | |
4544
084dbc8d23da
removed variable "has_x11_connection" from main.c, needed to hookify some functions therefore
mf0102 <0102@gmx.at>
parents:
4517
diff
changeset
|
40 static void |
084dbc8d23da
removed variable "has_x11_connection" from main.c, needed to hookify some functions therefore
mf0102 <0102@gmx.at>
parents:
4517
diff
changeset
|
41 ui_playlist_evlistener_playlistwin_show(gpointer hook_data, gpointer user_data) |
084dbc8d23da
removed variable "has_x11_connection" from main.c, needed to hookify some functions therefore
mf0102 <0102@gmx.at>
parents:
4517
diff
changeset
|
42 { |
084dbc8d23da
removed variable "has_x11_connection" from main.c, needed to hookify some functions therefore
mf0102 <0102@gmx.at>
parents:
4517
diff
changeset
|
43 gboolean *show = (gboolean*)hook_data; |
084dbc8d23da
removed variable "has_x11_connection" from main.c, needed to hookify some functions therefore
mf0102 <0102@gmx.at>
parents:
4517
diff
changeset
|
44 if (*show == TRUE) |
084dbc8d23da
removed variable "has_x11_connection" from main.c, needed to hookify some functions therefore
mf0102 <0102@gmx.at>
parents:
4517
diff
changeset
|
45 playlistwin_show(); |
084dbc8d23da
removed variable "has_x11_connection" from main.c, needed to hookify some functions therefore
mf0102 <0102@gmx.at>
parents:
4517
diff
changeset
|
46 else |
084dbc8d23da
removed variable "has_x11_connection" from main.c, needed to hookify some functions therefore
mf0102 <0102@gmx.at>
parents:
4517
diff
changeset
|
47 playlistwin_hide(); |
084dbc8d23da
removed variable "has_x11_connection" from main.c, needed to hookify some functions therefore
mf0102 <0102@gmx.at>
parents:
4517
diff
changeset
|
48 } |
084dbc8d23da
removed variable "has_x11_connection" from main.c, needed to hookify some functions therefore
mf0102 <0102@gmx.at>
parents:
4517
diff
changeset
|
49 |
4507 | 50 void ui_playlist_evlistener_init(void) |
4506 | 51 { |
4544
084dbc8d23da
removed variable "has_x11_connection" from main.c, needed to hookify some functions therefore
mf0102 <0102@gmx.at>
parents:
4517
diff
changeset
|
52 hook_associate("playlist update", ui_playlist_evlistener_playlist_update, NULL); |
084dbc8d23da
removed variable "has_x11_connection" from main.c, needed to hookify some functions therefore
mf0102 <0102@gmx.at>
parents:
4517
diff
changeset
|
53 hook_associate("playlistwin show", ui_playlist_evlistener_playlistwin_show, NULL); |
4517 | 54 } |