[orca/570658] Pylinting - fix many references to old braille generator



commit e753ea385ff509118d92f50dd995b456038557f1
Author: Willie Walker <william walker sun com>
Date:   Thu Jul 2 21:04:34 2009 -0400

    Pylinting - fix many references to old braille generator

 src/orca/braille_generator.py                      |    2 +-
 src/orca/generator.py                              |    4 ++--
 src/orca/scripts/apps/acroread.py                  |    6 +++---
 src/orca/scripts/apps/evolution/script.py          |   12 ++++++------
 src/orca/scripts/apps/liferea.py                   |    2 +-
 src/orca/scripts/apps/planner/braille_generator.py |    5 ++---
 src/orca/scripts/apps/soffice/braille_generator.py |   16 ++++++++--------
 src/orca/scripts/apps/soffice/script.py            |    4 ++--
 .../scripts/toolkits/Gecko/braille_generator.py    |    5 ++---
 9 files changed, 27 insertions(+), 29 deletions(-)
---
diff --git a/src/orca/braille_generator.py b/src/orca/braille_generator.py
index fb74c2b..8ae7a1e 100644
--- a/src/orca/braille_generator.py
+++ b/src/orca/braille_generator.py
@@ -45,7 +45,7 @@ SPACE = [Space()]
 
 class BrailleGenerator(generator.Generator):
     """Takes accessible objects and produces a list of braille Regions
-    for those objects.  See the getBrailleRegions method, which is the
+    for those objects.  See the generateBraille method, which is the
     primary entry point.  Subclasses can feel free to override/extend
     the brailleGenerators instance field as they see fit."""
 
diff --git a/src/orca/generator.py b/src/orca/generator.py
index e502693..63ee9a4 100644
--- a/src/orca/generator.py
+++ b/src/orca/generator.py
@@ -249,8 +249,8 @@ class Generator:
             result = []
 
         debug.println(debug.LEVEL_ALL, "generate %s results:" % self._mode)
-        for foo in result:
-            debug.println(debug.LEVEL_ALL, "  " + str(foo))
+        for element in result:
+            debug.println(debug.LEVEL_ALL, "  " + str(element))
 
         return result
 
diff --git a/src/orca/scripts/apps/acroread.py b/src/orca/scripts/apps/acroread.py
index 175a75f..e52faa5 100644
--- a/src/orca/scripts/apps/acroread.py
+++ b/src/orca/scripts/apps/acroread.py
@@ -442,7 +442,7 @@ class Script(default.Script):
                  self.speechGenerator.generateSpeech(newLocusOfFocus)
             speech.speak(utterances)
             brailleRegions = \
-                 self.brailleGenerator.getBrailleRegions(newLocusOfFocus)
+                 self.brailleGenerator.generateBraille(newLocusOfFocus)
             braille.displayRegions(brailleRegions)
             orca.setLocusOfFocus(
                 event, newLocusOfFocus, notifyPresentationManager=False)
@@ -476,7 +476,7 @@ class Script(default.Script):
                 adjustedUtterances.append(self.adjustForRepeats(utterance))
             speech.speak(adjustedUtterances)
             brailleRegions = \
-                     self.brailleGenerator.getBrailleRegions(newLocusOfFocus)
+                     self.brailleGenerator.generateBraille(newLocusOfFocus)
             braille.displayRegions(brailleRegions)
             orca.setLocusOfFocus(
                 event, newLocusOfFocus, notifyPresentationManager=False)
@@ -558,7 +558,7 @@ class Script(default.Script):
                      self.speechGenerator.generateSpeech(event.source)
                 speech.speak(utterances)
                 brailleRegions = \
-                     self.brailleGenerator.getBrailleRegions(event.source)
+                     self.brailleGenerator.generateBraille(event.source)
                 braille.displayRegions(brailleRegions)
                 orca.setLocusOfFocus(
                     event, event.source, notifyPresentationManager=False)
diff --git a/src/orca/scripts/apps/evolution/script.py b/src/orca/scripts/apps/evolution/script.py
index abd6fb5..625f7d2 100644
--- a/src/orca/scripts/apps/evolution/script.py
+++ b/src/orca/scripts/apps/evolution/script.py
@@ -339,7 +339,7 @@ class Script(default.Script):
         speech.speak(utterances)
         settings.speechVerbosityLevel = savedSpeechVerbosityLevel
 
