diff options
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llinventorybridge.cpp | 5 | ||||
-rw-r--r-- | indra/newview/lloutfitgallery.cpp | 27 | ||||
-rw-r--r-- | indra/newview/lloutfitgallery.h | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_outfit_gallery.xml | 3 |
4 files changed, 7 insertions, 29 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 9782c792c9..6e51c08d9c 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4483,8 +4483,9 @@ static BOOL can_move_to_outfit(LLInventoryItem* inv_item, BOOL move_is_into_curr if ((inv_item->getInventoryType() != LLInventoryType::IT_WEARABLE) && (inv_item->getInventoryType() != LLInventoryType::IT_GESTURE) && (inv_item->getInventoryType() != LLInventoryType::IT_ATTACHMENT) && - (inv_item->getInventoryType() != LLInventoryType::IT_OBJECT)) - { + (inv_item->getInventoryType() != LLInventoryType::IT_OBJECT) && + (inv_item->getInventoryType() != LLInventoryType::IT_TEXTURE)) + { return FALSE; } diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp index 4ee2175286..51d8bea3ad 100644 --- a/indra/newview/lloutfitgallery.cpp +++ b/indra/newview/lloutfitgallery.cpp @@ -58,7 +58,6 @@ LLOutfitGallery::LLOutfitGallery() galleryCreated(false), mRowCount(0), mItemsAddedCount(0), - mPhotoLinkPending(NULL), mOutfitLinkPending(NULL) { } @@ -618,9 +617,7 @@ void LLOutfitGallery::refreshOutfit(const LLUUID& category_id) { LLViewerInventoryCategory* category = gInventory.getCategory(category_id); { - std::string outfit_name = category->getName(); bool photo_loaded = false; - LL_WARNS() << "Outfit name:" << outfit_name << LL_ENDL; LLInventoryModel::cat_array_t sub_cat_array; LLInventoryModel::item_array_t outfit_item_array; // Collect all sub-categories of a given category. @@ -634,8 +631,6 @@ void LLOutfitGallery::refreshOutfit(const LLUUID& category_id) LLViewerInventoryItem* linked_item = outfit_item->getLinkedItem(); if (linked_item->getActualType() == LLAssetType::AT_TEXTURE) { - std::string texture_name = linked_item->getName(); - LL_WARNS() << "Texture name:" << texture_name << LL_ENDL; LLUUID asset_id = linked_item->getAssetUUID(); mOutfitMap[category_id]->setImageAssetId(asset_id); photo_loaded = true; @@ -663,22 +658,19 @@ void LLOutfitGallery::refreshTextures(const LLUUID& category_id) LLInventoryModel::EXCLUDE_TRASH, is_texture); - //Find textures which contain outfit UUID string in description - LLInventoryModel::item_array_t uploaded_item_array; + //Find texture which contain outfit ID string in name LLViewerInventoryItem* photo_upload_item = NULL; BOOST_FOREACH(LLViewerInventoryItem* item, item_array) { - std::string desc = item->getDescription(); std::string name = item->getName(); - - if (name == getString("photo_upload_pending_string")) + if (!mOutfitLinkPending.isNull() && name == mOutfitLinkPending.asString()) { photo_upload_item = item; break; } } - if (!mPhotoLinkPending.isNull() && photo_upload_item != NULL) + if (photo_upload_item != NULL) { LLUUID upload_pending_id = photo_upload_item->getUUID(); LLInventoryObject* upload_object = gInventory.getObject(upload_pending_id); @@ -700,7 +692,6 @@ void LLOutfitGallery::refreshTextures(const LLUUID& category_id) update_inventory_item(upload_pending_id, updates, NULL); } - mPhotoLinkPending.setNull(); mOutfitLinkPending.setNull(); } } @@ -733,7 +724,6 @@ void LLOutfitGallery::uploadPhoto(LLUUID outfit_id) return; } - bool add_successful = false; LLFilePicker& picker = LLFilePicker::instance(); if (picker.getOpenFile(LLFilePicker::FFLOAD_IMAGE)) { @@ -741,22 +731,15 @@ void LLOutfitGallery::uploadPhoto(LLUUID outfit_id) LLLocalBitmap* unit = new LLLocalBitmap(filename); if (unit->getValid()) { - add_successful = true; - //LLAssetStorage::LLStoreAssetCallback callback = &LLGalleryPhotoStoreCallback; S32 expected_upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); // kinda hack - assumes that unsubclassed LLFloaterNameDesc is only used for uploading chargeable assets, which it is right now (it's only used unsubclassed for the sound upload dialog, and THAT should be a subclass). void *nruserdata = NULL; nruserdata = (void *)&outfit_id; - LL_WARNS() << "selected_outfit_id: " << outfit_id.asString() << LL_ENDL; - - //LLViewerInventoryItem *outfit = gInventory.getItem(selected_outfit_id); LLViewerInventoryCategory *outfit_cat = gInventory.getCategory(outfit_id); if (!outfit_cat) return; checkRemovePhoto(outfit_id); - - std::string upload_pending_name = getString("photo_upload_pending_string"); - + std::string upload_pending_name = outfit_id.asString(); LLUUID photo_id = upload_new_resource(filename, // file upload_pending_name, outfit_id.asString(), @@ -765,8 +748,6 @@ void LLOutfitGallery::uploadPhoto(LLUUID outfit_id) LLFloaterPerms::getGroupPerms("Uploads"), LLFloaterPerms::getEveryonePerms("Uploads"), upload_pending_name, &LLGalleryPhotoStoreCallback, expected_upload_cost, nruserdata); - - mPhotoLinkPending = photo_id; mOutfitLinkPending = outfit_id; } } diff --git a/indra/newview/lloutfitgallery.h b/indra/newview/lloutfitgallery.h index 47ab85f4e1..a2bba62157 100644 --- a/indra/newview/lloutfitgallery.h +++ b/indra/newview/lloutfitgallery.h @@ -122,7 +122,6 @@ private: LLScrollContainer* mScrollPanel; LLPanel* mGalleryPanel; LLPanel* mLastRowStack; - LLUUID mPhotoLinkPending; LLUUID mOutfitLinkPending; bool galleryCreated; int mRowCount; diff --git a/indra/newview/skins/default/xui/en/panel_outfit_gallery.xml b/indra/newview/skins/default/xui/en/panel_outfit_gallery.xml index 682d2d0730..c06c6a86c3 100644 --- a/indra/newview/skins/default/xui/en/panel_outfit_gallery.xml +++ b/indra/newview/skins/default/xui/en/panel_outfit_gallery.xml @@ -10,9 +10,6 @@ left="0" top="0" width="312"> - <string name="photo_upload_pending_string"> - Photo upload pending... - </string> <string name="outfit_photo_string"> Photo of "[OUTFIT_NAME]" outfit </string> |