/[winpt]/trunk/Src/wptGPG.cpp
ViewVC logotype

Diff of /trunk/Src/wptGPG.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 332 by twoaday, Fri Sep 25 16:07:38 2009 UTC revision 333 by twoaday, Tue Oct 13 10:51:21 2009 UTC
# Line 26  Line 26 
26  #include <time.h>  #include <time.h>
27    
28  #include "wptGPG.h"  #include "wptGPG.h"
29    #include "wptGPGME.h"
30  #include "wptGpgCmds.h"  #include "wptGpgCmds.h"
31  #include "wptTypes.h"  #include "wptTypes.h"
32  #include "wptNLS.h"  #include "wptNLS.h"
# Line 875  gnupg_check_homedir (void) Line 876  gnupg_check_homedir (void)
876    
877    
878  int  int
879    gnupg_import_keypair (void)
880    {
881        const char *file;
882        gpgme_error_t err;
883        GPGME gpgme;
884        HWND hwnd = GetDesktopWindow ();
885    
886        file = get_fileopen_dlg (hwnd, _("Please choose your Key Pair"),
887                                 "GPG Key File (*.gpg)\0*.gpg\0"
888                                 "GPG Armored Key File (*.asc)\0*.asc\0\0",
889                                 NULL);
890        if (file == NULL)
891            return WPTERR_FILE_OPEN;
892        err = gpgme.importFromFile (file);
893        if (err)
894            msg_box (hwnd, gpgme_strerror (err), _("WinPT Error"), MB_ERR);
895        else
896            msg_box (hwnd, _("Key pair successfully imported."), "WinPT", MB_OK);
897        return 0;
898    }
899    
900    int
901  gnupg_copy_keyrings (void)  gnupg_copy_keyrings (void)
902  {  {
903      const char *pring, *sring;      const char *pring, *sring;

Legend:
Removed from v.332  
changed lines
  Added in v.333

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26