[ros-diffs] [mf] 20481: lean explorer:

mf at svn.reactos.org mf at svn.reactos.org
Sat Dec 31 14:37:15 CET 2005


lean explorer:
- simplfy SCAN flags
- disable WINFS in favor to code size using only shell namespace
Modified:
branches/lean-explorer/reactos/subsys/system/explorer/explorer.dsp
Modified:
branches/lean-explorer/reactos/subsys/system/explorer/explorer.h
Modified:
branches/lean-explorer/reactos/subsys/system/explorer/rosshell.dsp
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/mainframe.cp
p
Modified:
branches/lean-explorer/reactos/subsys/system/explorer/shell/shellbrowser
.cpp
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/shell/winfs.cpp
Modified:
branches/lean-explorer/reactos/subsys/system/explorer/shell/winfs.h
Modified:
branches/lean-explorer/reactos/subsys/system/explorer/taskbar/quicklaunc
h.cpp
Modified:
branches/lean-explorer/reactos/subsys/system/explorer/taskbar/startmenu.
cpp
Modified:
branches/lean-explorer/reactos/subsys/system/explorer/taskbar/startmenu.
h
  _____  

Modified:
branches/lean-explorer/reactos/subsys/system/explorer/explorer.dsp
--- branches/lean-explorer/reactos/subsys/system/explorer/explorer.dsp
2005-12-31 11:33:46 UTC (rev 20480)
+++ branches/lean-explorer/reactos/subsys/system/explorer/explorer.dsp
2005-12-31 13:37:09 UTC (rev 20481)
@@ -416,6 +416,7 @@

 # Begin Source File
 
 SOURCE=.\shell\winfs.cpp
+# PROP Exclude_From_Build 1
 # End Source File
 # Begin Source File
 
  _____  

Modified:
branches/lean-explorer/reactos/subsys/system/explorer/explorer.h
--- branches/lean-explorer/reactos/subsys/system/explorer/explorer.h
2005-12-31 11:33:46 UTC (rev 20480)
+++ branches/lean-explorer/reactos/subsys/system/explorer/explorer.h
2005-12-31 13:37:09 UTC (rev 20481)
@@ -26,11 +26,20 @@

  //
 
 
+#define _LIGHT_STARTMENU
+//#define _LAZY_ICONEXTRACT
+//#define _SINGLE_ICONEXTRACT
+#define _NO_WIN_FS
+
+
 #include "utility/shellclasses.h"
 
 #include "shell/entries.h"
 
+#ifndef _NO_WIN_FS
 #include "shell/winfs.h"
+#endif
+
 #include "shell/shellfs.h"
 
 #include "utility/window.h"
  _____  

Modified:
branches/lean-explorer/reactos/subsys/system/explorer/rosshell.dsp
--- branches/lean-explorer/reactos/subsys/system/explorer/rosshell.dsp
2005-12-31 11:33:46 UTC (rev 20480)
+++ branches/lean-explorer/reactos/subsys/system/explorer/rosshell.dsp
2005-12-31 13:37:09 UTC (rev 20481)
@@ -233,6 +233,11 @@

 # End Source File
 # Begin Source File
 
+SOURCE=".\explorer-jp.rc"
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
 SOURCE=.\res\explorer.ico
 # End Source File
 # Begin Source File
@@ -297,11 +302,6 @@
 # End Source File
 # Begin Source File
 
-SOURCE=".\explorer-jp.rc"
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
 SOURCE=.\res\rosshell.ico
 # End Source File
 # Begin Source File
@@ -408,6 +408,7 @@
 # Begin Source File
 
 SOURCE=.\shell\winfs.cpp
+# PROP Exclude_From_Build 1
 # End Source File
 # Begin Source File
 
  _____  

Modified:
branches/lean-explorer/reactos/subsys/system/explorer/shell/entries.cpp
---
branches/lean-explorer/reactos/subsys/system/explorer/shell/entries.cpp
2005-12-31 11:33:46 UTC (rev 20480)
+++
branches/lean-explorer/reactos/subsys/system/explorer/shell/entries.cpp
2005-12-31 13:37:09 UTC (rev 20481)
@@ -30,8 +30,12 @@

 
 
  // allocate and initialise a directory entry
