diff options
author | ubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2011-10-24 19:55:33 +0000 |
---|---|---|
committer | ubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2011-10-24 19:55:33 +0000 |
commit | 53fbed8ff0167ee3c336c7c5a0dca539fd9051d7 (patch) | |
tree | 1958c80097eb1eb8750031ea03a8d037ccc74a24 | |
parent | update about-dialog to gpl v3 (diff) | |
download | gpg4usb-53fbed8ff0167ee3c336c7c5a0dca539fd9051d7.tar.gz gpg4usb-53fbed8ff0167ee3c336c7c5a0dca539fd9051d7.zip |
only create attachment dock if pgp-mime parsing enabled
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@570 34ebc366-c3a9-4b3c-9f84-69acf7962910
-rw-r--r-- | gpgwin.cpp | 15 | ||||
-rw-r--r-- | gpgwin.h | 5 |
2 files changed, 18 insertions, 2 deletions
@@ -442,13 +442,19 @@ void GpgWin::createDockWindows() /* Attachments-Dockwindow */ + if(settings.value("mime/parseMime").toBool()) { + createAttachmentDock(); + } +} + +void GpgWin::createAttachmentDock() { attachmentDock = new QDockWidget(tr("Attached files:"), this); attachmentDock->setObjectName("AttachmentDock"); attachmentDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea | Qt::BottomDockWidgetArea); addDockWidget(Qt::BottomDockWidgetArea, attachmentDock); attachmentDock->setWidget(mAttachments); - // hide till attachmendt is decrypted - viewMenu->addAction(attachmentDock->toggleViewAction()); + // hide till attachment is decrypted + // viewMenu->addAction(attachmentDock->toggleViewAction()); attachmentDock->hide(); } @@ -745,6 +751,11 @@ void GpgWin::openSettingsDialog() // Iconstyle Qt::ToolButtonStyle buttonStyle = static_cast<Qt::ToolButtonStyle>(settings.value("toolbar/iconstyle", Qt::ToolButtonTextUnderIcon).toUInt()); this->setToolButtonStyle(buttonStyle); + + if(settings.value("mime/parseMime").toBool()) { + createAttachmentDock(); + } + } void GpgWin::cleanDoubleLinebreaks() @@ -192,6 +192,11 @@ private: void createDockWindows(); /** + * @details Create attachment-dockwindow. + */ + void createAttachmentDock(); + + /** * @details Load settings from ini-file. */ void restoreSettings(); |