eion/purple-hangouts

Make the "Last seen" tooltip nicer to read
draft
2016-10-21, Eion Robb
b0a9edba101e
Parents e6b34c1972be
Children 72443e9fbb78
Make the "Last seen" tooltip nicer to read
--- a/libhangouts.c Thu Oct 20 22:37:19 2016 +1300
+++ b/libhangouts.c Fri Oct 21 09:45:00 2016 +1300
@@ -428,8 +428,9 @@
hbuddy = purple_buddy_get_protocol_data(buddy);
if (hbuddy != NULL) {
if (hbuddy->last_seen != 0) {
- const time_t last_seen = hbuddy->last_seen;
- purple_notify_user_info_add_pair_html(user_info, _("Last seen"), purple_date_format_full(localtime(&last_seen)));
+ gchar *seen = purple_str_seconds_to_string(time(NULL) - hbuddy->last_seen);
+ purple_notify_user_info_add_pair_html(user_info, _("Last seen"), seen);
+ g_free(seen);
}
if (hbuddy->in_call) {