Skip to content

Commit

Permalink
latest changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
mush42 committed Nov 20, 2019
1 parent c5890c8 commit 6b59b95
Show file tree
Hide file tree
Showing 49 changed files with 13 additions and 7 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ def info_file_path(self):
def folder(self):
return os.path.split(self.directory)[-1]

def exists(self):
return os.path.isdir(self.directory)

def todict(self):
data = asdict(self)
for unwanted_key in ("is_active", "directory", "sounds"):
Expand Down Expand Up @@ -157,16 +160,19 @@ def get_active_theme(self):
if not theme:
config.conf["audiothemes"]["active_theme"] = "Default"
theme = self.get_theme_from_folder("Default")
theme.load(self.player)
theme.is_active = True
return theme
if theme.exists():
theme.load(self.player)
theme.is_active = True
return theme

def configure(self, *args, **kwargs):
user_config = config.conf["audiothemes"]
if self.active_theme is not None:
self.active_theme.deactivate()
self.enabled = user_config["enable_audio_themes"]
self.active_theme = self.get_active_theme()
if self.active_theme is None:
return
self.player.audio3d = user_config["audio3d"]
self.player.use_in_say_all = user_config["use_in_say_all"]
self.player.speak_roles = user_config["speak_roles"]
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ def apply_diff(self):
wx.MessageBox(
# Translators: message indicating failure in copying files
_(
"Could not copy file {fileinfo.src} to directory {fileinfo.dst}."
),
"Could not copy file {src} to directory {dst}."
).format(src=fileinfo.src, dst=fileinfo.dst),
# Translators: title for a message indicating an error
_("Error"),
style=wx.ICON_ERROR,
Expand Down
2 changes: 1 addition & 1 deletion buildVars.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# for previously unpublished addons, please follow the community guidelines at:
# https://bitbucket.org/nvdaaddonteam/todo/raw/master/guidelines.txt
# add-on Name, internal for nvda
"addon_name" : "audioThemes3D",
"addon_name" : "audiothemes",
# Add-on summary, usually the user visible name of the addon.
# Translators: Summary for this add-on to be shown on installation and add-on information.
"addon_summary" : _("Audio Themes"),
Expand Down
2 changes: 1 addition & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Version 6.0

The add-on has been rewritten from scratch to improve performance and provide better compatability with modern\ NVDA versions. Major highlights include:
The add-on has been rewritten from scratch to improve performance and provide better compatibility with modern\ NVDA versions. Major highlights include:
* The minimum required NVDA version is 2019.3
* Vast improvements to the responsiveness of the add-on
* The add-on settings have been moved to NVDA's multi-category settings dialog
Expand Down

0 comments on commit 6b59b95

Please sign in to comment.