# HG changeset patch # User Mark Doliner # Date 1142397704 0 # Node ID f5d4300aeed80103c83bf47d24de5f69bbd52719 # Parent 6ad9d666e824fab5257cc6bf5b22ac61996878d7 [gaim-migrate @ 15891] Fix sf bug #1443092, Events logging not working properly? "signed on" and "signed off" for people in your buddy list are now correctly logged to the system log. Richard, someone had already left a note in this function to make a change after the string freeze (I think it was you). We should still make a change after the string freeze, but the change is different now than it was before this commit. committer: Tailor Script diff -r 6ad9d666e824 -r f5d4300aeed8 src/status.c --- a/src/status.c Tue Mar 14 23:56:57 2006 +0000 +++ b/src/status.c Wed Mar 15 04:41:44 2006 +0000 @@ -616,34 +616,35 @@ const char *buddy_alias = gaim_buddy_get_alias(buddy); char *tmp = NULL; - if (gaim_status_is_available(new_status)) + if ((old_status != NULL) && + !gaim_status_is_online(old_status) && + gaim_status_is_online(new_status)) { - if (((old_status == NULL) || !gaim_status_is_online(old_status))) - { - tmp = g_strdup_printf(_("%s signed on"), buddy_alias); - } - else if (!gaim_status_is_available(old_status)) - { - tmp = g_strdup_printf(_("%s came back"), buddy_alias); - } + tmp = g_strdup_printf(_("%s signed on"), buddy_alias); } - else if ((old_status != NULL) && gaim_status_is_available(old_status)) + else if ((old_status != NULL) && + gaim_status_is_online(old_status) && + !gaim_status_is_online(new_status)) { - if (!gaim_status_is_online(new_status)) - { - tmp = g_strdup_printf(_("%s signed off"), buddy_alias); - } - else if (!gaim_status_is_available(new_status)) - { - tmp = g_strdup_printf(_("%s went away"), buddy_alias); - } + tmp = g_strdup_printf(_("%s signed off"), buddy_alias); } - else + else if (((old_status == NULL) || !gaim_status_is_available(old_status)) && + gaim_status_is_available(new_status)) { - /* XXX: Make this "%s is away" when strings thaw. */ + tmp = g_strdup_printf(_("%s came back"), buddy_alias); + } + else if (((old_status == NULL) || gaim_status_is_available(old_status)) && + !gaim_status_is_available(new_status)) + { tmp = g_strdup_printf(_("%s went away"), buddy_alias); } + /* After the string freeze, get rid of the above crap and use this. */ + /* + tmp = g_strdup_printf(_("%s is now %s"), buddy_alias, + gaim_status_get_name(new_status)); + */ + if (tmp != NULL) { GaimLog *log = gaim_account_get_log(buddy->account, FALSE);