Sun, 23 Jun 2013 17:20:37 +0530
Refactor code to remove conversation type from some instances of purple_conversations_find_with_account()
--- a/finch/gntblist.c Sun Jun 23 15:50:57 2013 +0530 +++ b/finch/gntblist.c Sun Jun 23 17:20:37 2013 +0530 @@ -2791,7 +2791,7 @@ /* Create a new conversation now. This will give focus to the new window. * But it's necessary to pretend that we left the chat, because otherwise * a new conversation window will pop up when we finally join the chat. */ - if (!(conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_CHAT, name, account))) { + if (!(conv = purple_conversations_find_chat_with_account(name, account))) { conv = purple_conversation_new(PURPLE_CONV_TYPE_CHAT, account, name); purple_chat_conversation_left(PURPLE_CONV_CHAT(conv)); } else {
--- a/finch/gntconv.c Sun Jun 23 15:50:57 2013 +0530 +++ b/finch/gntconv.c Sun Jun 23 17:20:37 2013 +0530 @@ -277,7 +277,7 @@ PurpleIMConversation *im = NULL; char *title, *str; - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, who, account); + conv = purple_conversations_find_im_with_account(who, account); if (!conv) return;
--- a/finch/gntpounce.c Sun Jun 23 15:50:57 2013 +0530 +++ b/finch/gntpounce.c Sun Jun 23 17:20:37 2013 +0530 @@ -801,7 +801,7 @@ if (purple_pounce_action_is_enabled(pounce, "open-window")) { - if (!purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, pouncee, account)) + if (!purple_conversations_find_im_with_account(pouncee, account)) purple_conversation_new(PURPLE_CONV_TYPE_IM, account, pouncee); } @@ -874,7 +874,7 @@ if (message != NULL) { - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, pouncee, account); + conv = purple_conversations_find_im_with_account(pouncee, account); if (conv == NULL) conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, pouncee);
--- a/libpurple/blist.c Sun Jun 23 15:50:57 2013 +0530 +++ b/libpurple/blist.c Sun Jun 23 17:20:37 2013 +0530 @@ -1036,7 +1036,7 @@ { PurpleBuddy *buddy = (PurpleBuddy *)bnode; - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, buddy->name, + conv = purple_conversations_find_im_with_account(buddy->name, buddy->account); if (conv) purple_conversation_autoset_title(conv); @@ -1115,7 +1115,7 @@ if (ops && ops->update) ops->update(purplebuddylist, (PurpleBlistNode *)buddy); - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, buddy->name, + conv = purple_conversations_find_im_with_account(buddy->name, buddy->account); if (conv) purple_conversation_autoset_title(conv); @@ -1157,7 +1157,7 @@ if (ops && ops->update) ops->update(purplebuddylist, (PurpleBlistNode *)buddy); - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, buddy->name, + conv = purple_conversations_find_im_with_account(buddy->name, buddy->account); if (conv) purple_conversation_autoset_title(conv);
--- a/libpurple/buddyicon.c Sun Jun 23 15:50:57 2013 +0530 +++ b/libpurple/buddyicon.c Sun Jun 23 17:20:37 2013 +0530 @@ -432,7 +432,7 @@ buddies = g_slist_delete_link(buddies, buddies); } - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, username, account); + conv = purple_conversations_find_im_with_account(username, account); if (conv != NULL) purple_im_conversation_set_icon(PURPLE_CONV_IM(conv), icon_to_set); @@ -884,7 +884,7 @@ buddy = (PurpleBuddy *)child; - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, purple_buddy_get_name(buddy), purple_buddy_get_account(buddy)); + conv = purple_conversations_find_im_with_account(purple_buddy_get_name(buddy), purple_buddy_get_account(buddy)); if (conv) purple_conversation_update(conv, PURPLE_CONVERSATION_UPDATE_ICON); @@ -896,7 +896,7 @@ } else if (PURPLE_BLIST_NODE_IS_CHAT(node)) { PurpleConversation *conv = NULL; - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_CHAT, purple_chat_get_name((PurpleChat*)node), purple_chat_get_account((PurpleChat*)node)); + conv = purple_conversations_find_chat_with_account(purple_chat_get_name((PurpleChat*)node), purple_chat_get_account((PurpleChat*)node)); if (conv) { purple_conversation_update(conv, PURPLE_CONVERSATION_UPDATE_ICON); }
--- a/libpurple/ft.c Sun Jun 23 15:50:57 2013 +0530 +++ b/libpurple/ft.c Sun Jun 23 17:20:37 2013 +0530 @@ -289,7 +289,7 @@ thumbnail_data = purple_xfer_get_thumbnail(xfer, &size); - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, xfer->who, + conv = purple_conversations_find_im_with_account(xfer->who, purple_xfer_get_account(xfer)); if (conv == NULL) @@ -924,7 +924,7 @@ else msg = g_strdup(_("File transfer complete")); - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, xfer->who, + conv = purple_conversations_find_im_with_account(xfer->who, purple_xfer_get_account(xfer)); if (conv != NULL)
--- a/libpurple/plugins/autoaccept.c Sun Jun 23 15:50:57 2013 +0530 +++ b/libpurple/plugins/autoaccept.c Sun Jun 23 17:20:37 2013 +0530 @@ -73,7 +73,7 @@ auto_accept_complete_cb(PurpleXfer *xfer, PurpleXfer *my) { if (xfer == my && purple_prefs_get_bool(PREF_NOTIFY) && - !purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, purple_xfer_get_remote_user(xfer), purple_xfer_get_account(xfer))) + !purple_conversations_find_im_with_account(purple_xfer_get_remote_user(xfer), purple_xfer_get_account(xfer))) { char *message = g_strdup_printf(_("Autoaccepted file transfer of \"%s\" from \"%s\" completed."), purple_xfer_get_filename(xfer), purple_xfer_get_remote_user(xfer));
--- a/libpurple/plugins/psychic.c Sun Jun 23 15:50:57 2013 +0530 +++ b/libpurple/plugins/psychic.c Sun Jun 23 17:20:37 2013 +0530 @@ -52,7 +52,7 @@ return; } - gconv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, name, acct); + gconv = purple_conversations_find_im_with_account(name, acct); if(! gconv) { purple_debug_info("psychic", "no previous conversation exists\n"); gconv = purple_conversation_new(PURPLE_CONV_TYPE_IM, acct, name);
--- a/libpurple/pounce.c Sun Jun 23 15:50:57 2013 +0530 +++ b/libpurple/pounce.c Sun Jun 23 17:20:37 2013 +0530 @@ -1128,7 +1128,7 @@ { PurpleConversation *conv; - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, name, account); + conv = purple_conversations_find_im_with_account(name, account); if (conv != NULL) { PurpleIMConversationTypingState state;
--- a/libpurple/protocols/bonjour/jabber.c Sun Jun 23 15:50:57 2013 +0530 +++ b/libpurple/protocols/bonjour/jabber.c Sun Jun 23 17:20:37 2013 +0530 @@ -302,7 +302,7 @@ account = purple_buddy_get_account(pb); - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, bb->name, account); + conv = purple_conversations_find_im_with_account(bb->name, account); if (conv != NULL) purple_conversation_write(conv, NULL, _("Unable to send message."), @@ -348,7 +348,7 @@ account = purple_buddy_get_account(pb); - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, bb->name, account); + conv = purple_conversations_find_im_with_account(bb->name, account); if (conv != NULL) purple_conversation_write(conv, NULL, _("Unable to send message."), @@ -396,7 +396,7 @@ #if 0 if(bconv->pb != NULL) { PurpleConversation *conv; - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, bconv->pb->name, bconv->pb->account); + conv = purple_conversations_find_im_with_account(bconv->pb->name, bconv->pb->account); if (conv != NULL) { char *tmp = g_strdup_printf(_("%s has closed the conversation."), bconv->pb->name); purple_conversation_write(conv, NULL, tmp, PURPLE_MESSAGE_SYSTEM, time(NULL)); @@ -485,7 +485,7 @@ purple_debug_error("bonjour", "Error starting stream with buddy %s at %s error: %s\n", bname ? bname : "(unknown)", bconv->ip, err ? err : "(null)"); - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, bname, bconv->account); + conv = purple_conversations_find_im_with_account(bname, bconv->account); if (conv != NULL) purple_conversation_write(conv, NULL, _("Unable to send the message, the conversation couldn't be started."), @@ -550,7 +550,7 @@ if (bconv->pb) { PurpleConversation *conv; - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, bname, bconv->account); + conv = purple_conversations_find_im_with_account(bname, bconv->account); if (conv != NULL) purple_conversation_write(conv, NULL, _("Unable to send the message, the conversation couldn't be started."), @@ -595,7 +595,7 @@ if (bconv->pb) { PurpleConversation *conv; - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, bname, bconv->account); + conv = purple_conversations_find_im_with_account(bname, bconv->account); if (conv != NULL) purple_conversation_write(conv, NULL, _("Unable to send the message, the conversation couldn't be started."), @@ -872,7 +872,7 @@ purple_debug_error("bonjour", "No more addresses for buddy %s. Aborting", purple_buddy_get_name(pb)); - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, bb->name, account); + conv = purple_conversations_find_im_with_account(bb->name, account); if (conv != NULL) purple_conversation_write(conv, NULL, _("Unable to send the message, the conversation couldn't be started."), @@ -893,7 +893,7 @@ account = purple_buddy_get_account(pb); - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, bb->name, account); + conv = purple_conversations_find_im_with_account(bb->name, account); if (conv != NULL) purple_conversation_write(conv, NULL, _("Unable to send the message, the conversation couldn't be started."),
--- a/libpurple/protocols/gg/confer.c Sun Jun 23 15:50:57 2013 +0530 +++ b/libpurple/protocols/gg/confer.c Sun Jun 23 17:20:37 2013 +0530 @@ -32,7 +32,7 @@ g_return_val_if_fail(gc != NULL, NULL); g_return_val_if_fail(name != NULL, NULL); - return purple_conversations_find_with_account(PURPLE_CONV_TYPE_CHAT, name, + return purple_conversations_find_chat_with_account(name, purple_connection_get_account(gc)); } /* }}} */
--- a/libpurple/protocols/irc/cmds.c Sun Jun 23 15:50:57 2013 +0530 +++ b/libpurple/protocols/irc/cmds.c Sun Jun 23 17:20:37 2013 +0530 @@ -34,7 +34,7 @@ int irc_cmd_default(struct irc_conn *irc, const char *cmd, const char *target, const char **args) { - PurpleConversation *convo = purple_conversations_find_with_account(PURPLE_CONV_TYPE_ANY, target, irc->account); + PurpleConversation *convo = purple_conversations_find_with_account(target, irc->account); char *buf; if (!convo) @@ -132,7 +132,7 @@ g_free(newargs[1]); g_free(newargs); - convo = purple_conversations_find_with_account(PURPLE_CONV_TYPE_ANY, target, irc->account); + convo = purple_conversations_find_with_account(target, irc->account); if (convo) { escaped = g_markup_escape_text(args[0], -1); action = g_strdup_printf("/me %s", escaped); @@ -205,7 +205,7 @@ if (!args || !args[0]) return 0; - convo = purple_conversations_find_with_account(PURPLE_CONV_TYPE_CHAT, target, irc->account); + convo = purple_conversations_find_chat_with_account(target, irc->account); if (!convo) return 0; @@ -522,7 +522,7 @@ if (!args) return 0; - convo = purple_conversations_find_with_account(PURPLE_CONV_TYPE_CHAT, target, irc->account); + convo = purple_conversations_find_chat_with_account(target, irc->account); if (!convo) return 0;
--- a/libpurple/protocols/irc/msgs.c Sun Jun 23 15:50:57 2013 +0530 +++ b/libpurple/protocols/irc/msgs.c Sun Jun 23 17:20:37 2013 +0530 @@ -331,7 +331,7 @@ if (!args || !args[0] || !args[1] || !args[2]) return; - convo = purple_conversations_find_with_account(PURPLE_CONV_TYPE_CHAT, args[1], irc->account); + convo = purple_conversations_find_chat_with_account(args[1], irc->account); if (!convo) return; @@ -352,7 +352,7 @@ if (!args || !args[1] || !args[2]) return; - convo = purple_conversations_find_with_account(PURPLE_CONV_TYPE_CHAT, args[1], irc->account); + convo = purple_conversations_find_chat_with_account(args[1], irc->account); if (!convo) /* XXX punt on channels we are not in for now */ return; @@ -492,7 +492,7 @@ return; } - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_CHAT, args[1], irc->account); + conv = purple_conversations_find_chat_with_account(args[1], irc->account); if (!conv) { purple_debug(PURPLE_DEBUG_ERROR, "irc","Got a WHO response for %s, which doesn't exist\n", args[1]); return; @@ -602,7 +602,7 @@ topic = irc_mirc2txt (args[2]); } - convo = purple_conversations_find_with_account(PURPLE_CONV_TYPE_CHAT, chan, irc->account); + convo = purple_conversations_find_chat_with_account(chan, irc->account); if (!convo) { purple_debug(PURPLE_DEBUG_ERROR, "irc", "Got a topic for %s, which doesn't exist\n", chan); g_free(topic); @@ -652,7 +652,7 @@ if (!args || !args[1] || !args[2] || !args[3]) return; - convo = purple_conversations_find_with_account(PURPLE_CONV_TYPE_CHAT, args[1], irc->account); + convo = purple_conversations_find_chat_with_account(args[1], irc->account); if (!convo) { purple_debug(PURPLE_DEBUG_ERROR, "irc", "Got topic info for %s, which doesn't exist\n", args[1]); return; @@ -693,7 +693,7 @@ PurpleConversation *convo; if (!strcmp(name, "366")) { - convo = purple_conversations_find_with_account(PURPLE_CONV_TYPE_ANY, args[1], irc->account); + convo = purple_conversations_find_with_account(args[1], irc->account); if (!convo) { purple_debug(PURPLE_DEBUG_ERROR, "irc", "Got a NAMES list for %s, which doesn't exist\n", args[1]); g_string_free(irc->names, TRUE); @@ -837,7 +837,7 @@ PurpleConnection *gc; PurpleConversation *convo; - convo = purple_conversations_find_with_account(PURPLE_CONV_TYPE_ANY, args[1], irc->account); + convo = purple_conversations_find_with_account(args[1], irc->account); if (convo) { if (purple_conversation_get_type(convo) == PURPLE_CONV_TYPE_CHAT) /* does this happen? */ purple_chat_conversation_write_message(PURPLE_CONV_CHAT(convo), args[1], _("no such channel"), @@ -862,7 +862,7 @@ PurpleConnection *gc; PurpleConversation *convo; - convo = purple_conversations_find_with_account(PURPLE_CONV_TYPE_CHAT, args[1], irc->account); + convo = purple_conversations_find_chat_with_account(args[1], irc->account); if (convo) { purple_chat_conversation_write_message(PURPLE_CONV_CHAT(convo), args[1], args[2], PURPLE_MESSAGE_SYSTEM|PURPLE_MESSAGE_NO_LOG, time(NULL)); } else { @@ -874,7 +874,7 @@ void irc_msg_notinchan(struct irc_conn *irc, const char *name, const char *from, char **args) { - PurpleConversation *convo = purple_conversations_find_with_account(PURPLE_CONV_TYPE_CHAT, args[1], irc->account); + PurpleConversation *convo = purple_conversations_find_chat_with_account(args[1], irc->account); purple_debug(PURPLE_DEBUG_INFO, "irc", "We're apparently not in %s, but tried to use it\n", args[1]); if (convo) { @@ -891,7 +891,7 @@ if (!args || !args[1] || !args[2]) return; - convo = purple_conversations_find_with_account(PURPLE_CONV_TYPE_CHAT, args[1], irc->account); + convo = purple_conversations_find_chat_with_account(args[1], irc->account); if (!convo) return; @@ -1014,7 +1014,7 @@ return; } - convo = purple_conversations_find_with_account(PURPLE_CONV_TYPE_CHAT, args[0], irc->account); + convo = purple_conversations_find_chat_with_account(args[0], irc->account); if (convo == NULL) { purple_debug(PURPLE_DEBUG_ERROR, "irc", "JOIN for %s failed\n", args[0]); g_free(nick); @@ -1044,7 +1044,7 @@ void irc_msg_kick(struct irc_conn *irc, const char *name, const char *from, char **args) { PurpleConnection *gc = purple_account_get_connection(irc->account); - PurpleConversation *convo = purple_conversations_find_with_account(PURPLE_CONV_TYPE_CHAT, args[0], irc->account); + PurpleConversation *convo = purple_conversations_find_chat_with_account(args[0], irc->account); char *nick = irc_mask_nick(from), *buf; if (!gc) { @@ -1080,7 +1080,7 @@ if (*args[0] == '#' || *args[0] == '&') { /* Channel */ char *escaped; - convo = purple_conversations_find_with_account(PURPLE_CONV_TYPE_CHAT, args[0], irc->account); + convo = purple_conversations_find_chat_with_account(args[0], irc->account); if (!convo) { purple_debug(PURPLE_DEBUG_ERROR, "irc", "MODE received for %s, which we are not in\n", args[0]); g_free(nick); @@ -1165,7 +1165,7 @@ chats = chats->next; } - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, nick, + conv = purple_conversations_find_im_with_account(nick, irc->account); if (conv != NULL) purple_conversation_set_name(conv, args[0]); @@ -1263,7 +1263,7 @@ * that I can see. This catches that. */ channel = (args[0][0] == ':') ? &args[0][1] : args[0]; - convo = purple_conversations_find_with_account(PURPLE_CONV_TYPE_CHAT, channel, irc->account); + convo = purple_conversations_find_chat_with_account(channel, irc->account); if (!convo) { purple_debug(PURPLE_DEBUG_INFO, "irc", "Got a PART on %s, which doesn't exist -- probably closed\n", channel); return; @@ -1321,7 +1321,7 @@ msg = g_strdup_printf(_("PING reply -- Lag: %lu seconds"), time(NULL) - oldstamp); } - convo = purple_conversations_find_with_account(PURPLE_CONV_TYPE_ANY, parts[0], irc->account); + convo = purple_conversations_find_with_account(parts[0], irc->account); g_strfreev(parts); if (convo) { if (purple_conversation_get_type (convo) == PURPLE_CONV_TYPE_CHAT) @@ -1380,7 +1380,7 @@ if (!purple_utf8_strcasecmp(to, purple_connection_get_display_name(gc))) { serv_got_im(gc, nick, msg, 0, time(NULL)); } else { - convo = purple_conversations_find_with_account(PURPLE_CONV_TYPE_CHAT, irc_nick_skip_mode(irc, to), irc->account); + convo = purple_conversations_find_chat_with_account(irc_nick_skip_mode(irc, to), irc->account); if (convo) serv_got_chat_in(gc, purple_chat_conversation_get_id(PURPLE_CONV_CHAT(convo)), nick, 0, msg, time(NULL)); else @@ -1400,7 +1400,7 @@ if (!args || !args[1] || !args[2] || !gc) return; - convo = purple_conversations_find_with_account(PURPLE_CONV_TYPE_CHAT, args[1], irc->account); + convo = purple_conversations_find_chat_with_account(args[1], irc->account); if (convo) { /* This is a channel we're already in; for some reason, * freenode feels the need to notify us that in some
--- a/libpurple/protocols/jabber/jabber.c Sun Jun 23 15:50:57 2013 +0530 +++ b/libpurple/protocols/jabber/jabber.c Sun Jun 23 17:20:37 2013 +0530 @@ -3218,7 +3218,7 @@ if (!_jabber_send_buzz(js, username, &error)) { PurpleAccount *account = purple_connection_get_account(gc); PurpleConversation *conv = - purple_conversations_find_with_account(PURPLE_CONV_TYPE_ANY, username, account); + purple_conversations_find_with_account(username, account); purple_debug_error("jabber", "jabber_send_attention: jabber_cmd_buzz failed with error: %s\n", error ? error : "(NULL)"); if (conv) {
--- a/libpurple/protocols/jabber/message.c Sun Jun 23 15:50:57 2013 +0530 +++ b/libpurple/protocols/jabber/message.c Sun Jun 23 17:20:37 2013 +0530 @@ -938,7 +938,7 @@ { PurpleAccount *account = purple_connection_get_account(jm->js->gc); PurpleConversation *conv = - purple_conversations_find_with_account(PURPLE_CONV_TYPE_ANY, jm->to, + purple_conversations_find_with_account(jm->to, account); if (jabber_conv_support_custom_smileys(jm->js, conv, jm->to)) {
--- a/libpurple/protocols/mxit/formcmds.c Sun Jun 23 15:50:57 2013 +0530 +++ b/libpurple/protocols/mxit/formcmds.c Sun Jun 23 17:20:37 2013 +0530 @@ -231,7 +231,7 @@ PurpleConversation *conv; char* clearmsgscreen; - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, from, session->acc); + conv = purple_conversations_find_im_with_account(from, session->acc); if (conv == NULL) { purple_debug_error(MXIT_PLUGIN_ID, _( "Conversation with '%s' not found\n" ), from); return;
--- a/libpurple/protocols/mxit/multimx.c Sun Jun 23 15:50:57 2013 +0530 +++ b/libpurple/protocols/mxit/multimx.c Sun Jun 23 17:20:37 2013 +0530 @@ -377,7 +377,7 @@ /* Must be a service message */ char* ofs; - PurpleConversation* convo = purple_conversations_find_with_account(PURPLE_CONV_TYPE_CHAT, multimx->roomname, mx->session->acc); + PurpleConversation* convo = purple_conversations_find_chat_with_account(multimx->roomname, mx->session->acc); if (convo == NULL) { purple_debug_error(MXIT_PLUGIN_ID, "Conversation '%s' not found\n", multimx->roomname); return; @@ -566,7 +566,7 @@ return; } - convo = purple_conversations_find_with_account(PURPLE_CONV_TYPE_CHAT, multimx->roomname, session->acc); + convo = purple_conversations_find_chat_with_account(multimx->roomname, session->acc); if (convo == NULL) { purple_debug_error(MXIT_PLUGIN_ID, "Conversation '%s' not found\n", multimx->roomname); return;
--- a/libpurple/protocols/myspace/myspace.c Sun Jun 23 15:50:57 2013 +0530 +++ b/libpurple/protocols/myspace/myspace.c Sun Jun 23 17:20:37 2013 +0530 @@ -1503,7 +1503,7 @@ } /* See if a conversation with their UID already exists...*/ - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, userid, session->account); + conv = purple_conversations_find_im_with_account(userid, session->account); if (conv) { /* Since the conversation exists... We need to normalize it */ purple_conversation_set_name(conv, username); @@ -3498,7 +3498,7 @@ } - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, username, session->account); + conv = purple_conversations_find_im_with_account(username, session->account); if (!conv) { purple_debug_info("msim_uri_handler", "creating new conversation for %s\n", username); conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, session->account, username);
--- a/libpurple/protocols/oscar/oscar.c Sun Jun 23 15:50:57 2013 +0530 +++ b/libpurple/protocols/oscar/oscar.c Sun Jun 23 17:20:37 2013 +0530 @@ -3271,7 +3271,7 @@ PurpleStoredImage *img; PurpleBuddy *buddy; - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, name, account); + conv = purple_conversations_find_im_with_account(name, account); if (strstr(tmp1, "<IMG ")) purple_conversation_write(conv, "",
--- a/libpurple/protocols/sametime/sametime.c Sun Jun 23 15:50:57 2013 +0530 +++ b/libpurple/protocols/sametime/sametime.c Sun Jun 23 17:20:37 2013 +0530 @@ -1842,7 +1842,7 @@ pd = mwSession_getClientData(s); acct = purple_connection_get_account(pd->gc); - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, who, acct); + conv = purple_conversations_find_im_with_account(who, acct); if(! conv) conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, acct, who); buddy = purple_find_buddy(acct, who); @@ -4279,7 +4279,7 @@ acct = purple_connection_get_account(gc); id = g_list_nth_data(row, 1); - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, id, acct); + conv = purple_conversations_find_im_with_account(id, acct); if(! conv) conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, acct, id); purple_conversation_present(conv); }
--- a/libpurple/protocols/silc/silc.c Sun Jun 23 15:50:57 2013 +0530 +++ b/libpurple/protocols/silc/silc.c Sun Jun 23 17:20:37 2013 +0530 @@ -1368,7 +1368,7 @@ SilcDList list; gboolean free_list = FALSE; - convo = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, im->nick, + convo = purple_conversations_find_im_with_account(im->nick, sg->account); if (!convo) return; @@ -1557,7 +1557,7 @@ return PURPLE_CMD_RET_FAILED; if(args && args[0]) - convo = purple_conversations_find_with_account(PURPLE_CONV_TYPE_CHAT, args[0], + convo = purple_conversations_find_chat_with_account(args[0], purple_connection_get_account(gc)); if (convo != NULL)
--- a/libpurple/protocols/yahoo/libymsg.c Sun Jun 23 15:50:57 2013 +0530 +++ b/libpurple/protocols/yahoo/libymsg.c Sun Jun 23 17:20:37 2013 +0530 @@ -868,7 +868,7 @@ yahoo_update_status(gc, from, f); } } else if (!g_ascii_strncasecmp(msg, "WEBCAMINVITE", strlen("WEBCAMINVITE"))) { - PurpleConversation *conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, from, account); + PurpleConversation *conv = purple_conversations_find_im_with_account(from, account); char *buf = g_strdup_printf(_("%s has sent you a webcam invite, which is not yet supported."), from); purple_conversation_write(conv, NULL, buf, PURPLE_MESSAGE_SYSTEM|PURPLE_MESSAGE_NOTIFY, time(NULL)); g_free(buf); @@ -928,7 +928,7 @@ if( (pkt->status == -1) || (pkt->status == YAHOO_STATUS_DISCONNECTED) ) { if (server_msg) { PurpleConversation *c; - c = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, sms->from, account); + c = purple_conversations_find_im_with_account(sms->from, account); if (c == NULL) c = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, sms->from); purple_conversation_write(c, NULL, server_msg, PURPLE_MESSAGE_SYSTEM, time(NULL)); @@ -4367,7 +4367,7 @@ char *status = NULL; char *carrier = NULL; PurpleAccount *account = purple_connection_get_account(gc); - PurpleConversation *conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, sms_cb_data->who, account); + PurpleConversation *conv = purple_conversations_find_im_with_account(sms_cb_data->who, account); yd->url_datas = g_slist_remove(yd->url_datas, url_data); @@ -4468,7 +4468,7 @@ yd->url_datas = g_slist_prepend(yd->url_datas, url_data); else { PurpleAccount *account = purple_connection_get_account(gc); - PurpleConversation *conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, sms_cb_data->who, account); + PurpleConversation *conv = purple_conversations_find_im_with_account(sms_cb_data->who, account); purple_conversation_write(conv, NULL, _("Can't send SMS. Unable to obtain mobile carrier."), PURPLE_MESSAGE_SYSTEM, time(NULL)); g_free(sms_cb_data->who); g_free(sms_cb_data->what); @@ -4514,7 +4514,7 @@ gchar *carrier = NULL; const char *alias = NULL; PurpleAccount *account = purple_connection_get_account(gc); - PurpleConversation *conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, who, account); + PurpleConversation *conv = purple_conversations_find_im_with_account(who, account); carrier = g_hash_table_lookup(yd->sms_carrier, who); if (!carrier) {
--- a/libpurple/protocols/zephyr/zephyr.c Sun Jun 23 15:50:57 2013 +0530 +++ b/libpurple/protocols/zephyr/zephyr.c Sun Jun 23 17:20:37 2013 +0530 @@ -2053,7 +2053,7 @@ sig = zephyr_get_signature(); - gconv1 = purple_conversations_find_with_account(PURPLE_CONV_TYPE_CHAT, zt->name, + gconv1 = purple_conversations_find_chat_with_account(zt->name, purple_connection_get_account(gc)); gcc = purple_conversation_get_chat_data(gconv1); @@ -2586,7 +2586,7 @@ /* find_sub_by_id can return NULL */ if (!zt) return; - gconv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_CHAT, zt->name, + gconv = purple_conversations_find_chat_with_account(zt->name, purple_connection_get_account(gc)); gcc = purple_conversation_get_chat_data(gconv);
--- a/libpurple/prpl.c Sun Jun 23 15:50:57 2013 +0530 +++ b/libpurple/prpl.c Sun Jun 23 17:20:37 2013 +0530 @@ -533,7 +533,7 @@ got_attention(gc, -1, who, type_code); conv = - purple_conversations_find_with_account(PURPLE_CONV_TYPE_ANY, who, account); + purple_conversations_find_with_account(who, account); if (conv) purple_prpl_attention(conv, who, type_code, PURPLE_MESSAGE_RECV, time(NULL));
--- a/libpurple/server.c Sun Jun 23 15:50:57 2013 +0530 +++ b/libpurple/server.c Sun Jun 23 17:20:37 2013 +0530 @@ -138,7 +138,7 @@ account = purple_connection_get_account(gc); presence = purple_account_get_presence(account); - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, name, account); + conv = purple_conversations_find_im_with_account(name, account); if (prpl_info->send_im) val = prpl_info->send_im(gc, name, message, flags); @@ -256,7 +256,7 @@ purple_blist_server_alias_buddy(b, alias); - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, purple_buddy_get_name(b), account); + conv = purple_conversations_find_im_with_account(purple_buddy_get_name(b), account); if (conv != NULL && alias != NULL && !purple_strequal(alias, who)) { char *escaped = g_markup_escape_text(who, -1); @@ -569,7 +569,7 @@ * We should update the conversation window buttons and menu, * if it exists. */ - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, who, purple_connection_get_account(gc)); + conv = purple_conversations_find_im_with_account(who, purple_connection_get_account(gc)); /* * Make copies of the message and the sender in case plugins want @@ -597,7 +597,7 @@ /* search for conversation again in case it was created by received-im-msg handler */ if (conv == NULL) - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, name, purple_connection_get_account(gc)); + conv = purple_conversations_find_im_with_account(name, purple_connection_get_account(gc)); if (conv == NULL) conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, name); @@ -687,7 +687,7 @@ PurpleConversation *conv; PurpleIMConversation *im = NULL; - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, name, purple_connection_get_account(gc)); + conv = purple_conversations_find_im_with_account(name, purple_connection_get_account(gc)); if (conv != NULL) { im = PURPLE_CONV_IM(conv); @@ -719,7 +719,7 @@ PurpleConversation *conv; PurpleIMConversation *im; - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, name, purple_connection_get_account(gc)); + conv = purple_conversations_find_im_with_account(name, purple_connection_get_account(gc)); if (conv != NULL) { im = PURPLE_CONV_IM(conv);
--- a/pidgin/gtkblist.c Sun Jun 23 15:50:57 2013 +0530 +++ b/pidgin/gtkblist.c Sun Jun 23 17:20:37 2013 +0530 @@ -405,7 +405,7 @@ else name = purple_chat_get_name(chat); - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_CHAT, name, + conv = purple_conversations_find_chat_with_account(name, account); if (conv != NULL) { @@ -3860,7 +3860,7 @@ else chat_name = g_strdup(purple_chat_get_name(chat)); - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_CHAT, chat_name, + conv = purple_conversations_find_chat_with_account(chat_name, purple_chat_get_account(chat)); g_free(chat_name); } @@ -7298,7 +7298,7 @@ * Or something. --Mark */ - c = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, who, data->rq_data.account); + c = purple_conversations_find_im_with_account(who, data->rq_data.account); if (c != NULL) { icon = purple_im_conversation_get_icon(PURPLE_CONV_IM(c)); if (icon != NULL)
--- a/pidgin/gtkconv.c Sun Jun 23 15:50:57 2013 +0530 +++ b/pidgin/gtkconv.c Sun Jun 23 17:20:37 2013 +0530 @@ -5585,7 +5585,7 @@ * just move the conv to this window. Otherwise, create a new * conv and add it to this window. */ - c = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, buddyname, buddyaccount); + c = purple_conversations_find_im_with_account(buddyname, buddyaccount); if (c != NULL) { PidginWindow *oldwin; gtkconv = PIDGIN_CONVERSATION(c); @@ -5679,7 +5679,7 @@ for (bn = purple_blist_node_get_first_child(cn); bn; bn = purple_blist_node_get_sibling_next(bn)) { PurpleBuddy *b = PURPLE_BUDDY(bn); PurpleConversation *conv; - if ((conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, purple_buddy_get_name(b), purple_buddy_get_account(b)))) { + if ((conv = purple_conversations_find_im_with_account(purple_buddy_get_name(b), purple_buddy_get_account(b)))) { if (PIDGIN_CONVERSATION(conv)) return PIDGIN_CONVERSATION(conv); } @@ -8198,7 +8198,7 @@ { PurpleBuddy *buddy = (PurpleBuddy*)node; PurpleConversation *conv; - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, purple_buddy_get_name(buddy), purple_buddy_get_account(buddy)); + conv = purple_conversations_find_im_with_account(purple_buddy_get_name(buddy), purple_buddy_get_account(buddy)); if (conv) return PIDGIN_CONVERSATION(conv); } @@ -8301,7 +8301,7 @@ { PurpleConversation *conv; - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, purple_buddy_get_name(buddy), purple_buddy_get_account(buddy)); + conv = purple_conversations_find_im_with_account(purple_buddy_get_name(buddy), purple_buddy_get_account(buddy)); if (conv) pidgin_conv_update_fields(conv, PIDGIN_CONV_TAB_ICON); } @@ -8311,7 +8311,7 @@ { PurpleConversation *conv; - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, purple_buddy_get_name(buddy), purple_buddy_get_account(buddy)); + conv = purple_conversations_find_im_with_account(purple_buddy_get_name(buddy), purple_buddy_get_account(buddy)); if (conv) pidgin_conv_update_fields(conv, PIDGIN_CONV_BUDDY_ICON); } @@ -8347,7 +8347,7 @@ PurpleConversation *conv; PidginConversation *gtkconv; - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, who, account); + conv = purple_conversations_find_im_with_account(who, account); if (!conv) return;
--- a/pidgin/gtkdialogs.c Sun Jun 23 15:50:57 2013 +0530 +++ b/pidgin/gtkdialogs.c Sun Jun 23 17:20:37 2013 +0530 @@ -957,7 +957,7 @@ g_return_if_fail(account != NULL); g_return_if_fail(username != NULL); - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, username, account); + conv = purple_conversations_find_im_with_account(username, account); if (conv == NULL) conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, username);
--- a/pidgin/gtkpounce.c Sun Jun 23 15:50:57 2013 +0530 +++ b/pidgin/gtkpounce.c Sun Jun 23 17:20:37 2013 +0530 @@ -1433,7 +1433,7 @@ if (purple_pounce_action_is_enabled(pounce, "open-window")) { - if (!purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, pouncee, account)) + if (!purple_conversations_find_im_with_account(pouncee, account)) purple_conversation_new(PURPLE_CONV_TYPE_IM, account, pouncee); } @@ -1487,7 +1487,7 @@ if (message != NULL) { - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, pouncee, account); + conv = purple_conversations_find_im_with_account(pouncee, account); if (conv == NULL) conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, pouncee);
--- a/pidgin/plugins/crazychat/cc_network.c Sun Jun 23 15:50:57 2013 +0530 +++ b/pidgin/plugins/crazychat/cc_network.c Sun Jun 23 17:20:37 2013 +0530 @@ -104,7 +104,7 @@ if (session) return; /* already have a session with this guy */ session = cc_add_session(cc, name); session->state = INVITE; - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_ANY, name, account); + conv = purple_conversations_find_with_account(name, account); if (!conv) { conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, name); } @@ -131,7 +131,7 @@ session = cc_find_session(cc, name); if (!session) { Debug("Creating a CrazyChat session invite dialog box!\n"); - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_ANY, name, account); + conv = purple_conversations_find_with_account(name, account); if (conv) convwin = purple_conversation_get_window(conv); else convwin = NULL; /* pop gtk window asking if want to accept */ @@ -208,7 +208,7 @@ PurpleConversation *conv; PurpleIMConversation *im; - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_ANY, session->name, account); + conv = purple_conversations_find_with_account(session->name, account); if (!conv) { conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, session->name); @@ -272,7 +272,7 @@ session->peer_port = args->peer_port; snprintf(buf, BUFSIZ, "%s%s", CRAZYCHAT_ACCEPT_CODE, purple_network_get_my_ip(-1)); - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_ANY, args->name, + conv = purple_conversations_find_with_account(args->name, args->account); if (!conv) { conv = purple_conversation_new(PURPLE_CONV_TYPE_IM,
--- a/pidgin/plugins/gevolution/gevo-util.c Sun Jun 23 15:50:57 2013 +0530 +++ b/pidgin/plugins/gevolution/gevo-util.c Sun Jun 23 17:20:37 2013 +0530 @@ -33,7 +33,7 @@ PurpleBuddy *buddy; PurpleGroup *group; - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, buddy_name, account); + conv = purple_conversations_find_im_with_account(buddy_name, account); group = purple_find_group(group_name); if (group == NULL)
--- a/pidgin/plugins/notify.c Sun Jun 23 15:50:57 2013 +0530 +++ b/pidgin/plugins/notify.c Sun Jun 23 17:20:37 2013 +0530 @@ -277,7 +277,7 @@ PurpleConversation *conv = NULL; if (purple_prefs_get_bool("/plugins/gtk/X11/notify/notify_send")) { - conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM, receiver, account); + conv = purple_conversations_find_im_with_account(receiver, account); unnotify(conv, TRUE); } }