[orca] Fix for bgo#621000 - GtkCheckbuttons that simply change prefsDict can be handled by one handler.



commit 1c636687ac89455b2d67ce329f2946f743d62857
Author: Mesar Hameed <mhameed src gnome org>
Date:   Sun Jun 13 13:28:05 2010 +0100

    Fix for bgo#621000 - GtkCheckbuttons that simply change prefsDict can be handled by one handler.

 src/orca/orca-setup.ui     |  100 ++++++------
 src/orca/orca_gui_prefs.py |  362 +++++++-------------------------------------
 2 files changed, 103 insertions(+), 359 deletions(-)
---
diff --git a/src/orca/orca-setup.ui b/src/orca/orca-setup.ui
index 5af2bff..942babb 100644
--- a/src/orca/orca-setup.ui
+++ b/src/orca/orca-setup.ui
@@ -319,14 +319,14 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkCheckButton" id="confirmQuitCheckButton">
+                      <object class="GtkCheckButton" id="quitOrcaNoConfirmationCheckButton">
                         <property name="label" translatable="yes">Quit Orca _without confirmation</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="draw_indicator">True</property>
-                        <signal name="toggled" handler="confirmQuitChecked"/>
+                        <signal name="toggled" handler="checkButtonToggled"/>
                       </object>
                       <packing>
                         <property name="expand">False</property>
@@ -375,7 +375,7 @@
                         <property name="use_underline">True</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
-                        <signal name="toggled" handler="showMainWindowChecked"/>
+                        <signal name="toggled" handler="checkButtonToggled"/>
                       </object>
                       <packing>
                         <property name="expand">False</property>
@@ -384,7 +384,7 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkCheckButton" id="autostartOrcaCheckbutton">
+                      <object class="GtkCheckButton" id="autostartOrcaCheckButton">
                         <property name="label" translatable="yes">Start Orca when you lo_gin</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
@@ -400,7 +400,7 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkCheckButton" id="speakUnderMouseCheckButton">
+                      <object class="GtkCheckButton" id="enableMouseReviewCheckButton">
                         <property name="label" translatable="yes">Speak object under mo_use</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
@@ -408,7 +408,7 @@
                         <property name="use_underline">True</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
-                        <signal name="toggled" handler="speakUnderMouseChecked"/>
+                        <signal name="toggled" handler="checkButtonToggled"/>
                       </object>
                       <packing>
                         <property name="expand">False</property>
@@ -433,7 +433,7 @@
                     <property name="border_width">12</property>
                     <property name="orientation">vertical</property>
                     <child>
-                      <object class="GtkCheckButton" id="speechSupportCheckbutton">
+                      <object class="GtkCheckButton" id="speechSupportCheckButton">
                         <property name="label" translatable="yes">_Enable speech</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
@@ -1000,7 +1000,7 @@
                                                     <property name="yscale">0</property>
                                                     <property name="top_padding">3</property>
                                                     <child>
-                                                      <object class="GtkCheckButton" id="speechProgressBarCheckbutton">
+                                                      <object class="GtkCheckButton" id="speechProgressBarCheckButton">
                                                         <property name="label" translatable="yes" context="ProgressBarUpdates" comments="Translators: This is an option in the Preferences dialog box related to the speaking of progress bar information. If checked, Orca will speak progress bar information.">Enable_d</property>
                                                         <property name="visible">True</property>
                                                         <property name="can_focus">True</property>
@@ -1164,18 +1164,18 @@
                                 <property name="use_underline">True</property>
                                 <property name="active">True</property>
                                 <property name="draw_indicator">True</property>
-                                <signal name="toggled" handler="speakBlankLinesChecked"/>
+                                <signal name="toggled" handler="checkButtonToggled"/>
                               </object>
                             </child>
                             <child>
-                              <object class="GtkCheckButton" id="speechIndentationCheckbutton">
+                              <object class="GtkCheckButton" id="enableSpeechIndentationCheckButton">
                                 <property name="label" translatable="yes">Speak _indentation and justification</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="draw_indicator">True</property>
-                                <signal name="toggled" handler="speechIndentationChecked"/>
+                                <signal name="toggled" handler="checkButtonToggled"/>
                               </object>
                               <packing>
                                 <property name="left_attach">1</property>
@@ -1183,7 +1183,7 @@
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkCheckButton" id="speakMnemonicsCheckButton">
+                              <object class="GtkCheckButton" id="enableMnemonicSpeakingCheckButton">
                                 <property name="label" translatable="yes">Spea_k object mnemonics</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
@@ -1191,7 +1191,7 @@
                                 <property name="use_underline">True</property>
                                 <property name="active">True</property>
                                 <property name="draw_indicator">True</property>
-                                <signal name="toggled" handler="mnemonicSpeakingChecked"/>
+                                <signal name="toggled" handler="checkButtonToggled"/>
                               </object>
                               <packing>
                                 <property name="left_attach">1</property>
