diff options
author | Oz Linden <oz@lindenlab.com> | 2012-01-09 09:05:14 -0500 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2012-01-09 09:05:14 -0500 |
commit | 03290257345c22f909cf1cfac3981e7e07820d21 (patch) | |
tree | 4b4be7538fb1768f32d6b3c2e7cd060b48d2faca /indra | |
parent | 889d4d292b2318a2be4988a700d5f56a193a377a (diff) | |
parent | 41ceee848bbbaec892471b6396bd2d2383d10aa3 (diff) |
merge up to latest viewer-development
Diffstat (limited to 'indra')
102 files changed, 1126 insertions, 331 deletions
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index c35799bbb9..e4381dbbd6 100644 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -617,6 +617,12 @@ namespace LLError s.defaultLevel = level; } + ELevel getDefaultLevel() + { + Settings& s = Settings::get(); + return s.defaultLevel; + } + void setFunctionLevel(const std::string& function_name, ELevel level) { Globals& g = Globals::get(); diff --git a/indra/llcommon/llerrorcontrol.h b/indra/llcommon/llerrorcontrol.h index fb75d45e2c..ed9de002f5 100644 --- a/indra/llcommon/llerrorcontrol.h +++ b/indra/llcommon/llerrorcontrol.h @@ -75,6 +75,7 @@ namespace LLError LL_COMMON_API void setPrintLocation(bool); LL_COMMON_API void setDefaultLevel(LLError::ELevel); + LL_COMMON_API ELevel getDefaultLevel(); LL_COMMON_API void setFunctionLevel(const std::string& function_name, LLError::ELevel); LL_COMMON_API void setClassLevel(const std::string& class_name, LLError::ELevel); LL_COMMON_API void setFileLevel(const std::string& file_name, LLError::ELevel); diff --git a/indra/llcommon/llthread.h b/indra/llcommon/llthread.h index 40291a2569..f0e0de6173 100644 --- a/indra/llcommon/llthread.h +++ b/indra/llcommon/llthread.h @@ -187,11 +187,14 @@ public: LLMutexLock(LLMutex* mutex) { mMutex = mutex; - mMutex->lock(); + + if(mMutex) + mMutex->lock(); } ~LLMutexLock() { - mMutex->unlock(); + if(mMutex) + mMutex->unlock(); } private: LLMutex* mMutex; diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h index ec378761c2..7bba3d298f 100644 --- a/indra/llcommon/llversionviewer.h +++ b/indra/llcommon/llversionviewer.h @@ -29,7 +29,7 @@ const S32 LL_VERSION_MAJOR = 3; const S32 LL_VERSION_MINOR = 2; -const S32 LL_VERSION_PATCH = 6; +const S32 LL_VERSION_PATCH = 7; const S32 LL_VERSION_BUILD = 0; const char * const LL_CHANNEL = "Second Life Developer"; diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp index 7ca25d07fc..f569630766 100644 --- a/indra/llmessage/llcurl.cpp +++ b/indra/llmessage/llcurl.cpp @@ -219,11 +219,15 @@ namespace boost std::set<CURL*> LLCurl::Easy::sFreeHandles; std::set<CURL*> LLCurl::Easy::sActiveHandles; +LLMutex* LLCurl::Easy::sHandleMutexp = NULL ; //static CURL* LLCurl::Easy::allocEasyHandle() { CURL* ret = NULL; + + LLMutexLock lock(sHandleMutexp) ; + if (sFreeHandles.empty()) { ret = curl_easy_init(); @@ -251,6 +255,7 @@ void LLCurl::Easy::releaseEasyHandle(CURL* handle) llerrs << "handle cannot be NULL!" << llendl; } + LLMutexLock lock(sHandleMutexp) ; if (sActiveHandles.find(handle) != sActiveHandles.end()) { sActiveHandles.erase(handle); @@ -512,20 +517,21 @@ void LLCurl::Easy::prepRequest(const std::string& url, } //////////////////////////////////////////////////////////////////////////// - +LLMutex* LLCurl::Multi::sMultiInitMutexp = NULL ; LLCurl::Multi::Multi() : mQueued(0), mErrorCount(0), mState(STATE_READY), mDead(FALSE), mMutexp(NULL), - mDeletionMutexp(NULL) + mDeletionMutexp(NULL), + mEasyMutexp(NULL) { - mCurlMultiHandle = curl_multi_init(); + mCurlMultiHandle = initMulti(); if (!mCurlMultiHandle) { llwarns << "curl_multi_init() returned NULL! Easy handles: " << gCurlEasyCount << " Multi handles: " << gCurlMultiCount << llendl; - mCurlMultiHandle = curl_multi_init(); + mCurlMultiHandle = initMulti(); } llassert_always(mCurlMultiHandle); @@ -534,6 +540,7 @@ LLCurl::Multi::Multi() { mMutexp = new LLMutex(NULL) ; mDeletionMutexp = new LLMutex(NULL) ; + mEasyMutexp = new LLMutex(NULL) ; } LLCurl::getCurlThread()->addMulti(this) ; @@ -563,10 +570,19 @@ LLCurl::Multi::~Multi() mMutexp = NULL ; delete mDeletionMutexp ; mDeletionMutexp = NULL ; + delete mEasyMutexp ; + mEasyMutexp = NULL ; --gCurlMultiCount; } +CURLM* LLCurl::Multi::initMulti() +{ + LLMutexLock lock(sMultiInitMutexp) ; + + return curl_multi_init() ; +} + void LLCurl::Multi::lock() { if(mMutexp) @@ -585,39 +601,26 @@ void LLCurl::Multi::unlock() void LLCurl::Multi::markDead() { - if(mDeletionMutexp) - { - mDeletionMutexp->lock() ; - } - + LLMutexLock lock(mDeletionMutexp) ; + mDead = TRUE ; - - if(mDeletionMutexp) - { - mDeletionMutexp->unlock() ; - } } void LLCurl::Multi::setState(LLCurl::Multi::ePerformState state) { lock() ; mState = state ; + unlock() ; + if(mState == STATE_READY) { LLCurl::getCurlThread()->setPriority(mHandle, LLQueuedThread::PRIORITY_NORMAL) ; - } - unlock() ; + } } LLCurl::Multi::ePerformState LLCurl::Multi::getState() { - ePerformState state ; - - lock() ; - state = mState ; - unlock() ; - - return state ; + return mState; } bool LLCurl::Multi::isCompleted() @@ -633,21 +636,19 @@ bool LLCurl::Multi::waitToComplete() return true ; } - bool completed ; - - lock() ; - completed = (STATE_COMPLETED == mState) ; + bool completed = (STATE_COMPLETED == mState) ; if(!completed) { LLCurl::getCurlThread()->setPriority(mHandle, LLQueuedThread::PRIORITY_URGENT) ; } - unlock() ; - + return completed; } CURLMsg* LLCurl::Multi::info_read(S32* msgs_in_queue) { + LLMutexLock lock(mMutexp) ; + CURLMsg* curlmsg = curl_multi_info_read(mCurlMultiHandle, msgs_in_queue); return curlmsg; } @@ -655,10 +656,8 @@ CURLMsg* LLCurl::Multi::info_read(S32* msgs_in_queue) //return true if dead bool LLCurl::Multi::doPerform() { - if(mDeletionMutexp) - { - mDeletionMutexp->lock() ; - } + LLMutexLock lock(mDeletionMutexp) ; + bool dead = mDead ; if(mDead) @@ -675,6 +674,7 @@ bool LLCurl::Multi::doPerform() call_count < MULTI_PERFORM_CALL_REPEAT; call_count++) { + LLMutexLock lock(mMutexp) ; CURLMcode code = curl_multi_perform(mCurlMultiHandle, &q); if (CURLM_CALL_MULTI_PERFORM != code || q == 0) { @@ -688,11 +688,6 @@ bool LLCurl::Multi::doPerform() setState(STATE_COMPLETED) ; } - if(mDeletionMutexp) - { - mDeletionMutexp->unlock() ; - } - return dead ; } @@ -715,10 +710,19 @@ S32 LLCurl::Multi::process() if (msg->msg == CURLMSG_DONE) { U32 response = 0; - easy_active_map_t::iterator iter = mEasyActiveMap.find(msg->easy_handle); - if (iter != mEasyActiveMap.end()) + Easy* easy = NULL ; + + { + LLMutexLock lock(mEasyMutexp) ; + easy_active_map_t::iterator iter = mEasyActiveMap.find(msg->easy_handle); + if (iter != mEasyActiveMap.end()) + { + easy = iter->second; + } + } + + if(easy) { - Easy* easy = iter->second; response = easy->report(msg->data.result); removeEasy(easy); } @@ -743,19 +747,21 @@ S32 LLCurl::Multi::process() LLCurl::Easy* LLCurl::Multi::allocEasy() { - Easy* easy = 0; + Easy* easy = 0; if (mEasyFreeList.empty()) - { + { easy = Easy::getEasy(); } else { + LLMutexLock lock(mEasyMutexp) ; easy = *(mEasyFreeList.begin()); mEasyFreeList.erase(easy); } if (easy) { + LLMutexLock lock(mEasyMutexp) ; mEasyActiveList.insert(easy); mEasyActiveMap[easy->getCurlHandle()] = easy; } @@ -764,6 +770,7 @@ LLCurl::Easy* LLCurl::Multi::allocEasy() bool LLCurl::Multi::addEasy(Easy* easy) { + LLMutexLock lock(mMutexp) ; CURLMcode mcode = curl_multi_add_handle(mCurlMultiHandle, easy->getCurlHandle()); check_curl_multi_code(mcode); //if (mcode != CURLM_OK) @@ -776,22 +783,41 @@ bool LLCurl::Multi::addEasy(Easy* easy) void LLCurl::Multi::easyFree(Easy* easy) { + if(mEasyMutexp) + { + mEasyMutexp->lock() ; + } + mEasyActiveList.erase(easy); mEasyActiveMap.erase(easy->getCurlHandle()); + if (mEasyFreeList.size() < EASY_HANDLE_POOL_SIZE) - { - easy->resetState(); + { mEasyFreeList.insert(easy); + + if(mEasyMutexp) + { + mEasyMutexp->unlock() ; + } + + easy->resetState(); } else { + if(mEasyMutexp) + { + mEasyMutexp->unlock() ; + } delete easy; } } void LLCurl::Multi::removeEasy(Easy* easy) { - check_curl_multi_code(curl_multi_remove_handle(mCurlMultiHandle, easy->getCurlHandle())); + { + LLMutexLock lock(mMutexp) ; + check_curl_multi_code(curl_multi_remove_handle(mCurlMultiHandle, easy->getCurlHandle())); + } easyFree(easy); } @@ -834,11 +860,17 @@ void LLCurlThread::CurlRequest::finishRequest(bool completed) LLCurlThread::LLCurlThread(bool threaded) : LLQueuedThread("curlthread", threaded) { + if(!LLCurl::Multi::sMultiInitMutexp) + { + LLCurl::Multi::sMultiInitMutexp = new LLMutex(NULL) ; + } } //virtual LLCurlThread::~LLCurlThread() { + delete LLCurl::Multi::sMultiInitMutexp ; + LLCurl::Multi::sMultiInitMutexp = NULL ; } S32 LLCurlThread::update(U32 max_time_ms) @@ -1290,6 +1322,10 @@ void LLCurl::initClass(bool multi_threaded) #endif sCurlThread = new LLCurlThread(multi_threaded) ; + if(multi_threaded) + { + Easy::sHandleMutexp = new LLMutex(NULL) ; + } } void LLCurl::cleanupClass() @@ -1319,6 +1355,9 @@ void LLCurl::cleanupClass() Easy::sFreeHandles.clear(); + delete Easy::sHandleMutexp ; + Easy::sHandleMutexp = NULL ; + llassert(Easy::sActiveHandles.empty()); } diff --git a/indra/llmessage/llcurl.h b/indra/llmessage/llcurl.h index a275db3e53..705cdcbbcc 100644 --- a/indra/llmessage/llcurl.h +++ b/indra/llmessage/llcurl.h @@ -253,6 +253,7 @@ private: static std::set<CURL*> sFreeHandles; static std::set<CURL*> sActiveHandles; + static LLMutex* sHandleMutexp ; }; class LLCurl::Multi @@ -298,6 +299,7 @@ public: S32 mQueued; S32 mErrorCount; + static CURLM* initMulti() ; private: void easyFree(LLCurl::Easy*); @@ -316,6 +318,9 @@ private: BOOL mDead ; LLMutex* mMutexp ; LLMutex* mDeletionMutexp ; + LLMutex* mEasyMutexp ; + + static LLMutex* sMultiInitMutexp ; }; class LLCurlThread : public LLQueuedThread diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index 93d8282aa7..f0d92d597a 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -589,15 +589,23 @@ void LLButton::getOverlayImageSize(S32& overlay_width, S32& overlay_height) // virtual void LLButton::draw() { + static LLCachedControl<bool> sEnableButtonFlashing(*LLUI::sSettingGroups["config"], "EnableButtonFlashing", true); F32 alpha = mUseDrawContextAlpha ? getDrawContext().mAlpha : getCurrentTransparency(); bool flash = FALSE; - if( mFlashing ) + if( mFlashing) { - F32 elapsed = mFlashingTimer.getElapsedTimeF32(); - S32 flash_count = S32(elapsed * mButtonFlashRate * 2.f); - // flash on or off? - flash = (flash_count % 2 == 0) || flash_count > S32((F32)mButtonFlashCount * 2.f); + if ( sEnableButtonFlashing) + { + F32 elapsed = mFlashingTimer.getElapsedTimeF32(); + S32 flash_count = S32(elapsed * mButtonFlashRate * 2.f); + // flash on or off? + flash = (flash_count % 2 == 0) || flash_count > S32((F32)mButtonFlashCount * 2.f); + } + else + { // otherwise just highlight button in flash color + flash = true; + } } bool pressed_by_keyboard = FALSE; diff --git a/indra/llui/lllayoutstack.h b/indra/llui/lllayoutstack.h index ede6149a80..3b308a359d 100644 --- a/indra/llui/lllayoutstack.h +++ b/indra/llui/lllayoutstack.h @@ -191,13 +191,12 @@ public: return min_dim; } + F32 getCollapseFactor(); void setOrientation(LLLayoutStack::ELayoutOrientation orientation) { mOrientation = orientation; } protected: LLLayoutPanel(const Params& p); - F32 getCollapseFactor(); - bool mExpandedMinDimSpecified; S32 mExpandedMinDim; diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index cb237fca7c..95ecbb1c94 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -947,9 +947,14 @@ LLMenuItemBranchGL::LLMenuItemBranchGL(const LLMenuItemBranchGL::Params& p) LLMenuItemBranchGL::~LLMenuItemBranchGL() { - delete mBranchHandle.get(); + if (mBranchHandle.get()) + { + mBranchHandle.get()->die(); + } } + + // virtual LLView* LLMenuItemBranchGL::getChildView(const std::string& name, BOOL recurse) const { diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h index cd33938226..f620201020 100644 --- a/indra/llui/llpanel.h +++ b/indra/llui/llpanel.h @@ -135,6 +135,8 @@ public: const LLColor4& getBackgroundColor() const { return mBgOpaqueColor; } void setTransparentColor(const LLColor4& color) { mBgAlphaColor = color; } const LLColor4& getTransparentColor() const { return mBgAlphaColor; } + void setBackgroundImage(LLUIImage* image) { mBgOpaqueImage = image; } + void setTransparentImage(LLUIImage* image) { mBgAlphaImage = image; } LLPointer<LLUIImage> getBackgroundImage() const { return mBgOpaqueImage; } LLPointer<LLUIImage> getTransparentImage() const { return mBgAlphaImage; } LLColor4 getBackgroundImageOverlay() { return mBgOpaqueImageOverlay; } diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index d5f8707381..5fc2cc350d 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -98,24 +98,25 @@ class LLCustomButtonIconCtrl : public LLButton { public: struct Params - : public LLInitParam::Block<Params, LLButton::Params> + : public LLInitParam::Block<Params, LLButton::Params> { // LEFT, RIGHT, TOP, BOTTOM paddings of LLIconCtrl in this class has same value Optional<S32> icon_ctrl_pad; - Params(): - icon_ctrl_pad("icon_ctrl_pad", 1) + Params() + : icon_ctrl_pad("icon_ctrl_pad", 1) {} }; protected: friend class LLUICtrlFactory; - LLCustomButtonIconCtrl(const Params& p): - LLButton(p), + + LLCustomButtonIconCtrl(const Params& p) + : LLButton(p), mIcon(NULL), mIconAlignment(LLFontGL::HCENTER), mIconCtrlPad(p.icon_ctrl_pad) - {} + {} public: diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 3b768166f1..0040be45c7 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -598,7 +598,7 @@ S32 LLTextBase::insertStringNoUndo(S32 pos, const LLWString &wstr, LLTextBase::s pos = getEditableIndex(pos, true); - segment_set_t::iterator seg_iter = getSegIterContaining(pos); + segment_set_t::iterator seg_iter = getEditableSegIterContaining(pos); LLTextSegmentPtr default_segment; @@ -1510,8 +1510,48 @@ void LLTextBase::getSegmentAndOffset( S32 startpos, segment_set_t::iterator* seg } } +LLTextBase::segment_set_t::iterator LLTextBase::getEditableSegIterContaining(S32 index) +{ + segment_set_t::iterator it = getSegIterContaining(index); + segment_set_t::iterator orig_it = it; + + if (it == mSegments.end()) return it; + + if (!(*it)->canEdit() + && index == (*it)->getStart() + && it != mSegments.begin()) + { + it--; + if ((*it)->canEdit()) + { + return it; + } + } + return orig_it; +} + +LLTextBase::segment_set_t::const_iterator LLTextBase::getEditableSegIterContaining(S32 index) const +{ + segment_set_t::const_iterator it = getSegIterContaining(index); + segment_set_t::const_iterator orig_it = it; + if (it == mSegments.end()) return it; + + if (!(*it)->canEdit() + && index == (*it)->getStart() + && it != mSegments.begin()) + { + it--; + if ((*it)->canEdit()) + { + return it; + } + } + return orig_it; +} + LLTextBase::segment_set_t::iterator LLTextBase::getSegIterContaining(S32 index) { + static LLPointer<LLIndexSegment> index_segment = new LLIndexSegment(); if (index > getLength()) { return mSegments.end(); } diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index b699601908..0549141b72 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -461,6 +461,8 @@ protected: void getSegmentAndOffset( S32 startpos, segment_set_t::const_iterator* seg_iter, S32* offsetp ) const; void getSegmentAndOffset( S32 startpos, segment_set_t::iterator* seg_iter, S32* offsetp ); LLTextSegmentPtr getSegmentAtLocalPos( S32 x, S32 y, bool hit_past_end_of_line = true); + segment_set_t::iterator getEditableSegIterContaining(S32 index); + segment_set_t::const_iterator getEditableSegIterContaining(S32 index) const; segment_set_t::iterator getSegIterContaining(S32 index); segment_set_t::const_iterator getSegIterContaining(S32 index) const; void clearSegments(); diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 9bd445988d..3a23ce1cac 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -2250,6 +2250,22 @@ void LLTextEditor::insertText(const std::string &new_text) setEnabled( enabled ); } +void LLTextEditor::insertText(LLWString &new_text) +{ + BOOL enabled = getEnabled(); + setEnabled( TRUE ); + + // Delete any selected characters (the insertion replaces them) + if( hasSelection() ) + { + deleteSelection(TRUE); + } + + setCursorPos(mCursorPos + insert( mCursorPos, new_text, FALSE, LLTextSegmentPtr() )); + + setEnabled( enabled ); +} + void LLTextEditor::appendWidget(const LLInlineViewSegment::Params& params, const std::string& text, bool allow_undo) { // Save old state @@ -2838,3 +2854,13 @@ void LLTextEditor::clear() getViewModel()->setDisplay(LLWStringUtil::null); clearSegments(); } + +bool LLTextEditor::canLoadOrSaveToFile() +{ + return !mReadOnly; +} + +S32 LLTextEditor::spacesPerTab() +{ + return SPACES_PER_TAB; +} diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index 9e4b95003b..40821ae9fb 100644 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -92,6 +92,8 @@ public: void setParseHighlights(BOOL parsing) {mParseHighlights=parsing;} + static S32 spacesPerTab(); + // mousehandler overrides virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); @@ -140,6 +142,8 @@ public: virtual void selectAll(); virtual BOOL canSelectAll() const; + virtual bool canLoadOrSaveToFile(); + void selectNext(const std::string& search_text_in, BOOL case_insensitive, BOOL wrap = TRUE); BOOL replaceText(const std::string& search_text, const std::string& replace_text, BOOL case_insensitive, BOOL wrap = TRUE); void replaceTextAll(const std::string& search_text, const std::string& replace_text, BOOL case_insensitive); @@ -158,6 +162,7 @@ public: // inserts text at cursor void insertText(const std::string &text); + void insertText(LLWString &text); void appendWidget(const LLInlineViewSegment::Params& params, const std::string& text, bool allow_undo); // Non-undoable diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 486babb0ab..542f57ee5f 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -121,6 +121,7 @@ LLView::Params::Params() LLView::LLView(const LLView::Params& p) : mVisible(p.visible), + mInDraw(false), mName(p.name), mParentView(NULL), mReshapeFlags(FOLLOWS_NONE), @@ -281,6 +282,9 @@ void LLView::moveChildToBackOfTabGroup(LLUICtrl* child) // virtual bool LLView::addChild(LLView* child, S32 tab_group) { + // NOTE: Changed this to not crash in release mode + llassert(mInDraw == false); + if (!child) { return false; @@ -330,6 +334,7 @@ bool LLView::addChildInBack(LLView* child, S32 tab_group) // remove the specified child from the view, and set it's parent to NULL. void LLView::removeChild(LLView* child) { + llassert_always(mInDraw == false); //llassert_always(sDepth == 0); // Avoid re-ordering while drawing; it can cause subtle iterator bugs if (child->mParentView == this) { @@ -1081,6 +1086,7 @@ void LLView::draw() void LLView::drawChildren() { + mInDraw = true; if (!mChildList.empty()) { LLView* rootp = LLUI::getRootView(); @@ -1119,6 +1125,7 @@ void LLView::drawChildren() } --sDepth; } + mInDraw = false; } void LLView::dirtyRect() diff --git a/indra/llui/llview.h b/indra/llui/llview.h index f21fb37e18..f1fac5f69c 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -612,6 +612,8 @@ private: S32 mNextInsertionOrdinal; + bool mInDraw; + static LLWindow* sWindow; // All root views must know about their window. typedef std::map<std::string, LLView*> default_widget_map_t; diff --git a/indra/llui/llwindowshade.cpp b/indra/llui/llwindowshade.cpp index cf76202215..ae8b30b1ba 100644 --- a/indra/llui/llwindowshade.cpp +++ b/indra/llui/llwindowshade.cpp @@ -37,10 +37,13 @@ const S32 MIN_NOTIFICATION_AREA_HEIGHT = 30; const S32 MAX_NOTIFICATION_AREA_HEIGHT = 100; +static LLDefaultChildRegistry::Register<LLWindowShade> r("window_shade"); + LLWindowShade::Params::Params() : bg_image("bg_image"), modal("modal", false), text_color("text_color"), + shade_color("shade_color"), can_close("can_close", true) { changeDefault(mouse_opaque, false); @@ -48,7 +51,6 @@ LLWindowShade::Params::Params() LLWindowShade::LLWindowShade(const LLWindowShade::Params& params) : LLUICtrl(params), - mNotification(params.notification), mModal(params.modal), mFormHeight(0), mTextColor(params.text_color) @@ -72,7 +74,7 @@ void LLWindowShade::initFromParams(const LLWindowShade::Params& params) addChild(stackp); LLLayoutPanel::Params panel_p; - panel_p.rect = LLRect(0, 30, 800, 0); + panel_p.rect = LLRect(0, MIN_NOTIFICATION_AREA_HEIGHT, 800, 0); panel_p.name = "notification_area"; panel_p.visible = false; panel_p.user_resize = false; @@ -89,7 +91,7 @@ void LLWindowShade::initFromParams(const LLWindowShade::Params& params) panel_p.name = "background_area"; panel_p.mouse_opaque = false; panel_p.background_visible = false; - panel_p.bg_alpha_color = LLColor4(0.f, 0.f, 0.f, 0.2f); + panel_p.bg_alpha_color = params.shade_color; LLLayoutPanel* dummy_panel = LLUICtrlFactory::create<LLLayoutPanel>(panel_p); stackp->addChild(dummy_panel); @@ -107,11 +109,11 @@ void LLWindowShade::initFromParams(const LLWindowShade::Params& params) LLIconCtrl::Params icon_p; icon_p.name = "notification_icon"; - icon_p.rect = LLRect(5, 23, 21, 8); + icon_p.rect = LLRect(5, 25, 21, 10); panel->addChild(LLUICtrlFactory::create<LLIconCtrl>(icon_p)); LLTextBox::Params text_p; - text_p.rect = LLRect(31, 20, panel->getRect().getWidth() - 5, 0); + text_p.rect = LLRect(31, 23, panel->getRect().getWidth() - 5, 3); text_p.follows.flags = FOLLOWS_ALL; text_p.text_color = mTextColor; text_p.font = LLFontGL::getFontSansSerifSmall(); @@ -125,41 +127,132 @@ void LLWindowShade::initFromParams(const LLWindowShade::Params& params) panel_p.auto_resize = false; panel_p.user_resize = false; panel_p.name="form_elements"; - panel_p.rect = LLRect(0, 30, 130, 0); + panel_p.rect = LLRect(0, MIN_NOTIFICATION_AREA_HEIGHT, 130, 0); LLLayoutPanel* form_elements_panel = LLUICtrlFactory::create<LLLayoutPanel>(panel_p); stackp->addChild(form_elements_panel); - if (params.can_close) + panel_p = LLUICtrlFactory::getDefaultParams<LLLayoutPanel>(); + panel_p.auto_resize = false; + panel_p.user_resize = false; + panel_p.rect = LLRect(0, MIN_NOTIFICATION_AREA_HEIGHT, 25, 0); + panel_p.name = "close_panel"; + LLLayoutPanel* close_panel = LLUICtrlFactory::create<LLLayoutPanel>(panel_p); + stackp->addChild(close_panel); + + LLButton::Params button_p; + button_p.name = "close_notification"; + button_p.rect = LLRect(5, 23, 21, 7); + button_p.image_color.control="DkGray_66"; + button_p.image_unselected.name="Icon_Close_Foreground"; + button_p.image_selected.name="Icon_Close_Press"; + button_p.click_callback.function = boost::bind(&LLWindowShade::onCloseNotification, this); + + close_panel->addChild(LLUICtrlFactory::create<LLButton>(button_p)); + + close_panel->setVisible(params.can_close); +} + +void LLWindowShade::draw() +{ + LLRect message_rect = getChild<LLTextBox>("notification_text")->getTextBoundingRect(); + + LLLayoutPanel* notification_area = getChild<LLLayoutPanel>("notification_area"); + + notification_area->reshape(notification_area->getRect().getWidth(), + llclamp(message_rect.getHeight() + 15, + llmin(mFormHeight, MAX_NOTIFICATION_AREA_HEIGHT), + MAX_NOTIFICATION_AREA_HEIGHT)); + + LLUICtrl::draw(); + + while(!mNotifications.empty() && !mNotifications.back()->isActive()) { - panel_p = LLUICtrlFactory::getDefaultParams<LLLayoutPanel>(); - panel_p.auto_resize = false; - panel_p.user_resize = false; - panel_p.rect = LLRect(0, 30, 25, 0); - LLLayoutPanel* close_panel = LLUICtrlFactory::create<LLLayoutPanel>(panel_p); - stackp->addChild(close_panel); - - LLButton::Params button_p; - button_p.name = "close_notification"; - button_p.rect = LLRect(5, 23, 21, 7); - button_p.image_color.control="DkGray_66"; - button_p.image_unselected.name="Icon_Close_Foreground"; - button_p.image_selected.name="Icon_Close_Press"; - button_p.click_callback.function = boost::bind(&LLWindowShade::onCloseNotification, this); - - close_panel->addChild(LLUICtrlFactory::create<LLButton>(button_p)); + mNotifications.pop_back(); + // go ahead and hide + hide(); } - LLSD payload = mNotification->getPayload(); + if (mNotifications.empty()) + { + hide(); + } + else if (notification_area->getCollapseFactor() < 0.01f) + { + displayLatestNotification(); + } - LLNotificationFormPtr formp = mNotification->getForm(); + if (!notification_area->getVisible() && (notification_area->getCollapseFactor() < 0.001f)) + { + getChildRef<LLLayoutPanel>("background_area").setBackgroundVisible(false); + setMouseOpaque(false); + } +} + +void LLWindowShade::hide() +{ + getChildRef<LLLayoutPanel>("notification_area").setVisible(false); +} + +void LLWindowShade::onCloseNotification() +{ + if (!mNotifications.empty()) + LLNotifications::instance().cancel(mNotifications.back()); +} + +void LLWindowShade::onClickIgnore(LLUICtrl* ctrl) +{ + LLNotificationPtr notify = getCurrentNotification(); + if (!notify) return; + + bool check = ctrl->getValue().asBoolean(); + if (notify->getForm()->getIgnoreType() == LLNotificationForm::IGNORE_SHOW_AGAIN) + { + // question was "show again" so invert value to get "ignore" + check = !check; + } + notify->setIgnored(check); +} + +void LLWindowShade::onClickNotificationButton(const std::string& name) +{ + LLNotificationPtr notify = getCurrentNotification(); + if (!notify) return; + + mNotificationResponse[name] = true; + + notify->respond(mNotificationResponse); +} + +void LLWindowShade::onEnterNotificationText(LLUICtrl* ctrl, const std::string& name) +{ + mNotificationResponse[name] = ctrl->getValue().asString(); +} + +void LLWindowShade::show(LLNotificationPtr notification) +{ + mNotifications.push_back(notification); + + displayLatestNotification(); +} + +void LLWindowShade::displayLatestNotification() +{ + if (mNotifications.empty()) return; + + LLNotificationPtr notification = mNotifications.back(); + + LLSD payload = notification->getPayload(); + + LLNotificationFormPtr formp = notification->getForm(); LLLayoutPanel& notification_area = getChildRef<LLLayoutPanel>("notification_area"); - notification_area.getChild<LLUICtrl>("notification_icon")->setValue(mNotification->getIcon()); - notification_area.getChild<LLUICtrl>("notification_text")->setValue(mNotification->getMessage()); - notification_area.getChild<LLUICtrl>("notification_text")->setToolTip(mNotification->getMessage()); + notification_area.getChild<LLUICtrl>("notification_icon")->setValue(notification->getIcon()); + notification_area.getChild<LLUICtrl>("notification_text")->setValue(notification->getMessage()); + notification_area.getChild<LLUICtrl>("notification_text")->setToolTip(notification->getMessage()); LLNotificationForm::EIgnoreType ignore_type = formp->getIgnoreType(); LLLayoutPanel& form_elements = notification_area.getChildRef<LLLayoutPanel>("form_elements"); form_elements.deleteAllChildren(); + form_elements.reshape(form_elements.getRect().getWidth(), MIN_NOTIFICATION_AREA_HEIGHT); const S32 FORM_PADDING_HORIZONTAL = 10; const S32 FORM_PADDING_VERTICAL = 3; @@ -229,7 +322,7 @@ void LLWindowShade::initFromParams(const LLWindowShade::Params& params) label_p.v_pad = 5; LLTextBox* textbox = LLUICtrlFactory::create<LLTextBox>(label_p); textbox->reshapeToFitText(); - textbox->reshape(textbox->getRect().getWidth(), form_elements.getRect().getHeight() - 2 * FORM_PADDING_VERTICAL); + textbox->reshape(textbox->getRect().getWidth(), MIN_NOTIFICATION_AREA_HEIGHT - 2 * FORM_PADDING_VERTICAL); form_elements.addChild(textbox); cur_x = textbox->getRect().mRight + FORM_PADDING_HORIZONTAL; @@ -249,7 +342,7 @@ void LLWindowShade::initFromParams(const LLWindowShade::Params& params) } } - mFormHeight = form_elements.getRect().getHeight() - (cur_y - FORM_PADDING_VERTICAL) + WIDGET_HEIGHT; + mFormHeight = form_elements.getRect().getHeight() - (cur_y - WIDGET_HEIGHT - FORM_PADDING_VERTICAL); form_elements.reshape(form_width, mFormHeight); form_elements.setMinDim(form_width); @@ -261,68 +354,34 @@ void LLWindowShade::initFromParams(const LLWindowShade::Params& params) { (*it)->translate(0, delta_y); } -} -void LLWindowShade::show() -{ getChildRef<LLLayoutPanel>("notification_area").setVisible(true); getChildRef<LLLayoutPanel>("background_area").setBackgroundVisible(mModal); setMouseOpaque(mModal); } -void LLWindowShade::draw() +void LLWindowShade::setBackgroundImage(LLUIImage* image) { - LLRect message_rect = getChild<LLTextBox>("notification_text")->getTextBoundingRect(); - - LLLayoutPanel* notification_area = getChild<LLLayoutPanel>("notification_area"); - - notification_area->reshape(notification_area->getRect().getWidth(), - llclamp(message_rect.getHeight() + 10, - llmin(mFormHeight, MAX_NOTIFICATION_AREA_HEIGHT), - MAX_NOTIFICATION_AREA_HEIGHT)); - - LLUICtrl::draw(); - if (mNotification && !mNotification->isActive()) - { - hide(); - } + getChild<LLLayoutPanel>("notification_area")->setTransparentImage(image); } -void LLWindowShade::hide() +void LLWindowShade::setTextColor(LLColor4 color) { - getChildRef<LLLayoutPanel>("notification_area").setVisible(false); - getChildRef<LLLayoutPanel>("background_area").setBackgroundVisible(false); - - setMouseOpaque(false); + getChild<LLTextBox>("notification_text")->setColor(color); } -void LLWindowShade::onCloseNotification() +void LLWindowShade::setCanClose(bool can_close) { - LLNotifications::instance().cancel(mNotification); + getChildView("close_panel")->setVisible(can_close); } -void LLWindowShade::onClickIgnore(LLUICtrl* ctrl) +LLNotificationPtr LLWindowShade::getCurrentNotification() { - bool check = ctrl->getValue().asBoolean(); - if (mNotification && mNotification->getForm()->getIgnoreType() == LLNotificationForm::IGNORE_SHOW_AGAIN) + if (mNotifications.empty()) { - // question was "show again" so invert value to get "ignore" - check = !check; + return LLNotificationPtr(); } - mNotification->setIgnored(check); -} - -void LLWindowShade::onClickNotificationButton(const std::string& name) -{ - if (!mNotification) return; - - mNotificationResponse[name] = true; - - mNotification->respond(mNotificationResponse); + return mNotifications.back(); } -void LLWindowShade::onEnterNotificationText(LLUICtrl* ctrl, const std::string& name) -{ - mNotificationResponse[name] = ctrl->getValue().asString(); -} diff --git a/indra/llui/llwindowshade.h b/indra/llui/llwindowshade.h index 09ffc2cd54..1ae84028dd 100644 --- a/indra/llui/llwindowshade.h +++ b/indra/llui/llwindowshade.h @@ -36,20 +36,25 @@ class LLWindowShade : public LLUICtrl public: struct Params : public LLInitParam::Block<Params, LLUICtrl::Params> { - Mandatory<LLNotificationPtr> notification; Optional<LLUIImage*> bg_image; - Optional<LLUIColor> text_color; + Optional<LLUIColor> text_color, + shade_color; Optional<bool> modal, can_close; Params(); }; - void show(); + void show(LLNotificationPtr); /*virtual*/ void draw(); void hide(); + void setBackgroundImage(LLUIImage* image); + void setTextColor(LLColor4 color); + void setCanClose(bool can_close); private: + void displayLatestNotification(); + LLNotificationPtr getCurrentNotification(); friend class LLUICtrlFactory; LLWindowShade(const Params& p); @@ -60,7 +65,7 @@ private: void onEnterNotificationText(LLUICtrl* ctrl, const std::string& name); void onClickIgnore(LLUICtrl* ctrl); - LLNotificationPtr mNotification; + std::vector<LLNotificationPtr> mNotifications; LLSD mNotificationResponse; bool mModal; S32 mFormHeight; diff --git a/indra/llwindow/llwindow.cpp b/indra/llwindow/llwindow.cpp index 1351bed547..2e9e31bfea 100644 --- a/indra/llwindow/llwindow.cpp +++ b/indra/llwindow/llwindow.cpp @@ -186,8 +186,8 @@ BOOL LLWindow::setSize(LLCoordScreen size) { if (!getMaximized()) { - size.mX = llmin(size.mX, mMinWindowWidth); - size.mY = llmin(size.mY, mMinWindowHeight); + size.mX = llmax(size.mX, mMinWindowWidth); + size.mY = llmax(size.mY, mMinWindowHeight); } return setSizeImpl(size); } diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index aa8ad53a3d..1ea623791d 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1150,6 +1150,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>EnableButtonFlashing</key> + <map> + <key>Comment</key> + <string>Allow UI to flash buttons to get your attention</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>ButtonHPad</key> <map> <key>Comment</key> diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 8ca621538f..7abecc643b 100755 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -680,12 +680,29 @@ namespace action_give_inventory std::string items; build_items_string(inventory_selected_uuids, items); + int folders_count = 0; + std::set<LLUUID>::const_iterator it = inventory_selected_uuids.begin(); + + //traverse through selected inventory items and count folders among them + for ( ; it != inventory_selected_uuids.end() && folders_count <=1 ; ++it) + { + LLViewerInventoryCategory* inv_cat = gInventory.getCategory(*it); + if (NULL != inv_cat) + { + folders_count++; + } + } + + // EXP-1599 + // In case of sharing multiple folders, make the confirmation + // dialog contain a warning that only one folder can be shared at a time. + std::string notification = (folders_count > 1) ? "ShareFolderConfirmation" : "ShareItemsConfirmation"; LLSD substitutions; substitutions["RESIDENTS"] = residents; substitutions["ITEMS"] = items; LLShareInfo::instance().mAvatarNames = avatar_names; LLShareInfo::instance().mAvatarUuids = avatar_uuids; - LLNotificationsUtil::add("ShareItemsConfirmation", substitutions, LLSD(), &give_inventory_cb); + LLNotificationsUtil::add(notification, substitutions, LLSD(), &give_inventory_cb); } } diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index a076374903..aabab0ccb9 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -250,6 +250,12 @@ LLIMWellChiclet::LLIMWellChiclet(const Params& p) LLIMWellChiclet::~LLIMWellChiclet() { + LLIMWellWindow* im_well_window = LLIMWellWindow::findInstance(); + if (im_well_window) + { + im_well_window->setSysWellChiclet(NULL); + } + LLIMMgr::getInstance()->removeSessionObserver(this); } @@ -296,6 +302,13 @@ void LLIMWellChiclet::createMenu() void LLIMWellChiclet::messageCountChanged(const LLSD& session_data) { + // The singleton class LLChicletBar instance might be already deleted + // so don't create a new one. + if (!LLChicletBar::instanceExists()) + { + return; + } + const LLUUID& session_id = session_data["session_id"]; const S32 counter = LLChicletBar::getInstance()->getTotalUnreadIMCount(); const bool im_not_visible = !LLFloaterReg::instanceVisible("im_container") diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 4f2fd47488..f4b6dc2c81 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -405,8 +405,8 @@ LLFavoritesBarCtrl::~LLFavoritesBarCtrl() { gInventory.removeObserver(this); - delete mOverflowMenuHandle.get(); - delete mContextMenuHandle.get(); + if (mOverflowMenuHandle.get()) mOverflowMenuHandle.get()->die(); + if (mContextMenuHandle.get()) mContextMenuHandle.get()->die(); } BOOL LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp index 4897cf1885..8024755e86 100644 --- a/indra/newview/llfilepicker.cpp +++ b/indra/newview/llfilepicker.cpp @@ -58,6 +58,7 @@ LLFilePicker LLFilePicker::sInstance; #define SLOBJECT_FILTER L"Objects (*.slobject)\0*.slobject\0" #define RAW_FILTER L"RAW files (*.raw)\0*.raw\0" #define MODEL_FILTER L"Model files (*.dae)\0*.dae\0" +#define SCRIPT_FILTER L"Script files (*.lsl)\0*.lsl\0" #endif // @@ -213,6 +214,10 @@ BOOL LLFilePicker::setupFilter(ELoadFilter filter) mOFN.lpstrFilter = MODEL_FILTER \ L"\0"; break; + case FFLOAD_SCRIPT: + mOFN.lpstrFilter = SCRIPT_FILTER \ + L"\0"; + break; default: res = FALSE; break; @@ -497,6 +502,14 @@ BOOL LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename) L"Compressed Images (*.j2c)\0*.j2c\0" \ L"\0"; break; + case FFSAVE_SCRIPT: + if (filename.empty()) + { + wcsncpy( mFilesW,L"untitled.lsl", FILENAME_BUFFER_SIZE); + } + mOFN.lpstrDefExt = L"txt"; + mOFN.lpstrFilter = L"LSL Files (*.lsl)\0*.lsl\0" L"\0"; + break; default: return FALSE; } @@ -620,6 +633,14 @@ Boolean LLFilePicker::navOpenFilterProc(AEDesc *theItem, void *info, void *callB result = false; } } + else if (filter == FFLOAD_SCRIPT) + { + if (fileInfo.filetype != 'LSL ' && + (fileInfo.extension && (CFStringCompare(fileInfo.extension, CFSTR("lsl"), kCFCompareCaseInsensitive) != kCFCompareEqualTo)) ) + { + result = false; + } + } if (fileInfo.extension) { @@ -766,6 +787,12 @@ OSStatus LLFilePicker::doNavSaveDialog(ESaveFilter filter, const std::string& fi extension = CFSTR(".j2c"); break; + case FFSAVE_SCRIPT: + type = 'LSL '; + creator = '\?\?\?\?'; + extension = CFSTR(".lsl"); + break; + case FFSAVE_ALL: default: type = '\?\?\?\?'; @@ -1192,7 +1219,12 @@ static std::string add_imageload_filter_to_gtkchooser(GtkWindow *picker) add_common_filters_to_gtkchooser(gfilter, picker, filtername); return filtername; } - + +static std::string add_script_filter_to_gtkchooser(GtkWindow *picker) +{ + return add_simple_mime_filter_to_gtkchooser(picker, "text/plain", + LLTrans::getString("script_files") + " (*.lsl)"); +} BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename ) { @@ -1258,6 +1290,10 @@ BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename LLTrans::getString("compressed_image_files") + " (*.j2c)"); suggest_ext = ".j2c"; break; + case FFSAVE_SCRIPT: + caption += add_script_filter_to_gtkchooser(picker); + suggest_ext = ".lsl"; + break; default:; break; } @@ -1323,6 +1359,9 @@ BOOL LLFilePicker::getOpenFile( ELoadFilter filter, bool blocking ) case FFLOAD_IMAGE: filtername = add_imageload_filter_to_gtkchooser(picker); break; + case FFLOAD_SCRIPT: + filtername = add_script_filter_to_gtkchooser(picker); + break; default:; break; } diff --git a/indra/newview/llfilepicker.h b/indra/newview/llfilepicker.h index cd843a8f33..a4d5d68ff5 100644 --- a/indra/newview/llfilepicker.h +++ b/indra/newview/llfilepicker.h @@ -84,6 +84,7 @@ public: FFLOAD_RAW = 8, FFLOAD_MODEL = 9, FFLOAD_COLLADA = 10, + FFLOAD_SCRIPT = 11, }; enum ESaveFilter @@ -103,6 +104,7 @@ public: FFSAVE_J2C = 12, FFSAVE_PNG = 13, FFSAVE_JPEG = 14, + FFSAVE_SCRIPT = 15, }; // open the dialog. This is a modal operation diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp index 659e52271a..05d73c2416 100644 --- a/indra/newview/llfloatercolorpicker.cpp +++ b/indra/newview/llfloatercolorpicker.cpp @@ -271,7 +271,7 @@ void LLFloaterColorPicker::destroyUI () if ( mSwatchView ) { this->removeChild ( mSwatchView ); - delete mSwatchView; + mSwatchView->die();; mSwatchView = NULL; } } diff --git a/indra/newview/llfloatermediasettings.cpp b/indra/newview/llfloatermediasettings.cpp index b5f1b967df..895e16adef 100644 --- a/indra/newview/llfloatermediasettings.cpp +++ b/indra/newview/llfloatermediasettings.cpp @@ -212,10 +212,13 @@ void LLFloaterMediaSettings::commitFields() //static void LLFloaterMediaSettings::clearValues( bool editable) { - // clean up all panels before updating - sInstance->mPanelMediaSettingsGeneral ->clearValues(sInstance->mPanelMediaSettingsGeneral, editable); - sInstance->mPanelMediaSettingsSecurity ->clearValues(sInstance->mPanelMediaSettingsSecurity, editable); - sInstance->mPanelMediaSettingsPermissions->clearValues(sInstance->mPanelMediaSettingsPermissions, editable); + if (sInstance) + { + // clean up all panels before updating + sInstance->mPanelMediaSettingsGeneral ->clearValues(sInstance->mPanelMediaSettingsGeneral, editable); + sInstance->mPanelMediaSettingsSecurity ->clearValues(sInstance->mPanelMediaSettingsSecurity, editable); + sInstance->mPanelMediaSettingsPermissions->clearValues(sInstance->mPanelMediaSettingsPermissions, editable); + } } //////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llfloaternamedesc.cpp b/indra/newview/llfloaternamedesc.cpp index ae95d4392a..66f0fc3cd7 100644 --- a/indra/newview/llfloaternamedesc.cpp +++ b/indra/newview/llfloaternamedesc.cpp @@ -204,3 +204,24 @@ BOOL LLFloaterSoundPreview::postBuild() getChild<LLUICtrl>("ok_btn")->setCommitCallback(boost::bind(&LLFloaterNameDesc::onBtnOK, this)); return TRUE; } + + +//----------------------------------------------------------------------------- +// LLFloaterScriptPreview() +//----------------------------------------------------------------------------- + +LLFloaterScriptPreview::LLFloaterScriptPreview(const LLSD& filename ) + : LLFloaterNameDesc(filename) +{ + mIsText = TRUE; +} + +BOOL LLFloaterScriptPreview::postBuild() +{ + if (!LLFloaterNameDesc::postBuild()) + { + return FALSE; + } + getChild<LLUICtrl>("ok_btn")->setCommitCallback(boost::bind(&LLFloaterNameDesc::onBtnOK, this)); + return TRUE; +} diff --git a/indra/newview/llfloaternamedesc.h b/indra/newview/llfloaternamedesc.h index 7381a6334a..69bbccaf80 100644 --- a/indra/newview/llfloaternamedesc.h +++ b/indra/newview/llfloaternamedesc.h @@ -51,6 +51,7 @@ protected: protected: BOOL mIsAudio; + bool mIsText; std::string mFilenameAndPath; std::string mFilename; @@ -62,5 +63,12 @@ public: LLFloaterSoundPreview(const LLSD& filename ); virtual BOOL postBuild(); }; - + +class LLFloaterScriptPreview : public LLFloaterNameDesc +{ +public: + LLFloaterScriptPreview(const LLSD& filename ); + virtual BOOL postBuild(); +}; + #endif // LL_LLFLOATERNAMEDESC_H diff --git a/indra/newview/llfloateropenobject.cpp b/indra/newview/llfloateropenobject.cpp index 8b6619def2..4bfef8b45f 100644 --- a/indra/newview/llfloateropenobject.cpp +++ b/indra/newview/llfloateropenobject.cpp @@ -162,26 +162,66 @@ void LLFloaterOpenObject::moveToInventory(bool wear) { parent_category_id = gInventory.getRootFolderID(); } + + LLCategoryCreate* cat_data = new LLCategoryCreate(object_id, wear); + LLUUID category_id = gInventory.createNewCategory(parent_category_id, - LLFolderType::FT_NONE, - name); + LLFolderType::FT_NONE, + name, + callbackCreateInventoryCategory, + (void*)cat_data); + + //If we get a null category ID, we are using a capability in createNewCategory and we will + //handle the following in the callbackCreateInventoryCategory routine. + if ( category_id.notNull() ) + { + delete cat_data; + + LLCatAndWear* data = new LLCatAndWear; + data->mCatID = category_id; + data->mWear = wear; + data->mFolderResponded = false; + + // Copy and/or move the items into the newly created folder. + // Ignore any "you're going to break this item" messages. + BOOL success = move_inv_category_world_to_agent(object_id, category_id, TRUE, + callbackMoveInventory, + (void*)data); + if (!success) + { + delete data; + data = NULL; - LLCatAndWear* data = new LLCatAndWear; - data->mCatID = category_id; - data->mWear = wear; + LLNotificationsUtil::add("OpenObjectCannotCopy"); + } + } +} +// static +void LLFloaterOpenObject::callbackCreateInventoryCategory(const LLSD& result, void* data) +{ + LLCategoryCreate* cat_data = (LLCategoryCreate*)data; + + LLUUID category_id = result["folder_id"].asUUID(); + LLCatAndWear* wear_data = new LLCatAndWear; + + wear_data->mCatID = category_id; + wear_data->mWear = cat_data->mWear; + wear_data->mFolderResponded = true; + // Copy and/or move the items into the newly created folder. // Ignore any "you're going to break this item" messages. - BOOL success = move_inv_category_world_to_agent(object_id, category_id, TRUE, + BOOL success = move_inv_category_world_to_agent(cat_data->mObjectID, category_id, TRUE, callbackMoveInventory, - (void*)data); + (void*)wear_data); if (!success) { - delete data; - data = NULL; - + delete wear_data; + wear_data = NULL; + LLNotificationsUtil::add("OpenObjectCannotCopy"); } + delete cat_data; } // static diff --git a/indra/newview/llfloateropenobject.h b/indra/newview/llfloateropenobject.h index 0706e99f16..bf7fe69c65 100644 --- a/indra/newview/llfloateropenobject.h +++ b/indra/newview/llfloateropenobject.h @@ -45,10 +45,20 @@ public: void dirty(); + class LLCategoryCreate + { + public: + LLCategoryCreate(LLUUID object_id, bool wear) : mObjectID(object_id), mWear(wear) {} + public: + LLUUID mObjectID; + bool mWear; + }; + struct LLCatAndWear { LLUUID mCatID; bool mWear; + bool mFolderResponded; }; protected: @@ -62,6 +72,7 @@ protected: void onClickMoveToInventory(); void onClickMoveAndWear(); + static void callbackCreateInventoryCategory(const LLSD& result, void* data); static void callbackMoveInventory(S32 result, void* data); private: diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index cc7a1b2368..d8d62e5bbb 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -1489,6 +1489,12 @@ void LLFloaterSnapshot::Impl::setNeedRefresh(LLFloaterSnapshot* floater, bool ne { if (!floater) return; + // Don't display the "Refresh to save" message if we're in auto-refresh mode. + if (gSavedSettings.getBOOL("AutoSnapshot")) + { + need = false; + } + floater->mRefreshLabel->setVisible(need); floater->impl.mNeedRefresh = need; } @@ -1984,7 +1990,7 @@ LLFloaterSnapshot::LLFloaterSnapshot(const LLSD& key) // Destroys the object LLFloaterSnapshot::~LLFloaterSnapshot() { - delete impl.mPreviewHandle.get(); + if (impl.mPreviewHandle.get()) impl.mPreviewHandle.get()->die(); //unfreeze everything else gSavedSettings.setBOOL("FreezeTime", FALSE); @@ -2053,6 +2059,13 @@ BOOL LLFloaterSnapshot::postBuild() gFloaterView->removeChild(this); gSnapshotFloaterView->addChild(this); + // Pre-select "Current Window" resolution. + getChild<LLComboBox>("profile_size_combo")->selectNthItem(0); + getChild<LLComboBox>("postcard_size_combo")->selectNthItem(0); + getChild<LLComboBox>("texture_size_combo")->selectNthItem(0); + getChild<LLComboBox>("local_size_combo")->selectNthItem(0); + getChild<LLComboBox>("local_format_combo")->selectNthItem(0); + impl.mPreviewHandle = previewp->getHandle(); impl.updateControls(this); impl.updateLayout(this); diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 1008b4a6e4..bd5b5f4eb0 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -529,7 +529,7 @@ void LLFloaterTools::refresh() mPanelLandInfo->refresh(); // Refresh the advanced weights floater - LLFloaterObjectWeights* object_weights_floater = LLFloaterReg::getTypedInstance<LLFloaterObjectWeights>("object_weights"); + LLFloaterObjectWeights* object_weights_floater = LLFloaterReg::findTypedInstance<LLFloaterObjectWeights>("object_weights"); if(object_weights_floater && object_weights_floater->getVisible()) { object_weights_floater->refresh(); @@ -1409,9 +1409,7 @@ bool LLFloaterTools::deleteMediaConfirm(const LLSD& notification, const LLSD& re // void LLFloaterTools::clearMediaSettings() { - LLFloaterMediaSettings::getInstance(); LLFloaterMediaSettings::clearValues(false); - } ////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llfloatertranslationsettings.cpp b/indra/newview/llfloatertranslationsettings.cpp index 959edff713..428a02e9f0 100644 --- a/indra/newview/llfloatertranslationsettings.cpp +++ b/indra/newview/llfloatertranslationsettings.cpp @@ -29,6 +29,7 @@ #include "llfloatertranslationsettings.h" // Viewer includes +#include "llnearbychatbar.h" #include "lltranslate.h" #include "llviewercontrol.h" // for gSavedSettings @@ -292,5 +293,6 @@ void LLFloaterTranslationSettings::onBtnOK() gSavedSettings.setString("TranslationService", getSelectedService()); gSavedSettings.setString("BingTranslateAPIKey", getEnteredBingKey()); gSavedSettings.setString("GoogleTranslateAPIKey", getEnteredGoogleKey()); + LLNearbyChatBar::getInstance()->enableTranslationCheckbox(LLTranslate::isTranslationConfigured()); closeFloater(false); } diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 6ec2598e44..ecd4c2c3de 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -299,7 +299,7 @@ LLFolderView::~LLFolderView( void ) mAutoOpenItems.removeAllNodes(); gIdleCallbacks.deleteFunction(idle, this); - delete mPopupMenuHandle.get(); + if (mPopupMenuHandle.get()) mPopupMenuHandle.get()->die(); mAutoOpenItems.removeAllNodes(); clearSelection(); @@ -1058,7 +1058,7 @@ void LLFolderView::onItemsRemovalConfirmation(const LLSD& notification, const LL for (item_it = mSelectedItems.begin(); item_it != mSelectedItems.end(); ++item_it) { item = *item_it; - if(item->isRemovable()) + if (item && item->isRemovable()) { items.push_back(item); } @@ -1969,7 +1969,7 @@ BOOL LLFolderView::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, void LLFolderView::deleteAllChildren() { closeRenamer(); - delete mPopupMenuHandle.get(); + if (mPopupMenuHandle.get()) mPopupMenuHandle.get()->die(); mPopupMenuHandle = LLHandle<LLView>(); mScrollContainer = NULL; mRenameItem = NULL; diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp index f7ed1116cb..bbf66ca750 100644 --- a/indra/newview/llgrouplist.cpp +++ b/indra/newview/llgrouplist.cpp @@ -95,7 +95,7 @@ LLGroupList::LLGroupList(const Params& p) LLGroupList::~LLGroupList() { gAgent.removeListener(this); - delete mContextMenuHandle.get(); + if (mContextMenuHandle.get()) mContextMenuHandle.get()->die(); } // virtual diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 0c092e9a56..eaf9b53eb9 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2305,15 +2305,15 @@ void LLRightClickInventoryFetchDescendentsObserver::done() class LLInventoryCopyAndWearObserver : public LLInventoryObserver { public: - LLInventoryCopyAndWearObserver(const LLUUID& cat_id, int count) : - mCatID(cat_id), mContentsCount(count), mFolderAdded(FALSE) {} + LLInventoryCopyAndWearObserver(const LLUUID& cat_id, int count, bool folder_added=false) : + mCatID(cat_id), mContentsCount(count), mFolderAdded(folder_added) {} virtual ~LLInventoryCopyAndWearObserver() {} virtual void changed(U32 mask); protected: LLUUID mCatID; int mContentsCount; - BOOL mFolderAdded; + bool mFolderAdded; }; @@ -2341,7 +2341,6 @@ void LLInventoryCopyAndWearObserver::changed(U32 mask) if (mFolderAdded) { LLViewerInventoryCategory* category = gInventory.getCategory(mCatID); - if (NULL == category) { llwarns << "gInventory.getCategory(" << mCatID @@ -3188,13 +3187,13 @@ bool move_task_inventory_callback(const LLSD& notification, const LLSD& response if(option == 0 && object) { - if (cat_and_wear && cat_and_wear->mWear) + if (cat_and_wear && cat_and_wear->mWear) // && !cat_and_wear->mFolderResponded) { LLInventoryObject::object_list_t inventory_objects; object->getInventoryContents(inventory_objects); int contents_count = inventory_objects.size()-1; //subtract one for containing folder - - LLInventoryCopyAndWearObserver* inventoryObserver = new LLInventoryCopyAndWearObserver(cat_and_wear->mCatID, contents_count); + LLInventoryCopyAndWearObserver* inventoryObserver = new LLInventoryCopyAndWearObserver(cat_and_wear->mCatID, contents_count, cat_and_wear->mFolderResponded); + gInventory.addObserver(inventoryObserver); } diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index dc25689fa3..568ec4c5e2 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -377,14 +377,67 @@ const LLUUID LLInventoryModel::findCategoryUUIDForType(LLFolderType::EType prefe return rv; } +class LLCreateInventoryCategoryResponder : public LLHTTPClient::Responder +{ +public: + LLCreateInventoryCategoryResponder(LLInventoryModel* model, + void (*callback)(const LLSD&, void*), + void* user_data) : + mModel(model), + mCallback(callback), + mData(user_data) + { + } + + virtual void error(U32 status, const std::string& reason) + { + LL_WARNS("InvAPI") << "CreateInventoryCategory failed. status = " << status << ", reasion = \"" << reason << "\"" << LL_ENDL; + } + + virtual void result(const LLSD& content) + { + //Server has created folder. + + LLUUID category_id = content["folder_id"].asUUID(); + + + // Add the category to the internal representation + LLPointer<LLViewerInventoryCategory> cat = + new LLViewerInventoryCategory( category_id, + content["parent_id"].asUUID(), + (LLFolderType::EType)content["type"].asInteger(), + content["name"].asString(), + gAgent.getID() ); + cat->setVersion(LLViewerInventoryCategory::VERSION_INITIAL); + cat->setDescendentCount(0); + LLInventoryModel::LLCategoryUpdate update(cat->getParentUUID(), 1); + mModel->accountForUpdate(update); + mModel->updateCategory(cat); + + if (mCallback && mData) + { + mCallback(content, mData); + } + + } + +private: + void (*mCallback)(const LLSD&, void*); + void* mData; + LLInventoryModel* mModel; +}; + // Convenience function to create a new category. You could call // updateCategory() with a newly generated UUID category, but this // version will take care of details like what the name should be // based on preferred type. Returns the UUID of the new category. LLUUID LLInventoryModel::createNewCategory(const LLUUID& parent_id, LLFolderType::EType preferred_type, - const std::string& pname) + const std::string& pname, + void (*callback)(const LLSD&, void*), //Default to NULL + void* user_data) //Default to NULL { + LLUUID id; if(!isInventoryUsable()) { @@ -408,6 +461,35 @@ LLUUID LLInventoryModel::createNewCategory(const LLUUID& parent_id, { name.assign(LLViewerFolderType::lookupNewCategoryName(preferred_type)); } + + if ( callback && user_data ) //callback required for acked message. + { + LLViewerRegion* viewer_region = gAgent.getRegion(); + std::string url; + if ( viewer_region ) + url = viewer_region->getCapability("CreateInventoryCategory"); + + if (!url.empty()) + { + //Let's use the new capability. + + LLSD request, body; + body["folder_id"] = id; + body["parent_id"] = parent_id; + body["type"] = (LLSD::Integer) preferred_type; + body["name"] = name; + + request["message"] = "CreateInventoryCategory"; + request["payload"] = body; + + // viewer_region->getCapAPI().post(request); + LLHTTPClient::post( + url, + body, + new LLCreateInventoryCategoryResponder(this, callback, user_data) ); + return LLUUID::null; + } + } // Add the category to the internal representation LLPointer<LLViewerInventoryCategory> cat = @@ -1087,7 +1169,6 @@ void LLInventoryModel::notifyObservers() iter != mObservers.end(); ) { LLInventoryObserver* observer = *iter; - observer->changed(mModifyMask); // safe way to increment since changed may delete entries! (@!##%@!@&*!) @@ -2574,7 +2655,7 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**) << titem->getParentUUID() << llendl; U32 callback_id; msg->getU32Fast(_PREHASH_ItemData, _PREHASH_CallbackID, callback_id); - if(titem->getUUID().notNull()) + if(titem->getUUID().notNull() ) // && callback_id.notNull() ) { items.push_back(titem); cblist.push_back(InventoryCallbackInfo(callback_id, titem->getUUID())); diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index 340c1b0c22..0a564d353a 100644 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -360,7 +360,9 @@ public: // name based on type, pass in a NULL to the 'name' parameter. LLUUID createNewCategory(const LLUUID& parent_id, LLFolderType::EType preferred_type, - const std::string& name); + const std::string& name, + void (*callback)(const LLSD&, void*) = NULL, + void* user_data = NULL ); protected: // Internal methods that add inventory and make sure that all of // the internal data structures are consistent. These methods diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index d06374d232..80b53d5702 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -1105,30 +1105,23 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open) return FALSE; } - LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory"); + LLSidepanelInventory *inventory_panel = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory"); - // A. If the inventory side panel floater is open, use that preferably. - if (is_inventorysp_active()) - { - // Get the floater's z order to compare it to other inventory floaters' order later. - res = sidepanel_inventory->getActivePanel(); - z_min = gFloaterView->getZOrder(floater_inventory); - active_inv_floaterp = floater_inventory; - } - - // B. Iterate through the inventory floaters and return whichever is on top. + // Iterate through the inventory floaters and return whichever is on top. LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("inventory"); for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end(); ++iter) { - LLFloaterInventory* iv = dynamic_cast<LLFloaterInventory*>(*iter); - if (iv && iv->getVisible()) + LLFloaterSidePanelContainer* inventory_floater = dynamic_cast<LLFloaterSidePanelContainer*>(*iter); + inventory_panel = inventory_floater->findChild<LLSidepanelInventory>("main_panel"); + + if (inventory_floater && inventory_panel && inventory_floater->getVisible()) { - S32 z_order = gFloaterView->getZOrder(iv); + S32 z_order = gFloaterView->getZOrder(inventory_floater); if (z_order < z_min) { - res = iv->getPanel(); + res = inventory_panel->getActivePanel(); z_min = z_order; - active_inv_floaterp = iv; + active_inv_floaterp = inventory_floater; } } } @@ -1145,7 +1138,7 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open) { floater_inventory->openFloater(); - res = sidepanel_inventory->getActivePanel(); + res = inventory_panel->getActivePanel(); } return res; diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index 74fa5d350a..7650fe9229 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -133,10 +133,15 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) : navigateHome(); } - // FIXME: How do we create a bevel now? -// LLRect border_rect( 0, getRect().getHeight() + 2, getRect().getWidth() + 2, 0 ); -// mBorder = new LLViewBorder( std::string("web control border"), border_rect, LLViewBorder::BEVEL_IN ); -// addChild( mBorder ); + LLWindowShade::Params params; + params.name = "notification_shade"; + params.rect = getLocalRect(); + params.follows.flags = FOLLOWS_ALL; + params.modal = true; + + mWindowShade = LLUICtrlFactory::create<LLWindowShade>(params); + + addChild(mWindowShade); } LLMediaCtrl::~LLMediaCtrl() @@ -1092,39 +1097,28 @@ void LLMediaCtrl::onPopup(const LLSD& notification, const LLSD& response) void LLMediaCtrl::showNotification(LLNotificationPtr notify) { - delete mWindowShade; + LLWindowShade* shade = getChild<LLWindowShade>("notification_shade"); - LLWindowShade::Params params; - params.name = "notification_shade"; - params.rect = getLocalRect(); - params.follows.flags = FOLLOWS_ALL; - params.notification = notify; - params.modal = true; - //HACK: don't hardcode this if (notify->getIcon() == "Popup_Caution") { - params.bg_image.name = "Yellow_Gradient"; - params.text_color = LLColor4::black; + shade->setBackgroundImage(LLUI::getUIImage("Yellow_Gradient")); + shade->setTextColor(LLColor4::black); + shade->setCanClose(true); } - else - //HACK: another one since XUI doesn't support what we need right now - if (notify->getName() == "AuthRequest") + else if (notify->getName() == "AuthRequest") { - params.bg_image.name = "Yellow_Gradient"; - params.text_color = LLColor4::black; - params.can_close = false; + shade->setBackgroundImage(LLUI::getUIImage("Yellow_Gradient")); + shade->setTextColor(LLColor4::black); + shade->setCanClose(false); } else { //HACK: make this a property of the notification itself, "cancellable" - params.can_close = false; - params.text_color.control = "LabelTextColor"; + shade->setCanClose(false); + shade->setTextColor(LLUIColorTable::instance().getColor("LabelTextColor")); } - mWindowShade = LLUICtrlFactory::create<LLWindowShade>(params); - - addChild(mWindowShade); - mWindowShade->show(); + mWindowShade->show(notify); } void LLMediaCtrl::hideNotification() diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 183063f1db..4512c14b7a 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -48,6 +48,7 @@ #include "llrootview.h" #include "llviewerchat.h" #include "llnearbychat.h" +#include "lltranslate.h" #include "llresizehandle.h" @@ -108,6 +109,10 @@ BOOL LLNearbyChatBar::postBuild() mOutputMonitor = getChild<LLOutputMonitorCtrl>("chat_zone_indicator"); mOutputMonitor->setVisible(FALSE); + gSavedSettings.declareBOOL("nearbychat_history_visibility", mNearbyChat->getVisible(), "Visibility state of nearby chat history", TRUE); + + mNearbyChat->setVisible(gSavedSettings.getBOOL("nearbychat_history_visibility")); + // Register for font change notifications LLViewerChat::setFontChangedCallback(boost::bind(&LLNearbyChatBar::onChatFontChange, this, _1)); @@ -116,6 +121,12 @@ BOOL LLNearbyChatBar::postBuild() return TRUE; } +// virtual +void LLNearbyChatBar::onOpen(const LLSD& key) +{ + enableTranslationCheckbox(LLTranslate::isTranslationConfigured()); +} + bool LLNearbyChatBar::applyRectControl() { bool rect_controlled = LLFloater::applyRectControl(); @@ -159,6 +170,11 @@ void LLNearbyChatBar::showHistory() } } +void LLNearbyChatBar::enableTranslationCheckbox(BOOL enable) +{ + getChild<LLUICtrl>("translate_chat_checkbox")->setEnabled(enable); +} + void LLNearbyChatBar::draw() { displaySpeakingIndicator(); @@ -401,6 +417,8 @@ void LLNearbyChatBar::onToggleNearbyChatPanel() enableResizeCtrls(true); storeRectControl(); } + + gSavedSettings.setBOOL("nearbychat_history_visibility", mNearbyChat->getVisible()); } void LLNearbyChatBar::setMinimized(BOOL b) diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h index c2f57dc4ca..baf12a06ea 100644 --- a/indra/newview/llnearbychatbar.h +++ b/indra/newview/llnearbychatbar.h @@ -43,6 +43,7 @@ public: ~LLNearbyChatBar() {} virtual BOOL postBuild(); + /*virtual*/ void onOpen(const LLSD& key); static LLNearbyChatBar* getInstance(); @@ -60,6 +61,7 @@ public: static void sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate); void showHistory(); + void enableTranslationCheckbox(BOOL enable); /*virtual*/void setMinimized(BOOL b); protected: diff --git a/indra/newview/llpanelgrouplandmoney.cpp b/indra/newview/llpanelgrouplandmoney.cpp index e66dd5690c..363443646d 100644 --- a/indra/newview/llpanelgrouplandmoney.cpp +++ b/indra/newview/llpanelgrouplandmoney.cpp @@ -1062,7 +1062,7 @@ void LLGroupMoneyDetailsTabEventHandler::processReply(LLMessageSystem* msg, // We don't do time zone corrections of the calculated number of seconds // because we don't have a full time stamp, only a date. - substitution["datetime"] = LLDateUtil::secondsSinceEpochFromString("%A %b %d, %Y", start_date); + substitution["datetime"] = LLDateUtil::secondsSinceEpochFromString("%Y-%m-%d", start_date); LLStringUtil::format (time_str, substitution); if ( interval_days != mImplementationp->mIntervalLength || @@ -1217,7 +1217,7 @@ void LLGroupMoneySalesTabEventHandler::processReply(LLMessageSystem* msg, // We don't do time zone corrections of the calculated number of seconds // because we don't have a full time stamp, only a date. - substitution["datetime"] = LLDateUtil::secondsSinceEpochFromString("%A %b %d, %Y", start_date); + substitution["datetime"] = LLDateUtil::secondsSinceEpochFromString("%Y-%m-%d", start_date); LLStringUtil::format (time_str, substitution); text = time_str + "\n\n"; diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 9944b51902..68ef13cd68 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -28,6 +28,7 @@ #include "llpanelmaininventory.h" #include "llagent.h" +#include "llagentcamera.h" #include "llavataractions.h" #include "lldndbutton.h" #include "lleconomy.h" @@ -294,7 +295,13 @@ void LLPanelMainInventory::closeAllFolders() void LLPanelMainInventory::newWindow() { - LLFloaterInventory::showAgentInventory(); + static S32 instance_num = 0; + instance_num = (instance_num + 1) % S32_MAX; + + if (!gAgentCamera.cameraMouselook()) + { + LLFloaterReg::showTypedInstance<LLFloaterSidePanelContainer>("inventory", LLSD(instance_num)); + } } void LLPanelMainInventory::doCreate(const LLSD& userdata) diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index d5e289e6e6..9c46f04abf 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -526,11 +526,11 @@ LLPanelPeople::~LLPanelPeople() LLVoiceClient::getInstance()->removeObserver(this); } - delete mGroupPlusMenuHandle.get(); - delete mNearbyViewSortMenuHandle.get(); - delete mFriendsViewSortMenuHandle.get(); - delete mGroupsViewSortMenuHandle.get(); - delete mRecentViewSortMenuHandle.get(); + if (mGroupPlusMenuHandle.get()) mGroupPlusMenuHandle.get()->die(); + if (mNearbyViewSortMenuHandle.get()) mNearbyViewSortMenuHandle.get()->die(); + if (mNearbyViewSortMenuHandle.get()) mNearbyViewSortMenuHandle.get()->die(); + if (mGroupsViewSortMenuHandle.get()) mGroupsViewSortMenuHandle.get()->die(); + if (mRecentViewSortMenuHandle.get()) mRecentViewSortMenuHandle.get()->die(); } diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index 933b40ec79..39c0628cbe 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -1351,7 +1351,6 @@ void LLPanelPrimMediaControls::showNotification(LLNotificationPtr notify) LLWindowShade::Params params; params.rect = mMediaRegion->getLocalRect(); params.follows.flags = FOLLOWS_ALL; - params.notification = notify; //HACK: don't hardcode this if (notify->getIcon() == "Popup_Caution") @@ -1369,7 +1368,7 @@ void LLPanelPrimMediaControls::showNotification(LLNotificationPtr notify) mWindowShade = LLUICtrlFactory::create<LLWindowShade>(params); mMediaRegion->addChild(mWindowShade); - mWindowShade->show(); + mWindowShade->show(notify); } void LLPanelPrimMediaControls::hideNotification() diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index b1eeabb028..e2e7006773 100755 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -177,7 +177,7 @@ LLPanelProfile::ChildStack::~ChildStack() LLView* viewp = *it; if (viewp) { - delete viewp; + viewp->die(); } } mStack.pop_back(); diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index d3543daff0..1f1cccad85 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -388,7 +388,7 @@ LLTeleportHistoryPanel::LLTeleportHistoryPanel() LLTeleportHistoryPanel::~LLTeleportHistoryPanel() { LLTeleportHistoryFlatItemStorage::instance().purge(); - delete mGearMenuHandle.get(); + if (mGearMenuHandle.get()) mGearMenuHandle.get()->die(); mTeleportHistoryChangedConnection.disconnect(); } diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index b19bf5d234..88727bf59b 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -35,6 +35,7 @@ #include "llcombobox.h" #include "lldir.h" #include "llexternaleditor.h" +#include "llfilepicker.h" #include "llfloaterreg.h" #include "llinventorydefines.h" #include "llinventorymodel.h" @@ -503,6 +504,14 @@ void LLScriptEdCore::initMenu() menuItem = getChild<LLMenuItemCallGL>("Keyword Help..."); menuItem->setClickCallback(boost::bind(&LLScriptEdCore::onBtnDynamicHelp, this)); + + menuItem = getChild<LLMenuItemCallGL>("LoadFromFile"); + menuItem->setClickCallback(boost::bind(&LLScriptEdCore::onBtnLoadFromFile, this)); + menuItem->setEnableCallback(boost::bind(&LLScriptEdCore::enableLoadFromFileMenu, this)); + + menuItem = getChild<LLMenuItemCallGL>("SaveToFile"); + menuItem->setClickCallback(boost::bind(&LLScriptEdCore::onBtnSaveToFile, this)); + menuItem->setEnableCallback(boost::bind(&LLScriptEdCore::enableSaveToFileMenu, this)); } void LLScriptEdCore::setScriptText(const std::string& text, BOOL is_valid) @@ -1096,6 +1105,88 @@ BOOL LLScriptEdCore::handleKeyHere(KEY key, MASK mask) return FALSE; } +void LLScriptEdCore::onBtnLoadFromFile( void* data ) +{ + LLScriptEdCore* self = (LLScriptEdCore*) data; + + // TODO Maybe add a dialogue warning here if the current file has unsaved changes. + LLFilePicker& file_picker = LLFilePicker::instance(); + if( !file_picker.getOpenFile( LLFilePicker::FFLOAD_SCRIPT ) ) + { + //File picking cancelled by user, so nothing to do. + return; + } + + std::string filename = file_picker.getFirstFile(); + + std::ifstream fin(filename.c_str()); + + std::string line; + std::string text; + std::string linetotal; + while (!fin.eof()) + { + getline(fin,line); + text += line; + if (!fin.eof()) + { + text += "\n"; + } + } + fin.close(); + + // Only replace the script if there is something to replace with. + if (text.length() > 0) + { + self->mEditor->selectAll(); + LLWString script(utf8str_to_wstring(text)); + self->mEditor->insertText(script); + } +} + +void LLScriptEdCore::onBtnSaveToFile( void* userdata ) +{ + + LLViewerStats::getInstance()->incStat( LLViewerStats::ST_LSL_SAVE_COUNT ); + + LLScriptEdCore* self = (LLScriptEdCore*) userdata; + + if( self->mSaveCallback ) + { + LLFilePicker& file_picker = LLFilePicker::instance(); + if( file_picker.getSaveFile( LLFilePicker::FFSAVE_SCRIPT ) ) + { + std::string filename = file_picker.getFirstFile(); + std::string scriptText=self->mEditor->getText(); + std::ofstream fout(filename.c_str()); + fout<<(scriptText); + fout.close(); + self->mSaveCallback( self->mUserdata, FALSE ); + } + } +} + +bool LLScriptEdCore::canLoadOrSaveToFile( void* userdata ) +{ + LLScriptEdCore* self = (LLScriptEdCore*) userdata; + return self->mEditor->canLoadOrSaveToFile(); +} + +// static +bool LLScriptEdCore::enableSaveToFileMenu(void* userdata) +{ + LLScriptEdCore* self = (LLScriptEdCore*)userdata; + if (!self || !self->mEditor) return FALSE; + return self->mEditor->canLoadOrSaveToFile(); +} + +// static +bool LLScriptEdCore::enableLoadFromFileMenu(void* userdata) +{ + LLScriptEdCore* self = (LLScriptEdCore*)userdata; + return (self && self->mEditor) ? self->mEditor->canLoadOrSaveToFile() : FALSE; +} + /// --------------------------------------------------------------------------- /// LLScriptEdContainer /// --------------------------------------------------------------------------- diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index f86be615c4..7563cecd9d 100644 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -79,6 +79,7 @@ public: /*virtual*/ BOOL postBuild(); BOOL canClose(); void setEnableEditing(bool enable); + bool canLoadOrSaveToFile( void* userdata ); void setScriptText(const std::string& text, BOOL is_valid); bool loadScriptText(const std::string& filename); @@ -98,6 +99,11 @@ public: static void onClickForward(void* userdata); static void onBtnInsertSample(void*); static void onBtnInsertFunction(LLUICtrl*, void*); + static void onBtnLoadFromFile(void*); + static void onBtnSaveToFile(void*); + + static bool enableSaveToFileMenu(void* userdata); + static bool enableLoadFromFileMenu(void* userdata); virtual bool hasAccelerators() const { return true; } diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index 85a7e75271..6f98be1cb8 100644 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -408,9 +408,16 @@ void LLScriptFloaterManager::onRemoveNotification(const LLUUID& notification_id) } // remove related chiclet - LLChicletBar::getInstance()->getChicletPanel()->removeChiclet(notification_id); + if (LLChicletBar::instanceExists()) + { + LLChicletBar::getInstance()->getChicletPanel()->removeChiclet(notification_id); + } - LLIMWellWindow::getInstance()->removeObjectRow(notification_id); + LLIMWellWindow* im_well_window = LLIMWellWindow::findInstance(); + if (im_well_window) + { + im_well_window->removeObjectRow(notification_id); + } mNotifications.erase(notification_id); diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 36d6ff3ef2..7e02a41e7e 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2026,7 +2026,7 @@ bool idle_startup() const F32 wearables_time = wearables_timer.getElapsedTimeF32(); const F32 MAX_WEARABLES_TIME = 10.f; - if (!gAgent.isGenderChosen()) + if (!gAgent.isGenderChosen() && isAgentAvatarValid()) { // No point in waiting for clothing, we don't even // know what gender we are. Pop a dialog to ask and @@ -2541,6 +2541,12 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name, gender = SEX_FEMALE; } + if (!isAgentAvatarValid()) + { + llwarns << "Trying to load an initial outfit for an invalid agent avatar" << llendl; + return; + } + gAgentAvatarp->setSex(gender); // try to find the outfit - if not there, create some default diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index 3aa6a3b7e5..0cb6c85012 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -159,6 +159,7 @@ void LLSysWellWindow::setVisible(BOOL visible) LLTransientDockableFloater::setVisible(visible); // update notification channel state + initChannel(); // make sure the channel still exists if(mChannel) { mChannel->updateShowToastsState(); @@ -598,6 +599,13 @@ LLIMWellWindow* LLIMWellWindow::getInstance(const LLSD& key /*= LLSD()*/) return LLFloaterReg::getTypedInstance<LLIMWellWindow>("im_well_window", key); } + +// static +LLIMWellWindow* LLIMWellWindow::findInstance(const LLSD& key /*= LLSD()*/) +{ + return LLFloaterReg::findTypedInstance<LLIMWellWindow>("im_well_window", key); +} + BOOL LLIMWellWindow::postBuild() { BOOL rv = LLSysWellWindow::postBuild(); @@ -751,7 +759,10 @@ void LLIMWellWindow::removeObjectRow(const LLUUID& notification_id) { if (mMessageList->removeItemByValue(notification_id)) { - mSysWellChiclet->updateWidget(isWindowEmpty()); + if (mSysWellChiclet) + { + mSysWellChiclet->updateWidget(isWindowEmpty()); + } } else { diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h index 52e5370505..272e9cfcb1 100644 --- a/indra/newview/llsyswellwindow.h +++ b/indra/newview/llsyswellwindow.h @@ -153,6 +153,7 @@ public: ~LLIMWellWindow(); static LLIMWellWindow* getInstance(const LLSD& key = LLSD()); + static LLIMWellWindow* findInstance(const LLSD& key = LLSD()); static void initClass() { getInstance(); } /*virtual*/ BOOL postBuild(); diff --git a/indra/newview/lltranslate.cpp b/indra/newview/lltranslate.cpp index 7eb54271f4..c1cc9c7bc4 100755 --- a/indra/newview/lltranslate.cpp +++ b/indra/newview/lltranslate.cpp @@ -95,6 +95,12 @@ bool LLGoogleTranslationHandler::parseResponse( return parseTranslation(root, translation, detected_lang); } +// virtual +bool LLGoogleTranslationHandler::isConfigured() const +{ + return !getAPIKey().empty(); +} + // static void LLGoogleTranslationHandler::parseErrorResponse( const Json::Value& root, @@ -218,6 +224,12 @@ bool LLBingTranslationHandler::parseResponse( return true; } +// virtual +bool LLBingTranslationHandler::isConfigured() const +{ + return !getAPIKey().empty(); +} + // static std::string LLBingTranslationHandler::getAPIKey() { @@ -332,6 +344,12 @@ std::string LLTranslate::getTranslateLanguage() } // static +bool LLTranslate::isTranslationConfigured() +{ + return getPreferredHandler().isConfigured(); +} + +// static const LLTranslationAPIHandler& LLTranslate::getPreferredHandler() { EService service = SERVICE_BING; diff --git a/indra/newview/lltranslate.h b/indra/newview/lltranslate.h index c2330daa81..424bc14587 100755 --- a/indra/newview/lltranslate.h +++ b/indra/newview/lltranslate.h @@ -89,6 +89,11 @@ public: std::string& detected_lang, std::string& err_msg) const = 0; + /** + * @return if the handler is configured to function properly + */ + virtual bool isConfigured() const = 0; + virtual ~LLTranslationAPIHandler() {} protected: @@ -115,6 +120,7 @@ public: std::string& translation, std::string& detected_lang, std::string& err_msg) const; + /*virtual*/ bool isConfigured() const; private: static void parseErrorResponse( @@ -148,6 +154,7 @@ public: std::string& translation, std::string& detected_lang, std::string& err_msg) const; + /*virtual*/ bool isConfigured() const; private: static std::string getAPIKey(); }; @@ -275,8 +282,17 @@ public : * @param key Key to verify. */ static void verifyKey(KeyVerificationReceiverPtr& receiver, const std::string& key); + + /** + * @return translation target language + */ static std::string getTranslateLanguage(); + /** + * @return true if translation is configured properly. + */ + static bool isTranslationConfigured(); + private: static const LLTranslationAPIHandler& getPreferredHandler(); static const LLTranslationAPIHandler& getHandler(EService service); diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 8406f639df..cca8f10515 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -294,9 +294,10 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterUIPreviewUtil::registerFloater(); LLFloaterReg::add("upload_anim", "floater_animation_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAnimPreview>, "upload"); LLFloaterReg::add("upload_image", "floater_image_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterImagePreview>, "upload"); - LLFloaterReg::add("upload_sound", "floater_sound_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSoundPreview>, "upload"); LLFloaterReg::add("upload_model", "floater_model_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterModelPreview>, "upload"); LLFloaterReg::add("upload_model_wizard", "floater_model_wizard.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterModelWizard>); + LLFloaterReg::add("upload_script", "floater_script_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterScriptPreview>, "upload"); + 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>); diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 42dabdec0d..09cce39c3d 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1966,7 +1966,7 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_ } } - LL_WARNS("Plugin") << "plugin intialization failed for mime type: " << media_type << LL_ENDL; + LL_WARNS_ONCE("Plugin") << "plugin intialization failed for mime type: " << media_type << LL_ENDL; LLSD args; args["MIME_TYPE"] = media_type; LLNotificationsUtil::add("NoPlugin", args); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 3a1b8d7623..0104d35e53 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2203,6 +2203,30 @@ class LLAdvancedEnableToggleHackedGodmode : public view_listener_t //// Advanced menu ////------------------------------------------------------------------- + +////////////////// +// DEVELOP MENU // +////////////////// + +class LLDevelopCheckLoggingLevel : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + U32 level = userdata.asInteger(); + return (static_cast<LLError::ELevel>(level) == LLError::getDefaultLevel()); + } +}; + +class LLDevelopSetLoggingLevel : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + U32 level = userdata.asInteger(); + LLError::setDefaultLevel(static_cast<LLError::ELevel>(level)); + return true; + } +}; + ////////////////// // ADMIN MENU // ////////////////// @@ -8195,6 +8219,9 @@ void initialize_menus() view_listener_t::addMenu(new LLAdvancedRequestAdminStatus(), "Advanced.RequestAdminStatus"); view_listener_t::addMenu(new LLAdvancedLeaveAdminStatus(), "Advanced.LeaveAdminStatus"); + // Develop >Set logging level + view_listener_t::addMenu(new LLDevelopCheckLoggingLevel(), "Develop.CheckLoggingLevel"); + view_listener_t::addMenu(new LLDevelopSetLoggingLevel(), "Develop.SetLoggingLevel"); // Admin >Object view_listener_t::addMenu(new LLAdminForceTakeCopy(), "Admin.ForceTakeCopy"); diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index ed943964f9..e3cb985ddb 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1493,6 +1493,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) capabilityNames.append("AvatarPickerSearch"); capabilityNames.append("ChatSessionRequest"); capabilityNames.append("CopyInventoryFromNotecard"); + capabilityNames.append("CreateInventoryCategory"); capabilityNames.append("DispatchRegionInfo"); capabilityNames.append("EstateChangeInfo"); capabilityNames.append("EventQueueGet"); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 31dfa1923c..b73be4ed43 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -130,6 +130,7 @@ #include "llmorphview.h" #include "llmoveview.h" #include "llnavigationbar.h" +#include "llpaneltopinfobar.h" #include "llpopupview.h" #include "llpreviewtexture.h" #include "llprogressview.h" @@ -5001,8 +5002,8 @@ void LLViewerWindow::setUIVisibility(bool visible) gToolBarView->setToolBarsVisible(visible); } - mRootView->getChildView("topinfo_bar_container")->setVisible(visible); - mRootView->getChildView("nav_bar_container")->setVisible(visible); + LLNavigationBar::getInstance()->setVisible(visible ? gSavedSettings.getBOOL("ShowNavbarNavigationPanel") : FALSE); + LLPanelTopInfoBar::getInstance()->setVisible(visible? gSavedSettings.getBOOL("ShowMiniLocationPanel") : FALSE); mRootView->getChildView("status_bar_container")->setVisible(visible); } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 4767ba2bed..68637a7ed9 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5414,18 +5414,6 @@ BOOL LLVOAvatar::loadAvatar() } } - // Uncomment to enable avatar_lad.xml debugging. - std::ofstream file; - file.open("avatar_lad.log"); - for( LLViewerVisualParam* param = (LLViewerVisualParam*) getFirstVisualParam(); - param; - param = (LLViewerVisualParam*) getNextVisualParam() ) - { - param->getInfo()->toStream(file); - file << std::endl; - } - - file.close(); return TRUE; } diff --git a/indra/newview/skins/default/xui/de/floater_chat_bar.xml b/indra/newview/skins/default/xui/de/floater_chat_bar.xml index dc5a7cd681..2464a55665 100644 --- a/indra/newview/skins/default/xui/de/floater_chat_bar.xml +++ b/indra/newview/skins/default/xui/de/floater_chat_bar.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="chat_bar" title="CHAT IN DER NÄHE"> - <panel> + <panel name="bottom_panel"> <line_editor label="Zum Chatten hier klicken." name="chat_box" tool_tip="Eingabetaste zum Sprechen, Strg+Eingabe zum Rufen"/> <button name="show_nearby_chat" tool_tip="Chatprotokoll in der Nähe ein-/ausblenden"/> </panel> diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml index 72e7ec8eb4..a5fcd3e0b4 100644 --- a/indra/newview/skins/default/xui/de/notifications.xml +++ b/indra/newview/skins/default/xui/de/notifications.xml @@ -1443,7 +1443,7 @@ Zur Installation des Updates muss [APP_NAME] neu gestartet werden. <usetemplate ignoretext="Bestätigen, bevor Objekte an Ihre Eigentümer zurückgegeben werden" name="okcancelignore" notext="Abbrechen" yestext="OK"/> </notification> <notification name="GroupLeaveConfirmMember"> - Sie sind Mitglied der Gruppe [GROUP]. + Sie sind Mitglied der Gruppe <nolink>[GROUP]</nolink>. Diese Gruppe verlassen? <usetemplate name="okcancelbuttons" notext="Abbrechen" yestext="OK"/> </notification> diff --git a/indra/newview/skins/default/xui/de/panel_status_bar.xml b/indra/newview/skins/default/xui/de/panel_status_bar.xml index d34fcf70bc..2493d60df6 100644 --- a/indra/newview/skins/default/xui/de/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/de/panel_status_bar.xml @@ -18,7 +18,7 @@ <panel name="balance_bg"> <text name="balance" tool_tip="Klicken, um L$-Guthaben zu aktualisieren" value="20 L$"/> <button label="L$ kaufen" name="buyL" tool_tip="Hier klicken, um mehr L$ zu kaufen"/> - <button label="Einkaufen" name="goShop" tool_tip="Second Life-Marktplatz öffnen"/> + <button label="Einkaufen" name="goShop" tool_tip="Second Life-Marktplatz öffnen" width="85"/> </panel> <text name="TimeText" tool_tip="Aktuelle Zeit (Pazifik)"> 24:00 H PST diff --git a/indra/newview/skins/default/xui/en/floater_chat_bar.xml b/indra/newview/skins/default/xui/en/floater_chat_bar.xml index 8d0cecdac3..63992462b3 100644 --- a/indra/newview/skins/default/xui/en/floater_chat_bar.xml +++ b/indra/newview/skins/default/xui/en/floater_chat_bar.xml @@ -9,6 +9,7 @@ single_instance="true" title="NEARBY CHAT" save_rect="true" + save_visibility="true" can_close="true" can_minimize="true" help_topic="chat_bar" @@ -30,6 +31,7 @@ <panel width="300" height="31" left="0" + name="bottom_panel" bottom="-1" follows="left|right|bottom" tab_group="1"> diff --git a/indra/newview/skins/default/xui/en/menu_edit.xml b/indra/newview/skins/default/xui/en/menu_edit.xml index fab76c497c..99061e089a 100644 --- a/indra/newview/skins/default/xui/en/menu_edit.xml +++ b/indra/newview/skins/default/xui/en/menu_edit.xml @@ -6,6 +6,7 @@ <menu_item_call label="Undo" name="Undo" + allow_key_repeat="true" shortcut="control|Z"> <menu_item_call.on_click function="Edit.Undo" /> @@ -15,6 +16,7 @@ <menu_item_call label="Redo" name="Redo" + allow_key_repeat="true" shortcut="control|Y"> <menu_item_call.on_click function="Edit.Redo" /> @@ -43,6 +45,7 @@ <menu_item_call label="Paste" name="Paste" + allow_key_repeat="true" shortcut="control|V"> <menu_item_call.on_click function="Edit.Paste" /> diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml index 8ac1ac9e09..101e104eab 100644 --- a/indra/newview/skins/default/xui/en/menu_login.xml +++ b/indra/newview/skins/default/xui/en/menu_login.xml @@ -174,7 +174,58 @@ function="Advanced.WebContentTest" parameter="http://google.com"/> </menu_item_call> - <menu_item_check + <menu + create_jump_keys="true" + label="Set Logging Level" + name="Set Logging Level" + tear_off="true"> + <menu_item_check + label="Debug"> + <menu_item_check.on_check + function="Develop.CheckLoggingLevel" + parameter="0" /> + <menu_item_check.on_click + function="Develop.SetLoggingLevel" + parameter="0" /> + </menu_item_check> + <menu_item_check + label="Info"> + <menu_item_check.on_check + function="Develop.CheckLoggingLevel" + parameter="1" /> + <menu_item_check.on_click + function="Develop.SetLoggingLevel" + parameter="1" /> + </menu_item_check> + <menu_item_check + label="Warning"> + <menu_item_check.on_check + function="Develop.CheckLoggingLevel" + parameter="2" /> + <menu_item_check.on_click + function="Develop.SetLoggingLevel" + parameter="2" /> + </menu_item_check> + <menu_item_check + label="Error"> + <menu_item_check.on_check + function="Develop.CheckLoggingLevel" + parameter="3" /> + <menu_item_check.on_click + function="Develop.SetLoggingLevel" + parameter="3" /> + </menu_item_check> + <menu_item_check + label="None"> + <menu_item_check.on_check + function="Develop.CheckLoggingLevel" + parameter="4" /> + <menu_item_check.on_click + function="Develop.SetLoggingLevel" + parameter="4" /> + </menu_item_check> + </menu> + <menu_item_check label="Show Grid Picker" name="Show Grid Picker" visible="false" diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 0aa5c72f2a..ec2dd10248 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -1154,6 +1154,7 @@ enabled="false" label="Undo" name="Undo" + allow_key_repeat="true" shortcut="control|Z"> <on_click function="Edit.Undo" @@ -1165,6 +1166,7 @@ enabled="false" label="Redo" name="Redo" + allow_key_repeat="true" shortcut="control|Y"> <on_click function="Edit.Redo" @@ -3367,6 +3369,57 @@ function="ToggleControl" parameter="ShowConsoleWindow" /> </menu_item_check> + <menu + create_jump_keys="true" + label="Set Logging Level" + name="Set Logging Level" + tear_off="true"> + <menu_item_check + label="Debug"> + <menu_item_check.on_check + function="Develop.CheckLoggingLevel" + parameter="0" /> + <menu_item_check.on_click + function="Develop.SetLoggingLevel" + parameter="0" /> + </menu_item_check> + <menu_item_check + label="Info"> + <menu_item_check.on_check + function="Develop.CheckLoggingLevel" + parameter="1" /> + <menu_item_check.on_click + function="Develop.SetLoggingLevel" + parameter="1" /> + </menu_item_check> + <menu_item_check + label="Warning"> + <menu_item_check.on_check + function="Develop.CheckLoggingLevel" + parameter="2" /> + <menu_item_check.on_click + function="Develop.SetLoggingLevel" + parameter="2" /> + </menu_item_check> + <menu_item_check + label="Error"> + <menu_item_check.on_check + function="Develop.CheckLoggingLevel" + parameter="3" /> + <menu_item_check.on_click + function="Develop.SetLoggingLevel" + parameter="3" /> + </menu_item_check> + <menu_item_check + label="None"> + <menu_item_check.on_check + function="Develop.CheckLoggingLevel" + parameter="4" /> + <menu_item_check.on_click + function="Develop.SetLoggingLevel" + parameter="4" /> + </menu_item_check> + </menu> <menu_item_separator/> diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index a7705c8bac..1daf2e6948 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -3409,7 +3409,7 @@ Are you sure you want to return the selected objects to their owners? Transferab icon="alert.tga" name="GroupLeaveConfirmMember" type="alert"> -You are currently a member of the group [GROUP]. +You are currently a member of the group <nolink>[GROUP]</nolink>. Leave Group? <tag>group</tag> <tag>confirm</tag> @@ -6953,6 +6953,26 @@ With the following Residents: <notification icon="notifytip.tga" + name="ShareFolderConfirmation" + type="alertmodal"> +Only one folder at a time can be shared. + +Are you sure you want to share the following items: + +<nolink>[ITEMS]</nolink> + +With the following Residents: + +[RESIDENTS] + <tag>confirm</tag> + <usetemplate + name="okcancelbuttons" + notext="Cancel" + yestext="Ok"/> + </notification> + + <notification + icon="notifytip.tga" name="ItemsShared" type="notifytip"> Items successfully shared. diff --git a/indra/newview/skins/default/xui/en/panel_preferences_general.xml b/indra/newview/skins/default/xui/en/panel_preferences_general.xml index 4079a80924..9827180aa7 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml @@ -420,7 +420,7 @@ follows="left|top" height="29" layout="topleft" - left="50" + left="30" name="busy_response" width="470" word_wrap="true"> diff --git a/indra/newview/skins/default/xui/en/panel_script_ed.xml b/indra/newview/skins/default/xui/en/panel_script_ed.xml index 8d42024386..f6a8af0973 100644 --- a/indra/newview/skins/default/xui/en/panel_script_ed.xml +++ b/indra/newview/skins/default/xui/en/panel_script_ed.xml @@ -54,12 +54,22 @@ label="Save" layout="topleft" name="Save" /> - <menu_item_separator - layout="topleft" /> - <menu_item_call - label="Revert All Changes" - layout="topleft" - name="Revert All Changes" /> + <menu_item_separator + layout="topleft" /> + <menu_item_call + label="Revert All Changes" + layout="topleft" + name="Revert All Changes" /> + <menu_item_separator + layout="topleft" /> + <menu_item_call + label="Load from file..." + layout="topleft" + name="LoadFromFile" /> + <menu_item_call + label="Save to file..." + layout="topleft" + name="SaveToFile" /> </menu> <menu top="0" diff --git a/indra/newview/skins/default/xui/en/panel_snapshot_postcard.xml b/indra/newview/skins/default/xui/en/panel_snapshot_postcard.xml index d8ff043444..ebba292a93 100644 --- a/indra/newview/skins/default/xui/en/panel_snapshot_postcard.xml +++ b/indra/newview/skins/default/xui/en/panel_snapshot_postcard.xml @@ -16,14 +16,6 @@ name="upload_message"> Sending... </string> - <string - name="default_subject"> - Postcard from [SECOND_LIFE]. - </string> - <string - name="default_message"> - Check this out! - </string> <icon follows="top|left" height="18" 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 3239c4e531..d453a970e7 100644 --- a/indra/newview/skins/default/xui/en/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml @@ -70,7 +70,7 @@ pad_bottom="2" tool_tip="Click to buy more L$" top="0" - width="55" /> + width="80" /> <button halign="left" font="SansSerifSmall" @@ -87,7 +87,6 @@ left_pad="0" label_shadow="true" name="goShop" - pad_right="0" pad_bottom="2" tool_tip="Open Second Life Marketplace" top="0" diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 9752a07b66..2b0dcdfeca 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -88,7 +88,7 @@ We are very sorry for the inconvenience.</string> Logins are currently restricted to employees only. Check www.secondlife.com/status for updates.</string> <string name="LoginFailedPremiumOnly">Second Life logins are temporarily restricted in order to make sure that those in-world have the best possible experience. - + People with free accounts will not be able to access Second Life during this time, to make room for those who have paid for Second Life.</string> <string name="LoginFailedComputerProhibited">Second Life cannot be accessed from this computer. If you feel this is an error, please contact @@ -168,7 +168,7 @@ Please try logging in again in a minute.</string> <string name="TooltipOutboxWorn">You are wearing one or more of these objects. Remove them from your avatar and try moving them again.</string> <string name="TooltipOutboxFolderLevels">This folder has too many levels of subfolders. Rearrange the interior folders to a maximum of 4 levels deep (Root Folder contains A contains B contains C).</string> <string name="TooltipOutboxTooManyObjects">This folder contains more than 200 objects. Box some of the items to reduce the object count.</string> - + <!-- tooltips for Urls --> <string name="TooltipHttpUrl">Click to view this web page</string> <string name="TooltipSLURL">Click to view this location's information</string> @@ -188,7 +188,7 @@ Please try logging in again in a minute.</string> <string name="TooltipObjectIMUrl">Click to view this object's description</string> <string name="TooltipMapUrl">Click to view this location on a map</string> <string name="TooltipSLAPP">Click to run the secondlife:// command</string> - <string name="CurrentURL" value=" CurrentURL: [CurrentURL]" /> + <string name="CurrentURL" value=" CurrentURL: [CurrentURL]" /> <!-- text for SLURL labels --> <string name="SLurlLabelTeleport">Teleport to</string> @@ -427,9 +427,10 @@ Please try logging in again in a minute.</string> <string name="compressed_image_files">Compressed Images</string> <string name="load_files">Load Files</string> <string name="choose_the_directory">Choose Directory</string> + <string name="script_files">Scripts</string> - <!-- LSL Usage Hover Tips --> - <!-- NOTE: For now these are set as translate="false", until DEV-40761 is implemented (to internationalize the rest of tooltips in the same window). + <!-- LSL Usage Hover Tips --> + <!-- NOTE: For now these are set as translate="false", until DEV-40761 is implemented (to internationalize the rest of tooltips in the same window). This has no effect on viewer code, but prevents Linden Lab internal localization tool from scraping these strings. --> <string name="LSLTipSleepTime" translate="false"> Sleeps script for [SLEEP_TIME] seconds. @@ -1950,7 +1951,7 @@ Returns a string with the requested data about the region <string name="physics">Physics</string> <string name="invalid">invalid</string> <string name="none">none</string> - + <!-- Not Worn Wearable Types --> <string name="shirt_not_worn">Shirt not worn</string> <string name="pants_not_worn">Pants not worn</string> @@ -1987,7 +1988,7 @@ Returns a string with the requested data about the region <!-- Wearable List--> <string name="NewWearable">New [WEARABLE_ITEM]</string> - + <!-- LLGroupNotify --> <!-- used in the construction of a Group Notice blue dialog box, buttons, tooltip etc. Seems to be no longer utilized by code in Viewer 2.0 --> <string name="next">Next</string> @@ -2314,7 +2315,7 @@ Returns a string with the requested data about the region <string name="ScriptLimitsRequestWrongRegion">Error: script information is only available in your current region</string> <string name="ScriptLimitsRequestWaiting">Retrieving information...</string> <string name="ScriptLimitsRequestDontOwnParcel">You do not have permission to examine this parcel</string> - + <string name="SITTING_ON">Sitting On</string> <string name="ATTACH_CHEST">Chest</string> <string name="ATTACH_HEAD">Head</string> @@ -2354,7 +2355,7 @@ Returns a string with the requested data about the region <string name="ATTACH_HUD_BOTTOM_LEFT">HUD Bottom Left</string> <string name="ATTACH_HUD_BOTTOM">HUD Bottom</string> <string name="ATTACH_HUD_BOTTOM_RIGHT">HUD Bottom Right</string> - + <!-- script editor --> <string name="CursorPos">Line [LINE], Column [COLUMN]</string> @@ -2367,7 +2368,7 @@ Returns a string with the requested data about the region <!-- panel contents --> <string name="PanelContentsTooltip">Content of object</string> - <string name="PanelContentsNewScript">New Script</string> + <string name="PanelContentsNewScript">New Script</string> <!-- panel preferences general --> <string name="BusyModeResponseDefault">The Resident you messaged is in 'busy mode' which means they have requested not to be disturbed. Your message will still be shown in their IM panel for later viewing.</string> @@ -2397,7 +2398,7 @@ Returns a string with the requested data about the region <!-- panel classified --> <string name="ClassifiedClicksTxt">Clicks: [TELEPORT] teleport, [MAP] map, [PROFILE] profile</string> <string name="ClassifiedUpdateAfterPublish">(will update after publish)</string> - + <!-- panel picks --> <string name="NoPicksClassifiedsText">You haven't created any Picks or Classifieds. Click the Plus button below to create a Pick or Classified.</string> <string name="NoAvatarPicksClassifiedsText">User has no picks or classifieds</string> @@ -3274,7 +3275,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. You have blocked this Resident. Sending a message will automatically unblock them. </string> <!--Some times string name is getting from the body of server response. - For ex.: from gIMMgr::showSessionStartError in the LLViewerChatterBoxSessionStartReply::post. + For ex.: from gIMMgr::showSessionStartError in the LLViewerChatterBoxSessionStartReply::post. In case of the EXT-3115 issue 'generic' is passed into the gIMMgr::showSessionStartError as a string name. Also there are some other places where "generic" is used. So, let add string with name="generic" with the same value as "generic_request_error" --> @@ -3300,7 +3301,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. You are not a session moderator. </string> <!--Some times string name is getting from the body of server response. - For ex.: from gIMMgr::showSessionStartError in the LLViewerChatterBoxSessionStartReply::post. + For ex.: from gIMMgr::showSessionStartError in the LLViewerChatterBoxSessionStartReply::post. In case of the EXT-3562 issue 'muted' is passed into the gIMMgr::showSessionStartError as a string name. So, let add string with name="muted" with the same value as "muted_error" --> <string name="muted"> @@ -3313,12 +3314,12 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. Unable to add users to chat session with [RECIPIENT]. </string> <!--Some times string name is getting from the body of server response. - For ex.: from gIMMgr::showSessionStartError in the LLViewerChatterBoxSessionStartReply::post. + For ex.: from gIMMgr::showSessionStartError in the LLViewerChatterBoxSessionStartReply::post. In case of the EXT-3562 issue 'message' is passed into the gIMMgr::showSessionStartError as a string name. So, let add string with name="message" with the same value as "message_session_event" --> <string name="message"> Unable to send your message to the chat session with [RECIPIENT]. - </string> + </string> <string name="message_session_event"> Unable to send your message to the chat session with [RECIPIENT]. </string> @@ -3326,7 +3327,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. Error while moderating. </string> <!--Some times string name is getting from the body of server response. - For ex.: from gIMMgr::showSessionStartError in the LLViewerChatterBoxSessionStartReply::post. + For ex.: from gIMMgr::showSessionStartError in the LLViewerChatterBoxSessionStartReply::post. In case of the EXT-3459 issue 'removed' is passed into the gIMMgr::showSessionStartError as a string name. So, let add string with name="removed" with the same value as "removed_from_group" --> <string name="removed"> @@ -3347,9 +3348,9 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="session_initialization_timed_out_error"> The session initialization is timed out </string> - + <string name="Home position set.">Home position set.</string> - + <string name="voice_morphing_url">http://secondlife.com/landing/voicemorphing</string> <!-- Financial operations strings --> @@ -3371,20 +3372,20 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="to join a group">to join a group</string> <string name="to upload">to upload</string> <string name="to publish a classified ad">to publish a classified ad</string> - + <string name="giving">Giving L$ [AMOUNT]</string> <string name="uploading_costs">Uploading costs L$ [AMOUNT]</string> <string name="this_costs">This costs L$ [AMOUNT]</string> <string name="buying_selected_land">Buying selected land for L$ [AMOUNT]</string> <string name="this_object_costs">This object costs L$ [AMOUNT]</string> - + <string name="group_role_everyone">Everyone</string> <string name="group_role_officers">Officers</string> <string name="group_role_owners">Owners</string> <string name="group_member_status_online">Online</string> <string name="uploading_abuse_report">Uploading... - + Abuse Report</string> <!-- names for new inventory items--> @@ -3478,23 +3479,23 @@ Abuse Report</string> <!-- birth date format shared by avatar inspector and profile panels --> <string name="AvatarBirthDateFormat">[mthnum,datetime,slt]/[day,datetime,slt]/[year,datetime,slt]</string> - + <string name="DefaultMimeType">none/none</string> <string name="texture_load_dimensions_error">Can't load images larger than [WIDTH]*[HEIGHT]</string> <!-- language specific white-space characters, delimiters, spacers, item separation symbols --> <string name="sentences_separator" value=" "></string> <string name="words_separator" value=", "/> - + <string name="server_is_down"> Despite our best efforts, something unexpected has gone wrong. - Please check status.secondlifegrid.net to see if there is a known problem with the service. + Please check status.secondlifegrid.net to see if there is a known problem with the service. If you continue to experience problems, please check your network and firewall setup. </string> - <!-- overriding datetime formating. - didn't translate if this is not needed for current localization + <!-- overriding datetime formating. + didn't translate if this is not needed for current localization --> <string name="dateTimeWeekdaysNames">Sunday:Monday:Tuesday:Wednesday:Thursday:Friday:Saturday</string> <string name="dateTimeWeekdaysShortNames">Sun:Mon:Tue:Wed:Thu:Fri:Sat</string> @@ -3527,7 +3528,7 @@ Abuse Report</string> <string name="DeleteItem">Delete selected item?</string> <string name="EmptyOutfitText">There are no items in this outfit</string> - + <!-- External editor status codes --> <string name="ExternalEditorNotSet">Select an editor using the ExternalEditor setting.</string> <string name="ExternalEditorNotFound">Cannot find the external editor you specified. diff --git a/indra/newview/skins/default/xui/en/widgets/window_shade.xml b/indra/newview/skins/default/xui/en/widgets/window_shade.xml new file mode 100644 index 0000000000..23eb2f13fb --- /dev/null +++ b/indra/newview/skins/default/xui/en/widgets/window_shade.xml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<window_shade shade_color="0 0 0 0.5"/> diff --git a/indra/newview/skins/default/xui/es/floater_chat_bar.xml b/indra/newview/skins/default/xui/es/floater_chat_bar.xml index 5e5ef616b8..2e94805057 100644 --- a/indra/newview/skins/default/xui/es/floater_chat_bar.xml +++ b/indra/newview/skins/default/xui/es/floater_chat_bar.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="chat_bar" title="CHAT"> - <panel> + <panel name="bottom_panel"> <line_editor label="Pulsa aquí para chatear." name="chat_box" tool_tip="Pulsa Enter para decirlo o Ctrl+Enter para gritarlo"/> <button name="show_nearby_chat" tool_tip="Muestra o esconde el registro del chat"/> </panel> diff --git a/indra/newview/skins/default/xui/es/notifications.xml b/indra/newview/skins/default/xui/es/notifications.xml index 9591b424fc..0de56f9b6d 100644 --- a/indra/newview/skins/default/xui/es/notifications.xml +++ b/indra/newview/skins/default/xui/es/notifications.xml @@ -1437,7 +1437,7 @@ Debemos reiniciar [APP_NAME] para instalar la actualización. <usetemplate ignoretext="Confirmar antes de devolver objetos a sus propietarios." name="okcancelignore" notext="Cancelar" yestext="OK"/> </notification> <notification name="GroupLeaveConfirmMember"> - Actualmente, eres miembro del grupo [GROUP]. + Actualmente, eres miembro del grupo <nolink>[GROUP]</nolink>. ¿Dejar el grupo? <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="OK"/> </notification> diff --git a/indra/newview/skins/default/xui/es/panel_status_bar.xml b/indra/newview/skins/default/xui/es/panel_status_bar.xml index d43790c8c6..79b2c32b23 100644 --- a/indra/newview/skins/default/xui/es/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/es/panel_status_bar.xml @@ -18,7 +18,7 @@ <panel name="balance_bg"> <text name="balance" tool_tip="Haz clic para actualizar tu saldo en L$" value="20 L$"/> <button label="Comprar L$" name="buyL" tool_tip="Pulsa para comprar más L$"/> - <button label="Comprar" name="goShop" tool_tip="Abrir el mercado de Second Life"/> + <button label="Comprar" name="goShop" tool_tip="Abrir el mercado de Second Life" width="80"/> </panel> <text name="TimeText" tool_tip="Hora actual (Pacífico)"> 24:00 AM PST diff --git a/indra/newview/skins/default/xui/fr/floater_chat_bar.xml b/indra/newview/skins/default/xui/fr/floater_chat_bar.xml index 88a2fb669b..c7d27c0589 100644 --- a/indra/newview/skins/default/xui/fr/floater_chat_bar.xml +++ b/indra/newview/skins/default/xui/fr/floater_chat_bar.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="chat_bar" title="CHAT PRÈS DE MOI"> - <panel> + <panel name="bottom_panel"> <line_editor label="Cliquer ici pour chatter." name="chat_box" tool_tip="Appuyer sur Entrée pour dire, Ctrl-Entrée pour crier"/> <button name="show_nearby_chat" tool_tip="Affiche/Masque le journal de chats près de vous"/> </panel> diff --git a/indra/newview/skins/default/xui/fr/notifications.xml b/indra/newview/skins/default/xui/fr/notifications.xml index d8d79d8dde..be6f1f8c31 100644 --- a/indra/newview/skins/default/xui/fr/notifications.xml +++ b/indra/newview/skins/default/xui/fr/notifications.xml @@ -1428,7 +1428,7 @@ Version [VERSION] <usetemplate ignoretext="Confirmer avant de rendre les objets à leurs propriétaires" name="okcancelignore" notext="Annuler" yestext="OK"/> </notification> <notification name="GroupLeaveConfirmMember"> - Vous êtes actuellement membre du groupe [GROUP]. + Vous êtes actuellement membre du groupe <nolink>[GROUP]</nolink>. Quitter le groupe ? <usetemplate name="okcancelbuttons" notext="Annuler" yestext="OK"/> </notification> diff --git a/indra/newview/skins/default/xui/fr/panel_status_bar.xml b/indra/newview/skins/default/xui/fr/panel_status_bar.xml index ac61eb7e52..c0d59a3182 100644 --- a/indra/newview/skins/default/xui/fr/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/fr/panel_status_bar.xml @@ -18,7 +18,7 @@ <panel name="balance_bg"> <text name="balance" tool_tip="Cliquer sur ce bouton pour actualiser votre solde en L$." value="20 L$"/> <button label="Acheter L$" name="buyL" tool_tip="Cliquer pour acheter plus de L$."/> - <button label="Achats" name="goShop" tool_tip="Ouvrir la Place du marché Second Life."/> + <button label="Achats" name="goShop" tool_tip="Ouvrir la Place du marché Second Life." width="75"/> </panel> <text name="TimeText" tool_tip="Heure actuelle (Pacifique)"> 00h00 PST diff --git a/indra/newview/skins/default/xui/it/floater_chat_bar.xml b/indra/newview/skins/default/xui/it/floater_chat_bar.xml index 6c5c8fbea0..94c85b50c8 100644 --- a/indra/newview/skins/default/xui/it/floater_chat_bar.xml +++ b/indra/newview/skins/default/xui/it/floater_chat_bar.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="chat_bar" title="CHAT NEI DINTORNI"> - <panel> + <panel name="bottom_panel"> <line_editor label="Clicca qui per la chat." name="chat_box" tool_tip="Premi Invio per parlare, Ctrl+Invio per gridare"/> <button name="show_nearby_chat" tool_tip="Mostra/Nasconde il registro della chat nei dintorni"/> </panel> diff --git a/indra/newview/skins/default/xui/it/notifications.xml b/indra/newview/skins/default/xui/it/notifications.xml index 2db0892cd6..fce027da0c 100644 --- a/indra/newview/skins/default/xui/it/notifications.xml +++ b/indra/newview/skins/default/xui/it/notifications.xml @@ -1432,7 +1432,7 @@ Per installare l'aggiornamento è necessario riavviare [APP_NAME]. <usetemplate ignoretext="Conferma prima di restituire gli oggetti ai relativi proprietari" name="okcancelignore" notext="Annulla" yestext="OK"/> </notification> <notification name="GroupLeaveConfirmMember"> - Sei attualmente un membro del gruppo [GROUP]. + Sei attualmente un membro del gruppo <nolink>[GROUP]</nolink>. Vuoi lasciare il gruppo? <usetemplate name="okcancelbuttons" notext="Annulla" yestext="OK"/> </notification> diff --git a/indra/newview/skins/default/xui/it/panel_status_bar.xml b/indra/newview/skins/default/xui/it/panel_status_bar.xml index fadaa575ea..4abc90113f 100644 --- a/indra/newview/skins/default/xui/it/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/it/panel_status_bar.xml @@ -18,7 +18,7 @@ <panel name="balance_bg"> <text name="balance" tool_tip="Clicca per aggiornare il tuo saldo in L$" value="L$ 20"/> <button label="Acquista L$" name="buyL" tool_tip="Clicca per acquistare più L$"/> - <button label="Acquisti" name="goShop" tool_tip="Apri Mercato Second Life"/> + <button label="Acquisti" name="goShop" tool_tip="Apri Mercato Second Life" width="75"/> </panel> <text name="TimeText" tool_tip="Orario attuale (Pacifico)"> 24:00, ora del Pacifico diff --git a/indra/newview/skins/default/xui/ja/floater_chat_bar.xml b/indra/newview/skins/default/xui/ja/floater_chat_bar.xml index 9735afb101..504cea5931 100644 --- a/indra/newview/skins/default/xui/ja/floater_chat_bar.xml +++ b/indra/newview/skins/default/xui/ja/floater_chat_bar.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="chat_bar" title="近くのチャット"> - <panel> + <panel name="bottom_panel"> <line_editor label="ここをクリックしてチャットを開始します。" name="chat_box" tool_tip="Enter キーを押して話し、Ctrl + Enter キーで叫びます。"/> <button name="show_nearby_chat" tool_tip="近くのチャットログを表示・非表示"/> </panel> diff --git a/indra/newview/skins/default/xui/ja/notifications.xml b/indra/newview/skins/default/xui/ja/notifications.xml index 7dfa6d2f7a..141f2c8071 100644 --- a/indra/newview/skins/default/xui/ja/notifications.xml +++ b/indra/newview/skins/default/xui/ja/notifications.xml @@ -1467,7 +1467,7 @@ http://secondlife.com/download から最新バージョンをダウンロード <usetemplate ignoretext="オブジェクトを所有者に返却する前の確認" name="okcancelignore" notext="取り消し" yestext="OK"/> </notification> <notification name="GroupLeaveConfirmMember"> - 現在あなたは [GROUP] のメンバーです。 + 現在あなたは <nolink>[GROUP]</nolink> のメンバーです。 このグループを抜けますか? <usetemplate name="okcancelbuttons" notext="取り消し" yestext="OK"/> </notification> diff --git a/indra/newview/skins/default/xui/ja/panel_status_bar.xml b/indra/newview/skins/default/xui/ja/panel_status_bar.xml index 93689b81af..4fb876f690 100644 --- a/indra/newview/skins/default/xui/ja/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/ja/panel_status_bar.xml @@ -18,7 +18,7 @@ <panel name="balance_bg"> <text name="balance" tool_tip="クリックして L$ 残高を更新" value="L$20"/> <button label="L$ の購入" name="buyL" tool_tip="クリックして L$ を購入します"/> - <button label="店" name="goShop" tool_tip="Second Life マーケットプレイスを開く"/> + <button label="店" name="goShop" tool_tip="Second Life マーケットプレイスを開く" width="40"/> </panel> <text name="TimeText" tool_tip="現在時刻(太平洋)"> 24:00 AM PST diff --git a/indra/newview/skins/default/xui/pl/notifications.xml b/indra/newview/skins/default/xui/pl/notifications.xml index e1fb6dd3f1..0194293642 100644 --- a/indra/newview/skins/default/xui/pl/notifications.xml +++ b/indra/newview/skins/default/xui/pl/notifications.xml @@ -1385,7 +1385,7 @@ W celu instalacji aktualizacji musi zostać wykonany restart [APP_NAME]. <usetemplate ignoretext="Potwierdź zanim zwrócisz obiekty do ich właścicieli" name="okcancelignore" notext="Anuluj" yestext="OK"/> </notification> <notification name="GroupLeaveConfirmMember"> - Jesteś członkiem grupy [GROUP]. + Jesteś członkiem grupy <nolink>[GROUP]</nolink>. Chcesz opuścić grupę? <usetemplate name="okcancelbuttons" notext="Anuluj" yestext="OK"/> </notification> diff --git a/indra/newview/skins/default/xui/pt/floater_chat_bar.xml b/indra/newview/skins/default/xui/pt/floater_chat_bar.xml index c089ab93f2..72016c6b40 100644 --- a/indra/newview/skins/default/xui/pt/floater_chat_bar.xml +++ b/indra/newview/skins/default/xui/pt/floater_chat_bar.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="chat_bar" title="BATE-PAPO LOCAL"> - <panel> + <panel name="bottom_panel"> <line_editor label="Clique aqui para bater papo." name="chat_box" tool_tip="Tecle Enter para falar, Ctrl+Enter para gritar"/> <button name="show_nearby_chat" tool_tip="Mostra/oculta o histórico do bate-papo local"/> </panel> diff --git a/indra/newview/skins/default/xui/pt/notifications.xml b/indra/newview/skins/default/xui/pt/notifications.xml index d3547beeb3..b53ebeb136 100644 --- a/indra/newview/skins/default/xui/pt/notifications.xml +++ b/indra/newview/skins/default/xui/pt/notifications.xml @@ -1419,7 +1419,7 @@ Para instalar a atualização, será preciso reiniciar o [APP_NAME]. <usetemplate ignoretext="Confirmar antes de devolver objetos a seus donos" name="okcancelignore" notext="Cancelar" yestext="Retornar"/> </notification> <notification name="GroupLeaveConfirmMember"> - Você é atualmente um membro do grupo [GROUP]. + Você é atualmente um membro do grupo <nolink>[GROUP]</nolink>. Sair do grupo? <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Sair"/> </notification> diff --git a/indra/newview/skins/default/xui/pt/panel_status_bar.xml b/indra/newview/skins/default/xui/pt/panel_status_bar.xml index d5a3258ddc..22853f0643 100644 --- a/indra/newview/skins/default/xui/pt/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/pt/panel_status_bar.xml @@ -18,7 +18,7 @@ <panel name="balance_bg"> <text name="balance" tool_tip="Atualizar saldo de L$" value="L$20"/> <button label="Comprar L$" name="buyL" tool_tip="Comprar mais L$"/> - <button label="Comprar" name="goShop" tool_tip="Abrir Mercado do Second Life"/> + <button label="Comprar" name="goShop" tool_tip="Abrir Mercado do Second Life" width="80"/> </panel> <text name="TimeText" tool_tip="Hora atual (Pacífico)"> 24:00 AM PST diff --git a/indra/newview/skins/default/xui/ru/floater_chat_bar.xml b/indra/newview/skins/default/xui/ru/floater_chat_bar.xml index eceab1775a..79b7b033fb 100644 --- a/indra/newview/skins/default/xui/ru/floater_chat_bar.xml +++ b/indra/newview/skins/default/xui/ru/floater_chat_bar.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="chat_bar" title="ЛОКАЛЬНЫЙ ЧАТ"> - <panel> + <panel name="bottom_panel"> <line_editor label="Щелкните здесь для общения." name="chat_box" tool_tip="Нажмите Enter, чтобы сказать, Ctrl+Enter, чтобы прокричать"/> <button name="show_nearby_chat" tool_tip="Показать/скрыть лог локального чата"/> </panel> diff --git a/indra/newview/skins/default/xui/ru/notifications.xml b/indra/newview/skins/default/xui/ru/notifications.xml index 1be14160ed..f121743fe9 100644 --- a/indra/newview/skins/default/xui/ru/notifications.xml +++ b/indra/newview/skins/default/xui/ru/notifications.xml @@ -1431,7 +1431,7 @@ http://secondlife.com/download. <usetemplate ignoretext="Подтверждать перед возвратом объектов владельцам" name="okcancelignore" notext="Отмена" yestext="OK"/> </notification> <notification name="GroupLeaveConfirmMember"> - Вы являетесь участником группы [GROUP]. + Вы являетесь участником группы <nolink>[GROUP]</nolink>. Хотите покинуть группу? <usetemplate name="okcancelbuttons" notext="Отмена" yestext="OK"/> </notification> diff --git a/indra/newview/skins/default/xui/ru/panel_status_bar.xml b/indra/newview/skins/default/xui/ru/panel_status_bar.xml index 6822244196..babe5811ac 100644 --- a/indra/newview/skins/default/xui/ru/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/ru/panel_status_bar.xml @@ -18,7 +18,7 @@ <panel name="balance_bg"> <text name="balance" tool_tip="Щелкните для обновления вашего баланса L$" value="L$20"/> <button label="Купить L$" name="buyL" tool_tip="Щелкните для покупки L$"/> - <button label="Торговый центр" name="goShop" tool_tip="Открыть торговый центр Second Life"/> + <button label="Торговый центр" name="goShop" tool_tip="Открыть торговый центр Second Life" width="121"/> </panel> <text name="TimeText" tool_tip="Текущее время (тихоокеанское)"> 00:00 (тихоокеанское время) diff --git a/indra/newview/skins/default/xui/tr/floater_chat_bar.xml b/indra/newview/skins/default/xui/tr/floater_chat_bar.xml index d2385e6be3..dee17b7bc4 100644 --- a/indra/newview/skins/default/xui/tr/floater_chat_bar.xml +++ b/indra/newview/skins/default/xui/tr/floater_chat_bar.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="chat_bar" title="YAKINDAKİ SOHBET"> - <panel> + <panel name="bottom_panel"> <line_editor label="Sohbet etmek için buraya tıklayın." name="chat_box" tool_tip="Söylemek için Enter, bağırmak için Ctrl+Enter yapın"/> <button name="show_nearby_chat" tool_tip="yakın sohbet günlüğünü gösterir/gizler"/> </panel> diff --git a/indra/newview/skins/default/xui/tr/notifications.xml b/indra/newview/skins/default/xui/tr/notifications.xml index 6908f6867f..c0dc67ed34 100644 --- a/indra/newview/skins/default/xui/tr/notifications.xml +++ b/indra/newview/skins/default/xui/tr/notifications.xml @@ -1431,7 +1431,7 @@ Güncellemeyi kurmak için [APP_NAME] uygulamasını yeniden başlatmalısınız <usetemplate ignoretext="Nesneleri sahiplerine iade etmeden önce doğrulama iste" name="okcancelignore" notext="İptal" yestext="Tamam"/> </notification> <notification name="GroupLeaveConfirmMember"> - Şu anda [GROUP] grubunun bir üyesisiniz. + Şu anda <nolink>[GROUP]</nolink> grubunun bir üyesisiniz. Gruptan ayrılmak istiyor musunuz? <usetemplate name="okcancelbuttons" notext="İptal" yestext="Tamam"/> </notification> diff --git a/indra/newview/skins/default/xui/tr/panel_status_bar.xml b/indra/newview/skins/default/xui/tr/panel_status_bar.xml index 63726b94e2..81c304a5d8 100644 --- a/indra/newview/skins/default/xui/tr/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/tr/panel_status_bar.xml @@ -18,7 +18,7 @@ <panel name="balance_bg"> <text name="balance" tool_tip="L$ bakiyenizi yenilemek için buraya tıklayın" value="L$20"/> <button label="L$ Satın Al" name="buyL" tool_tip="Daha fazla L$ satın almak için tıklayın"/> - <button label="Alışveriş yap" name="goShop" tool_tip="Second Life Pazaryeri Aç"/> + <button label="Alışveriş yap" name="goShop" tool_tip="Second Life Pazaryeri Aç" width="95"/> </panel> <text name="TimeText" tool_tip="Geçerli zaman (Pasifik)"> 24:00 AM PST diff --git a/indra/newview/skins/default/xui/zh/notifications.xml b/indra/newview/skins/default/xui/zh/notifications.xml index 17ff6288a5..3fa8ff3f78 100644 --- a/indra/newview/skins/default/xui/zh/notifications.xml +++ b/indra/newview/skins/default/xui/zh/notifications.xml @@ -1418,7 +1418,7 @@ We must restart [APP_NAME] to install the update. <usetemplate ignoretext="在我退回物件給它們的擁有者前確認" name="okcancelignore" notext="取消" yestext="確定"/> </notification> <notification name="GroupLeaveConfirmMember"> - 你目前是 [GROUP] 群組的成員。 + 你目前是 <nolink>[GROUP]</nolink> 群組的成員。 是否要離開群組? <usetemplate name="okcancelbuttons" notext="取消" yestext="確定"/> </notification> diff --git a/indra/newview/skins/paths.xml b/indra/newview/skins/paths.xml index e6d68488ea..3c0da041c7 100644 --- a/indra/newview/skins/paths.xml +++ b/indra/newview/skins/paths.xml @@ -1,4 +1,4 @@ -<paths> +<paths> <directory> <subdir>xui</subdir> <subdir>en</subdir> |