Mercurial > pidgin.yaz
comparison libpurple/protocols/msn/msn.c @ 21139:0df8263c21b8
show the idle status on tooltip as well, Fixes #3744
author | Ka-Hing Cheung <khc@hxbc.us> |
---|---|
date | Sun, 04 Nov 2007 21:55:35 +0000 |
parents | 0d6e582f2679 |
children | 6de09629f091 |
comparison
equal
deleted
inserted
replaced
21138:3ee4d335247d | 21139:0df8263c21b8 |
---|---|
578 char *tmp; | 578 char *tmp; |
579 | 579 |
580 psm = purple_status_get_attr_string(status, "message"); | 580 psm = purple_status_get_attr_string(status, "message"); |
581 currentmedia = purple_status_get_attr_string(status, PURPLE_TUNE_FULL); | 581 currentmedia = purple_status_get_attr_string(status, PURPLE_TUNE_FULL); |
582 | 582 |
583 if (!purple_presence_is_available(presence)) { | 583 if (!purple_status_is_available(status)) { |
584 name = purple_status_get_name(status); | 584 name = purple_status_get_name(status); |
585 } else { | 585 } else { |
586 name = NULL; | 586 name = NULL; |
587 } | 587 } |
588 | 588 |
589 if (name != NULL && *name) { | 589 if (name != NULL && *name) { |
590 char *tmp2 = g_markup_escape_text(name, -1); | 590 char *tmp2; |
591 | |
592 if (purple_presence_is_idle(presence)) { | |
593 tmp2 = g_markup_printf_escaped("%s/%s", name, _("Idle")); | |
594 } else { | |
595 tmp2 = g_markup_escape_text(name, -1); | |
596 } | |
591 | 597 |
592 if (psm != NULL && *psm) { | 598 if (psm != NULL && *psm) { |
593 tmp = g_markup_escape_text(psm, -1); | 599 tmp = g_markup_escape_text(psm, -1); |
594 purple_notify_user_info_add_pair(user_info, tmp2, tmp); | 600 purple_notify_user_info_add_pair(user_info, tmp2, tmp); |
595 g_free(tmp); | 601 g_free(tmp); |
599 | 605 |
600 g_free(tmp2); | 606 g_free(tmp2); |
601 } else { | 607 } else { |
602 if (psm != NULL && *psm) { | 608 if (psm != NULL && *psm) { |
603 tmp = g_markup_escape_text(psm, -1); | 609 tmp = g_markup_escape_text(psm, -1); |
604 purple_notify_user_info_add_pair(user_info, _("Status"), tmp); | 610 if (purple_presence_is_idle(presence)) { |
611 purple_notify_user_info_add_pair(user_info, _("Idle"), tmp); | |
612 } else { | |
613 purple_notify_user_info_add_pair(user_info, _("Status"), tmp); | |
614 } | |
605 g_free(tmp); | 615 g_free(tmp); |
616 } else { | |
617 if (purple_presence_is_idle(presence)) { | |
618 purple_notify_user_info_add_pair(user_info, _("Status"), | |
619 _("Idle")); | |
620 } else { | |
621 purple_notify_user_info_add_pair(user_info, _("Status"), | |
622 purple_status_get_name(status)); | |
623 } | |
606 } | 624 } |
607 } | 625 } |
608 | 626 |
609 if (currentmedia) { | 627 if (currentmedia) { |
610 tmp = g_markup_escape_text(currentmedia, -1); | 628 tmp = g_markup_escape_text(currentmedia, -1); |