Codebase list sugar-read-activity / 9daed3d
Enable collaboration only when a file is loaded Right now, Read activity can start without a file loaded, showing the empty panel and a button to open the object chooser. If the user try sharing the session before a book is opened, the collaboration is broken, because no file is available to share. This patch disable collaboration until a file is opened. Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org> Gonzalo Odiard 10 years ago
1 changed file(s) with 4 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
145145 def __init__(self, handle):
146146 activity.Activity.__init__(self, handle)
147147
148 self.max_participants = 1
148149 self._document = None
149150 self._fileserver = None
150151 self._object_id = handle.object_id
698699 'tmp%i%s' % (time.time(), extension))
699700 os.link(file_path, tempfile)
700701 self._tempfile = tempfile
702 # enable collaboration
703 self.activity_button.page.share.props.sensitive = True
704
701705 self._load_document('file://' + self._tempfile)
702706
703707 # FIXME: This should obviously be fixed properly