about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/colorschemes/default.py2
-rw-r--r--ranger/defaults/keys.py14
-rw-r--r--ranger/gui/colorscheme.py2
-rw-r--r--ranger/gui/defaultui.py22
-rw-r--r--ranger/gui/widgets/taskview.py (renamed from ranger/gui/widgets/process_manager.py)35
5 files changed, 28 insertions, 47 deletions
diff --git a/ranger/colorschemes/default.py b/ranger/colorschemes/default.py
index 367445cb..c92e1635 100644
--- a/ranger/colorschemes/default.py
+++ b/ranger/colorschemes/default.py
@@ -90,7 +90,7 @@ class Default(ColorScheme):
 			if context.highlight:
 				attr |= reverse
 
-		if context.in_pman:
+		if context.in_taskview:
 			if context.title:
 				fg = blue
 
diff --git a/ranger/defaults/keys.py b/ranger/defaults/keys.py
index 652e7c42..7d1db7d2 100644
--- a/ranger/defaults/keys.py
+++ b/ranger/defaults/keys.py
@@ -169,7 +169,7 @@ def initialize_commands(command_list):
 	bind('h', KEY_LEFT, KEY_BACKSPACE, DEL, lambda arg: \
 			arg.fm.move_left(arg.n or 1))
 
-	bind('w', lambda arg: arg.fm.ui.open_pman())
+	bind('w', lambda arg: arg.fm.ui.open_taskview())
 
 	command_list.rebuild_paths()
 
@@ -210,8 +210,8 @@ def initialize_console_commands(command_list):
 
 	command_list.rebuild_paths()
 
-def initialize_process_manager_commands(command_list):
-	"""Initialize the commands for the process manager widget"""
+def initialize_taskview_commands(command_list):
+	"""Initialize the commands for the TaskView widget"""
 
 	system_functions(command_list)
 	bind, hint = make_abbreviations(command_list)
@@ -220,12 +220,12 @@ def initialize_process_manager_commands(command_list):
 	bind('k', KEY_UP, nwrap.move(relative=-1))
 	bind('gg', nwrap.move(absolute=0))
 	bind('G', nwrap.move(absolute=-1))
-	bind('K', wdg.process_move(0))
-	bind('J', wdg.process_move(-1))
+	bind('K', wdg.task_move(0))
+	bind('J', wdg.task_move(-1))
 
-	bind('dd', wdg.process_remove())
+	bind('dd', wdg.task_remove())
 	bind('w', ESC, ctrl('d'), ctrl('c'),
-			lambda arg: arg.fm.ui.close_pman())
+			lambda arg: arg.fm.ui.close_taskview())
 
 	command_list.rebuild_paths()
 
