From ff0b797248fc44cf4d5afba23f1a68afff2e2fdf Mon Sep 17 00:00:00 2001 From: defnax Date: Wed, 10 Mar 2010 22:41:10 +0000 Subject: [PATCH] added Timestamps for forum message feeds to know the date for each Forum Message. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2515 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/feeds/ForumMsgItem.cpp | 10 ++++ retroshare-gui/src/gui/feeds/ForumMsgItem.ui | 26 +++++++--- retroshare-gui/src/gui/feeds/PeerItem.ui | 52 +++++++++---------- 3 files changed, 55 insertions(+), 33 deletions(-) diff --git a/retroshare-gui/src/gui/feeds/ForumMsgItem.cpp b/retroshare-gui/src/gui/feeds/ForumMsgItem.cpp index 728eaae42..c86c2ec8d 100644 --- a/retroshare-gui/src/gui/feeds/ForumMsgItem.cpp +++ b/retroshare-gui/src/gui/feeds/ForumMsgItem.cpp @@ -115,6 +115,11 @@ void ForumMsgItem::updateItemStatic() prevSHLabel->setText("Subject: "); prevSubLabel->setText(QString::fromStdWString(msg.title)); prevMsgLabel->setText(QString::fromStdWString(msg.msg)); + + QDateTime qtime; + qtime.setTime_t(msg.ts); + QString timestamp = qtime.toString("dd.MMMM yyyy hh:mm:ss"); + timestamplabel->setText(timestamp); nextFrame->hide(); } @@ -123,6 +128,11 @@ void ForumMsgItem::updateItemStatic() nextSubLabel->setText(QString::fromStdWString(msg.title)); nextMsgLabel->setText(QString::fromStdWString(msg.msg)); + QDateTime qtime; + qtime.setTime_t(msg.ts); + QString timestamp = qtime.toString("dd.MMMM yyyy hh:mm:ss"); + timestamplabel->setText(timestamp); + prevSHLabel->setText("In Reply To: "); ForumMsgInfo msgParent; diff --git a/retroshare-gui/src/gui/feeds/ForumMsgItem.ui b/retroshare-gui/src/gui/feeds/ForumMsgItem.ui index 54fa626db..099029c07 100644 --- a/retroshare-gui/src/gui/feeds/ForumMsgItem.ui +++ b/retroshare-gui/src/gui/feeds/ForumMsgItem.ui @@ -6,7 +6,7 @@ 0 0 - 632 + 716 340 @@ -76,8 +76,9 @@ border-radius: 10px} + 9 75 - true + false true @@ -87,21 +88,32 @@ border-radius: 10px} - + Qt::Horizontal - - QSizePolicy::Preferred - - 500 + 40 20 + + + + + 9 + 75 + true + + + + Timestamp + + + diff --git a/retroshare-gui/src/gui/feeds/PeerItem.ui b/retroshare-gui/src/gui/feeds/PeerItem.ui index 5e231a031..1be0ad6d9 100644 --- a/retroshare-gui/src/gui/feeds/PeerItem.ui +++ b/retroshare-gui/src/gui/feeds/PeerItem.ui @@ -102,6 +102,32 @@ border-radius: 10px} + + + + + 75 + true + + + + Last Contact: + + + + + + + + 0 + 0 + + + + TextLabel + + + @@ -449,19 +475,6 @@ p, li { white-space: pre-wrap; } - - - - - 75 - true - - - - Last Contact: - - - @@ -557,19 +570,6 @@ p, li { white-space: pre-wrap; } - - - - - 0 - 0 - - - - TextLabel - - -