commit/StationPlaylist: josephsl: Track item (6.0-dev): No more reliance on foreground window, window style will be consulted instead.

  • From: commits-noreply@xxxxxxxxxxxxx
  • To: nvda-addons-commits@xxxxxxxxxxxxx
  • Date: Sat, 22 Aug 2015 23:40:38 -0000

1 new commit in StationPlaylist:

https://bitbucket.org/nvdaaddonteam/stationplaylist/commits/8910a1e1aac6/
Changeset: 8910a1e1aac6
Branch: 6.0/windowStyle
User: josephsl
Date: 2015-08-22 23:40:19+00:00
Summary: Track item (6.0-dev): No more reliance on foreground window,
window style will be consulted instead.

Previously, foreground window was checked. A major problem was that NVDA would
not recognize that it is dealing with an actual track item (it'll just say it
is an IAccessible item). This was more so after dismissing nVDA's own dialogs
(alarm dialogs, for instance). To solve this problem, window style will be
consulted (they don't change even across sessions).
For now Studio 5.10's track item window style was added. A possible future
commit will add Studio 5.0x track items if their window style is different. As
this change is a fundamental change, this will be used in add-on 6.0.

Affected #: 1 file

diff --git a/addon/appModules/splstudio/__init__.py
b/addon/appModules/splstudio/__init__.py
index 3154f4b..a34ee61 100755
--- a/addon/appModules/splstudio/__init__.py
+++ b/addon/appModules/splstudio/__init__.py
@@ -307,13 +307,12 @@ class AppModule(appModuleHandler.AppModule):

# Some controls which needs special routines.
def chooseNVDAObjectOverlayClasses(self, obj, clsList):
- fg = api.getForegroundObject()
- if fg:
- role = obj.role
- if obj.windowClassName == "TTntListView.UnicodeClass"
and fg.windowClassName == "TStudioForm" and role == controlTypes.ROLE_LISTITEM:
- clsList.insert(0, SPL510TrackItem)
- elif obj.windowClassName == "TListView" and
fg.windowClassName == "TStudioForm" and role in (controlTypes.ROLE_CHECKBOX,
controlTypes.ROLE_LISTITEM):
- clsList.insert(0, SPLTrackItem)
+ role = obj.role
+ windowStyle = obj.windowStyle
+ if obj.windowClassName == "TTntListView.UnicodeClass" and role
== controlTypes.ROLE_LISTITEM and windowStyle == 1443991625:
+ clsList.insert(0, SPL510TrackItem)
+ elif obj.windowClassName == "TListView" and role in
(controlTypes.ROLE_CHECKBOX, controlTypes.ROLE_LISTITEM) and windowStyle ==
1443991625:
+ clsList.insert(0, SPLTrackItem)

# Keep an eye on library scans in insert tracks window.
libraryScanning = False

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

--

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/StationPlaylist: josephsl: Track item (6.0-dev): No more reliance on foreground window, window style will be consulted instead. - commits-noreply