Repository navigation
Add ability to report start of paragraphs in braille #16906
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 6 commits
b0c873a
ea9d8ad
b4becef
6a3ee72
4586a5b
646c35b
3c5be80
a8cfc6e
a3f9061
53c19b1
0d9400b
23c017a
990c306
37e2ded
ccc751a
c3ed9ef
078d83c
77383c6
fa0e88d
9650792
d2c220a
da68eb8
e6ade9c
c09f806
7a4b136
c497e7b
7452253
44c0aac
367b849
a57cda1
c473f76
ff00e8c
7d17001
1310ffd
b80005d
e1d6241
40b6ebf
9c5d601
f7a5229
16de62c
955a6be
cc84855
3c0ec10
69ba267
5a7e57e
a6c1215
a5d351d
43f9ee4
36e2797
f3109bc
701ba49
a46c3cd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4363,8 +4363,22 @@ def makeSettings(self, settingsSizer): | |
| wx.CheckBox(self.followCursorGroupBox, label=readByParagraphText), | ||
| ) | ||
| self.bindHelpEvent("BrailleSettingsReadByParagraph", self.readByParagraphCheckBox) | ||
| self.readByParagraphCheckBox.Bind(wx.EVT_CHECKBOX, self.onReadByParagraphChange) | ||
| self.readByParagraphCheckBox.Value = config.conf["braille"]["readByParagraph"] | ||
|
|
||
| self.showParagraphStartCombo: nvdaControls.FeatureFlagCombo = followCursorGroupHelper.addLabeledControl( | ||
| labelText=_( | ||
| # Translators: This is a label for a combo-box in the Braille settings panel to select if start of paragraphs will be reported in braille. | ||
| "Show para&graph start", | ||
| ), | ||
| wxCtrlClass=nvdaControls.FeatureFlagCombo, | ||
| keyPath=["braille", "showParagraphStart"], | ||
| conf=config.conf, | ||
| ) | ||
| self.bindHelpEvent("BrailleSettingsShowParagraphStart", self.showParagraphStartCombo) | ||
| if not self.readByParagraphCheckBox.GetValue(): | ||
| self.showParagraphStartCombo.Disable() | ||
|
|
||
| # Translators: The label for a setting in braille settings to select how the context for the focus object should be presented on a braille display. | ||
| focusContextPresentationLabelText = _("Focus context presentation:") | ||
| self.focusContextPresentationValues = [x[0] for x in braille.focusContextPresentations] | ||
|
|
@@ -4459,6 +4473,7 @@ def onSave(self): | |
| braille.handler.setTether(tetherChoice, auto=False) | ||
| self.brailleReviewRoutingMovesSystemCaretCombo.saveCurrentValueToConf() | ||
| config.conf["braille"]["readByParagraph"] = self.readByParagraphCheckBox.Value | ||
| self.showParagraphStartCombo.saveCurrentValueToConf() | ||
| config.conf["braille"]["wordWrap"] = self.wordWrapCheckBox.Value | ||
| self.unicodeNormalizationCombo.saveCurrentValueToConf() | ||
| config.conf["braille"]["focusContextPresentation"] = self.focusContextPresentationValues[ | ||
|
|
@@ -4484,6 +4499,9 @@ def onTetherToChange(self, evt: wx.CommandEvent) -> None: | |
| tetherChoice = [x.value for x in TetherTo][evt.GetSelection()] | ||
| self.brailleReviewRoutingMovesSystemCaretCombo.Enable(tetherChoice != TetherTo.FOCUS.value) | ||
|
|
||
| def onReadByParagraphChange(self, evt): | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please add a type for event |
||
| self.showParagraphStartCombo.Enable(evt.IsChecked()) | ||
|
|
||
| def _onModeChange(self, evt: wx.CommandEvent): | ||
| self.followCursorGroupBox.Enable(not evt.GetSelection()) | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2163,6 +2163,10 @@ This means that you do not have to scroll the display at the end of each line ev | |||||
| This may allow for more fluent reading of large amounts of text. | ||||||
| It is disabled by default. | ||||||
|
|
||||||
| ##### Show paragraphs start {#BrailleSettingsShowParagraphStart} | ||||||
|
nvdaes marked this conversation as resolved.
Resolved
|
||||||
|
|
||||||
|
nvdaes marked this conversation as resolved.
Resolved
|
||||||
| - If enabled and "Read by paragraph" is checked, two spaces will be displayed to indicate the start of a paragraph. | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Moreover, it would be worth rephrasing this paragraph with a bit more details. But I am not familiar with "Read by paragraph" option and will not be able to test on a braille display before next week, so I won't be able to make a detailed suggestion. Maybe something like the following (to be adapted and polished): |
||||||
|
|
||||||
| ##### Avoid splitting words when possible {#BrailleSettingsWordWrap} | ||||||
|
|
||||||
| If this is enabled, a word which is too large to fit at the end of the braille display will not be split. | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.