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

Annotation of /trunk/Src/wptKeyCacheDlg.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 32 - (hide annotations)
Mon Oct 24 08:03:48 2005 UTC (19 years, 4 months ago) by twoaday
File size: 2452 byte(s)
2005-10-23  Timo Schulz  <twoaday@g10code.com>
 
        * wptFileManager.cpp (fm_get_file_type): Detect detached sigs.
        * wptKeyList.cpp (keylist_cmp_cb): Take care of expired/revoked keys.
        (get_ext_validity): New.
        * wptFileVerifyDlg.cpp (file_verify_dlg_proc): Several cleanups.
        * wptClipEditDlg.cpp (load_clipboard): Factored out some code into
        this function.
        (load_clipboard_from_file): Likewise.
        (save_clipboard_to_file): New.
        * wptKeyManagerDlg.cpp (keyprops_dlg_proc): Fix stack overflow.

For complete details, see the ChangeLog files.

1 twoaday 2 /* wptKeyCacheDlg.cpp - Key caching dialog
2     * Copyright (C) 2000-2005 Timo Schulz
3 twoaday 25 * Copyright (C) 2005 g10 Code GmbH
4 twoaday 2 *
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     #include <windows.h>
23    
24     #include "../resource.h"
25     #include "wptNLS.h"
26     #include "wptGPG.h"
27     #include "wptTypes.h"
28     #include "wptW32API.h"
29     #include "wptVersion.h"
30    
31 twoaday 25 /* Dialog box procedure for starting the key cache procedure.
32     Actually this dialog is hidden and just kick off the real
33     caching process. */
34 twoaday 2 BOOL CALLBACK
35     keycache_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)
36     {
37     gpgme_error_t err;
38     refresh_cache_s * rcs;
39     char * pubring = NULL, * secring = NULL;
40    
41     switch( msg ) {
42     case WM_INITDIALOG:
43     rcs = (refresh_cache_s *)lparam;
44     if (!rcs)
45     BUG (NULL);
46     SetForegroundWindow (dlg);
47 twoaday 25 ShowWindow (dlg, SW_HIDE);
48 twoaday 23 center_window (dlg, NULL);
49 twoaday 25 #ifndef LANG_DE
50 twoaday 2 SetWindowText (dlg, _("WinPT Key Caching"));
51 twoaday 25 #endif
52 twoaday 2 ShowWindow (GetDlgItem (dlg, IDC_KEYCACHE_INFO), SW_SHOW);
53 twoaday 32 SetDlgItemText (dlg, IDC_KEYCACHE_INFO,
54     _("Caching keyrings, please wait..."));
55 twoaday 2
56     pubring = get_gnupg_keyring (1, NO_STRICT);
57     if (!pubring)
58     BUG (0);
59     secring = get_gnupg_keyring (0, NO_STRICT);
60     if (!secring)
61     BUG (0);
62     if (rcs->tr_update)
63 twoaday 24 gpg_rebuild_cache (NULL);
64 twoaday 2 if (rcs->kr_update) {
65     keycache_set_reload (rcs->kr_reload);
66     err = keycache_init (pubring, secring);
67     if (err)
68     msg_box (dlg, gpgme_strerror (err), _("Key Cache"), MB_ERR);
69     }
70     free_if_alloc (pubring);
71     free_if_alloc (secring);
72     EndDialog (dlg, TRUE);
73     return FALSE;
74     }
75    
76     return FALSE;
77 twoaday 25 }

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26