mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-21 05:44:29 -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"
|
||||
@ -101,7 +102,7 @@ MessagesDialog::MessagesDialog(QWidget *parent)
|
||||
|
||||
/* Set header resize modes and initial section sizes */
|
||||
QHeaderView * msglheader = ui.msgList->header () ;
|
||||
msglheader->setResizeMode (0, QHeaderView::Interactive);
|
||||
msglheader->setResizeMode (0, QHeaderView::Interactive);
|
||||
msglheader->setResizeMode (1, QHeaderView::Interactive);
|
||||
msglheader->setResizeMode (2, QHeaderView::Interactive);
|
||||
msglheader->setResizeMode (3, QHeaderView::Interactive);
|
||||
@ -112,11 +113,11 @@ MessagesDialog::MessagesDialog(QWidget *parent)
|
||||
msglheader->resizeSection ( 3, 200 );
|
||||
|
||||
ui.newmessageButton->setIcon(QIcon(QString(":/images/folder-draft24-pressed.png")));
|
||||
ui.replymessageButton->setIcon(QIcon(QString(":/images/replymail-pressed.png")));
|
||||
ui.replymessageButton->setIcon(QIcon(QString(":/images/replymail-pressed.png")));
|
||||
ui.replyallmessageButton->setIcon(QIcon(QString(":/images/replymailall24-hover.png")));
|
||||
ui.forwardmessageButton->setIcon(QIcon(QString(":/images/mailforward24-hover.png")));
|
||||
ui.removemessageButton->setIcon(QIcon(QString(":/images/deletemail-pressed.png")));
|
||||
ui.printbutton->setIcon(QIcon(QString(":/images/print24.png")));
|
||||
ui.removemessageButton->setIcon(QIcon(QString(":/images/deletemail-pressed.png")));
|
||||
ui.printbutton->setIcon(QIcon(QString(":/images/print24.png")));
|
||||
|
||||
ui.forwardmessageButton->setToolTip(tr("Forward selected Message"));
|
||||
ui.replyallmessageButton->setToolTip(tr("Replay to All"));
|
||||
@ -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();
|
||||
@ -200,9 +200,20 @@ ChanMsgDialog::ChanMsgDialog(bool msg, QWidget *parent, Qt::WFlags flags)
|
||||
alignmentmenu->addAction(actionAlignJustify);
|
||||
ui.textalignmentbtn->setMenu(alignmentmenu);
|
||||
|
||||
QPixmap pxm(24,24);
|
||||
pxm.fill(Qt::black);
|
||||
ui.colorbtn->setIcon(pxm);
|
||||
QPixmap pxm(24,24);
|
||||
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