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

Annotation of /trunk/Src/wptFirstRunDlg.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 167 - (hide annotations)
Thu Jan 26 10:17:17 2006 UTC (19 years, 1 month ago) by twoaday
File size: 2027 byte(s)
2006-01-25  Timo Schulz  <ts@g10code.com>
 
        * wptRegistry.cpp (get_reg_entry_gpg): Return NULL if
        the key exist with no value.
        * wptMDSumDlg.cpp (mdsum_dlg_proc): Translate string.
        * wptKeysignDlg.cpp (do_fill_seclist): Select the
        default key if possible.
        * wptFirstRunDlg.cpp (firstrun_dlg_proc): Directly
        return the choice.
        * wptKeylist.cpp (get_key_desc): New.
        (keylist_upd_key): Free memory.
        * wptKeyCache.cpp (gpg_keycache_get_default_key): New.
        (gpg_keycache_set_default_key): New.
        * WinPT.cpp (gpg_prefs_ok): New.
        (WinMain): Only start gpg prefs if needed.
         


1 werner 36 /* wptFirstRunDlg.cpp - Welcome dialog
2 twoaday 133 * Copyright (C) 2002-2006 Timo Schulz
3 werner 36 *
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     #ifdef HAVE_CONFIG_H
21     #include <config.h>
22     #endif
23    
24     #include <windows.h>
25    
26 werner 47 #include "resource.h"
27 werner 36 #include "wptW32API.h"
28     #include "wptGPG.h"
29     #include "wptTypes.h"
30     #include "wptCommonCtl.h"
31     #include "wptContext.h"
32    
33    
34 twoaday 105 /* Dialog box procedure which is executed on the first time WinPT
35     is started. */
36 werner 36 BOOL CALLBACK
37     first_run_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)
38     {
39 twoaday 167 int choice = 0;
40 werner 36 switch (msg) {
41     case WM_INITDIALOG:
42     CheckDlgButton( dlg, IDC_FIRST_KEYGEN, BST_CHECKED );
43 twoaday 133 SetDlgItemText (dlg, IDC_FIRST_KEYGEN,
44     _("&Generate a GnuPG key pair"));
45     SetDlgItemText (dlg, IDC_FIRST_IMPORT,
46     _("&Copy GnuPG keyrings from another location"));
47 twoaday 105 SetDlgItemText (dlg, IDCANCEL, _("&Cancel"));
48 twoaday 133 SetWindowText (dlg, _("WinPT First Start"));
49 werner 36 SetForegroundWindow (dlg);
50     center_window (dlg, NULL);
51     return TRUE;
52    
53     case WM_COMMAND:
54     switch (LOWORD (wparam)) {
55     case IDOK:
56     if (IsDlgButtonChecked (dlg, IDC_FIRST_KEYGEN))
57 twoaday 167 choice = SETUP_KEYGEN;
58 werner 36 else if (IsDlgButtonChecked (dlg, IDC_FIRST_IMPORT))
59 twoaday 167 choice = SETUP_IMPORT;
60 werner 36 else
61 twoaday 167 choice = 0;
62     EndDialog (dlg, choice);
63 werner 36 break;
64    
65     case IDCANCEL:
66 twoaday 167 EndDialog (dlg, 0);
67 werner 36 break;
68     }
69     break;
70     }
71    
72     return FALSE;
73 twoaday 105 }

Properties

Name Value
svn:eol-style native

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26