From 8e4e72ceb7a4c02e7196dc9cf69c60de93fb17f7 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 26 Oct 2022 02:02:02 +0300 Subject: SL-18440 fix for sorting by "Date" column --- indra/newview/llfloateravatarrendersettings.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloateravatarrendersettings.cpp b/indra/newview/llfloateravatarrendersettings.cpp index b8f854feb3..8b28f6941e 100644 --- a/indra/newview/llfloateravatarrendersettings.cpp +++ b/indra/newview/llfloateravatarrendersettings.cpp @@ -89,6 +89,7 @@ BOOL LLFloaterAvatarRenderSettings::postBuild() LLFloater::postBuild(); mAvatarSettingsList = getChild("render_settings_list"); mAvatarSettingsList->setRightMouseDownCallback(boost::bind(&LLFloaterAvatarRenderSettings::onAvatarListRightClick, this, _1, _2, _3)); + mAvatarSettingsList->setAlternateSort(); getChild("people_filter_input")->setCommitCallback(boost::bind(&LLFloaterAvatarRenderSettings::onFilterEdit, this, _2)); return TRUE; @@ -138,8 +139,8 @@ void LLFloaterAvatarRenderSettings::updateList() item_params.columns.add().value(av_name.getCompleteName()).column("name"); std::string setting = getString(iter->second == 1 ? "av_never_render" : "av_always_render"); item_params.columns.add().value(setting).column("setting"); - std::string timestamp = createTimestamp(LLRenderMuteList::getInstance()->getVisualMuteDate(iter->first)); - item_params.columns.add().value(timestamp).column("timestamp"); + S32 mute_date = LLRenderMuteList::getInstance()->getVisualMuteDate(iter->first); + item_params.columns.add().value(createTimestamp(mute_date)).column("timestamp").alt_value(std::to_string(mute_date)); mAvatarSettingsList->addNameItemRow(item_params); } } -- cgit v1.2.3 From 9e227a2c6d2c585f9b9ddefb25e6a2f65d9e0892 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 27 Oct 2022 01:16:06 +0300 Subject: SL-18157 Allow translation services to work in IM and group messaging --- indra/newview/llimview.cpp | 87 ++++++++++++++++------ indra/newview/llimview.h | 5 +- .../skins/default/xui/en/menu_participant_view.xml | 2 +- 3 files changed, 69 insertions(+), 25 deletions(-) (limited to 'indra') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 4d6ebf9cbb..9be00d1736 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -41,6 +41,7 @@ #include "llstring.h" #include "lltextutil.h" #include "lltrans.h" +#include "lltranslate.h" #include "lluictrlfactory.h" #include "llfloaterimsessiontab.h" #include "llagent.h" @@ -510,6 +511,31 @@ void chatterBoxInvitationCoro(std::string url, LLUUID sessionId, LLIMMgr::EInvit } +void translateSuccess(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, const std::string& utf8_text, + bool log2file, std::string originalMsg, std::string expectLang, std::string translation, const std::string detected_language) +{ + std::string message_txt(utf8_text); + // filter out non-interesting responses + if (!translation.empty() + && ((detected_language.empty()) || (expectLang != detected_language)) + && (LLStringUtil::compareInsensitive(translation, originalMsg) != 0)) + { + message_txt += " (" + LLTranslate::removeNoTranslateTags(translation) + ")"; + } + + LLIMModel::getInstance()->processAddingMessage(session_id, from, from_id, message_txt, log2file); +} + +void translateFailure(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, const std::string& utf8_text, + bool log2file, int status, const std::string err_msg) +{ + std::string message_txt(utf8_text); + std::string msg = LLTrans::getString("TranslationFailed", LLSD().with("[REASON]", err_msg)); + LLStringUtil::replaceString(msg, "\n", " "); // we want one-line error messages + message_txt += " (" + msg + ")"; + + LLIMModel::getInstance()->processAddingMessage(session_id, from, from_id, message_txt, log2file); +} LLIMModel::LLIMModel() { @@ -1188,39 +1214,56 @@ bool LLIMModel::logToFile(const std::string& file_name, const std::string& from, } } -bool LLIMModel::proccessOnlineOfflineNotification( +void LLIMModel::proccessOnlineOfflineNotification( const LLUUID& session_id, const std::string& utf8_text) { // Add system message to history - return addMessage(session_id, SYSTEM_FROM, LLUUID::null, utf8_text); + addMessage(session_id, SYSTEM_FROM, LLUUID::null, utf8_text); } -bool LLIMModel::addMessage(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, +void LLIMModel::addMessage(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, const std::string& utf8_text, bool log2file /* = true */) { - LLIMSession* session = addMessageSilently(session_id, from, from_id, utf8_text, log2file); - if (!session) return false; + if (gSavedSettings.getBOOL("TranslateChat") && (from != SYSTEM_FROM)) + { + const std::string from_lang = ""; // leave empty to trigger autodetect + const std::string to_lang = LLTranslate::getTranslateLanguage(); + + LLTranslate::translateMessage(from_lang, to_lang, utf8_text, + boost::bind(&translateSuccess, session_id, from, from_id, utf8_text, log2file, utf8_text, from_lang, _1, _2), + boost::bind(&translateFailure, session_id, from, from_id, utf8_text, log2file, _1, _2)); + } + else + { + processAddingMessage(session_id, from, from_id, utf8_text, log2file); + } +} - //good place to add some1 to recent list - //other places may be called from message history. - if( !from_id.isNull() && - ( session->isP2PSessionType() || session->isAdHocSessionType() ) ) - LLRecentPeople::instance().add(from_id); +void LLIMModel::processAddingMessage(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, + const std::string& utf8_text, bool log2file /* = true */) +{ + LLIMSession* session = addMessageSilently(session_id, from, from_id, utf8_text, log2file); + if (!session) return; - // notify listeners - LLSD arg; - arg["session_id"] = session_id; - arg["num_unread"] = session->mNumUnread; - arg["participant_unread"] = session->mParticipantUnreadMessageCount; - arg["message"] = utf8_text; - arg["from"] = from; - arg["from_id"] = from_id; - arg["time"] = LLLogChat::timestamp(false); - arg["session_type"] = session->mSessionType; - mNewMsgSignal(arg); + //good place to add some1 to recent list + //other places may be called from message history. + if( !from_id.isNull() && + ( session->isP2PSessionType() || session->isAdHocSessionType() ) ) + LLRecentPeople::instance().add(from_id); - return true; + // notify listeners + LLSD arg; + arg["session_id"] = session_id; + arg["num_unread"] = session->mNumUnread; + arg["participant_unread"] = session->mParticipantUnreadMessageCount; + arg["message"] = utf8_text; + arg["from"] = from; + arg["from_id"] = from_id; + arg["time"] = LLLogChat::timestamp(false); + arg["session_type"] = session->mSessionType; + + mNewMsgSignal(arg); } LLIMModel::LLIMSession* LLIMModel::addMessageSilently(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index fdf9806e2e..5b9dedeac3 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -208,7 +208,8 @@ public: * and also saved into a file if log2file is specified. * It sends new message signal for each added message. */ - bool addMessage(const LLUUID& session_id, const std::string& from, const LLUUID& other_participant_id, const std::string& utf8_text, bool log2file = true); + void addMessage(const LLUUID& session_id, const std::string& from, const LLUUID& other_participant_id, const std::string& utf8_text, bool log2file = true); + void processAddingMessage(const LLUUID& session_id, const std::string& from, const LLUUID& other_participant_id, const std::string& utf8_text, bool log2file = true); /** * Similar to addMessage(...) above but won't send a signal about a new message added @@ -219,7 +220,7 @@ public: /** * Add a system message to an IM Model */ - bool proccessOnlineOfflineNotification(const LLUUID& session_id, const std::string& utf8_text); + void proccessOnlineOfflineNotification(const LLUUID& session_id, const std::string& utf8_text); /** * Get a session's name. diff --git a/indra/newview/skins/default/xui/en/menu_participant_view.xml b/indra/newview/skins/default/xui/en/menu_participant_view.xml index 7ea87ee05c..b9750284cd 100644 --- a/indra/newview/skins/default/xui/en/menu_participant_view.xml +++ b/indra/newview/skins/default/xui/en/menu_participant_view.xml @@ -90,7 +90,7 @@ parameter="conversation_log" /> - + -- cgit v1.2.3 From 449fa46b157c9cd30fd17f63a12a295da18c7b4f Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 27 Oct 2022 14:21:07 +0300 Subject: SL-18172 add the link to open object weights floater --- indra/newview/skins/default/xui/de/floater_tools.xml | 2 +- indra/newview/skins/default/xui/es/floater_tools.xml | 2 +- indra/newview/skins/default/xui/fr/floater_tools.xml | 2 +- indra/newview/skins/default/xui/it/floater_tools.xml | 2 +- indra/newview/skins/default/xui/ja/floater_tools.xml | 2 +- indra/newview/skins/default/xui/pl/floater_tools.xml | 2 +- indra/newview/skins/default/xui/pt/floater_tools.xml | 2 +- indra/newview/skins/default/xui/ru/floater_tools.xml | 2 +- indra/newview/skins/default/xui/tr/floater_tools.xml | 2 +- indra/newview/skins/default/xui/zh/floater_tools.xml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/de/floater_tools.xml b/indra/newview/skins/default/xui/de/floater_tools.xml index a4dfde66bc..f6208e11a5 100644 --- a/indra/newview/skins/default/xui/de/floater_tools.xml +++ b/indra/newview/skins/default/xui/de/floater_tools.xml @@ -40,7 +40,7 @@ Klicken und ziehen, um Land auszuwählen - [OBJ_COUNT] Objekte ausgewählt, Auswirkung auf Land [LAND_IMPACT] + [OBJ_COUNT] Objekte ausgewählt, Auswirkung auf Land [LAND_IMPACT] [secondlife:///app/openfloater/object_weights ?] Verbleibende Kapazität [LAND_CAPACITY]. diff --git a/indra/newview/skins/default/xui/es/floater_tools.xml b/indra/newview/skins/default/xui/es/floater_tools.xml index 6fce98472d..ffa85a2f04 100644 --- a/indra/newview/skins/default/xui/es/floater_tools.xml +++ b/indra/newview/skins/default/xui/es/floater_tools.xml @@ -25,7 +25,7 @@ Pulsa y arrastra para seleccionar el terreno. - [OBJ_COUNT] objetos seleccionados, impacto en el terreno [LAND_IMPACT] + [OBJ_COUNT] objetos seleccionados, impacto en el terreno [LAND_IMPACT] [secondlife:///app/openfloater/object_weights ?] Capacidad restante [LAND_CAPACITY]. diff --git a/indra/newview/skins/default/xui/fr/floater_tools.xml b/indra/newview/skins/default/xui/fr/floater_tools.xml index 9597d38dca..c161f3f530 100644 --- a/indra/newview/skins/default/xui/fr/floater_tools.xml +++ b/indra/newview/skins/default/xui/fr/floater_tools.xml @@ -40,7 +40,7 @@ Cliquez et faites glisser pour sélectionner le terrain. - [OBJ_COUNT] objets sélectionnés, impact sur le terrain [LAND_IMPACT] + [OBJ_COUNT] objets sélectionnés, impact sur le terrain [LAND_IMPACT] [secondlife:///app/openfloater/object_weights ?] Capacité restante [LAND_CAPACITY]. diff --git a/indra/newview/skins/default/xui/it/floater_tools.xml b/indra/newview/skins/default/xui/it/floater_tools.xml index a21ae9a485..f98a2da277 100644 --- a/indra/newview/skins/default/xui/it/floater_tools.xml +++ b/indra/newview/skins/default/xui/it/floater_tools.xml @@ -40,7 +40,7 @@ Clicca e trascina per selezionare il terreno - [OBJ_COUNT] oggetti selezionati, impatto terreno [LAND_IMPACT] + [OBJ_COUNT] oggetti selezionati, impatto terreno [LAND_IMPACT] [secondlife:///app/openfloater/object_weights ?] Capacità restante [LAND_CAPACITY]. diff --git a/indra/newview/skins/default/xui/ja/floater_tools.xml b/indra/newview/skins/default/xui/ja/floater_tools.xml index aec0dbdb55..13f766698e 100644 --- a/indra/newview/skins/default/xui/ja/floater_tools.xml +++ b/indra/newview/skins/default/xui/ja/floater_tools.xml @@ -40,7 +40,7 @@ 土地をクリックし、ドラッグして選択 - 選択されているオブジェクトは [OBJ_COUNT] 個、土地の負荷は [LAND_IMPACT] + 選択されているオブジェクトは [OBJ_COUNT] 個、土地の負荷は [LAND_IMPACT] [secondlife:///app/openfloater/object_weights 詳細] 残りの許容数 [LAND_CAPACITY]。 diff --git a/indra/newview/skins/default/xui/pl/floater_tools.xml b/indra/newview/skins/default/xui/pl/floater_tools.xml index 5e2ed4a351..8932a86fd1 100644 --- a/indra/newview/skins/default/xui/pl/floater_tools.xml +++ b/indra/newview/skins/default/xui/pl/floater_tools.xml @@ -40,7 +40,7 @@ Kliknij i przeciągnij, aby zaznaczyć teren - [OBJ_COUNT] zaznaczonych obiektów, wpływ na strefę: [LAND_IMPACT] + [OBJ_COUNT] zaznaczonych obiektów, wpływ na strefę: [LAND_IMPACT] [secondlife:///app/openfloater/object_weights ?] Pojemność pozostała: [LAND_CAPACITY]. diff --git a/indra/newview/skins/default/xui/pt/floater_tools.xml b/indra/newview/skins/default/xui/pt/floater_tools.xml index 0882f485a6..c0eab171c8 100644 --- a/indra/newview/skins/default/xui/pt/floater_tools.xml +++ b/indra/newview/skins/default/xui/pt/floater_tools.xml @@ -40,7 +40,7 @@ Clicar e arrastar para selecionar a terra - [OBJ_COUNT] objetos selecionados, impacto no terreno [LAND_IMPACT] + [OBJ_COUNT] objetos selecionados, impacto no terreno [LAND_IMPACT] [secondlife:///app/openfloater/object_weights ?] Capacidade restante [LAND_CAPACITY]. diff --git a/indra/newview/skins/default/xui/ru/floater_tools.xml b/indra/newview/skins/default/xui/ru/floater_tools.xml index 82ee3c49ae..44f54aabb6 100644 --- a/indra/newview/skins/default/xui/ru/floater_tools.xml +++ b/indra/newview/skins/default/xui/ru/floater_tools.xml @@ -40,7 +40,7 @@ Щелкните и перетащите для выделения земли - Выбрано объектов: [OBJ_COUNT], влияние на землю [LAND_IMPACT] + Выбрано объектов: [OBJ_COUNT], влияние на землю [LAND_IMPACT] [secondlife:///app/openfloater/object_weights ?] Остаток емкости [LAND_CAPACITY]. diff --git a/indra/newview/skins/default/xui/tr/floater_tools.xml b/indra/newview/skins/default/xui/tr/floater_tools.xml index d6b9a4a533..d48a617e38 100644 --- a/indra/newview/skins/default/xui/tr/floater_tools.xml +++ b/indra/newview/skins/default/xui/tr/floater_tools.xml @@ -40,7 +40,7 @@ Araziyi seçmek için tıklayın ve sürükleyin - [OBJ_COUNT] nesne seçili, [LAND_IMPACT] arazi etkisi + [OBJ_COUNT] nesne seçili, [LAND_IMPACT] arazi etkisi [secondlife:///app/openfloater/object_weights Ek bilgi] Kalan kapasite [LAND_CAPACITY]. diff --git a/indra/newview/skins/default/xui/zh/floater_tools.xml b/indra/newview/skins/default/xui/zh/floater_tools.xml index 539c7454f1..f83b058ce1 100644 --- a/indra/newview/skins/default/xui/zh/floater_tools.xml +++ b/indra/newview/skins/default/xui/zh/floater_tools.xml @@ -40,7 +40,7 @@ 按住並拖曳,可以選取土地 - 選取了 [OBJ_COUNT] 個物件,土地衝擊量 [LAND_IMPACT] + 選取了 [OBJ_COUNT] 個物件,土地衝擊量 [LAND_IMPACT] [secondlife:///app/openfloater/object_weights 詳情] 剩餘容納量 [LAND_CAPACITY]。 -- cgit v1.2.3 From 27f7edeedbbf65086e4a6ba28724f8a80c48bcd0 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 28 Oct 2022 19:55:40 +0300 Subject: SL-16534 The link item is not updating after rezzing the linked object in-world --- indra/newview/llinventoryfunctions.cpp | 6 ++++- indra/newview/llinventorymodel.cpp | 41 +++++++++++++++++----------------- indra/newview/llinventorymodel.h | 2 +- 3 files changed, 27 insertions(+), 22 deletions(-) (limited to 'indra') diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 27edc8148e..dab1e5c38d 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -529,7 +529,11 @@ BOOL get_is_item_worn(const LLUUID& id) const LLViewerInventoryItem* item = gInventory.getItem(id); if (!item) return FALSE; - + + if (item->getIsLinkType() && !gInventory.getItem(item->getLinkedUUID())) + { + return FALSE; + } // Consider the item as worn if it has links in COF. if (LLAppearanceMgr::instance().isLinkedInCOF(id)) { diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index fab7ae8f1a..cf0219e76e 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -1636,6 +1636,8 @@ void LLInventoryModel::deleteObject(const LLUUID& id, bool fix_broken_links, boo LL_WARNS(LOG_INV) << "Deleting non-existent object [ id: " << id << " ] " << LL_ENDL; return; } + + LLInventoryModel::item_array_t links = collectLinksTo(id); LL_DEBUGS(LOG_INV) << "Deleting inventory object " << id << LL_ENDL; mLastItem = NULL; @@ -1694,7 +1696,7 @@ void LLInventoryModel::deleteObject(const LLUUID& id, bool fix_broken_links, boo obj = NULL; // delete obj if (fix_broken_links && !is_link_type) { - updateLinkedObjectsFromPurge(id); + rebuildLinkItems(links); } if (do_notify_observers) { @@ -1702,26 +1704,25 @@ void LLInventoryModel::deleteObject(const LLUUID& id, bool fix_broken_links, boo } } -void LLInventoryModel::updateLinkedObjectsFromPurge(const LLUUID &baseobj_id) +void LLInventoryModel::rebuildLinkItems(LLInventoryModel::item_array_t& items) { - LLInventoryModel::item_array_t item_array = collectLinksTo(baseobj_id); - - // REBUILD is expensive, so clear the current change list first else - // everything else on the changelist will also get rebuilt. - if (item_array.size() > 0) - { - notifyObservers(); - for (LLInventoryModel::item_array_t::const_iterator iter = item_array.begin(); - iter != item_array.end(); - iter++) - { - const LLViewerInventoryItem *linked_item = (*iter); - const LLUUID &item_id = linked_item->getUUID(); - if (item_id == baseobj_id) continue; - addChangedMask(LLInventoryObserver::REBUILD, item_id); - } - notifyObservers(); - } + // REBUILD is expensive, so clear the current change list first else + // everything else on the changelist will also get rebuilt. + if (items.size() > 0) + { + notifyObservers(); + for (LLInventoryModel::item_array_t::const_iterator iter = items.begin(); + iter != items.end(); + iter++) + { + const LLViewerInventoryItem *linked_item = (*iter); + if (linked_item) + { + addChangedMask(LLInventoryObserver::REBUILD, linked_item->getUUID()); + } + } + notifyObservers(); + } } // Add/remove an observer. If the observer is destroyed, be sure to diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index c4133ff9bb..685c2c0fe5 100644 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -445,7 +445,7 @@ public: void checkTrashOverflow(); protected: - void updateLinkedObjectsFromPurge(const LLUUID& baseobj_id); + void rebuildLinkItems(LLInventoryModel::item_array_t& items); //-------------------------------------------------------------------- // Reorder -- cgit v1.2.3 From 10fcee5be60fe9a5e87e4202e894466476b24b28 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 3 Nov 2022 20:03:55 +0200 Subject: SL-18492 Switch inventory script compiler default from LSO to mono --- indra/newview/llinventorymodel.cpp | 1 + indra/newview/llviewerassetupload.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index cf0219e76e..58925dfce6 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -1637,6 +1637,7 @@ void LLInventoryModel::deleteObject(const LLUUID& id, bool fix_broken_links, boo return; } + //collect the links before removing the item from mItemMap LLInventoryModel::item_array_t links = collectLinksTo(id); LL_DEBUGS(LOG_INV) << "Deleting inventory object " << id << LL_ENDL; diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp index 14fae8d035..7bdb611eb7 100644 --- a/indra/newview/llviewerassetupload.cpp +++ b/indra/newview/llviewerassetupload.cpp @@ -704,7 +704,7 @@ LLUUID LLBufferedAssetUploadInfo::finishUpload(LLSD &result) LLScriptAssetUpload::LLScriptAssetUpload(LLUUID itemId, std::string buffer, invnUploadFinish_f finish): LLBufferedAssetUploadInfo(itemId, LLAssetType::AT_LSL_TEXT, buffer, finish), mExerienceId(), - mTargetType(LSL2), + mTargetType(MONO), mIsRunning(false) { } @@ -725,7 +725,7 @@ LLSD LLScriptAssetUpload::generatePostBody() if (getTaskId().isNull()) { body["item_id"] = getItemId(); - body["target"] = "lsl2"; + body["target"] = "mono"; } else { -- cgit v1.2.3 From 549c6375f1ac3e1a165475279558a6d598333c0e Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 4 Nov 2022 18:18:46 +0200 Subject: SL-7277 show Advanced permissions in Item profile that was opened from inventory --- .../skins/default/xui/en/sidepanel_item_info.xml | 68 +++++++++++++++++++++- 1 file changed, 66 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml index 9a68479d05..ff7ea08251 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml @@ -461,8 +461,72 @@ max_val="999999999" top_pad="10" tool_tip="Object cost." /> - - + + B: + + + O: + + + G: + + + E: + + + N: + + Date: Thu, 10 Nov 2022 19:40:57 +0200 Subject: SL-18426 At log in only a part friends reported to chat as online Server sends updates in bulk now, so notify per agent instead of per update --- indra/newview/llcallingcard.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp index 1ad2157df0..193d368b83 100644 --- a/indra/newview/llcallingcard.cpp +++ b/indra/newview/llcallingcard.cpp @@ -719,11 +719,12 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online) // we were tracking someone who went offline deleteTrackingData(); } - } - if(chat_notify) - { - // Look up the name of this agent for the notification - LLAvatarNameCache::get(agent_id,boost::bind(&on_avatar_name_cache_notify,_1, _2, online, payload)); + + if(chat_notify) + { + // Look up the name of this agent for the notification + LLAvatarNameCache::get(agent_id,boost::bind(&on_avatar_name_cache_notify,_1, _2, online, payload)); + } } mModifyMask |= LLFriendObserver::ONLINE; -- cgit v1.2.3 From 333786d2ba3dc3b1771a9286c1e8c60152ed7037 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Thu, 17 Nov 2022 17:21:37 +0200 Subject: SL-18644 reset 'All items' filter when using 'Find Original' in Recent tab --- indra/newview/llinventoryfunctions.cpp | 2 +- indra/newview/llpanelmaininventory.cpp | 12 ++++++++++++ indra/newview/llpanelmaininventory.h | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index dab1e5c38d..f454ca5bfb 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -791,7 +791,7 @@ void show_item_original(const LLUUID& item_uuid) LLPanelMainInventory* main_inventory = sidepanel_inventory->getMainInventoryPanel(); if (main_inventory) { - main_inventory->resetFilters(); + main_inventory->resetAllItemsFilters(); } reset_inventory_filter(); diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 89256b40c4..ccda9c2399 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -403,6 +403,18 @@ void LLPanelMainInventory::resetFilters() setFilterTextFromFilter(); } +void LLPanelMainInventory::resetAllItemsFilters() +{ + LLFloaterInventoryFinder *finder = getFinder(); + getAllItemsPanel()->getFilter().resetDefault(); + if (finder) + { + finder->updateElementsFromFilter(); + } + + setFilterTextFromFilter(); +} + void LLPanelMainInventory::setSortBy(const LLSD& userdata) { U32 sort_order_mask = getActivePanel()->getSortOrder(); diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h index 257bce930c..7aae5a0b3c 100644 --- a/indra/newview/llpanelmaininventory.h +++ b/indra/newview/llpanelmaininventory.h @@ -96,6 +96,7 @@ public: void toggleFindOptions(); void resetFilters(); + void resetAllItemsFilters(); protected: // -- cgit v1.2.3 From d57e95da968f74f869063caad524fd4182593159 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 18 Nov 2022 14:21:58 +0200 Subject: SL-18528 Clear cached MFA token when Remember Password is unchecked in viewer --- indra/newview/llpanellogin.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'indra') diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 9df3a8e31a..b14fdbf38e 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -1103,6 +1103,18 @@ void LLPanelLogin::onRememberPasswordCheck(void*) if (sInstance) { gSavedSettings.setBOOL("UpdateRememberPasswordSetting", TRUE); + + LLPointer cred; + bool remember_user, remember_password; + getFields(cred, remember_user, remember_password); + + std::string grid(LLGridManager::getInstance()->getGridId()); + std::string user_id(cred->userID()); + if (!remember_password) + { + gSecAPIHandler->removeFromProtectedMap("mfa_hash", grid, user_id); + gSecAPIHandler->syncProtectedMap(); + } } } -- cgit v1.2.3 From 9c5043d8c62ae0d321d01560098edf67bf17ebf7 Mon Sep 17 00:00:00 2001 From: Henri Beauchamp Date: Sat, 19 Nov 2022 21:42:41 +0100 Subject: Fix a thread safety issue in the GL image worker. LLViewerTexture::mNeedsCreateTexture needs to be an attomic bool since it is written both in the main thread and in the GL image worker thread. We can now enable threaded bump maps creation as a result of this fix. I have read the CLA Document and I hereby sign the CLA --- indra/newview/lldrawpoolbump.cpp | 4 +++- indra/newview/llviewertexture.cpp | 16 ++++++++-------- indra/newview/llviewertexture.h | 5 ++++- 3 files changed, 15 insertions(+), 10 deletions(-) (limited to 'indra') diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index 8db6a10e26..ed991a2bbf 100644 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -77,7 +77,9 @@ static S32 cube_channel = -1; static S32 diffuse_channel = -1; static S32 bump_channel = -1; -#define LL_BUMPLIST_MULTITHREADED 0 // TODO -- figure out why this doesn't work +// Enabled after changing LLViewerTexture::mNeedsCreateTexture to an +// LLAtomicBool; this should work just fine, now. HB +#define LL_BUMPLIST_MULTITHREADED 1 // static void LLStandardBumpmap::init() diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index e3ac56d0d3..8a11c5cf8f 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1118,7 +1118,7 @@ void LLViewerFetchedTexture::init(bool firstinit) mLoadedCallbackDesiredDiscardLevel = S8_MAX; mPauseLoadedCallBacks = FALSE; - mNeedsCreateTexture = FALSE; + mNeedsCreateTexture = false; mIsRawImageValid = FALSE; mRawDiscardLevel = INVALID_DISCARD_LEVEL; @@ -1400,12 +1400,12 @@ void LLViewerFetchedTexture::addToCreateTexture() { //just update some variables, not to create a real GL texture. createGLTexture(mRawDiscardLevel, mRawImage, 0, FALSE); - mNeedsCreateTexture = FALSE; + mNeedsCreateTexture = false; destroyRawImage(); } else if(!force_update && getDiscardLevel() > -1 && getDiscardLevel() <= mRawDiscardLevel) { - mNeedsCreateTexture = FALSE; + mNeedsCreateTexture = false; destroyRawImage(); } else @@ -1441,7 +1441,7 @@ void LLViewerFetchedTexture::addToCreateTexture() mRawDiscardLevel += i; if(mRawDiscardLevel >= getDiscardLevel() && getDiscardLevel() > 0) { - mNeedsCreateTexture = FALSE; + mNeedsCreateTexture = false; destroyRawImage(); return; } @@ -1473,7 +1473,7 @@ BOOL LLViewerFetchedTexture::preCreateTexture(S32 usename/*= 0*/) destroyRawImage(); return FALSE; } - mNeedsCreateTexture = FALSE; + mNeedsCreateTexture = false; if (mRawImage.isNull()) { @@ -1609,14 +1609,14 @@ void LLViewerFetchedTexture::postCreateTexture() destroyRawImage(); } - mNeedsCreateTexture = FALSE; + mNeedsCreateTexture = false; } void LLViewerFetchedTexture::scheduleCreateTexture() { if (!mNeedsCreateTexture) { - mNeedsCreateTexture = TRUE; + mNeedsCreateTexture = true; if (preCreateTexture()) { #if LL_IMAGEGL_THREAD_CHECK @@ -1630,7 +1630,7 @@ void LLViewerFetchedTexture::scheduleCreateTexture() memcpy(data_copy, data, size); } #endif - mNeedsCreateTexture = TRUE; + mNeedsCreateTexture = true; auto mainq = LLImageGLThread::sEnabled ? mMainQueue.lock() : nullptr; if (mainq) { diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index b953d7006b..2f5e0d01df 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -27,6 +27,7 @@ #ifndef LL_LLVIEWERTEXTURE_H #define LL_LLVIEWERTEXTURE_H +#include "llatomic.h" #include "llgltexture.h" #include "lltimer.h" #include "llframetimer.h" @@ -528,7 +529,9 @@ protected: LLFrameTimer mStopFetchingTimer; // Time since mDecodePriority == 0.f. BOOL mInImageList; // TRUE if image is in list (in which case don't reset priority!) - BOOL mNeedsCreateTexture; + // This needs to be atomic, since it is written both in the main thread + // and in the GL image worker thread... HB + LLAtomicBool mNeedsCreateTexture; BOOL mForSculpt ; //a flag if the texture is used as sculpt data. BOOL mIsFetched ; //is loaded from remote or from cache, not generated locally. -- cgit v1.2.3 From d01f7afff206dd610b6c209e6bd69d646b47863f Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko <118780484+maxim-productengine@users.noreply.github.com> Date: Fri, 25 Nov 2022 18:16:31 +0200 Subject: SL-18713 fix crash in handleCompositionMessage (#12) --- indra/llwindow/llwindowwin32.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra') diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index c487877caf..740224adf9 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -4100,6 +4100,10 @@ void LLWindowWin32::handleStartCompositionMessage() void LLWindowWin32::handleCompositionMessage(const U32 indexes) { + if (!mPreeditor) + { + return; + } BOOL needs_update = FALSE; LLWString result_string; LLWString preedit_string; -- cgit v1.2.3 From e01486715aa83e513f247c6db99b95cde47f433d Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 25 Nov 2022 23:58:27 +0200 Subject: SL-18101 MoaP Reset button should reset the Current URL --- indra/newview/llpanelmediasettingsgeneral.cpp | 31 +++++++++++++++++++--- .../xui/en/panel_media_settings_general.xml | 5 +--- 2 files changed, 29 insertions(+), 7 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp index e1818cc68b..b9cb534034 100644 --- a/indra/newview/llpanelmediasettingsgeneral.cpp +++ b/indra/newview/llpanelmediasettingsgeneral.cpp @@ -39,6 +39,7 @@ #include "llagent.h" #include "llviewerwindow.h" #include "llviewermedia.h" +#include "llvovolume.h" #include "llsdutil.h" #include "llselectmgr.h" #include "llbutton.h" @@ -452,9 +453,16 @@ bool LLPanelMediaSettingsGeneral::navigateHomeSelectedFace(bool only_if_current_ { viewer_media_t media_impl = LLViewerMedia::getInstance()->getMediaImplFromTextureID(object->getTE(face)->getMediaData()->getMediaID()); - if(media_impl) - { - media_impl->navigateHome(); + if (media_impl) + { + media_impl->navigateHome(); + + if (!only_if_current_is_empty) + { + LLSD media_data; + media_data[LLMediaEntry::CURRENT_URL_KEY] = std::string(); + object->getTE(face)->mergeIntoMediaData(media_data); + } return true; } } @@ -470,6 +478,23 @@ bool LLPanelMediaSettingsGeneral::navigateHomeSelectedFace(bool only_if_current_ LLObjectSelectionHandle selected_objects =LLSelectMgr::getInstance()->getSelection(); selected_objects->getSelectedTEValue( &functor_navigate_media, all_face_media_navigated ); + if (all_face_media_navigated) + { + struct functor_sync_to_server : public LLSelectedObjectFunctor + { + virtual bool apply(LLViewerObject* object) + { + LLVOVolume *volume = dynamic_cast(object); + if (volume) + { + volume->sendMediaDataUpdate(); + } + return true; + } + } sendfunc; + selected_objects->applyToObjects(&sendfunc); + } + // Note: we don't update the 'current URL' field until the media data itself changes return all_face_media_navigated; diff --git a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml index 2316beeb36..4c566dc60a 100644 --- a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml +++ b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml @@ -92,10 +92,7 @@ label="Reset" left_delta="233" name="current_url_reset_btn" - width="110" > - - + width="110"/> Date: Fri, 2 Dec 2022 00:45:34 +0200 Subject: SL-18734 certain links are not displayed appropriately --- indra/llui/llurlentry.cpp | 1 + indra/llui/llurlregistry.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 1547a4ba5c..6a9070634c 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -206,6 +206,7 @@ bool LLUrlEntryBase::isWikiLinkCorrect(const std::string &labeled_url) const { return (chr == L'\u02D0') // "Modifier Letter Colon" || (chr == L'\uFF1A') // "Fullwidth Colon" + || (chr == L'\u2236') // "Ratio" || (chr == L'\uFE55'); // "Small Colon" }, L'\u003A'); // Colon diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp index c9d7013a11..23f3dca3fb 100644 --- a/indra/llui/llurlregistry.cpp +++ b/indra/llui/llurlregistry.cpp @@ -169,7 +169,7 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL for (it = mUrlEntry.begin(); it != mUrlEntry.end(); ++it) { //Skip for url entry icon if content is not trusted - if(!is_content_trusted && (mUrlEntryIcon == *it)) + if((mUrlEntryIcon == *it) && ((text.find("Hand") != std::string::npos) || !is_content_trusted)) { continue; } -- cgit v1.2.3 From 120d9c16fa08add7d5945cdcbc7af707a1d8cf2b Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 7 Dec 2022 03:39:35 +0200 Subject: SL-18776 Avatar picker search not updated on http error --- indra/newview/llfloateravatarpicker.cpp | 130 +++++++++++++++++--------------- 1 file changed, 71 insertions(+), 59 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp index 0186c4aebe..7cd2e0146a 100644 --- a/indra/newview/llfloateravatarpicker.cpp +++ b/indra/newview/llfloateravatarpicker.cpp @@ -428,13 +428,18 @@ void LLFloaterAvatarPicker::findCoro(std::string url, LLUUID queryID, std::strin if (status || (status == LLCore::HttpStatus(HTTP_BAD_REQUEST))) { - LLFloaterAvatarPicker* floater = - LLFloaterReg::findTypedInstance("avatar_picker", name); - if (floater) - { - result.erase(LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS); - floater->processResponse(queryID, result); - } + result.erase(LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS); + } + else + { + result["failure_reason"] = status.toString(); + } + + LLFloaterAvatarPicker* floater = + LLFloaterReg::findTypedInstance("avatar_picker", name); + if (floater) + { + floater->processResponse(queryID, result); } } @@ -672,59 +677,66 @@ void LLFloaterAvatarPicker::processResponse(const LLUUID& query_id, const LLSD& { LLScrollListCtrl* search_results = getChild("SearchResults"); - LLSD agents = content["agents"]; - - // clear "Searching" label on first results - search_results->deleteAllItems(); - - LLSD item; - LLSD::array_const_iterator it = agents.beginArray(); - for ( ; it != agents.endArray(); ++it) - { - const LLSD& row = *it; - if (row["id"].asUUID() != gAgent.getID() || !mExcludeAgentFromSearchResults) - { - item["id"] = row["id"]; - LLSD& columns = item["columns"]; - columns[0]["column"] = "name"; - columns[0]["value"] = row["display_name"]; - columns[1]["column"] = "username"; - columns[1]["value"] = row["username"]; - search_results->addElement(item); - - // add the avatar name to our list - LLAvatarName avatar_name; - avatar_name.fromLLSD(row); - sAvatarNameMap[row["id"].asUUID()] = avatar_name; - } - } + // clear "Searching" label on first results + search_results->deleteAllItems(); - if (search_results->isEmpty()) - { - std::string name = "'" + getChild("Edit")->getValue().asString() + "'"; - LLSD item; - item["id"] = LLUUID::null; - item["columns"][0]["column"] = "name"; - item["columns"][0]["value"] = name; - item["columns"][1]["column"] = "username"; - item["columns"][1]["value"] = getString("not_found_text"); - search_results->addElement(item); - search_results->setEnabled(false); - getChildView("ok_btn")->setEnabled(false); - } - else - { - getChildView("ok_btn")->setEnabled(true); - search_results->setEnabled(true); - search_results->sortByColumnIndex(1, TRUE); - std::string text = getChild("Edit")->getValue().asString(); - if (!search_results->selectItemByLabel(text, TRUE, 1)) - { - search_results->selectFirstItem(); - } - onList(); - search_results->setFocus(TRUE); - } + if (content.has("agents")) + { + LLSD agents = content["agents"]; + + LLSD item; + LLSD::array_const_iterator it = agents.beginArray(); + for (; it != agents.endArray(); ++it) + { + const LLSD& row = *it; + if (row["id"].asUUID() != gAgent.getID() || !mExcludeAgentFromSearchResults) + { + item["id"] = row["id"]; + LLSD& columns = item["columns"]; + columns[0]["column"] = "name"; + columns[0]["value"] = row["display_name"]; + columns[1]["column"] = "username"; + columns[1]["value"] = row["username"]; + search_results->addElement(item); + + // add the avatar name to our list + LLAvatarName avatar_name; + avatar_name.fromLLSD(row); + sAvatarNameMap[row["id"].asUUID()] = avatar_name; + } + } + + if (search_results->isEmpty()) + { + std::string name = "'" + getChild("Edit")->getValue().asString() + "'"; + LLSD item; + item["id"] = LLUUID::null; + item["columns"][0]["column"] = "name"; + item["columns"][0]["value"] = name; + item["columns"][1]["column"] = "username"; + item["columns"][1]["value"] = getString("not_found_text"); + search_results->addElement(item); + search_results->setEnabled(false); + getChildView("ok_btn")->setEnabled(false); + } + else + { + getChildView("ok_btn")->setEnabled(true); + search_results->setEnabled(true); + search_results->sortByColumnIndex(1, TRUE); + std::string text = getChild("Edit")->getValue().asString(); + if (!search_results->selectItemByLabel(text, TRUE, 1)) + { + search_results->selectFirstItem(); + } + onList(); + search_results->setFocus(TRUE); + } + } + else if (content.has("failure_reason")) + { + getChild("SearchResults")->setCommentText(content["failure_reason"].asString()); + } } } -- cgit v1.2.3 From 3d6c4036a605588e0c12c4a09d4d50cd9990ae8e Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 7 Dec 2022 08:55:45 +0200 Subject: SL-18799 Crash at requestPostCapability --- indra/newview/llagent.cpp | 2 +- indra/newview/llinventorymodelbackgroundfetch.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 5250369813..39506d62e8 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -2914,7 +2914,7 @@ bool LLAgent::requestPostCapability(const std::string &capName, LLSD &postData, { std::string url; - url = getRegion()->getCapability(capName); + url = getRegionCapability(capName); if (url.empty()) { diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp index 406c8b89d0..4a9b471a47 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -363,7 +363,7 @@ void LLInventoryModelBackgroundFetch::bulkFetch() //If there are items in mFetchQueue, we want to check the time since the last bulkFetch was //sent. If it exceeds our retry time, go ahead and fire off another batch. LLViewerRegion * region(gAgent.getRegion()); - if (! region || gDisconnected) + if (! region || gDisconnected || LLApp::isExiting()) { return; } -- cgit v1.2.3 From 71926db3a5bed6d4984619b4e587402c9e556516 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 7 Dec 2022 12:55:55 +0200 Subject: SL-18800 fix crash in removeMutedAVsLights --- indra/newview/pipeline.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 96ba80dacc..b2010cc189 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -1776,7 +1776,9 @@ void LLPipeline::removeMutedAVsLights(LLVOAvatar* muted_avatar) for (light_set_t::iterator iter = gPipeline.mNearbyLights.begin(); iter != gPipeline.mNearbyLights.end(); iter++) { - if (iter->drawable->getVObj()->isAttachment() && iter->drawable->getVObj()->getAvatar() == muted_avatar) + const LLViewerObject *vobj = iter->drawable->getVObj(); + if (vobj && vobj->getAvatar() + && vobj->isAttachment() && vobj->getAvatar() == muted_avatar) { gPipeline.mLights.erase(iter->drawable); gPipeline.mNearbyLights.erase(iter); -- cgit v1.2.3 From 823dbc880540a789c5768930e0dffafd7c4a0269 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 7 Dec 2022 19:33:12 +0200 Subject: SL-18801 Crash at LLPluginProcessParent::pollTick() Looks like pollTick tried to call an already dead process --- indra/llcommon/llprocess.cpp | 8 ++++++++ indra/llplugin/llpluginprocessparent.cpp | 5 +++++ indra/newview/llviewerobjectlist.cpp | 5 ++++- 3 files changed, 17 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llcommon/llprocess.cpp b/indra/llcommon/llprocess.cpp index 23936f0526..97a38ea992 100644 --- a/indra/llcommon/llprocess.cpp +++ b/indra/llcommon/llprocess.cpp @@ -272,6 +272,14 @@ public: boost::bind(&ReadPipeImpl::tick, this, _1)); } + ~ReadPipeImpl() + { + if (mConnection.connected()) + { + mConnection.disconnect(); + } + } + // Much of the implementation is simply connecting the abstract virtual // methods with implementation data concealed from the base class. virtual std::istream& get_istream() { return mStream; } diff --git a/indra/llplugin/llpluginprocessparent.cpp b/indra/llplugin/llpluginprocessparent.cpp index 1fbbad06d4..756d0b5db8 100644 --- a/indra/llplugin/llpluginprocessparent.cpp +++ b/indra/llplugin/llpluginprocessparent.cpp @@ -162,6 +162,11 @@ LLPluginProcessParent::~LLPluginProcessParent() { // If we are quitting, the network sockets will already have been destroyed. killSockets(); } + + if (mPolling.connected()) + { + mPolling.disconnect(); + } } /*static*/ diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index e930b58111..efc4ded79e 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -815,7 +815,10 @@ void LLViewerObjectList::updateApparentAngles(LLAgent &agent) { virtual bool apply(LLViewerObject* objectp) { - objectp->boostTexturePriority(); + if (objectp) + { + objectp->boostTexturePriority(); + } return true; } } func; -- cgit v1.2.3 From 8496ae48dd4c5265f4d8007c394fbdf16640d8a2 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Thu, 8 Dec 2022 15:07:10 +0200 Subject: SL-18807 FIXED Viewer crashes when trying to purge item using 'Pick: Select settings' floater --- indra/newview/llinventorypanel.cpp | 17 +++++++---------- indra/newview/llinventorypanel.h | 2 +- 2 files changed, 8 insertions(+), 11 deletions(-) (limited to 'indra') diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 6b102c7500..0e3db51d2a 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -1622,6 +1622,7 @@ void LLInventoryPanel::purgeSelectedItems() if (inventory_selected.empty()) return; LLSD args; S32 count = inventory_selected.size(); + std::vector selected_items; for (std::set::const_iterator it = inventory_selected.begin(), end_it = inventory_selected.end(); it != end_it; ++it) @@ -1631,27 +1632,23 @@ void LLInventoryPanel::purgeSelectedItems() LLInventoryModel::item_array_t items; gInventory.collectDescendents(item_id, cats, items, LLInventoryModel::INCLUDE_TRASH); count += items.size() + cats.size(); + selected_items.push_back(item_id); } args["COUNT"] = count; - LLNotificationsUtil::add("PurgeSelectedItems", args, LLSD(), boost::bind(&LLInventoryPanel::callbackPurgeSelectedItems, this, _1, _2)); + LLNotificationsUtil::add("PurgeSelectedItems", args, LLSD(), boost::bind(callbackPurgeSelectedItems, _1, _2, selected_items)); } -void LLInventoryPanel::callbackPurgeSelectedItems(const LLSD& notification, const LLSD& response) +// static +void LLInventoryPanel::callbackPurgeSelectedItems(const LLSD& notification, const LLSD& response, const std::vector inventory_selected) { - if (!mFolderRoot.get()) return; - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option == 0) { - const std::set inventory_selected = mFolderRoot.get()->getSelectionList(); if (inventory_selected.empty()) return; - std::set::const_iterator it = inventory_selected.begin(); - const std::set::const_iterator it_end = inventory_selected.end(); - for (; it != it_end; ++it) + for (auto it : inventory_selected) { - LLUUID item_id = static_cast((*it)->getViewModelItem())->getUUID(); - remove_inventory_object(item_id, NULL); + remove_inventory_object(it, NULL); } } } diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index 552c61b915..2c782a5ea7 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -260,7 +260,7 @@ public: // Clean up stuff when the folder root gets deleted void clearFolderRoot(); - void callbackPurgeSelectedItems(const LLSD& notification, const LLSD& response); + static void callbackPurgeSelectedItems(const LLSD& notification, const LLSD& response, const std::vector inventory_selected); protected: void openStartFolderOrMyInventory(); // open the first level of inventory -- cgit v1.2.3 From b79c4e47a80e4e4aba01475cdd2e65cbaf6385a6 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 9 Dec 2022 07:44:27 +0200 Subject: SL-18776 Fix handling for an empty avatar list --- indra/newview/llfloateravatarpicker.cpp | 11 ++++++----- .../default/xui/en/floater_inventory_item_properties.xml | 1 - indra/newview/skins/default/xui/en/floater_tools.xml | 1 - indra/newview/skins/default/xui/en/sidepanel_item_info.xml | 1 - indra/newview/skins/default/xui/en/sidepanel_task_info.xml | 1 - 5 files changed, 6 insertions(+), 9 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp index 7cd2e0146a..2422596f60 100644 --- a/indra/newview/llfloateravatarpicker.cpp +++ b/indra/newview/llfloateravatarpicker.cpp @@ -680,7 +680,12 @@ void LLFloaterAvatarPicker::processResponse(const LLUUID& query_id, const LLSD& // clear "Searching" label on first results search_results->deleteAllItems(); - if (content.has("agents")) + if (content.has("failure_reason")) + { + getChild("SearchResults")->setCommentText(content["failure_reason"].asString()); + getChildView("ok_btn")->setEnabled(false); + } + else { LLSD agents = content["agents"]; @@ -733,10 +738,6 @@ void LLFloaterAvatarPicker::processResponse(const LLUUID& query_id, const LLSD& search_results->setFocus(TRUE); } } - else if (content.has("failure_reason")) - { - getChild("SearchResults")->setCommentText(content["failure_reason"].asString()); - } } } diff --git a/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml index 45e16c59ae..850e1be372 100644 --- a/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml +++ b/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml @@ -323,7 +323,6 @@ follows="left|top" decimal_digits="0" increment="1" - control_name="Edit Cost" name="Edit Cost" label="Price:" label_width="100" diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index ade79b8884..d9b0ac0060 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -1140,7 +1140,6 @@ even though the user gets a free copy. decimal_digits="0" increment="1" left_pad="0" - control_name="Edit Cost" name="Edit Cost" label="L$" label_width="15" diff --git a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml index ff7ea08251..35d14251c7 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml @@ -450,7 +450,6 @@ follows="left|top" decimal_digits="0" increment="1" - control_name="Edit Cost" name="Edit Cost" label="Price: L$" label_width="75" diff --git a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml index 1c9d750aa6..0b32215964 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml @@ -454,7 +454,6 @@ increment="1" top_pad="10" left="120" - control_name="Edit Cost" name="Edit Cost" label="Price: L$" label_width="73" -- cgit v1.2.3 From 9f7c22bbe5794409a6fbb2a1a08834944438e619 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 9 Dec 2022 11:12:20 +0200 Subject: SL-18810 FIXED "Find Original" doesn't work if Item profile was previously selected --- indra/newview/llinventoryfunctions.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index f454ca5bfb..0e0f924d3c 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -799,6 +799,7 @@ void show_item_original(const LLUUID& item_uuid) { LLFloaterReg::toggleInstanceOrBringToFront("inventory"); } + sidepanel_inventory->showInventoryPanel(); const LLUUID inbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX); if (gInventory.isObjectDescendentOf(gInventory.getLinkedItemID(item_uuid), inbox_id)) -- cgit v1.2.3 From 94cc9149477e59411f7b0fc96823296f121e1b4f Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Fri, 9 Dec 2022 14:47:26 +0200 Subject: SL-18823 FIXED Crash when using 'Create folder from selected' --- indra/newview/llinventoryfunctions.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 0e0f924d3c..43b30dea5f 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -2587,9 +2587,13 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root LLFloater::setFloaterHost(multi_propertiesp); } - std::set selected_uuid_set = LLAvatarActions::getInventorySelectedUUIDs(); uuid_vec_t ids; - std::copy(selected_uuid_set.begin(), selected_uuid_set.end(), std::back_inserter(ids)); + for (std::set::iterator it = selected_items.begin(), end_it = selected_items.end(); + it != end_it; + ++it) + { + ids.push_back(static_cast((*it)->getViewModelItem())->getUUID()); + } // Check for actions that get handled in bulk if (action == "wear") { @@ -2648,7 +2652,7 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root } else if ("ungroup_folder_items" == action) { - if (selected_uuid_set.size() == 1) + if (ids.size() == 1) { LLInventoryCategory* inv_cat = gInventory.getCategory(*ids.begin()); if (!inv_cat || LLFolderType::lookupIsProtectedType(inv_cat->getPreferredType())) -- cgit v1.2.3 From 4a554bfded4b916576054ffb19963a8a52dc719d Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 9 Dec 2022 15:02:26 +0000 Subject: SL-18824 - added hardare_concurrency to system stats --- indra/newview/llviewerstats.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index a4fbbb3e78..df3db9bb1d 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -509,6 +509,7 @@ void send_viewer_stats(bool include_preferences) system["cpu_sse"] = gSysCPU.getSSEVersions(); system["address_size"] = ADDRESS_SIZE; system["os_bitness"] = LLOSInfo::instance().getOSBitness(); + system["hardware_concurrency"] = (LLSD::Integer) std::thread::hardware_concurrency(); unsigned char MACAddress[MAC_ADDRESS_BYTES]; LLUUID::getNodeID(MACAddress); std::string macAddressString = llformat("%02x-%02x-%02x-%02x-%02x-%02x", -- cgit v1.2.3 From f01f39afd1b43a43a9886d3146fd4ea0950459b0 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 9 Dec 2022 20:56:00 +0200 Subject: SL-8294 Fixed Incorrect coordinates in address bar Example: Stepping over 183/255/22 will show position 183/1/22 of the same region --- indra/newview/llagentui.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llagentui.cpp b/indra/newview/llagentui.cpp index 3410a37890..c19ad2ae6f 100644 --- a/indra/newview/llagentui.cpp +++ b/indra/newview/llagentui.cpp @@ -53,7 +53,16 @@ void LLAgentUI::buildSLURL(LLSLURL& slurl, const bool escaped /*= true*/) LLViewerRegion *regionp = gAgent.getRegion(); if (regionp) { - return_slurl = LLSLURL(regionp->getName(), gAgent.getPositionGlobal()); + // Make sure coordinates are within current region + LLVector3d global_pos = gAgent.getPositionGlobal(); + LLVector3d region_origin = regionp->getOriginGlobal(); + // -1 otherwise slurl will fmod 256 to 0. + // And valid slurl range is supposed to be 0..255 + F64 max_val = REGION_WIDTH_METERS - 1; + global_pos.mdV[VX] = llclamp(global_pos[VX], region_origin[VX], region_origin[VX] + max_val); + global_pos.mdV[VY] = llclamp(global_pos[VY], region_origin[VY], region_origin[VY] + max_val); + + return_slurl = LLSLURL(regionp->getName(), global_pos); } slurl = return_slurl; } -- cgit v1.2.3 From 5bfe93b4ea6ed1d402fca3e40fba9ede8b45864f Mon Sep 17 00:00:00 2001 From: akleshchev <117672381+akleshchev@users.noreply.github.com> Date: Sun, 11 Dec 2022 19:08:48 +0200 Subject: SL-18159 Windows' mouse from keyboard emulation causes pointer to jump around the screen. Emulated mouse was trigering "not a valid zoomable object" case and jumping to garbage mMouseDownX/Y due to 'up' event being too early. --- indra/newview/llagentcamera.h | 1 - indra/newview/lltoolfocus.cpp | 78 +++++++++++++++++++++++++------------------ indra/newview/lltoolfocus.h | 1 + 3 files changed, 46 insertions(+), 34 deletions(-) (limited to 'indra') diff --git a/indra/newview/llagentcamera.h b/indra/newview/llagentcamera.h index 89680f95dc..4d005ef024 100644 --- a/indra/newview/llagentcamera.h +++ b/indra/newview/llagentcamera.h @@ -167,7 +167,6 @@ private: // Follow //-------------------------------------------------------------------- public: - void setUsingFollowCam(bool using_follow_cam); bool isfollowCamLocked(); private: LLFollowCam mFollowCam; // Ventrella diff --git a/indra/newview/lltoolfocus.cpp b/indra/newview/lltoolfocus.cpp index 07f46c5fbe..4e94895a3e 100644 --- a/indra/newview/lltoolfocus.cpp +++ b/indra/newview/lltoolfocus.cpp @@ -75,6 +75,7 @@ LLToolCamera::LLToolCamera() mOutsideSlopX(FALSE), mOutsideSlopY(FALSE), mValidClickPoint(FALSE), + mClickPickPending(false), mValidSelection(FALSE), mMouseSteering(FALSE), mMouseUpX(0), @@ -127,6 +128,11 @@ BOOL LLToolCamera::handleMouseDown(S32 x, S32 y, MASK mask) mValidClickPoint = FALSE; + // Sometimes Windows issues down and up events near simultaneously + // without giving async pick a chance to trigged + // Ex: mouse from numlock emulation + mClickPickPending = true; + // If mouse capture gets ripped away, claim we moused up // at the point we moused down. JC mMouseUpX = x; @@ -142,13 +148,15 @@ BOOL LLToolCamera::handleMouseDown(S32 x, S32 y, MASK mask) void LLToolCamera::pickCallback(const LLPickInfo& pick_info) { - if (!LLToolCamera::getInstance()->hasMouseCapture()) + LLToolCamera* camera = LLToolCamera::getInstance(); + if (!camera->mClickPickPending) { return; } + camera->mClickPickPending = false; - LLToolCamera::getInstance()->mMouseDownX = pick_info.mMousePt.mX; - LLToolCamera::getInstance()->mMouseDownY = pick_info.mMousePt.mY; + camera->mMouseDownX = pick_info.mMousePt.mX; + camera->mMouseDownY = pick_info.mMousePt.mY; gViewerWindow->moveCursorToCenter(); @@ -158,7 +166,7 @@ void LLToolCamera::pickCallback(const LLPickInfo& pick_info) // Check for hit the sky, or some other invalid point if (!hit_obj && pick_info.mPosGlobal.isExactlyZero()) { - LLToolCamera::getInstance()->mValidClickPoint = FALSE; + camera->mValidClickPoint = FALSE; return; } @@ -168,7 +176,7 @@ void LLToolCamera::pickCallback(const LLPickInfo& pick_info) LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); if (!selection->getObjectCount() || selection->getSelectType() != SELECT_TYPE_HUD) { - LLToolCamera::getInstance()->mValidClickPoint = FALSE; + camera->mValidClickPoint = FALSE; return; } } @@ -192,7 +200,7 @@ void LLToolCamera::pickCallback(const LLPickInfo& pick_info) if( !good_customize_avatar_hit ) { - LLToolCamera::getInstance()->mValidClickPoint = FALSE; + camera->mValidClickPoint = FALSE; return; } @@ -237,7 +245,7 @@ void LLToolCamera::pickCallback(const LLPickInfo& pick_info) } - LLToolCamera::getInstance()->mValidClickPoint = TRUE; + camera->mValidClickPoint = TRUE; if( CAMERA_MODE_CUSTOMIZE_AVATAR == gAgentCamera.getCameraMode() ) { @@ -284,32 +292,36 @@ BOOL LLToolCamera::handleMouseUp(S32 x, S32 y, MASK mask) if (hasMouseCapture()) { - if (mValidClickPoint) - { - if( CAMERA_MODE_CUSTOMIZE_AVATAR == gAgentCamera.getCameraMode() ) - { - LLCoordGL mouse_pos; - LLVector3 focus_pos = gAgent.getPosAgentFromGlobal(gAgentCamera.getFocusGlobal()); - BOOL success = LLViewerCamera::getInstance()->projectPosAgentToScreen(focus_pos, mouse_pos); - if (success) - { - LLUI::getInstance()->setMousePositionScreen(mouse_pos.mX, mouse_pos.mY); - } - } - else if (mMouseSteering) - { - LLUI::getInstance()->setMousePositionScreen(mMouseDownX, mMouseDownY); - } - else - { - gViewerWindow->moveCursorToCenter(); - } - } - else - { - // not a valid zoomable object - LLUI::getInstance()->setMousePositionScreen(mMouseDownX, mMouseDownY); - } + // Do not move camera if we haven't gotten a pick + if (!mClickPickPending) + { + if (mValidClickPoint) + { + if (CAMERA_MODE_CUSTOMIZE_AVATAR == gAgentCamera.getCameraMode()) + { + LLCoordGL mouse_pos; + LLVector3 focus_pos = gAgent.getPosAgentFromGlobal(gAgentCamera.getFocusGlobal()); + BOOL success = LLViewerCamera::getInstance()->projectPosAgentToScreen(focus_pos, mouse_pos); + if (success) + { + LLUI::getInstance()->setMousePositionScreen(mouse_pos.mX, mouse_pos.mY); + } + } + else if (mMouseSteering) + { + LLUI::getInstance()->setMousePositionScreen(mMouseDownX, mMouseDownY); + } + else + { + gViewerWindow->moveCursorToCenter(); + } + } + else + { + // not a valid zoomable object + LLUI::getInstance()->setMousePositionScreen(mMouseDownX, mMouseDownY); + } + } // calls releaseMouse() internally setMouseCapture(FALSE); diff --git a/indra/newview/lltoolfocus.h b/indra/newview/lltoolfocus.h index cfc235b6c2..6615193318 100644 --- a/indra/newview/lltoolfocus.h +++ b/indra/newview/lltoolfocus.h @@ -65,6 +65,7 @@ protected: BOOL mOutsideSlopX; BOOL mOutsideSlopY; BOOL mValidClickPoint; + bool mClickPickPending; BOOL mValidSelection; BOOL mMouseSteering; S32 mMouseUpX; // needed for releaseMouse() -- cgit v1.2.3 From da373e66cbcab3bd0a09566a6a36682188cb7876 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Tue, 13 Dec 2022 18:10:26 +0200 Subject: mac build fix - remove unused variables --- indra/newview/llagentcamera.cpp | 2 -- indra/newview/llagentcamera.h | 2 -- 2 files changed, 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 8d2e3905d1..ecaa2cb316 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -133,7 +133,6 @@ LLAgentCamera::LLAgentCamera() : mCameraFOVZoomFactor(0.f), mCameraCurrentFOVZoomFactor(0.f), mCameraFocusOffset(), - mCameraFOVDefault(DEFAULT_FIELD_OF_VIEW), mCameraCollidePlane(), @@ -155,7 +154,6 @@ LLAgentCamera::LLAgentCamera() : mFocusObject(NULL), mFocusObjectDist(0.f), mFocusObjectOffset(), - mFocusDotRadius( 0.1f ), // meters mTrackFocusObject(TRUE), mAtKey(0), // Either 1, 0, or -1... indicates that movement-key is pressed diff --git a/indra/newview/llagentcamera.h b/indra/newview/llagentcamera.h index 4d005ef024..d27cdb0c5c 100644 --- a/indra/newview/llagentcamera.h +++ b/indra/newview/llagentcamera.h @@ -152,7 +152,6 @@ private: F32 mTargetCameraDistance; // Target camera offset from avatar F32 mCameraFOVZoomFactor; // Amount of fov zoom applied to camera when zeroing in on an object F32 mCameraCurrentFOVZoomFactor; // Interpolated fov zoom - F32 mCameraFOVDefault; // Default field of view that is basis for FOV zoom effect LLVector4 mCameraCollidePlane; // Colliding plane for camera F32 mCameraZoomFraction; // Mousewheel driven fraction of zoom LLVector3 mCameraPositionAgent; // Camera position in agent coordinates @@ -232,7 +231,6 @@ private: LLPointer mFocusObject; F32 mFocusObjectDist; LLVector3 mFocusObjectOffset; - F32 mFocusDotRadius; // Meters BOOL mTrackFocusObject; //-------------------------------------------------------------------- -- cgit v1.2.3 From 200e185dff108605f0dde45c42b3d827b7a9f0b4 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Fri, 16 Dec 2022 17:27:38 +0200 Subject: SL-18857 FIXED Editing attachment before Shape can stop av turning for user --- indra/newview/llagentcamera.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra') diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index ecaa2cb316..77131efd75 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -2359,6 +2359,11 @@ void LLAgentCamera::changeCameraToCustomizeAvatar() gAgent.standUp(); // force stand up gViewerWindow->getWindow()->resetBusyCount(); + if (LLSelectMgr::getInstance()->getSelection()->isAttachment()) + { + LLSelectMgr::getInstance()->deselectAll(); + } + if (gFaceEditToolset) { LLToolMgr::getInstance()->setCurrentToolset(gFaceEditToolset); -- cgit v1.2.3 From 7196c8c2edeeb01ef4ffb839f7731a99df888bd1 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 22 Dec 2022 02:16:10 +0200 Subject: SL-17659 Reset button for user profile --- indra/newview/llfloaterdisplayname.cpp | 16 ++++++++++++++++ .../skins/default/xui/en/floater_display_name.xml | 20 +++++++++++++++----- 2 files changed, 31 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterdisplayname.cpp b/indra/newview/llfloaterdisplayname.cpp index 3b0c67415a..19bc865d8b 100644 --- a/indra/newview/llfloaterdisplayname.cpp +++ b/indra/newview/llfloaterdisplayname.cpp @@ -47,6 +47,7 @@ public: virtual ~LLFloaterDisplayName() { } /*virtual*/ BOOL postBuild(); void onSave(); + void onReset(); void onCancel(); /*virtual*/ void onOpen(const LLSD& key); @@ -101,6 +102,7 @@ void LLFloaterDisplayName::onOpen(const LLSD& key) BOOL LLFloaterDisplayName::postBuild() { + getChild("reset_btn")->setCommitCallback(boost::bind(&LLFloaterDisplayName::onReset, this)); getChild("cancel_btn")->setCommitCallback(boost::bind(&LLFloaterDisplayName::onCancel, this)); getChild("save_btn")->setCommitCallback(boost::bind(&LLFloaterDisplayName::onSave, this)); @@ -156,6 +158,20 @@ void LLFloaterDisplayName::onCancel() setVisible(false); } +void LLFloaterDisplayName::onReset() +{ + LLAvatarName av_name; + if (!LLAvatarNameCache::get(gAgent.getID(), &av_name)) + { + return; + } + getChild("display_name_editor")->setValue(av_name.getCompleteName()); + + getChild("display_name_confirm")->clear(); + getChild("display_name_confirm")->setFocus(TRUE); +} + + void LLFloaterDisplayName::onSave() { std::string display_name_utf8 = getChild("display_name_editor")->getValue().asString(); diff --git a/indra/newview/skins/default/xui/en/floater_display_name.xml b/indra/newview/skins/default/xui/en/floater_display_name.xml index 3c8f415860..f3431da858 100644 --- a/indra/newview/skins/default/xui/en/floater_display_name.xml +++ b/indra/newview/skins/default/xui/en/floater_display_name.xml @@ -56,7 +56,7 @@ max_length_chars="31" height="20" top_pad="5" - left="50" /> + left_delta="0" /> + left_delta="0" /> +