[pyatspi2: 1/2] Fix arguments in Text.addSelection()
- From: Mike Gorse <mgorse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pyatspi2: 1/2] Fix arguments in Text.addSelection()
- Date: Fri, 15 Mar 2019 01:25:23 +0000 (UTC)
commit 6c8ef4b4cd0b7db6778472669ba2499aa1fba8b0
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Thu Mar 14 12:56:27 2019 -0400
Fix arguments in Text.addSelection()
Atspi.Text.add_selection() takes three arguments: the accessible object,
the start offset, and the end offset. Pyatspi's addSelection() was taking
only the object and a single index and passing that along to add_selection(),
resulting in a TypeError.
pyatspi/text.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/pyatspi/text.py b/pyatspi/text.py
index 837e3c1..76dbc2e 100644
--- a/pyatspi/text.py
+++ b/pyatspi/text.py
@@ -123,7 +123,7 @@ class Text(interface):
and the set returned at a particular character offset via Text::getAttributeRun.
"""
- def addSelection(self, index):
+ def addSelection(self, startOffset, endOffset):
"""
The result of calling addSelection on objects which already have
one selection present, and which do not include STATE_MULTISELECTABLE,
@@ -135,7 +135,7 @@ class Text(interface):
other reasons (for instance if the user does not have permission
to copy the text into the relevant selection buffer).
"""
- return Atspi.Text.add_selection(self.obj, index)
+ return Atspi.Text.add_selection(self.obj, startOffset, endOffset)
def getAttributeRun(self, offset, includeDefaults=True):
"""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]