commit/resourceMonitor: josephsl: Windows versions: now announces service pack level as well. One more task: try to add 32 or 64-bit version info.

  • From: commits-noreply@xxxxxxxxxxxxx
  • To: nvda-addons-commits@xxxxxxxxxxxxx
  • Date: Sat, 14 Sep 2013 09:27:04 -0000

1 new commit in resourceMonitor:

https://bitbucket.org/nvdaaddonteam/resourcemonitor/commits/b88a3799db6a/
Changeset:   b88a3799db6a
Branch:      master
User:        josephsl
Date:        2013-09-14 11:26:51
Summary:     Windows versions: now announces service pack level as well. One 
more task: try to add 32 or 64-bit version info.

Affected #:  1 file

diff --git a/addon/globalPlugins/resourceMonitor/__init__.py 
b/addon/globalPlugins/resourceMonitor/__init__.py
index 2e4ab07..dd5ffbb 100644
--- a/addon/globalPlugins/resourceMonitor/__init__.py
+++ b/addon/globalPlugins/resourceMonitor/__init__.py
@@ -101,9 +101,9 @@ class GlobalPlugin(globalPluginHandler.GlobalPlugin):
        script_announceRamInfo.__doc__=_("Presents the used and total space for 
both physical and virtual ram.")
 
        def script_announceWinVer(self, gesture):
-               # Obtain winversion.
+               # Obtain winversion. The versions themselves doesn't need to be 
translated.
                winMajor, winMinor, sp, server = sys.getwindowsversion().major, 
sys.getwindowsversion().minor, sys.getwindowsversion().service_pack, 
sys.getwindowsversion().product_type
-               info = "Windows version: "
+               info = _("Windows version: ")
                if winMajor == 5: # XP (5.1) or Server 2003 (5.2).
                        if winMinor == 1: info+= "Windows XP" # Since most XP 
systems use 32-bit editions.
                        elif winMinor == 2: info+= "Windows Server 2003"
@@ -112,6 +112,7 @@ class GlobalPlugin(globalPluginHandler.GlobalPlugin):
                        elif winMinor == 1: info+= "Windows 7" if server == 1 
else "Windows Server 2008 R2" # Windows 7
                        elif winMinor == 2: info+= "Windows 8" if server == 1 
else "Windows Server 2012" # Windows 8.
                        elif winMinor == 3: info+= "Windows 8.1" if server == 1 
else "Windows Server 2012 R2" # Windows 8.1.
+               if sp != "": info = " " + sp # Give service pack level.
                ui.message(info)
        script_announceWinVer.__doc__="Announces the version of Windows you are 
using."

Repository URL: https://bitbucket.org/nvdaaddonteam/resourcemonitor/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.

Other related posts:

  • » commit/resourceMonitor: josephsl: Windows versions: now announces service pack level as well. One more task: try to add 32 or 64-bit version info. - commits-noreply