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

Diff of /trunk/Src/wptMainProc.cpp

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

revision 193 by twoaday, Sat Apr 1 12:36:35 2006 UTC revision 225 by twoaday, Tue Jun 6 13:37:59 2006 UTC
# Line 242  clip_gpg_dlg (HWND hwnd, UINT id) Line 242  clip_gpg_dlg (HWND hwnd, UINT id)
242              text_input_s input;              text_input_s input;
243              gpgme_data_t sig;              gpgme_data_t sig;
244                            
245              memset( &input, 0, sizeof (input) );              memset (&input, 0, sizeof (input));
246              err = gpg_data_new_from_clipboard (&sig, 0);              err = gpg_data_new_from_clipboard (&sig, 0);
247              if( err ) {              if (err) {
248                  msg_box( hwnd, gpgme_strerror( err ),_("Verify"), MB_ERR );                  msg_box (hwnd, gpgme_strerror( err ),_("Verify"), MB_ERR);
249                  return;                  return;
250              }              }
251              input.type = 0;              input.type = 0;
252              dialog_box_param( glob_hinst, (LPCSTR)IDD_WINPT_TEXT, hwnd,              dialog_box_param (glob_hinst, (LPCSTR)IDD_WINPT_TEXT, hwnd,
253                               text_input_dlg_proc, (LPARAM)&input,                                text_input_dlg_proc, (LPARAM)&input,
254                               _("Text Input"), IDS_WINPT_TEXT );                                _("Text Input"), IDS_WINPT_TEXT);
255                            
256              gpg_data_release_and_set_clipboard( sig, 0 );              /* the dialog might have changed the clipboard, so we restore
257              if( input.length ) {                 the original state (again). */
258                  dialog_box_param( glob_hinst, (LPCSTR)IDD_WINPT_VERIFY, hwnd,              gpg_data_release_and_set_clipboard (sig, 0);
259                                   clip_verify_dlg_proc, (LPARAM)&input,              if (input.length > 0) {
260                                   _("Verify"), IDS_WINPT_VERIFY );                  dialog_box_param (glob_hinst, (LPCSTR)IDD_WINPT_VERIFY, hwnd,
261                                      clip_verify_dlg_proc, (LPARAM)&input,
262                                      _("Verify"), IDS_WINPT_VERIFY);
263                  input.length = 0;                  input.length = 0;
264                  free_if_alloc( input.data );                  free_if_alloc (input.data);
265              }              }
266          }          }
267          else if (type & PGP_CLEARSIG) {          else if (type & PGP_CLEARSIG) {
# Line 275  clip_gpg_dlg (HWND hwnd, UINT id) Line 277  clip_gpg_dlg (HWND hwnd, UINT id)
277  }  }
278    
279    
 static bool  
 secret_key_available (void)  
 {  
     gpg_keycache_t sec = keycache_get_ctx (0);  
     if (!sec || gpg_keycache_get_size (sec) == 0)  
         return false;  
     return true;  
 }  
   
   
280  /* Load the Card Manager with the current card. */  /* Load the Card Manager with the current card. */
281  static void  static void
282  load_card_manager (void)  load_card_manager (void)
# Line 373  winpt_main_proc (HWND hwnd, UINT msg, WP Line 365  winpt_main_proc (HWND hwnd, UINT msg, WP
365          mapi_deinit ();          mapi_deinit ();
366          wsock_end ();                  wsock_end ();        
367          keycache_release (1);          keycache_release (1);
368          gnupg_backup_keyrings ();          gnupg_backup_keyrings (reg_prefs.auto_backup,
369                                    reg_prefs.backup.mode,
370                                    reg_prefs.backup.include_secr);
371          free_reg_prefs ();          free_reg_prefs ();
372          free_gnupg_table ();          free_gnupg_table ();
373          hotkeys_unregister (hwnd);          hotkeys_unregister (hwnd);

Legend:
Removed from v.193  
changed lines
  Added in v.225

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26