Changeset View
Changeset View
Standalone View
Standalone View
messageviewer/src/viewer/objecttreeparser.cpp
Show First 20 Lines • Show All 615 Lines • ▼ Show 20 Line(s) | 615 | } else { | |||
---|---|---|---|---|---|
616 | messagePart.auditLogError = GpgME::Error(GPG_ERR_NOT_IMPLEMENTED); | 616 | messagePart.auditLogError = GpgME::Error(GPG_ERR_NOT_IMPLEMENTED); | ||
617 | } | 617 | } | ||
618 | 618 | | |||
619 | mp.html(false); | 619 | mp.html(false); | ||
620 | 620 | | |||
621 | return bIsOpaqueSigned; | 621 | return bIsOpaqueSigned; | ||
622 | } | 622 | } | ||
623 | 623 | | |||
624 | void ObjectTreeParser::writeDeferredDecryptionBlock() | | |||
625 | { | | |||
626 | const QString iconName = QLatin1String("file:///") + KIconLoader::global()->iconPath(QStringLiteral("document-decrypt"), | | |||
627 | KIconLoader::Small); | | |||
628 | const QString decryptedData = QLatin1String("<div style=\"font-size:large; text-align:center;" | | |||
629 | "padding-top:20pt;\">") | | |||
630 | + i18n("This message is encrypted.") | | |||
631 | + QLatin1String("</div>" | | |||
632 | "<div style=\"text-align:center; padding-bottom:20pt;\">" | | |||
633 | "<a href=\"kmail:decryptMessage\">" | | |||
634 | "<img src=\"") + iconName + QLatin1String("\"/>") | | |||
635 | + i18n("Decrypt Message") | | |||
636 | + QLatin1String("</a></div>"); | | |||
637 | PartMetaData messagePart; | | |||
638 | messagePart.isDecryptable = true; | | |||
639 | messagePart.isEncrypted = true; | | |||
640 | messagePart.isSigned = false; | | |||
641 | | ||||
642 | if (htmlWriter()) { //TODO: check if this check should be here or at the beginning of the method | | |||
643 | htmlWriter()->queue(writeSigstatHeader(messagePart, | | |||
644 | cryptoProtocol(), | | |||
645 | QString())); | | |||
646 | htmlWriter()->queue(decryptedData); | | |||
647 | htmlWriter()->queue(writeSigstatFooter(messagePart)); | | |||
648 | } | | |||
649 | } | | |||
650 | | ||||
651 | void ObjectTreeParser::writeDecryptionInProgressBlock() | | |||
652 | { | | |||
653 | if (!htmlWriter()) { | | |||
654 | return; | | |||
655 | } | | |||
656 | // PENDING(marc) find an animated icon here: | | |||
657 | //const QString iconName = KGlobal::instance()->iconLoader()->iconPath( "decrypted", KIcon::Small ); | | |||
658 | //const QString decryptedData = i18n("Encrypted data not shown"); | | |||
659 | PartMetaData messagePart; | | |||
660 | messagePart.isDecryptable = true; | | |||
661 | messagePart.isEncrypted = true; | | |||
662 | messagePart.isSigned = false; | | |||
663 | messagePart.inProgress = true; | | |||
664 | htmlWriter()->queue(writeSigstatHeader(messagePart, | | |||
665 | cryptoProtocol(), | | |||
666 | QString())); | | |||
667 | //htmlWriter()->queue( decryptedData ); | | |||
668 | htmlWriter()->queue(writeSigstatFooter(messagePart)); | | |||
669 | } | | |||
670 | | ||||
671 | void ObjectTreeParser::writeCertificateImportResult(const GpgME::ImportResult &res) | 624 | void ObjectTreeParser::writeCertificateImportResult(const GpgME::ImportResult &res) | ||
672 | { | 625 | { | ||
673 | if (res.error()) { | 626 | if (res.error()) { | ||
674 | htmlWriter()->queue(i18n("Sorry, certificate could not be imported.<br />" | 627 | htmlWriter()->queue(i18n("Sorry, certificate could not be imported.<br />" | ||
675 | "Reason: %1", QString::fromLocal8Bit(res.error().asString()))); | 628 | "Reason: %1", QString::fromLocal8Bit(res.error().asString()))); | ||
676 | return; | 629 | return; | ||
677 | } | 630 | } | ||
678 | 631 | | |||
▲ Show 20 Lines • Show All 2572 Lines • Show Last 20 Lines |