changeset 1016:400161c76515 trunk

[svn] - configdb stuff
author nenolod
date Tue, 09 May 2006 10:02:09 -0700
parents bc14606391fc
children dc9aaf5eba90
files Plugins/Output/sun/configure.c Plugins/Output/sun/sun.c Plugins/Output/sun/sun.h
diffstat 3 files changed, 23 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/Plugins/Output/sun/configure.c	Tue May 09 09:52:49 2006 -0700
+++ b/Plugins/Output/sun/configure.c	Tue May 09 10:02:09 2006 -0700
@@ -39,7 +39,7 @@
 
 static void configure_win_ok_cb(GtkWidget *w, gpointer data)
 {
-	ConfigFile *cfgfile;
+	ConfigDb *cfgfile;
 
 	strcpy(audio.devaudio, gtk_entry_get_text(GTK_ENTRY(adevice_entry)));
 	strcpy(audio.devmixer, gtk_entry_get_text(GTK_ENTRY(mdevice_entry)));
@@ -56,27 +56,26 @@
 		sun_mixer_close();
 	}
 
-	cfgfile = xmms_cfg_open_default_file();
+	cfgfile = bmp_cfg_db_open();
 
-	xmms_cfg_write_string(cfgfile, "sun",
+	bmp_cfg_db_set_string(cfgfile, "sun",
 			      "audio_devaudio", audio.devaudio);
-	xmms_cfg_write_string(cfgfile, "sun",
+	bmp_cfg_db_set_string(cfgfile, "sun",
 			      "audio_devaudioctl", audio.devaudioctl);
-	xmms_cfg_write_string(cfgfile, "sun",
+	bmp_cfg_db_set_string(cfgfile, "sun",
 			      "audio_devmixer", audio.devmixer);
 
-	xmms_cfg_write_string(cfgfile, "sun",
+	bmp_cfg_db_set_string(cfgfile, "sun",
 			      "mixer_voldev", audio.mixer_voldev);
-	xmms_cfg_write_boolean(cfgfile, "sun",
+	bmp_cfg_db_set_bool(cfgfile, "sun",
 			       "mixer_keepopen", audio.mixer_keepopen);
 
-	xmms_cfg_write_int(cfgfile, "sun",
+	bmp_cfg_db_set_int(cfgfile, "sun",
 			   "buffer_size", audio.req_buffer_size);
-	xmms_cfg_write_int(cfgfile, "sun",
+	bmp_cfg_db_set_int(cfgfile, "sun",
 			   "prebuffer_size", audio.req_prebuffer_size);
 
-	xmms_cfg_write_default_file(cfgfile);
-	xmms_cfg_free(cfgfile);
+	bmp_cfg_db_close(cfgfile);
 
 	configure_win_destroy();
 }
@@ -159,7 +158,7 @@
 		if (info.type == AUDIO_MIXER_VALUE)
 		{
 			item = gtk_menu_item_new_with_label(info.label.name);
-			gtk_signal_connect(GTK_OBJECT(item), "activate",
+			g_signal_connect(G_OBJECT(item), "activate",
 					   (GCallback) configure_win_mixer_volume_dev_cb,
 					   (gpointer) info.index);
 
--- a/Plugins/Output/sun/sun.c	Tue May 09 09:52:49 2006 -0700
+++ b/Plugins/Output/sun/sun.c	Tue May 09 10:02:09 2006 -0700
@@ -18,7 +18,7 @@
  */
 
 #include "sun.h"
-#include "libaudacious/configfile.h"
+#include "libaudacious/configdb.h"
 
 #include <glib.h>
 #include <glib/gi18n.h>
@@ -59,30 +59,30 @@
 
 void sun_init(void)
 {
-	ConfigFile *cfgfile;
+	ConfigDb *cfgfile;
 	char *s;
 
 	memset(&audio, 0, sizeof(struct sun_audio));
 
-	cfgfile = xmms_cfg_open_default_file();
+	cfgfile = bmp_cfg_db_open();
 	/* Devices */
-	xmms_cfg_read_string(cfgfile, "sun", "audio_devaudio", &audio.devaudio);
-	xmms_cfg_read_string(cfgfile, "sun",
+	bmp_cfg_db_get_string(cfgfile, "sun", "audio_devaudio", &audio.devaudio);
+	bmp_cfg_db_get_string(cfgfile, "sun",
 			     "audio_devaudioctl", &audio.devaudioctl);
-	xmms_cfg_read_string(cfgfile, "sun", "audio_devmixer", &audio.devmixer);
+	bmp_cfg_db_get_string(cfgfile, "sun", "audio_devmixer", &audio.devmixer);
 
 	/* Buffering */
-	xmms_cfg_read_int(cfgfile, "sun",
+	bmp_cfg_db_get_int(cfgfile, "sun",
 			  "buffer_size", &audio.req_buffer_size);
-	xmms_cfg_read_int(cfgfile, "sun",
+	bmp_cfg_db_get_int(cfgfile, "sun",
 			  "prebuffer_size", &audio.req_prebuffer_size);
 
 	/* Mixer */
-	xmms_cfg_read_string(cfgfile, "sun", "mixer_voldev", &audio.mixer_voldev);
-	xmms_cfg_read_boolean(cfgfile, "sun",
+	bmp_cfg_db_get_string(cfgfile, "sun", "mixer_voldev", &audio.mixer_voldev);
+	bmp_cfg_db_get_bool(cfgfile, "sun",
 			      "mixer_keepopen", &audio.mixer_keepopen);
 
-	xmms_cfg_free(cfgfile);
+	bmp_cfg_db_close(cfgfile);
 
 	/* Audio device path */
 	if ((s = getenv("AUDIODEVICE")))
--- a/Plugins/Output/sun/sun.h	Tue May 09 09:52:49 2006 -0700
+++ b/Plugins/Output/sun/sun.h	Tue May 09 10:02:09 2006 -0700
@@ -36,7 +36,7 @@
 #include "audioio.h"
 
 #include "audacious/plugin.h"
-#include "libaudacious/configfile.h"
+#include "libaudacious/configdb.h"
 
 /* Default path to audio device. */
 #ifndef SUN_DEV_AUDIO