merge of '186b07bbc7a3cc39ccd82c21019d302593d539ba'

Thu, 05 Jul 2007 07:00:15 +0000

author
Sadrul Habib Chowdhury <sadrul@pidgin.im>
date
Thu, 05 Jul 2007 07:00:15 +0000
changeset 18622
0ba2a27edf5b
parent 18614
186b07bbc7a3 (current diff)
parent 18621
552c07fd1c18 (diff)
child 18623
244951dea82f
child 18629
9e78088bfc46

merge of '186b07bbc7a3cc39ccd82c21019d302593d539ba'
and '552c07fd1c18ec70ac97b3a147d25cc9c7ab3a03'

--- a/ChangeLog	Thu Jul 05 06:54:18 2007 +0000
+++ b/ChangeLog	Thu Jul 05 07:00:15 2007 +0000
@@ -22,6 +22,7 @@
 	* A new status area has been added to the top of conversations to
 	  provide additional detail about the buddy, including buddy icon,
 	  protocol and status message.
+	* Show idle times in the buddy list as days, hours, seconds
 
 	Finch:
 	* There's support for workspaces now (details in the manpage)
--- a/pidgin/gtkblist.c	Thu Jul 05 06:54:18 2007 +0000
+++ b/pidgin/gtkblist.c	Thu Jul 05 07:00:15 2007 +0000
@@ -3417,13 +3417,16 @@
 			time_t idle_secs = purple_presence_get_idle_time(presence);
 
 			if (idle_secs > 0) {
-				int ihrs, imin;
+				int iday, ihrs, imin;
 
 				time(&t);
-				ihrs = (t - idle_secs) / 3600;
+				iday = (t - idle_secs) / (24 * 60 * 60);
+				ihrs = ((t - idle_secs) / 60 / 60) % 24;
 				imin = ((t - idle_secs) / 60) % 60;
 
-				if (ihrs)
+                if (iday)
+					idletime = g_strdup_printf(_("Idle %dd %dh %02dm"), iday, ihrs, imin);
+				else if (ihrs)
 					idletime = g_strdup_printf(_("Idle %dh %02dm"), ihrs, imin);
 				else
 					idletime = g_strdup_printf(_("Idle %dm"), imin);

mercurial