Mercurial > pidgin
comparison src/gtkdialogs.c @ 10246:a66cf83552dc
[gaim-migrate @ 11386]
I changed gaim_find_conversation and gaim_find_conversation_with_account
The first parameter is now one of GAIM_CONV_IM, GAIM_CONV_CHAT or
GAIM_CONV_ANY. Unfortunately, this changes a bajillion files.
Please look over this and make sure I use the correct type everywhere.
Especially in Novell and MSN, and somewhat in SILC.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Tue, 23 Nov 2004 06:14:15 +0000 |
parents | 224c9f244a3a |
children | 2a9ec10e0c4c |
comparison
equal
deleted
inserted
replaced
10245:c143a3fac58d | 10246:a66cf83552dc |
---|---|
379 GaimGtkWindow *gtkwin; | 379 GaimGtkWindow *gtkwin; |
380 | 380 |
381 g_return_if_fail(account != NULL); | 381 g_return_if_fail(account != NULL); |
382 g_return_if_fail(username != NULL); | 382 g_return_if_fail(username != NULL); |
383 | 383 |
384 conv = gaim_find_conversation_with_account(username, account); | 384 conv = gaim_find_conversation_with_account(GAIM_CONV_IM, username, account); |
385 | 385 |
386 if (conv == NULL) | 386 if (conv == NULL) |
387 conv = gaim_conversation_new(GAIM_CONV_IM, account, username); | 387 conv = gaim_conversation_new(GAIM_CONV_IM, account, username); |
388 | 388 |
389 win = gaim_conversation_get_window(conv); | 389 win = gaim_conversation_get_window(conv); |
763 GaimBuddy *buddy; | 763 GaimBuddy *buddy; |
764 if (GAIM_BLIST_NODE_IS_BUDDY(bnode)) { | 764 if (GAIM_BLIST_NODE_IS_BUDDY(bnode)) { |
765 GaimConversation *conv; | 765 GaimConversation *conv; |
766 buddy = (GaimBuddy*)bnode; | 766 buddy = (GaimBuddy*)bnode; |
767 bnode = bnode->next; | 767 bnode = bnode->next; |
768 conv = gaim_find_conversation_with_account(buddy->name, buddy->account); | 768 conv = gaim_find_conversation_with_account(GAIM_CONV_IM, |
769 buddy->name, | |
770 buddy->account); | |
769 if (gaim_account_is_connected(buddy->account)) { | 771 if (gaim_account_is_connected(buddy->account)) { |
770 serv_remove_buddy(buddy->account->gc, buddy, group); | 772 serv_remove_buddy(buddy->account->gc, buddy, group); |
771 gaim_blist_remove_buddy(buddy); | 773 gaim_blist_remove_buddy(buddy); |
772 if (conv) | 774 if (conv) |
773 gaim_conversation_update(conv, | 775 gaim_conversation_update(conv, |
805 _("Cancel"), NULL); | 807 _("Cancel"), NULL); |
806 | 808 |
807 g_free(text); | 809 g_free(text); |
808 } | 810 } |
809 | 811 |
812 /* XXX - Some of this should be moved into the core, methinks. */ | |
810 static void | 813 static void |
811 gaim_gtkdialogs_remove_buddy_cb(GaimBuddy *buddy) | 814 gaim_gtkdialogs_remove_buddy_cb(GaimBuddy *buddy) |
812 { | 815 { |
813 GaimGroup *group; | 816 GaimGroup *group; |
814 GaimConversation *conv; | 817 GaimConversation *conv; |
822 gaim_debug_info("blist", "Removing '%s' from buddy list.\n", buddy->name); | 825 gaim_debug_info("blist", "Removing '%s' from buddy list.\n", buddy->name); |
823 /* TODO - Should remove from blist first... then call serv_remove_buddy()? */ | 826 /* TODO - Should remove from blist first... then call serv_remove_buddy()? */ |
824 serv_remove_buddy(buddy->account->gc, buddy, group); | 827 serv_remove_buddy(buddy->account->gc, buddy, group); |
825 gaim_blist_remove_buddy(buddy); | 828 gaim_blist_remove_buddy(buddy); |
826 | 829 |
827 conv = gaim_find_conversation_with_account(name, account); | 830 conv = gaim_find_conversation_with_account(GAIM_CONV_IM, name, account); |
828 | |
829 if (conv != NULL) | 831 if (conv != NULL) |
830 gaim_conversation_update(conv, GAIM_CONV_UPDATE_REMOVE); | 832 gaim_conversation_update(conv, GAIM_CONV_UPDATE_REMOVE); |
831 | 833 |
832 g_free(name); | 834 g_free(name); |
833 } | 835 } |
862 name = GAIM_PLUGIN_PROTOCOL_INFO(account->gc->prpl)->get_chat_name(chat->components); | 864 name = GAIM_PLUGIN_PROTOCOL_INFO(account->gc->prpl)->get_chat_name(chat->components); |
863 | 865 |
864 gaim_blist_remove_chat(chat); | 866 gaim_blist_remove_chat(chat); |
865 | 867 |
866 if (name != NULL) { | 868 if (name != NULL) { |
867 conv = gaim_find_conversation_with_account(name, account); | 869 conv = gaim_find_conversation_with_account(GAIM_CONV_CHAT, name, account); |
868 g_free(name); | 870 g_free(name); |
869 } | 871 } |
870 | 872 |
871 if (conv != NULL) | 873 if (conv != NULL) |
872 gaim_conversation_update(conv, GAIM_CONV_UPDATE_REMOVE); | 874 gaim_conversation_update(conv, GAIM_CONV_UPDATE_REMOVE); |