[orca] Make the use of color names configurable via GUI



commit 4f3cedae7a1c0644c32df1d1e712f7cb1b4469aa
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Wed Nov 11 22:33:10 2015 -0500

    Make the use of color names configurable via GUI

 help/C/preferences_speech.page |   12 ++++++++++++
 src/orca/orca-setup.ui         |   18 ++++++++++++++++++
 src/orca/orca_gui_prefs.py     |    3 +++
 3 files changed, 33 insertions(+), 0 deletions(-)
---
diff --git a/help/C/preferences_speech.page b/help/C/preferences_speech.page
index 9c6c9a0..9928d46 100644
--- a/help/C/preferences_speech.page
+++ b/help/C/preferences_speech.page
@@ -203,6 +203,18 @@
         Default value: checked
       </p>
     </section>
+    <section id="speak_colors_as_names">
+      <title>Speak colors as names</title>
+      <p>
+        If <gui>Speak colors as names</gui> is checked, <app>Orca</app> will
+        describe colors, looking for the closest approximate. For instance,
+        RGB 0, 27, 51 would be spoken as "midnight blue." If you would prefer
+        to hear the exact RGB value, you should uncheck this checkbox.
+      </p>
+      <p>
+        Default value: checked
+      </p>
+    </section>
   </section>
   <section id="progress_bar_updates">
     <title>Progress Bar Updates</title>
diff --git a/src/orca/orca-setup.ui b/src/orca/orca-setup.ui
index 38d9338..7a754e8 100644
--- a/src/orca/orca-setup.ui
+++ b/src/orca/orca-setup.ui
@@ -1657,6 +1657,24 @@
                                             <property name="top_attach">5</property>
                                           </packing>
                                         </child>
+                                        <child>
+                                          <object class="GtkCheckButton" id="useColorNamesCheckButton">
+                                            <property name="label" translatable="yes" comments="Translators: 
Orca has a command to present font and formatting information, including foreground and background color. The 
setting associated with this checkbox determines how Orca will speak colors: As rgb values or as names (e.g. 
'light blue').">S_peak colors as names</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">6</property>
+                                          </packing>
+                                        </child>
                                       </object>
                                       <packing>
                                         <property name="left_attach">0</property>
diff --git a/src/orca/orca_gui_prefs.py b/src/orca/orca_gui_prefs.py
index ac911b6..b33315f 100644
--- a/src/orca/orca_gui_prefs.py
+++ b/src/orca/orca_gui_prefs.py
@@ -1331,6 +1331,9 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
         enable = prefs.get("messagesAreDetailed", settings.messagesAreDetailed)
         self.get_widget("messagesAreDetailedCheckButton").set_active(enable)
 
+        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])


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