From 117e21c02f4907e038969aa8aa56134d5713139e Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 16 Jun 2020 17:36:38 +0200 Subject: [PATCH 1/5] Real booleans, not fake... --- indra/newview/quickprefs.cpp | 11 ++--------- indra/newview/quickprefs.h | 2 +- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/indra/newview/quickprefs.cpp b/indra/newview/quickprefs.cpp index 635dc871e7..65b3e20733 100644 --- a/indra/newview/quickprefs.cpp +++ b/indra/newview/quickprefs.cpp @@ -1160,18 +1160,11 @@ void FloaterQuickPrefs::updateRlvRestrictions(ERlvBehaviour behavior, ERlvParamT { if (behavior == RLV_BHVR_SETENV) { - if (type == RLV_TYPE_ADD) - { - enableWindlightButtons(FALSE); - } - else - { - enableWindlightButtons(TRUE); - } + enableWindlightButtons(type != RLV_TYPE_ADD); } } -void FloaterQuickPrefs::enableWindlightButtons(BOOL enable) +void FloaterQuickPrefs::enableWindlightButtons(bool enable) { childSetEnabled("WLPresetsCombo", enable); childSetEnabled("WLPrevPreset", enable); diff --git a/indra/newview/quickprefs.h b/indra/newview/quickprefs.h index 187ce3e10d..ce8f286b9d 100644 --- a/indra/newview/quickprefs.h +++ b/indra/newview/quickprefs.h @@ -91,7 +91,7 @@ private: boost::signals2::connection mRlvBehaviorCallbackConnection; void updateRlvRestrictions(ERlvBehaviour behavior, ERlvParamType type); - void enableWindlightButtons(BOOL enable); + void enableWindlightButtons(bool enable); public: /*virtual*/ BOOL postBuild(); From 3d00f56ea067d827e47facb965eaf3a7db403256 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 16 Jun 2020 20:09:04 +0200 Subject: [PATCH 2/5] Move unescaped_name function to FSCommon --- indra/newview/fscommon.cpp | 11 +++++++++++ indra/newview/fscommon.h | 1 + indra/newview/lggbeammaps.cpp | 15 ++------------- indra/newview/lggbeamscolors.cpp | 3 --- indra/newview/llenvironment.cpp | 2 +- indra/newview/quickprefs.cpp | 1 - 6 files changed, 15 insertions(+), 18 deletions(-) diff --git a/indra/newview/fscommon.cpp b/indra/newview/fscommon.cpp index d064dcdac6..a1bba035e0 100644 --- a/indra/newview/fscommon.cpp +++ b/indra/newview/fscommon.cpp @@ -85,6 +85,17 @@ bool is_irc_me_prefix(const std::string& text) return (prefix == "/me " || prefix == "/me'"); } +std::string unescape_name(const std::string& name) +{ + // bugfix for SL-46920: preventing filenames that break stuff. + char * curl_str = curl_unescape(name.c_str(), name.size()); + std::string unescaped_name(curl_str); + curl_free(curl_str); + curl_str = NULL; + + return unescaped_name; +} + std::string FSCommon::applyAutoCloseOoc(std::string message) { if (!gSavedSettings.getBOOL("AutoCloseOOC")) diff --git a/indra/newview/fscommon.h b/indra/newview/fscommon.h index 5d00a2887c..be33ef6790 100644 --- a/indra/newview/fscommon.h +++ b/indra/newview/fscommon.h @@ -40,6 +40,7 @@ const F32 AVATAR_UNKNOWN_RANGE = -1.f; void report_to_nearby_chat(const std::string& message); std::string format_string(std::string text, const LLStringUtil::format_map_t& args); bool is_irc_me_prefix(const std::string& text); +std::string unescape_name(const std::string& name); namespace FSCommon { diff --git a/indra/newview/lggbeammaps.cpp b/indra/newview/lggbeammaps.cpp index 9ff3602757..c027275eea 100644 --- a/indra/newview/lggbeammaps.cpp +++ b/indra/newview/lggbeammaps.cpp @@ -13,6 +13,7 @@ #include "llviewerprecompiledheaders.h" +#include "fscommon.h" #include "lggbeammaps.h" #include "lggbeamscolors.h" #include "llagent.h" @@ -27,17 +28,6 @@ lggBeamMaps gLggBeamMaps; -std::string unescape_name(const std::string& name) -{ - // bugfix for SL-46920: preventing filenames that break stuff. - char * curl_str = curl_unescape(name.c_str(), name.size()); - std::string unescaped_name(curl_str); - curl_free(curl_str); - curl_str = NULL; - - return unescaped_name; -} - F32 hueToRgb(F32 val1In, F32 val2In, F32 valHUeIn) { while (valHUeIn < 0.0f) @@ -70,7 +60,7 @@ F32 hueToRgb(F32 val1In, F32 val2In, F32 valHUeIn) void hslToRgb(F32 hValIn, F32 sValIn, F32 lValIn, F32& rValOut, F32& gValOut, F32& bValOut) { - if (sValIn < 0.00001f) + if (sValIn < F_ALMOST_ZERO) { rValOut = lValIn; gValOut = lValIn; @@ -400,4 +390,3 @@ void lggBeamMaps::updateBeamChat(const LLVector3d& currentPos) } } } - diff --git a/indra/newview/lggbeamscolors.cpp b/indra/newview/lggbeamscolors.cpp index 0da2aa0b5f..78513dd73e 100644 --- a/indra/newview/lggbeamscolors.cpp +++ b/indra/newview/lggbeamscolors.cpp @@ -18,9 +18,6 @@ #include "llviewerprecompiledheaders.h" #include "lggbeamscolors.h" -#include "llfile.h" -#include "llsdserialize.h" - lggBeamsColors lggBeamsColors::fromLLSD(const LLSD& inputData) { lggBeamsColors toReturn; diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index df4ccb7a21..461e84a574 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -69,6 +69,7 @@ // [RLVa:KB] - Checked: RLVa-2.4 (@setenv) #include "rlvactions.h" // [/RLVa:KB] +#include "fscommon.h" //========================================================================= namespace @@ -828,7 +829,6 @@ LLEnvironment::LLEnvironment(): } // OpenSim legacy Windlight setting support #ifdef OPENSIM -std::string unescape_name(const std::string& name); void LLEnvironment::loadLegacyPresets() { // [EEPMERGE] diff --git a/indra/newview/quickprefs.cpp b/indra/newview/quickprefs.cpp index 65b3e20733..d787bef23a 100644 --- a/indra/newview/quickprefs.cpp +++ b/indra/newview/quickprefs.cpp @@ -58,7 +58,6 @@ #include "llvoavatarself.h" #include "rlvhandler.h" -std::string unescape_name(const std::string& name); class FSSettingsCollector : public LLInventoryCollectFunctor { public: From 5846f820a060ba0b43e35ce78b0a8588e4da9546 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 16 Jun 2020 20:32:37 +0200 Subject: [PATCH 3/5] Only load legacy Windlights if actually in OpenSim - this probably might be tied to a region cap in case OpenSim gets EEP support eventually... --- indra/newview/llenvironment.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index 461e84a574..a850d1bbda 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -70,6 +70,7 @@ #include "rlvactions.h" // [/RLVa:KB] #include "fscommon.h" +#include "llviewernetwork.h" //========================================================================= namespace @@ -831,12 +832,8 @@ LLEnvironment::LLEnvironment(): #ifdef OPENSIM void LLEnvironment::loadLegacyPresets() { - // [EEPMERGE] - //LLDayCycleManager::preset_name_list_t user_presets, sys_presets; - //LLDayCycleManager::instance().getPresetNames(user_presets, sys_presets); - // [/EEPMERGE] std::string path_name; - std::vector folders={LL_PATH_APP_SETTINGS, LL_PATH_USER_SETTINGS}; + std::vector folders = { LL_PATH_APP_SETTINGS, LL_PATH_USER_SETTINGS }; for (auto & settings_path : folders) { path_name = gDirUtilp->getExpandedFilename(settings_path , "windlight", "skies", ""); @@ -906,10 +903,14 @@ void LLEnvironment::initSingleton() mCurrentEnvironment->setWater(p_default_water); mEnvironments[ENV_DEFAULT] = mCurrentEnvironment; + // OpenSim legacy Windlight setting support #ifdef OPENSIM - loadLegacyPresets(); - loadUserPrefs(); + if (LLGridManager::instance().isInOpenSim()) + { + loadLegacyPresets(); + loadUserPrefs(); + } #endif // From 41027434fee932729fba52c4996076fe9975159c Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 16 Jun 2020 20:40:59 +0200 Subject: [PATCH 4/5] Silence a few warnings --- indra/newview/skins/default/xui/de/strings.xml | 12 ++++++++++++ indra/newview/skins/default/xui/en/strings.xml | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/indra/newview/skins/default/xui/de/strings.xml b/indra/newview/skins/default/xui/de/strings.xml index 0172c1502c..0584113452 100644 --- a/indra/newview/skins/default/xui/de/strings.xml +++ b/indra/newview/skins/default/xui/de/strings.xml @@ -1514,6 +1514,15 @@ http://www.firestormviewer.org/support für Hilfe zum Lösen des Problems. keine + + Himmler + + + Wasser + + + Tageszyklus + Hemd nicht getragen @@ -5214,6 +5223,9 @@ Missbrauchsbericht Neuer Himmel + + Neue Einstellungen + /verbeugen diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 512b418fca..39b088a8a2 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -670,6 +670,9 @@ http://www.firestormviewer.org/support for help fixing this problem. Physics invalid none + Sky + Water + Daycycle Shirt not worn @@ -2371,6 +2374,7 @@ Abuse Report New Daycycle New Water New Sky + New Settings /bow From cafe3a7688db7dd59ca4d29c4da11d5427e83e92 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 17 Jun 2020 16:14:37 +0200 Subject: [PATCH 5/5] Fix buttons on bottom row on quickprefs floater aren't clickable at their full height --- indra/newview/skins/default/xui/en/floater_quickprefs.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/floater_quickprefs.xml b/indra/newview/skins/default/xui/en/floater_quickprefs.xml index 949084eb30..d7e2d3498b 100644 --- a/indra/newview/skins/default/xui/en/floater_quickprefs.xml +++ b/indra/newview/skins/default/xui/en/floater_quickprefs.xml @@ -20,7 +20,7 @@ left="0" top="16" width="260" - height="152" + height="155" follows="all" layout="topleft">