# HG changeset patch # User Tomasz Mon # Date 1215947163 -7200 # Node ID a7a260032a5e575793fe69f69d93765cb9e8758a # Parent cc6f024246097179f4aae2450aa1fa845f017441 use InterfaceOps diff -r cc6f02424609 -r a7a260032a5e src/skins/plugin.c --- a/src/skins/plugin.c Sun Jul 13 04:00:04 2008 +0300 +++ b/src/skins/plugin.c Sun Jul 13 13:06:03 2008 +0200 @@ -31,17 +31,17 @@ gchar *skins_paths[SKINS_PATH_COUNT] = {}; -static Interface skins_gp = +Interface skins_interface = { .id = "skinned", .desc = "Audacious Skinned GUI", .init = skins_init, - .fini = skins_cleanup, - .conf = skins_configure + .fini = skins_cleanup }; -SIMPLE_INTERFACE_PLUGIN("skinned", &skins_gp); +SIMPLE_INTERFACE_PLUGIN("skinned", &skins_interface); gboolean plugin_is_active = FALSE; +static GtkWidget *cfgdlg; static void skins_free_paths(void) { int i; @@ -86,6 +86,10 @@ init_skins(config.skin); mainwin_setup_menus(); + skins_interface.ops->create_prefs_window(); + cfgdlg = skins_configure(); + aud_prefswin_page_new(cfgdlg, N_("Skinned Interface"), DATA_DIR "/images/appearance.png"); + aud_hook_call("create prefswin", NULL); if (config.player_visible) mainwin_real_show(); diff -r cc6f02424609 -r a7a260032a5e src/skins/plugin.h --- a/src/skins/plugin.h Sun Jul 13 04:00:04 2008 +0300 +++ b/src/skins/plugin.h Sun Jul 13 13:06:03 2008 +0200 @@ -39,6 +39,7 @@ }; extern gchar *skins_paths[]; +extern Interface skins_interface; gboolean skins_init(void); gboolean skins_cleanup(void); diff -r cc6f02424609 -r a7a260032a5e src/skins/ui_main.c --- a/src/skins/ui_main.c Sun Jul 13 04:00:04 2008 +0300 +++ b/src/skins/ui_main.c Sun Jul 13 13:06:03 2008 +0200 @@ -57,6 +57,7 @@ #include "ui_playlist.h" #include "ui_hints.h" #include "dnd.h" +#include "plugin.h" #if 0 #include "configdb.h" #include "input.h" @@ -1697,8 +1698,7 @@ action_about_audacious(); break; case MAINWIN_GENERAL_PLAYFILE: { - gboolean button = FALSE; /* FALSE = NO_PLAY_BUTTON */ - aud_hook_call("filebrowser show", &button); + skins_interface.ops->filebrowser_show(FALSE); /* FALSE = NO_PLAY_BUTTON */ break; } case MAINWIN_GENERAL_PLAYLOCATION: @@ -2702,14 +2702,13 @@ void action_play_file( void ) { - gboolean button = TRUE; /* TRUE = PLAY_BUTTON */ - aud_hook_call("filebrowser show", &button); + skins_interface.ops->filebrowser_show(TRUE); /* TRUE = PLAY_BUTTON */ } void action_play_location( void ) { - aud_hook_call("urlopener show", NULL); + skins_interface.ops->urlopener_show(); } void @@ -2811,8 +2810,7 @@ void action_preferences( void ) { - gboolean show = TRUE; - aud_hook_call("prefswin show", &show); + skins_interface.ops->show_prefs_window(); } void diff -r cc6f02424609 -r a7a260032a5e src/skins/ui_playlist.c --- a/src/skins/ui_playlist.c Sun Jul 13 04:00:04 2008 +0300 +++ b/src/skins/ui_playlist.c Sun Jul 13 13:06:03 2008 +0200 @@ -41,6 +41,7 @@ #include "actions-playlist.h" #include "dnd.h" +#include "plugin.h" #if 0 #include "input.h" #include "main.h" @@ -1793,14 +1794,13 @@ void action_playlist_add_files(void) { - gboolean button = FALSE; /* FALSE = NO_PLAY_BUTTON */ - aud_hook_call("filebrowser show", &button); + skins_interface.ops->filebrowser_show(FALSE); /* FALSE = NO_PLAY_BUTTON */ } void action_playlist_add_url(void) { - aud_hook_call("urlopener show", NULL); + skins_interface.ops->urlopener_show(); } void