@@ -1201,7 +1201,7 @@
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkCheckButton" id="speakTutorialMessagesCheckButton">
+                              <object class="GtkCheckButton" id="enableTutorialMessagesCheckButton">
                                 <property name="label" translatable="yes">Speak tutorial messages</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
@@ -1209,7 +1209,7 @@
                                 <property name="use_underline">True</property>
                                 <property name="active">True</property>
                                 <property name="draw_indicator">True</property>
-                                <signal name="toggled" handler="speakTutorialMessagesToggled"/>
+                                <signal name="toggled" handler="checkButtonToggled"/>
                               </object>
                               <packing>
                                 <property name="top_attach">2</property>
@@ -1217,7 +1217,7 @@
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkCheckButton" id="speakPositionCheckButton">
+                              <object class="GtkCheckButton" id="enablePositionSpeakingCheckButton">
                                 <property name="label" translatable="yes" comments="Translators: This checkbox toggles whether or not Orca says the child position (e.g., 'item 6 of 7').">Speak child p_osition</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
@@ -1225,7 +1225,7 @@
                                 <property name="use_underline">True</property>
                                 <property name="active">True</property>
                                 <property name="draw_indicator">True</property>
-                                <signal name="toggled" handler="speakPositionToggled"/>
+                                <signal name="toggled" handler="checkButtonToggled"/>
                               </object>
                               <packing>
                                 <property name="left_attach">1</property>
@@ -1235,7 +1235,7 @@
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkCheckButton" id="speakMultiCaseAsWordsCheckButton">
+                              <object class="GtkCheckButton" id="speakMultiCaseStringsAsWordsCheckButton">
                                 <property name="label" translatable="yes" comments="Translators: multicase strings are StringsWithWordsMashedTogetherLikeThis.">Speak multicase strings as wor_ds</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
@@ -1243,7 +1243,7 @@
                                 <property name="use_underline">True</property>
                                 <property name="active">True</property>
                                 <property name="draw_indicator">True</property>
-                                <signal name="toggled" handler="speakMultiCaseStringsToggled"/>
+                                <signal name="toggled" handler="checkButtonToggled"/>
                               </object>
                               <packing>
                                 <property name="top_attach">1</property>
@@ -1251,7 +1251,7 @@
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkCheckButton" id="pauseBreaksCheckButton">
+                              <object class="GtkCheckButton" id="enablePauseBreaksCheckButton">
                                 <property name="label" translatable="yes" comments="Translators: different speech systems and speech engines work differently when it comes to handling pauses (e.g., sentence boundaries).  This property allows the user to specify whether speech should be sent to the speech synthesis system immediately when a pause directive is enountered or if it should be queued up and sent to the speech synthesis system once the entire set of utterances has been calculated.">Break speech into ch_unks between pauses</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
@@ -1259,7 +1259,7 @@
                                 <property name="use_underline">True</property>
                                 <property name="active">True</property>
                                 <property name="draw_indicator">True</property>
-                                <signal name="toggled" handler="pauseBreaksToggled"/>
+                                <signal name="toggled" handler="checkButtonToggled"/>
                               </object>
                               <packing>
                                 <property name="top_attach">3</property>
@@ -1363,7 +1363,7 @@
                             <property name="visible">True</property>
                             <property name="orientation">vertical</property>
                             <child>
-                              <object class="GtkCheckButton" id="brailleSupportCheckbutton">
+                              <object class="GtkCheckButton" id="enableBrailleCheckButton">
                                 <property name="label" translatable="yes">Enable Braille _support</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
@@ -1371,7 +1371,7 @@
                                 <property name="use_underline">True</property>
                                 <property name="active">True</property>
                                 <property name="draw_indicator">True</property>
-                                <signal name="toggled" handler="brailleSupportChecked"/>
+                                <signal name="toggled" handler="checkButtonToggled"/>
                               </object>
                               <packing>
                                 <property name="expand">False</property>
@@ -1380,14 +1380,14 @@
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkCheckButton" id="brailleMonitorCheckbutton">
+                              <object class="GtkCheckButton" id="enableBrailleMonitorCheckButton">
                                 <property name="label" translatable="yes">Enable Braille _monitor</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="draw_indicator">True</property>
-                                <signal name="toggled" handler="brailleMonitorChecked"/>
+                                <signal name="toggled" handler="checkButtonToggled"/>
                               </object>
                               <packing>
                                 <property name="expand">False</property>
@@ -1396,7 +1396,7 @@
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkCheckButton" id="contractedBrailleCheckbutton">
+                              <object class="GtkCheckButton" id="contractedBrailleCheckButton">
                                 <property name="label" translatable="yes">_Enable Contracted Braille</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
@@ -1472,14 +1472,14 @@
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkCheckButton" id="disableBrailleEOL">
+                              <object class="GtkCheckButton" id="disableBrailleEOLCheckButton">
                                 <property name="label" translatable="yes">Disable _end of line symbol</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="draw_indicator">True</property>
-                                <signal name="toggled" handler="disableBrailleEOLChecked"/>
+                                <signal name="toggled" handler="checkButtonToggled"/>
                               </object>
                               <packing>
                                 <property name="expand">False</property>
