Remove obsolete mentions of Windows 9x, Windows CE and OS/2.
This commit is contained in:
Vadim Zeitlin
2017-02-20 17:46:45 +01:00
63 changed files with 133 additions and 674 deletions

View File

@@ -228,7 +228,7 @@ bool wxGetUserId(wxChar *buf,
DWORD nSize = maxSize;
if ( ::GetUserName(buf, &nSize) == 0 )
{
// actually, it does happen on Win9x if the user didn't log on
// actually, it does happen if the user didn't log on
DWORD res = ::GetEnvironmentVariable(wxT("username"), buf, maxSize);
if ( res == 0 )
{
@@ -1074,80 +1074,25 @@ wxString wxGetOsDescription()
const OSVERSIONINFOEXW info = wxGetWindowsVersionInfo();
switch ( info.dwPlatformId )
{
#ifdef VER_PLATFORM_WIN32_CE
case VER_PLATFORM_WIN32_CE:
str.Printf(_("Windows CE (%d.%d)"),
info.dwMajorVersion,
info.dwMinorVersion);
break;
#endif
case VER_PLATFORM_WIN32s:
str = _("Win32s on Windows 3.1");
break;
case VER_PLATFORM_WIN32_WINDOWS:
switch (info.dwMinorVersion)
{
case 0:
if ( info.szCSDVersion[1] == 'B' ||
info.szCSDVersion[1] == 'C' )
{
str = _("Windows 95 OSR2");
}
else
{
str = _("Windows 95");
}
break;
case 10:
if ( info.szCSDVersion[1] == 'B' ||
info.szCSDVersion[1] == 'C' )
{
str = _("Windows 98 SE");
}
else
{
str = _("Windows 98");
}
break;
case 90:
str = _("Windows ME");
break;
default:
str.Printf(_("Windows 9x (%d.%d)"),
info.dwMajorVersion,
info.dwMinorVersion);
break;
}
if ( !wxIsEmpty(info.szCSDVersion) )
{
str << wxT(" (") << info.szCSDVersion << wxT(')');
}
break;
case VER_PLATFORM_WIN32_NT:
switch ( info.dwMajorVersion )
{
case 5:
switch ( info.dwMinorVersion )
{
case 0:
str = _("Windows 2000");
break;
case 2:
// we can't distinguish between XP 64 and 2003
// as they both are 5.2, so examine the product
// type to resolve this ambiguity
if ( wxIsWindowsServer() == 1 )
{
str = _("Windows Server 2003");
str = "Windows Server 2003";
break;
}
//else: must be XP, fall through
case 1:
str = _("Windows XP");
str = "Windows XP";
break;
}
break;
@@ -1157,40 +1102,40 @@ wxString wxGetOsDescription()
{
case 0:
str = wxIsWindowsServer() == 1
? _("Windows Server 2008")
: _("Windows Vista");
? "Windows Server 2008"
: "Windows Vista";
break;
case 1:
str = wxIsWindowsServer() == 1
? _("Windows Server 2008 R2")
: _("Windows 7");
? "Windows Server 2008 R2"
: "Windows 7";
break;
case 2:
str = wxIsWindowsServer() == 1
? _("Windows Server 2012")
: _("Windows 8");
? "Windows Server 2012"
: "Windows 8";
break;
case 3:
str = wxIsWindowsServer() == 1
? _("Windows Server 2012 R2")
: _("Windows 8.1");
? "Windows Server 2012 R2"
: "Windows 8.1";
break;
}
break;
case 10:
str = wxIsWindowsServer() == 1
? _("Windows Server 2016")
: _("Windows 10");
? "Windows Server 2016"
: "Windows 10";
break;
}
if ( str.empty() )
{
str.Printf(_("Windows NT %lu.%lu"),
str.Printf("Windows %lu.%lu",
info.dwMajorVersion,
info.dwMinorVersion);
}
@@ -1260,11 +1205,6 @@ wxOperatingSystemId wxGetOsVersion(int *verMaj, int *verMin, int *verMicro)
{
case VER_PLATFORM_WIN32_NT:
s_version.os = wxOS_WINDOWS_NT;
break;
case VER_PLATFORM_WIN32_WINDOWS:
s_version.os = wxOS_WINDOWS_9X;
break;
}
s_version.verMaj = info.dwMajorVersion;
@@ -1310,38 +1250,12 @@ wxWinVersion wxGetWinVersion()
verMin;
switch ( wxGetOsVersion(&verMaj, &verMin) )
{
case wxOS_WINDOWS_9X:
if ( verMaj == 4 )
{
switch ( verMin )
{
case 0:
return wxWinVersion_95;
case 10:
return wxWinVersion_98;
case 90:
return wxWinVersion_ME;
}
}
break;
case wxOS_WINDOWS_NT:
switch ( verMaj )
{
case 3:
return wxWinVersion_NT3;
case 4:
return wxWinVersion_NT4;
case 5:
switch ( verMin )
{
case 0:
return wxWinVersion_2000;
case 1:
return wxWinVersion_XP;