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.
|
* Figure out easy way for user-made plugins to add i18n support.
|
||||||
* Restart daemon function
|
* Restart daemon function
|
||||||
* Docstrings!
|
* Docstrings!
|
||||||
* Implement caching in client.py
|
|
||||||
* Create a new add torrent dialog
|
* Create a new add torrent dialog
|
||||||
* Implement open folder
|
* Implement open folder
|
||||||
* Maybe add pop-up menus to the status bar items
|
* Maybe add pop-up menus to the status bar items
|
||||||
* Address issue where torrents will redownload if the storage is moved outside
|
* Address issue where torrents will redownload if the storage is moved outside
|
||||||
of deluge.
|
of deluge.
|
||||||
* Implement 'Classic' mode
|
* Implement 'Classic' mode
|
||||||
* Tray tooltip
|
|
||||||
* Add autoload folder
|
* Add autoload folder
|
||||||
* Add wizard
|
* Add wizard
|
||||||
* Add a health indication to the statusbar
|
* Add a health indication to the statusbar
|
||||||
|
@ -21,3 +19,4 @@
|
||||||
* Add command line option to change config dir.. --config
|
* Add command line option to change config dir.. --config
|
||||||
* Add method for plugins to add labels
|
* Add method for plugins to add labels
|
||||||
* Add context menus for labels.. ie. setting options for all torrents in label
|
* 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
|
import deluge.common
|
||||||
from deluge.log import LOG as log
|
from deluge.log import LOG as log
|
||||||
|
|
||||||
CACHE_TTL = 0.5 # seconds
|
CACHE_TTL = 1.5 # seconds
|
||||||
|
|
||||||
class cache:
|
class cache:
|
||||||
def __init__(self, func):
|
def __init__(self, func):
|
||||||
|
@ -119,7 +119,7 @@ class cache_dict:
|
||||||
ret = self.func(*__args, **__kw)
|
ret = self.func(*__args, **__kw)
|
||||||
self.cache_values[__args[0]] = [time.time(), ret]
|
self.cache_values[__args[0]] = [time.time(), ret]
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
class CoreProxy(gobject.GObject):
|
class CoreProxy(gobject.GObject):
|
||||||
__gsignals__ = {
|
__gsignals__ = {
|
||||||
"new_core" : (
|
"new_core" : (
|
||||||
|
|
|
@ -114,7 +114,25 @@ class SystemTray(component.Component):
|
||||||
self.tray_glade.get_widget(widget).hide()
|
self.tray_glade.get_widget(widget).hide()
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
log.debug("Unable to hide system tray menu widgets: %s", 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):
|
def build_tray_bwsetsubmenu(self):
|
||||||
# Create the Download speed list sub-menu
|
# Create the Download speed list sub-menu
|
||||||
submenu_bwdownset = self.build_menu_radio_list(
|
submenu_bwdownset = self.build_menu_radio_list(
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -56,7 +56,7 @@ _extra_compile_args = [
|
||||||
"-O2"
|
"-O2"
|
||||||
]
|
]
|
||||||
|
|
||||||
removals = ["-Wstrict-prototypes"]
|
removals = ["-g", "-p", "-Wstrict-prototypes"]
|
||||||
|
|
||||||
if python_version == '2.5':
|
if python_version == '2.5':
|
||||||
cv_opt = sysconfig.get_config_vars()["CFLAGS"]
|
cv_opt = sysconfig.get_config_vars()["CFLAGS"]
|
||||||
|
|
Loading…
Reference in New Issue