changeset 3101:8b0d58f74d3f

[gaim-migrate @ 3115] Correctly show list icons from icq and wireless oscar users. Also correctly set icq user class for away. Thanks, Mark Doliner. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Thu, 28 Mar 2002 19:10:34 +0000
parents dd78d89c910b
children 8cf0497fbb30
files ChangeLog src/dialogs.c src/protocols/oscar/oscar.c
diffstat 3 files changed, 32 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Mar 28 18:22:49 2002 +0000
+++ b/ChangeLog	Thu Mar 28 19:10:34 2002 +0000
@@ -18,6 +18,7 @@
 	* Updated Finnish translation (Thanks Tero Kuusela)
 	* HTTP Proxy settings now HTTP compliant (Thanks Robert McQueen)	
 	* Speling corections (Thanks Tero Kuusela)
+	* Oscar list icon fixes (Thanks Mark Doliner)
 
 version 0.54 (03/14/2002):
 	* Compiles without GdkPixbuf again
--- a/src/dialogs.c	Thu Mar 28 18:22:49 2002 +0000
+++ b/src/dialogs.c	Thu Mar 28 19:10:34 2002 +0000
@@ -80,6 +80,7 @@
 #include "pixmaps/admin_icon.xpm"
 #include "pixmaps/ab.xpm"
 #include "pixmaps/wireless_icon.xpm"
+#include "pixmaps/gnomeicu-online.xpm"
 
 #define PATHSIZE 1024
 
@@ -1854,6 +1855,8 @@
 		return ab_xpm;
 	if (!g_strcasecmp(url, "wireless_icon.gif"))
 		return wireless_icon_xpm;
+	if (!g_strcasecmp(url, "icq_icon.gif"))
+		return icon_online_xpm
 	return NULL;
 }
 
--- a/src/protocols/oscar/oscar.c	Thu Mar 28 18:22:49 2002 +0000
+++ b/src/protocols/oscar/oscar.c	Thu Mar 28 19:10:34 2002 +0000
@@ -1612,16 +1612,18 @@
 
 static char *images(int flags) {
 	static char buf[1024];
-	g_snprintf(buf, sizeof(buf), "%s%s%s%s%s%s",
+	g_snprintf(buf, sizeof(buf), "%s%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_ICQ) ? "<IMG SRC=\"icq_icon.gif\">" : "",
 			(flags & AIM_FLAG_ADMINISTRATOR) ? "<IMG SRC=\"admin_icon.gif\">" : "",
 			(flags & AIM_FLAG_FREE) ? "<IMG SRC=\"free_icon.gif\">" : "",
 			(flags & AIM_FLAG_WIRELESS) ? "<IMG SRC=\"wireless_icon.gif\">" : "");
 	return buf;
 }
 
+
 /* XXX This is horribly copied from ../../buddy.c. */
 static char *caps_string(guint caps)
 {
@@ -1714,15 +1716,17 @@
 	prof = va_arg(ap, char *);
 	va_end(ap);
 
-	g_snprintf(legend, sizeof legend,
-			_("<br><BODY BGCOLOR=WHITE><hr><I>Legend:</I><br><br>"
-			"<IMG SRC=\"free_icon.gif\"> : Normal AIM User<br>"
-			"<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=\"wireless_icon.gif\"> : Wireless Device User<br>"));
-
+	if (!od->icq) {
+		g_snprintf(legend, sizeof legend,
+				_("<br><BODY BGCOLOR=WHITE><hr><I>Legend:</I><br><br>"
+				"<IMG SRC=\"free_icon.gif\"> : Normal AIM User<br>"
+				"<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=\"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",
 					asctime(localtime(&info->onlinesince)));
@@ -2618,7 +2622,7 @@
 		aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_DND);
 		gc->away = "";
 	} else if (!strcmp(state, "Not Available")) {
-		aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_OUT);
+		aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_OUT | AIM_ICQ_STATE_AWAY);
 		gc->away = "";
 	} else if (!strcmp(state, "Occupied")) {
 		aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_BUSY);
@@ -2631,7 +2635,7 @@
 		gc->away = "";
 	} else if (!strcmp(state, GAIM_AWAY_CUSTOM)) {
 	 	if (message) {
-			aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_OUT);
+			aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_OUT | AIM_ICQ_STATE_AWAY);
 			gc->away = "";
 		} else {
 		  
@@ -3094,24 +3098,24 @@
 		return (char **)icon_online_xpm;
 	if (uc & 0xff80) {
 		uc >>= 7;
-		if (uc & AIM_ICQ_STATE_AWAY)
-			return icon_away_xpm;
-		if (uc & AIM_ICQ_STATE_DND)
-			return icon_dnd_xpm;
+		if (uc & AIM_ICQ_STATE_INVISIBLE)
+			return icon_offline_xpm;
+		if (uc & AIM_ICQ_STATE_CHAT)
+			return icon_ffc_xpm;
+		if (uc & AIM_ICQ_STATE_BUSY)
+		 	return icon_occ_xpm;
 		if (uc & AIM_ICQ_STATE_OUT)
 			return icon_na_xpm;
-		if (uc & AIM_ICQ_STATE_BUSY)
-			return icon_occ_xpm;
-		if (uc & AIM_ICQ_STATE_CHAT)
-			return icon_ffc_xpm;
-		if (uc & AIM_ICQ_STATE_INVISIBLE)
-			return icon_offline_xpm;
+		if (uc & AIM_ICQ_STATE_DND)
+		 	return icon_dnd_xpm;
+		if (uc & AIM_ICQ_STATE_AWAY)
+			return icon_away_xpm;
 		return icon_online_xpm;
 	}
+	if (uc & UC_UNAVAILABLE)
+		return (char **)away_icon_xpm;
 	if (uc & UC_WIRELESS)
 		return (char **)wireless_icon_xpm;
-	if (uc & UC_UNAVAILABLE)
-		return (char **)away_icon_xpm;
 	if (uc & UC_AB)
 		return (char **)ab_xpm;
 	if (uc & UC_AOL)