mirror of
https://github.com/moparisthebest/hexchat
synced 2024-11-23 01:32:22 -05:00
parent
860ef759f5
commit
df7a15e910
@ -144,7 +144,7 @@ notify_gui_update (void)
|
|||||||
GSList *list = notify_list;
|
GSList *list = notify_list;
|
||||||
GSList *slist;
|
GSList *slist;
|
||||||
gchar *name, *status, *server, *seen;
|
gchar *name, *status, *server, *seen;
|
||||||
int online, servcount;
|
int online, servcount, lastseenminutes;
|
||||||
time_t lastseen;
|
time_t lastseen;
|
||||||
char agobuf[128];
|
char agobuf[128];
|
||||||
|
|
||||||
@ -187,7 +187,13 @@ notify_gui_update (void)
|
|||||||
seen = _("Never");
|
seen = _("Never");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
snprintf (agobuf, sizeof (agobuf), _("%d minutes ago"), (int)(time (0) - lastseen) / 60);
|
lastseenminutes = (int)(time (0) - lastseen) / 60;
|
||||||
|
if (lastseenminutes < 60)
|
||||||
|
snprintf (agobuf, sizeof (agobuf), _("%d minutes ago"), lastseenminutes);
|
||||||
|
else if (lastseenminutes < 120)
|
||||||
|
snprintf (agobuf, sizeof (agobuf), _("An hour ago"));
|
||||||
|
else
|
||||||
|
snprintf (agobuf, sizeof (agobuf), _("%d hours ago"), lastseenminutes / 60);
|
||||||
seen = agobuf;
|
seen = agobuf;
|
||||||
}
|
}
|
||||||
if (!valid) /* create new tree row if required */
|
if (!valid) /* create new tree row if required */
|
||||||
|
Loading…
Reference in New Issue
Block a user