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

Annotation of /trunk/Src/wptKeyCacheDlg.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 85 - (hide annotations)
Fri Nov 18 07:20:40 2005 UTC (19 years, 3 months ago) by twoaday
File size: 2396 byte(s)
2005-11-17  Timo Schulz  <ts@g10code.com>
 
        * wptGPG.cpp (check_last_gnupg_access): Kludge to avoid that
        the cache will be loaded twice.
        * wptRegistry.cpp (regist_inst_winpt): More comments.
        * wptKeyManagerDlg.cpp (do_center_window): Make sure that
        neg. coordinates are never used.
        * wptClipVerifyDlg.cpp (clip_verify_dlg_proc): Localize all
        strings.
        * wptPassphraseCB.cpp (passphrase_callback_proc): Likewise.
        * wptFileManagerDlg.cpp (filemanager_dlg_proc): Localize menu
        and save 'AlwaysOnTop' in the registry.
         

1 werner 36 /* wptKeyCacheDlg.cpp - Key caching dialog
2     * Copyright (C) 2000-2005 Timo Schulz
3     * Copyright (C) 2005 g10 Code GmbH
4     *
5     * This file is part of WinPT.
6     *
7     * WinPT is free software; you can redistribute it and/or modify
8     * it under the terms of the GNU General Public License as published by
9     * the Free Software Foundation; either version 2 of the License, or
10     * (at your option) any later version.
11     *
12     * WinPT is distributed in the hope that it will be useful,
13     * but WITHOUT ANY WARRANTY; without even the implied warranty of
14     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15     * GNU General Public License for more details.
16     *
17     * You should have received a copy of the GNU General Public License
18     * along with WinPT; if not, write to the Free Software Foundation,
19     * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
20     */
21    
22     #ifdef HAVE_CONFIG_H
23     #include <config.h>
24     #endif
25    
26     #include <windows.h>
27    
28 werner 47 #include "resource.h"
29 werner 36 #include "wptNLS.h"
30     #include "wptGPG.h"
31     #include "wptTypes.h"
32     #include "wptW32API.h"
33     #include "wptVersion.h"
34    
35     /* Dialog box procedure for starting the key cache procedure.
36     Actually this dialog is hidden and just kick off the real
37     caching process. */
38     BOOL CALLBACK
39     keycache_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)
40     {
41     gpgme_error_t err;
42     refresh_cache_s * rcs;
43     char * pubring = NULL, * secring = NULL;
44    
45     switch( msg ) {
46     case WM_INITDIALOG:
47     rcs = (refresh_cache_s *)lparam;
48     if (!rcs)
49     BUG (NULL);
50     SetForegroundWindow (dlg);
51     ShowWindow (dlg, SW_HIDE);
52     center_window (dlg, NULL);
53     SetWindowText (dlg, _("WinPT Key Caching"));
54     ShowWindow (GetDlgItem (dlg, IDC_KEYCACHE_INFO), SW_SHOW);
55     SetDlgItemText (dlg, IDC_KEYCACHE_INFO,
56     _("Caching keyrings, please wait..."));
57    
58     pubring = get_gnupg_keyring (1, NO_STRICT);
59     if (!pubring)
60     BUG (0);
61     secring = get_gnupg_keyring (0, NO_STRICT);
62     if (!secring)
63     BUG (0);
64     if (rcs->tr_update)
65     gpg_rebuild_cache (NULL);
66     if (rcs->kr_update) {
67     keycache_set_reload (rcs->kr_reload);
68     err = keycache_init (pubring, secring);
69     if (err)
70     msg_box (dlg, gpgme_strerror (err), _("Key Cache"), MB_ERR);
71     }
72     free_if_alloc (pubring);
73     free_if_alloc (secring);
74     EndDialog (dlg, TRUE);
75     return FALSE;
76     }
77    
78     return FALSE;
79     }

Properties

Name Value
svn:eol-style native

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26