[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: Encryption and non-oasis file format
From: Dag Andersen <danders () get2net ! dk>
Date: 2009-02-16 14:47:00
Message-ID: 200902161547.00765.danders () get2net ! dk
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
On Mandag 16 februar 2009 15:43:50 Dag Andersen wrote:
> On Mandag 16 februar 2009 11:44:04 Dag Andersen wrote:
> > Hi, kplato doesn't have a oasis file format so it does not support
> > encryption. Is there a smart/easy way to communicate this to the user?
>
> Here is a patch that makes the document info dialog honour the documents
> supportedSpecialFormats() by disabling the encryption pushbuttin if
> encryption is not supported. It contains a new i18n string.
> Can somebody review and commit if ok?
And the patch...
--
Mvh.
Dag Andersen
[Attachment #5 (text/html)]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" \
"http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" \
content="1" /><style type="text/css">p, li { white-space: pre-wrap; \
}</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; \
font-weight:400; font-style:normal;">On Mandag 16 februar 2009 15:43:50 Dag Andersen \
wrote:<br> > On Mandag 16 februar 2009 11:44:04 Dag Andersen wrote:<br>
> > Hi, kplato doesn't have a oasis file format so it does not support<br>
> > encryption. Is there a smart/easy way to communicate this to the user?<br>
><br>
> Here is a patch that makes the document info dialog honour the documents<br>
> supportedSpecialFormats() by disabling the encryption pushbuttin if<br>
> encryption is not supported. It contains a new i18n string.<br>
> Can somebody review and commit if ok?<br>
And the patch...<br>
-- <br>
Mvh.<br>
Dag Andersen</p></body></html>
["enc.diff" (text/x-patch)]
Index: KoDocumentInfoDlg.cpp
===================================================================
--- KoDocumentInfoDlg.cpp (revision 926799)
+++ KoDocumentInfoDlg.cpp (working copy)
@@ -151,32 +151,36 @@
d->m_aboutUi->lblRevision->setText(d->m_info->aboutInfo("editing-cycles"));
- if (doc->specialOutputFlag() == KoDocument::SaveEncrypted) {
- if (d->m_toggleEncryption) {
- QPixmap p = KIconLoader::global()->loadIcon("object-unlocked", KIconLoader::Small);
- d->m_aboutUi->lblEncrypted->setText(i18n("This document will be decrypted"));
- d->m_aboutUi->lblEncryptedPic->setPixmap(p);
- d->m_aboutUi->pbEncrypt->setText(i18n("Do not decrypt"));
+ if ( doc->supportedSpecialFormats() & KoDocument::SaveEncrypted ) {
+ if (doc->specialOutputFlag() == KoDocument::SaveEncrypted) {
+ if (d->m_toggleEncryption) {
+ QPixmap p = KIconLoader::global()->loadIcon("object-unlocked", KIconLoader::Small);
+ d->m_aboutUi->lblEncrypted->setText(i18n("This document will be decrypted"));
+ d->m_aboutUi->lblEncryptedPic->setPixmap(p);
+ d->m_aboutUi->pbEncrypt->setText(i18n("Do not decrypt"));
+ } else {
+ QPixmap p = KIconLoader::global()->loadIcon("object-locked", KIconLoader::Small);
+ d->m_aboutUi->lblEncrypted->setText(i18n("This document is encrypted"));
+ d->m_aboutUi->lblEncryptedPic->setPixmap(p);
+ d->m_aboutUi->pbEncrypt->setText(i18n("D&ecrypt"));
+ }
} else {
- QPixmap p = KIconLoader::global()->loadIcon("object-locked", KIconLoader::Small);
- d->m_aboutUi->lblEncrypted->setText(i18n("This document is encrypted"));
- d->m_aboutUi->lblEncryptedPic->setPixmap(p);
- d->m_aboutUi->pbEncrypt->setText(i18n("D&ecrypt"));
+ if (d->m_toggleEncryption) {
+ QPixmap p = KIconLoader::global()->loadIcon("object-locked", KIconLoader::Small);
+ d->m_aboutUi->lblEncrypted->setText(i18n("This document will be encrypted."));
+ d->m_aboutUi->lblEncryptedPic->setPixmap(p);
+ d->m_aboutUi->pbEncrypt->setText(i18n("Do not encrypt"));
+ } else {
+ QPixmap p = KIconLoader::global()->loadIcon("object-unlocked", KIconLoader::Small);
+ d->m_aboutUi->lblEncrypted->setText(i18n("This document is not encrypted"));
+ d->m_aboutUi->lblEncryptedPic->setPixmap(p);
+ d->m_aboutUi->pbEncrypt->setText(i18n("&Encrypt"));
+ }
}
} else {
- if (d->m_toggleEncryption) {
- QPixmap p = KIconLoader::global()->loadIcon("object-locked", KIconLoader::Small);
- d->m_aboutUi->lblEncrypted->setText(i18n("This document will be encrypted."));
- d->m_aboutUi->lblEncryptedPic->setPixmap(p);
- d->m_aboutUi->pbEncrypt->setText(i18n("Do not encrypt"));
- } else {
- QPixmap p = KIconLoader::global()->loadIcon("object-unlocked", KIconLoader::Small);
- d->m_aboutUi->lblEncrypted->setText(i18n("This document is not encrypted"));
- d->m_aboutUi->lblEncryptedPic->setPixmap(p);
- d->m_aboutUi->pbEncrypt->setText(i18n("&Encrypt"));
- }
+ d->m_aboutUi->lblEncrypted->setText(i18n("This document does not support encryption"));
+ d->m_aboutUi->pbEncrypt->setEnabled( false );
}
-
connect(d->m_aboutUi->pbReset, SIGNAL(clicked()),
this, SLOT(slotResetMetaData()));
connect(d->m_aboutUi->pbEncrypt, SIGNAL(clicked()),
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic