[orca] Remove the first start setting: It no longer is needed and it sometimes rewrites settings files it s



commit ed38eb8db3b3c8817e4961e430cb9a0fb73d1401
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Wed May 16 23:39:41 2012 -0400

    Remove the first start setting: It no longer is needed and it sometimes rewrites settings files it should not.

 src/orca/backends/json_backend.py |    6 +-----
 src/orca/orca_gui_prefs.py        |    2 --
 src/orca/settings.py              |   10 +---------
 3 files changed, 2 insertions(+), 16 deletions(-)
---
diff --git a/src/orca/backends/json_backend.py b/src/orca/backends/json_backend.py
index 7d7bd3f..0325d25 100644
--- a/src/orca/backends/json_backend.py
+++ b/src/orca/backends/json_backend.py
@@ -134,11 +134,7 @@ class Backend:
     def isFirstStart(self):
         """ Check if we're in first start. """
  
-        if not os.path.exists(self.settingsFile):
-            return True
-
-        self._getSettings()
-        return self.general.get('firstStart', True)
+        return not os.path.exists(self.settingsFile)
 
     def _setProfileKey(self, key, value):
         self.general[key] = value
diff --git a/src/orca/orca_gui_prefs.py b/src/orca/orca_gui_prefs.py
index cb625f6..14ce74c 100644
--- a/src/orca/orca_gui_prefs.py
+++ b/src/orca/orca_gui_prefs.py
@@ -3246,8 +3246,6 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
         self.prefsDict['startingProfile'] = startingProfile
         _settingsManager.setStartingProfile(startingProfile)
 
-        self.prefsDict['firstStart'] = False
-
         self.writeUserPreferences()
 
         orca.loadUserSettings()
diff --git a/src/orca/settings.py b/src/orca/settings.py
index 031579d..cb29161 100644
--- a/src/orca/settings.py
+++ b/src/orca/settings.py
@@ -27,8 +27,6 @@ __date__      = "$Date$"
 __copyright__ = "Copyright (c) 2004-2009 Sun Microsystems Inc."
 __license__   = "LGPL"
 
-import os
-
 tty = 7
 
 try:
@@ -134,14 +132,12 @@ userCustomizableSettings = [
     "presentTimeFormat",
     "activeProfile",
     "startingProfile",
-    "firstStart"
 ]
 
 excludeKeys = ["pronunciations",
                "keybindings",
                "startingProfile",
-               "activeProfile",
-               "firstStart"]
+               "activeProfile"]
 
 # The name of the module that hold the user interface for the main window
 # for Orca. This module is expected to have two methods, showMainUI and
@@ -178,10 +174,6 @@ startingProfile = ['Default', 'default']
 activeProfile = ['Default', 'default']
 profile = ['Default', 'default']
 
-# First start?
-#
-firstStart = True
-
 # A list of keys that can serve as the Orca modifier key.  The list is
 # so we can provide better cross platform support (e.g., Sun keyboard
 # vs. PC-104 keyboard layouts).  When any of these keys is pressed,



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