From 28882efe035bb988169207c7f549498bdbae8eaa Mon Sep 17 00:00:00 2001 From: defnax Date: Sun, 17 Jan 2010 22:25:37 +0000 Subject: [PATCH] Added Timestamp for each Channel Message git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2067 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/feeds/ChanMsgItem.cpp | 6 +++ retroshare-gui/src/gui/feeds/ChanMsgItem.ui | 41 +++++++++++++++----- 2 files changed, 38 insertions(+), 9 deletions(-) diff --git a/retroshare-gui/src/gui/feeds/ChanMsgItem.cpp b/retroshare-gui/src/gui/feeds/ChanMsgItem.cpp index 046ab1ecb..425aebe53 100644 --- a/retroshare-gui/src/gui/feeds/ChanMsgItem.cpp +++ b/retroshare-gui/src/gui/feeds/ChanMsgItem.cpp @@ -19,6 +19,7 @@ * Boston, MA 02110-1301, USA. ****************************************************************/ #include +#include #include "ChanMsgItem.h" @@ -90,6 +91,11 @@ void ChanMsgItem::updateItemStatic() titleLabel->setText(QString::fromStdWString(cmi.subject)); subjectLabel->setText(QString::fromStdWString(cmi.msg)); } + + QDateTime qtime; + qtime.setTime_t(cmi.ts); + QString timestamp = qtime.toString("dd.MMMM yyyy hh:mm:ss"); + datetimelabel->setText(timestamp); msgLabel->setText(QString::fromStdWString(cmi.msg)); diff --git a/retroshare-gui/src/gui/feeds/ChanMsgItem.ui b/retroshare-gui/src/gui/feeds/ChanMsgItem.ui index c24d1468a..a3426bab5 100644 --- a/retroshare-gui/src/gui/feeds/ChanMsgItem.ui +++ b/retroshare-gui/src/gui/feeds/ChanMsgItem.ui @@ -6,7 +6,7 @@ 0 0 - 515 + 558 213 @@ -82,7 +82,7 @@ border-radius: 10px;} - + @@ -107,7 +107,24 @@ p, li { white-space: pre-wrap; } - + + + + + 75 + true + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:600; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt; color:#666666;">DateTime</span></p></body></html> + + + + @@ -116,7 +133,11 @@ p, li { white-space: pre-wrap; } - Short Description + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt; color:#666666;">Short Description</span></p></body></html> @@ -141,13 +162,13 @@ p, li { white-space: pre-wrap; } - 18 + 67 21 - + @@ -167,7 +188,7 @@ p, li { white-space: pre-wrap; } - + @@ -187,7 +208,7 @@ p, li { white-space: pre-wrap; } - + @@ -207,7 +228,7 @@ p, li { white-space: pre-wrap; } - + @@ -298,6 +319,8 @@ border-radius: 10px;} + +