Index: src/chext/TContextMenuHandler.h =================================================================== diff -u -r4fe995b304ea342b50293f92d3c1992b43b820f7 -r3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4 --- src/chext/TContextMenuHandler.h (.../TContextMenuHandler.h) (revision 4fe995b304ea342b50293f92d3c1992b43b820f7) +++ src/chext/TContextMenuHandler.h (.../TContextMenuHandler.h) (revision 3c248d4f6d0fdb1e487cc868b2f0b219eec37ef4) @@ -24,6 +24,8 @@ #define __TCONTEXTMENUHANDLER_H__ #include "TShellExtData.h" +#include "../libchcore/TLocalFilesystem.h" +#include "../libchcore/TSizeFormatter.h" class TShellMenuItem; @@ -35,15 +37,19 @@ TContextMenuHandler(); ~TContextMenuHandler(); - void Init(const TShellMenuItemPtr& spRootMenuItem, HMENU hMenu, UINT uiFirstItemID, UINT uiFirstItemPosition, const TShellExtData& rShellExtData, bool bEnableOwnerDrawnPaths, bool bOverrideDefaultItem); + void Init(const TShellMenuItemPtr& spRootMenuItem, HMENU hMenu, UINT uiFirstItemID, UINT uiFirstItemPosition, const TShellExtData& rShellExtData, + const chcore::TSizeFormatterPtr& spFormatter, bool bShowFreeSpace, + bool bEnableOwnerDrawnPaths, bool bOverrideDefaultItem); void Clear(); UINT GetLastCommandID() const { return m_uiNextMenuID; } TShellMenuItemPtr GetCommandByMenuItemOffset(UINT uiOffset); TShellMenuItemPtr GetCommandByItemID(UINT uiOffset); protected: - void UpdateMenuRecursive(const TShellMenuItemPtr& spRootMenuItem, HMENU hMenu, UINT uiFirstItemPosition, const TShellExtData& rShellExtData, bool bOverrideDefaultItem); + void UpdateMenuRecursive(const TShellMenuItemPtr& spRootMenuItem, HMENU hMenu, UINT uiFirstItemPosition, const TShellExtData& rShellExtData, + const chcore::TSizeFormatterPtr& spFormatter, bool bShowFreeSpace, bool bOverrideDefaultItem); + std::wstring GetDisplayText(const TShellMenuItemPtr& spMenuItem, const chcore::TSizeFormatterPtr& spFormatter, bool bShowFreeSpace); private: std::map m_mapMenuItems; @@ -53,6 +59,6 @@ UINT m_uiNextMenuID; // next menu ID to be used bool m_bEnableOwnerDrawnPaths; + chcore::TLocalFilesystem m_fsLocal; }; - #endif