Author: rharabien
Date: Tue Jan 10 19:57:53 2012
New Revision: 54906
URL:
http://svn.reactos.org/svn/reactos?rev=54906&view=rev
Log:
[SHELL32]
- Don't check exe files for Open With application
- If application is invalid display proper text
- Properly handle application parameters and quotes when parsing application command.
Patch by EDIJS, improved by me.
See issue #6770 for more details.
Modified:
trunk/reactos/dll/win32/shell32/fprop.cpp
trunk/reactos/dll/win32/shell32/lang/bg-BG.rc
trunk/reactos/dll/win32/shell32/lang/ca-ES.rc
trunk/reactos/dll/win32/shell32/lang/cs-CZ.rc
trunk/reactos/dll/win32/shell32/lang/da-DK.rc
trunk/reactos/dll/win32/shell32/lang/de-DE.rc
trunk/reactos/dll/win32/shell32/lang/el-GR.rc
trunk/reactos/dll/win32/shell32/lang/en-GB.rc
trunk/reactos/dll/win32/shell32/lang/en-US.rc
trunk/reactos/dll/win32/shell32/lang/es-ES.rc
trunk/reactos/dll/win32/shell32/lang/fi-FI.rc
trunk/reactos/dll/win32/shell32/lang/fr-FR.rc
trunk/reactos/dll/win32/shell32/lang/hu-HU.rc
trunk/reactos/dll/win32/shell32/lang/it-IT.rc
trunk/reactos/dll/win32/shell32/lang/ja-JP.rc
trunk/reactos/dll/win32/shell32/lang/ko-KR.rc
trunk/reactos/dll/win32/shell32/lang/nl-NL.rc
trunk/reactos/dll/win32/shell32/lang/no-NO.rc
trunk/reactos/dll/win32/shell32/lang/pl-PL.rc
trunk/reactos/dll/win32/shell32/lang/pt-BR.rc
trunk/reactos/dll/win32/shell32/lang/pt-PT.rc
trunk/reactos/dll/win32/shell32/lang/ro-RO.rc
trunk/reactos/dll/win32/shell32/lang/ru-RU.rc
trunk/reactos/dll/win32/shell32/lang/sk-SK.rc
trunk/reactos/dll/win32/shell32/lang/sl-SI.rc
trunk/reactos/dll/win32/shell32/lang/sv-SE.rc
trunk/reactos/dll/win32/shell32/lang/tr-TR.rc
trunk/reactos/dll/win32/shell32/lang/uk-UA.rc
trunk/reactos/dll/win32/shell32/lang/zh-CN.rc
trunk/reactos/dll/win32/shell32/lang/zh-TW.rc
trunk/reactos/dll/win32/shell32/newmenu.cpp
trunk/reactos/dll/win32/shell32/openwithmenu.cpp
trunk/reactos/dll/win32/shell32/shellpath.cpp
trunk/reactos/dll/win32/shell32/shresdef.h
Modified: trunk/reactos/dll/win32/shell32/fprop.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/fprop.cp…
==============================================================================
--- trunk/reactos/dll/win32/shell32/fprop.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/fprop.cpp [iso-8859-1] Tue Jan 10 19:57:53 2012
@@ -31,52 +31,39 @@
} LANGANDCODEPAGE, *LPLANGANDCODEPAGE;
EXTERN_C HPSXA WINAPI SHCreatePropSheetExtArrayEx(HKEY hKey, LPCWSTR pszSubKey, UINT
max_iface, IDataObject *pDataObj);
-
-static LONG
-SH_GetAssociatedApplication(LPCWSTR pwszFileExt, WCHAR *pwszAssocApp)
-{
- WCHAR wszBuf[MAX_PATH] = {0};
- LONG result;
+BOOL PathIsExeW(LPCWSTR lpszPath);
+
+static VOID
+SH_FileGeneralOpensWith(HWND hwndDlg, LPCWSTR pwszExt)
+{
+ WCHAR wszBuf[MAX_PATH] = L"";
+ WCHAR wszBuf2[MAX_PATH] = L"";
DWORD dwSize = sizeof(wszBuf);
- result = RegGetValueW(HKEY_CLASSES_ROOT, pwszFileExt, L"", RRF_RT_REG_SZ,
NULL, wszBuf, &dwSize);
-
- if (result == ERROR_SUCCESS)
- {
- StringCbCat(wszBuf, sizeof(wszBuf), L"\\shell\\open\\command");
- dwSize = MAX_PATH * sizeof(WCHAR);
- result = RegGetValueW(HKEY_CLASSES_ROOT, wszBuf, L"", RRF_RT_REG_SZ,
NULL, pwszAssocApp, &dwSize);
- /* FIXME: Make it return full path instead of
- notepad.exe "%1"
- %systemroot%\notepad.exe "%1"
- etc
- Maybe there is code to do that somewhere?
- dll\win32\shell32\shlexec.c for example? */
- }
-
- if (result != ERROR_SUCCESS)
- pwszAssocApp[0] = '\0';
-
- return result;
-}
-
-static LONG
-SH_FileGeneralOpensWith(HWND hwndDlg, LPCWSTR fileext)
-{
- LONG result;
- WCHAR wAppName[MAX_PATH] = {0};
- WCHAR wAssocApp[MAX_PATH] = {0};
-
- result = SH_GetAssociatedApplication(fileext, wAssocApp);
-
- if (result == ERROR_SUCCESS)
- {
- _wsplitpath(wAssocApp, NULL, NULL, wAppName, NULL);
-
- SetDlgItemTextW(hwndDlg, 14007, wAppName);
- }
-
- return result;
+ if (RegGetValueW(HKEY_CLASSES_ROOT, pwszExt, L"", RRF_RT_REG_SZ, NULL,
wszBuf, &dwSize) == ERROR_SUCCESS)
+ {
+ StringCbCatW(wszBuf, sizeof(wszBuf), L"\\shell\\open\\command");
+ dwSize = sizeof(wszBuf2);
+ if (RegGetValueW(HKEY_CLASSES_ROOT, wszBuf, L"", RRF_RT_REG_SZ, NULL,
wszBuf2, &dwSize) == ERROR_SUCCESS)
+ {
+ /* Get path from command line */
+ ExpandEnvironmentStringsW(wszBuf2, wszBuf, _countof(wszBuf));
+ PathRemoveArgs(wszBuf);
+ PathUnquoteSpacesW(wszBuf);
+ PathRemoveExtension(wszBuf);
+ LPWSTR pwszFilename = PathFindFileNameW(wszBuf);
+ pwszFilename[0] = towupper(pwszFilename[0]);
+ SetDlgItemTextW(hwndDlg, 14007, pwszFilename);
+ //PathSearchAndQualify(wAssocAppFullPath, wAssocAppFullPath, MAX_PATH);
+ return;
+ } else
+ WARN("RegGetValueW %ls failed\n", wszBuf);
+ } else
+ WARN("RegGetValueW %ls failed\n", pwszExt);
+
+ /* Unknown application */
+ LoadStringW(shell32_hInstance, IDS_UNKNOWN_APP, wszBuf, _countof(wszBuf));
+ SetDlgItemTextW(hwndDlg, 14007, wszBuf);
}
/*************************************************************************
@@ -365,20 +352,21 @@
*/
static BOOL
-SH_FileGeneralSetFileSizeTime(HWND hwndDlg, LPCWSTR lpfilename, PULARGE_INTEGER
lpfilesize)
-{
- BOOL result;
+SH_FileGeneralSetFileSizeTime(HWND hwndDlg, LPCWSTR pwszPath)
+{
HANDLE hFile;
- FILETIME create_time;
- FILETIME accessed_time;
- FILETIME write_time;
- WCHAR resultstr[MAX_PATH];
- LARGE_INTEGER file_size;
-
- if (lpfilename == NULL)
- return FALSE;
-
- hFile = CreateFileW(lpfilename,
+ FILETIME CreateTime;
+ FILETIME AccessedTime;
+ FILETIME WriteTime;
+ WCHAR wszBuf[MAX_PATH];
+ LARGE_INTEGER FileSize;
+
+ if (pwszPath == NULL)
+ return FALSE;
+
+ TRACE("SH_FileGeneralSetFileSizeTime %ls\n", pwszPath);
+
+ hFile = CreateFileW(pwszPath,
GENERIC_READ,
FILE_SHARE_READ,
NULL,
@@ -388,34 +376,18 @@
if (hFile == INVALID_HANDLE_VALUE)
{
- WARN("failed to open file %s\n", debugstr_w(lpfilename));
- return FALSE;
- }
-
- result = GetFileTime(hFile, &create_time, &accessed_time, &write_time);
-
- if (!result)
+ WARN("failed to open file %s\n", debugstr_w(pwszPath));
+ return FALSE;
+ }
+
+ if (!GetFileTime(hFile, &CreateTime, &AccessedTime, &WriteTime))
{
WARN("GetFileTime failed\n");
- return FALSE;
- }
-
- if (SHFileGeneralGetFileTimeString(&create_time, resultstr))
- {
- SetDlgItemTextW(hwndDlg, 14015, resultstr);
- }
-
- if (SHFileGeneralGetFileTimeString(&accessed_time, resultstr))
- {
- SetDlgItemTextW(hwndDlg, 14019, resultstr);
- }
-
- if (SHFileGeneralGetFileTimeString(&write_time, resultstr))
- {
- SetDlgItemTextW(hwndDlg, 14017, resultstr);
- }
-
- if (!GetFileSizeEx(hFile, &file_size))
+ CloseHandle(hFile);
+ return FALSE;
+ }
+
+ if (!GetFileSizeEx(hFile, &FileSize))
{
WARN("GetFileSize failed\n");
CloseHandle(hFile);
@@ -424,16 +396,21 @@
CloseHandle(hFile);
- if (!SH_FormatFileSizeWithBytes((PULARGE_INTEGER)&file_size,
- resultstr,
- sizeof(resultstr) / sizeof(WCHAR)))
- return FALSE;
-
- TRACE("result size %u resultstr %s\n", file_size.QuadPart,
debugstr_w(resultstr));
- SetDlgItemTextW(hwndDlg, 14011, resultstr);
-
- if (lpfilesize)
- lpfilesize->QuadPart = (ULONGLONG)file_size.QuadPart;
+ if (SHFileGeneralGetFileTimeString(&CreateTime, wszBuf))
+ SetDlgItemTextW(hwndDlg, 14015, wszBuf);
+
+ if (SHFileGeneralGetFileTimeString(&AccessedTime, wszBuf))
+ SetDlgItemTextW(hwndDlg, 14019, wszBuf);
+
+ if (SHFileGeneralGetFileTimeString(&WriteTime, wszBuf))
+ SetDlgItemTextW(hwndDlg, 14017, wszBuf);
+
+ if (SH_FormatFileSizeWithBytes((PULARGE_INTEGER)&FileSize,
+ wszBuf,
+ sizeof(wszBuf) / sizeof(WCHAR)))
+ {
+ SetDlgItemTextW(hwndDlg, 14011, wszBuf);
+ }
return TRUE;
}
@@ -679,11 +656,9 @@
LPCWSTR pwszPath = (WCHAR *)ppsp->lParam;
if (pwszPath == NULL)
{
- ERR("no filename\n");
+ ERR("no path\n");
break;
}
-
- LPCWSTR pwszExt = PathFindExtensionW(pwszPath);
/* set general text properties filename filelocation and icon */
SH_FileGeneralSetText(hwndDlg, pwszPath);
@@ -692,10 +667,11 @@
SH_FileGeneralSetFileType(hwndDlg, pwszPath);
/* set opens with */
- SH_FileGeneralOpensWith(hwndDlg, pwszExt);
+ if (!PathIsExeW(pwszPath))
+ SH_FileGeneralOpensWith(hwndDlg, PathFindExtensionW(pwszPath));
/* set file time create/modfied/accessed */
- SH_FileGeneralSetFileSizeTime(hwndDlg, pwszPath, NULL);
+ SH_FileGeneralSetFileSizeTime(hwndDlg, pwszPath);
return TRUE;
}
@@ -800,32 +776,24 @@
WCHAR wszPath[MAX_PATH];
StringCbCopyW(wszPath, sizeof(wszPath), pwszPath);
- //
- // get length
- //
- INT cchPath = wcslen(wszPath);
- if (cchPath > 3 && wszPath[cchPath-1] == L'\\')
- {
- //
- // remove trailing \\ at the end of path
- //
- wszPath[cchPath-1] = L'\0';
- }
-
+ /* remove trailing \\ at the end of path */
+ PathRemoveBackslashW(wszPath);
+
+ /* Handle drives */
if (PathIsRootW(wszPath))
return SH_ShowDriveProperties(wszPath, pidlFolder, apidl);
+ /* Handle folders */
if (PathIsDirectoryW(wszPath))
return SH_ShowFolderProperties(wszPath, pidlFolder, apidl);
- LPCWSTR pwszFilename = PathFindFileNameW(wszPath);
-
+ /* Handle files */
PROPSHEETHEADERW Info;
memset(&Info, 0x0, sizeof(PROPSHEETHEADERW));
Info.dwSize = sizeof(PROPSHEETHEADERW);
Info.dwFlags = PSH_NOCONTEXTHELP | PSH_PROPTITLE;
Info.phpage = hppages;
- Info.pszCaption = pwszFilename;
+ Info.pszCaption = PathFindFileNameW(wszPath);
hppages[Info.nPages] =
SH_CreatePropertySheetPage("SHELL_FILE_GENERAL_DLG",
Modified: trunk/reactos/dll/win32/shell32/lang/bg-BG.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/bg-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/bg-BG.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/bg-BG.rc [iso-8859-1] Tue Jan 10 19:57:53 2012
@@ -771,8 +771,9 @@
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
IDS_BYTES_FORMAT "bytes"
-END
-
-
-
-
+ IDS_UNKNOWN_APP "Unknown application"
+END
+
+
+
+
Modified: trunk/reactos/dll/win32/shell32/lang/ca-ES.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/ca-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/ca-ES.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/ca-ES.rc [iso-8859-1] Tue Jan 10 19:57:53 2012
@@ -770,4 +770,5 @@
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
IDS_BYTES_FORMAT "bytes"
-END
+ IDS_UNKNOWN_APP "Unknown application"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/cs-CZ.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/cs-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/cs-CZ.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/cs-CZ.rc [iso-8859-1] Tue Jan 10 19:57:53 2012
@@ -758,4 +758,5 @@
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
IDS_BYTES_FORMAT "bytes"
-END
+ IDS_UNKNOWN_APP "Unknown application"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/da-DK.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/da-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/da-DK.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/da-DK.rc [iso-8859-1] Tue Jan 10 19:57:53 2012
@@ -759,4 +759,5 @@
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
IDS_BYTES_FORMAT "bytes"
-END
+ IDS_UNKNOWN_APP "Unknown application"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/de-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/de-DE.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/de-DE.rc [iso-8859-1] Tue Jan 10 19:57:53 2012
@@ -775,4 +775,5 @@
IDS_FILE_TYPES "Dateitypen"
IDS_COLUMN_EXTENSION "Erweiterungen"
IDS_BYTES_FORMAT "Bytes"
-END
+ IDS_UNKNOWN_APP "Unknown application"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/el-GR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/el-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/el-GR.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/el-GR.rc [iso-8859-1] Tue Jan 10 19:57:53 2012
@@ -771,4 +771,5 @@
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
IDS_BYTES_FORMAT "bytes"
-END
+ IDS_UNKNOWN_APP "Unknown application"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/en-GB.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/en-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/en-GB.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/en-GB.rc [iso-8859-1] Tue Jan 10 19:57:53 2012
@@ -770,4 +770,5 @@
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
IDS_BYTES_FORMAT "bytes"
-END
+ IDS_UNKNOWN_APP "Unknown application"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/en-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/en-US.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/en-US.rc [iso-8859-1] Tue Jan 10 19:57:53 2012
@@ -780,4 +780,5 @@
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
IDS_BYTES_FORMAT "bytes"
-END
+ IDS_UNKNOWN_APP "Unknown application"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/es-ES.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/es-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/es-ES.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/es-ES.rc [iso-8859-1] Tue Jan 10 19:57:53 2012
@@ -783,4 +783,5 @@
IDS_FILE_TYPES "Tipos de archivos"
IDS_COLUMN_EXTENSION "Extensiones"
IDS_BYTES_FORMAT "bytes"
-END
+ IDS_UNKNOWN_APP "Unknown application"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/fi-FI.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/fi-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/fi-FI.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/fi-FI.rc [iso-8859-1] Tue Jan 10 19:57:53 2012
@@ -770,4 +770,5 @@
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
IDS_BYTES_FORMAT "bytes"
-END
+ IDS_UNKNOWN_APP "Unknown application"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/fr-FR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/fr-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/fr-FR.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/fr-FR.rc [iso-8859-1] Tue Jan 10 19:57:53 2012
@@ -774,4 +774,5 @@
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
IDS_BYTES_FORMAT "bytes"
-END
+ IDS_UNKNOWN_APP "Unknown application"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/hu-HU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/hu-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/hu-HU.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/hu-HU.rc [iso-8859-1] Tue Jan 10 19:57:53 2012
@@ -773,4 +773,5 @@
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
IDS_BYTES_FORMAT "bytes"
-END
+ IDS_UNKNOWN_APP "Unknown application"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/it-IT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/it-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/it-IT.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/it-IT.rc [iso-8859-1] Tue Jan 10 19:57:53 2012
@@ -781,4 +781,5 @@
IDS_FILE_TYPES "Tipi di file"
IDS_COLUMN_EXTENSION "Estensioni"
IDS_BYTES_FORMAT "byte"
-END
+ IDS_UNKNOWN_APP "Unknown application"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/ja-JP.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/ja-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/ja-JP.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/ja-JP.rc [iso-8859-1] Tue Jan 10 19:57:53 2012
@@ -770,4 +770,5 @@
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
IDS_BYTES_FORMAT "bytes"
-END
+ IDS_UNKNOWN_APP "Unknown application"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/ko-KR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/ko-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/ko-KR.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/ko-KR.rc [iso-8859-1] Tue Jan 10 19:57:53 2012
@@ -770,4 +770,5 @@
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
IDS_BYTES_FORMAT "bytes"
-END
+ IDS_UNKNOWN_APP "Unknown application"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/nl-NL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/nl-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/nl-NL.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/nl-NL.rc [iso-8859-1] Tue Jan 10 19:57:53 2012
@@ -770,4 +770,5 @@
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
IDS_BYTES_FORMAT "bytes"
-END
+ IDS_UNKNOWN_APP "Unknown application"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/no-NO.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/no-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/no-NO.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/no-NO.rc [iso-8859-1] Tue Jan 10 19:57:53 2012
@@ -773,4 +773,5 @@
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
IDS_BYTES_FORMAT "bytes"
-END
+ IDS_UNKNOWN_APP "Unknown application"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/pl-PL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/pl-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/pl-PL.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/pl-PL.rc [iso-8859-1] Tue Jan 10 19:57:53 2012
@@ -778,4 +778,5 @@
IDS_FILE_TYPES "Typy plików"
IDS_COLUMN_EXTENSION "Rozszerzenia"
IDS_BYTES_FORMAT "bajtów"
-END
+ IDS_UNKNOWN_APP "Nieznana aplikacja"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/pt-BR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/pt-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/pt-BR.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/pt-BR.rc [iso-8859-1] Tue Jan 10 19:57:53 2012
@@ -772,4 +772,5 @@
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
IDS_BYTES_FORMAT "bytes"
-END
+ IDS_UNKNOWN_APP "Unknown application"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/pt-PT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/pt-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/pt-PT.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/pt-PT.rc [iso-8859-1] Tue Jan 10 19:57:53 2012
@@ -773,4 +773,5 @@
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
IDS_BYTES_FORMAT "bytes"
-END
+ IDS_UNKNOWN_APP "Unknown application"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/ro-RO.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/ro-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/ro-RO.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/ro-RO.rc [iso-8859-1] Tue Jan 10 19:57:53 2012
@@ -789,5 +789,6 @@
IDS_FILE_TYPES "Tipuri"
IDS_COLUMN_EXTENSION "Extensii"
IDS_BYTES_FORMAT "octeÈi"
-END
-
+ IDS_UNKNOWN_APP "Unknown application"
+END
+
Modified: trunk/reactos/dll/win32/shell32/lang/ru-RU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/ru-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/ru-RU.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/ru-RU.rc [iso-8859-1] Tue Jan 10 19:57:53 2012
@@ -768,4 +768,5 @@
IDS_FILE_TYPES "Ð¢Ð¸Ð¿Ñ Ñайлов"
IDS_COLUMN_EXTENSION "РаÑÑиÑениÑ"
IDS_BYTES_FORMAT "bytes"
-END
+ IDS_UNKNOWN_APP "Unknown application"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/sk-SK.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/sk-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/sk-SK.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/sk-SK.rc [iso-8859-1] Tue Jan 10 19:57:53 2012
@@ -778,4 +778,5 @@
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
IDS_BYTES_FORMAT "bytes"
-END
+ IDS_UNKNOWN_APP "Unknown application"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/sl-SI.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/sl-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/sl-SI.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/sl-SI.rc [iso-8859-1] Tue Jan 10 19:57:53 2012
@@ -770,4 +770,5 @@
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
IDS_BYTES_FORMAT "bytes"
-END
+ IDS_UNKNOWN_APP "Unknown application"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/sv-SE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/sv-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/sv-SE.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/sv-SE.rc [iso-8859-1] Tue Jan 10 19:57:53 2012
@@ -770,4 +770,5 @@
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
IDS_BYTES_FORMAT "bytes"
-END
+ IDS_UNKNOWN_APP "Unknown application"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/tr-TR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/tr-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/tr-TR.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/tr-TR.rc [iso-8859-1] Tue Jan 10 19:57:53 2012
@@ -770,4 +770,5 @@
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
IDS_BYTES_FORMAT "bytes"
-END
+ IDS_UNKNOWN_APP "Unknown application"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/uk-UA.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/uk-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/uk-UA.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/uk-UA.rc [iso-8859-1] Tue Jan 10 19:57:53 2012
@@ -783,4 +783,5 @@
IDS_FILE_TYPES "Типи ФайлÑв"
IDS_COLUMN_EXTENSION "РозÑиÑеннÑ"
IDS_BYTES_FORMAT "bytes"
-END
+ IDS_UNKNOWN_APP "Unknown application"
+END
Modified: trunk/reactos/dll/win32/shell32/lang/zh-CN.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/zh-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/zh-CN.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/zh-CN.rc [iso-8859-1] Tue Jan 10 19:57:53 2012
@@ -758,5 +758,6 @@
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
IDS_BYTES_FORMAT "bytes"
-END
-
+ IDS_UNKNOWN_APP "Unknown application"
+END
+
Modified: trunk/reactos/dll/win32/shell32/lang/zh-TW.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/zh-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/zh-TW.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/zh-TW.rc [iso-8859-1] Tue Jan 10 19:57:53 2012
@@ -770,5 +770,6 @@
IDS_FILE_TYPES "FileTypes"
IDS_COLUMN_EXTENSION "Extensions"
IDS_BYTES_FORMAT "bytes"
-END
-
+ IDS_UNKNOWN_APP "Unknown application"
+END
+
Modified: trunk/reactos/dll/win32/shell32/newmenu.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/newmenu.…
==============================================================================
--- trunk/reactos/dll/win32/shell32/newmenu.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/newmenu.cpp [iso-8859-1] Tue Jan 10 19:57:53 2012
@@ -135,7 +135,7 @@
{
/* Note: We are using ANSI function because strings can be treated as data */
cbData = 0;
- DWORD dwFlags = Types[i].bStr ? RRF_RT_REG_SZ|RRF_RT_REG_EXPAND_SZ : RRF_RT_ANY;
+ DWORD dwFlags = Types[i].bStr ? RRF_RT_REG_SZ : RRF_RT_ANY;
if (RegGetValueA(hKey, NULL, Types[i].pszName, dwFlags, NULL, NULL, &cbData)
== ERROR_SUCCESS)
{
if (Types[i].bNeedData && cbData > 0)
Modified: trunk/reactos/dll/win32/shell32/openwithmenu.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/openwith…
==============================================================================
--- trunk/reactos/dll/win32/shell32/openwithmenu.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/openwithmenu.cpp [iso-8859-1] Tue Jan 10 19:57:53
2012
@@ -28,6 +28,8 @@
// [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system]
// "NoInternetOpenWith"=dword:00000001
//
+
+BOOL PathIsExeW(LPCWSTR lpszPath);
class COpenWithList
{
@@ -1350,9 +1352,7 @@
TRACE("szPath %s\n", debugstr_w(m_wszPath));
pwszExt = PathFindExtensionW(m_wszPath);
- if (!_wcsicmp(pwszExt, L".exe") || !_wcsicmp(pwszExt, L".com")
||
- !_wcsicmp(pwszExt, L".scr") || !_wcsicmp(pwszExt, L".bat")
||
- !_wcsicmp(pwszExt, L".cmd") || !_wcsicmp(pwszExt, L".lnk"))
+ if (PathIsExeW(pwszExt) || !_wcsicmp(pwszExt, L".lnk"))
{
TRACE("file is a executable or shortcut\n");
return E_FAIL;
Modified: trunk/reactos/dll/win32/shell32/shellpath.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shellpat…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shellpath.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shellpath.cpp [iso-8859-1] Tue Jan 10 19:57:53 2012
@@ -177,7 +177,7 @@
/*************************************************************************
* PathIsExeW [internal]
*/
-static BOOL PathIsExeW (LPCWSTR lpszPath)
+BOOL PathIsExeW (LPCWSTR lpszPath)
{
LPCWSTR lpszExtension = PathGetExtensionW(lpszPath);
int i;
Modified: trunk/reactos/dll/win32/shell32/shresdef.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shresdef…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shresdef.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shresdef.h [iso-8859-1] Tue Jan 10 19:57:53 2012
@@ -144,6 +144,8 @@
#define IDS_RUNDLG_BROWSE_ERROR 181
#define IDS_RUNDLG_BROWSE_CAPTION 182
#define IDS_RUNDLG_BROWSE_FILTER 183
+
+#define IDS_UNKNOWN_APP 190
#define IDS_OPEN_VERB 300
#define IDS_EXPLORE_VERB 301