# HG changeset patch # User Sean Egan # Date 1182370457 0 # Node ID 84b577372b90d1732ec1cde83bc66c088bff9b66 # Parent b8572b937c090389b45813459351570c75dfb250 Show screenname instead of alias in conversation infopanes diff -r b8572b937c09 -r 84b577372b90 pidgin/gtkblist.c --- 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) && diff -r b8572b937c09 -r 84b577372b90 pidgin/gtkblist.h --- a/pidgin/gtkblist.h Wed Jun 20 18:23:49 2007 +0000 +++ b/pidgin/gtkblist.h Wed Jun 20 20:14:17 2007 +0000 @@ -365,8 +365,9 @@ * * @param buddy The buddy to return markup from * @param selected Whether this buddy is selected. If TRUE, the markup will not change the color. + * @param aliased TRUE to return the appropriate alias of this buddy, FALSE to return its screenname * @return The markup for this buddy */ -gchar *pidgin_blist_get_name_markup(PurpleBuddy *buddy, gboolean selected); +gchar *pidgin_blist_get_name_markup(PurpleBuddy *buddy, gboolean selected, gboolean aliased); #endif /* _PIDGINBLIST_H_ */ diff -r b8572b937c09 -r 84b577372b90 pidgin/gtkconv.c --- a/pidgin/gtkconv.c Wed Jun 20 18:23:49 2007 +0000 +++ b/pidgin/gtkconv.c Wed Jun 20 20:14:17 2007 +0000 @@ -6177,7 +6177,7 @@ buddy = purple_find_buddy(account, conv->name); if (buddy) - markup = pidgin_blist_get_name_markup(buddy, FALSE); + markup = pidgin_blist_get_name_markup(buddy, FALSE, FALSE); else markup = title; gtk_list_store_set(gtkconv->infopane_model, &(gtkconv->infopane_iter),