Merge branch 'osx_version_stuff' of https://github.com/TcT2k/wxWidgets
Minor fixes for version-related stuff.
This commit is contained in:
commit
d9e2761ed4
@ -880,7 +880,7 @@ wxString wxGetOsDescription();
|
||||
wxOperatingSystemId wxGetOsVersion(int* major = NULL, int* minor = NULL);
|
||||
|
||||
/**
|
||||
Returns @true the version of the operating system on which the program
|
||||
Returns @true if the version of the operating system on which the program
|
||||
is running under is the same or later than the given version.
|
||||
|
||||
@since 3.1.0
|
||||
|
@ -636,9 +636,12 @@ wxOperatingSystemId wxGetOsVersion(int *majorVsn, int *minorVsn)
|
||||
#endif
|
||||
{
|
||||
// On OS X versions prior to 10.10 NSProcessInfo does not provide the OS version
|
||||
// Deprecated Gestalt calls are required instead
|
||||
wxGCC_WARNING_SUPPRESS(deprecated-declarations)
|
||||
SInt32 maj, min;
|
||||
Gestalt(gestaltSystemVersionMajor, &maj);
|
||||
Gestalt(gestaltSystemVersionMinor, &min);
|
||||
wxGCC_WARNING_RESTORE()
|
||||
|
||||
if ( majorVsn != NULL )
|
||||
*majorVsn = maj;
|
||||
@ -675,10 +678,8 @@ bool wxCheckOsVersion(int majorVsn, int minorVsn)
|
||||
wxString wxGetOsDescription()
|
||||
{
|
||||
NSString* osDesc = [NSProcessInfo processInfo].operatingSystemVersionString;
|
||||
wxCFStringRef cf(wxCFRetain(osDesc));
|
||||
|
||||
return wxString::Format(wxT("Mac OS X %s"),
|
||||
cf.AsString());
|
||||
return wxString::Format("%s %s", _("Mac OS X"), wxCFStringRef::AsString(osDesc));
|
||||
}
|
||||
|
||||
#endif // wxOSX_USE_COCOA
|
||||
|
Loading…
Reference in New Issue
Block a user