@@ -1785,7 +1785,7 @@
                     <property name="border_width">12</property>
                     <property name="orientation">vertical</property>
                     <child>
-                      <object class="GtkCheckButton" id="keyEchoCheckbutton">
+                      <object class="GtkCheckButton" id="keyEchoCheckButton">
                         <property name="label" translatable="yes">Enable _key echo</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
@@ -1805,14 +1805,14 @@
                         <property name="visible">True</property>
                         <property name="left_padding">12</property>
                         <child>
-                          <object class="GtkCheckButton" id="printableCheckbutton">
+                          <object class="GtkCheckButton" id="enablePrintableKeysCheckButton">
                             <property name="label" translatable="yes">Enable _alphanumeric and punctuation keys</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="draw_indicator">True</property>
-                            <signal name="toggled" handler="printableKeysChecked"/>
+                            <signal name="toggled" handler="checkButtonToggled"/>
                           </object>
                         </child>
                       </object>
@@ -1827,14 +1827,14 @@
                         <property name="visible">True</property>
                         <property name="left_padding">12</property>
                         <child>
-                          <object class="GtkCheckButton" id="modifierCheckbutton">
+                          <object class="GtkCheckButton" id="enableModifierKeysCheckButton">
                             <property name="label" translatable="yes">Enable _modifier keys</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="draw_indicator">True</property>
-                            <signal name="toggled" handler="modifierKeysChecked"/>
+                            <signal name="toggled" handler="checkButtonToggled"/>
                           </object>
                         </child>
                       </object>
@@ -1849,14 +1849,14 @@
                         <property name="visible">True</property>
                         <property name="left_padding">12</property>
                         <child>
-                          <object class="GtkCheckButton" id="lockingCheckbutton">
+                          <object class="GtkCheckButton" id="enableLockingKeysCheckButton">
                             <property name="label" translatable="yes">Enable lockin_g keys</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="draw_indicator">True</property>
-                            <signal name="toggled" handler="lockingKeysChecked"/>
+                            <signal name="toggled" handler="checkButtonToggled"/>
                           </object>
                         </child>
                       </object>
@@ -1871,14 +1871,14 @@
                         <property name="visible">True</property>
                         <property name="left_padding">12</property>
                         <child>
-                          <object class="GtkCheckButton" id="functionCheckbutton">
+                          <object class="GtkCheckButton" id="enableFunctionKeysCheckButton">
                             <property name="label" translatable="yes">Enable _function keys</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="draw_indicator">True</property>
-                            <signal name="toggled" handler="functionKeysChecked"/>
+                            <signal name="toggled" handler="checkButtonToggled"/>
                           </object>
                         </child>
                       </object>
@@ -1893,14 +1893,14 @@
                         <property name="visible">True</property>
                         <property name="left_padding">12</property>
                         <child>
-                          <object class="GtkCheckButton" id="actionCheckbutton">
+                          <object class="GtkCheckButton" id="enableActionKeysCheckButton">
                             <property name="label" translatable="yes">Enable ac_tion keys</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="draw_indicator">True</property>
-                            <signal name="toggled" handler="actionKeysChecked"/>
+                            <signal name="toggled" handler="checkButtonToggled"/>
                           </object>
                         </child>
                       </object>
@@ -1915,14 +1915,14 @@
                         <property name="visible">True</property>
                         <property name="left_padding">12</property>
                         <child>
-                          <object class="GtkCheckButton" id="navigationCheckbutton">
+                          <object class="GtkCheckButton" id="enableNavigationKeysCheckButton">
                             <property name="label" translatable="yes">Enable _navigation keys</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="draw_indicator">True</property>
-                            <signal name="toggled" handler="navigationKeysChecked"/>
+                            <signal name="toggled" handler="checkButtonToggled"/>
                           </object>
                         </child>
                       </object>
@@ -1937,14 +1937,14 @@
                         <property name="visible">True</property>
                         <property name="left_padding">12</property>
                         <child>
-                          <object class="GtkCheckButton" id="diacriticalCheckbutton">
+                          <object class="GtkCheckButton" id="enableDiacriticalKeysCheckButton">
                             <property name="label" translatable="yes" comments="Translators: When this option is enabled, dead keys will be announced when pressed.">Enable non-spacing _diacritical keys</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="draw_indicator">True</property>
-                            <signal name="toggled" handler="diacriticalKeysChecked"/>
+                            <signal name="toggled" handler="checkButtonToggled"/>
                           </object>
                         </child>
                       </object>
@@ -1959,14 +1959,14 @@
                         <property name="visible">True</property>
                         <property name="top_padding">12</property>
                         <child>
-                          <object class="GtkCheckButton" id="echoByCharacterCheckbutton">
+                          <object class="GtkCheckButton" id="enableEchoByCharacterCheckButton">
                             <property name="label" translatable="yes" comments="Translators: When this option is enabled, inserted text of length 1 is spoken.">Enable echo by cha_racter</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="draw_indicator">True</property>
