Only show two decimal places for download progress percentages.
[zeroinstall.git] / zeroinstall / 0launch-gui / freshness.py
blobd69c8dcf0349da721a3d2fe96446b75af4223645
1 class Freshness(object):
2 __slots__ = ['time', 'text']
4 def __init__(self, time, text):
5 self.time = time
6 self.text = text
8 def __str__(self):
9 return self.text
11 freshness_levels = [
12 Freshness(-1, 'No automatic updates'),
13 #Freshness(60, 'Up to one minute old'),
14 #Freshness(60 * 60, 'Up to one hour old'),
15 Freshness(24 * 60 * 60, 'Up to one day old'),
16 Freshness(7 * 24 * 60 * 60, 'Up to one week old'),
17 Freshness(30 * 24 * 60 * 60, 'Up to one month old'),
18 Freshness(365 * 24 * 60 * 60, 'Up to one year old'),