X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4c51a665c649f7579fb39e62070cef4f66b3210d..b404a8f3b072129c107c6d9a5e0f6f53cd34807b:/src/msw/utils.cpp diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp index a002517d25..f208feb48f 100644 --- a/src/msw/utils.cpp +++ b/src/msw/utils.cpp @@ -1274,8 +1274,7 @@ wxString wxGetOsDescription() switch ( info.dwMinorVersion ) { case 0: - str.Printf(_("Windows 2000 (build %lu"), - info.dwBuildNumber); + str = _("Windows 2000"); break; case 2: @@ -1284,36 +1283,44 @@ wxString wxGetOsDescription() // type to resolve this ambiguity if ( wxIsWindowsServer() == 1 ) { - str.Printf(_("Windows Server 2003 (build %lu"), - info.dwBuildNumber); + str = _("Windows Server 2003"); break; } //else: must be XP, fall through case 1: - str.Printf(_("Windows XP (build %lu"), - info.dwBuildNumber); + str = _("Windows XP"); break; } break; case 6: - if ( info.dwMinorVersion == 0 ) + switch ( info.dwMinorVersion ) { - str.Printf(_("Windows Vista (build %lu"), - info.dwBuildNumber); + case 0: + str = wxIsWindowsServer() == 1 + ? _("Windows Server 2008") + : _("Windows Vista"); + break; + + case 1: + str = wxIsWindowsServer() == 1 + ? _("Windows Server 2008 R2") + : _("Windows 7"); + break; } break; } if ( str.empty() ) { - str.Printf(_("Windows NT %lu.%lu (build %lu"), - info.dwMajorVersion, - info.dwMinorVersion, - info.dwBuildNumber); + str.Printf(_("Windows NT %lu.%lu"), + info.dwMajorVersion, + info.dwMinorVersion); } + str << wxT(" (") + << wxString::Format(_("build %lu"), info.dwBuildNumber); if ( !wxIsEmpty(info.szCSDVersion) ) { str << wxT(", ") << info.szCSDVersion;