From 55c1f18c8d70304653d21373d3b71130123945b2 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 22 Dec 2009 16:41:21 -0500 Subject: For EXT-3622: Take off item, wear a different item --> first item is put on again --- indra/newview/llinventorybridge.cpp | 36 ++++++++++++++++++++++++------------ indra/newview/llinventorybridge.h | 4 +++- indra/newview/llviewermenu.cpp | 7 ++++++- 3 files changed, 33 insertions(+), 14 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 3fc2cbecbe..beecd48419 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,28 @@ void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable, delete on_remove_struct; } +/* 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..c93fc85a7d 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -572,7 +572,9 @@ 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); + 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/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 23bcca9603..46a21066ba 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -7428,7 +7428,12 @@ class LLEditTakeOff : public view_listener_t { EWearableType type = LLWearableDictionary::typeNameToType(clothing); if (type >= WT_SHAPE && type < WT_COUNT) - LLAgentWearables::userRemoveWearable(type); + { + // MULTI-WEARABLES + LLViewerInventoryItem *item = dynamic_cast(gAgentWearables.getWearableInventoryItem(type,0)); + LLWearableBridge::removeItemFromAvatar(item); + } + } return true; } -- cgit v1.2.3 From e3211c4ac1830d5f480cc8206aad932fd0505e21 Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Wed, 23 Dec 2009 17:14:27 +0000 Subject: EXT-3679: Send Session, Region, and Parcel IDs to Search. These IDs are sent as the following query parameters to the search server: sid=, rid=, pid=, for the Session ID, Region ID, and Parcel ID respectively. For some reason, Parcel ID always seems to be NULL though. I'll file a separate JIRA for that. --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/llweb.cpp | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 455c3587ff..ff7c2b1f5e 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3585,7 +3585,7 @@ Type String Value - http://int.searchwww-phx0.damballah.lindenlab.com/viewer/[CATEGORY]?q=[QUERY]&p=[AUTH_TOKEN]&r=[MATURITY]&lang=[LANGUAGE]&g=[GODLIKE] + http://int.searchwww-phx0.damballah.lindenlab.com/viewer/[CATEGORY]?q=[QUERY]&p=[AUTH_TOKEN]&r=[MATURITY]&lang=[LANGUAGE]&g=[GODLIKE]&sid=[SESSION_ID]&rid=[REGION_ID]&pid=[PARCEL_ID] HighResSnapshot 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); -- cgit v1.2.3 From 069b410a884a5ee565d1cc09a2280b2b8b19ce1d Mon Sep 17 00:00:00 2001 From: Steve Bennetts Date: Wed, 23 Dec 2009 11:24:43 -0800 Subject: Fix for world map textures not loading with HTTP Texture changes. --- indra/newview/lltexturefetch.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'indra/newview') 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) { -- cgit v1.2.3 From 183c991402a49caa5b29b85864b3ff9ef7a2fd53 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 23 Dec 2009 11:29:13 -0800 Subject: DEV-44614 ugly/broken font and formatting used for IM toast emotes fix bug, also fix some comments/typos/enumparams in this code area. --- indra/newview/lltoastimpanel.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'indra/newview') 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("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; -- cgit v1.2.3 From 5c8b2deb82cfe753d6fe25e418f99f05d76e0b73 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 23 Dec 2009 15:15:49 -0500 Subject: For EXT-3622: Take off item, wear a different item --> first item is put on again. Fixed the 'remove all clothing' case. --- indra/newview/llinventorybridge.cpp | 38 +++++++++++++++++++++++++++++++++++++ indra/newview/llinventorybridge.h | 1 + indra/newview/llviewermenu.cpp | 2 +- 3 files changed, 40 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index beecd48419..d70221b22a 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4939,6 +4939,44 @@ 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( + 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) { diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index c93fc85a7d..cc1fa45b26 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -574,6 +574,7 @@ public: static void onRemoveFromAvatar( void* userdata ); static void onRemoveFromAvatarArrived( LLWearable* wearable, void* userdata ); static void removeItemFromAvatar(LLViewerInventoryItem *item); + static void removeAllClothesFromAvatar(); void removeFromAvatar(); protected: diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 46a21066ba..620c700077 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -7423,7 +7423,7 @@ class LLEditTakeOff : public view_listener_t { std::string clothing = userdata.asString(); if (clothing == "all") - LLAgentWearables::userRemoveAllClothes(); + LLWearableBridge::removeAllClothesFromAvatar(); else { EWearableType type = LLWearableDictionary::typeNameToType(clothing); -- cgit v1.2.3 From 6b984521c302067e806e9228cb6abb6c9a58a834 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 23 Dec 2009 12:18:20 -0800 Subject: DEV-44626 pressing 'enter' in world map search field does not initiate the search --- indra/newview/skins/default/xui/en/floater_world_map.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/newview') 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"> + +