[EXPLORER]

* Handle the /select cmd option. Patch by Edijs Kolesnikovics.
See issue #6096 for more details.

svn path=/trunk/; revision=56371
This commit is contained in:
Amine Khaldi 2012-04-20 19:21:16 +00:00
parent b9a7b90af3
commit 9714322e59
4 changed files with 24 additions and 2 deletions

View file

@ -66,7 +66,7 @@ target_link_libraries(explorer
wine
uuid)
add_importlibs(explorer advapi32 gdi32 user32 ws2_32 msimg32 comctl32 ole32 oleaut32 shell32 notifyhook msvcrt kernel32 ntdll)
add_importlibs(explorer advapi32 gdi32 user32 ws2_32 msimg32 comctl32 ole32 oleaut32 shell32 shlwapi notifyhook msvcrt kernel32 ntdll)
set_image_base(explorer 0x00400000)
add_dependencies(explorer psdk)
add_cd_file(TARGET explorer DESTINATION reactos FOR all)

View file

@ -805,13 +805,33 @@ bool ExplorerCmd::EvaluateOption(LPCTSTR option)
_mdi = true;
else if (!_tcsicmp(option, TEXT("sdi")))
_mdi = false;
else if (!_tcsicmp(option, TEXT("n")))
{
// Do nothing
}
else if (!_tcsicmp(option, TEXT("select")))
{
SelectOpt = TRUE;
}
else
return false;
} else {
if (!_path.empty())
return false;
_path = opt_str;
if((SelectOpt == TRUE) && (PathFileExists(option)))
{
WCHAR szDir[MAX_PATH];
_wsplitpath(option, szPath, szDir, NULL, NULL);
wcscat(szPath, szDir);
PathRemoveBackslash(szPath);
_path = szPath;
SelectOpt = FALSE;
}
else
_path = opt_str;
}
return true;

View file

@ -110,6 +110,7 @@ struct ExplorerCmd
bool IsValidPath() const;
String _path;
WCHAR szPath[MAX_PATH];
int _flags; // OPEN_WINDOW_MODE
int _cmdShow;
bool _mdi;

View file

@ -29,6 +29,7 @@
#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT 1
#include <limits.h>
#include "shlwapi.h"
#include "utility/utility.h"