pidgin: dc9f0ef1: Use purple_conversation accessor methods...

andrew.victor at mxit.com andrew.victor at mxit.com
Sat Oct 1 12:31:54 EDT 2011


----------------------------------------------------------------------
Revision: dc9f0ef15ceb7b2964adf00a5997d67271c3761a
Parent:   8e7b47f18e014b8e786f6b8e24ecfe6182130ddc
Author:   andrew.victor at mxit.com
Date:     10/01/11 11:03:57
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/dc9f0ef15ceb7b2964adf00a5997d67271c3761a

Changelog: 

Use purple_conversation accessor methods.


Changes against parent 8e7b47f18e014b8e786f6b8e24ecfe6182130ddc

  patched  libpurple/plugins/statenotify.c
  patched  libpurple/protocols/gg/gg.c
  patched  libpurple/protocols/irc/irc.c
  patched  libpurple/protocols/jabber/jabber.c
  patched  libpurple/protocols/sametime/sametime.c
  patched  libpurple/protocols/yahoo/libymsg.c
  patched  libpurple/protocols/yahoo/yahoochat.c

-------------- next part --------------
============================================================
--- libpurple/protocols/irc/irc.c	058933ba7cb9cac743f20bef042a5d59a39b5e82
+++ libpurple/protocols/irc/irc.c	052e8967ed217d8d5a10fea149f1e8d72016d99f
@@ -807,7 +807,7 @@ static int irc_chat_send(PurpleConnectio
 	}
 #endif
 	purple_markup_html_to_xhtml(what, NULL, &tmp);
-	args[0] = convo->name;
+	args[0] = purple_conversation_get_name(convo);
 	args[1] = tmp;
 
 	irc_cmd_privmsg(irc, "msg", NULL, args);
============================================================
--- libpurple/protocols/jabber/jabber.c	6de2577bb36ea690c14ff63ab7ffe9b2f6851974
+++ libpurple/protocols/jabber/jabber.c	641bbe3a36f8780f602c0087bf27a6e550ce4c19
@@ -3163,13 +3163,14 @@ static PurpleCmdRet jabber_cmd_buzz(Purp
 static PurpleCmdRet jabber_cmd_buzz(PurpleConversation *conv,
 		const char *cmd, char **args, char **error, void *data)
 {
-	JabberStream *js = purple_connection_get_protocol_data(conv->account->gc);
+	PurpleAccount *account = purple_conversation_get_account(conv);
+	JabberStream *js = purple_connection_get_protocol_data(account->gc);
 	const gchar *who;
 	gchar *description;
 	PurpleBuddy *buddy;
 	const char *alias;
 	PurpleAttentionType *attn =
-		purple_get_attention_type_from_code(conv->account, 0);
+		purple_get_attention_type_from_code(account, 0);
 
 	if (!args || !args[0]) {
 		/* use the buddy from conversation, if it's a one-to-one conversation */
@@ -3182,7 +3183,7 @@ static PurpleCmdRet jabber_cmd_buzz(Purp
 		who = args[0];
 	}
 
-	buddy = purple_find_buddy(conv->account, who);
+	buddy = purple_find_buddy(account, who);
 	if (buddy != NULL)
 		alias = purple_buddy_get_contact_alias(buddy);
 	else
@@ -3574,7 +3575,8 @@ jabber_cmd_mood(PurpleConversation *conv
 jabber_cmd_mood(PurpleConversation *conv,
 		const char *cmd, char **args, char **error, void *data)
 {
-	JabberStream *js = purple_connection_get_protocol_data(conv->account->gc);
+	PurpleAccount *account = purple_conversation_get_account(conv);
+	JabberStream *js = purple_connection_get_protocol_data(account->gc);
 
 	if (js->pep) {
 		/* if no argument was given, unset mood */
============================================================
--- libpurple/protocols/gg/gg.c	be1f4ebe1e11e74cad0ed7e877fbf532b316ab0a
+++ libpurple/protocols/gg/gg.c	9b4035daae84e7c68c1f36a3b78759f84fba8671
@@ -2543,7 +2543,7 @@ static int ggp_chat_send(PurpleConnectio
 	for (l = info->chats; l != NULL; l = l->next) {
 		chat = l->data;
 
-		if (g_utf8_collate(chat->name, conv->name) == 0) {
+		if (g_utf8_collate(chat->name, purple_conversation_get_name(conv)) == 0) {
 			break;
 		}
 
============================================================
--- libpurple/protocols/yahoo/libymsg.c	588aad1d805f34d6f4f36445870f08aa823dac23
+++ libpurple/protocols/yahoo/libymsg.c	fec5c927e226c414663ae3202fae64f799f8f5ea
@@ -5213,7 +5213,7 @@ yahoopurple_cmd_buzz(PurpleConversation 
 	if (*args && args[0])
 		return PURPLE_CMD_RET_FAILED;
 
-	purple_prpl_send_attention(account->gc, c->name, YAHOO_BUZZ);
+	purple_prpl_send_attention(account->gc, purple_conversation_get_name(c), YAHOO_BUZZ);
 
 	return PURPLE_CMD_RET_OK;
 }
@@ -5267,7 +5267,7 @@ gboolean yahoo_send_attention(PurpleConn
 	g_return_val_if_fail(c != NULL, FALSE);
 
 	purple_debug_info("yahoo", "Sending <ding> on account %s to buddy %s.\n",
-			username, c->name);
+			username, purple_conversation_get_name(c));
 	purple_conv_im_send_with_flags(PURPLE_CONV_IM(c), "<ding>", PURPLE_MESSAGE_INVISIBLE);
 
 	return TRUE;
============================================================
--- libpurple/plugins/statenotify.c	d75872c082c7a48bb21d5b231a46d4ce01f418c2
+++ libpurple/plugins/statenotify.c	0591e135302fe74a6dbc41a26cad767a2d6431e8
@@ -30,7 +30,7 @@ write_status(PurpleBuddy *buddy, const c
 
 	if (conv == NULL)
 		return;
-	g_return_if_fail(conv->type == PURPLE_CONV_TYPE_IM);
+	g_return_if_fail(purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM);
 
 	/* Prevent duplicate notifications for buddies in multiple groups */
 	if (buddy != purple_find_buddy(account, buddy_name))
============================================================
--- libpurple/protocols/yahoo/yahoochat.c	5195a1edf6c4ae7b6c694151ff1063cb0853bcee
+++ libpurple/protocols/yahoo/yahoochat.c	3ced7d4b8041409ac69c51b363734a2783a62cef
@@ -1166,7 +1166,7 @@ void yahoo_c_invite(PurpleConnection *gc
 	PurpleConversation *c;
 
 	c = purple_find_chat(gc, id);
-	if (!c || !c->name)
+	if (!c || !purple_conversation_get_name(c))
 		return;
 
 	if (id != YAHOO_CHAT_ID) {
============================================================
--- libpurple/protocols/sametime/sametime.c	0519678ad498dd1e9d4475dca6c86ccfbe5cd60d
+++ libpurple/protocols/sametime/sametime.c	f973b6ae1f2b826fd8ea47ad25d0f198ecc75f56
@@ -2480,12 +2480,12 @@ static void convo_error(struct mwConvers
   text = g_strconcat(_("Unable to send message: "), tmp, NULL);
 
   gconv = convo_get_gconv(conv);
-  if(gconv && !purple_conv_present_error(idb->user, gconv->account, text)) {
+  if(gconv && !purple_conv_present_error(idb->user, purple_conversation_get_account(gconv), text)) {
 
     g_free(text);
     text = g_strdup_printf(_("Unable to send message to %s:"),
 			   (idb->user)? idb->user: "(unknown)");
-    purple_notify_error(purple_account_get_connection(gconv->account),
+    purple_notify_error(purple_account_get_connection(purple_conversation_get_account(gconv)),
 		      NULL, text, tmp);
   }
 


More information about the Commits mailing list