Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2013-06-26 11:42:53 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2013-08-05 14:19:28 (GMT)
commitd5c2e18d25a5585c57c4d47eaf47413e57b2e4d8 (patch)
tree30c213df90802e482b10be7e0e09f182f273054f
parentb96e3a8bcba42e0cb0ae5944d21bd94b6b43772b (diff)
Show the empty panel if the activity restart a session without a book
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
-rw-r--r--readactivity.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/readactivity.py b/readactivity.py
index 4fea9a2..bed136d 100644
--- a/readactivity.py
+++ b/readactivity.py
@@ -329,7 +329,7 @@ class ReadActivity(activity.Activity):
else:
# Wait for a successful join before trying to get the document
self.connect("joined", self._joined_cb)
- elif self._object_id is None:
+ elif self._object_id is None or self.filehash is None:
# Not joining, not resuming
emptypanel.show(self, 'activity-read',
_('No book'), _('Choose something to read'),
@@ -648,7 +648,6 @@ class ReadActivity(activity.Activity):
jobject = chooser.get_selected_object()
if jobject and jobject.file_path:
self.read_file(jobject.file_path)
- self.set_canvas(self._vbox)
finally:
chooser.destroy()
del chooser
@@ -689,6 +688,7 @@ class ReadActivity(activity.Activity):
return False
def read_file(self, file_path):
+ self.set_canvas(self._vbox)
"""Load a file from the datastore on activity start."""
_logger.debug('ReadActivity.read_file: %s', file_path)
extension = os.path.splitext(file_path)[1]