From 8a261b26e8de8abff3d6fc2abc9d0715fee293e7 Mon Sep 17 00:00:00 2001 From: Asmageddon Date: Wed, 7 Mar 2012 20:09:57 +0100 Subject: [PATCH] Revamped info command detailed file view so it now shows a pretty tree look and made it ensure at least 8 characters of torrent ID get printed before deciding not to wrap to next line in the default, compact view --- deluge/ui/console/commands/info.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deluge/ui/console/commands/info.py b/deluge/ui/console/commands/info.py index 1d0da4f39..432d8f8ab 100644 --- a/deluge/ui/console/commands/info.py +++ b/deluge/ui/console/commands/info.py @@ -341,7 +341,8 @@ class Command(BaseCommand): #Shorten the ID if it's necessary. Pretty hacky #I _REALLY_ should make a nice function for it that can partition and shorten stuff space_left = cols - strwidth("[s] 100.00% " + status["name"] + " "*3) - 2 - if space_left >= len(torrent_id) - 2: + + if space_left - 8 >= len(torrent_id): #There's enough space, print it s += " {!cyan!}%s" % torrent_id else: