comparison pidgin/gtkconv.c @ 28801:d7c49598cef2

merged with im.pidgin.pidgin
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Sun, 25 Oct 2009 15:30:09 +0900
parents 291c89bfe040 e7bb163434c7
children 2ecd4bc80500
comparison
equal deleted inserted replaced
28780:9c40a91d6c39 28801:d7c49598cef2
4348 int f; 4348 int f;
4349 4349
4350 /* Users */ 4350 /* Users */
4351 for (; l != NULL; l = l->next) { 4351 for (; l != NULL; l = l->next) {
4352 tab_complete_process_item(&most_matched, entered, entered_bytes, &partial, nick_partial, 4352 tab_complete_process_item(&most_matched, entered, entered_bytes, &partial, nick_partial,
4353 &matches, TRUE, ((PurpleConvChatBuddy *)l->data)->name); 4353 &matches, FALSE, ((PurpleConvChatBuddy *)l->data)->name);
4354 } 4354 }
4355 4355
4356 4356
4357 /* Aliases */ 4357 /* Aliases */
4358 if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(model), &iter)) 4358 if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(model), &iter))
7728 g_hash_table_destroy(comps); 7728 g_hash_table_destroy(comps);
7729 } 7729 }
7730 } 7730 }
7731 } 7731 }
7732 7732
7733 static void
7734 account_signing_off(PurpleConnection *gc)
7735 {
7736 GList *list = purple_get_chats();
7737 PurpleAccount *account = purple_connection_get_account(gc);
7738
7739 /* We are about to sign off. See which chats we are currently in, and mark
7740 * them for rejoin on reconnect. */
7741 while (list) {
7742 PurpleConversation *conv = list->data;
7743 if (!purple_conv_chat_has_left(PURPLE_CONV_CHAT(conv)) &&
7744 purple_conversation_get_account(conv) == account) {
7745 purple_conversation_set_data(conv, "want-to-rejoin", GINT_TO_POINTER(TRUE));
7746 purple_conversation_write(conv, NULL, _("The account has disconnected and you are no "
7747 "longer in this chat. You will be automatically rejoined in the chat when "
7748 "the account reconnects."),
7749 PURPLE_MESSAGE_SYSTEM, time(NULL));
7750 }
7751 list = list->next;
7752 }
7753 }
7754
7733 static gboolean 7755 static gboolean
7734 update_buddy_status_timeout(PurpleBuddy *buddy) 7756 update_buddy_status_timeout(PurpleBuddy *buddy)
7735 { 7757 {
7736 /* To remove the signing-on/off door icon */ 7758 /* To remove the signing-on/off door icon */
7737 PurpleConversation *conv; 7759 PurpleConversation *conv;
8225 G_CALLBACK(account_signed_off_cb), 8247 G_CALLBACK(account_signed_off_cb),
8226 GINT_TO_POINTER(PURPLE_CONV_ACCOUNT_ONLINE)); 8248 GINT_TO_POINTER(PURPLE_CONV_ACCOUNT_ONLINE));
8227 purple_signal_connect(purple_connections_get_handle(), "signed-off", handle, 8249 purple_signal_connect(purple_connections_get_handle(), "signed-off", handle,
8228 G_CALLBACK(account_signed_off_cb), 8250 G_CALLBACK(account_signed_off_cb),
8229 GINT_TO_POINTER(PURPLE_CONV_ACCOUNT_OFFLINE)); 8251 GINT_TO_POINTER(PURPLE_CONV_ACCOUNT_OFFLINE));
8252 purple_signal_connect(purple_connections_get_handle(), "signing-off", handle,
8253 G_CALLBACK(account_signing_off), NULL);
8230 8254
8231 purple_signal_connect(purple_conversations_get_handle(), "received-im-msg", 8255 purple_signal_connect(purple_conversations_get_handle(), "received-im-msg",
8232 handle, G_CALLBACK(received_im_msg_cb), NULL); 8256 handle, G_CALLBACK(received_im_msg_cb), NULL);
8233 8257
8234 purple_conversations_set_ui_ops(&conversation_ui_ops); 8258 purple_conversations_set_ui_ops(&conversation_ui_ops);