From 0a11f099187c694cff41d7be5278dd17d937b502 Mon Sep 17 00:00:00 2001 From: Siana Gearz Date: Sun, 4 Mar 2012 09:39:28 +0100 Subject: [PATCH 01/18] Tiny fixies from Phoenix --- indra/newview/llfloateravatarlist.cpp | 2 +- indra/newview/llwlanimator.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/llfloateravatarlist.cpp b/indra/newview/llfloateravatarlist.cpp index 747a6a329..790ba6cec 100644 --- a/indra/newview/llfloateravatarlist.cpp +++ b/indra/newview/llfloateravatarlist.cpp @@ -704,7 +704,7 @@ void LLFloaterAvatarList::refreshAvatarList() LLVector3d delta = position - mypos; F32 distance = (F32)delta.magVec(); - if (position.mdV[VZ] == 0.0) + if (position.mdV[VZ] == 0.f || position.mdV[VZ] == 1020.f) { UnknownAltitude = true; distance = 9000.0; diff --git a/indra/newview/llwlanimator.cpp b/indra/newview/llwlanimator.cpp index e0aa84806..953898fe6 100644 --- a/indra/newview/llwlanimator.cpp +++ b/indra/newview/llwlanimator.cpp @@ -124,6 +124,7 @@ void LLWLAnimator::update(LLWLParamSet& curParams) // at the end of the interp cycle, force the end settings to get applied curParams.setAll(mInterpEndWL->getAll()); } + LLWaterParamManager::getInstance()->mCurParams.setAll(mInterpEndWater->getAll()); mIsInterpolating = false; mIsInterpolatingSky = false; return; From b67fa864ff8de572b6d24103218073edddbff487 Mon Sep 17 00:00:00 2001 From: Siana Gearz Date: Mon, 5 Mar 2012 18:18:37 +0100 Subject: [PATCH 02/18] First shot at fixing font fallback --- indra/llrender/llfont.cpp | 2 + indra/llrender/llfontregistry.cpp | 9 +- indra/llwindow/llwindowsdl.cpp | 4 +- indra/newview/app_settings/settings.xml | 121 ------------------------ 4 files changed, 11 insertions(+), 125 deletions(-) diff --git a/indra/llrender/llfont.cpp b/indra/llrender/llfont.cpp index 69daf389c..fecdafe45 100644 --- a/indra/llrender/llfont.cpp +++ b/indra/llrender/llfont.cpp @@ -192,6 +192,8 @@ BOOL LLFont::loadFace(const std::string& filename, const F32 point_size, const F FT_Done_Face(mFTFace); mFTFace = NULL; } + + llinfos << "Loading font file: " << filename << llendl; int error; diff --git a/indra/llrender/llfontregistry.cpp b/indra/llrender/llfontregistry.cpp index 0e92afeb4..aaa5b421b 100644 --- a/indra/llrender/llfontregistry.cpp +++ b/indra/llrender/llfontregistry.cpp @@ -384,9 +384,13 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc) // This may not be the best solution, but it at least prevents a crash. if (it != mFontMap.end() && it->second != NULL) { - llinfos << "-- matching font exists: " << nearest_exact_desc.getName() << " size " << nearest_exact_desc.getSize() << " style " << ((S32) nearest_exact_desc.getStyle()) << llendl; + if (it->second != NULL) { + llinfos << "-- matching font exists: " << nearest_exact_desc.getName() << " size " << nearest_exact_desc.getSize() << " style " << ((S32) nearest_exact_desc.getStyle()) << llendl; - return it->second; + return it->second; + } else { + llwarns << "Failed to find font" << llendl; + } //Haven't plugged free-type in yet. // copying underlying Freetype font, and storing in LLFontGL with requested font descriptor /*LLFontGL *font = new LLFontGL; @@ -408,6 +412,7 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc) file_names.insert(file_names.end(), match_default_desc->getFileNames().begin(), match_default_desc->getFileNames().end()); + llinfos << "Found matching fallback fonts: " << match_default_desc->getFileNames().size() << llendl; } // Add ultimate fallback list - generated dynamically on linux, diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index c363b8ae9..abaf4e826 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -2564,7 +2564,7 @@ std::vector LLWindowSDL::getDynamicFallbackFontList() // Use libfontconfig to find us a nice ordered list of fallback fonts // specific to this system. std::string final_fallback("/usr/share/fonts/truetype/kochi/kochi-gothic.ttf"); - const int max_font_count_cutoff = 40; // fonts are expensive in the current system, don't enumerate an arbitrary number of them + const int max_font_count_cutoff = 100; // fonts are expensive in the current system, don't enumerate an arbitrary number of them // Our 'ideal' font properties which define the sorting results. // slant=0 means Roman, index=0 means the first face in a font file // (the one we actually use), weight=80 means medium weight, @@ -2654,7 +2654,7 @@ std::vector LLWindowSDL::getDynamicFallbackFontList() } llinfos << "Using " << rtns.size() << "/" << found_font_count << " system fonts." << llendl; - rtns.push_back(final_fallback); + //rtns.push_back(final_fallback); return rtns; } diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index f9b809665..1d5539f10 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -6654,72 +6654,6 @@ Value 0.5 - FontMonospace - - Comment - Name of monospace font that definitely exists (Truetype file name) - Persist - 0 - Type - String - Value - DejaVuSansMono.ttf - - FontSansSerif - - Comment - Name of primary sans-serif font that definitely exists (Truetype file name) - Persist - 0 - Type - String - Value - DroidSans.ttf - - FontSansSerifBundledFallback - - Comment - Name of secondary sans-serif font that definitely exists (Truetype file name) - Persist - 0 - Type - String - Value - DejaVuSansCondensed.ttf - - FontSansSerifBold - - Comment - Name of bold font (Truetype file name) - Persist - 0 - Type - String - Value - DroidSans-Bold.ttf - - FontSansSerifFallback - - Comment - Name of sans-serif font (Truetype file name) - Persist - 0 - Type - String - Value - - - FontSansSerifFallbackScale - - Comment - Scale of fallback font relative to huge font (fraction of huge font size) - Persist - 1 - Type - F32 - Value - 1.00 - FontScreenDPI Comment @@ -6731,61 +6665,6 @@ Value 96.0 - FontSizeHuge - - Comment - Size of huge font (points, or 1/72 of an inch) - Persist - 1 - Type - F32 - Value - 14.0 - - FontSizeLarge - - Comment - Size of large font (points, or 1/72 of an inch) - Persist - 1 - Type - F32 - Value - 11.0 - - FontSizeMedium - - Comment - Size of medium font (points, or 1/72 of an inch) - Persist - 1 - Type - F32 - Value - 9.5 - - FontSizeMonospace - - Comment - Size of monospaced font (points, or 1/72 of an inch) - Persist - 1 - Type - F32 - Value - 9.0 - - FontSizeSmall - - Comment - Size of small font (points, or 1/72 of an inch) - Persist - 1 - Type - F32 - Value - 8.5 - ForceNotecardDragCargoPermissive Comment From edd1b4d8e7204fc8bcdf9c2417b73abce627391a Mon Sep 17 00:00:00 2001 From: Siana Gearz Date: Mon, 5 Mar 2012 18:57:24 +0100 Subject: [PATCH 03/18] Avoid crashes in skins by using proper intended filenames --- indra/newview/skins/Pony-Aquablue/colors.xml | 206 +++++++++++++++++ .../skins/Pony-Aquablue/colors_base.xml | 209 ----------------- .../{colors_base.xml => colors.xml} | 0 .../dark/{colors_base.xml => colors.xml} | 0 .../darkgred/{colors_base.xml => colors.xml} | 0 .../{colors_base.xml => colors.xml} | 0 .../emerald/{colors_base.xml => colors.xml} | 0 indra/newview/skins/gemini/colors.xml | 207 +++++++++++++++++ indra/newview/skins/gemini/colors_base.xml | 210 ----------------- .../gred/{colors_base.xml => colors.xml} | 0 indra/newview/skins/kdarknv/colors_base.xml | 202 ----------------- indra/newview/skins/kliteat/colors_base.xml | 202 ----------------- indra/newview/skins/openlife/colors_base.xml | 190 ---------------- .../skins/openlife/textures/colors.xml | 178 --------------- .../skins/openlife/textures/colors_base.xml | 190 ---------------- .../pslgreen/{colors_base.xml => colors.xml} | 0 .../pslpurple/{colors_base.xml => colors.xml} | 0 .../ruby/{colors_base.xml => colors.xml} | 0 .../sapphire/{colors_base.xml => colors.xml} | 0 indra/newview/skins/silver/colors.xml | 209 +++++++++++++++++ indra/newview/skins/silver/colors_base.xml | 212 ------------------ indra/newview/skins/white_emerald/colors.xml | 204 +++++++++++++++++ .../skins/white_emerald/colors_base.xml | 207 ----------------- .../wisdom/{colors_base.xml => colors.xml} | 0 24 files changed, 826 insertions(+), 1800 deletions(-) delete mode 100644 indra/newview/skins/Pony-Aquablue/colors_base.xml rename indra/newview/skins/Pony-Purple/{colors_base.xml => colors.xml} (100%) rename indra/newview/skins/dark/{colors_base.xml => colors.xml} (100%) rename indra/newview/skins/darkgred/{colors_base.xml => colors.xml} (100%) rename indra/newview/skins/darkorange/{colors_base.xml => colors.xml} (100%) rename indra/newview/skins/emerald/{colors_base.xml => colors.xml} (100%) delete mode 100644 indra/newview/skins/gemini/colors_base.xml rename indra/newview/skins/gred/{colors_base.xml => colors.xml} (100%) delete mode 100644 indra/newview/skins/kdarknv/colors_base.xml delete mode 100644 indra/newview/skins/kliteat/colors_base.xml delete mode 100644 indra/newview/skins/openlife/colors_base.xml delete mode 100644 indra/newview/skins/openlife/textures/colors.xml delete mode 100644 indra/newview/skins/openlife/textures/colors_base.xml rename indra/newview/skins/pslgreen/{colors_base.xml => colors.xml} (100%) rename indra/newview/skins/pslpurple/{colors_base.xml => colors.xml} (100%) rename indra/newview/skins/ruby/{colors_base.xml => colors.xml} (100%) rename indra/newview/skins/sapphire/{colors_base.xml => colors.xml} (100%) delete mode 100644 indra/newview/skins/silver/colors_base.xml delete mode 100644 indra/newview/skins/white_emerald/colors_base.xml rename indra/newview/skins/wisdom/{colors_base.xml => colors.xml} (100%) diff --git a/indra/newview/skins/Pony-Aquablue/colors.xml b/indra/newview/skins/Pony-Aquablue/colors.xml index cf9466fad..b48208f68 100644 --- a/indra/newview/skins/Pony-Aquablue/colors.xml +++ b/indra/newview/skins/Pony-Aquablue/colors.xml @@ -1,3 +1,209 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/indra/newview/skins/Pony-Aquablue/colors_base.xml b/indra/newview/skins/Pony-Aquablue/colors_base.xml deleted file mode 100644 index b48208f68..000000000 --- a/indra/newview/skins/Pony-Aquablue/colors_base.xml +++ /dev/null @@ -1,209 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/indra/newview/skins/Pony-Purple/colors_base.xml b/indra/newview/skins/Pony-Purple/colors.xml similarity index 100% rename from indra/newview/skins/Pony-Purple/colors_base.xml rename to indra/newview/skins/Pony-Purple/colors.xml diff --git a/indra/newview/skins/dark/colors_base.xml b/indra/newview/skins/dark/colors.xml similarity index 100% rename from indra/newview/skins/dark/colors_base.xml rename to indra/newview/skins/dark/colors.xml diff --git a/indra/newview/skins/darkgred/colors_base.xml b/indra/newview/skins/darkgred/colors.xml similarity index 100% rename from indra/newview/skins/darkgred/colors_base.xml rename to indra/newview/skins/darkgred/colors.xml diff --git a/indra/newview/skins/darkorange/colors_base.xml b/indra/newview/skins/darkorange/colors.xml similarity index 100% rename from indra/newview/skins/darkorange/colors_base.xml rename to indra/newview/skins/darkorange/colors.xml diff --git a/indra/newview/skins/emerald/colors_base.xml b/indra/newview/skins/emerald/colors.xml similarity index 100% rename from indra/newview/skins/emerald/colors_base.xml rename to indra/newview/skins/emerald/colors.xml diff --git a/indra/newview/skins/gemini/colors.xml b/indra/newview/skins/gemini/colors.xml index cf9466fad..4f5c5df9a 100644 --- a/indra/newview/skins/gemini/colors.xml +++ b/indra/newview/skins/gemini/colors.xml @@ -1,3 +1,210 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/indra/newview/skins/gemini/colors_base.xml b/indra/newview/skins/gemini/colors_base.xml deleted file mode 100644 index 4f5c5df9a..000000000 --- a/indra/newview/skins/gemini/colors_base.xml +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/indra/newview/skins/gred/colors_base.xml b/indra/newview/skins/gred/colors.xml similarity index 100% rename from indra/newview/skins/gred/colors_base.xml rename to indra/newview/skins/gred/colors.xml diff --git a/indra/newview/skins/kdarknv/colors_base.xml b/indra/newview/skins/kdarknv/colors_base.xml deleted file mode 100644 index 477527766..000000000 --- a/indra/newview/skins/kdarknv/colors_base.xml +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/indra/newview/skins/kliteat/colors_base.xml b/indra/newview/skins/kliteat/colors_base.xml deleted file mode 100644 index 477527766..000000000 --- a/indra/newview/skins/kliteat/colors_base.xml +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/indra/newview/skins/openlife/colors_base.xml b/indra/newview/skins/openlife/colors_base.xml deleted file mode 100644 index 39f897639..000000000 --- a/indra/newview/skins/openlife/colors_base.xml +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/indra/newview/skins/openlife/textures/colors.xml b/indra/newview/skins/openlife/textures/colors.xml deleted file mode 100644 index c7575e9dd..000000000 --- a/indra/newview/skins/openlife/textures/colors.xml +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/indra/newview/skins/openlife/textures/colors_base.xml b/indra/newview/skins/openlife/textures/colors_base.xml deleted file mode 100644 index 39f897639..000000000 --- a/indra/newview/skins/openlife/textures/colors_base.xml +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/indra/newview/skins/pslgreen/colors_base.xml b/indra/newview/skins/pslgreen/colors.xml similarity index 100% rename from indra/newview/skins/pslgreen/colors_base.xml rename to indra/newview/skins/pslgreen/colors.xml diff --git a/indra/newview/skins/pslpurple/colors_base.xml b/indra/newview/skins/pslpurple/colors.xml similarity index 100% rename from indra/newview/skins/pslpurple/colors_base.xml rename to indra/newview/skins/pslpurple/colors.xml diff --git a/indra/newview/skins/ruby/colors_base.xml b/indra/newview/skins/ruby/colors.xml similarity index 100% rename from indra/newview/skins/ruby/colors_base.xml rename to indra/newview/skins/ruby/colors.xml diff --git a/indra/newview/skins/sapphire/colors_base.xml b/indra/newview/skins/sapphire/colors.xml similarity index 100% rename from indra/newview/skins/sapphire/colors_base.xml rename to indra/newview/skins/sapphire/colors.xml diff --git a/indra/newview/skins/silver/colors.xml b/indra/newview/skins/silver/colors.xml index cf9466fad..7ae59a490 100644 --- a/indra/newview/skins/silver/colors.xml +++ b/indra/newview/skins/silver/colors.xml @@ -1,3 +1,212 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/indra/newview/skins/silver/colors_base.xml b/indra/newview/skins/silver/colors_base.xml deleted file mode 100644 index 7ae59a490..000000000 --- a/indra/newview/skins/silver/colors_base.xml +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/indra/newview/skins/white_emerald/colors.xml b/indra/newview/skins/white_emerald/colors.xml index cf9466fad..b637519e0 100644 --- a/indra/newview/skins/white_emerald/colors.xml +++ b/indra/newview/skins/white_emerald/colors.xml @@ -1,3 +1,207 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/indra/newview/skins/white_emerald/colors_base.xml b/indra/newview/skins/white_emerald/colors_base.xml deleted file mode 100644 index b637519e0..000000000 --- a/indra/newview/skins/white_emerald/colors_base.xml +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/indra/newview/skins/wisdom/colors_base.xml b/indra/newview/skins/wisdom/colors.xml similarity index 100% rename from indra/newview/skins/wisdom/colors_base.xml rename to indra/newview/skins/wisdom/colors.xml From 5eb90ef9cdeaf9722d7830d3ee44a7e1359b2f48 Mon Sep 17 00:00:00 2001 From: Siana Gearz Date: Mon, 5 Mar 2012 19:05:30 +0100 Subject: [PATCH 04/18] Preference button to clear settings --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/llfloaterpreference.cpp | 13 +++- indra/newview/llfloaterpreference.h | 5 ++ indra/newview/llpanelgeneral.cpp | 44 ++++++++++++++ indra/newview/llpanelgeneral.h | 3 + .../skins/default/xui/en-us/notifications.xml | 59 +++++++++++++++++++ .../xui/en-us/panel_preferences_general.xml | 3 +- 7 files changed, 126 insertions(+), 3 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index f9b809665..681ef347e 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -6402,7 +6402,7 @@ Type Boolean Value - 1 + 0 FlycamAbsolute diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 231d680a0..6e102d58c 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -387,6 +387,7 @@ void LLPreferenceCore::refreshEnabledGraphics() LLFloaterPreference::LLFloaterPreference() { + mExitWithoutSaving = false; LLUICtrlFactory::getInstance()->buildFloater(this, "floater_preferences.xml"); } @@ -532,7 +533,10 @@ void LLFloaterPreference::onBtnApply( void* userdata ) void LLFloaterPreference::onClose(bool app_quitting) { LLPanelLogin::setAlwaysRefresh(false); - cancel(); // will be a no-op if OK or apply was performed just prior. + if (!mExitWithoutSaving) + { + cancel(); // will be a no-op if OK or apply was performed just prior. + } LLFloater::onClose(app_quitting); } @@ -572,3 +576,10 @@ void LLFloaterPreference::switchTab(S32 i) { sInstance->mPreferenceCore->getTabContainer()->selectTab(i); } + +// static +void LLFloaterPreference::closeWithoutSaving() +{ + sInstance->mExitWithoutSaving = true; + sInstance->close(); +} diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index c849ac6ea..a662a08c7 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -124,6 +124,10 @@ public: static void switchTab(S32 i); + // *HACK: Close without doing anything. + // This is used by the "reset all settings" button. + static void closeWithoutSaving(); + protected: LLPreferenceCore *mPreferenceCore; @@ -133,6 +137,7 @@ protected: LLButton *mOKBtn; LLButton *mCancelBtn; LLButton *mApplyBtn; + bool mExitWithoutSaving; static void onClickAbout(void*); static void onBtnOK(void*); diff --git a/indra/newview/llpanelgeneral.cpp b/indra/newview/llpanelgeneral.cpp index a238d408d..fbd323a09 100644 --- a/indra/newview/llpanelgeneral.cpp +++ b/indra/newview/llpanelgeneral.cpp @@ -43,6 +43,7 @@ #include "llviewercontrol.h" #include "llagent.h" +#include "llfloaterpreference.h" #include "llviewerregion.h" #include "llavatarnamecache.h" #include "llvoavatar.h" @@ -109,6 +110,8 @@ BOOL LLPanelGeneral::postBuild() childSetVisible("maturity_desired_combobox", can_choose); childSetVisible("maturity_desired_textbox", !can_choose); + + childSetAction("clear_settings", &onClickClearSettings, this); return TRUE; } @@ -160,3 +163,44 @@ void LLPanelGeneral::cancel() { } +// static +void LLPanelGeneral::onClickClearSettings(void*) +{ + if(gAgent.getID().notNull()) { + LLNotifications::instance().add("ResetAllSettingsPrompt", LLSD(), LLSD(), &callbackResetAllSettings); + } + else + { + LLNotifications::instance().add("ResetSystemSettingsPrompt", LLSD(), LLSD(), &callbackResetAllSettings); + } +} + +// static +void LLPanelGeneral::callbackResetAllSettings(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotification::getSelectedOption(notification, response); + if(option != 3) //At least some settings want to be removed + { + // We probably want to avoid altering this setting, so keep it across the reset. + std::string client_settings_file = gSavedSettings.getString("ClientSettingsFile"); + if(option != 2) + { + gSavedSettings.resetToDefaults(); + gSavedSettings.setString("ClientSettingsFile", client_settings_file); + gSavedSettings.saveToFile(client_settings_file, TRUE); + } + + // Wipe user-specific settings for good measure and consistency. + // Obviously, we can only do this if we're actually logged in. + if(gAgent.getID().notNull() && (option != 1)) + { + gSavedPerAccountSettings.resetToDefaults(); + gSavedPerAccountSettings.saveToFile(gSavedSettings.getString("PerAccountSettingsFile"), TRUE); + } + LLNotifications::instance().add("ResetSettingsComplete"); + + // *HACK: Now close the floater without cancelling or applying. + // (the alternative route would be to add a method to every preference panel to handle this and update its UI) + LLFloaterPreference::closeWithoutSaving(); + } +} diff --git a/indra/newview/llpanelgeneral.h b/indra/newview/llpanelgeneral.h index 4afa5dd66..b60ce2289 100644 --- a/indra/newview/llpanelgeneral.h +++ b/indra/newview/llpanelgeneral.h @@ -46,6 +46,9 @@ public: void apply(); void cancel(); + + static void LLPanelGeneral::onClickClearSettings(void*); + static void callbackResetAllSettings(const LLSD& notification, const LLSD& response); }; #endif diff --git a/indra/newview/skins/default/xui/en-us/notifications.xml b/indra/newview/skins/default/xui/en-us/notifications.xml index 86b27d335..39d1f73a1 100644 --- a/indra/newview/skins/default/xui/en-us/notifications.xml +++ b/indra/newview/skins/default/xui/en-us/notifications.xml @@ -7032,6 +7032,65 @@ Your shape, skin, hair or eyes might be defect. yestext="OK"/> + + Settings have been reset. You should relog to ensure this takes full effect. + + + + Resetting all settings may be helpful if you are experiencing problems; however, you will need to redo any changes you have made to the default configuration. + + Would you like to reset system settings? +
+