From ac5a362d8d9506a42badf1d77cfc7e62ed195749 Mon Sep 17 00:00:00 2001 From: Tobias Taschner Date: Tue, 14 Jun 2016 10:24:53 +0200 Subject: [PATCH] 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 --- docs/changes.txt | 1 + src/osx/cocoa/utils_base.mm | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/changes.txt b/docs/changes.txt index ac023846b7..81c64a89c6 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -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: diff --git a/src/osx/cocoa/utils_base.mm b/src/osx/cocoa/utils_base.mm index d1a660ab1b..165dd68fab 100644 --- a/src/osx/cocoa/utils_base.mm +++ b/src/osx/cocoa/utils_base.mm @@ -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