diff options
author | Gonzalo Odiard <godiard@gmail.com> | 2012-03-06 13:21:38 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2012-03-06 13:21:38 (GMT) |
commit | c94773d68f7810a54aba28031d7f6aabff39a668 (patch) | |
tree | d22b70993fae8b7f99979ce6e6d968489053f7bb /epubview | |
parent | 5b95d0ab5dacf6631a9ef4968e6ff84f8b7a09a6 (diff) |
Delay cleanup in the pagination job to avoid a random crash
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Diffstat (limited to 'epubview')
-rw-r--r-- | epubview/jobs.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/epubview/jobs.py b/epubview/jobs.py index ba28396..31f15ad 100644 --- a/epubview/jobs.py +++ b/epubview/jobs.py @@ -167,14 +167,17 @@ class _JobPaginator(GObject.GObject): self._bookheight += pageheight if self._count + 1 >= len(self._filelist): - self._temp_win.destroy() # TODO #self._screen.set_font_options(self._old_fontoptions) self.emit('paginated') + GObject.idle_add(self._cleanup) else: self._count += 1 self._temp_view.open(self._filelist[self._count]) + def _cleanup(self): + self._temp_win.destroy() + def get_file_for_pageno(self, pageno): ''' Returns the file in which pageno occurs |