summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorJosh Bell <josh@lindenlab.com>2007-11-21 02:10:12 +0000
committerJosh Bell <josh@lindenlab.com>2007-11-21 02:10:12 +0000
commit78aec043f35b8b07dc0f2ba39baba737dd57555e (patch)
tree1645378aaa34b02ffb6b4f864a4a83828f19c8ab /indra/newview
parent11d85dac83e9d58f8f6e441dcea2d1f2b661c58d (diff)
svn merge -r 73148:74186 svn+ssh://svn.lindenlab.com/svn/linden/branches/Branch_1-18-5-Viewer --> release
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/English.lproj/InfoPlist.strings4
-rw-r--r--indra/newview/Info-SecondLife.plist2
-rw-r--r--indra/newview/llagent.cpp8
-rw-r--r--indra/newview/llclassifiedstatsresponder.cpp18
-rw-r--r--indra/newview/llclassifiedstatsresponder.h4
-rw-r--r--indra/newview/llfloaterchat.cpp1
-rw-r--r--indra/newview/llpanelclassified.cpp53
-rw-r--r--indra/newview/llpanelclassified.h10
-rw-r--r--indra/newview/llpanelpermissions.cpp18
-rw-r--r--indra/newview/llpanelplace.cpp50
-rw-r--r--indra/newview/llpanelplace.h10
-rw-r--r--indra/newview/llurldispatcher.cpp2
-rw-r--r--indra/newview/llviewermenu.cpp2
-rw-r--r--indra/newview/llviewermessage.cpp28
-rw-r--r--indra/newview/llviewerregion.cpp6
15 files changed, 164 insertions, 52 deletions
diff --git a/indra/newview/English.lproj/InfoPlist.strings b/indra/newview/English.lproj/InfoPlist.strings
index 8929cb4226..a25f97768a 100644
--- a/indra/newview/English.lproj/InfoPlist.strings
+++ b/indra/newview/English.lproj/InfoPlist.strings
@@ -1,5 +1,5 @@
/* Localized versions of Info.plist keys */
CFBundleName = "Second Life";
-CFBundleShortVersionString = "Second Life version 1.18.4.3";
-CFBundleGetInfoString = "Second Life version 1.18.4.3, Copyright 2004-2007 Linden Research, Inc.";
+CFBundleShortVersionString = "Second Life version 1.18.5.1";
+CFBundleGetInfoString = "Second Life version 1.18.5.1, Copyright 2004-2007 Linden Research, Inc.";
diff --git a/indra/newview/Info-SecondLife.plist b/indra/newview/Info-SecondLife.plist
index 0778494394..2c9f58a0c0 100644
--- a/indra/newview/Info-SecondLife.plist
+++ b/indra/newview/Info-SecondLife.plist
@@ -32,7 +32,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
- <string>1.18.4.3</string>
+ <string>1.18.5.1</string>
<key>CSResourcesFileMapped</key>
<true/>
</dict>
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index d7e316438c..39d4a3fc15 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -2954,6 +2954,7 @@ void LLAgent::endAnimationUpdateUI()
// Don't let this be called more than once if the camera
// mode hasn't changed. --JC
mLastCameraMode = mCameraMode;
+
}
@@ -4214,15 +4215,22 @@ void LLAgent::changeCameraToCustomizeAvatar(BOOL animate)
if (animate && !mAvatarObject.isNull())
{
sendAnimationRequest(ANIM_AGENT_CUSTOMIZE, ANIM_REQUEST_START);
+ mAvatarObject->startMotion(ANIM_AGENT_CUSTOMIZE);
LLMotion* turn_motion = mAvatarObject->findMotion(ANIM_AGENT_CUSTOMIZE);
+
if (turn_motion)
{
mAnimationDuration = turn_motion->getDuration() + CUSTOMIZE_AVATAR_CAMERA_ANIM_SLOP;
+
}
else
{
mAnimationDuration = gSavedSettings.getF32("ZoomTime");
}
+
+
+
+
gAgent.setFocusGlobal(LLVector3d::zero);
}
else
diff --git a/indra/newview/llclassifiedstatsresponder.cpp b/indra/newview/llclassifiedstatsresponder.cpp
index 3a31074ed0..7a575ca5fd 100644
--- a/indra/newview/llclassifiedstatsresponder.cpp
+++ b/indra/newview/llclassifiedstatsresponder.cpp
@@ -19,14 +19,14 @@
#include "llview.h"
#include "message.h"
-LLClassifiedStatsResponder::LLClassifiedStatsResponder(LLViewHandle classified_panel_handle)
-: mClassifiedPanelHandle(classified_panel_handle)
+LLClassifiedStatsResponder::LLClassifiedStatsResponder(LLViewHandle classified_panel_handle, LLUUID classified_id)
+: mClassifiedPanelHandle(classified_panel_handle),
+mClassifiedID(classified_id)
{
}
/*virtual*/
void LLClassifiedStatsResponder::result(const LLSD& content)
{
- LLUUID classified_id = content["classified_id"];
S32 teleport = content["teleport_clicks"].asInteger();
S32 map = content["map_clicks"].asInteger();
S32 profile = content["profile_clicks"].asInteger();
@@ -34,16 +34,15 @@ void LLClassifiedStatsResponder::result(const LLSD& content)
S32 search_map = content["search_map_clicks"].asInteger();
S32 search_profile = content["search_profile_clicks"].asInteger();
- std::string msg = llformat("Clicks: %d teleport, %d map, %d profile",
- teleport + search_teleport,
- map + search_map,
- profile + search_profile);
-
LLPanelClassified* classified_panelp = (LLPanelClassified*)LLPanel::getPanelByHandle(mClassifiedPanelHandle);
if(classified_panelp)
{
- classified_panelp->setClickThroughText(msg);
+ classified_panelp->setClickThrough(mClassifiedID,
+ teleport + search_teleport,
+ map + search_map,
+ profile + search_profile,
+ true);
}
}
@@ -55,3 +54,4 @@ void LLClassifiedStatsResponder::error(U32 status, const std::string& reason)
<< status << ": " << reason << ")" << llendl;
}
+
diff --git a/indra/newview/llclassifiedstatsresponder.h b/indra/newview/llclassifiedstatsresponder.h
index 25ae67141c..ed19311a9a 100644
--- a/indra/newview/llclassifiedstatsresponder.h
+++ b/indra/newview/llclassifiedstatsresponder.h
@@ -11,11 +11,12 @@
#include "llhttpclient.h"
#include "llview.h"
+#include "lluuid.h"
class LLClassifiedStatsResponder : public LLHTTPClient::Responder
{
public:
- LLClassifiedStatsResponder(LLViewHandle classified_panel_handle);
+ LLClassifiedStatsResponder(LLViewHandle classified_panel_handle, LLUUID classified_id);
//If we get back a normal response, handle it here
virtual void result(const LLSD& content);
//If we get back an error (not found, etc...), handle it here
@@ -23,6 +24,7 @@ public:
protected:
LLViewHandle mClassifiedPanelHandle;
+ LLUUID mClassifiedID;
};
#endif // LL_LLCLASSIFIEDSTATSRESPONDER_H
diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp
index b435ada463..5fdbf7d408 100644
--- a/indra/newview/llfloaterchat.cpp
+++ b/indra/newview/llfloaterchat.cpp
@@ -164,6 +164,7 @@ void LLFloaterChat::onVisibilityChange(BOOL new_visibility)
{
// Hide the chat overlay when our history is visible.
gConsole->setVisible( !new_visibility );
+ LLFloater::onVisibilityChange(new_visibility);
}
diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp
index 821eaf1a72..04fb54b0a7 100644
--- a/indra/newview/llpanelclassified.cpp
+++ b/indra/newview/llpanelclassified.cpp
@@ -91,7 +91,8 @@ public:
S32 profile_clicks = atoi(strings[3].c_str());
LLPanelClassified::setClickThrough(classified_id, teleport_clicks,
map_clicks,
- profile_clicks);
+ profile_clicks,
+ false);
return true;
}
};
@@ -127,7 +128,14 @@ LLPanelClassified::LLPanelClassified(BOOL in_finder, bool from_search)
mProfileBtn(NULL),
mInfoText(NULL),
mSetBtn(NULL),
- mClickThroughText(NULL)
+ mClickThroughText(NULL),
+ mTeleportClicksOld(0),
+ mMapClicksOld(0),
+ mProfileClicksOld(0),
+ mTeleportClicksNew(0),
+ mMapClicksNew(0),
+ mProfileClicksNew(0)
+
{
sAllPanels.push_back(this);
@@ -368,16 +376,12 @@ void LLPanelClassified::setClassifiedID(const LLUUID& id)
mClassifiedID = id;
}
-void LLPanelClassified::setClickThroughText(const std::string& text)
-{
- if(mClickThroughText)
- this->mClickThroughText->setText(text);
-}
//static
void LLPanelClassified::setClickThrough(const LLUUID& classified_id,
S32 teleport,
S32 map,
- S32 profile)
+ S32 profile,
+ bool from_new_table)
{
for (panel_list_t::iterator iter = sAllPanels.begin(); iter != sAllPanels.end(); ++iter)
{
@@ -388,22 +392,29 @@ void LLPanelClassified::setClickThrough(const LLUUID& classified_id,
continue;
}
- // We need to see if we should use the new stat table or the old.
- // If the SearchStatRequest capability exists, then the data will come
- // from the new table.
- std::string url = gAgent.getRegion()->getCapability("SearchStatRequest");
+ // We need to check to see if the data came from the new stat_table
+ // or the old classified table. We also need to cache the data from
+ // the two separate sources so as to display the aggregate totals.
- if (!url.empty())
+ if (from_new_table)
{
- return;
+ self->mTeleportClicksNew = teleport;
+ self->mMapClicksNew = map;
+ self->mProfileClicksNew = profile;
+ }
+ else
+ {
+ self->mTeleportClicksOld = teleport;
+ self->mMapClicksOld = map;
+ self->mProfileClicksOld = profile;
}
if (self->mClickThroughText)
{
std::string msg = llformat("Clicks: %d teleport, %d map, %d profile",
- teleport,
- map,
- profile);
+ self->mTeleportClicksNew + self->mTeleportClicksOld,
+ self->mMapClicksNew + self->mMapClicksOld,
+ self->mProfileClicksNew + self->mProfileClicksOld);
self->mClickThroughText->setText(msg);
}
}
@@ -449,7 +460,7 @@ void LLPanelClassified::sendClassifiedInfoRequest()
if (!url.empty())
{
llinfos << "Classified stat request via capability" << llendl;
- LLHTTPClient::post(url, body, new LLClassifiedStatsResponder(this->getHandle()));
+ LLHTTPClient::post(url, body, new LLClassifiedStatsResponder(this->getHandle(), mClassifiedID));
}
}
}
@@ -929,7 +940,6 @@ void LLPanelClassified::sendClassifiedClickMessage(const char* type)
strings.push_back(mClassifiedID.asString());
strings.push_back(type);
LLUUID no_invoice;
- send_generic_message("classifiedclick", strings, no_invoice);
// New classified click-through handling
LLSD body;
@@ -938,11 +948,16 @@ void LLPanelClassified::sendClassifiedClickMessage(const char* type)
body["classified_id"] = mClassifiedID;
std::string url = gAgent.getRegion()->getCapability("SearchStatTracking");
+ // If the capability exists send to the new database, otherwise send to the old one.
if (!url.empty())
{
llinfos << "LLPanelClassified::sendClassifiedClickMessage via capability" << llendl;
LLHTTPClient::post(url, body, new LLHTTPClient::Responder());
}
+ else
+ {
+ send_generic_message("classifiedclick", strings, no_invoice);
+ }
}
////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/llpanelclassified.h b/indra/newview/llpanelclassified.h
index 6ebac4c98a..a2bb29b224 100644
--- a/indra/newview/llpanelclassified.h
+++ b/indra/newview/llpanelclassified.h
@@ -81,7 +81,7 @@ public:
void setClassifiedID(const LLUUID& id);
void setClickThroughText(const std::string& text);
static void setClickThrough(const LLUUID& classified_id,
- S32 teleport, S32 map, S32 profile);
+ S32 teleport, S32 map, S32 profile, bool from_new_table);
// check that the title is valid (E.G. starts with a number or letter)
BOOL titleIsValid();
@@ -129,6 +129,14 @@ protected:
LLUUID mParcelID;
S32 mPriceForListing;
+ // Needed for stat tracking
+ S32 mTeleportClicksOld;
+ S32 mMapClicksOld;
+ S32 mProfileClicksOld;
+ S32 mTeleportClicksNew;
+ S32 mMapClicksNew;
+ S32 mProfileClicksNew;
+
// Data will be requested on first draw
BOOL mDataRequested;
diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp
index 923f4b3115..7beba92ebb 100644
--- a/indra/newview/llpanelpermissions.cpp
+++ b/indra/newview/llpanelpermissions.cpp
@@ -741,17 +741,17 @@ void LLPanelPermissions::refresh()
}
}
- if (is_for_sale)
+ childSetValue("checkbox for sale", is_for_sale);
+
+ // HACK: There are some old objects in world that are set for sale,
+ // but are no-transfer. We need to let users turn for-sale off, but only
+ // if for-sale is set.
+ bool cannot_actually_sell = !can_transfer || (!can_copy && sale_type == LLSaleInfo::FS_COPY);
+ if (is_for_sale && has_change_sale_ability && cannot_actually_sell)
{
- childSetValue("checkbox for sale",TRUE);
- childSetTentative("checkbox for sale",!can_transfer || (!can_copy && sale_type == LLSaleInfo::FS_COPY));
+ childSetEnabled("checkbox for sale", true);
}
- else
- {
- childSetValue("checkbox for sale",FALSE);
- childSetTentative("checkbox for sale",false);
- }
-
+
// Check search status of objects
BOOL all_volume = gSelectMgr->selectionAllPCode( LL_PCODE_VOLUME );
bool include_in_search;
diff --git a/indra/newview/llpanelplace.cpp b/indra/newview/llpanelplace.cpp
index 459e726f87..8825ce71fc 100644
--- a/indra/newview/llpanelplace.cpp
+++ b/indra/newview/llpanelplace.cpp
@@ -89,6 +89,9 @@ BOOL LLPanelPlace::postBuild()
mSnapshotCtrl->setEnabled(FALSE);
mNameEditor = LLViewerUICtrlFactory::getTextBoxByName(this, "name_editor");
+ // Text boxes appear to have a " " in them by default. This breaks the
+ // emptiness test for filling in data from the network. Slam to empty.
+ mNameEditor->setText( LLString::null );
mDescEditor = LLUICtrlFactory::getTextEditorByName(this, "desc_editor");
@@ -127,6 +130,26 @@ void LLPanelPlace::displayItemInfo(const LLInventoryItem* pItem)
mDescEditor->setText(pItem->getDescription());
}
+// Use this for search directory clicks, because we are totally
+// recycling the panel and don't need to use what's there.
+//
+// For SLURL clicks, don't call this, because we need to cache
+// the location info from the user.
+void LLPanelPlace::resetLocation()
+{
+ mParcelID.setNull();
+ mRequestedID.setNull();
+ mRegionID.setNull();
+ mLandmarkAssetID.setNull();
+ mPosGlobal.clearVec();
+ mPosRegion.clearVec();
+ mAuctionID = 0;
+ mNameEditor->setText( LLString::null );
+ mDescEditor->setText( LLString::null );
+ mInfoEditor->setText( LLString::null );
+ mLocationEditor->setText( LLString::null );
+}
+
void LLPanelPlace::setParcelID(const LLUUID& parcel_id)
{
mParcelID = parcel_id;
@@ -138,10 +161,6 @@ void LLPanelPlace::setSnapshot(const LLUUID& snapshot_id)
mSnapshotCtrl->setImageAssetID(snapshot_id);
}
-void LLPanelPlace::setName(const std::string& name)
-{
- mNameEditor->setText(name);
-}
void LLPanelPlace::setLocationString(const std::string& location)
{
@@ -240,11 +259,17 @@ void LLPanelPlace::processParcelInfoReply(LLMessageSystem *msg, void **)
std::string name_str(name);
std::string desc_str(desc);
- if(! name_str.empty() && ! self->mNameEditor->getText().empty())
+ if( !name_str.empty()
+ && self->mNameEditor->getText().empty())
+ {
self->mNameEditor->setText(name_str);
+ }
- if(! desc_str.empty() && ! self->mDescEditor->getText().empty())
+ if( !desc_str.empty()
+ && self->mDescEditor->getText().empty())
+ {
self->mDescEditor->setText(desc_str);
+ }
LLString info_text;
LLUIString traffic = self->getUIString("traffic_text");
@@ -280,6 +305,19 @@ void LLPanelPlace::processParcelInfoReply(LLMessageSystem *msg, void **)
S32 region_y = llround(self->mPosRegion.mV[1]);
S32 region_z = llround(self->mPosRegion.mV[2]);
+ // If the region position is zero, grab position from the global
+ if(self->mPosRegion.isExactlyZero())
+ {
+ region_x = llround(global_x) % REGION_WIDTH_UNITS;
+ region_y = llround(global_y) % REGION_WIDTH_UNITS;
+ region_z = llround(global_z);
+ }
+
+ if(self->mPosGlobal.isExactlyZero())
+ {
+ self->mPosGlobal.setVec(global_x, global_y, global_z);
+ }
+
LLString location = llformat("%s %d, %d, %d (%s)",
sim_name, region_x, region_y, region_z, rating);
self->mLocationEditor->setText(location);
diff --git a/indra/newview/llpanelplace.h b/indra/newview/llpanelplace.h
index 8f56eda729..c473900693 100644
--- a/indra/newview/llpanelplace.h
+++ b/indra/newview/llpanelplace.h
@@ -53,11 +53,17 @@ public:
/*virtual*/ BOOL postBuild();
- void displayItemInfo(const LLInventoryItem* pItem);
+ void resetLocation();
+ // Ignore all old location information, useful if you are
+ // recycling an existing dialog and need to clear it.
+
void setParcelID(const LLUUID& parcel_id);
+ // Sends a request for data about the given parcel, which will
+ // only update the location if there is none already available.
+
+ void displayItemInfo(const LLInventoryItem* pItem);
void setRegionID(const LLUUID& region_id) { mRegionID = region_id; }
void setSnapshot(const LLUUID& snapshot_id);
- void setName(const std::string& name);
void setLocationString(const std::string& location);
void setErrorStatus(U32 status, const std::string& reason);
diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp
index c6d9b2fbe2..51b9505980 100644
--- a/indra/newview/llurldispatcher.cpp
+++ b/indra/newview/llurldispatcher.cpp
@@ -154,7 +154,9 @@ bool LLURLDispatcherImpl::dispatchHelp(const std::string& url, BOOL right_mouse)
{
if (matchPrefix(url, SLURL_SL_HELP_PREFIX))
{
+#if LL_LIBXUL_ENABLED
gViewerHtmlHelp.show();
+#endif // LL_LIBXUL_ENABLED
return true;
}
return false;
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 688b2889c8..a6fb7fa0b7 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -5573,7 +5573,7 @@ class LLShowAgentProfile : public view_listener_t
LLVOAvatar* avatar = find_avatar_from_object(agent_id);
if (avatar)
{
- LLFloaterAvatarInfo::show(agent_id);
+ LLFloaterAvatarInfo::show( avatar->getID() );
}
return true;
}
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 2fdc040684..2011275bdb 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -132,6 +132,7 @@
#include "llappviewer.h"
#include "llfloaterworldmap.h"
#include "llviewerdisplay.h"
+#include "llkeythrottle.h"
#include <boost/tokenizer.hpp>
@@ -145,6 +146,12 @@
const F32 BIRD_AUDIBLE_RADIUS = 32.0f;
const F32 SIT_DISTANCE_FROM_TARGET = 0.25f;
static const F32 LOGOUT_REPLY_TIME = 3.f; // Wait this long after LogoutReply before quitting.
+
+// Determine how quickly residents' scripts can issue question dialogs
+// Allow bursts of up to 5 dialogs in 10 seconds. 10*2=20 seconds recovery if throttle kicks in
+static const U32 LLREQUEST_PERMISSION_THROTTLE_LIMIT = 5; // requests
+static const F32 LLREQUEST_PERMISSION_THROTTLE_INTERVAL = 10.0f; // seconds
+
extern BOOL gDebugClicks;
// function prototypes
@@ -4457,6 +4464,27 @@ void process_script_question(LLMessageSystem *msg, void **user_data)
// don't display permission requests if this object is muted - JS.
if (gMuteListp->isMuted(taskid)) return;
+ // throttle excessive requests from any specific user's scripts
+ LLString throttle_owner_name = owner_name;
+ typedef LLKeyThrottle<LLString> LLStringThrottle;
+ static LLStringThrottle question_throttle( LLREQUEST_PERMISSION_THROTTLE_LIMIT, LLREQUEST_PERMISSION_THROTTLE_INTERVAL );
+
+ switch (question_throttle.noteAction(throttle_owner_name))
+ {
+ case LLStringThrottle::THROTTLE_NEWLY_BLOCKED:
+ llinfos << "process_script_question throttled"
+ << " owner_name:" << owner_name
+ << llendl;
+ // Fall through
+
+ case LLStringThrottle::THROTTLE_BLOCKED:
+ // Escape altogether until we recover
+ return;
+
+ case LLStringThrottle::THROTTLE_OK:
+ break;
+ }
+
LLString script_question;
if (questions)
{
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 5bfe023168..0022212399 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -870,7 +870,7 @@ public:
for(int i=0;
locs_it != locs.endArray();
- i++, locs_it++, agents_it++)
+ i++, locs_it++)
{
U8
x = locs_it->get("X").asInteger(),
@@ -903,6 +903,10 @@ public:
avatar_ids->put(agent_id);
}
}
+ if (has_agent_data)
+ {
+ agents_it++;
+ }
}
}
};