[Summary] Now UI xml can conditionally create/ommit os specific widgets (MAC and WIDNOWS). For example:

<Label
     text=“You are not on Windows now as now you are on MAC OS!”
     ui.os.windows=“false”/>
<Label
     text=“You are not on MACOS now as now you are on Windows!”
     ui.os.macos=“false”/>
This commit is contained in:
Valeriy Kamyshniy 2015-02-03 13:38:44 +02:00
parent 5a0815068d
commit 1479e7a2b3

View file

@ -125,6 +125,16 @@ WavesUI::~WavesUI ()
Gtk::Widget*
WavesUI::create_widget (const XMLNode& definition, const XMLNodeMap& styles)
{
#if defined (__APPLE__)
if (false == xml_property (definition, "ui.os.macos", styles, true)) {
return 0;
}
#elif defined (PLATFORM_WINDOWS)
if (false == xml_property (definition, "ui.os.windows", styles, true)) {
return 0;
}
#endif
Gtk::Object* child = NULL;
std::string widget_type = definition.name ();
std::string widget_id = xml_property (definition, "id", styles, "");