diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index f676eb7fe..0925bb785 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -752,7 +752,12 @@ LLScrollListCtrl::LLScrollListCtrl(const std::string& name, const LLRect& rect, addChild(mBorder); } - + LLTextBox* textBox = new LLTextBox("comment_text",mItemListRect,std::string()); + textBox->setBorderVisible(false); + textBox->setFollowsAll(); + textBox->setFontShadow(LLFontGL::NO_SHADOW); + textBox->setColor(LLUI::sColorsGroup->getColor("DefaultListText")); + addChild(textBox); } S32 LLScrollListCtrl::getSearchColumn() @@ -1688,7 +1693,7 @@ void LLScrollListCtrl::deselectAllItems(BOOL no_commit_on_change) void LLScrollListCtrl::setCommentText(const std::string& comment_text) { - getChild("comment_text")->setValue(comment_text); + getChild("comment_text")->setWrappedText(comment_text); } LLScrollListItem* LLScrollListCtrl::addSeparator(EAddPosition pos) @@ -2045,6 +2050,7 @@ void LLScrollListCtrl::draw() updateColumns(); + getChildView("comment_text")->setVisible(mItemList.empty()); drawItems(); @@ -3256,20 +3262,7 @@ LLView* LLScrollListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFac } std::string contents = node->getTextContents(); - if (!contents.empty()) - { - typedef boost::tokenizer > tokenizer; - boost::char_separator sep("\t\n"); - tokenizer tokens(contents, sep); - tokenizer::iterator token_iter = tokens.begin(); - - while(token_iter != tokens.end()) - { - const std::string& line = *token_iter; - scroll_list->addSimpleElement(line); - ++token_iter; - } - } + scroll_list->setCommentText(contents); return scroll_list; } diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp index 26d3aa0a9..8ea55dab0 100644 --- a/indra/newview/llcompilequeue.cpp +++ b/indra/newview/llcompilequeue.cpp @@ -515,6 +515,7 @@ void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id, delete data; } +#if 0 //Client side compiling disabled. // static void LLFloaterCompileQueue::onSaveTextComplete(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed) { @@ -551,7 +552,6 @@ void LLFloaterCompileQueue::onSaveBytecodeComplete(const LLUUID& asset_id, void* } // compile the file given and save it out. -#if 0 //Client side compiling disabled. void LLFloaterCompileQueue::compile(const std::string& filename, const LLUUID& item_id) { diff --git a/indra/newview/llcompilequeue.h b/indra/newview/llcompilequeue.h index ee49ac574..9114ce484 100644 --- a/indra/newview/llcompilequeue.h +++ b/indra/newview/llcompilequeue.h @@ -136,10 +136,6 @@ public: // will be responsible for it's own destruction. static LLFloaterCompileQueue* create(BOOL mono); - static void onSaveBytecodeComplete(const LLUUID& asset_id, - void* user_data, - S32 status); - // remove any object in mScriptScripts with the matching uuid. void removeItemByItemID(const LLUUID& item_id); @@ -158,6 +154,7 @@ protected: LLAssetType::EType type, void* user_data, S32 status, LLExtStat ext_status); +#if 0 //Client side compiling disabled. static void onSaveTextComplete(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status); static void onSaveBytecodeComplete(const LLUUID& asset_id, @@ -165,7 +162,6 @@ protected: S32 status, LLExtStat ext_status); // compile the file given and save it out. -#if 0 //Client side compiling disabled. void compile(const std::string& filename, const LLUUID& asset_id); #endif diff --git a/indra/newview/llfloaterbulkpermission.cpp b/indra/newview/llfloaterbulkpermission.cpp index 926caee95..78aefe250 100644 --- a/indra/newview/llfloaterbulkpermission.cpp +++ b/indra/newview/llfloaterbulkpermission.cpp @@ -180,7 +180,7 @@ void LLFloaterBulkPermission::onCommitCopy(LLUICtrl* ctrl, void* data) BOOL LLFloaterBulkPermission::start() { // note: number of top-level objects to modify is mObjectIDs.count(). - getChild("queue output")->setCommentText(getString("start_text")); + getChild("queue output")->addSimpleElement(getString("start_text")); return nextObject(); } @@ -203,7 +203,7 @@ BOOL LLFloaterBulkPermission::nextObject() if(isDone() && !mDone) { - getChild("queue output")->setCommentText(getString("done_text")); + getChild("queue output")->addSimpleElement(getString("done_text")); mDone = TRUE; } return successful_start; @@ -349,7 +349,7 @@ void LLFloaterBulkPermission::handleInventory(LLViewerObject* viewer_obj, LLInv status_text.setArg("[STATUS]", ""); } - list->setCommentText(status_text.getString()); + list->addSimpleElement(status_text.getString()); //TODO if we are an object inside an object we should check a recuse flag and if set //open the inventory of the object and recurse - Michelle2 Zenovka diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index 0ec781e40..52fb33247 100644 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -457,18 +457,7 @@ LLView* LLNameListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFacto } std::string contents = node->getTextContents(); - - typedef boost::tokenizer > tokenizer; - boost::char_separator sep("\t\n"); - tokenizer tokens(contents, sep); - tokenizer::iterator token_iter = tokens.begin(); - - while(token_iter != tokens.end()) - { - const std::string& line = *token_iter; - name_list->setCommentText(line); - ++token_iter; - } + name_list->setCommentText(contents); return name_list; } diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 16eef86fd..0e49f95af 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -485,10 +485,7 @@ bool LLScriptEdCore::writeToFile(const std::string& filename) { llwarns << "Unable to write to " << filename << llendl; - LLSD row; - row["columns"][0]["value"] = "Error writing to local file. Is your hard drive full?"; - row["columns"][0]["font"] = "SANSSERIF_SMALL"; - mErrorList->addElement(row); + mErrorList->addSimpleElement(LLTrans::getString("CompileQueueProblemWriting")); return false; } @@ -653,15 +650,12 @@ void LLScriptEdCore::autoSave() //mAutosaveFilename = llformat("%s.lsl", asfilename.c_str()); } - FILE* fp = LLFile::fopen(mAutosaveFilename.c_str(), "wb"); + LLFILE* fp = LLFile::fopen(mAutosaveFilename.c_str(), "wb"); if(!fp) { llwarns << "Unable to write to " << mAutosaveFilename << llendl; - LLSD row; - row["columns"][0]["value"] = "Error writing to temp file. Is your hard drive full?"; - row["columns"][0]["font"] = "SANSSERIF_SMALL"; - mErrorList->addElement(row); + mErrorList->addSimpleElement(LLTrans::getString("CompileQueueProblemWriting")); return; } @@ -706,9 +700,7 @@ void LLScriptEdCore::addHelpItemToHistory(const std::string& help_string) // separate history items from full item list if (mLiveHelpHistorySize == 0) { - LLSD row; - row["columns"][0]["type"] = "separator"; - history_combo->addElement(row, ADD_TOP); + history_combo->addSeparator(ADD_TOP); } // delete all history items over history limit while(mLiveHelpHistorySize > MAX_HISTORY_COUNT - 1) @@ -1321,8 +1313,8 @@ LLPreviewLSL::LLPreviewLSL(const std::string& name, const LLRect& rect, void LLPreviewLSL::callbackLSLCompileSucceeded() { llinfos << "LSL Bytecode saved" << llendl; - mScriptEd->mErrorList->setCommentText(LLTrans::getString("CompileSuccessful")); - mScriptEd->mErrorList->setCommentText(LLTrans::getString("SaveComplete")); + mScriptEd->mErrorList->addSimpleElement(LLTrans::getString("CompileSuccessful")); + mScriptEd->mErrorList->addSimpleElement(LLTrans::getString("SaveComplete")); closeIfNeeded(); } @@ -1338,6 +1330,7 @@ void LLPreviewLSL::callbackLSLCompileFailed(const LLSD& compile_errors) LLSD row; std::string error_message = line->asString(); LLStringUtil::stripNonprintable(error_message); + row["columns"][0]["column"] = "default_column"; row["columns"][0]["value"] = error_message; row["columns"][0]["font"] = "OCRA"; mScriptEd->mErrorList->addElement(row); @@ -1480,10 +1473,7 @@ void LLPreviewLSL::saveIfNeeded() { llwarns << "Unable to write to " << filename << llendl; - LLSD row; - row["columns"][0]["value"] = "Error writing to local file. Is your hard drive full?"; - row["columns"][0]["font"] = "SANSSERIF_SMALL"; - mScriptEd->mErrorList->addElement(row); + mScriptEd->mErrorList->addSimpleElement(LLTrans::getString("CompileQueueProblemWriting")); return; } @@ -1506,9 +1496,7 @@ void LLPreviewLSL::saveIfNeeded() else { LLSD row; - row["columns"][0]["value"] = LLTrans::getString("CompileQueueProblemUploading"); - row["columns"][0]["font"] = "SANSSERIF_SMALL"; - mScriptEd->mErrorList->addElement(row); + mScriptEd->mErrorList->addSimpleElement(LLTrans::getString("CompileQueueProblemUploading")); LLFile::remove(filename); } #if 0 //Client side compiling disabled. @@ -1622,7 +1610,6 @@ void LLPreviewLSL::uploadAssetLegacy(const std::string& filename, LLFile::remove(err_filename); LLFile::remove(dst_filename); } -#endif // static void LLPreviewLSL::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed) @@ -1710,6 +1697,7 @@ void LLPreviewLSL::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_d } delete instance_uuid; } +#endif // static void LLPreviewLSL::onLoadComplete( LLVFS *vfs, const LLUUID& asset_uuid, LLAssetType::EType type, @@ -1931,8 +1919,8 @@ void LLLiveLSLEditor::callbackLSLCompileSucceeded(const LLUUID& task_id, bool is_script_running) { lldebugs << "LSL Bytecode saved" << llendl; - mScriptEd->mErrorList->setCommentText(LLTrans::getString("CompileSuccessful")); - mScriptEd->mErrorList->setCommentText(LLTrans::getString("SaveComplete")); + mScriptEd->mErrorList->addSimpleElement(LLTrans::getString("CompileSuccessful")); + mScriptEd->mErrorList->addSimpleElement(LLTrans::getString("SaveComplete")); closeIfNeeded(); } @@ -1947,6 +1935,7 @@ void LLLiveLSLEditor::callbackLSLCompileFailed(const LLSD& compile_errors) LLSD row; std::string error_message = line->asString(); LLStringUtil::stripNonprintable(error_message); + row["columns"][0]["column"] = "default_column"; row["columns"][0]["value"] = error_message; row["columns"][0]["font"] = "OCRA"; mScriptEd->mErrorList->addElement(row); @@ -2389,10 +2378,7 @@ void LLLiveLSLEditor::saveIfNeeded() { llwarns << "Unable to write to " << filename << llendl; - LLSD row; - row["columns"][0]["value"] = "Error writing to local file. Is your hard drive full?"; - row["columns"][0]["font"] = "SANSSERIF_SMALL"; - mScriptEd->mErrorList->addElement(row); + mScriptEd->mErrorList->addSimpleElement(LLTrans::getString("CompileQueueProblemWriting")); return; } std::string utf8text = mScriptEd->mEditor->getText(); @@ -2419,10 +2405,7 @@ void LLLiveLSLEditor::saveIfNeeded() } else { - LLSD row; - row["columns"][0]["value"] = LLTrans::getString("CompileQueueProblemUploading"); - row["columns"][0]["font"] = "SANSSERIF_SMALL"; - mScriptEd->mErrorList->addElement(row); + mScriptEd->mErrorList->addSimpleElement(LLTrans::getString("CompileQueueProblemUploading")); LLFile::remove(filename); } #if 0 //Client side compiling disabled. @@ -2548,7 +2531,6 @@ void LLLiveLSLEditor::uploadAssetLegacy(const std::string& filename, runningCheckbox->setLabel(getString("script_running")); runningCheckbox->setEnabled(TRUE); } -#endif void LLLiveLSLEditor::onSaveTextComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed) { @@ -2579,7 +2561,6 @@ void LLLiveLSLEditor::onSaveTextComplete(const LLUUID& asset_uuid, void* user_da data = NULL; } - void LLLiveLSLEditor::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed) { LLLiveLSLSaveData* data = (LLLiveLSLSaveData*)user_data; @@ -2593,7 +2574,7 @@ void LLLiveLSLEditor::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* use if(self) { // Tell the user that the compile worked. - self->mScriptEd->mErrorList->setCommentText(LLTrans::getString("SaveComplete")); + self->mScriptEd->mErrorList->addSimpleElement(LLTrans::getString("SaveComplete")); // close the window if this completes both uploads self->getWindow()->decBusyCount(); self->mPendingUploads--; @@ -2627,6 +2608,7 @@ void LLLiveLSLEditor::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* use LLFile::remove(dst_filename); delete data; } +#endif void LLLiveLSLEditor::open() { diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index f62a8fb5b..9b171763f 100644 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -202,9 +202,11 @@ protected: void uploadAssetViaCaps(const std::string& url, const std::string& filename, const LLUUID& item_id); +#if 0 //Client side compiling disabled. void uploadAssetLegacy(const std::string& filename, const LLUUID& item_id, const LLTransactionID& tid); +#endif // virtual BOOL canSaveAs() const; virtual void saveAs(); @@ -218,8 +220,10 @@ protected: static void onLoadComplete(LLVFS *vfs, const LLUUID& uuid, LLAssetType::EType type, void* user_data, S32 status, LLExtStat ext_status); +#if 0 //Client side compiling disabled. static void onSaveComplete(const LLUUID& uuid, void* user_data, S32 status, LLExtStat ext_status); static void onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status); +#endif public: static LLPreviewLSL* getInstance(const LLUUID& uuid); LLTextEditor* getEditor() { return mScriptEd->mEditor; } @@ -275,10 +279,12 @@ protected: const LLUUID& task_id, const LLUUID& item_id, BOOL is_running); +#if 0 //Client side compiling disabled. void uploadAssetLegacy(const std::string& filename, LLViewerObject* object, const LLTransactionID& tid, BOOL is_running); +#endif // virtual BOOL canSaveAs() const; virtual void saveAs(); @@ -292,8 +298,10 @@ protected: static void onLoadComplete(LLVFS *vfs, const LLUUID& asset_uuid, LLAssetType::EType type, void* user_data, S32 status, LLExtStat ext_status); +#if 0 //Client side compiling disabled. static void onSaveTextComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status); static void onSaveBytecodeComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status); +#endif static void onRunningCheckboxClicked(LLUICtrl*, void* userdata); static void onReset(void* userdata); diff --git a/indra/newview/skins/default/xui/en-us/strings.xml b/indra/newview/skins/default/xui/en-us/strings.xml index 2c44dcd14..e2b5ddcb3 100644 --- a/indra/newview/skins/default/xui/en-us/strings.xml +++ b/indra/newview/skins/default/xui/en-us/strings.xml @@ -3115,6 +3115,7 @@ Drag folders to this area and click "Send to Marketplace" to list them for sale Script not found on server. Problem downloading Sim lacking UpdateScriptTask capabilities. Unable to request recompile + Error writing to local file. Is your hard drive full? Insufficient permissions to download a script. Insufficient permissions for Unknown failure to download