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

Contents of /trunk/Src/wptKeyImportStatusDlg.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 32 - (show annotations)
Mon Oct 24 08:03:48 2005 UTC (19 years, 4 months ago) by twoaday
File size: 2824 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 /* wptKeyImportStatusDlg.cpp - Key Import status dialog
2 * Copyright (C) 2002, 2003, 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 #include <windows.h>
23
24 #include "../resource.h"
25 #include "wptW32API.h"
26 #include "wptGPG.h"
27 #include "wptCommonCtl.h"
28 #include "wptContext.h"
29 #include "wptDlgs.h"
30 #include "wptNLS.h"
31 #include "wptTypes.h"
32
33
34 /* Dialog procedure to display key import statistics. */
35 BOOL CALLBACK
36 import_status_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)
37 {
38 static gpgme_import_result_t res;
39
40 switch (msg) {
41 case WM_INITDIALOG:
42 res = (gpgme_import_result_t)lparam;
43 if (!res)
44 dlg_fatal_error (dlg, "Could not get dialog param");
45 SetDlgItemInt (dlg, IDC_IMPSTAT_NPKEYS, res->considered, FALSE);
46 SetDlgItemInt (dlg, IDC_IMPSTAT_IPKEYS, res->imported, FALSE);
47 SetDlgItemInt (dlg, IDC_IMPSTAT_NSKEYS, res->secret_read, FALSE);
48 SetDlgItemInt (dlg, IDC_IMPSTAT_ISKEYS, res->secret_imported, FALSE);
49 SetDlgItemInt (dlg, IDC_IMPSTAT_NREV, res->new_revocations, FALSE);
50 SetDlgItemInt (dlg, IDC_IMPSTAT_NOUID, res->no_user_id, FALSE);
51 SetDlgItemInt (dlg, IDC_IMPSTAT_NUID, res->new_user_ids, FALSE);
52 SetDlgItemInt (dlg, IDC_IMPSTAT_NSUBK, res->new_sub_keys, FALSE);
53 SetDlgItemInt (dlg, IDC_IMPSTAT_NSIG, res->new_signatures, FALSE);
54 if (res->new_revocations > 0)
55 SetDlgItemText (dlg, IDC_IMPSTAT_INFO, _("Revocation certifcate(s) imported."));
56 else if (res->secret_imported > 0)
57 SetDlgItemText (dlg, IDC_IMPSTAT_INFO, _("Secret key(s) imported."));
58 else if(res->imported == 0
59 && res->secret_imported == 0
60 && res->new_user_ids == 0
61 && res->new_sub_keys == 0
62 && res->new_signatures == 0)
63 SetDlgItemText (dlg, IDC_IMPSTAT_INFO, _("No keys updated."));
64 SetWindowText (dlg, _("Key Import Statistics"));
65 center_window (dlg, NULL);
66 SetForegroundWindow (dlg);
67 return TRUE;
68
69 case WM_COMMAND:
70 switch (LOWORD (wparam)) {
71 case IDOK:
72 EndDialog (dlg, TRUE);
73 break;
74 }
75 break;
76 }
77
78 return FALSE;
79 }

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26