# HG changeset patch # User nenolod # Date 1147193569 25200 # Node ID bc14606391fc9c7fcb1ddd04fa1b5213bab02d38 # Parent 9b26df736b62d2c3859daa60ef589cc9242ee740 [svn] - don't use XMMS ConfigFile interface here diff -r 9b26df736b62 -r bc14606391fc Plugins/Input/amidi-plug/i_configure.c --- a/Plugins/Input/amidi-plug/i_configure.c Tue May 09 09:04:44 2006 -0700 +++ b/Plugins/Input/amidi-plug/i_configure.c Tue May 09 09:52:49 2006 -0700 @@ -398,8 +398,8 @@ void i_configure_cfg_read( void ) { - ConfigFile *cfgfile; - cfgfile = xmms_cfg_open_default_file(); + ConfigDb *cfgfile; + cfgfile = bmp_cfg_db_open(); if (!cfgfile) { @@ -412,40 +412,36 @@ } else { - if ( !xmms_cfg_read_string( cfgfile , "amidi-plug" , "writable_ports" , &amidiplug_cfg.seq_writable_ports ) ) + if ( !bmp_cfg_db_get_string( cfgfile , "amidi-plug" , "writable_ports" , &amidiplug_cfg.seq_writable_ports ) ) amidiplug_cfg.seq_writable_ports = i_configure_read_seq_ports_default(); /* default value */ - if ( !xmms_cfg_read_int( cfgfile , "amidi-plug" , "mixer_card_id" , &amidiplug_cfg.mixer_card_id ) ) + if ( !bmp_cfg_db_get_int( cfgfile , "amidi-plug" , "mixer_card_id" , &amidiplug_cfg.mixer_card_id ) ) amidiplug_cfg.mixer_card_id = 0; /* default value */ - if ( !xmms_cfg_read_string( cfgfile , "amidi-plug" , "mixer_control_name" , &amidiplug_cfg.mixer_control_name ) ) + if ( !bmp_cfg_db_get_string( cfgfile , "amidi-plug" , "mixer_control_name" , &amidiplug_cfg.mixer_control_name ) ) amidiplug_cfg.mixer_control_name = g_strdup( "Synth" ); /* default value */ - if ( !xmms_cfg_read_int( cfgfile , "amidi-plug" , "mixer_control_id" , &amidiplug_cfg.mixer_control_id ) ) + if ( !bmp_cfg_db_get_int( cfgfile , "amidi-plug" , "mixer_control_id" , &amidiplug_cfg.mixer_control_id ) ) amidiplug_cfg.mixer_control_id = 0; /* default value */ - if ( !xmms_cfg_read_int( cfgfile , "amidi-plug" , "length_precalc_enable" , &amidiplug_cfg.length_precalc_enable ) ) + if ( !bmp_cfg_db_get_int( cfgfile , "amidi-plug" , "length_precalc_enable" , &amidiplug_cfg.length_precalc_enable ) ) amidiplug_cfg.length_precalc_enable = 0; /* default value */ - xmms_cfg_free(cfgfile); + bmp_cfg_db_close(cfgfile); } } void i_configure_cfg_save( void ) { - ConfigFile *cfgfile; - cfgfile = xmms_cfg_open_default_file(); - - if (!cfgfile) - cfgfile = xmms_cfg_new(); + ConfigDb *cfgfile; + cfgfile = bmp_cfg_db_open(); - xmms_cfg_write_string( cfgfile , "amidi-plug" , "writable_ports" , amidiplug_cfg.seq_writable_ports ); - xmms_cfg_write_int( cfgfile , "amidi-plug" , "mixer_card_id" , amidiplug_cfg.mixer_card_id ); - xmms_cfg_write_string( cfgfile , "amidi-plug" , "mixer_control_name" , amidiplug_cfg.mixer_control_name ); - xmms_cfg_write_int( cfgfile , "amidi-plug" , "mixer_control_id" , amidiplug_cfg.mixer_control_id ); - xmms_cfg_write_int( cfgfile , "amidi-plug" , "length_precalc_enable" , amidiplug_cfg.length_precalc_enable ); + bmp_cfg_db_set_string( cfgfile , "amidi-plug" , "writable_ports" , amidiplug_cfg.seq_writable_ports ); + bmp_cfg_db_set_int( cfgfile , "amidi-plug" , "mixer_card_id" , amidiplug_cfg.mixer_card_id ); + bmp_cfg_db_set_string( cfgfile , "amidi-plug" , "mixer_control_name" , amidiplug_cfg.mixer_control_name ); + bmp_cfg_db_set_int( cfgfile , "amidi-plug" , "mixer_control_id" , amidiplug_cfg.mixer_control_id ); + bmp_cfg_db_set_int( cfgfile , "amidi-plug" , "length_precalc_enable" , amidiplug_cfg.length_precalc_enable ); - xmms_cfg_write_default_file(cfgfile); - xmms_cfg_free(cfgfile); + bmp_cfg_db_close(cfgfile); } diff -r 9b26df736b62 -r bc14606391fc Plugins/Input/amidi-plug/i_configure.h --- a/Plugins/Input/amidi-plug/i_configure.h Tue May 09 09:04:44 2006 -0700 +++ b/Plugins/Input/amidi-plug/i_configure.h Tue May 09 09:52:49 2006 -0700 @@ -23,7 +23,7 @@ #include "i_common.h" #include -#include "libaudacious/configfile.h" +#include "libaudacious/configdb.h" enum