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

Diff of /trunk/Src/wptKeyCacheDlg.cpp

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

revision 47 by werner, Mon Oct 31 14:04:59 2005 UTC revision 217 by twoaday, Mon May 22 14:21:39 2006 UTC
# Line 1  Line 1 
1  /* wptKeyCacheDlg.cpp - Key caching dialog  /* wptKeyCacheDlg.cpp - Key caching dialog
2   *      Copyright (C) 2000-2005 Timo Schulz   *      Copyright (C) 2000-2006 Timo Schulz
3   *      Copyright (C) 2005 g10 Code GmbH   *      Copyright (C) 2005, 2006 g10 Code GmbH
4   *   *
5   * This file is part of WinPT.   * This file is part of WinPT.
6   *   *
# Line 18  Line 18 
18   * along with WinPT; if not, write to the Free Software Foundation,   * along with WinPT; if not, write to the Free Software Foundation,
19   * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA   * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
20   */   */
   
21  #ifdef HAVE_CONFIG_H  #ifdef HAVE_CONFIG_H
22  #include <config.h>  #include <config.h>
23  #endif  #endif
24    
25  #include <windows.h>  #include <windows.h>
 #include <windows.h>  
26    
27  #include "resource.h"  #include "resource.h"
28  #include "wptNLS.h"  #include "wptNLS.h"
# Line 33  Line 31 
31  #include "wptW32API.h"  #include "wptW32API.h"
32  #include "wptVersion.h"  #include "wptVersion.h"
33    
34    
35    
36  /* Dialog box procedure for starting the key cache procedure.  /* Dialog box procedure for starting the key cache procedure.
37     Actually this dialog is hidden and just kick off the real     Actually this dialog is hidden and just kick off the real
38     caching process. */     caching process. */
39  BOOL CALLBACK  BOOL CALLBACK
40  keycache_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)  keycache_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)
41  {  {
42      gpgme_error_t err;      gpgme_error_t err = 0;
43      refresh_cache_s * rcs;      refresh_cache_s *rcs;
44      char * pubring = NULL, * secring = NULL;      char *pubring, *secring;
45            
46      switch( msg ) {      switch (msg) {
47      case WM_INITDIALOG:      case WM_INITDIALOG:
48          rcs = (refresh_cache_s *)lparam;          rcs = (refresh_cache_s *)lparam;
49          if (!rcs)          if (!rcs)
# Line 51  keycache_dlg_proc (HWND dlg, UINT msg, W Line 51  keycache_dlg_proc (HWND dlg, UINT msg, W
51          SetForegroundWindow (dlg);          SetForegroundWindow (dlg);
52          ShowWindow (dlg, SW_HIDE);          ShowWindow (dlg, SW_HIDE);
53          center_window (dlg, NULL);          center_window (dlg, NULL);
         #ifndef LANG_DE  
54          SetWindowText (dlg, _("WinPT Key Caching"));          SetWindowText (dlg, _("WinPT Key Caching"));
         #endif  
55          ShowWindow (GetDlgItem (dlg, IDC_KEYCACHE_INFO), SW_SHOW);          ShowWindow (GetDlgItem (dlg, IDC_KEYCACHE_INFO), SW_SHOW);
56          SetDlgItemText (dlg, IDC_KEYCACHE_INFO,          SetDlgItemText (dlg, IDC_KEYCACHE_INFO,
57                          _("Caching keyrings, please wait..."));                          _("Caching keyrings, please wait..."));
# Line 66  keycache_dlg_proc (HWND dlg, UINT msg, W Line 64  keycache_dlg_proc (HWND dlg, UINT msg, W
64              BUG (0);              BUG (0);
65          if (rcs->tr_update)          if (rcs->tr_update)
66              gpg_rebuild_cache (NULL);              gpg_rebuild_cache (NULL);
67          if (rcs->kr_update) {          if (rcs->kr_update)
             keycache_set_reload (rcs->kr_reload);  
68              err = keycache_init (pubring, secring);              err = keycache_init (pubring, secring);
             if (err)  
                 msg_box (dlg, gpgme_strerror (err), _("Key Cache"), MB_ERR);  
         }  
69          free_if_alloc (pubring);          free_if_alloc (pubring);
70          free_if_alloc (secring);          free_if_alloc (secring);
71          EndDialog (dlg, TRUE);          if (err) {
72                msg_box (dlg, gpgme_strerror (err), _("Key Cache"), MB_ERR);
73                EndDialog (dlg, 1);
74            }
75            else
76                EndDialog (dlg, 0);
77          return FALSE;          return FALSE;
78      }      }
79            

Legend:
Removed from v.47  
changed lines
  Added in v.217

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26