diff plugins/idle.c @ 11972:73777ad45562

[gaim-migrate @ 14265] Get rid of gc->is_idle, and get rid of some duplicate Yahoo! code committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Fri, 04 Nov 2005 17:33:32 +0000
parents 55052a685da6
children 2ff2965895f3
line wrap: on
line diff
--- a/plugins/idle.c	Fri Nov 04 07:37:10 2005 +0000
+++ b/plugins/idle.c	Fri Nov 04 17:33:32 2005 +0000
@@ -49,7 +49,7 @@
 static void
 set_idle_time(GaimAccount *acct, int mins_idle)
 {
-	time_t t = time(NULL); /* grab the current time */
+	time_t t;
 	GaimConnection *gc = gaim_account_get_connection(acct);
 	GaimPresence *presence = gaim_account_get_presence(acct);
 
@@ -60,9 +60,8 @@
 			"setting idle time for %s to %d\n",
 			gaim_account_get_username(acct), mins_idle);
 
-	t -= 60 * mins_idle; /* subtract seconds idle from current time */
+	t -= time(NULL) - (60 * mins_idle); /* subtract seconds idle from current time */
 	gc->last_sent_time = t;
-	gc->is_idle = 0;
 
 	gaim_presence_set_idle(presence, mins_idle ? TRUE : FALSE, t);
 }