Journal integration for Scratch
tomeu at sugarlabs.org
Tue Jan 13 04:03:20 EST 2009
On Tue, Jan 13, 2009 at 06:55, Philipp Kocher <philipp.kocher at gmx.net> wrote:
> Tomeu Vizoso wrote:
>> On Mon, Jan 12, 2009 at 18:50, Bert Freudenberg <bert at freudenbergs.de>
>>> On 12.01.2009, at 18:11, Tomeu Vizoso wrote:
>>>>> So what would the Scratch activity have to do so files put into the
>>>>> (maybe by downloading) are displayed using a Scratch icon rather than
>>>>> generic document icon?
>>>> Shipping a mimetypes.xml file inside the bundle as explained here:
>>>> Sugar will call update-mime-database and will merge that file into the
>>>> xdg mime database.
>>>> I think that John is already trying this.
>>> Guess I'm confused then - I thought that's exactly what Philipp had done.
>> I think he just changed the mime_types field in the .info file.
>>> And I just checked and it does work with Etoys projects. When downloading
>>> one it indeed gets an etoys icon (although at a smaller size - why is
>> No idea, though I think that the mime database is updated in the etoys
>> rpm and not in the bundle, am I right?
> Thanks Tomeu to lead me to the /home/olpc/.local directory. However, the
> mimetypes.xml is not necessary to get the icon in the journal. I just
> had to copy the scratch icon file in the activity directory to
> "application-x-scratch-project.svg" (also in the scratch activity
> dirctory). The Memorize Activity is a good example for using that feature.
> Sugar has to be restarted after installing Scratch to show the icon.
Yes, you are right in that you don't need to mess with mimetypes.xml
if you only want to set the icon for a mime type.
mimetype.xml also serves to associate a file extension with a mime
type, and Scratch might also want this so that scratch projects copied
from a removable files are correctly identified as such.
> John, could you please make the following changes in the next Scratch
> - add the line "mime_types = application/x-scratch-project" to the
> activity.info file
> - copy the scratch icon to "application-x-scratch-project.svg" in the
> activity directory
> Etoys gets configured by different packages. e.g. the rpm
> etoys-3.0.2153-1.noarch is adding the file
> /usr/share/mime/packges/etoys.xml and the rpm sugar-artwork-0.82.3-1.olpc3
> adding the file
More information about the Devel