Changeset 2062 for trunk/eraser
- Timestamp:
- 05/04/10 08:54:59 (3 years ago)
- Location:
- trunk/eraser
- Files:
-
- 4 edited
-
Eraser.Shell/CtxMenu.cpp (modified) (4 diffs)
-
Eraser.Shell/Eraser.Shell.rc (modified) (1 diff)
-
Eraser.Shell/resource.h (modified) (2 diffs)
-
Eraser/Program.cs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/eraser/Eraser.Shell/CtxMenu.cpp
r2060 r2062 274 274 if (applicableActions & ACTION_SECURE_MOVE) 275 275 { 276 InsertSeparator(hSubmenu); 276 //Insert the separator if we aren't the only menu item 277 if (applicableActions != ACTION_SECURE_MOVE) 278 InsertSeparator(hSubmenu); 279 277 280 InsertMenu(hSubmenu, ACTION_SECURE_MOVE, MF_BYPOSITION, uID++, 278 281 LoadString(IDS_ACTION_SECUREMOVE).c_str()); //Secure Move … … 511 514 break; 512 515 516 case ACTION_SECURE_MOVE: 517 //Securely move the file/folder. If the DragDropDestinationDirectory member 518 //is blank, query the user for a path to copy the items to 519 if (DragDropDestinationDirectory.empty()) 520 { 521 BROWSEINFO info; 522 ::ZeroMemory(&info, sizeof(info)); 523 524 //Set the title of the dialog. 525 std::wstring title(LoadString(IDS_MESSAGE_SELECT_MOVE_DESTINATION)); 526 std::vector<wchar_t> titleBuffer(title.length() + 1); 527 wcscpy_s(&titleBuffer.front(), title.length() + 1, title.c_str()); 528 529 //Then set the display settings. 530 info.lpszTitle = &titleBuffer.front(); 531 info.ulFlags = BIF_RETURNONLYFSDIRS | BIF_RETURNFSANCESTORS | BIF_USENEWUI | BIF_SHAREABLE; 532 533 //Display the dialog. 534 PIDLIST_ABSOLUTE pidl = SHBrowseForFolder(&info); 535 536 wchar_t buffer[MAX_PATH]; 537 bool pathSucceeded = SHGetPathFromIDList(pidl, buffer); 538 ILFree(pidl); 539 if (pathSucceeded) 540 DragDropDestinationDirectory = buffer; 541 else 542 return E_ABORT; 543 } 544 545 commandLine += L"\"/destination=" + DragDropDestinationDirectory + L"\""; 546 break; 547 513 548 default: 514 549 if (!(pCmdInfo->fMask & CMIC_MASK_FLAG_NO_UI)) … … 559 594 case INVOKEREASON_FILEFOLDER: 560 595 result |= ACTION_ERASE | ACTION_ERASE_ON_RESTART | ACTION_ERASE_UNUSED_SPACE; 561 #if 0562 596 case INVOKEREASON_DRAGDROP: 563 597 result |= ACTION_SECURE_MOVE; 564 #endif565 598 } 566 599 … … 815 848 finalParameters += L"/action=EraseUnusedSpace "; 816 849 break; 850 case ACTION_SECURE_MOVE: 851 finalParameters += L"/action=SecureMove "; 852 break; 817 853 default: 818 854 return; -
trunk/eraser/Eraser.Shell/Eraser.Shell.rc
r2008 r2062 221 221 END 222 222 223 STRINGTABLE 224 BEGIN 225 IDS_MESSAGE_SELECT_MOVE_DESTINATION 226 "Select the destination of the selected items" 227 END 228 223 229 #endif // English (Neutral) resources 224 230 ///////////////////////////////////////////////////////////////////////////// -
trunk/eraser/Eraser.Shell/resource.h
r2006 r2062 1 1 //{{NO_DEPENDENCIES}} 2 2 // Microsoft Visual C++ generated include file. 3 // Used by ShellExt.rc3 // Used by Eraser.Shell.rc 4 4 // 5 5 #define IDS_PROJNAME 100 … … 22 22 #define IDS_ERROR_MISC 405 23 23 #define IDS_ERROR_CANNOT_GENERATE_TEMP_FILE 406 24 #define IDS_MESSAGE_SELECT_MOVE_DESTINATION 500 24 25 25 26 // Next default values for new objects -
trunk/eraser/Eraser/Program.cs
r2051 r2062 115 115 [Arg("recycleBin", "The recycle bin as an erasure target", typeof(string), false, null, null)] 116 116 public bool RecycleBin { get; set; } 117 118 /// <summary> 119 /// The destination for secure move operations, only valid when 120 /// <see cref="ShellAction"/> is <see cref="ShellActions.SecureMove"/> 121 /// </summary> 122 [Arg("destination", "The destination for secure move operations", typeof(string), false, null, null)] 123 public string Destination { get; set; } 117 124 } 118 125 … … 132 139 /// Erase the unused space on the drive. 133 140 /// </summary> 134 EraseUnusedSpace 141 EraseUnusedSpace, 142 143 /// <summary> 144 /// Securely moves a file from one drive to another (simple rename if the source and 145 /// destination drives are the same) 146 /// </summary> 147 SecureMove 135 148 } 136 149
Note: See TracChangeset
for help on using the changeset viewer.
