From 406d283a6409838d72d1490ca5d20fa067b7723b Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Thu, 17 Aug 2006 03:02:15 +0000 Subject: [PATCH] build fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40653 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/filefn.cpp | 2 +- src/common/strconv.cpp | 4 ++-- src/generic/combog.cpp | 2 +- src/msw/dc.cpp | 4 ++-- src/msw/font.cpp | 2 +- src/msw/main.cpp | 2 +- src/msw/mslu.cpp | 2 +- src/msw/pen.cpp | 6 +++--- src/msw/settings.cpp | 6 +++--- src/msw/toplevel.cpp | 2 +- src/msw/utils.cpp | 6 +++--- src/msw/window.cpp | 2 +- 12 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index 3707d0a327..0adde924d3 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -1391,7 +1391,7 @@ wxChar *wxDoGetCwd(wxChar *buf, int sz) #ifdef HAVE_WGETCWD #if wxUSE_UNICODE_MSLU - if ( wxGetOsVersion() != wxWIN95 ) + if ( wxGetOsVersion() != wxOS_WINDOWS_9X ) #else char *cbuf = NULL; // never really used because needsANSI will always be false #endif diff --git a/src/common/strconv.cpp b/src/common/strconv.cpp index 742feb387f..97b58b2497 100644 --- a/src/common/strconv.cpp +++ b/src/common/strconv.cpp @@ -2229,11 +2229,11 @@ private: int verMaj, verMin; switch ( wxGetOsVersion(&verMaj, &verMin) ) { - case wxWIN95: + case wxOS_WINDOWS_9X: s_isWin98Or2k = verMaj >= 4 && verMin >= 10; break; - case wxWINDOWS_NT: + case wxOS_WINDOWS_NT: s_isWin98Or2k = verMaj >= 5; break; diff --git a/src/generic/combog.cpp b/src/generic/combog.cpp index 8366a70ea0..d970168df3 100644 --- a/src/generic/combog.cpp +++ b/src/generic/combog.cpp @@ -288,7 +288,7 @@ void wxGenericComboControl::OnMouseEvent( wxMouseEvent& event ) if ( PreprocessMouseEvent(event,handlerFlags) ) return; - const bool ctrlIsButton = wxPlatformIs(wxMSW); + const bool ctrlIsButton = wxPlatformIs(wxOS_WINDOWS); if ( ctrlIsButton && (m_windowStyle & (wxCC_SPECIAL_DCLICK|wxCB_READONLY)) == wxCB_READONLY ) diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp index 11570c8c40..613cd0205b 100644 --- a/src/msw/dc.cpp +++ b/src/msw/dc.cpp @@ -1807,8 +1807,8 @@ bool wxDC::DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) con { // Win9x and WinNT+ have different limits int version = wxGetOsVersion(); - maxLenText = version == wxWINDOWS_NT ? 65535 : 8192; - maxWidth = version == wxWINDOWS_NT ? INT_MAX : 32767; + maxLenText = version == wxOS_WINDOWS_NT ? 65535 : 8192; + maxWidth = version == wxOS_WINDOWS_NT ? INT_MAX : 32767; } widths.Empty(); diff --git a/src/msw/font.cpp b/src/msw/font.cpp index ea21ef386a..bac473af42 100644 --- a/src/msw/font.cpp +++ b/src/msw/font.cpp @@ -638,7 +638,7 @@ void wxNativeFontInfo::SetFamily(wxFontFamily family) // is returned as default GUI font for compatibility int verMaj; ff_family = FF_SWISS; - if(wxGetOsVersion(&verMaj) == wxWINDOWS_NT && verMaj >= 5) + if(wxGetOsVersion(&verMaj) == wxOS_WINDOWS_NT && verMaj >= 5) facename.Add(_T("MS Shell Dlg 2")); else facename.Add(_T("MS Shell Dlg")); diff --git a/src/msw/main.cpp b/src/msw/main.cpp index 68061d70f3..00728f40fd 100644 --- a/src/msw/main.cpp +++ b/src/msw/main.cpp @@ -247,7 +247,7 @@ static bool wxIsUnicodeAvailable() { static const wchar_t *ERROR_STRING = L"wxWidgets Fatal Error"; - if ( wxGetOsVersion() != wxWINDOWS_NT ) + if ( wxGetOsVersion() != wxOS_WINDOWS_NT ) { // we need to be built with MSLU support #if !wxUSE_UNICODE_MSLU diff --git a/src/msw/mslu.cpp b/src/msw/mslu.cpp index c2ee47cf6f..df0b4634ee 100644 --- a/src/msw/mslu.cpp +++ b/src/msw/mslu.cpp @@ -30,7 +30,7 @@ bool WXDLLIMPEXP_BASE wxUsingUnicowsDll() { #if wxUSE_UNICODE_MSLU - return (wxGetOsVersion() == wxWIN95); + return (wxGetOsVersion() == wxOS_WINDOWS_9X); #else return false; #endif diff --git a/src/msw/pen.cpp b/src/msw/pen.cpp index 745caf55b0..db0c66fd58 100644 --- a/src/msw/pen.cpp +++ b/src/msw/pen.cpp @@ -123,7 +123,7 @@ bool wxPen::RealizeResource() // Join style, Cap style, Pen Stippling #if !defined(__WXMICROWIN__) && !defined(__WXWINCE__) // Only NT can display dashed or dotted lines with width > 1 - if ( os != wxWINDOWS_NT && + if ( os != wxOS_WINDOWS_NT && (M_PENDATA->m_style == wxDOT || M_PENDATA->m_style == wxLONG_DASH || M_PENDATA->m_style == wxSHORT_DASH || @@ -226,7 +226,7 @@ bool wxPen::RealizeResource() } // Win32s doesn't have ExtCreatePen function... - if (os==wxWINDOWS_NT || os==wxWIN95) + if (os == wxOS_WINDOWS_NT || os == wxOS_WINDOWS_9X) { M_PENDATA->m_hPen = (WXHPEN) ExtCreatePen( ms_style, @@ -389,7 +389,7 @@ int wx2msPenStyle(int wx_style) return PS_NULL; case wxUSER_DASH: - // if (wxGetOsVersion()==wxWINDOWS_NT || wxGetOsVersion()==wxWIN95) + // if (wxGetOsVersion()==wxOS_WINDOWS_NT || wxGetOsVersion()==wxOS_WINDOWS_9X) return PS_USERSTYLE; } #else diff --git a/src/msw/settings.cpp b/src/msw/settings.cpp index bee65992b7..c15da355e7 100644 --- a/src/msw/settings.cpp +++ b/src/msw/settings.cpp @@ -228,7 +228,7 @@ wxFont wxCreateFontFromStockObject(int index) // We want Windows 2000 or later to have new fonts even MS Shell Dlg // is returned as default GUI font for compatibility int verMaj; - if(index == DEFAULT_GUI_FONT && wxGetOsVersion(&verMaj) == wxWINDOWS_NT && verMaj >= 5) + if(index == DEFAULT_GUI_FONT && wxGetOsVersion(&verMaj) == wxOS_WINDOWS_NT && verMaj >= 5) wxStrcpy(info.lf.lfFaceName, wxT("MS Shell Dlg 2")); #endif // Under MicroWindows we pass the HFONT as well @@ -449,12 +449,12 @@ extern wxFont wxGetCCDefaultFont() int verMaj, verMin; switch ( wxGetOsVersion(&verMaj, &verMin) ) { - case wxWIN95: + case wxOS_WINDOWS_9X: // 4.10 is Win98 useIconFont = verMaj == 4 && verMin >= 10; break; - case wxWINDOWS_NT: + case wxOS_WINDOWS_NT: // 5.0 is Win2k useIconFont = verMaj >= 5; break; diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index 17ba69beda..a4dd694672 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -1086,7 +1086,7 @@ bool wxTopLevelWindowMSW::CanSetTransparent() if (os_type == -1) os_type = ::wxGetOsVersion(&ver_major); - return (os_type == wxWINDOWS_NT && ver_major >= 5); + return (os_type == wxOS_WINDOWS_NT && ver_major >= 5); } // ---------------------------------------------------------------------------- diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp index d5a9de6069..9ff3e343b7 100644 --- a/src/msw/utils.cpp +++ b/src/msw/utils.cpp @@ -951,7 +951,7 @@ bool wxShutdown(wxShutdownFlags WXUNUSED_IN_WINCE(wFlags)) #elif defined(__WIN32__) bool bOK = true; - if ( wxGetOsVersion(NULL, NULL) == wxWINDOWS_NT ) // if is NT or 2K + if ( wxGetOsVersion(NULL, NULL) == wxOS_WINDOWS_NT ) // if is NT or 2K { // Get a token for this process. HANDLE hToken; @@ -1221,7 +1221,7 @@ wxWinVersion wxGetWinVersion() verMin; switch ( wxGetOsVersion(&verMaj, &verMin) ) { - case wxWIN95: + case wxOS_WINDOWS_9X: if ( verMaj == 4 ) { switch ( verMin ) @@ -1238,7 +1238,7 @@ wxWinVersion wxGetWinVersion() } break; - case wxWINDOWS_NT: + case wxOS_WINDOWS_NT: switch ( verMaj ) { case 3: diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 2c7a71a8a3..4522e1bfc2 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -829,7 +829,7 @@ void wxWindowMSW::MSWUpdateUIState(int action, int state) if ( s_needToUpdate == -1 ) { int verMaj, verMin; - s_needToUpdate = wxGetOsVersion(&verMaj, &verMin) == wxWINDOWS_NT && + s_needToUpdate = wxGetOsVersion(&verMaj, &verMin) == wxOS_WINDOWS_NT && verMaj >= 5; } -- 2.45.2