about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-01-07 01:22:17 +0100
committerhut <hut@lavabit.com>2010-01-07 01:22:17 +0100
commitf5db66a1795d97c9f80d31b41a9607ce5cd0242b (patch)
tree59b90a2053228de596ee5ff2ef4901d625067bf3
parent3db854eee17ff7e9c29319be04f8ae2b3e966bbf (diff)
downloadranger-f5db66a1795d97c9f80d31b41a9607ce5cd0242b.tar.gz
random cleanups and fixes
-rw-r--r--doc/uml/2.session11
-rw-r--r--ranger/defaults/options.py2
-rw-r--r--ranger/fsobject/directory.py3
-rw-r--r--ranger/gui/widgets/browserview.py5
-rw-r--r--ranger/help/index.py6
-rw-r--r--test/tc_keyapi.py1
6 files changed, 15 insertions, 13 deletions
diff --git a/doc/uml/2.session b/doc/uml/2.session
index 42a43d47..5365445d 100644
--- a/doc/uml/2.session
+++ b/doc/uml/2.session
@@ -1,25 +1,26 @@
 window_sizes 1678 1033 393 1275 795 144
 motifplus_style
 diagrams
-  active  classdiagram_ref 128002 // Displayable Hierarchy
+  classdiagram_ref 128002 // Displayable Hierarchy
     1275 795 100 4 0 0
-  classdiagram_ref 134530 // Overview
+  active  classdiagram_ref 134530 // Overview
     1275 795 100 4 0 0
   sequencediagram_ref 141058 // Basic Logic
-    1275 795 100 4 60 0
+    1275 795 100 4 0 0
 end
 show_stereotypes
-selected classdiagram_ref 128002 // Displayable Hierarchy
+selected classdiagram_ref 134530 // Overview
 open
   class_ref 128002 // Displayable
   class_ref 128130 // UI
   class_ref 128258 // DefaultUI
-  class_ref 135170 // FileList
+  class_ref 135170 // BrowserColumn
   class_ref 148866 // Command
   class_ref 148994 // CommandList
   class_ref 149122 // Environment
   class_ref 149378 // FM
   class_ref 155906 // FileSystemObject
+  class_ref 175746 // Pager
   class_ref 149250 // curses
 end
 end
diff --git a/ranger/defaults/options.py b/ranger/defaults/options.py
index fb1358e6..27d8b5d4 100644
--- a/ranger/defaults/options.py
+++ b/ranger/defaults/options.py
@@ -6,7 +6,7 @@ colorscheme = colorschemes.default
 max_history_size = 20
 scroll_offset = 2
 max_dirsize_for_autopreview = None
-preview_files = True
+preview_files = False
 
 sort = 'basename'
 reverse = False
diff --git a/ranger/fsobject/directory.py b/ranger/fsobject/directory.py
index 1079d126..40e8caa9 100644
--- a/ranger/fsobject/directory.py
+++ b/ranger/fsobject/directory.py
@@ -139,6 +139,8 @@ class Directory(FileSystemObject, Accumulator, SettingsAware):
 					filenames.append(join(self.path, fname))
 				yield
 
+				self.load_content_mtime = os.lstat(self.path).st_mtime
+
 				marked_paths = set(map( \
 						lambda obj: obj.path, self.marked_items))
 
@@ -185,7 +187,6 @@ class Directory(FileSystemObject, Accumulator, SettingsAware):
 			self.last_update_time = time()
 
 		finally:
-			self.load_content_mtime = os.lstat(self.path).st_mtime
 			self.loading = False
 
 	def unload(self):
diff --git a/ranger/gui/widgets/browserview.py b/ranger/gui/widgets/browserview.py
index 1635cbe0..0677a703 100644
--- a/ranger/gui/widgets/browserview.py
+++ b/ranger/gui/widgets/browserview.py
@@ -13,17 +13,16 @@ class BrowserView(Widget, DisplayableContainer):
 
 	def __init__(self, win, ratios, preview = True):
 		DisplayableContainer.__init__(self, win)
-		from functools import reduce
 		self.ratios = ratios
 		self.preview = preview
 
 		# normalize ratios:
-		ratio_sum = float(reduce(lambda x,y: x + y, ratios))
+		ratio_sum = float(sum(ratios))
 		self.ratios = tuple(map(lambda x: x / ratio_sum, ratios))
 
 		if len(self.ratios) >= 2:
 			self.stretch_ratios = self.ratios[:-2] + \
-					((self.ratios[-2] + self.ratios[-1] * 0.9), \
+					((self.ratios[-2] + self.ratios[-1] * 0.9),
 					(self.ratios[-1] * 0.1))
 		
 		offset = 1 - len(ratios)
diff --git a/ranger/help/index.py b/ranger/help/index.py
index 0f5d8727..3821bd4b 100644
--- a/ranger/help/index.py
+++ b/ranger/help/index.py
@@ -8,9 +8,9 @@
 
 	|0?|	This index
 	|1?|	Basic movement and browsing
-	|2?|	(Running Files)
-	|3?|	(The console)
-	|4?|	(File operations)
+		Running Files
+		The console
+		File operations
 
 ==============================================================================
 
diff --git a/test/tc_keyapi.py b/test/tc_keyapi.py
index f1067e26..d6c32271 100644
--- a/test/tc_keyapi.py
+++ b/test/tc_keyapi.py
@@ -13,6 +13,7 @@ class Test(TestCase):
 		class commandarg(object):
 			def __init__(self):
 				self.fm = dummyfm
+				self.n = None
 
 		arg = commandarg()