mirror of
https://github.com/reactos/reactos.git
synced 2024-07-29 23:58:44 +00:00
read configuration of hidden file extensions from registry
svn path=/trunk/; revision=7453
This commit is contained in:
parent
42a645bad5
commit
73990aee98
|
@ -41,7 +41,7 @@ FONT 8, "Helv"
|
||||||
CONTROL "", 12298, "COMBOBOX", WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100
|
CONTROL "", 12298, "COMBOBOX", WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100
|
||||||
DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP
|
DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP
|
||||||
PUSHBUTTON "Löschen", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP
|
PUSHBUTTON "Löschen", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP
|
||||||
PUSHBUTTON "&Schmökern...", 12288, 170, 63, 50, 14, WS_TABSTOP
|
PUSHBUTTON "&Suchen...", 12288, 170, 63, 50, 14, WS_TABSTOP
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Namen der Header für die Shellviews */
|
/* Namen der Header für die Shellviews */
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* Nearly complete informations about the binary formats
|
* Nearly complete informations about the binary formats
|
||||||
* of .lnk files avaiable at http://www.wotsit.org
|
* of .lnk files available at http://www.wotsit.org
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -602,22 +602,33 @@ void _FS_ProcessDisplayFilename(LPSTR szPath, DWORD dwFlags)
|
||||||
DWORD dwDataSize = sizeof (DWORD);
|
DWORD dwDataSize = sizeof (DWORD);
|
||||||
BOOL doHide = FALSE; /* The default value is FALSE (win98 at least) */
|
BOOL doHide = FALSE; /* The default value is FALSE (win98 at least) */
|
||||||
|
|
||||||
LPSTR ext = PathFindExtensionA(szPath);
|
if (!RegCreateKeyExA (HKEY_CURRENT_USER,
|
||||||
if (ext) {
|
|
||||||
if (!strcasecmp(ext,".lnk") || !strcasecmp(ext,".url")) /*FIXME read from registry */
|
|
||||||
doHide = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* XXX should it do this only for known file types? -- that would make it even slower! */
|
|
||||||
/* XXX That's what the prompt says!! */
|
|
||||||
if (!doHide && !RegCreateKeyExA (HKEY_CURRENT_USER,
|
|
||||||
"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
|
"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
|
||||||
0, 0, 0, KEY_ALL_ACCESS, 0, &hKey, 0)) {
|
0, 0, 0, KEY_ALL_ACCESS, 0, &hKey, 0)) {
|
||||||
if (!RegQueryValueExA (hKey, "HideFileExt", 0, 0, (LPBYTE) & dwData, &dwDataSize))
|
if (!RegQueryValueExA (hKey, "HideFileExt", 0, 0, (LPBYTE) & dwData, &dwDataSize))
|
||||||
doHide = dwData;
|
doHide = dwData;
|
||||||
|
|
||||||
RegCloseKey (hKey);
|
RegCloseKey (hKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!doHide) {
|
||||||
|
LPSTR ext = PathFindExtensionA(szPath);
|
||||||
|
|
||||||
|
if (ext) {
|
||||||
|
HKEY hkey;
|
||||||
|
char classname[MAX_PATH];
|
||||||
|
LONG classlen = MAX_PATH;
|
||||||
|
|
||||||
|
if (!RegQueryValueA(HKEY_CLASSES_ROOT, ext, classname, &classlen))
|
||||||
|
if (!RegOpenKeyA(HKEY_CLASSES_ROOT, classname, &hkey)) {
|
||||||
|
if (!RegQueryValueExA(hkey, "NeverShowExt", 0, NULL, NULL, NULL))
|
||||||
|
doHide = TRUE;
|
||||||
|
|
||||||
|
RegCloseKey(hkey);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (doHide && szPath[0] != '.')
|
if (doHide && szPath[0] != '.')
|
||||||
PathRemoveExtensionA (szPath);
|
PathRemoveExtensionA (szPath);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue