diff --git a/reactos/subsys/system/explorer/explorer_intres.h b/reactos/subsys/system/explorer/explorer_intres.h index 63b6a51512f..d05740dae38 100644 --- a/reactos/subsys/system/explorer/explorer_intres.h +++ b/reactos/subsys/system/explorer/explorer_intres.h @@ -19,6 +19,7 @@ #define IDS_ADMIN 15 #define IDS_NETWORK 16 #define IDS_CONNECTIONS 17 +#define IDS_DRIVES 18 #define IDI_REACTOS 100 #define IDI_EXPLORER 101 #define IDI_STARTMENU 102 diff --git a/reactos/subsys/system/explorer/explorer_intres.rc b/reactos/subsys/system/explorer/explorer_intres.rc index 9805fbddae8..2d2185f8fa4 100644 --- a/reactos/subsys/system/explorer/explorer_intres.rc +++ b/reactos/subsys/system/explorer/explorer_intres.rc @@ -262,6 +262,7 @@ STRINGTABLE DISCARDABLE BEGIN IDS_NETWORK "Network" IDS_CONNECTIONS "Connections" + IDS_DRIVES "File System" END #endif // German (Germany) resources diff --git a/reactos/subsys/system/explorer/taskbar/desktopbar.h b/reactos/subsys/system/explorer/taskbar/desktopbar.h index a83e6b6e8e9..085513314d2 100644 --- a/reactos/subsys/system/explorer/taskbar/desktopbar.h +++ b/reactos/subsys/system/explorer/taskbar/desktopbar.h @@ -51,6 +51,7 @@ #define IDC_EXPLORE 0x100C #define IDC_NETWORK 0x100D #define IDC_CONNECTIONS 0x100E +#define IDC_DRIVES 0x100F #define IDC_FIRST_MENU 0x3000 diff --git a/reactos/subsys/system/explorer/taskbar/startmenu.cpp b/reactos/subsys/system/explorer/taskbar/startmenu.cpp index 3ead01a0e2a..aca56bb133d 100644 --- a/reactos/subsys/system/explorer/taskbar/startmenu.cpp +++ b/reactos/subsys/system/explorer/taskbar/startmenu.cpp @@ -128,7 +128,8 @@ void StartMenu::AddShellEntries(const ShellDirectory& dir, int max, bool subfold for(const Entry*entry=dir._down; entry; entry=entry->_next) { // hide files like "desktop.ini" - if (entry->_data.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) + if (entry->_shell_attribs & SFGAO_HIDDEN) + //not appropriate for drive roots: if (entry->_data.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) continue; // hide subfolders if requested @@ -565,6 +566,7 @@ LRESULT StartMenuRoot::Init(LPCREATESTRUCT pcs) AddButton(ResString(IDS_RECENT), 0, true, IDC_RECENT); AddButton(ResString(IDS_SETTINGS), 0, true, IDC_SETTINGS); AddButton(ResString(IDS_ADMIN), 0, true, IDC_ADMIN); + AddButton(ResString(IDS_DRIVES), 0, true, IDC_DRIVES); AddButton(ResString(IDS_NETWORK), 0, true, IDC_NETWORK); AddButton(ResString(IDS_CONNECTIONS),0,true, IDC_CONNECTIONS); AddButton(ResString(IDS_SEARCH), 0, false, IDC_SEARCH); @@ -626,6 +628,11 @@ int StartMenuRoot::Command(int id, int code) CreateSubmenu(id, CSIDL_CONNECTIONS); break; + case IDC_DRIVES: + //TODO: exclude removeable drives + CreateSubmenu(id, CSIDL_DRIVES); + break; + case IDC_LOGOFF: DestroyWindow(GetParent(_hwnd)); //TODO: show dialog and ask for acknowledge break; diff --git a/reactos/subsys/system/explorer/utility/utility.h b/reactos/subsys/system/explorer/utility/utility.h index 9cbf14df963..bb17f43833e 100644 --- a/reactos/subsys/system/explorer/utility/utility.h +++ b/reactos/subsys/system/explorer/utility/utility.h @@ -56,6 +56,12 @@ #ifndef TB_GETBUTTONINFO //missing in mingw headers #define TB_GETBUTTONINFO (WM_USER+65) #endif +#ifndef SFGAO_HIDDEN //SFGAO_GHOSTED wrong defined, SFGAO_HIDDEN missing in mingw headers +#define SFGAO_HIDDEN 0x00080000L +#undef SFGAO_GHOSTED +#define SFGAO_GHOSTED 0x00008000L +#endif + #ifdef __cplusplus