Added and modified patch from Henry

Modified the date format according to the chosen language (locale).

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5798 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2012-11-10 18:59:58 +00:00
parent 59ed165c81
commit a573211629
27 changed files with 159 additions and 129 deletions

View file

@ -21,7 +21,7 @@
#include <QDateTime>
#include <QTimer>
#include <QFileInfo>
#include <QFileInfo>
#include "rshare.h"
#include "ChanMsgItem.h"
@ -188,10 +188,7 @@ void ChanMsgItem::updateItemStatic()
msgLabel->setText(RsHtml().formatText(NULL, QString::fromStdWString(cmi.msg), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS));
msgFrame->setVisible(!cmi.msg.empty());
QDateTime qtime;
qtime.setTime_t(cmi.ts);
QString timestamp = qtime.toString("dd.MMMM yyyy hh:mm");
datetimelabel->setText(timestamp);
datetimelabel->setText(Rshare::customLongDate(cmi.ts));
filelabel->setText(QString("(%1 %2) %3").arg(cmi.count).arg(tr("Files")).arg(misc::friendlyUnit(cmi.size)));
@ -210,11 +207,11 @@ void ChanMsgItem::updateItemStatic()
/* add file */
SubFileItem *fi = new SubFileItem(it->hash, it->fname, it->path, it->size,
SFI_STATE_REMOTE | SFI_TYPE_CHANNEL, "");
mFileItems.push_back(fi);
/* check if the file is a media file */
if (!misc::isPreviewable(QFileInfo(QString::fromUtf8(it->fname.c_str())).suffix()))
fi->mediatype();
mFileItems.push_back(fi);
/* check if the file is a media file */
if (!misc::isPreviewable(QFileInfo(QString::fromUtf8(it->fname.c_str())).suffix()))
fi->mediatype();
QLayout *layout = expandFrame->layout();