diff options
Diffstat (limited to 'indra')
200 files changed, 4800 insertions, 1330 deletions
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index 41ff5849f4..d06d6baf85 100644 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -954,7 +954,12 @@ namespace LLError std::string class_name = className(site.mClassInfo); std::string function_name = functionName(site.mFunction); +#if LL_LINUX + // gross, but typeid comparison seems to always fail here with gcc4.1 + if (0 != strcmp(site.mClassInfo.name(), typeid(NoClassInfo).name())) +#else if (site.mClassInfo != typeid(NoClassInfo)) +#endif // LL_LINUX { function_name = class_name + "::" + function_name; } @@ -1079,7 +1084,12 @@ namespace LLError #if LL_WINDOWS // DevStudio: __FUNCTION__ already includes the full class name #else + #if LL_LINUX + // gross, but typeid comparison seems to always fail here with gcc4.1 + if (0 != strcmp(site.mClassInfo.name(), typeid(NoClassInfo).name())) + #else if (site.mClassInfo != typeid(NoClassInfo)) + #endif // LL_LINUX { prefix << className(site.mClassInfo) << "::"; } diff --git a/indra/llcommon/llerror.h b/indra/llcommon/llerror.h index 09812de2b8..e64ee5e081 100644 --- a/indra/llcommon/llerror.h +++ b/indra/llcommon/llerror.h @@ -179,7 +179,7 @@ namespace LLError { return s; } // used to indicate the end of a message - class NoClassInfo { }; + class LL_COMMON_API NoClassInfo { }; // used to indicate no class info known for logging //LLCallStacks keeps track of call stacks and output the call stacks to log file diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h index ad8f8632a2..8071c8aa2d 100644 --- a/indra/llcommon/llstring.h +++ b/indra/llcommon/llstring.h @@ -249,7 +249,7 @@ public: ///////////////////////////////////////////////////////////////////////////////////////// // Static Utility functions that operate on std::strings - static std::basic_string<T> null; + static const std::basic_string<T> null; typedef std::map<LLFormatMapString, LLFormatMapString> format_map_t; LL_COMMON_API static void getTokens(const std::basic_string<T>& instr, std::vector<std::basic_string<T> >& tokens, const std::basic_string<T>& delims); @@ -371,7 +371,7 @@ private: LL_COMMON_API static size_type getSubstitution(const std::basic_string<T>& instr, size_type& start, std::vector<std::basic_string<T> >& tokens); }; -template<class T> std::basic_string<T> LLStringUtilBase<T>::null; +template<class T> const std::basic_string<T> LLStringUtilBase<T>::null; template<class T> std::string LLStringUtilBase<T>::sLocale; typedef LLStringUtilBase<char> LLStringUtil; diff --git a/indra/llcommon/tests/llerror_test.cpp b/indra/llcommon/tests/llerror_test.cpp index 6785d0cf17..1558df231a 100644 --- a/indra/llcommon/tests/llerror_test.cpp +++ b/indra/llcommon/tests/llerror_test.cpp @@ -545,15 +545,6 @@ namespace tut // output order void ErrorTestObject::test<10>() { -#if LL_LINUX - skip("Fails on Linux, see comments"); -// on Linux: -// [error, 10] fail: 'order is time type location function message: expected -// '1947-07-08T03:04:05Z INFO: llcommon/tests/llerror_test.cpp(268) : -// writeReturningLocationAndFunction: apple' actual -// '1947-07-08T03:04:05Z INFO: llcommon/tests/llerror_test.cpp(268) : -// LLError::NoClassInfo::writeReturningLocationAndFunction: apple'' -#endif LLError::setPrintLocation(true); LLError::setTimeFunction(roswell); mRecorder.setWantsTime(true); diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp index 91e11b8c0d..36874a5d48 100644 --- a/indra/llmessage/llcurl.cpp +++ b/indra/llmessage/llcurl.cpp @@ -365,6 +365,13 @@ U32 LLCurl::Easy::report(CURLcode code) responseReason = strerror(code) + " : " + mErrorBuffer; } + if(responseCode >= 300 && responseCode < 400) //redirect + { + char new_url[512] ; + curl_easy_getinfo(mCurlEasyHandle, CURLINFO_REDIRECT_URL, new_url); + responseReason = new_url ; //get the new URL. + } + if (mResponder) { mResponder->completedRaw(responseCode, responseReason, mChannels, mOutput); diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp index 8e0245c451..6bf1347514 100644 --- a/indra/llui/llaccordionctrl.cpp +++ b/indra/llui/llaccordionctrl.cpp @@ -66,8 +66,12 @@ LLAccordionCtrl::LLAccordionCtrl(const Params& params):LLPanel(params) , mAutoScrolling( false ) , mAutoScrollRate( 0.f ) , mSelectedTab( NULL ) + , mTabComparator( NULL ) + , mNoVisibleTabsHelpText(NULL) { - mSingleExpansion = params.single_expansion; + initNoTabsWidget(params.empty_accordion_text); + + mSingleExpansion = params.single_expansion; if(mFitParent && !mSingleExpansion) { llinfos << "fit_parent works best when combined with single_expansion" << llendl; @@ -78,7 +82,10 @@ LLAccordionCtrl::LLAccordionCtrl() : LLPanel() , mAutoScrolling( false ) , mAutoScrollRate( 0.f ) , mSelectedTab( NULL ) + , mNoVisibleTabsHelpText(NULL) { + initNoTabsWidget(LLTextBox::Params()); + mSingleExpansion = false; mFitParent = false; LLUICtrlFactory::getInstance()->buildPanel(this, "accordion_parent.xml"); @@ -168,6 +175,8 @@ BOOL LLAccordionCtrl::postBuild() } } + updateNoTabsHelpTextVisibility(); + return TRUE; } @@ -187,8 +196,15 @@ void LLAccordionCtrl::reshape(S32 width, S32 height, BOOL called_from_parent) rcLocal.mRight = rcLocal.mLeft + width; rcLocal.mTop = rcLocal.mBottom + height; + // get textbox a chance to reshape its content + mNoVisibleTabsHelpText->reshape(width, height, called_from_parent); + setRect(rcLocal); + // assume that help text is always fit accordion. + // necessary text paddings can be set via h_pad and v_pad + mNoVisibleTabsHelpText->setRect(getLocalRect()); + arrange(); } @@ -359,6 +375,31 @@ void LLAccordionCtrl::removeCollapsibleCtrl(LLView* view) } } +void LLAccordionCtrl::initNoTabsWidget(const LLTextBox::Params& tb_params) +{ + LLTextBox::Params tp = tb_params; + tp.rect(getLocalRect()); + mNoVisibleTabsOrigString = tp.initial_value().asString(); + mNoVisibleTabsHelpText = LLUICtrlFactory::create<LLTextBox>(tp, this); +} + +void LLAccordionCtrl::updateNoTabsHelpTextVisibility() +{ + bool visible_exists = false; + std::vector<LLAccordionCtrlTab*>::const_iterator it = mAccordionTabs.begin(); + const std::vector<LLAccordionCtrlTab*>::const_iterator it_end = mAccordionTabs.end(); + for (; it != it_end; ++it) + { + if ((*it)->getVisible()) + { + visible_exists = true; + break; + } + } + + mNoVisibleTabsHelpText->setVisible(!visible_exists); +} + void LLAccordionCtrl::arrangeSinge() { S32 panel_left = BORDER_MARGIN; // Margin from left side of Splitter @@ -737,6 +778,20 @@ S32 LLAccordionCtrl::notifyParent(const LLSD& info) } return 1; } + else if (info.has("child_visibility_change")) + { + BOOL new_visibility = info["child_visibility_change"]; + if (new_visibility) + { + // there is at least one visible tab + mNoVisibleTabsHelpText->setVisible(FALSE); + } + else + { + // it could be the latest visible tab, check all of them + updateNoTabsHelpTextVisibility(); + } + } return LLPanel::notifyParent(info); } void LLAccordionCtrl::reset () @@ -745,6 +800,28 @@ void LLAccordionCtrl::reset () mScrollbar->setDocPos(0); } +void LLAccordionCtrl::sort() +{ + if (!mTabComparator) + { + llwarns << "No comparator specified for sorting accordion tabs." << llendl; + return; + } + + std::sort(mAccordionTabs.begin(), mAccordionTabs.end(), LLComparatorAdaptor(*mTabComparator)); + arrange(); +} + +void LLAccordionCtrl::setFilterSubString(const std::string& filter_string) +{ + LLStringUtil::format_map_t args; + args["[SEARCH_TERM]"] = LLURI::escape(filter_string); + std::string text = mNoVisibleTabsOrigString; + LLStringUtil::format(text, args); + + mNoVisibleTabsHelpText->setValue(text); +} + S32 LLAccordionCtrl::calcExpandedTabHeight(S32 tab_index /* = 0 */, S32 available_height /* = 0 */) { if(tab_index < 0) diff --git a/indra/llui/llaccordionctrl.h b/indra/llui/llaccordionctrl.h index a029201c90..fc6f2d896c 100644 --- a/indra/llui/llaccordionctrl.h +++ b/indra/llui/llaccordionctrl.h @@ -34,6 +34,7 @@ #define LL_ACCORDIONCTRL_H #include "llpanel.h" +#include "lltextbox.h" #include "llscrollbar.h" #include <vector> @@ -56,6 +57,19 @@ private: public: + /** + * Abstract comparator for accordion tabs. + */ + class LLTabComparator + { + public: + LLTabComparator() {}; + virtual ~LLTabComparator() {}; + + /** Returns true if tab1 < tab2, false otherwise */ + virtual bool compare(const LLAccordionCtrlTab* tab1, const LLAccordionCtrlTab* tab2) const = 0; + }; + struct Params : public LLInitParam::Block<Params, LLPanel::Params> { @@ -64,10 +78,12 @@ public: accordion tabs are responsible for scrolling their content. *NOTE fit_parent works best when combined with single_expansion. Accordion view should implement getRequiredRect() and provide valid height*/ + Optional<LLTextBox::Params> empty_accordion_text; Params() : single_expansion("single_expansion",false) , fit_parent("fit_parent", false) + , empty_accordion_text("empty_accordion_text") {}; }; @@ -105,7 +121,18 @@ public: void reset (); + void setComparator(const LLTabComparator* comp) { mTabComparator = comp; } + void sort(); + + /** + * Sets filter substring as a search_term for help text when there are no any visible tabs. + */ + void setFilterSubString(const std::string& filter_string); + private: + void initNoTabsWidget(const LLTextBox::Params& tb_params); + void updateNoTabsHelpTextVisibility(); + void arrangeSinge(); void arrangeMultiple(); @@ -123,6 +150,21 @@ private: BOOL autoScroll (S32 x, S32 y); + /** + * An adaptor for LLTabComparator + */ + struct LLComparatorAdaptor + { + LLComparatorAdaptor(const LLTabComparator& comparator) : mComparator(comparator) {}; + + bool operator()(const LLAccordionCtrlTab* tab1, const LLAccordionCtrlTab* tab2) + { + return mComparator.compare(tab1, tab2); + } + + const LLTabComparator& mComparator; + }; + private: LLRect mInnerRect; LLScrollbar* mScrollbar; @@ -130,7 +172,11 @@ private: bool mFitParent; bool mAutoScrolling; F32 mAutoScrollRate; - LLAccordionCtrlTab* mSelectedTab; + LLTextBox* mNoVisibleTabsHelpText; + std::string mNoVisibleTabsOrigString; + + LLAccordionCtrlTab* mSelectedTab; + const LLTabComparator* mTabComparator; }; diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp index 83e67980a3..1bc8086a27 100644 --- a/indra/llui/llaccordionctrltab.cpp +++ b/indra/llui/llaccordionctrltab.cpp @@ -409,6 +409,13 @@ void LLAccordionCtrlTab::changeOpenClose(bool is_open) } } +void LLAccordionCtrlTab::handleVisibilityChange(BOOL new_visibility) +{ + LLUICtrl::handleVisibilityChange(new_visibility); + + notifyParent(LLSD().with("child_visibility_change", new_visibility)); +} + BOOL LLAccordionCtrlTab::handleMouseDown(S32 x, S32 y, MASK mask) { if(mCollapsible && mHeaderVisible && mCanOpenClose) @@ -466,7 +473,7 @@ void LLAccordionCtrlTab::setAccordionView(LLView* panel) addChild(panel,0); } -std::string LLAccordionCtrlTab::getTitle() +std::string LLAccordionCtrlTab::getTitle() const { LLAccordionCtrlTabHeader* header = findChild<LLAccordionCtrlTabHeader>(DD_HEADER_NAME); if (header) diff --git a/indra/llui/llaccordionctrltab.h b/indra/llui/llaccordionctrltab.h index 83a9024a74..82e0234bfc 100644 --- a/indra/llui/llaccordionctrltab.h +++ b/indra/llui/llaccordionctrltab.h @@ -115,7 +115,7 @@ public: void setAccordionView(LLView* panel); LLView* getAccordionView() { return mContainerPanel; }; - std::string getTitle(); + std::string getTitle() const; // Set text and highlight substring in LLAccordionCtrlTabHeader void setTitle(const std::string& title, const std::string& hl = LLStringUtil::null); @@ -154,6 +154,11 @@ public: // Call reshape after changing size virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + /** + * Raises notifyParent event with "child_visibility_change" = new_visibility + */ + void handleVisibilityChange(BOOL new_visibility); + // Changes expand/collapse state and triggers expand/collapse callbacks virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index fad98e553f..341debc9a8 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -810,6 +810,11 @@ void LLFloater::applyTitle() { mDragHandle->setTitle ( mTitle ); } + + if (getHost()) + { + getHost()->updateFloaterTitle(this); + } } std::string LLFloater::getCurrentTitle() const diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index 75342afbe2..e9614ea660 100644 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -339,6 +339,9 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW { if( *cur == '\n' ) { + LLTextSegmentPtr text_segment = new LLLineBreakTextSegment(cur-base); + text_segment->setToken( 0 ); + insertSegment( *seg_list, text_segment, text_len, defaultColor, editor); cur++; if( !*cur || *cur == '\n' ) { @@ -378,9 +381,8 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW } S32 seg_end = cur - base; - LLTextSegmentPtr text_segment = new LLNormalTextSegment( cur_token->getColor(), seg_start, seg_end, editor ); - text_segment->setToken( cur_token ); - insertSegment( seg_list, text_segment, text_len, defaultColor, editor); + //create segments from seg_start to seg_end + insertSegments(wtext, *seg_list,cur_token, text_len, seg_start, seg_end, defaultColor, editor); line_done = TRUE; // to break out of second loop. break; } @@ -486,11 +488,12 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW seg_end = seg_start + between_delimiters + cur_delimiter->getLength(); } - + insertSegments(wtext, *seg_list,cur_delimiter, text_len, seg_start, seg_end, defaultColor, editor); + /* LLTextSegmentPtr text_segment = new LLNormalTextSegment( cur_delimiter->getColor(), seg_start, seg_end, editor ); text_segment->setToken( cur_delimiter ); insertSegment( seg_list, text_segment, text_len, defaultColor, editor); - + */ // Note: we don't increment cur, since the end of one delimited seg may be immediately // followed by the start of another one. continue; @@ -519,10 +522,7 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW // llinfos << "Seg: [" << word.c_str() << "]" << llendl; - - LLTextSegmentPtr text_segment = new LLNormalTextSegment( cur_token->getColor(), seg_start, seg_end, editor ); - text_segment->setToken( cur_token ); - insertSegment( seg_list, text_segment, text_len, defaultColor, editor); + insertSegments(wtext, *seg_list,cur_token, text_len, seg_start, seg_end, defaultColor, editor); } cur += seg_len; continue; @@ -537,24 +537,50 @@ void LLKeywords::findSegments(std::vector<LLTextSegmentPtr>* seg_list, const LLW } } -void LLKeywords::insertSegment(std::vector<LLTextSegmentPtr>* seg_list, LLTextSegmentPtr new_segment, S32 text_len, const LLColor4 &defaultColor, LLTextEditor& editor ) +void LLKeywords::insertSegments(const LLWString& wtext, std::vector<LLTextSegmentPtr>& seg_list, LLKeywordToken* cur_token, S32 text_len, S32 seg_start, S32 seg_end, const LLColor4 &defaultColor, LLTextEditor& editor ) +{ + std::string::size_type pos = wtext.find('\n',seg_start); + + while (pos!=-1 && pos < (std::string::size_type)seg_end) + { + if (pos!=seg_start) + { + LLTextSegmentPtr text_segment = new LLNormalTextSegment( cur_token->getColor(), seg_start, pos, editor ); + text_segment->setToken( cur_token ); + insertSegment( seg_list, text_segment, text_len, defaultColor, editor); + } + + LLTextSegmentPtr text_segment = new LLLineBreakTextSegment(pos); + text_segment->setToken( cur_token ); + insertSegment( seg_list, text_segment, text_len, defaultColor, editor); + + seg_start = pos+1; + pos = wtext.find('\n',seg_start); + } + + LLTextSegmentPtr text_segment = new LLNormalTextSegment( cur_token->getColor(), seg_start, seg_end, editor ); + text_segment->setToken( cur_token ); + insertSegment( seg_list, text_segment, text_len, defaultColor, editor); +} + +void LLKeywords::insertSegment(std::vector<LLTextSegmentPtr>& seg_list, LLTextSegmentPtr new_segment, S32 text_len, const LLColor4 &defaultColor, LLTextEditor& editor ) { - LLTextSegmentPtr last = seg_list->back(); + LLTextSegmentPtr last = seg_list.back(); S32 new_seg_end = new_segment->getEnd(); if( new_segment->getStart() == last->getStart() ) { - seg_list->pop_back(); + seg_list.pop_back(); } else { last->setEnd( new_segment->getStart() ); } - seg_list->push_back( new_segment ); + seg_list.push_back( new_segment ); if( new_seg_end < text_len ) { - seg_list->push_back( new LLNormalTextSegment( defaultColor, new_seg_end, text_len, editor ) ); + seg_list.push_back( new LLNormalTextSegment( defaultColor, new_seg_end, text_len, editor ) ); } } diff --git a/indra/llui/llkeywords.h b/indra/llui/llkeywords.h index e5b66dfa56..09378e408b 100644 --- a/indra/llui/llkeywords.h +++ b/indra/llui/llkeywords.h @@ -129,7 +129,8 @@ public: private: LLColor3 readColor(const std::string& s); - void insertSegment(std::vector<LLTextSegmentPtr> *seg_list, LLTextSegmentPtr new_segment, S32 text_len, const LLColor4 &defaultColor, class LLTextEditor& editor); + void insertSegment(std::vector<LLTextSegmentPtr>& seg_list, LLTextSegmentPtr new_segment, S32 text_len, const LLColor4 &defaultColor, class LLTextEditor& editor); + void insertSegments(const LLWString& wtext, std::vector<LLTextSegmentPtr>& seg_list, LLKeywordToken* token, S32 text_len, S32 seg_start, S32 seg_end, const LLColor4 &defaultColor, LLTextEditor& editor); BOOL mLoaded; word_token_map_t mWordTokenMap; diff --git a/indra/llui/llmultifloater.cpp b/indra/llui/llmultifloater.cpp index 3aea648562..b1dbce0000 100644 --- a/indra/llui/llmultifloater.cpp +++ b/indra/llui/llmultifloater.cpp @@ -238,6 +238,16 @@ void LLMultiFloater::addFloater(LLFloater* floaterp, BOOL select_added_floater, moveResizeHandlesToFront(); } +void LLMultiFloater::updateFloaterTitle(LLFloater* floaterp) +{ + S32 index = mTabContainer->getIndexForPanel(floaterp); + if (index != -1) + { + mTabContainer->setPanelTitle(index, floaterp->getShortTitle()); + } +} + + /** BOOL selectFloater(LLFloater* floaterp) diff --git a/indra/llui/llmultifloater.h b/indra/llui/llmultifloater.h index bbf2c56fe7..24a841f64e 100644 --- a/indra/llui/llmultifloater.h +++ b/indra/llui/llmultifloater.h @@ -80,6 +80,7 @@ public: void onTabSelected(); virtual void updateResizeLimits(); + virtual void updateFloaterTitle(LLFloater* floaterp); protected: struct LLFloaterData diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 55dbf50fd7..72f3a14822 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1101,7 +1101,7 @@ S32 LLTextBase::getLeftOffset(S32 width) case LLFontGL::LEFT: return mHPad; case LLFontGL::HCENTER: - return mHPad + (mVisibleTextRect.getWidth() - width - mHPad) / 2; + return mHPad + llmax(0, (mVisibleTextRect.getWidth() - width - mHPad) / 2); case LLFontGL::RIGHT: return mVisibleTextRect.getWidth() - width; default: @@ -1207,11 +1207,6 @@ void LLTextBase::reflow() // grow line height as necessary based on reported height of this segment line_height = llmax(line_height, segment_height); remaining_pixels -= segment_width; - if (remaining_pixels < 0) - { - // getNumChars() and getDimensions() should return consistent results - remaining_pixels = 0; - } seg_offset += character_count; @@ -1893,7 +1888,7 @@ S32 LLTextBase::getDocIndexFromLocalCoord( S32 local_x, S32 local_y, BOOL round, { // Figure out which line we're nearest to. LLRect visible_region = getVisibleDocumentRect(); - + // binary search for line that starts before local_y line_list_t::const_iterator line_iter = std::lower_bound(mLineInfoList.begin(), mLineInfoList.end(), local_y - mVisibleTextRect.mBottom + visible_region.mBottom, compare_bottom()); @@ -1903,7 +1898,7 @@ S32 LLTextBase::getDocIndexFromLocalCoord( S32 local_x, S32 local_y, BOOL round, } S32 pos = getLength(); - S32 start_x = mVisibleTextRect.mLeft + line_iter->mRect.mLeft; + S32 start_x = mVisibleTextRect.mLeft + line_iter->mRect.mLeft - visible_region.mLeft; segment_set_t::iterator line_seg_iter; S32 line_seg_offset; @@ -2748,6 +2743,12 @@ void LLInlineViewSegment::linkToDocument(LLTextBase* editor) editor->addDocumentChild(mView); } +LLLineBreakTextSegment::LLLineBreakTextSegment(S32 pos):LLTextSegment(pos,pos+1) +{ + LLStyleSP s( new LLStyle(LLStyle::Params().visible(true))); + + mFontHeight = llceil(s->getFont()->getLineHeight()); +} LLLineBreakTextSegment::LLLineBreakTextSegment(LLStyleConstSP style,S32 pos):LLTextSegment(pos,pos+1) { mFontHeight = llceil(style->getFont()->getLineHeight()); diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index 176308c61a..89ce5cdc8e 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -519,6 +519,7 @@ class LLLineBreakTextSegment : public LLTextSegment public: LLLineBreakTextSegment(LLStyleConstSP style,S32 pos); + LLLineBreakTextSegment(S32 pos); ~LLLineBreakTextSegment(); bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const; S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const; diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index b00104c427..3c98cd5b85 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -215,6 +215,7 @@ set(viewer_SOURCE_FILES llfloaterurldisplay.cpp llfloaterurlentry.cpp llfloatervoicedevicesettings.cpp + llfloatervoiceeffect.cpp llfloaterwater.cpp llfloaterwhitelistentry.cpp llfloaterwindlight.cpp @@ -306,6 +307,7 @@ set(viewer_SOURCE_FILES llnotificationstorage.cpp llnotificationtiphandler.cpp lloutfitslist.cpp + lloutfitobserver.cpp lloutputmonitorctrl.cpp llpanelavatar.cpp llpanelavatartag.cpp @@ -356,6 +358,8 @@ set(viewer_SOURCE_FILES llpanelprofileview.cpp llpanelteleporthistory.cpp llpaneltiptoast.cpp + llpanelvoiceeffect.cpp + llpaneltopinfobar.cpp llpanelvolume.cpp llpanelvolumepulldown.cpp llparcelselection.cpp @@ -735,6 +739,7 @@ set(viewer_HEADER_FILES llfloaterurldisplay.h llfloaterurlentry.h llfloatervoicedevicesettings.h + llfloatervoiceeffect.h llfloaterwater.h llfloaterwhitelistentry.h llfloaterwindlight.h @@ -821,6 +826,7 @@ set(viewer_HEADER_FILES llnotificationmanager.h llnotificationstorage.h lloutfitslist.h + lloutfitobserver.h lloutputmonitorctrl.h llpanelavatar.h llpanelavatartag.h @@ -871,6 +877,8 @@ set(viewer_HEADER_FILES llpanelprofileview.h llpanelteleporthistory.h llpaneltiptoast.h + llpanelvoiceeffect.h + llpaneltopinfobar.h llpanelvolume.h llpanelvolumepulldown.h llparcelselection.h diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml index 16e39fc1c4..937c4e4c6a 100644 --- a/indra/newview/app_settings/logcontrol.xml +++ b/indra/newview/app_settings/logcontrol.xml @@ -41,6 +41,8 @@ </array> <key>tags</key> <array> + <!-- sample entry for debugging a specific item --> +<!-- <string>Voice</string> --> </array> </map> </array> diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 6204c8047a..864a79c38a 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -583,7 +583,7 @@ <key>Type</key> <string>U32</string> <key>Value</key> - <integer>0</integer> + <integer>180</integer> </map> <key>AvatarSex</key> <map> @@ -3862,7 +3862,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>0</integer> + <integer>1</integer> </map> <key>InBandwidth</key> <map> @@ -8360,6 +8360,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>ShowMiniLocationPanel</key> + <map> + <key>Comment</key> + <string>Show/Hide Mini-Location Panel</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>SidebarCameraMovement</key> <map> <key>Comment</key> @@ -10748,6 +10759,28 @@ <key>Value</key> <integer>0</integer> </map> + <key>VoiceEffectExpiryWarningTime</key> + <map> + <key>Comment</key> + <string>How much notice to give of Voice Morph subscriptions expiry, in seconds.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <integer>259200</integer> + </map> + <key>VoiceMorphingEnabled</key> + <map> + <key>Comment</key> + <string>Whether or not to enable Voice Morphs and show the UI.</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>AutoDisengageMic</key> <map> <key>Comment</key> diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml index 3ce32a05b0..d4000e9253 100644 --- a/indra/newview/app_settings/settings_per_account.xml +++ b/indra/newview/app_settings/settings_per_account.xml @@ -99,6 +99,17 @@ <key>Value</key> <integer>1</integer> </map> + <key>VoiceEffectDefault</key> + <map> + <key>Comment</key> + <string>Selected Voice Morph</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>00000000-0000-0000-0000-000000000000</string> + </map> <!-- Settings below are for back compatibility only. They are not used in current viewer anymore. But they can't be removed to avoid diff --git a/indra/newview/gpu_table.txt b/indra/newview/gpu_table.txt index 5aad295cb1..62766f9229 100644 --- a/indra/newview/gpu_table.txt +++ b/indra/newview/gpu_table.txt @@ -204,8 +204,8 @@ NVIDIA GeForce 7200 .*NVIDIA.*GeForce 72.* 1 1 NVIDIA GeForce 7300 .*NVIDIA.*GeForce 73.* 1 1 NVIDIA GeForce 7500 .*NVIDIA.*GeForce 75.* 1 1 NVIDIA GeForce 7600 .*NVIDIA.*GeForce 76.* 1 1 -NVIDIA GeForce 7800 .*NVIDIA.*GeForce.*78.* 1 1 -NVIDIA GeForce 7900 .*NVIDIA.*GeForce.*79.* 1 1 +NVIDIA GeForce 7800 .*NVIDIA.*GeForce 78.* 1 1 +NVIDIA GeForce 7900 .*NVIDIA.*GeForce 79.* 1 1 NVIDIA GeForce 8100 .*NVIDIA.*GeForce 81.* 1 1 NVIDIA GeForce 8200 .*NVIDIA.*GeForce 82.* 1 1 NVIDIA GeForce 8300 .*NVIDIA.*GeForce 83.* 1 1 @@ -259,6 +259,7 @@ NVIDIA G84 .*G84.* 1 1 NVIDIA G92 .*G92.* 3 1 NVIDIA G94 .*G94.* 3 1 NVIDIA GeForce Go 6 .*GeForce Go 6.* 1 1 +NVIDIA ION .*NVIDIA ION.* 1 1 NVIDIA NB9M .*GeForce NB9M.* 1 1 NVIDIA NB9P .*GeForce NB9P.* 1 1 NVIDIA GeForce PCX .*GeForce PCX.* 0 1 diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index d2e55f88a0..03efcadc98 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -3589,10 +3589,10 @@ void LLAgent::sendAgentSetAppearance() if (isAgentAvatarValid() && !gAgentAvatarp->isBakedTextureFinal((LLVOAvatarDefines::EBakedTextureIndex)baked_index)) { generate_valid_hash = FALSE; + llinfos << "Not caching baked texture upload for " << (U32)baked_index << " due to being uploaded at low resolution." << llendl; } - LLUUID hash = gAgentWearables.computeBakedTextureHash((EBakedTextureIndex) baked_index, generate_valid_hash); - + const LLUUID hash = gAgentWearables.computeBakedTextureHash((EBakedTextureIndex) baked_index, generate_valid_hash); if (hash.notNull()) { ETextureIndex texture_index = LLVOAvatarDictionary::bakedToLocalTextureIndex((EBakedTextureIndex) baked_index); diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 47f290ad3b..644363826a 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -2360,7 +2360,6 @@ void LLAgentCamera::changeCameraToCustomizeAvatar(BOOL avatar_animate, BOOL came mAnimationDuration = gSavedSettings.getF32("ZoomTime"); } } - setFocusGlobal(LLVector3d::zero); } else { diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index e0104eddf0..d823a3cbbb 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -1638,10 +1638,6 @@ LLUUID LLAgentWearables::computeBakedTextureHash(LLVOAvatarDefines::EBakedTextur { LLUUID asset_id = wearable->getAssetID(); hash.update((const unsigned char*)asset_id.mData, UUID_BYTES); - if (!generate_valid_hash) - { - hash.update((const unsigned char*)asset_id.mData, UUID_BYTES); - } hash_computed = true; } } @@ -1649,6 +1645,15 @@ LLUUID LLAgentWearables::computeBakedTextureHash(LLVOAvatarDefines::EBakedTextur if (hash_computed) { hash.update((const unsigned char*)baked_dict->mWearablesHashID.mData, UUID_BYTES); + + // Add some garbage into the hash so that it becomes invalid. + if (!generate_valid_hash) + { + if (isAgentAvatarValid()) + { + hash.update((const unsigned char*)gAgentAvatarp->getID().mData, UUID_BYTES); + } + } hash.finalize(); hash.raw_digest(hash_id.mData); } diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index e6f363028a..a899926938 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -656,15 +656,37 @@ bool LLAppearanceMgr::wearItemOnAvatar(const LLUUID& item_id_to_wear, bool do_up { if (item_id_to_wear.isNull()) return false; - //only the item from a user's inventory is allowed - if (!gInventory.isObjectDescendentOf(item_id_to_wear, gInventory.getRootFolderID())) return false; - LLViewerInventoryItem* item_to_wear = gInventory.getItem(item_id_to_wear); if (!item_to_wear) return false; + if (gInventory.isObjectDescendentOf(item_to_wear->getUUID(), gInventory.getLibraryRootFolderID())) + { + LLPointer<LLInventoryCallback> cb = new WearOnAvatarCallback(replace); + copy_inventory_item(gAgent.getID(), item_to_wear->getPermissions().getOwner(), item_to_wear->getUUID(), LLUUID::null, std::string(),cb); + return false; + } + else if (!gInventory.isObjectDescendentOf(item_to_wear->getUUID(), gInventory.getRootFolderID())) + { + return false; // not in library and not in agent's inventory + } + else if (gInventory.isObjectDescendentOf(item_to_wear->getUUID(), gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH))) + { + LLNotificationsUtil::add("CannotWearTrash"); + return false; + } + switch (item_to_wear->getType()) { case LLAssetType::AT_CLOTHING: + if (gAgentWearables.areWearablesLoaded()) + { + S32 wearable_count = gAgentWearables.getWearableCount(item_to_wear->getWearableType()); + if ((replace && wearable_count != 0) || + (wearable_count >= LLAgentWearables::MAX_CLOTHING_PER_TYPE) ) + { + removeCOFItemLinks(gAgentWearables.getWearableItemID(item_to_wear->getWearableType(), wearable_count-1), false); + } + } case LLAssetType::AT_BODYPART: // Don't wear anything until initial wearables are loaded, can // destroy clothing items. @@ -676,7 +698,7 @@ bool LLAppearanceMgr::wearItemOnAvatar(const LLUUID& item_id_to_wear, bool do_up // Remove the existing wearables of the same type. // Remove existing body parts anyway because we must not be able to wear e.g. two skins. - if (replace || item_to_wear->getType() == LLAssetType::AT_BODYPART) + if (item_to_wear->getType() == LLAssetType::AT_BODYPART) { removeCOFLinksOfType(item_to_wear->getWearableType(), false); } @@ -1559,6 +1581,7 @@ void LLAppearanceMgr::addCOFItemLink(const LLInventoryItem *item, bool do_update item_array, LLInventoryModel::EXCLUDE_TRASH); bool linked_already = false; + U32 count = 0; for (S32 i=0; i<item_array.count(); i++) { // Are these links to the same object? @@ -1576,15 +1599,21 @@ void LLAppearanceMgr::addCOFItemLink(const LLInventoryItem *item, bool do_update } // Are these links to different items of the same body part // type? If so, new item will replace old. - // TODO: MULTI-WEARABLE: check for wearable limit for clothing types - else if (is_body_part && (vitem->isWearableType()) && (vitem->getWearableType() == wearable_type)) + else if ((vitem->isWearableType()) && (vitem->getWearableType() == wearable_type)) { - if (inv_item->getIsLinkType() && (vitem->getWearableType() == wearable_type)) + ++count; + if (is_body_part && inv_item->getIsLinkType() && (vitem->getWearableType() == wearable_type)) { gInventory.purgeObject(inv_item->getUUID()); } + else if (count >= LLAgentWearables::MAX_CLOTHING_PER_TYPE) + { + // MULTI-WEARABLES: make sure we don't go over MAX_CLOTHING_PER_TYPE + gInventory.purgeObject(inv_item->getUUID()); + } } } + if (linked_already) { if (do_update) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index f0b3740086..95084666bb 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -893,14 +893,20 @@ bool LLAppViewer::init() LLViewerMedia::initClass(); - LLStringOps::setupWeekDaysNames(LLTrans::getString("dateTimeWeekdaysNames")); - LLStringOps::setupWeekDaysShortNames(LLTrans::getString("dateTimeWeekdaysShortNames")); - LLStringOps::setupMonthNames(LLTrans::getString("dateTimeMonthNames")); - LLStringOps::setupMonthShortNames(LLTrans::getString("dateTimeMonthShortNames")); - LLStringOps::setupDayFormat(LLTrans::getString("dateTimeDayFormat")); - - LLStringOps::sAM = LLTrans::getString("dateTimeAM"); - LLStringOps::sPM = LLTrans::getString("dateTimePM"); + //EXT-7013 - On windows for some locale (Japanese) standard + //datetime formatting functions didn't support some parameters such as "weekday". + std::string language = LLControlGroup::getInstance(sGlobalSettingsName)->getString("Language"); + if(language == "ja") + { + LLStringOps::setupWeekDaysNames(LLTrans::getString("dateTimeWeekdaysNames")); + LLStringOps::setupWeekDaysShortNames(LLTrans::getString("dateTimeWeekdaysShortNames")); + LLStringOps::setupMonthNames(LLTrans::getString("dateTimeMonthNames")); + LLStringOps::setupMonthShortNames(LLTrans::getString("dateTimeMonthShortNames")); + LLStringOps::setupDayFormat(LLTrans::getString("dateTimeDayFormat")); + + LLStringOps::sAM = LLTrans::getString("dateTimeAM"); + LLStringOps::sPM = LLTrans::getString("dateTimePM"); + } return true; } diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 7a3eddf7a6..41f5fe64a1 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -203,7 +203,9 @@ LLBottomTray::~LLBottomTray() // override effect of save_visibility=true. // this attribute is necessary to button.initial_callback=Button.SetFloaterToggle works properly: // i.g when floater changes its visibility - button changes its toggle state. + getChild<LLUICtrl>("build_btn")->setControlValue(false); getChild<LLUICtrl>("search_btn")->setControlValue(false); + getChild<LLUICtrl>("world_map_btn")->setControlValue(false); } // *TODO Vadim: why void* ? diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index dd99c6564c..60a2392d87 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -95,7 +95,7 @@ static void* create_non_avatar_caller(void*) return new LLNonAvatarCaller; } -LLVoiceChannel* LLCallFloater::sCurrentVoiceCanel = NULL; +LLVoiceChannel* LLCallFloater::sCurrentVoiceChannel = NULL; LLCallFloater::LLCallFloater(const LLSD& key) : LLTransientDockableFloater(NULL, false, key) @@ -113,7 +113,7 @@ LLCallFloater::LLCallFloater(const LLSD& key) mSpeakerDelayRemover = new LLSpeakersDelayActionsStorage(boost::bind(&LLCallFloater::removeVoiceLeftParticipant, this, _1), voice_left_remove_delay); mFactoryMap["non_avatar_caller"] = LLCallbackMap(create_non_avatar_caller, NULL); - LLVoiceClient::getInstance()->addObserver(this); + LLVoiceClient::instance().addObserver(this); LLTransientFloaterMgr::getInstance()->addControlView(this); // force docked state since this floater doesn't save it between recreations @@ -158,7 +158,6 @@ BOOL LLCallFloater::postBuild() initAgentData(); - connectToChannel(LLVoiceChannel::getCurrentVoiceChannel()); setIsChrome(true); @@ -204,7 +203,7 @@ void LLCallFloater::draw() } // virtual -void LLCallFloater::onChange() +void LLCallFloater::onParticipantsChanged() { if (NULL == mParticipants) return; updateParticipantsVoiceState(); @@ -287,22 +286,22 @@ void LLCallFloater::updateSession() if (NULL == mSpeakerManager) { - // by default let show nearby chat participants + // By default show nearby chat participants mSpeakerManager = LLLocalSpeakerMgr::getInstance(); LL_DEBUGS("Voice") << "Set DEFAULT speaker manager" << LL_ENDL; mVoiceType = VC_LOCAL_CHAT; } updateTitle(); - - //hide "Leave Call" button for nearby chat + + // Hide "Leave Call" button for nearby chat bool is_local_chat = mVoiceType == VC_LOCAL_CHAT; childSetVisible("leave_call_btn_panel", !is_local_chat); refreshParticipantList(); updateAgentModeratorState(); - //show floater for voice calls & only in CONNECTED to voice channel state + // Show floater for voice calls & only in CONNECTED to voice channel state if (!is_local_chat && voice_channel && LLVoiceChannel::STATE_CONNECTED == voice_channel->getState()) @@ -368,7 +367,7 @@ void LLCallFloater::sOnCurrentChannelChanged(const LLUUID& /*session_id*/) // *NOTE: if signal was sent for voice channel with LLVoiceChannel::STATE_NO_CHANNEL_INFO // it sill be sent for the same channel again (when state is changed). // So, lets ignore this call. - if (channel == sCurrentVoiceCanel) return; + if (channel == sCurrentVoiceChannel) return; LLCallFloater* call_floater = LLFloaterReg::getTypedInstance<LLCallFloater>("voice_controls"); @@ -715,9 +714,9 @@ void LLCallFloater::connectToChannel(LLVoiceChannel* channel) { mVoiceChannelStateChangeConnection.disconnect(); - sCurrentVoiceCanel = channel; + sCurrentVoiceChannel = channel; - mVoiceChannelStateChangeConnection = sCurrentVoiceCanel->setStateChangedCallback(boost::bind(&LLCallFloater::onVoiceChannelStateChanged, this, _1, _2)); + mVoiceChannelStateChangeConnection = sCurrentVoiceChannel->setStateChangedCallback(boost::bind(&LLCallFloater::onVoiceChannelStateChanged, this, _1, _2)); updateState(channel->getState()); } @@ -737,7 +736,7 @@ void LLCallFloater::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old void LLCallFloater::updateState(const LLVoiceChannel::EState& new_state) { - LL_DEBUGS("Voice") << "Updating state: " << new_state << ", session name: " << sCurrentVoiceCanel->getSessionName() << LL_ENDL; + LL_DEBUGS("Voice") << "Updating state: " << new_state << ", session name: " << sCurrentVoiceChannel->getSessionName() << LL_ENDL; if (LLVoiceChannel::STATE_CONNECTED == new_state) { updateSession(); diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h index 0a8ea7de39..e4341175e2 100644 --- a/indra/newview/llcallfloater.h +++ b/indra/newview/llcallfloater.h @@ -47,15 +47,15 @@ class LLSpeakerMgr; class LLSpeakersDelayActionsStorage; /** - * The Voice Control Panel is an ambient window summoned by clicking the flyout chevron on the Speak button. - * It can be torn-off and freely positioned onscreen. + * The Voice Control Panel is an ambient window summoned by clicking the flyout chevron + * on the Speak button. It can be torn-off and freely positioned onscreen. * - * When the Resident is engaged in Nearby Voice Chat, the Voice Control Panel provides control over - * the Resident's own microphone input volume, the audible volume of each of the other participants, - * the Resident's own Voice Morphing settings (if she has subscribed to enable the feature), and Voice Recording. + * When the Resident is engaged in Voice Chat, the Voice Control Panel provides control + * over the audible volume of each of the other participants, the Resident's own Voice + * Morphing settings (if she has subscribed to enable the feature), and Voice Recording. * - * When the Resident is engaged in any chat except Nearby Chat, the Voice Control Panel also provides an - * 'Leave Call' button to allow the Resident to leave that voice channel. + * When the Resident is engaged in any chat except Nearby Chat, the Voice Control Panel + * also provides a 'Leave Call' button to allow the Resident to leave that voice channel. */ class LLCallFloater : public LLTransientDockableFloater, LLVoiceClientParticipantObserver { @@ -75,7 +75,7 @@ public: * * Refreshes list to display participants not in voice as disabled. */ - /*virtual*/ void onChange(); + /*virtual*/ void onParticipantsChanged(); static void sOnCurrentChannelChanged(const LLUUID& session_id); @@ -259,7 +259,7 @@ private: * * @see sOnCurrentChannelChanged() */ - static LLVoiceChannel* sCurrentVoiceCanel; + static LLVoiceChannel* sCurrentVoiceChannel; /* virtual */ LLTransientFloaterMgr::ETransientGroup getGroup() { return LLTransientFloaterMgr::IM; } diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp index 79ce2f8f6b..916d53da3c 100644 --- a/indra/newview/llcofwearables.cpp +++ b/indra/newview/llcofwearables.cpp @@ -387,7 +387,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->childSetVisible("wearable_type_separator_panel", last); + item_panel->childSetVisible("wearable_type_separator_icon", last); return item_panel; } @@ -421,7 +421,7 @@ LLPanelDeletableWearableListItem* LLCOFWearables::buildAttachemntListItem(LLView llassert(item); if (!item) return NULL; - LLPanelDeletableWearableListItem* item_panel = LLPanelDeletableWearableListItem::create(item); + LLPanelAttachmentListItem* item_panel = LLPanelAttachmentListItem::create(item); if (!item_panel) return NULL; //setting callbacks diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 593d5c267e..5fbbb2c1a8 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -501,7 +501,7 @@ void LLFloaterPreference::onOpen(const LLSD& key) if (can_choose_maturity) { // if they're not adult or a god, they shouldn't see the adult selection, so delete it - if (!gAgent.isAdult() && !gAgent.isGodlike()) + if (!gAgent.isAdult() && !gAgent.isGodlikeWithoutAdminMenuFakery()) { // we're going to remove the adult entry from the combo LLScrollListCtrl* maturity_list = maturity_combo->findChild<LLScrollListCtrl>("ComboBox"); diff --git a/indra/newview/llfloatervoiceeffect.cpp b/indra/newview/llfloatervoiceeffect.cpp new file mode 100644 index 0000000000..ca1f142760 --- /dev/null +++ b/indra/newview/llfloatervoiceeffect.cpp @@ -0,0 +1,288 @@ +/** + * @file llfloatervoiceeffect.cpp + * @author Aimee + * @brief Selection and preview of voice effect. + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2002-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llfloatervoiceeffect.h" + +#include "llscrolllistctrl.h" +#include "lltrans.h" +#include "llweb.h" + +LLFloaterVoiceEffect::LLFloaterVoiceEffect(const LLSD& key) + : LLFloater(key) +{ + mCommitCallbackRegistrar.add("VoiceEffect.Record", boost::bind(&LLFloaterVoiceEffect::onClickRecord, this)); + mCommitCallbackRegistrar.add("VoiceEffect.Play", boost::bind(&LLFloaterVoiceEffect::onClickPlay, this)); + mCommitCallbackRegistrar.add("VoiceEffect.Stop", boost::bind(&LLFloaterVoiceEffect::onClickStop, this)); +// mCommitCallbackRegistrar.add("VoiceEffect.Activate", boost::bind(&LLFloaterVoiceEffect::onClickActivate, this)); +} + +// virtual +LLFloaterVoiceEffect::~LLFloaterVoiceEffect() +{ + if(LLVoiceClient::instanceExists()) + { + LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); + if (effect_interface) + { + effect_interface->removeObserver(this); + } + } +} + +// virtual +BOOL LLFloaterVoiceEffect::postBuild() +{ + setDefaultBtn("record_btn"); + getChild<LLButton>("record_btn")->setFocus(true); + childSetTextArg("voice_morphing_link", "[URL]", LLTrans::getString("voice_morphing_url")); + + mVoiceEffectList = getChild<LLScrollListCtrl>("voice_effect_list"); + if (mVoiceEffectList) + { + mVoiceEffectList->setCommitCallback(boost::bind(&LLFloaterVoiceEffect::onClickPlay, this)); +// mVoiceEffectList->setDoubleClickCallback(boost::bind(&LLFloaterVoiceEffect::onClickActivate, this)); + } + + LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); + if (effect_interface) + { + effect_interface->addObserver(this); + + // Disconnect from the current voice channel ready to record a voice sample for previewing + effect_interface->enablePreviewBuffer(true); + } + + refreshEffectList(); + updateControls(); + + return TRUE; +} + +// virtual +void LLFloaterVoiceEffect::onClose(bool app_quitting) +{ + LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); + if (effect_interface) + { + effect_interface->enablePreviewBuffer(false); + } +} + +void LLFloaterVoiceEffect::refreshEffectList() +{ + if (!mVoiceEffectList) + { + return; + } + + LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); + if (!effect_interface) + { + mVoiceEffectList->setEnabled(false); + return; + } + + LL_DEBUGS("Voice")<< "Rebuilding Voice Morph list."<< LL_ENDL; + + // Preserve selected items and scroll position + S32 scroll_pos = mVoiceEffectList->getScrollPos(); + uuid_vec_t selected_items; + std::vector<LLScrollListItem*> items = mVoiceEffectList->getAllSelected(); + for(std::vector<LLScrollListItem*>::const_iterator it = items.begin(); it != items.end(); it++) + { + selected_items.push_back((*it)->getUUID()); + } + + mVoiceEffectList->deleteAllItems(); + + { + // Add the "No Voice Morph" entry + LLSD element; + + element["id"] = LLUUID::null; + element["columns"][NAME_COLUMN]["column"] = "name"; + element["columns"][NAME_COLUMN]["value"] = getString("no_voice_effect"); + element["columns"][NAME_COLUMN]["font"]["style"] = "BOLD"; + + LLScrollListItem* sl_item = mVoiceEffectList->addElement(element, ADD_BOTTOM); + // *HACK: Copied from llfloatergesture.cpp : ["font"]["style"] does not affect font style :( + if(sl_item) + { + ((LLScrollListText*)sl_item->getColumn(0))->setFontStyle(LLFontGL::BOLD); + } + } + + // Add each Voice Morph template, if there are any (template list includes all usable effects) + const voice_effect_list_t& template_list = effect_interface->getVoiceEffectTemplateList(); + if (!template_list.empty()) + { + for (voice_effect_list_t::const_iterator it = template_list.begin(); it != template_list.end(); ++it) + { + const LLUUID& effect_id = it->second; + std::string effect_name = it->first; + + LLSD effect_properties = effect_interface->getVoiceEffectProperties(effect_id); + + // Tag the active effect. + if (effect_id == LLVoiceClient::instance().getVoiceEffectDefault()) + { + effect_name += " " + getString("active_voice_effect"); + } + + // Tag available effects that are new this session + if (effect_properties["is_new"].asBoolean()) + { + effect_name += " " + getString("new_voice_effect"); + } + + LLDate expiry_date = effect_properties["expiry_date"].asDate(); + bool is_template_only = effect_properties["template_only"].asBoolean(); + + std::string font_style = "NORMAL"; + if (!is_template_only) + { + font_style = "BOLD"; + } + + LLSD element; + element["id"] = effect_id; + + element["columns"][NAME_COLUMN]["column"] = "name"; + element["columns"][NAME_COLUMN]["value"] = effect_name; + element["columns"][NAME_COLUMN]["font"]["style"] = font_style; + + element["columns"][1]["column"] = "expires"; + if (!is_template_only) + { + element["columns"][DATE_COLUMN]["value"] = expiry_date; + element["columns"][DATE_COLUMN]["type"] = "date"; + } + else { + element["columns"][DATE_COLUMN]["value"] = getString("unsubscribed_voice_effect"); + } +// element["columns"][DATE_COLUMN]["font"]["style"] = "NORMAL"; + + LLScrollListItem* sl_item = mVoiceEffectList->addElement(element, ADD_BOTTOM); + // *HACK: Copied from llfloatergesture.cpp : ["font"]["style"] does not affect font style :( + if(sl_item) + { + LLFontGL::StyleFlags style = is_template_only ? LLFontGL::NORMAL : LLFontGL::BOLD; + dynamic_cast<LLScrollListText*>(sl_item->getColumn(0))->setFontStyle(style); + } + } + } + + // Re-select items that were selected before, and restore the scroll position + for(uuid_vec_t::iterator it = selected_items.begin(); it != selected_items.end(); it++) + { + mVoiceEffectList->selectByID(*it); + } + mVoiceEffectList->setScrollPos(scroll_pos); + mVoiceEffectList->setEnabled(true); +} + +void LLFloaterVoiceEffect::updateControls() +{ + bool recording = false; + + LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); + if (effect_interface) + { + recording = effect_interface->isPreviewRecording(); + } + + getChild<LLButton>("record_btn")->setVisible(!recording); + getChild<LLButton>("record_stop_btn")->setVisible(recording); +} + +// virtual +void LLFloaterVoiceEffect::onVoiceEffectChanged(bool effect_list_updated) +{ + if (effect_list_updated) + { + refreshEffectList(); + } + updateControls(); +} + +void LLFloaterVoiceEffect::onClickRecord() +{ + LL_DEBUGS("Voice") << "Record clicked" << LL_ENDL; + LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); + if (effect_interface) + { + effect_interface->recordPreviewBuffer(); + } + updateControls(); +} + +void LLFloaterVoiceEffect::onClickPlay() +{ + LL_DEBUGS("Voice") << "Play clicked" << LL_ENDL; + if (!mVoiceEffectList) + { + return; + } + + const LLUUID& effect_id = mVoiceEffectList->getCurrentID(); + + LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); + if (effect_interface) + { + effect_interface->playPreviewBuffer(effect_id); + } + updateControls(); +} + +void LLFloaterVoiceEffect::onClickStop() +{ + LL_DEBUGS("Voice") << "Stop clicked" << LL_ENDL; + LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); + if (effect_interface) + { + effect_interface->stopPreviewBuffer(); + } + updateControls(); +} + +//void LLFloaterVoiceEffect::onClickActivate() +//{ +// LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); +// if (effect_interface && mVoiceEffectList) +// { +// effect_interface->setVoiceEffect(mVoiceEffectList->getCurrentID()); +// } +//} + diff --git a/indra/newview/llfloatervoiceeffect.h b/indra/newview/llfloatervoiceeffect.h new file mode 100644 index 0000000000..fe207a05c3 --- /dev/null +++ b/indra/newview/llfloatervoiceeffect.h @@ -0,0 +1,78 @@ +/** + * @file llfloatervoiceeffect.h + * @author Aimee + * @brief Selection and preview of voice effects. + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2002-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_LLFLOATERVOICEEFFECT_H +#define LL_LLFLOATERVOICEEFFECT_H + +#include "llfloater.h" +#include "llvoiceclient.h" + +class LLButton; +class LLScrollListCtrl; + +class LLFloaterVoiceEffect + : public LLFloater + , public LLVoiceEffectObserver +{ +public: + LOG_CLASS(LLFloaterVoiceEffect); + + LLFloaterVoiceEffect(const LLSD& key); + virtual ~LLFloaterVoiceEffect(); + + virtual BOOL postBuild(); + virtual void onClose(bool app_quitting); + +private: + enum ColumnIndex + { + NAME_COLUMN = 0, + DATE_COLUMN = 1, + }; + + void refreshEffectList(); + void updateControls(); + + /// Called by voice effect provider when voice effect list is changed. + virtual void onVoiceEffectChanged(bool effect_list_updated); + + void onClickRecord(); + void onClickPlay(); + void onClickStop(); +// void onClickActivate(); + + LLUUID mSelectedID; + LLScrollListCtrl* mVoiceEffectList; +}; + +#endif diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 3aa9d75bc0..967f38bfd2 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -60,8 +60,14 @@ #include "llinventorymodel.h" #include "llrootview.h" #include "llspeakers.h" +#include "llsidetray.h" +static const S32 RECT_PADDING_NOT_INIT = -1; +static const S32 RECT_PADDING_NEED_RECALC = -2; + +S32 LLIMFloater::sAllowedRectRightPadding = RECT_PADDING_NOT_INIT; + LLIMFloater::LLIMFloater(const LLUUID& session_id) : LLTransientDockableFloater(NULL, true, session_id), mControlPanel(NULL), @@ -444,19 +450,44 @@ LLIMFloater* LLIMFloater::show(const LLUUID& session_id) return floater; } +//static +bool LLIMFloater::resetAllowedRectPadding(const LLSD& newvalue) +{ + //reset allowed rect right padding if "SidebarCameraMovement" option + //or sidebar state changed + sAllowedRectRightPadding = RECT_PADDING_NEED_RECALC ; + return true; +} + void LLIMFloater::getAllowedRect(LLRect& rect) { + if (sAllowedRectRightPadding == RECT_PADDING_NOT_INIT) //wasn't initialized + { + gSavedSettings.getControl("SidebarCameraMovement")->getSignal()->connect(boost::bind(&LLIMFloater::resetAllowedRectPadding, _2)); + + LLSideTray* side_bar = LLSideTray::getInstance(); + side_bar->getCollapseSignal().connect(boost::bind(&LLIMFloater::resetAllowedRectPadding, _2)); + sAllowedRectRightPadding = RECT_PADDING_NEED_RECALC; + } + rect = gViewerWindow->getWorldViewRectScaled(); - static S32 right_padding = 0; - if (right_padding == 0) + if (sAllowedRectRightPadding == RECT_PADDING_NEED_RECALC) //recalc allowed rect right padding { LLPanel* side_bar_tabs = gViewerWindow->getRootView()->getChild<LLPanel> ( "side_bar_tabs"); - right_padding = side_bar_tabs->getRect().getWidth(); + sAllowedRectRightPadding = side_bar_tabs->getRect().getWidth(); LLTransientFloaterMgr::getInstance()->addControlView(side_bar_tabs); + + if (gSavedSettings.getBOOL("SidebarCameraMovement") == FALSE) + { + LLSideTray* side_bar = LLSideTray::getInstance(); + + if (side_bar->getVisible() && !side_bar->getCollapsed()) + sAllowedRectRightPadding += side_bar->getRect().getWidth(); + } } - rect.mRight -= right_padding; + rect.mRight -= sAllowedRectRightPadding; } void LLIMFloater::setDocked(bool docked, bool pop_on_undock) diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h index fef178e3a2..f1e68a2b3d 100644 --- a/indra/newview/llimfloater.h +++ b/indra/newview/llimfloater.h @@ -155,6 +155,10 @@ private: static void closeHiddenIMToasts(); + static bool resetAllowedRectPadding(const LLSD& newvalue); + //need to keep this static for performance issues + static S32 sAllowedRectRightPadding; + static void confirmLeaveCallCallback(const LLSD& notification, const LLSD& response); LLPanelChatControlPanel* mControlPanel; diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index b7495f7dbe..3a9c5ba698 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -103,7 +103,6 @@ void dec_busy_count() } // Function declarations -void wear_add_inventory_item_on_avatar(LLInventoryItem* item); void remove_inventory_category_from_avatar(LLInventoryCategory* category); void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_id); bool move_task_inventory_callback(const LLSD& notification, const LLSD& response, LLMoveInv*); @@ -1194,18 +1193,18 @@ void LLItemBridge::buildDisplayName(LLInventoryItem* item, std::string& name) LLFontGL::StyleFlags LLItemBridge::getLabelStyle() const { U8 font = LLFontGL::NORMAL; + const LLViewerInventoryItem* item = getItem(); if (get_is_item_worn(mUUID)) { // llinfos << "BOLD" << llendl; font |= LLFontGL::BOLD; } - - const LLViewerInventoryItem* item = getItem(); - if (item && item->getIsLinkType()) + else if(item && item->getIsLinkType()) { font |= LLFontGL::ITALIC; } + return (LLFontGL::StyleFlags)font; } @@ -4029,24 +4028,6 @@ void LLObjectBridge::openItem() get_is_item_worn(mUUID) ? "detach" : "attach"); } -LLFontGL::StyleFlags LLObjectBridge::getLabelStyle() const -{ - U8 font = LLFontGL::NORMAL; - - if(get_is_item_worn( mUUID ) ) - { - font |= LLFontGL::BOLD; - } - - LLInventoryItem* item = getItem(); - if (item && item->getIsLinkType()) - { - font |= LLFontGL::ITALIC; - } - - return (LLFontGL::StyleFlags)font; -} - std::string LLObjectBridge::getLabelSuffix() const { if (get_is_item_worn(mUUID)) @@ -4295,33 +4276,6 @@ LLWearableBridge::LLWearableBridge(LLInventoryPanel* inventory, mInvType = inv_type; } -// *NOTE: hack to get from avatar inventory to avatar -void wear_inventory_item_on_avatar( LLInventoryItem* item ) -{ - if(item) - { - lldebugs << "wear_inventory_item_on_avatar( " << item->getName() - << " )" << llendl; - - LLAppearanceMgr::getInstance()->wearItemOnAvatar(item->getUUID(), true, false); - } -} - -void wear_add_inventory_item_on_avatar( LLInventoryItem* item ) -{ - if(item) - { - lldebugs << "wear_add_inventory_item_on_avatar( " << item->getName() - << " )" << llendl; - - LLWearableList::instance().getAsset(item->getAssetUUID(), - item->getName(), - item->getType(), - LLWearableBridge::onWearAddOnAvatarArrived, - new LLUUID(item->getUUID())); - } -} - void remove_inventory_category_from_avatar( LLInventoryCategory* category ) { if(!category) return; @@ -4637,21 +4591,7 @@ void LLWearableBridge::wearOnAvatar() LLViewerInventoryItem* item = getItem(); if(item) { - if(!isAgentInventory()) - { - LLPointer<LLInventoryCallback> cb = new WearOnAvatarCallback(); - copy_inventory_item( - gAgent.getID(), - item->getPermissions().getOwner(), - item->getUUID(), - LLUUID::null, - std::string(), - cb); - } - else - { - wear_inventory_item_on_avatar(item); - } + LLAppearanceMgr::instance().wearItemOnAvatar(item->getUUID(), true, true); } } @@ -4668,21 +4608,7 @@ void LLWearableBridge::wearAddOnAvatar() LLViewerInventoryItem* item = getItem(); if(item) { - if(!isAgentInventory()) - { - LLPointer<LLInventoryCallback> cb = new WearOnAvatarCallback(); - copy_inventory_item( - gAgent.getID(), - item->getPermissions().getOwner(), - item->getUUID(), - LLUUID::null, - std::string(), - cb); - } - else - { - wear_add_inventory_item_on_avatar(item); - } + LLAppearanceMgr::instance().wearItemOnAvatar(item->getUUID(), true, false); } } @@ -5207,41 +5133,7 @@ class LLWearableBridgeAction: public LLInvFVBridgeAction public: virtual void doIt() { - if(isItemInTrash()) - { - LLNotificationsUtil::add("CannotWearTrash"); - } - else if(isAgentInventory()) - { - if(!get_is_item_worn(mUUID)) - { - wearOnAvatar(); - } - } - else - { - // must be in the inventory library. copy it to our inventory - // and put it on right away. - LLViewerInventoryItem* item = getItem(); - if(item && item->isFinished()) - { - LLPointer<LLInventoryCallback> cb = new WearOnAvatarCallback(); - copy_inventory_item( - gAgent.getID(), - item->getPermissions().getOwner(), - item->getUUID(), - LLUUID::null, - std::string(), - cb); - } - else if(item) - { - // *TODO: We should fetch the item details, and then do - // the operation above. - LLNotificationsUtil::add("CannotWearInfoNotComplete"); - } - } - LLInvFVBridgeAction::doIt(); + wearOnAvatar(); } virtual ~LLWearableBridgeAction(){} protected: @@ -5280,21 +5172,7 @@ void LLWearableBridgeAction::wearOnAvatar() LLViewerInventoryItem* item = getItem(); if(item) { - if(!isAgentInventory()) - { - LLPointer<LLInventoryCallback> cb = new WearOnAvatarCallback(); - copy_inventory_item( - gAgent.getID(), - item->getPermissions().getOwner(), - item->getUUID(), - LLUUID::null, - std::string(), - cb); - } - else - { - wear_inventory_item_on_avatar(item); - } + LLAppearanceMgr::instance().wearItemOnAvatar(item->getUUID(), true, true); } } diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 59c1f3d6fb..a342a2da14 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -436,7 +436,6 @@ public: virtual LLUIImagePtr getIcon() const; virtual void performAction(LLInventoryModel* model, std::string action); virtual void openItem(); - virtual LLFontGL::StyleFlags getLabelStyle() const; virtual std::string getLabelSuffix() const; virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual BOOL renameItem(const std::string& new_name); @@ -592,8 +591,6 @@ public: U32 flags = 0x00) const; }; -void wear_inventory_item_on_avatar(LLInventoryItem* item); - void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attachment); diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 817da34c61..ca6cede7e9 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -185,8 +185,6 @@ void remove_category(LLInventoryModel* model, const LLUUID& cat_id) } } - // go ahead and do the normal remove if no 'last calling - // cards' are being removed. LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id); if (cat) { diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h index 33b52cfd5e..c82ebd1439 100644 --- a/indra/newview/llinventoryfunctions.h +++ b/indra/newview/llinventoryfunctions.h @@ -324,6 +324,19 @@ private: LLWearableType::EType mWearableType; }; +/** Filter out wearables-links */ +class LLFindActualWearablesOfType : public LLFindWearablesOfType +{ +public: + LLFindActualWearablesOfType(LLWearableType::EType type) : LLFindWearablesOfType(type) {} + virtual ~LLFindActualWearablesOfType() {} + virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item) + { + if (item && item->getIsLinkType()) return false; + return LLFindWearablesOfType::operator()(cat, item); + } +}; + // Find worn items. class LLFindWorn : public LLInventoryCollectFunctor { diff --git a/indra/newview/llinventoryitemslist.cpp b/indra/newview/llinventoryitemslist.cpp index 750cdfb678..cd0e976a79 100644 --- a/indra/newview/llinventoryitemslist.cpp +++ b/indra/newview/llinventoryitemslist.cpp @@ -132,7 +132,8 @@ BOOL LLPanelInventoryListItemBase::postBuild() setIconCtrl(getChild<LLIconCtrl>("item_icon")); setTitleCtrl(getChild<LLTextBox>("item_name")); - mIconImage = LLInventoryIcon::getIcon(mItem->getType(), mItem->getInventoryType(), mItem->getIsLinkType(), mItem->getFlags(), FALSE); + BOOL show_links = mForceNoLinksOnIcons ? FALSE : mItem->getIsLinkType(); + mIconImage = LLInventoryIcon::getIcon(mItem->getType(), mItem->getInventoryType(), show_links, mItem->getFlags(), FALSE); setNeedsRefresh(true); @@ -198,6 +199,7 @@ LLPanelInventoryListItemBase::LLPanelInventoryListItemBase(LLViewerInventoryItem , mLeftWidgetsWidth(0) , mRightWidgetsWidth(0) , mNeedsRefresh(false) +, mForceNoLinksOnIcons(false) { } diff --git a/indra/newview/llinventoryitemslist.h b/indra/newview/llinventoryitemslist.h index 03ad7c2184..2c60d38cb5 100644 --- a/indra/newview/llinventoryitemslist.h +++ b/indra/newview/llinventoryitemslist.h @@ -177,7 +177,13 @@ protected: void setIconImage(const LLUIImagePtr& image); /** Set item title - inventory item name usually */ - void setTitle(const std::string& title, const std::string& highlit_text); + virtual void setTitle(const std::string& title, const std::string& highlit_text); + + + LLViewerInventoryItem* mItem; + + // force not showing link icon on item's icon + bool mForceNoLinksOnIcons; private: @@ -193,7 +199,6 @@ private: /** reshape remaining widgets */ void reshapeMiddleWidgets(); - LLViewerInventoryItem* mItem; LLIconCtrl* mIconCtrl; LLTextBox* mTitleCtrl; diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 2e1c5238d3..6fc5804a48 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -35,6 +35,7 @@ #include "llagent.h" #include "llagentwearables.h" +#include "llappearancemgr.h" #include "llinventorypanel.h" #include "llinventorybridge.h" #include "llinventoryfunctions.h" @@ -2561,7 +2562,7 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**) { LLViewerInventoryItem* wearable_item; wearable_item = gInventory.getItem(wearable_ids[i]); - wear_inventory_item_on_avatar(wearable_item); + LLAppearanceMgr::instance().wearItemOnAvatar(wearable_item->getUUID(), true, true); } } diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp index d2b402fe14..bd35259670 100644 --- a/indra/newview/llinventoryobserver.cpp +++ b/indra/newview/llinventoryobserver.cpp @@ -62,13 +62,9 @@ #include "llsdutil.h" #include <deque> -// If the viewer gets a notification, your observer assumes -// that that notification is for itself and then tries to process -// the results. The notification could be for something else (e.g. -// you're fetching an item and a notification gets triggered because -// you renamed some other item). This counter is to specify how many -// notification to wait for before giving up. -static const U32 MAX_NUM_NOTIFICATIONS_TO_PROCESS = 127; +const U32 LLInventoryFetchItemsObserver::MAX_NUM_ATTEMPTS_TO_PROCESS = 10; +const F32 LLInventoryFetchItemsObserver::FETCH_TIMER_EXPIRY = 10.0f; + LLInventoryObserver::LLInventoryObserver() { @@ -149,7 +145,7 @@ void LLInventoryCompletionObserver::watchItem(const LLUUID& id) LLInventoryFetchItemsObserver::LLInventoryFetchItemsObserver(const LLUUID& item_id) : LLInventoryFetchObserver(item_id), - mNumTries(MAX_NUM_NOTIFICATIONS_TO_PROCESS) + mNumTries(MAX_NUM_ATTEMPTS_TO_PROCESS) { mIDs.clear(); mIDs.push_back(item_id); @@ -158,35 +154,47 @@ LLInventoryFetchItemsObserver::LLInventoryFetchItemsObserver(const LLUUID& item_ LLInventoryFetchItemsObserver::LLInventoryFetchItemsObserver(const uuid_vec_t& item_ids) : LLInventoryFetchObserver(item_ids), - mNumTries(MAX_NUM_NOTIFICATIONS_TO_PROCESS) + mNumTries(MAX_NUM_ATTEMPTS_TO_PROCESS) { } void LLInventoryFetchItemsObserver::changed(U32 mask) { - BOOL any_items_missing = FALSE; - // scan through the incomplete items and move or erase them as // appropriate. if (!mIncomplete.empty()) { + // if period of an attempt expired... + if (mFetchingPeriod.hasExpired()) + { + // ...reset timer and reduce count of attempts + mFetchingPeriod.reset(); + mFetchingPeriod.setTimerExpirySec(FETCH_TIMER_EXPIRY); + + --mNumTries; + + LL_INFOS("InventoryFetch") << "LLInventoryFetchItemsObserver: " << this << ", attempt(s) left: " << (S32)mNumTries << LL_ENDL; + } + + // do we still have any attempts? + bool timeout_expired = mNumTries <= 0; + for (uuid_vec_t::iterator it = mIncomplete.begin(); it < mIncomplete.end(); ) { const LLUUID& item_id = (*it); LLViewerInventoryItem* item = gInventory.getItem(item_id); if (!item) { - any_items_missing = TRUE; - if (mNumTries > 0) + if (timeout_expired) { - // Keep trying. - ++it; + // Just concede that this item hasn't arrived in reasonable time and continue on. + LL_WARNS("InventoryFetch") << "Fetcher timed out when fetching inventory item UUID: " << item_id << LL_ENDL; + it = mIncomplete.erase(it); } else { - // Just concede that this item hasn't arrived in reasonable time and continue on. - llwarns << "Fetcher timed out when fetching inventory item assetID:" << item_id << llendl; - it = mIncomplete.erase(it); + // Keep trying. + ++it; } continue; } @@ -198,14 +206,10 @@ void LLInventoryFetchItemsObserver::changed(U32 mask) } ++it; } - if (any_items_missing) - { - mNumTries--; - } if (mIncomplete.empty()) { - mNumTries = MAX_NUM_NOTIFICATIONS_TO_PROCESS; + mNumTries = MAX_NUM_ATTEMPTS_TO_PROCESS; done(); } } @@ -315,6 +319,10 @@ void LLInventoryFetchItemsObserver::startFetch() item_entry["item_id"] = (*it); items_llsd.append(item_entry); } + + mFetchingPeriod.resetWithExpiry(FETCH_TIMER_EXPIRY); + mNumTries = MAX_NUM_ATTEMPTS_TO_PROCESS; + fetch_items_from_llsd(items_llsd); } diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h index 6d5a86a6fc..72c13f55c6 100644 --- a/indra/newview/llinventoryobserver.h +++ b/indra/newview/llinventoryobserver.h @@ -110,6 +110,22 @@ public: /*virtual*/ void changed(U32 mask); private: S8 mNumTries; // Number of times changed() was called without success + LLFrameTimer mFetchingPeriod; + + /** + * If the viewer gets a notification, your observer assumes + * that that notification is for itself and then tries to process + * the results. The notification could be for something else (e.g. + * you're fetching an item and a notification gets triggered because + * you renamed some other item). This counter is to specify how many + * periods of time to wait for before giving up. + */ + static const U32 MAX_NUM_ATTEMPTS_TO_PROCESS; + + /** + * Period of waiting a notification when requested items get added into inventory. + */ + static const F32 FETCH_TIMER_EXPIRY; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index d605d4430e..d09f729943 100644 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -72,7 +72,7 @@ LLNameListCtrl::LLNameListCtrl(const LLNameListCtrl::Params& p) // public void LLNameListCtrl::addNameItem(const LLUUID& agent_id, EAddPosition pos, - BOOL enabled, std::string& suffix) + BOOL enabled, const std::string& suffix) { //llinfos << "LLNameListCtrl::addNameItem " << agent_id << llendl; @@ -268,7 +268,7 @@ LLScrollListItem* LLNameListCtrl::addElement(const LLSD& element, EAddPosition p LLScrollListItem* LLNameListCtrl::addNameItemRow( const LLNameListCtrl::NameItem& name_item, EAddPosition pos, - std::string& suffix) + const std::string& suffix) { LLUUID id = name_item.value().asUUID(); LLNameListItem* item = NULL; diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h index 1c26ee5db4..ee71db7540 100644 --- a/indra/newview/llnamelistctrl.h +++ b/indra/newview/llnamelistctrl.h @@ -90,11 +90,11 @@ public: // Add a user to the list by name. It will be added, the name // requested from the cache, and updated as necessary. void addNameItem(const LLUUID& agent_id, EAddPosition pos = ADD_BOTTOM, - BOOL enabled = TRUE, std::string& suffix = LLStringUtil::null); + BOOL enabled = TRUE, const std::string& suffix = LLStringUtil::null); void addNameItem(NameItem& item, EAddPosition pos = ADD_BOTTOM); /*virtual*/ LLScrollListItem* addElement(const LLSD& element, EAddPosition pos = ADD_BOTTOM, void* userdata = NULL); - LLScrollListItem* addNameItemRow(const NameItem& value, EAddPosition pos = ADD_BOTTOM, std::string& suffix = LLStringUtil::null); + LLScrollListItem* addNameItemRow(const NameItem& value, EAddPosition pos = ADD_BOTTOM, const std::string& suffix = LLStringUtil::null); // Add a user to the list by name. It will be added, the name // requested from the cache, and updated as necessary. diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index e5548007bd..fce666c9d4 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -48,6 +48,7 @@ #include "lllandmarkactions.h" #include "lllocationhistory.h" #include "lllocationinputctrl.h" +#include "llpaneltopinfobar.h" #include "llteleporthistory.h" #include "llsearchcombobox.h" #include "llsidetray.h" @@ -714,6 +715,7 @@ void LLNavigationBar::onNavigationButtonHeldUp(LLButton* nav_button) void LLNavigationBar::handleLoginComplete() { LLTeleportHistory::getInstance()->handleLoginComplete(); + LLPanelTopInfoBar::instance().handleLoginComplete(); mCmbLocation->handleLoginComplete(); } diff --git a/indra/newview/lloutfitobserver.cpp b/indra/newview/lloutfitobserver.cpp new file mode 100644 index 0000000000..848b595613 --- /dev/null +++ b/indra/newview/lloutfitobserver.cpp @@ -0,0 +1,125 @@ +/** + * @file lloutfitobserver.cpp + * @brief Outfit observer facade. + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llappearancemgr.h" +#include "lloutfitobserver.h" +#include "llinventorymodel.h" +#include "llviewerinventory.h" + +LLOutfitObserver::LLOutfitObserver() : + mCOFLastVersion(LLViewerInventoryCategory::VERSION_UNKNOWN) +{ + gInventory.addObserver(this); +} + +LLOutfitObserver::~LLOutfitObserver() +{ + if (gInventory.containsObserver(this)) + { + gInventory.removeObserver(this); + } +} + +void LLOutfitObserver::changed(U32 mask) +{ + if (!gInventory.isInventoryUsable()) + return; + + bool panel_updated = checkCOF(); + + if (!panel_updated) + { + checkBaseOutfit(); + } +} + +// static +S32 LLOutfitObserver::getCategoryVersion(const LLUUID& cat_id) +{ + LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id); + if (!cat) + return LLViewerInventoryCategory::VERSION_UNKNOWN; + + return cat->getVersion(); +} + +bool LLOutfitObserver::checkCOF() +{ + LLUUID cof = LLAppearanceMgr::getInstance()->getCOF(); + if (cof.isNull()) + return false; + + S32 cof_version = getCategoryVersion(cof); + + if (cof_version == mCOFLastVersion) + return false; + + mCOFLastVersion = cof_version; + + LLAppearanceMgr::getInstance()->updateIsDirty(); + mCOFChanged(); + + return true; +} + +void LLOutfitObserver::checkBaseOutfit() +{ + LLUUID baseoutfit_id = + LLAppearanceMgr::getInstance()->getBaseOutfitUUID(); + + if (baseoutfit_id == mBaseOutfitId) + { + if (baseoutfit_id.isNull()) + return; + + const S32 baseoutfit_ver = getCategoryVersion(baseoutfit_id); + + if (baseoutfit_ver == mBaseOutfitLastVersion) + return; + } + else + { + mBaseOutfitId = baseoutfit_id; + mBOFReplaced(); + + if (baseoutfit_id.isNull()) + return; + + mBaseOutfitLastVersion = getCategoryVersion(mBaseOutfitId); + } + + LLAppearanceMgr& app_mgr = LLAppearanceMgr::instance(); + app_mgr.updateIsDirty(); + mBOFChanged(); +} diff --git a/indra/newview/lloutfitobserver.h b/indra/newview/lloutfitobserver.h new file mode 100644 index 0000000000..4cb40ead15 --- /dev/null +++ b/indra/newview/lloutfitobserver.h @@ -0,0 +1,82 @@ +/** + * @file lloutfitobserver.h + * @brief Outfit observer facade. + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_OUTFITOBSERVER_H +#define LL_OUTFITOBSERVER_H + +#include "llsingleton.h" + +/** + * Outfit observer facade that provides simple possibility to subscribe on + * BOF(base outfit) replaced, BOF changed, COF(current outfit) changed events. + */ +class LLOutfitObserver: public LLInventoryObserver, public LLSingleton<LLOutfitObserver> +{ +public: + virtual ~LLOutfitObserver(); + + friend class LLSingleton<LLOutfitObserver>; + + virtual void changed(U32 mask); + + typedef boost::signals2::signal<void (void)> signal_t; + + void addBOFReplacedCallback(const signal_t::slot_type& cb) { mBOFReplaced.connect(cb); } + + void addBOFChangedCallback(const signal_t::slot_type& cb) { mBOFChanged.connect(cb); } + + void addCOFChangedCallback(const signal_t::slot_type& cb) { mCOFChanged.connect(cb); } + +protected: + LLOutfitObserver(); + + /** Get a version of an inventory category specified by its UUID */ + static S32 getCategoryVersion(const LLUUID& cat_id); + + bool checkCOF(); + + void checkBaseOutfit(); + + //last version number of a COF category + S32 mCOFLastVersion; + + LLUUID mBaseOutfitId; + + S32 mBaseOutfitLastVersion; + +private: + signal_t mBOFReplaced; + signal_t mBOFChanged; + signal_t mCOFChanged; +}; + +#endif /* LL_OUTFITOBSERVER_H */ diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index 77db280487..e20b2e26be 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -53,6 +53,20 @@ static bool is_tab_header_clicked(LLAccordionCtrlTab* tab, S32 y); +static const LLOutfitTabNameComparator OUTFIT_TAB_NAME_COMPARATOR; + +/*virtual*/ +bool LLOutfitTabNameComparator::compare(const LLAccordionCtrlTab* tab1, const LLAccordionCtrlTab* tab2) const +{ + std::string name1 = tab1->getTitle(); + std::string name2 = tab2->getTitle(); + + LLStringUtil::toUpper(name1); + LLStringUtil::toUpper(name2); + + return name1 < name2; +} + ////////////////////////////////////////////////////////////////////////// class OutfitContextMenu : public LLListContextMenu @@ -158,6 +172,7 @@ LLOutfitsList::~LLOutfitsList() BOOL LLOutfitsList::postBuild() { mAccordion = getChild<LLAccordionCtrl>("outfits_accordion"); + mAccordion->setComparator(&OUTFIT_TAB_NAME_COMPARATOR); return TRUE; } @@ -328,7 +343,7 @@ void LLOutfitsList::refreshList(const LLUUID& category_id) updateOutfitTab(*items_iter); } - mAccordion->arrange(); + mAccordion->sort(); } void LLOutfitsList::onSelectionChange(LLUICtrl* ctrl) @@ -500,6 +515,8 @@ void LLOutfitsList::onFilteredWearableItemsListRefresh(LLUICtrl* ctrl) void LLOutfitsList::applyFilter(const std::string& new_filter_substring) { + mAccordion->setFilterSubString(new_filter_substring); + for (outfits_map_t::iterator iter = mOutfitsMap.begin(), iter_end = mOutfitsMap.end(); diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h index 44f6ec908b..bb516446d2 100644 --- a/indra/newview/lloutfitslist.h +++ b/indra/newview/lloutfitslist.h @@ -32,18 +32,34 @@ #ifndef LL_LLOUTFITSLIST_H #define LL_LLOUTFITSLIST_H +#include "llaccordionctrl.h" #include "llpanel.h" // newview #include "llinventorymodel.h" #include "llinventoryobserver.h" -class LLAccordionCtrl; class LLAccordionCtrlTab; class LLWearableItemsList; class LLListContextMenu; /** + * @class LLOutfitTabNameComparator + * + * Comparator of outfit tabs. + */ +class LLOutfitTabNameComparator : public LLAccordionCtrl::LLTabComparator +{ + LOG_CLASS(LLOutfitTabNameComparator); + +public: + LLOutfitTabNameComparator() {}; + virtual ~LLOutfitTabNameComparator() {}; + + /*virtual*/ bool compare(const LLAccordionCtrlTab* tab1, const LLAccordionCtrlTab* tab2) const; +}; + +/** * @class LLOutfitsList * * A list of agents's outfits from "My Outfits" inventory category diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index 36f2d05fab..a1a9300ec2 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -51,6 +51,7 @@ #include "llagentwearables.h" #include "llscrollingpanelparam.h" #include "llradiogroup.h" +#include "llnotificationsutil.h" #include "llcolorswatch.h" #include "lltexturectrl.h" @@ -520,7 +521,8 @@ static void init_color_swatch_ctrl(LLPanelEditWearable* self, LLPanel* panel, co LLColorSwatchCtrl* color_swatch_ctrl = panel->getChild<LLColorSwatchCtrl>(entry->mControlName); if (color_swatch_ctrl) { - color_swatch_ctrl->setOriginal(self->getWearable()->getClothesColor(entry->mTextureIndex)); + // Can't get the color from the wearable here, since the wearable may not be set when this is called. + color_swatch_ctrl->setOriginal(LLColor4::white); } } @@ -623,6 +625,7 @@ BOOL LLPanelEditWearable::postBuild() mDescTitle = getChild<LLTextBox>("description_text"); getChild<LLRadioGroup>("sex_radio")->setCommitCallback(boost::bind(&LLPanelEditWearable::onCommitSexChange, this)); + getChild<LLButton>("save_as_button")->setCommitCallback(boost::bind(&LLPanelEditWearable::onSaveAsButtonClicked, this)); // The following panels will be shown/hidden based on what wearable we're editing // body parts @@ -654,6 +657,49 @@ BOOL LLPanelEditWearable::postBuild() configureAlphaCheckbox(LLVOAvatarDefines::TEX_EYES_ALPHA, "eye alpha texture invisible"); configureAlphaCheckbox(LLVOAvatarDefines::TEX_HAIR_ALPHA, "hair alpha texture invisible"); + // configure tab expanded callbacks + for (U32 type_index = 0; type_index < (U32)LLWearableType::WT_COUNT; ++type_index) + { + LLWearableType::EType type = (LLWearableType::EType) type_index; + const LLEditWearableDictionary::WearableEntry *wearable_entry = LLEditWearableDictionary::getInstance()->getWearable(type); + if (!wearable_entry) + { + llwarns << "could not get wearable dictionary entry for wearable of type: " << type << llendl; + continue; + } + U8 num_subparts = wearable_entry->mSubparts.size(); + + for (U8 index = 0; index < num_subparts; ++index) + { + // dive into data structures to get the panel we need + ESubpart subpart_e = wearable_entry->mSubparts[index]; + const LLEditWearableDictionary::SubpartEntry *subpart_entry = LLEditWearableDictionary::getInstance()->getSubpart(subpart_e); + + if (!subpart_entry) + { + llwarns << "could not get wearable subpart dictionary entry for subpart: " << subpart_e << llendl; + continue; + } + + const std::string accordion_tab = subpart_entry->mAccordionTab; + + LLAccordionCtrlTab *tab = getChild<LLAccordionCtrlTab>(accordion_tab); + + if (!tab) + { + llwarns << "could not get llaccordionctrltab from UI with name: " << accordion_tab << llendl; + continue; + } + + // initialize callback to ensure camera view changes appropriately. + tab->setDropDownStateChangedCallback(boost::bind(&LLPanelEditWearable::onTabExpandedCollapsed,this,_2,index)); + } + + // initialize texture and color picker controls + for_each_picker_ctrl_entry <LLColorSwatchCtrl> (getPanel(type), type, boost::bind(init_color_swatch_ctrl, this, _1, _2)); + for_each_picker_ctrl_entry <LLTextureCtrl> (getPanel(type), type, boost::bind(init_texture_ctrl, this, _1, _2)); + } + return TRUE; } @@ -690,10 +736,9 @@ void LLPanelEditWearable::setWearable(LLWearable *wearable) showWearable(mWearablePtr, FALSE); mWearablePtr = wearable; showWearable(mWearablePtr, TRUE); - - initializePanel(); } + //static void LLPanelEditWearable::onRevertButtonClicked(void* userdata) { @@ -701,6 +746,28 @@ void LLPanelEditWearable::onRevertButtonClicked(void* userdata) panel->revertChanges(); } +void LLPanelEditWearable::onSaveAsButtonClicked() +{ + LLSD args; + args["DESC"] = mTextEditor->getText(); + + LLNotificationsUtil::add("SaveWearableAs", args, LLSD(), boost::bind(&LLPanelEditWearable::saveAsCallback, this, _1, _2)); +} + +void LLPanelEditWearable::saveAsCallback(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (0 == option) + { + std::string wearable_name = response["message"].asString(); + LLStringUtil::trim(wearable_name); + if( !wearable_name.empty() ) + { + mTextEditor->setText(wearable_name); + saveChanges(); + } + } +} void LLPanelEditWearable::onCommitSexChange() { @@ -880,29 +947,89 @@ void LLPanelEditWearable::showWearable(LLWearable* wearable, BOOL show) std::string title; std::string description_title; - const LLEditWearableDictionary::WearableEntry *entry = LLEditWearableDictionary::getInstance()->getWearable(type); - if (!entry) + const LLEditWearableDictionary::WearableEntry *wearable_entry = LLEditWearableDictionary::getInstance()->getWearable(type); + if (!wearable_entry) { llwarns << "called LLPanelEditWearable::showWearable with an invalid wearable type! (" << type << ")" << llendl; return; } targetPanel = getPanel(type); - title = getString(entry->mTitle); - description_title = getString(entry->mDescTitle); + title = getString(wearable_entry->mTitle); + description_title = getString(wearable_entry->mDescTitle); + + // Update picker controls state + for_each_picker_ctrl_entry <LLColorSwatchCtrl> (targetPanel, type, boost::bind(set_enabled_color_swatch_ctrl, show, _1, _2)); + for_each_picker_ctrl_entry <LLTextureCtrl> (targetPanel, type, boost::bind(set_enabled_texture_ctrl, show, _1, _2)); targetPanel->setVisible(show); + toggleTypeSpecificControls(type); + if (show) { mPanelTitle->setText(title); mDescTitle->setText(description_title); - } + + // set name + mTextEditor->setText(wearable->getName()); - // Update picker controls state - for_each_picker_ctrl_entry <LLColorSwatchCtrl> (targetPanel, type, boost::bind(set_enabled_color_swatch_ctrl, show, _1, _2)); - for_each_picker_ctrl_entry <LLTextureCtrl> (targetPanel, type, boost::bind(set_enabled_texture_ctrl, show, _1, _2)); + updatePanelPickerControls(type); + updateTypeSpecificControls(type); + + // clear and rebuild visual param list + U8 num_subparts = wearable_entry->mSubparts.size(); + + for (U8 index = 0; index < num_subparts; ++index) + { + // dive into data structures to get the panel we need + ESubpart subpart_e = wearable_entry->mSubparts[index]; + const LLEditWearableDictionary::SubpartEntry *subpart_entry = LLEditWearableDictionary::getInstance()->getSubpart(subpart_e); + + if (!subpart_entry) + { + llwarns << "could not get wearable subpart dictionary entry for subpart: " << subpart_e << llendl; + continue; + } + + const std::string scrolling_panel = subpart_entry->mParamList; + const std::string accordion_tab = subpart_entry->mAccordionTab; + + LLScrollingPanelList *panel_list = getChild<LLScrollingPanelList>(scrolling_panel); + LLAccordionCtrlTab *tab = getChild<LLAccordionCtrlTab>(accordion_tab); + + if (!panel_list) + { + llwarns << "could not get scrolling panel list: " << scrolling_panel << llendl; + continue; + } + + if (!tab) + { + llwarns << "could not get llaccordionctrltab from UI with name: " << accordion_tab << llendl; + continue; + } + + // what edit group do we want to extract params for? + const std::string edit_group = subpart_entry->mEditGroup; + + // storage for ordered list of visual params + value_map_t sorted_params; + getSortedParams(sorted_params, edit_group); + + LLJoint* jointp = gAgentAvatarp->getJoint( subpart_entry->mTargetJoint ); + if (!jointp) + { + jointp = gAgentAvatarp->getJoint("mHead"); + } + + buildParamList(panel_list, sorted_params, tab, jointp); + + updateScrollingPanelUI(); + } + showDefaultSubpart(); - showDefaultSubpart(); + updateVerbs(); + } } void LLPanelEditWearable::showDefaultSubpart() @@ -967,91 +1094,6 @@ void LLPanelEditWearable::updateScrollingPanelList() updateScrollingPanelUI(); } -void LLPanelEditWearable::initializePanel() -{ - if (!mWearablePtr) - { - // cannot initialize with a null reference. - return; - } - - LLWearableType::EType type = mWearablePtr->getType(); - - // set name - mTextEditor->setText(mWearablePtr->getName()); - - // toggle wearable type-specific controls - toggleTypeSpecificControls(type); - - // clear and rebuild visual param list - const LLEditWearableDictionary::WearableEntry *wearable_entry = LLEditWearableDictionary::getInstance()->getWearable(type); - if (!wearable_entry) - { - llwarns << "could not get wearable dictionary entry for wearable of type: " << type << llendl; - return; - } - U8 num_subparts = wearable_entry->mSubparts.size(); - - for (U8 index = 0; index < num_subparts; ++index) - { - // dive into data structures to get the panel we need - ESubpart subpart_e = wearable_entry->mSubparts[index]; - const LLEditWearableDictionary::SubpartEntry *subpart_entry = LLEditWearableDictionary::getInstance()->getSubpart(subpart_e); - - if (!subpart_entry) - { - llwarns << "could not get wearable subpart dictionary entry for subpart: " << subpart_e << llendl; - continue; - } - - const std::string scrolling_panel = subpart_entry->mParamList; - const std::string accordion_tab = subpart_entry->mAccordionTab; - - LLScrollingPanelList *panel_list = getChild<LLScrollingPanelList>(scrolling_panel); - LLAccordionCtrlTab *tab = getChild<LLAccordionCtrlTab>(accordion_tab); - - if (!panel_list) - { - llwarns << "could not get scrolling panel list: " << scrolling_panel << llendl; - continue; - } - - if (!tab) - { - llwarns << "could not get llaccordionctrltab from UI with name: " << accordion_tab << llendl; - continue; - } - - // what edit group do we want to extract params for? - const std::string edit_group = subpart_entry->mEditGroup; - - // initialize callback to ensure camera view changes appropriately. - tab->setDropDownStateChangedCallback(boost::bind(&LLPanelEditWearable::onTabExpandedCollapsed,this,_2,index)); - - // storage for ordered list of visual params - value_map_t sorted_params; - getSortedParams(sorted_params, edit_group); - - buildParamList(panel_list, sorted_params, tab); - - updateScrollingPanelUI(); - } - - // initialize texture and color picker controls - for_each_picker_ctrl_entry <LLColorSwatchCtrl> (getPanel(type), type, boost::bind(init_color_swatch_ctrl, this, _1, _2)); - for_each_picker_ctrl_entry <LLTextureCtrl> (getPanel(type), type, boost::bind(init_texture_ctrl, this, _1, _2)); - - showDefaultSubpart(); - updateVerbs(); - - if (getWearable()) - { - LLWearableType::EType type = getWearable()->getType(); - updatePanelPickerControls(type); - updateTypeSpecificControls(type); - } -} - void LLPanelEditWearable::toggleTypeSpecificControls(LLWearableType::EType type) { // Toggle controls specific to shape editing panel. @@ -1217,7 +1259,7 @@ void LLPanelEditWearable::getSortedParams(value_map_t &sorted_params, const std: } } -void LLPanelEditWearable::buildParamList(LLScrollingPanelList *panel_list, value_map_t &sorted_params, LLAccordionCtrlTab *tab) +void LLPanelEditWearable::buildParamList(LLScrollingPanelList *panel_list, value_map_t &sorted_params, LLAccordionCtrlTab *tab, LLJoint* jointp) { // sorted_params is sorted according to magnitude of effect from // least to greatest. Adding to the front of the child list @@ -1231,7 +1273,7 @@ void LLPanelEditWearable::buildParamList(LLScrollingPanelList *panel_list, value { LLPanel::Params p; p.name("LLScrollingPanelParam"); - LLScrollingPanelParam* panel_param = new LLScrollingPanelParam( p, NULL, (*it).second, TRUE, this->getWearable()); + LLScrollingPanelParam* panel_param = new LLScrollingPanelParam( p, NULL, (*it).second, TRUE, this->getWearable(), jointp); height = panel_list->addPanel( panel_param ); } } diff --git a/indra/newview/llpaneleditwearable.h b/indra/newview/llpaneleditwearable.h index b6b8c0c781..54f729fa7a 100644 --- a/indra/newview/llpaneleditwearable.h +++ b/indra/newview/llpaneleditwearable.h @@ -48,6 +48,7 @@ class LLViewerVisualParam; class LLVisualParamHint; class LLViewerJointMesh; class LLAccordionCtrlTab; +class LLJoint; class LLPanelEditWearable : public LLPanel { @@ -72,17 +73,18 @@ public: static void onRevertButtonClicked(void* userdata); void onCommitSexChange(); + void onSaveAsButtonClicked(); + void saveAsCallback(const LLSD& notification, const LLSD& response); private: typedef std::map<F32, LLViewerVisualParam*> value_map_t; void showWearable(LLWearable* wearable, BOOL show); - void initializePanel(); void updateScrollingPanelUI(); LLPanel* getPanel(LLWearableType::EType type); void getSortedParams(value_map_t &sorted_params, const std::string &edit_group); - void buildParamList(LLScrollingPanelList *panel_list, value_map_t &sorted_params, LLAccordionCtrlTab *tab); + void buildParamList(LLScrollingPanelList *panel_list, value_map_t &sorted_params, LLAccordionCtrlTab *tab, LLJoint* jointp); // update bottom bar buttons ("Save", "Revert", etc) void updateVerbs(); diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 4982e98f8e..ce382541c6 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -39,6 +39,7 @@ #include "llagentcamera.h" #include "llagentwearables.h" #include "llappearancemgr.h" +#include "lloutfitobserver.h" #include "llcofwearables.h" #include "llfilteredwearablelist.h" #include "llinventory.h" @@ -143,100 +144,6 @@ private: } }; -class LLCOFObserver : public LLInventoryObserver -{ -public: - LLCOFObserver(LLPanelOutfitEdit *panel) : mPanel(panel), - mCOFLastVersion(LLViewerInventoryCategory::VERSION_UNKNOWN) - { - gInventory.addObserver(this); - } - - virtual ~LLCOFObserver() - { - if (gInventory.containsObserver(this)) - { - gInventory.removeObserver(this); - } - } - - virtual void changed(U32 mask) - { - if (!gInventory.isInventoryUsable()) return; - - bool panel_updated = checkCOF(); - - if (!panel_updated) - { - checkBaseOutfit(); - } - } - -protected: - - /** Get a version of an inventory category specified by its UUID */ - static S32 getCategoryVersion(const LLUUID& cat_id) - { - LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id); - if (!cat) return LLViewerInventoryCategory::VERSION_UNKNOWN; - - return cat->getVersion(); - } - - bool checkCOF() - { - LLUUID cof = LLAppearanceMgr::getInstance()->getCOF(); - if (cof.isNull()) return false; - - S32 cof_version = getCategoryVersion(cof); - - if (cof_version == mCOFLastVersion) return false; - - mCOFLastVersion = cof_version; - - mPanel->update(); - - return true; - } - - void checkBaseOutfit() - { - LLUUID baseoutfit_id = LLAppearanceMgr::getInstance()->getBaseOutfitUUID(); - - if (baseoutfit_id == mBaseOutfitId) - { - if (baseoutfit_id.isNull()) return; - - const S32 baseoutfit_ver = getCategoryVersion(baseoutfit_id); - - if (baseoutfit_ver == mBaseOutfitLastVersion) return; - } - else - { - mBaseOutfitId = baseoutfit_id; - mPanel->updateCurrentOutfitName(); - - if (baseoutfit_id.isNull()) return; - - mBaseOutfitLastVersion = getCategoryVersion(mBaseOutfitId); - } - - mPanel->updateVerbs(); - } - - - - - LLPanelOutfitEdit *mPanel; - - //last version number of a COF category - S32 mCOFLastVersion; - - LLUUID mBaseOutfitId; - - S32 mBaseOutfitLastVersion; -}; - class LLCOFDragAndDropObserver : public LLInventoryAddItemByAssetObserver { public: @@ -277,7 +184,6 @@ LLPanelOutfitEdit::LLPanelOutfitEdit() mSearchFilter(NULL), mCOFWearables(NULL), mInventoryItemsPanel(NULL), - mCOFObserver(NULL), mGearMenu(NULL), mCOFDragAndDropObserver(NULL), mInitialized(false), @@ -288,7 +194,11 @@ LLPanelOutfitEdit::LLPanelOutfitEdit() mSavedFolderState = new LLSaveFolderState(); mSavedFolderState->setApply(FALSE); - mCOFObserver = new LLCOFObserver(this); + + LLOutfitObserver& observer = LLOutfitObserver::instance(); + observer.addBOFReplacedCallback(boost::bind(&LLPanelOutfitEdit::updateCurrentOutfitName, this)); + observer.addBOFChangedCallback(boost::bind(&LLPanelOutfitEdit::updateVerbs, this)); + observer.addCOFChangedCallback(boost::bind(&LLPanelOutfitEdit::update, this)); mLookItemTypes.reserve(NUM_LOOK_ITEM_TYPES); for (U32 i = 0; i < NUM_LOOK_ITEM_TYPES; i++) @@ -303,7 +213,6 @@ LLPanelOutfitEdit::~LLPanelOutfitEdit() { delete mSavedFolderState; - delete mCOFObserver; delete mCOFDragAndDropObserver; delete mWearableListMaskCollector; @@ -371,7 +280,7 @@ BOOL LLPanelOutfitEdit::postBuild() childSetAction(REVERT_BTN, boost::bind(&LLAppearanceMgr::wearBaseOutfit, LLAppearanceMgr::getInstance())); mWearableListMaskCollector = new LLFindNonLinksByMask(ALL_ITEMS_MASK); - mWearableListTypeCollector = new LLFindWearablesOfType(LLWearableType::WT_NONE); + mWearableListTypeCollector = new LLFindActualWearablesOfType(LLWearableType::WT_NONE); mWearableItemsPanel = getChild<LLPanel>("filtered_wearables_panel"); mWearableItemsList = getChild<LLInventoryItemsList>("filtered_wearables_list"); @@ -756,9 +665,6 @@ void LLPanelOutfitEdit::updateCurrentOutfitName() //private void LLPanelOutfitEdit::updateVerbs() { - //*TODO implement better handling of COF dirtiness - LLAppearanceMgr::getInstance()->updateIsDirty(); - bool outfit_is_dirty = LLAppearanceMgr::getInstance()->isOutfitDirty(); bool has_baseoutfit = LLAppearanceMgr::getInstance()->getBaseOutfitUUID().notNull(); diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h index 802386c573..24ecf75c18 100644 --- a/indra/newview/llpaneloutfitedit.h +++ b/indra/newview/llpaneloutfitedit.h @@ -49,7 +49,7 @@ class LLButton; class LLCOFWearables; class LLTextBox; class LLInventoryCategory; -class LLCOFObserver; +class LLOutfitObserver; class LLCOFDragAndDropObserver; class LLInventoryPanel; class LLSaveFolderState; @@ -153,7 +153,6 @@ private: LLInventoryItemsList* mWearableItemsList; LLPanel* mWearableItemsPanel; - LLCOFObserver* mCOFObserver; LLCOFDragAndDropObserver* mCOFDragAndDropObserver; std::vector<LLLookItemType> mLookItemTypes; diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index 5f67f3d989..8836672f91 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -50,6 +50,7 @@ #include "lllineeditor.h" #include "llmodaldialog.h" #include "llnotificationsutil.h" +#include "lloutfitobserver.h" #include "lloutfitslist.h" #include "llsaveoutfitcombobtn.h" #include "llsidepanelappearance.h" @@ -204,6 +205,10 @@ LLPanelOutfitsInventory::LLPanelOutfitsInventory() : mSavedFolderState = new LLSaveFolderState(); mSavedFolderState->setApply(FALSE); gAgentWearables.addLoadedCallback(boost::bind(&LLPanelOutfitsInventory::onWearablesLoaded, this)); + + LLOutfitObserver& observer = LLOutfitObserver::instance(); + observer.addBOFChangedCallback(boost::bind(&LLPanelOutfitsInventory::updateVerbs, this)); + observer.addCOFChangedCallback(boost::bind(&LLPanelOutfitsInventory::updateVerbs, this)); } LLPanelOutfitsInventory::~LLPanelOutfitsInventory() @@ -522,7 +527,7 @@ void LLPanelOutfitsInventory::updateListCommands() mListCommands->childSetEnabled("trash_btn", trash_enabled); mListCommands->childSetEnabled("wear_btn", wear_enabled); mListCommands->childSetVisible("wear_btn", wear_enabled); - mSaveComboBtn->setSaveBtnEnabled(make_outfit_enabled); + mSaveComboBtn->setMenuItemEnabled("save_outfit", make_outfit_enabled); } void LLPanelOutfitsInventory::showGearMenu() @@ -665,7 +670,7 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata) } if (command_name == "make_outfit") { - return TRUE; + return LLAppearanceMgr::getInstance()->isOutfitDirty(); } if (command_name == "edit" || @@ -789,6 +794,7 @@ void LLPanelOutfitsInventory::onWearablesLoaded() setWearablesLoading(false); } +// static LLSidepanelAppearance* LLPanelOutfitsInventory::getAppearanceSP() { static LLSidepanelAppearance* panel_appearance = diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h index aff7839bcc..d58ae554b0 100644 --- a/indra/newview/llpaneloutfitsinventory.h +++ b/indra/newview/llpaneloutfitsinventory.h @@ -75,7 +75,7 @@ public: void setParent(LLSidepanelAppearance *parent); LLFolderView* getRootFolder(); - LLSidepanelAppearance* getAppearanceSP(); + static LLSidepanelAppearance* getAppearanceSP(); static LLPanelOutfitsInventory* findInstance(); diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 0a4af00f78..f16d1d8fda 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -1450,6 +1450,8 @@ void LLPanelPeople::showFriendsAccordionsIfNeeded() LLAccordionCtrl* accordion = getChild<LLAccordionCtrl>("friends_accordion"); accordion->arrange(); + // *TODO: new empty_accordion_text attribute was implemented in accordion (EXT-7368). + // this code should be refactored to use it // keep help text in a synchronization with accordions visibility. updateFriendListHelpText(); } diff --git a/indra/newview/llpaneltopinfobar.cpp b/indra/newview/llpaneltopinfobar.cpp new file mode 100644 index 0000000000..7cf574b6e5 --- /dev/null +++ b/indra/newview/llpaneltopinfobar.cpp @@ -0,0 +1,393 @@ +/** + * @file llpaneltopinfobar.cpp + * @brief Coordinates and Parcel Settings information panel definition + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llpaneltopinfobar.h" + +#include "llagent.h" +#include "llagentui.h" +#include "lllocationinputctrl.h" +#include "llnotificationsutil.h" +#include "llparcel.h" +#include "llsidetray.h" +#include "llstatusbar.h" +#include "llviewercontrol.h" +#include "llviewermenu.h" +#include "llviewerparcelmgr.h" +#include "llviewerregion.h" + +class LLPanelTopInfoBar::LLParcelChangeObserver : public LLParcelObserver +{ +public: + LLParcelChangeObserver(LLPanelTopInfoBar* topInfoBar) : mTopInfoBar(topInfoBar) {} + +private: + /*virtual*/ void changed() + { + if (mTopInfoBar) + { + mTopInfoBar->updateParcelIcons(); + } + } + + LLPanelTopInfoBar* mTopInfoBar; +}; + +LLPanelTopInfoBar::LLPanelTopInfoBar(): mParcelChangedObserver(0) +{ + LLUICtrlFactory::getInstance()->buildPanel(this, "panel_topinfo_bar.xml"); +} + +LLPanelTopInfoBar::~LLPanelTopInfoBar() +{ + if (mParcelChangedObserver) + { + LLViewerParcelMgr::getInstance()->removeObserver(mParcelChangedObserver); + delete mParcelChangedObserver; + } + + if (mParcelPropsCtrlConnection.connected()) + { + mParcelPropsCtrlConnection.disconnect(); + } + + if (mParcelMgrConnection.connected()) + { + mParcelMgrConnection.disconnect(); + } + + if (mShowCoordsCtrlConnection.connected()) + { + mShowCoordsCtrlConnection.disconnect(); + } +} + +void LLPanelTopInfoBar::initParcelIcons() +{ + mParcelIcon[VOICE_ICON] = getChild<LLIconCtrl>("voice_icon"); + mParcelIcon[FLY_ICON] = getChild<LLIconCtrl>("fly_icon"); + mParcelIcon[PUSH_ICON] = getChild<LLIconCtrl>("push_icon"); + mParcelIcon[BUILD_ICON] = getChild<LLIconCtrl>("build_icon"); + mParcelIcon[SCRIPTS_ICON] = getChild<LLIconCtrl>("scripts_icon"); + mParcelIcon[DAMAGE_ICON] = getChild<LLIconCtrl>("damage_icon"); + + mParcelIcon[VOICE_ICON]->setMouseDownCallback(boost::bind(&LLPanelTopInfoBar::onParcelIconClick, this, VOICE_ICON)); + mParcelIcon[FLY_ICON]->setMouseDownCallback(boost::bind(&LLPanelTopInfoBar::onParcelIconClick, this, FLY_ICON)); + mParcelIcon[PUSH_ICON]->setMouseDownCallback(boost::bind(&LLPanelTopInfoBar::onParcelIconClick, this, PUSH_ICON)); + mParcelIcon[BUILD_ICON]->setMouseDownCallback(boost::bind(&LLPanelTopInfoBar::onParcelIconClick, this, BUILD_ICON)); + mParcelIcon[SCRIPTS_ICON]->setMouseDownCallback(boost::bind(&LLPanelTopInfoBar::onParcelIconClick, this, SCRIPTS_ICON)); + mParcelIcon[DAMAGE_ICON]->setMouseDownCallback(boost::bind(&LLPanelTopInfoBar::onParcelIconClick, this, DAMAGE_ICON)); + + mDamageText->setText(LLStringExplicit("100%")); +} + +void LLPanelTopInfoBar::handleLoginComplete() +{ + // An agent parcel update hasn't occurred yet, so + // we have to manually set location and the icons. + update(); +} + +BOOL LLPanelTopInfoBar::handleRightMouseDown(S32 x, S32 y, MASK mask) +{ + show_navbar_context_menu(this, x, y); + return TRUE; +} + +BOOL LLPanelTopInfoBar::postBuild() +{ + mInfoBtn = getChild<LLButton>("place_info_btn"); + mInfoBtn->setClickedCallback(boost::bind(&LLPanelTopInfoBar::onInfoButtonClicked, this)); + + mParcelInfoText = getChild<LLTextBox>("parcel_info_text"); + mDamageText = getChild<LLTextBox>("damage_text"); + + initParcelIcons(); + + mParcelChangedObserver = new LLParcelChangeObserver(this); + LLViewerParcelMgr::getInstance()->addObserver(mParcelChangedObserver); + + // Connecting signal for updating parcel icons on "Show Parcel Properties" setting change. + LLControlVariable* ctrl = gSavedSettings.getControl("NavBarShowParcelProperties").get(); + if (ctrl) + { + mParcelPropsCtrlConnection = ctrl->getSignal()->connect(boost::bind(&LLPanelTopInfoBar::updateParcelIcons, this)); + } + + // Connecting signal for updating parcel text on "Show Coordinates" setting change. + ctrl = gSavedSettings.getControl("NavBarShowCoordinates").get(); + if (ctrl) + { + mShowCoordsCtrlConnection = ctrl->getSignal()->connect(boost::bind(&LLPanelTopInfoBar::onNavBarShowParcelPropertiesCtrlChanged, this)); + } + + mParcelMgrConnection = LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback( + boost::bind(&LLPanelTopInfoBar::onAgentParcelChange, this)); + + return TRUE; +} + +void LLPanelTopInfoBar::onNavBarShowParcelPropertiesCtrlChanged() +{ + std::string new_text; + + // don't need to have separate show_coords variable; if user requested the coords to be shown + // they will be added during the next call to the draw() method. + buildLocationString(new_text, false); + setParcelInfoText(new_text); +} + +void LLPanelTopInfoBar::draw() +{ + updateParcelInfoText(); + updateHealth(); + + LLPanel::draw(); +} + +void LLPanelTopInfoBar::buildLocationString(std::string& loc_str, bool show_coords) +{ + LLAgentUI::ELocationFormat format = + (show_coords ? LLAgentUI::LOCATION_FORMAT_FULL : LLAgentUI::LOCATION_FORMAT_NO_COORDS); + + if (!LLAgentUI::buildLocationString(loc_str, format)) + { + loc_str = "???"; + } +} + +void LLPanelTopInfoBar::setParcelInfoText(const std::string& new_text) +{ + const LLFontGL* font = mParcelInfoText->getDefaultFont(); + S32 new_text_width = font->getWidth(new_text); + + mParcelInfoText->setText(new_text); + + LLRect rect = mParcelInfoText->getRect(); + rect.setOriginAndSize(rect.mLeft, rect.mBottom, new_text_width, rect.getHeight()); + + mParcelInfoText->reshape(rect.getWidth(), rect.getHeight(), TRUE); + mParcelInfoText->setRect(rect); + layoutParcelIcons(); +} + +void LLPanelTopInfoBar::update() +{ + std::string new_text; + + // don't need to have separate show_coords variable; if user requested the coords to be shown + // they will be added during the next call to the draw() method. + buildLocationString(new_text, false); + setParcelInfoText(new_text); + + updateParcelIcons(); +} + +void LLPanelTopInfoBar::updateParcelInfoText() +{ + static LLUICachedControl<bool> show_coords("NavBarShowCoordinates", false); + + if (show_coords) + { + std::string new_text; + + buildLocationString(new_text, show_coords); + setParcelInfoText(new_text); + } +} + +void LLPanelTopInfoBar::updateParcelIcons() +{ + LLViewerParcelMgr* vpm = LLViewerParcelMgr::getInstance(); + + LLViewerRegion* agent_region = gAgent.getRegion(); + LLParcel* agent_parcel = vpm->getAgentParcel(); + if (!agent_region || !agent_parcel) + return; + + if (gSavedSettings.getBOOL("NavBarShowParcelProperties")) + { + LLParcel* current_parcel; + LLViewerRegion* selection_region = vpm->getSelectionRegion(); + LLParcel* selected_parcel = vpm->getParcelSelection()->getParcel(); + + // If agent is in selected parcel we use its properties because + // they are updated more often by LLViewerParcelMgr than agent parcel properties. + // See LLViewerParcelMgr::processParcelProperties(). + // This is needed to reflect parcel restrictions changes without having to leave + // the parcel and then enter it again. See EXT-2987 + if (selected_parcel && selected_parcel->getLocalID() == agent_parcel->getLocalID() + && selection_region == agent_region) + { + current_parcel = selected_parcel; + } + else + { + current_parcel = agent_parcel; + } + + bool allow_voice = vpm->allowAgentVoice(agent_region, current_parcel); + bool allow_fly = vpm->allowAgentFly(agent_region, current_parcel); + bool allow_push = vpm->allowAgentPush(agent_region, current_parcel); + bool allow_build = vpm->allowAgentBuild(current_parcel); // true when anyone is allowed to build. See EXT-4610. + bool allow_scripts = vpm->allowAgentScripts(agent_region, current_parcel); + bool allow_damage = vpm->allowAgentDamage(agent_region, current_parcel); + + // Most icons are "block this ability" + mParcelIcon[VOICE_ICON]->setVisible( !allow_voice ); + mParcelIcon[FLY_ICON]->setVisible( !allow_fly ); + mParcelIcon[PUSH_ICON]->setVisible( !allow_push ); + mParcelIcon[BUILD_ICON]->setVisible( !allow_build ); + mParcelIcon[SCRIPTS_ICON]->setVisible( !allow_scripts ); + mParcelIcon[DAMAGE_ICON]->setVisible( allow_damage ); + mDamageText->setVisible(allow_damage); + + layoutParcelIcons(); + } + else + { + for (S32 i = 0; i < ICON_COUNT; ++i) + { + mParcelIcon[i]->setVisible(false); + } + mDamageText->setVisible(false); + } +} + +void LLPanelTopInfoBar::updateHealth() +{ + static LLUICachedControl<bool> show_icons("NavBarShowParcelProperties", false); + + // *FIXME: Status bar owns health information, should be in agent + if (show_icons && gStatusBar) + { + static S32 last_health = -1; + S32 health = gStatusBar->getHealth(); + if (health != last_health) + { + std::string text = llformat("%d%%", health); + mDamageText->setText(text); + last_health = health; + } + } +} + +void LLPanelTopInfoBar::layoutParcelIcons() +{ + // TODO: remove hard-coded values and read them as xml parameters + static const int FIRST_ICON_HPAD = 32; + static const int LAST_ICON_HPAD = 11; + + S32 left = mParcelInfoText->getRect().mRight + FIRST_ICON_HPAD; + + left = layoutWidget(mDamageText, left); + + for (int i = ICON_COUNT - 1; i >= 0; --i) + { + left = layoutWidget(mParcelIcon[i], left); + } + + LLRect rect = getRect(); + rect.set(rect.mLeft, rect.mTop, left + LAST_ICON_HPAD, rect.mBottom); + setRect(rect); +} + +S32 LLPanelTopInfoBar::layoutWidget(LLUICtrl* ctrl, S32 left) +{ + // TODO: remove hard-coded values and read them as xml parameters + static const int ICON_HPAD = 2; + + if (ctrl->getVisible()) + { + LLRect rect = ctrl->getRect(); + rect.mRight = left + rect.getWidth(); + rect.mLeft = left; + + ctrl->setRect(rect); + left += rect.getWidth() + ICON_HPAD; + } + + return left; +} + +void LLPanelTopInfoBar::onParcelIconClick(EParcelIcon icon) +{ + switch (icon) + { + case VOICE_ICON: + LLNotificationsUtil::add("NoVoice"); + break; + case FLY_ICON: + LLNotificationsUtil::add("NoFly"); + break; + case PUSH_ICON: + LLNotificationsUtil::add("PushRestricted"); + break; + case BUILD_ICON: + LLNotificationsUtil::add("NoBuild"); + break; + case SCRIPTS_ICON: + { + LLViewerRegion* region = gAgent.getRegion(); + if(region && region->getRegionFlags() & REGION_FLAGS_ESTATE_SKIP_SCRIPTS) + { + LLNotificationsUtil::add("ScriptsStopped"); + } + else if(region && region->getRegionFlags() & REGION_FLAGS_SKIP_SCRIPTS) + { + LLNotificationsUtil::add("ScriptsNotRunning"); + } + else + { + LLNotificationsUtil::add("NoOutsideScripts"); + } + break; + } + case DAMAGE_ICON: + LLNotificationsUtil::add("NotSafe"); + break; + case ICON_COUNT: + break; + // no default to get compiler warning when a new icon gets added + } +} + +void LLPanelTopInfoBar::onAgentParcelChange() +{ + update(); +} + +void LLPanelTopInfoBar::onInfoButtonClicked() +{ + LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "agent")); +} diff --git a/indra/newview/llpaneltopinfobar.h b/indra/newview/llpaneltopinfobar.h new file mode 100644 index 0000000000..4a85bbcd76 --- /dev/null +++ b/indra/newview/llpaneltopinfobar.h @@ -0,0 +1,154 @@ +/** + * @file llpaneltopinfobar.h + * @brief Coordinates and Parcel Settings information panel definition + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LLPANELTOPINFOBAR_H_ +#define LLPANELTOPINFOBAR_H_ + +#include "llpanel.h" + +class LLButton; +class LLTextBox; +class LLIconCtrl; +class LLParcelChangeObserver; + +class LLPanelTopInfoBar : public LLPanel, public LLSingleton<LLPanelTopInfoBar> +{ + LOG_CLASS(LLPanelTopInfoBar); + +public: + LLPanelTopInfoBar(); + ~LLPanelTopInfoBar(); + + /*virtual*/ BOOL postBuild(); + /*virtual*/ void draw(); + + /** + * Updates location and parcel icons on login complete + */ + void handleLoginComplete(); + +private: + class LLParcelChangeObserver; + + friend class LLParcelChangeObserver; + + enum EParcelIcon + { + VOICE_ICON = 0, + FLY_ICON, + PUSH_ICON, + BUILD_ICON, + SCRIPTS_ICON, + DAMAGE_ICON, + ICON_COUNT + }; + + /** + * Initializes parcel icons controls. Called from the constructor. + */ + void initParcelIcons(); + + BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); + + /** + * Handles clicks on the parcel icons. + */ + void onParcelIconClick(EParcelIcon icon); + + /** + * Handles clicks on the info buttons. + */ + void onInfoButtonClicked(); + + /** + * Called when agent changes the parcel. + */ + void onAgentParcelChange(); + + /** + * Called when user checks/unchecks Show Coordinates menu item. + */ + void onNavBarShowParcelPropertiesCtrlChanged(); + + /** + * Shorthand to call updateParcelInfoText() and updateParcelIcons(). + */ + void update(); + + /** + * Updates parcel info text (mParcelInfoText). + */ + void updateParcelInfoText(); + + /** + * Updates parcel icons (mParcelIcon[]). + */ + void updateParcelIcons(); + + /** + * Updates health information (mDamageText). + */ + void updateHealth(); + + /** + * Lays out all parcel icons starting from right edge of the mParcelInfoText + 11px + * (see screenshots in EXT-5808 for details). + */ + void layoutParcelIcons(); + + /** + * Lays out a widget. Widget's rect mLeft becomes equal to the 'left' argument. + */ + S32 layoutWidget(LLUICtrl* ctrl, S32 left); + + /** + * Generates location string and returns it in the loc_str parameter. + */ + void buildLocationString(std::string& loc_str, bool show_coords); + + /** + * Sets new value to the mParcelInfoText and updates the size of the top bar. + */ + void setParcelInfoText(const std::string& new_text); + + LLButton* mInfoBtn; + LLTextBox* mParcelInfoText; + LLTextBox* mDamageText; + LLIconCtrl* mParcelIcon[ICON_COUNT]; + LLParcelChangeObserver* mParcelChangedObserver; + + boost::signals2::connection mParcelPropsCtrlConnection; + boost::signals2::connection mShowCoordsCtrlConnection; + boost::signals2::connection mParcelMgrConnection; +}; + +#endif /* LLPANELTOPINFOBAR_H_ */ diff --git a/indra/newview/llpanelvoiceeffect.cpp b/indra/newview/llpanelvoiceeffect.cpp new file mode 100644 index 0000000000..fd470798ee --- /dev/null +++ b/indra/newview/llpanelvoiceeffect.cpp @@ -0,0 +1,169 @@ +/** + * @file llpanelvoiceeffect.cpp + * @author Aimee + * @brief Panel to select Voice Morphs. + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llpanelvoiceeffect.h" + +#include "llcombobox.h" +#include "llfloaterreg.h" +#include "llpanel.h" +#include "lltrans.h" +#include "lltransientfloatermgr.h" +#include "llvoiceclient.h" + +static LLRegisterPanelClassWrapper<LLPanelVoiceEffect> t_panel_voice_effect("panel_voice_effect"); + +LLPanelVoiceEffect::LLPanelVoiceEffect() + : mVoiceEffectCombo(NULL) +{ + mCommitCallbackRegistrar.add("Voice.CommitVoiceEffect", boost::bind(&LLPanelVoiceEffect::onCommitVoiceEffect, this)); +} + +LLPanelVoiceEffect::~LLPanelVoiceEffect() +{ + LLView* combo_list_view = mVoiceEffectCombo->getChildView("ComboBox"); + LLTransientFloaterMgr::getInstance()->removeControlView(combo_list_view); + + if(LLVoiceClient::instanceExists()) + { + LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); + if (effect_interface) + { + effect_interface->removeObserver(this); + } + } +} + +// virtual +BOOL LLPanelVoiceEffect::postBuild() +{ + mVoiceEffectCombo = getChild<LLComboBox>("voice_effect"); + + // Need to tell LLTransientFloaterMgr about the combo list, otherwise it can't + // be clicked while in a docked floater as it extends outside the floater area. + LLView* combo_list_view = mVoiceEffectCombo->getChildView("ComboBox"); + LLTransientFloaterMgr::getInstance()->addControlView(combo_list_view); + + LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); + if (effect_interface) + { + effect_interface->addObserver(this); + } + + update(true); + + return TRUE; +} + +////////////////////////////////////////////////////////////////////////// +/// PRIVATE SECTION +////////////////////////////////////////////////////////////////////////// + +void LLPanelVoiceEffect::onCommitVoiceEffect() +{ + LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); + if (!effect_interface) + { + mVoiceEffectCombo->setEnabled(false); + return; + } + + LLSD value = mVoiceEffectCombo->getValue(); + if (value.asInteger() == PREVIEW_VOICE_EFFECTS) + { + // Open the Voice Morph preview floater + LLFloaterReg::showInstance("voice_effect"); + } + else if (value.asInteger() == GET_VOICE_EFFECTS) + { + // Open the voice morphing info web page + LLWeb::loadURL(LLTrans::getString("voice_morphing_url")); + } + else + { + effect_interface->setVoiceEffect(value.asUUID()); + } + + mVoiceEffectCombo->setValue(effect_interface->getVoiceEffect()); +} + +// virtual +void LLPanelVoiceEffect::onVoiceEffectChanged(bool effect_list_updated) +{ + update(effect_list_updated); +} + +void LLPanelVoiceEffect::update(bool list_updated) +{ + if (mVoiceEffectCombo) + { + LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); + if (list_updated) + { + // Add the default "No Voice Morph" entry. + mVoiceEffectCombo->removeall(); + mVoiceEffectCombo->add(getString("no_voice_effect"), LLUUID::null); + mVoiceEffectCombo->addSeparator(); + + // Add entries for each Voice Morph. + const voice_effect_list_t& effect_list = effect_interface->getVoiceEffectList(); + if (!effect_list.empty()) + { + for (voice_effect_list_t::const_iterator it = effect_list.begin(); it != effect_list.end(); ++it) + { + mVoiceEffectCombo->add(it->first, it->second, ADD_BOTTOM); + } + + mVoiceEffectCombo->addSeparator(); + } + + // Add the fixed entries to go to the preview floater or marketing page. + mVoiceEffectCombo->add(getString("preview_voice_effects"), PREVIEW_VOICE_EFFECTS); + mVoiceEffectCombo->add(getString("get_voice_effects"), GET_VOICE_EFFECTS); + } + + if (effect_interface && LLVoiceClient::instance().isVoiceWorking()) + { + // Select the current Voice Morph. + mVoiceEffectCombo->setValue(effect_interface->getVoiceEffect()); + mVoiceEffectCombo->setEnabled(true); + } + else + { + // If voice isn't working or Voice Effects are not supported disable the control. + mVoiceEffectCombo->setValue(LLUUID::null); + mVoiceEffectCombo->setEnabled(false); + } + } +} diff --git a/indra/newview/llpanelvoiceeffect.h b/indra/newview/llpanelvoiceeffect.h new file mode 100644 index 0000000000..b5bf2f05a8 --- /dev/null +++ b/indra/newview/llpanelvoiceeffect.h @@ -0,0 +1,73 @@ +/** + * @file llpanelvoiceeffect.h + * @author Aimee + * @brief Panel to select Voice Effects. + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_PANELVOICEEFFECT_H +#define LL_PANELVOICEEFFECT_H + +#include "llpanel.h" +#include "llvoiceclient.h" + +class LLComboBox; + +class LLPanelVoiceEffect + : public LLPanel + , public LLVoiceEffectObserver +{ +public: + LOG_CLASS(LLPanelVoiceEffect); + + LLPanelVoiceEffect(); + virtual ~LLPanelVoiceEffect(); + + virtual BOOL postBuild(); + +private: + void onCommitVoiceEffect(); + void update(bool list_updated); + + /// Called by voice effect provider when voice effect list is changed. + virtual void onVoiceEffectChanged(bool effect_list_updated); + + // Fixed entries in the Voice Morph list + typedef enum e_voice_effect_combo_items + { + NO_VOICE_EFFECT = 0, + PREVIEW_VOICE_EFFECTS = 1, + GET_VOICE_EFFECTS = 2 + } EVoiceEffectComboItems; + + LLComboBox* mVoiceEffectCombo; +}; + + +#endif //LL_PANELVOICEEFFECT_H diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index f020ad9bc2..a27afeab7c 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -94,7 +94,7 @@ public: mAvalineCallers.insert(avaline_caller_id); } - void onChange() + void onParticipantsChanged() { uuid_set_t participant_uuids; LLVoiceClient::getInstance()->getParticipantList(participant_uuids); diff --git a/indra/newview/llsaveoutfitcombobtn.cpp b/indra/newview/llsaveoutfitcombobtn.cpp index b9b577084b..9518b0cbb3 100644 --- a/indra/newview/llsaveoutfitcombobtn.cpp +++ b/indra/newview/llsaveoutfitcombobtn.cpp @@ -34,6 +34,7 @@ #include "llappearancemgr.h" #include "llpaneloutfitsinventory.h" +#include "llsidepanelappearance.h" #include "llsaveoutfitcombobtn.h" #include "llviewermenu.h" diff --git a/indra/newview/llscrollingpanelparam.cpp b/indra/newview/llscrollingpanelparam.cpp index 242af6981c..6f5238f0a1 100644 --- a/indra/newview/llscrollingpanelparam.cpp +++ b/indra/newview/llscrollingpanelparam.cpp @@ -56,7 +56,7 @@ const S32 LLScrollingPanelParam::PARAM_HINT_HEIGHT = 128; S32 LLScrollingPanelParam::sUpdateDelayFrames = 0; LLScrollingPanelParam::LLScrollingPanelParam( const LLPanel::Params& panel_params, - LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify, LLWearable* wearable ) + LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify, LLWearable* wearable, LLJoint* jointp ) : LLScrollingPanel( panel_params ), mParam(param), mAllowModify(allow_modify), @@ -73,9 +73,9 @@ LLScrollingPanelParam::LLScrollingPanelParam( const LLPanel::Params& panel_param F32 min_weight = param->getMinWeight(); F32 max_weight = param->getMaxWeight(); - mHintMin = new LLVisualParamHint( pos_x, pos_y, PARAM_HINT_WIDTH, PARAM_HINT_HEIGHT, mesh, (LLViewerVisualParam*) wearable->getVisualParam(param->getID()), wearable, min_weight); + mHintMin = new LLVisualParamHint( pos_x, pos_y, PARAM_HINT_WIDTH, PARAM_HINT_HEIGHT, mesh, (LLViewerVisualParam*) wearable->getVisualParam(param->getID()), wearable, min_weight, jointp); pos_x = getChild<LLViewBorder>("right_border")->getRect().mLeft + left_border->getBorderWidth(); - mHintMax = new LLVisualParamHint( pos_x, pos_y, PARAM_HINT_WIDTH, PARAM_HINT_HEIGHT, mesh, (LLViewerVisualParam*) wearable->getVisualParam(param->getID()), wearable, max_weight ); + mHintMax = new LLVisualParamHint( pos_x, pos_y, PARAM_HINT_WIDTH, PARAM_HINT_HEIGHT, mesh, (LLViewerVisualParam*) wearable->getVisualParam(param->getID()), wearable, max_weight, jointp ); mHintMin->setAllowsUpdates( FALSE ); mHintMax->setAllowsUpdates( FALSE ); diff --git a/indra/newview/llscrollingpanelparam.h b/indra/newview/llscrollingpanelparam.h index fe4ce07166..3cdfd188a8 100644 --- a/indra/newview/llscrollingpanelparam.h +++ b/indra/newview/llscrollingpanelparam.h @@ -42,12 +42,13 @@ class LLViewerVisualParam; class LLWearable; class LLVisualParamHint; class LLViewerVisualParam; +class LLJoint; class LLScrollingPanelParam : public LLScrollingPanel { public: LLScrollingPanelParam( const LLPanel::Params& panel_params, - LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify, LLWearable* wearable ); + LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify, LLWearable* wearable, LLJoint* jointp ); virtual ~LLScrollingPanelParam(); virtual void draw(); diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index b66789448f..e23643da0b 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -42,6 +42,7 @@ #include "llfloaterreg.h" #include "llfloaterworldmap.h" #include "llfoldervieweventlistener.h" +#include "lloutfitobserver.h" #include "llpaneleditwearable.h" #include "llpaneloutfitsinventory.h" #include "llsidetray.h" @@ -73,26 +74,6 @@ private: LLSidepanelAppearance *mPanel; }; -class LLWatchForOutfitRenameObserver : public LLInventoryObserver -{ -public: - LLWatchForOutfitRenameObserver(LLSidepanelAppearance *panel) : - mPanel(panel) - {} - virtual void changed(U32 mask); - -private: - LLSidepanelAppearance *mPanel; -}; - -void LLWatchForOutfitRenameObserver::changed(U32 mask) -{ - if (mask & LABEL) - { - mPanel->refreshCurrentOutfitName(); - } -} - LLSidepanelAppearance::LLSidepanelAppearance() : LLPanel(), mFilterSubString(LLStringUtil::null), @@ -101,12 +82,13 @@ LLSidepanelAppearance::LLSidepanelAppearance() : mCurrOutfitPanel(NULL), mOpened(false) { + LLOutfitObserver& outfit_observer = LLOutfitObserver::instance(); + outfit_observer.addBOFChangedCallback(boost::bind(&LLSidepanelAppearance::refreshCurrentOutfitName, this, "")); + outfit_observer.addCOFChangedCallback(boost::bind(&LLSidepanelAppearance::refreshCurrentOutfitName, this, "")); } LLSidepanelAppearance::~LLSidepanelAppearance() { - gInventory.removeObserver(mOutfitRenameWatcher); - delete mOutfitRenameWatcher; } // virtual @@ -160,8 +142,6 @@ BOOL LLSidepanelAppearance::postBuild() mCurrOutfitPanel = getChild<LLPanel>("panel_currentlook"); - mOutfitRenameWatcher = new LLWatchForOutfitRenameObserver(this); - gInventory.addObserver(mOutfitRenameWatcher); setVisibleCallback(boost::bind(&LLSidepanelAppearance::onVisibilityChange,this,_2)); @@ -209,7 +189,7 @@ void LLSidepanelAppearance::onVisibilityChange(const LLSD &new_visibility) { if ((mOutfitEdit && mOutfitEdit->getVisible()) || (mEditWearable && mEditWearable->getVisible())) { - if (!gAgentCamera.cameraCustomizeAvatar()) + if (!gAgentCamera.cameraCustomizeAvatar() && gSavedSettings.getBOOL("AppearanceCameraMovement")) { gAgentCamera.changeCameraToCustomizeAvatar(); } @@ -217,9 +197,10 @@ void LLSidepanelAppearance::onVisibilityChange(const LLSD &new_visibility) } else { - if (gAgentCamera.cameraCustomizeAvatar()) + if (gAgentCamera.cameraCustomizeAvatar() && gSavedSettings.getBOOL("AppearanceCameraMovement")) { gAgentCamera.changeCameraToDefault(); + gAgentCamera.resetView(); } } } @@ -345,6 +326,7 @@ void LLSidepanelAppearance::toggleOutfitEditPanel(BOOL visible, BOOL disable_cam else if (!disable_camera_switch && gSavedSettings.getBOOL("AppearanceCameraMovement") ) { gAgentCamera.changeCameraToDefault(); + gAgentCamera.resetView(); } } @@ -384,6 +366,7 @@ void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLWearable *we if (!disable_camera_switch && gSavedSettings.getBOOL("AppearanceCameraMovement") ) { gAgentCamera.changeCameraToDefault(); + gAgentCamera.resetView(); } } } diff --git a/indra/newview/llsidepanelappearance.h b/indra/newview/llsidepanelappearance.h index 30022ae375..812d6362ef 100644 --- a/indra/newview/llsidepanelappearance.h +++ b/indra/newview/llsidepanelappearance.h @@ -40,7 +40,6 @@ class LLFilterEditor; class LLCurrentlyWornFetchObserver; -class LLWatchForOutfitRenameObserver; class LLPanelEditWearable; class LLWearable; class LLPanelOutfitsInventory; @@ -97,9 +96,6 @@ private: // Used to make sure the user's inventory is in memory. LLCurrentlyWornFetchObserver* mFetchWorn; - // Used to update title when currently worn outfit gets renamed. - LLWatchForOutfitRenameObserver* mOutfitRenameWatcher; - // Search string for filtering landmarks and teleport // history locations std::string mFilterSubString; diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index 3c97f01887..9406f80b75 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -469,6 +469,9 @@ void LLSideTray::reflectCollapseChange() } gFloaterView->refresh(); + + LLSD new_value = mCollapsed; + mCollapseSignal(this,new_value); } void LLSideTray::arrange() diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h index e8fdee9430..e176ff5aff 100644 --- a/indra/newview/llsidetray.h +++ b/indra/newview/llsidetray.h @@ -159,6 +159,8 @@ public: void updateSidetrayVisibility(); + commit_signal_t& getCollapseSignal() { return mCollapseSignal; } + protected: LLSideTrayTab* getTab (const std::string& name); @@ -187,6 +189,8 @@ private: child_vector_t mTabs; LLSideTrayTab* mActiveTab; + commit_signal_t mCollapseSignal; + LLButton* mCollapseButton; bool mCollapsed; diff --git a/indra/newview/llspeakingindicatormanager.cpp b/indra/newview/llspeakingindicatormanager.cpp index 29237946d2..ea7601517d 100644 --- a/indra/newview/llspeakingindicatormanager.cpp +++ b/indra/newview/llspeakingindicatormanager.cpp @@ -107,7 +107,7 @@ private: * So, method does not calculate difference between these list it only switches off already * switched on indicators and switches on indicators of voice channel participants */ - void onChange(); + void onParticipantsChanged(); /** * Changes state of indicators specified by LLUUIDs @@ -205,7 +205,7 @@ void SpeakingIndicatorManager::sOnCurrentChannelChanged(const LLUUID& /*session_ mSwitchedIndicatorsOn.clear(); } -void SpeakingIndicatorManager::onChange() +void SpeakingIndicatorManager::onParticipantsChanged() { LL_DEBUGS("SpeakingIndicator") << "Voice participant list was changed, updating indicators" << LL_ENDL; diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 5628205dd4..ac419d8dc7 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -394,18 +394,21 @@ void LLStatusBar::setBalance(S32 balance) { std::string money_str = LLResMgr::getInstance()->getMonetaryString( balance ); - LLButton* btn_buy_currency = getChild<LLButton>("buycurrency"); + LLTextBox* balance_box = getChild<LLTextBox>("balance"); LLStringUtil::format_map_t string_args; string_args["[AMT]"] = llformat("%s", money_str.c_str()); std::string label_str = getString("buycurrencylabel", string_args); - btn_buy_currency->setLabel(label_str); + balance_box->setValue(label_str); - // Resize the balance button so that the label fits it, and the button expands to the left. - // *TODO: LLButton should have an option where to expand. + // Resize the L$ balance background to be wide enough for your balance plus the buy button { - S32 saved_right = btn_buy_currency->getRect().mRight; - btn_buy_currency->autoResize(); - btn_buy_currency->translate(saved_right - btn_buy_currency->getRect().mRight, 0); + const S32 HPAD = 24; + LLRect balance_rect = balance_box->getTextBoundingRect(); + LLRect buy_rect = getChildView("buyL")->getRect(); + LLView* balance_bg_view = getChildView("balance_bg"); + LLRect balance_bg_rect = balance_bg_view->getRect(); + balance_bg_rect.mLeft = balance_bg_rect.mRight - (buy_rect.getWidth() + balance_rect.getWidth() + HPAD); + balance_bg_view->setShape(balance_bg_rect); } if (mBalance && (fabs((F32)(mBalance - balance)) > gSavedSettings.getF32("UISndMoneyChangeThreshold"))) diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index 1d74a7be8c..5d51e32515 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -165,6 +165,7 @@ void LLTexLayerSetBuffer::dumpTotalByteCount() void LLTexLayerSetBuffer::requestUpdate() { + conditionalRestartUploadTimer(); mNeedsUpdate = TRUE; // If we're in the middle of uploading a baked texture, we don't care about it any more. // When it's downloaded, ignore it. @@ -173,17 +174,26 @@ void LLTexLayerSetBuffer::requestUpdate() void LLTexLayerSetBuffer::requestUpload() { + conditionalRestartUploadTimer(); + mNeedsUpload = TRUE; + mNumLowresUploads = 0; + mUploadPending = TRUE; +} + +void LLTexLayerSetBuffer::conditionalRestartUploadTimer() +{ // If we requested a new upload but haven't even uploaded // a low res version of our last upload request, then // keep the timer ticking instead of resetting it. if (mNeedsUpload && (mNumLowresUploads == 0)) { + mNeedsUploadTimer.unpause(); + } + else + { mNeedsUploadTimer.reset(); + mNeedsUploadTimer.start(); } - mNeedsUpload = TRUE; - mNumLowresUploads = 0; - mUploadPending = TRUE; - mNeedsUploadTimer.unpause(); } void LLTexLayerSetBuffer::cancelUpload() @@ -307,11 +317,26 @@ BOOL LLTexLayerSetBuffer::render() return success; } -bool LLTexLayerSetBuffer::isInitialized(void) const +BOOL LLTexLayerSetBuffer::isInitialized(void) const { return mGLTexturep.notNull() && mGLTexturep->isGLTextureCreated(); } +BOOL LLTexLayerSetBuffer::uploadPending() const +{ + return mUploadPending; +} + +BOOL LLTexLayerSetBuffer::uploadNeeded() const +{ + return mNeedsUpload; +} + +BOOL LLTexLayerSetBuffer::uploadInProgress() const +{ + return !mUploadID.isNull(); +} + BOOL LLTexLayerSetBuffer::isReadyToUpload() const { if (!mNeedsUpload) return FALSE; // Don't need to upload if we haven't requested one. @@ -353,40 +378,33 @@ BOOL LLTexLayerSetBuffer::updateImmediate() void LLTexLayerSetBuffer::readBackAndUpload() { - // pointers for storing data to upload - U8* baked_color_data = new U8[ mFullWidth * mFullHeight * 4 ]; - - glReadPixels(mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, GL_RGBA, GL_UNSIGNED_BYTE, baked_color_data ); - stop_glerror(); - - llinfos << "Baked " << mTexLayerSet->getBodyRegionName() << llendl; + llinfos << "Uploading baked " << mTexLayerSet->getBodyRegionName() << llendl; LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TEX_BAKES); - // We won't need our caches since we're baked now. (Techically, we won't - // really be baked until this image is sent to the server and the Avatar - // Appearance message is received.) + // Don't need caches since we're baked now. (note: we won't *really* be baked + // until this image is sent to the server and the Avatar Appearance message is received.) mTexLayerSet->deleteCaches(); - LLGLSUIDefault gls_ui; + // Get the COLOR information from our texture + U8* baked_color_data = new U8[ mFullWidth * mFullHeight * 4 ]; + glReadPixels(mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, GL_RGBA, GL_UNSIGNED_BYTE, baked_color_data ); + stop_glerror(); + // Get the MASK information from our texture + LLGLSUIDefault gls_ui; LLPointer<LLImageRaw> baked_mask_image = new LLImageRaw(mFullWidth, mFullHeight, 1 ); U8* baked_mask_data = baked_mask_image->getData(); - mTexLayerSet->gatherMorphMaskAlpha(baked_mask_data, mFullWidth, mFullHeight); - // writes into baked_color_data - const char* comment_text = NULL; - S32 baked_image_components = 5; // red green blue [bump] clothing + // Create the baked image from our color and mask information + const S32 baked_image_components = 5; // red green blue [bump] clothing LLPointer<LLImageRaw> baked_image = new LLImageRaw( mFullWidth, mFullHeight, baked_image_components ); U8* baked_image_data = baked_image->getData(); - - comment_text = LINDEN_J2C_COMMENT_PREFIX "RGBHM"; // 5 channels: rgb, heightfield/alpha, mask - S32 i = 0; - for( S32 u = 0; u < mFullWidth; u++ ) + for (S32 u=0; u < mFullWidth; u++) { - for( S32 v = 0; v < mFullHeight; v++ ) + for (S32 v=0; v < mFullHeight; v++) { baked_image_data[5*i + 0] = baked_color_data[4*i + 0]; baked_image_data[5*i + 1] = baked_color_data[4*i + 1]; @@ -399,21 +417,19 @@ void LLTexLayerSetBuffer::readBackAndUpload() LLPointer<LLImageJ2C> compressedImage = new LLImageJ2C; compressedImage->setRate(0.f); - LLTransactionID tid; - LLAssetID asset_id; - tid.generate(); - asset_id = tid.makeAssetID(gAgent.getSecureSessionID()); - - BOOL res = false; - if( compressedImage->encode(baked_image, comment_text)) + const char* comment_text = LINDEN_J2C_COMMENT_PREFIX "RGBHM"; // writes into baked_color_data. 5 channels (rgb, heightfield/alpha, mask) + if (compressedImage->encode(baked_image, comment_text)) { - res = LLVFile::writeFile(compressedImage->getData(), compressedImage->getDataSize(), - gVFS, asset_id, LLAssetType::AT_TEXTURE); - if (res) + LLTransactionID tid; + tid.generate(); + const LLAssetID asset_id = tid.makeAssetID(gAgent.getSecureSessionID()); + if (LLVFile::writeFile(compressedImage->getData(), compressedImage->getDataSize(), + gVFS, asset_id, LLAssetType::AT_TEXTURE)) { - LLPointer<LLImageJ2C> integrity_test = new LLImageJ2C; + // Read back the file and validate. BOOL valid = FALSE; - S32 file_size; + LLPointer<LLImageJ2C> integrity_test = new LLImageJ2C; + S32 file_size = 0; U8* data = LLVFile::readFile(gVFS, asset_id, LLAssetType::AT_TEXTURE, &file_size); if (data) { @@ -424,31 +440,26 @@ void LLTexLayerSetBuffer::readBackAndUpload() integrity_test->setLastError("Unable to read entire file"); } - if( valid ) + if (valid) { - // baked_upload_data is owned by the responder and deleted after the request completes + // Baked_upload_data is owned by the responder and deleted after the request completes. LLBakedUploadData* baked_upload_data = new LLBakedUploadData(gAgentAvatarp, this->mTexLayerSet, asset_id); mUploadID = asset_id; - const BOOL highest_lod = mTexLayerSet->isLocalTextureDataFinal(); - - // upload the image - std::string url = gAgent.getRegion()->getCapability("UploadBakedTexture"); + // Upload the image + const std::string url = gAgent.getRegion()->getCapability("UploadBakedTexture"); if(!url.empty() - && !LLPipeline::sForceOldBakedUpload) // Toggle the debug setting UploadBakedTexOld to change between the new caps method and old method + && !LLPipeline::sForceOldBakedUpload) // toggle debug setting UploadBakedTexOld to change between the new caps method and old method { - llinfos << "Baked texture upload via capability of " << mUploadID << " to " << url << llendl; - LLSD body = LLSD::emptyMap(); + // The responder will call LLTexLayerSetBuffer::onTextureUploadComplete() LLHTTPClient::post(url, body, new LLSendTexLayerResponder(body, mUploadID, LLAssetType::AT_TEXTURE, baked_upload_data)); - // Responder will call LLTexLayerSetBuffer::onTextureUploadComplete() + llinfos << "Baked texture upload via capability of " << mUploadID << " to " << url << llendl; } else { - llinfos << "Baked texture upload via Asset Store." << llendl; - // gAssetStorage->storeAssetData(mTransactionID, LLAssetType::AT_IMAGE_JPEG, &uploadCallback, (void *)this, FALSE); gAssetStorage->storeAssetData(tid, LLAssetType::AT_TEXTURE, LLTexLayerSetBuffer::onTextureUploadComplete, @@ -456,49 +467,53 @@ void LLTexLayerSetBuffer::readBackAndUpload() TRUE, // temp_file TRUE, // is_priority TRUE); // store_local + llinfos << "Baked texture upload via Asset Store." << llendl; } - if (gSavedSettings.getBOOL("DebugAvatarRezTime")) - { - std::string lod_str = highest_lod ? "HighRes" : "LowRes"; - LLSD args; - args["EXISTENCE"] = llformat("%d",(U32)mTexLayerSet->getAvatar()->debugGetExistenceTimeElapsedF32()); - args["TIME"] = llformat("%d",(U32)mNeedsUploadTimer.getElapsedTimeF32()); - args["BODYREGION"] = mTexLayerSet->getBodyRegionName(); - args["RESOLUTION"] = lod_str; - LLNotificationsUtil::add("AvatarRezSelfBakeNotification",args); - llinfos << "Uploading [ name: " << mTexLayerSet->getBodyRegionName() << " res:" << lod_str << " time:" << (U32)mNeedsUploadTimer.getElapsedTimeF32() << " ]" << llendl; - } - + const BOOL highest_lod = mTexLayerSet->isLocalTextureDataFinal(); if (highest_lod) { - // Sending the final LOD for the baked texture. - // All done, pause the upload timer so we know how long it took. + // Sending the final LOD for the baked texture. All done, pause + // the upload timer so we know how long it took. mNeedsUpload = FALSE; mNeedsUploadTimer.pause(); } else { - // Sending a lower level LOD for the baked texture. - // Restart the upload timer. + // Sending a lower level LOD for the baked texture. Restart the upload timer. mNumLowresUploads++; mNeedsUploadTimer.unpause(); mNeedsUploadTimer.reset(); } + + // Print out notification that we uploaded this texture. + if (gSavedSettings.getBOOL("DebugAvatarRezTime")) + { + std::string lod_str = highest_lod ? "HighRes" : "LowRes"; + LLSD args; + args["EXISTENCE"] = llformat("%d",(U32)mTexLayerSet->getAvatar()->debugGetExistenceTimeElapsedF32()); + args["TIME"] = llformat("%d",(U32)mNeedsUploadTimer.getElapsedTimeF32()); + args["BODYREGION"] = mTexLayerSet->getBodyRegionName(); + args["RESOLUTION"] = lod_str; + LLNotificationsUtil::add("AvatarRezSelfBakeNotification",args); + llinfos << "Uploading [ name: " << mTexLayerSet->getBodyRegionName() << " res:" << lod_str << " time:" << (U32)mNeedsUploadTimer.getElapsedTimeF32() << " ]" << llendl; + } } else { + // The read back and validate operation failed. Remove the uploaded file. mUploadPending = FALSE; - llinfos << "unable to create baked upload file: corrupted" << llendl; LLVFile file(gVFS, asset_id, LLAssetType::AT_TEXTURE, LLVFile::WRITE); file.remove(); + llinfos << "Unable to create baked upload file (reason: corrupted)." << llendl; } } } - if (!res) + else { + // The VFS write file operation failed. mUploadPending = FALSE; - llinfos << "unable to create baked upload file" << llendl; + llinfos << "Unable to create baked upload file (reason: failed to write file)" << llendl; } delete [] baked_color_data; @@ -2277,10 +2292,15 @@ const std::string LLTexLayerSetBuffer::dumpTextureInfo() const const BOOL is_high_res = !mNeedsUpload; const U32 num_low_res = mNumLowresUploads; const U32 upload_time = (U32)mNeedsUploadTimer.getElapsedTimeF32(); - const BOOL is_uploaded = !mUploadPending; const std::string local_texture_info = gAgentAvatarp->debugDumpLocalTextureDataInfo(mTexLayerSet); - std::string text = llformat("[ HiRes:%d LoRes:%d Uploaded:%d ] [ Timer:%d ] %s", - is_high_res, num_low_res, is_uploaded, + + std::string status = "CREATING "; + if (!uploadNeeded()) status = "DONE "; + if (uploadInProgress()) status = "UPLOADING"; + + std::string text = llformat("[%s] [HiRes:%d LoRes:%d] [Elapsed:%d] %s", + status.c_str(), + is_high_res, num_low_res, upload_time, local_texture_info.c_str()); return text; diff --git a/indra/newview/lltexlayer.h b/indra/newview/lltexlayer.h index 2ee609fe60..cb2e1faaa6 100644 --- a/indra/newview/lltexlayer.h +++ b/indra/newview/lltexlayer.h @@ -275,12 +275,16 @@ public: virtual void postRender(BOOL success); virtual BOOL render(); BOOL updateImmediate(); - bool isInitialized(void) const; + + BOOL isInitialized(void) const; + BOOL uploadPending() const; // We are expecting a new texture to be uploaded at some point + BOOL uploadNeeded() const; // We need to upload a new texture + BOOL uploadInProgress() const; // We have started uploading a new texture and are awaiting the result + /*virtual*/ BOOL needsRender(); void requestUpdate(); void requestUpload(); void cancelUpload(); - BOOL uploadPending() const { return mUploadPending; } BOOL render(S32 x, S32 y, S32 width, S32 height); void readBackAndUpload(); static void onTextureUploadComplete(const LLUUID& uuid, @@ -290,15 +294,19 @@ public: const std::string dumpTextureInfo() const; virtual void restoreGLTexture(); virtual void destroyGLTexture(); + + protected: void pushProjection() const; void popProjection() const; BOOL isReadyToUpload() const; + void conditionalRestartUploadTimer(); + private: LLTexLayerSet* const mTexLayerSet; BOOL mNeedsUpdate; // whether we need to update our baked textures BOOL mNeedsUpload; // whether we need to send our baked textures to the server - U32 mNumLowresUploads; // mumber of times we've sent a lowres version of our baked textures to the server + U32 mNumLowresUploads; // number of times we've sent a lowres version of our baked textures to the server BOOL mUploadPending; // whether we have received back the new baked textures LLUUID mUploadID; // the current upload process (null if none). Used to avoid overlaps, e.g. when the user rapidly makes two changes outside of Face Edit. static S32 sGLByteCount; diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index cf3bce2ec1..52d227f827 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -329,11 +329,7 @@ public: partial = true; } } - else - { - worker->setGetStatus(status, reason); -// llwarns << status << ": " << reason << llendl; - } + if (!success) { worker->setGetStatus(status, reason); @@ -753,17 +749,22 @@ bool LLTextureFetchWorker::doWork(S32 param) if (region) { - std::string http_url = region->getCapability("GetTexture"); + std::string http_url = region->getHttpUrl() ; if (!http_url.empty()) { mUrl = http_url + "/?texture_id=" + mID.asString().c_str(); mWriteToCacheState = CAN_WRITE ; //because this texture has a fixed texture id. } + else + { + mCanUseHTTP = false ; + } } else { // This will happen if not logged in or if a region deoes not have HTTP Texture enabled //llwarns << "Region not found for host: " << mHost << llendl; + mCanUseHTTP = false; } } if (mCanUseHTTP && !mUrl.empty()) @@ -907,7 +908,7 @@ bool LLTextureFetchWorker::doWork(S32 param) if (mGetStatus == HTTP_NOT_FOUND) { mHTTPFailCount = max_attempts = 1; // Don't retry - //llwarns << "Texture missing from server (404): " << mUrl << llendl; + llwarns << "Texture missing from server (404): " << mUrl << llendl; //roll back to try UDP if(mCanUseNET) @@ -927,6 +928,17 @@ bool LLTextureFetchWorker::doWork(S32 param) max_attempts = mHTTPFailCount+1; // Keep retrying LL_INFOS_ONCE("Texture") << "Texture server busy (503): " << mUrl << LL_ENDL; } + else if(mGetStatus >= HTTP_MULTIPLE_CHOICES && mGetStatus < HTTP_BAD_REQUEST) //http re-direct + { + ++mHTTPFailCount; + max_attempts = 5 ; //try at most 5 times to avoid infinite redirection loop. + + llwarns << "HTTP GET failed because of redirection: " << mUrl + << " Status: " << mGetStatus << " Reason: '" << mGetReason << llendl ; + + //assign to the new url + mUrl = mGetReason ; + } else { const S32 HTTP_MAX_RETRY_COUNT = 3; @@ -936,6 +948,7 @@ bool LLTextureFetchWorker::doWork(S32 param) << " Status: " << mGetStatus << " Reason: '" << mGetReason << "'" << " Attempt:" << mHTTPFailCount+1 << "/" << max_attempts << llendl; } + if (mHTTPFailCount >= max_attempts) { if (cur_size > 0) diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index 377449cc8b..8ea4dbeb04 100644 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -418,10 +418,10 @@ void LLAvatarTexBar::draw() const S32 line_height = (S32)(LLFontGL::getFontMonospace()->getLineHeight() + .5f); const S32 v_offset = 0; + const S32 l_offset = 3; //---------------------------------------------------------------------------- LLGLSUIDefault gls_ui; - LLColor4 text_color(1.f, 1.f, 1.f, 1.f); LLColor4 color; U32 line_num = 1; @@ -434,19 +434,36 @@ void LLAvatarTexBar::draw() if (!layerset) continue; const LLTexLayerSetBuffer *layerset_buffer = layerset->getComposite(); if (!layerset_buffer) continue; + + LLColor4 text_color = LLColor4::white; + + if (layerset_buffer->uploadNeeded()) + { + text_color = LLColor4::red; + } + if (layerset_buffer->uploadInProgress()) + { + text_color = LLColor4::magenta; + } std::string text = layerset_buffer->dumpTextureInfo(); - LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*line_num, + LLFontGL::getFontMonospace()->renderUTF8(text, 0, l_offset, v_offset + line_height*line_num, text_color, LLFontGL::LEFT, LLFontGL::TOP); //, LLFontGL::BOLD, LLFontGL::DROP_SHADOW_SOFT); line_num++; } const U32 texture_timeout = gSavedSettings.getU32("AvatarBakedTextureTimeout"); const U32 override_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel"); + LLColor4 header_color(1.f, 1.f, 1.f, 0.9f); + const std::string texture_timeout_str = texture_timeout ? llformat("%d",texture_timeout) : "Disabled"; const std::string override_tex_discard_level_str = override_tex_discard_level ? llformat("%d",override_tex_discard_level) : "Disabled"; std::string header_text = llformat("[ Timeout('AvatarBakedTextureTimeout'):%s ] [ LOD_Override('TextureDiscardLevel'):%s ]", texture_timeout_str.c_str(), override_tex_discard_level_str.c_str()); - LLFontGL::getFontMonospace()->renderUTF8(header_text, 0, 0, v_offset + line_height*line_num, - text_color, LLFontGL::LEFT, LLFontGL::TOP); //, LLFontGL::BOLD, LLFontGL::DROP_SHADOW_SOFT); + LLFontGL::getFontMonospace()->renderUTF8(header_text, 0, l_offset, v_offset + line_height*line_num, + header_color, LLFontGL::LEFT, LLFontGL::TOP); //, LLFontGL::BOLD, LLFontGL::DROP_SHADOW_SOFT); + line_num++; + std::string section_text = "Avatar Textures Information:"; + LLFontGL::getFontMonospace()->renderUTF8(section_text, 0, 0, v_offset + line_height*line_num, + header_color, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::BOLD, LLFontGL::DROP_SHADOW_SOFT); } BOOL LLAvatarTexBar::handleMouseDown(S32 x, S32 y, MASK mask) @@ -457,7 +474,7 @@ BOOL LLAvatarTexBar::handleMouseDown(S32 x, S32 y, MASK mask) LLRect LLAvatarTexBar::getRequiredRect() { LLRect rect; - rect.mTop = 85; + rect.mTop = 100; if (!gSavedSettings.getBOOL("DebugAvatarRezTime")) rect.mTop = 0; return rect; } diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index bc77ac5fd1..c862c02b82 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -1878,24 +1878,7 @@ EAcceptance LLToolDragAndDrop::dad3dWearItem( LLNotificationsUtil::add("CanNotChangeAppearanceUntilLoaded"); return ACCEPT_NO; } - - if (mSource == SOURCE_LIBRARY) - { - // create item based on that one, and put it on if that - // was a success. - LLPointer<LLInventoryCallback> cb = new WearOnAvatarCallback(); - copy_inventory_item( - gAgent.getID(), - item->getPermissions().getOwner(), - item->getUUID(), - LLUUID::null, - std::string(), - cb); - } - else - { - wear_inventory_item_on_avatar( item ); - } + LLAppearanceMgr::instance().wearItemOnAvatar(item->getUUID(),true, !(mask & MASK_CONTROL)); } return ACCEPT_YES_MULTI; } diff --git a/indra/newview/lltoolmorph.cpp b/indra/newview/lltoolmorph.cpp index c1dc1de5e5..fa21b1a866 100644 --- a/indra/newview/lltoolmorph.cpp +++ b/indra/newview/lltoolmorph.cpp @@ -79,7 +79,8 @@ LLVisualParamHint::LLVisualParamHint( LLViewerJointMesh *mesh, LLViewerVisualParam *param, LLWearable *wearable, - F32 param_weight) + F32 param_weight, + LLJoint* jointp) : LLViewerDynamicTexture(width, height, 3, LLViewerDynamicTexture::ORDER_MIDDLE, TRUE ), mNeedsUpdate( TRUE ), @@ -91,11 +92,11 @@ LLVisualParamHint::LLVisualParamHint( mAllowsUpdates( TRUE ), mDelayFrames( 0 ), mRect( pos_x, pos_y + height, pos_x + width, pos_y ), - mLastParamWeight(0.f) + mLastParamWeight(0.f), + mCamTargetJoint(jointp) { LLVisualParamHint::sInstances.insert( this ); - mBackgroundp = LLUI::getUIImage("avatar_thumb_bkgrnd.j2c"); - + mBackgroundp = LLUI::getUIImage("avatar_thumb_bkgrnd.png"); llassert(width != 0); llassert(height != 0); @@ -196,21 +197,6 @@ BOOL LLVisualParamHint::render() mNeedsUpdate = FALSE; mIsVisible = TRUE; - LLViewerJointMesh* cam_target_joint = NULL; - const std::string& cam_target_mesh_name = mVisualParam->getCameraTargetName(); - if( !cam_target_mesh_name.empty() ) - { - cam_target_joint = (LLViewerJointMesh*)gAgentAvatarp->getJoint( cam_target_mesh_name ); - } - if( !cam_target_joint ) - { - cam_target_joint = (LLViewerJointMesh*)gMorphView->getCameraTargetJoint(); - } - if( !cam_target_joint ) - { - cam_target_joint = (LLViewerJointMesh*)gAgentAvatarp->getJoint("mHead"); - } - LLQuaternion avatar_rotation; LLJoint* root_joint = gAgentAvatarp->getRootJoint(); if( root_joint ) @@ -218,7 +204,7 @@ BOOL LLVisualParamHint::render() avatar_rotation = root_joint->getWorldRotation(); } - LLVector3 target_joint_pos = cam_target_joint->getWorldPosition(); + LLVector3 target_joint_pos = mCamTargetJoint->getWorldPosition(); LLVector3 target_offset( 0, 0, mVisualParam->getCameraElevation() ); LLVector3 target_pos = target_joint_pos + (target_offset * avatar_rotation); @@ -234,9 +220,9 @@ BOOL LLVisualParamHint::render() LLViewerCamera::getInstance()->setAspect((F32)mFullWidth / (F32)mFullHeight); LLViewerCamera::getInstance()->setOriginAndLookAt( - camera_pos, // camera - LLVector3(0.f, 0.f, 1.f), // up - target_pos ); // point of interest + camera_pos, // camera + LLVector3::z_axis, // up + target_pos ); // point of interest LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, FALSE); diff --git a/indra/newview/lltoolmorph.h b/indra/newview/lltoolmorph.h index 3bffefaa55..cbab5e765f 100644 --- a/indra/newview/lltoolmorph.h +++ b/indra/newview/lltoolmorph.h @@ -47,6 +47,7 @@ class LLViewerJointMesh; class LLPolyMesh; class LLViewerObject; +class LLJoint; //----------------------------------------------------------------------------- // LLVisualParamHint @@ -63,7 +64,8 @@ public: LLViewerJointMesh *mesh, LLViewerVisualParam *param, LLWearable *wearable, - F32 param_weight); + F32 param_weight, + LLJoint* jointp); /*virtual*/ S8 getType() const ; @@ -96,6 +98,7 @@ protected: S32 mDelayFrames; // updates are blocked for this many frames LLRect mRect; F32 mLastParamWeight; + LLJoint* mCamTargetJoint; // joint to target with preview camera LLUIImagePtr mBackgroundp; diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index f02e15706d..f4b4954cbd 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -74,6 +74,7 @@ #include "llfloatertools.h" #include "llpaneloutfitsinventory.h" #include "llpanellogin.h" +#include "llpaneltopinfobar.h" #ifdef TOGGLE_HACKED_GODLIKE_VIEWER BOOL gHackGodmode = FALSE; @@ -471,6 +472,12 @@ bool toggle_show_favorites_panel(const LLSD& newvalue) return true; } +bool toggle_show_mini_location_panel(const LLSD& newvalue) +{ + LLPanelTopInfoBar::getInstance()->setVisible(newvalue.asBoolean()); + return true; +} + bool toggle_show_object_render_cost(const LLSD& newvalue) { LLFloaterTools::sShowObjectCost = newvalue.asBoolean(); @@ -615,6 +622,7 @@ void settings_setup_listeners() gSavedSettings.getControl("AgentPause")->getSignal()->connect(boost::bind(&toggle_agent_pause, _2)); gSavedSettings.getControl("ShowNavbarNavigationPanel")->getSignal()->connect(boost::bind(&toggle_show_navigation_panel, _2)); gSavedSettings.getControl("ShowNavbarFavoritesPanel")->getSignal()->connect(boost::bind(&toggle_show_favorites_panel, _2)); + gSavedSettings.getControl("ShowMiniLocationPanel")->getSignal()->connect(boost::bind(&toggle_show_mini_location_panel, _2)); gSavedSettings.getControl("ShowObjectRenderingCost")->getSignal()->connect(boost::bind(&toggle_show_object_render_cost, _2)); gSavedSettings.getControl("ForceShowGrid")->getSignal()->connect(boost::bind(&handleForceShowGrid, _2)); } diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 49ea0348f9..efe59744bc 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -103,6 +103,7 @@ #include "llfloateruipreview.h" #include "llfloaterurldisplay.h" #include "llfloatervoicedevicesettings.h" +#include "llfloatervoiceeffect.h" #include "llfloaterwater.h" #include "llfloaterwhitelistentry.h" #include "llfloaterwindlight.h" @@ -255,7 +256,8 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("upload_sound", "floater_sound_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSoundPreview>, "upload"); LLFloaterReg::add("voice_controls", "floater_voice_controls.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLCallFloater>); - + LLFloaterReg::add("voice_effect", "floater_voice_effect.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterVoiceEffect>); + LLFloaterReg::add("whitelist_entry", "floater_whitelist_entry.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWhiteListEntry>); LLFloaterWindowSizeUtil::registerFloater(); LLFloaterReg::add("world_map", "floater_world_map.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWorldMap>); diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index d745356dcd..face7124c2 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -875,7 +875,7 @@ void WearOnAvatarCallback::fire(const LLUUID& inv_item) LLViewerInventoryItem *item = gInventory.getItem(inv_item); if (item) { - wear_inventory_item_on_avatar(item); + LLAppearanceMgr::instance().wearItemOnAvatar(inv_item, true, mReplace); } } diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h index 8ab7c9710d..d0d3ad693e 100644 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -243,7 +243,13 @@ public: class WearOnAvatarCallback : public LLInventoryCallback { +public: + WearOnAvatarCallback(bool do_replace = false) : mReplace(do_replace) {} + void fire(const LLUUID& inv_item); + +protected: + bool mReplace; }; class ModifiedCOFCallback : public LLInventoryCallback diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index a1b909c609..2c7ae539ce 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -7495,10 +7495,13 @@ class LLEditTakeOff : public view_listener_t else { LLWearableType::EType type = LLWearableType::typeNameToType(clothing); - if (type >= LLWearableType::WT_SHAPE && type < LLWearableType::WT_COUNT) + if (type >= LLWearableType::WT_SHAPE + && type < LLWearableType::WT_COUNT + && (gAgentWearables.getWearableCount(type) > 0)) { - // MULTI-WEARABLES - LLViewerInventoryItem *item = dynamic_cast<LLViewerInventoryItem*>(gAgentWearables.getWearableInventoryItem(type,0)); + // MULTI-WEARABLES: assuming user wanted to remove top shirt. + U32 wearable_index = gAgentWearables.getWearableCount(type) - 1; + LLViewerInventoryItem *item = dynamic_cast<LLViewerInventoryItem*>(gAgentWearables.getWearableInventoryItem(type,wearable_index)); LLWearableBridge::removeItemFromAvatar(item); } diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index c48668df9a..da240cedbb 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -216,6 +216,7 @@ LLViewerRegion::LLViewerRegion(const U64 &handle, mColoName("unknown"), mProductSKU("unknown"), mProductName("unknown"), + mHttpUrl(""), mCacheLoaded(FALSE), mCacheEntriesCount(0), mCacheID(), @@ -1555,6 +1556,10 @@ void LLViewerRegion::setCapability(const std::string& name, const std::string& u else { mCapabilities[name] = url; + if(name == "GetTexture") + { + mHttpUrl = url ; + } } } diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 5c4d5a61fd..a9e7ef771c 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -291,6 +291,7 @@ public: friend std::ostream& operator<<(std::ostream &s, const LLViewerRegion ®ion); /// implements LLCapabilityProvider virtual std::string getDescription() const; + std::string getHttpUrl() const { return mHttpUrl ;} LLSpatialPartition* getSpatialPartition(U32 type); public: @@ -383,6 +384,7 @@ private: std::string mColoName; std::string mProductSKU; std::string mProductName; + std::string mHttpUrl ; // Maps local ids to cache entries. diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index d8a9ce9374..7e779986df 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1447,8 +1447,14 @@ void LLViewerFetchedTexture::setKnownDrawSize(S32 width, S32 height) //virtual void LLViewerFetchedTexture::processTextureStats() { - if(mFullyLoaded)//already loaded + if(mFullyLoaded) { + if(mDesiredDiscardLevel <= mMinDesiredDiscardLevel)//already loaded + { + return ; + } + mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, mMinDesiredDiscardLevel) ; + mFullyLoaded = FALSE ; return ; } @@ -1482,6 +1488,7 @@ void LLViewerFetchedTexture::processTextureStats() mDesiredDiscardLevel = (S8)llmin(log((F32)mFullWidth / mKnownDrawWidth) / log_2, log((F32)mFullHeight / mKnownDrawHeight) / log_2) ; mDesiredDiscardLevel = llclamp(mDesiredDiscardLevel, (S8)0, (S8)getMaxDiscardLevel()) ; + mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, mMinDesiredDiscardLevel) ; } mKnownDrawSizeChanged = FALSE ; @@ -1514,7 +1521,7 @@ F32 LLViewerFetchedTexture::calcDecodePriority() } if(mFullyLoaded && !mForceToSaveRawImage)//already loaded for static texture { - return -4.0f ; //alreay fetched + return -1.0f ; //alreay fetched } S32 cur_discard = getCurrentDiscardLevelForFetching(); @@ -1528,16 +1535,16 @@ F32 LLViewerFetchedTexture::calcDecodePriority() } else if(mDesiredDiscardLevel >= cur_discard && cur_discard > -1) { - priority = -1.0f ; + priority = -2.0f ; } else if(mCachedRawDiscardLevel > -1 && mDesiredDiscardLevel >= mCachedRawDiscardLevel) { - priority = -1.0f; + priority = -3.0f; } else if (mDesiredDiscardLevel > getMaxDiscardLevel()) { // Don't decode anything we don't need - priority = -1.0f; + priority = -4.0f; } else if ((mBoostLevel == LLViewerTexture::BOOST_UI || mBoostLevel == LLViewerTexture::BOOST_ICON) && !have_all_data) { @@ -1551,9 +1558,14 @@ F32 LLViewerFetchedTexture::calcDecodePriority() // Always want high boosted images priority = 1.f; } + else if(mForceToSaveRawImage) + { + //force to fetch the raw image. + priority = 1.f; + } else { - priority = -1.f; //stop fetching + priority = -5.f; //stop fetching } } else if (cur_discard < 0) @@ -1569,7 +1581,7 @@ F32 LLViewerFetchedTexture::calcDecodePriority() else if ((mMinDiscardLevel > 0) && (cur_discard <= mMinDiscardLevel)) { // larger mips are corrupted - priority = -3.0f; + priority = -6.0f; } else { @@ -2052,10 +2064,13 @@ bool LLViewerFetchedTexture::doLoadedCallbacks() bool run_raw_callbacks = false; bool need_readback = false; + mMinDesiredDiscardLevel = MAX_DISCARD_LEVEL + 1; for(callback_list_t::iterator iter = mLoadedCallbackList.begin(); iter != mLoadedCallbackList.end(); ) { LLLoadedCallbackEntry *entryp = *iter++; + mMinDesiredDiscardLevel = llmin(mMinDesiredDiscardLevel, (S8)entryp->mDesiredDiscard) ; + if (entryp->mNeedsImageRaw) { if (mNeedsAux) @@ -2187,6 +2202,7 @@ bool LLViewerFetchedTexture::doLoadedCallbacks() if (mLoadedCallbackList.empty()) { gTextureList.mCallbackList.erase(this); + mMinDesiredDiscardLevel = MAX_DISCARD_LEVEL + 1; } // Done with any raw image data at this point (will be re-created if we still have callbacks) diff --git a/indra/newview/llviewervisualparam.cpp b/indra/newview/llviewervisualparam.cpp index 422e530dc6..1dc09a64ac 100644 --- a/indra/newview/llviewervisualparam.cpp +++ b/indra/newview/llviewervisualparam.cpp @@ -99,8 +99,6 @@ BOOL LLViewerVisualParamInfo::parseXml(LLXmlTreeNode *node) node->getFastAttributeF32( camera_angle_string, mCamAngle ); // in degrees static LLStdStringHandle camera_elevation_string = LLXmlTree::addAttributeString("camera_elevation"); node->getFastAttributeF32( camera_elevation_string, mCamElevation ); - static LLStdStringHandle camera_target_string = LLXmlTree::addAttributeString("camera_target"); - node->getFastAttributeString( camera_target_string, mCamTargetName ); mCamAngle += 180; diff --git a/indra/newview/llviewervisualparam.h b/indra/newview/llviewervisualparam.h index 1a3975eb99..f38c01fa6c 100644 --- a/indra/newview/llviewervisualparam.h +++ b/indra/newview/llviewervisualparam.h @@ -60,7 +60,6 @@ protected: F32 mCamDist; F32 mCamAngle; // degrees F32 mCamElevation; - std::string mCamTargetName; F32 mEditGroupDisplayOrder; BOOL mShowSimple; // show edit controls when in "simple ui" mode? F32 mSimpleMin; // when in simple UI, apply this minimum, range 0.f to 100.f @@ -104,7 +103,6 @@ public: F32 getCameraDistance() const { return getInfo()->mCamDist; } F32 getCameraAngle() const { return getInfo()->mCamAngle; } // degrees F32 getCameraElevation() const { return getInfo()->mCamElevation; } - const std::string& getCameraTargetName() const { return getInfo()->mCamTargetName; } BOOL getShowSimple() const { return getInfo()->mShowSimple; } F32 getSimpleMin() const { return getInfo()->mSimpleMin; } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index d91f232f0e..83556452c0 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -201,6 +201,7 @@ #include "llnearbychat.h" #include "llviewerwindowlistener.h" +#include "llpaneltopinfobar.h" #if LL_WINDOWS #include <tchar.h> // For Unicode conversion methods @@ -1669,6 +1670,20 @@ void LLViewerWindow::initWorldUI() navbar->showFavoritesPanel(FALSE); } + // Top Info bar + LLPanel* topinfo_bar_container = getRootView()->getChild<LLPanel>("topinfo_bar_container"); + LLPanelTopInfoBar* topinfo_bar = LLPanelTopInfoBar::getInstance(); + + topinfo_bar->setShape(topinfo_bar_container->getLocalRect()); + + topinfo_bar_container->addChild(topinfo_bar); + topinfo_bar_container->setVisible(TRUE); + + if (!gSavedSettings.getBOOL("ShowMiniLocationPanel")) + { + topinfo_bar->setVisible(FALSE); + } + if ( gHUDView == NULL ) { LLRect hud_rect = full_window; diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 462c442954..eae92f8992 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -1273,7 +1273,8 @@ BOOL LLVOAvatarSelf::isLocalTextureDataAvailable(const LLTexLayerSet* layerset) //----------------------------------------------------------------------------- BOOL LLVOAvatarSelf::isLocalTextureDataFinal(const LLTexLayerSet* layerset) const { - const U32 override_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel"); + //const U32 desired_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel"); + const U32 desired_tex_discard_level = 0; // SERAPH hack to not bake textures on lower discard levels. for (U32 i = 0; i < mBakedTextureDatas.size(); i++) { @@ -1289,7 +1290,7 @@ BOOL LLVOAvatarSelf::isLocalTextureDataFinal(const LLTexLayerSet* layerset) cons const U32 wearable_count = gAgentWearables.getWearableCount(wearable_type); for (U32 wearable_index = 0; wearable_index < wearable_count; wearable_index++) { - if (getLocalDiscardLevel(*local_tex_iter, wearable_index) > (S32)(override_tex_discard_level)) + if (getLocalDiscardLevel(*local_tex_iter, wearable_index) > (S32)(desired_tex_discard_level)) { return FALSE; } @@ -1304,7 +1305,8 @@ BOOL LLVOAvatarSelf::isLocalTextureDataFinal(const LLTexLayerSet* layerset) cons BOOL LLVOAvatarSelf::isAllLocalTextureDataFinal() const { - const U32 override_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel"); + // const U32 desired_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel"); + const U32 desired_tex_discard_level = 0; // SERAPH hack to not bake textures on lower discard levels for (U32 i = 0; i < mBakedTextureDatas.size(); i++) { @@ -1318,7 +1320,7 @@ BOOL LLVOAvatarSelf::isAllLocalTextureDataFinal() const const U32 wearable_count = gAgentWearables.getWearableCount(wearable_type); for (U32 wearable_index = 0; wearable_index < wearable_count; wearable_index++) { - if (getLocalDiscardLevel(*local_tex_iter, wearable_index) > (S32)(override_tex_discard_level)) + if (getLocalDiscardLevel(*local_tex_iter, wearable_index) > (S32)(desired_tex_discard_level)) { return FALSE; } @@ -1334,7 +1336,7 @@ BOOL LLVOAvatarSelf::isBakedTextureFinal(const LLVOAvatarDefines::EBakedTextureI if (!layerset) return FALSE; const LLTexLayerSetBuffer *layerset_buffer = layerset->getComposite(); if (!layerset_buffer) return FALSE; - return !layerset_buffer->uploadPending(); + return !layerset_buffer->uploadNeeded(); } BOOL LLVOAvatarSelf::isTextureDefined(LLVOAvatarDefines::ETextureIndex type, U32 index) const @@ -1882,7 +1884,7 @@ const std::string LLVOAvatarSelf::debugDumpLocalTextureDataInfo(const LLTexLayer if (layerset == mBakedTextureDatas[baked_index].mTexLayerSet) { const LLVOAvatarDictionary::BakedEntry *baked_dict = baked_iter->second; - text += llformat("[%d] '%s' ( ",baked_index, baked_dict->mName.c_str()); + text += llformat("%d-%s ( ",baked_index, baked_dict->mName.c_str()); for (texture_vec_t::const_iterator local_tex_iter = baked_dict->mLocalTextures.begin(); local_tex_iter != baked_dict->mLocalTextures.end(); ++local_tex_iter) @@ -1975,37 +1977,47 @@ BOOL LLVOAvatarSelf::canGrabBakedTexture(EBakedTextureIndex baked_index) const ++iter) { const ETextureIndex t_index = (*iter); - lldebugs << "Checking index " << (U32) t_index << llendl; - // MULTI-WEARABLE: old method. replace. - const LLUUID& texture_id = getTEImage( t_index )->getID(); - if (texture_id != IMG_DEFAULT_AVATAR) - { - // Search inventory for this texture. - LLViewerInventoryCategory::cat_array_t cats; - LLViewerInventoryItem::item_array_t items; - LLAssetIDMatches asset_id_matches(texture_id); - gInventory.collectDescendentsIf(LLUUID::null, - cats, - items, - LLInventoryModel::INCLUDE_TRASH, - asset_id_matches); - - BOOL can_grab = FALSE; - lldebugs << "item count for asset " << texture_id << ": " << items.count() << llendl; - if (items.count()) + LLWearableType::EType wearable_type = LLVOAvatarDictionary::getTEWearableType(t_index); + U32 count = gAgentWearables.getWearableCount(wearable_type); + lldebugs << "Checking index " << (U32) t_index << " count: " << count << llendl; + + for (U32 wearable_index = 0; wearable_index < count; ++wearable_index) + { + LLWearable *wearable = gAgentWearables.getWearable(wearable_type, wearable_index); + if (wearable) { - // search for full permissions version - for (S32 i = 0; i < items.count(); i++) + const LLLocalTextureObject *texture = wearable->getLocalTextureObject((S32)t_index); + const LLUUID& texture_id = texture->getID(); + if (texture_id != IMG_DEFAULT_AVATAR) { - LLViewerInventoryItem* itemp = items[i]; - if (itemp->getIsFullPerm()) + // Search inventory for this texture. + LLViewerInventoryCategory::cat_array_t cats; + LLViewerInventoryItem::item_array_t items; + LLAssetIDMatches asset_id_matches(texture_id); + gInventory.collectDescendentsIf(LLUUID::null, + cats, + items, + LLInventoryModel::INCLUDE_TRASH, + asset_id_matches); + + BOOL can_grab = FALSE; + lldebugs << "item count for asset " << texture_id << ": " << items.count() << llendl; + if (items.count()) { - can_grab = TRUE; - break; + // search for full permissions version + for (S32 i = 0; i < items.count(); i++) + { + LLViewerInventoryItem* itemp = items[i]; + if (itemp->getIsFullPerm()) + { + can_grab = TRUE; + break; + } + } } + if (!can_grab) return FALSE; } } - if (!can_grab) return FALSE; } } diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 1b4471a9fe..070663e22f 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -897,9 +897,9 @@ void LLVoiceChannelP2P::setSessionHandle(const std::string& handle, const std::s else { LL_WARNS("Voice") << "incoming SIP URL is not provided. Channel may not work properly." << LL_ENDL; - // In case of incoming AvaLine call generated URI will be differ from original one. - // This is because Avatar-2-Avatar URI is based on avatar UUID but Avaline is not. - // See LLVoiceClient::sessionAddedEvent() -> setUUIDFromStringHash() + // In the case of an incoming AvaLine call, the generated URI will be different from the + // original one. This is because the P2P URI is based on avatar UUID but Avaline is not. + // See LLVoiceClient::sessionAddedEvent() setURI(LLVoiceClient::getInstance()->sipURIFromID(mOtherUserID)); } diff --git a/indra/newview/llvoicechannel.h b/indra/newview/llvoicechannel.h index 573fab1f4f..074f9b8bba 100644 --- a/indra/newview/llvoicechannel.h +++ b/indra/newview/llvoicechannel.h @@ -113,7 +113,7 @@ protected: void doSetState(const EState& state); void setURI(std::string uri); - // there can be two directions ICOMING and OUTGOING + // there can be two directions INCOMING and OUTGOING EDirection mCallDirection; std::string mURI; diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 42e44634b6..e8635d7f1a 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -35,6 +35,7 @@ #include "llviewerwindow.h" #include "llvoicevivox.h" #include "llviewernetwork.h" +#include "llcommandhandler.h" #include "llhttpnode.h" #include "llnotificationsutil.h" #include "llsdserialize.h" @@ -46,6 +47,39 @@ const F32 LLVoiceClient::VOLUME_MIN = 0.f; const F32 LLVoiceClient::VOLUME_DEFAULT = 0.5f; const F32 LLVoiceClient::VOLUME_MAX = 1.0f; + +// Support for secondlife:///app/voice SLapps +class LLVoiceHandler : public LLCommandHandler +{ +public: + // requests will be throttled from a non-trusted browser + LLVoiceHandler() : LLCommandHandler("voice", UNTRUSTED_THROTTLE) {} + + bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web) + { + if (params[0].asString() == "effects") + { + LLVoiceEffectInterface* effect_interface = LLVoiceClient::instance().getVoiceEffectInterface(); + // If the voice client doesn't support voice effects, we can't handle effects SLapps + if (!effect_interface) + { + return false; + } + + // Support secondlife:///app/voice/effects/refresh to update the voice effect list with new effects + if (params[1].asString() == "refresh") + { + effect_interface->refreshVoiceEffectLists(false); + return true; + } + } + return false; + } +}; +LLVoiceHandler gVoiceHandler; + + + std::string LLVoiceClientStatusObserver::status2string(LLVoiceClientStatusObserver::EStatusType inStatus) { std::string result = "UNKNOWN"; @@ -77,13 +111,14 @@ std::string LLVoiceClientStatusObserver::status2string(LLVoiceClientStatusObserv - /////////////////////////////////////////////////////////////////////////////////////////////// LLVoiceClient::LLVoiceClient() : mVoiceModule(NULL), - m_servicePump(NULL) + m_servicePump(NULL), + mVoiceEffectEnabled(LLCachedControl<bool>(gSavedSettings, "VoiceMorphingEnabled")), + mVoiceEffectDefault(LLCachedControl<std::string>(gSavedPerAccountSettings, "VoiceEffectDefault")) { } @@ -567,7 +602,7 @@ std::string LLVoiceClient::getDisplayName(const LLUUID& id) } } -bool LLVoiceClient::isVoiceWorking() +bool LLVoiceClient::isVoiceWorking() const { if (mVoiceModule) { @@ -710,6 +745,10 @@ std::string LLVoiceClient::sipURIFromID(const LLUUID &id) } } +LLVoiceEffectInterface* LLVoiceClient::getVoiceEffectInterface() const +{ + return getVoiceEffectEnabled() ? dynamic_cast<LLVoiceEffectInterface*>(mVoiceModule) : NULL; +} /////////////////// // version checking diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h index e08fed7ae9..0e3d9a5435 100644 --- a/indra/newview/llvoiceclient.h +++ b/indra/newview/llvoiceclient.h @@ -42,6 +42,7 @@ class LLVOAvatar; #include "llviewerregion.h" #include "llcallingcard.h" // for LLFriendObserver #include "llsecapi.h" +#include "llcontrol.h" // devices @@ -52,7 +53,7 @@ class LLVoiceClientParticipantObserver { public: virtual ~LLVoiceClientParticipantObserver() { } - virtual void onChange() = 0; + virtual void onParticipantsChanged() = 0; }; @@ -109,7 +110,7 @@ public: virtual void updateSettings()=0; // call after loading settings and whenever they change - virtual bool isVoiceWorking()=0; // connected to a voice server and voice channel + virtual bool isVoiceWorking() const = 0; // connected to a voice server and voice channel virtual const LLVoiceVersionInfo& getVersion()=0; @@ -217,8 +218,6 @@ public: ////////////////////////// /// @name nearby speaker accessors //@{ - - virtual BOOL getVoiceEnabled(const LLUUID& id)=0; // true if we've received data for this avatar virtual std::string getDisplayName(const LLUUID& id)=0; virtual BOOL isOnlineSIP(const LLUUID &id)=0; @@ -261,6 +260,63 @@ public: }; +////////////////////////////////// +/// @class LLVoiceEffectObserver +class LLVoiceEffectObserver +{ +public: + virtual ~LLVoiceEffectObserver() { } + virtual void onVoiceEffectChanged(bool effect_list_updated) = 0; +}; + +typedef std::multimap<const std::string, const LLUUID, LLDictionaryLess> voice_effect_list_t; + +////////////////////////////////// +/// @class LLVoiceEffectInterface +/// @brief Voice effect module interface +/// +/// Voice effect modules should provide an implementation for this interface. +///////////////////////////////// + +class LLVoiceEffectInterface +{ +public: + LLVoiceEffectInterface() {} + virtual ~LLVoiceEffectInterface() {} + + ////////////////////////// + /// @name Accessors + //@{ + virtual bool setVoiceEffect(const LLUUID& id) = 0; + virtual const LLUUID getVoiceEffect() = 0; + virtual LLSD getVoiceEffectProperties(const LLUUID& id) = 0; + + virtual void refreshVoiceEffectLists(bool clear_lists) = 0; + virtual const voice_effect_list_t &getVoiceEffectList() const = 0; + virtual const voice_effect_list_t &getVoiceEffectTemplateList() const = 0; + //@} + + ////////////////////////////// + /// @name Status notification + //@{ + virtual void addObserver(LLVoiceEffectObserver* observer) = 0; + virtual void removeObserver(LLVoiceEffectObserver* observer) = 0; + //@} + + ////////////////////////////// + /// @name Preview buffer + //@{ + virtual void enablePreviewBuffer(bool enable) = 0; + virtual void recordPreviewBuffer() = 0; + virtual void playPreviewBuffer(const LLUUID& effect_id = LLUUID::null) = 0; + virtual void stopPreviewBuffer() = 0; + + virtual bool isPreviewRecording() = 0; + virtual bool isPreviewPlaying() = 0; + //@} +}; + + class LLVoiceClient: public LLSingleton<LLVoiceClient> { LOG_CLASS(LLVoiceClient); @@ -281,7 +337,7 @@ public: void updateSettings(); // call after loading settings and whenever they change - bool isVoiceWorking(); // connected to a voice server and voice channel + bool isVoiceWorking() const; // connected to a voice server and voice channel // tuning void tuningStart(); @@ -403,10 +459,23 @@ public: void removeObserver(LLVoiceClientParticipantObserver* observer); std::string sipURIFromID(const LLUUID &id); - + + ////////////////////////// + /// @name Voice effects + //@{ + bool getVoiceEffectEnabled() const { return mVoiceEffectEnabled; }; + LLUUID getVoiceEffectDefault() const { return LLUUID(mVoiceEffectDefault); }; + + // Returns NULL if voice effects are not supported, or not enabled. + LLVoiceEffectInterface* getVoiceEffectInterface() const; + //@} + protected: LLVoiceModuleInterface* mVoiceModule; LLPumpIO *m_servicePump; + + LLCachedControl<bool> mVoiceEffectEnabled; + LLCachedControl<std::string> mVoiceEffectDefault; }; /** diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index c6c155f0f0..96bde129ee 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -60,6 +60,7 @@ #include "llviewerparcelmgr.h" //#include "llfirstuse.h" #include "llspeakers.h" +#include "lltrans.h" #include "llviewerwindow.h" #include "llviewercamera.h" @@ -67,15 +68,11 @@ #include "llviewernetwork.h" #include "llnotificationsutil.h" +#include "stringize.h" + // for base64 decoding #include "apr_base64.h" -// for SHA1 hash -#include "apr_sha1.h" - -// for MD5 hash -#include "llmd5.h" - #define USE_SESSION_GROUPS 0 const F32 VOLUME_SCALE_VIVOX = 0.01f; @@ -100,14 +97,15 @@ const int MAX_LOGIN_RETRIES = 12; // blocked is VERY rare and it's better to sacrifice response time in this situation for the sake of stability. const int MAX_NORMAL_JOINING_SPATIAL_NUM = 50; +// How often to check for expired voice fonts in seconds +const F32 VOICE_FONT_EXPIRY_INTERVAL = 10.f; +// Time of day at which Vivox expires voice font subscriptions. +// Used to replace the time portion of received expiry timestamps. +static const std::string VOICE_FONT_EXPIRY_TIME = "T05:00:00Z"; + +// Maximum length of capture buffer recordings in seconds. +const F32 CAPTURE_BUFFER_MAX_TIME = 10.f; -static void setUUIDFromStringHash(LLUUID &uuid, const std::string &str) -{ - LLMD5 md5_uuid; - md5_uuid.update((const unsigned char*)str.data(), str.size()); - md5_uuid.finalize(); - md5_uuid.raw_digest(uuid.mData); -} static int scale_mic_volume(float volume) { @@ -325,6 +323,7 @@ LLVivoxVoiceClient::LLVivoxVoiceClient() : mBuddyListMapPopulated(false), mBlockRulesListReceived(false), mAutoAcceptRulesListReceived(false), + mCaptureDeviceDirty(false), mRenderDeviceDirty(false), mSpatialCoordsDirty(false), @@ -348,10 +347,17 @@ LLVivoxVoiceClient::LLVivoxVoiceClient() : mVoiceEnabled(false), mWriteInProgress(false), - mLipSyncEnabled(false) - + mLipSyncEnabled(false), + mVoiceFontsReceived(false), + mVoiceFontsNew(false), + mVoiceFontListDirty(false), + mCaptureBufferMode(false), + mCaptureBufferRecording(false), + mCaptureBufferRecorded(false), + mCaptureBufferPlaying(false), + mPlayRequestCount(0) { mSpeakerVolume = scale_speaker_volume(0); @@ -654,6 +660,11 @@ std::string LLVivoxVoiceClient::state2string(LLVivoxVoiceClient::state inState) CASE(stateMicTuningStart); CASE(stateMicTuningRunning); CASE(stateMicTuningStop); + CASE(stateCaptureBufferPaused); + CASE(stateCaptureBufferRecStart); + CASE(stateCaptureBufferRecording); + CASE(stateCaptureBufferPlayStart); + CASE(stateCaptureBufferPlaying); CASE(stateConnectorStart); CASE(stateConnectorStarting); CASE(stateConnectorStarted); @@ -662,6 +673,8 @@ std::string LLVivoxVoiceClient::state2string(LLVivoxVoiceClient::state inState) CASE(stateNeedsLogin); CASE(stateLoggingIn); CASE(stateLoggedIn); + CASE(stateVoiceFontsWait); + CASE(stateVoiceFontsReceived); CASE(stateCreatingSessionGroup); CASE(stateNoChannel); CASE(stateJoiningSession); @@ -775,8 +788,10 @@ void LLVivoxVoiceClient::stateMachine() // Clean up and reset everything. closeSocket(); deleteAllSessions(); - deleteAllBuddies(); - + deleteAllBuddies(); + deleteAllVoiceFonts(); + deleteVoiceFontTemplates(); + mConnectorHandle.clear(); mAccountHandle.clear(); mAccountPassword.clear(); @@ -1126,8 +1141,97 @@ void LLVivoxVoiceClient::stateMachine() } break; - - //MARK: stateConnectorStart + + //MARK: stateCaptureBufferPaused + case stateCaptureBufferPaused: + if (!mCaptureBufferMode) + { + // Leaving capture mode. + + mCaptureBufferRecording = false; + mCaptureBufferRecorded = false; + mCaptureBufferPlaying = false; + + // Return to stateNoChannel to trigger reconnection to a channel. + setState(stateNoChannel); + } + else if (mCaptureBufferRecording) + { + setState(stateCaptureBufferRecStart); + } + else if (mCaptureBufferPlaying) + { + setState(stateCaptureBufferPlayStart); + } + break; + + //MARK: stateCaptureBufferRecStart + case stateCaptureBufferRecStart: + captureBufferRecordStartSendMessage(); + + // Flag that something is recorded to allow playback. + mCaptureBufferRecorded = true; + + // Start the timer, recording will be stopped when it expires. + mCaptureTimer.start(); + mCaptureTimer.setTimerExpirySec(CAPTURE_BUFFER_MAX_TIME); + + // Update UI, should really use a separate callback. + notifyVoiceFontObservers(); + + setState(stateCaptureBufferRecording); + break; + + //MARK: stateCaptureBufferRecording + case stateCaptureBufferRecording: + if (!mCaptureBufferMode || !mCaptureBufferRecording || + mCaptureBufferPlaying || mCaptureTimer.hasExpired()) + { + // Stop recording + captureBufferRecordStopSendMessage(); + mCaptureBufferRecording = false; + + // Update UI, should really use a separate callback. + notifyVoiceFontObservers(); + + setState(stateCaptureBufferPaused); + } + break; + + //MARK: stateCaptureBufferPlayStart + case stateCaptureBufferPlayStart: + captureBufferPlayStartSendMessage(mPreviewVoiceFont); + + // Store the voice font being previewed, so that we know to restart if it changes. + mPreviewVoiceFontLast = mPreviewVoiceFont; + + // Update UI, should really use a separate callback. + notifyVoiceFontObservers(); + + setState(stateCaptureBufferPlaying); + break; + + //MARK: stateCaptureBufferPlaying + case stateCaptureBufferPlaying: + if (mCaptureBufferPlaying && mPreviewVoiceFont != mPreviewVoiceFontLast) + { + // If the preview voice font changes, restart playing with the new font. + setState(stateCaptureBufferPlayStart); + } + else if (!mCaptureBufferMode || !mCaptureBufferPlaying || mCaptureBufferRecording) + { + // Stop playing. + captureBufferPlayStopSendMessage(); + mCaptureBufferPlaying = false; + + // Update UI, should really use a separate callback. + notifyVoiceFontObservers(); + + setState(stateCaptureBufferPaused); + } + break; + + //MARK: stateConnectorStart case stateConnectorStart: if(!mVoiceEnabled) { @@ -1222,6 +1326,18 @@ void LLVivoxVoiceClient::stateMachine() notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_LOGGED_IN); + if (LLVoiceClient::instance().getVoiceEffectEnabled()) + { + // Request the set of available voice fonts. + setState(stateVoiceFontsWait); + refreshVoiceEffectLists(true); + } + else + { + // If voice effects are disabled, pretend we've received them and carry on. + setState(stateVoiceFontsReceived); + } + // request the current set of block rules (we'll need them when updating the friends list) accountListBlockRulesSendMessage(); @@ -1253,12 +1369,25 @@ void LLVivoxVoiceClient::stateMachine() writeString(stream.str()); } } + break; + + //MARK: stateVoiceFontsWait + case stateVoiceFontsWait: // Await voice font list + // accountGetSessionFontsResponse() will transition from here to + // stateVoiceFontsReceived, to ensure we have the voice font list + // before attempting to create a session. + break; + //MARK: stateVoiceFontsReceived + case stateVoiceFontsReceived: // Voice font list received + // Set up the timer to check for expiring voice fonts + mVoiceFontExpiryTimer.start(); + mVoiceFontExpiryTimer.setTimerExpirySec(VOICE_FONT_EXPIRY_INTERVAL); + #if USE_SESSION_GROUPS // create the main session group - sessionGroupCreateSendMessage(); - setState(stateCreatingSessionGroup); + sessionGroupCreateSendMessage(); #else // Not using session groups -- skip the stateCreatingSessionGroup state. setState(stateNoChannel); @@ -1306,6 +1435,10 @@ void LLVivoxVoiceClient::stateMachine() mTuningExitState = stateNoChannel; setState(stateMicTuningStart); } + else if(mCaptureBufferMode) + { + setState(stateCaptureBufferPaused); + } else if(sessionNeedsRelog(mNextAudioSession)) { requestRelog(); @@ -1316,6 +1449,7 @@ void LLVivoxVoiceClient::stateMachine() sessionState *oldSession = mAudioSession; mAudioSession = mNextAudioSession; + mAudioSessionChanged = true; if(!mAudioSession->mReconnect) { mNextAudioSession = NULL; @@ -1478,6 +1612,13 @@ void LLVivoxVoiceClient::stateMachine() enforceTether(); } + // Do notifications for expiring Voice Fonts. + if (mVoiceFontExpiryTimer.hasExpired()) + { + expireVoiceFonts(); + mVoiceFontExpiryTimer.setTimerExpirySec(VOICE_FONT_EXPIRY_INTERVAL); + } + // Send an update only if the ptt or mute state has changed (which shouldn't be able to happen that often // -- the user can only click so fast) or every 10hz, whichever is sooner. // Sending for every volume update causes an excessive flood of messages whenever a volume slider is dragged. @@ -1547,6 +1688,8 @@ void LLVivoxVoiceClient::stateMachine() mAccountHandle.clear(); deleteAllSessions(); deleteAllBuddies(); + deleteAllVoiceFonts(); + deleteVoiceFontTemplates(); if(mVoiceEnabled && !mRelogRequested) { @@ -1627,15 +1770,15 @@ void LLVivoxVoiceClient::stateMachine() } - if(mAudioSession && mAudioSession->mParticipantsChanged) + if (mAudioSessionChanged) { - mAudioSession->mParticipantsChanged = false; - mAudioSessionChanged = true; + mAudioSessionChanged = false; + notifyParticipantObservers(); + notifyVoiceFontObservers(); } - - if(mAudioSessionChanged) + else if (mAudioSession && mAudioSession->mParticipantsChanged) { - mAudioSessionChanged = false; + mAudioSession->mParticipantsChanged = false; notifyParticipantObservers(); } } @@ -1751,8 +1894,11 @@ void LLVivoxVoiceClient::sessionGroupCreateSendMessage() void LLVivoxVoiceClient::sessionCreateSendMessage(sessionState *session, bool startAudio, bool startText) { - LL_DEBUGS("Voice") << "requesting create: " << session->mSIPURI << LL_ENDL; - + LL_DEBUGS("Voice") << "Requesting create: " << session->mSIPURI << LL_ENDL; + + S32 font_index = getVoiceFontIndex(session->mVoiceFontID); + LL_DEBUGS("Voice") << "With voice font: " << session->mVoiceFontID << " (" << font_index << ")" << LL_ENDL; + session->mCreateInProgress = true; if(startAudio) { @@ -1776,10 +1922,11 @@ void LLVivoxVoiceClient::sessionCreateSendMessage(sessionState *session, bool st << "<Password>" << LLURI::escape(session->mHash, allowed_chars) << "</Password>" << "<PasswordHashAlgorithm>SHA1UserName</PasswordHashAlgorithm>"; } - + stream << "<ConnectAudio>" << (startAudio?"true":"false") << "</ConnectAudio>" << "<ConnectText>" << (startText?"true":"false") << "</ConnectText>" + << "<VoiceFontID>" << font_index << "</VoiceFontID>" << "<Name>" << mChannelName << "</Name>" << "</Request>\n\n\n"; writeString(stream.str()); @@ -1787,8 +1934,11 @@ void LLVivoxVoiceClient::sessionCreateSendMessage(sessionState *session, bool st void LLVivoxVoiceClient::sessionGroupAddSessionSendMessage(sessionState *session, bool startAudio, bool startText) { - LL_DEBUGS("Voice") << "requesting create: " << session->mSIPURI << LL_ENDL; - + LL_DEBUGS("Voice") << "Requesting create: " << session->mSIPURI << LL_ENDL; + + S32 font_index = getVoiceFontIndex(session->mVoiceFontID); + LL_DEBUGS("Voice") << "With voice font: " << session->mVoiceFontID << " (" << font_index << ")" << LL_ENDL; + session->mCreateInProgress = true; if(startAudio) { @@ -1814,6 +1964,7 @@ void LLVivoxVoiceClient::sessionGroupAddSessionSendMessage(sessionState *session << "<Name>" << mChannelName << "</Name>" << "<ConnectAudio>" << (startAudio?"true":"false") << "</ConnectAudio>" << "<ConnectText>" << (startText?"true":"false") << "</ConnectText>" + << "<VoiceFontID>" << font_index << "</VoiceFontID>" << "<Password>" << password << "</Password>" << "<PasswordHashAlgorithm>SHA1UserName</PasswordHashAlgorithm>" << "</Request>\n\n\n" @@ -1824,7 +1975,10 @@ void LLVivoxVoiceClient::sessionGroupAddSessionSendMessage(sessionState *session void LLVivoxVoiceClient::sessionMediaConnectSendMessage(sessionState *session) { - LL_DEBUGS("Voice") << "connecting audio to session handle: " << session->mHandle << LL_ENDL; + LL_DEBUGS("Voice") << "Connecting audio to session handle: " << session->mHandle << LL_ENDL; + + S32 font_index = getVoiceFontIndex(session->mVoiceFontID); + LL_DEBUGS("Voice") << "With voice font: " << session->mVoiceFontID << " (" << font_index << ")" << LL_ENDL; session->mMediaConnectInProgress = true; @@ -1834,6 +1988,7 @@ void LLVivoxVoiceClient::sessionMediaConnectSendMessage(sessionState *session) << "<Request requestId=\"" << session->mHandle << "\" action=\"Session.MediaConnect.1\">" << "<SessionGroupHandle>" << session->mGroupHandle << "</SessionGroupHandle>" << "<SessionHandle>" << session->mHandle << "</SessionHandle>" + << "<VoiceFontID>" << font_index << "</VoiceFontID>" << "<Media>Audio</Media>" << "</Request>\n\n\n"; @@ -3156,7 +3311,7 @@ void LLVivoxVoiceClient::sessionAddedEvent( else { LL_INFOS("Voice") << "Could not generate caller id from uri, using hash of uri " << session->mSIPURI << LL_ENDL; - setUUIDFromStringHash(session->mCallerID, session->mSIPURI); + session->mCallerID.generate(session->mSIPURI); session->mSynthesizedCallerID = true; // Can't look up the name in this case -- we have to extract it from the URI. @@ -3434,6 +3589,26 @@ void LLVivoxVoiceClient::accountLoginStateChangeEvent( } } +void LLVivoxVoiceClient::mediaCompletionEvent(std::string &sessionGroupHandle, std::string &mediaCompletionType) +{ + if (mediaCompletionType == "AuxBufferAudioCapture") + { + mCaptureBufferRecording = false; + } + else if (mediaCompletionType == "AuxBufferAudioRender") + { + // Ignore all but the last stop event + if (--mPlayRequestCount <= 0) + { + mCaptureBufferPlaying = false; + } + } + else + { + LL_DEBUGS("Voice") << "Unknown MediaCompletionType: " << mediaCompletionType << LL_ENDL; + } +} + void LLVivoxVoiceClient::mediaStreamUpdatedEvent( std::string &sessionHandle, std::string &sessionGroupHandle, @@ -4142,8 +4317,8 @@ LLVivoxVoiceClient::participantState *LLVivoxVoiceClient::sessionState::addParti else { // Create a UUID by hashing the URI, but do NOT set mAvatarIDValid. - // This tells code in LLVivoxVoiceClient that the ID will not be in the name cache. - setUUIDFromStringHash(result->mAvatarID, uri); + // This indicates that the ID will not be in the name cache. + result->mAvatarID.generate(uri); } } @@ -4638,7 +4813,7 @@ BOOL LLVivoxVoiceClient::isOnlineSIP(const LLUUID &id) return result; } -bool LLVivoxVoiceClient::isVoiceWorking() +bool LLVivoxVoiceClient::isVoiceWorking() const { //Added stateSessionTerminated state to avoid problems with call in parcels with disabled voice (EXT-4758) // Condition with joining spatial num was added to take into account possible problems with connection to voice @@ -5659,7 +5834,12 @@ LLVivoxVoiceClient::sessionState *LLVivoxVoiceClient::addSession(const std::stri result = new sessionState(); result->mSIPURI = uri; result->mHandle = handle; - + + if (LLVoiceClient::instance().getVoiceEffectEnabled()) + { + result->mVoiceFontID = LLVoiceClient::instance().getVoiceEffectDefault(); + } + mSessions.insert(result); if(!result->mHandle.empty()) @@ -6084,8 +6264,8 @@ void LLVivoxVoiceClient::notifyParticipantObservers() ) { LLVoiceClientParticipantObserver* observer = *it; - observer->onChange(); - // In case onChange() deleted an entry. + observer->onParticipantsChanged(); + // In case onParticipantsChanged() deleted an entry. it = mParticipantObservers.upper_bound(observer); } } @@ -6248,6 +6428,660 @@ void LLVivoxVoiceClient::avatarNameResolved(const LLUUID &id, const std::string } } +bool LLVivoxVoiceClient::setVoiceEffect(const LLUUID& id) +{ + if (!mAudioSession) + { + return false; + } + + if (!id.isNull()) + { + if (mVoiceFontMap.empty()) + { + LL_DEBUGS("Voice") << "Voice fonts not available." << LL_ENDL; + return false; + } + else if (mVoiceFontMap.find(id) == mVoiceFontMap.end()) + { + LL_DEBUGS("Voice") << "Invalid voice font " << id << LL_ENDL; + return false; + } + } + + // *TODO: Check for expired fonts? + mAudioSession->mVoiceFontID = id; + + // *TODO: Separate voice font defaults for spatial chat and IM? + gSavedPerAccountSettings.setString("VoiceEffectDefault", id.asString()); + + sessionSetVoiceFontSendMessage(mAudioSession); + notifyVoiceFontObservers(); + + return true; +} + +const LLUUID LLVivoxVoiceClient::getVoiceEffect() +{ + return mAudioSession ? mAudioSession->mVoiceFontID : LLUUID::null; +} + +LLSD LLVivoxVoiceClient::getVoiceEffectProperties(const LLUUID& id) +{ + LLSD sd; + + voice_font_map_t::iterator iter = mVoiceFontMap.find(id); + if (iter != mVoiceFontMap.end()) + { + sd["template_only"] = false; + } + else + { + // Voice effect is not in the voice font map, see if there is a template + iter = mVoiceFontTemplateMap.find(id); + if (iter == mVoiceFontTemplateMap.end()) + { + LL_WARNS("Voice") << "Voice effect " << id << "not found." << LL_ENDL; + return sd; + } + sd["template_only"] = true; + } + + voiceFontEntry *font = iter->second; + sd["name"] = font->mName; + sd["expiry_date"] = font->mExpirationDate; + sd["is_new"] = font->mIsNew; + + return sd; +} + +LLVivoxVoiceClient::voiceFontEntry::voiceFontEntry(LLUUID& id) : + mID(id), + mFontIndex(0), + mFontType(VOICE_FONT_TYPE_NONE), + mFontStatus(VOICE_FONT_STATUS_NONE), + mIsNew(false) +{ + mExpiryTimer.stop(); + mExpiryWarningTimer.stop(); +} + +LLVivoxVoiceClient::voiceFontEntry::~voiceFontEntry() +{ +} + +void LLVivoxVoiceClient::refreshVoiceEffectLists(bool clear_lists) +{ + if (clear_lists) + { + mVoiceFontsReceived = false; + deleteAllVoiceFonts(); + deleteVoiceFontTemplates(); + } + + accountGetSessionFontsSendMessage(); + accountGetTemplateFontsSendMessage(); +} + +const voice_effect_list_t& LLVivoxVoiceClient::getVoiceEffectList() const +{ + return mVoiceFontList; +} + +const voice_effect_list_t& LLVivoxVoiceClient::getVoiceEffectTemplateList() const +{ + return mVoiceFontTemplateList; +} + +void LLVivoxVoiceClient::addVoiceFont(const S32 font_index, + const std::string &name, + const std::string &description, + const LLDate &expiration_date, + bool has_expired, + const S32 font_type, + const S32 font_status, + const bool template_font) +{ + // Vivox SessionFontIDs are not guaranteed to remain the same between + // sessions or grids so use a UUID for the name. + + // If received name is not a UUID, fudge one by hashing the name and type. + LLUUID font_id; + if (LLUUID::validate(name)) + { + font_id = LLUUID(name); + } + else + { + font_id.generate(STRINGIZE(font_type << ":" << name)); + } + + voiceFontEntry *font = NULL; + + voice_font_map_t& font_map = template_font ? mVoiceFontTemplateMap : mVoiceFontMap; + voice_effect_list_t& font_list = template_font ? mVoiceFontTemplateList : mVoiceFontList; + + // Check whether we've seen this font before. + voice_font_map_t::iterator iter = font_map.find(font_id); + bool new_font = (iter == font_map.end()); + + // Override the has_expired flag if we have passed the expiration_date as a double check. + if (expiration_date.secondsSinceEpoch() < (LLDate::now().secondsSinceEpoch() + VOICE_FONT_EXPIRY_INTERVAL)) + { + has_expired = true; + } + + if (has_expired) + { + LL_DEBUGS("Voice") << "Expired " << (template_font ? "Template " : "") + << expiration_date.asString() << " " << font_id + << " (" << font_index << ") " << name << LL_ENDL; + + // Remove existing session fonts that have expired since we last saw them. + if (!new_font && !template_font) + { + deleteVoiceFont(font_id); + } + return; + } + + if (new_font) + { + // If it is a new font create a new entry. + font = new voiceFontEntry(font_id); + } + else + { + // Not a new font, update the existing entry + font = iter->second; + } + + if (font) + { + font->mFontIndex = font_index; + // Use the description for the human readable name if available, as the + // "name" may be a UUID. + font->mName = description.empty() ? name : description; + font->mFontType = font_type; + font->mFontStatus = font_status; + + // If the font is new or the expiration date has changed the expiry timers need updating. + if (!template_font && (new_font || font->mExpirationDate != expiration_date)) + { + font->mExpirationDate = expiration_date; + + // Set the expiry timer to trigger a notification when the voice font can no longer be used. + font->mExpiryTimer.start(); + font->mExpiryTimer.setExpiryAt(expiration_date.secondsSinceEpoch() - VOICE_FONT_EXPIRY_INTERVAL); + + // Set the warning timer to some interval before actual expiry. + S32 warning_time = gSavedSettings.getS32("VoiceEffectExpiryWarningTime"); + if (warning_time != 0) + { + font->mExpiryWarningTimer.start(); + F64 expiry_time = (expiration_date.secondsSinceEpoch() - (F64)warning_time); + font->mExpiryWarningTimer.setExpiryAt(expiry_time - VOICE_FONT_EXPIRY_INTERVAL); + } + else + { + // Disable the warning timer. + font->mExpiryWarningTimer.stop(); + } + + // Only flag new session fonts after the first time we have fetched the list. + if (mVoiceFontsReceived) + { + font->mIsNew = true; + mVoiceFontsNew = true; + } + } + + LL_DEBUGS("Voice") << (template_font ? "Template " : "") + << font->mExpirationDate.asString() << " " << font->mID + << " (" << font->mFontIndex << ") " << name << LL_ENDL; + + if (new_font) + { + font_map.insert(voice_font_map_t::value_type(font->mID, font)); + font_list.insert(voice_effect_list_t::value_type(font->mName, font->mID)); + } + + mVoiceFontListDirty = true; + + // Debugging stuff + + if (font_type < VOICE_FONT_TYPE_NONE || font_type >= VOICE_FONT_TYPE_UNKNOWN) + { + LL_DEBUGS("Voice") << "Unknown voice font type: " << font_type << LL_ENDL; + } + if (font_status < VOICE_FONT_STATUS_NONE || font_status >= VOICE_FONT_STATUS_UNKNOWN) + { + LL_DEBUGS("Voice") << "Unknown voice font status: " << font_status << LL_ENDL; + } + } +} + +void LLVivoxVoiceClient::expireVoiceFonts() +{ + // *TODO: If we are selling voice fonts in packs, there are probably + // going to be a number of fonts with the same expiration time, so would + // be more efficient to just keep a list of expiration times rather + // than checking each font individually. + + bool have_expired = false; + bool will_expire = false; + bool expired_in_use = false; + + LLUUID current_effect = LLVoiceClient::instance().getVoiceEffectDefault(); + + voice_font_map_t::iterator iter; + for (iter = mVoiceFontMap.begin(); iter != mVoiceFontMap.end(); ++iter) + { + voiceFontEntry* voice_font = iter->second; + LLFrameTimer& expiry_timer = voice_font->mExpiryTimer; + LLFrameTimer& warning_timer = voice_font->mExpiryWarningTimer; + + // Check for expired voice fonts + if (expiry_timer.getStarted() && expiry_timer.hasExpired()) + { + // Check whether it is the active voice font + if (voice_font->mID == current_effect) + { + // Reset to no voice effect. + setVoiceEffect(LLUUID::null); + expired_in_use = true; + } + + LL_DEBUGS("Voice") << "Voice Font " << voice_font->mName << " has expired." << LL_ENDL; + deleteVoiceFont(voice_font->mID); + have_expired = true; + } + + // Check for voice fonts that will expire in less that the warning time + if (warning_timer.getStarted() && warning_timer.hasExpired()) + { + LL_DEBUGS("Voice") << "Voice Font " << voice_font->mName << " will expire soon." << LL_ENDL; + will_expire = true; + warning_timer.stop(); + } + } + + LLSD args; + args["URL"] = LLTrans::getString("voice_morphing_url"); + + // Give a notification if any voice fonts have expired. + if (have_expired) + { + if (expired_in_use) + { + LLNotificationsUtil::add("VoiceEffectsExpiredInUse", args); + } + else + { + LLNotificationsUtil::add("VoiceEffectsExpired", args); + } + + // Refresh voice font lists in the UI. + notifyVoiceFontObservers(); + } + + // Give a warning notification if any voice fonts are due to expire. + if (will_expire) + { + S32 seconds = gSavedSettings.getS32("VoiceEffectExpiryWarningTime"); + args["INTERVAL"] = llformat("%d", seconds / SEC_PER_DAY); + + LLNotificationsUtil::add("VoiceEffectsWillExpire", args); + } +} + +void LLVivoxVoiceClient::deleteVoiceFont(const LLUUID& id) +{ + // Remove the entry from the voice font list. + voice_effect_list_t::iterator list_iter = mVoiceFontList.begin(); + while (list_iter != mVoiceFontList.end()) + { + if (list_iter->second == id) + { + LL_DEBUGS("Voice") << "Removing " << id << " from the voice font list." << LL_ENDL; + mVoiceFontList.erase(list_iter++); + mVoiceFontListDirty = true; + } + else + { + ++list_iter; + } + } + + // Find the entry in the voice font map and erase its data. + voice_font_map_t::iterator map_iter = mVoiceFontMap.find(id); + if (map_iter != mVoiceFontMap.end()) + { + delete map_iter->second; + } + + // Remove the entry from the voice font map. + mVoiceFontMap.erase(map_iter); +} + +void LLVivoxVoiceClient::deleteAllVoiceFonts() +{ + mVoiceFontList.clear(); + + voice_font_map_t::iterator iter; + for (iter = mVoiceFontMap.begin(); iter != mVoiceFontMap.end(); ++iter) + { + delete iter->second; + } + mVoiceFontMap.clear(); +} + +void LLVivoxVoiceClient::deleteVoiceFontTemplates() +{ + mVoiceFontTemplateList.clear(); + + voice_font_map_t::iterator iter; + for (iter = mVoiceFontTemplateMap.begin(); iter != mVoiceFontTemplateMap.end(); ++iter) + { + delete iter->second; + } + mVoiceFontTemplateMap.clear(); +} + +S32 LLVivoxVoiceClient::getVoiceFontIndex(const LLUUID& id) const +{ + S32 result = 0; + if (!id.isNull()) + { + voice_font_map_t::const_iterator it = mVoiceFontMap.find(id); + if (it != mVoiceFontMap.end()) + { + result = it->second->mFontIndex; + } + else + { + LL_DEBUGS("Voice") << "Selected voice font " << id << " is not available." << LL_ENDL; + } + } + return result; +} + +S32 LLVivoxVoiceClient::getVoiceFontTemplateIndex(const LLUUID& id) const +{ + S32 result = 0; + if (!id.isNull()) + { + voice_font_map_t::const_iterator it = mVoiceFontTemplateMap.find(id); + if (it != mVoiceFontTemplateMap.end()) + { + result = it->second->mFontIndex; + } + else + { + LL_DEBUGS("Voice") << "Selected voice font template " << id << " is not available." << LL_ENDL; + } + } + return result; +} + +void LLVivoxVoiceClient::accountGetSessionFontsSendMessage() +{ + if(!mAccountHandle.empty()) + { + std::ostringstream stream; + + LL_DEBUGS("Voice") << "Requesting voice font list." << LL_ENDL; + + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.GetSessionFonts.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "</Request>" + << "\n\n\n"; + + writeString(stream.str()); + } +} + +void LLVivoxVoiceClient::accountGetTemplateFontsSendMessage() +{ + if(!mAccountHandle.empty()) + { + std::ostringstream stream; + + LL_DEBUGS("Voice") << "Requesting voice font template list." << LL_ENDL; + + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Account.GetTemplateFonts.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "</Request>" + << "\n\n\n"; + + writeString(stream.str()); + } +} + +void LLVivoxVoiceClient::sessionSetVoiceFontSendMessage(sessionState *session) +{ + S32 font_index = getVoiceFontIndex(session->mVoiceFontID); + LL_DEBUGS("Voice") << "Requesting voice font: " << session->mVoiceFontID << " (" << font_index << "), session handle: " << session->mHandle << LL_ENDL; + + std::ostringstream stream; + + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Session.SetVoiceFont.1\">" + << "<SessionHandle>" << session->mHandle << "</SessionHandle>" + << "<SessionFontID>" << font_index << "</SessionFontID>" + << "</Request>\n\n\n"; + + writeString(stream.str()); +} + +void LLVivoxVoiceClient::accountGetSessionFontsResponse(int statusCode, const std::string &statusString) +{ + // Voice font list entries were updated via addVoiceFont() during parsing. + if(getState() == stateVoiceFontsWait) + { + setState(stateVoiceFontsReceived); + } + + notifyVoiceFontObservers(); + mVoiceFontsReceived = true; +} + +void LLVivoxVoiceClient::accountGetTemplateFontsResponse(int statusCode, const std::string &statusString) +{ + // Voice font list entries were updated via addVoiceFont() during parsing. + notifyVoiceFontObservers(); +} +void LLVivoxVoiceClient::addObserver(LLVoiceEffectObserver* observer) +{ + mVoiceFontObservers.insert(observer); +} + +void LLVivoxVoiceClient::removeObserver(LLVoiceEffectObserver* observer) +{ + mVoiceFontObservers.erase(observer); +} + +void LLVivoxVoiceClient::notifyVoiceFontObservers() +{ + LL_DEBUGS("Voice") << "Notifying voice effect observers. Lists changed: " << mVoiceFontListDirty << LL_ENDL; + + for (voice_font_observer_set_t::iterator it = mVoiceFontObservers.begin(); + it != mVoiceFontObservers.end(); + ) + { + LLVoiceEffectObserver* observer = *it; + observer->onVoiceEffectChanged(mVoiceFontListDirty); + // In case onVoiceEffectChanged() deleted an entry. + it = mVoiceFontObservers.upper_bound(observer); + } + mVoiceFontListDirty = false; + + // If new Voice Fonts have been added notify the user. + if (mVoiceFontsNew) + { + if(mVoiceFontsReceived) + { + LLNotificationsUtil::add("VoiceEffectsNew"); + } + mVoiceFontsNew = false; + } +} + +void LLVivoxVoiceClient::enablePreviewBuffer(bool enable) +{ + mCaptureBufferMode = enable; + if(mCaptureBufferMode && getState() >= stateNoChannel) + { + LL_DEBUGS("Voice") << "no channel" << LL_ENDL; + sessionTerminate(); + } +} + +void LLVivoxVoiceClient::recordPreviewBuffer() +{ + if (!mCaptureBufferMode) + { + LL_DEBUGS("Voice") << "Not in voice effect preview mode, cannot start recording." << LL_ENDL; + mCaptureBufferRecording = false; + return; + } + + mCaptureBufferRecording = true; +} + +void LLVivoxVoiceClient::playPreviewBuffer(const LLUUID& effect_id) +{ + if (!mCaptureBufferMode) + { + LL_DEBUGS("Voice") << "Not in voice effect preview mode, no buffer to play." << LL_ENDL; + mCaptureBufferRecording = false; + return; + } + + if (!mCaptureBufferRecorded) + { + // Can't play until we have something recorded! + mCaptureBufferPlaying = false; + return; + } + + mPreviewVoiceFont = effect_id; + mCaptureBufferPlaying = true; +} + +void LLVivoxVoiceClient::stopPreviewBuffer() +{ + mCaptureBufferRecording = false; + mCaptureBufferPlaying = false; +} + +bool LLVivoxVoiceClient::isPreviewRecording() +{ + return (mCaptureBufferMode && mCaptureBufferRecording); +} + +bool LLVivoxVoiceClient::isPreviewPlaying() +{ + return (mCaptureBufferMode && mCaptureBufferPlaying); +} + +void LLVivoxVoiceClient::captureBufferRecordStartSendMessage() +{ if(!mAccountHandle.empty()) + { + std::ostringstream stream; + + LL_DEBUGS("Voice") << "Starting audio capture to buffer." << LL_ENDL; + + // Start capture + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.StartBufferCapture.1\">" + << "</Request>" + << "\n\n\n"; + + // Unmute the mic + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Connector.MuteLocalMic.1\">" + << "<ConnectorHandle>" << mConnectorHandle << "</ConnectorHandle>" + << "<Value>false</Value>" + << "</Request>\n\n\n"; + + // Dirty the PTT state so that it will get reset when we finishing previewing + mPTTDirty = true; + + writeString(stream.str()); + } +} + +void LLVivoxVoiceClient::captureBufferRecordStopSendMessage() +{ + if(!mAccountHandle.empty()) + { + std::ostringstream stream; + + LL_DEBUGS("Voice") << "Stopping audio capture to buffer." << LL_ENDL; + + // Mute the mic. PTT state was dirtied at recording start, so will be reset when finished previewing. + stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Connector.MuteLocalMic.1\">" + << "<ConnectorHandle>" << mConnectorHandle << "</ConnectorHandle>" + << "<Value>true</Value>" + << "</Request>\n\n\n"; + + // Stop capture + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.CaptureAudioStop.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "</Request>" + << "\n\n\n"; + + writeString(stream.str()); + } +} + +void LLVivoxVoiceClient::captureBufferPlayStartSendMessage(const LLUUID& voice_font_id) +{ + if(!mAccountHandle.empty()) + { + // Track how may play requests are sent, so we know how many stop events to + // expect before play actually stops. + ++mPlayRequestCount; + + std::ostringstream stream; + + LL_DEBUGS("Voice") << "Starting audio buffer playback." << LL_ENDL; + + S32 font_index = getVoiceFontTemplateIndex(voice_font_id); + LL_DEBUGS("Voice") << "With voice font: " << voice_font_id << " (" << font_index << ")" << LL_ENDL; + + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.PlayAudioBuffer.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "<TemplateFontID>" << font_index << "</TemplateFontID>" + << "<FontDelta />" + << "</Request>" + << "\n\n\n"; + + writeString(stream.str()); + } +} + +void LLVivoxVoiceClient::captureBufferPlayStopSendMessage() +{ + if(!mAccountHandle.empty()) + { + std::ostringstream stream; + + LL_DEBUGS("Voice") << "Stopping audio buffer playback." << LL_ENDL; + + stream + << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.RenderAudioStop.1\">" + << "<AccountHandle>" << mAccountHandle << "</AccountHandle>" + << "</Request>" + << "\n\n\n"; + + writeString(stream.str()); + } +} LLVivoxProtocolParser::LLVivoxProtocolParser() { @@ -6466,7 +7300,30 @@ void LLVivoxProtocolParser::StartTag(const char *tag, const char **attr) { LLVivoxVoiceClient::getInstance()->deleteAllAutoAcceptRules(); } - + else if (!stricmp("SessionFont", tag)) + { + id = 0; + nameString.clear(); + descriptionString.clear(); + expirationDate = LLDate(); + hasExpired = false; + fontType = 0; + fontStatus = 0; + } + else if (!stricmp("TemplateFont", tag)) + { + id = 0; + nameString.clear(); + descriptionString.clear(); + expirationDate = LLDate(); + hasExpired = false; + fontType = 0; + fontStatus = 0; + } + else if (!stricmp("MediaCompletionType", tag)) + { + mediaCompletionType.clear(); + } } } responseDepth++; @@ -6612,8 +7469,43 @@ void LLVivoxProtocolParser::EndTag(const char *tag) subscriptionHandle = string; else if (!stricmp("SubscriptionType", tag)) subscriptionType = string; - - + else if (!stricmp("SessionFont", tag)) + { + LLVivoxVoiceClient::getInstance()->addVoiceFont(id, nameString, descriptionString, expirationDate, hasExpired, fontType, fontStatus, false); + } + else if (!stricmp("TemplateFont", tag)) + { + LLVivoxVoiceClient::getInstance()->addVoiceFont(id, nameString, descriptionString, expirationDate, hasExpired, fontType, fontStatus, true); + } + else if (!stricmp("ID", tag)) + { + id = strtol(string.c_str(), NULL, 10); + } + else if (!stricmp("Description", tag)) + { + descriptionString = string; + } + else if (!stricmp("ExpirationDate", tag)) + { + expirationDate = expiryTimeStampToLLDate(string); + } + else if (!stricmp("Expired", tag)) + { + hasExpired = !stricmp(string.c_str(), "1"); + } + else if (!stricmp("Type", tag)) + { + fontType = strtol(string.c_str(), NULL, 10); + } + else if (!stricmp("Status", tag)) + { + fontStatus = strtol(string.c_str(), NULL, 10); + } + else if (!stricmp("MediaCompletionType", tag)) + { + mediaCompletionType = string;; + } + textBuffer.clear(); accumulateText= false; @@ -6642,6 +7534,21 @@ void LLVivoxProtocolParser::CharData(const char *buffer, int length) // -------------------------------------------------------------------------------- +LLDate LLVivoxProtocolParser::expiryTimeStampToLLDate(const std::string& vivox_ts) +{ + // *HACK: Vivox reports the time incorrectly. LLDate also only parses a + // subset of valid ISO 8601 dates (only handles Z, not offsets). + // So just use the date portion and fix the time here. + std::string time_stamp = vivox_ts.substr(0, 10); + time_stamp += VOICE_FONT_EXPIRY_TIME; + + LL_DEBUGS("VivoxProtocolParser") << "Vivox timestamp " << vivox_ts << " modified to: " << time_stamp << LL_ENDL; + + return LLDate(time_stamp); +} + +// -------------------------------------------------------------------------------- + void LLVivoxProtocolParser::processResponse(std::string tag) { LL_DEBUGS("VivoxProtocolParser") << tag << LL_ENDL; @@ -6695,7 +7602,17 @@ void LLVivoxProtocolParser::processResponse(std::string tag) </Event> */ LLVivoxVoiceClient::getInstance()->mediaStreamUpdatedEvent(sessionHandle, sessionGroupHandle, statusCode, statusString, state, incoming); - } + } + else if (!stricmp(eventTypeCstr, "MediaCompletionEvent")) + { + /* + <Event type="MediaCompletionEvent"> + <SessionGroupHandle /> + <MediaCompletionType>AuxBufferAudioCapture</MediaCompletionType> + </Event> + */ + LLVivoxVoiceClient::getInstance()->mediaCompletionEvent(sessionGroupHandle, mediaCompletionType); + } else if (!stricmp(eventTypeCstr, "TextStreamUpdatedEvent")) { /* @@ -6756,6 +7673,9 @@ void LLVivoxProtocolParser::processResponse(std::string tag) } else if (!stricmp(eventTypeCstr, "AuxAudioPropertiesEvent")) { + // These are really spammy in tuning mode + squelchDebugOutput = true; + LLVivoxVoiceClient::getInstance()->auxAudioPropertiesEvent(energy); } else if (!stricmp(eventTypeCstr, "BuddyPresenceEvent")) @@ -6870,6 +7790,14 @@ void LLVivoxProtocolParser::processResponse(std::string tag) // We don't need to process these, but they're so spammy we don't want to log them. squelchDebugOutput = true; } + else if (!stricmp(actionCstr, "Account.GetSessionFonts.1")) + { + LLVivoxVoiceClient::getInstance()->accountGetSessionFontsResponse(statusCode, statusString); + } + else if (!stricmp(actionCstr, "Account.GetTemplateFonts.1")) + { + LLVivoxVoiceClient::getInstance()->accountGetTemplateFontsResponse(statusCode, statusString); + } /* else if (!stricmp(actionCstr, "Account.ChannelGetList.1")) { diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h index 59fec8b954..f858f8f74e 100644 --- a/indra/newview/llvoicevivox.h +++ b/indra/newview/llvoicevivox.h @@ -57,15 +57,9 @@ class LLVivoxVoiceClientMuteListObserver; class LLVivoxVoiceClientFriendsObserver; -class LLVivoxVoiceClientParticipantObserver -{ -public: - virtual ~LLVivoxVoiceClientParticipantObserver() { } - virtual void onChange() = 0; -}; - - -class LLVivoxVoiceClient: public LLSingleton<LLVivoxVoiceClient>, virtual public LLVoiceModuleInterface +class LLVivoxVoiceClient : public LLSingleton<LLVivoxVoiceClient>, + virtual public LLVoiceModuleInterface, + virtual public LLVoiceEffectInterface { LOG_CLASS(LLVivoxVoiceClient); public: @@ -84,7 +78,7 @@ public: virtual void updateSettings(); // call after loading settings and whenever they change // Returns true if vivox has successfully logged in and is not in error state - virtual bool isVoiceWorking(); + virtual bool isVoiceWorking() const; ///////////////////// /// @name Tuning @@ -232,15 +226,49 @@ public: virtual void removeObserver(LLFriendObserver* observer); virtual void addObserver(LLVoiceClientParticipantObserver* observer); virtual void removeObserver(LLVoiceClientParticipantObserver* observer); - - - //@} virtual std::string sipURIFromID(const LLUUID &id); //@} - + /// @name LLVoiceEffectInterface virtual implementations + /// @see LLVoiceEffectInterface + //@{ + + ////////////////////////// + /// @name Accessors + //@{ + virtual bool setVoiceEffect(const LLUUID& id); + virtual const LLUUID getVoiceEffect(); + virtual LLSD getVoiceEffectProperties(const LLUUID& id); + + virtual void refreshVoiceEffectLists(bool clear_lists); + virtual const voice_effect_list_t& getVoiceEffectList() const; + virtual const voice_effect_list_t& getVoiceEffectTemplateList() const; + //@} + + ////////////////////////////// + /// @name Status notification + //@{ + virtual void addObserver(LLVoiceEffectObserver* observer); + virtual void removeObserver(LLVoiceEffectObserver* observer); + //@} + + ////////////////////////////// + /// @name Effect preview buffer + //@{ + virtual void enablePreviewBuffer(bool enable); + virtual void recordPreviewBuffer(); + virtual void playPreviewBuffer(const LLUUID& effect_id = LLUUID::null); + virtual void stopPreviewBuffer(); + + virtual bool isPreviewRecording(); + virtual bool isPreviewPlaying(); + //@} + + //@} + + protected: ////////////////////// // Vivox Specific definitions @@ -278,14 +306,13 @@ protected: bool mIsSpeaking; bool mIsModeratorMuted; bool mOnMuteList; // true if this avatar is on the user's mute list (and should be muted) - bool mVolumeSet; // true if incoming volume messages should not change the volume + bool mVolumeSet; // true if incoming volume messages should not change the volume bool mVolumeDirty; // true if this participant needs a volume command sent (either mOnMuteList or mUserVolume has changed) bool mAvatarIDValid; bool mIsSelf; }; typedef std::map<const std::string, participantState*> participantMap; - typedef std::map<const LLUUID, participantState*> participantUUIDMap; struct sessionState @@ -332,14 +359,17 @@ protected: bool mIncoming; bool mVoiceEnabled; bool mReconnect; // Whether we should try to reconnect to this session if it's dropped - // Set to true when the mute state of someone in the participant list changes. + + // Set to true when the volume/mute state of someone in the participant list changes. // The code will have to walk the list to find the changed participant(s). bool mVolumeDirty; - bool mMuteDirty; - + bool mMuteDirty; + bool mParticipantsChanged; participantMap mParticipantsByURI; participantUUIDMap mParticipantsByUUID; + + LLUUID mVoiceFontID; }; // internal state for a simple state machine. This is used to deal with the asynchronous nature of some of the messages. @@ -356,6 +386,11 @@ protected: stateMicTuningStart, stateMicTuningRunning, stateMicTuningStop, + stateCaptureBufferPaused, + stateCaptureBufferRecStart, + stateCaptureBufferRecording, + stateCaptureBufferPlayStart, + stateCaptureBufferPlaying, stateConnectorStart, // connector needs to be started stateConnectorStarting, // waiting for connector handle stateConnectorStarted, // connector handle received @@ -364,6 +399,8 @@ protected: stateNeedsLogin, // send login request stateLoggingIn, // waiting for account handle stateLoggedIn, // account handle received + stateVoiceFontsWait, // Awaiting the list of voice fonts + stateVoiceFontsReceived, // List of voice fonts received stateCreatingSessionGroup, // Creating the main session group stateNoChannel, // stateJoiningSession, // waiting for session handle @@ -436,8 +473,6 @@ protected: void tuningCaptureStartSendMessage(int duration); void tuningCaptureStopSendMessage(); - bool inTuningStates(); - //---------------------------------- // devices void clearCaptureDevices(); @@ -464,6 +499,7 @@ protected: void connectorShutdownResponse(int statusCode, std::string &statusString); void accountLoginStateChangeEvent(std::string &accountHandle, int statusCode, std::string &statusString, int state); + void mediaCompletionEvent(std::string &sessionGroupHandle, std::string &mediaCompletionType); void mediaStreamUpdatedEvent(std::string &sessionHandle, std::string &sessionGroupHandle, int statusCode, std::string &statusString, int state, bool incoming); void textStreamUpdatedEvent(std::string &sessionHandle, std::string &sessionGroupHandle, bool enabled, int state, bool incoming); void sessionAddedEvent(std::string &uriString, std::string &alias, std::string &sessionHandle, std::string &sessionGroupHandle, bool isChannel, bool incoming, std::string &nameString, std::string &applicationString); @@ -591,8 +627,8 @@ protected: void deleteAllAutoAcceptRules(void); void addAutoAcceptRule(const std::string &autoAcceptMask, const std::string &autoAddAsBuddy); void accountListBlockRulesResponse(int statusCode, const std::string &statusString); - void accountListAutoAcceptRulesResponse(int statusCode, const std::string &statusString); - + void accountListAutoAcceptRulesResponse(int statusCode, const std::string &statusString); + ///////////////////////////// // session control messages @@ -621,7 +657,21 @@ protected: void lookupName(const LLUUID &id); static void onAvatarNameLookup(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group); void avatarNameResolved(const LLUUID &id, const std::string &name); - + + ///////////////////////////// + // Voice fonts + + void addVoiceFont(const S32 id, + const std::string &name, + const std::string &description, + const LLDate &expiration_date, + bool has_expired, + const S32 font_type, + const S32 font_status, + const bool template_font = false); + void accountGetSessionFontsResponse(int statusCode, const std::string &statusString); + void accountGetTemplateFontsResponse(int statusCode, const std::string &statusString); + private: LLVoiceVersionInfo mVoiceVersion; @@ -804,6 +854,88 @@ private: typedef std::set<LLFriendObserver*> friend_observer_set_t; friend_observer_set_t mFriendObservers; void notifyFriendObservers(); + + // Voice Fonts + + void expireVoiceFonts(); + void deleteVoiceFont(const LLUUID& id); + void deleteAllVoiceFonts(); + void deleteVoiceFontTemplates(); + + S32 getVoiceFontIndex(const LLUUID& id) const; + S32 getVoiceFontTemplateIndex(const LLUUID& id) const; + + void accountGetSessionFontsSendMessage(); + void accountGetTemplateFontsSendMessage(); + void sessionSetVoiceFontSendMessage(sessionState *session); + + void notifyVoiceFontObservers(); + + typedef enum e_voice_font_type + { + VOICE_FONT_TYPE_NONE = 0, + VOICE_FONT_TYPE_ROOT = 1, + VOICE_FONT_TYPE_USER = 2, + VOICE_FONT_TYPE_UNKNOWN + } EVoiceFontType; + + typedef enum e_voice_font_status + { + VOICE_FONT_STATUS_NONE = 0, + VOICE_FONT_STATUS_FREE = 1, + VOICE_FONT_STATUS_NOT_FREE = 2, + VOICE_FONT_STATUS_UNKNOWN + } EVoiceFontStatus; + + struct voiceFontEntry + { + voiceFontEntry(LLUUID& id); + ~voiceFontEntry(); + + LLUUID mID; + S32 mFontIndex; + std::string mName; + LLDate mExpirationDate; + S32 mFontType; + S32 mFontStatus; + bool mIsNew; + + LLFrameTimer mExpiryTimer; + LLFrameTimer mExpiryWarningTimer; + }; + + bool mVoiceFontsReceived; + bool mVoiceFontsNew; + bool mVoiceFontListDirty; + voice_effect_list_t mVoiceFontList; + voice_effect_list_t mVoiceFontTemplateList; + + typedef std::map<const LLUUID, voiceFontEntry*> voice_font_map_t; + voice_font_map_t mVoiceFontMap; + voice_font_map_t mVoiceFontTemplateMap; + + typedef std::set<LLVoiceEffectObserver*> voice_font_observer_set_t; + voice_font_observer_set_t mVoiceFontObservers; + + LLFrameTimer mVoiceFontExpiryTimer; + + + // Audio capture buffer + + void captureBufferRecordStartSendMessage(); + void captureBufferRecordStopSendMessage(); + void captureBufferPlayStartSendMessage(const LLUUID& voice_font_id = LLUUID::null); + void captureBufferPlayStopSendMessage(); + + bool mCaptureBufferMode; // Disconnected from voice channels while using the capture buffer. + bool mCaptureBufferRecording; // A voice sample is being captured. + bool mCaptureBufferRecorded; // A voice sample is captured in the buffer ready to play. + bool mCaptureBufferPlaying; // A voice sample is being played. + + LLTimer mCaptureTimer; + LLUUID mPreviewVoiceFont; + LLUUID mPreviewVoiceFontLast; + S32 mPlayRequestCount; }; /** @@ -890,7 +1022,13 @@ protected: int numberOfAliases; std::string subscriptionHandle; std::string subscriptionType; - + S32 id; + std::string descriptionString; + LLDate expirationDate; + bool hasExpired; + S32 fontType; + S32 fontStatus; + std::string mediaCompletionType; // Members for processing text between tags std::string textBuffer; @@ -907,11 +1045,9 @@ protected: void StartTag(const char *tag, const char **attr); void EndTag(const char *tag); void CharData(const char *buffer, int length); - + LLDate expiryTimeStampToLLDate(const std::string& vivox_ts); }; #endif //LL_VIVOX_VOICE_CLIENT_H - - diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index 9e9b46473e..121e691710 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -656,7 +656,7 @@ void LLWearable::writeToAvatar() image_id = LLVOAvatarDictionary::getDefaultTextureImageID((ETextureIndex) te); } LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture( image_id, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE ); - // MULTI-WEARABLE: replace hard-coded 0 + // MULTI-WEARABLE: assume index 0 will be used when writing to avatar. TODO: eliminate the need for this. gAgentAvatarp->setLocalTextureTE(te, image, 0); } } diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index c35b45d446..6c410cf7a5 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -42,6 +42,7 @@ #include "llmenugl.h" // for LLContextMenu #include "lltransutil.h" #include "llviewerattachmenu.h" +#include "llvoavatarself.h" class LLFindOutfitItems : public LLInventoryCollectFunctor { @@ -88,6 +89,8 @@ void LLPanelWearableListItem::onMouseLeave(S32 x, S32 y, MASK mask) LLPanelWearableListItem::LLPanelWearableListItem(LLViewerInventoryItem* item) : LLPanelInventoryListItemBase(item) { + // icons should not be shown for this type of items (EXT-7511) + mForceNoLinksOnIcons = true; } ////////////////////////////////////////////////////////////////////////// @@ -168,7 +171,7 @@ BOOL LLPanelClothingListItem::postBuild() addWidgetToRightSide("btn_move_up"); addWidgetToRightSide("btn_move_down"); addWidgetToRightSide("btn_lock"); - addWidgetToRightSide("btn_edit"); + addWidgetToRightSide("btn_edit_panel"); setWidgetsVisible(false); reshapeWidgets(); @@ -211,7 +214,7 @@ BOOL LLPanelBodyPartsListItem::postBuild() LLPanelInventoryListItemBase::postBuild(); addWidgetToRightSide("btn_lock"); - addWidgetToRightSide("btn_edit"); + addWidgetToRightSide("btn_edit_panel"); return TRUE; } @@ -256,6 +259,31 @@ BOOL LLPanelDeletableWearableListItem::postBuild() } +// static +LLPanelAttachmentListItem* LLPanelAttachmentListItem::create(LLViewerInventoryItem* item) +{ + LLPanelAttachmentListItem* list_item = NULL; + if(item) + { + list_item = new LLPanelAttachmentListItem(item); + list_item->init(); + } + return list_item; +} + +void LLPanelAttachmentListItem::setTitle(const std::string& title, const std::string& highlit_text) +{ + std::string title_joint = title; + + if (mItem && isAgentAvatarValid() && gAgentAvatarp->isWearingAttachment(mItem->getLinkedUUID())) + { + std::string joint = LLTrans::getString(gAgentAvatarp->getAttachedPointName(mItem->getLinkedUUID())); + title_joint = title + " (" + joint + ")"; + } + + LLPanelDeletableWearableListItem::setTitle(title_joint, highlit_text); +} + ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// @@ -506,11 +534,13 @@ LLContextMenu* LLWearableItemsList::ContextMenu::createMenu() const uuid_vec_t& ids = mUUIDs; // selected items IDs LLUUID selected_id = ids.front(); // ID of the first selected item - functor_t wear = boost::bind(&LLAppearanceMgr::wearItemOnAvatar, LLAppearanceMgr::getInstance(), _1, true, false); + functor_t wear = boost::bind(&LLAppearanceMgr::wearItemOnAvatar, LLAppearanceMgr::getInstance(), _1, true, true); + functor_t add = boost::bind(&LLAppearanceMgr::wearItemOnAvatar, LLAppearanceMgr::getInstance(), _1, true, false); functor_t take_off = boost::bind(&LLAppearanceMgr::removeItemFromAvatar, LLAppearanceMgr::getInstance(), _1); // Register handlers common for all wearable types. registrar.add("Wearable.Wear", boost::bind(handleMultiple, wear, ids)); + registrar.add("Wearable.Add", boost::bind(handleMultiple, add, ids)); registrar.add("Wearable.Edit", boost::bind(handleMultiple, LLAgentWearables::editWearable, ids)); registrar.add("Wearable.CreateNew", boost::bind(createNewWearable, selected_id)); registrar.add("Wearable.ShowOriginal", boost::bind(show_item_original, selected_id)); diff --git a/indra/newview/llwearableitemslist.h b/indra/newview/llwearableitemslist.h index 0ed480a92a..f03336186c 100644 --- a/indra/newview/llwearableitemslist.h +++ b/indra/newview/llwearableitemslist.h @@ -116,6 +116,21 @@ protected: /*virtual*/ void init(); }; +/** Outfit list item for an attachment */ +class LLPanelAttachmentListItem : public LLPanelDeletableWearableListItem +{ + LOG_CLASS(LLPanelAttachmentListItem); +public: + static LLPanelAttachmentListItem* create(LLViewerInventoryItem* item); + virtual ~LLPanelAttachmentListItem() {}; + + /** Set item title. Joint name is added to the title in parenthesis */ + /*virtual*/ void setTitle(const std::string& title, const std::string& highlit_text); + +protected: + LLPanelAttachmentListItem(LLViewerInventoryItem* item) : LLPanelDeletableWearableListItem(item) {}; +}; + /** * @class LLPanelClothingListItem * @@ -139,7 +154,7 @@ public: inline void setShowMoveDownButton(bool show) { setShowWidget("btn_move_down", show); } inline void setShowLockButton(bool show) { setShowWidget("btn_lock", show); } - inline void setShowEditButton(bool show) { setShowWidget("btn_edit", show); } + inline void setShowEditButton(bool show) { setShowWidget("btn_edit_panel", show); } protected: @@ -164,7 +179,7 @@ public: * Make button visible during mouse over event. */ inline void setShowLockButton(bool show) { setShowWidget("btn_lock", show); } - inline void setShowEditButton(bool show) { setShowWidget("btn_edit", show); } + inline void setShowEditButton(bool show) { setShowWidget("btn_edit_panel", show); } protected: LLPanelBodyPartsListItem(LLViewerInventoryItem* item); diff --git a/indra/newview/skins/default/textures/avatar_thumb_bkgrnd.png b/indra/newview/skins/default/textures/avatar_thumb_bkgrnd.png Binary files differnew file mode 100644 index 0000000000..84cc2159c1 --- /dev/null +++ b/indra/newview/skins/default/textures/avatar_thumb_bkgrnd.png diff --git a/indra/newview/skins/default/textures/map_infohub.tga b/indra/newview/skins/default/textures/map_infohub.tga Binary files differindex 545b8e532c..d0134fa5fe 100644 --- a/indra/newview/skins/default/textures/map_infohub.tga +++ b/indra/newview/skins/default/textures/map_infohub.tga diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 93c805f724..85ccf0f564 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -567,6 +567,8 @@ with the same filename but different name <texture name="VoicePTT_Off" file_name="bottomtray/VoicePTT_Off.png" preload="false" /> <texture name="VoicePTT_On" file_name="bottomtray/VoicePTT_On.png" preload="false" /> + <texture name="Wearables_Divider" file_name="windows/Wearables_Divider.png" preload="false" /> + <texture name="WellButton_Lit" file_name="bottomtray/WellButton_Lit.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> <texture name="WellButton_Lit_Selected" file_name="bottomtray/WellButton_Lit_Selected.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> @@ -667,7 +669,7 @@ with the same filename but different name <texture name="Progress_11" file_name="icons/Progress_11.png" preload="true" /> <texture name="Progress_12" file_name="icons/Progress_12.png" preload="true" /> - <texture name="bevel_background" file_name="widgets/bevel_background.png" preload="true" scale.left="12" scale.top="15" scale.right="120" scale.bottom="2"/> + <texture name="bevel_background" file_name="widgets/bevel_background.png" preload="true" scale.left="12" scale.top="15" scale.right="108" scale.bottom="2"/> <texture name="buy_off" file_name="widgets/buy_off.png" preload="true" scale.left="2" scale.top="15" scale.right="67" scale.bottom="4"/> <texture name="buy_over" file_name="widgets/buy_over.png" preload="true" scale.left="2" scale.top="15" scale.right="67" scale.bottom="4"/> <texture name="buy_press" file_name="widgets/buy_press.png" preload="true" scale.left="2" scale.top="15" scale.right="67" scale.bottom="4"/> diff --git a/indra/newview/skins/default/textures/widgets/buy_off.png b/indra/newview/skins/default/textures/widgets/buy_off.png Binary files differindex 961ad071d4..ee5979046f 100644 --- a/indra/newview/skins/default/textures/widgets/buy_off.png +++ b/indra/newview/skins/default/textures/widgets/buy_off.png diff --git a/indra/newview/skins/default/textures/widgets/buy_over.png b/indra/newview/skins/default/textures/widgets/buy_over.png Binary files differindex 0be19f8a31..93adb68c86 100644 --- a/indra/newview/skins/default/textures/widgets/buy_over.png +++ b/indra/newview/skins/default/textures/widgets/buy_over.png diff --git a/indra/newview/skins/default/textures/widgets/buy_press.png b/indra/newview/skins/default/textures/widgets/buy_press.png Binary files differindex d6f587464d..3f442d6eaa 100644 --- a/indra/newview/skins/default/textures/widgets/buy_press.png +++ b/indra/newview/skins/default/textures/widgets/buy_press.png diff --git a/indra/newview/skins/default/textures/windows/Wearables_Divider.png b/indra/newview/skins/default/textures/windows/Wearables_Divider.png Binary files differnew file mode 100644 index 0000000000..9dce7bf45c --- /dev/null +++ b/indra/newview/skins/default/textures/windows/Wearables_Divider.png diff --git a/indra/newview/skins/default/xui/da/floater_about.xml b/indra/newview/skins/default/xui/da/floater_about.xml index 435c7f4907..2e9d003848 100644 --- a/indra/newview/skins/default/xui/da/floater_about.xml +++ b/indra/newview/skins/default/xui/da/floater_about.xml @@ -29,7 +29,7 @@ libcurl Version: [LIBCURL_VERSION] J2C Decoder Version: [J2C_VERSION] Audio Driver Version: [AUDIO_DRIVER_VERSION] Qt Webkit Version: [QT_WEBKIT_VERSION] -Vivox Version: [VIVOX_VERSION] +Voice Server Version: [VOICE_VERSION] </floater.string> <floater.string name="none"> (ingen) diff --git a/indra/newview/skins/default/xui/da/floater_about_land.xml b/indra/newview/skins/default/xui/da/floater_about_land.xml index fd1fe4aa19..053fe4d9d9 100644 --- a/indra/newview/skins/default/xui/da/floater_about_land.xml +++ b/indra/newview/skins/default/xui/da/floater_about_land.xml @@ -63,6 +63,9 @@ Pacel ikke valgt. Gå til 'Verden' > 'Om land' eller vælg en anden parcel for at se detaljer. </panel.string> + <panel.string name="time_stamp_template"> + [wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local] + </panel.string> <text name="Name:"> Navn: </text> diff --git a/indra/newview/skins/default/xui/da/floater_avatar_textures.xml b/indra/newview/skins/default/xui/da/floater_avatar_textures.xml index e405a1beb8..d0d766eaab 100644 --- a/indra/newview/skins/default/xui/da/floater_avatar_textures.xml +++ b/indra/newview/skins/default/xui/da/floater_avatar_textures.xml @@ -3,41 +3,48 @@ <floater.string name="InvalidAvatar"> UGYLDING AVATAR </floater.string> - <text name="composite_label"> - Blandede teksturer - </text> - <button label="Drop" label_selected="Dump" name="Dump"/> <scroll_container name="profile_scroll"> <panel name="scroll_content_panel"> - <texture_picker label="Hår" name="hair-baked"/> - <texture_picker label="Hår" name="hair_grain"/> - <texture_picker label="Alpha - hår" name="hair_alpha"/> - <texture_picker label="Hoved" name="head-baked"/> - <texture_picker label="Makeup" name="head_bodypaint"/> - <texture_picker label="Alpha - hoved" name="head_alpha"/> - <texture_picker label="Tatovering - hoved" name="head_tattoo"/> - <texture_picker label="Eyes" name="eyes-baked"/> - <texture_picker label="Øje" name="eyes_iris"/> - <texture_picker label="Alpha - øjne" name="eyes_alpha"/> - <texture_picker label="Overkrop" name="upper-baked"/> - <texture_picker label="Bodypaint - overkrop" name="upper_bodypaint"/> - <texture_picker label="Undertrøje" name="upper_undershirt"/> - <texture_picker label="Handsker" name="upper_gloves"/> - <texture_picker label="Trøje" name="upper_shirt"/> - <texture_picker label="Jakke - foroven" name="upper_jacket"/> - <texture_picker label="Alpha - øvre" name="upper_alpha"/> - <texture_picker label="Tatovering - øvre" name="upper_tattoo"/> - <texture_picker label="Ben" name="lower-baked"/> - <texture_picker label="Bodypaint - ben" name="lower_bodypaint"/> - <texture_picker label="Underbukser" name="lower_underpants"/> - <texture_picker label="Strømper" name="lower_socks"/> - <texture_picker label="Sko" name="lower_shoes"/> - <texture_picker label="Bukser" name="lower_pants"/> - <texture_picker label="Jakke" name="lower_jacket"/> - <texture_picker label="Alpha - nedre" name="lower_alpha"/> - <texture_picker label="Tatovering - nedre" name="lower_tattoo"/> - <texture_picker label="Nederdel" name="skirt-baked"/> - <texture_picker label="Nederdel" name="skirt"/> + <text name="label"> + Gemte +teksturer + </text> + <text name="composite_label"> + Sammensatte +teksturer + </text> + <button label="Vis IDs på skærm" label_selected="Dump" name="Dump"/> + <panel name="scroll_content_panel"> + <texture_picker label="Hår" name="hair-baked"/> + <texture_picker label="Hår" name="hair_grain"/> + <texture_picker label="Alpha - hår" name="hair_alpha"/> + <texture_picker label="Hoved" name="head-baked"/> + <texture_picker label="Makeup" name="head_bodypaint"/> + <texture_picker label="Alpha - hoved" name="head_alpha"/> + <texture_picker label="Tatovering - hovede" name="head_tattoo"/> + <texture_picker label="Øjne" name="eyes-baked"/> + <texture_picker label="Øje" name="eyes_iris"/> + <texture_picker label="Alpha øjne" name="eyes_alpha"/> + <texture_picker label="Overkrop" name="upper-baked"/> + <texture_picker label="Øverste bodyPaint" name="upper_bodypaint"/> + <texture_picker label="Undertrøje" name="upper_undershirt"/> + <texture_picker label="Handsker" name="upper_gloves"/> + <texture_picker label="Trøje" name="upper_shirt"/> + <texture_picker label="Jakke øverst" name="upper_jacket"/> + <texture_picker label="Alpha - øverst" name="upper_alpha"/> + <texture_picker label="Tatovering - øverst" name="upper_tattoo"/> + <texture_picker label="Underkrop" name="lower-baked"/> + <texture_picker label="BodyPaint - nederst" name="lower_bodypaint"/> + <texture_picker label="Underbukser" name="lower_underpants"/> + <texture_picker label="Strømper" name="lower_socks"/> + <texture_picker label="Sko" name="lower_shoes"/> + <texture_picker label="Bukser" name="lower_pants"/> + <texture_picker label="Jakke" name="lower_jacket"/> + <texture_picker label="Alpha - nederst" name="lower_alpha"/> + <texture_picker label="Tatovering - nederst" name="lower_tattoo"/> + <texture_picker label="Nederdel" name="skirt-baked"/> + <texture_picker label="Nederdel" name="skirt"/> + </panel> </panel> </scroll_container> </floater> diff --git a/indra/newview/skins/default/xui/da/floater_buy_currency_html.xml b/indra/newview/skins/default/xui/da/floater_buy_currency_html.xml new file mode 100644 index 0000000000..e32b25ca17 --- /dev/null +++ b/indra/newview/skins/default/xui/da/floater_buy_currency_html.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="floater_buy_currency_html" title="KØB VALUTA"/> diff --git a/indra/newview/skins/default/xui/da/floater_buy_land.xml b/indra/newview/skins/default/xui/da/floater_buy_land.xml index 970491b41f..f6ee78fa6d 100644 --- a/indra/newview/skins/default/xui/da/floater_buy_land.xml +++ b/indra/newview/skins/default/xui/da/floater_buy_land.xml @@ -126,9 +126,6 @@ gennemført. <floater.string name="no_parcel_selected"> (intet parcel er valgt) </floater.string> - <floater.string name="icon_PG" value="Parcel_PG_Dark"/> - <floater.string name="icon_M" value="Parcel_M_Dark"/> - <floater.string name="icon_R" value="Parcel_R_Dark"/> <text name="region_name_label"> Region: </text> diff --git a/indra/newview/skins/default/xui/da/floater_map.xml b/indra/newview/skins/default/xui/da/floater_map.xml index 82897d545a..cd6c03058b 100644 --- a/indra/newview/skins/default/xui/da/floater_map.xml +++ b/indra/newview/skins/default/xui/da/floater_map.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Map" title="Mini-kort"> +<floater name="Map" title=""> <floater.string name="mini_map_north"> N </floater.string> diff --git a/indra/newview/skins/default/xui/da/floater_moveview.xml b/indra/newview/skins/default/xui/da/floater_moveview.xml index 8385924bda..14d3604b43 100644 --- a/indra/newview/skins/default/xui/da/floater_moveview.xml +++ b/indra/newview/skins/default/xui/da/floater_moveview.xml @@ -6,18 +6,48 @@ <string name="walk_back_tooltip"> Gå baglæns (Tryk på Ned piletast eller S) </string> + <string name="walk_left_tooltip"> + Gå til venstre (tryk Shift + venstre pil eller A) + </string> + <string name="walk_right_tooltip"> + Gå til højre (tryk Shift + højre pil eller D) + </string> <string name="run_forward_tooltip"> Løb forlæns (Tryk på Op piletast eller W) </string> <string name="run_back_tooltip"> Løb baglæns (Tryk på Ned piletast eller S) </string> + <string name="run_left_tooltip"> + Løb til venstre (tryk Shift + venstre pil eller A) + </string> + <string name="run_right_tooltip"> + Løb til højre (tryk Shift + højre pil eller D) + </string> <string name="fly_forward_tooltip"> Flyv frem (Tryk på Op piletast eller W) </string> <string name="fly_back_tooltip"> Flyv baglæns (Tryk på Ned piletast eller S) </string> + <string name="fly_left_tooltip"> + Flyv til venstre (tryk Shift + venstre pil eller A) + </string> + <string name="fly_right_tooltip"> + Flyv til højre (tryk Shift + højre pil eller D) + </string> + <string name="fly_up_tooltip"> + Flyv op (tryk E) + </string> + <string name="fly_down_tooltip"> + Flyv ned (tryk C) + </string> + <string name="jump_tooltip"> + Hop (tryk E) + </string> + <string name="crouch_tooltip"> + Kryb (tryk C) + </string> <string name="walk_title"> Gå </string> @@ -28,10 +58,12 @@ Flyv </string> <panel name="panel_actions"> + <button label="" label_selected="" name="move up btn" tool_tip="Flyv op (tryk E)"/> <button label="" label_selected="" name="turn left btn" tool_tip="xxx Drej til venstre (Tryk på venstre piletast eller A)"/> + <joystick_slide name="move left btn" tool_tip="Gå til venstre (tryk Shift + venstre pil eller A)"/> + <button label="" label_selected="" name="move down btn" tool_tip="Flyv ned (tryk C)"/> <button label="" label_selected="" name="turn right btn" tool_tip="Drej til højre (Tryk på højre piletast eller D)"/> - <button label="" label_selected="" name="move up btn" tool_tip="Flyv op, tryk E"/> - <button label="" label_selected="" name="move down btn" tool_tip="Flyv ned, tryk C"/> + <joystick_slide name="move right btn" tool_tip="Gå til højre (tryk Shift + højre pil eller D)"/> <joystick_turn name="forward btn" tool_tip="Gå frem (Tryk på Op piletast eller W)"/> <joystick_turn name="backward btn" tool_tip="Gå tilbage (Tryk på Ned piletast eller S)"/> </panel> diff --git a/indra/newview/skins/default/xui/da/floater_preview_notecard.xml b/indra/newview/skins/default/xui/da/floater_preview_notecard.xml index e600a774ec..5a0f5a32c0 100644 --- a/indra/newview/skins/default/xui/da/floater_preview_notecard.xml +++ b/indra/newview/skins/default/xui/da/floater_preview_notecard.xml @@ -9,9 +9,6 @@ <floater.string name="Title"> Note: [NAME] </floater.string> - <floater.string label="Gem" label_selected="Gem" name="Save"> - Gem - </floater.string> <text name="desc txt"> Beskrivelse: </text> @@ -19,4 +16,5 @@ Indlæser... </text_editor> <button label="Gem" label_selected="Gem" name="Save"/> + <button label="Slet" label_selected="Slet" name="Delete"/> </floater> diff --git a/indra/newview/skins/default/xui/da/floater_tools.xml b/indra/newview/skins/default/xui/da/floater_tools.xml index b501722e92..a84af9adc0 100644 --- a/indra/newview/skins/default/xui/da/floater_tools.xml +++ b/indra/newview/skins/default/xui/da/floater_tools.xml @@ -67,8 +67,8 @@ <text name="RenderingCost" tool_tip="Hvis beregnede rendering omkostninger for dette objekt"> þ: [COUNT] </text> - <check_box name="checkbox uniform"/> - <text name="checkbox uniform label"> + <check_box label="" name="checkbox uniform"/> + <text label="Stræk begge sider" name="checkbox uniform label"> Stræk begge sider </text> <check_box initial_value="true" label="Stræk teksturer" name="checkbox stretch textures"/> @@ -443,8 +443,6 @@ <check_box label="Vend" name="checkbox flip s"/> <spinner label="Lodret (V)" name="TexScaleV"/> <check_box label="Vend" name="checkbox flip t"/> - <spinner label="Rotation˚"/> - <spinner label="Gentagelser pr. m."/> <button label="Gem" label_selected="Gem" left_delta="62" name="button apply"/> <text name="tex offset"> Tekstur offset @@ -477,14 +475,7 @@ Areal: [AREA] m² </text> <button label="Om land" label_selected="Om land" name="button about land"/> - <check_box label="Vis ejere" name="checkbox show owners" tool_tip="Farver grunde afhængigt af ejerskab: - -Grøn = Dit land -Turkis = Din gruppes land -Rød = Ejet af andre -Gul = Til salg -Lilla = På auktion -Grå = Offentligt ejet"/> + <check_box label="Vis ejere" name="checkbox show owners" tool_tip="Farver grunde afhængigt af ejerskab: Grøn = Dit land Turkis = Din gruppes land Rød = Ejet af andre Gul = Til salg Lilla = På auktion Grå = Offentligt ejet"/> <text name="label_parcel_modify"> Redigere grund </text> diff --git a/indra/newview/skins/default/xui/da/menu_attachment_self.xml b/indra/newview/skins/default/xui/da/menu_attachment_self.xml index d8bd78fa23..bf52e5d57f 100644 --- a/indra/newview/skins/default/xui/da/menu_attachment_self.xml +++ b/indra/newview/skins/default/xui/da/menu_attachment_self.xml @@ -5,7 +5,7 @@ <menu_item_call label="Tag af" name="Detach"/> <menu_item_call label="Smid" name="Drop"/> <menu_item_call label="Stå op" name="Stand Up"/> - <menu_item_call label="Udseende" name="Appearance..."/> + <menu_item_call label="Skift sæt" name="Change Outfit"/> <menu_item_call label="Venner" name="Friends..."/> <menu_item_call label="Grupper" name="Groups..."/> <menu_item_call label="Profil" name="Profile..."/> diff --git a/indra/newview/skins/default/xui/da/menu_avatar_self.xml b/indra/newview/skins/default/xui/da/menu_avatar_self.xml index 39f3e49702..ec85bd05a5 100644 --- a/indra/newview/skins/default/xui/da/menu_avatar_self.xml +++ b/indra/newview/skins/default/xui/da/menu_avatar_self.xml @@ -20,7 +20,9 @@ <context_menu label="Tag af ▶" name="Object Detach"/> <menu_item_call label="Tag alt af" name="Detach All"/> </context_menu> - <menu_item_call label="Udseende" name="Appearance..."/> + <menu_item_call label="Skift sæt" name="Chenge Outfit"/> + <menu_item_call label="Redigér mit sæt" name="Edit Outfit"/> + <menu_item_call label="Redigér min form" name="Edit My Shape"/> <menu_item_call label="Venner" name="Friends..."/> <menu_item_call label="Grupper" name="Groups..."/> <menu_item_call label="Profil" name="Profile..."/> diff --git a/indra/newview/skins/default/xui/da/menu_bottomtray.xml b/indra/newview/skins/default/xui/da/menu_bottomtray.xml index dbdeefeaff..e979e35a91 100644 --- a/indra/newview/skins/default/xui/da/menu_bottomtray.xml +++ b/indra/newview/skins/default/xui/da/menu_bottomtray.xml @@ -4,6 +4,11 @@ <menu_item_check label="Bevægelse knap" name="ShowMoveButton"/> <menu_item_check label="Vis knap" name="ShowCameraButton"/> <menu_item_check label="Foto knap" name="ShowSnapshotButton"/> + <menu_item_check label="Sidepanel knap" name="ShowSidebarButton"/> + <menu_item_check label="Bygge knap" name="ShowBuildButton"/> + <menu_item_check label="Søge knap" name="ShowSearchButton"/> + <menu_item_check label="Kort knap" name="ShowWorldMapButton"/> + <menu_item_check label="Mini-Map button" name="ShowMiniMapButton"/> <menu_item_call label="Klip" name="NearbyChatBar_Cut"/> <menu_item_call label="Kopiér" name="NearbyChatBar_Copy"/> <menu_item_call label="Sæt ind" name="NearbyChatBar_Paste"/> diff --git a/indra/newview/skins/default/xui/da/menu_inspect_self_gear.xml b/indra/newview/skins/default/xui/da/menu_inspect_self_gear.xml index aeef2ccb23..c226d06404 100644 --- a/indra/newview/skins/default/xui/da/menu_inspect_self_gear.xml +++ b/indra/newview/skins/default/xui/da/menu_inspect_self_gear.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <menu name="Gear Menu"> <menu_item_call label="Stå op" name="stand_up"/> - <menu_item_call label="Udseende" name="my_appearance"/> + <menu_item_call label="Skift sæt" name="change_outfit"/> <menu_item_call label="Profil" name="my_profile"/> <menu_item_call label="Venner" name="my_friends"/> <menu_item_call label="Grupper" name="my_groups"/> diff --git a/indra/newview/skins/default/xui/da/menu_inventory.xml b/indra/newview/skins/default/xui/da/menu_inventory.xml index 0ea21dc409..ff70ec7886 100644 --- a/indra/newview/skins/default/xui/da/menu_inventory.xml +++ b/indra/newview/skins/default/xui/da/menu_inventory.xml @@ -52,6 +52,7 @@ <menu_item_call label="Slet ting" name="Purge Item"/> <menu_item_call label="Genskab ting" name="Restore Item"/> <menu_item_call label="åben" name="Open"/> + <menu_item_call label="Åben original" name="Open Original"/> <menu_item_call label="Egenskaber" name="Properties"/> <menu_item_call label="Omdøb" name="Rename"/> <menu_item_call label="Kopiér asset UUID" name="Copy Asset UUID"/> diff --git a/indra/newview/skins/default/xui/da/menu_login.xml b/indra/newview/skins/default/xui/da/menu_login.xml index 36e82e8bc4..1231c4c08d 100644 --- a/indra/newview/skins/default/xui/da/menu_login.xml +++ b/indra/newview/skins/default/xui/da/menu_login.xml @@ -2,7 +2,7 @@ <menu_bar name="Login Menu"> <menu label="Mig" name="File"> <menu_item_call label="Indstillinger" name="Preferences..."/> - <menu_item_call label="Afslut" name="Quit"/> + <menu_item_call label="Afslut [APP_NAME]" name="Quit"/> </menu> <menu label="Hjælp" name="Help"> <menu_item_call label="[SECOND_LIFE] hjælp" name="Second Life Help"/> diff --git a/indra/newview/skins/default/xui/da/menu_participant_list.xml b/indra/newview/skins/default/xui/da/menu_participant_list.xml index 02b7e8466b..2bd28e10de 100644 --- a/indra/newview/skins/default/xui/da/menu_participant_list.xml +++ b/indra/newview/skins/default/xui/da/menu_participant_list.xml @@ -14,8 +14,8 @@ <context_menu label="Moderator muligheder >" name="Moderator Options"> <menu_item_check label="Tillad tekst chat" name="AllowTextChat"/> <menu_item_call label="Sluk for denne deltager" name="ModerateVoiceMuteSelected"/> - <menu_item_call label="Sluk for alle andre" name="ModerateVoiceMuteOthers"/> <menu_item_call label="Fjern slukning for denne deltager" name="ModerateVoiceUnMuteSelected"/> - <menu_item_call label="Fjern slukning for alle andre" name="ModerateVoiceUnMuteOthers"/> + <menu_item_call label="Sluk lyd for alle" name="ModerateVoiceMute"/> + <menu_item_call label="Tænd lyd for alle" name="ModerateVoiceUnmute"/> </context_menu> </context_menu> diff --git a/indra/newview/skins/default/xui/da/menu_viewer.xml b/indra/newview/skins/default/xui/da/menu_viewer.xml index e195ebfeed..a061292eb0 100644 --- a/indra/newview/skins/default/xui/da/menu_viewer.xml +++ b/indra/newview/skins/default/xui/da/menu_viewer.xml @@ -5,7 +5,7 @@ <menu_item_call label="Mit instrumentpanel" name="Manage My Account"/> <menu_item_call label="Køb L$" name="Buy and Sell L$"/> <menu_item_call label="Profil" name="Profile"/> - <menu_item_call label="Udseende" name="Appearance"/> + <menu_item_call label="Skift sæt" name="ChangeOutfit"/> <menu_item_check label="Beholdning" name="Inventory"/> <menu_item_check label="Min beholdning" name="ShowSidetrayInventory"/> <menu_item_check label="Mine bevægelser" name="Gestures"/> @@ -160,6 +160,7 @@ <menu_item_check label="Fleksible objekter" name="Flexible Objects"/> </menu> <menu_item_check label="Kør flere 'threats'" name="Run Multiple Threads"/> + <menu_item_check label="Benyt "Plugin Read Thread"" name="Use Plugin Read Thread"/> <menu_item_call label="Tøm gruppe cache" name="ClearGroupCache"/> <menu_item_check label="Muse udjævning" name="Mouse Smoothing"/> <menu label="Shortcuts" name="Shortcuts"> @@ -186,7 +187,6 @@ <menu_item_call label="Zoom ind" name="Zoom In"/> <menu_item_call label="Zoom standard" name="Zoom Default"/> <menu_item_call label="Zoom ud" name="Zoom Out"/> - <menu_item_call label="Skift fuld-skærm" name="Toggle Fullscreen"/> </menu> <menu_item_call label="Vis debug valg" name="Debug Settings"/> <menu_item_check label="Vis udviklingsmenu" name="Debug Mode"/> diff --git a/indra/newview/skins/default/xui/da/notifications.xml b/indra/newview/skins/default/xui/da/notifications.xml index afccc1e904..72a1ab6a29 100644 --- a/indra/newview/skins/default/xui/da/notifications.xml +++ b/indra/newview/skins/default/xui/da/notifications.xml @@ -208,6 +208,9 @@ Du skal skrive både fornavn og efternavn på din figur. Du har brug for en konto for at logge ind i [SECOND_LIFE]. Vil du oprette en nu? <usetemplate name="okcancelbuttons" notext="Prøv igen" yestext="Lav ny konto"/> </notification> + <notification name="InvalidCredentialFormat"> + Du skal indtaste både fornavn og efternavn i din avatars brugernavn felt og derefter logge på igen. + </notification> <notification name="AddClassified"> Annoncer vil vises i 'Annoncer' sektionen i søge biblioteket og på [http://secondlife.com/community/classifieds secondlife.com] i en uge. Udfyld din annonce og klik på 'Udgiv...' for at tilf'je den til biblioteket. @@ -279,6 +282,11 @@ Gå til [_URL] for information om køb af L$? <notification name="CannotEncodeFile"> Kunne ikke 'forstå' filen: [FILE] </notification> + <notification name="CorruptedProtectedDataStore"> + Vi kan ikke læse dine beskyttede data så de nulstilles. + Dette kan ske hvis du ændrer din netværksopsætning. + <usetemplate name="okbutton" yestext="OK"/> + </notification> <notification name="DoNotSupportBulkAnimationUpload"> [APP_NAME] understøtter p.t. ikke at send flere animationsfiler ad gangen. </notification> @@ -404,6 +412,12 @@ Tilbyd venskab til [NAME]? <button name="Cancel" text="Annullér"/> </form> </notification> + <notification name="ConfirmItemDeleteHasLinks"> + Mindst en af genstandene har lænkede genstande der peger på den. Hvis du sletter denne genstand, vil lænkninger ikke virke mere. Det anbefales kraftigt at fjerne lænkninger først. + +Er du sikker på at du vil slette disse genstande? + <usetemplate name="okcancelbuttons" notext="Annullér" yestext="OK"/> + </notification> <notification name="ErrorMessage"> <usetemplate name="okbutton" yestext="OK"/> </notification> @@ -438,6 +452,42 @@ Vend tilbage til [http://join.secondlife.com secondlife.com] for at oprette en n Du kan enten checke din Internet forbindelse og prøve igen om lidt, klikke på Hjælp for at se [SUPPORT_SITE] siden, eller klikke på Teleport for at forsøge at teleportere hjem. </notification> + <notification name="CantTeleportToGrid"> + Kunne ikke teleportere til [SLURL] da den er på et andet net ([GRID]) end det nuværende net ([CURRENT_GRID]). Luk venligst din klient og prøv igen. + <usetemplate name="okbutton" yestext="OK"/> + </notification> + <notification name="GeneralCertificateError"> + Kunne ikke opnå forbindelse til server. +[REASON] + +Vedrørende: [SUBJECT_NAME_STRING] +Fra: [ISSUER_NAME_STRING] +Valid fra: [VALID_FROM] +Valid til: [VALID_TO] +MD5 Fingerprint: [SHA1_DIGEST] +SHA1 Fingerprint: [MD5_DIGEST] +Key Usage: [KEYUSAGE] +Extended Key Usage: [EXTENDEDKEYUSAGE] +Subject Key Identifier: [SUBJECTKEYIDENTIFIER] + <usetemplate name="okbutton" yestext="OK"/> + </notification> + <notification name="TrustCertificateError"> + Certifikationsmyndighed for denne server er ikke kendt. + +Certifikat information: +Vedrørende: [SUBJECT_NAME_STRING] +Fra: [ISSUER_NAME_STRING] +Valid fra: [VALID_FROM] +Valid til: [VALID_TO] +MD5 Fingerprint: [SHA1_DIGEST] +SHA1 Fingerprint: [MD5_DIGEST] +Key Usage: [KEYUSAGE] +Extended Key Usage: [EXTENDEDKEYUSAGE] +Subject Key Identifier: [SUBJECTKEYIDENTIFIER] + +Ønsker du at stole på denne myndighed? + <usetemplate name="okcancelbuttons" notext="Annullér" yestext="Stol på"/> + </notification> <notification name="NotEnoughCurrency"> [NAME] L$ [PRICE] Du har ikke nok L$ til dette. </notification> @@ -627,9 +677,9 @@ Gå til 'Knowledge Base' for mere information om indholdsratings. Du har ikke adgang til denne region på grund af din valgte indholdsrating. </notification> <notification name="RegionEntryAccessBlocked_Change"> - Du har ikke adgang til denne region på grund af din indholdsrating præferencer. + Du har ikke adgang til den region, da din indholdsrating ikke tillader dette. -Du kan klikke på 'Ændre præference' for at ændre din indholdsrating nu og dermed opnå adgang. Du vil så få mulighed for at søge og tilgå [REGIONMATURITY] fra da af. Hvis du senere ønsker at ændre denne opsætning tilbage, gå til Mig > Indstillinger > Generelt. +Klik på "Ændre præference" for at forhøje din indholdsrating for direkte adgang nu. Ved at gøre dette vil du få lov til at søge og få adgang til [REGIONMATURITY] indhold. Hvis du ønsker at ændre denne opsætning senere, kan du gøre dette fra Mig > Indstillinger > Generelt. <form name="form"> <button name="OK" text="Ændre indstillinger"/> <button name="Cancel" text="Luk"/> @@ -1176,15 +1226,6 @@ Prøv igen om lidt. <button name="Mute" text="Blokér"/> </form> </notification> - <notification name="ObjectGiveItemUnknownUser"> - Et objekt med navnet [OBJECTFROMNAME] ejet af (en ukendt beboer) har givet dig denne/dette [OBJECTTYPE]: -[ITEM_SLURL] - <form name="form"> - <button name="Keep" text="Behold"/> - <button name="Discard" text="Smid væk"/> - <button name="Mute" text="Blokér"/> - </form> - </notification> <notification name="UserGiveItem"> [NAME_SLURL] har givet dig denne/dette [OBJECTTYPE]: [ITEM_SLURL] @@ -1487,8 +1528,53 @@ Knappen vil blive vist når der er nok plads til den. <notification name="ShareNotification"> Træk genstande fra beholdning til en person i beboer vælgeren </notification> + <notification name="DeedToGroupFail"> + Dedikering til gruppe fejlede. + </notification> <notification name="AvatarRezNotification"> - Avatar '[NAME]' rezzed på [TIME] sekunder. + ( [EXISTENCE] sekunder i live ) +Avatar '[NAME]' declouded in [TIME] seconds. + </notification> + <notification name="AvatarRezSelfNotification"> + ( [EXISTENCE] sekunder i live ) +Du afsluttede klargøring af dit sæt på [TIME] sekunder. + </notification> + <notification name="AvatarRezCloudNotification"> + ( [EXISTENCE] sekunder i live ) +Avatar '[NAME]' blev til "sky". + </notification> + <notification name="AvatarRezArrivedNotification"> + ( [EXISTENCE] sekunder i live ) +Avatar '[NAME]' appeared. + </notification> + <notification name="AvatarRezLeftCloudNotification"> + ( [EXISTENCE] sekunder i live ) +Avatar '[NAME]' forsvandt efter [TIME] sekunder som "sky". + </notification> + <notification name="AvatarRezEnteredAppearanceNotification"> + ( [EXISTENCE] sekunder i live ) +Avatar '[NAME]' skiftede til udseende modus. + </notification> + <notification name="AvatarRezLeftAppearanceNotification"> + ( [EXISTENCE] sekunder i live ) +Avatar '[NAME]' har forladt udseende modus. + </notification> + <notification name="AvatarRezLeftNotification"> + ( [EXISTENCE] sekunder i live ) +Avatar '[NAME]' forsvandt helt "uploaded". + </notification> + <notification name="ConfirmLeaveCall"> + Er du sikker på at du vil forlade dette opkald? + <usetemplate ignoretext="Bekræft før jeg forlader opkald" name="okcancelignore" notext="Nej" yestext="Ja"/> + </notification> + <notification name="ConfirmMuteAll"> + Du har valgt at slukke for lyden for alle deltagere i gruppeopkaldet. +Dette vil også betyde, at alle beboere der slutter sig til opkaldet +vil have lyden slukket - selv efter de har forladt kaldet. + + +Sluk for alles lyd? + <usetemplate ignoretext="Bekræft før jeg slukker for alle deltageres lyd i gruppe-kald" name="okcancelignore" notext="OK" yestext="Annullér"/> </notification> <global name="UnsupportedGLRequirements"> Det ser ikke ud til at din hardware opfylder minimumskravene til [APP_NAME]. [APP_NAME] kræver et OpenGL grafikkort som understøter 'multitexture'. Check eventuelt om du har de nyeste drivere for grafikkortet, og de nyeste service-packs og patches til dit operativsystem. diff --git a/indra/newview/skins/default/xui/da/panel_body_parts_list_item.xml b/indra/newview/skins/default/xui/da/panel_body_parts_list_item.xml new file mode 100644 index 0000000000..de764d8025 --- /dev/null +++ b/indra/newview/skins/default/xui/da/panel_body_parts_list_item.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="wearable_item"> + <text name="item_name" value="..."/> +</panel> diff --git a/indra/newview/skins/default/xui/da/panel_bodyparts_list_button_bar.xml b/indra/newview/skins/default/xui/da/panel_bodyparts_list_button_bar.xml new file mode 100644 index 0000000000..4cbcdebbe4 --- /dev/null +++ b/indra/newview/skins/default/xui/da/panel_bodyparts_list_button_bar.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="clothing_list_button_bar_panel"> + <button label="Skift" name="switch_btn"/> + <button label="Køb >" name="bodyparts_shop_btn"/> +</panel> diff --git a/indra/newview/skins/default/xui/da/panel_bottomtray.xml b/indra/newview/skins/default/xui/da/panel_bottomtray.xml index 4a038e89ba..2d288a9494 100644 --- a/indra/newview/skins/default/xui/da/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/da/panel_bottomtray.xml @@ -1,11 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="bottom_tray"> - <string name="SpeakBtnToolTip"> - Slukker/tænder mikrofon - </string> - <string name="VoiceControlBtnToolTip"> - Skjuler/viser stemme kontrol panel - </string> + <string name="SpeakBtnToolTip" value="Slå mikrofon til/fra"/> + <string name="VoiceControlBtnToolTip" value="Vis/skjul stemme kontrolpanel"/> <layout_stack name="toolbar_stack"> <layout_panel name="speak_panel"> <talk_button name="talk"> @@ -24,6 +20,21 @@ <layout_panel name="snapshot_panel"> <button label="" name="snapshots" tool_tip="Tag foto"/> </layout_panel> + <layout_panel name="sidebar_btn_panel"> + <button label="Sidepanel" name="sidebar_btn" tool_tip="Vis/skjul sidepanel"/> + </layout_panel> + <layout_panel name="build_btn_panel"> + <button label="Byg" name="build_btn" tool_tip="Vis/skjul byggeværktøjer"/> + </layout_panel> + <layout_panel name="search_btn_panel"> + <button label="Søg" name="search_btn" tool_tip="Vis/skjul søgning"/> + </layout_panel> + <layout_panel name="world_map_btn_panel"> + <button label="Kort" name="world_map_btn" tool_tip="Vis/skjul verdenskort"/> + </layout_panel> + <layout_panel name="mini_map_btn_panel"> + <button label="Mini-kort" name="mini_map_btn" tool_tip="Vis/skjul Mini-kort"/> + </layout_panel> <layout_panel name="im_well_panel"> <chiclet_im_well name="im_well"> <button name="Unread IM messages" tool_tip="Konversationer"/> diff --git a/indra/newview/skins/default/xui/da/panel_clothing_list_button_bar.xml b/indra/newview/skins/default/xui/da/panel_clothing_list_button_bar.xml new file mode 100644 index 0000000000..c08d095c66 --- /dev/null +++ b/indra/newview/skins/default/xui/da/panel_clothing_list_button_bar.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="clothing_list_button_bar_panel"> + <button label="Tilføj +" name="add_btn"/> + <button label="Køb >" name="clothing_shop_btn"/> +</panel> diff --git a/indra/newview/skins/default/xui/da/panel_clothing_list_item.xml b/indra/newview/skins/default/xui/da/panel_clothing_list_item.xml new file mode 100644 index 0000000000..de764d8025 --- /dev/null +++ b/indra/newview/skins/default/xui/da/panel_clothing_list_item.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="wearable_item"> + <text name="item_name" value="..."/> +</panel> diff --git a/indra/newview/skins/default/xui/da/panel_cof_wearables.xml b/indra/newview/skins/default/xui/da/panel_cof_wearables.xml new file mode 100644 index 0000000000..92d78b01a2 --- /dev/null +++ b/indra/newview/skins/default/xui/da/panel_cof_wearables.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="cof_wearables"> + <accordion name="cof_wearables_accordion"> + <accordion_tab name="tab_attachments" title="Attachments"/> + <accordion_tab name="tab_clothing" title="Tøj"/> + <accordion_tab name="tab_body_parts" title="Kropsdele"/> + </accordion> +</panel> diff --git a/indra/newview/skins/default/xui/da/panel_deletable_wearable_list_item.xml b/indra/newview/skins/default/xui/da/panel_deletable_wearable_list_item.xml new file mode 100644 index 0000000000..91d90a5660 --- /dev/null +++ b/indra/newview/skins/default/xui/da/panel_deletable_wearable_list_item.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="deletable_wearable_item"> + <text name="item_name" value="..."/> +</panel> diff --git a/indra/newview/skins/default/xui/da/panel_dummy_clothing_list_item.xml b/indra/newview/skins/default/xui/da/panel_dummy_clothing_list_item.xml new file mode 100644 index 0000000000..6af84de0c7 --- /dev/null +++ b/indra/newview/skins/default/xui/da/panel_dummy_clothing_list_item.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel name="dummy_clothing_item"> + <text name="item_name" value="..."/> +</panel> diff --git a/indra/newview/skins/default/xui/da/panel_edit_shape.xml b/indra/newview/skins/default/xui/da/panel_edit_shape.xml index 1c8567d27c..4360fe35f5 100644 --- a/indra/newview/skins/default/xui/da/panel_edit_shape.xml +++ b/indra/newview/skins/default/xui/da/panel_edit_shape.xml @@ -1,14 +1,8 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="edit_shape_panel"> - <panel name="avatar_sex_panel"> - <text name="gender_text"> - Køn: - </text> - <radio_group name="sex_radio"> - <radio_item label="Kvinde" name="radio"/> - <radio_item label="Mand" name="radio2"/> - </radio_group> - </panel> + <text name="avatar_height"> + [HEIGHT] meter høj + </text> <panel label="Trøje" name="accordion_panel"> <accordion name="wearable_accordion"> <accordion_tab name="shape_body_tab" title="Krop"/> diff --git a/indra/newview/skins/default/xui/da/panel_edit_tattoo.xml b/indra/newview/skins/default/xui/da/panel_edit_tattoo.xml index 4a133d8693..d4a12209db 100644 --- a/indra/newview/skins/default/xui/da/panel_edit_tattoo.xml +++ b/indra/newview/skins/default/xui/da/panel_edit_tattoo.xml @@ -4,5 +4,6 @@ <texture_picker label="Hoved tatovering" name="Head Tattoo" tool_tip="Klik for at vælge et billede"/> <texture_picker label="Øvre tatovering" name="Upper Tattoo" tool_tip="Klik for at vælge et billede"/> <texture_picker label="Nedre tatovering" name="Lower Tattoo" tool_tip="Klik for at vælge et billede"/> + <color_swatch label="Farve/Nuance" name="Color/Tint" tool_tip="Klik for at åbne farvevælger"/> </panel> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_edit_wearable.xml b/indra/newview/skins/default/xui/da/panel_edit_wearable.xml index 4afb7ba45c..8e6990fe31 100644 --- a/indra/newview/skins/default/xui/da/panel_edit_wearable.xml +++ b/indra/newview/skins/default/xui/da/panel_edit_wearable.xml @@ -93,6 +93,12 @@ <text name="edit_wearable_title" value="Redigerer kropsbygning"/> <panel label="Trøje" name="wearable_type_panel"> <text name="description_text" value="Kropsbygning:"/> + <radio_group name="sex_radio"> + <radio_item label="" name="sex_male" tool_tip="Mand" value="1"/> + <radio_item label="" name="sex_female" tool_tip="Kvinde" value="0"/> + </radio_group> + <icon name="male_icon" tool_tip="Mandlig"/> + <icon name="female_icon" tool_tip="Kvindelig"/> </panel> <panel label="gear_buttom_panel" name="gear_buttom_panel"> <button name="friends_viewsort_btn" tool_tip="Valg"/> diff --git a/indra/newview/skins/default/xui/da/panel_group_land_money.xml b/indra/newview/skins/default/xui/da/panel_group_land_money.xml index 9b0267529c..efad4d0c34 100644 --- a/indra/newview/skins/default/xui/da/panel_group_land_money.xml +++ b/indra/newview/skins/default/xui/da/panel_group_land_money.xml @@ -6,6 +6,9 @@ <panel.string name="cant_view_group_land_text"> Du har ikke tilladelse til at se gruppeejet land. </panel.string> + <panel.string name="epmty_view_group_land_text"> + Intet indhold + </panel.string> <panel.string name="cant_view_group_accounting_text"> Du har ikke tilladelse til at se gruppens økonomiinformationer. </panel.string> diff --git a/indra/newview/skins/default/xui/da/panel_group_notices.xml b/indra/newview/skins/default/xui/da/panel_group_notices.xml index 7046ac4d7c..d8e8cb3c2a 100644 --- a/indra/newview/skins/default/xui/da/panel_group_notices.xml +++ b/indra/newview/skins/default/xui/da/panel_group_notices.xml @@ -42,6 +42,7 @@ Maksimum er 200 pr. gruppe pr. dag <text name="string"> Træk og slip en gensand for at vedhæfte den: </text> + <button label="Beholdning" name="open_inventory" tool_tip="Åben beholdning"/> <button label="Fjern" label_selected="Fjern bilag" name="remove_attachment" tool_tip="Fjern vedhæng fra din note"/> <button label="Send" label_selected="Send" name="send_notice"/> <group_drop_target name="drop_target" tool_tip="Træk en genstand fra din beholdning til dette felt for at sende den med denne besked. Du skal have rettigheder til at kopiere og overdrage denne genstand for at kunne vedhæfte den."/> diff --git a/indra/newview/skins/default/xui/da/panel_login.xml b/indra/newview/skins/default/xui/da/panel_login.xml index 1e60174909..d4bf9a7d78 100644 --- a/indra/newview/skins/default/xui/da/panel_login.xml +++ b/indra/newview/skins/default/xui/da/panel_login.xml @@ -11,14 +11,10 @@ </panel.string> <layout_stack name="login_widgets"> <layout_panel name="login"> - <text name="first_name_text"> - Fornavn: + <text name="username_text"> + Brugernavn: </text> - <line_editor label="Fornavn" name="first_name_edit" tool_tip="[SECOND_LIFE] First Name"/> - <text name="last_name_text"> - Efternavn: - </text> - <line_editor label="Efternavn" name="last_name_edit" tool_tip="[SECOND_LIFE] Last Name"/> + <line_editor label="Brugernavn" name="username_edit" tool_tip="[SECOND_LIFE] Brugernavn"/> <text name="password_text"> Password: </text> diff --git a/indra/newview/skins/default/xui/da/panel_main_inventory.xml b/indra/newview/skins/default/xui/da/panel_main_inventory.xml index 16bd22c21a..d6406939c1 100644 --- a/indra/newview/skins/default/xui/da/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/da/panel_main_inventory.xml @@ -9,62 +9,20 @@ <text name="ItemcountText"> Genstande: </text> - <menu_bar name="Inventory Menu"> - <menu label="Filer" name="File"> - <menu_item_call label="Åben" name="Open"/> - <menu label="Send fil" name="upload"> - <menu_item_call label="Billede (L$[COST])..." name="Upload Image"/> - <menu_item_call label="Lyd (L$[COST])..." name="Upload Sound"/> - <menu_item_call label="Animation (L$[COST])..." name="Upload Animation"/> - <menu_item_call label="Flere filer (L$[COST] pr. fil)..." name="Bulk Upload"/> - </menu> - <menu_item_call label="Nyt vindue" name="New Window"/> - <menu_item_call label="Vis filtre" name="Show Filters"/> - <menu_item_call label="Nulstil filtre" name="Reset Current"/> - <menu_item_call label="Luk alle mapper" name="Close All Folders"/> - <menu_item_call label="Tøm papirkurv" name="Empty Trash"/> - <menu_item_call label="Tøm fundne genstande" name="Empty Lost And Found"/> - </menu> - <menu label="Opret" name="Create"> - <menu_item_call label="Ny mappe" name="New Folder"/> - <menu_item_call label="Nyt script" name="New Script"/> - <menu_item_call label="Ny note" name="New Note"/> - <menu_item_call label="Ny bevægelse" name="New Gesture"/> - <menu label="Nyt tøj" name="New Clothes"> - <menu_item_call label="Ny trøje" name="New Shirt"/> - <menu_item_call label="Nye bukser" name="New Pants"/> - <menu_item_call label="Nye sko" name="New Shoes"/> - <menu_item_call label="Nye strømper" name="New Socks"/> - <menu_item_call label="Ny jakke" name="New Jacket"/> - <menu_item_call label="Ny nederdel" name="New Skirt"/> - <menu_item_call label="Nye handsker" name="New Gloves"/> - <menu_item_call label="Ny undertrøje" name="New Undershirt"/> - <menu_item_call label="Nye underbukser" name="New Underpants"/> - <menu_item_call label="Nyt alpha lag" name="New Alpha"/> - <menu_item_call label="Ny tatovering" name="New Tattoo"/> - </menu> - <menu label="Nye kropsdele" name="New Body Parts"> - <menu_item_call label="Ny kropsbygning" name="New Shape"/> - <menu_item_call label="Ny hud" name="New Skin"/> - <menu_item_call label="Nyt hår" name="New Hair"/> - <menu_item_call label="Nye øjne" name="New Eyes"/> - </menu> - </menu> - <menu label="Sortér" name="Sort"> - <menu_item_check label="Efter navn" name="By Name"/> - <menu_item_check label="Efter dato" name="By Date"/> - <menu_item_check label="Altid mapper efter navn" name="Folders Always By Name"/> - <menu_item_check label="System-mapper i toppen" name="System Folders To Top"/> - </menu> - </menu_bar> <filter_editor label="Filter" name="inventory search editor"/> <tab_container name="inventory filter tabs"> <inventory_panel label="Alle ting" name="All Items"/> - <inventory_panel label="Nye ting" name="Recent Items"/> + <recent_inventory_panel label="Nye ting" name="Recent Items"/> </tab_container> - <panel name="bottom_panel"> - <button name="options_gear_btn" tool_tip="Vis flere valgmuligheder"/> - <button name="add_btn" tool_tip="Opret ny genstand"/> - <dnd_button name="trash_btn" tool_tip="Fjern valgt genstand"/> - </panel> + <layout_stack name="bottom_panel"> + <layout_panel name="options_gear_btn_panel"> + <button name="options_gear_btn" tool_tip="Vis yderligere valg"/> + </layout_panel> + <layout_panel name="add_btn_panel"> + <button name="add_btn" tool_tip="Tilføj ny genstand"/> + </layout_panel> + <layout_panel name="trash_btn_panel"> + <dnd_button name="trash_btn" tool_tip="Fjern valgte genstand"/> + </layout_panel> + </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/da/panel_outfit_edit.xml b/indra/newview/skins/default/xui/da/panel_outfit_edit.xml index de68366610..9aa9fd14cc 100644 --- a/indra/newview/skins/default/xui/da/panel_outfit_edit.xml +++ b/indra/newview/skins/default/xui/da/panel_outfit_edit.xml @@ -2,6 +2,8 @@ <!-- Side tray Outfit Edit panel --> <panel label="Redigér sæt" name="outfit_edit"> <string name="No Outfit" value="Intet sæt"/> + <string name="unsaved_changes" value="Ikke gemte ændringer"/> + <string name="now_editing" value="Redigerer nu"/> <panel.string name="not_available"> (Ikke relevant) </panel.string> @@ -15,24 +17,19 @@ <text name="title" value="Redigér sæt"/> <panel label="bottom_panel" name="header_panel"> <panel label="bottom_panel" name="outfit_name_and_status"> - <text name="status" value="Retter..."/> + <text name="status" value="Redigerer nu..."/> <text name="curr_outfit_name" value="[Current Outfit]"/> </panel> </panel> <layout_stack name="im_panels"> <layout_panel label="IM kontrolpanel" name="outfit_wearables_panel"> - <scroll_list name="look_items_list"> - <scroll_list.columns label="Se genstand" name="look_item"/> - <scroll_list.columns label="Sorter genstande i sæt" name="look_item_sort"/> - </scroll_list> <panel label="bottom_panel" name="edit_panel"/> </layout_panel> <layout_panel name="add_wearables_panel"> - <filter_editor label="Filter" name="look_item_filter"/> + <text name="add_to_outfit_label" value="Tilføj til sæt:"/> <layout_stack name="filter_panels"> - <layout_panel label="IM kontrolpanel" name="filter_button_panel"> - <text name="add_to_outfit_label" value="Tilføj til sæt:"/> - <button label="O" name="filter_button"/> + <layout_panel label="IM kontrolpanel" name="filter_panel"> + <filter_editor label="Filter" name="look_item_filter"/> </layout_panel> </layout_stack> <panel label="add_wearables_button_bar" name="add_wearables_button_bar"> diff --git a/indra/newview/skins/default/xui/da/panel_people.xml b/indra/newview/skins/default/xui/da/panel_people.xml index db72125b84..5d8474259c 100644 --- a/indra/newview/skins/default/xui/da/panel_people.xml +++ b/indra/newview/skins/default/xui/da/panel_people.xml @@ -2,9 +2,9 @@ <!-- Side tray panel --> <panel label="Personer" name="people_panel"> <string name="no_recent_people" value="Ingen tidligere personer. Leder du efter nogen at være sammen med? Prøv [secondlife:///app/search/people Search] eller [secondlife:///app/worldmap World Map]."/> - <string name="no_filtered_recent_people" value="Fandt du ikke hvad du ledte efter? Prøv [secondlife:///app/search/people Search]."/> + <string name="no_filtered_recent_people" value="Fandt du ikke det du søgte? Prøv [secondlife:///app/search/people/[SEARCH_TERM] Search]."/> <string name="no_one_near" value="Ingen i nærheden. Leder du efter nogen at være sammen med? Prøv [secondlife:///app/search/people Search] eller [secondlife:///app/worldmap World Map]."/> - <string name="no_one_filtered_near" value="Fandt du ikke hvad du ledte efter? Prøv [secondlife:///app/search/people Search]."/> + <string name="no_one_filtered_near" value="Fandt du ikke det du søgte? Prøv [secondlife:///app/search/people/[SEARCH_TERM] Search]."/> <string name="no_friends_online" value="Ingen venner online"/> <string name="no_friends" value="Ingen venner"/> <string name="no_friends_msg"> @@ -12,11 +12,11 @@ Leder du efter nogen at være sammen med? Prøv [secondlife:///app/worldmap World Map]. </string> <string name="no_filtered_friends_msg"> - Fandt du ikke hvad du ledte efter? Prøv [secondlife:///app/search/people Search]. + Fandt du ikke det du søgte? Prøv [secondlife:///app/search/people/[SEARCH_TERM] Search]. </string> <string name="people_filter_label" value="Filtrér personer"/> <string name="groups_filter_label" value="Filtrér grupper"/> - <string name="no_filtered_groups_msg" value="Fandt du ikke hvad du ledte efter? Prøv [secondlife:///app/search/groups Search]."/> + <string name="no_filtered_groups_msg" value="Fandt du ikke det du søgte? Prøv [secondlife:///app/search/groups/[SEARCH_TERM] Search]."/> <string name="no_groups_msg" value="Leder du efter grupper at være med i? Prøv [secondlife:///app/search/groups Search]."/> <filter_editor label="Filtrér" name="filter_input"/> <tab_container name="tabs"> @@ -55,7 +55,7 @@ Leder du efter nogen at være sammen med? Prøv [secondlife:///app/worldmap Worl <button label="Profil" name="view_profile_btn" tool_tip="Vis billede, gruppe og anden information om beboer"/> <button label="IM" name="im_btn" tool_tip="Chat privat med denne person"/> <button label="Opkald" name="call_btn" tool_tip="Opkald til denne beboer"/> - <button label="Del" name="share_btn"/> + <button label="Del" name="share_btn" tool_tip="Del en genstand i beholdning"/> <button label="Teleport" name="teleport_btn" tool_tip="Tilbyd teleport"/> <button label="Group profil" name="group_info_btn" tool_tip="Vis gruppe information"/> <button label="Gruppe chat" name="chat_btn" tool_tip="Åben chat session"/> diff --git a/indra/newview/skins/default/xui/da/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/da/panel_preferences_advanced.xml index 4d505db30e..807d7939b8 100644 --- a/indra/newview/skins/default/xui/da/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/da/panel_preferences_advanced.xml @@ -13,6 +13,7 @@ </text> <check_box label="Byg/Redigér" name="edit_camera_movement" tool_tip="Benyt automatisk kamera positionering ved start og slut af editerings modus"/> <check_box label="Udseende" name="appearance_camera_movement" tool_tip="Benyt automatisk kamera positionering ved redigering"/> + <check_box initial_value="1" label="Sidepanel" name="appearance_sidebar_positioning" tool_tip="Benyt automatisk positionering af kamera"/> <check_box label="Vis avatar i førsteperson" name="first_person_avatar_visible"/> <check_box label="Piletaster bruges altid til bevægelse" name="arrow_keys_move_avatar_check"/> <check_box label="Tast-tast-hold for at løbe" name="tap_tap_hold_to_run"/> diff --git a/indra/newview/skins/default/xui/da/panel_preferences_chat.xml b/indra/newview/skins/default/xui/da/panel_preferences_chat.xml index df97193598..20a376f152 100644 --- a/indra/newview/skins/default/xui/da/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/da/panel_preferences_chat.xml @@ -45,6 +45,7 @@ </text> <check_box initial_value="true" label="Afspil skrive animation ved chat" name="play_typing_animation"/> <check_box label="Send e-mail til mig når jeg modtager IM og er offline" name="send_im_to_email"/> + <check_box label="Åben for almindelig tekst i IM og chat historik" name="plain_text_chat_history"/> <text name="show_ims_in_label"> Vis IM'er i: </text> diff --git a/indra/newview/skins/default/xui/da/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/da/panel_preferences_graphics1.xml index 07e3aec72a..586896041d 100644 --- a/indra/newview/skins/default/xui/da/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/da/panel_preferences_graphics1.xml @@ -1,8 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="Grafik" name="Display panel"> - <text name="UI Size:"> - UI størrelse: - </text> <text name="QualitySpeed"> Kvalitet og hastighed: </text> @@ -53,6 +50,10 @@ m </text> <slider label="Maks. antal partikler:" name="MaxParticleCount"/> + <slider label="Maks. avatar optegningsafstand:" name="MaxAvatarDrawDistance"/> + <text name="DrawDistanceMeterText3"> + m + </text> <slider label="Efterbehandlingskvalitet:" name="RenderPostProcess"/> <text name="MeshDetailText"> Netmaske detaljer: diff --git a/indra/newview/skins/default/xui/da/sidepanel_appearance.xml b/indra/newview/skins/default/xui/da/sidepanel_appearance.xml index 43ddfdada7..be049bea38 100644 --- a/indra/newview/skins/default/xui/da/sidepanel_appearance.xml +++ b/indra/newview/skins/default/xui/da/sidepanel_appearance.xml @@ -1,9 +1,13 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="Sæt" name="appearance panel"> <string name="No Outfit" value="Intet sæt"/> + <string name="Unsaved Changes" value="Ikke gemte ændringer"/> + <string name="Now Wearing" value="Bærer nu..."/> <panel name="panel_currentlook"> - <text name="currentlook_title"> - (ikke gemt) + <button label="E" name="editappearance_btn"/> + <button label="O" name="openoutfit_btn"/> + <text name="currentlook_status"> + (Status) </text> </panel> <filter_editor label="Filtrér sæt" name="Filter"/> diff --git a/indra/newview/skins/default/xui/da/sidepanel_inventory.xml b/indra/newview/skins/default/xui/da/sidepanel_inventory.xml index 9a2a348f58..767d74ca3f 100644 --- a/indra/newview/skins/default/xui/da/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/da/sidepanel_inventory.xml @@ -4,6 +4,7 @@ <panel name="button_panel"> <button label="Profil" name="info_btn"/> <button label="Del" name="share_btn"/> + <button label="Køb ind" name="shop_btn"/> <button label="Bær" name="wear_btn"/> <button label="Afspil" name="play_btn"/> <button label="Teleportér" name="teleport_btn"/> diff --git a/indra/newview/skins/default/xui/da/strings.xml b/indra/newview/skins/default/xui/da/strings.xml index bd5ab62be9..5ceb0612a8 100644 --- a/indra/newview/skins/default/xui/da/strings.xml +++ b/indra/newview/skins/default/xui/da/strings.xml @@ -88,6 +88,24 @@ <string name="LoginDownloadingClothing"> Henter tøj... </string> + <string name="InvalidCertificate"> + Serveren returnerede et ugyldigt eller ødelagt certifikat. Kontakt venligst administrator af dette net. + </string> + <string name="CertInvalidHostname"> + Et ugyldig hostnavn blev brugt for at få adgang til serveren. Check venligst din SLURL eller navnet på hosten. + </string> + <string name="CertExpired"> + Certifikat returneret fra nettet ser ud til at være udløbet. Check venligst din systemtid eller kontakt administratoren af dette net. + </string> + <string name="CertKeyUsage"> + Det certifikat der blev returneret af serveren kan ikke benyttes til SSL. Kontakt venligst administrator af dette net. + </string> + <string name="CertBasicConstraints"> + For mange certifikater i serverens certifikat streng. Kontakt venligst administrator af dette net. + </string> + <string name="CertInvalidSignature"> + Certifikat signaturen returneret på dette net kan ikke bekræftes. Kontakt venligst administrator af dette net. + </string> <string name="LoginFailedNoNetwork"> Netværksfejl: Kunne ikke etablere forbindelse, check venligst din netværksforbindelse. </string> @@ -816,6 +834,42 @@ <string name="invalid"> ugyldig </string> + <string name="shirt_not_worn"> + Trøje - ikke på + </string> + <string name="pants_not_worn"> + Bukser - ikke på + </string> + <string name="shoes_not_worn"> + Sko - ikke på + </string> + <string name="socks_not_worn"> + Strømper - ikke på + </string> + <string name="jacket_not_worn"> + Jakke - ikke på + </string> + <string name="gloves_not_worn"> + Handsker - ikke på + </string> + <string name="undershirt_not_worn"> + Undertrøje - ikke på + </string> + <string name="underpants_not_worn"> + Underbukser - ikke på + </string> + <string name="skirt_not_worn"> + Nederdel - ikke på + </string> + <string name="alpha_not_worn"> + Alpha ikke benyttet + </string> + <string name="tattoo_not_worn"> + Tatovering ikke benyttet + </string> + <string name="invalid_not_worn"> + ugyldig + </string> <string name="NewWearable"> Ny [WEARABLE_ITEM] </string> @@ -886,7 +940,10 @@ Tryk ESC for at skift til normalt udsyn </string> <string name="InventoryNoMatchingItems"> - Fandt du ikke hvad du ledte efter. Prøv [secondlife:///app/search/all Search]. + Fandt du ikke hvad du søgte? Prøv [secondlife:///app/search/all/[SEARCH_TERM] Search]. + </string> + <string name="PlacesNoMatchingItems"> + Fandt du ikke hvad du søgte? Prøv [secondlife:///app/search/places/[SEARCH_TERM] Search]. </string> <string name="FavoritesNoMatchingItems"> Træk et landemærke hertil for at tilføje den som favorit. @@ -916,6 +973,7 @@ <string name="Wave" value=" Vink "/> <string name="HelloAvatar" value=" Hej, avatar! "/> <string name="ViewAllGestures" value=" Se alle >>"/> + <string name="GetMoreGestures" value="Få mere >>"/> <string name="Animations" value=" Animationer,"/> <string name="Calling Cards" value=" Visitkort,"/> <string name="Clothing" value=" Tøj,"/> @@ -1528,16 +1586,19 @@ Beboeren du sendte en besked er 'optaget', hvilket betyder at han/hun ikke vil forstyrres. Din besked vil blive vis i hans/hendes IM panel til senere visning. </string> <string name="MuteByName"> - (efter navn) + (Efter navn) </string> <string name="MuteAgent"> (beboer) </string> <string name="MuteObject"> - (objekt) + (Objekt) </string> <string name="MuteGroup"> - (gruppe) + (Gruppe) + </string> + <string name="MuteExternal"> + (Ekstern) </string> <string name="RegionNoCovenant"> Der er ingen regler for dette estate. @@ -3297,11 +3358,14 @@ Hvis du bliver ved med at modtage denne besked, kontakt venligst [SUPPORT_SITE]. <string name="answered_call"> Dit opkald er blevet besvaret </string> - <string name="started_call"> - startede et stemme opkald + <string name="you_started_call"> + Du startede dette stemme kald + </string> + <string name="you_joined_call"> + Du er nu med i stemme opkald </string> - <string name="joined_call"> - tilsluttede stemme opkald + <string name="name_started_call"> + [NAME] startede et stemmekald </string> <string name="ringing-im"> Tilslutter stemme opkald... @@ -3500,6 +3564,90 @@ Krænkelsesanmeldelse <string name="Contents"> Indhold </string> + <string name="Gesture"> + Bevægelse + </string> + <string name="Male Gestures"> + Mandlige bevægelser + </string> + <string name="Female Gestures"> + Kvindelige bevægelser + </string> + <string name="Other Gestures"> + Andre bevægelser + </string> + <string name="Speech Gestures"> + Tale bevægelser + </string> + <string name="Common Gestures"> + Almindelige bevægelser + </string> + <string name="Male - Excuse me"> + Mand - Undskyld mig + </string> + <string name="Male - Get lost"> + Mand - Skrid! + </string> + <string name="Male - Blow kiss"> + Mand - Pust et kys + </string> + <string name="Male - Boo"> + Mand - Boo + </string> + <string name="Male - Bored"> + Mand - Keder sig + </string> + <string name="Male - Hey"> + Mand - Hey + </string> + <string name="Male - Laugh"> + Mand - Latter + </string> + <string name="Male - Repulsed"> + Mand - Frastødt + </string> + <string name="Male - Shrug"> + Mand - Skuldertræk + </string> + <string name="Male - Stick tougue out"> + Mand - Stik tunge ud + </string> + <string name="Male - Wow"> + Mand - Wow + </string> + <string name="FeMale - Excuse me"> + Kvinde - Undskyld mig + </string> + <string name="FeMale - Get lost"> + Kvinde - Skrid! + </string> + <string name="FeMale - Blow kiss"> + Kvinde - Pust et kys + </string> + <string name="FeMale - Boo"> + Kvinde - Boo + </string> + <string name="Female - Bored"> + Kvinde - Keder sig + </string> + <string name="Female - Hey"> + Kvinde - Hey + </string> + <string name="Female - Laugh"> + Kvinde - Latter + </string> + <string name="Female - Repulsed"> + Kvinde - Frastødt + </string> + <string name="Female - Shrug"> + Kvinde - Skuldertræk + </string> + <string name="Female - Stick tougue out"> + Kvinde - Stik tungen ud + </string> + <string name="Female - Wow"> + Kvinde - Wow + </string> <string name="AvatarBirthDateFormat"> [mthnum,datetime,slt]/[day,datetime,slt]/[year,datetime,slt] </string> diff --git a/indra/newview/skins/default/xui/de/floater_buy_land.xml b/indra/newview/skins/default/xui/de/floater_buy_land.xml index 5708a3f80a..5369155cf9 100644 --- a/indra/newview/skins/default/xui/de/floater_buy_land.xml +++ b/indra/newview/skins/default/xui/de/floater_buy_land.xml @@ -124,9 +124,6 @@ unterstützt [AMOUNT2] Objekte <floater.string name="no_parcel_selected"> (keine Parzelle ausgewählt) </floater.string> - <floater.string name="icon_PG" value="Parcel_PG_Dark"/> - <floater.string name="icon_M" value="Parcel_M_Dark"/> - <floater.string name="icon_R" value="Parcel_R_Dark"/> <text name="region_name_label"> Region: </text> diff --git a/indra/newview/skins/default/xui/de/panel_bottomtray.xml b/indra/newview/skins/default/xui/de/panel_bottomtray.xml index d52b8dcf4d..83f67344ca 100644 --- a/indra/newview/skins/default/xui/de/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/de/panel_bottomtray.xml @@ -9,7 +9,7 @@ <layout_stack name="toolbar_stack"> <layout_panel name="speak_panel"> <talk_button name="talk"> - <speak_button label="Sprechen" label_selected="Sprechen" name="speak_btn" halign="right" /> + <speak_button label="Sprechen" label_selected="Sprechen" name="speak_btn" /> </talk_button> </layout_panel> <layout_panel name="gesture_panel"> diff --git a/indra/newview/skins/default/xui/de/panel_landmark_info.xml b/indra/newview/skins/default/xui/de/panel_landmark_info.xml index 9cef7b6d35..10cf34c170 100644 --- a/indra/newview/skins/default/xui/de/panel_landmark_info.xml +++ b/indra/newview/skins/default/xui/de/panel_landmark_info.xml @@ -18,9 +18,6 @@ <string name="acquired_date"> [wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local] </string> - <string name="icon_PG" value="parcel_drk_PG"/> - <string name="icon_M" value="parcel_drk_M"/> - <string name="icon_R" value="parcel_drk_R"/> <button name="back_btn" tool_tip="Hinten"/> <text name="title" value="Ortsprofil"/> <scroll_container name="place_scroll"> diff --git a/indra/newview/skins/default/xui/de/panel_place_profile.xml b/indra/newview/skins/default/xui/de/panel_place_profile.xml index ed1421aa60..9d1a582b7c 100644 --- a/indra/newview/skins/default/xui/de/panel_place_profile.xml +++ b/indra/newview/skins/default/xui/de/panel_place_profile.xml @@ -41,21 +41,6 @@ <string name="acquired_date"> [wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local] </string> - <string name="icon_PG" value="parcel_drk_PG"/> - <string name="icon_M" value="parcel_drk_M"/> - <string name="icon_R" value="parcel_drk_R"/> - <string name="icon_Voice" value="parcel_drk_Voice"/> - <string name="icon_VoiceNo" value="parcel_drk_VoiceNo"/> - <string name="icon_Fly" value="parcel_drk_Fly"/> - <string name="icon_FlyNo" value="parcel_drk_FlyNo"/> - <string name="icon_Push" value="parcel_drk_Push"/> - <string name="icon_PushNo" value="parcel_drk_PushNo"/> - <string name="icon_Build" value="parcel_drk_Build"/> - <string name="icon_BuildNo" value="parcel_drk_BuildNo"/> - <string name="icon_Scripts" value="parcel_drk_Scripts"/> - <string name="icon_ScriptsNo" value="parcel_drk_ScriptsNo"/> - <string name="icon_Damage" value="parcel_drk_Damage"/> - <string name="icon_DamageNo" value="parcel_drk_DamageNo"/> <button name="back_btn" tool_tip="Hinten"/> <text name="title" value="Ortsprofil"/> <scroll_container name="place_scroll"> diff --git a/indra/newview/skins/default/xui/en/floater_buy_land.xml b/indra/newview/skins/default/xui/en/floater_buy_land.xml index df44b61632..acaa508792 100644 --- a/indra/newview/skins/default/xui/en/floater_buy_land.xml +++ b/indra/newview/skins/default/xui/en/floater_buy_land.xml @@ -174,12 +174,15 @@ supports [AMOUNT2] objects </floater.string> <floater.string name="icon_PG" + translate="false" value="Parcel_PG_Dark"/> <floater.string name="icon_M" + translate="false" value="Parcel_M_Dark"/> <floater.string name="icon_R" + translate="false" value="Parcel_R_Dark"/> <text type="string" diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml index f537c81860..c9b013099b 100644 --- a/indra/newview/skins/default/xui/en/floater_im_session.xml +++ b/indra/newview/skins/default/xui/en/floater_im_session.xml @@ -33,7 +33,6 @@ name="panel_im_control_panel" layout="topleft" follows="left" - label="IM Control Panel" min_width="115" auto_resize="false" user_resize="true" /> diff --git a/indra/newview/skins/default/xui/en/floater_voice_controls.xml b/indra/newview/skins/default/xui/en/floater_voice_controls.xml index 5b77f11d71..0569b4d515 100644 --- a/indra/newview/skins/default/xui/en/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/en/floater_voice_controls.xml @@ -3,7 +3,7 @@ can_resize="true" can_minimize="true" can_close="false" - height="202" + height="205" layout="topleft" min_height="124" min_width="190" @@ -50,7 +50,7 @@ user_resize="false" auto_resize="false" layout="topleft" - height="26" + height="20" name="my_panel"> <avatar_icon enabled="false" @@ -86,23 +86,38 @@ visible="true" width="20" /> </layout_panel> - <layout_panel - auto_resize="false" - user_resize="false" - follows="top|left" - height="26" - visible="true" - layout="topleft" - name="leave_call_btn_panel" - width="100"> - <button - follows="right|top" - height="23" - top_pad="0" - label="Leave Call" - name="leave_call_btn" - width="100" /> - </layout_panel> + <layout_stack + clip="true" + auto_resize="false" + follows="left|top|right" + height="26" + layout="topleft" + mouse_opaque="false" + name="voice_effect_and_leave_call_stack" + orientation="horizontal" + width="262"> + <panel + class="panel_voice_effect" + name="panel_voice_effect" + visiblity_control="VoiceMorphingEnabled" + filename="panel_voice_effect.xml" /> + <layout_panel + auto_resize="false" + user_resize="false" + follows="top|right" + height="23" + visible="true" + layout="topleft" + name="leave_call_btn_panel" + width="100"> + <button + follows="right|top" + height="23" + label="Leave Call" + name="leave_call_btn" + width="100" /> + </layout_panel> + </layout_stack> <layout_panel follows="all" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/floater_voice_effect.xml b/indra/newview/skins/default/xui/en/floater_voice_effect.xml new file mode 100644 index 0000000000..edc25348e4 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_voice_effect.xml @@ -0,0 +1,101 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<floater + legacy_header_height="18" + can_resize="true" + height="420" + name="voice_effects" + help_topic="voice_effects" + title="PREVIEW VOICE MORPHING" + background_visible="true" + follows="all" + label="Places" + layout="topleft" + min_height="350" + min_width="330" + width="455"> + <string name="no_voice_effect"> + (No Voice Morph) + </string> + <string name="active_voice_effect"> + (Active) + </string> + <string name="unsubscribed_voice_effect"> + (Unsubscribed) + </string> + <string name="new_voice_effect"> + (New!) + </string> + <text + height="68" + word_wrap="true" + use_ellipses="true" + type="string" + follows="left|top|right" + layout="topleft" + left="10" + name="status_text" + right="-10" + top="25"> +To preview any of the Voice Morphing effects, click the Record button to record a short snippet of voice, then click any Voice Morph in the list to hear how it will sound. + +To reconnect to Nearby Voice simply close this window. + </text> + <button + follows="left|top" + height="23" + label="Record Sample" + layout="topleft" + left="10" + name="record_btn" + tool_tip="Record a sample of your voice." + top_pad="5" + width="150"> + <button.commit_callback + function="VoiceEffect.Record" /> + </button> + <button + follows="left|top" + height="23" + label="Stop" + layout="topleft" + left_delta="0" + name="record_stop_btn" + top_delta="0" + width="150"> + <button.commit_callback + function="VoiceEffect.Stop" /> + </button> + <text + height="18" + halign="right" + use_ellipses="true" + type="string" + follows="left|top|right" + layout="topleft" + left_pad="10" + name="voice_morphing_link" + right="-10" + top_delta="5"> + [[URL] Get Voice Morphing] + </text> + <scroll_list + bottom="-10" + draw_heading="true" + follows="all" + layout="topleft" + left="10" + multi_select="false" + name="voice_effect_list" + right="-10" + tool_tip="Record a sample of your voice, then click an effect to preview." + top="128"> + <scroll_list.columns + label="Voice Morph" + name="name" relative_width="0.41"/> + <scroll_list.columns + dynamic_width="true" + label="Expires" + name="expires" + relative_width="0.59" /> + </scroll_list> +</floater> diff --git a/indra/newview/skins/default/xui/en/floater_world_map.xml b/indra/newview/skins/default/xui/en/floater_world_map.xml index ad40cafe61..ece406f9b1 100644 --- a/indra/newview/skins/default/xui/en/floater_world_map.xml +++ b/indra/newview/skins/default/xui/en/floater_world_map.xml @@ -178,16 +178,16 @@ width="90"> Land Sale </text> - <icon - color="1 1 0.25 1" + <icon + color="0.5 0.25 1 1" follows="top|right" height="16" image_name="legend.tga" layout="topleft" mouse_opaque="true" name="square2" - left="41" - top_pad="-2" + left="20" + top_pad="2" width="16" /> <text type="string" @@ -196,21 +196,21 @@ height="16" layout="topleft" left_pad="0" - name="by_owner_label" + name="auction_label" top_delta="3" - width="100"> - by owner + width="170"> + land auction </text> - <icon - color="0.5 0.25 1 1" + <icon + color="1 1 0.25 1" follows="top|right" height="16" image_name="legend.tga" layout="topleft" mouse_opaque="true" name="square2" - left="41" - top_pad="-3" + left="20" + top_pad="-5" width="16" /> <text type="string" @@ -219,10 +219,10 @@ height="16" layout="topleft" left_pad="0" - name="auction_label" + name="by_owner_label" top_delta="3" - width="170"> - land auction + width="100"> + by owner </text> <button diff --git a/indra/newview/skins/default/xui/en/main_view.xml b/indra/newview/skins/default/xui/en/main_view.xml index d8410a26dd..72ab6195bc 100644 --- a/indra/newview/skins/default/xui/en/main_view.xml +++ b/indra/newview/skins/default/xui/en/main_view.xml @@ -73,6 +73,17 @@ mouse_opaque="false" name="hud container" width="500"> + <panel auto_resize="false" + follows="left|top" + height="19" + left="0" + mouse_opaque="false" + name="topinfo_bar_container" + tab_stop="false" + top="0" + user_resize="false" + visible="false" + width="1024"/> <panel follows="right|top|bottom" height="500" mouse_opaque="false" diff --git a/indra/newview/skins/default/xui/en/menu_hide_navbar.xml b/indra/newview/skins/default/xui/en/menu_hide_navbar.xml index a175b3103f..3f38d734b9 100644 --- a/indra/newview/skins/default/xui/en/menu_hide_navbar.xml +++ b/indra/newview/skins/default/xui/en/menu_hide_navbar.xml @@ -12,10 +12,10 @@ label="Show Navigation Bar" layout="topleft" name="ShowNavbarNavigationPanel"> - <menu_item_check.on_click + <on_click function="ToggleControl" parameter="ShowNavbarNavigationPanel" /> - <menu_item_check.on_check + <on_check function="CheckControl" parameter="ShowNavbarNavigationPanel" /> </menu_item_check> @@ -23,11 +23,22 @@ label="Show Favorites Bar" layout="topleft" name="ShowNavbarFavoritesPanel"> - <menu_item_check.on_click + <on_click function="ToggleControl" parameter="ShowNavbarFavoritesPanel" /> - <menu_item_check.on_check + <on_check function="CheckControl" parameter="ShowNavbarFavoritesPanel" /> </menu_item_check> + <menu_item_check + label="Show Mini-Location Bar" + layout="topleft" + name="ShowMiniLocationPanel"> + <on_click + function="ToggleControl" + parameter="ShowMiniLocationPanel" /> + <on_check + function="CheckControl" + parameter="ShowMiniLocationPanel" /> + </menu_item_check> </menu> diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml index 11459ad0e6..221457ac1f 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory.xml @@ -662,6 +662,14 @@ parameter="wear" /> </menu_item_call> <menu_item_call + label="Add" + layout="topleft" + name="Wearable Add"> + <menu_item_call.on_click + function="Inventory.DoToSelected" + parameter="wear_add" /> + </menu_item_call> + <menu_item_call label="Take Off" layout="topleft" name="Take Off"> diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index aff8f7ddf4..2641ce4ee4 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -80,6 +80,17 @@ function="Floater.Toggle" parameter="gestures" /> </menu_item_check> + <menu_item_check + label="My Voice" + name="ShowVoice" + visibility_control="VoiceMorphingEnabled"> + <menu_item_check.on_check + function="Floater.Visible" + parameter="voice_effect" /> + <menu_item_check.on_click + function="Floater.Toggle" + parameter="voice_effect" /> + </menu_item_check> <menu label="My Status" name="Status" diff --git a/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml b/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml index e645702f93..fa5ca60a19 100644 --- a/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml +++ b/indra/newview/skins/default/xui/en/menu_wearable_list_item.xml @@ -9,6 +9,13 @@ function="Wearable.Wear" /> </menu_item_call> <menu_item_call + label="Add" + layout="topleft" + name="wear_add"> + <on_click + function="Wearable.Add" /> + </menu_item_call> + <menu_item_call label="Take Off / Detach" layout="topleft" name="take_off_or_detach"> diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 5b06b0d651..439f67e7b1 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -2069,6 +2069,29 @@ Would you be my friend? </notification> <notification + icon="alertmodal.tga" + label="Save Wearable" + name="SaveWearableAs" + type="alertmodal"> + Save item to my inventory as: + <form name="form"> + <input name="message" type="text"> + [DESC] (new) + </input> + <button + default="true" + index="0" + name="Offer" + text="OK"/> + <button + index="1" + name="Cancel" + text="Cancel"/> + </form> + </notification> + + + <notification icon="alertmodal.tga" label="Rename Outfit" name="RenameOutfit" @@ -5981,6 +6004,50 @@ We are creating a voice channel for you. This may take up to one minute. </notification> <notification + icon="notify.tga" + name="VoiceEffectsExpired" + sound="UISndAlert" + persist="true" + type="notify"> +One or more of your subscribed Voice Morphs has expired. +[[URL] Click here] to renew your subscription. + <unique/> + </notification> + + <notification + icon="notify.tga" + name="VoiceEffectsExpiredInUse" + sound="UISndAlert" + persist="true" + type="notify"> +The active Voice Morph has expired, your normal voice settings have been applied. +[[URL] Click here] to renew your subscription. + <unique/> + </notification> + + <notification + icon="notify.tga" + name="VoiceEffectsWillExpire" + sound="UISndAlert" + persist="true" + type="notify"> +One or more of your Voice Morphs will expire in less than [INTERVAL] days. +[[URL] Click here] to renew your subscription. + <unique/> + </notification> + LLNotificationsUtil::add("VoiceEffectsNew"); + + <notification + icon="notify.tga" + name="VoiceEffectsNew" + sound="UISndAlert" + persist="true" + type="notify"> +New Voice Morphs are available! + <unique/> + </notification> + + <notification icon="notifytip.tga" name="Cannot enter parcel: not a group member" type="notifytip"> diff --git a/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml b/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml index 2edd643cc5..4e5f594ffe 100644 --- a/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_body_parts_list_item.xml @@ -9,22 +9,22 @@ width="380"> <icon follows="top|right|left" - height="23" + height="22" image_name="ListItem_Over" layout="topleft" left="0" name="hovered_icon" - top="0" + top="1" visible="false" width="380" /> <icon - height="23" + height="22" follows="top|right|left" image_name="ListItem_Select" layout="topleft" left="0" name="selected_icon" - top="0" + top="1" visible="false" width="380" /> <icon @@ -45,7 +45,7 @@ use_ellipses="true" name="item_name" text_color="white" - top="4" + top="5" value="..." width="359" /> <panel @@ -53,7 +53,6 @@ name="btn_lock" layout="topleft" follows="top|right" - image_name="Locked_Icon" top="0" left="0" height="23" @@ -70,24 +69,35 @@ width="9" tab_stop="false" /> </panel> - <button - name="btn_edit" + <panel + background_visible="false" + name="btn_edit_panel" layout="topleft" follows="top|right" - image_overlay="Edit_Wrench" - top="0" + top="1" left_pad="3" height="23" - width="23" - tab_stop="false" /> - <panel - background_visible="true" - bg_alpha_color="0.4 0.4 0.4 1.0" - bottom="0" + width="26" + tab_stop="false"> + <button + name="btn_edit" + layout="topleft" + follows="top|right" + image_overlay="Edit_Wrench" + top="0" + left="0" + height="23" + width="23" + tab_stop="false" /> + </panel> + <icon follows="left|right|top" - height="1" + height="3" + image_name="Wearables_Divider" layout="bottomleft" left="0" - name="wearable_type_separator_panel" + name="wearable_type_separator_icon" + top="0" + visible="true" width="380"/> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index 82b2405ec9..4eff5bc48a 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -90,7 +90,7 @@ label="Speak" label_selected="Speak" name="speak_btn" - pad_right="22" + pad_right="20" tab_stop="true" use_ellipses="true" /> </talk_button> diff --git a/indra/newview/skins/default/xui/en/panel_clothing_list_item.xml b/indra/newview/skins/default/xui/en/panel_clothing_list_item.xml index 035e8607ec..5d81aebbd5 100644 --- a/indra/newview/skins/default/xui/en/panel_clothing_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_clothing_list_item.xml @@ -9,22 +9,22 @@ width="380"> <icon follows="top|right|left" - height="23" + height="22" image_name="ListItem_Over" layout="topleft" left="0" name="hovered_icon" - top="0" + top="1" visible="false" width="380" /> <icon - height="23" + height="22" follows="top|right|left" image_name="ListItem_Select" layout="topleft" left="0" name="selected_icon" - top="0" + top="1" visible="false" width="380" /> <button @@ -33,10 +33,10 @@ follows="top|left" image_unselected="Toast_CloseBtn" image_selected="Toast_CloseBtn" - top="0" + top="3" left="0" - height="20" - width="20" + height="18" + width="18" tab_stop="false" /> <icon height="16" @@ -56,7 +56,7 @@ use_ellipses="true" name="item_name" text_color="white" - top="4" + top="5" value="..." width="359" /> <button @@ -64,7 +64,7 @@ layout="topleft" follows="top|right" image_overlay="UpArrow_Off" - top="0" + top="1" left="0" height="23" width="23" @@ -74,7 +74,7 @@ layout="topleft" follows="top|right" image_overlay="DownArrow_Off" - top="0" + top="1" left_pad="3" height="23" width="23" @@ -84,7 +84,6 @@ name="btn_lock" layout="topleft" follows="top|right" - image_name="Locked_Icon" top="0" left="0" height="23" @@ -101,25 +100,35 @@ width="9" tab_stop="false" /> </panel> - <button - name="btn_edit" + <panel + background_visible="false" + name="btn_edit_panel" layout="topleft" follows="top|right" - image_overlay="Edit_Wrench" top="0" left_pad="3" height="23" - width="23" - tab_stop="false" /> - <panel - background_visible="true" - bg_alpha_color="0.4 0.4 0.4 1.0" - bottom="0" + width="26" + tab_stop="false"> + <button + name="btn_edit" + layout="topleft" + follows="top|right" + image_overlay="Edit_Wrench" + top="1" + left="0" + height="23" + width="23" + tab_stop="false" /> + </panel> + <icon follows="left|right|top" - height="1" + height="3" + image_name="Wearables_Divider" layout="bottomleft" left="0" - name="wearable_type_separator_panel" + name="wearable_type_separator_icon" + top="0" visible="false" width="380"/> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_cof_wearables.xml b/indra/newview/skins/default/xui/en/panel_cof_wearables.xml index 5f34c24bca..d36c2a4e6f 100644 --- a/indra/newview/skins/default/xui/en/panel_cof_wearables.xml +++ b/indra/newview/skins/default/xui/en/panel_cof_wearables.xml @@ -11,7 +11,7 @@ <accordion fit_parent="true" follows="all" - height="200" + height="198" layout="topleft" left="0" single_expansion="true" @@ -28,6 +28,7 @@ allow_select="true" follows="all" height="10" + item_pad="2" layout="topleft" left="0" multi_select="true" @@ -43,6 +44,7 @@ allow_select="true" follows="all" height="10" + item_pad="2" layout="topleft" left="0" multi_select="true" @@ -58,6 +60,7 @@ allow_select="true" follows="all" height="10" + item_pad="2" layout="topleft" left="0" multi_select="true" diff --git a/indra/newview/skins/default/xui/en/panel_deletable_wearable_list_item.xml b/indra/newview/skins/default/xui/en/panel_deletable_wearable_list_item.xml index 2f37b9d3c9..45031859f1 100644 --- a/indra/newview/skins/default/xui/en/panel_deletable_wearable_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_deletable_wearable_list_item.xml @@ -9,22 +9,22 @@ width="380"> <icon follows="top|right|left" - height="20" + height="22" image_name="ListItem_Over" layout="topleft" left="0" name="hovered_icon" - top="0" + top="1" visible="false" width="380" /> <icon - height="20" + height="22" follows="top|right|left" image_name="ListItem_Select" layout="topleft" left="0" name="selected_icon" - top="0" + top="1" visible="false" width="380" /> <button @@ -33,10 +33,10 @@ follows="top|left" image_unselected="Toast_CloseBtn" image_selected="Toast_CloseBtn" - top="0" + top="3" left="0" - height="20" - width="20" + height="18" + width="18" tab_stop="false" /> <icon height="16" @@ -56,18 +56,17 @@ use_ellipses="true" name="item_name" text_color="white" - top="4" + top="5" value="..." width="359" /> - <panel - background_visible="true" - bg_alpha_color="0.4 0.4 0.4 1.0" - bottom="0" + <icon follows="left|right|top" - height="1" + height="3" + image_name="Wearables_Divider" layout="bottomleft" left="0" - name="wearable_type_separator_panel" + name="wearable_type_separator_icon" + top="0" visible="true" width="380"/> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml b/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml index 06371b7489..20652df918 100644 --- a/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_dummy_clothing_list_item.xml @@ -9,22 +9,22 @@ width="380"> <icon follows="top|right|left" - height="23" + height="22" image_name="ListItem_Over" layout="topleft" left="0" name="hovered_icon" - top="0" + top="1" visible="false" width="380" /> <icon - height="23" + height="22" follows="top|right|left" image_name="ListItem_Select" layout="topleft" left="0" name="selected_icon" - top="0" + top="1" visible="false" width="380" /> <icon @@ -59,14 +59,14 @@ height="23" width="23" tab_stop="false" /> - <panel - background_visible="true" - bg_alpha_color="0.4 0.4 0.4 1.0" - bottom="0" + <icon follows="left|right|top" - height="1" + height="3" + image_name="Wearables_Divider" layout="bottomleft" left="0" - name="wearable_type_separator_panel" + name="wearable_type_separator_icon" + top="0" + visible="true" width="380"/> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_edit_alpha.xml b/indra/newview/skins/default/xui/en/panel_edit_alpha.xml index cfcdc25f81..7bcd4962d2 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_alpha.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_alpha.xml @@ -21,126 +21,131 @@ name="avatar_alpha_color_panel" top="0" width="313" > + <check_box + control_name="LowerAlphaTextureInvisible" + follows="left" + height="16" + layout="topleft" + left="5" + name="lower alpha texture invisible" + top="10" + width="16" /> <texture_picker can_apply_immediately="true" default_image_name="Default" follows="left|top" - height="100" + height="115" label="Lower Alpha" layout="topleft" - left="30" + left_pad="5" name="Lower Alpha" tool_tip="Click to choose a picture" top="10" - width="94" > + width="115" > <texture_picker.commit_callback function="TexturePicker.Commit" /> </texture_picker> + <check_box - control_name="LowerAlphaTextureInvisible" + control_name="UpperAlphaTextureInvisible" follows="left" height="16" layout="topleft" - left_pad="6" - name="lower alpha texture invisible" - top_delta="4" + left_pad="20" + name="upper alpha texture invisible" + top="10" width="16" /> <texture_picker can_apply_immediately="true" default_image_name="Default" follows="left|top" - height="100" + height="115" label="Upper Alpha" layout="topleft" - left_pad="20" + left_pad="5" name="Upper Alpha" tool_tip="Click to choose a picture" top="10" - width="94"> + width="115"> <texture_picker.commit_callback function="TexturePicker.Commit" /> </texture_picker> + <check_box - control_name="UpperAlphaTextureInvisible" + control_name="HeadAlphaTextureInvisible" follows="left" height="16" layout="topleft" - left_pad="6" - name="upper alpha texture invisible" - top_delta="4" + left="5" + name="head alpha texture invisible" + top_pad="15" width="16" /> <texture_picker can_apply_immediately="true" default_image_name="Default" follows="left|top" - height="100" + height="115" label="Head Alpha" layout="topleft" - left="30" + left_pad="5" name="Head Alpha" tool_tip="Click to choose a picture" - top="120" - width="94" > + top_delta="0" + width="115" > <texture_picker.commit_callback function="TexturePicker.Commit" /> </texture_picker> + <check_box - control_name="HeadAlphaTextureInvisible" + control_name="Eye AlphaTextureInvisible" follows="left" height="16" layout="topleft" - left_pad="6" - name="head alpha texture invisible" - top_delta="4" + left_pad="20" + name="eye alpha texture invisible" + top_delta="0" width="16" /> <texture_picker can_apply_immediately="true" default_image_name="Default" follows="left|top" - height="100" + height="115" label="Eye Alpha" layout="topleft" - left_pad="20" + left_pad="5" name="Eye Alpha" tool_tip="Click to choose a picture" - top="120" - width="94" > + top_delta="0" + width="115" > <texture_picker.commit_callback function="TexturePicker.Commit" /> </texture_picker> + <check_box - control_name="Eye AlphaTextureInvisible" + control_name="HairAlphaTextureInvisible" follows="left" height="16" layout="topleft" - left_pad="6" - name="eye alpha texture invisible" - top_delta="4" + left="5" + name="hair alpha texture invisible" + top_pad="15" width="16" /> <texture_picker can_apply_immediately="true" default_image_name="Default" follows="left|top" - height="100" + height="115" label="Hair Alpha" layout="topleft" left="30" name="Hair Alpha" tool_tip="Click to choose a picture" - top="230" - width="94" > + top_delta="0" + width="115" > <texture_picker.commit_callback function="TexturePicker.Commit" /> </texture_picker> - <check_box - control_name="HairAlphaTextureInvisible" - follows="left" - height="16" - layout="topleft" - left_pad="6" - name="hair alpha texture invisible" - top_delta="4" - width="16" /> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml index 67ff71cef1..645ee8a435 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml @@ -7,6 +7,7 @@ label="Wearable" layout="topleft" left="0" + help_topic="edit_wearable" name="panel_edit_wearable" top="0" width="333"> @@ -235,7 +236,7 @@ left="0" </panel> <panel follows="all" - height="408" + height="433" layout="topleft" left="0" name="edit_subpanel_container" @@ -246,7 +247,7 @@ left="0" <panel filename="panel_edit_shape.xml" follows="all" - height="408" + height="433" layout="topleft" left="0" name="edit_shape_panel" @@ -256,7 +257,7 @@ left="0" <panel filename="panel_edit_skin.xml" follows="all" - height="400" + height="425" layout="topleft" left="0" name="edit_skin_panel" @@ -266,7 +267,7 @@ left="0" <panel filename="panel_edit_hair.xml" follows="all" - height="400" + height="425" layout="topleft" left="0" name="edit_hair_panel" @@ -276,7 +277,7 @@ left="0" <panel filename="panel_edit_eyes.xml" follows="all" - height="400" + height="425" layout="topleft" left="0" name="edit_eyes_panel" @@ -286,7 +287,7 @@ left="0" <panel filename="panel_edit_shirt.xml" follows="all" - height="400" + height="425" layout="topleft" left="0" name="edit_shirt_panel" @@ -296,7 +297,7 @@ left="0" <panel filename="panel_edit_pants.xml" follows="all" - height="400" + height="425" layout="topleft" left="0" name="edit_pants_panel" @@ -306,7 +307,7 @@ left="0" <panel filename="panel_edit_shoes.xml" follows="all" - height="400" + height="425" layout="topleft" left="0" name="edit_shoes_panel" @@ -316,7 +317,7 @@ left="0" <panel filename="panel_edit_socks.xml" follows="all" - height="400" + height="425" layout="topleft" left="0" name="edit_socks_panel" @@ -326,7 +327,7 @@ left="0" <panel filename="panel_edit_jacket.xml" follows="all" - height="400" + height="425" layout="topleft" left="0" name="edit_jacket_panel" @@ -336,7 +337,7 @@ left="0" <panel filename="panel_edit_skirt.xml" follows="all" - height="400" + height="425" layout="topleft" left="0" name="edit_skirt_panel" @@ -346,7 +347,7 @@ left="0" <panel filename="panel_edit_gloves.xml" follows="all" - height="400" + height="425" layout="topleft" left="0" name="edit_gloves_panel" @@ -356,7 +357,7 @@ left="0" <panel filename="panel_edit_undershirt.xml" follows="all" - height="400" + height="425" layout="topleft" left="0" name="edit_undershirt_panel" @@ -366,7 +367,7 @@ left="0" <panel filename="panel_edit_underpants.xml" follows="all" - height="400" + height="425" layout="topleft" left="0" name="edit_underpants_panel" @@ -376,7 +377,7 @@ left="0" <panel filename="panel_edit_alpha.xml" follows="all" - height="400" + height="425" layout="topleft" left="0" name="edit_alpha_panel" @@ -386,7 +387,7 @@ left="0" <panel filename="panel_edit_tattoo.xml" follows="all" - height="400" + height="425" layout="topleft" left="0" name="edit_tattoo_panel" @@ -394,65 +395,7 @@ left="0" visible="false" width="333" /> </panel> - <panel - follows="bottom|left|right" - height="25" - label="gear_buttom_panel" - layout="topleft" - left="0" - name="gear_buttom_panel" - top_pad="0" - width="333"> - <button - follows="bottom|left" - tool_tip="Options" - height="25" - image_hover_unselected="Toolbar_Left_Over" - image_disabled="OptionsMenu_Disabled" - image_overlay="OptionsMenu_Off" - image_selected="Toolbar_Left_Selected" - image_unselected="Toolbar_Left_Off" - layout="topleft" - left="10" - name="friends_viewsort_btn" - top="0" - width="31" /> - <button - follows="bottom|left" - height="25" - image_hover_unselected="Toolbar_Middle_Over" - image_overlay="AddItem_Off" - image_selected="Toolbar_Middle_Selected" - image_unselected="Toolbar_Middle_Off" - image_disabled="AddItem_Disabled" - layout="topleft" - left_pad="1" - name="add_btn" - tool_tip="TODO" - width="31" /> - <icon - follows="bottom|left|right" - height="25" - image_name="Toolbar_Middle_Off" - layout="topleft" - left_pad="1" - name="dummy_right_icon" - width="218" > - </icon> - <button - follows="bottom|right" - height="25" - image_hover_unselected="Toolbar_Right_Over" - image_overlay="TrashItem_Off" - image_selected="Toolbar_Right_Selected" - image_unselected="Toolbar_Right_Off" - image_disabled="TrashItem_Disabled" - layout="topleft" - left_pad="1" - name="del_btn" - tool_tip="TODO" - width="31" /> - </panel> + <panel follows="bottom|left|right" height="23" diff --git a/indra/newview/skins/default/xui/en/panel_landmark_info.xml b/indra/newview/skins/default/xui/en/panel_landmark_info.xml index 25674a1a39..bb73360e0b 100644 --- a/indra/newview/skins/default/xui/en/panel_landmark_info.xml +++ b/indra/newview/skins/default/xui/en/panel_landmark_info.xml @@ -46,12 +46,15 @@ <!-- Texture names for rating icons --> <string name="icon_PG" + translate="false" value="Parcel_PG_Dark" /> <string name="icon_M" + translate="false" value="Parcel_M_Dark" /> <string name="icon_R" + translate="false" value="Parcel_R_Dark" /> <button follows="top|right" diff --git a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml index 2ff46637f1..c9802a269c 100644 --- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml +++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml @@ -5,8 +5,8 @@ border="false" height="600" follows="all" - label="Outfit Edit" layout="topleft" + help_topic="edit_outfit" left="0" min_height="350" name="outfit_edit" @@ -85,7 +85,6 @@ bevel_style="none" follows="top|left|right" height="40" - label="bottom_panel" layout="topleft" left="6" name="header_panel" @@ -106,7 +105,6 @@ bevel_style="none" follows="top|right" height="38" - label="bottom_panel" layout="topleft" left_pad="5" name="outfit_name_and_status" @@ -160,7 +158,6 @@ It is calculated as border_size + 2*UIResizeBarOverlap <layout_panel layout="topleft" height="187" - label="IM Control Panel" min_height="100" name="outfit_wearables_panel" width="313" @@ -183,7 +180,6 @@ It is calculated as border_size + 2*UIResizeBarOverlap bg_alpha_color="DkGray2" layout="topleft" height="154" - label="add_button_and_combobox" name="add_button_and_combobox" width="311" user_resize="false" @@ -205,6 +201,9 @@ It is calculated as border_size + 2*UIResizeBarOverlap <button follows="left|bottom" height="22" + image_pressed="PushButton_Press" + image_pressed_selected="PushButton_Selected_Press" + image_selected="PushButton_Selected_Press" is_toggle="true" label="Add More..." layout="topleft" @@ -227,6 +226,9 @@ It is calculated as border_size + 2*UIResizeBarOverlap follows="bottom|right" height="22" image_overlay="Search_Icon" + image_pressed="PushButton_Press" + image_pressed_selected="PushButton_Selected_Press" + image_selected="PushButton_Selected_Press" is_toggle="true" layout="topleft" name="filter_button" @@ -250,15 +252,14 @@ It is calculated as border_size + 2*UIResizeBarOverlap background_image="TextField_Search_Off" enabled="true" follows="left|right|top" - font="SansSerif" - label="Filter" + label="Filter Inventory Wearables" layout="topleft" left="5" width="290" height="25" name="look_item_filter" + search_button_visible="true" text_color="black" - text_pad_left="25" visible="true"/> </layout_panel> @@ -294,7 +295,7 @@ It is calculated as border_size + 2*UIResizeBarOverlap background_visible="false" border="false" follows="left|top|right|bottom" - height="210" + height="203" layout="topleft" left="0" mouse_opaque="false" @@ -312,7 +313,7 @@ It is calculated as border_size + 2*UIResizeBarOverlap height="210" left="0" mouse_opaque="false" - width="311" + width="310" top_delta="0" visible="true"> <wearable_items_list @@ -338,7 +339,6 @@ It is calculated as border_size + 2*UIResizeBarOverlap bevel_style="none" follows="bottom|left|right" height="27" - label="bottom_panel" layout="topleft" left="5" name="no_add_wearables_button_bar" @@ -373,7 +373,6 @@ It is calculated as border_size + 2*UIResizeBarOverlap bevel_style="none" follows="left|right|bottom" height="27" - label="add_wearables_button_bar" layout="topleft" left="5" name="add_wearables_button_bar" diff --git a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml index 13e1f5ba5c..de1f2cf31b 100644 --- a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml @@ -30,6 +30,7 @@ height="490" name="outfitslist_tab" background_visible="true" + help_topic="my_outfits_tab" follows="all" label="MY OUTFITS" layout="topleft" 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 5cf94c25d7..5c9ae51a48 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,7 @@ background_visible="true" bg_alpha_color="DkGray2" bg_opaque_color="DkGray2" + empty_accordion_text.value="Didn't find what you're looking for? Try [secondlife:///app/search/all/[SEARCH_TERM] Search]." follows="all" height="400" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index b79ef1e287..da28773c74 100644 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -173,6 +173,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M background_visible="true" bg_alpha_color="DkGray2" bg_opaque_color="DkGray2" + empty_accordion_text.value="" follows="all" height="356" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/panel_place_profile.xml b/indra/newview/skins/default/xui/en/panel_place_profile.xml index 57ac79686d..59f1f6d638 100644 --- a/indra/newview/skins/default/xui/en/panel_place_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_place_profile.xml @@ -2,7 +2,7 @@ <panel background_visible="true" follows="all" - height="570" + height="610" layout="topleft" left="0" min_height="350" @@ -95,48 +95,63 @@ <!-- Texture names for parcel permissions icons --> <string name="icon_PG" + translate="false" value="Parcel_PG_Dark" /> <string name="icon_M" + translate="false" value="Parcel_M_Dark" /> <string name="icon_R" + translate="false" value="Parcel_R_Dark" /> <string name="icon_Voice" + translate="false" value="Parcel_Voice_Dark" /> <string name="icon_VoiceNo" + translate="false" value="Parcel_VoiceNo_Dark" /> <string name="icon_Fly" + translate="false" value="Parcel_Fly_Dark" /> <string name="icon_FlyNo" + translate="false" value="Parcel_FlyNo_Dark" /> <string name="icon_Push" + translate="false" value="Parcel_Push_Dark" /> <string name="icon_PushNo" + translate="false" value="Parcel_PushNo_Dark" /> <string name="icon_Build" + translate="false" value="Parcel_Build_Dark" /> <string name="icon_BuildNo" + translate="false" value="Parcel_BuildNo_Dark" /> <string name="icon_Scripts" + translate="false" value="Parcel_Scripts_Dark" /> <string name="icon_ScriptsNo" + translate="false" value="Parcel_ScriptsNo_Dark" /> <string name="icon_Damage" + translate="false" value="Parcel_Damage_Dark" /> <string name="icon_DamageNo" + translate="false" value="Parcel_DamageNo_Dark" /> <button follows="top|right" @@ -166,7 +181,7 @@ <scroll_container color="DkGray2" follows="all" - height="532" + height="572" layout="topleft" left="9" name="place_scroll" @@ -176,7 +191,7 @@ <panel bg_alpha_color="DkGray2" follows="left|top|right" - height="540" + height="580" layout="topleft" left="0" min_height="300" @@ -322,21 +337,22 @@ <accordion fit_parent="true" follows="all" - height="223" + height="268" layout="topleft" single_expansion="true" left="0" name="advanced_info_accordion" - top_pad="10" + top_pad="5" width="313"> <accordion_tab - height="170" + fit_panel="false" + height="175" layout="topleft" name="parcel_characteristics_tab" title="Parcel"> <panel follows="all" - height="160" + height="175" layout="topleft" left="0" name="parcel_characteristics_panel" @@ -533,8 +549,8 @@ name="about_land_btn" right="-5" tab_stop="false" - top="138" - width="90"> + top_pad="2" + width="140"> <click_callback function="Floater.Show" parameter="about_land" /> @@ -543,7 +559,8 @@ </accordion_tab> <accordion_tab expanded="false" - height="150" + fit_panel="false" + height="125" layout="topleft" name="region_information_tab" title="Region"> @@ -662,7 +679,8 @@ name="region_info_btn" right="-5" tab_stop="false" - width="105"> + top_pad="2" + width="180"> <click_callback function="Floater.Show" parameter="region_info" /> @@ -671,13 +689,14 @@ </accordion_tab> <accordion_tab expanded="false" - height="190" + fit_panel="false" + height="180" layout="topleft" name="estate_information_tab" title="Estate"> <panel follows="all" - height="189" + height="180" layout="topleft" left="0" name="estate_information_panel" @@ -760,13 +779,14 @@ </accordion_tab> <accordion_tab expanded="false" - height="320" + fit_panel="false" + height="290" layout="topleft" name="sales_tab" title="For Sale"> <panel follows="all" - height="300" + height="290" layout="topleft" left="0" name="sales_panel" diff --git a/indra/newview/skins/default/xui/en/panel_places.xml b/indra/newview/skins/default/xui/en/panel_places.xml index a7a0efcdb3..33f895e13a 100644 --- a/indra/newview/skins/default/xui/en/panel_places.xml +++ b/indra/newview/skins/default/xui/en/panel_places.xml @@ -89,6 +89,7 @@ background_visible="true" layout="topleft" left_pad="3" name="map_btn" + tool_tip="Show the corresponding area on the World Map" width="85" /> <button follows="bottom|left" @@ -141,6 +142,7 @@ background_visible="true" layout="topleft" name="profile_btn" right="-1" + tool_tip="Show place profile" top="1" width="111" /> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml index 008aa1acc0..43513e1ab6 100644 --- a/indra/newview/skins/default/xui/en/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml @@ -41,32 +41,35 @@ name="buycurrencylabel"> L$ [AMT] </panel.string> - <button + <panel + height="18" + left="-315" + width="95" + top="1" + follows="right|top" + name="balance_bg" + bg_visible="true" + background_opaque="true" + bg_opaque_image="bevel_background"> + <text auto_resize="true" halign="center" - enabled="false" font="SansSerifSmall" - follows="right|top" - image_overlay="" - image_selected="bevel_background" - image_unselected="bevel_background" - image_pressed="bevel_background" + follows="all" height="18" - right="-275" - label_shadow="false" - name="buycurrency" - label_color_disabled="ButtonLabelColor" - image_color_disabled="White" + left="0" + name="balance" tool_tip="My Balance" - pad_left="12" - pad_right="12" + v_pad="4" top="0" + wrap="false" + value="L$20" width="40" /> <button auto_resize="true" halign="center" font="SansSerifSmall" - follows="right|top" + follows="right|top|bottom" image_hover_unselected="buy_over" image_unselected="buy_off" image_pressed="buy_press" @@ -81,6 +84,7 @@ tool_tip="Click to buy more L$" top="0" width="55" /> + </panel> <text type="string" font="SansSerifSmall" diff --git a/indra/newview/skins/default/xui/en/panel_topinfo_bar.xml b/indra/newview/skins/default/xui/en/panel_topinfo_bar.xml new file mode 100644 index 0000000000..d3fb77f135 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_topinfo_bar.xml @@ -0,0 +1,102 @@ +<?xml version="1.0" encoding="UTF-8"?> +<panel + background_visible="true" + background_opaque="false" + bg_opaque_color="Black_50" + bg_alpha_color="Black_50" + follows="left|top|right" + height="19" + layout="topleft" + name="topinfo_bar" + width="1024"> + <button + border="true" + follows="left|top" + height="16" + hover_glow_amount="0.15" + image_disabled="Info_Off" + image_disabled_selected="Info_Off" + image_selected="Info_Off" + image_unselected="Info_Off" + left="11" + name="place_info_btn" + top="1" + width="16"/> + <text + follows="left|top|right" + font="DejaVu" + height="16" + layout="topleft" + left_pad="11" + length="1" + name="parcel_info_text" + top="1" + type="string" + width="1"/> + <icon + enabled="true" + follows="right|top" + height="18" + image_name="Parcel_VoiceNo_Light" + name="voice_icon" + top="1" + visible="false" + width="22" + /> + <icon + follows="right|top" + height="18" + image_name="Parcel_FlyNo_Light" + name="fly_icon" + top="1" + visible="false" + width="22" + /> + <icon + follows="right|top" + height="18" + image_name="Parcel_PushNo_Light" + name="push_icon" + top="1" + visible="false" + width="22" + /> + <icon + follows="right|top" + height="18" + image_name="Parcel_BuildNo_Light" + name="build_icon" + top="1" + visible="false" + width="22" + /> + <icon + follows="right|top" + height="18" + image_name="Parcel_ScriptsNo_Light" + name="scripts_icon" + top="1" + visible="false" + width="22" + /> + <icon + follows="right|top" + height="13" + image_name="Parcel_Health_Dark" + left="2" + name="damage_icon" + top="3" + visible="false" + width="14" + /> + <text + follows="right|top" + font="SansSerifSmall" + halign="right" + height="18" + name="damage_text" + top="5" + visible="false" + width="35" + /> +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_voice_effect.xml b/indra/newview/skins/default/xui/en/panel_voice_effect.xml new file mode 100644 index 0000000000..c575ca468c --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_voice_effect.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<panel + follows="all" + height="26" + layout="topleft" + name="panel_voice_effect" + width="200"> + <string name="no_voice_effect"> + No Voice Morph + </string> + <string name="preview_voice_effects"> + Preview Voice Morphing ▶ + </string> + <string name="get_voice_effects"> + Get Voice Morphing ▶ + </string> + <combo_box + enabled="false" + follows="left|top|right" + height="23" + name="voice_effect" + tool_tip="Select a Voice Morphing effect to change your voice." + top_pad="0" + width="200"> + <combo_box.item + label="No Voice Morph" + name="no_voice_effect" + top_pad="0" + value="0" /> + <combo_box.commit_callback + function="Voice.CommitVoiceEffect" /> + </combo_box> +</panel> diff --git a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml index 3d7b0b7edc..ae08a13793 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml @@ -111,6 +111,7 @@ width="333"> label="Filter Outfits" max_length="300" name="Filter" + search_button_visible="true" top_pad="10" width="303" /> <panel diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml index 4c42d1f750..6c9acae35e 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml @@ -45,6 +45,7 @@ layout="topleft" left="0" name="info_btn" + tool_tip="Show object profile" top="0" width="102" /> <button @@ -55,6 +56,7 @@ layout="topleft" left="105" name="share_btn" + tool_tip="Share an inventory item" top="0" width="102" /> <button @@ -65,6 +67,7 @@ layout="topleft" left="210" name="shop_btn" + tool_tip="Open Marketplace webpage" top="0" width="102" /> <button @@ -75,6 +78,7 @@ layout="topleft" left="210" name="wear_btn" + tool_tip="Wear seleceted outfit" top="0" width="102" /> <button @@ -95,6 +99,7 @@ layout="topleft" left="210" name="teleport_btn" + tool_tip="Teleport to the selected area" top="0" width="102" /> </panel> diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index ed6484302f..0d14a6b3c8 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -3093,6 +3093,8 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. The session initialization is timed out </string> + <string name="voice_morphing_url">http://secondlife.com/landing/voicemorphing</string> + <!-- Financial operations strings --> <string name="paid_you_ldollars">[NAME] paid you L$[AMOUNT]</string> <string name="you_paid_ldollars">You paid [NAME] L$[AMOUNT] [REASON].</string> @@ -3189,18 +3191,13 @@ Abuse Report</string> </string> <!-- overriding datetime formating. - leave emtpy in for current localization this is not needed - list of values should be separated with ':' - example: - <string name="dateTimeWeekdaysShortNames"> - Son:Mon:Tue:Wed:Thu:Fri:Sat - </string> + didn't translate if this is not needed for current localization --> - <string name="dateTimeWeekdaysNames"></string> - <string name="dateTimeWeekdaysShortNames"></string> - <string name="dateTimeMonthNames"></string> - <string name="dateTimeMonthShortNames"></string> - <string name="dateTimeDayFormat"></string> - <string name="dateTimeAM"></string> - <string name="dateTimePM"></string> + <string name="dateTimeWeekdaysNames">Sunday:Monday:Tuesday:Wednesday:Thursday:Friday:Saturday</string> + <string name="dateTimeWeekdaysShortNames">Sun:Mon:Tue:Wed:Thu:Fri:Sat</string> + <string name="dateTimeMonthNames">January:February:March:April:May:June:July:August:September:October:November:December</string> + <string name="dateTimeMonthShortNames">Jan:Feb:Mar:Apr:May:Jun:Jul:Aug:Sep:Oct:Nov:Dec</string> + <string name="dateTimeDayFormat">[MDAY]</string> + <string name="dateTimeAM">AM</string> + <string name="dateTimePM">PM</string> </strings> diff --git a/indra/newview/skins/default/xui/en/widgets/accordion.xml b/indra/newview/skins/default/xui/en/widgets/accordion.xml new file mode 100644 index 0000000000..b817ba56ca --- /dev/null +++ b/indra/newview/skins/default/xui/en/widgets/accordion.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<accordion + height="100" + name="accordion" + width="200"> + <empty_accordion_text + follows="all" + height="100" + h_pad="10" + name="no_visible_items_msg" + value="There are no visible content here." + v_pad="15" + width="200" + wrap="true "/> +</accordion> diff --git a/indra/newview/skins/default/xui/en/widgets/color_swatch.xml b/indra/newview/skins/default/xui/en/widgets/color_swatch.xml index dfd301a770..48b987d7e8 100644 --- a/indra/newview/skins/default/xui/en/widgets/color_swatch.xml +++ b/indra/newview/skins/default/xui/en/widgets/color_swatch.xml @@ -4,5 +4,6 @@ name="color_swatch"> <color_swatch.caption_text name="caption" halign="center" - follows="left|right|bottom"/> + follows="left|right|bottom" + v_pad="2"/> </color_swatch> diff --git a/indra/newview/skins/default/xui/en/widgets/texture_picker.xml b/indra/newview/skins/default/xui/en/widgets/texture_picker.xml index 33c3475eb2..757f0f49d1 100644 --- a/indra/newview/skins/default/xui/en/widgets/texture_picker.xml +++ b/indra/newview/skins/default/xui/en/widgets/texture_picker.xml @@ -3,7 +3,8 @@ <multiselect_text font="SansSerifSmall"/> <caption_text text="Multiple" halign="center" - font="SansSerifSmall"/> + font="SansSerifSmall" + v_pad="2"/> <border bevel_style="in"/> </texture_picker> diff --git a/indra/newview/skins/default/xui/es/floater_buy_land.xml b/indra/newview/skins/default/xui/es/floater_buy_land.xml index a40f65d5d0..74243a4d06 100644 --- a/indra/newview/skins/default/xui/es/floater_buy_land.xml +++ b/indra/newview/skins/default/xui/es/floater_buy_land.xml @@ -126,9 +126,6 @@ para cubrir esta parcela. <floater.string name="no_parcel_selected"> (No se ha seleccionado una parcela) </floater.string> - <floater.string name="icon_PG" value="Parcel_PG_Dark"/> - <floater.string name="icon_M" value="Parcel_M_Dark"/> - <floater.string name="icon_R" value="Parcel_R_Dark"/> <text name="region_name_label"> Región: </text> diff --git a/indra/newview/skins/default/xui/fr/floater_buy_land.xml b/indra/newview/skins/default/xui/fr/floater_buy_land.xml index 7c9a31a4c3..b7f8f36f81 100644 --- a/indra/newview/skins/default/xui/fr/floater_buy_land.xml +++ b/indra/newview/skins/default/xui/fr/floater_buy_land.xml @@ -124,9 +124,6 @@ prend en charge [AMOUNT2] objets <floater.string name="no_parcel_selected"> (aucune parcelle sélectionnée) </floater.string> - <floater.string name="icon_PG" value="Parcel_PG_Dark"/> - <floater.string name="icon_M" value="Parcel_M_Dark"/> - <floater.string name="icon_R" value="Parcel_R_Dark"/> <text name="region_name_label"> Région : </text> diff --git a/indra/newview/skins/default/xui/fr/panel_landmark_info.xml b/indra/newview/skins/default/xui/fr/panel_landmark_info.xml index 4001616034..bd29bd676c 100644 --- a/indra/newview/skins/default/xui/fr/panel_landmark_info.xml +++ b/indra/newview/skins/default/xui/fr/panel_landmark_info.xml @@ -18,9 +18,6 @@ <string name="acquired_date"> [wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local] </string> - <string name="icon_PG" value="parcel_drk_PG"/> - <string name="icon_M" value="parcel_drk_M"/> - <string name="icon_R" value="parcel_drk_R"/> <button name="back_btn" tool_tip="Précédent"/> <text name="title" value="Profil du lieu"/> <scroll_container name="place_scroll"> diff --git a/indra/newview/skins/default/xui/fr/panel_place_profile.xml b/indra/newview/skins/default/xui/fr/panel_place_profile.xml index 598e94166e..731e045019 100644 --- a/indra/newview/skins/default/xui/fr/panel_place_profile.xml +++ b/indra/newview/skins/default/xui/fr/panel_place_profile.xml @@ -41,21 +41,6 @@ <string name="acquired_date"> [wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local] </string> - <string name="icon_PG" value="parcel_drk_PG"/> - <string name="icon_M" value="parcel_drk_M"/> - <string name="icon_R" value="parcel_drk_R"/> - <string name="icon_Voice" value="parcel_drk_Voice"/> - <string name="icon_VoiceNo" value="parcel_drk_VoiceNo"/> - <string name="icon_Fly" value="parcel_drk_Fly"/> - <string name="icon_FlyNo" value="parcel_drk_FlyNo"/> - <string name="icon_Push" value="parcel_drk_Push"/> - <string name="icon_PushNo" value="parcel_drk_PushNo"/> - <string name="icon_Build" value="parcel_drk_Build"/> - <string name="icon_BuildNo" value="parcel_drk_BuildNo"/> - <string name="icon_Scripts" value="parcel_drk_Scripts"/> - <string name="icon_ScriptsNo" value="parcel_drk_ScriptsNo"/> - <string name="icon_Damage" value="parcel_drk_Damage"/> - <string name="icon_DamageNo" value="parcel_drk_DamageNo"/> <button name="back_btn" tool_tip="Précédent"/> <text name="title" value="Profil du lieu"/> <scroll_container name="place_scroll"> diff --git a/indra/newview/skins/default/xui/it/floater_buy_land.xml b/indra/newview/skins/default/xui/it/floater_buy_land.xml index 2e78168209..f3b30f7048 100644 --- a/indra/newview/skins/default/xui/it/floater_buy_land.xml +++ b/indra/newview/skins/default/xui/it/floater_buy_land.xml @@ -124,9 +124,6 @@ consente [AMOUNT2] oggetti <floater.string name="no_parcel_selected"> (nessun terreno selezionato) </floater.string> - <floater.string name="icon_PG" value="Parcel_PG_Dark"/> - <floater.string name="icon_M" value="Parcel_M_Dark"/> - <floater.string name="icon_R" value="Parcel_R_Dark"/> <text name="region_name_label"> Regione: </text> diff --git a/indra/newview/skins/default/xui/ja/floater_buy_land.xml b/indra/newview/skins/default/xui/ja/floater_buy_land.xml index a274e25326..34f9d38de1 100644 --- a/indra/newview/skins/default/xui/ja/floater_buy_land.xml +++ b/indra/newview/skins/default/xui/ja/floater_buy_land.xml @@ -124,9 +124,6 @@ <floater.string name="no_parcel_selected"> (区画が選定されていません) </floater.string> - <floater.string name="icon_PG" value="Parcel_PG_Dark"/> - <floater.string name="icon_M" value="Parcel_M_Dark"/> - <floater.string name="icon_R" value="Parcel_R_Dark"/> <text name="region_name_label"> 地域: </text> diff --git a/indra/newview/skins/default/xui/ja/panel_landmark_info.xml b/indra/newview/skins/default/xui/ja/panel_landmark_info.xml index 87477c2651..7fca66f90f 100644 --- a/indra/newview/skins/default/xui/ja/panel_landmark_info.xml +++ b/indra/newview/skins/default/xui/ja/panel_landmark_info.xml @@ -18,9 +18,6 @@ <string name="acquired_date"> [year,datetime,local] [mth,datetime,local] [day,datetime,local] [wkday,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] </string> - <string name="icon_PG" value="parcel_drk_PG"/> - <string name="icon_M" value="parcel_drk_M"/> - <string name="icon_R" value="parcel_drk_R"/> <button name="back_btn" tool_tip="戻る"/> <text name="title" value="場所のプロフィール"/> <scroll_container name="place_scroll"> diff --git a/indra/newview/skins/default/xui/ja/panel_place_profile.xml b/indra/newview/skins/default/xui/ja/panel_place_profile.xml index 9de04f0d6a..b897e1d748 100644 --- a/indra/newview/skins/default/xui/ja/panel_place_profile.xml +++ b/indra/newview/skins/default/xui/ja/panel_place_profile.xml @@ -41,21 +41,6 @@ <string name="acquired_date"> [year,datetime,local] [mth,datetime,local] [day,datetime,local] [wkday,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] </string> - <string name="icon_PG" value="parcel_drk_PG"/> - <string name="icon_M" value="parcel_drk_M"/> - <string name="icon_R" value="parcel_drk_R"/> - <string name="icon_Voice" value="parcel_drk_Voice"/> - <string name="icon_VoiceNo" value="parcel_drk_VoiceNo"/> - <string name="icon_Fly" value="parcel_drk_Fly"/> - <string name="icon_FlyNo" value="parcel_drk_FlyNo"/> - <string name="icon_Push" value="parcel_drk_Push"/> - <string name="icon_PushNo" value="parcel_drk_PushNo"/> - <string name="icon_Build" value="parcel_drk_Build"/> - <string name="icon_BuildNo" value="parcel_drk_BuildNo"/> - <string name="icon_Scripts" value="parcel_drk_Scripts"/> - <string name="icon_ScriptsNo" value="parcel_drk_ScriptsNo"/> - <string name="icon_Damage" value="parcel_drk_Damage"/> - <string name="icon_DamageNo" value="parcel_drk_DamageNo"/> <button name="back_btn" tool_tip="戻る"/> <text name="title" value="場所のプロフィール"/> <scroll_container name="place_scroll"> diff --git a/indra/newview/skins/default/xui/ja/strings.xml b/indra/newview/skins/default/xui/ja/strings.xml index dfc12bc1cb..d59699552d 100644 --- a/indra/newview/skins/default/xui/ja/strings.xml +++ b/indra/newview/skins/default/xui/ja/strings.xml @@ -3762,22 +3762,4 @@ www.secondlife.com から最新バージョンをダウンロードしてくだ <string name="texture_load_dimensions_error"> [WIDTH]*[HEIGHT] 以上の画像は読み込めません </string> - <!-- overriding datetime formating. leave emtpy in for current localization this is not needed --> - <string name="dateTimeWeekdaysNames"> - Sunday:Monday:Tuesday:Wednesday:Thursday:Friday:Saturday - </string> - <string name="dateTimeWeekdaysShortNames"> - Son:Mon:Tue:Wed:Thu:Fri:Sat - </string> - <string name="dateTimeMonthNames"> - January:February:March:April:May:June:July:August:September:October:November:December - </string> - <string name="dateTimeMonthNames"> - Jan:Feb:Mar:Apr:May:Jun:Jul:Aug:Sep:Oct:Nov:Dec - </string> - <string name="dateTimeDayFormat"> - [MDAY] D - </string> - <string name="dateTimeAM">AM</string> - <string name="dateTimePM">PM</string> </strings> diff --git a/indra/newview/skins/default/xui/pl/floater_buy_land.xml b/indra/newview/skins/default/xui/pl/floater_buy_land.xml index 3d01129d9b..7b4f459b4e 100644 --- a/indra/newview/skins/default/xui/pl/floater_buy_land.xml +++ b/indra/newview/skins/default/xui/pl/floater_buy_land.xml @@ -125,9 +125,6 @@ używanie Posiadłości żeby sfinalizować ten zakup. <floater.string name="no_parcel_selected"> (Posiadłość nie została wybrana) </floater.string> - <floater.string name="icon_PG" value="Parcel_PG_Dark"/> - <floater.string name="icon_M" value="Parcel_M_Dark"/> - <floater.string name="icon_R" value="Parcel_R_Dark"/> <text name="region_name_label"> Region: </text> diff --git a/indra/newview/skins/default/xui/pt/floater_buy_land.xml b/indra/newview/skins/default/xui/pt/floater_buy_land.xml index 73b483acf2..5c5ee3b7a0 100644 --- a/indra/newview/skins/default/xui/pt/floater_buy_land.xml +++ b/indra/newview/skins/default/xui/pt/floater_buy_land.xml @@ -124,9 +124,6 @@ contribuídas para cobrir este lote antes da aquisição se completar. <floater.string name="no_parcel_selected"> (nenhum lote selecionado) </floater.string> - <floater.string name="icon_PG" value="Parcel_PG_Dark"/> - <floater.string name="icon_M" value="Parcel_M_Dark"/> - <floater.string name="icon_R" value="Parcel_R_Dark"/> <text name="region_name_label"> Região: </text> diff --git a/indra/newview/skins/default/xui/pt/floater_world_map.xml b/indra/newview/skins/default/xui/pt/floater_world_map.xml index 65e48b4bfd..878d0b1973 100644 --- a/indra/newview/skins/default/xui/pt/floater_world_map.xml +++ b/indra/newview/skins/default/xui/pt/floater_world_map.xml @@ -6,7 +6,7 @@ </text> </panel> <panel name="layout_panel_2"> - <button font="SansSerifSmall" label="Mostra minha localização" label_selected="Mostra minha localização" left_delta="91" name="Show My Location" tool_tip="Centrar o mapa na localização do meu avatar" width="135"/> + <button font="SansSerifSmall" label="Mostra minha localização" label_selected="Mostra minha localização" left_delta="91" name="Show My Location" tool_tip="Centrar o mapa na localização do meu avatar" /> <text name="me_label"> Eu </text> diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index c887097575..8c089c0b79 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -355,7 +355,6 @@ class WindowsManifest(ViewerManifest): self.path("qtwebkitd4.dll") self.path("qtxmlpatternsd4.dll") self.path("ssleay32.dll") - self.path("winmm.dll") # For WebKit/Qt plugin runtimes (image format plugins) if self.prefix(src="imageformats", dst="imageformats"): |