Please try to make them unassigned so we as users can define what works for us best.
Thanks! Roger On 3/27/2014 4:02 PM, Joseph Lee wrote:
Hi,Ah, yes - I see it in the Spanish gestures file. Because both gesture variants are involved, I'll try to either not assign them or find alternate gestures.Cheers, Joseph ----- Original Message ----- From: Noelia <nrm1977@xxxxxxxxx To: nvda-addons@xxxxxxxxxxxxx Date sent: Thu, 27 Mar 2014 21:56:27 +0100 Subject: [nvda-addons] Re: commit/StationPlaylist: 2 new changesets Hi, tanks for your explanation about memoization. My English is not quite good and I didn't know that word. NVDA+Grave is assigned to left mouse click in Spanish. Thanks. 2014-03-27 21:18 GMT+01:00, Joseph Lee <joseph.lee22590@xxxxxxxxx>: Hi,Memoization is the right spelling (it's a fancy term for specialized tablelookup). NVDA+Grave accent: In addition to Control+NVDA+Grave command conflict, which function is assigned to this one in Spanish? Other gestures such as Control+Alt+T: most of them came from scripts for JFWand Window-Eyes. I'll write a note in the readme to reassign gestures viaInput Gestures dialog if there are command conflicts. os.path.join(): I'll look into this, as it might be simpler than the current os.path mess I have. Thanks. Cheers, Joseph -----Original Message----- From: nvda-addons-bounce@xxxxxxxxxxxxx [mailto:nvda-addons-bounce@xxxxxxxxxxxxx] On Behalf Of Noelia Sent: Thursday, March 27, 2014 2:05 AM To: nvda-addons@xxxxxxxxxxxxx Subject: [nvda-addons] Re: commit/StationPlaylist: 2 new changesets Hi, about gestures: NVDA+grave can't be used in Spanish. I believe The plugin contains a spelling mistake: erorr instead error, in a comment. I can't give too much feedback because I don't use this software. The appModule contains memoization instead memorization, I think. Hopely the layer commands can be managed from NVDA's core, as docHandler, becausethey could be enhanced. In the app module it's used control+alt+t, but it could be a shortcut defined by users. About cosmetic, maybe you can use os.path.join to find wave files, or perhaps it's not important. Just a suggestion. I don't know if it would be possible to import functions as final to theglobal plugin into the app module. I'm not a Python guru and don't have thesoftware to test. Thanks. 2014-03-26 19:17 GMT+01:00, Joseph Lee <joseph.lee22590@xxxxxxxxx>: Hi, mostly our Python gurus here: Could you take a look at the reorganized splstudio.py in master branch to see if it needs further reorganization? Thanks. Cheers, Joseph -----Original Message----- From: nvda-addons-commits-bounce@xxxxxxxxxxxxx [mailto:nvda-addons-commits-bounce@xxxxxxxxxxxxx] On Behalf Of commits-noreply@xxxxxxxxxxxxx Sent: Wednesday, March 26, 2014 11:16 AM To: nvda-addons-commits@xxxxxxxxxxxxx Subject: commit/StationPlaylist: 2 new changesets 2 new commits in StationPlaylist: https://bitbucket.org/nvdaaddonteam/stationplaylist/commits/b8a6a de54882/ Changeset: b8a6ade54882 Branch: None User: josephsl Date: 2014-03-26 18:30:41 Summary: Code cleanup - import order changes, small code changes in app module. Affected #: 2 files diff --git a/addon/appModules/splstudio.py b/addon/appModules/splstudio.py index e699768..48cffde 100644 --- a/addon/appModules/splstudio.py +++ b/addon/appModules/splstudio.py @@ -11,6 +11,8 @@ # Because of different interfaces between 4.x and 5.x, we need to come up with a way to handle both. # Minimum version: SPL 4.33, NvDA 2013.3. +from ctypes import windll +from functools import wraps import controlTypes import appModuleHandler import api @@ -18,11 +20,9 @@ import ui import gui import wx import winUser -from ctypes import windll from NVDAObjects.IAccessible import IAccessible import textInfos import tones -from functools import wraps import addonHandler addonHandler.initTranslation() @@ -98,7 +98,7 @@ class AppModule(appModuleHandler.AppModule): # User wishes to hear beeps instead of words. The beeps are power on and off sounds from PAC Mate Omni. import nvwave, os.path # The wave playback and path manipulator. beep = obj.name.split(" ") - stat = beep[len(beep)-1] + stat = beep[-1] wavDir, wavFile = os.path.dirname(__file__), "" # Play a wave file based on on/off status. if stat == "Off": wavFile = wavDir + "\SPL_off.wav" diff --git a/addon/globalPlugins/SPLStudioUtils.py b/addon/globalPlugins/SPLStudioUtils.py index 4df66bc..b1e544a 100644 --- a/addon/globalPlugins/SPLStudioUtils.py +++ b/addon/globalPlugins/SPLStudioUtils.py @@ -3,12 +3,12 @@ # Copyright 2013, released under GPL. # Adds a few utility features such as switching focus to the SPL Studio window and some global scripts. -import winUser from ctypes import windll +from functools import wraps import globalPluginHandler import api import ui -from functools import wraps +import winUser import tones import addonHandler addonHandler.initTranslation() @@ -74,10 +74,8 @@ class GlobalPlugin(globalPluginHandler.GlobalPlugin): # Try to see if SPL foreground object can be fetched. This is used for switching to SPL Studio window from anywhere. def fetchSPLForegroundWindow(self): - # Let us see if SPL foreground can be fetched. # First test: is splstudio running? Tell me the handle, please. if user32.FindWindowA("SPLStudio", None) == 0: return None # Used ANSI version, as Wide char version always returns 0. - # Continue with the method. # Turns out NVDA core does have a method to fetch desktop objects, so use this to find SPL window from among its children. dt = api.getDesktopObject() for fg in dt.children: https://bitbucket.org/nvdaaddonteam/stationplaylist/commits/8c164 a823711/ Changeset: 8c164a823711 Branch: master User: josephsl Date: 2014-03-26 19:07:31 Summary: App module: major code reorganization. Affected #: 1 file diff --git a/addon/appModules/splstudio.py b/addon/appModules/splstudio.py index 48cffde..474ce2c 100644 --- a/addon/appModules/splstudio.py +++ b/addon/appModules/splstudio.py @@ -112,48 +112,19 @@ class AppModule(appModuleHandler.AppModule): # Clean this mess with a more elegant solution. nextHandler() -# JL's additions + # JL's additions - # List of children constants for fetching various status information from SPL window. - # These are scattered throughout the screen, so one can use foreground.children[index] to fetch them. - # These are consulted not only in layer commands, but also for other status commands below. - SPLElapsedTime = 3 # Elapsed time of the current track. - SPL4ElapsedTime = -4 # Elapsed time for SPL 4.x. - SPLPlayStatus = 5 # Play status, mic, etc. - SPL4PlayStatus = 0 # Play status for Studio 4.x. - SPLSystemStatus = -3 # The second status bar containing system status such as up time. - SPL4SystemStatus = -2 # System status bar for 4.x. - SPLHourTrackDuration = 17 # For track duration for the given hour marker. - SPL4HourTrackDuration = 13 # Same as above for SPL 4. - SPLHourSelectedDuration = 18 # In case the user selects one or more tracks in a given hour. - SPL4HourSelectedDuration = 14 # Same as above for SPL 4. - # Todo for 2.0: Add constants for trakc title and upcoming track. They will be assigned to the assistant layer below with commands borrowed from Winamp. - - # Various status scripts. - # To save keyboard commands, layered commands will be used. - # Most were borrowed from JFW and Window-Eyes layer scripts. - - # Set up the layer script environment. - def getScript(self, gesture): - if not self.SPLAssistant: return appModuleHandler.AppModule.getScript(self, gesture) - script = appModuleHandler.AppModule.getScript(self, gesture) - if not script: script = finally_(self.script_error, self.finish) - return finally_(script, self.finish) - - def finish(self): - self.SPLAssistant = False - self.clearGestureBindings() - self.bindGestures(self.__gestures) - - def script_error(self, gesture): - tones.beep(120, 100) - - # Let us meet the scripts themselves. - - # Global scripts which doesn't require layer command entry. + # Script sections (for ease of maintenance): + # Time-related: elapsed time, end of track alarm, etc. + # Misc scripts: track finder and others. + # SPL Assistant layer: status commands. # A few time related scripts (elapsed time, remaining time, etc.). + # Time status constants: + SPLElapsedTime = 3 # Elapsed time of the current track. + SPL4ElapsedTime = -4 # Elapsed time for SPL 4.x. + def script_sayRemainingTime(self, gesture): fgWindow, remainingTime = api.getForegroundObject(), "" # For Studio 5.x: While Studio is on focus, the playback window with remaining time info is right next door. Parse the window title. @@ -203,6 +174,8 @@ class AppModule(appModuleHandler.AppModule): # Translators: Input help mode message for a command in Station Playlist Studio. script_setEndOfTrackTime.__doc__=_("sets end of track alarm (default is 5 seconds).") + # Other commands (track finder and others) + # Toggle whether beeps should be heard instead of toggle announcements. def script_toggleBeepAnnounce(self, gesture): @@ -277,8 +250,26 @@ class AppModule(appModuleHandler.AppModule): else: self.trackFinder(self.findText, api.getFocusObject().previous, directionForward=False) script_findTrackPrevious.__doc__="Finds previous occurrence of the track with the name in the track list." - # The layer commands themselves. - # First layer (SPL Assistant): basic status such as playback, automation, etc. + # SPL Assistant: reports status on playback, operation, etc. + # Used layer command approach to save gesture assignments. + # Most were borrowed from JFW and Window-Eyes layer scripts. + + # Set up the layer script environment. + def getScript(self, gesture): + if not self.SPLAssistant: return appModuleHandler.AppModule.getScript(self, gesture) + script = appModuleHandler.AppModule.getScript(self, gesture) + if not script: script = finally_(self.script_error, self.finish) + return finally_(script, self.finish) + + def finish(self): + self.SPLAssistant = False + self.clearGestureBindings() + self.bindGestures(self.__gestures) + + def script_error(self, gesture): + tones.beep(120, 100) + + # SPL Assistant flag. SPLAssistant = False # The SPL Assistant layer driver. @@ -298,8 +289,19 @@ class AppModule(appModuleHandler.AppModule): childObj = api.getForegroundObject().children[childIndex] return childObj - # Basic status such as playback and mic. - # For all these methods, assign the correct child ID based on SPL Studio version. + # List of children constants used in SPL Assistant + # These are scattered throughout the screen, so one can use foreground.children[index] to fetch them. + SPLPlayStatus = 5 # Play status, mic, etc. + SPL4PlayStatus = 0 # Play status for Studio 4.x. + SPLSystemStatus = -3 # The second status bar containing system status such as up time. + SPL4SystemStatus = -2 # System status bar for 4.x. + SPLHourTrackDuration = 17 # For track duration for the given hour marker. + SPL4HourTrackDuration = 13 # Same as above for SPL 4. + SPLHourSelectedDuration = 18 # In case the user selects one or more tracks in a given hour. + SPL4HourSelectedDuration = 14 # Same as above for SPL 4. + # Todo for 2.0: Add constants for trakc title and upcoming track. They will be assigned to the assistant layer below with commands borrowed from Winamp. + + # The layer commands themselves. def script_sayPlayStatus(self, gesture): obj = self.getStatusChild(self.SPLPlayStatus).children[0] if self.SPLCurVersion >= SPLMinVersion else self.getStatusChild(self.SPL4PlayStatus).children[0] 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. ---------------------------------------------------------------- NVDA add-ons Central: A list for discussing NVDA add-ons To post a message, send an email to nvda-addons@xxxxxxxxxxxxx. To unsubscribe, send an email with the subject line of "unsubscribe" (without quotes) to nvda-addons-request@xxxxxxxxxxxxx. If you have questions for list moderators, please send a message to nvda-addons-moderators@xxxxxxxxxxxxx. Community addons can be found here: http://addons.nvda-project.org ---------------------------------------------------------------- NVDA add-ons Central: A list for discussing NVDA add-ons To post a message, send an email to nvda-addons@xxxxxxxxxxxxx. To unsubscribe, send an email with the subject line of "unsubscribe" (without quotes) to nvda-addons-request@xxxxxxxxxxxxx. If you have questions for list moderators, please send a message to nvda-addons-moderators@xxxxxxxxxxxxx. Community addons can be found here: http://addons.nvda-project.org ---------------------------------------------------------------- NVDA add-ons Central: A list for discussing NVDA add-ons To post a message, send an email to nvda-addons@xxxxxxxxxxxxx. To unsubscribe, send an email with the subject line of "unsubscribe" (without quotes) to nvda-addons-request@xxxxxxxxxxxxx. If you have questions for list moderators, please send a message to nvda-addons-moderators@xxxxxxxxxxxxx. Community addons can be found here: http://addons.nvda-project.org ---------------------------------------------------------------- NVDA add-ons Central: A list for discussing NVDA add-ons To post a message, send an email to nvda-addons@xxxxxxxxxxxxx.To unsubscribe, send an email with the subject line of "unsubscribe" (without quotes) to nvda-addons-request@xxxxxxxxxxxxx.If you have questions for list moderators, please send a message to nvda-addons-moderators@xxxxxxxxxxxxx.Community addons can be found here: http://addons.nvda-project.org ---------------------------------------------------------------- NVDA add-ons Central: A list for discussing NVDA add-ons To post a message, send an email to nvda-addons@xxxxxxxxxxxxx.To unsubscribe, send an email with the subject line of "unsubscribe" (without quotes) to nvda-addons-request@xxxxxxxxxxxxx.If you have questions for list moderators, please send a message to nvda-addons-moderators@xxxxxxxxxxxxx.Community addons can be found here: http://addons.nvda-project.org
---------------------------------------------------------------- NVDA add-ons Central: A list for discussing NVDA add-ons To post a message, send an email to nvda-addons@xxxxxxxxxxxxx. To unsubscribe, send an email with the subject line of "unsubscribe" (without quotes) to nvda-addons-request@xxxxxxxxxxxxx. If you have questions for list moderators, please send a message to nvda-addons-moderators@xxxxxxxxxxxxx. Community addons can be found here: http://addons.nvda-project.org