diff --git a/addon/globalPlugins/audioThemes3D/Themes/Default/100.ogg b/addon/globalPlugins/audiothemes/Themes/Default/100.ogg similarity index 100% rename from addon/globalPlugins/audioThemes3D/Themes/Default/100.ogg rename to addon/globalPlugins/audiothemes/Themes/Default/100.ogg diff --git a/addon/globalPlugins/audioThemes3D/Themes/Default/102.ogg b/addon/globalPlugins/audiothemes/Themes/Default/102.ogg similarity index 100% rename from addon/globalPlugins/audioThemes3D/Themes/Default/102.ogg rename to addon/globalPlugins/audiothemes/Themes/Default/102.ogg diff --git a/addon/globalPlugins/audioThemes3D/Themes/Default/103.ogg b/addon/globalPlugins/audiothemes/Themes/Default/103.ogg similarity index 100% rename from addon/globalPlugins/audioThemes3D/Themes/Default/103.ogg rename to addon/globalPlugins/audiothemes/Themes/Default/103.ogg diff --git a/addon/globalPlugins/audioThemes3D/Themes/Default/108.ogg b/addon/globalPlugins/audiothemes/Themes/Default/108.ogg similarity index 100% rename from addon/globalPlugins/audioThemes3D/Themes/Default/108.ogg rename to addon/globalPlugins/audiothemes/Themes/Default/108.ogg diff --git a/addon/globalPlugins/audioThemes3D/Themes/Default/11.ogg b/addon/globalPlugins/audiothemes/Themes/Default/11.ogg similarity index 100% rename from addon/globalPlugins/audioThemes3D/Themes/Default/11.ogg rename to addon/globalPlugins/audiothemes/Themes/Default/11.ogg diff --git a/addon/globalPlugins/audioThemes3D/Themes/Default/12.ogg b/addon/globalPlugins/audiothemes/Themes/Default/12.ogg similarity index 100% rename from addon/globalPlugins/audioThemes3D/Themes/Default/12.ogg rename to addon/globalPlugins/audiothemes/Themes/Default/12.ogg diff --git a/addon/globalPlugins/audioThemes3D/Themes/Default/123.ogg b/addon/globalPlugins/audiothemes/Themes/Default/123.ogg similarity index 100% rename from addon/globalPlugins/audioThemes3D/Themes/Default/123.ogg rename to addon/globalPlugins/audiothemes/Themes/Default/123.ogg diff --git a/addon/globalPlugins/audioThemes3D/Themes/Default/13.ogg b/addon/globalPlugins/audiothemes/Themes/Default/13.ogg similarity index 100% rename from addon/globalPlugins/audioThemes3D/Themes/Default/13.ogg rename to addon/globalPlugins/audiothemes/Themes/Default/13.ogg diff --git a/addon/globalPlugins/audioThemes3D/Themes/Default/14.ogg b/addon/globalPlugins/audiothemes/Themes/Default/14.ogg similarity index 100% rename from addon/globalPlugins/audioThemes3D/Themes/Default/14.ogg rename to addon/globalPlugins/audiothemes/Themes/Default/14.ogg diff --git a/addon/globalPlugins/audioThemes3D/Themes/Default/15.ogg b/addon/globalPlugins/audiothemes/Themes/Default/15.ogg similarity index 100% rename from addon/globalPlugins/audioThemes3D/Themes/Default/15.ogg rename to addon/globalPlugins/audiothemes/Themes/Default/15.ogg diff --git a/addon/globalPlugins/audioThemes3D/Themes/Default/19.ogg b/addon/globalPlugins/audiothemes/Themes/Default/19.ogg similarity index 100% rename from addon/globalPlugins/audioThemes3D/Themes/Default/19.ogg rename to addon/globalPlugins/audiothemes/Themes/Default/19.ogg diff --git a/addon/globalPlugins/audioThemes3D/Themes/Default/20.ogg b/addon/globalPlugins/audiothemes/Themes/Default/20.ogg similarity index 100% rename from addon/globalPlugins/audioThemes3D/Themes/Default/20.ogg rename to addon/globalPlugins/audiothemes/Themes/Default/20.ogg diff --git a/addon/globalPlugins/audioThemes3D/Themes/Default/21.ogg b/addon/globalPlugins/audiothemes/Themes/Default/21.ogg similarity index 100% rename from addon/globalPlugins/audioThemes3D/Themes/Default/21.ogg rename to addon/globalPlugins/audiothemes/Themes/Default/21.ogg diff --git a/addon/globalPlugins/audioThemes3D/Themes/Default/22.ogg b/addon/globalPlugins/audiothemes/Themes/Default/22.ogg similarity index 100% rename from addon/globalPlugins/audioThemes3D/Themes/Default/22.ogg rename to addon/globalPlugins/audiothemes/Themes/Default/22.ogg diff --git a/addon/globalPlugins/audioThemes3D/Themes/Default/24.ogg b/addon/globalPlugins/audiothemes/Themes/Default/24.ogg similarity index 100% rename from addon/globalPlugins/audioThemes3D/Themes/Default/24.ogg rename to addon/globalPlugins/audiothemes/Themes/Default/24.ogg diff --git a/addon/globalPlugins/audioThemes3D/Themes/Default/2500.ogg b/addon/globalPlugins/audiothemes/Themes/Default/2500.ogg similarity index 100% rename from addon/globalPlugins/audioThemes3D/Themes/Default/2500.ogg rename to addon/globalPlugins/audiothemes/Themes/Default/2500.ogg diff --git a/addon/globalPlugins/audioThemes3D/Themes/Default/2501.ogg b/addon/globalPlugins/audiothemes/Themes/Default/2501.ogg similarity index 100% rename from addon/globalPlugins/audioThemes3D/Themes/Default/2501.ogg rename to addon/globalPlugins/audiothemes/Themes/Default/2501.ogg diff --git a/addon/globalPlugins/audioThemes3D/Themes/Default/2502.ogg b/addon/globalPlugins/audiothemes/Themes/Default/2502.ogg similarity index 100% rename from addon/globalPlugins/audioThemes3D/Themes/Default/2502.ogg rename to addon/globalPlugins/audiothemes/Themes/Default/2502.ogg diff --git a/addon/globalPlugins/audioThemes3D/Themes/Default/2503.ogg b/addon/globalPlugins/audiothemes/Themes/Default/2503.ogg similarity index 100% rename from addon/globalPlugins/audioThemes3D/Themes/Default/2503.ogg rename to addon/globalPlugins/audiothemes/Themes/Default/2503.ogg diff --git a/addon/globalPlugins/audioThemes3D/Themes/Default/2504.ogg b/addon/globalPlugins/audiothemes/Themes/Default/2504.ogg similarity index 100% rename from addon/globalPlugins/audioThemes3D/Themes/Default/2504.ogg rename to addon/globalPlugins/audiothemes/Themes/Default/2504.ogg diff --git a/addon/globalPlugins/audioThemes3D/Themes/Default/29.ogg b/addon/globalPlugins/audiothemes/Themes/Default/29.ogg similarity index 100% rename from addon/globalPlugins/audioThemes3D/Themes/Default/29.ogg rename to addon/globalPlugins/audiothemes/Themes/Default/29.ogg diff --git a/addon/globalPlugins/audioThemes3D/Themes/Default/35.ogg b/addon/globalPlugins/audiothemes/Themes/Default/35.ogg similarity index 100% rename from addon/globalPlugins/audioThemes3D/Themes/Default/35.ogg rename to addon/globalPlugins/audiothemes/Themes/Default/35.ogg diff --git a/addon/globalPlugins/audioThemes3D/Themes/Default/36.ogg b/addon/globalPlugins/audiothemes/Themes/Default/36.ogg similarity index 100% rename from addon/globalPlugins/audioThemes3D/Themes/Default/36.ogg rename to addon/globalPlugins/audiothemes/Themes/Default/36.ogg diff --git a/addon/globalPlugins/audioThemes3D/Themes/Default/37.ogg b/addon/globalPlugins/audiothemes/Themes/Default/37.ogg similarity index 100% rename from addon/globalPlugins/audioThemes3D/Themes/Default/37.ogg rename to addon/globalPlugins/audiothemes/Themes/Default/37.ogg diff --git a/addon/globalPlugins/audioThemes3D/Themes/Default/5.ogg b/addon/globalPlugins/audiothemes/Themes/Default/5.ogg similarity index 100% rename from addon/globalPlugins/audioThemes3D/Themes/Default/5.ogg rename to addon/globalPlugins/audiothemes/Themes/Default/5.ogg diff --git a/addon/globalPlugins/audioThemes3D/Themes/Default/6.ogg b/addon/globalPlugins/audiothemes/Themes/Default/6.ogg similarity index 100% rename from addon/globalPlugins/audioThemes3D/Themes/Default/6.ogg rename to addon/globalPlugins/audiothemes/Themes/Default/6.ogg diff --git a/addon/globalPlugins/audioThemes3D/Themes/Default/60.ogg b/addon/globalPlugins/audiothemes/Themes/Default/60.ogg similarity index 100% rename from addon/globalPlugins/audioThemes3D/Themes/Default/60.ogg rename to addon/globalPlugins/audiothemes/Themes/Default/60.ogg diff --git a/addon/globalPlugins/audioThemes3D/Themes/Default/61.ogg b/addon/globalPlugins/audiothemes/Themes/Default/61.ogg similarity index 100% rename from addon/globalPlugins/audioThemes3D/Themes/Default/61.ogg rename to addon/globalPlugins/audiothemes/Themes/Default/61.ogg diff --git a/addon/globalPlugins/audioThemes3D/Themes/Default/76.ogg b/addon/globalPlugins/audiothemes/Themes/Default/76.ogg similarity index 100% rename from addon/globalPlugins/audioThemes3D/Themes/Default/76.ogg rename to addon/globalPlugins/audiothemes/Themes/Default/76.ogg diff --git a/addon/globalPlugins/audioThemes3D/Themes/Default/8.ogg b/addon/globalPlugins/audiothemes/Themes/Default/8.ogg similarity index 100% rename from addon/globalPlugins/audioThemes3D/Themes/Default/8.ogg rename to addon/globalPlugins/audiothemes/Themes/Default/8.ogg diff --git a/addon/globalPlugins/audioThemes3D/Themes/Default/82.ogg b/addon/globalPlugins/audiothemes/Themes/Default/82.ogg similarity index 100% rename from addon/globalPlugins/audioThemes3D/Themes/Default/82.ogg rename to addon/globalPlugins/audiothemes/Themes/Default/82.ogg diff --git a/addon/globalPlugins/audioThemes3D/Themes/Default/83.ogg b/addon/globalPlugins/audiothemes/Themes/Default/83.ogg similarity index 100% rename from addon/globalPlugins/audioThemes3D/Themes/Default/83.ogg rename to addon/globalPlugins/audiothemes/Themes/Default/83.ogg diff --git a/addon/globalPlugins/audioThemes3D/Themes/Default/9.ogg b/addon/globalPlugins/audiothemes/Themes/Default/9.ogg similarity index 100% rename from addon/globalPlugins/audioThemes3D/Themes/Default/9.ogg rename to addon/globalPlugins/audiothemes/Themes/Default/9.ogg diff --git a/addon/globalPlugins/audioThemes3D/Themes/Default/92.ogg b/addon/globalPlugins/audiothemes/Themes/Default/92.ogg similarity index 100% rename from addon/globalPlugins/audioThemes3D/Themes/Default/92.ogg rename to addon/globalPlugins/audiothemes/Themes/Default/92.ogg diff --git a/addon/globalPlugins/audioThemes3D/Themes/Default/info.json b/addon/globalPlugins/audiothemes/Themes/Default/info.json similarity index 100% rename from addon/globalPlugins/audioThemes3D/Themes/Default/info.json rename to addon/globalPlugins/audiothemes/Themes/Default/info.json diff --git a/addon/globalPlugins/audioThemes3D/__init__.py b/addon/globalPlugins/audiothemes/__init__.py similarity index 100% rename from addon/globalPlugins/audioThemes3D/__init__.py rename to addon/globalPlugins/audiothemes/__init__.py diff --git a/addon/globalPlugins/audioThemes3D/handler.py b/addon/globalPlugins/audiothemes/handler.py similarity index 97% rename from addon/globalPlugins/audioThemes3D/handler.py rename to addon/globalPlugins/audiothemes/handler.py index 24e78a1..b768d61 100644 --- a/addon/globalPlugins/audioThemes3D/handler.py +++ b/addon/globalPlugins/audiothemes/handler.py @@ -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"): @@ -157,9 +160,10 @@ 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"] @@ -167,6 +171,8 @@ def configure(self, *args, **kwargs): 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"] diff --git a/addon/globalPlugins/audioThemes3D/settings.py b/addon/globalPlugins/audiothemes/settings.py similarity index 100% rename from addon/globalPlugins/audioThemes3D/settings.py rename to addon/globalPlugins/audiothemes/settings.py diff --git a/addon/globalPlugins/audioThemes3D/studio/__init__.py b/addon/globalPlugins/audiothemes/studio/__init__.py similarity index 100% rename from addon/globalPlugins/audioThemes3D/studio/__init__.py rename to addon/globalPlugins/audiothemes/studio/__init__.py diff --git a/addon/globalPlugins/audioThemes3D/studio/themes_blender.py b/addon/globalPlugins/audiothemes/studio/themes_blender.py similarity index 98% rename from addon/globalPlugins/audioThemes3D/studio/themes_blender.py rename to addon/globalPlugins/audiothemes/studio/themes_blender.py index 01f2375..dc25749 100644 --- a/addon/globalPlugins/audioThemes3D/studio/themes_blender.py +++ b/addon/globalPlugins/audiothemes/studio/themes_blender.py @@ -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, diff --git a/addon/globalPlugins/audioThemes3D/unspoken/__init__.py b/addon/globalPlugins/audiothemes/unspoken/__init__.py similarity index 100% rename from addon/globalPlugins/audioThemes3D/unspoken/__init__.py rename to addon/globalPlugins/audiothemes/unspoken/__init__.py diff --git a/addon/globalPlugins/audioThemes3D/unspoken/libaudioverse/__init__.py b/addon/globalPlugins/audiothemes/unspoken/libaudioverse/__init__.py similarity index 100% rename from addon/globalPlugins/audioThemes3D/unspoken/libaudioverse/__init__.py rename to addon/globalPlugins/audiothemes/unspoken/libaudioverse/__init__.py diff --git a/addon/globalPlugins/audioThemes3D/unspoken/libaudioverse/_lav.py b/addon/globalPlugins/audiothemes/unspoken/libaudioverse/_lav.py similarity index 100% rename from addon/globalPlugins/audioThemes3D/unspoken/libaudioverse/_lav.py rename to addon/globalPlugins/audiothemes/unspoken/libaudioverse/_lav.py diff --git a/addon/globalPlugins/audioThemes3D/unspoken/libaudioverse/_libaudioverse.py b/addon/globalPlugins/audiothemes/unspoken/libaudioverse/_libaudioverse.py similarity index 100% rename from addon/globalPlugins/audioThemes3D/unspoken/libaudioverse/_libaudioverse.py rename to addon/globalPlugins/audiothemes/unspoken/libaudioverse/_libaudioverse.py diff --git a/addon/globalPlugins/audioThemes3D/unspoken/libaudioverse/libaudioverse.dll b/addon/globalPlugins/audiothemes/unspoken/libaudioverse/libaudioverse.dll similarity index 100% rename from addon/globalPlugins/audioThemes3D/unspoken/libaudioverse/libaudioverse.dll rename to addon/globalPlugins/audiothemes/unspoken/libaudioverse/libaudioverse.dll diff --git a/addon/globalPlugins/audioThemes3D/unspoken/libaudioverse/libsndfile-1.dll b/addon/globalPlugins/audiothemes/unspoken/libaudioverse/libsndfile-1.dll similarity index 100% rename from addon/globalPlugins/audioThemes3D/unspoken/libaudioverse/libsndfile-1.dll rename to addon/globalPlugins/audiothemes/unspoken/libaudioverse/libsndfile-1.dll diff --git a/addon/globalPlugins/audioThemes3D/unspoken/mixer.py b/addon/globalPlugins/audiothemes/unspoken/mixer.py similarity index 100% rename from addon/globalPlugins/audioThemes3D/unspoken/mixer.py rename to addon/globalPlugins/audiothemes/unspoken/mixer.py diff --git a/buildVars.py b/buildVars.py index e66aec1..72b2a14 100644 --- a/buildVars.py +++ b/buildVars.py @@ -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"), diff --git a/changelog.txt b/changelog.txt index b08facf..3ed184e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -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