diff --git a/LICENSES/boost-coroutine-linden.patch b/LICENSES/boost-coroutine-linden.patch deleted file mode 100644 index 06cb3b454..000000000 --- a/LICENSES/boost-coroutine-linden.patch +++ /dev/null @@ -1,62 +0,0 @@ -diff -rc ../boost-coroutine/boost/coroutine/coroutine.hpp boost-coroutine/boost/coroutine/coroutine.hpp -*** ../boost-coroutine/boost/coroutine/coroutine.hpp Wed Apr 29 14:41:05 2009 ---- boost-coroutine/boost/coroutine/coroutine.hpp Wed Apr 22 09:35:22 2009 -*************** -*** 28,33 **** ---- 28,36 ---- - - #ifndef BOOST_COROUTINE_COROUTINE_HPP_20060512 - #define BOOST_COROUTINE_COROUTINE_HPP_20060512 -+ // On Linux systems, use native swapcontext() et al. rather than -+ // Boost.Coroutine homebrew assembler -+ #define BOOST_COROUTINE_NO_ASM - // default_context_impl.hpp must be first for weird Apple bug - #include - #include -diff -rc ../boost-coroutine/boost/coroutine/future.hpp boost-coroutine/boost/coroutine/future.hpp -*** ../boost-coroutine/boost/coroutine/future.hpp Wed Apr 29 14:41:05 2009 ---- boost-coroutine/boost/coroutine/future.hpp Wed Apr 22 09:35:26 2009 -*************** -*** 33,38 **** ---- 33,41 ---- - #ifndef BOOST_COROUTINE_WAIT_MAX - #define BOOST_COROUTINE_WAIT_MAX 10 - #endif -+ // On Linux systems, use native swapcontext() et al. rather than -+ // Boost.Coroutine homebrew assembler -+ #define BOOST_COROUTINE_NO_ASM - // default_context_impl.hpp must be first for weird Apple bug - #include - #include -diff -u -r old/boost/coroutine/detail/coroutine_impl.hpp new/boost/coroutine/detail/coroutine_impl.hpp ---- old/boost/coroutine/detail/coroutine_impl.hpp 2009-10-20 17:10:02.000000000 +0100 -+++ new/boost/coroutine/detail/coroutine_impl.hpp 2009-10-20 19:22:11.000000000 +0100 -@@ -56,7 +56,7 @@ - typedef ContextImpl context_impl; - typedef CoroutineType coroutine_type; - typedef coroutine_impl type; -- typedef context_base context_base; -+ typedef context_base context_base_type; - typedef typename coroutine_type::arg_slot_type arg_slot_type; - typedef typename coroutine_type::result_type result_type; - typedef typename coroutine_type::result_slot_type result_slot_type; -@@ -65,7 +65,7 @@ - - template - coroutine_impl(DerivedType * this_, std::ptrdiff_t stack_size) : -- context_base(*this_, stack_size), -+ context_base_type(*this_, stack_size), - m_arg(0), - m_result(0){} - -diff -u -r old/boost/coroutine/detail/posix_utility.hpp new/boost/coroutine/detail/posix_utility.hpp ---- old/boost/coroutine/detail/posix_utility.hpp 2009-04-24 21:30:44.000000000 +0100 -+++ new/boost/coroutine/detail/posix_utility.hpp 2009-10-20 19:21:27.000000000 +0100 -@@ -39,6 +39,7 @@ - #include - #include - #include -+#include - #include - #if defined(_POSIX_MAPPED_FILES) && _POSIX_MAPPED_FILES > 0 - #include diff --git a/LICENSES/gstreamer.txt b/LICENSES/gstreamer.txt deleted file mode 100644 index 7f02d0472..000000000 --- a/LICENSES/gstreamer.txt +++ /dev/null @@ -1,68 +0,0 @@ -http://www.gnu.org/copyleft/lgpl.html - -GNU LESSER GENERAL PUBLIC LICENSE - -Version 3, 29 June 2007 - -Copyright (C) 2007 Free Software Foundation, Inc. - -Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - -This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. -0. Additional Definitions. - -As used herein, .this License. refers to version 3 of the GNU Lesser General Public License, and the .GNU GPL. refers to version 3 of the GNU General Public License. - -.The Library. refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. - -An .Application. is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. - -A .Combined Work. is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the .Linked Version.. - -The .Minimal Corresponding Source. for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. - -The .Corresponding Application Code. for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. -1. Exception to Section 3 of the GNU GPL. - -You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. -2. Conveying Modified Versions. - -If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: - - * a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or - * b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: - - * a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. - * b) Accompany the object code with a copy of the GNU GPL and this license document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: - - * a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. - * b) Accompany the Combined Work with a copy of the GNU GPL and this license document. - * c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. - * d) Do one of the following: - o 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. - o 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. - * e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: - - * a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. - * b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License .or any later version. applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. - diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index d59b0eac9..0603c1a18 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -5,6 +5,7 @@ project(llcommon) include(Cwdebug) include(00-Common) include(LLCommon) +include(APR) include(Linking) include_directories( diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 1ee561750..8285a8175 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -56,7 +56,7 @@ const F32 CUT_MAX = 1.f; const F32 MIN_CUT_DELTA = 0.02f; const F32 HOLLOW_MIN = 0.f; -const F32 HOLLOW_MAX = 0.95f; +const F32 HOLLOW_MAX = 0.99f; const F32 HOLLOW_MAX_SQUARE = 0.7f; const F32 TWIST_MIN = -1.f; @@ -65,10 +65,10 @@ const F32 TWIST_MAX = 1.f; const F32 RATIO_MIN = 0.f; const F32 RATIO_MAX = 2.f; // Tom Y: Inverted sense here: 0 = top taper, 2 = bottom taper -const F32 HOLE_X_MIN= 0.05f; +const F32 HOLE_X_MIN= 0.01f; const F32 HOLE_X_MAX= 1.0f; -const F32 HOLE_Y_MIN= 0.05f; +const F32 HOLE_Y_MIN= 0.01f; const F32 HOLE_Y_MAX= 0.5f; const F32 SHEAR_MIN = -0.5f; diff --git a/indra/llplugin/slplugin/CMakeLists.txt b/indra/llplugin/slplugin/CMakeLists.txt index 5d0a57dfb..11c921ed7 100644 --- a/indra/llplugin/slplugin/CMakeLists.txt +++ b/indra/llplugin/slplugin/CMakeLists.txt @@ -59,6 +59,7 @@ target_link_libraries(SLPlugin ${LLPLUGIN_LIBRARIES} ${LLMESSAGE_LIBRARIES} ${LLCOMMON_LIBRARIES} + ${APRUTIL_LIBRARIES} ${PLUGIN_API_WINDOWS_LIBRARIES} ) diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 0ab07c5e4..eeb69d79f 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -1358,7 +1358,7 @@ LLFloater* LLFloater::getClosableFloaterFromFocus() // Find and close a parental floater that is closeable, if any. LLFloater* previous_floater = NULL; // Guard against endless loop, because getParentFloater(x) can return x! for(LLFloater* floater_to_close = focused_floater; - NULL != floater_to_close; + NULL != floater_to_close && floater_to_close != gFloaterView->getParentFloater(floater_to_close); floater_to_close = gFloaterView->getParentFloater(floater_to_close)) { if(floater_to_close == previous_floater) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index b504f3331..89cd31abb 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -80,6 +80,7 @@ set(viewer_SOURCE_FILES ascentdaycyclemanager.cpp ascentfloatercontactgroups.cpp ascentkeyword.cpp + ascentprefschat.cpp ascentprefssys.cpp ascentprefsvan.cpp dhparam.cpp @@ -555,6 +556,7 @@ set(viewer_HEADER_FILES ascentdaycyclemanager.h ascentfloatercontactgroups.h ascentkeyword.h + ascentprefschat.h ascentprefssys.h ascentprefsvan.h emerald.h @@ -1232,9 +1234,13 @@ set(viewer_APPSETTINGS_FILES app_settings/low_graphics.xml app_settings/mid_graphics.xml app_settings/settings.xml + app_settings/settings_ascent.xml + app_settings/settings_ascent_coa.xml app_settings/settings_crash_behavior.xml app_settings/settings_files.xml app_settings/settings_per_account.xml + app_settings/settings_sh.xml + app_settings/settings_rlv.xml app_settings/std_bump.ini app_settings/trees.xml app_settings/ultra_graphics.xml @@ -1446,6 +1452,7 @@ target_link_libraries(${VIEWER_BINARY_NAME} ${DBUSGLIB_LIBRARIES} ${OPENGL_LIBRARIES} ${FMODWRAPPER_LIBRARY} + ${APRUTIL_LIBRARIES} ${OPENGL_LIBRARIES} ${JSONCPP_LIBRARIES} ${SDL_LIBRARY} diff --git a/indra/newview/app_settings/settings_ascent.xml b/indra/newview/app_settings/settings_ascent.xml index 86811ae6d..50efda805 100644 --- a/indra/newview/app_settings/settings_ascent.xml +++ b/indra/newview/app_settings/settings_ascent.xml @@ -2,8 +2,19 @@ - - SianaRenderOmitBlankVBO + + SingularityBoldGroupModerator + + Comment + Should group moderator chat be displayed in bold + Persist + 1 + Type + Boolean + Value + 1 + + SianaRenderOmitBlankVBO Comment Optimization: omit prefilling VBOs with zeroes. Default: OFF @@ -130,7 +141,7 @@ Comment Keep those jerks guessing by hiding your "____ is typing..." message. Persist - 0 + 1 Type Boolean Value @@ -620,150 +631,5 @@ Value tp2 - AscentInstantMessageAnnounceIncoming - - Comment - Start IM window as soon as the person starts typing - Persist - 1 - Type - Boolean - Value - 1 - - AscentShowLookAt - - Comment - Show Others' Lookat points - Persist - 1 - Type - Boolean - Value - 0 - - AscentUseStatusColors - - Comment - Show special colors for statuses like Friend, Linden, so on - Persist - 1 - Type - Boolean - Value - 0 - - AscentAvatarXModifier - - Comment - Avatar position modifier (X) - Persist - 1 - Type - F32 - Value - 0.0 - - AscentAvatarYModifier - - Comment - Avatar position modifier (Y) - Persist - 1 - Type - F32 - Value - 0.0 - - AscentAvatarZModifier - - Comment - Avatar position modifier (Z) - Persist - 1 - Type - F32 - Value - 0.0 - - AscentUseSystemFolder - - Comment - Enables the System folder for setting and non-permanent asset storage. - Persist - 1 - Type - Boolean - Value - 0 - - AscentSystemTemporary - - Comment - When enabled, temporary uploads are put in the System Asset folder (if System Folder exists). - Persist - 1 - Type - Boolean - Value - 0 - - AscentShowFriendsTag - - Comment - Show friends client tags as (Friend), and colorize them specially. - Persist - 1 - Type - Boolean - Value - 1 - - AscentUseTag - - Comment - Broadcast client tag - Persist - 1 - Type - Boolean - Value - 1 - - AscentShowIdleTime - - Comment - Show client tags for others. - Persist - 1 - Type - Boolean - Value - 1 - - AscentShowOthersTag - - Comment - Show client tags for others. - Persist - 1 - Type - Boolean - Value - 1 - - AscentShowOthersTagColor - - Comment - Show avatar names in the color of their client. - Persist - 1 - Type - Boolean - Value - 1 - - - diff --git a/indra/newview/ascentprefschat.cpp b/indra/newview/ascentprefschat.cpp new file mode 100644 index 000000000..bd52eb5f0 --- /dev/null +++ b/indra/newview/ascentprefschat.cpp @@ -0,0 +1,496 @@ +/** + * @file ascentprefssys.cpp + * @Ascent Viewer preferences panel + * + * $LicenseInfo:firstyear=2008&license=viewergpl$ + * + * Copyright (c) 2008, Henri Beauchamp. + * Rewritten in its entirety 2010 Hg Beeks. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +//File include +#include "ascentprefschat.h" +#include "llagent.h" +#include "llcolorswatch.h" +#include "llcombobox.h" +#include "llradiogroup.h" +#include "lluictrlfactory.h" +#include "llviewercontrol.h" +#include "lgghunspell_wrapper.h" + + +LLPrefsAscentChat::LLPrefsAscentChat() +{ + LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_ascent_chat.xml"); + + childSetCommitCallback("SpellBase", onSpellBaseComboBoxCommit, this); + childSetAction("EmSpell_EditCustom", onSpellEditCustom, this); + childSetAction("EmSpell_GetMore", onSpellGetMore, this); + childSetAction("EmSpell_Add", onSpellAdd, this); + childSetAction("EmSpell_Remove", onSpellRemove, this); + + childSetCommitCallback("time_format_combobox", onCommitTimeDate, this); + childSetCommitCallback("date_format_combobox", onCommitTimeDate, this); + + childSetCommitCallback("AscentInstantMessageResponseAnyone", onCommitAutoResponse, this); + childSetCommitCallback("AscentInstantMessageResponseFriends", onCommitAutoResponse, this); + childSetCommitCallback("AscentInstantMessageResponseMuted", onCommitAutoResponse, this); + childSetCommitCallback("AscentInstantMessageShowOnTyping", onCommitAutoResponse, this); + childSetCommitCallback("AscentInstantMessageShowResponded", onCommitAutoResponse, this); + childSetCommitCallback("AscentInstantMessageResponseRepeat", onCommitAutoResponse, this); + childSetCommitCallback("AscentInstantMessageResponseItem", onCommitAutoResponse, this); + childSetCommitCallback("im_response", onCommitAutoResponse, this); + + childSetCommitCallback("KeywordsOn", onCommitKeywords, this); + childSetCommitCallback("KeywordsList", onCommitKeywords, this); + childSetCommitCallback("KeywordsSound", onCommitKeywords, this); + childSetCommitCallback("KeywordsInChat", onCommitKeywords, this); + childSetCommitCallback("KeywordsInIM", onCommitKeywords, this); + childSetCommitCallback("KeywordsChangeColor", onCommitKeywords, this); + childSetCommitCallback("KeywordsColor", onCommitKeywords, this); + childSetCommitCallback("KeywordsPlaySound", onCommitKeywords, this); + + refreshValues(); + refresh(); +} + +LLPrefsAscentChat::~LLPrefsAscentChat() +{ +} + +//static +void LLPrefsAscentChat::onSpellAdd(void* data) +{ + LLPrefsAscentChat* self = (LLPrefsAscentChat*)data; + + if(self) + { + glggHunSpell->addButton(self->childGetValue("EmSpell_Avail").asString()); + } + + self->refresh(); +} + +//static +void LLPrefsAscentChat::onSpellRemove(void* data) +{ + LLPrefsAscentChat* self = (LLPrefsAscentChat*)data; + + if(self) + { + glggHunSpell->removeButton(self->childGetValue("EmSpell_Installed").asString()); + } + + self->refresh(); +} + +//static +void LLPrefsAscentChat::onSpellGetMore(void* data) +{ + glggHunSpell->getMoreButton(data); +} + +//static +void LLPrefsAscentChat::onSpellEditCustom(void* data) +{ + glggHunSpell->editCustomButton(); +} + +//static +void LLPrefsAscentChat::onSpellBaseComboBoxCommit(LLUICtrl* ctrl, void* userdata) +{ + LLComboBox* box = (LLComboBox*)ctrl; + + if (box) + { + glggHunSpell->newDictSelection(box->getValue().asString()); + } +} + +//static +void LLPrefsAscentChat::onCommitTimeDate(LLUICtrl* ctrl, void* userdata) +{ + LLPrefsAscentChat* self = (LLPrefsAscentChat*)userdata; + + LLComboBox* combo = (LLComboBox*)ctrl; + if (ctrl->getName() == "time_format_combobox") + { + self->tempTimeFormat = combo->getCurrentIndex(); + } + else if (ctrl->getName() == "date_format_combobox") + { + self->tempDateFormat = combo->getCurrentIndex(); + } + + std::string short_date, long_date, short_time, long_time, timestamp; + + if (self->tempTimeFormat == 0) + { + short_time = "%H:%M"; + long_time = "%H:%M:%S"; + timestamp = " %H:%M:%S"; + } + else + { + short_time = "%I:%M %p"; + long_time = "%I:%M:%S %p"; + timestamp = " %I:%M %p"; + } + + if (self->tempDateFormat == 0) + { + short_date = "%Y-%m-%d"; + long_date = "%A %d %B %Y"; + timestamp = "%a %d %b %Y" + timestamp; + } + else if (self->tempDateFormat == 1) + { + short_date = "%d/%m/%Y"; + long_date = "%A %d %B %Y"; + timestamp = "%a %d %b %Y" + timestamp; + } + else + { + short_date = "%m/%d/%Y"; + long_date = "%A, %B %d %Y"; + timestamp = "%a %b %d %Y" + timestamp; + } + + gSavedSettings.setString("ShortDateFormat", short_date); + gSavedSettings.setString("LongDateFormat", long_date); + gSavedSettings.setString("ShortTimeFormat", short_time); + gSavedSettings.setString("LongTimeFormat", long_time); + gSavedSettings.setString("TimestampFormat", timestamp); +} + +//static +void LLPrefsAscentChat::onCommitAutoResponse(LLUICtrl* ctrl, void* user_data) +{ + LLPrefsAscentChat* self = (LLPrefsAscentChat*)user_data; + + gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseAnyone", self->childGetValue("AscentInstantMessageResponseAnyone")); + gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseFriends", self->childGetValue("AscentInstantMessageResponseFriends")); + gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseMuted", self->childGetValue("AscentInstantMessageResponseMuted")); + gSavedPerAccountSettings.setBOOL("AscentInstantMessageShowOnTyping", self->childGetValue("AscentInstantMessageShowOnTyping")); + gSavedPerAccountSettings.setBOOL("AscentInstantMessageShowResponded", self->childGetValue("AscentInstantMessageShowResponded")); + gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseRepeat", self->childGetValue("AscentInstantMessageResponseRepeat")); + gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseItem", self->childGetValue("AscentInstantMessageResponseItem")); + gSavedPerAccountSettings.setString("AscentInstantMessageResponse", self->childGetValue("im_response")); +} + +//static +void LLPrefsAscentChat::onCommitKeywords(LLUICtrl* ctrl, void* user_data) +{ + LLPrefsAscentChat* self = (LLPrefsAscentChat*)user_data; + + if (ctrl->getName() == "KeywordsOn") + { + bool enabled = self->childGetValue("KeywordsOn").asBoolean(); + self->childSetEnabled("KeywordsList", enabled); + self->childSetEnabled("KeywordsInChat", enabled); + self->childSetEnabled("KeywordsInIM", enabled); + self->childSetEnabled("KeywordsChangeColor", enabled); + self->childSetEnabled("KeywordsColor", enabled); + self->childSetEnabled("KeywordsPlaySound", enabled); + self->childSetEnabled("KeywordsSound", enabled); + } + + gSavedPerAccountSettings.setBOOL("KeywordsOn", self->childGetValue("KeywordsOn")); + gSavedPerAccountSettings.setString("KeywordsList", self->childGetValue("KeywordsList")); + gSavedPerAccountSettings.setBOOL("KeywordsInChat", self->childGetValue("KeywordsInChat")); + gSavedPerAccountSettings.setBOOL("KeywordsInIM", self->childGetValue("KeywordsInIM")); + gSavedPerAccountSettings.setBOOL("KeywordsChangeColor", self->childGetValue("KeywordsChangeColor")); + gSavedPerAccountSettings.setColor4("KeywordsColor", self->childGetValue("KeywordsColor")); + gSavedPerAccountSettings.setBOOL("KeywordsPlaySound", self->childGetValue("KeywordsPlaySound")); + gSavedPerAccountSettings.setString("KeywordsSound", self->childGetValue("KeywordsSound")); +} + +// Store current settings for cancel +void LLPrefsAscentChat::refreshValues() +{ + //Chat/IM ----------------------------------------------------------------------------- + mWoLfVerticalIMTabs = gSavedSettings.getBOOL("WoLfVerticalIMTabs"); + mIMAnnounceIncoming = gSavedSettings.getBOOL("AscentInstantMessageAnnounceIncoming"); + mHideTypingNotification = gSavedSettings.getBOOL("AscentHideTypingNotification"); + mShowGroupNameInChatIM = gSavedSettings.getBOOL("OptionShowGroupNameInChatIM"); + mPlayTypingSound = gSavedSettings.getBOOL("PlayTypingSound"); + mHideNotificationsInChat = gSavedSettings.getBOOL("HideNotificationsInChat"); + mEnableMUPose = gSavedSettings.getBOOL("AscentAllowMUpose"); + mEnableOOCAutoClose = gSavedSettings.getBOOL("AscentAutoCloseOOC"); + mLinksForChattingObjects = gSavedSettings.getU32("LinksForChattingObjects"); + mSecondsInChatAndIMs = gSavedSettings.getBOOL("SecondsInChatAndIMs"); + + std::string format = gSavedSettings.getString("ShortTimeFormat"); + if (format.find("%p") == -1) + { + mTimeFormat = 0; + } + else + { + mTimeFormat = 1; + } + + format = gSavedSettings.getString("ShortDateFormat"); + if (format.find("%m/%d/%") != -1) + { + mDateFormat = 2; + } + else if (format.find("%d/%m/%") != -1) + { + mDateFormat = 1; + } + else + { + mDateFormat = 0; + } + + tempTimeFormat = mTimeFormat; + tempDateFormat = mDateFormat; + + mIMResponseAnyone = gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseAnyone"); + mIMResponseFriends = gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseFriends"); + mIMResponseMuted = gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseMuted"); + mIMShowOnTyping = gSavedPerAccountSettings.getBOOL("AscentInstantMessageShowOnTyping"); + mIMShowResponded = gSavedPerAccountSettings.getBOOL("AscentInstantMessageShowResponded"); + mIMResponseRepeat = gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseRepeat"); + mIMResponseItem = gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseItem"); + mIMResponseText = gSavedPerAccountSettings.getString("AscentInstantMessageResponse"); + + //Spam -------------------------------------------------------------------------------- + mBlockChatSpam = gSavedSettings.getBOOL("SGBlockChatSpam"); + mChatSpamCount = gSavedSettings.getU32("SGChatSpamCount"); + mChatSpamTime = gSavedSettings.getF32("SGChatSpamTime"); + mBlockDialogSpam = gSavedSettings.getBOOL("SGBlockDialogSpam"); + mBlockCardSpam = gSavedSettings.getBOOL("SGBlockCardSpam"); + mSpamCount = gSavedSettings.getU32("SGSpamCount"); + mSpamTime = gSavedSettings.getF32("SGSpamTime"); + + //Text Options ------------------------------------------------------------------------ + mSpellDisplay = gSavedSettings.getBOOL("SpellDisplay"); + mKeywordsOn = gSavedPerAccountSettings.getBOOL("KeywordsOn"); + mKeywordsList = gSavedPerAccountSettings.getString("KeywordsList"); + mKeywordsInChat = gSavedPerAccountSettings.getBOOL("KeywordsInChat"); + mKeywordsInIM = gSavedPerAccountSettings.getBOOL("KeywordsInIM"); + mKeywordsChangeColor = gSavedPerAccountSettings.getBOOL("KeywordsChangeColor"); + mKeywordsColor = gSavedPerAccountSettings.getColor4("KeywordsColor"); + mKeywordsPlaySound = gSavedPerAccountSettings.getBOOL("KeywordsPlaySound"); + mKeywordsSound = static_cast(gSavedPerAccountSettings.getString("KeywordsSound")); +} + +// Update controls based on current settings +void LLPrefsAscentChat::refresh() +{ + //Chat -------------------------------------------------------------------------------- + // time format combobox + LLComboBox* combo = getChild("time_format_combobox"); + if (combo) + { + combo->setCurrentByIndex(mTimeFormat); + } + + // date format combobox + combo = getChild("date_format_combobox"); + if (combo) + { + combo->setCurrentByIndex(mDateFormat); + } + + childSetValue("AscentInstantMessageResponseAnyone", mIMResponseAnyone); + childSetValue("AscentInstantMessageResponseFriends", mIMResponseFriends); + childSetValue("AscentInstantMessageResponseMuted", mIMResponseMuted); + childSetValue("AscentInstantMessageShowOnTyping", mIMShowOnTyping); + childSetValue("AscentInstantMessageShowResponded", mIMShowResponded); + childSetValue("AscentInstantMessageResponseRepeat", mIMResponseRepeat); + childSetValue("AscentInstantMessageResponseItem", mIMResponseItem); + + LLWString auto_response = utf8str_to_wstring( gSavedPerAccountSettings.getString("AscentInstantMessageResponse") ); + LLWStringUtil::replaceChar(auto_response, '^', '\n'); + LLWStringUtil::replaceChar(auto_response, '%', ' '); + childSetText("im_response", wstring_to_utf8str(auto_response)); + + //Text Options ------------------------------------------------------------------------ + combo = getChild("SpellBase"); + + if (combo != NULL) + { + combo->removeall(); + std::vector names = glggHunSpell->getDicts(); + + for (int i = 0; i < (int)names.size(); i++) + { + combo->add(names[i]); + } + + combo->setSimple(gSavedSettings.getString("SpellBase")); + } + + combo = getChild("EmSpell_Avail"); + + if (combo != NULL) + { + combo->removeall(); + + combo->add(""); + std::vector names = glggHunSpell->getAvailDicts(); + + for (int i = 0; i < (int)names.size(); i++) + { + combo->add(names[i]); + } + + combo->setSimple(std::string("")); + } + + combo = getChild("EmSpell_Installed"); + + if (combo != NULL) + { + combo->removeall(); + + combo->add(""); + std::vector names = glggHunSpell->getInstalledDicts(); + + for (int i = 0; i < (int)names.size(); i++) + { + combo->add(names[i]); + } + + combo->setSimple(std::string("")); + } + + childSetEnabled("KeywordsList", mKeywordsOn); + childSetEnabled("KeywordsInChat", mKeywordsOn); + childSetEnabled("KeywordsInIM", mKeywordsOn); + childSetEnabled("KeywordsChangeColor", mKeywordsOn); + childSetEnabled("KeywordsColor", mKeywordsOn); + childSetEnabled("KeywordsPlaySound", mKeywordsOn); + childSetEnabled("KeywordsSound", mKeywordsOn); + + childSetValue("KeywordsOn", mKeywordsOn); + childSetValue("KeywordsList", mKeywordsList); + childSetValue("KeywordsInChat", mKeywordsInChat); + childSetValue("KeywordsInIM", mKeywordsInIM); + childSetValue("KeywordsChangeColor", mKeywordsChangeColor); + + LLColorSwatchCtrl* colorctrl = getChild("KeywordsColor"); + colorctrl->set(LLColor4(mKeywordsColor),TRUE); + + childSetValue("KeywordsPlaySound", mKeywordsPlaySound); + childSetValue("KeywordsSound", mKeywordsSound); +} + +// Reset settings to local copy +void LLPrefsAscentChat::cancel() +{ + //Chat/IM ----------------------------------------------------------------------------- + gSavedSettings.setBOOL("WoLfVerticalIMTabs", mWoLfVerticalIMTabs); + gSavedSettings.setBOOL("AscentInstantMessageAnnounceIncoming", mIMAnnounceIncoming); + gSavedSettings.setBOOL("AscentHideTypingNotification", mHideTypingNotification); + gSavedSettings.setBOOL("OptionShowGroupNameInChatIM", mShowGroupNameInChatIM); + gSavedSettings.setBOOL("PlayTypingSound", mPlayTypingSound); + gSavedSettings.setBOOL("HideNotificationsInChat", mHideNotificationsInChat); + gSavedSettings.setBOOL("AscentAllowMUpose", mEnableMUPose); + gSavedSettings.setBOOL("AscentAutoCloseOOC", mEnableOOCAutoClose); + gSavedSettings.setU32("LinksForChattingObjects", mLinksForChattingObjects); + gSavedSettings.setBOOL("SecondsInChatAndIMs", mSecondsInChatAndIMs); + + std::string short_date, long_date, short_time, long_time, timestamp; + + if (mTimeFormat == 0) + { + short_time = "%H:%M"; + long_time = "%H:%M:%S"; + timestamp = " %H:%M:%S"; + } + else + { + short_time = "%I:%M %p"; + long_time = "%I:%M:%S %p"; + timestamp = " %I:%M %p"; + } + + if (mDateFormat == 0) + { + short_date = "%Y-%m-%d"; + long_date = "%A %d %B %Y"; + timestamp = "%a %d %b %Y" + timestamp; + } + else if (mDateFormat == 1) + { + short_date = "%d/%m/%Y"; + long_date = "%A %d %B %Y"; + timestamp = "%a %d %b %Y" + timestamp; + } + else + { + short_date = "%m/%d/%Y"; + long_date = "%A, %B %d %Y"; + timestamp = "%a %b %d %Y" + timestamp; + } + + gSavedSettings.setString("ShortDateFormat", short_date); + gSavedSettings.setString("LongDateFormat", long_date); + gSavedSettings.setString("ShortTimeFormat", short_time); + gSavedSettings.setString("LongTimeFormat", long_time); + gSavedSettings.setString("TimestampFormat", timestamp); + + gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseAnyone", mIMResponseAnyone); + gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseFriends", mIMResponseFriends); + gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseMuted", mIMResponseMuted); + gSavedPerAccountSettings.setBOOL("AscentInstantMessageShowOnTyping", mIMShowOnTyping); + gSavedPerAccountSettings.setBOOL("AscentInstantMessageShowResponded", mIMShowResponded); + gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseRepeat", mIMResponseRepeat); + gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseItem", mIMResponseItem); + gSavedPerAccountSettings.setString("AscentInstantMessageResponse", mIMResponseText); + + //Spam -------------------------------------------------------------------------------- + gSavedSettings.setBOOL("SGBlockChatSpam", mBlockChatSpam); + gSavedSettings.setU32("SGChatSpamCount", mChatSpamCount); + gSavedSettings.setF32("SGChatSpamTime", mChatSpamTime); + gSavedSettings.setBOOL("SGBlockDialogSpam", mBlockDialogSpam); + gSavedSettings.setBOOL("SGBlockCardSpam", mBlockCardSpam); + gSavedSettings.setU32("SGSpamCount", mSpamCount); + gSavedSettings.setF32("SGSpamTime", mSpamTime); + + //Text Options ------------------------------------------------------------------------ + gSavedSettings.setBOOL("SpellDisplay", mSpellDisplay); + gSavedPerAccountSettings.setBOOL("KeywordsOn", mKeywordsOn); + gSavedPerAccountSettings.setString("KeywordsList", mKeywordsList); + gSavedPerAccountSettings.setBOOL("KeywordsInChat", mKeywordsInChat); + gSavedPerAccountSettings.setBOOL("KeywordsInIM", mKeywordsInIM); + gSavedPerAccountSettings.setBOOL("KeywordsChangeColor", mKeywordsChangeColor); + gSavedPerAccountSettings.setColor4("KeywordsColor", mKeywordsColor); + gSavedPerAccountSettings.setBOOL("KeywordsPlaySound", mKeywordsPlaySound); + gSavedPerAccountSettings.setString("KeywordsSound", mKeywordsSound.asString()); +} + +// Update local copy so cancel has no effect +void LLPrefsAscentChat::apply() +{ + refreshValues(); + refresh(); +} diff --git a/indra/newview/ascentprefschat.h b/indra/newview/ascentprefschat.h new file mode 100644 index 000000000..85b8d45d6 --- /dev/null +++ b/indra/newview/ascentprefschat.h @@ -0,0 +1,106 @@ +/** + * @file hbprefsinert.h + * @brief Ascent Viewer preferences panel + * + * $LicenseInfo:firstyear=2008&license=viewergpl$ + * + * Copyright (c) 2008, Henri Beauchamp. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef ASCENTPREFSCHAT_H +#define ASCENTPREFSCHAT_H + + +#include "llpanel.h" + + +class LLPrefsAscentChat : public LLPanel +{ +public: + LLPrefsAscentChat(); + ~LLPrefsAscentChat(); + + void apply(); + void cancel(); + void refresh(); + void refreshValues(); + +protected: + static void onSpellAdd(void* data); + static void onSpellRemove(void* data); + static void onSpellGetMore(void* data); + static void onSpellEditCustom(void* data); + static void onSpellBaseComboBoxCommit(LLUICtrl* ctrl, void* userdata); + static void onCommitTimeDate(LLUICtrl* ctrl, void *userdata); + static void onCommitAutoResponse(LLUICtrl* ctrl, void* user_data); + static void onCommitKeywords(LLUICtrl* ctrl, void* user_data); + + //Chat/IM ----------------------------------------------------------------------------- + BOOL mWoLfVerticalIMTabs; + BOOL mIMAnnounceIncoming; + BOOL mHideTypingNotification; + BOOL mShowGroupNameInChatIM; + BOOL mPlayTypingSound; + BOOL mHideNotificationsInChat; + BOOL mEnableMUPose; + BOOL mEnableOOCAutoClose; + U32 mLinksForChattingObjects; + U32 mTimeFormat; + U32 mDateFormat; + U32 tempTimeFormat; + U32 tempDateFormat; + BOOL mSecondsInChatAndIMs; + + BOOL mIMResponseAnyone; + BOOL mIMResponseFriends; + BOOL mIMResponseMuted; + BOOL mIMShowOnTyping; + BOOL mIMShowResponded; + BOOL mIMResponseRepeat; + BOOL mIMResponseItem; + std::string mIMResponseText; + + //Spam -------------------------------------------------------------------------------- + BOOL mBlockChatSpam; + U32 mChatSpamCount; + F32 mChatSpamTime; + BOOL mBlockDialogSpam; + BOOL mBlockCardSpam; + U32 mSpamCount; + F32 mSpamTime; + + //Text Options ------------------------------------------------------------------------ + BOOL mSpellDisplay; + BOOL mKeywordsOn; + std::string mKeywordsList; + BOOL mKeywordsInChat; + BOOL mKeywordsInIM; + BOOL mKeywordsChangeColor; + LLColor4 mKeywordsColor; + BOOL mKeywordsPlaySound; + LLUUID mKeywordsSound; +}; + +#endif diff --git a/indra/newview/ascentprefssys.cpp b/indra/newview/ascentprefssys.cpp index b8461ea0b..66a8d7e72 100644 --- a/indra/newview/ascentprefssys.cpp +++ b/indra/newview/ascentprefssys.cpp @@ -34,43 +34,46 @@ //File include #include "ascentprefssys.h" -#include "llcolorswatch.h" -#include "llvoavatar.h" -#include "llhudeffectlookat.h" #include "llagent.h" #include "llaudioengine.h" //For POWER USER affirmation. -#include "llfloaterchat.h" //For POWER USER affirmation. -#include "llstartup.h" -#include "llviewercontrol.h" -#include "lluictrlfactory.h" +#include "llchat.h" +#include "llcolorswatch.h" #include "llcombobox.h" +#include "llfloaterchat.h" //For POWER USER affirmation. #include "llradiogroup.h" -#include "llwind.h" -#include "llviewernetwork.h" -#include "pipeline.h" -#include "lgghunspell_wrapper.h" +#include "lluictrlfactory.h" +#include "llviewercontrol.h" LLPrefsAscentSys::LLPrefsAscentSys() { - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_ascent_system.xml"); - childSetCommitCallback("speed_rez_check", onCommitCheckBox, this); - childSetCommitCallback("double_click_teleport_check", onCommitCheckBox, this); - childSetCommitCallback("system_folder_check", onCommitCheckBox, this); - childSetCommitCallback("show_look_at_check", onCommitCheckBox, this); - childSetCommitCallback("enable_clouds", onCommitCheckBox, this); + LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_ascent_system.xml"); - childSetCommitCallback("SpellBase", onSpellBaseComboBoxCommit, this); - childSetAction("EmSpell_EditCustom", onSpellEditCustom, this); - childSetAction("EmSpell_GetMore", onSpellGetMore, this); - childSetAction("EmSpell_Add", onSpellAdd, this); - childSetAction("EmSpell_Remove", onSpellRemove, this); + childSetCommitCallback("speed_rez_check", onCommitCheckBox, this); + childSetCommitCallback("double_click_teleport_check", onCommitCheckBox, this); + childSetCommitCallback("system_folder_check", onCommitCheckBox, this); + childSetCommitCallback("show_look_at_check", onCommitCheckBox, this); + childSetCommitCallback("enable_clouds", onCommitCheckBox, this); + childSetCommitCallback("power_user_check", onCommitCheckBox, this); + childSetCommitCallback("power_user_confirm_check", onCommitCheckBox, this); - childSetCommitCallback("Keywords_Alert", onCommitCheckBox, this); + childSetCommitCallback("chat_cmd_toggle", onCommitCmdLine, this); + childSetCommitCallback("AscentCmdLinePos", onCommitCmdLine, this); + childSetCommitCallback("AscentCmdLineGround", onCommitCmdLine, this); + childSetCommitCallback("AscentCmdLineHeight", onCommitCmdLine, this); + childSetCommitCallback("AscentCmdLineTeleportHome", onCommitCmdLine, this); + childSetCommitCallback("AscentCmdLineRezPlatform", onCommitCmdLine, this); + childSetCommitCallback("AscentCmdLineCalc", onCommitCmdLine, this); + childSetCommitCallback("AscentCmdLineClearChat", onCommitCmdLine, this); + childSetCommitCallback("AscentCmdLineDrawDistance", onCommitCmdLine, this); + childSetCommitCallback("AscentCmdTeleportToCam", onCommitCmdLine, this); + childSetCommitCallback("AscentCmdLineKeyToName", onCommitCmdLine, this); + childSetCommitCallback("AscentCmdLineOfferTp", onCommitCmdLine, this); + childSetCommitCallback("AscentCmdLineMapTo", onCommitCmdLine, this); + childSetCommitCallback("AscentCmdLineTP2", onCommitCmdLine, this); - - refreshValues(); - refresh(); + refreshValues(); + refresh(); } LLPrefsAscentSys::~LLPrefsAscentSys() @@ -80,531 +83,266 @@ LLPrefsAscentSys::~LLPrefsAscentSys() //static void LLPrefsAscentSys::onCommitCheckBox(LLUICtrl* ctrl, void* user_data) { - LLPrefsAscentSys* self = (LLPrefsAscentSys*)user_data; - - llinfos << "Change to " << ctrl->getControlName() << " aka " << ctrl->getName() << llendl; - - if (ctrl->getName() == "speed_rez_check") // Why is this one getControlName() and the rest are getName()? - { - bool enabled = self->childGetValue("speed_rez_check").asBoolean(); - self->childSetEnabled("speed_rez_interval", enabled); - self->childSetEnabled("speed_rez_seconds", enabled); - } - else if (ctrl->getName() == "show_look_at_check") - { - BOOL lookAt = self->childGetValue("show_look_at_check").asBoolean(); - LLHUDEffectLookAt::sDebugLookAt = lookAt; - gSavedSettings.setBOOL("AscentShowLookAt", lookAt); - } - else if (ctrl->getName() == "double_click_teleport_check") - { - bool enabled = self->childGetValue("double_click_teleport_check").asBoolean(); - self->childSetEnabled("center_after_teleport_check", enabled); - self->childSetEnabled("offset_teleport_check", enabled); - } - else if (ctrl->getName() == "system_folder_check") - { - bool enabled = self->childGetValue("system_folder_check").asBoolean(); - self->childSetEnabled("temp_in_system_check", enabled); - } - else if (ctrl->getName() == "enable_clouds") - { - bool enabled = self->childGetValue("enable_clouds").asBoolean(); - self->childSetEnabled("enable_classic_clouds", enabled); - } - else if (ctrl->getName() == "Keywords_Alert") - { - bool enabled = self->childGetValue("Keywords_Alert").asBoolean(); - self->childSetEnabled("Keywords_Entries", enabled); - self->childSetEnabled("Keywords_LocalChat", enabled); - self->childSetEnabled("Keywords_IM", enabled); - self->childSetEnabled("Keywords_Highlight", enabled); - self->childSetEnabled("Keywords_Color", enabled); - self->childSetEnabled("Keywords_PlaySound", enabled); - self->childSetEnabled("Keywords_SoundUUID", enabled); - } + LLPrefsAscentSys* self = (LLPrefsAscentSys*)user_data; + +// llinfos << "Change to " << ctrl->getControlName() << " aka " << ctrl->getName() << llendl; + + if (ctrl->getName() == "speed_rez_check") + { + bool enabled = self->childGetValue("speed_rez_check").asBoolean(); + self->childSetEnabled("speed_rez_interval", enabled); + self->childSetEnabled("speed_rez_seconds", enabled); + } + else if (ctrl->getName() == "double_click_teleport_check") + { + bool enabled = self->childGetValue("double_click_teleport_check").asBoolean(); + self->childSetEnabled("center_after_teleport_check", enabled); + self->childSetEnabled("offset_teleport_check", enabled); + } + else if (ctrl->getName() == "system_folder_check") + { + bool enabled = self->childGetValue("system_folder_check").asBoolean(); + self->childSetEnabled("temp_in_system_check", enabled); + } + else if (ctrl->getName() == "enable_clouds") + { + bool enabled = self->childGetValue("enable_clouds").asBoolean(); + self->childSetEnabled("enable_classic_clouds", enabled); + } + else if (ctrl->getName() == "power_user_check") + { + bool enabled = self->childGetValue("power_user_check").asBoolean(); + self->childSetEnabled("power_user_confirm_check", enabled); + self->childSetValue("power_user_confirm_check", false); + } + else if (ctrl->getName() == "power_user_confirm_check") + { + bool enabled = self->childGetValue("power_user_confirm_check").asBoolean(); + + gSavedSettings.setBOOL("AscentPowerfulWizard", enabled); + + if (enabled) + { + LLVector3d lpos_global = gAgent.getPositionGlobal(); + gAudiop->triggerSound(LLUUID("58a38e89-44c6-c52b-deb8-9f1ddc527319"), gAgent.getID(), 1.0f, LLAudioEngine::AUDIO_TYPE_UI, lpos_global); + LLChat chat; + chat.mSourceType = CHAT_SOURCE_SYSTEM; + chat.mText = llformat("You are bestowed with powers beyond mortal comprehension.\nUse your newfound abilities wisely.\nUnlocked:\n- Animation Priority up to 7 - Meant for animations that should override anything and everything at all times. DO NOT USE THIS FOR GENERAL ANIMATIONS.\n- Right click > Destroy objects - Permanently deletes an object immediately, when you don't feel like waiting for the server to respond.\n- Right Click > Explode objects - Turns an object physical, temporary, and delinks it."); + LLFloaterChat::addChat(chat); + } + } } -void LLPrefsAscentSys::onSpellAdd(void* data) +//static +void LLPrefsAscentSys::onCommitCmdLine(LLUICtrl* ctrl, void* user_data) { - LLPrefsAscentSys* self = (LLPrefsAscentSys*)data; + LLPrefsAscentSys* self = (LLPrefsAscentSys*)user_data; - if(self) - { - glggHunSpell->addButton(self->childGetValue("EmSpell_Avail").asString()); - } + if (ctrl->getName() == "chat_cmd_toggle") + { + bool enabled = self->childGetValue("chat_cmd_toggle").asBoolean(); + self->childSetEnabled("cmd_line_text_2", enabled); + self->childSetEnabled("cmd_line_text_3", enabled); + self->childSetEnabled("cmd_line_text_4", enabled); + self->childSetEnabled("cmd_line_text_5", enabled); + self->childSetEnabled("cmd_line_text_6", enabled); + self->childSetEnabled("cmd_line_text_7", enabled); + self->childSetEnabled("cmd_line_text_8", enabled); + self->childSetEnabled("cmd_line_text_9", enabled); + self->childSetEnabled("cmd_line_text_10", enabled); + self->childSetEnabled("cmd_line_text_11", enabled); + self->childSetEnabled("cmd_line_text_12", enabled); + self->childSetEnabled("cmd_line_text_13", enabled); + self->childSetEnabled("cmd_line_text_15", enabled); + self->childSetEnabled("AscentCmdLinePos", enabled); + self->childSetEnabled("AscentCmdLineGround", enabled); + self->childSetEnabled("AscentCmdLineHeight", enabled); + self->childSetEnabled("AscentCmdLineTeleportHome", enabled); + self->childSetEnabled("AscentCmdLineRezPlatform", enabled); + self->childSetEnabled("AscentPlatformSize", enabled); + self->childSetEnabled("AscentCmdLineCalc", enabled); + self->childSetEnabled("AscentCmdLineClearChat", enabled); + self->childSetEnabled("AscentCmdLineDrawDistance", enabled); + self->childSetEnabled("AscentCmdTeleportToCam", enabled); + self->childSetEnabled("AscentCmdLineKeyToName", enabled); + self->childSetEnabled("AscentCmdLineOfferTp", enabled); + self->childSetEnabled("AscentCmdLineMapTo", enabled); + self->childSetEnabled("map_to_keep_pos", enabled); + self->childSetEnabled("AscentCmdLineTP2", enabled); + } - self->refresh(); -} - -void LLPrefsAscentSys::onSpellRemove(void* data) -{ - LLPrefsAscentSys* self = (LLPrefsAscentSys*)data; - - if(self) - { - glggHunSpell->removeButton(self->childGetValue("EmSpell_Installed").asString()); - } - - self->refresh(); -} - -void LLPrefsAscentSys::onSpellGetMore(void* data) -{ - glggHunSpell->getMoreButton(data); -} - -void LLPrefsAscentSys::onSpellEditCustom(void* data) -{ - glggHunSpell->editCustomButton(); -} - -void LLPrefsAscentSys::onSpellBaseComboBoxCommit(LLUICtrl* ctrl, void* userdata) -{ - LLComboBox* box = (LLComboBox*)ctrl; - - if (box) - { - glggHunSpell->newDictSelection(box->getValue().asString()); - } + gSavedSettings.setString("AscentCmdLinePos", self->childGetValue("AscentCmdLinePos")); + gSavedSettings.setString("AscentCmdLineGround", self->childGetValue("AscentCmdLineGround")); + gSavedSettings.setString("AscentCmdLineHeight", self->childGetValue("AscentCmdLineHeight")); + gSavedSettings.setString("AscentCmdLineTeleportHome", self->childGetValue("AscentCmdLineTeleportHome")); + gSavedSettings.setString("AscentCmdLineRezPlatform", self->childGetValue("AscentCmdLineRezPlatform")); + gSavedSettings.setString("AscentCmdLineCalc", self->childGetValue("AscentCmdLineCalc")); + gSavedSettings.setString("AscentCmdLineClearChat", self->childGetValue("AscentCmdLineClearChat")); + gSavedSettings.setString("AscentCmdLineDrawDistance", self->childGetValue("AscentCmdLineDrawDistance")); + gSavedSettings.setString("AscentCmdTeleportToCam", self->childGetValue("AscentCmdTeleportToCam")); + gSavedSettings.setString("AscentCmdLineKeyToName", self->childGetValue("AscentCmdLineKeyToName")); + gSavedSettings.setString("AscentCmdLineOfferTp", self->childGetValue("AscentCmdLineOfferTp")); + gSavedSettings.setString("AscentCmdLineMapTo", self->childGetValue("AscentCmdLineMapTo")); + gSavedSettings.setString("AscentCmdLineTP2", self->childGetValue("AscentCmdLineTP2")); } void LLPrefsAscentSys::refreshValues() { - //General ----------------------------------------------------------------------------- - mDoubleClickTeleport = gSavedSettings.getBOOL("DoubleClickTeleport"); - mResetCameraAfterTP = gSavedSettings.getBOOL("OptionRotateCamAfterLocalTP"); - mOffsetTPByUserHeight = gSavedSettings.getBOOL("OptionOffsetTPByAgentHeight"); - mPreviewAnimInWorld = gSavedSettings.getBOOL("PreviewAnimInWorld"); - mSaveScriptsAsMono = gSavedSettings.getBOOL("SaveScriptsAsMono"); - mAlwaysRezInGroup = gSavedSettings.getBOOL("AscentAlwaysRezInGroup"); - //always show Build - mAlwaysShowFly = gSavedSettings.getBOOL("AscentFlyAlwaysEnabled"); - //Disable camera minimum distance - mPowerUser = gSavedSettings.getBOOL("AscentPowerfulWizard"); - mUseSystemFolder = gSavedSettings.getBOOL("AscentUseSystemFolder"); - mUploadToSystem = gSavedSettings.getBOOL("AscentSystemTemporary"); - //Chat/IMs ---------------------------------------------------------------------------- - mHideNotificationsInChat = gSavedSettings.getBOOL("HideNotificationsInChat"); - mHideTypingNotification = gSavedSettings.getBOOL("AscentHideTypingNotification"); - mPlayTypingSound = gSavedSettings.getBOOL("PlayTypingSound"); - mEnableMUPose = gSavedSettings.getBOOL("AscentAllowMUpose"); - mEnableOOCAutoClose = gSavedSettings.getBOOL("AscentAutoCloseOOC"); - mLinksForChattingObjects = gSavedSettings.getU32("LinksForChattingObjects"); - //Time format - //Date Format - mSecondsInChatAndIMs = gSavedSettings.getBOOL("SecondsInChatAndIMs"); - - //Performance ------------------------------------------------------------------------- - mFetchInventoryOnLogin = gSavedSettings.getBOOL("FetchInventoryOnLogin"); - mEnableLLWind = gSavedSettings.getBOOL("WindEnabled"); + //General ----------------------------------------------------------------------------- + mDoubleClickTeleport = gSavedSettings.getBOOL("DoubleClickTeleport"); + mResetCameraAfterTP = gSavedSettings.getBOOL("OptionRotateCamAfterLocalTP"); + mOffsetTPByUserHeight = gSavedSettings.getBOOL("OptionOffsetTPByAgentHeight"); + mPreviewAnimInWorld = gSavedSettings.getBOOL("PreviewAnimInWorld"); +// mSaveScriptsAsMono = gSavedSettings.getBOOL("SaveScriptsAsMono"); + mAlwaysRezInGroup = gSavedSettings.getBOOL("AscentAlwaysRezInGroup"); + mBuildAlwaysEnabled = gSavedSettings.getBOOL("AscentBuildAlwaysEnabled"); + mAlwaysShowFly = gSavedSettings.getBOOL("AscentFlyAlwaysEnabled"); + mDisableMinZoom = gSavedSettings.getBOOL("AscentDisableMinZoomDist"); + mPowerUser = gSavedSettings.getBOOL("AscentPowerfulWizard"); + mUseSystemFolder = gSavedSettings.getBOOL("AscentUseSystemFolder"); + mUploadToSystem = gSavedSettings.getBOOL("AscentSystemTemporary"); + mFetchInventoryOnLogin = gSavedSettings.getBOOL("FetchInventoryOnLogin"); + mEnableLLWind = gSavedSettings.getBOOL("WindEnabled"); + mEnableClouds = gSavedSettings.getBOOL("CloudsEnabled"); + mEnableClassicClouds = gSavedSettings.getBOOL("SkyUseClassicClouds"); + mSpeedRez = gSavedSettings.getBOOL("SpeedRez"); + mSpeedRezInterval = gSavedSettings.getU32("SpeedRezInterval"); - mEnableClouds = gSavedSettings.getBOOL("CloudsEnabled"); - mEnableClassicClouds = gSavedSettings.getBOOL("SkyUseClassicClouds"); + //Command Line ------------------------------------------------------------------------ + mCmdLine = gSavedSettings.getBOOL("AscentCmdLine"); + mCmdLinePos = gSavedSettings.getString("AscentCmdLinePos"); + mCmdLineGround = gSavedSettings.getString("AscentCmdLineGround"); + mCmdLineHeight = gSavedSettings.getString("AscentCmdLineHeight"); + mCmdLineTeleportHome = gSavedSettings.getString("AscentCmdLineTeleportHome"); + mCmdLineRezPlatform = gSavedSettings.getString("AscentCmdLineRezPlatform"); + mCmdPlatformSize = gSavedSettings.getF32("AscentPlatformSize"); + mCmdLineCalc = gSavedSettings.getString("AscentCmdLineCalc"); + mCmdLineClearChat = gSavedSettings.getString("AscentCmdLineClearChat"); + mCmdLineDrawDistance = gSavedSettings.getString("AscentCmdLineDrawDistance"); + mCmdTeleportToCam = gSavedSettings.getString("AscentCmdTeleportToCam"); + mCmdLineKeyToName = gSavedSettings.getString("AscentCmdLineKeyToName"); + mCmdLineOfferTp = gSavedSettings.getString("AscentCmdLineOfferTp"); + mCmdLineMapTo = gSavedSettings.getString("AscentCmdLineMapTo"); + mCmdMapToKeepPos = gSavedSettings.getBOOL("AscentMapToKeepPos"); + mCmdLineTP2 = gSavedSettings.getString("AscentCmdLineTP2"); - mSpeedRez = gSavedSettings.getBOOL("SpeedRez"); - mSpeedRezInterval = gSavedSettings.getU32("SpeedRezInterval"); - - //Command Line ------------------------------------------------------------------------ - - - //Privacy ----------------------------------------------------------------------------- - mBroadcastViewerEffects = gSavedSettings.getBOOL("BroadcastViewerEffects"); - mDisablePointAtAndBeam = gSavedSettings.getBOOL("DisablePointAtAndBeam"); - mPrivateLookAt = gSavedSettings.getBOOL("PrivateLookAt"); - mShowLookAt = LLHUDEffectLookAt::sDebugLookAt; - mRevokePermsOnStandUp = gSavedSettings.getBOOL("RevokePermsOnStandUp"); - mDisableClickSit = gSavedSettings.getBOOL("DisableClickSit"); - //Text Options ------------------------------------------------------------------------ - mSpellDisplay = gSavedSettings.getBOOL("SpellDisplay"); - - mKeywordsOn = gSavedPerAccountSettings.getBOOL("KeywordsOn"); - mKeywordsList = gSavedPerAccountSettings.getString("KeywordsList"); - mKeywordsInChat = gSavedPerAccountSettings.getBOOL("KeywordsInChat"); - mKeywordsInIM = gSavedPerAccountSettings.getBOOL("KeywordsInIM"); - mKeywordsChangeColor = gSavedPerAccountSettings.getBOOL("KeywordsChangeColor"); - mKeywordsColor = gSavedPerAccountSettings.getColor4("KeywordsColor"); - mKeywordsPlaySound = gSavedPerAccountSettings.getBOOL("KeywordsPlaySound"); - mKeywordsSound = static_cast(gSavedPerAccountSettings.getString("KeywordsSound")); + //Privacy ----------------------------------------------------------------------------- + mBroadcastViewerEffects = gSavedSettings.getBOOL("BroadcastViewerEffects"); + mDisablePointAtAndBeam = gSavedSettings.getBOOL("DisablePointAtAndBeam"); + mPrivateLookAt = gSavedSettings.getBOOL("PrivateLookAt"); + mShowLookAt = gSavedSettings.getBOOL("AscentShowLookAt"); + mRevokePermsOnStandUp = gSavedSettings.getBOOL("RevokePermsOnStandUp"); + mDisableClickSit = gSavedSettings.getBOOL("DisableClickSit"); + mDisplayScriptJumps = gSavedSettings.getBOOL("AscentDisplayTotalScriptJumps"); + mNumScriptDiff = gSavedSettings.getF32("Ascentnumscriptdiff"); } void LLPrefsAscentSys::refresh() -{ - //General ----------------------------------------------------------------------------- - childSetValue("double_click_teleport_check", mDoubleClickTeleport); - childSetValue("center_after_teleport_check", mResetCameraAfterTP); - childSetEnabled("center_after_teleport_check", mDoubleClickTeleport); - childSetValue("offset_teleport_check", mOffsetTPByUserHeight); - childSetEnabled("offset_teleport_check", mDoubleClickTeleport); - childSetValue("preview_anim_in_world_check", mPreviewAnimInWorld); - childSetValue("save_scripts_as_mono_check", mSaveScriptsAsMono); - childSetValue("always_rez_in_group_check", mAlwaysRezInGroup); - //Disable Teleport Progress - //Disable Logout progress - //always show Build - childSetValue("always_fly_check", mAlwaysShowFly); - //Disable camera minimum distance - childSetValue("power_user_check", mPowerUser); - childSetValue("power_user_confirm_check", mPowerUser); - childSetValue("system_folder_check", mUseSystemFolder); - childSetValue("temp_in_system_check", mUploadToSystem); - childSetEnabled("temp_in_system_check", mUseSystemFolder); - //Chat -------------------------------------------------------------------------------- - childSetValue("hide_notifications_in_chat_check", mHideNotificationsInChat); - childSetValue("play_typing_sound_check", mPlayTypingSound); - childSetValue("hide_typing_check", mHideTypingNotification); - childSetValue("seconds_in_chat_and_ims_check", mSecondsInChatAndIMs); - childSetValue("allow_mu_pose_check", mEnableMUPose); - childSetValue("close_ooc_check", mEnableOOCAutoClose); - LLRadioGroup* radioLinkOptions = getChild("objects_link"); - radioLinkOptions->selectNthItem(mLinksForChattingObjects); - //childSetValue("objects_link", mLinksForChattingObjects); - std::string format = gSavedSettings.getString("ShortTimeFormat"); - if (format.find("%p") == -1) - { - mTimeFormat = 0; - } - else - { - mTimeFormat = 1; - } +{ + childSetEnabled("center_after_teleport_check", mDoubleClickTeleport); + childSetEnabled("offset_teleport_check", mDoubleClickTeleport); + childSetValue("power_user_check", mPowerUser); + childSetValue("power_user_confirm_check", mPowerUser); + childSetEnabled("temp_in_system_check", mUseSystemFolder); + childSetEnabled("speed_rez_interval", mSpeedRez); + childSetEnabled("speed_rez_seconds", mSpeedRez); - format = gSavedSettings.getString("ShortDateFormat"); - if (format.find("%m/%d/%") != -1) - { - mDateFormat = 2; - } - else if (format.find("%d/%m/%") != -1) - { - mDateFormat = 1; - } - else - { - mDateFormat = 0; - } + childSetEnabled("cmd_line_text_2", mCmdLine); + childSetEnabled("cmd_line_text_3", mCmdLine); + childSetEnabled("cmd_line_text_4", mCmdLine); + childSetEnabled("cmd_line_text_5", mCmdLine); + childSetEnabled("cmd_line_text_6", mCmdLine); + childSetEnabled("cmd_line_text_7", mCmdLine); + childSetEnabled("cmd_line_text_8", mCmdLine); + childSetEnabled("cmd_line_text_9", mCmdLine); + childSetEnabled("cmd_line_text_10", mCmdLine); + childSetEnabled("cmd_line_text_11", mCmdLine); + childSetEnabled("cmd_line_text_12", mCmdLine); + childSetEnabled("cmd_line_text_13", mCmdLine); + childSetEnabled("cmd_line_text_15", mCmdLine); + childSetEnabled("AscentCmdLinePos", mCmdLine); + childSetEnabled("AscentCmdLineGround", mCmdLine); + childSetEnabled("AscentCmdLineHeight", mCmdLine); + childSetEnabled("AscentCmdLineTeleportHome", mCmdLine); + childSetEnabled("AscentCmdLineRezPlatform", mCmdLine); + childSetEnabled("AscentPlatformSize", mCmdLine); + childSetEnabled("AscentCmdLineCalc", mCmdLine); + childSetEnabled("AscentCmdLineClearChat", mCmdLine); + childSetEnabled("AscentCmdLineDrawDistance", mCmdLine); + childSetEnabled("AscentCmdTeleportToCam", mCmdLine); + childSetEnabled("AscentCmdLineKeyToName", mCmdLine); + childSetEnabled("AscentCmdLineOfferTp", mCmdLine); + childSetEnabled("AscentCmdLineMapTo", mCmdLine); + childSetEnabled("map_to_keep_pos", mCmdLine); + childSetEnabled("AscentCmdLineTP2", mCmdLine); - // time format combobox - LLComboBox* combo = getChild("time_format_combobox"); - if (combo) - { - combo->setCurrentByIndex(mTimeFormat); - } - - // date format combobox - combo = getChild("date_format_combobox"); - if (combo) - { - combo->setCurrentByIndex(mDateFormat); - } - - childSetValue("seconds_in_chat_and_ims_check", mSecondsInChatAndIMs); - - - LLWString auto_response = utf8str_to_wstring( gSavedPerAccountSettings.getString("AscentInstantMessageResponse") ); - LLWStringUtil::replaceChar(auto_response, '^', '\n'); - LLWStringUtil::replaceChar(auto_response, '%', ' '); - childSetText("im_response", wstring_to_utf8str(auto_response)); - childSetValue("AscentInstantMessageResponseFriends", gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseFriends")); - childSetValue("AscentInstantMessageResponseMuted", gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseMuted")); - childSetValue("AscentInstantMessageResponseAnyone", gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseAnyone")); - childSetValue("AscentInstantMessageShowResponded", gSavedPerAccountSettings.getBOOL("AscentInstantMessageShowResponded")); - childSetValue("AscentInstantMessageShowOnTyping", gSavedPerAccountSettings.getBOOL("AscentInstantMessageAnnounceIncoming")); - childSetValue("AscentInstantMessageResponseRepeat", gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseRepeat" )); - childSetValue("AscentInstantMessageResponseItem", gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseItem")); - - - //Save Performance -------------------------------------------------------------------- - childSetValue("fetch_inventory_on_login_check", mFetchInventoryOnLogin); - childSetValue("enable_wind", mEnableLLWind); - childSetValue("enable_clouds", mEnableClouds); - childSetValue("enable_classic_clouds", mEnableClassicClouds); - gLLWindEnabled = mEnableLLWind; - childSetValue("speed_rez_check", mSpeedRez); - childSetEnabled("speed_rez_interval", mSpeedRez); - childSetEnabled("speed_rez_seconds", mSpeedRez); - //Command Line ------------------------------------------------------------------------ - - //Privacy ----------------------------------------------------------------------------- - childSetValue("broadcast_viewer_effects", mBroadcastViewerEffects); - childSetValue("disable_point_at_and_beams_check", mDisablePointAtAndBeam); - childSetValue("private_look_at_check", mPrivateLookAt); - childSetValue("show_look_at_check", mShowLookAt); - childSetValue("revoke_perms_on_stand_up_check", mRevokePermsOnStandUp); - childSetValue("disable_click_sit_check", mDisableClickSit); - - //Text Options ------------------------------------------------------------------------ - combo = getChild("SpellBase"); - - if (combo != NULL) - { - combo->removeall(); - std::vector names = glggHunSpell->getDicts(); - - for (int i = 0; i < (int)names.size(); i++) - { - combo->add(names[i]); - } - - combo->setSimple(gSavedSettings.getString("SpellBase")); - } - - combo = getChild("EmSpell_Avail"); - - if (combo != NULL) - { - combo->removeall(); - - combo->add(""); - std::vector names = glggHunSpell->getAvailDicts(); - - for (int i = 0; i < (int)names.size(); i++) - { - combo->add(names[i]); - } - - combo->setSimple(std::string("")); - } - - combo = getChild("EmSpell_Installed"); - - if (combo != NULL) - { - combo->removeall(); - - combo->add(""); - std::vector names = glggHunSpell->getInstalledDicts(); - - for (int i = 0; i < (int)names.size(); i++) - { - combo->add(names[i]); - } - - combo->setSimple(std::string("")); - } - - childSetValue("Keywords_Alert", mKeywordsOn); - childSetValue("Keywords_Entries", mKeywordsList); - childSetValue("Keywords_LocalChat", mKeywordsInChat); - childSetValue("Keywords_IM", mKeywordsInIM); - childSetValue("Keywords_Highlight", mKeywordsChangeColor); - childSetValue("Keywords_PlaySound", mKeywordsPlaySound); - childSetValue("Keywords_SoundUUID", mKeywordsSound); - - LLColorSwatchCtrl* colorctrl = getChild("Keywords_Color"); - colorctrl->set(LLColor4(mKeywordsColor),TRUE); + childSetValue("AscentCmdLinePos", mCmdLinePos); + childSetValue("AscentCmdLineGround", mCmdLineGround); + childSetValue("AscentCmdLineHeight", mCmdLineHeight); + childSetValue("AscentCmdLineTeleportHome", mCmdLineTeleportHome); + childSetValue("AscentCmdLineRezPlatform", mCmdLineRezPlatform); + childSetValue("AscentCmdLineCalc", mCmdLineCalc); + childSetValue("AscentCmdLineClearChat", mCmdLineClearChat); + childSetValue("AscentCmdLineDrawDistance", mCmdLineDrawDistance); + childSetValue("AscentCmdTeleportToCam", mCmdTeleportToCam); + childSetValue("AscentCmdLineKeyToName", mCmdLineKeyToName); + childSetValue("AscentCmdLineOfferTp", mCmdLineOfferTp); + childSetValue("AscentCmdLineMapTo", mCmdLineMapTo); + childSetValue("AscentCmdLineTP2", mCmdLineTP2); } void LLPrefsAscentSys::cancel() -{/* - //General ----------------------------------------------------------------------------- - childSetValue("double_click_teleport_check", mDoubleClickTeleport); - childSetValue("center_after_teleport_check", mResetCameraAfterTP); - childSetValue("offset_teleport_check", mOffsetTPByUserHeight); - childSetValue("preview_anim_in_world_check", mPreviewAnimInWorld); - childSetValue("save_scripts_as_mono_check", mSaveScriptsAsMono); - childSetValue("always_rez_in_group_check", mAlwaysRezInGroup); - //Chat -------------------------------------------------------------------------------- - childSetValue("hide_notifications_in_chat_check", mHideNotificationsInChat); - childSetValue("play_typing_sound_check", mPlayTypingSound); - childSetValue("hide_typing_check", mHideTypingNotification); - childSetValue("seconds_in_chat_and_ims_check", mSecondsInChatAndIMs); - childSetValue("allow_mu_pose_check", mEnableMUPose); - childSetValue("close_ooc_check", mEnableOOCAutoClose); - //Show Links - //Time Format - //Date Format - childSetValue("seconds_in_chat_and_ims_check", mEnableOOCAutoClose); - //Save Performance -------------------------------------------------------------------- - childSetValue("fetch_inventory_on_login_check", mFetchInventoryOnLogin); - childSetValue("enable_wind", mEnableLLWind); - childSetValue("enable_clouds", mEnableClouds); - childSetValue("enable_classic_clouds", mEnableClassicClouds); - childSetValue("speed_rez_check", mSpeedRez); - if (mSpeedRez) - { - childEnable("speed_rez_interval"); - childEnable("speed_rez_seconds"); - } - else - { - childDisable("speed_rez_interval"); - childDisable("speed_rez_seconds"); - } - //Command Line ------------------------------------------------------------------------ +{ + //General ----------------------------------------------------------------------------- + gSavedSettings.setBOOL("DoubleClickTeleport", mDoubleClickTeleport); + gSavedSettings.setBOOL("OptionRotateCamAfterLocalTP", mResetCameraAfterTP); + gSavedSettings.setBOOL("OptionOffsetTPByAgentHeight", mOffsetTPByUserHeight); + gSavedSettings.setBOOL("PreviewAnimInWorld", mPreviewAnimInWorld); +// gSavedSettings.setBOOL("SaveScriptsAsMono", mSaveScriptsAsMono); + gSavedSettings.setBOOL("AscentAlwaysRezInGroup", mAlwaysRezInGroup); + gSavedSettings.setBOOL("AscentBuildAlwaysEnabled", mBuildAlwaysEnabled); + gSavedSettings.setBOOL("AscentFlyAlwaysEnabled", mAlwaysShowFly); + gSavedSettings.setBOOL("AscentDisableMinZoomDist", mDisableMinZoom); + gSavedSettings.setBOOL("AscentUseSystemFolder", mUseSystemFolder); + gSavedSettings.setBOOL("AscentSystemTemporary", mUploadToSystem); + gSavedSettings.setBOOL("FetchInventoryOnLogin", mFetchInventoryOnLogin); + gSavedSettings.setBOOL("WindEnabled", mEnableLLWind); + gSavedSettings.setBOOL("CloudsEnabled", mEnableClouds); + gSavedSettings.setBOOL("SkyUseClassicClouds", mEnableClassicClouds); + gSavedSettings.setBOOL("SpeedRez", mSpeedRez); + gSavedSettings.setU32("SpeedRezInterval", mSpeedRezInterval); - //Privacy ----------------------------------------------------------------------------- - childSetValue("broadcast_viewer_effects", mBroadcastViewerEffects); - childSetValue("disable_point_at_and_beams_check", mDisablePointAtAndBeam); - childSetValue("private_look_at_check", mPrivateLookAt); - childSetValue("revoke_perms_on_stand_up_check", mRevokePermsOnStandUp); - - childSetValue("enable_clouds", mEnableClouds); - childSetValue("enable_classic_clouds", mEnableClassicClouds); + //Command Line ------------------------------------------------------------------------ + gSavedSettings.setBOOL("AscentCmdLine", mCmdLine); + gSavedSettings.setString("AscentCmdLinePos", mCmdLinePos); + gSavedSettings.setString("AscentCmdLineGround", mCmdLineGround); + gSavedSettings.setString("AscentCmdLineHeight", mCmdLineHeight); + gSavedSettings.setString("AscentCmdLineTeleportHome", mCmdLineTeleportHome); + gSavedSettings.setString("AscentCmdLineRezPlatform", mCmdLineRezPlatform); + gSavedSettings.setF32("AscentPlatformSize", mCmdPlatformSize); + gSavedSettings.setString("AscentCmdLineCalc", mCmdLineCalc); + gSavedSettings.setString("AscentCmdLineClearChat", mCmdLineClearChat); + gSavedSettings.setString("AscentCmdLineDrawDistance", mCmdLineDrawDistance); + gSavedSettings.setString("AscentCmdTeleportToCam", mCmdTeleportToCam); + gSavedSettings.setString("AscentCmdLineKeyToName", mCmdLineKeyToName); + gSavedSettings.setString("AscentCmdLineOfferTp", mCmdLineOfferTp); + gSavedSettings.setString("AscentCmdLineMapTo", mCmdLineMapTo); + gSavedSettings.setBOOL("AscentMapToKeepPos", mCmdMapToKeepPos); + gSavedSettings.setString("AscentCmdLineTP2", mCmdLineTP2); - gLLWindEnabled = mEnableLLWind; - - //Text Options ------------------------------------------------------------------------ - childSetValue("SpellDisplay", mSpellDisplay); - - childSetValue("Keywords_Alert", mKeywordsOn); - childSetValue("Keywords_Entries", mKeywordsList); - childSetValue("Keywords_LocalChat", mKeywordsInChat); - childSetValue("Keywords_IM", mKeywordsInIM); - childSetValue("Keywords_Highlight", mKeywordsChangeColor); - childSetValue("Keywords_PlaySound", mKeywordsPlaySound); - childSetValue("Keywords_SoundUUID", mKeywordsSound); - - LLColorSwatchCtrl* colorctrl = getChild("Keywords_Color"); - colorctrl->set(LLColor4(mKeywordsColor),TRUE); -*/} + //Privacy ----------------------------------------------------------------------------- + gSavedSettings.setBOOL("BroadcastViewerEffects", mBroadcastViewerEffects); + gSavedSettings.setBOOL("DisablePointAtAndBeam", mDisablePointAtAndBeam); + gSavedSettings.setBOOL("PrivateLookAt", mPrivateLookAt); + gSavedSettings.setBOOL("AscentShowLookAt", mShowLookAt); + gSavedSettings.setBOOL("RevokePermsOnStandUp", mRevokePermsOnStandUp); + gSavedSettings.setBOOL("DisableClickSit", mDisableClickSit); + gSavedSettings.setBOOL("AscentDisplayTotalScriptJumps", mDisplayScriptJumps); + gSavedSettings.setF32("Ascentnumscriptdiff", mNumScriptDiff); +} void LLPrefsAscentSys::apply() { - std::string short_date, long_date, short_time, long_time, timestamp; - - //General ------------------------------------------------------------------------------ - gSavedSettings.setBOOL("DoubleClickTeleport", childGetValue("double_click_teleport_check")); - gSavedSettings.setBOOL("OptionRotateCamAfterLocalTP", childGetValue("center_after_teleport_check")); - gSavedSettings.setBOOL("OptionOffsetTPByAgentHeight", childGetValue("offset_teleport_check")); - gSavedSettings.setBOOL("PreviewAnimInWorld", childGetValue("preview_anim_in_world_check")); - gSavedSettings.setBOOL("SaveScriptsAsMono", childGetValue("save_scripts_as_mono_check")); - gSavedSettings.setBOOL("AscentAlwaysRezInGroup", childGetValue("always_rez_in_group_check")); - //Disable Teleport Progress - //Disable Logout progress - //always show Build - gSavedSettings.setBOOL("AscentFlyAlwaysEnabled", childGetValue("always_fly_check")); - //Disable camera minimum distance - gSavedSettings.setBOOL("AscentPowerfulWizard", (childGetValue("power_user_check") && childGetValue("power_user_confirm_check"))); - if (gSavedSettings.getBOOL("AscentPowerfulWizard") && !mPowerUser) - { - LLVector3d lpos_global = gAgent.getPositionGlobal(); - gAudiop->triggerSound(LLUUID("58a38e89-44c6-c52b-deb8-9f1ddc527319"), gAgent.getID(), 1.0f, LLAudioEngine::AUDIO_TYPE_UI, lpos_global); - LLChat chat; - chat.mSourceType = CHAT_SOURCE_SYSTEM; - chat.mText = llformat("You are bestowed with powers beyond mortal comprehension.\nUse your newfound abilities wisely.\nUnlocked:\n- Animation Priority up to 7 - Meant for animations that should override anything and everything at all times. DO NOT USE THIS FOR GENERAL ANIMATIONS.\n- Right click > Destroy objects - Permanently deletes an object immediately, when you don't feel like waiting for the server to respond.\n- Right Click > Explode objects - Turns and object physical, temporary, and delinks it."); - LLFloaterChat::addChat(chat); - } - // - //Chat/IM ------------------------------------------------------------------------------ - //Use Vertical IMs - //Script count - //Missing the echo/log option. - gSavedSettings.setBOOL("PlayTypingSound", childGetValue("play_typing_sound_check")); - gSavedSettings.setBOOL("AscentHideTypingNotification", childGetValue("hide_typing_check")); - gSavedPerAccountSettings.setBOOL("AscentInstantMessageAnnounceIncoming", childGetValue("AscentInstantMessageAnnounceIncoming").asBoolean()); - gSavedSettings.setBOOL("AscentAllowMUpose", childGetValue("allow_mu_pose_check").asBoolean()); - gSavedSettings.setBOOL("AscentAutoCloseOOC", childGetValue("close_ooc_check").asBoolean()); - //gSavedSettings.setU32("LinksForChattingObjects", childGetValue("objects_link"). ); - - LLComboBox* combo = getChild("time_format_combobox"); - if (combo) { - mTimeFormat = combo->getCurrentIndex(); - } - - combo = getChild("date_format_combobox"); - if (combo) - { - mDateFormat = combo->getCurrentIndex(); - } - - if (mTimeFormat == 0) - { - short_time = "%H:%M"; - long_time = "%H:%M:%S"; - timestamp = " %H:%M:%S"; - } - else - { - short_time = "%I:%M %p"; - long_time = "%I:%M:%S %p"; - timestamp = " %I:%M %p"; - } - - if (mDateFormat == 0) - { - short_date = "%Y-%m-%d"; - long_date = "%A %d %B %Y"; - timestamp = "%a %d %b %Y" + timestamp; - } - else if (mDateFormat == 1) - { - short_date = "%d/%m/%Y"; - long_date = "%A %d %B %Y"; - timestamp = "%a %d %b %Y" + timestamp; - } - else - { - short_date = "%m/%d/%Y"; - long_date = "%A, %B %d %Y"; - timestamp = "%a %b %d %Y" + timestamp; - } - - gSavedSettings.setString("ShortDateFormat", short_date); - gSavedSettings.setString("LongDateFormat", long_date); - gSavedSettings.setString("ShortTimeFormat", short_time); - gSavedSettings.setString("LongTimeFormat", long_time); - gSavedSettings.setString("TimestampFormat", timestamp); - gSavedSettings.setBOOL("SecondsInChatAndIMs", childGetValue("seconds_in_chat_and_ims_check").asBoolean()); - - - gSavedPerAccountSettings.setString("AscentInstantMessageResponse", childGetValue("im_response").asString()); - gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseMuted", childGetValue("AscentInstantMessageResponseMuted").asBoolean()); - gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseFriends", childGetValue("AscentInstantMessageResponseFriends").asBoolean()); - gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseMuted", childGetValue("AscentInstantMessageResponseMuted").asBoolean()); - gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseAnyone", childGetValue("AscentInstantMessageResponseAnyone").asBoolean()); - gSavedPerAccountSettings.setBOOL("AscentInstantMessageShowResponded", childGetValue("AscentInstantMessageShowResponded").asBoolean()); - gSavedPerAccountSettings.setBOOL("AscentInstantMessageShowOnTyping", childGetValue("AscentInstantMessageShowOnTyping").asBoolean()); - gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseRepeat", childGetValue("AscentInstantMessageResponseRepeat").asBoolean()); - gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseItem", childGetValue("AscentInstantMessageResponseItem").asBoolean()); - gSavedPerAccountSettings.setBOOL("AscentInstantMessageAnnounceIncoming", childGetValue("AscentInstantMessageAnnounceIncoming").asBoolean()); - - //Performance ---------------------------------------------------------------------------- - gSavedSettings.setBOOL("FetchInventoryOnLogin", childGetValue("fetch_inventory_on_login_check")); - gSavedSettings.setBOOL("WindEnabled", childGetValue("enable_wind")); - gSavedSettings.setBOOL("CloudsEnabled", childGetValue("enable_clouds")); - gSavedSettings.setBOOL("SkyUseClassicClouds", childGetValue("enable_classic_clouds")); - gSavedSettings.setBOOL("SpeedRez", childGetValue("speed_rez_check")); - gSavedSettings.setU32("SpeedRezInterval", childGetValue("speed_rez_interval").asReal()); - - //Commandline ---------------------------------------------------------------------------- - //Missing "Use Command Line" - gSavedSettings.setString("AscentCmdLinePos", childGetValue("AscentCmdLinePos")); - gSavedSettings.setString("AscentCmdLineGround", childGetValue("AscentCmdLineGround")); - gSavedSettings.setString("AscentCmdLineHeight", childGetValue("AscentCmdLineHeight")); - gSavedSettings.setString("AscentCmdLineTeleportHome", childGetValue("AscentCmdLineTeleportHome")); - gSavedSettings.setString("AscentCmdLineRezPlatform", childGetValue("AscentCmdLineRezPlatform")); - //Platform Size - gSavedSettings.setString("AscentCmdLineCalc", childGetValue("AscentCmdLineCalc")); - gSavedSettings.setString("AscentCmdLineClearChat", childGetValue("AscentCmdLineClearChat")); - //------------------------------------------------------------------------------------- - gSavedSettings.setString("AscentCmdLineDrawDistance", childGetValue("AscentCmdLineDrawDistance")); - gSavedSettings.setString("AscentCmdTeleportToCam", childGetValue("AscentCmdTeleportToCam")); - gSavedSettings.setString("AscentCmdLineKeyToName", childGetValue("AscentCmdLineKeyToName")); - gSavedSettings.setString("AscentCmdLineOfferTp", childGetValue("AscentCmdLineOfferTp")); - gSavedSettings.setString("AscentCmdLineMapTo", childGetValue("AscentCmdLineMapTo")); - gSavedSettings.setBOOL("AscentMapToKeepPos", childGetValue("AscentMapToKeepPos")); - gSavedSettings.setString("AscentCmdLineTP2", childGetValue("AscentCmdLineTP2")); - - - //Privacy -------------------------------------------------------------------------------- - gSavedSettings.setBOOL("BroadcastViewerEffects", childGetValue("broadcast_viewer_effects")); - gSavedSettings.setBOOL("DisablePointAtAndBeam", childGetValue("disable_point_at_and_beams_check")); - gSavedSettings.setBOOL("PrivateLookAt", childGetValue("private_look_at_check")); - LLHUDEffectLookAt::sDebugLookAt = childGetValue("show_look_at_check"); - gSavedSettings.setBOOL("RevokePermsOnStandUp", childGetValue("revoke_perms_on_stand_up_check")); - gSavedSettings.setBOOL("DisableClickSit", childGetValue("disable_click_sit_check")); - - - //Text Options --------------------------------------------------------------------------- - gSavedPerAccountSettings.setBOOL("KeywordsOn", childGetValue("Keywords_Alert")); - gSavedPerAccountSettings.setString("KeywordsList", childGetValue("Keywords_Entries")); - gSavedPerAccountSettings.setBOOL("KeywordsInChat", childGetValue("Keywords_LocalChat")); - gSavedPerAccountSettings.setBOOL("KeywordsInIM", childGetValue("Keywords_IM")); - gSavedPerAccountSettings.setBOOL("KeywordsChangeColor", childGetValue("Keywords_Highlight")); - gSavedPerAccountSettings.setColor4("KeywordsColor", childGetValue("Keywords_Color")); - gSavedPerAccountSettings.setBOOL("KeywordsPlaySound", childGetValue("Keywords_PlaySound")); - gSavedPerAccountSettings.setString("KeywordsSound", childGetValue("Keywords_SoundUUID")); - - refreshValues(); - refresh(); + refreshValues(); + refresh(); } diff --git a/indra/newview/ascentprefssys.h b/indra/newview/ascentprefssys.h index 06984f03a..0137ddd29 100644 --- a/indra/newview/ascentprefssys.h +++ b/indra/newview/ascentprefssys.h @@ -39,73 +39,65 @@ class LLPrefsAscentSys : public LLPanel { public: - LLPrefsAscentSys(); - ~LLPrefsAscentSys(); + LLPrefsAscentSys(); + ~LLPrefsAscentSys(); - void apply(); - void cancel(); + void apply(); + void cancel(); void refresh(); - - LLPanel* getPanel(); + void refreshValues(); protected: - static void onCommitCheckBox(LLUICtrl* ctrl, void* user_data); - static void onSpellAdd(void* data); - static void onSpellRemove(void* data); - static void onSpellGetMore(void* data); - static void onSpellEditCustom(void* data); - static void onSpellBaseComboBoxCommit(LLUICtrl* ctrl, void* userdata); - void refreshValues(); - //General ----------------------------------------------------------------------------- - BOOL mDoubleClickTeleport; - BOOL mResetCameraAfterTP; - BOOL mOffsetTPByUserHeight; - BOOL mPreviewAnimInWorld; - BOOL mSaveScriptsAsMono; - BOOL mAlwaysRezInGroup; - //Disable Teleport Progress - //Disable Logout progress - //always show Build - BOOL mAlwaysShowFly; - //Disable camera minimum distance - BOOL mPowerUser; - BOOL mUseSystemFolder; - BOOL mUploadToSystem; - //Chat/IM ----------------------------------------------------------------------------- - BOOL mHideNotificationsInChat; - BOOL mPlayTypingSound; - BOOL mHideTypingNotification; - BOOL mEnableMUPose; - BOOL mEnableOOCAutoClose; - U32 mLinksForChattingObjects; - U32 mTimeFormat; - U32 mDateFormat; - BOOL mSecondsInChatAndIMs; - //Performance ------------------------------------------------------------------------- - BOOL mFetchInventoryOnLogin; - BOOL mEnableLLWind; - BOOL mEnableClouds; - BOOL mEnableClassicClouds; - BOOL mSpeedRez; - U32 mSpeedRezInterval; - //Command Line ------------------------------------------------------------------------ - //Privacy ----------------------------------------------------------------------------- - BOOL mBroadcastViewerEffects; - BOOL mDisablePointAtAndBeam; - BOOL mPrivateLookAt; - BOOL mShowLookAt; - BOOL mRevokePermsOnStandUp; - BOOL mDisableClickSit; - //Text Options ------------------------------------------------------------------------ - BOOL mSpellDisplay; - BOOL mKeywordsOn; - std::string mKeywordsList; - BOOL mKeywordsInIM; - BOOL mKeywordsInChat; - BOOL mKeywordsChangeColor; - BOOL mKeywordsPlaySound; - LLUUID mKeywordsSound; - LLColor4 mKeywordsColor; + static void onCommitCheckBox(LLUICtrl* ctrl, void* user_data); + static void onCommitCmdLine(LLUICtrl* ctrl, void* user_data); + + //General ----------------------------------------------------------------------------- + BOOL mDoubleClickTeleport; + BOOL mResetCameraAfterTP; + BOOL mOffsetTPByUserHeight; + BOOL mPreviewAnimInWorld; +// BOOL mSaveScriptsAsMono; + BOOL mAlwaysRezInGroup; + BOOL mBuildAlwaysEnabled; + BOOL mAlwaysShowFly; + BOOL mDisableMinZoom; + BOOL mPowerUser; + BOOL mUseSystemFolder; + BOOL mUploadToSystem; + BOOL mFetchInventoryOnLogin; + BOOL mEnableLLWind; + BOOL mEnableClouds; + BOOL mEnableClassicClouds; + BOOL mSpeedRez; + U32 mSpeedRezInterval; + + //Command Line ------------------------------------------------------------------------ + BOOL mCmdLine; + std::string mCmdLinePos; + std::string mCmdLineGround; + std::string mCmdLineHeight; + std::string mCmdLineTeleportHome; + std::string mCmdLineRezPlatform; + F32 mCmdPlatformSize; + std::string mCmdLineCalc; + std::string mCmdLineClearChat; + std::string mCmdLineDrawDistance; + std::string mCmdTeleportToCam; + std::string mCmdLineKeyToName; + std::string mCmdLineOfferTp; + std::string mCmdLineMapTo; + BOOL mCmdMapToKeepPos; + std::string mCmdLineTP2; + + //Privacy ----------------------------------------------------------------------------- + BOOL mBroadcastViewerEffects; + BOOL mDisablePointAtAndBeam; + BOOL mPrivateLookAt; + BOOL mShowLookAt; + BOOL mRevokePermsOnStandUp; + BOOL mDisableClickSit; + BOOL mDisplayScriptJumps; + F32 mNumScriptDiff; }; #endif diff --git a/indra/newview/ascentprefsvan.cpp b/indra/newview/ascentprefsvan.cpp index 7996fb106..4ff96a614 100644 --- a/indra/newview/ascentprefsvan.cpp +++ b/indra/newview/ascentprefsvan.cpp @@ -49,311 +49,287 @@ #include "llviewernetwork.h" #include "pipeline.h" -class LLPrefsAscentVanImpl : public LLPanel -{ -public: - LLPrefsAscentVanImpl(); - /*virtual*/ ~LLPrefsAscentVanImpl() { }; - - virtual void refresh(); - - void apply(); - void cancel(); - -private: - static void onCommitCheckBox(LLUICtrl* ctrl, void* user_data); - static void onCommitColor(LLUICtrl* ctrl, void* user_data); - static void onManualClientUpdate(void* data); - void refreshValues(); - //General - BOOL mUseAccountSettings; - BOOL mShowTPScreen; - BOOL mPlayTPSound; - BOOL mShowLogScreens; - //Colors - BOOL mShowSelfClientTag; - BOOL mShowSelfClientTagColor; - BOOL mCustomTagOn; - std::string mCustomTagLabel; - LLColor4 mCustomTagColor; - LLColor4 mEffectColor; - LLColor4 mFriendColor; - LLColor4 mLindenColor; - LLColor4 mMutedColor; - LLColor4 mEMColor; - U32 mSelectedClient; -}; - - -LLPrefsAscentVanImpl::LLPrefsAscentVanImpl() - : LLPanel(std::string("Ascent")) -{ - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_ascent_vanity.xml"); - childSetCommitCallback("use_account_settings_check", onCommitCheckBox, this); - childSetCommitCallback("customize_own_tag_check", onCommitCheckBox, this); - childSetCommitCallback("show_friend_tag_check", onCommitCheckBox, this); - childSetCommitCallback("use_status_check", onCommitCheckBox, this); - - childSetCommitCallback("custom_tag_color_swatch", onCommitColor, this); - childSetCommitCallback("effect_color_swatch", onCommitColor, this); - - childSetCommitCallback("X Modifier", LLPrefsAscentVan::onCommitUpdateAvatarOffsets); - childSetCommitCallback("Y Modifier", LLPrefsAscentVan::onCommitUpdateAvatarOffsets); - childSetCommitCallback("Z Modifier", LLPrefsAscentVan::onCommitUpdateAvatarOffsets); - - childSetAction("update_clientdefs", onManualClientUpdate, this); - refresh(); - -} - -void LLPrefsAscentVan::onCommitUpdateAvatarOffsets(LLUICtrl* ctrl, void* userdata) -{ - gAgent.sendAgentSetAppearance(); - //llinfos << llformat("%d,%d,%d",gSavedSettings.getF32("EmeraldAvatarXModifier"),gSavedSettings.getF32("EmeraldAvatarYModifier"),gSavedSettings.getF32("EmeraldAvatarZModifier")) << llendl; -} - -void LLPrefsAscentVanImpl::onCommitColor(LLUICtrl* ctrl, void* user_data) -{ - LLPrefsAscentVanImpl* self = (LLPrefsAscentVanImpl*)user_data; - - llinfos << "Control named " << ctrl->getControlName() << " aka " << ctrl->getName() << llendl; - - if (ctrl->getName() == "custom_tag_color_swatch") - { - - llinfos << "Recreating color message for tag update." << llendl; - gSavedSettings.setString("AscentCustomTagLabel", self->childGetValue("custom_tag_label_box")); - gSavedSettings.setColor4("AscentCustomTagColor", self->childGetValue("custom_tag_color_swatch")); - gAgent.sendAgentSetAppearance(); - gAgent.resetClientTag(); - } -} - -void LLPrefsAscentVanImpl::onManualClientUpdate(void* data) -{ - LLChat chat; - chat.mSourceType = CHAT_SOURCE_SYSTEM; - chat.mText = llformat("Definitions already up-to-date."); - if (LLVOAvatar::updateClientTags()) - { - chat.mText = llformat("Client definitions updated."); - LLVOAvatar::loadClientTags(); - for (std::vector::iterator iter = LLCharacter::sInstances.begin(); - iter != LLCharacter::sInstances.end(); ++iter) - { - LLVOAvatar* avatarp = (LLVOAvatar*) *iter; - if(avatarp) - { - LLVector3 root_pos_last = avatarp->mRoot.getWorldPosition(); - avatarp->mClientTag = ""; - } - } - } - LLFloaterChat::addChat(chat); - -} - -//static -void LLPrefsAscentVanImpl::onCommitCheckBox(LLUICtrl* ctrl, void* user_data) -{ - - LLPrefsAscentVanImpl* self = (LLPrefsAscentVanImpl*)user_data; - - llinfos << "Control named " << ctrl->getControlName() << llendl; - if (ctrl->getControlName() == "AscentStoreSettingsPerAccount") - { - self->refresh(); - } - - if ((ctrl->getName() == "show_friend_tag_check")||(ctrl->getName() == "use_status_check")) - { - for (std::vector::iterator iter = LLCharacter::sInstances.begin(); - iter != LLCharacter::sInstances.end(); ++iter) - { - LLVOAvatar* avatarp = (LLVOAvatar*) *iter; - if(avatarp) - { - LLVector3 root_pos_last = avatarp->mRoot.getWorldPosition(); - avatarp->mClientTag = ""; - } - } - } - - BOOL showCustomOptions; - showCustomOptions = gSavedSettings.getBOOL("AscentUseCustomTag"); - self->childSetValue("customize_own_tag_check", showCustomOptions); - self->childSetEnabled("custom_tag_label_text", showCustomOptions); - self->childSetEnabled("custom_tag_label_box", showCustomOptions); - self->childSetEnabled("custom_tag_color_text", showCustomOptions); - self->childSetEnabled("custom_tag_color_swatch", showCustomOptions); - if (!gAgent.getID().isNull()) - gAgent.resetClientTag(); -} - -void LLPrefsAscentVanImpl::refreshValues() -{ - //General - mUseAccountSettings = gSavedSettings.getBOOL("AscentStoreSettingsPerAccount"); - mShowTPScreen = !gSavedSettings.getBOOL("AscentDisableTeleportScreens"); - mPlayTPSound = gSavedSettings.getBOOL("OptionPlayTpSound"); - mShowLogScreens = !gSavedSettings.getBOOL("AscentDisableLogoutScreens"); - - //Colors - mShowSelfClientTag = gSavedSettings.getBOOL("AscentShowSelfTag"); - mShowSelfClientTagColor = gSavedSettings.getBOOL("AscentShowSelfTagColor"); - mCustomTagOn = gSavedSettings.getBOOL("AscentUseCustomTag"); - - mSelectedClient = gSavedSettings.getU32("AscentReportClientIndex"); - mEffectColor = gSavedSettings.getColor4("EffectColor"); - - childSetEnabled("custom_tag_label_text", mCustomTagOn); - childSetEnabled("custom_tag_label_box", mCustomTagOn); - childSetEnabled("custom_tag_color_text", mCustomTagOn); - childSetEnabled("custom_tag_color_swatch", mCustomTagOn); - - mCustomTagLabel = gSavedSettings.getString("AscentCustomTagLabel"); - mCustomTagColor = gSavedSettings.getColor4("AscentCustomTagColor"); - mFriendColor = gSavedSettings.getColor4("AscentFriendColor"); - mLindenColor = gSavedSettings.getColor4("AscentLindenColor"); - mMutedColor = gSavedSettings.getColor4("AscentMutedColor"); - mEMColor = gSavedSettings.getColor4("AscentEstateOwnerColor"); - //mCustomColor = gSavedSettings.getColor4("MoyMiniMapCustomColor"); -} - -void LLPrefsAscentVanImpl::refresh() -{ - refreshValues(); - //General -------------------------------------------------------------------------------- - childSetValue("use_account_settings_check", mUseAccountSettings); - childSetValue("disable_tp_screen_check", mShowTPScreen); - childSetValue("tp_sound_check", mPlayTPSound); - childSetValue("disable_logout_screen_check", mShowLogScreens); - - //Colors --------------------------------------------------------------------------------- - LLComboBox* combo = getChild("tag_spoofing_combobox"); - combo->setCurrentByIndex(mSelectedClient); - - childSetValue("show_self_tag_check", mShowSelfClientTag); - childSetValue("show_self_tag_color_check", mShowSelfClientTagColor); - childSetValue("customize_own_tag_check", mCustomTagOn); - childSetValue("custom_tag_label_box", mCustomTagLabel); - - getChild("effect_color_swatch")->set(mEffectColor); - getChild("custom_tag_color_swatch")->set(mCustomTagColor); - getChild("friend_color_swatch")->set(mFriendColor); - getChild("linden_color_swatch")->set(mLindenColor); - getChild("muted_color_swatch")->set(mMutedColor); - getChild("em_color_swatch")->set(mEMColor); - //getChild("custom_color_swatch")->set(mCustomColor); - gSavedSettings.setColor4("EffectColor", LLColor4::white); - gSavedSettings.setColor4("EffectColor", mEffectColor); - - gSavedSettings.setColor4("AscentFriendColor", LLColor4::white); - gSavedSettings.setColor4("AscentFriendColor", mFriendColor); - - gSavedSettings.setColor4("AscentLindenColor", LLColor4::white); - gSavedSettings.setColor4("AscentLindenColor", mLindenColor); - - gSavedSettings.setColor4("AscentMutedColor", LLColor4::white); - gSavedSettings.setColor4("AscentMutedColor", mMutedColor); - - gSavedSettings.setColor4("AscentEstateOwnerColor", LLColor4::white); - gSavedSettings.setColor4("AscentEstateOwnerColor", mEMColor); - - //gSavedSettings.setColor4("MoyMiniMapCustomColor", LLColor4::white); - //gSavedSettings.setColor4("MoyMiniMapCustomColor", mCustomColor); - gAgent.resetClientTag(); -} - -void LLPrefsAscentVanImpl::cancel() -{ - //General -------------------------------------------------------------------------------- - childSetValue("use_account_settings_check", mUseAccountSettings); - childSetValue("disable_tp_screen_check", mShowTPScreen); - childSetValue("tp_sound_check", mPlayTPSound); - childSetValue("disable_logout_screen_check", mShowLogScreens); - - gSavedSettings.setColor4("EffectColor", LLColor4::white); - gSavedSettings.setColor4("EffectColor", mEffectColor); - gSavedSettings.setColor4("AscentFriendColor", LLColor4::yellow); - gSavedSettings.setColor4("AscentFriendColor", mFriendColor); - gSavedSettings.setColor4("AscentLindenColor", LLColor4::yellow); - gSavedSettings.setColor4("AscentLindenColor", mLindenColor); - gSavedSettings.setColor4("AscentMutedColor", LLColor4::yellow); - gSavedSettings.setColor4("AscentMutedColor", mMutedColor); - gSavedSettings.setColor4("AscentEstateOwnerColor", LLColor4::yellow); - gSavedSettings.setColor4("AscentEstateOwnerColor", mEMColor); - //gSavedSettings.setColor4("MoyMiniMapCustomColor", LLColor4::yellow); - //gSavedSettings.setColor4("MoyMiniMapCustomColor", mCustomColor); -} - -void LLPrefsAscentVanImpl::apply() -{ - std::string client_uuid; - U32 client_index; - //General ----------------------------------------------------------------------------- - gSavedSettings.setBOOL("AscentDisableTeleportScreens", !childGetValue("disable_tp_screen_check")); - gSavedSettings.setBOOL("OptionPlayTpSound", childGetValue("tp_sound_check")); - gSavedSettings.setBOOL("AscentDisableLogoutScreens", !childGetValue("disable_logout_screen_check")); - - //Colors ------------------------------------------------------------------------------ - LLComboBox* combo = getChild("tag_spoofing_combobox"); - if (combo) - { - client_index = combo->getCurrentIndex(); - //Don't rebake if it's not neccesary. - if (client_index != mSelectedClient) - { - client_uuid = combo->getSelectedValue().asString(); - gSavedSettings.setString("AscentReportClientUUID", client_uuid); - gSavedSettings.setU32("AscentReportClientIndex", client_index); - LLVOAvatar* avatar = gAgent.getAvatarObject(); - if (!avatar) return; - - // Slam pending upload count to "unstick" things - bool slam_for_debug = true; - avatar->forceBakeAllTextures(slam_for_debug); - } - } - gSavedSettings.setBOOL("AscentShowSelfTag", childGetValue("show_self_tag_check")); - gSavedSettings.setBOOL("AscentShowSelfTagColor", childGetValue("show_self_tag_color_check")); - - gSavedSettings.setColor4("EffectColor", childGetValue("effect_color_swatch")); - gSavedSettings.setColor4("AscentFriendColor", childGetValue("friend_color_swatch")); - gSavedSettings.setColor4("AscentLindenColor", childGetValue("linden_color_swatch")); - gSavedSettings.setColor4("AscentMutedColor", childGetValue("muted_color_swatch")); - gSavedSettings.setColor4("AscentEstateOwnerColor", childGetValue("em_color_swatch")); - gSavedSettings.setColor4("MoyMiniMapCustomColor", childGetValue("custom_color_swatch")); - gSavedSettings.setBOOL("AscentUseCustomTag", childGetValue("customize_own_tag_check")); - gSavedSettings.setString("AscentCustomTagLabel", childGetValue("custom_tag_label_box")); - gSavedSettings.setColor4("AscentCustomTagColor", childGetValue("custom_tag_color_swatch")); - - refreshValues(); -} - -//--------------------------------------------------------------------------- LLPrefsAscentVan::LLPrefsAscentVan() -: impl(* new LLPrefsAscentVanImpl()) { + LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_ascent_vanity.xml"); + + childSetCommitCallback("tag_spoofing_combobox", onCommitClientTag, this); + + childSetCommitCallback("show_my_tag_check", onCommitCheckBox, this); + childSetCommitCallback("show_self_tag_check", onCommitCheckBox, this); + childSetCommitCallback("show_self_tag_color_check", onCommitCheckBox, this); + childSetCommitCallback("customize_own_tag_check", onCommitCheckBox, this); + childSetCommitCallback("show_friend_tag_check", onCommitCheckBox, this); + childSetCommitCallback("use_status_check", onCommitCheckBox, this); + + childSetCommitCallback("custom_tag_label_box", onCommitTextModified, this); + + childSetCommitCallback("X Modifier", onCommitUpdateAvatarOffsets); + childSetCommitCallback("Y Modifier", onCommitUpdateAvatarOffsets); + childSetCommitCallback("Z Modifier", onCommitUpdateAvatarOffsets); + + childSetAction("update_clientdefs", onManualClientUpdate, this); + + refreshValues(); + refresh(); } LLPrefsAscentVan::~LLPrefsAscentVan() { - delete &impl; } -void LLPrefsAscentVan::apply() +//static +void LLPrefsAscentVan::onCommitClientTag(LLUICtrl* ctrl, void* userdata) { - impl.apply(); + std::string client_uuid; + U32 client_index; + + LLPrefsAscentVan* self = (LLPrefsAscentVan*)userdata; + LLComboBox* combo = (LLComboBox*)ctrl; + + if (combo) + { + client_index = combo->getCurrentIndex(); + //Don't rebake if it's not neccesary. + if (client_index != self->mSelectedClient) + { + client_uuid = combo->getSelectedValue().asString(); + gSavedSettings.setString("AscentReportClientUUID", client_uuid); + gSavedSettings.setU32("AscentReportClientIndex", client_index); + + LLVOAvatar* avatar = gAgent.getAvatarObject(); + + if (avatar) + { + // Slam pending upload count to "unstick" things + bool slam_for_debug = true; + avatar->forceBakeAllTextures(slam_for_debug); + } + } + } } +//static +void LLPrefsAscentVan::onCommitUpdateAvatarOffsets(LLUICtrl* ctrl, void* userdata) +{ + if (!gAgent.getID().isNull()) + { + gAgent.sendAgentSetAppearance(); + } +} + +//static +void LLPrefsAscentVan::onCommitTextModified(LLUICtrl* ctrl, void* userdata) +{ + LLPrefsAscentVan* self = (LLPrefsAscentVan*)userdata; + + if (ctrl->getName() == "custom_tag_label_box") + { + gSavedSettings.setString("AscentCustomTagLabel", self->childGetValue("custom_tag_label_box")); + } +} + +//static +void LLPrefsAscentVan::onManualClientUpdate(void* data) +{ + LLChat chat; + chat.mSourceType = CHAT_SOURCE_SYSTEM; + chat.mText = llformat("Definitions already up-to-date."); + if (LLVOAvatar::updateClientTags()) + { + chat.mText = llformat("Client definitions updated."); + LLVOAvatar::loadClientTags(); + for (std::vector::iterator iter = LLCharacter::sInstances.begin(); + iter != LLCharacter::sInstances.end(); ++iter) + { + LLVOAvatar* avatarp = (LLVOAvatar*) *iter; + if(avatarp) + { + LLVector3 root_pos_last = avatarp->mRoot.getWorldPosition(); + avatarp->mClientTag = ""; + } + } + } + LLFloaterChat::addChat(chat); +} + +//static +void LLPrefsAscentVan::onCommitCheckBox(LLUICtrl* ctrl, void* user_data) +{ + LLPrefsAscentVan* self = (LLPrefsAscentVan*)user_data; + +// llinfos << "Control named " << ctrl->getControlName() << llendl; + + if (ctrl->getName() == "show_friend_tag_check") + { + for (std::vector::iterator iter = LLCharacter::sInstances.begin(); + iter != LLCharacter::sInstances.end(); ++iter) + { + LLVOAvatar* avatarp = (LLVOAvatar*) *iter; + if(avatarp) + { + LLVector3 root_pos_last = avatarp->mRoot.getWorldPosition(); + avatarp->mClientTag = ""; + } + } + } + else if (ctrl->getName() == "use_status_check") + { + for (std::vector::iterator iter = LLCharacter::sInstances.begin(); + iter != LLCharacter::sInstances.end(); ++iter) + { + LLVOAvatar* avatarp = (LLVOAvatar*) *iter; + if(avatarp) + { + LLVector3 root_pos_last = avatarp->mRoot.getWorldPosition(); + avatarp->mClientTag = ""; + } + } + + BOOL showCustomColors = gSavedSettings.getBOOL("AscentUseStatusColors"); + self->childSetEnabled("friends_color_textbox", showCustomColors); + self->childSetEnabled("friend_color_swatch", showCustomColors); + self->childSetEnabled("estate_owner_color_swatch", showCustomColors); + self->childSetEnabled("linden_color_swatch", showCustomColors); + self->childSetEnabled("muted_color_swatch", showCustomColors); + } + else if (ctrl->getName() == "customize_own_tag_check") + { + BOOL showCustomOptions = gSavedSettings.getBOOL("AscentUseCustomTag"); + self->childSetEnabled("custom_tag_label_text", showCustomOptions); + self->childSetEnabled("custom_tag_label_box", showCustomOptions); + self->childSetEnabled("custom_tag_color_text", showCustomOptions); + self->childSetEnabled("custom_tag_color_swatch", showCustomOptions); + } + + if (!gAgent.getID().isNull()) + { + gAgent.sendAgentSetAppearance(); + gAgent.resetClientTag(); + } +} + +// Store current settings for cancel +void LLPrefsAscentVan::refreshValues() +{ + //General -------------------------------------------------------------------------------- + mUseAccountSettings = gSavedSettings.getBOOL("AscentStoreSettingsPerAccount"); + mShowTPScreen = !gSavedSettings.getBOOL("AscentDisableTeleportScreens"); + mPlayTPSound = gSavedSettings.getBOOL("OptionPlayTpSound"); + mShowLogScreens = !gSavedSettings.getBOOL("AscentDisableLogoutScreens"); + + //Tags\Colors ---------------------------------------------------------------------------- + mAscentUseTag = gSavedSettings.getBOOL("AscentUseTag"); + mReportClientUUID = gSavedSettings.getString("AscentReportClientUUID"); + mSelectedClient = gSavedSettings.getU32("AscentReportClientIndex"); + mShowSelfClientTag = gSavedSettings.getBOOL("AscentShowSelfTag"); + mShowSelfClientTagColor = gSavedSettings.getBOOL("AscentShowSelfTagColor"); + mShowFriendsTag = gSavedSettings.getBOOL("AscentShowFriendsTag"); + mCustomTagOn = gSavedSettings.getBOOL("AscentUseCustomTag"); + mCustomTagLabel = gSavedSettings.getString("AscentCustomTagLabel"); + mCustomTagColor = gSavedSettings.getColor4("AscentCustomTagColor"); + mShowOthersTag = gSavedSettings.getBOOL("AscentShowOthersTag"); + mShowOthersTagColor = gSavedSettings.getBOOL("AscentShowOthersTagColor"); + mShowIdleTime = gSavedSettings.getBOOL("AscentShowIdleTime"); + mUseStatusColors = gSavedSettings.getBOOL("AscentUseStatusColors"); + mUpdateTagsOnLoad = gSavedSettings.getBOOL("AscentUpdateTagsOnLoad"); + mEffectColor = gSavedSettings.getColor4("EffectColor"); + mFriendColor = gSavedSettings.getColor4("AscentFriendColor"); + mEstateOwnerColor = gSavedSettings.getColor4("AscentEstateOwnerColor"); + mLindenColor = gSavedSettings.getColor4("AscentLindenColor"); + mMutedColor = gSavedSettings.getColor4("AscentMutedColor"); + //mCustomColor = gSavedSettings.getColor4("MoyMiniMapCustomColor"); + + //Body Dynamics -------------------------------------------------------------------------- + mBreastPhysicsToggle = gSavedSettings.getBOOL("EmeraldBreastPhysicsToggle"); + mBoobMass = gSavedSettings.getF32("EmeraldBoobMass"); + mBoobHardness = gSavedSettings.getF32("EmeraldBoobHardness"); + mBoobVelMax = gSavedSettings.getF32("EmeraldBoobVelMax"); + mBoobFriction = gSavedSettings.getF32("EmeraldBoobFriction"); + mBoobVelMin = gSavedSettings.getF32("EmeraldBoobVelMin"); + + mAvatarXModifier = gSavedSettings.getF32("AscentAvatarXModifier"); + mAvatarYModifier = gSavedSettings.getF32("AscentAvatarYModifier"); + mAvatarZModifier = gSavedSettings.getF32("AscentAvatarZModifier"); +} + +// Update controls based on current settings +void LLPrefsAscentVan::refresh() +{ + //General -------------------------------------------------------------------------------- + + //Tags\Colors ---------------------------------------------------------------------------- + LLComboBox* combo = getChild("tag_spoofing_combobox"); + combo->setCurrentByIndex(mSelectedClient); + + childSetEnabled("friends_color_textbox", mUseStatusColors); + childSetEnabled("friend_color_swatch", mUseStatusColors); + childSetEnabled("estate_owner_color_swatch", mUseStatusColors); + childSetEnabled("linden_color_swatch", mUseStatusColors); + childSetEnabled("muted_color_swatch", mUseStatusColors); + + childSetEnabled("custom_tag_label_text", mCustomTagOn); + childSetEnabled("custom_tag_label_box", mCustomTagOn); + childSetValue("custom_tag_label_box", gSavedSettings.getString("AscentCustomTagLabel")); + childSetEnabled("custom_tag_color_text", mCustomTagOn); + childSetEnabled("custom_tag_color_swatch", mCustomTagOn); + + //Body Dynamics -------------------------------------------------------------------------- + childSetEnabled("EmeraldBoobMass", mBreastPhysicsToggle); + childSetEnabled("EmeraldBoobHardness", mBreastPhysicsToggle); + childSetEnabled("EmeraldBoobVelMax", mBreastPhysicsToggle); + childSetEnabled("EmeraldBoobFriction", mBreastPhysicsToggle); + childSetEnabled("EmeraldBoobVelMin", mBreastPhysicsToggle); +} + +// Reset settings to local copy void LLPrefsAscentVan::cancel() { - impl.cancel(); + //General -------------------------------------------------------------------------------- + gSavedSettings.setBOOL("AscentStoreSettingsPerAccount", mUseAccountSettings); + gSavedSettings.setBOOL("AscentDisableTeleportScreens", !mShowTPScreen); + gSavedSettings.setBOOL("OptionPlayTpSound", mPlayTPSound); + gSavedSettings.setBOOL("AscentDisableLogoutScreens", !mShowLogScreens); + + //Tags\Colors ---------------------------------------------------------------------------- + gSavedSettings.setBOOL("AscentUseTag", mAscentUseTag); + gSavedSettings.setString("AscentReportClientUUID", mReportClientUUID); + gSavedSettings.setU32("AscentReportClientIndex", mSelectedClient); + gSavedSettings.setBOOL("AscentShowSelfTag", mShowSelfClientTag); + gSavedSettings.setBOOL("AscentShowSelfTagColor", mShowSelfClientTagColor); + gSavedSettings.setBOOL("AscentShowFriendsTag", mShowFriendsTag); + gSavedSettings.setBOOL("AscentUseCustomTag", mCustomTagOn); + gSavedSettings.setString("AscentCustomTagLabel", mCustomTagLabel); + gSavedSettings.setColor4("AscentCustomTagColor", mCustomTagColor); + gSavedSettings.setBOOL("AscentShowOthersTag", mShowOthersTag); + gSavedSettings.setBOOL("AscentShowOthersTagColor", mShowOthersTagColor); + gSavedSettings.setBOOL("AscentShowIdleTime", mShowIdleTime); + gSavedSettings.setBOOL("AscentUseStatusColors", mUseStatusColors); + gSavedSettings.setBOOL("AscentUpdateTagsOnLoad", mUpdateTagsOnLoad); + gSavedSettings.setColor4("EffectColor", mEffectColor); + gSavedSettings.setColor4("AscentFriendColor", mFriendColor); + gSavedSettings.setColor4("AscentEstateOwnerColor", mEstateOwnerColor); + gSavedSettings.setColor4("AscentLindenColor", mLindenColor); + gSavedSettings.setColor4("AscentMutedColor", mMutedColor); +// gSavedSettings.setColor4("MoyMiniMapCustomColor", mCustomColor); + + //Body Dynamics -------------------------------------------------------------------------- + gSavedSettings.setBOOL("EmeraldBreastPhysicsToggle", mBreastPhysicsToggle); + gSavedSettings.setF32("EmeraldBoobMass", mBoobMass); + gSavedSettings.setF32("EmeraldBoobHardness", mBoobHardness); + gSavedSettings.setF32("EmeraldBoobVelMax", mBoobVelMax); + gSavedSettings.setF32("EmeraldBoobFriction", mBoobFriction); + gSavedSettings.setF32("EmeraldBoobVelMin", mBoobVelMin); + + gSavedSettings.setF32("AscentAvatarXModifier", mAvatarXModifier); + gSavedSettings.setF32("AscentAvatarYModifier", mAvatarYModifier); + gSavedSettings.setF32("AscentAvatarZModifier", mAvatarZModifier); } -LLPanel* LLPrefsAscentVan::getPanel() +// Update local copy so cancel has no effect +void LLPrefsAscentVan::apply() { - return &impl; + refreshValues(); + refresh(); } diff --git a/indra/newview/ascentprefsvan.h b/indra/newview/ascentprefsvan.h index 0cd18d98f..5545c5b2f 100644 --- a/indra/newview/ascentprefsvan.h +++ b/indra/newview/ascentprefsvan.h @@ -34,27 +34,62 @@ #include "llpanel.h" -class LLPanel; -class LLPrefsAscentVanImpl; -class LLPrefsAscentVan +class LLPrefsAscentVan : public LLPanel { public: - LLPrefsAscentVan(); - ~LLPrefsAscentVan(); + LLPrefsAscentVan(); + ~LLPrefsAscentVan(); - void apply(); - void cancel(); - - LLPanel* getPanel(); - - static void onCommitUpdateAvatarOffsets(LLUICtrl* ctrl, void* userdata); + void apply(); + void cancel(); + void refresh(); + void refreshValues(); protected: - LLPrefsAscentVanImpl& impl; + static void onCommitClientTag(LLUICtrl* ctrl, void* userdata); + static void onCommitUpdateAvatarOffsets(LLUICtrl* ctrl, void* userdata); + static void onCommitCheckBox(LLUICtrl* ctrl, void* user_data); + static void onCommitTextModified(LLUICtrl* ctrl, void* userdata); + static void onManualClientUpdate(void* data); + //General + BOOL mUseAccountSettings; + BOOL mShowTPScreen; + BOOL mPlayTPSound; + BOOL mShowLogScreens; + //Tags\Colors + BOOL mAscentUseTag; + std::string mReportClientUUID; + U32 mSelectedClient; + BOOL mShowSelfClientTag; + BOOL mShowSelfClientTagColor; + BOOL mShowFriendsTag; + BOOL mCustomTagOn; + std::string mCustomTagLabel; + LLColor4 mCustomTagColor; + BOOL mShowOthersTag; + BOOL mShowOthersTagColor; + BOOL mShowIdleTime; + BOOL mUseStatusColors; + BOOL mUpdateTagsOnLoad; + LLColor4 mEffectColor; + LLColor4 mFriendColor; + LLColor4 mEstateOwnerColor; + LLColor4 mLindenColor; + LLColor4 mMutedColor; + //Body Dynamics + BOOL mBreastPhysicsToggle; + F32 mBoobMass; + F32 mBoobHardness; + F32 mBoobVelMax; + F32 mBoobFriction; + F32 mBoobVelMin; + F32 mAvatarXModifier; + F32 mAvatarYModifier; + F32 mAvatarZModifier; private: - + }; #endif diff --git a/indra/newview/lggdicdownload.cpp b/indra/newview/lggdicdownload.cpp index 734a42814..03a83aff0 100644 --- a/indra/newview/lggdicdownload.cpp +++ b/indra/newview/lggdicdownload.cpp @@ -43,7 +43,7 @@ #include "llcolorswatch.h" #include "llcombobox.h" #include "llview.h" -#include "ascentprefssys.h" +#include "ascentprefschat.h" #include "llviewercontrol.h" #include "llhttpclient.h" #include "llbufferstream.h" @@ -76,7 +76,7 @@ public: static void onClickDownload(void* data); std::vector sNames; std::vector lNames; - LLPrefsAscentSys * empanel; + LLPrefsAscentChat * empanel; }; lggDicDownloadFloater::~lggDicDownloadFloater() @@ -104,7 +104,7 @@ void lggDicDownloadFloater::setData(std::vector shortNames, std::ve { sNames = shortNames; lNames = longNames; - empanel = (LLPrefsAscentSys*)data; + empanel = (LLPrefsAscentChat*)data; LLComboBox* comboBox = getChild("Emerald_combo_dics"); if (comboBox != NULL) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 6047cde43..891b08ecb 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -631,7 +631,6 @@ bool LLAppViewer::init() gSavedSettings.setS32("NumSessions", mNumSessions); gSavedSettings.setString("HelpLastVisitedURL",gSavedSettings.getString("HelpHomeURL")); - LLHUDEffectLookAt::sDebugLookAt = gSavedSettings.getBOOL("AscentShowLookAt"); if (gSavedSettings.getBOOL("VerboseLogs")) { diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp index 3f5641558..88030b6b0 100644 --- a/indra/newview/llfloaterchat.cpp +++ b/indra/newview/llfloaterchat.cpp @@ -115,6 +115,7 @@ LLFloaterChat::LLFloaterChat(const LLSD& seed) childSetValue("translate chat", gSavedSettings.getBOOL("TranslateChat")); childSetVisible("Chat History Editor with mute",FALSE); childSetAction("toggle_active_speakers_btn", onClickToggleActiveSpeakers, this); + childSetAction("chat_history_open", onClickChatHistoryOpen, this); setDefaultBtn("Chat"); } @@ -666,6 +667,16 @@ void LLFloaterChat::onClickToggleActiveSpeakers(void* userdata) //self->childSetVisible("active_speakers_panel", !self->childIsVisible("active_speakers_panel")); } +// static +void LLFloaterChat::onClickChatHistoryOpen(void* userdata) +{ + char command[256]; + sprintf(command, "\"%s\\%s\"", gDirUtilp->getPerAccountChatLogsDir().c_str(), "chat.txt"); + gViewerWindow->getWindow()->ShellEx(command); + + llinfos << command << llendl; +} + //static bool LLFloaterChat::visible(LLFloater* instance, const LLSD& key) { diff --git a/indra/newview/llfloaterchat.h b/indra/newview/llfloaterchat.h index f75a32b7e..775f21be6 100644 --- a/indra/newview/llfloaterchat.h +++ b/indra/newview/llfloaterchat.h @@ -82,6 +82,7 @@ public: static void onClickToggleShowMute(LLUICtrl* caller, void *data); static void onClickToggleTranslateChat(LLUICtrl* caller, void *data); static void onClickToggleActiveSpeakers(void* userdata); + static void onClickChatHistoryOpen(void* userdata); static void chatFromLogFile(LLLogChat::ELogLineType type,std::string line, void* userdata); static void loadHistory(); static void* createSpeakersPanel(void* data); diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 82955afea..231d680a0 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -66,6 +66,7 @@ #include "llprefschat.h" #include "llprefsvoice.h" #include "llprefsim.h" +#include "ascentprefschat.h" #include "ascentprefssys.h" #include "ascentprefsvan.h" #include "llresizehandle.h" @@ -138,6 +139,7 @@ LLPreferenceCore::LLPreferenceCore(LLTabContainer* tab_container, LLButton * def mSkinsPanel(NULL), mGridsPanel(NULL), mLCDPanel(NULL), + mPrefsAscentChat(NULL), mPrefsAscentSys(NULL), mPrefsAscentVan(NULL) { @@ -203,13 +205,17 @@ LLPreferenceCore::LLPreferenceCore(LLTabContainer* tab_container, LLButton * def mTabContainer->addTabPanel(mGridsPanel, mGridsPanel->getLabel(), FALSE, onTabChanged, mTabContainer); mGridsPanel->setDefaultBtn(default_btn); + mPrefsAscentChat = new LLPrefsAscentChat(); + mTabContainer->addTabPanel(mPrefsAscentChat, mPrefsAscentChat->getLabel(), FALSE, onTabChanged, mTabContainer); + mPrefsAscentChat->setDefaultBtn(default_btn); + mPrefsAscentSys = new LLPrefsAscentSys(); mTabContainer->addTabPanel(mPrefsAscentSys, mPrefsAscentSys->getLabel(), FALSE, onTabChanged, mTabContainer); mPrefsAscentSys->setDefaultBtn(default_btn); mPrefsAscentVan = new LLPrefsAscentVan(); - mTabContainer->addTabPanel(mPrefsAscentVan->getPanel(), mPrefsAscentVan->getPanel()->getLabel(), FALSE, onTabChanged, mTabContainer); - mPrefsAscentVan->getPanel()->setDefaultBtn(default_btn); + mTabContainer->addTabPanel(mPrefsAscentVan, mPrefsAscentVan->getLabel(), FALSE, onTabChanged, mTabContainer); + mPrefsAscentVan->setDefaultBtn(default_btn); if (!mTabContainer->selectTab(gSavedSettings.getS32("LastPrefTab"))) { @@ -275,6 +281,11 @@ LLPreferenceCore::~LLPreferenceCore() delete mGridsPanel; mGridsPanel = NULL; } + if (mPrefsAscentChat) + { + delete mPrefsAscentChat; + mPrefsAscentChat = NULL; + } if (mPrefsAscentSys) { delete mPrefsAscentSys; @@ -301,6 +312,7 @@ void LLPreferenceCore::apply() mMsgPanel->apply(); mSkinsPanel->apply(); mGridsPanel->apply(); + mPrefsAscentChat->apply(); mPrefsAscentSys->apply(); mPrefsAscentVan->apply(); @@ -332,6 +344,7 @@ void LLPreferenceCore::cancel() mMsgPanel->cancel(); mSkinsPanel->cancel(); mGridsPanel->cancel(); + mPrefsAscentChat->cancel(); mPrefsAscentSys->cancel(); mPrefsAscentVan->cancel(); diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 9346c5419..c849ac6ea 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -58,6 +58,7 @@ class LLPrefsIM; class LLPanelMsgs; class LLPanelSkins; class LLScrollListCtrl; +class LLPrefsAscentChat; class LLPrefsAscentSys; class LLPrefsAscentVan; @@ -98,6 +99,7 @@ private: LLPanelWeb *mWebPanel; LLPanelMsgs *mMsgPanel; LLPanelLCD *mLCDPanel; + LLPrefsAscentChat *mPrefsAscentChat; LLPrefsAscentSys *mPrefsAscentSys; LLPrefsAscentVan *mPrefsAscentVan; }; diff --git a/indra/newview/llhudeffectlookat.cpp b/indra/newview/llhudeffectlookat.cpp index a18130f40..e25efdf42 100644 --- a/indra/newview/llhudeffectlookat.cpp +++ b/indra/newview/llhudeffectlookat.cpp @@ -56,8 +56,6 @@ // -BOOL LLHUDEffectLookAt::sDebugLookAt = FALSE; - // packet layout const S32 SOURCE_AVATAR = 0; const S32 TARGET_OBJECT = 16; @@ -506,9 +504,12 @@ void LLHUDEffectLookAt::setSourceObject(LLViewerObject* objectp) void LLHUDEffectLookAt::render() { static const LLCachedControl private_look_at("PrivateLookAt",false); - if (private_look_at && - (gAgent.getAvatarObject() == ((LLVOAvatar*)(LLViewerObject*)mSourceObject))) return; - if (sDebugLookAt && mSourceObject.notNull()) + static const LLCachedControl show_look_at("AscentShowLookAt", false); + + if (private_look_at && (gAgent.getAvatarObject() == ((LLVOAvatar*)(LLViewerObject*)mSourceObject))) + return; + + if (show_look_at && mSourceObject.notNull()) { LLGLDepthTest gls_depth(GL_TRUE,GL_FALSE); @@ -569,7 +570,9 @@ void LLHUDEffectLookAt::render() //----------------------------------------------------------------------------- void LLHUDEffectLookAt::update() { - // If the target object is dead, set the target object to NULL + static const LLCachedControl show_look_at("AscentShowLookAt", false); + + // If the target object is dead, set the target object to NULL if (!mTargetObject.isNull() && mTargetObject->isDead()) { clearLookAtTarget(); @@ -614,7 +617,7 @@ void LLHUDEffectLookAt::update() } } - if (sDebugLookAt) + if (show_look_at) { ((LLVOAvatar*)(LLViewerObject*)mSourceObject)->addDebugText((*mAttentions)[mTargetType].mName); } diff --git a/indra/newview/llhudeffectlookat.h b/indra/newview/llhudeffectlookat.h index 97de0e8ba..93eb2178d 100644 --- a/indra/newview/llhudeffectlookat.h +++ b/indra/newview/llhudeffectlookat.h @@ -86,7 +86,6 @@ protected: void setTargetPosGlobal(const LLVector3d &target_pos_global); public: - static BOOL sDebugLookAt; private: ELookAtType mTargetType; diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index cef6f9daa..110d3a708 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -1668,7 +1668,7 @@ void LLFloaterIMPanel::addHistoryLine(const std::string &utf8msg, LLColor4 incol } //Kadah - Bold group mods chat. Doesnt work on the first msg of the session, dont have speakers list yet? - if (isModerator(source)) + if (gSavedSettings.getBOOL("SingularityBoldGroupModerator") && isModerator(source)) { mHistoryEditor->appendColoredText(utf8msg.substr(0,1), false, prepend_newline, color); LLStyleSP style(new LLStyle); diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index 73d93e05e..d448368ea 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -75,7 +75,7 @@ #include "llfirstuse.h" #include "lldrawpool.h" - +#include "hippolimits.h" @@ -1224,9 +1224,9 @@ void LLPanelObject::getState( ) mSpinScaleY->set( scale_y ); calcp->setVar(LLCalc::X_HOLE, scale_x); calcp->setVar(LLCalc::Y_HOLE, scale_y); - mSpinScaleX->setMinValue(OBJECT_MIN_HOLE_SIZE); + mSpinScaleX->setMinValue(gHippoLimits->getMinHoleSize()); mSpinScaleX->setMaxValue(OBJECT_MAX_HOLE_SIZE_X); - mSpinScaleY->setMinValue(OBJECT_MIN_HOLE_SIZE); + mSpinScaleY->setMinValue(gHippoLimits->getMinHoleSize()); mSpinScaleY->setMaxValue(OBJECT_MAX_HOLE_SIZE_Y); break; default: @@ -1270,7 +1270,7 @@ void LLPanelObject::getState( ) */ { mSpinHollow->setMinValue(0.f); - mSpinHollow->setMaxValue(95.f); //Not that nuts. -HgB + mSpinHollow->setMaxValue(gHippoLimits->getMaxHollow() * 100.0f); } // Update field enablement @@ -1987,11 +1987,11 @@ void LLPanelObject::getVolumeParams(LLVolumeParams& volume_params) { scale_x = llclamp( scale_x, - OBJECT_MIN_HOLE_SIZE, + gHippoLimits->getMinHoleSize(), OBJECT_MAX_HOLE_SIZE_X); scale_y = llclamp( scale_y, - OBJECT_MIN_HOLE_SIZE, + gHippoLimits->getMinHoleSize(), OBJECT_MAX_HOLE_SIZE_Y); // Limit radius offset, based on taper and hole size y. diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index d6839c0ed..421db71c9 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -237,7 +237,6 @@ std::string SCREEN_LAST_FILENAME = "screen_last.bmp"; // extern S32 gStartImageWidth; extern S32 gStartImageHeight; -extern bool gLLWindEnabled; // // local globals @@ -1895,9 +1894,6 @@ bool idle_startup() //--------------------------------------------------------------------- if (STATE_WORLD_INIT == LLStartUp::getStartupState()) { - //first of all, let's check if wind should be used - gLLWindEnabled = gSavedSettings.getBOOL("WindEnabled"); - set_startup_status(0.40f, LLTrans::getString("LoginInitializingWorld"), gAgent.mMOTD); // Initialize the rest of the world. diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 30f56df6b..45c64a4ef 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -1610,7 +1610,11 @@ void init_debug_avatar_menu(LLMenuGL* menu) menu->append(new LLMenuItemCallGL("Reload Vertex Shader", &reload_vertex_shader, NULL)); menu->append(new LLMenuItemToggleGL("Animation Info", &LLVOAvatar::sShowAnimationDebug)); menu->append(new LLMenuItemCallGL("Slow Motion Animations", &slow_mo_animations, NULL)); - menu->append(new LLMenuItemToggleGL("Show Look At", &LLHUDEffectLookAt::sDebugLookAt)); + + LLMenuItemCheckGL* item; + item = new LLMenuItemCheckGL("Show Look At", menu_toggle_control, NULL, menu_check_control, (void*)"AscentShowLookAt"); + menu->append(item); + menu->append(new LLMenuItemToggleGL("Show Point At", &LLHUDEffectPointAt::sDebugPointAt)); menu->append(new LLMenuItemToggleGL("Debug Joint Updates", &LLVOAvatar::sJointDebug)); menu->append(new LLMenuItemToggleGL("Disable LOD", &LLViewerJoint::sDisableLOD)); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 4cb65f0f9..3c1a73cc0 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1746,7 +1746,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) bool typing_init = false; if( dialog == IM_TYPING_START && !is_muted ) { - if(!gIMMgr->hasSession(computed_session_id) && gSavedPerAccountSettings.getBOOL("AscentInstantMessageAnnounceIncoming")) + if(!gIMMgr->hasSession(computed_session_id) && gSavedSettings.getBOOL("AscentInstantMessageAnnounceIncoming")) { typing_init = true; gIMMgr->addMessage( @@ -1800,7 +1800,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // [/RLVa:KB] { if((dialog == IM_NOTHING_SPECIAL && !is_auto_response) || - (dialog == IM_TYPING_START && gSavedPerAccountSettings.getBOOL("AscentInstantMessageAnnounceIncoming")) + (dialog == IM_TYPING_START && gSavedSettings.getBOOL("AscentInstantMessageAnnounceIncoming")) ) { BOOL has = gIMMgr->hasSession(computed_session_id); @@ -3024,6 +3024,10 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) LLViewerObject* chatter; msg->getString("ChatData", "FromName", from_name); + if (from_name.empty()) + { + from_name = "(no name)"; + } chat.mFromName = from_name; msg->getUUID("ChatData", "SourceID", from_id); @@ -5244,6 +5248,10 @@ void process_money_balance_reply( LLMessageSystem* msg, void** ) args["MESSAGE"] = desc; LLNotifications::instance().add("SystemMessage", args); + // Also send notification to chat -- MC + LLChat chat(desc); + LLFloaterChat::addChat(desc); + // Once the 'recent' container gets large enough, chop some // off the beginning. const U32 MAX_LOOKBACK = 30; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index e69e6b067..6f3878c65 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3805,6 +3805,12 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) { is_muted = LLMuteList::getInstance()->isMuted(getID()); } + //idle text + std::string idle_string; + if(!mIsSelf && mIdleTimer.getElapsedTimeF32() > 120 && gSavedSettings.getBOOL("AscentShowIdleTime")) + { + idle_string = getIdleTime(); + } if ((mNameString.empty() && !(mNameFromChatOverride && mNameFromChatText.empty())) || new_name || @@ -3813,7 +3819,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) (!title && !mTitle.empty()) || (title && mTitle != title->getString()) || (is_away != mNameAway || is_busy != mNameBusy || is_muted != mNameMute) || - is_appearance != mNameAppearance || client != mClientName || + is_appearance != mNameAppearance || client != mClientName || idle_string != mIdleString || mNameFromAttachment != nameplate || mNameFromChatChanged) { @@ -3823,6 +3829,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) mNameBusy = is_busy; mNameMute = is_muted; mClientName = client; + mIdleString = idle_string; mUsedNameSystem = phoenix_name_system; mNameAppearance = is_appearance; mTitle = title? title->getString() : ""; @@ -3953,10 +3960,10 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) line += "\n"; line += "(Editing Appearance)"; } - if(!isSelf() && mIdleTimer.getElapsedTimeF32() > 120 && gSavedSettings.getBOOL("AscentShowIdleTime")) + if(!mIdleString.empty()) { line += "\n"; - line += getIdleTime(); + line += mIdleString; } mNameString = utf8str_to_wstring(line); diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 6ec9179c8..b50111e40 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -942,6 +942,7 @@ private: bool mRenderGroupTitles; std::string mRenderedName; std::string mClientName; + std::string mIdleString; S32 mUsedNameSystem; //-------------------------------------------------------------------- diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp index 0de029241..548dab8b0 100644 --- a/indra/newview/llvotree.cpp +++ b/indra/newview/llvotree.cpp @@ -357,8 +357,9 @@ BOOL LLVOTree::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) } //it's cheaper to check if wind is enabled first + static const LLCachedControl enable_wind("WindEnabled",false); static const LLCachedControl render_animate_trees("RenderAnimateTrees",false); - if (gLLWindEnabled && render_animate_trees) + if (enable_wind && render_animate_trees) { F32 mass_inv; @@ -400,7 +401,7 @@ BOOL LLVOTree::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) } } - if (!gLLWindEnabled || !render_animate_trees) + if (!enable_wind || !render_animate_trees) { if (mReferenceBuffer.isNull()) { diff --git a/indra/newview/llwind.cpp b/indra/newview/llwind.cpp index 267fcbc8f..2b0f0d969 100644 --- a/indra/newview/llwind.cpp +++ b/indra/newview/llwind.cpp @@ -52,7 +52,6 @@ #include "llagent.h" #include "llworld.h" -bool gLLWindEnabled = true; const F32 CLOUD_DIVERGENCE_COEF = 0.5f; @@ -105,7 +104,8 @@ void LLWind::init() void LLWind::decompress(LLBitPack &bitpack, LLGroupHeader *group_headerp) { - if (!mCloudDensityp || !gLLWindEnabled) + static const LLCachedControl wind_enabled("WindEnabled",false); + if (!mCloudDensityp || !wind_enabled) { return; } @@ -182,7 +182,8 @@ void LLWind::decompress(LLBitPack &bitpack, LLGroupHeader *group_headerp) LLVector3 LLWind::getAverage() { - if(!gLLWindEnabled) + static const LLCachedControl wind_enabled("WindEnabled",false); + if(!wind_enabled) { return LLVector3(0.f, 0.f, 0.f); } @@ -203,7 +204,8 @@ LLVector3 LLWind::getAverage() LLVector3 LLWind::getVelocityNoisy(const LLVector3 &pos_region, const F32 dim) { - if(!gLLWindEnabled) + static const LLCachedControl wind_enabled("WindEnabled",false); + if(!wind_enabled) { return LLVector3(0.f, 0.f, 0.f); } @@ -237,7 +239,8 @@ LLVector3 LLWind::getVelocityNoisy(const LLVector3 &pos_region, const F32 dim) LLVector3 LLWind::getVelocity(const LLVector3 &pos_region) { - if(!gLLWindEnabled) + static const LLCachedControl wind_enabled("WindEnabled",false); + if(!wind_enabled) { return LLVector3(0.f, 0.f, 0.f); } @@ -303,7 +306,8 @@ LLVector3 LLWind::getVelocity(const LLVector3 &pos_region) LLVector3 LLWind::getCloudVelocity(const LLVector3 &pos_region) { - if(!gLLWindEnabled) + static const LLCachedControl wind_enabled("WindEnabled",false); + if(!wind_enabled) { return LLVector3(0.f, 0.f, 0.f); } diff --git a/indra/newview/llwind.h b/indra/newview/llwind.h index fb887a1fc..7a4582d9d 100644 --- a/indra/newview/llwind.h +++ b/indra/newview/llwind.h @@ -42,8 +42,6 @@ class LLVector3; class LLBitPack; class LLGroupHeader; -extern bool gLLWindEnabled; - class LLWind { diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 9ece8613b..9ccc3f69f 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -6737,7 +6737,7 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, LLRen static const LLCachedControl render_gi_luminance("RenderGILuminance",.075f); static const LLCachedControl render_gi_blur_edge_weight("RenderGIBlurEdgeWeight",.8f); static const LLCachedControl render_gi_blur_brightness("RenderGIBlurBrightness",1.025f); - static const LLCachedControl render_gi_render_gi_noise("RenderGINoise",.7); + static const LLCachedControl render_gi_render_gi_noise("RenderGINoise",.7f); static const LLCachedControl render_gi_attenuation("RenderGIAttenuation",.1f); static const LLCachedControl render_gi_ambiance("RenderGIAmbiance",.5f); static const LLCachedControl render_edge_depth_cutoff("RenderEdgeDepthCutoff",.01f); diff --git a/indra/newview/skins/default/xui/en-us/floater_chat_history.xml b/indra/newview/skins/default/xui/en-us/floater_chat_history.xml index 8f954de46..63f0818f3 100644 --- a/indra/newview/skins/default/xui/en-us/floater_chat_history.xml +++ b/indra/newview/skins/default/xui/en-us/floater_chat_history.xml @@ -81,7 +81,12 @@ -