[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
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
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

-    from jarabe.journal.bundlelauncher import get_bundle
-    from sugar3.activity.activity import launch_bundle
+    from sugar3.activity.activity import launch_bundle, get_bundle
 except ImportError:

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

[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