pidgin.vv: 32567c86: Change volume preference and make sure i...

maiku at soc.pidgin.im maiku at soc.pidgin.im
Fri Apr 3 02:50:39 EDT 2009


-----------------------------------------------------------------
Revision: 32567c86cb5156a66fbce9eafef9e70767f06b5f
Ancestor: a797479464a6076b96e2bf2da9ccf62bed86e8ac
Author: maiku at soc.pidgin.im
Date: 2009-04-03T06:11:34
Branch: im.pidgin.pidgin.vv
URL: http://d.pidgin.im/viewmtn/revision/info/32567c86cb5156a66fbce9eafef9e70767f06b5f

Modified files:
        pidgin/gtkmedia.c

ChangeLog: 

Change volume preference and make sure it exists.

-------------- next part --------------
============================================================
--- pidgin/gtkmedia.c	b3d973e5fbbed831d85ca776692d024d8831a8e1
+++ pidgin/gtkmedia.c	650217c7a26b98d68c4bff9271b939c0ab352c49
@@ -573,7 +573,7 @@ pidgin_media_input_volume_changed(GtkRan
 pidgin_media_input_volume_changed(GtkRange *range, PurpleMedia *media)
 {
 	double val = (double)gtk_range_get_value(GTK_RANGE(range));
-	purple_prefs_set_int("/purple/media/audio/volume/input", val);
+	purple_prefs_set_int("/pidgin/media/audio/volume/input", val);
 	val /= 10.0;
 	purple_media_set_input_volume(media, NULL, val);
 }
@@ -582,7 +582,7 @@ pidgin_media_output_volume_changed(GtkRa
 pidgin_media_output_volume_changed(GtkRange *range, PurpleMedia *media)
 {
 	double val = (double)gtk_range_get_value(GTK_RANGE(range));
-	purple_prefs_set_int("/purple/media/audio/volume/output", val);
+	purple_prefs_set_int("/pidgin/media/audio/volume/output", val);
 	val /= 10.0;
 	purple_media_set_output_volume(media, NULL, NULL, val);
 }
@@ -704,7 +704,7 @@ pidgin_media_ready_cb(PurpleMedia *media
 		gtk_range_set_increments(GTK_RANGE(volume), 5.0, 25.0);
 		gtk_range_set_value(GTK_RANGE(volume),
 				purple_prefs_get_int(
-				"/purple/media/audio/volume/output"));
+				"/pidgin/media/audio/volume/output"));
 		gtk_scale_set_draw_value(GTK_SCALE(volume), FALSE);
 		g_signal_connect (G_OBJECT(volume), "value-changed",
 				G_CALLBACK(pidgin_media_output_volume_changed),
@@ -739,7 +739,7 @@ pidgin_media_ready_cb(PurpleMedia *media
 		gtk_range_set_increments(GTK_RANGE(volume), 5.0, 25.0);
 		gtk_range_set_value(GTK_RANGE(volume),
 				purple_prefs_get_int(
-				"/purple/media/audio/volume/input"));
+				"/pidgin/media/audio/volume/input"));
 		gtk_scale_set_draw_value(GTK_SCALE(volume), FALSE);
 		g_signal_connect (G_OBJECT(volume), "value-changed",
 				G_CALLBACK (pidgin_media_input_volume_changed),
@@ -1016,7 +1016,7 @@ create_default_audio_src(PurpleMedia *me
 	GstElement *bin, *src, *volume, *level;
 	GstPad *pad, *ghost;
 	double input_volume = purple_prefs_get_int(
-			"/purple/media/audio/volume/input")/10.0;
+			"/pidgin/media/audio/volume/input")/10.0;
 
 	src = gst_element_factory_make("gconfaudiosrc", NULL);
 	if (src == NULL)
@@ -1055,7 +1055,7 @@ create_default_audio_sink(PurpleMedia *m
 	GstElement *bin, *sink, *volume, *level, *queue;
 	GstPad *pad, *ghost;
 	double output_volume = purple_prefs_get_int(
-			"/purple/media/audio/volume/output")/10.0;
+			"/pidgin/media/audio/volume/output")/10.0;
 
 	sink = gst_element_factory_make("gconfaudiosink", NULL);
 	if (sink == NULL)
@@ -1139,6 +1139,12 @@ pidgin_medias_init(void)
 	purple_media_manager_set_active_element(manager, default_video_sink);
 	purple_media_manager_set_active_element(manager, default_audio_src);
 	purple_media_manager_set_active_element(manager, default_audio_sink);
+
+	purple_prefs_add_none("/pidgin/media");
+	purple_prefs_add_none("/pidgin/media/audio");
+	purple_prefs_add_none("/pidgin/media/audio/volume");
+	purple_prefs_add_int("/pidgin/media/audio/volume/input", 10);
+	purple_prefs_add_int("/pidgin/media/audio/volume/output", 10);
 #endif
 }
 


More information about the Commits mailing list