# HG changeset patch # User Richard Laager # Date 1137653722 0 # Node ID 432894b3bdad973d1ed85754af6d8e4742382ff5 # Parent 586f2b04e0c54079cc66be20ce990538ef02afe6 [gaim-migrate @ 15295] Clean up the display of aliases in tooltips. committer: Tailor Script diff -r 586f2b04e0c5 -r 432894b3bdad src/gtkblist.c --- a/src/gtkblist.c Thu Jan 19 06:53:07 2006 +0000 +++ b/src/gtkblist.c Thu Jan 19 06:55:22 2006 +0000 @@ -2577,6 +2577,9 @@ } else if (GAIM_BLIST_NODE_IS_CONTACT(node) || GAIM_BLIST_NODE_IS_BUDDY(node)) { + /* NOTE: THIS FUNCTION IS NO LONGER CALLED FOR CONTACTS + * See create_tip_for_node(). */ + GaimContact *c; GaimBuddy *b; GaimPresence *presence; @@ -2613,25 +2616,23 @@ g_free(tmp); } - /* Contact Alias */ - if (full && GAIM_BLIST_NODE_IS_CONTACT(node) && - (c->alias != NULL)) - { - tmp = g_markup_escape_text(c->alias, -1); - g_string_append_printf(str, _("\nContact Alias: %s"), tmp); - g_free(tmp); - } - /* Alias */ - if (full && (b->alias != NULL) && (b->alias[0] != '\0')) + /* If there's not a contact alias, the node is being displayed with + * this alias, so there's no point in showing it in the tooltip. */ + if (full && b->alias != NULL && b->alias[0] != '\0' && + (c->alias != NULL && c->alias[0] != '\0')) { tmp = g_markup_escape_text(b->alias, -1); - g_string_append_printf(str, _("\nAlias: %s"), tmp); + g_string_append_printf(str, _("\nBuddy Alias: %s"), tmp); g_free(tmp); } /* Nickname/Server Alias */ - if (full && b->server_alias != NULL) + /* Likewise, only show this if there's a contact or buddy alias. */ + if (full && + b->server_alias != NULL && b->server_alias[0] != '\0' && + ((b->alias != NULL && b->alias[0] != '\0') || + (c->alias != NULL && c->alias[0] != '\0'))) { tmp = g_markup_escape_text(b->server_alias, -1); g_string_append_printf(str, _("\nNickname: %s"), tmp);