commit/wintenApps: 3 new changesets

  • From: commits-noreply@xxxxxxxxxxxxx
  • To: commits+int+220+6085746285340533186@xxxxxxxxxxxxxxxxxxxxx, nvda-addons-commits@xxxxxxxxxxxxx
  • Date: Fri, 07 Jun 2019 21:20:13 +0000 (UTC)

3 new commits in wintenApps:

https://bitbucket.org/nvdaaddonteam/wintenapps/commits/6bfb6d679ea8/
Changeset:   6bfb6d679ea8
Branch:      None
User:        josephsl
Date:        2019-06-07 19:09:32+00:00
Summary:     Calculator: catch attribute error when changing Calculator 
categories.

Due to yet another UI redesign in 2019, a different activity ID is seen whne 
changing categories i.e. fro mstandard calculator to length converter. 
Unfortunately, this element isn't detected as next to results, raiting 
attribute error. Thus catch this if possible by checking for presence of 
possible result element.

Affected #:  1 file

diff --git a/addon/appModules/calculator.py b/addon/appModules/calculator.py
index 861fd76..01ed4e2 100755
--- a/addon/appModules/calculator.py
+++ b/addon/appModules/calculator.py
@@ -69,7 +69,9 @@ class AppModule(appModuleHandler.AppModule):
                try:
                        shouldAnnounceNotification = 
obj.previous.UIAElement.cachedAutomationID in ("numberPad", 
"UnitConverterRootGrid")
                except AttributeError:
-                       shouldAnnounceNotification = 
api.getForegroundObject().children[1].lastChild.firstChild.UIAElement.cachedAutomationID
 != "CalculatorResults"
+                       # Another UI redesign in 2019, causing attribute error 
when changing categories.
+                       resultElement = 
api.getForegroundObject().children[1].lastChild
+                       shouldAnnounceNotification = resultElement and 
resultElement.firstChild and 
resultElement.firstChild.UIAElement.cachedAutomationID != "CalculatorResults"
                # Also, warn users if maximum digi count has been reached (a 
different activity ID than display updates).
                if shouldAnnounceNotification or activityId == 
"MaxDigitsReached":
                        nextHandler()


https://bitbucket.org/nvdaaddonteam/wintenapps/commits/4f9a61ccece5/
Changeset:   4f9a61ccece5
Branch:      None
User:        josephsl
Date:        2019-06-07 21:18:48+00:00
Summary:     Settings: revise feature update text locator strategy due to 
introduction of download and instlal link.

It isn't just update history that'll be subject to feature update text locator. 
Turns out this is applicable for 'download and install now' link introduced in 
later revisions of build 17134 and later. Thankfully, the UI tree is feature 
update text -> description -> link. Thus 'label' the link by including the 
feature update title (not the description).
As part of this change, feature update locator logic has been edited. Instead 
of checking for update history link, a dedicated conditional will be used to 
check for links as well. This allows link label issues to be identified and 
corrected in future releases.

Affected #:  1 file

diff --git a/addon/appModules/systemsettings.py 
b/addon/appModules/systemsettings.py
index 0ceaca4..f530945 100755
--- a/addon/appModules/systemsettings.py
+++ b/addon/appModules/systemsettings.py
@@ -28,18 +28,23 @@ class AppModule(appModuleHandler.AppModule):
                                        obj.name = obj.parent.previous.name
                        # From Redstone 1 onwards, update history shows status 
rather than the title.
                        # In build 16232, the title is shown but not the 
status, so include this for sake of backward compatibility.
-                       elif obj.role == controlTypes.ROLE_LINK and 
obj.UIAElement.cachedAutomationID.startswith("HistoryEvent") and obj.name != 
obj.previous.name:
+                       # In later revisions of build 17134 and later, feature 
update download link is provided and is initially called "download and install 
now", thus add the feature update title as well.
+                       elif obj.role == controlTypes.ROLE_LINK:
                                nameList = [obj.name]
-                               # Add the status text in 1709 and later.
-                               # But since 16251, a "what's new" link has been 
added for feature updates, so consult two previous objects.
-                               eventID = 
obj.UIAElement.cachedAutomationID.split("_")[0]
-                               possibleFeatureUpdateText = 
obj.previous.previous
-                               # This automation ID may change in a future 
Windows 10 release.
-                               if 
possibleFeatureUpdateText.UIAElement.cachedAutomationID == "_".join([eventID, 
"TitleTextBlock"]):
-                                       nameList.insert(0, obj.previous.name)
-                                       nameList.insert(0, 
possibleFeatureUpdateText.name)
-                               else:
-                                       nameList.append(obj.next.name)
+                               if 
obj.UIAElement.cachedAutomationID.startswith("HistoryEvent") and obj.name != 
obj.previous.name:
+                                       # Add the status text in 1709 and later.
+                                       # But since 16251, a "what's new" link 
has been added for feature updates, so consult two previous objects.
+                                       eventID = 
obj.UIAElement.cachedAutomationID.split("_")[0]
+                                       possibleFeatureUpdateText = 
obj.previous.previous
+                                       # This automation ID may change in a 
future Windows 10 release.
+                                       if 
possibleFeatureUpdateText.UIAElement.cachedAutomationID == "_".join([eventID, 
"TitleTextBlock"]):
+                                               nameList.insert(0, 
obj.previous.name)
+                                               nameList.insert(0, 
possibleFeatureUpdateText.name)
+                                       else:
+                                               nameList.append(obj.next.name)
+                               elif obj.UIAElement.cachedAutomationID == 
"SystemSettings_MusUpdate_SeekerUpdateUX_HyperlinkButton":
+                                       # Unconditionally locate the new 
feature update title, skipping the link description.
+                                       nameList.insert(0, 
obj.previous.previous.name)
                                obj.name = ", ".join(nameList)
                        # In some cases, Active Directory-style name is the 
name of the window, so tell NVDA to use something more meaningful.
                        if obj.name == "CN=Microsoft Windows, O=Microsoft 
Corporation, L=Redmond, S=Washington, C=US":


https://bitbucket.org/nvdaaddonteam/wintenapps/commits/ca5f63d0fa5d/
Changeset:   ca5f63d0fa5d
Branch:      stable
User:        josephsl
Date:        2019-06-07 21:19:24+00:00
Summary:     Settings: separate Active Directory name conditional from the rest 
via 'elif' clause.

Affected #:  1 file

diff --git a/addon/appModules/systemsettings.py 
b/addon/appModules/systemsettings.py
index f530945..8edec4f 100755
--- a/addon/appModules/systemsettings.py
+++ b/addon/appModules/systemsettings.py
@@ -47,7 +47,7 @@ class AppModule(appModuleHandler.AppModule):
                                        nameList.insert(0, 
obj.previous.previous.name)
                                obj.name = ", ".join(nameList)
                        # In some cases, Active Directory-style name is the 
name of the window, so tell NVDA to use something more meaningful.
-                       if obj.name == "CN=Microsoft Windows, O=Microsoft 
Corporation, L=Redmond, S=Washington, C=US":
+                       elif obj.name == "CN=Microsoft Windows, O=Microsoft 
Corporation, L=Redmond, S=Washington, C=US":
                                obj.name = obj.firstChild.name
 
        def chooseNVDAObjectOverlayClasses(self, obj, clsList):

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

--

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: