summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2014-02-07 14:24:19 +0100
committerJan Holesovsky <kendy@collabora.com>2014-02-07 14:25:04 +0100
commit6cc8693cb28ab7e2a7d6fa474e25c6b6bff36ff5 (patch)
tree83d809da1f1dd8682b825066bbebf17d59aff1d9 /vcl
parentedf597e0eb0baae81aab701af930400473e6d078 (diff)
vclbuilder: Honor the "visible" flag of toolbar items.
Change-Id: Iaf58462cbc700b48f693ca60c0a4242a73b290eb
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/builder.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index de88c5b5b3f9..fd3e6a47294e 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -724,6 +724,17 @@ namespace
return sActionName;
}
+ bool extractVisible(VclBuilder::stringmap &rMap)
+ {
+ OString sActionName;
+ VclBuilder::stringmap::iterator aFind = rMap.find(OString("visible"));
+ if (aFind != rMap.end())
+ {
+ return toBool(aFind->second);
+ }
+ return false;
+ }
+
Size extractSizeRequest(VclBuilder::stringmap &rMap)
{
OString sWidthRequest("0");
@@ -1512,6 +1523,9 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
if (!sIconName.isEmpty())
pToolBox->SetItemImage(nItemId, FixedImage::loadThemeImage(sIconName));
+ if (!extractVisible(rMap))
+ pToolBox->HideItem(nItemId);
+
return NULL; // no widget to be created
}
}