diff options
author | hut <hut@lavabit.com> | 2010-01-07 01:22:17 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-01-07 01:22:17 +0100 |
commit | f5db66a1795d97c9f80d31b41a9607ce5cd0242b (patch) | |
tree | 59b90a2053228de596ee5ff2ef4901d625067bf3 /ranger | |
parent | 3db854eee17ff7e9c29319be04f8ae2b3e966bbf (diff) | |
download | ranger-f5db66a1795d97c9f80d31b41a9607ce5cd0242b.tar.gz |
random cleanups and fixes
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/defaults/options.py | 2 | ||||
-rw-r--r-- | ranger/fsobject/directory.py | 3 | ||||
-rw-r--r-- | ranger/gui/widgets/browserview.py | 5 | ||||
-rw-r--r-- | ranger/help/index.py | 6 |
4 files changed, 8 insertions, 8 deletions
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 ============================================================================== |