mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-24 07:27:44 +01:00
[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:
parent
5a0815068d
commit
1479e7a2b3
1 changed files with 10 additions and 0 deletions
|
|
@ -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, "");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue