[Sugar-devel] Change request: Fix open with API

Gonzalo Odiard godiard at sugarlabs.org
Thu Jul 2 15:33:32 EDT 2015


I found a problem in the implementation of
"Start_activity_from_another_activity" feature [1]
Usually, when the programmer want start one activity from another,
need display in the user interface information about the activity,
like the name or the icon.
One example of the use is in Browse activity [2]

The problem with this is that we are using
 jarabe.journal.bundlelauncher.get_bundle()
and that is part of sugar, not the sugar-toolkit.
We should not use that code in the activities, because is internal to Sugar,
and we don't have any warranty of stability.

I know is very late in the release cycle, but I think is a error ship a
release
with a broken API. After that, activity developers need keep compatibility
with the api provided in the broken release for ever.
While the developer can add another try catch, is a source of errors,
and usually difficult to understand for the developer, because the activity
will work in different ways given the sugar release.
This feature was introduced in this cycle, would be good if is provided in
a fine state.

I prepared prs for sugar [3] and the toolkit [4]

The change needed in the Browse activity to do the test is only:

--- a/downloadmanager.py
+++ b/downloadmanager.py
@@ -37,8 +37,7 @@ from sugar3.graphics.icon import Icon
 from sugar3.activity import activity

 try:
-    from jarabe.journal.bundlelauncher import get_bundle
-    from sugar3.activity.activity import launch_bundle
+    from sugar3.activity.activity import launch_bundle, get_bundle
     _HAS_BUNDLE_LAUNCHER = True
 except ImportError:
     _HAS_BUNDLE_LAUNCHER = False

Take this as a formal request to break the freeze to solve this issue.

[1]
http://wiki.sugarlabs.org/go/Features/Start_activity_from_another_activity
[2]
https://github.com/sugarlabs/browse-activity/commit/7315fe7d9d951965a7ccd6341d9bc684517cbad8
[3] https://github.com/sugarlabs/sugar/pull/548
[4] https://github.com/sugarlabs/sugar-toolkit-gtk3/pull/236

-- 
Gonzalo Odiard

SugarLabs - Software [for | by] children learning
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20150702/953dbbf4/attachment.html>


More information about the Sugar-devel mailing list