From ef2b007a6b5f487a946d9930341591f3f1d0437e Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 2 Feb 2016 15:52:38 +0200 Subject: MAINT-1632 FIXED Both radio-buttons are not selected Advanced tab of Preference --- indra/llui/llradiogroup.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'indra/llui') diff --git a/indra/llui/llradiogroup.cpp b/indra/llui/llradiogroup.cpp index b53bb16d97..8cf72928ff 100755 --- a/indra/llui/llradiogroup.cpp +++ b/indra/llui/llradiogroup.cpp @@ -179,6 +179,18 @@ BOOL LLRadioGroup::setSelectedIndex(S32 index, BOOL from_event) return FALSE; } + if (index < -1) + { + // less then minimum value + return FALSE; + } + + if (index < 0 && mSelectedIndex >= 0 && !mAllowDeselect) + { + // -1 is "nothing selected" + return FALSE; + } + if (mSelectedIndex >= 0) { LLRadioCtrl* old_radio_item = mRadioButtons[mSelectedIndex]; -- cgit v1.3 From 230fc28d8a72e75a8f2af2ab5fa5ee0e3ccca4a1 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 11 Mar 2016 20:16:03 +0200 Subject: MAINT-6097 FIXED On required update, clicking link to release notes opens browser behind menu --- indra/llui/llnotifications.cpp | 6 +++++ indra/llui/llnotifications.h | 3 ++- indra/llui/llnotificationtemplate.h | 17 +++++++++---- indra/llui/lltextbase.cpp | 14 +++++++++-- indra/llui/lltextbase.h | 2 ++ indra/llui/llurlaction.cpp | 5 ++-- indra/llui/llurlaction.h | 2 +- indra/newview/lltoastalertpanel.cpp | 1 + .../newview/skins/default/xui/en/notifications.xml | 28 ++++++++++++---------- 9 files changed, 55 insertions(+), 23 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 77e7d375c8..0cb959a315 100755 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -417,6 +417,7 @@ LLNotificationTemplate::LLNotificationTemplate(const LLNotificationTemplate::Par mExpireOption(p.expire_option), mURLOption(p.url.option), mURLTarget(p.url.target), + mForceUrlsExternal(p.force_urls_external), mUnique(p.unique.isProvided()), mCombineBehavior(p.unique.combine), mPriority(p.priority), @@ -748,6 +749,11 @@ S32 LLNotification::getURLOpenExternally() const return(mTemplatep? mTemplatep->mURLTarget == "_external": -1); } +bool LLNotification::getForceUrlsExternal() const +{ + return (mTemplatep ? mTemplatep->mForceUrlsExternal : false); +} + bool LLNotification::hasUniquenessConstraints() const { return (mTemplatep ? mTemplatep->mUnique : false); diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index 010e6caba2..354add0b82 100755 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -553,7 +553,8 @@ public: std::string getLabel() const; std::string getURL() const; S32 getURLOption() const; - S32 getURLOpenExternally() const; + S32 getURLOpenExternally() const; //for url responce option + bool getForceUrlsExternal() const; bool canLogToChat() const; bool canLogToIM() const; bool canShowToast() const; diff --git a/indra/llui/llnotificationtemplate.h b/indra/llui/llnotificationtemplate.h index c23fc53763..bed29254d8 100755 --- a/indra/llui/llnotificationtemplate.h +++ b/indra/llui/llnotificationtemplate.h @@ -177,7 +177,8 @@ struct LLNotificationTemplate Optional persist, log_to_im, show_toast, - log_to_chat; + log_to_chat, + force_urls_external; Optional functor, icon, label, @@ -201,6 +202,7 @@ struct LLNotificationTemplate log_to_im("log_to_im", false), show_toast("show_toast", true), log_to_chat("log_to_chat", true), + force_urls_external("force_urls_external", false), functor("functor"), icon("icon"), label("label"), @@ -284,11 +286,16 @@ struct LLNotificationTemplate // that URL. Obsolete this and eliminate the buttons for affected // messages when we allow clickable URLs in the UI U32 mURLOption; - - std::string mURLTarget; - //This is a flag that tells if the url needs to open externally dispite + + //This is a flag that tells if option url needs to open externally dispite //what the user setting is. - + std::string mURLTarget; + + // All links clicked inside notification will be opened in external browser + // Note: Some notifications block and exit viewer, yet they provide a link + // to click, we should be able to open such links in external browser. + bool mForceUrlsExternal; + // does this notification persist across sessions? if so, it will be // serialized to disk on first receipt and read on startup bool mPersist; diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 4309e6557e..4ccf1ef009 100755 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -164,6 +164,7 @@ LLTextBase::Params::Params() trusted_content("trusted_content", true), use_ellipses("use_ellipses", false), parse_urls("parse_urls", false), + force_urls_external("force_urls_external", false), parse_highlights("parse_highlights", false) { addSynonym(track_end, "track_bottom"); @@ -216,6 +217,7 @@ LLTextBase::LLTextBase(const LLTextBase::Params &p) mWordWrap(p.wrap), mUseEllipses( p.use_ellipses ), mParseHTML(p.parse_urls), + mForceUrlsExternal(p.force_urls_external), mParseHighlights(p.parse_highlights), mBGVisible(p.bg_visible), mScroller(NULL), @@ -1937,7 +1939,7 @@ void LLTextBase::createUrlContextMenu(S32 x, S32 y, const std::string &in_url) registrar.add("Url.Open", boost::bind(&LLUrlAction::openURL, url)); registrar.add("Url.OpenInternal", boost::bind(&LLUrlAction::openURLInternal, url)); registrar.add("Url.OpenExternal", boost::bind(&LLUrlAction::openURLExternal, url)); - registrar.add("Url.Execute", boost::bind(&LLUrlAction::executeSLURL, url)); + registrar.add("Url.Execute", boost::bind(&LLUrlAction::executeSLURL, url, true)); registrar.add("Url.Block", boost::bind(&LLUrlAction::blockObject, url)); registrar.add("Url.Teleport", boost::bind(&LLUrlAction::teleportToLocation, url)); registrar.add("Url.ShowProfile", boost::bind(&LLUrlAction::showProfile, url)); @@ -3227,7 +3229,15 @@ BOOL LLNormalTextSegment::handleMouseUp(S32 x, S32 y, MASK mask) // Only process the click if it's actually in this segment, not to the right of the end-of-line. if(mEditor.getSegmentAtLocalPos(x, y, false) == this) { - LLUrlAction::clickAction(getStyle()->getLinkHREF(), mEditor.isContentTrusted()); + std::string url = getStyle()->getLinkHREF(); + if (!mEditor.mForceUrlsExternal) + { + LLUrlAction::clickAction(url, mEditor.isContentTrusted()); + } + else if (!LLUrlAction::executeSLURL(url, mEditor.isContentTrusted())) + { + LLUrlAction::openURLExternal(url); + } return TRUE; } } diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index ac408bbe7a..7d87271b0e 100755 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -300,6 +300,7 @@ public: wrap, use_ellipses, parse_urls, + force_urls_external, parse_highlights, clip, clip_partial, @@ -654,6 +655,7 @@ protected: S32 mLineSpacingPixels; // padding between lines bool mBorderVisible; bool mParseHTML; // make URLs interactive + bool mForceUrlsExternal; // URLs from this textbox will be opened in external browser bool mParseHighlights; // highlight user-defined keywords bool mWordWrap; bool mUseEllipses; diff --git a/indra/llui/llurlaction.cpp b/indra/llui/llurlaction.cpp index 12537d9dd1..027a3e3a64 100755 --- a/indra/llui/llurlaction.cpp +++ b/indra/llui/llurlaction.cpp @@ -83,12 +83,13 @@ void LLUrlAction::openURLExternal(std::string url) } } -void LLUrlAction::executeSLURL(std::string url) +bool LLUrlAction::executeSLURL(std::string url, bool trusted_content) { if (sExecuteSLURLCallback) { - sExecuteSLURLCallback(url ,true); + return sExecuteSLURLCallback(url, trusted_content); } + return false; } void LLUrlAction::clickAction(std::string url, bool trusted_content) diff --git a/indra/llui/llurlaction.h b/indra/llui/llurlaction.h index 5f3626490c..5497e28bb4 100755 --- a/indra/llui/llurlaction.h +++ b/indra/llui/llurlaction.h @@ -57,7 +57,7 @@ public: static void openURLExternal(std::string url); /// execute the given secondlife: SLURL - static void executeSLURL(std::string url); + static bool executeSLURL(std::string url, bool trusted_content = true); /// if the Url specifies an SL location, teleport there static void teleportToLocation(std::string url); diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp index 530bd9a18f..bbce717c20 100755 --- a/indra/newview/lltoastalertpanel.cpp +++ b/indra/newview/lltoastalertpanel.cpp @@ -181,6 +181,7 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal params.wrap(true); params.follows.flags(FOLLOWS_LEFT | FOLLOWS_TOP); params.allow_scroll(true); + params.force_urls_external(mNotification->getForceUrlsExternal()); LLTextBox * msg_box = LLUICtrlFactory::create (params); // Compute max allowable height for the dialog text, so we can allocate diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index f1a6aca163..3831b52c2c 100755 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -3870,9 +3870,10 @@ We have downloaded an update to your [APP_NAME] installation. + icon="alertmodal.tga" + name="RequiredUpdateDownloadedVerboseDialog" + type="alertmodal" + force_urls_external="true"> We have downloaded a required software update. Version [VERSION] [[INFO_URL] Information about this update] @@ -3884,9 +3885,10 @@ We must restart [APP_NAME] to install the update. + icon="alertmodal.tga" + name="RequiredUpdateDownloadedDialog" + type="alertmodal" + force_urls_external="true"> We must restart [APP_NAME] to install the update. [[INFO_URL] Information about this update] confirm @@ -3926,9 +3928,10 @@ see [[INFO_URL] Information about this update] + icon="alertmodal.tga" + name="OtherChannelRequiredUpdateDownloadedVerboseDialog" + type="alertmodal" + force_urls_external="true"> We have downloaded a required software update. Version [VERSION] This experimental viewer has been replaced by a [NEW_CHANNEL] viewer; @@ -3942,9 +3945,10 @@ We must restart [APP_NAME] to install the update. + icon="alertmodal.tga" + name="OtherChannelRequiredUpdateDownloadedDialog" + type="alertmodal" + force_urls_external="true"> We must restart [APP_NAME] to install the update. This experimental viewer has been replaced by a [NEW_CHANNEL] viewer; see [[INFO_URL] Information about this update] -- cgit v1.3 From 0e845dc845817dbf71a9a4f1d8072576f973c457 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 24 Mar 2016 17:09:39 +0200 Subject: MAINT-6214 Unable to add a space before closing curly brace in chatbar, notecards & scripts. --- indra/llui/lltexteditor.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 926326aaff..3c86b539c4 100755 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -1716,7 +1716,20 @@ void LLTextEditor::unindentLineBeforeCloseBrace() LLWString text = getWText(); if( ' ' == text[ mCursorPos - 1 ] ) { - removeCharOrTab(); + S32 line = getLineNumFromDocIndex(mCursorPos, false); + S32 line_start = getLineStart(line); + + // Jump over spaces in the current line + while ((' ' == text[line_start]) && (line_start < mCursorPos)) + { + line_start++; + } + + // Make sure there is nothing but ' ' before the Brace we are unindenting + if (line_start == mCursorPos) + { + removeCharOrTab(); + } } } } @@ -1800,7 +1813,7 @@ BOOL LLTextEditor::handleUnicodeCharHere(llwchar uni_char) // Handle most keys only if the text editor is writeable. if( !mReadOnly ) { - if( '}' == uni_char ) + if( mAutoIndent && '}' == uni_char ) { unindentLineBeforeCloseBrace(); } -- cgit v1.3 From 0e155c51a95f092dda4f1ee71b4de46c7e98c10d Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 29 Mar 2016 18:52:54 +0300 Subject: MAINT-6257 Textures loading issues. --- indra/llui/lliconctrl.cpp | 11 ++++++++--- indra/llui/lliconctrl.h | 2 ++ indra/newview/llavatariconctrl.cpp | 6 +++--- indra/newview/llgroupiconctrl.cpp | 12 +++++++++--- indra/newview/llgroupiconctrl.h | 2 ++ indra/newview/llgrouplist.cpp | 6 +++--- indra/newview/llgrouplist.h | 4 ++-- indra/newview/lllocalbitmaps.cpp | 10 +++++----- indra/newview/llpanelface.cpp | 2 +- indra/newview/lltexturectrl.cpp | 2 +- indra/newview/lltexturefetch.cpp | 2 +- indra/newview/lltoastgroupnotifypanel.cpp | 8 +++++--- indra/newview/llviewertexture.cpp | 14 +++++++------- indra/newview/llviewertexturelist.cpp | 16 +++++----------- indra/newview/llviewertexturelist.h | 4 ++-- indra/newview/llvoavatar.cpp | 8 ++++---- .../skins/default/xui/en/panel_group_list_item.xml | 2 +- .../newview/skins/default/xui/en/panel_group_notify.xml | 2 +- 18 files changed, 62 insertions(+), 51 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/lliconctrl.cpp b/indra/llui/lliconctrl.cpp index f841901801..82b01e705d 100755 --- a/indra/llui/lliconctrl.cpp +++ b/indra/llui/lliconctrl.cpp @@ -83,7 +83,12 @@ void LLIconCtrl::draw() // virtual // value might be a string or a UUID -void LLIconCtrl::setValue(const LLSD& value ) +void LLIconCtrl::setValue(const LLSD& value) +{ + setValue(value, mPriority); +} + +void LLIconCtrl::setValue(const LLSD& value, S32 priority) { LLSD tvalue(value); if (value.isString() && LLUUID::validate(value.asString())) @@ -94,11 +99,11 @@ void LLIconCtrl::setValue(const LLSD& value ) LLUICtrl::setValue(tvalue); if (tvalue.isUUID()) { - mImagep = LLUI::getUIImageByID(tvalue.asUUID(), mPriority); + mImagep = LLUI::getUIImageByID(tvalue.asUUID(), priority); } else { - mImagep = LLUI::getUIImage(tvalue.asString(), mPriority); + mImagep = LLUI::getUIImage(tvalue.asString(), priority); } if(mImagep.notNull() diff --git a/indra/llui/lliconctrl.h b/indra/llui/lliconctrl.h index 7971cd44d3..dd83e78fd3 100755 --- a/indra/llui/lliconctrl.h +++ b/indra/llui/lliconctrl.h @@ -59,6 +59,8 @@ protected: LLIconCtrl(const Params&); friend class LLUICtrlFactory; + void setValue(const LLSD& value, S32 priority); + public: virtual ~LLIconCtrl(); diff --git a/indra/newview/llavatariconctrl.cpp b/indra/newview/llavatariconctrl.cpp index 932326acae..c131dc641b 100755 --- a/indra/newview/llavatariconctrl.cpp +++ b/indra/newview/llavatariconctrl.cpp @@ -196,7 +196,7 @@ LLAvatarIconCtrl::LLAvatarIconCtrl(const LLAvatarIconCtrl::Params& p) } else { - LLIconCtrl::setValue(mDefaultIconName); + LLIconCtrl::setValue(mDefaultIconName, LLViewerFetchedTexture::BOOST_UI); } } @@ -243,7 +243,7 @@ void LLAvatarIconCtrl::setValue(const LLSD& value) // *TODO: Consider getting avatar icon/badge directly from // People API, rather than sending AvatarPropertyRequest // messages. People API already hits the user table. - LLIconCtrl::setValue(mDefaultIconName); + LLIconCtrl::setValue(mDefaultIconName, LLViewerFetchedTexture::BOOST_UI); app->addObserver(mAvatarId, this); app->sendAvatarPropertiesRequest(mAvatarId); } @@ -284,7 +284,7 @@ bool LLAvatarIconCtrl::updateFromCache() } else { - LLIconCtrl::setValue(mDefaultIconName); + LLIconCtrl::setValue(mDefaultIconName, LLViewerFetchedTexture::BOOST_UI); return false; } diff --git a/indra/newview/llgroupiconctrl.cpp b/indra/newview/llgroupiconctrl.cpp index 1974a073dd..271dd44c1f 100755 --- a/indra/newview/llgroupiconctrl.cpp +++ b/indra/newview/llgroupiconctrl.cpp @@ -64,7 +64,8 @@ LLGroupIconCtrl::LLGroupIconCtrl(const LLGroupIconCtrl::Params& p) } else { - LLIconCtrl::setValue(mDefaultIconName); + //TODO: Consider implementing dedicated setDefault() function instead of passing priority for local file + LLIconCtrl::setValue(mDefaultIconName, LLViewerFetchedTexture::BOOST_UI); } } @@ -73,6 +74,11 @@ LLGroupIconCtrl::~LLGroupIconCtrl() LLGroupMgr::getInstance()->removeObserver(this); } +void LLGroupIconCtrl::setIconId(const LLSD& value) +{ + LLIconCtrl::setValue(value); +} + void LLGroupIconCtrl::setValue(const LLSD& value) { if (value.isUUID()) @@ -91,7 +97,7 @@ void LLGroupIconCtrl::setValue(const LLSD& value) // Check if cache already contains image_id for that group if (!updateFromCache()) { - LLIconCtrl::setValue(mDefaultIconName); + LLIconCtrl::setValue(mDefaultIconName, LLViewerFetchedTexture::BOOST_UI); gm->addObserver(this); gm->sendGroupPropertiesRequest(mGroupId); } @@ -122,7 +128,7 @@ bool LLGroupIconCtrl::updateFromCache() } else { - LLIconCtrl::setValue(mDefaultIconName); + LLIconCtrl::setValue(mDefaultIconName, LLViewerFetchedTexture::BOOST_UI); } if (mDrawTooltip && !group_data->mName.empty()) diff --git a/indra/newview/llgroupiconctrl.h b/indra/newview/llgroupiconctrl.h index f42593c9e1..f8b22cf581 100755 --- a/indra/newview/llgroupiconctrl.h +++ b/indra/newview/llgroupiconctrl.h @@ -66,6 +66,8 @@ public: */ virtual void setValue(const LLSD& value); + void setIconId(const LLSD& value); + // LLGroupMgrObserver observer trigger virtual void changed(LLGroupChange gc); diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp index ef238cefe3..6126db2988 100755 --- a/indra/newview/llgrouplist.cpp +++ b/indra/newview/llgrouplist.cpp @@ -30,7 +30,7 @@ // libs #include "llbutton.h" -#include "lliconctrl.h" +#include "llgroupiconctrl.h" #include "llmenugl.h" #include "lltextbox.h" #include "lltextutil.h" @@ -319,7 +319,7 @@ LLGroupListItem::~LLGroupListItem() //virtual BOOL LLGroupListItem::postBuild() { - mGroupIcon = getChild("group_icon"); + mGroupIcon = getChild("group_icon"); mGroupNameBox = getChild("group_name"); mInfoBtn = getChild("info_btn"); @@ -381,7 +381,7 @@ void LLGroupListItem::setGroupIconID(const LLUUID& group_icon_id) { if (group_icon_id.notNull()) { - mGroupIcon->setValue(group_icon_id); + mGroupIcon->setIconId(group_icon_id); } } diff --git a/indra/newview/llgrouplist.h b/indra/newview/llgrouplist.h index e96a720886..171b77fb00 100755 --- a/indra/newview/llgrouplist.h +++ b/indra/newview/llgrouplist.h @@ -83,7 +83,7 @@ private: }; class LLButton; -class LLIconCtrl; +class LLGroupIconCtrl; class LLTextBox; class LLGroupListItem : public LLPanel @@ -113,7 +113,7 @@ private: LLTextBox* mGroupNameBox; LLUUID mGroupID; - LLIconCtrl* mGroupIcon; + LLGroupIconCtrl* mGroupIcon; LLButton* mInfoBtn; std::string mGroupName; diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp index 366b9ac034..aa934f95a1 100755 --- a/indra/newview/lllocalbitmaps.cpp +++ b/indra/newview/lllocalbitmaps.cpp @@ -135,7 +135,7 @@ LLLocalBitmap::~LLLocalBitmap() } // delete self from gimagelist - LLViewerFetchedTexture* image = gTextureList.findImage(mWorldID, TEX_LIST_DISCARD); + LLViewerFetchedTexture* image = gTextureList.findImage(mWorldID, TEX_LIST_STANDARD); gTextureList.deleteImage(image); if (image) @@ -207,7 +207,7 @@ bool LLLocalBitmap::updateSelf(EUpdateType optional_firstupdate) texture->setCachedRawImage(LL_LOCAL_DISCARD_LEVEL, raw_image); texture->ref(); - gTextureList.addImage(texture, TEX_LIST_DISCARD); + gTextureList.addImage(texture, TEX_LIST_STANDARD); if (optional_firstupdate != UT_FIRSTUSE) { @@ -215,7 +215,7 @@ bool LLLocalBitmap::updateSelf(EUpdateType optional_firstupdate) replaceIDs(old_id, mWorldID); // remove old_id from gimagelist - LLViewerFetchedTexture* image = gTextureList.findImage(old_id, TEX_LIST_DISCARD); + LLViewerFetchedTexture* image = gTextureList.findImage(old_id, TEX_LIST_STANDARD); if (image != NULL) { gTextureList.deleteImage(image); @@ -384,7 +384,7 @@ void LLLocalBitmap::replaceIDs(LLUUID old_id, LLUUID new_id) std::vector LLLocalBitmap::prepUpdateObjects(LLUUID old_id, U32 channel) { std::vector obj_list; - LLViewerFetchedTexture* old_texture = gTextureList.findImage(old_id, TEX_LIST_DISCARD); + LLViewerFetchedTexture* old_texture = gTextureList.findImage(old_id, TEX_LIST_STANDARD); for(U32 face_iterator = 0; face_iterator < old_texture->getNumFaces(channel); face_iterator++) { @@ -502,7 +502,7 @@ void LLLocalBitmap::updateUserPrims(LLUUID old_id, LLUUID new_id, U32 channel) void LLLocalBitmap::updateUserSculpts(LLUUID old_id, LLUUID new_id) { - LLViewerFetchedTexture* old_texture = gTextureList.findImage(old_id, TEX_LIST_DISCARD); + LLViewerFetchedTexture* old_texture = gTextureList.findImage(old_id, TEX_LIST_STANDARD); for(U32 volume_iter = 0; volume_iter < old_texture->getNumVolumes(); volume_iter++) { LLVOVolume* volume_to_object = (*old_texture->getVolumeList())[volume_iter]; diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 551495c6ad..ec2d37c30d 100755 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -2214,7 +2214,7 @@ void LLPanelFace::LLSelectedTE::getTexId(LLUUID& id, bool& identical) LLTextureEntry *te = object->getTE(te_index); if (te) { - LLViewerTexture* tex = te->getID().notNull() ? gTextureList.findImage(te->getID(), TEX_LIST_DISCARD) : NULL; + LLViewerTexture* tex = te->getID().notNull() ? gTextureList.findImage(te->getID(), TEX_LIST_STANDARD) : NULL; if(!tex) { tex = LLViewerFetchedTexture::sDefaultImagep; diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 980810835e..e5aa740a33 100755 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -1393,7 +1393,7 @@ void LLTextureCtrl::setOnTextureSelectedCallback(texture_selected_callback cb) void LLTextureCtrl::setImageAssetName(const std::string& name) { - LLPointer imagep = LLUI::getUIImage(name); + LLPointer imagep = LLUI::getUIImage(name, LLGLTexture::BOOST_PREVIEW); if(imagep) { LLViewerFetchedTexture* pTexture = dynamic_cast(imagep->getImage().get()); diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 27d754bed2..bb93597651 100755 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -4460,7 +4460,7 @@ void LLTextureFetchDebugger::addHistoryEntry(LLTextureFetchWorker* worker) mRefetchedAllData += worker->mFormattedImage->getDataSize(); // refetch list only requests/creates normal images, so requesting ui='false' - LLViewerFetchedTexture* tex = LLViewerTextureManager::findFetchedTexture(worker->mID, TEX_LIST_DISCARD); + LLViewerFetchedTexture* tex = LLViewerTextureManager::findFetchedTexture(worker->mID, TEX_LIST_STANDARD); if(tex && mRefetchList[tex].begin() != mRefetchList[tex].end()) { if(worker->mDecodedDiscard == mFetchingHistory[mRefetchList[tex][0]].mDecodedLevel) diff --git a/indra/newview/lltoastgroupnotifypanel.cpp b/indra/newview/lltoastgroupnotifypanel.cpp index cafe757c1a..f6ca0bc9d7 100755 --- a/indra/newview/lltoastgroupnotifypanel.cpp +++ b/indra/newview/lltoastgroupnotifypanel.cpp @@ -31,7 +31,7 @@ #include "llfocusmgr.h" #include "llbutton.h" -#include "lliconctrl.h" +#include "llgroupiconctrl.h" #include "llinventoryfunctions.h" #include "llinventoryicon.h" #include "llnotifications.h" @@ -65,8 +65,10 @@ LLToastGroupNotifyPanel::LLToastGroupNotifyPanel(const LLNotificationPtr& notifi } //group icon - LLIconCtrl* pGroupIcon = getChild("group_icon", TRUE); - pGroupIcon->setValue(groupData.mInsigniaID); + LLGroupIconCtrl* pGroupIcon = getChild("group_icon", TRUE); + + // We should already have this data preloaded, so no sense in setting icon through setValue(group_id) + pGroupIcon->setIconId(groupData.mInsigniaID); //header title std::string from_name = payload["sender_name"].asString(); diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 3e059f3b68..c5e07f009f 100755 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -3323,7 +3323,7 @@ LLViewerMediaTexture::LLViewerMediaTexture(const LLUUID& id, BOOL usemipmaps, LL setCategory(LLGLTexture::MEDIA); - LLViewerTexture* tex = gTextureList.findImage(mID, TEX_LIST_DISCARD); + LLViewerTexture* tex = gTextureList.findImage(mID, TEX_LIST_STANDARD); if(tex) //this media is a parcel media for tex. { tex->setParcelMedia(this); @@ -3333,7 +3333,7 @@ LLViewerMediaTexture::LLViewerMediaTexture(const LLUUID& id, BOOL usemipmaps, LL //virtual LLViewerMediaTexture::~LLViewerMediaTexture() { - LLViewerTexture* tex = gTextureList.findImage(mID, TEX_LIST_DISCARD); + LLViewerTexture* tex = gTextureList.findImage(mID, TEX_LIST_STANDARD); if(tex) //this media is a parcel media for tex. { tex->setParcelMedia(NULL); @@ -3388,7 +3388,7 @@ BOOL LLViewerMediaTexture::findFaces() BOOL ret = TRUE; - LLViewerTexture* tex = gTextureList.findImage(mID, TEX_LIST_DISCARD); + LLViewerTexture* tex = gTextureList.findImage(mID, TEX_LIST_STANDARD); if(tex) //this media is a parcel media for tex. { for (U32 ch = 0; ch < LLRender::NUM_TEXTURE_CHANNELS; ++ch) @@ -3497,7 +3497,7 @@ void LLViewerMediaTexture::addFace(U32 ch, LLFace* facep) const LLTextureEntry* te = facep->getTextureEntry(); if(te && te->getID().notNull()) { - LLViewerTexture* tex = gTextureList.findImage(te->getID(), TEX_LIST_DISCARD); + LLViewerTexture* tex = gTextureList.findImage(te->getID(), TEX_LIST_STANDARD); if(tex) { mTextureList.push_back(tex);//increase the reference number by one for tex to avoid deleting it. @@ -3526,7 +3526,7 @@ void LLViewerMediaTexture::removeFace(U32 ch, LLFace* facep) const LLTextureEntry* te = facep->getTextureEntry(); if(te && te->getID().notNull()) { - LLViewerTexture* tex = gTextureList.findImage(te->getID(), TEX_LIST_DISCARD); + LLViewerTexture* tex = gTextureList.findImage(te->getID(), TEX_LIST_STANDARD); if(tex) { for(std::list< LLPointer >::iterator iter = mTextureList.begin(); @@ -3635,10 +3635,10 @@ void LLViewerMediaTexture::switchTexture(U32 ch, LLFace* facep) const LLTextureEntry* te = facep->getTextureEntry(); if(te) { - LLViewerTexture* tex = te->getID().notNull() ? gTextureList.findImage(te->getID(), TEX_LIST_DISCARD) : NULL; + LLViewerTexture* tex = te->getID().notNull() ? gTextureList.findImage(te->getID(), TEX_LIST_STANDARD) : NULL; if(!tex && te->getID() != mID)//try parcel media. { - tex = gTextureList.findImage(mID, TEX_LIST_DISCARD); + tex = gTextureList.findImage(mID, TEX_LIST_STANDARD); } if(!tex) { diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index e580ecaba1..4eeb1ca377 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -72,20 +72,14 @@ static LLTrace::BlockTimerStatHandle FTM_PROCESS_IMAGES("Process Images"); ETexListType get_element_type(S32 priority) { - // don't discard flag can be used in some cases, but it usually is not set yet - if (priority == LLViewerFetchedTexture::BOOST_ICON - || priority == LLViewerFetchedTexture::BOOST_UI) - { - return TEX_LIST_UI; - } - return TEX_LIST_DISCARD; + return (priority == LLViewerFetchedTexture::BOOST_ICON) ? TEX_LIST_SCALE : TEX_LIST_STANDARD; } /////////////////////////////////////////////////////////////////////////////// LLTextureKey::LLTextureKey() : textureId(LLUUID::null), -textureType(TEX_LIST_DISCARD) +textureType(TEX_LIST_STANDARD) { } @@ -591,7 +585,7 @@ LLViewerFetchedTexture* LLViewerTextureList::createImage(const LLUUID &image_id, void LLViewerTextureList::findTexturesByID(const LLUUID &image_id, std::vector &output) { - LLTextureKey search_key(image_id, TEX_LIST_DISCARD); + LLTextureKey search_key(image_id, TEX_LIST_STANDARD); uuid_map_t::iterator iter = mUUIDMap.lower_bound(search_key); while (iter != mUUIDMap.end() && iter->first.textureId == image_id) { @@ -1597,14 +1591,14 @@ void LLViewerTextureList::processImageNotInDatabase(LLMessageSystem *msg,void ** LLUUID image_id; msg->getUUIDFast(_PREHASH_ImageID, _PREHASH_ID, image_id); - LLViewerFetchedTexture* image = gTextureList.findImage( image_id, TEX_LIST_DISCARD); + LLViewerFetchedTexture* image = gTextureList.findImage( image_id, TEX_LIST_STANDARD); if( image ) { LL_WARNS() << "Image not in db" << LL_ENDL; image->setIsMissingAsset(); } - image = gTextureList.findImage(image_id, TEX_LIST_UI); + image = gTextureList.findImage(image_id, TEX_LIST_SCALE); if (image) { LL_WARNS() << "Icon not in db" << LL_ENDL; diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h index 9f94f2f1bc..ba76770838 100755 --- a/indra/newview/llviewertexturelist.h +++ b/indra/newview/llviewertexturelist.h @@ -61,8 +61,8 @@ typedef void (*LLImageCallback)(BOOL success, enum ETexListType { - TEX_LIST_DISCARD = 0, - TEX_LIST_UI + TEX_LIST_STANDARD = 0, + TEX_LIST_SCALE }; struct LLTextureKey diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index a26b5e0a98..6f96eb9772 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1992,7 +1992,7 @@ LLViewerFetchedTexture *LLVOAvatar::getBakedTextureImage(const U8 te, const LLUU uuid == IMG_INVISIBLE) { // Should already exist, don't need to find it on sim or baked-texture host. - result = gTextureList.findImage(uuid, TEX_LIST_DISCARD); + result = gTextureList.findImage(uuid, TEX_LIST_STANDARD); } if (!result) { @@ -4313,7 +4313,7 @@ bool LLVOAvatar::allTexturesCompletelyDownloaded(std::set& ids) const { for (std::set::const_iterator it = ids.begin(); it != ids.end(); ++it) { - LLViewerFetchedTexture *imagep = gTextureList.findImage(*it, TEX_LIST_DISCARD); + LLViewerFetchedTexture *imagep = gTextureList.findImage(*it, TEX_LIST_STANDARD); if (imagep && imagep->getDiscardLevel()!=0) { return false; @@ -4385,7 +4385,7 @@ S32Bytes LLVOAvatar::totalTextureMemForUUIDS(std::set& ids) S32Bytes result(0); for (std::set::const_iterator it = ids.begin(); it != ids.end(); ++it) { - LLViewerFetchedTexture *imagep = gTextureList.findImage(*it, TEX_LIST_DISCARD); + LLViewerFetchedTexture *imagep = gTextureList.findImage(*it, TEX_LIST_STANDARD); if (imagep) { result += imagep->getTextureMemory(); @@ -4473,7 +4473,7 @@ void LLVOAvatar::releaseOldTextures() { if (new_texture_ids.find(*it) == new_texture_ids.end()) { - LLViewerFetchedTexture *imagep = gTextureList.findImage(*it, TEX_LIST_DISCARD); + LLViewerFetchedTexture *imagep = gTextureList.findImage(*it, TEX_LIST_STANDARD); if (imagep) { current_texture_mem += imagep->getTextureMemory(); diff --git a/indra/newview/skins/default/xui/en/panel_group_list_item.xml b/indra/newview/skins/default/xui/en/panel_group_list_item.xml index cfe3aeb7c9..e758a8ce30 100755 --- a/indra/newview/skins/default/xui/en/panel_group_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_group_list_item.xml @@ -27,7 +27,7 @@ top="0" visible="false" width="320" /> - -