comparison src/status.c @ 11698:a647f92e1d57

[gaim-migrate @ 13989] Change the pref "Enable system log" to "Log all status changes" and remove: * Log when buddies log in/log out * Log when buddies become idle/un-idle * Log when buddies go away/come back * Log your own signons/idleness/awayness If the status change log is enable, then the above 4 things will all be logged committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 20 Oct 2005 04:04:06 +0000
parents bf6ba37db13b
children 58b8251c3d60
comparison
equal deleted inserted replaced
11697:186d2d293ef4 11698:a647f92e1d57
607 notify_buddy_status_update(GaimBuddy *buddy, GaimPresence *presence, 607 notify_buddy_status_update(GaimBuddy *buddy, GaimPresence *presence,
608 GaimStatus *old_status, GaimStatus *new_status) 608 GaimStatus *old_status, GaimStatus *new_status)
609 { 609 {
610 GaimBlistUiOps *ops = gaim_blist_get_ui_ops(); 610 GaimBlistUiOps *ops = gaim_blist_get_ui_ops();
611 611
612 if (gaim_prefs_get_bool("/core/logging/log_system") && 612 if (gaim_prefs_get_bool("/core/logging/log_system"))
613 gaim_prefs_get_bool("/core/logging/log_away_state"))
614 { 613 {
615 time_t current_time = time(NULL); 614 time_t current_time = time(NULL);
616 const char *buddy_alias = gaim_buddy_get_alias(buddy); 615 const char *buddy_alias = gaim_buddy_get_alias(buddy);
617 char *tmp = NULL; 616 char *tmp = NULL;
618 617
1301 1300
1302 if (!old_idle && idle) 1301 if (!old_idle && idle)
1303 { 1302 {
1304 gaim_signal_emit(gaim_blist_get_handle(), "buddy-idle", buddy); 1303 gaim_signal_emit(gaim_blist_get_handle(), "buddy-idle", buddy);
1305 1304
1306 if (gaim_prefs_get_bool("/core/logging/log_system") && 1305 if (gaim_prefs_get_bool("/core/logging/log_system"))
1307 gaim_prefs_get_bool("/core/logging/log_idle_state"))
1308 { 1306 {
1309 GaimLog *log = gaim_account_get_log(buddy->account); 1307 GaimLog *log = gaim_account_get_log(buddy->account);
1310 char *tmp = g_strdup_printf(_("%s became idle"), 1308 char *tmp = g_strdup_printf(_("%s became idle"),
1311 gaim_buddy_get_alias(buddy)); 1309 gaim_buddy_get_alias(buddy));
1312 1310
1317 } 1315 }
1318 else if (old_idle && !idle) 1316 else if (old_idle && !idle)
1319 { 1317 {
1320 gaim_signal_emit(gaim_blist_get_handle(), "buddy-unidle", buddy); 1318 gaim_signal_emit(gaim_blist_get_handle(), "buddy-unidle", buddy);
1321 1319
1322 if (gaim_prefs_get_bool("/core/logging/log_system") && 1320 if (gaim_prefs_get_bool("/core/logging/log_system"))
1323 gaim_prefs_get_bool("/core/logging/log_idle_state"))
1324 { 1321 {
1325 GaimLog *log = gaim_account_get_log(buddy->account); 1322 GaimLog *log = gaim_account_get_log(buddy->account);
1326 char *tmp = g_strdup_printf(_("%s became unidle"), 1323 char *tmp = g_strdup_printf(_("%s became unidle"),
1327 gaim_buddy_get_alias(buddy)); 1324 gaim_buddy_get_alias(buddy));
1328 1325