From 86f504ee014d17172267f14742b8edd5789cbbc6 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 15 Mar 2016 20:44:50 +0000 Subject: Related: tdf#98637 make this a tractable problem MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is just too hard, it would all be much easier if the ActionGroup existed right from the start of the entire process. So smuggle in to the ctor the toplevel frame that the menubar will be inserted into so we can use its ActionGroup from the start. That would suggest that we could then just keep the hierarchy in sync as it is created rather than finding opportune moments to update /generate it. Change-Id: I550f94a994210423ab9cea1986e643056cb5bd29 Reviewed-on: https://gerrit.libreoffice.org/23287 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- include/vcl/menu.hxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx index 277819960347..6fd25acf169c 100644 --- a/include/vcl/menu.hxx +++ b/include/vcl/menu.hxx @@ -413,6 +413,7 @@ class VCL_DLLPUBLIC MenuBar : public Menu bool mbFloatBtnVisible : 1; bool mbHideBtnVisible : 1; bool mbDisplayable : 1; + SystemWindow* mpAssociatedSystemWindow; friend class Application; friend class Menu; @@ -431,7 +432,7 @@ protected: MenuBarWindow* getMenuBarWindow(); public: - MenuBar(); + MenuBar( SystemWindow* pAssociatedSystemWindow = nullptr ); MenuBar( const MenuBar& rMenu ); virtual ~MenuBar(); -- cgit