commit 54ef325f2e02f133ed20f9145e694ab7c8261f10
parent 5ee7bd31f12809ab65124b2613f2181e22073328
Author: Rich Lane <rlane@club.cc.cmu.edu>
Date: Fri, 14 May 2010 09:04:59 -0700
Merge branch 'master' into next
Diffstat:
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/bin/sup b/bin/sup
@@ -86,6 +86,7 @@ global_keymap = Keymap.new do |k|
k.add :nothing, "Do nothing", :ctrl_g
k.add :recall_draft, "Edit most recent draft message", 'R'
k.add :show_inbox, "Show the Inbox buffer", 'I'
+ k.add :clear_hooks, "Clear all hooks", 'H'
k.add :show_console, "Show the Console buffer", '~'
## Submap for less often used keybindings
@@ -330,6 +331,8 @@ begin
end
when :show_inbox
BufferManager.raise_to_front ibuf
+ when :clear_hooks
+ HookManager.clear
when :show_console
b, new = bm.spawn_unless_exists("Console", :system => true) { ConsoleMode.new }
b.mode.run
diff --git a/lib/sup/hook.rb b/lib/sup/hook.rb
@@ -112,7 +112,7 @@ EOS
def enabled? name; !hook_for(name).nil? end
- def clear; @hooks.clear; end
+ def clear; @hooks.clear; BufferManager.flash "Hooks cleared" end
def clear_one k; @hooks.delete k; end
private