kuuko pushed a commit to branch master. http://git.enlightenment.org/apps/epour.git/commit/?id=9e0dddcb9f686946c57d92321d2f3e592b05c7c7
commit 9e0dddcb9f686946c57d92321d2f3e592b05c7c7 Author: Kai Huuhko <[email protected]> Date: Sat Jul 19 23:23:02 2014 +0300 Add upload slots to session status --- epour/gui/__init__.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/epour/gui/__init__.py b/epour/gui/__init__.py index a790b6d..ff17401 100644 --- a/epour/gui/__init__.py +++ b/epour/gui/__init__.py @@ -343,7 +343,7 @@ class SessionStatus(Table): self.pack(u_l, 1, 2, 1, 1) u_l.show() - peer_t = Label(parent, text="Peers") + peer_t = Label(parent, text="Peer connections") self.pack(peer_t, 0, 3, 1, 1) peer_t.show() @@ -351,13 +351,22 @@ class SessionStatus(Table): self.pack(peer_l, 1, 3, 1, 1) peer_l.show() + uploads_t = Label(parent, text="Upload slots") + self.pack(uploads_t, 0, 4, 1, 1) + uploads_t.show() + + t = "%s/%s" % (str(s.num_unchoked), str(s.allowed_upload_slots)) + uploads_l = self.uploads_l = Label(parent, text=t) + self.pack(uploads_l, 1, 4, 1, 1) + uploads_l.show() + listen_t = Label(parent, text="Listening") - self.pack(listen_t, 0, 4, 1, 1) + self.pack(listen_t, 0, 5, 1, 1) listen_t.show() listen_l = self.listen_l = Label( parent, text=str(session.is_listening())) - self.pack(listen_l, 1, 4, 1, 1) + self.pack(listen_l, 1, 5, 1, 1) listen_l.show() self.show() @@ -370,6 +379,8 @@ class SessionStatus(Table): self.d_l.text = "{}/s".format(intrepr(s.payload_download_rate)) self.u_l.text = "{}/s".format(intrepr(s.payload_upload_rate)) self.peer_l.text = str(s.num_peers) + t = "%s/%s" % (str(s.num_unchoked), str(s.allowed_upload_slots)) + self.uploads_l.text = t self.listen_l.text = str(self.session.is_listening()) if self.session.is_paused(): icon = "player_pause" --
