Re: [Sugar-devel] mime types when moving files from journal to usb
On Sat, Feb 12, 2011 at 8:18 PM, Erik Blankinship er...@mediamods.comwrote: On Fri, Feb 11, 2011 at 4:17 PM, Sascha Silbe sascha-ml-reply-to-201...@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 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] mime types when moving files from journal to usb
Excerpts from Erik Blankinship's message of Mon Feb 14 19:36:29 +0100 2011: Got this working with the help of alsroot on #sugar (thx!). Nice. Are any of your questions still left unanswered regarding interacting with external storage media? Sascha -- http://sascha.silbe.org/ http://www.infra-silbe.de/ signature.asc Description: PGP signature ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] mime types when moving files from journal to usb
On Mon, Feb 14, 2011 at 2:08 PM, Sascha Silbe si...@sugarlabs.org wrote: Excerpts from Erik Blankinship's message of Mon Feb 14 19:36:29 +0100 2011: Got this working with the help of alsroot on #sugar (thx!). Nice. Are any of your questions still left unanswered regarding interacting with external storage media? I have at least one more question. Sometimes custom icons for datastore entries generated by my activity don't appear until I restart sugar. Why is that? Should a bug be filed? ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] mime types when moving files from journal to usb
On Mon, Feb 14, 2011 at 05:21:57PM -0500, Art Hunkins wrote: FWIW, I've experienced no problems simply copying my activities into the Activities directory (from a USB drive). cp -r does just fine. If your activity does not register any mimetype, then it won't matter. If your activity was already properly installed (with sugar-install-bundle), then copying new source into Activities will not be affected by this problem unless the new source registers a new mimetype that the old source did not. The OLPC OS Builder also unzips the .xo file into the Activities folder, and this causes the same problem. We're tracking this at OLPC as http://dev.laptop.org/ticket/10427 -- James Cameron http://quozl.linux.org.au/ ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] mime types when moving files from journal to usb
Art, Based on my experience, installing activities with cp -r works fine -- * except* for some mimetypes.xml behavior: (1) Custom svg icons are not used in the journal for datastore entries. (2) Files dragged to usb are not given custom mimetype extensions. On Mon, Feb 14, 2011 at 5:21 PM, Art Hunkins abhun...@uncg.edu wrote: FWIW, I've experienced no problems simply copying my activities into the Activities directory (from a USB drive). cp -r does just fine. Art Hunkins - Original Message - *From:* Erik Blankinship er...@mediamods.com *To:* Sugar Devel sugar-devel@lists.sugarlabs.org *Sent:* Monday, February 14, 2011 1:36 PM *Subject:* Re: [Sugar-devel] mime types when moving files from journal to usb On Sat, Feb 12, 2011 at 8:18 PM, Erik Blankinship er...@mediamods.comwrote: On Fri, Feb 11, 2011 at 4:17 PM, Sascha Silbe sascha-ml-reply-to-201...@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 -- ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] mime types when moving files from journal to usb
On Fri, Feb 11, 2011 at 4:17 PM, Sascha Silbe sascha-ml-reply-to-201...@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+] ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] mime types when moving files from journal to usb
My video game runs in both gnome and sugar. I want kids to be able to move saved games back and forth between these platforms with ease. I have created a mime-type for saved files in my video game: application/x-my-cool-game. Datastore entries' metadata are saved with this mime-type. When a video game saved file is dragged to a usb stick, the mime-type is thrown away (replaced with application/octet-stream), while dragging journal entries to usb with mime-type application/x-tar (1) keep their mime type (2) are given a nice .gtar extension to make their life easier in the world outside of sugar. Can I give the same benefits (keep mime-type, get an extension) to files copied from the journal to a usb stick using my own custom mime-type? The ugly alternative, as I see it, is to make all of my journal entries' titles' metadata have extensions added to them at creation -- this will make for a messy looking journal. But at least the files will have the right extension for their life in gnome. ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] mime types when moving files from journal to usb
You need add a mimetypes.xml file to your activity. look at Physics activity Gonzalo On Fri, Feb 11, 2011 at 4:24 PM, Erik Blankinship er...@mediamods.comwrote: My video game runs in both gnome and sugar. I want kids to be able to move saved games back and forth between these platforms with ease. I have created a mime-type for saved files in my video game: application/x-my-cool-game. Datastore entries' metadata are saved with this mime-type. When a video game saved file is dragged to a usb stick, the mime-type is thrown away (replaced with application/octet-stream), while dragging journal entries to usb with mime-type application/x-tar (1) keep their mime type (2) are given a nice .gtar extension to make their life easier in the world outside of sugar. Can I give the same benefits (keep mime-type, get an extension) to files copied from the journal to a usb stick using my own custom mime-type? The ugly alternative, as I see it, is to make all of my journal entries' titles' metadata have extensions added to them at creation -- this will make for a messy looking journal. But at least the files will have the right extension for their life in gnome. ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] mime types when moving files from journal to usb
Thanks Gonzalo! I think that solves my problem. 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? On Fri, Feb 11, 2011 at 2:33 PM, Gonzalo Odiard gonz...@laptop.org wrote: You need add a mimetypes.xml file to your activity. look at Physics activity Gonzalo On Fri, Feb 11, 2011 at 4:24 PM, Erik Blankinship er...@mediamods.comwrote: My video game runs in both gnome and sugar. I want kids to be able to move saved games back and forth between these platforms with ease. I have created a mime-type for saved files in my video game: application/x-my-cool-game. Datastore entries' metadata are saved with this mime-type. When a video game saved file is dragged to a usb stick, the mime-type is thrown away (replaced with application/octet-stream), while dragging journal entries to usb with mime-type application/x-tar (1) keep their mime type (2) are given a nice .gtar extension to make their life easier in the world outside of sugar. Can I give the same benefits (keep mime-type, get an extension) to files copied from the journal to a usb stick using my own custom mime-type? The ugly alternative, as I see it, is to make all of my journal entries' titles' metadata have extensions added to them at creation -- this will make for a messy looking journal. But at least the files will have the right extension for their life in gnome. ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] mime types when moving files from journal to usb
Excerpts from Erik Blankinship's message of Fri Feb 11 20:24:39 +0100 2011: I have created a mime-type for saved files in my video game: application/x-my-cool-game. Datastore entries' metadata are saved with this mime-type. [...] I'll repeat my recommendation [1] to read my explanations of Journal- USB stick interactions [2]. While there have been recent changes to this area (currently only in OLPC builds), you'll have the best overall experience (including Gnome interoperation) if you provide a matching mimetypes.xml [3]. Sascha [1] http://lists.sugarlabs.org/archive/sugar-devel/2010-December/029375.html [2] http://lists.sugarlabs.org/archive/sugar-devel/2010-October/thread.html#27983 [3] http://git.sugarlabs.org/fototoon/mainline/blobs/master/activity/mimetypes.xml -- http://sascha.silbe.org/ http://www.infra-silbe.de/ signature.asc Description: PGP signature ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] mime types when moving files from journal to usb
I don't know if is possible assign a icon to a mime type. Gonzalo On Fri, Feb 11, 2011 at 5:08 PM, Erik Blankinship er...@mediamods.comwrote: Thanks Gonzalo! I think that solves my problem. 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? On Fri, Feb 11, 2011 at 2:33 PM, Gonzalo Odiard gonz...@laptop.orgwrote: You need add a mimetypes.xml file to your activity. look at Physics activity Gonzalo ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] mime types when moving files from journal to usb
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]. Sascha [1] http://git.sugarlabs.org/sugar-toolkit/mainline/blobs/master/src/sugar/bundle/activitybundle.py#line368 -- http://sascha.silbe.org/ http://www.infra-silbe.de/ signature.asc Description: PGP signature ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel