summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/app_settings/settings.xml2
-rw-r--r--indra/newview/llinventorybridge.cpp74
-rw-r--r--indra/newview/llinventorybridge.h5
-rw-r--r--indra/newview/llnearbychat.cpp2
-rw-r--r--indra/newview/llnearbychathandler.cpp2
-rw-r--r--indra/newview/llstatusbar.cpp1
-rw-r--r--indra/newview/lltexturefetch.cpp13
-rw-r--r--indra/newview/lltoastimpanel.cpp17
-rw-r--r--indra/newview/llviewermenu.cpp29
-rw-r--r--indra/newview/llviewermessage.cpp7
-rw-r--r--indra/newview/llweb.cpp24
-rw-r--r--indra/newview/llworldmipmap.cpp3
-rw-r--r--indra/newview/skins/default/xui/en/floater_world_map.xml5
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml16
-rw-r--r--indra/newview/skins/default/xui/en/panel_status_bar.xml10
15 files changed, 147 insertions, 63 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index c6abb7ba26..ba78d80ad1 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -3585,7 +3585,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://int.searchwww-phx0.damballah.lindenlab.com/viewer/[CATEGORY]?q=[QUERY]&amp;p=[AUTH_TOKEN]&amp;r=[MATURITY]&amp;lang=[LANGUAGE]&amp;g=[GODLIKE]</string>
+ <string>http://int.searchwww-phx0.damballah.lindenlab.com/viewer/[CATEGORY]?q=[QUERY]&amp;p=[AUTH_TOKEN]&amp;r=[MATURITY]&amp;lang=[LANGUAGE]&amp;g=[GODLIKE]&amp;sid=[SESSION_ID]&amp;rid=[REGION_ID]&amp;pid=[PARCEL_ID]</string>
</map>
<key>HighResSnapshot</key>
<map>
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 3fc2cbecbe..d70221b22a 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -4555,18 +4555,8 @@ void LLWearableBridge::performAction(LLFolderView* folder, LLInventoryModel* mod
}
else if (isRemoveAction(action))
{
- if (get_is_item_worn(mUUID))
- {
- LLViewerInventoryItem* item = getItem();
- if (item)
- {
- LLWearableList::instance().getAsset(item->getAssetUUID(),
- item->getName(),
- item->getType(),
- LLWearableBridge::onRemoveFromAvatarArrived,
- new OnRemoveStruct(mUUID));
- }
- }
+ removeFromAvatar();
+ return;
}
else LLItemBridge::performAction(folder, model, action);
}
@@ -4949,6 +4939,66 @@ void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable,
delete on_remove_struct;
}
+/* static */
+void LLWearableBridge::removeAllClothesFromAvatar()
+{
+ // Remove COF links.
+ for (S32 itype = WT_SHAPE; itype < WT_COUNT; ++itype)
+ {
+ if (itype == WT_SHAPE || itype == WT_SKIN || itype == WT_HAIR || itype == WT_EYES)
+ continue;
+
+ // MULTI-WEARABLES: fixed to index 0
+ LLViewerInventoryItem *item = dynamic_cast<LLViewerInventoryItem*>(
+ gAgentWearables.getWearableInventoryItem((EWearableType)itype, 0));
+ if (!item)
+ continue;
+ const LLUUID &item_id = gInventory.getLinkedItemID(item->getUUID());
+ const LLWearable *wearable = gAgentWearables.getWearableFromItemID(item_id);
+ if (!wearable)
+ continue;
+
+ // Find and remove this item from the COF.
+ LLInventoryModel::item_array_t items = gInventory.collectLinkedItems(
+ item_id, LLAppearanceManager::instance().getCOF());
+ llassert(items.size() == 1); // Should always have one and only one item linked to this in the COF.
+ for (LLInventoryModel::item_array_t::const_iterator iter = items.begin();
+ iter != items.end();
+ ++iter)
+ {
+ const LLViewerInventoryItem *linked_item = (*iter);
+ const LLUUID &item_id = linked_item->getUUID();
+ gInventory.purgeObject(item_id);
+ }
+ }
+ gInventory.notifyObservers();
+
+ // Remove wearables from gAgentWearables
+ LLAgentWearables::userRemoveAllClothes();
+}
+
+/* static */
+void LLWearableBridge::removeItemFromAvatar(LLViewerInventoryItem *item)
+{
+ if (item)
+ {
+ LLWearableList::instance().getAsset(item->getAssetUUID(),
+ item->getName(),
+ item->getType(),
+ LLWearableBridge::onRemoveFromAvatarArrived,
+ new OnRemoveStruct(item->getUUID()));
+ }
+}
+
+void LLWearableBridge::removeFromAvatar()
+{
+ if (get_is_item_worn(mUUID))
+ {
+ LLViewerInventoryItem* item = getItem();
+ removeItemFromAvatar(item);
+ }
+}
+
LLInvFVBridgeAction* LLInvFVBridgeAction::createAction(LLAssetType::EType asset_type,
const LLUUID& uuid,LLInventoryModel* model)
{
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index 4d83e9b684..cc1fa45b26 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -572,7 +572,10 @@ public:
static BOOL canRemoveFromAvatar( void* userdata );
static void onRemoveFromAvatar( void* userdata );
- static void onRemoveFromAvatarArrived( LLWearable* wearable, void* userdata );
+ static void onRemoveFromAvatarArrived( LLWearable* wearable, void* userdata );
+ static void removeItemFromAvatar(LLViewerInventoryItem *item);
+ static void removeAllClothesFromAvatar();
+ void removeFromAvatar();
protected:
LLWearableBridge(LLInventoryPanel* inventory, const LLUUID& uuid, LLAssetType::EType asset_type, LLInventoryType::EType inv_type, EWearableType wearable_type) :
diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp
index 1a0183a8ba..2ad82d3e8e 100644
--- a/indra/newview/llnearbychat.cpp
+++ b/indra/newview/llnearbychat.cpp
@@ -198,7 +198,7 @@ void LLNearbyChat::addMessage(const LLChat& chat,bool archive)
}
else
{
- mChatHistory->appendMessage(chat,use_plain_text_chat_history);
+ mChatHistory->appendMessage(chat, use_plain_text_chat_history);
}
}
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp
index 169560f688..9e13a626b4 100644
--- a/indra/newview/llnearbychathandler.cpp
+++ b/indra/newview/llnearbychathandler.cpp
@@ -335,7 +335,7 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg)
if (tmp_chat.mChatStyle == CHAT_STYLE_IRC)
{
if(!tmp_chat.mFromName.empty())
- tmp_chat.mText = tmp_chat.mFromName + " " + tmp_chat.mText.substr(3);
+ tmp_chat.mText = tmp_chat.mFromName + tmp_chat.mText.substr(3);
else
tmp_chat.mText = tmp_chat.mText.substr(3);
}
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index 9e72464237..23c4f00ab7 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -160,6 +160,7 @@ LLStatusBar::LLStatusBar(const LLRect& rect)
mBtnVolume = getChild<LLButton>( "volume_btn" );
mBtnVolume->setClickedCallback( onClickVolume, this );
mBtnVolume->setMouseEnterCallback(boost::bind(&LLStatusBar::onMouseEnterVolume, this));
+ mBtnVolume->setIsChrome(TRUE);
gSavedSettings.getControl("MuteAudio")->getSignal()->connect(boost::bind(&LLStatusBar::onVolumeChanged, this, _2));
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 3f489544b4..a75f631769 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -842,10 +842,10 @@ bool LLTextureFetchWorker::doWork(S32 param)
mLoaded = FALSE;
mGetStatus = 0;
mGetReason.clear();
- lldebugs << "HTTP GET: " << mID << " Offset: " << offset
- << " Bytes: " << mRequestedSize
- << " Bandwidth(kbps): " << mFetcher->getTextureBandwidth() << "/" << max_bandwidth
- << llendl;
+ LL_DEBUGS("Texture") << "HTTP GET: " << mID << " Offset: " << offset
+ << " Bytes: " << mRequestedSize
+ << " Bandwidth(kbps): " << mFetcher->getTextureBandwidth() << "/" << max_bandwidth
+ << LL_ENDL;
setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority);
mState = WAIT_HTTP_REQ;
@@ -1257,7 +1257,7 @@ void LLTextureFetchWorker::callbackHttpGet(const LLChannelDescriptors& channels,
gTextureList.sTextureBits += data_size * 8; // Approximate - does not include header bits
- //llinfos << "HTTP RECEIVED: " << mID.asString() << " Bytes: " << data_size << llendl;
+ LL_DEBUGS("Texture") << "HTTP RECEIVED: " << mID.asString() << " Bytes: " << data_size << LL_ENDL;
if (data_size > 0)
{
// *TODO: set the formatted image data here directly to avoid the copy
@@ -1450,8 +1450,9 @@ bool LLTextureFetch::createRequest(const std::string& url, const LLUUID& id, con
if (!url.empty() && (!exten.empty() && LLImageBase::getCodecFromExtension(exten) != IMG_CODEC_J2C))
{
// Only do partial requests for J2C at the moment
- //llinfos << "Merov : LLTextureFetch::createRequest(), blocking fetch on " << url << llendl;
+ //llinfos << "Merov : LLTextureFetch::createRequest(), blocking fetch on " << url << llendl;
desired_size = MAX_IMAGE_DATA_SIZE;
+ desired_discard = 0;
}
else if (desired_discard == 0)
{
diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp
index b7add03e0e..d62017cc2f 100644
--- a/indra/newview/lltoastimpanel.cpp
+++ b/indra/newview/lltoastimpanel.cpp
@@ -35,13 +35,14 @@
#include "llnotifications.h"
#include "llinstantmessage.h"
+#include "llviewerchat.h"
const S32 LLToastIMPanel::DEFAULT_MESSAGE_MAX_LINE_COUNT = 6;
//--------------------------------------------------------------------------
LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notification),
- mAvatar(NULL), mUserName(NULL),
- mTime(NULL), mMessage(NULL)
+ mAvatar(NULL), mUserName(NULL),
+ mTime(NULL), mMessage(NULL)
{
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_instant_message.xml");
@@ -52,8 +53,11 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif
mMessage = getChild<LLTextBox>("message");
LLStyle::Params style_params;
- style_params.font.name(LLFontGL::nameFromFont(style_params.font));
- style_params.font.size(LLFontGL::sizeFromFont(style_params.font));
+ LLFontGL* fontp = LLViewerChat::getChatFont();
+ std::string font_name = LLFontGL::nameFromFont(fontp);
+ std::string font_size = LLFontGL::sizeFromFont(fontp);
+ style_params.font.name(font_name);
+ style_params.font.size(font_size);
style_params.font.style = "UNDERLINE";
//Handle IRC styled /me messages.
@@ -63,13 +67,16 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif
mMessage->clear();
style_params.font.style ="ITALIC";
- mMessage->appendText(p.from + " ", FALSE, style_params);
+ mMessage->appendText(p.from, FALSE, style_params);
style_params.font.style = "ITALIC";
mMessage->appendText(p.message.substr(3), FALSE, style_params);
}
else
+ {
mMessage->setValue(p.message);
+ }
+
mUserName->setValue(p.from);
mTime->setValue(p.time);
mSessionID = p.session_id;
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 23bcca9603..2a9c738c97 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -6479,21 +6479,27 @@ void menu_toggle_attached_particles(void* user_data)
LLPipeline::sRenderAttachedParticles = gSavedSettings.getBOOL("RenderAttachedParticles");
}
-class LLAdvancedHandleAttchedLightParticles: public view_listener_t
+class LLAdvancedHandleAttachedLightParticles: public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
std::string control_name = userdata.asString();
+
+ // toggle the control
+ gSavedSettings.setBOOL(control_name,
+ !gSavedSettings.getBOOL(control_name));
+
+ // update internal flags
if (control_name == "RenderAttachedLights")
-{
+ {
menu_toggle_attached_lights(NULL);
-}
+ }
else if (control_name == "RenderAttachedParticles")
-{
+ {
menu_toggle_attached_particles(NULL);
-}
+ }
return true;
-}
+ }
};
class LLSomethingSelected : public view_listener_t
@@ -7423,12 +7429,17 @@ class LLEditTakeOff : public view_listener_t
{
std::string clothing = userdata.asString();
if (clothing == "all")
- LLAgentWearables::userRemoveAllClothes();
+ LLWearableBridge::removeAllClothesFromAvatar();
else
{
EWearableType type = LLWearableDictionary::typeNameToType(clothing);
if (type >= WT_SHAPE && type < WT_COUNT)
- LLAgentWearables::userRemoveWearable(type);
+ {
+ // MULTI-WEARABLES
+ LLViewerInventoryItem *item = dynamic_cast<LLViewerInventoryItem*>(gAgentWearables.getWearableInventoryItem(type,0));
+ LLWearableBridge::removeItemFromAvatar(item);
+ }
+
}
return true;
}
@@ -7758,7 +7769,7 @@ void initialize_menus()
view_listener_t::addMenu(new LLAdvancedVectorizePerfTest(), "Advanced.VectorizePerfTest");
view_listener_t::addMenu(new LLAdvancedToggleFrameTest(), "Advanced.ToggleFrameTest");
view_listener_t::addMenu(new LLAdvancedCheckFrameTest(), "Advanced.CheckFrameTest");
- view_listener_t::addMenu(new LLAdvancedHandleAttchedLightParticles(), "Advanced.HandleAttchedLightParticles");
+ view_listener_t::addMenu(new LLAdvancedHandleAttachedLightParticles(), "Advanced.HandleAttachedLightParticles");
#ifdef TOGGLE_HACKED_GODLIKE_VIEWER
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 737f7a224d..72e3c27bc9 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -2526,14 +2526,9 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
std::string prefix = mesg.substr(0, 4);
if (prefix == "/me " || prefix == "/me'")
{
-// chat.mText = from_name;
-// chat.mText += mesg.substr(3);
ircstyle = TRUE;
}
-// else
-// {
- chat.mText = mesg;
-// }
+ chat.mText = mesg;
// Look for the start of typing so we can put "..." in the bubbles.
if (CHAT_TYPE_START == chat.mChatType)
diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp
index f8bb7336db..7866f735c5 100644
--- a/indra/newview/llweb.cpp
+++ b/indra/newview/llweb.cpp
@@ -38,10 +38,12 @@
// Library includes
#include "llwindow.h" // spawnWebBrowser()
+#include "llagent.h"
#include "llappviewer.h"
#include "llfloatermediabrowser.h"
#include "llfloaterreg.h"
#include "lllogininstance.h"
+#include "llparcel.h"
#include "llsd.h"
#include "lltoastalertpanel.h"
#include "llui.h"
@@ -49,6 +51,8 @@
#include "llversioninfo.h"
#include "llviewercontrol.h"
#include "llviewernetwork.h"
+#include "llviewerparcelmgr.h"
+#include "llviewerregion.h"
#include "llviewerwindow.h"
class URLLoader : public LLToastAlertPanel::URLLoader
@@ -144,7 +148,27 @@ std::string LLWeb::expandURLSubstitutions(const std::string &url,
substitution["LANGUAGE"] = LLUI::getLanguage();
substitution["GRID"] = LLViewerLogin::getInstance()->getGridLabel();
substitution["OS"] = LLAppViewer::instance()->getOSInfo().getOSStringSimple();
+ substitution["SESSION_ID"] = gAgent.getSessionID();
+ // find the region ID
+ LLUUID region_id;
+ LLViewerRegion *region = gAgent.getRegion();
+ if (region)
+ {
+ region_id = region->getRegionID();
+ }
+ substitution["REGION_ID"] = region_id;
+
+ // find the parcel ID
+ LLUUID parcel_id;
+ LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
+ if (parcel)
+ {
+ parcel_id = parcel->getID();
+ }
+ substitution["PARCEL_ID"] = parcel_id;
+
+ // expand all of the substitution strings and escape the url
std::string expanded_url = url;
LLStringUtil::format(expanded_url, substitution);
diff --git a/indra/newview/llworldmipmap.cpp b/indra/newview/llworldmipmap.cpp
index 9897f40c4e..1cdccd2baa 100644
--- a/indra/newview/llworldmipmap.cpp
+++ b/indra/newview/llworldmipmap.cpp
@@ -186,9 +186,8 @@ LLPointer<LLViewerFetchedTexture> LLWorldMipmap::getObjectsTile(U32 grid_x, U32
LLPointer<LLViewerFetchedTexture> LLWorldMipmap::loadObjectsTile(U32 grid_x, U32 grid_y, S32 level)
{
// Get the grid coordinates
-// std::string imageurl = llformat("http://map.secondlife.com.s3.amazonaws.com/%d/%05d/%05d/map-%d-%d-%d-objects.jpg",
std::string imageurl = llformat("http://map.secondlife.com.s3.amazonaws.com/map-%d-%d-%d-objects.jpg",
- level, grid_x, grid_y, level, grid_x, grid_y);
+ level, grid_x, grid_y);
// DO NOT COMMIT!! DEBUG ONLY!!!
// Use a local jpeg for every tile to test map speed without S3 access
diff --git a/indra/newview/skins/default/xui/en/floater_world_map.xml b/indra/newview/skins/default/xui/en/floater_world_map.xml
index 169a0ea676..8904d4f49c 100644
--- a/indra/newview/skins/default/xui/en/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/en/floater_world_map.xml
@@ -480,7 +480,10 @@
name="location"
select_on_focus="true"
tool_tip="Type the name of a region"
- width="152" />
+ width="152">
+ <search_editor.commit_callback
+ function="WMap.Location" />
+ </search_editor>
<button
follows="top|right"
height="23"
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 8f1799688b..0640ae21de 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -2481,30 +2481,30 @@
name="Debug Pipeline">
<menu_item_check.on_check
function="CheckControl"
- parameter="RenderDebugGL" />
+ parameter="RenderDebugPipeline" />
<menu_item_check.on_click
function="ToggleControl"
- parameter="RenderDebugGL" />
+ parameter="RenderDebugPipeline" />
</menu_item_check>
<menu_item_check
label="Fast Alpha"
name="Fast Alpha">
<menu_item_check.on_check
function="CheckControl"
- parameter="RenderDebugGL" />
+ parameter="RenderFastAlpha" />
<menu_item_check.on_click
function="ToggleControl"
- parameter="RenderDebugGL" />
+ parameter="RenderFastAlpha" />
</menu_item_check>
<menu_item_check
label="Animation Textures"
name="Animation Textures">
<menu_item_check.on_check
function="CheckControl"
- parameter="RenderDebugGL" />
+ parameter="AnimateTextures" />
<menu_item_check.on_click
function="ToggleControl"
- parameter="RenderDebugGL" />
+ parameter="AnimateTextures" />
</menu_item_check>
<menu_item_check
label="Disable Textures"
@@ -2555,7 +2555,7 @@
function="CheckControl"
parameter="RenderAttachedLights" />
<menu_item_check.on_click
- function="Advanced.HandleAttchedLightParticles"
+ function="Advanced.HandleAttachedLightParticles"
parameter="RenderAttachedLights" />
</menu_item_check>
<menu_item_check
@@ -2565,7 +2565,7 @@
function="CheckControl"
parameter="RenderAttachedParticles" />
<menu_item_check.on_click
- function="Advanced.HandleAttchedLightParticles"
+ function="Advanced.HandleAttachedLightParticles"
parameter="RenderAttachedParticles" />
</menu_item_check>
<menu_item_check
diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml
index 57b090e5b4..3578c4326d 100644
--- a/indra/newview/skins/default/xui/en/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml
@@ -80,16 +80,6 @@
name="volume_btn"
tool_tip="Global Volume Control"
width="16" />
- <panel
- class="panel_volume_pulldown"
- follows="all"
- height="533"
- layout="topleft"
- left="0"
- name="volume_pulldown"
- top="5"
- visible="false"
- width="313" />
<text
enabled="true"