<div dir="ltr">I am trying to solve AU ticket #2439 in a way than can be upstreamed.<div><br></div><div>The problem is with the limitations about how we define our generic mime types.</div><div>In this case, "Text files" are defined as all the files than can be edited by Write,</div>
<div>but that is not useful for Read, because can't open open office or abiword files</div><div>and crashes.</div><div><br></div><div>A similar problem happen in the Jukebox activity, because we have defined "Audio files"</div>
<div>and "Video Files", but not "Multimedia" or "Audio and Video".</div><div><br></div><div>Looking at the code, I found is possible do:</div><div><br></div><div>chooser = ObjectChooser(None, what_filter=self.get_bundle_id())<br>
</div><div><div><br></div><div style>instead of:</div><div style><br></div><div style>chooser = ObjectChooser(None, what_filter=mime.GENERIC_TYPE_TEXT)<br></div><div style><br></div><div style>and that work in the Journal, filtering all the files availables for the activity.</div>
<div style><br></div><div style>I think this is good to know for activity developers.</div><div style><br></div><div style>This does not work in Documents or external devices, the "activity" parameter </div><div style>
is ignored. I filled the ticket [2] and will provide a patch</div><div style><br></div><div style>Gonzalo</div><div><br></div><div>[1] <a href="https://sugardextrose.org/issues/2439">https://sugardextrose.org/issues/2439</a></div>
</div><div><br></div><div>[2] <a href="http://bugs.sugarlabs.org/ticket/4523">http://bugs.sugarlabs.org/ticket/4523</a> </div></div>