diff libgaim/prefs.c @ 14874:71149a751439

[gaim-migrate @ 17643] SF Patch #1469315 from R.Ramkumar - andyetitmoves "This is a small patch to make sounds enabled when available an optional feature. The use case is: Sounds being annoying, I would like them only when I am not seeing the comp. When I am on the comp, I have guifications/gaim-osd to inform me of whatever happens, and that happens to be less intrusive (especially when music is on :) )." The patch originally used: "Play sounds:" ("Always", "When available", "When away") I changed them to the strings KingAnt suggested: "Play sounds:" ("Always", "Only when available", "Only when not available") The ones from the patch submitter are not quite as clear, but they're shorter. What does everyone think about this? committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Wed, 01 Nov 2006 01:27:16 +0000
parents 60b1bc8dbf37
children dd4160b36f80
line wrap: on
line diff
--- a/libgaim/prefs.c	Wed Nov 01 00:57:39 2006 +0000
+++ b/libgaim/prefs.c	Wed Nov 01 01:27:16 2006 +0000
@@ -1116,6 +1116,14 @@
 	gaim_prefs_remove("/plugins/core/autorecon/hide_reconnecting_dialog");
 	gaim_prefs_remove("/plugins/core/autorecon/restore_state");
 	gaim_prefs_remove("/plugins/core/autorecon");
+
+	/* Convert old sounds while_away pref to new 3-way pref. */
+	if (gaim_prefs_exists("/core/sound/while_away") &&
+	    gaim_prefs_get_bool("/core/sound/while_away"))
+	{
+		gaim_prefs_set_int("/core/sound/while_status", 3);
+	}
+	gaim_prefs_remove("/core/sound/while_away");
 }
 
 void *