From f52aacbc3db505dc1aa692327180e5765012bed1 Mon Sep 17 00:00:00 2001 From: ubbo Date: Thu, 19 Aug 2010 22:19:26 +0000 Subject: start implementing 'open file with' for attachments. very rough for now, needs more work git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@364 34ebc366-c3a9-4b3c-9f84-69acf7962910 --- settingsdialog.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'settingsdialog.cpp') diff --git a/settingsdialog.cpp b/settingsdialog.cpp index ed71294..42c7d28 100755 --- a/settingsdialog.cpp +++ b/settingsdialog.cpp @@ -122,11 +122,18 @@ SettingsDialog::SettingsDialog(QWidget *parent) *****************************************/ mimeParseBox = new QGroupBox(tr("MIME-parsing (Experimental)")); - mimeParseBoxLayout = new QHBoxLayout(); + mimeParseBoxLayout = new QVBoxLayout(); mimeParseCheckBox = new QCheckBox(tr("Try to split attachments from PGP-MIME ecrypted messages."), this); mimeParseBoxLayout->addWidget(mimeParseCheckBox); mimeQPCheckBox = new QCheckBox(tr("Try to recognice quoted printable."), this); mimeParseBoxLayout->addWidget(mimeQPCheckBox); + mimeOpenAttachmentCheckBox = new QCheckBox(tr("Enable open with external app, saves file in tmp folder."), this); + //mimeOpenAttachmentCheckBox->setWhatsThis("Open attachments with... neeeds temp foder.."); + mimeOpenAttachmentCheckBox->setToolTip("Open attachments with Application for the filetype. Needs saving the file to temporarly folder. For now its your job to clean this folder up if you want."); + /* + * Here could be something like Qstring("?"), or an icon with an ?, with the action "show tooltip" + */ + mimeParseBoxLayout->addWidget(mimeOpenAttachmentCheckBox); mimeParseBox->setLayout(mimeParseBoxLayout); /***************************************** @@ -198,6 +205,9 @@ void SettingsDialog::setSettings() // Qouted Printable if (settings.value("mime/parseQP").toBool()) mimeQPCheckBox->setCheckState(Qt::Checked); + // Open Attachments with external app + if (settings.value("mime/openAttachment").toBool()) mimeOpenAttachmentCheckBox->setCheckState(Qt::Checked); + //Language setting QString langKey = settings.value("int/lang").toString(); QString langValue = lang.value(langKey); @@ -236,6 +246,7 @@ void SettingsDialog::applySettings() settings.setValue("mime/parsemime" , mimeParseCheckBox->isChecked()); settings.setValue("mime/parseQP" , mimeQPCheckBox->isChecked()); + settings.setValue("mime/openAttachment" , mimeOpenAttachmentCheckBox->isChecked()); settings.setValue("int/lang", lang.key(langSelectBox->currentText())); -- cgit v1.2.3