pidgin/gtkconv.c

changeset 20622
30e148be3e2c
parent 20614
0e5b2115c99d
child 20623
bc3d2a1eb54a
child 20684
4daaf3284863
child 20747
c7494ef1530d
child 20791
0ce6682959f1
equal deleted inserted replaced
20621:845d0a325350 20622:30e148be3e2c
7239 * one of the contacts containing the buddy corresponding to 7239 * one of the contacts containing the buddy corresponding to
7240 * a conversation. It's easier to just update them all. */ 7240 * a conversation. It's easier to just update them all. */
7241 /* if (purple_conversation_get_account(conv) == account) */ 7241 /* if (purple_conversation_get_account(conv) == account) */
7242 pidgin_conv_update_fields(conv, PIDGIN_CONV_TAB_ICON | 7242 pidgin_conv_update_fields(conv, PIDGIN_CONV_TAB_ICON |
7243 PIDGIN_CONV_MENU | PIDGIN_CONV_COLORIZE_TITLE); 7243 PIDGIN_CONV_MENU | PIDGIN_CONV_COLORIZE_TITLE);
7244
7245 if (PURPLE_CONNECTION_IS_CONNECTED(gc) &&
7246 conv->type == PURPLE_CONV_TYPE_CHAT &&
7247 conv->account == gc->account &&
7248 purple_conversation_get_data(conv, "want-to-rejoin")) {
7249 GHashTable *comps = NULL;
7250 PurpleChat *chat = purple_blist_find_chat(conv->account, conv->name);
7251 if (chat == NULL) {
7252 if (PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->chat_info_defaults != NULL)
7253 comps = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl)->chat_info_defaults(gc, conv->name);
7254 } else {
7255 comps = chat->components;
7256 }
7257 serv_join_chat(gc, comps);
7258 if (chat == NULL && comps != NULL)
7259 g_hash_table_destroy(comps);
7260 }
7244 } 7261 }
7245 } 7262 }
7246 7263
7247 static gboolean 7264 static gboolean
7248 update_buddy_status_timeout(PurpleBuddy *buddy) 7265 update_buddy_status_timeout(PurpleBuddy *buddy)
7383 } 7400 }
7384 gtkconv->attach.timer = timer; 7401 gtkconv->attach.timer = timer;
7385 if (gtkconv->attach.current) 7402 if (gtkconv->attach.current)
7386 return TRUE; 7403 return TRUE;
7387 7404
7405 g_object_set_data(G_OBJECT(gtkconv->entry), "attach-start-time", NULL);
7388 purple_signal_emit(pidgin_conversations_get_handle(), 7406 purple_signal_emit(pidgin_conversations_get_handle(),
7389 "conversation-displayed", gtkconv); 7407 "conversation-displayed", gtkconv);
7390 g_source_remove(gtkconv->attach.timer); 7408 g_source_remove(gtkconv->attach.timer);
7391 gtkconv->attach.timer = 0; 7409 gtkconv->attach.timer = 0;
7392 return FALSE; 7410 return FALSE;
7423 } 7441 }
7424 7442
7425 timer = GPOINTER_TO_INT(purple_conversation_get_data(conv, "close-timer")); 7443 timer = GPOINTER_TO_INT(purple_conversation_get_data(conv, "close-timer"));
7426 if (timer) 7444 if (timer)
7427 purple_timeout_remove(timer); 7445 purple_timeout_remove(timer);
7428
7429 return TRUE; 7446 return TRUE;
7430 } 7447 }
7431 7448
7432 void * 7449 void *
7433 pidgin_conversations_get_handle(void) 7450 pidgin_conversations_get_handle(void)

mercurial