changeset 2818:b30ca704f38a

Automated merge with ssh://hg.atheme-project.org//hg//audacious-plugins
author Calin Crisan ccrisan@gmail.com
date Sun, 13 Jul 2008 14:42:54 +0300
parents a7a260032a5e (diff) 779125caa3ac (current diff)
children 2f7194224392
files
diffstat 4 files changed, 17 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/src/skins/plugin.c	Sun Jul 13 14:42:27 2008 +0300
+++ b/src/skins/plugin.c	Sun Jul 13 14:42:54 2008 +0300
@@ -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();
--- a/src/skins/plugin.h	Sun Jul 13 14:42:27 2008 +0300
+++ b/src/skins/plugin.h	Sun Jul 13 14:42:54 2008 +0300
@@ -39,6 +39,7 @@
 };
 
 extern gchar *skins_paths[];
+extern Interface skins_interface;
 
 gboolean skins_init(void);
 gboolean skins_cleanup(void);
--- a/src/skins/ui_main.c	Sun Jul 13 14:42:27 2008 +0300
+++ b/src/skins/ui_main.c	Sun Jul 13 14:42:54 2008 +0300
@@ -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
--- a/src/skins/ui_playlist.c	Sun Jul 13 14:42:27 2008 +0300
+++ b/src/skins/ui_playlist.c	Sun Jul 13 14:42:54 2008 +0300
@@ -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