pidgin/gtkconv.c

changeset 28716
97be946ff188
parent 28616
f9f308f6b293
child 28729
93b39c16fb3b
equal deleted inserted replaced
28714:d14fe5e97aa7 28716:97be946ff188
4275 int f; 4275 int f;
4276 4276
4277 /* Users */ 4277 /* Users */
4278 for (; l != NULL; l = l->next) { 4278 for (; l != NULL; l = l->next) {
4279 tab_complete_process_item(&most_matched, entered, entered_bytes, &partial, nick_partial, 4279 tab_complete_process_item(&most_matched, entered, entered_bytes, &partial, nick_partial,
4280 &matches, TRUE, ((PurpleConvChatBuddy *)l->data)->name); 4280 &matches, FALSE, ((PurpleConvChatBuddy *)l->data)->name);
4281 } 4281 }
4282 4282
4283 4283
4284 /* Aliases */ 4284 /* Aliases */
4285 if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(model), &iter)) 4285 if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(model), &iter))
7599 g_hash_table_destroy(comps); 7599 g_hash_table_destroy(comps);
7600 } 7600 }
7601 } 7601 }
7602 } 7602 }
7603 7603
7604 static void
7605 account_signing_off(PurpleConnection *gc)
7606 {
7607 GList *list = purple_get_chats();
7608
7609 /* We are about to sign off. See which chats we are currently in, and mark
7610 * them for rejoin on reconnect. */
7611 while (list) {
7612 PurpleConversation *conv = list->data;
7613 if (!purple_conv_chat_has_left(PURPLE_CONV_CHAT(conv))) {
7614 purple_conversation_set_data(conv, "want-to-rejoin", GINT_TO_POINTER(TRUE));
7615 purple_conversation_write(conv, NULL, _("The account has disconnected and you are no "
7616 "longer in this chat. You will be automatically rejoined in the chat when "
7617 "the account reconnects."),
7618 PURPLE_MESSAGE_SYSTEM, time(NULL));
7619 }
7620 list = list->next;
7621 }
7622 }
7623
7604 static gboolean 7624 static gboolean
7605 update_buddy_status_timeout(PurpleBuddy *buddy) 7625 update_buddy_status_timeout(PurpleBuddy *buddy)
7606 { 7626 {
7607 /* To remove the signing-on/off door icon */ 7627 /* To remove the signing-on/off door icon */
7608 PurpleConversation *conv; 7628 PurpleConversation *conv;
8093 G_CALLBACK(account_signed_off_cb), 8113 G_CALLBACK(account_signed_off_cb),
8094 GINT_TO_POINTER(PURPLE_CONV_ACCOUNT_ONLINE)); 8114 GINT_TO_POINTER(PURPLE_CONV_ACCOUNT_ONLINE));
8095 purple_signal_connect(purple_connections_get_handle(), "signed-off", handle, 8115 purple_signal_connect(purple_connections_get_handle(), "signed-off", handle,
8096 G_CALLBACK(account_signed_off_cb), 8116 G_CALLBACK(account_signed_off_cb),
8097 GINT_TO_POINTER(PURPLE_CONV_ACCOUNT_OFFLINE)); 8117 GINT_TO_POINTER(PURPLE_CONV_ACCOUNT_OFFLINE));
8118 purple_signal_connect(purple_connections_get_handle(), "signing-off", handle,
8119 G_CALLBACK(account_signing_off), NULL);
8098 8120
8099 purple_signal_connect(purple_conversations_get_handle(), "received-im-msg", 8121 purple_signal_connect(purple_conversations_get_handle(), "received-im-msg",
8100 handle, G_CALLBACK(received_im_msg_cb), NULL); 8122 handle, G_CALLBACK(received_im_msg_cb), NULL);
8101 8123
8102 purple_conversations_set_ui_ops(&conversation_ui_ops); 8124 purple_conversations_set_ui_ops(&conversation_ui_ops);

mercurial