about summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-12-31 15:23:09 +0100
committerhut <hut@lavabit.com>2009-12-31 15:23:09 +0100
commit8db3c4b1732b497173e43da782d8c83406fb1a2e (patch)
tree5c470797faf70373a889fc686a7abba64ca1bba5 /ranger
parent59e3fd9051e03c850b3e6da0aad6f8f9ea12f524 (diff)
downloadranger-8db3c4b1732b497173e43da782d8c83406fb1a2e.tar.gz
rename filelist(container) to browsercolumn/browserview
Diffstat (limited to 'ranger')
-rw-r--r--ranger/gui/defaultui.py32
-rw-r--r--ranger/gui/widgets/browsercolumn.py (renamed from ranger/gui/widgets/filelist.py)4
-rw-r--r--ranger/gui/widgets/browserview.py (renamed from ranger/gui/widgets/filelistcontainer.py)18
-rw-r--r--ranger/gui/widgets/statusbar.py14
4 files changed, 34 insertions, 34 deletions
diff --git a/ranger/gui/defaultui.py b/ranger/gui/defaultui.py
index 08ec0b4b..540d088d 100644
--- a/ranger/gui/defaultui.py
+++ b/ranger/gui/defaultui.py
@@ -5,7 +5,7 @@ from ranger.gui.ui import UI
 class DefaultUI(UI):
 	def setup(self):
 		"""Build up the UI by initializing widgets."""
-		from ranger.gui.widgets.filelistcontainer import FileListContainer
+		from ranger.gui.widgets.browserview import BrowserView
 		from ranger.gui.widgets.titlebar import TitleBar
 		from ranger.gui.widgets.console import Console
 		from ranger.gui.widgets.statusbar import StatusBar
@@ -17,10 +17,10 @@ class DefaultUI(UI):
 		self.titlebar = TitleBar(self.win)
 		self.add_child(self.titlebar)
 
-		# Create the container for the filelists
-		self.filelist_container = FileListContainer(self.win, RATIO)
-		self.add_child(self.filelist_container)
-		self.main_filelist = self.filelist_container.main_filelist
+		# Create the browser view
+		self.browser = BrowserView(self.win, RATIO)
+		self.add_child(self.browser)
+		self.main_column = self.browser.main_column
 
 		# Create the process manager
 		self.pman = ProcessManager(self.win)
@@ -32,7 +32,7 @@ class DefaultUI(UI):
 		self.add_child(self.notify)
 
 		# Create the status bar
-		self.status = StatusBar(self.win, self.main_filelist)
+		self.status = StatusBar(self.win, self.browser.main_column)
 		self.add_child(self.status)
 
 		# Create the console
@@ -51,7 +51,7 @@ class DefaultUI(UI):
 
 		notify_hei = min(max(1, y - 4), self.notify.requested_height)
 
-		self.filelist_container.resize(1, 0, y - 1 - notify_hei, x)
+		self.browser.resize(1, 0, y - 1 - notify_hei, x)
 		self.pman.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)
@@ -72,22 +72,22 @@ class DefaultUI(UI):
 			self.console.focused = True
 		self.pager.visible = False
 		self.pager.focused = False
-		self.filelist_container.visible = True
+		self.browser.visible = True
 	
 	def open_pager(self):
 		if self.console.focused:
 			self.console.focused = False
 		self.pager.visible = True
 		self.pager.focused = True
-		self.filelist_container.visible = False
+		self.browser.visible = False
 		return self.pager
 
 	def open_embedded_pager(self):
-		self.filelist_container.open_pager()
-		return self.filelist_container.pager
+		self.browser.open_pager()
+		return self.browser.pager
 
 	def close_embedded_pager(self):
-		self.filelist_container.close_pager()
+		self.browser.close_pager()
 	
 	def open_console(self, mode, string=''):
 		if self.console.open(mode, string):
@@ -101,18 +101,18 @@ class DefaultUI(UI):
 		self.close_pager()
 
 	def open_pman(self):
-		self.filelist_container.visible = False
+		self.browser.visible = False
 		self.pman.visible = True
 		self.pman.focused = True
 
 	def close_pman(self):
 		self.pman.visible = False
-		self.filelist_container.visible = True
+		self.browser.visible = True
 		self.pman.focused = False
 
 	def scroll(self, relative):
