[#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:
parent
ad7e519fb2
commit
099a4eb8c6
|
@ -100,7 +100,13 @@ def cell_data_ratio(column, cell, model, row, data):
|
||||||
|
|
||||||
def cell_data_date(column, cell, model, row, data):
|
def cell_data_date(column, cell, model, row, data):
|
||||||
"""Display value as date, eg 05/05/08"""
|
"""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):
|
def cell_data_speed_limit(column, cell, model, row, data):
|
||||||
"""Display value as a speed, eg. 2 KiB/s"""
|
"""Display value as a speed, eg. 2 KiB/s"""
|
||||||
|
|
Loading…
Reference in New Issue