gobjectification: a76a4b43: Fix some gc->account to purple_connectio...
qulogic at pidgin.im
qulogic at pidgin.im
Tue Aug 12 00:58:32 EDT 2008
-----------------------------------------------------------------
Revision: a76a4b4375d96fef110a68e06d51afc24337fd33
Ancestor: 921b58e995614e99950d930d287a29b432fbb1e0
Author: qulogic at pidgin.im
Date: 2008-08-10T23:19:34
Branch: im.pidgin.gobjectification
URL: http://d.pidgin.im/viewmtn/revision/info/a76a4b4375d96fef110a68e06d51afc24337fd33
Modified files:
libpurple/prpl.c
ChangeLog:
Fix some gc->account to purple_connection_get_account(gc) problems.
-------------- next part --------------
============================================================
--- libpurple/prpl.c a2f9ed66262e0720f017a353b705a132e4e7825e
+++ libpurple/prpl.c 8f3145e42a7074b802d3d810c65614070aac224a
@@ -392,6 +392,7 @@ purple_prpl_send_attention(PurpleConnect
void
purple_prpl_send_attention(PurpleConnection *gc, const char *who, guint type_code)
{
+ PurpleAccount *account;
PurpleAttentionType *attn;
PurpleMessageFlags flags;
PurplePlugin *prpl;
@@ -405,15 +406,16 @@ purple_prpl_send_attention(PurpleConnect
g_return_if_fail(gc != NULL);
g_return_if_fail(who != NULL);
- prpl = purple_find_prpl(purple_account_get_protocol_id(gc->account));
+ account = purple_connection_get_account(gc);
+ prpl = purple_find_prpl(purple_account_get_protocol_id(account));
send_attention = PURPLE_PLUGIN_PROTOCOL_INFO(prpl)->send_attention;
g_return_if_fail(send_attention != NULL);
mtime = time(NULL);
- attn = purple_get_attention_type_from_code(gc->account, type_code);
+ attn = purple_get_attention_type_from_code(account, type_code);
- if ((buddy = purple_find_buddy(purple_connection_get_account(gc), who)) != NULL)
+ if ((buddy = purple_find_buddy(account, who)) != NULL)
alias = purple_buddy_get_contact_alias(buddy);
else
alias = who;
@@ -432,7 +434,7 @@ purple_prpl_send_attention(PurpleConnect
if (!send_attention(gc, who, type_code))
return;
- conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, gc->account, who);
+ conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, who);
purple_conv_im_write(PURPLE_CONV_IM(conv), NULL, description, flags, mtime);
g_free(description);
@@ -450,7 +452,7 @@ got_attention(PurpleConnection *gc, int
mtime = time(NULL);
- attn = purple_get_attention_type_from_code(gc->account, type_code);
+ attn = purple_get_attention_type_from_code(purple_connection_get_account(gc), type_code);
/* PURPLE_MESSAGE_NOTIFY is for attention messages. */
flags = PURPLE_MESSAGE_SYSTEM | PURPLE_MESSAGE_NOTIFY | PURPLE_MESSAGE_RECV;
More information about the Commits
mailing list