-                            <signal name="toggled" handler="echoByCharacterChecked"/>
+                            <signal name="toggled" handler="checkButtonToggled"/>
                           </object>
                         </child>
                       </object>
@@ -1980,14 +1980,14 @@
                       <object class="GtkAlignment" id="alignment49">
                         <property name="visible">True</property>
                         <child>
-                          <object class="GtkCheckButton" id="echoByWordCheckbutton">
+                          <object class="GtkCheckButton" id="enableEchoByWordCheckButton">
                             <property name="label" translatable="yes">Enable echo by _word</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="draw_indicator">True</property>
-                            <signal name="toggled" handler="echoByWordChecked"/>
+                            <signal name="toggled" handler="checkButtonToggled"/>
                           </object>
                         </child>
                       </object>
@@ -1998,14 +1998,14 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkCheckButton" id="echoBySentenceCheckbutton">
+                      <object class="GtkCheckButton" id="enableEchoBySentenceCheckButton">
                         <property name="label" translatable="yes">Enable echo by _sentence</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="draw_indicator">True</property>
-                        <signal name="toggled" handler="echoBySentenceChecked"/>
+                        <signal name="toggled" handler="checkButtonToggled"/>
                       </object>
                       <packing>
                         <property name="expand">False</property>
@@ -2035,7 +2035,7 @@
                     <property name="border_width">12</property>
                     <property name="orientation">vertical</property>
                     <child>
-                      <object class="GtkCheckButton" id="magnifierSupportCheckbutton">
+                      <object class="GtkCheckButton" id="magnifierSupportCheckButton">
                         <property name="label" translatable="yes">Enable _magnifier</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
diff --git a/src/orca/orca_gui_prefs.py b/src/orca/orca_gui_prefs.py
index 6706665..86eb625 100644
--- a/src/orca/orca_gui_prefs.py
+++ b/src/orca/orca_gui_prefs.py
@@ -1498,7 +1498,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
         # Speech pane.
         #
         enable = prefs["enableSpeech"]
-        self.get_widget("speechSupportCheckbutton").set_active(enable)
+        self.get_widget("speechSupportCheckButton").set_active(enable)
         self.get_widget("speechVbox").set_sensitive(enable)
 
         if prefs["verbalizePunctuationStyle"] == \
@@ -1523,17 +1523,17 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
         else:
             self.get_widget("cellSpeechButton").set_active(True)
 
