Mercurial > pidgin.yaz
changeset 20205:859087457089
applied changes from 8075949b7612e77d6eaa5f0d3cbf98f40715f948
through eb1951eba818e1546adcc94663d5ddf24daee725
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Fri, 28 Sep 2007 15:35:18 +0000 |
parents | de68625c4c04 |
children | 4e62cf5facac |
files | libpurple/blist.c |
diffstat | 1 files changed, 22 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/blist.c Fri Sep 28 15:35:00 2007 +0000 +++ b/libpurple/blist.c Fri Sep 28 15:35:18 2007 +0000 @@ -843,6 +843,13 @@ ops->update(purplebuddylist, (PurpleBlistNode *)buddy); } +static gboolean +purple_strings_are_different(const char *one, const char *two) +{ + return !((one && two && g_utf8_collate(one, two) == 0) || + ((one == NULL || *one == '\0') && (two == NULL || *two == '\0'))); +} + void purple_blist_alias_contact(PurpleContact *contact, const char *alias) { PurpleBlistUiOps *ops = purple_blist_get_ui_ops(); @@ -852,6 +859,9 @@ g_return_if_fail(contact != NULL); + if (!purple_strings_are_different(contact->alias, alias)) + return; + old_alias = contact->alias; if ((alias != NULL) && (*alias != '\0')) @@ -886,6 +896,9 @@ g_return_if_fail(chat != NULL); + if (!purple_strings_are_different(chat->alias, alias)) + return; + old_alias = chat->alias; if ((alias != NULL) && (*alias != '\0')) @@ -911,6 +924,9 @@ g_return_if_fail(buddy != NULL); + if (!purple_strings_are_different(buddy->alias, alias)) + return; + old_alias = buddy->alias; if ((alias != NULL) && (*alias != '\0')) @@ -941,6 +957,9 @@ g_return_if_fail(buddy != NULL); + if (!purple_strings_are_different(buddy->server_alias, alias)) + return; + old_alias = buddy->server_alias; if ((alias != NULL) && (*alias != '\0') && g_utf8_validate(alias, -1, NULL)) @@ -1428,6 +1447,9 @@ g_return_if_fail(contact != NULL); + if (!purple_strings_are_different(contact->alias, alias)) + return; + old_alias = contact->alias; if ((alias != NULL) && (*alias != '\0'))