Skip to content

Commit

Permalink
fix restore and generally addon working now
Browse files Browse the repository at this point in the history
  • Loading branch information
C-Loftus committed Jan 25, 2024
1 parent fbed971 commit 0f293d0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 83 deletions.
6 changes: 3 additions & 3 deletions core/addon_communication/ipc_client.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from talon import Module, Context, actions
from talon import Module, Context, actions, settings
import os, ipaddress, json, socket
from .ipc_helpers import Mutex
import threading
Expand Down Expand Up @@ -55,7 +55,6 @@ def send_ipc_command(command: str):
if command not in valid_commands:
raise ValueError(f"Invalid NVDA IPC command: '{command}'")


with lock:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.settimeout(0.1)
Expand All @@ -68,7 +67,8 @@ def send_ipc_command(command: str):
# We don't want to execute commands until
# we know the screen reader has the proper settings
response = sock.recv(1024)
print('Received', repr(response))
if settings.get("user.addon_debug"):
print('Received', repr(response))
except socket.timeout:
print("NVDA Connection timed out")
except:
Expand Down
4 changes: 4 additions & 0 deletions core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@
default=True
)

mod.setting("addon_debug",
type=bool,
default=False
)

# mod.mode("strict_dictation", desc="Dictation mode with only a subset of dictation commands")
# mod.mode('strict_command', desc='Command mode with only a subset of command commands')
80 changes: 0 additions & 80 deletions nvda/.addOn/nvda-addon.py

This file was deleted.

0 comments on commit 0f293d0

Please sign in to comment.