comparison src/pounce.c @ 12002:06065a4847ff

[gaim-migrate @ 14295] When loading our pounces from pounces.xml, if we have a pounce for an account that does not exist, then we remove the pounce from the list. My two changes: 1. Save pounces.xml if this happens 2. Don't print an error when trying to add the pounce to our list when data->pounce is NULL (this happens in the scenario described above) committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 07 Nov 2005 04:59:35 +0000
parents cb73483c9f63
children ebed1bbedb04
comparison
equal deleted inserted replaced
12001:8bcccf2988fa 12002:06065a4847ff
428 data->protocol_id = NULL; 428 data->protocol_id = NULL;
429 429
430 if (account == NULL) { 430 if (account == NULL) {
431 gaim_debug(GAIM_DEBUG_ERROR, "pounce", 431 gaim_debug(GAIM_DEBUG_ERROR, "pounce",
432 "Account for pounce not found!\n"); 432 "Account for pounce not found!\n");
433 /*
434 * This pounce has effectively been removed, so make
435 * sure that we save the changes to pounces.xml
436 */
437 schedule_pounces_save();
433 } 438 }
434 else { 439 else {
435 gaim_debug(GAIM_DEBUG_INFO, "pounce", 440 gaim_debug(GAIM_DEBUG_INFO, "pounce",
436 "Creating pounce: %s, %s\n", data->ui_name, 441 "Creating pounce: %s, %s\n", data->ui_name,
437 data->pouncee); 442 data->pouncee);
442 447
443 g_free(data->pouncee); 448 g_free(data->pouncee);
444 data->pouncee = NULL; 449 data->pouncee = NULL;
445 } 450 }
446 else if (!strcmp(element_name, "save")) { 451 else if (!strcmp(element_name, "save")) {
447 gaim_pounce_set_save(data->pounce, TRUE); 452 if (data->pounce != NULL)
453 gaim_pounce_set_save(data->pounce, TRUE);
448 } 454 }
449 else if (!strcmp(element_name, "pounce")) { 455 else if (!strcmp(element_name, "pounce")) {
450 data->pounce = NULL; 456 data->pounce = NULL;
451 data->events = 0; 457 data->events = 0;
452 458