Skip to content

Commit 7e4d1fa

Browse files
committed
Remove support for <2025.1
1 parent 64a2f30 commit 7e4d1fa

File tree

2 files changed

+20
-33
lines changed

2 files changed

+20
-33
lines changed

addon/globalPlugins/rdAccess/diagnostics.py

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
rdPipe = addon.loadModule("lib.rdPipe")
2828
wtsVirtualChannel = addon.loadModule("lib.wtsVirtualChannel")
2929

30-
_supportsBrowseableMessageButtons = versionInfo.version_year >= 2025
31-
3230

3331
def dumpRegistryKey(
3432
hive,
@@ -123,14 +121,10 @@ def getDiagnosticsReport() -> str:
123121

124122

125123
def showDiagnosticsReport(_evt: wx.CommandEvent | None = None):
126-
kwargs = {
127-
"message": getDiagnosticsReport(),
124+
ui.browseableMessage(
125+
message=getDiagnosticsReport(),
128126
# Translators: Title of the diagnostics report dialog.
129-
"title": _("RDAccess Diagnostics"),
130-
}
131-
if _supportsBrowseableMessageButtons:
132-
kwargs.update(
133-
closeButton=True,
134-
copyButton=True,
135-
)
136-
ui.browseableMessage(**kwargs)
127+
title=_("RDAccess Diagnostics"),
128+
closeButton=True,
129+
copyButton=True,
130+
)

addon/globalPlugins/rdAccess/handlers/remoteBrailleHandler.py

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import braille
99
import brailleInput
1010
import inputCore
11-
import versionInfo
1211
from brailleViewer import postBrailleViewerToolToggledAction
1312
from hwIo import IoThread, intToByte
1413
from logHandler import log
@@ -24,9 +23,6 @@
2423
protocol = addon.loadModule("lib.protocol")
2524

2625

27-
_supportsDisplayDimensions = versionInfo.version_year >= 2025
28-
29-
3026
class RemoteBrailleHandler(RemoteHandler[braille.BrailleDisplayDriver]):
3127
driverType = protocol.DriverType.BRAILLE
3228
_queuedWrite: list[int] | None = None
@@ -57,21 +53,19 @@ def _outgoing_numCells(self, numCells=None) -> bytes:
5753
numCells = braille.handler.displaySize
5854
return intToByte(numCells)
5955

60-
if _supportsDisplayDimensions:
61-
62-
@protocol.attributeSender(protocol.BrailleAttribute.NUM_COLS)
63-
def _outgoing_numCols(self, numCols=None) -> bytes:
64-
if numCols is None:
65-
# Use the display dimensions of the local braille handler
66-
numCols = braille.handler.displayDimensions.numCols
67-
return intToByte(numCols)
56+
@protocol.attributeSender(protocol.BrailleAttribute.NUM_COLS)
57+
def _outgoing_numCols(self, numCols=None) -> bytes:
58+
if numCols is None:
59+
# Use the display dimensions of the local braille handler
60+
numCols = braille.handler.displayDimensions.numCols
61+
return intToByte(numCols)
6862

69-
@protocol.attributeSender(protocol.BrailleAttribute.NUM_ROWS)
70-
def _outgoing_numRows(self, numRows=None) -> bytes:
71-
if numRows is None:
72-
# Use the display dimensions of the local braille handler
73-
numRows = braille.handler.displayDimensions.numRows
74-
return intToByte(numRows)
63+
@protocol.attributeSender(protocol.BrailleAttribute.NUM_ROWS)
64+
def _outgoing_numRows(self, numRows=None) -> bytes:
65+
if numRows is None:
66+
# Use the display dimensions of the local braille handler
67+
numRows = braille.handler.displayDimensions.numRows
68+
return intToByte(numRows)
7569

7670
@protocol.attributeSender(protocol.BrailleAttribute.GESTURE_MAP)
7771
def _outgoing_gestureMap(self, gestureMap: inputCore.GlobalGestureMap | None = None) -> bytes:
@@ -138,9 +132,8 @@ def _handleDriverChanged(self, display: braille.BrailleDisplayDriver):
138132

139133
def _handleDisplayDimensionChanges(self):
140134
self._attributeSenderStore(protocol.BrailleAttribute.NUM_CELLS)
141-
if _supportsDisplayDimensions:
142-
self._attributeSenderStore(protocol.BrailleAttribute.NUM_COLS)
143-
self._attributeSenderStore(protocol.BrailleAttribute.NUM_ROWS)
135+
self._attributeSenderStore(protocol.BrailleAttribute.NUM_COLS)
136+
self._attributeSenderStore(protocol.BrailleAttribute.NUM_ROWS)
144137

145138
def _handleNotifications(self, connected: bool):
146139
if not braille.handler.enabled:

0 commit comments

Comments
 (0)