From 0680d30d56b60fe7b26409d71c6757aba3c07983 Mon Sep 17 00:00:00 2001 From: nils Date: Sun, 23 Jan 2011 18:18:36 +0000 Subject: 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 --- gpgwin.cpp | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) (limited to 'gpgwin.cpp') 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() "Developer:
" "Bene, Heimer, Juergen, Nils, Ubbo

" "Translation:
" - "Alessandro (pt_br), Alex (fr), Kirill (ru), Viriato (es), Serse (it)

" + "Alessandro (pt_br), Kirill (ru), Viriato (es), Serse (it)

" "If you have any questions and/or
" "suggestions, contact us at
" "gpg4usb at cpunk.de

" @@ -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); } } -- cgit v1.2.3