diff options
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--[-rwxr-xr-x] | indra/newview/llviewermenu.cpp | 82 |
1 files changed, 32 insertions, 50 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 38d62dee5e..99a9ed1d75 100755..100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -391,32 +391,10 @@ void set_underclothes_menu_options() void set_merchant_SLM_menu() { - // DD-170 : SLM Alpha and Beta program : for the moment, we always show the SLM menu and - // tools so that all merchants can try out the UI, even if not migrated. - // *TODO : Keep SLM UI hidden for non migrated merchant in released viewer - - //if (LLMarketplaceData::instance().getSLMStatus() == MarketplaceStatusCodes::MARKET_PLACE_NOT_MIGRATED_MERCHANT) - //{ - // Merchant not migrated: show only the old Merchant Outbox menu - // gMenuHolder->getChild<LLView>("MerchantOutbox")->setVisible(TRUE); - //} - //else - //{ - // 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); - LLCommand* command = LLCommandManager::instance().getCommand("marketplacelistings"); - gToolBarView->enableCommand(command->id(), true); - //} -} - -void set_merchant_outbox_menu(U32 status, const LLSD& content) -{ - // If the merchant is fully migrated, the API is disabled (503) and we won't show the old menu item. - // In all other cases, we show it. - if (status != MarketplaceErrorCodes::IMPORT_SERVER_API_DISABLED) - { - gMenuHolder->getChild<LLView>("MerchantOutbox")->setVisible(TRUE); - } + // 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); + LLCommand* command = LLCommandManager::instance().getCommand("marketplacelistings"); + gToolBarView->enableCommand(command->id(), true); } void check_merchant_status() @@ -435,17 +413,6 @@ void check_merchant_status() // Launch an SLM test connection to get the merchant status LLMarketplaceData::instance().initializeSLM(boost::bind(&set_merchant_SLM_menu)); - - // Do the Merchant Outbox init only once per session - if (LLMarketplaceInventoryImporter::instance().getMarketPlaceStatus() == MarketplaceStatusCodes::MARKET_PLACE_NOT_INITIALIZED) - { - // Hide merchant outbox related menu item - gMenuHolder->getChild<LLView>("MerchantOutbox")->setVisible(FALSE); - - // Launch a Merchant Outbox test connection to get the migration status - LLMarketplaceInventoryImporter::instance().setStatusReportCallback(boost::bind(&set_merchant_outbox_menu,_1, _2)); - LLMarketplaceInventoryImporter::instance().initialize(); - } } } @@ -1041,10 +1008,6 @@ U32 info_display_from_string(std::string info_display) { return LLPipeline::RENDER_DEBUG_TEXTURE_PRIORITY; } - else if ("shame" == info_display) - { - return LLPipeline::RENDER_DEBUG_SHAME; - } else if ("texture area" == info_display) { return LLPipeline::RENDER_DEBUG_TEXTURE_AREA; @@ -1073,9 +1036,9 @@ U32 info_display_from_string(std::string info_display) { return LLPipeline::RENDER_DEBUG_COMPOSITION; } - else if ("attachment bytes" == info_display) + else if ("avatardrawinfo" == info_display) { - return LLPipeline::RENDER_DEBUG_ATTACHMENT_BYTES; + return (LLPipeline::RENDER_DEBUG_AVATAR_DRAW_INFO); } else if ("glow" == info_display) { @@ -1111,6 +1074,7 @@ U32 info_display_from_string(std::string info_display) } else { + LL_WARNS() << "unrecognized feature name '" << info_display << "'" << LL_ENDL; return 0; } }; @@ -1245,9 +1209,24 @@ class LLAdvancedToggleWireframe : public view_listener_t bool handleEvent(const LLSD& userdata) { gUseWireframe = !(gUseWireframe); + + if (gUseWireframe) + { + gInitialDeferredModeForWireframe = LLPipeline::sRenderDeferred; + } + gWindowResized = TRUE; LLPipeline::updateRenderDeferred(); gPipeline.resetVertexBuffers(); + + if (!gUseWireframe && !gInitialDeferredModeForWireframe && LLPipeline::sRenderDeferred != gInitialDeferredModeForWireframe && gPipeline.isInit()) + { + LLPipeline::refreshCachedSettings(); + gPipeline.releaseGLBuffers(); + gPipeline.createGLBuffers(); + LLViewerShaderMgr::instance()->setShaders(); + } + return true; } }; @@ -2914,6 +2893,8 @@ BOOL enable_object_build(void*) bool enable_object_edit() { + if (!isAgentAvatarValid()) return false; + // *HACK: The new "prelude" Help Islands have a build sandbox area, // so users need the Edit and Create pie menu options when they are // there. Eventually this needs to be replaced with code that only @@ -3074,11 +3055,11 @@ class LLAvatarCheckImpostorMode : public view_listener_t switch (mode) { case 0: - return (avatar->getVisualMuteSettings() == LLVOAvatar::VISUAL_MUTE_NOT_SET); + return (avatar->getVisualMuteSettings() == LLVOAvatar::AV_RENDER_NORMALLY); case 1: - return (avatar->getVisualMuteSettings() == LLVOAvatar::ALWAYS_VISUAL_MUTE); + return (avatar->getVisualMuteSettings() == LLVOAvatar::AV_DO_NOT_RENDER); case 2: - return (avatar->getVisualMuteSettings() == LLVOAvatar::NEVER_VISUAL_MUTE); + return (avatar->getVisualMuteSettings() == LLVOAvatar::AV_ALWAYS_RENDER); default: return false; } @@ -3100,19 +3081,18 @@ class LLAvatarSetImpostorMode : public view_listener_t switch (mode) { case 0: - avatar->setVisualMuteSettings(LLVOAvatar::VISUAL_MUTE_NOT_SET); + avatar->setVisualMuteSettings(LLVOAvatar::AV_RENDER_NORMALLY); break; case 1: - avatar->setVisualMuteSettings(LLVOAvatar::ALWAYS_VISUAL_MUTE); + avatar->setVisualMuteSettings(LLVOAvatar::AV_DO_NOT_RENDER); break; case 2: - avatar->setVisualMuteSettings(LLVOAvatar::NEVER_VISUAL_MUTE); + avatar->setVisualMuteSettings(LLVOAvatar::AV_ALWAYS_RENDER); break; default: return false; } - avatar->forceUpdateVisualMuteSettings(); LLVOAvatar::cullAvatarsByPixelArea(); return true; } // handleEvent() @@ -3132,6 +3112,8 @@ class LLObjectMute : public view_listener_t LLVOAvatar* avatar = find_avatar_from_object(object); if (avatar) { + avatar->mNeedsImpostorUpdate = TRUE; + id = avatar->getID(); LLNameValue *firstname = avatar->getNVPair("FirstName"); |