From e3b97ac65b10a58c1dac041743e4acd1042492f5 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Thu, 20 Mar 2008 21:41:26 +0000 Subject: merge release@82383 viewer-cleanup2-7-merge@82828 QAR-369 --- indra/newview/app_settings/cmd_line.xml | 323 + indra/newview/app_settings/settings.xml | 9604 ++++++++++++++++++++ .../app_settings/settings_crash_behavior.xml | 15 + indra/newview/app_settings/settings_files.xml | 22 + .../newview/app_settings/settings_per_account.xml | 114 + .../installers/windows/installer_template.nsi | 8 +- indra/newview/llagent.cpp | 18 +- indra/newview/llagent.h | 21 +- indra/newview/llappviewer.cpp | 1198 +-- indra/newview/llappviewer.h | 57 +- indra/newview/llappviewerlinux.cpp | 30 +- indra/newview/llappviewerlinux.h | 3 + indra/newview/llappviewermacosx.cpp | 68 +- indra/newview/llappviewermacosx.h | 1 + indra/newview/llappviewerwin32.cpp | 83 +- indra/newview/llappviewerwin32.h | 9 +- indra/newview/llcommandlineparser.cpp | 535 ++ indra/newview/llcommandlineparser.h | 131 + indra/newview/llfeaturemanager.cpp | 2 +- indra/newview/llfirstuse.cpp | 19 +- indra/newview/llfloaterabout.cpp | 2 +- indra/newview/llfloatergroups.cpp | 3 +- indra/newview/llfloatergroups.h | 2 +- indra/newview/llfloaterpreference.cpp | 2 +- indra/newview/llfloatersettingsdebug.cpp | 490 + indra/newview/llfloatersettingsdebug.h | 61 + indra/newview/llnetmap.cpp | 8 - indra/newview/llnetmap.h | 8 - indra/newview/llpanellogin.cpp | 34 +- indra/newview/llstartup.cpp | 84 +- indra/newview/lltoolgun.cpp | 12 +- indra/newview/llvectorperfoptions.cpp | 99 +- indra/newview/llvectorperfoptions.h | 6 +- indra/newview/llvieweraudio.cpp | 2 +- indra/newview/llviewercontrol.cpp | 858 +- indra/newview/llviewercontrol.h | 31 +- indra/newview/llviewerjointmesh.cpp | 55 +- indra/newview/llviewerjointmesh.h | 3 + indra/newview/llviewermedia.cpp | 5 +- indra/newview/llviewermenu.cpp | 13 +- indra/newview/llviewernetwork.cpp | 7 +- indra/newview/llviewernetwork.h | 7 +- indra/newview/llvoiceclient.cpp | 39 +- indra/newview/llxmlrpctransaction.cpp | 5 +- indra/newview/viewer_manifest.py | 8 +- 45 files changed, 12424 insertions(+), 1681 deletions(-) create mode 100644 indra/newview/app_settings/cmd_line.xml create mode 100644 indra/newview/app_settings/settings.xml create mode 100644 indra/newview/app_settings/settings_crash_behavior.xml create mode 100644 indra/newview/app_settings/settings_files.xml create mode 100644 indra/newview/app_settings/settings_per_account.xml create mode 100644 indra/newview/llcommandlineparser.cpp create mode 100644 indra/newview/llcommandlineparser.h create mode 100644 indra/newview/llfloatersettingsdebug.cpp create mode 100644 indra/newview/llfloatersettingsdebug.h (limited to 'indra/newview') diff --git a/indra/newview/app_settings/cmd_line.xml b/indra/newview/app_settings/cmd_line.xml new file mode 100644 index 0000000000..01c590c1f3 --- /dev/null +++ b/indra/newview/app_settings/cmd_line.xml @@ -0,0 +1,323 @@ + + + + help + + desc + display this help message + + short + h + + + port + + count + 1 + map-to + UserConnectionPort + + + drop + + count + 1 + map-to + PacketDropPercentage + + + inbw + + count + 1 + map-to + InBandwidth + + + outbw + + count + 1 + map-to + OutBandwidth + + + grid + + desc + Specify the name of the grid, local, or an IP address to connect to. + count + 1 + map-to + GridChoice + + + loginuri + + desc + login server and CGI script to use + count + 1 + compose + true + map-to + LoginURI + + + helperuri + + desc + helper web CGI prefix to use + count + 1 + map-to + HelperURI + + + debugviews + + map-to + DebugViews + + + skin + + desc + ui/branding skin folder to use + count + 1 + map-to + SkinFolder + + + autologin + + desc + log in as last saved user + map-to + AutoLogin + + + quitafter + + count + 1 + map-to + QuitAfterSeconds + + + rotate + + map-to + RotateRight + + + noaudio + + map-to + NoAudio + + + nosound + + map-to + NoAudio + + + noprobe + + map-to + NoHardwareProbe + + + noquicktime + + map-to + NoQuickTime + + + nopreload + + map-to + NoPreload + + + purge + + desc + Delete files in the cache. + map-to + PurgeCacheOnNextStartup + + + noinvlib + + desc + Do not request the inventory library. + map-to + NoInventoryLibrary + + + logfile + + count + 1 + map-to + UserLogFile + + + setdefault + + desc + + "specify the value of a particular\n + configuration variable which can be\n + overridden by settings.xml\n" + + count + 2 + + + + set + + desc + + "specify the value of a particular\n + configuration variable that\n + overrides all other settings\n" + + count + 2 + + + + settings + + desc + Specify the filename of a configuration file. + count + 1 + + + + login + + desc + 3 tokens: first, last and password + count + 3 + map-to + UserLoginInfo + + + god + + desc + Log in a god if you have god access. + map-to + ConnectAsGod + + + console + + count + 1 + map-to + ShowConsoleWindow + + + safe + + desc + Reset preferences, run in safe mode. + map-to + SafeMode + + + multiple + + desc + Allow multple viewers. + count + 1 + map-to + AllowMultipleViewers + + + novoice + + desc + Disable voice. + map-to + CmdLineDisableVoice + + + url + + desc + Startup location + count + 1 + last_option + true + + + + slurl + + desc + Startup SLurl + count + 1 + positional + true + last_option + true + + + + ignorepixeldepth + + desc + Ignore pixel depth settings. + map-to + IgnorePixelDepth + + + cooperative + + desc + Yield some idle time to local host. + count + 1 + map-to + YieldTime + + + no-verify-ssl-cert + + map-to + NoVerifySSLCert + + + channel + + count + 1 + map-to + VersionChannelName + + + loginpage + + desc + Login authentication page to use. + count + 1 + map-to + LoginPage + + + + diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml new file mode 100644 index 0000000000..9cc61b4827 --- /dev/null +++ b/indra/newview/app_settings/settings.xml @@ -0,0 +1,9604 @@ + + + AdvanceSnapshot + + Comment + Display advanced parameter settings in snaphot interface + Persist + 1 + Type + Boolean + Value + 0 + + AFKTimeout + + Comment + Time before automatically setting AFK (away from keyboard) mode (seconds) + Persist + 1 + Type + F32 + Value + 300 + + AgentChatColor + + Comment + Color of chat messages from other residents + Persist + 1 + Type + Color4 + Value + + 1 + 1 + 1 + 1 + + + AllowIdleAFK + + Comment + Automatically set AFK (away from keyboard) mode when idle + Persist + 1 + Type + Boolean + Value + 1 + + AllowMultipleViewers + + Comment + Allow multiple viewers. + Persist + 1 + Type + Boolean + Value + 1 + + AnimateTextures + + Comment + Enable texture animation (debug) + Persist + 1 + Type + Boolean + Value + 1 + + AnimationDebug + + Comment + Show active animations in a bubble above avatars head + Persist + 1 + Type + Boolean + Value + 0 + + AppearanceCameraMovement + + Comment + When entering appearance editing mode, camera zooms in on currently selected portion of avatar + Persist + 1 + Type + Boolean + Value + 1 + + ApplyColorImmediately + + Comment + Preview selections in color picker immediately + Persist + 1 + Type + Boolean + Value + 1 + + ApplyTextureImmediately + + Comment + Preview selections in texture picker immediately + Persist + 1 + Type + Boolean + Value + 1 + + ArrowKeysMoveAvatar + + Comment + While cursor is in chat entry box, arrow keys still control your avatar + Persist + 1 + Type + Boolean + Value + 1 + + AskedAboutCrashReports + + Comment + Turns off dialog asking if you want to enable crash reporting + Persist + 1 + Type + Boolean + Value + 0 + + AsyncKeyboard + + Comment + Improves responsiveness to keyboard input when at low framerates + Persist + 1 + Type + Boolean + Value + 1 + + AuctionShowFence + + Comment + When auctioning land, include parcel boundary marker in snapshot + Persist + 1 + Type + Boolean + Value + 1 + + AudioLevelAmbient + + Comment + Audio level of environment sounds + Persist + 1 + Type + F32 + Value + 0.5 + + AudioLevelDistance + + Comment + Scale factor for audio engine (multiple of world scale, 2.0 = audio falls off twice as fast) + Persist + 1 + Type + F32 + Value + 1 + + AudioLevelDoppler + + Comment + Scale of doppler effect on moving audio sources (1.0 = normal, <1.0 = diminished doppler effect, >1.0 = enhanced doppler effect) + Persist + 1 + Type + F32 + Value + 1 + + AudioLevelMaster + + Comment + Master audio level, or overall volume + Persist + 1 + Type + F32 + Value + 1 + + AudioLevelMedia + + Comment + Audio level of Quicktime movies + Persist + 1 + Type + F32 + Value + 1 + + AudioLevelMic + + Comment + Audio level of microphone input + Persist + 1 + Type + F32 + Value + 1 + + AudioLevelMusic + + Comment + Audio level of streaming music + Persist + 1 + Type + F32 + Value + 1 + + AudioLevelRolloff + + Comment + Controls the distance-based dropoff of audio volume (fraction or multiple of default audio rolloff) + Persist + 1 + Type + F32 + Value + 1 + + AudioLevelSFX + + Comment + Audio level of in-world sound effects + Persist + 1 + Type + F32 + Value + 1 + + AudioLevelUI + + Comment + Audio level of UI sound effects + Persist + 1 + Type + F32 + Value + 0.5 + + AudioLevelVoice + + Comment + Audio level of voice chat + Persist + 1 + Type + F32 + Value + 0.5 + + AudioStreamingMusic + + Comment + Enable streaming audio + Persist + 1 + Type + Boolean + Value + 0 + + AudioStreamingVideo + + Comment + Enable streaming video + Persist + 1 + Type + Boolean + Value + 0 + + AutoAcceptNewInventory + + Comment + Automatically accept new notecards/textures/landmarks + Persist + 1 + Type + Boolean + Value + 0 + + AutoLoadWebProfiles + + Comment + Automatically load ALL profile webpages without asking first. + Persist + 1 + Type + Boolean + Value + 0 + + AutoLogin + + Comment + Login automatically using last username/password combination + Persist + 1 + Type + Boolean + Value + 0 + + AutoMimeDiscovery + + Comment + Enable viewer mime type discovery of media URLs + Persist + 1 + Type + Boolean + Value + 0 + + AutoPilotLocksCamera + + Comment + Keep camera position locked when avatar walks to selected position + Persist + 1 + Type + Boolean + Value + 0 + + AutoSnapshot + + Comment + Update snapshot when camera stops moving, or any parameter changes + Persist + 1 + Type + Boolean + Value + 0 + + AutomaticFly + + Comment + Fly by holding jump key or using "Fly" command (FALSE = fly by using "Fly" command only) + Persist + 1 + Type + Boolean + Value + 1 + + AvatarBacklight + + Comment + Add rim lighting to avatar rendering to approximate shininess of skin + Persist + 1 + Type + Boolean + Value + 1 + + AvatarCompositeLimit + + Comment + Maximum number of avatars to display appearance changes on the fly + Persist + 1 + Type + S32 + Value + 5 + + AvatarPickerSortOrder + + Comment + Specifies sort key for textures in avatar picker (+0 = name, +1 = date, +2 = folders always by name, +4 = system folders to top) + Persist + 1 + Type + U32 + Value + 2 + + AvatarSex + + Comment + + Persist + 0 + Type + U32 + Value + 0 + + BackgroundChatColor + + Comment + Color of chat bubble background + Persist + 1 + Type + Color4 + Value + + 0 + 0 + 0 + 1 + + + BackgroundYieldTime + + Comment + Amount of time to yield every frame to other applications when SL is not the foreground window (milliseconds) + Persist + 1 + Type + S32 + Value + 40 + + BackwardBtnRect + + Comment + + Persist + 0 + Type + Rect + Value + + 45 + 29 + 66 + 4 + + + BasicHelpRect + + Comment + Rectangle for help window + Persist + 1 + Type + Rect + Value + + 0 + 404 + 467 + 0 + + + BeaconAlwaysOn + + Comment + Beacons / highlighting always on + Persist + 1 + Type + Boolean + Value + 0 + + BrowserHomePage + + Comment + [NOT USED] + Persist + 1 + Type + String + Value + http://www.secondlife.com + + BrowserProxyAddress + + Comment + Address for the Web Proxy] + Persist + 1 + Type + String + Value + + + BrowserProxyEnabled + + Comment + Use Web Proxy + Persist + 1 + Type + Boolean + Value + 0 + + BrowserProxyExclusions + + Comment + [NOT USED] + Persist + 1 + Type + String + Value + + + BrowserProxyPort + + Comment + Port for Web Proxy + Persist + 1 + Type + S32 + Value + 3128 + + BrowserProxySocks45 + + Comment + [NOT USED] + Persist + 1 + Type + S32 + Value + 5 + + BuildBtnState + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + + ButtonFlashCount + + Comment + Number of flashes after which flashing buttons stay lit up + Persist + 1 + Type + S32 + Value + 3 + + ButtonFlashRate + + Comment + Frequency at which buttons flash (hz) + Persist + 1 + Type + F32 + Value + 2 + + ButtonHPad + + Comment + Default horizontal spacing between buttons (pixels) + Persist + 1 + Type + S32 + Value + 10 + + ButtonHeight + + Comment + Default height for normal buttons (pixels) + Persist + 1 + Type + S32 + Value + 20 + + ButtonHeightSmall + + Comment + Default height for small buttons (pixels) + Persist + 1 + Type + S32 + Value + 16 + + ButtonVPad + + Comment + Default vertical spacing between buttons (pixels) + Persist + 1 + Type + S32 + Value + 1 + + CacheLocation + + Comment + Controls the location of the local disk cache + Persist + 1 + Type + String + Value + + + CacheSize + + Comment + Controls amount of hard drive space reserved for local file caching in MB + Persist + 1 + Type + U32 + Value + 500 + + CacheValidateCounter + + Comment + Used to distribute cache validation + Persist + 1 + Type + U32 + Value + 0 + + CameraOffset + + Comment + Render with camera offset from view frustum (rendering debug) + Persist + 1 + Type + Boolean + Value + 0 + + CameraOffsetBuild + + Comment + Default camera position relative to focus point when entering build mode + Persist + 1 + Type + Vector3 + Value + + -6 + 0 + 6 + + + CameraOffsetDefault + + Comment + Default camera offset from avatar + Persist + 1 + Type + Vector3 + Value + + -3 + 0 + 0.75 + + + CameraPositionSmoothing + + Comment + Smooths camera position over time + Persist + 1 + Type + F32 + Value + 1.0 + + CameraPosOnLogout + + Comment + Camera position when last logged out (global coordinates) + Persist + 1 + Type + Vector3D + Value + + 0 + 0 + 0 + + + CameraMouseWheelZoom + + Comment + Camera zooms in and out with mousewheel + Persist + 1 + Type + Boolean + Value + 1 + + ChatBarStealsFocus + + Comment + Whenever keyboard focus is removed from the UI, and the chat bar is visible, the chat bar takes focus + Persist + 1 + Type + Boolean + Value + 1 + + ChatBubbleOpacity + + Comment + Opacity of chat bubble background (0.0 = completely transparent, 1.0 = completely opaque) + Persist + 1 + Type + F32 + Value + 0.5 + + ChatFontSize + + Comment + Size of chat text in chat console (0 = small, 1 = big) + Persist + 1 + Type + S32 + Value + 1 + + ChatFullWidth + + Comment + Chat console takes up full width of SL window + Persist + 1 + Type + Boolean + Value + 1 + + ChatHistoryTornOff + + Comment + Show chat history window separately from Communicate window. + Persist + 1 + Type + Boolean + Value + 0 + + ChatOnlineNotification + + Comment + Provide notifications for when friend log on and off of SL + Persist + 1 + Type + Boolean + Value + 1 + + ChatPersistTime + + Comment + Time for which chat stays visible in console (seconds) + Persist + 1 + Type + F32 + Value + 15 + + ChatShowTimestamps + + Comment + Show timestamps in chat + Persist + 1 + Type + Boolean + Value + 1 + + ChatVisible + + Comment + Chat bar is visible + Persist + 1 + Type + Boolean + Value + 1 + + ChatterboxRect + + Comment + Rectangle for chatterbox window + Persist + 1 + Type + Rect + Value + + 0 + 400 + 350 + 0 + + + CheesyBeacon + + Comment + Enable cheesy beacon effects + Persist + 1 + Type + Boolean + Value + 0 + + ClientSettingsFile + + Comment + Persisted client settings file name (per install). + Persist + 0 + Type + String + Value + + + CloseChatOnReturn + + Comment + Close chat after hitting return + Persist + 1 + Type + Boolean + Value + 0 + + CloseSnapshotOnKeep + + Comment + Close snapshot window after saving snapshot + Persist + 1 + Type + Boolean + Value + 1 + + ClothingBtnState + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + + CmdLineDisableVoice + + Comment + Disable Voice. + Persist + 1 + Type + Boolean + Value + 0 + + ColorPaletteEntry01 + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0 + 0 + 0 + 1 + + + ColorPaletteEntry02 + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0.5 + 0.5 + 0.5 + 1 + + + ColorPaletteEntry03 + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0.5 + 0 + 0 + 1 + + + ColorPaletteEntry04 + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0.5 + 0.5 + 0 + 1 + + + ColorPaletteEntry05 + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0 + 0.5 + 0 + 1 + + + ColorPaletteEntry06 + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0 + 0.5 + 0.5 + 1 + + + ColorPaletteEntry07 + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0 + 0 + 0.5 + 1 + + + ColorPaletteEntry08 + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0.5 + 0 + 0.5 + 1 + + + ColorPaletteEntry09 + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0.5 + 0.5 + 0 + 1 + + + ColorPaletteEntry10 + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0 + 0.25 + 0.25 + 1 + + + ColorPaletteEntry11 + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0 + 0.5 + 1 + 1 + + + ColorPaletteEntry12 + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0 + 0.25 + 0.5 + 1 + + + ColorPaletteEntry13 + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0.5 + 0 + 1 + 1 + + + ColorPaletteEntry14 + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0.5 + 0.25 + 0 + 1 + + + ColorPaletteEntry15 + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 1 + 1 + 1 + 1 + + + ColorPaletteEntry16 + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 1 + 1 + 1 + 1 + + + ColorPaletteEntry17 + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 1 + 1 + 1 + 1 + + + ColorPaletteEntry18 + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0.75 + 0.75 + 0.75 + 1 + + + ColorPaletteEntry19 + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 1 + 0 + 0 + 1 + + + ColorPaletteEntry20 + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 1 + 1 + 0 + 1 + + + ColorPaletteEntry21 + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0 + 1 + 0 + 1 + + + ColorPaletteEntry22 + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0 + 1 + 1 + 1 + + + ColorPaletteEntry23 + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0 + 0 + 1 + 1 + + + ColorPaletteEntry24 + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 1 + 0 + 1 + 1 + + + ColorPaletteEntry25 + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 1 + 1 + 0.5 + 1 + + + ColorPaletteEntry26 + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0 + 1 + 0.5 + 1 + + + ColorPaletteEntry27 + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0.5 + 1 + 1 + 1 + + + ColorPaletteEntry28 + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 0.5 + 0.5 + 1 + 1 + + + ColorPaletteEntry29 + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 1 + 0 + 0.5 + 1 + + + ColorPaletteEntry30 + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 1 + 0.5 + 0 + 1 + + + ColorPaletteEntry31 + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 1 + 1 + 1 + 1 + + + ColorPaletteEntry32 + + Comment + Color picker palette entry + Persist + 1 + Type + Color4 + Value + + 1 + 1 + 1 + 1 + + + ColumnHeaderDropDownDelay + + Comment + Time in seconds of mouse click before column header shows sort options list + Persist + 1 + Type + F32 + Value + 0.300000011920928955078125 + + CompileOutputRect + + Comment + Rectangle for script Recompile Everything output window + Persist + 1 + Type + Rect + Value + + 0 + 400 + 300 + 0 + + + CompressSnapshotsToDisk + + Comment + Compress snapshots saved to disk (Using JPEG 2000) + Persist + 1 + Type + Boolean + Value + 0 + + ConnectAsGod + + Comment + Log in a god if you have god access. + Persist + 1 + Type + Boolean + Value + 0 + + ConnectionPort + + Comment + Custom connection port number + Persist + 1 + Type + U32 + Value + 13000 + + ConnectionPortEnabled + + Comment + Use the custom connection port? + Persist + 1 + Type + Boolean + Value + 0 + + ConsoleBackgroundOpacity + + Comment + Opacity of chat console (0.0 = completely transparent, 1.0 = completely opaque) + Persist + 1 + Type + F32 + Value + 0.4000000059604644775390625 + + ConsoleBufferSize + + Comment + Size of chat console history (lines of chat) + Persist + 1 + Type + S32 + Value + 40 + + ConsoleMaxLines + + Comment + Max number of lines of chat text visible in console. + Persist + 1 + Type + S32 + Value + 40 + + ContactsTornOff + + Comment + Show contacts window separately from Communicate window. + Persist + 1 + Type + Boolean + Value + 0 + + CookiesEnabled + + Comment + Accept cookies from Web sites? + Persist + 1 + Type + Boolean + Value + 1 + + CrashLogBehavior + + Comment + Controls behavior when viewer (0 = ask before sending crash report, 1 = always send crash report, 2 = never send crash report) + Persist + 0 + Type + S32 + Value + 1 + + CreateToolCopyCenters + + Comment + + Persist + 0 + Type + Boolean + Value + 1 + + CreateToolCopyRotates + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + + CreateToolCopySelection + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + + CreateToolKeepSelected + + Comment + After using create tool, keep the create tool active + Persist + 1 + Type + Boolean + Value + 0 + + CustomServer + + Comment + Specifies IP address or hostname of grid to which you connect + Persist + 1 + Type + String + Value + + + DebugBeaconLineWidth + + Comment + Size of lines for Debug Beacons + Persist + 1 + Type + S32 + Value + 1 + + DebugInventoryFilters + + Comment + Turn on debugging display for inventory filtering + Persist + 1 + Type + Boolean + Value + 0 + + DebugPermissions + + Comment + Log permissions for selected inventory items + Persist + 1 + Type + Boolean + Value + 0 + + DebugShowColor + + Comment + Show color under cursor + Persist + 1 + Type + Boolean + Value + 0 + + DebugShowRenderInfo + + Comment + Show depth buffer contents + Persist + 1 + Type + Boolean + Value + 0 + + DebugShowTime + + Comment + Show depth buffer contents + Persist + 1 + Type + Boolean + Value + 0 + + DebugViews + + Comment + Display debugging info for views. + Persist + 1 + Type + Boolean + Value + 0 + + DebugWindowProc + + Comment + Log windows messages + Persist + 1 + Type + Boolean + Value + 0 + + DefaultObjectTexture + + Comment + Texture used as 'Default' in texture picker. (UUID texture reference) + Persist + 1 + Type + String + Value + 89556747-24cb-43ed-920b-47caed15465f + + DisableCameraConstraints + + Comment + Disable the normal bounds put on the camera by avatar position + Persist + 1 + Type + Boolean + Value + 0 + + DisableRendering + + Comment + Disable GL rendering and GUI (load testing) + Persist + 1 + Type + Boolean + Value + 0 + + DisableVerticalSync + + Comment + Update frames as fast as possible (FALSE = update frames between display scans) + Persist + 1 + Type + Boolean + Value + 1 + + DisplayAvatarAgentTarget + + Comment + Show avatar positioning locators (animation debug) + Persist + 1 + Type + Boolean + Value + 0 + + DisplayChat + + Comment + Display Latest Chat message on LCD + Persist + 1 + Type + Boolean + Value + 1 + + DisplayDebug + + Comment + Display Network Information on LCD + Persist + 1 + Type + Boolean + Value + 1 + + DisplayDebugConsole + + Comment + Display Console Debug Information on LCD + Persist + 1 + Type + Boolean + Value + 1 + + DisplayIM + + Comment + Display Latest IM message on LCD + Persist + 1 + Type + Boolean + Value + 1 + + DisplayLinden + + Comment + Display Account Information on LCD + Persist + 1 + Type + Boolean + Value + 1 + + DisplayRegion + + Comment + Display Location information on LCD + Persist + 1 + Type + Boolean + Value + 1 + + DisplayTimecode + + Comment + Display timecode on screen + Persist + 1 + Type + Boolean + Value + 0 + + Disregard128DefaultDrawDistance + + Comment + Whether to use the auto default to 128 draw distance + Persist + 1 + Type + Boolean + Value + 1 + + Disregard96DefaultDrawDistance + + Comment + Whether to use the auto default to 96 draw distance + Persist + 1 + Type + Boolean + Value + 1 + + DoubleClickAutoPilot + + Comment + Enable double-click auto pilot + Persist + 1 + Type + Boolean + Value + 0 + + DragAndDropToolTipDelay + + Comment + Seconds before displaying tooltip when performing drag and drop operation + Persist + 1 + Type + F32 + Value + 0.1000000014901161193847656 + + DropShadowButton + + Comment + Drop shadow width for buttons (pixels) + Persist + 1 + Type + S32 + Value + 2 + + DropShadowFloater + + Comment + Drop shadow width for floaters (pixels) + Persist + 1 + Type + S32 + Value + 5 + + DropShadowSlider + + Comment + Drop shadow width for sliders (pixels) + Persist + 1 + Type + S32 + Value + 3 + + DropShadowTooltip + + Comment + Drop shadow width for tooltips (pixels) + Persist + 1 + Type + S32 + Value + 4 + + DynamicCameraStrength + + Comment + Amount camera lags behind avatar motion (0 = none, 30 = avatar velocity) + Persist + 1 + Type + F32 + Value + 2 + + EditCameraMovement + + Comment + When entering build mode, camera moves up above avatar + Persist + 1 + Type + Boolean + Value + 0 + + EditLinkedParts + + Comment + Select individual parts of linked objects + Persist + 0 + Type + Boolean + Value + 0 + + EffectColor + + Comment + Particle effects color + Persist + 1 + Type + Color4 + Value + + 1 + 1 + 1 + 1 + + + EnablePushToTalk + + Comment + Must hold down a key or moouse button when talking into your microphone + Persist + 1 + Type + Boolean + Value + 1 + + EnableVoiceChat + + Comment + Enable talking to other residents with a microphone + Persist + 1 + Type + Boolean + Value + 1 + + EnergyFromTop + + Comment + + Persist + 0 + Type + S32 + Value + 20 + + EnergyHeight + + Comment + + Persist + 0 + Type + S32 + Value + 40 + + EnergyWidth + + Comment + + Persist + 0 + Type + S32 + Value + 175 + + FilterItemsPerFrame + + Comment + Maximum number of inventory items to match against search filter every frame (lower to increase framerate while searching, higher to improve search speed) + Persist + 1 + Type + S32 + Value + 500 + + FindLandArea + + Comment + Enables filtering of land search results by area + Persist + 1 + Type + Boolean + Value + 0 + + FindLandPrice + + Comment + Enables filtering of land search results by price + Persist + 1 + Type + Boolean + Value + 1 + + FindLandType + + Comment + Controls which type of land you are searching for in Find Land interface ("All", "Auction", "For Sale") + Persist + 1 + Type + String + Value + All + + FindPeopleOnline + + Comment + Limits people search to only users who are logged on + Persist + 1 + Type + Boolean + Value + 1 + + FindPlacesPictures + + Comment + Display only results of find places that have pictures + Persist + 1 + Type + Boolean + Value + 1 + + FirstLoginThisInstall + + Comment + Specifies that you have not successfully logged in since you installed the latest update + Persist + 1 + Type + Boolean + Value + 1 + + FirstName + + Comment + Login first name + Persist + 1 + Type + String + Value + + + FirstPersonAvatarVisible + + Comment + Display avatar and attachments below neck while in mouselook + Persist + 1 + Type + Boolean + Value + 0 + + FirstPersonBtnState + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + + FirstRunThisInstall + + Comment + Specifies that you have not run the viewer since you installed the latest update + Persist + 1 + Type + Boolean + Value + 1 + + FixedWeather + + Comment + Weather effects do not change over time + Persist + 1 + Type + Boolean + Value + 0 + + FloaterAboutRect + + Comment + Rectangle for About window + Persist + 1 + Type + Rect + Value + + 0 + 440 + 470 + 0 + + + FloaterActiveSpeakersRect + + Comment + Rectangle for active speakers window + Persist + 1 + Type + Rect + Value + + 0 + 300 + 250 + 0 + + + FloaterAudioVolumeRect + + Comment + Rectangle for Audio Volume window + Persist + 1 + Type + Rect + Value + + 0 + 440 + 470 + 0 + + + FloaterBuildOptionsRect + + Comment + Rectangle for build options window. + Persist + 1 + Type + Rect + Value + + 0 + 0 + 0 + 0 + + + FloaterBumpRect + + Comment + Rectangle for Bumps/Hits window + Persist + 1 + Type + Rect + Value + + 0 + 180 + 400 + 0 + + + FloaterBuyContentsRect + + Comment + Rectangle for Buy Contents window + Persist + 1 + Type + Rect + Value + + 0 + 250 + 300 + 0 + + + FloaterBuyRect + + Comment + Rectangle for buy window + Persist + 1 + Type + Rect + Value + + 0 + 250 + 300 + 0 + + + FloaterCameraRect2 + + Comment + Rectangle for camera control window + Persist + 1 + Type + Rect + Value + + 166 + 128 + 342 + 64 + + + FloaterChatRect + + Comment + Rectangle for chat history + Persist + 1 + Type + Rect + Value + + 0 + 172 + 500 + 0 + + + FloaterClothingRect + + Comment + Rectangle for clothing window + Persist + 1 + Type + Rect + Value + + 0 + 480 + 320 + 0 + + + FloaterContactsRect + + Comment + Rectangle for chat history + Persist + 1 + Type + Rect + Value + + 0 + 390 + 395 + 0 + + + FloaterCustomizeAppearanceRect + + Comment + Rectangle for avatar customization window + Persist + 1 + Type + Rect + Value + + 0 + 540 + 494 + 0 + + + FloaterFindRect2 + + Comment + Rectangle for Find window + Persist + 1 + Type + Rect + Value + + 0 + 570 + 780 + 0 + + + FloaterFriendsRect + + Comment + Rectangle for friends window + Persist + 1 + Type + Rect + Value + + 0 + 400 + 250 + 0 + + + FloaterGestureRect2 + + Comment + Rectangle for gestures window + Persist + 1 + Type + Rect + Value + + 0 + 465 + 350 + 0 + + + FloaterHtmlRect + + Comment + Rectangle for HTML window + Persist + 1 + Type + Rect + Value + + 100 + 460 + 370 + 100 + + + FloaterHUDRect + + Comment + Rectangle for HUD Floater window + Persist + 1 + Type + Rect + Value + + 0 + 282 + 342 + 0 + + + FloaterIMRect + + Comment + Rectangle for IM window + Persist + 1 + Type + Rect + Value + + 0 + 160 + 500 + 0 + + + FloaterInspectRect + + Comment + Rectangle for Object Inspect window + Persist + 1 + Type + Rect + Value + + 0 + 400 + 400 + 0 + + + FloaterInventoryRect + + Comment + Rectangle for inventory window + Persist + 1 + Type + Rect + Value + + 0 + 400 + 300 + 0 + + + FloaterJoystickRect + + Comment + Rectangle for joystick controls window. + Persist + 1 + Type + Rect + Value + + 0 + 0 + 0 + 0 + + + FloaterLagMeter + + Comment + Rectangle for lag meter + Persist + 1 + Type + Rect + Value + + 0 + 142 + 350 + 0 + + + FloaterLandRect5 + + Comment + Rectangle for About Land window + Persist + 1 + Type + Rect + Value + + 0 + 370 + 460 + 0 + + + FloaterLandmarkRect + + Comment + Rectangle for landmark picker + Persist + 1 + Type + Rect + Value + + 0 + 290 + 310 + 0 + + + FloaterMediaRect + + Comment + Rectangle for media browser window + Persist + 1 + Type + Rect + Value + + 0 + 400 + 400 + 0 + + + FloaterMiniMapRect + + Comment + Rectangle for world map + Persist + 1 + Type + Rect + Value + + 0 + 225 + 200 + 0 + + + FloaterMoveRect2 + + Comment + Rectangle for avatar control window + Persist + 1 + Type + Rect + Value + + 0 + 58 + 135 + 0 + + + FloaterMuteRect3 + + Comment + Rectangle for mute window + Persist + 1 + Type + Rect + Value + + 0 + 300 + 300 + 0 + + + FloaterOpenObjectRect + + Comment + Rectangle for Open Object window + Persist + 1 + Type + Rect + Value + + 0 + 350 + 300 + 0 + + + FloaterPayRectB + + Comment + Rectangle for pay window + Persist + 1 + Type + Rect + Value + + 0 + 150 + 400 + 0 + + + FloaterRegionInfo + + Comment + Rectangle for region info window + Persist + 1 + Type + Rect + Value + + 0 + 512 + 480 + 0 + + + FloaterScriptDebugRect + + Comment + Rectangle for Script Error/Debug window + Persist + 1 + Type + Rect + Value + + 0 + 130 + 450 + 0 + + + FloaterSnapshotRect + + Comment + Rectangle for snapshot window + Persist + 1 + Type + Rect + Value + + 0 + 200 + 200 + 400 + + + FloaterViewBottom + + Comment + [DO NOT MODIFY] Controls layout of floating windows within SL window + Persist + 1 + Type + S32 + Value + -1 + + FloaterWorldMapRect2 + + Comment + Rectangle for world map window + Persist + 1 + Type + Rect + Value + + 0 + 0 + 0 + 0 + + + FlyBtnState + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + + FlycamAbsolute + + Comment + Treat Flycam values as absolute positions (not deltas). + Persist + 1 + Type + Boolean + Value + 0 + + FlycamAutoLeveling + + Comment + Keep Flycam level. + Persist + 1 + Type + Boolean + Value + 1 + + FlycamAxis0 + + Comment + Flycam hardware axis mapping for internal axis 0 ([0, 5]). + Persist + 1 + Type + S32 + Value + 0 + + FlycamAxis1 + + Comment + Flycam hardware axis mapping for internal axis 1 ([0, 5]). + Persist + 1 + Type + S32 + Value + 1 + + FlycamAxis2 + + Comment + Flycam hardware axis mapping for internal axis 2 ([0, 5]). + Persist + 1 + Type + S32 + Value + 2 + + FlycamAxis3 + + Comment + Flycam hardware axis mapping for internal axis 3 ([0, 5]). + Persist + 1 + Type + S32 + Value + 3 + + FlycamAxis4 + + Comment + Flycam hardware axis mapping for internal axis 4 ([0, 5]). + Persist + 1 + Type + S32 + Value + 4 + + FlycamAxis5 + + Comment + Flycam hardware axis mapping for internal axis 5 ([0, 5]). + Persist + 1 + Type + S32 + Value + 5 + + FlycamAxis6 + + Comment + Flycam hardware axis mapping for internal axis 6 ([0, 5]). + Persist + 1 + Type + S32 + Value + -1 + + FlycamAxisDeadZone0 + + Comment + Flycam axis 0 dead zone. + Persist + 1 + Type + F32 + Value + 0.1000000014901161193847656 + + FlycamAxisDeadZone1 + + Comment + Flycam axis 1 dead zone. + Persist + 1 + Type + F32 + Value + 0.1000000014901161193847656 + + FlycamAxisDeadZone2 + + Comment + Flycam axis 2 dead zone. + Persist + 1 + Type + F32 + Value + 0.1000000014901161193847656 + + FlycamAxisDeadZone3 + + Comment + Flycam axis 3 dead zone. + Persist + 1 + Type + F32 + Value + 0.1000000014901161193847656 + + FlycamAxisDeadZone4 + + Comment + Flycam axis 4 dead zone. + Persist + 1 + Type + F32 + Value + 0.1000000014901161193847656 + + FlycamAxisDeadZone5 + + Comment + Flycam axis 5 dead zone. + Persist + 1 + Type + F32 + Value + 0.1000000014901161193847656 + + FlycamAxisDeadZone6 + + Comment + Flycam axis 6 dead zone. + Persist + 1 + Type + F32 + Value + 0.1000000014901161193847656 + + FlycamAxisScale0 + + Comment + Flycam axis 0 scaler. + Persist + 1 + Type + F32 + Value + 1 + + FlycamAxisScale1 + + Comment + Flycam axis 1 scaler. + Persist + 1 + Type + F32 + Value + 1 + + FlycamAxisScale2 + + Comment + Flycam axis 2 scaler. + Persist + 1 + Type + F32 + Value + 1 + + FlycamAxisScale3 + + Comment + Flycam axis 3 scaler. + Persist + 1 + Type + F32 + Value + 1 + + FlycamAxisScale4 + + Comment + Flycam axis 4 scaler. + Persist + 1 + Type + F32 + Value + 1 + + FlycamAxisScale5 + + Comment + Flycam axis 5 scaler. + Persist + 1 + Type + F32 + Value + 1 + + FlycamAxisScale6 + + Comment + Flycam axis 6 scaler. + Persist + 1 + Type + F32 + Value + 1 + + FlycamFeathering + + Comment + Flycam feathering (less is softer) + Persist + 1 + Type + F32 + Value + 16 + + FlycamZoomDirect + + Comment + Map flycam zoom axis directly to camera zoom. + Persist + 1 + Type + Boolean + Value + 0 + + FlyingAtExit + + Comment + Was flying when last logged out, so fly when logging in + Persist + 1 + Type + Boolean + Value + 0 + + FocusOffsetDefault + + Comment + Default focus point offset relative to avatar (x-axis is forward) + Persist + 1 + Type + Vector3 + Value + + 1 + 0 + 1 + + + FocusPosOnLogout + + Comment + Camera focus point when last logged out (global coordinates) + Persist + 1 + Type + Vector3D + Value + + 0 + 0 + 0 + + + FolderAutoOpenDelay + + Comment + Seconds before automatically expanding the folder under the mouse when performing inventory drag and drop + Persist + 1 + Type + F32 + Value + 0.75 + + FolderLoadingMessageWaitTime + + Comment + Seconds to wait before showing the LOADING... text in folder views + Persist + 1 + Type + F32 + Value + 0.5 + + FontMonospace + + Comment + Name of monospace font (Truetype file name) + Persist + 1 + Type + String + Value + profontwindows.ttf + + FontSansSerif + + Comment + Name of san-serif font (Truetype file name) + Persist + 1 + Type + String + Value + MtBkLfRg.ttf + + FontSansSerifBold + + Comment + Name of bold font (Truetype file name) + Persist + 1 + Type + String + Value + MtBdLfRg.ttf + + FontSansSerifFallback + + Comment + Name of san-serif font (Truetype file name) + Persist + 1 + Type + String + Value + + + FontSansSerifFallbackScale + + Comment + Scale of fallback font relative to huge font (fraction of huge font size) + Persist + 1 + Type + F32 + Value + 1 + + FontScreenDPI + + Comment + Font resolution, higher is bigger (pixels per inch) + Persist + 1 + Type + F32 + Value + 96 + + FontSizeHuge + + Comment + Size of huge font (points, or 1/72 of an inch) + Persist + 1 + Type + F32 + Value + 16 + + FontSizeLarge + + Comment + Size of large font (points, or 1/72 of an inch) + Persist + 1 + Type + F32 + Value + 12 + + FontSizeMedium + + Comment + Size of medium font (points, or 1/72 of an inch) + Persist + 1 + Type + F32 + Value + 10 + + FontSizeMonospace + + Comment + Size of monospaced font (points, or 1/72 of an inch) + Persist + 1 + Type + F32 + Value + 9 + + FontSizeSmall + + Comment + Size of small font (points, or 1/72 of an inch) + Persist + 1 + Type + F32 + Value + 9 + + ForceShowGrid + + Comment + Always show grid dropdown on login screen + Persist + 1 + Type + Boolean + Value + 0 + + ForwardBtnRect + + Comment + + Persist + 0 + Type + Rect + Value + + 45 + 54 + 66 + 29 + + + FreezeTime + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + + FullScreen + + Comment + Run SL in fullscreen mode + Persist + 1 + Type + Boolean + Value + 0 + + FullScreenAspectRatio + + Comment + Aspect ratio of fullscreen display (width / height) + Persist + 1 + Type + F32 + Value + 1.33329999446868896484375 + + FullScreenAutoDetectAspectRatio + + Comment + Automatically detect proper aspect ratio for fullscreen display + Persist + 1 + Type + Boolean + Value + 1 + + FullScreenHeight + + Comment + Fullscreen resolution in height + Persist + 1 + Type + S32 + Value + 768 + + FullScreenWidth + + Comment + Fullscreen resolution in width + Persist + 1 + Type + S32 + Value + 1024 + + GridChoice + + Comment + The user's grid choice or ip address. + Persist + 1 + Type + String + Value + + + GridCrossSections + + Comment + Highlight cross sections of prims with grid manipulation plane. + Persist + 1 + Type + Boolean + Value + 0 + + GridDrawSize + + Comment + Visible extent of 2D snap grid (meters) + Persist + 1 + Type + F32 + Value + 12 + + GridMode + + Comment + Snap grid reference frame (0 = world, 1 = local, 2 = reference object) + Persist + 1 + Type + S32 + Value + 0 + + GridOpacity + + Comment + Grid line opacity (0.0 = completely transparent, 1.0 = completely opaque) + Persist + 1 + Type + F32 + Value + 0.699999988079071044921875 + + GridResolution + + Comment + Size of single grid step (meters) + Persist + 1 + Type + F32 + Value + 0.5 + + GridSubUnit + + Comment + Display fractional grid steps, relative to grid size + Persist + 1 + Type + Boolean + Value + 0 + + GridSubdivision + + Comment + Maximum number of times to divide single snap grid unit when GridSubUnit is true + Persist + 1 + Type + S32 + Value + 32 + + GroupNotifyBoxHeight + + Comment + Height of group notice messages + Persist + 1 + Type + S32 + Value + 260 + + GroupNotifyBoxWidth + + Comment + Width of group notice messages + Persist + 1 + Type + S32 + Value + 400 + + HTMLLinkColor + + Comment + Color of hyperlinks + Persist + 1 + Type + Color4 + Value + + 0.60000002384185791015625 + 0.60000002384185791015625 + 1 + 1 + + + HelpHomeURL + + Comment + URL of initial help page + Persist + 1 + Type + String + Value + help/index.html + + HelpLastVisitedURL + + Comment + URL of last help page, will be shown next time help is accessed + Persist + 1 + Type + String + Value + help/index.html + + HelperURI + + Comment + helper web CGI prefix to use + Persist + 1 + Type + String + Value + + + HighResSnapshot + + Comment + Double resolution of snapshot from current window resolution + Persist + 1 + Type + Boolean + Value + 0 + + HtmlFindRect + + Comment + Rectangle for HTML find window + Persist + 1 + Type + Rect + Value + + 16 + 650 + 600 + 128 + + + HtmlHelpLastPage + + Comment + Last URL visited via help system + Persist + 1 + Type + String + Value + + + HtmlHelpRect + + Comment + Rectangle for HTML help window + Persist + 1 + Type + Rect + Value + + 16 + 650 + 600 + 128 + + + HtmlReleaseMessage + + Comment + Rectangle for HTML Release Message Floater window + Persist + 1 + Type + Rect + Value + + 46 + 520 + 400 + 128 + + + IMInChatHistory + + Comment + Copy IM into chat history + Persist + 1 + Type + Boolean + Value + 0 + + IMShowTimestamps + + Comment + Show timestamps in IM + Persist + 1 + Type + Boolean + Value + 1 + + IgnorePixelDepth + + Comment + Ignore pixel depth settings. + Persist + 1 + Type + Boolean + Value + 0 + + ImagePipelineUseHTTP + + Comment + If TRUE use HTTP GET to fetch textures from the server + Persist + 1 + Type + Boolean + Value + 0 + + InBandwidth + + Comment + Incoming bandwidth throttle (bps) + Persist + 1 + Type + F32 + Value + 0 + + InventoryAutoOpenDelay + + Comment + Seconds before automatically opening inventory when mouse is over inventory button when performing inventory drag and drop + Persist + 1 + Type + F32 + Value + 1 + + InventorySortOrder + + Comment + Specifies sort key for inventory items (+0 = name, +1 = date, +2 = folders always by name, +4 = system folders to top) + Persist + 1 + Type + U32 + Value + 7 + + InvertMouse + + Comment + When in mouselook, moving mouse up looks down and vice verse (FALSE = moving up looks up) + Persist + 1 + Type + Boolean + Value + 0 + + KeepAspectForSnapshot + + Comment + Use full window when taking snapshot, regardless of requested image size + Persist + 1 + Type + Boolean + Value + 1 + + LCDDestination + + Comment + Which LCD to use + Persist + 1 + Type + S32 + Value + 0 + + LSLHelpRect + + Comment + Rectangle for LSL help window + Persist + 1 + Type + Rect + Value + + 0 + 400 + 400 + 0 + + + LSLHelpURL + + Comment + URL that points to LSL help files, with [LSL_STRING] corresponding to the referenced LSL function or keyword + Persist + 1 + Type + String + Value + https://wiki.secondlife.com/wiki/[LSL_STRING] + + LagMeterShrunk + + Comment + Last large/small state for lag meter + Persist + 1 + Type + Boolean + Value + 0 + + Language + + Comment + Language specifier (for XUI) + Persist + 1 + Type + String + Value + default + + LastFeatureVersion + + Comment + [DO NOT MODIFY] Version number for tracking hardware changes + Persist + 1 + Type + S32 + Value + 0 + + LastFindPanel + + Comment + Controls which find operation appears by default when clicking "Find" button + Persist + 1 + Type + String + Value + find_all_panel + + LastName + + Comment + Login last name + Persist + 1 + Type + String + Value + + + LastPrefTab + + Comment + Last selected tab in preferences window + Persist + 1 + Type + S32 + Value + 0 + + LastRunVersion + + Comment + Version number of last instance of the viewer that you ran + Persist + 1 + Type + String + Value + 0.0.0 + + LastSnapshotHeight + + Comment + The height of the last snapshot, in px + Persist + 1 + Type + S32 + Value + 768 + + LastSnapshotType + + Comment + Select this as next type of snapshot to take (0 = postcard, 1 = texture, 2 = local image) + Persist + 1 + Type + S32 + Value + 0 + + LastSnapshotWidth + + Comment + The width of the last snapshot, in px + Persist + 1 + Type + S32 + Value + 1024 + + LeftClickShowMenu + + Comment + Left click opens pie menu (FALSE = left click touches or grabs object) + Persist + 1 + Type + Boolean + Value + 0 + + LimitDragDistance + + Comment + Limit translation of object via translate tool + Persist + 1 + Type + Boolean + Value + 1 + + LimitSelectDistance + + Comment + Disallow selection of objects beyond max select distance + Persist + 1 + Type + Boolean + Value + 1 + + LocalCacheVersion + + Comment + Version number of cache + Persist + 1 + Type + S32 + Value + 0 + + LogMessages + + Comment + Log network traffic + Persist + 1 + Type + Boolean + Value + 0 + + LoginAsGod + + Comment + Attempt to login with god powers (Linden accounts only) + Persist + 1 + Type + Boolean + Value + 0 + + LoginLastLocation + + Comment + Login at same location you last logged out + Persist + 1 + Type + Boolean + Value + 1 + + LoginPage + + Comment + Login authentication page. + Persist + 1 + Type + String + Value + + + LoginURI + + Comment + login server and CGI prefix to use + Persist + 1 + Type + String + Value + + + LosslessJ2CUpload + + Comment + Use lossless compression for small image uploads + Persist + 1 + Type + Boolean + Value + 0 + + MapOverlayIndex + + Comment + Currently selected world map type + Persist + 1 + Type + S32 + Value + 0 + + MapScale + + Comment + World map zoom level (pixels per region) + Persist + 1 + Type + F32 + Value + 128 + + MapShowClassifieds + + Comment + Show locations associated with classified ads on world map + Persist + 1 + Type + Boolean + Value + 1 + + MapShowEvents + + Comment + Show events on world map + Persist + 1 + Type + Boolean + Value + 1 + + MapShowInfohubs + + Comment + Show infohubs on the world map + Persist + 1 + Type + Boolean + Value + 1 + + MapShowLandForSale + + Comment + Show land for sale on world map + Persist + 1 + Type + Boolean + Value + 0 + + MapShowPeople + + Comment + Show other users on world map + Persist + 1 + Type + Boolean + Value + 1 + + MapShowPopular + + Comment + Show popular places on world map + Persist + 1 + Type + Boolean + Value + 1 + + MapShowTelehubs + + Comment + Show telehubs on world map + Persist + 1 + Type + Boolean + Value + 1 + + Marker + + Comment + [NOT USED] + Persist + 1 + Type + String + Value + + + MaxDragDistance + + Comment + Maximum allowed translation distance in a single operation of translate tool (meters from start point) + Persist + 1 + Type + F32 + Value + 48 + + MaxSelectDistance + + Comment + Maximum allowed selection distance (meters from avatar) + Persist + 1 + Type + F32 + Value + 64 + + MeanCollisionBump + + Comment + You have experienced an abuse of being bumped by an object or avatar + Persist + 1 + Type + Boolean + Value + 0 + + MeanCollisionPhysical + + Comment + You have experienced an abuse from a physical object + Persist + 1 + Type + Boolean + Value + 0 + + MeanCollisionPushObject + + Comment + You have experienced an abuse of being pushed by a scripted object + Persist + 1 + Type + Boolean + Value + 0 + + MeanCollisionScripted + + Comment + You have experienced an abuse from a scripted object + Persist + 1 + Type + Boolean + Value + 0 + + MeanCollisionSelected + + Comment + You have experienced an abuse of being pushed via a selected object + Persist + 1 + Type + Boolean + Value + 0 + + MenuAccessKeyTime + + Comment + Time (seconds) in which the menu key must be tapped to move focus to the menu bar + Persist + 1 + Type + F32 + Value + 0.25 + + MenuBarHeight + + Comment + + Persist + 0 + Type + S32 + Value + 18 + + MenuBarWidth + + Comment + + Persist + 0 + Type + S32 + Value + 410 + + MiniMapRotate + + Comment + Rotate miniature world map to avatar direction + Persist + 1 + Type + Boolean + Value + 1 + + MiniMapScale + + Comment + Miniature world map zoom levle (pixels per region) + Persist + 1 + Type + F32 + Value + 128 + + MouseSensitivity + + Comment + Controls responsiveness of mouse when in mouselook mode (fraction or multiple of default mouse sensitivity) + Persist + 1 + Type + F32 + Value + 3 + + MouseSmooth + + Comment + Smooths out motion of mouse when in mouselook mode. + Persist + 1 + Type + Boolean + Value + 0 + + MouseSun + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + + MouselookBtnState + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + + MoveDownBtnRect + + Comment + + Persist + 0 + Type + Rect + Value + + 91 + 29 + 116 + 4 + + + MoveUpBtnRect + + Comment + + Persist + 0 + Type + Rect + Value + + 91 + 54 + 116 + 29 + + + MuteAmbient + + Comment + Ambient sound effects, such as wind noise, play at 0 volume + Persist + 1 + Type + Boolean + Value + 0 + + MuteAudio + + Comment + All audio plays at 0 volume (streaming audio still takes up bandwidth, for example) + Persist + 1 + Type + Boolean + Value + 0 + + MuteMedia + + Comment + Media plays at 0 volume (streaming audio still takes up bandwidth) + Persist + 1 + Type + Boolean + Value + 0 + + MuteMusic + + Comment + Music plays at 0 volume (streaming audio still takes up bandwidth) + Persist + 1 + Type + Boolean + Value + 0 + + MuteSounds + + Comment + Sound effects play at 0 volume + Persist + 1 + Type + Boolean + Value + 0 + + MuteUI + + Comment + UI sound effects play at 0 volume + Persist + 1 + Type + Boolean + Value + 0 + + MuteVoice + + Comment + Voice plays at 0 volume (streaming audio still takes up bandwidth) + Persist + 1 + Type + Boolean + Value + 0 + + MuteWhenMinimized + + Comment + Mute audio when SL window is minimized + Persist + 1 + Type + Boolean + Value + 1 + + NewCacheLocation + + Comment + Change the location of the local disk cache to this + Persist + 1 + Type + String + Value + + + NextLoginLocation + + Comment + Location to log into by default. + Persist + 1 + Type + String + Value + + + NoAudio + + Comment + Disable audio playback. + Persist + 1 + Type + Boolean + Value + 0 + + NoHardwareProbe + + Comment + Disable hardware probe. + Persist + 1 + Type + Boolean + Value + 0 + + NoInventoryLibrary + + Comment + Do not request inventory library. + Persist + 1 + Type + Boolean + Value + 0 + + NoPreload + + Comment + Disable sound and image preload. + Persist + 1 + Type + Boolean + Value + 0 + + NoQuickTime + + Comment + Disable quicktime playback. + Persist + 1 + Type + Boolean + Value + 0 + + NoVerifySSLCert + + Comment + Do not verify SSL peers. + Persist + 1 + Type + Boolean + Value + 0 + + NotecardEditorRect + + Comment + Rectangle for notecard editor + Persist + 1 + Type + Rect + Value + + 0 + 400 + 400 + 0 + + + NotifyBoxHeight + + Comment + Height of notification messages + Persist + 1 + Type + S32 + Value + 200 + + NotifyBoxWidth + + Comment + Width of notification messages + Persist + 1 + Type + S32 + Value + 350 + + NotifyMoneyChange + + Comment + Pop up notifications for all L$ transactions + Persist + 1 + Type + Boolean + Value + 1 + + NotifyTipDuration + + Comment + Length of time that notification tips stay on screen (seconds) + Persist + 1 + Type + F32 + Value + 4 + + NumSessions + + Comment + Number of successful logins to Second Life + Persist + 1 + Type + S32 + Value + 0 + + NumpadControl + + Comment + How numpad keys control your avatar. 0 = Like the normal arrow keys, 1 = Numpad moves avatar when numlock is off, 2 = Numpad moves avatar regardless of numlock (use this if you have no numlock) + Persist + 1 + Type + S32 + Value + 0 + + ObjectChatColor + + Comment + Color of chat messages from objects + Persist + 1 + Type + Color4 + Value + + 0.699999988079071044921875 + 0.89999997615814208984375 + 0.699999988079071044921875 + 1 + + + OpenDebugStatAdvanced + + Comment + Expand advanced performance stats display + Persist + 1 + Type + Boolean + Value + 0 + + OpenDebugStatBasic + + Comment + Expand basic performance stats display + Persist + 1 + Type + Boolean + Value + 1 + + OpenDebugStatNet + + Comment + Expand network stats display + Persist + 1 + Type + Boolean + Value + 1 + + OpenDebugStatRender + + Comment + Expand render stats display + Persist + 1 + Type + Boolean + Value + 1 + + OpenDebugStatSim + + Comment + Expand simulator performance stats display + Persist + 1 + Type + Boolean + Value + 1 + + OutBandwidth + + Comment + Outgoing bandwidth throttle (bps) + Persist + 1 + Type + F32 + Value + 0 + + OverdrivenColor + + Comment + Color of various indicators when resident is speaking too loud. + Persist + 1 + Type + Color4 + Value + + 1 + 0 + 0 + 1 + + + OverlayTitle + + Comment + Controls watermark text message displayed on screen when "ShowOverlayTitle" is enabled (one word, underscores become spaces) + Persist + 1 + Type + String + Value + Set_via_OverlayTitle_in_settings.xml + + PTTCurrentlyEnabled + + Comment + + Persist + 0 + Type + Boolean + Value + 1 + + PacketDropPercentage + + Comment + Percentage of packets dropped by the client. + Persist + 1 + Type + F32 + Value + 0 + + PermissionsCautionEnabled + + Comment + When enabled, changes the handling of script permission requests to help avoid accidental granting of certain permissions, such as the debit permission + Persist + 0 + Type + Boolean + Value + 1 + + PermissionsCautionNotifyBoxHeight + + Comment + Height of caution-style notification messages + Persist + 0 + Type + S32 + Value + 344 + + PermissionsManagerRect + + Comment + Rectangle for permissions manager window + Persist + 1 + Type + Rect + Value + + 0 + 85 + 300 + 0 + + + PickerContextOpacity + + Comment + Controls overall opacity of context frustrum connecting color and texture pickers with their swatches + Persist + 1 + Type + F32 + Value + 0.3499999940395355224609375 + + PieMenuLineWidth + + Comment + Width of lines in pie menu display (pixels) + Persist + 1 + Type + F32 + Value + 2.5 + + PinTalkViewOpen + + Comment + Stay in IM after hitting return + Persist + 1 + Type + Boolean + Value + 1 + + PingInterpolate + + Comment + Extrapolate object position along velocity vector based on ping delay + Persist + 1 + Type + Boolean + Value + 0 + + PitchFromMousePosition + + Comment + Vertical range over which avatar head tracks mouse position (degrees of head rotation from top of window to bottom) + Persist + 1 + Type + F32 + Value + 90 + + PlayTypingAnim + + Comment + Your avatar plays the typing animation whenever you type in the chat bar + Persist + 1 + Type + Boolean + Value + 1 + + PrecachingDelay + + Comment + Delay when logging in to load world before showing it (seconds) + Persist + 1 + Type + F32 + Value + 6 + + PreviewAnimRect + + Comment + Rectangle for animation preview window + Persist + 1 + Type + Rect + Value + + 0 + 85 + 300 + 0 + + + PreviewClassifiedRect + + Comment + Rectangle for URL preview window + Persist + 1 + Type + Rect + Value + + 0 + 530 + 420 + 0 + + + PreviewEventRect + + Comment + Rectangle for Event preview window + Persist + 1 + Type + Rect + Value + + 0 + 530 + 420 + 0 + + + PreviewLandmarkRect + + Comment + Rectangle for landmark preview window + Persist + 1 + Type + Rect + Value + + 0 + 90 + 300 + 0 + + + PreviewObjectRect + + Comment + Rectangle for object preview window + Persist + 1 + Type + Rect + Value + + 0 + 85 + 300 + 0 + + + PreviewScriptRect + + Comment + Rectangle for script preview window + Persist + 1 + Type + Rect + Value + + 0 + 550 + 500 + 0 + + + PreviewSoundRect + + Comment + Rectangle for sound preview window + Persist + 1 + Type + Rect + Value + + 0 + 85 + 300 + 0 + + + PreviewTextureRect + + Comment + Rectangle for texture preview window + Persist + 1 + Type + Rect + Value + + 0 + 400 + 400 + 0 + + + PreviewURLRect + + Comment + Rectangle for URL preview window + Persist + 1 + Type + Rect + Value + + 0 + 90 + 300 + 0 + + + PreviewWearableRect + + Comment + Rectangle for wearable preview window + Persist + 1 + Type + Rect + Value + + 0 + 85 + 300 + 0 + + + ProbeHardwareOnStartup + + Comment + Query current hardware configuration on application startup + Persist + 1 + Type + Boolean + Value + 1 + + PropertiesRect + + Comment + Rectangle for inventory item properties window + Persist + 1 + Type + Rect + Value + + 0 + 320 + 350 + 0 + + + PurgeCacheOnNextStartup + + Comment + Clear local file cache next time viewer is run + Persist + 1 + Type + Boolean + Value + 0 + + PurgeCacheOnStartup + + Comment + Clear local file cache every time viewer is run + Persist + 1 + Type + Boolean + Value + 0 + + PushToTalkButton + + Comment + Which button or keyboard key is used for push-to-talk + Persist + 1 + Type + String + Value + MiddleMouse + + PushToTalkToggle + + Comment + Should the push-to-talk button behave as a toggle + Persist + 1 + Type + Boolean + Value + 0 + + QAMode + + Comment + Enable Testing Features. + Persist + 1 + Type + Boolean + Value + 0 + + QuietSnapshotsToDisk + + Comment + Take snapshots to disk without playing animation or sound + Persist + 1 + Type + Boolean + Value + 0 + + QuitAfterSeconds + + Comment + The duration allowed before quitting. + Persist + 1 + Type + F32 + Value + 0 + + RadioLandBrushAction + + Comment + Last selected land modification operation (0 = flatten, 1 = raise, 2 = lower, 3 = smooth, 4 = roughen, 5 = revert) + Persist + 1 + Type + S32 + Value + 0 + + RadioLandBrushSize + + Comment + Size of land modification brush (0 = small, 1 = medium, 2 = large) + Persist + 1 + Type + S32 + Value + 0 + + RecentItemsSortOrder + + Comment + Specifies sort key for recent inventory items (+0 = name, +1 = date, +2 = folders always by name, +4 = system folders to top) + Persist + 1 + Type + U32 + Value + 1 + + RectangleSelectInclusive + + Comment + Select objects that have at least one vertex inside selection rectangle + Persist + 1 + Type + Boolean + Value + 1 + + RegionTextureSize + + Comment + Terrain texture dimensions (power of 2) + Persist + 1 + Type + U32 + Value + 256 + + RememberPassword + + Comment + Keep password (in encrypted form) for next login + Persist + 1 + Type + Boolean + Value + 1 + + RenderAnisotropic + + Comment + Render textures using anisotropic filtering + Persist + 1 + Type + Boolean + Value + 0 + + RenderAppleUseMultGL + + Comment + Whether we want to use multi-threaded OpenGL on Apple hardware (requires restart of SL). + Persist + 1 + Type + Boolean + Value + 0 + + RenderAvatarCloth + + Comment + Controls if avatars use wavy cloth + Persist + 1 + Type + Boolean + Value + 1 + + RenderAvatarLODFactor + + Comment + Controls level of detail of avatars (multiplier for current screen area when calculated level of detail) + Persist + 1 + Type + F32 + Value + 0.5 + + RenderAvatarMaxVisible + + Comment + Maximum number of avatars to display at any one time + Persist + 1 + Type + S32 + Value + 35 + + RenderAvatarVP + + Comment + Use vertex programs to perform hardware skinning of avatar + Persist + 1 + Type + Boolean + Value + 1 + + RenderBumpmapMinDistanceSquared + + Comment + Maximum distance at which to render bumpmapped primitives (distance in meters, squared) + Persist + 1 + Type + F32 + Value + 100 + + RenderCubeMap + + Comment + Whether we can render the cube map or not + Persist + 1 + Type + Boolean + Value + 1 + + RenderCustomSettings + + Comment + Do you want to set the graphics settings yourself + Persist + 1 + Type + Boolean + Value + 0 + + RenderDebugTextureBind + + Comment + Enable texture bind performance test. + Persist + 1 + Type + Boolean + Value + 0 + + RenderDynamicLOD + + Comment + Dynamically adjust level of detail. + Persist + 1 + Type + Boolean + Value + 1 + + RenderDynamicReflections + + Comment + Generate a dynamic cube map for reflections (objects reflect their environment, experimental). + Persist + 1 + Type + Boolean + Value + 0 + + RenderFarClip + + Comment + Distance of far clip plane from camera (meters) + Persist + 1 + Type + F32 + Value + 256 + + RenderFastUI + + Comment + [NOT USED] + Persist + 1 + Type + Boolean + Value + 0 + + RenderFlexTimeFactor + + Comment + Controls level of detail of flexible objects (multiplier for amount of time spent processing flex objects) + Persist + 1 + Type + F32 + Value + 1 + + RenderFogRatio + + Comment + Distance from camera where fog reaches maximum density (fraction or multiple of far clip distance) + Persist + 1 + Type + F32 + Value + 4.0 + + RenderGamma + + Comment + Sets gamma exponent for renderer + Persist + 1 + Type + F32 + Value + 0 + + RenderGammaFull + + Comment + Use fully controllable gamma correction, instead of faster, hard-coded gamma correction of 2. + Persist + 1 + Type + Boolean + Value + 1 + + RenderGlow + + Comment + Render bloom post effect. + Persist + 1 + Type + Boolean + Value + 1 + + RenderGlowIterations + + Comment + Number of times to iterate the glow (higher = wider and smoother but slower) + Persist + 1 + Type + S32 + Value + 2 + + RenderGlowLumWeights + + Comment + Weights for each color channel to be used in calculating luminance (should add up to 1.0) + Persist + 1 + Type + Vector3 + Value + + 0.299 + 0.587 + 0.114 + + + RenderGlowMaxExtractAlpha + + Comment + Max glow alpha value for brightness extraction to auto-glow. + Persist + 1 + Type + F32 + Value + 0.065 + + RenderGlowMinLuminance + + Comment + Min luminance intensity necessary to consider an object bright enough to automatically glow. (Gets clamped to 0 - 1.0 range) + Persist + 1 + Type + F32 + Value + 1.0 + + RenderGlowResolutionPow + + Comment + Glow map resolution power of two. + Persist + 1 + Type + S32 + Value + 9 + + RenderGlowStrength + + Comment + Additive strength of glow. + Persist + 1 + Type + F32 + Value + 0.35 + + RenderGlowWarmthAmount + + Comment + Amount of warmth extraction to use (versus luminance extraction). 0 = lum, 1.0 = warmth + Persist + 1 + Type + F32 + Value + 0 + + RenderGlowWarmthWeights + + Comment + Weight of each color channel used before finding the max warmth + Persist + 1 + Type + Vector3 + Value + + 1.0 + 0.5 + 0.7 + + + RenderGlowWidth + + Comment + Glow sample size (higher = wider and softer but eventually more pixelated) + Persist + 1 + Type + F32 + Value + 1.3 + + RenderHUDInSnapshot + + Comment + Display HUD attachments in snapshot + Persist + 1 + Type + Boolean + Value + 0 + + RenderHiddenSelections + + Comment + Show selection lines on objects that are behind other objects + Persist + 1 + Type + Boolean + Value + 1 + + RenderHideGroupTitle + + Comment + Don't show my group title in my name label + Persist + 1 + Type + Boolean + Value + 0 + + RenderHideGroupTitleAll + + Comment + Show group titles in name labels + Persist + 1 + Type + Boolean + Value + 0 + + RenderInitError + + Comment + Error occured while initializing GL + Persist + 1 + Type + Boolean + Value + 0 + + RenderLightRadius + + Comment + Render the radius of selected lights + Persist + 1 + Type + Boolean + Value + 0 + + RenderLightingDetail + + Comment + Amount of detail for lighting objects/avatars/terrain (0=sun/moon only, 1=enable local lights) + Persist + 1 + Type + S32 + Value + 1 + + RenderMaxPartCount + + Comment + Maximum number of particles to display on screen + Persist + 1 + Type + S32 + Value + 4096 + + RenderMaxVBOSize + + Comment + Maximum size of a vertex buffer (in KB). + Persist + 1 + Type + S32 + Value + 32 + + RenderName + + Comment + Controls display of names above avatars (0 = never, 1 = fade, 2 = always) + Persist + 1 + Type + S32 + Value + 2 + + RenderNameFadeDuration + + Comment + Time interval over which to fade avatar names (seconds) + Persist + 1 + Type + F32 + Value + 1 + + RenderNameHideSelf + + Comment + Don't display own name above avatar + Persist + 1 + Type + Boolean + Value + 0 + + RenderNameShowTime + + Comment + Fade avatar names after specified time (seconds) + Persist + 1 + Type + F32 + Value + 10 + + RenderObjectBump + + Comment + Show bumpmapping on primitives + Persist + 1 + Type + Boolean + Value + 1 + + RenderQualityPerformance + + Comment + Which graphics settings you've chosen + Persist + 1 + Type + U32 + Value + 1 + + RenderReflectionDetail + + Comment + Detail of reflection render pass. + Persist + 1 + Type + S32 + Value + 2 + + RenderReflectionRes + + Comment + Reflection map resolution. + Persist + 1 + Type + S32 + Value + 64 + + RenderResolutionDivisor + + Comment + Divisor for rendering 3D scene at reduced resolution. + Persist + 1 + Type + U32 + Value + 1 + + RenderShaderLODThreshold + + Comment + Fraction of draw distance defining the switch to a different shader LOD + Persist + 1 + Type + F32 + Value + 1.0 + + RenderSunDynamicRange + + Comment + Defines what percent brighter the sun is than local point lights (1.0 = 100% brighter. Value should not be less than 0. ). + Persist + 1 + Type + F32 + Value + 1.0 + + RenderTerrainDetail + + Comment + Detail applied to terrain texturing (0 = none, 1 or 2 = full) + Persist + 1 + Type + S32 + Value + 2 + + RenderTerrainLODFactor + + Comment + Controls level of detail of terrain (multiplier for current screen area when calculated level of detail) + Persist + 1 + Type + F32 + Value + 1.0 + + RenderTerrainScale + + Comment + Terrain detail texture scale + Persist + 1 + Type + F32 + Value + 12 + + RenderTreeLODFactor + + Comment + Controls level of detail of vegetation (multiplier for current screen area when calculated level of detail) + Persist + 1 + Type + F32 + Value + 0.5 + + RenderUIInSnapshot + + Comment + Display user interface in snapshot + Persist + 1 + Type + Boolean + Value + 0 + + RenderUseCleverUI + + Comment + Turns on the \"clever\" UI rendering optimization. It's a known performace gain (and enabled by default) on apple. + Persist + 1 + Type + Boolean + Value + 0 + + RenderUseFarClip + + Comment + If false, frustum culling will ignore far clip plane. + Persist + 1 + Type + Boolean + Value + 1 + + RenderUseFBO + + Comment + Whether we want to use GL_EXT_framebuffer_objects. + Persist + 1 + Type + Boolean + Value + 0 + + RenderUseImpostors + + Comment + Whether we want to use impostors for far away avatars. + Persist + 1 + Type + Boolean + Value + 1 + + RenderUseShaderLOD + + Comment + Whether we want to have different shaders for LOD + Persist + 1 + Type + Boolean + Value + 1 + + RenderUseShaderNearParticles + + Comment + Whether we want to use shaders on near particles + Persist + 1 + Type + Boolean + Value + 0 + + RenderShaderParticleThreshold + + Comment + Fraction of draw distance to not use shader on particles + Persist + 1 + Type + F32 + Value + 0.25 + + RenderVBOEnable + + Comment + Use GL Vertex Buffer Objects + Persist + 1 + Type + Boolean + Value + 1 + + RenderVolumeLODFactor + + Comment + Controls level of detail of primitives (multiplier for current screen area when calculated level of detail) + Persist + 1 + Type + F32 + Value + 1 + + RenderWater + + Comment + Display water + Persist + 1 + Type + Boolean + Value + 1 + + RenderWaterMipNormal + + Comment + Use mip maps for water normal map. + Persist + 1 + Type + Boolean + Value + 1 + + RenderWaterReflections + + Comment + Reflect the environment in the water. + Persist + 1 + Type + Boolean + Value + 0 + + RenderWaterRefResolution + + Comment + Water planar reflection resolution. + Persist + 1 + Type + S32 + Value + 512 + + RotateRight + + Comment + Make the agent rotate to its right. + Persist + 1 + Type + Boolean + Value + 0 + + RotationStep + + Comment + All rotations via rotation tool are constrained to multiples of this unit (degrees) + Persist + 1 + Type + F32 + Value + 1 + + RunBtnState + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + + RunMultipleThreads + + Comment + If TRUE keep background threads active during render + Persist + 1 + Type + Boolean + Value + 0 + + SafeMode + + Comment + Reset preferences, run in safe mode. + Persist + 1 + Type + Boolean + Value + 0 + + ScaleShowAxes + + Comment + Show indicator of selected scale axis when scaling + Persist + 1 + Type + Boolean + Value + 0 + + ScaleStretchTextures + + Comment + Stretch textures along with object when scaling + Persist + 1 + Type + Boolean + Value + 1 + + ScaleUniform + + Comment + Scale selected objects evenly about center of selection + Persist + 1 + Type + Boolean + Value + 0 + + ScriptErrorColor + + Comment + Color of script error messages + Persist + 1 + Type + Color4 + Value + + 0.819999992847442626953125 + 0.819999992847442626953125 + 0.9900000095367431640625 + 1 + + + ScriptErrorsAsChat + + Comment + Display script errors and warning in chat history + Persist + 1 + Type + Boolean + Value + 0 + + ScriptHelpFollowsCursor + + Comment + Scripting help window updates contents based on script editor contents under text cursor + Persist + 1 + Type + Boolean + Value + 0 + + SearchURLDefault + + Comment + URL to load for empty searches + Persist + 1 + Type + String + Value + http://secondlife.com/app/search/index.php? + + SearchURLQuery + + Comment + URL to use for searches + Persist + 1 + Type + String + Value + http://secondlife.com/app/search/search_proxy.php?q=[QUERY]&s=[COLLECTION]& + + SearchURLSuffix2 + + Comment + Parameters added to end of search queries + Persist + 1 + Type + String + Value + lang=[LANG]&m=[MATURE]&t=[TEEN]&region=[REGION]&x=[X]&y=[Y]&z=[Z]&session=[SESSION] + + SelectMovableOnly + + Comment + Select only objects you can move + Persist + 1 + Type + Boolean + Value + 0 + + SelectOwnedOnly + + Comment + Select only objects you own + Persist + 1 + Type + Boolean + Value + 0 + + SelectionHighlightAlpha + + Comment + Opacity of selection highlight (0.0 = completely transparent, 1.0 = completely opaque) + Persist + 1 + Type + F32 + Value + 0.4000000059604644775390625 + + SelectionHighlightAlphaTest + + Comment + Alpha value below which pixels are displayed on selection highlight line (0.0 = show all pixels, 1.0 = show now pixels) + Persist + 1 + Type + F32 + Value + 0.1000000014901161193847656 + + SelectionHighlightThickness + + Comment + Thickness of selection highlight line (fraction of view distance) + Persist + 1 + Type + F32 + Value + 0.009999999776482582092285156 + + SelectionHighlightUAnim + + Comment + Rate at which texture animates along U direction in selection highlight line (fraction of texture per second) + Persist + 1 + Type + F32 + Value + 0 + + SelectionHighlightUScale + + Comment + Scale of texture display on selection highlight line (fraction of texture size) + Persist + 1 + Type + F32 + Value + 0.1000000014901161193847656 + + SelectionHighlightVAnim + + Comment + Rate at which texture animates along V direction in selection highlight line (fraction of texture per second) + Persist + 1 + Type + F32 + Value + 0.5 + + SelectionHighlightVScale + + Comment + Scale of texture display on selection highlight line (fraction of texture size) + Persist + 1 + Type + F32 + Value + 1 + + ServerChoice + + Comment + [DO NOT MODIFY] Controls which grid you connect to + Persist + 1 + Type + S32 + Value + 0 + + ShowAllObjectHoverTip + + Comment + Show descriptive tooltip when mouse hovers over non-interactive and interactive objects. + Persist + 1 + Type + Boolean + Value + 0 + + ShowAxes + + Comment + Render coordinate frame at your position + Persist + 1 + Type + Boolean + Value + 0 + + ShowCameraControls + + Comment + Display camera controls on login + Persist + 1 + Type + Boolean + Value + 0 + + ShowChatHistory + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + + ShowCommunicate + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + + ShowConsoleWindow + + Comment + Show log in separate OS window + Persist + 1 + Type + Boolean + Value + 0 + + ShowCrosshairs + + Comment + Display crosshairs when in mouselook mode + Persist + 1 + Type + Boolean + Value + 1 + + ShowDebugConsole + + Comment + Show log in SL window + Persist + 1 + Type + Boolean + Value + 0 + + ShowDebugStats + + Comment + Show performance stats display + Persist + 1 + Type + Boolean + Value + 0 + + ShowDepthBuffer + + Comment + Show depth buffer contents + Persist + 1 + Type + Boolean + Value + 0 + + ShowDirectory + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + + ShowEmptyFoldersWhenSearching + + Comment + Shows folders that do not have any visible contents when applying a filter to inventory + Persist + 1 + Type + Boolean + Value + 0 + + ShowHoverTips + + Comment + Show descriptive tooltip when mouse hovers over items in world + Persist + 1 + Type + Boolean + Value + 1 + + ShowInventory + + Comment + Open inventory window on login + Persist + 1 + Type + Boolean + Value + 0 + + ShowLandHoverTip + + Comment + Show descriptive tooltip when mouse hovers over land + Persist + 1 + Type + Boolean + Value + 0 + + ShowLeaders + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + + ShowMatureClassifieds + + Comment + Display results of find classifieds that are flagged as mature + Persist + 1 + Type + Boolean + Value + 0 + + ShowMatureEvents + + Comment + Display results of find events that are flagged as mature + Persist + 1 + Type + Boolean + Value + 0 + + ShowMatureFindAll + + Comment + Display results of find all that are in mature sims + Persist + 1 + Type + Boolean + Value + 0 + + ShowMatureGroups + + Comment + Display results of find groups that are in flagged as mature + Persist + 1 + Type + Boolean + Value + 1 + + ShowMatureSims + + Comment + Display results of find places or find popular that are in mature sims + Persist + 1 + Type + Boolean + Value + 0 + + ShowMiniMap + + Comment + Display mini map on login + Persist + 1 + Type + Boolean + Value + 1 + + ShowMovementControls + + Comment + Display movement controls on login + Persist + 1 + Type + Boolean + Value + 1 + + ShowNearClip + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + + ShowNewInventory + + Comment + Automatically views new notecards/textures/landmarks + Persist + 1 + Type + Boolean + Value + 1 + + ShowObjectUpdates + + Comment + Show when update messages are received for individual objects + Persist + 1 + Type + Boolean + Value + 0 + + ShowOverlayTitle + + Comment + Prints watermark text message on screen + Persist + 1 + Type + Boolean + Value + 0 + + ShowParcelOwners + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + + ShowPermissions + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + + ShowPropertyLines + + Comment + Show line overlay demarking property boundaries + Persist + 1 + Type + Boolean + Value + 0 + + ShowSearchBar + + Comment + Show the Search Bar in the Status Overlay + Persist + 1 + Type + Boolean + Value + 1 + + ShowSelectionBeam + + Comment + Show selection particle beam when selecting or interacting with objects. + Persist + 1 + Type + Boolean + Value + 1 + + ShowStartLocation + + Comment + Display starting location menu on login screen + Persist + 1 + Type + Boolean + Value + 0 + + ShowTangentBasis + + Comment + Render normal and binormal (debugging bump mapping) + Persist + 1 + Type + Boolean + Value + 0 + + ShowToolBar + + Comment + Show toolbar at bottom of screen + Persist + 1 + Type + Boolean + Value + 1 + + ShowTools + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + + ShowVoiceChannelPopup + + Comment + Controls visibility of the current voice channel popup above the voice tab + Persist + 1 + Type + Boolean + Value + 0 + + ShowVolumeSettingsPopup + + Comment + Show individual volume slider for voice, sound effects, etc + Persist + 1 + Type + Boolean + Value + 0 + + ShowWorldMap + + Comment + Display world map on login + Persist + 1 + Type + Boolean + Value + 0 + + ShowXUINames + + Comment + Display XUI Names as Tooltips + Persist + 1 + Type + Boolean + Value + 0 + + SitBtnState + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + + SkinFolder + + Comment + The skin folder to use. + Persist + 1 + Type + String + Value + + + SkyAmbientScale + + Comment + Controls strength of ambient, or non-directional light from the sun and moon (fraction or multiple of default ambient level) + Persist + 1 + Type + F32 + Value + 0.300000011920928955078125 + + SkyNightColorShift + + Comment + Controls moonlight color (base color applied to moon as light source) + Persist + 1 + Type + Color3 + Value + + 0.699999988079071044921875 + 0.699999988079071044921875 + 1 + + + SkyOverrideSimSunPosition + + Comment + + Persist + 0 + Type + Boolean + Value + 0 + + SkySunDefaultPosition + + Comment + Default position of sun in sky (direction in world coordinates) + Persist + 1 + Type + Vector3 + Value + + 1 + 0 + 0.1000000014901161193847656 + + + SkyUseClassicClouds + + Comment + Whether to use the old Second Life particle clouds or not + Persist + 1 + Type + Boolean + Value + 1 + + SlideLeftBtnRect + + Comment + + Persist + 0 + Type + Rect + Value + + 20 + 54 + 45 + 29 + + + SlideRightBtnRect + + Comment + + Persist + 0 + Type + Rect + Value + + 66 + 54 + 91 + 29 + + + SmallAvatarNames + + Comment + Display avatar name text in smaller font + Persist + 1 + Type + Boolean + Value + 1 + + SnapEnabled + + Comment + Enable snapping to grid + Persist + 1 + Type + Boolean + Value + 1 + + SnapMargin + + Comment + Controls maximum distance between windows before they auto-snap together (pixels) + Persist + 1 + Type + S32 + Value + 10 + + SnapToMouseCursor + + Comment + When snapping to grid, center object on nearest grid point to mouse cursor + Persist + 1 + Type + Boolean + Value + 0 + + SnapshotLocalLastResolution + + Comment + Take next local snapshot at this resolution + Persist + 1 + Type + S32 + Value + 0 + + SnapshotPostcardLastResolution + + Comment + Take next postcard snapshot at this resolution + Persist + 1 + Type + S32 + Value + 0 + + SnapshotQuality + + Comment + Quality setting of postcard JPEGs (0 = worst, 100 = best) + Persist + 1 + Type + S32 + Value + 75 + + SnapshotTextureLastResolution + + Comment + Take next texture snapshot at this resolution + Persist + 1 + Type + S32 + Value + 0 + + SpeakingColor + + Comment + Color of various indicators when resident is speaking on a voice channel. + Persist + 1 + Type + Color4 + Value + + 0 + 1 + 0 + 1 + + + SpeedTest + + Comment + Performance testing mode, no network + Persist + 1 + Type + Boolean + Value + 0 + + StatsAutoRun + + Comment + Play back autopilot + Persist + 1 + Type + Boolean + Value + 0 + + StatsFile + + Comment + Filename for stats logging output + Persist + 1 + Type + String + Value + fs.txt + + StatsNumRuns + + Comment + Loop autopilot playback this number of times + Persist + 1 + Type + S32 + Value + -1 + + StatsPilotFile + + Comment + Filename for stats logging autopilot path + Persist + 1 + Type + String + Value + pilot.txt + + StatsQuitAfterRuns + + Comment + Quit application after this number of autopilot playback runs + Persist + 1 + Type + Boolean + Value + 0 + + StatsSessionTrackFrameStats + + Comment + Track rendering and network statistics + Persist + 1 + Type + Boolean + Value + 0 + + StatsSummaryFile + + Comment + Filename for stats logging summary + Persist + 1 + Type + String + Value + fss.txt + + StatusBarHeight + + Comment + Height of menu/status bar at top of screen (pixels) + Persist + 1 + Type + S32 + Value + 26 + + StatusBarPad + + Comment + Spacing between popup buttons at bottom of screen (Stand up, Release Controls) + Persist + 1 + Type + S32 + Value + 10 + + SystemChatColor + + Comment + Color of chat messages from SL System + Persist + 1 + Type + Color4 + Value + + 0.800000011920928955078125 + 1 + 1 + 1 + + + SystemLanguage + + Comment + Language indicated by system settings (for XUI) + Persist + 1 + Type + String + Value + en-us + + TabToTextFieldsOnly + + Comment + TAB key takes you to next text entry field, instead of next widget + Persist + 1 + Type + Boolean + Value + 0 + + TerrainColorHeightRange + + Comment + Altitude range over which a given terrain texture has effect (meters) + Persist + 1 + Type + F32 + Value + 60 + + TerrainColorStartHeight + + Comment + Starting altitude for terrain texturing (meters) + Persist + 1 + Type + F32 + Value + 20 + + TextureMemory + + Comment + Amount of memory to use for textures in MB (0 = autodetect) + Persist + 1 + Type + S32 + Value + 0 + + TexturePickerRect + + Comment + Rectangle for texture picker + Persist + 1 + Type + Rect + Value + + 0 + 290 + 350 + 0 + + + TexturePickerShowFolders + + Comment + Show folders with no texures in texture picker + Persist + 1 + Type + Boolean + Value + 1 + + TexturePickerSortOrder + + Comment + Specifies sort key for textures in texture picker (+0 = name, +1 = date, +2 = folders always by name, +4 = system folders to top) + Persist + 1 + Type + U32 + Value + 2 + + ThirdPersonBtnState + + Comment + + Persist + 0 + Type + Boolean + Value + 1 + + ThrottleBandwidthKBPS + + Comment + Maximum allowable downstream bandwidth (kilo bits per second) + Persist + 1 + Type + F32 + Value + 500 + + ToolHelpRect + + Comment + + Persist + 0 + Type + Rect + Value + + 8 + 178 + 75 + 162 + + + ToolTipDelay + + Comment + Seconds before displaying tooltip when mouse stops over UI element + Persist + 1 + Type + F32 + Value + 0.699999988079071044921875 + + ToolboxAutoMove + + Comment + [NOT USED] + Persist + 1 + Type + Boolean + Value + 0 + + ToolboxRect + + Comment + Rectangle for tools window + Persist + 1 + Type + Rect + Value + + 0 + 100 + 100 + 100 + + + ToolboxShowMore + + Comment + Whether to show additional build tool controls + Persist + 1 + Type + Boolean + Value + 1 + + TrackFocusObject + + Comment + Camera tracks last object zoomed on + Persist + 1 + Type + Boolean + Value + 1 + + TurnLeftBtnRect + + Comment + + Persist + 0 + Type + Rect + Value + + 20 + 29 + 45 + 4 + + + TurnRightBtnRect + + Comment + + Persist + 0 + Type + Rect + Value + + 66 + 29 + 91 + 4 + + + TypeAheadTimeout + + Comment + Time delay before clearing type-ahead buffer in lists (seconds) + Persist + 1 + Type + F32 + Value + 1.5 + + UIAutoScale + + Comment + Keep UI scale consistent across different resolutions + Persist + 1 + Type + Boolean + Value + 1 + + UIFloaterTestBool + + Comment + Example saved setting for the test floater + Persist + 1 + Type + Boolean + Value + 0 + + UIImgBtnCloseActiveUUID + + Comment + + Persist + 0 + Type + String + Value + 47a8c844-cd2a-4b1a-be01-df8b1612fe5d + + UIImgBtnCloseInactiveUUID + + Comment + + Persist + 0 + Type + String + Value + 779e4fa3-9b13-f74a-fba9-3886fe9c86ba + + UIImgBtnClosePressedUUID + + Comment + + Persist + 0 + Type + String + Value + e5821134-23c0-4bd0-af06-7fa95b9fb01a + + UIImgBtnForwardInUUID + + Comment + + Persist + 0 + Type + String + Value + 54197a61-f5d1-4c29-95d2-c071d08849cb + + UIImgBtnForwardOutUUID + + Comment + + Persist + 0 + Type + String + Value + a0eb4021-1b20-4a53-892d-8faa9265a6f5 + + UIImgBtnJumpLeftInUUID + + Comment + + Persist + 0 + Type + String + Value + 9cad3e6d-2d6d-107d-f8ab-5ba272b5bfe1 + + UIImgBtnJumpLeftOutUUID + + Comment + + Persist + 0 + Type + String + Value + 3c18c87e-5f50-14e2-e744-f44734aa365f + + UIImgBtnJumpRightInUUID + + Comment + + Persist + 0 + Type + String + Value + 7dabc040-ec13-2309-ddf7-4f161f6de2f4 + + UIImgBtnJumpRightOutUUID + + Comment + + Persist + 0 + Type + String + Value + ff9a71eb-7414-4cf8-866e-a701deb7c3cf + + UIImgBtnLeftInUUID + + Comment + + Persist + 0 + Type + String + Value + 95463c78-aaa6-464d-892d-3a805b6bb7bf + + UIImgBtnLeftOutUUID + + Comment + + Persist + 0 + Type + String + Value + 13a93910-6b44-45eb-ad3a-4d1324c59bac + + UIImgBtnMinimizeActiveUUID + + Comment + + Persist + 0 + Type + String + Value + 34c9398d-bb78-4643-9633-46a2fa3e9637 + + UIImgBtnMinimizeInactiveUUID + + Comment + + Persist + 0 + Type + String + Value + 6e72abba-1378-437f-bf7a-f0c15f3e99a3 + + UIImgBtnMinimizePressedUUID + + Comment + + Persist + 0 + Type + String + Value + 39801651-26cb-4926-af57-7af9352c273c + + UIImgBtnMoveDownInUUID + + Comment + + Persist + 0 + Type + String + Value + b92a70b9-c841-4c94-b4b3-cee9eb460d48 + + UIImgBtnMoveDownOutUUID + + Comment + + Persist + 0 + Type + String + Value + b5abc9fa-9e62-4e03-bc33-82c4c1b6b689 + + UIImgBtnMoveUpInUUID + + Comment + + Persist + 0 + Type + String + Value + 49b4b357-e430-4b56-b9e0-05b8759c3c82 + + UIImgBtnMoveUpOutUUID + + Comment + + Persist + 0 + Type + String + Value + f887146d-829f-4e39-9211-cf872b78f97c + + UIImgBtnPanDownInUUID + + Comment + + Persist + 0 + Type + String + Value + e5821134-23c0-4bd0-af06-7fa95b9fb01a + + UIImgBtnPanDownOutUUID + + Comment + + Persist + 0 + Type + String + Value + 47a8c844-cd2a-4b1a-be01-df8b1612fe5d + + UIImgBtnPanLeftInUUID + + Comment + + Persist + 0 + Type + String + Value + e5821134-23c0-4bd0-af06-7fa95b9fb01a + + UIImgBtnPanLeftOutUUID + + Comment + + Persist + 0 + Type + String + Value + 47a8c844-cd2a-4b1a-be01-df8b1612fe5d + + UIImgBtnPanRightInUUID + + Comment + + Persist + 0 + Type + String + Value + e5821134-23c0-4bd0-af06-7fa95b9fb01a + + UIImgBtnPanRightOutUUID + + Comment + + Persist + 0 + Type + String + Value + 47a8c844-cd2a-4b1a-be01-df8b1612fe5d + + UIImgBtnPanUpInUUID + + Comment + + Persist + 0 + Type + String + Value + e5821134-23c0-4bd0-af06-7fa95b9fb01a + + UIImgBtnPanUpOutUUID + + Comment + + Persist + 0 + Type + String + Value + 47a8c844-cd2a-4b1a-be01-df8b1612fe5d + + UIImgBtnRestoreActiveUUID + + Comment + + Persist + 0 + Type + String + Value + 111b39de-8928-4690-b7b2-e17d5c960277 + + UIImgBtnRestoreInactiveUUID + + Comment + + Persist + 0 + Type + String + Value + 0eafa471-70af-4882-b8c1-40a310929744 + + UIImgBtnRestorePressedUUID + + Comment + + Persist + 0 + Type + String + Value + 90a0ed5c-2e7b-4845-9958-a64a1b30f312 + + UIImgBtnRightInUUID + + Comment + + Persist + 0 + Type + String + Value + 5e616d0d-4335-476f-9977-560bccd009da + + UIImgBtnRightOutUUID + + Comment + + Persist + 0 + Type + String + Value + 5a44fd04-f52b-4c30-8b00-4a31e27614bd + + UIImgBtnScrollDownInUUID + + Comment + + Persist + 0 + Type + String + Value + d2421bab-2eaf-4863-b8f6-5e4c52519247 + + UIImgBtnScrollDownOutUUID + + Comment + + Persist + 0 + Type + String + Value + b4ecdecf-5c8d-44e7-b882-17a77e88ed55 + + UIImgBtnScrollLeftInUUID + + Comment + + Persist + 0 + Type + String + Value + ea137a32-6718-4d05-9c22-7d570d27b2cd + + UIImgBtnScrollLeftOutUUID + + Comment + + Persist + 0 + Type + String + Value + 43773e8d-49aa-48e0-80f3-a04715f4677a + + UIImgBtnScrollRightInUUID + + Comment + + Persist + 0 + Type + String + Value + b749de64-e903-4c3c-ac0b-25fb6fa39cb5 + + UIImgBtnScrollRightOutUUID + + Comment + + Persist + 0 + Type + String + Value + 3d700d19-e708-465d-87f2-46c8c0ee7938 + + UIImgBtnScrollUpInUUID + + Comment + + Persist + 0 + Type + String + Value + a93abdf3-27b5-4e22-a8fa-c48216cd2e3a + + UIImgBtnScrollUpOutUUID + + Comment + + Persist + 0 + Type + String + Value + dad084d7-9a46-452a-b0ff-4b9f1cefdde9 + + UIImgBtnSlideLeftInUUID + + Comment + + Persist + 0 + Type + String + Value + 724996f5-b956-46f6-9844-4fcfce1d5e83 + + UIImgBtnSlideLeftOutUUID + + Comment + + Persist + 0 + Type + String + Value + 82476321-0374-4c26-9567-521535ab4cd7 + + UIImgBtnSlideRightInUUID + + Comment + + Persist + 0 + Type + String + Value + 7eeb57d2-3f37-454d-a729-8b217b8be443 + + UIImgBtnSlideRightOutUUID + + Comment + + Persist + 0 + Type + String + Value + 1fbe4e60-0607-44d1-a50a-032eff56ae75 + + UIImgBtnSpinDownInUUID + + Comment + + Persist + 0 + Type + String + Value + a985ac71-052f-48e6-9c33-d931c813ac92 + + UIImgBtnSpinDownOutUUID + + Comment + + Persist + 0 + Type + String + Value + b6d240dd-5602-426f-b606-bbb49a30726d + + UIImgBtnSpinUpInUUID + + Comment + + Persist + 0 + Type + String + Value + c8450082-96a0-4319-8090-d3ff900b4954 + + UIImgBtnSpinUpOutUUID + + Comment + + Persist + 0 + Type + String + Value + 56576e6e-6710-4e66-89f9-471b59122794 + + UIImgBtnTabBottomInUUID + + Comment + + Persist + 0 + Type + String + Value + c001d8fd-a869-4b6f-86a1-fdcb106df9c7 + + UIImgBtnTabBottomOutUUID + + Comment + + Persist + 0 + Type + String + Value + bf0a8779-689b-48c3-bb9a-6af546366ef4 + + UIImgBtnTabBottomPartialInUUID + + Comment + + Persist + 0 + Type + String + Value + eb0b0904-8c91-4f24-b500-1180b91140de + + UIImgBtnTabBottomPartialOutUUID + + Comment + + Persist + 0 + Type + String + Value + 8dca716c-b29c-403a-9886-91c028357d6e + + UIImgBtnTabTopInUUID + + Comment + + Persist + 0 + Type + String + Value + 16d032e8-817b-4368-8a4e-b7b947ae3889 + + UIImgBtnTabTopOutUUID + + Comment + + Persist + 0 + Type + String + Value + 1ed83f57-41cf-4052-a3b4-2e8bb78d8191 + + UIImgBtnTabTopPartialInUUID + + Comment + + Persist + 0 + Type + String + Value + 7c6c6c26-0e25-4438-89bd-30d8b8e9d704 + + UIImgBtnTabTopPartialOutUUID + + Comment + + Persist + 0 + Type + String + Value + 932ad585-0e45-4a57-aa23-4cf81beeb7b0 + + UIImgBtnTearOffActiveUUID + + Comment + + Persist + 0 + Type + String + Value + 74e1a96f-4833-a24d-a1bb-1bce1468b0e7 + + UIImgBtnTearOffInactiveUUID + + Comment + + Persist + 0 + Type + String + Value + 74e1a96f-4833-a24d-a1bb-1bce1468b0e7 + + UIImgBtnTearOffPressedUUID + + Comment + + Persist + 0 + Type + String + Value + d2524c13-4ba6-af7c-e305-8ac6cc18d86a + + UIImgCheckboxActiveSelectedUUID + + Comment + + Persist + 0 + Type + String + Value + cf4a2ed7-1533-4686-9dde-df9a37ddca55 + + UIImgCheckboxActiveUUID + + Comment + + Persist + 0 + Type + String + Value + 05bb64ee-96fd-4243-b74e-f40a41bc53ba + + UIImgCheckboxInactiveSelectedUUID + + Comment + + Persist + 0 + Type + String + Value + c817c642-9abd-4236-9287-ae0513fe7d2b + + UIImgCheckboxInactiveUUID + + Comment + + Persist + 0 + Type + String + Value + 7d94cb59-32a2-49bf-a516-9e5a2045f9d9 + + UIImgCreateSelectedUUID + + Comment + + Persist + 0 + Type + String + Value + 0098b015-3daf-4cfe-a72f-915369ea97c2 + + UIImgCreateUUID + + Comment + + Persist + 0 + Type + String + Value + 7a0b1bdb-b5d9-4df5-bac2-ba230da93b5b + + UIImgCrosshairsUUID + + Comment + Image to use for crosshair display (UUID texture reference) + Persist + 1 + Type + String + Value + 6e1a3980-bf2d-4274-8970-91e60d85fb52 + + UIImgDefaultEyesUUID + + Comment + + Persist + 0 + Type + String + Value + 6522e74d-1660-4e7f-b601-6f48c1659a77 + + UIImgDefaultGlovesUUID + + Comment + + Persist + 0 + Type + String + Value + 5748decc-f629-461c-9a36-a35a221fe21f + + UIImgDefaultHairUUID + + Comment + + Persist + 0 + Type + String + Value + 7ca39b4c-bd19-4699-aff7-f93fd03d3e7b + + UIImgDefaultJacketUUID + + Comment + + Persist + 0 + Type + String + Value + 5748decc-f629-461c-9a36-a35a221fe21f + + UIImgDefaultPantsUUID + + Comment + + Persist + 0 + Type + String + Value + 5748decc-f629-461c-9a36-a35a221fe21f + + UIImgDefaultShirtUUID + + Comment + + Persist + 0 + Type + String + Value + 5748decc-f629-461c-9a36-a35a221fe21f + + UIImgDefaultShoesUUID + + Comment + + Persist + 0 + Type + String + Value + 5748decc-f629-461c-9a36-a35a221fe21f + + UIImgDefaultSkirtUUID + + Comment + + Persist + 0 + Type + String + Value + 5748decc-f629-461c-9a36-a35a221fe21f + + UIImgDefaultSocksUUID + + Comment + + Persist + 0 + Type + String + Value + 5748decc-f629-461c-9a36-a35a221fe21f + + UIImgDefaultUnderwearUUID + + Comment + + Persist + 0 + Type + String + Value + 5748decc-f629-461c-9a36-a35a221fe21f + + UIImgDirectionArrowUUID + + Comment + + Persist + 0 + Type + String + Value + 586383e8-4d9b-4fba-9196-2b5938e79c2c + + UIImgFaceSelectedUUID + + Comment + + Persist + 0 + Type + String + Value + b4870163-6208-42a9-9801-93133bf9a6cd + + UIImgFaceUUID + + Comment + + Persist + 0 + Type + String + Value + ce15fd63-b0b6-463c-a37d-ea6393208b3e + + UIImgFocusSelectedUUID + + Comment + + Persist + 0 + Type + String + Value + ab6a730e-ddfd-4982-9a32-c6de3de6d31d + + UIImgFocusUUID + + Comment + + Persist + 0 + Type + String + Value + 57bc39d1-288c-4519-aea6-6d1786a5c274 + + UIImgGrabSelectedUUID + + Comment + + Persist + 0 + Type + String + Value + c1e21504-f136-451d-b8e9-929037812f1d + + UIImgGrabUUID + + Comment + + Persist + 0 + Type + String + Value + c63f124c-6340-4fbf-b59e-0869a44adb64 + + UIImgMoveSelectedUUID + + Comment + + Persist + 0 + Type + String + Value + 46f17c7b-8381-48c3-b628-6a406e060dd6 + + UIImgMoveUUID + + Comment + + Persist + 0 + Type + String + Value + 2fa5dc06-bcdd-4e09-a426-f9f262d4fa65 + + UIImgRadioActiveSelectedUUID + + Comment + + Persist + 0 + Type + String + Value + 52f09e07-5816-4052-953c-94c6c10479b7 + + UIImgRadioActiveUUID + + Comment + + Persist + 0 + Type + String + Value + 7a1ba9b8-1047-4d1e-9cfc-bc478c80b63f + + UIImgRadioInactiveSelectedUUID + + Comment + + Persist + 0 + Type + String + Value + 1975db39-aa29-4251-aea0-409ac09d414d + + UIImgRadioInactiveUUID + + Comment + + Persist + 0 + Type + String + Value + 90688481-67ff-4af0-be69-4aa084bcad1e + + UIImgResizeBottomRightUUID + + Comment + + Persist + 0 + Type + String + Value + e3690e25-9690-4f6c-a745-e7dcd885285a + + UIImgRotateSelectedUUID + + Comment + + Persist + 0 + Type + String + Value + cdfb7fde-0d13-418a-9d89-2bd91019fc95 + + UIImgRotateUUID + + Comment + + Persist + 0 + Type + String + Value + c34b1eaa-aae3-4351-b082-e26c0b636779 + + UIImgScaleSelectedUUID + + Comment + + Persist + 0 + Type + String + Value + 55aa57ef-508a-47f7-8867-85d21c5a810d + + UIImgScaleUUID + + Comment + + Persist + 0 + Type + String + Value + 88a90fef-b448-4883-9344-ecf378a60433 + + UIImgWhiteUUID + + Comment + + Persist + 0 + Type + String + Value + 5748decc-f629-461c-9a36-a35a221fe21f + + UIScaleFactor + + Comment + Size of UI relative to default layout on 1024x768 screen + Persist + 1 + Type + F32 + Value + 1 + + UISndAlert + + Comment + Sound file for alerts (uuid for sound asset) + Persist + 1 + Type + String + Value + ed124764-705d-d497-167a-182cd9fa2e6c + + UISndBadKeystroke + + Comment + Sound file for invalid keystroke (uuid for sound asset) + Persist + 1 + Type + String + Value + 2ca849ba-2885-4bc3-90ef-d4987a5b983a + + UISndClick + + Comment + Sound file for mouse click (uuid for sound asset) + Persist + 1 + Type + String + Value + 4c8c3c77-de8d-bde2-b9b8-32635e0fd4a6 + + UISndClickRelease + + Comment + Sound file for mouse button release (uuid for sound asset) + Persist + 1 + Type + String + Value + 4c8c3c77-de8d-bde2-b9b8-32635e0fd4a6 + + UISndDebugSpamToggle + + Comment + Log UI sound effects as they are played + Persist + 1 + Type + Boolean + Value + 0 + + UISndHealthReductionF + + Comment + Sound file for female pain (uuid for sound asset) + Persist + 1 + Type + String + Value + 219c5d93-6c09-31c5-fb3f-c5fe7495c115 + + UISndHealthReductionM + + Comment + Sound file for male pain (uuid for sound asset) + Persist + 1 + Type + String + Value + e057c244-5768-1056-c37e-1537454eeb62 + + UISndHealthReductionThreshold + + Comment + Amount of health reduction required to trigger "pain" sound + Persist + 1 + Type + F32 + Value + 10 + + UISndInvalidOp + + Comment + Sound file for invalid operations (uuid for sound asset) + Persist + 1 + Type + String + Value + 4174f859-0d3d-c517-c424-72923dc21f65 + + UISndMoneyChangeDown + + Comment + Sound file for L$ balance increase (uuid for sound asset) + Persist + 1 + Type + String + Value + 104974e3-dfda-428b-99ee-b0d4e748d3a3 + + UISndMoneyChangeThreshold + + Comment + Amount of change in L$ balance required to trigger "money" sound + Persist + 1 + Type + F32 + Value + 50 + + UISndMoneyChangeUp + + Comment + Sound file for L$ balance decrease(uuid for sound asset) + Persist + 1 + Type + String + Value + 77a018af-098e-c037-51a6-178f05877c6f + + UISndNewIncomingIMSession + + Comment + Sound file for new instant message session(uuid for sound asset) + Persist + 1 + Type + String + Value + 67cc2844-00f3-2b3c-b991-6418d01e1bb7 + + UISndObjectCreate + + Comment + Sound file for object creation (uuid for sound asset) + Persist + 1 + Type + String + Value + f4a0660f-5446-dea2-80b7-6482a082803c + + UISndObjectDelete + + Comment + Sound file for object deletion (uuid for sound asset) + Persist + 1 + Type + String + Value + 0cb7b00a-4c10-6948-84de-a93c09af2ba9 + + UISndObjectRezIn + + Comment + Sound file for rezzing objects (uuid for sound asset) + Persist + 1 + Type + String + Value + 3c8fc726-1fd6-862d-fa01-16c5b2568db6 + + UISndObjectRezOut + + Comment + Sound file for derezzing objects (uuid for sound asset) + Persist + 1 + Type + String + Value + 00000000-0000-0000-0000-000000000000 + + UISndPieMenuAppear + + Comment + Sound file for opening pie menu (uuid for sound asset) + Persist + 1 + Type + String + Value + 8eaed61f-92ff-6485-de83-4dcc938a478e + + UISndPieMenuHide + + Comment + Sound file for closing pie menu (uuid for sound asset) + Persist + 1 + Type + String + Value + 00000000-0000-0000-0000-000000000000 + + UISndPieMenuSliceHighlight0 + + Comment + Sound file for selecting pie menu item 0 (uuid for sound asset) + Persist + 1 + Type + String + Value + d9f73cf8-17b4-6f7a-1565-7951226c305d + + UISndPieMenuSliceHighlight1 + + Comment + Sound file for selecting pie menu item 1 (uuid for sound asset) + Persist + 1 + Type + String + Value + f6ba9816-dcaf-f755-7b67-51b31b6233e5 + + UISndPieMenuSliceHighlight2 + + Comment + Sound file for selecting pie menu item 2 (uuid for sound asset) + Persist + 1 + Type + String + Value + 7aff2265-d05b-8b72-63c7-dbf96dc2f21f + + UISndPieMenuSliceHighlight3 + + Comment + Sound file for selecting pie menu item 3 (uuid for sound asset) + Persist + 1 + Type + String + Value + 09b2184e-8601-44e2-afbb-ce37434b8ba1 + + UISndPieMenuSliceHighlight4 + + Comment + Sound file for selecting pie menu item 4 (uuid for sound asset) + Persist + 1 + Type + String + Value + bbe4c7fc-7044-b05e-7b89-36924a67593c + + UISndPieMenuSliceHighlight5 + + Comment + Sound file for selecting pie menu item 5 (uuid for sound asset) + Persist + 1 + Type + String + Value + d166039b-b4f5-c2ec-4911-c85c727b016c + + UISndPieMenuSliceHighlight6 + + Comment + Sound file for selecting pie menu item 6 (uuid for sound asset) + Persist + 1 + Type + String + Value + 242af82b-43c2-9a3b-e108-3b0c7e384981 + + UISndPieMenuSliceHighlight7 + + Comment + Sound file for selecting pie menu item 7 (uuid for sound asset) + Persist + 1 + Type + String + Value + c1f334fb-a5be-8fe7-22b3-29631c21cf0b + + UISndSnapshot + + Comment + Sound file for taking a snapshot (uuid for sound asset) + Persist + 1 + Type + String + Value + 3d09f582-3851-c0e0-f5ba-277ac5c73fb4 + + UISndStartIM + + Comment + Sound file for starting a new IM session (uuid for sound asset) + Persist + 1 + Type + String + Value + c825dfbc-9827-7e02-6507-3713d18916c1 + + UISndTeleportOut + + Comment + Sound file for teleporting (uuid for sound asset) + Persist + 1 + Type + String + Value + d7a9a565-a013-2a69-797d-5332baa1a947 + + UISndTyping + + Comment + Sound file for starting to type a chat message (uuid for sound asset) + Persist + 1 + Type + String + Value + 5e191c7b-8996-9ced-a177-b2ac32bfea06 + + UISndWindowClose + + Comment + Sound file for closing a window (uuid for sound asset) + Persist + 1 + Type + String + Value + 2c346eda-b60c-ab33-1119-b8941916a499 + + UISndWindowOpen + + Comment + Sound file for opening a window (uuid for sound asset) + Persist + 1 + Type + String + Value + c80260ba-41fd-8a46-768a-6bf236360e3a + + UseAltKeyForMenus + + Comment + Access menus via keyboard by tapping Alt + Persist + 1 + Type + Boolean + Value + 0 + + UseChatBubbles + + Comment + Show chat above avatars head in chat bubbles + Persist + 1 + Type + Boolean + Value + 0 + + UseDebugLogin + + Comment + Provides extra control over which grid to connect to + Persist + 1 + Type + Boolean + Value + 0 + + UseDebugMenus + + Comment + Turns on "Debug" menu + Persist + 1 + Type + Boolean + Value + 0 + + UseDefaultColorPicker + + Comment + Use color picker supplied by operating system + Persist + 1 + Type + Boolean + Value + 0 + + UseEnergy + + Comment + + Persist + 0 + Type + Boolean + Value + 1 + + UseExternalBrowser + + Comment + Use default browser when opening web pages instead of in-world browser. + Persist + 1 + Type + Boolean + Value + 0 + + UseFreezeFrame + + Comment + Freeze time when taking snapshots. + Persist + 1 + Type + Boolean + Value + 0 + + UseOcclusion + + Comment + Enable object culling based on occlusion (coverage) by other objects + Persist + 1 + Type + Boolean + Value + 1 + + UseWebPagesOnPrims + + Comment + [NOT USED] + Persist + 1 + Type + Boolean + Value + 0 + + UserConnectionPort + + Comment + Port that this client transmits on. + Persist + 1 + Type + U32 + Value + 0 + + UserLogFile + + Comment + User specified log file name. + Persist + 1 + Type + String + Value + + + UserLoginInfo + + Comment + Users loging data. + Persist + 1 + Type + LLSD + Value + + + UserSettingsFile + + Comment + Persisted client settings file name (per user). + Persist + 0 + Type + String + Value + + + VFSOldSize + + Comment + [DO NOT MODIFY] Controls resizing of local file cache + Persist + 1 + Type + U32 + Value + 0 + + VFSSalt + + Comment + [DO NOT MODIFY] Controls local file caching behavior + Persist + 1 + Type + U32 + Value + 1 + + VectorizeEnable + + Comment + Enable general vector operations and data alignment. + Persist + 1 + Type + Boolean + Value + 0 + + VectorizePerfTest + + Comment + Test SSE/vectorization performance and choose fastest version. + Persist + 1 + Type + Boolean + Value + 1 + + VectorizeProcessor + + Comment + 0=Compiler Default, 1=SSE, 2=SSE2, autodetected + Persist + 0 + Type + U32 + Value + 0 + + VectorizeSkin + + Comment + Enable vector operations for avatar skinning. + Persist + 1 + Type + Boolean + Value + 1 + + VelocityInterpolate + + Comment + Extrapolate object motion from last packet based on received velocity + Persist + 1 + Type + Boolean + Value + 1 + + VerboseLogs + + Comment + Display source file and line number for each log item for debugging purposes + Persist + 1 + Type + Boolean + Value + 0 + + VersionChannelName + + Comment + Versioning Channel Name. + Persist + 1 + Type + String + Value + Second Life Release + + VertexShaderEnable + + Comment + Enable/disable all GLSL shaders (debug) + Persist + 1 + Type + Boolean + Value + 0 + + VivoxDebugLevel + + Comment + Logging level to use when launching the vivox daemon + Persist + 1 + Type + String + Value + -1 + + VivoxDebugServerName + + Comment + Hostname of the vivox account server to use for voice when not connected to Agni. + Persist + 1 + Type + String + Value + bhd.vivox.com + + VoiceCallsFriendsOnly + + Comment + Only accept voice calls from residents on your friends list + Persist + 1 + Type + Boolean + Value + 0 + + VoiceEarLocation + + Comment + Location of the virtual ear for voice + Persist + 1 + Type + S32 + Value + 0 + + VoiceHost + + Comment + Client SLVoice host to connect to + Persist + 1 + Type + String + Value + 127.0.0.1 + + VoiceImageLevel0 + + Comment + Texture UUID for voice image level 0 + Persist + 1 + Type + String + Value + 041ee5a0-cb6a-9ac5-6e49-41e9320507d5 + + VoiceImageLevel1 + + Comment + Texture UUID for voice image level 1 + Persist + 1 + Type + String + Value + 29de489d-0491-fb00-7dab-f9e686d31e83 + + VoiceImageLevel2 + + Comment + Texture UUID for voice image level 2 + Persist + 1 + Type + String + Value + 29de489d-0491-fb00-7dab-f9e686d31e83 + + VoiceImageLevel3 + + Comment + Texture UUID for voice image level 3 + Persist + 1 + Type + String + Value + 29de489d-0491-fb00-7dab-f9e686d31e83 + + VoiceImageLevel4 + + Comment + Texture UUID for voice image level 4 + Persist + 1 + Type + String + Value + 29de489d-0491-fb00-7dab-f9e686d31e83 + + VoiceImageLevel5 + + Comment + Texture UUID for voice image level 5 + Persist + 1 + Type + String + Value + 29de489d-0491-fb00-7dab-f9e686d31e83 + + VoiceImageLevel6 + + Comment + Texture UUID for voice image level 6 + Persist + 1 + Type + String + Value + 29de489d-0491-fb00-7dab-f9e686d31e83 + + VoiceInputAudioDevice + + Comment + Audio input device to use for voice + Persist + 1 + Type + String + Value + Default + + VoiceOutputAudioDevice + + Comment + Audio output device to use for voice + Persist + 1 + Type + String + Value + Default + + VoicePort + + Comment + Client SLVoice port to connect to + Persist + 1 + Type + U32 + Value + 44124 + + WarnAboutBadPCI + + Comment + Enables AboutBadPCI warning dialog + Persist + 1 + Type + Boolean + Value + 1 + + WarnAboutDirectX9 + + Comment + Enables AboutDirectX9 warning dialog + Persist + 1 + Type + Boolean + Value + 1 + + WarnAboutOldGraphicsDriver + + Comment + Enables AboutOldGraphicsDriver warning dialog + Persist + 1 + Type + Boolean + Value + 1 + + WarnAboutPCIGraphics + + Comment + Enables AboutPCIGraphics warning dialog + Persist + 1 + Type + Boolean + Value + 1 + + WarnBrowserLaunch + + Comment + Enables BrowserLaunch warning dialog + Persist + 1 + Type + Boolean + Value + 1 + + WarnDeedObject + + Comment + Enables DeedObject warning dialog + Persist + 1 + Type + Boolean + Value + 1 + + WarnFirstAppearance + + Comment + Enables FirstAppearance warning dialog + Persist + 1 + Type + Boolean + Value + 1 + + WarnFirstAttach + + Comment + Enables FirstAttach warning dialog + Persist + 1 + Type + Boolean + Value + 1 + + WarnFirstBalanceDecrease + + Comment + Enables FirstBalanceDecrease warning dialog + Persist + 1 + Type + Boolean + Value + 1 + + WarnFirstBalanceIncrease + + Comment + Enables FirstBalanceIncrease warning dialog + Persist + 1 + Type + Boolean + Value + 1 + + WarnFirstBuild + + Comment + Enables FirstBuild warning dialog + Persist + 1 + Type + Boolean + Value + 1 + + WarnFirstDebugMenus + + Comment + Enables FirstDebugMenus warning dialog + Persist + 1 + Type + Boolean + Value + 1 + + WarnFirstFlexible + + Comment + Enables FirstFlexible warning dialog + Persist + 1 + Type + Boolean + Value + 1 + + WarnFirstGoTo + + Comment + Enables FirstGoTo warning dialog + Persist + 1 + Type + Boolean + Value + 1 + + WarnFirstInventory + + Comment + Enables FirstInventory warning dialog + Persist + 1 + Type + Boolean + Value + 1 + + WarnFirstLeftClickNoHit + + Comment + Enables FirstLeftClickNoHit warning dialog + Persist + 1 + Type + Boolean + Value + 1 + + WarnFirstMap + + Comment + Enables FirstMap warning dialog + Persist + 1 + Type + Boolean + Value + 1 + + WarnFirstOverrideKeys + + Comment + Enables FirstOverrideKeys warning dialog + Persist + 1 + Type + Boolean + Value + 1 + + WarnFirstSandbox + + Comment + Enables FirstSandbox warning dialog + Persist + 1 + Type + Boolean + Value + 1 + + WarnFirstSculptedPrim + + Comment + Enables FirstSculptedPrim warning dialog + Persist + 1 + Type + Boolean + Value + 1 + + WarnFirstSit + + Comment + Enables FirstSit warning dialog + Persist + 1 + Type + Boolean + Value + 1 + + WarnFirstStreamingMusic + + Comment + Enables FirstStreamingMusic warning dialog + Persist + 1 + Type + Boolean + Value + 1 + + WarnFirstStreamingVideo + + Comment + Enables FirstStreamingVideo warning dialog + Persist + 1 + Type + Boolean + Value + 1 + + WarnFirstTeleport + + Comment + Enables FirstTeleport warning dialog + Persist + 1 + Type + Boolean + Value + 1 + + WarnFirstVoice + + Comment + Enables FirstVoice warning dialog + Persist + 1 + Type + Boolean + Value + 1 + + WarnNewClassified + + Comment + Enables NewClassified warning dialog + Persist + 1 + Type + Boolean + Value + 1 + + WarnQuickTimeInstalled + + Comment + Enables QuickTimeInstalled warning dialog + Persist + 1 + Type + Boolean + Value + 1 + + WarnReturnToOwner + + Comment + Enables ReturnToOwner warning dialog + Persist + 1 + Type + Boolean + Value + 1 + + WindLightUseAtmosShaders + + Comment + Whether to enable or disable WindLight atmospheric shaders. + Persist + 1 + Type + Boolean + Value + 1 + + WindowHeight + + Comment + SL viewer window height + Persist + 1 + Type + S32 + Value + 700 + + WindowMaximized + + Comment + SL viewer window maximized on login + Persist + 1 + Type + Boolean + Value + 1 + + WindowWidth + + Comment + SL viewer window width + Persist + 1 + Type + S32 + Value + 1000 + + WindowX + + Comment + X coordinate of lower left corner of SL viewer window, relative to primary display (pixels) + Persist + 1 + Type + S32 + Value + 10 + + WindowY + + Comment + Y coordinate of lower left corner of SL viewer window, relative to primary display (pixels) + Persist + 1 + Type + S32 + Value + 10 + + WLSkyDetail + + Comment + Controls vertex detail on the WindLight sky. Lower numbers will give better performance and uglier skies. + Persist + 1 + Type + U32 + Value + 64 + + XferThrottle + + Comment + Maximum allowable downstream bandwidth for asset transfers (bits per second) + Persist + 1 + Type + F32 + Value + 150000 + + YawFromMousePosition + + Comment + Horizontal range over which avatar head tracks mouse position (degrees of head rotation from left of window to right) + Persist + 1 + Type + F32 + Value + 90 + + YieldTime + + Comment + Yield some time to the local host. + Persist + 1 + Type + S32 + Value + -1 + + ZoomTime + + Comment + Time of transition between different camera modes (seconds) + Persist + 1 + Type + F32 + Value + 0.4000000059604644775390625 + + llOwnerSayChatColor + + Comment + Color of chat messages from objects only visible to the owner + Persist + 1 + Type + Color4 + Value + + 0.9900000095367431640625 + 0.9900000095367431640625 + 0.689999997615814208984375 + 1 + + + ParcelMediaAutoPlayEnable + + Comment + Auto play parcel media when available + Persist + 1 + Type + Boolean + Value + 0 + + particlesbeacon + + Comment + Beacon / Highlight particle generators + Persist + 1 + Type + Boolean + Value + 0 + + physicalbeacon + + Comment + Beacon / Highlight physical objects + Persist + 1 + Type + Boolean + Value + 1 + + renderbeacons + + Comment + Beacon / Highlight particle generators + Persist + 1 + Type + Boolean + Value + 0 + + renderhighlights + + Comment + Beacon / Highlight scripted objects with touch function + Persist + 1 + Type + Boolean + Value + 1 + + scriptsbeacon + + Comment + Beacon / Highlight scripted objects + Persist + 1 + Type + Boolean + Value + 0 + + scripttouchbeacon + + Comment + Beacon / Highlight scripted objects with touch function + Persist + 1 + Type + Boolean + Value + 1 + + soundsbeacon + + Comment + Beacon / Highlight sound generators + Persist + 1 + Type + Boolean + Value + 0 + + SkyEditPresets + + Comment + Whether to be able to edit the sky defaults or not + Persist + 1 + Type + Boolean + Value + 0 + + WaterGLFogDepthFloor + + Comment + Controls how dark water gl fog can get + Persist + 1 + Type + F32 + Value + 0.25 + + WaterGLFogDepthScale + + Comment + Controls how quickly gl fog gets dark under water + Persist + 1 + Type + F32 + Value + 50.0 + + WaterGLFogDensityScale + + Comment + Maps shader water fog density to gl fog density + Persist + 1 + Type + F32 + Value + 0.02 + + EnableRippleWater + + Comment + Whether to use ripple water shader or not + Persist + 1 + Type + Boolean + Value + 1 + + WaterEditPresets + + Comment + Whether to be able to edit the water defaults or not + Persist + 1 + Type + Boolean + Value + 0 + + FloaterEnvRect + + Comment + Rectangle for Environment Editor + Persist + 1 + Type + Rect + Value + + 50 + 150 + 650 + 0 + + + FloaterAdvancedSkyRect + + Comment + Rectangle for Advanced Sky Editor + Persist + 1 + Type + Rect + Value + + 50 + 220 + 450 + 0 + + + FloaterDayCycleRect + + Comment + Rectangle for Day Cycle Editor + Persist + 1 + Type + Rect + Value + + 50 + 450 + 300 + 0 + + + FloaterAdvancedWaterRect + + Comment + Rectangle for Advanced Water Editor + Persist + 1 + Type + Rect + Value + + 50 + 220 + 450 + 0 + + + AlertedUnsupportedHardware + + Comment + Toggle that lets us tell the user he's on old hardware only once + Persist + 1 + Type + Boolean + Value + 0 + + RenderFastAlpha + + Comment + Use lossy alpha rendering optimization (opaque/nonexistent small alpha faces). + Persist + 1 + Type + Boolean + Value + 1 + + + diff --git a/indra/newview/app_settings/settings_crash_behavior.xml b/indra/newview/app_settings/settings_crash_behavior.xml new file mode 100644 index 0000000000..cc7f5ac88b --- /dev/null +++ b/indra/newview/app_settings/settings_crash_behavior.xml @@ -0,0 +1,15 @@ + + + CrashSubmitBehavior + + Comment + Controls behavior when viewer crashes (0 = ask before sending crash report, 1 = always send crash report, 2 = never send crash report) + Persist + 1 + Type + S32 + Value + 0 + + + diff --git a/indra/newview/app_settings/settings_files.xml b/indra/newview/app_settings/settings_files.xml new file mode 100644 index 0000000000..997bb0c33c --- /dev/null +++ b/indra/newview/app_settings/settings_files.xml @@ -0,0 +1,22 @@ + + + Files + + Comment + List of settings files to load. Key is the identifier, value is the filename + Persist + 0 + Type + LLSD + Value + + Global + settings.xml + PerAccount + settings_per_account.xml + CrashSettings + settings_crash_behavior.xml + + + + diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml new file mode 100644 index 0000000000..90c7b11637 --- /dev/null +++ b/indra/newview/app_settings/settings_per_account.xml @@ -0,0 +1,114 @@ + + + BusyModeResponse + + Comment + Auto response to instant messages while in busy mode. + Persist + 1 + Type + String + Value + The Resident you messaged is in 'busy mode' which means they have requested not to be disturbed. Your message will still be shown in their IM panel for later viewing. + + IMLogTimestamp + + Comment + Log Timestamp of Instant Messages + Persist + 1 + Type + Boolean + Value + 1 + + InstantMessageLogPath + + Comment + Path to your log files. + Persist + 1 + Type + String + Value + + + LastLogoff + + Comment + Last logoff + Persist + 1 + Type + U32 + Value + 0 + + LogChat + + Comment + Log Chat + Persist + 1 + Type + Boolean + Value + 0 + + LogChatIM + + Comment + Log Incoming Instant Messages with Chat + Persist + 1 + Type + Boolean + Value + 0 + + LogChatTimestamp + + Comment + Log Timestamp of Chat + Persist + 1 + Type + Boolean + Value + 0 + + LogInstantMessages + + Comment + Log Instant Messages + Persist + 1 + Type + Boolean + Value + 1 + + LogShowHistory + + Comment + Log Show History + Persist + 1 + Type + Boolean + Value + 1 + + LogTimestampDate + + Comment + Include Date with Timestamp + Persist + 1 + Type + Boolean + Value + 1 + + + diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 420f0811ff..2fe23c9a51 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -917,19 +917,19 @@ Function .onInit ; generate language ID that will be used as a command line arg StrCmp $LANGUAGE "1042" 0 +3 - StrCpy $LANGFLAGS " -set SystemLanguage ko" + StrCpy $LANGFLAGS " --set SystemLanguage ko" Goto EndOfFunc StrCmp $LANGUAGE "1041" 0 +3 - StrCpy $LANGFLAGS " -set SystemLanguage ja" + StrCpy $LANGFLAGS " --set SystemLanguage ja" Goto EndOfFunc StrCmp $LANGUAGE "1031" 0 +3 - StrCpy $LANGFLAGS " -set SystemLanguage de" + StrCpy $LANGFLAGS " --set SystemLanguage de" Goto EndOfFunc StrCmp $LANGUAGE "1033" 0 +3 - StrCpy $LANGFLAGS " -set SystemLanguage en-us" + StrCpy $LANGFLAGS " --set SystemLanguage en-us" Goto EndOfFunc EndOfFunc: diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index ac92ee8525..4dab653d19 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -273,8 +273,7 @@ void LLAgentFriendObserver::changed(U32 mask) // LLAgent() //----------------------------------------------------------------------------- LLAgent::LLAgent() -: mViewerPort(NET_USE_OS_ASSIGNED_PORT), - mDrawDistance( DEFAULT_FAR_PLANE ), +: mDrawDistance( DEFAULT_FAR_PLANE ), mDoubleTapRunTimer(), mDoubleTapRunMode(DOUBLETAP_NONE), @@ -455,8 +454,6 @@ void LLAgent::init() mTrackFocusObject = gSavedSettings.getBOOL("TrackFocusObject"); // LLDebugVarMessageBox::show("Camera Lag", &CAMERA_FOCUS_HALF_LIFE, 0.5f, 0.01f); - gSavedSettings.getControl("RenderHideGroupTitle")->addListener(&mHideGroupTitleListener); - gSavedSettings.getControl("EffectColor")->addListener(&mEffectColorListener); mEffectColor = gSavedSettings.getColor4("EffectColor"); @@ -7466,19 +7463,6 @@ void LLAgent::userRemoveAllAttachments( void* userdata ) gMessageSystem->sendReliable( gAgent.getRegionHost() ); } -bool LLAgent::LLHideGroupTitleListener::handleEvent(LLPointer event, const LLSD &userdata) -{ - gAgent.setHideGroupTitle(event->getValue()); - return true; - -} - -bool LLAgent::LLEffectColorListener::handleEvent(LLPointer event, const LLSD &userdata) -{ - gAgent.setEffectColor(LLColor4(event->getValue())); - return true; -} - void LLAgent::observeFriends() { if(!mFriendObserver) diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 469d2e4fe0..50830a75f0 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -36,6 +36,7 @@ #include "indra_constants.h" #include "llmath.h" +#include "llcontrol.h" #include "llcoordframe.h" #include "llevent.h" #include "llagentconstants.h" @@ -225,8 +226,8 @@ public: // update internal datastructures and update the server with the // new contribution level. Returns true if the group id was found // and contribution could be set. - BOOL setGroupContribution(const LLUUID& group_id, S32 contribution); - BOOL setUserGroupFlags(const LLUUID& group_id, BOOL accept_notices, BOOL list_in_profile); + BOOL setGroupContribution(const LLUUID& group_id, S32 contribution); + BOOL setUserGroupFlags(const LLUUID& group_id, BOOL accept_notices, BOOL list_in_profile); void setHideGroupTitle(BOOL hide) { mHideGroupTitle = hide; } // @@ -686,7 +687,6 @@ protected: BOOL notify = TRUE); public: // TODO: Make these private! - U32 mViewerPort; // Port this agent transmits on. LLUUID mSecureSessionID; // secure token for this login session F32 mDrawDistance; @@ -932,21 +932,6 @@ private: LLPointer mCB; }; - //control listeners - class LLHideGroupTitleListener: public LLSimpleListener - { - public: - bool handleEvent(LLPointer event, const LLSD &userdata); - }; - - class LLEffectColorListener: public LLSimpleListener - { - public: - bool handleEvent(LLPointer event, const LLSD &userdata); - }; - - LLHideGroupTitleListener mHideGroupTitleListener; - LLEffectColorListener mEffectColorListener; LLFriendObserver* mFriendObserver; }; diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 04daf7ceb7..0e2d28400d 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -62,10 +62,13 @@ #include "llmutelist.h" #include "llurldispatcher.h" #include "llurlhistory.h" +#include "llfirstuse.h" #include "llweb.h" #include "llsecondlifeurls.h" +#include + #if LL_WINDOWS #include "llwindebug.h" #endif @@ -153,10 +156,7 @@ #include "llinventoryview.h" -// *FIX: Remove these once the command line params thing is figured out. -// Yuck! -static int gTempArgC = 0; -static char** gTempArgV; +#include "llcommandlineparser.h" // *FIX: These extern globals should be cleaned up. // The globals either represent state/config/resource-storage of either @@ -169,7 +169,6 @@ static char** gTempArgV; //---------------------------------------------------------------------------- // llviewernetwork.h #include "llviewernetwork.h" -// extern EGridInfo gGridChoice; ////// Windows-specific includes to the bottom - nasty defines in these pollute the preprocessor @@ -216,14 +215,8 @@ extern BOOL gPeriodicSlowFrame; //////////////////////////////////////////////////////////// // All from the last globals push... -bool gVerifySSLCert = true; BOOL gHandleKeysAsync = FALSE; -BOOL gProbeHardware = TRUE; // Use DirectX 9 to probe for hardware - -S32 gYieldMS = 0; // set in parse_args, used in mainLoop -BOOL gYieldTime = FALSE; - const F32 DEFAULT_AFK_TIMEOUT = 5.f * 60.f; // time with no input before user flagged as Away From Keyboard F32 gSimLastTime; // Used in LLAppViewer::init and send_stats() @@ -234,21 +227,10 @@ LLString gDisabledMessage; // Set in LLAppViewer::initConfiguration used in idle BOOL gHideLinks = FALSE; // Set in LLAppViewer::initConfiguration, used externally BOOL gAllowIdleAFK = TRUE; -F32 gAFKTimeout = DEFAULT_AFK_TIMEOUT; BOOL gShowObjectUpdates = FALSE; -BOOL gLogMessages = FALSE; -std::string gChannelName = LL_CHANNEL; -BOOL gUseAudio = TRUE; BOOL gUseQuickTime = TRUE; -LLString gCmdLineFirstName; -LLString gCmdLineLastName; -LLString gCmdLinePassword; - -BOOL gAutoLogin = FALSE; const char* DEFAULT_SETTINGS_FILE = "settings.xml"; -BOOL gRequestInventoryLibrary = TRUE; -BOOL gGodConnect = FALSE; BOOL gAcceptTOS = FALSE; BOOL gAcceptCriticalMessage = FALSE; @@ -278,7 +260,6 @@ F32 gLogoutMaxTime = LOGOUT_REQUEST_TIME; LLUUID gInventoryLibraryOwner; LLUUID gInventoryLibraryRoot; -BOOL gDisableVoice = FALSE; BOOL gDisconnected = FALSE; // Map scale in pixels per region @@ -290,17 +271,11 @@ LLFrameTimer gRestoreGLTimer; BOOL gRestoreGL = FALSE; BOOL gUseWireframe = FALSE; -F32 gMouseSensitivity = 3.f; -BOOL gInvertMouse = FALSE; - // VFS globals - see llappviewer.h LLVFS* gStaticVFS = NULL; LLMemoryInfo gSysMemory; -bool gPreloadImages = true; -bool gPreloadSounds = true; - LLString gLastVersionChannel; LLVector3 gWindVec(3.0, 3.0, 0.0); @@ -310,34 +285,14 @@ U32 gPacketsIn = 0; BOOL gPrintMessagesThisFrame = FALSE; -BOOL gUseConsole = TRUE; - BOOL gRandomizeFramerate = FALSE; BOOL gPeriodicSlowFrame = FALSE; -BOOL gQAMode = FALSE; BOOL gLLErrorActivated = FALSE; - //////////////////////////////////////////////////////////// // Internal globals... that should be removed. -static F32 gQuitAfterSeconds = 0.f; -static BOOL gRotateRight = FALSE; -static BOOL gIgnorePixelDepth = FALSE; - -// Allow multiple viewers in ReleaseForDownload -#if LL_RELEASE_FOR_DOWNLOAD -static BOOL gMultipleViewersOK = FALSE; -#else -static BOOL gMultipleViewersOK = TRUE; -#endif - -static std::map gCommandLineSettings; -static std::map gCommandLineForcedSettings; - static LLString gArgs; -static LLString gOldSettingsFileName; -static const char* LEGACY_DEFAULT_SETTINGS_FILE = "settings.ini"; const char* MARKER_FILE_NAME = "SecondLife.exec_marker"; const char* ERROR_MARKER_FILE_NAME = "SecondLife.error_marker"; const char* LLERROR_MARKER_FILE_NAME = "SecondLife.llerror_marker"; @@ -359,52 +314,10 @@ std::string gLoginPage; std::vector gLoginURIs; static std::string gHelperURI; -static const char USAGE[] = "\n" -"usage:\tviewer [options]\n" -"options:\n" -" -login log in as a user\n" -" -autologin log in as last saved user\n" -" -loginpage login authentication page to use\n" -" -loginuri login server and CGI script to use\n" -" -helperuri helper web CGI prefix to use\n" -" -settings specify the filename of a\n" -" configuration file\n" -" default is settings.xml\n" -" -setdefault specify the value of a particular\n" -" configuration variable which can be\n" -" overridden by settings.xml\n" -" -set specify the value of a particular\n" -" configuration variable that\n" -" overrides all other settings\n" -#if !LL_RELEASE_FOR_DOWNLOAD -" -sim specify the simulator ip address\n" -#endif -" -god log in as god if you have god access\n" -" -purge delete files in cache\n" -" -safe reset preferences, run in safe mode\n" -" -noutc logs in local time, not UTC\n" -" -nothread run vfs in single thread\n" -" -noinvlib Do not request inventory library\n" -" -multiple allow multiple viewers\n" -" -nomultiple block multiple viewers\n" -" -novoice disable voice\n" -" -ignorepixeldepth ignore pixel depth settings\n" -" -cooperative [ms] yield some idle time to local host\n" -" -skin ui/branding skin folder to use\n" -#if LL_WINDOWS -" -noprobe disable hardware probe\n" -#endif -" -noquicktime disable QuickTime movies, speeds startup\n" -" -nopreload don't preload UI images or sounds, speeds startup\n" -// these seem to be unused -//" -noenv turn off environmental effects\n" -//" -proxy specify the proxy ip address\n" -"\n"; - void idle_afk_check() { // check idle timers - if (gAllowIdleAFK && (gAwayTriggerTimer.getElapsedTimeF32() > gAFKTimeout)) + if (gAllowIdleAFK && (gAwayTriggerTimer.getElapsedTimeF32() > gSavedSettings.getF32("AFKTimeout"))) { gAgent.setAFK(); } @@ -443,7 +356,7 @@ void request_initial_instant_messages() // Use these strictly for things that are constructed at startup, // or for things that are performance critical. JC -static void saved_settings_to_globals() +static void settings_to_globals() { LLBUTTON_H_PAD = gSavedSettings.getS32("ButtonHPad"); LLBUTTON_V_PAD = gSavedSettings.getS32("ButtonVPad"); @@ -481,15 +394,15 @@ static void saved_settings_to_globals() gDebugWindowProc = gSavedSettings.getBOOL("DebugWindowProc"); gAllowIdleAFK = gSavedSettings.getBOOL("AllowIdleAFK"); - gAFKTimeout = gSavedSettings.getF32("AFKTimeout"); - gMouseSensitivity = gSavedSettings.getF32("MouseSensitivity"); - gInvertMouse = gSavedSettings.getBOOL("InvertMouse"); gShowObjectUpdates = gSavedSettings.getBOOL("ShowObjectUpdates"); gMapScale = gSavedSettings.getF32("MapScale"); gMiniMapScale = gSavedSettings.getF32("MiniMapScale"); gHandleKeysAsync = gSavedSettings.getBOOL("AsyncKeyboard"); LLHoverView::sShowHoverTips = gSavedSettings.getBOOL("ShowHoverTips"); +} +static void settings_modify() +{ LLRenderTarget::sUseFBO = gSavedSettings.getBOOL("RenderUseFBO"); LLVOAvatar::sUseImpostors = gSavedSettings.getBOOL("RenderUseImpostors"); LLVOSurfacePatch::sLODFactor = gSavedSettings.getF32("RenderTerrainLODFactor"); @@ -531,367 +444,74 @@ static void saved_settings_to_globals() // propagate push to talk preference to current status gSavedSettings.setBOOL("PTTCurrentlyEnabled", gSavedSettings.getBOOL("EnablePushToTalk")); - - settings_setup_listeners(); - - // gAgent.init() also loads from saved settings. } -int parse_args(int argc, char **argv) +void initGridChoice() { - // Sometimes IP addresses passed in on the command line have leading - // or trailing white space. Use LLString to clean that up. - LLString ip_string; - S32 j; - - for (j = 1; j < argc; j++) - { + LLString gridChoice = gSavedSettings.getString("GridChoice"); + if(!gridChoice.empty()) // Used to show first chunk of each argument passed in the // window title. - gArgs += argv[j]; - gArgs += " "; - - LLString argument = argv[j]; - if ((!strcmp(argv[j], "-port")) && (++j < argc)) - { - sscanf(argv[j], "%u", &(gAgent.mViewerPort)); - } - else if ((!strcmp(argv[j], "-drop")) && (++j < argc)) - { - sscanf(argv[j], "%f", &gPacketDropPercentage); - } - else if ((!strcmp(argv[j], "-inbw")) && (++j < argc)) - { - sscanf(argv[j], "%f", &gInBandwidth); - } - else if ((!strcmp(argv[j], "-outbw")) && (++j < argc)) - { - sscanf(argv[j], "%f", &gOutBandwidth); - } - else if (!strcmp(argv[j], "--aditi")) - { - gGridChoice = GRID_INFO_ADITI; - snprintf(gGridName, MAX_STRING, "%s", gGridInfo[gGridChoice].mName); // Flawfinder: ignore - } - else if (!strcmp(argv[j], "--agni")) - { - gGridChoice = GRID_INFO_AGNI; - snprintf(gGridName, MAX_STRING, "%s", gGridInfo[gGridChoice].mName); // Flawfinder: ignore - } - else if (!strcmp(argv[j], "--aruna")) - { - gGridChoice = GRID_INFO_ARUNA; - sprintf(gGridName,"%s", gGridInfo[gGridChoice].mName); - } - else if (!strcmp(argv[j], "--durga")) - { - gGridChoice = GRID_INFO_DURGA; - snprintf(gGridName, MAX_STRING, "%s", gGridInfo[gGridChoice].mName); // Flawfinder: ignore - } - else if (!strcmp(argv[j], "--ganga")) - { - gGridChoice = GRID_INFO_GANGA; - sprintf(gGridName,"%s", gGridInfo[gGridChoice].mName); - } - else if (!strcmp(argv[j], "--mitra")) - { - gGridChoice = GRID_INFO_MITRA; - sprintf(gGridName,"%s", gGridInfo[gGridChoice].mName); - } - else if (!strcmp(argv[j], "--mohini")) - { - gGridChoice = GRID_INFO_MOHINI; - sprintf(gGridName,"%s", gGridInfo[gGridChoice].mName); - } - else if (!strcmp(argv[j], "--nandi")) - { - gGridChoice = GRID_INFO_NANDI; - sprintf(gGridName,"%s", gGridInfo[gGridChoice].mName); - } - else if (!strcmp(argv[j], "--radha")) - { - gGridChoice = GRID_INFO_RADHA; - sprintf(gGridName,"%s", gGridInfo[gGridChoice].mName); - } - else if (!strcmp(argv[j], "--ravi")) - { - gGridChoice = GRID_INFO_RAVI; - sprintf(gGridName,"%s", gGridInfo[gGridChoice].mName); - } - else if (!strcmp(argv[j], "--siva")) - { - gGridChoice = GRID_INFO_SIVA; - snprintf(gGridName, MAX_STRING, "%s", gGridInfo[gGridChoice].mName); // Flawfinder: ignore - } - else if (!strcmp(argv[j], "--shakti")) - { - gGridChoice = GRID_INFO_SHAKTI; - snprintf(gGridName, MAX_STRING, "%s", gGridInfo[gGridChoice].mName); // Flawfinder: ignore - } - else if (!strcmp(argv[j], "--soma")) - { - gGridChoice = GRID_INFO_SOMA; - snprintf(gGridName, MAX_STRING, "%s", gGridInfo[gGridChoice].mName); // Flawfinder: ignore - } - else if (!strcmp(argv[j], "--uma")) - { - gGridChoice = GRID_INFO_UMA; - sprintf(gGridName,"%s", gGridInfo[gGridChoice].mName); - } - else if (!strcmp(argv[j], "--vaak")) - { - gGridChoice = GRID_INFO_VAAK; - sprintf(gGridName,"%s", gGridInfo[gGridChoice].mName); - } - else if (!strcmp(argv[j], "--yami")) - { - gGridChoice = GRID_INFO_YAMI; - sprintf(gGridName,"%s", gGridInfo[gGridChoice].mName); - } - else if (!strcmp(argv[j], "-loginpage") && (++j < argc)) - { - LLAppViewer::instance()->setLoginPage(utf8str_trim(argv[j])); - } - else if (!strcmp(argv[j], "-loginuri") && (++j < argc)) - { - LLAppViewer::instance()->addLoginURI(utf8str_trim(argv[j])); - } - else if (!strcmp(argv[j], "-helperuri") && (++j < argc)) - { - LLAppViewer::instance()->setHelperURI(utf8str_trim(argv[j])); - } - else if (!strcmp(argv[j], "-debugviews")) - { - LLView::sDebugRects = TRUE; - } - else if (!strcmp(argv[j], "-skin") && (++j < argc)) - { - std::string folder(argv[j]); - gDirUtilp->setSkinFolder(folder); - } - else if (!strcmp(argv[j], "-autologin") || !strcmp(argv[j], "--autologin")) // keep --autologin for compatibility - { - gAutoLogin = TRUE; - } - else if (!strcmp(argv[j], "-quitafter") && (++j < argc)) - { - gQuitAfterSeconds = (F32)atof(argv[j]); - } - else if (!strcmp(argv[j], "-rotate")) - { - gRotateRight = TRUE; - } -// else if (!strcmp(argv[j], "-noenv")) -// { - //turn OFF environmental effects for slow machines/video cards -// gRequestParaboloidMap = FALSE; -// } - else if (!strcmp(argv[j], "-noaudio")) - { - gUseAudio = FALSE; - } - else if (!strcmp(argv[j], "-nosound")) // tends to be popular cmdline on Linux. - { - gUseAudio = FALSE; - } - else if (!strcmp(argv[j], "-noprobe")) - { - gProbeHardware = FALSE; - } - else if (!strcmp(argv[j], "-noquicktime")) - { - // Developers can log in faster if they don't load all the - // quicktime dlls. - gUseQuickTime = false; - } - else if (!strcmp(argv[j], "-nopreload")) - { - // Developers can log in faster if they don't decode sounds - // or images on startup, ~5 seconds faster. - gPreloadSounds = false; - gPreloadImages = false; - } - else if (!strcmp(argv[j], "-purge")) - { - LLAppViewer::instance()->purgeCache(); - } - else if(!strcmp(argv[j], "-noinvlib")) - { - gRequestInventoryLibrary = FALSE; - } - else if (!strcmp(argv[j], "-log")) - { - gLogMessages = TRUE; - continue; - } - else if (!strcmp(argv[j], "-logfile") && (++j < argc)) - { - // *NOTE: This buffer size is hard coded into scanf() below. - char logfile[256]; // Flawfinder: ignore - sscanf(argv[j], "%255s", logfile); // Flawfinder: ignore - llinfos << "Setting log file to " << logfile << llendl; - LLFile::remove(logfile); - LLError::logToFile(logfile); - } - else if (!strcmp(argv[j], "-settings") && (++j < argc)) - { - gSettingsFileName = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, argv[j]); - } - else if (!strcmp(argv[j], "-setdefault") && (j + 2 < argc)) - { - std::string control_name; - std::string control_value; - - j++; - if (argv[j]) control_name = std::string(argv[j]); + { + // find the grid choice from the user setting. + int gridIndex = GRID_INFO_NONE; + for(;gridIndex < GRID_INFO_OTHER; ++gridIndex ) + { + if(0 == LLString::compareInsensitive(gGridInfo[gridIndex].mLabel, gridChoice.c_str())) + { + gGridChoice = (EGridInfo)gridIndex; + + if(GRID_INFO_LOCAL == gGridChoice) + { + gGridName = LOOPBACK_ADDRESS_STRING; + break; + } + else + { + gGridName = gGridInfo[gGridChoice].mName; + break; + } + } + } + + if(GRID_INFO_OTHER == gridIndex) + { + // *FIX:MEP Can and should we validate that this is an IP address? + gGridChoice = (EGridInfo)gridIndex; + gGridName = llformat("%s", gSavedSettings.getString("GridChoice").c_str()); + + } + } - j++; - if (argv[j]) control_value = std::string(argv[j]); - - // grab control name and value - if (!control_name.empty()) - { - gCommandLineSettings[control_name] = control_value; - } - } - else if (!strcmp(argv[j], "-set") && (j + 2 < argc)) - { - std::string control_name; - std::string control_value; - - j++; - if (argv[j]) control_name = std::string(argv[j]); - j++; - if (argv[j]) control_value = std::string(argv[j]); - - // grab control name and value - if (!control_name.empty()) - { - gCommandLineForcedSettings[control_name] = control_value; - } - } - else if (!strcmp(argv[j], "-login")) - { - if (j + 3 < argc) - { - j++; - gCmdLineFirstName = argv[j]; - j++; - gCmdLineLastName = argv[j]; - j++; - gCmdLinePassword = argv[j]; - } - else - { - // only works if -login is last parameter on command line - llerrs << "Not enough parameters to -login. Did you mean -loginuri?" << llendl; - } - } - else if (!strcmp(argv[j], "-god")) - { - gGodConnect = TRUE; - } - else if (!strcmp(argv[j], "-noconsole")) - { - gUseConsole = FALSE; - } - else if (!strcmp(argv[j], "-safe")) - { - llinfos << "Setting viewer feature table to run in safe mode, resetting prefs" << llendl; - gFeatureManagerp->setSafe(TRUE); - } - else if (!strcmp(argv[j], "-multiple")) - { - gMultipleViewersOK = TRUE; - } - else if (!strcmp(argv[j], "-nomultiple")) - { - gMultipleViewersOK = FALSE; - } - else if (!strcmp(argv[j], "-novoice")) - { - gDisableVoice = TRUE; - } - else if (!strcmp(argv[j], "-nothread")) - { - LLVFile::ALLOW_ASYNC = FALSE; - llinfos << "Running VFS in nothread mode" << llendl; - } - // some programs don't respect the command line options in protocol handlers (I'm looking at you, Opera) - // so this allows us to parse the URL straight off the command line without a "-url" paramater - else if (LLURLDispatcher::isSLURL(argv[j]) - || !strcmp(argv[j], "-url") && (++j < argc)) - { - std::string slurl = argv[j]; - if (LLURLDispatcher::isSLURLCommand(slurl)) - { - LLStartUp::sSLURLCommand = slurl; - } - else - { - LLURLSimString::setString(slurl); - } - // *NOTE: After setting the url, bail. What can happen is - // that someone can use IE (or potentially other browsers) - // and do the rough equivalent of command injection and - // steal passwords. Phoenix. SL-55321 - return 0; - } - else if (!strcmp(argv[j], "-ignorepixeldepth")) - { - gIgnorePixelDepth = TRUE; - } - else if (!strcmp(argv[j], "-cooperative")) +#if !LL_RELEASE_FOR_DOWNLOAD + if (gGridChoice == GRID_INFO_NONE) + { + // Development version: load last server choice by default (overridden by cmd line args) + S32 server = gSavedSettings.getS32("ServerChoice"); + if (server != 0) + gGridChoice = (EGridInfo)llclamp(server, 0, (S32)GRID_INFO_COUNT - 1); + if (server == GRID_INFO_OTHER) { - S32 ms_to_yield = 0; - if(++j < argc) + LLString custom_server = gSavedSettings.getString("CustomServer"); + if (custom_server.empty()) { - S32 rv = sscanf(argv[j], "%d", &ms_to_yield); - if(0 == rv) - { - --j; - } + gGridName = "none"; } else { - --j; + gGridName = custom_server.c_str(); } - gYieldMS = ms_to_yield; - gYieldTime = TRUE; - } - else if (!strcmp(argv[j], "-no-verify-ssl-cert")) - { - gVerifySSLCert = false; - } - else if ( (!strcmp(argv[j], "--channel") || !strcmp(argv[j], "-channel")) && (++j < argc)) - { - gChannelName = argv[j]; - } -#if LL_DARWIN - else if (!strncmp(argv[j], "-psn_", 5)) - { - // this is the Finder passing the process session number - // we ignore this } + gSavedSettings.setString("GridChoice", gGridInfo[gGridChoice].mLabel); + } #endif - else if(!strncmp(argv[j], "-qa", 3)) - { - gQAMode = TRUE; - } - else - { - - // DBC - Mac OS X passes some stuff by default on the command line (e.g. psn). - // Second Life URLs are passed this way as well? - llwarns << "Possible unknown keyword " << argv[j] << llendl; - // print usage information - llinfos << USAGE << llendl; - // return 1; - } + if (gGridChoice == GRID_INFO_NONE) + { + gGridChoice = GridDefaultChoice; + gSavedSettings.setString("GridChoice", gGridInfo[gGridChoice].mLabel); } - return 0; } bool send_url_to_other_instance(const std::string& url) @@ -937,11 +557,12 @@ LLAppViewer::LLAppViewer() : mReportedCrash(false), mNumSessions(0), mPurgeCache(false), - mPurgeOnExit(false), - mSecondInstance(false), + mPurgeOnExit(false), + mSecondInstance(false), mSavedFinalSnapshot(false), - mQuitRequested(false), - mLogoutRequestSent(false) + mQuitRequested(false), + mLogoutRequestSent(false), + mYieldTime(-1) { if(NULL != sInstance) { @@ -957,13 +578,6 @@ LLAppViewer::~LLAppViewer() removeMarkerFile(); } -bool LLAppViewer::tempStoreCommandOptions(int argc, char** argv) -{ - gTempArgC = argc; - gTempArgV = argv; - return true; -} - bool LLAppViewer::init() { // *NOTE:Mani - LLCurl::initClass is not thread safe. @@ -972,7 +586,6 @@ bool LLAppViewer::init() initThreads(); - initEarlyConfiguration(); // // Start of the application @@ -992,66 +605,30 @@ bool LLAppViewer::init() // // OK to write stuff to logs now, we've now crash reported if necessary // - - // Set up some defaults... - gSettingsFileName = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, DEFAULT_SETTINGS_FILE); - gOldSettingsFileName = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, LEGACY_DEFAULT_SETTINGS_FILE); - if (!initConfiguration()) return false; + writeSystemInfo(); + + // Build a string representing the current version number. + gCurrentVersion = llformat("%s %d.%d.%d.%d", + gSavedSettings.getString("VersionChannelName").c_str(), + LL_VERSION_MAJOR, + LL_VERSION_MINOR, + LL_VERSION_PATCH, + LL_VERSION_BUILD ); + ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// // *FIX: The following code isn't grouped into functions yet. - // - // Write system information into the debug log (CPU, OS, etc.) - // - writeSystemInfo(); - - // Build a string representing the current version number. - gCurrentVersion = llformat("%s %d.%d.%d.%d", gChannelName.c_str(), LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VERSION_BUILD ); - // // Various introspection concerning the libs we're using. // llinfos << "J2C Engine is: " << LLImageJ2C::getEngineInfo() << llendl; - // Merge with the command line overrides - gSavedSettings.applyOverrides(gCommandLineSettings); - - // Need to do this before calling parseAlerts - gUICtrlFactory = new LLViewerUICtrlFactory(); - - // Pre-load alerts.xml to define the warnings settings (always loads from skins/xui/en-us/) - // Do this *before* loading the settings file - LLAlertDialog::parseAlerts("alerts.xml", &gSavedSettings, TRUE); - - // Overwrite default settings with user settings - llinfos << "Loading configuration file " << gSettingsFileName << llendl; - if (0 == gSavedSettings.loadFromFile(gSettingsFileName)) - { - llinfos << "Failed to load settings from " << gSettingsFileName << llendl; - llinfos << "Loading legacy settings from " << gOldSettingsFileName << llendl; - gSavedSettings.loadFromFileLegacy(gOldSettingsFileName); - } - - // need to do this here - need to have initialized global settings first - LLString nextLoginLocation = gSavedSettings.getString( "NextLoginLocation" ); - if ( nextLoginLocation.length() ) - { - LLURLSimString::setString( nextLoginLocation.c_str() ); - }; - - // Merge with the command line overrides - gSavedSettings.applyOverrides(gCommandLineForcedSettings); - - gLastRunVersion = gSavedSettings.getString("LastRunVersion"); - - fixup_settings(); - // Get the single value from the crash settings file, if it exists std::string crash_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE); gCrashSettings.loadFromFile(crash_settings_filename.c_str()); @@ -1090,56 +667,25 @@ bool LLAppViewer::init() { LLError::setPrintLocation(true); } - -#if !LL_RELEASE_FOR_DOWNLOAD - if (gGridChoice == GRID_INFO_NONE) - { - // Development version: load last server choice by default (overridden by cmd line args) - - S32 server = gSavedSettings.getS32("ServerChoice"); - if (server != 0) - gGridChoice = (EGridInfo)llclamp(server, 0, (S32)GRID_INFO_COUNT - 1); - if (server == GRID_INFO_OTHER) - { - LLString custom_server = gSavedSettings.getString("CustomServer"); - if (custom_server.empty()) - { - snprintf(gGridName, MAX_STRING, "none"); /* Flawfinder: ignore */ - } - else - { - snprintf(gGridName, MAX_STRING, "%s", custom_server.c_str()); /* Flawfinder: ignore */ - } - } - } -#endif - - if (gGridChoice == GRID_INFO_NONE) - { - gGridChoice = GridDefaultChoice; - } // Load art UUID information, don't require these strings to be declared in code. LLString viewer_art_filename = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"viewerart.xml"); llinfos << "Loading art table from " << viewer_art_filename << llendl; - gViewerArt.loadFromFile(viewer_art_filename.c_str(), FALSE); + gViewerArt.loadFromFileLegacy(viewer_art_filename.c_str(), FALSE); LLString textures_filename = gDirUtilp->getExpandedFilename(LL_PATH_SKINS, "textures", "textures.xml"); llinfos << "Loading art table from " << textures_filename << llendl; - gViewerArt.loadFromFile(textures_filename.c_str(), FALSE); + gViewerArt.loadFromFileLegacy(textures_filename.c_str(), FALSE); LLString colors_base_filename = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "colors_base.xml"); llinfos << "Loading base colors from " << colors_base_filename << llendl; - gColors.loadFromFile(colors_base_filename.c_str(), FALSE, TYPE_COL4U); + gColors.loadFromFileLegacy(colors_base_filename.c_str(), FALSE, TYPE_COL4U); // Load overrides from user colors file LLString user_colors_filename = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "colors.xml"); llinfos << "Loading user colors from " << user_colors_filename << llendl; - if (gColors.loadFromFile(user_colors_filename.c_str(), FALSE, TYPE_COL4U) == 0) + if (gColors.loadFromFileLegacy(user_colors_filename.c_str(), FALSE, TYPE_COL4U) == 0) { - llinfos << "Failed to load user colors from " << user_colors_filename << llendl; - LLString user_legacy_colors_filename = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "colors.ini"); - llinfos << "Loading legacy colors from " << user_legacy_colors_filename << llendl; - gColors.loadFromFileLegacy(user_legacy_colors_filename.c_str(), FALSE, TYPE_COL4U); + llinfos << "Cannot load user colors from " << user_colors_filename << llendl; } // Widget construction depends on LLUI being initialized @@ -1162,16 +708,18 @@ bool LLAppViewer::init() LLAgent::parseTeleportMessages("teleport_strings.xml"); + LLViewerJointMesh::updateVectorize(); + // load MIME type -> media impl mappings LLMIMETypes::parseMIMETypes( "mime_types.xml" ); - mCrashBehavior = gCrashSettings.getS32(CRASH_BEHAVIOR_SETTING); - - LLVectorPerformanceOptions::initClass(); - - // Move certain saved settings into global variables for speed - saved_settings_to_globals(); + // Copy settings to globals. *TODO: Remove or move to appropriage class initializers + settings_to_globals(); + // Setup settings listeners + settings_setup_listeners(); + // Modify settings based on system configuration and compile options + settings_modify(); // Find partition serial number (Windows) or hardware serial (Mac) mSerialNumber = generateSerialNumber(); @@ -1425,9 +973,9 @@ bool LLAppViewer::mainLoop() bool run_multiple_threads = gSavedSettings.getBOOL("RunMultipleThreads"); // yield some time to the os based on command line option - if(gYieldTime) + if(mYieldTime >= 0) { - ms_sleep(gYieldMS); + ms_sleep(mYieldTime); } // yield cooperatively when not running as foreground window @@ -1699,11 +1247,11 @@ bool LLAppViewer::cleanup() // Must do this after all panels have been deleted because panels that have persistent rects // save their rects on delete. - gSavedSettings.saveToFile(gSettingsFileName, TRUE); - if (!gPerAccountSettingsFileName.empty()) - { - gSavedPerAccountSettings.saveToFile(gPerAccountSettingsFileName, TRUE); - } + gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE); + + // UserSettingsFile should be empty if no use has been logged on. + // *FIX:Mani This should get really saved in a "logoff" mode. + gSavedPerAccountSettings.saveToFile(gSavedSettings.getString("UserSettingsFile"), TRUE); llinfos << "Saved settings" << llendflush; std::string crash_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE); @@ -1798,10 +1346,10 @@ bool LLAppViewer::cleanup() end_messaging_system(); - // *NOTE:Mani - The following call is not thread safe. - LLCurl::cleanupClass(); + // *NOTE:Mani - The following call is not thread safe. + LLCurl::cleanupClass(); - // If we're exiting to launch an URL, do that here so the screen + // If we're exiting to launch an URL, do that here so the screen // is at the right resolution before we launch IE. if (!gLaunchFileOnQuit.empty()) { @@ -1822,106 +1370,6 @@ bool LLAppViewer::cleanup() return true; } -bool LLAppViewer::initEarlyConfiguration() -{ - // *FIX: globals - This method sets a bunch of globals early in the init process. - int argc = gTempArgC; - char** argv = gTempArgV; - - // HACK! We REALLY want to know what grid they were trying to connect to if they - // crashed hard. - // So we walk through the command line args ONLY looking for the - // userserver arguments first. And we don't do ANYTHING but set - // the gGridName (which gets passed to the crash reporter). - // We're assuming that they're trying to log into the same grid as last - // time, which seems fairly reasonable. - snprintf(gGridName, MAX_STRING, "%s", gGridInfo[GridDefaultChoice].mName); // Flawfinder: ignore - S32 j; - for (j = 1; j < argc; j++) - { - if (!strcmp(argv[j], "--aditi")) - { - snprintf(gGridName, MAX_STRING, "%s", gGridInfo[GRID_INFO_ADITI].mName); // Flawfinder: ignore - } - else if (!strcmp(argv[j], "--agni")) - { - snprintf(gGridName, MAX_STRING, "%s", gGridInfo[GRID_INFO_AGNI].mName); // Flawfinder: ignore - } - else if (!strcmp(argv[j], "--siva")) - { - snprintf(gGridName, MAX_STRING, "%s", gGridInfo[GRID_INFO_SIVA].mName); // Flawfinder: ignore - } - else if (!strcmp(argv[j], "--shakti")) - { - sprintf(gGridName,"%s", gGridInfo[GRID_INFO_SHAKTI].mName); - } - else if (!strcmp(argv[j], "--durga")) - { - snprintf(gGridName, MAX_STRING, "%s", gGridInfo[GRID_INFO_DURGA].mName); // Flawfinder: ignore - } - else if (!strcmp(argv[j], "--soma")) - { - snprintf(gGridName, MAX_STRING, "%s", gGridInfo[GRID_INFO_SOMA].mName); // Flawfinder: ignore - } - else if (!strcmp(argv[j], "--ganga")) - { - snprintf(gGridName, MAX_STRING, "%s", gGridInfo[GRID_INFO_GANGA].mName); // Flawfinder: ignore - } - else if (!strcmp(argv[j], "--vaak")) - { - sprintf(gGridName,"%s", gGridInfo[GRID_INFO_VAAK].mName); - } - else if (!strcmp(argv[j], "--uma")) - { - sprintf(gGridName,"%s", gGridInfo[GRID_INFO_UMA].mName); - } - else if (!strcmp(argv[j], "--mohini")) - { - sprintf(gGridName,"%s", gGridInfo[GRID_INFO_MOHINI].mName); - } - else if (!strcmp(argv[j], "--yami")) - { - sprintf(gGridName,"%s", gGridInfo[GRID_INFO_YAMI].mName); - } - else if (!strcmp(argv[j], "--nandi")) - { - sprintf(gGridName,"%s", gGridInfo[GRID_INFO_NANDI].mName); - } - else if (!strcmp(argv[j], "--mitra")) - { - sprintf(gGridName,"%s", gGridInfo[GRID_INFO_MITRA].mName); - } - else if (!strcmp(argv[j], "--radha")) - { - sprintf(gGridName,"%s", gGridInfo[GRID_INFO_RADHA].mName); - } - else if (!strcmp(argv[j], "--ravi")) - { - sprintf(gGridName,"%s", gGridInfo[GRID_INFO_RAVI].mName); - } - else if (!strcmp(argv[j], "--aruna")) - { - sprintf(gGridName,"%s", gGridInfo[GRID_INFO_ARUNA].mName); - } - else if (!strcmp(argv[j], "-multiple")) - { - // Hack to detect -multiple so we can disable the marker file check (which will always fail) - gMultipleViewersOK = TRUE; - } - else if (!strcmp(argv[j], "-novoice")) - { - // May need to know this early also - gDisableVoice = TRUE; - } - else if (!strcmp(argv[j], "-url") && (++j < argc)) - { - LLURLSimString::setString(argv[j]); - } - } - - return true; -} - bool LLAppViewer::initThreads() { #if MEM_TRACK_MEM @@ -1982,14 +1430,296 @@ bool LLAppViewer::initLogging() return true; } +void LLAppViewer::loadSettingsFromDirectory(ELLPath path_index) +{ + for(LLSD::map_iterator itr = mSettingsFileList.beginMap(); itr != mSettingsFileList.endMap(); ++itr) + { + LLString settings_name = (*itr).first; + LLString settings_file = mSettingsFileList[settings_name].asString(); + LLString full_settings_path = gDirUtilp->getExpandedFilename(path_index, settings_file); + if(gSettings.find(settings_name) == gSettings.end()) + { + llwarns << "Cannot load " << settings_file << " - No matching settings group for name " << settings_name << llendl; + continue; + } + if(!gSettings[settings_name]->loadFromFile(gDirUtilp->getExpandedFilename(path_index, settings_file))) + { + llwarns << "Cannot load " << full_settings_path << " - No settings found." << llendl; + } + else + { + llinfos << "Loaded settings file " << full_settings_path << llendl; + } + } +} + bool LLAppViewer::initConfiguration() { - // Ye olde parse_args()... - if(!doConfigFromCommandLine()) + //Set up internal pointers + gSettings["Global"] = &gSavedSettings; + gSettings["PerAccount"] = &gSavedPerAccountSettings; + gSettings["CrashSettings"] = &gCrashSettings; + + //Load settings files list + std::string settings_file_list = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "settings_files.xml"); + LLControlGroup settings_control; + llinfos << "Loading settings file list" << settings_file_list << llendl; + if (0 == settings_control.loadFromFile(settings_file_list)) { - return false; + llerrs << "Cannot load default configuration file " << settings_file_list << llendl; } + + mSettingsFileList = settings_control.getLLSD("Files"); + //Order of loading + // - App Settings (Defaults) + // - user_settings (Client Overrides) + // - user directory (user specific overrides, happens in llstartup) + loadSettingsFromDirectory(LL_PATH_APP_SETTINGS); + + //Fix settings that require compiled information + gSavedSettings.setString("ClientSettingsFile", + gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, DEFAULT_SETTINGS_FILE)); + + gSavedSettings.setString("VersionChannelName", LL_CHANNEL); + +#ifndef LL_RELEASE_FOR_DOWNLOAD + gSavedSettings.setBOOL("ShowConsoleWindow", TRUE); +#endif + +#if LL_WINDOWS + // Lists Japanese, Korean, and Chinese sanserif fonts available in + // Windows XP and Vista, as well as "Arial Unicode MS". + gSavedSettings.setString("FontSansSerifFallback", + "MSGOTHIC.TTC;gulim.ttc;simhei.ttf;ArialUni.ttf"); +#elif LL_DARWIN + // This is a fairly complete Japanese font that ships with Mac OS X. + // The first filename is in UTF8, but it shows up in the font menu as "Hiragino Kaku Gothic Pro W3". + // The third filename is in UTF8, but it shows up in the font menu as "STHeiti Light" + gSavedSettings.setString("FontSansSerifFallback", + "\xE3\x83\x92\xE3\x83\xA9\xE3\x82\xAD\xE3\x82\x99\xE3\x83\x8E\xE8\xA7\x92\xE3\x82\xB3\xE3\x82\x99 Pro W3.otf;\xE3\x83\x92\xE3\x83\xA9\xE3\x82\xAD\xE3\x82\x99\xE3\x83\x8E\xE8\xA7\x92\xE3\x82\xB3\xE3\x82\x99 ProN W3.otf;AppleGothic.dfont;AppleGothic.ttf;\xe5\x8d\x8e\xe6\x96\x87\xe7\xbb\x86\xe9\xbb\x91.ttf"); +#else + // 'unicode.ttf' doesn't exist, but hopefully an international + // user can take the hint and drop in their favourite local font. + gSavedSettings.setString("FontSansSerifFallback", + "unicode.ttf"); +#endif + + + // These are warnings that appear on the first experience of that condition. + // They are already set in the settings_default.xml file, but still need to be added to LLFirstUse + // for disable/reset ability + LLFirstUse::addConfigVariable("FirstBalanceIncrease"); + LLFirstUse::addConfigVariable("FirstBalanceDecrease"); + LLFirstUse::addConfigVariable("FirstSit"); + LLFirstUse::addConfigVariable("FirstMap"); + LLFirstUse::addConfigVariable("FirstGoTo"); + LLFirstUse::addConfigVariable("FirstBuild"); + LLFirstUse::addConfigVariable("FirstLeftClickNoHit"); + LLFirstUse::addConfigVariable("FirstTeleport"); + LLFirstUse::addConfigVariable("FirstOverrideKeys"); + LLFirstUse::addConfigVariable("FirstAttach"); + LLFirstUse::addConfigVariable("FirstAppearance"); + LLFirstUse::addConfigVariable("FirstInventory"); + LLFirstUse::addConfigVariable("FirstSandbox"); + LLFirstUse::addConfigVariable("FirstFlexible"); + LLFirstUse::addConfigVariable("FirstDebugMenus"); + LLFirstUse::addConfigVariable("FirstStreamingMusic"); + LLFirstUse::addConfigVariable("FirstStreamingVideo"); + LLFirstUse::addConfigVariable("FirstSculptedPrim"); + LLFirstUse::addConfigVariable("FirstVoice"); + LLFirstUse::addConfigVariable("FirstMedia"); + + ////// + // *FIX:Mani - Find a way to remove the gUICtrlFactory and + // LLAlertDialog::parseAlerts dependecies on the being loaded + // *before* the user settings. Having to do this init here + // seems odd. + + // Need to do this before calling parseAlerts + gUICtrlFactory = new LLViewerUICtrlFactory(); + + // Pre-load alerts.xml to define the warnings settings (always loads from skins/xui/en-us/) + // Do this *before* loading the settings file + LLAlertDialog::parseAlerts("alerts.xml", &gSavedSettings, TRUE); + + // Overwrite default user settings with user settings + loadSettingsFromDirectory(LL_PATH_USER_SETTINGS); + + // Parse command line settings. + LLControlGroupCLP clp; + std::string cmd_line_config = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, + "cmd_line.xml"); + clp.configure(cmd_line_config, &gSavedSettings); + + if(!initParseCommandLine(clp)) + { + llwarns + << "Error parsing command line options. Command Line options ignored." + << llendl; + + llinfos << "Command line usage:\n" << clp << llendl; + } + + // If the user has specified a alternate settings file name. + // Load it now. + if(clp.hasOption("settings")) + { + std::string user_settings_filename = clp.getOption("settings")[0]; + std::string full_settings_path = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, + user_settings_filename); + + llinfos << "Loading command line specified settings file: " << full_settings_path << llendl; + + if(!gSavedSettings.loadFromFile(full_settings_path)) + { + llwarns << "File not found: " << full_settings_path << llendl; + } + + gSavedSettings.setString("ClientSettingsFile", full_settings_path); + } + + // Apply the command line params to the settings system. + // Anyway the following call to notify depends upon the settings being init'd. + clp.notify(); + + // Start up the debugging console before handling other options. + if (gSavedSettings.getBOOL("ShowConsoleWindow")) + { + initConsole(); + } + + if(clp.hasOption("help")) + { + llinfos << "Command line usage:\n" << clp << llendl; + return false; + } + + ////////////////////////// + // Apply settings... + if(clp.hasOption("setdefault")) + { + //const LLCommandLineParser::token_vector_t& setdefault = clp.getOption("setdefault"); + //if(0x1 & setdefault.size()) + //{ + // llwarns << "Invalid '--setdefault' parameter count." << llendl; + //} + //else + //{ + // LLCommandLineParser::token_vector_t::const_iterator itr = setdefault.begin(); + // for(; itr != setdefault.end(); ++itr) + // { + // const std::string& name = *itr; + // const std::string& value = *(++itr); + // LLControlVariable* c = gSettings["global"]->getControl(name); + // if(c) + // { + // c->setDefault(value); + // } + // else + // { + // llwarns << "'--setdefault' specified with unknown setting: '" + // << name << "'." << llendl; + // } + // } + //} + } + + if(clp.hasOption("set")) + { + const LLCommandLineParser::token_vector_t& set_values = clp.getOption("set"); + if(0x1 & set_values.size()) + { + llwarns << "Invalid '--set' parameter count." << llendl; + } + else + { + LLCommandLineParser::token_vector_t::const_iterator itr = set_values.begin(); + for(; itr != set_values.end(); ++itr) + { + const std::string& name = *itr; + const std::string& value = *(++itr); + LLControlVariable* c = gSettings["Global"]->getControl(name); + if(c) + { + c->setValue(value, false); + } + else + { + llwarns << "'--set' specified with unknown setting: '" + << name << "'." << llendl; + } + } + } + } + + initGridChoice(); + + // Handle slurl use. NOTE: Don't let SL-55321 reappear. + + // *FIX: This init code should be made more robust to prevent + // the issue SL-55321 from returning. One thought is to allow + // only select options to be set from command line when a slurl + // is specified. More work on the settings system is needed to + // achieve this. For now... + + // *NOTE:Mani The command line parser parses tokens and is + // setup to bail after parsing the '--url' option or the + // first option specified without a '--option' flag (or + // any other option that uses the 'last_option' setting - + // see LLControlGroupCLP::configure()) + + // What can happen is that someone can use IE (or potentially + // other browsers) and do the rough equivalent of command + // injection and steal passwords. Phoenix. SL-55321 + if(clp.hasOption("url")) + { + std::string slurl = clp.getOption("url")[0]; + if (LLURLDispatcher::isSLURLCommand(slurl)) + { + LLStartUp::sSLURLCommand = slurl; + } + else + { + LLURLSimString::setString(slurl); + } + } + else if(clp.hasOption("slurl")) + { + std::string slurl = clp.getOption("slurl")[0]; + if(LLURLDispatcher::isSLURL(slurl)) + { + if (LLURLDispatcher::isSLURLCommand(slurl)) + { + LLStartUp::sSLURLCommand = slurl; + } + else + { + LLURLSimString::setString(slurl); + } + } + } + + const LLControlVariable* loginuri = gSavedSettings.getControl("LoginURI"); + if(loginuri && LLString::null != loginuri->getValue().asString()) + { + addLoginURI(loginuri->getValue().asString()); + } + + const LLControlVariable* helperuri = gSavedSettings.getControl("HelperURI"); + if(helperuri && LLString::null != helperuri->getValue().asString()) + { + setHelperURI(helperuri->getValue().asString()); + } + + const LLControlVariable* skinfolder = gSavedSettings.getControl("SkinFolder"); + if(skinfolder && LLString::null != skinfolder->getValue().asString()) + { + gDirUtilp->setSkinFolder(skinfolder->getValue().asString()); + } + + mYieldTime = gSavedSettings.getS32("YieldTime"); + // XUI:translate gSecondLife = "Second Life"; @@ -2060,19 +1790,6 @@ bool LLAppViewer::initConfiguration() gStartTime = totalTime(); - //////////////////////////////////////// - // - // Process ini files - // - - // declare all possible setting variables - declare_settings(); - -#if !LL_RELEASE_FOR_DOWNLOAD -// only write the defaults for non-release builds! - gSavedSettings.saveToFile(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS,"settings_default.xml").c_str(), FALSE); -#endif - // // Set the name of the window // @@ -2085,7 +1802,7 @@ bool LLAppViewer::initConfiguration() #endif LLString::truncate(gWindowTitle, 255); - if (!gMultipleViewersOK) + if (!gSavedSettings.getBOOL("AllowMultipleViewers")) { // // Check for another instance of the app running @@ -2211,12 +1928,12 @@ bool LLAppViewer::initConfiguration() if (mSecondInstance) { - gDisableVoice = TRUE; + gSavedSettings.setBOOL("CmdLineDisableVoice", TRUE); /* Don't start another instance if using -multiple //RN: if we received a URL, hand it off to the existing instance - if (LLURLSimString::parse()) - { - LLURLSimString::send_to_other_instance(); + if (LLURLSimString::parse()) + { + LLURLSimString::send_to_other_instance(); return 1; } */ @@ -2225,95 +1942,15 @@ bool LLAppViewer::initConfiguration() initMarkerFile(); } - return true; // Config was successful. -} - -bool LLAppViewer::doConfigFromCommandLine() -{ - // *FIX: This is what parse args used to do, minus the arg reading part. - // Now the arg parsing is handled by LLApp::parseCommandOptions() and this - // method need only interpret settings. Perhaps some day interested parties - // can ask an app about a setting rather than have the app set - // a gazzillion globals. - - ///////////////////////////////////////// - // - // Process command line arguments - // - S32 args_result = 0; - -#if LL_DARWIN - { - // On the Mac, read in arguments.txt (if it exists) and process it for additional arguments. - LLString args; - if(_read_file_into_string(args, "arguments.txt")) /* Flawfinder: ignore*/ - { - // The arguments file exists. - // It should consist of command line arguments separated by newlines. - // Split it into individual arguments and build a fake argv[] to pass to parse_args. - std::vector arglist; - - arglist.push_back("newview"); - - llinfos << "Reading additional command line arguments from arguments.txt..." << llendl; - - typedef boost::tokenizer > tokenizer; - boost::escaped_list_separator sep("\\", "\r\n ", "\"'"); - tokenizer tokens(args, sep); - tokenizer::iterator token_iter; - - for(token_iter = tokens.begin(); token_iter != tokens.end(); ++token_iter) - { - llinfos << "argument: '" << (token_iter->c_str()) << "'" << llendl; - - arglist.push_back(*token_iter); - } - - char **fakeargv = new char*[arglist.size()]; - int i; - for(i=0; i < arglist.size(); i++) - fakeargv[i] = const_cast(arglist[i].c_str()); - - args_result = parse_args(arglist.size(), fakeargv); - delete[] fakeargv; - } - - // Get the user's preferred language string based on the Mac OS localization mechanism. - // To add a new localization: - // go to the "Resources" section of the project - // get info on "language.txt" - // in the "General" tab, click the "Add Localization" button - // create a new localization for the language you're adding - // set the contents of the new localization of the file to the string corresponding to our localization - // (i.e. "en-us", "ja", etc. Use the existing ones as a guide.) - CFURLRef url = CFBundleCopyResourceURL(CFBundleGetMainBundle(), CFSTR("language"), CFSTR("txt"), NULL); - char path[MAX_PATH]; - if(CFURLGetFileSystemRepresentation(url, false, (UInt8 *)path, sizeof(path))) - { - LLString lang; - if(_read_file_into_string(lang, path)) /* Flawfinder: ignore*/ - { - gCommandLineForcedSettings["SystemLanguage"] = lang; - } - } - CFRelease(url); - } -#endif - - int argc = gTempArgC; - char** argv = gTempArgV; - - // - // Parse the command line arguments - // - args_result |= parse_args(argc, argv); - if (args_result) + // need to do this here - need to have initialized global settings first + LLString nextLoginLocation = gSavedSettings.getString( "NextLoginLocation" ); + if ( nextLoginLocation.length() ) { - removeMarkerFile(); - return false; - } + LLURLSimString::setString( nextLoginLocation.c_str() ); + }; - return true; + gLastRunVersion = gSavedSettings.getString("LastRunVersion"); + return true; // Config was successful. } bool LLAppViewer::initWindow() @@ -2332,10 +1969,11 @@ bool LLAppViewer::initWindow() window_title_str[sizeof(window_title_str) - 1] = '\0'; // always start windowed + BOOL ignorePixelDepth = gSavedSettings.getBOOL("IgnorePixelDepth"); gViewerWindow = new LLViewerWindow(window_title_str, "Second Life", gSavedSettings.getS32("WindowX"), gSavedSettings.getS32("WindowY"), gSavedSettings.getS32("WindowWidth"), gSavedSettings.getS32("WindowHeight"), - FALSE, gIgnorePixelDepth); + FALSE, ignorePixelDepth); if (gSavedSettings.getBOOL("FullScreen")) { @@ -2357,14 +1995,14 @@ bool LLAppViewer::initWindow() // Set this flag in case we crash while initializing GL gSavedSettings.setBOOL("RenderInitError", TRUE); - gSavedSettings.saveToFile( gSettingsFileName, TRUE ); + gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE ); gPipeline.init(); stop_glerror(); gViewerWindow->initGLDefaults(); gSavedSettings.setBOOL("RenderInitError", FALSE); - gSavedSettings.saveToFile( gSettingsFileName, TRUE ); + gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE ); } LLUI::sWindow = gViewerWindow->getWindow(); @@ -2372,11 +2010,6 @@ bool LLAppViewer::initWindow() LLAlertDialog::parseAlerts("alerts.xml"); LLNotifyBox::parseNotify("notify.xml"); - // *TODO - remove this when merging into release - // DON'T Clean up the feature manager lookup table - settings are needed - // for setting the graphics level. - //gFeatureManagerp->cleanupFeatureTables(); - // Show watch cursor gViewerWindow->setCursor(UI_CURSOR_WAIT); @@ -2466,7 +2099,7 @@ void LLAppViewer::writeSystemInfo() { gDebugInfo["SLLog"] = LLError::logFileName(); - gDebugInfo["ClientInfo"]["Name"] = gChannelName; + gDebugInfo["ClientInfo"]["Name"] = gSavedSettings.getString("VersionChannelName"); gDebugInfo["ClientInfo"]["MajorVersion"] = LL_VERSION_MAJOR; gDebugInfo["ClientInfo"]["MinorVersion"] = LL_VERSION_MINOR; gDebugInfo["ClientInfo"]["PatchVersion"] = LL_VERSION_PATCH; @@ -2517,7 +2150,7 @@ void LLAppViewer::handleViewerCrash() } pApp->mReportedCrash = TRUE; - gDebugInfo["SettingsFilename"] = gSettingsFileName; + gDebugInfo["SettingsFilename"] = gSavedSettings.getString("ClientSettingsFile"); gDebugInfo["CAFilename"] = gDirUtilp->getCAFile(); gDebugInfo["ViewerExePath"] = gDirUtilp->getExecutablePathAndName().c_str(); gDebugInfo["CurrentPath"] = gDirUtilp->getCurPath().c_str(); @@ -2658,7 +2291,11 @@ void LLAppViewer::initMarkerFile() ll_apr_file_remove(error_marker_file); //Freeze case checks - if(anotherInstanceRunning()) return; + if(anotherInstanceRunning()) + { + return; + } + fMarker = ll_apr_file_open(mMarkerFileName, LL_APR_RB); if (fMarker != NULL) { @@ -2864,7 +2501,7 @@ bool LLAppViewer::initCache() char static_vfs_index_file[LL_MAX_PATH]; // Flawfinder: ignore char static_vfs_data_file[LL_MAX_PATH]; // Flawfinder: ignore - if (gMultipleViewersOK) + if (gSavedSettings.getBOOL("AllowMultipleViewers")) { // don't mess with renaming the VFS in this case new_salt = old_salt; @@ -3063,17 +2700,6 @@ void LLAppViewer::setHelperURI(const std::string& uri) gHelperURI = uri; } -void LLAppViewer::setLoginPage(const std::string& login_page) -{ - gLoginPage = login_page; -} - -const std::string& LLAppViewer::getLoginPage() -{ - return gLoginPage; -} - - // Callback from a dialog indicating user was logged out. void finish_disconnect(S32 option, void* userdata) { @@ -3242,8 +2868,6 @@ void LLAppViewer::idle() // Update frame timers static LLTimer idle_timer; - LLControlBase::updateAllListeners(); - LLFrameTimer::updateFrameTime(); LLEventTimer::updateClass(); LLCriticalDamp::updateInterpolants(); @@ -3264,9 +2888,10 @@ void LLAppViewer::idle() // Smoothly weight toward current frame gFPSClamped = (frame_rate_clamped + (4.f * gFPSClamped)) / 5.f; - if (gQuitAfterSeconds > 0.f) + F32 qas = gSavedSettings.getF32("QuitAfterSeconds"); + if (qas > 0.f) { - if (gRenderStartTime.getElapsedTimeF32() > gQuitAfterSeconds) + if (gRenderStartTime.getElapsedTimeF32() > qas) { LLAppViewer::instance()->forceQuit(); } @@ -3305,7 +2930,7 @@ void LLAppViewer::idle() // Update simulator agent state // - if (gRotateRight) + if (gSavedSettings.getBOOL("RotateRight")) { gAgent.moveYaw(-1.f); } @@ -3513,7 +3138,6 @@ void LLAppViewer::idle() // // Update weather effects // - if (!gNoRender) { gWorldp->updateClouds(gFrameDTClamped); diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index da3f5d54c1..0adf178b34 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -36,15 +36,21 @@ class LLTextureCache; class LLWorkerThread; class LLTextureFetch; +class LLCommandLineParser; + class LLAppViewer : public LLApp { public: LLAppViewer(); virtual ~LLAppViewer(); - // *NOTE:Mani - Don't use this! - // Having - static LLAppViewer* instance() {return sInstance; } + /** + * @brief Access to the LLAppViewer singleton. + * + * The LLAppViewer singleton is created in main()/WinMain(). + * So don't use it in pre-entry (static initialization) code. + */ + static LLAppViewer* instance() {return sInstance; } // // Main application logic @@ -64,10 +70,6 @@ public: bool quitRequested() { return mQuitRequested; } bool logoutRequestSent() { return mLogoutRequestSent; } - // *FIX: This is meant to stay only until the command line issues are hashed out with repect to LLApp::parseCommandLine - // This version stores the argc and argv for later usage, make sure the params passed in last as long as this class. - bool tempStoreCommandOptions(int argc, char** argv); - void closeDebug(); const LLOSInfo& getOSInfo() const { return mSysOSInfo; } @@ -87,9 +89,6 @@ public: const std::string& getSerialNumber() { return mSerialNumber; } - // *FIX:Mani purgeCache was made public for parse_args(). - // If that beast is gone, make it private. - void purgeCache(); // Clear the local cache. bool getPurgeCache() const { return mPurgeCache; } const LLString& getSecondLifeTitle() const; // The Second Life title. @@ -101,8 +100,6 @@ public: const std::vector& getLoginURIs() const; const std::string& getHelperURI() const; void resetURIs() const; - void setLoginPage(const std::string& login_page); - const std::string& getLoginPage(); void forceDisconnect(const LLString& msg); // Force disconnection, with a message to the user. void badNetworkHandler(); // Cause a crash state due to bad network packet. @@ -125,23 +122,26 @@ public: virtual void forceErrorInifiniteLoop(); virtual void forceErrorSoftwareException(); + void loadSettingsFromDirectory(ELLPath path_index); protected: virtual bool initWindow(); // Initialize the viewer's window. virtual bool initLogging(); // Initialize log files, logging system, return false on failure. + virtual void initConsole() {}; // Initialize OS level debugging console. virtual bool initHardwareTest() { return true; } // A false result indicates the app should quit. + + virtual bool initParseCommandLine(LLCommandLineParser& clp) + { return true; } // Allow platforms to specify the command line args. virtual std::string generateSerialNumber() = 0; // Platforms specific classes generate this. private: - bool initEarlyConfiguration(); // Initialize setting needed by crash reporting. bool initThreads(); // Initialize viewer threads, return false on failure. bool initConfiguration(); // Initialize settings from the command line/config file. bool initCache(); // Initialize local client cache. - - bool doConfigFromCommandLine(); // calls parse args. + void purgeCache(); // Clear the local cache. void cleanupSavedSettings(); // Sets some config data to current or default values during cleanup. void removeCacheFiles(const char *filemask); // Deletes cached files the match the given wildcard. @@ -186,6 +186,8 @@ private: bool mQuitRequested; // User wants to quit, may have modified documents open. bool mLogoutRequestSent; // Disconnect message sent to simulator, no longer safe to send messages to the sim. + S32 mYieldTime; + LLSD mSettingsFileList; }; // consts from viewer.h @@ -196,31 +198,16 @@ const S32 AGENT_UPDATES_PER_SECOND = 10; // // "// llstartup" indicates that llstartup is the only client for this global. -extern bool gVerifySSLCert; // parse_args setting used by llxmlrpctransaction.cpp extern BOOL gHandleKeysAsync; // gSavedSettings used by llviewerdisplay.cpp & llviewermenu.cpp -extern BOOL gProbeHardware; extern LLString gDisabledMessage; // llstartup extern BOOL gHideLinks; // used by llpanellogin, lllfloaterbuycurrency, llstartup extern LLSD gDebugInfo; extern BOOL gAllowIdleAFK; -extern F32 gAFKTimeout; extern BOOL gShowObjectUpdates; -extern BOOL gLogMessages; // llstartup -extern std::string gChannelName; -extern BOOL gUseAudio; // llstartup - -extern LLString gCmdLineFirstName; // llstartup -extern LLString gCmdLineLastName; -extern LLString gCmdLinePassword; - -extern BOOL gAutoLogin; // llstartup extern const char* DEFAULT_SETTINGS_FILE; // llstartup -extern BOOL gRequestInventoryLibrary; // llstartup -extern BOOL gGodConnect; // llstartup - extern BOOL gAcceptTOS; extern BOOL gAcceptCriticalMessage; @@ -264,7 +251,6 @@ extern LLUUID gInventoryLibraryOwner; extern LLUUID gInventoryLibraryRoot; extern BOOL gDisconnected; -extern BOOL gDisableVoice; // Map scale in pixels per region extern F32 gMapScale; @@ -274,9 +260,6 @@ extern LLFrameTimer gRestoreGLTimer; extern BOOL gRestoreGL; extern BOOL gUseWireframe; -extern F32 gMouseSensitivity; -extern BOOL gInvertMouse; - // VFS globals - gVFS is for general use // gStaticVFS is read-only and is shipped w/ the viewer // it has pre-cache data like the UI .TGAs @@ -284,9 +267,6 @@ extern LLVFS *gStaticVFS; extern LLMemoryInfo gSysMemory; -extern bool gPreloadImages; -extern bool gPreloadSounds; - extern LLString gLastVersionChannel; extern LLVector3 gWindVec; @@ -297,10 +277,7 @@ extern BOOL gPrintMessagesThisFrame; extern LLUUID gSunTextureID; extern LLUUID gMoonTextureID; -extern BOOL gUseConsole; - extern BOOL gRandomizeFramerate; extern BOOL gPeriodicSlowFrame; -extern BOOL gQAMode; #endif // LL_LLAPPVIEWER_H diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp index 1993fd0a76..c36dd2955e 100644 --- a/indra/newview/llappviewerlinux.cpp +++ b/indra/newview/llappviewerlinux.cpp @@ -31,9 +31,11 @@ #include "llviewerprecompiledheaders.h" -#include "llmemtype.h" #include "llappviewerlinux.h" +#include "llcommandlineparser.h" + +#include "llmemtype.h" #include "llviewernetwork.h" #include "llmd5.h" @@ -54,6 +56,12 @@ # include #endif +namespace +{ + int gArgC = 0; + char **gArgV = NULL; +} + int main( int argc, char **argv ) { LLMemType mt1(LLMemType::MTYPE_STARTUP); @@ -62,18 +70,14 @@ int main( int argc, char **argv ) asm ("ta\t6"); // NOTE: Make sure memory alignment is enforced on SPARC #endif + gArgC = argc; + gArgV = argv; + LLAppViewer* viewer_app_ptr = new LLAppViewerLinux(); viewer_app_ptr->setErrorHandler(LLAppViewer::handleViewerCrash); - bool ok = viewer_app_ptr->tempStoreCommandOptions(argc, argv); - if(!ok) - { - llwarns << "Unable to parse command line." << llendl; - return -1; - } - - ok = viewer_app_ptr->init(); + bool ok = viewer_app_ptr->init(); if(!ok) { llwarns << "Application init failed." << llendl; @@ -321,7 +325,7 @@ void LLAppViewerLinux::handleCrashReporting() {(char*)cmd.c_str(), ask_dialog, (char*)"-user", - (char*)gGridName, + (char*)gGridName.c_str(), (char*)"-name", (char*)LLAppViewer::instance()->getSecondLifeTitle().c_str(), NULL}; @@ -403,6 +407,12 @@ bool LLAppViewerLinux::initLogging() return LLAppViewer::initLogging(); } +bool LLAppViewerLinux::initParseCommandLine(LLCommandLineParser& clp) +{ + clp.parseCommandLine(gArgC, gArgV); + return true; +} + std::string LLAppViewerLinux::generateSerialNumber() { char serial_md5[MD5HEX_STR_SIZE]; diff --git a/indra/newview/llappviewerlinux.h b/indra/newview/llappviewerlinux.h index f38a64a8cd..ce91b6b8b6 100644 --- a/indra/newview/llappviewerlinux.h +++ b/indra/newview/llappviewerlinux.h @@ -36,6 +36,8 @@ #include "llappviewer.h" #endif +class LLCommandLineParser; + class LLAppViewerLinux : public LLAppViewer { public: @@ -54,6 +56,7 @@ protected: virtual void handleCrashReporting(); virtual bool initLogging(); + virtual bool initParseCommandLine(LLCommandLineParser& clp); }; #endif // LL_LLAPPVIEWERLINUX_H diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp index 2d7091a075..1e4c08a1c1 100644 --- a/indra/newview/llappviewermacosx.cpp +++ b/indra/newview/llappviewermacosx.cpp @@ -36,15 +36,25 @@ #endif #include "llappviewermacosx.h" +#include "llcommandlineparser.h" + #include "llmemtype.h" #include "llviewernetwork.h" +#include "llviewercontrol.h" #include "llmd5.h" #include "llurlsimstring.h" #include "llfloaterworldmap.h" #include "llurldispatcher.h" #include +namespace +{ + // The command line args stored. + // They are not used immediately by the app. + int gArgC; + char** gArgV; +} int main( int argc, char **argv ) { @@ -61,14 +71,11 @@ int main( int argc, char **argv ) viewer_app_ptr->setErrorHandler(LLAppViewer::handleViewerCrash); - bool ok = viewer_app_ptr->tempStoreCommandOptions(argc, argv); - if(!ok) - { - llwarns << "Unable to parse command line." << llendl; - return -1; - } - - ok = viewer_app_ptr->init(); + // Store off the command line args for use later. + gArgC = argc; + gArgV = argv; + + bool ok = viewer_app_ptr->init(); if(!ok) { llwarns << "Application init failed." << llendl; @@ -108,6 +115,51 @@ bool LLAppViewerMacOSX::init() return LLAppViewer::init(); } +bool LLAppViewerMacOSX::initParseCommandLine(LLCommandLineParser& clp) +{ + // First parse the command line, not often used on the mac. + clp.parseCommandLine(gArgC, gArgV); + + // Now read in the args from arguments txt. + // Succesive calls to clp.parse... will NOT override earlier + // options. + const char* filename = "arguments.txt"; + llifstream ifs(filename, llifstream::binary); + if (!ifs.is_open()) + { + llwarns << "Unable to open file" << filename << llendl; + return false; + } + + clp.parseCommandLineFile(ifs); + + // Get the user's preferred language string based on the Mac OS localization mechanism. + // To add a new localization: + // go to the "Resources" section of the project + // get info on "language.txt" + // in the "General" tab, click the "Add Localization" button + // create a new localization for the language you're adding + // set the contents of the new localization of the file to the string corresponding to our localization + // (i.e. "en-us", "ja", etc. Use the existing ones as a guide.) + CFURLRef url = CFBundleCopyResourceURL(CFBundleGetMainBundle(), CFSTR("language"), CFSTR("txt"), NULL); + char path[MAX_PATH]; + if(CFURLGetFileSystemRepresentation(url, false, (UInt8 *)path, sizeof(path))) + { + LLString lang; + if(_read_file_into_string(lang, path)) /* Flawfinder: ignore*/ + { + LLControlVariable* c = gSavedSettings.getControl("SystemLanguage"); + if(c) + { + c->setValue(lang, false); + } + } + } + CFRelease(url); + + return true; +} + void LLAppViewerMacOSX::handleCrashReporting() { // Macintosh diff --git a/indra/newview/llappviewermacosx.h b/indra/newview/llappviewermacosx.h index 2c61e5a01c..cc4a7f5eb5 100644 --- a/indra/newview/llappviewermacosx.h +++ b/indra/newview/llappviewermacosx.h @@ -51,6 +51,7 @@ public: protected: virtual void handleCrashReporting(); std::string generateSerialNumber(); + virtual bool initParseCommandLine(LLCommandLineParser& clp); }; #endif // LL_LLAPPVIEWERMACOSX_H diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index 09bcf6f7cc..fb726e7c97 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -55,41 +55,13 @@ #include "llviewernetwork.h" #include "llmd5.h" -void fill_args(int& argc, char** argv, const S32 max_args, LPSTR cmd_line) -{ - char *token = NULL; - if( cmd_line[0] == '\"' ) - { - // Exe name is enclosed in quotes - token = strtok( cmd_line, "\"" ); - argv[argc++] = token; - token = strtok( NULL, " \t," ); - } - else - { - // Exe name is not enclosed in quotes - token = strtok( cmd_line, " \t," ); - } +#include "llcommandlineparser.h" - while( (token != NULL) && (argc < max_args) ) - { - argv[argc++] = token; - /* Get next token: */ - if (*(token + strlen(token) + 1) == '\"') /* Flawfinder: ignore*/ - { - token = strtok( NULL, "\""); - } - else - { - token = strtok( NULL, " \t," ); - } - } -} - -// *NOTE:Mani - this code is stolen from LLApp, where its never actually used. LONG WINAPI viewer_windows_exception_handler(struct _EXCEPTION_POINTERS *exception_infop) { - // Translate the signals/exceptions into cross-platform stuff + // *NOTE:Mani - this code is stolen from LLApp, where its never actually used. + + // Translate the signals/exceptions into cross-platform stuff // Windows implementation llinfos << "Entering Windows Exception Handler..." << llendl; @@ -144,21 +116,7 @@ int APIENTRY WINMAIN(HINSTANCE hInstance, // *FIX: global gIconResource = MAKEINTRESOURCE(IDI_LL_ICON); - // In Win32, we need to generate argc and argv ourselves... - // Note: GetCommandLine() returns a potentially return a LPTSTR - // which can resolve to a LPWSTR (unicode string). - // (That's why it's different from lpCmdLine which is a LPSTR.) - // We don't currently do unicode, so call the non-unicode version - // directly. - LPSTR cmd_line_including_exe_name = GetCommandLineA(); - - const S32 MAX_ARGS = 100; - int argc = 0; - char* argv[MAX_ARGS]; /* Flawfinder: ignore */ - - fill_args(argc, argv, MAX_ARGS, cmd_line_including_exe_name); - - LLAppViewerWin32* viewer_app_ptr = new LLAppViewerWin32(); + LLAppViewerWin32* viewer_app_ptr = new LLAppViewerWin32(lpCmdLine); // *FIX:Mani This method is poorly named, since the exception // is now handled by LLApp. @@ -180,13 +138,6 @@ int APIENTRY WINMAIN(HINSTANCE hInstance, viewer_app_ptr->setErrorHandler(LLAppViewer::handleViewerCrash); - ok = viewer_app_ptr->tempStoreCommandOptions(argc, argv); - if(!ok) - { - llwarns << "Unable to parse command line." << llendl; - return -1; - } - ok = viewer_app_ptr->init(); if(!ok) { @@ -308,7 +259,8 @@ void create_console() setvbuf( stderr, NULL, _IONBF, 0 ); } -LLAppViewerWin32::LLAppViewerWin32() +LLAppViewerWin32::LLAppViewerWin32(const char* cmd_line) : + mCmdLine(cmd_line) { } @@ -339,15 +291,11 @@ bool LLAppViewerWin32::cleanup() return result; } -bool LLAppViewerWin32::initWindow() +void LLAppViewerWin32::initConsole() { - // pop up debug console if necessary - if (gUseConsole && gSavedSettings.getBOOL("ShowConsoleWindow")) - { - create_console(); - } - - return LLAppViewer::initWindow(); + // pop up debug console + create_console(); + return LLAppViewer::initConsole(); } void write_debug_dx(const char* str) @@ -368,7 +316,7 @@ bool LLAppViewerWin32::initHardwareTest() // Do driver verification and initialization based on DirectX // hardware polling and driver versions // - if (gProbeHardware) + if (FALSE == gSavedSettings.getBOOL("NoHardwareProbe")) { BOOL vram_only = !gSavedSettings.getBOOL("ProbeHardwareOnStartup"); @@ -431,6 +379,11 @@ bool LLAppViewerWin32::initHardwareTest() return true; } +bool LLAppViewerWin32::initParseCommandLine(LLCommandLineParser& clp) +{ + return clp.parseCommandLineString(mCmdLine); +} + void LLAppViewerWin32::handleCrashReporting() { // Windows only behaivor. Spawn win crash reporter. @@ -486,4 +439,4 @@ std::string LLAppViewerWin32::generateSerialNumber() llwarns << "GetVolumeInformation failed" << llendl; } return serial_md5; -} \ No newline at end of file +} diff --git a/indra/newview/llappviewerwin32.h b/indra/newview/llappviewerwin32.h index 23e7337618..66653c48f5 100644 --- a/indra/newview/llappviewerwin32.h +++ b/indra/newview/llappviewerwin32.h @@ -39,7 +39,7 @@ class LLAppViewerWin32 : public LLAppViewer { public: - LLAppViewerWin32(); + LLAppViewerWin32(const char* cmd_line); virtual ~LLAppViewerWin32(); // @@ -49,15 +49,18 @@ public: virtual bool cleanup(); protected: - virtual bool initWindow(); // Initialize the viewer's window. + virtual void initConsole(); // Initialize OS level debugging console. virtual bool initHardwareTest(); // Win32 uses DX9 to test hardware. - virtual void handleCrashReporting(); + virtual bool initParseCommandLine(LLCommandLineParser& clp); + + virtual void handleCrashReporting(); std::string generateSerialNumber(); private: void disableWinErrorReporting(); + std::string mCmdLine; }; #endif // LL_LLAPPVIEWERWIN32_H diff --git a/indra/newview/llcommandlineparser.cpp b/indra/newview/llcommandlineparser.cpp new file mode 100644 index 0000000000..2f99ca1247 --- /dev/null +++ b/indra/newview/llcommandlineparser.cpp @@ -0,0 +1,535 @@ +/** + * @file llcommandlineparser.cpp + * @brief The LLCommandLineParser class definitions + * + * $LicenseInfo:firstyear=2007&license=viewergpl$ + * + * Copyright (c) 2007, 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://secondlife.com/developers/opensource/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://secondlife.com/developers/opensource/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" +#include "llcommandlineparser.h" + +// *NOTE: The boost::lexical_cast generates +// the warning C4701(local used with out assignment) in VC7.1. +// Disable the warning for the boost includes. +#if _MSC_VER +# pragma warning(push) +# pragma warning( disable : 4701 ) +#else +// NOTE: For the other platforms? +#endif + +#include +#include +#include + +#if _MSC_VER +# pragma warning(pop) +#endif + +#include "llsdserialize.h" +#include +#include + +#include "llcontrol.h" + +namespace po = boost::program_options; + +// *NTOE:MEP - Currently the boost object reside in file scope. +// This has a couple of negatives, they are always around and +// there can be only one instance of each. +// The plus is that the boost-ly-ness of this implementation is +// hidden from the rest of the world. +// Its importatnt to realize that multiple LLCommandLineParser objects +// will all have this single repository of option escs and parsed options. +// This could be good or bad, and probably won't matter for most use cases. +namespace +{ + po::options_description gOptionsDesc; + po::positional_options_description gPositionalOptions; + po::variables_map gVariableMap; + + const LLCommandLineParser::token_vector_t gEmptyValue; + + void read_file_into_string(std::string& str, const std::basic_istream < char >& file) + { + std::ostringstream oss; + oss << file.rdbuf(); + str = oss.str(); + } + + bool gPastLastOption = false; +} + +class LLCLPError : public std::logic_error { +public: + LLCLPError(const std::string& what) : std::logic_error(what) {} +}; + +class LLCLPLastOption : public std::logic_error { +public: + LLCLPLastOption(const std::string& what) : std::logic_error(what) {} +}; + +class LLCLPValue : public po::value_semantic_codecvt_helper +{ + unsigned mMinTokens; + unsigned mMaxTokens; + bool mIsComposing; + typedef boost::function1 notify_callback_t; + notify_callback_t mNotifyCallback; + bool mLastOption; + +public: + LLCLPValue() : + mMinTokens(0), + mMaxTokens(0), + mIsComposing(false), + mLastOption(false) + {} + + virtual ~LLCLPValue() {}; + + void setMinTokens(unsigned c) + { + mMinTokens = c; + } + + void setMaxTokens(unsigned c) + { + mMaxTokens = c; + } + + void setComposing(bool c) + { + mIsComposing = c; + } + + void setLastOption(bool c) + { + mLastOption = c; + } + + void setNotifyCallback(notify_callback_t f) + { + mNotifyCallback = f; + } + + // Overrides to support the value_semantic interface. + virtual std::string name() const + { + const std::string arg("arg"); + const std::string args("args"); + return (max_tokens() > 1) ? args : arg; + } + + virtual unsigned min_tokens() const + { + return mMinTokens; + } + + virtual unsigned max_tokens() const + { + return mMaxTokens; + } + + virtual bool is_composing() const + { + return mIsComposing; + } + + virtual bool apply_default(boost::any& value_store) const + { + return false; // No defaults. + } + + virtual void notify(const boost::any& value_store) const + { + const LLCommandLineParser::token_vector_t* value = + boost::any_cast(&value_store); + if(mNotifyCallback) + { + mNotifyCallback(*value); + } + + } + +protected: + void xparse(boost::any& value_store, + const std::vector& new_tokens) const + { + if(gPastLastOption) + { + throw(LLCLPLastOption("Don't parse no more!")); + } + + // Error checks. Needed? + if (!value_store.empty() && !is_composing()) + { + throw(LLCLPError("Non composing value with multiple occurences.")); + } + if (new_tokens.size() < min_tokens() || new_tokens.size() > max_tokens()) + { + throw(LLCLPError("Illegal number of tokens specified.")); + } + + if(value_store.empty()) + { + value_store = boost::any(LLCommandLineParser::token_vector_t()); + } + LLCommandLineParser::token_vector_t* tv = + boost::any_cast(&value_store); + + for(unsigned i = 0; i < new_tokens.size() && i < mMaxTokens; ++i) + { + tv->push_back(new_tokens[i]); + } + + if(mLastOption) + { + gPastLastOption = true; + } + } +}; + +//---------------------------------------------------------------------------- +// LLCommandLineParser defintions +//---------------------------------------------------------------------------- +void LLCommandLineParser::addOptionDesc(const LLString& option_name, + boost::function1 notify_callback, + unsigned int token_count, + const LLString& description, + const LLString& short_name, + bool composing, + bool positional, + bool last_option) +{ + // Compose the name for boost::po. + // It takes the format "long_name, short name" + const LLString comma(","); + LLString boost_option_name = option_name; + if(short_name != LLString::null) + { + boost_option_name += comma; + boost_option_name += short_name; + } + + LLCLPValue* value_desc = new LLCLPValue(); + value_desc->setMinTokens(token_count); + value_desc->setMaxTokens(token_count); + value_desc->setComposing(composing); + value_desc->setLastOption(last_option); + + boost::shared_ptr d( + new po::option_description(boost_option_name.c_str(), + value_desc, + description.c_str())); + + if(!notify_callback.empty()) + { + value_desc->setNotifyCallback(notify_callback); + } + + gOptionsDesc.add(d); + + if(positional) + { + gPositionalOptions.add(boost_option_name.c_str(), token_count); + } +} + +bool parseAndStoreResults(po::command_line_parser& clp) +{ + try + { + clp.options(gOptionsDesc); + clp.positional(gPositionalOptions); + clp.style(po::command_line_style::default_style + | po::command_line_style::allow_long_disguise); + po::basic_parsed_options opts = clp.run(); + po::store(opts, gVariableMap); + } + catch(po::error& e) + { + llwarns << "Caught Error:" << e.what() << llendl; + return false; + } + catch(LLCLPError& e) + { + llwarns << "Caught Error:" << e.what() << llendl; + return false; + } + catch(LLCLPLastOption&) + { + // Continue without parsing. + llwarns << "Found tokens past last option. Ignoring." << llendl; + + // boost::po will have stored a mal-formed option. + // All such options will be removed below. + for(po::variables_map::iterator i = gVariableMap.begin(); i != gVariableMap.end();) + { + po::variables_map::iterator tempI = i++; + if(tempI->second.empty()) + { + gVariableMap.erase(tempI); + } + } + } + return true; +} + +bool LLCommandLineParser::parseCommandLine(int argc, char **argv) +{ + po::command_line_parser clp(argc, argv); + return parseAndStoreResults(clp); +} + +bool LLCommandLineParser::parseCommandLineString(const std::string& str) +{ + // Split the string content into tokens + boost::escaped_list_separator sep("\\", "\r\n ", "\"'"); + boost::tokenizer< boost::escaped_list_separator > tok(str, sep); + std::vector tokens; + // std::copy(tok.begin(), tok.end(), std::back_inserter(tokens)); + for(boost::tokenizer< boost::escaped_list_separator >::iterator i = tok.begin(); + i != tok.end(); + ++i) + { + if(0 != i->size()) + { + tokens.push_back(*i); + } + } + + po::command_line_parser clp(tokens); + return parseAndStoreResults(clp); + +} + +bool LLCommandLineParser::parseCommandLineFile(const std::basic_istream < char >& file) +{ + std::string args; + read_file_into_string(args, file); + + return parseCommandLineString(args); +} + +void LLCommandLineParser::notify() +{ + po::notify(gVariableMap); +} + +void LLCommandLineParser::printOptions() const +{ + for(po::variables_map::iterator i = gVariableMap.begin(); i != gVariableMap.end(); ++i) + { + std::string name = i->first; + token_vector_t values = i->second.as(); + std::ostringstream oss; + oss << name << ": "; + for(token_vector_t::iterator t_itr = values.begin(); t_itr != values.end(); ++t_itr) + { + oss << t_itr->c_str() << " "; + } + llinfos << oss.str() << llendl; + } +} + +std::ostream& LLCommandLineParser::printOptionsDesc(std::ostream& os) const +{ + return os << gOptionsDesc; +} + +bool LLCommandLineParser::hasOption(const std::string& name) const +{ + return gVariableMap.count(name) > 0; +} + +const LLCommandLineParser::token_vector_t& LLCommandLineParser::getOption(const std::string& name) const +{ + if(hasOption(name)) + { + return gVariableMap[name].as(); + } + + return gEmptyValue; +} + +//---------------------------------------------------------------------------- +// LLControlGroupCLP defintions +//---------------------------------------------------------------------------- +void setControlValueCB(const LLCommandLineParser::token_vector_t& value, + const LLString& opt_name, + LLControlGroup* ctrlGroup) +{ + if(value.size() > 1) + { + llwarns << "Ignoring extra tokens mapped to the setting: " << opt_name << "." << llendl; + } + + // *FIX: Do sematic conversion here. + // LLSD (ImplString) Is no good for doing string to type conversion for... + // booleans + // compound types + // ?... + + LLControlVariable* ctrl = ctrlGroup->getControl(opt_name); + if(NULL != ctrl) + { + switch(ctrl->type()) + { + case TYPE_BOOLEAN: + if(value.size() > 1) + { + llwarns << "Ignoring extra tokens." << llendl; + } + + if(value.size() > 0) + { + // There's a token. check the string for true/false/1/0 etc. + BOOL result = false; + BOOL gotSet = LLString::convertToBOOL(value[0], result); + if(gotSet) + { + ctrl->setValue(LLSD(result), false); + } + } + else + { + ctrl->setValue(LLSD(true), false); + } + break; + + default: + { + // For the default types, let llsd do the conversion. + if(value.size() > 1) + { + // Assume its an array... + LLSD llsdArray; + for(unsigned int i = 0; i < value.size(); ++i) + { + LLSD llsdValue; + llsdValue.assign(LLSD::String(value[i])); + llsdArray.set(i, llsdValue); + } + + ctrl->setValue(llsdArray, false); + } + else if(value.size() > 0) + { + LLSD llsdValue; + llsdValue.assign(LLSD::String(value[0])); + ctrl->setValue(llsdValue, false); + } + } + break; + } + } + else + { + llwarns << "Command Line option mapping '" + << opt_name + << "' not found! Ignoring." + << llendl; + } +} + +void LLControlGroupCLP::configure(const LLString& config_filename, LLControlGroup* controlGroup) +{ + // This method reads the llsd based config file, and uses it to set + // members of a control group. + LLSD clpConfigLLSD; + + llifstream input_stream; + input_stream.open(config_filename.c_str(), std::ios::in | std::ios::binary); + + if(input_stream.is_open()) + { + LLSDSerialize::fromXML(clpConfigLLSD, input_stream); + for(LLSD::map_iterator option_itr = clpConfigLLSD.beginMap(); + option_itr != clpConfigLLSD.endMap(); + ++option_itr) + { + LLSD::String long_name = option_itr->first; + LLSD option_params = option_itr->second; + + LLString desc("n/a"); + if(option_params.has("desc")) + { + desc = option_params["desc"].asString(); + } + + LLString short_name = LLString::null; + if(option_params.has("short")) + { + short_name = option_params["short"].asString(); + } + + unsigned int token_count = 0; + if(option_params.has("count")) + { + token_count = option_params["count"].asInteger(); + } + + bool composing = false; + if(option_params.has("compose")) + { + composing = option_params["compose"].asBoolean(); + } + + bool positional = false; + if(option_params.has("positional")) + { + positional = option_params["positional"].asBoolean(); + } + + bool last_option = false; + if(option_params.has("last_option")) + { + last_option = option_params["last_option"].asBoolean(); + } + + boost::function1 callback; + if(option_params.has("map-to") && (NULL != controlGroup)) + { + LLString controlName = option_params["map-to"].asString(); + callback = boost::bind(setControlValueCB, _1, + controlName, controlGroup); + } + + this->addOptionDesc( + long_name, + callback, + token_count, + desc, + short_name, + composing, + positional, + last_option); + } + } +} diff --git a/indra/newview/llcommandlineparser.h b/indra/newview/llcommandlineparser.h new file mode 100644 index 0000000000..6cc40ee8b4 --- /dev/null +++ b/indra/newview/llcommandlineparser.h @@ -0,0 +1,131 @@ +/** + * @file llcommandlineparser.h + * @brief LLCommandLineParser class declaration + * + * $LicenseInfo:firstyear=2007&license=viewergpl$ + * + * Copyright (c) 2007, 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://secondlife.com/developers/opensource/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://secondlife.com/developers/opensource/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_LLCOMMANDLINEPARSER_H +#define LL_LLCOMMANDLINEPARSER_H + +#include + +/** + * @class LLCommandLineParser + * @brief Handle defining and parsing the command line. + */ +class LLCommandLineParser +{ +public: + typedef std::vector< std::string > token_vector_t; + + /** + * @brief Add a value-less option to the command line description. + * @param option_name The long name of the cmd-line option. + * @param description The text description of the option usage. + */ + void addOptionDesc( + const LLString& option_name, + boost::function1 notify_callback = 0, + unsigned int num_tokens = 0, + const LLString& description = LLString::null, + const LLString& short_name = LLString::null, + bool composing = false, + bool positional = false, + bool last_option = false); + + + /** + * @brief Parse the command line given by argc/argv. + */ + bool parseCommandLine(int argc, char **argv); + + /** + * @brief Parse the command line contained by the given file. + */ + bool parseCommandLineString(const std::string& str); + + /** + * @brief Parse the command line contained by the given file. + */ + bool parseCommandLineFile(const std::basic_istream< char >& file); + + /** + * @brief Call callbacks associated with option descriptions. + * + * Use this to handle the results of parsing. + */ + void notify(); + + /** @brief Print a description of the configured options. + * + * Use this to print a description of options to the + * given ostream. Useful for displaying usage info. + */ + std::ostream& printOptionsDesc(std::ostream& os) const; + + /** @brief Manual option setting accessors. + * + * Use these to retrieve get the values set for an option. + * getOption will return an empty value if the option isn't + * set. + */ + bool hasOption(const std::string& name) const; + const token_vector_t& getOption(const std::string& name) const; + + void printOptions() const; +}; + +inline std::ostream& operator<<(std::ostream& out, const LLCommandLineParser& clp) +{ + return clp.printOptionsDesc(out); +} + +class LLControlGroup; + +/** + * @class LLControlGroupCLP + * @brief Uses the CLP to configure an LLControlGroup + * + * + */ +class LLControlGroupCLP : public LLCommandLineParser +{ +public: + /** + * @brief Configure the command line parser according the given config file. + * + * @param config_filename The name of the XML based LLSD config file. + * @param clp A reference to the command line parser object to configure. + * + * *FIX:Mani Specify config file format. + */ + void configure(const LLString& config_filename, + LLControlGroup* controlGroup); +}; + +#endif // LL_LLCOMMANDLINEPARSER_H diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index bf7d48f911..e6fcfb6d40 100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -483,7 +483,7 @@ void LLFeatureManager::applyFeatures(bool skipFeatures) } // get the control setting - LLControlBase* ctrl = gSavedSettings.getControl(mIt->first); + LLControlVariable* ctrl = gSavedSettings.getControl(mIt->first); if(ctrl == NULL) { llwarns << "AHHH! Control setting " << mIt->first << " does not exist!" << llendl; diff --git a/indra/newview/llfirstuse.cpp b/indra/newview/llfirstuse.cpp index 97ebc02ba1..b00450eec6 100644 --- a/indra/newview/llfirstuse.cpp +++ b/indra/newview/llfirstuse.cpp @@ -49,7 +49,8 @@ std::set LLFirstUse::sConfigVariables; // static void LLFirstUse::addConfigVariable(const LLString& var) { - gSavedSettings.addWarning(var); + //Don't add the warning, now that we're storing the default in the settings_default.xml file + //gSavedSettings.addWarning(var); sConfigVariables.insert(var); } @@ -256,13 +257,15 @@ void LLFirstUse::useSculptedPrim() // static void LLFirstUse::useVoice() { - if (gDisableVoice) return; - if (gSavedSettings.getWarning("FirstVoice")) - { - gSavedSettings.setWarning("FirstVoice", FALSE); - - LLFloaterVoiceWizard::showInstance(); - } + if (!gSavedSettings.getBOOL("CmdLineDisableVoice")) + { + if (gSavedSettings.getWarning("FirstVoice")) + { + gSavedSettings.setWarning("FirstVoice", FALSE); + + LLFloaterVoiceWizard::showInstance(); + } + } } // static diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index bf8b1fd663..60385b8ca5 100644 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -84,7 +84,7 @@ LLFloaterAbout::LLFloaterAbout() + llformat(" %d.%d.%d (%d) %s %s (%s)", LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VIEWER_BUILD, __DATE__, __TIME__, - gChannelName.c_str()); + gSavedSettings.getString("VersionChannelName").c_str()); support.append(version); support.append("\n\n"); diff --git a/indra/newview/llfloatergroups.cpp b/indra/newview/llfloatergroups.cpp index 4573ca75d2..7a0f01e5a6 100644 --- a/indra/newview/llfloatergroups.cpp +++ b/indra/newview/llfloatergroups.cpp @@ -173,8 +173,7 @@ bool LLPanelGroups::handleEvent(LLPointer event, const LLSD& userdata) reset(); return true; } - - return LLView::handleEvent(event, userdata); + return false; } // Default constructor diff --git a/indra/newview/llfloatergroups.h b/indra/newview/llfloatergroups.h index a1740861d5..6d99f34085 100644 --- a/indra/newview/llfloatergroups.h +++ b/indra/newview/llfloatergroups.h @@ -83,7 +83,7 @@ protected: static instance_map_t sInstances; }; -class LLPanelGroups : public LLPanel +class LLPanelGroups : public LLPanel, public LLSimpleListener { public: LLPanelGroups(); diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 584d7479e4..345561f551 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -446,7 +446,7 @@ void LLFloaterPreference::onBtnOK( void* userdata ) fp->apply(); fp->close(false); - gSavedSettings.saveToFile( gSettingsFileName, TRUE ); + gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE ); std::string crash_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE); // save all settings, even if equals defaults diff --git a/indra/newview/llfloatersettingsdebug.cpp b/indra/newview/llfloatersettingsdebug.cpp new file mode 100644 index 0000000000..7975bd95ef --- /dev/null +++ b/indra/newview/llfloatersettingsdebug.cpp @@ -0,0 +1,490 @@ +/** + * @file llfloatersettingsdebug.cpp + * @brief floater for debugging internal viewer settings + * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * + * Copyright (c) 2001-2007, 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://secondlife.com/developers/opensource/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://secondlife.com/developers/opensource/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" +#include "llfloatersettingsdebug.h" +#include "llfloater.h" +#include "llvieweruictrlfactory.h" +#include "llfirstuse.h" +#include "llcombobox.h" +#include "llspinctrl.h" +#include "llcolorswatch.h" +#include "llviewercontrol.h" + +LLFloaterSettingsDebug* LLFloaterSettingsDebug::sInstance = NULL; + +LLFloaterSettingsDebug::LLFloaterSettingsDebug() : LLFloater("Configuration Editor") +{ +} + +LLFloaterSettingsDebug::~LLFloaterSettingsDebug() +{ + sInstance = NULL; +} + +BOOL LLFloaterSettingsDebug::postBuild() +{ + LLComboBox* settings_combo = LLUICtrlFactory::getComboBoxByName(this, "settings_combo"); + + struct f : public LLControlGroup::ApplyFunctor + { + LLComboBox* combo; + f(LLComboBox* c) : combo(c) {} + virtual void apply(const LLString& name, LLControlVariable* control) + { + combo->add(name, (void*)control); + } + } func(settings_combo); + + gSavedSettings.applyToAll(&func); + gSavedPerAccountSettings.applyToAll(&func); + gColors.applyToAll(&func); + + settings_combo->sortByName(); + settings_combo->setCommitCallback(onSettingSelect); + settings_combo->setCallbackUserData(this); + settings_combo->updateSelection(); + + childSetCommitCallback("val_spinner_1", onCommitSettings); + childSetUserData("val_spinner_1", this); + childSetCommitCallback("val_spinner_2", onCommitSettings); + childSetUserData("val_spinner_2", this); + childSetCommitCallback("val_spinner_3", onCommitSettings); + childSetUserData("val_spinner_3", this); + childSetCommitCallback("val_spinner_4", onCommitSettings); + childSetUserData("val_spinner_4", this); + childSetCommitCallback("val_text", onCommitSettings); + childSetUserData("val_text", this); + childSetCommitCallback("boolean_combo", onCommitSettings); + childSetUserData("boolean_combo", this); + childSetCommitCallback("color_swatch", onCommitSettings); + childSetUserData("color_swatch", this); + childSetAction("default_btn", onClickDefault, this); + mComment = getChild("comment_text"); + return TRUE; +} + +void LLFloaterSettingsDebug::draw() +{ + LLComboBox* settings_combo = getChild("settings_combo"); + LLControlVariable* controlp = (LLControlVariable*)settings_combo->getCurrentUserdata(); + updateControl(controlp); + + LLFloater::draw(); +} + +//static +void LLFloaterSettingsDebug::show(void*) +{ + if (sInstance == NULL) + { + sInstance = new LLFloaterSettingsDebug(); + + gUICtrlFactory->buildFloater(sInstance, "floater_settings_debug.xml"); + } + + sInstance->open(); /* Flawfinder: ignore */ +} + +//static +void LLFloaterSettingsDebug::onSettingSelect(LLUICtrl* ctrl, void* user_data) +{ + LLFloaterSettingsDebug* floaterp = (LLFloaterSettingsDebug*)user_data; + LLComboBox* combo_box = (LLComboBox*)ctrl; + LLControlVariable* controlp = (LLControlVariable*)combo_box->getCurrentUserdata(); + + floaterp->updateControl(controlp); +} + +//static +void LLFloaterSettingsDebug::onCommitSettings(LLUICtrl* ctrl, void* user_data) +{ + LLFloaterSettingsDebug* floaterp = (LLFloaterSettingsDebug*)user_data; + + LLComboBox* settings_combo = floaterp->getChild("settings_combo"); + LLControlVariable* controlp = (LLControlVariable*)settings_combo->getCurrentUserdata(); + + LLVector3 vector; + LLVector3d vectord; + LLRect rect; + LLColor4 col4; + LLColor3 col3; + LLColor4U col4U; + LLColor4 color_with_alpha; + + switch(controlp->type()) + { + case TYPE_U32: + controlp->set(floaterp->childGetValue("val_spinner_1")); + break; + case TYPE_S32: + controlp->set(floaterp->childGetValue("val_spinner_1")); + break; + case TYPE_F32: + controlp->set(LLSD(floaterp->childGetValue("val_spinner_1").asReal())); + break; + case TYPE_BOOLEAN: + controlp->set(floaterp->childGetValue("boolean_combo")); + break; + case TYPE_STRING: + controlp->set(LLSD(floaterp->childGetValue("val_text").asString())); + break; + case TYPE_VEC3: + vector.mV[VX] = (F32)floaterp->childGetValue("val_spinner_1").asReal(); + vector.mV[VY] = (F32)floaterp->childGetValue("val_spinner_2").asReal(); + vector.mV[VZ] = (F32)floaterp->childGetValue("val_spinner_3").asReal(); + controlp->set(vector.getValue()); + break; + case TYPE_VEC3D: + vectord.mdV[VX] = floaterp->childGetValue("val_spinner_1").asReal(); + vectord.mdV[VY] = floaterp->childGetValue("val_spinner_2").asReal(); + vectord.mdV[VZ] = floaterp->childGetValue("val_spinner_3").asReal(); + controlp->set(vectord.getValue()); + break; + case TYPE_RECT: + rect.mLeft = floaterp->childGetValue("val_spinner_1").asInteger(); + rect.mRight = floaterp->childGetValue("val_spinner_2").asInteger(); + rect.mBottom = floaterp->childGetValue("val_spinner_3").asInteger(); + rect.mTop = floaterp->childGetValue("val_spinner_4").asInteger(); + controlp->set(rect.getValue()); + break; + case TYPE_COL4: + col3.setValue(floaterp->childGetValue("color_swatch")); + col4 = LLColor4(col3, (F32)floaterp->childGetValue("val_spinner_4").asReal()); + controlp->set(col4.getValue()); + break; + case TYPE_COL3: + controlp->set(floaterp->childGetValue("color_swatch")); + //col3.mV[VRED] = (F32)floaterp->childGetValue("val_spinner_1").asC(); + //col3.mV[VGREEN] = (F32)floaterp->childGetValue("val_spinner_2").asReal(); + //col3.mV[VBLUE] = (F32)floaterp->childGetValue("val_spinner_3").asReal(); + //controlp->set(col3.getValue()); + break; + case TYPE_COL4U: + col3.setValue(floaterp->childGetValue("color_swatch")); + col4U.setVecScaleClamp(col3); + col4U.mV[VALPHA] = floaterp->childGetValue("val_spinner_4").asInteger(); + controlp->set(col4U.getValue()); + break; + default: + break; + } +} + +// static +void LLFloaterSettingsDebug::onClickDefault(void* user_data) +{ + LLFloaterSettingsDebug* floaterp = (LLFloaterSettingsDebug*)user_data; + LLComboBox* settings_combo = floaterp->getChild("settings_combo"); + LLControlVariable* controlp = (LLControlVariable*)settings_combo->getCurrentUserdata(); + + if (controlp) + { + controlp->resetToDefault(); + floaterp->updateControl(controlp); + } +} + +// we've switched controls, or doing per-frame update, so update spinners, etc. +void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp) +{ + LLSpinCtrl* spinner1 = LLUICtrlFactory::getSpinnerByName(this, "val_spinner_1"); + LLSpinCtrl* spinner2 = LLUICtrlFactory::getSpinnerByName(this, "val_spinner_2"); + LLSpinCtrl* spinner3 = LLUICtrlFactory::getSpinnerByName(this, "val_spinner_3"); + LLSpinCtrl* spinner4 = LLUICtrlFactory::getSpinnerByName(this, "val_spinner_4"); + LLColorSwatchCtrl* color_swatch = getChild("color_swatch"); + + if (!spinner1 || !spinner2 || !spinner3 || !spinner4 || !color_swatch) + { + llwarns << "Could not find all desired controls by name" + << llendl; + return; + } + + spinner1->setVisible(FALSE); + spinner2->setVisible(FALSE); + spinner3->setVisible(FALSE); + spinner4->setVisible(FALSE); + color_swatch->setVisible(FALSE); + childSetVisible("val_text", FALSE); + childSetVisible("boolean_combo", FALSE); + mComment->setText(LLString::null); + + if (controlp) + { + eControlType type = controlp->type(); + mComment->setText(controlp->getComment()); + spinner1->setMaxValue(F32_MAX); + spinner2->setMaxValue(F32_MAX); + spinner3->setMaxValue(F32_MAX); + spinner4->setMaxValue(F32_MAX); + spinner1->setMinValue(-F32_MAX); + spinner2->setMinValue(-F32_MAX); + spinner3->setMinValue(-F32_MAX); + spinner4->setMinValue(-F32_MAX); + if (!spinner1->hasFocus()) + { + spinner1->setIncrement(0.1f); + } + if (!spinner2->hasFocus()) + { + spinner2->setIncrement(0.1f); + } + if (!spinner3->hasFocus()) + { + spinner3->setIncrement(0.1f); + } + if (!spinner4->hasFocus()) + { + spinner4->setIncrement(0.1f); + } + + LLSD sd = controlp->get(); + switch(type) + { + case TYPE_U32: + spinner1->setVisible(TRUE); + spinner1->setLabel(LLString("value")); // Debug, don't translate + if (!spinner1->hasFocus()) + { + spinner1->setValue(sd); + spinner1->setMinValue((F32)U32_MIN); + spinner1->setMaxValue((F32)U32_MAX); + spinner1->setIncrement(1.f); + spinner1->setPrecision(0); + } + break; + case TYPE_S32: + spinner1->setVisible(TRUE); + spinner1->setLabel(LLString("value")); // Debug, don't translate + if (!spinner1->hasFocus()) + { + spinner1->setValue(sd); + spinner1->setMinValue((F32)S32_MIN); + spinner1->setMaxValue((F32)S32_MAX); + spinner1->setIncrement(1.f); + spinner1->setPrecision(0); + } + break; + case TYPE_F32: + spinner1->setVisible(TRUE); + spinner1->setLabel(LLString("value")); // Debug, don't translate + if (!spinner1->hasFocus()) + { + spinner1->setPrecision(3); + spinner1->setValue(sd); + } + break; + case TYPE_BOOLEAN: + childSetVisible("boolean_combo", TRUE); + + if (!childHasFocus("boolean_combo")) + { + if (sd.asBoolean()) + { + childSetValue("boolean_combo", LLSD("true")); + } + else + { + childSetValue("boolean_combo", LLSD("")); + } + } + break; + case TYPE_STRING: + childSetVisible("val_text", TRUE); + if (!childHasFocus("val_text")) + { + childSetValue("val_text", sd); + } + break; + case TYPE_VEC3: + { + LLVector3 v; + v.setValue(sd); + spinner1->setVisible(TRUE); + spinner1->setLabel(LLString("X")); + spinner2->setVisible(TRUE); + spinner2->setLabel(LLString("Y")); + spinner3->setVisible(TRUE); + spinner3->setLabel(LLString("Z")); + if (!spinner1->hasFocus()) + { + spinner1->setPrecision(3); + spinner1->setValue(v[VX]); + } + if (!spinner2->hasFocus()) + { + spinner2->setPrecision(3); + spinner2->setValue(v[VY]); + } + if (!spinner3->hasFocus()) + { + spinner3->setPrecision(3); + spinner3->setValue(v[VZ]); + } + break; + } + case TYPE_VEC3D: + { + LLVector3d v; + v.setValue(sd); + spinner1->setVisible(TRUE); + spinner1->setLabel(LLString("X")); + spinner2->setVisible(TRUE); + spinner2->setLabel(LLString("Y")); + spinner3->setVisible(TRUE); + spinner3->setLabel(LLString("Z")); + if (!spinner1->hasFocus()) + { + spinner1->setPrecision(3); + spinner1->setValue(v[VX]); + } + if (!spinner2->hasFocus()) + { + spinner2->setPrecision(3); + spinner2->setValue(v[VY]); + } + if (!spinner3->hasFocus()) + { + spinner3->setPrecision(3); + spinner3->setValue(v[VZ]); + } + break; + } + case TYPE_RECT: + { + LLRect r; + r.setValue(sd); + spinner1->setVisible(TRUE); + spinner1->setLabel(LLString("Left")); + spinner2->setVisible(TRUE); + spinner2->setLabel(LLString("Right")); + spinner3->setVisible(TRUE); + spinner3->setLabel(LLString("Bottom")); + spinner4->setVisible(TRUE); + spinner4->setLabel(LLString("Top")); + if (!spinner1->hasFocus()) + { + spinner1->setPrecision(0); + spinner1->setValue(r.mLeft); + } + if (!spinner2->hasFocus()) + { + spinner2->setPrecision(0); + spinner2->setValue(r.mRight); + } + if (!spinner3->hasFocus()) + { + spinner3->setPrecision(0); + spinner3->setValue(r.mBottom); + } + if (!spinner4->hasFocus()) + { + spinner4->setPrecision(0); + spinner4->setValue(r.mTop); + } + + spinner1->setMinValue((F32)S32_MIN); + spinner1->setMaxValue((F32)S32_MAX); + spinner1->setIncrement(1.f); + + spinner2->setMinValue((F32)S32_MIN); + spinner2->setMaxValue((F32)S32_MAX); + spinner2->setIncrement(1.f); + + spinner3->setMinValue((F32)S32_MIN); + spinner3->setMaxValue((F32)S32_MAX); + spinner3->setIncrement(1.f); + + spinner4->setMinValue((F32)S32_MIN); + spinner4->setMaxValue((F32)S32_MAX); + spinner4->setIncrement(1.f); + break; + } + case TYPE_COL4: + { + LLColor4 clr; + clr.setValue(sd); + color_swatch->setVisible(TRUE); + // only set if changed so color picker doesn't update + if(clr != LLColor4(color_swatch->getValue())) + { + color_swatch->set(LLColor4(sd), TRUE, FALSE); + } + spinner4->setVisible(TRUE); + spinner4->setLabel(LLString("Alpha")); + if (!spinner4->hasFocus()) + { + spinner4->setPrecision(3); + spinner4->setMinValue(0.0); + spinner4->setMaxValue(1.f); + spinner4->setValue(clr.mV[VALPHA]); + } + break; + } + case TYPE_COL3: + { + LLColor3 clr; + clr.setValue(sd); + color_swatch->setVisible(TRUE); + color_swatch->setValue(sd); + break; + } + case TYPE_COL4U: + { + LLColor4U clr; + clr.setValue(sd); + color_swatch->setVisible(TRUE); + if(LLColor4(clr) != LLColor4(color_swatch->getValue())) + { + color_swatch->set(LLColor4(clr), TRUE, FALSE); + } + spinner4->setVisible(TRUE); + spinner4->setLabel(LLString("Alpha")); + if(!spinner4->hasFocus()) + { + spinner4->setPrecision(0); + spinner4->setValue(clr.mV[VALPHA]); + } + + spinner4->setMinValue(0); + spinner4->setMaxValue(255); + spinner4->setIncrement(1.f); + + break; + } + default: + mComment->setText(LLString("unknown")); + break; + } + } + +} diff --git a/indra/newview/llfloatersettingsdebug.h b/indra/newview/llfloatersettingsdebug.h new file mode 100644 index 0000000000..389a474467 --- /dev/null +++ b/indra/newview/llfloatersettingsdebug.h @@ -0,0 +1,61 @@ +/** + * @file llfloatersettingsdebug.h + * @brief floater for debugging internal viewer settings + * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * + * Copyright (c) 2001-2007, 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://secondlife.com/developers/opensource/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://secondlife.com/developers/opensource/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 LLFLOATERDEBUGSETTINGS_H +#define LLFLOATERDEBUGSETTINGS_H + +#include "llcontrol.h" +#include "llfloater.h" +#include "lltexteditor.h" + +class LLFloaterSettingsDebug : public LLFloater +{ +public: + LLFloaterSettingsDebug(); + virtual ~LLFloaterSettingsDebug(); + + virtual BOOL postBuild(); + virtual void draw(); + + void updateControl(LLControlVariable* control); + + static void show(void*); + static void onSettingSelect(LLUICtrl* ctrl, void* user_data); + static void onCommitSettings(LLUICtrl* ctrl, void* user_data); + static void onClickDefault(void* user_data); + +protected: + static LLFloaterSettingsDebug* sInstance; + LLTextEditor* mComment; +}; + +#endif //LLFLOATERDEBUGSETTINGS_H + diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 7ceb40499f..e24b5251e0 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -163,8 +163,6 @@ LLNetMap::LLNetMap( mPopupMenuHandle = menu->getHandle(); sInstance = this; - - gSavedSettings.getControl("MiniMapRotate")->addListener(&mNetMapListener); } LLNetMap::~LLNetMap() @@ -828,9 +826,3 @@ void LLNetMap::handleZoomLevel(void* which) break; } } - -bool LLRotateNetMapListener::handleEvent(LLPointer event, const LLSD& user_data) -{ - LLNetMap::setRotateMap(event->getValue().asBoolean()); - return true; -} diff --git a/indra/newview/llnetmap.h b/indra/newview/llnetmap.h index d375413d1d..dc696238ea 100644 --- a/indra/newview/llnetmap.h +++ b/indra/newview/llnetmap.h @@ -45,12 +45,6 @@ class LLCoordGL; class LLTextBox; class LLMenuGL; -class LLRotateNetMapListener : public LLSimpleListener -{ -public: - bool handleEvent(LLPointer, const LLSD& user_data); -}; - class LLNetMap : public LLUICtrl { public: @@ -117,8 +111,6 @@ public: LLTextBox* mTextBoxNorthWest; LLTextBox* mTextBoxSouthWest; - LLRotateNetMapListener mNetMapListener; - static BOOL sRotateMap; static LLNetMap* sInstance; }; diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 1e933706e1..b6e8c1a7f3 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -206,7 +206,7 @@ void LLLoginHandler::parse(const LLSD& queryMap) if (LLAppViewer::instance()->getLoginURIs().size() == 0) { - snprintf(gGridName, MAX_STRING, "%s", gGridInfo[gGridChoice].mName); /* Flawfinder: ignore */ + gGridName = gGridInfo[gGridChoice].mName; /* Flawfinder: ignore */ LLAppViewer::instance()->resetURIs(); } @@ -429,7 +429,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, LLTextBox* channel_text = LLUICtrlFactory::getTextBoxByName(this, "channel_text"); if (channel_text) { - channel_text->setText(gChannelName); + channel_text->setText(gSavedSettings.getString("VersionChannelName")); channel_text->setClickedCallback(onClickVersion); channel_text->setCallbackUserData(this); } @@ -471,7 +471,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, // kick off a request to grab the url manually gResponsePtr = LLIamHereLogin::build( this ); - std::string login_page = LLAppViewer::instance()->getLoginPage(); + std::string login_page = gSavedSettings.getString("LoginPage"); if (login_page.empty()) { login_page = getString( "real_url" ); @@ -927,7 +927,7 @@ void LLPanelLogin::loadLoginPage() std::ostringstream oStr; - std::string login_page = LLAppViewer::instance()->getLoginPage(); + std::string login_page = gSavedSettings.getString("LoginPage"); if (login_page.empty()) { login_page = sInstance->getString( "real_url" ); @@ -984,24 +984,24 @@ void LLPanelLogin::loadLoginPage() } LLString firstname, lastname; - - if (gCmdLineFirstName.empty()) + + if(gSavedSettings.getLLSD("UserLoginInfo").size() == 3) + { + LLSD cmd_line_login = gSavedSettings.getLLSD("UserLoginInfo"); + firstname = cmd_line_login[0].asString(); + lastname = cmd_line_login[1].asString(); + password = cmd_line_login[2].asString(); + } + + if (firstname.empty()) { firstname = gSavedSettings.getString("FirstName"); } - else - { - firstname = gCmdLineFirstName; - } - if (gCmdLineLastName.empty()) + if (lastname.empty()) { lastname = gSavedSettings.getString("LastName"); } - else - { - lastname = gCmdLineLastName; - } LLString version = llformat("%d.%d.%d (%d)", LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VIEWER_BUILD); @@ -1020,9 +1020,9 @@ void LLPanelLogin::loadLoginPage() curl_free(curl_version); - if (!gCmdLinePassword.empty()) + if (!password.empty()) { - oStr << "&password=" << gCmdLinePassword; + oStr << "&password=" << password; } else if (!(password = load_password_from_disk()).empty()) { diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 13dfe45f3e..f7de5a8c35 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -447,7 +447,7 @@ BOOL idle_startup() { fclose(found_template); - U32 port = gAgent.mViewerPort; + U32 port = gSavedSettings.getU32("UserConnectionPort"); if ((NET_USE_OS_ASSIGNED_PORT == port) && // if nothing specified on command line (-port) (gSavedSettings.getBOOL("ConnectionPortEnabled"))) @@ -497,7 +497,7 @@ BOOL idle_startup() invalid_message_callback, NULL); - if (gSavedSettings.getBOOL("LogMessages") || gLogMessages) + if (gSavedSettings.getBOOL("LogMessages")) { llinfos << "Message logging activated!" << llendl; msg->startLogging(); @@ -516,18 +516,23 @@ BOOL idle_startup() } gAssetStorage = new LLViewerAssetStorage(msg, gXferManager, gVFS); - msg->mPacketRing.setDropPercentage(gPacketDropPercentage); - if (gInBandwidth != 0.f) + + F32 dropPercent = gSavedSettings.getF32("PacketDropPercentage"); + msg->mPacketRing.setDropPercentage(dropPercent); + + F32 inBandwidth = gSavedSettings.getF32("InBandwidth"); + F32 outBandwidth = gSavedSettings.getF32("OutBandwidth"); + if (inBandwidth != 0.f) { - llinfos << "Setting packetring incoming bandwidth to " << gInBandwidth << llendl; + llinfos << "Setting packetring incoming bandwidth to " << inBandwidth << llendl; msg->mPacketRing.setUseInThrottle(TRUE); - msg->mPacketRing.setInBandwidth(gInBandwidth); + msg->mPacketRing.setInBandwidth(inBandwidth); } - if (gOutBandwidth != 0.f) + if (outBandwidth != 0.f) { - llinfos << "Setting packetring outgoing bandwidth to " << gOutBandwidth << llendl; + llinfos << "Setting packetring outgoing bandwidth to " << outBandwidth << llendl; msg->mPacketRing.setUseOutThrottle(TRUE); - msg->mPacketRing.setOutBandwidth(gOutBandwidth); + msg->mPacketRing.setOutBandwidth(outBandwidth); } } @@ -541,7 +546,7 @@ BOOL idle_startup() // or audio cues in connection UI. //------------------------------------------------- - if (gUseAudio) + if (FALSE == gSavedSettings.getBOOL("NoAudio")) { #if LL_FMOD gAudiop = (LLAudioEngine *) new LLAudioEngine_FMOD(); @@ -586,14 +591,13 @@ BOOL idle_startup() show_connect_box = FALSE; } - else if( !gCmdLineFirstName.empty() - && !gCmdLineLastName.empty() - && !gCmdLinePassword.empty()) - { - firstname = gCmdLineFirstName; - lastname = gCmdLineLastName; + else if(gSavedSettings.getLLSD("UserLoginInfo").size() == 3) + { + LLSD cmd_line_login = gSavedSettings.getLLSD("UserLoginInfo"); + firstname = cmd_line_login[0].asString(); + lastname = cmd_line_login[1].asString(); - LLMD5 pass((unsigned char*)gCmdLinePassword.c_str()); + LLMD5 pass((unsigned char*)cmd_line_login[2].asString().c_str()); char md5pass[33]; /* Flawfinder: ignore */ pass.hex_digest(md5pass); password = md5pass; @@ -604,9 +608,9 @@ BOOL idle_startup() #else show_connect_box = FALSE; #endif - gAutoLogin = TRUE; - } - else if (gAutoLogin || gSavedSettings.getBOOL("AutoLogin")) + gSavedSettings.setBOOL("AutoLogin", TRUE); + } + else if (gSavedSettings.getBOOL("AutoLogin")) { firstname = gSavedSettings.getString("FirstName"); lastname = gSavedSettings.getString("LastName"); @@ -781,19 +785,14 @@ BOOL idle_startup() // create necessary directories // *FIX: these mkdir's should error check gDirUtilp->setLindenUserDir(firstname.c_str(), lastname.c_str()); + LLFile::mkdir(gDirUtilp->getLindenUserDir().c_str()); + // Set UserSettingsFile to the default value. + gSavedSettings.setString("UserSettingsFile", + gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, DEFAULT_SETTINGS_FILE)); - LLFile::mkdir(gDirUtilp->getLindenUserDir().c_str()); - - // the mute list is loaded in the llmutelist class. - - gSavedSettings.loadFromFile(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT,"overrides.xml")); - - // handle the per account settings setup - gPerAccountSettingsFileName = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, DEFAULT_SETTINGS_FILE); - - // per account settings. Set defaults here if not found. If we get a bunch of these, eventually move to a function. - gSavedPerAccountSettings.loadFromFile(gPerAccountSettingsFileName); + // Overwrite default user settings with user settings + LLAppViewer::instance()->loadSettingsFromDirectory(LL_PATH_PER_SL_ACCOUNT); // Need to set the LastLogoff time here if we don't have one. LastLogoff is used for "Recent Items" calculation // and startup time is close enough if we don't have a real value. @@ -828,7 +827,7 @@ BOOL idle_startup() gSavedSettings.setS32("ServerChoice", gGridChoice); if (gGridChoice == GRID_INFO_OTHER) { - snprintf(gGridName, MAX_STRING, "%s", server_label.c_str());/* Flawfinder: ignore */ + gGridName = server_label;/* Flawfinder: ignore */ } if ( user_picked_server ) @@ -932,7 +931,7 @@ BOOL idle_startup() //requested_options.push_back("inventory-meat"); //requested_options.push_back("inventory-skel-targets"); #if (!defined LL_MINIMIAL_REQUESTED_OPTIONS) - if(gRequestInventoryLibrary) + if(FALSE == gSavedSettings.getBOOL("NoInventoryLibrary")) { requested_options.push_back("inventory-lib-root"); requested_options.push_back("inventory-lib-owner"); @@ -952,7 +951,7 @@ BOOL idle_startup() requested_options.push_back("tutorial_setting"); requested_options.push_back("login-flags"); requested_options.push_back("global-textures"); - if(gGodConnect) + if(gSavedSettings.getBOOL("ConnectAsGod")) { gSavedSettings.setBOOL("UseDebugMenus", TRUE); requested_options.push_back("god-connect"); @@ -1239,7 +1238,6 @@ BOOL idle_startup() << (sAuthUriNum + 1) << ". "; auth_desc = s.str(); LLStartUp::setStartupState( STATE_LOGIN_AUTHENTICATE ); - sAuthUriNum++; return do_normal_idle; } break; @@ -1489,7 +1487,7 @@ BOOL idle_startup() args["[ERROR_MESSAGE]"] = emsg.str(); gViewerWindow->alertXml("ErrorMessage", args, login_alert_done); reset_login(); - gAutoLogin = FALSE; + gSavedSettings.setBOOL("AutoLogin", FALSE); show_connect_box = TRUE; } @@ -1509,7 +1507,7 @@ BOOL idle_startup() args["[ERROR_MESSAGE]"] = emsg.str(); gViewerWindow->alertXml("ErrorMessage", args, login_alert_done); reset_login(); - gAutoLogin = FALSE; + gSavedSettings.setBOOL("AutoLogin", FALSE); show_connect_box = TRUE; // Don't save an incorrect password to disk. save_password_to_disk(NULL); @@ -1533,7 +1531,7 @@ BOOL idle_startup() // Since we connected, save off the settings so the user doesn't have to // type the name/password again if we crash. - gSavedSettings.saveToFile(gSettingsFileName, TRUE); + gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE); // // Initialize classes w/graphics stuff. @@ -2100,7 +2098,7 @@ BOOL idle_startup() gSavedSettings.setString( "NextLoginLocation", "" ); // and make sure it's saved - gSavedSettings.saveToFile( gSettingsFileName, TRUE ); + gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile") , TRUE ); }; if (!gNoRender) @@ -2392,7 +2390,7 @@ void login_show() if( GRID_INFO_OTHER == gGridChoice ) { - LLPanelLogin::addServer( gGridName, GRID_INFO_OTHER ); + LLPanelLogin::addServer( gGridName.c_str(), GRID_INFO_OTHER ); } else { @@ -2440,7 +2438,7 @@ void login_callback(S32 option, void *userdata) { // turn off the setting and write out to disk gSavedSettings.setBOOL("RememberPassword", FALSE); - gSavedSettings.saveToFile(gSettingsFileName, TRUE); + gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile") , TRUE ); // stomp the saved password on disk save_password_to_disk(NULL); @@ -2634,7 +2632,7 @@ void login_alert_status(S32 option, void* user_data) void update_app(BOOL mandatory, const std::string& auth_msg) { // store off config state, as we might quit soon - gSavedSettings.saveToFile(gSettingsFileName, TRUE); + gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE); std::ostringstream message; @@ -2734,7 +2732,7 @@ void update_dialog_callback(S32 option, void *userdata) // *TODO change userserver to be grid on both viewer and sim, since // userserver no longer exists. query_map["userserver"] = gGridName; - query_map["channel"] = gChannelName; + query_map["channel"] = gSavedSettings.getString("VersionChannelName"); // *TODO constantize this guy LLURI update_url = LLURI::buildHTTP("secondlife.com", 80, "update.php", query_map); diff --git a/indra/newview/lltoolgun.cpp b/indra/newview/lltoolgun.cpp index ffa921125a..9c8bb97343 100644 --- a/indra/newview/lltoolgun.cpp +++ b/indra/newview/lltoolgun.cpp @@ -80,14 +80,10 @@ BOOL LLToolGun::handleHover(S32 x, S32 y, MASK mask) { if( gAgent.cameraMouselook() ) { - #if 1 //LL_WINDOWS || LL_DARWIN - const F32 NOMINAL_MOUSE_SENSITIVITY = 0.0025f; - #else - const F32 NOMINAL_MOUSE_SENSITIVITY = 0.025f; - #endif + const F32 NOMINAL_MOUSE_SENSITIVITY = 0.0025f; - - F32 mouse_sensitivity = clamp_rescale(gMouseSensitivity, 0.f, 15.f, 0.5f, 2.75f) * NOMINAL_MOUSE_SENSITIVITY; + F32 mouse_sensitivity = gSavedSettings.getF32("MouseSensitivity"); + mouse_sensitivity = clamp_rescale(mouse_sensitivity, 0.f, 15.f, 0.5f, 2.75f) * NOMINAL_MOUSE_SENSITIVITY; // ...move the view with the mouse @@ -98,7 +94,7 @@ BOOL LLToolGun::handleHover(S32 x, S32 y, MASK mask) if (dx != 0 || dy != 0) { // ...actually moved off center - if (gInvertMouse) + if (gSavedSettings.getBOOL("InvertMouse")) { gAgent.pitch(mouse_sensitivity * -dy); } diff --git a/indra/newview/llvectorperfoptions.cpp b/indra/newview/llvectorperfoptions.cpp index ca8ae2e886..34c10a4f72 100644 --- a/indra/newview/llvectorperfoptions.cpp +++ b/indra/newview/llvectorperfoptions.cpp @@ -31,101 +31,4 @@ #include "llviewerprecompiledheaders.h" -#include "llvectorperfoptions.h" -#include "llviewerjointmesh.h" -#include "llviewercontrol.h" - -// Initially, we test the performance of the vectorization code, then -// turn it off if it ends up being slower. JC -BOOL gVectorizePerfTest = TRUE; -BOOL gVectorizeEnable = FALSE; -U32 gVectorizeProcessor = 0; -BOOL gVectorizeSkin = FALSE; - -void update_vector_performances(void) -{ - char *vp; - - switch(gVectorizeProcessor) - { - case 2: vp = "SSE2"; break; // *TODO: replace the magic #s - case 1: vp = "SSE"; break; - default: vp = "COMPILER DEFAULT"; break; - } - llinfos << "Vectorization : " << ( gVectorizeEnable ? "ENABLED" : "DISABLED" ) << llendl ; - llinfos << "Vector Processor : " << vp << llendl ; - llinfos << "Vectorized Skinning : " << ( gVectorizeSkin ? "ENABLED" : "DISABLED" ) << llendl ; - - if(gVectorizeEnable && gVectorizeSkin) - { - switch(gVectorizeProcessor) - { - case 2: - LLViewerJointMesh::sUpdateGeometryFunc = &LLViewerJointMesh::updateGeometrySSE2; - break; - case 1: - LLViewerJointMesh::sUpdateGeometryFunc = &LLViewerJointMesh::updateGeometrySSE; - break; - default: - LLViewerJointMesh::sUpdateGeometryFunc = &LLViewerJointMesh::updateGeometryVectorized; - break; - } - } - else - { - LLViewerJointMesh::sUpdateGeometryFunc = &LLViewerJointMesh::updateGeometryOriginal; - } -} - - -class LLVectorizationEnableListener: public LLSimpleListener -{ - bool handleEvent(LLPointer event, const LLSD& userdata) - { - gVectorizeEnable = event->getValue().asBoolean(); - update_vector_performances(); - return true; - } -}; -static LLVectorizationEnableListener vectorization_enable_listener; - -class LLVectorizeSkinListener: public LLSimpleListener -{ - bool handleEvent(LLPointer event, const LLSD& userdata) - { - gVectorizeSkin = event->getValue().asBoolean(); - update_vector_performances(); - return true; - } -}; -static LLVectorizeSkinListener vectorize_skin_listener; - -class LLVectorProcessorListener: public LLSimpleListener -{ - bool handleEvent(LLPointer event, const LLSD& userdata) - { - gVectorizeProcessor = event->getValue().asInteger(); - update_vector_performances(); - return true; - } -}; -static LLVectorProcessorListener vector_processor_listener; - -void LLVectorPerformanceOptions::initClass() -{ - gVectorizePerfTest = gSavedSettings.getBOOL("VectorizePerfTest"); - gVectorizeEnable = gSavedSettings.getBOOL("VectorizeEnable"); - gVectorizeProcessor = gSavedSettings.getU32("VectorizeProcessor"); - gVectorizeSkin = gSavedSettings.getBOOL("VectorizeSkin"); - update_vector_performances(); - - // these are currently static in this file, so they can't move to settings_setup_listeners - gSavedSettings.getControl("VectorizeEnable")->addListener(&vectorization_enable_listener); - gSavedSettings.getControl("VectorizeProcessor")->addListener(&vector_processor_listener); - gSavedSettings.getControl("VectorizeSkin")->addListener(&vectorize_skin_listener); -} - -void LLVectorPerformanceOptions::cleanupClass() -{ -} - +// Deprecated - moved into llviewerjointmesh diff --git a/indra/newview/llvectorperfoptions.h b/indra/newview/llvectorperfoptions.h index dac4d1f86c..e2a0a37e33 100644 --- a/indra/newview/llvectorperfoptions.h +++ b/indra/newview/llvectorperfoptions.h @@ -32,10 +32,6 @@ #ifndef LL_VECTORPERFOPTIONS_H #define LL_VECTORPERFOPTIONS_H -namespace LLVectorPerformanceOptions -{ - void initClass(); // Run after configuration files are read. - void cleanupClass(); -}; +// Deprecated - moved into llviewerjointmesh #endif diff --git a/indra/newview/llvieweraudio.cpp b/indra/newview/llvieweraudio.cpp index affce91b79..fd85ac1bc1 100644 --- a/indra/newview/llvieweraudio.cpp +++ b/indra/newview/llvieweraudio.cpp @@ -65,7 +65,7 @@ void init_audio() BOOL mute_audio = gSavedSettings.getBOOL("MuteAudio"); - if (!mute_audio && gPreloadSounds) + if (!mute_audio && FALSE == gSavedSettings.getBOOL("NoPreload")) { gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndAlert"))); gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndBadKeystroke"))); diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 9c81f89e99..7733ef5ae1 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -36,26 +36,47 @@ #include "indra_constants.h" -#include "v3math.h" -#include "v3dmath.h" -#include "llrect.h" -#include "v4color.h" -#include "v4coloru.h" -#include "v3color.h" - -#include "llfloater.h" -#include "llvieweruictrlfactory.h" -#include "llfirstuse.h" -#include "llcombobox.h" -#include "llspinctrl.h" -#include "llcolorswatch.h" +// For Listeners +#include "audioengine.h" +#include "llagent.h" +#include "llconsole.h" +#include "lldrawpoolterrain.h" +#include "llflexibleobject.h" +#include "llfeaturemanager.h" +#include "llglslshader.h" +#include "llnetmap.h" +#include "llpanelgeneral.h" +#include "llpanelinput.h" +#include "llsky.h" +#include "llvieweraudio.h" +#include "llviewerimagelist.h" +#include "llviewerthrottle.h" +#include "llviewerwindow.h" +#include "llvoavatar.h" +#include "llvoiceclient.h" +#include "llvosky.h" +#include "llvotree.h" +#include "llvovolume.h" +#include "llworld.h" +#include "pipeline.h" +#include "llviewerjoystick.h" +#include "llviewerparcelmgr.h" +#include "llparcel.h" +#include "llnotify.h" +#include "llkeyboard.h" +#include "llerrorcontrol.h" +#include "llversionviewer.h" +#include "llappviewer.h" +#include "llvosurfacepatch.h" +#include "llvowlsky.h" +#include "llglimmediate.h" #ifdef TOGGLE_HACKED_GODLIKE_VIEWER BOOL gHackGodmode = FALSE; #endif -LLFloaterSettingsDebug* LLFloaterSettingsDebug::sInstance = NULL; +std::map gSettings; LLControlGroup gSavedSettings; // saved at end of session LLControlGroup gSavedPerAccountSettings; // saved at end of session LLControlGroup gViewerArt; // read-only @@ -65,461 +86,440 @@ LLControlGroup gCrashSettings; // saved at end of session LLString gLastRunVersion; LLString gCurrentVersion; -LLString gSettingsFileName; -LLString gPerAccountSettingsFileName; +extern BOOL gResizeScreenTexture; -LLFloaterSettingsDebug::LLFloaterSettingsDebug() : LLFloater("Configuration Editor") +//////////////////////////////////////////////////////////////////////////// +// Listeners + +static bool handleRenderAvatarMouselookChanged(const LLSD& newvalue) +{ + LLVOAvatar::sVisibleInFirstPerson = newvalue.asBoolean(); + return true; +} + +static bool handleRenderFarClipChanged(const LLSD& newvalue) { + F32 draw_distance = (F32) newvalue.asReal(); + gAgent.mDrawDistance = draw_distance; + if (gWorldPointer) + { + gWorldPointer->setLandFarClip(draw_distance); + } + return true; } -LLFloaterSettingsDebug::~LLFloaterSettingsDebug() +static bool handleTerrainDetailChanged(const LLSD& newvalue) { - sInstance = NULL; + LLDrawPoolTerrain::sDetailMode = newvalue.asInteger(); + return true; } -BOOL LLFloaterSettingsDebug::postBuild() + +static bool handleSetShaderChanged(const LLSD& newvalue) { - LLComboBox* settings_combo = LLUICtrlFactory::getComboBoxByName(this, "settings_combo"); + LLShaderMgr::setShaders(); + return true; +} - LLControlGroup::ctrl_name_table_t::iterator name_it; - for(name_it = gSavedSettings.mNameTable.begin(); name_it != gSavedSettings.mNameTable.end(); ++name_it) +static bool handleReleaseGLBufferChanged(const LLSD& newvalue) +{ + if (gPipeline.isInit()) { - settings_combo->add(name_it->first, (void*)name_it->second); + gPipeline.releaseGLBuffers(); + gPipeline.createGLBuffers(); } - for(name_it = gSavedPerAccountSettings.mNameTable.begin(); name_it != gSavedPerAccountSettings.mNameTable.end(); ++name_it) + return true; +} + +static bool handleVolumeLODChanged(const LLSD& newvalue) +{ + LLVOVolume::sLODFactor = (F32) newvalue.asReal(); + LLVOVolume::sDistanceFactor = 1.f-LLVOVolume::sLODFactor * 0.1f; + return true; +} + +static bool handleAvatarLODChanged(const LLSD& newvalue) +{ + LLVOAvatar::sLODFactor = (F32) newvalue.asReal(); + return true; +} + +static bool handleTerrainLODChanged(const LLSD& newvalue) +{ + LLVOSurfacePatch::sLODFactor = (F32)newvalue.asReal(); + //sqaure lod factor to get exponential range of [0,4] and keep + //a value of 1 in the middle of the detail slider for consistency + //with other detail sliders (see panel_preferences_graphics1.xml) + LLVOSurfacePatch::sLODFactor *= LLVOSurfacePatch::sLODFactor; + return true; +} + +static bool handleTreeLODChanged(const LLSD& newvalue) +{ + LLVOTree::sTreeFactor = (F32) newvalue.asReal(); + return true; +} + +static bool handleFlexLODChanged(const LLSD& newvalue) +{ + LLVolumeImplFlexible::sUpdateFactor = (F32) newvalue.asReal(); + return true; +} + +static bool handleGammaChanged(const LLSD& newvalue) +{ + F32 gamma = (F32) newvalue.asReal(); + if (gamma == 0.0f) { - settings_combo->add(name_it->first, (void*)name_it->second); + gamma = 1.0f; // restore normal gamma } - for(name_it = gColors.mNameTable.begin(); name_it != gColors.mNameTable.end(); ++name_it) + if (gViewerWindow && gViewerWindow->getWindow() && gamma != gViewerWindow->getWindow()->getGamma()) { - settings_combo->add(name_it->first, (void*)name_it->second); + // Only save it if it's changed + if (!gViewerWindow->getWindow()->setGamma(gamma)) + { + llwarns << "setGamma failed!" << llendl; + } } - settings_combo->sortByName(); - settings_combo->setCommitCallback(onSettingSelect); - settings_combo->setCallbackUserData(this); - settings_combo->updateSelection(); - - childSetCommitCallback("val_spinner_1", onCommitSettings); - childSetUserData("val_spinner_1", this); - childSetCommitCallback("val_spinner_2", onCommitSettings); - childSetUserData("val_spinner_2", this); - childSetCommitCallback("val_spinner_3", onCommitSettings); - childSetUserData("val_spinner_3", this); - childSetCommitCallback("val_spinner_4", onCommitSettings); - childSetUserData("val_spinner_4", this); - childSetCommitCallback("val_text", onCommitSettings); - childSetUserData("val_text", this); - childSetCommitCallback("boolean_combo", onCommitSettings); - childSetUserData("boolean_combo", this); - childSetCommitCallback("color_swatch", onCommitSettings); - childSetUserData("color_swatch", this); - childSetAction("default_btn", onClickDefault, this); - mComment = getChild("comment_text"); - return TRUE; -} - -void LLFloaterSettingsDebug::draw() -{ - LLComboBox* settings_combo = getChild("settings_combo"); - LLControlBase* controlp = (LLControlBase*)settings_combo->getCurrentUserdata(); - updateControl(controlp); - - LLFloater::draw(); -} - -//static -void LLFloaterSettingsDebug::show(void*) -{ - if (sInstance == NULL) - { - sInstance = new LLFloaterSettingsDebug(); - gUICtrlFactory->buildFloater(sInstance, "floater_settings_debug.xml"); - } + return true; +} - sInstance->open(); /* Flawfinder: ignore */ -} - -//static -void LLFloaterSettingsDebug::onSettingSelect(LLUICtrl* ctrl, void* user_data) -{ - LLFloaterSettingsDebug* floaterp = (LLFloaterSettingsDebug*)user_data; - LLComboBox* combo_box = (LLComboBox*)ctrl; - LLControlBase* controlp = (LLControlBase*)combo_box->getCurrentUserdata(); - - floaterp->updateControl(controlp); -} - -//static -void LLFloaterSettingsDebug::onCommitSettings(LLUICtrl* ctrl, void* user_data) -{ - LLFloaterSettingsDebug* floaterp = (LLFloaterSettingsDebug*)user_data; - - LLComboBox* settings_combo = floaterp->getChild("settings_combo"); - LLControlBase* controlp = (LLControlBase*)settings_combo->getCurrentUserdata(); - - LLVector3 vector; - LLVector3d vectord; - LLRect rect; - LLColor4 col4; - LLColor3 col3; - LLColor4U col4U; - LLColor4 color_with_alpha; - - switch(controlp->type()) - { - case TYPE_U32: - controlp->set(floaterp->childGetValue("val_spinner_1")); - break; - case TYPE_S32: - controlp->set(floaterp->childGetValue("val_spinner_1")); - break; - case TYPE_F32: - controlp->set(LLSD(floaterp->childGetValue("val_spinner_1").asReal())); - break; - case TYPE_BOOLEAN: - controlp->set(floaterp->childGetValue("boolean_combo")); - break; - case TYPE_STRING: - controlp->set(LLSD(floaterp->childGetValue("val_text").asString())); - break; - case TYPE_VEC3: - vector.mV[VX] = (F32)floaterp->childGetValue("val_spinner_1").asReal(); - vector.mV[VY] = (F32)floaterp->childGetValue("val_spinner_2").asReal(); - vector.mV[VZ] = (F32)floaterp->childGetValue("val_spinner_3").asReal(); - controlp->set(vector.getValue()); - break; - case TYPE_VEC3D: - vectord.mdV[VX] = floaterp->childGetValue("val_spinner_1").asReal(); - vectord.mdV[VY] = floaterp->childGetValue("val_spinner_2").asReal(); - vectord.mdV[VZ] = floaterp->childGetValue("val_spinner_3").asReal(); - controlp->set(vectord.getValue()); - break; - case TYPE_RECT: - rect.mLeft = floaterp->childGetValue("val_spinner_1").asInteger(); - rect.mRight = floaterp->childGetValue("val_spinner_2").asInteger(); - rect.mBottom = floaterp->childGetValue("val_spinner_3").asInteger(); - rect.mTop = floaterp->childGetValue("val_spinner_4").asInteger(); - controlp->set(rect.getValue()); - break; - case TYPE_COL4: - col3.setValue(floaterp->childGetValue("color_swatch")); - col4 = LLColor4(col3, (F32)floaterp->childGetValue("val_spinner_4").asReal()); - controlp->set(col4.getValue()); - break; - case TYPE_COL3: - controlp->set(floaterp->childGetValue("color_swatch")); - //col3.mV[VRED] = (F32)floaterp->childGetValue("val_spinner_1").asC(); - //col3.mV[VGREEN] = (F32)floaterp->childGetValue("val_spinner_2").asReal(); - //col3.mV[VBLUE] = (F32)floaterp->childGetValue("val_spinner_3").asReal(); - //controlp->set(col3.getValue()); - break; - case TYPE_COL4U: - col3.setValue(floaterp->childGetValue("color_swatch")); - col4U.setVecScaleClamp(col3); - col4U.mV[VALPHA] = floaterp->childGetValue("val_spinner_4").asInteger(); - controlp->set(col4U.getValue()); - break; - default: - break; - } +const F32 MAX_USER_FOG_RATIO = 10.f; +const F32 MIN_USER_FOG_RATIO = 0.5f; + +static bool handleFogRatioChanged(const LLSD& newvalue) +{ + F32 fog_ratio = llmax(MIN_USER_FOG_RATIO, llmin((F32) newvalue.asReal(), MAX_USER_FOG_RATIO)); + gSky.setFogRatio(fog_ratio); + return true; +} + +static bool handleMaxPartCountChanged(const LLSD& newvalue) +{ + LLViewerPartSim::setMaxPartCount(newvalue.asInteger()); + return true; } -// static -void LLFloaterSettingsDebug::onClickDefault(void* user_data) +const S32 MAX_USER_COMPOSITE_LIMIT = 100; +const S32 MIN_USER_COMPOSITE_LIMIT = 0; + +static bool handleCompositeLimitChanged(const LLSD& newvalue) { - LLFloaterSettingsDebug* floaterp = (LLFloaterSettingsDebug*)user_data; - LLComboBox* settings_combo = floaterp->getChild("settings_combo"); - LLControlBase* controlp = (LLControlBase*)settings_combo->getCurrentUserdata(); + S32 composite_limit = llmax(MIN_USER_COMPOSITE_LIMIT, llmin((S32)newvalue.asInteger(), MAX_USER_COMPOSITE_LIMIT)); + LLVOAvatar::sMaxOtherAvatarsToComposite = composite_limit; + return true; +} - if (controlp) +static bool handleVideoMemoryChanged(const LLSD& newvalue) +{ + gImageList.updateMaxResidentTexMem(newvalue.asInteger()); + return true; +} + +static bool handleBandwidthChanged(const LLSD& newvalue) +{ + gViewerThrottle.setMaxBandwidth((F32) newvalue.asReal()); + return true; +} + +static bool handleChatFontSizeChanged(const LLSD& newvalue) +{ + if(gConsole) { - controlp->resetToDefault(); - floaterp->updateControl(controlp); + gConsole->setFontSize(newvalue.asInteger()); } + return true; } -// we've switched controls, or doing per-frame update, so update spinners, etc. -void LLFloaterSettingsDebug::updateControl(LLControlBase* controlp) +static bool handleChatPersistTimeChanged(const LLSD& newvalue) { - LLSpinCtrl* spinner1 = LLUICtrlFactory::getSpinnerByName(this, "val_spinner_1"); - LLSpinCtrl* spinner2 = LLUICtrlFactory::getSpinnerByName(this, "val_spinner_2"); - LLSpinCtrl* spinner3 = LLUICtrlFactory::getSpinnerByName(this, "val_spinner_3"); - LLSpinCtrl* spinner4 = LLUICtrlFactory::getSpinnerByName(this, "val_spinner_4"); - LLColorSwatchCtrl* color_swatch = getChild("color_swatch"); + if(gConsole) + { + gConsole->setLinePersistTime((F32) newvalue.asReal()); + } + return true; +} - if (!spinner1 || !spinner2 || !spinner3 || !spinner4 || !color_swatch) +static bool handleConsoleMaxLinesChanged(const LLSD& newvalue) +{ + if(gConsole) { - llwarns << "Could not find all desired controls by name" - << llendl; - return; + gConsole->setMaxLines(newvalue.asInteger()); } + return true; +} - spinner1->setVisible(FALSE); - spinner2->setVisible(FALSE); - spinner3->setVisible(FALSE); - spinner4->setVisible(FALSE); - color_swatch->setVisible(FALSE); - childSetVisible("val_text", FALSE); - mComment->setText(LLString::null); +static void handleAudioVolumeChanged(const LLSD& newvalue) +{ + audio_update_volume(true); +} - if (controlp) - { - eControlType type = controlp->type(); - mComment->setText(controlp->getComment()); - spinner1->setMaxValue(F32_MAX); - spinner2->setMaxValue(F32_MAX); - spinner3->setMaxValue(F32_MAX); - spinner4->setMaxValue(F32_MAX); - spinner1->setMinValue(-F32_MAX); - spinner2->setMinValue(-F32_MAX); - spinner3->setMinValue(-F32_MAX); - spinner4->setMinValue(-F32_MAX); - if (!spinner1->hasFocus()) - { - spinner1->setIncrement(0.1f); - } - if (!spinner2->hasFocus()) - { - spinner2->setIncrement(0.1f); - } - if (!spinner3->hasFocus()) - { - spinner3->setIncrement(0.1f); - } - if (!spinner4->hasFocus()) - { - spinner4->setIncrement(0.1f); - } +static bool handleJoystickChanged(const LLSD& newvalue) +{ + LLViewerJoystick::updateCamera(TRUE); + return true; +} - LLSD sd = controlp->get(); - switch(type) +static bool handleAudioStreamMusicChanged(const LLSD& newvalue) +{ + if (gAudiop) + { + if ( newvalue.asBoolean() ) { - case TYPE_U32: - spinner1->setVisible(TRUE); - spinner1->setLabel(LLString("value")); // Debug, don't translate - childSetVisible("boolean_combo", FALSE); - if (!spinner1->hasFocus()) + if (gParcelMgr + && gParcelMgr->getAgentParcel() + && !gParcelMgr->getAgentParcel()->getMusicURL().empty()) { - spinner1->setValue(sd); - spinner1->setMinValue((F32)U32_MIN); - spinner1->setMaxValue((F32)U32_MAX); - spinner1->setIncrement(1.f); - spinner1->setPrecision(0); - } - break; - case TYPE_S32: - spinner1->setVisible(TRUE); - spinner1->setLabel(LLString("value")); // Debug, don't translate - childSetVisible("boolean_combo", FALSE); - if (!spinner1->hasFocus()) - { - spinner1->setValue(sd); - spinner1->setMinValue((F32)S32_MIN); - spinner1->setMaxValue((F32)S32_MAX); - spinner1->setIncrement(1.f); - spinner1->setPrecision(0); - } - break; - case TYPE_F32: - spinner1->setVisible(TRUE); - spinner1->setLabel(LLString("value")); // Debug, don't translate - childSetVisible("boolean_combo", FALSE); - if (!spinner1->hasFocus()) - { - spinner1->setPrecision(3); - spinner1->setValue(sd); - } - break; - case TYPE_BOOLEAN: - childSetVisible("boolean_combo", TRUE); - - if (!childHasFocus("boolean_combo")) - { - if (sd.asBoolean()) + // if stream is already playing, don't call this + // otherwise music will briefly stop + if ( ! gAudiop->isInternetStreamPlaying() ) { - childSetValue("boolean_combo", LLSD("true")); + gAudiop->startInternetStream(gParcelMgr->getAgentParcel()->getMusicURL().c_str()); } - else - { - childSetValue("boolean_combo", LLSD("")); - } - } - break; - case TYPE_STRING: - childSetVisible("val_text", TRUE); - childSetVisible("boolean_combo", FALSE); - if (!childHasFocus("val_text")) - { - childSetValue("val_text", sd); - } - break; - case TYPE_VEC3: - { - childSetVisible("boolean_combo", FALSE); - LLVector3 v; - v.setValue(sd); - spinner1->setVisible(TRUE); - spinner1->setLabel(LLString("X")); - spinner2->setVisible(TRUE); - spinner2->setLabel(LLString("Y")); - spinner3->setVisible(TRUE); - spinner3->setLabel(LLString("Z")); - if (!spinner1->hasFocus()) - { - spinner1->setPrecision(3); - spinner1->setValue(v[VX]); - } - if (!spinner2->hasFocus()) - { - spinner2->setPrecision(3); - spinner2->setValue(v[VY]); - } - if (!spinner3->hasFocus()) - { - spinner3->setPrecision(3); - spinner3->setValue(v[VZ]); - } - break; - } - case TYPE_VEC3D: - { - childSetVisible("boolean_combo", FALSE); - LLVector3d v; - v.setValue(sd); - spinner1->setVisible(TRUE); - spinner1->setLabel(LLString("X")); - spinner2->setVisible(TRUE); - spinner2->setLabel(LLString("Y")); - spinner3->setVisible(TRUE); - spinner3->setLabel(LLString("Z")); - if (!spinner1->hasFocus()) - { - spinner1->setPrecision(3); - spinner1->setValue(v[VX]); - } - if (!spinner2->hasFocus()) - { - spinner2->setPrecision(3); - spinner2->setValue(v[VY]); - } - if (!spinner3->hasFocus()) - { - spinner3->setPrecision(3); - spinner3->setValue(v[VZ]); - } - break; - } - case TYPE_RECT: - { - childSetVisible("boolean_combo", FALSE); - LLRect r; - r.setValue(sd); - spinner1->setVisible(TRUE); - spinner1->setLabel(LLString("Left")); - spinner2->setVisible(TRUE); - spinner2->setLabel(LLString("Right")); - spinner3->setVisible(TRUE); - spinner3->setLabel(LLString("Bottom")); - spinner4->setVisible(TRUE); - spinner4->setLabel(LLString("Top")); - if (!spinner1->hasFocus()) - { - spinner1->setPrecision(0); - spinner1->setValue(r.mLeft); - } - if (!spinner2->hasFocus()) - { - spinner2->setPrecision(0); - spinner2->setValue(r.mRight); - } - if (!spinner3->hasFocus()) - { - spinner3->setPrecision(0); - spinner3->setValue(r.mBottom); - } - if (!spinner4->hasFocus()) - { - spinner4->setPrecision(0); - spinner4->setValue(r.mTop); } + } + else + { + gAudiop->stopInternetStream(); + } + } + return true; +} - spinner1->setMinValue((F32)S32_MIN); - spinner1->setMaxValue((F32)S32_MAX); - spinner1->setIncrement(1.f); - - spinner2->setMinValue((F32)S32_MIN); - spinner2->setMaxValue((F32)S32_MAX); - spinner2->setIncrement(1.f); - - spinner3->setMinValue((F32)S32_MIN); - spinner3->setMaxValue((F32)S32_MAX); - spinner3->setIncrement(1.f); - - spinner4->setMinValue((F32)S32_MIN); - spinner4->setMaxValue((F32)S32_MAX); - spinner4->setIncrement(1.f); - break; - } - case TYPE_COL4: - { - childSetVisible("boolean_combo", FALSE); - LLColor4 clr; - clr.setValue(sd); - color_swatch->setVisible(TRUE); - // only set if changed so color picker doesn't update - if(clr != LLColor4(color_swatch->getValue())) - { - color_swatch->set(LLColor4(sd), TRUE, FALSE); - } - spinner4->setVisible(TRUE); - spinner4->setLabel(LLString("Alpha")); - if (!spinner4->hasFocus()) - { - spinner4->setPrecision(3); - spinner4->setMinValue(0.0); - spinner4->setMaxValue(1.f); - spinner4->setValue(clr.mV[VALPHA]); - } - break; - } - case TYPE_COL3: - { - childSetVisible("boolean_combo", FALSE); - LLColor3 clr; - clr.setValue(sd); - color_swatch->setVisible(TRUE); - color_swatch->setValue(sd); - break; - } - case TYPE_COL4U: - { - childSetVisible("boolean_combo", FALSE); - LLColor4U clr; - clr.setValue(sd); - color_swatch->setVisible(TRUE); - if(LLColor4(clr) != LLColor4(color_swatch->getValue())) - { - color_swatch->set(LLColor4(clr), TRUE, FALSE); - } - spinner4->setVisible(TRUE); - spinner4->setLabel(LLString("Alpha")); - if(!spinner4->hasFocus()) - { - spinner4->setPrecision(0); - spinner4->setValue(clr.mV[VALPHA]); - } +static bool handleUseOcclusionChanged(const LLSD& newvalue) +{ + LLPipeline::sUseOcclusion = (newvalue.asBoolean() && gGLManager.mHasOcclusionQuery + && gFeatureManagerp->isFeatureAvailable("UseOcclusion") && !gUseWireframe) ? 2 : 0; + return true; +} - spinner4->setMinValue(0); - spinner4->setMaxValue(255); - spinner4->setIncrement(1.f); +static bool handleNumpadControlChanged(const LLSD& newvalue) +{ + if (gKeyboard) + { + gKeyboard->setNumpadDistinct(static_cast(newvalue.asInteger())); + } + return true; +} - break; - } - default: - mComment->setText(LLString("unknown")); - break; - } +static bool handleRenderUseVBOChanged(const LLSD& newvalue) +{ + if (gPipeline.isInit()) + { + gPipeline.setUseVBO(newvalue.asBoolean()); + } + return true; +} + +static bool handleWLSkyDetailChanged(const LLSD&) +{ + if (gSky.mVOWLSkyp.notNull()) + { + gSky.mVOWLSkyp->updateGeometry(gSky.mVOWLSkyp->mDrawable); } + return true; +} +static bool handleRenderLightingDetailChanged(const LLSD& newvalue) +{ + if (gPipeline.isInit()) + { + gPipeline.setLightingDetail(newvalue.asInteger()); + } + return true; } + +static bool handleResetVertexBuffersChanged(const LLSD&) +{ + if (gPipeline.isInit()) + { + gPipeline.resetVertexBuffers(); + } + return true; +} + +static bool handleRenderDynamicLODChanged(const LLSD& newvalue) +{ + LLPipeline::sDynamicLOD = newvalue.asBoolean(); + return true; +} + +static bool handleRenderUseFBOChanged(const LLSD& newvalue) +{ + LLRenderTarget::sUseFBO = newvalue.asBoolean(); + if (gPipeline.isInit()) + { + gPipeline.releaseGLBuffers(); + gPipeline.createGLBuffers(); + } + return true; +} + +static bool handleRenderUseImpostorsChanged(const LLSD& newvalue) +{ + LLVOAvatar::sUseImpostors = newvalue.asBoolean(); + return true; +} + +static bool handleRenderUseCleverUIChanged(const LLSD& newvalue) +{ + gGL.setClever(newvalue.asBoolean()); + return true; +} + +static bool handleRenderResolutionDivisorChanged(const LLSD&) +{ + gResizeScreenTexture = TRUE; + return true; +} + +static bool handleDebugViewsChanged(const LLSD& newvalue) +{ + LLView::sDebugRects = newvalue.asBoolean(); + return true; +} + +static bool handleLogFileChanged(const LLSD& newvalue) +{ + std::string log_filename = newvalue.asString(); + LLFile::remove(log_filename.c_str()); + LLError::logToFile(log_filename); + return true; +} + +bool handleHideGroupTitleChanged(const LLSD& newvalue) +{ + gAgent.setHideGroupTitle(newvalue); + return true; +} + +bool handleEffectColorChanged(const LLSD& newvalue) +{ + gAgent.setEffectColor(LLColor4(newvalue)); + return true; +} + +bool handleRotateNetMapChanged(const LLSD& newvalue) +{ + LLNetMap::setRotateMap(newvalue.asBoolean()); + return true; +} + +bool handleVectorizeChanged(const LLSD& newvalue) +{ + LLViewerJointMesh::updateVectorize(); + return true; +} + +bool handleVoiceClientPrefsChanged(const LLSD& newvalue) +{ + if(gVoiceClient) + { + // Note: Ignore the specific event value, look up the ones we want + + gVoiceClient->setVoiceEnabled(gSavedSettings.getBOOL("EnableVoiceChat")); + gVoiceClient->setUsePTT(gSavedSettings.getBOOL("PTTCurrentlyEnabled")); + std::string keyString = gSavedSettings.getString("PushToTalkButton"); + gVoiceClient->setPTTKey(keyString); + gVoiceClient->setPTTIsToggle(gSavedSettings.getBOOL("PushToTalkToggle")); + gVoiceClient->setEarLocation(gSavedSettings.getS32("VoiceEarLocation")); + std::string serverName = gSavedSettings.getString("VivoxDebugServerName"); + gVoiceClient->setVivoxDebugServerName(serverName); + + std::string inputDevice = gSavedSettings.getString("VoiceInputAudioDevice"); + gVoiceClient->setCaptureDevice(inputDevice); + std::string outputDevice = gSavedSettings.getString("VoiceOutputAudioDevice"); + gVoiceClient->setRenderDevice(outputDevice); + } + return true; +} + +//////////////////////////////////////////////////////////////////////////// + +void settings_setup_listeners() +{ + gSavedSettings.getControl("FirstPersonAvatarVisible")->getSignal()->connect(boost::bind(&handleRenderAvatarMouselookChanged, _1)); + gSavedSettings.getControl("RenderFarClip")->getSignal()->connect(boost::bind(&handleRenderFarClipChanged, _1)); + gSavedSettings.getControl("RenderTerrainDetail")->getSignal()->connect(boost::bind(&handleTerrainDetailChanged, _1)); + gSavedSettings.getControl("RenderAvatarVP")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1)); + gSavedSettings.getControl("VertexShaderEnable")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1)); + gSavedSettings.getControl("RenderDynamicReflections")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1)); + gSavedSettings.getControl("RenderGlow")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _1)); + gSavedSettings.getControl("RenderGlow")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1)); + gSavedSettings.getControl("EnableRippleWater")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1)); + gSavedSettings.getControl("RenderGlowResolutionPow")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _1)); + gSavedSettings.getControl("RenderAvatarCloth")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1)); + gSavedSettings.getControl("WindLightUseAtmosShaders")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1)); + gSavedSettings.getControl("RenderGammaFull")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1)); + gSavedSettings.getControl("RenderVolumeLODFactor")->getSignal()->connect(boost::bind(&handleVolumeLODChanged, _1)); + gSavedSettings.getControl("RenderAvatarLODFactor")->getSignal()->connect(boost::bind(&handleAvatarLODChanged, _1)); + gSavedSettings.getControl("RenderTerrainLODFactor")->getSignal()->connect(boost::bind(&handleTerrainLODChanged, _1)); + gSavedSettings.getControl("RenderTreeLODFactor")->getSignal()->connect(boost::bind(&handleTreeLODChanged, _1)); + gSavedSettings.getControl("RenderFlexTimeFactor")->getSignal()->connect(boost::bind(&handleFlexLODChanged, _1)); + gSavedSettings.getControl("ThrottleBandwidthKBPS")->getSignal()->connect(boost::bind(&handleBandwidthChanged, _1)); + gSavedSettings.getControl("RenderGamma")->getSignal()->connect(boost::bind(&handleGammaChanged, _1)); + gSavedSettings.getControl("RenderFogRatio")->getSignal()->connect(boost::bind(&handleFogRatioChanged, _1)); + gSavedSettings.getControl("RenderMaxPartCount")->getSignal()->connect(boost::bind(&handleMaxPartCountChanged, _1)); + gSavedSettings.getControl("RenderDynamicLOD")->getSignal()->connect(boost::bind(&handleRenderDynamicLODChanged, _1)); + gSavedSettings.getControl("RenderDebugTextureBind")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _1)); + gSavedSettings.getControl("RenderFastAlpha")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _1)); + gSavedSettings.getControl("RenderObjectBump")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _1)); + gSavedSettings.getControl("RenderMaxVBOSize")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _1)); + gSavedSettings.getControl("RenderUseFBO")->getSignal()->connect(boost::bind(&handleRenderUseFBOChanged, _1)); + gSavedSettings.getControl("RenderUseImpostors")->getSignal()->connect(boost::bind(&handleRenderUseImpostorsChanged, _1)); + gSavedSettings.getControl("RenderUseCleverUI")->getSignal()->connect(boost::bind(&handleRenderUseCleverUIChanged, _1)); + gSavedSettings.getControl("RenderResolutionDivisor")->getSignal()->connect(boost::bind(&handleRenderResolutionDivisorChanged, _1)); + gSavedSettings.getControl("AvatarCompositeLimit")->getSignal()->connect(boost::bind(&handleCompositeLimitChanged, _1)); + gSavedSettings.getControl("TextureMemory")->getSignal()->connect(boost::bind(&handleVideoMemoryChanged, _1)); + gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&handleChatFontSizeChanged, _1)); + gSavedSettings.getControl("ChatPersistTime")->getSignal()->connect(boost::bind(&handleChatPersistTimeChanged, _1)); + gSavedSettings.getControl("ConsoleMaxLines")->getSignal()->connect(boost::bind(&handleConsoleMaxLinesChanged, _1)); + gSavedSettings.getControl("UseOcclusion")->getSignal()->connect(boost::bind(&handleUseOcclusionChanged, _1)); + gSavedSettings.getControl("AudioLevelMaster")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1)); + gSavedSettings.getControl("AudioLevelSFX")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1)); + gSavedSettings.getControl("AudioLevelUI")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1)); + gSavedSettings.getControl("AudioLevelAmbient")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1)); + gSavedSettings.getControl("AudioLevelMusic")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1)); + gSavedSettings.getControl("AudioLevelMedia")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1)); + gSavedSettings.getControl("AudioLevelVoice")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1)); + gSavedSettings.getControl("AudioLevelDistance")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1)); + gSavedSettings.getControl("AudioLevelDoppler")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1)); + gSavedSettings.getControl("AudioLevelRolloff")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1)); + gSavedSettings.getControl("AudioStreamingMusic")->getSignal()->connect(boost::bind(&handleAudioStreamMusicChanged, _1)); + gSavedSettings.getControl("MuteAudio")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1)); + gSavedSettings.getControl("MuteMusic")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1)); + gSavedSettings.getControl("MuteMedia")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1)); + gSavedSettings.getControl("MuteVoice")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1)); + gSavedSettings.getControl("MuteAmbient")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1)); + gSavedSettings.getControl("MuteUI")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1)); + gSavedSettings.getControl("RenderVBOEnable")->getSignal()->connect(boost::bind(&handleRenderUseVBOChanged, _1)); + gSavedSettings.getControl("WLSkyDetail")->getSignal()->connect(boost::bind(&handleWLSkyDetailChanged, _1)); + gSavedSettings.getControl("RenderLightingDetail")->getSignal()->connect(boost::bind(&handleRenderLightingDetailChanged, _1)); + gSavedSettings.getControl("NumpadControl")->getSignal()->connect(boost::bind(&handleNumpadControlChanged, _1)); + gSavedSettings.getControl("FlycamAxis0")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1)); + gSavedSettings.getControl("FlycamAxis1")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1)); + gSavedSettings.getControl("FlycamAxis2")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1)); + gSavedSettings.getControl("FlycamAxis3")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1)); + gSavedSettings.getControl("FlycamAxis4")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1)); + gSavedSettings.getControl("FlycamAxis5")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1)); + gSavedSettings.getControl("FlycamAxis6")->getSignal()->connect(boost::bind(&handleJoystickChanged, _1)); + gSavedSettings.getControl("DebugViews")->getSignal()->connect(boost::bind(&handleDebugViewsChanged, _1)); + gSavedSettings.getControl("UserLogFile")->getSignal()->connect(boost::bind(&handleLogFileChanged, _1)); + gSavedSettings.getControl("RenderHideGroupTitle")->getSignal()->connect(boost::bind(handleHideGroupTitleChanged, _1)); + gSavedSettings.getControl("EffectColor")->getSignal()->connect(boost::bind(handleEffectColorChanged, _1)); + gSavedSettings.getControl("MiniMapRotate")->getSignal()->connect(boost::bind(handleRotateNetMapChanged, _1)); + gSavedSettings.getControl("VectorizePerfTest")->getSignal()->connect(boost::bind(&handleVectorizeChanged, _1)); + gSavedSettings.getControl("VectorizeEnable")->getSignal()->connect(boost::bind(&handleVectorizeChanged, _1)); + gSavedSettings.getControl("VectorizeProcessor")->getSignal()->connect(boost::bind(&handleVectorizeChanged, _1)); + gSavedSettings.getControl("VectorizeSkin")->getSignal()->connect(boost::bind(&handleVectorizeChanged, _1)); + gSavedSettings.getControl("EnableVoiceChat")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1)); + gSavedSettings.getControl("PTTCurrentlyEnabled")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1)); + gSavedSettings.getControl("PushToTalkButton")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1)); + gSavedSettings.getControl("PushToTalkToggle")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1)); + gSavedSettings.getControl("VoiceEarLocation")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1)); + gSavedSettings.getControl("VivoxDebugServerName")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1)); + gSavedSettings.getControl("VoiceInputAudioDevice")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1)); + gSavedSettings.getControl("VoiceOutputAudioDevice")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1)); +} + diff --git a/indra/newview/llviewercontrol.h b/indra/newview/llviewercontrol.h index c2a9dc9096..2727e36b53 100644 --- a/indra/newview/llviewercontrol.h +++ b/indra/newview/llviewercontrol.h @@ -32,9 +32,8 @@ #ifndef LL_LLVIEWERCONTROL_H #define LL_LLVIEWERCONTROL_H +#include #include "llcontrol.h" -#include "llfloater.h" -#include "lltexteditor.h" // Enabled this definition to compile a 'hacked' viewer that // allows a hacked godmode to be toggled on and off. @@ -43,33 +42,12 @@ extern BOOL gHackGodmode; #endif -class LLFloaterSettingsDebug : public LLFloater -{ -public: - LLFloaterSettingsDebug(); - virtual ~LLFloaterSettingsDebug(); - - virtual BOOL postBuild(); - virtual void draw(); - - void updateControl(LLControlBase* control); - - static void show(void*); - static void onSettingSelect(LLUICtrl* ctrl, void* user_data); - static void onCommitSettings(LLUICtrl* ctrl, void* user_data); - static void onClickDefault(void* user_data); - -protected: - static LLFloaterSettingsDebug* sInstance; - LLTextEditor* mComment; -}; - // These functions found in llcontroldef.cpp *TODO: clean this up! //setting variables are declared in this function -void declare_settings(); -void fixup_settings(); void settings_setup_listeners(); +extern std::map gSettings; + // for the graphics settings void create_graphics_group(LLControlGroup& group); @@ -90,7 +68,4 @@ extern LLControlGroup gCrashSettings; extern LLString gLastRunVersion; extern LLString gCurrentVersion; -extern LLString gSettingsFileName; -extern LLString gPerAccountSettingsFileName; - #endif // LL_LLVIEWERCONTROL_H diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp index 2677b33af8..fe00c25c63 100644 --- a/indra/newview/llviewerjointmesh.cpp +++ b/indra/newview/llviewerjointmesh.cpp @@ -866,13 +866,53 @@ static F64 sUpdateGeometryRunAvgOn[10]; static U32 sUpdateGeometryRunCount = 0 ; static U32 sUpdateGeometryCalls = 0 ; static U32 sUpdateGeometryLastProcessor = 0 ; +static BOOL sVectorizePerfTest = FALSE; +static U32 sVectorizeProcessor = 0; + +//static void (*LLViewerJointMesh::sUpdateGeometryFunc)(LLFace* face, LLPolyMesh* mesh); -void LLViewerJointMesh::updateGeometry() +//static +void LLViewerJointMesh::updateVectorize() { - extern BOOL gVectorizePerfTest; - extern U32 gVectorizeProcessor; + sVectorizePerfTest = gSavedSettings.getBOOL("VectorizePerfTest"); + sVectorizeProcessor = gSavedSettings.getU32("VectorizeProcessor"); + BOOL vectorizeEnable = gSavedSettings.getBOOL("VectorizeEnable"); + BOOL vectorizeSkin = gSavedSettings.getBOOL("VectorizeSkin"); + std::string vp; + switch(sVectorizeProcessor) + { + case 2: vp = "SSE2"; break; // *TODO: replace the magic #s + case 1: vp = "SSE"; break; + default: vp = "COMPILER DEFAULT"; break; + } + llinfos << "Vectorization : " << ( vectorizeEnable ? "ENABLED" : "DISABLED" ) << llendl ; + llinfos << "Vector Processor : " << vp << llendl ; + llinfos << "Vectorized Skinning : " << ( vectorizeSkin ? "ENABLED" : "DISABLED" ) << llendl ; + if(vectorizeEnable && vectorizeSkin) + { + switch(sVectorizeProcessor) + { + case 2: + sUpdateGeometryFunc = &updateGeometrySSE2; + break; + case 1: + sUpdateGeometryFunc = &updateGeometrySSE; + break; + default: + sUpdateGeometryFunc = &updateGeometryVectorized; + break; + } + } + else + { + sUpdateGeometryFunc = &updateGeometryOriginal; + } +} + +void LLViewerJointMesh::updateGeometry() +{ if (!(mValid && mMesh && mFace @@ -883,7 +923,7 @@ void LLViewerJointMesh::updateGeometry() return; } - if (!gVectorizePerfTest) + if (!sVectorizePerfTest) { // Once we've measured performance, just run the specified // code version. @@ -916,13 +956,13 @@ void LLViewerJointMesh::updateGeometry() { F64 time_since_app_start = ug_timer.getElapsedSeconds(); if(sUpdateGeometryGlobalTime == 0.0 - || sUpdateGeometryLastProcessor != gVectorizeProcessor) + || sUpdateGeometryLastProcessor != sVectorizeProcessor) { sUpdateGeometryGlobalTime = time_since_app_start; sUpdateGeometryElapsedTime = 0; sUpdateGeometryCalls = 0; sUpdateGeometryRunCount = 0; - sUpdateGeometryLastProcessor = gVectorizeProcessor; + sUpdateGeometryLastProcessor = sVectorizeProcessor; sUpdateGeometryCallPointer = false; return; } @@ -969,7 +1009,7 @@ void LLViewerJointMesh::updateGeometry() F64 perf_boost = ( sUpdateGeometryElapsedTimeOff - sUpdateGeometryElapsedTimeOn ) / sUpdateGeometryElapsedTimeOn; llinfos << "run averages (" << (F64)sUpdateGeometryRunCount << "/10) vectorize off " << a - << "% : vectorize type " << gVectorizeProcessor + << "% : vectorize type " << sVectorizeProcessor << " " << b << "% : performance boost " << perf_boost * 100.0 @@ -983,7 +1023,6 @@ void LLViewerJointMesh::updateGeometry() // We have data now on which version is faster. Switch to that // code and save the data for next run. - gVectorizePerfTest = FALSE; gSavedSettings.setBOOL("VectorizePerfTest", FALSE); if (perf_boost > 0.0) diff --git a/indra/newview/llviewerjointmesh.h b/indra/newview/llviewerjointmesh.h index 8e1ee514ff..4cef1552ca 100644 --- a/indra/newview/llviewerjointmesh.h +++ b/indra/newview/llviewerjointmesh.h @@ -149,6 +149,9 @@ public: /*virtual*/ BOOL isAnimatable() { return FALSE; } + static void updateVectorize(); // Update globals when settings variables change + +private: // Avatar vertex skinning is a significant performance issue on computers // with avatar vertex programs turned off (for example, most Macs). We // therefore have custom versions that use SIMD instructions. diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index f86d822d90..9af072ad6f 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -44,9 +44,6 @@ #include "llmediamanager.h" #include "lluuid.h" -// don't want to include llappviewer.h -extern std::string gChannelName; - // Implementation functions not exported into header file class LLViewerMediaImpl : public LLMediaObserver @@ -457,7 +454,7 @@ void LLViewerMedia::initClass() // append our magic version number string to the browser user agent id std::ostringstream codec; codec << "[Second Life "; - codec << "(" << gChannelName << ")"; + codec << "(" << gSavedSettings.getString("VersionChannelName") << ")"; codec << " - " << LL_VERSION_MAJOR << "." << LL_VERSION_MINOR << "." << LL_VERSION_PATCH << "." << LL_VERSION_BUILD; codec << "]"; init_data->setBrowserUserAgentId( codec.str() ); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index f7d9ccb37c..ac52b8d05f 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -120,6 +120,7 @@ #include "llfloaterregioninfo.h" #include "llfloaterreporter.h" #include "llfloaterscriptdebug.h" +#include "llfloatersettingsdebug.h" #include "llfloaterenvsettings.h" #include "llfloaterstats.h" #include "llfloatertest.h" @@ -376,6 +377,11 @@ void toggle_cull_small(void *); void toggle_show_xui_names(void *); BOOL check_show_xui_names(void *); +void run_vectorize_perf_test(void *) +{ + gSavedSettings.setBOOL("VectorizePerfTest", TRUE); +} + // Debug UI void handle_web_search_demo(void*); void handle_slurl_test(void*); @@ -1091,7 +1097,7 @@ void init_client_menu(LLMenuGL* menu) &menu_check_control, (void*)"ShowConsoleWindow")); - if(gQAMode) + if(gSavedSettings.getBOOL("QAMode")) { LLMenuGL* sub = NULL; sub = new LLMenuGL("Debugging"); @@ -1171,7 +1177,6 @@ extern BOOL gDebugClicks; extern BOOL gDebugWindowProc; extern BOOL gDebugTextEditorTips; extern BOOL gDebugSelectMgr; -extern BOOL gVectorizePerfTest; void init_debug_ui_menu(LLMenuGL* menu) { @@ -1383,7 +1388,7 @@ void init_debug_rendering_menu(LLMenuGL* menu) (void*)"ShowDepthBuffer")); sub_menu->append(new LLMenuItemToggleGL("Show Select Buffer", &gDebugSelect)); - sub_menu->append(new LLMenuItemToggleGL("Vectorize Perf Test", &gVectorizePerfTest)); + sub_menu->append(new LLMenuItemCallGL("Vectorize Perf Test", &run_vectorize_perf_test)); sub_menu = new LLMenuGL("Render Tests"); @@ -4850,7 +4855,7 @@ BOOL menu_check_build_tool( void* user_data ) void handle_reload_settings(void*) { gSavedSettings.resetToDefaults(); - gSavedSettings.loadFromFile(gSettingsFileName, TRUE); + gSavedSettings.loadFromFile(gSavedSettings.getString("ClientSettingsFile"), TRUE); llinfos << "Loading colors from colors.xml" << llendl; std::string color_file = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"colors.xml"); diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp index 6fb2957023..b0ebc64b7a 100644 --- a/indra/newview/llviewernetwork.cpp +++ b/indra/newview/llviewernetwork.cpp @@ -114,10 +114,5 @@ LLGridData gGridInfo[GRID_INFO_COUNT] = // Use this to figure out which domain name and login URI to use. EGridInfo gGridChoice = GRID_INFO_NONE; -char gGridName[MAX_STRING]; /* Flawfinder: ignore */ - -F32 gPacketDropPercentage = 0.f; -F32 gInBandwidth = 0.f; -F32 gOutBandwidth = 0.f; - +LLString gGridName; /* Flawfinder: ignore */ unsigned char gMACAddress[MAC_ADDRESS_BYTES]; /* Flawfinder: ignore */ diff --git a/indra/newview/llviewernetwork.h b/indra/newview/llviewernetwork.h index 4de73aae7a..4e6c874921 100644 --- a/indra/newview/llviewernetwork.h +++ b/indra/newview/llviewernetwork.h @@ -55,7 +55,7 @@ enum EGridInfo GRID_INFO_VAAK, GRID_INFO_YAMI, GRID_INFO_LOCAL, - GRID_INFO_OTHER, // IP address set via -user or other command line option + GRID_INFO_OTHER, // IP address set via command line option GRID_INFO_COUNT }; @@ -68,12 +68,9 @@ struct LLGridData const char* mHelperURI; }; -extern F32 gPacketDropPercentage; -extern F32 gInBandwidth; -extern F32 gOutBandwidth; extern EGridInfo gGridChoice; extern LLGridData gGridInfo[]; -extern char gGridName[MAX_STRING]; /* Flawfinder: ignore */ +extern LLString gGridName; /* Flawfinder: ignore */ const S32 MAC_ADDRESS_BYTES = 6; extern unsigned char gMACAddress[MAC_ADDRESS_BYTES]; /* Flawfinder: ignore */ diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 69e08db2bf..e2ea6e6ecf 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -678,31 +678,6 @@ void LLVivoxProtocolParser::processResponse(std::string tag) /////////////////////////////////////////////////////////////////////////////////////////////// -class LLVoiceClientPrefsListener: public LLSimpleListener -{ - bool handleEvent(LLPointer event, const LLSD& userdata) - { - // Note: Ignore the specific event value, look up the ones we want - - gVoiceClient->setVoiceEnabled(gSavedSettings.getBOOL("EnableVoiceChat")); - gVoiceClient->setUsePTT(gSavedSettings.getBOOL("PTTCurrentlyEnabled")); - std::string keyString = gSavedSettings.getString("PushToTalkButton"); - gVoiceClient->setPTTKey(keyString); - gVoiceClient->setPTTIsToggle(gSavedSettings.getBOOL("PushToTalkToggle")); - gVoiceClient->setEarLocation(gSavedSettings.getS32("VoiceEarLocation")); - std::string serverName = gSavedSettings.getString("VivoxDebugServerName"); - gVoiceClient->setVivoxDebugServerName(serverName); - - std::string inputDevice = gSavedSettings.getString("VoiceInputAudioDevice"); - gVoiceClient->setCaptureDevice(inputDevice); - std::string outputDevice = gSavedSettings.getString("VoiceOutputAudioDevice"); - gVoiceClient->setRenderDevice(outputDevice); - - return true; - } -}; -static LLVoiceClientPrefsListener voice_prefs_listener; - class LLVoiceClientMuteListObserver : public LLMuteListObserver { /* virtual */ void onChange() { gVoiceClient->muteListChanged();} @@ -859,16 +834,6 @@ LLVoiceClient::LLVoiceClient() std::string renderDevice = gSavedSettings.getString("VoiceOutputAudioDevice"); setRenderDevice(renderDevice); - // Set up our listener to get updates on all prefs values we care about. - gSavedSettings.getControl("EnableVoiceChat")->addListener(&voice_prefs_listener); - gSavedSettings.getControl("PTTCurrentlyEnabled")->addListener(&voice_prefs_listener); - gSavedSettings.getControl("PushToTalkButton")->addListener(&voice_prefs_listener); - gSavedSettings.getControl("PushToTalkToggle")->addListener(&voice_prefs_listener); - gSavedSettings.getControl("VoiceEarLocation")->addListener(&voice_prefs_listener); - gSavedSettings.getControl("VivoxDebugServerName")->addListener(&voice_prefs_listener); - gSavedSettings.getControl("VoiceInputAudioDevice")->addListener(&voice_prefs_listener); - gSavedSettings.getControl("VoiceOutputAudioDevice")->addListener(&voice_prefs_listener); - mTuningMode = false; mTuningEnergy = 0.0f; mTuningMicVolume = 0; @@ -1281,7 +1246,7 @@ void LLVoiceClient::stateMachine() break; case stateStart: - if(gDisableVoice) + if(gSavedSettings.getBOOL("CmdLineDisableVoice")) { // Voice is locked out, we must not launch the vivox daemon. setState(stateJail); @@ -3644,7 +3609,7 @@ void LLVoiceClient::setVoiceEnabled(bool enabled) bool LLVoiceClient::voiceEnabled() { - return gSavedSettings.getBOOL("EnableVoiceChat") && !gDisableVoice; + return gSavedSettings.getBOOL("EnableVoiceChat") && !gSavedSettings.getBOOL("CmdLineDisableVoice"); } void LLVoiceClient::setUsePTT(bool usePTT) diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp index 9dc92efa81..fc4ede5bab 100644 --- a/indra/newview/llxmlrpctransaction.cpp +++ b/indra/newview/llxmlrpctransaction.cpp @@ -238,8 +238,9 @@ void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip) // mCurlRequest->setopt(CURLOPT_VERBOSE, 1); // usefull for debugging mCurlRequest->setopt(CURLOPT_NOSIGNAL, 1); mCurlRequest->setWriteCallback(&curlDownloadCallback, (void*)this); - mCurlRequest->setopt(CURLOPT_SSL_VERIFYPEER, gVerifySSLCert); - mCurlRequest->setopt(CURLOPT_SSL_VERIFYHOST, gVerifySSLCert? 2 : 0); + BOOL vefifySSLCert = !gSavedSettings.getBOOL("NoVerifySSLCert"); + mCurlRequest->setopt(CURLOPT_SSL_VERIFYPEER, vefifySSLCert); + mCurlRequest->setopt(CURLOPT_SSL_VERIFYHOST, vefifySSLCert ? 2 : 0); // Be a little impatient about establishing connections. mCurlRequest->setopt(CURLOPT_CONNECTTIMEOUT, 40L); diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index b19e4e2c9c..e87fe8d8ff 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -115,15 +115,15 @@ class ViewerManifest(LLManifest): if not self.default_grid(): if self.default_channel(): # beta grid viewer - channel_flags = '-settings settings_beta.xml' - grid_flags = "-helperuri http://preview-%(grid)s.secondlife.com/helpers/ -loginuri https://login.%(grid)s.lindenlab.com/cgi-bin/login.cgi" % {'grid':self.args['grid']} + channel_flags = '--settings settings_beta.xml' + grid_flags = "--helperuri http://preview-%(grid)s.secondlife.com/helpers/ --loginuri https://login.%(grid)s.lindenlab.com/cgi-bin/login.cgi" % {'grid':self.args['grid']} if not self.default_channel(): # some channel on some grid - channel_flags = '-settings settings_%s.xml -channel "%s"' % (self.channel_lowerword(), self.channel()) + channel_flags = '--settings settings_%s.xml --channel "%s"' % (self.channel_lowerword(), self.channel()) elif self.login_channel(): # Report a special channel during login, but use default channel elsewhere - channel_flags = '-channel "%s"' % (self.login_channel()) + channel_flags = '--channel "%s"' % (self.login_channel()) return " ".join((channel_flags, grid_flags)).strip() -- cgit v1.2.3