Mercurial > audlegacy
comparison src/audacious/ui_main_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 | 867d7caeb95b |
children | d4c5719d30d1 |
comparison
equal
deleted
inserted
replaced
4543:ed94ac6182df | 4544:084dbc8d23da |
---|---|
27 #include "playback.h" | 27 #include "playback.h" |
28 #include "playlist.h" | 28 #include "playlist.h" |
29 #include "playlist_evmessages.h" | 29 #include "playlist_evmessages.h" |
30 #include "visualization.h" | 30 #include "visualization.h" |
31 | 31 |
32 #include "ui_credits.h" | |
33 #include "ui_equalizer.h" | |
34 #include "ui_fileopener.h" | |
35 #include "ui_jumptotrack.h" | |
32 #include "ui_main.h" | 36 #include "ui_main.h" |
33 #include "ui_equalizer.h" | 37 #include "ui_playlist.h" |
38 #include "ui_preferences.h" | |
34 #include "ui_skinned_playstatus.h" | 39 #include "ui_skinned_playstatus.h" |
35 #include "ui_skinned_textbox.h" | 40 #include "ui_skinned_textbox.h" |
36 #include "ui_skinned_window.h" | 41 #include "ui_skinned_window.h" |
37 #include "ui_playlist.h" | |
38 | 42 |
39 static gint song_info_timeout_source = 0; | 43 static gint song_info_timeout_source = 0; |
40 static gint update_vis_timeout_source = 0; | 44 static gint update_vis_timeout_source = 0; |
41 | 45 |
42 /* XXX: there has to be a better way than polling here! */ | 46 /* XXX: there has to be a better way than polling here! */ |
189 | 193 |
190 g_free(msg); | 194 g_free(msg); |
191 } | 195 } |
192 | 196 |
193 static void | 197 static void |
198 ui_main_evlistener_mainwin_set_always_on_top(gpointer hook_data, gpointer user_data) | |
199 { | |
200 gboolean *ontop = (gboolean*)hook_data; | |
201 mainwin_set_always_on_top(*ontop); | |
202 } | |
203 | |
204 static void | |
205 ui_main_evlistener_mainwin_show(gpointer hook_data, gpointer user_data) | |
206 { | |
207 gboolean *show = (gboolean*)hook_data; | |
208 mainwin_show(*show); | |
209 } | |
210 | |
211 static void | |
212 ui_main_evlistener_equalizerwin_show(gpointer hook_data, gpointer user_data) | |
213 { | |
214 gboolean *show = (gboolean*)hook_data; | |
215 equalizerwin_show(*show); | |
216 } | |
217 | |
218 static void | |
219 ui_main_evlistener_prefswin_show(gpointer hook_data, gpointer user_data) | |
220 { | |
221 gboolean *show = (gboolean*)hook_data; | |
222 if (*show == TRUE) | |
223 show_prefs_window(); | |
224 else | |
225 hide_prefs_window(); | |
226 } | |
227 | |
228 static void | |
229 ui_main_evlistener_aboutwin_show(gpointer hook_data, gpointer user_data) | |
230 { | |
231 gboolean *show = (gboolean*)hook_data; | |
232 if (*show == TRUE) | |
233 show_about_window(); | |
234 else | |
235 hide_about_window(); | |
236 } | |
237 | |
238 | |
239 static void | |
240 ui_main_evlistener_ui_jump_to_track_show(gpointer hook_data, gpointer user_data) | |
241 { | |
242 gboolean *show = (gboolean*)hook_data; | |
243 if (*show == TRUE) | |
244 ui_jump_to_track(); | |
245 else | |
246 ui_jump_to_track_hide(); | |
247 } | |
248 | |
249 static void | |
250 ui_main_evlistener_filebrowser_show(gpointer hook_data, gpointer user_data) | |
251 { | |
252 gboolean *play_button = (gboolean*)hook_data; | |
253 run_filebrowser(*play_button); | |
254 } | |
255 | |
256 static void | |
257 ui_main_evlistener_filebrowser_hide(gpointer hook_data, gpointer user_data) | |
258 { | |
259 hide_filebrowser(); | |
260 } | |
261 | |
262 static void | |
194 ui_main_evlistener_config_save(gpointer hook_data, gpointer user_data) | 263 ui_main_evlistener_config_save(gpointer hook_data, gpointer user_data) |
195 { | 264 { |
196 ConfigDb *db = (ConfigDb *) hook_data; | 265 ConfigDb *db = (ConfigDb *) hook_data; |
197 | 266 |
198 if (SKINNED_WINDOW(mainwin)->x != -1 && | 267 if (SKINNED_WINDOW(mainwin)->x != -1 && |
219 hook_associate("playback unpause", ui_main_evlistener_playback_unpause, NULL); | 288 hook_associate("playback unpause", ui_main_evlistener_playback_unpause, NULL); |
220 hook_associate("playback seek", ui_main_evlistener_playback_seek, NULL); | 289 hook_associate("playback seek", ui_main_evlistener_playback_seek, NULL); |
221 hook_associate("playback play file", ui_main_evlistener_playback_play_file, NULL); | 290 hook_associate("playback play file", ui_main_evlistener_playback_play_file, NULL); |
222 hook_associate("playlist end reached", ui_main_evlistener_playlist_end_reached, NULL); | 291 hook_associate("playlist end reached", ui_main_evlistener_playlist_end_reached, NULL); |
223 hook_associate("playlist info change", ui_main_evlistener_playlist_info_change, NULL); | 292 hook_associate("playlist info change", ui_main_evlistener_playlist_info_change, NULL); |
293 hook_associate("mainwin set always on top", ui_main_evlistener_mainwin_set_always_on_top, NULL); | |
294 hook_associate("mainwin show", ui_main_evlistener_mainwin_show, NULL); | |
295 hook_associate("equalizerwin show", ui_main_evlistener_equalizerwin_show, NULL); | |
296 hook_associate("prefswin show", ui_main_evlistener_prefswin_show, NULL); | |
297 hook_associate("aboutwin show", ui_main_evlistener_aboutwin_show, NULL); | |
298 hook_associate("ui jump to track show", ui_main_evlistener_ui_jump_to_track_show, NULL); | |
299 hook_associate("filebrowser show", ui_main_evlistener_filebrowser_show, NULL); | |
300 hook_associate("filebrowser hide", ui_main_evlistener_filebrowser_hide, NULL); | |
224 hook_associate("config save", ui_main_evlistener_config_save, NULL); | 301 hook_associate("config save", ui_main_evlistener_config_save, NULL); |
225 } | 302 } |
226 | 303 |