[orca/new-settings] Erasing classic backend. It is not needed anymore.



commit d7d1c1798a7e1b112a4fead73fc8a0d57b117659
Author: Alejandro Leiva <aleiva emergya es>
Date:   Thu Dec 9 17:24:05 2010 +0100

    Erasing classic backend. It is not needed anymore.

 po/POTFILES.skip              |    1 -
 src/orca/backends/Makefile.am |    1 -
 src/orca/orca_gui_prefs.py    |   28 +++++++---------------------
 src/orca/settings_manager.py  |   17 ++---------------
 test/harness/settings_test.py |    2 --
 5 files changed, 9 insertions(+), 40 deletions(-)
---
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index a110167..8dde815 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -1,4 +1,3 @@
 src/louis/constants.py
-src/orca/backends/classic.py
 src/orca/backends/gconf_backend.py
 src/orca/settings_manager.py
diff --git a/src/orca/backends/Makefile.am b/src/orca/backends/Makefile.am
index f660110..9519b48 100644
--- a/src/orca/backends/Makefile.am
+++ b/src/orca/backends/Makefile.am
@@ -2,7 +2,6 @@ orca_pathdir=$(pyexecdir)
 
 orca_python_PYTHON = \
         __init__.py \
-        classic_backend.py \
         gconf_backend.py\
         yaml_backend.py
 
diff --git a/src/orca/orca_gui_prefs.py b/src/orca/orca_gui_prefs.py
index b6d1fc3..f32e5d5 100644
--- a/src/orca/orca_gui_prefs.py
+++ b/src/orca/orca_gui_prefs.py
@@ -149,8 +149,6 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
         self.prefsDict = generalSettings
         self.enableLiveUpdating = settings.enableMagLiveUpdating
 
-        self._profilesCapable = not _settingsManager.isClassic()
-
         # Initialize variables to None to keep pylint happy.
         #
         self.bbindings = None
@@ -2213,10 +2211,6 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
         
         # Orca User Profiles
         #
-        if not self._profilesCapable:
-            self.get_widget("profilesFrame").set_sensitive(False)
-            return
-
         self.profilesCombo = self.get_widget('availableProfilesComboBox1')
         self.startingProfileCombo = self.get_widget('availableProfilesComboBox2')
         self.profilesComboModel = self.get_widget('model9')
@@ -2225,9 +2219,6 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
     def __initProfileCombo(self):
         """Adding available profiles and setting active as the active one"""
 
-        if not self._profilesCapable:
-            return
-
         availableProfiles = self.__getAvailableProfiles()
         self.profilesComboModel.clear()
 
@@ -2250,11 +2241,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
 
     def __getAvailableProfiles(self):
         """Get available user profiles."""
-
-        if not self._profilesCapable:
-            return ['Default', 'default']
-        else:
-            return _settingsManager.availableProfiles()
+        return _settingsManager.availableProfiles()
 
     def _updateOrcaModifier(self):
         combobox = self.get_widget("orcaModifierComboBox")
@@ -4415,14 +4402,13 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
         """
         self.saveBasicSettings()
 
-        if self._profilesCapable:
-            activeProfile = self.getComboBoxList(self.profilesCombo)
-            startingProfile = self.getComboBoxList(self.startingProfileCombo)
+        activeProfile = self.getComboBoxList(self.profilesCombo)
+        startingProfile = self.getComboBoxList(self.startingProfileCombo)
 
-            self.prefsDict['profile'] = activeProfile
-            self.prefsDict['activeProfile'] = activeProfile
-            self.prefsDict['startingProfile'] = startingProfile
-            _settingsManager.setStartingProfile(startingProfile)
+        self.prefsDict['profile'] = activeProfile
+        self.prefsDict['activeProfile'] = activeProfile
+        self.prefsDict['startingProfile'] = startingProfile
+        _settingsManager.setStartingProfile(startingProfile)
 
         self.prefsDict['firstStart'] = False
 
diff --git a/src/orca/settings_manager.py b/src/orca/settings_manager.py
index 374ae7c..35eb241 100644
--- a/src/orca/settings_manager.py
+++ b/src/orca/settings_manager.py
@@ -56,7 +56,6 @@ class SettingsManager(object):
         case gconf-backend.
         backend parameter can use the follow values:
         backend='gconf'
-        backend='classic'
         backend='yaml'
         """
 
@@ -366,27 +365,15 @@ class SettingsManager(object):
 
         return scriptKeyBindings
 
-    def isClassic(self):
-        """Is the backend the classic one?
-        If the current backend is the classic one it will return True"""
-        if self.backendName is 'classic':
-            return True
-        else:
-            return False
-
     def isFirstStart(self):
         """Check if the firstStart key is True or false"""
-        if self.isClassic():
-            return settings.firstStart
-        else:
-            return self._backend.isFirstStart()
+        return self._backend.isFirstStart()
 
     def setFirstStart(self, value=False):
         """Set firstStart. This user-configurable settting is primarily
         intended to serve as an indication as to whether or not initial
         configuration is needed."""
-        if not self.isClassic():
-            self._backend.setFirstStart(value)
+        self._backend.setFirstStart(value)
 
     def availableProfiles(self):
         """Get available profiles from active backend"""
diff --git a/test/harness/settings_test.py b/test/harness/settings_test.py
index daac175..a566c06 100644
--- a/test/harness/settings_test.py
+++ b/test/harness/settings_test.py
@@ -51,8 +51,6 @@ def exerciseBackendAPI(backendName, profile):
     pprint(pronunciations)
 
     #settingsManager.saveSettings()
-    isClassic = settingsManager.isClassic()
-    print "\n\nIs Classic Backend? => ", isClassic
     isFirstStart = settingsManager.isFirstStart()
     print "\n\nIs First Start? => ", isFirstStart
     print "\n\nSetting firstStart key"



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