1 new commit in StationPlaylist: https://bitbucket.org/nvdaaddonteam/stationplaylist/commits/0c4889b9ea32/ Changeset: 0c4889b9ea32 Branch: master User: josephsl Date: 2014-03-07 13:06:32 Summary: SPL app module: you can now configure end of track alarm to between 1 and 59 seconds. Also edited readme to mentions this change and fix the section heading for 1.2. Affected #: 2 files diff --git a/addon/appModules/splstudio.py b/addon/appModules/splstudio.py index 55b8762..a83afd9 100644 --- a/addon/appModules/splstudio.py +++ b/addon/appModules/splstudio.py @@ -179,22 +179,26 @@ class AppModule(appModuleHandler.AppModule): def script_setEndOfTrackTime(self, gesture): # Borrowed from NVDA core cursorManager.py. - timeVal = self.SPLEndOfTrackTime[-1] + timeVal = self.SPLEndOfTrackTime[-2:] # Translators: A dialog message to set end of track alarm (curAlarmSec is the current end of track alarm in seconds). - timeMSG = _("Enter end of track alarm time in seconds (currently {curAlarmSec})").format(curAlarmSec = timeVal) + timeMSG = _("Enter end of track alarm time in seconds (currently {curAlarmSec})").format(curAlarmSec = timeVal if int(timeVal) >= 10 else timeVal[-1]) dlg = wx.TextEntryDialog(gui.mainFrame, timeMSG, # Translators: The title of end of track alarm dialog. - _("End of track alarm"), defaultValue=timeVal) + _("End of track alarm"), defaultValue=timeVal if int(timeVal) >= 10 else timeVal[-1]) def callback(result): if result == wx.ID_OK: - # Check if the value is indeed between 1 and 9. - if not dlg.GetValue().isdigit() or int(dlg.GetValue()) < 1 or int(dlg.GetValue()) > 9: + # Check if the value is indeed between 1 and 59. + if not dlg.GetValue().isdigit() or int(dlg.GetValue()) < 1 or int(dlg.GetValue()) > 59: # Translators: The error message presented when incorrect alarm time value has been entered. wx.CallAfter(gui.messageBox, _("Incorrect value entered."), # Translators: Standard title for error dialog (copy this from main nvda.po file). _("Error"),wx.OK|wx.ICON_ERROR) - else: self.SPLEndOfTrackTime = self.SPLEndOfTrackTime.replace(self.SPLEndOfTrackTime[-1], dlg.GetValue()) # Quite a complicated replacement expression, but it works in this case. + else: + # To handle the case where we have single digits or two digits. + if int(dlg.GetValue()) <= 9: newAlarmSec = "0" + dlg.GetValue() + else: newAlarmSec = dlg.GetValue() + self.SPLEndOfTrackTime = self.SPLEndOfTrackTime.replace(self.SPLEndOfTrackTime[-2:], newAlarmSec) # Quite a complicated replacement expression, but it works in this case. gui.runScriptModalDialog(dlg, callback) script_setEndOfTrackTime.__doc__="sets end of track alarm (default is 5 seconds)." diff --git a/readme.md b/readme.md index c45ce87..adac49c 100755 --- a/readme.md +++ b/readme.md @@ -50,15 +50,17 @@ The available SPL Controller commands are: ## End of track alarm ## -Five seconds before the current track ends, NVDA will play a short beep to indicate that the track is about to end. This works anywhere (even within SPL Studio window). Press Control+NVDA+2 to configure this between 1 and 9 seconds. +Five seconds before the current track ends, NVDA will play a short beep to indicate that the track is about to end. This works anywhere (even within SPL Studio window). Press Control+NVDA+2 to configure this between 1 and 59 seconds. ## Changes for 2.0-dev * Added more SPL Assistant commands such as cart edit mode status. +* Extended the end of track alarm range to 59 seconds. -## Changes for 1.2-dev +## Changes for 1.2 * When Station Playlist 4.x is installed on certain Windows 8/8.1 computers, it is again possible to hear elapsed and remaining times for a track. +* Updated translations. ## Changes for 1.1 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.