# HG changeset patch # User Richard Laager # Date 1133814840 0 # Node ID d1af58b4a4635e534cb2f0132d6ad9c6f0b37b20 # Parent 8dd086d0f2b3ce713c389cfb2751be00da438b8d [gaim-migrate @ 14662] This will save us from having to parse the send color for every buddy we add to a chat. That's probably not a big savings, but every little bit helps, right? Yeah, totally untested. committer: Tailor Script diff -r 8dd086d0f2b3 -r d1af58b4a463 src/gtkconv.c --- a/src/gtkconv.c Mon Dec 05 19:47:52 2005 +0000 +++ b/src/gtkconv.c Mon Dec 05 20:34:00 2005 +0000 @@ -3011,9 +3011,6 @@ GtkTreeIter iter; gboolean is_me = FALSE; gboolean is_buddy; - GdkColor send_color; - - gdk_color_parse(SEND_COLOR, &send_color); chat = GAIM_CONV_CHAT(conv); gtkconv = GAIM_GTK_CONVERSATION(conv); @@ -3033,14 +3030,32 @@ is_buddy = (gaim_find_buddy(conv->account, name) != NULL); gtk_list_store_append(ls, &iter); - gtk_list_store_set(ls, &iter, - CHAT_USERS_ICON_COLUMN, pixbuf, - CHAT_USERS_ALIAS_COLUMN, alias, - CHAT_USERS_NAME_COLUMN, name, - CHAT_USERS_FLAGS_COLUMN, flags, - CHAT_USERS_COLOR_COLUMN, is_me ? &send_color : get_nick_color(gtkconv, alias), - CHAT_USERS_BUDDY_COLUMN, is_buddy, - -1); + + if (is_me) + { + GdkColor send_color; + gdk_color_parse(SEND_COLOR, &send_color); + + gtk_list_store_set(ls, &iter, + CHAT_USERS_ICON_COLUMN, pixbuf, + CHAT_USERS_ALIAS_COLUMN, alias, + CHAT_USERS_NAME_COLUMN, name, + CHAT_USERS_FLAGS_COLUMN, flags, + CHAT_USERS_COLOR_COLUMN, &send_color, + CHAT_USERS_BUDDY_COLUMN, is_buddy, + -1); + } + else + { + gtk_list_store_set(ls, &iter, + CHAT_USERS_ICON_COLUMN, pixbuf, + CHAT_USERS_ALIAS_COLUMN, alias, + CHAT_USERS_NAME_COLUMN, name, + CHAT_USERS_FLAGS_COLUMN, flags, + CHAT_USERS_COLOR_COLUMN, get_nick_color(gtkconv, alias), + CHAT_USERS_BUDDY_COLUMN, is_buddy, + -1); + } if (pixbuf) g_object_unref(pixbuf);