Mercurial > pidgin.yaz
changeset 18438:02d93d5adca9
merge of '72d84aa6f2acbef6d592de141c3a8f6f5c4e7fd6'
and 'cccd519c3b17db70c06cc472252bcfac440810cc'
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Thu, 05 Jul 2007 07:00:15 +0000 |
parents | ecb223f9f75b (diff) 1bb77e24cced (current diff) |
children | ec80e921818c ac7b380daa0a |
files | |
diffstat | 1 files changed, 22 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/finch/gntblist.c Thu Jul 05 02:39:54 2007 +0000 +++ b/finch/gntblist.c Thu Jul 05 07:00:15 2007 +0000 @@ -507,21 +507,24 @@ gboolean ascii = gnt_ascii_only(); presence = purple_buddy_get_presence(buddy); - now = purple_presence_get_active_status(presence); + if (purple_presence_is_status_primitive_active(presence, PURPLE_STATUS_MOBILE)) + strncpy(status, ascii ? ":" : "☎", sizeof(status) - 1); + else { + now = purple_presence_get_active_status(presence); - prim = purple_status_type_get_primitive(purple_status_get_type(now)); + prim = purple_status_type_get_primitive(purple_status_get_type(now)); - switch(prim) - { - case PURPLE_STATUS_OFFLINE: - strncpy(status, ascii ? "x" : "⊗", sizeof(status) - 1); - break; - case PURPLE_STATUS_AVAILABLE: - strncpy(status, ascii ? "o" : "◯", sizeof(status) - 1); - break; - default: - strncpy(status, ascii ? "." : "⊖", sizeof(status) - 1); - break; + switch(prim) { + case PURPLE_STATUS_OFFLINE: + strncpy(status, ascii ? "x" : "⊗", sizeof(status) - 1); + break; + case PURPLE_STATUS_AVAILABLE: + strncpy(status, ascii ? "o" : "◯", sizeof(status) - 1); + break; + default: + strncpy(status, ascii ? "." : "⊖", sizeof(status) - 1); + break; + } } name = purple_buddy_get_alias(buddy); } @@ -1269,12 +1272,14 @@ PurplePluginProtocolInfo *prpl_info; PurpleAccount *account; PurpleNotifyUserInfo *user_info; + PurplePresence *presence; const char *alias = purple_buddy_get_alias(buddy); char *tmp, *strip; user_info = purple_notify_user_info_new(); account = purple_buddy_get_account(buddy); + presence = purple_buddy_get_presence(buddy); if (!full || g_utf8_collate(purple_buddy_get_name(buddy), alias)) purple_notify_user_info_add_pair(user_info, _("Nickname"), alias); @@ -1308,6 +1313,10 @@ strip = purple_markup_strip_html(tmp); g_string_append(str, strip); + + if (purple_presence_is_status_primitive_active(presence, PURPLE_STATUS_MOBILE)) + g_string_append(str, _("On Mobile")); + g_free(strip); g_free(tmp); }