Include OSX 10.12 name and branding in wxGetOsDescription()

Starting with 10.12 OSX will be renamed to macOS. The name for version 10.12
is Sierra.

Closes https://github.com/wxWidgets/wxWidgets/pull/297
This commit is contained in:
Tobias Taschner 2016-06-14 10:24:53 +02:00 committed by Vadim Zeitlin
parent ce4070fc16
commit ac5a362d8d
2 changed files with 6 additions and 1 deletions

View File

@ -114,6 +114,7 @@ wxOSX:
- Turn off automatic quotes substitutions in wxTextCtrl (Xlord2).
- Implement wxDataViewChoiceByIndexRenderer (wanup).
- Fix unnecessary indentation in list-like wxDataViewCtrl (Andreas Falkenhahn).
- Recognize macOS 10.12 Sierra in wxGetOsDescription() (Tobias Taschner).
Unix:

View File

@ -109,7 +109,8 @@ wxString wxGetOsDescription()
// Notice that neither the OS name itself nor the code names seem to be
// ever translated, OS X itself uses the English words even for the
// languages not using Roman alphabet.
wxString osBrand = "OS X";
// Starting with 10.12 the macOS branding is used
wxString osBrand = wxCheckOsVersion(10, 12) ? "macOS" : "OS X";
wxString osName;
if (majorVer == 10)
{
@ -132,6 +133,9 @@ wxString wxGetOsDescription()
case 11:
osName = "El Capitan";
break;
case 12:
osName = "Sierra";
break;
};
}
#else