diff options
author | hut <hut@lavabit.com> | 2010-01-01 20:35:22 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-01-01 20:35:22 +0100 |
commit | 6f43de0af345c63216b03b1e2611abf98266d80a (patch) | |
tree | 57edee00e6a2ed0973c5db8ef204883032e72938 /ranger/actions.py | |
parent | 0a1bc7598776c360b469a64316a1c69c0a914b5f (diff) | |
download | ranger-6f43de0af345c63216b03b1e2611abf98266d80a.tar.gz |
notify: merged into statusbar, allow to view the log in the pager
Diffstat (limited to 'ranger/actions.py')
-rw-r--r-- | ranger/actions.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/ranger/actions.py b/ranger/actions.py index c1ea7485..62b55b81 100644 --- a/ranger/actions.py +++ b/ranger/actions.py @@ -177,6 +177,13 @@ class Actions(EnvironmentAware, SettingsAware): lines = trimmed_lines_of_docstring(command.__doc__) pager.set_source(lines) + def display_log(self): + if not hasattr(self.ui, 'open_pager'): + return + + pager = self.ui.open_pager() + pager.set_source(self.log) + def display_file(self): if not hasattr(self.ui, 'open_embedded_pager'): return @@ -275,12 +282,9 @@ class Actions(EnvironmentAware, SettingsAware): pass def notify(self, text, duration=4, bad=False): - try: - method = self.ui.display - except AttributeError: - pass - else: - return method(text, duration=duration, bad=bad) + self.log.appendleft(text) + if hasattr(self.ui, 'notify'): + self.ui.notify(text, duration=duration, bad=bad) def mark(self, all=False, toggle=False, val=None, movedown=None): """ |