-        braille.displayRegions(brailleGen.getBrailleRegions(tab))
+        braille.displayRegions(brailleGen.generateBraille(tab))
 
     def getTimeForCalRow(self, row, noIncs):
         """Return a string equivalent to the time of the given row in
@@ -1088,7 +1088,7 @@ class Script(default.Script):
                                 includeContext=False,
                                 priorObj=oldLocusOfFocus)
                             [headerRegions, focusedRegion] = \
-                                         brailleGen.getBrailleRegions(header)
+                                         brailleGen.generateBraille(header)
                             brailleRegions.extend(headerRegions)
                             brailleRegions.append(braille.Region(" "))
 
@@ -1117,7 +1117,7 @@ class Script(default.Script):
                             includeContext=False,
                             priorObj=oldLocusOfFocus)
                         [cellRegions, focusedRegion] = \
-                                           brailleGen.getBrailleRegions(cell)
+                                           brailleGen.generateBraille(cell)
 
                         # Translators: this is the name of the
                         # status column header in the message
@@ -1210,7 +1210,7 @@ class Script(default.Script):
                                                   includeContext=False,
                                                   priorObj=oldLocusOfFocus)
             [brailleRegions, focusedRegion] = \
-                    brailleGen.getBrailleRegions(parent)
+                    brailleGen.generateBraille(parent)
             speech.speak(utterances)
 
             apptExtents = event.source.queryComponent().getExtents(0)
@@ -1229,7 +1229,7 @@ class Script(default.Script):
                                 includeContext=False,
                                 priorObj=oldLocusOfFocus)
                             [apptRegions, focusedRegion] = \
-                                brailleGen.getBrailleRegions(event.source)
+                                brailleGen.generateBraille(event.source)
                             brailleRegions.extend(apptRegions)
                             speech.speak(utterances)
 
@@ -1293,7 +1293,7 @@ class Script(default.Script):
                             includeContext=False,
                             priorObj=oldLocusOfFocus)
                         [apptRegions, focusedRegion] = \
-                            brailleGen.getBrailleRegions(child)
+                            brailleGen.generateBraille(child)
                         brailleRegions.extend(apptRegions)
                         speech.speak(utterances)
 
diff --git a/src/orca/scripts/apps/liferea.py b/src/orca/scripts/apps/liferea.py
index cd70f39..40898a4 100644
--- a/src/orca/scripts/apps/liferea.py
+++ b/src/orca/scripts/apps/liferea.py
@@ -125,7 +125,7 @@ class Script(default.Script):
             #
             speech.speak(utterances)
            
-            regions = brailleGen.getBrailleRegions(event.source)
+            regions = brailleGen.generateBraille(event.source)
             regions[0].insert(0, braille.Region(utterances[0] + " "))
             braille.displayRegions(regions)
            
diff --git a/src/orca/scripts/apps/planner/braille_generator.py b/src/orca/scripts/apps/planner/braille_generator.py
index 3f4f41c..b4b643b 100644
--- a/src/orca/scripts/apps/planner/braille_generator.py
+++ b/src/orca/scripts/apps/planner/braille_generator.py
@@ -25,11 +25,10 @@ __date__      = "$Date$"
 __copyright__ = "Copyright (c) 2006-2009 Sun Microsystems Inc."
 __license__   = "LGPL"
 
-import orca.braille as braille
-import orca.settings as settings
-import orca.braille_generator as braille_generator
 import pyatspi
 
+import orca.braille_generator as braille_generator
+
 from orca.orca_i18n import _ # for gettext support
 
 class BrailleGenerator(braille_generator.BrailleGenerator):
diff --git a/src/orca/scripts/apps/soffice/braille_generator.py b/src/orca/scripts/apps/soffice/braille_generator.py
index b9a6ab1..3fc5ec3 100644
--- a/src/orca/scripts/apps/soffice/braille_generator.py
+++ b/src/orca/scripts/apps/soffice/braille_generator.py
@@ -28,10 +28,10 @@ __license__   = "LGPL"
 import pyatspi
 
 import orca.braille as braille
-import orca.braillegenerator as braillegenerator
+import orca.braille_generator as braille_generator
 import orca.settings as settings
 
-class BrailleGenerator(braillegenerator.BrailleGenerator):
+class BrailleGenerator(braille_generator.BrailleGenerator):
     """Overrides _getBrailleRegionsForTableCellRow so that , when we are
     in a spread sheet, we can braille the dynamic row and column headers
     (assuming they are set).
