Commit fa985c43 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

ActiveX: accept some tags like NPAPI

Notably controls and target

Ref #11487
parent 8103f00e
......@@ -79,6 +79,15 @@ STDMETHODIMP VLCPersistPropertyBag::Load(LPPROPERTYBAG pPropBag, LPERRORLOG pErr
_p_instance->setMRL(V_BSTR(&value));
VariantClear(&value);
}
else
{
V_VT(&value) = VT_BSTR;
if( S_OK == pPropBag->Read(OLESTR("target"), &value, pErrorLog) )
{
_p_instance->setMRL(V_BSTR(&value));
VariantClear(&value);
}
}
}
}
......@@ -107,6 +116,18 @@ STDMETHODIMP VLCPersistPropertyBag::Load(LPPROPERTYBAG pPropBag, LPERRORLOG pErr
_p_instance->setShowToolbar(V_BOOL(&value) != VARIANT_FALSE);
VariantClear(&value);
}
else
{
/*
** try alternative syntax
*/
V_VT(&value) = VT_BOOL;
if( S_OK == pPropBag->Read(OLESTR("controls"), &value, pErrorLog) )
{
_p_instance->setShowToolbar(V_BOOL(&value) != VARIANT_FALSE);
VariantClear(&value);
}
}
SIZEL size = _p_instance->getExtent();
V_VT(&value) = VT_I4;
......@@ -218,6 +239,27 @@ STDMETHODIMP VLCPersistPropertyBag::Load(LPPROPERTYBAG pPropBag, LPERRORLOG pErr
_p_instance->get_options().set_enable_fs(V_BOOL(&value) != VARIANT_FALSE);
VariantClear(&value);
}
else
{
/*
** try alternative syntax
*/
V_VT(&value) = VT_BOOL;
if( S_OK == pPropBag->Read(OLESTR("allowfullscreen"), &value, pErrorLog) )
{
_p_instance->get_options().set_enable_fs(V_BOOL(&value) != VARIANT_FALSE);
VariantClear(&value);
}
else
{
V_VT(&value) = VT_BOOL;
if( S_OK == pPropBag->Read(OLESTR("fullscreen"), &value, pErrorLog) )
{
_p_instance->get_options().set_enable_fs(V_BOOL(&value) != VARIANT_FALSE);
VariantClear(&value);
}
}
}
return _p_instance->onLoad();
};
......
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