if state == :text && (@snippet.nil? || @snippet.length < SNIPPET_LEN) &&
line !~ /[=\*#_-]{3,}/ && line !~ /^\s*$/
- @snippet = (@snippet ? @snippet + " " : "") + line.gsub(/^\s+/, "").gsub(/[\r\n]/, "").gsub(/\s+/, " ")
+ @snippet += " " unless @snippet.empty?
+ @snippet += line.gsub(/^\s+/, "").gsub(/[\r\n]/, "").gsub(/\s+/, " ")
@snippet = @snippet[0 ... SNIPPET_LEN]
end
-# if @snippet.nil? && state == :text && (line.length > 40 ||
-# line =~ /\S+.*[^,!:]\s*$/)
-# @snippet = line.gsub(/^\s+/, "").gsub(/[\r\n]/, "")[0 .. 80]
-# end
end
## final object
[: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]
+ [base_color, t.subj + (t.subj.empty? ? "" : " ")],
] +
- (t.labels - @hidden_labels).map { |label| [:label_color, " +#{label}"] } +
- [[:snippet_color, " " + t.snippet]
+ (t.labels - @hidden_labels).map { |label| [:label_color, "+#{label} "] } +
+ [[:snippet_color, t.snippet]
]
end
when :open
[[prefix_widget, widget, imp_widget,
[:message_patina_color,
- "#{m.from ? m.from.mediumname : '?'} to #{m.to.map { |l| l.shortname }.join(', ')} #{m.date.to_nice_s} (#{m.date.to_nice_distance_s})"]]]
+ "#{m.from ? m.from.mediumname : '?'} to #{m.recipients.map { |l| l.shortname }.join(', ')} #{m.date.to_nice_s} (#{m.date.to_nice_distance_s})"]]]
# (m.to.empty? ? [] : [[[:message_patina_color, prefix + " To: " + m.recipients.map { |x| x.mediumname }.join(", ")]]]) +
when :closed
[[prefix_widget, widget, imp_widget,