diff options
author | Mike Antipov <mantipov@productengine.com> | 2010-04-13 10:55:00 +0300 |
---|---|---|
committer | Mike Antipov <mantipov@productengine.com> | 2010-04-13 10:55:00 +0300 |
commit | 4f20b91acdddc06b7e033afa42e19f993f7efb30 (patch) | |
tree | 483d8aa98b972d61634ce148441cdf9b65789aaa /indra/newview/llchiclet.cpp | |
parent | aade7752202d321eb3cf6ed6a9e004ad200689b7 (diff) |
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
Diffstat (limited to 'indra/newview/llchiclet.cpp')
-rw-r--r-- | indra/newview/llchiclet.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
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<LLButton>(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() |