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 "msgs/ChanMsgDialog.h"
|
||||||
#include "gui/toaster/MessageToaster.h"
|
#include "gui/toaster/MessageToaster.h"
|
||||||
#include "util/printpreview.h"
|
#include "util/printpreview.h"
|
||||||
|
#include "util/misc.h"
|
||||||
|
|
||||||
#include "rsiface/rsiface.h"
|
#include "rsiface/rsiface.h"
|
||||||
#include "rsiface/rspeers.h"
|
#include "rsiface/rspeers.h"
|
||||||
@ -101,7 +102,7 @@ MessagesDialog::MessagesDialog(QWidget *parent)
|
|||||||
|
|
||||||
/* Set header resize modes and initial section sizes */
|
/* Set header resize modes and initial section sizes */
|
||||||
QHeaderView * msglheader = ui.msgList->header () ;
|
QHeaderView * msglheader = ui.msgList->header () ;
|
||||||
msglheader->setResizeMode (0, QHeaderView::Interactive);
|
msglheader->setResizeMode (0, QHeaderView::Interactive);
|
||||||
msglheader->setResizeMode (1, QHeaderView::Interactive);
|
msglheader->setResizeMode (1, QHeaderView::Interactive);
|
||||||
msglheader->setResizeMode (2, QHeaderView::Interactive);
|
msglheader->setResizeMode (2, QHeaderView::Interactive);
|
||||||
msglheader->setResizeMode (3, QHeaderView::Interactive);
|
msglheader->setResizeMode (3, QHeaderView::Interactive);
|
||||||
@ -112,11 +113,11 @@ MessagesDialog::MessagesDialog(QWidget *parent)
|
|||||||
msglheader->resizeSection ( 3, 200 );
|
msglheader->resizeSection ( 3, 200 );
|
||||||
|
|
||||||
ui.newmessageButton->setIcon(QIcon(QString(":/images/folder-draft24-pressed.png")));
|
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.replyallmessageButton->setIcon(QIcon(QString(":/images/replymailall24-hover.png")));
|
||||||
ui.forwardmessageButton->setIcon(QIcon(QString(":/images/mailforward24-hover.png")));
|
ui.forwardmessageButton->setIcon(QIcon(QString(":/images/mailforward24-hover.png")));
|
||||||
ui.removemessageButton->setIcon(QIcon(QString(":/images/deletemail-pressed.png")));
|
ui.removemessageButton->setIcon(QIcon(QString(":/images/deletemail-pressed.png")));
|
||||||
ui.printbutton->setIcon(QIcon(QString(":/images/print24.png")));
|
ui.printbutton->setIcon(QIcon(QString(":/images/print24.png")));
|
||||||
|
|
||||||
ui.forwardmessageButton->setToolTip(tr("Forward selected Message"));
|
ui.forwardmessageButton->setToolTip(tr("Forward selected Message"));
|
||||||
ui.replyallmessageButton->setToolTip(tr("Replay to All"));
|
ui.replyallmessageButton->setToolTip(tr("Replay to All"));
|
||||||
@ -716,7 +717,7 @@ void MessagesDialog::insertMsgTxtAndFiles()
|
|||||||
item -> setText(0, QString::fromStdString(it->fname));
|
item -> setText(0, QString::fromStdString(it->fname));
|
||||||
//std::cerr << "Msg FileItem(" << it->fname.length() << ") :" << it->fname << std::endl;
|
//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(2, QString::number(0)); /* (2) Rank */ // what is this ???
|
||||||
item -> setText(3, QString::fromStdString(it->hash));
|
item -> setText(3, QString::fromStdString(it->hash));
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include "rsiface/rsmsgs.h"
|
#include "rsiface/rsmsgs.h"
|
||||||
|
|
||||||
#include <gui/Preferences/rsharesettings.h>
|
#include <gui/Preferences/rsharesettings.h>
|
||||||
|
#include "util/misc.h"
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
@ -60,8 +61,7 @@ ChanMsgDialog::ChanMsgDialog(bool msg, QWidget *parent, Qt::WFlags flags)
|
|||||||
{
|
{
|
||||||
/* Invoke the Qt Designer generated object setup routine */
|
/* Invoke the Qt Designer generated object setup routine */
|
||||||
ui.setupUi(this);
|
ui.setupUi(this);
|
||||||
|
|
||||||
|
|
||||||
setupFileActions();
|
setupFileActions();
|
||||||
setupEditActions();
|
setupEditActions();
|
||||||
setupViewActions();
|
setupViewActions();
|
||||||
@ -200,9 +200,20 @@ ChanMsgDialog::ChanMsgDialog(bool msg, QWidget *parent, Qt::WFlags flags)
|
|||||||
alignmentmenu->addAction(actionAlignJustify);
|
alignmentmenu->addAction(actionAlignJustify);
|
||||||
ui.textalignmentbtn->setMenu(alignmentmenu);
|
ui.textalignmentbtn->setMenu(alignmentmenu);
|
||||||
|
|
||||||
QPixmap pxm(24,24);
|
QPixmap pxm(24,24);
|
||||||
pxm.fill(Qt::black);
|
pxm.fill(Qt::black);
|
||||||
ui.colorbtn->setIcon(pxm);
|
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 */
|
/* Hide platform specific features */
|
||||||
#ifdef Q_WS_WIN
|
#ifdef Q_WS_WIN
|
||||||
@ -456,7 +467,7 @@ void ChanMsgDialog::insertFileList(const std::list<DirDetails>& files_info)
|
|||||||
QTreeWidgetItem *item = new QTreeWidgetItem((QTreeWidget*)0);
|
QTreeWidgetItem *item = new QTreeWidgetItem((QTreeWidget*)0);
|
||||||
|
|
||||||
item->setText(0, QString::fromStdString(it->name)); /* (0) Filename */
|
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(2, QString::number(it->rank));
|
||||||
item->setText(3, QString::fromStdString(it->hash));
|
item->setText(3, QString::fromStdString(it->hash));
|
||||||
item->setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
|
item->setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
|
||||||
|
Loading…
Reference in New Issue
Block a user