diff options
author | Arisu <arisu@styl.us.to> | 2011-10-10 15:41:00 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2011-10-10 15:46:14 +0200 |
commit | b9c432d9ecb58e7c5dbc7957843aa4ea3509834f (patch) | |
tree | 541fb02f001588792d364f54b3a664b152413fbc | |
parent | 8afc4b5f2c5312c89352e27ccb82664821b841cf (diff) | |
download | ranger-b9c432d9ecb58e7c5dbc7957843aa4ea3509834f.tar.gz |
Eliminate orphaned functions and arguments
-rw-r--r-- | ranger/core/actions.py | 4 | ||||
-rw-r--r-- | ranger/fsobject/directory.py | 12 | ||||
-rw-r--r-- | ranger/fsobject/fsobject.py | 4 | ||||
-rw-r--r-- | ranger/gui/widgets/browserview.py | 4 |
4 files changed, 10 insertions, 14 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py index 09b86a0f..7ae6628b 100644 --- a/ranger/core/actions.py +++ b/ranger/core/actions.py @@ -200,7 +200,7 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware): return macros - def source_cmdlist(self, filename, narg=None): + def source_cmdlist(self, filename): filename = os.path.expanduser(filename) for line in open(filename, 'r'): line = line.rstrip("\r\n") @@ -614,7 +614,7 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware): lines = cleandoc(command.__doc__).split('\n') pager.set_source(lines) - def display_help(self, narg=None): + def display_help(self): manualpath = self.relpath('../doc/ranger.1') if os.path.exists(manualpath): process = self.run(['man', manualpath]) diff --git a/ranger/fsobject/directory.py b/ranger/fsobject/directory.py index bd652655..87f82448 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, dirname, hidden_filter, name_filter): +def accept_file(fname, 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): @@ -188,7 +188,7 @@ class Directory(FileSystemObject, Accumulator, Loadable, SettingsAware): self.infostring = ' %d' % self.size filenames = [mypath + (mypath == '/' and fname or '/' + fname)\ for fname in filelist if accept_file( - fname, mypath, hidden_filter, self.filter)] + fname, hidden_filter, self.filter)] yield self.load_content_mtime = os.stat(mypath).st_mtime @@ -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 84b07e61..d112904e 100644 --- a/ranger/fsobject/fsobject.py +++ b/ranger/fsobject/fsobject.py @@ -156,10 +156,6 @@ 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) diff --git a/ranger/gui/widgets/browserview.py b/ranger/gui/widgets/browserview.py index 84f77de6..30cb4cde 100644 --- a/ranger/gui/widgets/browserview.py +++ b/ranger/gui/widgets/browserview.py @@ -41,7 +41,7 @@ class BrowserView(Widget, DisplayableContainer): self.pager.visible = False self.add_child(self.pager) - self.change_ratios(ratios, resize=False) + self.change_ratios(ratios) for option in ('preview_directories', 'preview_files'): self.settings.signal_bind('setopt.' + option, @@ -50,7 +50,7 @@ class BrowserView(Widget, DisplayableContainer): self.fm.env.signal_bind('move', self.request_clear) self.settings.signal_bind('setopt.column_ratios', self.request_clear) - def change_ratios(self, ratios, resize=True): + def change_ratios(self, ratios): if isinstance(ratios, Signal): ratios = ratios.value |