+#ifndef _NO_WIN_FS
 Entry::Entry(ENTRY_TYPE etype)
  :	_etype(etype)
+#else
+Entry::Entry()
+#endif
 {
 	_up = NULL;
 	_next = NULL;
@@ -46,9 +50,14 @@
 	_content = NULL;
 }
 
+#ifndef _NO_WIN_FS
 Entry::Entry(Entry* parent, ENTRY_TYPE etype)
  :	_up(parent),
 	_etype(etype)
+#else
+Entry::Entry(Entry* parent)
+ :	_up(parent)
+#endif
 {
 	_next = NULL;
 	_down = NULL;
@@ -83,7 +92,9 @@
 	_type_name = other._type_name? _tcsdup(other._type_name): NULL;
 	_content = other._content? _tcsdup(other._content): NULL;
 
+#ifndef _NO_WIN_FS
 	_etype = other._etype;
+#endif
 	_icon_id = other._icon_id;
 
 	_bhfi = other._bhfi;
  _____  

Modified:
branches/lean-explorer/reactos/subsys/system/explorer/shell/entries.h
---
branches/lean-explorer/reactos/subsys/system/explorer/shell/entries.h
2005-12-31 11:33:46 UTC (rev 20480)
+++
branches/lean-explorer/reactos/subsys/system/explorer/shell/entries.h
2005-12-31 13:37:09 UTC (rev 20481)
@@ -26,11 +26,12 @@

  //
 
 
+#ifndef _NO_WIN_FS
 enum ENTRY_TYPE {
-	ET_UNKNOWN,
 	ET_WINDOWS,
 	ET_SHELL
 };
+#endif
 
 enum SORT_ORDER {
 	SORT_NONE,
@@ -41,12 +42,8 @@
 };
 
 enum SCAN_FLAGS {
-	SCAN_EXTRACT_ICONS	= 1,
-	SCAN_DO_ACCESS		= 2,
-
-	SCAN_ALL			= 3,
-
-	SCAN_FILESYSTEM		= 4
+	SCAN_DONT_EXTRACT_ICONS	= 1,
+	SCAN_DONT_ACCESS		= 2
 };
 
 #ifndef ATTRIBUTE_SYMBOLIC_LINK
@@ -62,8 +59,13 @@
 struct Entry
 {
 protected:
+#ifndef _NO_WIN_FS
 	Entry(ENTRY_TYPE etype);
 	Entry(Entry* parent, ENTRY_TYPE etype);
+#else
+	Entry();
+	Entry(Entry* parent);
+#endif
 	Entry(const Entry&);
 
 public:
@@ -84,7 +86,9 @@
 	LPTSTR		_type_name;
 	LPTSTR		_content;
 
+#ifndef _NO_WIN_FS
 	ENTRY_TYPE	_etype;
+#endif
 	int /*ICON_ID*/ _icon_id;
 
 	BY_HANDLE_FILE_INFORMATION _bhfi;
@@ -92,14 +96,14 @@
 
 	void	free_subentries();
 
-	void	read_directory(SORT_ORDER sortOrder, int
scan_flags=SCAN_ALL);
+	void	read_directory(SORT_ORDER sortOrder, int scan_flags=0);
 	Entry*	read_tree(const void* path, SORT_ORDER sortOrder);
 	void	sort_directory(SORT_ORDER sortOrder);
-	void	smart_scan(int scan_flags=SCAN_ALL);
+	void	smart_scan(int scan_flags=0);
 	int		extract_icon();
 	int		safe_extract_icon();
 
-	virtual void read_directory(int scan_flags=SCAN_ALL) {}
+	virtual void read_directory(int scan_flags=0) {}
 	virtual const void* get_next_path_component(const void*) const
{return NULL;}
 	virtual Entry* find_entry(const void*) {return NULL;}
 	virtual bool get_path(PTSTR path) const = 0;
  _____  

Modified:
branches/lean-explorer/reactos/subsys/system/explorer/shell/mainframe.cp
p
---
branches/lean-explorer/reactos/subsys/system/explorer/shell/mainframe.cp
p	2005-12-31 11:33:46 UTC (rev 20480)
+++
branches/lean-explorer/reactos/subsys/system/explorer/shell/mainframe.cp
p	2005-12-31 13:37:09 UTC (rev 20481)
@@ -175,7 +175,6 @@

 	} else {
 		_create_info._open_mode = mode;
 		_create_info._shell_path = path;
-		_create_info._root_shell_path =
SpecialFolderPath(CSIDL_DRIVES, _hwnd);	//@@
 
 		update_explorer_view();
 	}
@@ -192,7 +191,6 @@
 	} else {
 		_create_info._open_mode = mode;
 		_create_info._shell_path = path;
-		_create_info._root_shell_path =
SpecialFolderPath(CSIDL_DRIVES, _hwnd);	//@@
 
 		update_explorer_view();
 	}
