From 8524a4228667cf0250e1e2b9cda259c5fbbc5d4c Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Mon, 19 Jul 2010 12:42:49 -0700 Subject: Added area search to the advanced menu, port from Emerald by Henri Beauchamp --- linden/indra/newview/CMakeLists.txt | 3 +++ linden/indra/newview/app_settings/settings.xml | 16 ++++++++++++++++ linden/indra/newview/llselectmgr.cpp | 15 ++++++++++++++- linden/indra/newview/llselectmgr.h | 2 ++ linden/indra/newview/llstartup.cpp | 2 ++ linden/indra/newview/llviewermenu.cpp | 12 ++++++++++++ .../newview/skins/default/xui/en-us/menu_viewer.xml | 6 +++++- 7 files changed, 54 insertions(+), 2 deletions(-) diff --git a/linden/indra/newview/CMakeLists.txt b/linden/indra/newview/CMakeLists.txt index ab0159f..1668609 100644 --- a/linden/indra/newview/CMakeLists.txt +++ b/linden/indra/newview/CMakeLists.txt @@ -75,6 +75,7 @@ set(viewer_SOURCE_FILES hippoLimits.cpp hippoRestRequest.cpp jcfloater_animation_list.cpp + jcfloaterareasearch.cpp llagent.cpp llagentaccess.cpp llagentdata.cpp @@ -504,6 +505,7 @@ set(viewer_HEADER_FILES hippoLimits.h hippoRestRequest.h jcfloater_animation_list.h + jcfloaterareasearch.h llagent.h llagentaccess.h llagentdata.h @@ -1097,6 +1099,7 @@ set(viewer_XUI_FILES skins/default/xui/en-us/floater_animation_list.xml skins/default/xui/en-us/floater_animation_preview.xml skins/default/xui/en-us/floater_ao.xml + skins/default/xui/en-us/floater_area_search.xml skins/default/xui/en-us/floater_asset_browser.xml skins/default/xui/en-us/floater_auction.xml skins/default/xui/en-us/floater_audio_volume.xml diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 6fd76ac..0225218 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -163,6 +163,22 @@ 0 + FloaterAreaSearchRect + + Comment + Rectangle for the area search floater + Persist + 1 + Type + Rect + Value + + 0 + 400 + 200 + 0 + + FloaterGroupTitlesRect Comment diff --git a/linden/indra/newview/llselectmgr.cpp b/linden/indra/newview/llselectmgr.cpp index 01f41ef..8064245 100644 --- a/linden/indra/newview/llselectmgr.cpp +++ b/linden/indra/newview/llselectmgr.cpp @@ -123,6 +123,7 @@ LLColor4 LLSelectMgr::sHighlightInspectColor; LLColor4 LLSelectMgr::sHighlightParentColor; LLColor4 LLSelectMgr::sHighlightChildColor; LLColor4 LLSelectMgr::sContextSilhouetteColor; +std::set LLSelectMgr::sObjectPropertiesFamilyRequests; static LLObjectSelection *get_null_object_selection(); template<> @@ -4228,6 +4229,10 @@ void LLSelectMgr::sendListToRegions(const std::string& message_name, void LLSelectMgr::requestObjectPropertiesFamily(LLViewerObject* object) { + // Remember that we asked the properties of this object. + sObjectPropertiesFamilyRequests.insert(object->mID); + //llinfos << "Registered an ObjectPropertiesFamily request for object " << object->mID << llendl; + LLMessageSystem* msg = gMessageSystem; msg->newMessageFast(_PREHASH_RequestObjectPropertiesFamily); @@ -4419,6 +4424,15 @@ void LLSelectMgr::processObjectProperties(LLMessageSystem* msg, void** user_data void LLSelectMgr::processObjectPropertiesFamily(LLMessageSystem* msg, void** user_data) { LLUUID id; + msg->getUUIDFast(_PREHASH_ObjectData, _PREHASH_ObjectID, id); + if (sObjectPropertiesFamilyRequests.count(id) == 0) + { + // This reply is not for us. + return; + } + // We got the reply, so remove the object from the list of pending requests + sObjectPropertiesFamilyRequests.erase(id); + //llinfos << "Got ObjectPropertiesFamily reply for object " << id << llendl; U32 request_flags; LLUUID creator_id; @@ -4430,7 +4444,6 @@ void LLSelectMgr::processObjectPropertiesFamily(LLMessageSystem* msg, void** use LLCategory category; msg->getU32Fast(_PREHASH_ObjectData, _PREHASH_RequestFlags, request_flags ); - msg->getUUIDFast(_PREHASH_ObjectData, _PREHASH_ObjectID, id ); msg->getUUIDFast(_PREHASH_ObjectData, _PREHASH_OwnerID, owner_id ); msg->getUUIDFast(_PREHASH_ObjectData, _PREHASH_GroupID, group_id ); msg->getU32Fast(_PREHASH_ObjectData, _PREHASH_BaseMask, base_mask ); diff --git a/linden/indra/newview/llselectmgr.h b/linden/indra/newview/llselectmgr.h index 8165394..6278049 100644 --- a/linden/indra/newview/llselectmgr.h +++ b/linden/indra/newview/llselectmgr.h @@ -719,6 +719,8 @@ private: BOOL mForceSelection; LLAnimPauseRequest mPauseRequest; + + static std::set sObjectPropertiesFamilyRequests; }; // Utilities diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index baa19e7..3161980 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp @@ -187,6 +187,7 @@ #include "viewerversion.h" #include "jcfloater_animation_list.h" +#include "jcfloaterareasearch.h" #if LL_LIBXUL_ENABLED #include "llmozlib.h" @@ -3287,6 +3288,7 @@ void pass_processObjectPropertiesFamily(LLMessageSystem *msg, void**) // send it to 'observers' LLSelectMgr::processObjectPropertiesFamily(msg,0); JCFloaterAnimList::processObjectPropertiesFamily(msg,0); + JCFloaterAreaSearch::processObjectPropertiesFamily(msg, NULL); } void register_viewer_callbacks(LLMessageSystem* msg) diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index a95c3c6..6a7a818 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -65,6 +65,8 @@ // newview includes #include "llagent.h" +#include "jcfloaterareasearch.h" + #include "llagentpilot.h" #include "llbox.h" #include "llcallingcard.h" @@ -5880,6 +5882,10 @@ class LLShowFloater : public view_listener_t { LLFloaterRegionInfo::showInstance(); } + else if (floater_name == "areasearch") + { + JCFloaterAreaSearch::toggle(); + } else if (floater_name == "grid options") { LLFloaterBuildOptions::show(NULL); @@ -6007,6 +6013,12 @@ class LLFloaterVisible : public view_listener_t LLInventoryView* iv = LLInventoryView::getActiveInventory(); new_value = (NULL != iv && TRUE == iv->getVisible()); } + else if (floater_name == "areasearch") + { + JCFloaterAreaSearch* instn = JCFloaterAreaSearch::getInstance(); + if (!instn) new_value = false; + else new_value = instn->getVisible(); + } gMenuHolder->findControl(control_name)->setValue(new_value); return true; } diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml index a02d033..e2c2874 100644 --- a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml +++ b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml @@ -914,7 +914,7 @@ userdata="capabilities" /> - + + + + + -- cgit v1.1