1 new commit in StationPlaylist: https://bitbucket.org/nvdaaddonteam/stationplaylist/commits/023e1509efaf/ Changeset: 023e1509efaf Branch: master User: josephsl Date: 2015-03-29 18:13:45+00:00 Summary: Added a command (unassigned) to announce temperature information without invoking assistant layer. Affected #: 2 files diff --git a/addon/appModules/splstudio/__init__.py b/addon/appModules/splstudio/__init__.py index abe0bf8..7e337c5 100755 --- a/addon/appModules/splstudio/__init__.py +++ b/addon/appModules/splstudio/__init__.py @@ -413,16 +413,18 @@ class AppModule(appModuleHandler.AppModule): # This may change if NVDA core decides to abandon touch mode concept. def event_appModule_gainFocus(self): - if "SPL" not in touchHandler.availableTouchModes: - touchHandler.availableTouchModes.append("SPL") + if touchHandler.handler: + if "SPL" not in touchHandler.availableTouchModes: + touchHandler.availableTouchModes.append("SPL") def event_appModule_loseFocus(self): - # Switch to object mode. - touchHandler.handler._curTouchMode = touchHandler.availableTouchModes[1] - if "SPL" in touchHandler.availableTouchModes: - # If we have too many touch modes, pop all except the original entries. - for mode in touchHandler.availableTouchModes: - if mode == "SPL": touchHandler.availableTouchModes.pop() + if touchHandler.handler: + # Switch to object mode. + touchHandler.handler._curTouchMode = touchHandler.availableTouchModes[1] + if "SPL" in touchHandler.availableTouchModes: + # If we have too many touch modes, pop all except the original entries. + for mode in touchHandler.availableTouchModes: + if mode == "SPL": touchHandler.availableTouchModes.pop() # Save configuration when terminating. @@ -1141,9 +1143,12 @@ class AppModule(appModuleHandler.AppModule): def script_sayTemperature(self, gesture): obj = self.status(self.SPLTemperature).firstChild + # Just in case this was executed before invoking assistant layer: + if obj.parent.role == controlTypes.ROLE_STATUSBAR: + obj = obj.parent.simpleNext # Translators: Presented when there is nn weather or temperature information. ui.message(_("Weather and temperature not configured")) if obj.name is None else ui.message(obj.name) - script_sayTemperature.__doc__="Announces temperature and weather information" + script_sayTemperature.__doc__=_("Announces temperature and weather information") def script_sayUpTime(self, gesture): obj = self.status(self.SPLSystemStatus).firstChild diff --git a/readme.md b/readme.md index 6435b6d..6f771cf 100755 --- a/readme.md +++ b/readme.md @@ -36,6 +36,7 @@ The following commands are not assigned by default; if you wish to assign it, us * SPL Assistant layer from SPL Studio. * Announce time including seconds from SPL Studio. * Toggling track dial on or off (works properly while a track is focused; to assign a command to this, select a track, then open NVDA's input gestures dialog.). +* Announcing temperature. Note: Input Gestures dialog is available in 2013.3 or later. @@ -139,6 +140,7 @@ If you are using Studio on a touchscreen computer running Windows 8 or later and * 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). +* You can now assign a custom command to hear temperature information. * Added a checkbox in end of track and song intro alarm dialogs to enable or disable these alarms (check to enable). These can also be "configured" from add-on settings. * Fixed an issue where pressing alarm dialog command while another alarm dialog is opened would cause another instance of the alarm dialog to appear. NVDA will pop up a message asking you to close the previously opened alarm dialog first. * Added ability to use SPL Controller layer command to invoke SPL Assistant (experimental; consult the add-on guide on how to enable this). 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.