[Sugar-devel] [Feature] Start an activity from another, activity

Gonzalo Odiard godiard at sugarlabs.org
Thu Apr 23 10:34:36 EDT 2015


On Thu, Apr 23, 2015 at 11:12 AM, Tony Anderson <tony_anderson at usa.net>
wrote:

> Hi, Gonzalo
>
> Browse (as most browsers) downloads any mime_type it does not know how to
> display. I modified Browse not to display pdf (should be done in the Read
> activity).
> The Read activity does not display plain text (e.g. Rachel Gutenberg
> collection - Great Books). This is something that probably should be
> addressed.
>

This is not correct. Read can display text files. If you have any text file
tat can't be opened by Read activity,
send it to me.


>
> The Show in Journal doesn't really seem to have any significance (like
> switch to the Journal). Similarly Continue is a place holder. The only
> button is 'OK' which must be clicked to get rid of the alert.
>
> All I am suggesting is that you can patch Browse to use Sugar-launch to
> open the activity you want (e.g. Read).
>

No. Because then you need implement in Browse the logic to know what
activity
can open every type of file (sugar-launch need you specify the bundle_id)
Another reason to not do that is sugar-launch is part of sugar, not the
toolkit,
and the activities should use the toolkit code, no sugar code (even when
that is not
always respected)/


> So far, I have found more confusion by the choice of default activities to
> open certain mime_types. Currently, it appears that if there is only one
> activity to handle a mime_type, it is opened by clicking on the icon. If
> there is more than one activity, the top one is the default and is launched
> by a click - except when the menu opens with 'start with' or 'resume width'
> (I am not sure of the difference there - but it adds text to any
> instructions). If there is no activity to handle the mime_type, the resume
> option is not available.
>
>
Yes. That is the expected behavior. What is confusing?
Sugar configure default activities for mime types where there are more than
one available
(in the file data/mime.defaults)


> I am not sure moving this logic to Browse will enable automatic
> identification of which activity is appropriate to open a mime_type
> serviced by more than one.
>

The logic is not moved to Browse. Is moved to sugar-toolkit-gtk3, where
every activity, and sugar itself
can share the same logic.

Gonzalo


> I guess I am not clear on what problem you are trying to solve.
>
Tony
>
>
> On 04/23/2015 03:54 PM, Gonzalo Odiard wrote:
>
>> Hi Tony,
>> This feature try implement that in a smarter way.
>> Here a example:
>> * You download something in Browse.
>> * Browse can't manage every possible file. We include a pdf viewer,
>> but by example, we can't show a epub file in the browser or a piece
>> TurtleArt code.
>> * Right now Browse save the downloaded file in the Journal
>> and display a button "Show in Journal", because the Journal knows
>> what activity can open every file type.
>> * The idea is move that logic (the relation between file types and
>> activities)
>> to the toolkit, then Browse can say "Open this...."
>> and start any activity needed to open the file, or show a message
>> "You don't have any activity to open this file"
>> There are more information in the feature page in the wiki [1]
>>
>> Gonzalo
>>
>
>


-- 
Gonzalo Odiard

SugarLabs - Software for children learning
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20150423/bec2b76f/attachment.html>


More information about the Sugar-devel mailing list