|
4 | 4 | # See the file COPYING for more details. |
5 | 5 | # Copyright (C) 2006-2021 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Rui Batista, Joseph Lee, |
6 | 6 | # Leonard de Ruijter, Derek Riemer, Babbage B.V., Davy Kager, Ethan Holliger, Łukasz Golonka, Accessolutions, |
7 | | -# Julien Cochuyt |
| 7 | +# Julien Cochuyt, Jakub Lukowicz |
8 | 8 |
|
9 | 9 | import itertools |
10 | 10 | from typing import Optional |
@@ -382,8 +382,8 @@ def script_toggleSpeakCommandKeys(self,gesture): |
382 | 382 |
|
383 | 383 | @script( |
384 | 384 | # 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, |
387 | 387 | ) |
388 | 388 | def script_toggleReportFontName(self,gesture): |
389 | 389 | if config.conf["documentFormatting"]["reportFontName"]: |
@@ -699,6 +699,32 @@ def script_toggleReportTableCellCoords(self,gesture): |
699 | 699 | config.conf["documentFormatting"]["reportTableCellCoords"]=True |
700 | 700 | ui.message(state) |
701 | 701 |
|
| 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 | + |
702 | 728 | @script( |
703 | 729 | # Translators: Input help mode message for toggle report links command. |
704 | 730 | description=_("Toggles on and off the reporting of links"), |
|
0 commit comments