commit 1ced765e1bf3fd34a456c7644f43de8f8ce810e7
parent 8b1ceac46867999fbaf2793cb13f6e9cfe6a86c3
Author: wmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Date: Mon, 5 Nov 2007 02:46:42 +0000
added toggle all tagged feature (thanks to Marcus Williams)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@667 5c8cc53c-5e98-4d25-b20a-d8db53a31250
Diffstat:
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb
@@ -23,7 +23,8 @@ class ThreadIndexMode < LineCursorMode
k.add :jump_to_next_new, "Jump to next new thread", :tab
k.add :reply, "Reply to latest message in a thread", 'r'
k.add :forward, "Forward latest message in a thread", 'f'
- k.add :toggle_tagged, "Tag/untag current line", 't'
+ k.add :toggle_tagged, "Tag/untag selected thread", 't'
+ k.add :toggle_tagged_all, "Tag/untag all threads", 'T'
k.add :apply_to_tagged, "Apply next command to all tagged threads", ';'
end
@@ -320,6 +321,11 @@ class ThreadIndexMode < LineCursorMode
update_text_for_line curpos
cursor_down
end
+
+ def toggle_tagged_all
+ @threads.each { |t| @tags.toggle_tag_for t }
+ regen_text
+ end
def apply_to_tagged; @tags.apply_to_tagged; end