aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910>2010-05-11 19:56:56 +0000
committerubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910>2010-05-11 19:56:56 +0000
commit0c31c56433b659e1f87b8100211bf9aeed102c9e (patch)
tree9566f81e85062aa2c69757ce420f176cae424de1
parentsave attachment works now for testfile (diff)
downloadgpg4usb-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.cpp15
-rw-r--r--gpgwin.h1
2 files changed, 7 insertions, 9 deletions
diff --git a/gpgwin.cpp b/gpgwin.cpp
index 633e3b8..2fd7b32 100644
--- a/gpgwin.cpp
+++ b/gpgwin.cpp
@@ -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);
}
diff --git a/gpgwin.h b/gpgwin.h
index 9de17ed..60f6f13 100644
--- a/gpgwin.h
+++ b/gpgwin.h
@@ -145,6 +145,7 @@ private:
QLabel *repeatpwLabel;
QLabel *errorLabel;
+ QSettings settings;
QString curFile;
KeyList *mKeyList;
Attachments *mAttachments;