From 833d8e5e04b45c89f9edddbbf63d03933fa12907 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Tue, 19 Apr 2011 19:13:12 -0700 Subject: Updated windows installer version --- .../installers/windows/imprudence_installer_script_experimental.iss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linden/indra/newview/installers/windows/imprudence_installer_script_experimental.iss b/linden/indra/newview/installers/windows/imprudence_installer_script_experimental.iss index 398c26d..aa31c3b 100644 --- a/linden/indra/newview/installers/windows/imprudence_installer_script_experimental.iss +++ b/linden/indra/newview/installers/windows/imprudence_installer_script_experimental.iss @@ -9,11 +9,11 @@ ; These will change AppId={{1B3E68BC-13EB-4277-9439-CB5FF9259460} AppName=Imprudence Viewer Experimental -AppVerName=Imprudence Viewer 1.4.0 Experimental 2011.03.20 +AppVerName=Imprudence Viewer 1.4.0 Experimental 2011.04.19 DefaultDirName={pf}\ImprudenceExperimental DefaultGroupName=Imprudence Viewer Experimental VersionInfoProductName=Imprudence Viewer Experimental -OutputBaseFilename=Imprudence-1.4.0-Experimental-2011.03.20-Setup +OutputBaseFilename=Imprudence-1.4.0-Experimental-2011.04.19-Setup VersionInfoVersion=1.4.0 VersionInfoTextVersion=1.4.0 VersionInfoProductVersion=1.4.0 -- cgit v1.1 From 12144a468deb5e10ebed6b7f75e406a2d9126e56 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Tue, 26 Apr 2011 21:49:25 -0700 Subject: Added DirectX SDKs june 2010 and march 2009 to cmake --- linden/indra/cmake/DirectX.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/linden/indra/cmake/DirectX.cmake b/linden/indra/cmake/DirectX.cmake index d406f37..e455755 100644 --- a/linden/indra/cmake/DirectX.cmake +++ b/linden/indra/cmake/DirectX.cmake @@ -3,6 +3,8 @@ if (VIEWER AND WINDOWS) find_path(DIRECTX_INCLUDE_DIR dxdiag.h "$ENV{DXSDK_DIR}/Include" + "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2010)/Include" + "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (March 2009)/Include" "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2008)/Include" "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2008)/Include" "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (March 2008)/Include" @@ -23,6 +25,8 @@ if (VIEWER AND WINDOWS) find_path(DIRECTX_LIBRARY_DIR dxguid.lib "$ENV{DXSDK_DIR}/Lib/x86" + "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2010)/Lib/x86" + "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (March 2009)/Lib/x86" "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2008)/Lib/x86" "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2008)/Lib/x86" "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (March 2008)/Lib/x86" -- cgit v1.1 From 41916181cc2056dd8c7b4a23f8dcab637aa1fb8b Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Tue, 26 Apr 2011 22:24:51 -0700 Subject: Backported crash fix in llhudeffectlookat from gpl'd viewer 2 --- linden/indra/newview/llhudeffectlookat.cpp | 5 +++++ linden/indra/newview/llvoavatar.h | 1 + 2 files changed, 6 insertions(+) diff --git a/linden/indra/newview/llhudeffectlookat.cpp b/linden/indra/newview/llhudeffectlookat.cpp index ccd723f..333bd13 100644 --- a/linden/indra/newview/llhudeffectlookat.cpp +++ b/linden/indra/newview/llhudeffectlookat.cpp @@ -702,6 +702,11 @@ bool LLHUDEffectLookAt::calcTargetPosition() LLVOAvatar* source_avatar = (LLVOAvatar*)(LLViewerObject*)mSourceObject; + if (!source_avatar->isBuilt()) + { + return false; + } + if (target_obj && target_obj->mDrawable.notNull()) { LLQuaternion target_rot; diff --git a/linden/indra/newview/llvoavatar.h b/linden/indra/newview/llvoavatar.h index 4d08bf0..b9e4d17 100644 --- a/linden/indra/newview/llvoavatar.h +++ b/linden/indra/newview/llvoavatar.h @@ -231,6 +231,7 @@ public: BOOL isVisible(); BOOL isSelf() const { return mIsSelf; } + bool isBuilt() const { return mIsBuilt; } BOOL isCulled() const { return mCulled; } public: -- cgit v1.1 From cc8e7060dfb54900f1600965a78c6f6f9fc564c4 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Tue, 3 May 2011 18:09:28 -0700 Subject: Besides the numerous label and organizational changes, here are the main points * Moved numerous options out of the Advanced panel * Moved numerous options out of the General panel * Combined the Network and Web Browser panels * Combined IM, Chat, and Spell checking preferences * Combined 'Show timestamps in IMs' and 'Show timestamps in Local Chat' to one ShowTimestamps setting * Removed UI for 'hide my own group title'. This can still be set in the debug settings * Renamed Popups > Notifications * Renamed Chat Colors > Colors * Renamed 'IMs and Logging' to 'Logging and Privacy' * Moved Colors next to Skins * Added style guide to the top of every preferences panel xui --- linden/indra/newview/CMakeLists.txt | 2 - linden/indra/newview/app_settings/settings.xml | 71 +-- linden/indra/newview/impprefsfonts.cpp | 15 + linden/indra/newview/impprefsfonts.h | 5 +- linden/indra/newview/llfloaterchat.cpp | 2 +- linden/indra/newview/llfloaterpreference.cpp | 25 +- linden/indra/newview/llfloaterpreference.h | 2 - linden/indra/newview/llimpanel.cpp | 2 +- linden/indra/newview/llpaneldisplay.cpp | 50 +- linden/indra/newview/llpaneldisplay.h | 11 +- linden/indra/newview/llpanelgeneral.cpp | 47 +- linden/indra/newview/llpanelgeneral.h | 2 +- linden/indra/newview/llpanelinput.cpp | 17 +- linden/indra/newview/llpanelinput.h | 2 + linden/indra/newview/llpanelmsgs.cpp | 4 + linden/indra/newview/llpanelnetwork.cpp | 241 ++++++++- linden/indra/newview/llpanelnetwork.h | 20 +- linden/indra/newview/llpanelweb.cpp | 234 -------- linden/indra/newview/llpanelweb.h | 60 -- linden/indra/newview/llprefsadvanced.cpp | 187 +------ linden/indra/newview/llprefsadvanced.h | 13 +- linden/indra/newview/llprefschat.cpp | 322 ++++++++--- linden/indra/newview/llprefschat.h | 1 + linden/indra/newview/llprefscolors.cpp | 30 +- linden/indra/newview/llprefscolors.h | 4 + linden/indra/newview/llprefsim.cpp | 58 +- linden/indra/newview/llprefsim.h | 2 +- linden/indra/newview/llprefsvoice.cpp | 2 + .../xui/en-us/panel_preferences_advanced.xml | 296 +++++----- .../default/xui/en-us/panel_preferences_audio.xml | 128 +++-- .../default/xui/en-us/panel_preferences_chat.xml | 538 +++++++++++------- .../default/xui/en-us/panel_preferences_colors.xml | 167 +++--- .../default/xui/en-us/panel_preferences_fonts.xml | 57 +- .../xui/en-us/panel_preferences_general.xml | 392 +++++++------- .../xui/en-us/panel_preferences_graphics1.xml | 484 +++++++++-------- .../default/xui/en-us/panel_preferences_im.xml | 170 +++--- .../default/xui/en-us/panel_preferences_input.xml | 238 ++++---- .../xui/en-us/panel_preferences_network.xml | 602 +++++++++++++++------ .../default/xui/en-us/panel_preferences_popups.xml | 126 ++++- .../default/xui/en-us/panel_preferences_skins.xml | 47 +- .../default/xui/en-us/panel_preferences_voice.xml | 97 ++-- .../default/xui/en-us/panel_preferences_web.xml | 68 --- 42 files changed, 2711 insertions(+), 2130 deletions(-) delete mode 100644 linden/indra/newview/llpanelweb.cpp delete mode 100644 linden/indra/newview/llpanelweb.h delete mode 100644 linden/indra/newview/skins/default/xui/en-us/panel_preferences_web.xml diff --git a/linden/indra/newview/CMakeLists.txt b/linden/indra/newview/CMakeLists.txt index df6d8b5..58c16e6 100644 --- a/linden/indra/newview/CMakeLists.txt +++ b/linden/indra/newview/CMakeLists.txt @@ -329,7 +329,6 @@ set(viewer_SOURCE_FILES llpanelplace.cpp llpanelskins.cpp llpanelvolume.cpp - llpanelweb.cpp llparcelselection.cpp llpatchvertexarray.cpp llpolymesh.cpp @@ -792,7 +791,6 @@ set(viewer_HEADER_FILES llpanelplace.h llpanelskins.h llpanelvolume.h - llpanelweb.h llparcelselection.h llpatchvertexarray.h llpolymesh.h diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 80eb65a..e149c41 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -1004,6 +1004,17 @@ Value 1 + ShowTimestamps + + Comment + Show timestamps in chat and IMs + Persist + 1 + Type + Boolean + Value + 1 + SpeedRez Comment @@ -1038,7 +1049,7 @@ 1 RenderWaterVoidCulling - + Comment Cull void water objects when off-screen. Persist @@ -1060,16 +1071,16 @@ 0 ResetFocusOnSelfClick - - Comment - Setting this to TRUE resets your camera when you left-click your avatar - Persist - 1 - Type - Boolean - Value - 1 - + + Comment + Setting this to TRUE resets your camera when you left-click your avatar + Persist + 1 + Type + Boolean + Value + 1 + RezWithLandGroup Comment @@ -1513,7 +1524,7 @@ - + ToggleTeenMode Comment @@ -1525,7 +1536,7 @@ Value 1 - + AOEnabled @@ -1776,7 +1787,7 @@ Value 1 - + DownloadClientTags Comment @@ -2131,9 +2142,9 @@ Value English (United States of America) - + - + RestrainedLove @@ -2314,7 +2325,7 @@ - + Socks5ProxyEnabled @@ -2525,11 +2536,11 @@ Value -8888888 - + - + AFKTimeout Comment @@ -3944,17 +3955,6 @@ Value 20.0 - ChatShowTimestamps - - Comment - Show timestamps in chat - Persist - 1 - Type - Boolean - Value - 1 - ChatVisible Comment @@ -7413,17 +7413,6 @@ Value 0 - IMShowTimestamps - - Comment - Show timestamps in IM - Persist - 1 - Type - Boolean - Value - 1 - IgnorePixelDepth Comment diff --git a/linden/indra/newview/impprefsfonts.cpp b/linden/indra/newview/impprefsfonts.cpp index a4dcd34..505761b 100644 --- a/linden/indra/newview/impprefsfonts.cpp +++ b/linden/indra/newview/impprefsfonts.cpp @@ -51,6 +51,10 @@ ImpPrefsFonts::~ImpPrefsFonts() BOOL ImpPrefsFonts::postBuild() { + childSetValue("ui_scale_slider", gSavedSettings.getF32("UIScaleFactor")); + childSetValue("ui_auto_scale", gSavedSettings.getBOOL("UIAutoScale")); + childSetAction("reset_ui_size", onClickResetUISize, this); + refresh(); return true; } @@ -79,6 +83,9 @@ void ImpPrefsFonts::refresh() void ImpPrefsFonts::apply() { + gSavedSettings.setF32("UIScaleFactor", childGetValue("ui_scale_slider").asReal()); + gSavedSettings.setBOOL("UIAutoScale", childGetValue("ui_auto_scale")); + bool changed = false; LLRadioGroup* fonts = getChild("fonts"); @@ -126,3 +133,11 @@ void ImpPrefsFonts::apply() void ImpPrefsFonts::cancel() { } + +// static +void ImpPrefsFonts::onClickResetUISize(void* user_data) +{ + ImpPrefsFonts* self = (ImpPrefsFonts*)user_data; + F32 def = gSavedSettings.getControl("UIScaleFactor")->getDefault().asReal(); + self->childSetValue("ui_scale_slider", def); +} diff --git a/linden/indra/newview/impprefsfonts.h b/linden/indra/newview/impprefsfonts.h index 12aa0bb..0319261 100644 --- a/linden/indra/newview/impprefsfonts.h +++ b/linden/indra/newview/impprefsfonts.h @@ -1,6 +1,6 @@ /** * @file impprefsfonts.h - * @brief Font preferences panel + * @brief UI and font preferences panel * * Copyright (c) 2010, Jacek Antonelli * @@ -40,6 +40,9 @@ public: void refresh(); void apply(); void cancel(); + +private: + static void onClickResetUISize(void*); }; #endif // IMP_PREFSFONTS_H diff --git a/linden/indra/newview/llfloaterchat.cpp b/linden/indra/newview/llfloaterchat.cpp index f3d71d7..1142e5c 100644 --- a/linden/indra/newview/llfloaterchat.cpp +++ b/linden/indra/newview/llfloaterchat.cpp @@ -216,7 +216,7 @@ void add_timestamped_line(LLViewerTextEditor* edit, LLChat chat, const LLColor4& { std::string line = chat.mText; bool prepend_newline = true; - if (gSavedSettings.getBOOL("ChatShowTimestamps")) + if (gSavedSettings.getBOOL("ShowTimestamps")) { edit->appendTime(prepend_newline); prepend_newline = false; diff --git a/linden/indra/newview/llfloaterpreference.cpp b/linden/indra/newview/llfloaterpreference.cpp index 52192b8..d518eac 100644 --- a/linden/indra/newview/llfloaterpreference.cpp +++ b/linden/indra/newview/llfloaterpreference.cpp @@ -60,7 +60,6 @@ #include "llpanellogin.h" #include "llpanelLCD.h" #include "llpanelmsgs.h" -#include "llpanelweb.h" #include "llpanelskins.h" #include "llprefsadvanced.h" #include "llprefschat.h" @@ -151,10 +150,6 @@ LLPreferenceCore::LLPreferenceCore(LLTabContainer* tab_container, LLButton * def mTabContainer->addTabPanel(mNetworkPanel, mNetworkPanel->getLabel(), FALSE, onTabChanged, mTabContainer); mNetworkPanel->setDefaultBtn(default_btn); - mWebPanel = new LLPanelWeb(); - mTabContainer->addTabPanel(mWebPanel, mWebPanel->getLabel(), FALSE, onTabChanged, mTabContainer); - mWebPanel->setDefaultBtn(default_btn); - mDisplayPanel = new LLPanelDisplay(); mTabContainer->addTabPanel(mDisplayPanel, mDisplayPanel->getLabel(), FALSE, onTabChanged, mTabContainer); mDisplayPanel->setDefaultBtn(default_btn); @@ -167,10 +162,6 @@ LLPreferenceCore::LLPreferenceCore(LLTabContainer* tab_container, LLButton * def mTabContainer->addTabPanel(mPrefsChat->getPanel(), mPrefsChat->getPanel()->getLabel(), FALSE, onTabChanged, mTabContainer); mPrefsChat->getPanel()->setDefaultBtn(default_btn); - mPrefsColors = new LLPrefsColors(); - mTabContainer->addTabPanel(mPrefsColors, mPrefsColors->getLabel(), FALSE, onTabChanged, mTabContainer); - mPrefsColors->setDefaultBtn(default_btn); - mPrefsIM = new LLPrefsIM(); mTabContainer->addTabPanel(mPrefsIM->getPanel(), mPrefsIM->getPanel()->getLabel(), FALSE, onTabChanged, mTabContainer); mPrefsIM->getPanel()->setDefaultBtn(default_btn); @@ -197,6 +188,10 @@ LLPreferenceCore::LLPreferenceCore(LLTabContainer* tab_container, LLButton * def mMsgPanel = new LLPanelMsgs(); mTabContainer->addTabPanel(mMsgPanel, mMsgPanel->getLabel(), FALSE, onTabChanged, mTabContainer); mMsgPanel->setDefaultBtn(default_btn); + + mPrefsColors = new LLPrefsColors(); + mTabContainer->addTabPanel(mPrefsColors, mPrefsColors->getLabel(), FALSE, onTabChanged, mTabContainer); + mPrefsColors->setDefaultBtn(default_btn); mSkinsPanel = new LLPanelSkins(); mTabContainer->addTabPanel(mSkinsPanel, mSkinsPanel->getLabel(), FALSE, onTabChanged, mTabContainer); @@ -259,11 +254,6 @@ LLPreferenceCore::~LLPreferenceCore() delete mMsgPanel; mMsgPanel = NULL; } - if (mWebPanel) - { - delete mWebPanel; - mWebPanel = NULL; - } if (mSkinsPanel) { delete mSkinsPanel; @@ -306,7 +296,6 @@ void LLPreferenceCore::apply() // hardware menu apply LLFloaterHardwareSettings::instance()->apply(); - mWebPanel->apply(); #if LL_LCD_COMPILE // only add this option if we actually have a logitech keyboard / speaker set if (gLcdScreen->Enabled()) @@ -314,7 +303,6 @@ void LLPreferenceCore::apply() mLCDPanel->apply(); } #endif -// mWebPanel->apply(); } @@ -337,7 +325,6 @@ void LLPreferenceCore::cancel() // cancel hardware menu LLFloaterHardwareSettings::instance()->cancel(); - mWebPanel->cancel(); #if LL_LCD_COMPILE // only add this option if we actually have a logitech keyboard / speaker set if (gLcdScreen->Enabled()) @@ -345,7 +332,6 @@ void LLPreferenceCore::cancel() mLCDPanel->cancel(); } #endif -// mWebPanel->cancel(); } // static @@ -359,7 +345,8 @@ void LLPreferenceCore::onTabChanged(void* user_data, bool from_click) void LLPreferenceCore::setPersonalInfo(const std::string& visibility, bool im_via_email, const std::string& email) { - mPrefsIM->setPersonalInfo(visibility, im_via_email, email); + mPrefsIM->setPersonalInfo(visibility); + mPrefsChat->setPersonalInfo(im_via_email, email); } void LLPreferenceCore::updateIsLoggedIn(bool enable) diff --git a/linden/indra/newview/llfloaterpreference.h b/linden/indra/newview/llfloaterpreference.h index d5eccbc..ae4f4d9 100644 --- a/linden/indra/newview/llfloaterpreference.h +++ b/linden/indra/newview/llfloaterpreference.h @@ -48,7 +48,6 @@ class LLPanelDisplay; class LLPanelAudioPrefs; class LLPanelDebug; class LLPanelNetwork; -class LLPanelWeb; class LLMessageSystem; class LLPrefsChat; class LLPrefsVoice; @@ -92,7 +91,6 @@ private: LLPrefsChat *mPrefsChat; LLPrefsVoice *mPrefsVoice; LLPrefsIM *mPrefsIM; - LLPanelWeb *mWebPanel; LLPanelMsgs *mMsgPanel; LLPanelLCD *mLCDPanel; LLPrefsAdvanced *mPrefsAdvanced; diff --git a/linden/indra/newview/llimpanel.cpp b/linden/indra/newview/llimpanel.cpp index a3e917f..5f6624b 100644 --- a/linden/indra/newview/llimpanel.cpp +++ b/linden/indra/newview/llimpanel.cpp @@ -1618,7 +1618,7 @@ void LLFloaterIMPanel::addHistoryLine(const std::string &utf8msg, const LLColor4 // Actually add the line std::string timestring; bool prepend_newline = true; - if (gSavedSettings.getBOOL("IMShowTimestamps")) + if (gSavedSettings.getBOOL("ShowTimestamps")) { timestring = mHistoryEditor->appendTime(prepend_newline); prepend_newline = false; diff --git a/linden/indra/newview/llpaneldisplay.cpp b/linden/indra/newview/llpaneldisplay.cpp index a5c0d97..9ee7dc3 100644 --- a/linden/indra/newview/llpaneldisplay.cpp +++ b/linden/indra/newview/llpaneldisplay.cpp @@ -120,7 +120,6 @@ BOOL LLPanelDisplay::postBuild() mCtrlWindowed->setCallbackUserData(this); mAspectRatioLabel1 = getChild("AspectRatioLabel1"); - mFullScreenInfo = getChild("FullScreenInfo"); mDisplayResLabel = getChild("DisplayResLabel"); S32 num_resolutions = 0; @@ -229,7 +228,7 @@ BOOL LLPanelDisplay::postBuild() mCtrlReflections = getChild("Reflections"); mCtrlReflections->setCommitCallback(&LLPanelDisplay::onVertexShaderEnable); mCtrlReflections->setCallbackUserData(this); - mRadioReflectionDetail = getChild("ReflectionDetailRadio"); + mComboReflectionDetail = getChild("ReflectionDetailCombo"); // WindLight mCtrlWindLight = getChild("WindLightUseAtmosShaders"); @@ -251,11 +250,11 @@ BOOL LLPanelDisplay::postBuild() //---------------------------------------------------------------------------- // radio set for lighting detail - mRadioLightingDetail2 = getChild("LightingDetailRadio"); + mComboLightingDetail = getChild("LightingDetailCombo"); //---------------------------------------------------------------------------- // radio set for terrain detail mode - mRadioTerrainDetail = getChild("TerrainDetailRadio"); + mComboTerrainDetail = getChild("TerrainDetailCombo"); //---------------------------------------------------------------------------- // Global Shader Enable @@ -316,7 +315,6 @@ BOOL LLPanelDisplay::postBuild() // Avatar imposter count mCtrlAvatarMaxVisible = getChild("AvatarMaxVisible"); - mAvatarCountText = getChild("AvatarCountText"); // Text boxes (for enabling/disabling) mShaderText = getChild("ShadersText"); @@ -325,10 +323,7 @@ BOOL LLPanelDisplay::postBuild() mTerrainText = getChild("TerrainDetailText"); mLightingText = getChild("LightingDetailText"); mMeshDetailText = getChild("MeshDetailText"); - - static BOOL* sEnableWindlightRemote = rebind_llcontrol("EnableWindlightRemote", &gSavedSettings, true); - childSetValue("toggle_windlight_control", (*sEnableWindlightRemote)); - mWLControl = (*sEnableWindlightRemote); + mLimitsText = getChild("LimitsText"); refresh(); @@ -420,10 +415,6 @@ void LLPanelDisplay::refresh() mLightingDetail = gSavedSettings.getS32("RenderLightingDetail"); mTerrainDetail = gSavedSettings.getS32("RenderTerrainDetail"); - // windlight remote - static BOOL* sEnableWindlightRemote = rebind_llcontrol("EnableWindlightRemote", &gSavedSettings, true); - mWLControl = (*sEnableWindlightRemote); - // max avatar count mAvatarMaxVisible = gSavedSettings.getS32("RenderAvatarMaxVisible"); @@ -449,7 +440,6 @@ void LLPanelDisplay::refreshEnabledState() mCtrlAspectRatio->setVisible(isFullScreen); mAspectRatioLabel1->setVisible(isFullScreen); mCtrlAutoDetectAspect->setVisible(isFullScreen); - mFullScreenInfo->setVisible(!isFullScreen); mWindowSizeLabel->setVisible(!isFullScreen); // disable graphics settings and exit if it's not set to custom @@ -475,10 +465,7 @@ void LLPanelDisplay::refreshEnabledState() bool bumpshiny = gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps && LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump"); mCtrlBumpShiny->setEnabled(bumpshiny ? TRUE : FALSE); - for (S32 i = 0; i < mRadioReflectionDetail->getItemCount(); ++i) - { - mRadioReflectionDetail->setIndexEnabled(i, mCtrlReflections->get() && reflections); - } + mComboReflectionDetail->setEnabled(mCtrlReflections->get() && reflections); // Avatar Mode S32 max_avatar_shader = LLViewerShaderMgr::instance()->mMaxAvatarShaderLevel; @@ -505,12 +492,12 @@ void LLPanelDisplay::refreshEnabledState() BOOL shaders = mCtrlShaderEnable->get(); if (shaders) { - mRadioTerrainDetail->setValue(1); - mRadioTerrainDetail->setEnabled(FALSE); + mComboTerrainDetail->setValue(1); + mComboTerrainDetail->setEnabled(FALSE); } else { - mRadioTerrainDetail->setEnabled(TRUE); + mComboTerrainDetail->setEnabled(TRUE); } // *HACK just checks to see if we can use shaders... @@ -588,7 +575,6 @@ void LLPanelDisplay::disableUnavailableSettings() } mCtrlAvatarMaxVisible->setEnabled(mCtrlAvatarImpostors->getValue().asBoolean()); - mAvatarCountText->setEnabled(mCtrlAvatarImpostors->getValue().asBoolean()); } void LLPanelDisplay::setHiddenGraphicsState(bool isHidden) @@ -622,10 +608,10 @@ void LLPanelDisplay::setHiddenGraphicsState(bool isHidden) llassert(mCtrlShaderEnable != NULL); llassert(mCtrlAvatarImpostors != NULL); llassert(mCtrlAvatarCloth != NULL); - llassert(mRadioLightingDetail2 != NULL); + llassert(mComboLightingDetail != NULL); - llassert(mRadioTerrainDetail != NULL); - llassert(mRadioReflectionDetail != NULL); + llassert(mComboTerrainDetail != NULL); + llassert(mComboReflectionDetail != NULL); llassert(mMeshDetailText != NULL); llassert(mShaderText != NULL); @@ -633,7 +619,7 @@ void LLPanelDisplay::setHiddenGraphicsState(bool isHidden) llassert(mAvatarText != NULL); llassert(mLightingText != NULL); llassert(mTerrainText != NULL); - llassert(mAvatarCountText != NULL); + llassert(mLimitsText != NULL); // enable/disable the states mGraphicsBorder->setVisible(!isHidden); @@ -668,10 +654,10 @@ void LLPanelDisplay::setHiddenGraphicsState(bool isHidden) mCtrlShaderEnable->setVisible(!isHidden); mCtrlAvatarImpostors->setVisible(!isHidden); mCtrlAvatarCloth->setVisible(!isHidden); - mRadioLightingDetail2->setVisible(!isHidden); + mComboLightingDetail->setVisible(!isHidden); - mRadioTerrainDetail->setVisible(!isHidden); - mRadioReflectionDetail->setVisible(!isHidden); + mComboTerrainDetail->setVisible(!isHidden); + mComboReflectionDetail->setVisible(!isHidden); // text boxes mShaderText->setVisible(!isHidden); @@ -679,8 +665,7 @@ void LLPanelDisplay::setHiddenGraphicsState(bool isHidden) mAvatarText->setVisible(!isHidden); mLightingText->setVisible(!isHidden); mTerrainText->setVisible(!isHidden); - mAvatarCountText->setVisible(!isHidden); - + mLimitsText->setVisible(!isHidden); mMeshDetailText->setVisible(!isHidden); mCtrlAvatarMaxVisible->setVisible(!isHidden); @@ -719,8 +704,6 @@ void LLPanelDisplay::cancel() gSavedSettings.setS32("RenderMaxPartCount", mParticleCount); gSavedSettings.setS32("RenderGlowResolutionPow", mPostProcess); - gSavedSettings.setBOOL("EnableWindlightRemote", mWLControl); - gSavedSettings.setS32("RenderAvatarMaxVisible", mAvatarMaxVisible); } @@ -992,5 +975,4 @@ void LLPanelDisplay::onImpostorsEnable(LLUICtrl* ctrl, void* user_data) LLCheckBoxCtrl* checkbox = (LLCheckBoxCtrl*)ctrl; self->mCtrlAvatarMaxVisible->setEnabled(checkbox->getValue().asBoolean()); - self->mAvatarCountText->setEnabled(checkbox->getValue().asBoolean()); } diff --git a/linden/indra/newview/llpaneldisplay.h b/linden/indra/newview/llpaneldisplay.h index d7727e7..e64e9ba 100644 --- a/linden/indra/newview/llpaneldisplay.h +++ b/linden/indra/newview/llpaneldisplay.h @@ -113,14 +113,13 @@ protected: LLCheckBoxCtrl *mCtrlShaderEnable; LLCheckBoxCtrl *mCtrlAvatarImpostors; LLCheckBoxCtrl *mCtrlAvatarCloth; - LLRadioGroup *mRadioLightingDetail2; + LLComboBox *mComboLightingDetail; - LLRadioGroup *mRadioTerrainDetail; - LLRadioGroup *mRadioReflectionDetail; + LLComboBox *mComboTerrainDetail; + LLComboBox *mComboReflectionDetail; LLTextBox *mAspectRatioLabel1; LLTextBox *mDisplayResLabel; - LLTextEditor *mFullScreenInfo; LLTextBox *mWindowSizeLabel; LLTextBox *mShaderText; @@ -137,7 +136,7 @@ protected: LLTextBox *mTerrainFactorText; LLTextBox *mSkyFactorText; LLTextBox *mPostProcessText; - LLTextBox *mAvatarCountText; + LLTextBox *mLimitsText; BOOL mFSAutoDetectAspect; F32 mAspectRatio; @@ -173,8 +172,6 @@ protected: S32 mAvatarMaxVisible; - BOOL mWLControl; - static void setGraphicsSettings(LLControlGroup& group); static void createGroup(); diff --git a/linden/indra/newview/llpanelgeneral.cpp b/linden/indra/newview/llpanelgeneral.cpp index 70146ce..ac957ed 100644 --- a/linden/indra/newview/llpanelgeneral.cpp +++ b/linden/indra/newview/llpanelgeneral.cpp @@ -36,7 +36,7 @@ #include "llpanelgeneral.h" // project includes -#include "llcolorswatch.h" +#include "llcheckboxctrl.h" #include "llcombobox.h" #include "lluictrlfactory.h" #include "llurlsimstring.h" @@ -90,28 +90,25 @@ BOOL LLPanelGeneral::postBuild() childSetValue("show_location_checkbox", gSavedSettings.getBOOL("ShowStartLocation")); childSetValue("show_all_title_checkbox", gSavedSettings.getBOOL("RenderHideGroupTitleAll")); childSetValue("show_my_name_checkbox", gSavedSettings.getBOOL("RenderNameHideSelf")); - childSetValue("small_avatar_names_checkbox", gSavedSettings.getBOOL("SmallAvatarNames")); + childSetValue("large_avatar_names_checkbox", !gSavedSettings.getBOOL("SmallAvatarNames")); childSetValue("highlight_friends_checkbox", gSavedSettings.getBOOL("HighlightFriends")); - childSetValue("show_my_title_checkbox", gSavedSettings.getBOOL("RenderHideGroupTitle")); - childSetValue("afk_timeout_spinner", gSavedSettings.getF32("AFKTimeout")); + //childSetValue("show_my_title_checkbox", gSavedSettings.getBOOL("RenderHideGroupTitle")); -- MC + + childSetEnabled("afk_timeout_spinner", gSavedSettings.getBOOL("AllowIdleAFK")); + childSetValue("afk_timeout_spinner", llround(gSavedSettings.getF32("AFKTimeout") / 60)); // User enters minutes, we store as seconds -- MC childSetValue("afk_timeout_checkbox", gSavedSettings.getBOOL("AllowIdleAFK")); + childSetCommitCallback("afk_timeout_checkbox", onCommitAFKCheckbox, this); + childSetValue("mini_map_notify_chat", gSavedSettings.getBOOL("MiniMapNotifyChatRange")); childSetValue("mini_map_notify_sim", gSavedSettings.getBOOL("MiniMapNotifySimRange")); // mDisplayNamesUsage = gSavedSettings.getU32("DisplayNamesUsage"); // mLegacyNamesForFriends = gSavedSettings.getBOOL("LegacyNamesForFriends"); - getChild("effect_color_swatch")->set(gSavedSettings.getColor4("EffectColor")); - - childSetValue("ui_scale_slider", gSavedSettings.getF32("UIScaleFactor")); - childSetValue("ui_auto_scale", gSavedSettings.getBOOL("UIAutoScale")); - LLComboBox* time_combobox = getChild("time_combobox"); time_combobox->setCurrentByIndex(gSavedSettings.getU32("TimeFormat")); childSetValue("language_combobox", gSavedSettings.getString("Language")); - - childSetAction("reset_ui_size", onClickResetUISize, this); // if we have no agent, we can't let them choose anything // if we have an agent, then we only let them choose if they have a choice @@ -166,16 +163,13 @@ void LLPanelGeneral::apply() gSavedSettings.setBOOL("ShowStartLocation", childGetValue("show_location_checkbox")); gSavedSettings.setBOOL("RenderHideGroupTitleAll", childGetValue("show_all_title_checkbox")); gSavedSettings.setBOOL("RenderNameHideSelf", childGetValue("show_my_name_checkbox")); - gSavedSettings.setBOOL("SmallAvatarNames", childGetValue("small_avatar_names_checkbox")); + gSavedSettings.setBOOL("SmallAvatarNames", !childGetValue("large_avatar_names_checkbox")); gSavedSettings.setBOOL("HighlightFriends", childGetValue("highlight_friends_checkbox")); - gSavedSettings.setBOOL("RenderHideGroupTitle", childGetValue("show_my_title_checkbox")); - gSavedSettings.setF32("AFKTimeout", childGetValue("afk_timeout_spinner").asReal()); + //gSavedSettings.setBOOL("RenderHideGroupTitle", childGetValue("show_my_title_checkbox")); -- MC + gSavedSettings.setF32("AFKTimeout", 60 * childGetValue("afk_timeout_spinner").asReal()); // User enters minutes, we store as seconds -- MC gSavedSettings.setBOOL("AllowIdleAFK", childGetValue("afk_timeout_checkbox")); gSavedSettings.setBOOL("MiniMapNotifyChatRange", childGetValue("mini_map_notify_chat")); gSavedSettings.setBOOL("MiniMapNotifySimRange", childGetValue("mini_map_notify_sim")); - gSavedSettings.setColor4("EffectColor", childGetValue("effect_color_swatch")); - gSavedSettings.setF32("UIScaleFactor", childGetValue("ui_scale_slider").asReal()); - gSavedSettings.setBOOL("UIAutoScale", childGetValue("ui_auto_scale")); gSavedSettings.setString("Language", childGetValue("language_combobox")); /* @@ -218,14 +212,6 @@ void LLPanelGeneral::cancel() } // static -void LLPanelGeneral::onClickResetUISize(void* user_data) -{ - LLPanelGeneral* self = (LLPanelGeneral*)user_data; - F32 def = gSavedSettings.getControl("UIScaleFactor")->getDefault().asReal(); - self->childSetValue("ui_scale_slider", def); -} - -// static void LLPanelGeneral::onClickGrid(void *) { FloaterGridManager::getInstance()->open(); @@ -241,3 +227,14 @@ void LLPanelGeneral::onLocationChanged(LLUICtrl* ctrl, void* data) self->getChild("default_location_combo")->setTextEntry(LLURLSimString::sInstance.mSimString); } } + +// static +void LLPanelGeneral::onCommitAFKCheckbox(LLUICtrl* ctrl, void* data) +{ + LLPanelGeneral* self = (LLPanelGeneral*)data; + LLCheckBoxCtrl* check = (LLCheckBoxCtrl*)ctrl; + + if (!self || !check) return; + self->childSetEnabled("afk_timeout_spinner", check->get()); + self->childSetEnabled("minutes_textbox", check->get()); +} diff --git a/linden/indra/newview/llpanelgeneral.h b/linden/indra/newview/llpanelgeneral.h index 56cc3de..4080079 100644 --- a/linden/indra/newview/llpanelgeneral.h +++ b/linden/indra/newview/llpanelgeneral.h @@ -48,9 +48,9 @@ public: void cancel(); private: - static void onClickResetUISize(void*); static void onClickGrid(void*); static void onLocationChanged(LLUICtrl* ctrl, void* data); + static void onCommitAFKCheckbox(LLUICtrl* ctrl, void* data); U32 mDisplayNamesUsage; bool mLegacyNamesForFriends; diff --git a/linden/indra/newview/llpanelinput.cpp b/linden/indra/newview/llpanelinput.cpp index 32c4af3..9664b6f 100644 --- a/linden/indra/newview/llpanelinput.cpp +++ b/linden/indra/newview/llpanelinput.cpp @@ -31,7 +31,10 @@ */ #include "llviewerprecompiledheaders.h" + #include "llpanelinput.h" + +#include "llcombobox.h" #include "lluictrlfactory.h" #include "llviewercamera.h" #include "llviewercontrol.h" @@ -60,7 +63,6 @@ BOOL LLPanelInput::postBuild() mPreAdjustCameraOffsetScale = gSavedSettings.getF32("CameraOffsetScale"); childSetValue("mouse_sensitivity", gSavedSettings.getF32("MouseSensitivity")); - childSetValue("automatic_fly", gSavedSettings.getBOOL("AutomaticFly")); childSetValue("invert_mouse", gSavedSettings.getBOOL("InvertMouse")); childSetValue("edit_camera_movement", gSavedSettings.getBOOL("EditCameraMovement")); childSetValue("appearance_camera_movement", gSavedSettings.getBOOL("AppearanceCameraMovement")); @@ -75,6 +77,7 @@ BOOL LLPanelInput::postBuild() fov_slider->setValue(LLViewerCamera::getInstance()->getView()); childSetValue("double_click_action", gSavedSettings.getString("DoubleClickAction")); + childSetCommitCallback("double_click_action", onCommitAction, this); childSetValue("go_action", gSavedSettings.getString("GoAction")); childSetValue("Disable camera constraints", gSavedSettings.getBOOL("DisableCameraConstraints")); @@ -95,7 +98,6 @@ void LLPanelInput::apply() mPreAdjustCameraOffsetScale = childGetValue("camera_offset_scale").asReal(); gSavedSettings.setF32("MouseSensitivity", childGetValue("mouse_sensitivity").asReal()); - gSavedSettings.setBOOL("AutomaticFly", childGetValue("automatic_fly")); gSavedSettings.setBOOL("InvertMouse", childGetValue("invert_mouse")); gSavedSettings.setBOOL("EditCameraMovement", childGetValue("edit_camera_movement")); gSavedSettings.setBOOL("AppearanceCameraMovement", childGetValue("appearance_camera_movement")); @@ -130,3 +132,14 @@ void LLPanelInput::onClickJoystickSetup(void* user_data) } } +// static +void LLPanelInput::onCommitAction(LLUICtrl* ctrl, void* user_data) +{ + LLPanelInput* self = (LLPanelInput*)user_data; + LLComboBox* combo = (LLComboBox*)ctrl; + if (self && combo) + { + self->childSetEnabled("go_action_label", combo->getSimple() == "Go"); + self->childSetEnabled("go_action", combo->getSimple() == "Go"); + } +} diff --git a/linden/indra/newview/llpanelinput.h b/linden/indra/newview/llpanelinput.h index 9a2bebe..29bc04e 100644 --- a/linden/indra/newview/llpanelinput.h +++ b/linden/indra/newview/llpanelinput.h @@ -47,6 +47,8 @@ public: private: static void onClickJoystickSetup(void* user_data); + static void onCommitAction(LLUICtrl* ctrl, void* user_data); + F32 mPreAdjustFOV; F32 mPreAdjustCameraOffsetScale; }; diff --git a/linden/indra/newview/llpanelmsgs.cpp b/linden/indra/newview/llpanelmsgs.cpp index 9e04070..572bcc3 100644 --- a/linden/indra/newview/llpanelmsgs.cpp +++ b/linden/indra/newview/llpanelmsgs.cpp @@ -70,6 +70,8 @@ BOOL LLPanelMsgs::postBuild() childSetValue("notify_money_change_checkbox", gSavedSettings.getBOOL("NotifyMoneyChange")); childSetLabelArg("notify_money_change_checkbox", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); + childSetValue("friends_online_notify_checkbox", gSavedSettings.getBOOL("ChatOnlineNotification")); + return TRUE; } @@ -166,6 +168,8 @@ void LLPanelMsgs::apply() gSavedSettings.setBOOL("ShowNewInventory", childGetValue("show_new_inventory")); gSavedSettings.setBOOL("ShowInInventory", childGetValue("show_in_inventory")); gSavedSettings.setBOOL("NotifyMoneyChange", childGetValue("notify_money_change_checkbox")); + + gSavedSettings.setBOOL("ChatOnlineNotification", childGetValue("friends_online_notify_checkbox").asBoolean()); } void LLPanelMsgs::cancel() diff --git a/linden/indra/newview/llpanelnetwork.cpp b/linden/indra/newview/llpanelnetwork.cpp index 3b866eb..b4ebe42 100644 --- a/linden/indra/newview/llpanelnetwork.cpp +++ b/linden/indra/newview/llpanelnetwork.cpp @@ -44,6 +44,30 @@ #include "llviewercontrol.h" #include "llviewerwindow.h" +// project includes +#include "llcheckboxctrl.h" +#include "hippogridmanager.h" +#include "lluictrlfactory.h" +#include "llviewercontrol.h" +#include "llviewermedia.h" +#include "llviewerwindow.h" +#include "llpluginclassmedia.h" + +#include "hippogridmanager.h" +#include "llpluginclassmedia.h" +#include "llviewermedia.h" + +// helper functions for getting/freeing the web browser media +// if creating/destroying these is too slow, we'll need to create +// a static member and update all our static callbacks +viewer_media_t get_web_media() +{ + + viewer_media_t media_source = LLViewerMedia::newMediaImpl("", LLUUID::null, 0, 0, 0, 0, "text/html"); + + return media_source; +} + bool LLPanelNetwork::sSocksSettingsChanged; LLPanelNetwork::LLPanelNetwork() @@ -54,16 +78,16 @@ LLPanelNetwork::LLPanelNetwork() BOOL LLPanelNetwork::postBuild() { std::string cache_location = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, ""); - childSetText("cache_location", cache_location); + childSetText("disk_cache_location", cache_location); - childSetAction("clear_cache", onClickClearCache, this); - childSetAction("set_cache", onClickSetCache, this); - childSetAction("reset_cache", onClickResetCache, this); + childSetAction("clear_disk_cache", onClickClearDiskCache, this); + childSetAction("set_disk_cache", onClickSetDiskCache, this); + childSetAction("reset_disk_cache", onClickResetDiskCache, this); childSetEnabled("connection_port", gSavedSettings.getBOOL("ConnectionPortEnabled")); childSetCommitCallback("connection_port_enabled", onCommitPort, this); - childSetValue("cache_size", (F32)gSavedSettings.getU32("CacheSize")); + childSetValue("disk_cache_size", (F32)gSavedSettings.getU32("CacheSize")); childSetValue("max_bandwidth", gSavedSettings.getF32("ThrottleBandwidthKBPS")); childSetValue("connection_port_enabled", gSavedSettings.getBOOL("ConnectionPortEnabled")); childSetValue("connection_port", (F32)gSavedSettings.getU32("ConnectionPort")); @@ -99,8 +123,48 @@ BOOL LLPanelNetwork::postBuild() // Socks 5 settings, Set all controls and labels enabled state updateProxyEnabled(this, gSavedSettings.getBOOL("Socks5ProxyEnabled"), gSavedSettings.getString("Socks5AuthType")); + childSetEnabled("xmlrpc_proxy_editor", gSavedSettings.getBOOL("XMLRPCProxyEnabled")); + childSetEnabled("xmlrpc_proxy_port", gSavedSettings.getBOOL("XMLRPCProxyEnabled")); + childSetEnabled("xmlrpc_proxy_text_label", gSavedSettings.getBOOL("XMLRPCProxyEnabled")); + + childSetValue("http_texture_check", gSavedSettings.getBOOL("ImagePipelineUseHTTP")); + childSetValue("speed_rez_check", gSavedSettings.getBOOL("SpeedRez")); + childSetValue("speed_rez_interval_spinner", (F32)gSavedSettings.getU32("SpeedRezInterval")); + childSetCommitCallback("speed_rez_check", onCommitSpeedRezCheckBox, this); + sSocksSettingsChanged = false; + // formerly the Web panel -- MC + childSetAction("clear_web_cache", onClickClearWebCache, this); + childSetCommitCallback("web_proxy_enabled", onCommitWebProxyEnabled, this); + + std::string value = gSavedSettings.getBOOL("UseExternalBrowser") ? "external" : "internal"; + childSetValue("use_external_browser", value); + + childSetValue("cookies_enabled", gSavedSettings.getBOOL("BrowserCookiesEnabled")); + childSetAction("clear_cookies", onClickClearCookies,this); + + childSetValue("web_proxy_enabled", gSavedSettings.getBOOL("BrowserProxyEnabled")); + childSetValue("web_proxy_editor", gSavedSettings.getString("BrowserProxyAddress")); + childSetValue("web_proxy_port", gSavedSettings.getS32("BrowserProxyPort")); + + if (gHippoGridManager->getConnectedGrid()->isSecondLife()) + { + childSetValue("world_search_editor", gSavedSettings.getString("SearchURLQuery")) ; + } + else + { + childSetValue("world_search_editor", gSavedSettings.getString("SearchURLQueryOpenSim")) ; + } + childSetAction("world_search_reset_default", onClickSearchDefault, this); + childSetAction("world_search_clear", onClickSearchClear, this); + + childSetEnabled("proxy_text_label", gSavedSettings.getBOOL("BrowserProxyEnabled")); + childSetEnabled("web_proxy_editor", gSavedSettings.getBOOL("BrowserProxyEnabled")); + childSetEnabled("web_proxy_port", gSavedSettings.getBOOL("BrowserProxyEnabled")); + + refresh(); + return TRUE; } @@ -112,7 +176,7 @@ LLPanelNetwork::~LLPanelNetwork() void LLPanelNetwork::apply() { - gSavedSettings.setU32("CacheSize", childGetValue("cache_size").asInteger()); + gSavedSettings.setU32("CacheSize", childGetValue("disk_cache_size").asInteger()); gSavedSettings.setF32("ThrottleBandwidthKBPS", childGetValue("max_bandwidth").asReal()); gSavedSettings.setBOOL("ConnectionPortEnabled", childGetValue("connection_port_enabled")); gSavedSettings.setU32("ConnectionPort", childGetValue("connection_port").asInteger()); @@ -130,6 +194,10 @@ void LLPanelNetwork::apply() gSavedSettings.setString("Socks5Username", childGetValue("socks5_proxy_username")); gSavedSettings.setString("Socks5Password", childGetValue("socks5_proxy_password")); + gSavedSettings.setBOOL("ImagePipelineUseHTTP", childGetValue("http_texture_check")); + gSavedSettings.setBOOL("SpeedRez", childGetValue("speed_rez_check")); + gSavedSettings.setU32("SpeedRezInterval", childGetValue("speed_rez_interval_spinner").asReal()); + if (sSocksSettingsChanged) { if (LLStartUp::getStartupState() != STATE_LOGIN_WAIT) @@ -142,14 +210,62 @@ void LLPanelNetwork::apply() LLSocks::getInstance()->updated(); } } + + // formerly the Web panel -- MC + gSavedSettings.setBOOL("BrowserCookiesEnabled", childGetValue("cookies_enabled")); + + bool proxy_enable = childGetValue("web_proxy_enabled"); + std::string proxy_address = childGetValue("web_proxy_editor"); + int proxy_port = childGetValue("web_proxy_port"); + gSavedSettings.setBOOL("BrowserProxyEnabled", proxy_enable); + gSavedSettings.setString("BrowserProxyAddress", proxy_address); + gSavedSettings.setS32("BrowserProxyPort", proxy_port); + LLViewerMedia::setProxyConfig(proxy_enable, proxy_address, proxy_port); + + if (gHippoGridManager->getConnectedGrid()->isSecondLife()) + { + gSavedSettings.setString("SearchURLQuery", childGetValue("world_search_editor")); + } + else + { + gSavedSettings.setString("SearchURLQueryOpenSim", childGetValue("world_search_editor")); + } + + bool value = childGetValue("use_external_browser").asString() == "external" ? true : false; + gSavedSettings.setBOOL("UseExternalBrowser", value); + + viewer_media_t media_source = get_web_media(); + if (media_source && media_source->hasMedia()) + { + media_source->getMediaPlugin()->enable_cookies(childGetValue("cookies_enabled")); + + bool proxy_enable = childGetValue("web_proxy_enabled"); + std::string proxy_address = childGetValue("web_proxy_editor"); + int proxy_port = childGetValue("web_proxy_port"); + media_source->getMediaPlugin()->proxy_setup(proxy_enable, proxy_address, proxy_port); + } } void LLPanelNetwork::cancel() { } +void LLPanelNetwork::refresh() +{ + if (childGetValue("speed_rez_check").asBoolean()) + { + childEnable("speed_rez_interval_spinner"); + childEnable("speed_rez_seconds_text"); + } + else + { + childDisable("speed_rez_interval_spinner"); + childDisable("speed_rez_seconds_text"); + } +} + // static -void LLPanelNetwork::onClickClearCache(void*) +void LLPanelNetwork::onClickClearDiskCache(void*) { // flag client cache for clearing next time the client runs gSavedSettings.setBOOL("PurgeCacheOnNextStartup", TRUE); @@ -157,7 +273,7 @@ void LLPanelNetwork::onClickClearCache(void*) } // static -void LLPanelNetwork::onClickSetCache(void* user_data) +void LLPanelNetwork::onClickSetDiskCache(void* user_data) { LLPanelNetwork* self = (LLPanelNetwork*)user_data; @@ -173,19 +289,19 @@ void LLPanelNetwork::onClickSetCache(void* user_data) std::string dir_name = picker.getDirName(); if (!dir_name.empty() && dir_name != cur_name) { - self->childSetText("cache_location", dir_name); + self->childSetText("disk_cache_location", dir_name); LLNotifications::instance().add("CacheWillBeMoved"); gSavedSettings.setString("NewCacheLocation", dir_name); } else { std::string cache_location = gDirUtilp->getCacheDir(); - self->childSetText("cache_location", cache_location); + self->childSetText("disk_cache_location", cache_location); } } // static -void LLPanelNetwork::onClickResetCache(void* user_data) +void LLPanelNetwork::onClickResetDiskCache(void* user_data) { LLPanelNetwork* self = (LLPanelNetwork*)user_data; if (!gSavedSettings.getString("CacheLocation").empty()) @@ -194,7 +310,7 @@ void LLPanelNetwork::onClickResetCache(void* user_data) LLNotifications::instance().add("CacheWillBeMoved"); } std::string cache_location = gDirUtilp->getCacheDir(true); - self->childSetText("cache_location", cache_location); + self->childSetText("disk_cache_location", cache_location); } // static @@ -300,3 +416,104 @@ void LLPanelNetwork::updateProxyEnabled(LLPanelNetwork * self, bool enabled, std self->childSetEnabled("xmlrpc_proxy_port", !enabled); self->childSetEnabled("xmlrpc_proxy_text_label", !enabled); } + +// static +void LLPanelNetwork::onClickClearWebCache(void*) +{ + LLNotifications::instance().add("ConfirmClearBrowserCache", LLSD(), LLSD(), callback_clear_browser_cache); +} + +//static +bool LLPanelNetwork::callback_clear_browser_cache(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotification::getSelectedOption(notification, response); + if ( option == 0 ) // YES + { + viewer_media_t media_source = get_web_media(); + if (media_source && media_source->hasMedia()) + media_source->getMediaPlugin()->clear_cache(); + } + return false; +} + +// static +void LLPanelNetwork::onClickClearCookies(void*) +{ + LLNotifications::instance().add("ConfirmClearCookies", LLSD(), LLSD(), callback_clear_cookies); +} + +//static +bool LLPanelNetwork::callback_clear_cookies(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotification::getSelectedOption(notification, response); + if ( option == 0 ) // YES + { + viewer_media_t media_source = get_web_media(); + if (media_source && media_source->hasMedia()) + media_source->getMediaPlugin()->clear_cookies(); + } + return false; +} + +// static +void LLPanelNetwork::onCommitCookies(LLUICtrl* ctrl, void* data) +{ + LLPanelNetwork* self = (LLPanelNetwork*)data; + LLCheckBoxCtrl* check = (LLCheckBoxCtrl*)ctrl; + + if (!self || !check) return; + + viewer_media_t media_source = get_web_media(); + if (media_source && media_source->hasMedia()) + media_source->getMediaPlugin()->enable_cookies(check->get()); +} + +// static +void LLPanelNetwork::onCommitWebProxyEnabled(LLUICtrl* ctrl, void* data) +{ + LLPanelNetwork* self = (LLPanelNetwork*)data; + LLCheckBoxCtrl* check = (LLCheckBoxCtrl*)ctrl; + + if (!self || !check) return; + self->childSetEnabled("web_proxy_editor", check->get()); + self->childSetEnabled("web_proxy_port", check->get()); + self->childSetEnabled("proxy_text_label", check->get()); +} + +// static +void LLPanelNetwork::onClickSearchDefault(void* user_data) +{ + LLPanelNetwork* self = (LLPanelNetwork*)user_data; + LLControlVariable* controlp = + (gHippoGridManager->getConnectedGrid()->isSecondLife()) + ? + gSavedSettings.getControl("SearchURLQuery") + : + gSavedSettings.getControl("SearchURLQueryOpenSim"); + + if (controlp) + { + self->childSetValue("world_search_editor",controlp->getDefault().asString()) ; + } + else + { + llwarns << "SearchURLQuery or SearchURLQueryOpenSim missing from settings.xml - thats bad!" << llendl; + } +} + +// static +void LLPanelNetwork::onClickSearchClear(void* user_data) +{ + LLPanelNetwork* self = (LLPanelNetwork*)user_data; + self->childSetValue("world_search_editor","") ; +} + +//static +void LLPanelNetwork::onCommitSpeedRezCheckBox(LLUICtrl* ctrl, void* user_data) +{ + LLPanelNetwork* self = (LLPanelNetwork*)user_data; + if (self) + { + self->refresh(); + } +} diff --git a/linden/indra/newview/llpanelnetwork.h b/linden/indra/newview/llpanelnetwork.h index 628f713..b8e5618 100644 --- a/linden/indra/newview/llpanelnetwork.h +++ b/linden/indra/newview/llpanelnetwork.h @@ -47,9 +47,13 @@ public: void cancel(); private: - static void onClickClearCache(void*); - static void onClickSetCache(void*); - static void onClickResetCache(void*); + void refresh(); + + static void onCommitSpeedRezCheckBox(LLUICtrl* ctrl, void* user_data); + + static void onClickClearDiskCache(void*); + static void onClickSetDiskCache(void*); + static void onClickResetDiskCache(void*); static void onCommitPort(LLUICtrl* ctrl, void*); static void onCommitXMLRPCProxyEnabled(LLUICtrl* ctrl, void* data); static void onCommitSocks5ProxyEnabled(LLUICtrl* ctrl, void* data); @@ -60,6 +64,16 @@ private: static bool sSocksSettingsChanged; + // formerly the web panel -- MC + static void onClickClearWebCache(void*); + static void onClickClearCookies(void*); + static void onClickSearchDefault(void* user_data); + static void onClickSearchClear(void* user_data); + static bool callback_clear_browser_cache(const LLSD& notification, const LLSD& response); + static bool callback_clear_cookies(const LLSD& notification, const LLSD& response); + static void onCommitCookies(LLUICtrl* ctrl, void* data); + static void onCommitWebProxyEnabled(LLUICtrl* ctrl, void* data); + }; #endif diff --git a/linden/indra/newview/llpanelweb.cpp b/linden/indra/newview/llpanelweb.cpp deleted file mode 100644 index 93441dd..0000000 --- a/linden/indra/newview/llpanelweb.cpp +++ /dev/null @@ -1,234 +0,0 @@ -/** - * @file LLPanelWeb.cpp - * @brief Network preferences panel - * - * $LicenseInfo:firstyear=2001&license=viewergpl$ - * - * Copyright (c) 2001-2009, Linden Research, Inc. - * - * 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 "llpanelweb.h" - -// project includes -#include "llcheckboxctrl.h" -#include "hippogridmanager.h" -#include "lluictrlfactory.h" -#include "llviewercontrol.h" -#include "llviewermedia.h" -#include "llviewerwindow.h" -#include "llpluginclassmedia.h" - -// helper functions for getting/freeing the web browser media -// if creating/destroying these is too slow, we'll need to create -// a static member and update all our static callbacks -viewer_media_t get_web_media() -{ - - viewer_media_t media_source = LLViewerMedia::newMediaImpl("", LLUUID::null, 0, 0, 0, 0, "text/html"); - - return media_source; -} - -LLPanelWeb::LLPanelWeb() -{ - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_web.xml"); -} - -BOOL LLPanelWeb::postBuild() -{ - childSetAction("clear_cache", onClickClearCache, this); - childSetCommitCallback("web_proxy_enabled", onCommitWebProxyEnabled, this); - - std::string value = gSavedSettings.getBOOL("UseExternalBrowser") ? "external" : "internal"; - childSetValue("use_external_browser", value); - - childSetValue("cookies_enabled", gSavedSettings.getBOOL("BrowserCookiesEnabled")); - childSetAction("clear_cookies", onClickClearCookies,this); - - childSetValue("web_proxy_enabled", gSavedSettings.getBOOL("BrowserProxyEnabled")); - childSetValue("web_proxy_editor", gSavedSettings.getString("BrowserProxyAddress")); - childSetValue("web_proxy_port", gSavedSettings.getS32("BrowserProxyPort")); - - if (gHippoGridManager->getConnectedGrid()->isSecondLife()) - { - childSetValue("world_search_editor", gSavedSettings.getString("SearchURLQuery")) ; - } - else - { - childSetValue("world_search_editor", gSavedSettings.getString("SearchURLQueryOpenSim")) ; - } - childSetAction("world_search_reset_default", onClickDefault, this); - childSetAction("world_search_clear", onClickClear, this); - - childSetEnabled("proxy_text_label", gSavedSettings.getBOOL("BrowserProxyEnabled")); - childSetEnabled("web_proxy_editor", gSavedSettings.getBOOL("BrowserProxyEnabled")); - childSetEnabled("web_proxy_port", gSavedSettings.getBOOL("BrowserProxyEnabled")); - - return TRUE; -} - - - -LLPanelWeb::~LLPanelWeb() -{ - // Children all cleaned up by default view destructor. -} - -void LLPanelWeb::apply() -{ - gSavedSettings.setBOOL("BrowserCookiesEnabled", childGetValue("cookies_enabled")); - - bool proxy_enable = childGetValue("web_proxy_enabled"); - std::string proxy_address = childGetValue("web_proxy_editor"); - int proxy_port = childGetValue("web_proxy_port"); - gSavedSettings.setBOOL("BrowserProxyEnabled", proxy_enable); - gSavedSettings.setString("BrowserProxyAddress", proxy_address); - gSavedSettings.setS32("BrowserProxyPort", proxy_port); - LLViewerMedia::setProxyConfig(proxy_enable, proxy_address, proxy_port); - - if (gHippoGridManager->getConnectedGrid()->isSecondLife()) - { - gSavedSettings.setString("SearchURLQuery", childGetValue("world_search_editor")); - } - else - { - gSavedSettings.setString("SearchURLQueryOpenSim", childGetValue("world_search_editor")); - } - - bool value = childGetValue("use_external_browser").asString() == "external" ? true : false; - gSavedSettings.setBOOL("UseExternalBrowser", value); - - viewer_media_t media_source = get_web_media(); - if (media_source && media_source->hasMedia()) - { - media_source->getMediaPlugin()->enable_cookies(childGetValue("cookies_enabled")); - - bool proxy_enable = childGetValue("web_proxy_enabled"); - std::string proxy_address = childGetValue("web_proxy_editor"); - int proxy_port = childGetValue("web_proxy_port"); - media_source->getMediaPlugin()->proxy_setup(proxy_enable, proxy_address, proxy_port); - } -} - -void LLPanelWeb::cancel() -{ -} - -// static -void LLPanelWeb::onClickClearCache(void*) -{ - LLNotifications::instance().add("ConfirmClearBrowserCache", LLSD(), LLSD(), callback_clear_browser_cache); -} - -//static -bool LLPanelWeb::callback_clear_browser_cache(const LLSD& notification, const LLSD& response) -{ - S32 option = LLNotification::getSelectedOption(notification, response); - if ( option == 0 ) // YES - { - viewer_media_t media_source = get_web_media(); - if (media_source && media_source->hasMedia()) - media_source->getMediaPlugin()->clear_cache(); - } - return false; -} - -// static -void LLPanelWeb::onClickClearCookies(void*) -{ - LLNotifications::instance().add("ConfirmClearCookies", LLSD(), LLSD(), callback_clear_cookies); -} - -//static -bool LLPanelWeb::callback_clear_cookies(const LLSD& notification, const LLSD& response) -{ - S32 option = LLNotification::getSelectedOption(notification, response); - if ( option == 0 ) // YES - { - viewer_media_t media_source = get_web_media(); - if (media_source && media_source->hasMedia()) - media_source->getMediaPlugin()->clear_cookies(); - } - return false; -} - -// static -void LLPanelWeb::onCommitCookies(LLUICtrl* ctrl, void* data) -{ - LLPanelWeb* self = (LLPanelWeb*)data; - LLCheckBoxCtrl* check = (LLCheckBoxCtrl*)ctrl; - - if (!self || !check) return; - - viewer_media_t media_source = get_web_media(); - if (media_source && media_source->hasMedia()) - media_source->getMediaPlugin()->enable_cookies(check->get()); -} -// static -void LLPanelWeb::onCommitWebProxyEnabled(LLUICtrl* ctrl, void* data) -{ - LLPanelWeb* self = (LLPanelWeb*)data; - LLCheckBoxCtrl* check = (LLCheckBoxCtrl*)ctrl; - - if (!self || !check) return; - self->childSetEnabled("web_proxy_editor", check->get()); - self->childSetEnabled("web_proxy_port", check->get()); - self->childSetEnabled("proxy_text_label", check->get()); - - -} - -// static -void LLPanelWeb::onClickDefault(void* user_data) -{ - LLPanelWeb* self = (LLPanelWeb*)user_data; - LLControlVariable* controlp = - (gHippoGridManager->getConnectedGrid()->isSecondLife()) - ? - gSavedSettings.getControl("SearchURLQuery") - : - gSavedSettings.getControl("SearchURLQueryOpenSim"); - - if (controlp) - { - self->childSetValue("world_search_editor",controlp->getDefault().asString()) ; - } - else - { - llwarns << "SearchURLQuery or SearchURLQueryOpenSim missing from settings.xml - thats bad!" << llendl; - } - -} - -// static -void LLPanelWeb::onClickClear(void* user_data) -{ - LLPanelWeb* self = (LLPanelWeb*)user_data; - self->childSetValue("world_search_editor","") ; -} diff --git a/linden/indra/newview/llpanelweb.h b/linden/indra/newview/llpanelweb.h deleted file mode 100644 index 3282827..0000000 --- a/linden/indra/newview/llpanelweb.h +++ /dev/null @@ -1,60 +0,0 @@ -/** - * @file llpanelweb.h - * @brief Web browser preferences panel - * - * $LicenseInfo:firstyear=2005&license=viewergpl$ - * - * Copyright (c) 2005-2009, Linden Research, Inc. - * - * 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 LL_LLPANELWEB_H -#define LL_LLPANELWEB_H - -#include "llpanel.h" - -class LLPanelWeb : public LLPanel -{ -public: - LLPanelWeb(); - ~LLPanelWeb(); - - BOOL postBuild(); - - void apply(); - void cancel(); - -private: - static void onClickClearCache(void*); - static void onClickClearCookies(void*); - static void onClickDefault(void* user_data); - static void onClickClear(void* user_data); - static bool callback_clear_browser_cache(const LLSD& notification, const LLSD& response); - static bool callback_clear_cookies(const LLSD& notification, const LLSD& response); - static void onCommitCookies(LLUICtrl* ctrl, void* data); - static void onCommitWebProxyEnabled(LLUICtrl* ctrl, void* data); -}; - -#endif diff --git a/linden/indra/newview/llprefsadvanced.cpp b/linden/indra/newview/llprefsadvanced.cpp index f1b2428..a9500f7 100644 --- a/linden/indra/newview/llprefsadvanced.cpp +++ b/linden/indra/newview/llprefsadvanced.cpp @@ -32,14 +32,11 @@ #include "llcombobox.h" -#include "floatercommandline.h" #include "llagent.h" #include "llprefsadvanced.h" #include "llviewercontrol.h" #include "llviewermenu.h" #include "llvoavatar.h" -#include "lgghunspell_wrapper.h" -#include "lggautocorrectfloater.h" #include "llcombobox.h" #include "llcolorswatch.h" #include "llstartup.h" @@ -57,9 +54,6 @@ LLPrefsAdvanced::LLPrefsAdvanced() sInstance = this; childSetCommitCallback("speed_rez_check", onCommitCheckBox, this); - childSetCommitCallback("command_line_check", onCommitCheckBox, this); - - childSetAction("command_line_btn", onClickCommandLine, this); } LLPrefsAdvanced::~LLPrefsAdvanced() @@ -68,17 +62,6 @@ LLPrefsAdvanced::~LLPrefsAdvanced() sInstance = NULL; } -void LLPrefsAdvanced::initHelpBtn(const std::string& name, const std::string& xml_alert) -{ - childSetAction(name, onClickHelp, new std::string(xml_alert)); -} - -void LLPrefsAdvanced::onClickHelp(void* data) -{ - std::string* xml_alert = (std::string*)data; - LLNotifications::instance().add(*xml_alert); -} - BOOL LLPrefsAdvanced::postBuild() { childSetValue("disable_log_screen_check", gSavedSettings.getBOOL("DisableLoginLogoutScreens")); @@ -86,23 +69,15 @@ BOOL LLPrefsAdvanced::postBuild() static BOOL* sShowClientNameTag = rebind_llcontrol("ShowClientNameTag", &gSavedSettings, true); childSetValue("client_name_tag_check", (*sShowClientNameTag)); - static BOOL* sShowClientColor = rebind_llcontrol("ShowClientColor", &gSavedSettings, true); - childSetValue("client_name_color_check", (*sShowClientColor)); childSetValue("client_name_hover_check", gSavedSettings.getBOOL("ShowClientNameHoverTip")); childSetValue("client_name_tag_broadcast_check", gSavedSettings.getBOOL("ShowMyClientTagToOthers")); - getChild("client_tag_color")->set(gSavedSettings.getColor4("ImprudenceTagColor")); - mClientTagColor = gSavedSettings.getColor4("ImprudenceTagColor"); - childSetValue("http_texture_check", gSavedSettings.getBOOL("ImagePipelineUseHTTP")); - childSetValue("speed_rez_check", gSavedSettings.getBOOL("SpeedRez")); - childSetValue("speed_rez_interval_spinner", (F32)gSavedSettings.getU32("SpeedRezInterval")); childSetValue("appearance_anim_check", gSavedSettings.getBOOL("AppearanceAnimate")); childSetValue("legacy_pie_menu_checkbox", gSavedSettings.getBOOL("LegacyPieEnabled")); childSetValue("language_is_public", gSavedSettings.getBOOL("LanguageIsPublic")); childSetValue("allow_mupose", gSavedSettings.getBOOL("AllowMUpose")); childSetValue("auto_close_ooc", gSavedSettings.getBOOL("AutoCloseOOC")); childSetValue("shadows_check", gSavedSettings.getBOOL("ShadowsEnabled")); - childSetValue("command_line_check", gSavedSettings.getBOOL("CmdLineChatbarEnabled")); childSetValue("lightshare_combo", LLSD((S32)gSavedSettings.getU32("LightShareAllowed"))); @@ -110,19 +85,20 @@ BOOL LLPrefsAdvanced::postBuild() LLComboBox* crash_behavior_combobox = getChild("crash_behavior_combobox"); crash_behavior_combobox->setCurrentByIndex(gCrashSettings.getS32(CRASH_BEHAVIOR_SETTING)); - getChild("EmeraldSpellBase")->setCommitCallback(onSpellBaseComboBoxCommit); - getChild("EmSpell_EditCustom")->setClickedCallback(onSpellEditCustom, this); - getChild("EmSpell_GetMore")->setClickedCallback(onSpellGetMore, this); - getChild("EmSpell_Add")->setClickedCallback(onSpellAdd, this); - getChild("EmSpell_Remove")->setClickedCallback(onSpellRemove, this); - - getChild("ac_button")->setClickedCallback(onAutoCorrectButton,this); - initHelpBtn("EmeraldHelp_SpellCheck", "EmeraldHelp_SpellCheck"); - getChild("reset_cloud_this_account")->setClickedCallback(onResetThisCloudButton,this); getChild("save_cloud_this_account")->setClickedCallback(onSaveThisCloudButton,this); getChild("save_cloud_any_account")->setClickedCallback(onSaveAnyoneCloudButton,this); + childSetValue("automatic_fly", gSavedSettings.getBOOL("AutomaticFly")); + + static BOOL* sEnableWindlightRemote = rebind_llcontrol("EnableWindlightRemote", &gSavedSettings, true); + childSetValue("toggle_windlight_control", (*sEnableWindlightRemote)); + mWLControl = (*sEnableWindlightRemote); + + childSetValue("script_errors_as_chat", gSavedSettings.getBOOL("ScriptErrorsAsChat")); + childSetValue("show_timestamps_check", gSavedSettings.getBOOL("ShowTimestamps")); + childSetValue("arrow_keys_move_avatar_check", gSavedSettings.getBOOL("ArrowKeysMoveAvatar")); + refresh(); return TRUE; @@ -133,18 +109,11 @@ void LLPrefsAdvanced::apply() gSavedSettings.setBOOL("DisableLoginLogoutScreens", childGetValue("disable_log_screen_check")); gSavedSettings.setBOOL("DisableTeleportScreens", childGetValue("disable_tp_screen_check")); gSavedSettings.setBOOL("ShowClientNameTag", childGetValue("client_name_tag_check")); - gSavedSettings.setBOOL("ShowClientColor", childGetValue("client_name_color_check")); gSavedSettings.setBOOL("ShowClientNameHoverTip", childGetValue("client_name_hover_check")); - gSavedSettings.setColor4("ImprudenceTagColor", getChild("client_tag_color")->get()); - mClientTagColor = getChild("client_tag_color")->get(); - gSavedSettings.setBOOL("ImagePipelineUseHTTP", childGetValue("http_texture_check")); - gSavedSettings.setBOOL("SpeedRez", childGetValue("speed_rez_check")); - gSavedSettings.setU32("SpeedRezInterval", childGetValue("speed_rez_interval_spinner").asReal()); gSavedSettings.setBOOL("AppearanceAnimate", childGetValue("appearance_anim_check")); gSavedSettings.setBOOL("LanguageIsPublic", childGetValue("language_is_public")); - gSavedSettings.setBOOL("AllowMUpose", childGetValue("allow_mupose")); - gSavedSettings.setBOOL("AutoCloseOOC", childGetValue("auto_close_ooc")); + gSavedSettings.setU32("LightShareAllowed", (U32)childGetValue("lightshare_combo").asInteger()); @@ -210,8 +179,6 @@ void LLPrefsAdvanced::apply() build_pie_menus(); } - gSavedSettings.setBOOL("CmdLineChatbarEnabled", childGetValue("command_line_check").asBoolean()); - LLComboBox* crash_behavior_combobox = getChild("crash_behavior_combobox"); gCrashSettings.setS32(CRASH_BEHAVIOR_SETTING, crash_behavior_combobox->getCurrentIndex()); @@ -219,79 +186,34 @@ void LLPrefsAdvanced::apply() { onSaveThisCloudButton(NULL); } + + gSavedSettings.setBOOL("AutomaticFly", childGetValue("automatic_fly")); + + // windlight remote + static BOOL* sEnableWindlightRemote = rebind_llcontrol("EnableWindlightRemote", &gSavedSettings, true); + mWLControl = (*sEnableWindlightRemote); + + gSavedSettings.setBOOL("AllowMUpose", childGetValue("allow_mupose")); + gSavedSettings.setBOOL("AutoCloseOOC", childGetValue("auto_close_ooc")); + gSavedSettings.setBOOL("ArrowKeysMoveAvatar", childGetValue("arrow_keys_move_avatar_check")); + gSavedSettings.setBOOL("ScriptErrorsAsChat", childGetValue("script_errors_as_chat")); + gSavedSettings.setBOOL("ShowTimestamps", childGetValue("show_timestamps_check")); } void LLPrefsAdvanced::cancel() { - gSavedSettings.setColor4("ImprudenceTagColor", mClientTagColor); // llwarns << "cancel" << llendl; // cool - "ok" is also cancel // LLVOAvatar::sCloud.mPartData.mStartColor = mCloudStartColor; // LLVOAvatar::sCloud.mPartData.mEndColor = mCloudEndColor; + + gSavedSettings.setBOOL("EnableWindlightRemote", mWLControl); } void LLPrefsAdvanced::refresh() { - if (childGetValue("speed_rez_check").asBoolean()) - { - childEnable("speed_rez_interval_spinner"); - childEnable("speed_rez_seconds_text"); - } - else - { - childDisable("speed_rez_interval_spinner"); - childDisable("speed_rez_seconds_text"); - } - - if (childGetValue("command_line_check").asBoolean()) - { - childEnable("command_line_btn"); - } - else - { - childDisable("command_line_btn"); - } - - LLComboBox* comboBox = getChild("EmeraldSpellBase"); - if (comboBox != NULL) - { - comboBox->removeall(); - std::vector names = glggHunSpell->getDicts(); - for (int i = 0; i < (int)names.size(); i++) - { - comboBox->add(names[i]); - } - comboBox->setSimple(gSavedSettings.getString("EmeraldSpellBase")); - } - comboBox = getChild("EmSpell_Avail"); - if (comboBox != NULL) - { - LLSD selected = comboBox->getSelectedValue(); - comboBox->removeall(); - std::vector names = glggHunSpell->getAvailDicts(); - for (int i = 0; i < (int)names.size(); i++) - { - comboBox->add(names[i]); - } - comboBox->selectByValue(selected); - } - comboBox = getChild("EmSpell_Installed"); - if (comboBox != NULL) - { - LLSD selected = comboBox->getSelectedValue(); - comboBox->removeall(); - std::vector names = glggHunSpell->getInstalledDicts(); - for (int i = 0; i < (int)names.size(); i++) - { - comboBox->add(names[i]); - } - comboBox->selectByValue(selected); - } - - bool is_logged_in = LLStartUp::isLoggedIn(); setParticleControls(is_logged_in); - } void LLPrefsAdvanced::draw() @@ -363,65 +285,10 @@ void LLPrefsAdvanced::setParticleControls(bool is_logged_in) void LLPrefsAdvanced::onCommitCheckBox(LLUICtrl* ctrl, void* user_data) { LLPrefsAdvanced* self = (LLPrefsAdvanced*)user_data; - self->refresh(); -} - -void LLPrefsAdvanced::onSpellAdd(void* data) -{ - LLPrefsAdvanced* panel = (LLPrefsAdvanced*)data; - if(panel) + if (self) { - glggHunSpell->addButton(panel->childGetValue("EmSpell_Avail").asString()); + self->refresh(); } - panel->refresh(); -} - -void LLPrefsAdvanced::onSpellRemove(void* data) -{ - LLPrefsAdvanced* panel = (LLPrefsAdvanced*)data; - if(panel) - { - glggHunSpell->removeButton(panel->childGetValue("EmSpell_Installed").asString()); - } - panel->refresh(); -} - -void LLPrefsAdvanced::onSpellGetMore(void* data) -{ - glggHunSpell->getMoreButton(data); -} - -void LLPrefsAdvanced::onSpellEditCustom(void* data) -{ - glggHunSpell->editCustomButton(); -} - -void LLPrefsAdvanced::onSpellBaseComboBoxCommit(LLUICtrl* ctrl, void* userdata) -{ - - LLComboBox* box = (LLComboBox*)ctrl; - if (box) - { - glggHunSpell->newDictSelection(box->getValue().asString()); - //LLPanelEmerald* panel = (LLPanelEmerald*)userdata;//box->getParent(); - if (sInstance) - { - sInstance->refresh(); - } - } - //LLPanelEmerald* panel = (LLPanelEmerald*)userdata; - //if(panel)panel->refresh(); -} - -void LLPrefsAdvanced::onAutoCorrectButton(void * data) -{ - lggAutoCorrectFloaterStart::show(TRUE,data); -} - -void LLPrefsAdvanced::onClickCommandLine(void* data) -{ - FloaterCommandLine::getInstance()->open(); - FloaterCommandLine::getInstance()->center(); } void LLPrefsAdvanced::onResetThisCloudButton(void * data) diff --git a/linden/indra/newview/llprefsadvanced.h b/linden/indra/newview/llprefsadvanced.h index e4febcc..b863db3 100644 --- a/linden/indra/newview/llprefsadvanced.h +++ b/linden/indra/newview/llprefsadvanced.h @@ -51,30 +51,19 @@ private: static LLPrefsAdvanced* sInstance; static void onCommitCheckBox(LLUICtrl* ctrl, void* user_data); - static void onClickCommandLine(void* 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); - static void onAutoCorrectButton(void * data); static void onResetThisCloudButton(void * data); static void onSaveThisCloudButton(void * data); static void onSaveAnyoneCloudButton(void * data); - LLColor4 mClientTagColor; - protected: void setParticleControls(bool is_logged_in); - void initHelpBtn(const std::string& name, const std::string& xml_alert); - static void onClickHelp(void* data); private: bool mWasLoggedIn; LLColor4 mCloudStartColor; LLColor4 mCloudEndColor; LLUUID mCloudTextureID; + BOOL mWLControl; }; #endif // LLPREFSADVANCED_H diff --git a/linden/indra/newview/llprefschat.cpp b/linden/indra/newview/llprefschat.cpp index 5f74a25..9490ba2 100644 --- a/linden/indra/newview/llprefschat.cpp +++ b/linden/indra/newview/llprefschat.cpp @@ -33,13 +33,20 @@ #include "llviewerprecompiledheaders.h" +#include "llcombobox.h" +#include "llpanel.h" +#include "llstylemap.h" +#include "lluictrlfactory.h" + +#include "floatercommandline.h" +#include "llagent.h" #include "llchatbar.h" #include "llfloaterchat.h" +#include "lgghunspell_wrapper.h" +#include "lggautocorrectfloater.h" #include "llprefschat.h" #include "llviewercontrol.h" -#include "lluictrlfactory.h" -#include "llradiogroup.h" -#include "llstylemap.h" +#include "llviewermessage.h" class LLPrefsChatImpl : public LLPanel { @@ -47,44 +54,53 @@ public: LLPrefsChatImpl(); /*virtual*/ ~LLPrefsChatImpl(){}; + /*virtual*/ BOOL postBuild(); + void apply(); void cancel(); + void refresh(); + void setPersonalInfo(bool im_via_email, const std::string& email); + void initHelpBtn(const std::string& name, const std::string& xml_alert); + + static void onAutoCorrectButton(void * data); + static void onClickHelp(void* data); + static void onClickCommandLine(void* data); + 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); + +protected: + bool mOriginalIMViaEmail; + bool mGotPersonalInfo; private: - void refreshValues(); - S32 mChatSize; - F32 mChatPersist; - S32 mChatMaxLines; - BOOL mChatFullWidth; - BOOL mCloseChatOnReturn; - BOOL mArrowKeysMoveAvatar; - BOOL mShowTimestamps; - BOOL mPlayTypingAnim; - BOOL mChatBubbles; - BOOL mLocalChatBubbles; - BOOL mScriptErrorAsChat; - BOOL mChatChannel; - F32 mConsoleOpacity; - F32 mBubbleOpacity; - std::string mTranslateLanguage; - BOOL mTranslateChat; + bool mChatChannel; }; LLPrefsChatImpl::LLPrefsChatImpl() - : LLPanel(std::string("Chat Panel")) + : LLPanel(std::string("Chat Panel")), + mChatChannel(false), + mOriginalIMViaEmail(false), + mGotPersonalInfo(false) { - refreshValues(); // initialize member data from saved settings - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_chat.xml"); +} + +BOOL LLPrefsChatImpl::postBuild() +{ + requires("send_im_to_email"); + childSetLabelArg("send_im_to_email", "[EMAIL]", getString("log_in_to_change")); + + // Don't enable these until we get personal data + childSetEnabled("send_im_to_email", false); - getChild("chat_font_size")->setSelectedIndex(gSavedSettings.getS32("ChatFontSize")); + getChild("chat_font_size")->setValue(gSavedSettings.getS32("ChatFontSize")); childSetValue("fade_chat_time", gSavedSettings.getF32("ChatPersistTime")); childSetValue("max_chat_count", gSavedSettings.getS32("ConsoleMaxLines")); - childSetValue("arrow_keys_move_avatar_check", gSavedSettings.getBOOL("ArrowKeysMoveAvatar")); - childSetValue("show_timestamps_check", gSavedSettings.getBOOL("ChatShowTimestamps")); - childSetValue("script_errors_as_chat", gSavedSettings.getBOOL("ScriptErrorsAsChat")); - childSetValue("bubble_text_chat", gSavedSettings.getBOOL("UseChatBubbles")); childSetValue("local_bubble_text_chat", gSavedSettings.getBOOL("UseLocalChatWithBubbles")); childSetValue("chat_full_width_check", gSavedSettings.getBOOL("ChatFullWidth")); @@ -95,59 +111,89 @@ LLPrefsChatImpl::LLPrefsChatImpl() childSetValue("bubble_chat_opacity", gSavedSettings.getF32("ChatBubbleOpacity")); childSetValue("translate_language_combobox", gSavedSettings.getString("TranslateLanguage")); childSetValue("translate_chat", gSavedSettings.getBOOL("TranslateChat")); -} -void LLPrefsChatImpl::refreshValues() -{ - //set values - mChatSize = gSavedSettings.getS32("ChatFontSize"); - mChatPersist = gSavedSettings.getF32("ChatPersistTime"); - mChatMaxLines = gSavedSettings.getS32("ConsoleMaxLines"); - mArrowKeysMoveAvatar = gSavedSettings.getBOOL("ArrowKeysMoveAvatar"); - mShowTimestamps = gSavedSettings.getBOOL("ChatShowTimestamps"); - mScriptErrorAsChat = gSavedSettings.getBOOL("ScriptErrorsAsChat"); - mChatBubbles = gSavedSettings.getBOOL("UseChatBubbles"); - mLocalChatBubbles = gSavedSettings.getBOOL("UseLocalChatWithBubbles"); - mChatFullWidth = gSavedSettings.getBOOL("ChatFullWidth"); - mCloseChatOnReturn = gSavedSettings.getBOOL("CloseChatOnReturn"); - mPlayTypingAnim = gSavedSettings.getBOOL("PlayTypingAnim"); mChatChannel = gSavedSettings.getBOOL("ChatChannelSelect"); - mConsoleOpacity = gSavedSettings.getF32("ConsoleBackgroundOpacity"); - mTranslateLanguage = gSavedSettings.getString("TranslateLanguage"); - mTranslateChat = gSavedSettings.getBOOL("TranslateChat"); - static F32* sChatBubbleOpacity = rebind_llcontrol("ChatBubbleOpacity", &gSavedSettings, true); - mBubbleOpacity = *sChatBubbleOpacity; + + childSetValue("command_line_check", gSavedSettings.getBOOL("CmdLineChatbarEnabled")); + childSetCommitCallback("command_line_check", onCommitCheckBox, this); + childSetAction("command_line_btn", onClickCommandLine, this); + + getChild("EmeraldSpellBase")->setCommitCallback(onSpellBaseComboBoxCommit); + getChild("EmSpell_EditCustom")->setClickedCallback(onSpellEditCustom, this); + getChild("EmSpell_GetMore")->setClickedCallback(onSpellGetMore, this); + getChild("EmSpell_Add")->setClickedCallback(onSpellAdd, this); + getChild("EmSpell_Remove")->setClickedCallback(onSpellRemove, this); + + getChild("ac_button")->setClickedCallback(onAutoCorrectButton, this); + initHelpBtn("EmeraldHelp_SpellCheck", "EmeraldHelp_SpellCheck"); + + childSetValue("include_im_in_chat_console", gSavedSettings.getBOOL("IMInChatConsole")); + childSetValue("include_im_in_chat_history", gSavedSettings.getBOOL("IMInChatHistory")); + childSetValue("vertical-imtabs-toggle", gSavedSettings.getBOOL("VerticalIMTabs")); + + refresh(); + + return TRUE; +} + +void LLPrefsChatImpl::refresh() +{ + if (childGetValue("command_line_check").asBoolean()) + { + childEnable("command_line_btn"); + } + else + { + childDisable("command_line_btn"); + } + + LLComboBox* comboBox = getChild("EmeraldSpellBase"); + if (comboBox != NULL) + { + comboBox->removeall(); + std::vector names = glggHunSpell->getDicts(); + for (int i = 0; i < (int)names.size(); i++) + { + comboBox->add(names[i]); + } + comboBox->setSimple(gSavedSettings.getString("EmeraldSpellBase")); + } + comboBox = getChild("EmSpell_Avail"); + if (comboBox != NULL) + { + LLSD selected = comboBox->getSelectedValue(); + comboBox->removeall(); + std::vector names = glggHunSpell->getAvailDicts(); + for (int i = 0; i < (int)names.size(); i++) + { + comboBox->add(names[i]); + } + comboBox->selectByValue(selected); + } + comboBox = getChild("EmSpell_Installed"); + if (comboBox != NULL) + { + LLSD selected = comboBox->getSelectedValue(); + comboBox->removeall(); + std::vector names = glggHunSpell->getInstalledDicts(); + for (int i = 0; i < (int)names.size(); i++) + { + comboBox->add(names[i]); + } + comboBox->selectByValue(selected); + } } void LLPrefsChatImpl::cancel() { - gSavedSettings.setS32("ChatFontSize", mChatSize); - gSavedSettings.setF32("ChatPersistTime", mChatPersist); - gSavedSettings.setS32("ConsoleMaxLines", mChatMaxLines); - gSavedSettings.setBOOL("ArrowKeysMoveAvatar", mArrowKeysMoveAvatar); - gSavedSettings.setBOOL("ChatShowTimestamps", mShowTimestamps); - gSavedSettings.setBOOL("ScriptErrorsAsChat", mScriptErrorAsChat); - gSavedSettings.setBOOL("UseChatBubbles", mChatBubbles); - gSavedSettings.setBOOL("UseLocalChatWithBubbles", mLocalChatBubbles); - gSavedSettings.setBOOL("ChatFullWidth", mChatFullWidth); - gSavedSettings.setBOOL("CloseChatOnReturn", mCloseChatOnReturn); - gSavedSettings.setBOOL("PlayTypingAnim", mPlayTypingAnim); - gSavedSettings.setBOOL("ChatChannelSelect", mChatChannel); - gSavedSettings.setF32("ConsoleBackgroundOpacity", mConsoleOpacity); - gSavedSettings.setF32("ChatBubbleOpacity", mBubbleOpacity); - gSavedSettings.setString("TranslateLanguage", mTranslateLanguage); - gSavedSettings.setBOOL("TranslateChat", mTranslateChat); } void LLPrefsChatImpl::apply() { - gSavedSettings.setS32("ChatFontSize", getChild("chat_font_size")->getSelectedIndex()); + gSavedSettings.setS32("ChatFontSize", getChild("chat_font_size")->getValue().asInteger()); gSavedSettings.setF32("ChatPersistTime", childGetValue("fade_chat_time").asReal()); gSavedSettings.setS32("ConsoleMaxLines", childGetValue("max_chat_count")); - gSavedSettings.setBOOL("ArrowKeysMoveAvatar", childGetValue("arrow_keys_move_avatar_check")); - gSavedSettings.setBOOL("ChatShowTimestamps", childGetValue("show_timestamps_check")); - gSavedSettings.setBOOL("ScriptErrorsAsChat", childGetValue("script_errors_as_chat")); gSavedSettings.setBOOL("UseChatBubbles", childGetValue("bubble_text_chat")); gSavedSettings.setBOOL("UseLocalChatWithBubbles", childGetValue("local_bubble_text_chat")); gSavedSettings.setBOOL("ChatFullWidth", childGetValue("chat_full_width_check")); @@ -160,7 +206,7 @@ void LLPrefsChatImpl::apply() gSavedSettings.setString("TranslateLanguage", childGetValue("translate_language_combobox")); gSavedSettings.setBOOL("TranslateChat", childGetValue("translate_chat")); - BOOL chan_check = childGetValue("toggle_channel_control"); + bool chan_check = childGetValue("toggle_channel_control"); gSavedSettings.setBOOL("ChatChannelSelect", chan_check); if (mChatChannel != chan_check) { @@ -172,7 +218,138 @@ void LLPrefsChatImpl::apply() mChatChannel = chan_check; } - refreshValues(); // member values become the official values and cancel becomes a no-op. + gSavedSettings.setBOOL("CmdLineChatbarEnabled", childGetValue("command_line_check").asBoolean()); + + gSavedSettings.setBOOL("VerticalIMTabs", childGetValue("vertical-imtabs-toggle").asBoolean()); + gSavedSettings.setBOOL("IMInChatConsole", childGetValue("include_im_in_chat_console").asBoolean()); + gSavedSettings.setBOOL("IMInChatHistory", childGetValue("include_im_in_chat_history").asBoolean()); + + if (mGotPersonalInfo) + { + bool new_im_via_email = childGetValue("send_im_to_email").asBoolean(); + + if (new_im_via_email != mOriginalIMViaEmail) + { + LLMessageSystem* msg = gMessageSystem; + msg->newMessageFast(_PREHASH_UpdateUserInfo); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + msg->nextBlockFast(_PREHASH_UserData); + msg->addBOOLFast(_PREHASH_IMViaEMail, new_im_via_email); + gAgent.sendReliableMessage(); + } + } + + // Spell checking prefs aren't here because Emerald never supported the cancel button. We should fix this -- MC +} + +// Enable and set the value of settings recieved from the sim in AgentInfoReply +void LLPrefsChatImpl::setPersonalInfo(bool im_via_email, const std::string& email) +{ + mGotPersonalInfo = true; + mOriginalIMViaEmail = im_via_email; + + childEnable("send_im_to_email"); + childSetValue("send_im_to_email", im_via_email); + + // Truncate the e-mail address if it's too long (to prevent going off + // the edge of the dialog). + std::string display_email(email); + if(display_email.size() > 30) + { + display_email.resize(30); + display_email += "..."; + } + else if (display_email.empty()) + { + display_email = getString("default_email_used"); + } + childSetLabelArg("send_im_to_email", "[EMAIL]", display_email); +} + +// static +void LLPrefsChatImpl::onSpellAdd(void* data) +{ + LLPrefsChatImpl* panel = (LLPrefsChatImpl*)data; + if (panel) + { + glggHunSpell->addButton(panel->childGetValue("EmSpell_Avail").asString()); + panel->refresh(); + } +} + +// static +void LLPrefsChatImpl::onSpellRemove(void* data) +{ + LLPrefsChatImpl* panel = (LLPrefsChatImpl*)data; + if (panel) + { + glggHunSpell->removeButton(panel->childGetValue("EmSpell_Installed").asString()); + panel->refresh(); + } +} + +// static +void LLPrefsChatImpl::onSpellGetMore(void* data) +{ + glggHunSpell->getMoreButton(data); +} + +// static +void LLPrefsChatImpl::onSpellEditCustom(void* data) +{ + glggHunSpell->editCustomButton(); +} + +// static +void LLPrefsChatImpl::onSpellBaseComboBoxCommit(LLUICtrl* ctrl, void* userdata) +{ + LLComboBox* box = (LLComboBox*)ctrl; + if (box) + { + glggHunSpell->newDictSelection(box->getValue().asString()); + } + LLPrefsChatImpl* panel = (LLPrefsChatImpl*)userdata; + if (panel) + { + panel->refresh(); + } +} + +// static +void LLPrefsChatImpl::onAutoCorrectButton(void * data) +{ + lggAutoCorrectFloaterStart::show(TRUE,data); +} + +// static +void LLPrefsChatImpl::onClickCommandLine(void* data) +{ + FloaterCommandLine::getInstance()->open(); + FloaterCommandLine::getInstance()->center(); +} + +//static +void LLPrefsChatImpl::onCommitCheckBox(LLUICtrl* ctrl, void* user_data) +{ + LLPrefsChatImpl* self = (LLPrefsChatImpl*)user_data; + if (self) + { + self->refresh(); + } +} + +void LLPrefsChatImpl::initHelpBtn(const std::string& name, const std::string& xml_alert) +{ + childSetAction(name, onClickHelp, new std::string(xml_alert)); +} + +// static +void LLPrefsChatImpl::onClickHelp(void* data) +{ + std::string* xml_alert = (std::string*)data; + LLNotifications::instance().add(*xml_alert); } //--------------------------------------------------------------------------- @@ -197,6 +374,11 @@ void LLPrefsChat::cancel() impl.cancel(); } +void LLPrefsChat::setPersonalInfo(bool im_via_email, const std::string& email) +{ + impl.setPersonalInfo(im_via_email, email); +} + LLPanel* LLPrefsChat::getPanel() { return &impl; diff --git a/linden/indra/newview/llprefschat.h b/linden/indra/newview/llprefschat.h index 86718a8..64bfb36 100644 --- a/linden/indra/newview/llprefschat.h +++ b/linden/indra/newview/llprefschat.h @@ -44,6 +44,7 @@ public: void apply(); void cancel(); + void setPersonalInfo(bool im_via_email, const std::string& email); LLPanel* getPanel(); diff --git a/linden/indra/newview/llprefscolors.cpp b/linden/indra/newview/llprefscolors.cpp index b0bc345..0b4caf5 100644 --- a/linden/indra/newview/llprefscolors.cpp +++ b/linden/indra/newview/llprefscolors.cpp @@ -80,6 +80,12 @@ BOOL LLPrefsColors::postBuild() childSetCommitCallback("HighlightOwnNameInChat", onCommitCheckSelfName, this); childSetCommitCallback("HighlightFriendsChat", onCommitCheckFriends, this); + getChild("effect_color_swatch")->set(gSavedSettings.getColor4("EffectColor")); + + getChild("client_tag_color")->set(gSavedSettings.getColor4("ImprudenceTagColor")); + static BOOL* sShowClientColor = rebind_llcontrol("ShowClientColor", &gSavedSettings, true); + childSetValue("client_name_color_check", (*sShowClientColor)); + return TRUE; } @@ -96,6 +102,8 @@ void LLPrefsColors::refreshColors() mHTMLLinkColor = gSavedSettings.getColor4("HTMLLinkColor"); mFriendsChatColor = gSavedSettings.getColor4("FriendsChatColor"); mOwnNameChatColor = gSavedSettings.getColor4("OwnNameChatColor"); + mEffectColor = gSavedSettings.getColor4("EffectColor"); + mClientTagColor = gSavedSettings.getColor4("ImprudenceTagColor"); } // static @@ -113,9 +121,6 @@ void LLPrefsColors::updateSelfCheck() childSetEnabled("nick01", highlight_names_enabled); childSetEnabled("nick02", highlight_names_enabled); childSetEnabled("nick03", highlight_names_enabled); - childSetEnabled("nick01_text", highlight_names_enabled); - childSetEnabled("nick02_text", highlight_names_enabled); - childSetEnabled("nick03_text", highlight_names_enabled); } // static @@ -130,6 +135,18 @@ void LLPrefsColors::updateFriendsCheck() getChild("FriendsChatColor")->setEnabled(childGetValue("HighlightFriendsChat")); } +// static +void LLPrefsColors::onCommitCheckClient(LLUICtrl* ctrl, void* userdata) +{ + LLPrefsColors* self = (LLPrefsColors*)userdata; + self->updateClientCheck(); +} + +void LLPrefsColors::updateClientCheck() +{ + getChild("client_tag_color")->setEnabled(childGetValue("client_name_color_checkt")); +} + void LLPrefsColors::cancel() { gSavedSettings.setColor4("SystemChatColor", mSystemChatColor); @@ -143,6 +160,8 @@ void LLPrefsColors::cancel() gSavedSettings.setColor4("HTMLLinkColor", mHTMLLinkColor); gSavedSettings.setColor4("FriendsChatColor", mFriendsChatColor); gSavedSettings.setColor4("OwnNameChatColor", mOwnNameChatColor); + gSavedSettings.setColor4("EffectColor", mEffectColor); + gSavedSettings.setColor4("ImprudenceTagColor", mClientTagColor); } void LLPrefsColors::apply() @@ -177,5 +196,10 @@ void LLPrefsColors::apply() boost::trim(nick03); gSavedSettings.setString("HighlightNickname03", nick03); + gSavedSettings.setColor4("EffectColor", childGetValue("effect_color_swatch")); + + gSavedSettings.setBOOL("ShowClientColor", childGetValue("client_name_color_check")); + gSavedSettings.setColor4("ImprudenceTagColor", getChild("client_tag_color")->get()); + refreshColors(); // member values become the official values and cancel becomes a no-op. } diff --git a/linden/indra/newview/llprefscolors.h b/linden/indra/newview/llprefscolors.h index 70bda89..d580add 100644 --- a/linden/indra/newview/llprefscolors.h +++ b/linden/indra/newview/llprefscolors.h @@ -47,9 +47,11 @@ public: private: static void onCommitCheckSelfName(LLUICtrl* ctrl, void* userdata); static void onCommitCheckFriends(LLUICtrl* ctrl, void* userdata); + static void onCommitCheckClient(LLUICtrl* ctrl, void* userdata); void refreshColors(); void updateFriendsCheck(); void updateSelfCheck(); + void updateClientCheck(); LLColor4 mSystemChatColor; LLColor4 mUserChatColor; @@ -62,6 +64,8 @@ private: LLColor4 mHTMLLinkColor; LLColor4 mFriendsChatColor; LLColor4 mOwnNameChatColor; + LLColor4 mEffectColor; + LLColor4 mClientTagColor; }; #endif //LLPREFSCOLORS_H diff --git a/linden/indra/newview/llprefsim.cpp b/linden/indra/newview/llprefsim.cpp index 33d9701..47b5d8b 100644 --- a/linden/indra/newview/llprefsim.cpp +++ b/linden/indra/newview/llprefsim.cpp @@ -65,7 +65,7 @@ public: void apply(); void cancel(); - void setPersonalInfo(const std::string& visibility, bool im_via_email, const std::string& email); + void setPersonalInfo(const std::string& visibility); void preparePerAccountPrefs(bool enable); void enableHistory(); @@ -78,7 +78,6 @@ protected: bool mGotPersonalInfo; bool mGotPerAccountSettings; - bool mOriginalIMViaEmail; bool mOriginalHideOnlineStatus; std::string mDirectoryVisibility; @@ -89,7 +88,6 @@ LLPrefsIMImpl::LLPrefsIMImpl() : LLPanel(std::string("IM Prefs Panel")), mGotPersonalInfo(false), mGotPerAccountSettings(false), - mOriginalIMViaEmail(false), mOriginalHideOnlineStatus(false) { LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_im.xml"); @@ -102,29 +100,14 @@ void LLPrefsIMImpl::cancel() BOOL LLPrefsIMImpl::postBuild() { requires("online_visibility"); - requires("send_im_to_email"); + if (!checkRequirements()) { return FALSE; } - childSetLabelArg("send_im_to_email", "[EMAIL]", getString("log_in_to_change")); - - // Don't enable these until we get personal data + // Don't enable this until we get personal data childSetEnabled("online_visibility", false); - childSetEnabled("send_im_to_email", false); - - // These are safe to enable - childSetEnabled("include_im_in_chat_console", true); - childSetEnabled("include_im_in_chat_history", true); - childSetEnabled("show_timestamps_check", true); - childSetEnabled("friends_online_notify_checkbox", true); - childSetEnabled("vertical-imtabs-toggle", true); - childSetValue("include_im_in_chat_console", gSavedSettings.getBOOL("IMInChatConsole")); - childSetValue("include_im_in_chat_history", gSavedSettings.getBOOL("IMInChatHistory")); - childSetValue("show_timestamps_check", gSavedSettings.getBOOL("IMShowTimestamps")); - childSetValue("friends_online_notify_checkbox", gSavedSettings.getBOOL("ChatOnlineNotification")); - childSetValue("vertical-imtabs-toggle", gSavedSettings.getBOOL("VerticalIMTabs")); childSetAction("log_path_button", onClickLogPath, this); childSetCommitCallback("log_chat",onCommitLogging,this); @@ -191,11 +174,9 @@ void LLPrefsIMImpl::apply() if (mGotPersonalInfo) { - bool new_im_via_email = childGetValue("send_im_to_email").asBoolean(); bool new_hide_online = childGetValue("online_visibility").asBoolean(); - if((new_im_via_email != mOriginalIMViaEmail) - ||(new_hide_online != mOriginalHideOnlineStatus)) + if (new_hide_online != mOriginalHideOnlineStatus) { LLMessageSystem* msg = gMessageSystem; msg->newMessageFast(_PREHASH_UpdateUserInfo); @@ -203,7 +184,7 @@ void LLPrefsIMImpl::apply() msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); msg->nextBlockFast(_PREHASH_UserData); - msg->addBOOLFast(_PREHASH_IMViaEMail, new_im_via_email); + //msg->addBOOLFast(_PREHASH_IMViaEMail, new_im_via_email); // This hack is because we are representing several different // possible strings with a single checkbox. Since most users // can only select between 2 values, we represent it as a @@ -220,19 +201,12 @@ void LLPrefsIMImpl::apply() gAgent.sendReliableMessage(); } } - - gSavedSettings.setBOOL("VerticalIMTabs", childGetValue("vertical-imtabs-toggle").asBoolean()); - gSavedSettings.setBOOL("IMInChatConsole", childGetValue("include_im_in_chat_console").asBoolean()); - gSavedSettings.setBOOL("IMInChatHistory", childGetValue("include_im_in_chat_history").asBoolean()); - gSavedSettings.setBOOL("IMShowTimestamps", childGetValue("show_timestamps_check").asBoolean()); - gSavedSettings.setBOOL("ChatOnlineNotification", childGetValue("friends_online_notify_checkbox").asBoolean()); } // Enable and set the value of settings recieved from the sim in AgentInfoReply -void LLPrefsIMImpl::setPersonalInfo(const std::string& visibility, bool im_via_email, const std::string& email) +void LLPrefsIMImpl::setPersonalInfo(const std::string& visibility) { mGotPersonalInfo = true; - mOriginalIMViaEmail = im_via_email; mDirectoryVisibility = visibility; if(visibility == VISIBILITY_DEFAULT) @@ -252,22 +226,6 @@ void LLPrefsIMImpl::setPersonalInfo(const std::string& visibility, bool im_via_e childSetValue("online_visibility", mOriginalHideOnlineStatus); childSetLabelArg("online_visibility", "[DIR_VIS]", mDirectoryVisibility); - childEnable("send_im_to_email"); - childSetValue("send_im_to_email", im_via_email); - - // Truncate the e-mail address if it's too long (to prevent going off - // the edge of the dialog). - std::string display_email(email); - if(display_email.size() > 30) - { - display_email.resize(30); - display_email += "..."; - } - else if (display_email.empty()) - { - display_email = getString("default_email_used"); - } - childSetLabelArg("send_im_to_email", "[EMAIL]", display_email); } // Enable and set the value of settings that need an account name @@ -373,9 +331,9 @@ void LLPrefsIM::cancel() impl.cancel(); } -void LLPrefsIM::setPersonalInfo(const std::string& visibility, bool im_via_email, const std::string& email) +void LLPrefsIM::setPersonalInfo(const std::string& visibility) { - impl.setPersonalInfo(visibility, im_via_email, email); + impl.setPersonalInfo(visibility); } void LLPrefsIM::preparePerAccountPrefs(bool enable) diff --git a/linden/indra/newview/llprefsim.h b/linden/indra/newview/llprefsim.h index acf9b0f..054e4c7 100644 --- a/linden/indra/newview/llprefsim.h +++ b/linden/indra/newview/llprefsim.h @@ -45,7 +45,7 @@ public: void apply(); void cancel(); - void setPersonalInfo(const std::string& visibility, bool im_via_email, const std::string& email); + void setPersonalInfo(const std::string& visibility); void preparePerAccountPrefs(bool enable); LLPanel* getPanel(); diff --git a/linden/indra/newview/llprefsvoice.cpp b/linden/indra/newview/llprefsvoice.cpp index 7c50f4a..8abe178 100644 --- a/linden/indra/newview/llprefsvoice.cpp +++ b/linden/indra/newview/llprefsvoice.cpp @@ -189,6 +189,8 @@ void LLPrefsVoice::onCommitEnableVoiceChat(LLUICtrl* ctrl, void* user_data) self->childSetEnabled("push_to_talk_label", enable); self->childSetEnabled("voice_call_friends_only_check", enable); self->childSetEnabled("auto_disengage_mic_check", enable); + self->childSetEnabled("privacy_heading", enable); + self->childSetEnabled("push_to_talk_heading", enable); self->childSetEnabled("push_to_talk_toggle_check", enable); self->childSetEnabled("ear_location", enable); self->childSetEnabled("set_voice_hotkey_button", enable); diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml index 3b66fb8..a32a1c7 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml @@ -1,54 +1,166 @@ + + + - + + + name="tab2" tab_min_width="50" tab_position="top" width="495" bg_opaque_color="0,0,0,0.0"> + - + + + + User Interface: + + + - + + + + + + + + + Avatar: + + - - + tool_tip="Toggle editing animation and standing up when entering appearance mode" + label="Animate avatar when editing appearance" left_delta="0" mouse_opaque="true" + name="appearance_anim_check" radio_style="false" width="217" /> + +