From 87b079bd6b22f03a108cba3cff9e4d8570131ba9 Mon Sep 17 00:00:00 2001 From: richard Date: Thu, 22 Oct 2009 17:38:26 -0700 Subject: fix for text history being lost when closing chat history floater reviewed by James --- indra/newview/skins/default/xui/en/floater_nearby_chat.xml | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_nearby_chat.xml b/indra/newview/skins/default/xui/en/floater_nearby_chat.xml index 90c5463aa7..b5a89d53e8 100644 --- a/indra/newview/skins/default/xui/en/floater_nearby_chat.xml +++ b/indra/newview/skins/default/xui/en/floater_nearby_chat.xml @@ -11,6 +11,7 @@ save_rect="true" title="Nearby Chat" save_visibility="true" + single_instance="true" width="320"> Date: Thu, 22 Oct 2009 18:09:07 -0700 Subject: Ext-1110 - Unable to select whole text by mouse in the text widget --- indra/newview/llchathistory.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index ebf46a6e3f..94058365be 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -101,12 +101,12 @@ void LLChatHistory::appendWidgetMessage(const LLUUID& avatar_id, std::string& fr if (mLastFromName == from) { view = getSeparator(); - view_text = " "; + view_text = "\n"; } else { view = getHeader(avatar_id, from, time); - view_text = "\n" + from + MESSAGE_USERNAME_DATE_SEPARATOR + time; + view_text = from + MESSAGE_USERNAME_DATE_SEPARATOR + time + '\n'; } //Prepare the rect for the view LLRect target_rect = getDocumentView()->getRect(); @@ -118,7 +118,8 @@ void LLChatHistory::appendWidgetMessage(const LLUUID& avatar_id, std::string& fr appendWidget(view, view_text, FALSE, TRUE, mLeftWidgetPad, 0); //Append the text message - appendText(message, TRUE, style_params); + message += '\n'; + appendText(message, FALSE, style_params); mLastFromName = from; blockUndo(); -- cgit v1.2.3 From 376deff7a3c93dc162d047f54f9eed97ad2eba6a Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Fri, 23 Oct 2009 14:28:21 -0700 Subject: Changes to match new version of llqtwebkit -- passing modifier keys through to most user events and using new scroll wheel event. --- indra/newview/llmediactrl.cpp | 54 ++++++++++++++++++++++++++++++++---- indra/newview/llmediactrl.h | 2 ++ indra/newview/lltoolpie.cpp | 5 ++-- indra/newview/llviewermedia.cpp | 37 +++++++++++++----------- indra/newview/llviewermedia.h | 14 +++++----- indra/newview/llviewermediafocus.cpp | 2 +- 6 files changed, 83 insertions(+), 31 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index 15efd0100a..8f29f908e5 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -51,6 +51,7 @@ #include "llpluginclassmedia.h" #include "llslurl.h" #include "lluictrlfactory.h" // LLDefaultChildRegistry +#include "llkeyboard.h" // linden library includes #include "llfocusmgr.h" @@ -193,7 +194,7 @@ BOOL LLMediaCtrl::handleHover( S32 x, S32 y, MASK mask ) if (mMediaSource) { - mMediaSource->mouseMove(x, y); + mMediaSource->mouseMove(x, y, mask); gViewerWindow->setCursor(mMediaSource->getLastSetCursor()); } @@ -205,7 +206,7 @@ BOOL LLMediaCtrl::handleHover( S32 x, S32 y, MASK mask ) BOOL LLMediaCtrl::handleScrollWheel( S32 x, S32 y, S32 clicks ) { if (mMediaSource && mMediaSource->hasMedia()) - mMediaSource->getMediaPlugin()->scrollEvent(0, clicks, MASK_NONE); + mMediaSource->getMediaPlugin()->scrollEvent(0, clicks, gKeyboard->currentMask(TRUE)); return TRUE; } @@ -218,7 +219,7 @@ BOOL LLMediaCtrl::handleMouseUp( S32 x, S32 y, MASK mask ) if (mMediaSource) { - mMediaSource->mouseUp(x, y); + mMediaSource->mouseUp(x, y, mask); // *HACK: LLMediaImplLLMozLib automatically takes focus on mouseup, // in addition to the onFocusReceived() call below. Undo this. JC @@ -241,7 +242,50 @@ BOOL LLMediaCtrl::handleMouseDown( S32 x, S32 y, MASK mask ) convertInputCoords(x, y); if (mMediaSource) - mMediaSource->mouseDown(x, y); + mMediaSource->mouseDown(x, y, mask); + + gFocusMgr.setMouseCapture( this ); + + if (mTakeFocusOnClick) + { + setFocus( TRUE ); + } + + return TRUE; +} + +//////////////////////////////////////////////////////////////////////////////// +// +BOOL LLMediaCtrl::handleRightMouseUp( S32 x, S32 y, MASK mask ) +{ + convertInputCoords(x, y); + + if (mMediaSource) + { + mMediaSource->mouseUp(x, y, mask, 1); + + // *HACK: LLMediaImplLLMozLib automatically takes focus on mouseup, + // in addition to the onFocusReceived() call below. Undo this. JC + if (!mTakeFocusOnClick) + { + mMediaSource->focus(false); + gViewerWindow->focusClient(); + } + } + + gFocusMgr.setMouseCapture( NULL ); + + return TRUE; +} + +//////////////////////////////////////////////////////////////////////////////// +// +BOOL LLMediaCtrl::handleRightMouseDown( S32 x, S32 y, MASK mask ) +{ + convertInputCoords(x, y); + + if (mMediaSource) + mMediaSource->mouseDown(x, y, mask, 1); gFocusMgr.setMouseCapture( this ); @@ -260,7 +304,7 @@ BOOL LLMediaCtrl::handleDoubleClick( S32 x, S32 y, MASK mask ) convertInputCoords(x, y); if (mMediaSource) - mMediaSource->mouseLeftDoubleClick( x, y ); + mMediaSource->mouseDoubleClick( x, y, mask); gFocusMgr.setMouseCapture( this ); diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h index 5ea03f1e6c..76ddc61ebf 100644 --- a/indra/newview/llmediactrl.h +++ b/indra/newview/llmediactrl.h @@ -86,6 +86,8 @@ public: virtual BOOL handleHover( S32 x, S32 y, MASK mask ); virtual BOOL handleMouseUp( S32 x, S32 y, MASK mask ); virtual BOOL handleMouseDown( S32 x, S32 y, MASK mask ); + virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); + virtual BOOL handleRightMouseUp(S32 x, S32 y, MASK mask); virtual BOOL handleDoubleClick( S32 x, S32 y, MASK mask ); virtual BOOL handleScrollWheel( S32 x, S32 y, S32 clicks ); diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index b035fd53fd..22ed1ec219 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -48,6 +48,7 @@ #include "lltooltip.h" #include "llhudeffecttrail.h" #include "llhudmanager.h" +#include "llkeyboard.h" #include "llmediaentry.h" #include "llmenugl.h" #include "llmutelist.h" @@ -1048,7 +1049,7 @@ bool LLToolPie::handleMediaClick(const LLPickInfo& pick) } else { - media_impl->mouseDown(pick.mUVCoords); + media_impl->mouseDown(pick.mUVCoords, gKeyboard->currentMask(TRUE)); mMediaMouseCaptureID = mep->getMediaID(); setMouseCapture(TRUE); // This object will send a mouse-up to the media when it loses capture. } @@ -1098,7 +1099,7 @@ bool LLToolPie::handleMediaHover(const LLPickInfo& pick) // If this is the focused media face, send mouse move events. if (LLViewerMediaFocus::getInstance()->isFocusedOnFace(objectp, pick.mObjectFace)) { - media_impl->mouseMove(pick.mUVCoords); + media_impl->mouseMove(pick.mUVCoords, gKeyboard->currentMask(TRUE)); gViewerWindow->setCursor(media_impl->getLastSetCursor()); } else diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 5967b68e51..437a5ec770 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -48,6 +48,7 @@ #include "llevent.h" // LLSimpleListener #include "llnotifications.h" #include "lluuid.h" +#include "llkeyboard.h" #include // for SkinFolder listener #include @@ -792,6 +793,7 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type) media_source->setLoop(mMediaLoop); media_source->setAutoScale(mMediaAutoScale); media_source->setBrowserUserAgent(LLViewerMedia::getCurrentUserAgent()); + media_source->focus(mHasFocus); mMediaSource = media_source; return true; @@ -917,7 +919,7 @@ bool LLViewerMediaImpl::hasFocus() const } ////////////////////////////////////////////////////////////////////////////////////////// -void LLViewerMediaImpl::mouseDown(S32 x, S32 y) +void LLViewerMediaImpl::mouseDown(S32 x, S32 y, MASK mask, S32 button) { scaleMouse(&x, &y); mLastMouseX = x; @@ -925,12 +927,12 @@ void LLViewerMediaImpl::mouseDown(S32 x, S32 y) // llinfos << "mouse down (" << x << ", " << y << ")" << llendl; if (mMediaSource) { - mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_DOWN, x, y, 0); + mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_DOWN, button, x, y, mask); } } ////////////////////////////////////////////////////////////////////////////////////////// -void LLViewerMediaImpl::mouseUp(S32 x, S32 y) +void LLViewerMediaImpl::mouseUp(S32 x, S32 y, MASK mask, S32 button) { scaleMouse(&x, &y); mLastMouseX = x; @@ -938,12 +940,12 @@ void LLViewerMediaImpl::mouseUp(S32 x, S32 y) // llinfos << "mouse up (" << x << ", " << y << ")" << llendl; if (mMediaSource) { - mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_UP, x, y, 0); + mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_UP, button, x, y, mask); } } ////////////////////////////////////////////////////////////////////////////////////////// -void LLViewerMediaImpl::mouseMove(S32 x, S32 y) +void LLViewerMediaImpl::mouseMove(S32 x, S32 y, MASK mask) { scaleMouse(&x, &y); mLastMouseX = x; @@ -951,50 +953,53 @@ void LLViewerMediaImpl::mouseMove(S32 x, S32 y) // llinfos << "mouse move (" << x << ", " << y << ")" << llendl; if (mMediaSource) { - mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_MOVE, x, y, 0); + mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_MOVE, 0, x, y, mask); } } ////////////////////////////////////////////////////////////////////////////////////////// -void LLViewerMediaImpl::mouseDown(const LLVector2& texture_coords) +void LLViewerMediaImpl::mouseDown(const LLVector2& texture_coords, MASK mask, S32 button) { if(mMediaSource) { mouseDown( llround(texture_coords.mV[VX] * mMediaSource->getTextureWidth()), - llround((1.0f - texture_coords.mV[VY]) * mMediaSource->getTextureHeight())); + llround((1.0f - texture_coords.mV[VY]) * mMediaSource->getTextureHeight()), + mask, button); } } -void LLViewerMediaImpl::mouseUp(const LLVector2& texture_coords) +void LLViewerMediaImpl::mouseUp(const LLVector2& texture_coords, MASK mask, S32 button) { if(mMediaSource) { mouseUp( llround(texture_coords.mV[VX] * mMediaSource->getTextureWidth()), - llround((1.0f - texture_coords.mV[VY]) * mMediaSource->getTextureHeight())); + llround((1.0f - texture_coords.mV[VY]) * mMediaSource->getTextureHeight()), + mask, button); } } -void LLViewerMediaImpl::mouseMove(const LLVector2& texture_coords) +void LLViewerMediaImpl::mouseMove(const LLVector2& texture_coords, MASK mask) { if(mMediaSource) { mouseMove( llround(texture_coords.mV[VX] * mMediaSource->getTextureWidth()), - llround((1.0f - texture_coords.mV[VY]) * mMediaSource->getTextureHeight())); + llround((1.0f - texture_coords.mV[VY]) * mMediaSource->getTextureHeight()), + mask); } } ////////////////////////////////////////////////////////////////////////////////////////// -void LLViewerMediaImpl::mouseLeftDoubleClick(S32 x, S32 y) +void LLViewerMediaImpl::mouseDoubleClick(S32 x, S32 y, MASK mask, S32 button) { scaleMouse(&x, &y); mLastMouseX = x; mLastMouseY = y; if (mMediaSource) { - mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_DOUBLE_CLICK, x, y, 0); + mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_DOUBLE_CLICK, button, x, y, mask); } } @@ -1003,7 +1008,7 @@ void LLViewerMediaImpl::onMouseCaptureLost() { if (mMediaSource) { - mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_UP, mLastMouseX, mLastMouseY, 0); + mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_UP, 0, mLastMouseX, mLastMouseY, 0); } } @@ -1240,7 +1245,7 @@ bool LLViewerMediaImpl::handleUnicodeCharHere(llwchar uni_char) if (uni_char >= 32 // discard 'control' characters && uni_char != 127) // SDL thinks this is 'delete' - yuck. { - mMediaSource->textInput(wstring_to_utf8str(LLWString(1, uni_char))); + mMediaSource->textInput(wstring_to_utf8str(LLWString(1, uni_char)), gKeyboard->currentMask(FALSE)); } } diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index fc2776ee91..01640de33a 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -133,13 +133,13 @@ public: void focus(bool focus); // True if the impl has user focus. bool hasFocus() const; - void mouseDown(S32 x, S32 y); - void mouseUp(S32 x, S32 y); - void mouseMove(S32 x, S32 y); - void mouseDown(const LLVector2& texture_coords); - void mouseUp(const LLVector2& texture_coords); - void mouseMove(const LLVector2& texture_coords); - void mouseLeftDoubleClick(S32 x,S32 y ); + void mouseDown(S32 x, S32 y, MASK mask, S32 button = 0); + void mouseUp(S32 x, S32 y, MASK mask, S32 button = 0); + void mouseMove(S32 x, S32 y, MASK mask); + void mouseDown(const LLVector2& texture_coords, MASK mask, S32 button = 0); + void mouseUp(const LLVector2& texture_coords, MASK mask, S32 button = 0); + void mouseMove(const LLVector2& texture_coords, MASK mask); + void mouseDoubleClick(S32 x,S32 y, MASK mask, S32 button = 0); void mouseCapture(); void navigateBack(); diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp index cad8b5f0ce..ad48ec145b 100644 --- a/indra/newview/llviewermediafocus.cpp +++ b/indra/newview/llviewermediafocus.cpp @@ -77,7 +77,6 @@ void LLViewerMediaFocus::setFocusFace(LLPointer objectp, S32 fac if (media_impl.notNull() && objectp.notNull()) { bool face_auto_zoom = false; - media_impl->focus(true); mFocusedImplID = media_impl->getMediaTextureID(); mFocusedObjectID = objectp->getID(); @@ -101,6 +100,7 @@ void LLViewerMediaFocus::setFocusFace(LLPointer objectp, S32 fac llwarns << "Can't find media entry for focused face" << llendl; } + media_impl->focus(true); gFocusMgr.setKeyboardFocus(this); // We must do this before processing the media HUD zoom, or it may zoom to the wrong face. -- cgit v1.2.3 From 576b8fe6ec9aa4ad712de757341862c89ff7df36 Mon Sep 17 00:00:00 2001 From: Neal Orman Date: Fri, 23 Oct 2009 22:19:15 +0000 Subject: EXT-1809 Wearing an item doesn't update avatar Two part fix: prevented the copying of wearable parameters to the avatar to trigger a rebake. Then: Called wearableUpdated every time a wearable was added/removed/replaced and ensured it properly invalidated the composite Confirmed working fix on developer machine. Code reviewed by Seraph. --- indra/newview/llagentwearables.cpp | 6 +++++- indra/newview/llagentwearables.h | 1 + indra/newview/lltexlayerparams.cpp | 17 ++++++++++------- indra/newview/lltexlayerparams.h | 1 + indra/newview/llvoavatarself.cpp | 3 +-- 5 files changed, 18 insertions(+), 10 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index b976e6b2bd..b9a0b4293d 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -649,6 +649,7 @@ void LLAgentWearables::setWearable(const EWearableType type, U32 index, LLWearab else { wearable_vec[index] = wearable; + mAvatarObject->wearableUpdated(wearable->getType()); } } @@ -663,6 +664,7 @@ U32 LLAgentWearables::pushWearable(const EWearableType type, LLWearable *wearabl if (type < WT_COUNT || mWearableDatas[type].size() < MAX_WEARABLES_PER_TYPE) { mWearableDatas[type].push_back(wearable); + mAvatarObject->wearableUpdated(wearable->getType()); return mWearableDatas[type].size()-1; } return MAX_WEARABLES_PER_TYPE; @@ -687,9 +689,11 @@ void LLAgentWearables::popWearable(LLWearable *wearable) void LLAgentWearables::popWearable(const EWearableType type, U32 index) { - if (getWearable(type, index)) + LLWearable *wearable = getWearable(type, index); + if (wearable) { mWearableDatas[type].erase(mWearableDatas[type].begin() + index); + mAvatarObject->wearableUpdated(wearable->getType()); } } diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index 8e1bef88c3..667cb94552 100644 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -114,6 +114,7 @@ public: void setWearableName(const LLUUID& item_id, const std::string& new_name); void addLocalTextureObject(const EWearableType wearable_type, const LLVOAvatarDefines::ETextureIndex texture_type, U32 wearable_index); U32 getWearableIndex(LLWearable *wearable); + protected: void setWearableFinal(LLInventoryItem* new_item, LLWearable* new_wearable, bool do_append = false); static bool onSetWearableDialog(const LLSD& notification, const LLSD& response, LLWearable* wearable); diff --git a/indra/newview/lltexlayerparams.cpp b/indra/newview/lltexlayerparams.cpp index ca888899ed..e1643af71d 100644 --- a/indra/newview/lltexlayerparams.cpp +++ b/indra/newview/lltexlayerparams.cpp @@ -42,7 +42,8 @@ //----------------------------------------------------------------------------- LLTexLayerParam::LLTexLayerParam(LLTexLayerInterface *layer) : mTexLayer(layer), - mAvatar(NULL) + mAvatar(NULL), + mIsWearableParam(TRUE) { if (mTexLayer != NULL) { @@ -55,7 +56,8 @@ LLTexLayerParam::LLTexLayerParam(LLTexLayerInterface *layer) : } LLTexLayerParam::LLTexLayerParam(LLVOAvatar *avatar) : - mTexLayer(NULL) + mTexLayer(NULL), + mIsWearableParam(FALSE) { mAvatar = avatar; } @@ -175,16 +177,15 @@ void LLTexLayerParamAlpha::setWeight(F32 weight, BOOL set_by_user) { mCurWeight = new_weight; - LLVOAvatar* avatar = mTexLayer->getTexLayerSet()->getAvatar(); - if (avatar->getSex() & getSex()) + if ((mAvatar->getSex() & getSex()) && !mIsWearableParam) // only trigger a baked texture update if we're changing a wearable's visual param. { if (gAgent.cameraCustomizeAvatar()) { set_by_user = FALSE; } - avatar->invalidateComposite(mTexLayer->getTexLayerSet(), set_by_user); + mAvatar->invalidateComposite(mTexLayer->getTexLayerSet(), set_by_user); mTexLayer->invalidateMorphMasks(); - avatar->updateMeshTextures(); + mAvatar->updateMeshTextures(); } } } @@ -467,14 +468,16 @@ void LLTexLayerParamColor::setWeight(F32 weight, BOOL set_by_user) return; } - if (mAvatar->getSex() & getSex()) + if ((mAvatar->getSex() & getSex()) && !mIsWearableParam) // only trigger a baked texture update if we're changing a wearable's visual param. { onGlobalColorChanged(set_by_user); if (mTexLayer) { mAvatar->invalidateComposite(mTexLayer->getTexLayerSet(), set_by_user); + mAvatar->updateMeshTextures(); } } + // llinfos << "param " << mName << " = " << new_weight << llendl; } } diff --git a/indra/newview/lltexlayerparams.h b/indra/newview/lltexlayerparams.h index 98365864f9..dcb108bbf6 100644 --- a/indra/newview/lltexlayerparams.h +++ b/indra/newview/lltexlayerparams.h @@ -49,6 +49,7 @@ public: protected: LLTexLayerInterface* mTexLayer; LLVOAvatar* mAvatar; + BOOL mIsWearableParam; }; //----------------------------------------------------------------------------- diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index d05e55a501..964b16df04 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -962,8 +962,7 @@ void LLVOAvatarSelf::wearableUpdated( EWearableType type ) { if (mBakedTextureDatas[index].mTexLayerSet) { - mBakedTextureDatas[index].mTexLayerSet->requestUpdate(); - mBakedTextureDatas[index].mTexLayerSet->requestUpload(); + invalidateComposite(mBakedTextureDatas[index].mTexLayerSet, TRUE); } break; } -- cgit v1.2.3 From 3008b3fdc09fce6509c6194588b65ffbf3a21925 Mon Sep 17 00:00:00 2001 From: callum Date: Fri, 23 Oct 2009 16:19:04 -0700 Subject: Main change is pointing install.xml for Windows to new version of LLQtWebKit that has DLLs with no manifest as per recent build change. Tweaked bookamrks for test app too. Finally, added fix for DEV-41392 (Home URL Preview should be next to the Home URL) --- indra/newview/llpanelmediasettingsgeneral.cpp | 8 ++--- .../xui/en/panel_media_settings_general.xml | 42 +++++++++++----------- 2 files changed, 25 insertions(+), 25 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp index f9dde03451..6a3617f008 100644 --- a/indra/newview/llpanelmediasettingsgeneral.cpp +++ b/indra/newview/llpanelmediasettingsgeneral.cpp @@ -207,7 +207,7 @@ void LLPanelMediaSettingsGeneral::clearValues( void* userdata, bool editable) self->mHeightPixels ->setEnabled(editable); self->mHomeURL ->setEnabled(editable); self->mWidthPixels ->setEnabled(editable); - self->mPreviewMedia->unloadMediaSource(); + self->updateMediaPreview(); } //////////////////////////////////////////////////////////////////////////////// @@ -312,10 +312,10 @@ void LLPanelMediaSettingsGeneral::updateMediaPreview() mPreviewMedia->navigateTo( mHomeURL->getValue().asString() ); } else - // new home URL will be empty if media is deleted but - // we still need to clean out the preview. + // new home URL will be empty if media is deleted so display a + // "preview goes here" data url page { - mPreviewMedia->unloadMediaSource(); + mPreviewMedia->navigateTo( "data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22100%%22 height=%22100%%22 %3E%3Cdefs%3E%3Cpattern id=%22checker%22 patternUnits=%22userSpaceOnUse%22 x=%220%22 y=%220%22 width=%22128%22 height=%22128%22 viewBox=%220 0 128 128%22 %3E%3Crect x=%220%22 y=%220%22 width=%2264%22 height=%2264%22 fill=%22#ddddff%22 /%3E%3Crect x=%2264%22 y=%2264%22 width=%2264%22 height=%2264%22 fill=%22#ddddff%22 /%3E%3C/pattern%3E%3C/defs%3E%3Crect x=%220%22 y=%220%22 width=%22100%%22 height=%22100%%22 fill=%22url(#checker)%22 /%3E%3C/svg%3E" ); }; } diff --git a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml index f9e4b9e7c0..cc47e99c2c 100644 --- a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml +++ b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml @@ -32,6 +32,27 @@ + + + + + Preview + + - - - - - Preview - - Date: Sat, 24 Oct 2009 07:58:31 +0800 Subject: EXT-1305 Hook up Script Error preferences -- reviewed by james --- indra/newview/app_settings/settings.xml | 33 ++++++++++++++-------- indra/newview/llfloaterchat.cpp | 18 ++++++------ indra/newview/llnearbychat.cpp | 12 ++++---- indra/newview/llnearbychathandler.cpp | 12 ++++++++ .../default/xui/en/panel_preferences_advanced.xml | 4 +-- indra/newview/skins/default/xui/en/strings.xml | 2 +- 6 files changed, 54 insertions(+), 27 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index eb045349c2..3682d48577 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -7340,17 +7340,6 @@ Value 0 - ScriptErrorsAsChat - - Comment - Display script errors and warning in chat history - Persist - 1 - Type - Boolean - Value - 0 - ScriptHelpFollowsCursor Comment @@ -7664,6 +7653,28 @@ Boolean Value 1 + + ShowScriptErrors + + Comment + Show script errors + Persist + 1 + Type + Boolean + Value + 1 + + ShowScriptErrorsLocation + + Comment + Show script error in chat or window + Persist + 1 + Type + S32 + Value + 0 ShowSnapshotButton diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp index 6d2e959352..86abebe7ce 100644 --- a/indra/newview/llfloaterchat.cpp +++ b/indra/newview/llfloaterchat.cpp @@ -204,12 +204,14 @@ void LLFloaterChat::addChatHistory(const LLChat& chat, bool log_to_file) if (chat.mChatType == CHAT_TYPE_DEBUG_MSG) { - LLFloaterScriptDebug::addScriptLine(chat.mText, - chat.mFromName, - color, - chat.mFromID); - if (!gSavedSettings.getBOOL("ScriptErrorsAsChat")) + if(gSavedSettings.getBOOL("ShowScriptErrors") == FALSE) + return; + if (gSavedSettings.getS32("ShowScriptErrorsLocation") == 1) { + LLFloaterScriptDebug::addScriptLine(chat.mText, + chat.mFromName, + color, + chat.mFromID); return; } } @@ -315,9 +317,9 @@ void LLFloaterChat::addChat(const LLChat& chat, { LLColor4 text_color = get_text_color(chat); - BOOL invisible_script_debug_chat = - chat.mChatType == CHAT_TYPE_DEBUG_MSG - && !gSavedSettings.getBOOL("ScriptErrorsAsChat"); + BOOL invisible_script_debug_chat = ((gSavedSettings.getBOOL("ShowScriptErrors") == FALSE) || + (chat.mChatType == CHAT_TYPE_DEBUG_MSG + && (gSavedSettings.getS32("ShowScriptErrorsLocation") == 1))); if (!invisible_script_debug_chat && !chat.mMuted diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index bbab9944f3..148f72703c 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -222,12 +222,14 @@ void LLNearbyChat::addMessage(const LLChat& chat) if (chat.mChatType == CHAT_TYPE_DEBUG_MSG) { - LLFloaterScriptDebug::addScriptLine(chat.mText, - chat.mFromName, - color, - chat.mFromID); - if (!gSavedSettings.getBOOL("ScriptErrorsAsChat")) + if(gSavedSettings.getBOOL("ShowScriptErrors") == FALSE) + return; + if (gSavedSettings.getS32("ShowScriptErrorsLocation")== 1)// show error in window //("ScriptErrorsAsChat")) { + LLFloaterScriptDebug::addScriptLine(chat.mText, + chat.mFromName, + color, + chat.mFromID); return; } } diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index 4aefbd1a33..6b0d6d61e0 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -188,6 +188,17 @@ void LLNearbyChatScreenChannel::addNotification(LLSD& notification) return; } + int chat_type = notification["chat_type"].asInteger(); + + if( ((EChatType)chat_type == CHAT_TYPE_DEBUG_MSG)) + { + if(gSavedSettings.getBOOL("ShowScriptErrors") == FALSE) + return; + if(gSavedSettings.getS32("ShowScriptErrorsLocation")== 1) + return; + } + + //take 1st element from pool, (re)initialize it, put it in active toasts LLToast* toast = m_toast_pool.back(); @@ -330,6 +341,7 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg) notification["from_id"] = chat_msg.mFromID; notification["time"] = chat_msg.mTime; notification["source"] = (S32)chat_msg.mSourceType; + notification["chat_type"] = (S32)chat_msg.mChatType; channel->addNotification(notification); } diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml index 16fdbd7045..f42bab14de 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml @@ -235,7 +235,7 @@ Avatars: width="237" top_pad="0" /> Loading contents... No contents - (worn on [ATTACHMENT_POINT]) + -- cgit v1.2.3 From add9298c1e4d74bdb5503722a6c795ea6f30fa11 Mon Sep 17 00:00:00 2001 From: Adam Moss Date: Sat, 24 Oct 2009 14:19:29 +0000 Subject: DEV-41803 class2 deferred light smoothing wrong in creases to be reviewed by davep --- .../app_settings/shaders/class2/deferred/blurLightF.glsl | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/shaders/class2/deferred/blurLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/blurLightF.glsl index 8bd702a8da..28908a311d 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/blurLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/blurLightF.glsl @@ -46,11 +46,15 @@ void main() dlt /= max(-pos.z*dist_factor, 1.0); - vec2 defined_weight = kern[0].xy; // special case the first (centre) sample's weight in the blur; we have to sample it anyway so we get it for 'free' + vec2 defined_weight = kern[0].xy; // special case the kern[0] (centre) sample's weight in the blur; we have to sample it anyway so we get it for 'free' vec4 col = defined_weight.xyxx * ccol; + + float center_e = 1.0 - (texture2DRect(edgeMap, vary_fragcoord.xy).a+ + texture2DRect(edgeMap, vary_fragcoord.xy+dlt*0.333).a+ + texture2DRect(edgeMap, vary_fragcoord.xy-dlt*0.333).a); - float e = 1.0; - for (int i = 0; i < 4; i++) + float e = center_e; + for (int i = 1; i < 4; i++) { vec2 tc = vary_fragcoord.xy + kern[i].z*dlt; @@ -67,10 +71,8 @@ void main() texture2DRect(edgeMap, tc.xy-dlt*0.333).a; } - - e = 1.0; - - for (int i = 0; i < 4; i++) + e = center_e; + for (int i = 1; i < 4; i++) { vec2 tc = vary_fragcoord.xy - kern[i].z*dlt; -- cgit v1.2.3 From 6698c681fd3ae139629d677ddd01b5102a71fa3d Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Mon, 26 Oct 2009 14:06:42 -0700 Subject: Add some logging to perhaps discern more information about reported crashes --- indra/newview/llmediadataclient.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llmediadataclient.cpp b/indra/newview/llmediadataclient.cpp index 6ae42d23d3..512104a2f4 100755 --- a/indra/newview/llmediadataclient.cpp +++ b/indra/newview/llmediadataclient.cpp @@ -367,8 +367,9 @@ BOOL LLMediaDataClient::QueueTimer::tick() // Peel one off of the items from the queue, and execute request request_ptr_t request = queue.top(); llassert(!request.isNull()); - const LLMediaDataClientObject *object = request->getObject(); + const LLMediaDataClientObject *object = (request.isNull()) ? NULL : request->getObject(); bool performed_request = false; + bool error = false; llassert(NULL != object); if (NULL != object && object->hasMedia()) { @@ -387,7 +388,11 @@ BOOL LLMediaDataClient::QueueTimer::tick() } } else { - if (NULL == object) + if (request.isNull()) + { + LL_WARNS("LLMediaDataClient") << "Not Sending request: NULL request!" << LL_ENDL; + } + else if (NULL == object) { LL_WARNS("LLMediaDataClient") << "Not Sending request for " << *request << " NULL object!" << LL_ENDL; } @@ -395,9 +400,10 @@ BOOL LLMediaDataClient::QueueTimer::tick() { LL_WARNS("LLMediaDataClient") << "Not Sending request for " << *request << " hasMedia() is false!" << LL_ENDL; } + error = true; } bool exceeded_retries = request->getRetryCount() > mMDC->mMaxNumRetries; - if (performed_request || exceeded_retries) // Try N times before giving up + if (performed_request || exceeded_retries || error) // Try N times before giving up { if (exceeded_retries) { -- cgit v1.2.3 From 771fe6cb8d71b6d6ca6cd002fb41a11cd8f3f2bc Mon Sep 17 00:00:00 2001 From: Steve Bennetts Date: Mon, 26 Oct 2009 14:16:48 -0700 Subject: Re labled "About Land" links back to "About Land" for 2.0. --- indra/newview/skins/default/xui/en/floater_tools.xml | 4 ++-- indra/newview/skins/default/xui/en/menu_viewer.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index 8cdcee6927..29fe046ed3 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -2836,8 +2836,8 @@ + + width="35"> - + width="46" + top="3"> - + tool_tip="Take snapshot" + /> + + @@ -261,36 +254,6 @@ left="0" top="0" width="5"/> - - - + top="3" + width="34"> diff --git a/indra/newview/skins/default/xui/en/widgets/output_monitor.xml b/indra/newview/skins/default/xui/en/widgets/output_monitor.xml index 505c7ba936..98b3e2faaa 100644 --- a/indra/newview/skins/default/xui/en/widgets/output_monitor.xml +++ b/indra/newview/skins/default/xui/en/widgets/output_monitor.xml @@ -1,6 +1,6 @@ - - + -- cgit v1.2.3 From cb9d4e5401ef19f9d81f07f9582fb14571b51052 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Tue, 27 Oct 2009 15:06:03 -0700 Subject: Change some logging in LLViewerMediaImpl::navigateTo() to be more explicit about what's happening. --- indra/newview/llviewermedia.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index aacef06122..e7168ef951 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1161,9 +1161,6 @@ void LLViewerMediaImpl::navigateHome() ////////////////////////////////////////////////////////////////////////////////////////// void LLViewerMediaImpl::navigateTo(const std::string& url, const std::string& mime_type, bool rediscover_type, bool server_request) { - // Helpful to have media urls in log file. Shouldn't be spammy. - llinfos << "url=" << url << " mime_type=" << mime_type << llendl; - if(server_request) { setNavState(MEDIANAVSTATE_SERVER_SENT); @@ -1188,11 +1185,18 @@ void LLViewerMediaImpl::navigateTo(const std::string& url, const std::string& mi if(mPriority == LLPluginClassMedia::PRIORITY_UNLOADED) { + // Helpful to have media urls in log file. Shouldn't be spammy. + llinfos << "UNLOADED media id= " << mTextureId << " url=" << url << " mime_type=" << mime_type << llendl; + // This impl should not be loaded at this time. LL_DEBUGS("PluginPriority") << this << "Not loading (PRIORITY_UNLOADED)" << LL_ENDL; return; } + + // Helpful to have media urls in log file. Shouldn't be spammy. + llinfos << "media id= " << mTextureId << " url=" << url << " mime_type=" << mime_type << llendl; + // If the caller has specified a non-empty MIME type, look that up in our MIME types list. // If we have a plugin for that MIME type, use that instead of attempting auto-discovery. -- cgit v1.2.3 From 9423f756e0d0eae72f0f79aa7f1a85b56a282e6f Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Tue, 27 Oct 2009 16:15:26 -0700 Subject: When media impls crash, don't auto-reload them without some trigger (such as clicking on the object again or an incoming NAVIGATE event). This should fix the crash-reload loop issue. Also, be smarter about counting media impls for the hard cap (never count impls that aren't loaded). --- indra/newview/llviewermedia.cpp | 35 +++++++++++++++++++++++------------ indra/newview/llviewermedia.h | 3 ++- 2 files changed, 25 insertions(+), 13 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index e7168ef951..41a676dc53 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -437,14 +437,14 @@ void LLViewerMedia::muteListChanged() // This is the predicate function used to sort sViewerMediaImplList by priority. static inline bool compare_impl_interest(const LLViewerMediaImpl* i1, const LLViewerMediaImpl* i2) { - if(i1->mIsMuted) + if(i1->mIsMuted || i1->mMediaSourceFailed) { - // Muted items always go to the end of the list, period. + // Muted or failed items always go to the end of the list, period. return false; } - else if(i2->mIsMuted) + else if(i2->mIsMuted || i2->mMediaSourceFailed) { - // Muted items always go to the end of the list, period. + // Muted or failed items always go to the end of the list, period. return true; } else if(i1->hasFocus()) @@ -521,9 +521,9 @@ void LLViewerMedia::updateMedia() LLPluginClassMedia::EPriority new_priority = LLPluginClassMedia::PRIORITY_NORMAL; - if(pimpl->mIsMuted || (impl_count_total > (int)max_instances)) + if(pimpl->mIsMuted || pimpl->mMediaSourceFailed || (impl_count_total > (int)max_instances)) { - // Never load muted impls. + // Never load muted or failed impls. // Hard limit on the number of instances that will be loaded at one time new_priority = LLPluginClassMedia::PRIORITY_UNLOADED; } @@ -583,6 +583,11 @@ void LLViewerMedia::updateMedia() } } + if(new_priority != LLPluginClassMedia::PRIORITY_UNLOADED) + { + impl_count_total++; + } + pimpl->setPriority(new_priority); #if 0 @@ -596,7 +601,6 @@ void LLViewerMedia::updateMedia() #endif total_cpu += pimpl->getCPUUsage(); - impl_count_total++; } LL_DEBUGS("PluginPriority") << "Total reported CPU usage is " << total_cpu << llendl; @@ -638,7 +642,7 @@ LLViewerMediaImpl::LLViewerMediaImpl( const LLUUID& texture_id, mDoNavigateOnLoad(false), mDoNavigateOnLoadRediscoverType(false), mDoNavigateOnLoadServerRequest(false), - mMediaSourceFailedInit(false), + mMediaSourceFailed(false), mRequestedVolume(1.0f), mIsMuted(false), mNeedsMuteCheck(false), @@ -840,7 +844,7 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type) } // If we got here, we want to ignore previous init failures. - mMediaSourceFailedInit = false; + mMediaSourceFailed = false; LLPluginClassMedia* media_source = newSourceFromMediaType(mMimeType, this, mMediaWidth, mMediaHeight); @@ -860,7 +864,7 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type) } // Make sure the timer doesn't try re-initing this plugin repeatedly until something else changes. - mMediaSourceFailedInit = true; + mMediaSourceFailed = true; return false; } @@ -1182,6 +1186,9 @@ void LLViewerMediaImpl::navigateTo(const std::string& url, const std::string& mi // and if this was a server request, the navigate on load will also need to be one. mDoNavigateOnLoadServerRequest = server_request; + + // An explicit navigate resets the "failed" flag. + mMediaSourceFailed = false; if(mPriority == LLPluginClassMedia::PRIORITY_UNLOADED) { @@ -1354,7 +1361,7 @@ bool LLViewerMediaImpl::canNavigateBack() ////////////////////////////////////////////////////////////////////////////////////////// void LLViewerMediaImpl::update() { - if(mMediaSource == NULL && !mMediaSourceFailedInit) + if(mMediaSource == NULL) { if(mPriority != LLPluginClassMedia::PRIORITY_UNLOADED) { @@ -1584,7 +1591,8 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla case MEDIA_EVENT_PLUGIN_FAILED_LAUNCH: { // The plugin failed to load properly. Make sure the timer doesn't retry. - mMediaSourceFailedInit = true; + // TODO: maybe mark this plugin as not loadable somehow? + mMediaSourceFailed = true; // TODO: may want a different message for this case? LLSD args; @@ -1595,6 +1603,9 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla case MEDIA_EVENT_PLUGIN_FAILED: { + // The plugin crashed. + mMediaSourceFailed = true; + LLSD args; args["PLUGIN"] = LLMIMETypes::implType(mMimeType); // SJB: This is getting called every frame if the plugin fails to load, continuously respawining the alert! diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index 580c698d36..b15314e954 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -173,6 +173,7 @@ public: bool isMediaPlaying(); bool isMediaPaused(); bool hasMedia(); + bool isMediaFailed() { return mMediaSourceFailed; }; ECursorType getLastSetCursor() { return mLastSetCursor; }; @@ -289,7 +290,7 @@ public: bool mDoNavigateOnLoad; bool mDoNavigateOnLoadRediscoverType; bool mDoNavigateOnLoadServerRequest; - bool mMediaSourceFailedInit; + bool mMediaSourceFailed; F32 mRequestedVolume; bool mIsMuted; bool mNeedsMuteCheck; -- cgit v1.2.3 From cadc8dc4a3c6f5d7a431e671857d09e0b5eac4a4 Mon Sep 17 00:00:00 2001 From: Steve Bennetts Date: Tue, 27 Oct 2009 16:31:07 -0700 Subject: Fix for gInventory cleanup on shutdown, includes making LLNavigationBar a LLSingleton and explicitly destroying it with the rest of the UI. --- indra/newview/llappviewer.cpp | 2 ++ indra/newview/llinventorymodel.cpp | 8 +++++--- indra/newview/llnavigationbar.cpp | 13 +------------ indra/newview/llnavigationbar.h | 9 +++------ indra/newview/llviewerwindow.cpp | 6 +++++- 5 files changed, 16 insertions(+), 22 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 4610437f08..e184d99ffc 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1349,6 +1349,8 @@ bool LLAppViewer::cleanup() if( gViewerWindow) gViewerWindow->shutdownViews(); + // Cleanup Inventory after the UI since it will delete any remaining observers + // (Deleted observers should have already removed themselves) gInventory.cleanupInventory(); // Clean up selection managers after UI is destroyed, as UI may be observing them. diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index e49be83fbc..1d7cbde0d5 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -182,10 +182,12 @@ LLInventoryModel::~LLInventoryModel() void LLInventoryModel::cleanupInventory() { empty(); - for (observer_list_t::iterator iter = mObservers.begin(); - iter != mObservers.end(); ) + // Deleting one observer might erase others from the list, so always pop off the front + while (!mObservers.empty()) { - LLInventoryObserver* observer = *iter++; + observer_list_t::iterator iter = mObservers.begin(); + LLInventoryObserver* observer = *iter; + mObservers.erase(iter); delete observer; } mObservers.clear(); diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index b91e23eace..3802d13f8b 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -164,16 +164,7 @@ TODO: - Load navbar height from saved settings (as it's done for status bar) or think of a better way. */ -S32 NAVIGATION_BAR_HEIGHT = 60; // *HACK -LLNavigationBar* LLNavigationBar::sInstance = 0; - -LLNavigationBar* LLNavigationBar::getInstance() -{ - if (!sInstance) - sInstance = new LLNavigationBar(); - - return sInstance; -} +S32 NAVIGATION_BAR_HEIGHT = 60; // *HACK, used in llviewerwindow.cpp LLNavigationBar::LLNavigationBar() : mTeleportHistoryMenu(NULL), @@ -198,8 +189,6 @@ LLNavigationBar::LLNavigationBar() LLNavigationBar::~LLNavigationBar() { mTeleportFinishConnection.disconnect(); - sInstance = 0; - LLSearchHistory::getInstance()->save(); } diff --git a/indra/newview/llnavigationbar.h b/indra/newview/llnavigationbar.h index 8a65cd24fa..f1a1b85a86 100644 --- a/indra/newview/llnavigationbar.h +++ b/indra/newview/llnavigationbar.h @@ -47,12 +47,12 @@ class LLSearchComboBox; * Web browser-like navigation bar. */ class LLNavigationBar -: public LLPanel + : public LLPanel, public LLSingleton { LOG_CLASS(LLNavigationBar); - + public: - static LLNavigationBar* getInstance(); + LLNavigationBar(); virtual ~LLNavigationBar(); /*virtual*/ void draw(); @@ -65,7 +65,6 @@ public: void showFavoritesPanel(BOOL visible); private: - LLNavigationBar(); void rebuildTeleportHistoryMenu(); void showTeleportHistoryMenu(); @@ -91,8 +90,6 @@ private: void fillSearchComboBox(); - static LLNavigationBar *sInstance; - LLMenuGL* mTeleportHistoryMenu; LLButton* mBtnBack; LLButton* mBtnForward; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index c659e58e47..f141d33729 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1637,7 +1637,11 @@ void LLViewerWindow::shutdownViews() // DEV-40930: Clear sModalStack. Otherwise, any LLModalDialog left open // will crump with LL_ERRS. LLModalDialog::shutdownModals(); - + + // destroy the nav bar, not currently part of gViewerWindow + // *TODO: Make LLNavigationBar part of gViewerWindow + delete LLNavigationBar::getInstance(); + // Delete all child views. delete mRootView; mRootView = NULL; -- cgit v1.2.3 From 5274c09b8fd6855bf0e6338c8846d42eb75a9c4a Mon Sep 17 00:00:00 2001 From: Palmer Date: Tue, 27 Oct 2009 17:35:04 -0700 Subject: Fix for EXT-1812 - reflection radio boxes all selected Reviewed by Richard --- indra/newview/llfloaterpreference.cpp | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index dbee9ea309..8b3391726a 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -843,10 +843,7 @@ void LLFloaterPreference::refreshEnabledState() bool bumpshiny = gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps && LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump"); getChild("BumpShiny")->setEnabled(bumpshiny ? TRUE : FALSE); - for (S32 i = 0; i < radio_reflection_detail->getItemCount(); ++i) - { - radio_reflection_detail->setIndexEnabled(i, ctrl_reflections->get() && reflections); - } + radio_reflection_detail->setEnabled(ctrl_reflections->get() && reflections); // Avatar Mode // Enable Avatar Shaders @@ -880,20 +877,10 @@ void LLFloaterPreference::refreshEnabledState() { mRadioTerrainDetail->setValue(1); mRadioTerrainDetail->setEnabled(FALSE); - for (S32 i = 0; i < mRadioTerrainDetail->getItemCount(); ++i) - { - mRadioTerrainDetail->setIndexEnabled(i, FALSE); - } } else { - mRadioTerrainDetail->setEnabled(TRUE); - - for (S32 i = 0; i < mRadioTerrainDetail->getItemCount(); ++i) - { - mRadioTerrainDetail->setIndexEnabled(i, TRUE); - } - + mRadioTerrainDetail->setEnabled(TRUE); } // WindLight -- cgit v1.2.3 From b2a64d204deeca17c1a73908cb8fb9e8837ecf71 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Tue, 27 Oct 2009 17:51:24 -0700 Subject: Fake a key-up event after each key-down sent to a plugin. --- indra/newview/llviewermedia.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 41a676dc53..02fda191be 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1312,6 +1312,8 @@ bool LLViewerMediaImpl::handleKeyHere(KEY key, MASK mask) if(!result) { result = mMediaSource->keyEvent(LLPluginClassMedia::KEY_EVENT_DOWN ,key, mask); + // Since the viewer internal event dispatching doesn't give us key-up events, simulate one here. + (void)mMediaSource->keyEvent(LLPluginClassMedia::KEY_EVENT_UP ,key, mask); } } -- cgit v1.2.3 From 6d14996bab5d1e9d52ae067606a7c769a304b65c Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Tue, 27 Oct 2009 17:52:05 -0700 Subject: Fixes for several keyboard focus issues around prim media. --- indra/newview/lltoolpie.cpp | 3 +++ indra/newview/llviewermediafocus.cpp | 16 +++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 22ed1ec219..7c17699bf9 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -1049,6 +1049,9 @@ bool LLToolPie::handleMediaClick(const LLPickInfo& pick) } else { + // Make sure keyboard focus is set to the media focus object. + gFocusMgr.setKeyboardFocus(LLViewerMediaFocus::getInstance()); + media_impl->mouseDown(pick.mUVCoords, gKeyboard->currentMask(TRUE)); mMediaMouseCaptureID = mep->getMediaID(); setMouseCapture(TRUE); // This object will send a mouse-up to the media when it loses capture. diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp index ad48ec145b..b47e0b8406 100644 --- a/indra/newview/llviewermediafocus.cpp +++ b/indra/newview/llviewermediafocus.cpp @@ -114,7 +114,7 @@ void LLViewerMediaFocus::setFocusFace(LLPointer objectp, S32 fac } else { - if(hasFocus()) + if(mFocusedImplID != LLUUID::null) { if(mMediaHUD.get()) { @@ -249,20 +249,18 @@ void LLViewerMediaFocus::setCameraZoom(LLViewerObject* object, LLVector3 normal, } void LLViewerMediaFocus::onFocusReceived() { - // Don't do this here -- this doesn't change "inworld media focus", it just changes whether the viewer's input is focused on the media. -// LLViewerMediaImpl* media_impl = getFocusedMediaImpl(); -// if(media_impl.notNull()) -// media_impl->focus(true); + LLViewerMediaImpl* media_impl = getFocusedMediaImpl(); + if(media_impl) + media_impl->focus(true); LLFocusableElement::onFocusReceived(); } void LLViewerMediaFocus::onFocusLost() { - // Don't do this here -- this doesn't change "inworld media focus", it just changes whether the viewer's input is focused on the media. -// LLViewerMediaImpl* media_impl = getFocusedMediaImpl(); -// if(media_impl.notNull()) -// media_impl->focus(false); + LLViewerMediaImpl* media_impl = getFocusedMediaImpl(); + if(media_impl) + media_impl->focus(false); gViewerWindow->focusClient(); LLFocusableElement::onFocusLost(); -- cgit v1.2.3 From 99e866fb5170cc33eb9be95d04aaede03771041d Mon Sep 17 00:00:00 2001 From: Erica Firment Date: Tue, 27 Oct 2009 19:59:48 -0700 Subject: EXT-1924 Add the Voice on/off toggle to preferences --- .../skins/default/xui/en/floater_preferences.xml | 25 +- .../default/xui/en/panel_preferences_sound.xml | 417 +++++++++++---------- 2 files changed, 236 insertions(+), 206 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_preferences.xml b/indra/newview/skins/default/xui/en/floater_preferences.xml index 285045f2c8..90a77b22b6 100644 --- a/indra/newview/skins/default/xui/en/floater_preferences.xml +++ b/indra/newview/skins/default/xui/en/floater_preferences.xml @@ -12,32 +12,32 @@ width="620"> - diff --git a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml index b1093ba17b..01f0c26650 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml @@ -1,9 +1,9 @@ + width="350"> @@ -31,43 +33,44 @@