From 25d418d9f52072efe75b24774de34ab5c12ee52a Mon Sep 17 00:00:00 2001 From: Artem Glebov Date: Sat, 9 Mar 2013 14:02:59 +0300 Subject: [PATCH] Show the percentage next to the progress bar in the details window --- resources/lib/gui.py | 4 +++- .../skins/Default/720p/script-Transmission-details.xml | 9 ++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/resources/lib/gui.py b/resources/lib/gui.py index ab152a1..a7a1a41 100644 --- a/resources/lib/gui.py +++ b/resources/lib/gui.py @@ -210,10 +210,11 @@ class TorrentInfoGUI(xbmcgui.WindowXMLDialog): list = self.getControl(220) labelName = self.getControl(1) labelStatus = self.getControl(2) + labelProgress = self.getControl(11) torrent = self.transmission.info()[self.torrent_id] files = self.transmission.get_files(self.torrent_id)[self.torrent_id] - statusline = "[%(status)s] %(down)s down (%(pct).2f%%), %(up)s up (Ratio: %(ratio).2f)" % \ + statusline = "[%(status)s] %(down)s down, %(up)s up (Ratio: %(ratio).2f)" % \ {'down': Bytes.format(torrent.downloadedEver), 'pct': torrent.progress, \ 'up': Bytes.format(torrent.uploadedEver), 'ratio': torrent.ratio, \ 'status': torrent.status} @@ -223,6 +224,7 @@ class TorrentInfoGUI(xbmcgui.WindowXMLDialog): labelName.setLabel(torrent.name) labelStatus.setLabel(statusline) + labelProgress.setLabel('%3d%%' % (torrent.progress)) pbar.setPercent(torrent.progress) for i, file in files.iteritems(): diff --git a/resources/skins/Default/720p/script-Transmission-details.xml b/resources/skins/Default/720p/script-Transmission-details.xml index 3e6c828..693ff7a 100644 --- a/resources/skins/Default/720p/script-Transmission-details.xml +++ b/resources/skins/Default/720p/script-Transmission-details.xml @@ -63,10 +63,17 @@ Torrent progress 20 70 - 890 + 830 30 true + + 855 + 69 + 70 + 30 + + File list