From 6f43de0af345c63216b03b1e2611abf98266d80a Mon Sep 17 00:00:00 2001 From: hut Date: Fri, 1 Jan 2010 20:35:22 +0100 Subject: notify: merged into statusbar, allow to view the log in the pager --- ranger/actions.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'ranger/actions.py') 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): """ -- cgit 1.4.1-2-gfad0