From abb8d0402c8498dc5ce8dfec1438f2fedbaecce9 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Fri, 11 Aug 2023 18:31:21 -0700 Subject: SL-20109: Some small UI tweaks before moving onto the meat of the functionality --- .../newview/llfloaterinventorythumbnailshelper.cpp | 22 +++++++++------------- indra/newview/llfloaterinventorythumbnailshelper.h | 3 +-- .../xui/en/floater_inventory_thumbnails_helper.xml | 7 +++++-- 3 files changed, 15 insertions(+), 17 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterinventorythumbnailshelper.cpp b/indra/newview/llfloaterinventorythumbnailshelper.cpp index 31ec144615..abd5e01e5d 100644 --- a/indra/newview/llfloaterinventorythumbnailshelper.cpp +++ b/indra/newview/llfloaterinventorythumbnailshelper.cpp @@ -62,11 +62,11 @@ BOOL LLFloaterInventoryThumbnailsHelper::postBuild() mOutputLog = getChild("output_log"); mOutputLog->setMaxTextLength(0xffff * 0x10); - mMergeItemsTexturesBtn = getChild("merge_items_textures"); - mMergeItemsTexturesBtn->setCommitCallback(boost::bind(&LLFloaterInventoryThumbnailsHelper::onMergeItemsTextures, this)); - mMergeItemsTexturesBtn->setEnabled(false); + //mMergeItemsTexturesBtn = getChild("merge_items_textures"); + //mMergeItemsTexturesBtn->setCommitCallback(boost::bind(&LLFloaterInventoryThumbnailsHelper::onMergeItemsTextures, this)); + //mMergeItemsTexturesBtn->setEnabled(false); - mWriteThumbnailsBtn = getChild("write_items_thumbnails"); + mWriteThumbnailsBtn = getChild("write_thumbnails_btn"); mWriteThumbnailsBtn->setCommitCallback(boost::bind(&LLFloaterInventoryThumbnailsHelper::onWriteThumbnails, this)); mWriteThumbnailsBtn->setEnabled(false); @@ -158,8 +158,6 @@ void LLFloaterInventoryThumbnailsHelper::onPasteItems() } mOutputLog->setCursorAndScrollToEnd(); - - mMergeItemsTexturesBtn->setEnabled(true); } void LLFloaterInventoryThumbnailsHelper::recordTextureItemEntry(LLViewerInventoryItem* item) @@ -240,11 +238,9 @@ void LLFloaterInventoryThumbnailsHelper::onPasteTextures() } mOutputLog->setCursorAndScrollToEnd(); - - mMergeItemsTexturesBtn->setEnabled(true); } -void LLFloaterInventoryThumbnailsHelper::onMergeItemsTextures() +void LLFloaterInventoryThumbnailsHelper::mergeItemsTextures() { mOutputLog->appendText( STRINGIZE( @@ -320,7 +316,7 @@ void LLFloaterInventoryThumbnailsHelper::onMergeItemsTextures() #if 1 // *TODO$: LLInventoryCallback should be deprecated to conform to the new boost::bind/coroutine model. // temp code in transition -void bulkyInventoryCb(LLPointer cb, LLUUID id) +void inventoryThumbnailsHelperCb(LLPointer cb, LLUUID id) { if (cb.notNull()) { @@ -329,7 +325,7 @@ void bulkyInventoryCb(LLPointer cb, LLUUID id) } #endif -bool writeThumbnailID(LLUUID item_id, LLUUID thumbnail_asset_id) +bool writeInventoryThumbnailID(LLUUID item_id, LLUUID thumbnail_asset_id) { if (AISAPI::isAvailable()) { @@ -339,7 +335,7 @@ bool writeThumbnailID(LLUUID item_id, LLUUID thumbnail_asset_id) LLPointer cb; - AISAPI::completion_t cr = boost::bind(&bulkyInventoryCb, cb, _1); + AISAPI::completion_t cr = boost::bind(&inventoryThumbnailsHelperCb, cb, _1); AISAPI::UpdateItem(item_id, updates, cr); return true; @@ -382,7 +378,7 @@ void LLFloaterInventoryThumbnailsHelper::onWriteThumbnails() LLUUID item_id = ((*iter).second).first; LLUUID thumbnail_asset_id = ((*iter).second).second; - writeThumbnailID(item_id, thumbnail_asset_id); + writeInventoryThumbnailID(item_id, thumbnail_asset_id); ++iter; } diff --git a/indra/newview/llfloaterinventorythumbnailshelper.h b/indra/newview/llfloaterinventorythumbnailshelper.h index 69ce3e1fec..3942214fe1 100644 --- a/indra/newview/llfloaterinventorythumbnailshelper.h +++ b/indra/newview/llfloaterinventorythumbnailshelper.h @@ -51,8 +51,7 @@ class LLFloaterInventoryThumbnailsHelper: LLTextEditor* mOutputLog; - LLUICtrl* mMergeItemsTexturesBtn; - void onMergeItemsTextures(); + void mergeItemsTextures(); LLUICtrl* mWriteThumbnailsBtn; void onWriteThumbnails(); diff --git a/indra/newview/skins/default/xui/en/floater_inventory_thumbnails_helper.xml b/indra/newview/skins/default/xui/en/floater_inventory_thumbnails_helper.xml index 79e0ef2b9f..62d0417f9e 100644 --- a/indra/newview/skins/default/xui/en/floater_inventory_thumbnails_helper.xml +++ b/indra/newview/skins/default/xui/en/floater_inventory_thumbnails_helper.xml @@ -38,7 +38,10 @@ left="8" right="-8" name="output_log" - width="480"> + font="Monospace" + text_color="0.1 0.5 0.1 1.0" + width="480"> +