Summary: | enable/disable encryption per message | ||
---|---|---|---|
Product: | [Unmaintained] kopete | Reporter: | Maik Schulz <list> |
Component: | Cryptography Plugin | Assignee: | Kopete Developers <kopete-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Maik Schulz
2003-02-16 22:58:08 UTC
how to do that? since KMM are deleted on every chat closes: i can eventualy add a flag for each contacts I could imagine another keyboard shortcut: Send Message Encrypted and a corresponding toolbar button (e.g. a key) which is either pressed (encryption on) or raised (encryption on). Is that reasonable? Thanks, -Maik I'd like to see this as well. I'm coming from using PSI which has this functionality... next to the "send" button there is a little "toggle" button which shows a lock that is either open or closed depending on whether or not encryption is being applied. Could be done... But not for KDE 3.2 (i18n frezee) CVS commit by ogoffart: Add the availibity to toggle encryption on/off CCMAIL: 54743-done@bugs.kde.org A cryptographychatui.rc 1.1 A cryptographyguiclient.cpp 1.1 [GPL (v2+)] A cryptographyguiclient.h 1.1 [GPL (v2+)] M +4 -1 Makefile.am 1.16 M +25 -2 cryptographyplugin.cpp 1.44 M +3 -1 cryptographyplugin.h 1.14 --- kdenetwork/kopete/plugins/cryptography/Makefile.am #1.15:1.16 @@ -5,5 +5,5 @@ kde_module_LTLIBRARIES = kopete_cryptography.la kcm_kopete_cryptography.la -kopete_cryptography_la_SOURCES = cryptographyplugin.cpp kgpginterface.cpp cryptographyselectuserkey.cpp cryptographyuserkey_ui.ui popuppublic.cpp kgpgselkey.cpp +kopete_cryptography_la_SOURCES = cryptographyplugin.cpp kgpginterface.cpp cryptographyguiclient.cpp cryptographyselectuserkey.cpp cryptographyuserkey_ui.ui popuppublic.cpp kgpgselkey.cpp kopete_cryptography_la_LDFLAGS = -module -no-undefined $(KDE_PLUGIN) kopete_cryptography_la_LIBADD = ../../libkopete/libkopete.la @@ -22,2 +22,5 @@ mydata_DATA = cryptographyui.rc +mydata2dir = $(kde_datadir)/kopete +mydata2_DATA = cryptographychatui.rc + --- kdenetwork/kopete/plugins/cryptography/cryptographyplugin.cpp #1.43:1.44 @@ -3,5 +3,5 @@ ------------------- begin : jeu nov 14 2002 - copyright : (C) 2002 by Olivier Goffart + copyright : (C) 2002-2004 by Olivier Goffart email : ogoffart@tiscalinet.be ***************************************************************************/ @@ -32,4 +32,5 @@ #include "cryptographyplugin.h" #include "cryptographyselectuserkey.h" +#include "cryptographyguiclient.h" #include "kgpginterface.h" @@ -65,4 +66,14 @@ CryptographyPlugin::CryptographyPlugin( loadSettings(); connect(this, SIGNAL(settingsChanged()), this, SLOT( loadSettings() ) ); + + connect( KopeteMessageManagerFactory::factory(), SIGNAL( messageManagerCreated( KopeteMessageManager * )) , SLOT( slotNewKMM( KopeteMessageManager * ) ) ); + //Add GUI action to all already existing kmm (if the plugin is launched when kopete already rining) + QIntDict<KopeteMessageManager> sessions = KopeteMessageManagerFactory::factory()->sessions(); + QIntDictIterator<KopeteMessageManager> it( sessions ); + for ( ; it.current() ; ++it ) + { + slotNewKMM(it.current()); + } + } @@ -214,8 +225,12 @@ void CryptographyPlugin::slotOutgoingMes QString tmpKey; if( c->metaContact() ) + { + if(c->metaContact()->pluginData( this, "encrypt_messages" ) == "off" ) + return; tmpKey = c->metaContact()->pluginData( this, "gpgKey" ); + } if( tmpKey.isEmpty() ) { - kdDebug( 14303 ) << "CryptographyPlugin::slotOutgoingMessage: no key selected for one contact" <<endl; + // kdDebug( 14303 ) << "CryptographyPlugin::slotOutgoingMessage: no key selected for one contact" <<endl; return; } @@ -286,4 +301,12 @@ void CryptographyPlugin::slotForgetCache } +void CryptographyPlugin::slotNewKMM(KopeteMessageManager *KMM) +{ + connect(this , SIGNAL( destroyed(QObject*)) , + new CryptographyGUIClient(KMM) , SLOT(deleteLater())); +} + + + #include "cryptographyplugin.moc" --- kdenetwork/kopete/plugins/cryptography/cryptographyplugin.h #1.13:1.14 @@ -3,5 +3,5 @@ ------------------- begin : jeu nov 14 2002 - copyright : (C) 2002 by Olivier Goffart + copyright : (C) 2002-2004 by Olivier Goffart email : ogoffart@tiscalinet.be ***************************************************************************/ @@ -66,4 +66,6 @@ private slots: void loadSettings(); + void slotNewKMM(KopeteMessageManager *); + private: static CryptographyPlugin* pluginStatic_; |