Mercurial > pidgin.yaz
diff src/protocols/qq/group_conv.c @ 14021:ef8490f9e823
[gaim-migrate @ 16618]
Replaced all C++-style comments with C-style ones.
Cleaned up some comments and implemented a more consistent formatting scheme.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Huetsch <markhuetsch> |
---|---|
date | Wed, 02 Aug 2006 15:35:36 +0000 |
parents | 983fd420e86b |
children |
line wrap: on
line diff
--- a/src/protocols/qq/group_conv.c Wed Aug 02 13:37:13 2006 +0000 +++ b/src/protocols/qq/group_conv.c Wed Aug 02 15:35:36 2006 +0000 @@ -20,19 +20,16 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -// START OF FILE -/*****************************************************************************/ -#include <glib.h> // GList -#include "conversation.h" // GaimConversation +#include <glib.h> +#include "conversation.h" -#include "utils.h" // uid_to_gaim_name -#include "buddy_status.h" // is_online +#include "buddy_status.h" #include "group_conv.h" -#include "qq.h" // qq_buddy +#include "qq.h" +#include "utils.h" -/*****************************************************************************/ -// show group conversation window -void qq_group_conv_show_window(GaimConnection * gc, qq_group * group) +/* show group conversation window */ +void qq_group_conv_show_window(GaimConnection *gc, qq_group *group) { GaimConversation *conv; qq_data *qd; @@ -40,14 +37,13 @@ g_return_if_fail(gc != NULL && gc->proto_data != NULL && group != NULL); qd = (qq_data *) gc->proto_data; - conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, /* add by gfhuang */group->group_name_utf8, gaim_connection_get_account(gc)); - if (conv == NULL) // show only one window per group + conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, group->group_name_utf8, gaim_connection_get_account(gc)); + if (conv == NULL) /* show only one window per group */ serv_got_joined_chat(gc, qd->channel++, group->group_name_utf8); -} // qq_group_conv_show_window +} -/*****************************************************************************/ -// refresh online member in group conversation window -void qq_group_conv_refresh_online_member(GaimConnection * gc, qq_group * group) +/* refresh online member in group conversation window */ +void qq_group_conv_refresh_online_member(GaimConnection *gc, qq_group *group) { GList *names, *list, *flags; qq_buddy *member; @@ -58,45 +54,34 @@ names = NULL; flags = NULL; - conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT /*gfhuang*/, group->group_name_utf8, gaim_connection_get_account(gc)); + conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, group->group_name_utf8, gaim_connection_get_account(gc)); if (conv != NULL && group->members != NULL) { list = group->members; while (list != NULL) { member = (qq_buddy *) list->data; - //always put it even offline, by gfhuang + /* always put it even offline */ names = g_list_append(names, (member->nickname != NULL) ? g_strdup(member->nickname) : uid_to_gaim_name(member->uid)); flag = 0; - if (is_online(member->status)) flag |= (GAIM_CBFLAGS_TYPING | GAIM_CBFLAGS_VOICE); // TYPING to put online above OP and FOUNDER + /* TYPING to put online above OP and FOUNDER */ + if (is_online(member->status)) flag |= (GAIM_CBFLAGS_TYPING | GAIM_CBFLAGS_VOICE); if(1 == (member->role & 1)) flag |= GAIM_CBFLAGS_OP; - //if(4 == (member->role & 4)) flag |= GAIM_CBFLAGS_VOICE; //active, no use if(member->uid == group->creator_uid) flag |= GAIM_CBFLAGS_FOUNDER; flags = g_list_append(flags, GINT_TO_POINTER(flag)); list = list->next; - } // while list + } gaim_conv_chat_clear_users(GAIM_CONV_CHAT(conv)); - gaim_conv_chat_add_users(GAIM_CONV_CHAT(conv), names, NULL /*gfhuang*/, flags, FALSE /*gfhuang*/); - } // if conv - // clean up names + gaim_conv_chat_add_users(GAIM_CONV_CHAT(conv), names, NULL, flags, FALSE); + } + /* clean up names */ while (names != NULL) { member_name = (gchar *) names->data; names = g_list_remove(names, member_name); g_free(member_name); - } // while name - // clean up flags, NOOOOOOOOOOOOOOOOOOOOOOO!!!!!! bugs, flags is not name! got by gfhuang - /* - while (flags != NULL) { - member_name = (gchar *) flags->data; - flags = g_list_remove(flags, member_name); - g_free(member_name); } - */ g_list_free(flags); -} // qq_group_conv_show_window - -/*****************************************************************************/ -// END OF FILE +}