changeset 25693:ebd63c4f9405

merge of 'be2cd9a5fc757e3ed024c6c2df60547fc162587e' and 'fa6727399704e6c9acbf974a052a303ae7a453c1'
author Marcus Lundblad <ml@update.uu.se>
date Wed, 04 Feb 2009 08:28:14 +0000
parents 65f2c84f122f (diff) a9b078297b69 (current diff)
children b955681d9597
files
diffstat 1 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jabber.c	Mon Feb 02 22:57:38 2009 +0000
+++ b/libpurple/protocols/jabber/jabber.c	Wed Feb 04 08:28:14 2009 +0000
@@ -1686,7 +1686,7 @@
 void jabber_tooltip_text(PurpleBuddy *b, PurpleNotifyUserInfo *user_info, gboolean full)
 {
 	JabberBuddy *jb;
-
+	
 	g_return_if_fail(b != NULL);
 	g_return_if_fail(b->account != NULL);
 	g_return_if_fail(b->account->gc != NULL);
@@ -1701,6 +1701,8 @@
 		const char *sub;
 		GList *l;
 		const char *mood;
+		gboolean multiple_resources = 
+			jb->resources && g_list_next(jb->resources);
 
 		if (full) {
 			PurpleStatus *status;
@@ -1747,8 +1749,8 @@
 					g_free(playing);
 				}
 			}
-		}
-
+		}	
+		
 		for(l=jb->resources; l; l = l->next) {
 			char *text = NULL;
 			char *res = NULL;
@@ -1788,7 +1790,10 @@
 			g_free(text);
 			
 			/* if the resource is idle, show that */
-			if (jbr->idle) {
+			/* only show it if there is more than one resource available for
+			 the buddy, since the "general" idleness will be shown anyway,
+			 this way we can see see the idleness of lower-priority resources */
+			if (jbr->idle && multiple_resources) {
 				gchar *idle_str = 
 					purple_str_seconds_to_string(time(NULL) - jbr->idle);
 				label = g_strdup_printf("%s%s",