aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910>2010-05-12 18:38:27 +0000
committerubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910>2010-05-12 18:38:27 +0000
commitd12ebc839f2d509c8a5ac60f7e9e55ffab5dcbcf (patch)
tree01780dd64257fa84bc76ed7c79285513d5235673
parentvisual polishing of attachment-view, testfile for more attachments, add test-... (diff)
downloadgpg4usb-d12ebc839f2d509c8a5ac60f7e9e55ffab5dcbcf.tar.gz
gpg4usb-d12ebc839f2d509c8a5ac60f7e9e55ffab5dcbcf.zip
add option for mimeparsing to settings-dialog
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@326 34ebc366-c3a9-4b3c-9f84-69acf7962910
-rw-r--r--attachments.cpp1
-rwxr-xr-xsettingsdialog.cpp22
-rwxr-xr-xsettingsdialog.h3
3 files changed, 22 insertions, 4 deletions
diff --git a/attachments.cpp b/attachments.cpp
index dc248a4..c844e81 100644
--- a/attachments.cpp
+++ b/attachments.cpp
@@ -21,7 +21,6 @@
/* TODO:
* - check content encoding (base64 / quoted-printable) and apply appropriate opperation (maybe already in mime.cpp)
- * - add option to settingsdialog for mimeparsing
* - check memory usage, use less copy operations / more references
* - try table-model-view for mimeparts
*/
diff --git a/settingsdialog.cpp b/settingsdialog.cpp
index e6d086a..976907e 100755
--- a/settingsdialog.cpp
+++ b/settingsdialog.cpp
@@ -117,6 +117,16 @@ SettingsDialog::SettingsDialog(QWidget *parent)
vbox2->addWidget(langNote);
langBox->setLayout(vbox2);
+ /*****************************************
+ * MIME-Parsing-Box
+ *****************************************/
+
+ mimeParseBox = new QGroupBox(tr("MIME-parsing (Experimental)"));
+ mimeParseBoxLayout = new QHBoxLayout();
+ mimeParseCheckBox =new QCheckBox(tr("Try to split attachments from PGP-MIME ecrypted messages."),this);
+ mimeParseBoxLayout->addWidget(mimeParseCheckBox);
+ mimeParseBox->setLayout(mimeParseBoxLayout);
+
/*****************************************
* Button-Box
*****************************************/
@@ -129,14 +139,15 @@ SettingsDialog::SettingsDialog(QWidget *parent)
*****************************************/
vbox = new QVBoxLayout();
vbox->addWidget(iconSizeBox);
- vbox->addWidget(iconStyleBox);
+ vbox->addWidget(iconStyleBox);
vbox->addWidget(windowSizeBox);
vbox->addWidget(saveCheckedKeysBox);
+ vbox->addWidget(mimeParseBox);
vbox->addWidget(langBox);
vbox->addWidget(buttonBox);
setLayout(vbox);
-
- setSettings();
+
+ setSettings();
exec();
}
@@ -181,6 +192,9 @@ void SettingsDialog::setSettings()
Qt::CheckState keySave = static_cast<Qt::CheckState>(settings.value("keys/keySave", Qt::Unchecked).toUInt());
saveCheckedKeysCheckBox->setCheckState(keySave);
+ // MIME-Parsing
+ if(settings.value("mime/parsemime").toBool()) mimeParseCheckBox->setCheckState(Qt::Checked);
+
//Language setting
QString langKey = settings.value("int/lang").toString();
QString langValue = lang.value(langKey);
@@ -217,6 +231,8 @@ void SettingsDialog::applySettings()
settings.setValue("window/windowSave", windowSizeCheckBox->checkState());
settings.setValue("keys/keySave", saveCheckedKeysCheckBox->checkState());
+ settings.setValue("mime/parsemime" , mimeParseCheckBox->isChecked());
+
//qDebug() << "lang:" << langSelectBox->currentText() << " : " << lang.key(langSelectBox->currentText());
settings.setValue("int/lang", lang.key(langSelectBox->currentText()));
diff --git a/settingsdialog.h b/settingsdialog.h
index 7a87e19..b01bc9b 100755
--- a/settingsdialog.h
+++ b/settingsdialog.h
@@ -46,6 +46,7 @@ private:
QGroupBox *iconStyleBox;
QGroupBox *windowSizeBox;
QGroupBox *saveCheckedKeysBox;
+ QGroupBox *mimeParseBox;
QDialogButtonBox *buttonBox;
QButtonGroup *iconSizeGroup;
@@ -59,6 +60,7 @@ private:
QRadioButton *iconAllButton;
QCheckBox *windowSizeCheckBox;
QCheckBox *saveCheckedKeysCheckBox;
+ QCheckBox *mimeParseCheckBox;
QComboBox *langSelectBox;
QHash<QString, QString> lang;
@@ -66,6 +68,7 @@ private:
QHBoxLayout *iconStyleBoxLayout;
QHBoxLayout *windowSizeBoxLayout;
QHBoxLayout *saveCheckedKeysBoxLayout;
+ QHBoxLayout *mimeParseBoxLayout;
QVBoxLayout *vbox;
void setSettings();