aboutsummaryrefslogtreecommitdiffstats
path: root/gpgwin.cpp
diff options
context:
space:
mode:
authornils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2011-01-23 18:18:36 +0000
committernils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2011-01-23 18:18:36 +0000
commit0680d30d56b60fe7b26409d71c6757aba3c07983 (patch)
treecc938be951738e36f1ebbbef53bcb31b602c47b2 /gpgwin.cpp
parentcleaned up a little (diff)
downloadgpg4usb-0680d30d56b60fe7b26409d71c6757aba3c07983.tar.gz
gpg4usb-0680d30d56b60fe7b26409d71c6757aba3c07983.zip
now there's no asking to save every single document, if multiple documents are saved. Furthermore a lot of cleaning
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@443 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to 'gpgwin.cpp')
-rw-r--r--gpgwin.cpp25
1 files changed, 8 insertions, 17 deletions
diff --git a/gpgwin.cpp b/gpgwin.cpp
index 17062cc..a7b04b4 100644
--- a/gpgwin.cpp
+++ b/gpgwin.cpp
@@ -32,7 +32,6 @@ GpgWin::GpgWin()
QString appPath = qApp->applicationDirPath();
iconPath = appPath + "/icons/";
-
setCorner(Qt::BottomLeftCorner, Qt::LeftDockWidgetArea);
setCorner(Qt::BottomRightCorner, Qt::RightDockWidgetArea);
@@ -61,14 +60,13 @@ GpgWin::GpgWin()
// open filename if provided as first command line parameter
QStringList args = qApp->arguments();
- qDebug() << args.size();
if (args.size() > 1) {
-
if (!args[1].startsWith("-")) {
if (QFile::exists(args[1]))
edit->loadFile(args[1]);
}
}
+
edit->curTextPage()->setFocus();
}
@@ -451,7 +449,7 @@ void GpgWin::about()
"<b>Developer:</b><br>"
"Bene, Heimer, Juergen, Nils, Ubbo<br><br>"
"<b>Translation:</b><br>"
- "Alessandro (pt_br), Alex (fr), Kirill (ru), Viriato (es), Serse (it) <br><br>"
+ "Alessandro (pt_br), Kirill (ru), Viriato (es), Serse (it) <br><br>"
"If you have any questions and/or<br>"
"suggestions, contact us at<br>"
"gpg4usb at cpunk.de</a><br><br>"
@@ -491,28 +489,21 @@ void GpgWin::decrypt()
if(Mime::isMime(decrypted)) {
Header header = Mime::getHeader(decrypted);
-
// is it multipart, is multipart-parsing enabled
if(header.getValue("Content-Type") == "multipart/mixed"
&& settings.value("mime/parseMime").toBool()) {
-
parseMime(decrypted);
-
} else if(header.getValue("Content-Type") == "text/plain"
&& settings.value("mime/parseQP").toBool()){
-
- if (header.getValue("Content-Transfer-Encoding") == "quoted-printable") {
- QByteArray *decoded = new QByteArray();
- Mime::quotedPrintableDecode(*decrypted, *decoded);
- //TODO: remove header
- decrypted = decoded;
-
- }
+ if (header.getValue("Content-Transfer-Encoding") == "quoted-printable") {
+ QByteArray *decoded = new QByteArray();
+ Mime::quotedPrintableDecode(*decrypted, *decoded);
+ //TODO: remove header
+ decrypted = decoded;
+ }
}
}
-
edit->curTextPage()->setPlainText(QString::fromUtf8(*decrypted));
- //edit->setPlainText(*decrypted);
}
}