comparison libpurple/idle.c @ 25902:be3ba7e07de5

merge of '123d615deaa8daeeea7d7c341a87eab4e83a7958' and 'e3b2ac4f2d9e6a6bc13c0394f980b28a75765258'
author Kevin Stange <kevin@simguy.net>
date Tue, 06 Jan 2009 07:53:19 +0000
parents a6e3cb32cdd2
children 584063555949
comparison
equal deleted inserted replaced
25901:4670851af098 25902:be3ba7e07de5
124 purple_signal_emit(purple_blist_get_handle(), "update-idle"); 124 purple_signal_emit(purple_blist_get_handle(), "update-idle");
125 125
126 idle_reporting = purple_prefs_get_string("/purple/away/idle_reporting"); 126 idle_reporting = purple_prefs_get_string("/purple/away/idle_reporting");
127 auto_away = purple_prefs_get_bool("/purple/away/away_when_idle"); 127 auto_away = purple_prefs_get_bool("/purple/away/away_when_idle");
128 128
129 if (!strcmp(idle_reporting, "system") && 129 if (purple_strequal(idle_reporting, "system") &&
130 (idle_ui_ops != NULL) && (idle_ui_ops->get_time_idle != NULL)) 130 (idle_ui_ops != NULL) && (idle_ui_ops->get_time_idle != NULL))
131 { 131 {
132 /* Use system idle time (mouse or keyboard movement, etc.) */ 132 /* Use system idle time (mouse or keyboard movement, etc.) */
133 time_idle = idle_ui_ops->get_time_idle(); 133 time_idle = idle_ui_ops->get_time_idle();
134 idle_recheck_interval = 1; 134 idle_recheck_interval = 1;
135 } 135 }
136 else if (!strcmp(idle_reporting, "purple")) 136 else if (purple_strequal(idle_reporting, "purple"))
137 { 137 {
138 /* Use 'Purple idle' */ 138 /* Use 'Purple idle' */
139 time_idle = time(NULL) - last_active_time; 139 time_idle = time(NULL) - last_active_time;
140 idle_recheck_interval = 0; 140 idle_recheck_interval = 0;
141 } 141 }