[accerciser] Move addCellDataFunc code into an idle



commit 2809574e55e8dc07b7bf775a69cdd825c4e5d0b9
Author: Mike Gorse <mgorse novell com>
Date:   Mon May 3 15:51:36 2010 -0400

    Move addCellDataFunc code into an idle
    
    BGO#617484: Accerciser crashes with the latest at-spi2.
    This is a work-around for at-spi2 re-entering the main loop and possibly
    causing gtk events to be delivered prematurely if at-spi calls are made.

 src/lib/accerciser/accessible_treeview.py |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/src/lib/accerciser/accessible_treeview.py b/src/lib/accerciser/accessible_treeview.py
index d02e204..98e37f7 100644
--- a/src/lib/accerciser/accessible_treeview.py
+++ b/src/lib/accerciser/accessible_treeview.py
@@ -789,6 +789,22 @@ class AccessibleTreeView(gtk.TreeView, Tools):
     @param iter: The iter at the given row.
     @type iter: L{gtk.TreeIter}
     '''
+    # TODO: Remove idle_add when at-spi2 reentrancy issues are fixed
+    gobject.idle_add(self._accCellDataFuncReal, tvc, cellrenderer, model, iter)
+
+  def _accCellDataFuncReal(self, tvc, cellrenderer, model, iter):
+    '''
+    Called by _acCellDataFunc when idle
+
+    @param tvc: A treeview column.
+    @type tvc: L{gtk.TreeViewColumn}
+    @param cellrenderer: The cellrenderer that needs to be tweaked.
+    @type cellrenderer: L{gtk.CellRenderer}
+    @param model: The treeview's data model.
+    @type model: L{AccessibleModel}
+    @param iter: The iter at the given row.
+    @type iter: L{gtk.TreeIter}
+    '''
     if model.iter_is_valid(iter):
       acc = model.get_value(iter, COL_ACC)
     else:



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