diff src/gaimrc.c @ 1694:bea407767ac1

[gaim-migrate @ 1704] Sounds on buddy pounce. This may need a better AU file, im not sure yet. committer: Tailor Script <tailor@pidgin.im>
author Rob Flynn <gaim@robflynn.com>
date Mon, 09 Apr 2001 08:33:09 +0000
parents 72235e3fcff6
children f42ce672c560
line wrap: on
line diff
--- a/src/gaimrc.c	Sun Apr 08 20:20:56 2001 +0000
+++ b/src/gaimrc.c	Mon Apr 09 08:33:09 2001 +0000
@@ -281,6 +281,8 @@
 			g_snprintf(b->pouncer, sizeof(b->pouncer), "%s", p->value[4]);
 			b->protocol = atoi(p->value[5]);
 
+			g_snprintf(b->sound, sizeof(b->sound), "%s", p->value[6]);
+			
 			filter_break(b->message);
 			buddy_pounces = g_list_append(buddy_pounces, b);
 		}
@@ -295,7 +297,7 @@
 	fprintf(f, "pounce {\n");
 
 	while (pnc) {
-		char *str1, *str2, *str3;
+		char *str1, *str2, *str3, *str4;
 
 		b = (struct buddy_pounce *)pnc->data;
 
@@ -312,14 +314,21 @@
 			str3 = malloc(1);
 			str3[0] = 0;
 		}
+		if (strlen(b->sound))
+			str4 = escape_text2(b->sound);
+		else {
+			str4 = malloc(1);
+			str4[0] = 0;
+		}
 
-		fprintf(f, "\tentry { %s } { %s } { %s } { %d } { %s } { %d }\n",
-			str1, str2, str3, b->options, b->pouncer, b->protocol);
+		fprintf(f, "\tentry { %s } { %s } { %s } { %d } { %s } { %d } { %s }\n",
+			str1, str2, str3, b->options, b->pouncer, b->protocol, str4);
 
 		/* escape_text2 uses malloc(), so we don't want to g_free these */
 		free(str1);
 		free(str2);
 		free(str3);
+		free(str4);
 
 		pnc = pnc->next;
 	}