[Sugar-devel] [PATCH] Infoslicer: Avoid crash when a article is downloaded - SL #2856
Gonzalo Odiard
godiard at sugarlabs.org
Thu May 19 10:26:19 EDT 2011
---
book.py | 5 ++++-
bookview.py | 1 -
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/book.py b/book.py
index 681bdba..f28ff99 100644
--- a/book.py
+++ b/book.py
@@ -71,11 +71,14 @@ class Book(gobject.GObject):
self._article.uid = entry['uid']
self._article.article_title = title
- self.emit('article-selected', self._article)
+ gobject.idle_add(self._emit_article_selected)
article = gobject.property(type=object,
getter=get_article, setter=set_article)
+ def _emit_article_selected(self):
+ self.emit('article-selected', self._article)
+
# save current article
def sync_article(self):
# stub
diff --git a/bookview.py b/bookview.py
index dfbb205..8b049d6 100644
--- a/bookview.py
+++ b/bookview.py
@@ -154,7 +154,6 @@ class BookView(gtk.VBox):
self.book.props.article = article
self.store.append((False, article))
- self.tree.set_cursor(len(self.store)-1, self.tree.get_column(1), False)
def _create_cb(self, widget):
def find_name(list, prefix, uniq):
--
1.7.4.4
More information about the Sugar-devel
mailing list