On Fri, May 8, 2009 at 17:35, Bert Freudenberg <b...@freudenbergs.de> wrote: > On 08.05.2009, at 17:03, James Simmons wrote: > >> Aleksey, >> >> I was interested in your comment about wrapping Object Chooser for >> backward compatibility. Currently both of my Activities use Object >> Chooser, but don't make any attempt to limit what Journal entries >> can be chosen. I would like to limit Read Etexts to the MIME types >> text/plain and application/zip, and View Slides to just application/ >> zip. In Sayamindu's code he is using mime.GENERIC_TYPE_IMAGE. >> There does not seem to be anything comparable that would select what >> I want selected. I'm looking at the code for sugar.mime here: >> >> http://api.sugarlabs.org/sugar.mime-pysrc.html >> >> I'm wondering if I could make my own filter in my own Activities >> that would limit the Object Chooser to just plain text and Zip >> files. I would of course follow your suggestion for backward >> compatibility. >> >> James Simmons > > This was discussed several times, last I think in this thread: > > http://lists.sugarlabs.org/archive/sugar-devel/2008-October/009118.html > > IMHO it would be quite a bit more useful than the restricted interface > we have now. You could build such a chooser yourself using the > datastore.find(query) function. But adding a similar "query" parameter > to the object chooser was deemed too powerful, possibly unsupportable > once the datastore was rewrittten. Maybe a list of mime types would be > acceptable to add, though?
A bigger problem than the DS support is the UI. You currently can only pass programatically a generic type such as Image instead of individual mime types because the UI has only a way to change the generic type. Ideas? Thanks, Tomeu _______________________________________________ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel