changeset 3238:ceaaadccfa00

Add a system path for default presets. Patch by: Massimo Cavalleri
author William Pitcock <nenolod@atheme-project.org>
date Sat, 04 Aug 2007 03:02:38 -0500
parents 74a999f3f4d2
children d2eec0a406e9
files src/audacious/ui_equalizer.c
diffstat 1 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/ui_equalizer.c	Fri Aug 03 22:17:41 2007 -0500
+++ b/src/audacious/ui_equalizer.c	Sat Aug 04 03:02:38 2007 -0500
@@ -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 (;;) {