changeset 26416:1147a3b1fb0b

Change media volume preference to be specific to Finch.
author Mike Ruprecht <maiku@soc.pidgin.im>
date Fri, 03 Apr 2009 06:31:56 +0000
parents da3f44d6cd52
children 02c0a30d2942
files finch/gntmedia.c
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/finch/gntmedia.c	Fri Apr 03 06:11:34 2009 +0000
+++ b/finch/gntmedia.c	Fri Apr 03 06:31:56 2009 +0000
@@ -424,7 +424,7 @@
 	const gchar *audio_device = purple_prefs_get_string(
 			"/purple/media/audio/device");
 	double input_volume = purple_prefs_get_int(
-			"/purple/media/audio/volume/input")/10.0;
+			"/finch/media/audio/volume/input")/10.0;
 
 	bin = gst_bin_new("finchdefaultaudiosrc");
 	src = gst_element_factory_make("alsasrc", "asrc");
@@ -449,7 +449,7 @@
 	GstElement *bin, *sink, *volume, *queue;
 	GstPad *pad, *ghost;
 	double output_volume = purple_prefs_get_int(
-			"/purple/media/audio/volume/output")/10.0;
+			"/finch/media/audio/volume/output")/10.0;
 
 	bin = gst_bin_new("pidginrecvaudiobin");
 	sink = gst_element_factory_make("alsasink", "asink");
@@ -501,6 +501,12 @@
 	purple_debug_info("gntmedia", "Registering media element types\n");
 	purple_media_manager_set_active_element(manager, default_audio_src);
 	purple_media_manager_set_active_element(manager, default_audio_sink);
+
+	purple_prefs_add_none("/finch/media");
+	purple_prefs_add_none("/finch/media/audio");
+	purple_prefs_add_none("/finch/media/audio/volume");
+	purple_prefs_add_int("/finch/media/audio/volume/input", 10);
+	purple_prefs_add_int("/finch/media/audio/volume/output", 10);
 #endif
 }