# HG changeset patch # User Jeffrey Connelly # Date 1188081344 0 # Node ID a4b0ba3c656dc70ca30d4638a6b96099ad3680f0 # Parent 6395c2e96bc2ab8d9a92d418c9d9786cf2a46c13 Use new attention API from http://msimprpl.darkthoughts.net/attention3.diff, added in Pidgin 2.2.0. diff -r 6395c2e96bc2 -r a4b0ba3c656d libpurple/protocols/myspace/myspace.c --- a/libpurple/protocols/myspace/myspace.c Sat Aug 25 22:33:40 2007 +0000 +++ b/libpurple/protocols/myspace/myspace.c Sat Aug 25 22:35:44 2007 +0000 @@ -291,10 +291,10 @@ MsimAttentionType* attn; if (!types) { -#define _MSIM_ADD_NEW_ATTENTION(icn, des, incoming, outgoing) \ - attn = g_new0(MsimAttentionType, 1); \ - attn->icon = icn; \ - attn->description = des; \ +#define _MSIM_ADD_NEW_ATTENTION(icn, nme, incoming, outgoing) \ + attn = g_new0(MsimAttentionType, 1); \ + attn->icon_name = icn; \ + attn->name = nme; \ attn->incoming_description = incoming; \ attn->outgoing_description = outgoing; \ types = g_list_append(types, attn); @@ -317,7 +317,7 @@ /** Send a zap */ gboolean -msim_send_attention(PurpleConnection *gc, gchar *username, guint code) +msim_send_attention(PurpleConnection *gc, const gchar *username, guint code) { GList *types; MsimSession *session; @@ -453,7 +453,7 @@ MsimAttentionType *attn; attn = (MsimAttentionType *)types->data; - zap_names[i] = attn->description; + zap_names[i] = attn->name; ++i; } while ((types = g_list_next(types))); @@ -1718,7 +1718,7 @@ #ifdef MSIM_USE_ATTENTION_API attn.incoming_description = zap_past_tense[zap]; attn.outgoing_description = NULL; - attn.icon = NULL; /* TODO: icon */ + attn.icon_name = NULL; /* TODO: icon */ serv_got_attention(session->gc, username, &attn, TRUE); #else diff -r 6395c2e96bc2 -r a4b0ba3c656d libpurple/protocols/myspace/myspace.h --- a/libpurple/protocols/myspace/myspace.h Sat Aug 25 22:33:40 2007 +0000 +++ b/libpurple/protocols/myspace/myspace.h Sat Aug 25 22:35:44 2007 +0000 @@ -69,7 +69,7 @@ /* Use the attention API for zaps? */ /* Can't have until >=2.2.0, since is a new API. */ -/*#define MSIM_USE_ATTENTION_API */ +#define MSIM_USE_ATTENTION_API /* Constants */ @@ -258,7 +258,7 @@ GList *msim_status_types(PurpleAccount *acct); GList *msim_attention_types(PurpleAccount *acct); -gboolean msim_send_attention(PurpleConnection *gc, gchar *username, guint code); +gboolean msim_send_attention(PurpleConnection *gc, const gchar *username, guint code); GList *msim_blist_node_menu(PurpleBlistNode *node);