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,
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)
_ 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
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"
@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
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
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
end
imp_widget =
if m.has_label?(:starred)
- [:starred_patina_color, "* "]
+ [star_color, "* "]
else
[color, " "]
end
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
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 + ')': ''}"]]]