[GTKUI] Fix date columns to use int not float
This commit is contained in:
parent
3767a9fd27
commit
239e679fee
|
@ -267,11 +267,11 @@ class TorrentView(ListView, component.Component):
|
||||||
status_field=["ratio"], default=False)
|
status_field=["ratio"], default=False)
|
||||||
self.add_func_column(_("Avail"), funcs.cell_data_ratio_avail, [float],
|
self.add_func_column(_("Avail"), funcs.cell_data_ratio_avail, [float],
|
||||||
status_field=["distributed_copies"], default=False)
|
status_field=["distributed_copies"], default=False)
|
||||||
self.add_func_column(_("Added"), funcs.cell_data_date_added, [float],
|
self.add_func_column(_("Added"), funcs.cell_data_date_added, [int],
|
||||||
status_field=["time_added"], default=False)
|
status_field=["time_added"], default=False)
|
||||||
self.add_func_column(_("Completed"), funcs.cell_data_date_completed, [float],
|
self.add_func_column(_("Completed"), funcs.cell_data_date_completed, [int],
|
||||||
status_field=["completed_time"], default=False)
|
status_field=["completed_time"], default=False)
|
||||||
self.add_func_column(_("Complete Seen"), funcs.cell_data_date_or_never, [float],
|
self.add_func_column(_("Complete Seen"), funcs.cell_data_date_or_never, [int],
|
||||||
status_field=["last_seen_complete"], default=False)
|
status_field=["last_seen_complete"], default=False)
|
||||||
self.add_texticon_column(_("Tracker"), function=funcs.cell_data_trackericon,
|
self.add_texticon_column(_("Tracker"), function=funcs.cell_data_trackericon,
|
||||||
status_field=["tracker_host", "tracker_host"], default=False)
|
status_field=["tracker_host", "tracker_host"], default=False)
|
||||||
|
|
|
@ -269,7 +269,7 @@ def cell_data_date(column, cell, model, row, data, key):
|
||||||
return
|
return
|
||||||
func_last_value[key] = date
|
func_last_value[key] = date
|
||||||
|
|
||||||
date_str = common.fdate(date) if date > 0.0 else ""
|
date_str = common.fdate(date) if date > 0 else ""
|
||||||
cell.set_property('text', date_str)
|
cell.set_property('text', date_str)
|
||||||
|
|
||||||
cell_data_date_added = partial(cell_data_date, key="cell_data_date_added")
|
cell_data_date_added = partial(cell_data_date, key="cell_data_date_added")
|
||||||
|
@ -284,5 +284,5 @@ def cell_data_date_or_never(column, cell, model, row, data):
|
||||||
return
|
return
|
||||||
func_last_value["cell_data_date_or_never"] = value
|
func_last_value["cell_data_date_or_never"] = value
|
||||||
|
|
||||||
date_str = common.fdate(value) if value > 0.0 else _("Never")
|
date_str = common.fdate(value) if value > 0 else _("Never")
|
||||||
cell.set_property('text', date_str)
|
cell.set_property('text', date_str)
|
||||||
|
|
Loading…
Reference in New Issue