diff options
Diffstat (limited to 'indra')
124 files changed, 1998 insertions, 1428 deletions
diff --git a/indra/llcommon/llqueuedthread.cpp b/indra/llcommon/llqueuedthread.cpp index eacbbb3ee0..06ceeb2bc3 100644 --- a/indra/llcommon/llqueuedthread.cpp +++ b/indra/llcommon/llqueuedthread.cpp @@ -437,6 +437,7 @@ S32 LLQueuedThread::processNextRequest() if (req) { // process request + U32 start_priority = req->getPriority(); bool complete = req->processRequest(); if (complete) @@ -457,9 +458,8 @@ S32 LLQueuedThread::processNextRequest() lockData(); req->setStatus(STATUS_QUEUED); mRequestQueue.insert(req); - U32 priority = req->getPriority(); unlockData(); - if (priority < PRIORITY_NORMAL) + if (mThreaded && start_priority <= PRIORITY_LOW) { ms_sleep(1); // sleep the thread a little } diff --git a/indra/llplugin/llpluginprocessparent.cpp b/indra/llplugin/llpluginprocessparent.cpp index dab6d645dd..49f9783824 100644 --- a/indra/llplugin/llpluginprocessparent.cpp +++ b/indra/llplugin/llpluginprocessparent.cpp @@ -39,12 +39,6 @@ #include "llapr.h" -// If we don't receive a heartbeat in this many seconds, we declare the plugin locked up. -static const F32 PLUGIN_LOCKED_UP_SECONDS = 15.0f; - -// Somewhat longer timeout for initial launch. -static const F32 PLUGIN_LAUNCH_SECONDS = 20.0f; - //virtual LLPluginProcessParentOwner::~LLPluginProcessParentOwner() { @@ -59,10 +53,11 @@ LLPluginProcessParent::LLPluginProcessParent(LLPluginProcessParentOwner *owner) mDisableTimeout = false; mDebug = false; - // initialize timer - heartbeat test (mHeartbeat.hasExpired()) - // can sometimes return true immediately otherwise and plugins - // fail immediately because it looks like - mHeartbeat.setTimerExpirySec(PLUGIN_LOCKED_UP_SECONDS); + mPluginLaunchTimeout = 60.0f; + mPluginLockupTimeout = 15.0f; + + // Don't start the timer here -- start it when we actually launch the plugin process. + mHeartbeat.stop(); } LLPluginProcessParent::~LLPluginProcessParent() @@ -325,7 +320,7 @@ void LLPluginProcessParent::idle(void) // This will allow us to time out if the process never starts. mHeartbeat.start(); - mHeartbeat.setTimerExpirySec(PLUGIN_LAUNCH_SECONDS); + mHeartbeat.setTimerExpirySec(mPluginLaunchTimeout); setState(STATE_LAUNCHED); } } @@ -559,7 +554,7 @@ void LLPluginProcessParent::receiveMessage(const LLPluginMessage &message) else if(message_name == "heartbeat") { // this resets our timer. - mHeartbeat.setTimerExpirySec(PLUGIN_LOCKED_UP_SECONDS); + mHeartbeat.setTimerExpirySec(mPluginLockupTimeout); mCPUUsage = message.getValueReal("cpu_usage"); @@ -714,7 +709,7 @@ bool LLPluginProcessParent::pluginLockedUpOrQuit() bool LLPluginProcessParent::pluginLockedUp() { - // If the timer has expired, the plugin has locked up. - return mHeartbeat.hasExpired(); + // If the timer is running and has expired, the plugin has locked up. + return (mHeartbeat.getStarted() && mHeartbeat.hasExpired()); } diff --git a/indra/llplugin/llpluginprocessparent.h b/indra/llplugin/llpluginprocessparent.h index 03ce10f86c..524cd9923f 100644 --- a/indra/llplugin/llpluginprocessparent.h +++ b/indra/llplugin/llpluginprocessparent.h @@ -102,6 +102,9 @@ public: bool getDisableTimeout() { return mDisableTimeout; }; void setDisableTimeout(bool disable) { mDisableTimeout = disable; }; + + void setLaunchTimeout(F32 timeout) { mPluginLaunchTimeout = timeout; }; + void setLockupTimeout(F32 timeout) { mPluginLockupTimeout = timeout; }; F64 getCPUUsage() { return mCPUUsage; }; @@ -158,6 +161,10 @@ private: bool mDebug; LLProcessLauncher mDebugger; + + F32 mPluginLaunchTimeout; // Somewhat longer timeout for initial launch. + F32 mPluginLockupTimeout; // If we don't receive a heartbeat in this many seconds, we declare the plugin locked up. + }; #endif // LL_LLPLUGINPROCESSPARENT_H diff --git a/indra/llui/lldockablefloater.cpp b/indra/llui/lldockablefloater.cpp index 9dc7861992..63faf44f9d 100644 --- a/indra/llui/lldockablefloater.cpp +++ b/indra/llui/lldockablefloater.cpp @@ -38,8 +38,6 @@ //static LLHandle<LLFloater> LLDockableFloater::sInstanceHandle; -static const std::string VOICE_FLOATER("floater_voice_controls"), IM_FLOATER("panel_im"); - //static void LLDockableFloater::init(LLDockableFloater* thiz) { @@ -116,11 +114,9 @@ void LLDockableFloater::resetInstance() { if (mUniqueDocking && sInstanceHandle.get() != this) { - if (sInstanceHandle.get() != NULL && sInstanceHandle.get()->isDocked() - && (getName() != VOICE_FLOATER || sInstanceHandle.get()->getName() != IM_FLOATER) - && (getName() != IM_FLOATER || sInstanceHandle.get()->getName() != VOICE_FLOATER)) + if (sInstanceHandle.get() != NULL && sInstanceHandle.get()->isDocked()) { - sInstanceHandle.get()->setVisible(FALSE); + sInstanceHandle.get()->setVisible(FALSE); } sInstanceHandle = getHandle(); } diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index f7fd2dbdfe..d7a692ec9b 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -2717,7 +2717,7 @@ bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr o } params.from_xui = true; - setupParams(params, parent); + applyXUILayout(params, parent); initFromParams(params); initFloater(params); diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp index 5e15fa3919..7d8c102750 100644 --- a/indra/llui/lllayoutstack.cpp +++ b/indra/llui/lllayoutstack.cpp @@ -247,7 +247,7 @@ LLView* LLLayoutStack::fromXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr o } p.from_xui = true; - setupParams(p, parent); + applyXUILayout(p, parent); LLLayoutStack* layout_stackp = LLUICtrlFactory::create<LLLayoutStack>(p); if (parent && layout_stackp) diff --git a/indra/llui/llmultislider.cpp b/indra/llui/llmultislider.cpp index 1891bca36c..aea7c5f87c 100644 --- a/indra/llui/llmultislider.cpp +++ b/indra/llui/llmultislider.cpp @@ -50,6 +50,12 @@ const F32 FLOAT_THRESHOLD = 0.00001f; S32 LLMultiSlider::mNameCounter = 0; +LLMultiSlider::SliderParams::SliderParams() +: name("name"), + value("value", 0.f) +{ +} + LLMultiSlider::Params::Params() : max_sliders("max_sliders", 1), allow_overlap("allow_overlap", false), @@ -63,7 +69,8 @@ LLMultiSlider::Params::Params() triangle_color("triangle_color"), mouse_down_callback("mouse_down_callback"), mouse_up_callback("mouse_up_callback"), - thumb_width("thumb_width") + thumb_width("thumb_width"), + sliders("slider") { name = "multi_slider_bar"; mouse_opaque(true); @@ -99,6 +106,20 @@ LLMultiSlider::LLMultiSlider(const LLMultiSlider::Params& p) { setMouseUpCallback(initCommitCallback(p.mouse_up_callback)); } + + for (LLInitParam::ParamIterator<SliderParams>::const_iterator it = p.sliders().begin(); + it != p.sliders().end(); + ++it) + { + if (it->name.isProvided()) + { + addSlider(it->value, it->name); + } + else + { + addSlider(it->value); + } + } } LLMultiSlider::~LLMultiSlider() @@ -230,6 +251,30 @@ const std::string& LLMultiSlider::addSlider(F32 val) return mCurSlider; } +void LLMultiSlider::addSlider(F32 val, const std::string& name) +{ + F32 initVal = val; + + if(mValue.size() >= mMaxNumSliders) { + return; + } + + bool foundOne = findUnusedValue(initVal); + if(!foundOne) { + return; + } + + // add a new thumb rect + mThumbRects[name] = LLRect( 0, getRect().getHeight(), mThumbWidth, 0 ); + + // add the value and set the current slider to this one + mValue.insert(name, initVal); + mCurSlider = name; + + // move the slider + setSliderValue(mCurSlider, initVal, TRUE); +} + bool LLMultiSlider::findUnusedValue(F32& initVal) { bool firstTry = true; @@ -572,7 +617,6 @@ void LLMultiSlider::draw() LLF32UICtrl::draw(); } - boost::signals2::connection LLMultiSlider::setMouseDownCallback( const commit_signal_t::slot_type& cb ) { if (!mMouseDownSignal) mMouseDownSignal = new commit_signal_t(); diff --git a/indra/llui/llmultislider.h b/indra/llui/llmultislider.h index f8e43a0470..88576da85b 100644 --- a/indra/llui/llmultislider.h +++ b/indra/llui/llmultislider.h @@ -41,6 +41,13 @@ class LLUICtrlFactory; class LLMultiSlider : public LLF32UICtrl { public: + struct SliderParams : public LLInitParam::Block<SliderParams> + { + Optional<std::string> name; + Mandatory<F32> value; + SliderParams(); + }; + struct Params : public LLInitParam::Block<Params, LLF32UICtrl::Params> { Optional<S32> max_sliders; @@ -60,6 +67,7 @@ public: mouse_up_callback; Optional<S32> thumb_width; + Multiple<SliderParams> sliders; Params(); }; @@ -68,13 +76,13 @@ protected: friend class LLUICtrlFactory; public: virtual ~LLMultiSlider(); - void setSliderValue(const std::string& name, F32 value, BOOL from_event = FALSE); - F32 getSliderValue(const std::string& name) const; + void setSliderValue(const std::string& name, F32 value, BOOL from_event = FALSE); + F32 getSliderValue(const std::string& name) const; - const std::string& getCurSlider() const { return mCurSlider; } - F32 getCurSliderValue() const { return getSliderValue(mCurSlider); } - void setCurSlider(const std::string& name); - void setCurSliderValue(F32 val, BOOL from_event = false) { setSliderValue(mCurSlider, val, from_event); } + const std::string& getCurSlider() const { return mCurSlider; } + F32 getCurSliderValue() const { return getSliderValue(mCurSlider); } + void setCurSlider(const std::string& name); + void setCurSliderValue(F32 val, BOOL from_event = false) { setSliderValue(mCurSlider, val, from_event); } /*virtual*/ void setValue(const LLSD& value); /*virtual*/ LLSD getValue() const { return mValue; } @@ -82,12 +90,13 @@ public: boost::signals2::connection setMouseDownCallback( const commit_signal_t::slot_type& cb ); boost::signals2::connection setMouseUpCallback( const commit_signal_t::slot_type& cb ); - bool findUnusedValue(F32& initVal); + bool findUnusedValue(F32& initVal); const std::string& addSlider(); const std::string& addSlider(F32 val); - void deleteSlider(const std::string& name); - void deleteCurSlider() { deleteSlider(mCurSlider); } - void clear(); + void addSlider(F32 val, const std::string& name); + void deleteSlider(const std::string& name); + void deleteCurSlider() { deleteSlider(mCurSlider); } + void clear(); /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask); /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask); @@ -109,7 +118,8 @@ protected: LLRect mDragStartThumbRect; S32 mThumbWidth; - std::map<std::string, LLRect> mThumbRects; + std::map<std::string, LLRect> + mThumbRects; LLUIColor mTrackColor; LLUIColor mThumbOutlineColor; LLUIColor mThumbCenterColor; diff --git a/indra/llui/llmultisliderctrl.cpp b/indra/llui/llmultisliderctrl.cpp index 87938c19d4..f4434a0f78 100644 --- a/indra/llui/llmultisliderctrl.cpp +++ b/indra/llui/llmultisliderctrl.cpp @@ -65,7 +65,8 @@ LLMultiSliderCtrl::Params::Params() text_color("text_color"), text_disabled_color("text_disabled_color"), mouse_down_callback("mouse_down_callback"), - mouse_up_callback("mouse_up_callback") + mouse_up_callback("mouse_up_callback"), + sliders("slider") { mouse_opaque = true; } @@ -161,6 +162,7 @@ LLMultiSliderCtrl::LLMultiSliderCtrl(const LLMultiSliderCtrl::Params& p) S32 slider_left = label_width ? label_width + multi_sliderctrl_spacing : 0; LLRect slider_rect( slider_left, top, slider_right, bottom ); LLMultiSlider::Params params; + params.sliders = p.sliders; params.rect(slider_rect); params.commit_callback.function( LLMultiSliderCtrl::onSliderCommit ); params.mouse_down_callback( p.mouse_down_callback ); @@ -328,7 +330,7 @@ void LLMultiSliderCtrl::updateText() // static void LLMultiSliderCtrl::onEditorCommit( LLUICtrl* ctrl, const LLSD& userdata) { - LLMultiSliderCtrl* self = dynamic_cast<LLMultiSliderCtrl*>(ctrl); + LLMultiSliderCtrl* self = dynamic_cast<LLMultiSliderCtrl*>(ctrl->getParent()); if (!ctrl) return; @@ -369,7 +371,7 @@ void LLMultiSliderCtrl::onEditorCommit( LLUICtrl* ctrl, const LLSD& userdata) // static void LLMultiSliderCtrl::onSliderCommit(LLUICtrl* ctrl, const LLSD& userdata) { - LLMultiSliderCtrl* self = dynamic_cast<LLMultiSliderCtrl*>(ctrl); + LLMultiSliderCtrl* self = dynamic_cast<LLMultiSliderCtrl*>(ctrl->getParent()); if (!self) return; diff --git a/indra/llui/llmultisliderctrl.h b/indra/llui/llmultisliderctrl.h index 16d07541f2..e8366d09c2 100644 --- a/indra/llui/llmultisliderctrl.h +++ b/indra/llui/llmultisliderctrl.h @@ -69,6 +69,8 @@ public: Optional<CommitCallbackParam> mouse_down_callback, mouse_up_callback; + Multiple<LLMultiSlider::SliderParams> sliders; + Params(); }; diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp index 738a96f730..db32882438 100644 --- a/indra/llui/llpanel.cpp +++ b/indra/llui/llpanel.cpp @@ -452,7 +452,7 @@ void LLPanel::initFromParams(const LLPanel::Params& p) parseFollowsFlags(p); setToolTip(p.tool_tip()); - setSaveToXML(p.from_xui); + setFromXUI(p.from_xui); mHoverCursor = getCursorFromString(p.hover_cursor); @@ -542,7 +542,7 @@ BOOL LLPanel::initPanelXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr outpu } params.from_xui = true; - setupParams(params, parent); + applyXUILayout(params, parent); { LLFastTimer timer(FTM_PANEL_CONSTRUCTION); initFromParams(params); diff --git a/indra/llui/llradiogroup.cpp b/indra/llui/llradiogroup.cpp index 997b9c13f8..4087b484aa 100644 --- a/indra/llui/llradiogroup.cpp +++ b/indra/llui/llradiogroup.cpp @@ -116,6 +116,10 @@ void LLRadioGroup::initFromParams(const Params& p) item_params.font.setIfNotProvided(mFont); // apply radio group font by default item_params.commit_callback.function = boost::bind(&LLRadioGroup::onClickButton, this, _1); item_params.from_xui = p.from_xui; + if (p.from_xui) + { + applyXUILayout(item_params, this); + } LLRadioCtrl* item = LLUICtrlFactory::create<LLRadioCtrl>(item_params, this); mRadioButtons.push_back(item); diff --git a/indra/llui/llscrolllistcell.cpp b/indra/llui/llscrolllistcell.cpp index 544352176a..7238d903a3 100644 --- a/indra/llui/llscrolllistcell.cpp +++ b/indra/llui/llscrolllistcell.cpp @@ -353,7 +353,7 @@ LLScrollListCheck::LLScrollListCheck(const LLScrollListCell::Params& p) { LLCheckBoxCtrl::Params checkbox_p; checkbox_p.name("checkbox"); - checkbox_p.rect.left(0).bottom(0).width(p.width).height(p.width); + checkbox_p.rect = LLRect(0, p.width, p.width, 0); checkbox_p.enabled(p.enabled); checkbox_p.initial_value(p.value()); diff --git a/indra/llui/llspinctrl.cpp b/indra/llui/llspinctrl.cpp index d6d46654d5..20a1ab7af3 100644 --- a/indra/llui/llspinctrl.cpp +++ b/indra/llui/llspinctrl.cpp @@ -75,10 +75,8 @@ LLSpinCtrl::LLSpinCtrl(const LLSpinCtrl::Params& p) static LLUICachedControl<S32> spinctrl_spacing ("UISpinctrlSpacing", 0); static LLUICachedControl<S32> spinctrl_btn_width ("UISpinctrlBtnWidth", 0); static LLUICachedControl<S32> spinctrl_btn_height ("UISpinctrlBtnHeight", 0); - S32 top = getRect().getHeight(); - S32 bottom = top - 2 * spinctrl_btn_height; - S32 centered_top = top; - S32 centered_bottom = bottom; + S32 centered_top = getRect().getHeight(); + S32 centered_bottom = getRect().getHeight() - 2 * spinctrl_btn_height; S32 btn_left = 0; // reserve space for spinner S32 label_width = llclamp(p.label_width(), 0, llmax(0, getRect().getWidth() - 40)); @@ -105,25 +103,15 @@ LLSpinCtrl::LLSpinCtrl(const LLSpinCtrl::Params& p) // Spin buttons LLButton::Params up_button_params(p.up_button); - up_button_params.rect - .left(btn_left) - .top(top) - .right(btn_right) - .height(spinctrl_btn_height); + up_button_params.rect = LLRect(btn_left, getRect().getHeight(), btn_right, getRect().getHeight() - spinctrl_btn_height); up_button_params.click_callback.function(boost::bind(&LLSpinCtrl::onUpBtn, this, _2)); up_button_params.mouse_held_callback.function(boost::bind(&LLSpinCtrl::onUpBtn, this, _2)); mUpBtn = LLUICtrlFactory::create<LLButton>(up_button_params); addChild(mUpBtn); - LLRect down_rect( btn_left, top - spinctrl_btn_height, btn_right, bottom ); - LLButton::Params down_button_params(p.down_button); - down_button_params.rect - .left(btn_left) - .right(btn_right) - .bottom(bottom) - .height(spinctrl_btn_height); + down_button_params.rect = LLRect(btn_left, getRect().getHeight() - spinctrl_btn_height, btn_right, getRect().getHeight() - 2 * spinctrl_btn_height); down_button_params.click_callback.function(boost::bind(&LLSpinCtrl::onDownBtn, this, _2)); down_button_params.mouse_held_callback.function(boost::bind(&LLSpinCtrl::onDownBtn, this, _2)); mDownBtn = LLUICtrlFactory::create<LLButton>(down_button_params); diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index 83e2e3db50..327dd01612 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -266,8 +266,6 @@ bool LLTabContainer::addChild(LLView* view, S32 tab_group) if (panelp) { - panelp->setSaveToXML(TRUE); - addTabPanel(TabPanelParams().panel(panelp).label(panelp->getLabel()).is_placeholder(dynamic_cast<LLPlaceHolderPanel*>(view) != NULL)); return true; } @@ -1019,12 +1017,10 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel) { if (textbox) { - textbox->setSaveToXML(false); addChild( textbox, 0 ); } if (btn) { - btn->setSaveToXML(false); addChild( btn, 0 ); } } @@ -1747,24 +1743,20 @@ void LLTabContainer::initButtons() } } - mPrevArrowBtn->setSaveToXML(false); mPrevArrowBtn->setTabStop(FALSE); addChild(mPrevArrowBtn); - mNextArrowBtn->setSaveToXML(false); mNextArrowBtn->setTabStop(FALSE); addChild(mNextArrowBtn); if (mJumpPrevArrowBtn) { - mJumpPrevArrowBtn->setSaveToXML(false); mJumpPrevArrowBtn->setTabStop(FALSE); addChild(mJumpPrevArrowBtn); } if (mJumpNextArrowBtn) { - mJumpNextArrowBtn->setSaveToXML(false); mJumpNextArrowBtn->setTabStop(FALSE); addChild(mJumpNextArrowBtn); } diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index cb0907a771..e54032ac5e 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -962,7 +962,10 @@ void LLTextBase::draw() reflow(); // then update scroll position, as cursor may have moved - updateScrollFromCursor(); + if (!mReadOnly) + { + updateScrollFromCursor(); + } LLRect doc_rect; if (mScroller) @@ -1932,11 +1935,19 @@ void LLTextBase::endOfLine() void LLTextBase::startOfDoc() { setCursorPos(0); + if (mScroller) + { + mScroller->goToTop(); + } } void LLTextBase::endOfDoc() { setCursorPos(getLength()); + if (mScroller) + { + mScroller->goToBottom(); + } } void LLTextBase::changePage( S32 delta ) @@ -2001,6 +2012,16 @@ void LLTextBase::changeLine( S32 delta ) setCursorPos(new_cursor_pos, true); } +bool LLTextBase::scrolledToStart() +{ + return mScroller->isAtTop(); +} + +bool LLTextBase::scrolledToEnd() +{ + return mScroller->isAtBottom(); +} + bool LLTextBase::setCursor(S32 row, S32 column) { diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index a1f8ba39ae..c91578b637 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -180,6 +180,8 @@ public: void changePage( S32 delta ); void changeLine( S32 delta ); + bool scrolledToStart(); + bool scrolledToEnd(); const LLFontGL* getDefaultFont() const { return mDefaultFont; } diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index 1ea6b66a93..728ed4e7aa 100644 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -1915,6 +1915,7 @@ namespace LLInitParam green = color.mV[VGREEN]; blue = color.mV[VBLUE]; alpha = color.mV[VALPHA]; + control.set("", false); } void TypeValues<LLUIColor>::declareValues() diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h index 6788f29ba9..b1fa6add67 100644 --- a/indra/llui/lluictrlfactory.h +++ b/indra/llui/lluictrlfactory.h @@ -184,8 +184,6 @@ public: { T* widget = NULL; - T::setupParams(params, parent); - if (!params.validateBlock()) { llwarns << getInstance()->getCurFileName() << ": Invalid parameter block for " << typeid(T).name() << llendl; @@ -310,6 +308,7 @@ fail: // Apply layout transformations, usually munging rect params.from_xui = true; + T::applyXUILayout(params, parent); T* widget = createWidget<T>(params, parent); typedef typename T::child_registry_t registry_t; diff --git a/indra/llui/lluiimage.cpp b/indra/llui/lluiimage.cpp index 1dfc281d93..966d919dc7 100644 --- a/indra/llui/lluiimage.cpp +++ b/indra/llui/lluiimage.cpp @@ -168,6 +168,7 @@ namespace LLInitParam if (name() == "none") { mData.mValue = NULL; + return; } LLUIImage* imagep = LLUI::getUIImage(name()); diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index a8d8626e49..f1b08c380b 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -126,7 +126,7 @@ LLView::LLView(const LLView::Params& p) : mName(p.name), mParentView(NULL), mReshapeFlags(FOLLOWS_NONE), - mSaveToXML(p.from_xui), + mFromXUI(p.from_xui), mIsFocusRoot(FALSE), mLastVisible(FALSE), mNextInsertionOrdinal(0), @@ -2479,7 +2479,7 @@ static bool get_last_child_rect(LLView* parent, LLRect *rect) for (;itor != parent->getChildList()->end(); ++itor) { LLView *last_view = (*itor); - if (last_view->getSaveToXML()) + if (last_view->getFromXUI()) { *rect = last_view->getRect(); return true; @@ -2489,7 +2489,7 @@ static bool get_last_child_rect(LLView* parent, LLRect *rect) } //static -void LLView::setupParams(LLView::Params& p, LLView* parent) +void LLView::applyXUILayout(LLView::Params& p, LLView* parent) { const S32 VPAD = 4; const S32 MIN_WIDGET_HEIGHT = 10; @@ -2509,7 +2509,7 @@ void LLView::setupParams(LLView::Params& p, LLView* parent) LLRect last_rect = parent->getLocalRect(); bool layout_topleft = (p.layout() == "topleft"); - if (layout_topleft && p.from_xui) + if (layout_topleft) { //invert top to bottom if (p.rect.top.isProvided()) p.rect.top = parent_rect.getHeight() - p.rect.top; @@ -2535,10 +2535,10 @@ void LLView::setupParams(LLView::Params& p, LLView* parent) p.rect.right.setProvided(false); // recalculate the right } } - else if (p.from_xui) // only do negative coordinate magic for XUI + else { - if (p.rect.left < 0) p.rect.left = p.rect.left + parent_rect.getWidth(); - if (p.rect.right < 0) p.rect.right = p.rect.right + parent_rect.getWidth(); + if (p.rect.left.isProvided() && p.rect.left < 0) p.rect.left = p.rect.left + parent_rect.getWidth(); + if (p.rect.right.isProvided() && p.rect.right < 0) p.rect.right = p.rect.right + parent_rect.getWidth(); } if (p.center_vert) { @@ -2556,15 +2556,15 @@ void LLView::setupParams(LLView::Params& p, LLView* parent) p.rect.top.setProvided(false); // recalculate the top } } - else if (p.from_xui) + else { - if (p.rect.bottom < 0) p.rect.bottom = p.rect.bottom + parent_rect.getHeight(); - if (p.rect.top < 0) p.rect.top = p.rect.top + parent_rect.getHeight(); + if (p.rect.bottom.isProvided() && p.rect.bottom < 0) p.rect.bottom = p.rect.bottom + parent_rect.getHeight(); + if (p.rect.top.isProvided() && p.rect.top < 0) p.rect.top = p.rect.top + parent_rect.getHeight(); } // DEPRECATE: automatically fall back to height of MIN_WIDGET_HEIGHT pixels - if (!p.rect.height.isProvided() && !p.rect.top.isProvided()) + if (!p.rect.height.isProvided() && !p.rect.top.isProvided() && p.rect.height == 0) { p.rect.height = MIN_WIDGET_HEIGHT; } @@ -2663,7 +2663,7 @@ static void convert_to_relative_layout(LLView::Params& p, LLView* parent) // Use setupParams to get the final widget rectangle // according to our wacky layout rules. LLView::Params final = p; - LLView::setupParams(final, parent); + LLView::applyXUILayout(final, parent); // Must actually extract the rectangle to get consistent // right = left+width, top = bottom+height LLRect final_rect = final.rect; diff --git a/indra/llui/llview.h b/indra/llui/llview.h index f8460f5361..c4d7313743 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -395,8 +395,8 @@ public: void parseFollowsFlags(const LLView::Params& params); // Some widgets, like close box buttons, don't need to be saved - BOOL getSaveToXML() const { return mSaveToXML; } - void setSaveToXML(BOOL b) { mSaveToXML = b; } + BOOL getFromXUI() const { return mFromXUI; } + void setFromXUI(BOOL b) { mFromXUI = b; } typedef enum e_hit_test_type { @@ -498,7 +498,7 @@ public: // Set up params after XML load before calling new(), // usually to adjust layout. - static void setupParams(Params& p, LLView* parent); + static void applyXUILayout(Params& p, LLView* parent); // For re-export of floaters and panels, convert the coordinate system // to be top-left based. @@ -573,7 +573,7 @@ private: LLUIString mToolTipMsg; // isNull() is true if none. U8 mSoundFlags; - BOOL mSaveToXML; + BOOL mFromXUI; BOOL mIsFocusRoot; BOOL mUseBoundingRect; // hit test against bounding rectangle that includes all child elements diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index 707edaa3d6..4b6da552cf 100644 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp @@ -98,6 +98,12 @@ private: int mLastMouseY; bool mFirstFocus; + void setInitState(int state) + { +// std::cerr << "changing init state to " << state << std::endl; + mInitState = state; + } + //////////////////////////////////////////////////////////////////////////////// // void update(int milliseconds) @@ -205,18 +211,19 @@ private: { // create single browser window mBrowserWindowId = LLQtWebKit::getInstance()->createBrowserWindow( mWidth, mHeight ); - #if LL_WINDOWS // Enable plugins LLQtWebKit::getInstance()->enablePlugins(true); #elif LL_DARWIN - // Disable plugins + // Enable plugins LLQtWebKit::getInstance()->enablePlugins(true); #elif LL_LINUX - // Disable plugins - LLQtWebKit::getInstance()->enablePlugins(false); + // Enable plugins + LLQtWebKit::getInstance()->enablePlugins(true); #endif - + // Enable cookies + LLQtWebKit::getInstance()->enableCookies( true ); + // tell LLQtWebKit about the size of the browser window LLQtWebKit::getInstance()->setSize( mBrowserWindowId, mWidth, mHeight ); @@ -233,7 +240,7 @@ private: LLQtWebKit::getInstance()->setBackgroundColor( mBrowserWindowId, 0x00, 0x00, 0x00 ); // Set state _before_ starting the navigate, since onNavigateBegin might get called before this call returns. - mInitState = INIT_STATE_NAVIGATING; + setInitState(INIT_STATE_NAVIGATING); // Don't do this here -- it causes the dreaded "white flash" when loading a browser instance. // FIXME: Re-added this because navigating to a "page" initializes things correctly - especially @@ -288,7 +295,7 @@ private: { if(mInitState == INIT_STATE_WAIT_REDRAW) { - mInitState = INIT_STATE_RUNNING; + setInitState(INIT_STATE_RUNNING); } // flag that an update is required @@ -310,7 +317,7 @@ private: if(mInitState == INIT_STATE_NAVIGATE_COMPLETE) { - mInitState = INIT_STATE_WAIT_REDRAW; + setInitState(INIT_STATE_WAIT_REDRAW); } } @@ -333,7 +340,7 @@ private: } else if(mInitState == INIT_STATE_NAVIGATING) { - mInitState = INIT_STATE_NAVIGATE_COMPLETE; + setInitState(INIT_STATE_NAVIGATE_COMPLETE); } } diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index d7021a7882..455c3587ff 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -5823,17 +5823,6 @@ <key>Value</key> <integer>35</integer> </map> - <key>RenderAvatarInvisible</key> - <map> - <key>Comment</key> - <string>Set your avatar as Invisible</string> - <key>Persist</key> - <integer>0</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>0</integer> - </map> <key>RenderAvatarVP</key> <map> <key>Comment</key> @@ -7781,6 +7770,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>ShowDebugAppearanceEditor</key> + <map> + <key>Comment</key> + <string>Show debugging appearance editor</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>ShowEmptyFoldersWhenSearching</key> <map> <key>Comment</key> @@ -7879,7 +7879,18 @@ <string>Boolean</string> <key>Value</key> <integer>1</integer> - </map> + </map> + <key>ShowObjectRenderingCost</key> + <map> + <key>Comment</key> + <string>Show the object rendering cost in build tools</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>ShowNavbarFavoritesPanel</key> <map> <key>Comment</key> diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 1e2eac39eb..454e547155 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -875,6 +875,9 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs LLUUID agent_id; gMessageSystem->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id); + const BOOL is_first_time_in_viewer2_0 = (gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, FALSE) == LLUUID::null); + + LLVOAvatar* avatar = gAgent.getAvatarObject(); if (avatar && (agent_id == avatar->getID())) { @@ -954,7 +957,8 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs gInventory.addObserver(outfit); } - gAgentWearables.populateMyOutfitsFolder(); + if (is_first_time_in_viewer2_0) + gAgentWearables.populateMyOutfitsFolder(); } } diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index a98de900c8..651c66d0a7 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -264,11 +264,8 @@ bool LLAvatarActions::isCalling(const LLUUID &id) //static bool LLAvatarActions::canCall(const LLUUID &id) { - if(isFriend(id)) - { - return LLAvatarTracker::instance().isBuddyOnline(id) && LLVoiceClient::voiceEnabled(); - } - else + // For now we do not need to check whether passed UUID is ID of agent's friend. + // Use common check of Voice Client state. { // don't need to check online/offline status because "usual resident" (resident that is not a friend) // can be only ONLINE. There is no way to see "usual resident" in OFFLINE status. If we see "usual diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 8389895479..6f2e666cc7 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -215,6 +215,10 @@ void LLBottomTray::onNewIM(const LLSD& data) } } +S32 LLBottomTray::getTotalUnreadIMCount() +{ + return getChicletPanel()->getTotalUnreadIMCount(); +} // virtual void LLBottomTray::onChange(EStatusType status, const std::string &channelURI, bool proximal) diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 1adea24ee4..5cd3f15746 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -77,6 +77,8 @@ public: void onNewIM(const LLSD& data); + S32 getTotalUnreadIMCount(); + virtual void reshape(S32 width, S32 height, BOOL called_from_parent); virtual void onFocusLost(); @@ -92,6 +94,11 @@ public: void showMoveButton(BOOL visible); void showCameraButton(BOOL visible); void showSnapshotButton(BOOL visible); + + /** + * Creates IM Chiclet based on session type (IM chat or Group chat) + */ + LLIMChiclet* createIMChiclet(const LLUUID& session_id); private: typedef enum e_resize_status_type @@ -184,11 +191,6 @@ protected: void onContextMenuItemClicked(const LLSD& userdata); bool onContextMenuItemEnabled(const LLSD& userdata); - /** - * Creates IM Chiclet based on session type (IM chat or Group chat) - */ - LLIMChiclet* createIMChiclet(const LLUUID& session_id); - LLChicletPanel* mChicletPanel; LLPanel* mSpeakPanel; LLSpeakButton* mSpeakBtn; diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 2f5523e04d..1f23840109 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -44,6 +44,7 @@ #include "llbottomtray.h" #include "llparticipantlist.h" #include "llspeakers.h" +#include "lltransientfloatermgr.h" class LLNonAvatarCaller : public LLAvatarListItem @@ -77,7 +78,7 @@ static void* create_non_avatar_caller(void*) } LLCallFloater::LLCallFloater(const LLSD& key) -: LLDockableFloater(NULL, key) +: LLDockableFloater(NULL, false, key) , mSpeakerManager(NULL) , mPaticipants(NULL) , mAvatarList(NULL) @@ -89,6 +90,7 @@ LLCallFloater::LLCallFloater(const LLSD& key) { mFactoryMap["non_avatar_caller"] = LLCallbackMap(create_non_avatar_caller, NULL); LLVoiceClient::getInstance()->addObserver(this); + LLTransientFloaterMgr::getInstance()->addControlView(this); } LLCallFloater::~LLCallFloater() @@ -103,6 +105,7 @@ LLCallFloater::~LLCallFloater() { gVoiceClient->removeObserver(this); } + LLTransientFloaterMgr::getInstance()->removeControlView(this); } // virtual @@ -238,7 +241,7 @@ void LLCallFloater::updateSession() //hide "Leave Call" button for nearby chat bool is_local_chat = mVoiceType == VC_LOCAL_CHAT; - childSetVisible("leave_btn_panel", !is_local_chat); + childSetVisible("leave_call_btn", !is_local_chat); refreshPartisipantList(); updateModeratorState(); diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index ee60df1b4b..37e27cf165 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -44,6 +44,8 @@ #include "llfloaterreg.h" #include "llmutelist.h" #include "llstylemap.h" +#include "lllayoutstack.h" +#include "llagent.h" #include "llsidetray.h"//for blocked objects panel @@ -311,18 +313,23 @@ protected: LLChatHistory::LLChatHistory(const LLChatHistory::Params& p) -: LLTextEditor(p), -mMessageHeaderFilename(p.message_header), -mMessageSeparatorFilename(p.message_separator), -mLeftTextPad(p.left_text_pad), -mRightTextPad(p.right_text_pad), -mLeftWidgetPad(p.left_widget_pad), -mRightWidgetPad(p.right_widget_pad), -mTopSeparatorPad(p.top_separator_pad), -mBottomSeparatorPad(p.bottom_separator_pad), -mTopHeaderPad(p.top_header_pad), -mBottomHeaderPad(p.bottom_header_pad) +: LLUICtrl(p), + mMessageHeaderFilename(p.message_header), + mMessageSeparatorFilename(p.message_separator), + mLeftTextPad(p.left_text_pad), + mRightTextPad(p.right_text_pad), + mLeftWidgetPad(p.left_widget_pad), + mRightWidgetPad(p.right_widget_pad), + mTopSeparatorPad(p.top_separator_pad), + mBottomSeparatorPad(p.bottom_separator_pad), + mTopHeaderPad(p.top_header_pad), + mBottomHeaderPad(p.bottom_header_pad) { + LLTextEditor::Params editor_params(p); + editor_params.rect = getLocalRect(); + editor_params.follows.flags = FOLLOWS_ALL; + editor_params.enabled = false; // read only + mEditor = LLUICtrlFactory::create<LLTextEditor>(editor_params, this); } LLChatHistory::~LLChatHistory() @@ -330,6 +337,49 @@ LLChatHistory::~LLChatHistory() this->clear(); } +void LLChatHistory::initFromParams(const LLChatHistory::Params& p) +{ + static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0); + + LLRect stack_rect = getLocalRect(); + stack_rect.mRight -= scrollbar_size; + LLLayoutStack::Params layout_p; + layout_p.rect = stack_rect; + layout_p.follows.flags = FOLLOWS_ALL; + layout_p.orientation = "vertical"; + layout_p.mouse_opaque = false; + + LLLayoutStack* stackp = LLUICtrlFactory::create<LLLayoutStack>(layout_p, this); + + const S32 NEW_TEXT_NOTICE_HEIGHT = 20; + + LLPanel::Params panel_p; + panel_p.name = "spacer"; + panel_p.background_visible = false; + panel_p.has_border = false; + panel_p.mouse_opaque = false; + stackp->addPanel(LLUICtrlFactory::create<LLPanel>(panel_p), 0, 30, true, false, LLLayoutStack::ANIMATE); + + panel_p.name = "new_text_notice_holder"; + LLRect new_text_notice_rect = getLocalRect(); + new_text_notice_rect.mTop = new_text_notice_rect.mBottom + NEW_TEXT_NOTICE_HEIGHT; + panel_p.rect = new_text_notice_rect; + panel_p.background_opaque = true; + panel_p.background_visible = true; + panel_p.visible = false; + mMoreChatPanel = LLUICtrlFactory::create<LLPanel>(panel_p); + + LLTextBox::Params text_p(p.more_chat_text); + text_p.rect = mMoreChatPanel->getLocalRect(); + text_p.follows.flags = FOLLOWS_ALL; + text_p.name = "more_chat_text"; + mMoreChatText = LLUICtrlFactory::create<LLTextBox>(text_p, mMoreChatPanel); + mMoreChatText->setClickedCallback(boost::bind(&LLChatHistory::onClickMoreText, this)); + + stackp->addPanel(mMoreChatPanel, 0, 0, false, false, LLLayoutStack::ANIMATE); +} + + /*void LLChatHistory::updateTextRect() { static LLUICachedControl<S32> texteditor_border ("UITextEditorBorder", 0); @@ -358,15 +408,49 @@ LLView* LLChatHistory::getHeader(const LLChat& chat,const LLStyle::Params& style return header; } +void LLChatHistory::onClickMoreText() +{ + mEditor->endOfDoc(); +} + void LLChatHistory::clear() { mLastFromName.clear(); - LLTextEditor::clear(); + mEditor->clear(); mLastFromID = LLUUID::null; } void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_chat_history, const LLStyle::Params& input_append_params) { + if (!mEditor->scrolledToEnd() && chat.mFromID != gAgent.getID() && !chat.mFromName.empty()) + { + mUnreadChatSources.insert(chat.mFromName); + mMoreChatPanel->setVisible(TRUE); + std::string chatters; + for (unread_chat_source_t::iterator it = mUnreadChatSources.begin(); + it != mUnreadChatSources.end();) + { + chatters += *it; + if (++it != mUnreadChatSources.end()) + { + chatters += ","; + } + } + LLStringUtil::format_map_t args; + args["SOURCES"] = chatters; + + if (mUnreadChatSources.size() == 1) + { + mMoreChatText->setValue(LLTrans::getString("unread_chat_single", args)); + } + else + { + mMoreChatText->setValue(LLTrans::getString("unread_chat_multiple", args)); + } + S32 height = mMoreChatText->getTextPixelHeight() + 5; + mMoreChatPanel->reshape(mMoreChatPanel->getRect().getWidth(), height); + } + LLColor4 txt_color = LLUIColorTable::instance().getColor("White"); LLViewerChat::getChatColor(chat,txt_color); LLFontGL* fontp = LLViewerChat::getChatFont(); @@ -381,7 +465,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_ if (use_plain_text_chat_history) { - appendText("[" + chat.mTimeStr + "] ", getText().size() != 0, style_params); + mEditor->appendText("[" + chat.mTimeStr + "] ", mEditor->getText().size() != 0, style_params); if (utf8str_trim(chat.mFromName).size() != 0) { @@ -391,11 +475,11 @@ void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_ LLStyle::Params link_params(style_params); link_params.fillFrom(LLStyleMap::instance().lookupAgent(chat.mFromID)); // Convert the name to a hotlink and add to message. - appendText(chat.mFromName + ": ", false, link_params); + mEditor->appendText(chat.mFromName + ": ", false, link_params); } else { - appendText(chat.mFromName + ": ", false, style_params); + mEditor->appendText(chat.mFromName + ": ", false, style_params); } } } @@ -422,7 +506,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_ else { view = getHeader(chat, style_params); - if (getText().size() == 0) + if (mEditor->getText().size() == 0) p.top_pad = 0; else p.top_pad = mTopHeaderPad; @@ -432,9 +516,9 @@ void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_ p.view = view; //Prepare the rect for the view - LLRect target_rect = getDocumentView()->getRect(); + LLRect target_rect = mEditor->getDocumentView()->getRect(); // squeeze down the widget by subtracting padding off left and right - target_rect.mLeft += mLeftWidgetPad + mHPad; + target_rect.mLeft += mLeftWidgetPad + mEditor->getHPad(); target_rect.mRight -= mRightWidgetPad; view->reshape(target_rect.getWidth(), view->getRect().getHeight()); view->setOrigin(target_rect.mLeft, view->getRect().mBottom); @@ -443,7 +527,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_ if (utf8str_trim(chat.mFromName).size() != 0 && chat.mFromName != SYSTEM_FROM) header_text += chat.mFromName + ": "; - appendWidget(p, header_text, false); + mEditor->appendWidget(p, header_text, false); mLastFromName = chat.mFromName; mLastFromID = chat.mFromID; mLastMessageTime = new_message_time; @@ -455,10 +539,10 @@ void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_ style_params.font.style = "ITALIC"; if (chat.mFromName.size() > 0) - appendText(chat.mFromName + " ", TRUE, style_params); + mEditor->appendText(chat.mFromName + " ", TRUE, style_params); // Ensure that message ends with NewLine, to avoid losing of new lines // while copy/paste from text chat. See EXT-3263. - appendText(chat.mText.substr(4) + NEW_LINE, FALSE, style_params); + mEditor->appendText(chat.mText.substr(4) + NEW_LINE, FALSE, style_params); } else { @@ -469,8 +553,19 @@ void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_ // while copy/paste from text chat. See EXT-3263. message += NEW_LINE; } - appendText(message, FALSE, style_params); + mEditor->appendText(message, FALSE, style_params); } - blockUndo(); + mEditor->blockUndo(); +} + +void LLChatHistory::draw() +{ + if (mEditor->scrolledToEnd()) + { + mUnreadChatSources.clear(); + mMoreChatPanel->setVisible(FALSE); + } + + LLUICtrl::draw(); } diff --git a/indra/newview/llchathistory.h b/indra/newview/llchathistory.h index 8ca7dd1d58..260015e2dc 100644 --- a/indra/newview/llchathistory.h +++ b/indra/newview/llchathistory.h @@ -34,10 +34,11 @@ #define LLCHATHISTORY_H_ #include "lltexteditor.h" +#include "lltextbox.h" #include "llviewerchat.h" //Chat log widget allowing addition of a message as a widget -class LLChatHistory : public LLTextEditor +class LLChatHistory : public LLUICtrl { public: struct Params : public LLInitParam::Block<Params, LLTextEditor::Params> @@ -63,6 +64,8 @@ class LLChatHistory : public LLTextEditor //Header bottom padding Optional<S32> bottom_header_pad; + Optional<LLTextBox::Params> more_chat_text; + Params() : message_header("message_header"), message_separator("message_separator"), @@ -73,15 +76,16 @@ class LLChatHistory : public LLTextEditor top_separator_pad("top_separator_pad"), bottom_separator_pad("bottom_separator_pad"), top_header_pad("top_header_pad"), - bottom_header_pad("bottom_header_pad") - { - } + bottom_header_pad("bottom_header_pad"), + more_chat_text("more_chat_text") + {} }; protected: LLChatHistory(const Params&); friend class LLUICtrlFactory; + /*virtual*/ void draw(); /** * Redefinition of LLTextEditor::updateTextRect() to considerate text * left/right padding params. @@ -98,9 +102,13 @@ class LLChatHistory : public LLTextEditor */ LLView* getHeader(const LLChat& chat,const LLStyle::Params& style_params); + void onClickMoreText(); + public: ~LLChatHistory(); + void initFromParams(const Params&); + /** * Appends a widget message. * If last user appended message, concurs with current user, @@ -129,5 +137,11 @@ class LLChatHistory : public LLTextEditor S32 mBottomSeparatorPad; S32 mTopHeaderPad; S32 mBottomHeaderPad; + + LLPanel* mMoreChatPanel; + LLTextBox* mMoreChatText; + LLTextEditor* mEditor; + typedef std::set<std::string> unread_chat_source_t; + unread_chat_source_t mUnreadChatSources; }; #endif /* LLCHATHISTORY_H_ */ diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index c7f77810df..c6fe076911 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -250,8 +250,7 @@ LLIMWellChiclet::~LLIMWellChiclet() void LLIMWellChiclet::messageCountChanged(const LLSD& session_data) { - S32 total_unread = LLIMMgr::instance().getNumberOfUnreadParticipantMessages(); - setCounter(total_unread); + setCounter(LLBottomTray::getInstance()->getTotalUnreadIMCount()); } /************************************************************************/ @@ -1529,6 +1528,21 @@ bool LLChicletPanel::isAnyIMFloaterDoked() return res; } +S32 LLChicletPanel::getTotalUnreadIMCount() +{ + S32 count = 0; + chiclet_list_t::const_iterator it = mChicletList.begin(); + for( ; mChicletList.end() != it; ++it) + { + LLIMChiclet* chiclet = dynamic_cast<LLIMChiclet*>(*it); + if(chiclet) + { + count += chiclet->getCounter(); + } + } + return count; +} + ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index 353fc01c34..b3341f78a8 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -963,6 +963,8 @@ public: S32 getMinWidth() const { return mMinWidth; } + S32 getTotalUnreadIMCount(); + protected: LLChicletPanel(const Params&p); friend class LLUICtrlFactory; diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp index 9c37c953fe..9f6412c0ab 100644 --- a/indra/newview/llexpandabletextbox.cpp +++ b/indra/newview/llexpandabletextbox.cpp @@ -322,6 +322,13 @@ void LLExpandableTextBox::expandTextBox() // hide "more" link, and show full text contents mTextBox->hideExpandText(); + // *HACK dz + // hideExpandText brakes text styles (replaces hyper-links with plain text), see ticket EXT-3290 + // Set text again to make text box re-apply styles. + // *TODO Find proper solution to fix this issue. + // Maybe add removeSegment to LLTextBase + mTextBox->setTextBase(mText); + S32 text_delta = mTextBox->getVerticalTextDelta(); text_delta += mTextBox->getVPad() * 2; text_delta += mScroll->getBorderWidth() * 2; diff --git a/indra/newview/llexpandabletextbox.h b/indra/newview/llexpandabletextbox.h index 7c989cfa50..2b4f9e527c 100644 --- a/indra/newview/llexpandabletextbox.h +++ b/indra/newview/llexpandabletextbox.h @@ -61,6 +61,7 @@ protected: // adds or removes "More" link as needed /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); /*virtual*/ void setText(const LLStringExplicit& text, const LLStyle::Params& input_params = LLStyle::Params()); + void setTextBase(const std::string& text) { LLTextBase::setText(text); } /** * Returns difference between text box height and text height. diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 17b0710813..826cb0bb3b 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -370,6 +370,7 @@ LLFavoritesBarCtrl::LLFavoritesBarCtrl(const LLFavoritesBarCtrl::Params& p) mLandingTab(NULL), mLastTab(NULL), mTabsHighlightEnabled(TRUE) + , mUpdateDropDownItems(true) { // Register callback for menus with current registrar (will be parent panel's registrar) LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Favorites.DoToSelected", @@ -589,16 +590,15 @@ void LLFavoritesBarCtrl::changed(U32 mask) } else { - updateButtons(getRect().getWidth()); + updateButtons(); } } //virtual void LLFavoritesBarCtrl::reshape(S32 width, S32 height, BOOL called_from_parent) { - updateButtons(width); - LLUICtrl::reshape(width, height, called_from_parent); + updateButtons(); } void LLFavoritesBarCtrl::draw() @@ -637,7 +637,7 @@ LLXMLNodePtr LLFavoritesBarCtrl::getButtonXMLNode() return buttonXMLNode; } -void LLFavoritesBarCtrl::updateButtons(U32 bar_width) +void LLFavoritesBarCtrl::updateButtons() { mItems.clear(); @@ -652,139 +652,146 @@ void LLFavoritesBarCtrl::updateButtons(U32 bar_width) return; } - S32 buttonWidth = 120; //default value - buttonXMLNode->getAttributeS32("width", buttonWidth); - S32 buttonHGap = 2; // default value - buttonXMLNode->getAttributeS32("left", buttonHGap); - - S32 count = mItems.count(); - S32 buttons_space = bar_width - buttonHGap; - - S32 first_drop_down_item = count; - - // Calculating, how much buttons can fit in the bar - S32 buttons_width = 0; - for (S32 i = 0; i < count; ++i) + const child_list_t* childs = getChildList(); + child_list_const_iter_t child_it = childs->begin(); + int first_changed_item_index = 0; + int rightest_point = getRect().mRight - mChevronButton->getRect().getWidth(); + //lets find first changed button + while (child_it != childs->end()) { - buttons_width += buttonWidth + buttonHGap; - if (buttons_width > buttons_space) + LLFavoriteLandmarkButton* button = dynamic_cast<LLFavoriteLandmarkButton*> (*child_it); + if (button) { - // There is no space for all buttons. - // Calculating the number of buttons, that are fit with chevron button - buttons_space -= mChevronButton->getRect().getWidth() + buttonHGap; - while (i >= 0 && buttons_width > buttons_space) + const LLViewerInventoryItem *item = mItems[first_changed_item_index].get(); + if (item) { - buttons_width -= buttonWidth + buttonHGap; - i--; + // an child's order and mItems should be same + if (button->getLandmarkId() != item->getUUID() // sort order has been changed + || button->getLabelSelected() != item->getDisplayName() // favorite's name has been changed + || button->getRect().mRight < rightest_point) // favbar's width has been changed + { + break; + } } - first_drop_down_item = i + 1; // First item behind visible items - - break; + first_changed_item_index++; } + child_it++; } + // now first_changed_item_index should contains a number of button that need to change - bool recreate_buttons = true; - - // If inventory items are not changed up to mFirstDropDownItem, no need to recreate them - if (mFirstDropDownItem == first_drop_down_item && (mItemNamesCache.size() == count || mItemNamesCache.size() == mFirstDropDownItem)) + if (first_changed_item_index < mItems.count()) { - S32 i; - for (i = 0; i < mFirstDropDownItem; ++i) + mUpdateDropDownItems = true; + // Rebuild the buttons only + // child_list_t is a linked list, so safe to erase from the middle if we pre-incrament the iterator + + while (child_it != childs->end()) { - if (mItemNamesCache.get(i) != mItems.get(i)->getName()) + //lets remove other landmarks button and rebuild it + child_list_const_iter_t cur_it = child_it++; + LLFavoriteLandmarkButton* button = + dynamic_cast<LLFavoriteLandmarkButton*> (*cur_it); + if (button) { - break; + removeChild(button); + delete button; } } - if (i == mFirstDropDownItem) + // we have to remove ChevronButton to make sure that the last item will be LandmarkButton to get the right aligning + if (mChevronButton->getParent() == this) { - recreate_buttons = false; + removeChild(mChevronButton); } - } - - if (recreate_buttons) - { - mFirstDropDownItem = first_drop_down_item; - - mItemNamesCache.clear(); - for (S32 i = 0; i < mFirstDropDownItem; i++) + int last_right_edge = 0; + if (getChildList()->size() > 0) { - mItemNamesCache.put(mItems.get(i)->getName()); + last_right_edge = getChildList()->back()->getRect().mRight; } - - // Rebuild the buttons only - // child_list_t is a linked list, so safe to erase from the middle if we pre-incrament the iterator - for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ) + //last_right_edge is saving coordinates + LLButton* last_new_button = NULL; + int j = first_changed_item_index; + for (; j < mItems.count(); j++) { - child_list_const_iter_t cur_it = child_it++; - LLView* viewp = *cur_it; - LLButton* button = dynamic_cast<LLButton*>(viewp); - if (button && (button != mChevronButton)) + last_new_button = createButton(mItems[j], buttonXMLNode, last_right_edge); + if (!last_new_button) { - removeChild(button); - delete button; + break; } - } + sendChildToBack(last_new_button); + last_right_edge = last_new_button->getRect().mRight; - createButtons(mItems, buttonXMLNode, buttonWidth, buttonHGap); - } - - // Chevron button - if (mFirstDropDownItem != count) - { - // Chevron button should stay right aligned - LLRect rect; - rect.setOriginAndSize(bar_width - mChevronButton->getRect().getWidth() - buttonHGap, 0, mChevronButton->getRect().getWidth(), mChevronButton->getRect().getHeight()); - mChevronButton->setRect(rect); - mChevronButton->setVisible(TRUE); + mLastTab = last_new_button; + } + mFirstDropDownItem = j; + // Chevron button + if (mFirstDropDownItem < mItems.count()) + { + S32 buttonHGap = 2; // default value + buttonXMLNode->getAttributeS32("left", buttonHGap); + LLRect rect; + // Chevron button should stay right aligned + rect.setOriginAndSize(getRect().mRight - mChevronButton->getRect().getWidth() - buttonHGap, 0, + mChevronButton->getRect().getWidth(), + mChevronButton->getRect().getHeight()); + + addChild(mChevronButton); + mChevronButton->setRect(rect); + mChevronButton->setVisible(TRUE); + } } else { - // Hide chevron button if all items are visible on bar - mChevronButton->setVisible(FALSE); + mUpdateDropDownItems = false; } } - -void LLFavoritesBarCtrl::createButtons(const LLInventoryModel::item_array_t &items, const LLXMLNodePtr &buttonXMLNode, S32 buttonWidth, S32 buttonHGap) +LLButton* LLFavoritesBarCtrl::createButton(const LLPointer<LLViewerInventoryItem> item, LLXMLNodePtr &buttonXMLNode, S32 x_offset) { - S32 curr_x = buttonHGap; - // Adding buttons + S32 def_button_width = 120; + buttonXMLNode->getAttributeS32("width", def_button_width); + S32 button_x_delta = 2; // default value + buttonXMLNode->getAttributeS32("left", button_x_delta); + S32 curr_x = x_offset; + /** + * WORKAROUND: + * there are some problem with displaying of fonts in buttons. + * Empty space (or ...) is displaying instead of last symbols, even though the width of the button is enough. + * Problem will gone, if we stretch out the button. For that reason I have to put additional 10 pixels. + */ + int requred_width = mFont->getWidth(item->getDisplayName()) + 10; + int width = requred_width > def_button_width? def_button_width : requred_width; LLFavoriteLandmarkButton* fav_btn = NULL; - mLandingTab = mLastTab = NULL; - for(S32 i = mFirstDropDownItem -1, j = 0; i >= 0; i--) + // do we have a place for next button + double buttonHGap + mChevronButton ? + if(curr_x + width + 2*button_x_delta + mChevronButton->getRect().getWidth() > getRect().mRight ) { - LLViewerInventoryItem* item = items.get(j++); - - fav_btn = LLUICtrlFactory::defaultBuilder<LLFavoriteLandmarkButton>(buttonXMLNode, this, NULL); - if (NULL == fav_btn) - { - llwarns << "Unable to create button for landmark: " << item->getName() << llendl; - continue; - } - - fav_btn->setLandmarkID(item->getUUID()); - - // change only left and save bottom - fav_btn->setOrigin(curr_x, fav_btn->getRect().mBottom); - fav_btn->setFont(mFont); - fav_btn->setName(item->getName()); - fav_btn->setLabel(item->getName()); - fav_btn->setToolTip(item->getName()); - fav_btn->setCommitCallback(boost::bind(&LLFavoritesBarCtrl::onButtonClick, this, item->getUUID())); - fav_btn->setRightMouseDownCallback(boost::bind(&LLFavoritesBarCtrl::onButtonRightClick, this, item->getUUID(), _1, _2, _3,_4 )); - - fav_btn->LLUICtrl::setMouseDownCallback(boost::bind(&LLFavoritesBarCtrl::onButtonMouseDown, this, item->getUUID(), _1, _2, _3, _4)); - fav_btn->LLUICtrl::setMouseUpCallback(boost::bind(&LLFavoritesBarCtrl::onButtonMouseUp, this, item->getUUID(), _1, _2, _3, _4)); - - sendChildToBack(fav_btn); - - curr_x += buttonWidth + buttonHGap; + return NULL; } - - mLastTab = fav_btn; + fav_btn = LLUICtrlFactory::defaultBuilder<LLFavoriteLandmarkButton>(buttonXMLNode, this, NULL); + if (NULL == fav_btn) + { + llwarns << "Unable to create LLFavoriteLandmarkButton widget: " << item->getName() << llendl; + return NULL; + } + + LLRect butt_rect (fav_btn->getRect()); + fav_btn->setLandmarkID(item->getUUID()); + butt_rect.setOriginAndSize(curr_x + button_x_delta, fav_btn->getRect().mBottom, width, fav_btn->getRect().getHeight()); + + fav_btn->setRect(butt_rect); + // change only left and save bottom + fav_btn->setFont(mFont); + fav_btn->setName(item->getName()); + fav_btn->setLabel(item->getName()); + fav_btn->setToolTip(item->getName()); + fav_btn->setCommitCallback(boost::bind(&LLFavoritesBarCtrl::onButtonClick, this, item->getUUID())); + fav_btn->setRightMouseDownCallback(boost::bind(&LLFavoritesBarCtrl::onButtonRightClick, this, item->getUUID(), _1, _2, _3,_4 )); + + fav_btn->LLUICtrl::setMouseDownCallback(boost::bind(&LLFavoritesBarCtrl::onButtonMouseDown, this, item->getUUID(), _1, _2, _3, _4)); + fav_btn->LLUICtrl::setMouseUpCallback(boost::bind(&LLFavoritesBarCtrl::onButtonMouseUp, this, item->getUUID(), _1, _2, _3, _4)); + + return fav_btn; } @@ -844,99 +851,61 @@ void LLFavoritesBarCtrl::showDropDownMenu() LLToggleableMenu* menu = (LLToggleableMenu*)mPopupMenuHandle.get(); - if(menu) + if (menu) { if (!menu->toggleVisibility()) return; - mItems.clear(); - - if (!collectFavoriteItems(mItems)) - { - return; - } - - S32 count = mItems.count(); - - // Check it there are changed items, since last call - if (mItemNamesCache.size() == count) - { - S32 i; - for (i = mFirstDropDownItem; i < count; i++) - { - if (mItemNamesCache.get(i) != mItems.get(i)->getName()) - { - break; - } - } - - // Check passed, just show the menu - if (i == count) - { - menu->buildDrawLabels(); - menu->updateParent(LLMenuGL::sMenuContainer); - - if (menu->getButtonRect().isEmpty()) - { - menu->setButtonRect(mChevronButton->getRect(), this); - } - - LLMenuGL::showPopup(this, menu, getRect().getWidth() - menu->getRect().getWidth(), 0); - return; - } - } - - // Add menu items to cache, if there is only names of buttons - if (mItemNamesCache.size() == mFirstDropDownItem) + U32 max_width = llmin(DROP_DOWN_MENU_WIDTH, getRect().getWidth()); + if (mUpdateDropDownItems) { - for (S32 i = mFirstDropDownItem; i < count; i++) - { - mItemNamesCache.put(mItems.get(i)->getName()); - } - } - - menu->empty(); + menu->empty(); - U32 max_width = llmin(DROP_DOWN_MENU_WIDTH, getRect().getWidth()); - U32 widest_item = 0; + U32 widest_item = 0; - for(S32 i = mFirstDropDownItem; i < count; i++) - { - LLViewerInventoryItem* item = mItems.get(i); - const std::string& item_name = item->getName(); - - LLFavoriteLandmarkMenuItem::Params item_params; - item_params.name(item_name); - item_params.label(item_name); - - item_params.on_click.function(boost::bind(&LLFavoritesBarCtrl::onButtonClick, this, item->getUUID())); - LLFavoriteLandmarkMenuItem *menu_item = LLUICtrlFactory::create<LLFavoriteLandmarkMenuItem>(item_params); - menu_item->initFavoritesBarPointer(this); - menu_item->setRightMouseDownCallback(boost::bind(&LLFavoritesBarCtrl::onButtonRightClick, this,item->getUUID(),_1,_2,_3,_4)); - menu_item->LLUICtrl::setMouseDownCallback(boost::bind(&LLFavoritesBarCtrl::onButtonMouseDown, this, item->getUUID(), _1, _2, _3, _4)); - menu_item->LLUICtrl::setMouseUpCallback(boost::bind(&LLFavoritesBarCtrl::onButtonMouseUp, this, item->getUUID(), _1, _2, _3, _4)); - menu_item->setLandmarkID(item->getUUID()); - - // Check whether item name wider than menu - if (menu_item->getNominalWidth() > max_width) + for (S32 i = mFirstDropDownItem; i < mItems.count(); i++) { - S32 chars_total = item_name.length(); - S32 chars_fitted = 1; - menu_item->setLabel(LLStringExplicit("")); - S32 label_space = max_width - menu_item->getFont()->getWidth("...") - - menu_item->getNominalWidth(); // This returns width of menu item with empty label (pad pixels) - - while (chars_fitted < chars_total && menu_item->getFont()->getWidth(item_name, 0, chars_fitted) < label_space) + LLViewerInventoryItem* item = mItems.get(i); + const std::string& item_name = item->getName(); + + LLFavoriteLandmarkMenuItem::Params item_params; + item_params.name(item_name); + item_params.label(item_name); + + item_params.on_click.function(boost::bind( + &LLFavoritesBarCtrl::onButtonClick, this, + item->getUUID())); + LLFavoriteLandmarkMenuItem *menu_item = LLUICtrlFactory::create<LLFavoriteLandmarkMenuItem>(item_params); + menu_item->initFavoritesBarPointer(this); + menu_item->setRightMouseDownCallback(boost::bind(&LLFavoritesBarCtrl::onButtonRightClick, this, item->getUUID(), _1, _2, _3, _4)); + menu_item->LLUICtrl::setMouseDownCallback(boost::bind(&LLFavoritesBarCtrl::onButtonMouseDown, this, item->getUUID(), _1, _2, _3, _4)); + menu_item->LLUICtrl::setMouseUpCallback(boost::bind(&LLFavoritesBarCtrl::onButtonMouseUp, this, item->getUUID(), _1, _2, _3, _4)); + menu_item->setLandmarkID(item->getUUID()); + + // Check whether item name wider than menu + if (menu_item->getNominalWidth() > max_width) { - chars_fitted++; + S32 chars_total = item_name.length(); + S32 chars_fitted = 1; + menu_item->setLabel(LLStringExplicit("")); + S32 label_space = max_width - menu_item->getFont()->getWidth("...") - + menu_item->getNominalWidth();// This returns width of menu item with empty label (pad pixels) + + while (chars_fitted < chars_total + && menu_item->getFont()->getWidth(item_name, 0, chars_fitted) < label_space) + { + chars_fitted++; + } + chars_fitted--; // Rolling back one char, that doesn't fit + + menu_item->setLabel(item_name.substr(0, chars_fitted) + + "..."); } - chars_fitted--; // Rolling back one char, that doesn't fit + widest_item = llmax(widest_item, menu_item->getNominalWidth()); - menu_item->setLabel(item_name.substr(0, chars_fitted) + "..."); + menu->addChild(menu_item); } - widest_item = llmax(widest_item, menu_item->getNominalWidth()); - - menu->addChild(menu_item); + mUpdateDropDownItems = false; } menu->buildDrawLabels(); @@ -945,7 +914,6 @@ void LLFavoritesBarCtrl::showDropDownMenu() menu->setButtonRect(mChevronButton->getRect(), this); LLMenuGL::showPopup(this, menu, getRect().getWidth() - max_width, 0); - } } diff --git a/indra/newview/llfavoritesbar.h b/indra/newview/llfavoritesbar.h index b2fe3cc651..9ac734baff 100644 --- a/indra/newview/llfavoritesbar.h +++ b/indra/newview/llfavoritesbar.h @@ -74,8 +74,8 @@ public: void setLandingTab(LLUICtrl* tab) { mLandingTab = tab; } protected: - void updateButtons(U32 bar_width); - void createButtons(const LLInventoryModel::item_array_t &items, const LLXMLNodePtr &root, S32 buttonWidth, S32 buttonHGap); + void updateButtons(); + LLButton* createButton(const LLPointer<LLViewerInventoryItem> item, LLXMLNodePtr &root, S32 x_offset ); LLXMLNodePtr getButtonXMLNode(); BOOL collectFavoriteItems(LLInventoryModel::item_array_t &items); @@ -101,9 +101,7 @@ protected: LLUUID mFavoriteFolderId; const LLFontGL *mFont; S32 mFirstDropDownItem; - - typedef LLDynamicArray<std::string> item_names_array_t; - item_names_array_t mItemNamesCache; + bool mUpdateDropDownItems; LLUUID mSelectedItemID; diff --git a/indra/newview/llfloatermediasettings.cpp b/indra/newview/llfloatermediasettings.cpp index 16a76723eb..5cfd56193e 100644 --- a/indra/newview/llfloatermediasettings.cpp +++ b/indra/newview/llfloatermediasettings.cpp @@ -145,18 +145,21 @@ LLFloaterMediaSettings* LLFloaterMediaSettings::getInstance() //static void LLFloaterMediaSettings::apply() { - LLSD settings; - sInstance->mPanelMediaSettingsGeneral->preApply(); - sInstance->mPanelMediaSettingsGeneral->getValues( settings ); - sInstance->mPanelMediaSettingsSecurity->preApply(); - sInstance->mPanelMediaSettingsSecurity->getValues( settings ); - sInstance->mPanelMediaSettingsPermissions->preApply(); - sInstance->mPanelMediaSettingsPermissions->getValues( settings ); - LLSelectMgr::getInstance()->selectionSetMedia( LLTextureEntry::MF_HAS_MEDIA ); - LLSelectMgr::getInstance()->selectionSetMediaData(settings); - sInstance->mPanelMediaSettingsGeneral->postApply(); - sInstance->mPanelMediaSettingsSecurity->postApply(); - sInstance->mPanelMediaSettingsPermissions->postApply(); + if (sInstance->haveValuesChanged()) + { + LLSD settings; + sInstance->mPanelMediaSettingsGeneral->preApply(); + sInstance->mPanelMediaSettingsGeneral->getValues( settings ); + sInstance->mPanelMediaSettingsSecurity->preApply(); + sInstance->mPanelMediaSettingsSecurity->getValues( settings ); + sInstance->mPanelMediaSettingsPermissions->preApply(); + sInstance->mPanelMediaSettingsPermissions->getValues( settings ); + LLSelectMgr::getInstance()->selectionSetMedia( LLTextureEntry::MF_HAS_MEDIA ); + LLSelectMgr::getInstance()->selectionSetMediaData(settings); + sInstance->mPanelMediaSettingsGeneral->postApply(); + sInstance->mPanelMediaSettingsSecurity->postApply(); + sInstance->mPanelMediaSettingsPermissions->postApply(); + } } //////////////////////////////////////////////////////////////////////////////// @@ -249,15 +252,6 @@ void LLFloaterMediaSettings::onTabChanged(void* user_data, bool from_click) LLTabContainer* self = (LLTabContainer*)user_data; gSavedSettings.setS32("LastMediaSettingsTab", self->getCurrentPanelIndex()); } - -//////////////////////////////////////////////////////////////////////////////// -// -void LLFloaterMediaSettings::enableOkApplyBtns( bool enable ) -{ - childSetEnabled( "OK", enable ); - childSetEnabled( "Apply", enable ); -} - //////////////////////////////////////////////////////////////////////////////// // const std::string LLFloaterMediaSettings::getHomeUrl() @@ -272,17 +266,25 @@ const std::string LLFloaterMediaSettings::getHomeUrl() // virtual void LLFloaterMediaSettings::draw() { + // Set the enabled state of the "Apply" button if values changed + childSetEnabled( "Apply", haveValuesChanged() ); + + LLFloater::draw(); +} + + +//private +bool LLFloaterMediaSettings::haveValuesChanged() const +{ + bool values_changed = false; // *NOTE: The code below is very inefficient. Better to do this // only when data change. // Every frame, check to see what the values are. If they are not - // the same as the default media data, enable the OK/Apply buttons + // the same as the initial media data, enable the OK/Apply buttons LLSD settings; sInstance->mPanelMediaSettingsGeneral->getValues( settings ); sInstance->mPanelMediaSettingsSecurity->getValues( settings ); - sInstance->mPanelMediaSettingsPermissions->getValues( settings ); - - bool values_changed = false; - + sInstance->mPanelMediaSettingsPermissions->getValues( settings ); LLSD::map_const_iterator iter = settings.beginMap(); LLSD::map_const_iterator end = settings.endMap(); for ( ; iter != end; ++iter ) @@ -295,9 +297,6 @@ void LLFloaterMediaSettings::draw() break; } } - - enableOkApplyBtns(values_changed); - - LLFloater::draw(); + return values_changed; } diff --git a/indra/newview/llfloatermediasettings.h b/indra/newview/llfloatermediasettings.h index b72e3d855d..cdfd5aa8ae 100644 --- a/indra/newview/llfloatermediasettings.h +++ b/indra/newview/llfloatermediasettings.h @@ -85,7 +85,7 @@ protected: private: - void enableOkApplyBtns( bool enable ); + bool haveValuesChanged() const; LLSD mInitialValues; bool mWaitingToClose; diff --git a/indra/newview/llfloateropenobject.cpp b/indra/newview/llfloateropenobject.cpp index bc89f93763..ec50ed596c 100644 --- a/indra/newview/llfloateropenobject.cpp +++ b/indra/newview/llfloateropenobject.cpp @@ -224,7 +224,6 @@ void LLFloaterOpenObject::callbackMoveInventory(S32 result, void* data) if (result == 0) { - LLFloaterInventory::showAgentInventory(); LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(); if (active_panel) { diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 7fb71d4d4f..babef5b63d 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -93,7 +93,7 @@ // Globals LLFloaterTools *gFloaterTools = NULL; - +bool LLFloaterTools::sShowObjectCost = true; const std::string PANEL_NAMES[LLFloaterTools::PANEL_COUNT] = { @@ -286,6 +286,8 @@ BOOL LLFloaterTools::postBuild() mStatusText["grab"] = getString("status_grab"); mStatusText["place"] = getString("status_place"); mStatusText["selectland"] = getString("status_selectland"); + + sShowObjectCost = gSavedSettings.getBOOL("ShowObjectRenderingCost"); return TRUE; } @@ -425,16 +427,19 @@ void LLFloaterTools::refresh() childSetTextArg("prim_count", "[COUNT]", prim_count_string); // calculate selection rendering cost - std::string prim_cost_string; - LLResMgr::getInstance()->getIntegerString(prim_cost_string, calcRenderCost()); - childSetTextArg("RenderingCost", "[COUNT]", prim_cost_string); + if (sShowObjectCost) + { + std::string prim_cost_string; + LLResMgr::getInstance()->getIntegerString(prim_cost_string, calcRenderCost()); + childSetTextArg("RenderingCost", "[COUNT]", prim_cost_string); + } // disable the object and prim counts if nothing selected bool have_selection = ! LLSelectMgr::getInstance()->getSelection()->isEmpty(); childSetEnabled("obj_count", have_selection); childSetEnabled("prim_count", have_selection); - childSetEnabled("RenderingCost", have_selection); + childSetEnabled("RenderingCost", have_selection && sShowObjectCost); // Refresh child tabs mPanelPermissions->refresh(); @@ -566,7 +571,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) mBtnEdit ->setToggleState( edit_visible ); mRadioGroupEdit->setVisible( edit_visible ); bool linked_parts = gSavedSettings.getBOOL("EditLinkedParts"); - childSetVisible("RenderingCost", !linked_parts && (edit_visible || focus_visible || move_visible)); + childSetVisible("RenderingCost", !linked_parts && (edit_visible || focus_visible || move_visible) && sShowObjectCost); if (mCheckSelectIndividual) { diff --git a/indra/newview/llfloatertools.h b/indra/newview/llfloatertools.h index 2ec7ec46af..e1f3c9b78c 100644 --- a/indra/newview/llfloatertools.h +++ b/indra/newview/llfloatertools.h @@ -195,6 +195,9 @@ private: protected: LLSD mMediaSettings; + +public: + static bool sShowObjectCost; }; diff --git a/indra/newview/llfloaterwhitelistentry.cpp b/indra/newview/llfloaterwhitelistentry.cpp index 04dbd38153..705c8afd00 100644 --- a/indra/newview/llfloaterwhitelistentry.cpp +++ b/indra/newview/llfloaterwhitelistentry.cpp @@ -82,6 +82,7 @@ void LLFloaterWhiteListEntry::onBtnOK( void* userdata ) std::string white_list_item = self->mWhiteListEdit->getText(); panel->addWhiteListEntry( white_list_item ); + panel->updateWhitelistEnableStatus(); }; self->closeFloater(); diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index adf7f08702..8b05f8614d 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -331,6 +331,7 @@ BOOL LLFolderView::addFolder( LLFolderViewFolder* folder) { mFolders.insert(mFolders.begin(), folder); } + folder->setShowLoadStatus(true); folder->setOrigin(0, 0); folder->reshape(getRect().getWidth(), 0); folder->setVisible(FALSE); @@ -748,6 +749,12 @@ void LLFolderView::sanitizeSelection() } } } + + // Don't allow invisible items (such as root folders) to be selected. + if (item->getDontShowInHierarchy()) + { + items_to_remove.push_back(item); + } } std::vector<LLFolderViewItem*>::iterator item_it; @@ -767,7 +774,7 @@ void LLFolderView::sanitizeSelection() parent_folder; parent_folder = parent_folder->getParentFolder()) { - if (parent_folder->potentiallyVisible()) + if (parent_folder->potentiallyVisible() && !parent_folder->getDontShowInHierarchy()) { // give initial selection to first ancestor folder that potentially passes the filter if (!new_selection) @@ -788,6 +795,11 @@ void LLFolderView::sanitizeSelection() { // nothing selected to start with, so pick "My Inventory" as best guess new_selection = getItemByID(gInventory.getRootFolderID()); + // ... except if it's hidden from the UI. + if (new_selection && new_selection->getDontShowInHierarchy()) + { + new_selection = NULL; + } } if (new_selection) diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 135821f662..bfd9d6dca7 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -136,7 +136,8 @@ LLFolderViewItem::LLFolderViewItem(LLFolderViewItem::Params p) mListener(p.listener), mArrowImage(p.folder_arrow_image), mBoxImage(p.selection_image), - mDontShowInHierarchy(false) + mDontShowInHierarchy(false), + mShowLoadStatus(false) { refresh(); } @@ -198,7 +199,9 @@ LLFolderViewItem* LLFolderViewItem::getPreviousOpenNode(BOOL include_children) } LLFolderViewItem* itemp = mParentFolder->getPreviousFromChild( this, include_children ); - while(itemp && !itemp->getVisible()) + + // Skip over items that are invisible or are hidden from the UI. + while(itemp && (!itemp->getVisible() || itemp->getDontShowInHierarchy())) { LLFolderViewItem* next_itemp = itemp->mParentFolder->getPreviousFromChild( itemp, include_children ); if (itemp == next_itemp) @@ -966,18 +969,18 @@ void LLFolderViewItem::draw() } - if ( mIsLoading - && mTimeSinceRequestStart.getElapsedTimeF32() >= gSavedSettings.getF32("FolderLoadingMessageWaitTime") ) - { - font->renderUTF8(LLTrans::getString("LoadingData"), 0, text_left, y, sSearchStatusColor, - LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, &right_x, FALSE); - text_left = right_x; - } - font->renderUTF8( mLabel, 0, text_left, y, color, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, getRect().getWidth() - (S32) text_left, &right_x, TRUE); + if ( (mIsLoading && mTimeSinceRequestStart.getElapsedTimeF32() >= gSavedSettings.getF32("FolderLoadingMessageWaitTime")) + || (LLInventoryModel::backgroundFetchActive() && mShowLoadStatus) ) + { + std::string load_string = " ( " + LLTrans::getString("LoadingData") + " ) "; + font->renderUTF8(load_string, 0, right_x, y, sSearchStatusColor, + LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, &right_x, FALSE); + } + if (!mLabelSuffix.empty()) { font->renderUTF8( mLabelSuffix, 0, right_x, y, sSuffixColor, diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h index 620aa070b9..a43096dcb2 100644 --- a/indra/newview/llfolderviewitem.h +++ b/indra/newview/llfolderviewitem.h @@ -163,6 +163,7 @@ protected: BOOL mIsLoading; LLTimer mTimeSinceRequestStart; bool mDontShowInHierarchy; + bool mShowLoadStatus; // helper function to change the selection from the root. void changeSelectionFromRoot(LLFolderViewItem* selection, BOOL selected); @@ -254,6 +255,8 @@ public: BOOL getIsCurSelection() { return mIsCurSelection; } BOOL hasVisibleChildren() { return mHasVisibleChildren; } + + void setShowLoadStatus(bool status) { mShowLoadStatus = status; } // Call through to the viewed object and return true if it can be // removed. Returns true if it's removed. diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index ff1eb10366..acaa6076f8 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -49,6 +49,7 @@ #include "lllogchat.h" #include "llpanelimcontrolpanel.h" #include "llscreenchannel.h" +#include "llsyswellwindow.h" #include "lltrans.h" #include "llchathistory.h" #include "llviewerwindow.h" @@ -343,6 +344,29 @@ void LLIMFloater::onSlide() //static LLIMFloater* LLIMFloater::show(const LLUUID& session_id) { + if (!gIMMgr->hasSession(session_id)) return NULL; + + // we should make sure all related chiclets are in place when the session is a voice call + // chiclets come firts, then comes IM window + if (gIMMgr->isVoiceCall(session_id)) + { + LLIMModel* im_model = LLIMModel::getInstance(); + LLBottomTray* b_tray = LLBottomTray::getInstance(); + + //*TODO hide that into Bottom tray + if (!b_tray->getChicletPanel()->findChiclet<LLChiclet>(session_id)) + { + LLIMChiclet* chiclet = b_tray->createIMChiclet(session_id); + if(chiclet) + { + chiclet->setIMSessionName(im_model->getName(session_id)); + chiclet->setOtherParticipantId(im_model->getOtherParticipantID(session_id)); + } + } + + LLIMWellWindow::getInstance()->addIMRow(session_id); + } + bool not_existed = true; if(isChatMultiTab()) diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 1d56fc0cab..9e878f8c75 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -93,7 +93,8 @@ const static std::string ADHOC_NAME_SUFFIX(" Conference"); std::string LLCallDialogManager::sPreviousSessionlName = ""; std::string LLCallDialogManager::sCurrentSessionlName = ""; LLIMModel::LLIMSession* LLCallDialogManager::sSession = NULL; - +LLVoiceChannel::EState LLCallDialogManager::sOldState = LLVoiceChannel::STATE_READY; +const LLUUID LLOutgoingCallDialog::OCD_KEY = LLUUID("7CF78E11-0CFE-498D-ADB9-1417BF03DDB4"); // // Globals // @@ -1273,19 +1274,32 @@ void LLCallDialogManager::onVoiceChannelChanged(const LLUUID &session_id) } sSession = session; sSession->mVoiceChannel->setStateChangedCallback(LLCallDialogManager::onVoiceChannelStateChanged); - sPreviousSessionlName = sCurrentSessionlName; - sCurrentSessionlName = session->mName; + if(sCurrentSessionlName != session->mName) + { + sPreviousSessionlName = sCurrentSessionlName; + sCurrentSessionlName = session->mName; + } } void LLCallDialogManager::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction) { LLSD mCallDialogPayload; - LLOutgoingCallDialog* ocd; + LLOutgoingCallDialog* ocd = NULL; + + if(sOldState == new_state) + { + return; + } + + sOldState = new_state; mCallDialogPayload["session_id"] = sSession->mSessionID; mCallDialogPayload["session_name"] = sSession->mName; mCallDialogPayload["other_user_id"] = sSession->mOtherParticipantID; mCallDialogPayload["old_channel_name"] = sPreviousSessionlName; + mCallDialogPayload["state"] = new_state; + mCallDialogPayload["disconnected_channel_name"] = sSession->mName; + mCallDialogPayload["session_type"] = sSession->mSessionType; switch(new_state) { @@ -1295,46 +1309,10 @@ void LLCallDialogManager::onVoiceChannelStateChanged(const LLVoiceChannel::EStat { return; } - - ocd = dynamic_cast<LLOutgoingCallDialog*>(LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE)); - if (ocd) - { - ocd->getChild<LLTextBox>("calling")->setVisible(true); - ocd->getChild<LLTextBox>("leaving")->setVisible(true); - ocd->getChild<LLTextBox>("connecting")->setVisible(false); - ocd->getChild<LLTextBox>("noanswer")->setVisible(false); - ocd->getChild<LLButton>("Cancel")->setVisible(true); - } - return; - - case LLVoiceChannel::STATE_RINGING : - ocd = dynamic_cast<LLOutgoingCallDialog*>(LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE)); - if (ocd) - { - ocd->getChild<LLTextBox>("calling")->setVisible(false); - ocd->getChild<LLTextBox>("leaving")->setVisible(true); - ocd->getChild<LLTextBox>("connecting")->setVisible(true); - ocd->getChild<LLTextBox>("noanswer")->setVisible(false); - ocd->getChild<LLButton>("Cancel")->setVisible(true); - } - return; - - case LLVoiceChannel::STATE_ERROR : - mCallDialogPayload["start_timer"] = true; - ocd = dynamic_cast<LLOutgoingCallDialog*>(LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE)); - if (ocd) - { - ocd->getChild<LLTextBox>("calling")->setVisible(false); - ocd->getChild<LLTextBox>("leaving")->setVisible(false); - ocd->getChild<LLTextBox>("connecting")->setVisible(false); - ocd->getChild<LLTextBox>("noanswer")->setVisible(true); - ocd->getChild<LLButton>("Cancel")->setVisible(false); - } - return; + break; case LLVoiceChannel::STATE_CONNECTED : - case LLVoiceChannel::STATE_HUNG_UP : - ocd = dynamic_cast<LLOutgoingCallDialog*>(LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE)); + ocd = LLFloaterReg::findTypedInstance<LLOutgoingCallDialog>("outgoing_call", LLOutgoingCallDialog::OCD_KEY); if (ocd) { ocd->closeFloater(); @@ -1345,6 +1323,11 @@ void LLCallDialogManager::onVoiceChannelStateChanged(const LLVoiceChannel::EStat break; } + ocd = LLFloaterReg::getTypedInstance<LLOutgoingCallDialog>("outgoing_call", LLOutgoingCallDialog::OCD_KEY); + if(ocd) + { + ocd->show(mCallDialogPayload); + } } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -1374,12 +1357,13 @@ void LLCallDialog::onOpen(const LLSD& key) LLOutgoingCallDialog::LLOutgoingCallDialog(const LLSD& payload) : LLCallDialog(payload) { - LLOutgoingCallDialog* instance = LLFloaterReg::findTypedInstance<LLOutgoingCallDialog>("outgoing_call", payload); + LLOutgoingCallDialog* instance = LLFloaterReg::findTypedInstance<LLOutgoingCallDialog>("outgoing_call", LLOutgoingCallDialog::OCD_KEY); if(instance && instance->getVisible()) { instance->onCancel(instance); } } + void LLOutgoingCallDialog::draw() { if (lifetimeHasExpired()) @@ -1408,10 +1392,14 @@ void LLOutgoingCallDialog::onLifetimeExpired() closeFloater(); } -void LLOutgoingCallDialog::onOpen(const LLSD& key) +void LLOutgoingCallDialog::show(const LLSD& key) { - LLCallDialog::onOpen(key); + mPayload = key; + + // hide all text at first + hideAllText(); + // customize text strings // tell the user which voice channel they are leaving if (!mPayload["old_channel_name"].asString().empty()) { @@ -1422,6 +1410,12 @@ void LLOutgoingCallDialog::onOpen(const LLSD& key) childSetTextArg("leaving", "[CURRENT_CHAT]", getString("localchat")); } + if (!mPayload["disconnected_channel_name"].asString().empty()) + { + childSetTextArg("nearby", "[VOICE_CHANNEL_NAME]", mPayload["disconnected_channel_name"].asString()); + childSetTextArg("nearby_P2P", "[VOICE_CHANNEL_NAME]", mPayload["disconnected_channel_name"].asString()); + } + std::string callee_name = mPayload["session_name"].asString(); if (callee_name == "anonymous") { @@ -1438,12 +1432,48 @@ void LLOutgoingCallDialog::onOpen(const LLSD& key) // stop timer by default mLifetimeTimer.stop(); - if(mPayload.has("start_timer")) + + // show only necessary strings and controls + switch(mPayload["state"].asInteger()) { - mLifetimeTimer.reset(); + case LLVoiceChannel::STATE_CALL_STARTED : + getChild<LLTextBox>("calling")->setVisible(true); + getChild<LLTextBox>("leaving")->setVisible(true); + break; + case LLVoiceChannel::STATE_RINGING : + getChild<LLTextBox>("leaving")->setVisible(true); + getChild<LLTextBox>("connecting")->setVisible(true); + break; + case LLVoiceChannel::STATE_ERROR : + getChild<LLTextBox>("noanswer")->setVisible(true); + getChild<LLButton>("Cancel")->setVisible(false); + mLifetimeTimer.start(); + break; + case LLVoiceChannel::STATE_HUNG_UP : + if (mPayload["session_type"].asInteger() == LLIMModel::LLIMSession::P2P_SESSION) + { + getChild<LLTextBox>("nearby_P2P")->setVisible(true); + } + else + { + getChild<LLTextBox>("nearby")->setVisible(true); + } + getChild<LLButton>("Cancel")->setVisible(false); + mLifetimeTimer.start(); } + + openFloater(LLOutgoingCallDialog::OCD_KEY); } +void LLOutgoingCallDialog::hideAllText() +{ + getChild<LLTextBox>("calling")->setVisible(false); + getChild<LLTextBox>("leaving")->setVisible(false); + getChild<LLTextBox>("connecting")->setVisible(false); + getChild<LLTextBox>("nearby_P2P")->setVisible(false); + getChild<LLTextBox>("nearby")->setVisible(false); + getChild<LLTextBox>("noanswer")->setVisible(false); +} //static void LLOutgoingCallDialog::onCancel(void* user_data) @@ -2733,6 +2763,11 @@ public: { im_floater->processSessionUpdate(input["body"]["info"]); } + LLIMSpeakerMgr* im_mgr = LLIMModel::getInstance()->getSpeakerManager(session_id); + if (im_mgr) + { + im_mgr->processSessionUpdate(input["body"]["info"]); + } } }; diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index 6eb3f3d07f..09f0c9df71 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -467,6 +467,7 @@ protected: static std::string sPreviousSessionlName; static std::string sCurrentSessionlName; static LLIMModel::LLIMSession* sSession; + static LLVoiceChannel::EState sOldState; }; class LLCallDialog : public LLDockableFloater @@ -504,14 +505,18 @@ public: LLOutgoingCallDialog(const LLSD& payload); /*virtual*/ BOOL postBuild(); - /*virtual*/ void onOpen(const LLSD& key); + void show(const LLSD& key); static void onCancel(void* user_data); + static const LLUUID OCD_KEY; // check timer state /*virtual*/ void draw(); private: + + // hide all text boxes + void hideAllText(); // lifetime timer for NO_ANSWER notification LLTimer mLifetimeTimer; // lifetime duration for NO_ANSWER notification diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index bacc685130..3fc2cbecbe 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -190,12 +190,7 @@ BOOL LLInvFVBridge::isItemRemovable() { return TRUE; } - if (gAgentWearables.isWearingItem(mUUID)) - { - return FALSE; - } - const LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); - if (avatar && avatar->isWearingAttachment(mUUID)) + if (get_is_item_worn(mUUID)) { return FALSE; } @@ -506,41 +501,6 @@ void hide_context_entries(LLMenuGL& menu, } } -bool isWornLink(LLUUID link_id) -{ - LLViewerInventoryItem *link = gInventory.getItem(link_id); - if (!link) - return false; - LLViewerInventoryItem *item = link->getLinkedItem(); - if (!item) - return false; - - switch(item->getType()) - { - case LLAssetType::AT_OBJECT: - { - LLVOAvatarSelf* my_avatar = gAgent.getAvatarObject(); - if(my_avatar && my_avatar->isWearingAttachment(item->getUUID())) - return true; - } - break; - - case LLAssetType::AT_BODYPART: - case LLAssetType::AT_CLOTHING: - if(gAgentWearables.isWearingItem(item->getUUID())) - return true; - break; - - case LLAssetType::AT_GESTURE: - if (LLGestureManager::instance().isGestureActive(item->getUUID())) - return true; - break; - default: - break; - } - return false; -} - // Helper for commonly-used entries void LLInvFVBridge::getClipboardEntries(bool show_asset_id, std::vector<std::string> &items, @@ -552,7 +512,7 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, if (is_sidepanel) { // Sidepanel includes restricted menu. - if (obj && obj->getIsLinkType() && !isWornLink(mUUID)) + if (obj && obj->getIsLinkType() && !get_is_item_worn(mUUID)) { items.push_back(std::string("Remove Link")); } @@ -606,15 +566,18 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, disabled_items.push_back(std::string("Paste")); } - items.push_back(std::string("Paste As Link")); - if (!isClipboardPasteableAsLink() || (flags & FIRST_SELECTED_ITEM) == 0) + if (gAgent.isGodlike()) { - disabled_items.push_back(std::string("Paste As Link")); + items.push_back(std::string("Paste As Link")); + if (!isClipboardPasteableAsLink() || (flags & FIRST_SELECTED_ITEM) == 0) + { + disabled_items.push_back(std::string("Paste As Link")); + } } items.push_back(std::string("Paste Separator")); - if (obj && obj->getIsLinkType() && !isWornLink(mUUID)) + if (obj && obj->getIsLinkType() && !get_is_item_worn(mUUID)) { items.push_back(std::string("Remove Link")); } @@ -1196,7 +1159,7 @@ LLFontGL::StyleFlags LLItemBridge::getLabelStyle() const { U8 font = LLFontGL::NORMAL; - if( gAgentWearables.isWearingItem( mUUID ) ) + if (get_is_item_worn(mUUID)) { // llinfos << "BOLD" << llendl; font |= LLFontGL::BOLD; @@ -1339,29 +1302,33 @@ BOOL LLItemBridge::isItemCopyable() const LLViewerInventoryItem* item = getItem(); if (item) { - // can't copy worn objects. DEV-15183 - LLVOAvatarSelf *avatarp = gAgent.getAvatarObject(); - if( !avatarp ) + // Can't copy worn objects. DEV-15183 + if(get_is_item_worn(mUUID)) { return FALSE; } - if(avatarp->isWearingAttachment(mUUID)) + // You can never copy a link. + if (item->getIsLinkType()) { return FALSE; } - // All items can be copied, not all can be pasted. - // The only time an item can't be copied is if it's a link - // return (item->getPermissions().allowCopyBy(gAgent.getID())); - if (item->getIsLinkType()) + if (gAgent.isGodlike()) { - return FALSE; + // All items can be copied in god mode since you can + // at least paste-as-link the item, though you + // still may not be able paste the item. + return TRUE; + } + else + { + return (item->getPermissions().allowCopyBy(gAgent.getID())); } - return TRUE; } return FALSE; } + BOOL LLItemBridge::copyToClipboard() const { if(isItemCopyable()) @@ -1472,10 +1439,7 @@ BOOL LLFolderBridge::isItemRemovable() return FALSE; } - // Allow protected types to be removed, but issue a warning. - // Restrict to god mode so users don't inadvertently mess up their inventory. - if(LLFolderType::lookupIsProtectedType(category->getPreferredType()) && - !gAgent.isGodlike()) + if(LLFolderType::lookupIsProtectedType(category->getPreferredType())) { return FALSE; } @@ -1681,23 +1645,10 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, for( i = 0; i < descendent_items.count(); i++ ) { LLInventoryItem* item = descendent_items[i]; - if( (item->getType() == LLAssetType::AT_CLOTHING) || - (item->getType() == LLAssetType::AT_BODYPART) ) - { - if( gAgentWearables.isWearingItem( item->getUUID() ) ) - { - is_movable = FALSE; // It's generally movable, but not into the trash! - break; - } - } - else - if( item->getType() == LLAssetType::AT_OBJECT ) + if (get_is_item_worn(item->getUUID())) { - if( avatar->isWearingAttachment( item->getUUID() ) ) - { - is_movable = FALSE; // It's generally movable, but not into the trash! - break; - } + is_movable = FALSE; + break; // It's generally movable, but not into the trash! } } } @@ -2187,6 +2138,12 @@ void LLFolderBridge::performAction(LLFolderView* folder, LLInventoryModel* model restoreItem(); return; } +#ifndef LL_RELEASE_FOR_DOWNLOAD + else if ("delete_system_folder" == action) + { + removeSystemFolder(); + } +#endif } void LLFolderBridge::openItem() @@ -2310,13 +2267,27 @@ BOOL LLFolderBridge::removeItem() LLNotification::Params params("ConfirmDeleteProtectedCategory"); params.payload(payload).substitutions(args).functor.function(boost::bind(&LLFolderBridge::removeItemResponse, this, _1, _2)); - if (LLFolderType::lookupIsProtectedType(cat->getPreferredType())) + LLNotifications::instance().forceResponse(params, 0); + return TRUE; +} + + +BOOL LLFolderBridge::removeSystemFolder() +{ + const LLViewerInventoryCategory *cat = getCategory(); + if (!LLFolderType::lookupIsProtectedType(cat->getPreferredType())) { - LLNotifications::instance().add(params); + return FALSE; } - else + + LLSD payload; + LLSD args; + args["FOLDERNAME"] = cat->getName(); + + LLNotification::Params params("ConfirmDeleteProtectedCategory"); + params.payload(payload).substitutions(args).functor.function(boost::bind(&LLFolderBridge::removeItemResponse, this, _1, _2)); { - LLNotifications::instance().forceResponse(params, 0); + LLNotifications::instance().add(params); } return TRUE; } @@ -2485,6 +2456,13 @@ void LLFolderBridge::folderOptionsMenu() } } +#ifndef LL_RELEASE_FOR_DOWNLOAD + if (LLFolderType::lookupIsProtectedType(type)) + { + mItems.push_back(std::string("Delete System Folder")); + } +#endif + // wearables related functionality for folders. //is_wearable LLFindWearables is_wearable; @@ -2512,7 +2490,10 @@ void LLFolderBridge::folderOptionsMenu() mItems.push_back(std::string("Wear As Ensemble")); } mItems.push_back(std::string("Remove From Outfit")); - + if (!areAnyContentsWorn(model)) + { + disabled_items.push_back(std::string("Remove From Outfit")); + } mItems.push_back(std::string("Outfit Separator")); } hide_context_entries(*mMenu, mItems, disabled_items); @@ -2534,6 +2515,35 @@ BOOL LLFolderBridge::checkFolderForContentsOfType(LLInventoryModel* model, LLInv return ((item_array.count() > 0) ? TRUE : FALSE ); } +class LLFindWorn : public LLInventoryCollectFunctor +{ +public: + LLFindWorn() {} + virtual ~LLFindWorn() {} + virtual bool operator()(LLInventoryCategory* cat, + LLInventoryItem* item) + { + if (item && get_is_item_worn(item->getUUID())) + { + return TRUE; + } + return FALSE; + } +}; + +BOOL LLFolderBridge::areAnyContentsWorn(LLInventoryModel* model) const +{ + LLInventoryModel::cat_array_t cat_array; + LLInventoryModel::item_array_t item_array; + LLFindWorn is_worn; + model->collectDescendentsIf(mUUID, + cat_array, + item_array, + LLInventoryModel::EXCLUDE_TRASH, + is_worn); + return (item_array.size() > 0); +} + // Flags unused void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { @@ -2656,6 +2666,13 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) mItems.push_back(std::string("--no options--")); mDisabledItems.push_back(std::string("--no options--")); } + + // Preemptively disable system folder removal if more than one item selected. + if ((flags & FIRST_SELECTED_ITEM) == 0) + { + mDisabledItems.push_back(std::string("Delete System Folder")); + } + hide_context_entries(menu, mItems, mDisabledItems); } @@ -2929,6 +2946,27 @@ LLInventoryModel::item_array_t::iterator findItemByUUID(LLInventoryModel::item_a return result; } +// See also LLInventorySort where landmarks in the Favorites folder are sorted. +class LLViewerInventoryItemSort +{ +public: + bool operator()(const LLPointer<LLViewerInventoryItem>& a, const LLPointer<LLViewerInventoryItem>& b) + { + return a->getSortField() < b->getSortField(); + } +}; + +/** + * Sorts passed items by LLViewerInventoryItem sort field. + * + * @param[in, out] items - array of items, not sorted. + */ +void rearrange_item_order_by_sort_field(LLInventoryModel::item_array_t& items) +{ + static LLViewerInventoryItemSort sort_functor; + std::sort(items.begin(), items.end(), sort_functor); +} + void updateItemsOrder(LLInventoryModel::item_array_t& items, const LLUUID& srcItemId, const LLUUID& destItemId) { LLViewerInventoryItem* srcItem = gInventory.getItem(srcItemId); @@ -2977,19 +3015,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, if(is_movable && move_is_into_trash) { - switch(inv_item->getType()) - { - case LLAssetType::AT_CLOTHING: - case LLAssetType::AT_BODYPART: - is_movable = !gAgentWearables.isWearingItem(inv_item->getUUID()); - break; - - case LLAssetType::AT_OBJECT: - is_movable = !avatar->isWearingAttachment(inv_item->getUUID()); - break; - default: - break; - } + is_movable = inv_item->getIsLinkType() || !get_is_item_worn(inv_item->getUUID()); } if ( is_movable ) @@ -3044,6 +3070,9 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, LLUUID srcItemId = inv_item->getUUID(); LLUUID destItemId = itemp->getListener()->getUUID(); + // ensure items are sorted properly before changing order. EXT-3498 + rearrange_item_order_by_sort_field(items); + // update order updateItemsOrder(items, srcItemId, destItemId); @@ -4056,8 +4085,7 @@ LLFontGL::StyleFlags LLObjectBridge::getLabelStyle() const { U8 font = LLFontGL::NORMAL; - LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); - if( avatar && avatar->isWearingAttachment( mUUID ) ) + if(get_is_item_worn( mUUID ) ) { font |= LLFontGL::BOLD; } @@ -4073,9 +4101,9 @@ LLFontGL::StyleFlags LLObjectBridge::getLabelStyle() const std::string LLObjectBridge::getLabelSuffix() const { - LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); - if( avatar && avatar->isWearingAttachment( mUUID ) ) + if (get_is_item_worn(mUUID)) { + LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); std::string attachment_point_name = avatar->getAttachedPointName(mUUID); // e.g. "(worn on ...)" / "(attached to ...)" @@ -4200,12 +4228,11 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) return; } - if( avatarp->isWearingAttachment( mUUID ) ) + if( get_is_item_worn( mUUID ) ) { items.push_back(std::string("Detach From Yourself")); } - else - if( !isInTrash() && !isLinkedObjectInTrash() && !isLinkedObjectMissing()) + else if (!isInTrash() && !isLinkedObjectInTrash() && !isLinkedObjectMissing()) { items.push_back(std::string("Attach Separator")); items.push_back(std::string("Object Wear")); @@ -4431,7 +4458,7 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_ if (gAgent.isTeen() && item->isWearableType() && (item->getWearableType() == WT_UNDERPANTS || item->getWearableType() == WT_UNDERSHIRT)) continue; - if( gAgentWearables.isWearingItem (item->getLinkedUUID()) ) + if (get_is_item_worn(item->getUUID())) { LLWearableList::instance().getAsset(item->getAssetUUID(), item->getName(), @@ -4447,18 +4474,21 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_ for(i = 0; i < obj_count; ++i) { LLViewerInventoryItem *obj_item = obj_item_array.get(i); - gMessageSystem->newMessageFast(_PREHASH_DetachAttachmentIntoInv); - gMessageSystem->nextBlockFast(_PREHASH_ObjectData ); - gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() ); - gMessageSystem->addUUIDFast(_PREHASH_ItemID, obj_item->getLinkedUUID() ); - - gMessageSystem->sendReliable( gAgent.getRegion()->getHost() ); - - // this object might have been selected, so let the selection manager know it's gone now - LLViewerObject *found_obj = gObjectList.findObject( obj_item->getLinkedUUID()); - if (found_obj) + if (get_is_item_worn(obj_item->getUUID())) { - LLSelectMgr::getInstance()->remove(found_obj); + gMessageSystem->newMessageFast(_PREHASH_DetachAttachmentIntoInv); + gMessageSystem->nextBlockFast(_PREHASH_ObjectData ); + gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() ); + gMessageSystem->addUUIDFast(_PREHASH_ItemID, obj_item->getLinkedUUID() ); + + gMessageSystem->sendReliable( gAgent.getRegion()->getHost() ); + + // this object might have been selected, so let the selection manager know it's gone now + LLViewerObject *found_obj = gObjectList.findObject( obj_item->getLinkedUUID()); + if (found_obj) + { + LLSelectMgr::getInstance()->remove(found_obj); + } } } } @@ -4468,7 +4498,7 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_ for(i = 0; i < gest_count; ++i) { LLViewerInventoryItem *gest_item = gest_item_array.get(i); - if ( LLGestureManager::instance().isGestureActive( gest_item->getLinkedUUID()) ) + if (get_is_item_worn(gest_item->getUUID())) { LLGestureManager::instance().deactivateGesture( gest_item->getLinkedUUID() ); gInventory.updateItem( gest_item ); @@ -4482,7 +4512,7 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_ BOOL LLWearableBridge::renameItem(const std::string& new_name) { - if( gAgentWearables.isWearingItem( mUUID ) ) + if (get_is_item_worn(mUUID)) { gAgentWearables.setWearableName( mUUID, new_name ); } @@ -4491,7 +4521,7 @@ BOOL LLWearableBridge::renameItem(const std::string& new_name) std::string LLWearableBridge::getLabelSuffix() const { - if( gAgentWearables.isWearingItem( mUUID ) ) + if (get_is_item_worn(mUUID)) { // e.g. "(worn)" return LLItemBridge::getLabelSuffix() + LLTrans::getString("worn"); @@ -4525,7 +4555,7 @@ void LLWearableBridge::performAction(LLFolderView* folder, LLInventoryModel* mod } else if (isRemoveAction(action)) { - if(gAgentWearables.isWearingItem(mUUID)) + if (get_is_item_worn(mUUID)) { LLViewerInventoryItem* item = getItem(); if (item) @@ -4556,7 +4586,7 @@ void LLWearableBridge::openItem() } else if(isAgentInventory()) { - if( !gAgentWearables.isWearingItem( mUUID ) ) + if( !get_is_item_worn( mUUID ) ) { wearOnAvatar(); } @@ -4656,7 +4686,7 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) case LLAssetType::AT_CLOTHING: items.push_back(std::string("Take Off")); case LLAssetType::AT_BODYPART: - if (gAgentWearables.isWearingItem(item->getUUID())) + if (get_is_item_worn(item->getUUID())) { disabled_items.push_back(std::string("Wearable Wear")); disabled_items.push_back(std::string("Wearable Add")); @@ -4687,7 +4717,7 @@ BOOL LLWearableBridge::canWearOnAvatar(void* user_data) LLViewerInventoryItem* item = (LLViewerInventoryItem*)self->getItem(); if(!item || !item->isComplete()) return FALSE; } - return (!gAgentWearables.isWearingItem(self->mUUID)); + return (!get_is_item_worn(self->mUUID)); } // Called from menus @@ -4819,7 +4849,7 @@ BOOL LLWearableBridge::canEditOnAvatar(void* user_data) LLWearableBridge* self = (LLWearableBridge*)user_data; if(!self) return FALSE; - return (gAgentWearables.isWearingItem(self->mUUID)); + return (get_is_item_worn(self->mUUID)); } // static @@ -4856,7 +4886,7 @@ BOOL LLWearableBridge::canRemoveFromAvatar(void* user_data) LLWearableBridge* self = (LLWearableBridge*)user_data; if( self && (LLAssetType::AT_BODYPART != self->mAssetType) ) { - return gAgentWearables.isWearingItem( self->mUUID ); + return get_is_item_worn( self->mUUID ); } return FALSE; } @@ -4866,7 +4896,7 @@ void LLWearableBridge::onRemoveFromAvatar(void* user_data) { LLWearableBridge* self = (LLWearableBridge*)user_data; if(!self) return; - if(gAgentWearables.isWearingItem(self->mUUID)) + if(get_is_item_worn(self->mUUID)) { LLViewerInventoryItem* item = self->getItem(); if (item) @@ -4889,7 +4919,7 @@ void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable, const LLUUID &item_id = gInventory.getLinkedItemID(on_remove_struct->mUUID); if(wearable) { - if( gAgentWearables.isWearingItem( item_id ) ) + if( get_is_item_worn( item_id ) ) { EWearableType type = wearable->getType(); @@ -5099,8 +5129,9 @@ void LLAnimationBridgeAction::doIt() //virtual void LLObjectBridgeAction::doIt() { + /* LLFloaterReg::showInstance("properties", mUUID); - + */ LLInvFVBridgeAction::doIt(); } @@ -5172,7 +5203,7 @@ void LLWearableBridgeAction::doIt() } else if(isAgentInventory()) { - if(!gAgentWearables.isWearingItem(mUUID)) + if(!get_is_item_worn(mUUID)) { wearOnAvatar(); } diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 117e32c6be..4d83e9b684 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -292,7 +292,9 @@ public: static LLUIImagePtr getIcon(LLFolderType::EType preferred_type); virtual BOOL renameItem(const std::string& new_name); + virtual BOOL removeItem(); + BOOL removeSystemFolder(); bool removeItemResponse(const LLSD& notification, const LLSD& response); virtual void pasteFromClipboard(); @@ -339,6 +341,7 @@ protected: static void createNewEyes(void* user_data); BOOL checkFolderForContentsOfType(LLInventoryModel* model, LLInventoryCollectFunctor& typeToCheck); + BOOL areAnyContentsWorn(LLInventoryModel* model) const; void modifyOutfit(BOOL append); void determineFolderType(); diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index 522edd0cb5..b4dcb566e4 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -218,6 +218,7 @@ std::string::size_type LLInventoryFilter::getStringMatchOffset() const BOOL LLInventoryFilter::isNotDefault() const { return mFilterOps.mFilterObjectTypes != mDefaultFilterOps.mFilterObjectTypes + || mFilterOps.mFilterTypes != FILTERTYPE_OBJECT || mFilterSubString.size() || mFilterOps.mPermissions != mDefaultFilterOps.mPermissions || mFilterOps.mMinDate != mDefaultFilterOps.mMinDate @@ -227,7 +228,8 @@ BOOL LLInventoryFilter::isNotDefault() const BOOL LLInventoryFilter::isActive() const { - return mFilterOps.mFilterObjectTypes != 0xffffffffffffffffULL + return mFilterOps.mFilterObjectTypes != 0xffffffffffffffffULL + || mFilterOps.mFilterTypes != FILTERTYPE_OBJECT || mFilterSubString.size() || mFilterOps.mPermissions != PERM_NONE || mFilterOps.mMinDate != time_min() diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h index 5ca77cb26a..b01554edc8 100644 --- a/indra/newview/llinventoryfilter.h +++ b/indra/newview/llinventoryfilter.h @@ -162,8 +162,8 @@ private: FilterOps(); U32 mFilterTypes; - U64 mFilterObjectTypes; // For _ITEM - U64 mFilterCategoryTypes; // For _ITEM + U64 mFilterObjectTypes; // For _OBJECT + U64 mFilterCategoryTypes; // For _CATEGORY LLUUID mFilterUUID; // for UUID time_t mMinDate; diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 75218e98e0..8f4136c01f 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -338,3 +338,33 @@ LLUIImagePtr get_item_icon(LLAssetType::EType asset_type, const std::string& icon_name = get_item_icon_name(asset_type, inventory_type, attachment_point, item_is_multi ); return LLUI::getUIImage(icon_name); } + +BOOL get_is_item_worn(const LLUUID& id) +{ + const LLViewerInventoryItem* item = gInventory.getItem(id); + if (!item) + return FALSE; + + switch(item->getType()) + { + case LLAssetType::AT_OBJECT: + { + const LLVOAvatarSelf* my_avatar = gAgent.getAvatarObject(); + if(my_avatar && my_avatar->isWearingAttachment(item->getLinkedUUID())) + return TRUE; + break; + } + case LLAssetType::AT_BODYPART: + case LLAssetType::AT_CLOTHING: + if(gAgentWearables.isWearingItem(item->getLinkedUUID())) + return TRUE; + break; + case LLAssetType::AT_GESTURE: + if (LLGestureManager::instance().isGestureActive(item->getLinkedUUID())) + return TRUE; + break; + default: + break; + } + return FALSE; +} diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h index 9916a2351c..968db84819 100644 --- a/indra/newview/llinventoryfunctions.h +++ b/indra/newview/llinventoryfunctions.h @@ -41,7 +41,9 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // This is a collection of miscellaneous functions and classes -// that don't fit cleanly into any other class header. +// that don't fit cleanly into any other class header. Eventually, +// we should figure out where to put these functions so that we can +// get rid of this generic file. // //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -98,14 +100,17 @@ public: }; const std::string& get_item_icon_name(LLAssetType::EType asset_type, - LLInventoryType::EType inventory_type, - U32 attachment_point, - BOOL item_is_multi ); + LLInventoryType::EType inventory_type, + U32 attachment_point, + BOOL item_is_multi ); LLUIImagePtr get_item_icon(LLAssetType::EType asset_type, - LLInventoryType::EType inventory_type, - U32 attachment_point, - BOOL item_is_multi ); + LLInventoryType::EType inventory_type, + U32 attachment_point, + BOOL item_is_multi ); + +// Is this item or its baseitem is worn, attached, etc... +BOOL get_is_item_worn(const LLUUID& id); #endif // LL_LLINVENTORYFUNCTIONS_H diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index 7d3da152c1..2dc9f255d7 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -189,7 +189,7 @@ void LLLoginInstance::constructAuthParams(const LLSD& credentials) bool LLLoginInstance::handleLoginEvent(const LLSD& event) { - LL_DEBUGS("Login") << "LoginListener called!: \n" << event << LL_ENDL; + LL_DEBUGS("LLLogin") << "LoginListener called!: \n" << event << LL_ENDL; if(!(event.has("state") && event.has("change") && event.has("progress"))) { diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index f32866b1fe..199bd966ef 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -95,7 +95,8 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) : mHidingInitialLoad (false), mDecoupleTextureSize ( false ), mTextureWidth ( 1024 ), - mTextureHeight ( 1024 ) + mTextureHeight ( 1024 ), + mClearCache(false) { { LLColor4 color = p.caret_color().get(); @@ -491,6 +492,21 @@ void LLMediaCtrl::clr404RedirectUrl() //////////////////////////////////////////////////////////////////////////////// // +void LLMediaCtrl::clearCache() +{ + if(mMediaSource) + { + mMediaSource->clearCache(); + } + else + { + mClearCache = true; + } + +} + +//////////////////////////////////////////////////////////////////////////////// +// void LLMediaCtrl::navigateTo( std::string url_in, std::string mime_type) { // don't browse to anything that starts with secondlife:// or sl:// @@ -617,7 +633,12 @@ bool LLMediaCtrl::ensureMediaSourceExists() mMediaSource->setHomeURL(mHomePageUrl); mMediaSource->setVisible( getVisible() ); mMediaSource->addObserver( this ); - + if(mClearCache) + { + mMediaSource->clearCache(); + mClearCache = false; + } + if(mHideLoading) { mHidingInitialLoad = true; diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h index f07513a3fd..8f9e6e7179 100644 --- a/indra/newview/llmediactrl.h +++ b/indra/newview/llmediactrl.h @@ -117,6 +117,9 @@ public: // set/clear URL to visit when a 404 page is reached void set404RedirectUrl( std::string redirect_url ); void clr404RedirectUrl(); + + // Clear the browser cache when the instance gets loaded + void clearCache(); // accessor/mutator for flag that indicates if frequent updates to texture happen bool getFrequentUpdates() { return mFrequentUpdates; }; @@ -192,6 +195,7 @@ public: bool mDecoupleTextureSize; S32 mTextureWidth; S32 mTextureHeight; + bool mClearCache; }; #endif // LL_LLMediaCtrl_H diff --git a/indra/newview/llmediadataclient.cpp b/indra/newview/llmediadataclient.cpp index 91064eea6b..2bb2a3da6f 100755 --- a/indra/newview/llmediadataclient.cpp +++ b/indra/newview/llmediadataclient.cpp @@ -224,7 +224,7 @@ bool LLMediaDataClient::processQueueTimer() if(!isEmpty()) { - LL_INFOS("LLMediaDataClient") << "QueueTimer::tick() started, SORTED queue size is: " << mSortedQueue.size() + LL_DEBUGS("LLMediaDataClient") << "QueueTimer::tick() started, SORTED queue size is: " << mSortedQueue.size() << ", RR queue size is: " << mRoundRobinQueue.size() << LL_ENDL; LL_DEBUGS("LLMediaDataClient") << "QueueTimer::tick() started, SORTED queue is: " << mSortedQueue << LL_ENDL; LL_DEBUGS("LLMediaDataClient") << "QueueTimer::tick() started, RR queue is: " << mRoundRobinQueue << LL_ENDL; @@ -262,7 +262,7 @@ void LLMediaDataClient::sortQueue() if (size > mMaxSortedQueueSize) { U32 num_to_cull = (size - mMaxSortedQueueSize); - LL_INFOS("LLMediaDataClient") << "sorted queue MAXED OUT! Culling " + LL_INFOS_ONCE("LLMediaDataClient") << "sorted queue MAXED OUT! Culling " << num_to_cull << " items" << LL_ENDL; while (num_to_cull-- > 0) { @@ -309,7 +309,7 @@ void LLMediaDataClient::serviceQueue() { if (request.isNull()) { - LL_INFOS("LLMediaDataClient") << "Skipping NULL request" << LL_ENDL; + LL_WARNS("LLMediaDataClient") << "Skipping NULL request" << LL_ENDL; } else { LL_INFOS("LLMediaDataClient") << "Skipping : " << *request << " " @@ -636,8 +636,8 @@ void LLMediaDataClient::Responder::error(U32 status, const std::string& reason) new RetryTimer(F32(retry_timeout/*secs*/), this); } else { - LL_INFOS("LLMediaDataClient") << *mRequest << " got SERVICE_UNAVAILABLE...retry count " << - mRequest->getRetryCount() << " exceeds " << mRequest->getMaxNumRetries() << ", not retrying" << LL_ENDL; + LL_INFOS("LLMediaDataClient") << *mRequest << " got SERVICE_UNAVAILABLE...retry count " + << mRequest->getRetryCount() << " exceeds " << mRequest->getMaxNumRetries() << ", not retrying" << LL_ENDL; } } else { diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp index 39381e3faa..fa16cb6473 100644 --- a/indra/newview/lloutputmonitorctrl.cpp +++ b/indra/newview/lloutputmonitorctrl.cpp @@ -243,7 +243,8 @@ void LLOutputMonitorCtrl::setSpeakerId(const LLUUID& speaker_id) } else { - setIsMuted(LLMuteList::getInstance()->isMuted(mSpeakerId)); + // check only blocking on voice. EXT-3542 + setIsMuted(LLMuteList::getInstance()->isMuted(mSpeakerId, LLMute::flagVoiceChat)); LLMuteList::getInstance()->addObserver(this); } } @@ -251,5 +252,6 @@ void LLOutputMonitorCtrl::setSpeakerId(const LLUUID& speaker_id) void LLOutputMonitorCtrl::onChange() { - setIsMuted(LLMuteList::getInstance()->isMuted(mSpeakerId)); + // check only blocking on voice. EXT-3542 + setIsMuted(LLMuteList::getInstance()->isMuted(mSpeakerId, LLMute::flagVoiceChat)); } diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp index 4f76d32ad5..70e4798079 100644 --- a/indra/newview/llpanelimcontrolpanel.cpp +++ b/indra/newview/llpanelimcontrolpanel.cpp @@ -194,6 +194,7 @@ void LLPanelIMControlPanel::setSessionId(const LLUUID& session_id) childSetEnabled("pay_btn", FALSE); getChild<LLTextBox>("avatar_name")->setValue(im_session->mName); + getChild<LLTextBox>("avatar_name")->setToolTip(im_session->mName); } else { @@ -217,6 +218,7 @@ void LLPanelIMControlPanel::nameUpdatedCallback(const LLUUID& id, const std::str avatar_name.append(" "); avatar_name.append(last); getChild<LLTextBox>("avatar_name")->setValue(avatar_name); + getChild<LLTextBox>("avatar_name")->setToolTip(avatar_name); } } diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 35cd3edc81..e16bac2098 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -233,11 +233,6 @@ void LLLandmarksPanel::onSelectionChange(LLInventorySubTreePanel* inventory_list deselectOtherThan(inventory_list); mCurrentSelectedList = inventory_list; } - - LLFolderViewItem* current_item = inventory_list->getRootFolder()->getCurSelectedItem(); - if (!current_item) - return; - updateVerbs(); } @@ -246,6 +241,7 @@ void LLLandmarksPanel::onSelectorButtonClicked() // TODO: mantipov: update getting of selected item // TODO: bind to "i" button LLFolderViewItem* cur_item = mFavoritesInventoryPanel->getRootFolder()->getCurSelectedItem(); + if (!cur_item) return; LLFolderViewEventListener* listenerp = cur_item->getListener(); if (listenerp->getInventoryType() == LLInventoryType::IT_LANDMARK) @@ -334,6 +330,7 @@ void LLLandmarksPanel::processParcelInfo(const LLParcelData& parcel_data) if(isLandmarkSelected()) { LLFolderViewItem* cur_item = getCurSelectedItem(); + if (!cur_item) return; LLUUID id = cur_item->getListener()->getUUID(); LLInventoryItem* inv_item = mCurrentSelectedList->getModel()->getItem(id); doActionOnCurSelectedLandmark(boost::bind( @@ -761,7 +758,7 @@ void LLLandmarksPanel::onCustomAction(const LLSD& userdata) { LLFolderViewItem* cur_item = getCurSelectedItem(); if(!cur_item) - return ; + return; std::string command_name = userdata.asString(); if("more_info" == command_name) { @@ -865,18 +862,18 @@ bool LLLandmarksPanel::canSelectedBeModified(const std::string& command_name) co // then ask LLFolderView permissions if (can_be_modified) { - LLFolderViewItem* selected = getCurSelectedItem(); + LLFolderViewItem* selected = getCurSelectedItem(); if ("cut" == command_name) { can_be_modified = mCurrentSelectedList->getRootFolder()->canCut(); } else if ("rename" == command_name) { - can_be_modified = selected? selected->getListener()->isItemRenameable() : false; + can_be_modified = selected ? selected->getListener()->isItemRenameable() : false; } else if ("delete" == command_name) { - can_be_modified = selected? selected->getListener()->isItemRemovable(): false; + can_be_modified = selected ? selected->getListener()->isItemRemovable(): false; } else if("paste" == command_name) { diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 1d89c3bde0..a9c7b908ed 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -272,6 +272,9 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, // get the web browser control LLMediaCtrl* web_browser = getChild<LLMediaCtrl>("login_html"); web_browser->addObserver(this); + + // Clear the browser's cache to avoid any potential for the cache messing up the login screen. + web_browser->clearCache(); // Need to handle login secondlife:///app/ URLs web_browser->setTrusted( true ); diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index c0da8f3daa..961d3dec8b 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -400,6 +400,7 @@ void LLPanelMainInventory::onClearSearch() mActivePanel->getRootFolder()->applyFunctorRecursively(opener); mActivePanel->getRootFolder()->scrollToShowSelection(); } + mFilterSubString = ""; } void LLPanelMainInventory::onFilterEdit(const std::string& search_string ) @@ -417,6 +418,7 @@ void LLPanelMainInventory::onFilterEdit(const std::string& search_string ) std::string uppercase_search_string = search_string; LLStringUtil::toUpper(uppercase_search_string); + mFilterSubString = uppercase_search_string; if (mActivePanel->getFilterSubString().empty() && uppercase_search_string.empty()) { // current filter and new filter empty, do nothing @@ -431,7 +433,7 @@ void LLPanelMainInventory::onFilterEdit(const std::string& search_string ) } // set new filter string - mActivePanel->setFilterSubString(uppercase_search_string); + mActivePanel->setFilterSubString(mFilterSubString); } @@ -484,6 +486,7 @@ void LLPanelMainInventory::onFilterSelected() { return; } + setFilterSubString(mFilterSubString); LLInventoryFilter* filter = mActivePanel->getFilter(); LLFloaterInventoryFinder *finder = getFinder(); if (finder) @@ -542,7 +545,7 @@ void LLPanelMainInventory::draw() { if (mActivePanel && mFilterEditor) { - mFilterEditor->setText(mActivePanel->getFilterSubString()); + mFilterEditor->setText(mFilterSubString); } LLPanel::draw(); } @@ -1016,9 +1019,11 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata) } const LLUUID& item_id = current_item->getListener()->getUUID(); const std::string &item_name = current_item->getListener()->getName(); + mFilterSubString = item_name; LLInventoryFilter *filter = mActivePanel->getFilter(); filter->setFilterSubString(item_name); mFilterEditor->setText(item_name); + mFilterEditor->setFocus(TRUE); filter->setFilterUUID(item_id); filter->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h index 920de2665c..69f8a14583 100644 --- a/indra/newview/llpanelmaininventory.h +++ b/indra/newview/llpanelmaininventory.h @@ -123,6 +123,7 @@ private: LLInventoryPanel* mActivePanel; LLSaveFolderState* mSavedFolderState; std::string mFilterText; + std::string mFilterSubString; ////////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llpanelmediasettingssecurity.cpp b/indra/newview/llpanelmediasettingssecurity.cpp index aea6b0aa3b..81842e3851 100644 --- a/indra/newview/llpanelmediasettingssecurity.cpp +++ b/indra/newview/llpanelmediasettingssecurity.cpp @@ -323,7 +323,7 @@ void LLPanelMediaSettingsSecurity::addWhiteListEntry( const std::string& entry ) else { row[ "columns" ][ ICON_COLUMN ][ "type" ] = "icon"; - row[ "columns" ][ ICON_COLUMN ][ "value" ] = "parcel_color_EXP"; + row[ "columns" ][ ICON_COLUMN ][ "value" ] = "Parcel_Exp_Color"; row[ "columns" ][ ICON_COLUMN ][ "width" ] = 20; }; @@ -333,9 +333,6 @@ void LLPanelMediaSettingsSecurity::addWhiteListEntry( const std::string& entry ) // add to the white list scroll box mWhiteListList->addElement( row ); - - // update whitelist enable checkbox based on whether the home url passes the whitelist - updateWhitelistEnableStatus(); }; /////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llpanelmediasettingssecurity.h b/indra/newview/llpanelmediasettingssecurity.h index 937bfb1bf9..66ccb23f46 100644 --- a/indra/newview/llpanelmediasettingssecurity.h +++ b/indra/newview/llpanelmediasettingssecurity.h @@ -63,7 +63,9 @@ public: void setParent( LLFloaterMediaSettings* parent ); bool urlPassesWhiteList( const std::string& test_url ); const std::string makeValidUrl( const std::string& src_url ); - + + void updateWhitelistEnableStatus(); + protected: LLFloaterMediaSettings* mParent; @@ -78,8 +80,6 @@ private: LLScrollListCtrl* mWhiteListList; LLTextBox* mHomeUrlFailsWhiteListText; - void updateWhitelistEnableStatus(); - static void onBtnAdd(void*); static void onBtnDel(void*); }; diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index 5b36a5406a..8e14074de1 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -56,7 +56,10 @@ #include "llmenugl.h" #include "llviewermenu.h" +#include "llviewercontrol.h" + static LLRegisterPanelClassWrapper<LLPanelOutfitsInventory> t_inventory("panel_outfits_inventory"); +bool LLPanelOutfitsInventory::sShowDebugEditor = false; LLPanelOutfitsInventory::LLPanelOutfitsInventory() : mActivePanel(NULL), @@ -74,9 +77,10 @@ LLPanelOutfitsInventory::~LLPanelOutfitsInventory() // virtual BOOL LLPanelOutfitsInventory::postBuild() { - + sShowDebugEditor = gSavedSettings.getBOOL("ShowDebugAppearanceEditor"); initTabPanels(); initListCommandsHandlers(); + return TRUE; } @@ -86,6 +90,11 @@ void LLPanelOutfitsInventory::updateVerbs() { mParent->updateVerbs(); } + + if (mListCommands) + { + mListCommands->childSetVisible("look_edit_btn",sShowDebugEditor); + } } void LLPanelOutfitsInventory::setParent(LLSidepanelAppearance* parent) @@ -96,6 +105,7 @@ void LLPanelOutfitsInventory::setParent(LLSidepanelAppearance* parent) // virtual void LLPanelOutfitsInventory::onSearchEdit(const std::string& string) { + mFilterSubString = string; if (string == "") { mActivePanel->setFilterSubString(LLStringUtil::null); @@ -177,7 +187,6 @@ void LLPanelOutfitsInventory::onSelectionChange(const std::deque<LLFolderViewIte void LLPanelOutfitsInventory::onSelectorButtonClicked() { - /* LLFolderViewItem* cur_item = getRootFolder()->getCurSelectedItem(); LLFolderViewEventListener* listenerp = cur_item->getListener(); @@ -189,7 +198,6 @@ void LLPanelOutfitsInventory::onSelectorButtonClicked() LLSideTray::getInstance()->showPanel("sidepanel_appearance", key); } - */ } LLFolderViewEventListener *LLPanelOutfitsInventory::getCorrectListenerForAction() @@ -233,9 +241,11 @@ void LLPanelOutfitsInventory::initListCommandsHandlers() mListCommands->childSetAction("options_gear_btn", boost::bind(&LLPanelOutfitsInventory::onGearButtonClick, this)); mListCommands->childSetAction("trash_btn", boost::bind(&LLPanelOutfitsInventory::onTrashButtonClick, this)); - mListCommands->childSetAction("add_btn", boost::bind(&LLPanelOutfitsInventory::onAddButtonClick, this)); + mListCommands->childSetAction("make_outfit_btn", boost::bind(&LLPanelOutfitsInventory::onAddButtonClick, this)); mListCommands->childSetAction("wear_btn", boost::bind(&LLPanelOutfitsInventory::onWearButtonClick, this)); - + + mListCommands->childSetAction("look_edit_btn", boost::bind(&LLPanelOutfitsInventory::onSelectorButtonClicked, this)); + LLDragAndDropButton* trash_btn = mListCommands->getChild<LLDragAndDropButton>("trash_btn"); trash_btn->setDragAndDropHandler(boost::bind(&LLPanelOutfitsInventory::handleDragAndDropToTrash, this , _4 // BOOL drop @@ -422,6 +432,7 @@ void LLPanelOutfitsInventory::initTabPanels() mTabPanels[0] = myoutfits_panel; mActivePanel = myoutfits_panel; + LLInventoryPanel *cof_panel = getChild<LLInventoryPanel>("cof_accordionpanel"); cof_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); mTabPanels[1] = cof_panel; @@ -433,6 +444,9 @@ void LLPanelOutfitsInventory::initTabPanels() LLInventoryPanel *panel = (*iter); panel->setSelectCallback(boost::bind(&LLPanelOutfitsInventory::onTabSelectionChange, this, panel, _1, _2)); } + + mAppearanceTabs = getChild<LLTabContainer>("appearance_tabs"); + mAppearanceTabs->setCommitCallback(boost::bind(&LLPanelOutfitsInventory::onTabChange, this)); } void LLPanelOutfitsInventory::onTabSelectionChange(LLInventoryPanel* tab_panel, const std::deque<LLFolderViewItem*> &items, BOOL user_action) @@ -457,6 +471,19 @@ void LLPanelOutfitsInventory::onTabSelectionChange(LLInventoryPanel* tab_panel, onSelectionChange(items, user_action); } +void LLPanelOutfitsInventory::onTabChange() +{ + mActivePanel = (LLInventoryPanel*)childGetVisibleTab("appearance_tabs"); + if (!mActivePanel) + { + return; + } + mActivePanel->setFilterSubString(mFilterSubString); + + bool is_my_outfits = (mActivePanel->getName() == "outfitslist_accordionpanel"); + mListCommands->childSetEnabled("make_outfit_btn", is_my_outfits); +} + LLInventoryPanel* LLPanelOutfitsInventory::getActivePanel() { return mActivePanel; diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h index 9b6b483e3b..1e084750a0 100644 --- a/indra/newview/llpaneloutfitsinventory.h +++ b/indra/newview/llpaneloutfitsinventory.h @@ -44,6 +44,7 @@ class LLSaveFolderState; class LLButton; class LLMenuGL; class LLSidepanelAppearance; +class LLTabContainer; class LLPanelOutfitsInventory : public LLPanel { @@ -76,7 +77,8 @@ protected: private: LLSidepanelAppearance* mParent; LLSaveFolderState* mSavedFolderState; - + LLTabContainer* mAppearanceTabs; + std::string mFilterSubString; public: ////////////////////////////////////////////////////////////////////////////////// @@ -87,6 +89,7 @@ public: protected: void initTabPanels(); void onTabSelectionChange(LLInventoryPanel* tab_panel, const std::deque<LLFolderViewItem*> &items, BOOL user_action); + void onTabChange(); private: LLInventoryPanel* mActivePanel; @@ -117,6 +120,9 @@ private: LLMenuGL* mMenuAdd; // List Commands // //////////////////////////////////////////////////////////////////////////////// + /// +public: + static bool sShowDebugEditor; }; #endif //LL_LLPANELOUTFITSINVENTORY_H diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index 7b2ac38568..5cc9c1951b 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -96,7 +96,7 @@ LLPanelPrimMediaControls::LLPanelPrimMediaControls() : mTargetObjectNormal(LLVector3::zero), mZoomObjectID(LLUUID::null), mZoomObjectFace(0), - mVolumeSliderVisible(false) + mVolumeSliderVisible(0) { mCommitCallbackRegistrar.add("MediaCtrl.Close", boost::bind(&LLPanelPrimMediaControls::onClickClose, this)); mCommitCallbackRegistrar.add("MediaCtrl.Back", boost::bind(&LLPanelPrimMediaControls::onClickBack, this)); @@ -116,6 +116,7 @@ LLPanelPrimMediaControls::LLPanelPrimMediaControls() : mCommitCallbackRegistrar.add("MediaCtrl.Volume", boost::bind(&LLPanelPrimMediaControls::onCommitVolumeSlider, this)); mCommitCallbackRegistrar.add("MediaCtrl.ToggleMute", boost::bind(&LLPanelPrimMediaControls::onToggleMute, this)); mCommitCallbackRegistrar.add("MediaCtrl.ShowVolumeSlider", boost::bind(&LLPanelPrimMediaControls::showVolumeSlider, this)); + mCommitCallbackRegistrar.add("MediaCtrl.HideVolumeSlider", boost::bind(&LLPanelPrimMediaControls::hideVolumeSlider, this)); mCommitCallbackRegistrar.add("MediaCtrl.SkipBack", boost::bind(&LLPanelPrimMediaControls::onClickSkipBack, this)); mCommitCallbackRegistrar.add("MediaCtrl.SkipForward", boost::bind(&LLPanelPrimMediaControls::onClickSkipForward, this)); @@ -372,8 +373,8 @@ void LLPanelPrimMediaControls::updateShape() mVolumeUpCtrl->setVisible(has_focus); mVolumeDownCtrl->setVisible(has_focus); mVolumeCtrl->setEnabled(has_focus); - mVolumeSliderCtrl->setEnabled(has_focus && mVolumeSliderVisible); - mVolumeSliderCtrl->setVisible(has_focus && mVolumeSliderVisible); + mVolumeSliderCtrl->setEnabled(has_focus && mVolumeSliderVisible > 0); + mVolumeSliderCtrl->setVisible(has_focus && mVolumeSliderVisible > 0); mWhitelistIcon->setVisible(false); mSecureLockIcon->setVisible(false); @@ -714,7 +715,7 @@ void LLPanelPrimMediaControls::draw() setVisible(FALSE); mClearFaceOnFade = false; - mVolumeSliderVisible = false; + mVolumeSliderVisible = 0; mTargetImplID = LLUUID::null; mTargetObjectID = LLUUID::null; mTargetObjectFace = 0; @@ -1267,5 +1268,11 @@ void LLPanelPrimMediaControls::onToggleMute() void LLPanelPrimMediaControls::showVolumeSlider() { - mVolumeSliderVisible = true; + mVolumeSliderVisible++; +} + + +void LLPanelPrimMediaControls::hideVolumeSlider() +{ + mVolumeSliderVisible--; } diff --git a/indra/newview/llpanelprimmediacontrols.h b/indra/newview/llpanelprimmediacontrols.h index 17e65b8b0c..d899ee4473 100644 --- a/indra/newview/llpanelprimmediacontrols.h +++ b/indra/newview/llpanelprimmediacontrols.h @@ -110,6 +110,7 @@ private: void onCommitVolumeSlider(); void onToggleMute(); void showVolumeSlider(); + void hideVolumeSlider(); static void onScrollUp(void* user_data); static void onScrollUpHeld(void* user_data); @@ -204,7 +205,7 @@ private: LLUUID mZoomObjectID; S32 mZoomObjectFace; - bool mVolumeSliderVisible; + S32 mVolumeSliderVisible; }; #endif // LL_PANELPRIMMEDIACONTROLS_H diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index 2c5f1b094e..93e5b8fa15 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -49,43 +49,6 @@ #pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally #endif -class ModerationResponder : public LLHTTPClient::Responder -{ -public: - ModerationResponder(const LLUUID& session_id) - { - mSessionID = session_id; - } - - virtual void error(U32 status, const std::string& reason) - { - llwarns << status << ": " << reason << llendl; - - if ( gIMMgr ) - { - //403 == you're not a mod - //should be disabled if you're not a moderator - if ( 403 == status ) - { - gIMMgr->showSessionEventError( - "mute", - "not_a_mod_error", - mSessionID); - } - else - { - gIMMgr->showSessionEventError( - "mute", - "generic_request_error", - mSessionID); - } - } - } - -private: - LLUUID mSessionID; -}; - LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list, bool use_context_menu/* = true*/): mSpeakerMgr(data_source), mAvatarList(avatar_list), @@ -471,22 +434,13 @@ void LLParticipantList::LLParticipantListMenu::show(LLView* spawning_view, const void LLParticipantList::LLParticipantListMenu::toggleAllowTextChat(const LLSD& userdata) { - const LLUUID speaker_id = mUUIDs.front(); - std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest"); - LLSD data; - data["method"] = "mute update"; - data["session-id"] = mParent.mSpeakerMgr->getSessionID(); - data["params"] = LLSD::emptyMap(); - data["params"]["agent_id"] = speaker_id; - data["params"]["mute_info"] = LLSD::emptyMap(); - //current value represents ability to type, so invert - data["params"]["mute_info"]["text"] = !mParent.mSpeakerMgr->findSpeaker(speaker_id)->mModeratorMutedText; - - LLHTTPClient::post( - url, - data, - new ModerationResponder(mParent.mSpeakerMgr->getSessionID())); + LLIMSpeakerMgr* mgr = dynamic_cast<LLIMSpeakerMgr*>(mParent.mSpeakerMgr); + if (mgr) + { + const LLUUID speaker_id = mUUIDs.front(); + mgr->toggleAllowTextChat(speaker_id); + } } void LLParticipantList::LLParticipantListMenu::toggleMute(const LLSD& userdata, U32 flags) @@ -565,47 +519,19 @@ void LLParticipantList::LLParticipantListMenu::moderateVoice(const LLSD& userdat void LLParticipantList::LLParticipantListMenu::moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute) { - if (gAgentID == avatar_id) return; // do not process myself - - LLPointer<LLSpeaker> speakerp = mParent.mSpeakerMgr->findSpeaker(avatar_id); - if (!speakerp) return; - - // *NOTE: mantipov: probably this condition will be incorrect when avatar will be blocked for - // text chat via moderation (LLSpeaker::mModeratorMutedText == TRUE) - bool is_in_voice = speakerp->mStatus <= LLSpeaker::STATUS_VOICE_ACTIVE || speakerp->mStatus == LLSpeaker::STATUS_MUTED; - - // do not send voice moderation changes for avatars not in voice channel - if (!is_in_voice) return; - - std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest"); - LLSD data; - data["method"] = "mute update"; - data["session-id"] = mParent.mSpeakerMgr->getSessionID(); - data["params"] = LLSD::emptyMap(); - data["params"]["agent_id"] = avatar_id; - data["params"]["mute_info"] = LLSD::emptyMap(); - data["params"]["mute_info"]["voice"] = !unmute; - - LLHTTPClient::post( - url, - data, - new ModerationResponder(mParent.mSpeakerMgr->getSessionID())); + LLIMSpeakerMgr* mgr = dynamic_cast<LLIMSpeakerMgr*>(mParent.mSpeakerMgr); + if (mgr) + { + mgr->moderateVoiceParticipant(avatar_id, unmute); + } } void LLParticipantList::LLParticipantListMenu::moderateVoiceOtherParticipants(const LLUUID& excluded_avatar_id, bool unmute) { - LLSpeakerMgr::speaker_list_t speakers; - mParent.mSpeakerMgr->getSpeakerList(&speakers, FALSE); - - for (LLSpeakerMgr::speaker_list_t::iterator iter = speakers.begin(); - iter != speakers.end(); ++iter) + LLIMSpeakerMgr* mgr = dynamic_cast<LLIMSpeakerMgr*>(mParent.mSpeakerMgr); + if (mgr) { - LLSpeaker* speakerp = (*iter).get(); - LLUUID speaker_id = speakerp->mID; - - if (excluded_avatar_id == speaker_id) continue; - - moderateVoiceParticipant(speaker_id, unmute); + mgr->moderateVoiceOtherParticipants(excluded_avatar_id, unmute); } } diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 6e99d5a5f0..60a095506b 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -2277,6 +2277,26 @@ BOOL LLSelectMgr::selectGetAllValid() return TRUE; } +//----------------------------------------------------------------------------- +// selectGetAllValidAndObjectsFound() - return TRUE if selections are +// valid and objects are found. +// +// For EXT-3114 - same as selectGetModify() without the modify check. +//----------------------------------------------------------------------------- +BOOL LLSelectMgr::selectGetAllValidAndObjectsFound() +{ + for (LLObjectSelection::iterator iter = getSelection()->begin(); + iter != getSelection()->end(); iter++ ) + { + LLSelectNode* node = *iter; + LLViewerObject* object = node->getObject(); + if( !object || !node->mValid ) + { + return FALSE; + } + } + return TRUE; +} //----------------------------------------------------------------------------- // selectGetModify() - return TRUE if current agent can modify all diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index 6641be335a..f8ecfd0674 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -535,6 +535,7 @@ public: // Returns TRUE if the viewer has information on all selected objects BOOL selectGetAllRootsValid(); BOOL selectGetAllValid(); + BOOL selectGetAllValidAndObjectsFound(); // returns TRUE if you can modify all selected objects. BOOL selectGetRootsModify(); diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 261bdbcfc0..3861a96355 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -36,6 +36,7 @@ #include "llagent.h" #include "llappviewer.h" +#include "llimview.h" #include "llmutelist.h" #include "llsdutil.h" #include "lluicolortable.h" @@ -575,6 +576,143 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update) } } +class ModerationResponder : public LLHTTPClient::Responder +{ +public: + ModerationResponder(const LLUUID& session_id) + { + mSessionID = session_id; + } + + virtual void error(U32 status, const std::string& reason) + { + llwarns << status << ": " << reason << llendl; + + if ( gIMMgr ) + { + //403 == you're not a mod + //should be disabled if you're not a moderator + if ( 403 == status ) + { + gIMMgr->showSessionEventError( + "mute", + "not_a_mod_error", + mSessionID); + } + else + { + gIMMgr->showSessionEventError( + "mute", + "generic_request_error", + mSessionID); + } + } + } + +private: + LLUUID mSessionID; +}; + +void LLIMSpeakerMgr::toggleAllowTextChat(const LLUUID& speaker_id) +{ + std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest"); + LLSD data; + data["method"] = "mute update"; + data["session-id"] = getSessionID(); + data["params"] = LLSD::emptyMap(); + data["params"]["agent_id"] = speaker_id; + data["params"]["mute_info"] = LLSD::emptyMap(); + //current value represents ability to type, so invert + data["params"]["mute_info"]["text"] = !findSpeaker(speaker_id)->mModeratorMutedText; + + LLHTTPClient::post(url, data, new ModerationResponder(getSessionID())); +} + +void LLIMSpeakerMgr::moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute) +{ + if (gAgentID == avatar_id) return; // do not process myself + + LLPointer<LLSpeaker> speakerp = findSpeaker(avatar_id); + if (!speakerp) return; + + // *NOTE: mantipov: probably this condition will be incorrect when avatar will be blocked for + // text chat via moderation (LLSpeaker::mModeratorMutedText == TRUE) + bool is_in_voice = speakerp->mStatus <= LLSpeaker::STATUS_VOICE_ACTIVE || speakerp->mStatus == LLSpeaker::STATUS_MUTED; + + // do not send voice moderation changes for avatars not in voice channel + if (!is_in_voice) return; + + std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest"); + LLSD data; + data["method"] = "mute update"; + data["session-id"] = getSessionID(); + data["params"] = LLSD::emptyMap(); + data["params"]["agent_id"] = avatar_id; + data["params"]["mute_info"] = LLSD::emptyMap(); + data["params"]["mute_info"]["voice"] = !unmute; + + LLHTTPClient::post( + url, + data, + new ModerationResponder(getSessionID())); +} + +void LLIMSpeakerMgr::moderateVoiceOtherParticipants(const LLUUID& excluded_avatar_id, bool unmute_everyone_else) +{ + // *TODO: mantipov: add more intellectual processing of several following requests if it is needed. + /* + Such situation should be tested: + "Moderator sends the same second request before first response is come" + Moderator sends "mute everyone else" for A and then for B + two requests to disallow voice chat are sent + UUID of B is stored. + Then first response (to disallow voice chat) is come + request to allow voice for stored avatar (B) + Then second response (to disallow voice chat) is come + have nothing to do, the latest selected speaker is already enabled + + What can happen? + If request to allow voice for stored avatar (B) is processed on server BEFORE + second request to disallow voice chat all speakers will be disabled on voice. + But I'm not sure such situation is possible. + See EXT-3431. + */ + + mReverseVoiceModeratedAvatarID = excluded_avatar_id; + moderateVoiceSession(getSessionID(), !unmute_everyone_else); +} + +void LLIMSpeakerMgr::processSessionUpdate(const LLSD& session_update) +{ + if (mReverseVoiceModeratedAvatarID.isNull()) return; + + if (session_update.has("moderated_mode") && + session_update["moderated_mode"].has("voice")) + { + BOOL voice_moderated = session_update["moderated_mode"]["voice"]; + + moderateVoiceParticipant(mReverseVoiceModeratedAvatarID, voice_moderated); + + mReverseVoiceModeratedAvatarID = LLUUID::null; + } +} + +void LLIMSpeakerMgr::moderateVoiceSession(const LLUUID& session_id, bool disallow_voice) +{ + std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest"); + LLSD data; + data["method"] = "session update"; + data["session-id"] = session_id; + data["params"] = LLSD::emptyMap(); + + data["params"]["update_info"] = LLSD::emptyMap(); + + data["params"]["update_info"]["moderated_mode"] = LLSD::emptyMap(); + data["params"]["update_info"]["moderated_mode"]["voice"] = disallow_voice; + + LLHTTPClient::post(url, data, new ModerationResponder(session_id)); +} + // // LLActiveSpeakerMgr diff --git a/indra/newview/llspeakers.h b/indra/newview/llspeakers.h index 04046a8587..1a8c23f56a 100644 --- a/indra/newview/llspeakers.h +++ b/indra/newview/llspeakers.h @@ -158,8 +158,43 @@ public: void updateSpeakers(const LLSD& update); void setSpeakers(const LLSD& speakers); + + void toggleAllowTextChat(const LLUUID& speaker_id); + + /** + * Mutes/Unmutes avatar for current group voice chat. + * + * It only marks avatar as muted for session and does not use local Agent's Block list. + * It does not mute Agent itself. + * + * @param[in] avatar_id UUID of avatar to be processed + * @param[in] unmute if false - specified avatar will be muted, otherwise - unmuted. + * + * @see moderateVoiceOtherParticipants() + */ + void moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute); + + /** + * Mutes/Unmutes all avatars except specified for current group voice chat. + * + * It only marks avatars as muted for session and does not use local Agent's Block list. + * It based call moderateVoiceParticipant() for each avatar should be muted/unmuted. + * + * @param[in] excluded_avatar_id UUID of avatar NOT to be processed + * @param[in] unmute_everyone_else if false - avatars will be muted, otherwise - unmuted. + * + * @see moderateVoiceParticipant() + */ + void moderateVoiceOtherParticipants(const LLUUID& excluded_avatar_id, bool unmute_everyone_else); + + void processSessionUpdate(const LLSD& session_update); + protected: virtual void updateSpeakerList(); + + void moderateVoiceSession(const LLUUID& session_id, bool disallow_voice); + + LLUUID mReverseVoiceModeratedAvatarID; }; class LLActiveSpeakerMgr : public LLSpeakerMgr, public LLSingleton<LLActiveSpeakerMgr> diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index f49e7ef0da..3769ddb1cc 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -32,6 +32,8 @@ #include "llviewerprecompiledheaders.h" // must be first include +#include "llagent.h" + #include "llflatlistview.h" #include "llfloaterreg.h" #include "llnotifications.h" @@ -709,8 +711,8 @@ BOOL LLIMWellWindow::postBuild() void LLIMWellWindow::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) { - if (!mMessageList->getItemByValue(session_id)) return; - + if (mMessageList->getItemByValue(session_id)) return; + // For im sessions started as voice call chiclet gets created on the first incoming message if (gIMMgr->isVoiceCall(session_id)) return; @@ -857,4 +859,36 @@ void LLIMWellWindow::removeObjectRow(const LLUUID& object_id) } } + +void LLIMWellWindow::addIMRow(const LLUUID& session_id) +{ + if (hasIMRow(session_id)) return; + + LLIMModel* im_model = LLIMModel::getInstance(); + addIMRow(session_id, 0, im_model->getName(session_id), im_model->getOtherParticipantID(session_id)); + reshapeWindow(); +} + +bool LLIMWellWindow::hasIMRow(const LLUUID& session_id) +{ + return mMessageList->getItemByValue(session_id); +} + +void LLIMWellWindow::onNewIM(const LLSD& data) +{ + LLUUID from_id = data["from_id"]; + if (from_id.isNull() || gAgentID == from_id) return; + + LLUUID session_id = data["session_id"]; + if (session_id.isNull()) return; + + if (!gIMMgr->isVoiceCall(session_id)) return; + + if (hasIMRow(session_id)) return; + + //first real message, time to create chiclet + addIMRow(session_id); +} + + // EOF diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h index fea145a17e..736b1b9fb4 100644 --- a/indra/newview/llsyswellwindow.h +++ b/indra/newview/llsyswellwindow.h @@ -188,9 +188,14 @@ public: /*virtual*/ void sessionRemoved(const LLUUID& session_id); /*virtual*/ void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id); + void onNewIM(const LLSD& data); + void addObjectRow(const LLUUID& object_id, bool new_message = false); void removeObjectRow(const LLUUID& object_id); + void addIMRow(const LLUUID& session_id); + bool hasIMRow(const LLUUID& session_id); + protected: /*virtual*/ const std::string& getAnchorViewName() { return IM_WELL_ANCHOR_NAME; } diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 9f69ed3964..83e0b53960 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -448,6 +448,7 @@ LLTextureFetchWorker::~LLTextureFetchWorker() mFormattedImage = NULL; clearPackets(); unlockWorkMutex(); + mFetcher->removeFromHTTPQueue(mID); } void LLTextureFetchWorker::clearPackets() @@ -821,6 +822,13 @@ bool LLTextureFetchWorker::doWork(S32 param) if (mFormattedImage.notNull()) { cur_size = mFormattedImage->getDataSize(); // amount of data we already have + if (mFormattedImage->getDiscardLevel() == 0) + { + // We already have all the data, just decode it + mLoadedDiscard = mFormattedImage->getDiscardLevel(); + mState = DECODE_IMAGE; + return false; + } } mRequestedSize = mDesiredSize; mRequestedDiscard = mDesiredDiscard; @@ -871,26 +879,16 @@ bool LLTextureFetchWorker::doWork(S32 param) llinfos << "HTTP GET failed for: " << mUrl << " Status: " << mGetStatus << " Reason: '" << mGetReason << "'" << " Attempt:" << mHTTPFailCount+1 << "/" << max_attempts << llendl; - if (cur_size == 0) + ++mHTTPFailCount; + if (mHTTPFailCount >= max_attempts) { - ++mHTTPFailCount; - if (mHTTPFailCount >= max_attempts) - { - resetFormattedData(); - return true; // failed - } - else - { - mState = SEND_HTTP_REQ; - return false; // retry - } + resetFormattedData(); + return true; // failed } else { - // mFormattedImage gauranteed to not be NULL since cur_size != 0 - mLoadedDiscard = mFormattedImage->getDiscardLevel(); - mState = DECODE_IMAGE; - return false; // use what we have + mState = SEND_HTTP_REQ; + return false; // retry } } diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index b6e20608eb..9573b884eb 100644 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -494,7 +494,7 @@ void LLGLTexMemBar::draw() #endif //---------------------------------------------------------------------------- - text = llformat("Textures: %d Fetch: %d(%d) Pkts:%d(%d) Cache R/W: %d/%d LFS:%d IW:%d RAW:%d HTP:%d", + text = llformat("Textures: %d Fetch: %d(%d) Pkts:%d(%d) Cache R/W: %d/%d LFS:%d IW:%d RAW:%d HTP:%d CRE:%d", gTextureList.getNumImages(), LLAppViewer::getTextureFetch()->getNumRequests(), LLAppViewer::getTextureFetch()->getNumDeletes(), LLAppViewer::getTextureFetch()->mPacketCount, LLAppViewer::getTextureFetch()->mBadPacketCount, @@ -502,7 +502,8 @@ void LLGLTexMemBar::draw() LLLFSThread::sLocal->getPending(), LLAppViewer::getImageDecodeThread()->getPending(), LLImageRaw::sRawImageCount, - LLAppViewer::getTextureFetch()->getNumHTTPRequests()); + LLAppViewer::getTextureFetch()->getNumHTTPRequests(), + gTextureList.mCreateTextureList.size()); LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, h_offset + line_height*2, text_color, LLFontGL::LEFT, LLFontGL::TOP); diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 74fbce890d..b1d09eccba 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -731,14 +731,13 @@ BOOL LLToolPie::handleToolTip(S32 local_x, S32 local_y, MASK mask) // *HACK: We may select this object, so pretend it was clicked mPick = mHoverPick; LLInspector::Params p; + p.fillFrom(LLUICtrlFactory::instance().getDefaultParams<LLInspector>()); p.message(avatar_name); p.image(LLUI::getUIImage("Info")); p.click_callback(boost::bind(showAvatarInspector, hover_object->getID())); p.visible_time_near(6.f); p.visible_time_far(3.f); p.wrap(false); - - p.fillFrom(LLUICtrlFactory::instance().getDefaultParams<LLInspector>()); LLToolTipMgr::instance().show(p); } @@ -822,6 +821,7 @@ BOOL LLToolPie::handleToolTip(S32 local_x, S32 local_y, MASK mask) // We may select this object, so pretend it was clicked mPick = mHoverPick; LLInspector::Params p; + p.fillFrom(LLUICtrlFactory::instance().getDefaultParams<LLInspector>()); p.message(tooltip_msg); p.image(LLUI::getUIImage("Info_Off")); p.click_callback(boost::bind(showObjectInspector, hover_object->getID(), mHoverPick.mObjectFace)); @@ -833,8 +833,6 @@ BOOL LLToolPie::handleToolTip(S32 local_x, S32 local_y, MASK mask) p.visible_time_near(6.f); p.visible_time_far(3.f); p.wrap(false); - - p.fillFrom(LLUICtrlFactory::instance().getDefaultParams<LLInspector>()); LLToolTipMgr::instance().show(p); } diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index f3db0ab170..57434bd1e4 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -72,6 +72,8 @@ #include "llrender.h" #include "llbottomtray.h" #include "llnavigationbar.h" +#include "llfloatertools.h" +#include "llpaneloutfitsinventory.h" #ifdef TOGGLE_HACKED_GODLIKE_VIEWER BOOL gHackGodmode = FALSE; @@ -119,12 +121,6 @@ static bool handleSetShaderChanged(const LLSD& newvalue) return true; } -static bool handleSetSelfInvisible( const LLSD& newvalue) -{ - LLVOAvatarSelf::onChangeSelfInvisible( newvalue.asBoolean() ); - return true; -} - static bool handleReleaseGLBufferChanged(const LLSD& newvalue) { if (gPipeline.isInit()) @@ -525,6 +521,18 @@ bool toggle_show_favorites_panel(const LLSD& newvalue) return true; } +bool toggle_show_appearance_editor(const LLSD& newvalue) +{ + LLPanelOutfitsInventory::sShowDebugEditor = newvalue.asBoolean(); + return true; +} + +bool toggle_show_object_render_cost(const LLSD& newvalue) +{ + LLFloaterTools::sShowObjectCost = newvalue.asBoolean(); + return true; +} + //////////////////////////////////////////////////////////////////////////// void settings_setup_listeners() @@ -545,7 +553,6 @@ void settings_setup_listeners() gSavedSettings.getControl("WindLightUseAtmosShaders")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2)); gSavedSettings.getControl("RenderGammaFull")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2)); gSavedSettings.getControl("RenderAvatarMaxVisible")->getSignal()->connect(boost::bind(&handleAvatarMaxVisibleChanged, _2)); - gSavedSettings.getControl("RenderAvatarInvisible")->getSignal()->connect(boost::bind(&handleSetSelfInvisible, _2)); gSavedSettings.getControl("RenderVolumeLODFactor")->getSignal()->connect(boost::bind(&handleVolumeLODChanged, _2)); gSavedSettings.getControl("RenderAvatarLODFactor")->getSignal()->connect(boost::bind(&handleAvatarLODChanged, _2)); gSavedSettings.getControl("RenderTerrainLODFactor")->getSignal()->connect(boost::bind(&handleTerrainLODChanged, _2)); @@ -668,6 +675,8 @@ void settings_setup_listeners() gSavedSettings.getControl("ShowSnapshotButton")->getSignal()->connect(boost::bind(&toggle_show_snapshot_button, _2)); gSavedSettings.getControl("ShowNavbarNavigationPanel")->getSignal()->connect(boost::bind(&toggle_show_navigation_panel, _2)); gSavedSettings.getControl("ShowNavbarFavoritesPanel")->getSignal()->connect(boost::bind(&toggle_show_favorites_panel, _2)); + gSavedSettings.getControl("ShowDebugAppearanceEditor")->getSignal()->connect(boost::bind(&toggle_show_appearance_editor, _2)); + gSavedSettings.getControl("ShowObjectRenderingCost")->getSignal()->connect(boost::bind(&toggle_show_object_render_cost, _2)); } #if TEST_CACHED_CONTROL diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 103a70e032..df62c9628d 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -160,36 +160,25 @@ public: std::string media_type = content["content-type"].asString(); std::string::size_type idx1 = media_type.find_first_of(";"); std::string mime_type = media_type.substr(0, idx1); - completeAny(status, mime_type); - } - virtual void error( U32 status, const std::string& reason ) - { - if(status == 401) - { - // This is the "you need to authenticate" status. - // Treat this like an html page. - completeAny(status, "text/html"); - } - else - if(status == 403) - { - completeAny(status, "text/html"); - } - else - if(status == 404) - { - // 404 is content not found - sites often have bespoke 404 pages so - // treat them like an html page. - completeAny(status, "text/html"); - } - else - if(status == 406) + lldebugs << "status is " << status << ", media type \"" << media_type << "\"" << llendl; + + // 2xx status codes indicate success. + // Most 4xx status codes are successful enough for our purposes. + // 499 is the error code for host not found, timeout, etc. + if( ((status >= 200) && (status < 300)) || + ((status >= 400) && (status < 499)) ) { - // 406 means the server sent something that we didn't indicate was acceptable - // Eventually we should send what we accept in the headers but for now, - // treat 406s like an html page. - completeAny(status, "text/html"); + // The probe was successful. + + if(mime_type.empty()) + { + // Some sites don't return any content-type header at all. + // Treat an empty mime type as text/html. + mime_type = "text/html"; + } + + completeAny(status, mime_type); } else { @@ -200,6 +189,7 @@ public: mMediaImpl->mMediaSourceFailed = true; } } + } void completeAny(U32 status, const std::string& mime_type) @@ -582,8 +572,8 @@ bool LLViewerMedia::isInterestingEnough(const LLVOVolume *object, const F64 &obj } else { - llinfos << "object interest = " << object_interest << ", lowest loadable = " << sLowestLoadableImplInterest << llendl; - if(object_interest > sLowestLoadableImplInterest) + lldebugs << "object interest = " << object_interest << ", lowest loadable = " << sLowestLoadableImplInterest << llendl; + if(object_interest >= sLowestLoadableImplInterest) result = true; } @@ -929,6 +919,7 @@ LLViewerMediaImpl::LLViewerMediaImpl( const LLUUID& texture_id, mMimeTypeProbe(NULL), mMediaAutoPlay(false), mInNearbyMediaList(false), + mClearCache(false), mIsUpdated(false) { @@ -1139,6 +1130,12 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type) media_source->setBrowserUserAgent(LLViewerMedia::getCurrentUserAgent()); media_source->focus(mHasFocus); + if(mClearCache) + { + mClearCache = false; + media_source->clear_cache(); + } + mMediaSource = media_source; updateVolume(); @@ -1352,6 +1349,19 @@ std::string LLViewerMediaImpl::getCurrentMediaURL() } ////////////////////////////////////////////////////////////////////////////////////////// +void LLViewerMediaImpl::clearCache() +{ + if(mMediaSource) + { + mMediaSource->clear_cache(); + } + else + { + mClearCache = true; + } +} + +////////////////////////////////////////////////////////////////////////////////////////// void LLViewerMediaImpl::mouseDown(S32 x, S32 y, MASK mask, S32 button) { scaleMouse(&x, &y); @@ -1633,7 +1643,12 @@ void LLViewerMediaImpl::navigateInternal() if(scheme.empty() || "http" == scheme || "https" == scheme) { - LLHTTPClient::getHeaderOnly( mMediaURL, new LLMimeDiscoveryResponder(this), 10.0f); + // If we don't set an Accept header, LLHTTPClient will add one like this: + // Accept: application/llsd+xml + // which is really not what we want. + LLSD headers = LLSD::emptyMap(); + headers["Accept"] = "*/*"; + LLHTTPClient::getHeaderOnly( mMediaURL, new LLMimeDiscoveryResponder(this), headers, 10.0f); } else if("data" == scheme || "file" == scheme || "about" == scheme) { diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index 7151186089..28fb379960 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -188,6 +188,7 @@ public: std::string getCurrentMediaURL(); std::string getHomeURL() { return mHomeURL; } void setHomeURL(const std::string& home_url) { mHomeURL = home_url; }; + void clearCache(); std::string getMimeType() { return mMimeType; } void scaleMouse(S32 *mouse_x, S32 *mouse_y); void scaleTextureCoords(const LLVector2& texture_coords, S32 *x, S32 *y); @@ -355,6 +356,7 @@ public: bool mMediaAutoPlay; std::string mMediaEntryURL; bool mInNearbyMediaList; // used by LLFloaterNearbyMedia::refreshList() for performance reasons + bool mClearCache; private: BOOL mIsUpdated ; diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp index e04a54fbd6..a0ac9c2091 100644 --- a/indra/newview/llviewermediafocus.cpp +++ b/indra/newview/llviewermediafocus.cpp @@ -51,6 +51,7 @@ #include "llkeyboard.h" #include "lltoolmgr.h" #include "llvovolume.h" +#include "llhelp.h" // // LLViewerMediaFocus @@ -302,7 +303,7 @@ BOOL LLViewerMediaFocus::handleKey(KEY key, MASK mask, BOOL called_from_parent) { media_impl->handleKeyHere(key, mask); - if (key == KEY_ESCAPE) + if (KEY_ESCAPE == key) { // Reset camera zoom in this case. if(mFocusedImplID.notNull()) @@ -315,6 +316,15 @@ BOOL LLViewerMediaFocus::handleKey(KEY key, MASK mask, BOOL called_from_parent) clearFocus(); } + + if ( KEY_F1 == key && LLUI::sHelpImpl && mMediaControls.get()) + { + std::string help_topic; + if (mMediaControls.get()->findHelpTopic(help_topic)) + { + LLUI::sHelpImpl->showTopic(help_topic); + } + } } return true; diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 389603524d..5cfd587bd1 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -56,6 +56,7 @@ #include "llfloatercustomize.h" #include "llfloaterchatterbox.h" #include "llfloatergodtools.h" +#include "llfloaterinventory.h" #include "llfloaterland.h" #include "llfloaterpay.h" #include "llfloaterreporter.h" @@ -633,6 +634,20 @@ class LLAdvancedCheckHUDInfo : public view_listener_t } }; + +////////////// +// FLYING // +////////////// + +class LLAdvancedAgentFlyingInfo : public view_listener_t +{ + bool handleEvent(const LLSD&) + { + return gAgent.getFlying(); + } +}; + + /////////////////////// // CLEAR GROUP CACHE // /////////////////////// @@ -2640,7 +2655,7 @@ bool enable_object_edit() enable = LLViewerParcelMgr::getInstance()->allowAgentBuild() || LLSelectMgr::getInstance()->getSelection()->isAttachment(); } - else if (LLSelectMgr::getInstance()->selectGetModify()) + else if (LLSelectMgr::getInstance()->selectGetAllValidAndObjectsFound()) { enable = true; } @@ -5571,7 +5586,15 @@ class LLShowSidetrayPanel : public view_listener_t bool handleEvent(const LLSD& userdata) { std::string panel_name = userdata.asString(); - LLSideTray::getInstance()->showPanel(panel_name, LLSD()); + // Open up either the sidepanel or new floater. + if (LLSideTray::getInstance()->isPanelActive(panel_name)) + { + LLFloaterInventory::showAgentInventory(); + } + else + { + LLSideTray::getInstance()->showPanel(panel_name, LLSD()); + } return true; } }; @@ -7700,6 +7723,9 @@ void initialize_menus() // Advanced Other Settings view_listener_t::addMenu(new LLAdvancedClearGroupCache(), "Advanced.ClearGroupCache"); + // Advanced > Shortcuts + view_listener_t::addMenu(new LLAdvancedAgentFlyingInfo(), "Agent.getFlying"); + // Advanced > Render > Types view_listener_t::addMenu(new LLAdvancedToggleRenderType(), "Advanced.ToggleRenderType"); view_listener_t::addMenu(new LLAdvancedCheckRenderType(), "Advanced.CheckRenderType"); diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 48794bbc1a..6bad8843fd 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -40,12 +40,12 @@ #include "llfloaterreg.h" #include "llfloaterbuycurrency.h" #include "llfloatersnapshot.h" -#include "llimage.h"
-#include "llimagebmp.h"
-#include "llimagepng.h"
-#include "llimagej2c.h"
-#include "llimagejpeg.h"
-#include "llimagetga.h"
+#include "llimage.h" +#include "llimagebmp.h" +#include "llimagepng.h" +#include "llimagej2c.h" +#include "llimagejpeg.h" +#include "llimagetga.h" #include "llinventorymodel.h" // gInventory #include "llresourcedata.h" #include "llfloaterperms.h" diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index e066546bd8..8252b7df00 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -588,7 +588,7 @@ void LLViewerTextureList::updateImages(F32 max_time) F32 total_max_time = max_time; max_time -= updateImagesFetchTextures(max_time); - max_time = llmax(max_time, total_max_time*.25f); // at least 25% of max_time + max_time = llmax(max_time, total_max_time*.50f); // at least 50% of max_time max_time -= updateImagesCreateTextures(max_time); if (!mDirtyTextureList.empty()) diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index b4c45c23d4..ecd6b05ded 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -2021,43 +2021,6 @@ void LLVOAvatarSelf::onCustomizeEnd() } } -// static -void LLVOAvatarSelf::onChangeSelfInvisible(BOOL newvalue) -{ - LLVOAvatarSelf *avatarp = gAgent.getAvatarObject(); - if (avatarp) - { - if (newvalue) - { - // we have just requested to set the avatar's baked textures to invisible - avatarp->setInvisible(TRUE); - } - else - { - avatarp->setInvisible(FALSE); - } - } -} - -void LLVOAvatarSelf::setInvisible(BOOL newvalue) -{ - if (newvalue) - { - setCompositeUpdatesEnabled(FALSE); - for (U32 i = 0; i < mBakedTextureDatas.size(); i++ ) - { - setNewBakedTexture(mBakedTextureDatas[i].mTextureIndex, IMG_INVISIBLE); - } - gAgent.sendAgentSetAppearance(); - } - else - { - setCompositeUpdatesEnabled(TRUE); - invalidateAll(); - gAgent.sendAgentSetAppearance(); - } -} - // HACK: this will null out the avatar's local texture IDs before the TE message is sent // to ensure local texture IDs are not sent to other clients in the area. // this is a short-term solution. The long term solution will be to not set the texture diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index c7bd4eaadc..dc70996f0b 100644 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -308,8 +308,6 @@ public: // Visibility //-------------------------------------------------------------------- public: - static void onChangeSelfInvisible(BOOL newvalue); - void setInvisible(BOOL newvalue); bool sendAppearanceMessage(LLMessageSystem *mesgsys) const; /** Appearance diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index fd4e7bb91f..60a2c3b638 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -229,7 +229,6 @@ void LLVoiceChannel::handleStatusChange(EStatusType type) { // if forceably removed from channel // update the UI and revert to default channel - LLNotificationsUtil::add("VoiceChannelDisconnected", mNotifyArgs); deactivate(); } mIgnoreNextSessionLeave = FALSE; @@ -741,6 +740,7 @@ void LLVoiceChannelP2P::handleStatusChange(EStatusType type) case STATUS_LEFT_CHANNEL: if (callStarted() && !mIgnoreNextSessionLeave && !sSuspended) { + // *TODO: use it to show DECLINE voice notification if (mState == STATE_RINGING) { // other user declined call @@ -748,8 +748,7 @@ void LLVoiceChannelP2P::handleStatusChange(EStatusType type) } else { - // other user hung up - LLNotificationsUtil::add("VoiceChannelDisconnectedP2P", mNotifyArgs); + // other user hung up } deactivate(); } diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index 0405b9d28b..b789bd3650 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -356,7 +356,7 @@ BOOL LLWearable::importFile( LLFILE* file ) if( num_parameters != mVisualParamIndexMap.size() ) { - llwarns << "Wearable parameter mismatch. Reading in " << num_parameters << " from file, but created " << mVisualParamIndexMap.size() << " from avatar parameters. " << llendl; + llwarns << "Wearable parameter mismatch. Reading in " << num_parameters << " from file, but created " << mVisualParamIndexMap.size() << " from avatar parameters. type: " << mType << llendl; } // parameters diff --git a/indra/newview/llwearable.h b/indra/newview/llwearable.h index 82d388ab7e..7a579b248e 100644 --- a/indra/newview/llwearable.h +++ b/indra/newview/llwearable.h @@ -127,6 +127,7 @@ public: void setClothesColor( S32 te, const LLColor4& new_color, BOOL upload_bake ); void revertValues(); + void saveValues(); BOOL isOnTop() const; @@ -143,7 +144,6 @@ private: void createLayers(S32 te); void createVisualParams(); - void saveValues(); void syncImages(te_map_t &src, te_map_t &dst); void destroyTextures(); diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp index bd7619f7e5..5636256856 100644 --- a/indra/newview/llwearablelist.cpp +++ b/indra/newview/llwearablelist.cpp @@ -249,9 +249,13 @@ LLWearable* LLWearableList::createNewWearable( EWearableType type ) wearable->setParamsToDefaults(); wearable->setTexturesToDefaults(); + //mark all values (params & images) as saved + wearable->saveValues(); + // Send to the dataserver wearable->saveNewAsset(); + return wearable; } diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index 5302ef3a39..706245a479 100644 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -71,10 +71,14 @@ <color name="Transparent" value="0 0 0 0" /> + <!-- Make potentially unused colors show up bright purple. + Leave this here until all Unused? are removed below, otherwise + the viewer generates many warnings on startup. --> + <color + name="Unused?" + value="1 0 1 1" /> - - - <!-- UI Definitions --> + <!-- UI Definitions --> <color name="AgentChatColor" @@ -375,7 +379,7 @@ reference="White_25" /> <color name="InventorySearchStatusColor" - reference="Black" /> + reference="EmphasisColor" /> <color name="LabelDisabledColor" reference="White_25" /> diff --git a/indra/newview/skins/default/textures/icons/SL_Logo.png b/indra/newview/skins/default/textures/icons/SL_Logo.png Binary files differnew file mode 100644 index 0000000000..c9fbde987a --- /dev/null +++ b/indra/newview/skins/default/textures/icons/SL_Logo.png diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 4dbfd5bc81..9212d3d87b 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -232,6 +232,7 @@ with the same filename but different name <texture name="Inv_Gloves" file_name="icons/Inv_Gloves.png" preload="false" /> <texture name="Inv_Hair" file_name="icons/Inv_Hair.png" preload="false" /> <texture name="Inv_LinkItem" file_name="icons/Inv_LinkItem.png" preload="false" /> + <texture name="Inv_LinkItem_Broken" file_name="icons/Inv_LinkItem_Broken.png" preload="false" /> <texture name="Inv_LinkFolder" file_name="icons/Inv_LinkFolder.png" preload="false" /> <texture name="Inv_Jacket" file_name="icons/Inv_Jacket.png" preload="false" /> <texture name="Inv_LookFolderOpen" file_name="icons/Inv_LookFolderOpen.png" preload="false" /> @@ -485,7 +486,8 @@ with the same filename but different name <texture name="SliderThumb_Off" file_name="widgets/SliderThumb_Off.png" /> <texture name="SliderThumb_Disabled" file_name="widgets/SliderThumb_Disabled.png" /> <texture name="SliderThumb_Press" file_name="widgets/SliderThumb_Press.png" /> - <texture name="SL_Logo" file_name="map_infohub.tga" /> + + <texture name="SL_Logo" file_name="icons/SL_Logo.png" preload="true" /> <texture name="Snapshot_Off" file_name="bottomtray/Snapshot_Off.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> <texture name="Snapshot_Over" file_name="bottomtray/Snapshot_Over.png" preload="false" /> @@ -493,12 +495,12 @@ with the same filename but different name <texture name="startup_logo" file_name="windows/startup_logo.png" preload="true" /> - <texture name="Stepper_Down_Disabled" file_name="widgets/Stepper_Down_Disabled.png" preload="true" /> - <texture name="Stepper_Down_Off" file_name="widgets/Stepper_Down_Off.png" preload="true" /> - <texture name="Stepper_Down_Press" file_name="widgets/Stepper_Down_Press.png" preload="true" /> - <texture name="Stepper_Up_Disabled" file_name="widgets/Stepper_Up_Disabled.png" preload="true" /> - <texture name="Stepper_Up_Off" file_name="widgets/Stepper_Up_Off.png" preload="true" /> - <texture name="Stepper_Up_Press" file_name="widgets/Stepper_Up_Press.png" preload="true" /> + <texture name="Stepper_Down_Disabled" file_name="widgets/Stepper_Down_Disabled.png" preload="false" /> + <texture name="Stepper_Down_Off" file_name="widgets/Stepper_Down_Off.png" preload="false" /> + <texture name="Stepper_Down_Press" file_name="widgets/Stepper_Down_Press.png" preload="false" /> + <texture name="Stepper_Up_Disabled" file_name="widgets/Stepper_Up_Disabled.png" preload="false" /> + <texture name="Stepper_Up_Off" file_name="widgets/Stepper_Up_Off.png" preload="false" /> + <texture name="Stepper_Up_Press" file_name="widgets/Stepper_Up_Press.png" preload="false" /> <texture name="Stop_Off" file_name="icons/Stop_Off.png" preload="false" /> <texture name="Stop_Over" file_name="icons/Stop_Over.png" preload="false" /> diff --git a/indra/newview/skins/default/xui/en/floater_aaa.xml b/indra/newview/skins/default/xui/en/floater_aaa.xml index 6956b73371..cb4cbd229a 100644 --- a/indra/newview/skins/default/xui/en/floater_aaa.xml +++ b/indra/newview/skins/default/xui/en/floater_aaa.xml @@ -15,21 +15,21 @@ title="TEST FLOATER" save_dock_state="true" save_visibility="true" - single_instance="true" + single_instance="true" width="320"> <string name="nudge_parabuild">Nudge 1</string> <string name="test_the_vlt">This string is extracted.</string> <chat_history allow_html="true" bg_readonly_color="ChatHistoryBgColor" - bg_writeable_color="ChatHistoryBgColor" - border_visible="false" + bg_writeable_color="ChatHistoryBgColor" + border_visible="false" follows="all" font="SansSerif" - left="1" + left="1" top="20" layout="topleft" - height="260" + height="260" name="chat_history" parse_highlights="true" text_color="ChatHistoryTextColor" diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml index 70018d2295..81e6503407 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -1672,9 +1672,7 @@ Only large parcels can be listed in search. name="replace_texture_help" width="300" word_wrap="true"> - Objects using this texture will show the movie or web page after you click the play arrow. - -Select the thumbnail to choose a different texture. + Objects using this texture will show the movie or web page after you click the play arrow. Select the thumbnail to choose a different texture. </text> <check_box height="16" diff --git a/indra/newview/skins/default/xui/en/floater_avatar_textures.xml b/indra/newview/skins/default/xui/en/floater_avatar_textures.xml index a0cb94eb69..54b6edb0ec 100644 --- a/indra/newview/skins/default/xui/en/floater_avatar_textures.xml +++ b/indra/newview/skins/default/xui/en/floater_avatar_textures.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater legacy_header_height="18" - height="950" + height="650" layout="topleft" name="avatar_texture_debug" help_topic="avatar_texture_debug" @@ -16,9 +16,9 @@ length="1" height="16" layout="topleft" - left="10" + left="30" name="label" - top="24" + top="40" width="80"> Baked Textures </text> @@ -27,7 +27,7 @@ length="1" height="16" layout="topleft" - left_pad="60" + left_pad="50" name="composite_label" top_delta="0" width="120"> @@ -40,16 +40,37 @@ layout="topleft" left_pad="530" name="Dump" - top_delta="1" + top_delta="0" width="150" /> + <scroll_container + color="DkGray2" + opaque="true" + follows="all" + height="590" + layout="topleft" + left="5" + top_pad="5" + name="profile_scroll" + reserve_scroll_corner="false" + width="1240"> + <panel + name="scroll_content_panel" + follows="left|top" + min_height="300" + layout="topleft" + top="0" + background_visible="false" + height="950" + left="0" + width="1250"> <texture_picker height="143" label="Hair" layout="topleft" left="10" name="hair-baked" - top="47" + top="17" width="128" /> <texture_picker height="143" @@ -74,7 +95,7 @@ layout="topleft" left="10" name="head-baked" - top="197" + top="167" width="128" /> <texture_picker height="143" @@ -107,7 +128,7 @@ layout="topleft" left="10" name="eyes-baked" - top="347" + top="317" width="128" /> <texture_picker height="143" @@ -132,7 +153,7 @@ layout="topleft" left="10" name="upper-baked" - top="497" + top="467" width="128" /> <texture_picker height="143" @@ -197,7 +218,7 @@ layout="topleft" left="10" name="lower-baked" - top="647" + top="617" width="128" /> <texture_picker height="143" @@ -270,7 +291,7 @@ layout="topleft" left="10" name="skirt-baked" - top="797" + top="767" width="128" /> <texture_picker height="143" @@ -280,5 +301,6 @@ name="skirt" top_delta="0" width="128" /> - +</panel> +</scroll_container> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml index 35f3e643c3..8c5af2283d 100644 --- a/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml +++ b/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml @@ -65,11 +65,9 @@ <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WL12am" follows="left|top|right" - height="6" + height="16" layout="topleft" left="8" name="WL12am" @@ -80,11 +78,9 @@ <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WL3am" follows="left|top|right" - height="6" + height="16" layout="topleft" left_pad="10" name="WL3am" @@ -95,11 +91,9 @@ <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WL6am" follows="left|top|right" - height="6" + height="16" layout="topleft" left_pad="10" name="WL6am" @@ -110,11 +104,9 @@ <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WL9am" follows="left|top|right" - height="6" + height="16" layout="topleft" left_pad="10" name="WL9amHash" @@ -125,11 +117,9 @@ <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WL12pm" follows="left|top|right" - height="6" + height="16" layout="topleft" left_pad="10" name="WL12pmHash" @@ -140,11 +130,9 @@ <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WL3pm" follows="left|top|right" - height="6" + height="16" layout="topleft" left_pad="10" name="WL3pm" @@ -155,11 +143,9 @@ <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WL6pm" follows="left|top|right" - height="6" + height="16" layout="topleft" left_pad="10" name="WL6pm" @@ -170,11 +156,9 @@ <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WL9pm" follows="left|top|right" - height="6" + height="16" layout="topleft" left_pad="10" name="WL9pm" @@ -185,11 +169,9 @@ <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WL12am2" follows="left|top|right" - height="6" + height="16" layout="topleft" left_pad="10" name="WL12am2" @@ -200,9 +182,7 @@ <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WL12amHash" follows="left|top|right" font="SansSerif" height="14" @@ -210,135 +190,119 @@ left="20" name="WL12amHash" top="54" - width="4"> + width="6"> | </text> <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WL3amHash" follows="left|top|right" font="SansSerif" height="11" layout="topleft" - left_pad="61" + left_pad="59" name="WL3amHash" top_delta="3" - width="4"> + width="6"> I </text> <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WL6amHash" follows="left|top|right" font="SansSerif" height="14" layout="topleft" - left_pad="61" + left_pad="59" name="WL6amHash" top_delta="-3" - width="4"> + width="6"> | </text> <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WL9amHash" follows="left|top|right" font="SansSerif" height="11" layout="topleft" - left_pad="61" + left_pad="59" name="WL9amHash2" top_delta="3" - width="4"> + width="6"> I </text> <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WL12pmHash" follows="left|top|right" font="SansSerif" height="14" layout="topleft" - left_pad="61" + left_pad="59" name="WL12pmHash2" top_delta="-3" - width="4"> + width="6"> | </text> <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WL3pmHash" follows="left|top|right" font="SansSerif" height="11" layout="topleft" - left_pad="61" + left_pad="59" name="WL3pmHash" top_delta="3" - width="4"> + width="6"> I </text> <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WL6pmHash" follows="left|top|right" font="SansSerif" height="14" layout="topleft" - left_pad="61" + left_pad="59" name="WL6pmHash" top_delta="-3" - width="4"> + width="6"> | </text> <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WL9pmHash" follows="left|top|right" font="SansSerif" height="11" layout="topleft" - left_pad="61" + left_pad="59" name="WL9pmHash" top_delta="3" - width="4"> + width="6"> I </text> <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WL12amHash2" follows="left|top|right" font="SansSerif" height="14" layout="topleft" - left_pad="61" + left_pad="59" name="WL12amHash2" top_delta="-3" - width="4"> + width="6"> | </text> <button @@ -346,9 +310,9 @@ label="Add Key" label_selected="Add Key" layout="topleft" - left="550" + left="555" name="WLAddKey" - top="20" + top="30" width="80" /> <button height="20" @@ -362,9 +326,7 @@ <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="DayCycleText" follows="left|top|right" font="SansSerif" height="16" @@ -378,9 +340,7 @@ <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="DayCycleText" follows="left|top|right" font="SansSerif" height="16" @@ -424,9 +384,7 @@ <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="WLCurKeyTimeText" follows="left|top|right" font="SansSerif" height="16" @@ -456,9 +414,7 @@ <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="DayCycleText" follows="left|top|right" font="SansSerif" height="16" @@ -481,9 +437,7 @@ <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="DayCycleText" follows="left|top|right" font="SansSerif" height="16" @@ -542,9 +496,7 @@ <text type="string" length="1" - bg_visible="true" border_visible="true" - control_name="DayCycleText" follows="left|top|right" font="SansSerif" height="16" @@ -560,7 +512,7 @@ label="Play" label_selected="Play" layout="topleft" - left_delta="0" + left_delta="60" name="WLAnimSky" top_pad="5" width="50" /> @@ -581,7 +533,7 @@ left_pad="5" name="WLUseLindenTime" top_delta="0" - width="140" /> + width="150" /> <button height="20" label="Save Test Day" diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml index e015419118..57e92cdeec 100644 --- a/indra/newview/skins/default/xui/en/floater_im_session.xml +++ b/indra/newview/skins/default/xui/en/floater_im_session.xml @@ -30,14 +30,15 @@ layout="topleft" follows="left" label="IM Control Panel" + min_width="115" auto_resize="false" - user_resize="false" /> + user_resize="true" /> <layout_panel left="0" top="0" height="200" width="245" - user_resize="false"> + user_resize="true"> <button height="20" follows="left|top" diff --git a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml index ae4d5042ef..c6bc093c6c 100644 --- a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml +++ b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml @@ -69,7 +69,29 @@ Calling [CALLEE_NAME] word_wrap="true"> No Answer. Please try again later. </text> - <text + <text + font="SansSerifLarge" + height="40" + layout="topleft" + left="77" + name="nearby" + top="27" + width="315" + word_wrap="true"> + You have been disconnected from [VOICE_CHANNEL_NAME]. You will now be reconnected to Nearby Voice Chat. + </text> + <text + font="SansSerifLarge" + height="40" + layout="topleft" + left="77" + name="nearby_P2P" + top="27" + width="315" + word_wrap="true"> + [VOICE_CHANNEL_NAME] has ended the call. You will now be reconnected to Nearby Voice Chat. + </text> + <text font="SansSerif" height="50" layout="topleft" @@ -80,7 +102,7 @@ No Answer. Please try again later. word_wrap="true"> Leaving [CURRENT_CHAT]. </text> - <button + <button height="24" label="Cancel" label_selected="Cancel" diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index 1903434d33..e55453f772 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -2675,6 +2675,7 @@ even though the user gets a free copy. height="18" layout="topleft" left="10" + use_ellipsis="true" read_only="true" name="media_info" width="180" /> diff --git a/indra/newview/skins/default/xui/en/floater_voice_controls.xml b/indra/newview/skins/default/xui/en/floater_voice_controls.xml index a193f53417..474b703ae5 100644 --- a/indra/newview/skins/default/xui/en/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/en/floater_voice_controls.xml @@ -33,12 +33,14 @@ No one near </string> <panel - bevel_style="in" + bevel_style="out" + border="true" follows="left|right|top" height="62" layout="topleft" left="0" name="control_panel" + top="0" width="282"> <panel height="18" @@ -81,51 +83,14 @@ visible="true" width="20" /> </panel> - <layout_stack - animate="false" - bottom="10" - clip="false" + <button follows="left|right|top" height="24" - layout="bottomleft" - orientation="horizontal" - width="262"> - <layout_panel - auto_resize="false" - follows="left" - layout="topleft" - min_width="24" - name="microphone_icon_panel" - top="0" - user_resize="false" - width="24"> - <icon - height="24" - image_name="Microphone_On" - layout="topleft" - name="Microphone_On" - top="0" - width="24" /> - </layout_panel> - <layout_panel - auto_resize="false" - layout="topleft" - min_width="100" - name="leave_btn_panel" - top="0" - user_resize="false" - visible="false" - width="100"> - <button - follows="left|right|top" - height="24" - label="Leave Call" - left="0" - name="leave_call_btn" - top="0" - width="100" /> - </layout_panel> - </layout_stack> + label="Leave Call" + left="91" + name="leave_call_btn" + top_pad="6" + width="100" /> </panel> <avatar_list follows="all" @@ -145,4 +110,12 @@ name="non_avatar_caller" top="70" width="282" /> + <view_border + bevel_style="out" + follows="left|top|right|bottom" + height="206" + layout="topleft" + left="0" + top="63" + width="282" /> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_world_map.xml b/indra/newview/skins/default/xui/en/floater_world_map.xml index e632b67d11..169a0ea676 100644 --- a/indra/newview/skins/default/xui/en/floater_world_map.xml +++ b/indra/newview/skins/default/xui/en/floater_world_map.xml @@ -296,7 +296,7 @@ layout="topleft" name="pg_label" width="60"> - PG + General </text> <check_box @@ -330,7 +330,7 @@ layout="topleft" name="mature_label" width="66"> - Mature + Moderate </text> <check_box @@ -361,7 +361,7 @@ top_delta="2" left_pad="3" layout="topleft" - name="pg_label" + name="adult_label" width="66"> Adult </text> diff --git a/indra/newview/skins/default/xui/en/inspect_object.xml b/indra/newview/skins/default/xui/en/inspect_object.xml index cedf83f8b1..00e00b9694 100644 --- a/indra/newview/skins/default/xui/en/inspect_object.xml +++ b/indra/newview/skins/default/xui/en/inspect_object.xml @@ -92,8 +92,8 @@ This is a really long description for an object being as how it is at least 80 c height="13" left_delta="0" name="object_media_url" - top_pad="-1" - width="291" + bottom_pad="2" + width="200" max_length = "50" use_ellipses="true"> http://www.superdupertest.com diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml index 0f400777b8..d29dfa7034 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory.xml @@ -471,6 +471,14 @@ function="Inventory.DoToSelected" parameter="delete" /> </menu_item_call> + <menu_item_call + label="Delete System Folder" + layout="topleft" + name="Delete System Folder"> + <menu_item_call.on_click + function="Inventory.DoToSelected" + parameter="delete_system_folder" /> + </menu_item_call> <menu_item_separator layout="topleft" /> <menu_item_separator diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index ffb11d1737..87d1fc071d 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -4341,7 +4341,6 @@ Hmm. Gesture [NAME] is missing from the database. name="UnableToLoadGesture" type="notifytip"> Unable to load gesture [NAME]. -Please try again. </notification> <notification diff --git a/indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml b/indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml index f5fce65c73..f3a2297151 100644 --- a/indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml +++ b/indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml @@ -36,9 +36,9 @@ follows="all" height="20" label="Call" - left_delta="40" + left_delta="10" name="call_btn" - width="100" /> + width="160" /> <button bottom="40" follows="all" @@ -46,14 +46,15 @@ label="Leave Call" name="end_call_btn" visible="false" - width="100" /> + /> <button follows="all" bottom="10" height="20" label="Voice Controls" name="voice_ctrls_btn" + use_ellipses="true" visible="false" - width="100" /> + /> </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index 034f685ee9..3e2910458f 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -351,9 +351,9 @@ image_pressed_selected "Lit" + "Selected" - there are new messages and the Well height="23" image_overlay="Unread_IM" image_overlay_alignment="center" - image_pressed="WellButton_Lit_Selected" - image_pressed_selected="WellButton_Lit" - image_selected="WellButton_Lit" + image_pressed="WellButton_Lit" + image_pressed_selected="WellButton_Lit_Selected" + image_selected="PushButton_Selected_Press" label_color="Black" left="0" max_displayed_count="99" @@ -391,9 +391,9 @@ image_pressed_selected "Lit" + "Selected" - there are new messages and the Well width="35"> <button bottom_pad="3" - image_selected="WellButton_Lit" - image_pressed="WellButton_Lit_Selected" - image_pressed_selected="WellButton_Lit " + image_pressed="WellButton_Lit" + image_pressed_selected="WellButton_Lit_Selected" + image_selected="PushButton_Selected_Press" auto_resize="true" halign="center" height="23" diff --git a/indra/newview/skins/default/xui/en/panel_group_control_panel.xml b/indra/newview/skins/default/xui/en/panel_group_control_panel.xml index a5445a5783..86b30ebfce 100644 --- a/indra/newview/skins/default/xui/en/panel_group_control_panel.xml +++ b/indra/newview/skins/default/xui/en/panel_group_control_panel.xml @@ -24,9 +24,10 @@ follows="left|right|bottom" height="23" label="Group Profile" - left_delta="28" + left_delta="10" name="group_info_btn" - width="125" /> + use_ellipses="true" + width="160" /> <panel background_visible="true" bg_alpha_color="DkGray2" @@ -43,24 +44,27 @@ follows="all" height="23" label="Call Group" - left_delta="28" + left_delta="10" name="call_btn" - width="125" /> + use_ellipses="true" + width="160" /> <button bottom="40" follows="all" height="23" label="Leave Call" name="end_call_btn" + use_ellipses="true" visible="false" - width="125" /> + /> <button bottom="10" follows="all" height="23" label="Open Voice Controls" name="voice_ctrls_btn" + use_ellipses="true" visible="false" - width="125" /> + /> </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_media_settings_security.xml b/indra/newview/skins/default/xui/en/panel_media_settings_security.xml index 1f41a0d284..1f580831f9 100644 --- a/indra/newview/skins/default/xui/en/panel_media_settings_security.xml +++ b/indra/newview/skins/default/xui/en/panel_media_settings_security.xml @@ -17,7 +17,7 @@ font="SansSerifSmall" height="16" initial_value="false" - label="Only Allow Access to Specified URLs (by prefix)" + label="Only Allow Access to Specified URL patterns" left="10" mouse_opaque="true" name="whitelist_enable" @@ -81,10 +81,9 @@ height="40" left="30" text_color="0.6 0.0 0.0 1.0" + word_wrap="true" name="home_url_fails_whitelist"> -Warning: the home page specified in the General tab -fails to pass this whitelist. It has been disabled -until a valid entry has been added. +Warning: the home page specified in the General tab fails to pass this whitelist. It has been disabled until a valid entry has been added. </text> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml index e8e4a9dbb2..74265a51ca 100644 --- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml @@ -149,6 +149,7 @@ <favorites_bar follows="left|right|top" + font="SansSerif" height="15" layout="topleft" left="0" diff --git a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml index ab73f135b9..5c99022f35 100644 --- a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml @@ -69,18 +69,7 @@ name="options_gear_btn" top="6" width="18" /> - <button - follows="bottom|left" - height="18" - image_selected="AddItem_Press" - image_unselected="AddItem_Off" - image_disabled="AddItem_Disabled" - layout="topleft" - left_pad="5" - name="add_btn" - tool_tip="Add new item" - width="18" /> - <dnd_button + <dnd_button follows="bottom|left" height="18" image_selected="TrashItem_Press" @@ -92,13 +81,34 @@ top="6" width="18" /> <button - follows="top|left" - height="23" - label="Wear" + follows="bottom|left" + height="23" + label="Edit Look" layout="topleft" - name="wear_btn" - right="-5" - top_pad="0" + left="10" + name="look_edit_btn" + top="26" + visible="false" width="90" /> + <button + follows="bottom|left" + height="23" + label="Make Outfit" + layout="topleft" + name="make_outfit_btn" + tool_tip="Save appearance as an outfit" + top="26" + right="-110" + width="90" /> + <button + follows="bottom|right" + height="23" + label="Wear" + layout="topleft" + name="wear_btn" + right="-10" + top="26" + tool_tip="Wear selected outfit" + width="90" /> </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml index bffb28d16e..b14089c3a2 100644 --- a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml +++ b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml @@ -5,11 +5,12 @@ background_visible="false" height="200" layout="topleft" + help_topic="prim_media_controls" mouse_opaque="false" width="800"> <string name="control_background_image_name">Inspector_Background</string> <string name="skip_step">0.2</string> - <string name="min_width">300</string> + <string name="min_width">400</string> <string name="min_height">120</string> <string name="zoom_near_padding">1.0</string> <string name="zoom_medium_padding">1.25</string> @@ -398,6 +399,8 @@ function="MediaCtrl.ToggleMute" /> <button.mouseenter_callback function="MediaCtrl.ShowVolumeSlider" /> + <button.mouseleave_callback + function="MediaCtrl.HideVolumeSlider" /> </button> <slider orientation="vertical" @@ -413,6 +416,10 @@ volume="true"> <slider.commit_callback function="MediaCtrl.Volume"/> + <slider.mouseenter_callback + function="MediaCtrl.ShowVolumeSlider" /> + <slider.mouseleave_callback + function="MediaCtrl.HideVolumeSlider" /> </slider> </layout_panel> <panel diff --git a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml index 27f19d44fa..7f4b4aef82 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml @@ -107,6 +107,7 @@ left="0" layout="topleft" left="0" name="panel_look_info" + top="35" visible="false" /> <panel class="panel_edit_wearable" @@ -115,6 +116,7 @@ left="0" layout="topleft" left="0" name="panel_edit_wearable" + top="35" visible="false" /> </panel> diff --git a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml index 7b0b4b0bde..790f8afd3a 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml @@ -33,10 +33,10 @@ height="18" image_name="Lock" layout="topleft" - right="-50" + right="-15" mouse_opaque="true" name="IconLocked" - top="4" + top="8" width="18" /> <button follows="top|right" @@ -60,14 +60,23 @@ use_ellipses="true" value="Object Profile" width="275" /> + <text + follows="top|left" + height="13" + layout="topleft" + left="45" + name="where" + text_color="LtGray_50" + value="(Inventory)" + width="150" /> <panel follows="all" - height="500" + height="490" label="" layout="topleft" left="10" help_topic="" - top="30" + top="45" width="313" background_visible="true" bg_alpha_color="DkGray2"> @@ -125,7 +134,7 @@ layout="topleft" left="5" name="LabelCreatorTitle" -top_pad="10" + top_pad="10" width="78"> Creator: </text> @@ -135,7 +144,7 @@ top_pad="10" default_icon_name="Generic_Person" layout="topleft" left_pad="0" - top_delta="-6" + top_delta="-6" mouse_opaque="true" width="20" /> <text @@ -165,28 +174,28 @@ top_pad="10" follows="left|top" height="23" layout="topleft" - left="5" + left="5" name="LabelOwnerTitle" -top_pad="5" + top_pad="10" width="78"> Owner: </text> <avatar_icon - follows="top|left" - height="20" - default_icon_name="Generic_Person" - layout="topleft" - left_pad="0" - top_delta="-6" - mouse_opaque="true" - width="20" /> + follows="top|left" + height="20" + default_icon_name="Generic_Person" + layout="topleft" + left_pad="0" + top_delta="-6" + mouse_opaque="true" + width="20" /> <text type="string" - follows="left|right" - font="SansSerifSmall" - height="15" - layout="topleft" - left_pad="5" + follows="left|right" + font="SansSerifSmall" + height="15" + layout="topleft" + left_pad="5" name="LabelOwnerName" top_delta="6" width="140"> @@ -224,7 +233,7 @@ top_pad="10" top_delta="0" width="222"> Wed May 24 12:50:46 2006 - </text> + </text> <panel border="false" follows="left|top" @@ -350,7 +359,7 @@ top_pad="10" tool_tip="Next owner can give away or resell this object" width="106" /> </panel> - <check_box + <check_box height="18" label="For Sale" layout="topleft" @@ -388,144 +397,21 @@ top_pad="10" height="23" max_val="999999999" top_pad="10"/> - <!--line_editor - border_style="line" - border_thickness="1" - follows="left|top|right" - height="16" - layout="topleft" - left_pad="5" - max_length="25" - name="EditPrice" - top_delta="0" - width="242" /--> - <!--text - type="string" - length="1" - follows="left|top" - height="10" - layout="topleft" - left="10" - name="BaseMaskDebug" - top="155" - width="330"> - B: - </text> - <text - type="string" - length="1" - follows="left|top" - height="10" - layout="topleft" - left_delta="60" - name="OwnerMaskDebug" - top_delta="0" - width="270"> - O: - </text> - <text - type="string" - length="1" - follows="left|top" - height="10" - layout="topleft" - left_delta="60" - name="GroupMaskDebug" - top_delta="0" - width="210"> - G: - </text> - <text - type="string" - length="1" - follows="left|top" - height="10" - layout="topleft" - left_delta="60" - name="EveryoneMaskDebug" - top_delta="0" - width="150"> - E: - </text> - <text - type="string" - length="1" - follows="left|top" - height="10" - layout="topleft" - left_delta="60" - name="NextMaskDebug" - top_delta="0" - width="90"> - N: - </text--> - <!--text - type="string" - length="1" - follows="left|top" - height="10" - layout="topleft" - left="10" - name="SaleLabel" - top_pad="5" - width="330"> - Mark Item: - </text--> - <!--radio_group - draw_border="false" - follows="left|top|right" - height="16" - layout="topleft" - left_delta="78" - name="RadioSaleType" - top_delta="0" - width="252"> - <radio_item - height="16" - label="Original" - layout="topleft" - left="0" - name="radio" - top="0" - width="70" /> - <radio_item - height="16" - label="Copy" - layout="topleft" - left_delta="60" - name="radio2" - top_delta="0" - width="70" /> - </radio_group--> - <!--text - type="string" - length="1" - follows="left|top" - height="16" - layout="topleft" - left="10" - name="TextPrice" - top_pad="5" - width="78"> - Price: L$ - </text--> - </panel> + </panel> <panel - height="25" + height="30" layout="bottomright" help_topic="button_tab" name="button_panel" left="5" - bottom="5" + bottom="2" width="313"> <button - follows="bottom|right" - height="25" + height="23" label="Cancel" layout="topleft" name="cancel_btn" right="-1" - left_pad="10" width="100" /> - </panel> -</panel> + </panel> + </panel>
\ No newline at end of file diff --git a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml index 5b379b54e3..d26e855e2f 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml @@ -6,7 +6,7 @@ name="object properties" help_topic="object_properties" save_rect="true" - title="Object Properties" + title="Object Profile" width="333"> <panel.string name="text deed continued"> @@ -57,127 +57,173 @@ Mixed Sale </panel.string> <button - follows="top|right" - height="25" - image_overlay="BackArrow_Off" - layout="topleft" - name="back_btn" - picture_style="true" - right="-5" - tab_stop="false" - top="0" - width="25" /> + follows="top|right" + height="23" + image_overlay="BackArrow_Off" + layout="topleft" + left="10" + name="back_btn" + tab_stop="false" + top="0" + width="23" /> + <text + follows="top|left|right" + font="SansSerifHuge" + height="26" + layout="topleft" + left_pad="10" + name="title" + text_color="LtGray" + top="0" + use_ellipses="true" + value="Object Profile" + width="275" /> + <text + follows="top|left" + height="13" + layout="topleft" + left="45" + name="where" + text_color="LtGray_50" + value="(In World)" + width="150" /> <panel follows="all" - height="500" + height="490" label="" layout="topleft" - left="5" + left="10" help_topic="" - top="30" - border="1" - width="313"> - <text - type="string" - length="1" - follows="left|top" - height="10" - layout="topleft" - left="10" + top="45" + width="313" + background_visible="true" + bg_alpha_color="DkGray2"> + <text + type="string" + length="1" + follows="left|top" + height="10" + layout="topleft" + left="5" name="Name:" - top_pad="5" - width="90"> - Name: - </text> - <line_editor - follows="left|top|right" - height="19" - layout="topleft" - left_pad="0" - max_length="63" + top="10" + width="78"> + Name: + </text> + <line_editor + border_style="line" + border_thickness="1" + follows="left|top|right" + height="20" + layout="topleft" + left_delta="78" + max_length="63" name="Object Name" - select_on_focus="true" - top_delta="0" - width="170" /> - <text - type="string" - length="1" - follows="left|top" - height="10" - layout="topleft" - left="10" + top_delta="0" + width="225" /> + <text + type="string" + length="1" + follows="left|top" + height="10" + layout="topleft" + left="5" name="Description:" - top_pad="3" - width="90"> - Description: - </text> + top_pad="10" + width="78"> + Description: + </text> <line_editor + border_style="line" + border_thickness="1" follows="left|top|right" - height="19" + height="23" layout="topleft" - left_pad="0" - max_length="127" name="Object Description" select_on_focus="true" - top_delta="0" - width="170" /> - <text - type="string" - left="10" - length="1" - follows="left|top" - height="19" - layout="topleft" - name="Creator:" - width="90"> - Creator: - </text> - <text - type="string" - length="1" - follows="left|top" - left_pad="0" - height="19" - layout="topleft" + left_delta="78" + max_length="127" + top_delta="-5" + width="225"/> + <text + type="string" + length="1" + follows="left|top" + height="23" + layout="topleft" + left="5" + name="CreatorNameLabel" + top_pad="10" + width="78"> + Creator: + </text> + <avatar_icon + follows="top|left" + height="20" + default_icon_name="Generic_Person" + layout="topleft" + left_pad="0" + top_delta="-6" + mouse_opaque="true" + width="20" /> + <text + type="string" + follows="left|right" + font="SansSerifSmall" + height="15" + layout="topleft" + left_pad="5" name="Creator Name" - width="175"> - Esbee Linden - </text> - <text - type="string" - length="1" - left="10" - follows="left|top" - height="19" - layout="topleft" - name="Owner:" - width="90"> - Owner: - </text> - <text - type="string" - length="1" - follows="left|top" - height="19" - layout="topleft" - name="Owner Name" - left_pad="0" - width="175"> - Erica Linden - </text> - <text - type="string" - length="1" - follows="left|top" - layout="topleft" - left="10" - height="18" - name="Group:" - top_pad="4" - width="75"> - Group: - </text> - <button + top_delta="6" + width="140"> + Erica Linden + </text> + <text + type="string" + length="1" + follows="left|top" + height="23" + layout="topleft" + left="5" + name="Owner:" + top_pad="10" + width="78"> + Owner: + </text> + <avatar_icon + follows="top|left" + height="20" + default_icon_name="Generic_Person" + layout="topleft" + left_pad="0" + top_delta="-6" + mouse_opaque="true" + width="20" /> + <text + type="string" + follows="left|right" + font="SansSerifSmall" + height="15" + layout="topleft" + left_pad="5" + name="Owner Name" + top_delta="6" + width="140"> + Erica Linden + </text> + <text + type="string" + length="1" + follows="left|top" + height="23" + layout="topleft" + left="5" + name="Group_label" + top_pad="10" + width="78"> + Group: + </text> + <button follows="top|left" height="10" image_disabled="Activate_Checkmark" @@ -203,43 +249,34 @@ width="150" /> <button follows="top|left" - height="20" + height="23" label="Deed" label_selected="Deed" layout="topleft" name="button deed" top_pad="0" - left="100" + left="81" tool_tip="Deeding gives this item away with next owner permissions. Group shared objects can be deeded by a group officer." - width="80" /> - <check_box - height="19" - follows="left|top" - label="Share" - layout="topleft" - name="checkbox share with group" - tool_tip="Allow all members of the set group to share your modify permissions for this object. You must Deed to enable role restrictions." - left_pad="3" width="100" /> <text type="string" length="1" follows="left|top" - height="16" + height="9" layout="topleft" - top_pad="15" - left="10" + top_pad="5" + left="5" name="label click action" - width="90"> + width="280"> Click to: </text> <combo_box follows="left|top" - height="20" + height="23" layout="topleft" name="clickaction" width="168" - left_pad="0"> + left="81"> <combo_box.item label="Touch (default)" name="Touch/grab(default)" @@ -261,26 +298,131 @@ name="Open" value="Open" /> </combo_box> - <check_box - height="16" + <panel + border="false" + follows="left|top" + layout="topleft" + mouse_opaque="false" + background_visible="true" + bg_alpha_color="DkGray" + name="perms_inv" + left="0" + top_pad="15" + height="135" + width="313"> + <text + type="string" + length="1" + left="10" top_pad="15" - label="For Sale:" + text_color="EmphasisColor" + height="15" + follows="left|top|right" + layout="topleft" + name="perm_modify" + width="200"> + You can modify this object + </text> + <text + type="string" + length="1" + follows="left|top" + height="16" + layout="topleft" + left="10" + name="Anyone can:" + top_pad="8" + width="100"> + Anyone: + </text> + <check_box + height="18" + label="Copy" + layout="topleft" + left_pad="0" + name="checkbox allow everyone copy" + top_delta="-2" + width="90" /> + <check_box + height="18" + label="Move" layout="topleft" + name="checkbox allow everyone move" + left_pad="0" + width="150" /> + <text + type="string" + length="1" + follows="left|top" + height="16" + layout="topleft" + left="10" + name="GroupLabel" + top_pad="8" + width="100"> + Group: + </text> + <check_box + height="18" + label="Share" + layout="topleft" + left_pad="90" + top_delta="-2" + name="checkbox share with group" + tool_tip="Allow all members of the set group to share your modify permissions for this object. You must Deed to enable role restrictions." + width="150" /> + <text + type="string" + length="1" + follows="left|top" + height="16" + layout="topleft" + left="10" + name="NextOwnerLabel" + top_pad="8" + width="200" + word_wrap="true"> + Next owner: + </text> + <check_box + height="18" + label="Modify" + layout="topleft" + left="20" + top_pad="0" + name="checkbox next owner can modify" + width="90" /> + <check_box + height="18" + label="Copy" + layout="topleft" + left_pad="0" + name="checkbox next owner can copy" + width="90" /> + <check_box + height="18" + label="Transfer" + layout="topleft" + left_pad="0" + name="checkbox next owner can transfer" + tool_tip="Next owner can give away or resell this object" + width="106" /> + </panel> + <check_box + height="23" + label="For Sale" + layout="topleft" + left="20" name="checkbox for sale" - left="10" - width="90" /> -<!-- NEW SALE TYPE COMBO BOX --> - <combo_box - left_pad="0" - layout="topleft" - follows="left|top" - allow_text_entry="false" - height="20" - intial_value="2" - max_chars="20" - mouse_opaque="true" + top_pad="10" + width="100" /> + <combo_box + height="23" + left_pad="0" + layout="topleft" + follows="left|top" name="sale type" - width="158"> + width="170"> <combo_box.item name="Copy" label="Copy" @@ -293,14 +435,13 @@ name="Original" label="Original" value="1" /> - </combo_box> -<!-- NEW PRICE SPINNER --> - <spinner + </combo_box> + <spinner follows="left|top" decimal_digits="0" increment="1" - top_pad="8" - left="100" + top_pad="10" + left="120" control_name="Edit Cost" name="Edit Cost" label="Price: L$" @@ -310,106 +451,25 @@ height="20" max_val="999999999" /> <check_box - height="15" + height="20" width="110" - top_pad="3" + top_pad="6" label="Show in search" layout="topleft" - left="100" + left="120" name="search_check" tool_tip="Let people see this object in search results" /> - <panel - border="false" - follows="left|top" - layout="topleft" - mouse_opaque="false" - background_visible="true" - bg_alpha_color="DkGray" - name="perms_build" - left="0" - top="241" - height="120" - width="278"> - <text - type="string" - length="1" - left="10" - top_pad="9" - text_color="EmphasisColor" - height="16" - follows="left|top|right" - layout="topleft" - name="perm_modify" - width="250"> - You can modify this object - </text> - <text - type="string" - follows="left|top" - name="Anyone can:" - width="250" - left="10"> - Anyone: - </text> - <check_box - height="19" - label="Move" - layout="topleft" - name="checkbox allow everyone move" - left="15" - width="85" /> - <check_box - height="19" - label="Copy" - layout="topleft" - left_pad="0" - name="checkbox allow everyone copy" - width="90" /> - <text - type="string" - follows="left|top" - height="19" - name="Next owner can:" - width="250" - left="10"> - Next owner: - </text> - <check_box - follows="left|top|right" - label="Modify" - layout="topleft" - left="15" - name="checkbox next owner can modify" - width="85" /> - <check_box - follows="left|top|right" - height="19" - label="Copy" - layout="topleft" - left_pad="0" - name="checkbox next owner can copy" - width="90" /> - <check_box - follows="left|top|right" - height="19" - label="Transfer" - layout="topleft" - name="checkbox next owner can transfer" - left_pad="0" - top_delta="0" - tool_tip="Next owner can give away or resell this object" - width="90" /> <text type="string" text_color="EmphasisColor" length="1" - top_pad="5" + top_pad="15" follows="left|top" layout="topleft" left="10" name="B:" height="10" - width="45"> + width="50"> B: </text> <text @@ -421,7 +481,7 @@ left_pad="0" name="O:" height="10" - width="44"> + width="50"> O: </text> <text @@ -433,7 +493,7 @@ left_pad="0" name="G:" height="10" - width="43"> + width="50"> G: </text> <text @@ -445,7 +505,7 @@ layout="topleft" name="E:" height="10" - width="43"> + width="50"> E: </text> <text @@ -457,7 +517,7 @@ left_pad="0" name="N:" height="10" - width="48"> + width="50"> N: </text> <text @@ -473,7 +533,6 @@ F: </text> </panel> - </panel> <panel height="25" layout="bottomright" @@ -484,30 +543,30 @@ width="313"> <button follows="bottom|left" - height="25" + height="23" label="Open" layout="topleft" left="5" name="open_btn" top="0" - width="60" /> + width="100" /> <button follows="bottom|left" - height="25" + height="23" label="Pay" layout="topleft" left_pad="5" name="pay_btn" top="0" - width="50" /> + width="100" /> <button follows="bottom|left" - height="25" + height="23" label="Buy" layout="topleft" left_pad="5" name="buy_btn" top="0" - width="60" /> + width="100" /> </panel> </panel>
\ No newline at end of file diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index ec4723bd55..1ab2507232 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2929,4 +2929,10 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="close_on_no_ability"> You no longer have the ability to be in the chat session. </string> + <string name="unread_chat_single"> + [SOURCES] has said something new + </string>" + <string name="unread_chat_multiple"> + [SOURCES] have said something new + </string>" </strings> diff --git a/indra/newview/skins/default/xui/en/widgets/chat_history.xml b/indra/newview/skins/default/xui/en/widgets/chat_history.xml index 2be37d222a..8785dff2ae 100644 --- a/indra/newview/skins/default/xui/en/widgets/chat_history.xml +++ b/indra/newview/skins/default/xui/en/widgets/chat_history.xml @@ -11,9 +11,13 @@ top_header_pad="17" bottom_header_pad="10" max_length="2147483647" - enabled="false" track_bottom="true" name="chat_history" type="string" word_wrap="true" - font="SansSerif"/> + font="SansSerif"> + <more_chat_text + mouse_opaque="true" + word_wrap="true" + /> +</chat_history> diff --git a/indra/newview/skins/default/xui/en/widgets/tab_container.xml b/indra/newview/skins/default/xui/en/widgets/tab_container.xml index 3368fa88ef..3f5a4b8379 100644..100755 --- a/indra/newview/skins/default/xui/en/widgets/tab_container.xml +++ b/indra/newview/skins/default/xui/en/widgets/tab_container.xml @@ -20,12 +20,12 @@ label_pad_left - padding to the left of tab button labels tab_top_image_selected="TabTop_Middle_Selected" tab_bottom_image_unselected="Toolbar_Middle_Off" tab_bottom_image_selected="Toolbar_Middle_Selected" - tab_left_image_unselected="TabTop_Middle_Off" - tab_left_image_selected="TabTop_Middle_Selected"/> + tab_left_image_unselected="SegmentedBtn_Left_Disabled" + tab_left_image_selected="SegmentedBtn_Left_Off"/> <last_tab tab_top_image_unselected="TabTop_Right_Off" tab_top_image_selected="TabTop_Right_Selected" tab_bottom_image_unselected="Toolbar_Right_Off" tab_bottom_image_selected="Toolbar_Right_Selected" - tab_left_image_unselected="TabTop_Middle_Off" - tab_left_image_selected="TabTop_Middle_Selected"/> + tab_left_image_unselected="SegmentedBtn_Left_Disabled" + tab_left_image_selected="SegmentedBtn_Left_Off"/> </tab_container> diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp index 02c13716ed..018f691672 100644 --- a/indra/viewer_components/login/lllogin.cpp +++ b/indra/viewer_components/login/lllogin.cpp @@ -222,13 +222,15 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD credential // Still Downloading -- send progress update. sendProgressEvent("offline", "downloading"); } + + LL_DEBUGS("LLLogin") << "Auth Response: " << mAuthResponse << LL_ENDL; status = mAuthResponse["status"].asString(); // Okay, we've received our final status event for this // request. Unless we got a redirect response, break the retry // loop for the current rewrittenURIs entry. - if (! (status == "Complete" && - mAuthResponse["responses"]["login"].asString() == "indeterminate")) + if (!(status == "Complete" && + mAuthResponse["responses"]["login"].asString() == "indeterminate")) { break; } @@ -237,8 +239,8 @@ void LLLogin::Impl::login_(LLCoros::self& self, std::string uri, LLSD credential // to some other URI ("indeterminate" -- why not "redirect"?). // The response should contain another uri to try, with its // own auth method. - request["uri"] = mAuthResponse["next_url"]; - request["method"] = mAuthResponse["next_method"]; + request["uri"] = mAuthResponse["responses"]["next_url"].asString(); + request["method"] = mAuthResponse["responses"]["next_method"].asString(); } // loop back to try the redirected URI // Here we're done with redirects for the current rewrittenURIs diff --git a/indra/viewer_components/login/tests/lllogin_test.cpp b/indra/viewer_components/login/tests/lllogin_test.cpp index 69a8424e87..7159959a4f 100644 --- a/indra/viewer_components/login/tests/lllogin_test.cpp +++ b/indra/viewer_components/login/tests/lllogin_test.cpp @@ -311,14 +311,15 @@ namespace tut data["error"] = "dummy response"; data["transfer_rate"] = 0; data["responses"]["login"] = "indeterminate"; - data["next_url"] = "login.indeterminate.com"; - data["next_method"] = "test_login_method"; + data["responses"]["next_url"] = "login.indeterminate.com"; + data["responses"]["next_method"] = "test_login_method"; dummyXMLRPC.setResponse(data); dummyXMLRPC.sendReply(); ensure_equals("Fail back to authenticate 2", listener.lastEvent()["change"].asString(), "authenticating"); ensure_equals("Attempt 3", listener.lastEvent()["data"]["attempt"].asInteger(), 3); ensure_equals("URI 3", listener.lastEvent()["data"]["request"]["uri"].asString(), "login.indeterminate.com"); + ensure_equals("Method 3", listener.lastEvent()["data"]["request"]["method"].asString(), "test_login_method"); // Finally let the auth succeed. data.clear(); |