[#2753] [GTKUI] Fix 'Added' column showing wrong date

* Unsure why added_time would be zero but only set the date if it is a postive value.
This commit is contained in:
Calum Lind 2015-09-28 13:10:56 +01:00
parent ad7e519fb2
commit 099a4eb8c6
1 changed files with 7 additions and 1 deletions

View File

@ -100,7 +100,13 @@ def cell_data_ratio(column, cell, model, row, data):
def cell_data_date(column, cell, model, row, data):
"""Display value as date, eg 05/05/08"""
cell.set_property('text', deluge.common.fdate(model.get_value(row, data)))
date = model.get_value(row, data)
if date <= 0:
date_str = ""
else:
date_str = deluge.common.fdate(date)
cell.set_property('text', date_str)
def cell_data_speed_limit(column, cell, model, row, data):
"""Display value as a speed, eg. 2 KiB/s"""