|
1 | 1 | # -*- coding: UTF-8 -*- |
2 | | -#globalCommands.py |
3 | 2 | #A part of NonVisual Desktop Access (NVDA) |
4 | 3 | #This file is covered by the GNU General Public License. |
5 | 4 | #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 |
7 | 6 |
|
8 | 7 | import time |
9 | 8 | import itertools |
@@ -327,7 +326,7 @@ def script_toggleReportFontName(self,gesture): |
327 | 326 | config.conf["documentFormatting"]["reportFontName"]=True |
328 | 327 | ui.message(state) |
329 | 328 | # 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") |
331 | 330 | script_toggleReportFontName.category=SCRCAT_DOCUMENTFORMATTING |
332 | 331 |
|
333 | 332 | def script_toggleReportFontSize(self,gesture): |
@@ -567,6 +566,26 @@ def script_toggleReportTableCellCoords(self,gesture): |
567 | 566 | script_toggleReportTableCellCoords.__doc__=_("Toggles on and off the reporting of table cell coordinates") |
568 | 567 | script_toggleReportTableCellCoords.category=SCRCAT_DOCUMENTFORMATTING |
569 | 568 |
|
| 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 | + |
570 | 589 | def script_toggleReportLinks(self,gesture): |
571 | 590 | if config.conf["documentFormatting"]["reportLinks"]: |
572 | 591 | # Translators: The message announced when toggling the report links document formatting setting. |
|
0 commit comments