changeset 3079:955f52bbcf8a

[gaim-migrate @ 3093] AIM 4.8 Mobile indicator by Mark "the KingAnt" Doliner. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Tue, 19 Mar 2002 06:26:05 +0000
parents 2e324d44dd65
children 8b48f6843ea0
files ChangeLog pixmaps/Makefile.am src/dialogs.c src/protocols/oscar/aim.h src/protocols/oscar/oscar.c
diffstat 5 files changed, 23 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Mar 18 03:43:57 2002 +0000
+++ b/ChangeLog	Tue Mar 19 06:26:05 2002 +0000
@@ -10,7 +10,9 @@
 	* Can reorder your accounts in the account editor (Thanks
 	  Luke Schierer)
 	* Updated Dutch translation
-	
+	* Shows "mobile" icon for Oscar buddies using mobile
+	  devices (Thanks Mark Doliner)
+
 version 0.54 (03/14/2002):
 	* Compiles without GdkPixbuf again
 	* GtkIMHtml will refresh when you set a new GTK+ theme
@@ -29,7 +31,7 @@
 	* Protocol specific smiley faces
 	* Italian translation added
 	* IM Image sending
-	
+
 version 0.53 (02/28/2002):
 	* Updated Polish Translation (thanks Przemyslaw Sulek)
 	* Slovak translation added (Thanks Daniel Rezny)
--- a/pixmaps/Makefile.am	Mon Mar 18 03:43:57 2002 +0000
+++ b/pixmaps/Makefile.am	Tue Mar 19 06:26:05 2002 +0000
@@ -111,6 +111,7 @@
 		underline.xpm			\
 		warn.xpm			\
 		wink.xpm			\
+		wireless_icon.xpm		\
 		wood.xpm			\
 		yell.xpm			
 
--- a/src/dialogs.c	Mon Mar 18 03:43:57 2002 +0000
+++ b/src/dialogs.c	Tue Mar 19 06:26:05 2002 +0000
@@ -79,6 +79,7 @@
 #include "pixmaps/dt_icon.xpm"
 #include "pixmaps/admin_icon.xpm"
 #include "pixmaps/ab.xpm"
+#include "pixmaps/wireless_icon.xpm"
 
 #define PATHSIZE 1024
 
@@ -1847,6 +1848,8 @@
 		return admin_icon_xpm;
 	if (!g_strcasecmp(url, "ab_icon.gif"))
 		return ab_xpm;
+	if (!g_strcasecmp(url, "wireless_icon.gif"))
+		return wireless_icon_xpm;
 	return NULL;
 }
 
--- a/src/protocols/oscar/aim.h	Mon Mar 18 03:43:57 2002 +0000
+++ b/src/protocols/oscar/aim.h	Tue Mar 19 06:26:05 2002 +0000
@@ -425,7 +425,7 @@
 #define AIM_FLAG_FREE 		0x0010
 #define AIM_FLAG_AWAY		0x0020
 #define AIM_FLAG_ICQ		0x0040
-#define AIM_FLAG_UNKNOWN80	0x0080
+#define AIM_FLAG_WIRELESS	0x0080
 #define AIM_FLAG_UNKNOWN100	0x0100
 #define AIM_FLAG_UNKNOWN200	0x0200
 #define AIM_FLAG_ACTIVEBUDDY    0x0400
--- a/src/protocols/oscar/oscar.c	Mon Mar 18 03:43:57 2002 +0000
+++ b/src/protocols/oscar/oscar.c	Tue Mar 19 06:26:05 2002 +0000
@@ -49,6 +49,7 @@
 #include "pixmaps/away_icon.xpm"
 #include "pixmaps/dt_icon.xpm"
 #include "pixmaps/free_icon.xpm"
+#include "pixmaps/wireless_icon.xpm"
 
 #include "pixmaps/gnomeicu-online.xpm"
 #include "pixmaps/gnomeicu-offline.xpm"
