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

Diff of /trunk/Src/wptKeyManager.cpp

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

revision 33 by twoaday, Tue Oct 25 07:46:20 2005 UTC revision 34 by twoaday, Wed Oct 26 11:20:09 2005 UTC
# Line 496  km_file_import (HWND dlg, const char *fn Line 496  km_file_import (HWND dlg, const char *fn
496      dialog_box_param (glob_hinst, (LPCSTR)IDD_WINPT_IMPORT, dlg,      dialog_box_param (glob_hinst, (LPCSTR)IDD_WINPT_IMPORT, dlg,
497                        file_import_dlg_proc, (LPARAM)&fm_stat,                        file_import_dlg_proc, (LPARAM)&fm_stat,
498                        _("File Import"), IDS_WINPT_IMPORT);                        _("File Import"), IDS_WINPT_IMPORT);
499      if (fm_stat.cancel == 1 ) {      if (fm_stat.cancel == 1) {
500          free_if_alloc (fm_stat.opaque);          free_if_alloc (fm_stat.opaque);
501          return WPTERR_GENERAL;          return WPTERR_GENERAL;
502      }      }
# Line 511  km_file_import (HWND dlg, const char *fn Line 511  km_file_import (HWND dlg, const char *fn
511          goto leave;          goto leave;
512      }      }
513            
514        SetCursor (LoadCursor (NULL, IDC_WAIT));
515      err = gpgme_op_import (ctx, keydata);      err = gpgme_op_import (ctx, keydata);
516        SetCursor (LoadCursor (NULL, IDC_ARROW));
517      if (err) {      if (err) {
518          msg_box (dlg, gpgme_strerror (err), _("Key Manager"), MB_ERR);          msg_box (dlg, gpgme_strerror (err), _("Key Manager"), MB_ERR);
519          goto leave;          goto leave;
# Line 711  km_send_to_mail_recipient( listview_ctrl Line 713  km_send_to_mail_recipient( listview_ctrl
713      strncat (tmp, ".asc", sizeof tmp-200);      strncat (tmp, ".asc", sizeof tmp-200);
714      p = fm_quote_file (tmp);      p = fm_quote_file (tmp);
715    
716      rc = gpgme_recipients_new( &rset );      rc = gpgme_recipients_new (&rset);
717      if( !rc )      if (!rc)
718          rc = gpgme_recipients_add_name( rset, keyid );          rc = gpgme_recipients_add_name (rset, keyid);
719      if( !rc )      if (!rc)
720          rc = gpgme_new( &ctx );          rc = gpgme_new (&ctx);
721      if( !rc ) {      if (!rc) {
722          gpgme_set_armor (ctx, 1);          gpgme_set_armor (ctx, 1);
723          rc = gpgme_op_file_export( ctx, rset, p );          rc = gpgme_op_file_export (ctx, rset, p);
724      }      }
725      if( rc )      if (rc)
726          msg_box( dlg, gpgme_strerror( rc ), _("Key Manager"), MB_ERR );          msg_box (dlg, gpgme_strerror (rc), _("Key Manager"), MB_ERR);
727      else      else
728          mapi_send_pubkey (keyid, tmp);          mapi_send_pubkey (keyid, tmp);
729      free_if_alloc( p );  
730      gpgme_recipients_release( rset );      free_if_alloc (p);
731      gpgme_release( ctx );          gpgme_recipients_release (rset);
732        gpgme_release (ctx);
733      return rc;      return rc;
734  #endif  #endif
735      return 0;      return 0;

Legend:
Removed from v.33  
changed lines
  Added in v.34

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26