diff options
-rw-r--r-- | ranger/fsobject/directory.py | 10 | ||||
-rw-r--r-- | ranger/fsobject/fsobject.py | 4 |
2 files changed, 9 insertions, 5 deletions
diff --git a/ranger/fsobject/directory.py b/ranger/fsobject/directory.py index 0130cc7b..bd652655 100644 --- a/ranger/fsobject/directory.py +++ b/ranger/fsobject/directory.py @@ -43,7 +43,7 @@ def sort_naturally(path): def sort_naturally_icase(path): return path.basename_natural_lower -def accept_file(fname, directory, hidden_filter, name_filter): +def accept_file(fname, dirname, hidden_filter, name_filter): if hidden_filter: try: if hidden_filter.search(fname): @@ -116,7 +116,7 @@ class Directory(FileSystemObject, Accumulator, Loadable, SettingsAware): return self.files def mark_item(self, item, val): - item.mark(val) + item._mark(val) if val: if item in self.files and not item in self.marked_items: self.marked_items.append(item) @@ -151,7 +151,7 @@ class Directory(FileSystemObject, Accumulator, Loadable, SettingsAware): def _clear_marked_items(self): for item in self.marked_items: - item.mark(False) + item._mark(False) del self.marked_items[:] def get_selection(self): @@ -231,10 +231,10 @@ class Directory(FileSystemObject, Accumulator, Loadable, SettingsAware): self._clear_marked_items() for item in self.files: if item.path in marked_paths: - item.mark(True) + item._mark(True) self.marked_items.append(item) else: - item.mark(False) + item._mark(False) self.sort() diff --git a/ranger/fsobject/fsobject.py b/ranger/fsobject/fsobject.py index d112904e..84b07e61 100644 --- a/ranger/fsobject/fsobject.py +++ b/ranger/fsobject/fsobject.py @@ -156,6 +156,10 @@ class FileSystemObject(FileManagerAware): return self._mimetype_tuple def mark(self, boolean): + directory = self.env.get_directory(self.dirname) + directory.mark_item(self) + + def _mark(self, boolean): """Called by directory.mark_item() and similar functions""" self.marked = bool(boolean) |