Mercurial > audlegacy-plugins
diff src/skins/ui_main.c @ 2640:dd255ad225f3
use more hooks
author | Tomasz Mon <desowin@gmail.com> |
---|---|
date | Fri, 23 May 2008 13:47:15 +0200 |
parents | 6a881c49db96 |
children | c2603047a1a3 |
line wrap: on
line diff
--- a/src/skins/ui_main.c Fri May 23 12:36:47 2008 +0200 +++ b/src/skins/ui_main.c Fri May 23 13:47:15 2008 +0200 @@ -65,17 +65,13 @@ #include "playlist.h" #include "pluginenum.h" #include "strings.h" -#include "ui_credits.h" #include "ui_dock.h" -#include "ui_jumptotrack.h" #include "ui_main_evlisteners.h" -#include "ui_preferences.h" #include "ui_skinselector.h" #include "ui_urlopener.h" #include "util.h" #include "visualization.h" #endif -#include "ui_fileopener.h" #include "ui_skinned_window.h" #include "ui_skinned_button.h" #include "ui_skinned_textbox.h" @@ -874,9 +870,7 @@ aud_playlist_next(playlist); break; case GDK_KP_Insert: -#if 0 - ui_jump_to_track(); -#endif + audacious_drct_jtf_show(); break; case GDK_Return: case GDK_KP_Enter: @@ -1285,7 +1279,7 @@ void mainwin_eject_pushed(void) { - run_filebrowser(PLAY_BUTTON); + action_play_file(); } void @@ -1765,17 +1759,17 @@ Playlist *playlist = aud_playlist_get_active(); switch (action) { -#if 0 case MAINWIN_GENERAL_PREFS: - show_prefs_window(); + action_preferences(); break; case MAINWIN_GENERAL_ABOUT: - show_about_window(); + action_about_audacious(); break; -#endif - case MAINWIN_GENERAL_PLAYFILE: - run_filebrowser(NO_PLAY_BUTTON); + case MAINWIN_GENERAL_PLAYFILE: { + gboolean button = FALSE; /* FALSE = NO_PLAY_BUTTON */ + aud_hook_call("filebrowser show", &button); break; + } case MAINWIN_GENERAL_PLAYLOCATION: mainwin_show_add_url_window(); break; @@ -1834,9 +1828,7 @@ mainwin_jump_to_time(); break; case MAINWIN_GENERAL_JTF: -#if 0 - ui_jump_to_track(); -#endif + audacious_drct_jtf_show(); break; case MAINWIN_GENERAL_EXIT: mainwin_quit_cb(); @@ -2370,9 +2362,8 @@ mainwin_about = ui_skinned_button_new(); ui_skinned_small_button_setup(mainwin_about, SKINNED_WINDOW(mainwin)->fixed, 247, 83, 20, 25); -#if 0 - g_signal_connect(mainwin_about, "clicked", show_about_window, NULL); -#endif + g_signal_connect(mainwin_about, "clicked", G_CALLBACK(action_about_audacious), NULL); + mainwin_vis = ui_vis_new(SKINNED_WINDOW(mainwin)->fixed, 24, 43, 76); g_signal_connect(mainwin_vis, "button-press-event", G_CALLBACK(mainwin_vis_cb), NULL); mainwin_svis = ui_svis_new(SKINNED_WINDOW(mainwin)->fixed, 79, 5); @@ -2755,15 +2746,15 @@ void action_about_audacious( void ) { -#if 0 - show_about_window(); -#endif + gboolean show = TRUE; + aud_hook_call("aboutwin show", &show); } void action_play_file( void ) { - run_filebrowser(PLAY_BUTTON); + gboolean button = TRUE; /* TRUE = PLAY_BUTTON */ + aud_hook_call("filebrowser show", &button); } void @@ -2820,9 +2811,7 @@ void action_jump_to_file( void ) { -#if 0 - ui_jump_to_track(); -#endif + audacious_drct_jtf_show(); } void @@ -2873,9 +2862,8 @@ void action_preferences( void ) { -#if 0 - show_prefs_window(); -#endif + gboolean show = TRUE; + aud_hook_call("prefswin show", &show); } void