diff src/gtkprefs.c @ 12272:3ef381cdc47e

[gaim-migrate @ 14574] This should fix idle time reporting for all accounts. Previously it would only work for one account because I'm dumb. We're also doing one idleness check every 5 seconds instead of checking for each account every 20 seconds. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Wed, 30 Nov 2005 06:03:49 +0000
parents 1c0fd404e07e
children 970fec1d7062
line wrap: on
line diff
--- a/src/gtkprefs.c	Wed Nov 30 06:02:38 2005 +0000
+++ b/src/gtkprefs.c	Wed Nov 30 06:03:49 2005 +0000
@@ -1668,7 +1668,7 @@
 		NULL);
 
 	button = gaim_gtk_prefs_checkbox(_("_Report idle time"),
-			"/gaim/gtk/idle/report", vbox);
+			"/core/away/report_idle", vbox);
 
 	vbox = gaim_gtk_make_frame (ret, _("Auto-away"));
 	button = gaim_gtk_prefs_checkbox(_("Change status when _idle"),
@@ -1867,10 +1867,6 @@
 	gaim_prefs_add_string("/gaim/gtk/browsers/browser", "mozilla");
 #endif
 
-	/* Idle */
-	gaim_prefs_add_none("/gaim/gtk/idle");
-	gaim_prefs_add_bool("/gaim/gtk/idle/report", TRUE);
-
 	/* Plugins */
 	gaim_prefs_add_none("/gaim/gtk/plugins");
 	gaim_prefs_add_string_list("/gaim/gtk/plugins/loaded", NULL);
@@ -1909,9 +1905,11 @@
 									 "/gaim/gtk/conversations/show_incoming_formatting");
 
 	/* this string pref turned into a boolean, try to be friendly */
-	tmp = gaim_prefs_get_string("/gaim/gtk/idle/reporting_method");
-	if (tmp != NULL && !strcmp(tmp, "none")) {
-		gaim_prefs_set_bool("/gaim/gtk/idle/report", FALSE);
+	if (gaim_prefs_exists("/gaim/gtk/idle/reporting_method"))
+	{
+		tmp = gaim_prefs_get_string("/gaim/gtk/idle/reporting_method");
+		if (tmp != NULL && !strcmp(tmp, "none"))
+			gaim_prefs_set_bool("/core/away/report_idle", FALSE);
 	}
 
 	/* Remove some no-longer-used prefs */
@@ -1944,6 +1942,7 @@
 	gaim_prefs_remove("/gaim/gtk/conversations/ignore_fonts");
 	gaim_prefs_remove("/gaim/gtk/conversations/ignore_font_sizes");
 	gaim_prefs_remove("/gaim/gtk/idle/reporting_method");
+	gaim_prefs_remove("/gaim/gtk/idle");
 	gaim_prefs_remove("/gaim/gtk/logging/individual_logs");
 	gaim_prefs_remove("/gaim/gtk/sound/signon");
 	gaim_prefs_remove("/gaim/gtk/sound/silent_signon");