Show the percentage next to the progress bar in the main window

This commit is contained in:
Artem Glebov 2013-03-10 13:36:10 +03:00
parent 25d418d9f5
commit 056a96e435
2 changed files with 17 additions and 3 deletions

View file

@ -89,7 +89,7 @@ class TransmissionGUI(xbmcgui.WindowXMLDialog):
l.setLabel2(statusline) l.setLabel2(statusline)
l.setProperty('TorrentStatusIcon', statusicons[torrent.status]) l.setProperty('TorrentStatusIcon', statusicons[torrent.status])
l.setProperty('TorrentID', str(i)) l.setProperty('TorrentID', str(i))
l.setProperty('TorrentProgress', "%.2f" % torrent.progress) l.setProperty('TorrentProgress', "%3d%%" % torrent.progress)
l.setInfo('torrent', torrent.fields) l.setInfo('torrent', torrent.fields)
l.setInfo('video', {'episode': int(torrent.progress)}) l.setInfo('video', {'episode': int(torrent.progress)})

View file

@ -215,10 +215,17 @@
<control type="progress"> <control type="progress">
<posx>90</posx> <posx>90</posx>
<posy>40</posy> <posy>40</posy>
<width>700</width> <width>640</width>
<height>20</height> <height>20</height>
<info>ListItem.Property(TorrentProgress)</info> <info>ListItem.Property(TorrentProgress)</info>
</control> </control>
<control type="label">
<posx>735</posx>
<posy>33</posy>
<width>60</width>
<height>20</height>
<label>$INFO[ListItem.Property(TorrentProgress)]</label>
</control>
</itemlayout> </itemlayout>
<focusedlayout width="560" height="70"> <focusedlayout width="560" height="70">
<control type="image"> <control type="image">
@ -255,10 +262,17 @@
<control type="progress"> <control type="progress">
<posx>90</posx> <posx>90</posx>
<posy>40</posy> <posy>40</posy>
<width>700</width> <width>640</width>
<height>20</height> <height>20</height>
<info>ListItem.Property(TorrentProgress)</info> <info>ListItem.Property(TorrentProgress)</info>
</control> </control>
<control type="label">
<posx>735</posx>
<posy>33</posy>
<width>60</width>
<height>20</height>
<label>$INFO[ListItem.Property(TorrentProgress)]</label>
</control>
</focusedlayout> </focusedlayout>
</control> </control>
</controls> </controls>