[orca] Add GUI to enable rewind/fast-forward and structural navigation in Say All
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Add GUI to enable rewind/fast-forward and structural navigation in Say All
- Date: Thu, 12 Nov 2015 06:34:55 +0000 (UTC)
commit 01fdd7a4fc0d88ac586c02f3b908b6b2018b8aa1
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Thu Nov 12 01:32:13 2015 -0500
Add GUI to enable rewind/fast-forward and structural navigation in Say All
help/C/preferences_general.page | 49 ++++++++++
help/C/preferences_voice.page | 11 --
src/orca/orca-setup.ui | 193 ++++++++++++++++++++++++++-------------
src/orca/orca_gui_prefs.py | 14 ++-
src/orca/settings.py | 4 +-
5 files changed, 190 insertions(+), 81 deletions(-)
---
diff --git a/help/C/preferences_general.page b/help/C/preferences_general.page
index 2c0c0de..7143779 100644
--- a/help/C/preferences_general.page
+++ b/help/C/preferences_general.page
@@ -88,6 +88,55 @@
Default value: use the system locale's format for each
</p>
</section>
+ <section id="navigation_in_say_all">
+ <info>
+ <desc>
+ Preferences dialog box options for enabling rewind, fast forward,
+ and structural navigation during Say All.
+ </desc>
+ </info>
+ <title>Navigation in Say All</title>
+ <p>
+ <app>Orca</app>'s Say All feature speaks document content from your
+ present location to the end of the document. By default, pressing any
+ key will interrupt Say All's presentation. However, if you check the
+ <gui>Enable rewind and fast forward in Say All</gui> checkbox,
+ <key>Up</key> and <key>Down</key> can be used during Say All to quickly
+ move within the document in order to re-hear something which was just
+ read or skip past text of no interest without having to restart Say All.
+ </p>
+ <p>
+ If you are reading a document within an application that has structural
+ navigation support, and you have checked the <gui>Enable structural navigation
+ in Say All</gui> checkbox, you can use the supported structural navigation
+ commands in a similar fashion: <key>H</key>/<keyseq><key>Shift</key>
+ <key>H</key></keyseq> continues reading from the next/previous heading,
+ <key>P</key>/<keyseq><key>Shift</key><key>P</key></keyseq> continues reading
+ from the next/previous paragraph, <key>T</key>/<keyseq><key>Shift</key>
+ <key>T</key></keyseq> continues reading from the next/previous table, and
+ so on.
+ </p>
+ <p>
+ Default value: not checked
+ </p>
+ </section>
+ <section id="say_all_by">
+ <info>
+ <desc>
+ Preferences dialog box option for customizing <app>Orca</app>'s
+ Say All presentation.
+ </desc>
+ </info>
+ <title>Say All By</title>
+ <p>
+ The <gui>Say All By</gui> combo box allows you to specify whether
+ <app>Orca</app> speaks a sentence at a time or a line at a time when
+ doing a "Say All" of a document.
+ </p>
+ <p>
+ Default value: <gui>Sentence</gui>
+ </p>
+ </section>
<section id="profiles">
<info>
<desc>
diff --git a/help/C/preferences_voice.page b/help/C/preferences_voice.page
index d8957e5..f2c6922 100644
--- a/help/C/preferences_voice.page
+++ b/help/C/preferences_voice.page
@@ -109,16 +109,5 @@
Default value: not checked
</p>
</section>
- <section id="say_all_by">
- <title>Say All By</title>
- <p>
- The <gui>Say All By</gui> combo box allows you to specify whether
- <app>Orca</app> speaks a sentence at a time or a line at a time when
- doing a "Say All" of a document.
- </p>
- <p>
- Default value: <gui>Sentence</gui>
- </p>
- </section>
</section>
</page>
diff --git a/src/orca/orca-setup.ui b/src/orca/orca-setup.ui
index 7a754e8..451c3a8 100644
--- a/src/orca/orca-setup.ui
+++ b/src/orca/orca-setup.ui
@@ -531,6 +531,76 @@
</packing>
</child>
<child>
+ <object class="GtkFrame" id="mouseFrame">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="mouseAlignment">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkGrid" id="mouseGrid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkCheckButton" id="presentToolTipsCheckButton">
+ <property name="label" translatable="yes">_Present tooltips</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="checkButtonToggled" swapped="no"/>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="enableMouseReviewCheckButton">
+ <property name="label" translatable="yes">Speak object under
mo_use</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="checkButtonToggled" swapped="no"/>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="mouseLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Mouse</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkFrame" id="timeAndDateFrame">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -642,29 +712,29 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">3</property>
+ <property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkFrame" id="mouseFrame">
+ <object class="GtkFrame" id="sayAllFrame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <object class="GtkAlignment" id="mouseAlignment">
+ <object class="GtkAlignment" id="sayAllAlignment">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<child>
- <object class="GtkGrid" id="mouseGrid">
+ <object class="GtkGrid" id="sayAllGrid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <object class="GtkCheckButton" id="presentToolTipsCheckButton">
- <property name="label" translatable="yes">_Present tooltips</property>
+ <object class="GtkCheckButton" id="rewindAndFastForwardInSayAllCheckButton">
+ <property name="label" translatable="yes" comments="Translators: Orca has a
'Say All' feature which speaks the entire document. Normally, pressing any key will interrupt Say All's
presentation. However, if 'rewind and fast forward' is enabled, Up Arrow and Down Arrow can be used within
Say All to quickly move within the document to re-hear something which was just read or skip past something
of no interest.">Enable _rewind and fast forward in Say All</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -682,8 +752,8 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="enableMouseReviewCheckButton">
- <property name="label" translatable="yes">Speak object under
mo_use</property>
+ <object class="GtkCheckButton" id="structNavInSayAllCheckButton">
+ <property name="label" translatable="yes" comments="Translators: Orca has a
'Say All' feature which speaks the entire document. Normally, pressing any key will interrupt Say All's
presentation. However, if 'structural navigation' is enabled for Say All, users can use commands such as
H/Shift+H to jump to the next/previous heading, P/Shift+P to jump to the next/previous paragraph, T/Shift+T
to jump to the next/previous table, and so on. Thus this setting is like fast forward and rewind, but with
semantic awareness for web documents and similar content.">Enable _structural navigation in Say All</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -701,15 +771,63 @@
<property name="height">1</property>
</packing>
</child>
+ <child>
+ <object class="GtkGrid" id="sayAllStyleGrid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="row_spacing">20</property>
+ <property name="column_spacing">20</property>
+ <child>
+ <object class="GtkLabel" id="sayAllStyleLabel">
+ <property name="name">-`</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes" comments="Translators: Say all
by refers to the way that Orca will say (speak) an amount of text -- in particular, where Orca where insert
pauses. There are currently two choices (supplied by a combo box to the right of this label): say all by
sentence and say all by line. If Orca were speaking a work of fiction, it's probably best to do say all by
sentence so it sound more natural. If Orca were speaking something like a page of computer commands, doing a
say all by line would work better.">Say All B_y:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">sayAllStyle</property>
+ <property name="xalign">0</property>
+ <accessibility>
+ <relation type="label-for" target="sayAllStyle"/>
+ </accessibility>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="sayAllStyle">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="model">model2</property>
+ <signal name="changed" handler="sayAllStyleChanged" swapped="no"/>
+ <child>
+ <object class="GtkCellRendererText" id="renderer2"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ </packing>
+ </child>
</object>
</child>
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="mouseLabel">
+ <object class="GtkLabel" id="sayAllLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Mouse</property>
+ <property name="label" translatable="yes">Say All</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
@@ -718,7 +836,7 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="top_attach">3</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
@@ -1084,61 +1202,10 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkGrid" id="sayAllGrid">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">12</property>
- <child>
- <object class="GtkLabel" id="sayAllLabel">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes" comments="Translators: Say all
by refers to the way that Orca will say (speak) an amount of text -- in particular, where Orca where insert
pauses. There are currently two choices (supplied by a combo box to the right of this label): say all by
sentence and say all by line. If Orca were speaking a work of fiction, it's probably best to do say all by
sentence so it sound more natural. If Orca were speaking something like a page of computer commands, doing a
say all by line would work better.">Say All B_y:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">sayAllStyle</property>
- <accessibility>
- <relation type="label-for" target="sayAllStyle"/>
- </accessibility>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="sayAllStyle">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="model">model2</property>
- <signal name="changed" handler="sayAllStyleChanged" swapped="no"/>
- <child>
- <object class="GtkCellRendererText" id="renderer2"/>
- <attributes>
- <attribute name="text">0</attribute>
- </attributes>
- </child>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
+ <placeholder/>
</child>
</object>
</child>
diff --git a/src/orca/orca_gui_prefs.py b/src/orca/orca_gui_prefs.py
index b33315f..aaa68fb 100644
--- a/src/orca/orca_gui_prefs.py
+++ b/src/orca/orca_gui_prefs.py
@@ -1334,11 +1334,6 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
enable = prefs.get("useColorNames", settings.useColorNames)
self.get_widget("useColorNamesCheckButton").set_active(enable)
- combobox = self.get_widget("sayAllStyle")
- self.populateComboBox(combobox, [guilabels.SAY_ALL_STYLE_LINE,
- guilabels.SAY_ALL_STYLE_SENTENCE])
- combobox.set_active(prefs["sayAllStyle"])
-
combobox2 = self.get_widget("dateFormatCombo")
sdtime = time.strftime
ltime = time.localtime
@@ -1583,6 +1578,15 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
else:
self.get_widget("generalLaptopButton").set_active(True)
+ combobox = self.get_widget("sayAllStyle")
+ self.populateComboBox(combobox, [guilabels.SAY_ALL_STYLE_LINE,
+ guilabels.SAY_ALL_STYLE_SENTENCE])
+ combobox.set_active(prefs["sayAllStyle"])
+ self.get_widget("rewindAndFastForwardInSayAllCheckButton").set_active(
+ prefs.get("rewindAndFastForwardInSayAll", settings.rewindAndFastForwardInSayAll))
+ self.get_widget("structNavInSayAllCheckButton").set_active(
+ prefs.get("structNavInSayAll", settings.structNavInSayAll))
+
# Orca User Profiles
#
self.profilesCombo = self.get_widget('availableProfilesComboBox1')
diff --git a/src/orca/settings.py b/src/orca/settings.py
index 7626833..a75a58c 100644
--- a/src/orca/settings.py
+++ b/src/orca/settings.py
@@ -116,6 +116,8 @@ userCustomizableSettings = [
"structNavTriggersFocusMode",
"caretNavTriggersFocusMode",
"layoutMode",
+ "rewindAndFastForwardInSayAll",
+ "structNavInSayAll"
]
GENERAL_KEYBOARD_LAYOUT_DESKTOP = 1
@@ -356,7 +358,5 @@ caretNavTriggersFocusMode = False
layoutMode = True
-# NOTE: The following are experimental and may be changed or removed at
-# any time
rewindAndFastForwardInSayAll = False
structNavInSayAll = False
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]