@@ -305,6 +303,11 @@
 			path = buffer;
 		}
 
+		if (wparam & OWM_ROOTED)
+			_create_info._root_shell_path = shell_path;
+		else
+			_create_info._root_shell_path =
SpecialFolderPath(CSIDL_DRIVES, _hwnd);
+
 		jump_to(shell_path, (OPEN_WINDOW_MODE)wparam);
 		return TRUE;}	// success
 
  _____  

Modified:
branches/lean-explorer/reactos/subsys/system/explorer/shell/shellbrowser
.cpp
---
branches/lean-explorer/reactos/subsys/system/explorer/shell/shellbrowser
.cpp	2005-12-31 11:33:46 UTC (rev 20480)
+++
branches/lean-explorer/reactos/subsys/system/explorer/shell/shellbrowser
.cpp	2005-12-31 13:37:09 UTC (rev 20481)
@@ -263,13 +263,18 @@

 	if (itemData) {
 		Entry* entry = (Entry*)itemData;
 
-		if (entry->_etype == ET_SHELL) {
+#ifndef _NO_WIN_FS
+		if (entry->_etype == ET_SHELL)
+#endif
+		{
 			ShellDirectory* dir =
static_cast<ShellDirectory*>(entry->_up);
 			ShellFolder folder = dir? dir->_folder:
GetDesktopFolder();
 			LPCITEMIDLIST pidl =
static_cast<ShellEntry*>(entry)->_pidl;
 
 			CHECKERROR(ShellFolderContextMenu(folder, _hwnd,
1, &pidl, pptScreen->x, pptScreen->y, _cm_ifs));
-		} else {
+		}
+#ifndef _NO_WIN_FS
+		else {
 			ShellPath shell_path =
entry->create_absolute_pidl();
 			LPCITEMIDLIST pidl_abs = shell_path;
 
@@ -287,6 +292,7 @@
 
 			CHECKERROR(hr);
 		}
+#endif
 	}
 }
 
@@ -301,16 +307,19 @@
 		if (lpdi->item.mask & TVIF_TEXT)
 			lpdi->item.pszText = entry->_display_name;
 
-		if (lpdi->item.mask & (TVIF_IMAGE|TVIF_SELECTEDIMAGE)) {
-			ShellPath pidl_abs =
entry->create_absolute_pidl();	// Caching of absolute PIDLs could
enhance performance.
-			LPCITEMIDLIST pidl = pidl_abs;
+		if (lpdi->item.mask & (TVIF_IMAGE|TVIF_SELECTEDIMAGE))
+			try {
+				ShellPath pidl_abs =
entry->create_absolute_pidl();	// Caching of absolute PIDLs could
enhance performance.
+				LPCITEMIDLIST pidl = pidl_abs;
 
-			if (lpdi->item.mask & TVIF_IMAGE)
-				lpdi->item.iImage =
get_entry_image(entry, pidl, SHGFI_SMALLICON, _image_map);
+				if (lpdi->item.mask & TVIF_IMAGE)
+					lpdi->item.iImage =
get_entry_image(entry, pidl, SHGFI_SMALLICON, _image_map);
 
-			if (lpdi->item.mask & TVIF_SELECTEDIMAGE)
-				lpdi->item.iSelectedImage =
get_entry_image(entry, pidl, SHGFI_SMALLICON|SHGFI_OPENICON,
_image_map_open);
-		}
+				if (lpdi->item.mask &
TVIF_SELECTEDIMAGE)
+					lpdi->item.iSelectedImage =
get_entry_image(entry, pidl, SHGFI_SMALLICON|SHGFI_OPENICON,
_image_map_open);
+			} catch(COMException&) {
+				// ignore exception
+			}
 	}
 }
 
