<div dir="ltr">Replaying to myself.<div><br></div><div style>Filtering by activity have a problem right now: show the objects in the journal filtered by activity. </div><div style>While solve the Read problem, and probably is good for Jukebox, </div>
<div style>is a problem by example for ImageViewer and Paint.</div><div style>Both can open images, but like the Journal filter by activity, will show only</div><div style>the images opened the last time by the activity used as filter.</div>
<div style>Example:</div><div style>* Draw something with Paint</div><div style>* In the Journal will be seen filtered by Paint but not by ImageViewer.</div><div style>* Open the same draw using ImageViewer</div><div style>
* In the Journal will be seen filtered by ImageViewer but not by Paint.</div><div style><br></div><div style>I think this is a bug, not a feature.</div><div style><br></div><div style>What you think about switch to filter by all the mime type the activity selected can open?</div>
<div style><br></div><div style>Gonzalo </div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 13, 2013 at 9:48 AM, Gonzalo Odiard <span dir="ltr"><<a href="mailto:gonzalo@laptop.org" target="_blank">gonzalo@laptop.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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>instead of:</div><div><br></div><div>chooser = ObjectChooser(None, what_filter=mime.GENERIC_TYPE_TEXT)<br></div><div><br></div><div>and that work in the Journal, filtering all the files availables for the activity.</div>

<div><br></div><div>I think this is good to know for activity developers.</div><div><br></div><div>This does not work in Documents or external devices, the "activity" parameter </div><div>
is ignored. I filled the ticket [2] and will provide a patch</div><div><br></div><div>Gonzalo</div><div><br></div><div>[1] <a href="https://sugardextrose.org/issues/2439" target="_blank">https://sugardextrose.org/issues/2439</a></div>

</div><div><br></div><div>[2] <a href="http://bugs.sugarlabs.org/ticket/4523" target="_blank">http://bugs.sugarlabs.org/ticket/4523</a> </div></div>
</blockquote></div><br></div>