Update of /cvsroot/gaim/gaim/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11098/src
Modified Files:
gtkblist.c gtkdialogs.c
Log Message:
(21:52:28) noif: LSchiere: now that datallah's patch is applied, I've got
another that uses the prpl method he added. This makes the add/remove
button on chats update properly when a chat is added or removed from the
list:
Index: gtkblist.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/gtkblist.c,v
retrieving revision 1.172
retrieving revision 1.173
diff -u -d -p -r1.172 -r1.173
--- gtkblist.c 31 Aug 2004 01:45:06 -0000 1.172
+++ gtkblist.c 31 Aug 2004 01:58:52 -0000 1.173
@@ -4112,6 +4112,8 @@ add_chat_cb(GtkWidget *w, GaimGtkAddChat
GaimChat *chat;
GaimGroup *group;
const char *group_name;
+ char *chat_name = NULL;
+ GaimConversation *conv = NULL;
components = g_hash_table_new_full(g_str_hash, g_str_equal,
g_free, g_free);
@@ -4148,6 +4150,18 @@ add_chat_cb(GtkWidget *w, GaimGtkAddChat
if (chat != NULL)
{
gaim_blist_add_chat(chat, group, NULL);
+
+ if (GAIM_PLUGIN_PROTOCOL_INFO(data->account->gc->prpl)->get_chat_name != NULL)
+ chat_name = GAIM_PLUGIN_PROTOCOL_INFO(
+ data->account->gc->prpl)->get_chat_name(chat->components);
+
+ if (chat_name != NULL) {
+ conv = gaim_find_conversation_with_account(chat_name, data->account);
+ g_free(chat_name);
+ }
+
+ if (conv != NULL)
+ gaim_conversation_update(conv, GAIM_CONV_UPDATE_ADD);
}
gtk_widget_destroy(data->window);
Index: gtkdialogs.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/gtkdialogs.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -p -r1.10 -r1.11
--- gtkdialogs.c 31 Aug 2004 01:45:07 -0000 1.10
+++ gtkdialogs.c 31 Aug 2004 01:58:52 -0000 1.11
@@ -865,7 +865,21 @@ gaim_gtkdialogs_remove_buddy(GaimBuddy *
static void
gaim_gtkdialogs_remove_chat_cb(GaimChat *chat)
{
+ char *name = NULL;
+ GaimConversation *conv = NULL;
+
+ if (GAIM_PLUGIN_PROTOCOL_INFO(chat->account->gc->prpl)->get_chat_name != NULL)
+ name = GAIM_PLUGIN_PROTOCOL_INFO(chat->account->gc->prpl)->get_chat_name(chat->components);
+
gaim_blist_remove_chat(chat);
+
+ if (name != NULL) {
+ conv = gaim_find_conversation_with_account(name, chat->account);
+ g_free(name);
+ }
+
+ if (conv != NULL)
+ gaim_conversation_update(conv, GAIM_CONV_UPDATE_REMOVE);
}
void
|