------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=126639         
           Summary: Ask for passphrase at startup (a patch)
           Product: kopete
           Version: unspecified
          Platform: Gentoo Packages
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: wishlist
          Priority: NOR
         Component: general
        AssignedTo: kopete-devel kde org
        ReportedBy: gregor podnapisi net


Version:            (using KDE KDE 3.5.2)
Installed from:    Gentoo Packages

I made a patch to crypto plugin. It asks you for the passphrase at the startup 
so when someone starts the conversation with you, you don't get 3-inf opened 
passphrase dialogs. The patch could be updated :P

It's tested under 0.11.1 but should work with the 0.12. (I looked and both 
cryptoplugin.cpp files are the same...)

The patch:

--- cryptographyplugin.cpp      2006-04-14 18:19:41.000000000 +0200
+++ cryptographyplugin.cpp.new  2006-05-02 22:09:30.000000000 +0200
 @ -25,6 +25,8  @
 #include <kgenericfactory.h>
 #include <kdeversion.h>
 #include <kaboutdata.h>
+#include <kpassdlg.h>
+#include <kmessagebox.h>

 #include "kopetemetacontact.h"
 #include "kopetecontactlist.h"
 @ -84,6 +86,22  @
                slotNewKMM(*it);
        }

+       QCString password = cachedPass();
+       bool passphraseHandling = CryptographyPlugin::passphraseHandling();
+
+       if(passphraseHandling && password.isNull())
+                {
+                        /// pipe for passphrase
+                        QString passdlg=i18n("Enter passphrase:");
+
+                        /// pipe for passphrase
+                        int 
code=KPasswordDialog::getPassword(password,passdlg);
+                        if (code==QDialog::Accepted)
+                          CryptographyPlugin::setCachedPass(password);
+                       else
+                         KMessageBox::error(0, i18n("Passphrase is invalid!"));
+                }
+
 }
_______________________________________________
kopete-devel mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kopete-devel

Reply via email to