changeset 5002:f78b24df83d5

[gaim-migrate @ 5337] Greying idle Yahoo buddies and added the Yahoo "game" emblem. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Fri, 04 Apr 2003 23:15:19 +0000
parents ffeb0a4ae2db
children 7e503bfcb37e
files pixmaps/status/default/Makefile.am src/buddy.c src/protocols/yahoo/yahoo.c
diffstat 3 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/pixmaps/status/default/Makefile.am	Fri Apr 04 22:20:37 2003 +0000
+++ b/pixmaps/status/default/Makefile.am	Fri Apr 04 23:15:19 2003 +0000
@@ -1,9 +1,9 @@
 EXTRA_DIST = login.png aim.png icq.png msn.png jabber.png yahoo.png gadu-gadu.png napster.png irc.png \
 	     activebuddy.png admin.png aol.png away.png wireless.png offline.png \
-		 dnd.png freeforchat.png invisible.png na.png occupied.png
+	     dnd.png freeforchat.png invisible.png na.png occupied.png game.png
 
 gaimstatuspixdir = $(datadir)/pixmaps/gaim/status/default
 
 gaimstatuspix_DATA = login.png aim.png icq.png msn.png jabber.png yahoo.png gadu-gadu.png napster.png irc.png \
 		     activebuddy.png admin.png aol.png away.png wireless.png offline.png \
-		     dnd.png freeforchat.png invisible.png na.png occupied.png
+		     dnd.png freeforchat.png invisible.png na.png occupied.png game.png
--- a/src/buddy.c	Fri Apr 04 22:20:37 2003 +0000
+++ b/src/buddy.c	Fri Apr 04 23:15:19 2003 +0000
@@ -712,7 +712,7 @@
 		}
 	}
 
-	if (b->idle) {
+	if (b->idle > 0) {
 		int ihrs, imin;
 		time_t t;
 		time(&t);
@@ -744,7 +744,7 @@
 			       b->name,
 			       aliastext ? _("\n<b>Alias:</b>") : "", aliastext ? aliastext : "",
 			       nicktext ? _("\n<b>Nickname:</b>") : "", nicktext ? nicktext : "",
-			       b->idle ? _("\n<b>Idle:</b>") : "", b->idle ? idletime : "",
+			       idletime ? _("\n<b>Idle:</b>") : "", idletime ? idletime : "",
 			       b->evil ? _("\n<b>Warned:</b>") : "", b->evil ? warning : "",
 			       !b->present ? _("\n<b>Status:</b> Offline") : "",
 			       statustext ? "\n" : "", statustext ? statustext : "",
@@ -959,7 +959,7 @@
 	time_t t;
 
 	if (!(blist_options & OPT_BLIST_SHOW_ICONS)) {
-		if ((b->idle > 0 && blist_options & OPT_BLIST_GREY_IDLERS && !selected) || b->present == 0) {
+		if ((b->idle && blist_options & OPT_BLIST_GREY_IDLERS && !selected) || b->present == 0) {
 			text =  g_strdup_printf("<span color='dim grey'>%s</span>",
 						esc);
 			g_free(esc);
@@ -1013,7 +1013,7 @@
 		}
 	}
 
-	if (b->idle) {
+	if (b->idle > 0) {
 		if (ihrs)
 			idletime = g_strdup_printf(_("Idle (%dh%02dm) "), ihrs, imin);
 		else
--- a/src/protocols/yahoo/yahoo.c	Fri Apr 04 22:20:37 2003 +0000
+++ b/src/protocols/yahoo/yahoo.c	Fri Apr 04 23:15:19 2003 +0000
@@ -425,6 +425,8 @@
 			}
 			if (state == YAHOO_STATUS_AVAILABLE)
 				serv_got_update(gc, name, 1, 0, 0, 0, gamestate);
+			else if (state == YAHOO_STATUS_IDLE)
+				serv_got_update(gc, name, 1, 0, 0, -1, (state << 2) | UC_UNAVAILABLE | gamestate);
 			else
 				serv_got_update(gc, name, 1, 0, 0, 0, (state << 2) | UC_UNAVAILABLE | gamestate);
 			break;
@@ -606,7 +608,7 @@
 			who = pair->value;
 		else if (pair->key == 14)
 			msg = pair->value;
-		else if (pair->key == 7)
+		else if (pair->key == 7) 
 			name = pair->value;
 		else if (pair->key == 10)
 			state = strtol(pair->value, NULL, 10);
@@ -621,7 +623,7 @@
 		if (state == YAHOO_STATUS_AVAILABLE)
 			serv_got_update(gc, name, 1, 0, 0, 0, 0);
 		else if (state == YAHOO_STATUS_IDLE)
-			serv_got_update(gc, name, 1, 0, 0, time(NULL) - 600, (state << 2));
+			serv_got_update(gc, name, 1, 0, 0, -1, (state << 2));
 		else
 			serv_got_update(gc, name, 1, 0, 0, 0, (state << 2) | UC_UNAVAILABLE);
 		if (state == YAHOO_STATUS_CUSTOM) {
@@ -1024,8 +1026,6 @@
 		*se = "offline";
 		return;
 	} else {
-		if ((b->uc >> 2) == YAHOO_STATUS_IDLE)
-			emblems[i++] = "idle";
 		if (b->uc & UC_UNAVAILABLE)
 			emblems[i++] = "away";
 		if (b->uc & YAHOO_STATUS_GAME)