]> git.cworth.org Git - sup/commitdiff
Merge branch 'draft-colors' into next
authorWilliam Morgan <wmorgan-sup@masanjin.net>
Sat, 16 Feb 2008 19:19:56 +0000 (11:19 -0800)
committerWilliam Morgan <wmorgan-sup@masanjin.net>
Sat, 16 Feb 2008 19:19:56 +0000 (11:19 -0800)
bin/sup
lib/sup/modes/inbox-mode.rb
lib/sup/modes/thread-index-mode.rb

diff --git a/bin/sup b/bin/sup
index 84fd77c5d07df9b2fc4f16b09cfa17dced6cfbec..f536da69eefdd3f9a85e1d0c1c2e689fe0071054 100644 (file)
--- 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
index a2de13fc5b6717d36052741bba7341d7d8153525..f156b69fa55fc774619cebcee136a5a575cb5d95 100644 (file)
@@ -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
index e24d7e0398b01601faca320bd3dde650f130f773..7a0b8150c455cc4df19cdb581e3ae9144cacd1e0 100644 (file)
@@ -655,7 +655,6 @@ protected
 
     date = t.date.to_nice_s
 
-    new = t.has_label?(:unread)
     starred = t.has_label?(:starred)
 
     ## format the from column
@@ -692,7 +691,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