summaryrefslogtreecommitdiff
path: root/indra/newview/llfloateravatarpicker.cpp
diff options
context:
space:
mode:
authorAaron Terrell (Enus) <enus@lindenlab.com>2010-08-30 11:56:33 -0700
committerAaron Terrell (Enus) <enus@lindenlab.com>2010-08-30 11:56:33 -0700
commitd04e8d757575dbb50877ef861adcfde427837bb6 (patch)
treeb214237a4246e523754b356b003d1d2a163f21ab /indra/newview/llfloateravatarpicker.cpp
parent3172b4db1ee4d2059d2605ce616bdb10c840fc03 (diff)
parentd84c6625c707b5d61b71749b74f3cc4fb8f02048 (diff)
merging up from viewer-development
Diffstat (limited to 'indra/newview/llfloateravatarpicker.cpp')
-rw-r--r--indra/newview/llfloateravatarpicker.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp
index 501cf4ce99..9391c761b7 100644
--- a/indra/newview/llfloateravatarpicker.cpp
+++ b/indra/newview/llfloateravatarpicker.cpp
@@ -88,14 +88,14 @@ BOOL LLFloaterAvatarPicker::postBuild()
getChild<LLLineEditor>("Edit")->setKeystrokeCallback( boost::bind(&LLFloaterAvatarPicker::editKeystroke, this, _1, _2),NULL);
childSetAction("Find", boost::bind(&LLFloaterAvatarPicker::onBtnFind, this));
- childDisable("Find");
+ getChildView("Find")->setEnabled(FALSE);
childSetAction("Refresh", boost::bind(&LLFloaterAvatarPicker::onBtnRefresh, this));
getChild<LLUICtrl>("near_me_range")->setCommitCallback(boost::bind(&LLFloaterAvatarPicker::onRangeAdjust, this));
LLScrollListCtrl* searchresults = getChild<LLScrollListCtrl>("SearchResults");
searchresults->setDoubleClickCallback( boost::bind(&LLFloaterAvatarPicker::onBtnSelect, this));
searchresults->setCommitCallback(boost::bind(&LLFloaterAvatarPicker::onList, this));
- childDisable("SearchResults");
+ getChildView("SearchResults")->setEnabled(FALSE);
LLScrollListCtrl* nearme = getChild<LLScrollListCtrl>("NearMe");
nearme->setDoubleClickCallback(boost::bind(&LLFloaterAvatarPicker::onBtnSelect, this));
@@ -106,10 +106,10 @@ BOOL LLFloaterAvatarPicker::postBuild()
getChild<LLUICtrl>("Friends")->setCommitCallback(boost::bind(&LLFloaterAvatarPicker::onList, this));
childSetAction("ok_btn", boost::bind(&LLFloaterAvatarPicker::onBtnSelect, this));
- childDisable("ok_btn");
+ getChildView("ok_btn")->setEnabled(FALSE);
childSetAction("cancel_btn", boost::bind(&LLFloaterAvatarPicker::onBtnClose, this));
- childSetFocus("Edit");
+ getChild<LLUICtrl>("Edit")->setFocus(TRUE);
LLPanel* search_panel = getChild<LLPanel>("SearchPanel");
if (search_panel)
@@ -139,7 +139,7 @@ void LLFloaterAvatarPicker::setOkBtnEnableCb(validate_callback_t cb)
void LLFloaterAvatarPicker::onTabChanged()
{
- childSetEnabled("ok_btn", isSelectBtnEnabled());
+ getChildView("ok_btn")->setEnabled(isSelectBtnEnabled());
}
// Destroys the object
@@ -178,7 +178,7 @@ void LLFloaterAvatarPicker::onBtnSelect()
{
std::string acvtive_panel_name;
LLScrollListCtrl* list = NULL;
- LLPanel* active_panel = childGetVisibleTab("ResidentChooserTabs");
+ LLPanel* active_panel = getChild<LLTabContainer>("ResidentChooserTabs")->getCurrentPanel();
if(active_panel)
{
acvtive_panel_name = active_panel->getName();
@@ -233,7 +233,7 @@ void LLFloaterAvatarPicker::onRangeAdjust()
void LLFloaterAvatarPicker::onList()
{
- childSetEnabled("ok_btn", isSelectBtnEnabled());
+ getChildView("ok_btn")->setEnabled(isSelectBtnEnabled());
}
void LLFloaterAvatarPicker::populateNearMe()
@@ -267,14 +267,14 @@ void LLFloaterAvatarPicker::populateNearMe()
if (empty)
{
- childDisable("NearMe");
- childDisable("ok_btn");
+ getChildView("NearMe")->setEnabled(FALSE);
+ getChildView("ok_btn")->setEnabled(FALSE);
near_me_scroller->setCommentText(getString("no_one_near"));
}
else
{
- childEnable("NearMe");
- childEnable("ok_btn");
+ getChildView("NearMe")->setEnabled(TRUE);
+ getChildView("ok_btn")->setEnabled(TRUE);
near_me_scroller->selectFirstItem();
onList();
near_me_scroller->setFocus(TRUE);
@@ -321,7 +321,7 @@ void LLFloaterAvatarPicker::draw()
}
LLFloater::draw();
- if (!mNearMeListComplete && childGetVisibleTab("ResidentChooserTabs") == getChild<LLPanel>("NearMePanel"))
+ if (!mNearMeListComplete && getChild<LLTabContainer>("ResidentChooserTabs")->getCurrentPanel() == getChild<LLPanel>("NearMePanel"))
{
populateNearMe();
}
@@ -329,7 +329,7 @@ void LLFloaterAvatarPicker::draw()
BOOL LLFloaterAvatarPicker::visibleItemsSelected() const
{
- LLPanel* active_panel = childGetVisibleTab("ResidentChooserTabs");
+ LLPanel* active_panel = getChild<LLTabContainer>("ResidentChooserTabs")->getCurrentPanel();
if(active_panel == getChild<LLPanel>("SearchPanel"))
{
@@ -348,7 +348,7 @@ BOOL LLFloaterAvatarPicker::visibleItemsSelected() const
void LLFloaterAvatarPicker::find()
{
- std::string text = childGetValue("Edit").asString();
+ std::string text = getChild<LLUICtrl>("Edit")->getValue().asString();
mQueryID.generate();
@@ -367,7 +367,7 @@ void LLFloaterAvatarPicker::find()
getChild<LLScrollListCtrl>("SearchResults")->deleteAllItems();
getChild<LLScrollListCtrl>("SearchResults")->setCommentText(getString("searching"));
- childSetEnabled("ok_btn", FALSE);
+ getChildView("ok_btn")->setEnabled(FALSE);
mNumResultsReturned = 0;
}
@@ -382,7 +382,7 @@ LLScrollListCtrl* LLFloaterAvatarPicker::getActiveList()
{
std::string acvtive_panel_name;
LLScrollListCtrl* list = NULL;
- LLPanel* active_panel = childGetVisibleTab("ResidentChooserTabs");
+ LLPanel* active_panel = getChild<LLTabContainer>("ResidentChooserTabs")->getCurrentPanel();
if(active_panel)
{
acvtive_panel_name = active_panel->getName();
@@ -496,10 +496,10 @@ void LLFloaterAvatarPicker::processAvatarPickerReply(LLMessageSystem* msg, void*
if (avatar_id.isNull())
{
LLStringUtil::format_map_t map;
- map["[TEXT]"] = floater->childGetText("Edit");
+ map["[TEXT]"] = floater->getChild<LLUICtrl>("Edit")->getValue().asString();
avatar_name = floater->getString("not_found", map);
search_results->setEnabled(FALSE);
- floater->childDisable("ok_btn");
+ floater->getChildView("ok_btn")->setEnabled(FALSE);
}
else
{
@@ -515,7 +515,7 @@ void LLFloaterAvatarPicker::processAvatarPickerReply(LLMessageSystem* msg, void*
if (found_one)
{
- floater->childEnable("ok_btn");
+ floater->getChildView("ok_btn")->setEnabled(TRUE);
search_results->selectFirstItem();
floater->onList();
search_results->setFocus(TRUE);
@@ -525,7 +525,7 @@ void LLFloaterAvatarPicker::processAvatarPickerReply(LLMessageSystem* msg, void*
//static
void LLFloaterAvatarPicker::editKeystroke(LLLineEditor* caller, void* user_data)
{
- childSetEnabled("Find", caller->getText().size() >= 3);
+ getChildView("Find")->setEnabled(caller->getText().size() >= 3);
}
// virtual
@@ -533,7 +533,7 @@ BOOL LLFloaterAvatarPicker::handleKeyHere(KEY key, MASK mask)
{
if (key == KEY_RETURN && mask == MASK_NONE)
{
- if (childHasFocus("Edit"))
+ if (getChild<LLUICtrl>("Edit")->hasFocus())
{
onBtnFind();
}
@@ -560,7 +560,7 @@ bool LLFloaterAvatarPicker::isSelectBtnEnabled()
{
std::string acvtive_panel_name;
LLScrollListCtrl* list = NULL;
- LLPanel* active_panel = childGetVisibleTab("ResidentChooserTabs");
+ LLPanel* active_panel = getChild<LLTabContainer>("ResidentChooserTabs")->getCurrentPanel();
if(active_panel)
{