[orca/introspection] Fix for "TypeError: 'TreePath' object does not support indexing" in Text Attributes prefs
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca/introspection] Fix for "TypeError: 'TreePath' object does not support indexing" in Text Attributes prefs
- Date: Sun, 28 Aug 2011 18:00:39 +0000 (UTC)
commit 3502b043c3a5255cd3dec15abd3fcbac755313a7
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date: Sun Aug 28 13:59:28 2011 -0400
Fix for "TypeError: 'TreePath' object does not support indexing" in Text Attributes prefs
src/orca/orca_gui_prefs.py | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/orca/orca_gui_prefs.py b/src/orca/orca_gui_prefs.py
index 40c6731..7a7e998 100644
--- a/src/orca/orca_gui_prefs.py
+++ b/src/orca/orca_gui_prefs.py
@@ -3176,8 +3176,9 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
[model, paths] = textSelection.get_selected_rows()
for path in paths:
thisIter = model.get_iter(path)
- if path[0]:
- otherIter = model.iter_nth_child(None, path[0]-1)
+ indices = path.get_indices()
+ if indices[0]:
+ otherIter = model.iter_nth_child(None, indices[0]-1)
model.swap(thisIter, otherIter)
self._updateTextDictEntry()
@@ -3198,7 +3199,8 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
noRows = model.iter_n_children(None)
for path in paths:
thisIter = model.get_iter(path)
- if path[0] < noRows-1:
+ indices = path.get_indices()
+ if indices[0] < noRows-1:
otherIter = model.iter_next(thisIter)
model.swap(thisIter, otherIter)
self._updateTextDictEntry()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]