Mercurial > pidgin.yaz
comparison src/status.c @ 13515:f5d4300aeed8
[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 <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Wed, 15 Mar 2006 04:41:44 +0000 |
parents | 702107dd58f1 |
children | 207f974ca030 |
comparison
equal
deleted
inserted
replaced
13514:6ad9d666e824 | 13515:f5d4300aeed8 |
---|---|
614 { | 614 { |
615 time_t current_time = time(NULL); | 615 time_t current_time = time(NULL); |
616 const char *buddy_alias = gaim_buddy_get_alias(buddy); | 616 const char *buddy_alias = gaim_buddy_get_alias(buddy); |
617 char *tmp = NULL; | 617 char *tmp = NULL; |
618 | 618 |
619 if (gaim_status_is_available(new_status)) | 619 if ((old_status != NULL) && |
620 { | 620 !gaim_status_is_online(old_status) && |
621 if (((old_status == NULL) || !gaim_status_is_online(old_status))) | 621 gaim_status_is_online(new_status)) |
622 { | 622 { |
623 tmp = g_strdup_printf(_("%s signed on"), buddy_alias); | 623 tmp = g_strdup_printf(_("%s signed on"), buddy_alias); |
624 } | 624 } |
625 else if (!gaim_status_is_available(old_status)) | 625 else if ((old_status != NULL) && |
626 { | 626 gaim_status_is_online(old_status) && |
627 tmp = g_strdup_printf(_("%s came back"), buddy_alias); | 627 !gaim_status_is_online(new_status)) |
628 } | 628 { |
629 } | 629 tmp = g_strdup_printf(_("%s signed off"), buddy_alias); |
630 else if ((old_status != NULL) && gaim_status_is_available(old_status)) | 630 } |
631 { | 631 else if (((old_status == NULL) || !gaim_status_is_available(old_status)) && |
632 if (!gaim_status_is_online(new_status)) | 632 gaim_status_is_available(new_status)) |
633 { | 633 { |
634 tmp = g_strdup_printf(_("%s signed off"), buddy_alias); | 634 tmp = g_strdup_printf(_("%s came back"), buddy_alias); |
635 } | 635 } |
636 else if (!gaim_status_is_available(new_status)) | 636 else if (((old_status == NULL) || gaim_status_is_available(old_status)) && |
637 { | 637 !gaim_status_is_available(new_status)) |
638 tmp = g_strdup_printf(_("%s went away"), buddy_alias); | 638 { |
639 } | |
640 } | |
641 else | |
642 { | |
643 /* XXX: Make this "%s is away" when strings thaw. */ | |
644 tmp = g_strdup_printf(_("%s went away"), buddy_alias); | 639 tmp = g_strdup_printf(_("%s went away"), buddy_alias); |
645 } | 640 } |
641 | |
642 /* After the string freeze, get rid of the above crap and use this. */ | |
643 /* | |
644 tmp = g_strdup_printf(_("%s is now %s"), buddy_alias, | |
645 gaim_status_get_name(new_status)); | |
646 */ | |
646 | 647 |
647 if (tmp != NULL) | 648 if (tmp != NULL) |
648 { | 649 { |
649 GaimLog *log = gaim_account_get_log(buddy->account, FALSE); | 650 GaimLog *log = gaim_account_get_log(buddy->account, FALSE); |
650 | 651 |