mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Added to Display File size of the attached files
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7825 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
8f9e212e14
commit
64c8048981
@ -494,7 +494,8 @@ void MessageWidget::fill(const std::string &msgId)
|
||||
QTreeWidgetItem *item = new QTreeWidgetItem;
|
||||
item->setText(COLUMN_FILE_NAME, QString::fromUtf8(it->fname.c_str()));
|
||||
item->setText(COLUMN_FILE_SIZE, QString::number(it->size));
|
||||
item->setText(COLUMN_FILE_HASH, QString::fromStdString(it->hash.toStdString()));
|
||||
item->setText(COLUMN_FILE_HASH, QString::fromStdString(it->hash.toStdString()));
|
||||
item->setTextAlignment( COLUMN_FILE_SIZE, Qt::AlignRight );
|
||||
|
||||
/* add to the list */
|
||||
items.append(item);
|
||||
@ -583,7 +584,8 @@ void MessageWidget::fill(const std::string &msgId)
|
||||
ui.msgText->resetImagesStatus(Settings->getMsgLoadEmbeddedImages() || (msgInfo.msgflags & RS_MSG_LOAD_EMBEDDED_IMAGES));
|
||||
ui.msgText->setHtml(text);
|
||||
|
||||
ui.filesText->setText(QString("%1").arg(msgInfo.count)/*.arg(msgInfo.count == 1 ? tr("File") : tr("Files"))*/);
|
||||
ui.filesText->setText(QString("%1").arg(msgInfo.count));
|
||||
ui.filesSize->setText(QString(misc::friendlyUnit(msgInfo.size)));
|
||||
|
||||
if (msgInfo.msgflags & RS_MSG_ENCRYPTED) {
|
||||
ui.decryptFrame->show();
|
||||
|
@ -298,6 +298,23 @@
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../images.qrc">:/images/attachment.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Recommended Files</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QPushButton" name="expandFilesButton">
|
||||
<property name="focusPolicy">
|
||||
@ -318,25 +335,15 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="filesText">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../images.qrc">:/images/attachment.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Recommended Files</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="filesText">
|
||||
<item row="0" column="5">
|
||||
<widget class="QLabel" name="filesSize">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
|
Loading…
Reference in New Issue
Block a user