Merge branch 'os_version'
Make strings returned by wxGetOsDescription() more readable for the users.
This commit is contained in:
commit
4d911fb059
@ -120,8 +120,6 @@ public:
|
||||
Returns the search button visibility value.
|
||||
If there is a menu attached, the search button will be visible regardless of
|
||||
the search button visibility value.
|
||||
|
||||
This always returns @false in Mac OS X v10.3
|
||||
*/
|
||||
virtual bool IsSearchButtonVisible() const;
|
||||
|
||||
@ -148,8 +146,6 @@ public:
|
||||
Sets the search button visibility value on the search control.
|
||||
If there is a menu attached, the search button will be visible regardless of
|
||||
the search button visibility value.
|
||||
|
||||
This has no effect in Mac OS X v10.3
|
||||
*/
|
||||
virtual void ShowSearchButton(bool show);
|
||||
|
||||
|
@ -118,7 +118,6 @@
|
||||
Tells wxListCtrl to use the generic control even when it is capable of
|
||||
using the native control instead. Also known as wxMAC_ALWAYS_USE_GENERIC_LISTCTRL.
|
||||
@flag{mac.textcontrol-use-spell-checker}
|
||||
This option only has effect for Mac OS X 10.4 and higher.
|
||||
If 1 activates the spell checking in wxTextCtrl.
|
||||
@flag{osx.openfiledialog.always-show-types}
|
||||
Per default a wxFileDialog with wxFD_OPEN does not show a types-popup on OS X but allows
|
||||
|
@ -858,6 +858,7 @@ wxString wxGetOsDescription();
|
||||
@beginTable
|
||||
@row3col{<b>Windows OS name</b>, <b>Major version</b>, <b>Minor version</b>}
|
||||
@row3col{Windows 10, 10, 0}
|
||||
@row3col{Windows Server 2016, 10, 0}
|
||||
@row3col{Windows 8.1, 6, 3}
|
||||
@row3col{Windows Server 2012 R2, 6, 3}
|
||||
@row3col{Windows 8, 6, 2}
|
||||
|
@ -1226,7 +1226,7 @@ wxString wxGetOsDescription()
|
||||
|
||||
case 10:
|
||||
str = wxIsWindowsServer() == 1
|
||||
? _("Windows Server 10")
|
||||
? _("Windows Server 2016")
|
||||
: _("Windows 10");
|
||||
break;
|
||||
}
|
||||
|
@ -677,9 +677,48 @@ bool wxCheckOsVersion(int majorVsn, int minorVsn)
|
||||
|
||||
wxString wxGetOsDescription()
|
||||
{
|
||||
NSString* osDesc = [NSProcessInfo processInfo].operatingSystemVersionString;
|
||||
|
||||
return wxString::Format("%s %s", _("Mac OS X"), wxCFStringRef::AsString(osDesc));
|
||||
int majorVer, minorVer;
|
||||
wxGetOsVersion(&majorVer, &minorVer);
|
||||
|
||||
// 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";
|
||||
wxString osName;
|
||||
if (majorVer == 10)
|
||||
{
|
||||
switch (minorVer)
|
||||
{
|
||||
case 7:
|
||||
osName = "Lion";
|
||||
// 10.7 was the last version where the "Mac" prefix was used
|
||||
osBrand = "Mac OS X";
|
||||
break;
|
||||
case 8:
|
||||
osName = "Mountain Lion";
|
||||
break;
|
||||
case 9:
|
||||
osName = "Mavericks";
|
||||
break;
|
||||
case 10:
|
||||
osName = "Yosemite";
|
||||
break;
|
||||
case 11:
|
||||
osName = "El Capitan";
|
||||
break;
|
||||
};
|
||||
}
|
||||
|
||||
wxString osDesc = osBrand;
|
||||
if (!osName.empty())
|
||||
osDesc += " " + osName;
|
||||
|
||||
NSString* osVersionString = [NSProcessInfo processInfo].operatingSystemVersionString;
|
||||
if (osVersionString)
|
||||
osDesc += " " + wxCFStringRef::AsString(osVersionString);
|
||||
|
||||
return osDesc;
|
||||
}
|
||||
|
||||
#endif // wxOSX_USE_COCOA
|
||||
|
Loading…
Reference in New Issue
Block a user