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

Annotation of /trunk/Src/wptFirstRunDlg.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 22 - (hide annotations)
Wed Aug 10 11:33:35 2005 UTC (19 years, 6 months ago) by twoaday
File size: 2093 byte(s)
2005-08-06  Timo Schulz  <twoaday@freakmail.de>
 
        * wptGPGME.cpp (keycache_update): Reload OpenPGP parts
        of the secret key.
        (keycache_init): cache name of secret keyring.
        * wptKeyList.cpp (keylist_upd_key): Do not add long keyid.
        (get_key_type): Do not assume 'ultimate' means key pair.
        * wptKeyEditDlgs.cpp (diff_time): New.
        (keyedit_addsubkey_dlg_proc): Changed design and use
        diff_time. Drop checks for invalid keylength (< 1024, > 4096)
        because the combo box automatically handles this.
        * wptKeyManager.cpp (km_set_implicit_trust): Return error code.
        * wptGPG.cpp (get_backup_name): New.
        (gnupg_backup_keyrings): Rotate backup names, from 0..3.
        * wptClipImportDialog.cpp (clip_import_dlg_proc): Free memory.
        * wptKeyManagerDlg.cpp (keymanager_dlg_proc): Use 0x short keyid and
        not the long keyid.


1 twoaday 2 /* wptFirstRunDlg.cpp - Welcome dialog
2     * Copyright (C) 2002-2005 Timo Schulz
3     *
4     * This file is part of WinPT.
5     *
6     * WinPT is free software; you can redistribute it and/or modify
7     * it under the terms of the GNU General Public License as published by
8     * the Free Software Foundation; either version 2 of the License, or
9     * (at your option) any later version.
10     *
11     * WinPT is distributed in the hope that it will be useful,
12     * but WITHOUT ANY WARRANTY; without even the implied warranty of
13     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14     * GNU General Public License for more details.
15     *
16     * You should have received a copy of the GNU General Public License
17     * along with WinPT; if not, write to the Free Software Foundation,
18     * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
19     */
20    
21     #include <windows.h>
22    
23     #include "../resource.h"
24     #include "wptW32API.h"
25     #include "wptGPG.h"
26     #include "wptTypes.h"
27     #include "wptCommonCtl.h"
28     #include "wptContext.h"
29    
30    
31     BOOL CALLBACK
32     first_run_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)
33     {
34 twoaday 22 static struct first_start_s * ctx;
35 twoaday 2
36     switch (msg) {
37     case WM_INITDIALOG:
38 twoaday 22 ctx = (struct first_start_s *)lparam;
39 twoaday 2 if (!ctx)
40     BUG (0);
41     CheckDlgButton( dlg, IDC_FIRST_KEYGEN, BST_CHECKED );
42     SetDlgItemText (dlg, IDC_FIRST_KEYGEN, _("&Generate a GnuPG key pair"));
43     SetDlgItemText (dlg, IDC_FIRST_IMPORT, _("&Copy GnuPG keyrings from another location"));
44     SetDlgItemText (dlg, IDC_FIRST_SETUP, _("&Specify a new GnuPG home directory"));
45     SetForegroundWindow (dlg);
46     center_window (dlg);
47     return TRUE;
48    
49     case WM_COMMAND:
50     switch (LOWORD (wparam)) {
51     case IDOK:
52     if (IsDlgButtonChecked (dlg, IDC_FIRST_KEYGEN))
53 twoaday 22 ctx->choice = SETUP_KEYGEN;
54 twoaday 2 else if (IsDlgButtonChecked (dlg, IDC_FIRST_IMPORT))
55 twoaday 22 ctx->choice = SETUP_IMPORT;
56 twoaday 2 else
57 twoaday 22 ctx->choice = -1;
58 twoaday 2 EndDialog (dlg, TRUE);
59     break;
60    
61     case IDCANCEL:
62 twoaday 22 ctx->choice = -1;
63 twoaday 2 EndDialog (dlg, FALSE);
64     break;
65     }
66     break;
67     }
68    
69     return FALSE;
70     } /* first_run_dlg_proc */

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26