Merge pull request #1969 from defnax/messages-small-changes

[Mail] small ui fixes & changes
This commit is contained in:
defnax 2020-05-24 16:03:36 +02:00 committed by GitHub
commit 988dff472c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 3 deletions

View File

@ -301,6 +301,7 @@
<file>icons/png/arrow-left.png</file>
<file>icons/png/next-unread.png</file>
<file>icons/mail/compose.png</file>
<file>icons/mail/downloadall.png</file>
<file>icons/mail/delete.png</file>
<file>icons/mail/tags.png</file>
<file>icons/mail/quote.png</file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -1206,6 +1206,12 @@ MessageComposer *MessageComposer::replyMsg(const std::string &msgId, bool all)
// needed to send system flags with reply
msgComposer->msgFlags = (msgInfo.msgflags & RS_MSG_SYSTEM);
MsgTagInfo tagInfo;
rsMail->getMessageTag(msgId, tagInfo);
msgComposer->m_tagIds = tagInfo.tagIds;
msgComposer->showTagLabels();
msgComposer->calculateTitle();
/* window will destroy itself! */

View File

@ -36,6 +36,7 @@
#include "gui/common/TagDefs.h"
#include "gui/common/PeerDefs.h"
#include "gui/common/Emoticons.h"
#include "gui/common/FilesDefs.h"
#include "gui/settings/rsharesettings.h"
#include "MessageComposer.h"
#include "MessageWidget.h"
@ -51,8 +52,8 @@
#include <retroshare/rsmsgs.h>
/* Images for context menu icons */
#define IMAGE_DOWNLOAD ":/images/start.png"
#define IMAGE_DOWNLOADALL ":/images/startall.png"
#define IMAGE_DOWNLOAD ":/icons/png/download.png"
#define IMAGE_DOWNLOADALL ":/icons/mail/downloadall.png"
#define COLUMN_FILE_NAME 0
#define COLUMN_FILE_SIZE 1
@ -555,6 +556,7 @@ 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->setIcon(COLUMN_FILE_NAME, FilesDefs::getIconFromFileType(it->fname.c_str()));
item->setText(COLUMN_FILE_SIZE, misc::friendlyUnit(it->size));
item->setData(COLUMN_FILE_SIZE, Qt::UserRole, QVariant(qulonglong(it->size)) );
item->setText(COLUMN_FILE_HASH, QString::fromStdString(it->hash.toStdString()));

View File

@ -53,6 +53,7 @@
#include <algorithm>
/* Images for context menu icons */
#define IMAGE_MAIL ":/icons/png/message.png"
#define IMAGE_MESSAGE ":/icons/mail/compose.png"
#define IMAGE_MESSAGEREMOVE ":/icons/mail/delete.png"
#define IMAGE_STAR_ON ":/images/star-on-16.png"
@ -766,7 +767,7 @@ void MessagesDialog::openAsTab()
return;
}
ui.tabWidget->addTab(msgWidget, msgWidget->subject(true));
ui.tabWidget->addTab(msgWidget,QIcon(IMAGE_MAIL), msgWidget->subject(true));
ui.tabWidget->setCurrentWidget(msgWidget);
connect(msgWidget, SIGNAL(messageRemoved()), this, SLOT(messageRemoved()));