commit/StationPlaylist: josephsl: 6.1: Column announcement order and inclusion are now tryly profile specific.

  • From: commits-noreply@xxxxxxxxxxxxx
  • To: nvda-addons-commits@xxxxxxxxxxxxx
  • Date: Thu, 19 Nov 2015 17:25:55 -0000

1 new commit in StationPlaylist:

https://bitbucket.org/nvdaaddonteam/stationplaylist/commits/9fc048f6f916/
Changeset: 9fc048f6f916
Branch: 6.x
User: josephsl
Date: 2015-11-19 17:25:13+00:00
Summary: 6.1: Column announcement order and inclusion are now tryly profile
specific.

In column announcmenet order, column checkboxes should never use SPLConfig
dictionrary (prone to errors). Also fixed a key error exception thrown when a
checkbox label cannot be found.
Next is metadata streaming.

Affected #: 1 file

diff --git a/addon/appModules/splstudio/splconfig.py
b/addon/appModules/splstudio/splconfig.py
index a087e28..1a71b2d 100755
--- a/addon/appModules/splstudio/splconfig.py
+++ b/addon/appModules/splstudio/splconfig.py
@@ -247,8 +247,7 @@ def _preSave(conf):
# 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.
- includedColumns = set(_SPLDefaults["IncludedColumns"])
- if conf["IncludedColumns"] == includedColumns:
+ if len(conf["IncludedColumns"]) == 17:
del conf["IncludedColumns"]
if conf["ColumnOrder"] ==
["Artist","Title","Duration","Intro","Outro","Category","Year","Album","Genre","Mood","Energy","Tempo","BPM","Gender","Rating","Filename","Time
Scheduled"]:
del conf["ColumnOrder"]
@@ -706,11 +705,10 @@ class SPLConfigDialog(gui.SettingsDialog):
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.metadataStreams = curProfile["MetadataEnabled"]

self.columnOrderCheckbox.SetValue(curProfile["UseScreenColumnOrder"])
self.columnOrder = curProfile["ColumnOrder"]
- self.includedColumns = curProfile["IncludedColumns"]"""
+ self.includedColumns = curProfile["IncludedColumns"]

# Profile controls.
# Rename and delete events come from GUI/config profiles dialog from
NVDA core.
@@ -1044,7 +1042,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
self.Parent.includedColumns)
self.checkedColumns.append(checkedColumn)

mainSizer = wx.BoxSizer(wx.VERTICAL)
@@ -1100,7 +1098,10 @@ class ColumnAnnouncementsDialog(wx.Dialog):
parent.includedColumns.add("Title")
for checkbox in self.checkedColumns:
action = parent.includedColumns.add if checkbox.Value
else parent.includedColumns.remove
- action(checkbox.Label)
+ try:
+ action(checkbox.Label)
+ except KeyError:
+ pass
parent.profiles.SetFocus()
parent.Enable()
self.Destroy()

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:

  • » commit/StationPlaylist: josephsl: 6.1: Column announcement order and inclusion are now tryly profile specific. - commits-noreply