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

Diff of /trunk/Src/wptFileManagerDlg.cpp

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

revision 218 by twoaday, Sun May 14 18:40:36 2006 UTC revision 219 by twoaday, Sat May 27 08:56:00 2006 UTC
# Line 57  struct thread_ctx_s { Line 57  struct thread_ctx_s {
57  typedef struct thread_ctx_s *thread_ctx_t;  typedef struct thread_ctx_s *thread_ctx_t;
58    
59    
60    int is_openpgp_ext (const char *name);
61    
62    /* Return 1 if the selected file in the listview has a valid GPG extension. */
63    static int
64    is_openpgp_file (listview_ctrl_t lv)
65    {
66        char name[MAX_PATH+32];
67    
68        listview_get_item_text (lv, listview_get_curr_pos (lv), 1,
69                                name, sizeof (name)-1);
70        return is_openpgp_ext (name);
71    }
72    
73    
74  /* Dialog procedure for selecting recipients for encryption. */  /* Dialog procedure for selecting recipients for encryption. */
75  BOOL CALLBACK  BOOL CALLBACK
76  file_encrypt_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)  file_encrypt_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam)
# Line 577  file_manager_dlg_proc (HWND dlg, UINT ms Line 591  file_manager_dlg_proc (HWND dlg, UINT ms
591              set_menu_text (popup, ID_FILECTX_WIPE, _("Wipe"));              set_menu_text (popup, ID_FILECTX_WIPE, _("Wipe"));
592              set_menu_text (popup, ID_FILECTX_SEND, _("Send as Mail"));              set_menu_text (popup, ID_FILECTX_SEND, _("Send as Mail"));
593              set_menu_text (popup, ID_FILECTX_LIST, _("List Packets"));              set_menu_text (popup, ID_FILECTX_LIST, _("List Packets"));
594                if (!is_openpgp_file (lv))
595                    set_menu_state (popup, ID_FILECTX_LIST, MF_GRAYED|MF_DISABLED);
596              update_ui_items (dlg, popup, true, lv);              update_ui_items (dlg, popup, true, lv);
597              TrackPopupMenu (popup, TPM_RIGHTALIGN, p.x, p.y, 0, dlg, NULL);              TrackPopupMenu (popup, TPM_RIGHTALIGN, p.x, p.y, 0, dlg, NULL);
598              DestroyMenu (popup);              DestroyMenu (popup);
# Line 609  file_manager_dlg_proc (HWND dlg, UINT ms Line 625  file_manager_dlg_proc (HWND dlg, UINT ms
625    
626      case WM_COMMAND:      case WM_COMMAND:
627          switch (LOWORD (wparam)) {          switch (LOWORD (wparam)) {
         case IDCANCEL:  
             EndDialog (dlg, FALSE);  
             return TRUE;  
   
628          case ID_FILEMISC_QUIT:          case ID_FILEMISC_QUIT:
629              EndDialog (dlg, TRUE);              EndDialog (dlg, TRUE);
630              return TRUE;              return TRUE;

Legend:
Removed from v.218  
changed lines
  Added in v.219

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26