summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/core/loader.py2
-rw-r--r--ranger/gui/widgets/taskview.py12
2 files changed, 9 insertions, 5 deletions
diff --git a/ranger/core/loader.py b/ranger/core/loader.py
index 2b7747c6..7bbd2abf 100644
--- a/ranger/core/loader.py
+++ b/ranger/core/loader.py
@@ -20,7 +20,7 @@ class Loadable(object):
 	def __init__(self, gen, descr):
 		self.load_generator = gen
 		self.description = descr
-		self.percent = 0
+		self.percent = -1
 
 	def get_description(self):
 		return self.description
diff --git a/ranger/gui/widgets/taskview.py b/ranger/gui/widgets/taskview.py
index 582bb76d..53da5826 100644
--- a/ranger/gui/widgets/taskview.py
+++ b/ranger/gui/widgets/taskview.py
@@ -51,10 +51,14 @@ class TaskView(Widget, Accumulator):
 						clr.append('selected')
 
 					descr = obj.get_description()
-					self.addstr(y, 0, "%3d%% - %s" % (obj.percent, descr), self.wid)
-					wid = int(self.wid / 100.0 * obj.percent)
-					self.color_at(y, 0, self.wid, tuple(clr))
-					self.color_at(y, 0, wid, tuple(clr), 'loaded')
+					if obj.percent >= 0 and obj.percent <= 100:
+						self.addstr(y, 0, "%3d%% - %s" % (obj.percent, descr), self.wid)
+						wid = int(self.wid / 100.0 * obj.percent)
+						self.color_at(y, 0, self.wid, tuple(clr))
+						self.color_at(y, 0, wid, tuple(clr), 'loaded')
+					else:
+						self.addstr(y, 0, descr, self.wid)
+						self.color_at(y, 0, self.wid, tuple(clr))
 
 			else:
 				if self.hei > 1: