summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-12-22 16:19:20 +0100
committerhut <hut@lavabit.com>2009-12-22 16:19:20 +0100
commit85f45f481311ff3fb241c89c824ccc80583cd99a (patch)
treea7b87ebf70f8d4376448673b56b9a570fb8163b9
parent4fb1670e4d87aecf2eee8a1ba4903f9d8cdae914 (diff)
downloadranger-85f45f481311ff3fb241c89c824ccc80583cd99a.tar.gz
some clean ups
-rw-r--r--ranger/fsobject/directory.py6
-rw-r--r--ranger/gui/defaultui.py2
-rw-r--r--ranger/gui/ui.py4
-rw-r--r--ranger/gui/widgets/filelist.py2
-rw-r--r--ranger/gui/widgets/titlebar.py4
5 files changed, 11 insertions, 7 deletions
diff --git a/ranger/fsobject/directory.py b/ranger/fsobject/directory.py
index 2478616d..5ad07ef1 100644
--- a/ranger/fsobject/directory.py
+++ b/ranger/fsobject/directory.py
@@ -16,7 +16,6 @@ class NoDirectoryGiven(Exception):
 	pass
 
 class Directory(SuperClass, SettingsAware):
-	scheduled = False
 	enterable = False
 	loading = False
 
@@ -97,6 +96,11 @@ class Directory(SuperClass, SettingsAware):
 		it takes rather long.
 		"""
 
+		self.load_once()
+
+		if schedule is None:
+			schedule = self.size > 30
+
 		if not self.loading:
 			if schedule and self.fm:
 				self.loading = True
diff --git a/ranger/gui/defaultui.py b/ranger/gui/defaultui.py
index ccfe960d..a031f93c 100644
--- a/ranger/gui/defaultui.py
+++ b/ranger/gui/defaultui.py
@@ -33,7 +33,7 @@ class DefaultUI(UI):
 		y, x = self.env.termsize
 
 		notify_hei = self.notify.requested_height
-		log(notify_hei)
+#		log(notify_hei)
 
 		self.filelist_container.resize(1, 0, y - 2 - notify_hei, x)
 		self.notify.resize(y - 1 - notify_hei, 0, notify_hei, x)
diff --git a/ranger/gui/ui.py b/ranger/gui/ui.py
index e55b9ba9..da633698 100644
--- a/ranger/gui/ui.py
+++ b/ranger/gui/ui.py
@@ -91,8 +91,8 @@ class UI(DisplayableContainer):
 		except:
 			return
 
-		from ranger import log
-		log('{0:0>28b} ({0})'.format(event.bstate))
+#		from ranger import log
+#		log('{0:0>28b} ({0})'.format(event.bstate))
 
 		if DisplayableContainer.click(self, event):
 			return
diff --git a/ranger/gui/widgets/filelist.py b/ranger/gui/widgets/filelist.py
index b4c756f1..952a6d45 100644
--- a/ranger/gui/widgets/filelist.py
+++ b/ranger/gui/widgets/filelist.py
@@ -74,7 +74,7 @@ class FileList(Widget):
 
 	def finalize(self):
 		if self.postpone_drawing:
-			self.target.load_content_if_outdated(schedule=True)
+			self.target.load_content_if_outdated(schedule=None)
 			self.draw_directory()
 			self.postpone_drawing = False
 
diff --git a/ranger/gui/widgets/titlebar.py b/ranger/gui/widgets/titlebar.py
index 36ed1168..7bb21886 100644
--- a/ranger/gui/widgets/titlebar.py
+++ b/ranger/gui/widgets/titlebar.py
@@ -120,9 +120,9 @@ class Bar(object):
 		rightsize = self.right.sumsize()
 		nonfixed_items = self.left.nonfixed_items()
 
-		log(leftsize, fixedsize, nonfixed_items)
+#		log(leftsize, fixedsize, nonfixed_items)
 		itemsize = int(float(wid - rightsize - fixedsize) / nonfixed_items) + 1
-		log(itemsize)
+#		log(itemsize)
 
 		for item in self.left:
 			if not item.fixed: