commit 94b31a36e2b1a3d70b29d45cd7b2361b6b9c3379
parent 004f605412f27ae6d2acd813bd060b50d7203bc6
Author: Nicolas Pouillard <nicolas.pouillard@gmail.com>
Date: Sat, 9 Feb 2008 13:05:29 +0100
Show drafts in red, in thread-index-mode.
This patch would help to think about finishing drafts.
Diffstat:
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/bin/sup b/bin/sup
@@ -138,6 +138,8 @@ begin
Ncurses::A_BOLD
c.add :index_starred_color, Ncurses::COLOR_YELLOW, Ncurses::COLOR_BLACK,
Ncurses::A_BOLD
+ c.add :index_draft_color, Ncurses::COLOR_RED, Ncurses::COLOR_BLACK,
+ Ncurses::A_BOLD
c.add :labellist_old_color, Ncurses::COLOR_WHITE, Ncurses::COLOR_BLACK
c.add :labellist_new_color, Ncurses::COLOR_WHITE, Ncurses::COLOR_BLACK,
Ncurses::A_BOLD
diff --git a/lib/sup/modes/inbox-mode.rb b/lib/sup/modes/inbox-mode.rb
@@ -9,7 +9,7 @@ class InboxMode < ThreadIndexMode
end
def initialize
- super [:inbox, :sent], { :label => :inbox, :skip_killed => true }
+ super [:inbox, :sent, :draft], { :label => :inbox, :skip_killed => true }
raise "can't have more than one!" if defined? @@instance
@@instance = self
end
diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb
@@ -636,7 +636,6 @@ protected
date = t.date.to_nice_s
- new = t.has_label?(:unread)
starred = t.has_label?(:starred)
## format the from column
@@ -673,7 +672,9 @@ protected
p = dp || t.participants.any? { |p| AccountManager.is_account? p }
subj_color =
- if new
+ if t.has_label?(:draft)
+ :index_draft_color
+ elsif t.has_label?(:unread)
:index_new_color
elsif starred
:index_starred_color