diff options
author | hut <hut@lavabit.com> | 2011-03-22 21:22:16 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2011-03-22 21:22:16 +0100 |
commit | c7fcbcf76ef379e279dbfb830eecf32350de688c (patch) | |
tree | 4fe6a500f7d70e258b41a032b8a990fa45910b75 | |
parent | dffc317f2df42b73304bd2119bdcfa15c88fe4eb (diff) | |
download | ranger-c7fcbcf76ef379e279dbfb830eecf32350de688c.tar.gz |
gui.ui: clear the message in statusbar after a keypress
-rw-r--r-- | ranger/core/actions.py | 2 | ||||
-rw-r--r-- | ranger/gui/ui.py | 2 | ||||
-rw-r--r-- | ranger/gui/widgets/statusbar.py | 5 |
3 files changed, 7 insertions, 2 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py index 7b721229..4ea4cfbf 100644 --- a/ranger/core/actions.py +++ b/ranger/core/actions.py @@ -802,7 +802,7 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware): self.loader.add(obj) def delete(self): - self.notify("Deleting!", duration=1) + self.notify("Deleting!") selected = self.env.get_selection() self.env.copy -= set(selected) if selected: diff --git a/ranger/gui/ui.py b/ranger/gui/ui.py index 2f27f11e..a2babed8 100644 --- a/ranger/gui/ui.py +++ b/ranger/gui/ui.py @@ -139,6 +139,8 @@ class UI(DisplayableContainer): if DisplayableContainer.press(self, key): return + self.status.clear_message() + self.env.keymanager.use_context('browser') self.env.key_append(key) kbuf = self.env.keybuffer diff --git a/ranger/gui/widgets/statusbar.py b/ranger/gui/widgets/statusbar.py index 2f3c67cf..b7ab123c 100644 --- a/ranger/gui/widgets/statusbar.py +++ b/ranger/gui/widgets/statusbar.py @@ -53,9 +53,12 @@ class StatusBar(Widget): def request_redraw(self): self.need_redraw = True - def notify(self, text, duration=4, bad=False): + def notify(self, text, duration=0, bad=False): self.msg = Message(text, duration, bad) + def clear_message(self): + self.msg = None + def draw(self): """Draw the statusbar""" |