diff options
Diffstat (limited to 'indra/newview')
36 files changed, 306 insertions, 103 deletions
diff --git a/indra/newview/gpu_table.txt b/indra/newview/gpu_table.txt index 066990bafa..91d59a2c6b 100644 --- a/indra/newview/gpu_table.txt +++ b/indra/newview/gpu_table.txt @@ -49,6 +49,9 @@ ATI Radeon X1600 .*ATI.*Radeon X16.* 3 ATI Radeon X1700 .*ATI.*Radeon X17.* 3 ATI Radeon X1800 .*ATI.*Radeon X18.* 3 ATI Radeon X1900 .*ATI.*Radeon X19.* 3 +ATI Radeon X2400 .*ATI.*Radeon X24.* 3 +ATI Radeon X2600 .*ATI.*Radeon X26.* 3 +ATI Radeon X2900 .*ATI.*Radeon X29.* 3 ATI Radeon X300 .*ATI.*Radeon X3.* 2 ATI Radeon X400 .*ATI.*Radeon X4.* 2 ATI Radeon X500 .*ATI.*Radeon X5.* 2 diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 63d1986dec..ad934abfa7 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1530,6 +1530,9 @@ bool LLAppViewer::cleanup() delete gGlobalEconomy; gGlobalEconomy = NULL; + delete gActiveChannelSpeakerMgr; + gActiveChannelSpeakerMgr = NULL; + delete gLocalSpeakerMgr; gLocalSpeakerMgr = NULL; @@ -3015,7 +3018,7 @@ const std::vector<std::string>& LLAppViewer::getLoginURIs() const if (gLoginURIs.empty()) { // not specified on the command line, use value from table - gLoginURIs = LLSRV::rewriteURI(gGridInfo[gGridChoice].mLoginURI); + gLoginURIs.push_back(gGridInfo[gGridChoice].mLoginURI); } return gLoginURIs; } diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index 1bcd1e1ab4..d957a3783a 100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -372,10 +372,14 @@ void LLFeatureManager::loadGPUClass() char* ex = strtok(expr, ".*"); char* rnd = (char*) renderer.c_str(); - + while (ex != NULL && rnd != NULL) { rnd = strstr(rnd, ex); + if (rnd != NULL) + { + rnd += strlen(ex); + } ex = strtok(NULL, ".*"); } diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 543dd94f3b..3b96a4ce5e 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -1045,7 +1045,8 @@ BOOL LLPanelLandObjects::postBuild() mSelectedObjects = LLUICtrlFactory::getTextBoxByName(this, "selected_objects_text"); mCleanOtherObjectsTime = LLUICtrlFactory::getLineEditorByName(this, "clean other time"); - mCleanOtherObjectsTime->setFocusLostCallback(onLostFocus); + mCleanOtherObjectsTime->setFocusLostCallback(onLostFocus); + mCleanOtherObjectsTime->setCommitCallback(onCommitClean); childSetPrevalidate("clean other time", LLLineEditor::prevalidateNonNegativeS32); childSetUserData("clean other time", this); @@ -1818,6 +1819,12 @@ void LLPanelLandObjects::onClickReturnOtherObjects(void* userdata) // static void LLPanelLandObjects::onLostFocus(LLUICtrl *caller, void* user_data) { + onCommitClean(caller, user_data); +} + +// static +void LLPanelLandObjects::onCommitClean(LLUICtrl *caller, void* user_data) +{ LLPanelLandObjects *lop = (LLPanelLandObjects *)user_data; LLParcel* parcel = lop->mParcel->getParcel(); if (parcel) diff --git a/indra/newview/llfloaterland.h b/indra/newview/llfloaterland.h index 9be813f8fd..fa941caf78 100644 --- a/indra/newview/llfloaterland.h +++ b/indra/newview/llfloaterland.h @@ -258,7 +258,7 @@ public: static void onCommitList(LLUICtrl* ctrl, void* data); static void onLostFocus(LLUICtrl* caller, void* user_data); - + static void onCommitClean(LLUICtrl* caller, void* user_data); static void processParcelObjectOwnersReply(LLMessageSystem *msg, void **); virtual BOOL postBuild(); diff --git a/indra/newview/llfloatersellland.cpp b/indra/newview/llfloatersellland.cpp index 9bf1f785b0..ffa1e13bf2 100644 --- a/indra/newview/llfloatersellland.cpp +++ b/indra/newview/llfloatersellland.cpp @@ -492,7 +492,14 @@ void LLFloaterSellLandUI::doSellLand(void *userdata) args["[SALE_PRICE]"] = llformat("%d",sale_price); args["[NAME]"] = authorizedBuyerName; - gViewerWindow->alertXml("ConfirmLandSaleChange", args, onConfirmSale, self); + if (sell_to_anyone) + { + gViewerWindow->alertXml("ConfirmLandSaleToAnyoneChange", args, onConfirmSale, self); + } + else + { + gViewerWindow->alertXml("ConfirmLandSaleChange", args, onConfirmSale, self); + } } else { diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index 353020d9c4..4c03a15619 100644 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -11,7 +11,7 @@ * The source code in this file ("Source Code") is provided by Linden Lab * to you under the terms of the GNU General Public License, version 2.0 * ("GPL"), unless you have obtained a separate licensing agreement - * ("Other License"), formally executed by you and Linden Lab. Terms of + * ("Other License"), formally executed by you and Linden Lab. Terms of * the GPL can be found in doc/GPL-license.txt in this distribution, or * online at http://secondlife.com/developers/opensource/gplv2 * @@ -126,18 +126,18 @@ class LLMapInventoryObserver : public LLInventoryObserver { public: LLMapInventoryObserver() {} - virtual ~LLMapInventoryObserver() {} - virtual void changed(U32 mask); + virtual ~LLMapInventoryObserver() {} + virtual void changed(U32 mask); }; void LLMapInventoryObserver::changed(U32 mask) { - // if there's a change we're interested in. - if((mask & (LLInventoryObserver::CALLING_CARD | LLInventoryObserver::ADD | - LLInventoryObserver::REMOVE)) != 0) - { - gFloaterWorldMap->inventoryChanged(); - } + // if there's a change we're interested in. + if((mask & (LLInventoryObserver::CALLING_CARD | LLInventoryObserver::ADD | + LLInventoryObserver::REMOVE)) != 0) + { + gFloaterWorldMap->inventoryChanged(); + } } class LLMapFriendObserver : public LLFriendObserver @@ -177,8 +177,8 @@ LLFloaterWorldMap::LLFloaterWorldMap() FALSE, // drag on left TRUE, // minimize TRUE), // close - mInventory(NULL), - mInventoryObserver(NULL), + mInventory(NULL), + mInventoryObserver(NULL), mFriendObserver(NULL), mCompletingRegionName(""), mWaitingForTracker(FALSE), @@ -229,12 +229,18 @@ BOOL LLFloaterWorldMap::postBuild() { avatar_combo->selectFirstItem(); avatar_combo->setPrearrangeCallback( onAvatarComboPrearrange ); + avatar_combo->setTextEntryCallback( onComboTextEntry ); } childSetAction("DoSearch", onLocationCommit, this); childSetFocusChangedCallback("location", updateSearchEnabled); - childSetKeystrokeCallback("location", (void (*)(LLLineEditor*,void*))updateSearchEnabled, NULL); + + LLLineEditor *location_editor = LLUICtrlFactory::getLineEditorByName(this, "location"); + if (location_editor) + { + location_editor->setKeystrokeCallback( onSearchTextEntry ); + } childSetCommitCallback("search_results", onCommitSearchResult, this); childSetDoubleClickCallback("search_results", onClickTeleportBtn); @@ -249,6 +255,7 @@ BOOL LLFloaterWorldMap::postBuild() { landmark_combo->selectFirstItem(); landmark_combo->setPrearrangeCallback( onLandmarkComboPrearrange ); + landmark_combo->setTextEntryCallback( onComboTextEntry ); } childSetAction("Go Home", onGoHome, this); @@ -284,9 +291,9 @@ LLFloaterWorldMap::~LLFloaterWorldMap() // All cleaned up by LLView destructor mTabs = NULL; - // Inventory deletes all observers on shutdown - mInventory = NULL; - mInventoryObserver = NULL; + // Inventory deletes all observers on shutdown + mInventory = NULL; + mInventoryObserver = NULL; // avatar tracker will delete this for us. mFriendObserver = NULL; @@ -509,7 +516,7 @@ void LLFloaterWorldMap::draw() } childSetEnabled("Teleport", (BOOL)tracking_status); -// childSetEnabled("Clear", (BOOL)tracking_status); +// childSetEnabled("Clear", (BOOL)tracking_status); childSetEnabled("Show Destination", (BOOL)tracking_status || gWorldMap->mIsTrackingUnknownLocation); childSetEnabled("copy_slurl", (mSLURL.size() > 0) ); @@ -595,7 +602,7 @@ void LLFloaterWorldMap::trackLandmark( const LLUUID& landmark_item_id ) if (combo) name = combo->getSimple(); mTrackedStatus = LLTracker::TRACKING_LANDMARK; LLTracker::trackLandmark(mLandmarkAssetIDList.get( idx ), // assetID - mLandmarkItemIDList.get( idx ), // itemID + mLandmarkItemIDList.get( idx ), // itemID name); // name if( asset_id != sHomeID ) @@ -605,7 +612,7 @@ void LLFloaterWorldMap::trackLandmark( const LLUUID& landmark_item_id ) } // We have to download both region info and landmark data, so set busy. JC -// getWindow()->incBusyCount(); +// getWindow()->incBusyCount(); } else { @@ -1000,7 +1007,7 @@ void LLFloaterWorldMap::clearAvatarSelection(BOOL clear_ui) void LLFloaterWorldMap::adjustZoomSliderBounds() { // World size in regions - S32 world_width_regions = gWorldMap->getWorldWidth() / REGION_WIDTH_UNITS; + S32 world_width_regions = gWorldMap->getWorldWidth() / REGION_WIDTH_UNITS; S32 world_height_regions = gWorldMap->getWorldHeight() / REGION_WIDTH_UNITS; // Pad the world size a little bit, so we have a nice border on @@ -1044,7 +1051,7 @@ void LLFloaterWorldMap::adjustZoomSliderBounds() // static void LLFloaterWorldMap::onPanBtn( void* userdata ) { - if( !gFloaterWorldMap ) return; + if( !gFloaterWorldMap ) return; EPanDirection direction = (EPanDirection)(intptr_t)userdata; @@ -1055,7 +1062,7 @@ void LLFloaterWorldMap::onPanBtn( void* userdata ) case PAN_UP: pan_y = -1; break; case PAN_DOWN: pan_y = 1; break; case PAN_LEFT: pan_x = 1; break; - case PAN_RIGHT: pan_x = -1; break; + case PAN_RIGHT: pan_x = -1; break; default: llassert(0); return; } @@ -1095,6 +1102,21 @@ void LLFloaterWorldMap::onLandmarkComboPrearrange( LLUICtrl* ctrl, void* userdat } +void LLFloaterWorldMap::onComboTextEntry( LLLineEditor* ctrl, void* userdata ) +{ + // Reset the tracking whenever we start typing into any of the search fields, + // so that hitting <enter> does an auto-complete versus teleporting us to the + // previously selected landmark/friend. + LLTracker::clearFocus(); +} + +// static +void LLFloaterWorldMap::onSearchTextEntry( LLLineEditor* ctrl, void* userdata ) +{ + onComboTextEntry(ctrl, userdata); + updateSearchEnabled(ctrl, userdata); +} + // static void LLFloaterWorldMap::onLandmarkComboCommit( LLUICtrl* ctrl, void* userdata ) { @@ -1260,7 +1282,7 @@ void LLFloaterWorldMap::onClearBtn(void* data) self->mTrackedStatus = LLTracker::TRACKING_NOTHING; LLTracker::stopTracking((void *)(intptr_t)TRUE); gWorldMap->mIsTrackingUnknownLocation = FALSE; - self->mSLURL = ""; // Clear the SLURL since it's invalid + self->mSLURL = ""; // Clear the SLURL since it's invalid self->mSetToUserPosition = TRUE; // Revert back to the current user position } @@ -1329,7 +1351,7 @@ void LLFloaterWorldMap::centerOnTarget(BOOL animate) else { // We've got the position finally, so we're no longer busy. JC -// getWindow()->decBusyCount(); +// getWindow()->decBusyCount(); pos_global = LLTracker::getTrackedPositionGlobal() - gAgent.getCameraPositionGlobal(); } } diff --git a/indra/newview/llfloaterworldmap.h b/indra/newview/llfloaterworldmap.h index b98bbbbe44..c069b40929 100644 --- a/indra/newview/llfloaterworldmap.h +++ b/indra/newview/llfloaterworldmap.h @@ -10,7 +10,7 @@ * The source code in this file ("Source Code") is provided by Linden Lab * to you under the terms of the GNU General Public License, version 2.0 * ("GPL"), unless you have obtained a separate licensing agreement - * ("Other License"), formally executed by you and Linden Lab. Terms of + * ("Other License"), formally executed by you and Linden Lab. Terms of * the GPL can be found in doc/GPL-license.txt in this distribution, or * online at http://secondlife.com/developers/opensource/gplv2 * @@ -90,16 +90,16 @@ public: void trackLocation(const LLVector3d& pos); void trackEvent(const LLItemInfo &event_info); void trackGenericItem(const LLItemInfo &item); - void trackURL(const LLString& region_name, S32 x_coord, S32 y_coord, S32 z_coord); + void trackURL(const LLString& region_name, S32 x_coord, S32 y_coord, S32 z_coord); static const LLUUID& getHomeID() { return sHomeID; } // A z_attenuation of 0.0f collapses the distance into the X-Y plane - F32 getDistanceToDestination(const LLVector3d& pos_global, F32 z_attenuation = 0.5f) const; + F32 getDistanceToDestination(const LLVector3d& pos_global, F32 z_attenuation = 0.5f) const; - void clearLocationSelection(BOOL clear_ui = FALSE); - void clearAvatarSelection(BOOL clear_ui = FALSE); - void clearLandmarkSelection(BOOL clear_ui = FALSE); + void clearLocationSelection(BOOL clear_ui = FALSE); + void clearAvatarSelection(BOOL clear_ui = FALSE); + void clearLandmarkSelection(BOOL clear_ui = FALSE); // Adjust the maximally zoomed out limit of the zoom slider so you can // see the whole world, plus a little. @@ -118,12 +118,15 @@ protected: static void onLandmarkComboPrearrange( LLUICtrl* ctrl, void* data ); static void onLandmarkComboCommit( LLUICtrl* ctrl, void* data ); - + static void onAvatarComboPrearrange( LLUICtrl* ctrl, void* data ); static void onAvatarComboCommit( LLUICtrl* ctrl, void* data ); static void onCommitBackground(void* data, bool from_click); + static void onComboTextEntry( LLLineEditor* ctrl, void* data ); + static void onSearchTextEntry( LLLineEditor* ctrl, void* data ); + static void onClearBtn(void*); static void onFlyBtn(void*); static void onClickTeleportBtn(void*); @@ -143,7 +146,7 @@ protected: static void onGoToLandmarkDialog(S32 option,void* userdata); void flyToLandmark(); void teleportToLandmark(); - void setLandmarkVisited(); + void setLandmarkVisited(); void buildAvatarIDList(); void flyToAvatar(); @@ -154,7 +157,7 @@ protected: static void onCommitLocation( LLUICtrl* ctrl, void* userdata ); static void onCommitSearchResult( LLUICtrl* ctrl, void* userdata ); - void cacheLandmarkPosition(); + void cacheLandmarkPosition(); protected: LLTabContainerCommon* mTabs; @@ -165,7 +168,7 @@ protected: LLDynamicArray<LLUUID> mLandmarkAssetIDList; LLDynamicArray<LLUUID> mLandmarkItemIDList; - BOOL mHasLandmarkPosition; + BOOL mHasLandmarkPosition; static const LLUUID sHomeID; diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index eb9addcf5c..2577474e24 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -3681,7 +3681,7 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask, BOOL called_from_parent ) // SL-51858: Key presses are not being passed to the Popup menu. // A proper fix is non-trivial so instead just close the menu. LLMenuGL* menu = (LLMenuGL*)LLView::getViewByHandle(mPopupMenuHandle); - if (menu->isOpen()) + if (menu && menu->isOpen()) { LLMenuGL::sMenuContainer->hideMenus(); } @@ -3921,6 +3921,14 @@ BOOL LLFolderView::handleUnicodeCharHere(llwchar uni_char, BOOL called_from_pare BOOL handled = FALSE; if (gFocusMgr.childHasKeyboardFocus(getRoot())) { + // SL-51858: Key presses are not being passed to the Popup menu. + // A proper fix is non-trivial so instead just close the menu. + LLMenuGL* menu = (LLMenuGL*)LLView::getViewByHandle(mPopupMenuHandle); + if (menu && menu->isOpen()) + { + LLMenuGL::sMenuContainer->hideMenus(); + } + //do text search if (mSearchTimer.getElapsedTimeF32() > gSavedSettings.getF32("TypeAheadTimeout")) { diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index c213d26848..82a42a18b5 100644 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -867,6 +867,12 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data) llinfos << "Received null group member data." << llendl; } } + + //if group members are loaded while titles are missing, load the titles. + if(group_datap->mTitles.size() < 1) + { + gGroupMgr->sendGroupTitlesRequest(group_id); + } } if (group_datap->mMembers.size() == (U32)group_datap->mMemberCount) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 12617efb67..9c9b1ad257 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2719,6 +2719,7 @@ void LLCallingCardBridge::buildContextMenu(LLMenuGL& menu, U32 flags) && (LLUUID::null != item->getCreatorUUID()) && (item->getCreatorUUID() != gAgent.getID())); BOOL user_online = (LLAvatarTracker::instance().isBuddyOnline(item->getCreatorUUID())); + items.push_back("Send Instant Message Separator"); items.push_back("Send Instant Message"); items.push_back("Offer Teleport..."); items.push_back("Conference Chat"); @@ -4294,21 +4295,24 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) getClipboardEntries(true, items, disabled_items, flags); items.push_back("Wearable Separator"); + items.push_back("Wearable Wear"); items.push_back("Wearable Edit"); + + if ((flags & FIRST_SELECTED_ITEM) == 0) { disabled_items.push_back("Wearable Edit"); } - /*menu.appendSeparator(); - menu.append(new LLMenuItemCallGL("Wear", - LLWearableBridge::onWearOnAvatar, - LLWearableBridge::canWearOnAvatar, - (void*)this)); - menu.append(new LLMenuItemCallGL("Edit", - LLWearableBridge::onEditOnAvatar, - LLWearableBridge::canEditOnAvatar, - (void*)this));*/ + //menu.appendSeparator(); + //menu.append(new LLMenuItemCallGL("Wear", + // LLWearableBridge::onWearOnAvatar, + // LLWearableBridge::canWearOnAvatar, + // (void*)this)); + //menu.append(new LLMenuItemCallGL("Edit", + // LLWearableBridge::onEditOnAvatar, + // LLWearableBridge::canEditOnAvatar, + // (void*)this)); if( item && (item->getType() == LLAssetType::AT_CLOTHING) ) { diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp index 36e3f9a5e9..2f5f154b77 100644 --- a/indra/newview/llmaniptranslate.cpp +++ b/indra/newview/llmaniptranslate.cpp @@ -2132,15 +2132,12 @@ void LLManipTranslate::renderTranslationHandles() LLVector3 arrow_axis; getManipAxis(first_object, which_arrow[face], arrow_axis); - if (fabs(angle_between(camera_axis, arrow_axis) - F_PI_BY_TWO) < F_PI_BY_TWO - HANDLE_HIDE_ANGLE) - { - renderArrow(which_arrow[face], - mManipPart, - (face >= 3) ? -mConeSize : mConeSize, - (face >= 3) ? -mArrowLengthMeters : mArrowLengthMeters, - mConeSize, - FALSE); - } + renderArrow(which_arrow[face], + mManipPart, + (face >= 3) ? -mConeSize : mConeSize, + (face >= 3) ? -mArrowLengthMeters : mArrowLengthMeters, + mConeSize, + FALSE); } } } diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp index f36e282ea0..4d02af8fae 100644 --- a/indra/newview/llmutelist.cpp +++ b/indra/newview/llmutelist.cpp @@ -62,6 +62,8 @@ #include "llviewergenericmessage.h" // for gGenericDispatcher #include "llviewerwindow.h" #include "llworld.h" //for particle system banning +#include "llviewerobject.h" +#include "llviewerobjectlist.h" LLMuteList* gMuteListp = NULL; @@ -513,8 +515,21 @@ BOOL LLMuteList::saveToFile(const LLString& filename) BOOL LLMuteList::isMuted(const LLUUID& id, const LLString& name, U32 flags) const { + LLUUID id_to_check = id; + + // for objects, check for muting on their parent prim + LLViewerObject *objectp = gObjectList.findObject(id); + if ((objectp) && (!objectp->isAvatar())) + { + LLViewerObject *parentp = (LLViewerObject *)objectp->getParent(); + if (parentp) + { + id_to_check = parentp->getID(); + } + } + // don't need name or type for lookup - LLMute mute(id); + LLMute mute(id_to_check); mute_set_t::const_iterator mute_it = mMutes.find(mute); if (mute_it != mMutes.end()) { diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index 5b43497f03..c090fd9749 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -365,6 +365,7 @@ void LLPanelAvatarSecondLife::onDoubleClickGroup(void* data) if(group_list) { LLScrollListItem* item = group_list->getFirstSelected(); + if(item && item->getUUID().notNull()) { llinfos << "Show group info " << item->getUUID() << llendl; @@ -1565,6 +1566,8 @@ void LLPanelAvatar::resetGroupList() group_string += group_data.mName; LLSD row; + + row["id"] = id ; row["columns"][0]["value"] = group_string; row["columns"][0]["font"] = "SANSSERIF_SMALL"; row["columns"][0]["width"] = 0; @@ -2010,8 +2013,7 @@ void LLPanelAvatar::processAvatarGroupsReply(LLMessageSystem *msg, void**) LLString group_string; if (group_id.notNull()) { - group_string.assign("Member of "); - group_string.append(group_name); + group_string.assign(group_name); } else { diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp index 04fb54b0a7..7163a71bc3 100644 --- a/indra/newview/llpanelclassified.cpp +++ b/indra/newview/llpanelclassified.cpp @@ -808,17 +808,21 @@ void LLPanelClassified::confirmPublish(S32 option) } // Tell all the widgets to reset their dirty state since the ad was just saved - mSnapshotCtrl->resetDirty(); - mNameEditor->resetDirty(); - mDescEditor->resetDirty(); - mLocationEditor->resetDirty(); + if (mSnapshotCtrl) + mSnapshotCtrl->resetDirty(); + if (mNameEditor) + mNameEditor->resetDirty(); + if (mDescEditor) + mDescEditor->resetDirty(); + if (mLocationEditor) + mLocationEditor->resetDirty(); mLocationChanged = false; - mCategoryCombo->resetDirty(); - mMatureCheck->resetDirty(); + if (mCategoryCombo) + mCategoryCombo->resetDirty(); + if (mMatureCheck) + mMatureCheck->resetDirty(); if (mAutoRenewCheck) - { mAutoRenewCheck->resetDirty(); - } } // static diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp index e4f7d1e0b2..660de69fb0 100644 --- a/indra/newview/llpreview.cpp +++ b/indra/newview/llpreview.cpp @@ -66,12 +66,14 @@ LLPreview::LLPreview(const std::string& name) : mUserResized(FALSE), mCloseAfterSave(FALSE), mAssetStatus(PREVIEW_ASSET_UNLOADED), - mItem(NULL) + mItem(NULL), + mDirty(TRUE) { // don't add to instance list, since ItemID is null mAuxItem = new LLInventoryItem; // (LLPointer is auto-deleted) // don't necessarily steal focus on creation -- sometimes these guys pop up without user action mAutoFocus = FALSE; + gInventory.addObserver(this); } LLPreview::LLPreview(const std::string& name, const LLRect& rect, const std::string& title, const LLUUID& item_uuid, const LLUUID& object_uuid, BOOL allow_resize, S32 min_width, S32 min_height, LLPointer<LLViewerInventoryItem> inv_item ) @@ -84,7 +86,8 @@ LLPreview::LLPreview(const std::string& name, const LLRect& rect, const std::str mUserResized(FALSE), mCloseAfterSave(FALSE), mAssetStatus(PREVIEW_ASSET_UNLOADED), - mItem(inv_item) + mItem(inv_item), + mDirty(TRUE) { mAuxItem = new LLInventoryItem; // don't necessarily steal focus on creation -- sometimes these guys pop up without user action @@ -94,7 +97,7 @@ LLPreview::LLPreview(const std::string& name, const LLRect& rect, const std::str { sInstances[mItemUUID] = this; } - + gInventory.addObserver(this); } LLPreview::~LLPreview() @@ -118,6 +121,7 @@ LLPreview::~LLPreview() } } } + gInventory.removeObserver(this); } void LLPreview::setItemID(const LLUUID& item_id) @@ -215,6 +219,7 @@ void LLPreview::onCommit() { new_item->updateServer(FALSE); gInventory.updateItem(new_item); + gInventory.notifyObservers(); // If the item is an attachment that is currently being worn, // update the object itself. @@ -238,6 +243,34 @@ void LLPreview::onCommit() } } +void LLPreview::changed(U32 mask) +{ + mDirty = TRUE; +} + +void LLPreview::draw() +{ + LLFloater::draw(); + if (mDirty) + { + mDirty = FALSE; + const LLViewerInventoryItem *item = getItem(); + if (item) + { + refreshFromItem(item); + } + } +} + +void LLPreview::refreshFromItem(const LLInventoryItem* item) +{ + setTitle(llformat("%s: %s",getTitleName(),item->getName().c_str())); + childSetText("desc",item->getDescription()); + + BOOL can_agent_manipulate = item->getPermissions().allowModifyBy(gAgent.getID()); + childSetEnabled("desc",can_agent_manipulate); +} + // static void LLPreview::onText(LLUICtrl*, void* userdata) { diff --git a/indra/newview/llpreview.h b/indra/newview/llpreview.h index ae986f5aae..97cd2d5b07 100644 --- a/indra/newview/llpreview.h +++ b/indra/newview/llpreview.h @@ -38,6 +38,7 @@ #include "lluuid.h" #include "llviewerinventory.h" #include "lltabcontainer.h" +#include "llinventorymodel.h" #include <map> class LLLineEditor; @@ -61,7 +62,7 @@ protected: static std::map<LLUUID, LLViewHandle> sAutoOpenPreviewHandles; }; -class LLPreview : public LLFloater +class LLPreview : public LLFloater, LLInventoryObserver { public: typedef enum e_asset_status @@ -116,6 +117,10 @@ public: void setNotecardInfo(const LLUUID& notecard_inv_id, const LLUUID& object_id) { mNotecardInventoryID = notecard_inv_id; mObjectID = object_id; } + // llview + virtual void draw(); + void refreshFromItem(const LLInventoryItem* item); + protected: virtual void onCommit(); @@ -124,7 +129,11 @@ protected: static void onText(LLUICtrl*, void* userdata); static void onRadio(LLUICtrl*, void* userdata); - + // for LLInventoryObserver + virtual void changed(U32 mask); + BOOL mDirty; + virtual const char *getTitleName() const { return "Preview"; } + protected: LLUUID mItemUUID; LLUUID mSourceID; diff --git a/indra/newview/llpreviewanim.h b/indra/newview/llpreviewanim.h index bb6ec759e4..37cbd49725 100644 --- a/indra/newview/llpreviewanim.h +++ b/indra/newview/llpreviewanim.h @@ -50,7 +50,8 @@ public: protected: virtual void onClose(bool app_quitting); - + virtual const char *getTitleName() const { return "Animation"; } + LLAnimPauseRequest mPauseRequest; LLUUID mItemID; LLString mTitle; diff --git a/indra/newview/llpreviewgesture.h b/indra/newview/llpreviewgesture.h index 5c84ee0188..4dea34ba1c 100644 --- a/indra/newview/llpreviewgesture.h +++ b/indra/newview/llpreviewgesture.h @@ -137,6 +137,8 @@ protected: static void onDonePreview(LLMultiGesture* gesture, void* data); + virtual const char *getTitleName() const { return "Gesture"; } + protected: // LLPreview contains mDescEditor LLLineEditor* mTriggerEditor; diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index dc56494d7f..eef8c0d636 100644 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -148,6 +148,10 @@ LLPreviewNotecard::LLPreviewNotecard(const std::string& name, gAgent.changeCameraToDefault(); } +LLPreviewNotecard::~LLPreviewNotecard() +{ +} + BOOL LLPreviewNotecard::postBuild() { LLViewerTextEditor *ed = (LLViewerTextEditor *)gUICtrlFactory->getTextEditorByName(this, "Notecard Editor"); @@ -213,7 +217,7 @@ BOOL LLPreviewNotecard::handleKeyHere(KEY key, MASK mask, return TRUE; } } - return FALSE; + return LLPreview::handleKeyHere(key, mask, called_from_parent); } // virtual diff --git a/indra/newview/llpreviewnotecard.h b/indra/newview/llpreviewnotecard.h index 9909284d5f..233246ceaa 100644 --- a/indra/newview/llpreviewnotecard.h +++ b/indra/newview/llpreviewnotecard.h @@ -54,7 +54,8 @@ public: const LLUUID& asset_id = LLUUID::null, BOOL show_keep_discard = FALSE, LLPointer<LLViewerInventoryItem> inv_item = NULL); - + virtual ~LLPreviewNotecard(); + // llpreview virtual bool saveItem(LLPointer<LLInventoryItem>* itemptr); @@ -102,6 +103,8 @@ protected: static void handleSaveChangesDialog(S32 option, void* userdata); + virtual const char *getTitleName() const { return "Note"; } + protected: LLViewerTextEditor* mEditor; LLButton* mSaveBtn; diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 3dfeb2c3ac..a9b36f3978 100644 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -128,6 +128,8 @@ protected: static void onErrorList(LLUICtrl*, void* user_data); + virtual const char *getTitleName() const { return "Script"; } + private: LLString mSampleText; std::string mHelpFile; @@ -189,6 +191,8 @@ protected: protected: + + virtual const char *getTitleName() const { return "Script"; } LLScriptEdCore* mScriptEd; // Can safely close only after both text and bytecode are uploaded S32 mPendingUploads; diff --git a/indra/newview/llpreviewsound.h b/indra/newview/llpreviewsound.h index 74df017def..b56035f34e 100644 --- a/indra/newview/llpreviewsound.h +++ b/indra/newview/llpreviewsound.h @@ -44,6 +44,9 @@ public: static void playSound( void* userdata ); static void auditionSound( void* userdata ); +protected: + virtual const char *getTitleName() const { return "Sound"; } + }; #endif // LL_LLPREVIEWSOUND_H diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index 4c8d4efb25..78d066f85f 100644 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -286,7 +286,7 @@ void LLPreviewTexture::draw() LLFontGL::DROP_SHADOW); } } - } + } } } diff --git a/indra/newview/llpreviewtexture.h b/indra/newview/llpreviewtexture.h index b7850de92e..8ed5210c46 100644 --- a/indra/newview/llpreviewtexture.h +++ b/indra/newview/llpreviewtexture.h @@ -80,6 +80,8 @@ protected: void init(); void updateAspectRatio(); + virtual const char *getTitleName() const { return "Texture"; } + protected: LLUUID mImageID; LLPointer<LLViewerImage> mImage; diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 3c29cfdbfc..e2e076e364 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -3994,7 +3994,11 @@ void LLSelectMgr::sendListToRegions(const LLString& message_name, switch(send_type) { case SEND_ONLY_ROOTS: - getSelection()->applyToRootNodes(&pusheditable); + if(message_name == "ObjectBuy") + getSelection()->applyToRootNodes(&pushroots); + else + getSelection()->applyToRootNodes(&pusheditable); + break; case SEND_INDIVIDUALS: getSelection()->applyToNodes(&pushall); @@ -6062,23 +6066,19 @@ LLViewerObject* LLObjectSelection::getFirstDeleteableObject() bool apply(LLSelectNode* node) { LLViewerObject* obj = node->getObject(); - // you can delete an object if permissions allow it, you are - // the owner, you are an officer in the group that owns the - // object, or you are not the owner but it is on land you own - // or land owned by your group. (whew!) + // you can delete an object if you are the owner + // or you have permission to modify it. if( (obj->permModify()) || (obj->permYouOwner()) || (!obj->permAnyOwner()) // public - || (obj->isOverAgentOwnedLand()) - || (obj->isOverGroupOwnedLand()) ) { if( !obj->isAttachment() ) { - return TRUE; + return true; } } - return true; + return false; } } func; LLSelectNode* node = getFirstNode(&func); diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index c319ef97af..302291ab52 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -932,9 +932,15 @@ BOOL idle_startup() gSavedSettings.setBOOL("UseDebugMenus", TRUE); requested_options.push_back("god-connect"); } - LLAppViewer::instance()->getLoginURIs(); - sAuthUris = LLAppViewer::instance()->getLoginURIs(); - + const std::vector<std::string>& uris = LLAppViewer::instance()->getLoginURIs(); + std::vector<std::string>::const_iterator iter, end; + for (iter = uris.begin(), end = uris.end(); iter != end; ++iter) + { + std::vector<std::string> rewritten; + rewritten = LLSRV::rewriteURI(*iter); + sAuthUris.insert(sAuthUris.end(), + rewritten.begin(), rewritten.end()); + } sAuthUriNum = 0; auth_method = "login_to_simulator"; auth_desc = "Logging in. "; @@ -2161,7 +2167,7 @@ BOOL idle_startup() else { args["[TYPE]"] = "home"; - args["[HELP]"] = "\nYou may want to set a new home location."; + args["[HELP]"] = "You may want to set a new home location."; } gViewerWindow->alertXml("AvatarMoved", args); } diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 856943da6e..4d49d33184 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -375,7 +375,7 @@ void LLStatusBar::refresh() x += buttonRect.getWidth(); } - BOOL have_voice = gVoiceClient->getAreaVoiceDisabled() ? FALSE : TRUE; + BOOL have_voice = parcel && parcel->getVoiceEnabled(); childSetVisible("status_voice", have_voice); if (have_voice) { diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index e6eca31cd0..413b26309d 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -1204,6 +1204,7 @@ BOOL LLToolDragAndDrop::handleDropTextureProtections(LLViewerObject* hit_obj, // if the asset is already in the object's inventory // then it can always be added to a side. // This saves some work if the task's inventory is already loaded + // and ensures that the texture item is only added once. return TRUE; } @@ -1241,7 +1242,10 @@ BOOL LLToolDragAndDrop::handleDropTextureProtections(LLViewerObject* hit_obj, return FALSE; } } - hit_obj->updateInventory(new_item, TASK_INVENTORY_ASSET_KEY, true); + // Add the texture item to the target object's inventory. + hit_obj->updateInventory(new_item, TASK_INVENTORY_ITEM_KEY, true); + // TODO: Check to see if adding the item was successful; if not, then + // we should return false here. } else if(!item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID())) @@ -1253,8 +1257,10 @@ BOOL LLToolDragAndDrop::handleDropTextureProtections(LLViewerObject* hit_obj, } // *FIX: may want to make sure agent can paint hit_obj. - // make sure the object has the texture in it's inventory. - hit_obj->updateInventory(new_item, TASK_INVENTORY_ASSET_KEY, true); + // Add the texture item to the target object's inventory. + hit_obj->updateInventory(new_item, TASK_INVENTORY_ITEM_KEY, true); + // TODO: Check to see if adding the item was successful; if not, then + // we should return false here. } return TRUE; } diff --git a/indra/newview/lltracker.cpp b/indra/newview/lltracker.cpp index 4bab92269c..594ecb5591 100644 --- a/indra/newview/lltracker.cpp +++ b/indra/newview/lltracker.cpp @@ -639,6 +639,10 @@ void LLTracker::stopTrackingLocation(BOOL clear_ui) mTrackingLocationType = LOCATION_NOTHING; } +void LLTracker::clearFocus() +{ + instance()->mTrackingStatus = TRACKING_NOTHING; +} void LLTracker::drawMarker(const LLVector3d& pos_global, const LLColor4& color) { diff --git a/indra/newview/lltracker.h b/indra/newview/lltracker.h index c7e09d0d3d..5f7ad98fe5 100644 --- a/indra/newview/lltracker.h +++ b/indra/newview/lltracker.h @@ -82,7 +82,8 @@ public: static ETrackingLocationType getTrackedLocationType() { return instance()->mTrackingLocationType; } static BOOL isTracking(void*) { return (BOOL) instance()->mTrackingStatus; } static void stopTracking(void*); - + static void clearFocus(); + static const LLUUID& getTrackedLandmarkAssetID() { return instance()->mTrackedLandmarkAssetID; } static const LLUUID& getTrackedLandmarkItemID() { return instance()->mTrackedLandmarkItemID; } diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 43e8589176..b5316d29e0 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -104,14 +104,9 @@ LLViewerInventoryItem::LLViewerInventoryItem(const LLViewerInventoryItem* other) } LLViewerInventoryItem::LLViewerInventoryItem(const LLInventoryItem *other) : - LLInventoryItem(other) + LLInventoryItem(other), + mIsComplete(TRUE) { - LLInventoryItem::copy(other); - if (!mIsComplete) - { - llwarns << "LLViewerInventoryItem copy constructor for incomplete item" - << mUUID << llendl; - } } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index b5f53e5d88..7aa25266fe 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -6053,12 +6053,39 @@ BOOL object_selected_and_point_valid(void *user_data) (selection->getFirstRootObject()->getNVPair("AssetContainer") == NULL); } + +BOOL object_is_wearable() +{ + if (!object_selected_and_point_valid(NULL)) + { + return FALSE; + } + if (sitting_on_selection()) + { + return FALSE; + } + LLObjectSelectionHandle selection = gSelectMgr->getSelection(); + for (LLObjectSelection::valid_root_iterator iter = gSelectMgr->getSelection()->valid_root_begin(); + iter != gSelectMgr->getSelection()->valid_root_end(); iter++) + { + LLSelectNode* node = *iter; + if (node->mPermissions->getOwner() == gAgent.getID()) + { + return TRUE; + } + } + return FALSE; +} + + // Also for seeing if object can be attached. See above. class LLObjectEnableWear : public view_listener_t { bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) { - return object_selected_and_point_valid(NULL); + bool is_wearable = object_selected_and_point_valid(NULL); + gMenuHolder->findControl(userdata["control"].asString())->setValue(is_wearable); + return TRUE; } }; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index f109ea417b..fa92bfb217 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -131,6 +131,7 @@ #include "pipeline.h" #include "llappviewer.h" #include "llfloaterworldmap.h" +#include "llkeythrottle.h" #include "llviewerdisplay.h" #include "llkeythrottle.h" @@ -4407,6 +4408,10 @@ void script_question_cb(S32 option, void* user_data) notify_cautioned_script_question(cbdata, orig, allowed); } + if ( option == 2 ) + { + gMuteListp->add(LLMute(cbdata->mItemID, cbdata->mObjectName, LLMute::OBJECT)); + } delete cbdata; } diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index f0d6fd11c3..b0d1d3daca 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -66,6 +66,7 @@ #include "llworld.h" #include "lloverlaybar.h" #include "roles_constants.h" +#include "llweb.h" const F32 PARCEL_COLLISION_DRAW_SECS = 1.f; @@ -1720,6 +1721,10 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use std::string mediaUrl = std::string ( parcel->getMediaURL () ); LLString::trim(mediaUrl); + // clean spaces and whatnot + mediaUrl = LLWeb::escapeURL(mediaUrl); + + // something changed LLMediaEngine* me = LLMediaEngine::getInstance(); if ( ( me->getUrl () != mediaUrl ) @@ -1837,6 +1842,10 @@ void prepare_video(const LLParcel *parcel) { mediaUrl = std::string ( parcel->getMediaURL () ); } + + // clean spaces and whatnot + mediaUrl = LLWeb::escapeURL(mediaUrl); + LLMediaEngine::getInstance ()->setUrl ( mediaUrl ); LLMediaEngine::getInstance ()->setImageUUID ( parcel->getMediaID () ); LLMediaEngine::getInstance ()->setAutoScaled ( parcel->getMediaAutoScale () ? TRUE : FALSE ); // (U8 instead of BOOL for future expansion) diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 49883eb8c6..a3611b2272 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2446,6 +2446,10 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) return TRUE; } + //if quit from menu, turn off the Keyboardmode for the menu. + if(LLMenuGL::getKeyboardMode()) + LLMenuGL::setKeyboardMode(FALSE); + // *TODO: get this to play well with mouselook and hidden // cursor modes, etc, and re-enable. //if (gFocusMgr.getMouseCapture()) |