Merge pull request #1810 from defnax/messages-improvements

Messages improvements
This commit is contained in:
csoler 2020-03-01 19:03:46 +01:00 committed by GitHub
commit 5ffa5aacd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
65 changed files with 836 additions and 987 deletions

View File

@ -27,7 +27,7 @@
#include "util/TokenQueue.h"
#include <retroshare-gui/RsAutoUpdatePage.h>
#define IMAGE_NEWSFEED ":/icons/plugins_128.png"
#define IMAGE_NEWSFEED ":/icons/png/newsfeed.png"
const uint32_t NEWSFEED_PEERLIST = 0x0001;

View File

@ -203,7 +203,7 @@ void GxsChannelPostsWidget::groupNameChanged(const QString &name)
{
if (groupId().isNull()) {
ui->nameLabel->setText(tr("No Channel Selected"));
ui->logoLabel->setPixmap(QPixmap(":/images/channels.png"));
ui->logoLabel->setPixmap(QPixmap(":/icons/png/channels.png"));
} else {
ui->nameLabel->setText(name);
}

View File

@ -103,7 +103,7 @@
<file>icons/png/newsfeed-notify.png</file>
<file>icons/png/newsfeed.png</file>
<file>icons/png/options.png</file>
<file>icons/png/pencil-edit-button.png</file>
<file>icons/png/pencil-edit-button.png</file>
<file>icons/png/people-notify.png</file>
<file>icons/png/people.png</file>
<file>icons/png/person.png</file>
@ -122,7 +122,7 @@
<file>icons/png/thumbs-down.png</file>
<file>icons/png/thumbs-neutral.png</file>
<file>icons/png/thumbs-up.png</file>
<file>icons/png/typing.png</file>
<file>icons/png/typing.png</file>
<file>icons/png/video.png</file>
<file>icons/quit_128.png</file>
<file>icons/search_red_128.png</file>
@ -299,5 +299,22 @@
<file>icons/png/add-file.png</file>
<file>icons/png/add-image.png</file>
<file>icons/png/attachements.png</file>
<file>icons/mail/compose.png</file>
<file>icons/mail/delete.png</file>
<file>icons/mail/tags.png</file>
<file>icons/mail/quote.png</file>
<file>icons/mail/send.png</file>
<file>icons/mail/contacts.png</file>
<file>icons/mail/save.png</file>
<file>icons/mail/filter24.png</file>
<file>icons/mail/foward.png</file>
<file>icons/mail/reply.png</file>
<file>icons/mail/reply-all.png</file>
<file>icons/mail/attach24.png</file>
<file>icons/textedit/align.png</file>
<file>icons/textedit/font-decrease.png</file>
<file>icons/textedit/smile.png</file>
<file>icons/textedit/font-increase.png</file>
<file>icons/textedit/code.png</file>
</qresource>
</RCC>

Binary file not shown.

After

Width:  |  Height:  |  Size: 803 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 616 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 539 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -351,38 +351,6 @@
<file>images/mimetypes/source_c.png</file>
<file>images/mimetypes/source_cpp.png</file>
<file>images/mimetypes/source_h.png</file>
<file>images/textedit/textbold.png</file>
<file>images/textedit/textitalic.png</file>
<file>images/textedit/textunder.png</file>
<file>images/textedit/textjustify.png</file>
<file>images/textedit/textcenter.png</file>
<file>images/textedit/textleft.png</file>
<file>images/textedit/textright.png</file>
<file>images/textedit/editcopy.png</file>
<file>images/textedit/editcut.png</file>
<file>images/textedit/editpaste.png</file>
<file>images/textedit/editredo.png</file>
<file>images/textedit/editundo.png</file>
<file>images/textedit/edit-image-face-add.png</file>
<file>images/textedit/exportpdf.png</file>
<file>images/textedit/filenew.png</file>
<file>images/textedit/fileopen.png</file>
<file>images/textedit/fileprint.png</file>
<file>images/textedit/filesave.png</file>
<file>images/textedit/format-text-color.png</file>
<file>images/textedit/format-text-strikethrough.png</file>
<file>images/textedit/format-indent-less.png</file>
<file>images/textedit/format-indent-more.png</file>
<file>images/textedit/insert-link.png</file>
<file>images/textedit/format-list-ordered.png</file>
<file>images/textedit/format-list-unordered.png</file>
<file>images/textedit/zoomin.png</file>
<file>images/textedit/zoomout.png</file>
<file>images/textedit/format_font_size_more.png</file>
<file>images/textedit/format_font_size_less.png</file>
<file>images/textedit/hi22-action-format-text-blockquote.png</file>
<file>images/textedit/hi22-action-format-text-code.png</file>
<file>images/textedit/hi22-action-insert-more-mark.png</file>
<file>images/toaster/backgroundtoaster.png</file>
<file>images/thumb-default-video.png</file>
<file>images/user/add_user24.png</file>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 768 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 718 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 619 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 825 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 579 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 850 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 667 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 313 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 630 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 261 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 313 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 537 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -223,16 +223,16 @@ MessageComposer::MessageComposer(QWidget *parent, Qt::WindowFlags flags)
QActionGroup *grp = new QActionGroup(this);
connect(grp, SIGNAL(triggered(QAction *)), this, SLOT(textAlign(QAction *)));
actionAlignLeft = new QAction(QIcon(":/images/textedit/textleft.png"), tr("&Left"), grp);
actionAlignLeft = new QAction(QIcon(""), tr("&Left"), grp);
actionAlignLeft->setShortcut(Qt::CTRL + Qt::Key_L);
actionAlignLeft->setCheckable(true);
actionAlignCenter = new QAction(QIcon(":/images/textedit/textcenter.png"), tr("C&enter"), grp);
actionAlignCenter = new QAction(QIcon(""), tr("C&enter"), grp);
actionAlignCenter->setShortcut(Qt::CTRL + Qt::Key_E);
actionAlignCenter->setCheckable(true);
actionAlignRight = new QAction(QIcon(":/images/textedit/textright.png"), tr("&Right"), grp);
actionAlignRight = new QAction(QIcon(""), tr("&Right"), grp);
actionAlignRight->setShortcut(Qt::CTRL + Qt::Key_R);
actionAlignRight->setCheckable(true);
actionAlignJustify = new QAction(QIcon(":/images/textedit/textjustify.png"), tr("&Justify"), grp);
actionAlignJustify = new QAction(QIcon(""), tr("&Justify"), grp);
actionAlignJustify->setShortcut(Qt::CTRL + Qt::Key_J);
actionAlignJustify->setCheckable(true);
@ -280,8 +280,6 @@ MessageComposer::MessageComposer(QWidget *parent, Qt::WindowFlags flags)
connect(ui.comboSize, SIGNAL(activated(const QString &)),this, SLOT(textSize(const QString &)));
ui.comboSize->setCurrentIndex(ui.comboSize->findText(QString::number(QApplication::font().pointSize())));
ui.textalignmentbtn->setIcon(QIcon(QString(":/images/textedit/textcenter.png")));
QMenu * alignmentmenu = new QMenu();
alignmentmenu->addAction(actionAlignLeft);
alignmentmenu->addAction(actionAlignCenter);
@ -1892,19 +1890,19 @@ void MessageComposer::setupFileActions()
QAction *a;
a = new QAction(QIcon(":/images/textedit/filenew.png"), tr("&New"), this);
a = new QAction(QIcon(""), tr("&New"), this);
a->setShortcut(QKeySequence::New);
connect(a, SIGNAL(triggered()), this, SLOT(fileNew()));
menu->addAction(a);
a = new QAction(QIcon(":/images/textedit/fileopen.png"), tr("&Open..."), this);
a = new QAction(QIcon(""), tr("&Open..."), this);
a->setShortcut(QKeySequence::Open);
connect(a, SIGNAL(triggered()), this, SLOT(fileOpen()));
menu->addAction(a);
menu->addSeparator();
actionSave = a = new QAction(QIcon(":/images/textedit/filesave.png"), tr("&Save"), this);
actionSave = a = new QAction(QIcon(""), tr("&Save"), this);
a->setShortcut(QKeySequence::Save);
connect(a, SIGNAL(triggered()), this, SLOT(saveasDraft()));
a->setEnabled(false);
@ -1919,7 +1917,7 @@ void MessageComposer::setupFileActions()
menu->addAction(a);
menu->addSeparator();
a = new QAction(QIcon(":/images/textedit/fileprint.png"), tr("&Print..."), this);
a = new QAction(QIcon(""), tr("&Print..."), this);
a->setShortcut(QKeySequence::Print);
connect(a, SIGNAL(triggered()), this, SLOT(filePrint()));
menu->addAction(a);
@ -1928,7 +1926,7 @@ void MessageComposer::setupFileActions()
connect(a, SIGNAL(triggered()), this, SLOT(filePrintPreview()));
menu->addAction(a);*/
a = new QAction(QIcon(":/images/textedit/exportpdf.png"), tr("&Export PDF..."), this);
a = new QAction(QIcon(""), tr("&Export PDF..."), this);
a->setShortcut(Qt::CTRL + Qt::Key_D);
connect(a, SIGNAL(triggered()), this, SLOT(filePrintPdf()));
menu->addAction(a);
@ -1947,20 +1945,20 @@ void MessageComposer::setupEditActions()
menuBar()->addMenu(menu);
QAction *a;
a = actionUndo = new QAction(QIcon(":/images/textedit/editundo.png"), tr("&Undo"), this);
a = actionUndo = new QAction(QIcon(""), tr("&Undo"), this);
a->setShortcut(QKeySequence::Undo);
menu->addAction(a);
a = actionRedo = new QAction(QIcon(":/images/textedit/editredo.png"), tr("&Redo"), this);
a = actionRedo = new QAction(QIcon(""), tr("&Redo"), this);
a->setShortcut(QKeySequence::Redo);
menu->addAction(a);
menu->addSeparator();
a = actionCut = new QAction(QIcon(":/images/textedit/editcut.png"), tr("Cu&t"), this);
a = actionCut = new QAction(QIcon(""), tr("Cu&t"), this);
a->setShortcut(QKeySequence::Cut);
menu->addAction(a);
a = actionCopy = new QAction(QIcon(":/images/textedit/editcopy.png"), tr("&Copy"), this);
a = actionCopy = new QAction(QIcon(""), tr("&Copy"), this);
a->setShortcut(QKeySequence::Copy);
menu->addAction(a);
a = actionPaste = new QAction(QIcon(":/images/textedit/editpaste.png"), tr("&Paste"), this);
a = actionPaste = new QAction(QIcon(""), tr("&Paste"), this);
a->setShortcut(QKeySequence::Paste);
menu->addAction(a);
actionPaste->setEnabled(!QApplication::clipboard()->text().isEmpty());
@ -2431,9 +2429,9 @@ void MessageComposer::on_contactsdockWidget_visibilityChanged(bool visible)
void MessageComposer::updatecontactsviewicons()
{
if(!ui.contactsdockWidget->isVisible()){
ui.actionContactsView->setIcon(QIcon(":/images/contactsclosed24.png"));
ui.actionContactsView->setIcon(QIcon(":/icons/mail/contacts.png"));
}else{
ui.actionContactsView->setIcon(QIcon(":/images/contacts24.png"));
ui.actionContactsView->setIcon(QIcon(":/icons/mail/contacts.png"));
}
}

View File

@ -14,8 +14,8 @@
<string>Compose</string>
</property>
<property name="windowIcon">
<iconset resource="../images.qrc">
<normaloff>:/images/folder-draft.png</normaloff>:/images/folder-draft.png</iconset>
<iconset resource="../icons.qrc">
<normaloff>:/icons/mail/compose.png</normaloff>:/icons/mail/compose.png</iconset>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QGridLayout" name="centralwidgetGLayout">
@ -323,8 +323,8 @@
<string/>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/textedit/format_font_size_more.png</normaloff>:/images/textedit/format_font_size_more.png</iconset>
<iconset resource="../icons.qrc">
<normaloff>:/icons/textedit/font-increase.png</normaloff>:/icons/textedit/font-increase.png</iconset>
</property>
<property name="iconSize">
<size>
@ -355,8 +355,8 @@
<string/>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/textedit/format_font_size_less.png</normaloff>:/images/textedit/format_font_size_less.png</iconset>
<iconset resource="../icons.qrc">
<normaloff>:/icons/textedit/font-decrease.png</normaloff>:/icons/textedit/font-decrease.png</iconset>
</property>
<property name="iconSize">
<size>
@ -393,8 +393,8 @@
<string/>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/textedit/textbold.png</normaloff>:/images/textedit/textbold.png</iconset>
<iconset resource="../icons.qrc">
<normaloff>:/icons/textedit/bold.png</normaloff>:/icons/textedit/bold.png</iconset>
</property>
<property name="iconSize">
<size>
@ -434,8 +434,8 @@
<string/>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/textedit/textitalic.png</normaloff>:/images/textedit/textitalic.png</iconset>
<iconset resource="../icons.qrc">
<normaloff>:/icons/textedit/italic.png</normaloff>:/icons/textedit/italic.png</iconset>
</property>
<property name="iconSize">
<size>
@ -475,8 +475,8 @@
<string/>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/add_image24.png</normaloff>:/images/add_image24.png</iconset>
<iconset resource="../icons.qrc">
<normaloff>:/icons/textedit/photo-of-a-landscape.png</normaloff>:/icons/textedit/photo-of-a-landscape.png</iconset>
</property>
<property name="iconSize">
<size>
@ -512,6 +512,10 @@
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../icons.qrc">
<normaloff>:/icons/textedit/align.png</normaloff>:/icons/textedit/align.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
@ -519,7 +523,7 @@
</size>
</property>
<property name="popupMode">
<enum>QToolButton::MenuButtonPopup</enum>
<enum>QToolButton::InstantPopup</enum>
</property>
<property name="autoRaise">
<bool>true</bool>
@ -538,13 +542,13 @@
<string/>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/textedit/hi22-action-format-text-code.png</normaloff>:/images/textedit/hi22-action-format-text-code.png</iconset>
<iconset resource="../icons.qrc">
<normaloff>:/icons/textedit/code.png</normaloff>:/icons/textedit/code.png</iconset>
</property>
<property name="iconSize">
<size>
<width>22</width>
<height>22</height>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="autoRaise">
@ -589,8 +593,8 @@
<string/>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/textedit/textunder.png</normaloff>:/images/textedit/textunder.png</iconset>
<iconset resource="../icons.qrc">
<normaloff>:/icons/textedit/underline.png</normaloff>:/icons/textedit/underline.png</iconset>
</property>
<property name="iconSize">
<size>
@ -612,8 +616,8 @@
<enum>Qt::NoFocus</enum>
</property>
<property name="icon">
<iconset resource="../emojione.qrc">
<normaloff>:/emojione/1F603.png</normaloff>:/emojione/1F603.png</iconset>
<iconset resource="../icons.qrc">
<normaloff>:/icons/textedit/smile.png</normaloff>:/icons/textedit/smile.png</iconset>
</property>
<property name="iconSize">
<size>
@ -676,20 +680,20 @@
<string/>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/textedit/format-list-unordered.png</normaloff>:/images/textedit/format-list-unordered.png</iconset>
<iconset resource="../icons.qrc">
<normaloff>:/icons/textedit/numberd-list.png</normaloff>:/icons/textedit/numberd-list.png</iconset>
</property>
<property name="iconSize">
<size>
<width>22</width>
<height>22</height>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="checkable">
<bool>false</bool>
</property>
<property name="popupMode">
<enum>QToolButton::MenuButtonPopup</enum>
<enum>QToolButton::InstantPopup</enum>
</property>
<property name="autoRaise">
<bool>true</bool>
@ -881,8 +885,8 @@ border-image: url(:/images/closepressed.png)
<string>Tags</string>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/tag24.png</normaloff>:/images/tag24.png</iconset>
<iconset resource="../icons.qrc">
<normaloff>:/icons/mail/tags.png</normaloff>:/icons/mail/tags.png</iconset>
</property>
<property name="flat">
<bool>true</bool>
@ -1154,8 +1158,8 @@ border-image: url(:/images/closepressed.png)
</widget>
<action name="actionSend">
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/send24.png</normaloff>:/images/send24.png</iconset>
<iconset resource="../icons.qrc">
<normaloff>:/icons/mail/send.png</normaloff>:/icons/mail/send.png</iconset>
</property>
<property name="text">
<string>Send</string>
@ -1165,18 +1169,14 @@ border-image: url(:/images/closepressed.png)
</property>
</action>
<action name="actionReply">
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/replymail24.png</normaloff>:/images/replymail24.png</iconset>
</property>
<property name="text">
<string>Reply</string>
</property>
</action>
<action name="actionContactsView">
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/contacts24.png</normaloff>:/images/contacts24.png</iconset>
<iconset resource="../icons.qrc">
<normaloff>:/icons/mail/contacts.png</normaloff>:/icons/mail/contacts.png</iconset>
</property>
<property name="text">
<string>Contacts</string>
@ -1187,8 +1187,8 @@ border-image: url(:/images/closepressed.png)
</action>
<action name="actionSaveas">
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/save24.png</normaloff>:/images/save24.png</iconset>
<iconset resource="../icons.qrc">
<normaloff>:/icons/mail/save.png</normaloff>:/icons/mail/save.png</iconset>
</property>
<property name="text">
<string>Save</string>
@ -1199,8 +1199,8 @@ border-image: url(:/images/closepressed.png)
</action>
<action name="actionAttach">
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/attach.png</normaloff>:/images/attach.png</iconset>
<iconset resource="../icons.qrc">
<normaloff>:/icons/png/attachements.png</normaloff>:/icons/png/attachements.png</iconset>
</property>
<property name="text">
<string>Attach</string>
@ -1214,8 +1214,8 @@ border-image: url(:/images/closepressed.png)
<bool>true</bool>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/quote_24.png</normaloff>:/images/quote_24.png</iconset>
<iconset resource="../icons.qrc">
<normaloff>:/icons/mail/quote.png</normaloff>:/icons/mail/quote.png</iconset>
</property>
<property name="text">
<string>Quote</string>
@ -1263,6 +1263,7 @@ border-image: url(:/images/closepressed.png)
<resources>
<include location="../emojione.qrc"/>
<include location="../images.qrc"/>
<include location="../icons.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -28,6 +28,8 @@
#include <QTextStream>
#include <QTextCodec>
#include <QDesktopServices>
#include <QPlainTextEdit>
#include <QDialog>
#include "gui/notifyqt.h"
#include "gui/RetroShareLink.h"
@ -131,12 +133,30 @@ MessageWidget::MessageWidget(bool controlled, QWidget *parent, Qt::WindowFlags f
isWindow = false;
currMsgFlags = 0;
ui.actionTextBesideIcon->setData(Qt::ToolButtonTextBesideIcon);
ui.actionIconOnly->setData(Qt::ToolButtonIconOnly);
connect(ui.msgList, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(msgfilelistWidgetCostumPopupMenu(QPoint)));
connect(ui.expandFilesButton, SIGNAL(clicked()), this, SLOT(togglefileview()));
connect(ui.downloadButton, SIGNAL(clicked()), this, SLOT(getallrecommended()));
connect(ui.msgText, SIGNAL(anchorClicked(QUrl)), this, SLOT(anchorClicked(QUrl)));
connect(ui.sendInviteButton, SIGNAL(clicked()), this, SLOT(sendInvite()));
connect(ui.replyButton, SIGNAL(clicked()), this, SLOT(reply()));
connect(ui.replyallButton, SIGNAL(clicked()), this, SLOT(replyAll()));
connect(ui.forwardButton, SIGNAL(clicked()), this, SLOT(forward()));
connect(ui.deleteButton, SIGNAL(clicked()), this, SLOT(remove()));
connect(ui.actionSaveAs, SIGNAL(triggered()), this, SLOT(saveAs()));
connect(ui.actionPrint, SIGNAL(triggered()), this, SLOT(print()));
connect(ui.actionPrintPreview, SIGNAL(triggered()), this, SLOT(printPreview()));
connect(ui.actionIconOnly, SIGNAL(triggered()), this, SLOT(buttonStyle()));
connect(ui.actionTextBesideIcon, SIGNAL(triggered()), this, SLOT(buttonStyle()));
QAction *viewsource = new QAction(tr("View source"), this);
viewsource->setShortcut(QKeySequence("CTRL+O"));
connect(viewsource, SIGNAL(triggered()), this, SLOT(viewSource()));
connect(NotifyQt::getInstance(), SIGNAL(messagesTagsChanged()), this, SLOT(messagesTagsChanged()));
connect(NotifyQt::getInstance(), SIGNAL(messagesChanged()), this, SLOT(messagesChanged()));
@ -157,6 +177,16 @@ MessageWidget::MessageWidget(bool controlled, QWidget *parent, Qt::WindowFlags f
msglheader->resizeSection (COLUMN_FILE_SIZE, 100);
msglheader->resizeSection (COLUMN_FILE_HASH, 200);
QMenu *moremenu = new QMenu();
moremenu->addAction(viewsource);
moremenu->addAction(ui.actionSaveAs);
moremenu->addAction(ui.actionPrint);
moremenu->addAction(ui.actionPrintPreview);
moremenu->addSeparator();
moremenu->addAction(ui.actionTextBesideIcon);
moremenu->addAction(ui.actionIconOnly);
ui.moreButton->setMenu(moremenu);
QFont font = QFont("Arial", 10, QFont::Bold);
ui.subjectText->setFont(font);
@ -255,11 +285,18 @@ void MessageWidget::processSettings(const QString &settingsGroup, bool load)
ui.expandFilesButton->setChecked(value);
ui.msgList->setVisible(value);
togglefileview();
// toolbar button style
Qt::ToolButtonStyle style = (Qt::ToolButtonStyle) Settings->value("ToolButon_Style", Qt::ToolButtonTextBesideIcon).toInt();
setToolbarButtonStyle(style);
} else {
// save settings
// expandFiles
Settings->setValue("expandFiles", ui.expandFilesButton->isChecked());
//toolbar button style
Settings->setValue("ToolButon_Style", ui.replyButton->toolButtonStyle());
}
Settings->endGroup();
@ -292,10 +329,10 @@ void MessageWidget::togglefileview()
*/
if (ui.expandFilesButton->isChecked()) {
ui.expandFilesButton->setIcon(QIcon(QString(":/images/edit_remove24.png")));
ui.expandFilesButton->setIcon(QIcon(QString(":/icons/png/down-arrow.png")));
ui.expandFilesButton->setToolTip(tr("Hide the attachment pane"));
} else {
ui.expandFilesButton->setIcon(QIcon(QString(":/images/edit_add24.png")));
ui.expandFilesButton->setIcon(QIcon(QString(":/icons/png/up-arrow.png")));
ui.expandFilesButton->setToolTip(tr("Show the attachment pane"));
}
}
@ -796,3 +833,34 @@ void MessageWidget::sendInvite()
//}
}
void MessageWidget::setToolbarButtonStyle(Qt::ToolButtonStyle style)
{
ui.deleteButton->setToolButtonStyle(style);
ui.replyButton->setToolButtonStyle(style);
ui.replyallButton->setToolButtonStyle(style);
ui.forwardButton->setToolButtonStyle(style);
ui.moreButton->setToolButtonStyle(style);
}
void MessageWidget::buttonStyle()
{
setToolbarButtonStyle((Qt::ToolButtonStyle) dynamic_cast<QAction*>(sender())->data().toInt());
}
void MessageWidget::viewSource()
{
QDialog *dialog = new QDialog(this);
QPlainTextEdit *pte = new QPlainTextEdit(dialog);
pte->setPlainText( ui.msgText->toHtml() );
QGridLayout *gl = new QGridLayout(dialog);
gl->addWidget(pte,0,0,1,1);
dialog->setWindowTitle(tr("Document source"));
dialog->resize(500, 400);
dialog->exec();
ui.msgText->setHtml(pte->toPlainText());
delete dialog;
}

