summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llagent.cpp26
-rw-r--r--indra/newview/llagent.h9
-rw-r--r--indra/newview/llfloaternamedesc.cpp15
-rw-r--r--indra/newview/llfloaterreporter.cpp8
-rw-r--r--indra/newview/llfloaterworldmap.cpp7
-rw-r--r--indra/newview/llgesturemgr.cpp10
-rw-r--r--indra/newview/llpanellogin.cpp2
-rw-r--r--indra/newview/llpreviewgesture.cpp9
-rw-r--r--indra/newview/llurldispatcher.cpp12
-rw-r--r--indra/newview/llurldispatcher.h2
-rw-r--r--indra/newview/llviewermenu.cpp1
-rw-r--r--indra/newview/llviewermenufile.cpp10
-rw-r--r--indra/newview/llviewermessage.cpp13
-rw-r--r--indra/newview/llviewerstats.cpp12
-rw-r--r--indra/newview/llviewerstats.h2
15 files changed, 58 insertions, 80 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 5aaf9d0097..39d4a3fc15 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -102,7 +102,6 @@
#include "lltoolpie.h"
#include "lltoolview.h"
#include "llui.h" // for make_ui_sound
-#include "llurldispatcher.h"
#include "llviewercamera.h"
#include "llviewerinventory.h"
#include "llviewermenu.h"
@@ -905,24 +904,6 @@ const LLHost& LLAgent::getRegionHost() const
}
}
-//-----------------------------------------------------------------------------
-// getSLURL()
-// returns empty() if getRegion() == NULL
-//-----------------------------------------------------------------------------
-std::string LLAgent::getSLURL() const
-{
- std::string slurl;
- LLViewerRegion *regionp = getRegion();
- if (regionp)
- {
- LLVector3d agentPos = getPositionGlobal();
- S32 x = llround( (F32)fmod( agentPos.mdV[VX], (F64)REGION_WIDTH_METERS ) );
- S32 y = llround( (F32)fmod( agentPos.mdV[VY], (F64)REGION_WIDTH_METERS ) );
- S32 z = llround( (F32)agentPos.mdV[VZ] );
- slurl = LLURLDispatcher::buildSLURL(regionp->getName(), x, y, z);
- }
- return slurl;
-}
//-----------------------------------------------------------------------------
// inPrelude()
@@ -1040,7 +1021,7 @@ void LLAgent::slamLookAt(const LLVector3 &look_at)
//-----------------------------------------------------------------------------
// getPositionGlobal()
//-----------------------------------------------------------------------------
-const LLVector3d &LLAgent::getPositionGlobal() const
+const LLVector3d &LLAgent::getPositionGlobal()
{
if (!mAvatarObject.isNull() && !mAvatarObject->mDrawable.isNull())
{
@@ -5802,11 +5783,6 @@ void LLAgent::setTeleportState(ETeleportState state)
{
LLFloaterSnapshot::hide(0);
}
- if (mTeleportState == TELEPORT_MOVING)
- {
- // We're outa here. Save "back" slurl.
- mTeleportSourceSLURL = getSLURL();
- }
}
void LLAgent::fidget()
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index 4e9b882250..c6de97fede 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -169,8 +169,7 @@ public:
void setRegion(LLViewerRegion *regionp);
LLViewerRegion *getRegion() const;
const LLHost& getRegionHost() const;
- std::string getSLURL() const;
-
+
void updateAgentPosition(const F32 dt, const F32 yaw, const S32 mouse_x, const S32 mouse_y); // call once per frame to update position, angles radians
void updateLookAt(const S32 mouse_x, const S32 mouse_y);
@@ -307,7 +306,7 @@ public:
LLVector3 getVelocity() const;
F32 getVelocityZ() const { return getVelocity().mV[VZ]; } // a hack
- const LLVector3d &getPositionGlobal() const;
+ const LLVector3d &getPositionGlobal();
const LLVector3 &getPositionAgent();
S32 getRegionsVisited() const;
F64 getDistanceTraveled() const;
@@ -464,8 +463,6 @@ public:
void setTargetVelocity(const LLVector3 &vel);
const LLVector3 &getTargetVelocity() const;
- const std::string getTeleportSourceSLURL() const { return mTeleportSourceSLURL; }
-
// Setting the ability for this avatar to proxy for another avatar.
//static void processAddModifyAbility(LLMessageSystem* msg, void**);
@@ -720,8 +717,6 @@ private:
LLVector3d mAgentOriginGlobal; // Origin of agent coords from global coords
mutable LLVector3d mPositionGlobal;
- std::string mTeleportSourceSLURL; // SLURL where last TP began.
-
std::set<U64> mRegionsVisited; // stat - what distinct regions has the avatar been to?
F64 mDistanceTraveled; // stat - how far has the avatar moved?
LLVector3d mLastPositionGlobal; // Used to calculate travel distance
diff --git a/indra/newview/llfloaternamedesc.cpp b/indra/newview/llfloaternamedesc.cpp
index d4c9478fdf..392696dc9c 100644
--- a/indra/newview/llfloaternamedesc.cpp
+++ b/indra/newview/llfloaternamedesc.cpp
@@ -140,6 +140,13 @@ BOOL LLFloaterNameDesc::postBuild()
y -= llfloor(PREVIEW_LINE_HEIGHT * 1.2f);
+ if (mIsAudio)
+ {
+ LLSD bitrate = gSavedSettings.getS32("AudioDefaultBitrate");
+
+ childSetValue("bitrate", bitrate);
+ }
+
// Cancel button
childSetAction("cancel_btn", onBtnCancel, this);
@@ -199,10 +206,16 @@ void LLFloaterNameDesc::onBtnOK( void* userdata )
fp->childDisable("ok_btn"); // don't allow inadvertent extra uploads
+ S32 bitrate = 0;
+
+ if (fp->mIsAudio)
+ {
+ bitrate = fp->childGetValue("bitrate").asInteger();
+ }
upload_new_resource(fp->mFilenameAndPath, // file
fp->childGetValue("name_form").asString(),
fp->childGetValue("description_form").asString(),
- 0, LLAssetType::AT_NONE, LLInventoryType::IT_NONE);
+ bitrate, LLAssetType::AT_NONE, LLInventoryType::IT_NONE);
fp->close(false);
}
diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp
index 9170e70ccd..bd5438e10f 100644
--- a/indra/newview/llfloaterreporter.cpp
+++ b/indra/newview/llfloaterreporter.cpp
@@ -131,7 +131,12 @@ LLFloaterReporter::LLFloaterReporter(
gUICtrlFactory->buildFloater(this, "floater_report_abuse.xml");
}
- childSetText("abuse_location_edit", gAgent.getSLURL() );
+ LLViewerRegion *regionp = gAgent.getRegion();
+ if (regionp)
+ {
+ childSetText("sim_field", regionp->getName() );
+ childSetText("abuse_location_edit", regionp->getName() );
+ }
LLButton* pick_btn = LLUICtrlFactory::getButtonByName(this, "pick_btn");
if (pick_btn)
@@ -158,7 +163,6 @@ LLFloaterReporter::LLFloaterReporter(
// convert the position to a string
LLVector3d pos = gAgent.getPositionGlobal();
- LLViewerRegion *regionp = gAgent.getRegion();
if (regionp)
{
pos -= regionp->getOriginGlobal();
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index 353020d9c4..53b43effec 100644
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -76,7 +76,6 @@
#include "lltracker.h"
#include "llui.h"
#include "lluiconstants.h"
-#include "llurldispatcher.h"
#include "llviewercamera.h"
#include "llviewermenu.h"
#include "llviewerregion.h"
@@ -713,7 +712,8 @@ void LLFloaterWorldMap::updateLocation()
childSetValue("spin z", LLSD(agent_z) );
// Set the current SLURL
- mSLURL = LLURLDispatcher::buildSLURL(agent_sim_name, agent_x, agent_y, agent_z);
+ mSLURL = LLWeb::escapeURL( llformat("http://slurl.com/secondlife/%s/%d/%d/%d",
+ agent_sim_name.c_str(), agent_x, agent_y, agent_z) );
}
}
@@ -750,7 +750,8 @@ void LLFloaterWorldMap::updateLocation()
// simNameFromPosGlobal can fail, so don't give the user an invalid SLURL
if ( gotSimName )
{
- mSLURL = LLURLDispatcher::buildSLURL(sim_name, llround(region_x), llround(region_y), llround((F32)pos_global.mdV[VZ]));
+ mSLURL = LLWeb::escapeURL(llformat("http://slurl.com/secondlife/%s/%d/%d/%d",
+ sim_name.c_str(), llround(region_x), llround(region_y), llround((F32)pos_global.mdV[VZ])));
}
else
{ // Empty SLURL will disable the "Copy SLURL to clipboard" button
diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp
index 32c712d926..537cadf1d1 100644
--- a/indra/newview/llgesturemgr.cpp
+++ b/indra/newview/llgesturemgr.cpp
@@ -1006,20 +1006,14 @@ void LLGestureManager::onLoadComplete(LLVFS *vfs,
gViewerStats->incStat( LLViewerStats::ST_DOWNLOAD_FAILED );
}
- // Get missing gesture's name. Use UUID if name can't be found.
- LLStringBase<char>::format_map_t args;
- LLInventoryItem *item = gInventory.getItem( item_id );
- args["[NAME]"] = item ? item->getName() : LLString( item_id.asString() );
-
-
if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ||
LL_ERR_FILE_EMPTY == status)
{
- LLNotifyBox::showXml("GestureMissing", args);
+ LLNotifyBox::showXml("GestureMissing");
}
else
{
- LLNotifyBox::showXml("UnableToLoadGesture", args);
+ LLNotifyBox::showXml("UnableToLoadGesture");
}
llwarns << "Problem loading gesture: " << status << llendl;
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 7f846c2791..8ebdb14e15 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -71,7 +71,7 @@
#include "llweb.h"
#include "llwebbrowserctrl.h"
-#include "llfloaterhtml.h"
+#include "llfloaterhtmlhelp.h"
#include "llfloatertos.h"
#include "llglheaders.h"
diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp
index 9fa364a339..051e328a6b 100644
--- a/indra/newview/llpreviewgesture.cpp
+++ b/indra/newview/llpreviewgesture.cpp
@@ -955,11 +955,6 @@ void LLPreviewGesture::onLoadComplete(LLVFS *vfs,
}
else
{
- // Get missing gesture's name. Use UUID if name can't be found.
- LLStringBase<char>::format_map_t args;
- LLInventoryItem *item = gInventory.getItem( *item_idp );
- args["[NAME]"] = item ? item->getName() : LLString( item_idp->asString() );
-
if( gViewerStats )
{
gViewerStats->incStat( LLViewerStats::ST_DOWNLOAD_FAILED );
@@ -968,11 +963,11 @@ void LLPreviewGesture::onLoadComplete(LLVFS *vfs,
if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status ||
LL_ERR_FILE_EMPTY == status)
{
- LLNotifyBox::showXml("GestureMissing", args);
+ LLNotifyBox::showXml("GestureMissing");
}
else
{
- LLNotifyBox::showXml("UnableToLoadGesture", args);
+ LLNotifyBox::showXml("UnableToLoadGesture");
}
llwarns << "Problem loading gesture: " << status << llendl;
diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp
index f8ebced8b9..51b9505980 100644
--- a/indra/newview/llurldispatcher.cpp
+++ b/indra/newview/llurldispatcher.cpp
@@ -37,12 +37,12 @@
#include "llcommandhandler.h"
#include "llfloaterurldisplay.h"
#include "llfloaterdirectory.h"
-#include "llfloaterhtml.h"
+#include "llfloaterhtmlhelp.h"
+//#include "llfloaterworldmap.h"
#include "llpanellogin.h"
#include "llstartup.h" // gStartupState
#include "llurlsimstring.h"
#include "llviewerwindow.h" // alertXml()
-#include "llweb.h"
#include "llworldmap.h"
// library includes
@@ -340,11 +340,3 @@ bool LLURLDispatcher::dispatchRightClick(const std::string& url)
{
return LLURLDispatcherImpl::dispatchRightClick(url);
}
-
-// static
-std::string LLURLDispatcher::buildSLURL(const std::string& regionname, S32 x, S32 y, S32 z)
-{
- std::string slurl = SLURL_SLURL_PREFIX + regionname + llformat("/%d/%d/%d",x,y,z);
- slurl = LLWeb::escapeURL( slurl );
- return slurl;
-}
diff --git a/indra/newview/llurldispatcher.h b/indra/newview/llurldispatcher.h
index bcd19ee691..74b7f875b2 100644
--- a/indra/newview/llurldispatcher.h
+++ b/indra/newview/llurldispatcher.h
@@ -50,8 +50,6 @@ public:
// Returns true if someone handled the URL.
static bool dispatchRightClick(const std::string& url);
- // builds: http://slurl.com/secondlife/RegionName/x/y/z/
- static std::string buildSLURL(const std::string& regionname, S32 x, S32 y, S32 z);
};
#endif
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index b5f53e5d88..a6fb7fa0b7 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -105,6 +105,7 @@
#include "llfloatergroupinvite.h"
#include "llfloatergroups.h"
#include "llfloaterhtml.h"
+#include "llfloaterhtmlhelp.h"
#include "llfloaterinspect.h"
#include "llfloaterlagmeter.h"
#include "llfloaterland.h"
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index 291e3da13d..13ff55ce1c 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -596,9 +596,15 @@ void upload_new_resource(const LLString& src_filename, std::string name,
asset_type = LLAssetType::AT_SOUND; // tag it as audio
S32 encode_result = 0;
- llinfos << "Attempting to encode wav as an ogg file" << llendl;
+ S32 bitrate = 128;
- encode_result = encode_vorbis_file(src_filename.c_str(), filename.c_str());
+ if (compression_info)
+ {
+ bitrate = compression_info;
+ }
+ llinfos << "Attempting to encode wav as an ogg file at " << bitrate << "kbps" << llendl;
+
+ encode_result = encode_vorbis_file_at(src_filename.c_str(), filename.c_str(), bitrate*1000);
if (LLVORBISENC_NOERR != encode_result)
{
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index f109ea417b..7f349fe65b 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -2732,9 +2732,9 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
gViewerThrottle.sendToSim();
gViewerWindow->sendShapeToSim();
- bool is_teleport = gAgent.getTeleportState() == LLAgent::TELEPORT_MOVING;
+ bool is_teleport = false;
- if( is_teleport )
+ if( gAgent.getTeleportState() == LLAgent::TELEPORT_MOVING )
{
// Force the camera back onto the agent, don't animate. JC
gAgent.setFocusOnAvatar(TRUE, FALSE);
@@ -2749,20 +2749,15 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
if (avatarp)
{
- // Chat the "back" SLURL. (DEV-4907)
- LLChat chat("Teleport completed from " + gAgent.getTeleportSourceSLURL());
- chat.mSourceType = CHAT_SOURCE_SYSTEM;
- LLFloaterChat::addChatHistory(chat);
-
- // Set the new position
avatarp->setPositionAgent(agent_pos);
avatarp->clearChat();
avatarp->slamPosition();
}
+
+ is_teleport = true;
}
else
{
- // This is likely just the initial logging in phase.
gAgent.setTeleportState( LLAgent::TELEPORT_NONE );
}
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index 9d5b301d26..81c10d161c 100644
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -51,7 +51,7 @@
#include "lldebugview.h"
#include "llfasttimerview.h"
#include "llviewerregion.h"
-#include "llfloaterhtml.h"
+#include "llfloaterhtmlhelp.h"
#include "llworld.h"
#include "llfeaturemanager.h"
#if LL_WINDOWS && LL_LCD_COMPILE
@@ -186,7 +186,7 @@ const StatAttributes STAT_INFO[LLViewerStats::ST_COUNT] =
// ST_CROSSING_MAX
StatAttributes("CROSSING_MAX", FALSE, FALSE),
// ST_LIBXUL_WIDGET_USED
- StatAttributes("LibXUL Widget used", FALSE, FALSE), // Unused
+ StatAttributes("LibXUL Widget used", FALSE, FALSE),
// ST_WINDOW_WIDTH
StatAttributes("Window width", FALSE, FALSE),
// ST_WINDOW_HEIGHT
@@ -574,6 +574,14 @@ void update_statistics(U32 frame_count)
gViewerStats->mTexturePacketsStat.addValue(LLViewerImageList::sTexturePackets);
+ // log when the LibXUL (aka Mozilla) widget is used and opened so we can monitor framerate changes
+ #if LL_LIBXUL_ENABLED
+ {
+ BOOL result = gViewerHtmlHelp.getFloaterOpened();
+ gViewerStats->setStat(LLViewerStats::ST_LIBXUL_WIDGET_USED, (F64)result);
+ }
+ #endif
+
{
static F32 visible_avatar_frames = 0.f;
static F32 avg_visible_avatars = 0;
diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h
index 4c2a741244..735da59150 100644
--- a/indra/newview/llviewerstats.h
+++ b/indra/newview/llviewerstats.h
@@ -154,7 +154,7 @@ public:
ST_RENDER_SECS = 50,
ST_CROSSING_AVG = 51,
ST_CROSSING_MAX = 52,
- ST_LIBXUL_WIDGET_USED = 53, // Unused
+ ST_LIBXUL_WIDGET_USED = 53,
ST_WINDOW_WIDTH = 54,
ST_WINDOW_HEIGHT = 55,
ST_TEX_BAKES = 56,