diff --git a/include/wx/osx/core/private.h b/include/wx/osx/core/private.h index eb2758a17b..c52a8e5af2 100644 --- a/include/wx/osx/core/private.h +++ b/include/wx/osx/core/private.h @@ -54,8 +54,6 @@ // wxBase part of it). #include -WXDLLIMPEXP_BASE long UMAGetSystemVersion() ; - void WXDLLIMPEXP_CORE wxMacStringToPascal( const wxString&from , unsigned char * to ); wxString WXDLLIMPEXP_CORE wxMacMakeStringFromPascal( const unsigned char * from ); diff --git a/src/osx/cocoa/power.mm b/src/osx/cocoa/power.mm index c3099723d2..28d6b89781 100644 --- a/src/osx/cocoa/power.mm +++ b/src/osx/cocoa/power.mm @@ -15,6 +15,7 @@ #include "wx/power.h" #include "wx/atomic.h" +#include "wx/platinfo.h" #include "wx/osx/private.h" #include @@ -37,7 +38,7 @@ bool UpdatePowerResourceUsage(wxPowerResourceKind kind, const wxString& reason) cfreason = wxString("User Activity"); #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9 - if ( UMAGetSystemVersion() >= 0x1090 ) + if ( wxPlatformInfo::Get().CheckOSVersion(10, 9) ) { // Use NSProcessInfo for 10.9 and newer if ( !g_processInfoActivity ) @@ -82,7 +83,7 @@ bool UpdatePowerResourceUsage(wxPowerResourceKind kind, const wxString& reason) { // Release power assertion #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9 - if ( UMAGetSystemVersion() >= 0x1090 ) + if ( wxPlatformInfo::Get().CheckOSVersion(10, 9) ) { // Use NSProcessInfo for 10.9 and newer if ( g_processInfoActivity ) diff --git a/src/osx/cocoa/utils.mm b/src/osx/cocoa/utils.mm index 77cf9da4bb..4f81cc473e 100644 --- a/src/osx/cocoa/utils.mm +++ b/src/osx/cocoa/utils.mm @@ -11,6 +11,7 @@ #include "wx/wxprec.h" #include "wx/utils.h" +#include "wx/platinfo.h" #ifndef WX_PRECOMP #include "wx/intl.h" @@ -346,7 +347,7 @@ void wxBell() ProcessSerialNumber psn = { 0, kCurrentProcess }; TransformProcessType(&psn, kProcessTransformToForegroundApplication); - if ( UMAGetSystemVersion() >= 0x1090 ) + if ( wxPlatformInfo::Get().CheckOSVersion(10, 9) ) { [[NSRunningApplication currentApplication] activateWithOptions: (NSApplicationActivateAllWindows | NSApplicationActivateIgnoringOtherApps)]; diff --git a/src/osx/core/utilsexc_base.cpp b/src/osx/core/utilsexc_base.cpp index f510abc37a..22b9f43302 100644 --- a/src/osx/core/utilsexc_base.cpp +++ b/src/osx/core/utilsexc_base.cpp @@ -55,18 +55,6 @@ wxSocketManager *wxOSXSocketManagerCF = NULL; #if ( !wxUSE_GUI && !wxOSX_USE_IPHONE ) || wxOSX_USE_COCOA_OR_CARBON -// have a fast version for mac code that returns the version as a return value - -long UMAGetSystemVersion() -{ - static SInt32 sUMASystemVersion = 0 ; - if ( sUMASystemVersion == 0 ) - { - verify_noerr(Gestalt(gestaltSystemVersion, &sUMASystemVersion)); - } - return sUMASystemVersion ; -} - // our OS version is the same in non GUI and GUI cases wxOperatingSystemId wxGetOsVersion(int *majorVsn, int *minorVsn) { diff --git a/src/osx/window_osx.cpp b/src/osx/window_osx.cpp index f268f45143..c74bc43a3c 100644 --- a/src/osx/window_osx.cpp +++ b/src/osx/window_osx.cpp @@ -34,6 +34,7 @@ #include "wx/menuitem.h" #include "wx/treectrl.h" #include "wx/listctrl.h" + #include "wx/platinfo.h" #endif #include "wx/tooltip.h" @@ -2215,7 +2216,7 @@ bool wxWindowMac::MacHasScrollBarCorner() const if ( frame ) { // starting from 10.7 there are no resize indicators anymore - if ( (frame->GetWindowStyleFlag() & wxRESIZE_BORDER) && UMAGetSystemVersion() < 0x1070) + if ( (frame->GetWindowStyleFlag() & wxRESIZE_BORDER) && !wxPlatformInfo::Get().CheckOSVersion(10, 7) ) { // Parent frame has resize handle wxPoint frameBottomRight = frame->GetScreenRect().GetBottomRight();