Mercurial > pidgin
changeset 22611:3bf963b9c715
Add number of occupants to the tooltip for chats. Fixes #3346
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Wed, 02 Apr 2008 12:29:10 +0000 |
parents | 42e94baa86b8 |
children | c3189d5da3bf |
files | pidgin/gtkblist.c |
diffstat | 1 files changed, 10 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/gtkblist.c Wed Apr 02 08:22:47 2008 +0000 +++ b/pidgin/gtkblist.c Wed Apr 02 12:29:10 2008 +0000 @@ -3165,11 +3165,16 @@ chat->account); g_free(chat_name); } - if (conv && prpl_info && (prpl_info->options & OPT_PROTO_CHAT_TOPIC) && - !purple_conv_chat_has_left(PURPLE_CONV_CHAT(conv))) { - char *topic = g_markup_escape_text(purple_conv_chat_get_topic(PURPLE_CONV_CHAT(conv)), -1); - g_string_append_printf(str, _("\n<b>Topic:</b> %s"), topic ? topic : _("(no topic set)")); - g_free(topic); + + if (conv && !purple_conv_chat_has_left(PURPLE_CONV_CHAT(conv))) { + g_string_append_printf(str, _("\n<b>Occupants:</b> %d"), + g_list_length(purple_conv_chat_get_users(PURPLE_CONV_CHAT(conv)))); + + if (prpl_info && (prpl_info->options & OPT_PROTO_CHAT_TOPIC)) { + char *topic = g_markup_escape_text(purple_conv_chat_get_topic(PURPLE_CONV_CHAT(conv)), -1); + g_string_append_printf(str, _("\n<b>Topic:</b> %s"), topic ? topic : _("(no topic set)")); + g_free(topic); + } } if (prpl_info->chat_info != NULL)