From eda624641b34a7d4315388c8ec1aebe44f63982e Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Sun, 18 May 2014 14:28:39 +0200 Subject: lp#1296715: refresh invalidated menus - so we need to be a StatusListener in framework after all - we ware updating all menus for now, instead of just one - this would have a hugh performance hit when there is much change to the menu - thus we just invalidate the menu and update with all changes after 100ms once Change-Id: I48cda968cf0ae1eae0421b3424bb3e5830817e84 --- include/vcl/helper.hxx | 3 +++ include/vcl/menu.hxx | 11 +++++++++++ 2 files changed, 14 insertions(+) (limited to 'include') diff --git a/include/vcl/helper.hxx b/include/vcl/helper.hxx index cc368dd4b0da..49c4197958a2 100644 --- a/include/vcl/helper.hxx +++ b/include/vcl/helper.hxx @@ -23,6 +23,7 @@ #include #include +#include #include @@ -54,6 +55,8 @@ enum whichOfficePath { InstallationRootPath, UserPath, ConfigPath }; OUString VCL_DLLPUBLIC getOfficePath( enum whichOfficePath ePath ); } // namespace + +bool VCL_DLLPUBLIC GetMenuInvalidateListeners(); #endif // INCLUDED_VCL_HELPER_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx index 9f31b20421cf..ac3c84ba0761 100644 --- a/include/vcl/menu.hxx +++ b/include/vcl/menu.hxx @@ -359,6 +359,17 @@ public: }; +namespace vcl +{ + class VCL_DLLPUBLIC MenuInvalidator + { + public: + MenuInvalidator(); + VclEventListeners2* GetMenuInvalidateListeners(); + void Invalidated(); + }; +} + // - MenuBar - -- cgit