commit/resourceMonitor: josephsl: Gesture reassignment: borrowed the exception code from Noelia - the add-on now checks if it can import needed modules for this feature.

  • From: commits-noreply@xxxxxxxxxxxxx
  • To: nvda-addons-commits@xxxxxxxxxxxxx
  • Date: Mon, 21 Oct 2013 07:53:34 -0000

1 new commit in resourceMonitor:

https://bitbucket.org/nvdaaddonteam/resourcemonitor/commits/013e3e728303/
Changeset:   013e3e728303
Branch:      gestureReassignment
User:        josephsl
Date:        2013-10-21 09:53:22
Summary:     Gesture reassignment: borrowed the exception code from Noelia - 
the add-on now checks if it can import needed modules for this feature.

Affected #:  1 file

diff --git a/addon/globalPlugins/resourceMonitor/__init__.py 
b/addon/globalPlugins/resourceMonitor/__init__.py
index 0aaa7d0..d7ed206 100644
--- a/addon/globalPlugins/resourceMonitor/__init__.py
+++ b/addon/globalPlugins/resourceMonitor/__init__.py
@@ -13,6 +13,10 @@ import battery
 import addonHandler
 addonHandler.initTranslation()
 
+# 2013.3 or later: is gesture reassignment possible?
+try:
+       from baseObject import ScriptableObject # 2013.3 or later.
+except: notImplementedError # 2013.2 or earlier.
 
 def toBiggestBytes(n, x=2, useLongNames=False):
        #returns a string where n, rounded to x, is in the largest logical 
measure possible
@@ -35,6 +39,9 @@ def tryTrunk(n):
 
 class GlobalPlugin(globalPluginHandler.GlobalPlugin):
 
+       # Translators: The gestures category for this add-on in input gestures 
dialog (2013.3 or later).
+       scriptCategory = _("Resource Monitor")
+
        def script_announceBatteryInfo(self, gesture):
                info=""
                #returns nothing, but sets vars we can now inspect

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: Gesture reassignment: borrowed the exception code from Noelia - the add-on now checks if it can import needed modules for this feature. - commits-noreply