changeset 3269:91dd21cce4a5 trunk

merged with master
author Ben Tucker <ben.tucker@gmail.com>
date Sat, 04 Aug 2007 01:15:07 -0700
parents 8af43e099cce (current diff) 13360ebb72b3 (diff)
children 30ed2878807f
files
diffstat 5 files changed, 43 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/plugin.h	Sat Aug 04 01:13:08 2007 -0700
+++ b/src/audacious/plugin.h	Sat Aug 04 01:15:07 2007 -0700
@@ -51,7 +51,7 @@
 #define LOWLEVEL_PLUGIN(x) ((LowlevelPlugin *)(x))
 
 #define __AUDACIOUS_NEWVFS__
-#define __AUDACIOUS_PLUGIN_API__ 3
+#define __AUDACIOUS_PLUGIN_API__ 4
 #define __AUDACIOUS_INPUT_PLUGIN_API__ 4
 
 typedef enum {
@@ -108,16 +108,33 @@
 
 #define PLUGIN_MAGIC 0x8EAC8DE2
 
-#define DECLARE_PLUGIN(name, init, fini, ip_list, op_list, ep_list, gp_list, vp_list, dp_list) \
+#define DECLARE_PLUGIN(name, init, fini, ...) \
 	G_BEGIN_DECLS \
 	static PluginHeader _pluginInfo = { PLUGIN_MAGIC, __AUDACIOUS_PLUGIN_API__, \
-		(gchar *)#name, init, fini, NULL, ip_list, op_list, ep_list, gp_list, \
-		vp_list,dp_list }; \
+		(gchar *)#name, init, fini, NULL, __VA_ARGS__ }; \
 	G_MODULE_EXPORT PluginHeader *get_plugin_info(void) { \
 		return &_pluginInfo; \
 	} \
 	G_END_DECLS
 
+#define SIMPLE_INPUT_PLUGIN(name, ip_list) \
+    DECLARE_PLUGIN(name, NULL, NULL, ip_list)
+
+#define SIMPLE_OUTPUT_PLUGIN(name, op_list) \
+    DECLARE_PLUGIN(name, NULL, NULL, NULL, op_list)
+
+#define SIMPLE_EFFECT_PLUGIN(name, ep_list) \
+    DECLARE_PLUGIN(name, NULL, NULL, NULL, NULL, ep_list)
+
+#define SIMPLE_GENERAL_PLUGIN(name, gp_list) \
+    DECLARE_PLUGIN(name, NULL, NULL, NULL, NULL, NULL, gp_list)
+
+#define SIMPLE_VISUAL_PLUGIN(name, vp_list) \
+    DECLARE_PLUGIN(name, NULL, NULL, NULL, NULL, NULL, NULL, vp_list)
+
+#define SIMPLE_DISCOVER_PLUGIN(name, dp_list) \
+    DECLARE_PLUGIN(name, NULL, NULL, NULL, NULL, NULL, NULL, NULL, dp_list)
+
 /* Sadly, this is the most we can generalize out of the disparate
    plugin structs usable with typecasts - descender */
 struct _Plugin {
--- a/src/audacious/pluginenum.c	Sat Aug 04 01:13:08 2007 -0700
+++ b/src/audacious/pluginenum.c	Sat Aug 04 01:15:07 2007 -0700
@@ -250,11 +250,9 @@
     if (header->magic != PLUGIN_MAGIC)
         return plugin2_dispose(module, "plugin <%s> discarded, invalid module magic", filename);
 
-#if 0
     if (header->api_version != __AUDACIOUS_PLUGIN_API__)
         return plugin2_dispose(module, "plugin <%s> discarded, wanting API version %d, we implement API version %d",
                                filename, header->api_version, __AUDACIOUS_PLUGIN_API__);
-#endif
 
     if (header->init)
         header->init();
--- a/src/audacious/ui_credits.c	Sat Aug 04 01:13:08 2007 -0700
+++ b/src/audacious/ui_credits.c	Sat Aug 04 01:15:07 2007 -0700
@@ -53,6 +53,7 @@
     N_("Audacious core developers:"),
     "George Averill",
     "Daniel Barkalow",
+    "Christian Birchinger",
     "Daniel Bradshaw",
     "Adam Cecile",
     "Michael Färber",
@@ -91,7 +92,7 @@
     NULL,
 
     N_("Patch authors:"),
-    "Christian Birchinger",
+    "Massimo Cavalleri",
     "Laszlo Dvornik",
     "Ralf Ertzinger",
     "Mike Frysinger",
--- a/src/audacious/ui_equalizer.c	Sat Aug 04 01:13:08 2007 -0700
+++ b/src/audacious/ui_equalizer.c	Sat Aug 04 01:15:07 2007 -0700
@@ -385,13 +385,23 @@
     gint i, p = 0;
     EqualizerPreset *preset;
 
+    /* START mod: add check for the default presets locate in system path ({prefix}/share/audacious)
+       by Massimo Cavalleri (submax) */
+
     filename = g_build_filename(bmp_paths[BMP_PATH_USER_DIR], basename, NULL);
 
     if ((rcfile = bmp_rcfile_open(filename)) == NULL) {
         g_free(filename);
-        return NULL;
+        // DATA_DIR = "{prefix}/share/audacious" ; example is "/usr/share/audacious"
+        filename = g_build_filename(DATA_DIR, basename, NULL);
+        if ((rcfile = bmp_rcfile_open(filename)) == NULL) {
+           g_free(filename);
+           return NULL;
+        }
     }
 
+    // END mod
+
     g_free(filename);
 
     for (;;) {
--- a/src/audacious/ui_fileopener.c	Sat Aug 04 01:13:08 2007 -0700
+++ b/src/audacious/ui_fileopener.c	Sat Aug 04 01:15:07 2007 -0700
@@ -39,11 +39,12 @@
     Playlist *playlist = playlist_get_active();
 
     for (cur = files; cur; cur = g_slist_next(cur)) {
+        gchar *filename = g_filename_to_uri((const gchar *) cur->data, NULL, NULL);
 
         if (vfs_file_test(cur->data, G_FILE_TEST_IS_DIR)) {
-            playlist_add_dir(playlist, (const gchar *) cur->data);
+            playlist_add_dir(playlist, filename ? filename : (const gchar *) cur->data);
         } else {
-            playlist_add(playlist, (const gchar *) cur->data);
+            playlist_add(playlist, filename ? filename : (const gchar *) cur->data);
         }       
 
         if (++ctr == 20) {
@@ -51,6 +52,8 @@
             ctr = 0;
             while (gtk_events_pending() ) gtk_main_iteration();
         }
+
+        g_free(filename);
     } 
 
     playlistwin_update_list(playlist);
@@ -75,7 +78,7 @@
     play_button =
         GPOINTER_TO_INT(g_object_get_data(data, "play-button"));
 
-    files = gtk_file_chooser_get_uris(GTK_FILE_CHOOSER(chooser));
+    files = gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER(chooser));
     if (!files) return;
 
     if (play_button)
@@ -276,7 +279,9 @@
 
 
     while (files[ctr] != NULL) {
-        playlist_add(playlist, files[ctr++]);
+        gchar *filename = g_filename_to_uri((const gchar *) files[ctr++], NULL, NULL);
+        playlist_add(playlist, filename);
+        g_free(filename);
     }
     playlistwin_update_list(playlist);