Kaydet (Commit) 6cc8693c authored tarafından Jan Holesovsky's avatar Jan Holesovsky

vclbuilder: Honor the "visible" flag of toolbar items.

Change-Id: Iaf58462cbc700b48f693ca60c0a4242a73b290eb
üst edf597e0
...@@ -724,6 +724,17 @@ namespace ...@@ -724,6 +724,17 @@ namespace
return sActionName; 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) Size extractSizeRequest(VclBuilder::stringmap &rMap)
{ {
OString sWidthRequest("0"); OString sWidthRequest("0");
...@@ -1512,6 +1523,9 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri ...@@ -1512,6 +1523,9 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
if (!sIconName.isEmpty()) if (!sIconName.isEmpty())
pToolBox->SetItemImage(nItemId, FixedImage::loadThemeImage(sIconName)); pToolBox->SetItemImage(nItemId, FixedImage::loadThemeImage(sIconName));
if (!extractVisible(rMap))
pToolBox->HideItem(nItemId);
return NULL; // no widget to be created return NULL; // no widget to be created
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment