commit/StationPlaylist: 2 new changesets

  • From: commits-noreply@xxxxxxxxxxxxx
  • To: nvda-addons-commits@xxxxxxxxxxxxx
  • Date: Sat, 07 Nov 2015 00:42:51 -0000

2 new commits in StationPlaylist:

https://bitbucket.org/nvdaaddonteam/stationplaylist/commits/641e35784549/
Changeset: 641e35784549
Branch: None
User: josephsl
Date: 2015-11-06 23:17:57+00:00
Summary: Merge branch 'master' into rainbow/redConfigSections

# Conflicts:
# addon/appModules/splstudio/splconfig.py

Affected #: 4 files

diff --git a/addon/appModules/splstudio/__init__.py
b/addon/appModules/splstudio/__init__.py
index 3cb2966..7ab8b17 100755
--- a/addon/appModules/splstudio/__init__.py
+++ b/addon/appModules/splstudio/__init__.py
@@ -120,15 +120,23 @@ class SPLTrackItem(IAccessible):
if self.appModule._columnHeaders is None:
self.appModule._columnHeaders = self.parent.children[-1]
headers = [header.name for header in
self.appModule._columnHeaders.children]
- return headers.index(columnHeader)
+ # Handle both 5.0x and 5.10 column headers.
+ try:
+ return headers.index(columnHeader)
+ except ValueError:
+ return None

