diff options
80 files changed, 374 insertions, 1322 deletions
diff --git a/doc/contributions.txt b/doc/contributions.txt index c8125c675f..8c6bd5e0fe 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -517,7 +517,6 @@ Ringo Tuxing Robin Cornelius SNOW-108 SNOW-204 - SNOW-484 VWR-2488 VWR-9557 VWR-11128 diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp index 7bc9e97eb1..f4dc3b927b 100644 --- a/indra/llcharacter/llkeyframemotion.cpp +++ b/indra/llcharacter/llkeyframemotion.cpp @@ -1248,12 +1248,6 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp) return FALSE; } - if(mJointMotionList->mEmoteName==mID.asString()) - { - llwarns << "Malformed animation mEmoteName==mID" << llendl; - return FALSE; - } - //------------------------------------------------------------------------- // get loop //------------------------------------------------------------------------- diff --git a/indra/llcommon/llqueuedthread.cpp b/indra/llcommon/llqueuedthread.cpp index e0b56b7973..809a626c93 100644 --- a/indra/llcommon/llqueuedthread.cpp +++ b/indra/llcommon/llqueuedthread.cpp @@ -428,11 +428,9 @@ S32 LLQueuedThread::processNextRequest() llassert_always(req->getStatus() == STATUS_QUEUED); break; } - U32 start_priority = 0 ; if (req) { req->setStatus(STATUS_INPROGRESS); - start_priority = req->getPriority(); } unlockData(); @@ -441,7 +439,8 @@ S32 LLQueuedThread::processNextRequest() // safe to access req. if (req) { - // process request + // process request + U32 start_priority = req->getPriority(); bool complete = req->processRequest(); if (complete) diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp index c3ef734823..ad950685c0 100644 --- a/indra/llui/llaccordionctrl.cpp +++ b/indra/llui/llaccordionctrl.cpp @@ -40,6 +40,8 @@ #include "llfocusmgr.h" #include "lllocalcliprect.h" +#include "lltrans.h" + #include "boost/bind.hpp" static const S32 DRAGGER_BAR_MARGIN = 4; @@ -72,6 +74,7 @@ LLAccordionCtrl::LLAccordionCtrl(const Params& params):LLPanel(params) { initNoTabsWidget(params.no_matched_tabs_text); + mNoVisibleTabsOrigString = LLTrans::getString(params.no_visible_tabs_text.initial_value().asString()); mSingleExpansion = params.single_expansion; if(mFitParent && !mSingleExpansion) { @@ -386,7 +389,7 @@ void LLAccordionCtrl::initNoTabsWidget(const LLTextBox::Params& tb_params) { LLTextBox::Params tp = tb_params; tp.rect(getLocalRect()); - mNoMatchedTabsOrigString = tp.initial_value().asString(); + mNoMatchedTabsOrigString = LLTrans::getString(tp.initial_value().asString()); mNoVisibleTabsHelpText = LLUICtrlFactory::create<LLTextBox>(tp, this); } diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index aeedf62379..39e46a7ccb 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -1,4 +1,3 @@ - /** * @file llbutton.cpp * @brief LLButton base class diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp index 5b4fee0051..d1c0b38809 100644 --- a/indra/llui/llflatlistview.cpp +++ b/indra/llui/llflatlistview.cpp @@ -157,7 +157,7 @@ bool LLFlatListView::insertItemAfter(LLPanel* after_item, LLPanel* item_to_add, } -bool LLFlatListView::removeItem(LLPanel* item, bool rearrange) +bool LLFlatListView::removeItem(LLPanel* item) { if (!item) return false; if (item->getParent() != mItemsPanel) return false; @@ -165,22 +165,22 @@ bool LLFlatListView::removeItem(LLPanel* item, bool rearrange) item_pair_t* item_pair = getItemPair(item); if (!item_pair) return false; - return removeItemPair(item_pair, rearrange); + return removeItemPair(item_pair); } -bool LLFlatListView::removeItemByValue(const LLSD& value, bool rearrange) +bool LLFlatListView::removeItemByValue(const LLSD& value) { if (value.isUndefined()) return false; item_pair_t* item_pair = getItemPair(value); if (!item_pair) return false; - return removeItemPair(item_pair, rearrange); + return removeItemPair(item_pair); } -bool LLFlatListView::removeItemByUUID(const LLUUID& uuid, bool rearrange) +bool LLFlatListView::removeItemByUUID(const LLUUID& uuid) { - return removeItemByValue(LLSD(uuid), rearrange); + return removeItemByValue(LLSD(uuid)); } LLPanel* LLFlatListView::getItemByValue(const LLSD& value) const @@ -327,9 +327,6 @@ U32 LLFlatListView::size(const bool only_visible_items) const void LLFlatListView::clear() { - // This will clear mSelectedItemPairs, calling all appropriate callbacks. - resetSelection(); - // do not use LLView::deleteAllChildren to avoid removing nonvisible items. drag-n-drop for ex. for (pairs_iterator_t it = mItemPairs.begin(); it != mItemPairs.end(); ++it) { @@ -338,6 +335,7 @@ void LLFlatListView::clear() delete *it; } mItemPairs.clear(); + mSelectedItemPairs.clear(); // also set items panel height to zero. Reshape it to allow reshaping of non-item children LLRect rc = mItemsPanel->getRect(); @@ -972,12 +970,11 @@ bool LLFlatListView::isSelected(item_pair_t* item_pair) const return std::find(mSelectedItemPairs.begin(), it_end, item_pair) != it_end; } -bool LLFlatListView::removeItemPair(item_pair_t* item_pair, bool rearrange) +bool LLFlatListView::removeItemPair(item_pair_t* item_pair) { llassert(item_pair); bool deleted = false; - bool selection_changed = false; for (pairs_iterator_t it = mItemPairs.begin(); it != mItemPairs.end(); ++it) { item_pair_t* _item_pair = *it; @@ -997,7 +994,6 @@ bool LLFlatListView::removeItemPair(item_pair_t* item_pair, bool rearrange) if (selected_item_pair == item_pair) { it = mSelectedItemPairs.erase(it); - selection_changed = true; break; } } @@ -1006,16 +1002,8 @@ bool LLFlatListView::removeItemPair(item_pair_t* item_pair, bool rearrange) item_pair->first->die(); delete item_pair; - if (rearrange) - { rearrangeItems(); notifyParentItemsRectChanged(); - } - - if (selection_changed && mCommitOnSelectionChange) - { - onCommit(); - } return true; } @@ -1092,7 +1080,7 @@ void LLFlatListView::onFocusReceived() { if (size()) { - mSelectedItemsBorder->setVisible(TRUE); + mSelectedItemsBorder->setVisible(TRUE); } gEditMenuHandler = this; } diff --git a/indra/llui/llflatlistview.h b/indra/llui/llflatlistview.h index 50d06fbc94..ded46d8122 100644 --- a/indra/llui/llflatlistview.h +++ b/indra/llui/llflatlistview.h @@ -117,9 +117,6 @@ public: Params(); }; - // disable traversal when finding widget to hand focus off to - /*virtual*/ BOOL canFocusChildren() const { return FALSE; } - /** * Connects callback to signal called when Return key is pressed. */ @@ -152,19 +149,19 @@ public: * Remove specified item * @return true if the item was removed, false otherwise */ - virtual bool removeItem(LLPanel* item, bool rearrange = true); + virtual bool removeItem(LLPanel* item); /** * Remove an item specified by value * @return true if the item was removed, false otherwise */ - virtual bool removeItemByValue(const LLSD& value, bool rearrange = true); + virtual bool removeItemByValue(const LLSD& value); /** * Remove an item specified by uuid * @return true if the item was removed, false otherwise */ - virtual bool removeItemByUUID(const LLUUID& uuid, bool rearrange = true); + virtual bool removeItemByUUID(const LLUUID& uuid); /** * Get an item by value @@ -265,7 +262,6 @@ public: void setAllowSelection(bool can_select) { mAllowSelection = can_select; } /** Sets flag whether onCommit should be fired if selection was changed */ - // FIXME: this should really be a separate signal, since "Commit" implies explicit user action, and selection changes can happen more indirectly. void setCommitOnSelectionChange(bool b) { mCommitOnSelectionChange = b; } /** Get number of selected items in the list */ @@ -353,7 +349,7 @@ protected: virtual bool isSelected(item_pair_t* item_pair) const; - virtual bool removeItemPair(item_pair_t* item_pair, bool rearrange); + virtual bool removeItemPair(item_pair_t* item_pair); /** * Notify parent about changed size of internal controls with "size_changes" action diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 7fa3c2cf65..ee70dadbd0 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -34,7 +34,6 @@ #include "llnotifications.h" -#include "llinstantmessage.h" #include "llxmlnode.h" #include "lluictrl.h" #include "lluictrlfactory.h" @@ -42,7 +41,6 @@ #include "llsdserialize.h" #include "lltrans.h" #include "llnotificationslistener.h" -#include "llstring.h" #include <algorithm> #include <boost/regex.hpp> @@ -1490,14 +1488,7 @@ std::ostream& operator<<(std::ostream& s, const LLNotification& notification) void LLPostponedNotification::onCachedNameReceived(const LLUUID& id, const std::string& first, const std::string& last, bool is_group) { - mName = first + " " + last; - - LLStringUtil::trim(mName); - if (mName.empty()) - { - llwarns << "Empty name received for Id: " << id << llendl; - mName = SYSTEM_FROM; - } + gCacheName->getFullName(id, mName); modifyNotificationParams(); LLNotifications::instance().add(mParams); cleanup(); diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index d3b2a368a5..e220013274 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -66,10 +66,7 @@ bool LLTextBase::compare_segment_end::operator()(const LLTextSegmentPtr& a, cons { return a->getStart() < b->getStart(); } - else - { - return a->getEnd() < b->getEnd(); - } + return a->getEnd() < b->getEnd(); } @@ -177,7 +174,7 @@ LLTextBase::Params::Params() LLTextBase::LLTextBase(const LLTextBase::Params &p) : LLUICtrl(p, LLTextViewModelPtr(new LLTextViewModel)), - mURLClickSignal(NULL), + mURLClickSignal(), mMaxTextByteLength( p.max_text_length ), mDefaultFont(p.font), mFontShadow(p.font_shadow), @@ -212,8 +209,7 @@ LLTextBase::LLTextBase(const LLTextBase::Params &p) mParseHTML(p.allow_html), mParseHighlights(p.parse_highlights), mBGVisible(p.bg_visible), - mScroller(NULL), - mStyleDirty(true) + mScroller(NULL) { if(p.allow_scroll) { @@ -252,8 +248,9 @@ LLTextBase::LLTextBase(const LLTextBase::Params &p) LLTextBase::~LLTextBase() { + // Menu, like any other LLUICtrl, is deleted by its parent - gMenuHolder + mSegments.clear(); - delete mURLClickSignal; } void LLTextBase::initFromParams(const LLTextBase::Params& p) @@ -299,18 +296,13 @@ bool LLTextBase::truncate() return did_truncate; } -const LLStyle::Params& LLTextBase::getDefaultStyleParams() +LLStyle::Params LLTextBase::getDefaultStyleParams() { - if (mStyleDirty) - { - mDefaultStyle - .color(LLUIColor(&mFgColor)) - .readonly_color(LLUIColor(&mReadOnlyFgColor)) - .font(mDefaultFont) - .drop_shadow(mFontShadow); - mStyleDirty = false; - } - return mDefaultStyle; + return LLStyle::Params() + .color(LLUIColor(&mFgColor)) + .readonly_color(LLUIColor(&mReadOnlyFgColor)) + .font(mDefaultFont) + .drop_shadow(mFontShadow); } void LLTextBase::onValueChange(S32 start, S32 end) @@ -869,12 +861,11 @@ BOOL LLTextBase::handleMouseUp(S32 x, S32 y, MASK mask) if (cur_segment && cur_segment->handleMouseUp(x, y, mask)) { // Did we just click on a link? - if (mURLClickSignal - && cur_segment->getStyle() + if (cur_segment->getStyle() && cur_segment->getStyle()->isLink()) { // *TODO: send URL here? - (*mURLClickSignal)(this, LLSD() ); + mURLClickSignal(this, LLSD() ); } return TRUE; } @@ -1048,14 +1039,12 @@ void LLTextBase::draw() void LLTextBase::setColor( const LLColor4& c ) { mFgColor = c; - mStyleDirty = true; } //virtual void LLTextBase::setReadOnlyColor(const LLColor4 &c) { mReadOnlyFgColor = c; - mStyleDirty = true; } //virtual @@ -1499,22 +1488,12 @@ void LLTextBase::getSegmentAndOffset( S32 startpos, segment_set_t::iterator* seg LLTextBase::segment_set_t::iterator LLTextBase::getSegIterContaining(S32 index) { - if (index > getLength()) { return mSegments.end(); } - - // when there are no segments, we return the end iterator, which must be checked by caller - if (mSegments.size() <= 1) { return mSegments.begin(); } - segment_set_t::iterator it = mSegments.upper_bound(new LLIndexSegment(index)); return it; } LLTextBase::segment_set_t::const_iterator LLTextBase::getSegIterContaining(S32 index) const { - if (index > getLength()) { return mSegments.end(); } - - // when there are no segments, we return the end iterator, which must be checked by caller - if (mSegments.size() <= 1) { return mSegments.begin(); } - LLTextBase::segment_set_t::const_iterator it = mSegments.upper_bound(new LLIndexSegment(index)); return it; } @@ -2351,15 +2330,6 @@ LLRect LLTextBase::getVisibleDocumentRect() const } } -boost::signals2::connection LLTextBase::setURLClickedCallback(const commit_signal_t::slot_type& cb) -{ - if (!mURLClickSignal) - { - mURLClickSignal = new commit_signal_t(); - } - return mURLClickSignal->connect(cb); -} - // // LLTextSegment // diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index 4b0eeeb7d6..300ee0f05f 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -361,7 +361,10 @@ public: virtual void appendLineBreakSegment(const LLStyle::Params& style_params); virtual void appendImageSegment(const LLStyle::Params& style_params); virtual void appendWidget(const LLInlineViewSegment::Params& params, const std::string& text, bool allow_undo); - boost::signals2::connection setURLClickedCallback(const commit_signal_t::slot_type& cb); + +public: + // Fired when a URL link is clicked + commit_signal_t mURLClickSignal; protected: // helper structs @@ -454,7 +457,7 @@ protected: void createDefaultSegment(); virtual void updateSegments(); void insertSegment(LLTextSegmentPtr segment_to_insert); - const LLStyle::Params& getDefaultStyleParams(); + LLStyle::Params getDefaultStyleParams(); // manage lines S32 getLineStart( S32 line ) const; @@ -494,12 +497,6 @@ protected: LLRect mVisibleTextRect; // The rect in which text is drawn. Excludes borders. LLRect mTextBoundingRect; - // default text style - LLStyle::Params mDefaultStyle; - bool mStyleDirty; - const LLFontGL* const mDefaultFont; // font that is used when none specified, can only be set by constructor - const LLFontGL::ShadowType mFontShadow; // shadow style, can only be set by constructor - // colors LLUIColor mCursorColor; LLUIColor mFgColor; @@ -526,6 +523,8 @@ protected: LLFontGL::VAlign mVAlign; F32 mLineSpacingMult; // multiple of line height used as space for a single line of text (e.g. 1.5 to get 50% padding) S32 mLineSpacingPixels; // padding between lines + const LLFontGL* mDefaultFont; // font that is used when none specified + LLFontGL::ShadowType mFontShadow; bool mBorderVisible; bool mParseHTML; // make URLs interactive bool mParseHighlights; // highlight user-defined keywords @@ -548,9 +547,6 @@ protected: bool mScrollNeeded; // need to change scroll region because of change to cursor position S32 mScrollIndex; // index of first character to keep visible in scroll region - // Fired when a URL link is clicked - commit_signal_t* mURLClickSignal; - }; #endif diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 130cda3784..c9474d66b7 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -264,6 +264,8 @@ LLTextEditor::LLTextEditor(const LLTextEditor::Params& p) : mContextMenu(NULL), mShowContextMenu(p.show_context_menu) { + mDefaultFont = p.font; + mSourceID.generate(); //FIXME: use image? diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp index ff330f863a..3ade46d367 100644 --- a/indra/llui/lluictrl.cpp +++ b/indra/llui/lluictrl.cpp @@ -675,7 +675,7 @@ BOOL LLUICtrl::getIsChrome() const class CompareByDefaultTabGroup: public LLCompareByTabOrder { public: - CompareByDefaultTabGroup(const LLView::child_tab_order_t& order, S32 default_tab_group): + CompareByDefaultTabGroup(LLView::child_tab_order_t order, S32 default_tab_group): LLCompareByTabOrder(order), mDefaultTabGroup(default_tab_group) {} private: @@ -699,16 +699,13 @@ class LLUICtrl::DefaultTabGroupFirstSorter : public LLQuerySorter, public LLSing { public: /*virtual*/ void operator() (LLView * parent, viewList_t &children) const - { + { children.sort(CompareByDefaultTabGroup(parent->getCtrlOrder(), parent->getDefaultTabGroup())); } }; -LLFastTimer::DeclareTimer FTM_FOCUS_FIRST_ITEM("Focus First Item"); - BOOL LLUICtrl::focusFirstItem(BOOL prefer_text_fields, BOOL focus_flash) { - LLFastTimer _(FTM_FOCUS_FIRST_ITEM); // try to select default tab group child LLCtrlQuery query = getTabOrderQuery(); // sort things such that the default tab group is at the front diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h index dc43b311a7..c99acee48e 100644 --- a/indra/llui/lluictrlfactory.h +++ b/indra/llui/lluictrlfactory.h @@ -182,7 +182,7 @@ public: void popFactoryFunctions(); template<typename T> - static T* createWidget(const typename T::Params& params, LLView* parent = NULL) + static T* createWidget(typename T::Params& params, LLView* parent = NULL) { T* widget = NULL; diff --git a/indra/llui/lluistring.cpp b/indra/llui/lluistring.cpp index ac9e71665f..f7a53e87de 100644 --- a/indra/llui/lluistring.cpp +++ b/indra/llui/lluistring.cpp @@ -135,16 +135,9 @@ void LLUIString::updateResult() const mResult = mOrig; // get the defailt args + local args - if (mArgs.empty()) - { - LLStringUtil::format(mResult, LLTrans::getDefaultArgs()); - } - else - { - LLStringUtil::format_map_t combined_args = LLTrans::getDefaultArgs(); - combined_args.insert(mArgs.begin(), mArgs.end()); - LLStringUtil::format(mResult, combined_args); - } + LLStringUtil::format_map_t combined_args = LLTrans::getDefaultArgs(); + combined_args.insert(mArgs.begin(), mArgs.end()); + LLStringUtil::format(mResult, combined_args); } void LLUIString::updateWResult() const diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 8e705ed701..aba6c310f1 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -265,7 +265,7 @@ public: virtual BOOL postBuild() { return TRUE; } - const child_tab_order_t& getCtrlOrder() const { return mCtrlOrder; } + child_tab_order_t getCtrlOrder() const { return mCtrlOrder; } ctrl_list_t getCtrlList() const; ctrl_list_t getCtrlListSorted() const; @@ -620,13 +620,12 @@ public: class LLCompareByTabOrder { public: - LLCompareByTabOrder(const LLView::child_tab_order_t& order) : mTabOrder(order) {} + LLCompareByTabOrder(LLView::child_tab_order_t order) : mTabOrder(order) {} virtual ~LLCompareByTabOrder() {} bool operator() (const LLView* const a, const LLView* const b) const; private: virtual bool compareTabOrders(const LLView::tab_order_t & a, const LLView::tab_order_t & b) const { return a < b; } - // ok to store a reference, as this should only be allocated on stack during view query operations - const LLView::child_tab_order_t& mTabOrder; + LLView::child_tab_order_t mTabOrder; }; template <class T> T* LLView::getChild(const std::string& name, BOOL recurse) const diff --git a/indra/llui/llviewquery.cpp b/indra/llui/llviewquery.cpp index 1b44cc528e..bdb3d223a6 100644 --- a/indra/llui/llviewquery.cpp +++ b/indra/llui/llviewquery.cpp @@ -95,8 +95,8 @@ viewList_t LLViewQuery::run(LLView* view) const if (pre.first) { post = runFilters(view, filtered_children, mPostFilters); - } } + } if(pre.first && post.first) { @@ -119,12 +119,12 @@ void LLViewQuery::filterChildren(LLView * view, viewList_t & filtered_children) (*mSorterp)(view, views); // sort the children per the sorter } for(LLView::child_list_iter_t iter = views.begin(); - iter != views.end(); - iter++) - { - viewList_t indiv_children = this->run(*iter); - filtered_children.splice(filtered_children.end(), indiv_children); - } + iter != views.end(); + iter++) + { + viewList_t indiv_children = this->run(*iter); + filtered_children.insert(filtered_children.end(), indiv_children.begin(), indiv_children.end()); + } } filterResult_t LLViewQuery::runFilters(LLView * view, const viewList_t children, const filterList_t filters) const diff --git a/indra/llui/llviewquery.h b/indra/llui/llviewquery.h index 68af31933d..98d9bf8796 100644 --- a/indra/llui/llviewquery.h +++ b/indra/llui/llviewquery.h @@ -122,7 +122,7 @@ public: viewList_t operator () (LLView * view) const { return run(view); } // override this method to provide iteration over other types of children - virtual void filterChildren(LLView * view, viewList_t& filtered_children) const; + virtual void filterChildren(LLView * view, viewList_t & filtered_children) const; private: diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 810b2d9a1d..c2236233dc 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4678,7 +4678,7 @@ <key>Type</key> <string>String</string> <key>Value</key> - <string>http://marketplace.secondlife.com/</string> + <string>https://www.xstreetsl.com/modules.php?name=Marketplace</string> </map> <key>MarketplaceURL_objectFemale</key> <map> @@ -4733,7 +4733,7 @@ <key>Type</key> <string>String</string> <key>Value</key> - <string>http://marketplace.secondlife.com</string> + <string>https://www.xstreetsl.com/modules.php?name=Marketplace</string> </map> <key>MarketplaceURL_bodypartMale</key> <map> @@ -4744,7 +4744,7 @@ <key>Type</key> <string>String</string> <key>Value</key> - <string>http://marketplace.secondlife.com/</string> + <string>https://www.xstreetsl.com/modules.php?name=Marketplace</string> </map> <key>MarketplaceURL_glovesMale</key> <map> @@ -11869,16 +11869,5 @@ <key>Value</key> <integer>1</integer> </map> - <key>TipToastMessageLineCount</key> - <map> - <key>Comment</key> - <string>Max line count of text message on tip toast.</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>S32</string> - <key>Value</key> - <integer>10</integer> - </map> </map> </llsd> diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index a4bf56fc96..7c92a5a756 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -3406,9 +3406,6 @@ void LLAgent::setTeleportState(ETeleportState state) } else if(mTeleportState == TELEPORT_ARRIVING) { - // First two position updates after a teleport tend to be weird - LLViewerStats::getInstance()->mAgentPositionSnaps.mCountOfNextUpdatesToIgnore = 2; - // Let the interested parties know we've teleported. LLViewerParcelMgr::getInstance()->onTeleportFinished(false, getPositionGlobal()); } diff --git a/indra/newview/llagentwearablesfetch.cpp b/indra/newview/llagentwearablesfetch.cpp index d911d123f4..0a2f0e9399 100644 --- a/indra/newview/llagentwearablesfetch.cpp +++ b/indra/newview/llagentwearablesfetch.cpp @@ -48,7 +48,7 @@ public: virtual ~LLOrderMyOutfitsOnDestroy() { - if (!LLApp::isRunning()) + if (LLApp::isExiting()) { llwarns << "called during shutdown, skipping" << llendl; return; diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 78edcb3e25..e1635461db 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -999,7 +999,7 @@ bool LLAppearanceMgr::wearItemOnAvatar(const LLUUID& item_id_to_wear, bool do_up { removeCOFItemLinks(gAgentWearables.getWearableItemID(item_to_wear->getWearableType(), wearable_count-1), false); } - addCOFItemLink(item_to_wear, do_update, cb); + addCOFItemLink(item_to_wear, do_update); } break; case LLAssetType::AT_BODYPART: @@ -2183,19 +2183,17 @@ void LLAppearanceMgr::updateIsDirty() } else { - LLIsOfAssetType collector = LLIsOfAssetType(LLAssetType::AT_LINK); - LLInventoryModel::cat_array_t cof_cats; LLInventoryModel::item_array_t cof_items; - gInventory.collectDescendentsIf(cof, cof_cats, cof_items, - LLInventoryModel::EXCLUDE_TRASH, collector); + gInventory.collectDescendents(cof, cof_cats, cof_items, + LLInventoryModel::EXCLUDE_TRASH); LLInventoryModel::cat_array_t outfit_cats; LLInventoryModel::item_array_t outfit_items; - gInventory.collectDescendentsIf(base_outfit, outfit_cats, outfit_items, - LLInventoryModel::EXCLUDE_TRASH, collector); + gInventory.collectDescendents(base_outfit, outfit_cats, outfit_items, + LLInventoryModel::EXCLUDE_TRASH); - if(outfit_items.count() != cof_items.count()) + if(outfit_items.count() != cof_items.count() -1) { // Current outfit folder should have one more item than the outfit folder. // this one item is the link back to the outfit folder itself. @@ -2203,6 +2201,16 @@ void LLAppearanceMgr::updateIsDirty() return; } + //getting rid of base outfit folder link to simplify comparison + for (LLInventoryModel::item_array_t::iterator it = cof_items.begin(); it != cof_items.end(); ++it) + { + if (*it == base_outfit_item) + { + cof_items.erase(it); + break; + } + } + //"dirty" - also means a difference in linked UUIDs and/or a difference in wearables order (links' descriptions) std::sort(cof_items.begin(), cof_items.end(), sort_by_linked_uuid); std::sort(outfit_items.begin(), outfit_items.end(), sort_by_linked_uuid); diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index 99156b9d9d..3275d784a3 100644 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -211,7 +211,7 @@ void LLAvatarList::setDirty(bool val /*= true*/, bool force_refresh /*= false*/) void LLAvatarList::addAvalineItem(const LLUUID& item_id, const LLUUID& session_id, const std::string& item_name) { LL_DEBUGS("Avaline") << "Adding avaline item into the list: " << item_name << "|" << item_id << ", session: " << session_id << LL_ENDL; - LLAvalineListItem* item = new LLAvalineListItem(/*hide_number=*/false); + LLAvalineListItem* item = new LLAvalineListItem; item->setAvatarId(item_id, session_id, true, false); item->setName(item_name); diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 2826899cb0..6897f4ee8e 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -1886,7 +1886,7 @@ void LLScriptChiclet::onMenuItemClicked(const LLSD& user_data) if("end" == action) { - LLScriptFloaterManager::instance().removeNotification(getSessionId()); + LLScriptFloaterManager::instance().onRemoveNotification(getSessionId()); } } @@ -1969,7 +1969,7 @@ void LLInvOfferChiclet::onMenuItemClicked(const LLSD& user_data) if("end" == action) { - LLScriptFloaterManager::instance().removeNotification(getSessionId()); + LLScriptFloaterManager::instance().onRemoveNotification(getSessionId()); } } diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp index f356a04fa4..629a92db11 100644 --- a/indra/newview/llcofwearables.cpp +++ b/indra/newview/llcofwearables.cpp @@ -284,7 +284,6 @@ LLCOFWearables::LLCOFWearables() : LLPanel(), mAttachmentsTab(NULL), mBodyPartsTab(NULL), mLastSelectedTab(NULL), - mCOFVersion(-1), mAccordionCtrl(NULL) { mClothingMenu = new CofClothingContextMenu(this); @@ -382,24 +381,6 @@ void LLCOFWearables::onAccordionTabStateChanged(LLUICtrl* ctrl, const LLSD& expa void LLCOFWearables::refresh() { - const LLUUID cof_id = LLAppearanceMgr::instance().getCOF(); - if (cof_id.isNull()) - { - llwarns << "COF ID cannot be NULL" << llendl; - return; - } - - LLViewerInventoryCategory* catp = gInventory.getCategory(cof_id); - if (!catp) - { - llwarns << "COF category cannot be NULL" << llendl; - return; - } - - // BAP - removed check; does not detect item name changes. - //if (mCOFVersion == catp->getVersion()) return; - mCOFVersion = catp->getVersion(); - typedef std::vector<LLSD> values_vector_t; typedef std::map<LLFlatListView*, values_vector_t> selection_map_t; @@ -415,7 +396,7 @@ void LLCOFWearables::refresh() LLInventoryModel::cat_array_t cats; LLInventoryModel::item_array_t cof_items; - gInventory.collectDescendents(cof_id, cats, cof_items, LLInventoryModel::EXCLUDE_TRASH); + gInventory.collectDescendents(LLAppearanceMgr::getInstance()->getCOF(), cats, cof_items, LLInventoryModel::EXCLUDE_TRASH); populateAttachmentsAndBodypartsLists(cof_items); @@ -523,7 +504,7 @@ LLPanelClothingListItem* LLCOFWearables::buildClothingListItem(LLViewerInventory item_panel->childSetAction("btn_edit", mCOFCallbacks.mEditWearable); //turning on gray separator line for the last item in the items group of the same wearable type - item_panel->setSeparatorVisible(last); + item_panel->childSetVisible("wearable_type_separator_icon", last); return item_panel; } diff --git a/indra/newview/llcofwearables.h b/indra/newview/llcofwearables.h index cd7cc060e5..9a259600a9 100644 --- a/indra/newview/llcofwearables.h +++ b/indra/newview/llcofwearables.h @@ -82,7 +82,6 @@ public: LLPanel* getSelectedItem(); void getSelectedItems(std::vector<LLPanel*>& selected_items) const; - /* Repopulate the COF wearables list if the COF category has been changed since the last refresh */ void refresh(); void clear(); @@ -128,9 +127,6 @@ protected: LLListContextMenu* mBodyPartMenu; LLAccordionCtrl* mAccordionCtrl; - - /* COF category version since last refresh */ - S32 mCOFVersion; }; diff --git a/indra/newview/lldndbutton.cpp b/indra/newview/lldndbutton.cpp index 4f4c7dead7..22f2bb1d16 100644 --- a/indra/newview/lldndbutton.cpp +++ b/indra/newview/lldndbutton.cpp @@ -42,7 +42,7 @@ LLDragAndDropButton::Params::Params() } -LLDragAndDropButton::LLDragAndDropButton(const Params& params) +LLDragAndDropButton::LLDragAndDropButton(Params& params) : LLButton(params) { diff --git a/indra/newview/lldndbutton.h b/indra/newview/lldndbutton.h index 433b3f7ff5..c888268187 100644 --- a/indra/newview/lldndbutton.h +++ b/indra/newview/lldndbutton.h @@ -54,7 +54,7 @@ public: Params(); }; - LLDragAndDropButton(const Params& params); + LLDragAndDropButton(Params& params); typedef boost::function<bool ( S32 /*x*/, S32 /*y*/, MASK /*mask*/, BOOL /*drop*/, diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp index 92fda31cc2..149ba2478d 100644 --- a/indra/newview/llexpandabletextbox.cpp +++ b/indra/newview/llexpandabletextbox.cpp @@ -140,13 +140,7 @@ void LLExpandableTextBox::LLTextBoxEx::setText(const LLStringExplicit& text,cons // LLTextBox::setText will obliterate the expander segment, so make sure // we generate it again by clearing mExpanderVisible mExpanderVisible = false; - - // Workaround for EXT-8259: trim text before rendering it. - { - std::string trimmed_text(text); - LLStringUtil::trim(trimmed_text); - LLTextEditor::setText(trimmed_text, input_params); - } + LLTextEditor::setText(text, input_params); // text contents have changed, segments are cleared out // so hide the expander and determine if we need it diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h index c69f08eb2d..24cd7b8018 100644 --- a/indra/newview/llfolderview.h +++ b/indra/newview/llfolderview.h @@ -262,7 +262,6 @@ public: BOOL needsAutoSelect() { return mNeedsAutoSelect && !mAutoSelectOverride; } BOOL needsAutoRename() { return mNeedsAutoRename; } void setNeedsAutoRename(BOOL val) { mNeedsAutoRename = val; } - void setAutoSelectOverride(BOOL val) { mAutoSelectOverride = val; } void setPinningSelectedItem(BOOL val) { mPinningSelectedItem = val; } void setCallbackRegistrar(LLUICtrl::CommitCallbackRegistry::ScopedRegistrar* registrar) { mCallbackRegistrar = registrar; } diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 21313f9df7..a2b72e7d74 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1022,14 +1022,6 @@ void LLIMModel::sendMessage(const std::string& utf8_text, } else { - // IM_SESSION_INVITE means that this is an Ad-hoc incoming chat - // (it can be also Group chat but it is checked above) - // In this case mInitialTargetIDs contains Ad-hoc session ID and it should not be added - // to Recent People to prevent showing of an item with (???)(???). See EXT-8246. - // Concrete participants will be added into this list once they sent message in chat. - if (IM_SESSION_INVITE == dialog) return; - - // implemented adding of all participants of an outgoing to Recent People List. See EXT-5694. for(uuid_vec_t::iterator it = session->mInitialTargetIDs.begin(); it!=session->mInitialTargetIDs.end();++it) { diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp index cb7b338e95..a2b5ffbac4 100644 --- a/indra/newview/llinspectobject.cpp +++ b/indra/newview/llinspectobject.cpp @@ -161,7 +161,8 @@ BOOL LLInspectObject::postBuild(void) // Hide floater when name links clicked LLTextBox* textbox = getChild<LLTextBox>("object_creator"); - textbox->setURLClickedCallback(boost::bind(&LLInspectObject::closeFloater, this, false) ); + textbox->mURLClickSignal.connect( + boost::bind(&LLInspectObject::closeFloater, this, false) ); // Hook up functionality getChild<LLUICtrl>("buy_btn")->setCommitCallback( diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 3d350606c6..ba357b2361 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -519,19 +519,6 @@ bool LLIsNotType::operator()(LLInventoryCategory* cat, LLInventoryItem* item) return TRUE; } -bool LLIsOfAssetType::operator()(LLInventoryCategory* cat, LLInventoryItem* item) -{ - if(mType == LLAssetType::AT_CATEGORY) - { - if(cat) return TRUE; - } - if(item) - { - if(item->getActualType() == mType) return TRUE; - } - return FALSE; -} - bool LLIsTypeWithPermissions::operator()(LLInventoryCategory* cat, LLInventoryItem* item) { if(mType == LLAssetType::AT_CATEGORY) diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h index 4a7721098d..1c3f82c531 100644 --- a/indra/newview/llinventoryfunctions.h +++ b/indra/newview/llinventoryfunctions.h @@ -174,25 +174,6 @@ protected: LLAssetType::EType mType; }; -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLIsOfAssetType -// -// Implementation of a LLInventoryCollectFunctor which returns TRUE if -// the item or category is of asset type passed in during construction. -// Link types are treated as links, not as the types they point to. -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -class LLIsOfAssetType : public LLInventoryCollectFunctor -{ -public: - LLIsOfAssetType(LLAssetType::EType type) : mType(type) {} - virtual ~LLIsOfAssetType() {} - virtual bool operator()(LLInventoryCategory* cat, - LLInventoryItem* item); -protected: - LLAssetType::EType mType; -}; - class LLIsTypeWithPermissions : public LLInventoryCollectFunctor { public: @@ -290,7 +271,9 @@ public: }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLFindByMask +// Class LLFindNonLinksByMask +// +// //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class LLFindByMask : public LLInventoryCollectFunctor { @@ -399,19 +382,6 @@ public: } }; -/* Filters out items of a particular asset type */ -class LLIsTypeActual : public LLIsType -{ -public: - LLIsTypeActual(LLAssetType::EType type) : LLIsType(type) {} - virtual ~LLIsTypeActual() {} - virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item) - { - if (item && item->getIsLinkType()) return false; - return LLIsType::operator()(cat, item); - } -}; - // Collect non-removable folders and items. class LLFindNonRemovableObjects : public LLInventoryCollectFunctor { diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp index e01f05c0f2..fbb3774917 100644 --- a/indra/newview/llinventoryitemslist.cpp +++ b/indra/newview/llinventoryitemslist.cpp @@ -107,12 +107,9 @@ void LLInventoryItemsList::idle(void* user_data) } } -LLFastTimer::DeclareTimer FTM_INVENTORY_ITEMS_REFRESH("Inventory List Refresh"); - void LLInventoryItemsList::refresh() { - LLFastTimer _(FTM_INVENTORY_ITEMS_REFRESH); - static const unsigned ADD_LIMIT = 20; + static const unsigned ADD_LIMIT = 50; uuid_vec_t added_items; uuid_vec_t removed_items; @@ -143,8 +140,7 @@ void LLInventoryItemsList::refresh() it = removed_items.begin(); for( ; removed_items.end() != it; ++it) { - // don't filter items right away - removeItemByUUID(*it, false); + removeItemByUUID(*it); } // Filter, rearrange and notify parent about shape changes diff --git a/indra/newview/llinventorylistitem.cpp b/indra/newview/llinventorylistitem.cpp index c2ee5c8c8b..c487aa10a7 100644 --- a/indra/newview/llinventorylistitem.cpp +++ b/indra/newview/llinventorylistitem.cpp @@ -44,7 +44,6 @@ // newview #include "llinventorymodel.h" #include "llviewerinventory.h" -#include "llinventorydefines.h" static LLWidgetNameRegistry::StaticRegistrar sRegisterPanelInventoryListItemBaseParams(&typeid(LLPanelInventoryListItemBase::Params), "inventory_list_item"); @@ -52,12 +51,7 @@ static const S32 WIDGET_SPACING = 3; LLPanelInventoryListItemBase::Params::Params() : default_style("default_style"), - worn_style("worn_style"), - hover_image("hover_image"), - selected_image("selected_image"), - separator_image("separator_image"), - item_icon("item_icon"), - item_name("item_name") + worn_style("worn_style") {}; LLPanelInventoryListItemBase* LLPanelInventoryListItemBase::create(LLViewerInventoryItem* item) @@ -65,10 +59,8 @@ LLPanelInventoryListItemBase* LLPanelInventoryListItemBase::create(LLViewerInven LLPanelInventoryListItemBase* list_item = NULL; if (item) { - const LLPanelInventoryListItemBase::Params& params = LLUICtrlFactory::getDefaultParams<LLPanelInventoryListItemBase>(); - list_item = new LLPanelInventoryListItemBase(item, params); - list_item->initFromParams(params); - list_item->postBuild(); + list_item = new LLPanelInventoryListItemBase(item); + list_item->init(); } return list_item; } @@ -84,28 +76,6 @@ void LLPanelInventoryListItemBase::draw() } setNeedsRefresh(false); } - - if (mHovered && mHoverImage) - { - mHoverImage->draw(getLocalRect()); - } - - if (mSelected && mSelectedImage) - { - mSelectedImage->draw(getLocalRect()); - } - - if (mSeparatorVisible && mSeparatorImage) - { - // place under bottom of listitem, using image height - // item_pad in list using the item should be >= image height - // to avoid cropping of top of the next item. - LLRect separator_rect = getLocalRect(); - separator_rect.mTop = separator_rect.mBottom; - separator_rect.mBottom -= mSeparatorImage->getHeight(); - mSeparatorImage->draw(separator_rect); - } - LLPanel::draw(); } @@ -164,10 +134,13 @@ void LLPanelInventoryListItemBase::setShowWidget(LLUICtrl* ctrl, bool show) BOOL LLPanelInventoryListItemBase::postBuild() { + setIconCtrl(getChild<LLIconCtrl>("item_icon")); + setTitleCtrl(getChild<LLTextBox>("item_name")); + LLViewerInventoryItem* inv_item = getItem(); if (inv_item) { - mIconImage = LLInventoryIcon::getIcon(inv_item->getType(), inv_item->getInventoryType(), inv_item->getFlags(), LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS & inv_item->getFlags()); + mIconImage = LLInventoryIcon::getIcon(inv_item->getType(), inv_item->getInventoryType(), inv_item->getFlags(), FALSE); updateItem(inv_item->getName()); } @@ -183,18 +156,18 @@ void LLPanelInventoryListItemBase::setValue(const LLSD& value) { if (!value.isMap()) return; if (!value.has("selected")) return; - mSelected = value["selected"]; + childSetVisible("selected_icon", value["selected"]); } void LLPanelInventoryListItemBase::onMouseEnter(S32 x, S32 y, MASK mask) { - mHovered = true; + childSetVisible("hovered_icon", true); LLPanel::onMouseEnter(x, y, mask); } void LLPanelInventoryListItemBase::onMouseLeave(S32 x, S32 y, MASK mask) { - mHovered = false; + childSetVisible("hovered_icon", false); LLPanel::onMouseLeave(x, y, mask); } @@ -271,47 +244,21 @@ S32 LLPanelInventoryListItemBase::notify(const LLSD& info) return rv; } -LLPanelInventoryListItemBase::LLPanelInventoryListItemBase(LLViewerInventoryItem* item, const LLPanelInventoryListItemBase::Params& params) -: LLPanel(params), - mInventoryItemUUID(item ? item->getUUID() : LLUUID::null), - mIconCtrl(NULL), - mTitleCtrl(NULL), - mWidgetSpacing(WIDGET_SPACING), - mLeftWidgetsWidth(0), - mRightWidgetsWidth(0), - mNeedsRefresh(false), - mHovered(false), - mSelected(false), - mSeparatorVisible(false), - mHoverImage(params.hover_image), - mSelectedImage(params.selected_image), - mSeparatorImage(params.separator_image) +LLPanelInventoryListItemBase::LLPanelInventoryListItemBase(LLViewerInventoryItem* item) +: LLPanel() +, mInventoryItemUUID(item ? item->getUUID() : LLUUID::null) +, mIconCtrl(NULL) +, mTitleCtrl(NULL) +, mWidgetSpacing(WIDGET_SPACING) +, mLeftWidgetsWidth(0) +, mRightWidgetsWidth(0) +, mNeedsRefresh(false) { - LLIconCtrl::Params icon_params(params.item_icon); - applyXUILayout(icon_params, this); - - mIconCtrl = LLUICtrlFactory::create<LLIconCtrl>(icon_params); - if (mIconCtrl) - { - addChild(mIconCtrl); - } - else - { - mIconCtrl = dynamic_cast<LLIconCtrl*>(LLUICtrlFactory::createDefaultWidget<LLIconCtrl>("item_icon")); - } - - LLTextBox::Params text_params(params.item_name); - applyXUILayout(text_params, this); +} - mTitleCtrl = LLUICtrlFactory::create<LLTextBox>(text_params); - if (mTitleCtrl) - { - addChild(mTitleCtrl); - } - else - { - mTitleCtrl = dynamic_cast<LLTextBox*>(LLUICtrlFactory::createDefaultWidget<LLTextBox>("item_title")); - } +void LLPanelInventoryListItemBase::init() +{ + LLUICtrlFactory::getInstance()->buildPanel(this, "panel_inventory_item.xml"); } class WidgetVisibilityChanger diff --git a/indra/newview/llinventorylistitem.h b/indra/newview/llinventorylistitem.h index 575f6aec19..f29d92d51c 100644 --- a/indra/newview/llinventorylistitem.h +++ b/indra/newview/llinventorylistitem.h @@ -41,12 +41,12 @@ // llui #include "llpanel.h" #include "llstyle.h" -#include "lliconctrl.h" -#include "lltextbox.h" // newview #include "llwearabletype.h" +class LLIconCtrl; +class LLTextBox; class LLViewerInventoryItem; /** @@ -70,11 +70,6 @@ public: { Optional<LLStyle::Params> default_style, worn_style; - Optional<LLUIImage*> hover_image, - selected_image, - separator_image; - Optional<LLIconCtrl::Params> item_icon; - Optional<LLTextBox::Params> item_name; Params(); }; @@ -154,22 +149,30 @@ public: /** Get the associated inventory item */ LLViewerInventoryItem* getItem() const; - void setSeparatorVisible(bool visible) { mSeparatorVisible = visible; } - virtual ~LLPanelInventoryListItemBase(){} protected: - LLPanelInventoryListItemBase(LLViewerInventoryItem* item, const Params& params); + LLPanelInventoryListItemBase(LLViewerInventoryItem* item); typedef std::vector<LLUICtrl*> widget_array_t; /** + * Use it from a factory function to build panel, do not build panel in constructor + */ + virtual void init(); + + /** * Called after inventory item was updated, update panel widgets to reflect inventory changes. */ virtual void updateItem(const std::string& name, EItemState item_state = IS_DEFAULT); + /** setter for mIconCtrl */ + void setIconCtrl(LLIconCtrl* icon) { mIconCtrl = icon; } + /** setter for MTitleCtrl */ + void setTitleCtrl(LLTextBox* tb) { mTitleCtrl = tb; } + void setLeftWidgetsWidth(S32 width) { mLeftWidgetsWidth = width; } void setRightWidgetsWidth(S32 width) { mRightWidgetsWidth = width; } @@ -218,14 +221,6 @@ private: LLTextBox* mTitleCtrl; LLUIImagePtr mIconImage; - LLUIImagePtr mHoverImage; - LLUIImagePtr mSelectedImage; - LLUIImagePtr mSeparatorImage; - - bool mHovered; - bool mSelected; - bool mSeparatorVisible; - std::string mHighlightedText; widget_array_t mLeftSideWidgets; diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 46ebb54786..b8590d838e 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -1052,7 +1052,7 @@ void LLLocationInputCtrl::changeLocationPresentation() //needs unescaped one LLSLURL slurl; LLAgentUI::buildSLURL(slurl, false); - mTextEntry->setText(LLURI::unescape(slurl.getSLURLString())); + mTextEntry->setText(slurl.getSLURLString()); mTextEntry->selectAll(); mMaturityButton->setVisible(FALSE); diff --git a/indra/newview/llpanelgenerictip.cpp b/indra/newview/llpanelgenerictip.cpp index 8ba2e6d01c..e0658554a4 100644 --- a/indra/newview/llpanelgenerictip.cpp +++ b/indra/newview/llpanelgenerictip.cpp @@ -35,7 +35,6 @@ #include "llpanelgenerictip.h" #include "llnotifications.h" -#include "llviewercontrol.h" // for gSavedSettings LLPanelGenericTip::LLPanelGenericTip( @@ -46,8 +45,7 @@ LLPanelGenericTip::LLPanelGenericTip( childSetValue("message", notification->getMessage()); - - S32 max_line_count = gSavedSettings.getS32("TipToastMessageLineCount"); - snapToMessageHeight(getChild<LLTextBox> ("message"), max_line_count); + // set line max count to 3 in case of a very long name + snapToMessageHeight(getChild<LLTextBox> ("message"), 3); } diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 56b73fe55b..17ec0d3a56 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -197,15 +197,14 @@ BOOL LLPanelMainInventory::postBuild() mFilterEditor->setCommitCallback(boost::bind(&LLPanelMainInventory::onFilterEdit, this, _2)); } - initListCommandsHandlers(); - // *TODO:Get the cost info from the server const std::string upload_cost("10"); - mMenuAdd->getChild<LLMenuItemGL>("Upload Image")->setLabelArg("[COST]", upload_cost); - mMenuAdd->getChild<LLMenuItemGL>("Upload Sound")->setLabelArg("[COST]", upload_cost); - mMenuAdd->getChild<LLMenuItemGL>("Upload Animation")->setLabelArg("[COST]", upload_cost); - mMenuAdd->getChild<LLMenuItemGL>("Bulk Upload")->setLabelArg("[COST]", upload_cost); + childSetLabelArg("Upload Image", "[COST]", upload_cost); + childSetLabelArg("Upload Sound", "[COST]", upload_cost); + childSetLabelArg("Upload Animation", "[COST]", upload_cost); + childSetLabelArg("Bulk Upload", "[COST]", upload_cost); + initListCommandsHandlers(); return TRUE; } diff --git a/indra/newview/llpanelonlinestatus.cpp b/indra/newview/llpanelonlinestatus.cpp index b21fd7d385..6ba015b11c 100644 --- a/indra/newview/llpanelonlinestatus.cpp +++ b/indra/newview/llpanelonlinestatus.cpp @@ -34,7 +34,6 @@ #include "llnotifications.h" #include "llpanelonlinestatus.h" -#include "llviewercontrol.h" // for gSavedSettings LLPanelOnlineStatus::LLPanelOnlineStatus( const LLNotificationPtr& notification) : @@ -55,7 +54,7 @@ LLPanelOnlineStatus::LLPanelOnlineStatus( notification, notification->getResponseTemplate())); } - S32 max_line_count = gSavedSettings.getS32("TipToastMessageLineCount"); - snapToMessageHeight(getChild<LLTextBox> ("message"), max_line_count); + // set line max count to 3 in case of a very long name + snapToMessageHeight(getChild<LLTextBox> ("message"), 3); } diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 2cd354277e..5195b719d4 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -71,7 +71,6 @@ #include "llsdutil.h" #include "llsidepanelappearance.h" #include "lltoggleablemenu.h" -#include "llvoavatarself.h" #include "llwearablelist.h" #include "llwearableitemslist.h" #include "llwearabletype.h" @@ -264,7 +263,7 @@ LLPanelOutfitEdit::LLPanelOutfitEdit() observer.addBOFReplacedCallback(boost::bind(&LLPanelOutfitEdit::updateCurrentOutfitName, this)); observer.addBOFChangedCallback(boost::bind(&LLPanelOutfitEdit::updateVerbs, this)); observer.addOutfitLockChangedCallback(boost::bind(&LLPanelOutfitEdit::updateVerbs, this)); - observer.addCOFChangedCallback(boost::bind(&LLPanelOutfitEdit::onCOFChanged, this)); + observer.addCOFChangedCallback(boost::bind(&LLPanelOutfitEdit::update, this)); gAgentWearables.addLoadingStartedCallback(boost::bind(&LLPanelOutfitEdit::onOutfitChanging, this, true)); gAgentWearables.addLoadedCallback(boost::bind(&LLPanelOutfitEdit::onOutfitChanging, this, false)); @@ -283,8 +282,6 @@ LLPanelOutfitEdit::~LLPanelOutfitEdit() delete mCOFDragAndDropObserver; - delete mWearableListViewItemsComparator; - while (!mListViewItemTypes.empty()) { delete mListViewItemTypes.back(); mListViewItemTypes.pop_back(); @@ -300,9 +297,9 @@ BOOL LLPanelOutfitEdit::postBuild() mFolderViewItemTypes[FVIT_ATTACHMENT] = LLLookItemType(getString("Filter.Objects"), ATTACHMENT_MASK); //order is important, see EListViewItemType for order information - mListViewItemTypes.push_back(new LLFilterItem(getString("Filter.All"), new LLFindNonLinksByMask(ALL_ITEMS_MASK))); - mListViewItemTypes.push_back(new LLFilterItem(getString("Filter.Clothing"), new LLIsTypeActual(LLAssetType::AT_CLOTHING))); - mListViewItemTypes.push_back(new LLFilterItem(getString("Filter.Bodyparts"), new LLIsTypeActual(LLAssetType::AT_BODYPART))); + mListViewItemTypes.push_back(new LLFilterItem(getString("Filter.All"), new LLFindByMask(ALL_ITEMS_MASK))); + mListViewItemTypes.push_back(new LLFilterItem(getString("Filter.Clothing"), new LLIsType(LLAssetType::AT_CLOTHING))); + mListViewItemTypes.push_back(new LLFilterItem(getString("Filter.Bodyparts"), new LLIsType(LLAssetType::AT_BODYPART))); mListViewItemTypes.push_back(new LLFilterItem(getString("Filter.Objects"), new LLFindByMask(ATTACHMENT_MASK)));; mListViewItemTypes.push_back(new LLFilterItem(LLTrans::getString("shape"), new LLFindActualWearablesOfType(LLWearableType::WT_SHAPE))); mListViewItemTypes.push_back(new LLFilterItem(LLTrans::getString("skin"), new LLFindActualWearablesOfType(LLWearableType::WT_SKIN))); @@ -334,7 +331,7 @@ BOOL LLPanelOutfitEdit::postBuild() childSetCommitCallback("shop_btn_1", boost::bind(&LLPanelOutfitEdit::onShopButtonClicked, this), NULL); childSetCommitCallback("shop_btn_2", boost::bind(&LLPanelOutfitEdit::onShopButtonClicked, this), NULL); - setVisibleCallback(boost::bind(&LLPanelOutfitEdit::onVisibilityChange, this, _2)); + setVisibleCallback(boost::bind(&LLPanelOutfitEdit::onVisibilityChange, this)); mCOFWearables = getChild<LLCOFWearables>("cof_wearables_list"); mCOFWearables->setCommitCallback(boost::bind(&LLPanelOutfitEdit::filterWearablesBySelectedItem, this)); @@ -350,8 +347,8 @@ BOOL LLPanelOutfitEdit::postBuild() mInventoryItemsPanel = getChild<LLInventoryPanel>("folder_view"); mInventoryItemsPanel->setFilterTypes(ALL_ITEMS_MASK); mInventoryItemsPanel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); - mInventoryItemsPanel->setSelectCallback(boost::bind(&LLPanelOutfitEdit::updatePlusButton, this)); - mInventoryItemsPanel->getRootFolder()->setReshapeCallback(boost::bind(&LLPanelOutfitEdit::updatePlusButton, this)); + mInventoryItemsPanel->setSelectCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this)); + mInventoryItemsPanel->getRootFolder()->setReshapeCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this)); mCOFDragAndDropObserver = new LLCOFDragAndDropObserver(mInventoryItemsPanel->getModel()); @@ -388,24 +385,11 @@ BOOL LLPanelOutfitEdit::postBuild() childSetAction(REVERT_BTN, boost::bind(&LLAppearanceMgr::wearBaseOutfit, LLAppearanceMgr::getInstance())); - /* - * By default AT_CLOTHING are sorted by (in in MY OUTFITS): - * - by type (types order determined in LLWearableType::EType) - * - each LLWearableType::EType by outer layer on top - * - * In Add More panel AT_CLOTHING should be sorted in a such way: - * - by type (types order determined in LLWearableType::EType) - * - each LLWearableType::EType by name (EXT-8205) - */ - mWearableListViewItemsComparator = new LLWearableItemTypeNameComparator(); - mWearableListViewItemsComparator->setOrder(LLAssetType::AT_CLOTHING, LLWearableItemTypeNameComparator::ORDER_RANK_1, false, true); - mWearablesListViewPanel = getChild<LLPanel>("filtered_wearables_panel"); mWearableItemsList = getChild<LLInventoryItemsList>("list_view"); mWearableItemsList->setCommitOnSelectionChange(true); - mWearableItemsList->setCommitCallback(boost::bind(&LLPanelOutfitEdit::updatePlusButton, this)); + mWearableItemsList->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this)); mWearableItemsList->setDoubleClickCallback(boost::bind(&LLPanelOutfitEdit::onPlusBtnClicked, this)); - mWearableItemsList->setComparator(mWearableListViewItemsComparator); mSaveComboBtn.reset(new LLSaveOutfitComboBtn(this)); return TRUE; @@ -458,9 +442,6 @@ void LLPanelOutfitEdit::showAddWearablesPanel(bool show_add_wearables) mListViewFilterCmbBox->setVisible(false); showWearablesFilter(); - - // Reset mWearableItemsList position to top. See EXT-8180. - mWearableItemsList->goToTop(); } //switching button bars @@ -602,16 +583,11 @@ void LLPanelOutfitEdit::onPlusBtnClicked(void) } } -void LLPanelOutfitEdit::onVisibilityChange(const LLSD &in_visible_chain) +void LLPanelOutfitEdit::onVisibilityChange() { showAddWearablesPanel(false); mWearableItemsList->resetSelection(); mInventoryItemsPanel->clearSelection(); - - if (in_visible_chain.asBoolean()) - { - update(); - } } void LLPanelOutfitEdit::onAddWearableClicked(void) @@ -638,63 +614,15 @@ void LLPanelOutfitEdit::onShopButtonClicked() { static LLShopURLDispatcher url_resolver; - // will contain the resultant URL std::string url; - - if (isAgentAvatarValid()) - { - // try to get wearable type from 'Add More' panel first (EXT-7639) - selection_info_t selection_info = getAddMorePanelSelectionType(); - - LLWearableType::EType type = selection_info.first; - - if (selection_info.second > 1) - { - // the second argument is not important in this case: generic market place will be opened - url = url_resolver.resolveURL(LLWearableType::WT_NONE, SEX_FEMALE); - } - else - { - if (type == LLWearableType::WT_NONE) - { - type = getCOFWearablesSelectionType(); - } - - ESex sex = gAgentAvatarp->getSex(); - - // WT_INVALID comes for attachments - if (type != LLWearableType::WT_INVALID && type != LLWearableType::WT_NONE) - { - url = url_resolver.resolveURL(type, sex); - } - - if (url.empty()) - { - url = url_resolver.resolveURL( - mCOFWearables->getExpandedAccordionAssetType(), sex); - } - } - } - else - { - llwarns << "Agent avatar is invalid" << llendl; - - // the second argument is not important in this case: generic market place will be opened - url = url_resolver.resolveURL(LLWearableType::WT_NONE, SEX_FEMALE); - } - - LLWeb::loadURLExternal(url); -} - -LLWearableType::EType LLPanelOutfitEdit::getCOFWearablesSelectionType() const -{ std::vector<LLPanel*> selected_items; - LLWearableType::EType type = LLWearableType::WT_NONE; - mCOFWearables->getSelectedItems(selected_items); + ESex sex = gSavedSettings.getU32("AvatarSex") ? SEX_MALE : SEX_FEMALE; + if (selected_items.size() == 1) { + LLWearableType::EType type = LLWearableType::WT_NONE; LLPanel* item = selected_items.front(); // LLPanelDummyClothingListItem is lower then LLPanelInventoryListItemBase in hierarchy tree @@ -706,49 +634,20 @@ LLWearableType::EType LLPanelOutfitEdit::getCOFWearablesSelectionType() const { type = real_item->getWearableType(); } - } - - return type; -} -LLPanelOutfitEdit::selection_info_t LLPanelOutfitEdit::getAddMorePanelSelectionType() const -{ - selection_info_t result = std::make_pair(LLWearableType::WT_NONE, 0); - - if (mAddWearablesPanel != NULL && mAddWearablesPanel->getVisible()) - { - if (mInventoryItemsPanel != NULL && mInventoryItemsPanel->getVisible()) + // WT_INVALID comes for attachments + if (type != LLWearableType::WT_INVALID) { - std::set<LLUUID> selected_uuids = mInventoryItemsPanel->getRootFolder()->getSelectionList(); - - result.second = selected_uuids.size(); - - if (result.second == 1) - { - result.first = getWearableTypeByItemUUID(*(selected_uuids.begin())); - } - } - else if (mWearableItemsList != NULL && mWearableItemsList->getVisible()) - { - std::vector<LLUUID> selected_uuids; - mWearableItemsList->getSelectedUUIDs(selected_uuids); - - result.second = selected_uuids.size(); - - if (result.second == 1) - { - result.first = getWearableTypeByItemUUID(selected_uuids.front()); - } + url = url_resolver.resolveURL(type, sex); } } - return result; -} + if (url.empty()) + { + url = url_resolver.resolveURL(mCOFWearables->getExpandedAccordionAssetType(), sex); + } -LLWearableType::EType LLPanelOutfitEdit::getWearableTypeByItemUUID(const LLUUID& item_uuid) const -{ - LLViewerInventoryItem* item = gInventory.getLinkedItem(item_uuid); - return (item != NULL) ? item->getWearableType() : LLWearableType::WT_NONE; + LLWeb::loadURLExternal(url); } void LLPanelOutfitEdit::onRemoveFromOutfitClicked(void) @@ -768,7 +667,7 @@ void LLPanelOutfitEdit::onEditWearableClicked(void) } } -void LLPanelOutfitEdit::updatePlusButton() +void LLPanelOutfitEdit::onInventorySelectionChange() { uuid_vec_t selected_items; getSelectedItemsUUID(selected_items); @@ -779,7 +678,7 @@ void LLPanelOutfitEdit::updatePlusButton() } // If any of the selected items are not wearable (due to already being worn OR being of the wrong type), disable the add button. - uuid_vec_t::iterator unwearable_item = std::find_if(selected_items.begin(), selected_items.end(), !boost::bind(&get_can_item_be_worn, _1)); + uuid_vec_t::iterator unwearable_item = std::find_if(selected_items.begin(), selected_items.end(), !boost::bind(& get_can_item_be_worn, _1)); bool can_add = ( unwearable_item == selected_items.end() ); mPlusBtn->setEnabled(can_add); @@ -839,38 +738,15 @@ void LLPanelOutfitEdit::filterWearablesBySelectedItem(void) bool more_than_one_selected = ids.size() > 1; bool is_dummy_item = (ids.size() && dynamic_cast<LLPanelDummyClothingListItem*>(mCOFWearables->getSelectedItem())); - // selected, expanded accordion tabs and selection in flat list view determine filtering when no item is selected in COF - // selection in flat list view participates in determining filtering because of EXT-7963 - // So the priority of criterions in is: - // 1. Selected accordion tab | IF (any accordion selected) - // | filter_type = selected_accordion_type - // 2. Selected item in flat list view | ELSEIF (any item in flat list view selected) - // | filter_type = selected_item_type - // 3. Expanded accordion tab | ELSEIF (any accordion expanded) - // | filter_type = expanded accordion_type + //selected and expanded accordion tabs determine filtering when no item is selected if (nothing_selected) { showWearablesListView(); - //selected accordion tab is more priority than expanded tab - //and selected item in flat list view of 'Add more' panel when - //determining filtering + //selected accordion tab is more priority than expanded tab when determining filtering LLAssetType::EType type = mCOFWearables->getSelectedAccordionAssetType(); if (type == LLAssetType::AT_NONE) - { //no accordion selected - - // when no accordion selected then selected item from flat list view - // has more priority than expanded when determining filtering - LLUUID selected_item_id = mWearableItemsList->getSelectedUUID(); - LLViewerInventoryItem* item = gInventory.getLinkedItem(selected_item_id); - if(item) - { - showFilteredWearablesListView(item->getWearableType()); - return; - } - - // when no accordion selected and no selected items in flat list view - // determine filtering according to expanded accordion + { type = mCOFWearables->getExpandedAccordionAssetType(); } @@ -1034,9 +910,6 @@ void LLPanelOutfitEdit::updateVerbs() mStatus->setText(outfit_is_dirty ? getString("unsaved_changes") : getString("now_editing")); updateCurrentOutfitName(); - - //updating state of "Wear Item" button previously known as "Plus" button - updatePlusButton(); } bool LLPanelOutfitEdit::switchPanels(LLPanel* switch_from_panel, LLPanel* switch_to_panel) @@ -1084,6 +957,9 @@ void LLPanelOutfitEdit::showFilteredWearablesListView(LLWearableType::EType type showAddWearablesPanel(true); showWearablesListView(); + // Reset mWearableItemsList position to top. See EXT-8180. + mWearableItemsList->goToTop(); + //e_list_view_item_type implicitly contains LLWearableType::EType starting from LVIT_SHAPE applyListViewFilter((EListViewItemType) (LVIT_SHAPE + type)); } @@ -1150,10 +1026,5 @@ void LLPanelOutfitEdit::getSelectedItemsUUID(uuid_vec_t& uuid_list) // return selected_id; } -void LLPanelOutfitEdit::onCOFChanged() -{ - update(); -} - // EOF diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h index 13ceda98a6..5009de0fef 100644 --- a/indra/newview/llpaneloutfitedit.h +++ b/indra/newview/llpaneloutfitedit.h @@ -64,7 +64,6 @@ class LLMenuGL; class LLFindNonLinksByMask; class LLFindWearablesOfType; class LLSaveOutfitComboBtn; -class LLWearableItemTypeNameComparator; class LLPanelOutfitEdit : public LLPanel { @@ -146,10 +145,10 @@ public: void onFolderViewFilterCommitted(LLUICtrl* ctrl); void onListViewFilterCommitted(LLUICtrl* ctrl); void onSearchEdit(const std::string& string); - void updatePlusButton(); + void onInventorySelectionChange(); void onPlusBtnClicked(void); - void onVisibilityChange(const LLSD &in_visible_chain); + void onVisibilityChange(); void applyFolderViewFilter(EFolderViewItemType type); void applyListViewFilter(EListViewItemType type); @@ -199,13 +198,6 @@ private: void onOutfitChanging(bool started); void getSelectedItemsUUID(uuid_vec_t& uuid_list); void getCurrentItemUUID(LLUUID& selected_id); - void onCOFChanged(); - - typedef std::pair<LLWearableType::EType, size_t> selection_info_t; - - LLWearableType::EType getCOFWearablesSelectionType() const; - selection_info_t getAddMorePanelSelectionType() const; - LLWearableType::EType getWearableTypeByItemUUID(const LLUUID& item_uuid) const; LLTextBox* mCurrentOutfitName; LLTextBox* mStatus; @@ -225,7 +217,6 @@ private: LLFilteredWearableListManager* mWearableListManager; LLInventoryItemsList* mWearableItemsList; LLPanel* mWearablesListViewPanel; - LLWearableItemTypeNameComparator* mWearableListViewItemsComparator; LLCOFDragAndDropObserver* mCOFDragAndDropObserver; diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index f2e6969998..8fe78a0f81 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -582,7 +582,7 @@ void LLParticipantList::addAvatarIDExceptAgent(const LLUUID& avatar_id) else { std::string display_name = LLVoiceClient::getInstance()->getDisplayName(avatar_id); - mAvatarList->addAvalineItem(avatar_id, mSpeakerMgr->getSessionID(), display_name.empty() ? LLTrans::getString("AvatarNameWaiting") : display_name); + mAvatarList->addAvalineItem(avatar_id, mSpeakerMgr->getSessionID(), display_name.empty() ? display_name : LLTrans::getString("AvatarNameWaiting")); mAvalineUpdater->watchAvalineCaller(avatar_id); } adjustParticipant(avatar_id); diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index 7fdc5c8b5f..ef6ceb5f2e 100644 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -75,8 +75,7 @@ LLPreviewTexture::LLPreviewTexture(const LLSD& key) mLastWidth(0), mAspectRatio(0.f), mPreviewToSave(FALSE), - mImage(NULL), - mImageOldBoostLevel(LLViewerTexture::BOOST_NONE) + mImage(NULL) { updateImageID(); if (key.has("save_as")) @@ -94,7 +93,7 @@ LLPreviewTexture::~LLPreviewTexture() { getWindow()->decBusyCount(); } - mImage->setBoostLevel(mImageOldBoostLevel); + mImage = NULL; } @@ -544,7 +543,6 @@ void LLPreviewTexture::onAspectRatioCommit(LLUICtrl* ctrl, void* userdata) void LLPreviewTexture::loadAsset() { mImage = LLViewerTextureManager::getFetchedTexture(mImageID, MIPMAP_TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); - mImageOldBoostLevel = mImage->getBoostLevel(); mImage->setBoostLevel(LLViewerTexture::BOOST_PREVIEW); mImage->forceToSaveRawImage(0) ; mAssetStatus = PREVIEW_ASSET_LOADING; diff --git a/indra/newview/llpreviewtexture.h b/indra/newview/llpreviewtexture.h index cbdb057781..0f29a741c1 100644 --- a/indra/newview/llpreviewtexture.h +++ b/indra/newview/llpreviewtexture.h @@ -82,10 +82,9 @@ private: void updateDimensions(); LLUUID mImageID; LLPointer<LLViewerFetchedTexture> mImage; - S32 mImageOldBoostLevel; + BOOL mLoadingFullImage; std::string mSaveFileName; LLFrameTimer mSavedFileTimer; - BOOL mLoadingFullImage; BOOL mShowKeepDiscard; BOOL mCopyToInv; @@ -95,10 +94,11 @@ private: // This is stored off in a member variable, because the save-as // button and drag and drop functionality need to know. BOOL mIsCopyable; - BOOL mUpdateDimensions; + S32 mLastHeight; S32 mLastWidth; - F32 mAspectRatio; + F32 mAspectRatio; + BOOL mUpdateDimensions; LLLoadedCallbackEntry::source_callback_list_t mCallbackTextureList ; }; diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index 75797dae81..b68fc3b002 100644 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -176,15 +176,7 @@ void LLScriptFloater::onClose(bool app_quitting) if(getNotificationId().notNull()) { - // we shouldn't kill notification on exit since it may be used as persistent. - if (app_quitting) - { - LLScriptFloaterManager::getInstance()->onRemoveNotification(getNotificationId()); - } - else - { - LLScriptFloaterManager::getInstance()->removeNotification(getNotificationId()); - } + LLScriptFloaterManager::getInstance()->onRemoveNotification(getNotificationId()); } } @@ -360,7 +352,7 @@ void LLScriptFloaterManager::onAddNotification(const LLUUID& notification_id) set_new_message |= !floater->hasFocus(); } - removeNotification(it->first); + onRemoveNotification(it->first); } } @@ -387,17 +379,6 @@ void LLScriptFloaterManager::onAddNotification(const LLUUID& notification_id) toggleScriptFloater(notification_id, set_new_message); } -void LLScriptFloaterManager::removeNotification(const LLUUID& notification_id) -{ - LLNotificationPtr notification = LLNotifications::instance().find(notification_id); - if (notification != NULL && !notification->isCancelled()) - { - LLNotificationsUtil::cancel(notification); - } - - onRemoveNotification(notification_id); -} - void LLScriptFloaterManager::onRemoveNotification(const LLUUID& notification_id) { if(notification_id.isNull()) @@ -411,8 +392,6 @@ void LLScriptFloaterManager::onRemoveNotification(const LLUUID& notification_id) LLIMWellWindow::getInstance()->removeObjectRow(notification_id); - mNotifications.erase(notification_id); - // close floater LLScriptFloater* floater = LLFloaterReg::findTypedInstance<LLScriptFloater>("script_floater", notification_id); if(floater) @@ -421,6 +400,8 @@ void LLScriptFloaterManager::onRemoveNotification(const LLUUID& notification_id) floater->setNotificationId(LLUUID::null); floater->closeFloater(); } + + mNotifications.erase(notification_id); } void LLScriptFloaterManager::toggleScriptFloater(const LLUUID& notification_id, bool set_new_message) diff --git a/indra/newview/llscriptfloater.h b/indra/newview/llscriptfloater.h index 6990234fd7..dc0cfc2400 100644 --- a/indra/newview/llscriptfloater.h +++ b/indra/newview/llscriptfloater.h @@ -65,11 +65,6 @@ public: void onAddNotification(const LLUUID& notification_id); /** - * Removes notification. - */ - void removeNotification(const LLUUID& notification_id); - - /** * Handles notification removal. * Removes script notification toast, removes script chiclet, closes script floater */ diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index 7104f3934d..98282c1673 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -230,15 +230,15 @@ LLSideTrayTab* LLSideTrayTab::createInstance () LLSideTray::Params::Params() : collapsed("collapsed",false), - tab_btn_image_normal("tab_btn_image",LLUI::getUIImage("sidebar_tab_left.tga")), - tab_btn_image_selected("tab_btn_image_selected",LLUI::getUIImage("button_enabled_selected_32x128.tga")), + tab_btn_image_normal("tab_btn_image","sidebar_tab_left.tga"), + tab_btn_image_selected("tab_btn_image_selected","button_enabled_selected_32x128.tga"), default_button_width("tab_btn_width",32), default_button_height("tab_btn_height",32), default_button_margin("tab_btn_margin",0) {} //virtual -LLSideTray::LLSideTray(const Params& params) +LLSideTray::LLSideTray(Params& params) : LLPanel(params) ,mActiveTab(0) ,mCollapsed(false) @@ -373,10 +373,10 @@ LLButton* LLSideTray::createButton (const std::string& name,const std::string& i bparams.follows.flags (FOLLOWS_LEFT | FOLLOWS_TOP); bparams.rect (rect); bparams.tab_stop(false); - bparams.image_unselected(sidetray_params.tab_btn_image_normal); - bparams.image_selected(sidetray_params.tab_btn_image_selected); - bparams.image_disabled(sidetray_params.tab_btn_image_normal); - bparams.image_disabled_selected(sidetray_params.tab_btn_image_selected); + bparams.image_unselected.name(sidetray_params.tab_btn_image_normal); + bparams.image_selected.name(sidetray_params.tab_btn_image_selected); + bparams.image_disabled.name(sidetray_params.tab_btn_image_normal); + bparams.image_disabled_selected.name(sidetray_params.tab_btn_image_selected); LLButton* button = LLUICtrlFactory::create<LLButton> (bparams); button->setLabel(name); diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h index 406cdc9055..3a8d308425 100644 --- a/indra/newview/llsidetray.h +++ b/indra/newview/llsidetray.h @@ -54,13 +54,13 @@ public: : public LLInitParam::Block<Params, LLPanel::Params> { // initial state - Optional<bool> collapsed; - Optional<LLUIImage*> tab_btn_image_normal, - tab_btn_image_selected; + Optional<bool> collapsed; + Optional<std::string> tab_btn_image_normal; + Optional<std::string> tab_btn_image_selected; - Optional<S32> default_button_width, - default_button_height, - default_button_margin; + Optional<S32> default_button_width; + Optional<S32> default_button_height; + Optional<S32> default_button_margin; Params(); }; @@ -68,7 +68,7 @@ public: static LLSideTray* getInstance (); static bool instanceCreated (); protected: - LLSideTray(const Params& params); + LLSideTray(Params& params); typedef std::vector<LLSideTrayTab*> child_vector_t; typedef child_vector_t::iterator child_vector_iter_t; typedef child_vector_t::const_iterator child_vector_const_iter_t; diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index 1a8c2b8fc0..e6b4aeb6c2 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -371,7 +371,7 @@ LLIMWellWindow::ObjectRowPanel::~ObjectRowPanel() //--------------------------------------------------------------------------------- void LLIMWellWindow::ObjectRowPanel::onClosePanel() { - LLScriptFloaterManager::getInstance()->removeNotification(mChiclet->getSessionId()); + LLScriptFloaterManager::getInstance()->onRemoveNotification(mChiclet->getSessionId()); } void LLIMWellWindow::ObjectRowPanel::initChiclet(const LLUUID& notification_id, bool new_message/* = false*/) @@ -832,7 +832,7 @@ void LLIMWellWindow::closeAllImpl() ObjectRowPanel* obj_panel = dynamic_cast <ObjectRowPanel*> (panel); if (obj_panel) { - LLScriptFloaterManager::instance().removeNotification(*iter); + LLScriptFloaterManager::instance().onRemoveNotification(*iter); } } } diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index c0518b705b..d324cb1565 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -426,10 +426,6 @@ BOOL LLFloaterTexturePicker::postBuild() mInventoryPanel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); mInventoryPanel->setAllowMultiSelect(FALSE); - // Disable auto selecting first filtered item because it takes away - // selection from the item set by LLTextureCtrl owning this floater. - mInventoryPanel->getRootFolder()->setAutoSelectOverride(TRUE); - // Commented out to scroll to currently selected texture. See EXT-5403. // // store this filter as the default one // mInventoryPanel->getRootFolder()->getFilter()->markDefault(); diff --git a/indra/newview/llurllineeditorctrl.cpp b/indra/newview/llurllineeditorctrl.cpp index 333f682e8f..8488527185 100644 --- a/indra/newview/llurllineeditorctrl.cpp +++ b/indra/newview/llurllineeditorctrl.cpp @@ -89,10 +89,9 @@ void LLURLLineEditor::copyEscapedURLToClipboard() const std::string unescaped_text = wstring_to_utf8str(mText.getWString().substr(left_pos, length)); LLWString text_to_copy; - // *HACK: Because LLSLURL is currently broken we cannot use it to check if unescaped_text is a valid SLURL (see EXT-8335). - if (LLStringUtil::startsWith(unescaped_text, "http://")) // SLURL + if (LLSLURL(unescaped_text).isValid()) text_to_copy = utf8str_to_wstring(LLWeb::escapeURL(unescaped_text)); - else // human-readable location + else text_to_copy = utf8str_to_wstring(unescaped_text); gClipboard.copyFromString( text_to_copy ); diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 9926c8d15f..7e8f11c41a 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -873,21 +873,6 @@ LLInventoryCallbackManager::~LLInventoryCallbackManager() sInstance = NULL; } -//static -void LLInventoryCallbackManager::destroyClass() -{ - if (sInstance) - { - for (callback_map_t::iterator it = sInstance->mMap.begin(), end_it = sInstance->mMap.end(); it != end_it; ++it) - { - // drop LLPointer reference to callback - it->second = NULL; - } - sInstance->mMap.clear(); - } -} - - U32 LLInventoryCallbackManager::registerCB(LLPointer<LLInventoryCallback> cb) { if (cb.isNull()) diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h index ef3586537b..690c23e6a5 100644 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -36,7 +36,6 @@ #include "llinventory.h" #include "llframetimer.h" #include "llwearable.h" -#include "llui.h" //for LLDestroyClass #include <boost/signals2.hpp> // boost::signals2::trackable @@ -305,9 +304,8 @@ private: // misc functions //void inventory_reliable_callback(void**, S32 status); -class LLInventoryCallbackManager : public LLDestroyClass<LLInventoryCallbackManager> +class LLInventoryCallbackManager { - friend class LLDestroyClass<LLInventoryCallbackManager>; public: LLInventoryCallbackManager(); ~LLInventoryCallbackManager(); @@ -315,12 +313,9 @@ public: void fire(U32 callback_id, const LLUUID& item_id); U32 registerCB(LLPointer<LLInventoryCallback> cb); private: - typedef std::map<U32, LLPointer<LLInventoryCallback> > callback_map_t; - callback_map_t mMap; + std::map<U32, LLPointer<LLInventoryCallback> > mMap; U32 mLastCallback; static LLInventoryCallbackManager *sInstance; - static void destroyClass(); - public: static bool is_instantiated() { return sInstance != NULL; } }; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index fa0e860ae9..04545d2549 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2614,7 +2614,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) params.substitutions = substitutions; params.payload = payload; - LLPostponedNotification::add<LLPostponedServerObjectNotification>(params, from_id, from_group); + LLPostponedNotification::add<LLPostponedServerObjectNotification>(params, from_id, false); } break; case IM_FROM_TASK_AS_ALERT: diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 15bdf126c5..6d93de2383 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -79,7 +79,6 @@ #include "llviewerparceloverlay.h" #include "llviewerpartsource.h" #include "llviewerregion.h" -#include "llviewerstats.h" #include "llviewertextureanim.h" #include "llviewerwindow.h" // For getSpinAxis #include "llvoavatar.h" @@ -1917,12 +1916,6 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, avatar->clampAttachmentPositions(); } - - // If we're snapping the position by more than 0.5m, update LLViewerStats::mAgentPositionSnaps - if ( asAvatar() && asAvatar()->isSelf() && (mag_sqr > 0.25f) ) - { - LLViewerStats::getInstance()->mAgentPositionSnaps.push( diff.length() ); - } } if (new_rot != mLastRot diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index a706e77f19..bdc34d0f18 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -280,8 +280,6 @@ LLViewerStats::LLViewerStats() : { mStats[ST_HAS_BAD_TIMER] = 1.0; } - - mAgentPositionSnaps.reset(); } LLViewerStats::~LLViewerStats() @@ -301,8 +299,6 @@ void LLViewerStats::resetStats() LLViewerStats::getInstance()->mPacketsOutStat.reset(); LLViewerStats::getInstance()->mFPSStat.reset(); LLViewerStats::getInstance()->mTexturePacketsStat.reset(); - - LLViewerStats::getInstance()->mAgentPositionSnaps.reset(); } @@ -397,10 +393,6 @@ void LLViewerStats::addToMessage(LLSD &body) const << llendl; } } - - body["AgentPositionSnaps"] = mAgentPositionSnaps.getData(); - llinfos << "STAT: AgentPositionSnaps: Mean = " << mAgentPositionSnaps.getMean() << "; StdDev = " << mAgentPositionSnaps.getStdDev() - << "; Count = " << mAgentPositionSnaps.getCount() << llendl; } // static diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h index 694eeaf097..13d73000d2 100644 --- a/indra/newview/llviewerstats.h +++ b/indra/newview/llviewerstats.h @@ -197,61 +197,6 @@ public: void addToMessage(LLSD &body) const; - struct StatsAccumulator - { - S32 mCount; - F32 mSum; - F32 mSumOfSquares; - U32 mCountOfNextUpdatesToIgnore; - - inline void push( F32 val ) - { - if ( mCountOfNextUpdatesToIgnore > 0 ) - { - mCountOfNextUpdatesToIgnore--; - return; - } - - mCount++; - mSum += val; - mSumOfSquares += val * val; - } - - inline F32 getMean() const - { - return (mCount == 0) ? 0.f : ((F32)mSum)/mCount; - } - - inline F32 getStdDev() const - { - const F32 mean = getMean(); - return (mCount == 0) ? 0.f : sqrt( mSumOfSquares/mCount - (mean * mean) ); - } - - inline U32 getCount() const - { - return mCount; - } - - inline void reset() - { - mCount = 0; - mSum = mSumOfSquares = 0.f; - mCountOfNextUpdatesToIgnore = 0; - } - - inline LLSD getData() const - { - LLSD data; - data["mean"] = getMean(); - data["std_dev"] = getStdDev(); - data["count"] = (S32)mCount; - return data; - } - }; - - StatsAccumulator mAgentPositionSnaps; - private: F64 mStats[ST_COUNT]; diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index e38608bcfc..2929dce898 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -493,7 +493,6 @@ LLViewerTexture::LLViewerTexture(const U32 width, const U32 height, const U8 com mFullHeight = height ; mUseMipMaps = usemipmaps ; mComponents = components ; - setTexelsPerImage(); mID.generate(); sImageCount++; @@ -522,7 +521,6 @@ void LLViewerTexture::init(bool firstinit) mFullWidth = 0; mFullHeight = 0; - mTexelsPerImage = 0 ; mUseMipMaps = FALSE ; mComponents = 0 ; @@ -531,7 +529,7 @@ void LLViewerTexture::init(bool firstinit) mMaxVirtualSize = 0.f; mNeedsGLTexture = FALSE ; mMaxVirtualSizeResetInterval = 1; - mMaxVirtualSizeResetCounter = mMaxVirtualSizeResetInterval ; + mMaxVirtualSizeResetCounter = 1 ; mAdditionalDecodePriority = 0.f ; mParcelMedia = NULL ; mNumFaces = 0 ; @@ -838,8 +836,7 @@ BOOL LLViewerTexture::createGLTexture(S32 discard_level, const LLImageRaw* image { mFullWidth = mGLTexturep->getCurrentWidth() ; mFullHeight = mGLTexturep->getCurrentHeight() ; - mComponents = mGLTexturep->getComponents() ; - setTexelsPerImage(); + mComponents = mGLTexturep->getComponents() ; } return ret ; @@ -1057,16 +1054,9 @@ void LLViewerTexture::destroyGLTexture() } } -void LLViewerTexture::setTexelsPerImage() -{ - S32 fullwidth = llmin(mFullWidth,(S32)MAX_IMAGE_SIZE_DEFAULT); - S32 fullheight = llmin(mFullHeight,(S32)MAX_IMAGE_SIZE_DEFAULT); - mTexelsPerImage = (F32)fullwidth * fullheight; -} - BOOL LLViewerTexture::isLargeImage() { - return (S32)mTexelsPerImage > LLViewerTexture::sMinLargeImageSize ; + return mFullWidth * mFullHeight > LLViewerTexture::sMinLargeImageSize ; } //virtual @@ -1420,7 +1410,6 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/) mFullWidth = mRawImage->getWidth(); mFullHeight = mRawImage->getHeight(); - setTexelsPerImage(); } else { @@ -1626,7 +1615,11 @@ F32 LLViewerFetchedTexture::calcDecodePriority() { // priority range = 100,000 - 500,000 S32 desired_discard = mDesiredDiscardLevel; - if (!isJustBound() && mCachedRawImageReady) + if (getDontDiscard()) + { + desired_discard -= 2; + } + else if (!isJustBound() && mCachedRawImageReady) { if(mBoostLevel < BOOST_HIGH) { @@ -1642,7 +1635,7 @@ F32 LLViewerFetchedTexture::calcDecodePriority() S32 ddiscard = cur_discard - desired_discard; ddiscard = llclamp(ddiscard, -1, MAX_DELTA_DISCARD_LEVEL_FOR_PRIORITY); - priority = (ddiscard + 1) * PRIORITY_DELTA_DISCARD_LEVEL_FACTOR; + priority = (ddiscard + 1) * PRIORITY_DELTA_DISCARD_LEVEL_FACTOR; } // Priority Formula: @@ -1650,51 +1643,19 @@ F32 LLViewerFetchedTexture::calcDecodePriority() // [10,000,000] + [1,000,000-9,000,000] + [100,000-500,000] + [1-20,000] + [0-999] if (priority > 0.0f) { - bool large_enough = mCachedRawImageReady && ((S32)mTexelsPerImage > sMinLargeImageSize) ; - if(large_enough) - { - //Note: - //to give small, low-priority textures some chance to be fetched, - //cut the priority in half if the texture size is larger than 256 * 256 and has a 64*64 ready. - priority *= 0.5f ; - } - pixel_priority = llclamp(pixel_priority, 0.0f, MAX_PRIORITY_PIXEL); priority += pixel_priority + PRIORITY_BOOST_LEVEL_FACTOR * mBoostLevel; if ( mBoostLevel > BOOST_HIGH) { - if(mBoostLevel > BOOST_SUPER_HIGH) - { - //for very important textures, always grant the highest priority. - priority += PRIORITY_BOOST_HIGH_FACTOR; - } - else if(mCachedRawImageReady) - { - //Note: - //to give small, low-priority textures some chance to be fetched, - //if high priority texture has a 64*64 ready, lower its fetching priority. - setAdditionalDecodePriority(0.5f) ; - } - else - { - priority += PRIORITY_BOOST_HIGH_FACTOR; - } + priority += PRIORITY_BOOST_HIGH_FACTOR; } if(mAdditionalDecodePriority > 0.0f) { // priority range += 1,000,000.f-9,000,000.f - F32 additional = PRIORITY_ADDITIONAL_FACTOR * (1.0 + mAdditionalDecodePriority * MAX_ADDITIONAL_LEVEL_FOR_PRIORITY); - if(large_enough) - { - //Note: - //to give small, low-priority textures some chance to be fetched, - //cut the additional priority to a quarter if the texture size is larger than 256 * 256 and has a 64*64 ready. - additional *= 0.25f ; - } - priority += additional; + priority += PRIORITY_ADDITIONAL_FACTOR * (1.0 + mAdditionalDecodePriority * MAX_ADDITIONAL_LEVEL_FOR_PRIORITY); } } return priority; @@ -1737,6 +1698,11 @@ void LLViewerFetchedTexture::updateVirtualSize() addTextureStats(0.f, FALSE) ;//reset } + if(mForceToSaveRawImage) + { + setAdditionalDecodePriority(0.75f) ; //boost the fetching priority + } + for(U32 i = 0 ; i < mNumFaces ; i++) { LLFace* facep = mFaceList[i] ; @@ -1849,7 +1815,6 @@ bool LLViewerFetchedTexture::updateFetch() { mFullWidth = mRawImage->getWidth() << mRawDiscardLevel; mFullHeight = mRawImage->getHeight() << mRawDiscardLevel; - setTexelsPerImage(); if(mFullWidth > MAX_IMAGE_SIZE || mFullHeight > MAX_IMAGE_SIZE) { @@ -2925,6 +2890,10 @@ void LLViewerLODTexture::processTextureStats() //static const F64 log_2 = log(2.0); static const F64 log_4 = log(4.0); + S32 fullwidth = llmin(mFullWidth,(S32)MAX_IMAGE_SIZE_DEFAULT); + S32 fullheight = llmin(mFullHeight,(S32)MAX_IMAGE_SIZE_DEFAULT); + mTexelsPerImage = (F32)fullwidth * fullheight; + F32 discard_level = 0.f; // If we know the output width and height, we can force the discard diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index 1f0d760daf..f071c6e392 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -124,16 +124,15 @@ public: BOOST_HIGH = 10, BOOST_BUMP , BOOST_TERRAIN , // has to be high priority for minimap / low detail - BOOST_SELECTED , - BOOST_AVATAR_BAKED_SELF , - BOOST_AVATAR_SELF , // needed for baking avatar - BOOST_SUPER_HIGH , //textures higher than this need to be downloaded at the required resolution without delay. + BOOST_SELECTED , BOOST_HUD , + BOOST_AVATAR_BAKED_SELF , BOOST_ICON , BOOST_UI , BOOST_PREVIEW , BOOST_MAP , - BOOST_MAP_VISIBLE , + BOOST_MAP_VISIBLE , + BOOST_AVATAR_SELF , // needed for baking avatar BOOST_MAX_LEVEL, //other texture Categories @@ -267,7 +266,6 @@ protected: void init(bool firstinit) ; void reorganizeFaceList() ; void reorganizeVolumeList() ; - void setTexelsPerImage(); private: //note: do not make this function public. /*virtual*/ LLImageGL* getGLTexture() const ; @@ -280,7 +278,6 @@ protected: S32 mFullHeight; BOOL mUseMipMaps ; S8 mComponents; - F32 mTexelsPerImage; // Texels per image. mutable S8 mNeedsGLTexture; mutable F32 mMaxVirtualSize; // The largest virtual size of the image, in pixels - how much data to we need? mutable S32 mMaxVirtualSizeResetCounter ; @@ -599,6 +596,8 @@ private: void scaleDown() ; private: + + F32 mTexelsPerImage; // Texels per image. F32 mDiscardVirtualSize; // Virtual size used to calculate desired discard F32 mCalculatedDiscardLevel; // Last calculated discard level }; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 7079adbd14..32723dfe3d 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3190,26 +3190,29 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) { // muted avatars update at 16 hz mUpdatePeriod = 16; } - else if (mVisibilityRank <= LLVOAvatar::sMaxVisible) + else if (visible && mVisibilityRank <= LLVOAvatar::sMaxVisible) { //first 25% of max visible avatars are not impostored mUpdatePeriod = 1; } - else if (mVisibilityRank > LLVOAvatar::sMaxVisible * 4) + else if (visible && mVisibilityRank > LLVOAvatar::sMaxVisible * 4) { //background avatars are REALLY slow updating impostors mUpdatePeriod = 16; } - else if (mVisibilityRank > LLVOAvatar::sMaxVisible * 3) + else if (visible && mVisibilityRank > LLVOAvatar::sMaxVisible * 3) { //back 25% of max visible avatars are slow updating impostors mUpdatePeriod = 8; } - else if (mImpostorPixelArea <= impostor_area) + else if (visible && mImpostorPixelArea <= impostor_area) { // stuff in between gets an update period based on pixel area mUpdatePeriod = llclamp((S32) sqrtf(impostor_area*4.f/mImpostorPixelArea), 2, 8); } + else if (visible && mVisibilityRank > LLVOAvatar::sMaxVisible) + { // force nearby impostors in ultra crowded areas + mUpdatePeriod = 2; + } else - { - //nearby avatars, update the impostors more frequently. - mUpdatePeriod = 4; + { // not impostored + mUpdatePeriod = 1; } visible = (LLDrawable::getCurrentFrame()+mID.mData[0])%mUpdatePeriod == 0 ? TRUE : FALSE; @@ -4187,7 +4190,7 @@ void LLVOAvatar::updateTextures() } } } - if (isIndexBakedTexture((ETextureIndex) texture_index)) + if (isIndexBakedTexture((ETextureIndex) texture_index) && render_avatar) { const S32 boost_level = getAvatarBakedBoostLevel(); imagep = LLViewerTextureManager::staticCastToFetchedTexture(getImage(texture_index,0), TRUE); @@ -4252,7 +4255,7 @@ void LLVOAvatar::checkTextureLoading() { return ; //have not been invisible for enough time. } - + for(LLLoadedCallbackEntry::source_callback_list_t::iterator iter = mCallbackTextureList.begin(); iter != mCallbackTextureList.end(); ++iter) { @@ -4269,7 +4272,10 @@ void LLVOAvatar::checkTextureLoading() } else//unpause { - tex->unpauseLoadedCallbacks(&mCallbackTextureList) ; + static const F32 START_AREA = 100.f ; + + tex->unpauseLoadedCallbacks(&mCallbackTextureList) ; + tex->addTextureStats(START_AREA); //jump start the fetching again } } } @@ -4282,14 +4288,12 @@ void LLVOAvatar::checkTextureLoading() return ; } -const F32 SELF_ADDITIONAL_PRI = 0.75f ; -const F32 ADDITIONAL_PRI = 0.5f; void LLVOAvatar::addBakedTextureStats( LLViewerFetchedTexture* imagep, F32 pixel_area, F32 texel_area_ratio, S32 boost_level) { //Note: //if this function is not called for the last MAX_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL frames, //the texture pipeline will stop fetching this texture. - + imagep->resetTextureStats(); imagep->setCanUseHTTP(false) ; //turn off http fetching for baked textures. imagep->setMaxVirtualSizeResetInterval(MAX_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL); @@ -4299,14 +4303,9 @@ void LLVOAvatar::addBakedTextureStats( LLViewerFetchedTexture* imagep, F32 pixel mMinPixelArea = llmin(pixel_area, mMinPixelArea); imagep->addTextureStats(pixel_area / texel_area_ratio); imagep->setBoostLevel(boost_level); - - if(boost_level != LLViewerTexture::BOOST_AVATAR_BAKED_SELF) - { - imagep->setAdditionalDecodePriority(ADDITIONAL_PRI) ; - } - else + if(boost_level == LLViewerTexture::BOOST_AVATAR_BAKED_SELF) { - imagep->setAdditionalDecodePriority(SELF_ADDITIONAL_PRI) ; + imagep->setAdditionalDecodePriority(1.0f) ; } } @@ -6220,7 +6219,7 @@ void LLVOAvatar::updateMeshTextures() } } - const BOOL self_customizing = isSelf() && !gAgentAvatarp->isUsingBakedTextures(); // During face edit mode, we don't use baked textures + const BOOL self_customizing = isSelf() && gAgentCamera.cameraCustomizeAvatar(); // During face edit mode, we don't use baked textures const BOOL other_culled = !isSelf() && mCulled; LLLoadedCallbackEntry::source_callback_list_t* src_callback_list = NULL ; BOOL paused = FALSE; @@ -7313,7 +7312,7 @@ void LLVOAvatar::cullAvatarsByPixelArea() std::sort(LLCharacter::sInstances.begin(), LLCharacter::sInstances.end(), CompareScreenAreaGreater()); // Update the avatars that have changed status - U32 rank = 2; //1 is reserved for self. + U32 rank = 0; for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin(); iter != LLCharacter::sInstances.end(); ++iter) { @@ -7337,7 +7336,7 @@ void LLVOAvatar::cullAvatarsByPixelArea() if (inst->isSelf()) { - inst->setVisibilityRank(1); + inst->setVisibilityRank(0); } else if (inst->mDrawable.notNull() && inst->mDrawable->isVisible()) { diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 8ffcfc7ed4..bb04511a8d 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -623,7 +623,7 @@ private: public: void setClothesColor(LLVOAvatarDefines::ETextureIndex te, const LLColor4& new_color, BOOL upload_bake); LLColor4 getClothesColor(LLVOAvatarDefines::ETextureIndex te); - static BOOL teToColorParams(LLVOAvatarDefines::ETextureIndex te, U32 *param_name); + static BOOL teToColorParams(LLVOAvatarDefines::ETextureIndex te, U32 *param_name); //-------------------------------------------------------------------- // Global colors @@ -869,7 +869,7 @@ private: public: // Responsible for detecting the user's voice signal (and when the // user speaks, it puts a voice symbol over the avatar's head) and gesticulations - LLPointer<LLVoiceVisualizer> mVoiceVisualizer; + LLVoiceVisualizer* mVoiceVisualizer; int mCurrentGesticulationLevel; //-------------------------------------------------------------------- @@ -1049,7 +1049,6 @@ protected: // Shared with LLVOAvatarSelf *******************************************************************************/ }; // LLVOAvatar -extern const F32 SELF_ADDITIONAL_PRI; extern const S32 MAX_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL; #endif // LL_VO_AVATAR_H diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 3a283e7aa6..46d987353f 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -2037,7 +2037,7 @@ void LLVOAvatarSelf::addLocalTextureStats( ETextureIndex type, LLViewerFetchedTe imagep->resetTextureStats(); imagep->setMaxVirtualSizeResetInterval(MAX_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL); imagep->addTextureStats( desired_pixels / texel_area_ratio ); - imagep->setAdditionalDecodePriority(SELF_ADDITIONAL_PRI) ; + imagep->setAdditionalDecodePriority(1.0f) ; imagep->forceUpdateBindStats() ; if (imagep->getDiscardLevel() < 0) { diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index fe8c09e329..c01d7fa62f 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -85,8 +85,8 @@ void LLPanelWearableListItem::onMouseLeave(S32 x, S32 y, MASK mask) reshapeWidgets(); } -LLPanelWearableListItem::LLPanelWearableListItem(LLViewerInventoryItem* item, const LLPanelWearableListItem::Params& params) -: LLPanelInventoryListItemBase(item, params) +LLPanelWearableListItem::LLPanelWearableListItem(LLViewerInventoryItem* item) +: LLPanelInventoryListItemBase(item) { } @@ -101,19 +101,15 @@ LLPanelWearableOutfitItem* LLPanelWearableOutfitItem::create(LLViewerInventoryIt LLPanelWearableOutfitItem* list_item = NULL; if (item) { - const LLPanelInventoryListItemBase::Params& params = LLUICtrlFactory::getDefaultParams<LLPanelInventoryListItemBase>(); - - list_item = new LLPanelWearableOutfitItem(item, worn_indication_enabled, params); - list_item->initFromParams(params); - list_item->postBuild(); + list_item = new LLPanelWearableOutfitItem(item, worn_indication_enabled); + list_item->init(); } return list_item; } LLPanelWearableOutfitItem::LLPanelWearableOutfitItem(LLViewerInventoryItem* item, - bool worn_indication_enabled, - const LLPanelWearableOutfitItem::Params& params) -: LLPanelInventoryListItemBase(item, params) + bool worn_indication_enabled) +: LLPanelInventoryListItemBase(item) , mWornIndicationEnabled(worn_indication_enabled) { } @@ -136,17 +132,6 @@ void LLPanelWearableOutfitItem::updateItem(const std::string& name, ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// -static LLWidgetNameRegistry::StaticRegistrar sRegisterPanelClothingListItem(&typeid(LLPanelClothingListItem::Params), "clothing_list_item"); - - -LLPanelClothingListItem::Params::Params() -: up_btn("up_btn"), - down_btn("down_btn"), - edit_btn("edit_btn"), - lock_panel("lock_panel"), - edit_panel("edit_panel"), - lock_icon("lock_icon") -{} // static LLPanelClothingListItem* LLPanelClothingListItem::create(LLViewerInventoryItem* item) @@ -154,54 +139,24 @@ LLPanelClothingListItem* LLPanelClothingListItem::create(LLViewerInventoryItem* LLPanelClothingListItem* list_item = NULL; if(item) { - const LLPanelClothingListItem::Params& params = LLUICtrlFactory::getDefaultParams<LLPanelClothingListItem>(); - list_item = new LLPanelClothingListItem(item, params); - list_item->initFromParams(params); - list_item->postBuild(); + list_item = new LLPanelClothingListItem(item); + list_item->init(); } return list_item; } -LLPanelClothingListItem::LLPanelClothingListItem(LLViewerInventoryItem* item, const LLPanelClothingListItem::Params& params) - : LLPanelDeletableWearableListItem(item, params) -{ - LLButton::Params button_params = params.up_btn; - applyXUILayout(button_params, this); - addChild(LLUICtrlFactory::create<LLButton>(button_params)); - - button_params = params.down_btn; - applyXUILayout(button_params, this); - addChild(LLUICtrlFactory::create<LLButton>(button_params)); - - LLPanel::Params panel_params = params.lock_panel; - applyXUILayout(panel_params, this); - LLPanel* lock_panelp = LLUICtrlFactory::create<LLPanel>(panel_params); - addChild(lock_panelp); - - panel_params = params.edit_panel; - applyXUILayout(panel_params, this); - LLPanel* edit_panelp = LLUICtrlFactory::create<LLPanel>(panel_params); - addChild(edit_panelp); - - if (lock_panelp) +LLPanelClothingListItem::LLPanelClothingListItem(LLViewerInventoryItem* item) + : LLPanelDeletableWearableListItem(item) { - LLIconCtrl::Params icon_params = params.lock_icon; - applyXUILayout(icon_params, this); - lock_panelp->addChild(LLUICtrlFactory::create<LLIconCtrl>(icon_params)); } - if (edit_panelp) +LLPanelClothingListItem::~LLPanelClothingListItem() { - button_params = params.edit_btn; - applyXUILayout(button_params, this); - edit_panelp->addChild(LLUICtrlFactory::create<LLButton>(button_params)); - } - - setSeparatorVisible(false); } -LLPanelClothingListItem::~LLPanelClothingListItem() +void LLPanelClothingListItem::init() { + LLUICtrlFactory::getInstance()->buildPanel(this, "panel_clothing_list_item.xml"); } BOOL LLPanelClothingListItem::postBuild() @@ -223,62 +178,30 @@ BOOL LLPanelClothingListItem::postBuild() ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// -static LLWidgetNameRegistry::StaticRegistrar sRegisterPanelBodyPartsListItem(&typeid(LLPanelBodyPartsListItem::Params), "bodyparts_list_item"); - - -LLPanelBodyPartsListItem::Params::Params() -: edit_btn("edit_btn"), - edit_panel("edit_panel"), - lock_panel("lock_panel"), - lock_icon("lock_icon") -{} - // static LLPanelBodyPartsListItem* LLPanelBodyPartsListItem::create(LLViewerInventoryItem* item) { LLPanelBodyPartsListItem* list_item = NULL; if(item) { - const Params& params = LLUICtrlFactory::getDefaultParams<LLPanelBodyPartsListItem>(); - list_item = new LLPanelBodyPartsListItem(item, params); - list_item->initFromParams(params); - list_item->postBuild(); + list_item = new LLPanelBodyPartsListItem(item); + list_item->init(); } return list_item; } -LLPanelBodyPartsListItem::LLPanelBodyPartsListItem(LLViewerInventoryItem* item, const LLPanelBodyPartsListItem::Params& params) -: LLPanelWearableListItem(item, params) +LLPanelBodyPartsListItem::LLPanelBodyPartsListItem(LLViewerInventoryItem* item) +: LLPanelWearableListItem(item) { - LLPanel::Params panel_params = params.edit_panel; - applyXUILayout(panel_params, this); - LLPanel* edit_panelp = LLUICtrlFactory::create<LLPanel>(panel_params); - addChild(edit_panelp); - - panel_params = params.lock_panel; - applyXUILayout(panel_params, this); - LLPanel* lock_panelp = LLUICtrlFactory::create<LLPanel>(panel_params); - addChild(lock_panelp); - - if (edit_panelp) - { - LLButton::Params btn_params = params.edit_btn; - applyXUILayout(btn_params, this); - edit_panelp->addChild(LLUICtrlFactory::create<LLButton>(btn_params)); } - if (lock_panelp) +LLPanelBodyPartsListItem::~LLPanelBodyPartsListItem() { - LLIconCtrl::Params icon_params = params.lock_icon; - applyXUILayout(icon_params, this); - lock_panelp->addChild(LLUICtrlFactory::create<LLIconCtrl>(icon_params)); - } - - setSeparatorVisible(true); } -LLPanelBodyPartsListItem::~LLPanelBodyPartsListItem() +void LLPanelBodyPartsListItem::init() { + LLUICtrlFactory::getInstance()->buildPanel(this, "panel_body_parts_list_item.xml"); } BOOL LLPanelBodyPartsListItem::postBuild() @@ -291,11 +214,6 @@ BOOL LLPanelBodyPartsListItem::postBuild() return TRUE; } -static LLWidgetNameRegistry::StaticRegistrar sRegisterPanelDeletableWearableListItem(&typeid(LLPanelDeletableWearableListItem::Params), "deletable_wearable_list_item"); - -LLPanelDeletableWearableListItem::Params::Params() -: delete_btn("delete_btn") -{} // static LLPanelDeletableWearableListItem* LLPanelDeletableWearableListItem::create(LLViewerInventoryItem* item) @@ -303,22 +221,20 @@ LLPanelDeletableWearableListItem* LLPanelDeletableWearableListItem::create(LLVie LLPanelDeletableWearableListItem* list_item = NULL; if(item) { - const Params& params = LLUICtrlFactory::getDefaultParams<LLPanelDeletableWearableListItem>(); - list_item = new LLPanelDeletableWearableListItem(item, params); - list_item->initFromParams(params); - list_item->postBuild(); + list_item = new LLPanelDeletableWearableListItem(item); + list_item->init(); } return list_item; } -LLPanelDeletableWearableListItem::LLPanelDeletableWearableListItem(LLViewerInventoryItem* item, const LLPanelDeletableWearableListItem::Params& params) -: LLPanelWearableListItem(item, params) +LLPanelDeletableWearableListItem::LLPanelDeletableWearableListItem(LLViewerInventoryItem* item) +: LLPanelWearableListItem(item) { - LLButton::Params button_params = params.delete_btn; - applyXUILayout(button_params, this); - addChild(LLUICtrlFactory::create<LLButton>(button_params)); +} - setSeparatorVisible(true); +void LLPanelDeletableWearableListItem::init() +{ + LLUICtrlFactory::getInstance()->buildPanel(this, "panel_deletable_wearable_list_item.xml"); } BOOL LLPanelDeletableWearableListItem::postBuild() @@ -344,11 +260,8 @@ LLPanelAttachmentListItem* LLPanelAttachmentListItem::create(LLViewerInventoryIt LLPanelAttachmentListItem* list_item = NULL; if(item) { - const Params& params = LLUICtrlFactory::getDefaultParams<LLPanelDeletableWearableListItem>(); - - list_item = new LLPanelAttachmentListItem(item, params); - list_item->initFromParams(params); - list_item->postBuild(); + list_item = new LLPanelAttachmentListItem(item); + list_item->init(); } return list_item; } @@ -371,32 +284,27 @@ void LLPanelAttachmentListItem::updateItem(const std::string& name, ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// -static LLWidgetNameRegistry::StaticRegistrar sRegisterPanelDummyClothingListItem(&typeid(LLPanelDummyClothingListItem::Params), "dummy_clothing_list_item"); - -LLPanelDummyClothingListItem::Params::Params() -: add_panel("add_panel"), - add_btn("add_btn") -{} LLPanelDummyClothingListItem* LLPanelDummyClothingListItem::create(LLWearableType::EType w_type) { - const Params& params = LLUICtrlFactory::getDefaultParams<LLPanelDummyClothingListItem>(); - - LLPanelDummyClothingListItem* list_item = new LLPanelDummyClothingListItem(w_type, params); - list_item->initFromParams(params); - list_item->postBuild(); + LLPanelDummyClothingListItem* list_item = new LLPanelDummyClothingListItem(w_type); + list_item->init(); return list_item; } BOOL LLPanelDummyClothingListItem::postBuild() { + LLIconCtrl* icon = getChild<LLIconCtrl>("item_icon"); + setIconCtrl(icon); + setTitleCtrl(getChild<LLTextBox>("item_name")); + addWidgetToRightSide("btn_add_panel"); setIconImage(LLInventoryIcon::getIcon(LLAssetType::AT_CLOTHING, LLInventoryType::IT_NONE, mWearableType, FALSE)); updateItem(wearableTypeToString(mWearableType)); // Make it look loke clothing item - reserve space for 'delete' button - setLeftWidgetsWidth(getChildView("item_icon")->getRect().mLeft); + setLeftWidgetsWidth(icon->getRect().mLeft); setWidgetsVisible(false); reshapeWidgets(); @@ -409,23 +317,15 @@ LLWearableType::EType LLPanelDummyClothingListItem::getWearableType() const return mWearableType; } -LLPanelDummyClothingListItem::LLPanelDummyClothingListItem(LLWearableType::EType w_type, const LLPanelDummyClothingListItem::Params& params) -: LLPanelWearableListItem(NULL, params), - mWearableType(w_type) -{ - LLPanel::Params panel_params(params.add_panel); - applyXUILayout(panel_params, this); - LLPanel* add_panelp = LLUICtrlFactory::create<LLPanel>(panel_params); - addChild(add_panelp); - - if (add_panelp) +LLPanelDummyClothingListItem::LLPanelDummyClothingListItem(LLWearableType::EType w_type) + : LLPanelWearableListItem(NULL) + , mWearableType(w_type) { - LLButton::Params button_params(params.add_btn); - applyXUILayout(button_params, this); - add_panelp->addChild(LLUICtrlFactory::create<LLButton>(button_params)); } - setSeparatorVisible(true); +void LLPanelDummyClothingListItem::init() +{ + LLUICtrlFactory::getInstance()->buildPanel(this, "panel_dummy_clothing_list_item.xml"); } typedef std::map<LLWearableType::EType, std::string> clothing_to_string_map_t; diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h index f2f81968ee..0e5403f30c 100644 --- a/indra/newview/llwearableitemslist.h +++ b/indra/newview/llwearableitemslist.h @@ -68,7 +68,7 @@ public: protected: - LLPanelWearableListItem(LLViewerInventoryItem* item, const Params& params); + LLPanelWearableListItem(LLViewerInventoryItem* item); }; /** @@ -93,7 +93,7 @@ public: protected: LLPanelWearableOutfitItem(LLViewerInventoryItem* item, - bool worn_indication_enabled, const Params& params); + bool worn_indication_enabled); private: bool mWornIndicationEnabled; @@ -103,13 +103,6 @@ class LLPanelDeletableWearableListItem : public LLPanelWearableListItem { LOG_CLASS(LLPanelDeletableWearableListItem); public: - struct Params : public LLInitParam::Block<Params, LLPanelWearableListItem::Params> - { - Optional<LLButton::Params> delete_btn; - - Params(); - }; - static LLPanelDeletableWearableListItem* create(LLViewerInventoryItem* item); @@ -123,7 +116,9 @@ public: inline void setShowDeleteButton(bool show) { setShowWidget("btn_delete", show); } protected: - LLPanelDeletableWearableListItem(LLViewerInventoryItem* item, const Params& params); + LLPanelDeletableWearableListItem(LLViewerInventoryItem* item); + + /*virtual*/ void init(); }; /** Outfit list item for an attachment */ @@ -139,7 +134,7 @@ public: EItemState item_state = IS_DEFAULT); protected: - LLPanelAttachmentListItem(LLViewerInventoryItem* item, const Params& params) : LLPanelDeletableWearableListItem(item, params) {}; + LLPanelAttachmentListItem(LLViewerInventoryItem* item) : LLPanelDeletableWearableListItem(item) {}; }; /** @@ -152,18 +147,6 @@ class LLPanelClothingListItem : public LLPanelDeletableWearableListItem LOG_CLASS(LLPanelClothingListItem); public: - struct Params : public LLInitParam::Block<Params, LLPanelDeletableWearableListItem::Params> - { - Optional<LLButton::Params> up_btn, - down_btn, - edit_btn; - Optional<LLPanel::Params> lock_panel, - edit_panel; - Optional<LLIconCtrl::Params> lock_icon; - - Params(); - }; - static LLPanelClothingListItem* create(LLViewerInventoryItem* item); virtual ~LLPanelClothingListItem(); @@ -179,25 +162,18 @@ public: inline void setShowLockButton(bool show) { setShowWidget("btn_lock", show); } inline void setShowEditButton(bool show) { setShowWidget("btn_edit_panel", show); } -protected: - LLPanelClothingListItem(LLViewerInventoryItem* item, const Params& params); +protected: + LLPanelClothingListItem(LLViewerInventoryItem* item); + + /*virtual*/ void init(); }; class LLPanelBodyPartsListItem : public LLPanelWearableListItem { LOG_CLASS(LLPanelBodyPartsListItem); public: - struct Params : public LLInitParam::Block<Params, LLPanelWearableListItem::Params> - { - Optional<LLButton::Params> edit_btn; - Optional<LLPanel::Params> lock_panel, - edit_panel; - Optional<LLIconCtrl::Params> lock_icon; - - Params(); - }; static LLPanelBodyPartsListItem* create(LLViewerInventoryItem* item); @@ -212,7 +188,9 @@ public: inline void setShowEditButton(bool show) { setShowWidget("btn_edit_panel", show); } protected: - LLPanelBodyPartsListItem(LLViewerInventoryItem* item, const Params& params); + LLPanelBodyPartsListItem(LLViewerInventoryItem* item); + + /*virtual*/ void init(); }; @@ -224,19 +202,15 @@ protected: class LLPanelDummyClothingListItem : public LLPanelWearableListItem { public: - struct Params : public LLInitParam::Block<Params, LLPanelWearableListItem::Params> - { - Optional<LLPanel::Params> add_panel; - Optional<LLButton::Params> add_btn; - Params(); - }; static LLPanelDummyClothingListItem* create(LLWearableType::EType w_type); /*virtual*/ BOOL postBuild(); LLWearableType::EType getWearableType() const; protected: - LLPanelDummyClothingListItem(LLWearableType::EType w_type, const Params& params); + LLPanelDummyClothingListItem(LLWearableType::EType w_type); + + /*virtual*/ void init(); static std::string wearableTypeToString(LLWearableType::EType w_type); diff --git a/indra/newview/llwindebug.cpp b/indra/newview/llwindebug.cpp index 660245b02b..502fefd4ef 100644 --- a/indra/newview/llwindebug.cpp +++ b/indra/newview/llwindebug.cpp @@ -97,9 +97,6 @@ void LLWinDebug::init() // Load the dbghelp dll now, instead of waiting for the crash. // Less potential for stack mangling - // Don't install vectored exception handler if being debugged. - if(IsDebuggerPresent()) return; - if (s_first_run) { // First, try loading from the directory that the app resides in. @@ -138,42 +135,36 @@ void LLWinDebug::init() void LLWinDebug::writeDumpToFile(MINIDUMP_TYPE type, MINIDUMP_EXCEPTION_INFORMATION *ExInfop, const std::string& filename) { - // Temporary fix to switch out the code that writes the DMP file. - // Fix coming that doesn't write a mini dump file for regular C++ exceptions. - const bool enable_write_dump_file = false; - if ( enable_write_dump_file ) + if(f_mdwp == NULL || gDirUtilp == NULL) { - if(f_mdwp == NULL || gDirUtilp == NULL) - { - return; - } - else - { - std::string dump_path = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, filename); - - HANDLE hFile = CreateFileA(dump_path.c_str(), - GENERIC_WRITE, - FILE_SHARE_WRITE, - NULL, - CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL, - NULL); + return; + } + else + { + std::string dump_path = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, filename); - if (hFile != INVALID_HANDLE_VALUE) - { - // Write the dump, ignoring the return value - f_mdwp(GetCurrentProcess(), - GetCurrentProcessId(), - hFile, - type, - ExInfop, - NULL, - NULL); - - CloseHandle(hFile); - } + HANDLE hFile = CreateFileA(dump_path.c_str(), + GENERIC_WRITE, + FILE_SHARE_WRITE, + NULL, + CREATE_ALWAYS, + FILE_ATTRIBUTE_NORMAL, + NULL); + if (hFile != INVALID_HANDLE_VALUE) + { + // Write the dump, ignoring the return value + f_mdwp(GetCurrentProcess(), + GetCurrentProcessId(), + hFile, + type, + ExInfop, + NULL, + NULL); + + CloseHandle(hFile); } + } } diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index b578cb9f69..7d0f763bd1 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -7111,7 +7111,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) if (LLPipeline::sWaterReflections && assertInitialized() && LLDrawPoolWater::sNeedsReflectionUpdate) { BOOL skip_avatar_update = FALSE; - if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK) + if (gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK) { skip_avatar_update = TRUE; } diff --git a/indra/newview/skins/default/xui/en/floater_camera.xml b/indra/newview/skins/default/xui/en/floater_camera.xml index da2be18db6..8c3aa2c9a4 100644 --- a/indra/newview/skins/default/xui/en/floater_camera.xml +++ b/indra/newview/skins/default/xui/en/floater_camera.xml @@ -71,8 +71,7 @@ image_name="Cam_Preset_Front_Off" /> <panel_camera_item.selected_picture image_name="Cam_Preset_Front_On" /> - <panel_camera_item.text - name="front_view_text"> + <panel_camera_item.text> Front View </panel_camera_item.text> </panel_camera_item> @@ -86,8 +85,7 @@ image_name="Cam_Preset_Side_Off" /> <panel_camera_item.selected_picture image_name="Cam_Preset_Side_On" /> - <panel_camera_item.text - name="side_view_text"> + <panel_camera_item.text> Side View </panel_camera_item.text> </panel_camera_item> @@ -102,8 +100,7 @@ image_name="Cam_Preset_Back_Off" /> <panel_camera_item.selected_picture image_name="Cam_Preset_Back_On" /> - <panel_camera_item.text - name="rear_view_text"> + <panel_camera_item.text> Rear View </panel_camera_item.text> </panel_camera_item> @@ -125,8 +122,7 @@ <panel_camera_item.mousedown_callback function="CameraPresets.ChangeView" parameter="object_view" /> - <panel_camera_item.text - name="object_view_text"> + <panel_camera_item.text> Object View </panel_camera_item.text> <panel_camera_item.picture @@ -140,8 +136,7 @@ <panel_camera_item.mousedown_callback function="CameraPresets.ChangeView" parameter="mouselook_view" /> - <panel_camera_item.text - name="mouselook_view_text"> + <panel_camera_item.text> Mouselook View </panel_camera_item.text> <panel_camera_item.picture diff --git a/indra/newview/skins/default/xui/en/menu_inventory_add.xml b/indra/newview/skins/default/xui/en/menu_inventory_add.xml index ae98abf4fb..5ad099e2d9 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory_add.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory_add.xml @@ -50,13 +50,8 @@ function="File.UploadBulk" parameter="" /> </menu_item_call> - <menu_item_call - label="Set Default Upload Permissions" - name="perm prefs"> - <menu_item_call.on_click - function="Floater.Toggle" - parameter="perm_prefs" /> - </menu_item_call> + <menu_item_separator + layout="topleft" /> </menu> <menu_item_call diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 63ff7047b4..3557318705 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -707,6 +707,13 @@ label="Options" name="Options" tear_off="true"> + <menu_item_call + label="Set Default Upload Permissions" + name="perm prefs"> + <menu_item_call.on_click + function="Floater.Toggle" + parameter="perm_prefs" /> + </menu_item_call> <menu_item_check label="Show Advanced Permissions" name="DebugPermissions"> @@ -866,13 +873,8 @@ function="File.UploadBulk" parameter="" /> </menu_item_call> - <menu_item_call - label="Set Default Upload Permissions" - name="perm prefs"> - <menu_item_call.on_click - function="Floater.Toggle" - parameter="perm_prefs" /> - </menu_item_call> + <menu_item_separator + layout="topleft" /> </menu> </menu> <menu diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 95ee374e39..1bb282dff9 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -819,7 +819,7 @@ Delete pick <nolink>[PICK]</nolink>? icon="alertmodal.tga" name="DeleteOutfits" type="alertmodal"> - Delete the selected outfit? + Delete the selected outfit/s? <usetemplate name="okcancelbuttons" notext="Cancel" @@ -5493,6 +5493,7 @@ If you stay in this region you will be logged out. <notification icon="notify.tga" name="LoadWebPage" + persist="true" type="notify"> Load web page [URL]? @@ -5592,6 +5593,7 @@ Grant this request? <notification icon="notify.tga" name="ScriptDialog" + persist="true" type="notify"> [FIRST] [LAST]'s '[TITLE]' [MESSAGE] @@ -5606,6 +5608,7 @@ Grant this request? <notification icon="notify.tga" name="ScriptDialogGroup" + persist="true" type="notify"> [GROUPNAME]'s '[TITLE]' [MESSAGE] diff --git a/indra/newview/skins/default/xui/en/panel_nearby_media.xml b/indra/newview/skins/default/xui/en/panel_nearby_media.xml index 8c13ced8f3..a4cac97af6 100644 --- a/indra/newview/skins/default/xui/en/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/en/panel_nearby_media.xml @@ -104,7 +104,6 @@ follows="top|left" font="SansSerif" left="10" - name="nearby_media_title" width="100"> Nearby Media </text> @@ -115,7 +114,6 @@ font="SansSerif" top_pad="15" left="10" - name="show_text" width="40"> Show: </text> diff --git a/indra/newview/skins/default/xui/en/panel_outfits_list.xml b/indra/newview/skins/default/xui/en/panel_outfits_list.xml index 9833b1dccb..b43aa0a824 100644 --- a/indra/newview/skins/default/xui/en/panel_outfits_list.xml +++ b/indra/newview/skins/default/xui/en/panel_outfits_list.xml @@ -14,6 +14,9 @@ background_visible="true" bg_alpha_color="DkGray2" bg_opaque_color="DkGray2" + no_matched_tabs_text.value="NoOutfitsTabsMatched" + no_matched_tabs_text.v_pad="10" + no_visible_tabs_text.value="NoOutfits" follows="all" height="400" layout="topleft" @@ -21,13 +24,6 @@ name="outfits_accordion" top="0" width="309"> - <no_matched_tabs_text - name="no_matched_outfits_msg" - value="Didn't find what you're looking for? Try [secondlife:///app/search/all/[SEARCH_TERM] Search]." - v_pad="10" /> - <no_visible_tabs_text - name="no_outfits_msg" - value="You don't have any outfits yet. Try [secondlife:///app/search/all/ Search]." /> </accordion> <panel background_visible="true" diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 048de70045..20d49fac04 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -1958,9 +1958,6 @@ Clears (deletes) the media and all params from the given face. <string name="InvFolder Animations">Animations</string> <string name="InvFolder Gestures">Gestures</string> <string name="InvFolder Favorite">Favorites</string> - <!-- historically default name of the Favorites folder can start from either "f" or "F" letter. - We should localize both of them with the same value --> - <string name="InvFolder favorite">Favorites</string> <string name="InvFolder Current Outfit">Current Outfit</string> <string name="InvFolder Initial Outfits">Initial Outfits</string> <string name="InvFolder My Outfits">My Outfits</string> @@ -2201,6 +2198,10 @@ Clears (deletes) the media and all params from the given face. <!-- panel preferences general --> <string name="BusyModeResponseDefault">The Resident you messaged is in 'busy mode' which means they have requested not to be disturbed. Your message will still be shown in their IM panel for later viewing.</string> + <!-- Outfits Panel --> + <string name="NoOutfits">You don't have any outfits yet. Try [secondlife:///app/search/all/ Search]</string> + <string name="NoOutfitsTabsMatched">Didn't find what you're looking for? Try [secondlife:///app/search/all/[SEARCH_TERM] Search].</string> + <!-- Mute --> <string name="MuteByName">(By name)</string> <string name="MuteAgent">(Resident)</string> diff --git a/indra/newview/skins/default/xui/en/widgets/bodyparts_list_item.xml b/indra/newview/skins/default/xui/en/widgets/bodyparts_list_item.xml deleted file mode 100644 index c08267de82..0000000000 --- a/indra/newview/skins/default/xui/en/widgets/bodyparts_list_item.xml +++ /dev/null @@ -1,73 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<bodyparts_list_item - follows="top|right|left" - height="23" - layout="topleft" - left="0" - name="wearable_item" - bottom="0" - width="380"> - <item_icon - height="16" - follows="top|left" - image_name="Inv_Object" - layout="topleft" - left="0" - name="item_icon" - top="2" - width="16" /> - <item_name - follows="left|right" - height="16" - layout="topleft" - left="21" - allow_html="false" - use_ellipses="true" - name="item_name" - text_color="white" - top="5" - value="..." - width="359" /> - <lock_panel - background_visible="false" - name="btn_lock" - layout="topleft" - follows="top|right" - top="0" - left="0" - height="23" - width="23" - tab_stop="false" - tool_tip="You don't have permission to edit"/> - <lock_icon - name="btn_lock1" - layout="topleft" - follows="top|right" - image_name="Locked_Icon" - top="2" - left="5" - height="13" - width="9" - tab_stop="false" /> - <edit_panel - background_visible="false" - name="btn_edit_panel" - layout="topleft" - follows="top|right" - top="1" - left="17" - height="23" - width="26" - tab_stop="false"/> - <edit_btn - name="btn_edit" - layout="topleft" - follows="top|right" - image_overlay="Edit_Wrench" - top="0" - left="0" - height="23" - width="23" - tab_stop="false" - tool_tip="Edit this shape"/> -</bodyparts_list_item> diff --git a/indra/newview/skins/default/xui/en/widgets/clothing_list_item.xml b/indra/newview/skins/default/xui/en/widgets/clothing_list_item.xml deleted file mode 100644 index f7a05e9bc4..0000000000 --- a/indra/newview/skins/default/xui/en/widgets/clothing_list_item.xml +++ /dev/null @@ -1,93 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<clothing_list_item - follows="top|right|left" - height="23" - layout="topleft" - left="0" - name="wearable_item" - bottom="0" - width="380"> - <lock_icon - height="16" - follows="top|left" - image_name="Inv_Object" - layout="topleft" - left="21" - name="item_icon" - top="2" - width="16" /> - <item_name - follows="left|right" - height="16" - layout="topleft" - left="42" - allow_html="false" - use_ellipses="true" - name="item_name" - text_color="white" - top="5" - value="..." - width="359" /> - <up_btn - name="btn_move_up" - layout="topleft" - follows="top|right" - image_overlay="UpArrow_Off" - top="1" - left="0" - height="23" - width="23" - tab_stop="false" /> - <down_btn - name="btn_move_down" - layout="topleft" - follows="top|right" - image_overlay="DownArrow_Off" - top="1" - left="26" - height="23" - width="23" - tab_stop="false" /> - <lock_panel - background_visible="false" - name="btn_lock" - layout="topleft" - follows="top|right" - top="0" - left="0" - height="23" - width="23" - tab_stop="false" - tool_tip="You don't have permission to edit"/> - <lock_icon - name="btn_lock1" - layout="topleft" - follows="top|right" - image_name="Locked_Icon" - top="2" - left="5" - height="13" - width="9" - tab_stop="false" /> - <edit_panel - background_visible="false" - name="btn_edit_panel" - layout="topleft" - follows="top|right" - top="0" - left="26" - height="23" - width="26" - tab_stop="false"/> - <edit_btn - name="btn_edit" - layout="topleft" - follows="top|right" - image_overlay="Edit_Wrench" - top="1" - left="0" - height="23" - width="23" - tab_stop="false" - tool_tip="Edit this wearable"/> -</clothing_list_item> diff --git a/indra/newview/skins/default/xui/en/widgets/deletable_wearable_list_item.xml b/indra/newview/skins/default/xui/en/widgets/deletable_wearable_list_item.xml deleted file mode 100644 index 88a4682e13..0000000000 --- a/indra/newview/skins/default/xui/en/widgets/deletable_wearable_list_item.xml +++ /dev/null @@ -1,43 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<deletable_wearable_list_item - follows="top|right|left" - height="23" - layout="topleft" - left="0" - name="deletable_wearable_item" - bottom="0" - width="380"> - <delete_btn - name="btn_delete" - layout="topleft" - follows="top|left" - image_unselected="Toast_CloseBtn" - image_selected="Toast_CloseBtn" - top="3" - left="0" - height="18" - width="18" - tab_stop="false" - tool_tip="Remove from outfit"/> - <item_icon - height="16" - follows="top|left" - image_name="Inv_Object" - layout="topleft" - left="24" - name="item_icon" - top="2" - width="16" /> - <item_name - follows="left|right" - height="16" - layout="topleft" - left="45" - allow_html="false" - use_ellipses="true" - name="item_name" - text_color="white" - top="5" - value="..." - width="359" /> -</deletable_wearable_list_item> diff --git a/indra/newview/skins/default/xui/en/widgets/dummy_clothing_list_item.xml b/indra/newview/skins/default/xui/en/widgets/dummy_clothing_list_item.xml deleted file mode 100644 index 80a877a6c2..0000000000 --- a/indra/newview/skins/default/xui/en/widgets/dummy_clothing_list_item.xml +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<dummy_clothing_list_item - follows="top|right|left" - height="23" - layout="topleft" - left="0" - name="dummy_clothing_item" - bottom="0" - width="380"> - <item_icon - height="16" - color="0.75 0.75 0.75 1" - follows="top|left" - image_name="Inv_Object" - layout="topleft" - left="20" - name="item_icon" - top="2" - width="16" /> - <item_name - follows="left|right" - height="16" - layout="topleft" - left="41" - allow_html="false" - use_ellipses="true" - name="item_name" - text_color="LtGray_50" - top="4" - value="..." - width="359" /> - <add_panel - name="btn_add_panel" - layout="topleft" - follows="top|right" - top="0" - left="0" - height="23" - width="26" - tab_stop="false"/> - <add_btn - name="btn_add" - layout="topleft" - follows="top|right" - image_overlay="AddItem_Off" - top="0" - left="0" - height="23" - width="23" - tab_stop="false" - tool_tip="Add more items of this type" /> -</dummy_clothing_list_item> diff --git a/indra/newview/skins/default/xui/en/widgets/inventory_list_item.xml b/indra/newview/skins/default/xui/en/widgets/inventory_list_item.xml index 0a5930c820..50be0ac1a1 100644 --- a/indra/newview/skins/default/xui/en/widgets/inventory_list_item.xml +++ b/indra/newview/skins/default/xui/en/widgets/inventory_list_item.xml @@ -1,13 +1,11 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <inventory_list_item - follows="top|right|left" - height="20" - name="inventory_item" - tab_stop="false" - hover_image="ListItem_Over" - selected_image="ListItem_Select" - separator_image="Wearables_Divider" - width="380"> + height="0" + layout="topleft" + left="0" + name="inventory_list_item" + top="0" + width="0"> <!-- DEFAULT style for inventory list item --> <default_style font="SansSerifSmall" @@ -18,25 +16,4 @@ font="SansSerifSmall" font.style="BOLD" color="EmphasisColor" /> - <item_icon - height="16" - follows="top|left" - image_name="Inv_Object" - layout="topleft" - left="0" - name="item_icon" - top="0" - width="16" /> - <item_name - follows="left|right" - height="20" - layout="topleft" - left="21" - allow_html="false" - use_ellipses="true" - name="item_name" - text_color="white" - top="4" - value="..." - width="359" /> </inventory_list_item> diff --git a/indra/newview/skins/default/xui/fr/panel_nearby_media.xml b/indra/newview/skins/default/xui/fr/panel_nearby_media.xml index 66bfd01a2a..978ca86d62 100644 --- a/indra/newview/skins/default/xui/fr/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/fr/panel_nearby_media.xml @@ -27,7 +27,7 @@ Médias proches </text> <text name="show_text"> - Voir : + Afficher : </text> <combo_box name="show_combo"> <combo_box.item label="Tout" name="All"/> @@ -42,7 +42,7 @@ <scroll_list.columns label="Nom" name="media_name"/> <scroll_list.columns label="Débogage" name="media_debug"/> </scroll_list> - <panel name="media_controls_panel"> + <panel> <layout_stack name="media_controls"> <layout_panel name="stop"> <button name="stop_btn" tool_tip="Arrêter le média sélectionné"/> |