From 5a48cca9549eda475e754eb683db767f04dff231 Mon Sep 17 00:00:00 2001 From: hut Date: Sat, 9 Mar 2013 20:39:41 +0100 Subject: simplified previous commit --- ranger/container/directory.py | 4 +--- ranger/gui/widgets/browsercolumn.py | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/ranger/container/directory.py b/ranger/container/directory.py index 2e28082f..4d1d0315 100644 --- a/ranger/container/directory.py +++ b/ranger/container/directory.py @@ -61,8 +61,6 @@ class Directory(FileSystemObject, Accumulator, Loadable, SettingsAware): marked_items = None scroll_begin = 0 - mod_time = 0 - mount_path = '/' disk_usage = 0 @@ -171,7 +169,7 @@ class Directory(FileSystemObject, Accumulator, Loadable, SettingsAware): if not self.files_all: return # propably not loaded yet - self.mod_time = time() + self.last_update_time = time() if not self.settings.show_hidden and self.settings.hidden_filter: hidden_filter = re.compile(self.settings.hidden_filter) diff --git a/ranger/gui/widgets/browsercolumn.py b/ranger/gui/widgets/browsercolumn.py index 155c4dc6..55be3569 100644 --- a/ranger/gui/widgets/browsercolumn.py +++ b/ranger/gui/widgets/browsercolumn.py @@ -20,7 +20,6 @@ class BrowserColumn(Pager): display_vcsstate = True scroll_begin = 0 target = None - last_target_mod_time = 0 last_redraw_time = -1 ellipsis = { False: '~', True: '…' } @@ -149,8 +148,7 @@ class BrowserColumn(Pager): self.need_redraw = True self.old_thisfile = self.target.pointed_obj - if self.last_target_mod_time < self.target.mod_time \ - or self.target.load_content_if_outdated() \ + if self.target.load_content_if_outdated() \ or self.target.sort_if_outdated() \ or self.last_redraw_time < self.target.last_update_time: self.need_redraw = True -- cgit 1.4.1-2-gfad0