diff --git a/ranger/gui/colorscheme.py b/ranger/gui/colorscheme.py
index bf8194ea..7db72d0a 100644
--- a/ranger/gui/colorscheme.py
+++ b/ranger/gui/colorscheme.py
@@ -1,6 +1,6 @@
 CONTEXT_KEYS = [ 'reset', 'error',
 		'in_display', 'in_statusbar', 'in_titlebar', 'in_console',
-		'in_notify', 'in_pman',
+		'in_notify', 'in_taskview',
 		'directory', 'file', 'hostname',
 		'executable', 'media', 'link',
 		'video', 'audio', 'image', 'media', 'document', 'container',
diff --git a/ranger/gui/defaultui.py b/ranger/gui/defaultui.py
index 3985b1cc..ccbe2578 100644
--- a/ranger/gui/defaultui.py
+++ b/ranger/gui/defaultui.py
@@ -9,7 +9,7 @@ class DefaultUI(UI):
 		from ranger.gui.widgets.titlebar import TitleBar
 		from ranger.gui.widgets.console import Console
 		from ranger.gui.widgets.statusbar import StatusBar
-		from ranger.gui.widgets.process_manager import ProcessManager
+		from ranger.gui.widgets.taskview import TaskView
 		from ranger.gui.widgets.notify import Notify
 		from ranger.gui.widgets.pager import Pager
 
@@ -23,9 +23,9 @@ class DefaultUI(UI):
 		self.main_column = self.browser.main_column
 
 		# Create the process manager
-		self.pman = ProcessManager(self.win)
-		self.pman.visible = False
-		self.add_child(self.pman)
+		self.taskview = TaskView(self.win)
+		self.taskview.visible = False
+		self.add_child(self.taskview)
 
 		# Create the (initially hidden) notify bar
 		self.notify = Notify(self.win)
@@ -53,7 +53,7 @@ class DefaultUI(UI):
 		notify_hei = min(max(1, y - 4), self.notify.requested_height)
 
 		self.browser.resize(1, 0, y - 1 - notify_hei, x)
-		self.pman.resize(1, 0, y - 1 - notify_hei, x)
+		self.taskview.resize(1, 0, y - 1 - notify_hei, x)
 		self.pager.resize(1, 0, y - 1 - notify_hei, x)
 		self.notify.resize(y - notify_hei, 0, notify_hei, x)
 		self.titlebar.resize(0, 0, 1, x)
@@ -101,15 +101,15 @@ class DefaultUI(UI):
 		self.status.visible = True
 		self.close_pager()
 
-	def open_pman(self):
+	def open_taskview(self):
 		self.browser.visible = False
-		self.pman.visible = True
-		self.pman.focused = True
+		self.taskview.visible = True
+		self.taskview.focused = True
 
-	def close_pman(self):
-		self.pman.visible = False
+	def close_taskview(self):
+		self.taskview.visible = False
 		self.browser.visible = True
-		self.pman.focused = False
+		self.taskview.focused = False
 
 	def scroll(self, relative):
 		if self.browser and self.browser.main_column:
diff --git a/ranger/gui/widgets/process_manager.py b/ranger/gui/widgets/taskview.py
index 08f390b5..a7f90dff 100644
--- a/ranger/gui/widgets/process_manager.py
+++ b/ranger/gui/widgets/taskview.py
@@ -1,5 +1,5 @@
 """
-The process manager allows you to modify what the loader is doing.
+The TaskView allows you to modify what the loader is doing.
 """
 
 import curses
@@ -9,36 +9,17 @@ from ranger.ext.accumulator import Accumulator
 from ranger.container import CommandList
 from collections import deque
 
-class DummyLoadObject(object):
-	def __init__(self, txt):
-		self.get_description = lambda: txt
-		self.load_generator = range(100)
-
-
-class DummyLoader(object):
-	def __init__(self):
-		self.queue = deque()
-		self.queue.append(DummyLoadObject("blub"))
-		self.queue.append(DummyLoadObject("foo"))
-		self.queue.append(DummyLoadObject("asfkljflk"))
-		self.queue.append(DummyLoadObject("g$%GKSERJgsldflj"))
-
-
-class ProcessManager(Widget, Accumulator):
+class TaskView(Widget, Accumulator):
 	def __init__(self, win):
 		Widget.__init__(self, win)
 		Accumulator.__init__(self)
 		self.scroll_begin = 0
 		self.commandlist = CommandList()
-		self.settings.keys.initialize_process_manager_commands( \
-				self.commandlist)
+		self.settings.keys.initialize_taskview_commands(self.commandlist)
 
-		# ---- dummy loader for testing purposes
-		self.loader = DummyLoader()
-	
 	def draw(self):
 		base_clr = deque()
-		base_clr.append('in_pman')
+		base_clr.append('in_taskview')
 		lst = self.get_list()
 
 		if not self.pointer_is_synced():
@@ -47,7 +28,7 @@ class ProcessManager(Widget, Accumulator):
 		if self.hei <= 0:
 			return
 
-		self.addstr(0, 0, "Process Manager")
+		self.addstr(0, 0, "Task View")
 		self.color_at(0, 0, self.wid, base_clr, 'title')
 
 		if lst:
@@ -70,18 +51,18 @@ class ProcessManager(Widget, Accumulator):
 
 		else:
 			if self.hei > 1:
-				self.addstr(1, 0, "No processes running")
+				self.addstr(1, 0, "No task in the queue.")
 				self.color_at(1, 0, self.wid, base_clr, 'error')
 
 		self.color_reset()
 
-	def process_remove(self, i=None):
+	def task_remove(self, i=None):
 		if i is None:
 			i = self.pointer
 
 		self.fm.loader.remove(index=i)
 	
-	def process_move(self, absolute, i=None):
+	def task_move(self, absolute, i=None):
 		if i is None:
 			i = self.pointer