comparison src/pounce.c @ 5943:a4f2aba0848d

[gaim-migrate @ 6384] This should fix corruption in the blist, accounts, and pounces when some protocol plugins cannot load. Some parts of gaim now use the new unique Plugin or Protocol Plugin IDs, while some still use the old protocol numbers. Accounts kind of used both, and when prpls were missing, it had trouble finding accounts. It would find the names, even without mapping the protocol numbers to IDs, and any duplicate accounts would get nuked. That would then affect pounce saving. Anyhow, long story short (well, it's already long, too late for that), this should fix all that mess. And introduce new mess, but hopefully temporary mess. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Mon, 23 Jun 2003 02:00:15 +0000
parents 94ad4d45346a
children a5a43d03cb51
comparison
equal deleted inserted replaced
5942:d0320de18feb 5943:a4f2aba0848d
220 GaimPounceActionData *action_data; 220 GaimPounceActionData *action_data;
221 221
222 g_return_if_fail(pounce != NULL); 222 g_return_if_fail(pounce != NULL);
223 g_return_if_fail(name != NULL); 223 g_return_if_fail(name != NULL);
224 224
225 if (g_hash_table_lookup(pounce->actions, name) != NULL)
226 return;
227
225 action_data = g_new0(GaimPounceActionData, 1); 228 action_data = g_new0(GaimPounceActionData, 1);
226 229
227 action_data->name = g_strdup(name); 230 action_data->name = g_strdup(name);
228 action_data->enabled = FALSE; 231 action_data->enabled = FALSE;
229 action_data->atts = g_hash_table_new_full(g_str_hash, g_str_equal, 232 action_data->atts = g_hash_table_new_full(g_str_hash, g_str_equal,
549 552
550 g_free(data->event_type); 553 g_free(data->event_type);
551 data->event_type = NULL; 554 data->event_type = NULL;
552 } 555 }
553 else if (!strcmp(element_name, "action")) { 556 else if (!strcmp(element_name, "action")) {
557 gaim_pounce_action_register(data->pounce, data->action_name);
554 gaim_pounce_action_set_enabled(data->pounce, data->action_name, TRUE); 558 gaim_pounce_action_set_enabled(data->pounce, data->action_name, TRUE);
555 559
556 g_free(data->action_name); 560 g_free(data->action_name);
557 data->action_name = NULL; 561 data->action_name = NULL;
558 } 562 }