From: wmorgan Date: Mon, 5 Nov 2007 02:46:42 +0000 (+0000) Subject: added toggle all tagged feature (thanks to Marcus Williams) X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=1ced765e1bf3fd34a456c7644f43de8f8ce810e7;p=sup 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 --- diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb index 357161a..4988c43 100644 --- 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