Mercurial > pidgin.yaz
diff pidgin/gtkblist.c @ 18211:84b577372b90
Show screenname instead of alias in conversation infopanes
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Wed, 20 Jun 2007 20:14:17 +0000 |
parents | 669dc8404b56 |
children | 77b9ceb83426 |
line wrap: on
line diff
--- a/pidgin/gtkblist.c Wed Jun 20 18:23:49 2007 +0000 +++ b/pidgin/gtkblist.c Wed Jun 20 20:14:17 2007 +0000 @@ -3284,7 +3284,7 @@ return ret; } -gchar *pidgin_blist_get_name_markup(PurpleBuddy *b, gboolean selected) +gchar *pidgin_blist_get_name_markup(PurpleBuddy *b, gboolean selected, gboolean aliased) { const char *name; char *esc, *text = NULL; @@ -3309,15 +3309,19 @@ } /* XXX Good luck cleaning up this crap */ - - contact = (PurpleContact*)((PurpleBlistNode*)b)->parent; - if(contact) - gtkcontactnode = ((PurpleBlistNode*)contact)->ui_data; - - if(gtkcontactnode && !gtkcontactnode->contact_expanded && contact->alias) - name = contact->alias; - else - name = purple_buddy_get_alias(b); + if (aliased) { + contact = (PurpleContact*)((PurpleBlistNode*)b)->parent; + if(contact) + gtkcontactnode = ((PurpleBlistNode*)contact)->ui_data; + + if(gtkcontactnode && !gtkcontactnode->contact_expanded && contact->alias) + name = contact->alias; + else + name = purple_buddy_get_alias(b); + } else { + name = b->name; + } + esc = g_markup_escape_text(name, strlen(name)); presence = purple_buddy_get_presence(b); @@ -4971,7 +4975,7 @@ } emblem = pidgin_blist_get_emblem((PurpleBlistNode*) buddy); - mark = pidgin_blist_get_name_markup(buddy, selected); + mark = pidgin_blist_get_name_markup(buddy, selected, TRUE); if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_idle_time") && purple_presence_is_idle(presence) &&