Mercurial > audlegacy-plugins
changeset 436:a668576342e0 trunk
[svn] - make amidi-plug use audacious_get_localdir()
author | giacomo |
---|---|
date | Mon, 15 Jan 2007 12:46:38 -0800 |
parents | c18fd1befd1f |
children | e1c6b223431e |
files | ChangeLog src/amidi-plug/i_configure.c |
diffstat | 2 files changed, 24 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Jan 15 12:38:45 2007 -0800 +++ b/ChangeLog Mon Jan 15 12:46:38 2007 -0800 @@ -1,3 +1,11 @@ +2007-01-15 20:38:45 +0000 Giacomo Lozito <james@develia.org> + revision [954] + - added audacious_get_localdir() in util.c/h, returns a string with the full path of audacious local datadir + trunk/src/evdev-plug/ed_common.h | 1 - + trunk/src/evdev-plug/ed_internals.c | 19 +++++++++++++------ + 2 files changed, 13 insertions(+), 7 deletions(-) + + 2007-01-15 20:02:09 +0000 Giacomo Lozito <james@develia.org> revision [952] - add missing config.h inclusion for wavpack, null and metronom plugin
--- a/src/amidi-plug/i_configure.c Mon Jan 15 12:38:45 2007 -0800 +++ b/src/amidi-plug/i_configure.c Mon Jan 15 12:46:38 2007 -0800 @@ -28,6 +28,7 @@ #include "i_configure-dummy.h" #include "i_utils.h" #include <audacious/beepctrl.h> +#include <audacious/util.h> amidiplug_cfg_backend_t * amidiplug_cfg_backend; @@ -310,9 +311,10 @@ void i_configure_cfg_backend_read( void ) { pcfg_t *cfgfile; + gchar * config_datadir = (gchar*)audacious_get_localdir(); + gchar * config_pathfilename = g_build_filename( config_datadir , "amidi-plug.conf" , NULL ); - gchar * config_pathfilename = g_strjoin( "" , g_get_home_dir() , "/" , - PLAYER_LOCALRCDIR , "/amidi-plug.conf" , NULL ); + g_free( config_datadir ); cfgfile = i_pcfg_new_from_file( config_pathfilename ); i_configure_cfg_alsa_read( cfgfile ); /* get alsa backend configuration */ @@ -329,8 +331,10 @@ void i_configure_cfg_backend_save( void ) { pcfg_t *cfgfile; - gchar * config_pathfilename = g_strjoin( "" , g_get_home_dir() , "/" , - PLAYER_LOCALRCDIR , "/amidi-plug.conf" , NULL ); + gchar * config_datadir = (gchar*)audacious_get_localdir(); + gchar * config_pathfilename = g_build_filename( config_datadir , "amidi-plug.conf" , NULL ); + + g_free( config_datadir ); cfgfile = i_pcfg_new_from_file( config_pathfilename ); if (!cfgfile) @@ -350,8 +354,10 @@ void i_configure_cfg_ap_read( void ) { pcfg_t *cfgfile; - gchar * config_pathfilename = g_strjoin( "" , g_get_home_dir() , "/" , - PLAYER_LOCALRCDIR , "/amidi-plug.conf" , NULL ); + gchar * config_datadir = (gchar*)audacious_get_localdir(); + gchar * config_pathfilename = g_build_filename( config_datadir , "amidi-plug.conf" , NULL ); + + g_free( config_datadir ); cfgfile = i_pcfg_new_from_file( config_pathfilename ); if (!cfgfile) @@ -388,8 +394,10 @@ void i_configure_cfg_ap_save( void ) { pcfg_t *cfgfile; - gchar * config_pathfilename = g_strjoin( "" , g_get_home_dir() , "/" , - PLAYER_LOCALRCDIR , "/amidi-plug.conf" , NULL ); + gchar * config_datadir = (gchar*)audacious_get_localdir(); + gchar * config_pathfilename = g_build_filename( config_datadir , "amidi-plug.conf" , NULL ); + + g_free( config_datadir ); cfgfile = i_pcfg_new_from_file( config_pathfilename ); if (!cfgfile)