comparison pidgin/gtkconv.c @ 29613:e3206d6da6c7

propagate from branch 'im.pidgin.pidgin' (head bc551a0f3f61b07c37e8677925b1aeae91e849be) to branch 'im.pidgin.pidgin.next.minor' (head 6d87b28fb7d202e9e5cf6700c99d9f140fdcd245)
author John Bailey <rekkanoryo@rekkanoryo.org>
date Sat, 31 Oct 2009 17:52:54 +0000
parents c095f1795112 e7bb163434c7
children 7b1cfd48beab
comparison
equal deleted inserted replaced
29612:a78a44f0cdcd 29613:e3206d6da6c7
4254 int f; 4254 int f;
4255 4255
4256 /* Users */ 4256 /* Users */
4257 for (; l != NULL; l = l->next) { 4257 for (; l != NULL; l = l->next) {
4258 tab_complete_process_item(&most_matched, entered, entered_bytes, &partial, nick_partial, 4258 tab_complete_process_item(&most_matched, entered, entered_bytes, &partial, nick_partial,
4259 &matches, TRUE, ((PurpleConvChatBuddy *)l->data)->name); 4259 &matches, FALSE, ((PurpleConvChatBuddy *)l->data)->name);
4260 } 4260 }
4261 4261
4262 4262
4263 /* Aliases */ 4263 /* Aliases */
4264 if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(model), &iter)) 4264 if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(model), &iter))
7532 g_hash_table_destroy(comps); 7532 g_hash_table_destroy(comps);
7533 } 7533 }
7534 } 7534 }
7535 } 7535 }
7536 7536
7537 static void
7538 account_signing_off(PurpleConnection *gc)
7539 {
7540 GList *list = purple_get_chats();
7541 PurpleAccount *account = purple_connection_get_account(gc);
7542
7543 /* We are about to sign off. See which chats we are currently in, and mark
7544 * them for rejoin on reconnect. */
7545 while (list) {
7546 PurpleConversation *conv = list->data;
7547 if (!purple_conv_chat_has_left(PURPLE_CONV_CHAT(conv)) &&
7548 purple_conversation_get_account(conv) == account) {
7549 purple_conversation_set_data(conv, "want-to-rejoin", GINT_TO_POINTER(TRUE));
7550 purple_conversation_write(conv, NULL, _("The account has disconnected and you are no "
7551 "longer in this chat. You will be automatically rejoined in the chat when "
7552 "the account reconnects."),
7553 PURPLE_MESSAGE_SYSTEM, time(NULL));
7554 }
7555 list = list->next;
7556 }
7557 }
7558
7537 static gboolean 7559 static gboolean
7538 update_buddy_status_timeout(PurpleBuddy *buddy) 7560 update_buddy_status_timeout(PurpleBuddy *buddy)
7539 { 7561 {
7540 /* To remove the signing-on/off door icon */ 7562 /* To remove the signing-on/off door icon */
7541 PurpleConversation *conv; 7563 PurpleConversation *conv;
8026 G_CALLBACK(account_signed_off_cb), 8048 G_CALLBACK(account_signed_off_cb),
8027 GINT_TO_POINTER(PURPLE_CONV_ACCOUNT_ONLINE)); 8049 GINT_TO_POINTER(PURPLE_CONV_ACCOUNT_ONLINE));
8028 purple_signal_connect(purple_connections_get_handle(), "signed-off", handle, 8050 purple_signal_connect(purple_connections_get_handle(), "signed-off", handle,
8029 G_CALLBACK(account_signed_off_cb), 8051 G_CALLBACK(account_signed_off_cb),
8030 GINT_TO_POINTER(PURPLE_CONV_ACCOUNT_OFFLINE)); 8052 GINT_TO_POINTER(PURPLE_CONV_ACCOUNT_OFFLINE));
8053 purple_signal_connect(purple_connections_get_handle(), "signing-off", handle,
8054 G_CALLBACK(account_signing_off), NULL);
8031 8055
8032 purple_signal_connect(purple_conversations_get_handle(), "received-im-msg", 8056 purple_signal_connect(purple_conversations_get_handle(), "received-im-msg",
8033 handle, G_CALLBACK(received_im_msg_cb), NULL); 8057 handle, G_CALLBACK(received_im_msg_cb), NULL);
8034 8058
8035 purple_conversations_set_ui_ops(&conversation_ui_ops); 8059 purple_conversations_set_ui_ops(&conversation_ui_ops);