Skip to content

Commit ea28de4

Browse files
authored
Merge 525abc5 into c4d6fb5
2 parents c4d6fb5 + 525abc5 commit ea28de4

1 file changed

Lines changed: 30 additions & 4 deletions

File tree

source/globalCommands.py

100644100755
Lines changed: 30 additions & 4 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 time
1010
import itertools
@@ -385,13 +385,13 @@ def script_toggleSpeakCommandKeys(self,gesture):
385385

386386
@script(
387387
# Translators: Input help mode message for toggle report font name command.
388-
description=_("Toggles on and off the reporting of font changes"),
389-
category=SCRCAT_DOCUMENTFORMATTING
388+
description=_("Toggles on and off the reporting of font name changes"),
389+
category=SCRCAT_DOCUMENTFORMATTING,
390390
)
391391
def script_toggleReportFontName(self,gesture):
392392
if config.conf["documentFormatting"]["reportFontName"]:
393-
# Translators: The message announced when toggling the report font name document formatting setting.
394393
state = _("report font name off")
394+
# Translators: The message announced when toggling the report font name document formatting setting.
395395
config.conf["documentFormatting"]["reportFontName"]=False
396396
else:
397397
# Translators: The message announced when toggling the report font name document formatting setting.
@@ -702,6 +702,32 @@ def script_toggleReportTableCellCoords(self,gesture):
702702
config.conf["documentFormatting"]["reportTableCellCoords"]=True
703703
ui.message(state)
704704

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

0 commit comments

Comments
 (0)