From 6b49f844dcca8a4af2461d8380a99c03a6d9e00a Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Thu, 26 Jan 2017 10:03:17 +0000 Subject: [PATCH] [GTKUI] Fix showing cache status ratio --- deluge/ui/gtkui/preferences.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deluge/ui/gtkui/preferences.py b/deluge/ui/gtkui/preferences.py index f46a01339..a86a19c0a 100644 --- a/deluge/ui/gtkui/preferences.py +++ b/deluge/ui/gtkui/preferences.py @@ -727,7 +727,9 @@ class Preferences(component.Component): for widget_name in cache_labels: widget = self.builder.get_object(widget_name) - key = 'disk.' + widget_name[len('label_cache_'):] + key = widget_name[len('label_cache_'):] + if not widget_name.endswith('ratio'): + key = 'disk.' + key value = self.cache_status.get(key, 0) if isinstance(value, float): value = '%.2f' % value