From 4f20b91acdddc06b7e033afa42e19f993f7efb30 Mon Sep 17 00:00:00 2001 From: Mike Antipov <mantipov@productengine.com> Date: Tue, 13 Apr 2010 10:55:00 +0300 Subject: [PATCH] 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/app_settings/settings.xml | 22 +++++++++++++++++++ indra/newview/llchiclet.cpp | 10 ++++++--- indra/newview/llchiclet.h | 10 --------- .../skins/default/xui/en/panel_bottomtray.xml | 2 -- 4 files changed, 29 insertions(+), 15 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 8b66cce8a3e..00c29477cec 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -10646,6 +10646,28 @@ <key>Value</key> <real>50.0</real> </map> + <key>WellIconFlashCount</key> + <map> + <key>Comment</key> + <string>Number of flashes of IM Well and Notification Well icons after which flashing buttons stay lit up. Requires restart.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <integer>3</integer> + </map> + <key>WellIconFlashPeriod</key> + <map> + <key>Comment</key> + <string>Period at which IM Well and Notification Well icons flash (seconds). Requires restart.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>F32</string> + <key>Value</key> + <real>0.25</real> + </map> <key>WindLightUseAtmosShaders</key> <map> <key>Comment</key> diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index e39384b7b29..05d3d70c74b 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() diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index ba17c5970ed..97f494b817f 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -800,16 +800,6 @@ class LLSysWellChiclet : public LLChiclet */ Optional<S32> max_displayed_count; - /** - * How many time chiclet should flash before set "Lit" state. Default value is 3. - */ - Optional<S32> flash_to_lit_count; - - /** - * Period of flashing while setting "Lit" state, in seconds. Default value is 0.5. - */ - Optional<F32> flash_period; - Params(); }; diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index c6ca814f587..e412c491fdc 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -346,7 +346,6 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly. user_resize="false"> <chiclet_im_well max_displayed_count="99" - flash_period="0.3" follows="right" height="28" layout="topleft" @@ -395,7 +394,6 @@ image_pressed_selected "Lit" + "Selected" - there are new messages and the Well min_width="37" user_resize="false"> <chiclet_notification - flash_period="0.25" follows="right" height="23" layout="topleft" -- GitLab