@@ -662,7 +671,9 @@
 					Entry* entry =
parent->find_entry(pidl);
 
 					if (entry &&
(entry->_data.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY))
+#ifndef _NO_WIN_FS
 						if (entry->_etype ==
ET_SHELL)
+#endif
 							if
(expand_folder(static_cast<ShellDirectory*>(entry)))
 								return
S_OK;
 				}
@@ -748,14 +759,17 @@
 		}
 	}
 
-	 // in case of any problem directly call UpdateFolderView()
+	 // If not already called, now directly call UpdateFolderView()
using pidl.
 	if (!entry)
 		UpdateFolderView(ShellFolder(pidl));
 }
 
 void ShellBrowserChild::jump_to(Entry* entry)
 {
-	if (entry->_etype == ET_SHELL) {
+#ifndef _NO_WIN_FS
+	if (entry->_etype == ET_SHELL)
+#endif
+	{
 		IShellFolder* folder;
 		ShellDirectory* se =
static_cast<ShellDirectory*>(entry);
 
@@ -769,8 +783,13 @@
 			return;
 		}
 
-		UpdateFolderView(folder);
+		if (_create_info._open_mode & OWM_EXPLORE) {
 
+			//@@ todo
+
+		} else;
+			UpdateFolderView(folder);
+
 		_cur_dir = se;
 	}
 }
  _____  

Modified:
branches/lean-explorer/reactos/subsys/system/explorer/shell/shellfs.cpp
---
branches/lean-explorer/reactos/subsys/system/explorer/shell/shellfs.cpp
2005-12-31 11:33:46 UTC (rev 20480)
+++
branches/lean-explorer/reactos/subsys/system/explorer/shell/shellfs.cpp
2005-12-31 13:37:09 UTC (rev 20481)
@@ -110,13 +110,19 @@

 	CONTEXT("ShellEntry::create_absolute_pidl()");
 
 	if (_up)
-		if (_up->_etype == ET_SHELL) {
+#ifndef _NO_WIN_FS
+		if (_up->_etype == ET_SHELL)
+#endif
+		{
 			ShellDirectory* dir =
static_cast<ShellDirectory*>(_up);
 
 			if (dir->_pidl->mkid.cb)	// Caching of
absolute PIDLs could enhance performance.
 				return
_pidl.create_absolute_pidl(dir->create_absolute_pidl());
-		} else
+		}
+#ifndef _NO_WIN_FS
+		else
 			return
_pidl.create_absolute_pidl(_up->create_absolute_pidl());
+#endif
 
 	return _pidl;
 }
@@ -217,9 +223,10 @@
 	/*if (_folder.empty())
 		return;*/
 
+#ifndef _NO_WIN_FS
 	TCHAR buffer[MAX_PATH];
 
