<br><br><div class="gmail_quote">On Tue, Dec 11, 2012 at 2:07 AM, Manuel Quiñones <span dir="ltr"><<a href="mailto:manuq@laptop.org" target="_blank">manuq@laptop.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Ajay,<br>
<br>
first, thanks for helping on this.<br></blockquote><div><br>My pleasure :)<br><br> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
2012/12/10 Ajay Garg <<a href="mailto:ajay@activitycentral.com">ajay@activitycentral.com</a>>:<br>
<div class="im">> This issue happens, when ".xo" files need to be rendered in the listview in non-journal locations.<br>
> In such cases, these files have no "activity" or "bundle_id" fields in their metadata.<br>
><br>
> Thus, the current way to know the icon-file-name for such ".xo" files was to expand the zipped files, and write out the icon-files at pseudo-permanent storage,  at /tmp.<br>
><br>
> However, before the icon-file could be used by the listview to "pick up" the icon bytes, it was  being  garbage-collected.<br>
<br>
</div>Are you sure about this assumption?  How can you explain that the<br>
icons are visible in the palette and in the details view?  I tested<br>
with a stick which has a .xo file inside.<br>
<br>
1. ls /tmp - no svg files<br>
<br>
2. open Journal - I can see this:<br>
<a href="http://bugs.sugarlabs.org/attachment/ticket/4276/test-wrong-icon.png" target="_blank">http://bugs.sugarlabs.org/attachment/ticket/4276/test-wrong-icon.png</a><br>
<br>
3. ls /tpm - now I can see two svg files<br>
<br>
So seems your assumption is wrong.<br></blockquote><div><br><br>I also noticed that some files are there in the "/tmp" directory; however when I tried finding the file by the name @<return value of function in def get_icon(self)>, I could not find a file with that  name in "/tmp".<br>
<br>Regarding the appearance in the right-click palette, I presumed that since doing a right-click generates a NEW palette everytime, so it works.<br>But for the listview, the activity-icons are displayed  via the "file-name" property in CellRendererActivityIcon (in src/jarabe/journal/listview.py). So, it could be that once that with scrolling in the list-view, re-rendering the icon using the non-refreshed "file-name" property, might be causing the bug.<br>
<br>However, in  any case, the space- and time-optimizations make me lean towards this one-time-icon-file-per-activity-writing approach.<br></div></div><br clear="all"><br><br><font face="arial, sans-serif">Regards,<br><br>
Ajay Garg</font><br style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><font face="arial, sans-serif">Dextrose Developer</font><br style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Activity Central: </span><a href="http://activitycentral.com/" style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)" target="_blank">http://activitycentral.com</a><br>