Mercurial > pidgin
diff libpurple/pounce.c @ 25902:be3ba7e07de5
merge of '123d615deaa8daeeea7d7c341a87eab4e83a7958'
and 'e3b2ac4f2d9e6a6bc13c0394f980b28a75765258'
author | Kevin Stange <kevin@simguy.net> |
---|---|
date | Tue, 06 Jan 2009 07:53:19 +0000 |
parents | a6e3cb32cdd2 |
children | 32a707746454 |
line wrap: on
line diff
--- a/libpurple/pounce.c Tue Jan 06 03:46:52 2009 +0000 +++ b/libpurple/pounce.c Tue Jan 06 07:53:19 2009 +0000 @@ -326,7 +326,7 @@ data->buffer = NULL; } - if (!strcmp(element_name, "pounce")) { + if (purple_strequal(element_name, "pounce")) { const char *ui = g_hash_table_lookup(atts, "ui"); if (ui == NULL) { @@ -338,7 +338,7 @@ data->events = 0; } - else if (!strcmp(element_name, "account")) { + else if (purple_strequal(element_name, "account")) { const char *protocol_id = g_hash_table_lookup(atts, "protocol"); if (protocol_id == NULL) { @@ -348,7 +348,7 @@ else data->protocol_id = g_strdup(protocol_id); } - else if (!strcmp(element_name, "option")) { + else if (purple_strequal(element_name, "option")) { const char *type = g_hash_table_lookup(atts, "type"); if (type == NULL) { @@ -358,7 +358,7 @@ else data->option_type = g_strdup(type); } - else if (!strcmp(element_name, "event")) { + else if (purple_strequal(element_name, "event")) { const char *type = g_hash_table_lookup(atts, "type"); if (type == NULL) { @@ -368,7 +368,7 @@ else data->event_type = g_strdup(type); } - else if (!strcmp(element_name, "action")) { + else if (purple_strequal(element_name, "action")) { const char *type = g_hash_table_lookup(atts, "type"); if (type == NULL) { @@ -378,7 +378,7 @@ else data->action_name = g_strdup(type); } - else if (!strcmp(element_name, "param")) { + else if (purple_strequal(element_name, "param")) { const char *param_name = g_hash_table_lookup(atts, "name"); if (param_name == NULL) { @@ -404,7 +404,7 @@ data->buffer = NULL; } - if (!strcmp(element_name, "account")) { + if (purple_strequal(element_name, "account")) { char *tmp; g_free(data->account_name); data->account_name = g_strdup(buffer); @@ -412,43 +412,43 @@ data->protocol_id = g_strdup(_purple_oscar_convert(buffer, tmp)); g_free(tmp); } - else if (!strcmp(element_name, "pouncee")) { + else if (purple_strequal(element_name, "pouncee")) { g_free(data->pouncee); data->pouncee = g_strdup(buffer); } - else if (!strcmp(element_name, "option")) { - if (!strcmp(data->option_type, "on-away")) + else if (purple_strequal(element_name, "option")) { + if (purple_strequal(data->option_type, "on-away")) data->options |= PURPLE_POUNCE_OPTION_AWAY; g_free(data->option_type); data->option_type = NULL; } - else if (!strcmp(element_name, "event")) { - if (!strcmp(data->event_type, "sign-on")) + else if (purple_strequal(element_name, "event")) { + if (purple_strequal(data->event_type, "sign-on")) data->events |= PURPLE_POUNCE_SIGNON; - else if (!strcmp(data->event_type, "sign-off")) + else if (purple_strequal(data->event_type, "sign-off")) data->events |= PURPLE_POUNCE_SIGNOFF; - else if (!strcmp(data->event_type, "away")) + else if (purple_strequal(data->event_type, "away")) data->events |= PURPLE_POUNCE_AWAY; - else if (!strcmp(data->event_type, "return-from-away")) + else if (purple_strequal(data->event_type, "return-from-away")) data->events |= PURPLE_POUNCE_AWAY_RETURN; - else if (!strcmp(data->event_type, "idle")) + else if (purple_strequal(data->event_type, "idle")) data->events |= PURPLE_POUNCE_IDLE; - else if (!strcmp(data->event_type, "return-from-idle")) + else if (purple_strequal(data->event_type, "return-from-idle")) data->events |= PURPLE_POUNCE_IDLE_RETURN; - else if (!strcmp(data->event_type, "start-typing")) + else if (purple_strequal(data->event_type, "start-typing")) data->events |= PURPLE_POUNCE_TYPING; - else if (!strcmp(data->event_type, "typed")) + else if (purple_strequal(data->event_type, "typed")) data->events |= PURPLE_POUNCE_TYPED; - else if (!strcmp(data->event_type, "stop-typing")) + else if (purple_strequal(data->event_type, "stop-typing")) data->events |= PURPLE_POUNCE_TYPING_STOPPED; - else if (!strcmp(data->event_type, "message-received")) + else if (purple_strequal(data->event_type, "message-received")) data->events |= PURPLE_POUNCE_MESSAGE_RECEIVED; g_free(data->event_type); data->event_type = NULL; } - else if (!strcmp(element_name, "action")) { + else if (purple_strequal(element_name, "action")) { if (data->pounce != NULL) { purple_pounce_action_register(data->pounce, data->action_name); purple_pounce_action_set_enabled(data->pounce, data->action_name, TRUE); @@ -457,7 +457,7 @@ g_free(data->action_name); data->action_name = NULL; } - else if (!strcmp(element_name, "param")) { + else if (purple_strequal(element_name, "param")) { if (data->pounce != NULL) { purple_pounce_action_set_attribute(data->pounce, data->action_name, data->param_name, buffer); @@ -466,7 +466,7 @@ g_free(data->param_name); data->param_name = NULL; } - else if (!strcmp(element_name, "events")) { + else if (purple_strequal(element_name, "events")) { PurpleAccount *account; account = purple_accounts_find(data->account_name, data->protocol_id); @@ -499,11 +499,11 @@ g_free(data->pouncee); data->pouncee = NULL; } - else if (!strcmp(element_name, "save")) { + else if (purple_strequal(element_name, "save")) { if (data->pounce != NULL) purple_pounce_set_save(data->pounce, TRUE); } - else if (!strcmp(element_name, "pounce")) { + else if (purple_strequal(element_name, "pounce")) { data->pounce = NULL; data->events = 0; data->options = 0; @@ -1023,7 +1023,7 @@ for (iter = pounces; iter; iter = iter->next) { PurplePounce *pounce = iter->data; - if (pounce->ui_type && strcmp(pounce->ui_type, ui) == 0) + if (purple_strequal(pounce->ui_type, ui)) list = g_list_prepend(list, pounce); } list = g_list_reverse(list);