diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-03-15 20:44:50 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-03-16 09:27:36 +0000 |
commit | 86f504ee014d17172267f14742b8edd5789cbbc6 (patch) | |
tree | 6b6c78ac513e2169e9bceb7ffa99a16753a2eea5 /vcl/source/window | |
parent | 84aee1ae9d4e03054dfcf5f8a9f10ecd2b0496b8 (diff) |
Related: tdf#98637 make this a tractable problem
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 <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/window')
-rw-r--r-- | vcl/source/window/menu.cxx | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 810525ba1234..373d94686887 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -2488,14 +2488,15 @@ MenuBarWindow* MenuBar::getMenuBarWindow() return pWin; } -MenuBar::MenuBar() +MenuBar::MenuBar(SystemWindow* pAssociatedSystemWindow) : Menu(), mbCloseBtnVisible(false), mbFloatBtnVisible(false), mbHideBtnVisible(false), - mbDisplayable(true) + mbDisplayable(true), + mpAssociatedSystemWindow(pAssociatedSystemWindow) { - mpSalMenu = ImplGetSVData()->mpDefInst->CreateMenu(true, this); + mpSalMenu = ImplGetSVData()->mpDefInst->CreateMenu(true, this, mpAssociatedSystemWindow); } MenuBar::MenuBar( const MenuBar& rMenu ) @@ -2505,7 +2506,7 @@ MenuBar::MenuBar( const MenuBar& rMenu ) mbHideBtnVisible(false), mbDisplayable(true) { - mpSalMenu = ImplGetSVData()->mpDefInst->CreateMenu(true, this); + mpSalMenu = ImplGetSVData()->mpDefInst->CreateMenu(true, this, mpAssociatedSystemWindow); *this = rMenu; } @@ -2779,13 +2780,13 @@ MenuFloatingWindow * PopupMenu::ImplGetFloatingWindow() const { PopupMenu::PopupMenu() : pRefAutoSubMenu(nullptr) { - mpSalMenu = ImplGetSVData()->mpDefInst->CreateMenu(false, this); + mpSalMenu = ImplGetSVData()->mpDefInst->CreateMenu(false, this, nullptr); } PopupMenu::PopupMenu( const ResId& rResId ) : pRefAutoSubMenu(nullptr) { - mpSalMenu = ImplGetSVData()->mpDefInst->CreateMenu(false, this); + mpSalMenu = ImplGetSVData()->mpDefInst->CreateMenu(false, this, nullptr); ResMgr* pMgr = rResId.GetResMgr(); if( ! pMgr ) @@ -2819,7 +2820,7 @@ PopupMenu::PopupMenu( const PopupMenu& rMenu ) : Menu(), pRefAutoSubMenu(nullptr) { - mpSalMenu = ImplGetSVData()->mpDefInst->CreateMenu(false, this); + mpSalMenu = ImplGetSVData()->mpDefInst->CreateMenu(false, this, nullptr); *this = rMenu; } |