Mercurial > pidgin.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
1693:6ccd49e6f24c | 1694:bea407767ac1 |
---|---|
279 b->options = atoi(p->value[3]); | 279 b->options = atoi(p->value[3]); |
280 | 280 |
281 g_snprintf(b->pouncer, sizeof(b->pouncer), "%s", p->value[4]); | 281 g_snprintf(b->pouncer, sizeof(b->pouncer), "%s", p->value[4]); |
282 b->protocol = atoi(p->value[5]); | 282 b->protocol = atoi(p->value[5]); |
283 | 283 |
284 g_snprintf(b->sound, sizeof(b->sound), "%s", p->value[6]); | |
285 | |
284 filter_break(b->message); | 286 filter_break(b->message); |
285 buddy_pounces = g_list_append(buddy_pounces, b); | 287 buddy_pounces = g_list_append(buddy_pounces, b); |
286 } | 288 } |
287 } | 289 } |
288 } | 290 } |
293 struct buddy_pounce *b; | 295 struct buddy_pounce *b; |
294 | 296 |
295 fprintf(f, "pounce {\n"); | 297 fprintf(f, "pounce {\n"); |
296 | 298 |
297 while (pnc) { | 299 while (pnc) { |
298 char *str1, *str2, *str3; | 300 char *str1, *str2, *str3, *str4; |
299 | 301 |
300 b = (struct buddy_pounce *)pnc->data; | 302 b = (struct buddy_pounce *)pnc->data; |
301 | 303 |
302 str1 = escape_text2(b->name); | 304 str1 = escape_text2(b->name); |
303 if (strlen(b->message)) | 305 if (strlen(b->message)) |
310 str3 = escape_text2(b->command); | 312 str3 = escape_text2(b->command); |
311 else { | 313 else { |
312 str3 = malloc(1); | 314 str3 = malloc(1); |
313 str3[0] = 0; | 315 str3[0] = 0; |
314 } | 316 } |
315 | 317 if (strlen(b->sound)) |
316 fprintf(f, "\tentry { %s } { %s } { %s } { %d } { %s } { %d }\n", | 318 str4 = escape_text2(b->sound); |
317 str1, str2, str3, b->options, b->pouncer, b->protocol); | 319 else { |
320 str4 = malloc(1); | |
321 str4[0] = 0; | |
322 } | |
323 | |
324 fprintf(f, "\tentry { %s } { %s } { %s } { %d } { %s } { %d } { %s }\n", | |
325 str1, str2, str3, b->options, b->pouncer, b->protocol, str4); | |
318 | 326 |
319 /* escape_text2 uses malloc(), so we don't want to g_free these */ | 327 /* escape_text2 uses malloc(), so we don't want to g_free these */ |
320 free(str1); | 328 free(str1); |
321 free(str2); | 329 free(str2); |
322 free(str3); | 330 free(str3); |
331 free(str4); | |
323 | 332 |
324 pnc = pnc->next; | 333 pnc = pnc->next; |
325 } | 334 } |
326 | 335 |
327 fprintf(f, "}\n"); | 336 fprintf(f, "}\n"); |