/soc/2013/ankitkv/gobjectification: 08733a7475df: Replaced purpl...
Ankit Vani
a at nevitus.org
Sun Jun 23 08:04:19 EDT 2013
Changeset: 08733a7475df7b05f58138d7fd2cceca83279dbc
Author: Ankit Vani <a at nevitus.org>
Date: 2013-06-23 17:33 +0530
Branch: soc.2013.gobjectification
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/08733a7475df
Description:
Replaced purple_conversation_new() with purple_[im,chat]_conversation_new()
diffstat:
finch/gntblist.c | 4 ++--
finch/gntconv.c | 4 ++--
finch/gntmedia.c | 2 +-
finch/gntpounce.c | 4 ++--
finch/plugins/gnttinyurl.c | 2 +-
libpurple/protocols/gg/gg.c | 2 +-
libpurple/protocols/irc/cmds.c | 2 +-
libpurple/protocols/jabber/libfacebook.c | 2 +-
libpurple/protocols/jabber/libgtalk.c | 2 +-
libpurple/protocols/jabber/libxmpp.c | 2 +-
libpurple/protocols/msn/msg.c | 4 ++--
libpurple/protocols/msn/msn.c | 2 +-
libpurple/protocols/msn/session.c | 2 +-
libpurple/protocols/myspace/myspace.c | 2 +-
libpurple/protocols/oscar/odc.c | 6 +++---
libpurple/protocols/oscar/oscar.c | 4 ++--
libpurple/protocols/oscar/peer.c | 6 +++---
libpurple/protocols/sametime/sametime.c | 4 ++--
libpurple/protocols/silc/buddy.c | 2 +-
libpurple/protocols/silc/silc.c | 2 +-
libpurple/protocols/yahoo/libyahoo.c | 2 +-
libpurple/protocols/yahoo/libymsg.c | 2 +-
libpurple/prpl.c | 2 +-
libpurple/server.c | 4 ++--
pidgin/gtkconv.c | 8 ++++----
pidgin/gtkdialogs.c | 2 +-
pidgin/gtkpounce.c | 4 ++--
pidgin/gtkutils.c | 4 ++--
pidgin/plugins/crazychat/cc_network.c | 4 ++--
pidgin/plugins/pidgininc.c | 2 +-
30 files changed, 47 insertions(+), 47 deletions(-)
diffs (truncated from 513 to 300 lines):
diff --git a/finch/gntblist.c b/finch/gntblist.c
--- a/finch/gntblist.c
+++ b/finch/gntblist.c
@@ -2731,7 +2731,7 @@ send_im_select_cb(gpointer data, PurpleR
account = purple_request_fields_get_account(fields, "account");
username = purple_request_fields_get_string(fields, "screenname");
- conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, username);
+ conv = purple_im_conversation_new(account, username);
purple_conversation_present(conv);
}
@@ -2792,7 +2792,7 @@ join_chat_select_cb(gpointer data, Purpl
* 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_chat_with_account(name, account))) {
- conv = purple_conversation_new(PURPLE_CONV_TYPE_CHAT, account, name);
+ conv = purple_chat_conversation_new(account, name);
purple_chat_conversation_left(PURPLE_CONV_CHAT(conv));
} else {
purple_conversation_present(conv);
diff --git a/finch/gntconv.c b/finch/gntconv.c
--- a/finch/gntconv.c
+++ b/finch/gntconv.c
@@ -518,7 +518,7 @@ send_to_cb(GntMenuItem *m, gpointer n)
{
PurpleAccount *account = g_object_get_data(G_OBJECT(m), "purple_account");
gchar *buddy = g_object_get_data(G_OBJECT(m), "purple_buddy_name");
- PurpleConversation *conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, buddy);
+ PurpleConversation *conv = purple_im_conversation_new(account, buddy);
finch_conversation_set_active(conv);
}
@@ -725,7 +725,7 @@ create_conv_from_userlist(GntWidget *wid
realname = prpl_info->get_cb_real_name(gc, purple_chat_conversation_get_id(PURPLE_CONV_CHAT(fc->active_conv)), name);
else
realname = NULL;
- purple_conversation_new(PURPLE_CONV_TYPE_IM, account, realname ? realname : name);
+ purple_im_conversation_new(account, realname ? realname : name);
g_free(realname);
}
diff --git a/finch/gntmedia.c b/finch/gntmedia.c
--- a/finch/gntmedia.c
+++ b/finch/gntmedia.c
@@ -390,7 +390,7 @@ finch_new_media(PurpleMediaManager *mana
GntWidget *gntmedia;
PurpleConversation *conv;
- conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, name);
+ conv = purple_im_conversation_new(account, name);
gntmedia = finch_media_new(media);
g_signal_connect(G_OBJECT(gntmedia), "message", G_CALLBACK(gntmedia_message_cb), conv);
diff --git a/finch/gntpounce.c b/finch/gntpounce.c
--- a/finch/gntpounce.c
+++ b/finch/gntpounce.c
@@ -802,7 +802,7 @@ pounce_cb(PurplePounce *pounce, PurplePo
if (purple_pounce_action_is_enabled(pounce, "open-window"))
{
if (!purple_conversations_find_im_with_account(pouncee, account))
- purple_conversation_new(PURPLE_CONV_TYPE_IM, account, pouncee);
+ purple_im_conversation_new(account, pouncee);
}
if (purple_pounce_action_is_enabled(pounce, "popup-notify"))
@@ -877,7 +877,7 @@ pounce_cb(PurplePounce *pounce, PurplePo
conv = purple_conversations_find_im_with_account(pouncee, account);
if (conv == NULL)
- conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, pouncee);
+ conv = purple_im_conversation_new(account, pouncee);
purple_conversation_write(conv, NULL, message,
PURPLE_MESSAGE_SEND, time(NULL));
diff --git a/finch/plugins/gnttinyurl.c b/finch/plugins/gnttinyurl.c
--- a/finch/plugins/gnttinyurl.c
+++ b/finch/plugins/gnttinyurl.c
@@ -278,7 +278,7 @@ static gboolean writing_msg(PurpleAccoun
*message = t->str;
g_string_free(t, FALSE);
if (conv == NULL)
- conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, sender);
+ conv = purple_im_conversation_new(account, sender);
purple_conversation_set_data(conv, "TinyURLs", urls);
return FALSE;
}
diff --git a/libpurple/protocols/gg/gg.c b/libpurple/protocols/gg/gg.c
--- a/libpurple/protocols/gg/gg.c
+++ b/libpurple/protocols/gg/gg.c
@@ -420,7 +420,7 @@ void ggp_recv_message_handler(PurpleConn
conv = purple_conversations_find_with_account(
PURPLE_CONV_TYPE_IM, who, account);
if (conv == NULL)
- conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, who);
+ conv = purple_im_conversation_new(account, who);
purple_conversation_write(conv, purple_account_get_username(account), msg, PURPLE_MESSAGE_SEND, mtime);
} else if (ev->recipients_count == 0) {
serv_got_im(gc, from, msg, 0, mtime);
diff --git a/libpurple/protocols/irc/cmds.c b/libpurple/protocols/irc/cmds.c
--- a/libpurple/protocols/irc/cmds.c
+++ b/libpurple/protocols/irc/cmds.c
@@ -452,7 +452,7 @@ int irc_cmd_query(struct irc_conn *irc,
if (!args || !args[0])
return 0;
- convo = purple_conversation_new(PURPLE_CONV_TYPE_IM, irc->account, args[0]);
+ convo = purple_im_conversation_new(irc->account, args[0]);
purple_conversation_present(convo);
if (args[1]) {
diff --git a/libpurple/protocols/jabber/libfacebook.c b/libpurple/protocols/jabber/libfacebook.c
--- a/libpurple/protocols/jabber/libfacebook.c
+++ b/libpurple/protocols/jabber/libfacebook.c
@@ -230,7 +230,7 @@ static gboolean xmpp_uri_handler(const c
char *body = g_hash_table_lookup(params, "body");
if (user && *user) {
PurpleConversation *conv =
- purple_conversation_new(PURPLE_CONV_TYPE_IM, acct, user);
+ purple_im_conversation_new(acct, user);
purple_conversation_present(conv);
if (body && *body)
purple_conv_send_confirm(conv, body);
diff --git a/libpurple/protocols/jabber/libgtalk.c b/libpurple/protocols/jabber/libgtalk.c
--- a/libpurple/protocols/jabber/libgtalk.c
+++ b/libpurple/protocols/jabber/libgtalk.c
@@ -230,7 +230,7 @@ static gboolean xmpp_uri_handler(const c
char *body = g_hash_table_lookup(params, "body");
if (user && *user) {
PurpleConversation *conv =
- purple_conversation_new(PURPLE_CONV_TYPE_IM, acct, user);
+ purple_im_conversation_new(acct, user);
purple_conversation_present(conv);
if (body && *body)
purple_conv_send_confirm(conv, body);
diff --git a/libpurple/protocols/jabber/libxmpp.c b/libpurple/protocols/jabber/libxmpp.c
--- a/libpurple/protocols/jabber/libxmpp.c
+++ b/libpurple/protocols/jabber/libxmpp.c
@@ -224,7 +224,7 @@ static gboolean xmpp_uri_handler(const c
char *body = g_hash_table_lookup(params, "body");
if (user && *user) {
PurpleConversation *conv =
- purple_conversation_new(PURPLE_CONV_TYPE_IM, acct, user);
+ purple_im_conversation_new(acct, user);
purple_conversation_present(conv);
if (body && *body)
purple_conv_send_confirm(conv, body);
diff --git a/libpurple/protocols/msn/msg.c b/libpurple/protocols/msn/msg.c
--- a/libpurple/protocols/msn/msg.c
+++ b/libpurple/protocols/msn/msg.c
@@ -800,7 +800,7 @@ datacast_inform_user(MsnSwitchBoard *swb
swboard->conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM,
who, account);
if (swboard->conv == NULL)
- swboard->conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, who);
+ swboard->conv = purple_im_conversation_new(account, who);
}
}
@@ -996,7 +996,7 @@ void msn_emoticon_msg(MsnCmdProc *cmdpro
* the conversation doesn't exist then we cannot associate the new
* smiley with its GtkIMHtml widget. */
if (!conv) {
- conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, session->account, who);
+ conv = purple_im_conversation_new(session->account, who);
}
if (purple_conv_custom_smiley_add(conv, smile, "sha1", sha1, TRUE)) {
diff --git a/libpurple/protocols/msn/msn.c b/libpurple/protocols/msn/msn.c
--- a/libpurple/protocols/msn/msn.c
+++ b/libpurple/protocols/msn/msn.c
@@ -2888,7 +2888,7 @@ static gboolean msn_uri_handler(const ch
PurpleConversation *conv = purple_conversations_find_with_account(
PURPLE_CONV_TYPE_IM, sname, acct);
if (conv == NULL)
- conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, acct, sname);
+ conv = purple_im_conversation_new(acct, sname);
purple_conversation_present(conv);
}
/*else
diff --git a/libpurple/protocols/msn/session.c b/libpurple/protocols/msn/session.c
--- a/libpurple/protocols/msn/session.c
+++ b/libpurple/protocols/msn/session.c
@@ -189,7 +189,7 @@ msn_session_get_conv(MsnSession *session
conv = purple_conversations_find_with_account(PURPLE_CONV_TYPE_IM,
passport, account);
if(conv == NULL){
- conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, passport);
+ conv = purple_im_conversation_new(account, passport);
}
return conv;
}
diff --git a/libpurple/protocols/myspace/myspace.c b/libpurple/protocols/myspace/myspace.c
--- a/libpurple/protocols/myspace/myspace.c
+++ b/libpurple/protocols/myspace/myspace.c
@@ -3501,7 +3501,7 @@ msim_uri_handler_sendIM_cb(MsimSession *
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);
+ conv = purple_im_conversation_new(session->account, username);
}
/* Just open the window so the user can send an IM. */
diff --git a/libpurple/protocols/oscar/odc.c b/libpurple/protocols/oscar/odc.c
--- a/libpurple/protocols/oscar/odc.c
+++ b/libpurple/protocols/oscar/odc.c
@@ -63,7 +63,7 @@ peer_odc_close(PeerConnection *conn)
PurpleConversation *conv;
account = purple_connection_get_account(conn->od->gc);
- conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, conn->bn);
+ conv = purple_im_conversation_new(account, conn->bn);
purple_conversation_write(conv, NULL, tmp, PURPLE_MESSAGE_SYSTEM, time(NULL));
g_free(tmp);
}
@@ -565,7 +565,7 @@ peer_odc_recv_frame(PeerConnection *conn
/* Tell the local user that we are connected */
account = purple_connection_get_account(gc);
- conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, conn->bn);
+ conv = purple_im_conversation_new(account, conn->bn);
purple_conversation_write(conv, NULL, _("Direct IM established"),
PURPLE_MESSAGE_SYSTEM, time(NULL));
}
@@ -610,7 +610,7 @@ peer_odc_recv_frame(PeerConnection *conn
g_free(size2);
account = purple_connection_get_account(conn->od->gc);
- conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, conn->bn);
+ conv = purple_im_conversation_new(account, conn->bn);
purple_conversation_write(conv, NULL, tmp, PURPLE_MESSAGE_SYSTEM, time(NULL));
g_free(tmp);
diff --git a/libpurple/protocols/oscar/oscar.c b/libpurple/protocols/oscar/oscar.c
--- a/libpurple/protocols/oscar/oscar.c
+++ b/libpurple/protocols/oscar/oscar.c
@@ -4985,7 +4985,7 @@ oscar_close_directim(gpointer object, gp
/* OSCAR_DISCONNECT_LOCAL_CLOSED doesn't write anything to the convo
* window. Let the user know that we cancelled the Direct IM. */
- conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, name);
+ conv = purple_im_conversation_new(account, name);
purple_conversation_write(conv, NULL, _("You closed the connection."),
PURPLE_MESSAGE_SYSTEM, time(NULL));
}
@@ -5647,7 +5647,7 @@ static gboolean oscar_uri_handler(const
PurpleConversation *conv = purple_conversations_find_with_account(
PURPLE_CONV_TYPE_IM, bname, acct);
if (conv == NULL)
- conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, acct, bname);
+ conv = purple_im_conversation_new(acct, bname);
purple_conversation_present(conv);
if (message) {
diff --git a/libpurple/protocols/oscar/peer.c b/libpurple/protocols/oscar/peer.c
--- a/libpurple/protocols/oscar/peer.c
+++ b/libpurple/protocols/oscar/peer.c
@@ -752,7 +752,7 @@ peer_connection_establish_listener_cb(in
listener_port, ++conn->lastrequestnumber);
/* Print a message to a local conversation window */
- conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, conn->bn);
+ conv = purple_im_conversation_new(account, conn->bn);
tmp = g_strdup_printf(_("Asking %s to connect to us at %s:%hu for "
"Direct IM."), conn->bn, listener_ip, listener_port);
purple_conversation_write(conv, NULL, tmp, PURPLE_MESSAGE_SYSTEM, time(NULL));
@@ -840,7 +840,7 @@ peer_connection_trynext(PeerConnection *
PurpleConversation *conv;
tmp = g_strdup_printf(_("Attempting to connect to %s:%hu."),
conn->verifiedip, conn->port);
- conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, conn->bn);
+ conv = purple_im_conversation_new(account, conn->bn);
purple_conversation_write(conv, NULL, tmp,
PURPLE_MESSAGE_SYSTEM, time(NULL));
g_free(tmp);
@@ -913,7 +913,7 @@ peer_connection_trynext(PeerConnection *
gchar *tmp;
PurpleConversation *conv;
tmp = g_strdup(_("Attempting to connect via proxy server."));
- conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, conn->bn);
+ conv = purple_im_conversation_new(account, conn->bn);
purple_conversation_write(conv, NULL, tmp,
PURPLE_MESSAGE_SYSTEM, time(NULL));
g_free(tmp);
diff --git a/libpurple/protocols/sametime/sametime.c b/libpurple/protocols/sametime/sametime.c
--- a/libpurple/protocols/sametime/sametime.c
+++ b/libpurple/protocols/sametime/sametime.c
@@ -1843,7 +1843,7 @@ static void mw_session_announce(struct m
pd = mwSession_getClientData(s);
acct = purple_connection_get_account(pd->gc);
conv = purple_conversations_find_im_with_account(who, acct);
- if(! conv) conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, acct, who);
+ if(! conv) conv = purple_im_conversation_new(acct, who);
buddy = purple_find_buddy(acct, who);
if(buddy) who = (char *) purple_buddy_get_contact_alias(buddy);
@@ -4280,7 +4280,7 @@ static void notify_im(PurpleConnection *
acct = purple_connection_get_account(gc);
id = g_list_nth_data(row, 1);
More information about the Commits
mailing list