]> git.saurik.com Git - wxWidgets.git/commitdiff
Recognize Windows 7 and Server 2008 versions in wxGetOsDescription().
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 16 May 2011 10:01:08 +0000 (10:01 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 16 May 2011 10:01:08 +0000 (10:01 +0000)
Use marketing names for these systems instead of just describing them as
"Window NT x.y".

Closes #13220.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67752 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/utils.cpp

index a002517d25bdf54ec63a37a50a77e10f1746c28a..d371459b0909fe9b566208dc6c90a159b8f7138a 100644 (file)
@@ -1298,10 +1298,33 @@ wxString wxGetOsDescription()
                         break;
 
                     case 6:
-                        if ( info.dwMinorVersion == 0 )
+                        switch ( info.dwMinorVersion )
                         {
-                            str.Printf(_("Windows Vista (build %lu"),
-                                       info.dwBuildNumber);
+                            case 0:
+                                if ( wxIsWindowsServer() == 1 )
+                                {
+                                    str.Printf(_("Windows Server 2008 (build %lu"),
+                                               info.dwBuildNumber);
+                                }
+                                else
+                                {
+                                     str.Printf(_("Windows Vista (build %lu"),
+                                               info.dwBuildNumber);
+                                }
+                                break;
+
+                            case 1:
+                                if ( wxIsWindowsServer() == 1 )
+                                {
+                                    str.Printf(_("Windows Server 2008 R2 (build %lu"),
+                                               info.dwBuildNumber);
+                                }
+                                else
+                                {
+                                     str.Printf(_("Windows 7 (build %lu"),
+                                               info.dwBuildNumber);
+                                }
+                                break;
                         }
                         break;
                 }