From: Dario Z. <ev...@us...> - 2005-02-18 09:46:55
|
Update of /cvsroot/gaim-bnet/gaim-bnet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28111 Modified Files: bnet.c chat.c conn.h proto.c Log Message: Fixed a bug about chat windows, where the old ones weren't handled properly. Index: bnet.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/bnet.c,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** bnet.c 10 Feb 2005 16:52:23 -0000 1.37 --- bnet.c 18 Feb 2005 09:46:46 -0000 1.38 *************** *** 264,268 **** NULL, /* roomlist_get_list */ NULL, /* roomlist_cancel */ ! NULL, /* roomlist_expand_catagory */ NULL, /* can_receive_file */ NULL /* send_file */ --- 264,268 ---- NULL, /* roomlist_get_list */ NULL, /* roomlist_cancel */ ! NULL, /* roomlist_expand_category */ NULL, /* can_receive_file */ NULL /* send_file */ Index: proto.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/proto.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** proto.c 9 Feb 2005 18:49:12 -0000 1.23 --- proto.c 18 Feb 2005 09:46:46 -0000 1.24 *************** *** 591,594 **** --- 591,595 ---- const gchar* chan; GaimConnection *gc; + GaimConversation *convo; gc = gaim_account_get_connection(conn->account); *************** *** 597,601 **** if (conn->chan) g_free(conn->chan); - conn->chan = g_strdup(chan); --- 598,601 ---- *************** *** 603,607 **** g_hash_table_foreach_remove(conn->users, bnet_hash_destroy_all, NULL); ! serv_got_joined_chat(gc, ++conn->chan_id, chan); } --- 603,618 ---- g_hash_table_foreach_remove(conn->users, bnet_hash_destroy_all, NULL); ! convo = gaim_find_conversation_with_account(chan, conn->account); ! if (convo) { ! /* Use the old window */ ! GaimConvChat *chat = GAIM_CONV_CHAT(convo); ! conn->chan_id = gaim_conv_chat_get_id(chat); ! gaim_conv_chat_clear_users(chat); ! gaim_conv_chat_write(chat, "", _("Joined channel."), ! GAIM_MESSAGE_SYSTEM, time(0)); ! } else { ! conn->chan_id = conn->chan_id_unique += 1; ! serv_got_joined_chat(gc, conn->chan_id, conn->chan); ! } } Index: chat.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/chat.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** chat.c 3 Feb 2005 15:12:48 -0000 1.5 --- chat.c 18 Feb 2005 09:46:46 -0000 1.6 *************** *** 81,85 **** conn = BNET_CONN(gc->proto_data); chan = g_hash_table_lookup(data, "channel"); - convo = gaim_find_conversation_with_account(conn->chan, conn->account); if (!strcmp(conn->chan, chan)) { --- 81,84 ---- Index: conn.h =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/conn.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** conn.h 3 Feb 2005 15:12:48 -0000 1.8 --- conn.h 18 Feb 2005 09:46:46 -0000 1.9 *************** *** 64,67 **** --- 64,68 ---- gchar *chan; guint chan_id; + guint chan_id_unique; GHashTable *users; |