SVN commit 734822 by cconnell:
Lots of small fixes
GUI:String clarifications
M +2 -2 doc/kopete-cryptography/index.docbook
M +8 -11 kopete-cryptography/CMakeLists.txt
M +1 -1 kopete-cryptography/cryptographyguiclient.cpp
M +27 -19 kopete-cryptography/cryptographyplugin.cpp
M +10 -5
kopete-cryptography/cryptographypreferences.cpp
M +1 -1
kopete-cryptography/cryptographyselectuserkey.cpp
M +1 -1
kopete-cryptography/kopete_cryptography.desktop
M +2 -2
kopete-cryptography/kopete_cryptography_config.desktop
---
trunk/extragear/network/doc/kopete-cryptography/index.docboo
k #734821:734822
 -49,7
+49,7 
<title>Cryptography Plugin</title>
-<sect2>
+<sect2 id="cryptography-summary">
<title>Cryptography</title>
 -68,7
+68,7 
</sect2>
-<sect2>
+<sect2 id="credits">
<title>Credits</title>
&underFDL;
&underGPL;
---
trunk/extragear/network/kopete-cryptography/CMakeLists.txt
#734821:734822
 -4,22
+4,19 
include (KDE4Defaults)
include (MacroLibrary)
include(MacroOptionalAddSubdirectory)
-find_package(Kopete)
-find_package(Kdepim)
-find_package(KdepimLibs)
-find_package(QGpgme)
+find_package(Kopete REQUIRED)
+find_package(Kdepim REQUIRED)
+find_package(KdepimLibs REQUIRED)
+find_package(QGpgme REQUIRED)
add_definitions ($ $)
-include_directories ($
$ $)
+include_directories ($
+#$
+$ )
add_subdirectory ( icons )
-include_directories(
-$
-)
-
-
########### next target ###############
set(kopete_cryptography_PART_SRCS
 -34,7
+31,7 
kde4_add_plugin(kopete_cryptography
$)
-target_link_libraries(kopete_cryptography
$ $ kopete kleo
$ $ )
+target_link_libraries(kopete_cryptography
$ kopete kleo $
$ )
install(TARGETS kopete_cryptography DESTINATION
$)
---
trunk/extragear/network/kopete-cryptography/cryptographyguic
lient.cpp #734821:734822
 -168,7
+168,7 
// we can't encrypt if we don't have every single key we
need
if ( !keyless.isEmpty() )
{
- KMessageBox::sorry ( w, i18np ( "To send encrypted
messages to %2, you still need to select a public key for
this contact.", "To send encrypted messages to
them, you still need to select a public key for each of
these contacts:n%2",
+ KMessageBox::sorry ( w, i18np ( "You need to select
a public key for %2 to send encrypted messages to
them.", "To send encrypted messages to the
following meta-contacts still need to select a key for
them:n%2",
keyless.count(),
keyless.join ( "n" ) ),
i18np ( "Missing public
key", "Missing public keys", keyless.count()
) );
---
trunk/extragear/network/kopete-cryptography/cryptographyplug
in.cpp #734821:734822
 -16,9
+16,11 
************************************************************
***************
*/
+// qt stuff
#include <QList>
#include <QTextDocument>
+// kde stuff
#include <kapplication.h>
#include <kdebug.h>
#include <kaction.h>
 -27,10
+29,8 
#include <kiconloader.h>
#include <kmessagebox.h>
#include <kactioncollection.h>
-#include <kleo/ui/keylistview.h>
-#include <kabc/addressbook.h>
-#include <kopete/kabcpersistence.h>
+// kopete stuff
#include <kopete/kopetemetacontact.h>
#include <kopete/kopetecontactlist.h>
#include <kopete/kopetechatsessionmanager.h>
 -40,7
+40,7 
#include <kopete/kopeteprotocol.h>
#include <kopete/kopetemessageevent.h>
-#include <assert.h>
+// crypto stuff
#include <kleo/cryptobackendfactory.h>
#include <kleo/decryptverifyjob.h>
#include <kleo/decryptjob.h>
 -55,7
+55,13 
#include <gpgme++/keylistresult.h>
#include <gpgme++/signingresult.h>
#include <gpgme++/encryptionresult.h>
+#include <gpgme++/key.h>
+// kabc stuff
+#include <kabc/addressbook.h>
+#include <kopete/kabcpersistence.h>
+
+// our own stuff
#include "cryptographyplugin.h"
#include "cryptographyselectuserkey.h"
#include "cryptographyguiclient.h"
 -93,6
+99,7 
actionCollection()->addAction ( "exportKey",
action );
connect ( action, SIGNAL ( triggered ( bool ) ), this,
SLOT ( slotExportSelectedMetaContactKeys() ) );
connect ( Kopete::ContactList::self() , SIGNAL (
metaContactSelected ( bool ) ) , action , SLOT ( setEnabled
( bool ) ) );
+ action->setEnabled (
Kopete::ContactList::self()->selectedMetaContacts().count
() == 1 );
setXMLFile ( "cryptographyui.rc" );
 -113,7
+120,7 
mPluginStatic = 0L;
}
-// just like ::self(). runturn pointer to singleton
+// just like ::self(). return pointer to singleton
CryptographyPlugin* CryptographyPlugin::plugin()
{
return mPluginStatic ;
 -133,15
+140,16 
// launch a crypto job, and store it with the message, so
that when the job finishes, we know what message it was for
const Kleo::CryptoBackendFactory *cpf =
Kleo::CryptoBackendFactory::instance();
- assert ( cpf );
+ Q_ASSERT (cpf);
const Kleo::CryptoBackend::Protocol *proto =
cpf->openpgp();
- assert ( proto );
+ Q_ASSERT (proto);
Kleo: ecryptVe
rifyJob * decryptVerifyJob = proto->decryptVerifyJob();
connect ( decryptVerifyJob, SIGNAL ( result ( const
GpgME: ecryptio
nResult &, const GpgME::VerificationResult &, const
QByteArray & ) ), this, SLOT (
slotIncomingMessageContinued ( const GpgME: ecryptio
nResult &, const GpgME::VerificationResult &, const
QByteArray & ) ) );
mCurrentJobs.insert ( decryptVerifyJob, msg );
decryptVerifyJob->start ( body.toLatin1() );
+ // message is no longer needed, it is killed. We will see
it again when the crypto job is done and it comes out of
mCurrentJobs
messageEvent->discard();
}
 -157,15
+165,15 
// if was signed *and* encrypted, this will be true
if ( verificationResult.signatures().size() ) {
if ( decryptionResult.numRecipients() >= 1 )
- finalizeMessage ( msg, body, verificationResult, true
);
+ finalizeMessage ( msg, body, verificationResult,
true/*encrytped*/ );
}
// was not signed *and* encrypted, may be one or the
other. launch a job to see about both possibilities
else {
const Kleo::CryptoBackendFactory *cpf =
Kleo::CryptoBackendFactory::instance();
- assert ( cpf );
+ Q_ASSERT ( cpf );
const Kleo::CryptoBackend::Protocol *proto =
cpf->openpgp();
- assert ( proto );
+ Q_ASSERT ( proto );
Kleo: ecryptJo
b * decryptJob = proto->decryptJob();
connect ( decryptJob, SIGNAL ( result ( const GpgME: ecryptio
nResult &, const QByteArray & ) ), this, SLOT (
slotIncomingEncryptedMessageContinued ( const GpgME: ecryptio
nResult &, const QByteArray & ) ) );
 -191,7
+199,7 
if ( !body.isEmpty() )
{
if ( decryptionResult.numRecipients() >= 1 )
- finalizeMessage ( msg, body,
GpgME::VerificationResult(), true );
+ finalizeMessage ( msg, body,
GpgME::VerificationResult(), true/*encrypted*/ );
}
}
 -204,7
+212,7 
QString body = plainText;
if ( ( !body.isEmpty() ) && (
verificationResult.signatures().size() ) )
- finalizeMessage ( msg, body, verificationResult, false );
+ finalizeMessage ( msg, body, verificationResult,
false/*encrypted*/ );
}
// apply signature icons and put message in chat window
 -256,15
+264,15 
kDebug ( 14303 ) << ( signing ? "signing"
: "" ) << ( encrypting ?
"encrypting" : "" ) <<
"message " << msg.plainBody();
const Kleo::CryptoBackendFactory *cpf =
Kleo::CryptoBackendFactory::instance();
- assert ( cpf );
+ Q_ASSERT ( cpf );
const Kleo::CryptoBackend::Protocol *proto =
cpf->openpgp();
- assert ( proto );
+ Q_ASSERT ( proto );
// create std::vector with list of signing keys (really
just the one the user has set)
if ( signing )
{
Kleo::KeyListJob * listJob = proto->keyListJob();
- listJob->exec ( QStringList (
CryptographyConfig::self()->fingerprint() ), true,
signingKeys );
+ listJob->exec ( QStringList (
CryptographyConfig::self()->fingerprint() ),
true/*secretOnly*/, signingKeys );
}
// create QStringList of recpients' keys, then convert
that (using a KeyListJob) into a std::vector
 -280,24
+288,24 
// encrypt to self so we can decrypt during
slotIncomingMessage()
encryptingKeysPattern.append (
CryptographyConfig::self()->fingerprint() );
Kleo::KeyListJob * listJob = proto->keyListJob();
- listJob->exec ( encryptingKeysPattern, false,
encryptingKeys );
+ listJob->exec ( encryptingKeysPattern,
false/*secretOnly*/, encryptingKeys );
}
// do both signing and encrypting at once
if ( signing && encrypting )
{
- Kleo::SignEncryptJob * job = proto->signEncryptJob (
true );
+ Kleo::SignEncryptJob * job = proto->signEncryptJob (
true/*armor*/ );
job->exec ( signingKeys, encryptingKeys,
msg.plainBody().toLatin1(), true, result );
}
// sign message body
else if ( signing )
{
- Kleo::SignJob * job = proto->signJob ( true );
+ Kleo::SignJob * job = proto->signJob ( true/*armor*/
);
job->exec ( signingKeys, msg.plainBody().toLatin1(),
GpgME::NormalSignatureMode, result );
}
// encrypt message body to all recipients
else if ( encrypting )
{
- Kleo::EncryptJob * job = proto->encryptJob ( true );
+ Kleo::EncryptJob * job = proto->encryptJob (
true/*armor*/ );
job->exec ( encryptingKeys,
msg.plainBody().toLatin1(), true, result );
}
---
trunk/extragear/network/kopete-cryptography/cryptographypref
erences.cpp #734821:734822
 -21,7
+21,8 
#include <QVBoxLayout>
#include <klineedit.h>
-#include <kgenericfactory.h>
+#include <kpluginfactory.h>
+#include <klocale.h>
#include <kleo/ui/keyrequester.h>
#include "cryptographypreferences.h"
 -36,20
+37,24 
CryptographyPreferences::CryptographyPreferences ( QWidget
*parent, const QVariantList &args )
: KCModule (
CryptographyPreferencesFactory::componentData(), parent,
args )
{
+ setButtons ( Help | Apply | Default );
+
// Add actual widget generated from ui file.
QVBoxLayout* l = new QVBoxLayout ( this );
- QHBoxLayout* keyLayout = new QHBoxLayout ( this );
+ QHBoxLayout* keyLayout = new QHBoxLayout ( 0 );
QLabel * keyLabel = new QLabel ( i18n ( "Private Key:
" ), this );
- key = new Kleo::EncryptionKeyRequester ( false,
Kleo::EncryptionKeyRequester::OpenPGP, this, true, true );
+
+ key = new Kleo::EncryptionKeyRequester (
false/*multipleKeys*/,
Kleo::EncryptionKeyRequester::OpenPGP, this,
true/*onlyTrusted*/, true/*onlyValid*/ );
key->setDialogMessage ( i18n ( "Select the key you
want to use to sign and encrypt messages" ) );
key->setDialogCaption ( i18n ( "Select the key you
want to use to sign and encrypt messages" ) );
key->setToolTip ( i18n ( "The private key used for
decryption and signing" ) );
- key->setWhatsThis ( i18n ( "See and change the
private key used for signing and encrypting messages using
the Cryptography plugin" ) );
+ key->setWhatsThis ( i18n ( "View and change the
private key used for signing and encrypting messages using
the Cryptography plugin" ) );
- QLabel * label = new QLabel ( i18n ( "Before you can
send encrypted messages to someone, you must select their
public key by right-clicking on their name in your contact
list, and choose "Select Public Key".nn Before
you can sign messages, you must select a private key.nn
All messages become plain text when sent with this
plugin." ), this );
+ QLabel * label = new QLabel ( i18n ( "Before you can
sign messages or receive encrypted ones, you must select a
private key for yourself.nnBefore you can send encrypted
messages to someone, you must select their public key by
right-clicking on their name in your contact list and
choosing "Select Public Key"."), this );
label->setWordWrap ( true );
+ keyLabel->setBuddy( key );
keyLayout->addWidget ( keyLabel );
keyLayout->addWidget ( key );
l->addLayout ( keyLayout );
---
trunk/extragear/network/kopete-cryptography/cryptographysele
ctuserkey.cpp #734821:734822
 -46,7
+46,7 
QWidget *w = new QWidget ( this );
QLabel * label = new QLabel ( w );
- m_KeyEdit = new Kleo::EncryptionKeyRequester ( false,
Kleo::EncryptionKeyRequester::OpenPGP, w, false, true );
+ m_KeyEdit = new Kleo::EncryptionKeyRequester (
false/*multipleKeys*/,
Kleo::EncryptionKeyRequester::OpenPGP, w,
false/*onlyTrusted*/, true/*onlyValid*/ );
m_KeyEdit->setDialogMessage ( i18n ( "Select the
key you want to use encrypt messages to the recipient"
) );
m_KeyEdit->setDialogCaption ( i18n ( "Select the
key you want to use encrypt messages to the recipient"
) );
setMainWidget ( w );
---
trunk/extragear/network/kopete-cryptography/kopete_cryptogra
phy.desktop #734821:734822
 -17,6
+17,6 
Name=Cryptography
Name[nds]=Verslöteln
Name[sv]=Kryptering
-Comment=Encrypt and decrypt messages with OpenPGP
+Comment=Encrypts and signs messages using OpenPGP
Comment[nds]=Narichten mit GPG ver- un opslöteln
Comment[sv]=Kryptera och avkoda meddelanden med GPG
---
trunk/extragear/network/kopete-cryptography/kopete_cryptogra
phy_config.desktop #734821:734822
 -12,7
+12,7 
Name=Cryptography
Name[nds]=Verslöteln
Name[sv]=Kryptering
-Comment=Encrypts messages using OpenPGP
+Comment=Encrypts and signs messages using OpenPGP
Comment[nds]=Verslötelt Narichten mit PGP
Comment[sv]=Krypterar meddelanden med användning av PGP
-
+DocPath=kopete/plugins/cryptography/index.html#cryptography
-summary
_______________________________________________
kde-docbook mailing list
kde-docbook kde.org
htt
ps://mail.kde.org/mailman/listinfo/kde-docbook
|