diff options
author | ubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2010-05-11 19:56:56 +0000 |
---|---|---|
committer | ubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2010-05-11 19:56:56 +0000 |
commit | 0c31c56433b659e1f87b8100211bf9aeed102c9e (patch) | |
tree | 9566f81e85062aa2c69757ce420f176cae424de1 | |
parent | save attachment works now for testfile (diff) | |
download | gpg4usb-0c31c56433b659e1f87b8100211bf9aeed102c9e.tar.gz gpg4usb-0c31c56433b659e1f87b8100211bf9aeed102c9e.zip |
mimeparsing optional by settings
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@324 34ebc366-c3a9-4b3c-9f84-69acf7962910
-rw-r--r-- | gpgwin.cpp | 15 | ||||
-rw-r--r-- | gpgwin.h | 1 |
2 files changed, 7 insertions, 9 deletions
@@ -69,8 +69,6 @@ GpgWin::GpgWin() void GpgWin::restoreSettings() { - QSettings settings; - // state sets pos & size of dock-widgets this->restoreState(settings.value("window/windowState").toByteArray()); @@ -323,8 +321,6 @@ void GpgWin::closeEvent(QCloseEvent *event) /** Save the settings */ - QSettings settings; - // window position and size settings.setValue("window/windowState", saveState()); settings.setValue("window/pos", pos()); @@ -502,14 +498,16 @@ void GpgWin::decrypt() preventNoDataErr(&text); mCtx->decrypt(text, tmp); if (!tmp->isEmpty()) { - // is it mime? TODO: parseMime should be optional by setting - parseMime(tmp); + // is it mime? + if(settings.value("mime/parseMime").toBool()) { + parseMime(tmp); + } edit->setPlainText(QString::fromUtf8(*tmp)); } } /** - * if this is mime, split text and attachents... + * if this is mime, split text and attachments... * message contains only text afterwards */ void GpgWin::parseMime(QByteArray *message) { @@ -648,7 +646,6 @@ void GpgWin::fileEncryption() } void GpgWin::openSettingsDialog() { - QSettings settings; new SettingsDialog(this); // restoreSettings(); // Iconsize @@ -656,6 +653,6 @@ void GpgWin::openSettingsDialog() this->setIconSize(iconSize); // Iconstyle - Qt::ToolButtonStyle buttonStyle = static_cast<Qt::ToolButtonStyle>(settings.value("toolbar/iconstyle", Qt::ToolButtonTextUnderIcon).toUInt()); + Qt::ToolButtonStyle buttonStyle = static_cast<Qt::ToolButtonStyle>(settings.value("toolbar/iconstyle", Qt::ToolButtonTextUnderIcon).toUInt()); this->setToolButtonStyle(buttonStyle); } @@ -145,6 +145,7 @@ private: QLabel *repeatpwLabel; QLabel *errorLabel; + QSettings settings; QString curFile; KeyList *mKeyList; Attachments *mAttachments; |