summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/lldockablefloater.cpp4
-rw-r--r--indra/llui/lldockablefloater.h2
-rw-r--r--indra/llui/llsearcheditor.cpp7
-rw-r--r--indra/lscript/lscript_compile/lscript_tree.cpp2
-rw-r--r--indra/lscript/lscript_compile/lscript_tree.h4
-rw-r--r--indra/newview/llagent.cpp4
-rw-r--r--indra/newview/llagent.h2
-rw-r--r--indra/newview/llagentwearables.cpp41
-rw-r--r--indra/newview/llcallfloater.cpp5
-rw-r--r--indra/newview/llcallingcard.cpp17
-rw-r--r--indra/newview/llchathistory.cpp35
-rw-r--r--indra/newview/llface.cpp45
-rw-r--r--indra/newview/llface.h2
-rw-r--r--indra/newview/llfloatergesture.cpp12
-rw-r--r--indra/newview/llfloaterwater.cpp2
-rw-r--r--indra/newview/llfloaterwindlight.cpp2
-rw-r--r--indra/newview/llimfloater.cpp1
-rw-r--r--indra/newview/llimfloatercontainer.cpp2
-rw-r--r--indra/newview/llinventorybridge.cpp5
-rw-r--r--indra/newview/llnotificationalerthandler.cpp6
-rw-r--r--indra/newview/llpanelgroupinvite.cpp40
-rw-r--r--indra/newview/llpanelgroupinvite.h4
-rw-r--r--indra/newview/llscriptfloater.cpp113
-rw-r--r--indra/newview/llscriptfloater.h34
-rw-r--r--indra/newview/llsearchcombobox.cpp1
-rw-r--r--indra/newview/lltexturefetch.cpp7
-rw-r--r--indra/newview/lltoastnotifypanel.cpp9
-rw-r--r--indra/newview/llviewerobjectlist.h4
-rw-r--r--indra/newview/llviewertexture.cpp31
-rw-r--r--indra/newview/llvovolume.cpp4
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_notices.xml1
-rw-r--r--indra/newview/skins/default/xui/en/widgets/filter_editor.xml4
-rw-r--r--indra/newview/skins/default/xui/en/widgets/search_editor.xml8
33 files changed, 323 insertions, 137 deletions
diff --git a/indra/llui/lldockablefloater.cpp b/indra/llui/lldockablefloater.cpp
index 57baf28dab..a94f0206a6 100644
--- a/indra/llui/lldockablefloater.cpp
+++ b/indra/llui/lldockablefloater.cpp
@@ -223,10 +223,10 @@ void LLDockableFloater::draw()
LLFloater::draw();
}
-void LLDockableFloater::setDockControl(LLDockControl* dockControl)
+void LLDockableFloater::setDockControl(LLDockControl* dockControl, bool docked /* = true */)
{
mDockControl.reset(dockControl);
- setDocked(mDockControl.get() != NULL && mDockControl.get()->isDockVisible());
+ setDocked(docked && mDockControl.get() != NULL && mDockControl.get()->isDockVisible());
}
const LLUIImagePtr& LLDockableFloater::getDockTongue()
diff --git a/indra/llui/lldockablefloater.h b/indra/llui/lldockablefloater.h
index 2b1ce99ae2..4d747390af 100644
--- a/indra/llui/lldockablefloater.h
+++ b/indra/llui/lldockablefloater.h
@@ -127,7 +127,7 @@ private:
void resetInstance();
protected:
- void setDockControl(LLDockControl* dockControl);
+ void setDockControl(LLDockControl* dockControl, bool docked = true);
const LLUIImagePtr& getDockTongue();
private:
diff --git a/indra/llui/llsearcheditor.cpp b/indra/llui/llsearcheditor.cpp
index 6fa99df82e..491eeeab54 100644
--- a/indra/llui/llsearcheditor.cpp
+++ b/indra/llui/llsearcheditor.cpp
@@ -60,6 +60,7 @@ LLSearchEditor::LLSearchEditor(const LLSearchEditor::Params& p)
line_editor_params.keystroke_callback(boost::bind(&LLSearchEditor::handleKeystroke, this));
mSearchEditor = LLUICtrlFactory::create<LLLineEditor>(line_editor_params);
+ mSearchEditor->setPassDelete(TRUE);
addChild(mSearchEditor);
if (p.search_button_visible)
@@ -79,10 +80,12 @@ LLSearchEditor::LLSearchEditor(const LLSearchEditor::Params& p)
if (p.clear_button_visible)
{
// Set up clear button.
- S32 clr_btn_width = getRect().getHeight(); // button is square, and as tall as search editor
- LLRect clear_btn_rect(getRect().getWidth() - clr_btn_width, getRect().getHeight(), getRect().getWidth(), 0);
LLButton::Params clr_btn_params(p.clear_button);
clr_btn_params.name(std::string("clear button"));
+ S32 clr_btn_top = clr_btn_params.rect.bottom + clr_btn_params.rect.height;
+ S32 clr_btn_right = getRect().getWidth() - clr_btn_params.pad_right;
+ S32 clr_btn_left = clr_btn_right - clr_btn_params.rect.width;
+ LLRect clear_btn_rect(clr_btn_left, clr_btn_top, clr_btn_right, p.clear_button.rect.bottom);
clr_btn_params.rect(clear_btn_rect) ;
clr_btn_params.follows.flags(FOLLOWS_RIGHT|FOLLOWS_TOP);
clr_btn_params.tab_stop(false);
diff --git a/indra/lscript/lscript_compile/lscript_tree.cpp b/indra/lscript/lscript_compile/lscript_tree.cpp
index 3b8bbbe805..4ba41db2fc 100644
--- a/indra/lscript/lscript_compile/lscript_tree.cpp
+++ b/indra/lscript/lscript_compile/lscript_tree.cpp
@@ -10626,6 +10626,8 @@ LLScriptScript::LLScriptScript(LLScritpGlobalStorage *globals,
}
temp = temp->mNextp;
}
+
+ mClassName[0] = '\0';
}
void LLScriptScript::setBytecodeDest(const char* dst_filename)
diff --git a/indra/lscript/lscript_compile/lscript_tree.h b/indra/lscript/lscript_compile/lscript_tree.h
index a667e1eb5b..7de9606dfc 100644
--- a/indra/lscript/lscript_compile/lscript_tree.h
+++ b/indra/lscript/lscript_compile/lscript_tree.h
@@ -1876,7 +1876,7 @@ class LLScriptStateChange : public LLScriptStatement
{
public:
LLScriptStateChange(S32 line, S32 col, LLScriptIdentifier *identifier)
- : LLScriptStatement(line, col, LSSMT_STATE_CHANGE), mIdentifier(identifier)
+ : LLScriptStatement(line, col, LSSMT_STATE_CHANGE), mIdentifier(identifier), mReturnType(LST_NULL)
{
}
@@ -2210,7 +2210,7 @@ class LLScriptState : public LLScriptFilePosition
{
public:
LLScriptState(S32 line, S32 col, LSCRIPTStateType type, LLScriptIdentifier *identifier, LLScriptEventHandler *event)
- : LLScriptFilePosition(line, col), mType(type), mIdentifier(identifier), mEvent(event), mNextp(NULL)
+ : LLScriptFilePosition(line, col), mType(type), mIdentifier(identifier), mEvent(event), mNextp(NULL), mStateScope(NULL)
{
}
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 59f61dfdfb..7929946620 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -5027,9 +5027,9 @@ void LLAgent::buildFullnameAndTitle(std::string& name) const
}
}
-BOOL LLAgent::isInGroup(const LLUUID& group_id) const
+BOOL LLAgent::isInGroup(const LLUUID& group_id, BOOL ingnore_God_mod /* FALSE */) const
{
- if (isGodlike())
+ if (!ingnore_God_mod && isGodlike())
return true;
S32 count = mGroups.count();
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index beede7fbe3..1573fd7131 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -982,7 +982,7 @@ private:
//--------------------------------------------------------------------
public:
// Checks against all groups in the entire agent group list.
- BOOL isInGroup(const LLUUID& group_id) const;
+ BOOL isInGroup(const LLUUID& group_id, BOOL ingnore_God_mod = FALSE) const;
protected:
// Only used for building titles.
BOOL isGroupMember() const { return !mGroupID.isNull(); }
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index a439720dcf..def6e60abd 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -1605,31 +1605,32 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
LLWearable* new_wearable = wearables[i];
LLPointer<LLInventoryItem> new_item = items[i];
- const EWearableType type = new_wearable->getType();
- wearables_to_remove[type] = FALSE;
-
- // MULTI_WEARABLE: using 0th
- LLWearable* old_wearable = getWearable(type, 0);
- if (old_wearable)
+ llassert(new_wearable);
+ if (new_wearable)
{
- const LLUUID& old_item_id = getWearableItemID(type, 0);
- if ((old_wearable->getAssetID() == new_wearable->getAssetID()) &&
- (old_item_id == new_item->getUUID()))
- {
- lldebugs << "No change to wearable asset and item: " << LLWearableDictionary::getInstance()->getWearableEntry(type) << llendl;
- continue;
- }
+ const EWearableType type = new_wearable->getType();
+ wearables_to_remove[type] = FALSE;
- // Assumes existing wearables are not dirty.
- if (old_wearable->isDirty())
+ // MULTI_WEARABLE: using 0th
+ LLWearable* old_wearable = getWearable(type, 0);
+ if (old_wearable)
{
- llassert(0);
- continue;
+ const LLUUID& old_item_id = getWearableItemID(type, 0);
+ if ((old_wearable->getAssetID() == new_wearable->getAssetID()) &&
+ (old_item_id == new_item->getUUID()))
+ {
+ lldebugs << "No change to wearable asset and item: " << LLWearableDictionary::getInstance()->getWearableEntry(type) << llendl;
+ continue;
+ }
+
+ // Assumes existing wearables are not dirty.
+ if (old_wearable->isDirty())
+ {
+ llassert(0);
+ continue;
+ }
}
- }
- if (new_wearable)
- {
new_wearable->setItemID(new_item->getUUID());
setWearable(type,0,new_wearable);
}
diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp
index 0aaaa8e705..76e058a1c3 100644
--- a/indra/newview/llcallfloater.cpp
+++ b/indra/newview/llcallfloater.cpp
@@ -304,7 +304,9 @@ void LLCallFloater::updateSession()
updateAgentModeratorState();
//show floater for voice calls & only in CONNECTED to voice channel state
- if (!is_local_chat && LLVoiceChannel::STATE_CONNECTED == voice_channel->getState())
+ if (!is_local_chat &&
+ voice_channel &&
+ LLVoiceChannel::STATE_CONNECTED == voice_channel->getState())
{
LLIMFloater* im_floater = LLIMFloater::findInstance(session_id);
bool show_me = !(im_floater && im_floater->getVisible());
@@ -333,6 +335,7 @@ void LLCallFloater::refreshParticipantList()
{
mParticipants = new LLParticipantList(mSpeakerManager, mAvatarList, true, mVoiceType != VC_GROUP_CHAT && mVoiceType != VC_AD_HOC_CHAT);
mParticipants->setValidateSpeakerCallback(boost::bind(&LLCallFloater::validateSpeaker, this, _1));
+ mParticipants->setSortOrder(LLParticipantList::E_SORT_BY_RECENT_SPEAKERS);
if (LLLocalSpeakerMgr::getInstance() == mSpeakerManager)
{
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/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 7a5d8be84a..9368d9cb7c 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -259,7 +259,9 @@ public:
mSessionID = chat.mSessionID;
mSourceType = chat.mSourceType;
gCacheName->get(mAvatarID, FALSE, boost::bind(&LLChatHistoryHeader::nameUpdatedCallback, this, _1, _2, _3, _4));
- if(chat.mFromID.isNull())
+
+ //*TODO overly defensive thing, source type should be maintained out there
+ if(chat.mFromID.isNull() || chat.mFromName == SYSTEM_FROM)
{
mSourceType = CHAT_SOURCE_SYSTEM;
}
@@ -269,17 +271,13 @@ public:
userName->setReadOnlyColor(style_params.readonly_color());
userName->setColor(style_params.color());
- if(!chat.mFromName.empty())
- {
- userName->setValue(chat.mFromName);
- mFrom = chat.mFromName;
- }
- else
+ userName->setValue(chat.mFromName);
+ if (chat.mFromName.empty() || CHAT_SOURCE_SYSTEM == mSourceType)
{
- std::string SL = LLTrans::getString("SECOND_LIFE");
- userName->setValue(SL);
+ userName->setValue(LLTrans::getString("SECOND_LIFE"));
}
+
mMinUserNameWidth = style_params.font()->getWidth(userName->getWText().c_str()) + PADDING;
setTimeField(chat);
@@ -289,20 +287,17 @@ public:
if(mSourceType != CHAT_SOURCE_AGENT)
icon->setDrawTooltip(false);
- if(!chat.mFromID.isNull())
+ switch (mSourceType)
{
- if(mSourceType != CHAT_SOURCE_AGENT)
- icon->setValue(LLSD("OBJECT_Icon"));
- else
+ case CHAT_SOURCE_AGENT:
icon->setValue(chat.mFromID);
-
-
- }
- else if (userName->getValue().asString()==LLTrans::getString("SECOND_LIFE"))
- {
- icon->setValue(LLSD("SL_Logo"));
+ break;
+ case CHAT_SOURCE_OBJECT:
+ icon->setValue(LLSD("OBJECT_Icon"));
+ break;
+ case CHAT_SOURCE_SYSTEM:
+ icon->setValue(LLSD("SL_Logo"));
}
-
}
/*virtual*/ void draw()
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index c0a3eb1316..80acc71a41 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 ;
}
@@ -1348,11 +1349,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;
}
@@ -1389,30 +1391,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 ;
@@ -1426,11 +1434,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 ;
@@ -1441,7 +1444,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/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp
index 90617a337a..9c1ac2631d 100644
--- a/indra/newview/llfloatergesture.cpp
+++ b/indra/newview/llfloatergesture.cpp
@@ -203,12 +203,12 @@ BOOL LLFloaterGesture::postBuild()
gInventory.addObserver(this);
fetchDescendents(folders);
- buildGestureList();
-
- mGestureList->setFocus(TRUE);
-
if (mGestureList)
{
+ buildGestureList();
+
+ mGestureList->setFocus(TRUE);
+
const BOOL ascending = TRUE;
mGestureList->sortByColumn(std::string("name"), ascending);
mGestureList->selectFirstItem();
@@ -223,10 +223,10 @@ BOOL LLFloaterGesture::postBuild()
void LLFloaterGesture::refreshAll()
{
- buildGestureList();
-
if (!mGestureList) return;
+ buildGestureList();
+
if (mSelectedID.isNull())
{
mGestureList->selectFirstItem();
diff --git a/indra/newview/llfloaterwater.cpp b/indra/newview/llfloaterwater.cpp
index 66a1f6701f..1bbee2625c 100644
--- a/indra/newview/llfloaterwater.cpp
+++ b/indra/newview/llfloaterwater.cpp
@@ -574,12 +574,10 @@ bool LLFloaterWater::deleteAlertCallback(const LLSD& notification, const LLSD& r
LLComboBox* combo_box = getChild<LLComboBox>("WaterPresetsCombo");
LLFloaterDayCycle* day_cycle = LLFloaterReg::findTypedInstance<LLFloaterDayCycle>("env_day_cycle");
LLComboBox* key_combo = NULL;
- LLMultiSliderCtrl* mult_sldr = NULL;
if (day_cycle)
{
key_combo = day_cycle->getChild<LLComboBox>("WaterKeyPresets");
- mult_sldr = day_cycle->getChild<LLMultiSliderCtrl>("WaterDayCycleKeys");
}
std::string name = combo_box->getSelectedValue().asString();
diff --git a/indra/newview/llfloaterwindlight.cpp b/indra/newview/llfloaterwindlight.cpp
index ea6fda7303..c1b15c578c 100644
--- a/indra/newview/llfloaterwindlight.cpp
+++ b/indra/newview/llfloaterwindlight.cpp
@@ -749,12 +749,10 @@ bool LLFloaterWindLight::deleteAlertCallback(const LLSD& notification, const LLS
LLComboBox* combo_box = getChild<LLComboBox>("WLPresetsCombo");
LLFloaterDayCycle* day_cycle = LLFloaterReg::findTypedInstance<LLFloaterDayCycle>("env_day_cycle");
LLComboBox* key_combo = NULL;
- LLMultiSliderCtrl* mult_sldr = NULL;
if (day_cycle)
{
key_combo = day_cycle->getChild<LLComboBox>("WLKeyPresets");
- mult_sldr = day_cycle->getChild<LLMultiSliderCtrl>("WLDayCycleKeys");
}
std::string name(combo_box->getSelectedValue().asString());
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/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp
index 7162386d08..49521b5987 100644
--- a/indra/newview/llimfloatercontainer.cpp
+++ b/indra/newview/llimfloatercontainer.cpp
@@ -93,7 +93,7 @@ void LLIMFloaterContainer::addFloater(LLFloater* floaterp,
LLIconCtrl* icon = 0;
- if(gAgent.isInGroup(session_id))
+ if(gAgent.isInGroup(session_id, TRUE))
{
LLGroupIconCtrl::Params icon_params = LLUICtrlFactory::instance().getDefaultParams<LLGroupIconCtrl>();
icon_params.group_id = session_id;
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index da95eaefca..019a4b22c3 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -2434,7 +2434,10 @@ void LLFolderBridge::pasteFromClipboard()
//we have to update inventory locally too
LLViewerInventoryItem* viitem = dynamic_cast<LLViewerInventoryItem*>(item);
llassert(viitem);
- changeItemParent(model, viitem, parent_id, FALSE);
+ if (viitem)
+ {
+ changeItemParent(model, viitem, parent_id, FALSE);
+ }
}
else
{
diff --git a/indra/newview/llnotificationalerthandler.cpp b/indra/newview/llnotificationalerthandler.cpp
index 52de8355e9..60e41b64ac 100644
--- a/indra/newview/llnotificationalerthandler.cpp
+++ b/indra/newview/llnotificationalerthandler.cpp
@@ -36,6 +36,7 @@
#include "llnotificationhandler.h"
#include "llnotifications.h"
+#include "llprogressview.h"
#include "lltoastnotifypanel.h"
#include "llviewercontrol.h"
#include "llviewerwindow.h"
@@ -116,6 +117,11 @@ bool LLAlertHandler::processNotification(const LLSD& notify)
p.is_modal = mIsModal;
p.on_delete_toast = boost::bind(&LLAlertHandler::onDeleteToast, this, _1);
+ // Show alert in middle of progress view (during teleport) (EXT-1093)
+ LLProgressView* progress = gViewerWindow->getProgressView();
+ LLRect rc = progress && progress->getVisible() ? progress->getRect() : gViewerWindow->getWorldViewRectScaled();
+ mChannel->updatePositionAndSize(rc, rc);
+
LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
if(channel)
channel->addToast(p);
diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp
index 06a682c905..05261a65de 100644
--- a/indra/newview/llpanelgroupinvite.cpp
+++ b/indra/newview/llpanelgroupinvite.cpp
@@ -36,6 +36,7 @@
#include "llagent.h"
#include "llfloateravatarpicker.h"
#include "llbutton.h"
+#include "llcallingcard.h"
#include "llcombobox.h"
#include "llgroupactions.h"
#include "llgroupmgr.h"
@@ -405,16 +406,13 @@ void LLPanelGroupInvite::addUsers(std::vector<LLUUID>& agent_ids)
{
LLUUID agent_id = agent_ids[i];
LLViewerObject* dest = gObjectList.findObject(agent_id);
+ std::string fullname;
if(dest && dest->isAvatar())
{
- std::string fullname;
- LLSD args;
LLNameValue* nvfirst = dest->getNVPair("FirstName");
LLNameValue* nvlast = dest->getNVPair("LastName");
if(nvfirst && nvlast)
{
- args["FIRST"] = std::string(nvfirst->getString());
- args["LAST"] = std::string(nvlast->getString());
fullname = std::string(nvfirst->getString()) + " " + std::string(nvlast->getString());
}
if (!fullname.empty())
@@ -427,10 +425,44 @@ void LLPanelGroupInvite::addUsers(std::vector<LLUUID>& agent_ids)
names.push_back("(Unknown)");
}
}
+ else
+ {
+ //looks like user try to invite offline friend
+ //for offline avatar_id gObjectList.findObject() will return null
+ //so we need to do this additional search in avatar tracker, see EXT-4732
+ if (LLAvatarTracker::instance().isBuddy(agent_id))
+ {
+ if (!gCacheName->getFullName(agent_id, fullname))
+ {
+ // actually it should happen, just in case
+ gCacheName->get(LLUUID(agent_id), false, boost::bind(
+ &LLPanelGroupInvite::addUserCallback, this, _1, _2,
+ _3));
+ // for this special case!
+ //when there is no cached name we should remove resident from agent_ids list to avoid breaking of sequence
+ // removed id will be added in callback
+ agent_ids.erase(agent_ids.begin() + i);
+ }
+ else
+ {
+ names.push_back(fullname);
+ }
+ }
+ }
}
mImplementation->addUsers(names, agent_ids);
}
+void LLPanelGroupInvite::addUserCallback(const LLUUID& id, const std::string& first_name, const std::string& last_name)
+{
+ std::vector<std::string> names;
+ std::vector<LLUUID> agent_ids;
+ std::string full_name = first_name + " " + last_name;
+ agent_ids.push_back(id);
+ names.push_back(first_name + " " + last_name);
+
+ mImplementation->addUsers(names, agent_ids);
+}
void LLPanelGroupInvite::draw()
{
LLPanel::draw();
diff --git a/indra/newview/llpanelgroupinvite.h b/indra/newview/llpanelgroupinvite.h
index 37135b488a..b095dd2395 100644
--- a/indra/newview/llpanelgroupinvite.h
+++ b/indra/newview/llpanelgroupinvite.h
@@ -43,6 +43,10 @@ public:
~LLPanelGroupInvite();
void addUsers(std::vector<LLUUID>& agent_ids);
+ /**
+ * this callback is being used to add a user whose fullname isn't been loaded before invoking of addUsers().
+ */
+ void addUserCallback(const LLUUID& id, const std::string& first_name, const std::string& last_name);
void clear();
void update();
diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp
index a81ec61263..d452ef2228 100644
--- a/indra/newview/llscriptfloater.cpp
+++ b/indra/newview/llscriptfloater.cpp
@@ -67,6 +67,7 @@ LLUUID notification_id_to_object_id(const LLUUID& notification_id)
LLScriptFloater::LLScriptFloater(const LLSD& key)
: LLDockableFloater(NULL, true, key)
, mScriptForm(NULL)
+, mSaveFloaterPosition(false)
{
setMouseDownCallback(boost::bind(&LLScriptFloater::onMouseDown, this));
setOverlapsScreenChannel(true);
@@ -105,27 +106,29 @@ LLScriptFloater* LLScriptFloater::show(const LLUUID& notification_id)
LLScriptFloater* floater = LLFloaterReg::getTypedInstance<LLScriptFloater>("script_floater", notification_id);
floater->setNotificationId(notification_id);
floater->createForm(notification_id);
- LLFloaterReg::showTypedInstance<LLScriptFloater>("script_floater", notification_id, TRUE);
- if (floater->getDockControl() == NULL)
+ if(LLScriptFloaterManager::OBJ_SCRIPT == LLScriptFloaterManager::getObjectType(notification_id))
{
- LLChiclet* chiclet = LLBottomTray::getInstance()->getChicletPanel()->findChiclet<LLChiclet>(notification_id);
- if (chiclet == NULL)
- {
- llerror("Dock chiclet for LLScriptFloater doesn't exist", 0);
- }
- else
- {
- LLBottomTray::getInstance()->getChicletPanel()->scrollToChiclet(chiclet);
- }
-
- floater->setDockControl(new LLDockControl(chiclet, floater, floater->getDockTongue(),
- LLDockControl::TOP, boost::bind(&LLScriptFloater::getAllowedRect, floater, _1)));
+ floater->setSavePosition(true);
+ floater->restorePosition();
+ }
+ else
+ {
+ floater->dockToChiclet(true);
}
+ LLFloaterReg::showTypedInstance<LLScriptFloater>("script_floater", notification_id, TRUE);
+
return floater;
}
+void LLScriptFloater::setNotificationId(const LLUUID& id)
+{
+ mNotificationId = id;
+ // Lets save object id now while notification exists
+ mObjectId = notification_id_to_object_id(id);
+}
+
void LLScriptFloater::getAllowedRect(LLRect& rect)
{
rect = gViewerWindow->getWorldViewRectRaw();
@@ -162,6 +165,8 @@ void LLScriptFloater::createForm(const LLUUID& notification_id)
void LLScriptFloater::onClose(bool app_quitting)
{
+ savePosition();
+
if(getNotificationId().notNull())
{
LLScriptFloaterManager::getInstance()->onRemoveNotification(getNotificationId());
@@ -172,6 +177,8 @@ void LLScriptFloater::setDocked(bool docked, bool pop_on_undock /* = true */)
{
LLDockableFloater::setDocked(docked, pop_on_undock);
+ savePosition();
+
hideToastsIfNeeded();
}
@@ -208,6 +215,33 @@ void LLScriptFloater::onMouseDown()
}
}
+void LLScriptFloater::savePosition()
+{
+ if(getSavePosition() && mObjectId.notNull())
+ {
+ LLScriptFloaterManager::FloaterPositionInfo fpi = {getRect(), isDocked()};
+ LLScriptFloaterManager::getInstance()->saveFloaterPosition(mObjectId, fpi);
+ }
+}
+
+void LLScriptFloater::restorePosition()
+{
+ LLScriptFloaterManager::FloaterPositionInfo fpi;
+ if(LLScriptFloaterManager::getInstance()->getFloaterPosition(mObjectId, fpi))
+ {
+ dockToChiclet(fpi.mDockState);
+ if(!fpi.mDockState)
+ {
+ // Un-docked floater is opened in 0,0, now move it to saved position
+ translate(fpi.mRect.mLeft - getRect().mLeft, fpi.mRect.mTop - getRect().mTop);
+ }
+ }
+ else
+ {
+ dockToChiclet(true);
+ }
+}
+
void LLScriptFloater::onFocusLost()
{
if(getNotificationId().notNull())
@@ -225,6 +259,33 @@ void LLScriptFloater::onFocusReceived()
}
}
+void LLScriptFloater::dockToChiclet(bool dock)
+{
+ if (getDockControl() == NULL)
+ {
+ LLChiclet* chiclet = LLBottomTray::getInstance()->getChicletPanel()->findChiclet<LLChiclet>(getNotificationId());
+ if (chiclet == NULL)
+ {
+ llwarns << "Dock chiclet for LLScriptFloater doesn't exist" << llendl;
+ return;
+ }
+ else
+ {
+ LLBottomTray::getInstance()->getChicletPanel()->scrollToChiclet(chiclet);
+ }
+
+ // Stop saving position while we dock floater
+ bool save = getSavePosition();
+ setSavePosition(false);
+
+ setDockControl(new LLDockControl(chiclet, this, getDockTongue(),
+ LLDockControl::TOP, boost::bind(&LLScriptFloater::getAllowedRect, this, _1)), dock);
+
+ // Restore saving
+ setSavePosition(save);
+ }
+}
+
void LLScriptFloater::hideToastsIfNeeded()
{
using namespace LLNotificationsUI;
@@ -326,6 +387,7 @@ void LLScriptFloaterManager::onRemoveNotification(const LLUUID& notification_id)
LLScriptFloater* floater = LLFloaterReg::findTypedInstance<LLScriptFloater>("script_floater", notification_id);
if(floater)
{
+ floater->savePosition();
floater->setNotificationId(LLUUID::null);
floater->closeFloater();
}
@@ -445,4 +507,27 @@ LLScriptFloaterManager::script_notification_map_t::const_iterator LLScriptFloate
return mNotifications.end();
}
+void LLScriptFloaterManager::saveFloaterPosition(const LLUUID& object_id, const FloaterPositionInfo& fpi)
+{
+ if(object_id.notNull())
+ {
+ LLScriptFloaterManager::getInstance()->mFloaterPositions[object_id] = fpi;
+ }
+ else
+ {
+ llwarns << "Invalid object id" << llendl;
+ }
+}
+
+bool LLScriptFloaterManager::getFloaterPosition(const LLUUID& object_id, FloaterPositionInfo& fpi)
+{
+ floater_position_map_t::const_iterator it = mFloaterPositions.find(object_id);
+ if(LLScriptFloaterManager::getInstance()->mFloaterPositions.end() != it)
+ {
+ fpi = it->second;
+ return true;
+ }
+ return false;
+}
+
// EOF
diff --git a/indra/newview/llscriptfloater.h b/indra/newview/llscriptfloater.h
index f7efff83f9..ec3ec4b540 100644
--- a/indra/newview/llscriptfloater.h
+++ b/indra/newview/llscriptfloater.h
@@ -84,16 +84,21 @@ public:
static std::string getObjectName(const LLUUID& notification_id);
- /**
- * Callback for notification toast buttons.
- */
- static void onToastButtonClick(const LLSD&notification, const LLSD&response);
-
typedef boost::signals2::signal<void(const LLSD&)> object_signal_t;
boost::signals2::connection addNewObjectCallback(const object_signal_t::slot_type& cb) { return mNewObjectSignal.connect(cb); }
boost::signals2::connection addToggleObjectFloaterCallback(const object_signal_t::slot_type& cb) { return mToggleFloaterSignal.connect(cb); }
+ struct FloaterPositionInfo
+ {
+ LLRect mRect;
+ bool mDockState;
+ };
+
+ void saveFloaterPosition(const LLUUID& object_id, const FloaterPositionInfo& fpi);
+
+ bool getFloaterPosition(const LLUUID& object_id, FloaterPositionInfo& fpi);
+
protected:
typedef std::map<std::string, EObjectType> object_type_map;
@@ -111,6 +116,11 @@ private:
object_signal_t mNewObjectSignal;
object_signal_t mToggleFloaterSignal;
+
+ // <object_id, floater position>
+ typedef std::map<LLUUID, FloaterPositionInfo> floater_position_map_t;
+
+ floater_position_map_t mFloaterPositions;
};
/**
@@ -141,7 +151,7 @@ public:
const LLUUID& getNotificationId() { return mNotificationId; }
- void setNotificationId(const LLUUID& id) { mNotificationId = id; }
+ void setNotificationId(const LLUUID& id);
/**
* Close notification if script floater is closed.
@@ -158,6 +168,14 @@ public:
*/
/*virtual*/ void setVisible(BOOL visible);
+ bool getSavePosition() { return mSaveFloaterPosition; }
+
+ void setSavePosition(bool save) { mSaveFloaterPosition = save; }
+
+ void savePosition();
+
+ void restorePosition();
+
protected:
/**
@@ -181,9 +199,13 @@ protected:
/*virtual*/ void onFocusReceived();
+ void dockToChiclet(bool dock);
+
private:
LLToastNotifyPanel* mScriptForm;
LLUUID mNotificationId;
+ LLUUID mObjectId;
+ bool mSaveFloaterPosition;
};
#endif //LL_SCRIPTFLOATER_H
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/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/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h
index ace5c5038e..2858081dc9 100644
--- a/indra/newview/llviewerobjectlist.h
+++ b/indra/newview/llviewerobjectlist.h
@@ -233,6 +233,10 @@ public:
extern LLViewerObjectList gObjectList;
// Inlines
+/**
+ * Note:
+ * it will return NULL for offline avatar_id
+ */
inline LLViewerObject *LLViewerObjectList::findObject(const LLUUID &id)
{
std::map<LLUUID, LLPointer<LLViewerObject> >::iterator iter = mUUIDObjectMap.find(id);
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 984f003411..b66f58d853 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -1519,12 +1519,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;
@@ -2342,14 +2342,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 ;
@@ -2699,7 +2693,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) ;
@@ -2885,12 +2879,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 bfe38c14ba..fa00396c34 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -679,6 +679,7 @@ void LLVOVolume::updateTextureVirtualSize()
vsize = area;
imagep->setBoostLevel(LLViewerTexture::BOOST_HUD);
face->setPixelArea(area); // treat as full screen
+ face->setVirtualSize(vsize);
}
else
{
@@ -695,8 +696,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/panel_group_notices.xml b/indra/newview/skins/default/xui/en/panel_group_notices.xml
index 1f16aea2ef..5f46ad7860 100644
--- a/indra/newview/skins/default/xui/en/panel_group_notices.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_notices.xml
@@ -159,7 +159,6 @@ Maximum 200 per group daily
left_pad="3"
max_length="511"
name="create_message"
- text_type="ascii"
top_delta="0"
width="220"
word_wrap="true" />
diff --git a/indra/newview/skins/default/xui/en/widgets/filter_editor.xml b/indra/newview/skins/default/xui/en/widgets/filter_editor.xml
index 1228f6be3d..0720621f0b 100644
--- a/indra/newview/skins/default/xui/en/widgets/filter_editor.xml
+++ b/indra/newview/skins/default/xui/en/widgets/filter_editor.xml
@@ -16,6 +16,6 @@
image_unselected="Search"
image_selected="Search" />
<clear_button label=""
- image_unselected="Icon_Close_Foreground"
- image_selected="Icon_Close_Press" />
+ image_unselected="Icon_Close_Toast"
+ image_selected="Icon_Close_Toast" />
</filter_editor>
diff --git a/indra/newview/skins/default/xui/en/widgets/search_editor.xml b/indra/newview/skins/default/xui/en/widgets/search_editor.xml
index 1616e4c3f7..a9a760b3a4 100644
--- a/indra/newview/skins/default/xui/en/widgets/search_editor.xml
+++ b/indra/newview/skins/default/xui/en/widgets/search_editor.xml
@@ -15,7 +15,11 @@
height="13"
image_unselected="Search"
image_selected="Search" />
- <clear_button
+ <clear_button
+ bottom="4"
+ height="16"
image_unselected="Icon_Close_Foreground"
- image_selected="Icon_Close_Press" />
+ image_selected="Icon_Close_Press"
+ pad_right="4"
+ width="16" />
</search_editor>