4 new commits in wintenApps:
https://bitbucket.org/nvdaaddonteam/wintenapps/commits/df354cde6ee1/
Changeset: df354cde6ee1
Branch: None
User: josephsl
Date: 2016-10-25 13:58:53+00:00
Summary: Skype Preview: foundation to allow more commands and status to be
announced.
For now, one of the reliable ways to obtain elements is scraping the screen
(for loop). As of now, a dedicated function has been added to locate the
desired element (based on automation ID), useful for locating chat history,
edit fields, contacts list and others (in hopes of adding keyboard shortcuts).
Affected #: 1 file
diff --git a/addon/appModules/skypeapp.py b/addon/appModules/skypeapp.py
index 1ba1574..e463eb8 100755
--- a/addon/appModules/skypeapp.py
+++ b/addon/appModules/skypeapp.py
@@ -17,7 +17,23 @@ class AppModule(appModuleHandler.AppModule):
for pos in xrange(10):
self.bindGesture("kb:control+nvda+%s"%pos,
"readMessage")
- # Borrowed from Skype for Desktop app module (NVDA Core).
+ # Locate various elements, as this is one of the best ways to do this
in Skype Preview.
+ # The best criteria is automation ID (class names are quite generic).
+ def locateElement(self, automationID):
+ # Foreground isn't reliable.
+ fg = api.getForegroundObject()
+ if fg.getChild(1).childCount > 0:
+ screenContent = fg.getChild(1)
+ else:
+ screenContent = fg.getChild(2)
+ # Element placement (according to UIA changes from time to time.
+ # Wish there is a more elegant way to do this...
+ for element in screenContent.children:
+ if isinstance(element, UIA) and
element.UIAElement.cachedAutomationID == automationID:
+ return element
+ return None
+
+ # Borrowed from Skype for Desktop app module (NVDA
Core).
RE_MESSAGE = re.compile(r"^From (?P<from>.*), (?P<body>.*), sent on
(?P<time>.*?)(?: Edited by .* at .*?)?(?: Not delivered|New)?$")
def reportMessage(self, message):
@@ -34,33 +50,28 @@ class AppModule(appModuleHandler.AppModule):
# Announce typing indicator (same as Skype for
Desktop).
nextElement = obj.next.UIAElement
if nextElement.cachedClassName == "RichEditBox"
and nextElement.cachedAutomationID == "ChatEditBox":
- # Translaotrs: Presented when someone
stops typing in Skype app (same as Skype for Desktop).
+ # Translators: Presented when someone
stops typing in Skype app (same as Skype for Desktop).
ui.message(obj.name if obj.name != ""
else _("Typing stopped"))
elif uiElement.cachedAutomationID == "Message" and
uiElement.cachedClassName == "ListViewItem":
self.reportMessage(obj.name)
nextHandler()
def script_readMessage(self, gesture):
- # Foreground isn't reliable, so need to locate the actual chat
contents list.
- fg = api.getForegroundObject()
- if fg.getChild(1).childCount > 0:
- screenContent = fg.getChild(1)
- else:
- screenContent = fg.getChild(2)
+ chatHistory = self.locateElement("chatMessagesListView")
# Position of chat history in object hierarchy changes based on
which tabv is active.
# Wish there is a more elegant way to do this...
- for element in screenContent.children:
- if isinstance(element, UIA) and
element.UIAElement.cachedAutomationID == "chatMessagesListView":
- pos = int(gesture.displayName[-1])
- if pos == 0: pos += 10
- try:
- message = element.getChild(0-pos)
- api.setNavigatorObject(message)
- self.reportMessage(message.name)
- return
- except IndexError:
- return
- # Translators: Presented when message history isn't found in
Skype Preview app.
- ui.message(_("Chat history not found"))
+ if chatHistory is None:
+ # Translators: Presented when message history isn't
found in Skype Preview app.
+ ui.message(_("Chat history not found"))
+ return
+ pos = int(gesture.displayName[-1])
+ if pos == 0: pos += 10
+ try:
+ message = chatHistory.getChild(0-pos)
+ api.setNavigatorObject(message)
+ self.reportMessage(message.name)
+ return
+ except IndexError:
+ return
# Translators: Input help mode message for a command in Skype Preview
app.
script_readMessage.__doc__ = _("Reports and moves the review cursor to
a recent message")
https://bitbucket.org/nvdaaddonteam/wintenapps/commits/35d9caec3195/
Changeset: 35d9caec3195
Branch: None
User: josephsl
Date: 2016-10-26 14:55:56+00:00
Summary: Settings: Catch attribute exception when value of the progress bar
is invalid.
Oops, in some cases, obj.previous.value is invalid to a point where value or
object itself is unavailable. Thus catch this exception and move on.
Affected #: 1 file
diff --git a/addon/appModules/systemsettings.py
b/addon/appModules/systemsettings.py
index 3bae29c..cfc656e 100755
--- a/addon/appModules/systemsettings.py
+++ b/addon/appModules/systemsettings.py
@@ -26,14 +26,17 @@ class AppModule(appModuleHandler.AppModule):
# For now, all name change events will result in items being
announced.
if isinstance(obj, UIA) and obj.name != self._nameChangeCache:
automationID = obj.UIAElement.cachedAutomationID
- # Don't repeat the fact that update
download/installation is in progress if progress bar beep is on.
- if ((automationID ==
"SystemSettings_MusUpdate_UpdateStatus_DescriptionTextBlock" and
obj.previous.value <= "0")
- # For search progress bar, do not repeat it.
- or (automationID == "ProgressBar")
- # Do not announce "result not found" error unless have
to.
- or (automationID == "NoResultsFoundTextBlock" and
obj.parent.UIAElement.cachedAutomationID == "StatusTextPopup")):
- self._nameChangeCache = obj.name
- ui.message(obj.name)
+ try:
+ # Don't repeat the fact that update
download/installation is in progress if progress bar beep is on.
+ if ((automationID ==
"SystemSettings_MusUpdate_UpdateStatus_DescriptionTextBlock" and
obj.previous.value <= "0")
+ # For search progress bar, do not repeat it.
+ or (automationID == "ProgressBar")
+ # Do not announce "result not found" error
unless have to.
+ or (automationID == "NoResultsFoundTextBlock"
and obj.parent.UIAElement.cachedAutomationID == "StatusTextPopup")):
+ self._nameChangeCache = obj.name
+ ui.message(obj.name)
+ except AttributeError:
+ pass
nextHandler()
def event_UIA_controllerFor(self, obj, nextHandler):
https://bitbucket.org/nvdaaddonteam/wintenapps/commits/91a86eab0766/
Changeset: 91a86eab0766
Branch: None
User: josephsl
Date: 2016-10-27 00:06:04+00:00
Summary: Skype Preview: Add commands to locate and move to specific
elements.
Add Alt+number row commands to move to contacts list (1), conversations (2) and
chat edit field (3), mimicking that of Desktop client.
Affected #: 1 file
diff --git a/addon/appModules/skypeapp.py b/addon/appModules/skypeapp.py
index e463eb8..907293d 100755
--- a/addon/appModules/skypeapp.py
+++ b/addon/appModules/skypeapp.py
@@ -16,6 +16,8 @@ class AppModule(appModuleHandler.AppModule):
super(AppModule, self).__init__(*args, **kwargs)
for pos in xrange(10):
self.bindGesture("kb:control+nvda+%s"%pos,
"readMessage")
+ for pos in xrange(1, 4):
+ self.bindGesture("kb:alt+%s"%pos, "moveToArea")
# Locate various elements, as this is one of the best ways to do this
in Skype Preview.
# The best criteria is automation ID (class names are quite generic).
@@ -75,3 +77,21 @@ class AppModule(appModuleHandler.AppModule):
return
# Translators: Input help mode message for a command in Skype Preview
app.
script_readMessage.__doc__ = _("Reports and moves the review cursor to
a recent message")
+
+ # Various utility scripts to move to various parts of Skype Preview.
+ # Tuple below holds UIA automation ID for the element and errors if the
element is not found.
+ moveTo = (
+ (None, None),
+ ("ContactList", "Contacts list not found"),
+ ("ConversationHistoryPanel", "Conversation history not found"),
+ ("ChatEditBox", "Chat edit field not found"),
+ )
+
+ def script_moveToArea(self, gesture):
+ area = int(gesture.displayName.split("+")[-1])
+ element = self.locateElement(self.moveTo[area][0])
+ if element is None:
+ ui.message(self.moveTo[area][1])
+ return
+ element.setFocus()
+ return
https://bitbucket.org/nvdaaddonteam/wintenapps/commits/8b5a4fb81ed8/
Changeset: 8b5a4fb81ed8
Branch: stable
User: josephsl
Date: 2016-10-27 00:14:00+00:00
Summary: 16.11: mostly l10n, Skype preview enhancements
Signed-off-by: Joseph Lee <joseph.lee22590@xxxxxxxxx>
Affected #: 2 files
diff --git a/buildVars.py b/buildVars.py
index 6cd4e33..fff06b1 100755
--- a/buildVars.py
+++ b/buildVars.py
@@ -19,7 +19,7 @@ addon_info = {
# Translators: Long description to be shown for this add-on on add-on
information from add-ons manager
"addon_description" : _("""A collection of app modules for various
Windows 10 apps"""),
# version
- "addon_version" : "16.10.1",
+ "addon_version" : "16.11",
# Author(s)
"addon_author" : u"Joseph Lee <joseph.lee22590@xxxxxxxxx>, Derek Riemer
<driemer.riemer@xxxxxxxxx> and others",
# URL for the add-on documentation support
diff --git a/readme.md b/readme.md
index 4f628cd..72a6d92 100755
--- a/readme.md
+++ b/readme.md
@@ -24,7 +24,7 @@ The following app modules or support modules for some apps
are included (see eac
* Weather.
* Miscellaneous modules for controls such as Start Menu tiles.
-Note: this add-on requires Windows 10 Version 1507 (build 10240) or later and
NVDA 2016.3 or later.
+Note: this add-on requires Windows 10 Version 1507 (build 10240) or later and
NVDA 2016.3 or later. For best results, use the add-on with latest stable build
(build 14393).
## General
@@ -33,6 +33,7 @@ Note: this add-on requires Windows 10 Version 1507 (build
10240) or later and NV
* Certain dialogs are now recognized as proper dialogs. This include Insider
Preview dialog (settings app) and new-style UAC dialog in build 14328 and later
for NvDA 2016.2.1 or earlier.
* Appearance/close of suggestions for certain search fields (notably Settings
app) is announced via sounds and/or brailled.
* In certain context menus (such as in Edge), position information (e.g. 1 of
2) is no longer announced.
+* The following UIA events are recognized: Controller for, live region changed
(handled by name change event).
## Alarms and clock
@@ -75,6 +76,7 @@ Note: this add-on requires Windows 10 Version 1507 (build
10240) or later and NV
* Typing indicator text is announced just like Skype for Desktop client.
* Partial return of Control+NvDA+number row commands to read recent chat
history and to move navigator object to chat entries just like Skype for
Desktop.
+* You can now press Alt+number row to locate and move to contacts list (1),
conversations (2) and chat edit field (3). Note that one must activate these
tabs to move to the desired part.
## Store
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.