]> git.notmuchmail.org Git - sup/commitdiff
starred things now are yellow and i saved one character of space by moving the starsv...
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Wed, 4 Apr 2007 16:18:14 +0000 (16:18 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Wed, 4 Apr 2007 16:18:14 +0000 (16:18 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@377 5c8cc53c-5e98-4d25-b20a-d8db53a31250

bin/sup
lib/sup/modes/thread-index-mode.rb

diff --git a/bin/sup b/bin/sup
index a1ce4d65766fc1174e9c7b06e77eff2caa064084..c565a784de0714038f11c2e4f67ea27727fdf604 100644 (file)
--- a/bin/sup
+++ b/bin/sup
@@ -65,6 +65,8 @@ begin
     c.add :index_old_color, Ncurses::COLOR_WHITE, Ncurses::COLOR_BLACK
     c.add :index_new_color, Ncurses::COLOR_WHITE, Ncurses::COLOR_BLACK, 
            Ncurses::A_BOLD
+    c.add :index_starred_color, Ncurses::COLOR_YELLOW, 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 7bfb9ead8c5142b88f62f7faa20a3b966e858c15..a9049026a6b598e20869cbaa97e414f3a0136137 100644 (file)
@@ -427,12 +427,20 @@ protected
     dp = t.direct_participants.any? { |p| AccountManager.is_account? p }
     p = dp || t.participants.any? { |p| AccountManager.is_account? p }
 
-    base_color = (new ? :index_new_color : :index_old_color)
+    base_color =
+      if starred
+        :index_starred_color
+      elsif new
+        :index_new_color
+      else 
+        :index_old_color
+      end
+
     [ 
       [:tagged_color, @tags.tagged?(t) ? ">" : " "],
-      [:none, sprintf("%#{@date_width}s ", date)],
+      [:none, sprintf("%#{@date_width}s", date)],
+      (starred ? [:starred_color, "*"] : [:none, " "]),
       [base_color, sprintf("%-#{@from_width}s", from)],
-      [:starred_color, starred ? "*" : " "],
       [:none, t.size == 1 ? " " * (@size_width + 2) : sprintf("(%#{@size_width}d)", t.size)],
       [:to_me_color, dp ? " >" : (p ? ' +' : "  ")],
       [base_color, t.subj + (t.subj.empty? ? "" : " ")],