mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-30 09:56:14 -05:00
enabled format file size's
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1352 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
070939704c
commit
aae4208470
@ -24,6 +24,7 @@
|
||||
#include "msgs/ChanMsgDialog.h"
|
||||
#include "gui/toaster/MessageToaster.h"
|
||||
#include "util/printpreview.h"
|
||||
#include "util/misc.h"
|
||||
|
||||
#include "rsiface/rsiface.h"
|
||||
#include "rsiface/rspeers.h"
|
||||
@ -716,7 +717,7 @@ void MessagesDialog::insertMsgTxtAndFiles()
|
||||
item -> setText(0, QString::fromStdString(it->fname));
|
||||
//std::cerr << "Msg FileItem(" << it->fname.length() << ") :" << it->fname << std::endl;
|
||||
|
||||
item -> setText(1, QString::number(it->size)); /* (1) Size */
|
||||
item -> setText(1, misc::friendlyUnit(it->size)); /* (1) Size */
|
||||
item -> setText(2, QString::number(0)); /* (2) Rank */ // what is this ???
|
||||
item -> setText(3, QString::fromStdString(it->hash));
|
||||
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "rsiface/rsmsgs.h"
|
||||
|
||||
#include <gui/Preferences/rsharesettings.h>
|
||||
#include "util/misc.h"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
@ -61,7 +62,6 @@ ChanMsgDialog::ChanMsgDialog(bool msg, QWidget *parent, Qt::WFlags flags)
|
||||
/* Invoke the Qt Designer generated object setup routine */
|
||||
ui.setupUi(this);
|
||||
|
||||
|
||||
setupFileActions();
|
||||
setupEditActions();
|
||||
setupViewActions();
|
||||
@ -204,6 +204,17 @@ ChanMsgDialog::ChanMsgDialog(bool msg, QWidget *parent, Qt::WFlags flags)
|
||||
pxm.fill(Qt::black);
|
||||
ui.colorbtn->setIcon(pxm);
|
||||
|
||||
/* Set header resize modes and initial section sizes */
|
||||
ui.msgFileList->setColumnCount(5);
|
||||
|
||||
QHeaderView * _smheader = ui.msgFileList->header () ;
|
||||
|
||||
_smheader->resizeSection ( 0, 200 );
|
||||
_smheader->resizeSection ( 1, 60 );
|
||||
_smheader->resizeSection ( 2, 60 );
|
||||
_smheader->resizeSection ( 3, 220 );
|
||||
_smheader->resizeSection ( 4, 10 );
|
||||
|
||||
/* Hide platform specific features */
|
||||
#ifdef Q_WS_WIN
|
||||
|
||||
@ -456,7 +467,7 @@ void ChanMsgDialog::insertFileList(const std::list<DirDetails>& files_info)
|
||||
QTreeWidgetItem *item = new QTreeWidgetItem((QTreeWidget*)0);
|
||||
|
||||
item->setText(0, QString::fromStdString(it->name)); /* (0) Filename */
|
||||
item->setText(1, QString::number(it->count)); /* (1) Size */
|
||||
item->setText(1, misc::friendlyUnit(it->count)); /* (1) Size */
|
||||
item->setText(2, QString::number(it->rank));
|
||||
item->setText(3, QString::fromStdString(it->hash));
|
||||
item->setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
|
||||
|
Loading…
Reference in New Issue
Block a user