aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llinventorybridge.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-09-06 18:24:57 -0500
committerJacek Antonelli2008-09-06 18:25:07 -0500
commit798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch)
tree1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/newview/llinventorybridge.cpp
parentSecond Life viewer sources 1.20.15 (diff)
downloadmeta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz
Second Life viewer sources 1.21.0-RC
Diffstat (limited to 'linden/indra/newview/llinventorybridge.cpp')
-rw-r--r--linden/indra/newview/llinventorybridge.cpp375
1 files changed, 191 insertions, 184 deletions
diff --git a/linden/indra/newview/llinventorybridge.cpp b/linden/indra/newview/llinventorybridge.cpp
index a909262..12670e2 100644
--- a/linden/indra/newview/llinventorybridge.cpp
+++ b/linden/indra/newview/llinventorybridge.cpp
@@ -112,7 +112,7 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, void* userdata);
112void move_task_inventory_callback(S32 option, void* user_data); 112void move_task_inventory_callback(S32 option, void* user_data);
113void confirm_replace_attachment_rez(S32 option, void* user_data); 113void confirm_replace_attachment_rez(S32 option, void* user_data);
114 114
115const char* ICON_NAME[ICON_NAME_COUNT] = 115std::string ICON_NAME[ICON_NAME_COUNT] =
116{ 116{
117 "inv_item_texture.tga", 117 "inv_item_texture.tga",
118 "inv_item_sound.tga", 118 "inv_item_sound.tga",
@@ -158,17 +158,17 @@ BOOL gAddToOutfit = FALSE;
158// | LLInvFVBridge | 158// | LLInvFVBridge |
159// +=================================================+ 159// +=================================================+
160 160
161const LLString& LLInvFVBridge::getName() const 161const std::string& LLInvFVBridge::getName() const
162{ 162{
163 LLInventoryObject* obj = getInventoryObject(); 163 LLInventoryObject* obj = getInventoryObject();
164 if(obj) 164 if(obj)
165 { 165 {
166 return obj->getName(); 166 return obj->getName();
167 } 167 }
168 return LLString::null; 168 return LLStringUtil::null;
169} 169}
170 170
171const LLString& LLInvFVBridge::getDisplayName() const 171const std::string& LLInvFVBridge::getDisplayName() const
172{ 172{
173 return getName(); 173 return getName();
174} 174}
@@ -181,7 +181,7 @@ PermissionMask LLInvFVBridge::getPermissionMask() const
181} 181}
182 182
183// Folders don't have creation dates. 183// Folders don't have creation dates.
184U32 LLInvFVBridge::getCreationDate() const 184time_t LLInvFVBridge::getCreationDate() const
185{ 185{
186 return 0; 186 return 0;
187} 187}
@@ -378,15 +378,15 @@ BOOL LLInvFVBridge::isClipboardPasteable() const
378} 378}
379 379
380void hideContextEntries(LLMenuGL& menu, 380void hideContextEntries(LLMenuGL& menu,
381 const std::vector<LLString> &entries_to_show, 381 const std::vector<std::string> &entries_to_show,
382 const std::vector<LLString> &disabled_entries) 382 const std::vector<std::string> &disabled_entries)
383{ 383{
384 const LLView::child_list_t *list = menu.getChildList(); 384 const LLView::child_list_t *list = menu.getChildList();
385 385
386 LLView::child_list_t::const_iterator itor; 386 LLView::child_list_t::const_iterator itor;
387 for (itor = list->begin(); itor != list->end(); ++itor) 387 for (itor = list->begin(); itor != list->end(); ++itor)
388 { 388 {
389 LLString name = (*itor)->getName(); 389 std::string name = (*itor)->getName();
390 390
391 // descend into split menus: 391 // descend into split menus:
392 LLMenuItemBranchGL* branchp = dynamic_cast<LLMenuItemBranchGL*>(*itor); 392 LLMenuItemBranchGL* branchp = dynamic_cast<LLMenuItemBranchGL*>(*itor);
@@ -397,7 +397,7 @@ void hideContextEntries(LLMenuGL& menu,
397 397
398 398
399 bool found = false; 399 bool found = false;
400 std::vector<LLString>::const_iterator itor2; 400 std::vector<std::string>::const_iterator itor2;
401 for (itor2 = entries_to_show.begin(); itor2 != entries_to_show.end(); ++itor2) 401 for (itor2 = entries_to_show.begin(); itor2 != entries_to_show.end(); ++itor2)
402 { 402 {
403 if (*itor2 == name) 403 if (*itor2 == name)
@@ -423,66 +423,68 @@ void hideContextEntries(LLMenuGL& menu,
423} 423}
424 424
425// Helper for commonly-used entries 425// Helper for commonly-used entries
426void LLInvFVBridge::getClipboardEntries(bool show_asset_id, std::vector<LLString> &items, 426void LLInvFVBridge::getClipboardEntries(bool show_asset_id, std::vector<std::string> &items,
427 std::vector<LLString> &disabled_items, U32 flags) 427 std::vector<std::string> &disabled_items, U32 flags)
428{ 428{
429 items.push_back("Rename"); 429 // *TODO: Translate
430 items.push_back(std::string("Rename"));
430 if (!isItemRenameable() || (flags & FIRST_SELECTED_ITEM) == 0) 431 if (!isItemRenameable() || (flags & FIRST_SELECTED_ITEM) == 0)
431 { 432 {
432 disabled_items.push_back("Rename"); 433 disabled_items.push_back(std::string("Rename"));
433 } 434 }
434 435
435 if (show_asset_id) 436 if (show_asset_id)
436 { 437 {
437 items.push_back("Copy Asset UUID"); 438 items.push_back(std::string("Copy Asset UUID"));
438 if ( (! ( isItemPermissive() || gAgent.isGodlike() ) ) 439 if ( (! ( isItemPermissive() || gAgent.isGodlike() ) )
439 || (flags & FIRST_SELECTED_ITEM) == 0) 440 || (flags & FIRST_SELECTED_ITEM) == 0)
440 { 441 {
441 disabled_items.push_back("Copy Asset UUID"); 442 disabled_items.push_back(std::string("Copy Asset UUID"));
442 } 443 }
443 } 444 }
444 445
445 items.push_back("Copy Separator"); 446 items.push_back(std::string("Copy Separator"));
446 447
447 items.push_back("Copy"); 448 items.push_back(std::string("Copy"));
448 if (!isItemCopyable()) 449 if (!isItemCopyable())
449 { 450 {
450 disabled_items.push_back("Copy"); 451 disabled_items.push_back(std::string("Copy"));
451 } 452 }
452 453
453 items.push_back("Paste"); 454 items.push_back(std::string("Paste"));
454 if (!isClipboardPasteable() || (flags & FIRST_SELECTED_ITEM) == 0) 455 if (!isClipboardPasteable() || (flags & FIRST_SELECTED_ITEM) == 0)
455 { 456 {
456 disabled_items.push_back("Paste"); 457 disabled_items.push_back(std::string("Paste"));
457 } 458 }
458 459
459 items.push_back("Paste Separator"); 460 items.push_back(std::string("Paste Separator"));
460 461
461 items.push_back("Delete"); 462 items.push_back(std::string("Delete"));
462 if (!isItemRemovable()) 463 if (!isItemRemovable())
463 { 464 {
464 disabled_items.push_back("Delete"); 465 disabled_items.push_back(std::string("Delete"));
465 } 466 }
466} 467}
467 468
468void LLInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags) 469void LLInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
469{ 470{
471 // *TODO: Translate
470 lldebugs << "LLInvFVBridge::buildContextMenu()" << llendl; 472 lldebugs << "LLInvFVBridge::buildContextMenu()" << llendl;
471 std::vector<LLString> items; 473 std::vector<std::string> items;
472 std::vector<LLString> disabled_items; 474 std::vector<std::string> disabled_items;
473 if(isInTrash()) 475 if(isInTrash())
474 { 476 {
475 items.push_back("Purge Item"); 477 items.push_back(std::string("Purge Item"));
476 if (!isItemRemovable()) 478 if (!isItemRemovable())
477 { 479 {
478 disabled_items.push_back("Purge Item"); 480 disabled_items.push_back(std::string("Purge Item"));
479 } 481 }
480 items.push_back("Restore Item"); 482 items.push_back(std::string("Restore Item"));
481 } 483 }
482 else 484 else
483 { 485 {
484 items.push_back("Open"); 486 items.push_back(std::string("Open"));
485 items.push_back("Properties"); 487 items.push_back(std::string("Properties"));
486 488
487 getClipboardEntries(true, items, disabled_items, flags); 489 getClipboardEntries(true, items, disabled_items, flags);
488 } 490 }
@@ -729,7 +731,7 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type,
729// | LLItemBridge | 731// | LLItemBridge |
730// +=================================================+ 732// +=================================================+
731 733
732void LLItemBridge::performAction(LLFolderView* folder, LLInventoryModel* model, LLString action) 734void LLItemBridge::performAction(LLFolderView* folder, LLInventoryModel* model, std::string action)
733{ 735{
734 if ("open" == action) 736 if ("open" == action)
735 { 737 {
@@ -763,7 +765,7 @@ void LLItemBridge::performAction(LLFolderView* folder, LLInventoryModel* model,
763 LLInventoryItem* item = model->getItem(mUUID); 765 LLInventoryItem* item = model->getItem(mUUID);
764 if(!item) return; 766 if(!item) return;
765 LLUUID asset_id = item->getAssetUUID(); 767 LLUUID asset_id = item->getAssetUUID();
766 char buffer[UUID_STR_LENGTH]; /*Flawfinder: ignore*/ 768 std::string buffer;
767 asset_id.toString(buffer); 769 asset_id.toString(buffer);
768 770
769 gViewerWindow->mWindow->copyTextToClipboard(utf8str_to_wstring(buffer)); 771 gViewerWindow->mWindow->copyTextToClipboard(utf8str_to_wstring(buffer));
@@ -833,7 +835,7 @@ PermissionMask LLItemBridge::getPermissionMask() const
833 return perm_mask; 835 return perm_mask;
834} 836}
835 837
836const LLString& LLItemBridge::getDisplayName() const 838const std::string& LLItemBridge::getDisplayName() const
837{ 839{
838 if(mDisplayName.empty()) 840 if(mDisplayName.empty())
839 { 841 {
@@ -842,7 +844,7 @@ const LLString& LLItemBridge::getDisplayName() const
842 return mDisplayName; 844 return mDisplayName;
843} 845}
844 846
845void LLItemBridge::buildDisplayName(LLInventoryItem* item, LLString& name) 847void LLItemBridge::buildDisplayName(LLInventoryItem* item, std::string& name)
846{ 848{
847 if(item) 849 if(item)
848 { 850 {
@@ -850,13 +852,13 @@ void LLItemBridge::buildDisplayName(LLInventoryItem* item, LLString& name)
850 } 852 }
851 else 853 else
852 { 854 {
853 name.assign(LLString::null); 855 name.assign(LLStringUtil::null);
854 } 856 }
855} 857}
856 858
857LLString LLItemBridge::getLabelSuffix() const 859std::string LLItemBridge::getLabelSuffix() const
858{ 860{
859 LLString suffix; 861 std::string suffix;
860 LLInventoryItem* item = getItem(); 862 LLInventoryItem* item = getItem();
861 if(item) 863 if(item)
862 { 864 {
@@ -868,6 +870,7 @@ LLString LLItemBridge::getLabelSuffix() const
868 BOOL mod = item->getPermissions().allowModifyBy(gAgent.getID()); 870 BOOL mod = item->getPermissions().allowModifyBy(gAgent.getID());
869 BOOL xfer = item->getPermissions().allowOperationBy(PERM_TRANSFER, 871 BOOL xfer = item->getPermissions().allowOperationBy(PERM_TRANSFER,
870 gAgent.getID()); 872 gAgent.getID());
873 // *TODO: Translate
871 const char* EMPTY = ""; 874 const char* EMPTY = "";
872 const char* NO_COPY = " (no copy)"; 875 const char* NO_COPY = " (no copy)";
873 const char* NO_MOD = " (no modify)"; 876 const char* NO_MOD = " (no modify)";
@@ -881,21 +884,13 @@ LLString LLItemBridge::getLabelSuffix() const
881 const char* sxfer; 884 const char* sxfer;
882 if(xfer) sxfer = EMPTY; 885 if(xfer) sxfer = EMPTY;
883 else sxfer = NO_XFER; 886 else sxfer = NO_XFER;
884 char buffer[MAX_STRING]; /*Flawfinder: ignore*/ 887 suffix = llformat("%s%s%s",scopy,smod,sxfer);
885 snprintf( /* Flawfinder: ignore */
886 buffer,
887 MAX_STRING,
888 "%s%s%s",
889 scopy,
890 smod,
891 sxfer);
892 suffix.assign(buffer);
893 } 888 }
894 } 889 }
895 return suffix; 890 return suffix;
896} 891}
897 892
898U32 LLItemBridge::getCreationDate() const 893time_t LLItemBridge::getCreationDate() const
899{ 894{
900 LLViewerInventoryItem* item = getItem(); 895 LLViewerInventoryItem* item = getItem();
901 if (item) 896 if (item)
@@ -916,7 +911,7 @@ BOOL LLItemBridge::isItemRenameable() const
916 return FALSE; 911 return FALSE;
917} 912}
918 913
919BOOL LLItemBridge::renameItem(const LLString& new_name) 914BOOL LLItemBridge::renameItem(const std::string& new_name)
920{ 915{
921 if(!isItemRenameable()) return FALSE; 916 if(!isItemRenameable()) return FALSE;
922 LLPreview::rename(mUUID, getPrefix() + new_name); 917 LLPreview::rename(mUUID, getPrefix() + new_name);
@@ -1370,7 +1365,9 @@ bool LLFindWearables::operator()(LLInventoryCategory* cat,
1370class LLRightClickInventoryFetchObserver : public LLInventoryFetchObserver 1365class LLRightClickInventoryFetchObserver : public LLInventoryFetchObserver
1371{ 1366{
1372public: 1367public:
1373 LLRightClickInventoryFetchObserver() {}; 1368 LLRightClickInventoryFetchObserver() :
1369 mCopyItems(false)
1370 { };
1374 LLRightClickInventoryFetchObserver(const LLUUID& cat_id, bool copy_items) : 1371 LLRightClickInventoryFetchObserver(const LLUUID& cat_id, bool copy_items) :
1375 mCatID(cat_id), 1372 mCatID(cat_id),
1376 mCopyItems(copy_items) 1373 mCopyItems(copy_items)
@@ -1542,7 +1539,7 @@ void LLInventoryCopyAndWearObserver::changed(U32 mask)
1542 1539
1543 1540
1544 1541
1545void LLFolderBridge::performAction(LLFolderView* folder, LLInventoryModel* model, LLString action) 1542void LLFolderBridge::performAction(LLFolderView* folder, LLInventoryModel* model, std::string action)
1546{ 1543{
1547 if ("open" == action) 1544 if ("open" == action)
1548 { 1545 {
@@ -1691,7 +1688,7 @@ LLUIImagePtr LLFolderBridge::getIcon() const
1691 return LLUI::getUIImage(control); 1688 return LLUI::getUIImage(control);
1692} 1689}
1693 1690
1694BOOL LLFolderBridge::renameItem(const LLString& new_name) 1691BOOL LLFolderBridge::renameItem(const std::string& new_name)
1695{ 1692{
1696 if(!isItemRenameable()) return FALSE; 1693 if(!isItemRenameable()) return FALSE;
1697 LLInventoryModel* model = mInventoryPanel->getModel(); 1694 LLInventoryModel* model = mInventoryPanel->getModel();
@@ -1795,8 +1792,10 @@ void LLFolderBridge::staticFolderOptionsMenu()
1795 1792
1796void LLFolderBridge::folderOptionsMenu() 1793void LLFolderBridge::folderOptionsMenu()
1797{ 1794{
1798 std::vector<LLString> disabled_items; 1795 std::vector<std::string> disabled_items;
1799 1796
1797 // *TODO: Translate
1798
1800 LLInventoryModel* model = mInventoryPanel->getModel(); 1799 LLInventoryModel* model = mInventoryPanel->getModel();
1801 if(!model) return; 1800 if(!model) return;
1802 1801
@@ -1805,9 +1804,9 @@ void LLFolderBridge::folderOptionsMenu()
1805 LLIsType is_callingcard(LLAssetType::AT_CALLINGCARD); 1804 LLIsType is_callingcard(LLAssetType::AT_CALLINGCARD);
1806 if (mCallingCards || checkFolderForContentsOfType(model, is_callingcard)) 1805 if (mCallingCards || checkFolderForContentsOfType(model, is_callingcard))
1807 { 1806 {
1808 mItems.push_back("Calling Card Separator"); 1807 mItems.push_back(std::string("Calling Card Separator"));
1809 mItems.push_back("Conference Chat Folder"); 1808 mItems.push_back(std::string("Conference Chat Folder"));
1810 mItems.push_back("IM All Contacts In Folder"); 1809 mItems.push_back(std::string("IM All Contacts In Folder"));
1811 } 1810 }
1812 1811
1813 // wearables related functionality for folders. 1812 // wearables related functionality for folders.
@@ -1821,16 +1820,16 @@ void LLFolderBridge::folderOptionsMenu()
1821 checkFolderForContentsOfType(model, is_object) || 1820 checkFolderForContentsOfType(model, is_object) ||
1822 checkFolderForContentsOfType(model, is_gesture) ) 1821 checkFolderForContentsOfType(model, is_gesture) )
1823 { 1822 {
1824 mItems.push_back("Folder Wearables Separator"); 1823 mItems.push_back(std::string("Folder Wearables Separator"));
1825 1824
1826 // Only enable add/replace outfit for non-default folders. 1825 // Only enable add/replace outfit for non-default folders.
1827 const LLInventoryCategory* category = model->getCategory(mUUID); 1826 const LLInventoryCategory* category = model->getCategory(mUUID);
1828 if (!category || (LLAssetType::AT_NONE == category->getPreferredType())) 1827 if (!category || (LLAssetType::AT_NONE == category->getPreferredType()))
1829 { 1828 {
1830 mItems.push_back("Add To Outfit"); 1829 mItems.push_back(std::string("Add To Outfit"));
1831 mItems.push_back("Replace Outfit"); 1830 mItems.push_back(std::string("Replace Outfit"));
1832 } 1831 }
1833 mItems.push_back("Take Off Items"); 1832 mItems.push_back(std::string("Take Off Items"));
1834 } 1833 }
1835 hideContextEntries(*mMenu, mItems, disabled_items); 1834 hideContextEntries(*mMenu, mItems, disabled_items);
1836} 1835}
@@ -1850,8 +1849,9 @@ BOOL LLFolderBridge::checkFolderForContentsOfType(LLInventoryModel* model, LLInv
1850// Flags unused 1849// Flags unused
1851void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) 1850void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
1852{ 1851{
1852 // *TODO: Translate
1853 lldebugs << "LLFolderBridge::buildContextMenu()" << llendl; 1853 lldebugs << "LLFolderBridge::buildContextMenu()" << llendl;
1854// std::vector<LLString> disabled_items; 1854// std::vector<std::string> disabled_items;
1855 LLInventoryModel* model = mInventoryPanel->getModel(); 1855 LLInventoryModel* model = mInventoryPanel->getModel();
1856 if(!model) return; 1856 if(!model) return;
1857 LLUUID trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH); 1857 LLUUID trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH);
@@ -1860,25 +1860,25 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
1860 if (lost_and_found_id == mUUID) 1860 if (lost_and_found_id == mUUID)
1861 { 1861 {
1862 // This is the lost+found folder. 1862 // This is the lost+found folder.
1863 mItems.push_back("Empty Lost And Found"); 1863 mItems.push_back(std::string("Empty Lost And Found"));
1864 } 1864 }
1865 1865
1866 if(trash_id == mUUID) 1866 if(trash_id == mUUID)
1867 { 1867 {
1868 // This is the trash. 1868 // This is the trash.
1869 mItems.push_back("Empty Trash"); 1869 mItems.push_back(std::string("Empty Trash"));
1870 } 1870 }
1871 else if(model->isObjectDescendentOf(mUUID, trash_id)) 1871 else if(model->isObjectDescendentOf(mUUID, trash_id))
1872 { 1872 {
1873 // This is a folder in the trash. 1873 // This is a folder in the trash.
1874 mItems.clear(); // clear any items that used to exist 1874 mItems.clear(); // clear any items that used to exist
1875 mItems.push_back("Purge Item"); 1875 mItems.push_back(std::string("Purge Item"));
1876 if (!isItemRemovable()) 1876 if (!isItemRemovable())
1877 { 1877 {
1878 mDisabledItems.push_back("Purge Item"); 1878 mDisabledItems.push_back(std::string("Purge Item"));
1879 } 1879 }
1880 1880
1881 mItems.push_back("Restore Item"); 1881 mItems.push_back(std::string("Restore Item"));
1882 } 1882 }
1883 else if(isAgentInventory()) // do not allow creating in library 1883 else if(isAgentInventory()) // do not allow creating in library
1884 { 1884 {
@@ -1907,12 +1907,12 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
1907 is_callingcard); 1907 is_callingcard);
1908 if(item_array.count() > 0) contains_calling_cards = TRUE; 1908 if(item_array.count() > 0) contains_calling_cards = TRUE;
1909*/ 1909*/
1910 mItems.push_back("New Folder"); 1910 mItems.push_back(std::string("New Folder"));
1911 mItems.push_back("New Script"); 1911 mItems.push_back(std::string("New Script"));
1912 mItems.push_back("New Note"); 1912 mItems.push_back(std::string("New Note"));
1913 mItems.push_back("New Gesture"); 1913 mItems.push_back(std::string("New Gesture"));
1914 mItems.push_back("New Clothes"); 1914 mItems.push_back(std::string("New Clothes"));
1915 mItems.push_back("New Body Parts"); 1915 mItems.push_back(std::string("New Body Parts"));
1916 1916
1917 getClipboardEntries(false, mItems, mDisabledItems, flags); 1917 getClipboardEntries(false, mItems, mDisabledItems, flags);
1918 1918
@@ -1959,8 +1959,8 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
1959 } 1959 }
1960 else 1960 else
1961 { 1961 {
1962 mItems.push_back("--no options--"); 1962 mItems.push_back(std::string("--no options--"));
1963 mDisabledItems.push_back("--no options--"); 1963 mDisabledItems.push_back(std::string("--no options--"));
1964 } 1964 }
1965 hideContextEntries(menu, mItems, mDisabledItems); 1965 hideContextEntries(menu, mItems, mDisabledItems);
1966} 1966}
@@ -2035,7 +2035,7 @@ void LLFolderBridge::createNewCategory(void* user_data)
2035 LLUUID id; 2035 LLUUID id;
2036 id = model->createNewCategory(bridge->getUUID(), 2036 id = model->createNewCategory(bridge->getUUID(),
2037 LLAssetType::AT_NONE, 2037 LLAssetType::AT_NONE,
2038 NULL); 2038 LLStringUtil::null);
2039 model->notifyObservers(); 2039 model->notifyObservers();
2040 2040
2041 // At this point, the bridge has probably been deleted, but the 2041 // At this point, the bridge has probably been deleted, but the
@@ -2238,7 +2238,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
2238 if(accept && drop) 2238 if(accept && drop)
2239 { 2239 {
2240 if (inv_item->getType() == LLAssetType::AT_GESTURE 2240 if (inv_item->getType() == LLAssetType::AT_GESTURE
2241 && gGestureManager.isGestureActive(inv_item->getUUID())) 2241 && gGestureManager.isGestureActive(inv_item->getUUID()) && move_is_into_trash)
2242 { 2242 {
2243 gGestureManager.deactivateGesture(inv_item->getUUID()); 2243 gGestureManager.deactivateGesture(inv_item->getUUID());
2244 } 2244 }
@@ -2360,7 +2360,7 @@ LLUIImagePtr LLScriptBridge::getIcon() const
2360// | LLTextureBridge | 2360// | LLTextureBridge |
2361// +=================================================+ 2361// +=================================================+
2362 2362
2363LLString LLTextureBridge::sPrefix("Texture: "); 2363std::string LLTextureBridge::sPrefix("Texture: ");
2364 2364
2365 2365
2366LLUIImagePtr LLTextureBridge::getIcon() const 2366LLUIImagePtr LLTextureBridge::getIcon() const
@@ -2369,7 +2369,7 @@ LLUIImagePtr LLTextureBridge::getIcon() const
2369} 2369}
2370 2370
2371void open_texture(const LLUUID& item_id, 2371void open_texture(const LLUUID& item_id,
2372 const LLString& title, 2372 const std::string& title,
2373 BOOL show_keep_discard, 2373 BOOL show_keep_discard,
2374 const LLUUID& source_id, 2374 const LLUUID& source_id,
2375 BOOL take_focus) 2375 BOOL take_focus)
@@ -2410,7 +2410,7 @@ void LLTextureBridge::openItem()
2410// | LLSoundBridge | 2410// | LLSoundBridge |
2411// +=================================================+ 2411// +=================================================+
2412 2412
2413LLString LLSoundBridge::sPrefix("Sound: "); 2413std::string LLSoundBridge::sPrefix("Sound: ");
2414 2414
2415 2415
2416LLUIImagePtr LLSoundBridge::getIcon() const 2416LLUIImagePtr LLSoundBridge::getIcon() const
@@ -2475,29 +2475,30 @@ void LLSoundBridge::openSoundPreview(void* which)
2475void LLSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags) 2475void LLSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
2476{ 2476{
2477 lldebugs << "LLTextureBridge::buildContextMenu()" << llendl; 2477 lldebugs << "LLTextureBridge::buildContextMenu()" << llendl;
2478 std::vector<LLString> items; 2478 std::vector<std::string> items;
2479 std::vector<LLString> disabled_items; 2479 std::vector<std::string> disabled_items;
2480 2480
2481 // *TODO: Translate
2481 if(isInTrash()) 2482 if(isInTrash())
2482 { 2483 {
2483 items.push_back("Purge Item"); 2484 items.push_back(std::string("Purge Item"));
2484 if (!isItemRemovable()) 2485 if (!isItemRemovable())
2485 { 2486 {
2486 disabled_items.push_back("Purge Item"); 2487 disabled_items.push_back(std::string("Purge Item"));
2487 } 2488 }
2488 2489
2489 items.push_back("Restore Item"); 2490 items.push_back(std::string("Restore Item"));
2490 } 2491 }
2491 else 2492 else
2492 { 2493 {
2493 items.push_back("Sound Open"); 2494 items.push_back(std::string("Sound Open"));
2494 items.push_back("Properties"); 2495 items.push_back(std::string("Properties"));
2495 2496
2496 getClipboardEntries(true, items, disabled_items, flags); 2497 getClipboardEntries(true, items, disabled_items, flags);
2497 } 2498 }
2498 2499
2499 items.push_back("Sound Separator"); 2500 items.push_back(std::string("Sound Separator"));
2500 items.push_back("Sound Play"); 2501 items.push_back(std::string("Sound Play"));
2501 2502
2502 hideContextEntries(menu, items, disabled_items); 2503 hideContextEntries(menu, items, disabled_items);
2503} 2504}
@@ -2506,7 +2507,7 @@ void LLSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
2506// | LLLandmarkBridge | 2507// | LLLandmarkBridge |
2507// +=================================================+ 2508// +=================================================+
2508 2509
2509LLString LLLandmarkBridge::sPrefix("Landmark: "); 2510std::string LLLandmarkBridge::sPrefix("Landmark: ");
2510 2511
2511LLUIImagePtr LLLandmarkBridge::getIcon() const 2512LLUIImagePtr LLLandmarkBridge::getIcon() const
2512{ 2513{
@@ -2515,37 +2516,38 @@ LLUIImagePtr LLLandmarkBridge::getIcon() const
2515 2516
2516void LLLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags) 2517void LLLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
2517{ 2518{
2518 std::vector<LLString> items; 2519 std::vector<std::string> items;
2519 std::vector<LLString> disabled_items; 2520 std::vector<std::string> disabled_items;
2520 2521
2522 // *TODO: Translate
2521 lldebugs << "LLLandmarkBridge::buildContextMenu()" << llendl; 2523 lldebugs << "LLLandmarkBridge::buildContextMenu()" << llendl;
2522 if(isInTrash()) 2524 if(isInTrash())
2523 { 2525 {
2524 items.push_back("Purge Item"); 2526 items.push_back(std::string("Purge Item"));
2525 if (!isItemRemovable()) 2527 if (!isItemRemovable())
2526 { 2528 {
2527 disabled_items.push_back("Purge Item"); 2529 disabled_items.push_back(std::string("Purge Item"));
2528 } 2530 }
2529 2531
2530 items.push_back("Restore Item"); 2532 items.push_back(std::string("Restore Item"));
2531 } 2533 }
2532 else 2534 else
2533 { 2535 {
2534 items.push_back("Landmark Open"); 2536 items.push_back(std::string("Landmark Open"));
2535 items.push_back("Properties"); 2537 items.push_back(std::string("Properties"));
2536 2538
2537 getClipboardEntries(true, items, disabled_items, flags); 2539 getClipboardEntries(true, items, disabled_items, flags);
2538 } 2540 }
2539 2541
2540 items.push_back("Landmark Separator"); 2542 items.push_back(std::string("Landmark Separator"));
2541 items.push_back("Teleport To Landmark"); 2543 items.push_back(std::string("Teleport To Landmark"));
2542 2544
2543 hideContextEntries(menu, items, disabled_items); 2545 hideContextEntries(menu, items, disabled_items);
2544 2546
2545} 2547}
2546 2548
2547// virtual 2549// virtual
2548void LLLandmarkBridge::performAction(LLFolderView* folder, LLInventoryModel* model, LLString action) 2550void LLLandmarkBridge::performAction(LLFolderView* folder, LLInventoryModel* model, std::string action)
2549{ 2551{
2550 if ("teleport" == action) 2552 if ("teleport" == action)
2551 { 2553 {
@@ -2567,14 +2569,14 @@ void LLLandmarkBridge::performAction(LLFolderView* folder, LLInventoryModel* mod
2567 LLViewerInventoryItem* item = getItem(); 2569 LLViewerInventoryItem* item = getItem();
2568 if(item) 2570 if(item)
2569 { 2571 {
2570 open_landmark(item, LLString(" ") + getPrefix() + item->getName(), FALSE); 2572 open_landmark(item, std::string(" ") + getPrefix() + item->getName(), FALSE);
2571 } 2573 }
2572 } 2574 }
2573 else LLItemBridge::performAction(folder, model, action); 2575 else LLItemBridge::performAction(folder, model, action);
2574} 2576}
2575 2577
2576void open_landmark(LLViewerInventoryItem* inv_item, 2578void open_landmark(LLViewerInventoryItem* inv_item,
2577 const LLString& title, 2579 const std::string& title,
2578 BOOL show_keep_discard, 2580 BOOL show_keep_discard,
2579 const LLUUID& source_id, 2581 const LLUUID& source_id,
2580 BOOL take_focus) 2582 BOOL take_focus)
@@ -2626,7 +2628,7 @@ void LLLandmarkBridge::openItem()
2626 { 2628 {
2627 // Opening (double-clicking) a landmark immediately teleports, 2629 // Opening (double-clicking) a landmark immediately teleports,
2628 // but warns you the first time. 2630 // but warns you the first time.
2629 // open_landmark(item, LLString(" ") + getPrefix() + item->getName(), FALSE); 2631 // open_landmark(item, std::string(" ") + getPrefix() + item->getName(), FALSE);
2630 LLUUID* asset_idp = new LLUUID(item->getAssetUUID()); 2632 LLUUID* asset_idp = new LLUUID(item->getAssetUUID());
2631 LLAlertDialog::showXml("TeleportFromLandmark", 2633 LLAlertDialog::showXml("TeleportFromLandmark",
2632 open_landmark_callback, (void*)asset_idp); 2634 open_landmark_callback, (void*)asset_idp);
@@ -2646,7 +2648,7 @@ void LLCallingCardObserver::changed(U32 mask)
2646// | LLCallingCardBridge | 2648// | LLCallingCardBridge |
2647// +=================================================+ 2649// +=================================================+
2648 2650
2649LLString LLCallingCardBridge::sPrefix("Calling Card: "); 2651std::string LLCallingCardBridge::sPrefix("Calling Card: ");
2650 2652
2651LLCallingCardBridge::LLCallingCardBridge( LLInventoryPanel* inventory, const LLUUID& uuid ) : 2653LLCallingCardBridge::LLCallingCardBridge( LLInventoryPanel* inventory, const LLUUID& uuid ) :
2652 LLItemBridge(inventory, uuid) 2654 LLItemBridge(inventory, uuid)
@@ -2671,7 +2673,7 @@ void LLCallingCardBridge::refreshFolderViewItem()
2671} 2673}
2672 2674
2673// virtual 2675// virtual
2674void LLCallingCardBridge::performAction(LLFolderView* folder, LLInventoryModel* model, LLString action) 2676void LLCallingCardBridge::performAction(LLFolderView* folder, LLInventoryModel* model, std::string action)
2675{ 2677{
2676 if ("begin_im" == action) 2678 if ("begin_im" == action)
2677 { 2679 {
@@ -2706,7 +2708,7 @@ LLUIImagePtr LLCallingCardBridge::getIcon() const
2706 return get_item_icon(LLAssetType::AT_CALLINGCARD, LLInventoryType::IT_CALLINGCARD, online, FALSE); 2708 return get_item_icon(LLAssetType::AT_CALLINGCARD, LLInventoryType::IT_CALLINGCARD, online, FALSE);
2707} 2709}
2708 2710
2709LLString LLCallingCardBridge::getLabelSuffix() const 2711std::string LLCallingCardBridge::getLabelSuffix() const
2710{ 2712{
2711 LLViewerInventoryItem* item = getItem(); 2713 LLViewerInventoryItem* item = getItem();
2712 if( item && LLAvatarTracker::instance().isBuddyOnline(item->getCreatorUUID()) ) 2714 if( item && LLAvatarTracker::instance().isBuddyOnline(item->getCreatorUUID()) )
@@ -2732,24 +2734,25 @@ void LLCallingCardBridge::openItem()
2732 2734
2733void LLCallingCardBridge::buildContextMenu(LLMenuGL& menu, U32 flags) 2735void LLCallingCardBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
2734{ 2736{
2737 // *TODO: Translate
2735 lldebugs << "LLCallingCardBridge::buildContextMenu()" << llendl; 2738 lldebugs << "LLCallingCardBridge::buildContextMenu()" << llendl;
2736 std::vector<LLString> items; 2739 std::vector<std::string> items;
2737 std::vector<LLString> disabled_items; 2740 std::vector<std::string> disabled_items;
2738 2741
2739 if(isInTrash()) 2742 if(isInTrash())
2740 { 2743 {
2741 items.push_back("Purge Item"); 2744 items.push_back(std::string("Purge Item"));
2742 if (!isItemRemovable()) 2745 if (!isItemRemovable())
2743 { 2746 {
2744 disabled_items.push_back("Purge Item"); 2747 disabled_items.push_back(std::string("Purge Item"));
2745 } 2748 }
2746 2749
2747 items.push_back("Restore Item"); 2750 items.push_back(std::string("Restore Item"));
2748 } 2751 }
2749 else 2752 else
2750 { 2753 {
2751 items.push_back("Open"); 2754 items.push_back(std::string("Open"));
2752 items.push_back("Properties"); 2755 items.push_back(std::string("Properties"));
2753 2756
2754 getClipboardEntries(true, items, disabled_items, flags); 2757 getClipboardEntries(true, items, disabled_items, flags);
2755 2758
@@ -2758,19 +2761,19 @@ void LLCallingCardBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
2758 && (LLUUID::null != item->getCreatorUUID()) 2761 && (LLUUID::null != item->getCreatorUUID())
2759 && (item->getCreatorUUID() != gAgent.getID())); 2762 && (item->getCreatorUUID() != gAgent.getID()));
2760 BOOL user_online = (LLAvatarTracker::instance().isBuddyOnline(item->getCreatorUUID())); 2763 BOOL user_online = (LLAvatarTracker::instance().isBuddyOnline(item->getCreatorUUID()));
2761 items.push_back("Send Instant Message Separator"); 2764 items.push_back(std::string("Send Instant Message Separator"));
2762 items.push_back("Send Instant Message"); 2765 items.push_back(std::string("Send Instant Message"));
2763 items.push_back("Offer Teleport..."); 2766 items.push_back(std::string("Offer Teleport..."));
2764 items.push_back("Conference Chat"); 2767 items.push_back(std::string("Conference Chat"));
2765 2768
2766 if (!good_card) 2769 if (!good_card)
2767 { 2770 {
2768 disabled_items.push_back("Send Instant Message"); 2771 disabled_items.push_back(std::string("Send Instant Message"));
2769 } 2772 }
2770 if (!good_card || !user_online) 2773 if (!good_card || !user_online)
2771 { 2774 {
2772 disabled_items.push_back("Offer Teleport..."); 2775 disabled_items.push_back(std::string("Offer Teleport..."));
2773 disabled_items.push_back("Conference Chat"); 2776 disabled_items.push_back(std::string("Conference Chat"));
2774 } 2777 }
2775 } 2778 }
2776 hideContextEntries(menu, items, disabled_items); 2779 hideContextEntries(menu, items, disabled_items);
@@ -2852,7 +2855,7 @@ BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop,
2852// | LLNotecardBridge | 2855// | LLNotecardBridge |
2853// +=================================================+ 2856// +=================================================+
2854 2857
2855LLString LLNotecardBridge::sPrefix("Note: "); 2858std::string LLNotecardBridge::sPrefix("Note: ");
2856 2859
2857 2860
2858LLUIImagePtr LLNotecardBridge::getIcon() const 2861LLUIImagePtr LLNotecardBridge::getIcon() const
@@ -2861,7 +2864,7 @@ LLUIImagePtr LLNotecardBridge::getIcon() const
2861} 2864}
2862 2865
2863void open_notecard(LLViewerInventoryItem* inv_item, 2866void open_notecard(LLViewerInventoryItem* inv_item,
2864 const LLString& title, 2867 const std::string& title,
2865 const LLUUID& object_id, 2868 const LLUUID& object_id,
2866 BOOL show_keep_discard, 2869 BOOL show_keep_discard,
2867 const LLUUID& source_id, 2870 const LLUUID& source_id,
@@ -2921,7 +2924,7 @@ void LLNotecardBridge::openItem()
2921// | LLGestureBridge | 2924// | LLGestureBridge |
2922// +=================================================+ 2925// +=================================================+
2923 2926
2924LLString LLGestureBridge::sPrefix("Gesture: "); 2927std::string LLGestureBridge::sPrefix("Gesture: ");
2925 2928
2926LLUIImagePtr LLGestureBridge::getIcon() const 2929LLUIImagePtr LLGestureBridge::getIcon() const
2927{ 2930{
@@ -2940,7 +2943,7 @@ LLFontGL::StyleFlags LLGestureBridge::getLabelStyle() const
2940 } 2943 }
2941} 2944}
2942 2945
2943LLString LLGestureBridge::getLabelSuffix() const 2946std::string LLGestureBridge::getLabelSuffix() const
2944{ 2947{
2945 if( gGestureManager.isGestureActive(mUUID) ) 2948 if( gGestureManager.isGestureActive(mUUID) )
2946 { 2949 {
@@ -2953,7 +2956,7 @@ LLString LLGestureBridge::getLabelSuffix() const
2953} 2956}
2954 2957
2955// virtual 2958// virtual
2956void LLGestureBridge::performAction(LLFolderView* folder, LLInventoryModel* model, LLString action) 2959void LLGestureBridge::performAction(LLFolderView* folder, LLInventoryModel* model, std::string action)
2957{ 2960{
2958 if ("activate" == action) 2961 if ("activate" == action)
2959 { 2962 {
@@ -2991,7 +2994,7 @@ void LLGestureBridge::openItem()
2991 if(!LLPreview::show(mUUID)) 2994 if(!LLPreview::show(mUUID))
2992 { 2995 {
2993 LLUUID item_id = mUUID; 2996 LLUUID item_id = mUUID;
2994 LLString title = getPrefix() + item->getName(); 2997 std::string title = getPrefix() + item->getName();
2995 LLUUID object_id = LLUUID::null; 2998 LLUUID object_id = LLUUID::null;
2996 2999
2997 // TODO: save the rectangle 3000 // TODO: save the rectangle
@@ -3012,29 +3015,30 @@ BOOL LLGestureBridge::removeItem()
3012 3015
3013void LLGestureBridge::buildContextMenu(LLMenuGL& menu, U32 flags) 3016void LLGestureBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
3014{ 3017{
3018 // *TODO: Translate
3015 lldebugs << "LLGestureBridge::buildContextMenu()" << llendl; 3019 lldebugs << "LLGestureBridge::buildContextMenu()" << llendl;
3016 std::vector<LLString> items; 3020 std::vector<std::string> items;
3017 std::vector<LLString> disabled_items; 3021 std::vector<std::string> disabled_items;
3018 if(isInTrash()) 3022 if(isInTrash())
3019 { 3023 {
3020 items.push_back("Purge Item"); 3024 items.push_back(std::string("Purge Item"));
3021 if (!isItemRemovable()) 3025 if (!isItemRemovable())
3022 { 3026 {
3023 disabled_items.push_back("Purge Item"); 3027 disabled_items.push_back(std::string("Purge Item"));
3024 } 3028 }
3025 3029
3026 items.push_back("Restore Item"); 3030 items.push_back(std::string("Restore Item"));
3027 } 3031 }
3028 else 3032 else
3029 { 3033 {
3030 items.push_back("Open"); 3034 items.push_back(std::string("Open"));
3031 items.push_back("Properties"); 3035 items.push_back(std::string("Properties"));
3032 3036
3033 getClipboardEntries(true, items, disabled_items, flags); 3037 getClipboardEntries(true, items, disabled_items, flags);
3034 3038
3035 items.push_back("Gesture Separator"); 3039 items.push_back(std::string("Gesture Separator"));
3036 items.push_back("Activate"); 3040 items.push_back(std::string("Activate"));
3037 items.push_back("Deactivate"); 3041 items.push_back(std::string("Deactivate"));
3038 3042
3039 /*menu.append(new LLMenuItemCallGL("Activate", 3043 /*menu.append(new LLMenuItemCallGL("Activate",
3040 handleActivateGesture, 3044 handleActivateGesture,
@@ -3052,7 +3056,7 @@ void LLGestureBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
3052// | LLAnimationBridge | 3056// | LLAnimationBridge |
3053// +=================================================+ 3057// +=================================================+
3054 3058
3055LLString LLAnimationBridge::sPrefix("Animation: "); 3059std::string LLAnimationBridge::sPrefix("Animation: ");
3056 3060
3057 3061
3058LLUIImagePtr LLAnimationBridge::getIcon() const 3062LLUIImagePtr LLAnimationBridge::getIcon() const
@@ -3062,38 +3066,39 @@ LLUIImagePtr LLAnimationBridge::getIcon() const
3062 3066
3063void LLAnimationBridge::buildContextMenu(LLMenuGL& menu, U32 flags) 3067void LLAnimationBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
3064{ 3068{
3065 std::vector<LLString> items; 3069 // *TODO: Translate
3066 std::vector<LLString> disabled_items; 3070 std::vector<std::string> items;
3071 std::vector<std::string> disabled_items;
3067 3072
3068 lldebugs << "LLAnimationBridge::buildContextMenu()" << llendl; 3073 lldebugs << "LLAnimationBridge::buildContextMenu()" << llendl;
3069 if(isInTrash()) 3074 if(isInTrash())
3070 { 3075 {
3071 items.push_back("Purge Item"); 3076 items.push_back(std::string("Purge Item"));
3072 if (!isItemRemovable()) 3077 if (!isItemRemovable())
3073 { 3078 {
3074 disabled_items.push_back("Purge Item"); 3079 disabled_items.push_back(std::string("Purge Item"));
3075 } 3080 }
3076 3081
3077 items.push_back("Restore Item"); 3082 items.push_back(std::string("Restore Item"));
3078 } 3083 }
3079 else 3084 else
3080 { 3085 {
3081 items.push_back("Animation Open"); 3086 items.push_back(std::string("Animation Open"));
3082 items.push_back("Properties"); 3087 items.push_back(std::string("Properties"));
3083 3088
3084 getClipboardEntries(true, items, disabled_items, flags); 3089 getClipboardEntries(true, items, disabled_items, flags);
3085 } 3090 }
3086 3091
3087 items.push_back("Animation Separator"); 3092 items.push_back(std::string("Animation Separator"));
3088 items.push_back("Animation Play"); 3093 items.push_back(std::string("Animation Play"));
3089 items.push_back("Animation Audition"); 3094 items.push_back(std::string("Animation Audition"));
3090 3095
3091 hideContextEntries(menu, items, disabled_items); 3096 hideContextEntries(menu, items, disabled_items);
3092 3097
3093} 3098}
3094 3099
3095// virtual 3100// virtual
3096void LLAnimationBridge::performAction(LLFolderView* folder, LLInventoryModel* model, LLString action) 3101void LLAnimationBridge::performAction(LLFolderView* folder, LLInventoryModel* model, std::string action)
3097{ 3102{
3098 S32 activate = 0; 3103 S32 activate = 0;
3099 3104
@@ -3160,7 +3165,7 @@ void LLAnimationBridge::openItem()
3160// +=================================================+ 3165// +=================================================+
3161 3166
3162// static 3167// static
3163LLString LLObjectBridge::sPrefix("Object: "); 3168std::string LLObjectBridge::sPrefix("Object: ");
3164 3169
3165// static 3170// static
3166LLUUID LLObjectBridge::sContextMenuItemID; 3171LLUUID LLObjectBridge::sContextMenuItemID;
@@ -3181,7 +3186,7 @@ LLUIImagePtr LLObjectBridge::getIcon() const
3181void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attachment); 3186void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attachment);
3182 3187
3183// virtual 3188// virtual
3184void LLObjectBridge::performAction(LLFolderView* folder, LLInventoryModel* model, LLString action) 3189void LLObjectBridge::performAction(LLFolderView* folder, LLInventoryModel* model, std::string action)
3185{ 3190{
3186 if ("attach" == action) 3191 if ("attach" == action)
3187 { 3192 {
@@ -3254,14 +3259,14 @@ LLFontGL::StyleFlags LLObjectBridge::getLabelStyle() const
3254 } 3259 }
3255} 3260}
3256 3261
3257LLString LLObjectBridge::getLabelSuffix() const 3262std::string LLObjectBridge::getLabelSuffix() const
3258{ 3263{
3259 LLVOAvatar* avatar = gAgent.getAvatarObject(); 3264 LLVOAvatar* avatar = gAgent.getAvatarObject();
3260 if( avatar && avatar->isWearingAttachment( mUUID ) ) 3265 if( avatar && avatar->isWearingAttachment( mUUID ) )
3261 { 3266 {
3262 LLString attachment_point_name = avatar->getAttachedPointName(mUUID); 3267 std::string attachment_point_name = avatar->getAttachedPointName(mUUID);
3263 LLString::toLower(attachment_point_name); 3268 LLStringUtil::toLower(attachment_point_name);
3264 return LLItemBridge::getLabelSuffix() + LLString(" (worn on ") + attachment_point_name + LLString(")"); 3269 return LLItemBridge::getLabelSuffix() + std::string(" (worn on ") + attachment_point_name + std::string(")");
3265 } 3270 }
3266 else 3271 else
3267 { 3272 {
@@ -3329,21 +3334,22 @@ void confirm_replace_attachment_rez(S32 option, void* user_data)
3329 3334
3330void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) 3335void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
3331{ 3336{
3332 std::vector<LLString> items; 3337 // *TODO: Translate
3333 std::vector<LLString> disabled_items; 3338 std::vector<std::string> items;
3339 std::vector<std::string> disabled_items;
3334 if(isInTrash()) 3340 if(isInTrash())
3335 { 3341 {
3336 items.push_back("Purge Item"); 3342 items.push_back(std::string("Purge Item"));
3337 if (!isItemRemovable()) 3343 if (!isItemRemovable())
3338 { 3344 {
3339 disabled_items.push_back("Purge Item"); 3345 disabled_items.push_back(std::string("Purge Item"));
3340 } 3346 }
3341 3347
3342 items.push_back("Restore Item"); 3348 items.push_back(std::string("Restore Item"));
3343 } 3349 }
3344 else 3350 else
3345 { 3351 {
3346 items.push_back("Properties"); 3352 items.push_back(std::string("Properties"));
3347 3353
3348 getClipboardEntries(true, items, disabled_items, flags); 3354 getClipboardEntries(true, items, disabled_items, flags);
3349 3355
@@ -3360,15 +3366,15 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
3360 3366
3361 if( avatarp->isWearingAttachment( mUUID ) ) 3367 if( avatarp->isWearingAttachment( mUUID ) )
3362 { 3368 {
3363 items.push_back("Detach From Yourself"); 3369 items.push_back(std::string("Detach From Yourself"));
3364 } 3370 }
3365 else 3371 else
3366 if( !isInTrash() ) 3372 if( !isInTrash() )
3367 { 3373 {
3368 items.push_back("Attach Separator"); 3374 items.push_back(std::string("Attach Separator"));
3369 items.push_back("Object Wear"); 3375 items.push_back(std::string("Object Wear"));
3370 items.push_back("Attach To"); 3376 items.push_back(std::string("Attach To"));
3371 items.push_back("Attach To HUD"); 3377 items.push_back(std::string("Attach To HUD"));
3372 3378
3373 LLMenuGL* attach_menu = menu.getChildMenuByName("Attach To", TRUE); 3379 LLMenuGL* attach_menu = menu.getChildMenuByName("Attach To", TRUE);
3374 LLMenuGL* attach_hud_menu = menu.getChildMenuByName("Attach To HUD", TRUE); 3380 LLMenuGL* attach_hud_menu = menu.getChildMenuByName("Attach To HUD", TRUE);
@@ -3410,7 +3416,7 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
3410 hideContextEntries(menu, items, disabled_items); 3416 hideContextEntries(menu, items, disabled_items);
3411} 3417}
3412 3418
3413BOOL LLObjectBridge::renameItem(const LLString& new_name) 3419BOOL LLObjectBridge::renameItem(const std::string& new_name)
3414{ 3420{
3415 if(!isItemRenameable()) return FALSE; 3421 if(!isItemRenameable()) return FALSE;
3416 LLPreview::rename(mUUID, getPrefix() + new_name); 3422 LLPreview::rename(mUUID, getPrefix() + new_name);
@@ -3448,7 +3454,7 @@ BOOL LLObjectBridge::renameItem(const LLString& new_name)
3448// | LLLSLTextBridge | 3454// | LLLSLTextBridge |
3449// +=================================================+ 3455// +=================================================+
3450 3456
3451LLString LLLSLTextBridge::sPrefix("Script: "); 3457std::string LLLSLTextBridge::sPrefix("Script: ");
3452 3458
3453LLUIImagePtr LLLSLTextBridge::getIcon() const 3459LLUIImagePtr LLLSLTextBridge::getIcon() const
3454{ 3460{
@@ -3504,7 +3510,7 @@ struct LLFoundData
3504{ 3510{
3505 LLFoundData(const LLUUID& item_id, 3511 LLFoundData(const LLUUID& item_id,
3506 const LLUUID& asset_id, 3512 const LLUUID& asset_id,
3507 const LLString& name, 3513 const std::string& name,
3508 LLAssetType::EType asset_type) : 3514 LLAssetType::EType asset_type) :
3509 mItemID(item_id), 3515 mItemID(item_id),
3510 mAssetID(asset_id), 3516 mAssetID(asset_id),
@@ -3514,7 +3520,7 @@ struct LLFoundData
3514 3520
3515 LLUUID mItemID; 3521 LLUUID mItemID;
3516 LLUUID mAssetID; 3522 LLUUID mAssetID;
3517 LLString mName; 3523 std::string mName;
3518 LLAssetType::EType mAssetType; 3524 LLAssetType::EType mAssetType;
3519 LLWearable* mWearable; 3525 LLWearable* mWearable;
3520}; 3526};
@@ -3597,7 +3603,7 @@ void LLOutfitObserver::done()
3597 if(mCopyItems) 3603 if(mCopyItems)
3598 { 3604 {
3599 LLInventoryCategory* cat = gInventory.getCategory(mCatID); 3605 LLInventoryCategory* cat = gInventory.getCategory(mCatID);
3600 LLString name; 3606 std::string name;
3601 if(!cat) 3607 if(!cat)
3602 { 3608 {
3603 // should never happen. 3609 // should never happen.
@@ -3728,7 +3734,7 @@ void LLOutfitFetch::done()
3728 } 3734 }
3729} 3735}
3730 3736
3731void wear_outfit_by_name(const char* name) 3737void wear_outfit_by_name(const std::string& name)
3732{ 3738{
3733 llinfos << "Wearing category " << name << llendl; 3739 llinfos << "Wearing category " << name << llendl;
3734 inc_busy_count(); 3740 inc_busy_count();
@@ -4203,7 +4209,7 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, void* userdata)
4203 category_id = NULL; 4209 category_id = NULL;
4204} 4210}
4205 4211
4206BOOL LLWearableBridge::renameItem(const LLString& new_name) 4212BOOL LLWearableBridge::renameItem(const std::string& new_name)
4207{ 4213{
4208 if( gAgent.isWearingItem( mUUID ) ) 4214 if( gAgent.isWearingItem( mUUID ) )
4209 { 4215 {
@@ -4231,7 +4237,7 @@ LLFontGL::StyleFlags LLWearableBridge::getLabelStyle() const
4231 } 4237 }
4232} 4238}
4233 4239
4234LLString LLWearableBridge::getLabelSuffix() const 4240std::string LLWearableBridge::getLabelSuffix() const
4235{ 4241{
4236 if( gAgent.isWearingItem( mUUID ) ) 4242 if( gAgent.isWearingItem( mUUID ) )
4237 { 4243 {
@@ -4249,7 +4255,7 @@ LLUIImagePtr LLWearableBridge::getIcon() const
4249} 4255}
4250 4256
4251// virtual 4257// virtual
4252void LLWearableBridge::performAction(LLFolderView* folder, LLInventoryModel* model, LLString action) 4258void LLWearableBridge::performAction(LLFolderView* folder, LLInventoryModel* model, std::string action)
4253{ 4259{
4254 if ("wear" == action) 4260 if ("wear" == action)
4255 { 4261 {
@@ -4318,18 +4324,19 @@ void LLWearableBridge::openItem()
4318 4324
4319void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) 4325void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
4320{ 4326{
4327 // *TODO: Translate
4321 lldebugs << "LLWearableBridge::buildContextMenu()" << llendl; 4328 lldebugs << "LLWearableBridge::buildContextMenu()" << llendl;
4322 std::vector<LLString> items; 4329 std::vector<std::string> items;
4323 std::vector<LLString> disabled_items; 4330 std::vector<std::string> disabled_items;
4324 if(isInTrash()) 4331 if(isInTrash())
4325 { 4332 {
4326 items.push_back("Purge Item"); 4333 items.push_back(std::string("Purge Item"));
4327 if (!isItemRemovable()) 4334 if (!isItemRemovable())
4328 { 4335 {
4329 disabled_items.push_back("Purge Item"); 4336 disabled_items.push_back(std::string("Purge Item"));
4330 } 4337 }
4331 4338
4332 items.push_back("Restore Item"); 4339 items.push_back(std::string("Restore Item"));
4333 } 4340 }
4334 else 4341 else
4335 { // FWIW, it looks like SUPPRESS_OPEN_ITEM is not set anywhere 4342 { // FWIW, it looks like SUPPRESS_OPEN_ITEM is not set anywhere
@@ -4344,22 +4351,22 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
4344 } 4351 }
4345 if (!no_open) 4352 if (!no_open)
4346 { 4353 {
4347 items.push_back("Open"); 4354 items.push_back(std::string("Open"));
4348 } 4355 }
4349 4356
4350 items.push_back("Properties"); 4357 items.push_back(std::string("Properties"));
4351 4358
4352 getClipboardEntries(true, items, disabled_items, flags); 4359 getClipboardEntries(true, items, disabled_items, flags);
4353 4360
4354 items.push_back("Wearable Separator"); 4361 items.push_back(std::string("Wearable Separator"));
4355 4362
4356 items.push_back("Wearable Wear"); 4363 items.push_back(std::string("Wearable Wear"));
4357 items.push_back("Wearable Edit"); 4364 items.push_back(std::string("Wearable Edit"));
4358 4365
4359 4366
4360 if ((flags & FIRST_SELECTED_ITEM) == 0) 4367 if ((flags & FIRST_SELECTED_ITEM) == 0)
4361 { 4368 {
4362 disabled_items.push_back("Wearable Edit"); 4369 disabled_items.push_back(std::string("Wearable Edit"));
4363 } 4370 }
4364 //menu.appendSeparator(); 4371 //menu.appendSeparator();
4365 //menu.append(new LLMenuItemCallGL("Wear", 4372 //menu.append(new LLMenuItemCallGL("Wear",
@@ -4373,7 +4380,7 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
4373 4380
4374 if( item && (item->getType() == LLAssetType::AT_CLOTHING) ) 4381 if( item && (item->getType() == LLAssetType::AT_CLOTHING) )
4375 { 4382 {
4376 items.push_back("Take Off"); 4383 items.push_back(std::string("Take Off"));
4377 /*menu.append(new LLMenuItemCallGL("Take Off", 4384 /*menu.append(new LLMenuItemCallGL("Take Off",
4378 LLWearableBridge::onRemoveFromAvatar, 4385 LLWearableBridge::onRemoveFromAvatar,
4379 LLWearableBridge::canRemoveFromAvatar, 4386 LLWearableBridge::canRemoveFromAvatar,