-        self.get_widget("speechIndentationCheckbutton").set_active(\
+        self.get_widget("enableSpeechIndentationCheckButton").set_active(\
             prefs["enableSpeechIndentation"])
 
         self.get_widget("speakBlankLinesCheckButton").set_active(\
             prefs["speakBlankLines"])
-        self.get_widget("speakMultiCaseAsWordsCheckButton").set_active(\
+        self.get_widget("speakMultiCaseStringsAsWordsCheckButton").set_active(\
             prefs["speakMultiCaseStringsAsWords"])
-        self.get_widget("speakTutorialMessagesCheckButton").set_active(\
+        self.get_widget("enableTutorialMessagesCheckButton").set_active(\
             prefs["enableTutorialMessages"])
 
-        self.get_widget("pauseBreaksCheckButton").set_active(\
+        self.get_widget("enablePauseBreaksCheckButton").set_active(\
             prefs["enablePauseBreaks"])
 
         # Translators: different speech systems and speech engines work
@@ -1549,10 +1549,10 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
         # (which we have for the above string) are not getting sucked in
         # to orca.pot. :-(
 
-        self.get_widget("speakPositionCheckButton").set_active(\
+        self.get_widget("enablePositionSpeakingCheckButton").set_active(\
             prefs["enablePositionSpeaking"])
 
-        self.get_widget("speakMnemonicsCheckButton").set_active(\
+        self.get_widget("enableMnemonicSpeakingCheckButton").set_active(\
             prefs["enableMnemonicSpeaking"])
 
         combobox = self.get_widget("sayAllStyle")
@@ -1563,7 +1563,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
         # upon whether the "Speak progress bar updates" checkbox is checked.
         #
         enable = prefs["enableProgressBarUpdates"]
-        self.get_widget("speechProgressBarCheckbutton").set_active(enable)
+        self.get_widget("speechProgressBarCheckButton").set_active(enable)
         self.get_widget("speakUpdateIntervalHBox").set_sensitive(enable)
 
         interval = prefs["progressBarUpdateInterval"]
@@ -1594,26 +1594,26 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
         comboBox.set_active(prefs["progressBarVerbosity"])
 
         enable = prefs["enableMouseReview"]
-        self.get_widget("speakUnderMouseCheckButton").set_active(enable)
+        self.get_widget("enableMouseReviewCheckButton").set_active(enable)
 
         # Braille pane.
         #
-        self.get_widget("brailleSupportCheckbutton").set_active( \
+        self.get_widget("enableBrailleCheckButton").set_active( \
                         prefs["enableBraille"])
-        self.get_widget("brailleMonitorCheckbutton").set_active( \
+        self.get_widget("enableBrailleMonitorCheckButton").set_active( \
                         prefs["enableBrailleMonitor"])
         state = prefs["brailleRolenameStyle"] == \
                             settings.BRAILLE_ROLENAME_STYLE_SHORT
         self.get_widget("abbrevRolenames").set_active(state)
 
-        self.get_widget("disableBrailleEOL").set_active(
+        self.get_widget("disableBrailleEOLCheckButton").set_active(
             prefs["disableBrailleEOL"])
 
         if louis is None:
             self.get_widget( \
-                "contractedBrailleCheckbutton").set_sensitive(False)
+                "contractedBrailleCheckButton").set_sensitive(False)
         else:
-            self.get_widget("contractedBrailleCheckbutton").set_active( \
+            self.get_widget("contractedBrailleCheckButton").set_active( \
                 prefs["enableContractedBraille"])
             # Set up contraction table combo box and set it to the
             # currently used one.
@@ -1670,27 +1670,27 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
 
         # Key Echo pane.
         #
-        self.get_widget("keyEchoCheckbutton").set_active( \
+        self.get_widget("keyEchoCheckButton").set_active( \
                         prefs["enableKeyEcho"])
-        self.get_widget("printableCheckbutton").set_active( \
+        self.get_widget("enablePrintableKeysCheckButton").set_active( \
                         prefs["enablePrintableKeys"])
-        self.get_widget("modifierCheckbutton").set_active( \
+        self.get_widget("enableModifierKeysCheckButton").set_active( \
                         prefs["enableModifierKeys"])
-        self.get_widget("lockingCheckbutton").set_active( \
+        self.get_widget("enableLockingKeysCheckButton").set_active( \
                         prefs["enableLockingKeys"])
-        self.get_widget("functionCheckbutton").set_active( \
+        self.get_widget("enableFunctionKeysCheckButton").set_active( \
                         prefs["enableFunctionKeys"])
-        self.get_widget("actionCheckbutton").set_active( \
+        self.get_widget("enableActionKeysCheckButton").set_active( \
                         prefs["enableActionKeys"])
-        self.get_widget("navigationCheckbutton").set_active( \
+        self.get_widget("enableNavigationKeysCheckButton").set_active( \
                         prefs["enableNavigationKeys"])
-        self.get_widget("diacriticalCheckbutton").set_active( \
+        self.get_widget("enableDiacriticalKeysCheckButton").set_active( \
                         prefs["enableDiacriticalKeys"])
-        self.get_widget("echoByCharacterCheckbutton").set_active( \
+        self.get_widget("enableEchoByCharacterCheckButton").set_active( \
                         prefs["enableEchoByCharacter"])
-        self.get_widget("echoByWordCheckbutton").set_active( \
+        self.get_widget("enableEchoByWordCheckButton").set_active( \
                         prefs["enableEchoByWord"])
-        self.get_widget("echoBySentenceCheckbutton").set_active( \
+        self.get_widget("enableEchoBySentenceCheckButton").set_active( \
                         prefs["enableEchoBySentence"])
 
         # Translators: When this option is enabled, dead keys will be
@@ -1720,7 +1720,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
         # upon whether the "Enable Magnifier" checkbox is checked.
         #
         enable = prefs["enableMagnifier"]
-        self.get_widget("magnifierSupportCheckbutton").set_active(enable)
+        self.get_widget("magnifierSupportCheckButton").set_active(enable)
         self.get_widget("magnifierTable").set_sensitive(enable)
 
         # Get the 'Cursor on/off' preference and set the checkbox accordingly.
@@ -2011,7 +2011,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
         #
         self.get_widget("showMainWindowCheckButton").set_active( \
                         prefs["showMainWindow"])
-        self.get_widget("confirmQuitCheckButton").set_active( \
+        self.get_widget("quitOrcaNoConfirmationCheckButton").set_active( \
                         prefs["quitOrcaNoConfirmation"])
         self.get_widget("presentToolTipsCheckButton").set_active( \
             prefs["presentToolTips"] and settings.canPresentToolTips)
@@ -2028,7 +2028,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
         self.enableLiveUpdating = liveUpdating
 
         self.enableAutostart = settings.isOrcaAutostarted()
-        self.get_widget("autostartOrcaCheckbutton").set_active( \
+        self.get_widget("autostartOrcaCheckButton").set_active( \
                          self.enableAutostart)
 
     def populateComboBox(self, combobox, items):
@@ -2144,14 +2144,15 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
         depending upon whether the value of the key echo check button is set.
         """
 
-        enable = self.get_widget("keyEchoCheckbutton").get_active()
-        self.get_widget("printableCheckbutton").set_sensitive(enable)
-        self.get_widget("modifierCheckbutton").set_sensitive(enable)
-        self.get_widget("lockingCheckbutton").set_sensitive(enable)
-        self.get_widget("functionCheckbutton").set_sensitive(enable)
-        self.get_widget("actionCheckbutton").set_sensitive(enable)
-        self.get_widget("navigationCheckbutton").set_sensitive(enable)
-        self.get_widget("diacriticalCheckbutton").set_sensitive(enable)
+        enable = self.get_widget("keyEchoCheckButton").get_active()
+        self.get_widget("enablePrintableKeysCheckButton").set_sensitive(enable)
+        self.get_widget("enableModifierKeysCheckButton").set_sensitive(enable)
+        self.get_widget("enableLockingKeysCheckButton").set_sensitive(enable)
+        self.get_widget("enableFunctionKeysCheckButton").set_sensitive(enable)
+        self.get_widget("enableActionKeysCheckButton").set_sensitive(enable)
+        self.get_widget("enableNavigationKeysCheckButton").set_sensitive(enable)
+        self.get_widget("enableDiacriticalKeysCheckButton").set_sensitive( \
+          enable)
 
     def _say(self, text, stop=False):
         """If the text field is not None, speaks the given text, optionally
@@ -2456,7 +2457,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
 
     def speechSupportChecked(self, widget):
         """Signal handler for the "toggled" signal for the
-           speechSupportCheckbutton GtkCheckButton widget. The user has
+           speechSupportCheckButton GtkCheckButton widget. The user has
            [un]checked the 'Enable Speech' checkbox. Set the 'enableSpeech'
            preference to the new value. Set the rest of the speech pane items
            [in]sensensitive depending upon whether this checkbox is checked.
@@ -2601,109 +2602,23 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
         self._setVolumeForVoiceType(voiceType, volume)
         settings.voices[settings.DEFAULT_VOICE][acss.ACSS.GAIN] = volume
 
-    def speechIndentationChecked(self, widget):
-        """Signal handler for the "toggled" signal for the
-           speechIndentationCheckbutton GtkCheckButton widget. The user has
-           [un]checked the 'Speak indentation and justification' checkbox.
-           Set the 'enableSpeechIndentation' preference to the new value.
-
-        Arguments:
-        - widget: the component that generated the signal.
-        """
-
-        enable = widget.get_active()
-        self.prefsDict["enableSpeechIndentation"] = enable
-
-    def speakBlankLinesChecked(self, widget):
-        """Signal handler for the "toggled" signal for the
-           speakBlankLinesCheckButton GtkCheckButton widget. The user has
-           [un]checked the 'Speak blank lines' checkbox.
-           Set the 'speakBlankLines' preference to the new value.
-
-        Arguments:
-        - widget: the component that generated the signal.
-        """
-
-        self.prefsDict["speakBlankLines"] = widget.get_active()
-
-    def speakMultiCaseStringsToggled(self, widget):
-        """Signal handler for the "toggled" signal for the
-           speakMultiCaseAsWordsCheckButton GtkCheckButton widget. The user has
-           [un]checked the checkbox.
-           Set the 'speakMultiCaseStringsAsWords' preference to the new value.
-
-        Arguments:
-        - widget: the component that generated the signal.
-        """
-
-        self.prefsDict["speakMultiCaseStringsAsWords"] = widget.get_active()
-
-    def speakTutorialMessagesToggled(self, widget):
-        """Signal handler for the "toggled" signal for the
-           speakTutorialMessagesCheckButton GtkCheckButton widget.
-           Set the 'enableTutorialMessages' preference to the new value.
-
-        Arguments:
-        - widget: the component that generated the signal.
-        """
-
-        self.prefsDict["enableTutorialMessages"] = widget.get_active()
-
-    def pauseBreaksToggled (self, widget):
-        """Signal handler for the "toggled" signal for the
-           pauseBreaksCheckButton GtkCheckButton widget.
-
-        Arguments:
-        - widget: the component that generated the signal.
-        """
-
-        self.prefsDict["enablePauseBreaks"] = widget.get_active()
-
-    def speakPositionToggled(self, widget):
-        """Signal handler for the "toggled" signal for the
-           speakPositionCheckButton GtkCheckButton widget.
-           Set the 'enablePositionSpeaking' preference to the new value.
-
-        Arguments:
-        - widget: the component that generated the signal.
-        """
-
-        self.prefsDict["enablePositionSpeaking"] = widget.get_active()
-
-    def mnemonicSpeakingChecked (self, widget):
-        """Signal handler for the "toggled" signal for the
-           speakMnemonicsCheckButton GtkCheckButton widget.
-           Set the 'Speak mnemonics automaticaly' preference to the new value.
-
-        Arguments:
-        - widget: the component that generated the signal.
-        """
-
-        self.prefsDict["enableMnemonicSpeaking"] = widget.get_active()
-
-    def brailleSupportChecked(self, widget):
-        """Signal handler for the "toggled" signal for the
-           brailleSupportCheckbutton GtkCheckButton widget. The user has
-           [un]checked the 'Enable Braille support' checkbox. Set the
-           'enableBraille' preference to the new value.
-
-        Arguments:
-        - widget: the component that generated the signal.
-        """
-
-        self.prefsDict["enableBraille"] = widget.get_active()
-
-    def brailleMonitorChecked(self, widget):
-        """Signal handler for the "toggled" signal for the
-           brailleMonitorCheckbutton GtkCheckButton widget. The user has
-           [un]checked the 'Enable Braille monitor' checkbox. Set the
-           'enableBrailleMonitor' preference to the new value.
+    def checkButtonToggled(self, widget):
+        """Signal handler for "toggled" signal for basic GtkCheckButton 
+           widgets. The user has altered the state of the checkbox.
+           Set the preference to the new value.
 
         Arguments:
         - widget: the component that generated the signal.
         """
 
-        self.prefsDict["enableBrailleMonitor"] = widget.get_active()
+        # To use this default handler please make sure:
+        # The name of the setting that will be changed is: settingName
+        # The id of the widget in the ui should be: settingNameCheckButton
+        #
+        settingName = gtk.Buildable.get_name(widget)
+        # strip "CheckButton" from the end.
+        settingName = settingName[:-11] 
+        self.prefsDict[settingName] = widget.get_active()
 
     def keyEchoChecked(self, widget):
         """Signal handler for the "toggled" signal for the
@@ -2720,124 +2635,6 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
         self.prefsDict["enableKeyEcho"] = widget.get_active()
         self._setKeyEchoItems()
 
-    def printableKeysChecked(self, widget):
-        """Signal handler for the "toggled" signal for the
-           printableCheckbutton GtkCheckButton widget. The user has
-           [un]checked the 'Enable alphanumeric and punctuation keys'
-           checkbox. Set the 'enablePrintableKeys' preference to the
-           new value.
-
-        Arguments:
-        - widget: the component that generated the signal.
-        """
-
-        self.prefsDict["enablePrintableKeys"] = widget.get_active()
-
-    def modifierKeysChecked(self, widget):
-        """Signal handler for the "toggled" signal for the
-           modifierCheckbutton GtkCheckButton widget. The user has
-           [un]checked the 'Enable modifier keys' checkbox. Set the
-           'enableModifierKeys' preference to the new value.
-
-        Arguments:
-        - widget: the component that generated the signal.
-        """
-
-        self.prefsDict["enableModifierKeys"] = widget.get_active()
-
-    def lockingKeysChecked(self, widget):
-        """Signal handler for the "toggled" signal for the
-           lockingCheckbutton GtkCheckButton widget. The user has
-           [un]checked the 'Enable locking keys' checkbox. Set the
-           'enableLockingKeys' preference to the new value.
-
-        Arguments:
-        - widget: the component that generated the signal.
-        """
-
-        self.prefsDict["enableLockingKeys"] = widget.get_active()
-
-    def functionKeysChecked(self, widget):
-        """Signal handler for the "toggled" signal for the
-           functionCheckbutton GtkCheckButton widget. The user has
-           [un]checked the 'Enable locking keys' checkbox. Set the
-           'enableLockingKeys' preference to the new value.
-
-        Arguments:
-        - widget: the component that generated the signal.
-        """
-
-        self.prefsDict["enableFunctionKeys"] = widget.get_active()
-
-    def actionKeysChecked(self, widget):
-        """Signal handler for the "toggled" signal for the
-           actionCheckbutton GtkCheckButton widget. The user has
-           [un]checked the 'Enable action keys' checkbox. Set the
-           'enableActionKeys' preference to the new value.
-
-        Arguments:
-        - widget: the component that generated the signal.
-        """
-        self.prefsDict["enableActionKeys"] = widget.get_active()
-
-    def navigationKeysChecked(self, widget):
-        """Signal handler for the "toggled" signal for the
-           navigationCheckbutton GtkCheckButton widget. The user has
-           [un]checked the 'Enable navigation keys' checkbox. Set the
-           'enableNavigationKeys' preference to the new value.
-
-        Arguments:
-        - widget: the component that generated the signal.
-        """
-        self.prefsDict["enableNavigationKeys"] = widget.get_active()
-
-    def diacriticalKeysChecked(self, widget):
-        """Signal handler for the "toggled" signal for the
-           diacriticalCheckbutton GtkCheckButton widget. The user has
-           [un]checked the 'Enable diacritical keys' checkbox. Set the
-           'enableDiacriticalKeys' preference to the new value.
-
-        Arguments:
-        - widget: the component that generated the signal.
-        """
-        self.prefsDict["enableDiacriticalKeys"] = widget.get_active()
-
-    def echoByCharacterChecked(self, widget):
-        """Signal handler for the "toggled" signal for the
-           echoByCharacterCheckbutton GtkCheckButton widget. The user has
-           [un]checked the 'Enable Echo by Character' checkbox. Set the
-           'enableEchoByCharacter' preference to the new value.
-
-        Arguments:
-        - widget: the component that generated the signal.
-        """
-
-        self.prefsDict["enableEchoByCharacter"] = widget.get_active()
-
-    def echoByWordChecked(self, widget):
-        """Signal handler for the "toggled" signal for the
-           echoByWordCheckbutton GtkCheckButton widget. The user has
-           [un]checked the 'Enable Echo by Word' checkbox. Set the
-           'enableEchoByWord' preference to the new value.
-
-        Arguments:
-        - widget: the component that generated the signal.
-        """
-
-        self.prefsDict["enableEchoByWord"] = widget.get_active()
-
-    def echoBySentenceChecked(self, widget):
-        """Signal handler for the "toggled" signal for the
-           echoBySentenceCheckbutton GtkCheckButton widget. The user has
-           [un]checked the 'Enable Echo by Sentence' checkbox. Set the
-           'enableEchoBySentence' preference to the new value.
-
-        Arguments:
-        - widget: the component that generated the signal.
-        """
-
-        self.prefsDict["enableEchoBySentence"] = widget.get_active()
-
     def brailleSelectionChanged(self, widget):
         """Signal handler for the "toggled" signal for the
            brailleSelectionNoneButton, brailleSelection7Button,
@@ -3105,7 +2902,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
 
     def speechProgressBarChecked(self, widget):
         """Signal handler for the "toggled" signal for the
-           speechProgressBarCheckbutton GtkCheckButton widget.
+           speechProgressBarCheckButton GtkCheckButton widget.
            The user has [un]checked the "Speak progress bar updates" checkbox.
            Set the 'enableProgressBarUpdates' preference to the new value.
            Set the rest of the 'update interval' hbox items [in]sensensitive
@@ -3134,21 +2931,6 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
         self.prefsDict["progressBarUpdateInterval"] = widget.get_value_as_int()
 
 
-    def speakUnderMouseChecked(self, widget):
-        """Signal handler for the "toggled" signal for the
-           speakUnderMouseCheckButton GtkCheckButton widget.
-           The user has [un]checked the "Speak object under mouse" checkbox.
-           Set the 'enableMouseReview' preference to the new value.
-           Set the rest of the 'dwell time' hbox items [in]sensensitive
-           depending upon whether this checkbox is checked.
-
-        Arguments:
-        - widget: the component that generated the signal.
-        """
-
-        enable = widget.get_active()
-        self.prefsDict["enableMouseReview"] = enable
-
     def autostartOrcaChecked(self, widget):
         """Signal handler for the "toggled" signal for the
            autoStartOrcaCheckbutton GtkCheckButton widget.
@@ -3180,18 +2962,6 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
             self.prefsDict["brailleRolenameStyle"] = \
                 settings.BRAILLE_ROLENAME_STYLE_LONG
 
-    def disableBrailleEOLChecked(self, widget):
-        """Signal handler for the "toggled" signal for the disableBrailleEOL
-           GtkCheckButton widget. The user has [un]checked the 'Disable
-           braille end of line symbol' checkbox. Set the 'disableBrailleEOL'
-           preference to the new value.
-
-        Arguments:
-        - widget: the component that generated the signal.
-        """
-
-        self.prefsDict["disableBrailleEOL"] = widget.get_active()
-
     def brailleVerbosityChanged(self, widget):
         """Signal handler for the "toggled" signal for the brailleBriefButton,
            or brailleVerboseButton GtkRadioButton widgets. The user has
@@ -3967,32 +3737,6 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
 
         return
 
-    def showMainWindowChecked(self, widget):
-        """Signal handler for the "toggled" signal for the
-           showMainWindowCheckButton GtkCheckButton widget.
-           The user has [un]checked the 'Show Orca main window'
-           checkbox. Set the 'showMainWindow' preference
-           to the new value.
-
-        Arguments:
-        - widget: the component that generated the signal.
-        """
-
-        self.prefsDict["showMainWindow"] = widget.get_active()
-
-    def confirmQuitChecked(self, widget):
-        """Signal handler for the "toggled" signal for the
-           confirmQuitCheckButton GtkCheckButton widget.
-           The user has [un]checked the 'Quit Orca without
-           confirmation' checkbox. Set the 'quitOrcaNoConfirmation'
-           preference to the new value.
-
-        Arguments:
-        - widget: the component that generated the signal.
-        """
-
-        self.prefsDict["quitOrcaNoConfirmation"] = widget.get_active()
-
     def presentToolTipsChecked(self, widget):
         """Signal handler for the "toggled" signal for the
            presentToolTipsCheckButton GtkCheckButton widget.
@@ -4254,7 +3998,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
         if not self._isInitialSetup:
             self.restoreSettings()
 
-        enable = self.get_widget("speechSupportCheckbutton").get_active()
+        enable = self.get_widget("speechSupportCheckButton").get_active()
         self.prefsDict["enableSpeech"] = enable
 
         if self.speechSystemsChoice:
@@ -4276,7 +4020,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
 
         try:
             status = settings.setOrcaAutostart(self.enableAutostart)
-            self.get_widget("autostartOrcaCheckbutton").set_active(\
+            self.get_widget("autostartOrcaCheckButton").set_active(\
                 settings.isOrcaAutostarted())
         except:
             # If we are pressing Apply or OK from an application preferences



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