From 866698d42d0a72e717f9fcb039ed12b13bdf4556 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Thu, 4 Dec 2008 16:51:58 +0100 Subject: [PATCH] Fix display problem with color for groups in nicklist --- src/gui/gui-bar-item.c | 12 ++++++++++++ src/plugins/irc/irc-channel.c | 10 +++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/gui/gui-bar-item.c b/src/gui/gui-bar-item.c index def821c78..72c9f7f68 100644 --- a/src/gui/gui-bar-item.c +++ b/src/gui/gui-bar-item.c @@ -1223,6 +1223,18 @@ gui_bar_item_default_buffer_nicklist (void *data, struct t_gui_bar_item *item, { strcat (buf, " "); } + if (strchr (ptr_group->color, '.')) + { + config_file_search_with_string (ptr_group->color, + NULL, NULL, &ptr_option, + NULL); + if (ptr_option) + strcat (buf, gui_color_get_custom (gui_color_get_name (CONFIG_COLOR(ptr_option)))); + } + else + { + strcat (buf, gui_color_get_custom (ptr_group->color)); + } strcat (buf, gui_nicklist_get_group_start (ptr_group->name)); } } diff --git a/src/plugins/irc/irc-channel.c b/src/plugins/irc/irc-channel.c index 05ccb903a..cdce82167 100644 --- a/src/plugins/irc/irc-channel.c +++ b/src/plugins/irc/irc-channel.c @@ -116,15 +116,15 @@ irc_channel_new (struct t_irc_server *server, int channel_type, weechat_buffer_set (new_buffer, "nicklist", "1"); weechat_buffer_set (new_buffer, "nicklist_display_groups", "0"); weechat_nicklist_add_group (new_buffer, NULL, IRC_NICK_GROUP_OP, - "nicklist_group", 1); + "weechat.color.nicklist_group", 1); weechat_nicklist_add_group (new_buffer, NULL, IRC_NICK_GROUP_HALFOP, - "nicklist_group", 1); + "weechat.color.nicklist_group", 1); weechat_nicklist_add_group (new_buffer, NULL, IRC_NICK_GROUP_VOICE, - "nicklist_group", 1); + "weechat.color.nicklist_group", 1); weechat_nicklist_add_group (new_buffer, NULL, IRC_NICK_GROUP_CHANUSER, - "nicklist_group", 1); + "weechat.color.nicklist_group", 1); weechat_nicklist_add_group (new_buffer, NULL, IRC_NICK_GROUP_NORMAL, - "nicklist_group", 1); + "weechat.color.nicklist_group", 1); } /* set highlights settings on channel buffer */