DD-19 : Print errors in bold, sort folders alphabetically, simplify log text when no errors

meow-7.2.2
Merov Linden 2014-08-25 23:56:34 -07:00
parent 4d752d31aa
commit d6defce1a1
3 changed files with 16 additions and 3 deletions

View File

@ -641,7 +641,13 @@ void LLFloaterMarketplaceValidation::appendMessage(std::string& message, LLError
{
if (mEditor)
{
mEditor->appendText(message, true);
// Errors are printed in bold, other messages in normal font
LLStyle::Params style;
LLFontDescriptor new_desc(mEditor->getFont()->getFontDesc());
new_desc.setStyle(log_level == LLError::LEVEL_ERROR ? LLFontGL::BOLD : LLFontGL::NORMAL);
LLFontGL* new_font = LLFontGL::getFont(new_desc);
style.font = new_font;
mEditor->appendText(message, true, style);
}
}

View File

@ -1353,6 +1353,11 @@ bool move_folder_to_marketplacelistings(LLInventoryCategory* inv_cat, const LLUU
// This function does no deletion of listings but a mere audit and raises issues to the user (through the
// optional callback cb). It also returns a boolean, true if things validate, false if issues are raised.
// The only inventory changes that are done is to move and sort folders containing no-copy items to stock folders.
bool sort_alpha(const LLViewerInventoryCategory* cat1, const LLViewerInventoryCategory* cat2)
{
return cat1->getName().compare(cat2->getName()) < 0;
}
bool validate_marketplacelistings(LLInventoryCategory* cat, validation_callback_t cb)
{
// Folder is valid unless issue is raised
@ -1569,7 +1574,9 @@ bool validate_marketplacelistings(LLInventoryCategory* cat, validation_callback_
// Recursion : Perform the same validation on each nested folder
LLInventoryModel::cat_array_t cat_array_copy = *cat_array;
// Sort the folders in alphabetical order first
std::sort(cat_array_copy.begin(), cat_array_copy.end(), sort_alpha);
for (LLInventoryModel::cat_array_t::iterator iter = cat_array_copy.begin(); iter != cat_array_copy.end(); iter++)
{
LLInventoryCategory* category = *iter;

View File

@ -2293,7 +2293,7 @@ The [[MARKETPLACE_CREATE_STORE_URL] Marketplace store] is returning errors.
</string>
<string name="Marketplace Validation Intro"></string>
<string name="Marketplace Validation Log">: No errors</string>
<string name="Marketplace Validation Log"></string>
<string name="Marketplace Validation Warning Stock">: Warning: creating wrapping folder for stock folder</string>
<string name="Marketplace Validation Warning Empty">: Warning: folder doesn't contain any item</string>
<string name="Marketplace Validation Warning Create Stock">: Warning: creating stock folder</string>