From aad49bd41461269bc3294df73050a2dd4fc76fe1 Mon Sep 17 00:00:00 2001 From: Rye Date: Sun, 11 Jan 2026 13:09:02 -0500 Subject: Introduced Tracy instrumentation to app initialization --- indra/newview/llviewermenu.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index f29760c824..5af6a41c11 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -473,6 +473,8 @@ void check_merchant_status(bool force) void init_menus() { + LL_PROFILE_ZONE_SCOPED; + // Initialize actions initialize_menus(); @@ -9689,6 +9691,8 @@ void initialize_spellcheck_menu() void initialize_menus() { + LL_PROFILE_ZONE_SCOPED; + // A parameterized event handler used as ctrl-8/9/0 zoom controls below. class LLZoomer : public view_listener_t { -- cgit v1.3 From 76a80b6787290dc8a950b43b67e5b4cd6238014f Mon Sep 17 00:00:00 2001 From: Rye Date: Sat, 10 Jan 2026 04:54:16 -0500 Subject: Replace usage of remaining boost::unordered containers with std Replace LLUUID and LLMaterialID container hashing functions with more collision resistant versions Utilize boost::hash_combine for TEMaterialPair to generate good hash distribution Generalize is_in_map and get_if_there for usage with all mapped types --- indra/llcommon/llpounceable.h | 4 +- indra/llcommon/llsingleton.h | 4 +- indra/llcommon/llstaticstringtable.h | 5 +- indra/llcommon/llstl.h | 18 +++---- indra/llcommon/lluuid.h | 19 ++++++-- indra/llprimitive/llmaterialid.h | 30 +++++++----- indra/llrender/llfontfreetype.h | 5 +- indra/llrender/llgl.cpp | 6 +-- indra/llrender/llgl.h | 4 +- indra/newview/llmaterialmgr.h | 76 +++++++++++++----------------- indra/newview/llmeshrepository.h | 2 +- indra/newview/llperfstats.h | 2 +- indra/newview/llviewermenu.cpp | 8 ++-- indra/newview/llviewerprecompiledheaders.h | 2 - 14 files changed, 97 insertions(+), 88 deletions(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/llcommon/llpounceable.h b/indra/llcommon/llpounceable.h index e86098f20b..20561b0c65 100644 --- a/indra/llcommon/llpounceable.h +++ b/indra/llcommon/llpounceable.h @@ -38,9 +38,9 @@ #include "llsingleton.h" #include #include -#include #include +#include #include // Forward declare the user template, since we want to be able to point to it @@ -86,7 +86,7 @@ class LLPounceableQueueSingleton: // instance will call on the SAME LLPounceableQueueSingleton instance -- // given how class statics work. We must keep a separate queue for each // LLPounceable instance. Use a hash map for that. - typedef boost::unordered_map map_t; + typedef std::unordered_map map_t; public: // Disambiguate queues belonging to different LLPounceables. diff --git a/indra/llcommon/llsingleton.h b/indra/llcommon/llsingleton.h index 3fba8602ee..e6989211ae 100644 --- a/indra/llcommon/llsingleton.h +++ b/indra/llcommon/llsingleton.h @@ -25,10 +25,10 @@ #ifndef LLSINGLETON_H #define LLSINGLETON_H -#include #include #include #include +#include #include #include "mutex.h" #include "lockstatic.h" @@ -61,7 +61,7 @@ private: static vec_t dep_sort(); // we directly depend on these other LLSingletons - typedef boost::unordered_set set_t; + typedef std::unordered_set set_t; set_t mDepends; protected: diff --git a/indra/llcommon/llstaticstringtable.h b/indra/llcommon/llstaticstringtable.h index 66ba3487c4..edff955ee7 100644 --- a/indra/llcommon/llstaticstringtable.h +++ b/indra/llcommon/llstaticstringtable.h @@ -29,9 +29,10 @@ #define LL_STATIC_STRING_TABLE_H #include "lldefs.h" -#include #include "llstl.h" +#include + class LLStaticHashedString { public: @@ -74,7 +75,7 @@ struct LLStaticStringHasher template< typename MappedObject > class LL_COMMON_API LLStaticStringTable - : public boost::unordered_map< LLStaticHashedString, MappedObject, LLStaticStringHasher > + : public std::unordered_map< LLStaticHashedString, MappedObject, LLStaticStringHasher > { }; diff --git a/indra/llcommon/llstl.h b/indra/llcommon/llstl.h index 7d41c42ba7..9f3587886c 100644 --- a/indra/llcommon/llstl.h +++ b/indra/llcommon/llstl.h @@ -229,12 +229,10 @@ void delete_and_clear_array(T*& ptr) template inline typename T::mapped_type get_ptr_in_map(const T& inmap, typename T::key_type const& key) { - // Typedef here avoids warnings because of new c++ naming rules. - typedef typename T::const_iterator map_iter; - map_iter iter = inmap.find(key); + auto iter = inmap.find(key); if(iter == inmap.end()) { - return NULL; + return nullptr; } else { @@ -243,8 +241,8 @@ inline typename T::mapped_type get_ptr_in_map(const T& inmap, typename T::key_ty }; // helper function which returns true if key is in inmap. -template -inline bool is_in_map(const std::map& inmap, const K& key) +template +inline bool is_in_map(const T& inmap, typename T::key_type const& key) { if(inmap.find(key) == inmap.end()) { @@ -260,12 +258,10 @@ inline bool is_in_map(const std::map& inmap, const K& key) // To replace LLSkipMap getIfThere, use: // get_if_there(map, key, 0) // WARNING: Make sure default_value (generally 0) is not a valid map entry! -template -inline T get_if_there(const std::map& inmap, const K& key, T default_value) +template +inline typename T::mapped_type get_if_there(const T& inmap, typename T::key_type const& key, typename T::mapped_type default_value) { - // Typedef here avoids warnings because of new c++ naming rules. - typedef typename std::map::const_iterator map_iter; - map_iter iter = inmap.find(key); + auto iter = inmap.find(key); if(iter == inmap.end()) { return default_value; diff --git a/indra/llcommon/lluuid.h b/indra/llcommon/lluuid.h index ca1cf03c4d..f91aadccc0 100644 --- a/indra/llcommon/lluuid.h +++ b/indra/llcommon/lluuid.h @@ -26,6 +26,7 @@ #ifndef LL_LLUUID_H #define LL_LLUUID_H +#include #include #include #include @@ -176,15 +177,27 @@ namespace std { inline size_t operator()(const LLUUID& id) const noexcept { - return (size_t)id.getDigest64(); + size_t h = 0; + // Golden ratio hash with avalanche mixing + // Process 8 bytes at a time by manually constructing 64-bit values + // Shift by 31: mixes upper half into lower half for better bit distribution + // Shift by 47: ensures highest bits influence final hash output + for (int i = 0; i < UUID_BYTES; i += 8) { + size_t chunk = (size_t)id.mData[i] | ((size_t)id.mData[i+1] << 8) | + ((size_t)id.mData[i+2] << 16) | ((size_t)id.mData[i+3] << 24) | + ((size_t)id.mData[i+4] << 32) | ((size_t)id.mData[i+5] << 40) | + ((size_t)id.mData[i+6] << 48) | ((size_t)id.mData[i+7] << 56); + h ^= (chunk * 0x9e3779b97f4a7c15ULL) ^ (h >> 31) ^ (h >> 47); + } + return h; } }; } -// For use with boost containers. +// For use with boost::container_hash inline size_t hash_value(const LLUUID& id) noexcept { - return (size_t)id.getDigest64(); + return std::hash{}(id); } #endif // LL_LLUUID_H diff --git a/indra/llprimitive/llmaterialid.h b/indra/llprimitive/llmaterialid.h index bd6256d961..41dd5a8710 100644 --- a/indra/llprimitive/llmaterialid.h +++ b/indra/llprimitive/llmaterialid.h @@ -67,15 +67,11 @@ public: static const LLMaterialID null; - // Returns a 64 bits digest of the material Id, by XORing its two 64 bits - // long words. HB - inline U64 getDigest64() const - { - U64* tmp = (U64*)mID; - return tmp[0] ^ tmp[1]; - } - private: + // definitions follow class + friend std::hash; + friend size_t hash_value(const LLMaterialID&) noexcept; + void parseFromBinary(const LLSD::Binary& pMaterialID); void copyFromOtherMaterialID(const LLMaterialID& pOtherMaterialID); int compareToOtherMaterialID(const LLMaterialID& pOtherMaterialID) const; @@ -90,15 +86,27 @@ namespace std { inline size_t operator()(const LLMaterialID& id) const noexcept { - return (size_t)id.getDigest64(); + size_t h = 0; + // Golden ratio hash with avalanche mixing + // Process 8 bytes at a time by manually constructing 64-bit values + // Shift by 31: mixes upper half into lower half for better bit distribution + // Shift by 47: ensures highest bits influence final hash output + for (int i = 0; i < MATERIAL_ID_SIZE; i += 8) { + size_t chunk = (size_t)id.mID[i] | ((size_t)id.mID[i + 1] << 8) | + ((size_t)id.mID[i+2] << 16) | ((size_t)id.mID[i+3] << 24) | + ((size_t)id.mID[i+4] << 32) | ((size_t)id.mID[i+5] << 40) | + ((size_t)id.mID[i + 6] << 48) | ((size_t)id.mID[i + 7] << 56); + h ^= (chunk * 0x9e3779b97f4a7c15ULL) ^ (h >> 31) ^ (h >> 47); + } + return h; } }; } -// For use with boost containers. +// For use with boost::container_hash inline size_t hash_value(const LLMaterialID& id) noexcept { - return (size_t)id.getDigest64(); + return std::hash{}(id); } #endif // LL_LLMATERIALID_H diff --git a/indra/llrender/llfontfreetype.h b/indra/llrender/llfontfreetype.h index a9b3a944ee..f7600e40a3 100644 --- a/indra/llrender/llfontfreetype.h +++ b/indra/llrender/llfontfreetype.h @@ -27,13 +27,14 @@ #ifndef LL_LLFONTFREETYPE_H #define LL_LLFONTFREETYPE_H -#include #include "llpointer.h" #include "llstl.h" #include "llimagegl.h" #include "llfontbitmapcache.h" +#include + // Hack. FT_Face is just a typedef for a pointer to a struct, // but there's no simple forward declarations file for FreeType, // and the main include file is 200K. @@ -184,7 +185,7 @@ private: fallback_font_vector_t mFallbackFonts; // A list of fallback fonts to look for glyphs in (for Unicode chars) // *NOTE: the same glyph can be present with multiple representations (but the pointer is always unique) - typedef boost::unordered_multimap char_glyph_info_map_t; + typedef std::unordered_multimap char_glyph_info_map_t; mutable char_glyph_info_map_t mCharGlyphInfoMap; // Information about glyph location in bitmap mutable LLFontBitmapCache* mFontBitmapCachep; diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index d13b98e274..4584ed1d86 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -2376,7 +2376,7 @@ void clear_glerror() // // Static members -boost::unordered_map LLGLState::sStateMap; +std::unordered_map LLGLState::sStateMap; GLboolean LLGLDepthTest::sDepthEnabled = GL_FALSE; // OpenGL default GLenum LLGLDepthTest::sDepthFunc = GL_LESS; // OpenGL default @@ -2419,7 +2419,7 @@ void LLGLState::resetTextureStates() void LLGLState::dumpStates() { LL_INFOS("RenderState") << "GL States:" << LL_ENDL; - for (boost::unordered_map::iterator iter = sStateMap.begin(); + for (std::unordered_map::iterator iter = sStateMap.begin(); iter != sStateMap.end(); ++iter) { LL_INFOS("RenderState") << llformat(" 0x%04x : %s",(S32)iter->first,iter->second?"true":"false") << LL_ENDL; @@ -2451,7 +2451,7 @@ void LLGLState::checkStates(GLboolean writeAlpha) //llassert_always(colorMask[2]); // llassert_always(colorMask[3] == writeAlpha); - for (boost::unordered_map::iterator iter = sStateMap.begin(); + for (std::unordered_map::iterator iter = sStateMap.begin(); iter != sStateMap.end(); ++iter) { LLGLenum state = iter->first; diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h index d19825d9ca..e1ab2a49e6 100644 --- a/indra/llrender/llgl.h +++ b/indra/llrender/llgl.h @@ -31,7 +31,7 @@ #include #include -#include +#include #include #include "llerror.h" @@ -246,7 +246,7 @@ public: static void checkStates(GLboolean writeAlpha = GL_TRUE); protected: - static boost::unordered_map sStateMap; + static std::unordered_map sStateMap; public: enum { CURRENT_STATE = -2, DISABLED_STATE = 0, ENABLED_STATE = 1 }; diff --git a/indra/newview/llmaterialmgr.h b/indra/newview/llmaterialmgr.h index 1279b77ad4..c04f874923 100644 --- a/indra/newview/llmaterialmgr.h +++ b/indra/newview/llmaterialmgr.h @@ -33,9 +33,42 @@ #include "httprequest.h" #include "httpheaders.h" #include "httpoptions.h" +#include class LLViewerRegion; +// struct for TE-specific material ID query +class TEMaterialPair +{ +public: + U32 te; + LLMaterialID materialID; + + bool operator==(const TEMaterialPair& b) const { return (materialID == b.materialID) && (te == b.te); } +}; + +inline bool operator<(const TEMaterialPair& lhs, const TEMaterialPair& rhs) +{ + return (lhs.te < rhs.te) ? true : (lhs.materialID < rhs.materialID); +} + +// std::hash implementation for TEMaterialPair +namespace std +{ + template<> + struct hash + { + inline size_t operator()(const TEMaterialPair& p) const noexcept + { + // Utilize boost::hash_combine to generate a good hash + size_t seed = 0; + boost::hash_combine(seed, p.te + 1); + boost::hash_combine(seed, p.materialID); + return seed; + } + }; +} // namespace std + class LLMaterialMgr : public LLSingleton { LLSINGLETON(LLMaterialMgr); @@ -83,29 +116,6 @@ private: void onRegionRemoved(LLViewerRegion* regionp); private: - // struct for TE-specific material ID query - class TEMaterialPair - { - public: - - U32 te; - LLMaterialID materialID; - - bool operator==(const TEMaterialPair& b) const { return (materialID == b.materialID) && (te == b.te); } - }; - - // definitions follow class - friend std::hash; - friend size_t hash_value(const TEMaterialPair&) noexcept; - - friend inline bool operator<( - const LLMaterialMgr::TEMaterialPair& lhs, - const LLMaterialMgr::TEMaterialPair& rhs) - { - return (lhs.te < rhs.te) ? true : - (lhs.materialID < rhs.materialID); - } - typedef std::set material_queue_t; typedef std::map get_queue_t; typedef std::pair pending_material_t; @@ -113,7 +123,7 @@ private: typedef std::map get_callback_map_t; - typedef boost::unordered_map get_callback_te_map_t; + typedef std::unordered_map get_callback_te_map_t; typedef std::set getall_queue_t; typedef std::map getall_pending_map_t; typedef std::map getall_callback_map_t; @@ -142,23 +152,5 @@ private: U32 getMaxEntries(const LLViewerRegion* regionp); }; -// std::hash implementation for TEMaterialPair -namespace std -{ - template<> struct hash - { - inline size_t operator()(const LLMaterialMgr::TEMaterialPair& p) const noexcept - { - return size_t((p.te + 1) * p.materialID.getDigest64()); - } - }; -} - -// For use with boost containers. -inline size_t hash_value(const LLMaterialMgr::TEMaterialPair& p) noexcept -{ - return size_t((p.te + 1) * p.materialID.getDigest64()); -} - #endif // LL_LLMATERIALMGR_H diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h index 56ad8297c7..061b4b5428 100644 --- a/indra/newview/llmeshrepository.h +++ b/indra/newview/llmeshrepository.h @@ -442,7 +442,7 @@ public: LLCondition* mSignal; //map of known mesh headers - typedef boost::unordered_map mesh_header_map; // pair is header_size and data + typedef std::unordered_map mesh_header_map; // pair is header_size and data mesh_header_map mMeshHeader; class HeaderRequest : public RequestStats diff --git a/indra/newview/llperfstats.h b/indra/newview/llperfstats.h index 1a2098ec7e..38deb87237 100644 --- a/indra/newview/llperfstats.h +++ b/indra/newview/llperfstats.h @@ -223,7 +223,7 @@ namespace LLPerfStats static void updateMeanFrameTime(U64 tot_frame_time_raw); // StatsArray is a uint64_t for each possible statistic type. using StatsArray = std::array(LLPerfStats::StatType_t::STATS_COUNT)>; - using StatsMap = std::unordered_map>; + using StatsMap = std::unordered_map; using StatsTypeMatrix = std::array(LLPerfStats::ObjType_t::OT_COUNT)>; using StatsSummaryArray = std::array(LLPerfStats::ObjType_t::OT_COUNT)>; diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 5af6a41c11..f88f49d8d7 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -140,7 +140,7 @@ #include "llwindow.h" #include "llpathfindingmanager.h" #include "llstartup.h" -#include "boost/unordered_map.hpp" +#include #include #include #include @@ -153,7 +153,7 @@ using namespace LLAvatarAppearanceDefines; typedef LLPointer LLViewerObjectPtr; -static boost::unordered_map sDefaultItemLabels; +static std::unordered_map sDefaultItemLabels; LLVOAvatar* find_avatar_from_object(LLViewerObject* object); LLVOAvatar* find_avatar_from_object(const LLUUID& object_id); @@ -2965,7 +2965,7 @@ void handle_object_show_original() static void init_default_item_label(LLUICtrl* ctrl) { const std::string& item_name = ctrl->getName(); - boost::unordered_map::iterator it = sDefaultItemLabels.find(item_name); + std::unordered_map::iterator it = sDefaultItemLabels.find(item_name); if (it == sDefaultItemLabels.end()) { // *NOTE: This will not work for items of type LLMenuItemCheckGL because they return boolean value @@ -2981,7 +2981,7 @@ static void init_default_item_label(LLUICtrl* ctrl) static LLStringExplicit get_default_item_label(const std::string& item_name) { LLStringExplicit res(""); - boost::unordered_map::iterator it = sDefaultItemLabels.find(item_name); + std::unordered_map::iterator it = sDefaultItemLabels.find(item_name); if (it != sDefaultItemLabels.end()) { res = it->second; diff --git a/indra/newview/llviewerprecompiledheaders.h b/indra/newview/llviewerprecompiledheaders.h index f6ee00cb25..d33d426769 100644 --- a/indra/newview/llviewerprecompiledheaders.h +++ b/indra/newview/llviewerprecompiledheaders.h @@ -126,8 +126,6 @@ #include "llfloater.h" #include -#include -#include #include #include "glm/glm.hpp" -- cgit v1.3 From b5a57a7c283d50001ec5ae221e9cb9ecd061c975 Mon Sep 17 00:00:00 2001 From: Rye Date: Sun, 11 Jan 2026 13:09:42 -0500 Subject: Reduce tens of thousands of recursive calls during menu initialization --- indra/newview/llviewermenu.cpp | 17 ++++++----------- indra/newview/llviewerwindow.cpp | 6 ++---- indra/newview/llviewerwindow.h | 6 ++++++ 3 files changed, 14 insertions(+), 15 deletions(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index f88f49d8d7..1b496ccd27 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -413,7 +413,7 @@ static LLSLMMenuUpdater* gSLMMenuUpdater = NULL; LLSLMMenuUpdater::LLSLMMenuUpdater() { - mMarketplaceListingsItem = gMenuHolder->getChild("MarketplaceListings")->getHandle(); + mMarketplaceListingsItem = gMenuHolder->getChild("Me")->getChild("MarketplaceListings")->getHandle(); } void LLSLMMenuUpdater::setMerchantMenu() { @@ -551,7 +551,7 @@ void init_menus() color = LLUIColorTable::instance().getColor( "MenuNonProductionBgColor" ); } - LLView* menu_bar_holder = gViewerWindow->getRootView()->getChildView("menu_bar_holder"); + LLView* menu_bar_holder = gViewerWindow->getMainView()->findChildView("menu_stack")->findChildView("status_bar_container")->getChildView("menu_bar_holder"); gMenuBarView = LLUICtrlFactory::getInstance()->createFromFile("menu_viewer.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); gMenuBarView->setRect(LLRect(0, menu_bar_holder->getRect().mTop, 0, menu_bar_holder->getRect().mTop - MENU_BAR_HEIGHT)); @@ -565,8 +565,10 @@ void init_menus() // *TODO:Also fix cost in llfolderview.cpp for Inventory menus const std::string sound_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getSoundUploadCost()); const std::string animation_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getAnimationUploadCost()); - gMenuHolder->childSetLabelArg("Upload Sound", "[COST]", sound_upload_cost_str); - gMenuHolder->childSetLabelArg("Upload Animation", "[COST]", animation_upload_cost_str); + + LLView* main_upload_menu = gMenuHolder->findChild("Upload"); + main_upload_menu->findChild("Upload Sound")->setLabelArg("[COST]", sound_upload_cost_str); + main_upload_menu->findChild("Upload Animation")->setLabelArg("[COST]", animation_upload_cost_str); gAttachSubMenu = gMenuBarView->findChildMenuByName("Attach Object", true); gDetachSubMenu = gMenuBarView->findChildMenuByName("Detach Object", true); @@ -574,13 +576,6 @@ void init_menus() gDetachAvatarMenu = gMenuHolder->getChild("Avatar Detach", true); gDetachHUDAvatarMenu = gMenuHolder->getChild("Avatar Detach HUD", true); - // Don't display the Memory console menu if the feature is turned off - LLMenuItemCheckGL *memoryMenu = gMenuBarView->getChild("Memory", true); - if (memoryMenu) - { - memoryMenu->setVisible(false); - } - gMenuBarView->createJumpKeys(); // Let land based option enable when parcel changes diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index ee7b1fb693..725178c1b9 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2075,10 +2075,6 @@ void LLViewerWindow::initGLDefaults() gBox.prerender(); } -struct MainPanel : public LLPanel -{ -}; - void LLViewerWindow::initBase() { S32 height = getWindowHeightScaled(); @@ -2117,6 +2113,8 @@ void LLViewerWindow::initBase() main_view->setShape(full_window); getRootView()->addChild(main_view); + mMainView = main_view; + // placeholder widget that controls where "world" is rendered mWorldViewPlaceholder = main_view->getChildView("world_view_rect")->getHandle(); mPopupView = main_view->getChild("popup_holder"); diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index f3c7ef3289..da2371f6fe 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -144,6 +144,10 @@ private: }; +struct MainPanel : public LLPanel +{ +}; + static const U32 MAX_SNAPSHOT_IMAGE_SIZE = 7680; // max snapshot image size 7680 * 7680 UHDTV2 class LLViewerWindow : public LLWindowCallbacks @@ -248,6 +252,7 @@ public: // ACCESSORS // LLRootView* getRootView() const; + MainPanel* getMainView() const { return mMainView; } // 3D world area in scaled pixels (via UI scale), use for most UI computations LLRect getWorldViewRectScaled() const; @@ -501,6 +506,7 @@ private: LLRect mWorldViewRectRaw; // area of screen for 3D world LLRect mWorldViewRectScaled; // area of screen for 3D world scaled by UI size LLRootView* mRootView; // a view of size mWindowRectRaw, containing all child views + MainPanel* mMainView; // a view of size mWindowRectRaw, directly containing the base elements of the ui tree LLView* mFloaterSnapRegion = nullptr; LLView* mNavBarContainer = nullptr; LLPanel* mStatusBarContainer = nullptr; -- cgit v1.3 From 0b2f7fcc6b67f629b41a804f77214d51497127a7 Mon Sep 17 00:00:00 2001 From: Rye Date: Mon, 12 Jan 2026 18:33:39 -0500 Subject: Address feedback from review Move LLSD string->real conversion function to shared impl and utilize in xml parsing Introducing additional error handling to menu init Cleanup comments and trace tagging Remove dead Memory menu entry --- indra/llcommon/llsd.cpp | 29 +++++---- indra/llcommon/llsd.h | 2 + indra/llcommon/llsdserialize_xml.cpp | 37 ++++-------- indra/newview/llinventorymodel.cpp | 2 +- indra/newview/llviewermenu.cpp | 69 ++++++++++++++++++++-- indra/newview/skins/default/xui/en/menu_viewer.xml | 12 ---- 6 files changed, 95 insertions(+), 56 deletions(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/llcommon/llsd.cpp b/indra/llcommon/llsd.cpp index 6bc2841081..ce39bc7af3 100644 --- a/indra/llcommon/llsd.cpp +++ b/indra/llcommon/llsd.cpp @@ -351,18 +351,7 @@ namespace LLSD::Real ImplString::asReal() const { - F64 v = 0.0; - boost::iostreams::stream i_stream(mValue.data(), mValue.size()); - i_stream >> v; - - // we would probably like to ignore all trailing whitespace as - // well, but for now, simply eat the next character, and make - // sure we reached the end of the string. - // *NOTE: gcc 2.95 does not generate an eof() event on the - // stream operation above, so we manually get here to force it - // across platforms. - int c = i_stream.get(); - return ((EOF ==c) ? v : 0.0); + return llsd::string_to_real(mValue); } @@ -1264,6 +1253,22 @@ LLSD::reverse_array_iterator LLSD::rendArray() { return makeArray(impl) namespace llsd { +LLSD::Real string_to_real(std::string_view in_string) +{ + LLSD::Real v = 0.0; + boost::iostreams::stream i_stream(in_string.data(), in_string.size()); + i_stream >> v; + + // we would probably like to ignore all trailing whitespace as + // well, but for now, simply eat the next character, and make + // sure we reached the end of the string. + // *NOTE: gcc 2.95 does not generate an eof() event on the + // stream operation above, so we manually get here to force it + // across platforms. + int c = i_stream.get(); + return ((EOF == c) ? v : 0.0); +} + U32 allocationCount() { return LLSD::Impl::sAllocationCount; } U32 outstandingCount() { return LLSD::Impl::sOutstandingCount; } diff --git a/indra/llcommon/llsd.h b/indra/llcommon/llsd.h index c62f2ef1ca..afe35a65ba 100644 --- a/indra/llcommon/llsd.h +++ b/indra/llcommon/llsd.h @@ -545,6 +545,8 @@ LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLSD& llsd); namespace llsd { + // Used by LLSD::ImplString to convert string type to real + LLSD::Real string_to_real(std::string_view in_string); #ifdef LLSD_DEBUG_INFO /** @name Unit Testing Interface */ diff --git a/indra/llcommon/llsdserialize_xml.cpp b/indra/llcommon/llsdserialize_xml.cpp index c28efa3aad..f399c51608 100644 --- a/indra/llcommon/llsdserialize_xml.cpp +++ b/indra/llcommon/llsdserialize_xml.cpp @@ -712,7 +712,7 @@ void LLSDXMLParser::Impl::endElementHandler(const XML_Char* name) case ELEMENT_KEY: mCurrentKey = std::move(mCurrentContent); // This is safe to move as we are in the end element handler - mCurrentContent.clear(); // Clear to reset to valid state + mCurrentContent.clear(); // Ensure mCurrentContent is empty for subsequent use return; default: @@ -745,38 +745,21 @@ void LLSDXMLParser::Impl::endElementHandler(const XML_Char* name) } else { - // This implementation is copied from llsd.cpp - F64 v = 0.0; - boost::iostreams::stream i_stream(mCurrentContent.data(), mCurrentContent.size()); - i_stream >> v; - - // we would probably like to ignore all trailing whitespace as - // well, but for now, simply eat the next character, and make - // sure we reached the end of the string. - // *NOTE: gcc 2.95 does not generate an eof() event on the - // stream operation above, so we manually get here to force it - // across platforms. - int c = i_stream.get(); - value = (int)((EOF == c) ? v : 0.0); + // This must treat "1.23" not as an error, but as a number, which is + // then truncated down to an integer. Hence, this code doesn't call + // std::istringstream::operator>>(int&), which would not consume the + // ".23" portion. + + // Utilizes implementation used internally by LLSD::ImplString::asInteger + value = (int)llsd::string_to_real(mCurrentContent); } } break; case ELEMENT_REAL: { - // This implementation is copied from llsd.cpp - F64 v = 0.0; - boost::iostreams::stream i_stream(mCurrentContent.data(), mCurrentContent.size()); - i_stream >> v; - - // we would probably like to ignore all trailing whitespace as - // well, but for now, simply eat the next character, and make - // sure we reached the end of the string. - // *NOTE: gcc 2.95 does not generate an eof() event on the - // stream operation above, so we manually get here to force it - // across platforms. - int c = i_stream.get(); - value = ((EOF == c) ? v : 0.0); + // Utilizes implementation used internally by LLSD::ImplString::asReal + value = llsd::string_to_real(mCurrentContent); // removed since this breaks when locale has decimal separator that isn't '.' // investigated changing local to something compatible each time but deemed higher diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index e80c506bc0..c2f9c483c0 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -3456,7 +3456,7 @@ bool LLInventoryModel::loadFromFile(const std::string& filename, } { - LL_PROFILE_ZONE_NAMED("inventory load from file - categories"); + LL_PROFILE_ZONE_NAMED("inventory load from file - items"); const LLSD& llsd_items = inventory["items"]; if (llsd_items.isArray()) { diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 1b496ccd27..5799e23ca5 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -413,7 +413,23 @@ static LLSLMMenuUpdater* gSLMMenuUpdater = NULL; LLSLMMenuUpdater::LLSLMMenuUpdater() { - mMarketplaceListingsItem = gMenuHolder->getChild("Me")->getChild("MarketplaceListings")->getHandle(); + LLView* me_menu = gMenuHolder->findChild("Me"); + if (!me_menu) + { + LLError::LLUserWarningMsg::showMissingFiles(); + LL_ERRS() << "Can't find 'Me' menu in 'menu_viewer'" << LL_ENDL; + return; + } + + LLView* marketplace_listings = me_menu->findChild("MarketplaceListings"); + if (!marketplace_listings) + { + LLError::LLUserWarningMsg::showMissingFiles(); + LL_ERRS() << "Can't find 'MarketplaceListings' in 'Me' menu" << LL_ENDL; + return; + } + + mMarketplaceListingsItem = marketplace_listings->getHandle(); } void LLSLMMenuUpdater::setMerchantMenu() { @@ -551,7 +567,29 @@ void init_menus() color = LLUIColorTable::instance().getColor( "MenuNonProductionBgColor" ); } - LLView* menu_bar_holder = gViewerWindow->getMainView()->findChildView("menu_stack")->findChildView("status_bar_container")->getChildView("menu_bar_holder"); + LLView* menu_stack = gViewerWindow->getMainView()->findChildView("menu_stack"); + if (!menu_stack) + { + LLError::LLUserWarningMsg::showMissingFiles(); + LL_ERRS() << "Can't find menu_stack in main_view" << LL_ENDL; + return; + } + + LLView* status_bar_container = menu_stack->findChildView("status_bar_container"); + if (!status_bar_container) + { + LLError::LLUserWarningMsg::showMissingFiles(); + LL_ERRS() << "Can't find status_bar_container in main_view" << LL_ENDL; + return; + } + + LLView* menu_bar_holder = status_bar_container->findChildView("menu_bar_holder"); + if (!menu_bar_holder) + { + LLError::LLUserWarningMsg::showMissingFiles(); + LL_ERRS() << "Can't find status_bar_container in main_view" << LL_ENDL; + return; + } gMenuBarView = LLUICtrlFactory::getInstance()->createFromFile("menu_viewer.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); gMenuBarView->setRect(LLRect(0, menu_bar_holder->getRect().mTop, 0, menu_bar_holder->getRect().mTop - MENU_BAR_HEIGHT)); @@ -567,8 +605,31 @@ void init_menus() const std::string animation_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getAnimationUploadCost()); LLView* main_upload_menu = gMenuHolder->findChild("Upload"); - main_upload_menu->findChild("Upload Sound")->setLabelArg("[COST]", sound_upload_cost_str); - main_upload_menu->findChild("Upload Animation")->setLabelArg("[COST]", animation_upload_cost_str); + if (!main_upload_menu) + { + LLError::LLUserWarningMsg::showMissingFiles(); + LL_ERRS() << "Can't find 'Upload' menu in 'menu_viewer'" << LL_ENDL; + return; + } + + LLView* upload_sound = main_upload_menu->findChild("Upload Sound"); + if (!upload_sound) + { + LLError::LLUserWarningMsg::showMissingFiles(); + LL_ERRS() << "Can't find 'Upload Sound' menu item in 'Upload' menu" << LL_ENDL; + return; + } + upload_sound->setLabelArg("[COST]", sound_upload_cost_str); + + LLView* upload_anim = main_upload_menu->findChild("Upload Animation"); + if (!upload_anim) + { + LLError::LLUserWarningMsg::showMissingFiles(); + LL_ERRS() << "Can't find 'Upload Animation' menu item in 'Upload' menu" << LL_ENDL; + return; + } + upload_anim->setLabelArg("[COST]", animation_upload_cost_str); + gAttachSubMenu = gMenuBarView->findChildMenuByName("Attach Object", true); gDetachSubMenu = gMenuBarView->findChildMenuByName("Detach Object", true); diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index c93cb7822e..ba43e80eda 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -2600,18 +2600,6 @@ function="World.EnvPreset" function="Advanced.ToggleConsole" parameter="fast timers" /> - - - - -- cgit v1.3 From 2c0729cf07dd808070bc29319d30bee45240bc6a Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Wed, 6 Nov 2024 11:48:35 +0100 Subject: #2997 The 'Reset Skeleton' option is missing in the right-click menu --- indra/newview/llviewermenu.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index abaf813530..27185cb69f 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -6666,11 +6666,8 @@ class LLAvatarEnableResetSkeleton : public view_listener_t { bool handleEvent(const LLSD& userdata) { - if (LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject())) - { - return true; - } - return false; + LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); + return obj && obj->getAvatar(); } }; -- cgit v1.3 From b4a6af57a667d355e7347f1a3c13173b44b361ff Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Fri, 30 Jan 2026 06:51:22 +0200 Subject: #2997 Fix Reset Skeleton not working on animesh objects --- indra/newview/llviewermenu.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 27185cb69f..c9f10d845f 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -8712,6 +8712,12 @@ LLVOAvatar* find_avatar_from_object(LLViewerObject* object) } else if( !object->isAvatar() ) { + // Check for animesh objects (animated objects with a control avatar) + LLVOAvatar* avatar = object->getAvatar(); + if (avatar) + { + return avatar; + } object = NULL; } } -- cgit v1.3 From deec7b6c071caa7bcd3c8bb56903e1da21c35bf5 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> Date: Wed, 11 Feb 2026 06:14:36 +0200 Subject: #5404 Allow adding to favorites directly from the avatar --- indra/newview/llinventoryfunctions.cpp | 2 +- indra/newview/llviewermenu.cpp | 71 ++++++++++++++++++++++ .../skins/default/xui/en/menu_attachment_self.xml | 22 +++++++ 3 files changed, 94 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 458ea24d33..7522ea4907 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -2555,7 +2555,7 @@ bool get_is_favorite(const LLUUID& obj_id) return obj && obj->getIsFavorite(); } - return object->getIsFavorite(); + return object && object->getIsFavorite(); } void set_favorite(const LLUUID& obj_id, bool favorite) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 5799e23ca5..597292fac5 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -3017,6 +3017,40 @@ void handle_object_show_original() show_item_original(object->getAttachmentItemID()); } +void handle_object_set_favorite(const LLSD& userdata) +{ + LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); + if (!object) + { + return; + } + LLViewerObject *parent = (LLViewerObject*)object->getParent(); + while (parent) + { + if(parent->isAvatar()) + { + break; + } + object = parent; + parent = (LLViewerObject*)parent->getParent(); + } + if (!object || object->isAvatar()) + { + return; + } + + LLUUID item_id = gInventory.getLinkedItemID(object->getAttachmentItemID()); + + std::string action = userdata.asString(); + if (action == "Add") + { + set_favorite(item_id, true); + } + if (action == "Remove") + { + set_favorite(item_id, false); + } +} static void init_default_item_label(LLUICtrl* ctrl) { @@ -3073,6 +3107,41 @@ bool enable_object_touch(LLUICtrl* ctrl) return new_value; }; +bool enable_object_favorite(const LLSD& userdata) +{ + LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); + if (!object) + { + return false; + } + LLViewerObject* parent = (LLViewerObject*)object->getParent(); + while (parent) + { + if (parent->isAvatar()) + { + break; + } + object = parent; + parent = (LLViewerObject*)parent->getParent(); + } + if (!object || object->isAvatar()) + { + return false; + } + + std::string action = userdata.asString(); + LLUUID item_id = gInventory.getLinkedItemID(object->getAttachmentItemID()); + if (action == "Add") + { + return !get_is_favorite(item_id); + } + if (action == "Remove") + { + return get_is_favorite(item_id); + } + return false; +} + //void label_touch(std::string& label, void*) //{ // LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(); @@ -10170,6 +10239,7 @@ void initialize_menus() view_listener_t::addMenu(new LLObjectBuild(), "Object.Build"); commit.add("Object.Touch", boost::bind(&handle_object_touch)); commit.add("Object.ShowOriginal", boost::bind(&handle_object_show_original)); + commit.add("Object.SetFavorite", boost::bind(&handle_object_set_favorite, _2)); commit.add("Object.SitOrStand", boost::bind(&handle_object_sit_or_stand)); commit.add("Object.Delete", boost::bind(&handle_object_delete)); view_listener_t::addMenu(new LLObjectAttachToAvatar(true), "Object.AttachToAvatar"); @@ -10198,6 +10268,7 @@ void initialize_menus() enable.add("Object.EnableEditGLTFMaterial", boost::bind(&enable_object_edit_gltf_material)); enable.add("Object.EnableOpen", boost::bind(&enable_object_open)); enable.add("Object.EnableTouch", boost::bind(&enable_object_touch, _1)); + enable.add("Object.EnableFavorites", boost::bind(&enable_object_favorite, _2)); enable.add("Object.EnableDelete", boost::bind(&enable_object_delete)); enable.add("Object.EnableWear", boost::bind(&object_is_wearable)); diff --git a/indra/newview/skins/default/xui/en/menu_attachment_self.xml b/indra/newview/skins/default/xui/en/menu_attachment_self.xml index d978619355..c9adf46ad7 100644 --- a/indra/newview/skins/default/xui/en/menu_attachment_self.xml +++ b/indra/newview/skins/default/xui/en/menu_attachment_self.xml @@ -48,6 +48,28 @@ + + + + + + + + -- cgit v1.3 From 44c66308389380344b5f598989ca9d1401516c3f Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Tue, 17 Feb 2026 00:07:40 +0200 Subject: #5419 remove old unused floater --- indra/newview/CMakeLists.txt | 10 - indra/newview/llfloaterbigpreview.cpp | 110 ------ indra/newview/llfloaterbigpreview.h | 54 --- indra/newview/llfloaterpostprocess.cpp | 229 ----------- indra/newview/llfloaterpostprocess.h | 72 ---- indra/newview/llfloatersounddevices.cpp | 86 ----- indra/newview/llfloatersounddevices.h | 49 --- indra/newview/llfloatervoiceeffect.cpp | 289 -------------- indra/newview/llfloatervoiceeffect.h | 72 ---- indra/newview/llpanelvoiceeffect.cpp | 165 -------- indra/newview/llpanelvoiceeffect.h | 67 ---- indra/newview/llviewerfloaterreg.cpp | 10 - indra/newview/llviewermenu.cpp | 12 - .../skins/default/xui/da/floater_sound_devices.xml | 7 - .../skins/default/xui/da/floater_voice_effect.xml | 30 -- .../skins/default/xui/da/panel_voice_effect.xml | 15 - .../skins/default/xui/de/floater_big_preview.xml | 2 - .../skins/default/xui/de/floater_post_process.xml | 53 --- .../skins/default/xui/de/floater_sound_devices.xml | 7 - .../skins/default/xui/de/floater_voice_effect.xml | 159 -------- .../skins/default/xui/de/panel_voice_effect.xml | 15 - .../skins/default/xui/en/floater_big_preview.xml | 25 -- .../skins/default/xui/en/floater_post_process.xml | 426 --------------------- .../skins/default/xui/en/floater_sound_devices.xml | 48 --- .../skins/default/xui/en/floater_voice_effect.xml | 162 -------- .../skins/default/xui/en/panel_voice_effect.xml | 33 -- .../skins/default/xui/es/floater_big_preview.xml | 2 - .../skins/default/xui/es/floater_post_process.xml | 53 --- .../skins/default/xui/es/floater_sound_devices.xml | 7 - .../skins/default/xui/es/floater_voice_effect.xml | 138 ------- .../skins/default/xui/es/panel_voice_effect.xml | 15 - .../skins/default/xui/fr/floater_big_preview.xml | 2 - .../skins/default/xui/fr/floater_post_process.xml | 54 --- .../skins/default/xui/fr/floater_sound_devices.xml | 7 - .../skins/default/xui/fr/floater_voice_effect.xml | 159 -------- .../skins/default/xui/fr/panel_voice_effect.xml | 15 - .../skins/default/xui/it/floater_big_preview.xml | 2 - .../skins/default/xui/it/floater_post_process.xml | 53 --- .../skins/default/xui/it/floater_sound_devices.xml | 7 - .../skins/default/xui/it/floater_voice_effect.xml | 159 -------- .../skins/default/xui/it/panel_voice_effect.xml | 15 - .../skins/default/xui/ja/floater_big_preview.xml | 2 - .../skins/default/xui/ja/floater_post_process.xml | 53 --- .../skins/default/xui/ja/floater_sound_devices.xml | 7 - .../skins/default/xui/ja/floater_voice_effect.xml | 159 -------- .../skins/default/xui/ja/panel_voice_effect.xml | 15 - .../skins/default/xui/pl/floater_big_preview.xml | 2 - .../skins/default/xui/pl/floater_post_process.xml | 49 --- .../skins/default/xui/pl/floater_sound_devices.xml | 7 - .../skins/default/xui/pl/floater_voice_effect.xml | 98 ----- .../skins/default/xui/pl/panel_voice_effect.xml | 15 - .../skins/default/xui/pt/floater_big_preview.xml | 2 - .../skins/default/xui/pt/floater_post_process.xml | 53 --- .../skins/default/xui/pt/floater_sound_devices.xml | 7 - .../skins/default/xui/pt/floater_voice_effect.xml | 159 -------- .../skins/default/xui/pt/panel_voice_effect.xml | 15 - .../skins/default/xui/ru/floater_big_preview.xml | 2 - .../skins/default/xui/ru/floater_post_process.xml | 53 --- .../skins/default/xui/ru/floater_sound_devices.xml | 7 - .../skins/default/xui/ru/floater_voice_effect.xml | 159 -------- .../skins/default/xui/ru/panel_voice_effect.xml | 15 - .../skins/default/xui/tr/floater_big_preview.xml | 2 - .../skins/default/xui/tr/floater_post_process.xml | 53 --- .../skins/default/xui/tr/floater_sound_devices.xml | 7 - .../skins/default/xui/tr/floater_voice_effect.xml | 159 -------- .../skins/default/xui/tr/panel_voice_effect.xml | 15 - .../skins/default/xui/zh/floater_big_preview.xml | 2 - .../skins/default/xui/zh/floater_post_process.xml | 53 --- .../skins/default/xui/zh/floater_sound_devices.xml | 7 - .../skins/default/xui/zh/floater_voice_effect.xml | 159 -------- .../skins/default/xui/zh/panel_voice_effect.xml | 15 - 71 files changed, 4246 deletions(-) delete mode 100644 indra/newview/llfloaterbigpreview.cpp delete mode 100644 indra/newview/llfloaterbigpreview.h delete mode 100644 indra/newview/llfloaterpostprocess.cpp delete mode 100644 indra/newview/llfloaterpostprocess.h delete mode 100644 indra/newview/llfloatersounddevices.cpp delete mode 100644 indra/newview/llfloatersounddevices.h delete mode 100644 indra/newview/llfloatervoiceeffect.cpp delete mode 100644 indra/newview/llfloatervoiceeffect.h delete mode 100644 indra/newview/llpanelvoiceeffect.cpp delete mode 100644 indra/newview/llpanelvoiceeffect.h delete mode 100644 indra/newview/skins/default/xui/da/floater_sound_devices.xml delete mode 100644 indra/newview/skins/default/xui/da/floater_voice_effect.xml delete mode 100644 indra/newview/skins/default/xui/da/panel_voice_effect.xml delete mode 100644 indra/newview/skins/default/xui/de/floater_big_preview.xml delete mode 100644 indra/newview/skins/default/xui/de/floater_post_process.xml delete mode 100644 indra/newview/skins/default/xui/de/floater_sound_devices.xml delete mode 100644 indra/newview/skins/default/xui/de/floater_voice_effect.xml delete mode 100644 indra/newview/skins/default/xui/de/panel_voice_effect.xml delete mode 100644 indra/newview/skins/default/xui/en/floater_big_preview.xml delete mode 100644 indra/newview/skins/default/xui/en/floater_post_process.xml delete mode 100644 indra/newview/skins/default/xui/en/floater_sound_devices.xml delete mode 100644 indra/newview/skins/default/xui/en/floater_voice_effect.xml delete mode 100644 indra/newview/skins/default/xui/en/panel_voice_effect.xml delete mode 100644 indra/newview/skins/default/xui/es/floater_big_preview.xml delete mode 100644 indra/newview/skins/default/xui/es/floater_post_process.xml delete mode 100644 indra/newview/skins/default/xui/es/floater_sound_devices.xml delete mode 100644 indra/newview/skins/default/xui/es/floater_voice_effect.xml delete mode 100644 indra/newview/skins/default/xui/es/panel_voice_effect.xml delete mode 100644 indra/newview/skins/default/xui/fr/floater_big_preview.xml delete mode 100644 indra/newview/skins/default/xui/fr/floater_post_process.xml delete mode 100644 indra/newview/skins/default/xui/fr/floater_sound_devices.xml delete mode 100644 indra/newview/skins/default/xui/fr/floater_voice_effect.xml delete mode 100644 indra/newview/skins/default/xui/fr/panel_voice_effect.xml delete mode 100644 indra/newview/skins/default/xui/it/floater_big_preview.xml delete mode 100644 indra/newview/skins/default/xui/it/floater_post_process.xml delete mode 100644 indra/newview/skins/default/xui/it/floater_sound_devices.xml delete mode 100644 indra/newview/skins/default/xui/it/floater_voice_effect.xml delete mode 100644 indra/newview/skins/default/xui/it/panel_voice_effect.xml delete mode 100644 indra/newview/skins/default/xui/ja/floater_big_preview.xml delete mode 100644 indra/newview/skins/default/xui/ja/floater_post_process.xml delete mode 100644 indra/newview/skins/default/xui/ja/floater_sound_devices.xml delete mode 100644 indra/newview/skins/default/xui/ja/floater_voice_effect.xml delete mode 100644 indra/newview/skins/default/xui/ja/panel_voice_effect.xml delete mode 100644 indra/newview/skins/default/xui/pl/floater_big_preview.xml delete mode 100644 indra/newview/skins/default/xui/pl/floater_post_process.xml delete mode 100644 indra/newview/skins/default/xui/pl/floater_sound_devices.xml delete mode 100644 indra/newview/skins/default/xui/pl/floater_voice_effect.xml delete mode 100644 indra/newview/skins/default/xui/pl/panel_voice_effect.xml delete mode 100644 indra/newview/skins/default/xui/pt/floater_big_preview.xml delete mode 100644 indra/newview/skins/default/xui/pt/floater_post_process.xml delete mode 100644 indra/newview/skins/default/xui/pt/floater_sound_devices.xml delete mode 100644 indra/newview/skins/default/xui/pt/floater_voice_effect.xml delete mode 100644 indra/newview/skins/default/xui/pt/panel_voice_effect.xml delete mode 100644 indra/newview/skins/default/xui/ru/floater_big_preview.xml delete mode 100644 indra/newview/skins/default/xui/ru/floater_post_process.xml delete mode 100644 indra/newview/skins/default/xui/ru/floater_sound_devices.xml delete mode 100644 indra/newview/skins/default/xui/ru/floater_voice_effect.xml delete mode 100644 indra/newview/skins/default/xui/ru/panel_voice_effect.xml delete mode 100644 indra/newview/skins/default/xui/tr/floater_big_preview.xml delete mode 100644 indra/newview/skins/default/xui/tr/floater_post_process.xml delete mode 100644 indra/newview/skins/default/xui/tr/floater_sound_devices.xml delete mode 100644 indra/newview/skins/default/xui/tr/floater_voice_effect.xml delete mode 100644 indra/newview/skins/default/xui/tr/panel_voice_effect.xml delete mode 100644 indra/newview/skins/default/xui/zh/floater_big_preview.xml delete mode 100644 indra/newview/skins/default/xui/zh/floater_post_process.xml delete mode 100644 indra/newview/skins/default/xui/zh/floater_sound_devices.xml delete mode 100644 indra/newview/skins/default/xui/zh/floater_voice_effect.xml delete mode 100644 indra/newview/skins/default/xui/zh/panel_voice_effect.xml (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 0949a3b59f..05c71f5f5d 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -197,7 +197,6 @@ set(viewer_SOURCE_FILES llfloateravatartextures.cpp llfloaterbanduration.cpp llfloaterbeacons.cpp - llfloaterbigpreview.cpp llfloaterbuildoptions.cpp llfloaterbulkpermission.cpp llfloaterbulkupload.cpp @@ -280,7 +279,6 @@ set(viewer_SOURCE_FILES llfloaterpay.cpp llfloaterperformance.cpp llfloaterperms.cpp - llfloaterpostprocess.cpp llfloaterprofile.cpp llfloaterpreference.cpp llfloaterpreferencesgraphicsadvanced.cpp @@ -305,7 +303,6 @@ set(viewer_SOURCE_FILES llfloatersidepanelcontainer.cpp llfloaterslapptest.cpp llfloatersnapshot.cpp - llfloatersounddevices.cpp llfloaterspellchecksettings.cpp llfloatertelehub.cpp llfloatertestinspectors.cpp @@ -317,7 +314,6 @@ set(viewer_SOURCE_FILES llfloatertranslationsettings.cpp llfloateruipreview.cpp llfloaterurlentry.cpp - llfloatervoiceeffect.cpp llfloatervoicevolume.cpp llfloaterwebcontent.cpp llfloaterwhitelistentry.cpp @@ -513,7 +509,6 @@ set(viewer_SOURCE_FILES llpanelsnapshotprofile.cpp llpanelteleporthistory.cpp llpaneltiptoast.cpp - llpanelvoiceeffect.cpp llpaneltopinfobar.cpp llpanelpulldown.cpp llpanelvoicedevicesettings.cpp @@ -881,7 +876,6 @@ set(viewer_HEADER_FILES llfloateravatartextures.h llfloaterbanduration.h llfloaterbeacons.h - llfloaterbigpreview.h llfloaterbuildoptions.h llfloaterbulkpermission.h llfloaterbulkupload.h @@ -968,7 +962,6 @@ set(viewer_HEADER_FILES llfloaterpay.h llfloaterperformance.h llfloaterperms.h - llfloaterpostprocess.h llfloaterprofile.h llfloaterpreference.h llfloaterpreferencesgraphicsadvanced.h @@ -993,7 +986,6 @@ set(viewer_HEADER_FILES llfloatersidepanelcontainer.h llfloaterslapptest.h llfloatersnapshot.h - llfloatersounddevices.h llfloaterspellchecksettings.h llfloatertelehub.h llfloatertestinspectors.h @@ -1005,7 +997,6 @@ set(viewer_HEADER_FILES llfloatertranslationsettings.h llfloateruipreview.h llfloaterurlentry.h - llfloatervoiceeffect.h llfloatervoicevolume.h llfloaterwebcontent.h llfloaterwhitelistentry.h @@ -1187,7 +1178,6 @@ set(viewer_HEADER_FILES llpaneltiptoast.h llpanelpulldown.h llpanelvoicedevicesettings.h - llpanelvoiceeffect.h llpaneltopinfobar.h llpanelvolume.h llpanelvolumepulldown.h diff --git a/indra/newview/llfloaterbigpreview.cpp b/indra/newview/llfloaterbigpreview.cpp deleted file mode 100644 index ba682494bb..0000000000 --- a/indra/newview/llfloaterbigpreview.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/** -* @file llfloaterbigpreview.cpp -* @brief Display of extended (big) preview for snapshots and SL Share -* @author merov@lindenlab.com -* -* $LicenseInfo:firstyear=2013&license=viewerlgpl$ -* Second Life Viewer Source Code -* Copyright (C) 2013, Linden Research, Inc. -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public -* License as published by the Free Software Foundation; -* version 2.1 of the License only. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -* -* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA -* $/LicenseInfo$ -*/ - -#include "llviewerprecompiledheaders.h" - -#include "llfloaterbigpreview.h" -#include "llsnapshotlivepreview.h" - -/////////////////////// -//LLFloaterBigPreview// -/////////////////////// - -LLFloaterBigPreview::LLFloaterBigPreview(const LLSD& key) : LLFloater(key), - mPreviewPlaceholder(NULL), - mFloaterOwner(NULL) -{ -} - -LLFloaterBigPreview::~LLFloaterBigPreview() -{ - if (mPreviewHandle.get()) - { - mPreviewHandle.get()->die(); - } -} - -void LLFloaterBigPreview::onCancel() -{ - closeFloater(); -} - -void LLFloaterBigPreview::closeOnFloaterOwnerClosing(LLFloater* floaterp) -{ - if (isFloaterOwner(floaterp)) - { - closeFloater(); - } -} - -bool LLFloaterBigPreview::postBuild() -{ - mPreviewPlaceholder = getChild("big_preview_placeholder"); - return LLFloater::postBuild(); -} - -void LLFloaterBigPreview::draw() -{ - LLFloater::draw(); - - LLSnapshotLivePreview * previewp = static_cast(mPreviewHandle.get()); - - // Display the preview if one is available - if (previewp && previewp->getBigThumbnailImage()) - { - // Get the preview rect - const LLRect& preview_rect = mPreviewPlaceholder->getRect(); - - // Get the preview texture size - S32 thumbnail_w = previewp->getBigThumbnailWidth(); - S32 thumbnail_h = previewp->getBigThumbnailHeight(); - - // Compute the scaling ratio and the size of the final texture in the rect: we want to prevent anisotropic scaling (distorted in x and y) - F32 ratio = llmax((F32)(thumbnail_w)/(F32)(preview_rect.getWidth()), (F32)(thumbnail_h)/(F32)(preview_rect.getHeight())); - thumbnail_w = (S32)((F32)(thumbnail_w)/ratio); - thumbnail_h = (S32)((F32)(thumbnail_h)/ratio); - - // Compute the preview offset within the preview rect: we want to center that preview in the available rect - const S32 local_offset_x = (preview_rect.getWidth() - thumbnail_w) / 2 ; - const S32 local_offset_y = (preview_rect.getHeight() - thumbnail_h) / 2 ; - - // Compute preview offset within the floater rect - S32 offset_x = preview_rect.mLeft + local_offset_x; - S32 offset_y = preview_rect.mBottom + local_offset_y; - - gGL.matrixMode(LLRender::MM_MODELVIEW); - // Apply floater transparency to the texture unless the floater is focused. - F32 alpha = getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency(); - LLColor4 color = LLColor4::white; - - // Draw the preview texture - gl_draw_scaled_image(offset_x, offset_y, - thumbnail_w, thumbnail_h, - previewp->getBigThumbnailImage(), color % alpha); - } -} - diff --git a/indra/newview/llfloaterbigpreview.h b/indra/newview/llfloaterbigpreview.h deleted file mode 100644 index 1d5804acf5..0000000000 --- a/indra/newview/llfloaterbigpreview.h +++ /dev/null @@ -1,54 +0,0 @@ -/** -* @file llfloaterbigpreview.h -* @brief Display of extended (big) preview for snapshots -* @author merov@lindenlab.com -* -* $LicenseInfo:firstyear=2013&license=viewerlgpl$ -* Second Life Viewer Source Code -* Copyright (C) 2013, Linden Research, Inc. -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public -* License as published by the Free Software Foundation; -* version 2.1 of the License only. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -* -* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA -* $/LicenseInfo$ -*/ -#ifndef LL_LLFLOATERBIGPREVIEW_H -#define LL_LLFLOATERBIGPREVIEW_H - -#include "llfloater.h" - -class LLFloaterBigPreview : public LLFloater -{ -public: - LLFloaterBigPreview(const LLSD& key); - ~LLFloaterBigPreview(); - - bool postBuild(); - void draw(); - void onCancel(); - - void setPreview(LLView* previewp) { mPreviewHandle = previewp->getHandle(); } - void setFloaterOwner(LLFloater* floaterp) { mFloaterOwner = floaterp; } - bool isFloaterOwner(LLFloater* floaterp) const { return (mFloaterOwner == floaterp); } - void closeOnFloaterOwnerClosing(LLFloater* floaterp); - -private: - LLHandle mPreviewHandle; - LLUICtrl* mPreviewPlaceholder; - LLFloater* mFloaterOwner; -}; - -#endif // LL_LLFLOATERBIGPREVIEW_H - diff --git a/indra/newview/llfloaterpostprocess.cpp b/indra/newview/llfloaterpostprocess.cpp deleted file mode 100644 index 616c13cdc7..0000000000 --- a/indra/newview/llfloaterpostprocess.cpp +++ /dev/null @@ -1,229 +0,0 @@ -/** - * @file llfloaterpostprocess.cpp - * @brief LLFloaterPostProcess class definition - * - * $LicenseInfo:firstyear=2007&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#include "llviewerprecompiledheaders.h" - -#include "llfloaterpostprocess.h" - -#include "llsliderctrl.h" -#include "llcheckboxctrl.h" -#include "llnotificationsutil.h" -#include "lluictrlfactory.h" -#include "llviewerdisplay.h" -#include "llpostprocess.h" -#include "llcombobox.h" -#include "lllineeditor.h" -#include "llviewerwindow.h" - - -LLFloaterPostProcess::LLFloaterPostProcess(const LLSD& key) - : LLFloater(key) -{ -} - -LLFloaterPostProcess::~LLFloaterPostProcess() -{ - - -} -bool LLFloaterPostProcess::postBuild() -{ - /// Color Filter Callbacks - childSetCommitCallback("ColorFilterToggle", &LLFloaterPostProcess::onBoolToggle, (char*)"enable_color_filter"); - //childSetCommitCallback("ColorFilterGamma", &LLFloaterPostProcess::onFloatControlMoved, &(gPostProcess->tweaks.gamma())); - childSetCommitCallback("ColorFilterBrightness", &LLFloaterPostProcess::onFloatControlMoved, (char*)"brightness"); - childSetCommitCallback("ColorFilterSaturation", &LLFloaterPostProcess::onFloatControlMoved, (char*)"saturation"); - childSetCommitCallback("ColorFilterContrast", &LLFloaterPostProcess::onFloatControlMoved, (char*)"contrast"); - - childSetCommitCallback("ColorFilterBaseR", &LLFloaterPostProcess::onColorControlRMoved, (char*)"contrast_base"); - childSetCommitCallback("ColorFilterBaseG", &LLFloaterPostProcess::onColorControlGMoved, (char*)"contrast_base"); - childSetCommitCallback("ColorFilterBaseB", &LLFloaterPostProcess::onColorControlBMoved, (char*)"contrast_base"); - childSetCommitCallback("ColorFilterBaseI", &LLFloaterPostProcess::onColorControlIMoved, (char*)"contrast_base"); - - /// Night Vision Callbacks - childSetCommitCallback("NightVisionToggle", &LLFloaterPostProcess::onBoolToggle, (char*)"enable_night_vision"); - childSetCommitCallback("NightVisionBrightMult", &LLFloaterPostProcess::onFloatControlMoved, (char*)"brightness_multiplier"); - childSetCommitCallback("NightVisionNoiseSize", &LLFloaterPostProcess::onFloatControlMoved, (char*)"noise_size"); - childSetCommitCallback("NightVisionNoiseStrength", &LLFloaterPostProcess::onFloatControlMoved, (char*)"noise_strength"); - - /// Bloom Callbacks - childSetCommitCallback("BloomToggle", &LLFloaterPostProcess::onBoolToggle, (char*)"enable_bloom"); - childSetCommitCallback("BloomExtract", &LLFloaterPostProcess::onFloatControlMoved, (char*)"extract_low"); - childSetCommitCallback("BloomSize", &LLFloaterPostProcess::onFloatControlMoved, (char*)"bloom_width"); - childSetCommitCallback("BloomStrength", &LLFloaterPostProcess::onFloatControlMoved, (char*)"bloom_strength"); - - // Effect loading and saving. - LLComboBox* comboBox = getChild("PPEffectsCombo"); - getChild("PPLoadEffect")->setCommitCallback(boost::bind(&LLFloaterPostProcess::onLoadEffect, this, comboBox)); - comboBox->setCommitCallback(boost::bind(&LLFloaterPostProcess::onChangeEffectName, this, _1)); - - LLLineEditor* editBox = getChild("PPEffectNameEditor"); - getChild("PPSaveEffect")->setCommitCallback(boost::bind(&LLFloaterPostProcess::onSaveEffect, this, editBox)); - - syncMenu(); - return true; -} - -// Bool Toggle -void LLFloaterPostProcess::onBoolToggle(LLUICtrl* ctrl, void* userData) -{ - char const * boolVariableName = (char const *)userData; - - // check the bool - LLCheckBoxCtrl* cbCtrl = static_cast(ctrl); - gPostProcess->tweaks[boolVariableName] = cbCtrl->getValue(); -} - -// Float Moved -void LLFloaterPostProcess::onFloatControlMoved(LLUICtrl* ctrl, void* userData) -{ - char const * floatVariableName = (char const *)userData; - LLSliderCtrl* sldrCtrl = static_cast(ctrl); - gPostProcess->tweaks[floatVariableName] = sldrCtrl->getValue(); -} - -// Color Moved -void LLFloaterPostProcess::onColorControlRMoved(LLUICtrl* ctrl, void* userData) -{ - char const * floatVariableName = (char const *)userData; - LLSliderCtrl* sldrCtrl = static_cast(ctrl); - gPostProcess->tweaks[floatVariableName][0] = sldrCtrl->getValue(); -} - -// Color Moved -void LLFloaterPostProcess::onColorControlGMoved(LLUICtrl* ctrl, void* userData) -{ - char const * floatVariableName = (char const *)userData; - LLSliderCtrl* sldrCtrl = static_cast(ctrl); - gPostProcess->tweaks[floatVariableName][1] = sldrCtrl->getValue(); -} - -// Color Moved -void LLFloaterPostProcess::onColorControlBMoved(LLUICtrl* ctrl, void* userData) -{ - char const * floatVariableName = (char const *)userData; - LLSliderCtrl* sldrCtrl = static_cast(ctrl); - gPostProcess->tweaks[floatVariableName][2] = sldrCtrl->getValue(); -} - -// Color Moved -void LLFloaterPostProcess::onColorControlIMoved(LLUICtrl* ctrl, void* userData) -{ - char const * floatVariableName = (char const *)userData; - LLSliderCtrl* sldrCtrl = static_cast(ctrl); - gPostProcess->tweaks[floatVariableName][3] = sldrCtrl->getValue(); -} - -void LLFloaterPostProcess::onLoadEffect(LLComboBox* comboBox) -{ - LLSD::String effectName(comboBox->getSelectedValue().asString()); - - gPostProcess->setSelectedEffect(effectName); - - syncMenu(); -} - -void LLFloaterPostProcess::onSaveEffect(LLLineEditor* editBox) -{ - std::string effectName(editBox->getValue().asString()); - - if (gPostProcess->mAllEffects.has(effectName)) - { - LLSD payload; - payload["effect_name"] = effectName; - LLNotificationsUtil::add("PPSaveEffectAlert", LLSD(), payload, boost::bind(&LLFloaterPostProcess::saveAlertCallback, this, _1, _2)); - } - else - { - gPostProcess->saveEffect(effectName); - syncMenu(); - } -} - -void LLFloaterPostProcess::onChangeEffectName(LLUICtrl* ctrl) -{ - // get the combo box and name - LLLineEditor* editBox = getChild("PPEffectNameEditor"); - - // set the parameter's new name - editBox->setValue(ctrl->getValue()); -} - -bool LLFloaterPostProcess::saveAlertCallback(const LLSD& notification, const LLSD& response) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - - // if they choose save, do it. Otherwise, don't do anything - if (option == 0) - { - gPostProcess->saveEffect(notification["payload"]["effect_name"].asString()); - - syncMenu(); - } - return false; -} - -void LLFloaterPostProcess::syncMenu() -{ - // add the combo boxe contents - LLComboBox* comboBox = getChild("PPEffectsCombo"); - - comboBox->removeall(); - - LLSD::map_const_iterator currEffect; - for(currEffect = gPostProcess->mAllEffects.beginMap(); - currEffect != gPostProcess->mAllEffects.endMap(); - ++currEffect) - { - comboBox->add(currEffect->first); - } - - // set the current effect as selected. - comboBox->selectByValue(gPostProcess->getSelectedEffect()); - - /// Sync Color Filter Menu - getChild("ColorFilterToggle")->setValue(gPostProcess->tweaks.useColorFilter()); - //getChild("ColorFilterGamma")->setValue(gPostProcess->tweaks.gamma()); - getChild("ColorFilterBrightness")->setValue(gPostProcess->tweaks.brightness()); - getChild("ColorFilterSaturation")->setValue(gPostProcess->tweaks.saturation()); - getChild("ColorFilterContrast")->setValue(gPostProcess->tweaks.contrast()); - getChild("ColorFilterBaseR")->setValue(gPostProcess->tweaks.contrastBaseR()); - getChild("ColorFilterBaseG")->setValue(gPostProcess->tweaks.contrastBaseG()); - getChild("ColorFilterBaseB")->setValue(gPostProcess->tweaks.contrastBaseB()); - getChild("ColorFilterBaseI")->setValue(gPostProcess->tweaks.contrastBaseIntensity()); - - /// Sync Night Vision Menu - getChild("NightVisionToggle")->setValue(gPostProcess->tweaks.useNightVisionShader()); - getChild("NightVisionBrightMult")->setValue(gPostProcess->tweaks.brightMult()); - getChild("NightVisionNoiseSize")->setValue(gPostProcess->tweaks.noiseSize()); - getChild("NightVisionNoiseStrength")->setValue(gPostProcess->tweaks.noiseStrength()); - - /// Sync Bloom Menu - getChild("BloomToggle")->setValue(LLSD(gPostProcess->tweaks.useBloomShader())); - getChild("BloomExtract")->setValue(gPostProcess->tweaks.extractLow()); - getChild("BloomSize")->setValue(gPostProcess->tweaks.bloomWidth()); - getChild("BloomStrength")->setValue(gPostProcess->tweaks.bloomStrength()); -} diff --git a/indra/newview/llfloaterpostprocess.h b/indra/newview/llfloaterpostprocess.h deleted file mode 100644 index 50b48d8410..0000000000 --- a/indra/newview/llfloaterpostprocess.h +++ /dev/null @@ -1,72 +0,0 @@ -/** - * @file llfloaterpostprocess.h - * @brief LLFloaterPostProcess class definition - * - * $LicenseInfo:firstyear=2007&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#ifndef LL_LLFLOATERPOSTPROCESS_H -#define LL_LLFLOATERPOSTPROCESS_H - -#include "llfloater.h" - -class LLButton; -class LLComboBox; -class LLLineEditor; -class LLSliderCtrl; -class LLTabContainer; -class LLPanelPermissions; -class LLPanelObject; -class LLPanelVolume; -class LLPanelContents; -class LLPanelFace; - -/** - * Menu for adjusting the post process settings of the world - */ -class LLFloaterPostProcess : public LLFloater -{ -public: - - LLFloaterPostProcess(const LLSD& key); - virtual ~LLFloaterPostProcess(); - bool postBuild(); - - /// post process callbacks - static void onBoolToggle(LLUICtrl* ctrl, void* userData); - static void onFloatControlMoved(LLUICtrl* ctrl, void* userData); - static void onColorControlRMoved(LLUICtrl* ctrl, void* userData); - static void onColorControlGMoved(LLUICtrl* ctrl, void* userData); - static void onColorControlBMoved(LLUICtrl* ctrl, void* userData); - static void onColorControlIMoved(LLUICtrl* ctrl, void* userData); - void onLoadEffect(LLComboBox* comboBox); - void onSaveEffect(LLLineEditor* editBox); - void onChangeEffectName(LLUICtrl* ctrl); - - /// prompts a user when overwriting an effect - bool saveAlertCallback(const LLSD& notification, const LLSD& response); - - /// sync up sliders - void syncMenu(); -}; - -#endif diff --git a/indra/newview/llfloatersounddevices.cpp b/indra/newview/llfloatersounddevices.cpp deleted file mode 100644 index f11c5c0ad8..0000000000 --- a/indra/newview/llfloatersounddevices.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/** - * @file llfloatersounddevices.cpp - * @author Leyla Farazha - * @brief Sound Preferences used for minimal skin - * -* $LicenseInfo:firstyear=2011&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ -#include "llviewerprecompiledheaders.h" - -#include "llfloatersounddevices.h" - -#include "lldraghandle.h" - -#include "llpanelvoicedevicesettings.h" - -// Library includes -#include "indra_constants.h" - -// protected -LLFloaterSoundDevices::LLFloaterSoundDevices(const LLSD& key) -: LLTransientDockableFloater(NULL, false, key) -{ - LLTransientFloaterMgr::getInstance()->addControlView(this); - - // force docked state since this floater doesn't save it between recreations - setDocked(true); -} - -LLFloaterSoundDevices::~LLFloaterSoundDevices() -{ - LLTransientFloaterMgr::getInstance()->removeControlView(this); -} - -// virtual -bool LLFloaterSoundDevices::postBuild() -{ - LLTransientDockableFloater::postBuild(); - - updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730) - - LLPanelVoiceDeviceSettings* panel = findChild("device_settings_panel"); - if (panel) - { - panel->setUseTuningMode(false); - getChild("voice_input_device")->setCommitCallback(boost::bind(&LLPanelVoiceDeviceSettings::apply, panel)); - getChild("voice_output_device")->setCommitCallback(boost::bind(&LLPanelVoiceDeviceSettings::apply, panel)); - getChild("mic_volume_slider")->setCommitCallback(boost::bind(&LLPanelVoiceDeviceSettings::apply, panel)); - } - return true; -} - -//virtual -void LLFloaterSoundDevices::setDocked(bool docked, bool pop_on_undock/* = true*/) -{ - LLTransientDockableFloater::setDocked(docked, pop_on_undock); -} - -// virtual -void LLFloaterSoundDevices::setFocus(bool b) -{ - LLTransientDockableFloater::setFocus(b); - - // Force using active floater transparency - // We have to override setFocus() for because selecting an item of the - // combobox causes the floater to lose focus and thus become transparent. - updateTransparency(TT_ACTIVE); -} diff --git a/indra/newview/llfloatersounddevices.h b/indra/newview/llfloatersounddevices.h deleted file mode 100644 index 9b21b62747..0000000000 --- a/indra/newview/llfloatersounddevices.h +++ /dev/null @@ -1,49 +0,0 @@ -/** - * @file llfloatersounddevices.h - * @author Leyla Farazha - * @brief Sound Preferences used for minimal skin - * -* $LicenseInfo:firstyear=2011&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#ifndef LL_LLFLOATERSOUNDDEVICES_H -#define LL_LLFLOATERSOUNDDEVICES_H - -#include "lltransientdockablefloater.h" - -class LLFloaterSoundDevices : public LLTransientDockableFloater -{ -public: - - LOG_CLASS(LLFloaterSoundDevices); - - LLFloaterSoundDevices(const LLSD& key); - ~LLFloaterSoundDevices(); - - bool postBuild() override; - void setDocked(bool docked, bool pop_on_undock = true) override; - void setFocus(bool b) override; -}; - - -#endif //LL_LLFLOATERSOUNDDEVICES_H - diff --git a/indra/newview/llfloatervoiceeffect.cpp b/indra/newview/llfloatervoiceeffect.cpp deleted file mode 100644 index 9f7c9aba87..0000000000 --- a/indra/newview/llfloatervoiceeffect.cpp +++ /dev/null @@ -1,289 +0,0 @@ -/** - * @file llfloatervoiceeffect.cpp - * @author Aimee - * @brief Selection and preview of voice effect. - * - * $LicenseInfo:firstyear=2010&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#include "llviewerprecompiledheaders.h" - -#include "llfloatervoiceeffect.h" - -#include "llscrolllistctrl.h" -#include "lltrans.h" -#include "llweb.h" - -LLFloaterVoiceEffect::LLFloaterVoiceEffect(const LLSD& key) - : LLFloater(key) -{ - mCommitCallbackRegistrar.add("VoiceEffect.Record", boost::bind(&LLFloaterVoiceEffect::onClickRecord, this)); - mCommitCallbackRegistrar.add("VoiceEffect.Play", boost::bind(&LLFloaterVoiceEffect::onClickPlay, this)); - mCommitCallbackRegistrar.add("VoiceEffect.Stop", boost::bind(&LLFloaterVoiceEffect::onClickStop, this)); -// mCommitCallbackRegistrar.add("VoiceEffect.Activate", boost::bind(&LLFloaterVoiceEffect::onClickActivate, this)); -} - -// virtual -LLFloaterVoiceEffect::~LLFloaterVoiceEffect() -{ - if(LLVoiceClient::instanceExists()) - { - LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); - if (effect_interface) - { - effect_interface->removeObserver(this); - } - } -} - -// virtual -bool LLFloaterVoiceEffect::postBuild() -{ - setDefaultBtn("record_btn"); - getChild("record_btn")->setFocus(true); - getChild("voice_morphing_link")->setTextArg("[URL]", LLTrans::getString("voice_morphing_url")); - - mVoiceEffectList = getChild("voice_effect_list"); - if (mVoiceEffectList) - { - mVoiceEffectList->setCommitCallback(boost::bind(&LLFloaterVoiceEffect::onClickPlay, this)); -// mVoiceEffectList->setDoubleClickCallback(boost::bind(&LLFloaterVoiceEffect::onClickActivate, this)); - } - - LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); - if (effect_interface) - { - effect_interface->addObserver(this); - - // Disconnect from the current voice channel ready to record a voice sample for previewing - effect_interface->enablePreviewBuffer(true); - } - - refreshEffectList(); - updateControls(); - - return true; -} - -// virtual -void LLFloaterVoiceEffect::onClose(bool app_quitting) -{ - LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); - if (effect_interface) - { - effect_interface->enablePreviewBuffer(false); - } -} - -void LLFloaterVoiceEffect::refreshEffectList() -{ - if (!mVoiceEffectList) - { - return; - } - - LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); - if (!effect_interface) - { - mVoiceEffectList->setEnabled(false); - return; - } - - LL_DEBUGS("Voice")<< "Rebuilding Voice Morph list."<< LL_ENDL; - - // Preserve selected items and scroll position - S32 scroll_pos = mVoiceEffectList->getScrollPos(); - uuid_vec_t selected_items; - std::vector items = mVoiceEffectList->getAllSelected(); - for(std::vector::const_iterator it = items.begin(); it != items.end(); it++) - { - selected_items.push_back((*it)->getUUID()); - } - - mVoiceEffectList->deleteAllItems(); - - { - // Add the "No Voice Morph" entry - LLSD element; - - element["id"] = LLUUID::null; - element["columns"][NAME_COLUMN]["column"] = "name"; - element["columns"][NAME_COLUMN]["value"] = getString("no_voice_effect"); - element["columns"][NAME_COLUMN]["font"]["style"] = "BOLD"; - - LLScrollListItem* sl_item = mVoiceEffectList->addElement(element, ADD_BOTTOM); - // *HACK: Copied from llfloatergesture.cpp : ["font"]["style"] does not affect font style :( - if(sl_item) - { - ((LLScrollListText*)sl_item->getColumn(0))->setFontStyle(LLFontGL::BOLD); - } - } - - // Add each Voice Morph template, if there are any (template list includes all usable effects) - const voice_effect_list_t& template_list = effect_interface->getVoiceEffectTemplateList(); - if (!template_list.empty()) - { - for (voice_effect_list_t::const_iterator it = template_list.begin(); it != template_list.end(); ++it) - { - const LLUUID& effect_id = it->second; - - std::string localized_effect = "effect_" + it->first; - std::string effect_name = hasString(localized_effect) ? getString(localized_effect) : it->first; // XML contains localized effects names - - LLSD effect_properties = effect_interface->getVoiceEffectProperties(effect_id); - - // Tag the active effect. - if (effect_id == LLVoiceClient::instance().getVoiceEffectDefault()) - { - effect_name += " " + getString("active_voice_effect"); - } - - // Tag available effects that are new this session - if (effect_properties["is_new"].asBoolean()) - { - effect_name += " " + getString("new_voice_effect"); - } - - LLDate expiry_date = effect_properties["expiry_date"].asDate(); - bool is_template_only = effect_properties["template_only"].asBoolean(); - - std::string font_style = "NORMAL"; - if (!is_template_only) - { - font_style = "BOLD"; - } - - LLSD element; - element["id"] = effect_id; - - element["columns"][NAME_COLUMN]["column"] = "name"; - element["columns"][NAME_COLUMN]["value"] = effect_name; - element["columns"][NAME_COLUMN]["font"]["style"] = font_style; - - element["columns"][1]["column"] = "expires"; - if (!is_template_only) - { - element["columns"][DATE_COLUMN]["value"] = expiry_date; - element["columns"][DATE_COLUMN]["type"] = "date"; - } - else { - element["columns"][DATE_COLUMN]["value"] = getString("unsubscribed_voice_effect"); - } -// element["columns"][DATE_COLUMN]["font"]["style"] = "NORMAL"; - - LLScrollListItem* sl_item = mVoiceEffectList->addElement(element, ADD_BOTTOM); - // *HACK: Copied from llfloatergesture.cpp : ["font"]["style"] does not affect font style :( - if(sl_item) - { - LLFontGL::StyleFlags style = is_template_only ? LLFontGL::NORMAL : LLFontGL::BOLD; - LLScrollListText* slt = dynamic_cast(sl_item->getColumn(0)); - llassert(slt); - if (slt) - { - slt->setFontStyle(style); - } - } - } - } - - // Re-select items that were selected before, and restore the scroll position - for(uuid_vec_t::iterator it = selected_items.begin(); it != selected_items.end(); it++) - { - mVoiceEffectList->selectByID(*it); - } - mVoiceEffectList->setScrollPos(scroll_pos); - mVoiceEffectList->setEnabled(true); -} - -void LLFloaterVoiceEffect::updateControls() -{ - bool recording = false; - - LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); - if (effect_interface) - { - recording = effect_interface->isPreviewRecording(); - } - - getChild("record_btn")->setVisible(!recording); - getChild("record_stop_btn")->setVisible(recording); -} - -// virtual -void LLFloaterVoiceEffect::onVoiceEffectChanged(bool effect_list_updated) -{ - if (effect_list_updated) - { - refreshEffectList(); - } - updateControls(); -} - -void LLFloaterVoiceEffect::onClickRecord() -{ - LL_DEBUGS("Voice") << "Record clicked" << LL_ENDL; - LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); - if (effect_interface) - { - effect_interface->recordPreviewBuffer(); - } - updateControls(); -} - -void LLFloaterVoiceEffect::onClickPlay() -{ - LL_DEBUGS("Voice") << "Play clicked" << LL_ENDL; - if (!mVoiceEffectList) - { - return; - } - - const LLUUID& effect_id = mVoiceEffectList->getCurrentID(); - - LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); - if (effect_interface) - { - effect_interface->playPreviewBuffer(effect_id); - } - updateControls(); -} - -void LLFloaterVoiceEffect::onClickStop() -{ - LL_DEBUGS("Voice") << "Stop clicked" << LL_ENDL; - LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); - if (effect_interface) - { - effect_interface->stopPreviewBuffer(); - } - updateControls(); -} - -//void LLFloaterVoiceEffect::onClickActivate() -//{ -// LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); -// if (effect_interface && mVoiceEffectList) -// { -// effect_interface->setVoiceEffect(mVoiceEffectList->getCurrentID()); -// } -//} - diff --git a/indra/newview/llfloatervoiceeffect.h b/indra/newview/llfloatervoiceeffect.h deleted file mode 100644 index 323beb64ae..0000000000 --- a/indra/newview/llfloatervoiceeffect.h +++ /dev/null @@ -1,72 +0,0 @@ -/** - * @file llfloatervoiceeffect.h - * @author Aimee - * @brief Selection and preview of voice effects. - * - * $LicenseInfo:firstyear=2010&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#ifndef LL_LLFLOATERVOICEEFFECT_H -#define LL_LLFLOATERVOICEEFFECT_H - -#include "llfloater.h" -#include "llvoiceclient.h" - -class LLButton; -class LLScrollListCtrl; - -class LLFloaterVoiceEffect - : public LLFloater - , public LLVoiceEffectObserver -{ -public: - LOG_CLASS(LLFloaterVoiceEffect); - - LLFloaterVoiceEffect(const LLSD& key); - virtual ~LLFloaterVoiceEffect(); - - bool postBuild() override; - void onClose(bool app_quitting) override; - -private: - enum ColumnIndex - { - NAME_COLUMN = 0, - DATE_COLUMN = 1, - }; - - void refreshEffectList(); - void updateControls(); - - /// Called by voice effect provider when voice effect list is changed. - virtual void onVoiceEffectChanged(bool effect_list_updated) override; - - void onClickRecord(); - void onClickPlay(); - void onClickStop(); -// void onClickActivate(); - - LLUUID mSelectedID; - LLScrollListCtrl* mVoiceEffectList; -}; - -#endif diff --git a/indra/newview/llpanelvoiceeffect.cpp b/indra/newview/llpanelvoiceeffect.cpp deleted file mode 100644 index a0129b2cb1..0000000000 --- a/indra/newview/llpanelvoiceeffect.cpp +++ /dev/null @@ -1,165 +0,0 @@ -/** - * @file llpanelvoiceeffect.cpp - * @author Aimee - * @brief Panel to select Voice Morphs. - * - * $LicenseInfo:firstyear=2010&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#include "llviewerprecompiledheaders.h" - -#include "llpanelvoiceeffect.h" - -#include "llcombobox.h" -#include "llfloaterreg.h" -#include "llpanel.h" -#include "lltrans.h" -#include "lltransientfloatermgr.h" -#include "llvoiceclient.h" -#include "llweb.h" - -static LLPanelInjector t_panel_voice_effect("panel_voice_effect"); - -LLPanelVoiceEffect::LLPanelVoiceEffect() - : mVoiceEffectCombo(NULL) -{ - mCommitCallbackRegistrar.add("Voice.CommitVoiceEffect", boost::bind(&LLPanelVoiceEffect::onCommitVoiceEffect, this)); -} - -LLPanelVoiceEffect::~LLPanelVoiceEffect() -{ - LLView* combo_list_view = mVoiceEffectCombo->getChildView("ComboBox"); - LLTransientFloaterMgr::getInstance()->removeControlView(combo_list_view); - - if(LLVoiceClient::instanceExists()) - { - LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); - if (effect_interface) - { - effect_interface->removeObserver(this); - } - } -} - -// virtual -bool LLPanelVoiceEffect::postBuild() -{ - mVoiceEffectCombo = getChild("voice_effect"); - - // Need to tell LLTransientFloaterMgr about the combo list, otherwise it can't - // be clicked while in a docked floater as it extends outside the floater area. - LLView* combo_list_view = mVoiceEffectCombo->getChildView("ComboBox"); - LLTransientFloaterMgr::getInstance()->addControlView(combo_list_view); - - LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); - if (effect_interface) - { - effect_interface->addObserver(this); - } - - update(true); - - return true; -} - -////////////////////////////////////////////////////////////////////////// -/// PRIVATE SECTION -////////////////////////////////////////////////////////////////////////// - -void LLPanelVoiceEffect::onCommitVoiceEffect() -{ - LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); - if (!effect_interface) - { - mVoiceEffectCombo->setEnabled(false); - return; - } - - LLSD value = mVoiceEffectCombo->getValue(); - if (value.asInteger() == PREVIEW_VOICE_EFFECTS) - { - // Open the Voice Morph preview floater - LLFloaterReg::showInstance("voice_effect"); - } - else if (value.asInteger() == GET_VOICE_EFFECTS) - { - // Open the voice morphing info web page - LLWeb::loadURL(LLTrans::getString("voice_morphing_url")); - } - else - { - effect_interface->setVoiceEffect(value.asUUID()); - } - - mVoiceEffectCombo->setValue(effect_interface->getVoiceEffect()); -} - -// virtual -void LLPanelVoiceEffect::onVoiceEffectChanged(bool effect_list_updated) -{ - update(effect_list_updated); -} - -void LLPanelVoiceEffect::update(bool list_updated) -{ - if (mVoiceEffectCombo) - { - LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); - if (!effect_interface) return; - if (list_updated) - { - // Add the default "No Voice Morph" entry. - mVoiceEffectCombo->removeall(); - mVoiceEffectCombo->add(getString("no_voice_effect"), LLUUID::null); - mVoiceEffectCombo->addSeparator(); - - // Add entries for each Voice Morph. - const voice_effect_list_t& effect_list = effect_interface->getVoiceEffectList(); - if (!effect_list.empty()) - { - for (voice_effect_list_t::const_iterator it = effect_list.begin(); it != effect_list.end(); ++it) - { - mVoiceEffectCombo->add(it->first, it->second, ADD_BOTTOM); - } - - mVoiceEffectCombo->addSeparator(); - } - - // Add the fixed entries to go to the preview floater or marketing page. - mVoiceEffectCombo->add(getString("preview_voice_effects"), PREVIEW_VOICE_EFFECTS); - mVoiceEffectCombo->add(getString("get_voice_effects"), GET_VOICE_EFFECTS); - } - - if (effect_interface && LLVoiceClient::instance().isVoiceWorking()) - { - // Select the current Voice Morph. - mVoiceEffectCombo->setValue(effect_interface->getVoiceEffect()); - mVoiceEffectCombo->setEnabled(true); - } - else - { - // If voice isn't working or Voice Effects are not supported disable the control. - mVoiceEffectCombo->setValue(LLUUID::null); - mVoiceEffectCombo->setEnabled(false); - } - } -} diff --git a/indra/newview/llpanelvoiceeffect.h b/indra/newview/llpanelvoiceeffect.h deleted file mode 100644 index f920e41081..0000000000 --- a/indra/newview/llpanelvoiceeffect.h +++ /dev/null @@ -1,67 +0,0 @@ -/** - * @file llpanelvoiceeffect.h - * @author Aimee - * @brief Panel to select Voice Effects. - * - * $LicenseInfo:firstyear=2010&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#ifndef LL_PANELVOICEEFFECT_H -#define LL_PANELVOICEEFFECT_H - -#include "llpanel.h" -#include "llvoiceclient.h" - -class LLComboBox; - -class LLPanelVoiceEffect - : public LLPanel - , public LLVoiceEffectObserver -{ -public: - LOG_CLASS(LLPanelVoiceEffect); - - LLPanelVoiceEffect(); - virtual ~LLPanelVoiceEffect(); - - bool postBuild() override; - -private: - void onCommitVoiceEffect(); - void update(bool list_updated); - - /// Called by voice effect provider when voice effect list is changed. - void onVoiceEffectChanged(bool effect_list_updated) override; - - // Fixed entries in the Voice Morph list - typedef enum e_voice_effect_combo_items - { - NO_VOICE_EFFECT = 0, - PREVIEW_VOICE_EFFECTS = 1, - GET_VOICE_EFFECTS = 2 - } EVoiceEffectComboItems; - - LLComboBox* mVoiceEffectCombo; -}; - - -#endif //LL_PANELVOICEEFFECT_H diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index ab5235c3ad..82fc4c6d87 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -44,7 +44,6 @@ #include "llfloateravatarrendersettings.h" #include "llfloateravatartextures.h" #include "llfloaterbanduration.h" -#include "llfloaterbigpreview.h" #include "llfloaterbeacons.h" #include "llfloaterbuildoptions.h" #include "llfloaterbulkpermission.h" @@ -120,7 +119,6 @@ #include "llfloaterpay.h" #include "llfloaterperformance.h" #include "llfloaterperms.h" -#include "llfloaterpostprocess.h" #include "llfloaterpreference.h" #include "llfloaterpreferencesgraphicsadvanced.h" #include "llfloaterpreferenceviewadvanced.h" @@ -143,7 +141,6 @@ #include "llfloatersidepanelcontainer.h" #include "llfloaterslapptest.h" #include "llfloatersnapshot.h" -#include "llfloatersounddevices.h" #include "llfloaterspellchecksettings.h" #include "llfloatertelehub.h" #include "llfloatertestinspectors.h" @@ -154,7 +151,6 @@ #include "llfloatertoybox.h" #include "llfloatertranslationsettings.h" #include "llfloateruipreview.h" -#include "llfloatervoiceeffect.h" #include "llfloaterwebcontent.h" #include "llfloatervoicevolume.h" #include "llfloaterwhitelistentry.h" @@ -370,7 +366,6 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("emoji_picker", "floater_emoji_picker.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("emoji_complete", "floater_emoji_complete.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - LLFloaterReg::add("env_post_process", "floater_post_process.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("env_fixed_environmentent_water", "floater_fixedenvironment.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("env_fixed_environmentent_sky", "floater_fixedenvironment.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); @@ -499,7 +494,6 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("sell_land", "floater_sell_land.xml", &LLFloaterSellLand::buildFloater); LLFloaterReg::add("settings_color", "floater_settings_color.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("settings_debug", "floater_settings_debug.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - LLFloaterReg::add("sound_devices", "floater_sound_devices.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("stats", "floater_stats.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("start_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("scene_load_stats", "floater_scene_load_stats.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); @@ -512,8 +506,6 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("guidebook", "floater_how_to.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("slapp_test", "floater_test_slapp.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - LLFloaterReg::add("big_preview", "floater_big_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - LLFloaterUIPreviewUtil::registerFloater(); LLFloaterReg::add("upload_anim_bvh", "floater_animation_bvh_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "upload"); LLFloaterReg::add("upload_anim_anim", "floater_animation_anim_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "upload"); @@ -522,8 +514,6 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("upload_script", "floater_script_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "upload"); LLFloaterReg::add("upload_sound", "floater_sound_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "upload"); - LLFloaterReg::add("voice_effect", "floater_voice_effect.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - LLFloaterReg::add("web_content", "floater_web_content.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create); LLFloaterReg::add("whitelist_entry", "floater_whitelist_entry.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("window_size", "floater_window_size.xml", &LLFloaterReg::build); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 597292fac5..d1adf460c9 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -9623,17 +9623,6 @@ class LLWorldEnableEnvPreset : public view_listener_t } }; - -/// Post-Process callbacks -class LLWorldPostProcess : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - LLFloaterReg::showInstance("env_post_process"); - return true; - } -}; - class LLWorldCheckBanLines : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -9927,7 +9916,6 @@ void initialize_menus() view_listener_t::addMenu(new LLWorldEnableEnvSettings(), "World.EnableEnvSettings"); view_listener_t::addMenu(new LLWorldEnvPreset(), "World.EnvPreset"); view_listener_t::addMenu(new LLWorldEnableEnvPreset(), "World.EnableEnvPreset"); - view_listener_t::addMenu(new LLWorldPostProcess(), "World.PostProcess"); view_listener_t::addMenu(new LLWorldCheckBanLines() , "World.CheckBanLines"); view_listener_t::addMenu(new LLWorldShowBanLines() , "World.ShowBanLines"); diff --git a/indra/newview/skins/default/xui/da/floater_sound_devices.xml b/indra/newview/skins/default/xui/da/floater_sound_devices.xml deleted file mode 100644 index cb4cbba570..0000000000 --- a/indra/newview/skins/default/xui/da/floater_sound_devices.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - Stemme chat - - - diff --git a/indra/newview/skins/default/xui/da/floater_voice_effect.xml b/indra/newview/skins/default/xui/da/floater_voice_effect.xml deleted file mode 100644 index 86ad251103..0000000000 --- a/indra/newview/skins/default/xui/da/floater_voice_effect.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - (Ingen stemme "morph") - - - (Aktiv) - - - (Ikke aktiveret) - - - (Ny!) - - - For at se - - - Optag en prøve, klik derefter på en stemme for at høre hvordan det vil lyde. - - - - - [[URL] Subscribe Now] - - - - - - - diff --git a/indra/newview/skins/default/xui/en/panel_voice_effect.xml b/indra/newview/skins/default/xui/en/panel_voice_effect.xml deleted file mode 100644 index 42cd510efd..0000000000 --- a/indra/newview/skins/default/xui/en/panel_voice_effect.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - Voice Morphing Off - - - Preview Voice Morphing ▶ - - - Get Voice Morphing ▶ - - - - - - diff --git a/indra/newview/skins/default/xui/es/floater_big_preview.xml b/indra/newview/skins/default/xui/es/floater_big_preview.xml deleted file mode 100644 index b112243d7a..0000000000 --- a/indra/newview/skins/default/xui/es/floater_big_preview.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/indra/newview/skins/default/xui/es/floater_post_process.xml b/indra/newview/skins/default/xui/es/floater_post_process.xml deleted file mode 100644 index 5c62ccde36..0000000000 --- a/indra/newview/skins/default/xui/es/floater_post_process.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - Brillo - - - Saturación - - - Contraste - - - Color base del contraste - - - - - - - - - - Amplificación de luz - - - Cantidad de ruido - - - Intensidad del ruido - - - - - - Extracción de la luminosidad - - - Bloom: cantidad - - - Bloom: intensidad - - - -