summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2016-09-01 00:27:29 +0300
committerCaolán McNamara <caolanm@redhat.com>2016-09-05 19:17:54 +0000
commitc356e54e2b2ef67043945d5e5762d3a9015ca41f (patch)
tree88be8736ae76a16454c4bf0b3aed83f4c9f6e249
parentfftester: apparent wrong property tested for existence (diff)
downloadcore-c356e54e2b2ef67043945d5e5762d3a9015ca41f.tar.gz
core-c356e54e2b2ef67043945d5e5762d3a9015ca41f.zip
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>
-rw-r--r--cui/source/inc/numpages.hxx2
-rw-r--r--cui/source/tabpages/numpages.cxx6
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)