commit 76ab78ef008338c34baf930e698fdd248e87ef6e
parent 950d7dc1ca264982ff99df0fdb1726f7112be161
Author: madhat2r <MaDhAt2r@dukefoo.com>
Date: Wed, 23 Apr 2014 16:14:32 +0200
Add new colormap for attachment sybol with sane fallback for existing colorschemes.
Squashed commit of the following:
commit 8dcf98df8e9104a5dc75539f64512cc91ed7eeba
Author: madhat2r
Date: Wed Apr 23 08:48:29 2014 -0500
Add new colormap for attachment sybol with sane fallback for existing
colorschemes.
commit 78007ef68d55d79b5f8209cdc23a9644808a3962
Author: madhat2r
Date: Tue Apr 22 18:54:14 2014 -0500
Add new colormap for attachment symbol
commit 2a5b5d686271e0d21c3a9480cdfb5cc4ee54997e
Author: madhat2r
Date: Tue Apr 22 15:43:43 2014 -0500
Add optional colormap for attachement symbol
Diffstat:
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/lib/sup/colormap.rb b/lib/sup/colormap.rb
@@ -50,6 +50,7 @@ class Colormap
:quote => { :fg => "yellow", :bg => "default" },
:sig => { :fg => "yellow", :bg => "default" },
:to_me => { :fg => "green", :bg => "default" },
+ :with_attachment => { :fg => "green", :bg => "default" },
:starred => { :fg => "yellow", :bg => "default", :attrs => ["bold"] },
:starred_patina => { :fg => "yellow", :bg => "green", :attrs => ["bold"] },
:alternate_starred_patina => { :fg => "yellow", :bg => "blue", :attrs => ["bold"] },
@@ -190,6 +191,11 @@ class Colormap
Redwood::load_yaml_obj Redwood::COLOR_FN
end
+ ## Set attachment sybmol to sane default for existing colorschemes
+ if user_colors and user_colors.has_key? :to_me
+ user_colors[:with_attachment] = user_colors[:to_me] unless user_colors.has_key? :with_attachment
+ end
+
Colormap::DEFAULT_COLORS.merge(user_colors||{}).each_pair do |k, v|
fg = begin
Ncurses.const_get "COLOR_#{v[:fg].to_s.upcase}"
diff --git a/lib/sup/modes/thread_index_mode.rb b/lib/sup/modes/thread_index_mode.rb
@@ -979,7 +979,7 @@ protected
from +
[
[:size_widget_color, size_widget_text],
- [:to_me_color, t.labels.member?(:attachment) ? "@" : " "],
+ [:with_attachment_color , t.labels.member?(:attachment) ? "@" : " "],
[:to_me_color, directly_participated ? ">" : (participated ? '+' : " ")],
] +
(t.labels - @hidden_labels).sort_by {|x| x.to_s}.map {