[Sugar-devel] mime types when moving files from journal to usb

Erik Blankinship erikb at mediamods.com
Mon Feb 14 13:36:29 EST 2011


On Sat, Feb 12, 2011 at 8:18 PM, Erik Blankinship <erikb at mediamods.com>wrote:

>
>
> On Fri, Feb 11, 2011 at 4:17 PM, Sascha Silbe <
> sascha-ml-reply-to-2011-2 at silbe.org> wrote:
>
>> Excerpts from Erik Blankinship's message of Fri Feb 11 21:08:20 +0100
>> 2011:
>>
>> > I noticed there were two svg icons in the physics activity directory:
>> >  application-x-physics-project.svg and activity-physics.svg.
>> >
>> > Is there now a way to assign an icon to the files generated/used by my
>> > activity based on their extension type?
>>
>> You already discovered that way. If you ship your icons as
>> activity/<primary_type>-<subtype>.svg Sugar will automatically install
>> them [1].
>>
>>
> Thank you for your help as I try to get this to work.
>
> I must be doing something wrong with mimetypes.xml.  Here is a very small
> activity that let's you click a button to save your game state.
> https://github.com/jedierikb/supes.activity
>
> Things broken with this activity:
> (1) The icon application-x-supes-saved.svg is not used in the journal for
> saved game files.
> (2) Activity instance files dragged to usb are not given the extension
> *.superduper
> (3) Saved game files dragged to usb are not given the extension
> *.superduper_saved
>
> [note: trying this on olpc 10.1.3, sugar 84, but would like it to work with
> sugar 84+]
>


Got this working with the help of alsroot on #sugar (thx!).  Here are some
notes for future developers and documenters:

You cannot just copy your activity into the ~/Activities directory. You have
to install it as a .xo bundle or using 'setup.py install' (note that the
latter is tricky as the command might get your paths messed up).  This
installation step will create a file
--> ~/.local/share/mime/packages/<your-bundle_id>.xml
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20110214/cd552f95/attachment.html>


More information about the Sugar-devel mailing list