changeset 1034:03712a532f1c trunk

[svn] Convert from deprecated configfile interace to configdb, closes bug #494.
author chainsaw
date Sat, 13 May 2006 03:58:16 -0700
parents e69e900eca1e
children 06ca2c6283f4
files Plugins/Output/arts/arts.c Plugins/Output/arts/arts.h Plugins/Output/arts/audio.c Plugins/Output/arts/configure.c
diffstat 4 files changed, 9 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/Plugins/Output/arts/arts.c	Fri May 12 14:18:48 2006 -0700
+++ b/Plugins/Output/arts/arts.c	Sat May 13 03:58:16 2006 -0700
@@ -10,7 +10,6 @@
  */
 
 #include "arts.h"
-#include "libaudacious/configfile.h"
 #include "libaudacious/util.h"
 
 static void about(void)
--- a/Plugins/Output/arts/arts.h	Fri May 12 14:18:48 2006 -0700
+++ b/Plugins/Output/arts/arts.h	Sat May 13 03:58:16 2006 -0700
@@ -25,7 +25,7 @@
 #include <string.h>
 
 #include "audacious/plugin.h"
-#include "libaudacious/configfile.h"
+#include "libaudacious/configdb.h"
 
 struct arts_config
 {
--- a/Plugins/Output/arts/audio.c	Fri May 12 14:18:48 2006 -0700
+++ b/Plugins/Output/arts/audio.c	Sat May 13 03:58:16 2006 -0700
@@ -56,16 +56,16 @@
 
 void artsxmms_init(void)
 {
-	ConfigFile *cfgfile;
+	ConfigDb *db;
 
 	memset(&artsxmms_cfg, 0, sizeof (artsxmms_cfg));
 
 	artsxmms_cfg.buffer_size = 400;
 	
-	cfgfile = xmms_cfg_open_default_file();
-	xmms_cfg_read_int(cfgfile, "arts", "buffer_size",
+	db = bmp_cfg_db_open();
+	bmp_cfg_db_get_int(db, "arts", "buffer_size",
 			  &artsxmms_cfg.buffer_size);
-	xmms_cfg_free(cfgfile);
+	bmp_cfg_db_close(db);
 }
 
 
--- a/Plugins/Output/arts/configure.c	Fri May 12 14:18:48 2006 -0700
+++ b/Plugins/Output/arts/configure.c	Sat May 13 03:58:16 2006 -0700
@@ -19,15 +19,14 @@
 
 static void configure_win_ok_cb(GtkWidget * w, gpointer data)
 {
-	ConfigFile *cfgfile;
+	ConfigDb *db;
 
 	artsxmms_cfg.buffer_size =
 		gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(buffer_size_spin));
 	
-	cfgfile = xmms_cfg_open_default_file();
-	xmms_cfg_write_int(cfgfile, "arts", "buffer_size", artsxmms_cfg.buffer_size);
-	xmms_cfg_write_default_file(cfgfile);
-	xmms_cfg_free(cfgfile);
+	db = bmp_cfg_db_open();
+	bmp_cfg_db_set_int(db, "arts", "buffer_size", artsxmms_cfg.buffer_size);
+	bmp_cfg_db_close(db);
 
 	gtk_widget_destroy(configure_win);
 }