]> git.cworth.org Git - sup/commitdiff
alternate starred color
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Sun, 1 Apr 2007 04:07:56 +0000 (04:07 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Sun, 1 Apr 2007 04:07:56 +0000 (04:07 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@355 5c8cc53c-5e98-4d25-b20a-d8db53a31250

History.txt
bin/sup
doc/TODO
lib/sup/modes/thread-view-mode.rb

index 723b6d8bcdcb007ed185f8d46450582d684a4dc6..eda41f98eaf253ade364544e6e7f8e4ed249b776 100644 (file)
@@ -1,5 +1,8 @@
 == 0.0.8 / XXXX
 * Maildir support.
+* Renamed sup-import => sup-sync with a brand new interface.
+* Added a sup-dump, to enable backing up and rebuilding indices from
+  scratch (e.g. when Ferret upgrades break index formats).
 * More bugfixes. Will they ever end?
 
 == 0.0.7 / 2007-02-12
diff --git a/bin/sup b/bin/sup
index b2c16dc163a93c22557d1d882662d46938ab72ed..00f0b3d352668d174d126907d9d96b88adadc1a5 100644 (file)
--- a/bin/sup
+++ b/bin/sup
@@ -83,6 +83,8 @@ begin
           Ncurses::A_BOLD
     c.add :starred_patina_color, Ncurses::COLOR_YELLOW, Ncurses::COLOR_GREEN,
           Ncurses::A_BOLD
+    c.add :alternate_starred_patina_color, Ncurses::COLOR_YELLOW,
+          Ncurses::COLOR_BLUE, Ncurses::A_BOLD
     c.add :snippet_color, Ncurses::COLOR_CYAN, Ncurses::COLOR_BLACK
     c.add :option_color, Ncurses::COLOR_WHITE, Ncurses::COLOR_BLACK
     c.add :tagged_color, Ncurses::COLOR_YELLOW, Ncurses::COLOR_BLACK,
index 087694273e973a25b757f5b8697cfefc557f3868..83c22bb35d0572cf29595a748d7231583cb3d02f 100644 (file)
--- a/doc/TODO
+++ b/doc/TODO
@@ -1,13 +1,11 @@
 for 0.0.8
 ---------
 _ split out threading & message chunk parsing to a separate library
-_ ferret upgrade script (dump & restore)
 _ nice little startup config program
 _ bugfix: when one new message comes into an imap folder, we don't
    catch it until a reload
 _ bugfix: triggering a pageup when cursor scrolling up jumps to the
    bottom of the page rather than the next line
-_ bugfix: stars on messages with blue backgrounds still have green bgs
 _ bugfix: m in thread-view-mode when a person is not selected should open up a
   blank compose-mode rather than do nothing
 _ Net::SMTP support (cuz I'm going to need it soon)
@@ -15,6 +13,8 @@ _ bugfix: add new message counts until keypress
 _ bugfix: attachment filenames sometimes not detected (filename=)
 _ bugfix: final logging messages to stdout?
 _ bugfix: mbox directory shouldn't generate an exception, just an error
+x bugfix: stars on messages with blue backgrounds still have green bgs
+x ferret upgrade script (dump & restore)
 x bugfix: mark messages as read immediately when t-v-m is opened
 x compose in thread-view-mode auto-fills in person
 x bugfix: 'N' in thread-view-mode (expand only new messages) crashes
index 3ef7d816dc2699e1eee63cfce82127c00fbb6ab0..fc6b72031f8d5acdb446b6b0111275b67162f779 100644 (file)
@@ -3,7 +3,7 @@ module Redwood
 class ThreadViewMode < LineCursorMode
   ## this holds all info we need to lay out a message
   class Layout
-    attr_accessor :top, :bot, :prev, :next, :depth, :width, :state, :color, :orig_new
+    attr_accessor :top, :bot, :prev, :next, :depth, :width, :state, :color, :star_color, :orig_new
   end
 
   DATE_FORMAT = "%B %e %Y %l:%M%P"
@@ -53,6 +53,7 @@ class ThreadViewMode < LineCursorMode
       @layout[m] = Layout.new
       @layout[m].state = initial_state_for m
       @layout[m].color = altcolor ? :alternate_patina_color : :message_patina_color
+      @layout[m].star_color = altcolor ? :alternate_starred_patina_color : :starred_patina_color
       @layout[m].orig_new = m.has_label? :unread
       altcolor = !altcolor
       if latest_date.nil? || m.date > latest_date
@@ -297,7 +298,7 @@ private
       l = @layout[m] or next # TODO: figure out why this is nil sometimes
 
       ## build the patina
-      text = chunk_to_lines m, l.state, @text.length, depth, parent, @layout[m].color
+      text = chunk_to_lines m, l.state, @text.length, depth, parent, @layout[m].color, @layout[m].star_color
       
       l.top = @text.length
       l.bot = @text.length + text.length # updated below
@@ -334,7 +335,7 @@ private
     end
   end
 
-  def message_patina_lines m, state, start, parent, prefix, color
+  def message_patina_lines m, state, start, parent, prefix, color, star_color
     prefix_widget = [color, prefix]
     widget = 
       case state
@@ -345,7 +346,7 @@ private
       end
     imp_widget = 
       if m.has_label?(:starred)
-        [:starred_patina_color, "* "]
+        [star_color, "* "]
       else
         [color, "  "]
       end
@@ -405,7 +406,7 @@ private
     p.longname + (ContactManager.is_contact?(p) ? " (#{ContactManager.alias_for p})" : "")
   end
 
-  def chunk_to_lines chunk, state, start, depth, parent=nil, color=nil
+  def chunk_to_lines chunk, state, start, depth, parent=nil, color=nil, star_color=nil
     prefix = " " * INDENT_SPACES * depth
     case chunk
     when :fake_root
@@ -413,7 +414,7 @@ private
     when nil
       [[[:missing_message_color, "#{prefix}<an unreceived message>"]]]
     when Message
-      message_patina_lines(chunk, state, start, parent, prefix, color) +
+      message_patina_lines(chunk, state, start, parent, prefix, color, star_color) +
         (chunk.is_draft? ? [[[:draft_notification_color, prefix + " >>> This message is a draft. To edit, hit 'e'. <<<"]]] : [])
     when Message::Attachment
       [[[:mime_color, "#{prefix}+ MIME attachment #{chunk.content_type}#{chunk.desc ? ' (' + chunk.desc + ')': ''}"]]]