[Sugar-devel] [PATCH] Fix for file list sorting for FAT32 formatted flash drives in Journal.

2010-05-12 Thread Kenny Meyer
Bernie, and I have had a special situation where a flash drive, which
has been formatted on Windows with (apparently) a FAT32 file-system.
Some of the files on the flash drive had a negative `changetime`, which
resulted in automatically making the `changetime` of type long, whereas
the sort() function expected an integer.

This behaviour was reproduced on sugar-0.84.16. Should be backported to
older versions. [?]
---
 src/jarabe/journal/model.py |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/jarabe/journal/model.py b/src/jarabe/journal/model.py
index 50e8dc1..5abab07 100644
--- a/src/jarabe/journal/model.py
+++ b/src/jarabe/journal/model.py
@@ -289,7 +289,7 @@ class InplaceResultSet(BaseResultSet):
 self._stopped = True
 
 def setup_ready(self):
-self._file_list.sort(lambda a, b: b[2] - a[2])
+self._file_list.sort(lambda a, b: cmp(b[2], a[2]))
 self.ready.send(self)
 
 def find(self, query):
-- 
1.7.0.4

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [DESIGN] Show file size in Journal

2010-04-07 Thread Kenny Meyer
Hey,

Bernie and I have been discussing about showing the file size in Journal view
of Sugar 0.84.x, because:

 bernie | km0r3: kids really want to know how big their files are 

Now, I thought of an extra column Size, showing the size of the file in
bytes.

1000 Bytes - 1Kbyte
1000 kB- 1Mbyte
[...]

Follow-up questions:
1) What to do if filesize is 0/none ?
2) Display the file size optionally?

-- 
  Kenny Meyer


signature.asc
Description: Digital signature
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Ticket #245 - More information needed

2010-03-18 Thread Kenny Meyer
James Cameron (qu...@laptop.org) wrote:
 G'day Kenny,
 
 Thanks for taking ownership of the ticket.  You mentioned you didn't
 know if the same behaviour is being reproduced on the XO, so I did some
 testing for you and added my findings to the ticket.  Hope that helps.
 
 -- 
 James Cameron
 http://quozl.linux.org.au/
 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel
 

Hi James,

The comparison table you've created is excellent!

Thank you very much for your time.

-- 
  Kenny Meyer
  Software Geek | http://kenny.alwaysdata.net

  Shoot for the moon, even if you miss, you'll land amongst the stars..
- Les Brown


signature.asc
Description: Digital signature
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel