summaryrefslogtreecommitdiff
path: root/indra/newview/llfloateravatarpicker.cpp
diff options
context:
space:
mode:
authorRichard Nelson <none@none>2010-07-30 10:02:30 -0700
committerRichard Nelson <none@none>2010-07-30 10:02:30 -0700
commit9b526997d93d9290602a86f91a7f096da4395d97 (patch)
tree1cc7ae3cfca94a0417d9de1fe600304b7cf7cc6c /indra/newview/llfloateravatarpicker.cpp
parent5d13631452ac043b549f2b8be52c4cc3bf36206a (diff)
deprecated LLPanel::child*() methods
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 8f6816b845..7dbf6ebd5b 100644
--- a/indra/newview/llfloateravatarpicker.cpp
+++ b/indra/newview/llfloateravatarpicker.cpp
@@ -94,14 +94,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));
@@ -112,10 +112,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)
@@ -145,7 +145,7 @@ void LLFloaterAvatarPicker::setOkBtnEnableCb(validate_callback_t cb)
void LLFloaterAvatarPicker::onTabChanged()
{
- childSetEnabled("ok_btn", isSelectBtnEnabled());
+ getChildView("ok_btn")->setEnabled(isSelectBtnEnabled());
}
// Destroys the object
@@ -184,7 +184,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();
@@ -239,7 +239,7 @@ void LLFloaterAvatarPicker::onRangeAdjust()
void LLFloaterAvatarPicker::onList()
{
- childSetEnabled("ok_btn", isSelectBtnEnabled());
+ getChildView("ok_btn")->setEnabled(isSelectBtnEnabled());
}
void LLFloaterAvatarPicker::populateNearMe()
@@ -273,14 +273,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);
@@ -327,7 +327,7 @@ void LLFloaterAvatarPicker::draw()
}
LLFloater::draw();
- if (!mNearMeListComplete && childGetVisibleTab("ResidentChooserTabs") == getChild<LLPanel>("NearMePanel"))
+ if (!mNearMeListComplete && getChild<LLTabContainer>("ResidentChooserTabs")->getCurrentPanel() == getChild<LLPanel>("NearMePanel"))
{
populateNearMe();
}
@@ -335,7 +335,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"))
{
@@ -354,7 +354,7 @@ BOOL LLFloaterAvatarPicker::visibleItemsSelected() const
void LLFloaterAvatarPicker::find()
{
- std::string text = childGetValue("Edit").asString();
+ std::string text = getChild<LLUICtrl>("Edit")->getValue().asString();
mQueryID.generate();
@@ -373,7 +373,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;
}
@@ -388,7 +388,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();
@@ -502,10 +502,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
{
@@ -521,7 +521,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);
@@ -531,7 +531,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
@@ -539,7 +539,7 @@ BOOL LLFloaterAvatarPicker::handleKeyHere(KEY key, MASK mask)
{
if (key == KEY_RETURN && mask == MASK_NONE)
{
- if (childHasFocus("Edit"))
+ if (getChild<LLUICtrl>("Edit")->hasFocus())
{
onBtnFind();
}
@@ -566,7 +566,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)
{