From 178b37a95f6682026747f931b714a6c8307ff979 Mon Sep 17 00:00:00 2001 From: defnax Date: Sun, 24 May 2020 02:28:54 +0200 Subject: [PATCH] small ui fixes & changes * Update the context menu icons for attachments * Display the File type icon for attachments * on reply load the tags --- retroshare-gui/src/gui/icons.qrc | 1 + .../src/gui/icons/mail/downloadall.png | Bin 0 -> 2986 bytes retroshare-gui/src/gui/msgs/MessageComposer.cpp | 6 ++++++ retroshare-gui/src/gui/msgs/MessageWidget.cpp | 6 ++++-- retroshare-gui/src/gui/msgs/MessagesDialog.cpp | 3 ++- 5 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 retroshare-gui/src/gui/icons/mail/downloadall.png diff --git a/retroshare-gui/src/gui/icons.qrc b/retroshare-gui/src/gui/icons.qrc index 311530b03..6e4bd7569 100644 --- a/retroshare-gui/src/gui/icons.qrc +++ b/retroshare-gui/src/gui/icons.qrc @@ -301,6 +301,7 @@ icons/png/arrow-left.png icons/png/next-unread.png icons/mail/compose.png + icons/mail/downloadall.png icons/mail/delete.png icons/mail/tags.png icons/mail/quote.png diff --git a/retroshare-gui/src/gui/icons/mail/downloadall.png b/retroshare-gui/src/gui/icons/mail/downloadall.png new file mode 100644 index 0000000000000000000000000000000000000000..b4d31d3d0a1c6242f3c55cbbe56cb96f0d4ed7a7 GIT binary patch literal 2986 zcmZ`*c{r5q7k)B}EvgTxNFg=ZLyGJfYnHKxN{c;FNHmr#DN9nJS*(!?g-8lX3&}oa z42t5T5(!yGgWvOxx~}h^-*vrnp65B|zR$VOdERSgu3B3f3-E2>0{{q^ni$%^H46Fg zprHNrDU}5mw5Ps>J^*DY{Oscxc;0@}#Kr=Eu$>SW3&0|R{|Z2`G5}+40BGI@Ks12* zjGzSo*NF8YJ3ItnNDMTEj-t|0i0$U0bc1X<*Xof%han7=4lEOW%n!-R) z7=Xk83y~RRXnt4G6Rtf1;9}wV}TU7fe%dH4F`fC z{{a5%(eO?=vs(3INKgqP23jnfWcDCZ0=c!8)s|s$aHAij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RT*mdN;0s3g1Pr$~7FLLur{O6sKeQ|F z<#l)vJ}gcMmz0rf&D`r~k+t@ZM{{c%17^|&oR8Y(JvlZwCT2o6$}8Cs@H>>L7pS!K zpkbx{A??kBJ}(J=Kk%Bc;O0mAD(0M@V)R?^m&^9*TNBBZ?qLZliY;;-DV+%&N1oH? z{5{G2ck(KgOWmX9_?mB6Bl=nJ}GT*$uoH- z;b0#;N}%Xu_mro^R>G6i!6I`Ugc3D!sLr-Oc@gEyrO$vfZ2;~weYxYx95);;AJ8J})$*y>5k z>#X1zp~pKsTiyx7@;@#zKYYJFn@Z24=kSb-C>ar-@_0_^&!Cq!cDiuXtCKFk2}#es;$Cv}cYm`_Xmn60f~NI&n`1 zx1-v7n)(Jv`!5JuEn+>c&nuL-R)$Jhy2PIU_8b*v-lKoYRBp>R8`0bd%y*T5@O7-+ z=UHP?c8qo8wXOxL(}{V-J;Wu_xMCcO z;+j9~sHQj_`*h5Xs7I*F3N(&X>$~NVa^K;X%J`Iu`1UgK5hRH8pt|H}054F=BA zolV=KSw_?aCu(oDvEdA__x>c4_(PL|WexMr^Ha%L>a|^4hs0X1{sjF#=U2$7p zJ~Je?v`xCOf8i;Y>Z9IRbH|wF{#xP@k-EkR!=v{X*C&5$-?c-kgSRDNzXZ|XL3l|q zdu;gCydrI`&1_x2&{S2HQ&!egR!+M48UFSC55dp>l($Fd|0gW99ZrIT%}51Xe~+M$ n7lg9(x75&e7QhsP{fgoUtw={fc;1>Nq<1>$H literal 0 HcmV?d00001 diff --git a/retroshare-gui/src/gui/msgs/MessageComposer.cpp b/retroshare-gui/src/gui/msgs/MessageComposer.cpp index 6d33e6ca6..92f4de457 100644 --- a/retroshare-gui/src/gui/msgs/MessageComposer.cpp +++ b/retroshare-gui/src/gui/msgs/MessageComposer.cpp @@ -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! */ diff --git a/retroshare-gui/src/gui/msgs/MessageWidget.cpp b/retroshare-gui/src/gui/msgs/MessageWidget.cpp index 3c085c3c8..bfa94abba 100644 --- a/retroshare-gui/src/gui/msgs/MessageWidget.cpp +++ b/retroshare-gui/src/gui/msgs/MessageWidget.cpp @@ -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 /* 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())); diff --git a/retroshare-gui/src/gui/msgs/MessagesDialog.cpp b/retroshare-gui/src/gui/msgs/MessagesDialog.cpp index 37a6ee319..5d6bc87c5 100644 --- a/retroshare-gui/src/gui/msgs/MessagesDialog.cpp +++ b/retroshare-gui/src/gui/msgs/MessagesDialog.cpp @@ -53,6 +53,7 @@ #include /* 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()));