Skip to content

Commit c517cd8

Browse files
authored
Merge 77e55c3 into 12f27ac
2 parents 12f27ac + 77e55c3 commit c517cd8

1 file changed

Lines changed: 22 additions & 3 deletions

File tree

source/globalCommands.py

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# -*- coding: UTF-8 -*-
2-
#globalCommands.py
32
#A part of NonVisual Desktop Access (NVDA)
43
#This file is covered by the GNU General Public License.
54
#See the file COPYING for more details.
6-
#Copyright (C) 2006-2018 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Rui Batista, Joseph Lee, Leonard de Ruijter, Derek Riemer, Babbage B.V., Davy Kager, Ethan Holliger, Łukasz Golonka
5+
#Copyright (C) 2006-2019 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Rui Batista, Joseph Lee, Leonard de Ruijter, Derek Riemer, Babbage B.V., Davy Kager, Ethan Holliger, Łukasz Golonka, Jakub Lukowicz
76

87
import time
98
import itertools
@@ -327,7 +326,7 @@ def script_toggleReportFontName(self,gesture):
327326
config.conf["documentFormatting"]["reportFontName"]=True
328327
ui.message(state)
329328
# Translators: Input help mode message for toggle report font name command.
330-
script_toggleReportFontName.__doc__=_("Toggles on and off the reporting of font changes")
329+
script_toggleReportFontName.__doc__=_("Toggles on and off the reporting of font name changes")
331330
script_toggleReportFontName.category=SCRCAT_DOCUMENTFORMATTING
332331

333332
def script_toggleReportFontSize(self,gesture):
@@ -567,6 +566,26 @@ def script_toggleReportTableCellCoords(self,gesture):
567566
script_toggleReportTableCellCoords.__doc__=_("Toggles on and off the reporting of table cell coordinates")
568567
script_toggleReportTableCellCoords.category=SCRCAT_DOCUMENTFORMATTING
569568

569+
@script(
570+
# Translators: Input help mode message for toggle report cell borders command.
571+
description=_("Cycles through cell borders settings"),
572+
category=SCRCAT_DOCUMENTFORMATTING,
573+
)
574+
def script_toggleReportCellBorders(self, gesture):
575+
if not config.conf["documentFormatting"]["reportBorderStyle"] and not config.conf["documentFormatting"]["reportBorderColor"]:
576+
# Translators: A message reported when cycling through cell borders settings.
577+
ui.message(_("Report styles of cell borders"))
578+
config.conf["documentFormatting"]["reportBorderStyle"] = True
579+
elif config.conf["documentFormatting"]["reportBorderStyle"] and not config.conf["documentFormatting"]["reportBorderColor"]:
580+
# Translators: A message reported when cycling through cell borders settings.
581+
ui.message(_("Report colors and styles of cell borders"))
582+
config.conf["documentFormatting"]["reportBorderColor"] = True
583+
else:
584+
# Translators: A message reported when cycling through cell borders settings.
585+
ui.message(_("Report cell borders off."))
586+
config.conf["documentFormatting"]["reportBorderStyle"] = False
587+
config.conf["documentFormatting"]["reportBorderColor"] = False
588+
570589
def script_toggleReportLinks(self,gesture):
571590
if config.conf["documentFormatting"]["reportLinks"]:
572591
# Translators: The message announced when toggling the report links document formatting setting.

0 commit comments

Comments
 (0)