diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2016-09-01 00:27:29 +0300 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-09-05 19:17:54 +0000 |
commit | c356e54e2b2ef67043945d5e5762d3a9015ca41f (patch) | |
tree | 88be8736ae76a16454c4bf0b3aed83f4c9f6e249 /cui | |
parent | 96e76028ef33e6617d702f07a0ad4a485db50f11 (diff) |
Gallery submenu was missing from native menus
... for both OS X and gtk3. The reason is that it was
filled in item highlight handler, which isn't implemented
for native menus. Instead use the menu activation handler,
like for the similar button in SvxLineTabPage.
To test this patch open Writer, Format > Bullets and
Numbering... > Options. Switch "Number" to "Graphics",
and click on the "Select" button.
(cherry picked from commit c780c6726dca5e2fe33297e44f25ae3e00703294)
Change-Id: I437fd6536dbd9e6ba51282eaacc8b43c3a2d6cbf
Reviewed-on: https://gerrit.libreoffice.org/28670
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 'cui')
-rw-r--r-- | cui/source/inc/numpages.hxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/numpages.cxx | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx index c5243bf15344..61901fc1c9d6 100644 --- a/cui/source/inc/numpages.hxx +++ b/cui/source/inc/numpages.hxx @@ -318,7 +318,7 @@ class SvxNumOptionsTabPage : public SfxTabPage DECL_LINK_TYPED( NumberTypeSelectHdl_Impl, ListBox&, void ); DECL_LINK_TYPED( LevelHdl_Impl, ListBox&, void ); - DECL_LINK_TYPED( PopupActivateHdl_Impl, Menu *, bool); + DECL_LINK_TYPED( PopupActivateHdl_Impl, MenuButton *, void ); DECL_LINK_TYPED( GraphicHdl_Impl, MenuButton *, void ); DECL_LINK_TYPED( BulletHdl_Impl, Button*, void); DECL_LINK_TYPED( SizeHdl_Impl, Edit&, void ); diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 22d23e0bb7e3..ff8d56254751 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -1217,6 +1217,7 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(vcl::Window* pParent, m_pBulletPB->SetClickHdl(LINK(this, SvxNumOptionsTabPage, BulletHdl_Impl)); m_pFmtLB->SetSelectHdl(LINK(this, SvxNumOptionsTabPage, NumberTypeSelectHdl_Impl)); m_pBitmapMB->SetSelectHdl(LINK(this, SvxNumOptionsTabPage, GraphicHdl_Impl)); + m_pBitmapMB->SetActivateHdl(LINK(this, SvxNumOptionsTabPage, PopupActivateHdl_Impl)); m_pLevelLB->EnableMultiSelection(true); m_pLevelLB->SetSelectHdl(LINK(this, SvxNumOptionsTabPage, LevelHdl_Impl)); m_pCharFmtLB->SetSelectHdl(LINK(this, SvxNumOptionsTabPage, CharFmtHdl_Impl)); @@ -1235,8 +1236,6 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(vcl::Window* pParent, aInvalidateTimer.SetTimeout(50); Menu *pBitmapMenu = m_pBitmapMB->GetPopupMenu(); - - pBitmapMenu->SetHighlightHdl(LINK(this, SvxNumOptionsTabPage, PopupActivateHdl_Impl)); m_nGalleryId = pBitmapMenu->GetItemId("gallery"); assert(m_nGalleryId != MENU_ITEM_NOTFOUND); PopupMenu* pPopup = new PopupMenu; @@ -2116,7 +2115,7 @@ IMPL_LINK_TYPED( SvxNumOptionsTabPage, GraphicHdl_Impl, MenuButton *, pButton, v } } -IMPL_LINK_NOARG_TYPED(SvxNumOptionsTabPage, PopupActivateHdl_Impl, Menu *, bool) +IMPL_LINK_NOARG_TYPED(SvxNumOptionsTabPage, PopupActivateHdl_Impl, MenuButton *, void) { if(!bMenuButtonInitialized) { @@ -2168,7 +2167,6 @@ IMPL_LINK_NOARG_TYPED(SvxNumOptionsTabPage, PopupActivateHdl_Impl, Menu *, bool) } LeaveWait(); } - return false; } IMPL_LINK_NOARG_TYPED(SvxNumOptionsTabPage, BulletHdl_Impl, Button*, void) |