Mercurial > pidgin.yaz
comparison src/idle.c @ 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 | 6500a6c8d679 |
children | 9587ee01dc5d |
comparison
equal
deleted
inserted
replaced
5747:7ec0cd751e6b | 5748:c6a30e1868ae |
---|---|
85 } else | 85 } else |
86 #endif /* USE_SCREENSAVER */ | 86 #endif /* USE_SCREENSAVER */ |
87 idle_time = t - gc->last_sent_time; | 87 idle_time = t - gc->last_sent_time; |
88 | 88 |
89 if (gaim_prefs_get_bool("/core/away/away_when_idle") && | 89 if (gaim_prefs_get_bool("/core/away/away_when_idle") && |
90 (idle_time > (60 * auto_away)) && (!gc->is_auto_away)) { | 90 (idle_time > (60 * gaim_prefs_get_int("/core/away/mins_before_away"))) |
91 && (!gc->is_auto_away)) { | |
91 | 92 |
92 if (!gc->away) { | 93 if (!gc->away) { |
93 gaim_debug(GAIM_DEBUG_INFO, "idle", | 94 gaim_debug(GAIM_DEBUG_INFO, "idle", |
94 "Making %s away automatically\n", | 95 "Making %s away automatically\n", |
95 gaim_account_get_username(account)); | 96 gaim_account_get_username(account)); |
99 serv_set_away(gc, GAIM_AWAY_CUSTOM, default_away->message); | 100 serv_set_away(gc, GAIM_AWAY_CUSTOM, default_away->message); |
100 gc->is_auto_away = 1; | 101 gc->is_auto_away = 1; |
101 set_default_away(NULL, (gpointer)g_slist_index(away_messages, default_away)); | 102 set_default_away(NULL, (gpointer)g_slist_index(away_messages, default_away)); |
102 } else | 103 } else |
103 gc->is_auto_away = 2; | 104 gc->is_auto_away = 2; |
104 } else if (gc->is_auto_away && idle_time < 60 * auto_away) { | 105 } else if (gc->is_auto_away && |
106 idle_time < 60 * gaim_prefs_get_int("/core/away/mins_before_away")) { | |
105 if (gc->is_auto_away == 2) { | 107 if (gc->is_auto_away == 2) { |
106 gc->is_auto_away = 0; | 108 gc->is_auto_away = 0; |
107 return TRUE; | 109 return TRUE; |
108 } | 110 } |
109 gc->is_auto_away = 0; | 111 gc->is_auto_away = 0; |