<div dir="ltr">I found a problem in the implementation of "Start_activity_from_another_activity" feature [1]<div>Usually, when the programmer want start one activity from another,</div><div>need display in the user interface information about the activity, </div><div>like the name or the icon.</div><div>One example of the use is in Browse activity [2]</div><div><br></div><div>The problem with this is that we are using  jarabe.journal.bundlelauncher.get_bundle()</div><div>and that is part of sugar, not the sugar-toolkit.</div><div>We should not use that code in the activities, because is internal to Sugar,</div><div>and we don't have any warranty of stability.</div><div> </div><div>I know is very late in the release cycle, but I think is a error ship a release </div><div>with a broken API. After that, activity developers need keep compatibility</div><div>with the api provided in the broken release for ever.</div><div>While the developer can add another try catch, is a source of errors,</div><div>and usually difficult to understand for the developer, because the activity</div><div>will work in different ways given the sugar release. </div><div>This feature was introduced in this cycle, would be good if is provided in a fine state.</div><div><br></div><div>I prepared prs for sugar [3] and the toolkit [4]</div><div><br></div><div>The change needed in the Browse activity to do the test is only:</div><div><br></div><div><div><div>--- a/downloadmanager.py</div><div>+++ b/downloadmanager.py</div><div>@@ -37,8 +37,7 @@ from sugar3.graphics.icon import Icon</div><div> from sugar3.activity import activity</div><div> </div><div> try:</div><div>-    from jarabe.journal.bundlelauncher import get_bundle</div><div>-    from sugar3.activity.activity import launch_bundle</div><div>+    from sugar3.activity.activity import launch_bundle, get_bundle</div><div>     _HAS_BUNDLE_LAUNCHER = True</div><div> except ImportError:</div><div>     _HAS_BUNDLE_LAUNCHER = False</div></div><div><br></div><div>Take this as a formal request to break the freeze to solve this issue. </div><div><br></div><div>[1] <a href="http://wiki.sugarlabs.org/go/Features/Start_activity_from_another_activity">http://wiki.sugarlabs.org/go/Features/Start_activity_from_another_activity</a><br></div><div>[2] <a href="https://github.com/sugarlabs/browse-activity/commit/7315fe7d9d951965a7ccd6341d9bc684517cbad8">https://github.com/sugarlabs/browse-activity/commit/7315fe7d9d951965a7ccd6341d9bc684517cbad8</a></div><div>[3] <a href="https://github.com/sugarlabs/sugar/pull/548">https://github.com/sugarlabs/sugar/pull/548</a></div><div>[4] <a href="https://github.com/sugarlabs/sugar-toolkit-gtk3/pull/236">https://github.com/sugarlabs/sugar-toolkit-gtk3/pull/236</a></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div class="gmail_signature"><div dir="ltr">Gonzalo Odiard<br><br><div>SugarLabs - Software [for | by] children learning <br></div></div></div></div></div>
</div></div>