-		if self.main_filelist:
-			self.main_filelist.scroll(relative)
+		if self.browser and self.browser.main_column:
+			self.browser.main_column.scroll(relative)
 	
 	def throbber(self, string='.', remove=False):
 		if remove:
diff --git a/ranger/gui/widgets/filelist.py b/ranger/gui/widgets/browsercolumn.py
index 4dd04ed1..055c9843 100644
--- a/ranger/gui/widgets/filelist.py
+++ b/ranger/gui/widgets/browsercolumn.py
@@ -1,9 +1,9 @@
-"""The FileList widget displays the contents of a directory or file."""
+"""The BrowserColumn widget displays the contents of a directory or file."""
 from . import Widget
 from .pager import Pager
 from ranger import log
 
-class FileList(Pager, Widget):
+class BrowserColumn(Pager, Widget):
 	main_display = False
 	display_infostring = False
 	scroll_begin = 0
diff --git a/ranger/gui/widgets/filelistcontainer.py b/ranger/gui/widgets/browserview.py
index ed1922b8..ff0854f9 100644
--- a/ranger/gui/widgets/filelistcontainer.py
+++ b/ranger/gui/widgets/browserview.py
@@ -1,10 +1,10 @@
-"""The FileListContainer manages a set of FileLists."""
+"""The BrowserView manages a set of BrowserColumns."""
 from . import Widget
-from .filelist import FileList
+from .browsercolumn import BrowserColumn
 from .pager import Pager
 from ..displayable import DisplayableContainer
 
-class FileListContainer(Widget, DisplayableContainer):
+class BrowserView(Widget, DisplayableContainer):
 	ratios = None
 	preview = True
 	preview_available = True
@@ -29,22 +29,22 @@ class FileListContainer(Widget, DisplayableContainer):
 		if preview: offset += 1
 
 		for level in range(len(ratios)):
-			fl = FileList(self.win, level + offset)
+			fl = BrowserColumn(self.win, level + offset)
 			self.add_child(fl)
 
 		try:
-			self.main_filelist = self.container[preview and -2 or -1]
+			self.main_column = self.container[preview and -2 or -1]
 		except IndexError:
-			self.main_filelist = None
+			self.main_column = None
 		else:
-			self.main_filelist.display_infostring = True
-			self.main_filelist.main_display = True
+			self.main_column.display_infostring = True
+			self.main_column.main_display = True
 
 		self.pager = Pager(self.win, embedded=True)
 		self.add_child(self.pager)
 	
 	def resize(self, y, x, hei, wid):
-		"""Resize all the filelists according to the given ratio"""
+		"""Resize all the columns according to the given ratio"""
 		DisplayableContainer.resize(self, y, x, hei, wid)
 		left = 0
 
diff --git a/ranger/gui/widgets/statusbar.py b/ranger/gui/widgets/statusbar.py
index 81616c82..1715a490 100644
--- a/ranger/gui/widgets/statusbar.py
+++ b/ranger/gui/widgets/statusbar.py
@@ -21,9 +21,9 @@ class StatusBar(Widget):
 	old_wid = None
 	result = None
 
-	def __init__(self, win, filelist=None):
+	def __init__(self, win, column=None):
 		Widget.__init__(self, win)
-		self.filelist = filelist
+		self.column = column
 	
 	def draw(self):
 		"""Draw the statusbar"""
@@ -74,8 +74,8 @@ class StatusBar(Widget):
 	def _get_left_part(self):
 		part = []
 
-		if self.filelist is not None:
-			target = self.filelist.target.pointed_obj
+		if self.column is not None:
+			target = self.column.target.pointed_obj
 		else:
 			target = self.env.at_level(0).pointed_obj
 
@@ -135,17 +135,17 @@ class StatusBar(Widget):
 
 	def _get_right_part(self):
 		part = []
-		if self.filelist is None:
+		if self.column is None:
 			return part
 
-		target = self.filelist.target
+		target = self.column.target
 #		target = self.env.at_level(0)
 
 		if not target.content_loaded or not target.accessible:
 			return part
 
 		pos = target.scroll_begin
-		max_pos = len(target) - self.filelist.hei
+		max_pos = len(target) - self.column.hei
 
 		if target.marked_items:
 			part.append([['scroll', 'marked'], 'Mrk'])