@@ -71,6 +72,7 @@
 #define UC_UNCONFIRMED	0x08
 #define UC_NORMAL	0x10
 #define UC_AB		0x20
+#define UC_WIRELESS	0x40
 
 #define AIMHASHDATA "http://gaim.sourceforge.net/aim_data.php3"
 
@@ -1159,9 +1161,11 @@
 			type |= UC_NORMAL;
 		if (info->flags & AIM_FLAG_AWAY)
 			type |= UC_UNAVAILABLE;
+		if (info->flags & AIM_FLAG_WIRELESS)
+			type |= UC_WIRELESS;
 	}
 	if (info->present & AIM_USERINFO_PRESENT_ICQEXTSTATUS) {
-		type = (info->icqinfo.status << 6);
+		type = (info->icqinfo.status << 7);
 		if (!(info->icqinfo.status & AIM_ICQ_STATE_CHAT) &&
 		      (info->icqinfo.status != AIM_ICQ_STATE_NORMAL)) {
 			type |= UC_UNAVAILABLE;
@@ -1608,12 +1612,13 @@
 
 static char *images(int flags) {
 	static char buf[1024];
-	g_snprintf(buf, sizeof(buf), "%s%s%s%s%s",
+	g_snprintf(buf, sizeof(buf), "%s%s%s%s%s%s",
 			(flags & AIM_FLAG_ACTIVEBUDDY) ? "<IMG SRC=\"ab_icon.gif\">" : "",
 			(flags & AIM_FLAG_UNCONFIRMED) ? "<IMG SRC=\"dt_icon.gif\">" : "",
 			(flags & AIM_FLAG_AOL) ? "<IMG SRC=\"aol_icon.gif\">" : "",
 			(flags & AIM_FLAG_ADMINISTRATOR) ? "<IMG SRC=\"admin_icon.gif\">" : "",
-			(flags & AIM_FLAG_FREE) ? "<IMG SRC=\"free_icon.gif\">" : "");
+			(flags & AIM_FLAG_FREE) ? "<IMG SRC=\"free_icon.gif\">" : "",
+			(flags & AIM_FLAG_WIRELESS) ? "<IMG SRC=\"wireless_icon.gif\">" : "");
 	return buf;
 }
 
@@ -1715,7 +1720,8 @@
 			"<IMG SRC=\"aol_icon.gif\"> : AOL User <br>"
 			"<IMG SRC=\"dt_icon.gif\"> : Trial AIM User <br>"
 			"<IMG SRC=\"admin_icon.gif\"> : Administrator <br>"
-			"<IMG SRC=\"ab_icon.gif\"> : ActiveBuddy Interactive Agent<br>"));
+			"<IMG SRC=\"ab_icon.gif\"> : ActiveBuddy Interactive Agent<br>"
+			"<IMG SRC=\"wireless_icon.gif\"> : Wireless Device User<br>"));
 
 	if (info->present & AIM_USERINFO_PRESENT_ONLINESINCE) {
 		onlinesince = g_strdup_printf("Online Since : <B>%s</B><BR>\n",
@@ -3056,8 +3062,8 @@
 static char **oscar_list_icon(int uc) {
 	if (uc == 0)
 		return (char **)icon_online_xpm;
-	if (uc & 0x7fc0) {
-		uc >>= 6;
+	if (uc & 0xff80) {
+		uc >>= 7;
 		if (uc & AIM_ICQ_STATE_AWAY)
 			return icon_away_xpm;
 		if (uc & AIM_ICQ_STATE_DND)
@@ -3072,6 +3078,8 @@
 			return icon_offline_xpm;
 		return icon_online_xpm;
 	}
+	if (uc & UC_WIRELESS)
+		return (char **)wireless_icon_xpm;
 	if (uc & UC_UNAVAILABLE)
 		return (char **)away_icon_xpm;
 	if (uc & UC_AB)