-	if ((scan_flags&SCAN_FILESYSTEM) && get_path(buffer)) {
+	if (get_path(buffer)) {
 		Entry* entry = NULL;	// eliminate useless GCC warning
by initializing entry
 
 		LPTSTR p = buffer + _tcslen(buffer);
@@ -259,7 +266,7 @@
 
 				entry->_level = level;
 
-				if (scan_flags & SCAN_DO_ACCESS) {
+				if (!(scan_flags & SCAN_DONT_ACCESS)) {
 					HANDLE hFile =
CreateFile(buffer, GENERIC_READ,
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
 
0, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0);
 
@@ -277,7 +284,7 @@
 				DWORD attribs = SFGAO_FILESYSTEM;
 
 				if (w32fd.dwFileAttributes &
FILE_ATTRIBUTE_DIRECTORY)
-					attribs |= SFGAO_FOLDER;
+					attribs |=
SFGAO_FOLDER|SFGAO_HASSUBFOLDER;
 
 				if (w32fd.dwFileAttributes &
FILE_ATTRIBUTE_READONLY)
 					attribs |= SFGAO_READONLY;
@@ -297,7 +304,7 @@
 
 				if (w32fd.dwFileAttributes &
FILE_ATTRIBUTE_DIRECTORY)
 					entry->_icon_id = ICID_FOLDER;
-				else if (scan_flags &
SCAN_EXTRACT_ICONS)
+				else if (!(scan_flags &
SCAN_DONT_EXTRACT_ICONS))
 					entry->_icon_id =
entry->safe_extract_icon();
 
 				last = entry;
@@ -306,7 +313,10 @@
 			FindClose(hFind);
 		}
 
-	} else { // !SCAN_FILESYSTEM
+	}
+	else // no file system path
+#endif
+	{
 
 		ShellItemEnumerator enumerator(_folder,
SHCONTF_FOLDERS|SHCONTF_NONFOLDERS|SHCONTF_INCLUDEHIDDEN|SHCONTF_SHAREAB
LE|SHCONTF_STORAGE);
 
@@ -346,7 +356,7 @@
 					if (attribs & SFGAO_REMOVABLE) {
 						attribs |=
SFGAO_HASSUBFOLDER;
 						removeable = true;
-					} else if (scan_flags &
SCAN_DO_ACCESS) {
+					} else if (!(scan_flags &
SCAN_DONT_ACCESS)) {
 						DWORD attribs2 =
SFGAO_READONLY;
 
 						HRESULT hr =
_folder->GetAttributesOf(1, (LPCITEMIDLIST*)&pidls[n], &attribs2);
@@ -358,7 +368,7 @@
 					attribs = 0;
 
 				bhfi_valid =
fill_w32fdata_shell(pidls[n], attribs, &w32fd, &bhfi,
-
(scan_flags&SCAN_DO_ACCESS) && !removeable);
+
!(scan_flags&SCAN_DONT_ACCESS) && !removeable);
 
 				try {
 					Entry* entry = NULL;	//
eliminate useless GCC warning by initializing entry
@@ -399,7 +409,7 @@
 					 // get icons for files and
virtual objects
 					if
(!(entry->_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ||
 						!(attribs &
SFGAO_FILESYSTEM)) {
-						if (scan_flags &
SCAN_EXTRACT_ICONS)
+						if (!(scan_flags &
SCAN_DONT_EXTRACT_ICONS))
 							entry->_icon_id
= entry->safe_extract_icon();
 					} else if
(entry->_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
 						entry->_icon_id =
ICID_FOLDER;
@@ -439,7 +449,10 @@
 	LPITEMIDLIST pidl = (LPITEMIDLIST) p;
 
 	for(Entry*entry=_down; entry; entry=entry->_next)
-		if (entry->_etype == ET_SHELL) {
+#ifndef _NO_WIN_FS
+		if (entry->_etype == ET_SHELL)
+#endif
+		{
 			ShellEntry* se =
static_cast<ShellEntry*>(entry);
 
 			if (se->_pidl &&
se->_pidl->mkid.cb==pidl->mkid.cb && !memcmp(se->_pidl, pidl,
se->_pidl->mkid.cb))
  _____  

Modified:
branches/lean-explorer/reactos/subsys/system/explorer/shell/shellfs.h
---
branches/lean-explorer/reactos/subsys/system/explorer/shell/shellfs.h
2005-12-31 11:33:46 UTC (rev 20480)
+++
branches/lean-explorer/reactos/subsys/system/explorer/shell/shellfs.h
2005-12-31 13:37:09 UTC (rev 20481)
@@ -29,8 +29,13 @@

  /// shell file/directory entry
 struct ShellEntry : public Entry
 {
+#ifndef _NO_WIN_FS
 	ShellEntry(Entry* parent, LPITEMIDLIST shell_path) :
Entry(parent, ET_SHELL), _pidl(shell_path) {}
 	ShellEntry(Entry* parent, const ShellPath& shell_path) :
Entry(parent, ET_SHELL), _pidl(shell_path) {}
+#else
+	ShellEntry(Entry* parent, LPITEMIDLIST shell_path) :
Entry(parent), _pidl(shell_path) {}
+	ShellEntry(Entry* parent, const ShellPath& shell_path) :
Entry(parent), _pidl(shell_path) {}
+#endif
 
 	virtual bool get_path(PTSTR path) const;
 	virtual ShellPath create_absolute_pidl() const;
@@ -42,8 +47,13 @@
 	ShellPath	_pidl;	// parent relative PIDL
 
 protected:
+#ifndef _NO_WIN_FS
 	ShellEntry(LPITEMIDLIST shell_path) : Entry(ET_SHELL),
_pidl(shell_path) {}
 	ShellEntry(const ShellPath& shell_path) : Entry(ET_SHELL),
_pidl(shell_path) {}
+#else
+	ShellEntry(LPITEMIDLIST shell_path) : _pidl(shell_path) {}
+	ShellEntry(const ShellPath& shell_path) : _pidl(shell_path) {}
+#endif
 };
 
 
@@ -98,7 +108,7 @@
 		pFolder->Release();
 	}
 
-	virtual void read_directory(int scan_flags=SCAN_ALL);
+	virtual void read_directory(int scan_flags=0);
 	virtual const void* get_next_path_component(const void*) const;
 	virtual Entry* find_entry(const void* p);
 
  _____  

Modified:
branches/lean-explorer/reactos/subsys/system/explorer/shell/winfs.cpp
---
branches/lean-explorer/reactos/subsys/system/explorer/shell/winfs.cpp
2005-12-31 11:33:46 UTC (rev 20480)
+++
branches/lean-explorer/reactos/subsys/system/explorer/shell/winfs.cpp
2005-12-31 13:37:09 UTC (rev 20481)
@@ -51,6 +51,17 @@

 
 	if (hFind != INVALID_HANDLE_VALUE) {
 		do {
+			 // ignore hidden files (usefull in the start
menu)
+			if (w32fd.dwFileAttributes &
FILE_ATTRIBUTE_HIDDEN)
+				continue;
+
+			 // ignore directory entries "." and ".."
+			if
((w32fd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY) &&
+				w32fd.cFileName[0]==TEXT('.') &&
+				(w32fd.cFileName[1]==TEXT('\0') ||
+				(w32fd.cFileName[1]==TEXT('.') &&
w32fd.cFileName[2]==TEXT('\0'))))
+				continue;
+
 			lstrcpy(pname+1, w32fd.cFileName);
 
 			if (w32fd.dwFileAttributes &
FILE_ATTRIBUTE_DIRECTORY)
@@ -70,7 +81,7 @@
 			 // display file type names, but don't hide file
extensions
 			g_Globals._ftype_mgr.set_type(entry, true);
 
-			if (scan_flags & SCAN_DO_ACCESS) {
+			if (!(scan_flags & SCAN_DONT_ACCESS)) {
 				HANDLE hFile = CreateFile(buffer,
GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
 
0, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0);
 
@@ -85,7 +96,8 @@
 			last = entry;	// There is always at least one
entry, because FindFirstFile() succeeded and we don't filter the file
entries.
 		} while(FindNextFile(hFind, &w32fd));
 
-		last->_next = NULL;
+		if (last)
+			last->_next = NULL;
 
 		FindClose(hFind);
 	}
  _____  

Modified:
branches/lean-explorer/reactos/subsys/system/explorer/shell/winfs.h
--- branches/lean-explorer/reactos/subsys/system/explorer/shell/winfs.h
2005-12-31 11:33:46 UTC (rev 20480)
+++ branches/lean-explorer/reactos/subsys/system/explorer/shell/winfs.h
2005-12-31 13:37:09 UTC (rev 20481)
@@ -60,7 +60,7 @@

 		_path = NULL;
 	}
 
-	virtual void read_directory(int scan_flags=SCAN_ALL);
+	virtual void read_directory(int scan_flags=0);
 	virtual const void* get_next_path_component(const void* p)
const;
 	virtual Entry* find_entry(const void*);
 };
  _____  

Modified:
branches/lean-explorer/reactos/subsys/system/explorer/taskbar/quicklaunc
h.cpp
---
branches/lean-explorer/reactos/subsys/system/explorer/taskbar/quicklaunc
h.cpp	2005-12-31 11:33:46 UTC (rev 20480)
+++
branches/lean-explorer/reactos/subsys/system/explorer/taskbar/quicklaunc
h.cpp	2005-12-31 13:37:09 UTC (rev 20481)
@@ -104,7 +104,7 @@

 		RecursiveCreateDirectory(path);
 		_dir = new ShellDirectory(GetDesktopFolder(), path,
_hwnd);
 
-		_dir->smart_scan(SCAN_EXTRACT_ICONS|SCAN_FILESYSTEM);
+		_dir->smart_scan(SCAN_DONT_ACCESS);
 	} catch(COMException&) {
 		return;
 	}
  _____  

Modified:
branches/lean-explorer/reactos/subsys/system/explorer/taskbar/startmenu.
cpp
---
branches/lean-explorer/reactos/subsys/system/explorer/taskbar/startmenu.
cpp	2005-12-31 11:33:46 UTC (rev 20480)
+++
branches/lean-explorer/reactos/subsys/system/explorer/taskbar/startmenu.
cpp	2005-12-31 13:37:09 UTC (rev 20481)
@@ -211,9 +211,9 @@

 			WaitCursor wait;
 
 #ifdef _LAZY_ICONEXTRACT
-			dir.smart_scan(SCAN_FILESYSTEM);	// lazy
icon extraction, try to read directly from filesystem
+			dir.smart_scan(SCAN_DONT_EXTRACT_ICONS);
// extract icons later
 #else
-
dir.smart_scan(SCAN_EXTRACT_ICONS|SCAN_FILESYSTEM);
+			dir.smart_scan();
 #endif
 		}
 
@@ -268,10 +268,14 @@
 		if (++cnt == max)
 			break;
 
+#ifndef _NO_WIN_FS
 		if (entry->_etype == ET_SHELL)
 			AddEntry(dir._folder,
static_cast<ShellEntry*>(entry));
 		else
 			AddEntry(dir._folder, entry);
+#else
+			AddEntry(dir._folder,
static_cast<ShellEntry*>(entry));
+#endif
 	}
 }
 
@@ -1234,6 +1238,7 @@
 
 			///@todo If the user explicitly clicked on a
submenu, display this folder as floating start menu.
 
+#ifndef _NO_WIN_FS
 			if (entry->_etype == ET_SHELL)
 
new_folders.push_back(entry->create_absolute_pidl());
 			else {
@@ -1242,6 +1247,9 @@
 				if (entry->get_path(path))
 					new_folders.push_back(path);
 			}
+#else
+
new_folders.push_back(entry->create_absolute_pidl());
+#endif
 
 			if (title.empty())
 				title = entry->_display_name;
@@ -2018,9 +2026,9 @@
 			WaitCursor wait;
 
 #ifdef _LAZY_ICONEXTRACT
-			dir.smart_scan(SCAN_FILESYSTEM);
+			dir.smart_scan(SCAN_DONT_EXTRACT_ICONS);
 #else
-
dir.smart_scan(SCAN_EXTRACT_ICONS|SCAN_FILESYSTEM);
+			dir.smart_scan();
 #endif
 		}
 
  _____  

Modified:
branches/lean-explorer/reactos/subsys/system/explorer/taskbar/startmenu.
h
---
branches/lean-explorer/reactos/subsys/system/explorer/taskbar/startmenu.
h	2005-12-31 11:33:46 UTC (rev 20480)
+++
branches/lean-explorer/reactos/subsys/system/explorer/taskbar/startmenu.
h	2005-12-31 13:37:09 UTC (rev 20481)
@@ -26,11 +26,6 @@

  //
 
 
-#define _LIGHT_STARTMENU
-//#define _LAZY_ICONEXTRACT
-//#define _SINGLE_ICONEXTRACT
-
-
 #define	CLASSNAME_STARTMENU
TEXT("ReactosStartmenuClass")
 #define	TITLE_STARTMENU			TEXT("Start Menu")
 
@@ -138,7 +133,7 @@
 
 typedef list<ShellPath> StartMenuFolders;
 
- /// structor containing information for creating start menus
+ /// struct containing information for creating start menus
 struct StartMenuCreateInfo
 {
 	StartMenuCreateInfo() : _border_top(0) {}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20051231/d87bcfd0/attachment.html


More information about the Ros-diffs mailing list