> On Jan. 13, 2011, 8:05 a.m., Twisted Laws wrote:
> > To me, this is the wrong solution.  label_selected used to work to allow a 
> > button to display different text when it was selected, so you could have a 
> > button that said More until it was pressed or selected and displayed more 
> > informaiton.  At that time the text could change to Less indicating that 
> > pressing the button a second time would maybe reduce the information 
> > displayed.  If the button in question here doesn't change when pressing, 
> > that means that something down in the control code is wrong.
> 
> Jonathan Yap wrote:
>     I did a test with the floater preview UI (one of the few places that 
> label is not the same as label_selected.  There is a >> button there that 
> does change to << when pressed.
>     
>     However, in this case, there is some code that does the button swapping.  
> In llpanelnearbymedia.cpp / void LLPanelNearByMedia::onMoreLess()
>     
>       getChild<LLUICtrl>("more_btn")->setVisible(!is_more);
>       getChild<LLUICtrl>("less_btn")->setVisible(is_more);
>     
>     If people think refactoring rather then just rewording is the way to go 
> please say so.  I always hesitate to "fix what ain't broke".
>     
>     The vast majority of button definitions in the xml files have identical 
> entries for label and label_selected (is having label_selected present a 
> requirement in a button definition or are all these entires superfluous?).

I looked into this and have a patch that corrects it.  What the patch does in 
llPanelNearByMedia::onMoreLess(), the first statement is changed to bool 
is_more = getChild<LLButton>("more_btn")->getToggleState();  the two statements 
Jonathan shows are changed to just one 
getChild<LLUICtrl>("more_btn")->setVisible(true); (may just be removed and not 
be necessary) and in the xml file, the first more_btn gets is_toggle="true" 
added and the less_btn is removed.  My patch file is attached to STORM-844.


- Twisted


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://codereview.secondlife.com/r/78/#review148
-----------------------------------------------------------


On Jan. 12, 2011, 6:02 a.m., Jonathan Yap wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://codereview.secondlife.com/r/78/
> -----------------------------------------------------------
> 
> (Updated Jan. 12, 2011, 6:02 a.m.)
> 
> 
> Review request for Viewer.
> 
> 
> Summary
> -------
> 
> "More" should be "Less" when Media Control is open
> 
> This is a trivial text change in an xml file.  The reason I am posting this 
> here is due to some confusion using label_selected.  In this case having it 
> set to a different value than when label is set to seems to have no effect, 
> so I have made them identical.
> 
> I scanned all the xml files and there are only about 5 places where 
> label_selected is different from the preceding label= value.
> 
> Is there any reason to revert back to having them set to different values?
> i.e. label="More" and label_selected="Less"
> 
> 
> This addresses bug storm-844.
>     http://jira.secondlife.com/browse/storm-844
> 
> 
> Diffs
> -----
> 
>   doc/contributions.txt 179e0754a27d 
>   indra/newview/skins/default/xui/en/panel_nearby_media.xml 179e0754a27d 
> 
> Diff: http://codereview.secondlife.com/r/78/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Jonathan
> 
>

_______________________________________________
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges

Reply via email to