]> git.cworth.org Git - sup/commitdiff
small gui improvements, mostly involving snippets
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Wed, 20 Dec 2006 19:46:13 +0000 (19:46 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Wed, 20 Dec 2006 19:46:13 +0000 (19:46 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@89 5c8cc53c-5e98-4d25-b20a-d8db53a31250

lib/sup/message.rb
lib/sup/modes/thread-index-mode.rb
lib/sup/modes/thread-view-mode.rb

index 0f7d6b7e24de5cba43f727a97aa82f1962d24518..9ced9572e2ff1f0127be5772c195dfc8c8ab9d4b 100644 (file)
@@ -297,13 +297,10 @@ private
  
       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
index 5845ea2306db84d4e987f88611e58402ca0f9000..4901a26571c9f4299163b6307fd8e7b4bbc18212 100644 (file)
@@ -360,10 +360,10 @@ protected
       [: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
 
index 7a37899242cd65e89fdfab55277052cd97658a0c..ca55d1fde5d5376f9e745809e7ec5d6ba48566e5 100644 (file)
@@ -281,7 +281,7 @@ private
     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,