From e416840f85dc4a367894036b9fe483f17d959c54 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Tue, 24 Aug 2010 19:22:00 +0100 Subject: Backed out changeset c3d41f18ce2b back-out the back-out for this branch. yay. --- indra/newview/llfloateravatarpicker.cpp | 44 ++++++++++++++++----------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'indra/newview/llfloateravatarpicker.cpp') 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("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("near_me_range")->setCommitCallback(boost::bind(&LLFloaterAvatarPicker::onRangeAdjust, this)); LLScrollListCtrl* searchresults = getChild("SearchResults"); searchresults->setDoubleClickCallback( boost::bind(&LLFloaterAvatarPicker::onBtnSelect, this)); searchresults->setCommitCallback(boost::bind(&LLFloaterAvatarPicker::onList, this)); - childDisable("SearchResults"); + getChildView("SearchResults")->setEnabled(FALSE); LLScrollListCtrl* nearme = getChild("NearMe"); nearme->setDoubleClickCallback(boost::bind(&LLFloaterAvatarPicker::onBtnSelect, this)); @@ -106,10 +106,10 @@ BOOL LLFloaterAvatarPicker::postBuild() getChild("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("Edit")->setFocus(TRUE); LLPanel* search_panel = getChild("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("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("NearMePanel")) + if (!mNearMeListComplete && getChild("ResidentChooserTabs")->getCurrentPanel() == getChild("NearMePanel")) { populateNearMe(); } @@ -329,7 +329,7 @@ void LLFloaterAvatarPicker::draw() BOOL LLFloaterAvatarPicker::visibleItemsSelected() const { - LLPanel* active_panel = childGetVisibleTab("ResidentChooserTabs"); + LLPanel* active_panel = getChild("ResidentChooserTabs")->getCurrentPanel(); if(active_panel == getChild("SearchPanel")) { @@ -348,7 +348,7 @@ BOOL LLFloaterAvatarPicker::visibleItemsSelected() const void LLFloaterAvatarPicker::find() { - std::string text = childGetValue("Edit").asString(); + std::string text = getChild("Edit")->getValue().asString(); mQueryID.generate(); @@ -367,7 +367,7 @@ void LLFloaterAvatarPicker::find() getChild("SearchResults")->deleteAllItems(); getChild("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("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("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("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("ResidentChooserTabs")->getCurrentPanel(); if(active_panel) { -- cgit v1.2.3