mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
[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:
parent
b9a7b90af3
commit
9714322e59
4 changed files with 24 additions and 2 deletions
|
@ -66,7 +66,7 @@ target_link_libraries(explorer
|
||||||
wine
|
wine
|
||||||
uuid)
|
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)
|
set_image_base(explorer 0x00400000)
|
||||||
add_dependencies(explorer psdk)
|
add_dependencies(explorer psdk)
|
||||||
add_cd_file(TARGET explorer DESTINATION reactos FOR all)
|
add_cd_file(TARGET explorer DESTINATION reactos FOR all)
|
||||||
|
|
|
@ -805,13 +805,33 @@ bool ExplorerCmd::EvaluateOption(LPCTSTR option)
|
||||||
_mdi = true;
|
_mdi = true;
|
||||||
else if (!_tcsicmp(option, TEXT("sdi")))
|
else if (!_tcsicmp(option, TEXT("sdi")))
|
||||||
_mdi = false;
|
_mdi = false;
|
||||||
|
else if (!_tcsicmp(option, TEXT("n")))
|
||||||
|
{
|
||||||
|
// Do nothing
|
||||||
|
}
|
||||||
|
else if (!_tcsicmp(option, TEXT("select")))
|
||||||
|
{
|
||||||
|
SelectOpt = TRUE;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (!_path.empty())
|
if (!_path.empty())
|
||||||
return false;
|
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;
|
return true;
|
||||||
|
|
|
@ -110,6 +110,7 @@ struct ExplorerCmd
|
||||||
bool IsValidPath() const;
|
bool IsValidPath() const;
|
||||||
|
|
||||||
String _path;
|
String _path;
|
||||||
|
WCHAR szPath[MAX_PATH];
|
||||||
int _flags; // OPEN_WINDOW_MODE
|
int _flags; // OPEN_WINDOW_MODE
|
||||||
int _cmdShow;
|
int _cmdShow;
|
||||||
bool _mdi;
|
bool _mdi;
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT 1
|
#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT 1
|
||||||
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
#include "shlwapi.h"
|
||||||
|
|
||||||
#include "utility/utility.h"
|
#include "utility/utility.h"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue