comparison src/idle.c @ 1952:39df68320a82

[gaim-migrate @ 1962] i think this is more better. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Sat, 02 Jun 2001 00:22:25 +0000
parents e65b9942f649
children b66aca8e8dce
comparison
equal deleted inserted replaced
1951:44eeb8828198 1952:39df68320a82
66 } else 66 } else
67 #endif /* USE_SCREENSAVER */ 67 #endif /* USE_SCREENSAVER */
68 idle_time = t - gc->lastsent; 68 idle_time = t - gc->lastsent;
69 69
70 if ((general_options & OPT_GEN_AUTO_AWAY) && (idle_time > (60 * auto_away)) && 70 if ((general_options & OPT_GEN_AUTO_AWAY) && (idle_time > (60 * auto_away)) &&
71 (!gc->is_auto_away) && (!gc->away)) { 71 (!gc->is_auto_away)) {
72 debug_printf("making %s away automatically\n", gc->username);
73 set_default_away((GtkWidget*)NULL, (gpointer)g_slist_index(away_messages, default_away));
74 if (!gc->away) { 72 if (!gc->away) {
73 debug_printf("making %s away automatically\n", gc->username);
75 if (g_slist_length(connections) == 1) 74 if (g_slist_length(connections) == 1)
76 do_away_message(NULL, default_away); 75 do_away_message(NULL, default_away);
77 else if (default_away) 76 else if (default_away)
78 serv_set_away(gc, GAIM_AWAY_CUSTOM, default_away->message); 77 serv_set_away(gc, GAIM_AWAY_CUSTOM, default_away->message);
79 gc->is_auto_away = 1; 78 gc->is_auto_away = 1;
79 set_default_away(NULL, (gpointer)g_slist_index(away_messages, default_away));
80 } else 80 } else
81 gc->is_auto_away = 2; 81 gc->is_auto_away = 2;
82 } else if (gc->is_auto_away && idle_time < 60 * auto_away) { 82 } else if (gc->is_auto_away && idle_time < 60 * auto_away) {
83 if (gc->is_auto_away == 2) { 83 if (gc->is_auto_away == 2) {
84 gc->is_auto_away = 0; 84 gc->is_auto_away = 0;