commit/StationPlaylist: josephsl: Merged master

  • From: commits-noreply@xxxxxxxxxxxxx
  • To: nvda-addons-commits@xxxxxxxxxxxxx
  • Date: Thu, 09 Apr 2015 22:27:39 -0000

1 new commit in StationPlaylist:

https://bitbucket.org/nvdaaddonteam/stationplaylist/commits/5920f71b6959/
Changeset: 5920f71b6959
Branch: 5.0/initConfigBeltway
User: josephsl
Date: 2015-04-09 22:27:13+00:00
Summary: Merged master

Affected #: 2 files

diff --git a/addon/appModules/splstudio/__init__.py
b/addon/appModules/splstudio/__init__.py
index 3b69759..8f69a6d 100755
--- a/addon/appModules/splstudio/__init__.py
+++ b/addon/appModules/splstudio/__init__.py
@@ -413,6 +413,8 @@ class AppModule(appModuleHandler.AppModule):
if touchHandler.handler:
if "SPL" not in touchHandler.availableTouchModes:
touchHandler.availableTouchModes.append("SPL")
+ # Add the human-readable representation also.
+ touchHandler.touchModeLabels["spl"] = _("SPL
mode")

def event_appModule_loseFocus(self):
if touchHandler.handler:
@@ -422,18 +424,16 @@ class AppModule(appModuleHandler.AppModule):
# If we have too many touch modes, pop all
except the original entries.
for mode in touchHandler.availableTouchModes:
if mode == "SPL":
touchHandler.availableTouchModes.pop()
+ try:
+ del touchHandler.touchModeLabels["spl"]
+ except KeyError:
+ pass


# Save configuration when terminating.
def terminate(self):
super(AppModule, self).terminate()
splconfig.saveConfig()
- # Hack: until the public API is available, remove SPL entry
from accepted events manually.
- try:
- eventHandler._acceptEvents.remove(("nameChange",
self.processID, "TStatusBar"))
- eventHandler._acceptEvents.remove(("nameChange",
self.processID, "TStaticText"))
- except KeyError, AttributeError:
- pass
try:
self.prefsMenu.RemoveItem(self.SPLSettings)
except AttributeError, wx.PyDeadObjectError:
@@ -478,67 +478,54 @@ class AppModule(appModuleHandler.AppModule):

# Scripts which rely on API.
def script_sayRemainingTime(self, gesture):
- if self.SPLCurVersion >= SPLMinVersion:
- fgWindow = api.getForegroundObject()
- if fgWindow.windowClassName == "TStudioForm":
- statusAPI(3, 105, self.announceTime, offset=1)
- else:
- ui.message(self.timeMessageErrors[1])
+ fgWindow = api.getForegroundObject()
+ if fgWindow.windowClassName == "TStudioForm":
+ statusAPI(3, 105, self.announceTime, offset=1)
else:
- # Translators: Presented when trying to use an add-on
command in an unsupported version of StationPlaylist Studio.
- ui.message(_("This version of Studio is no longer
supported"))
+ ui.message(self.timeMessageErrors[1])
# Translators: Input help mode message for a command in Station
Playlist Studio.
script_sayRemainingTime.__doc__=_("Announces the remaining track time.")

def script_sayElapsedTime(self, gesture):
- if self.SPLCurVersion >= SPLMinVersion:
- fgWindow = api.getForegroundObject()
- if fgWindow.windowClassName == "TStudioForm":
- statusAPI(0, 105, self.announceTime, offset=1)
- else:
- ui.message(self.timeMessageErrors[2])
+ fgWindow = api.getForegroundObject()
+ if fgWindow.windowClassName == "TStudioForm":
+ statusAPI(0, 105, self.announceTime, offset=1)
else:
- ui.message(_("This version of Studio is no longer
supported"))
+ ui.message(self.timeMessageErrors[2])
# Translators: Input help mode message for a command in Station
Playlist Studio.
script_sayElapsedTime.__doc__=_("Announces the elapsed time for the
currently playing track.")

def script_sayBroadcasterTime(self, gesture):
# Says things such as "25 minutes to 2" and "5 past 11".
- if self.SPLCurVersion >= SPLMinVersion:
- fgWindow = api.getForegroundObject()
- if fgWindow.windowClassName == "TStudioForm":
- # Parse the local time and say it similar to
how Studio presents broadcaster time.
- h, m = time.localtime()[3], time.localtime()[4]
- if h not in (0, 12):
- h %= 12
- if m == 0:
- if h == 0: h+=12
- # Messages in this method should not be
translated.
- broadcasterTime = "{hour}
o'clock".format(hour = h)
- elif 1 <= m <= 30:
- if h == 0: h+=12
- broadcasterTime = "{minute} min past
{hour}".format(minute = m, hour = h)
- else:
- if h == 12: h = 1
- m = 60-m
- broadcasterTime = "{minute} min to
{hour}".format(minute = m, hour = h+1)
- ui.message(broadcasterTime)
+ fgWindow = api.getForegroundObject()
+ if fgWindow.windowClassName == "TStudioForm":
+ # Parse the local time and say it similar to how Studio
presents broadcaster time.
+ h, m = time.localtime()[3], time.localtime()[4]
+ if h not in (0, 12):
+ h %= 12
+ if m == 0:
+ if h == 0: h+=12
+ # Messages in this method should not be
translated.
+ broadcasterTime = "{hour} o'clock".format(hour
= h)
+ elif 1 <= m <= 30:
+ if h == 0: h+=12
+ broadcasterTime = "{minute} min past
{hour}".format(minute = m, hour = h)
else:
- ui.message(self.timeMessageErrors[3])
+ if h == 12: h = 1
+ m = 60-m
+ broadcasterTime = "{minute} min to
{hour}".format(minute = m, hour = h+1)
+ ui.message(broadcasterTime)
else:
- ui.message(_("This version of Studio is no longer
supported"))
+ ui.message(self.timeMessageErrors[3])
# Translators: Input help mode message for a command in Station
Playlist Studio.
script_sayBroadcasterTime.__doc__=_("Announces broadcaster time.")

def script_sayCompleteTime(self, gesture):
# Says complete time in hours, minutes and seconds via
kernel32's routines.
- if self.SPLCurVersion >= SPLMinVersion :
- if api.getForegroundObject().windowClassName ==
"TStudioForm":
-
ui.message(winKernel.GetTimeFormat(winKernel.LOCALE_USER_DEFAULT, 0, None,
None))
- else:
- ui.message(self.timeMessageErrors[4])
+ if api.getForegroundObject().windowClassName == "TStudioForm":
+
ui.message(winKernel.GetTimeFormat(winKernel.LOCALE_USER_DEFAULT, 0, None,
None))
else:
- ui.message(_("This version of Studio is no longer
supported"))
+ ui.message(self.timeMessageErrors[4])
# Translators: Input help mode message for a command in Station
Playlist Studio.
script_sayCompleteTime.__doc__=_("Announces time including seconds.")

@@ -1210,8 +1197,10 @@ class AppModule(appModuleHandler.AppModule):

__gestures={
"kb:control+alt+t":"sayRemainingTime",
+ "ts(SPL):2finger_flickDown":"sayRemainingTime",
"kb:alt+shift+t":"sayElapsedTime",
"kb:shift+nvda+f12":"sayBroadcasterTime",
+ "ts(SPL):2finger_flickUp":"sayBroadcasterTime",
"kb:control+nvda+1":"toggleBeepAnnounce",
"kb:control+nvda+2":"setEndOfTrackTime",
"ts(SPL):2finger_flickRight":"setEndOfTrackTime",

diff --git a/readme.md b/readme.md
index 6f771cf..577701c 100755
--- a/readme.md
+++ b/readme.md
@@ -13,11 +13,11 @@ IMPORTANT: Add-on 4.0 requires SPL version 5.00 or later.
Users using Studio 4.3
## Shortcut keys

* Alt+Shift+T from Studio window: announce elapsed time for the currently
playing trakc.
-* Control+Alt+T from Studio window: announce remaining time for the currently
playing trakc.
-* NVDA+Shift+F12 from Studio window: announces broadcaster time such as 5
minutes to top of the hour.
+* Control+Alt+T (two finger flick down in SPL touch mode) from Studio window:
announce remaining time for the currently playing trakc.
+* NVDA+Shift+F12 (two finger flick up in SPL touch mode) from Studio window:
announces broadcaster time such as 5 minutes to top of the hour.
* Control+NVDA+1 from Studio window: toggles announcement of status messages
(such as automation and end of library scan) between words and beeps.
-* Control+NVDA+2 from Studio window: Opens end of track setting dialog.
-* Alt+NVDA+2 from Studio window: Opens song intro alarm setting dialog.
+* Control+NVDA+2 (two finger flick right in SPL mode) from Studio window:
Opens end of track setting dialog.
+* Alt+NVDA+2 (two finger flick left in SPL mode) from Studio window: Opens
song intro alarm setting dialog.
* Control+NVDA+3 from Studio window: Toggles cart explorer to learn cart
assignments.
* Control+NVDA+4 from Studio window: Opens microphone alarm dialog.
* Control+NVDA+f from Studio window: Opens a dialog to find a track based on
artist or song name. Press NvDA+F3 to find forward or NVDA+Shift+F3 to find
backward.
@@ -25,8 +25,6 @@ IMPORTANT: Add-on 4.0 requires SPL version 5.00 or later.
Users using Studio 4.3
* Control+Shift+X from Studio window: Steps through braille timer settings.
* Control+NVDA+0 from Studio window: Opens the Studio add-on configuration
dialog.

-Note: If you are using touchscreens, switch to SPL mode and use two finger
flick right and left for end of track and song intro alarm dialogs,
respectively.
-
## Unassigned commands

The following commands are not assigned by default; if you wish to assign it,
use Input Gestures dialog to add custom commands.
@@ -136,7 +134,7 @@ If you are using Studio on a touchscreen computer running
Windows 8 or later and
* A dedicated settings dialog for SPL add-on has been added, accessible from
NVDA's preferences menu or by pressing Control+NVDA+0 from SPL window.
* Added ability to reset all settings to defaults via configuration dialog.
* If some of the settings have errors, only the affected settings will be
reset to factory defaults.
-* Added a dedicated SPL touchscreen mode and touch commands to open alarm
dialogs.
+* Added a dedicated SPL touchscreen mode and touch commands to perform various
Studio commands.
* Renamed "toggle announcement" to "status announcement" as beeps are used for
announcing other status information such as completion of library scans.
* Status announcement setting is now retained across sessions. Previously you
had to configure this setting manually when Studio starts.
* You can now use Track Dial feature to review columns in a track entry in
Studio's main playlist viewer (to toggle this feature, press the command you
assigned for this feature).

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: