mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 08:29:26 -05:00
Show size of attached files in MessageWidget with friendly unit.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7857 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
817aa793fc
commit
8600b39384
@ -752,6 +752,7 @@ void MessageComposer::addFile(const FileInfo &fileInfo)
|
||||
|
||||
item->setText(COLUMN_FILE_NAME, QString::fromUtf8(fileInfo.fname.c_str()));
|
||||
item->setText(COLUMN_FILE_SIZE, misc::friendlyUnit(fileInfo.size));
|
||||
item->setTextAlignment(COLUMN_FILE_SIZE, Qt::AlignRight);
|
||||
item->setText(COLUMN_FILE_HASH, QString::fromStdString(fileInfo.hash.toStdString()));
|
||||
item->setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
|
||||
item->setCheckState(COLUMN_FILE_CHECKED, Qt::Checked);
|
||||
@ -2524,4 +2525,4 @@ void MessageComposer::showTagLabels()
|
||||
void MessageComposer::on_closeInfoFrameButton_clicked()
|
||||
{
|
||||
ui.distantFrame->setVisible(false);
|
||||
}
|
||||
}
|
||||
|
@ -493,9 +493,9 @@ void MessageWidget::fill(const std::string &msgId)
|
||||
for (it = recList.begin(); it != recList.end(); ++it) {
|
||||
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->setTextAlignment( COLUMN_FILE_SIZE, Qt::AlignRight );
|
||||
item->setText(COLUMN_FILE_SIZE, misc::friendlyUnit(it->size));
|
||||
item->setText(COLUMN_FILE_HASH, QString::fromStdString(it->hash.toStdString()));
|
||||
item->setTextAlignment( COLUMN_FILE_SIZE, Qt::AlignRight );
|
||||
|
||||
/* add to the list */
|
||||
items.append(item);
|
||||
|
Loading…
Reference in New Issue
Block a user