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

Annotation of /trunk/Src/wptKeyCacheDlg.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 150 - (hide annotations)
Wed Jan 18 11:52:45 2006 UTC (19 years, 1 month ago) by twoaday
File size: 2357 byte(s)
2006-01-18  Timo Schulz  <ts@g10code.com>
 
        * wptListview.cpp (listview_del_sel_items): Fixed index
        calculation. This fixed a lot of problems with the KM listview
        update.
        (listview_del_all): Renamed to...
        (listview_del_all_items): ..this. Changed all callers.
        * wptKeyManagerDlg.cpp (keymanager_dlg_proc): Just refresh
        list when file import contained new/updated keys.
        * wptKeyManager.cpp (km_file_import): Indicate if the
        import contained any new/update keys.
        * wptClipImportDlg.cpp (print_import_status): Just mark
        keys which actually changed.
         


1 werner 36 /* wptKeyCacheDlg.cpp - Key caching dialog
2 twoaday 150 * Copyright (C) 2000-2006 Timo Schulz
3     * Copyright (C) 2005, 2006 g10 Code GmbH
4 werner 36 *
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     #ifdef HAVE_CONFIG_H
22     #include <config.h>
23     #endif
24    
25     #include <windows.h>
26    
27 werner 47 #include "resource.h"
28 werner 36 #include "wptNLS.h"
29     #include "wptGPG.h"
30     #include "wptTypes.h"
31     #include "wptW32API.h"
32     #include "wptVersion.h"
33    
34     /* Dialog box procedure for starting the key cache procedure.
35     Actually this dialog is hidden and just kick off the real
36     caching process. */
37     BOOL CALLBACK
38     keycache_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)
39     {
40     gpgme_error_t err;
41 twoaday 150 refresh_cache_s *rcs;
42     char *pubring = NULL;
43     char *secring = NULL;
44 werner 36
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     err = keycache_init (pubring, secring);
68     if (err)
69     msg_box (dlg, gpgme_strerror (err), _("Key Cache"), MB_ERR);
70     }
71     free_if_alloc (pubring);
72     free_if_alloc (secring);
73     EndDialog (dlg, TRUE);
74     return FALSE;
75     }
76    
77     return FALSE;
78     }

Properties

Name Value
svn:eol-style native

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26