[totem/gsettings: 18/20] Convert audio-output-type to an enum



commit 9000da69e3ae091090a4e7c18be67979620f1f84
Author: Philip Withnall <philip tecnocode co uk>
Date:   Thu Aug 19 09:38:08 2010 +0100

    Convert audio-output-type to an enum

 data/org.gnome.totem.gschema.xml.in.in    |    5 ++---
 src/backend/bacon-video-widget-gst-0.10.c |    4 ++--
 2 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/data/org.gnome.totem.gschema.xml.in.in b/data/org.gnome.totem.gschema.xml.in.in
index 5443366..40b42fe 100644
--- a/data/org.gnome.totem.gschema.xml.in.in
+++ b/data/org.gnome.totem.gschema.xml.in.in
@@ -56,10 +56,9 @@
 			<default>false</default>
 			<_summary>Whether to enable debug for the playback engine</_summary>
 		</key>
-		<key name="audio-output-type" type="i">
-			<default>0</default>
+		<key name="audio-output-type" enum="org.gnome.totem.BvwAudioOutType">
+			<default>'stereo'</default>
 			<_summary>Type of audio output to use</_summary>
-			<_description>Type of audio output to use: "0" for stereo, "1" for 4-channel output,  "2" for 5.0 channel output, "3" for 5.1 channel output, "4" for AC3 Passthrough.</_description>
 		</key>
 		<key name="visual-quality" type="i">
 			<default>0</default>
diff --git a/src/backend/bacon-video-widget-gst-0.10.c b/src/backend/bacon-video-widget-gst-0.10.c
index 7e6be6d..4ba955a 100644
--- a/src/backend/bacon-video-widget-gst-0.10.c
+++ b/src/backend/bacon-video-widget-gst-0.10.c
@@ -3472,7 +3472,7 @@ bacon_video_widget_set_audio_out_type (BaconVideoWidget *bvw,
     return FALSE;
 
   bvw->priv->speakersetup = type;
-  g_settings_set_int (bvw->priv->settings, "audio-output-type", type);
+  g_settings_set_enum (bvw->priv->settings, "audio-output-type", type);
 
   set_audio_filter (bvw);
 
@@ -7105,7 +7105,7 @@ bacon_video_widget_new (int width, int height,
   }
 
   /* audio out, if any */
-  value = g_settings_get_int (bvw->priv->settings, "audio-output-type");
+  value = g_settings_get_enum (bvw->priv->settings, "audio-output-type");
   if (value > 0 &&
       (type != BVW_USE_TYPE_METADATA && type != BVW_USE_TYPE_CAPTURE)) {
     bvw->priv->speakersetup = value;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]