[orca] Add a specific setting for speaking the misspelled indicator



commit bca7afc3eaa4960247288864b9ae7cebfedeac06
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Wed Jan 20 11:56:21 2016 -0500

    Add a specific setting for speaking the misspelled indicator
    
    (Before it was based on verbosity level)

 help/C/preferences_speech.page |   13 +++++++++++++
 src/orca/orca-setup.ui         |   18 ++++++++++++++++++
 src/orca/orca_gui_prefs.py     |    2 ++
 src/orca/scripts/default.py    |    6 ++----
 src/orca/settings.py           |    2 ++
 5 files changed, 37 insertions(+), 4 deletions(-)
---
diff --git a/help/C/preferences_speech.page b/help/C/preferences_speech.page
index 3f189aa..0665970 100644
--- a/help/C/preferences_speech.page
+++ b/help/C/preferences_speech.page
@@ -232,5 +232,18 @@
         Default value: not checked
       </p>
     </section>
+    <section id="speak_misspelled_word_indicator">
+      <title>Speak misspelled-word indicator</title>
+      <p>
+        The misspelled-word indicator is the red squiggly line that appears
+        underneath misspelled words in editable text fields. If <gui>Speak
+        misspelled-word indicator</gui> is checked, when you navigate into
+        a word with this indicator, or type a word incorrectly causing this
+        indicator to appear, <app>Orca</app> will speak "misspelled."
+      </p>
+      <p>
+        Default value: checked
+      </p>
+    </section>
   </section>
 </page>
diff --git a/src/orca/orca-setup.ui b/src/orca/orca-setup.ui
index 35a6d81..846c7dc 100644
--- a/src/orca/orca-setup.ui
+++ b/src/orca/orca-setup.ui
@@ -1868,6 +1868,24 @@
                                         <property name="top_attach">4</property>
                                       </packing>
                                     </child>
+                                    <child>
+                                      <object class="GtkCheckButton" 
id="speakMisspelledIndicatorCheckButton">
+                                        <property name="label" translatable="yes" comments="Translators: The 
misspelled-word indicator is the red squiggly line that appears underneath misspelled words in editable text 
fields. If this setting is enabled, when a user first moves into a word with this indicator, or types a 
misspelled word causing this indicator to appear, Orca will announce that the word is misspelled.">Speak 
_misspelled-word indicator</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">5</property>
+                                      </packing>
+                                    </child>
                                   </object>
                                 </child>
                               </object>
diff --git a/src/orca/orca_gui_prefs.py b/src/orca/orca_gui_prefs.py
index ce47fce..3a5092f 100644
--- a/src/orca/orca_gui_prefs.py
+++ b/src/orca/orca_gui_prefs.py
@@ -1322,6 +1322,8 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
             prefs["enablePositionSpeaking"])
         self.get_widget("enableMnemonicSpeakingCheckButton").set_active(\
             prefs["enableMnemonicSpeaking"])
+        self.get_widget("speakMisspelledIndicatorCheckButton").set_active(
+            prefs.get("speakMisspelledIndicator", settings.speakMisspelledIndicator))
 
         enable = prefs.get("messagesAreDetailed", settings.messagesAreDetailed)
         self.get_widget("messagesAreDetailedCheckButton").set_active(enable)
diff --git a/src/orca/scripts/default.py b/src/orca/scripts/default.py
index 446fa39..2d11cfe 100644
--- a/src/orca/scripts/default.py
+++ b/src/orca/scripts/default.py
@@ -2520,8 +2520,7 @@ class Script(script.Script):
         - event: the Event
         """
 
-        verbosity = _settingsManager.getSetting('speechVerbosityLevel')
-        if verbosity == settings.VERBOSITY_LEVEL_VERBOSE \
+        if _settingsManager.getSetting('speakMisspelledIndicator') \
            and self.utilities.isSameObject(
                 event.source, orca_state.locusOfFocus):
             try:
@@ -3926,8 +3925,7 @@ class Script(script.Script):
           attributes.
         """
 
-        verbosity = _settingsManager.getSetting('speechVerbosityLevel')
-        if verbosity == settings.VERBOSITY_LEVEL_VERBOSE:
+        if _settingsManager.getSetting('speakMisspelledIndicator'):
             try:
                 text = obj.queryText()
             except:
diff --git a/src/orca/settings.py b/src/orca/settings.py
index bd5dabc..f30964e 100644
--- a/src/orca/settings.py
+++ b/src/orca/settings.py
@@ -77,6 +77,7 @@ userCustomizableSettings = [
     "speakBlankLines",
     "speakMultiCaseStringsAsWords",
     "speakNumbersAsDigits",
+    "speakMisspelledIndicator",
     "enabledSpokenTextAttributes",
     "enabledBrailledTextAttributes",
     "textAttributesBrailleIndicator",
@@ -214,6 +215,7 @@ speakCellHeaders             = True
 speakSpreadsheetCoordinates  = True
 speakMultiCaseStringsAsWords = False
 speakNumbersAsDigits         = False
+speakMisspelledIndicator     = True
 useColorNames                = True
 usePronunciationDictionary   = True
 sayAllStyle                  = SAYALL_STYLE_SENTENCE


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]