diff options
Diffstat (limited to 'linden/indra/newview/llinventorybridge.cpp')
-rw-r--r-- | linden/indra/newview/llinventorybridge.cpp | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/linden/indra/newview/llinventorybridge.cpp b/linden/indra/newview/llinventorybridge.cpp index a7628d7..baf6638 100644 --- a/linden/indra/newview/llinventorybridge.cpp +++ b/linden/indra/newview/llinventorybridge.cpp | |||
@@ -346,6 +346,14 @@ void hideContextEntries(LLMenuGL& menu, | |||
346 | for (itor = list->begin(); itor != list->end(); ++itor) | 346 | for (itor = list->begin(); itor != list->end(); ++itor) |
347 | { | 347 | { |
348 | LLString name = (*itor)->getName(); | 348 | LLString name = (*itor)->getName(); |
349 | |||
350 | // descend into split menus: | ||
351 | if ((name == "More") && (WIDGET_TYPE_MENU_ITEM_BRANCH == (*itor)->getWidgetType())) | ||
352 | { | ||
353 | hideContextEntries(*((LLMenuItemBranchGL *)(*itor))->getBranch(), entries_to_show, disabled_entries); | ||
354 | } | ||
355 | |||
356 | |||
349 | bool found = false; | 357 | bool found = false; |
350 | std::vector<LLString>::const_iterator itor2; | 358 | std::vector<LLString>::const_iterator itor2; |
351 | for (itor2 = entries_to_show.begin(); itor2 != entries_to_show.end(); ++itor2) | 359 | for (itor2 = entries_to_show.begin(); itor2 != entries_to_show.end(); ++itor2) |
@@ -709,7 +717,7 @@ void LLItemBridge::performAction(LLFolderView* folder, LLInventoryModel* model, | |||
709 | LLInventoryItem* item = model->getItem(mUUID); | 717 | LLInventoryItem* item = model->getItem(mUUID); |
710 | if(!item) return; | 718 | if(!item) return; |
711 | LLUUID asset_id = item->getAssetUUID(); | 719 | LLUUID asset_id = item->getAssetUUID(); |
712 | char buffer[UUID_STR_LENGTH]; | 720 | char buffer[UUID_STR_LENGTH]; /*Flawfinder: ignore*/ |
713 | asset_id.toString(buffer); | 721 | asset_id.toString(buffer); |
714 | 722 | ||
715 | gViewerWindow->mWindow->copyTextToClipboard(utf8str_to_wstring(buffer)); | 723 | gViewerWindow->mWindow->copyTextToClipboard(utf8str_to_wstring(buffer)); |
@@ -828,8 +836,8 @@ LLString LLItemBridge::getLabelSuffix() const | |||
828 | const char* sxfer; | 836 | const char* sxfer; |
829 | if(xfer) sxfer = EMPTY; | 837 | if(xfer) sxfer = EMPTY; |
830 | else sxfer = NO_XFER; | 838 | else sxfer = NO_XFER; |
831 | char buffer[MAX_STRING]; | 839 | char buffer[MAX_STRING]; /*Flawfinder: ignore*/ |
832 | snprintf( | 840 | snprintf( /*Flawfinder: ignore*/ |
833 | buffer, | 841 | buffer, |
834 | MAX_STRING, | 842 | MAX_STRING, |
835 | "%s%s%s", | 843 | "%s%s%s", |
@@ -1777,6 +1785,14 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) | |||
1777 | LLInventoryModel* model = mInventoryPanel->getModel(); | 1785 | LLInventoryModel* model = mInventoryPanel->getModel(); |
1778 | if(!model) return; | 1786 | if(!model) return; |
1779 | LLUUID trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH); | 1787 | LLUUID trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH); |
1788 | LLUUID lost_and_found_id = model->findCategoryUUIDForType(LLAssetType::AT_LOST_AND_FOUND); | ||
1789 | |||
1790 | if (lost_and_found_id == mUUID) | ||
1791 | { | ||
1792 | // This is the lost+found folder. | ||
1793 | mItems.push_back("Empty Lost And Found"); | ||
1794 | } | ||
1795 | |||
1780 | if(trash_id == mUUID) | 1796 | if(trash_id == mUUID) |
1781 | { | 1797 | { |
1782 | // This is the trash. | 1798 | // This is the trash. |
@@ -2177,6 +2193,8 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, | |||
2177 | case LLAssetType::AT_CATEGORY: | 2193 | case LLAssetType::AT_CATEGORY: |
2178 | is_movable = ( LLAssetType::AT_NONE == ((LLInventoryCategory*)inv_item)->getPreferredType() ); | 2194 | is_movable = ( LLAssetType::AT_NONE == ((LLInventoryCategory*)inv_item)->getPreferredType() ); |
2179 | break; | 2195 | break; |
2196 | default: | ||
2197 | break; | ||
2180 | } | 2198 | } |
2181 | 2199 | ||
2182 | LLUUID trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH); | 2200 | LLUUID trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH); |
@@ -2193,6 +2211,8 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, | |||
2193 | case LLAssetType::AT_OBJECT: | 2211 | case LLAssetType::AT_OBJECT: |
2194 | is_movable = !avatar->isWearingAttachment(inv_item->getUUID()); | 2212 | is_movable = !avatar->isWearingAttachment(inv_item->getUUID()); |
2195 | break; | 2213 | break; |
2214 | default: | ||
2215 | break; | ||
2196 | } | 2216 | } |
2197 | } | 2217 | } |
2198 | 2218 | ||
@@ -2762,6 +2782,8 @@ BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop, | |||
2762 | } | 2782 | } |
2763 | break; | 2783 | break; |
2764 | } | 2784 | } |
2785 | default: | ||
2786 | break; | ||
2765 | } | 2787 | } |
2766 | } | 2788 | } |
2767 | return rv; | 2789 | return rv; |
@@ -3190,7 +3212,7 @@ void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attach | |||
3190 | rez_action->mItemID = item->getUUID(); | 3212 | rez_action->mItemID = item->getUUID(); |
3191 | rez_action->mAttachPt = gAgent.getAvatarObject()->mAttachmentPoints.reverseLookup(attachment); | 3213 | rez_action->mAttachPt = gAgent.getAvatarObject()->mAttachmentPoints.reverseLookup(attachment); |
3192 | 3214 | ||
3193 | if (attachment && attachment->getObject(0)) | 3215 | if (attachment && attachment->getObject()) |
3194 | { | 3216 | { |
3195 | gViewerWindow->alertXml("ReplaceAttachment", confirm_replace_attachment_rez, (void*)rez_action); | 3217 | gViewerWindow->alertXml("ReplaceAttachment", confirm_replace_attachment_rez, (void*)rez_action); |
3196 | } | 3218 | } |
@@ -3336,7 +3358,7 @@ BOOL LLObjectBridge::renameItem(const LLString& new_name) | |||
3336 | { | 3358 | { |
3337 | gSelectMgr->deselectAll(); | 3359 | gSelectMgr->deselectAll(); |
3338 | gSelectMgr->addAsIndividual( obj, SELECT_ALL_TES, FALSE ); | 3360 | gSelectMgr->addAsIndividual( obj, SELECT_ALL_TES, FALSE ); |
3339 | gSelectMgr->setObjectName( new_name ); | 3361 | gSelectMgr->selectionSetObjectName( new_name ); |
3340 | gSelectMgr->deselectAll(); | 3362 | gSelectMgr->deselectAll(); |
3341 | } | 3363 | } |
3342 | } | 3364 | } |
@@ -3410,8 +3432,8 @@ struct LLFoundData | |||
3410 | LLAssetType::EType asset_type) : | 3432 | LLAssetType::EType asset_type) : |
3411 | mItemID(item_id), | 3433 | mItemID(item_id), |
3412 | mAssetID(asset_id), | 3434 | mAssetID(asset_id), |
3413 | mAssetType(asset_type), | ||
3414 | mName(name), | 3435 | mName(name), |
3436 | mAssetType(asset_type), | ||
3415 | mWearable( NULL ) {} | 3437 | mWearable( NULL ) {} |
3416 | 3438 | ||
3417 | LLUUID mItemID; | 3439 | LLUUID mItemID; |