lean explorer: remove unused attributes
Modified:
branches/lean-explorer/reactos/subsys/system/explorer/explorer.cpp
Modified:
branches/lean-explorer/reactos/subsys/system/explorer/shell/entries.cpp
Modified:
branches/lean-explorer/reactos/subsys/system/explorer/shell/entries.h
Modified:
branches/lean-explorer/reactos/subsys/system/explorer/shell/shellfs.cpp
Modified:
branches/lean-explorer/reactos/subsys/system/explorer/shell/shellfs.h
_____
Modified:
branches/lean-explorer/reactos/subsys/system/explorer/explorer.cpp
--- branches/lean-explorer/reactos/subsys/system/explorer/explorer.cpp
2005-12-31 14:24:43 UTC (rev 20482)
+++ branches/lean-explorer/reactos/subsys/system/explorer/explorer.cpp
2005-12-31 14:33:58 UTC (rev 20483)
@@ -156,9 +156,6 @@
if (ext) {
const FileTypeInfo& type = (*this)[ext];
- if (!type._displayname.empty())
- entry->_type_name = _tcsdup(type._displayname);
-
// hide some file extensions
if (type._neverShowExt && !dont_hide_ext) {
int len = ext - entry->_data.cFileName;
_____
Modified:
branches/lean-explorer/reactos/subsys/system/explorer/shell/entries.cpp
---
branches/lean-explorer/reactos/subsys/system/explorer/shell/entries.cpp
2005-12-31 14:24:43 UTC (rev 20482)
+++
branches/lean-explorer/reactos/subsys/system/explorer/shell/entries.cpp
2005-12-31 14:33:58 UTC (rev 20483)
@@ -37,12 +37,9 @@
_down = NULL;
_expanded = false;
_scanned = false;
- _bhfi_valid = false;
_level = 0;
_icon_id = ICID_UNKNOWN;
_display_name = _data.cFileName;
- _type_name = NULL;
- _content = NULL;
}
Entry::Entry(Entry* parent)
@@ -52,12 +49,9 @@
_down = NULL;
_expanded = false;
_scanned = false;
- _bhfi_valid = false;
_level = 0;
_icon_id = ICID_UNKNOWN;
_display_name = _data.cFileName;
- _type_name = NULL;
- _content = NULL;
}
Entry::Entry(const Entry& other)
@@ -78,13 +72,8 @@
_shell_attribs = other._shell_attribs;
_display_name = other._display_name==other._data.cFileName?
_data.cFileName: _tcsdup(other._display_name);
- _type_name = other._type_name? _tcsdup(other._type_name): NULL;
- _content = other._content? _tcsdup(other._content): NULL;
_icon_id = other._icon_id;
-
- _bhfi = other._bhfi;
- _bhfi_valid = other._bhfi_valid;
}
// free a directory entry
@@ -95,12 +84,6 @@
if (_display_name != _data.cFileName)
free(_display_name);
-
- if (_type_name)
- free(_type_name);
-
- if (_content)
- free(_content);
}
_____
Modified:
branches/lean-explorer/reactos/subsys/system/explorer/shell/entries.h
---
branches/lean-explorer/reactos/subsys/system/explorer/shell/entries.h
2005-12-31 14:24:43 UTC (rev 20482)
+++
branches/lean-explorer/reactos/subsys/system/explorer/shell/entries.h
2005-12-31 14:33:58 UTC (rev 20483)
@@ -71,14 +71,9 @@
SFGAOF _shell_attribs;
LPTSTR _display_name;
- LPTSTR _type_name;
- LPTSTR _content;
int /*ICON_ID*/ _icon_id;
- BY_HANDLE_FILE_INFORMATION _bhfi;
- bool _bhfi_valid;
-
void free_subentries();
void read_directory(SORT_ORDER sortOrder, int scan_flags=0);
_____
Modified:
branches/lean-explorer/reactos/subsys/system/explorer/shell/shellfs.cpp
---
branches/lean-explorer/reactos/subsys/system/explorer/shell/shellfs.cpp
2005-12-31 14:24:43 UTC (rev 20482)
+++
branches/lean-explorer/reactos/subsys/system/explorer/shell/shellfs.cpp
2005-12-31 14:33:58 UTC (rev 20483)
@@ -31,12 +31,10 @@
#include <shlwapi.h>
-bool ShellDirectory::fill_w32fdata_shell(LPCITEMIDLIST pidl, SFGAOF
attribs, WIN32_FIND_DATA* pw32fdata, BY_HANDLE_FILE_INFORMATION* pbhfi,
bool do_access)
+void ShellDirectory::fill_w32fdata_shell(LPCITEMIDLIST pidl, SFGAOF
attribs, WIN32_FIND_DATA* pw32fdata, bool do_access)
{
CONTEXT("ShellDirectory::fill_w32fdata_shell()");
- bool bhfi_valid = false;
-
if (do_access && !( (attribs&SFGAO_FILESYSTEM) && SUCCEEDED(
SHGetDataFromIDList(_folder, pidl,
SHGDFIL_FINDDATA, pw32fdata, sizeof(WIN32_FIND_DATA))) )) {
WIN32_FILE_ATTRIBUTE_DATA fad;
@@ -73,16 +71,6 @@
}
}
- HANDLE hFile = CreateFile(path,
GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
-
0, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0);
-
- if (hFile != INVALID_HANDLE_VALUE) {
- if
(GetFileInformationByHandle(hFile, pbhfi))
- bhfi_valid = true;
-
- CloseHandle(hFile);
- }
-
SetErrorMode(sem_org);
GlobalUnlock(medium.hGlobal);
@@ -100,8 +88,6 @@
if (attribs & SFGAO_COMPRESSED)
pw32fdata->dwFileAttributes |=
FILE_ATTRIBUTE_COMPRESSED;
-
- return bhfi_valid;
}
@@ -238,8 +224,6 @@
for(ULONG n=0; n<cnt; ++n) {
WIN32_FIND_DATA w32fd;
- BY_HANDLE_FILE_INFORMATION bhfi;
- bool bhfi_valid = false;
memset(&w32fd, 0, sizeof(WIN32_FIND_DATA));
@@ -264,8 +248,7 @@
} else
attribs = 0;
- bhfi_valid = fill_w32fdata_shell(pidls[n],
attribs, &w32fd, &bhfi,
-
!(scan_flags&SCAN_DONT_ACCESS) && !removeable);
+ fill_w32fdata_shell(pidls[n], attribs, &w32fd,
!(scan_flags&SCAN_DONT_ACCESS)&&!removeable);
try {
Entry* entry = NULL; // eliminate
useless GCC warning by initializing entry
@@ -283,9 +266,6 @@
memcpy(&entry->_data, &w32fd,
sizeof(WIN32_FIND_DATA));
- if (bhfi_valid)
- memcpy(&entry->_bhfi, &bhfi,
sizeof(BY_HANDLE_FILE_INFORMATION));
-
if (SUCCEEDED(name_from_pidl(_folder,
pidls[n], name, MAX_PATH,
SHGDN_INFOLDER|0x2000/*0x2000=SHGDN_INCLUDE_NONFILESYS*/))) {
if (!entry->_data.cFileName[0])
_tcscpy(entry->_data.cFileName, name);
@@ -298,7 +278,6 @@
entry->_level = level;
entry->_shell_attribs = attribs;
- entry->_bhfi_valid = bhfi_valid;
// set file type name
g_Globals._ftype_mgr.set_type(entry);
_____
Modified:
branches/lean-explorer/reactos/subsys/system/explorer/shell/shellfs.h
---
branches/lean-explorer/reactos/subsys/system/explorer/shell/shellfs.h
2005-12-31 14:24:43 UTC (rev 20482)
+++
branches/lean-explorer/reactos/subsys/system/explorer/shell/shellfs.h
2005-12-31 14:33:58 UTC (rev 20483)
@@ -110,7 +110,7 @@
HWND _hwnd;
protected:
- bool fill_w32fdata_shell(LPCITEMIDLIST pidl, SFGAOF attribs,
WIN32_FIND_DATA*, BY_HANDLE_FILE_INFORMATION*, bool do_access=true);
+ void fill_w32fdata_shell(LPCITEMIDLIST pidl, SFGAOF attribs,
WIN32_FIND_DATA*, bool do_access=true);
};