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

Contents of /trunk/Src/wptMainProc.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 450 - (show annotations)
Sat May 5 14:00:34 2012 UTC (12 years, 9 months ago) by twoaday
File size: 18660 byte(s)
2012-05-05  Timo Schulz  <twoaday@gmx.net>

     * wptListview.cpp (keylist_listview_notify): Cleanups.
       

1 /* wptMainProc.cpp - Main window procedure
2 * Copyright (C) 2000-2009, 2011-2012 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
17 #ifdef HAVE_CONFIG_H
18 #include <config.h>
19 #endif
20
21 /* Only define the constant if needed. */
22 #ifndef _WIN32_IE
23 #define _WIN32_IE 0x0700
24 #endif
25
26 #include <windows.h>
27 #include <commctrl.h>
28 #include <io.h>
29
30 #include "resource.h"
31 #include "wptTypes.h"
32 #include "wptGPG.h"
33 #include "wptW32API.h"
34 #include "wptVersion.h"
35 #include "wptCommonCtl.h"
36 #include "wptContext.h" /* for passphrase_s */
37 #include "wptDlgs.h"
38 #include "wptErrors.h"
39 #include "wptNLS.h"
40 #include "wptHotkey.h"
41 #include "wptRegistry.h"
42 #include "wptKeyserver.h"
43 #include "wptAgent.h"
44 #include "wptUTF8.h"
45 #include "wptKeylist.h"
46 #include "wptKeyManager.h"
47 #include "wptCard.h"
48 #include "wptCardEdit.h"
49
50
51 int update_keycache (HWND hwnd);
52
53 /* Command for the Key Manager dialog. (0=no command) */
54 static int cmd = 0;
55
56 /* 1 indicates that the clipboard will be emptied o exit. */
57 static int wipe_contents = 0;
58
59
60 /* Dialog box procedure to display all insecure all ElGamal keys. */
61 BOOL CALLBACK
62 elgamal_warn_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)
63 {
64 gpg_keycache_t pc;
65 gpgme_key_t key;
66 char *uid;
67 char tmp[128+64+1];
68
69 switch (msg) {
70 case WM_INITDIALOG:
71 pc = keycache_get_ctx (1);
72 while (!gpg_keycache_next_key (pc, 0, &key)) {
73 if (key->subkeys->pubkey_algo == GPGME_PK_ELG) {
74 uid = utf8_to_native (key->uids->uid);
75 _snprintf (tmp, DIM (tmp)-1, "(0x%s) %s",
76 key->subkeys->keyid+8, uid);
77 SendDlgItemMessage (dlg, IDC_ELGWARN_LIST, LB_ADDSTRING,
78 0, (LPARAM)(const char *)tmp);
79 free_if_alloc (uid);
80 }
81 }
82 gpg_keycache_rewind (pc);
83 center_window (dlg, NULL);
84 SetForegroundWindow (dlg);
85 break;
86
87 case WM_COMMAND:
88 switch (LOWORD (wparam)) {
89 case IDOK:
90 EndDialog (dlg, TRUE);
91 break;
92 }
93 break;
94 }
95 return FALSE;
96 }
97
98
99 /* Dialog box procedure to confirm to delete the clipboard contents. */
100 static BOOL CALLBACK
101 confirm_delclipboard_dlg (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)
102 {
103 switch (msg) {
104 case WM_INITDIALOG:
105 SetWindowText (dlg, _("Delete Clipboard Contents"));
106 SetDlgItemText (dlg, IDC_CONFDELCLIP_BRAIN,
107 _("&Remember the answer"));
108 SetDlgItemText (dlg, IDC_CONFDELCLIP_INFO,
109 _("Do you want to delete the contents from the clipboard?"));
110 SetDlgItemText (dlg, IDYES, _("&Yes"));
111 SetDlgItemText (dlg, IDNO, _("&No"));
112 center_window (dlg, NULL);
113 SetForegroundWindow (dlg);
114 break;
115
116 case WM_COMMAND:
117 switch (LOWORD (wparam)) {
118 case IDYES:
119 wipe_contents = 1;
120 if (IsDlgButtonChecked (dlg, IDC_CONFDELCLIP_BRAIN))
121 set_reg_winpt_flag ("WipeClipboard", 1);
122 EndDialog (dlg, 1);
123 break;
124
125 case IDNO:
126 wipe_contents = 0;
127 if (IsDlgButtonChecked (dlg, IDC_CONFDELCLIP_BRAIN))
128 set_reg_winpt_flag ("WipeClipboard", 0);
129 EndDialog (dlg, 0);
130 break;
131 }
132 break;
133 }
134 return FALSE;
135 }
136
137
138 /* Handle the various command requests for the clipboard
139 and the current window. */
140 static void
141 clip_gpg_dlg (HWND hwnd, UINT id, int *r_upd_window)
142 {
143 gpgme_error_t err = gpg_error (GPG_ERR_NO_ERROR);
144 int type;
145 int disable_viewer = 0;
146
147 if (r_upd_window) {
148 *r_upd_window = 1;
149 /* for the current window mode it makes no sense to
150 use the clipboard viewer for decryption because the
151 text will be pasted directly into the window. */
152 disable_viewer = 1;
153 }
154 if ((id == ID_WINPT_SIGN || id == ID_WINPT_SIGNENCRYPT) && gnupg_access_keyring (0)) {
155 msg_box (hwnd, _("Could not access secret keyring."), _("Sign"), MB_ERR);
156 return;
157 }
158
159 switch (id) {
160 case ID_WINPT_SYMENC:
161 case ID_WINPT_CURRWND_SYMENC:
162 err = gpg_clip_sym_encrypt ();
163 if (err && r_upd_window)
164 *r_upd_window = 0;
165 break;
166
167 case ID_WINPT_ENCRYPT:
168 case ID_WINPT_CURRWND_ENCRYPT:
169 dialog_box_param (glob_hinst, (LPCSTR)IDD_WINPT_ENCRYPT, hwnd,
170 clip_encrypt_dlg_proc, 0, _("Encryption"), IDS_WINPT_ENCRYPT);
171 break;
172
173 case ID_WINPT_SIGN:
174 case ID_WINPT_CURRWND_SIGN:
175 dialog_box_param (glob_hinst, (LPCSTR)IDD_WINPT_SIGN, hwnd,
176 clip_sign_dlg_proc, 0, _("Signing"), IDS_WINPT_SIGN);
177 break;
178
179 case ID_WINPT_SIGNENCRYPT:
180 case ID_WINPT_CURRWND_SIGNENCRYPT:
181 dialog_box_param (glob_hinst, (LPCSTR)IDD_WINPT_SIGNENC, hwnd,
182 clip_signenc_dlg_proc, 0, _("Sign & Encrypt"), IDS_WINPT_SIGNENC);
183 break;
184
185 case ID_WINPT_DECRYPT_VERIFY:
186 case ID_WINPT_CURRWND_DECRYPT_VERIFY:
187 err = gpg_clip_get_pgptype (&type);
188 if (err) {
189 msg_box (hwnd, gpgme_strerror (err), _("Clipboard"), MB_ERR);
190 if (r_upd_window)
191 *r_upd_window = 0;
192 break;
193 }
194 if ((type & PGP_MESSAGE) && !(type & PGP_CLEARSIG))
195 err = clip_decrypt_dlg (hwnd, disable_viewer? 0 : reg_prefs.use_viewer);
196 else if ((type & PGP_SIG) && !(type & PGP_CLEARSIG)) {
197 text_input_s input;
198 gpgme_data_t sig;
199
200 memset (&input, 0, sizeof (input));
201 err = gpg_data_new_from_clipboard (&sig, 0);
202 if (err) {
203 msg_box (hwnd, gpgme_strerror (err),_("Verify"), MB_ERR);
204 if (r_upd_window)
205 *r_upd_window = 0;
206 return;
207 }
208 input.type = 0;
209 dialog_box_param (glob_hinst, (LPCSTR)IDD_WINPT_TEXT, hwnd,
210 text_input_dlg_proc, (LPARAM)&input,
211 _("Text Input"), IDS_WINPT_TEXT);
212
213 /* The dialog might have changed the clipboard, so we restore
214 the original state (again). */
215 gpg_data_release_to_clipboard (sig, 0);
216 if (input.length > 0) {
217 dialog_box_param (glob_hinst, (LPCSTR)IDD_WINPT_VERIFY, hwnd,
218 clip_verify_dlg_proc, (LPARAM)&input,
219 _("Verify"), IDS_WINPT_VERIFY);
220 input.length = 0;
221 free_if_alloc (input.data);
222 }
223 if (r_upd_window)
224 *r_upd_window = 0;
225 }
226 else if (type & PGP_CLEARSIG) {
227 dialog_box_param (glob_hinst, (LPCSTR)IDD_WINPT_VERIFY, hwnd,
228 clip_verify_dlg_proc, 0,
229 _("Verify"), IDS_WINPT_VERIFY);
230 if (r_upd_window)
231 *r_upd_window = 0;
232 }
233 else if ((type & PGP_PUBKEY) || (type & PGP_SECKEY)) {
234 km_clip_import (GetDesktopWindow (), NULL, NULL);
235 if (r_upd_window)
236 *r_upd_window = 0;
237 }
238 else {
239 msg_box (hwnd, _("Unknown OpenPGP type."), _("Clipboard"), MB_ERR);
240 if (r_upd_window)
241 *r_upd_window = 0;
242 }
243 }
244 }
245
246
247 /* Load the Card Manager with the current card. */
248 static void
249 load_card_manager (void)
250 {
251 gpg_card_t card;
252
253 card = gpg_card_load ();
254 if (!card)
255 return;
256
257 dialog_box_param (glob_hinst, (LPCSTR)IDD_WINPT_CARD_EDIT,
258 GetDesktopWindow (), card_edit_dlg_proc,
259 (LPARAM)card,
260 _("Card Edit"), IDS_WINPT_CARD_EDIT);
261 gpg_card_release (card);
262 }
263
264
265 /* Add the winpt symbol to the task bar. */
266 static void
267 add_taskbar_icon (HWND hwnd, NOTIFYICONDATA *nid)
268 {
269 nid->cbSize = sizeof (NOTIFYICONDATA);
270 nid->uFlags = NIF_MESSAGE | NIF_ICON | NIF_TIP;
271 nid->uCallbackMessage = WM_USER;
272 nid->hWnd = hwnd;
273 nid->hIcon = LoadIcon (glob_hinst, MAKEINTRESOURCE (IDI_WINPT));
274 _snprintf(nid->szTip, DIM(nid->szTip), "Windows Privacy Tray v"PGM_VERSION);
275 Shell_NotifyIcon (NIM_ADD, nid);
276 DestroyIcon (nid->hIcon);
277 }
278
279
280 /* Initialize all needed common controls. */
281 static void
282 init_common_controls (void)
283 {
284 INITCOMMONCONTROLSEX cce;
285
286 /* date control, toolbar, trackbar, ... */
287 cce.dwSize = sizeof (INITCOMMONCONTROLSEX);
288 cce.dwICC = ICC_DATE_CLASSES|ICC_BAR_CLASSES;
289 InitCommonControlsEx (&cce);
290 }
291
292
293 /* Wipe the clipboard if the user requested it. */
294 static void
295 wipe_clipboard (int manual_shutdown)
296 {
297 int has_data = 0;
298
299 if (!gpg_clip_istext_avail (&has_data) && has_data) {
300 int chk = get_reg_winpt_flag ("WipeClipboard");
301 if (chk == -1 && manual_shutdown)
302 DialogBoxParam (glob_hinst, (LPCTSTR)IDD_WINPT_CONFDELCLIP,
303 GetDesktopWindow (), confirm_delclipboard_dlg, 0);
304 if (wipe_contents || chk)
305 set_clip_text (NULL, " ", 1);
306 wipe_contents = 0;
307 }
308 }
309
310
311
312 /* Main message loop for the tray window. */
313 LRESULT CALLBACK
314 winpt_main_proc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
315 {
316 static NOTIFYICONDATA NID;
317 static int use_hotkey = 0;
318 static int manual_shutdown = 0;
319 HWND wnd, cw_main, cw_focus;
320 gpgme_error_t err;
321 const char *s;
322 int rc, set_wc = 0;
323 int has_data = 0;
324
325 switch (msg) {
326 case WM_CREATE:
327 add_taskbar_icon (hwnd, &NID);
328 rc = wsock_init ();
329 if (rc)
330 msg_box (NULL, winpt_strerror (rc), "Winsock2 DLL", MB_ERR);
331 if (!reg_prefs.no_hotkeys) {
332 rc = hotkeys_register (hwnd);
333 if (rc)
334 msg_box (hwnd, hotkeys_strerror (), winpt_strerror (rc), MB_ERR);
335 }
336 rc = PTD_initialize ();
337 if (!rc)
338 msg_box (hwnd, _("Could not set current window mode hooks."), _("WinPT Error"), MB_OK);
339 mapi_init ();
340 init_common_controls ();
341 LoadLibrary ("RichEd32.Dll");
342 manual_shutdown = 0;
343 break;
344
345 case WM_ENDSESSION:
346 case WM_DESTROY:
347 case WM_CLOSE:
348 case WM_QUIT:
349 mapi_deinit ();
350 wsock_end ();
351 keycache_release (1);
352 /* FIXME: There seems to be a problem with the backup at the
353 * end on EFS file systems. I currently have no access to
354 * any EFS partition so I need to do some general investigations
355 * to find out what the problem is.
356 */
357 gnupg_backup_keyrings (reg_prefs.auto_backup,
358 reg_prefs.backup.mode,
359 reg_prefs.backup.include_secr);
360 free_reg_prefs ();
361 free_gnupg_table ();
362 wipe_clipboard (manual_shutdown);
363 gettext_free_current_domain ();
364 hotkeys_unregister (hwnd);
365 PTD_delete_hook ();
366 agent_flush_cache ();
367 debug_end ();
368 Shell_NotifyIcon (NIM_DELETE, &NID);
369 PostQuitMessage (0);
370 ExitProcess (0);
371 break;
372
373 case WM_USER:
374 switch (lparam) {
375 case WM_RBUTTONUP:
376 case WM_LBUTTONUP:
377 HMENU hm, popup;
378 POINT p;
379
380 if (!wait_for_progress_cb (0))
381 break;
382 gpg_read_only = gpg_check_permissions (0) == 0? 0 : 1;
383 SetForegroundWindow (hwnd);
384 GetCursorPos (&p);
385 hm = LoadMenu (glob_hinst, MAKEINTRESOURCE (IDR_WINPT));
386 popup = GetSubMenu (hm, 0);
387
388 if (!scard_support)
389 set_menu_state (popup, ID_WINPT_CARD, MF_DISABLED|MF_GRAYED);
390 set_menu_text (popup, ID_WINPT_FILE, _("File Manager..."));
391 set_menu_text (popup, ID_WINPT_KEY, _("Key Manager..."));
392 set_menu_text (popup, ID_WINPT_CARD, _("Card Manager..."));
393 set_menu_text (popup, ID_WINPT_EDIT, _("Edit..."));
394 set_menu_text (popup, ID_WINPT_ABOUT, _("About..."));
395 set_menu_text (popup, ID_WINPT_QUIT, _("Exit"));
396 set_menu_text (popup, ID_WINPT_SYMENC, _("Symmetric"));
397 set_menu_text (popup, ID_WINPT_ENCRYPT, _("Encrypt"));
398 set_menu_text (popup, ID_WINPT_SIGN, _("Sign"));
399 set_menu_text (popup, ID_WINPT_SIGNENCRYPT, _("Sign && Encrypt"));
400 set_menu_text (popup, ID_WINPT_DECRYPT, _("Decrypt/Verify"));
401 set_menu_text (popup, ID_WINPT_VERIFY, _("Verify"));
402 set_menu_text (popup, ID_WINPT_CURRWND_ENCRYPT, _("Encrypt"));
403 set_menu_text (popup, ID_WINPT_CURRWND_SIGNENCRYPT, _("Sign && Encrypt"));
404 set_menu_text (popup, ID_WINPT_CURRWND_DECRYPT_VERIFY, _("Decrypt/Verify"));
405 set_menu_text (popup, ID_WINPT_CURRWND_SIGN, _("Sign"));
406 set_menu_text (popup, ID_WINPT_CURRWND_SYMENC, _("Symmetric"));
407 if (!secret_key_available ()) {
408 set_menu_state (popup, ID_WINPT_SIGN, MF_DISABLED|MF_GRAYED);
409 set_menu_state (popup, ID_WINPT_CURRWND_SIGN, MF_DISABLED|MF_GRAYED);
410 set_menu_state (popup, ID_WINPT_SIGNENCRYPT, MF_DISABLED|MF_GRAYED);
411 set_menu_state (popup, ID_WINPT_CURRWND_SIGNENCRYPT, MF_DISABLED|MF_GRAYED);
412 }
413 /* FIXME: we have to change popup texts */
414 set_menu_text_bypos (popup, 3, _("Clipboard"));
415 set_menu_text_bypos (popup, 4, _("Current Window"));
416 set_menu_text_bypos (popup, 6, _("Preferences"));
417
418 if (gettext_domain_needs_refresh())
419 gettext_set_user_domain();
420 TrackPopupMenu (popup, TPM_RIGHTALIGN, p.x, p.y, 0, hwnd, NULL);
421 PostMessage (hwnd, WM_USER, 0, 0);
422 DestroyMenu (popup);
423 DestroyMenu (hm);
424 break;
425 }
426 break;
427
428 case WM_HOTKEY:
429 cmd = 0;
430 switch (wparam) {
431 case WPT_CLIP_ENCRYPT_ID:
432 SendMessage (hwnd, WM_COMMAND, ID_WINPT_ENCRYPT, 0);
433 break;
434
435 case WPT_CLIP_DECRYPT_VERIFY_ID:
436 SendMessage (hwnd, WM_COMMAND, ID_WINPT_DECRYPT_VERIFY, 0);
437 break;
438
439 case WPT_CLIP_SIGN_ID:
440 SendMessage (hwnd, WM_COMMAND, ID_WINPT_SIGN, 0);
441 break;
442
443 case WPT_CLIP_SIGN_ENCRYPT_ID:
444 SendMessage (hwnd, WM_COMMAND, ID_WINPT_SIGNENCRYPT, 0);
445 break;
446
447 case WPT_CURRWND_ENCRYPT_ID:
448 use_hotkey = 1;
449 SendMessage (hwnd, WM_COMMAND, ID_WINPT_CURRWND_ENCRYPT, 0);
450 break;
451
452 case WPT_CURRWND_SIGN_ID:
453 use_hotkey = 1;
454 SendMessage (hwnd, WM_COMMAND, ID_WINPT_CURRWND_SIGN, 0);
455 break;
456
457 case WPT_CURRWND_SIGN_ENCRYPT_ID:
458 use_hotkey = 1;
459 SendMessage (hwnd, WM_COMMAND, ID_WINPT_CURRWND_SIGNENCRYPT, 0 );
460 break;
461
462 case WPT_CURRWND_DECRYPT_VERIFY_ID:
463 use_hotkey = 1;
464 SendMessage (hwnd, WM_COMMAND, ID_WINPT_CURRWND_DECRYPT_VERIFY, 0);
465 break;
466
467 case WPT_AGENT_FORGET_ID:
468 rc = msg_box (hwnd, _("Remove all passphrases from cache?"),
469 _("WinPT"), MB_YESNO|MB_ICONQUESTION);
470 if (rc == IDYES)
471 agent_flush_cache ();
472 break;
473 }
474 break;
475
476 case WM_COMMAND:
477 if (gnupg_access_keyring (1)) {
478 if (log_box( "WinPT", MB_ERR|MB_YESNO,
479 _("Could not access public keyring, exit WinPT?") ) == IDYES)
480 SendMessage (hwnd, WM_DESTROY, 0, 0);
481 break;
482 }
483 switch (wparam) {
484 /** Clipboard operations **/
485 case ID_WINPT_SYMENC:
486 case ID_WINPT_ENCRYPT:
487 case ID_WINPT_SIGN:
488 case ID_WINPT_SIGNENCRYPT:
489 case ID_WINPT_DECRYPT_VERIFY:
490 err = gpg_clip_istext_avail (&has_data);
491 if (err) {
492 msg_box (hwnd, gpgme_strerror (err),_("Clipboard"), MB_ERR);
493 break;
494 }
495 if (!has_data) {
496 msg_box (hwnd, winpt_strerror (WPTERR_CLIP_EMPTY),
497 _("Clipboard"), MB_ERR);
498 break;
499 }
500 clip_gpg_dlg (hwnd, (int)wparam, NULL);
501 break;
502
503 /** Current window operations **/
504 case ID_WINPT_CURRWND_SYMENC:
505 case ID_WINPT_CURRWND_ENCRYPT:
506 case ID_WINPT_CURRWND_SIGNENCRYPT:
507 case ID_WINPT_CURRWND_DECRYPT_VERIFY:
508 case ID_WINPT_CURRWND_SIGN:
509 rc = copy_window_content (hwnd, &cw_main, &cw_focus, use_hotkey);
510 if (rc) {
511 log_box (_("WinPT Error"), MB_ERR,
512 _("Make sure that the window contains text.\n"
513 "%s."),
514 winpt_strerror (WPTERR_CURR_WND));
515 break;
516 }
517 clip_gpg_dlg (hwnd, (int)wparam, &set_wc);
518 if (set_wc == 1)
519 paste_window_content (hwnd, cw_main, cw_focus);
520 use_hotkey = 0;
521 break;
522
523 /** File handling **/
524 case ID_WINPT_FILE:
525 s = _("File Manager (use drag & drop to add files)");
526 wnd = FindWindow (NULL, s);
527 if (wnd && IsIconic (wnd))
528 ShowWindow (wnd, SW_RESTORE);
529 dialog_box_param (glob_hinst, (LPCSTR)IDD_WINPT_FILE,
530 GetDesktopWindow (), file_manager_dlg_proc, 0,
531 s, IDS_WINPT_FILE);
532 break;
533
534 /** Misc **/
535 case ID_WINPT_KEY:
536 wnd = FindWindow (NULL, _("Key Manager"));
537 if (wnd && IsIconic (wnd))
538 ShowWindow (wnd, SW_RESTORE);
539 if (wnd)
540 SetForegroundWindow (wnd);
541 dialog_box_param (glob_hinst, (LPCSTR)IDD_WINPT_KEYMISC,
542 GetDesktopWindow(), keymanager_dlg_proc,
543 cmd != 0? (LPARAM)cmd : 0,
544 _("Key Manager"), IDS_WINPT_KEYMISC);
545 cmd = 0;
546 break;
547
548 case ID_WINPT_CARD:
549 load_card_manager ();
550 break;
551
552 case ID_WINPT_EDIT:
553 dialog_box_param( glob_hinst, (LPCSTR)IDD_WINPT_CLIPEDIT,
554 GetDesktopWindow(), clip_edit_dlg_proc, 0,
555 _("Clipboard Editor"), IDS_WINPT_CLIPEDIT );
556 break;
557
558 case ID_WINPT_ABOUT:
559 dialog_box_param( glob_hinst, (LPCSTR)IDD_WINPT_ABOUT, GetDesktopWindow(),
560 about_winpt_dlg_proc, 0,
561 _("About WinPT"), IDS_WINPT_ABOUT );
562 break;
563
564 case ID_WINPT_PREFS:
565 dialog_box_param( glob_hinst, (LPCSTR)IDD_WINPT_PREFS, GetDesktopWindow(),
566 prefs_dlg_proc, 0,
567 _("WinPT Preferences"), IDS_WINPT_PREFS );
568 break;
569
570 case ID_WINPT_GPGPREFS:
571 rc = dialog_box_param (glob_hinst, (LPCSTR)IDD_WINPT_GPGPREFS,
572 GetDesktopWindow(), gpgprefs_dlg_proc, 0,
573 _("GnuPG Preferences"), IDS_WINPT_GPGPREFS);
574 if (rc == TRUE)
575 update_keycache (GetDesktopWindow ());
576 break;
577
578 case ID_WINPT_QUIT:
579 manual_shutdown = 1;
580 SendMessage (hwnd, WM_DESTROY, 0, 0);
581 break;
582 }
583 break;
584 }
585
586 return DefWindowProc (hwnd, msg, wparam, lparam);
587 }

Properties

Name Value
svn:eol-style native

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26