diff options
Diffstat (limited to 'indra/newview/llfloatertopobjects.cpp')
-rw-r--r-- | indra/newview/llfloatertopobjects.cpp | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/indra/newview/llfloatertopobjects.cpp b/indra/newview/llfloatertopobjects.cpp index bf5a1141a6..84ea353dab 100644 --- a/indra/newview/llfloatertopobjects.cpp +++ b/indra/newview/llfloatertopobjects.cpp @@ -41,6 +41,7 @@ #include "llbutton.h" #include "llfloatergodtools.h" #include "llfloaterreg.h" +#include "llnotificationsutil.h" #include "llparcel.h" #include "llscrolllistctrl.h" #include "llscrolllistitem.h" @@ -161,7 +162,7 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data) msg->getU32Fast(_PREHASH_RequestData, _PREHASH_ReportType, mCurrentMode); LLScrollListCtrl *list = getChild<LLScrollListCtrl>("objects_list"); - + S32 block_count = msg->getNumberOfBlocks("ReportData"); for (S32 block = 0; block < block_count; ++block) { @@ -282,8 +283,13 @@ void LLFloaterTopObjects::updateSelectionInfo() std::string object_id_string = object_id.asString(); childSetValue("id_editor", LLSD(object_id_string)); - childSetValue("object_name_editor", list->getFirstSelected()->getColumn(1)->getValue().asString()); - childSetValue("owner_name_editor", list->getFirstSelected()->getColumn(2)->getValue().asString()); + LLScrollListItem* sli = list->getFirstSelected(); + llassert(sli); + if (sli) + { + childSetValue("object_name_editor", sli->getColumn(1)->getValue().asString()); + childSetValue("owner_name_editor", sli->getColumn(2)->getValue().asString()); + } } // static @@ -309,7 +315,7 @@ void LLFloaterTopObjects::doToObjects(int action, bool all) LLCtrlListInterface *list = childGetListInterface("objects_list"); if (!list || list->getItemCount() == 0) return; - std::vector<LLUUID>::iterator id_itor; + uuid_vec_t::iterator id_itor; bool start_message = true; @@ -359,7 +365,7 @@ void LLFloaterTopObjects::doToObjects(int action, bool all) //static bool LLFloaterTopObjects::callbackReturnAll(const LLSD& notification, const LLSD& response) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); LLFloaterTopObjects* instance = LLFloaterReg::getTypedInstance<LLFloaterTopObjects>("top_objects"); if(!instance) return false; if (option == 0) @@ -371,7 +377,7 @@ bool LLFloaterTopObjects::callbackReturnAll(const LLSD& notification, const LLSD void LLFloaterTopObjects::onReturnAll() { - LLNotifications::instance().add("ReturnAllTopObjects", LLSD(), LLSD(), &callbackReturnAll); + LLNotificationsUtil::add("ReturnAllTopObjects", LLSD(), LLSD(), &callbackReturnAll); } @@ -384,7 +390,7 @@ void LLFloaterTopObjects::onReturnSelected() //static bool LLFloaterTopObjects::callbackDisableAll(const LLSD& notification, const LLSD& response) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); LLFloaterTopObjects* instance = LLFloaterReg::getTypedInstance<LLFloaterTopObjects>("top_objects"); if(!instance) return false; if (option == 0) @@ -396,7 +402,7 @@ bool LLFloaterTopObjects::callbackDisableAll(const LLSD& notification, const LLS void LLFloaterTopObjects::onDisableAll() { - LLNotifications::instance().add("DisableAllTopObjects", LLSD(), LLSD(), callbackDisableAll); + LLNotificationsUtil::add("DisableAllTopObjects", LLSD(), LLSD(), callbackDisableAll); } void LLFloaterTopObjects::onDisableSelected() @@ -431,7 +437,6 @@ void LLFloaterTopObjects::onRefresh() filter = mFilter; clearList(); - LLMessageSystem *msg = gMessageSystem; msg->newMessageFast(_PREHASH_LandStatRequest); msg->nextBlockFast(_PREHASH_AgentData); @@ -464,7 +469,7 @@ void LLFloaterTopObjects::onGetByOwnerName() } void LLFloaterTopObjects::showBeacon() -{ +{ LLScrollListCtrl* list = getChild<LLScrollListCtrl>("objects_list"); if (!list) return; |