summaryrefslogtreecommitdiffstats
path: root/deluge/ui/gtk3/torrentview.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-19 15:05:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-19 15:05:49 +0000
commitd395bd510fa4f4376dc5237ab2f8d190a920d35d (patch)
tree3e3b16b44064938be801aede14381562bae14f6a /deluge/ui/gtk3/torrentview.py
parentAdding upstream version 2.0.3. (diff)
downloaddeluge-d395bd510fa4f4376dc5237ab2f8d190a920d35d.tar.xz
deluge-d395bd510fa4f4376dc5237ab2f8d190a920d35d.zip
Adding upstream version 2.1.1.upstream/2.1.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'deluge/ui/gtk3/torrentview.py')
-rw-r--r--deluge/ui/gtk3/torrentview.py20
1 files changed, 12 insertions, 8 deletions
diff --git a/deluge/ui/gtk3/torrentview.py b/deluge/ui/gtk3/torrentview.py
index fcc6edf..16de16e 100644
--- a/deluge/ui/gtk3/torrentview.py
+++ b/deluge/ui/gtk3/torrentview.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
#
# Copyright (C) 2007, 2008 Andrew Resch <andrewresch@gmail.com>
#
@@ -8,8 +7,6 @@
#
"""The torrent view component that lists all torrents in the session."""
-from __future__ import unicode_literals
-
import logging
from locale import strcoll
@@ -77,13 +74,13 @@ def eta_column_sort(model, iter1, iter2, data):
if v1 == v2:
return 0
if v1 == 0:
- return 1
- if v2 == 0:
return -1
- if v1 > v2:
+ if v2 == 0:
return 1
- if v2 > v1:
+ if v1 > v2:
return -1
+ if v2 > v1:
+ return 1
def seed_peer_column_sort(model, iter1, iter2, data):
@@ -107,7 +104,7 @@ def progress_sort(model, iter1, iter2, sort_column_id):
return cmp(progress1, progress2)
-class SearchBox(object):
+class SearchBox:
def __init__(self, torrentview):
self.torrentview = torrentview
mainwindow = component.get('MainWindow')
@@ -404,6 +401,13 @@ class TorrentView(ListView, component.Component):
status_field=['last_seen_complete'],
default=False,
)
+ self.add_func_column(
+ _('Last Transfer'),
+ funcs.cell_data_time,
+ [int],
+ status_field=['time_since_transfer'],
+ default=False,
+ )
self.add_texticon_column(
_('Tracker'),
function=funcs.cell_data_trackericon,