changeset 2807:f06ec6936b7e

migrated some plugins to auto_CFGID
author Andrew O. Shadoura <bugzilla@tut.by>
date Sat, 12 Jul 2008 04:00:23 +0300
parents 9e06acde819e
children f2267c25ca0b ab41a5a743a0
files src/filewriter/filewriter.c src/lirc/lirc_cfg.c
diffstat 2 files changed, 16 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/src/filewriter/filewriter.c	Sat Jul 12 03:39:55 2008 +0300
+++ b/src/filewriter/filewriter.c	Sat Jul 12 04:00:23 2008 +0300
@@ -148,12 +148,12 @@
     audacious_menu_plugin_item_add(AUDACIOUS_MENU_PLAYLIST_RCLICK, menu_root);*/
 
     db = aud_cfg_db_open();
-    aud_cfg_db_get_int(db, "filewriter", "fileext", &fileext);
-    aud_cfg_db_get_string(db, "filewriter", "file_path", &file_path);
-    aud_cfg_db_get_bool(db, "filewriter", "save_original", &save_original);
-    aud_cfg_db_get_bool(db, "filewriter", "use_suffix", &use_suffix);
-    aud_cfg_db_get_bool(db, "filewriter", "filenamefromtags", &filenamefromtags);
-    aud_cfg_db_get_bool(db, "filewriter", "prependnumber", &prependnumber);
+    aud_cfg_db_get_int(db, FILEWRITER_CFGID, "fileext", &fileext);
+    aud_cfg_db_get_string(db, FILEWRITER_CFGID, "file_path", &file_path);
+    aud_cfg_db_get_bool(db, FILEWRITER_CFGID, "save_original", &save_original);
+    aud_cfg_db_get_bool(db, FILEWRITER_CFGID, "use_suffix", &use_suffix);
+    aud_cfg_db_get_bool(db, FILEWRITER_CFGID, "filenamefromtags", &filenamefromtags);
+    aud_cfg_db_get_bool(db, FILEWRITER_CFGID, "prependnumber", &prependnumber);
     aud_cfg_db_close(db);
 
     if (!file_path)
@@ -400,12 +400,12 @@
         gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(prependnumber_toggle));
 
     db = aud_cfg_db_open();
-    aud_cfg_db_set_int(db, "filewriter", "fileext", fileext);
-    aud_cfg_db_set_string(db, "filewriter", "file_path", file_path);
-    aud_cfg_db_set_bool(db, "filewriter", "save_original", save_original);
-    aud_cfg_db_set_bool(db, "filewriter", "filenamefromtags", filenamefromtags);
-    aud_cfg_db_set_bool(db, "filewriter", "use_suffix", use_suffix);
-    aud_cfg_db_set_bool(db, "filewriter", "prependnumber", prependnumber);
+    aud_cfg_db_set_int(db, FILEWRITER_CFGID, "fileext", fileext);
+    aud_cfg_db_set_string(db, FILEWRITER_CFGID, "file_path", file_path);
+    aud_cfg_db_set_bool(db, FILEWRITER_CFGID, "save_original", save_original);
+    aud_cfg_db_set_bool(db, FILEWRITER_CFGID, "filenamefromtags", filenamefromtags);
+    aud_cfg_db_set_bool(db, FILEWRITER_CFGID, "use_suffix", use_suffix);
+    aud_cfg_db_set_bool(db, FILEWRITER_CFGID, "prependnumber", prependnumber);
 
     aud_cfg_db_close(db);
 
--- a/src/lirc/lirc_cfg.c	Sat Jul 12 03:39:55 2008 +0300
+++ b/src/lirc/lirc_cfg.c	Sat Jul 12 04:00:23 2008 +0300
@@ -17,8 +17,8 @@
 {
   ConfigDb *db;
   db = aud_cfg_db_open();
-  aud_cfg_db_get_int(db, "lirc", "enable_reconnect", &b_enable_reconnect);
-  aud_cfg_db_get_int(db, "lirc", "reconnect_timeout", &reconnect_timeout);
+  aud_cfg_db_get_int(db, LIRC_CFGID, "enable_reconnect", &b_enable_reconnect);
+  aud_cfg_db_get_int(db, LIRC_CFGID, "reconnect_timeout", &reconnect_timeout);
   if (!aud_cfg_db_get_string(db, "aosd", "text_fonts_name_0", &aosd_font))
     aosd_font = g_strdup("Sans 26");
   if (!reconnect_timeout)
@@ -33,8 +33,8 @@
 {
   ConfigDb *db;
   db = aud_cfg_db_open();
-  aud_cfg_db_set_int(db, "lirc", "enable_reconnect", b_enable_reconnect);
-  aud_cfg_db_set_int(db, "lirc", "reconnect_timeout", reconnect_timeout);
+  aud_cfg_db_set_int(db, LIRC_CFGID, "enable_reconnect", b_enable_reconnect);
+  aud_cfg_db_set_int(db, LIRC_CFGID, "reconnect_timeout", reconnect_timeout);
   aud_cfg_db_close(db);
 }