17 |
* along with WinPT; if not, write to the Free Software Foundation, |
* along with WinPT; if not, write to the Free Software Foundation, |
18 |
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
19 |
*/ |
*/ |
|
|
|
20 |
#ifdef HAVE_CONFIG_H |
#ifdef HAVE_CONFIG_H |
21 |
#include <config.h> |
#include <config.h> |
22 |
#endif |
#endif |
31 |
#include "wptVersion.h" |
#include "wptVersion.h" |
32 |
#include "wptGPG.h" |
#include "wptGPG.h" |
33 |
|
|
34 |
|
#ifdef _MSC_VER |
35 |
|
#include "winpt_header.h" |
36 |
|
|
37 |
|
static DWORD about_help_arr[] = { |
38 |
|
IDC_ABOUT_HELP, WPT_ABOUT_HELP, |
39 |
|
IDC_ABOUT_GPG, WPT_ABOUT_GPG, |
40 |
|
IDOK, WPT_ABOUT_OK, |
41 |
|
0, 0}; |
42 |
|
#endif |
43 |
|
|
44 |
/* Dialog procedure to show 'gpg --version' information. */ |
/* Dialog procedure to show 'gpg --version' information. */ |
45 |
static BOOL CALLBACK |
static BOOL CALLBACK |
46 |
about_gpg_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam) |
about_gpg_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam) |
47 |
{ |
{ |
48 |
char *gpg_version; |
char *gpg_version; |
49 |
gpgme_error_t rc; |
gpgme_error_t rc; |
50 |
|
|
85 |
BOOL CALLBACK |
BOOL CALLBACK |
86 |
about_winpt_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam) |
about_winpt_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam) |
87 |
{ |
{ |
88 |
|
static DWORD cookie = 0; |
89 |
|
|
90 |
switch (msg) { |
switch (msg) { |
91 |
case WM_INITDIALOG: |
case WM_INITDIALOG: |
92 |
|
html_help_init (&cookie); |
93 |
SetWindowText (dlg, _("About WinPT")); |
SetWindowText (dlg, _("About WinPT")); |
94 |
SetDlgItemText (dlg, IDC_ABOUT_INFO, |
SetDlgItemText (dlg, IDC_ABOUT_INFO, |
95 |
_("A free open source privacy tray for Windows based on GnuPG.")); |
_("A free open source privacy tray for Windows based on GnuPG.")); |
109 |
"more details. ")); |
"more details. ")); |
110 |
SetDlgItemText (dlg, IDC_ABOUT_GPG, _("&About GPG...")); |
SetDlgItemText (dlg, IDC_ABOUT_GPG, _("&About GPG...")); |
111 |
SetDlgItemText (dlg, IDC_ABOUT_HELP, _("&Help")); |
SetDlgItemText (dlg, IDC_ABOUT_HELP, _("&Help")); |
112 |
SetDlgItemText (dlg, IDC_WINPT_VERSION, PACKAGE_FULL_VERSION); |
SetDlgItemText (dlg, IDC_WINPT_VERSION, PACKAGE_VERSION); |
113 |
|
|
114 |
center_window (dlg, NULL); |
center_window (dlg, NULL); |
115 |
SetForegroundWindow (dlg); |
SetForegroundWindow (dlg); |
116 |
return TRUE; |
return TRUE; |
117 |
|
|
118 |
|
case WM_DESTROY: |
119 |
|
html_help_deinit (); |
120 |
|
break; |
121 |
|
|
122 |
|
case WM_HELP: |
123 |
|
html_help_dispatch (lparam, "winpt.chm::winpt_texts.txt", about_help_arr); |
124 |
|
break; |
125 |
|
|
126 |
case WM_SYSCOMMAND: |
case WM_SYSCOMMAND: |
127 |
if (LOWORD (wparam) == SC_CLOSE) |
if (LOWORD (wparam) == SC_CLOSE) |
128 |
EndDialog (dlg, TRUE); |
EndDialog (dlg, TRUE); |
131 |
case WM_COMMAND: |
case WM_COMMAND: |
132 |
switch (LOWORD (wparam)) { |
switch (LOWORD (wparam)) { |
133 |
case IDC_ABOUT_GPG: |
case IDC_ABOUT_GPG: |
134 |
DialogBoxParam (glob_hinst, (LPCSTR)IDD_WINPT_ABOUTGPG, |
DialogBoxParam (glob_hinst, (LPCSTR)IDD_WINPT_ABOUTGPG, GetDesktopWindow(), |
135 |
GetDesktopWindow(), about_gpg_dlg_proc, 0); |
about_gpg_dlg_proc, 0); |
136 |
return TRUE; |
return TRUE; |
137 |
|
|
138 |
case IDC_ABOUT_HELP: |
case IDC_ABOUT_HELP: |
140 |
break; |
break; |
141 |
|
|
142 |
case IDOK: |
case IDOK: |
143 |
EndDialog( dlg, TRUE ); |
EndDialog (dlg, TRUE); |
144 |
return TRUE; |
return TRUE; |
145 |
} |
} |
146 |
break; |
break; |