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 | |
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')
-rw-r--r-- | indra/newview/app_settings/settings.xml | 22 | ||||
-rw-r--r-- | indra/newview/llchiclet.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llchiclet.h | 10 | ||||
-rw-r--r-- | indra/newview/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 8b66cce8a3..00c29477ce 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 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() diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index ba17c5970e..97f494b817 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -800,16 +800,6 @@ public: */ 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 c6ca814f58..e412c491fd 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" |