[orca] Fix for Bug 652413 - Orca's enableAutostart setting and GUI widget are redundant in GNOME 3 and shou



commit 05fc1dce524d670343520d3be054110e2480a50e
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date:   Sun Jun 12 19:24:20 2011 -0400

    Fix for Bug 652413 - Orca's enableAutostart setting and GUI widget are redundant in GNOME 3 and should be removed

 src/orca/orca-setup.ui         |   16 ----------------
 src/orca/orca_console_prefs.py |   19 -------------------
 src/orca/orca_gui_prefs.py     |   34 ----------------------------------
 src/orca/settings.py           |   28 ----------------------------
 4 files changed, 0 insertions(+), 97 deletions(-)
---
diff --git a/src/orca/orca-setup.ui b/src/orca/orca-setup.ui
index 93e018f..e36fc91 100644
--- a/src/orca/orca-setup.ui
+++ b/src/orca/orca-setup.ui
@@ -422,22 +422,6 @@
                       </packing>
                     </child>
                     <child>
-                      <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>
-                        <property name="receives_default">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="draw_indicator">True</property>
-                        <signal name="toggled" handler="autostartOrcaChecked"/>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">5</property>
-                      </packing>
-                    </child>
-                    <child>
                       <object class="GtkCheckButton" id="enableMouseReviewCheckButton">
                         <property name="label" translatable="yes">Speak object under mo_use</property>
                         <property name="visible">True</property>
diff --git a/src/orca/orca_console_prefs.py b/src/orca/orca_console_prefs.py
index dc0fbd0..a95930c 100644
--- a/src/orca/orca_console_prefs.py
+++ b/src/orca/orca_console_prefs.py
@@ -566,22 +566,6 @@ def showPreferencesUI(commandLineSettings):
             sayAndPrint(_("Please enter y or n."))
 
     stop = True
-    while True:
-        # Translators: orca can be set up to automatically start when
-        # the user logs in.
-        #
-        answer = sayAndPrint(_("Automatically start orca when you log in?  " \
-                                   "Enter y or n: "),
-                             stop,
-                             True,
-                             speechServerChoice,
-                             speechVoiceChoice)
-        try:
-            autostart = checkYes(answer)
-            break
-        except:
-            stop = False
-            sayAndPrint(_("Please enter y or n."))
 
     _settingsManager.setFirstStart(False)
 
@@ -622,7 +606,6 @@ def showPreferencesUI(commandLineSettings):
                                     speechServerChoice,
                                     speechVoiceChoice)
                         time.sleep(2)
-                        settings.setOrcaAutostart(autostart)
 
                         import gobject
                         gobject.threads_init()
@@ -638,8 +621,6 @@ def showPreferencesUI(commandLineSettings):
                          speechServerChoice,
                          speechVoiceChoice)
 
-    settings.setOrcaAutostart(autostart)
-
     for [factory, servers] in workingFactories:
         factory.SpeechServer.shutdownActiveServers()
 
diff --git a/src/orca/orca_gui_prefs.py b/src/orca/orca_gui_prefs.py
index 9a8b283..7517ea6 100644
--- a/src/orca/orca_gui_prefs.py
+++ b/src/orca/orca_gui_prefs.py
@@ -112,7 +112,6 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
         self.defaultVoice = None
         self.defKeyBindings = None
         self.disableKeyGrabPref = None
-        self.enableAutostart = None
         self.getTextAttributesView = None
         self.hyperlinkVoice = None
         self.initializingSpeech = None
@@ -1777,10 +1776,6 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
             self.get_widget("generalDesktopButton").set_active(True)
         else:
             self.get_widget("generalLaptopButton").set_active(True)
-
-        self.enableAutostart = settings.isOrcaAutostarted()
-        self.get_widget("autostartOrcaCheckButton").set_active( \
-                         self.enableAutostart)
         
         # Orca User Profiles
         #
@@ -2866,21 +2861,6 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
 
         self.prefsDict["progressBarUpdateInterval"] = widget.get_value_as_int()
 
-
-    def autostartOrcaChecked(self, widget):
-        """Signal handler for the "toggled" signal for the
-           autoStartOrcaCheckbutton GtkCheckButton widget.
-           The user has [un]checked the 'Start Orca when you login'
-           checkbox. Remember the new setting so that it can be used
-           to create or remove ~/.config/autostart/orca.desktop, if 
-           the user presses the Apply or OK button.
-
-        Arguments:
-        - widget: the component that generated the signal.
-        """
-
-        self.enableAutostart = widget.get_active()
-
     def abbrevRolenamesChecked(self, widget):
         """Signal handler for the "toggled" signal for the abbrevRolenames
            GtkCheckButton widget. The user has [un]checked the 'Abbreviated
@@ -3329,20 +3309,6 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
 
         settings.setGKSUGrabDisabled(self.disableKeyGrabPref)
 
-        try:
-            status = settings.setOrcaAutostart(self.enableAutostart)
-            self.get_widget("autostartOrcaCheckButton").set_active(\
-                settings.isOrcaAutostarted())
-        except:
-            # If we are pressing Apply or OK from an application preferences
-            # dialog (rather than the general Orca preferences), then there
-            # won't be a general pane, so we won't be able to adjust this
-            # checkbox.
-            #
-            pass
-
-
-
     def applyButtonClicked(self, widget):
         """Signal handler for the "clicked" signal for the applyButton
            GtkButton widget. The user has clicked the Apply button.
diff --git a/src/orca/settings.py b/src/orca/settings.py
index 540605c..9382c74 100644
--- a/src/orca/settings.py
+++ b/src/orca/settings.py
@@ -921,34 +921,6 @@ chatAnnounceBuddyTyping = False
 #
 chatRoomHistories = False
 
-# Obtain/set information regarding whether Orca is autostarted for this
-# user at login time.
-#
-def isOrcaAutostarted():
-    """Return an indication of whether Orca autostart at login time is enabled.
-    """
-    prefix = "/desktop/gnome/applications/at/visual/"
-    try:
-        return ("orca" in gconfClient.get_string(prefix + "exec")) \
-           and gconfClient.get_bool(prefix + "startup")
-    except:
-        return False
-
-def setOrcaAutostart(enable):
-    """Enable or disable the autostart of Orca at login time.
-
-    Arguments:
-    - enable: if True, whether Orca autostart at login time is enabled.
-
-    Returns an indication of whether the operation was successful.
-    """
-    prefix = "/desktop/gnome/applications/at/visual/"
-    try:
-        return gconfClient.set_string(prefix + "exec", "orca") \
-           and gconfClient.set_bool(prefix + "startup", enable)
-    except:
-        return False
-
 # Obtain/set information regarding whether the gksu keyboard grab is enabled
 # or not.
 #



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