diff options
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 609 |
1 files changed, 327 insertions, 282 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 3f556e5608..7c439d7200 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -42,8 +42,10 @@ // newview includes #include "llagent.h" +#include "llagentcamera.h" #include "llagentwearables.h" #include "llagentpilot.h" +#include "llbottomtray.h" #include "llcompilequeue.h" #include "llconsole.h" #include "lldebugview.h" @@ -53,7 +55,6 @@ #include "llfloaterbuycontents.h" #include "llfloaterbuycurrency.h" #include "llfloatercustomize.h" -#include "llfloaterchatterbox.h" #include "llfloatergodtools.h" #include "llfloaterinventory.h" #include "llfloaterland.h" @@ -72,6 +73,8 @@ #include "llhudmanager.h" #include "llimview.h" #include "llinventorybridge.h" +#include "llinventorydefines.h" +#include "llinventoryfunctions.h" #include "llpanellogin.h" #include "llpanelblockedlist.h" #include "llmenucommands.h" @@ -82,11 +85,11 @@ #include "llsidetray.h" #include "llstatusbar.h" #include "lltextureview.h" -#include "lltoolbar.h" #include "lltoolcomp.h" #include "lltoolmgr.h" #include "lltoolpie.h" #include "lltoolselectland.h" +#include "lltrans.h" #include "llviewergenericmessage.h" #include "llviewerhelp.h" #include "llviewermenufile.h" // init_menu_file() @@ -104,6 +107,7 @@ #include "llfloatercamera.h" #include "lluilistener.h" #include "llappearancemgr.h" +#include "lltrans.h" using namespace LLVOAvatarDefines; @@ -133,6 +137,7 @@ extern BOOL gDebugWindowProc; LLMenuBarGL *gMenuBarView = NULL; LLViewerMenuHolderGL *gMenuHolder = NULL; LLMenuGL *gPopupMenuView = NULL; +LLMenuGL *gEditMenu = NULL; LLMenuBarGL *gLoginMenuBarView = NULL; // Pie menus @@ -380,8 +385,10 @@ void init_menus() /// /// Context menus /// + const widget_registry_t& registry = LLViewerMenuHolderGL::child_registry_t::instance(); + gEditMenu = LLUICtrlFactory::createFromFile<LLMenuGL>("menu_edit.xml", gMenuHolder, registry); gMenuAvatarSelf = LLUICtrlFactory::createFromFile<LLContextMenu>( "menu_avatar_self.xml", gMenuHolder, registry); gMenuAvatarOther = LLUICtrlFactory::createFromFile<LLContextMenu>( @@ -435,7 +442,8 @@ void init_menus() gMenuBarView->setRect(LLRect(0, top, 0, top - MENU_BAR_HEIGHT)); gMenuBarView->setBackgroundColor( color ); - gMenuHolder->addChild(gMenuBarView); + LLView* menu_bar_holder = gViewerWindow->getRootView()->getChildView("menu_bar_holder"); + menu_bar_holder->addChild(gMenuBarView); gViewerWindow->setMenuBackgroundColor(false, LLViewerLogin::getInstance()->isInProductionGrid()); @@ -470,9 +478,10 @@ void init_menus() gLoginMenuBarView = LLUICtrlFactory::getInstance()->createFromFile<LLMenuBarGL>("menu_login.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); gLoginMenuBarView->arrangeAndClear(); LLRect menuBarRect = gLoginMenuBarView->getRect(); - gLoginMenuBarView->setRect(LLRect(menuBarRect.mLeft, menuBarRect.mTop, gViewerWindow->getRootView()->getRect().getWidth() - menuBarRect.mLeft, menuBarRect.mBottom)); + menuBarRect.setLeftTopAndSize(0, menu_bar_holder->getRect().getHeight(), menuBarRect.getWidth(), menuBarRect.getHeight()); + gLoginMenuBarView->setRect(menuBarRect); gLoginMenuBarView->setBackgroundColor( color ); - gMenuHolder->addChild(gLoginMenuBarView); + menu_bar_holder->addChild(gLoginMenuBarView); // tooltips are on top of EVERYTHING, including menus gViewerWindow->getRootView()->sendChildToFront(gToolTipView); @@ -605,6 +614,10 @@ class LLAdvancedToggleHUDInfo : public view_listener_t { gDisplayFOV = !(gDisplayFOV); } + else if ("badge" == info_type) + { + gDisplayBadge = !(gDisplayBadge); + } return true; } }; @@ -627,6 +640,10 @@ class LLAdvancedCheckHUDInfo : public view_listener_t { new_value = gDisplayFOV; } + else if ("badge" == info_type) + { + new_value = gDisplayBadge; + } return new_value; } }; @@ -1789,9 +1806,10 @@ class LLAdvancedDebugAvatarTextures : public view_listener_t { bool handleEvent(const LLSD& userdata) { -#ifndef LL_RELEASE_FOR_DOWNLOAD - handle_debug_avatar_textures(NULL); -#endif + if (gAgent.isGodlike()) + { + handle_debug_avatar_textures(NULL); + } return true; } }; @@ -2471,18 +2489,18 @@ class LLObjectBuild : public view_listener_t { bool handleEvent(const LLSD& userdata) { - if (gAgent.getFocusOnAvatar() && !LLToolMgr::getInstance()->inEdit() && gSavedSettings.getBOOL("EditCameraMovement") ) + if (gAgentCamera.getFocusOnAvatar() && !LLToolMgr::getInstance()->inEdit() && gSavedSettings.getBOOL("EditCameraMovement") ) { // zoom in if we're looking at the avatar - gAgent.setFocusOnAvatar(FALSE, ANIMATE); - gAgent.setFocusGlobal(LLToolPie::getInstance()->getPick()); - gAgent.cameraZoomIn(0.666f); - gAgent.cameraOrbitOver( 30.f * DEG_TO_RAD ); + gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusGlobal(LLToolPie::getInstance()->getPick()); + gAgentCamera.cameraZoomIn(0.666f); + gAgentCamera.cameraOrbitOver( 30.f * DEG_TO_RAD ); gViewerWindow->moveCursorToCenter(); } else if ( gSavedSettings.getBOOL("EditCameraMovement") ) { - gAgent.setFocusGlobal(LLToolPie::getInstance()->getPick()); + gAgentCamera.setFocusGlobal(LLToolPie::getInstance()->getPick()); gViewerWindow->moveCursorToCenter(); } @@ -2500,7 +2518,7 @@ void handle_object_edit() { LLViewerParcelMgr::getInstance()->deselectLand(); - if (gAgent.getFocusOnAvatar() && !LLToolMgr::getInstance()->inEdit()) + if (gAgentCamera.getFocusOnAvatar() && !LLToolMgr::getInstance()->inEdit()) { LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); @@ -2508,19 +2526,19 @@ void handle_object_edit() { // always freeze camera in space, even if camera doesn't move // so, for example, follow cam scripts can't affect you when in build mode - gAgent.setFocusGlobal(gAgent.calcFocusPositionTargetGlobal(), LLUUID::null); - gAgent.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusGlobal(gAgentCamera.calcFocusPositionTargetGlobal(), LLUUID::null); + gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); } else { - gAgent.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); LLViewerObject* selected_objectp = selection->getFirstRootObject(); if (selected_objectp) { // zoom in on object center instead of where we clicked, as we need to see the manipulator handles - gAgent.setFocusGlobal(selected_objectp->getPositionGlobal(), selected_objectp->getID()); - gAgent.cameraZoomIn(0.666f); - gAgent.cameraOrbitOver( 30.f * DEG_TO_RAD ); + gAgentCamera.setFocusGlobal(selected_objectp->getPositionGlobal(), selected_objectp->getID()); + gAgentCamera.cameraZoomIn(0.666f); + gAgentCamera.cameraOrbitOver( 30.f * DEG_TO_RAD ); gViewerWindow->moveCursorToCenter(); } } @@ -2549,7 +2567,7 @@ void handle_object_inspect() key["task"] = "task"; LLSideTray::getInstance()->showPanel("sidepanel_inventory", key); } - + /* // Old floater properties LLFloaterReg::showInstance("inspect", LLSD()); @@ -2565,19 +2583,19 @@ class LLLandBuild : public view_listener_t { LLViewerParcelMgr::getInstance()->deselectLand(); - if (gAgent.getFocusOnAvatar() && !LLToolMgr::getInstance()->inEdit() && gSavedSettings.getBOOL("EditCameraMovement") ) + if (gAgentCamera.getFocusOnAvatar() && !LLToolMgr::getInstance()->inEdit() && gSavedSettings.getBOOL("EditCameraMovement") ) { // zoom in if we're looking at the avatar - gAgent.setFocusOnAvatar(FALSE, ANIMATE); - gAgent.setFocusGlobal(LLToolPie::getInstance()->getPick()); - gAgent.cameraZoomIn(0.666f); - gAgent.cameraOrbitOver( 30.f * DEG_TO_RAD ); + gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusGlobal(LLToolPie::getInstance()->getPick()); + gAgentCamera.cameraZoomIn(0.666f); + gAgentCamera.cameraOrbitOver( 30.f * DEG_TO_RAD ); gViewerWindow->moveCursorToCenter(); } else if ( gSavedSettings.getBOOL("EditCameraMovement") ) { // otherwise just move focus - gAgent.setFocusGlobal(LLToolPie::getInstance()->getPick()); + gAgentCamera.setFocusGlobal(LLToolPie::getInstance()->getPick()); gViewerWindow->moveCursorToCenter(); } @@ -2680,11 +2698,10 @@ class LLSelfEnableRemoveAllAttachments : public view_listener_t bool handleEvent(const LLSD& userdata) { bool new_value = false; - if (gAgent.getAvatarObject()) + if (isAgentAvatarValid()) { - LLVOAvatar* avatarp = gAgent.getAvatarObject(); - for (LLVOAvatar::attachment_map_t::iterator iter = avatarp->mAttachmentPoints.begin(); - iter != avatarp->mAttachmentPoints.end(); ) + for (LLVOAvatar::attachment_map_t::iterator iter = gAgentAvatarp->mAttachmentPoints.begin(); + iter != gAgentAvatarp->mAttachmentPoints.end(); ) { LLVOAvatar::attachment_map_t::iterator curiter = iter++; LLViewerJointAttachment* attachment = curiter->second; @@ -2812,14 +2829,14 @@ bool handle_go_to() LLViewerParcelMgr::getInstance()->deselectLand(); - if (gAgent.getAvatarObject() && !gSavedSettings.getBOOL("AutoPilotLocksCamera")) + if (isAgentAvatarValid() && !gSavedSettings.getBOOL("AutoPilotLocksCamera")) { - gAgent.setFocusGlobal(gAgent.getFocusTargetGlobal(), gAgent.getAvatarObject()->getID()); + gAgentCamera.setFocusGlobal(gAgentCamera.getFocusTargetGlobal(), gAgentAvatarp->getID()); } else { // Snap camera back to behind avatar - gAgent.setFocusOnAvatar(TRUE, ANIMATE); + gAgentCamera.setFocusOnAvatar(TRUE, ANIMATE); } // Could be first use @@ -3265,7 +3282,9 @@ void handle_buy_object(LLSaleInfo sale_info) if (price > 0 && price > gStatusBar->getBalance()) { - LLFloaterBuyCurrency::buyCurrency("This object costs", price); + LLStringUtil::format_map_t args; + args["AMOUNT"] = llformat("%d", price); + LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("this_object_costs", args), price); return; } @@ -3351,7 +3370,7 @@ class LLSelfStandUp : public view_listener_t bool enable_standup_self() { - bool new_value = gAgent.getAvatarObject() && gAgent.getAvatarObject()->isSitting(); + bool new_value = isAgentAvatarValid() && gAgentAvatarp->isSitting(); return new_value; } @@ -3548,9 +3567,15 @@ bool LLHaveCallingcard::operator()(LLInventoryCategory* cat, BOOL is_agent_mappable(const LLUUID& agent_id) { - return (LLAvatarActions::isFriend(agent_id) && - LLAvatarTracker::instance().getBuddyInfo(agent_id)->isOnline() && - LLAvatarTracker::instance().getBuddyInfo(agent_id)->isRightGrantedFrom(LLRelationship::GRANT_MAP_LOCATION) + const LLRelationship* buddy_info = NULL; + bool is_friend = LLAvatarActions::isFriend(agent_id); + + if (is_friend) + buddy_info = LLAvatarTracker::instance().getBuddyInfo(agent_id); + + return (buddy_info && + buddy_info->isOnline() && + buddy_info->isRightGrantedFrom(LLRelationship::GRANT_MAP_LOCATION) ); } @@ -3674,9 +3699,9 @@ class LLLandSit : public view_listener_t LLVector3d posGlobal = LLToolPie::getInstance()->getPick().mPosGlobal; LLQuaternion target_rot; - if (gAgent.getAvatarObject()) + if (isAgentAvatarValid()) { - target_rot = gAgent.getAvatarObject()->getRotation(); + target_rot = gAgentAvatarp->getRotation(); } else { @@ -3698,14 +3723,14 @@ void reset_view_final( BOOL proceed ); void handle_reset_view() { - if( (CAMERA_MODE_CUSTOMIZE_AVATAR == gAgent.getCameraMode()) && gFloaterCustomize ) + if( (CAMERA_MODE_CUSTOMIZE_AVATAR == gAgentCamera.getCameraMode()) && gFloaterCustomize ) { // Show dialog box if needed. gFloaterCustomize->askToSaveIfDirty( reset_view_final ); } else { - gAgent.switchCameraPreset(CAMERA_PRESET_REAR_VIEW); + gAgentCamera.switchCameraPreset(CAMERA_PRESET_REAR_VIEW); reset_view_final( TRUE ); LLFloaterCamera::resetCameraMode(); } @@ -3728,15 +3753,15 @@ void reset_view_final( BOOL proceed ) return; } - gAgent.resetView(TRUE, TRUE); - gAgent.setLookAt(LOOKAT_TARGET_CLEAR); + gAgentCamera.resetView(TRUE, TRUE); + gAgentCamera.setLookAt(LOOKAT_TARGET_CLEAR); } class LLViewLookAtLastChatter : public view_listener_t { bool handleEvent(const LLSD& userdata) { - gAgent.lookAtLastChat(); + gAgentCamera.lookAtLastChat(); return true; } }; @@ -3745,13 +3770,13 @@ class LLViewMouselook : public view_listener_t { bool handleEvent(const LLSD& userdata) { - if (!gAgent.cameraMouselook()) + if (!gAgentCamera.cameraMouselook()) { - gAgent.changeCameraToMouselook(); + gAgentCamera.changeCameraToMouselook(); } else { - gAgent.changeCameraToDefault(); + gAgentCamera.changeCameraToDefault(); } return true; } @@ -3839,15 +3864,15 @@ BOOL enable_deed_object_to_group(void*) * No longer able to support viewer side manipulations in this way * void god_force_inv_owner_permissive(LLViewerObject* object, - InventoryObjectList* inventory, + LLInventoryObject::object_list_t* inventory, S32 serial_num, void*) { typedef std::vector<LLPointer<LLViewerInventoryItem> > item_array_t; item_array_t items; - InventoryObjectList::const_iterator inv_it = inventory->begin(); - InventoryObjectList::const_iterator inv_end = inventory->end(); + LLInventoryObject::object_list_t::const_iterator inv_it = inventory->begin(); + LLInventoryObject::object_list_t::const_iterator inv_end = inventory->end(); for ( ; inv_it != inv_end; ++inv_it) { if(((*inv_it)->getType() != LLAssetType::AT_CATEGORY)) @@ -3970,9 +3995,9 @@ void handle_god_request_avatar_geometry(void *) void derez_objects(EDeRezDestination dest, const LLUUID& dest_id) { - if(gAgent.cameraMouselook()) + if(gAgentCamera.cameraMouselook()) { - gAgent.changeCameraToDefault(); + gAgentCamera.changeCameraToDefault(); } //gInventoryView->setPanelOpen(TRUE); @@ -4389,8 +4414,10 @@ void handle_buy_or_take() } else { + LLStringUtil::format_map_t args; + args["AMOUNT"] = llformat("%d", total_price); LLFloaterBuyCurrency::buyCurrency( - "Buying this costs", total_price); + LLTrans::getString("BuyingCosts", args), total_price); } } else @@ -4409,35 +4436,22 @@ bool visible_take_object() return !is_selection_buy_not_take() && enable_take(); } +bool tools_visible_buy_object() +{ + return is_selection_buy_not_take(); +} + +bool tools_visible_take_object() +{ + return !is_selection_buy_not_take(); +} + class LLToolsEnableBuyOrTake : public view_listener_t { bool handleEvent(const LLSD& userdata) { bool is_buy = is_selection_buy_not_take(); bool new_value = is_buy ? enable_buy_object() : enable_take(); - - // Update label - std::string label; - std::string buy_text; - std::string take_text; - std::string param = userdata.asString(); - std::string::size_type offset = param.find(","); - if (offset != param.npos) - { - buy_text = param.substr(0, offset); - take_text = param.substr(offset+1); - } - if (is_buy) - { - label = buy_text; - } - else - { - label = take_text; - } - gMenuHolder->childSetText("Pie Object Take", label); - gMenuHolder->childSetText("Menu Object Take", label); - return new_value; } }; @@ -4578,13 +4592,9 @@ BOOL sitting_on_selection() } // Need to determine if avatar is sitting on this object - LLVOAvatar* avatar = gAgent.getAvatarObject(); - if (!avatar) - { - return FALSE; - } + if (!isAgentAvatarValid()) return FALSE; - return (avatar->isSitting() && avatar->getRoot() == root_object); + return (gAgentAvatarp->isSitting() && gAgentAvatarp->getRoot() == root_object); } class LLToolsSaveToInventory : public view_listener_t @@ -4836,9 +4846,10 @@ class LLToolsEnableUnlink : public view_listener_t { bool handleEvent(const LLSD& userdata) { + LLViewerObject* first_editable_object = LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject(); bool new_value = LLSelectMgr::getInstance()->selectGetAllRootsValid() && - LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject() && - !LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject()->isAttachment(); + first_editable_object && + !first_editable_object->isAttachment(); return new_value; } }; @@ -5025,7 +5036,7 @@ class LLViewEnableLastChatter : public view_listener_t bool handleEvent(const LLSD& userdata) { // *TODO: add check that last chatter is in range - bool new_value = (gAgent.cameraThirdPerson() && gAgent.getLastChatter().notNull()); + bool new_value = (gAgentCamera.cameraThirdPerson() && gAgent.getLastChatter().notNull()); return new_value; } }; @@ -5139,7 +5150,7 @@ void print_agent_nvpairs(void*) llinfos << "Can't find agent object" << llendl; } - llinfos << "Camera at " << gAgent.getCameraPositionGlobal() << llendl; + llinfos << "Camera at " << gAgentCamera.getCameraPositionGlobal() << llendl; } void show_debug_menus() @@ -5176,10 +5187,6 @@ void toggle_debug_menus(void*) { BOOL visible = ! gSavedSettings.getBOOL("UseDebugMenus"); gSavedSettings.setBOOL("UseDebugMenus", visible); - if(visible) - { - //LLFirstUse::useDebugMenus(); - } show_debug_menus(); } @@ -5324,13 +5331,23 @@ class LLWorldCreateLandmark : public view_listener_t } }; +class LLWorldPlaceProfile : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "agent")); + + return true; + } +}; + void handle_look_at_selection(const LLSD& param) { - const F32 PADDING_FACTOR = 2.f; + const F32 PADDING_FACTOR = 1.75f; BOOL zoom = (param.asString() == "zoom"); if (!LLSelectMgr::getInstance()->getSelection()->isEmpty()) { - gAgent.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); LLBBox selection_bbox = LLSelectMgr::getInstance()->getBBoxOfSelection(); F32 angle_of_view = llmax(0.1f, LLViewerCamera::getInstance()->getAspect() > 1.f ? LLViewerCamera::getInstance()->getView() * LLViewerCamera::getInstance()->getAspect() : LLViewerCamera::getInstance()->getView()); @@ -5346,14 +5363,19 @@ void handle_look_at_selection(const LLSD& param) } if (zoom) { - gAgent.setCameraPosAndFocusGlobal(LLSelectMgr::getInstance()->getSelectionCenterGlobal() + LLVector3d(obj_to_cam * distance), - LLSelectMgr::getInstance()->getSelectionCenterGlobal(), - object_id ); + // Make sure we are not increasing the distance between the camera and object + LLVector3d orig_distance = gAgentCamera.getCameraPositionGlobal() - LLSelectMgr::getInstance()->getSelectionCenterGlobal(); + distance = llmin(distance, (F32) orig_distance.length()); + + gAgentCamera.setCameraPosAndFocusGlobal(LLSelectMgr::getInstance()->getSelectionCenterGlobal() + LLVector3d(obj_to_cam * distance), + LLSelectMgr::getInstance()->getSelectionCenterGlobal(), + object_id ); + } else { - gAgent.setFocusGlobal( LLSelectMgr::getInstance()->getSelectionCenterGlobal(), object_id ); - } + gAgentCamera.setFocusGlobal( LLSelectMgr::getInstance()->getSelectionCenterGlobal(), object_id ); + } } } @@ -5365,7 +5387,7 @@ void handle_zoom_to_object(LLUUID object_id) if (object) { - gAgent.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); LLBBox bbox = object->getBoundingBoxAgent() ; F32 angle_of_view = llmax(0.1f, LLViewerCamera::getInstance()->getAspect() > 1.f ? LLViewerCamera::getInstance()->getView() * LLViewerCamera::getInstance()->getAspect() : LLViewerCamera::getInstance()->getView()); @@ -5377,7 +5399,7 @@ void handle_zoom_to_object(LLUUID object_id) LLVector3d object_center_global = gAgent.getPosGlobalFromAgent(bbox.getCenterAgent()); - gAgent.setCameraPosAndFocusGlobal(object_center_global + LLVector3d(obj_to_cam * distance), + gAgentCamera.setCameraPosAndFocusGlobal(object_center_global + LLVector3d(obj_to_cam * distance), object_center_global, object_id ); } @@ -5495,6 +5517,37 @@ bool enable_pay_object() return false; } +bool visible_object_stand_up() +{ + // 'Object Stand Up' menu item is visible when agent is sitting on selection + return sitting_on_selection(); +} + +bool visible_object_sit() +{ + // 'Object Sit' menu item is visible when agent is not sitting on selection + bool is_sit_visible = !sitting_on_selection(); + if (is_sit_visible) + { + LLMenuItemGL* sit_menu_item = gMenuHolder->getChild<LLMenuItemGL>("Object Sit"); + // Init default 'Object Sit' menu item label + static const LLStringExplicit sit_text(sit_menu_item->getLabel()); + // Update label + std::string label; + LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(); + if (node && node->mValid && !node->mSitName.empty()) + { + label.assign(node->mSitName); + } + else + { + label = sit_text; + } + sit_menu_item->setLabel(label); + } + return is_sit_visible; +} + class LLObjectEnableSitOrStand : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -5509,34 +5562,6 @@ class LLObjectEnableSitOrStand : public view_listener_t new_value = true; } } - // Update label - std::string label; - std::string sit_text; - std::string stand_text; - std::string param = userdata.asString(); - std::string::size_type offset = param.find(","); - if (offset != param.npos) - { - sit_text = param.substr(0, offset); - stand_text = param.substr(offset+1); - } - if (sitting_on_selection()) - { - label = stand_text; - } - else - { - LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(); - if (node && node->mValid && !node->mSitName.empty()) - { - label.assign(node->mSitName); - } - else - { - label = sit_text; - } - } - gMenuHolder->childSetText("Object Sit", label); return new_value; } @@ -5572,7 +5597,7 @@ void handle_customize_avatar() { if (gAgentWearables.areWearablesLoaded()) { - gAgent.changeCameraToCustomizeAvatar(); + gAgentCamera.changeCameraToCustomizeAvatar(); } } @@ -5588,8 +5613,6 @@ void handle_buy_currency() LLFloaterBuyCurrency::buyCurrency(); } - - class LLFloaterVisible : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -5619,19 +5642,39 @@ class LLShowSidetrayPanel : public view_listener_t bool handleEvent(const LLSD& userdata) { std::string panel_name = userdata.asString(); - // Open up either the sidepanel or new floater. - if (LLSideTray::getInstance()->isPanelActive(panel_name)) + // Toggle the panel + if (!LLSideTray::getInstance()->isPanelActive(panel_name)) { - LLFloaterInventory::showAgentInventory(); + // LLFloaterInventory::showAgentInventory(); + LLSideTray::getInstance()->showPanel(panel_name, LLSD()); } else { - LLSideTray::getInstance()->showPanel(panel_name, LLSD()); + LLSideTray::getInstance()->collapseSideBar(); } return true; } }; +class LLSidetrayPanelVisible : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + std::string panel_name = userdata.asString(); + // Toggle the panel + if (LLSideTray::getInstance()->isPanelActive(panel_name)) + { + return true; + } + else + { + return false; + } + + } +}; + + bool callback_show_url(const LLSD& notification, const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); @@ -5740,18 +5783,18 @@ class LLLandEdit : public view_listener_t { bool handleEvent(const LLSD& userdata) { - if (gAgent.getFocusOnAvatar() && gSavedSettings.getBOOL("EditCameraMovement") ) + if (gAgentCamera.getFocusOnAvatar() && gSavedSettings.getBOOL("EditCameraMovement") ) { // zoom in if we're looking at the avatar - gAgent.setFocusOnAvatar(FALSE, ANIMATE); - gAgent.setFocusGlobal(LLToolPie::getInstance()->getPick()); + gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusGlobal(LLToolPie::getInstance()->getPick()); - gAgent.cameraOrbitOver( F_PI * 0.25f ); + gAgentCamera.cameraOrbitOver( F_PI * 0.25f ); gViewerWindow->moveCursorToCenter(); } else if ( gSavedSettings.getBOOL("EditCameraMovement") ) { - gAgent.setFocusGlobal(LLToolPie::getInstance()->getPick()); + gAgentCamera.setFocusGlobal(LLToolPie::getInstance()->getPick()); gViewerWindow->moveCursorToCenter(); } @@ -5810,7 +5853,7 @@ private: S32 index = userdata.asInteger(); LLViewerJointAttachment* attachment_point = NULL; if (index > 0) - attachment_point = get_if_there(gAgent.getAvatarObject()->mAttachmentPoints, index, (LLViewerJointAttachment*)NULL); + attachment_point = get_if_there(gAgentAvatarp->mAttachmentPoints, index, (LLViewerJointAttachment*)NULL); confirm_replace_attachment(0, attachment_point); } return true; @@ -5831,8 +5874,8 @@ void near_attach_object(BOOL success, void *user_data) U8 attachment_id = 0; if (attachment) { - for (LLVOAvatar::attachment_map_t::const_iterator iter = gAgent.getAvatarObject()->mAttachmentPoints.begin(); - iter != gAgent.getAvatarObject()->mAttachmentPoints.end(); ++iter) + for (LLVOAvatar::attachment_map_t::const_iterator iter = gAgentAvatarp->mAttachmentPoints.begin(); + iter != gAgentAvatarp->mAttachmentPoints.end(); ++iter) { if (iter->second == attachment) { @@ -5877,7 +5920,7 @@ void confirm_replace_attachment(S32 option, void* user_data) walkToSpot -= delta; gAgent.startAutoPilotGlobal(gAgent.getPosGlobalFromAgent(walkToSpot), "Attach", NULL, near_attach_object, user_data, stop_distance); - gAgent.clearFocusObject(); + gAgentCamera.clearFocusObject(); } } } @@ -5957,7 +6000,7 @@ class LLAttachmentDetachFromPoint : public view_listener_t { bool handleEvent(const LLSD& user_data) { - const LLViewerJointAttachment *attachment = get_if_there(gAgent.getAvatarObject()->mAttachmentPoints, user_data.asInteger(), (LLViewerJointAttachment*)NULL); + const LLViewerJointAttachment *attachment = get_if_there(gAgentAvatarp->mAttachmentPoints, user_data.asInteger(), (LLViewerJointAttachment*)NULL); if (attachment->getNumObjects() > 0) { gMessageSystem->newMessage("ObjectDetach"); @@ -5985,7 +6028,7 @@ static bool onEnableAttachmentLabel(LLUICtrl* ctrl, const LLSD& data) LLMenuItemGL* menu = dynamic_cast<LLMenuItemGL*>(ctrl); if (menu) { - const LLViewerJointAttachment *attachment = get_if_there(gAgent.getAvatarObject()->mAttachmentPoints, data["index"].asInteger(), (LLViewerJointAttachment*)NULL); + const LLViewerJointAttachment *attachment = get_if_there(gAgentAvatarp->mAttachmentPoints, data["index"].asInteger(), (LLViewerJointAttachment*)NULL); if (attachment) { label = data["label"].asString(); @@ -6063,10 +6106,12 @@ class LLAttachmentDetach : public view_listener_t //Adding an observer for a Jira 2422 and needs to be a fetch observer //for Jira 3119 -class LLWornItemFetchedObserver : public LLInventoryFetchObserver +class LLWornItemFetchedObserver : public LLInventoryFetchItemsObserver { public: - LLWornItemFetchedObserver() {} + LLWornItemFetchedObserver(const LLUUID& worn_item_id) : + LLInventoryFetchItemsObserver(worn_item_id) + {} virtual ~LLWornItemFetchedObserver() {} protected: @@ -6099,10 +6144,11 @@ class LLAttachmentEnableDrop : public view_listener_t LLViewerJointAttachment* attachment = NULL; LLInventoryItem* item = NULL; - if (object) + // Do not enable drop if all faces of object are not enabled + if (object && LLSelectMgr::getInstance()->getSelection()->contains(object,SELECT_ALL_TES )) { S32 attachmentID = ATTACHMENT_ID_FROM_STATE(object->getState()); - attachment = get_if_there(gAgent.getAvatarObject()->mAttachmentPoints, attachmentID, (LLViewerJointAttachment*)NULL); + attachment = get_if_there(gAgentAvatarp->mAttachmentPoints, attachmentID, (LLViewerJointAttachment*)NULL); if (attachment) { @@ -6119,13 +6165,9 @@ class LLAttachmentEnableDrop : public view_listener_t // when the item finishes fetching worst case scenario // if a fetch is already out there (being sent from a slow sim) // we refetch and there are 2 fetches - LLWornItemFetchedObserver* wornItemFetched = new LLWornItemFetchedObserver(); - LLInventoryFetchObserver::item_ref_t items; //add item to the inventory item to be fetched - - items.push_back((*attachment_iter)->getItemID()); - - wornItemFetched->fetchItems(items); - gInventory.addObserver(wornItemFetched); + LLWornItemFetchedObserver* worn_item_fetched = new LLWornItemFetchedObserver((*attachment_iter)->getItemID()); + worn_item_fetched->startFetch(); + gInventory.addObserver(worn_item_fetched); } } } @@ -6141,8 +6183,14 @@ class LLAttachmentEnableDrop : public view_listener_t BOOL enable_detach(const LLSD&) { LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); - if (!object) return FALSE; - if (!object->isAttachment()) return FALSE; + + // Only enable detach if all faces of object are selected + if (!object || + !object->isAttachment() || + !LLSelectMgr::getInstance()->getSelection()->contains(object,SELECT_ALL_TES )) + { + return FALSE; + } // Find the avatar who owns this attachment LLViewerObject* avatar = object; @@ -6228,8 +6276,8 @@ class LLAttachmentPointFilled : public view_listener_t bool handleEvent(const LLSD& user_data) { bool enable = false; - LLVOAvatar::attachment_map_t::iterator found_it = gAgent.getAvatarObject()->mAttachmentPoints.find(user_data.asInteger()); - if (found_it != gAgent.getAvatarObject()->mAttachmentPoints.end()) + LLVOAvatar::attachment_map_t::iterator found_it = gAgentAvatarp->mAttachmentPoints.find(user_data.asInteger()); + if (found_it != gAgentAvatarp->mAttachmentPoints.end()) { enable = found_it->second->getNumObjects() > 0; } @@ -6365,7 +6413,6 @@ class LLToolsSelectedScriptAction : public view_listener_t else { llwarns << "Failed to generate LLFloaterScriptQueue with action: " << action << llendl; - delete queue; } return true; } @@ -6382,10 +6429,9 @@ void handle_selected_texture_info(void*) msg.assign("Texture info for: "); msg.append(node->mName); - //TODO* CHAT: how to show this? - //LLSD args; - //args["MESSAGE"] = msg; - //LLNotificationsUtil::add("SystemMessage", args); + LLSD args; + args["MESSAGE"] = msg; + LLNotificationsUtil::add("SystemMessage", args); U8 te_count = node->getObject()->getNumTEs(); // map from texture ID to list of faces using it @@ -6418,23 +6464,22 @@ void handle_selected_texture_info(void*) msg.append( llformat("%d ", (S32)(it->second[i]))); } - //TODO* CHAT: how to show this? - //LLSD args; - //args["MESSAGE"] = msg; - //LLNotificationsUtil::add("SystemMessage", args); + LLSD args; + args["MESSAGE"] = msg; + LLNotificationsUtil::add("SystemMessage", args); } } } void handle_test_male(void*) { - LLAppearanceManager::instance().wearOutfitByName("Male Shape & Outfit"); + LLAppearanceMgr::instance().wearOutfitByName("Male Shape & Outfit"); //gGestureList.requestResetFromServer( TRUE ); } void handle_test_female(void*) { - LLAppearanceManager::instance().wearOutfitByName("Female Shape & Outfit"); + LLAppearanceMgr::instance().wearOutfitByName("Female Shape & Outfit"); //gGestureList.requestResetFromServer( FALSE ); } @@ -6449,15 +6494,10 @@ void handle_toggle_pg(void*) void handle_dump_attachments(void*) { - LLVOAvatar* avatar = gAgent.getAvatarObject(); - if( !avatar ) - { - llinfos << "NO AVATAR" << llendl; - return; - } + if(!isAgentAvatarValid()) return; - for (LLVOAvatar::attachment_map_t::iterator iter = avatar->mAttachmentPoints.begin(); - iter != avatar->mAttachmentPoints.end(); ) + for (LLVOAvatar::attachment_map_t::iterator iter = gAgentAvatarp->mAttachmentPoints.begin(); + iter != gAgentAvatarp->mAttachmentPoints.end(); ) { LLVOAvatar::attachment_map_t::iterator curiter = iter++; LLViewerJointAttachment* attachment = curiter->second; @@ -6719,7 +6759,7 @@ class LLViewEnableMouselook : public view_listener_t { // You can't go directly from customize avatar to mouselook. // TODO: write code with appropriate dialogs to handle this transition. - bool new_value = (CAMERA_MODE_CUSTOMIZE_AVATAR != gAgent.getCameraMode() && !gSavedSettings.getBOOL("FreezeTime")); + bool new_value = (CAMERA_MODE_CUSTOMIZE_AVATAR != gAgentCamera.getCameraMode() && !gSavedSettings.getBOOL("FreezeTime")); return new_value; } }; @@ -6856,7 +6896,8 @@ class LLToolsEditLinkedParts : public view_listener_t { bool handleEvent(const LLSD& userdata) { - BOOL select_individuals = gSavedSettings.getBOOL("EditLinkedParts"); + BOOL select_individuals = !gSavedSettings.getBOOL("EditLinkedParts"); + gSavedSettings.setBOOL( "EditLinkedParts", select_individuals ); if (select_individuals) { LLSelectMgr::getInstance()->demoteSelectionToIndividuals(); @@ -6876,7 +6917,7 @@ void reload_vertex_shader(void *) void handle_dump_avatar_local_textures(void*) { - gAgent.getAvatarObject()->dumpLocalTextures(); + gAgentAvatarp->dumpLocalTextures(); } void handle_dump_timers() @@ -6896,86 +6937,83 @@ void handle_debug_avatar_textures(void*) void handle_grab_texture(void* data) { ETextureIndex tex_index = (ETextureIndex)((intptr_t)data); - const LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); - if ( avatar ) - { - // MULTI-WEARABLE: change to support an index - const LLUUID& asset_id = avatar->grabLocalTexture(tex_index, 0); - LL_INFOS("texture") << "Adding baked texture " << asset_id << " to inventory." << llendl; - LLAssetType::EType asset_type = LLAssetType::AT_TEXTURE; - LLInventoryType::EType inv_type = LLInventoryType::IT_TEXTURE; - const LLUUID folder_id = gInventory.findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(asset_type)); - if(folder_id.notNull()) - { - std::string name = "Unknown"; - const LLVOAvatarDictionary::TextureEntry *texture_dict = LLVOAvatarDictionary::getInstance()->getTexture(tex_index); - if (texture_dict->mIsBakedTexture) - { - EBakedTextureIndex baked_index = texture_dict->mBakedTextureIndex; - name = "Baked " + LLVOAvatarDictionary::getInstance()->getBakedTexture(baked_index)->mNameCapitalized; - } - name += " Texture"; - - LLUUID item_id; - item_id.generate(); - LLPermissions perm; - perm.init(gAgentID, - gAgentID, - LLUUID::null, - LLUUID::null); - U32 next_owner_perm = PERM_MOVE | PERM_TRANSFER; - perm.initMasks(PERM_ALL, - PERM_ALL, - PERM_NONE, - PERM_NONE, - next_owner_perm); - time_t creation_date_now = time_corrected(); - LLPointer<LLViewerInventoryItem> item - = new LLViewerInventoryItem(item_id, - folder_id, - perm, - asset_id, - asset_type, - inv_type, - name, - LLStringUtil::null, - LLSaleInfo::DEFAULT, - LLInventoryItem::II_FLAGS_NONE, - creation_date_now); - - item->updateServer(TRUE); - gInventory.updateItem(item); - gInventory.notifyObservers(); - - // Show the preview panel for textures to let - // user know that the image is now in inventory. - LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(); - if(active_panel) - { - LLFocusableElement* focus_ctrl = gFocusMgr.getKeyboardFocus(); - - active_panel->setSelection(item_id, TAKE_FOCUS_NO); - active_panel->openSelected(); - //LLFloaterInventory::dumpSelectionInformation((void*)view); - // restore keyboard focus - gFocusMgr.setKeyboardFocus(focus_ctrl); - } - } - else - { - llwarns << "Can't find a folder to put it in" << llendl; + if (!isAgentAvatarValid()) return; + + // MULTI-WEARABLE: change to support an index + const LLUUID& asset_id = gAgentAvatarp->grabLocalTexture(tex_index, 0); + LL_INFOS("texture") << "Adding baked texture " << asset_id << " to inventory." << llendl; + LLAssetType::EType asset_type = LLAssetType::AT_TEXTURE; + LLInventoryType::EType inv_type = LLInventoryType::IT_TEXTURE; + const LLUUID folder_id = gInventory.findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(asset_type)); + if(folder_id.notNull()) + { + std::string name = "Unknown"; + const LLVOAvatarDictionary::TextureEntry *texture_dict = LLVOAvatarDictionary::getInstance()->getTexture(tex_index); + if (texture_dict->mIsBakedTexture) + { + EBakedTextureIndex baked_index = texture_dict->mBakedTextureIndex; + name = "Baked " + LLVOAvatarDictionary::getInstance()->getBakedTexture(baked_index)->mNameCapitalized; + } + name += " Texture"; + + LLUUID item_id; + item_id.generate(); + LLPermissions perm; + perm.init(gAgentID, + gAgentID, + LLUUID::null, + LLUUID::null); + U32 next_owner_perm = PERM_MOVE | PERM_TRANSFER; + perm.initMasks(PERM_ALL, + PERM_ALL, + PERM_NONE, + PERM_NONE, + next_owner_perm); + time_t creation_date_now = time_corrected(); + LLPointer<LLViewerInventoryItem> item + = new LLViewerInventoryItem(item_id, + folder_id, + perm, + asset_id, + asset_type, + inv_type, + name, + LLStringUtil::null, + LLSaleInfo::DEFAULT, + LLInventoryItemFlags::II_FLAGS_NONE, + creation_date_now); + + item->updateServer(TRUE); + gInventory.updateItem(item); + gInventory.notifyObservers(); + + // Show the preview panel for textures to let + // user know that the image is now in inventory. + LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(); + if(active_panel) + { + LLFocusableElement* focus_ctrl = gFocusMgr.getKeyboardFocus(); + + active_panel->setSelection(item_id, TAKE_FOCUS_NO); + active_panel->openSelected(); + //LLFloaterInventory::dumpSelectionInformation((void*)view); + // restore keyboard focus + gFocusMgr.setKeyboardFocus(focus_ctrl); } } + else + { + llwarns << "Can't find a folder to put it in" << llendl; + } } BOOL enable_grab_texture(void* data) { ETextureIndex index = (ETextureIndex)((intptr_t)data); - const LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); - if ( avatar ) + if (isAgentAvatarValid()) { // MULTI-WEARABLE: - return avatar->canGrabLocalTexture(index,0); + return gAgentAvatarp->canGrabLocalTexture(index,0); } return FALSE; } @@ -7014,7 +7052,7 @@ LLVOAvatar* find_avatar_from_object( const LLUUID& object_id ) void handle_disconnect_viewer(void *) { - LLAppViewer::instance()->forceDisconnect("Testing viewer disconnect"); + LLAppViewer::instance()->forceDisconnect(LLTrans::getString("TestingDisconnect")); } void force_error_breakpoint(void *) @@ -7176,25 +7214,7 @@ void handle_buy_currency_test(void*) LLStringUtil::format_map_t replace; replace["[AGENT_ID]"] = gAgent.getID().asString(); replace["[SESSION_ID]"] = gAgent.getSecureSessionID().asString(); - - // *TODO: Replace with call to LLUI::getLanguage() after windows-setup - // branch merges in. JC - std::string language = "en"; - language = gSavedSettings.getString("Language"); - if (language.empty() || language == "default") - { - language = gSavedSettings.getString("InstallLanguage"); - } - if (language.empty() || language == "default") - { - language = gSavedSettings.getString("SystemLanguage"); - } - if (language.empty() || language == "default") - { - language = "en"; - } - - replace["[LANGUAGE]"] = language; + replace["[LANGUAGE]"] = LLUI::getLanguage(); LLStringUtil::format(url, replace); llinfos << "buy currency url " << url << llendl; @@ -7204,12 +7224,11 @@ void handle_buy_currency_test(void*) void handle_rebake_textures(void*) { - LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); - if (!avatar) return; + if (!isAgentAvatarValid()) return; // Slam pending upload count to "unstick" things bool slam_for_debug = true; - avatar->forceBakeAllTextures(slam_for_debug); + gAgentAvatarp->forceBakeAllTextures(slam_for_debug); } void toggle_visibility(void* user_data) @@ -7609,6 +7628,24 @@ class LLWorldDayCycle : public view_listener_t } }; +class LLWorldToggleMovementControls : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + LLBottomTray::getInstance()->toggleMovementControls(); + return true; + } +}; + +class LLWorldToggleCameraControls : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + LLBottomTray::getInstance()->toggleCameraControls(); + return true; + } +}; + void show_navbar_context_menu(LLView* ctrl, S32 x, S32 y) { static LLMenuGL* show_navbar_context_menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_hide_navbar.xml", @@ -7711,6 +7748,7 @@ void initialize_menus() commit.add("World.Chat", boost::bind(&handle_chat, (void*)NULL)); view_listener_t::addMenu(new LLWorldAlwaysRun(), "World.AlwaysRun"); view_listener_t::addMenu(new LLWorldCreateLandmark(), "World.CreateLandmark"); + view_listener_t::addMenu(new LLWorldPlaceProfile(), "World.PlaceProfile"); view_listener_t::addMenu(new LLWorldSetHomeLocation(), "World.SetHomeLocation"); view_listener_t::addMenu(new LLWorldTeleportHome(), "World.TeleportHome"); view_listener_t::addMenu(new LLWorldSetAway(), "World.SetAway"); @@ -7728,6 +7766,9 @@ void initialize_menus() view_listener_t::addMenu(new LLWorldPostProcess(), "World.PostProcess"); view_listener_t::addMenu(new LLWorldDayCycle(), "World.DayCycle"); + view_listener_t::addMenu(new LLWorldToggleMovementControls(), "World.Toggle.MovementControls"); + view_listener_t::addMenu(new LLWorldToggleCameraControls(), "World.Toggle.CameraControls"); + // Tools menu view_listener_t::addMenu(new LLToolsSelectTool(), "Tools.SelectTool"); view_listener_t::addMenu(new LLToolsSelectOnlyMyObjects(), "Tools.SelectOnlyMyObjects"); @@ -7757,12 +7798,11 @@ void initialize_menus() view_listener_t::addMenu(new LLToolsEnableUnlink(), "Tools.EnableUnlink"); view_listener_t::addMenu(new LLToolsEnableBuyOrTake(), "Tools.EnableBuyOrTake"); enable.add("Tools.EnableTakeCopy", boost::bind(&enable_object_take_copy)); + enable.add("Tools.VisibleBuyObject", boost::bind(&tools_visible_buy_object)); + enable.add("Tools.VisibleTakeObject", boost::bind(&tools_visible_take_object)); view_listener_t::addMenu(new LLToolsEnableSaveToInventory(), "Tools.EnableSaveToInventory"); view_listener_t::addMenu(new LLToolsEnableSaveToObjectInventory(), "Tools.EnableSaveToObjectInventory"); - /*view_listener_t::addMenu(new LLToolsVisibleBuyObject(), "Tools.VisibleBuyObject"); - view_listener_t::addMenu(new LLToolsVisibleTakeObject(), "Tools.VisibleTakeObject");*/ - // Help menu // most items use the ShowFloater method @@ -7952,6 +7992,7 @@ void initialize_menus() commit.add("Avatar.Eject", boost::bind(&handle_avatar_eject, LLSD())); view_listener_t::addMenu(new LLAvatarSendIM(), "Avatar.SendIM"); view_listener_t::addMenu(new LLAvatarCall(), "Avatar.Call"); + enable.add("Avatar.EnableCall", boost::bind(&LLAvatarActions::canCall)); view_listener_t::addMenu(new LLAvatarReportAbuse(), "Avatar.ReportAbuse"); view_listener_t::addMenu(new LLAvatarEnableAddFriend(), "Avatar.EnableAddFriend"); @@ -7984,6 +8025,9 @@ void initialize_menus() enable.add("Object.EnableDelete", boost::bind(&enable_object_delete)); enable.add("Object.EnableWear", boost::bind(&object_selected_and_point_valid)); + enable.add("Object.StandUpVisible", boost::bind(&visible_object_stand_up)); + enable.add("Object.SitVisible", boost::bind(&visible_object_sit)); + view_listener_t::addMenu(new LLObjectEnableReturn(), "Object.EnableReturn"); view_listener_t::addMenu(new LLObjectEnableReportAbuse(), "Object.EnableReportAbuse"); @@ -8028,6 +8072,7 @@ void initialize_menus() view_listener_t::addMenu(new LLFloaterVisible(), "FloaterVisible"); view_listener_t::addMenu(new LLShowSidetrayPanel(), "ShowSidetrayPanel"); + view_listener_t::addMenu(new LLSidetrayPanelVisible(), "SidetrayPanelVisible"); view_listener_t::addMenu(new LLSomethingSelected(), "SomethingSelected"); view_listener_t::addMenu(new LLSomethingSelectedNoHUD(), "SomethingSelectedNoHUD"); view_listener_t::addMenu(new LLEditableSelected(), "EditableSelected"); |