orca r3499 - in trunk: . src/orca



Author: shaeger
Date: Fri Jan 25 22:10:58 2008
New Revision: 3499
URL: http://svn.gnome.org/viewvc/orca?rev=3499&view=rev

Log:
More minor changes to boost pylint score.


Modified:
   trunk/ChangeLog
   trunk/src/orca/Gecko.py
   trunk/src/orca/liveregions.py

Modified: trunk/src/orca/Gecko.py
==============================================================================
--- trunk/src/orca/Gecko.py	(original)
+++ trunk/src/orca/Gecko.py	Fri Jan 25 22:10:58 2008
@@ -45,7 +45,6 @@
 import math
 import pyatspi
 import re
-import time
 import urlparse
 
 import braille
@@ -1584,7 +1583,7 @@
             self._script.systemBeep()
             return
         # convert our path to an object
-        obj = self._pathToObj(path)
+        obj = self.pathToObj(path)
        
         if obj:
             # restore the location
@@ -1603,7 +1602,7 @@
         index = (inputEvent.hw_code, self.getURIKey())
         try:
             path, characterOffset = self._bookmarks[index]
-            obj = self._pathToObj(path)
+            obj = self.pathToObj(path)
         except KeyError:
             self._script.systemBeep()
             return
@@ -1777,9 +1776,9 @@
         
         # could test for different obj types.  We'll just assume it is
         # list that represents a path for now.
-        return self._pathToObj(obj)
+        return self.pathToObj(obj)
             
-    def _pathToObj(self, path):
+    def pathToObj(self, path):
         """Return the object with the given path (relative to the
         document frame). """
         returnobj = self._script.getDocumentFrame()
@@ -10040,7 +10039,8 @@
         # find them
         regobjs = self.liveMngr.getLiveNoneObjects()
         # define our search predicate
-        pred = lambda obj: (self.liveMngr.matchLiveRegion(obj) or obj in regobjs)
+        pred = lambda obj: (self.liveMngr.matchLiveRegion(obj) \
+                                            or obj in regobjs)
         # start looking
         wrap = True
         [obj, wrapped] = \
@@ -10080,7 +10080,8 @@
         # find them
         regobjs = self.liveMngr.getLiveNoneObjects()
         # define our search predicate
-        pred = lambda obj: (self.liveMngr.matchLiveRegion(obj) or obj in regobjs)
+        pred = lambda obj: (self.liveMngr.matchLiveRegion(obj) \
+                                            or obj in regobjs)
         # start looking
         wrap = True
         [obj, wrapped] = \

Modified: trunk/src/orca/liveregions.py
==============================================================================
--- trunk/src/orca/liveregions.py	(original)
+++ trunk/src/orca/liveregions.py	Fri Jan 25 22:10:58 2008
@@ -2,8 +2,8 @@
 import gobject
 import pyatspi
 import speech
-import settings
 import copy
+import time
 
 from orca_i18n import _
 
@@ -69,7 +69,8 @@
             targetcontent = newqueue[0][2]['content']
             for i in range(1, len(self.queue)):
                 if self.queue[i][2]['labels'] == targetlabels:
-                    newqueue[0][2]['content'].extend(self.queue[i][2]['content'])
+                    newqueue[0][2]['content'].extend \
+                                   (self.queue[i][2]['content'])
                 else:
                     newqueue.append(self.queue[i]) 
 
@@ -168,7 +169,7 @@
             # if not monitoring.  We will ignore LIVE_NONE objects that 
             # arrive after the user switches off monitoring.
             if not self.monitoring:
-               return
+                return
         elif politeness == LIVE_POLITE:
             # Nothing to do for now
             pass
@@ -236,7 +237,7 @@
         currenturi = self._script.bookmarks.getURIKey()
         for uri, objectid in self._politenessOverrides:
             if uri == currenturi and isinstance(objectid, tuple):
-               retval.append(self._script.bookmarks._pathToObj(objectid))
+                retval.append(self._script.bookmarks.pathToObj(objectid))
         return retval
 
     def advancePoliteness(self, obj):



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