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

34 lines
1.2 KiB
Diff
Raw Normal View History

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