diff options
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 439 |
1 files changed, 256 insertions, 183 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 631e1b57d9..33bfbe4134 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -149,8 +149,8 @@ typedef LLPointer<LLViewerObject> LLViewerObjectPtr; static boost::unordered_map<std::string, LLStringExplicit> sDefaultItemLabels; -BOOL enable_land_build(void*); -BOOL enable_object_build(void*); +bool enable_land_build(void*); +bool enable_object_build(void*); LLVOAvatar* find_avatar_from_object( LLViewerObject* object ); LLVOAvatar* find_avatar_from_object( const LLUUID& object_id ); @@ -160,15 +160,15 @@ void handle_test_load_url(void*); // // Evil hackish imported globals -//extern BOOL gHideSelectedObjects; -//extern BOOL gAllowSelectAvatar; -//extern BOOL gDebugAvatarRotation; -extern BOOL gDebugClicks; -extern BOOL gDebugWindowProc; -extern BOOL gShaderProfileFrame; +//extern bool gHideSelectedObjects; +//extern bool gAllowSelectAvatar; +//extern bool gDebugAvatarRotation; +extern bool gDebugClicks; +extern bool gDebugWindowProc; +extern bool gShaderProfileFrame; -//extern BOOL gDebugTextEditorTips; -//extern BOOL gDebugSelectMgr; +//extern bool gDebugTextEditorTips; +//extern bool gDebugSelectMgr; // // Globals @@ -223,24 +223,25 @@ void handle_region_dump_temp_asset_data(void*); void handle_region_clear_temp_asset_data(void*); // Object pie menu -BOOL sitting_on_selection(); +bool sitting_on_selection(); void near_sit_object(); //void label_sit_or_stand(std::string& label, void*); // buy and take alias into the same UI positions, so these // declarations handle this mess. -BOOL is_selection_buy_not_take(); +bool is_selection_buy_not_take(); S32 selection_price(); -BOOL enable_take(); +bool enable_take(); void handle_object_show_inspector(); void handle_avatar_show_inspector(); bool confirm_take(const LLSD& notification, const LLSD& response, LLObjectSelectionHandle selection_handle); +bool confirm_take_separate(const LLSD ¬ification, const LLSD &response, LLObjectSelectionHandle selection_handle); void handle_buy_object(LLSaleInfo sale_info); void handle_buy_contents(LLSaleInfo sale_info); // Land pie menu -void near_sit_down_point(BOOL success, void *); +void near_sit_down_point(bool success, void *); // Avatar pie menu @@ -250,16 +251,16 @@ void near_sit_down_point(BOOL success, void *); void velocity_interpolate( void* ); void handle_visual_leak_detector_toggle(void*); void handle_rebake_textures(void*); -BOOL check_admin_override(void*); +bool check_admin_override(void*); void handle_admin_override_toggle(void*); #ifdef TOGGLE_HACKED_GODLIKE_VIEWER void handle_toggle_hacked_godmode(void*); -BOOL check_toggle_hacked_godmode(void*); +bool check_toggle_hacked_godmode(void*); bool enable_toggle_hacked_godmode(void*); #endif void toggle_show_xui_names(void *); -BOOL check_show_xui_names(void *); +bool check_show_xui_names(void *); // Debug UI @@ -309,7 +310,7 @@ void dump_select_mgr(void*); void dump_inventory(void*); void toggle_visibility(void*); -BOOL get_visibility(void*); +bool get_visibility(void*); // Avatar Pie menu void request_friendship(const LLUUID& agent_id); @@ -322,7 +323,7 @@ void handle_dump_followcam(void*); void handle_viewer_enable_message_log(void*); void handle_viewer_disable_message_log(void*); -BOOL enable_buy_land(void*); +bool enable_buy_land(void*); // Help menu @@ -332,13 +333,13 @@ void handle_dump_attachments(void *); void handle_dump_avatar_local_textures(void*); void handle_debug_avatar_textures(void*); void handle_grab_baked_texture(void*); -BOOL enable_grab_baked_texture(void*); +bool enable_grab_baked_texture(void*); void handle_dump_region_object_cache(void*); void handle_reset_interest_lists(void *); -BOOL enable_save_into_task_inventory(void*); +bool enable_save_into_task_inventory(void*); -BOOL enable_detach(const LLSD& = LLSD()); +bool enable_detach(const LLSD& = LLSD()); void menu_toggle_attached_lights(void* user_data); void menu_toggle_attached_particles(void* user_data); @@ -378,7 +379,7 @@ void LLMenuParcelObserver::changed() child = gMenuLand->findChild<LLView>("Land Buy"); if (child) { - BOOL buyable = enable_buy_land(NULL); + bool buyable = enable_buy_land(NULL); child->setEnabled(buyable); } } @@ -402,7 +403,7 @@ void initialize_menus(); void set_merchant_SLM_menu() { // All other cases (new merchant, not merchant, migrated merchant): show the new Marketplace Listings menu and enable the tool - gMenuHolder->getChild<LLView>("MarketplaceListings")->setVisible(TRUE); + gMenuHolder->getChild<LLView>("MarketplaceListings")->setVisible(true); LLCommand* command = LLCommandManager::instance().getCommand("marketplacelistings"); gToolBarView->enableCommand(command->id(), true); @@ -427,7 +428,7 @@ void check_merchant_status(bool force) LLMarketplaceData::instance().setSLMStatus(MarketplaceStatusCodes::MARKET_PLACE_NOT_INITIALIZED); } // Hide SLM related menu item - gMenuHolder->getChild<LLView>("MarketplaceListings")->setVisible(FALSE); + gMenuHolder->getChild<LLView>("MarketplaceListings")->setVisible(false); // Also disable the toolbar button for Marketplace Listings LLCommand* command = LLCommandManager::instance().getCommand("marketplacelistings"); @@ -534,17 +535,17 @@ void init_menus() gMenuHolder->childSetLabelArg("Upload Sound", "[COST]", sound_upload_cost_str); gMenuHolder->childSetLabelArg("Upload Animation", "[COST]", animation_upload_cost_str); - gAttachSubMenu = gMenuBarView->findChildMenuByName("Attach Object", TRUE); - gDetachSubMenu = gMenuBarView->findChildMenuByName("Detach Object", TRUE); + gAttachSubMenu = gMenuBarView->findChildMenuByName("Attach Object", true); + gDetachSubMenu = gMenuBarView->findChildMenuByName("Detach Object", true); gDetachAvatarMenu = gMenuHolder->getChild<LLMenuGL>("Avatar Detach", true); gDetachHUDAvatarMenu = gMenuHolder->getChild<LLMenuGL>("Avatar Detach HUD", true); // Don't display the Memory console menu if the feature is turned off - LLMenuItemCheckGL *memoryMenu = gMenuBarView->getChild<LLMenuItemCheckGL>("Memory", TRUE); + LLMenuItemCheckGL *memoryMenu = gMenuBarView->getChild<LLMenuItemCheckGL>("Memory", true); if (memoryMenu) { - memoryMenu->setVisible(FALSE); + memoryMenu->setVisible(false); } gMenuBarView->createJumpKeys(); @@ -639,7 +640,7 @@ class LLAdvancedDumpInfoToConsole : public view_listener_t { bool handleEvent(const LLSD& userdata) { - gDebugView->mDebugConsolep->setVisible(TRUE); + gDebugView->mDebugConsolep->setVisible(true); std::string info_type = userdata.asString(); if ("region" == info_type) { @@ -956,7 +957,7 @@ class LLAdvancedSetDisplayTextureDensity : public view_listener_t std::string mode = userdata.asString(); if (mode == "none") { - if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == TRUE) + if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == true) { gPipeline.toggleRenderDebug(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY); } @@ -964,7 +965,7 @@ class LLAdvancedSetDisplayTextureDensity : public view_listener_t } else if (mode == "current") { - if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == FALSE) + if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == false) { gPipeline.toggleRenderDebug(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY); } @@ -972,7 +973,7 @@ class LLAdvancedSetDisplayTextureDensity : public view_listener_t } else if (mode == "desired") { - if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == FALSE) + if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == false) { gPipeline.toggleRenderDebug(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY); } @@ -981,7 +982,7 @@ class LLAdvancedSetDisplayTextureDensity : public view_listener_t } else if (mode == "full") { - if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == FALSE) + if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == false) { gPipeline.toggleRenderDebug(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY); } @@ -1287,13 +1288,13 @@ public: bool handleEvent(const LLSD &userdata) { // Toggle the mode - regions will get updated - if (gAgent.getInterestListMode() == LLViewerRegion::IL_MODE_360) + if (gAgent.getInterestListMode() == IL_MODE_360) { - gAgent.changeInterestListMode(LLViewerRegion::IL_MODE_DEFAULT); + gAgent.changeInterestListMode(IL_MODE_DEFAULT); } else { - gAgent.changeInterestListMode(LLViewerRegion::IL_MODE_360); + gAgent.changeInterestListMode(IL_MODE_360); } return true; } @@ -1303,7 +1304,7 @@ class LLAdvancedCheckInterestList360Mode : public view_listener_t { bool handleEvent(const LLSD& userdata) { - return (gAgent.getInterestListMode() == LLViewerRegion::IL_MODE_360); + return (gAgent.getInterestListMode() == IL_MODE_360); } }; @@ -3020,7 +3021,7 @@ class LLObjectBuild : public view_listener_t if (gAgentCamera.getFocusOnAvatar() && !LLToolMgr::getInstance()->inEdit() && gSavedSettings.getBOOL("EditCameraMovement") ) { // zoom in if we're looking at the avatar - gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusOnAvatar(false, ANIMATE); gAgentCamera.setFocusGlobal(LLToolPie::getInstance()->getPick()); gAgentCamera.cameraZoomIn(0.666f); gAgentCamera.cameraOrbitOver( 30.f * DEG_TO_RAD ); @@ -3055,11 +3056,11 @@ void update_camera() // 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 gAgentCamera.setFocusGlobal(gAgentCamera.calcFocusPositionTargetGlobal(), LLUUID::null); - gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusOnAvatar(false, ANIMATE); } else { - gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusOnAvatar(false, ANIMATE); LLViewerObject* selected_objectp = selection->getFirstRootObject(); if (selected_objectp) { @@ -3136,7 +3137,7 @@ void handle_attachment_touch(const LLUUID& inv_item_id) { bool apply(LLSelectNode* node) { - node->setTransient(TRUE); + node->setTransient(true); return true; } } f; @@ -3185,7 +3186,7 @@ class LLLandBuild : public view_listener_t if (gAgentCamera.getFocusOnAvatar() && !LLToolMgr::getInstance()->inEdit() && gSavedSettings.getBOOL("EditCameraMovement") ) { // zoom in if we're looking at the avatar - gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusOnAvatar(false, ANIMATE); gAgentCamera.setFocusGlobal(LLToolPie::getInstance()->getPick()); gAgentCamera.cameraZoomIn(0.666f); gAgentCamera.cameraOrbitOver( 30.f * DEG_TO_RAD ); @@ -3212,7 +3213,7 @@ class LLLandBuyPass : public view_listener_t { bool handleEvent(const LLSD& userdata) { - LLPanelLandGeneral::onClickBuyPass((void *)FALSE); + LLPanelLandGeneral::onClickBuyPass((void *)false); return true; } }; @@ -3227,12 +3228,12 @@ class LLLandEnableBuyPass : public view_listener_t }; // BUG: Should really check if CLICK POINT is in a parcel where you can build. -BOOL enable_land_build(void*) +bool enable_land_build(void*) { - if (gAgent.isGodlike()) return TRUE; - if (gAgent.inPrelude()) return FALSE; + if (gAgent.isGodlike()) return true; + if (gAgent.inPrelude()) return false; - BOOL can_build = FALSE; + bool can_build = false; LLParcel* agent_parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); if (agent_parcel) { @@ -3242,12 +3243,12 @@ BOOL enable_land_build(void*) } // BUG: Should really check if OBJECT is in a parcel where you can build. -BOOL enable_object_build(void*) +bool enable_object_build(void*) { - if (gAgent.isGodlike()) return TRUE; - if (gAgent.inPrelude()) return FALSE; + if (gAgent.isGodlike()) return true; + if (gAgent.inPrelude()) return false; - BOOL can_build = FALSE; + bool can_build = false; LLParcel* agent_parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); if (agent_parcel) { @@ -3348,10 +3349,10 @@ class LLSelfEnableRemoveAllAttachments : public view_listener_t } }; -BOOL enable_has_attachments(void*) +bool enable_has_attachments(void*) { - return FALSE; + return false; } //--------------------------------------------------------------------------- @@ -3488,7 +3489,7 @@ class LLObjectMute : public view_listener_t LLVOAvatar* avatar = find_avatar_from_object(object); if (avatar) { - avatar->mNeedsImpostorUpdate = TRUE; + avatar->mNeedsImpostorUpdate = true; avatar->mLastImpostorUpdateReason = 9; id = avatar->getID(); @@ -3555,7 +3556,7 @@ bool handle_go_to() else { // Snap camera back to behind avatar - gAgentCamera.setFocusOnAvatar(TRUE, ANIMATE); + gAgentCamera.setFocusOnAvatar(true, ANIMATE); } // Could be first use @@ -3930,7 +3931,7 @@ void handle_buy_object(LLSaleInfo sale_info) LLUUID owner_id; std::string owner_name; - BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name); + bool owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name); if (!owners_identical) { LLNotificationsUtil::add("CannotBuyObjectsFromDifferentOwners"); @@ -3938,7 +3939,7 @@ void handle_buy_object(LLSaleInfo sale_info) } LLPermissions perm; - BOOL valid = LLSelectMgr::getInstance()->selectGetPermissions(perm); + bool valid = LLSelectMgr::getInstance()->selectGetPermissions(perm); LLAggregatePermissions ag_perm; valid &= LLSelectMgr::getInstance()->selectGetAggregatePermissions(ag_perm); if(!valid || !sale_info.isForSale() || !perm.allowTransferTo(gAgent.getID())) @@ -4154,7 +4155,7 @@ class LLTogglePanelPeopleTab : public view_listener_t } }; -BOOL check_admin_override(void*) +bool check_admin_override(void*) { return gAgent.getAdminOverride(); } @@ -4254,7 +4255,7 @@ void handle_toggle_hacked_godmode(void*) set_god_level(gHackGodmode ? GOD_MAINTENANCE : GOD_NOT); } -BOOL check_toggle_hacked_godmode(void*) +bool check_toggle_hacked_godmode(void*) { return gHackGodmode; } @@ -4291,15 +4292,15 @@ public: virtual ~LLHaveCallingcard() {} virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item); - BOOL isThere() const { return mIsThere;} + bool isThere() const { return mIsThere;} protected: LLUUID mID; - BOOL mIsThere; + bool mIsThere; }; LLHaveCallingcard::LLHaveCallingcard(const LLUUID& agent_id) : mID(agent_id), - mIsThere(FALSE) + mIsThere(false) { } @@ -4311,14 +4312,14 @@ bool LLHaveCallingcard::operator()(LLInventoryCategory* cat, if((item->getType() == LLAssetType::AT_CALLINGCARD) && (item->getCreatorUUID() == mID)) { - mIsThere = TRUE; + mIsThere = true; } } - return FALSE; + return false; } */ -BOOL is_agent_mappable(const LLUUID& agent_id) +bool is_agent_mappable(const LLUUID& agent_id) { const LLRelationship* buddy_info = NULL; bool is_friend = LLAvatarActions::isFriend(agent_id); @@ -4399,7 +4400,7 @@ class LLEnableEditPhysics : public view_listener_t bool handleEvent(const LLSD& userdata) { //return gAgentWearables.isWearableModifiable(LLWearableType::WT_SHAPE, 0); - return TRUE; + return true; } }; @@ -4467,11 +4468,11 @@ void handle_object_sit(const LLUUID& object_id) handle_object_sit(obj, offset); } -void near_sit_down_point(BOOL success, void *) +void near_sit_down_point(bool success, void *) { if (success) { - gAgent.setFlying(FALSE); + gAgent.setFlying(false); gAgent.clearControlFlags(AGENT_CONTROL_STAND_UP); // might have been set by autopilot gAgent.setControlFlags(AGENT_CONTROL_SIT_ON_GROUND); } @@ -4517,7 +4518,7 @@ class LLLandCanSit : public view_listener_t // // Major mode switching // -void reset_view_final( BOOL proceed ); +void reset_view_final( bool proceed ); void handle_reset_view() { @@ -4526,8 +4527,8 @@ void handle_reset_view() // switching to outfit selector should automagically save any currently edited wearable LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "my_outfits")); } - gAgentCamera.setFocusOnAvatar(TRUE, FALSE, FALSE); - reset_view_final( TRUE ); + gAgentCamera.setFocusOnAvatar(true, false, false); + reset_view_final( true ); LLFloaterCamera::resetCameraMode(); } @@ -4541,14 +4542,14 @@ class LLViewResetView : public view_listener_t }; // Note: extra parameters allow this function to be called from dialog. -void reset_view_final( BOOL proceed ) +void reset_view_final( bool proceed ) { if( !proceed ) { return; } - gAgentCamera.resetView(TRUE, TRUE); + gAgentCamera.resetView(true, true); gAgentCamera.setLookAt(LOOKAT_TARGET_CLEAR); } @@ -4582,7 +4583,7 @@ class LLViewDefaultUISize : public view_listener_t bool handleEvent(const LLSD& userdata) { gSavedSettings.setF32("UIScaleFactor", 1.0f); - gSavedSettings.setBOOL("UIAutoScale", FALSE); + gSavedSettings.setBOOL("UIAutoScale", false); gViewerWindow->reshape(gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw()); return true; } @@ -4634,7 +4635,7 @@ void handle_duplicate_in_place(void*) LL_INFOS() << "handle_duplicate_in_place" << LL_ENDL; LLVector3 offset(0.f, 0.f, 0.f); - LLSelectMgr::getInstance()->selectDuplicate(offset, TRUE); + LLSelectMgr::getInstance()->selectDuplicate(offset, true); } @@ -4682,8 +4683,8 @@ void handle_object_owner_permissive(void*) if(gAgent.isGodlike()) { // do the objects. - LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_BASE, TRUE, PERM_ALL, TRUE); - LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_OWNER, TRUE, PERM_ALL, TRUE); + LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_BASE, true, PERM_ALL, true); + LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_OWNER, true, PERM_ALL, true); } } @@ -4692,14 +4693,14 @@ void handle_object_owner_self(void*) // only send this if they're a god. if(gAgent.isGodlike()) { - LLSelectMgr::getInstance()->sendOwner(gAgent.getID(), gAgent.getGroupID(), TRUE); + LLSelectMgr::getInstance()->sendOwner(gAgent.getID(), gAgent.getGroupID(), true); } } // Shortcut to set owner permissions to not editable. void handle_object_lock(void*) { - LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_OWNER, FALSE, PERM_MODIFY); + LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_OWNER, false, PERM_MODIFY); } void handle_object_asset_ids(void*) @@ -4824,11 +4825,11 @@ static bool get_derezzable_objects( LL_WARNS() << "Attempt to derez deprecated AssetContainer object type not supported." << LL_ENDL; /* object->requestInventory(container_inventory_arrived, - (void *)(BOOL)(DRD_TAKE_INTO_AGENT_INVENTORY == dest)); + (void *)(bool)(DRD_TAKE_INTO_AGENT_INVENTORY == dest)); */ continue; } - BOOL can_derez_current = FALSE; + bool can_derez_current = false; switch(dest) { case DRD_TAKE_INTO_AGENT_INVENTORY: @@ -4837,14 +4838,14 @@ static bool get_derezzable_objects( ((node->mPermissions->allowTransferTo(gAgent.getID()) && object->permModify()) || (node->allowOperationOnNode(PERM_OWNER, GP_OBJECT_MANIPULATE)))) { - can_derez_current = TRUE; + can_derez_current = true; } break; case DRD_RETURN_TO_OWNER: if(!object->isAttachment()) { - can_derez_current = TRUE; + can_derez_current = true; } break; @@ -4853,7 +4854,7 @@ static bool get_derezzable_objects( && object->permCopy()) || gAgent.isGodlike()) { - can_derez_current = TRUE; + can_derez_current = true; } break; } @@ -4954,7 +4955,7 @@ static void derez_objects( msg->nextBlockFast(_PREHASH_ObjectData); msg->addU32Fast(_PREHASH_ObjectLocalID, object->getLocalID()); // VEFFECT: DerezObject - LLHUDEffectSpiral* effectp = (LLHUDEffectSpiral*)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINT, TRUE); + LLHUDEffectSpiral* effectp = (LLHUDEffectSpiral*)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINT, true); effectp->setPositionGlobal(object->getPositionGlobal()); effectp->setColor(LLColor4U(gAgent.getEffectColor())); } @@ -4982,6 +4983,24 @@ static void derez_objects(EDeRezDestination dest, const LLUUID& dest_id) derez_objects(dest, dest_id, first_region, error, NULL); } +static void derez_objects_separate(EDeRezDestination dest, const LLUUID &dest_id) +{ + std::vector<LLViewerObjectPtr> derez_object_list; + std::string error; + LLViewerRegion* first_region = NULL; + if (!get_derezzable_objects(dest, error, first_region, &derez_object_list, false)) + { + LL_WARNS() << "No objects to derez" << LL_ENDL; + return; + } + for (LLViewerObject *opjectp : derez_object_list) + { + std::vector<LLViewerObjectPtr> buf_list; + buf_list.push_back(opjectp); + derez_objects(dest, dest_id, first_region, error, &buf_list); + } +} + void handle_take_copy() { if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) return; @@ -4990,6 +5009,15 @@ void handle_take_copy() derez_objects(DRD_ACQUIRE_TO_AGENT_INVENTORY, category_id); } +void handle_take_separate_copy() +{ + if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) + return; + + const LLUUID category_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OBJECT); + derez_objects_separate(DRD_ACQUIRE_TO_AGENT_INVENTORY, category_id); +} + void handle_link_objects() { if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) @@ -5083,7 +5111,7 @@ void force_take_copy(void*) derez_objects(DRD_FORCE_TO_GOD_INVENTORY, category_id); } -void handle_take() +void handle_take(bool take_separate) { // we want to use the folder this was derezzed from if it's // available. Otherwise, derez to the normal place. @@ -5092,8 +5120,8 @@ void handle_take() return; } - BOOL you_own_everything = TRUE; - BOOL locked_but_takeable_object = FALSE; + bool you_own_everything = true; + bool locked_but_takeable_object = false; LLUUID category_id; for (LLObjectSelection::root_iterator iter = LLSelectMgr::getInstance()->getSelection()->root_begin(); @@ -5105,12 +5133,12 @@ void handle_take() { if(!object->permYouOwner()) { - you_own_everything = FALSE; + you_own_everything = false; } if(!object->permMove()) { - locked_but_takeable_object = TRUE; + locked_but_takeable_object = true; } } if(node->mFolderID.notNull()) @@ -5172,7 +5200,17 @@ void handle_take() // MAINT-290 // Reason: Showing the confirmation dialog resets object selection, thus there is nothing to derez. // Fix: pass selection to the confirm_take, so that selection doesn't "die" after confirmation dialog is opened - params.functor.function(boost::bind(confirm_take, _1, _2, LLSelectMgr::instance().getSelection())); + params.functor.function([take_separate](const LLSD ¬ification, const LLSD &response) + { + if (take_separate) + { + confirm_take_separate(notification, response, LLSelectMgr::instance().getSelection()); + } + else + { + confirm_take(notification, response, LLSelectMgr::instance().getSelection()); + } + }); if(locked_but_takeable_object || !you_own_everything) @@ -5201,7 +5239,7 @@ void handle_take() void handle_object_show_inspector() { LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); - LLViewerObject* objectp = selection->getFirstRootObject(TRUE); + LLViewerObject* objectp = selection->getFirstRootObject(true); if (!objectp) { return; @@ -5235,14 +5273,24 @@ bool confirm_take(const LLSD& notification, const LLSD& response, LLObjectSelect return false; } +bool confirm_take_separate(const LLSD ¬ification, const LLSD &response, LLObjectSelectionHandle selection_handle) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (enable_take() && (option == 0)) + { + derez_objects_separate(DRD_TAKE_INTO_AGENT_INVENTORY, notification["payload"]["folder_id"].asUUID()); + } + return false; +} + // You can take an item when it is public and transferrable, or when // you own it. We err on the side of enabling the item when at least // one item selected can be copied to inventory. -BOOL enable_take() +bool enable_take() { if (sitting_on_selection()) { - return FALSE; + return false; } for (LLObjectSelection::valid_root_iterator iter = LLSelectMgr::getInstance()->getSelection()->valid_root_begin(); @@ -5257,13 +5305,13 @@ BOOL enable_take() } #ifdef HACKED_GODLIKE_VIEWER - return TRUE; + return true; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER if (!LLGridManager::getInstance()->isInProductionGrid() && gAgent.isGodlike()) { - return TRUE; + return true; } # endif if(!object->isPermanentEnforced() && @@ -5275,7 +5323,7 @@ BOOL enable_take() } #endif } - return FALSE; + return false; } @@ -5317,6 +5365,21 @@ bool visible_take_object() return !is_selection_buy_not_take() && enable_take(); } +bool is_multiple_selection() +{ + return (LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() > 1); +} + +bool is_single_selection() +{ + return !is_multiple_selection(); +} + +bool enable_take_objects() +{ + return visible_take_object() && is_multiple_selection(); +} + bool tools_visible_buy_object() { return is_selection_buy_not_take(); @@ -5351,9 +5414,9 @@ class LLToolsEnableBuyOrTake : public view_listener_t // exception is if you own everything in the selection that is for // sale, in this case, you can't buy stuff from yourself, so you can // take it. -// return value = TRUE if selection is a 'buy'. -// FALSE if selection is a 'take' -BOOL is_selection_buy_not_take() +// return value = true if selection is a 'buy'. +// false if selection is a 'take' +bool is_selection_buy_not_take() { for (LLObjectSelection::root_iterator iter = LLSelectMgr::getInstance()->getSelection()->root_begin(); iter != LLSelectMgr::getInstance()->getSelection()->root_end(); iter++) @@ -5364,10 +5427,10 @@ BOOL is_selection_buy_not_take() { // you do not own the object and it is for sale, thus, // it's a buy - return TRUE; + return true; } } - return FALSE; + return false; } S32 selection_price() @@ -5425,7 +5488,7 @@ void handle_buy() if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) return; LLSaleInfo sale_info; - BOOL valid = LLSelectMgr::getInstance()->selectGetSaleInfo(sale_info); + bool valid = LLSelectMgr::getInstance()->selectGetSaleInfo(sale_info); if (!valid) return; S32 price = sale_info.getSalePrice(); @@ -5463,27 +5526,27 @@ bool for_sale_selection(LLSelectNode* nodep) || nodep->mSaleInfo.getSaleType() != LLSaleInfo::FS_COPY); } -BOOL sitting_on_selection() +bool sitting_on_selection() { LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(); if (!node) { - return FALSE; + return false; } if (!node->mValid) { - return FALSE; + return false; } LLViewerObject* root_object = node->getObject(); if (!root_object) { - return FALSE; + return false; } // Need to determine if avatar is sitting on this object - if (!isAgentAvatarValid()) return FALSE; + if (!isAgentAvatarValid()) return false; return (gAgentAvatarp->isSitting() && gAgentAvatarp->getRoot() == root_object); } @@ -5586,7 +5649,7 @@ class LLToolsSnapObjectXY : public view_listener_t pos_global.mdV[VY] += snap_size; } - obj->setPositionGlobal(pos_global, FALSE); + obj->setPositionGlobal(pos_global, false); } } LLSelectMgr::getInstance()->sendMultipleUpdate(UPD_POSITION); @@ -5967,7 +6030,7 @@ bool enable_object_delete() { bool new_value = #ifdef HACKED_GODLIKE_VIEWER - TRUE; + true; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER (!LLGridManager::getInstance()->isInProductionGrid() @@ -6179,8 +6242,8 @@ void show_debug_menus() // this might get called at login screen where there is no menu so only toggle it if one exists if ( gMenuBarView ) { - BOOL debug = gSavedSettings.getBOOL("UseDebugMenus"); - BOOL qamode = gSavedSettings.getBOOL("QAMode"); + bool debug = gSavedSettings.getBOOL("UseDebugMenus"); + bool qamode = gSavedSettings.getBOOL("QAMode"); gMenuBarView->setItemVisible("Advanced", debug); // gMenuBarView->setItemEnabled("Advanced", debug); // Don't disable Advanced keyboard shortcuts when hidden @@ -6198,7 +6261,7 @@ void show_debug_menus() } if (gLoginMenuBarView) { - BOOL debug = gSavedSettings.getBOOL("UseDebugMenus"); + bool debug = gSavedSettings.getBOOL("UseDebugMenus"); gLoginMenuBarView->setItemVisible("Debug", debug); gLoginMenuBarView->setItemEnabled("Debug", debug); } @@ -6206,7 +6269,7 @@ void show_debug_menus() void toggle_debug_menus(void*) { - BOOL visible = ! gSavedSettings.getBOOL("UseDebugMenus"); + bool visible = ! gSavedSettings.getBOOL("UseDebugMenus"); gSavedSettings.setBOOL("UseDebugMenus", visible); show_debug_menus(); } @@ -6393,10 +6456,10 @@ class LLWorldPlaceProfile : public view_listener_t void handle_look_at_selection(const LLSD& param) { const F32 PADDING_FACTOR = 1.75f; - BOOL zoom = (param.asString() == "zoom"); + bool zoom = (param.asString() == "zoom"); if (!LLSelectMgr::getInstance()->getSelection()->isEmpty()) { - gAgentCamera.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()); @@ -6436,7 +6499,7 @@ void handle_zoom_to_object(LLUUID object_id) if (object) { - gAgentCamera.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()); @@ -6488,8 +6551,8 @@ class LLAvatarToggleMyProfile : public view_listener_t LLFloater* instance = LLAvatarActions::getProfileFloater(gAgent.getID()); if (LLFloater::isMinimized(instance)) { - instance->setMinimized(FALSE); - instance->setFocus(TRUE); + instance->setMinimized(false); + instance->setFocus(true); } else if (!LLFloater::isShown(instance)) { @@ -6497,7 +6560,7 @@ class LLAvatarToggleMyProfile : public view_listener_t } else if (!instance->hasFocus() && !instance->getIsChrome()) { - instance->setFocus(TRUE); + instance->setFocus(true); } else { @@ -6514,8 +6577,8 @@ class LLAvatarTogglePicks : public view_listener_t LLFloater * instance = LLAvatarActions::getProfileFloater(gAgent.getID()); if (LLFloater::isMinimized(instance) || (instance && !instance->hasFocus() && !instance->getIsChrome())) { - instance->setMinimized(FALSE); - instance->setFocus(TRUE); + instance->setMinimized(false); + instance->setFocus(true); LLAvatarActions::showPicks(gAgent.getID()); } else if (picks_tab_visible()) @@ -6537,8 +6600,8 @@ class LLAvatarToggleSearch : public view_listener_t LLFloater* instance = LLFloaterReg::findInstance("search"); if (LLFloater::isMinimized(instance)) { - instance->setMinimized(FALSE); - instance->setFocus(TRUE); + instance->setMinimized(false); + instance->setFocus(true); } else if (!LLFloater::isShown(instance)) { @@ -6546,7 +6609,7 @@ class LLAvatarToggleSearch : public view_listener_t } else if (!instance->hasFocus() && !instance->getIsChrome()) { - instance->setFocus(TRUE); + instance->setFocus(true); } else { @@ -7059,7 +7122,7 @@ class LLLandEdit : public view_listener_t if (gAgentCamera.getFocusOnAvatar() && gSavedSettings.getBOOL("EditCameraMovement") ) { // zoom in if we're looking at the avatar - gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusOnAvatar(false, ANIMATE); gAgentCamera.setFocusGlobal(LLToolPie::getInstance()->getPick()); gAgentCamera.cameraOrbitOver( F_PI * 0.25f ); @@ -7122,7 +7185,7 @@ class LLWorldEnableBuyLand : public view_listener_t } }; -BOOL enable_buy_land(void*) +bool enable_buy_land(void*) { return LLViewerParcelMgr::getInstance()->canAgentBuyParcel( LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel(), false); @@ -7160,7 +7223,7 @@ private: return true; } - static void onNearAttachObject(BOOL success, void *user_data); + static void onNearAttachObject(bool success, void *user_data); void confirmReplaceAttachment(S32 option, LLViewerJointAttachment* attachment_point); class CallbackData : public LLSelectionCallbackData { @@ -7179,7 +7242,7 @@ protected: LLObjectSelectionHandle LLObjectAttachToAvatar::sObjectSelection; // static -void LLObjectAttachToAvatar::onNearAttachObject(BOOL success, void *user_data) +void LLObjectAttachToAvatar::onNearAttachObject(bool success, void *user_data) { if (!user_data) return; CallbackData* cb_data = static_cast<CallbackData*>(user_data); @@ -7439,7 +7502,7 @@ class LLAttachmentEnableDrop : public view_listener_t { bool handleEvent(const LLSD& userdata) { - BOOL can_build = gAgent.isGodlike() || (LLViewerParcelMgr::getInstance()->allowAgentBuild()); + bool can_build = gAgent.isGodlike() || (LLViewerParcelMgr::getInstance()->allowAgentBuild()); //Add an inventory observer to only allow dropping the newly attached item //once it exists in your inventory. Look at Jira 2422. @@ -7491,7 +7554,7 @@ class LLAttachmentEnableDrop : public view_listener_t } }; -BOOL enable_detach(const LLSD&) +bool enable_detach(const LLSD&) { LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); @@ -7500,7 +7563,7 @@ BOOL enable_detach(const LLSD&) !object->isAttachment() || !LLSelectMgr::getInstance()->getSelection()->contains(object,SELECT_ALL_TES )) { - return FALSE; + return false; } // Find the avatar who owns this attachment @@ -7510,13 +7573,13 @@ BOOL enable_detach(const LLSD&) // ...if it's you, good to detach if (avatar->getID() == gAgent.getID()) { - return TRUE; + return true; } avatar = (LLViewerObject*)avatar->getParent(); } - return FALSE; + return false; } class LLAttachmentEnableDetach : public view_listener_t @@ -7529,7 +7592,7 @@ class LLAttachmentEnableDetach : public view_listener_t }; // Used to tell if the selected object can be attached to your avatar. -BOOL object_selected_and_point_valid() +bool object_selected_and_point_valid() { LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); for (LLObjectSelection::root_iterator iter = selection->root_begin(); @@ -7544,7 +7607,7 @@ BOOL object_selected_and_point_valid() LLViewerObject* child = *iter; if (child->isAvatar()) { - return FALSE; + return false; } } } @@ -7559,23 +7622,23 @@ BOOL object_selected_and_point_valid() } -BOOL object_is_wearable() +bool object_is_wearable() { if (!isAgentAvatarValid()) { - return FALSE; + return false; } if (!object_selected_and_point_valid()) { - return FALSE; + return false; } if (sitting_on_selection()) { - return FALSE; + return false; } if (!gAgentAvatarp->canAttachMoreObjects()) { - return FALSE; + return false; } LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); for (LLObjectSelection::valid_root_iterator iter = LLSelectMgr::getInstance()->getSelection()->valid_root_begin(); @@ -7584,10 +7647,10 @@ BOOL object_is_wearable() LLSelectNode* node = *iter; if (node->mPermissions->getOwner() == gAgent.getID()) { - return TRUE; + return true; } } - return FALSE; + return false; } @@ -7635,10 +7698,10 @@ namespace { struct QueueObjects : public LLSelectedNodeFunctor { - BOOL scripted; - BOOL modifiable; + bool scripted; + bool modifiable; LLFloaterScriptQueue* mQueue; - QueueObjects(LLFloaterScriptQueue* q) : mQueue(q), scripted(FALSE), modifiable(FALSE) {} + QueueObjects(LLFloaterScriptQueue* q) : mQueue(q), scripted(false), modifiable(false) {} virtual bool apply(LLSelectNode* node) { LLViewerObject* obj = node->getObject(); @@ -7845,13 +7908,13 @@ void handle_selected_material_info() void handle_test_male(void*) { LLAppearanceMgr::instance().wearOutfitByName("Male Shape & Outfit"); - //gGestureList.requestResetFromServer( TRUE ); + //gGestureList.requestResetFromServer( true ); } void handle_test_female(void*) { LLAppearanceMgr::instance().wearOutfitByName("Female Shape & Outfit"); - //gGestureList.requestResetFromServer( FALSE ); + //gGestureList.requestResetFromServer( false ); } void handle_dump_attachments(void*) @@ -7869,7 +7932,7 @@ void handle_dump_attachments(void*) ++attachment_iter) { LLViewerObject *attached_object = attachment_iter->get(); - BOOL visible = (attached_object != NULL && + bool visible = (attached_object != NULL && attached_object->mDrawable.notNull() && !attached_object->mDrawable->isRenderType(0)); LLVector3 pos; @@ -7893,7 +7956,7 @@ protected: bool handleEvent(const LLSD& userdata) { std::string control_name = userdata.asString(); - BOOL checked = gSavedSettings.getBOOL( control_name ); + bool checked = gSavedSettings.getBOOL( control_name ); gSavedSettings.setBOOL( control_name, !checked ); return true; } @@ -7950,7 +8013,7 @@ class LLAdvancedClickRenderProfile: public view_listener_t { bool handleEvent(const LLSD& userdata) { - gShaderProfileFrame = TRUE; + gShaderProfileFrame = true; return true; } }; @@ -8016,7 +8079,7 @@ class LLToggleShaderControl : public view_listener_t bool handleEvent(const LLSD& userdata) { std::string control_name = userdata.asString(); - BOOL checked = gSavedSettings.getBOOL( control_name ); + bool checked = gSavedSettings.getBOOL( control_name ); gSavedSettings.setBOOL( control_name, !checked ); LLPipeline::refreshCachedSettings(); LLViewerShaderMgr::instance()->setShaders(); @@ -8136,19 +8199,23 @@ bool enable_object_take_copy() return all_valid; } +bool enable_take_copy_objects() +{ + return enable_object_take_copy() && is_multiple_selection(); +} class LLHasAsset : public LLInventoryCollectFunctor { public: - LLHasAsset(const LLUUID& id) : mAssetID(id), mHasAsset(FALSE) {} + LLHasAsset(const LLUUID& id) : mAssetID(id), mHasAsset(false) {} virtual ~LLHasAsset() {} virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item); - BOOL hasAsset() const { return mHasAsset; } + bool hasAsset() const { return mHasAsset; } protected: LLUUID mAssetID; - BOOL mHasAsset; + bool mHasAsset; }; bool LLHasAsset::operator()(LLInventoryCategory* cat, @@ -8156,13 +8223,13 @@ bool LLHasAsset::operator()(LLInventoryCategory* cat, { if(item && item->getAssetUUID() == mAssetID) { - mHasAsset = TRUE; + mHasAsset = true; } - return FALSE; + return false; } -BOOL enable_save_into_task_inventory(void*) +bool enable_save_into_task_inventory(void*) { LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(); if(node && (node->mValid) && (!node->mFromTaskID.isNull())) @@ -8171,10 +8238,10 @@ BOOL enable_save_into_task_inventory(void*) LLViewerObject* obj = node->getObject(); if( obj && !obj->isAttachment() ) { - return TRUE; + return true; } } - return FALSE; + return false; } class LLToolsEnableSaveToObjectInventory : public view_listener_t @@ -8244,12 +8311,12 @@ class LLWorldEnableTeleportHome : public view_listener_t } }; -BOOL enable_god_full(void*) +bool enable_god_full(void*) { return gAgent.getGodLevel() >= GOD_FULL; } -BOOL enable_god_liaison(void*) +bool enable_god_liaison(void*) { return gAgent.getGodLevel() >= GOD_LIAISON; } @@ -8259,7 +8326,7 @@ bool is_god_customer_service() return gAgent.getGodLevel() >= GOD_CUSTOMER_SERVICE; } -BOOL enable_god_basic(void*) +bool enable_god_basic(void*) { return gAgent.getGodLevel() > GOD_NOT; } @@ -8270,7 +8337,7 @@ void toggle_show_xui_names(void *) gSavedSettings.setBOOL("DebugShowXUINames", !gSavedSettings.getBOOL("DebugShowXUINames")); } -BOOL check_show_xui_names(void *) +bool check_show_xui_names(void *) { return gSavedSettings.getBOOL("DebugShowXUINames"); } @@ -8279,7 +8346,7 @@ class LLToolsSelectOnlyMyObjects : public view_listener_t { bool handleEvent(const LLSD& userdata) { - BOOL cur_val = gSavedSettings.getBOOL("SelectOwnedOnly"); + bool cur_val = gSavedSettings.getBOOL("SelectOwnedOnly"); gSavedSettings.setBOOL("SelectOwnedOnly", ! cur_val ); @@ -8291,7 +8358,7 @@ class LLToolsSelectOnlyMovableObjects : public view_listener_t { bool handleEvent(const LLSD& userdata) { - BOOL cur_val = gSavedSettings.getBOOL("SelectMovableOnly"); + bool cur_val = gSavedSettings.getBOOL("SelectMovableOnly"); gSavedSettings.setBOOL("SelectMovableOnly", ! cur_val ); @@ -8303,7 +8370,7 @@ class LLToolsSelectInvisibleObjects : public view_listener_t { bool handleEvent(const LLSD& userdata) { - BOOL cur_val = gSavedSettings.getBOOL("SelectInvisibleObjects"); + bool cur_val = gSavedSettings.getBOOL("SelectInvisibleObjects"); gSavedSettings.setBOOL("SelectInvisibleObjects", !cur_val); @@ -8315,7 +8382,7 @@ class LLToolsSelectReflectionProbes: public view_listener_t { bool handleEvent(const LLSD& userdata) { - BOOL cur_val = gSavedSettings.getBOOL("SelectReflectionProbes"); + bool cur_val = gSavedSettings.getBOOL("SelectReflectionProbes"); gSavedSettings.setBOOL("SelectReflectionProbes", !cur_val); @@ -8362,7 +8429,7 @@ 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) { @@ -8442,7 +8509,7 @@ void handle_grab_baked_texture(void* data) LLInventoryItemFlags::II_FLAGS_NONE, creation_date_now); - item->updateServer(TRUE); + item->updateServer(true); gInventory.updateItem(item); gInventory.notifyObservers(); @@ -8466,14 +8533,14 @@ void handle_grab_baked_texture(void* data) } } -BOOL enable_grab_baked_texture(void* data) +bool enable_grab_baked_texture(void* data) { EBakedTextureIndex index = (EBakedTextureIndex)((intptr_t)data); if (isAgentAvatarValid()) { return gAgentAvatarp->canGrabBakedTexture(index); } - return FALSE; + return false; } // Returns a pointer to the avatar give the UUID of the avatar OR of an attachment the avatar is wearing. @@ -8600,18 +8667,18 @@ LLViewerMenuHolderGL::LLViewerMenuHolderGL(const LLViewerMenuHolderGL::Params& p : LLMenuHolderGL(p) {} -BOOL LLViewerMenuHolderGL::hideMenus() +bool LLViewerMenuHolderGL::hideMenus() { - BOOL handled = FALSE; + bool handled = false; if (LLMenuHolderGL::hideMenus()) { - handled = TRUE; + handled = true; } // drop pie menu selection - mParcelSelection = NULL; - mObjectSelection = NULL; + mParcelSelection = nullptr; + mObjectSelection = nullptr; if (gMenuBarView) { @@ -8727,7 +8794,7 @@ void toggle_visibility(void* user_data) viewp->setVisible(!viewp->getVisible()); } -BOOL get_visibility(void* user_data) +bool get_visibility(void* user_data) { LLView* viewp = (LLView*)user_data; return viewp->getVisible(); @@ -9059,9 +9126,9 @@ class LLToolsSelectTool : public view_listener_t // attempt to open it, but it won't bring it to front or de-minimize. if (gFloaterTools && (gFloaterTools->isMinimized() || !gFloaterTools->isShown() || !gFloaterTools->isFrontmost())) { - gFloaterTools->setMinimized(FALSE); + gFloaterTools->setMinimized(false); gFloaterTools->openFloater(); - gFloaterTools->setVisibleAndFrontmost(TRUE); + gFloaterTools->setVisibleAndFrontmost(true); } return true; } @@ -9079,7 +9146,7 @@ class LLWorldEnvSettings : public view_listener_t LLFloater* env_floater = LLFloaterReg::findTypedInstance<LLFloater>(*it); if (env_floater) { - env_floater->setFocus(FALSE); + env_floater->setFocus(false); } } } @@ -9603,6 +9670,7 @@ void initialize_menus() enable.add("Tools.EnableUnlink", boost::bind(&LLSelectMgr::enableUnlinkObjects, LLSelectMgr::getInstance())); view_listener_t::addMenu(new LLToolsEnableBuyOrTake(), "Tools.EnableBuyOrTake"); enable.add("Tools.EnableTakeCopy", boost::bind(&enable_object_take_copy)); + enable.add("Tools.EnableCopySeparate", boost::bind(&enable_take_copy_objects)); 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 LLToolsEnableSaveToObjectInventory(), "Tools.EnableSaveToObjectInventory"); @@ -9878,6 +9946,9 @@ void initialize_menus() view_listener_t::addMenu(new LLObjectMute(), "Object.Mute"); enable.add("Object.VisibleTake", boost::bind(&visible_take_object)); + enable.add("Object.VisibleTakeMultiple", boost::bind(&is_multiple_selection)); + enable.add("Object.VisibleTakeSingle", boost::bind(&is_single_selection)); + enable.add("Object.EnableTakeMultiple", boost::bind(&enable_take_objects)); enable.add("Object.VisibleBuy", boost::bind(&visible_buy_object)); commit.add("Object.Buy", boost::bind(&handle_buy)); @@ -9886,7 +9957,9 @@ void initialize_menus() commit.add("Object.EditGLTFMaterial", boost::bind(&handle_object_edit_gltf_material)); commit.add("Object.Inspect", boost::bind(&handle_object_inspect)); commit.add("Object.Open", boost::bind(&handle_object_open)); - commit.add("Object.Take", boost::bind(&handle_take)); + commit.add("Object.Take", boost::bind(&handle_take, false)); + commit.add("Object.TakeSeparate", boost::bind(&handle_take, true)); + commit.add("Object.TakeSeparateCopy", boost::bind(&handle_take_separate_copy)); commit.add("Object.ShowInspector", boost::bind(&handle_object_show_inspector)); enable.add("Object.EnableInspect", boost::bind(&enable_object_inspect)); enable.add("Object.EnableEditGLTFMaterial", boost::bind(&enable_object_edit_gltf_material)); |