diff options
author | Christian Goetze <cg@lindenlab.com> | 2007-10-10 00:01:43 +0000 |
---|---|---|
committer | Christian Goetze <cg@lindenlab.com> | 2007-10-10 00:01:43 +0000 |
commit | 5ec8bbbe2244ea70d8aa74b5c572351632699425 (patch) | |
tree | 12a4e92720c531105a21ef4f9f363b8572d72a3a /indra/llui | |
parent | b3b62c3b9ef32c4dbcae51cd3ef582734d5717bb (diff) |
svn merge -r71238:71367 svn+ssh://svn/svn/linden/branches/maint-ui-qa3
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llbutton.cpp | 12 | ||||
-rw-r--r-- | indra/llui/llbutton.h | 26 | ||||
-rw-r--r-- | indra/llui/llcheckboxctrl.cpp | 4 | ||||
-rw-r--r-- | indra/llui/llcheckboxctrl.h | 4 | ||||
-rw-r--r-- | indra/llui/llcombobox.cpp | 18 | ||||
-rw-r--r-- | indra/llui/llcombobox.h | 6 | ||||
-rw-r--r-- | indra/llui/lllineeditor.cpp | 23 | ||||
-rw-r--r-- | indra/llui/lllineeditor.h | 14 | ||||
-rw-r--r-- | indra/llui/llmenugl.cpp | 4 | ||||
-rw-r--r-- | indra/llui/llmenugl.h | 6 | ||||
-rw-r--r-- | indra/llui/llpanel.cpp | 8 | ||||
-rw-r--r-- | indra/llui/llpanel.h | 8 | ||||
-rw-r--r-- | indra/llui/llscrolllistctrl.cpp | 2 | ||||
-rw-r--r-- | indra/llui/llscrolllistctrl.h | 10 | ||||
-rw-r--r-- | indra/llui/llsliderctrl.cpp | 6 | ||||
-rw-r--r-- | indra/llui/llsliderctrl.h | 4 | ||||
-rw-r--r-- | indra/llui/llspinctrl.cpp | 2 | ||||
-rw-r--r-- | indra/llui/llspinctrl.h | 2 | ||||
-rw-r--r-- | indra/llui/lltextbox.cpp | 6 | ||||
-rw-r--r-- | indra/llui/lltextbox.h | 6 | ||||
-rw-r--r-- | indra/llui/lltexteditor.cpp | 6 | ||||
-rw-r--r-- | indra/llui/lltexteditor.h | 2 | ||||
-rw-r--r-- | indra/llui/lluictrl.cpp | 4 | ||||
-rw-r--r-- | indra/llui/lluictrl.h | 4 | ||||
-rw-r--r-- | indra/llui/lluictrlfactory.cpp | 3 | ||||
-rw-r--r-- | indra/llui/llview.cpp | 7 | ||||
-rw-r--r-- | indra/llui/llview.h | 2 |
27 files changed, 103 insertions, 96 deletions
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index 5c9b49c5a8..65cbcf3634 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -776,36 +776,36 @@ LLSD LLButton::getValue() const return mToggleState; } -void LLButton::setLabel( const LLString& label ) +void LLButton::setLabel( const LLStringExplicit& label ) { setLabelUnselected(label); setLabelSelected(label); } //virtual -BOOL LLButton::setLabelArg( const LLString& key, const LLString& text ) +BOOL LLButton::setLabelArg( const LLString& key, const LLStringExplicit& text ) { mUnselectedLabel.setArg(key, text); mSelectedLabel.setArg(key, text); return TRUE; } -void LLButton::setLabelUnselected( const LLString& label ) +void LLButton::setLabelUnselected( const LLStringExplicit& label ) { mUnselectedLabel = label; } -void LLButton::setLabelSelected( const LLString& label ) +void LLButton::setLabelSelected( const LLStringExplicit& label ) { mSelectedLabel = label; } -void LLButton::setDisabledLabel( const LLString& label ) +void LLButton::setDisabledLabel( const LLStringExplicit& label ) { mDisabledLabel = label; } -void LLButton::setDisabledSelectedLabel( const LLString& label ) +void LLButton::setDisabledSelectedLabel( const LLStringExplicit& label ) { mDisabledSelectedLabel = label; } diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h index 74926f2b52..5f7d917b4e 100644 --- a/indra/llui/llbutton.h +++ b/indra/llui/llbutton.h @@ -68,7 +68,7 @@ class LLButton { public: // simple button with text label - LLButton(const LLString& name, const LLRect &rect, const LLString& control_name = "", + LLButton(const LLString& name, const LLRect &rect, const LLString& control_name = LLString(), void (*on_click)(void*) = NULL, void *data = NULL); LLButton(const LLString& name, const LLRect& rect, @@ -152,12 +152,12 @@ public: virtual void setValue(const LLSD& value ); virtual LLSD getValue() const; - void setLabel( const LLString& label); - virtual BOOL setLabelArg( const LLString& key, const LLString& text ); - void setLabelUnselected(const LLString& label); - void setLabelSelected(const LLString& label); - void setDisabledLabel(const LLString& disabled_label); - void setDisabledSelectedLabel(const LLString& disabled_label); + void setLabel( const LLStringExplicit& label); + virtual BOOL setLabelArg( const LLString& key, const LLStringExplicit& text ); + void setLabelUnselected(const LLStringExplicit& label); + void setLabelSelected(const LLStringExplicit& label); + void setDisabledLabel(const LLStringExplicit& disabled_label); + void setDisabledSelectedLabel(const LLStringExplicit& disabled_label); void setDisabledLabelColor( const LLColor4& c ) { mDisabledLabelColor = c; } void setFont(const LLFontGL *font) @@ -288,12 +288,12 @@ class LLSquareButton { public: LLSquareButton(const LLString& name, const LLRect& rect, - const LLString& label, - const LLFontGL *font = NULL, - const LLString& control_name = "", - void (*click_callback)(void*) = NULL, - void *callback_data = NULL, - const LLString& selected_label = LLString::null ); + const LLString& label, + const LLFontGL *font = NULL, + const LLString& control_name = LLString(), + void (*click_callback)(void*) = NULL, + void *callback_data = NULL, + const LLString& selected_label = LLString::null ); }; // Helpful functions diff --git a/indra/llui/llcheckboxctrl.cpp b/indra/llui/llcheckboxctrl.cpp index 08ebfafa53..504b342003 100644 --- a/indra/llui/llcheckboxctrl.cpp +++ b/indra/llui/llcheckboxctrl.cpp @@ -242,7 +242,7 @@ LLSD LLCheckBoxCtrl::getValue() const return mButton->getToggleState(); } -void LLCheckBoxCtrl::setLabel( const LLString& label ) +void LLCheckBoxCtrl::setLabel( const LLStringExplicit& label ) { mLabel->setText( label ); reshape(getRect().getWidth(), getRect().getHeight(), FALSE); @@ -253,7 +253,7 @@ LLString LLCheckBoxCtrl::getLabel() const return mLabel->getText(); } -BOOL LLCheckBoxCtrl::setLabelArg( const LLString& key, const LLString& text ) +BOOL LLCheckBoxCtrl::setLabelArg( const LLString& key, const LLStringExplicit& text ) { BOOL res = mLabel->setTextArg(key, text); reshape(getRect().getWidth(), getRect().getHeight(), FALSE); diff --git a/indra/llui/llcheckboxctrl.h b/indra/llui/llcheckboxctrl.h index 37e689173b..513b2930e1 100644 --- a/indra/llui/llcheckboxctrl.h +++ b/indra/llui/llcheckboxctrl.h @@ -94,7 +94,7 @@ public: virtual void setTentative(BOOL b) { mButton->setTentative(b); } virtual BOOL getTentative() const { return mButton->getTentative(); } - virtual BOOL setLabelArg( const LLString& key, const LLString& text ); + virtual BOOL setLabelArg( const LLString& key, const LLStringExplicit& text ); virtual void clear(); virtual void onCommit(); @@ -105,7 +105,7 @@ public: void setEnabledColor( const LLColor4 &color ) { mTextEnabledColor = color; } void setDisabledColor( const LLColor4 &color ) { mTextDisabledColor = color; } - void setLabel( const LLString& label ); + void setLabel( const LLStringExplicit& label ); LLString getLabel() const; virtual void setControlName(const LLString& control_name, LLView* context); diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp index 7ed3d3efbd..5f76cfc94b 100644 --- a/indra/llui/llcombobox.cpp +++ b/indra/llui/llcombobox.cpp @@ -229,12 +229,12 @@ void LLComboBox::clear() { if (mTextEntry) { - mTextEntry->setText(""); + mTextEntry->setText(LLString::null); } - mButton->setLabelSelected(""); - mButton->setLabelUnselected(""); - mButton->setDisabledLabel(""); - mButton->setDisabledSelectedLabel(""); + mButton->setLabelSelected(LLString::null); + mButton->setLabelUnselected(LLString::null); + mButton->setDisabledLabel(LLString::null); + mButton->setDisabledSelectedLabel(LLString::null); mList->deselectAllItems(); } @@ -309,7 +309,7 @@ void LLComboBox::sortByName() // Choose an item with a given name in the menu. // Returns TRUE if the item was found. -BOOL LLComboBox::setSimple(const LLString& name) +BOOL LLComboBox::setSimple(const LLStringExplicit& name) { BOOL found = mList->selectSimpleItem(name, FALSE); @@ -371,7 +371,7 @@ LLSD LLComboBox::getValue() const } } -void LLComboBox::setLabel(const LLString& name) +void LLComboBox::setLabel(const LLStringExplicit& name) { if ( mAllowTextEntry ) { @@ -803,7 +803,7 @@ void LLComboBox::setAllowTextEntry(BOOL allow, S32 max_chars, BOOL set_tentative // clear label on button LLString cur_label = mButton->getLabelSelected(); - setLabel(""); + setLabel(LLString::null); if (!mTextEntry) { LLRect text_entry_rect(0, mRect.getHeight(), mRect.getWidth(), 0); @@ -852,7 +852,7 @@ void LLComboBox::setAllowTextEntry(BOOL allow, S32 max_chars, BOOL set_tentative mTextEntryTentative = set_tentative; } -void LLComboBox::setTextEntry(const LLString& text) +void LLComboBox::setTextEntry(const LLStringExplicit& text) { if (mTextEntry) { diff --git a/indra/llui/llcombobox.h b/indra/llui/llcombobox.h index 9b47bfcabb..ff17d2874f 100644 --- a/indra/llui/llcombobox.h +++ b/indra/llui/llcombobox.h @@ -105,7 +105,7 @@ public: virtual LLSD getValue() const; void setAllowTextEntry(BOOL allow, S32 max_chars = 50, BOOL make_tentative = TRUE); - void setTextEntry(const LLString& text); + void setTextEntry(const LLStringExplicit& text); void add(const LLString& name, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE); // add item "name" to menu void add(const LLString& name, const LLUUID& id, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE); @@ -117,7 +117,7 @@ public: void sortByName(); // Sort the entries in the combobox by name // Select current item by name using selectSimpleItem. Returns FALSE if not found. - BOOL setSimple(const LLString& name); + BOOL setSimple(const LLStringExplicit& name); // Get name of current item. Returns an empty string if not found. const LLString& getSimple() const; // Get contents of column x of selected row @@ -125,7 +125,7 @@ public: // Sets the label, which doesn't have to exist in the label. // This is probably a UI abuse. - void setLabel(const LLString& name); + void setLabel(const LLStringExplicit& name); BOOL remove(const LLString& name); // remove item "name", return TRUE if found and removed diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index 13947d0605..37ee4c46ba 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -320,12 +320,12 @@ void LLLineEditor::setBorderWidth(S32 left, S32 right) mMaxHPixels = mRect.getWidth() - mMinHPixels - mBorderThickness - mBorderRight; } -void LLLineEditor::setLabel(const LLString &new_label) +void LLLineEditor::setLabel(const LLStringExplicit &new_label) { mLabel = new_label; } -void LLLineEditor::setText(const LLString &new_text) +void LLLineEditor::setText(const LLStringExplicit &new_text) { // If new text is identical, don't copy and don't move insertion point if (mText.getString() == new_text) @@ -2322,13 +2322,13 @@ LLSD LLLineEditor::getValue() const return ret; } -BOOL LLLineEditor::setTextArg( const LLString& key, const LLString& text ) +BOOL LLLineEditor::setTextArg( const LLString& key, const LLStringExplicit& text ) { mText.setArg(key, text); return TRUE; } -BOOL LLLineEditor::setLabelArg( const LLString& key, const LLString& text ) +BOOL LLLineEditor::setLabelArg( const LLString& key, const LLStringExplicit& text ) { mLabel.setArg(key, text); return TRUE; @@ -2353,8 +2353,7 @@ LLSearchEditor::LLSearchEditor(const LLString& name, onSearchEdit, NULL, this); - // TODO: this should be translatable - mSearchEdit->setLabel("Type here to search"); + mSearchEdit->setFollowsAll(); mSearchEdit->setSelectAllonFocusReceived(TRUE); @@ -2409,13 +2408,13 @@ LLSD LLSearchEditor::getValue() const } //virtual -BOOL LLSearchEditor::setTextArg( const LLString& key, const LLString& text ) +BOOL LLSearchEditor::setTextArg( const LLString& key, const LLStringExplicit& text ) { return mSearchEdit->setTextArg(key, text); } //virtual -BOOL LLSearchEditor::setLabelArg( const LLString& key, const LLString& text ) +BOOL LLSearchEditor::setLabelArg( const LLString& key, const LLStringExplicit& text ) { return mSearchEdit->setLabelArg(key, text); } @@ -2437,7 +2436,7 @@ void LLSearchEditor::draw() LLUICtrl::draw(); } -void LLSearchEditor::setText(const LLString &new_text) +void LLSearchEditor::setText(const LLStringExplicit &new_text) { mSearchEdit->setText(new_text); } @@ -2483,6 +2482,12 @@ LLView* LLSearchEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFacto max_text_length, NULL, NULL); + LLString label; + if(node->getAttributeString("label", label)) + { + search_editor->mSearchEdit->setLabel(label); + } + search_editor->setText(text); search_editor->initFromXML(node, parent); diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h index 0d1ec08ab2..2cd2ebf9fe 100644 --- a/indra/llui/lllineeditor.h +++ b/indra/llui/lllineeditor.h @@ -136,11 +136,11 @@ public: // assumes UTF8 text virtual void setValue(const LLSD& value ); virtual LLSD getValue() const; - virtual BOOL setTextArg( const LLString& key, const LLString& text ); - virtual BOOL setLabelArg( const LLString& key, const LLString& text ); + virtual BOOL setTextArg( const LLString& key, const LLStringExplicit& text ); + virtual BOOL setLabelArg( const LLString& key, const LLStringExplicit& text ); - void setLabel(const LLString &new_label); - void setText(const LLString &new_text); + void setLabel(const LLStringExplicit &new_label); + void setText(const LLStringExplicit &new_text); const LLString& getText() const { return mText.getString(); } const LLWString& getWText() const { return mText.getWString(); } @@ -312,15 +312,15 @@ public: virtual LLString getWidgetTag() const; static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); - void setText(const LLString &new_text); + void setText(const LLStringExplicit &new_text); void setSearchCallback(void (*search_callback)(const LLString& search_string, void* user_data), void* data) { mSearchCallback = search_callback; mCallbackUserData = data; } // LLUICtrl interface virtual void setValue(const LLSD& value ); virtual LLSD getValue() const; - virtual BOOL setTextArg( const LLString& key, const LLString& text ); - virtual BOOL setLabelArg( const LLString& key, const LLString& text ); + virtual BOOL setTextArg( const LLString& key, const LLStringExplicit& text ); + virtual BOOL setLabelArg( const LLString& key, const LLStringExplicit& text ); virtual void clear(); diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index b8cdd52deb..9b4a2a168c 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -373,7 +373,7 @@ void LLMenuItemGL::setHighlightFGColor( const LLColor4& color ) // change the label -void LLMenuItemGL::setLabel( const LLString& label ) +void LLMenuItemGL::setLabel( const LLStringExplicit& label ) { mLabel = label; } @@ -598,7 +598,7 @@ void LLMenuItemGL::draw( void ) mGotHover = FALSE; } -BOOL LLMenuItemGL::setLabelArg( const LLString& key, const LLString& text ) +BOOL LLMenuItemGL::setLabelArg( const LLString& key, const LLStringExplicit& text ) { mLabel.setArg(key, text); return TRUE; diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h index 6e5ac7482e..6dc9282ba6 100644 --- a/indra/llui/llmenugl.h +++ b/indra/llui/llmenugl.h @@ -127,8 +127,8 @@ public: LLString getLabel( void ) const { return mLabel.getString(); } // change the label - void setLabel( const LLString& label ); - virtual BOOL setLabelArg( const LLString& key, const LLString& text ); + void setLabel( const LLStringExplicit& label ); + virtual BOOL setLabelArg( const LLString& key, const LLStringExplicit& text ); // Get the parent menu for this item virtual LLMenuGL* getMenu(); @@ -443,7 +443,7 @@ public: // return the name label const LLString& getLabel( void ) const { return mLabel.getString(); } - void setLabel(const LLString& label) { mLabel = label; } + void setLabel(const LLStringExplicit& label) { mLabel = label; } static void setDefaultBackgroundColor( const LLColor4& color ); void setBackgroundColor( const LLColor4& color ); diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp index 8ff047efa7..3a0ee9b013 100644 --- a/indra/llui/llpanel.cpp +++ b/indra/llui/llpanel.cpp @@ -962,7 +962,7 @@ LLSD LLPanel::childGetValue(const LLString& id) const return LLSD(); } -BOOL LLPanel::childSetTextArg(const LLString& id, const LLString& key, const LLString& text) +BOOL LLPanel::childSetTextArg(const LLString& id, const LLString& key, const LLStringExplicit& text) { LLUICtrl* child = (LLUICtrl*)getChildByName(id, true); if (child) @@ -972,7 +972,7 @@ BOOL LLPanel::childSetTextArg(const LLString& id, const LLString& key, const LLS return FALSE; } -BOOL LLPanel::childSetLabelArg(const LLString& id, const LLString& key, const LLString& text) +BOOL LLPanel::childSetLabelArg(const LLString& id, const LLString& key, const LLStringExplicit& text) { LLView* child = getChildByName(id, true); if (child) @@ -1033,7 +1033,7 @@ void LLPanel::childSetTabChangeCallback(const LLString& id, const LLString& tabn } } -void LLPanel::childSetText(const LLString& id, const LLString& text) +void LLPanel::childSetText(const LLString& id, const LLStringExplicit& text) { childSetValue(id, LLSD(text)); } @@ -1106,7 +1106,7 @@ void LLPanel::childSetControlName(const LLString& id, const LLString& control_na LLView* LLPanel::getChildByName(const LLString& name, BOOL recurse) const { LLView* view = LLUICtrl::getChildByName(name, recurse); - if (!view) + if (!view && !recurse) { childNotFound(name); } diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h index 318c278be0..dfd7a51529 100644 --- a/indra/llui/llpanel.h +++ b/indra/llui/llpanel.h @@ -119,7 +119,7 @@ public: void setBackgroundOpaque(BOOL b) { mBgOpaque = b; } void setDefaultBtn(LLButton* btn = NULL); void setDefaultBtn(const LLString& id); - void setLabel(LLString label) { mLabel = label; } + void setLabel(const LLStringExplicit& label) { mLabel = label; } LLString getLabel() const { return mLabel; } void setRectControl(const LLString& rect_control) { mRectControl.assign(rect_control); } @@ -192,8 +192,8 @@ public: // For setting text / label replacement params, e.g. "Hello [NAME]" // Not implemented for all types, defaults to noop, returns FALSE if not applicaple - BOOL childSetTextArg(const LLString& id, const LLString& key, const LLString& text); - BOOL childSetLabelArg(const LLString& id, const LLString& key, const LLString& text); + BOOL childSetTextArg(const LLString& id, const LLString& key, const LLStringExplicit& text); + BOOL childSetLabelArg(const LLString& id, const LLString& key, const LLStringExplicit& text); // LLSlider / LLSpinCtrl void childSetMinValue(const LLString& id, LLSD min_value); @@ -208,7 +208,7 @@ public: void childSetWrappedText(const LLString& id, const LLString& text, bool visible = true); // LLTextBox/LLTextEditor/LLLineEditor - void childSetText(const LLString& id, const LLString& text); + void childSetText(const LLString& id, const LLStringExplicit& text); LLString childGetText(const LLString& id); // LLLineEditor diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 048cfa7e9d..f5eef29dcb 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -232,7 +232,7 @@ void LLScrollListText::setColor(const LLColor4& color) *mColor = color; } -void LLScrollListText::setText(const LLString& text) +void LLScrollListText::setText(const LLStringExplicit& text) { mText = text; } diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h index 78f34a2ed2..5ceee2e1f6 100644 --- a/indra/llui/llscrolllistctrl.h +++ b/indra/llui/llscrolllistctrl.h @@ -101,7 +101,7 @@ public: virtual const LLString& getText() const { return mText.getString(); } virtual BOOL getVisible() const { return mVisible; } virtual void highlightText(S32 offset, S32 num_chars) {mHighlightOffset = offset; mHighlightCount = num_chars;} - void setText(const LLString& text); + void setText(const LLStringExplicit& text); virtual void setColor(const LLColor4&); virtual BOOL isText() { return TRUE; } @@ -169,10 +169,10 @@ class LLScrollListColumn public: // Default constructor LLScrollListColumn() : - mName(""), - mSortingColumn(""), - mSortAscending(TRUE), - mLabel(""), + mName(), + mSortingColumn(), + mSortAscending(TRUE), + mLabel(), mWidth(-1), mRelWidth(-1.0), mDynamicWidth(FALSE), diff --git a/indra/llui/llsliderctrl.cpp b/indra/llui/llsliderctrl.cpp index c46ec2252f..dd4a9941c5 100644 --- a/indra/llui/llsliderctrl.cpp +++ b/indra/llui/llsliderctrl.cpp @@ -170,7 +170,7 @@ void LLSliderCtrl::setValue(F32 v, BOOL from_event) updateText(); } -BOOL LLSliderCtrl::setLabelArg( const LLString& key, const LLString& text ) +BOOL LLSliderCtrl::setLabelArg( const LLString& key, const LLStringExplicit& text ) { BOOL res = FALSE; if (mLabelBox) @@ -200,11 +200,11 @@ void LLSliderCtrl::clear() setValue(0.0f); if( mEditor ) { - mEditor->setText( "" ); + mEditor->setText( LLString::null ); } if( mTextBox ) { - mTextBox->setText( "" ); + mTextBox->setText( LLString::null ); } } diff --git a/indra/llui/llsliderctrl.h b/indra/llui/llsliderctrl.h index d5485e6a63..fa6c0bccae 100644 --- a/indra/llui/llsliderctrl.h +++ b/indra/llui/llsliderctrl.h @@ -80,7 +80,7 @@ public: virtual void setValue(const LLSD& value ) { setValue((F32)value.asReal(), TRUE); } virtual LLSD getValue() const { return LLSD(getValueF32()); } - virtual BOOL setLabelArg( const LLString& key, const LLString& text ); + virtual BOOL setLabelArg( const LLString& key, const LLStringExplicit& text ); virtual void setMinValue(LLSD min_value) { setMinValue((F32)min_value.asReal()); } virtual void setMaxValue(LLSD max_value) { setMaxValue((F32)max_value.asReal()); } @@ -97,7 +97,7 @@ public: F32 getMinValue() { return mSlider->getMinValue(); } F32 getMaxValue() { return mSlider->getMaxValue(); } - void setLabel(const LLString& label) { if (mLabelBox) mLabelBox->setText(label); } + void setLabel(const LLStringExplicit& label) { if (mLabelBox) mLabelBox->setText(label); } void setLabelColor(const LLColor4& c) { mTextEnabledColor = c; } void setDisabledLabelColor(const LLColor4& c) { mTextDisabledColor = c; } diff --git a/indra/llui/llspinctrl.cpp b/indra/llui/llspinctrl.cpp index 4e7218e141..2be2814080 100644 --- a/indra/llui/llspinctrl.cpp +++ b/indra/llui/llspinctrl.cpp @@ -385,7 +385,7 @@ void LLSpinCtrl::setPrecision(S32 precision) updateEditor(); } -void LLSpinCtrl::setLabel(const LLString& label) +void LLSpinCtrl::setLabel(const LLStringExplicit& label) { if (mLabelBox) { diff --git a/indra/llui/llspinctrl.h b/indra/llui/llspinctrl.h index 7795e26719..f2c7b40cfe 100644 --- a/indra/llui/llspinctrl.h +++ b/indra/llui/llspinctrl.h @@ -96,7 +96,7 @@ public: virtual void setMaxValue(F32 max) { mMaxValue = max; } virtual void setIncrement(F32 inc) { mIncrement = inc; } - void setLabel(const LLString& label); + void setLabel(const LLStringExplicit& label); void setLabelColor(const LLColor4& c) { mTextEnabledColor = c; } void setDisabledLabelColor(const LLColor4& c) { mTextDisabledColor = c; } diff --git a/indra/llui/lltextbox.cpp b/indra/llui/lltextbox.cpp index 4251f81322..c0b0788c0b 100644 --- a/indra/llui/lltextbox.cpp +++ b/indra/llui/lltextbox.cpp @@ -161,7 +161,7 @@ BOOL LLTextBox::handleMouseUp(S32 x, S32 y, MASK mask) return handled; } -void LLTextBox::setText(const LLString& text) +void LLTextBox::setText(const LLStringExplicit& text) { mText.assign(text); setLineLengths(); @@ -194,7 +194,7 @@ void LLTextBox::setLineLengths() } } -void LLTextBox::setWrappedText(const LLString& in_text, F32 max_width) +void LLTextBox::setWrappedText(const LLStringExplicit& in_text, F32 max_width) { if (max_width < 0.0) { @@ -286,7 +286,7 @@ LLSD LLTextBox::getValue() const return LLSD(getText()); } -BOOL LLTextBox::setTextArg( const LLString& key, const LLString& text ) +BOOL LLTextBox::setTextArg( const LLString& key, const LLStringExplicit& text ) { mText.setArg(key, text); setLineLengths(); diff --git a/indra/llui/lltextbox.h b/indra/llui/lltextbox.h index 24ad4d7aae..7e7018ac52 100644 --- a/indra/llui/lltextbox.h +++ b/indra/llui/lltextbox.h @@ -71,8 +71,8 @@ public: void setDisabledColor( const LLColor4& c) { mDisabledColor = c; } void setBackgroundColor( const LLColor4& c) { mBackgroundColor = c; } void setBorderColor( const LLColor4& c) { mBorderColor = c; } - void setText( const LLString& text ); - void setWrappedText(const LLString& text, F32 max_width = -1.0); + void setText( const LLStringExplicit& text ); + void setWrappedText(const LLStringExplicit& text, F32 max_width = -1.0); // default width means use existing control width void setBackgroundVisible(BOOL visible) { mBackgroundVisible = visible; } @@ -97,7 +97,7 @@ public: virtual void setValue(const LLSD& value ); virtual LLSD getValue() const; - virtual BOOL setTextArg( const LLString& key, const LLString& text ); + virtual BOOL setTextArg( const LLString& key, const LLStringExplicit& text ); protected: void setLineLengths(); diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index cede015016..12ad339886 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -520,7 +520,7 @@ void LLTextEditor::truncate() } } -void LLTextEditor::setText(const LLString &utf8str) +void LLTextEditor::setText(const LLStringExplicit &utf8str) { // LLString::removeCRLF(utf8str); mUTF8Text = utf8str_removeCRLF(utf8str); @@ -3068,7 +3068,7 @@ void LLTextEditor::onTabInto() void LLTextEditor::clear() { - setText(""); + setText(LLString::null); } // Start or stop the editor from accepting text-editing keystrokes @@ -3949,7 +3949,7 @@ BOOL LLTextEditor::importBuffer(const LLString& buffer ) if( success ) { // Actually set the text - setText( text ); + setText( LLStringExplicit(text) ); } delete[] text; diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index f3d03ab1d6..55aba57551 100644 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -231,7 +231,7 @@ public: const LLString& getText() const; // Non-undoable - void setText(const LLString &utf8str); + void setText(const LLStringExplicit &utf8str); void setWText(const LLWString &wtext); S32 getMaxLength() const { return mMaxTextLength; } diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp index ea1b53502e..7d354753d3 100644 --- a/indra/llui/lluictrl.cpp +++ b/indra/llui/lluictrl.cpp @@ -99,13 +99,13 @@ void LLUICtrl::onCommit() } // virtual -BOOL LLUICtrl::setTextArg( const LLString& key, const LLString& text ) +BOOL LLUICtrl::setTextArg( const LLString& key, const LLStringExplicit& text ) { return FALSE; } // virtual -BOOL LLUICtrl::setLabelArg( const LLString& key, const LLString& text ) +BOOL LLUICtrl::setLabelArg( const LLString& key, const LLStringExplicit& text ) { return FALSE; } diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h index 0227157636..00f78748a7 100644 --- a/indra/llui/lluictrl.h +++ b/indra/llui/lluictrl.h @@ -72,10 +72,10 @@ public: virtual LLSD getValue() const { return LLSD(); } // Defaults to no-op - virtual BOOL setTextArg( const LLString& key, const LLString& text ); + virtual BOOL setTextArg( const LLString& key, const LLStringExplicit& text ); // Defaults to no-op - virtual BOOL setLabelArg( const LLString& key, const LLString& text ); + virtual BOOL setLabelArg( const LLString& key, const LLStringExplicit& text ); // Defaults to return NULL virtual LLCtrlSelectionInterface* getSelectionInterface(); diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp index 503b83bca2..4b4c4636d5 100644 --- a/indra/llui/lluictrlfactory.cpp +++ b/indra/llui/lluictrlfactory.cpp @@ -473,7 +473,7 @@ LLPieMenu *LLUICtrlFactory::buildPieMenu(const LLString &filename, LLView* paren // root must be called panel if( !root->hasName( LL_PIE_MENU_TAG )) { - llwarns << "Root node should be named " LL_PIE_MENU_TAG " in : " << filename << llendl; + llwarns << "Root node should be named " << LL_PIE_MENU_TAG << " in : " << filename << llendl; return NULL; } @@ -808,3 +808,4 @@ void LLUICtrlFactory::registerCreator(LLString ctrlname, creator_function_t func mCreatorFunctions[ctrlname] = function; } + diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 192ba1f1ab..ef91d9c85e 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -786,7 +786,7 @@ void LLView::setHidden(BOOL hidden) } // virtual -BOOL LLView::setLabelArg(const LLString& key, const LLString& text) +BOOL LLView::setLabelArg(const LLString& key, const LLStringExplicit& text) { return FALSE; } @@ -1712,7 +1712,8 @@ BOOL LLView::hasChild(const LLString& childname, BOOL recurse) const //----------------------------------------------------------------------------- LLView* LLView::getChildByName(const LLString& name, BOOL recurse) const { - if(name.empty()) return NULL; + if(name.empty()) + return NULL; child_list_const_iter_t child_it; // Look for direct children *first* for ( child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it) @@ -1725,7 +1726,7 @@ LLView* LLView::getChildByName(const LLString& name, BOOL recurse) const } if (recurse) { - // Look inside the child as well. + // Look inside each child as well. for ( child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it) { LLView* childp = *child_it; diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 91351612db..63c1efc296 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -290,7 +290,7 @@ public: virtual void setHidden(BOOL hidden); // Never show (replacement text) // by default, does nothing and returns false - virtual BOOL setLabelArg( const LLString& key, const LLString& text ); + virtual BOOL setLabelArg( const LLString& key, const LLStringExplicit& text ); virtual void onVisibilityChange ( BOOL curVisibilityIn ); |