diff options
author | hut <hut@lavabit.com> | 2009-12-25 03:33:07 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2009-12-25 03:33:07 +0100 |
commit | 586f0006dd6e9c5a6477bcbf87130638cf5a4154 (patch) | |
tree | 892cd35c2ece2c76a5fddf65d1bcaa5c9626b616 /ranger/fsobject/directory.py | |
parent | ddf828fb5ce5a539e01d968aee5817ad1c921a01 (diff) | |
download | ranger-586f0006dd6e9c5a6477bcbf87130638cf5a4154.tar.gz |
can now (re)move processes in pman
Diffstat (limited to 'ranger/fsobject/directory.py')
-rw-r--r-- | ranger/fsobject/directory.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/ranger/fsobject/directory.py b/ranger/fsobject/directory.py index 8fb4d0ac..f5aeade4 100644 --- a/ranger/fsobject/directory.py +++ b/ranger/fsobject/directory.py @@ -165,8 +165,10 @@ class Directory(FileSystemObject, SettingsAware): self.content_loaded = True self.loading = False -# yield -# yield + + def unload(self): + self.loading = False + self.load_generator = None def load_content(self, schedule=False): """ @@ -175,7 +177,7 @@ class Directory(FileSystemObject, SettingsAware): """ self.load_once() - + if schedule is None: schedule = self.size > 30 @@ -319,8 +321,9 @@ class Directory(FileSystemObject, SettingsAware): def load_content_once(self, *a, **k): """Load the contents of the directory if not done yet""" - if not self.content_loaded and not self.loading: - self.load_content(*a, **k) + if not self.content_loaded: + if not self.loading: + self.load_content(*a, **k) return True return False @@ -329,6 +332,7 @@ class Directory(FileSystemObject, SettingsAware): Load the contents of the directory if it's outdated or not done yet """ + if self.load_content_once(*a, **k): return True if self.old_show_hidden != self.settings.show_hidden: |