2 new commits in StationPlaylist:
https://bitbucket.org/nvdaaddonteam/stationplaylist/commits/d14cc6e8aa43/
Changeset: d14cc6e8aa43
Branch: None
User: josephsl
Date: 2016-03-24 21:54:47+00:00
Summary: 7.0 beta 5: When obtaining remaining time via SPL Controller,
hours, minutes and seconds are announced.
Affected #: 1 file
diff --git a/addon/globalPlugins/SPLStudioUtils/__init__.py
b/addon/globalPlugins/SPLStudioUtils/__init__.py
index f1d1fa7..f4c3ad3 100755
--- a/addon/globalPlugins/SPLStudioUtils/__init__.py
+++ b/addon/globalPlugins/SPLStudioUtils/__init__.py
@@ -227,7 +227,23 @@ class GlobalPlugin(globalPluginHandler.GlobalPlugin):
remainingTime = winUser.sendMessage(SPLWin, SPLMSG, 3,
SPLCurTrackPlaybackTime)
# Translators: Presented when no track is playing in Station
Playlist Studio.
if remainingTime < 0: ui.message(_("There is no track
playing."))
- else: ui.message(str(remainingTime/1000))
+ else:
+ # 7.0: Present remaining time in hh:mm:ss format for
enhanced experience (borrowed from the app module).
+ remainingTime = (remainingTime/1000)+1
+ if remainingTime == 0: ui.message("00:00")
+ elif 1 <= remainingTime <= 59:
ui.message("00:{0}".format(str(remainingTime).zfill(2)))
+ else:
+ mm, ss = divmod(remainingTime, 60)
+ if mm > 59:
+ hh, mm = divmod(mm, 60)
+ t0 = str(hh).zfill(2)
+ t1 = str(mm).zfill(2)
+ t2 = str(ss).zfill(2)
+ ui.message(":".join([t0, t1, t2]))
+ else:
+ t1 = str(mm).zfill(2)
+ t2 = str(ss).zfill(2)
+ ui.message(":".join([t1, t2]))
self.finish()
def script_announceNumMonitoringEncoders(self, gesture):
https://bitbucket.org/nvdaaddonteam/stationplaylist/commits/85d4281ec931/
Changeset: 85d4281ec931
Branch: staging
User: josephsl
Date: 2016-03-24 21:55:37+00:00
Summary: Merge branch '8.0/unrestrictedSPLAssistant' into staging
Affected #: 1 file
diff --git a/addon/appModules/splstudio/__init__.py
b/addon/appModules/splstudio/__init__.py
index c11ff07..adba16c 100755
--- a/addon/appModules/splstudio/__init__.py
+++ b/addon/appModules/splstudio/__init__.py
@@ -1336,11 +1336,17 @@ class AppModule(appModuleHandler.AppModule):
def script_SPLAssistantToggle(self, gesture):
# Enter the layer command if an only if we're in the track list
to allow easier gesture assignment.
+ # 8.0: This requirement has been relaxed (command themselves
will check for specific conditions).
# Also, do not bother if the app module is not running.
+ if scriptHandler.getLastScriptRepeatCount() > 0:
+ gesture.send()
+ self.finish()
+ return
try:
- fg = api.getForegroundObject()
- if fg.windowClassName != "TStudioForm":
- gesture.send()
+ # 8.0: Don't bother if handle to Studio isn't found.
+ if _SPLWin is None:
+ # Translators: Presented when SPL Assistant
cannot be invoked.
+ ui.message(_("Failed to locate Studio main
window, cannot enter SPL Assistant"))
return
if self.SPLAssistant:
self.script_error(gesture)
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.