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

Diff of /trunk/Src/wptMainProc.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 225 by twoaday, Tue Jun 6 13:37:59 2006 UTC revision 234 by twoaday, Tue Jun 27 10:16:41 2006 UTC
# Line 95  confirm_delclipboard_dlg (HWND dlg, UINT Line 95  confirm_delclipboard_dlg (HWND dlg, UINT
95      switch (msg) {      switch (msg) {
96      case WM_INITDIALOG:      case WM_INITDIALOG:
97          SetWindowText (dlg, _("Delete Clipboard Contents"));          SetWindowText (dlg, _("Delete Clipboard Contents"));
98          SetDlgItemText (dlg, IDC_CONFDELCLIP_BRAIN, _("&Remember the answer"));          SetDlgItemText (dlg, IDC_CONFDELCLIP_BRAIN,
99          SetDlgItemText (dlg, IDC_CONFDELCLIP_INFO, _("Do you want to delete the contents from the clipboard?"));                          _("&Remember the answer"));
100            SetDlgItemText (dlg, IDC_CONFDELCLIP_INFO,
101                            _("Do you want to delete the contents from the clipboard?"));
102          SetDlgItemText (dlg, IDYES, _("&Yes"));          SetDlgItemText (dlg, IDYES, _("&Yes"));
103          SetDlgItemText (dlg, IDNO, _("&No"));          SetDlgItemText (dlg, IDNO, _("&No"));
104          center_window (dlg, NULL);          center_window (dlg, NULL);
# Line 135  currwnd_gpg_dlg (HWND hwnd, UINT id, int Line 137  currwnd_gpg_dlg (HWND hwnd, UINT id, int
137          *ret_set = 1;          *ret_set = 1;
138      switch (id) {      switch (id) {
139      case ID_WINPT_CURRWND_SYMENC:      case ID_WINPT_CURRWND_SYMENC:
140          gpg_encrypt_symmetric ();          gpg_clip_sym_encrypt ();
141          break;          break;
142    
143      case ID_WINPT_CURRWND_ENCRYPT:      case ID_WINPT_CURRWND_ENCRYPT:
# Line 162  currwnd_gpg_dlg (HWND hwnd, UINT id, int Line 164  currwnd_gpg_dlg (HWND hwnd, UINT id, int
164              msg_box (hwnd, gpgme_strerror (err), _("Clipboard"), MB_ERR);              msg_box (hwnd, gpgme_strerror (err), _("Clipboard"), MB_ERR);
165              break;              break;
166          }          }
167          if( (type & PGP_MESSAGE) && !(type & PGP_CLEARSIG) ) {          if ((type & PGP_MESSAGE) && !(type & PGP_CLEARSIG)) {
168              /* It makes only sense to insert the data in the window if it's              /* It makes only sense to insert the data in the window if it's
169                 really a ciphertext. Verfied data doesn't need this. */                 really a ciphertext. Verfied data doesn't need this. */
170              err = clip_decrypt_dlg (hwnd);              err = clip_decrypt_dlg (hwnd, reg_prefs.use_viewer);
171              if (!err && reg_prefs.use_viewer) {              if (!err && ret_set)
172                  dialog_box_param( glob_hinst, (LPCSTR)IDD_WINPT_CLIPEDIT,                  *ret_set = 0;
                                   GetDesktopWindow(), clip_edit_dlg_proc, 0,  
                                  _("Clipboard Editor"), IDS_WINPT_CLIPEDIT);  
                 if (ret_set)  
                     *ret_set = 0;  
             }  
173          }          }
174          else if ((type & PGP_PUBKEY) && !(type & PGP_CLEARSIG))          else if ((type & PGP_PUBKEY) && !(type & PGP_CLEARSIG))
175              km_clip_import (GetDesktopWindow (), NULL, NULL);              km_clip_import (GetDesktopWindow (), NULL, NULL);
# Line 203  clip_gpg_dlg (HWND hwnd, UINT id) Line 200  clip_gpg_dlg (HWND hwnd, UINT id)
200            
201      switch( id ) {      switch( id ) {
202      case ID_WINPT_SYMENC:      case ID_WINPT_SYMENC:
203          gpg_encrypt_symmetric ();          gpg_clip_sym_encrypt ();
204          break;          break;
205                    
206      case ID_WINPT_ENCRYPT:      case ID_WINPT_ENCRYPT:
# Line 230  clip_gpg_dlg (HWND hwnd, UINT id) Line 227  clip_gpg_dlg (HWND hwnd, UINT id)
227              msg_box( hwnd, gpgme_strerror( err ), _("Clipboard"), MB_ERR );              msg_box( hwnd, gpgme_strerror( err ), _("Clipboard"), MB_ERR );
228              break;              break;
229          }          }
230          if( (type & PGP_MESSAGE) && !(type & PGP_CLEARSIG) ) {          if((type & PGP_MESSAGE) && !(type & PGP_CLEARSIG))
231              err = clip_decrypt_dlg (hwnd);              err = clip_decrypt_dlg (hwnd, reg_prefs.use_viewer);
232              if (!err && reg_prefs.use_viewer) {          else if ((type & PGP_SIG) && !(type & PGP_CLEARSIG)) {
                 dialog_box_param( glob_hinst, (LPCSTR)IDD_WINPT_CLIPEDIT,  
                                   GetDesktopWindow(), clip_edit_dlg_proc, 0,  
                                  _("Clipboard Editor"), IDS_WINPT_CLIPEDIT );  
             }  
         }  
         else if( (type & PGP_SIG) && !(type & PGP_CLEARSIG) ) {  
233              text_input_s input;              text_input_s input;
234              gpgme_data_t sig;              gpgme_data_t sig;
235                            
# Line 310  add_taskbar_icon (HWND hwnd, NOTIFYICOND Line 301  add_taskbar_icon (HWND hwnd, NOTIFYICOND
301  }  }
302    
303    
304    /* Initialize all needed common controls. */
305  static void  static void
306  init_common_controls (void)  init_common_controls (void)
307  {  {
# Line 398  winpt_main_proc (HWND hwnd, UINT msg, WP Line 390  winpt_main_proc (HWND hwnd, UINT msg, WP
390    
391              gpg_read_only = gpg_check_permissions (0) == 0? 0 : 1;              gpg_read_only = gpg_check_permissions (0) == 0? 0 : 1;
392    
393                wait_for_progress_cb ();
394              SetForegroundWindow (hwnd);              SetForegroundWindow (hwnd);
395              GetCursorPos (&p);              GetCursorPos (&p);
396              hm = LoadMenu (glob_hinst, MAKEINTRESOURCE (IDR_WINPT));              hm = LoadMenu (glob_hinst, MAKEINTRESOURCE (IDR_WINPT));
# Line 421  winpt_main_proc (HWND hwnd, UINT msg, WP Line 414  winpt_main_proc (HWND hwnd, UINT msg, WP
414              set_menu_text (popup, ID_WINPT_CURRWND_SIGNENCRYPT, _("Sign && Encrypt"));              set_menu_text (popup, ID_WINPT_CURRWND_SIGNENCRYPT, _("Sign && Encrypt"));
415              set_menu_text (popup, ID_WINPT_CURRWND_DECRYPT_VERIFY, _("Decrypt/Verify"));              set_menu_text (popup, ID_WINPT_CURRWND_DECRYPT_VERIFY, _("Decrypt/Verify"));
416              set_menu_text (popup, ID_WINPT_CURRWND_SIGN, _("Sign"));              set_menu_text (popup, ID_WINPT_CURRWND_SIGN, _("Sign"));
417                set_menu_text (popup, ID_WINPT_CURRWND_SYMENC, _("Symmetric"));
418              if (!secret_key_available ()) {              if (!secret_key_available ()) {
419                  set_menu_state (popup, ID_WINPT_SIGN, MF_DISABLED|MF_GRAYED);                  set_menu_state (popup, ID_WINPT_SIGN, MF_DISABLED|MF_GRAYED);
420                  set_menu_state (popup, ID_WINPT_CURRWND_SIGN, MF_DISABLED|MF_GRAYED);                  set_menu_state (popup, ID_WINPT_CURRWND_SIGN, MF_DISABLED|MF_GRAYED);
# Line 439  winpt_main_proc (HWND hwnd, UINT msg, WP Line 433  winpt_main_proc (HWND hwnd, UINT msg, WP
433              break;              break;
434                            
435          case WM_LBUTTONDBLCLK:          case WM_LBUTTONDBLCLK:
436                wait_for_progress_cb ();
437              gpg_read_only = gpg_check_permissions (0) == 0? 0 : 1;              gpg_read_only = gpg_check_permissions (0) == 0? 0 : 1;
438              SendMessage (hwnd, WM_COMMAND, ID_WINPT_KEY, 0);              SendMessage (hwnd, WM_COMMAND, ID_WINPT_KEY, 0);
439              break;              break;
# Line 447  winpt_main_proc (HWND hwnd, UINT msg, WP Line 442  winpt_main_proc (HWND hwnd, UINT msg, WP
442                    
443      case WM_HOTKEY:      case WM_HOTKEY:
444          cmd = 0;          cmd = 0;
445          switch( wparam ) {          switch (wparam) {
446          case WPT_CLIP_ENCRYPT_ID:                                case WPT_CLIP_ENCRYPT_ID:                      
447              SendMessage( hwnd, WM_COMMAND, ID_WINPT_ENCRYPT, 0 );              SendMessage( hwnd, WM_COMMAND, ID_WINPT_ENCRYPT, 0 );
448              break;              break;

Legend:
Removed from v.225  
changed lines
  Added in v.234

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26