View File

@ -82,10 +82,13 @@ private slots:
void anchorClicked(const QUrl &url);
void loadImagesAlways();
void buttonStyle();
void viewSource();
private:
void clearTagLabels();
void showTagLabels();
void setToolbarButtonStyle(Qt::ToolButtonStyle style);
bool isControlled;
bool isWindow;

View File

@ -51,81 +51,269 @@
<property name="verticalSpacing">
<number>3</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="subjectLabel">
<item row="4" column="0">
<widget class="QLabel" name="bccLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="text">
<string>Subject:</string>
<string>Bcc:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="0" column="2" colspan="2">
<item row="2" column="0">
<widget class="QLabel" name="toLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="text">
<string>To:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="ccLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="text">
<string>Cc:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="tagsLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="text">
<string>Tags:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="4">
<widget class="QLabel" name="dateText">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="text">
<string notr="true">Date</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item row="0" column="2" colspan="3">
<layout class="QHBoxLayout" name="subjectHLayout">
<property name="spacing">
<number>6</number>
</property>
<item>
<widget class="QLabel" name="subjectText">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<widget class="QToolButton" name="replyButton">
<property name="text">
<string>Reply</string>
</property>
<property name="wordWrap">
<bool>true</bool>
<property name="icon">
<iconset resource="../icons.qrc">
<normaloff>:/icons/mail/reply.png</normaloff>:/icons/mail/reply.png</iconset>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
<property name="iconSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="dateText">
<widget class="QToolButton" name="replyallButton">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Reply to All&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Reply all</string>
</property>
<property name="icon">
<iconset resource="../icons.qrc">
<normaloff>:/icons/mail/reply-all.png</normaloff>:/icons/mail/reply-all.png</iconset>
</property>
<property name="iconSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="forwardButton">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Forward selected Message&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Forward</string>
</property>
<property name="icon">
<iconset resource="../icons.qrc">
<normaloff>:/icons/mail/foward.png</normaloff>:/icons/mail/foward.png</iconset>
</property>
<property name="iconSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="deleteButton">
<property name="text">
<string>Delete</string>
</property>
<property name="icon">
<iconset resource="../icons.qrc">
<normaloff>:/icons/mail/delete.png</normaloff>:/icons/mail/delete.png</iconset>
</property>
<property name="iconSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="moreButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;More actions&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string notr="true">Date</string>
<string>More</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
<property name="icon">
<iconset resource="../icons.qrc">
<normaloff>:/icons/png/options2.png</normaloff>:/icons/png/options2.png</iconset>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
<property name="iconSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="popupMode">
<enum>QToolButton::InstantPopup</enum>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QLabel" name="fromLabel">
<item row="1" column="1" colspan="3">
<widget class="QLabel" name="subjectText">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>From:</string>
<property name="font">
<font>
<pointsize>9</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item row="1" column="2" colspan="2">
<item row="0" column="1">
<widget class="QLabel" name="fromText">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
@ -145,6 +333,11 @@
<height>16777215</height>
</size>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
@ -153,23 +346,7 @@
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="toLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>To:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="2" column="2" colspan="2">
<item row="2" column="1" colspan="4">
<widget class="RSTextBrowser" name="toText">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Maximum">
@ -188,26 +365,7 @@
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="ccLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Cc:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item row="3" column="2" colspan="2">
<item row="3" column="1" colspan="4">
<widget class="RSTextBrowser" name="ccText">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Maximum">
@ -226,23 +384,7 @@
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="bccLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Bcc:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="4" column="2" colspan="2">
<item row="4" column="1" colspan="4">
<widget class="RSTextBrowser" name="bccText">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Maximum">
@ -261,24 +403,50 @@
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="tagsLabel">
<item row="5" column="1" colspan="4">
<layout class="QHBoxLayout" name="tagLayout"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="subjectLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="text">
<string>Tags:</string>
<string>Subject:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="5" column="2" colspan="2">
<layout class="QHBoxLayout" name="tagLayout"/>
<item row="0" column="0">
<widget class="QLabel" name="fromLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="text">
<string>From:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</item>
@ -292,19 +460,6 @@
</property>
</widget>
</item>
<item>
<widget class="RSTextBrowser" name="msgText">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="openLinks">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QFrame" name="inviteFrame">
<property name="palette">
@ -442,6 +597,19 @@
</layout>
</widget>
</item>
<item>
<widget class="RSTextBrowser" name="msgText">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="openLinks">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="filesHLayout">
<item>
@ -467,7 +635,7 @@
<string/>
</property>
<property name="pixmap">
<pixmap resource="../images.qrc">:/images/attachment.png</pixmap>
<pixmap resource="../icons.qrc">:/icons/mail/attach24.png</pixmap>
</property>
</widget>
</item>
@ -487,8 +655,8 @@
<string/>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/edit_remove24.png</normaloff>:/images/edit_remove24.png</iconset>
<iconset resource="../icons.qrc">
<normaloff>:/icons/png/down-arrow.png</normaloff>:/icons/png/down-arrow.png</iconset>
</property>
<property name="checkable">
<bool>true</bool>
@ -539,8 +707,8 @@
<string>Download all</string>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/down.png</normaloff>:/images/down.png</iconset>
<iconset resource="../icons.qrc">
<normaloff>:/icons/png/download.png</normaloff>:/icons/png/download.png</iconset>
</property>
</widget>
</item>
@ -583,11 +751,29 @@
<string>Print</string>
</property>
</action>
<action name="actionPrint_Preview">
<action name="actionPrintPreview">
<property name="text">
<string>Print Preview</string>
</property>
</action>
<action name="actionSaveAs">
<property name="text">
<string>Save as</string>
</property>
</action>
<action name="actionTextBesideIcon">
<property name="text">
<string>Buttons Text Beside Icon</string>
</property>
<property name="toolTip">
<string>Buttons Text Beside Icon</string>
</property>
</action>
<action name="actionIconOnly">
<property name="text">
<string>Buttons Icon only</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>
@ -604,6 +790,7 @@
</customwidgets>
<resources>
<include location="../images.qrc"/>
<include location="../icons.qrc"/>
</resources>
<connections>
<connection>

