add session totals to tray msg
This commit is contained in:
parent
867687e724
commit
e10a27bf56
|
@ -1137,13 +1137,15 @@ static PyObject *torrent_get_session_info(PyObject *self, PyObject *args)
|
|||
{
|
||||
session_status s = M_ses->status();
|
||||
|
||||
return Py_BuildValue("{s:l,s:f,s:f,s:f,s:f,s:l}",
|
||||
return Py_BuildValue("{s:l,s:f,s:f,s:f,s:f,s:l,s:f,s:f}",
|
||||
"has_incoming_connections", long(s.has_incoming_connections),
|
||||
"upload_rate", float(s.upload_rate),
|
||||
"download_rate", float(s.download_rate),
|
||||
"payload_upload_rate", float(s.payload_upload_rate),
|
||||
"payload_download_rate", float(s.payload_download_rate),
|
||||
"num_peers", long(s.num_peers));
|
||||
"num_peers", long(s.num_peers),
|
||||
"total_downloaded", float(s.total_payload_download),
|
||||
"total_uploaded", float(s.total_payload_upload));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -949,6 +949,9 @@ class DelugeGTK:
|
|||
max_connections = int(self.config.get("max_connections"))
|
||||
dlspeed = common.fspeed(core_state['download_rate'])
|
||||
ulspeed = common.fspeed(core_state['upload_rate'])
|
||||
dltotal = common.fsize(core_state['total_downloaded'])
|
||||
ultotal = common.fsize(core_state['total_uploaded'])
|
||||
|
||||
if self.config.get("max_download_speed") < 0:
|
||||
dlspeed_max = _("Unlimited")
|
||||
else:
|
||||
|
@ -972,10 +975,10 @@ class DelugeGTK:
|
|||
self.statusbar_temp_msg = self.statusbar_temp_msg + \
|
||||
' [' + _("DHT") + ': %s]'%(dht_peers)
|
||||
|
||||
msg = '%s\n%s: %s (%s)\n%s: %s (%s)\n%s: %s (%s)' % (
|
||||
_("Deluge Bittorrent Client"), _("Connections"), connections,
|
||||
max_connections, _("Down Speed"), dlspeed, dlspeed_max,
|
||||
_("Up Speed"), ulspeed, ulspeed_max)
|
||||
msg = '%s\n%s: %s (%s)\n%s: %s (%s)\n%s: %s\n%s: %s' % (
|
||||
_("Deluge Bittorrent Client"), _("Down Speed"), dlspeed, dlspeed_max,
|
||||
_("Up Speed"), ulspeed, ulspeed_max, _("Total Downloaded"), dltotal,
|
||||
_("Total Uploaded"), ultotal)
|
||||
|
||||
self.tray_icon.set_tooltip(msg)
|
||||
|
||||
|
|
|
@ -25,8 +25,6 @@ class DetailsManager(object):
|
|||
self.peers = glade.get_widget("summary_peers")
|
||||
self.percentage_done = glade.get_widget("summary_percentage_done")
|
||||
self.share_ratio = glade.get_widget("summary_share_ratio")
|
||||
self.downloaded_this_session = glade.get_widget("summary_downloaded_this_session")
|
||||
self.uploaded_this_session = glade.get_widget("summary_uploaded_this_session")
|
||||
self.tracker = glade.get_widget("summary_tracker")
|
||||
self.tracker_status = glade.get_widget("summary_tracker_status")
|
||||
self.next_announce = glade.get_widget("summary_next_announce")
|
||||
|
@ -104,4 +102,4 @@ class DetailsManager(object):
|
|||
self.tracker_status.set_text("")
|
||||
self.next_announce.set_text("")
|
||||
self.eta.set_text("")
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue