changeset 5748:c6a30e1868ae

[gaim-migrate @ 6173] another pref converted committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Wed, 04 Jun 2003 16:44:08 +0000
parents 7ec0cd751e6b
children 6d6ae91c5de7
files src/gaimrc.c src/idle.c src/ui.h
diffstat 3 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/gaimrc.c	Wed Jun 04 16:18:33 2003 +0000
+++ b/src/gaimrc.c	Wed Jun 04 16:44:08 2003 +0000
@@ -363,7 +363,8 @@
 		}
 		/* auto { time } { default message } */
 		else if (!strcmp(p->option, "auto")) {
-			auto_away = atoi(p->value[0]);
+			gaim_prefs_set_int("/core/away/mins_before_away",
+					atoi(p->value[0]));
 			default_away = g_slist_nth_data(away_messages, atoi(p->value[1]));
 		}
 	}
--- a/src/idle.c	Wed Jun 04 16:18:33 2003 +0000
+++ b/src/idle.c	Wed Jun 04 16:44:08 2003 +0000
@@ -87,7 +87,8 @@
 		idle_time = t - gc->last_sent_time;
 
 	if (gaim_prefs_get_bool("/core/away/away_when_idle") &&
-		(idle_time > (60 * auto_away)) && (!gc->is_auto_away)) {
+		(idle_time > (60 * gaim_prefs_get_int("/core/away/mins_before_away")))
+		&& (!gc->is_auto_away)) {
 
 		if (!gc->away) {
 			gaim_debug(GAIM_DEBUG_INFO, "idle",
@@ -101,7 +102,8 @@
 			set_default_away(NULL, (gpointer)g_slist_index(away_messages, default_away));
 		} else
 			gc->is_auto_away = 2;
-	} else if (gc->is_auto_away && idle_time < 60 * auto_away) {
+	} else if (gc->is_auto_away &&
+			idle_time < 60 * gaim_prefs_get_int("/core/away/mins_before_away")) {
 		if (gc->is_auto_away == 2) {
 			gc->is_auto_away = 0;
 			return TRUE;
--- a/src/ui.h	Wed Jun 04 16:18:33 2003 +0000
+++ b/src/ui.h	Wed Jun 04 16:44:08 2003 +0000
@@ -159,7 +159,6 @@
 /* Globals in away.c */
 extern struct away_message *awaymessage;
 extern struct away_message *default_away;
-extern int auto_away;
 extern GtkWidget *awaymenu;
 extern GtkWidget *awayqueue;
 extern GtkListStore *awayqueuestore;