From 34735c9668370b19105ec04043472afdf0ab6fdf Mon Sep 17 00:00:00 2001 From: defnax Date: Sat, 27 Feb 2010 18:40:16 +0000 Subject: [PATCH] when message timestamp is less then 24 hours then use this format "hh:mm:ss" else "dd.MM.yyyy hh:mm:ss" git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2451 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/MessagesDialog.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/retroshare-gui/src/gui/MessagesDialog.cpp b/retroshare-gui/src/gui/MessagesDialog.cpp index ecdfec13e..4d8e5bc52 100644 --- a/retroshare-gui/src/gui/MessagesDialog.cpp +++ b/retroshare-gui/src/gui/MessagesDialog.cpp @@ -646,8 +646,16 @@ void MessagesDialog::insertMessages() { QDateTime qtime; qtime.setTime_t(it->ts); + if (it->ts > 86400) + { + QString timestamp = qtime.toString("hh:mm:ss"); + item3 -> setText(timestamp); + } + else + { QString timestamp = qtime.toString("dd.MM.yyyy hh:mm:ss"); item3 -> setText(timestamp); + } } // From ....