changeset 307:894e9c4a0051 trunk

[svn] Convert to configdb usage.
author chainsaw
date Sat, 17 Dec 2005 11:50:41 -0800
parents 0e22e4ef781e
children 511354316db4
files Plugins/General/lirc/lirc.c
diffstat 1 files changed, 9 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/Plugins/General/lirc/lirc.c	Sat Dec 17 11:40:29 2005 -0800
+++ b/Plugins/General/lirc/lirc.c	Sat Dec 17 11:50:41 2005 -0800
@@ -41,7 +41,7 @@
 #include <glib.h>
 
 #include "audacious/plugin.h"
-#include "libaudacious/configfile.h"
+#include "libaudacious/configdb.h"
 #include "libaudacious/beepctrl.h"
 
 #include <lirc/lirc_client.h>
@@ -490,7 +490,7 @@
 void init(void)
 {
 	int flags;
-	ConfigFile *cfg;
+	ConfigDb *db;
 	
 	if((lirc_fd=lirc_init("audacious",1))==-1)
 	{
@@ -517,12 +517,9 @@
 		fcntl(lirc_fd,F_SETFL,flags|O_NONBLOCK);
 	}
 	fflush(stdout);
-	cfg=xmms_cfg_open_default_file();
-	if(cfg)
-	{
-		xmms_cfg_read_string(cfg,"LIRC","font",&fontname);
-		xmms_cfg_free(cfg);
-	}
+	db = bmp_cfg_db_open();
+	bmp_cfg_db_get_string(db,"LIRC","font",&fontname);
+	bmp_cfg_db_close(db);
 	popup_style=gtk_style_new();
 }
 
@@ -963,7 +960,7 @@
 
 void cleanup()
 {
-	ConfigFile *cfg;
+	ConfigDb *db;
 	
 	if(config)
 	{
@@ -979,13 +976,9 @@
 	clear_select_list(&select_list);
 	if(fontname)
 	{
-		cfg=xmms_cfg_open_default_file();
-		if(cfg)
-		{
-			xmms_cfg_write_string(cfg,"LIRC","font",fontname);
-			xmms_cfg_write_default_file(cfg);
-			xmms_cfg_free(cfg);
-		}
+		db = bmp_cfg_db_open();
+		bmp_cfg_db_set_string(db,"LIRC","font",fontname);
+		bmp_cfg_db_close(db);
 		free(fontname);
 	}
 }