diff options
author | Jan Holesovsky <kendy@suse.cz> | 2013-06-01 23:54:23 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-06-05 10:06:51 +0100 |
commit | db5f25a572edea884c36b0cdda070d276ee1d4c7 (patch) | |
tree | 7cfe42f76ae891698b149e00c7e06fe37282992e /vcl/source | |
parent | 08c24064f94dc6c9da41b81476d3a2178f9d1ffc (diff) |
sidebar: Support for dropdown toolbar items in .ui.
Change-Id: I964f82321e26cc8c9a0b6ec9d9d3f28dc5fc935b
(cherry picked from commit 7ccbfa7cc6d30d2b9c4e2ad4c26e8e4e92703c7f)
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/window/builder.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 380c5e663357..3824497a7f5d 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -1229,14 +1229,19 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri { pWindow = new ToolBox(pParent, WB_3DLOOK | WB_TABSTOP); } - else if (name == "GtkToolButton") + else if (name == "GtkToolButton" || name == "GtkMenuToolButton") { ToolBox *pToolBox = dynamic_cast<ToolBox*>(pParent); if (pToolBox) { OUString aCommand(OStringToOUString(extractActionName(rMap), RTL_TEXTENCODING_UTF8)); + + ToolBoxItemBits nBits = 0; + if (name == "GtkMenuToolButton") + nBits |= TIB_DROPDOWN; + if (!aCommand.isEmpty()) - pToolBox->InsertItem(aCommand, m_xFrame); + pToolBox->InsertItem(aCommand, m_xFrame, nBits); return NULL; // no widget to be created } |