Skip to content

Commit

Permalink
nvda 2019.3 compatibility, version 2.0, addon template switching, win…
Browse files Browse the repository at this point in the history
…scp support, some other minor fixes
  • Loading branch information
ilyapashuk committed Aug 14, 2020
1 parent 9efa67e commit bedcf20
Show file tree
Hide file tree
Showing 32 changed files with 345 additions and 198 deletions.
6 changes: 4 additions & 2 deletions codes/addon/appModules/7zfm.py → addon/appModules/7zfm.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
import controlTypes
import appModuleHandler
import api
import data
loc = os.path.abspath(os.path.dirname(data.__file__))

moduleDir = os.path.dirname(__file__)
loc = os.path.join(moduleDir, "data")


def play(name):
ft = os.path.splitext(name)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
__metaclass__ = type
import os
import winsound
import controlTypes
from nvdaBuiltin.appModules import explorer
import api
import data
loc = os.path.abspath(os.path.dirname(data.__file__))
moduleDir = os.path.dirname(__file__)
loc = os.path.join(moduleDir, "data")



Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
__metaclass__ = type
import os
import winsound
import controlTypes
from nvdaBuiltin.appModules import totalcmd
import api
import data
loc = os.path.abspath(os.path.dirname(data.__file__))


moduleDir = os.path.dirname(__file__)
loc = os.path.join(moduleDir, "data")




Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
import controlTypes
import appModuleHandler
import api
import data
loc = os.path.abspath(os.path.dirname(data.__file__))

moduleDir = os.path.dirname(__file__)
loc = os.path.join(moduleDir, "data")


def play(name):
ft = os.path.splitext(name)
Expand Down
24 changes: 24 additions & 0 deletions addon/appModules/winscp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import os
import winsound
import controlTypes
import appModuleHandler
import api

moduleDir = os.path.dirname(__file__)
loc = os.path.join(moduleDir, "data")


def play(name):
ft = os.path.splitext(name)
fe = ft[1][1:]
f = os.path.join(loc, fe + '.wav')
if os.path.exists(f):
winsound.PlaySound(f, winsound.SND_ASYNC)


class AppModule(appModuleHandler.AppModule):
def event_gainFocus(self, obj, nextHandler):
if obj.role == controlTypes.ROLE_LISTITEM:
play(obj.name)
nextHandler()

File renamed without changes.
49 changes: 49 additions & 0 deletions buildVars.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# -*- coding: UTF-8 -*-

# Build customizations
# Change this file instead of sconstruct or manifest files, whenever possible.

# Full getext (please don't change)
_ = lambda x: x

# Add-on information variables
addon_info = {
# 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": "soundfile",
# 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": _("sounds by navigation on files"),
# Add-on description
# Translators: Long description to be shown for this add-on on add-on information from add-ons manager
"addon_description": _("plays sounds by navigation on files in file manager depends on file extensions"),
# version
"addon_version": "2.0",
# Author(s)
"addon_author": "ilyapashuk",
# URL for the add-on documentation support
"addon_url": "https://github.com/ilyapashuk/SoundFile-nvda-addon",
# Documentation file name
"addon_docFileName": None,
# Minimum NVDA version supported (e.g. "2018.3.0", minor version is optional)
"addon_minimumNVDAVersion": "2019.3",
# Last NVDA version supported/tested (e.g. "2018.4.0", ideally more recent than minimum version)
"addon_lastTestedNVDAVersion": "2020.2",
# Add-on update channel (default is None, denoting stable releases, and for development releases, use "dev"; do not change unless you know what you are doing)
"addon_updateChannel": None,
}


import os.path

# Define the python files that are the sources of your add-on.
# You can use glob expressions here, they will be expanded.
pythonSources = ["addon/appModules/explorer.py","addon/appModules/7zfm.py","addon/appModules/totalcmd.py","addon/appModules/winrar.py", "addon/appModules/winscp.py"]

# Files that contain strings for translation. Usually your python sources
i18nSources = pythonSources + ["buildVars.py"]

# Files that will be ignored when building the nvda-addon file
# Paths are relative to the addon directory, not to the root directory of your addon sources.
excludedFiles = []
Empty file.
34 changes: 0 additions & 34 deletions codes/buildVars.py

This file was deleted.

2 changes: 0 additions & 2 deletions codes/manifest-translated.ini.tpl

This file was deleted.

6 changes: 0 additions & 6 deletions codes/manifest.ini.tpl

This file was deleted.

114 changes: 0 additions & 114 deletions codes/sconstruct

This file was deleted.

32 changes: 0 additions & 32 deletions codes/soundfile.pot

This file was deleted.

2 changes: 2 additions & 0 deletions manifest-translated.ini.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
summary = "{addon_summary}"
description = """{addon_description}"""
10 changes: 10 additions & 0 deletions manifest.ini.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name = {addon_name}
summary = "{addon_summary}"
description = """{addon_description}"""
author = "{addon_author}"
url = {addon_url}
version = {addon_version}
docFileName = {addon_docFileName}
minimumNVDAVersion = {addon_minimumNVDAVersion}
lastTestedNVDAVersion = {addon_lastTestedNVDAVersion}
updateChannel = {addon_updateChannel}
Loading

1 comment on commit bedcf20

@Biromir
Copy link

@Biromir Biromir commented on bedcf20 Mar 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,
Only works for explorer.exe :(
Can you make it work in FileZilla?
Regards

Please sign in to comment.