[pyatspi2] get_attribute_run receives 3 arguments



commit 0641883731ab891e327ef215baded9fbd7c0706c
Author: danigm <danigm wadobo com>
Date:   Sat Feb 19 13:10:15 2011 +0100

    get_attribute_run receives 3 arguments
    
     Also, we want items, key, value, no values, building the dict.

 pyatspi/text.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/pyatspi/text.py b/pyatspi/text.py
index 88db181..acbd2bd 100644
--- a/pyatspi/text.py
+++ b/pyatspi/text.py
@@ -117,7 +117,7 @@ class Text:
                 """
                 return Atspi.Text.add_selection(self.obj, index)
 
-        def getAttributeRun(self, offset):
+        def getAttributeRun(self, offset, includeDefaults=True):
                 """
                 Query a particular text object for the text attributes defined
                 at a given offset, obtaining the start and end of the "attribute
@@ -166,8 +166,8 @@ class Text:
                 @return the AttributeSet defined at offset, optionally including
                 the 'default' attributes.
                 """
-                [attrs, startOffset, endOffset] = Atspi.Text.get_attribute_run(self.obj, offset)
-                dict = [key + ':' + value for key, value in attrs.values()]
+                [attrs, startOffset, endOffset] = Atspi.Text.get_attribute_run(self.obj, offset, includeDefaults)
+                dict = [key + ':' + value for key, value in attrs.items()]
                 return [dict, startOffset, endOffset]
 
         def getAttributeValue(self, offset, attributeName):



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