Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrés Ambrois <andresambrois@gmail.com>2010-05-23 07:21:37 (GMT)
committer Andrés Ambrois <andresambrois@gmail.com>2010-08-24 20:30:10 (GMT)
commitbc1edfa2193ca554d385c68e43c2cef0b9795a54 (patch)
tree45e1aeb1b0688a8f333d54c60454575d6441d8b2
parentdbcd0223a87815d3b0d8c79061046d52c4418922 (diff)
Expandedentry: Try to use the filesize property.
Instead of calling the datastore again. Signed-off-by: Andrés Ambrois <andresambrois@gmail.com>
-rw-r--r--src/jarabe/journal/expandedentry.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/jarabe/journal/expandedentry.py b/src/jarabe/journal/expandedentry.py
index c8e40c1..725c0f9 100644
--- a/src/jarabe/journal/expandedentry.py
+++ b/src/jarabe/journal/expandedentry.py
@@ -260,8 +260,9 @@ class ExpandedEntry(hippo.CanvasBox):
lines = [
_('Kind: %s') % (self._metadata.get('mime_type') or _('Unknown'),),
_('Date: %s') % (self._format_date(),),
- _('Size: %s') % (format_size(model.get_file_size(
- self._metadata['uid'])),)]
+ _('Size: %s') % (format_size(int(self._metadata.get('filesize',
+ model.get_file_size(self._metadata['uid']))))),
+ ]
for line in lines:
text = hippo.CanvasText(text=line,