Added tray tooltip.

Increased client cache time to 1.5 seconds.
This commit is contained in:
Andrew Resch 2007-12-22 20:35:43 +00:00
parent 473110b7fe
commit 58a240a998
4 changed files with 22 additions and 5 deletions

3
TODO
View File

@ -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

View File

@ -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):

View File

@ -115,6 +115,24 @@ class SystemTray(component.Component):
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(

View File

@ -56,7 +56,7 @@ _extra_compile_args = [
"-O2"
]
removals = ["-Wstrict-prototypes"]
removals = ["-g", "-p", "-Wstrict-prototypes"]
if python_version == '2.5':
cv_opt = sysconfig.get_config_vars()["CFLAGS"]