Blame SOURCES/pidgin-NOT-UPSTREAM-2.5.2-rhel4-sound-migration.patch

875063
diff -urN pidgin-2.5.2.orig/pidgin/gtksound.c pidgin-2.5.2/pidgin/gtksound.c
875063
--- pidgin-2.5.2.orig/pidgin/gtksound.c	2008-07-13 22:05:38.000000000 -0400
875063
+++ pidgin-2.5.2/pidgin/gtksound.c	2008-11-22 13:36:54.000000000 -0500
875063
@@ -298,6 +298,9 @@
875063
 	purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/sound/mute", FALSE);
875063
 	purple_prefs_add_path(PIDGIN_PREFS_ROOT "/sound/command", "");
875063
 	purple_prefs_add_string(PIDGIN_PREFS_ROOT "/sound/method", "automatic");
875063
+#ifndef USE_GSTREAMER
875063
+	purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/sound/rhel4migrated", FALSE);
875063
+#endif
875063
 	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/sound/volume", 50);
875063
 
875063
 #ifdef USE_GSTREAMER
875063
@@ -433,6 +436,19 @@
875063
 		return;
875063
 	}
875063
 
875063
+#ifndef USE_GSTREAMER
875063
+	/* RHEL4 migration code */
875063
+	if (!purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/sound/rhel4migrated")) {
875063
+		purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/sound/rhel4migrated", TRUE);
875063
+		if(!strcmp(method, "automatic") ||
875063
+		   !strcmp(method, "esd") ||
875063
+		   !strcmp(method, "arts")) {
875063
+			purple_prefs_set_string(PIDGIN_PREFS_ROOT "/sound/method", "custom");
875063
+			purple_prefs_set_path(PIDGIN_PREFS_ROOT "/sound/command", "aplay %s");
875063
+		}
875063
+	}
875063
+#endif
875063
+
875063
 #ifndef _WIN32
875063
 	if (!strcmp(method, "custom")) {
875063
 		const char *sound_cmd;