From 4f20b91acdddc06b7e033afa42e19f993f7efb30 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Tue, 13 Apr 2010 10:55:00 +0300 Subject: Fixed normal bug EXT-5973 (converstations button flash count and rate needs to be controllable) Made flashing count and period for IM Well and Notification Well icons configurable via viewer settings: WellIconFlashCount, WellIconFlashPeriod. Due to Flash Timer is implemented as derived class from EventTimer it is impossible to change period in runtime. So, both settings are made as required restart. Also removed deprecated "flash_to_lit_count" & "flash_period" widget params. Reviewed by Vadim at https://codereview.productengine.com/secondlife/r/220/ --HG-- branch : product-engine --- indra/newview/llchiclet.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'indra/newview/llchiclet.cpp') diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index e39384b7b2..05d3d70c74 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -131,8 +131,6 @@ LLSysWellChiclet::Params::Params() : button("button") , unread_notifications("unread_notifications") , max_displayed_count("max_displayed_count", 99) -, flash_to_lit_count("flash_to_lit_count", 3) -, flash_period("flash_period", 0.5F) { button.name("button"); button.tab_stop(FALSE); @@ -152,7 +150,13 @@ LLSysWellChiclet::LLSysWellChiclet(const Params& p) mButton = LLUICtrlFactory::create(button_params); addChild(mButton); - mFlashToLitTimer = new FlashToLitTimer(p.flash_to_lit_count, p.flash_period, boost::bind(&LLSysWellChiclet::changeLitState, this)); + // use settings from settings.xml to be able change them via Debug settings. See EXT-5973. + // Due to Timer is implemented as derived class from EventTimer it is impossible to change period + // in runtime. So, both settings are made as required restart. + static S32 flash_to_lit_count = gSavedSettings.getS32("WellIconFlashCount"); + static F32 flash_period = gSavedSettings.getF32("WellIconFlashPeriod"); + + mFlashToLitTimer = new FlashToLitTimer(flash_to_lit_count, flash_period, boost::bind(&LLSysWellChiclet::changeLitState, this)); } LLSysWellChiclet::~LLSysWellChiclet() -- cgit v1.2.3