[Sugar-devel] [PATCH sugar-toolkit] Make sure the datastore entry is created in time OLPC #10755
Gonzalo Odiard
gonzalo at laptop.org
Wed Jun 29 11:14:27 EDT 2011
I have tested it.
I found a problem. With this patch , the title of the activity is not copied
from the XO who share the activity
to the Xo who receive the activity.
Testing it I have found, the other fields in the metadata (description,
tags, type) are not transfered too,
(with this patch or without this patch) but I don't know if this is a bug or
is by design.
Gonzalo
On Fri, Jun 24, 2011 at 6:45 AM, Simon Schampijer <simon at schampijer.de>wrote:
> To avoind that we try to access the datastore entry before
> it has been created we need to move the creation code up.
> Tested that no other operation like resuming has issues with
> that change.
>
> Signed-off-by: Simon Schampijer <simon at laptop.org>
> ---
> src/sugar/activity/activity.py | 9 +++++----
> 1 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/src/sugar/activity/activity.py
> b/src/sugar/activity/activity.py
> index 35082cc..c1a708b 100644
> --- a/src/sugar/activity/activity.py
> +++ b/src/sugar/activity/activity.py
> @@ -313,6 +313,11 @@ class Activity(Window, gtk.Container):
> self.shared_activity = None
> self._join_id = None
>
> + if handle.object_id is None and create_jobject:
> + logging.debug('Creating a jobject.')
> + self._jobject = self._initialize_journal_object()
> + self.set_title(self._jobject.metadata['title'])
> +
> if handle.invited:
> wait_loop = gobject.MainLoop()
> self._client_handler = _ClientHandler(
> @@ -328,10 +333,6 @@ class Activity(Window, gtk.Container):
> warn_if_none=False)
> self._set_up_sharing(mesh_instance, share_scope)
>
> - if handle.object_id is None and create_jobject:
> - logging.debug('Creating a jobject.')
> - self._jobject = self._initialize_journal_object()
> - self.set_title(self._jobject.metadata['title'])
>
> def _initialize_journal_object(self):
> title = _('%s Activity') % get_bundle_name()
> --
> 1.7.4.4
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20110629/523f7676/attachment-0001.html>
More information about the Sugar-devel
mailing list