diff options
author | hut <hut@lavabit.com> | 2009-12-18 02:39:24 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2009-12-18 02:39:24 +0100 |
commit | e85d44ae0eac49d21818d4cdd3972eb89f6ffd37 (patch) | |
tree | 6d0094fbf4488995a076579f0e2d67706f47aa80 | |
parent | 6a5d09b8731414c6fd76213bd31f7b29b847a235 (diff) | |
download | ranger-e85d44ae0eac49d21818d4cdd3972eb89f6ffd37.tar.gz |
UI.redraw now redraws widgets. old redraw is now redraw_window
-rw-r--r-- | ranger/defaults/keys.py | 2 | ||||
-rw-r--r-- | ranger/fm.py | 4 | ||||
-rw-r--r-- | ranger/gui/ui.py | 8 |
3 files changed, 9 insertions, 5 deletions
diff --git a/ranger/defaults/keys.py b/ranger/defaults/keys.py index b300c4ad..55bafb6a 100644 --- a/ranger/defaults/keys.py +++ b/ranger/defaults/keys.py @@ -73,7 +73,7 @@ def initialize_commands(command_list): # system functions bind(ctrl('D'), 'q', 'ZZ', do('exit')) bind(ctrl('R'), do('reset')) - bind(ctrl('L'), do('redraw')) + bind(ctrl('L'), do('redraw_window')) bind(ctrl('C'), do('interrupt')) bind(curses.KEY_RESIZE, do('resize')) bind(curses.KEY_MOUSE, do('handle_mouse')) diff --git a/ranger/fm.py b/ranger/fm.py index a93b732a..db09129c 100644 --- a/ranger/fm.py +++ b/ranger/fm.py @@ -60,9 +60,7 @@ class FM(Actions): while True: try: self.bookmarks.update_if_outdated() - self.ui.poke() - self.ui.draw() - self.ui.finalize() + self.ui.redraw() key = self.ui.get_next_key() diff --git a/ranger/gui/ui.py b/ranger/gui/ui.py index 2af12cca..190e5bb8 100644 --- a/ranger/gui/ui.py +++ b/ranger/gui/ui.py @@ -117,8 +117,14 @@ class UI(DisplayableContainer): """Called after an initialize() call. Override this! """ - + def redraw(self): + """Redraw all widgets""" + self.poke() + self.draw() + self.finalize() + + def redraw_window(self): """Redraw the window. This only calls self.win.redrawwin().""" self.win.redrawwin() self.win.refresh() |