[audacious-plugin-fc] Set config defaults, which helps with cleaning up the config file. Include missing misc.h for the co
Michael Schwendt
mschwendt at fedoraproject.org
Fri Oct 14 09:49:20 UTC 2011
commit 8bebb7bf22cd9b83c5d288a8ff10cad96fc72b0e
Author: Michael Schwendt <mschwendt at fedoraproject.org>
Date: Fri Oct 14 11:49:17 2011 +0200
Set config defaults, which helps with cleaning up the config file.
Include missing misc.h for the config database API.
audacious-plugin-fc-0.6-aud31.patch | 33 +++++++++++++++++++++------------
audacious-plugin-fc.spec | 9 ++++-----
2 files changed, 25 insertions(+), 17 deletions(-)
---
diff --git a/audacious-plugin-fc-0.6-aud31.patch b/audacious-plugin-fc-0.6-aud31.patch
index 6c83a23..c1e4f0e 100644
--- a/audacious-plugin-fc-0.6-aud31.patch
+++ b/audacious-plugin-fc-0.6-aud31.patch
@@ -1,12 +1,13 @@
diff -Nur audacious-plugin-fc-0.6-aud30/src/configure.c audacious-plugin-fc-0.6-aud31/src/configure.c
--- audacious-plugin-fc-0.6-aud30/src/configure.c 2011-10-13 23:17:11.000000000 +0200
-+++ audacious-plugin-fc-0.6-aud31/src/configure.c 2011-10-13 23:21:35.405306867 +0200
-@@ -1,4 +1,3 @@
++++ audacious-plugin-fc-0.6-aud31/src/configure.c 2011-10-14 11:44:31.000000000 +0200
+@@ -1,4 +1,4 @@
-#include <audacious/configdb.h>
++#include <audacious/misc.h>
#include <audacious/plugin.h>
#include <audacious/preferences.h>
#include <glib.h>
-@@ -8,26 +7,20 @@
+@@ -8,26 +8,25 @@
FCpluginConfig fc_myConfig;
FCpluginConfig config;
@@ -17,18 +18,26 @@ diff -Nur audacious-plugin-fc-0.6-aud30/src/configure.c audacious-plugin-fc-0.6-
static const gint FREQ_SAMPLE_44 = 44100;
static const gint FREQ_SAMPLE_22 = 22050;
- void fc_ip_load_config() {
+-void fc_ip_load_config() {
- mcs_handle_t *cfg;
--
- fc_myConfig.frequency = FREQ_SAMPLE_44;
- fc_myConfig.precision = 8;
- fc_myConfig.channels = 1;
-
++static const gchar* const plugin_defaults[] = {
++ "frequency", "44100",
++ "precision", "8",
++ "channels", "1",
++ NULL
++};
+
+- fc_myConfig.frequency = FREQ_SAMPLE_44;
+- fc_myConfig.precision = 8;
+- fc_myConfig.channels = 1;
+-
- if ((cfg = aud_cfg_db_open())) {
- aud_cfg_db_get_int(cfg, configSection, "frequency", &fc_myConfig.frequency);
- aud_cfg_db_get_int(cfg, configSection, "precision", &fc_myConfig.precision);
- aud_cfg_db_get_int(cfg, configSection, "channels", &fc_myConfig.channels);
--
++void fc_ip_load_config() {
++ aud_config_set_defaults(configSection,plugin_defaults);
+
- aud_cfg_db_close(cfg);
- }
+ fc_myConfig.frequency = aud_get_int(configSection, "frequency");
@@ -37,7 +46,7 @@ diff -Nur audacious-plugin-fc-0.6-aud30/src/configure.c audacious-plugin-fc-0.6-
fc_myConfig.freq48 = fc_myConfig.freq44 = fc_myConfig.freq22 = FALSE;
fc_myConfig.bits16 = fc_myConfig.bits8 = FALSE;
-@@ -65,14 +58,9 @@
+@@ -65,14 +64,9 @@
}
static void fc_ip_config_save() {
@@ -55,7 +64,7 @@ diff -Nur audacious-plugin-fc-0.6-aud30/src/configure.c audacious-plugin-fc-0.6-
}
static void configure_apply() {
-@@ -126,16 +114,16 @@
+@@ -126,16 +120,16 @@
};
static PreferencesWidget prefs_top_row[] = {
diff --git a/audacious-plugin-fc.spec b/audacious-plugin-fc.spec
index 0c7380d..7d6a157 100644
--- a/audacious-plugin-fc.spec
+++ b/audacious-plugin-fc.spec
@@ -9,7 +9,7 @@
Summary: Future Composer input plugin for Audacious
Name: audacious-plugin-fc
Version: 0.6
-Release: 12%{?dist}
+Release: 13%{?dist}
Provides: audacious-plugins-fc = %{version}-%{release}
URL: http://xmms-fc.sourceforge.net/
License: GPLv2+
@@ -55,13 +55,12 @@ make DESTDIR=${RPM_BUILD_ROOT} install
%changelog
-* Thu Oct 13 2011 Michael Schwendt <mschwendt at fedoraproject.org> - 0.6-12
+* Fri Oct 14 2011 Michael Schwendt <mschwendt at fedoraproject.org> - 0.6-13
+- Set config defaults, which helps with cleaning up the config file.
+- Include missing misc.h for the config database API.
- Port to Audacious 3.1 Preferences API.
- Rebuild for Audacious 3.1-beta1 generic plugin API/ABI bump.
-* Wed Oct 12 2011 Michael Schwendt <mschwendt at fedoraproject.org> - 0.6-11
-- Rebuild for Audacious 3.1-beta1 generic plugin API/ABI bump.
-
* Fri Sep 16 2011 Michael Schwendt <mschwendt at fedoraproject.org> - 0.6-10
- Depend on audacious(plugin-api)%%{?_isa}.
- Drop %%defattr line.
More information about the scm-commits
mailing list