Added tray tooltip.
Increased client cache time to 1.5 seconds.
This commit is contained in:
parent
473110b7fe
commit
58a240a998
3
TODO
3
TODO
|
@ -3,14 +3,12 @@
|
|||
* Figure out easy way for user-made plugins to add i18n support.
|
||||
* Restart daemon function
|
||||
* Docstrings!
|
||||
* Implement caching in client.py
|
||||
* Create a new add torrent dialog
|
||||
* Implement open folder
|
||||
* Maybe add pop-up menus to the status bar items
|
||||
* Address issue where torrents will redownload if the storage is moved outside
|
||||
of deluge.
|
||||
* Implement 'Classic' mode
|
||||
* Tray tooltip
|
||||
* Add autoload folder
|
||||
* Add wizard
|
||||
* Add a health indication to the statusbar
|
||||
|
@ -21,3 +19,4 @@
|
|||
* Add command line option to change config dir.. --config
|
||||
* Add method for plugins to add labels
|
||||
* Add context menus for labels.. ie. setting options for all torrents in label
|
||||
* Create asynchronous batch torrent status method
|
||||
|
|
|
@ -43,7 +43,7 @@ import deluge.xmlrpclib as xmlrpclib
|
|||
import deluge.common
|
||||
from deluge.log import LOG as log
|
||||
|
||||
CACHE_TTL = 0.5 # seconds
|
||||
CACHE_TTL = 1.5 # seconds
|
||||
|
||||
class cache:
|
||||
def __init__(self, func):
|
||||
|
@ -119,7 +119,7 @@ class cache_dict:
|
|||
ret = self.func(*__args, **__kw)
|
||||
self.cache_values[__args[0]] = [time.time(), ret]
|
||||
return ret
|
||||
|
||||
|
||||
class CoreProxy(gobject.GObject):
|
||||
__gsignals__ = {
|
||||
"new_core" : (
|
||||
|
|
|
@ -114,7 +114,25 @@ class SystemTray(component.Component):
|
|||
self.tray_glade.get_widget(widget).hide()
|
||||
except Exception, e:
|
||||
log.debug("Unable to hide system tray menu widgets: %s", e)
|
||||
|
||||
def update(self):
|
||||
# Set the tool tip text
|
||||
max_download_speed = client.get_config_value("max_download_speed")
|
||||
max_upload_speed = client.get_config_value("max_upload_speed")
|
||||
|
||||
if max_download_speed == -1:
|
||||
max_download_speed = _("Unlimited")
|
||||
if max_upload_speed == -1:
|
||||
max_upload_speed = _("Unlimited")
|
||||
|
||||
msg = '%s\n%s: %s (%s)\n%s: %s (%s)' % (\
|
||||
_("Deluge Bittorrent Client"), _("Down Speed"), \
|
||||
client.get_download_rate(), max_download_speed, _("Up Speed"), \
|
||||
client.get_upload_rate(), max_upload_speed)
|
||||
|
||||
# Set the tooltip
|
||||
self.tray.set_tooltip(msg)
|
||||
|
||||
def build_tray_bwsetsubmenu(self):
|
||||
# Create the Download speed list sub-menu
|
||||
submenu_bwdownset = self.build_menu_radio_list(
|
||||
|
|
Loading…
Reference in New Issue