Mercurial > pidgin
diff src/idle.c @ 5560:b7319c094153
[gaim-migrate @ 5961]
It compiles now, but if you use it, you won't have any accounts.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Fri, 30 May 2003 03:25:39 +0000 |
parents | 80e4ba770f97 |
children | 9eb5b13fd412 |
line wrap: on
line diff
--- a/src/idle.c Fri May 30 03:17:13 2003 +0000 +++ b/src/idle.c Fri May 30 03:25:39 2003 +0000 @@ -25,6 +25,7 @@ #include <time.h> #include <stdio.h> #include <unistd.h> +#include <string.h> #ifdef USE_SCREENSAVER #ifndef _WIN32 @@ -46,6 +47,7 @@ gint check_idle(gpointer data) { + const char *report_idle; struct gaim_connection *gc = data; time_t t; #ifdef USE_SCREENSAVER @@ -59,9 +61,10 @@ time(&t); + report_idle = gaim_prefs_get_string("/gaim/gtk/idle/reporting_method"); #ifdef USE_SCREENSAVER - if (report_idle == IDLE_SCREENSAVER) { + if (!strcmp(report_idle, "system")) { #ifndef _WIN32 int event_base, error_base; if (XScreenSaverQueryExtension(GDK_DISPLAY(), &event_base, &error_base)) { @@ -79,7 +82,9 @@ #endif /* USE_SCREENSAVER */ idle_time = t - gc->lastsent; - if (gaim_prefs_get_bool("/core/away/away_when_idle") && (idle_time > (60 * auto_away)) && (!gc->is_auto_away)) { + if (gaim_prefs_get_bool("/core/away/away_when_idle") && + (idle_time > (60 * auto_away)) && (!gc->is_auto_away)) { + if (!gc->away) { gaim_debug(GAIM_DEBUG_INFO, "idle", "Making %s away automatically\n", gc->username); @@ -117,9 +122,9 @@ /* If we're not reporting idle times to the server, still use Gaim usage for auto-away, but quit here so we don't report to the server */ - if (report_idle == IDLE_NONE) { + + if (!strcmp(report_idle, "none")) return TRUE; - } if (idle_time >= IDLEMARK && !gc->is_idle) { gaim_debug(GAIM_DEBUG_INFO, "idle", "Setting %s idle %d seconds\n",