@@ -41,14 +41,14 @@ class BrailleGenerator(braillegenerator.BrailleGenerator):
     """
 
     def __init__(self, script):
-        braillegenerator.BrailleGenerator.__init__(self, script)
+        braille_generator.BrailleGenerator.__init__(self, script)
 
     def _getTextForRole(self, obj, role=None):
         if obj.getRole() == pyatspi.ROLE_DOCUMENT_FRAME \
            or role == pyatspi.ROLE_DOCUMENT_FRAME:
             return None
 
-        return braillegenerator.BrailleGenerator.\
+        return braille_generator.BrailleGenerator.\
             _getTextForRole(self, obj, role)
 
     def _getBrailleRegionsForList(self, obj):
@@ -65,7 +65,7 @@ class BrailleGenerator(braillegenerator.BrailleGenerator):
         self._debugGenerator("soffice: _getBrailleRegionsForList", obj)
 
         if not obj.getState().contains(pyatspi.STATE_FOCUSABLE):
-            return braillegenerator.BrailleGenerator.\
+            return braille_generator.BrailleGenerator.\
                        _getBrailleRegionsForList(self, obj)
 
         text = ""
@@ -210,7 +210,7 @@ class BrailleGenerator(braillegenerator.BrailleGenerator):
             regions = [regions, focusRegion]
         else:
             [cellRegions, focusRegion] = \
-                braillegenerator.BrailleGenerator.\
+                braille_generator.BrailleGenerator.\
                     _getBrailleRegionsForTableCellRow(self, obj)
             regions.extend(cellRegions)
             regions = [regions, focusRegion]
@@ -263,7 +263,7 @@ class BrailleGenerator(braillegenerator.BrailleGenerator):
             # child, and call this method again.
             #
             if obj.childCount <= 1:
-                regions = braillegenerator.BrailleGenerator.\
+                regions = braille_generator.BrailleGenerator.\
                               _getBrailleRegionsForTableCell(self, obj)
             else:
                 regions = []
@@ -287,7 +287,7 @@ class BrailleGenerator(braillegenerator.BrailleGenerator):
 
         self._debugGenerator("soffice: _getBrailleRegionsForScrollPane", obj)
 
-        scrollRegions = braillegenerator.BrailleGenerator.\
+        scrollRegions = braille_generator.BrailleGenerator.\
                                _getBrailleRegionsForScrollPane(self, obj)
 
         # If we are in the slide presentation scroll pane, also announce
diff --git a/src/orca/scripts/apps/soffice/script.py b/src/orca/scripts/apps/soffice/script.py
index a8f2714..96fd9e5 100644
--- a/src/orca/scripts/apps/soffice/script.py
+++ b/src/orca/scripts/apps/soffice/script.py
@@ -1507,7 +1507,7 @@ class Script(default.Script):
                 textToSpeak = result[0].decode("UTF-8")
                 self._speakWriterText(event, textToSpeak)
                 braille.displayRegions(\
-                    brailleGen.getBrailleRegions(event.source))
+                    brailleGen.generateBraille(event.source))
                 return
 
         # Check to see if the object that just got focus is in the Setup
@@ -2262,7 +2262,7 @@ class Script(default.Script):
             textToSpeak = result.decode("UTF-8")
             self._speakWriterText(event, textToSpeak)
             braille.displayRegions( \
-                self.brailleGenerator.getBrailleRegions(event.source))
+                self.brailleGenerator.generateBraille(event.source))
         else:
             default.Script.onCaretMoved(self, event)
 
diff --git a/src/orca/scripts/toolkits/Gecko/braille_generator.py b/src/orca/scripts/toolkits/Gecko/braille_generator.py
index 5222a15..e7322be 100644
--- a/src/orca/scripts/toolkits/Gecko/braille_generator.py
+++ b/src/orca/scripts/toolkits/Gecko/braille_generator.py
@@ -32,10 +32,9 @@ __license__   = "LGPL"
 
 import pyatspi
 
-import orca.braille as braille
 import orca.braille_generator as braille_generator
-import orca.rolenames as rolenames
-import orca.settings as settings
+
+from orca.orca_i18n import _ # for gettext support
 
 ########################################################################
 #                                                                      #



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