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

Annotation of /trunk/Src/wptAboutDlgs.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 34 - (hide annotations)
Wed Oct 26 11:20:09 2005 UTC (19 years, 4 months ago) by twoaday
File size: 4205 byte(s)
2005-10-25  Timo Schulz  <twoaday@g10code.com>
                                                                                
        * wptGPGUtil.cpp (create_process): Hide window.
        * wptKeyPropsDlg.cpp (get_photo_tmpname): New.
        * wptClipSignEncDlg.cpp (clip_signenc_dlg_proc): Remove
        static var 'enable'.
        * wptKeygenDlg.cpp (keygen_dlg_proc): Likewise.
        (gpg_genkey_params): Make sure all primary keys are capable
        for signing and certification.
        * wptKeySigDlg.cpp (is_sig): If no item is selected, return 0.
        * wptGPG.cpp (gnupg_access_keyring): Check return value for
        NULL. Noted by Ralf.
        (get_gnupg_prog): Simplified.
        (check_homedir): Fixed. Return 0 when the dir is successfully created.
        * wptKeyManagerDlg.cpp (km_file_import): Use the hourglass to
        indicate a pending GPG process.
        * wptFileManager.cpp (op_begin, op_end): New. Indicate an start
        and and of an operation. For now just the cursor changes.
        (fm_parse_command_line): Remove debug output. Thanks to Ralf again.
        * WinPT.cpp (WinMain): Check if there is already an instance and
        set a variable early as possible.
        (load_gettext): If a previous instance was found, do not output
        any errors. Kudos to Ralf.


1 twoaday 2 /* wptAboutDlgs.cpp - GPG and WinPT about dialogs
2 twoaday 4 * Copyright (C) 2000-2005 Timo Schulz
3 twoaday 2 *
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     #include <malloc.h>
23    
24     #include "../resource.h"
25     #include "wptTypes.h"
26     #include "wptNLS.h"
27     #include "wptW32API.h"
28     #include "wptVersion.h"
29     #include "wptGPG.h"
30    
31    
32 twoaday 23 /* Dialog procedure to show 'gpg --version' information. */
33 twoaday 2 static BOOL CALLBACK
34 twoaday 4 about_gpg_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)
35 twoaday 2 {
36 twoaday 23 char *gpg_version;
37 twoaday 2 gpgme_error_t rc;
38    
39 twoaday 23 switch (msg) {
40 twoaday 2 case WM_INITDIALOG:
41 twoaday 23 SetWindowText (dlg, _("About the GNU Privacy Guard"));
42 twoaday 34
43 twoaday 23 rc = gpg_get_version (&gpg_version);
44     if (rc || !gpg_version) {
45     msg_box (dlg, gpgme_strerror (rc), _("About GnuPG"), MB_ERR);
46 twoaday 2 return FALSE;
47     }
48 twoaday 23 SetDlgItemText (dlg, IDC_ABOUTGPG_INFO, gpg_version);
49     free (gpg_version);
50     center_window (dlg, NULL);
51     SetForegroundWindow (dlg);
52 twoaday 2 return TRUE;
53    
54     case WM_SYSCOMMAND:
55 twoaday 23 if (LOWORD (wparam) == SC_CLOSE)
56     EndDialog (dlg, TRUE);
57 twoaday 2 return FALSE;
58    
59     case WM_COMMAND:
60 twoaday 23 switch (LOWORD (wparam)) {
61 twoaday 2 case IDOK:
62     EndDialog (dlg, TRUE);
63     return TRUE;
64     }
65     break;
66     }
67    
68     return FALSE;
69 twoaday 23 }
70 twoaday 2
71    
72 twoaday 23 /* Dialog procedure to show the WinPT about information. */
73 twoaday 2 BOOL CALLBACK
74 twoaday 23 about_winpt_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)
75 twoaday 2 {
76 twoaday 30 switch (msg) {
77 twoaday 2 case WM_INITDIALOG:
78 twoaday 4 SetWindowText (dlg, _("About WinPT"));
79     SetDlgItemText (dlg, IDC_ABOUT_INFO,
80     _("A free open source privacy tray for Windows based on GnuPG."));
81     SetDlgItemText (dlg, IDC_ABOUT_URL,
82 twoaday 2 _("For more information you can visit the homepage: http://www.winpt.org"));
83 twoaday 4 SetDlgItemText (dlg, IDC_ABOUT_BUGS,
84 twoaday 2 _("Please report any BUGS or suggestions for WinPT to <[email protected]>"));
85 twoaday 4 SetDlgItemText (dlg, IDC_ABOUT_GPL1,
86 twoaday 2 _("WinPT is free software; you can redistribute it and/or modify it under "
87     "the terms of the GNU General Public License as published by the Free "
88     "Software Foundation; either Version 2 of the License, or "
89     "(at your option) any later version."));
90 twoaday 30 SetDlgItemText (dlg, IDC_ABOUT_GPL2,
91 twoaday 2 _("WinPT is distributed in the hope that it will be useful, but WITHOUT "
92     "ANY WARRANTY; without even the implied warranty of MERCHANTABLITY or "
93     "FITNESS FOR A PARTICULAR PURPOSE. See the General Public License for "
94     "more details. "));
95 twoaday 30 SetDlgItemText (dlg, IDC_ABOUT_GPG, _("&About GPG..."));
96     SetDlgItemText (dlg, IDC_ABOUT_HELP, _("&Help"));
97 twoaday 23 SetDlgItemText (dlg, IDC_WINPT_VERSION, PACKAGE_VERSION);
98 twoaday 34
99 twoaday 23 center_window (dlg, NULL);
100 twoaday 30 SetForegroundWindow (dlg);
101 twoaday 2 return TRUE;
102    
103     case WM_SYSCOMMAND:
104 twoaday 25 if (LOWORD (wparam) == SC_CLOSE)
105     EndDialog (dlg, TRUE);
106 twoaday 2 return FALSE;
107    
108     case WM_COMMAND:
109 twoaday 23 switch (LOWORD (wparam)) {
110 twoaday 2 case IDC_ABOUT_GPG:
111     DialogBoxParam (glob_hinst, (LPCSTR)IDD_WINPT_ABOUTGPG, GetDesktopWindow(),
112     about_gpg_dlg_proc, NULL);
113     return TRUE;
114    
115     case IDC_ABOUT_HELP:
116     ShellExecute (dlg, "open", "winpt.chm", NULL, NULL, SW_SHOW);
117     break;
118    
119     case IDOK:
120     EndDialog( dlg, TRUE );
121     return TRUE;
122     }
123     break;
124     }
125    
126 twoaday 32 return FALSE;
127 twoaday 23 }

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26