commit/StationPlaylist: josephsl: Library scan R2 (6.0-dev): The last vestige of send message is now gone, all methods now use status API function.

  • From: commits-noreply@xxxxxxxxxxxxx
  • To: nvda-addons-commits@xxxxxxxxxxxxx
  • Date: Sat, 29 Aug 2015 16:01:59 -0000

1 new commit in StationPlaylist:

https://bitbucket.org/nvdaaddonteam/stationplaylist/commits/b298b53b7054/
Changeset: b298b53b7054
Branch: master
User: josephsl
Date: 2015-08-29 16:01:38+00:00
Summary: Library scan R2 (6.0-dev): The last vestige of send message is now
gone, all methods now use status API function.

Affected #: 1 file

diff --git a/addon/appModules/splstudio/__init__.py
b/addon/appModules/splstudio/__init__.py
index dd61875..05be334 100755
--- a/addon/appModules/splstudio/__init__.py
+++ b/addon/appModules/splstudio/__init__.py
@@ -928,7 +928,7 @@ class AppModule(appModuleHandler.AppModule):
if libScanT and libScanT.isAlive() and
api.getForegroundObject().windowClassName == "TTrackInsertForm":
return
parem = 0 if self.SPLCurVersion < "5.10" else 1
- countA = sendMessage(_SPLWin, 1024, parem, 32)
+ countA = statusAPI(parem, 32, ret=True)
if countA == 0:
self.libraryScanning = False
return
@@ -936,12 +936,11 @@ class AppModule(appModuleHandler.AppModule):
if api.getForegroundObject().windowClassName ==
"TTrackInsertForm" and self.productVersion in noLibScanMonitor:
self.libraryScanning = False
return
- countB = sendMessage(_SPLWin, 1024, parem, 32)
+ countB = statusAPI(parem, 32, ret=True)
if countA == countB:
- print "values are equal"
self.libraryScanning = False
if self.SPLCurVersion >= "5.10":
- countB = sendMessage(_SPLWin, 1024, 0, 32)
+ countB = statusAPI(0, 32, ret=True)
# Translators: Presented when library scanning is
finished.
ui.message(_("{itemCount} items in the
library").format(itemCount = countB))
print "scan done"
@@ -959,7 +958,7 @@ class AppModule(appModuleHandler.AppModule):
# 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
+ countB, scanIter = statusAPI(parem, 32, ret=True),
scanIter+1
if countB < 0:
break
if scanIter%5 == 0 and
splconfig.SPLConfig["LibraryScanAnnounce"] not in ("off", "ending"):
@@ -1212,9 +1211,9 @@ class AppModule(appModuleHandler.AppModule):
def script_libraryScanMonitor(self, gesture):
if not self.libraryScanning:
if self.productVersion >= "5.10":
- scanning = sendMessage(_SPLWin, 1024, 1, 32)
+ scanning = statusAPI(1, 32, ret=True)
if scanning < 0:
- items = sendMessage(_SPLWin, 1024, 0,
32)
+ items = statusAPI(0, 32, ret=True)
ui.message(_("{itemCount} items in the
library").format(itemCount = items))
return
self.libraryScanning = True

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: Library scan R2 (6.0-dev): The last vestige of send message is now gone, all methods now use status API function. - commits-noreply