View File

@ -53,14 +53,21 @@
#include <algorithm>
/* Images for context menu icons */
#define IMAGE_MESSAGE ":/images/folder-draft.png"
#define IMAGE_MESSAGEREMOVE ":/images/message-mail-imapdelete.png"
#define IMAGE_MESSAGE ":/icons/mail/compose.png"
#define IMAGE_MESSAGEREMOVE ":/icons/mail/delete.png"
#define IMAGE_STAR_ON ":/images/star-on-16.png"
#define IMAGE_STAR_OFF ":/images/star-off-16.png"
#define IMAGE_SYSTEM ":/images/user/user_request16.png"
#define IMAGE_DECRYPTMESSAGE ":/images/decrypt-mail.png"
#define IMAGE_AUTHOR_INFO ":/images/info16.png"
#define IMAGE_INBOX ":/images/folder-inbox.png"
#define IMAGE_OUTBOX ":/images/folder-outbox.png"
#define IMAGE_SENT ":/images/folder-sent.png"
#define IMAGE_DRAFTS ":/images/folder-draft.png"
#define IMAGE_TRASH ":/images/folder-trash.png"
#define IMAGE_FOLDER ":/images/foldermail.png"
#define ROLE_QUICKVIEW_TYPE Qt::UserRole
#define ROLE_QUICKVIEW_ID Qt::UserRole + 1
#define ROLE_QUICKVIEW_TEXT Qt::UserRole + 2
@ -117,10 +124,6 @@ MessagesDialog::MessagesDialog(QWidget *parent)
inChange = false;
lockUpdate = 0;
ui.actionTextBesideIcon->setData(Qt::ToolButtonTextBesideIcon);
ui.actionIconOnly->setData(Qt::ToolButtonIconOnly);
ui.actionTextUnderIcon->setData(Qt::ToolButtonTextUnderIcon);
msgWidget = new MessageWidget(true, this);
ui.msgLayout->addWidget(msgWidget);
@ -159,23 +162,14 @@ MessagesDialog::MessagesDialog(QWidget *parent)
/* Set initial section sizes */
QHeaderView * msgwheader = ui.messageTreeWidget->header () ;
ui.forwardmessageButton->setToolTip(tr("Forward selected Message"));
ui.replyallmessageButton->setToolTip(tr("Reply to All"));
QMenu *printmenu = new QMenu();
printmenu->addAction(ui.actionPrint);
printmenu->addAction(ui.actionPrintPreview);
ui.printButton->setMenu(printmenu);
QMenu *viewmenu = new QMenu();
viewmenu->addAction(ui.actionTextBesideIcon);
viewmenu->addAction(ui.actionIconOnly);
ui.viewtoolButton->setMenu(viewmenu);
// Set initial size of the splitter
ui.listSplitter->setStretchFactor(0, 0);
ui.listSplitter->setStretchFactor(1, 1);
// Set initial size of the splitter
ui.boxSplitter->setStretchFactor(0, 0);
ui.boxSplitter->setStretchFactor(1, 1);
/* add filter actions */
ui.filterLineEdit->addFilter(QIcon(), tr("Subject"), RsMessageModel::COLUMN_THREAD_SUBJECT, tr("Search Subject"));
ui.filterLineEdit->addFilter(QIcon(), tr("From"), RsMessageModel::COLUMN_THREAD_AUTHOR, tr("Search From"));
@ -271,10 +265,6 @@ MessagesDialog::MessagesDialog(QWidget *parent)
connect(ui.tabWidget, SIGNAL(tabCloseRequested(int)), this, SLOT(tabCloseRequested(int)));
connect(ui.newmessageButton, SIGNAL(clicked()), this, SLOT(newmessage()));
connect(ui.actionTextBesideIcon, SIGNAL(triggered()), this, SLOT(buttonStyle()));
connect(ui.actionIconOnly, SIGNAL(triggered()), this, SLOT(buttonStyle()));
connect(ui.actionTextUnderIcon, SIGNAL(triggered()), this, SLOT(buttonStyle()));
connect(ui.messageTreeWidget, SIGNAL(clicked(const QModelIndex&)) , this, SLOT(clicked(const QModelIndex&)));
connect(ui.messageTreeWidget, SIGNAL(doubleClicked(const QModelIndex&)) , this, SLOT(doubleClicked(const QModelIndex&)));
connect(ui.messageTreeWidget, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(messageTreeWidgetCustomPopupMenu(const QPoint&)));
@ -353,10 +343,8 @@ void MessagesDialog::processSettings(bool load)
// state of splitter
ui.msgSplitter->restoreState(Settings->value("SplitterMsg").toByteArray());
ui.listSplitter->restoreState(Settings->value("SplitterList").toByteArray());
ui.boxSplitter->restoreState(Settings->value("SplitterBox").toByteArray());
/* toolbar button style */
Qt::ToolButtonStyle style = (Qt::ToolButtonStyle) Settings->value("ToolButon_Style", Qt::ToolButtonIconOnly).toInt();
setToolbarButtonStyle(style);
} else {
// save settings
@ -367,9 +355,7 @@ void MessagesDialog::processSettings(bool load)
// state of splitter
Settings->setValue("SplitterMsg", ui.msgSplitter->saveState());
Settings->setValue("SplitterList", ui.listSplitter->saveState());
/* toolbar button style */
Settings->setValue("ToolButon_Style", ui.newmessageButton->toolButtonStyle());
Settings->setValue("SplitterBox", ui.boxSplitter->saveState());
}
Settings->endGroup();
@ -764,15 +750,31 @@ void MessagesDialog::changeBox(int box_row)
switch(box_row)
{
case 0: mMessageModel->setCurrentBox(RsMessageModel::BOX_INBOX ); break;
case 1: mMessageModel->setCurrentBox(RsMessageModel::BOX_OUTBOX); break;
case 2: mMessageModel->setCurrentBox(RsMessageModel::BOX_DRAFTS); break;
case 3: mMessageModel->setCurrentBox(RsMessageModel::BOX_SENT ); break;
case 4: mMessageModel->setCurrentBox(RsMessageModel::BOX_TRASH ); break;
case 0: mMessageModel->setCurrentBox(RsMessageModel::BOX_INBOX );
ui.tabWidget->setTabText(0, tr("Inbox"));
ui.tabWidget->setTabIcon(0, QIcon(IMAGE_INBOX));
break;
case 1: mMessageModel->setCurrentBox(RsMessageModel::BOX_OUTBOX);
ui.tabWidget->setTabText(0, tr("Outbox"));
ui.tabWidget->setTabIcon(0, QIcon(IMAGE_OUTBOX));
break;
case 2: mMessageModel->setCurrentBox(RsMessageModel::BOX_DRAFTS);
ui.tabWidget->setTabText(0, tr("Drafts"));
ui.tabWidget->setTabIcon(0, QIcon(IMAGE_DRAFTS));
break;
case 3: mMessageModel->setCurrentBox(RsMessageModel::BOX_SENT );
ui.tabWidget->setTabText(0, tr("Sent"));
ui.tabWidget->setTabIcon(0, QIcon(IMAGE_SENT));
break;
case 4: mMessageModel->setCurrentBox(RsMessageModel::BOX_TRASH );
ui.tabWidget->setTabText(0, tr("Trash"));
ui.tabWidget->setTabIcon(0, QIcon(IMAGE_TRASH));
break;
default:
mMessageModel->setCurrentBox(RsMessageModel::BOX_NONE); break;
}
inChange = false;
insertMsgTxtAndFiles(ui.messageTreeWidget->currentIndex());
}
void MessagesDialog::changeQuickView(int newrow)
@ -787,13 +789,34 @@ void MessagesDialog::changeQuickView(int newrow)
if(newrow >= 0) // -1 means that nothing is selected
switch(newrow)
{
case 0x00: f = RsMessageModel::QUICK_VIEW_STARRED ; break;
case 0x01: f = RsMessageModel::QUICK_VIEW_SYSTEM ; break;
case 0x02: f = RsMessageModel::QUICK_VIEW_IMPORTANT; break;
case 0x03: f = RsMessageModel::QUICK_VIEW_WORK ; break;
case 0x04: f = RsMessageModel::QUICK_VIEW_PERSONAL ; break;
case 0x05: f = RsMessageModel::QUICK_VIEW_TODO ; break;
case 0x06: f = RsMessageModel::QUICK_VIEW_LATER ; break;
case 0x00: f = RsMessageModel::QUICK_VIEW_STARRED ;
ui.tabWidget->setTabText(0, tr("Starred"));
ui.tabWidget->setTabIcon(0, QIcon(IMAGE_STAR_ON));
break;
case 0x01: f = RsMessageModel::QUICK_VIEW_SYSTEM ;
ui.tabWidget->setTabText(0, tr("System"));
ui.tabWidget->setTabIcon(0, QIcon(IMAGE_SYSTEM));
break;
case 0x02: f = RsMessageModel::QUICK_VIEW_IMPORTANT;
ui.tabWidget->setTabText(0, tr("Important"));
ui.tabWidget->setTabIcon(0, QIcon(IMAGE_FOLDER));
break;
case 0x03: f = RsMessageModel::QUICK_VIEW_WORK ;
ui.tabWidget->setTabText(0, tr("Work"));
ui.tabWidget->setTabIcon(0, QIcon(IMAGE_FOLDER));
break;
case 0x04: f = RsMessageModel::QUICK_VIEW_PERSONAL ;
ui.tabWidget->setTabText(0, tr("Personal"));
ui.tabWidget->setTabIcon(0, QIcon(IMAGE_FOLDER));
break;
case 0x05: f = RsMessageModel::QUICK_VIEW_TODO ;
ui.tabWidget->setTabText(0, tr("Todo"));
ui.tabWidget->setTabIcon(0, QIcon(IMAGE_FOLDER));
break;
case 0x06: f = RsMessageModel::QUICK_VIEW_LATER ;
ui.tabWidget->setTabText(0, tr("Later"));
ui.tabWidget->setTabIcon(0, QIcon(IMAGE_FOLDER));
break;
default:
f = RsMessageModel::QuickViewFilter( (int)RsMessageModel::QUICK_VIEW_USER + newrow - 0x07);
}
@ -1015,25 +1038,6 @@ void MessagesDialog::undeletemessage()
updateMessageSummaryList();
}
void MessagesDialog::setToolbarButtonStyle(Qt::ToolButtonStyle style)
{
ui.newmessageButton->setToolButtonStyle(style);
ui.removemessageButton->setToolButtonStyle(style);
ui.replymessageButton->setToolButtonStyle(style);
ui.replyallmessageButton->setToolButtonStyle(style);
ui.forwardmessageButton->setToolButtonStyle(style);
ui.tagButton->setToolButtonStyle(style);
ui.printButton->setToolButtonStyle(style);
ui.viewtoolButton->setToolButtonStyle(style);
}
void MessagesDialog::buttonStyle()
{
setToolbarButtonStyle((Qt::ToolButtonStyle) dynamic_cast<QAction*>(sender())->data().toInt());
}
void MessagesDialog::filterChanged(const QString& text)
{
QStringList items = text.split(' ',QString::SkipEmptyParts);
@ -1386,14 +1390,9 @@ void MessagesDialog::connectActions()
msg = dynamic_cast<MessageWidget*>(ui.tabWidget->widget(tab));
}
ui.replymessageButton->disconnect();
ui.replyallmessageButton->disconnect();
ui.forwardmessageButton->disconnect();
ui.printButton->disconnect();
ui.actionPrint->disconnect();
ui.actionPrintPreview->disconnect();
ui.actionSaveAs->disconnect();
ui.removemessageButton->disconnect();
ui.actionReply->disconnect();
ui.actionReplyAll->disconnect();
@ -1409,18 +1408,15 @@ void MessagesDialog::connectActions()
if (msg) {
if (tab == 0) {
// connect with own slot to remove multiple messages
connect(ui.removemessageButton, SIGNAL(clicked()), this, SLOT(removemessage()));
//connect(ui.removemessageButton, SIGNAL(clicked()), this, SLOT(removemessage()));
} else {
msg->connectAction(MessageWidget::ACTION_REMOVE, ui.removemessageButton);
//msg->connectAction(MessageWidget::ACTION_REMOVE, ui.removemessageButton);
}
msg->connectAction(MessageWidget::ACTION_REPLY, ui.replymessageButton);
msg->connectAction(MessageWidget::ACTION_REPLY_ALL, ui.replyallmessageButton);
msg->connectAction(MessageWidget::ACTION_FORWARD, ui.forwardmessageButton);
msg->connectAction(MessageWidget::ACTION_PRINT, ui.printButton);
msg->connectAction(MessageWidget::ACTION_PRINT, ui.actionPrint);
msg->connectAction(MessageWidget::ACTION_PRINT_PREVIEW, ui.actionPrintPreview);
msg->connectAction(MessageWidget::ACTION_SAVE_AS, ui.actionSaveAs);
}
}
void MessagesDialog::updateInterface()
@ -1441,13 +1437,8 @@ void MessagesDialog::updateInterface()
count = 1;
}
ui.replymessageButton->setEnabled(count == 1);
ui.replyallmessageButton->setEnabled(count == 1);
ui.forwardmessageButton->setEnabled(count == 1);
ui.printButton->setEnabled(count == 1);
ui.actionPrint->setEnabled(count == 1);
ui.actionPrintPreview->setEnabled(count == 1);
ui.actionSaveAs->setEnabled(count == 1);
ui.removemessageButton->setEnabled(count >= 1);
ui.tagButton->setEnabled(count >= 1);
}

View File

@ -100,8 +100,6 @@ private slots:
void emptyTrash();
void buttonStyle();
void filterChanged(const QString &text);
void filterColumnChanged(int column);
@ -129,7 +127,6 @@ private:
void processSettings(bool load);
void setToolbarButtonStyle(Qt::ToolButtonStyle style);
void fillQuickView();
void closeTab(const std::string &msgId);

File diff suppressed because it is too large Load Diff

View File

@ -238,8 +238,7 @@ PopupChatWindow QToolBar#chattoolBar{
/* Messages */
MessageComposer QToolBar#toolBar {
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #9BDBF9, stop:1 #1592CD);
border: 0px;
}
MessagesDialog QFrame#folderFrame, MessagesDialog QFrame#quickViewFrame {

View File

@ -207,7 +207,7 @@ PrintPreview::PrintPreview(const QTextDocument *document, QWidget *parent)
tb->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
QAction *a;
a = new QAction(QIcon(":/images/textedit/fileprint.png"), tr("&Print..."), this);
a = new QAction(QIcon(""), tr("&Print..."), this);
a->setShortcut(Qt::CTRL + Qt::Key_P);
connect(a, SIGNAL(triggered()), this, SLOT(print()));
tb->addAction(a);
@ -219,11 +219,11 @@ PrintPreview::PrintPreview(const QTextDocument *document, QWidget *parent)
tb->addSeparator();
a = new QAction(QIcon(":/images/textedit/zoomin.png"), tr("Zoom In"), this);
a = new QAction(QIcon(""), tr("Zoom In"), this);
connect(a, SIGNAL(triggered()), view, SLOT(zoomIn()));
tb->addAction(a);
a = new QAction(QIcon(":/images/textedit/zoomout.png"), tr("Zoom Out"), this);
a = new QAction(QIcon(""), tr("Zoom Out"), this);
connect(a, SIGNAL(triggered()), view, SLOT(zoomOut()));
tb->addAction(a);