diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llagentwearables.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llagentwearables.h | 3 | ||||
-rw-r--r-- | indra/newview/llcallingcard.cpp | 17 | ||||
-rw-r--r-- | indra/newview/llface.cpp | 45 | ||||
-rw-r--r-- | indra/newview/llface.h | 2 | ||||
-rw-r--r-- | indra/newview/llimfloater.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llsearchcombobox.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llslurl.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llslurl.h | 1 | ||||
-rw-r--r-- | indra/newview/lltexturefetch.cpp | 7 | ||||
-rw-r--r-- | indra/newview/lltoastnotifypanel.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llviewermenu.cpp | 16 | ||||
-rw-r--r-- | indra/newview/llviewertexture.cpp | 31 | ||||
-rw-r--r-- | indra/newview/llvovolume.cpp | 4 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_viewer.xml | 36 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_preferences_chat.xml | 62 |
16 files changed, 173 insertions, 81 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 6078620e87..a439720dcf 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -299,6 +299,10 @@ void LLAgentWearables::addWearableToAgentInventoryCallback::fire(const LLUUID& i { gAgentWearables.makeNewOutfitDone(mType, mIndex); } + if (mTodo & CALL_WEARITEM) + { + LLAppearanceManager::instance().addCOFItemLink(inv_item, true); + } } void LLAgentWearables::addWearabletoAgentInventoryDone(const S32 type, @@ -510,7 +514,7 @@ void LLAgentWearables::saveWearableAs(const EWearableType type, type, index, new_wearable, - addWearableToAgentInventoryCallback::CALL_UPDATE); + addWearableToAgentInventoryCallback::CALL_WEARITEM); LLUUID category_id; if (save_in_lost_and_found) { diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index b4f58674af..858540a5f5 100644 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -244,7 +244,8 @@ private: CALL_UPDATE = 1, CALL_RECOVERDONE = 2, CALL_CREATESTANDARDDONE = 4, - CALL_MAKENEWOUTFITDONE = 8 + CALL_MAKENEWOUTFITDONE = 8, + CALL_WEARITEM = 16 }; // MULTI-WEARABLE: index is an EWearableType - more confusing usage. diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp index 996139fccc..c3bda26aac 100644 --- a/indra/newview/llcallingcard.cpp +++ b/indra/newview/llcallingcard.cpp @@ -63,6 +63,7 @@ #include "llviewerobjectlist.h" #include "llviewerwindow.h" #include "llvoavatar.h" +#include "llavataractions.h" ///---------------------------------------------------------------------------- /// Local function declarations, constants, enums, and typedefs @@ -711,7 +712,21 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online) if(notify) { // Popup a notify box with online status of this agent - LLNotificationPtr notification = LLNotificationsUtil::add(online ? "FriendOnline" : "FriendOffline", args); + LLNotificationPtr notification; + + if (online) + { + notification = + LLNotificationsUtil::add("FriendOnline", + args, + LLSD().with("respond_on_mousedown", TRUE), + boost::bind(&LLAvatarActions::startIM, agent_id)); + } + else + { + notification = + LLNotificationsUtil::add("FriendOffline", args); + } // If there's an open IM session with this agent, send a notification there too. LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, agent_id); diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 23e0804407..c40edb6511 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -182,6 +182,7 @@ void LLFace::init(LLDrawable* drawablep, LLViewerObject* objp) mAtlasInfop = NULL ; mUsingAtlas = FALSE ; + mHasMedia = FALSE ; } static LLFastTimer::DeclareTimer FTM_DESTROY_FACE("Destroy Face"); @@ -1379,11 +1380,12 @@ const F32 LEAST_IMPORTANCE_FOR_LARGE_IMAGE = 0.3f ; F32 LLFace::getTextureVirtualSize() { F32 radius; - F32 cos_angle_to_view_dir; - mPixelArea = calcPixelArea(cos_angle_to_view_dir, radius); + F32 cos_angle_to_view_dir; + BOOL in_frustum = calcPixelArea(cos_angle_to_view_dir, radius); - if (mPixelArea < 0.0001f) + if (mPixelArea < 0.0001f || !in_frustum) { + setVirtualSize(0.f) ; return 0.f; } @@ -1420,30 +1422,36 @@ F32 LLFace::getTextureVirtualSize() } } + setVirtualSize(face_area) ; + return face_area; } -F32 LLFace::calcPixelArea(F32& cos_angle_to_view_dir, F32& radius) +BOOL LLFace::calcPixelArea(F32& cos_angle_to_view_dir, F32& radius) { //get area of circle around face LLVector3 center = getPositionAgent(); LLVector3 size = (mExtents[1] - mExtents[0]) * 0.5f; LLViewerCamera* camera = LLViewerCamera::getInstance(); - //if has media, check if the face is out of the view frustum. - BOOL has_media = hasMedia() ; - if(has_media && !camera->AABBInFrustum(center, size)) - { - mImportanceToCamera = 0.f ; - return 0.f ; - } - F32 size_squared = size.lengthSquared() ; LLVector3 lookAt = center - camera->getOrigin(); - F32 dist = lookAt.normVec() ; - cos_angle_to_view_dir = lookAt * camera->getXAxis() ; - if(has_media) + F32 dist = lookAt.normVec() ; + + //get area of circle around node + F32 app_angle = atanf(fsqrtf(size_squared) / dist); + radius = app_angle*LLDrawable::sCurPixelAngle; + mPixelArea = radius*radius * 3.14159f; + cos_angle_to_view_dir = lookAt * camera->getXAxis() ; + + //if has media, check if the face is out of the view frustum. + if(hasMedia()) { + if(!camera->AABBInFrustum(center, size)) + { + mImportanceToCamera = 0.f ; + return false ; + } if(cos_angle_to_view_dir > camera->getCosHalfFov()) //the center is within the view frustum { cos_angle_to_view_dir = 1.0f ; @@ -1457,11 +1465,6 @@ F32 LLFace::calcPixelArea(F32& cos_angle_to_view_dir, F32& radius) } } - //get area of circle around node - F32 app_angle = atanf(fsqrtf(size_squared) / dist); - radius = app_angle*LLDrawable::sCurPixelAngle; - F32 face_area = radius*radius * 3.14159f; - if(dist < mBoundingSphereRadius) //camera is very close { cos_angle_to_view_dir = 1.0f ; @@ -1472,7 +1475,7 @@ F32 LLFace::calcPixelArea(F32& cos_angle_to_view_dir, F32& radius) mImportanceToCamera = LLFace::calcImportanceToCamera(cos_angle_to_view_dir, dist) ; } - return face_area ; + return true ; } //the projection of the face partially overlaps with the screen diff --git a/indra/newview/llface.h b/indra/newview/llface.h index bf658dc00c..67dd97e6f7 100644 --- a/indra/newview/llface.h +++ b/indra/newview/llface.h @@ -211,7 +211,7 @@ public: private: F32 adjustPartialOverlapPixelArea(F32 cos_angle_to_view_dir, F32 radius ); - F32 calcPixelArea(F32& cos_angle_to_view_dir, F32& radius) ; + BOOL calcPixelArea(F32& cos_angle_to_view_dir, F32& radius) ; public: static F32 calcImportanceToCamera(F32 to_view_dir, F32 dist); diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 53cdfcc9b2..94b540a7e1 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -271,6 +271,7 @@ BOOL LLIMFloater::postBuild() mInputEditor->setCommitOnFocusLost( FALSE ); mInputEditor->setRevertOnEsc( FALSE ); mInputEditor->setReplaceNewlinesWithSpaces( FALSE ); + mInputEditor->setPassDelete( TRUE ); std::string session_name(LLIMModel::instance().getName(mSessionID)); diff --git a/indra/newview/llsearchcombobox.cpp b/indra/newview/llsearchcombobox.cpp index 93a70b6471..a130878176 100644 --- a/indra/newview/llsearchcombobox.cpp +++ b/indra/newview/llsearchcombobox.cpp @@ -78,6 +78,7 @@ LLSearchComboBox::LLSearchComboBox(const Params&p) button_params.click_callback.function(boost::bind(&LLSearchComboBox::onSelectionCommit, this)); mSearchButton = LLUICtrlFactory::create<LLButton>(button_params); mTextEntry->addChild(mSearchButton); + mTextEntry->setPassDelete(TRUE); setButtonVisible(p.dropdown_button_visible); mTextEntry->setCommitCallback(boost::bind(&LLComboBox::onTextCommit, this, _2)); diff --git a/indra/newview/llslurl.cpp b/indra/newview/llslurl.cpp index 3343ee88bd..e4773f99c5 100644 --- a/indra/newview/llslurl.cpp +++ b/indra/newview/llslurl.cpp @@ -40,6 +40,12 @@ const std::string LLSLURL::PREFIX_SL_HELP = "secondlife://app."; const std::string LLSLURL::PREFIX_SL = "sl://"; const std::string LLSLURL::PREFIX_SECONDLIFE = "secondlife://"; const std::string LLSLURL::PREFIX_SLURL_OLD = "http://slurl.com/secondlife/"; + +// For DnD - even though www.slurl.com redirects to slurl.com in a browser, you can copy and drag +// text with www.slurl.com or a link explicitly pointing at www.slurl.com so testing for this +// version is required also. +const std::string LLSLURL::PREFIX_SLURL_WWW = "http://www.slurl.com/secondlife/"; + const std::string LLSLURL::PREFIX_SLURL = "http://maps.secondlife.com/secondlife/"; const std::string LLSLURL::APP_TOKEN = "app/"; @@ -68,7 +74,10 @@ std::string LLSLURL::stripProtocol(const std::string& url) { stripped.erase(0, PREFIX_SLURL_OLD.length()); } - + else if (matchPrefix(stripped, PREFIX_SLURL_WWW)) + { + stripped.erase(0, PREFIX_SLURL_WWW.length()); + } return stripped; } @@ -81,6 +90,7 @@ bool LLSLURL::isSLURL(const std::string& url) if (matchPrefix(url, PREFIX_SECONDLIFE)) return true; if (matchPrefix(url, PREFIX_SLURL)) return true; if (matchPrefix(url, PREFIX_SLURL_OLD)) return true; + if (matchPrefix(url, PREFIX_SLURL_WWW)) return true; return false; } @@ -91,6 +101,7 @@ bool LLSLURL::isSLURLCommand(const std::string& url) if (matchPrefix(url, PREFIX_SL + APP_TOKEN) || matchPrefix(url, PREFIX_SECONDLIFE + "/" + APP_TOKEN) || matchPrefix(url, PREFIX_SLURL + APP_TOKEN) || + matchPrefix(url, PREFIX_SLURL_WWW + APP_TOKEN) || matchPrefix(url, PREFIX_SLURL_OLD + APP_TOKEN) ) { return true; diff --git a/indra/newview/llslurl.h b/indra/newview/llslurl.h index 21b32ce409..6a695e84f3 100644 --- a/indra/newview/llslurl.h +++ b/indra/newview/llslurl.h @@ -51,6 +51,7 @@ public: static const std::string PREFIX_SECONDLIFE; static const std::string PREFIX_SLURL; static const std::string PREFIX_SLURL_OLD; + static const std::string PREFIX_SLURL_WWW; static const std::string APP_TOKEN; diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 4a61130785..6dcf4bc798 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -982,7 +982,12 @@ bool LLTextureFetchWorker::doWork(S32 param) } if (mLoadedDiscard < 0) { - llerrs << "Decode entered with invalid mLoadedDiscard. ID = " << mID << llendl; + //llerrs << "Decode entered with invalid mLoadedDiscard. ID = " << mID << llendl; + + //abort, don't decode + mState = DONE; + setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); + return true; } setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); // Set priority first since Responder may change it mRawImage = NULL; diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index 4d741456c4..980b51337f 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -294,6 +294,15 @@ void LLToastNotifyPanel::adjustPanelForTipNotice() mControlPanel->setVisible(FALSE); reshape(getRect().getWidth(), mInfoPanel->getRect().getHeight()); + + if (mNotification->getPayload().has("respond_on_mousedown") + && mNotification->getPayload()["respond_on_mousedown"] ) + { + mInfoPanel->setMouseDownCallback( + boost::bind(&LLNotification::respond, + mNotification, + mNotification->getResponseTemplate())); + } } // static diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 967a951fd3..1ff7920bb2 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2555,7 +2555,7 @@ void handle_object_inspect() key["task"] = "task"; LLSideTray::getInstance()->showPanel("sidepanel_inventory", key); } - + /* // Old floater properties LLFloaterReg::showInstance("inspect", LLSD()); @@ -5599,6 +5599,19 @@ void handle_buy_currency() LLFloaterBuyCurrency::buyCurrency(); } +class LLFloaterVisible : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + std::string floater_name = userdata.asString(); + bool new_value = false; + { + new_value = LLFloaterReg::instanceVisible(floater_name); + } + return new_value; + } +}; + class LLShowHelp : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -8030,6 +8043,7 @@ void initialize_menus() enable.add("EnableEdit", boost::bind(&enable_object_edit)); enable.add("VisibleBuild", boost::bind(&enable_object_build)); + view_listener_t::addMenu(new LLFloaterVisible(), "FloaterVisible"); view_listener_t::addMenu(new LLShowSidetrayPanel(), "ShowSidetrayPanel"); view_listener_t::addMenu(new LLSidetrayPanelVisible(), "SidetrayPanelVisible"); view_listener_t::addMenu(new LLSomethingSelected(), "SomethingSelected"); diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index fc0b7bf70f..09353e3146 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1578,12 +1578,12 @@ F32 LLViewerFetchedTexture::calcDecodePriority() } else if (!isJustBound() && mCachedRawImageReady) { - if(mBoostLevel < BOOST_HIGH) - { - // We haven't rendered this in a while, de-prioritize it - desired_discard += 2; - } - else + //if(mBoostLevel < BOOST_HIGH) + //{ + // // We haven't rendered this in a while, de-prioritize it + // desired_discard += 2; + //} + //else { // We haven't rendered this in the last half second, and we have a cached raw image, leave the desired discard as-is desired_discard = cur_discard; @@ -2402,14 +2402,8 @@ void LLViewerFetchedTexture::setCachedRawImage() { --i ; } - //if(mForSculpt) - //{ - // mRawImage->scaleDownWithoutBlending(w >> i, h >> i) ; - //} - //else - { - mRawImage->scale(w >> i, h >> i) ; - } + + mRawImage->scale(w >> i, h >> i) ; } mCachedRawImage = mRawImage ; mCachedRawDiscardLevel = mRawDiscardLevel + i ; @@ -2759,7 +2753,7 @@ void LLViewerLODTexture::processTextureStats() } else { - if(isLargeImage() && !isJustBound() && mAdditionalDecodePriority < 1.0f) + if(isLargeImage() && !isJustBound() && mAdditionalDecodePriority < 0.3f) { //if is a big image and not being used recently, nor close to the view point, do not load hi-res data. mMaxVirtualSize = llmin(mMaxVirtualSize, (F32)LLViewerTexture::sMinLargeImageSize) ; @@ -2945,12 +2939,11 @@ LLViewerMediaTexture::~LLViewerMediaTexture() void LLViewerMediaTexture::reinit(BOOL usemipmaps /* = TRUE */) { - mGLTexturep = NULL ; - init(false); + llassert(mGLTexturep.notNull()) ; + mUseMipMaps = usemipmaps ; getLastReferencedTimer()->reset() ; - - generateGLTexture() ; + mGLTexturep->setUseMipMaps(mUseMipMaps) ; mGLTexturep->setNeedsAlphaAndPickMask(FALSE) ; } diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index fb28b78daf..e95c7f411c 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -711,6 +711,7 @@ void LLVOVolume::updateTextureVirtualSize() vsize = area; imagep->setBoostLevel(LLViewerTexture::BOOST_HUD); face->setPixelArea(area); // treat as full screen + face->setVirtualSize(vsize); } else { @@ -727,8 +728,7 @@ void LLVOVolume::updateTextureVirtualSize() gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_TCOORD, FALSE); } } - - face->setVirtualSize(vsize); + if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXTURE_AREA)) { if (vsize < min_vsize) min_vsize = vsize; diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 95ce6d6ff4..07a366da7f 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -55,34 +55,42 @@ </menu_item_call> <menu_item_check label="My Inventory" - layout="topleft" name="Inventory" - shortcut="control|I"> + layout="topleft" + shortcut="control|shift|I" + visible="false"> <menu_item_check.on_check - function="SidetrayPanelVisible" - parameter="sidepanel_inventory" /> + function="Floater.Visible" + parameter="inventory" /> <menu_item_check.on_click - function="ShowSidetrayPanel" - parameter="sidepanel_inventory" /> + function="Floater.Toggle" + parameter="inventory" /> </menu_item_check> - <menu_item_call - label="Show Inventory in Side Tray" + <menu_item_check + label="My Inventory" name="ShowSidetrayInventory" + layout="topleft" shortcut="control|I" - visible="false"> - <menu_item_call.on_click + visible="true"> + <menu_item_check.on_check + function="SidetrayPanelVisible" + parameter="sidepanel_inventory" /> + <menu_item_check.on_click function="ShowSidetrayPanel" parameter="sidepanel_inventory" /> - </menu_item_call> - <menu_item_call + </menu_item_check> + <menu_item_check label="My Gestures" layout="topleft" name="Gestures" shortcut="control|G"> - <menu_item_call.on_click + <menu_item_check.on_check + function="Floater.Visible" + parameter="gestures" /> + <menu_item_check.on_click function="Floater.Toggle" parameter="gestures" /> - </menu_item_call> + </menu_item_check> <menu label="My Status" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml index 433dfc17fe..2e81139ef2 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml @@ -9,13 +9,22 @@ name="chat" top="1" width="517"> - <radio_group + <text + follows="left|top" + layout="topleft" + left="30" + height="12" + width="120" + top="10"> + Font size: + </text> + <radio_group height="30" layout="topleft" - left="30" - control_name="ChatFontSize" + left="40" + control_name="ChatFontSize" name="chat_font_size" - top="10" + top_pad="0" width="440"> <radio_item height="16" @@ -45,12 +54,24 @@ top_delta="0" width="125" /> </radio_group> + + <text + follows="left|top" + layout="topleft" + left="30" + height="12" + top_pad="10" + width="120" + > + Font colors: + </text> + <color_swatch can_apply_immediately="true" follows="left|top" height="47" layout="topleft" - left="30" + left="40" name="user" top_pad="10" width="44" > @@ -79,7 +100,7 @@ follows="left|top" height="47" layout="topleft" - left="180" + left="190" name="agent" top_pad="-17" width="44" > @@ -110,7 +131,7 @@ height="47" label_width="60" layout="topleft" - left="350" + left="360" name="im" top_pad="-17" width="44"> @@ -141,7 +162,7 @@ height="47" label_width="44" layout="topleft" - left="30" + left="40" name="system" top_pad="40" width="44" > @@ -171,7 +192,7 @@ follows="left|top" height="47" layout="topleft" - left="180" + left="190" name="script_error" top_pad="-17" width="44"> @@ -201,7 +222,7 @@ follows="left|top" height="47" layout="topleft" - left="350" + left="360" name="objects" top_pad="-17" width="44" > @@ -231,7 +252,7 @@ follows="left|top" height="47" layout="topleft" - left="30" + left="40" name="owner" top_pad="40" width="44" > @@ -261,7 +282,7 @@ follows="left|top" height="47" layout="topleft" - left="180" + left="190" name="links" top_pad="-17" width="44" > @@ -314,6 +335,8 @@ top_pad="5" width="400" /> <text + follows="left|top" + layout="topleft" left="30" height="20" width="120" @@ -321,17 +344,20 @@ Show IMs in: </text> <text - left_pad="6" - height="20" - width="100" - text_color="White_25" - > + follows="left|top" + layout="topleft" + top_delta="0" + left="120" + height="20" + width="100" + text_color="White_25" + > (requires restart) </text> <radio_group height="30" layout="topleft" - left="30" + left="40" control_name="ChatWindow" name="chat_window" top_pad="0" |