Author: akhaldi Date: Fri Apr 20 19:21:16 2012 New Revision: 56371
URL: http://svn.reactos.org/svn/reactos?rev=56371&view=rev Log: [EXPLORER] * Handle the /select cmd option. Patch by Edijs Kolesnikovics. See issue #6096 for more details.
Modified: trunk/reactos/base/shell/explorer/CMakeLists.txt trunk/reactos/base/shell/explorer/explorer.cpp trunk/reactos/base/shell/explorer/explorer.h trunk/reactos/base/shell/explorer/precomp.h
Modified: trunk/reactos/base/shell/explorer/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/CMakeLi... ============================================================================== --- trunk/reactos/base/shell/explorer/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer/CMakeLists.txt [iso-8859-1] Fri Apr 20 19:21:16 2012 @@ -66,7 +66,7 @@ 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)
Modified: trunk/reactos/base/shell/explorer/explorer.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/explore... ============================================================================== --- trunk/reactos/base/shell/explorer/explorer.cpp [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer/explorer.cpp [iso-8859-1] Fri Apr 20 19:21:16 2012 @@ -805,13 +805,33 @@ _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;
Modified: trunk/reactos/base/shell/explorer/explorer.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/explore... ============================================================================== --- trunk/reactos/base/shell/explorer/explorer.h [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer/explorer.h [iso-8859-1] Fri Apr 20 19:21:16 2012 @@ -110,6 +110,7 @@ bool IsValidPath() const;
String _path; + WCHAR szPath[MAX_PATH]; int _flags; // OPEN_WINDOW_MODE int _cmdShow; bool _mdi;
Modified: trunk/reactos/base/shell/explorer/precomp.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/precomp... ============================================================================== --- trunk/reactos/base/shell/explorer/precomp.h [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer/precomp.h [iso-8859-1] Fri Apr 20 19:21:16 2012 @@ -29,6 +29,7 @@ #define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT 1
#include <limits.h> +#include "shlwapi.h"
#include "utility/utility.h"