commit/StationPlaylist: 2 new changesets

  • From: commits-noreply@xxxxxxxxxxxxx
  • To: nvda-addons-commits@xxxxxxxxxxxxx
  • Date: Fri, 21 Aug 2015 10:40:44 -0000

2 new commits in StationPlaylist:

https://bitbucket.org/nvdaaddonteam/stationplaylist/commits/839f6fd1f2a3/
Changeset: 839f6fd1f2a3
Branch: None
User: josephsl
Date: 2015-08-21 08:45:28+00:00
Summary: Library scan R2 (6.0-dev): Fix a regression due to NvDA Core
ticket 3831: scan completion will not be announced twice.

In name change event, strengthen the announcement check condition if library
scanning is done while focused on the Insert Tracks dialog. This fixes a
regression introduced as a result of NVDA Core 3831. No need to document this,
as 6.0-dev is still in development and this version will require 2015.3 anyway.

Affected #: 1 file

diff --git a/addon/appModules/splstudio/__init__.py
b/addon/appModules/splstudio/__init__.py
index 3154f4b..d8d6d5b 100755
--- a/addon/appModules/splstudio/__init__.py
+++ b/addon/appModules/splstudio/__init__.py
@@ -349,9 +349,6 @@ class AppModule(appModuleHandler.AppModule):
# Do not let NvDA get name for None object when SPL window is
maximized.
if not obj.name:
return
- # Suppress announcing status messages when background
monitoring is unavailable.
- if api.getForegroundObject().processID != self.processID and
not self.backgroundStatusMonitor:
- nextHandler()
# Only announce changes in status bar objects when told to do
so.
if obj.windowClassName == "TStatusBar" and
self._TStatusBarChanged(obj):
# Special handling for Play Status
@@ -369,11 +366,10 @@ class AppModule(appModuleHandler.AppModule):
if self.productVersion not in
noLibScanMonitor:
if not
self.backgroundStatusMonitor: self.libraryScanning = True
elif "match" in obj.name:
- if
splconfig.SPLConfig["LibraryScanAnnounce"] != "off":
+ if
splconfig.SPLConfig["LibraryScanAnnounce"] != "off" and self.libraryScanning:
if
splconfig.SPLConfig["BeepAnnounce"]: tones.beep(370, 100)
else:
- count =
sendMessage(_SPLWin, 1024, 0, 32)
- ui.message("Scan
complete with {scanCount} items".format(scanCount = count))
+ ui.message("Scan
complete with {scanCount} items".format(scanCount = obj.name.split()[3]))
if self.libraryScanning:
self.libraryScanning = False
self.scanCount = 0
else:
@@ -967,7 +963,9 @@ class AppModule(appModuleHandler.AppModule):
self.libraryScanning = False
if self.backgroundStatusMonitor: return
if splconfig.SPLConfig["LibraryScanAnnounce"] != "off":
- if splconfig.SPLConfig["BeepAnnounce"]: tones.beep(370,
100)
+ if splconfig.SPLConfig["BeepAnnounce"]:
+ tones.beep(370, 100)
+ print "scan done"
else:
# Translators: Presented after library scan is
done.
ui.message(_("Scan complete with {itemCount}
items").format(itemCount = countB))


https://bitbucket.org/nvdaaddonteam/stationplaylist/commits/ae021d707dae/
Changeset: ae021d707dae
Branch: 6.0/libraryScanR2
User: josephsl
Date: 2015-08-21 10:40:20+00:00
Summary: Library scan R2 (6.0-dev): Few more fixes, lose focus event is
removed.

More fixes:
* A dedicated routine for Escape key is now available to handle library
scanning.
* Thanks to Escape key script, lose focus event is now gone (should speed
things a bit).
* Print statements were added for debugging purposes, to be removed before long.
Hopefully this fix should be enough - no need to check background status
monitor and lib scan should be a bit more stable. Lose focus event may return
at a future date if recent fixes does not resolve an assortment of library scan
issues.

Affected #: 1 file

diff --git a/addon/appModules/splstudio/__init__.py
b/addon/appModules/splstudio/__init__.py
index d8d6d5b..3faaaf0 100755
--- a/addon/appModules/splstudio/__init__.py
+++ b/addon/appModules/splstudio/__init__.py
@@ -450,15 +450,6 @@ class AppModule(appModuleHandler.AppModule):
return
nextHandler()

- # Continue monitoring library scans among other focus loss management.
- def event_loseFocus(self, obj, nextHandler):
- fg = api.getForegroundObject()
- if fg.windowClassName == "TTrackInsertForm" and
self.libraryScanning and not self.backgroundStatusMonitor:
- global libScanT
- if not libScanT or (libScanT and not
libScanT.isAlive()):
- self.monitorLibraryScan()
- nextHandler()
-
# Add or remove SPL-specific touch commands.
# Code comes from Enhanced Touch Gestures add-on from the same author.
# This may change if NVDA core decides to abandon touch mode concept.
@@ -937,11 +928,13 @@ class AppModule(appModuleHandler.AppModule):
return
countB = sendMessage(_SPLWin, 1024, parem, 32)
if countA == countB:
+ print "values are equal"
self.libraryScanning = False
if self.SPLCurVersion >= "5.10":
countB = sendMessage(_SPLWin, 1024, 0, 32)
# Translators: Presented when library scanning is
finished.
ui.message(_("{itemCount} items in the
library").format(itemCount = countB))
+ print "scan done"
else:
libScanT =
threading.Thread(target=self.libraryScanReporter, args=(_SPLWin, countA,
countB, parem))
libScanT.daemon = True
@@ -950,10 +943,11 @@ class AppModule(appModuleHandler.AppModule):
def libraryScanReporter(self, _SPLWin, countA, countB, parem):
scanIter = 0
while countA != countB:
+ if not self.libraryScanning: return
countA = countB
time.sleep(1)
- # Do not continue if we're back on insert tracks form.
- if api.getForegroundObject().windowClassName ==
"TTrackInsertForm":
+ # Do not continue if we're back on insert tracks form
or library scan is finished.
+ if api.getForegroundObject().windowClassName ==
"TTrackInsertForm" or not self.libraryScanning:
return
countB, scanIter = sendMessage(_SPLWin, 1024, parem,
32), scanIter+1
if countB < 0:
@@ -999,6 +993,13 @@ class AppModule(appModuleHandler.AppModule):
self.deletedFocusObj = False
focus.setFocus()

+ # When Escape is pressed, activate background library scan if
conditions are right.
+ def script_escape(self, gesture):
+ gesture.send()
+ if self.libraryScanning:
+ if not libScanT or (libScanT and not
libScanT.isAlive()):
+ self.monitorLibraryScan()
+

# SPL Assistant: reports status on playback, operation, etc.
# Used layer command approach to save gesture assignments.
@@ -1323,5 +1324,6 @@ class AppModule(appModuleHandler.AppModule):
"kb:control+NVDA+0":"openConfigDialog",
"kb:Shift+delete":"deleteTrack",
"kb:Shift+numpadDelete":"deleteTrack",
+ "kb:escape":"escape",
#"kb:control+nvda+`":"SPLAssistantToggle"
}

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: