diff --git a/deluge/ui/gtkui/listview.py b/deluge/ui/gtkui/listview.py
index 9a2aed9..c233eb0 100644
a
|
b
|
def cell_data_date(column, cell, model, row, data): |
103 | 103 | """Display value as date, eg 05/05/08""" |
104 | 104 | cell.set_property('text', deluge.common.fdate(model.get_value(row, data))) |
105 | 105 | |
| 106 | def cell_data_speed_limit(column, cell, model, row, data): |
| 107 | """Display value as a speed, eg. 2 KiB/s""" |
| 108 | speed = model.get_value(row, data) |
| 109 | speed_str = "" |
| 110 | if speed > 0: |
| 111 | speed_str = "%s %s" % ( |
| 112 | speed, _("KiB/s")) |
| 113 | |
| 114 | cell.set_property('text', speed_str) |
| 115 | |
106 | 116 | class ListViewColumnState: |
107 | 117 | """Used for saving/loading column state""" |
108 | 118 | def __init__(self, name, position, width, visible, sort, sort_order): |
diff --git a/deluge/ui/gtkui/torrentview.py b/deluge/ui/gtkui/torrentview.py
index 46d9dbc..9623112 100644
a
|
b
|
def __init__(self): |
231 | 231 | status_field=["download_payload_rate"]) |
232 | 232 | self.add_func_column(_("Up Speed"), listview.cell_data_speed, [float], |
233 | 233 | status_field=["upload_payload_rate"]) |
| 234 | self.add_func_column(_("Down Limit"), listview.cell_data_speed_limit, [float], |
| 235 | status_field=["max_download_speed"]) |
| 236 | self.add_func_column(_("Up Limit"), listview.cell_data_speed_limit, [float], |
| 237 | status_field=["max_upload_speed"]) |
234 | 238 | self.add_func_column(_("ETA"), listview.cell_data_time, [int], |
235 | 239 | status_field=["eta"], sort_func=eta_column_sort) |
236 | 240 | self.add_func_column(_("Ratio"), listview.cell_data_ratio, [float], |