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

Contents of /trunk/Src/wptFirstRunDlg.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 328 - (show annotations)
Fri Sep 25 16:07:38 2009 UTC (15 years, 5 months ago) by twoaday
File size: 1820 byte(s)


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

Properties

Name Value
svn:eol-style native

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26