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

Contents of /trunk/Src/wptFirstRunDlg.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 133 - (show annotations)
Mon Jan 9 09:15:29 2006 UTC (19 years, 1 month ago) by twoaday
File size: 2152 byte(s)
A lot of minor bug fixes.
New icons.

For a complete history, see the ChangeLog entries.


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 * 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 #include "resource.h"
27 #include "wptW32API.h"
28 #include "wptGPG.h"
29 #include "wptTypes.h"
30 #include "wptCommonCtl.h"
31 #include "wptContext.h"
32
33
34 /* Dialog box procedure which is executed on the first time WinPT
35 is started. */
36 BOOL CALLBACK
37 first_run_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)
38 {
39 static struct first_start_s * ctx;
40
41 switch (msg) {
42 case WM_INITDIALOG:
43 ctx = (struct first_start_s *)lparam;
44 if (!ctx)
45 BUG (0);
46 CheckDlgButton( dlg, IDC_FIRST_KEYGEN, BST_CHECKED );
47 SetDlgItemText (dlg, IDC_FIRST_KEYGEN,
48 _("&Generate a GnuPG key pair"));
49 SetDlgItemText (dlg, IDC_FIRST_IMPORT,
50 _("&Copy GnuPG keyrings from another location"));
51 SetDlgItemText (dlg, IDCANCEL, _("&Cancel"));
52 SetWindowText (dlg, _("WinPT First Start"));
53 SetForegroundWindow (dlg);
54 center_window (dlg, NULL);
55 return TRUE;
56
57 case WM_COMMAND:
58 switch (LOWORD (wparam)) {
59 case IDOK:
60 if (IsDlgButtonChecked (dlg, IDC_FIRST_KEYGEN))
61 ctx->choice = SETUP_KEYGEN;
62 else if (IsDlgButtonChecked (dlg, IDC_FIRST_IMPORT))
63 ctx->choice = SETUP_IMPORT;
64 else
65 ctx->choice = -1;
66 EndDialog (dlg, TRUE);
67 break;
68
69 case IDCANCEL:
70 ctx->choice = -1;
71 EndDialog (dlg, FALSE);
72 break;
73 }
74 break;
75 }
76
77 return FALSE;
78 }

Properties

Name Value
svn:eol-style native

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26