def reportFocus(self):
#tones.beep(800, 100)
if not splconfig.SPLConfig["UseScreenColumnOrder"]:
descriptionPieces = []
for header in splconfig.SPLConfig["ColumnOrder"]:
+ # Artist field should not be included in Studio
5.0x, as the checkbox serves this role.
+ if header == "Artist" and
self.appModule.productVersion.startswith("5.0"):
+ continue
if header in
splconfig.SPLConfig["IncludedColumns"]:
index = self._indexOf(header)
+ if index is None: continue # Header not
found, mostly encountered in Studio 5.0x.
content = self._getColumnContent(index)
if content:
descriptionPieces.append("%s:
%s"%(header, content))
@@ -594,10 +602,16 @@ class AppModule(appModuleHandler.AppModule):
return "00:00"
else:
tm = (t/1000) if not offset else (t/1000)+offset
- timeComponents = divmod(tm, 60)
- tm1 = str(timeComponents[0]).zfill(2)
- tm2 = str(timeComponents[1]).zfill(2)
- return ":".join([tm1, tm2])
+ mm, ss = divmod(tm, 60)
+ if mm > 59 and splconfig.SPLConfig["TimeHourAnnounce"]:
+ hh, mm = divmod(mm, 60)
+ tm1 = str(mm).zfill(2)
+ tm2 = str(ss).zfill(2)
+ return ":".join([str(hh), tm1, tm2])
+ else:
+ tm1 = str(mm).zfill(2)
+ tm2 = str(ss).zfill(2)
+ return ":".join([tm1, tm2])

# Scripts which rely on API.
def script_sayRemainingTime(self, gesture):

diff --git a/addon/appModules/splstudio/splconfig.py
b/addon/appModules/splstudio/splconfig.py
index 4228d46..cf2f837 100755
--- a/addon/appModules/splstudio/splconfig.py
+++ b/addon/appModules/splstudio/splconfig.py
@@ -38,8 +38,8 @@ TimeHourAnnounce = boolean(default=false)
MetadataReminder = option("off", "startup", "instant", default="off")
MetadataEnabled = bool_list(default=list(false,false,false,false,false))
UseScreenColumnOrder = boolean(default=true)
-ColumnOrder =
string_list(default=list("Artist","Title","Duration","Intro","Category","Filename"))
-IncludedColumns =
string_list(default=list("Artist","Title","Duration","Intro","Category","Filename"))
+ColumnOrder =
string_list(default=list("Artist","Title","Duration","Intro","Outro","Category","Year","Album","Genre","Mood","Energy","Tempo","BPM","Gender","Rating","Filename","Time
Scheduled"))
+IncludedColumns =
string_list(default=list("Artist","Title","Duration","Intro","Outro","Category","Year","Album","Genre","Mood","Energy","Tempo","BPM","Gender","Rating","Filename","Time
Scheduled"))
SayScheduledFor = boolean(default=true)
SayListenerCount = boolean(default=true)
SayPlayingCartName = boolean(default=true)
@@ -95,6 +95,8 @@ _SPLDefaults7.validate(_val, copy=True)
# The following settings can be changed in profiles:

_mutatableSettings=("SayEndOfTrack","EndOfTrackTime","SaySongRamp","SongRampTime","MicAlarm",
"MicAlarmInterval")
_mutatableSettings7=("IntroOutroAlarms", "MicrophoneAlarm")
+# Unlock in 6.1.
+#,"MetadataEnabled","UseScreenColumnOrder","ColumnOrder","IncludedColumns")

# Display an error dialog when configuration validation fails.
def runConfigErrorDialog(errorText, errorType):
@@ -213,6 +215,8 @@ def unlockConfig(path, profileName=None, prefill=False):
# Do this only for base profile.
if prefill: _extraInitSteps(SPLConfigCheckpoint,
profileName=profileName)
else: _applyBaseSettings(SPLConfigCheckpoint)
+ # Unlock in 6.1.
+ #if not prefill: _applyBaseSettings(SPLConfigCheckpoint)
SPLConfigCheckpoint.name = profileName
return SPLConfigCheckpoint

@@ -221,11 +225,11 @@ def _extraInitSteps(conf, profileName=None):
global _configLoadStatus
columnOrder = conf["ColumnOrder"]
# Catch suttle errors.
- fields = ["Artist","Title","Duration","Intro","Category","Filename"]
+ fields =
["Artist","Title","Duration","Intro","Outro","Category","Year","Album","Genre","Mood","Energy","Tempo","BPM","Gender","Rating","Filename","Time
Scheduled"]
invalidFields = 0
for field in fields:
if field not in columnOrder: invalidFields+=1
- if invalidFields or len(columnOrder) != 6:
+ if invalidFields or len(columnOrder) != 17:
if profileName in _configLoadStatus and
_configLoadStatus[profileName] == "partialReset":
_configLoadStatus[profileName] =
"partialAndColumnOrderReset"
else:
@@ -236,6 +240,14 @@ def _extraInitSteps(conf, profileName=None):
# Artist and Title must be present at all times (quite redundant, but
just in case).
conf["IncludedColumns"].add("Artist")
conf["IncludedColumns"].add("Title")
+ # Perform a similar check for metadata streaming.
+ # Unlock in 6.1.
+ """if len(conf["MetadataEnabled"]) != 5:
+ if profileName in _configLoadStatus and
_configLoadStatus[profileName] == "partialReset":
+ _configLoadStatus[profileName] =
"partialAndMetadataReset"
+ else:
+ _configLoadStatus[profileName] = "metadataReset"
+ conf["MetadataEnabled"] = [False, False, False, False, False]"""

# Apply base profile if loading user-defined broadcast profiles.
def _applyBaseSettings(conf):
@@ -267,6 +279,9 @@ def isConfigPoolSorted():

# Perform some extra work before writing the config file.
def _preSave(conf):
+ # 6.1: Transform column inclusion data structure now.
+ # Unlock in 6.1.
+ #conf["IncludedColumns"] = list(conf["IncludedColumns"])
# Perform global setting processing only for the normal profile.
if SPLConfigPool.index(conf) == 0:
conf["IncludedColumns"] = list(conf["IncludedColumns"])
@@ -283,6 +298,13 @@ def _preSave(conf):
del conf["MetadataURL"]
# For other profiles, remove global settings before writing to disk.
else:
+ # 6.1: Make sure column order and inclusion aren't same as
default values.
+ # Unlock in 6.1.
+ """includedColumns = set(_SPLDefaults["IncludedColumns"])
+ if conf["IncludedColumns"] == includedColumns:
+ del conf["IncludedColumns"]
+ if conf["ColumnOrder"] ==
["Artist","Title","Duration","Intro","Category","Filename"]:
+ del conf["ColumnOrder"]"""
for setting in conf.keys():
if setting not in _mutatableSettings7: del conf[setting]
else:
@@ -292,6 +314,7 @@ def _preSave(conf):
if setting in conf and not len(conf[setting]):
del conf[setting]

+
# Save configuration database.
def saveConfig():
# Save all config profiles.
@@ -577,6 +600,10 @@ class SPLConfigDialog(gui.SettingsDialog):
sizer.Add(self.libScanList)
settingsSizer.Add(sizer, border=10, flag=wx.BOTTOM)

+
self.hourAnnounceCheckbox=wx.CheckBox(self,wx.NewId(),label="Include &hours
when announcing track or playlist duration")
+
self.hourAnnounceCheckbox.SetValue(SPLConfig["TimeHourAnnounce"])
+ settingsSizer.Add(self.hourAnnounceCheckbox,
border=10,flag=wx.BOTTOM)
+
# Translators: the label for a setting in SPL add-on settings
to toggle track dial mode on and off.

self.trackDialCheckbox=wx.CheckBox(self,wx.NewId(),label=_("&Track Dial mode"))
self.trackDialCheckbox.SetValue(SPLConfig["TrackDial"])
@@ -664,6 +691,7 @@ class SPLConfigDialog(gui.SettingsDialog):
SPLConfig["MicAlarmInterval"] = self.micAlarmInterval.Value
SPLConfig["AlarmAnnounce"] =
self.alarmAnnounceValues[self.alarmAnnounceList.GetSelection()][0]
SPLConfig["LibraryScanAnnounce"] =
self.libScanValues[self.libScanList.GetSelection()][0]
+ SPLConfig["TimeHourAnnounce"] = self.hourAnnounceCheckbox.Value
SPLConfig["TrackDial"] = self.trackDialCheckbox.Value
SPLConfig["MetadataReminder"] =
self.metadataValues[self.metadataList.GetSelection()][0]
SPLConfig["MetadataEnabled"] = self.metadataStreams
@@ -718,6 +746,9 @@ class SPLConfigDialog(gui.SettingsDialog):
# Don't rely on SPLConfig here, as we don't want to interupt
the show.
selection = self.profiles.GetSelection()
selectedProfile = self.profiles.GetStringSelection()
+ # Play a tone to indicate active profile.
+ if self.activeProfile == selectedProfile:
+ tones.beep(512, 40)
if selection == 0:
self.renameButton.Disable()
self.deleteButton.Disable()
@@ -739,6 +770,12 @@ class SPLConfigDialog(gui.SettingsDialog):
self.onIntroCheck(None)
self.micAlarm.SetValue(long(curProfile["MicAlarm"]))

self.micAlarmInterval.SetValue(long(curProfile["MicAlarmInterval"]))
+ # 6.1: Take care of profile-specific column and metadata
settings.
+ # Unlock in 6.1.
+ """self.metadataStreams = curProfile["MetadataEnabled"]
+
self.columnOrderCheckbox.SetValue(curProfile["UseScreenColumnOrder"])
+ self.columnOrder = curProfile["ColumnOrder"]
+ self.includedColumns = curProfile["IncludedColumns"]"""

# Profile controls.
# Rename and delete events come from GUI/config profiles dialog from
NVDA core.
@@ -1021,6 +1058,11 @@ class MetadataStreamingDialog(wx.Dialog):
sizer.Add(checkedStream)
mainSizer.Add(sizer, border=10, flag=wx.BOTTOM)

+ if self.func is not None:
+
self.applyCheckbox=wx.CheckBox(self,wx.NewId(),label="&Apply streaming changes
to the selected profile")
+ self.applyCheckbox.SetValue(SPLConfig["BeepAnnounce"])
+ mainSizer.Add(self.applyCheckbox, border=10,flag=wx.TOP)
+
mainSizer.Add(self.CreateButtonSizer(wx.OK | wx.CANCEL))
self.Bind(wx.EVT_BUTTON, self.onOk, id=wx.ID_OK)
self.Bind(wx.EVT_BUTTON, self.onCancel, id=wx.ID_CANCEL)
@@ -1032,14 +1074,19 @@ class MetadataStreamingDialog(wx.Dialog):
def onOk(self, evt):
global _metadataDialogOpened
if self.func is None: parent = self.Parent
+ metadataEnabled = []
for url in xrange(5):
if self.func is None: parent.metadataStreams[url] =
self.checkedStreams[url].Value
else:
dataLo = 0x00010000 if
self.checkedStreams[url].Value else 0xffff0000
self.func(dataLo | url, 36)
+ if self.applyCheckbox.Value:
metadataEnabled.append(self.checkedStreams[url].Value)
if self.func is None:
parent.profiles.SetFocus()
parent.Enable()
+ else:
+ # 6.1: Store just toggled settings to profile if told
to do so.
+ if len(metadataEnabled): SPLConfig["MetadataEnabled"] =
metadataEnabled
self.Destroy()
_metadataDialogOpened = False
return

diff --git a/addon/locale/fr/LC_MESSAGES/nvda.po
b/addon/locale/fr/LC_MESSAGES/nvda.po
index c9a7dc1..e449c43 100755
--- a/addon/locale/fr/LC_MESSAGES/nvda.po
+++ b/addon/locale/fr/LC_MESSAGES/nvda.po
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: StationPlaylist 4.1\n"
"Report-Msgid-Bugs-To: nvda-translations@xxxxxxxxxxxxx\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2015-08-15 09:53+0100\n"
+"PO-Revision-Date: 2015-10-29 13:02+0100\n"
"Last-Translator: Bachir BENANOU <ben_bach@xxxxxxxx>\n"
"Language-Team: Rémy Ruiz <remyruiz@xxxxxxxxx>\n"
"Language: fr\n"
@@ -196,11 +196,11 @@ msgstr "Impossible d'obtenir le temps en heures, minutes
et secondes"

#. Translators: Input help mode message for a command in Station Playlist
Studio.
msgid "Announces the remaining track time."
-msgstr "Annonce le temps restant pour la piste."
+msgstr "Annonce le temps restant de la piste."

#. Translators: Input help mode message for a command in Station Playlist
Studio.
msgid "Announces the elapsed time for the currently playing track."
-msgstr "Annonce le temps écoulé pour la piste en cours de lecture."
+msgstr "Annonce le temps écoulé de la piste en cours de lecture."

#. Translators: Input help mode message for a command in Station Playlist
Studio.
msgid "Announces broadcaster time."
@@ -242,7 +242,7 @@ msgstr "&Notifier lorsque la fin de piste est proche"
#. Translators: Input help mode message for a command in Station Playlist
Studio.
msgid "sets end of track alarm (default is 5 seconds)."
msgstr ""
-"Définir l'alarme de fin de piste (la valeur par défaut est 5 secondes)."
+"Définit l'alarme de fin de piste (la valeur par défaut est 5 secondes)."

#. Translators: The title of song intro alarm dialog.
msgid "Song intro alarm"
@@ -262,7 +262,7 @@ msgstr "&Notifier lorsque la fin de l'introduction est
proche"

#. Translators: Input help mode message for a command in Station Playlist
Studio.
msgid "sets song intro alarm (default is 5 seconds)."
-msgstr "définir allarme chanson intro (la valeur par défaut est 5 secondes)."
+msgstr "définit l'allarme chanson intro (la valeur par défaut est 5 secondes)."

#. Translators: A dialog message to set microphone active alarm (curAlarmSec
is the current mic monitoring alarm in seconds).
#, python-brace-format
@@ -278,7 +278,7 @@ msgid ""
"Enter microphone alarm time in seconds (currently disabled, 0 disables the "
"alarm)"
msgstr ""
-"Entrez l'heur de l'alarme microphone en secondes actuellement désactivé, 0 "
+"Entrez l'heure de l'alarme microphone en secondes (actuellement désactivé, 0 "
"désactive l'alarme)"

#. Translators: The title of mic alarm dialog.
@@ -291,12 +291,12 @@ msgstr "Valeur saisie incorrecte."

#. Translators: Input help mode message for a command in Station Playlist
Studio.
msgid "Sets microphone alarm (default is 5 seconds)."
-msgstr "Définir alarme microphone (la valeur par défaut est 5 secondes)."
+msgstr "Définit alarme microphone (la valeur par défaut est 5 secondes)."

#. Translators: Input help mode message for a command in Station Playlist
Studio.
msgid "Opens SPL Studio add-on configuration dialog."
msgstr ""
-"Ouvre la boîte de dialogue configuration du module complémentaire Studio SPL."
+"Ouvre le dialogue de configuration du module complémentaire Studio SPL."

#. Translators: Reported when status announcement is set to beeps in SPL
Studio.
msgid "Status announcement beeps"
@@ -308,7 +308,7 @@ msgstr "Annonce le statut en mots"

#. Translators: Input help mode message for a command in Station Playlist
Studio.
msgid "Toggles status announcements between words and beeps."
-msgstr "Basculer l'annonce de statut entre mots et bips."
+msgstr "Bascule l'annonce de statut entre mots et bips."

#. Translators: A setting in braille timer options.
msgid "Braille track endings"
@@ -351,7 +351,7 @@ msgstr ""

#. Translators: Standard dialog message when find dialog is already open.
msgid "Find track dialog is already open."
-msgstr "Le dialogue Trouver une piste est déjà ouvert."
+msgstr "Le dialogue Rechercher une piste est déjà ouvert."

#. Translators: The text of the dialog for finding tracks.
msgid "Enter the name of the track you wish to search."
@@ -359,11 +359,11 @@ msgstr "Entrez le nom de la piste que vous souhaitez
rechercher."

#. Translators: The title of the find tracks dialog.
msgid "Find track"
-msgstr "Trouver une piste"
+msgstr "Rechercher une piste"

#. Translators: Input help mode message for a command in Station Playlist
Studio.
msgid "Finds a track in the track list."
-msgstr "Trouve une piste dans la liste des pistes."
+msgstr "Cherche une piste dans la liste des pistes."

#. Translators: Input help mode message for a command in Station Playlist
Studio.
msgid "Finds the next occurrence of the track with the name in the track list."
@@ -412,21 +412,21 @@ msgstr "Chariot non assignés"

#. Translators: A setting in library scan announcement options.
msgid "Announce start and end of a library scan"
-msgstr "Annoncer le début et la fin d'un balayage dans la bibliothèque"
+msgstr "Annoncer le début et la fin de balayage d'une bibliothèque"

#. Translators: A setting in library scan announcement options.
msgid "Announce the progress of a library scan"
-msgstr "Annoncer l'avancement d'un balayage dans la bibliothèque"
+msgstr "Annoncer l'avancement du balayage d'une bibliothèque"

#. Translators: A setting in library scan announcement options.
msgid "Announce progress and item count of a library scan"
msgstr ""
-"Annoncer l'avancement et le nombre d'éléments d'un balayage dans la "
+"Annoncer l'avancement et le nombre des éléments lors du balayage d'une "
"bibliothèque"

#. Translators: A setting in library scan announcement options.
msgid "Do not announce library scans"
-msgstr "Ne pas annoncer les balayages dans la bibliothèque"
+msgstr "Ne pas annoncer les balayages d'une bibliothèque"

#. Translators: Input help mode message for a command in Station Playlist
Studio.
msgid "Toggles library scan progress settings."
@@ -470,8 +470,7 @@ msgstr "Modification playlist non disponible"

#. Translators: Presented when there is no information for the next track.
msgid "No next track scheduled or no track is playing"
-msgstr ""
-"Aucune piste suivante planifié ou aucune piste n'est en cours de lecture"
+msgstr "Aucune piste planifiée ou aucune piste n'est en cours de lecture"

#. Translators: Presented when next track information is unavailable.
msgid "Cannot find next track information"
@@ -479,7 +478,7 @@ msgstr "Impossible de trouver les informations de la piste
suivante"

#. Translators: Input help mode message for a command in Station Playlist
Studio.
msgid "Announces title of the next track if any"
-msgstr "Annonce le titre de la piste suivante dans le cas échéant"
+msgstr "Annonce le titre de la piste suivante s'il y a lieu"

#. Translators: Presented when there is no weather or temperature information.
msgid "Weather and temperature not configured"
@@ -499,7 +498,7 @@ msgstr "Nombre d'auditeurs introuvable"

#. Translators: Presented when there is no information on song pitch (for
Studio 4.33 and earlier).
msgid "Song pitch not available"
-msgstr "Hauteur de la chanson non disponible"
+msgstr "Tonalité de la chanson non disponible"

#. Translators: Presented when attempting to start library scan.
msgid "Monitoring library scan"
@@ -599,7 +598,7 @@ msgstr "nombre de balayage"

#. Translators: the label for a setting in SPL add-on settings to toggle track
dial mode on and off.
msgid "&Track Dial mode"
-msgstr "Mode Cadran de &piste"
+msgstr "Mode Cadran de &piste"

#. Translators: the label for a setting in SPL add-on settings to announce
scheduled time.
msgid "Announce &scheduled time for the selected track"
@@ -611,7 +610,7 @@ msgstr "Annoncer le &nombre d'auditeurs"

#. Translators: the label for a setting in SPL add-on settings to announce
currently playing cart.
msgid "&Announce name of the currently playing cart"
-msgstr "&Annoncer du nom du chariot en cours de lecture"
+msgstr "&Annonce du nom du chariot en cours de lecture"

#. Translators: The label for a button in SPL add-on configuration dialog to
reset settings to defaults.
msgid "Reset settings"
@@ -693,7 +692,7 @@ msgid ""
"You are already in SPL Studio window. For status commands, use SPL Assistant "
"commands."
msgstr ""
-"Vous êtes déjà dans la fenêtre SPL Studio. Pour le statut des commandes, "
+"Vous êtes déjà dans la fenêtre SPL Studio. Pour les commandes de statut, "
"utilisez les commandes de l'Assistant SPL."

#. Translators: The name of a layer command set for Station Playlist Studio.
@@ -711,7 +710,7 @@ msgstr ""
msgid "There is no track playing. Try pausing while a track is playing."
msgstr ""
"Il n'y a aucune piste en cours de lecture. Essayez une pause lorsqu'une "
-"piste est en cours de lecture."
+"piste est jouée."

#. Translators: Presented when no track is playing in Station Playlist Studio.
msgid "There is no track playing."
@@ -749,7 +748,7 @@ msgid ""
"server."
msgstr ""
"Détermine si NVDA bascule vers Studio lorsqu'il est connecté à un serveur de "
-"streaming."
+"flux."

#. Translators: Presented when toggling the setting to play selected song when
connected to a streaming server.
msgid "Play first track after connecting"
@@ -765,7 +764,7 @@ msgid ""
"streaming server."
msgstr ""
"Détermine si Studio lit la première piste lorsqu'il est connecté à un "
-"serveur de streaming."
+"serveur de flux."

#. Multiple encoders.
#. Translators: Presented when toggling the setting to monitor the selected
encoder.
@@ -785,7 +784,7 @@ msgstr "Contrôle d'Encodeur annulé"
#. Translators: Input help mode message in SAM Encoder window.
msgid ""
"Toggles whether NVDA will monitor the selected encoder in the background."
-msgstr "Détermine si NVDA contrôle l'encodeur sélectionné en arrière-plan."
+msgstr "Détermine si NVDA surveille l'encodeur sélectionné en arrière-plan."

#. Translators: The title of the stream labeler dialog (example: stream
labeler for 1).
#, python-brace-format
@@ -798,11 +797,11 @@ msgstr "Entrez l'étiquette pour ce flux"

#. Translators: Input help mode message in SAM Encoder window.
msgid "Opens a dialog to label the selected encoder."
-msgstr "Ouvre un dialogue pour l'étiquette de l'encodeur sélectionné."
+msgstr "Ouvre un dialogue pour étiqueter l'encodeur sélectionné."

#. Translators: The title of the stream label eraser.
msgid "Stream label eraser"
-msgstr "Supprimer étiquette de flux"
+msgstr "Effaceur d'étiquette de flux"

#. Translators: The text of the stream label eraser dialog.
msgid "Enter the position of the encoder you wish to delete or will delete"
@@ -813,7 +812,7 @@ msgstr ""
#. Translators: Input help mode message in SAM Encoder window.
msgid "Opens a dialog to erase stream labels from an encoder that was deleted."
msgstr ""
-"Ouvre un dialogue pour supprimer les étiquettes de flux d'un encodeur qui a "
+"Ouvre un dialogue pour effacer les étiquettes de flux d'un encodeur qui a "
"été supprimé."

#. Translators: Input help mode message for report date and time command.
@@ -838,7 +837,7 @@ msgid "Disconnecting..."
msgstr "Déconnexion en cours..."

msgid "Connects to a streaming server."
-msgstr "Se connecter à un serveur de streaming."
+msgstr "Se connecter à un serveur de flux."

#. Add-on description
#. Translators: Long description to be shown for this add-on on add-on
information from add-ons manager

diff --git a/readme.md b/readme.md
index c5ce913..2fe664f 100755
--- a/readme.md
+++ b/readme.md
@@ -157,6 +157,7 @@ If you are using Studio on a touchscreen computer running
Windows 8 or later and
* New SPL Assistant commands, including announcing title of the currently
playing track (C), announcing status of metadata streaming (E, 1 through 4 and
0) and opening the online user guide (Shift+F1).
* Ability to package favorite settings as broadcast profiles to be used during
a show and to switch to a predefined profile. See the add-on guide for details
on broadcast profiles.
* Added a new setting in add-on settings to control message verbosity (some
messages will be shortened when advanced verbosity is selected).
+* Added a new setting in add-on settings to let NVDA announce hours, minutes
and seconds for track or playlist duration commands (affected features include
announcing elapsed and remaining time for the currently playing track, track
time analysis and others).
* You can now ask NVDA to report total length of a range of tracks via track
time analysis feature. Press SPL Assistant, F9 to mark current track as start
marker, move to end of track range and press SPL Assistant, F10. These commands
can be reassigned so one doesn't have to invoke SPL Assistant layer to perform
track time analysis.
* Added a column search dialog (command unassigned) to find text in specific
columns such as artist or part of file name.
* Added a time range finder dialog (command unassigned) to find a track with
duration that falls within a specified range, useful if wishing to find a track
to fill an hour slot.


https://bitbucket.org/nvdaaddonteam/stationplaylist/commits/5bef334c7702/
Changeset: 5bef334c7702
Branch: rainbow/redConfigSections
User: josephsl
Date: 2015-11-07 00:41:33+00:00
Summary: Rainbow/red (7.0 prealpha): Runtime support 1: config management.

Started putting together runtime support for sectionized config keys, starting
with config management and configuration UI. If this succeeds, the main app
module will be modified to use config key sections.

Affected #: 1 file

diff --git a/addon/appModules/splstudio/splconfig.py
b/addon/appModules/splstudio/splconfig.py
index cf2f837..81b651f 100755
--- a/addon/appModules/splstudio/splconfig.py
+++ b/addon/appModules/splstudio/splconfig.py
@@ -382,7 +382,7 @@ def instantProfileSwitch():
# Translators: Presented when switch to instant switch
profile was successful.
ui.message(_("Switching profiles"))
# Use the focus.appModule's metadata reminder method if
told to do so now.
- if SPLConfig["MetadataReminder"] in ("startup",
"instant"):
+ if SPLConfig["MetadataStreaming"]["MetadataReminder"]
in ("startup", "instant"):

api.getFocusObject().appModule._metadataAnnouncer(reminder=True)
else:
SPLConfig = SPLConfigPool[SPLPrevProfile]
@@ -464,7 +464,7 @@ class SPLConfigDialog(gui.SettingsDialog):

# Translators: the label for a setting in SPL add-on settings to set
status announcement between words and beeps.

self.beepAnnounceCheckbox=wx.CheckBox(self,wx.NewId(),label=_("&Beep for status
announcements"))
- self.beepAnnounceCheckbox.SetValue(SPLConfig["BeepAnnounce"])
+
self.beepAnnounceCheckbox.SetValue(SPLConfig["General"]["BeepAnnounce"])
settingsSizer.Add(self.beepAnnounceCheckbox,
border=10,flag=wx.TOP)

sizer = wx.BoxSizer(wx.HORIZONTAL)
@@ -475,7 +475,7 @@ class SPLConfigDialog(gui.SettingsDialog):
# Translators: One of the message verbosity levels.
("advanced",_("advanced"))]
self.verbosityList = wx.Choice(self, wx.ID_ANY, choices=[x[1]
for x in self.verbosityLevels])
- currentVerbosity=SPLConfig["MessageVerbosity"]
+ currentVerbosity=SPLConfig["General"]["MessageVerbosity"]
selection = (x for x,y in enumerate(self.verbosityLevels) if
y[0]==currentVerbosity).next()
try:
self.verbosityList.SetSelection(selection)
@@ -489,7 +489,7 @@ class SPLConfigDialog(gui.SettingsDialog):
# Check box hiding method comes from Alberto Buffolino's
Columns Review add-on.
# Translators: Label for a check box in SPL add-on settings to
notify when end of track (outro) is approaching.
self.outroCheckBox=wx.CheckBox(self,wx.NewId(),label=_("&Notify
when end of track is approaching"))
- self.outroCheckBox.SetValue(SPLConfig["SayEndOfTrack"])
+
self.outroCheckBox.SetValue(SPLConfig["IntroOutroAlarms"]["SayEndOfTrack"])
self.outroCheckBox.Bind(wx.EVT_CHECKBOX, self.onOutroCheck)
self.outroSizer.Add(self.outroCheckBox,
border=10,flag=wx.BOTTOM)

@@ -497,7 +497,7 @@ class SPLConfigDialog(gui.SettingsDialog):
self.outroAlarmLabel = wx.StaticText(self, wx.ID_ANY,
label=_("&End of track alarm in seconds"))
self.outroSizer.Add(self.outroAlarmLabel)
self.endOfTrackAlarm = wx.SpinCtrl(self, wx.ID_ANY, min=1,
max=59)
- self.endOfTrackAlarm.SetValue(long(SPLConfig["EndOfTrackTime"]))
+
self.endOfTrackAlarm.SetValue(long(SPLConfig["IntroOutroAlarms"]["EndOfTrackTime"]))
self.endOfTrackAlarm.SetSelection(-1, -1)
self.outroSizer.Add(self.endOfTrackAlarm)
self.onOutroCheck(None)
@@ -506,7 +506,7 @@ class SPLConfigDialog(gui.SettingsDialog):
self.introSizer = wx.BoxSizer(wx.HORIZONTAL)
# Translators: Label for a check box in SPL add-on settings to
notify when end of intro is approaching.
self.introCheckBox=wx.CheckBox(self,wx.NewId(),label=_("&Notify
when end of introduction is approaching"))
- self.introCheckBox.SetValue(SPLConfig["SaySongRamp"])
+
self.introCheckBox.SetValue(SPLConfig["IntroOutroAlarms"]["SaySongRamp"])
self.introCheckBox.Bind(wx.EVT_CHECKBOX, self.onIntroCheck)
self.introSizer.Add(self.introCheckBox,
border=10,flag=wx.BOTTOM)

@@ -514,7 +514,7 @@ class SPLConfigDialog(gui.SettingsDialog):
self.introAlarmLabel = wx.StaticText(self, wx.ID_ANY,
label=_("&Track intro alarm in seconds"))
self.introSizer.Add(self.introAlarmLabel)
self.songRampAlarm = wx.SpinCtrl(self, wx.ID_ANY, min=1, max=9)
- self.songRampAlarm.SetValue(long(SPLConfig["SongRampTime"]))
+
self.songRampAlarm.SetValue(long(SPLConfig["IntroOutroAlarms"]["SongRampTime"]))
self.songRampAlarm.SetSelection(-1, -1)
self.introSizer.Add(self.songRampAlarm)
self.onIntroCheck(None)
@@ -531,7 +531,7 @@ class SPLConfigDialog(gui.SettingsDialog):
# Translators: One of the braille timer settings.
("both",_("Track intro and ending"))]
self.brailleTimerList = wx.Choice(self, wx.ID_ANY,
choices=[x[1] for x in self.brailleTimerValues])
- brailleTimerCurValue=SPLConfig["BrailleTimer"]
+ brailleTimerCurValue=SPLConfig["General"]["BrailleTimer"]
selection = (x for x,y in enumerate(self.brailleTimerValues) if
y[0]==brailleTimerCurValue).next()
try:
self.brailleTimerList.SetSelection(selection)
@@ -546,7 +546,7 @@ class SPLConfigDialog(gui.SettingsDialog):
label = wx.StaticText(self, wx.ID_ANY, label=_("&Microphone
alarm in seconds"))
self.micSizer.Add(label)
self.micAlarm = wx.SpinCtrl(self, wx.ID_ANY, min=0, max=7200)
- self.micAlarm.SetValue(long(SPLConfig["MicAlarm"]))
+
self.micAlarm.SetValue(long(SPLConfig["MicrophoneAlarm"]["MicAlarm"]))
self.micAlarm.SetSelection(-1, -1)
self.micSizer.Add(self.micAlarm)

@@ -554,7 +554,7 @@ class SPLConfigDialog(gui.SettingsDialog):
self.micAlarmIntervalLabel = wx.StaticText(self, wx.ID_ANY,
label=_("Microphone alarm &interval in seconds"))
self.micSizer.Add(self.micAlarmIntervalLabel)
self.micAlarmInterval = wx.SpinCtrl(self, wx.ID_ANY, min=0,
max=60)
-
self.micAlarmInterval.SetValue(long(SPLConfig["MicAlarmInterval"]))
+
self.micAlarmInterval.SetValue(long(SPLConfig["MicrophoneAlarm"]["MicAlarmInterval"]))
self.micAlarmInterval.SetSelection(-1, -1)
self.micSizer.Add(self.micAlarmInterval)
settingsSizer.Add(self.micSizer, border=10, flag=wx.BOTTOM)
@@ -569,7 +569,7 @@ class SPLConfigDialog(gui.SettingsDialog):
# Translators: One of the alarm notification options.
("both",_("both beep and message"))]
self.alarmAnnounceList = wx.Choice(self, wx.ID_ANY,
choices=[x[1] for x in self.alarmAnnounceValues])
- alarmAnnounceCurValue=SPLConfig["AlarmAnnounce"]
+ alarmAnnounceCurValue=SPLConfig["General"]["AlarmAnnounce"]
selection = (x for x,y in enumerate(self.alarmAnnounceValues)
if y[0]==alarmAnnounceCurValue).next()
try:
self.alarmAnnounceList.SetSelection(selection)
@@ -590,7 +590,7 @@ class SPLConfigDialog(gui.SettingsDialog):
# Translators: One of the library scan announcement settings.
("numbers",_("Scan count"))]
self.libScanList = wx.Choice(self, wx.ID_ANY, choices=[x[1] for
x in self.libScanValues])
- libScanCurValue=SPLConfig["LibraryScanAnnounce"]
+ libScanCurValue=SPLConfig["General"]["LibraryScanAnnounce"]
selection = (x for x,y in enumerate(self.libScanValues) if
y[0]==libScanCurValue).next()
try:
self.libScanList.SetSelection(selection)
@@ -601,12 +601,12 @@ class SPLConfigDialog(gui.SettingsDialog):
settingsSizer.Add(sizer, border=10, flag=wx.BOTTOM)


self.hourAnnounceCheckbox=wx.CheckBox(self,wx.NewId(),label="Include &hours
when announcing track or playlist duration")
-
self.hourAnnounceCheckbox.SetValue(SPLConfig["TimeHourAnnounce"])
+
self.hourAnnounceCheckbox.SetValue(SPLConfig["General"]["TimeHourAnnounce"])
settingsSizer.Add(self.hourAnnounceCheckbox,
border=10,flag=wx.BOTTOM)

# Translators: the label for a setting in SPL add-on settings
to toggle track dial mode on and off.

self.trackDialCheckbox=wx.CheckBox(self,wx.NewId(),label=_("&Track Dial mode"))
- self.trackDialCheckbox.SetValue(SPLConfig["TrackDial"])
+
self.trackDialCheckbox.SetValue(SPLConfig["General"]["TrackDial"])
settingsSizer.Add(self.trackDialCheckbox,
border=10,flag=wx.BOTTOM)

sizer = wx.BoxSizer(wx.HORIZONTAL)
@@ -618,7 +618,7 @@ class SPLConfigDialog(gui.SettingsDialog):
# Translators: One of the metadata notification settings.
("instant",_("When instant switch profile is active"))]
self.metadataList = wx.Choice(self, wx.ID_ANY, choices=[x[1]
for x in self.metadataValues])
- metadataCurValue=SPLConfig["MetadataReminder"]
+
metadataCurValue=SPLConfig["MetadataStreaming"]["MetadataReminder"]
selection = (x for x,y in enumerate(self.metadataValues) if
y[0]==metadataCurValue).next()
try:
self.metadataList.SetSelection(selection)
@@ -626,7 +626,7 @@ class SPLConfigDialog(gui.SettingsDialog):
pass
sizer.Add(label)
sizer.Add(self.metadataList)
- self.metadataStreams = SPLConfig["MetadataEnabled"]
+ self.metadataStreams =
SPLConfig["MetadataStreaming"]["MetadataEnabled"]
# Translators: The label of a button to manage column
announcements.
item = manageMetadataButton = wx.Button(self,
label=_("Configure metadata &streaming connection options..."))
item.Bind(wx.EVT_BUTTON, self.onManageMetadata)
@@ -635,9 +635,9 @@ class SPLConfigDialog(gui.SettingsDialog):

# Translators: the label for a setting in SPL add-on settings
to toggle custom column announcement.

self.columnOrderCheckbox=wx.CheckBox(self,wx.NewId(),label=_("Announce columns
in the &order shown on screen"))
-
self.columnOrderCheckbox.SetValue(SPLConfig["UseScreenColumnOrder"])
- self.columnOrder = SPLConfig["ColumnOrder"]
- self.includedColumns = SPLConfig["IncludedColumns"]
+
self.columnOrderCheckbox.SetValue(SPLConfig["ColumnAnnouncement"]["UseScreenColumnOrder"])
+ self.columnOrder =
SPLConfig["ColumnAnnouncement"]["ColumnOrder"]
+ self.includedColumns =
SPLConfig["ColumnAnnouncement"]["IncludedColumns"]
settingsSizer.Add(self.columnOrderCheckbox,
border=10,flag=wx.BOTTOM)
# Translators: The label of a button to manage column
announcements.
item = manageColumnsButton = wx.Button(self, label=_("&Manage
track column announcements..."))
@@ -646,24 +646,24 @@ class SPLConfigDialog(gui.SettingsDialog):

# Translators: the label for a setting in SPL add-on settings
to announce scheduled time.

self.scheduledForCheckbox=wx.CheckBox(self,wx.NewId(),label=_("Announce
&scheduled time for the selected track"))
- self.scheduledForCheckbox.SetValue(SPLConfig["SayScheduledFor"])
+
self.scheduledForCheckbox.SetValue(SPLConfig["SayStatus"]["SayScheduledFor"])
settingsSizer.Add(self.scheduledForCheckbox,
border=10,flag=wx.BOTTOM)

# Translators: the label for a setting in SPL add-on settings
to announce listener count.

self.listenerCountCheckbox=wx.CheckBox(self,wx.NewId(),label=_("Announce
&listener count"))
-
self.listenerCountCheckbox.SetValue(SPLConfig["SayListenerCount"])
+
self.listenerCountCheckbox.SetValue(SPLConfig["SayStatus"]["SayListenerCount"])
settingsSizer.Add(self.listenerCountCheckbox,
border=10,flag=wx.BOTTOM)

# Translators: the label for a setting in SPL add-on settings
to announce currently playing cart.

self.cartNameCheckbox=wx.CheckBox(self,wx.NewId(),label=_("&Announce name of
the currently playing cart"))
- self.cartNameCheckbox.SetValue(SPLConfig["SayPlayingCartName"])
+
self.cartNameCheckbox.SetValue(SPLConfig["SayStatus"]["SayPlayingCartName"])
settingsSizer.Add(self.cartNameCheckbox,
border=10,flag=wx.BOTTOM)

# Translators: The label of a button to open advanced options
such as using SPL Controller command to invoke Assistant layer.
item = advancedOptButton = wx.Button(self, label=_("&Advanced
options..."))
item.Bind(wx.EVT_BUTTON, self.onAdvancedOptions)
- self.splConPassthrough = SPLConfig["SPLConPassthrough"]
- self.compLayer = SPLConfig["CompatibilityLayer"]
+ self.splConPassthrough =
SPLConfig["Advanced"]["SPLConPassthrough"]
+ self.compLayer = SPLConfig["Advanced"]["CompatibilityLayer"]
settingsSizer.Add(item)

# Translators: The label for a button in SPL add-on
configuration dialog to reset settings to defaults.
@@ -680,29 +680,29 @@ class SPLConfigDialog(gui.SettingsDialog):
global SPLConfig, SPLActiveProfile, _configDialogOpened,
SPLSwitchProfile, SPLPrevProfile
selectedProfile = self.profiles.GetStringSelection()
SPLConfig = getProfileByName(selectedProfile)
- SPLConfig["BeepAnnounce"] = self.beepAnnounceCheckbox.Value
- SPLConfig["MessageVerbosity"] =
self.verbosityLevels[self.verbosityList.GetSelection()][0]
- SPLConfig["SayEndOfTrack"] = self.outroCheckBox.Value
- SPLConfig["EndOfTrackTime"] = self.endOfTrackAlarm.Value
- SPLConfig["SaySongRamp"] = self.introCheckBox.Value
- SPLConfig["SongRampTime"] = self.songRampAlarm.Value
- SPLConfig["BrailleTimer"] =
self.brailleTimerValues[self.brailleTimerList.GetSelection()][0]
- SPLConfig["MicAlarm"] = self.micAlarm.Value
- SPLConfig["MicAlarmInterval"] = self.micAlarmInterval.Value
- SPLConfig["AlarmAnnounce"] =
self.alarmAnnounceValues[self.alarmAnnounceList.GetSelection()][0]
- SPLConfig["LibraryScanAnnounce"] =
self.libScanValues[self.libScanList.GetSelection()][0]
- SPLConfig["TimeHourAnnounce"] = self.hourAnnounceCheckbox.Value
- SPLConfig["TrackDial"] = self.trackDialCheckbox.Value
- SPLConfig["MetadataReminder"] =
self.metadataValues[self.metadataList.GetSelection()][0]
- SPLConfig["MetadataEnabled"] = self.metadataStreams
- SPLConfig["UseScreenColumnOrder"] =
self.columnOrderCheckbox.Value
- SPLConfig["ColumnOrder"] = self.columnOrder
- SPLConfig["IncludedColumns"] = self.includedColumns
- SPLConfig["SayScheduledFor"] = self.scheduledForCheckbox.Value
- SPLConfig["SayListenerCount"] = self.listenerCountCheckbox.Value
- SPLConfig["SayPlayingCartName"] = self.cartNameCheckbox.Value
- SPLConfig["SPLConPassthrough"] = self.splConPassthrough
- SPLConfig["CompatibilityLayer"] = self.compLayer
+ SPLConfig["General"]["BeepAnnounce"] =
self.beepAnnounceCheckbox.Value
+ SPLConfig["General"]["MessageVerbosity"] =
self.verbosityLevels[self.verbosityList.GetSelection()][0]
+ SPLConfig["IntroOutroAlarms"]["SayEndOfTrack"] =
self.outroCheckBox.Value
+ SPLConfig["IntroOutroAlarms"]["EndOfTrackTime"] =
self.endOfTrackAlarm.Value
+ SPLConfig["IntroOutroAlarms"]["SaySongRamp"] =
self.introCheckBox.Value
+ SPLConfig["IntroOutroAlarms"]["SongRampTime"] =
self.songRampAlarm.Value
+ SPLConfig["General"]["BrailleTimer"] =
self.brailleTimerValues[self.brailleTimerList.GetSelection()][0]
+ SPLConfig["MicrophoneAlarm"]["MicAlarm"] = self.micAlarm.Value
+ SPLConfig["MicrophoneAlarm"]["MicAlarmInterval"] =
self.micAlarmInterval.Value
+ SPLConfig["General"]["AlarmAnnounce"] =
self.alarmAnnounceValues[self.alarmAnnounceList.GetSelection()][0]
+ SPLConfig["General"]["LibraryScanAnnounce"] =
self.libScanValues[self.libScanList.GetSelection()][0]
+ SPLConfig["General"]["TimeHourAnnounce"] =
self.hourAnnounceCheckbox.Value
+ SPLConfig["General"]["TrackDial"] = self.trackDialCheckbox.Value
+ SPLConfig["MetadataStreaming"]["MetadataReminder"] =
self.metadataValues[self.metadataList.GetSelection()][0]
+ SPLConfig["MetadataStreaming"]["MetadataEnabled"] =
self.metadataStreams
+ SPLConfig["ColumnAnnouncement"]["UseScreenColumnOrder"] =
self.columnOrderCheckbox.Value
+ SPLConfig["ColumnAnnouncement"]["ColumnOrder"] =
self.columnOrder
+ SPLConfig["ColumnAnnouncement"]["IncludedColumns"] =
self.includedColumns
+ SPLConfig["SayStatus"]["SayScheduledFor"] =
self.scheduledForCheckbox.Value
+ SPLConfig["SayStatus"]["SayListenerCount"] =
self.listenerCountCheckbox.Value
+ SPLConfig["SayStatus"]["SayPlayingCartName"] =
self.cartNameCheckbox.Value
+ SPLConfig["Advanced"]["SPLConPassthrough"] =
self.splConPassthrough
+ SPLConfig["Advanced"]["CompatibilityLayer"] = self.compLayer
SPLActiveProfile = SPLConfig.name
SPLSwitchProfile = self.switchProfile
# Without nullifying prev profile while switch profile is
undefined, NVDA will assume it can switch back to that profile when it can't.
@@ -762,14 +762,14 @@ class SPLConfigDialog(gui.SettingsDialog):
self.instantSwitchButton.Label = _("Disable
instant profile switching")
self.instantSwitchButton.Enable()
curProfile = getProfileByName(selectedProfile)
- self.outroCheckBox.SetValue(curProfile["SayEndOfTrack"])
-
self.endOfTrackAlarm.SetValue(long(curProfile["EndOfTrackTime"]))
+
self.outroCheckBox.SetValue(curProfile["IntroOutroAlarms"]["SayEndOfTrack"])
+
self.endOfTrackAlarm.SetValue(long(curProfile["IntroOutroAlarms"]["EndOfTrackTime"]))
self.onOutroCheck(None)
- self.introCheckBox.SetValue(curProfile["SaySongRamp"])
- self.songRampAlarm.SetValue(long(curProfile["SongRampTime"]))
+
self.introCheckBox.SetValue(curProfile["IntroOutroAlarms"]["SaySongRamp"])
+
self.songRampAlarm.SetValue(long(curProfile["IntroOutroAlarms"]["SongRampTime"]))
self.onIntroCheck(None)
- self.micAlarm.SetValue(long(curProfile["MicAlarm"]))
-
self.micAlarmInterval.SetValue(long(curProfile["MicAlarmInterval"]))
+
self.micAlarm.SetValue(long(curProfile["MicrophoneAlarm"]["MicAlarm"]))
+
self.micAlarmInterval.SetValue(long(curProfile["MicrophoneAlarm"]["MicAlarmInterval"]))
# 6.1: Take care of profile-specific column and metadata
settings.
# Unlock in 6.1.
"""self.metadataStreams = curProfile["MetadataEnabled"]
@@ -1034,7 +1034,7 @@ class MetadataStreamingDialog(wx.Dialog):
streaming = func(0, 36, ret=True)
if streaming == -1: streaming += 1
checkedDSP.SetValue(streaming)
- else: checkedDSP.SetValue(SPLConfig["MetadataEnabled"][0])
+ else:
checkedDSP.SetValue(SPLConfig["MetadataStreaming"]["MetadataEnabled"][0])
self.checkedStreams.append(checkedDSP)
# Now the rest.
for url in xrange(1, 5):
@@ -1043,7 +1043,7 @@ class MetadataStreamingDialog(wx.Dialog):
streaming = func(url, 36, ret=True)
if streaming == -1: streaming += 1
checkedURL.SetValue(streaming)
- else:
checkedURL.SetValue(SPLConfig["MetadataEnabled"][url])
+ else:
checkedURL.SetValue(SPLConfig["MetadataStreaming"]["MetadataEnabled"][url])
self.checkedStreams.append(checkedURL)

mainSizer = wx.BoxSizer(wx.VERTICAL)
@@ -1086,7 +1086,7 @@ class MetadataStreamingDialog(wx.Dialog):
parent.Enable()
else:
# 6.1: Store just toggled settings to profile if told
to do so.
- if len(metadataEnabled): SPLConfig["MetadataEnabled"] =
metadataEnabled
+ if len(metadataEnabled):
SPLConfig["MetadataStreaming"]["MetadataEnabled"] = metadataEnabled
self.Destroy()
_metadataDialogOpened = False
return
@@ -1109,7 +1109,7 @@ class ColumnAnnouncementsDialog(wx.Dialog):
self.checkedColumns = []
for column in ("Duration", "Intro", "Category", "Filename"):
checkedColumn=wx.CheckBox(self,wx.NewId(),label=column)
- checkedColumn.SetValue(column in
SPLConfig["IncludedColumns"])
+ checkedColumn.SetValue(column in
SPLConfig["ColumnAnnouncement"]["IncludedColumns"])
self.checkedColumns.append(checkedColumn)

mainSizer = wx.BoxSizer(wx.VERTICAL)
@@ -1219,14 +1219,14 @@ class AdvancedOptionsDialog(wx.Dialog):
sizer = wx.BoxSizer(wx.HORIZONTAL)
# Translators: A checkbox to toggle if SPL Controller command
can be used to invoke Assistant layer.

self.splConPassthroughCheckbox=wx.CheckBox(self,wx.NewId(),label=_("Allow SPL
C&ontroller command to invoke SPL Assistant layer"))
-
self.splConPassthroughCheckbox.SetValue(SPLConfig["SPLConPassthrough"])
+
self.splConPassthroughCheckbox.SetValue(SPLConfig["Advanced"]["SPLConPassthrough"])
sizer.Add(self.splConPassthroughCheckbox, border=10,flag=wx.TOP)
mainSizer.Add(sizer, border=10, flag=wx.BOTTOM)

sizer = wx.BoxSizer(wx.HORIZONTAL)

self.compLayerCheckbox=wx.CheckBox(self,wx.NewId(),label="Screen &reader
compatibility Mode (experimental)")
# Project Rainbow: change the UI for this control.
- self.compLayerCheckbox.SetValue(SPLConfig["CompatibilityLayer"]
!= "off")
+
self.compLayerCheckbox.SetValue(SPLConfig["Advanced"]["CompatibilityLayer"] !=
"off")
sizer.Add(self.compLayerCheckbox, border=10,flag=wx.TOP)
mainSizer.Add(sizer, border=10, flag=wx.BOTTOM)

@@ -1298,13 +1298,13 @@ class SPLAlarmDialog(wx.Dialog):
alarmMessage = wx.StaticText(self, wx.ID_ANY, label=alarmPrompt)
alarmSizer.Add(alarmMessage)
self.alarmEntry = wx.SpinCtrl(self, wx.ID_ANY, min=min, max=max)
- self.alarmEntry.SetValue(SPLConfig[setting])
+ self.alarmEntry.SetValue(SPLConfig["IntroOutroAlarms"][setting])
self.alarmEntry.SetSelection(-1, -1)
alarmSizer.Add(self.alarmEntry)
mainSizer.Add(alarmSizer,border=20,flag=wx.LEFT|wx.RIGHT|wx.TOP)


self.toggleCheckBox=wx.CheckBox(self,wx.NewId(),label=alarmToggleLabel)
- self.toggleCheckBox.SetValue(SPLConfig[toggleSetting])
+
self.toggleCheckBox.SetValue(SPLConfig["IntroOutroAlarms"][toggleSetting])
mainSizer.Add(self.toggleCheckBox,border=10,flag=wx.BOTTOM)

mainSizer.AddSizer(self.CreateButtonSizer(wx.OK|wx.CANCEL))
@@ -1321,8 +1321,8 @@ class SPLAlarmDialog(wx.Dialog):
if user32.FindWindowA("SPLStudio", None):
newVal = self.alarmEntry.GetValue()
newToggle = self.toggleCheckBox.GetValue()
- if SPLConfig[self.setting] != newVal:
SPLConfig[self.setting] = newVal
- elif SPLConfig[self.toggleSetting] != newToggle:
SPLConfig[self.toggleSetting] = newToggle
+ if SPLConfig["IntroOutroAlarms"][self.setting] !=
newVal: SPLConfig["IntroOutroAlarms"][self.setting] = newVal
+ elif SPLConfig["IntroOutroAlarms"][self.toggleSetting]
!= newToggle: SPLConfig["IntroOutroAlarms"][self.toggleSetting] = newToggle
self.Destroy()
_alarmDialogOpened = False

@@ -1337,7 +1337,7 @@ class SPLAlarmDialog(wx.Dialog):
# Most of the categories are same as confspec keys, hence the below message
function is invoked when settings are changed.
def message(category, value):
verbosityLevels = ("beginner", "advanced")
-
ui.message(messagePool[category][value][verbosityLevels.index(SPLConfig["MessageVerbosity"])])
+
ui.message(messagePool[category][value][verbosityLevels.index(SPLConfig["General"]["MessageVerbosity"])])

messagePool={
"BeepAnnounce":

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: