aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llinventoryview.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/llinventoryview.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 '')
-rw-r--r--linden/indra/newview/llinventoryview.cpp162
1 files changed, 80 insertions, 82 deletions
diff --git a/linden/indra/newview/llinventoryview.cpp b/linden/indra/newview/llinventoryview.cpp
index d21a3af..2150b70 100644
--- a/linden/indra/newview/llinventoryview.cpp
+++ b/linden/indra/newview/llinventoryview.cpp
@@ -105,10 +105,10 @@ const S32 INV_FINDER_HEIGHT = 408;
105/// LLInventoryViewFinder 105/// LLInventoryViewFinder
106///---------------------------------------------------------------------------- 106///----------------------------------------------------------------------------
107 107
108LLInventoryViewFinder::LLInventoryViewFinder(const LLString& name, 108LLInventoryViewFinder::LLInventoryViewFinder(const std::string& name,
109 const LLRect& rect, 109 const LLRect& rect,
110 LLInventoryView* inventory_view) : 110 LLInventoryView* inventory_view) :
111 LLFloater(name, rect, "Filters", RESIZE_NO, 111 LLFloater(name, rect, std::string("Filters"), RESIZE_NO,
112 INV_FINDER_WIDTH, INV_FINDER_HEIGHT, DRAG_ON_TOP, 112 INV_FINDER_WIDTH, INV_FINDER_HEIGHT, DRAG_ON_TOP,
113 MINIMIZE_NO, CLOSE_YES), 113 MINIMIZE_NO, CLOSE_YES),
114 mInventoryView(inventory_view), 114 mInventoryView(inventory_view),
@@ -175,7 +175,7 @@ void LLInventoryViewFinder::updateElementsFromFilter()
175 175
176 // Get data needed for filter display 176 // Get data needed for filter display
177 U32 filter_types = mFilter->getFilterTypes(); 177 U32 filter_types = mFilter->getFilterTypes();
178 LLString filter_string = mFilter->getFilterSubString(); 178 std::string filter_string = mFilter->getFilterSubString();
179 LLInventoryFilter::EFolderShow show_folders = mFilter->getShowFolderState(); 179 LLInventoryFilter::EFolderShow show_folders = mFilter->getShowFolderState();
180 U32 hours = mFilter->getHoursAgo(); 180 U32 hours = mFilter->getHoursAgo();
181 181
@@ -449,10 +449,10 @@ void LLSaveFolderState::doFolder(LLFolderViewFolder* folder)
449} 449}
450 450
451// Default constructor 451// Default constructor
452LLInventoryView::LLInventoryView(const LLString& name, 452LLInventoryView::LLInventoryView(const std::string& name,
453 const LLString& rect, 453 const std::string& rect,
454 LLInventoryModel* inventory) : 454 LLInventoryModel* inventory) :
455 LLFloater(name, rect, "Inventory", RESIZE_YES, 455 LLFloater(name, rect, std::string("Inventory"), RESIZE_YES,
456 INV_MIN_WIDTH, INV_MIN_HEIGHT, DRAG_ON_TOP, 456 INV_MIN_WIDTH, INV_MIN_HEIGHT, DRAG_ON_TOP,
457 MINIMIZE_NO, CLOSE_YES) 457 MINIMIZE_NO, CLOSE_YES)
458 //LLHandle<LLFloater> mFinderHandle takes care of its own initialization 458 //LLHandle<LLFloater> mFinderHandle takes care of its own initialization
@@ -460,10 +460,10 @@ LLInventoryView::LLInventoryView(const LLString& name,
460 init(inventory); 460 init(inventory);
461} 461}
462 462
463LLInventoryView::LLInventoryView(const LLString& name, 463LLInventoryView::LLInventoryView(const std::string& name,
464 const LLRect& rect, 464 const LLRect& rect,
465 LLInventoryModel* inventory) : 465 LLInventoryModel* inventory) :
466 LLFloater(name, rect, "Inventory", RESIZE_YES, 466 LLFloater(name, rect, std::string("Inventory"), RESIZE_YES,
467 INV_MIN_WIDTH, INV_MIN_HEIGHT, DRAG_ON_TOP, 467 INV_MIN_WIDTH, INV_MIN_HEIGHT, DRAG_ON_TOP,
468 MINIMIZE_NO, CLOSE_YES) 468 MINIMIZE_NO, CLOSE_YES)
469 //LLHandle<LLFloater> mFinderHandle takes care of its own initialization 469 //LLHandle<LLFloater> mFinderHandle takes care of its own initialization
@@ -521,7 +521,7 @@ void LLInventoryView::init(LLInventoryModel* inventory)
521 std::ostringstream filterSaveName; 521 std::ostringstream filterSaveName;
522 filterSaveName << gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "filters.xml"); 522 filterSaveName << gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "filters.xml");
523 llinfos << "LLInventoryView::init: reading from " << filterSaveName << llendl; 523 llinfos << "LLInventoryView::init: reading from " << filterSaveName << llendl;
524 llifstream file(filterSaveName.str().c_str()); 524 llifstream file(filterSaveName.str());
525 LLSD savedFilterState; 525 LLSD savedFilterState;
526 if (file.is_open()) 526 if (file.is_open())
527 { 527 {
@@ -587,7 +587,7 @@ LLInventoryView::~LLInventoryView( void )
587 587
588 std::ostringstream filterSaveName; 588 std::ostringstream filterSaveName;
589 filterSaveName << gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "filters.xml"); 589 filterSaveName << gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "filters.xml");
590 llofstream filtersFile(filterSaveName.str().c_str()); 590 llofstream filtersFile(filterSaveName.str());
591 if(!LLSDSerialize::toPrettyXML(filterRoot, filtersFile)) 591 if(!LLSDSerialize::toPrettyXML(filterRoot, filtersFile))
592 { 592 {
593 llwarns << "Could not write to filters save file " << filterSaveName << llendl; 593 llwarns << "Could not write to filters save file " << filterSaveName << llendl;
@@ -607,7 +607,7 @@ void LLInventoryView::draw()
607 LLLocale locale(LLLocale::USER_LOCALE); 607 LLLocale locale(LLLocale::USER_LOCALE);
608 std::ostringstream title; 608 std::ostringstream title;
609 title << "Inventory"; 609 title << "Inventory";
610 LLString item_count_string; 610 std::string item_count_string;
611 LLResMgr::getInstance()->getIntegerString(item_count_string, gInventory.getItemCount()); 611 LLResMgr::getInstance()->getIntegerString(item_count_string, gInventory.getItemCount());
612 title << " (" << item_count_string << " items)"; 612 title << " (" << item_count_string << " items)";
613 title << mFilterText; 613 title << mFilterText;
@@ -764,7 +764,7 @@ void LLInventoryView::changed(U32 mask)
764 if (LLInventoryModel::backgroundFetchActive()) 764 if (LLInventoryModel::backgroundFetchActive())
765 { 765 {
766 LLLocale locale(LLLocale::USER_LOCALE); 766 LLLocale locale(LLLocale::USER_LOCALE);
767 LLString item_count_string; 767 std::string item_count_string;
768 LLResMgr::getInstance()->getIntegerString(item_count_string, gInventory.getItemCount()); 768 LLResMgr::getInstance()->getIntegerString(item_count_string, gInventory.getItemCount());
769 title << " (Fetched " << item_count_string << " items...)"; 769 title << " (Fetched " << item_count_string << " items...)";
770 } 770 }
@@ -793,8 +793,8 @@ LLInventoryView* LLInventoryView::showAgentInventory(BOOL take_keyboard_focus)
793 if(!iv && !gAgent.cameraMouselook()) 793 if(!iv && !gAgent.cameraMouselook())
794 { 794 {
795 // create one. 795 // create one.
796 iv = new LLInventoryView("Inventory", 796 iv = new LLInventoryView(std::string("Inventory"),
797 "FloaterInventoryRect", 797 std::string("FloaterInventoryRect"),
798 &gInventory); 798 &gInventory);
799 iv->open(); 799 iv->open();
800 // keep onscreen 800 // keep onscreen
@@ -805,7 +805,7 @@ LLInventoryView* LLInventoryView::showAgentInventory(BOOL take_keyboard_focus)
805 if(iv) 805 if(iv)
806 { 806 {
807 // Make sure it's in front and it makes a noise 807 // Make sure it's in front and it makes a noise
808 iv->setTitle("Inventory"); 808 iv->setTitle(std::string("Inventory"));
809 iv->open(); /*Flawfinder: ignore*/ 809 iv->open(); /*Flawfinder: ignore*/
810 } 810 }
811 //if (take_keyboard_focus) 811 //if (take_keyboard_focus)
@@ -887,7 +887,7 @@ void LLInventoryView::toggleFindOptions()
887 LLFloater *floater = getFinder(); 887 LLFloater *floater = getFinder();
888 if (!floater) 888 if (!floater)
889 { 889 {
890 LLInventoryViewFinder * finder = new LLInventoryViewFinder("Inventory Finder", 890 LLInventoryViewFinder * finder = new LLInventoryViewFinder(std::string("Inventory Finder"),
891 LLRect(getRect().mLeft - INV_FINDER_WIDTH, getRect().mTop, getRect().mLeft, getRect().mTop - INV_FINDER_HEIGHT), 891 LLRect(getRect().mLeft - INV_FINDER_WIDTH, getRect().mTop, getRect().mLeft, getRect().mTop - INV_FINDER_HEIGHT),
892 this); 892 this);
893 mFinderHandle = finder->getHandle(); 893 mFinderHandle = finder->getHandle();
@@ -897,13 +897,13 @@ void LLInventoryView::toggleFindOptions()
897 // start background fetch of folders 897 // start background fetch of folders
898 gInventory.startBackgroundFetch(); 898 gInventory.startBackgroundFetch();
899 899
900 mFloaterControls["Inventory.ShowFilters"]->setValue(TRUE); 900 mFloaterControls[std::string("Inventory.ShowFilters")]->setValue(TRUE);
901 } 901 }
902 else 902 else
903 { 903 {
904 floater->close(); 904 floater->close();
905 905
906 mFloaterControls["Inventory.ShowFilters"]->setValue(FALSE); 906 mFloaterControls[std::string("Inventory.ShowFilters")]->setValue(FALSE);
907 } 907 }
908} 908}
909 909
@@ -925,7 +925,7 @@ void LLInventoryView::onClearSearch(void* user_data)
925 LLFloater *finder = self->getFinder(); 925 LLFloater *finder = self->getFinder();
926 if (self->mActivePanel) 926 if (self->mActivePanel)
927 { 927 {
928 self->mActivePanel->setFilterSubString(""); 928 self->mActivePanel->setFilterSubString(LLStringUtil::null);
929 self->mActivePanel->setFilterTypes(0xffffffff); 929 self->mActivePanel->setFilterTypes(0xffffffff);
930 } 930 }
931 931
@@ -946,7 +946,7 @@ void LLInventoryView::onClearSearch(void* user_data)
946} 946}
947 947
948//static 948//static
949void LLInventoryView::onSearchEdit(const LLString& search_string, void* user_data ) 949void LLInventoryView::onSearchEdit(const std::string& search_string, void* user_data )
950{ 950{
951 if (search_string == "") 951 if (search_string == "")
952 { 952 {
@@ -960,9 +960,9 @@ void LLInventoryView::onSearchEdit(const LLString& search_string, void* user_dat
960 960
961 gInventory.startBackgroundFetch(); 961 gInventory.startBackgroundFetch();
962 962
963 LLString filter_text = search_string; 963 std::string filter_text = search_string;
964 LLString uppercase_search_string = filter_text; 964 std::string uppercase_search_string = filter_text;
965 LLString::toUpper(uppercase_search_string); 965 LLStringUtil::toUpper(uppercase_search_string);
966 if (self->mActivePanel->getFilterSubString().empty() && uppercase_search_string.empty()) 966 if (self->mActivePanel->getFilterSubString().empty() && uppercase_search_string.empty())
967 { 967 {
968 // current filter and new filter empty, do nothing 968 // current filter and new filter empty, do nothing
@@ -982,39 +982,39 @@ void LLInventoryView::onSearchEdit(const LLString& search_string, void* user_dat
982 982
983 983
984// static 984// static
985BOOL LLInventoryView::incrementalFind(LLFolderViewItem* first_item, const char *find_text, BOOL backward) 985// BOOL LLInventoryView::incrementalFind(LLFolderViewItem* first_item, const char *find_text, BOOL backward)
986{ 986// {
987 LLInventoryView* active_view = NULL; 987// LLInventoryView* active_view = NULL;
988 988
989 for (S32 i = 0; i < sActiveViews.count(); i++) 989// for (S32 i = 0; i < sActiveViews.count(); i++)
990 { 990// {
991 if (gFocusMgr.childHasKeyboardFocus(sActiveViews[i])) 991// if (gFocusMgr.childHasKeyboardFocus(sActiveViews[i]))
992 { 992// {
993 active_view = sActiveViews[i]; 993// active_view = sActiveViews[i];
994 break; 994// break;
995 } 995// }
996 } 996// }
997 997
998 if (!active_view) 998// if (!active_view)
999 { 999// {
1000 return FALSE; 1000// return FALSE;
1001 } 1001// }
1002 1002
1003 LLString search_string(find_text); 1003// std::string search_string(find_text);
1004 1004
1005 if (search_string.empty()) 1005// if (search_string.empty())
1006 { 1006// {
1007 return FALSE; 1007// return FALSE;
1008 } 1008// }
1009 1009
1010 if (active_view->mActivePanel && 1010// if (active_view->mActivePanel &&
1011 active_view->mActivePanel->getRootFolder()->search(first_item, search_string, backward)) 1011// active_view->mActivePanel->getRootFolder()->search(first_item, search_string, backward))
1012 { 1012// {
1013 return TRUE; 1013// return TRUE;
1014 } 1014// }
1015 1015
1016 return FALSE; 1016// return FALSE;
1017} 1017// }
1018 1018
1019//static 1019//static
1020void LLInventoryView::onFilterSelected(void* userdata, bool from_click) 1020void LLInventoryView::onFilterSelected(void* userdata, bool from_click)
@@ -1062,7 +1062,7 @@ BOOL LLInventoryView::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
1062 EDragAndDropType cargo_type, 1062 EDragAndDropType cargo_type,
1063 void* cargo_data, 1063 void* cargo_data,
1064 EAcceptance* accept, 1064 EAcceptance* accept,
1065 LLString& tooltip_msg) 1065 std::string& tooltip_msg)
1066{ 1066{
1067 // Check to see if we are auto scrolling from the last frame 1067 // Check to see if we are auto scrolling from the last frame
1068 LLInventoryPanel* panel = (LLInventoryPanel*)this->getActivePanel(); 1068 LLInventoryPanel* panel = (LLInventoryPanel*)this->getActivePanel();
@@ -1079,7 +1079,7 @@ BOOL LLInventoryView::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
1079 1079
1080 return handled; 1080 return handled;
1081} 1081}
1082LLString get_item_icon_name(LLAssetType::EType asset_type, 1082std::string get_item_icon_name(LLAssetType::EType asset_type,
1083 LLInventoryType::EType inventory_type, 1083 LLInventoryType::EType inventory_type,
1084 U32 attachment_point, 1084 U32 attachment_point,
1085 BOOL item_is_multi ) 1085 BOOL item_is_multi )
@@ -1197,7 +1197,7 @@ LLString get_item_icon_name(LLAssetType::EType asset_type,
1197 break; 1197 break;
1198 } 1198 }
1199 1199
1200 return LLString(ICON_NAME[idx]); 1200 return ICON_NAME[idx];
1201} 1201}
1202 1202
1203LLUIImagePtr get_item_icon(LLAssetType::EType asset_type, 1203LLUIImagePtr get_item_icon(LLAssetType::EType asset_type,
@@ -1205,19 +1205,18 @@ LLUIImagePtr get_item_icon(LLAssetType::EType asset_type,
1205 U32 attachment_point, 1205 U32 attachment_point,
1206 BOOL item_is_multi) 1206 BOOL item_is_multi)
1207{ 1207{
1208 const LLString& icon_name = get_item_icon_name(asset_type, inventory_type, attachment_point, item_is_multi ); 1208 const std::string& icon_name = get_item_icon_name(asset_type, inventory_type, attachment_point, item_is_multi );
1209 return LLUI::getUIImage(icon_name); 1209 return LLUI::getUIImage(icon_name);
1210} 1210}
1211 1211
1212const LLString LLInventoryPanel::DEFAULT_SORT_ORDER = LLString("InventorySortOrder"); 1212const std::string LLInventoryPanel::DEFAULT_SORT_ORDER = std::string("InventorySortOrder");
1213const LLString LLInventoryPanel::RECENTITEMS_SORT_ORDER = LLString("RecentItemsSortOrder"); 1213const std::string LLInventoryPanel::RECENTITEMS_SORT_ORDER = std::string("RecentItemsSortOrder");
1214const LLString LLInventoryPanel::INHERIT_SORT_ORDER = LLString(""); 1214const std::string LLInventoryPanel::INHERIT_SORT_ORDER = std::string("");
1215 1215
1216LLInventoryPanel::LLInventoryPanel(const LLString& name, 1216LLInventoryPanel::LLInventoryPanel(const std::string& name,
1217 const LLString& sort_order_setting, 1217 const std::string& sort_order_setting,
1218 const LLRect& rect, 1218 const LLRect& rect,
1219 LLInventoryModel* inventory, 1219 LLInventoryModel* inventory,
1220 LLFolderSearchFunction search,
1221 BOOL allow_multi_select, 1220 BOOL allow_multi_select,
1222 LLView *parent_view) : 1221 LLView *parent_view) :
1223 LLPanel(name, rect, TRUE), 1222 LLPanel(name, rect, TRUE),
@@ -1226,8 +1225,7 @@ LLInventoryPanel::LLInventoryPanel(const LLString& name,
1226 mFolders(NULL), 1225 mFolders(NULL),
1227 mScroller(NULL), 1226 mScroller(NULL),
1228 mAllowMultiSelect(allow_multi_select), 1227 mAllowMultiSelect(allow_multi_select),
1229 mSortOrderSetting(sort_order_setting), 1228 mSortOrderSetting(sort_order_setting)
1230 mSearchFunction(search)
1231{ 1229{
1232 setBackgroundColor(gColors.getColor("InventoryBackgroundColor")); 1230 setBackgroundColor(gColors.getColor("InventoryBackgroundColor"));
1233 setBackgroundVisible(TRUE); 1231 setBackgroundVisible(TRUE);
@@ -1248,7 +1246,7 @@ BOOL LLInventoryPanel::postBuild()
1248 // scroller 1246 // scroller
1249 LLRect scroller_view_rect = getRect(); 1247 LLRect scroller_view_rect = getRect();
1250 scroller_view_rect.translate(-scroller_view_rect.mLeft, -scroller_view_rect.mBottom); 1248 scroller_view_rect.translate(-scroller_view_rect.mLeft, -scroller_view_rect.mBottom);
1251 mScroller = new LLScrollableContainerView("Inventory Scroller", 1249 mScroller = new LLScrollableContainerView(std::string("Inventory Scroller"),
1252 scroller_view_rect, 1250 scroller_view_rect,
1253 mFolders); 1251 mFolders);
1254 mScroller->setFollowsAll(); 1252 mScroller->setFollowsAll();
@@ -1263,7 +1261,7 @@ BOOL LLInventoryPanel::postBuild()
1263 rebuildViewsFor(LLUUID::null, LLInventoryObserver::ADD); 1261 rebuildViewsFor(LLUUID::null, LLInventoryObserver::ADD);
1264 1262
1265 // bit of a hack to make sure the inventory is open. 1263 // bit of a hack to make sure the inventory is open.
1266 mFolders->openFolder("My Inventory"); 1264 mFolders->openFolder(std::string("My Inventory"));
1267 1265
1268 if (mSortOrderSetting != INHERIT_SORT_ORDER) 1266 if (mSortOrderSetting != INHERIT_SORT_ORDER)
1269 { 1267 {
@@ -1308,7 +1306,7 @@ LLView* LLInventoryPanel::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFac
1308{ 1306{
1309 LLInventoryPanel* panel; 1307 LLInventoryPanel* panel;
1310 1308
1311 LLString name("inventory_panel"); 1309 std::string name("inventory_panel");
1312 node->getAttributeString("name", name); 1310 node->getAttributeString("name", name);
1313 1311
1314 BOOL allow_multi_select = TRUE; 1312 BOOL allow_multi_select = TRUE;
@@ -1317,12 +1315,12 @@ LLView* LLInventoryPanel::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFac
1317 LLRect rect; 1315 LLRect rect;
1318 createRect(node, rect, parent, LLRect()); 1316 createRect(node, rect, parent, LLRect());
1319 1317
1320 LLString sort_order(INHERIT_SORT_ORDER); 1318 std::string sort_order(INHERIT_SORT_ORDER);
1321 node->getAttributeString("sort_order", sort_order); 1319 node->getAttributeString("sort_order", sort_order);
1322 1320
1323 panel = new LLInventoryPanel(name, sort_order, 1321 panel = new LLInventoryPanel(name, sort_order,
1324 rect, &gInventory, 1322 rect, &gInventory,
1325 LLInventoryView::incrementalFind, allow_multi_select, parent); 1323 allow_multi_select, parent);
1326 1324
1327 panel->initFromXML(node, parent); 1325 panel->initFromXML(node, parent);
1328 1326
@@ -1341,7 +1339,7 @@ void LLInventoryPanel::setFilterPermMask(PermissionMask filter_perm_mask)
1341 mFolders->getFilter()->setFilterPermissions(filter_perm_mask); 1339 mFolders->getFilter()->setFilterPermissions(filter_perm_mask);
1342} 1340}
1343 1341
1344void LLInventoryPanel::setFilterSubString(const LLString& string) 1342void LLInventoryPanel::setFilterSubString(const std::string& string)
1345{ 1343{
1346 mFolders->getFilter()->setFilterSubString(string); 1344 mFolders->getFilter()->setFilterSubString(string);
1347} 1345}
@@ -1666,7 +1664,7 @@ BOOL LLInventoryPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
1666 EDragAndDropType cargo_type, 1664 EDragAndDropType cargo_type,
1667 void* cargo_data, 1665 void* cargo_data,
1668 EAcceptance* accept, 1666 EAcceptance* accept,
1669 LLString& tooltip_msg) 1667 std::string& tooltip_msg)
1670{ 1668{
1671 1669
1672 BOOL handled = LLPanel::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); 1670 BOOL handled = LLPanel::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
@@ -1715,13 +1713,13 @@ void LLInventoryPanel::clearSelection()
1715 mFolders->clearSelection(); 1713 mFolders->clearSelection();
1716} 1714}
1717 1715
1718void LLInventoryPanel::createNewItem(const char* name, 1716void LLInventoryPanel::createNewItem(const std::string& name,
1719 const LLUUID& parent_id, 1717 const LLUUID& parent_id,
1720 LLAssetType::EType asset_type, 1718 LLAssetType::EType asset_type,
1721 LLInventoryType::EType inv_type, 1719 LLInventoryType::EType inv_type,
1722 U32 next_owner_perm) 1720 U32 next_owner_perm)
1723{ 1721{
1724 LLString desc; 1722 std::string desc;
1725 LLAssetType::generateDescriptionFor(asset_type, desc); 1723 LLAssetType::generateDescriptionFor(asset_type, desc);
1726 next_owner_perm = (next_owner_perm) ? next_owner_perm : PERM_MOVE | PERM_TRANSFER; 1724 next_owner_perm = (next_owner_perm) ? next_owner_perm : PERM_MOVE | PERM_TRANSFER;
1727 1725
@@ -1730,15 +1728,15 @@ void LLInventoryPanel::createNewItem(const char* name,
1730 { 1728 {
1731 LLPointer<LLInventoryCallback> cb = new CreateGestureCallback(); 1729 LLPointer<LLInventoryCallback> cb = new CreateGestureCallback();
1732 create_inventory_item(gAgent.getID(), gAgent.getSessionID(), 1730 create_inventory_item(gAgent.getID(), gAgent.getSessionID(),
1733 parent_id, LLTransactionID::tnull, name, desc, asset_type, inv_type, 1731 parent_id, LLTransactionID::tnull, name, desc, asset_type, inv_type,
1734 NOT_WEARABLE, next_owner_perm, cb); 1732 NOT_WEARABLE, next_owner_perm, cb);
1735 } 1733 }
1736 else 1734 else
1737 { 1735 {
1738 LLPointer<LLInventoryCallback> cb = NULL; 1736 LLPointer<LLInventoryCallback> cb = NULL;
1739 create_inventory_item(gAgent.getID(), gAgent.getSessionID(), 1737 create_inventory_item(gAgent.getID(), gAgent.getSessionID(),
1740 parent_id, LLTransactionID::tnull, name, desc, asset_type, inv_type, 1738 parent_id, LLTransactionID::tnull, name, desc, asset_type, inv_type,
1741 NOT_WEARABLE, next_owner_perm, cb); 1739 NOT_WEARABLE, next_owner_perm, cb);
1742 } 1740 }
1743 1741
1744} 1742}