changeset 19427:a4b0ba3c656d

Use new attention API from http://msimprpl.darkthoughts.net/attention3.diff, added in Pidgin 2.2.0.
author Jeffrey Connelly <jaconnel@calpoly.edu>
date Sat, 25 Aug 2007 22:35:44 +0000
parents 6395c2e96bc2
children 1fa10842eb83
files libpurple/protocols/myspace/myspace.c libpurple/protocols/myspace/myspace.h
diffstat 2 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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);