diff options
author | hut <hut@lavabit.com> | 2009-12-06 14:01:49 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2009-12-06 14:01:49 +0100 |
commit | 65cb1a32d4d5f83f48169846afec201ab3b6f9c3 (patch) | |
tree | ccd022db0eedc2377e0318085174b96a20d614b9 /ranger/environment.py | |
parent | 465bff736d234e57efb2e9232df8882f3fd3a5cb (diff) | |
download | ranger-65cb1a32d4d5f83f48169846afec201ab3b6f9c3.tar.gz |
"SettingsAware", random cleanups
Diffstat (limited to 'ranger/environment.py')
-rw-r--r-- | ranger/environment.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ranger/environment.py b/ranger/environment.py index d8a535ab..a5e54414 100644 --- a/ranger/environment.py +++ b/ranger/environment.py @@ -1,13 +1,13 @@ from os.path import abspath, normpath, join, expanduser from ranger.directory import Directory, NoDirectoryGiven +from ranger.conf import SettingsAware -class Environment(): +class Environment(SettingsAware): # A collection of data which is relevant for more than # one class. - def __init__(self, path, opt): + def __init__(self, path): from ranger.history import History self.path = abspath(expanduser(path)) - self.opt = opt self.pathway = () self.last_search = None self.directories = {} @@ -16,7 +16,7 @@ class Environment(): self.keybuffer = () self.copy = None self.termsize = (24, 80) - self.history = History(opt['max_history_size']) + self.history = History(self.settings.max_history_size) def key_append(self, key): self.keybuffer += (key, ) @@ -93,7 +93,7 @@ class Environment(): self.assign_correct_cursor_positions() # set the current file. - self.pwd.directories_first = self.opt['directories_first'] + self.pwd.directories_first = self.settings.directories_first self.pwd.sort_if_outdated() self.cf = self.pwd.pointed_file |