[Sugar-devel] Journal integration for Scratch

Eben Eliason eben at laptop.org
Mon Jan 12 12:16:17 EST 2009


On Mon, Jan 12, 2009 at 12:11 PM, Tomeu Vizoso <tomeu at sugarlabs.org> wrote:
> On Mon, Jan 12, 2009 at 18:07, Bert Freudenberg <bert at freudenbergs.de> wrote:
>>
>> On 12.01.2009, at 17:55, Tomeu Vizoso wrote:
>>
>>> On Mon, Jan 12, 2009 at 17:38, Bert Freudenberg <bert at freudenbergs.de>
>>> wrote:
>>>>
>>>> On 12.01.2009, at 17:03, Tomeu Vizoso wrote:
>>>>
>>>>> On Mon, Jan 12, 2009 at 16:52, Bert Freudenberg <bert at freudenbergs.de>
>>>>> wrote:
>>>>>>
>>>>>> On 12.01.2009, at 10:16, Tomeu Vizoso wrote:
>>>>>>
>>>>>>> Ok, what you just did will tell Sugar that Scratch is able to open
>>>>>>> files with the mime type 'application/x-scratch-project'. But this
>>>>>>> will not affect the icon of those files.
>>>>>>
>>>>>> Is there a way to assign icons for files other than by saving it in an
>>>>>> activity?
>>>>>
>>>>> Currently, only by changing the mime-type.
>>>>
>>>>
>>>> Maybe I misunderstood then. How is the icon for a mime type such as
>>>> application/x-scratch-project found then?
>>>
>>> We are using the xdg mime database, the mimetypes.xml file contained
>>> in activities is added to that database. So that's the mechanism
>>> through which activities can associate icons to mime types.
>>
>>
>> So what would the Scratch activity have to do so files put into the Journal
>> (maybe by downloading) are displayed using a Scratch icon rather than the
>> generic document icon?
>
> Shipping a mimetypes.xml file inside the bundle as explained here:
>
> http://wiki.laptop.org/go/Activity_bundles#Bundle_Structure
>
> Sugar will call update-mime-database and will merge that file into the
> xdg mime database.

What does this merge do with conflicts?  It seems we might need a way
for the most recent activity which has used a given object to apply
its own icon for it, which isn't covered by this case.  Would the most
recently installed activity trump the rest?

- Eben


> I think that John is already trying this.
>
> Regards,
>
> Tomeu
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>


More information about the Sugar-devel mailing list