Skip to content

Commit a30119b

Browse files
authored
Merge 5580747 into 38a2efd
2 parents 38a2efd + 5580747 commit a30119b

1 file changed

Lines changed: 29 additions & 3 deletions

File tree

source/globalCommands.py

100644100755
Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# See the file COPYING for more details.
55
# Copyright (C) 2006-2021 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Rui Batista, Joseph Lee,
66
# Leonard de Ruijter, Derek Riemer, Babbage B.V., Davy Kager, Ethan Holliger, Łukasz Golonka, Accessolutions,
7-
# Julien Cochuyt
7+
# Julien Cochuyt, Jakub Lukowicz
88

99
import itertools
1010
from typing import Optional
@@ -382,8 +382,8 @@ def script_toggleSpeakCommandKeys(self,gesture):
382382

383383
@script(
384384
# Translators: Input help mode message for toggle report font name command.
385-
description=_("Toggles on and off the reporting of font changes"),
386-
category=SCRCAT_DOCUMENTFORMATTING
385+
description=_("Toggles on and off the reporting of font name changes"),
386+
category=SCRCAT_DOCUMENTFORMATTING,
387387
)
388388
def script_toggleReportFontName(self,gesture):
389389
if config.conf["documentFormatting"]["reportFontName"]:
@@ -699,6 +699,32 @@ def script_toggleReportTableCellCoords(self,gesture):
699699
config.conf["documentFormatting"]["reportTableCellCoords"]=True
700700
ui.message(state)
701701

702+
@script(
703+
# Translators: Input help mode message for toggle report cell borders command.
704+
description=_("Cycles through the cell border reporting settings"),
705+
category=SCRCAT_DOCUMENTFORMATTING,
706+
)
707+
def script_toggleReportCellBorders(self, gesture):
708+
if (
709+
not config.conf["documentFormatting"]["reportBorderStyle"] and
710+
not config.conf["documentFormatting"]["reportBorderColor"]
711+
):
712+
# Translators: A message reported when cycling through cell borders settings.
713+
ui.message(_("Report styles of cell borders"))
714+
config.conf["documentFormatting"]["reportBorderStyle"] = True
715+
elif (
716+
config.conf["documentFormatting"]["reportBorderStyle"] and
717+
not config.conf["documentFormatting"]["reportBorderColor"]
718+
):
719+
# Translators: A message reported when cycling through cell borders settings.
720+
ui.message(_("Report colors and styles of cell borders"))
721+
config.conf["documentFormatting"]["reportBorderColor"] = True
722+
else:
723+
# Translators: A message reported when cycling through cell borders settings.
724+
ui.message(_("Report cell borders off."))
725+
config.conf["documentFormatting"]["reportBorderStyle"] = False
726+
config.conf["documentFormatting"]["reportBorderColor"] = False
727+
702728
@script(
703729
# Translators: Input help mode message for toggle report links command.
704730
description=_("Toggles on and off the reporting of links"),

0 commit comments

Comments
 (0)