Mercurial > pidgin.yaz
comparison src/gaimrc.c @ 1235:a9cf2f61a7b1
[gaim-migrate @ 1245]
1. added protocol names to menus in conversation/join chat dialog. helpful if you're signed on as warmenhoven in both irc and yahoo.
2. made "no sounds when away" mean absolutely no sounds when away.
3. fixed buddy pounces and made it so you can save them.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Tue, 12 Dec 2000 09:09:24 +0000 |
parents | 229bf438c591 |
children | dcf9242241ee |
comparison
equal
deleted
inserted
replaced
1234:cedf7047081e | 1235:a9cf2f61a7b1 |
---|---|
281 | 281 |
282 g_snprintf(b->name, sizeof(b->name), "%s", p->value[0]); | 282 g_snprintf(b->name, sizeof(b->name), "%s", p->value[0]); |
283 g_snprintf(b->message, sizeof(b->message), "%s", p->value[1]); | 283 g_snprintf(b->message, sizeof(b->message), "%s", p->value[1]); |
284 g_snprintf(b->command, sizeof(b->command), "%s", p->value[2]); | 284 g_snprintf(b->command, sizeof(b->command), "%s", p->value[2]); |
285 | 285 |
286 b->popup = atoi(p->value[2]); | 286 b->options = atoi(p->value[3]); |
287 b->sendim = atoi(p->value[3]); | 287 |
288 | 288 g_snprintf(b->pouncer, sizeof(b->pouncer), "%s", p->value[4]); |
289 /* Let's check our version and see what's going on here */ | 289 b->protocol = atoi(p->value[5]); |
290 if ((p->value[4]) && (strlen(p->value[4]) > 0)) | |
291 { | |
292 /* If we have data, lets use it */ | |
293 g_snprintf(b->pouncer, sizeof(b->pouncer), "%s", p->value[4]); | |
294 b->protocol = atoi(p->value[5]); | |
295 b->signon = atoi(p->value[6]); | |
296 b->unaway = atoi(p->value[7]); | |
297 b->unidle = atoi(p->value[8]); | |
298 b->cmd = atoi(p->value[9]); | |
299 } | |
300 else | |
301 { | |
302 /* Otherwise, we have old info. Let's adjust */ | |
303 b->signon = 1; | |
304 b->unaway = 0; | |
305 b->unidle = 0; | |
306 } | |
307 | 290 |
308 filter_break(b->message); | 291 filter_break(b->message); |
309 buddy_pounces = g_list_append(buddy_pounces, b); | 292 buddy_pounces = g_list_append(buddy_pounces, b); |
310 } | 293 } |
311 } | 294 } |
317 struct buddy_pounce *b; | 300 struct buddy_pounce *b; |
318 | 301 |
319 fprintf(f, "pounce {\n"); | 302 fprintf(f, "pounce {\n"); |
320 | 303 |
321 while (pnc) { | 304 while (pnc) { |
322 char *str1, *str2; | 305 char *str1, *str2, *str3; |
323 | 306 |
324 b = (struct buddy_pounce *)pnc->data; | 307 b = (struct buddy_pounce *)pnc->data; |
325 | 308 |
326 str1 = escape_text2(b->name); | 309 str1 = escape_text2(b->name); |
327 if (strlen(b->message)) | 310 if (strlen(b->message)) |
328 str2 = escape_text2(b->message); | 311 str2 = escape_text2(b->message); |
329 else { | 312 else { |
330 str2 = malloc(1); | 313 str2 = malloc(1); |
331 str2[0] = 0; | 314 str2[0] = 0; |
332 } | 315 } |
333 | 316 if (strlen(b->command)) |
334 fprintf(f, "\tentry { %s } { %s } { %d } { %d } { %s } { %d } { %d } { %d } { %d } { %d }\n", str1, str2, b->popup, b->sendim, b->pouncer, b->protocol, b->signon, b->unaway, b->unidle, b->cmd); | 317 str3 = escape_text2(b->command); |
318 else { | |
319 str3 = malloc(1); | |
320 str3[0] = 0; | |
321 } | |
322 | |
323 fprintf(f, "\tentry { %s } { %s } { %s } { %d } { %s } { %d }\n", | |
324 str1, str2, str3, | |
325 b->options, | |
326 b->pouncer, b->protocol); | |
335 | 327 |
336 /* escape_text2 uses malloc(), so we don't want to g_free these */ | 328 /* escape_text2 uses malloc(), so we don't want to g_free these */ |
337 free(str1); | 329 free(str1); |
338 free(str2); | 330 free(str2); |
331 free(str3); | |
339 | 332 |
340 pnc = pnc->next; | 333 pnc = pnc->next; |
341 } | 334 } |
342 | 335 |
343 fprintf(f, "}\n"); | 336 fprintf(f, "}\n"); |