activate printer folder menu
Modified: trunk/reactos/subsys/system/explorer/shell/entries.cpp
Modified: trunk/reactos/subsys/system/explorer/shell/shellbrowser.cpp
Modified: trunk/reactos/subsys/system/explorer/shell/shellfs.cpp
Modified: trunk/reactos/subsys/system/explorer/taskbar/desktopbar.h
Modified: trunk/reactos/subsys/system/explorer/taskbar/startmenu.cpp

Modified: trunk/reactos/subsys/system/explorer/shell/entries.cpp
--- trunk/reactos/subsys/system/explorer/shell/entries.cpp	2005-04-03 13:45:23 UTC (rev 14477)
+++ trunk/reactos/subsys/system/explorer/shell/entries.cpp	2005-04-03 14:32:47 UTC (rev 14478)
@@ -323,7 +323,7 @@
 
 	ICON_ID icon_id = ICID_NONE;
 
-	if (get_path(path))
+	if (get_path(path) && _tcsncmp(path,TEXT("::{"),3))
 		icon_id = g_Globals._icon_cache.extract(path);
 
 	if (icon_id == ICID_NONE) {

Modified: trunk/reactos/subsys/system/explorer/shell/shellbrowser.cpp
--- trunk/reactos/subsys/system/explorer/shell/shellbrowser.cpp	2005-04-03 13:45:23 UTC (rev 14477)
+++ trunk/reactos/subsys/system/explorer/shell/shellbrowser.cpp	2005-04-03 14:32:47 UTC (rev 14478)
@@ -485,6 +485,9 @@
 	_shellpath_info(info)	//@@ copies info -> no referenz to _create_info !
 {
 /**todo Conversion of shell path into path string -> store into URL history
+	const String& path = GetDesktopFolder().get_name(info._shell_path, SHGDN_FORADDRESSBAR);
+	const String& parsingpath = GetDesktopFolder().get_name(info._shell_path, SHGDN_FORPARSING);
+
 	 // store path into history
 	if (info._path && *info._path)
 		_url_history.push(info._path);

Modified: trunk/reactos/subsys/system/explorer/shell/shellfs.cpp
--- trunk/reactos/subsys/system/explorer/shell/shellfs.cpp	2005-04-03 13:45:23 UTC (rev 14477)
+++ trunk/reactos/subsys/system/explorer/shell/shellfs.cpp	2005-04-03 14:32:47 UTC (rev 14478)
@@ -235,7 +235,7 @@
 
 	TCHAR buffer[MAX_PATH];
 
-	if ((scan_flags&SCAN_FILESYSTEM) && get_path(buffer)) {
+	if ((scan_flags&SCAN_FILESYSTEM) && get_path(buffer) && _tcsncmp(buffer,TEXT("::{"),3)) {
 		Entry* entry = NULL;	// eliminate useless GCC warning by initializing entry
 
 		LPTSTR p = buffer + _tcslen(buffer);

Modified: trunk/reactos/subsys/system/explorer/taskbar/desktopbar.h
--- trunk/reactos/subsys/system/explorer/taskbar/desktopbar.h	2005-04-03 13:45:23 UTC (rev 14477)
+++ trunk/reactos/subsys/system/explorer/taskbar/desktopbar.h	2005-04-03 14:32:47 UTC (rev 14478)
@@ -50,13 +50,14 @@
 #define	IDC_NETWORK				0x100E
 #define	IDC_CONNECTIONS			0x100F
 #define	IDC_DRIVES				0x1010
-#define	IDC_SETTINGS_MENU		0x1011
-#define	IDC_CONTROL_PANEL		0x1012
+#define	IDC_CONTROL_PANEL		0x1011
+#define	IDC_SETTINGS_MENU		0x1012
 #define	IDC_PRINTERS			0x1013
-#define	IDC_BROWSE				0x1014
-#define	IDC_SEARCH_PROGRAM		0x1015
-#define	IDC_SEARCH				0x1016
-#define	IDC_TERMINATE			0x1017
+#define	IDC_PRINTERS_MENU		0x1014
+#define	IDC_BROWSE				0x1015
+#define	IDC_SEARCH_PROGRAM		0x1016
+#define	IDC_SEARCH				0x1017
+#define	IDC_TERMINATE			0x1018
 
 #define	IDC_FIRST_MENU			0x3000
 

Modified: trunk/reactos/subsys/system/explorer/taskbar/startmenu.cpp
--- trunk/reactos/subsys/system/explorer/taskbar/startmenu.cpp	2005-04-03 13:45:23 UTC (rev 14477)
+++ trunk/reactos/subsys/system/explorer/taskbar/startmenu.cpp	2005-04-03 14:32:47 UTC (rev 14478)
@@ -1854,31 +1854,52 @@
 		ExplorerPropertySheet(g_Globals._hwndDesktopBar);
 		break;
 
+	  case IDC_CONTROL_PANEL: {
+		CloseStartMenu(id);
+#ifndef _NO_MDI
+		XMLPos explorer_options = g_Globals.get_cfg("general/explorer");
+		bool mdi = XMLBool(explorer_options, "mdi", true);
+
+		if (mdi)
+			MDIMainFrame::Create(TEXT("::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}"), 0);
+		else
+#endif
+			SDIMainFrame::Create(TEXT("::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}"), 0);
+		break;}
+
 	  case IDC_SETTINGS_MENU:
 		CreateSubmenu(id, CSIDL_CONTROLS, ResString(IDS_SETTINGS_MENU));
 		break;
 
-	  case IDC_PRINTERS:
+	  case IDC_PRINTERS: {
+		CloseStartMenu(id);
 #ifdef _ROS_	// to be removed when printer folder will be implemented
 		MessageBox(0, TEXT("printer folder not yet implemented in SHELL32"), ResString(IDS_TITLE), MB_OK);
 #else
-		CreateSubmenu(id, CSIDL_PRINTERS, CSIDL_PRINTHOOD, ResString(IDS_PRINTERS));
-#endif
-		break;
-
-	  case IDC_CONTROL_PANEL: {
-		CloseStartMenu(id);
 #ifndef _NO_MDI
 		XMLPos explorer_options = g_Globals.get_cfg("general/explorer");
 		bool mdi = XMLBool(explorer_options, "mdi", true);
 
 		if (mdi)
-			MDIMainFrame::Create(TEXT("::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}"), 0);
+			MDIMainFrame::Create(TEXT("::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{2227A280-3AEA-1069-A2DE-08002B30309D}"), 0);
 		else
 #endif
-			SDIMainFrame::Create(TEXT("::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}"), 0);
+			SDIMainFrame::Create(TEXT("::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{2227A280-3AEA-1069-A2DE-08002B30309D}"), 0);
+#endif
 		break;}
 
+	  case IDC_PRINTERS_MENU:
+		CreateSubmenu(id, CSIDL_PRINTERS, CSIDL_PRINTHOOD, ResString(IDS_PRINTERS));
+/*		StartMenuFolders new_folders;
+
+		try {
+			new_folders.push_back(ShellPath(TEXT("::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{2227A280-3AEA-1069-A2DE-08002B30309D}")));
+		} catch(COMException&) {
+		}
+
+		CreateSubmenu(id, new_folders, ResString(IDS_PRINTERS));*/
+		break;
+
 	  case IDC_ADMIN:
 		CreateSubmenu(id, CSIDL_COMMON_ADMINTOOLS, CSIDL_ADMINTOOLS, ResString(IDS_ADMIN));
 		break;
@@ -2009,16 +2030,11 @@
 {
 	super::AddEntries();
 
-#ifndef __MINGW32__	// SHRestricted() missing in MinGW (as of 29.10.2003)
-	if (!g_Globals._SHRestricted || !SHRestricted(REST_NOCONTROLPANEL))
-#endif
-		AddButton(ResString(IDS_CONTROL_PANEL),	ICID_CONFIG, false, IDC_CONTROL_PANEL);
-
 #ifdef _ROS_	// to be removed when printer/network will be implemented
-	AddButton(ResString(IDS_PRINTERS),			ICID_PRINTER, false, IDC_PRINTERS);
+	AddButton(ResString(IDS_PRINTERS),			ICID_PRINTER, false, IDC_PRINTERS_MENU);
 	AddButton(ResString(IDS_CONNECTIONS),		ICID_NETWORK, false, IDC_CONNECTIONS);
 #else
-	AddButton(ResString(IDS_PRINTERS),			ICID_PRINTER, true, IDC_PRINTERS);
+	AddButton(ResString(IDS_PRINTERS),			ICID_PRINTER, true, IDC_PRINTERS_MENU);
 	AddButton(ResString(IDS_CONNECTIONS),		ICID_NETWORK, true, IDC_CONNECTIONS);
 #endif
 	AddButton(ResString(IDS_ADMIN),				ICID_CONFIG, true, IDC_ADMIN);
@@ -2029,6 +2045,13 @@
 		AddButton(ResString(IDS_SETTINGS_MENU),	ICID_CONFIG, true, IDC_SETTINGS_MENU);
 
 	AddButton(ResString(IDS_DESKTOPBAR_SETTINGS), ICID_CONFIG, false, ID_DESKTOPBAR_SETTINGS);
+
+	AddButton(ResString(IDS_PRINTERS),			ICID_PRINTER, false, IDC_PRINTERS);
+
+#ifndef __MINGW32__	// SHRestricted() missing in MinGW (as of 29.10.2003)
+	if (!g_Globals._SHRestricted || !SHRestricted(REST_NOCONTROLPANEL))
+#endif
+		AddButton(ResString(IDS_CONTROL_PANEL),	ICID_CONFIG, false, IDC_CONTROL_PANEL);
 }
 
 void BrowseMenu::AddEntries()