77 |
msg_box( dlg, _("Please enter a filename."), _("Save Plaintext"), MB_INFO ); |
msg_box( dlg, _("Please enter a filename."), _("Save Plaintext"), MB_INFO ); |
78 |
return FALSE; |
return FALSE; |
79 |
} |
} |
80 |
err = gpgme_data_new_from_clipboard (&sig); |
err = gpg_data_new_from_clipboard (&sig, 0); |
81 |
if( err ) { |
if( err ) { |
82 |
msg_box( dlg, winpt_strerror( WPTERR_CLIP_GET ), _("Save Plaintext"), MB_ERR ); |
msg_box( dlg, winpt_strerror( WPTERR_CLIP_GET ), _("Save Plaintext"), MB_ERR ); |
83 |
return FALSE; |
return FALSE; |
84 |
} |
} |
85 |
gpgme_data_extract_plaintext( sig, &plain ); |
gpg_data_extract_plaintext( sig, &plain ); |
86 |
gpgme_data_release_and_set_file( plain, file ); |
gpg_data_release_and_set_file( plain, file ); |
87 |
gpgme_data_release( sig ); |
gpgme_data_release( sig ); |
88 |
msg_box( dlg, _("Finished"), _("Save Plaintext"), MB_OK ); |
msg_box( dlg, _("Finished"), _("Save Plaintext"), MB_OK ); |
89 |
} |
} |
92 |
msg_box( dlg, winpt_strerror( WPTERR_CLIP_ISEMPTY ), _("Save Plaintext"), MB_ERR ); |
msg_box( dlg, winpt_strerror( WPTERR_CLIP_ISEMPTY ), _("Save Plaintext"), MB_ERR ); |
93 |
return FALSE; |
return FALSE; |
94 |
} |
} |
95 |
err = gpgme_data_new_from_clipboard (&sig); |
err = gpg_data_new_from_clipboard (&sig, 0); |
96 |
if( err ) { |
if( err ) { |
97 |
msg_box( dlg, winpt_strerror( WPTERR_CLIP_GET ), _("Save Plaintext"), MB_ERR ); |
msg_box( dlg, winpt_strerror( WPTERR_CLIP_GET ), _("Save Plaintext"), MB_ERR ); |
98 |
return FALSE; |
return FALSE; |
99 |
} |
} |
100 |
gpgme_data_extract_plaintext( sig, &plain ); |
gpg_data_extract_plaintext( sig, &plain ); |
101 |
gpgme_data_release_and_set_clipboard( plain ); |
gpg_data_release_and_set_clipboard( plain, 0 ); |
102 |
gpgme_data_release( sig ); |
gpgme_data_release( sig ); |
103 |
msg_box( dlg, _("Finished"), _("Save Plaintext"), MB_OK ); |
msg_box( dlg, _("Finished"), _("Save Plaintext"), MB_OK ); |
104 |
} |
} |