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

James Cameron quozl at laptop.org
Fri Jul 3 02:54:20 EDT 2015


On Fri, Jul 03, 2015 at 07:14:47AM +0200, Tony Anderson wrote:
> As I understand it, the release of 0.106 is to be made on Monday.

Yes.

> This does not seem to warrant a delay in that release.

This is maintainer Martin's decision that you're offering your opinion
on, but I'll offer a countering opinion; the delay is warranted
because:

1.  the problem at hand is a defect in a new feature being added to
the release, and it need not be.  The feature can be dropped or fixed.

2.  the delay, if any, is minimal, of the order of hours to break the
code freeze to either revert patches or merge the pull requests.

The risk is low.  The new pull requests have been reviewed, and tested
on Fedora 18, 21, 22, and Ubuntu.

The benefit is good.

I'm fine with either feature drop or fix.  I prefer fix.  I'm against
releasing 0.105.3 as 0.106 without change.

Thanks to Sam for pushing the feature through the process.

http://wiki.sugarlabs.org/go/Development_Team/Release#Hard_code_freeze
http://wiki.sugarlabs.org/go/Features/Start_activity_from_another_activity

> Moving a capability from sugar or sugar3 to the toolkit doesn't
> imply a visible change to the api as seen by an activity developer.

The new patch is not a moving of capability, but adding a capability
that does not exist in the activity toolkit.

Gonzalo is correct that activities should not use the Sugar internal
API, because it is not controlled, and not intended for use by
activities.

Until Browse 157.1, none of the activities have "from jarabe".  Jarabe
is a reference to the internal API.

@Gonzalo, we will also need a new Browse release.

@Tony, the rest of your mail is orthogonal; a discussion of the
feature and use case.  It's a bit late for that, unless the feature is
dropped and needs to go back to design phase.  I'd like to rule it out
of order, but there's a couple of things to say ...

> I don't understand the assumption that downloading a file in Browse
> to the Journal implies that the user wants to access it
> immediately.

It doesn't assume that.  I doubt you've even tested this?  It offers
to access it, but does not require it.  There's no new dialog; it used
to be the download completed dialog.

> For example, if I download 'War and Peace', I may want to read it
> when I get the laptop home, not in class. For use with the
> schoolserver, it was necessary to patch Browse to download a pdf to
> the Journal and not load it into a new window. I need to do this
> also for txt books from Rachel. Fortunately, Browse downlaods epub
> directly to the Journal (the format of the Gutenberg books in
> Internet in a Box).
> 
> Browse itself is a problem in this scenario. It (along with the
> Terminal activity) is an exception by providing tabs. It would be
> useful if the launch facility would open a new tab and not launch a
> new instance of Browse when it is already running.
> 
> Launching activities based on mime_type is already a problem. How is
> one activity to know whether Browse or Etoys or ImageViewer or Paint
> wiil respond to a launch request for an image.
> 
> How is one activity going to determine the activity id (The
> activity id (e.g., 6f7f3acacca87886332f50bdd522d805f0abbf1f) of type
> STRING as passed on the [1] command line) of another activity?
> 
> Originally, sugar-launch was to pass through options -u (uri) and -o
> (object_id). The version I use does this, so the following code in
> an activity displays an svg:
> 
> sugar-launch -u 'file:///home/olpc/Documents/my.svg' org.laptop.WebActivity
> 
> Similarly, an activity can use the datastore class to get an
> object_id and use the -o option to, in effect, resume an activity
> from the Journal.
> 
> The only 'trick' is to run sugar-launch from the activity. However,
> this works:
> 
> from subprocess import call
> 
> call('sugar-launch -u 'file:///home/olpc/Documents/my.svg'
> org.laptop.WebActivity', shell=True)
> 
> In the context of the GSOC project, it is important that the Web
> Confusion activity be able to pass a specific html file to Browse
> for use with the interactive javascript shell. This capability is
> satisfied by sugar-launch with the -u option. However, sugar-launch
> uses optparse which is deprecated in Python 2.7 so the version I am
> using now has been modified it to use argparse.

No, sugar-launch uses argparse, please catch up.

> Using datastore, an activity can launch, for example, Memorize with
> a specific 'game'. So, for example, a teacher is introducing Roman
> numerals. The 'lesson' activity could resume Memorize from the
> Journal with a game on Roman numerals (previously downloaded from
> the school server).
> 
> It would seem appropriate to keep the release schedule and do some
> rethinking in the use cases for this feature. Sugar-launch launches
> the activity by the command line and so uses Sugar to perform the
> launch. It would be easy to provide this mechanism to an activity
> avoiding the 'subprocess' call (although that is hardly a difficult
> interface). This new feature should at least provide the
> functionality of sugar-launch.

I disagree.  What you describe is a new feature different to the
feature already completed.  You can raise a new feature if you like.

-- 
James Cameron
http://quozl.linux.org.au/


More information about the Sugar-devel mailing list