From edc98d8e8339c45f48656163805d5ed144e802b5 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Sun, 15 Jan 2012 17:34:26 -0500 Subject: [PATCH] Add the NumIconsToShow metric. --- Themes/_fallback/metrics.ini | 1 + src/WheelNotifyIcon.cpp | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index 8369eb9728..3105f92ccd 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -1447,6 +1447,7 @@ AfterSetCommand=%TextBannerAfterSet [WheelNotifyIcon] ShowTraining=false BlinkPlayersBest=true +NumIconsToShow=2 # 04 # diff --git a/src/WheelNotifyIcon.cpp b/src/WheelNotifyIcon.cpp index ecdf46e6fc..eda452a441 100644 --- a/src/WheelNotifyIcon.cpp +++ b/src/WheelNotifyIcon.cpp @@ -14,6 +14,7 @@ static ThemeMetric SHOW_TRAINING ("WheelNotifyIcon","ShowTraining"); static ThemeMetric BLINK_BEST_ICON ("WheelNotifyIcon","BlinkPlayersBest"); +static ThemeMetric NUM_ICONS_TO_SHOW ("WheelNotifyIcon","NumIconsToShow"); WheelNotifyIcon::WheelNotifyIcon() { @@ -57,9 +58,7 @@ void WheelNotifyIcon::SetFlags( Flags flags ) m_vIconsToShow.push_back( empty ); } - // crop to most important 2 - // todo: Let themer handle this? -aj - m_vIconsToShow.resize( min(m_vIconsToShow.size(),2u) ); + m_vIconsToShow.resize( min(m_vIconsToShow.size(), static_cast(NUM_ICONS_TO_SHOW)) ); // Broadcast Set message so items can react. (futures) -aj //Message msg("Set");