summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2011-01-07 10:39:05 -0500
committerOz Linden <oz@lindenlab.com>2011-01-07 10:39:05 -0500
commite1e38c4cee980f815091cd94c8a529ffe3e24918 (patch)
tree35b16f61bd120f83bb74a77d4417dce1108e0542 /indra
parentc02d6a319f378d5dcc34c51b20f556f175d2a40a (diff)
parent09c01c4e925833873a83665fe0642637b65e547e (diff)
merge changes for storm-34
Diffstat (limited to 'indra')
-rw-r--r--indra/CMakeLists.txt5
-rw-r--r--indra/cmake/00-Common.cmake27
-rw-r--r--indra/cmake/BerkeleyDB.cmake7
-rw-r--r--indra/cmake/CMakeLists.txt1
-rw-r--r--indra/cmake/CURL.cmake6
-rw-r--r--indra/cmake/Copy3rdPartyLibs.cmake103
-rw-r--r--indra/cmake/FindJsonCpp.cmake5
-rw-r--r--indra/cmake/FindLLQtWebkit.cmake62
-rw-r--r--indra/cmake/FindNDOF.cmake39
-rw-r--r--indra/cmake/FindTut.cmake7
-rw-r--r--indra/cmake/FindZLIB.cmake46
-rw-r--r--indra/cmake/LLAddBuildTest.cmake3
-rw-r--r--indra/cmake/LLCommon.cmake9
-rw-r--r--indra/cmake/LLKDU.cmake17
-rw-r--r--indra/cmake/LLPlugin.cmake8
-rw-r--r--indra/cmake/NDOF.cmake34
-rw-r--r--indra/cmake/PulseAudio.cmake2
-rw-r--r--indra/cmake/Tut.cmake1
-rw-r--r--indra/cmake/WebKitLibPlugin.cmake25
-rw-r--r--indra/integration_tests/llui_libtest/CMakeLists.txt6
-rw-r--r--indra/lib/python/indra/util/test_win32_manifest.py24
-rw-r--r--indra/llcommon/llapr.cpp22
-rw-r--r--indra/llcommon/llapr.h5
-rw-r--r--indra/llcommon/llevents.cpp4
-rw-r--r--indra/llcommon/llprocesslauncher.cpp9
-rw-r--r--indra/llcommon/llqueuedthread.h2
-rw-r--r--indra/llcommon/llversionviewer.h2
-rw-r--r--indra/llimage/CMakeLists.txt14
-rw-r--r--indra/llimage/llimage.cpp2
-rw-r--r--indra/llimage/llimagej2c.cpp162
-rw-r--r--indra/llimage/llimagej2c.h2
-rw-r--r--indra/llimage/tests/llimageworker_test.cpp18
-rw-r--r--indra/llimagej2coj/llimagej2coj.cpp6
-rw-r--r--indra/llimagej2coj/llimagej2coj.h6
-rw-r--r--indra/llinventory/llnotecard.cpp2
-rw-r--r--indra/llkdu/CMakeLists.txt55
-rw-r--r--indra/llkdu/llimagej2ckdu.cpp1085
-rw-r--r--indra/llkdu/llimagej2ckdu.h90
-rw-r--r--indra/llkdu/llkdumem.cpp196
-rw-r--r--indra/llkdu/llkdumem.h145
-rw-r--r--indra/llkdu/tests/llimagej2ckdu_test.cpp248
-rw-r--r--indra/llmath/tests/m3math_test.cpp1
-rw-r--r--indra/llmessage/llassetstorage.cpp4
-rw-r--r--indra/llmessage/llavatarnamecache.cpp28
-rw-r--r--indra/llplugin/CMakeLists.txt1
-rw-r--r--indra/llplugin/llpluginclassmedia.cpp57
-rw-r--r--indra/llplugin/llpluginclassmedia.h18
-rw-r--r--indra/llplugin/llpluginclassmediaowner.h6
-rw-r--r--indra/llui/CMakeLists.txt3
-rw-r--r--indra/llui/llcheckboxctrl.cpp57
-rw-r--r--indra/llui/llcombobox.cpp3
-rw-r--r--indra/llui/llfloater.cpp10
-rw-r--r--indra/llui/llhandle.h8
-rw-r--r--indra/llui/lllayoutstack.cpp71
-rw-r--r--indra/llui/lllayoutstack.h27
-rw-r--r--indra/llui/lllineeditor.cpp5
-rw-r--r--indra/llui/lllineeditor.h5
-rw-r--r--indra/llui/llmenugl.cpp50
-rw-r--r--indra/llui/llmenugl.h7
-rw-r--r--indra/llui/llnotifications.cpp241
-rw-r--r--indra/llui/llnotifications.h20
-rw-r--r--indra/llui/llnotificationtemplate.h29
-rw-r--r--indra/llui/llnotificationvisibilityrule.h104
-rw-r--r--indra/llui/llpanel.cpp2
-rw-r--r--indra/llui/llprogressbar.cpp6
-rw-r--r--indra/llui/llprogressbar.h8
-rw-r--r--indra/llui/llradiogroup.cpp44
-rw-r--r--indra/llui/llradiogroup.h12
-rw-r--r--indra/llui/llscrolllistctrl.cpp42
-rw-r--r--indra/llui/llscrolllistctrl.h2
-rw-r--r--indra/llui/llsdparam.cpp27
-rw-r--r--indra/llui/llsdparam.h2
-rw-r--r--indra/llui/lltexteditor.cpp10
-rw-r--r--indra/llui/lltexteditor.h1
-rw-r--r--indra/llui/llui.cpp18
-rw-r--r--indra/llui/lluicolortable.cpp6
-rw-r--r--indra/llui/lluictrl.cpp6
-rw-r--r--indra/llui/lluictrl.h5
-rw-r--r--indra/llui/lluistring.h1
-rw-r--r--indra/llui/llurlentry.cpp77
-rw-r--r--indra/llui/llurlentry.h14
-rw-r--r--indra/llui/llurlregistry.cpp1
-rw-r--r--indra/llui/llview.cpp25
-rw-r--r--indra/llui/llview.h26
-rw-r--r--indra/llui/llwindowshade.cpp328
-rw-r--r--indra/llui/llwindowshade.h69
-rw-r--r--indra/llui/tests/llurlentry_test.cpp158
-rw-r--r--indra/llvfs/lldir.cpp6
-rw-r--r--indra/llvfs/lldir_win32.cpp8
-rw-r--r--indra/llwindow/CMakeLists.txt5
-rw-r--r--indra/llwindow/llkeyboard.h2
-rw-r--r--indra/llwindow/llwindowwin32.cpp22
-rw-r--r--indra/llxml/llcontrol.cpp14
-rw-r--r--indra/llxuixml/llinitparam.cpp8
-rw-r--r--indra/llxuixml/llinitparam.h5
-rw-r--r--indra/llxuixml/llregistry.h5
-rw-r--r--indra/llxuixml/llxuiparser.cpp63
-rw-r--r--indra/llxuixml/llxuiparser.h6
-rw-r--r--indra/mac_updater/CMakeLists.txt3
-rw-r--r--indra/media_plugins/example/media_plugin_example.cpp733
-rw-r--r--indra/media_plugins/webkit/CMakeLists.txt1
-rw-r--r--indra/media_plugins/webkit/media_plugin_webkit.cpp75
-rw-r--r--indra/newview/CMakeLists.txt47
-rw-r--r--indra/newview/app_settings/cmd_line.xml1
-rw-r--r--indra/newview/app_settings/ignorable_dialogs.xml22
-rw-r--r--indra/newview/app_settings/keys.ini357
-rw-r--r--indra/newview/app_settings/keys.xml350
-rw-r--r--indra/newview/app_settings/lindenlab.pem27
-rw-r--r--indra/newview/app_settings/llsd.xsd131
-rw-r--r--indra/newview/app_settings/settings.xml516
-rw-r--r--indra/newview/app_settings/shaders/shader_hierarchy.txt (renamed from indra/newview/app_settings/shaders/shader_heirarchy.txt)0
-rw-r--r--indra/newview/featuretable.txt2
-rw-r--r--indra/newview/featuretable_linux.txt2
-rw-r--r--indra/newview/featuretable_mac.txt2
-rw-r--r--indra/newview/featuretable_xp.txt2
-rw-r--r--indra/newview/llagent.cpp34
-rw-r--r--indra/newview/llagent.h8
-rw-r--r--indra/newview/llagentcamera.cpp9
-rw-r--r--indra/newview/llappearancemgr.cpp29
-rw-r--r--indra/newview/llappviewer.cpp382
-rw-r--r--indra/newview/llappviewer.h8
-rwxr-xr-x[-rw-r--r--]indra/newview/llavataractions.cpp17
-rw-r--r--indra/newview/llbottomtray.cpp29
-rw-r--r--indra/newview/llbottomtray.h9
-rw-r--r--indra/newview/llbrowsernotification.cpp14
-rw-r--r--indra/newview/llbuycurrencyhtml.cpp4
-rw-r--r--indra/newview/llcallfloater.cpp12
-rw-r--r--indra/newview/llcallfloater.h1
-rw-r--r--indra/newview/llchathistory.cpp16
-rw-r--r--indra/newview/llchatitemscontainerctrl.cpp3
-rwxr-xr-x[-rw-r--r--]indra/newview/llcommandhandler.cpp0
-rw-r--r--indra/newview/llcommandlineparser.cpp5
-rw-r--r--indra/newview/lldirpicker.cpp40
-rw-r--r--indra/newview/lldirpicker.h1
-rw-r--r--indra/newview/llfavoritesbar.cpp39
-rw-r--r--indra/newview/llfavoritesbar.h5
-rw-r--r--indra/newview/llfilepicker.cpp96
-rw-r--r--indra/newview/llfilepicker.h4
-rw-r--r--indra/newview/llfirstuse.cpp17
-rw-r--r--indra/newview/llfirstuse.h2
-rw-r--r--indra/newview/llfloaterabout.cpp2
-rw-r--r--indra/newview/llfloaterbuycurrency.cpp6
-rw-r--r--indra/newview/llfloaterbuycurrencyhtml.cpp4
-rw-r--r--indra/newview/llfloatercamera.cpp22
-rw-r--r--indra/newview/llfloaterhelpbrowser.cpp7
-rw-r--r--indra/newview/llfloatermap.cpp13
-rw-r--r--indra/newview/llfloatermediabrowser.cpp28
-rw-r--r--indra/newview/llfloaternotificationsconsole.cpp1
-rw-r--r--indra/newview/llfloaterpostcard.cpp17
-rwxr-xr-x[-rw-r--r--]indra/newview/llfloaterpreference.cpp69
-rw-r--r--indra/newview/llfloaterpreference.h11
-rw-r--r--indra/newview/llfloatersearch.cpp2
-rw-r--r--indra/newview/llfloatersnapshot.cpp11
-rw-r--r--indra/newview/llfloaterwebcontent.cpp402
-rw-r--r--indra/newview/llfloaterwebcontent.h82
-rwxr-xr-x[-rw-r--r--]indra/newview/llfloaterworldmap.cpp368
-rw-r--r--indra/newview/llfloaterworldmap.h5
-rw-r--r--indra/newview/llhints.cpp15
-rw-r--r--indra/newview/llhudtext.cpp3
-rw-r--r--indra/newview/llimfloater.cpp11
-rw-r--r--indra/newview/llimfloater.h2
-rw-r--r--indra/newview/llimview.cpp55
-rw-r--r--indra/newview/llimview.h2
-rw-r--r--indra/newview/llinspecttoast.cpp11
-rw-r--r--indra/newview/llinventorybridge.cpp35
-rw-r--r--indra/newview/llinventorypanel.cpp14
-rw-r--r--indra/newview/lllistcontextmenu.cpp28
-rw-r--r--indra/newview/lllistcontextmenu.h3
-rw-r--r--indra/newview/lllogininstance.cpp416
-rw-r--r--indra/newview/lllogininstance.h6
-rw-r--r--indra/newview/llmediactrl.cpp326
-rw-r--r--indra/newview/llmediactrl.h10
-rw-r--r--indra/newview/llmoveview.cpp34
-rw-r--r--indra/newview/llnavigationbar.cpp3
-rw-r--r--indra/newview/llnearbychatbar.cpp30
-rw-r--r--indra/newview/llnearbychatbar.h4
-rw-r--r--indra/newview/llnearbychathandler.cpp30
-rw-r--r--indra/newview/llnetmap.cpp2
-rw-r--r--indra/newview/llpanelavatar.cpp71
-rw-r--r--indra/newview/llpanelavatar.h593
-rw-r--r--indra/newview/llpanellandmarkinfo.cpp6
-rw-r--r--indra/newview/llpanellogin.cpp118
-rw-r--r--indra/newview/llpanelmaininventory.cpp8
-rw-r--r--indra/newview/llpaneloutfitedit.cpp10
-rwxr-xr-x[-rw-r--r--]indra/newview/llpanelpicks.cpp223
-rwxr-xr-x[-rw-r--r--]indra/newview/llpanelpicks.h5
-rw-r--r--indra/newview/llpanelplaces.cpp24
-rw-r--r--indra/newview/llpanelplaces.h1
-rw-r--r--indra/newview/llpanelprimmediacontrols.cpp121
-rw-r--r--indra/newview/llpanelprimmediacontrols.h16
-rwxr-xr-x[-rw-r--r--]indra/newview/llpanelprofile.cpp200
-rwxr-xr-x[-rw-r--r--]indra/newview/llpanelprofile.h32
-rw-r--r--indra/newview/llpaneltopinfobar.cpp9
-rw-r--r--indra/newview/llpopupview.cpp73
-rw-r--r--indra/newview/llpopupview.h2
-rw-r--r--indra/newview/llpreview.cpp3
-rw-r--r--indra/newview/llpreviewscript.cpp339
-rw-r--r--indra/newview/llpreviewscript.h49
-rw-r--r--indra/newview/llpreviewtexture.cpp77
-rw-r--r--indra/newview/llprogressview.cpp6
-rw-r--r--indra/newview/llremoteparcelrequest.cpp13
-rw-r--r--indra/newview/llrootview.h22
-rw-r--r--indra/newview/llscreenchannel.cpp72
-rw-r--r--indra/newview/llscreenchannel.h11
-rw-r--r--indra/newview/llscriptfloater.h4
-rw-r--r--indra/newview/llscrollingpanelparam.cpp8
-rw-r--r--indra/newview/llsearchcombobox.cpp3
-rw-r--r--indra/newview/llshareavatarhandler.cpp59
-rw-r--r--indra/newview/llsidepaneliteminfo.cpp9
-rw-r--r--indra/newview/llsidepaneliteminfo.h1
-rw-r--r--indra/newview/llsidepaneltaskinfo.cpp12
-rw-r--r--indra/newview/llsidetray.cpp32
-rw-r--r--indra/newview/llsidetray.h15
-rw-r--r--indra/newview/llsimplestat.h158
-rw-r--r--indra/newview/llstartup.cpp33
-rw-r--r--indra/newview/llstatusbar.cpp18
-rw-r--r--indra/newview/llstatusbar.h2
-rw-r--r--indra/newview/lltexturefetch.cpp669
-rw-r--r--indra/newview/lltexturefetch.h88
-rw-r--r--indra/newview/lltoast.cpp68
-rw-r--r--indra/newview/lltoast.h19
-rw-r--r--indra/newview/lltoastgroupnotifypanel.cpp1
-rw-r--r--indra/newview/lltoastscripttextbox.cpp16
-rw-r--r--indra/newview/lltoastscripttextbox.h13
-rw-r--r--indra/newview/lltool.cpp8
-rw-r--r--indra/newview/lltoolmorph.cpp4
-rw-r--r--indra/newview/lltoolmorph.h2
-rw-r--r--indra/newview/lltoolpie.cpp89
-rw-r--r--indra/newview/lltoolpie.h5
-rw-r--r--indra/newview/lltracker.cpp4
-rw-r--r--indra/newview/lltransientfloatermgr.cpp4
-rw-r--r--indra/newview/llviewerassetstats.cpp619
-rw-r--r--indra/newview/llviewerassetstats.h334
-rw-r--r--indra/newview/llviewerassetstorage.cpp129
-rw-r--r--indra/newview/llviewerassetstorage.h11
-rw-r--r--indra/newview/llviewercontrol.cpp7
-rw-r--r--indra/newview/llviewerfloaterreg.cpp2
-rw-r--r--indra/newview/llviewerinventory.cpp2
-rw-r--r--indra/newview/llviewerkeyboard.cpp183
-rw-r--r--indra/newview/llviewerkeyboard.h37
-rw-r--r--indra/newview/llviewermedia.cpp130
-rw-r--r--indra/newview/llviewermedia.h16
-rw-r--r--indra/newview/llviewermenu.cpp73
-rw-r--r--indra/newview/llviewermenufile.cpp4
-rw-r--r--indra/newview/llviewermessage.cpp64
-rw-r--r--indra/newview/llviewermessage.h1
-rw-r--r--indra/newview/llviewerparcelmedia.cpp12
-rw-r--r--indra/newview/llviewerparcelmgr.cpp5
-rw-r--r--indra/newview/llviewerregion.cpp1
-rw-r--r--indra/newview/llviewertexture.cpp77
-rw-r--r--indra/newview/llviewertexturelist.cpp74
-rw-r--r--indra/newview/llviewerwindow.cpp61
-rw-r--r--indra/newview/llviewerwindow.h7
-rw-r--r--indra/newview/llvoavatar.cpp15
-rw-r--r--indra/newview/llvoicecallhandler.cpp61
-rw-r--r--indra/newview/llvoiceclient.cpp138
-rw-r--r--indra/newview/llvoiceclient.h34
-rw-r--r--indra/newview/llvoicevivox.cpp177
-rw-r--r--indra/newview/llvoicevivox.h32
-rw-r--r--indra/newview/llweb.cpp32
-rw-r--r--indra/newview/llweb.h5
-rw-r--r--indra/newview/llworldmipmap.cpp3
-rw-r--r--indra/newview/res/toolbuy.curbin4286 -> 4286 bytes
-rw-r--r--indra/newview/res/toolopen.curbin4286 -> 4286 bytes
-rw-r--r--indra/newview/res/toolsit.curbin4286 -> 4286 bytes
-rw-r--r--indra/newview/skins/default/textures/arrow_keys.pngbin0 -> 6558 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Web_Profile_Off.pngbin0 -> 2961 bytes
-rw-r--r--indra/newview/skins/default/textures/textures.xml12
-rw-r--r--indra/newview/skins/default/textures/widgets/ProgressBar.pngbin220 -> 316 bytes
-rw-r--r--indra/newview/skins/default/xui/da/floater_hardware_settings.xml3
-rw-r--r--indra/newview/skins/default/xui/da/floater_preferences.xml4
-rw-r--r--indra/newview/skins/default/xui/da/floater_region_debug_console.xml2
-rw-r--r--indra/newview/skins/default/xui/da/menu_inventory_gear_default.xml9
-rw-r--r--indra/newview/skins/default/xui/da/menu_viewer.xml19
-rw-r--r--indra/newview/skins/default/xui/da/notifications.xml21
-rw-r--r--indra/newview/skins/default/xui/da/panel_edit_gloves.xml2
-rw-r--r--indra/newview/skins/default/xui/da/panel_edit_jacket.xml4
-rw-r--r--indra/newview/skins/default/xui/da/panel_edit_pants.xml2
-rw-r--r--indra/newview/skins/default/xui/da/panel_edit_shirt.xml2
-rw-r--r--indra/newview/skins/default/xui/da/panel_edit_shoes.xml2
-rw-r--r--indra/newview/skins/default/xui/da/panel_edit_skirt.xml2
-rw-r--r--indra/newview/skins/default/xui/da/panel_edit_socks.xml2
-rw-r--r--indra/newview/skins/default/xui/da/panel_edit_underpants.xml2
-rw-r--r--indra/newview/skins/default/xui/da/panel_edit_undershirt.xml2
-rw-r--r--indra/newview/skins/default/xui/da/panel_notify_textbox.xml10
-rw-r--r--indra/newview/skins/default/xui/da/panel_people.xml10
-rw-r--r--indra/newview/skins/default/xui/da/panel_preferences_advanced.xml29
-rw-r--r--indra/newview/skins/default/xui/da/panel_preferences_chat.xml43
-rw-r--r--indra/newview/skins/default/xui/da/panel_preferences_colors.xml41
-rw-r--r--indra/newview/skins/default/xui/da/panel_preferences_general.xml12
-rw-r--r--indra/newview/skins/default/xui/da/panel_preferences_graphics1.xml1
-rw-r--r--indra/newview/skins/default/xui/da/panel_preferences_move.xml24
-rw-r--r--indra/newview/skins/default/xui/da/panel_preferences_privacy.xml9
-rw-r--r--indra/newview/skins/default/xui/da/panel_preferences_setup.xml8
-rw-r--r--indra/newview/skins/default/xui/da/panel_preferences_sound.xml8
-rw-r--r--indra/newview/skins/default/xui/da/panel_script_ed.xml11
-rw-r--r--indra/newview/skins/default/xui/da/strings.xml9
-rw-r--r--indra/newview/skins/default/xui/de/floater_hardware_settings.xml3
-rw-r--r--indra/newview/skins/default/xui/de/floater_preferences.xml4
-rw-r--r--indra/newview/skins/default/xui/de/floater_region_debug_console.xml2
-rw-r--r--indra/newview/skins/default/xui/de/menu_inventory_gear_default.xml9
-rw-r--r--indra/newview/skins/default/xui/de/menu_viewer.xml19
-rw-r--r--indra/newview/skins/default/xui/de/notifications.xml20
-rw-r--r--indra/newview/skins/default/xui/de/panel_edit_gloves.xml2
-rw-r--r--indra/newview/skins/default/xui/de/panel_edit_jacket.xml4
-rw-r--r--indra/newview/skins/default/xui/de/panel_edit_pants.xml2
-rw-r--r--indra/newview/skins/default/xui/de/panel_edit_shirt.xml2
-rw-r--r--indra/newview/skins/default/xui/de/panel_edit_shoes.xml2
-rw-r--r--indra/newview/skins/default/xui/de/panel_edit_skirt.xml2
-rw-r--r--indra/newview/skins/default/xui/de/panel_edit_socks.xml2
-rw-r--r--indra/newview/skins/default/xui/de/panel_edit_underpants.xml2
-rw-r--r--indra/newview/skins/default/xui/de/panel_edit_undershirt.xml2
-rw-r--r--indra/newview/skins/default/xui/de/panel_notify_textbox.xml10
-rw-r--r--indra/newview/skins/default/xui/de/panel_people.xml10
-rw-r--r--indra/newview/skins/default/xui/de/panel_preferences_advanced.xml29
-rw-r--r--indra/newview/skins/default/xui/de/panel_preferences_chat.xml43
-rw-r--r--indra/newview/skins/default/xui/de/panel_preferences_colors.xml41
-rw-r--r--indra/newview/skins/default/xui/de/panel_preferences_general.xml12
-rw-r--r--indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml3
-rw-r--r--indra/newview/skins/default/xui/de/panel_preferences_move.xml24
-rw-r--r--indra/newview/skins/default/xui/de/panel_preferences_privacy.xml9
-rw-r--r--indra/newview/skins/default/xui/de/panel_preferences_setup.xml8
-rw-r--r--indra/newview/skins/default/xui/de/panel_preferences_sound.xml8
-rw-r--r--indra/newview/skins/default/xui/de/panel_script_ed.xml11
-rw-r--r--indra/newview/skins/default/xui/de/strings.xml7
-rw-r--r--indra/newview/skins/default/xui/en/floater_env_settings.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_help_browser.xml3
-rw-r--r--indra/newview/skins/default/xui/en/floater_media_browser.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_web_content.xml190
-rw-r--r--indra/newview/skins/default/xui/en/floater_windlight_options.xml1
-rw-r--r--indra/newview/skins/default/xui/en/inspect_object.xml27
-rw-r--r--indra/newview/skins/default/xui/en/main_view.xml8
-rw-r--r--indra/newview/skins/default/xui/en/menu_login.xml10
-rw-r--r--indra/newview/skins/default/xui/en/menu_mini_map.xml11
-rw-r--r--indra/newview/skins/default/xui/en/menu_place.xml22
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml35
-rw-r--r--indra/newview/skins/default/xui/en/notification_visibility.xml6
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml247
-rw-r--r--indra/newview/skins/default/xui/en/panel_avatar_list_item.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_bottomtray.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_bottomtray_lite.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_profile.xml11
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_invite.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_land_money.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_list_item.xml3
-rw-r--r--indra/newview/skins/default/xui/en/panel_hint_image.xml39
-rw-r--r--indra/newview/skins/default/xui/en/panel_login.xml8
-rw-r--r--indra/newview/skins/default/xui/en/panel_my_profile.xml302
-rw-r--r--indra/newview/skins/default/xui/en/panel_navigation_bar.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_notify_textbox.xml66
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_advanced.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_colors.xml7
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_privacy.xml9
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_setup.xml55
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_sound.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_profile.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_script_ed.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_status_bar.xml2
-rw-r--r--indra/newview/skins/default/xui/en/sidepanel_task_info.xml11
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml4
-rw-r--r--indra/newview/skins/default/xui/en/widgets/button.xml2
-rw-r--r--indra/newview/skins/default/xui/en/widgets/check_box.xml8
-rw-r--r--indra/newview/skins/default/xui/en/widgets/group_icon.xml3
-rw-r--r--indra/newview/skins/default/xui/en/widgets/sidetray_tab.xml4
-rw-r--r--indra/newview/skins/default/xui/es/floater_hardware_settings.xml3
-rw-r--r--indra/newview/skins/default/xui/es/floater_preferences.xml4
-rw-r--r--indra/newview/skins/default/xui/es/floater_region_debug_console.xml2
-rw-r--r--indra/newview/skins/default/xui/es/menu_inventory_gear_default.xml9
-rw-r--r--indra/newview/skins/default/xui/es/menu_viewer.xml19
-rw-r--r--indra/newview/skins/default/xui/es/notifications.xml17
-rw-r--r--indra/newview/skins/default/xui/es/panel_edit_gloves.xml2
-rw-r--r--indra/newview/skins/default/xui/es/panel_edit_jacket.xml4
-rw-r--r--indra/newview/skins/default/xui/es/panel_edit_pants.xml2
-rw-r--r--indra/newview/skins/default/xui/es/panel_edit_shirt.xml2
-rw-r--r--indra/newview/skins/default/xui/es/panel_edit_shoes.xml2
-rw-r--r--indra/newview/skins/default/xui/es/panel_edit_skirt.xml2
-rw-r--r--indra/newview/skins/default/xui/es/panel_edit_socks.xml2
-rw-r--r--indra/newview/skins/default/xui/es/panel_edit_underpants.xml2
-rw-r--r--indra/newview/skins/default/xui/es/panel_edit_undershirt.xml2
-rw-r--r--indra/newview/skins/default/xui/es/panel_notify_textbox.xml10
-rw-r--r--indra/newview/skins/default/xui/es/panel_people.xml10
-rw-r--r--indra/newview/skins/default/xui/es/panel_preferences_advanced.xml29
-rw-r--r--indra/newview/skins/default/xui/es/panel_preferences_chat.xml45
-rw-r--r--indra/newview/skins/default/xui/es/panel_preferences_colors.xml41
-rw-r--r--indra/newview/skins/default/xui/es/panel_preferences_general.xml12
-rw-r--r--indra/newview/skins/default/xui/es/panel_preferences_graphics1.xml1
-rw-r--r--indra/newview/skins/default/xui/es/panel_preferences_move.xml24
-rw-r--r--indra/newview/skins/default/xui/es/panel_preferences_privacy.xml9
-rw-r--r--indra/newview/skins/default/xui/es/panel_preferences_setup.xml8
-rw-r--r--indra/newview/skins/default/xui/es/panel_preferences_sound.xml8
-rw-r--r--indra/newview/skins/default/xui/es/panel_script_ed.xml11
-rw-r--r--indra/newview/skins/default/xui/es/strings.xml7
-rw-r--r--indra/newview/skins/default/xui/fr/floater_hardware_settings.xml3
-rw-r--r--indra/newview/skins/default/xui/fr/floater_preferences.xml4
-rw-r--r--indra/newview/skins/default/xui/fr/floater_region_debug_console.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/menu_inventory_gear_default.xml9
-rw-r--r--indra/newview/skins/default/xui/fr/menu_viewer.xml19
-rw-r--r--indra/newview/skins/default/xui/fr/notifications.xml19
-rw-r--r--indra/newview/skins/default/xui/fr/panel_edit_gloves.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/panel_edit_jacket.xml4
-rw-r--r--indra/newview/skins/default/xui/fr/panel_edit_pants.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/panel_edit_shirt.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/panel_edit_shoes.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/panel_edit_skirt.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/panel_edit_socks.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/panel_edit_underpants.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/panel_edit_undershirt.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/panel_main_inventory.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/panel_notify_textbox.xml10
-rw-r--r--indra/newview/skins/default/xui/fr/panel_people.xml18
-rw-r--r--indra/newview/skins/default/xui/fr/panel_preferences_advanced.xml29
-rw-r--r--indra/newview/skins/default/xui/fr/panel_preferences_chat.xml43
-rw-r--r--indra/newview/skins/default/xui/fr/panel_preferences_colors.xml41
-rw-r--r--indra/newview/skins/default/xui/fr/panel_preferences_general.xml12
-rw-r--r--indra/newview/skins/default/xui/fr/panel_preferences_graphics1.xml5
-rw-r--r--indra/newview/skins/default/xui/fr/panel_preferences_move.xml24
-rw-r--r--indra/newview/skins/default/xui/fr/panel_preferences_privacy.xml9
-rw-r--r--indra/newview/skins/default/xui/fr/panel_preferences_setup.xml8
-rw-r--r--indra/newview/skins/default/xui/fr/panel_preferences_sound.xml8
-rw-r--r--indra/newview/skins/default/xui/fr/panel_script_ed.xml11
-rw-r--r--indra/newview/skins/default/xui/fr/panel_teleport_history.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/strings.xml13
-rw-r--r--indra/newview/skins/default/xui/pt/floater_hardware_settings.xml3
-rw-r--r--indra/newview/skins/default/xui/pt/floater_preferences.xml4
-rw-r--r--indra/newview/skins/default/xui/pt/floater_region_debug_console.xml2
-rw-r--r--indra/newview/skins/default/xui/pt/menu_inventory_gear_default.xml9
-rw-r--r--indra/newview/skins/default/xui/pt/menu_viewer.xml19
-rw-r--r--indra/newview/skins/default/xui/pt/notifications.xml21
-rw-r--r--indra/newview/skins/default/xui/pt/panel_edit_gloves.xml2
-rw-r--r--indra/newview/skins/default/xui/pt/panel_edit_jacket.xml4
-rw-r--r--indra/newview/skins/default/xui/pt/panel_edit_pants.xml2
-rw-r--r--indra/newview/skins/default/xui/pt/panel_edit_shirt.xml2
-rw-r--r--indra/newview/skins/default/xui/pt/panel_edit_shoes.xml2
-rw-r--r--indra/newview/skins/default/xui/pt/panel_edit_skirt.xml2
-rw-r--r--indra/newview/skins/default/xui/pt/panel_edit_socks.xml2
-rw-r--r--indra/newview/skins/default/xui/pt/panel_edit_underpants.xml2
-rw-r--r--indra/newview/skins/default/xui/pt/panel_edit_undershirt.xml2
-rw-r--r--indra/newview/skins/default/xui/pt/panel_notify_textbox.xml10
-rw-r--r--indra/newview/skins/default/xui/pt/panel_people.xml10
-rw-r--r--indra/newview/skins/default/xui/pt/panel_preferences_advanced.xml29
-rw-r--r--indra/newview/skins/default/xui/pt/panel_preferences_chat.xml43
-rw-r--r--indra/newview/skins/default/xui/pt/panel_preferences_colors.xml41
-rw-r--r--indra/newview/skins/default/xui/pt/panel_preferences_general.xml12
-rw-r--r--indra/newview/skins/default/xui/pt/panel_preferences_graphics1.xml1
-rw-r--r--indra/newview/skins/default/xui/pt/panel_preferences_move.xml24
-rw-r--r--indra/newview/skins/default/xui/pt/panel_preferences_privacy.xml9
-rw-r--r--indra/newview/skins/default/xui/pt/panel_preferences_setup.xml8
-rw-r--r--indra/newview/skins/default/xui/pt/panel_preferences_sound.xml8
-rw-r--r--indra/newview/skins/default/xui/pt/panel_script_ed.xml11
-rw-r--r--indra/newview/skins/default/xui/pt/strings.xml7
-rw-r--r--indra/newview/tests/lllogininstance_test.cpp47
-rw-r--r--indra/newview/tests/llsimplestat_test.cpp586
-rw-r--r--indra/newview/tests/llviewerassetstats_test.cpp990
-rw-r--r--indra/newview/tests/llworldmap_test.cpp42
-rw-r--r--indra/newview/tests/llworldmipmap_test.cpp27
-rw-r--r--indra/newview/viewer_manifest.py51
-rw-r--r--indra/test/CMakeLists.txt1
-rw-r--r--indra/test_apps/llplugintest/llmediaplugintest.cpp15
-rw-r--r--indra/viewer_components/updater/llupdatedownloader.cpp103
-rw-r--r--indra/viewer_components/updater/llupdatedownloader.h9
-rw-r--r--indra/viewer_components/updater/llupdateinstaller.cpp12
-rw-r--r--indra/viewer_components/updater/llupdateinstaller.h7
-rw-r--r--indra/viewer_components/updater/llupdaterservice.cpp111
-rw-r--r--indra/viewer_components/updater/llupdaterservice.h26
-rw-r--r--indra/viewer_components/updater/scripts/darwin/update_install3
-rw-r--r--indra/viewer_components/updater/scripts/linux/update_install8
-rw-r--r--indra/viewer_components/updater/scripts/windows/update_install.bat2
-rw-r--r--indra/viewer_components/updater/tests/llupdaterservice_test.cpp5
468 files changed, 15185 insertions, 4700 deletions
diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt
index d01e1869b6..6d17a6f402 100644
--- a/indra/CMakeLists.txt
+++ b/indra/CMakeLists.txt
@@ -43,6 +43,7 @@ add_subdirectory(${LIBS_OPEN_PREFIX}llaudio)
add_subdirectory(${LIBS_OPEN_PREFIX}llcharacter)
add_subdirectory(${LIBS_OPEN_PREFIX}llcommon)
add_subdirectory(${LIBS_OPEN_PREFIX}llimage)
+add_subdirectory(${LIBS_OPEN_PREFIX}llkdu)
add_subdirectory(${LIBS_OPEN_PREFIX}llimagej2coj)
add_subdirectory(${LIBS_OPEN_PREFIX}llinventory)
add_subdirectory(${LIBS_OPEN_PREFIX}llmath)
@@ -53,10 +54,6 @@ add_subdirectory(${LIBS_OPEN_PREFIX}llvfs)
add_subdirectory(${LIBS_OPEN_PREFIX}llwindow)
add_subdirectory(${LIBS_OPEN_PREFIX}llxml)
-if (EXISTS ${LIBS_CLOSED_DIR}llkdu)
- add_subdirectory(${LIBS_CLOSED_PREFIX}llkdu)
-endif (EXISTS ${LIBS_CLOSED_DIR}llkdu)
-
add_subdirectory(${LIBS_OPEN_PREFIX}lscript)
if (WINDOWS AND EXISTS ${LIBS_CLOSED_DIR}copy_win_scripts)
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index db2cdb5ff8..dbe0cf5cd0 100644
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -4,27 +4,28 @@
include(Variables)
-
# Portable compilation flags.
-
-if (EXISTS ${CMAKE_SOURCE_DIR}/llphysics)
- # The release build should only offer to send crash reports if we're
- # building from a Linden internal source tree.
- set(release_crash_reports 1)
-else (EXISTS ${CMAKE_SOURCE_DIR}/llphysics)
- set(release_crash_reports 0)
-endif (EXISTS ${CMAKE_SOURCE_DIR}/llphysics)
-
set(CMAKE_CXX_FLAGS_DEBUG "-D_DEBUG -DLL_DEBUG=1")
set(CMAKE_CXX_FLAGS_RELEASE
- "-DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -D_SECURE_SCL=0 -DLL_SEND_CRASH_REPORTS=${release_crash_reports} -DNDEBUG")
+ "-DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -D_SECURE_SCL=0 -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
- "-DLL_RELEASE=1 -D_SECURE_SCL=0 -DLL_SEND_CRASH_REPORTS=0 -DNDEBUG -DLL_RELEASE_WITH_DEBUG_INFO=1")
+ "-DLL_RELEASE=1 -D_SECURE_SCL=0 -DNDEBUG -DLL_RELEASE_WITH_DEBUG_INFO=1")
+# Configure crash reporting
+set(RELEASE_CRASH_REPORTING OFF CACHE BOOL "Enable use of crash reporting in release builds")
+set(NON_RELEASE_CRASH_REPORTING OFF CACHE BOOL "Enable use of crash reporting in developer builds")
-# Don't bother with a MinSizeRel build.
+if(RELEASE_CRASH_REPORTING)
+ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DLL_SEND_CRASH_REPORTS=1")
+endif()
+
+if(NON_RELEASE_CRASH_REPORTING)
+ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DLL_SEND_CRASH_REPORTS=1")
+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DLL_SEND_CRASH_REPORTS=1")
+endif()
+# Don't bother with a MinSizeRel build.
set(CMAKE_CONFIGURATION_TYPES "RelWithDebInfo;Release;Debug" CACHE STRING
"Supported build types." FORCE)
diff --git a/indra/cmake/BerkeleyDB.cmake b/indra/cmake/BerkeleyDB.cmake
index d98e79179d..e3ca0fd77d 100644
--- a/indra/cmake/BerkeleyDB.cmake
+++ b/indra/cmake/BerkeleyDB.cmake
@@ -6,6 +6,11 @@ set(DB_FIND_REQUIRED ON)
if (STANDALONE)
include(FindBerkeleyDB)
else (STANDALONE)
- set(DB_LIBRARIES db-4.2)
+ if (LINUX)
+ # Need to add dependency pthread explicitely to support ld.gold.
+ set(DB_LIBRARIES db-4.2 pthread)
+ else (LINUX)
+ set(DB_LIBRARIES db-4.2)
+ endif (LINUX)
set(DB_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
endif (STANDALONE)
diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt
index 6470836286..3f421b270b 100644
--- a/indra/cmake/CMakeLists.txt
+++ b/indra/cmake/CMakeLists.txt
@@ -33,6 +33,7 @@ set(cmake_SOURCE_FILES
FindMySQL.cmake
FindOpenJPEG.cmake
FindXmlRpcEpi.cmake
+ FindZLIB.cmake
FMOD.cmake
FreeType.cmake
GStreamer010Plugin.cmake
diff --git a/indra/cmake/CURL.cmake b/indra/cmake/CURL.cmake
index 6e5fed4d52..9aba08e573 100644
--- a/indra/cmake/CURL.cmake
+++ b/indra/cmake/CURL.cmake
@@ -10,10 +10,10 @@ else (STANDALONE)
use_prebuilt_binary(curl)
if (WINDOWS)
set(CURL_LIBRARIES
- debug libcurld
- optimized libcurl)
+ debug libcurld.lib
+ optimized libcurl.lib)
else (WINDOWS)
- set(CURL_LIBRARIES curl)
+ set(CURL_LIBRARIES libcurl.a)
endif (WINDOWS)
set(CURL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
endif (STANDALONE)
diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake
index e852cf463c..176ae9787e 100644
--- a/indra/cmake/Copy3rdPartyLibs.cmake
+++ b/indra/cmake/Copy3rdPartyLibs.cmake
@@ -60,22 +60,6 @@ if(WINDOWS)
set(release_files ${release_files} fmod.dll)
endif (FMOD)
- #*******************************
- # LLKDU
- set(internal_llkdu_path "${CMAKE_SOURCE_DIR}/llkdu")
- if(NOT EXISTS ${internal_llkdu_path})
- if (EXISTS "${debug_src_dir}/llkdu.dll")
- set(debug_llkdu_src "${debug_src_dir}/llkdu.dll")
- set(debug_llkdu_dst "${SHARED_LIB_STAGING_DIR_DEBUG}/llkdu.dll")
- endif (EXISTS "${debug_src_dir}/llkdu.dll")
-
- if (EXISTS "${release_src_dir}/llkdu.dll")
- set(release_llkdu_src "${release_src_dir}/llkdu.dll")
- set(release_llkdu_dst "${SHARED_LIB_STAGING_DIR_RELEASE}/llkdu.dll")
- set(relwithdebinfo_llkdu_dst "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}/llkdu.dll")
- endif (EXISTS "${release_src_dir}/llkdu.dll")
- endif (NOT EXISTS ${internal_llkdu_path})
-
#*******************************
# Copy MS C runtime dlls, required for packaging.
# *TODO - Adapt this to support VC9
@@ -174,21 +158,6 @@ elseif(DARWIN)
# fmod is statically linked on darwin
set(fmod_files "")
- #*******************************
- # LLKDU
- set(internal_llkdu_path "${CMAKE_SOURCE_DIR}/llkdu")
- if(NOT EXISTS ${internal_llkdu_path})
- if (EXISTS "${debug_src_dir}/libllkdu.dylib")
- set(debug_llkdu_src "${debug_src_dir}/libllkdu.dylib")
- set(debug_llkdu_dst "${SHARED_LIB_STAGING_DIR_DEBUG}/libllkdu.dylib")
- endif (EXISTS "${debug_src_dir}/libllkdu.dylib")
-
- if (EXISTS "${release_src_dir}/libllkdu.dylib")
- set(release_llkdu_src "${release_src_dir}/libllkdu.dylib")
- set(release_llkdu_dst "${SHARED_LIB_STAGING_DIR_RELEASE}/libllkdu.dylib")
- set(relwithdebinfo_llkdu_dst "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}/libllkdu.dylib")
- endif (EXISTS "${release_src_dir}/libllkdu.dylib")
- endif (NOT EXISTS ${internal_llkdu_path})
elseif(LINUX)
# linux is weird, multiple side by side configurations aren't supported
# and we don't seem to have any debug shared libs built yet anyways...
@@ -242,21 +211,6 @@ elseif(LINUX)
set(release_files ${release_files} "libfmod-3.75.so")
endif (FMOD)
- #*******************************
- # LLKDU
- set(internal_llkdu_path "${CMAKE_SOURCE_DIR}/llkdu")
- if(NOT EXISTS ${internal_llkdu_path})
- if (EXISTS "${debug_src_dir}/libllkdu.so")
- set(debug_llkdu_src "${debug_src_dir}/libllkdu.so")
- set(debug_llkdu_dst "${SHARED_LIB_STAGING_DIR_DEBUG}/libllkdu.so")
- endif (EXISTS "${debug_src_dir}/libllkdu.so")
-
- if (EXISTS "${release_src_dir}/libllkdu.so")
- set(release_llkdu_src "${release_src_dir}/libllkdu.so")
- set(release_llkdu_dst "${SHARED_LIB_STAGING_DIR_RELEASE}/libllkdu.so")
- set(relwithdebinfo_llkdu_dst "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}/libllkdu.so")
- endif (EXISTS "${release_src_dir}/libllkdu.so")
- endif(NOT EXISTS ${internal_llkdu_path})
else(WINDOWS)
message(STATUS "WARNING: unrecognized platform for staging 3rd party libs, skipping...")
set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-linux")
@@ -334,40 +288,29 @@ copy_if_different(
)
set(third_party_targets ${third_party_targets} ${out_targets})
-#*******************************
-# LLKDU
-set(internal_llkdu_path "${CMAKE_SOURCE_DIR}/llkdu")
-if(NOT EXISTS ${internal_llkdu_path})
- if (EXISTS "${debug_llkdu_src}")
- ADD_CUSTOM_COMMAND(
- OUTPUT ${debug_llkdu_dst}
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${debug_llkdu_src} ${debug_llkdu_dst}
- DEPENDS ${debug_llkdu_src}
- COMMENT "Copying llkdu.dll ${SHARED_LIB_STAGING_DIR_DEBUG}"
- )
- set(third_party_targets ${third_party_targets} $} ${debug_llkdu_dst})
- endif (EXISTS "${debug_llkdu_src}")
-
- if (EXISTS "${release_llkdu_src}")
- ADD_CUSTOM_COMMAND(
- OUTPUT ${release_llkdu_dst}
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${release_llkdu_src} ${release_llkdu_dst}
- DEPENDS ${release_llkdu_src}
- COMMENT "Copying llkdu.dll ${SHARED_LIB_STAGING_DIR_RELEASE}"
- )
- set(third_party_targets ${third_party_targets} ${release_llkdu_dst})
-
- ADD_CUSTOM_COMMAND(
- OUTPUT ${relwithdebinfo_llkdu_dst}
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${release_llkdu_src} ${relwithdebinfo_llkdu_dst}
- DEPENDS ${release_llkdu_src}
- COMMENT "Copying llkdu.dll ${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}"
- )
- set(third_party_targets ${third_party_targets} ${relwithdebinfo_llkdu_dst})
- endif (EXISTS "${release_llkdu_src}")
-
-endif (NOT EXISTS ${internal_llkdu_path})
-
+if (FMOD_SDK_DIR)
+ copy_if_different(
+ ${FMOD_SDK_DIR}
+ "${CMAKE_CURRENT_BINARY_DIR}/Debug"
+ out_targets
+ ${fmod_files}
+ )
+ set(all_targets ${all_targets} ${out_targets})
+ copy_if_different(
+ ${FMOD_SDK_DIR}
+ "${CMAKE_CURRENT_BINARY_DIR}/Release"
+ out_targets
+ ${fmod_files}
+ )
+ set(all_targets ${all_targets} ${out_targets})
+ copy_if_different(
+ ${FMOD_SDK_DIR}
+ "${CMAKE_CURRENT_BINARY_DIR}/RelWithDbgInfo"
+ out_targets
+ ${fmod_files}
+ )
+ set(all_targets ${all_targets} ${out_targets})
+endif (FMOD_SDK_DIR)
if(NOT STANDALONE)
add_custom_target(
diff --git a/indra/cmake/FindJsonCpp.cmake b/indra/cmake/FindJsonCpp.cmake
index 9d16f2aaab..cf84b309c1 100644
--- a/indra/cmake/FindJsonCpp.cmake
+++ b/indra/cmake/FindJsonCpp.cmake
@@ -21,7 +21,12 @@ EXEC_PROGRAM(${CMAKE_CXX_COMPILER}
OUTPUT_STRIP_TRAILING_WHITESPACE
)
+# Try to find a library that was compiled with the same compiler version as we currently use.
SET(JSONCPP_NAMES ${JSONCPP_NAMES} libjson_linux-gcc-${_gcc_COMPILER_VERSION}_libmt.so)
+IF (STANDALONE)
+ # On standalone, assume that the system installed library was compiled with the used compiler.
+ SET(JSONCPP_NAMES ${JSONCPP_NAMES} libjson.so)
+ENDIF (STANDALONE)
FIND_LIBRARY(JSONCPP_LIBRARY
NAMES ${JSONCPP_NAMES}
PATHS /usr/lib /usr/local/lib
diff --git a/indra/cmake/FindLLQtWebkit.cmake b/indra/cmake/FindLLQtWebkit.cmake
new file mode 100644
index 0000000000..c747ec32a2
--- /dev/null
+++ b/indra/cmake/FindLLQtWebkit.cmake
@@ -0,0 +1,62 @@
+# -*- cmake -*-
+
+# - Find llqtwebkit
+# Find the llqtwebkit includes and library
+# This module defines
+# LLQTWEBKIT_INCLUDE_DIR, where to find llqtwebkit.h, etc.
+# LLQTWEBKIT_LIBRARY, the llqtwebkit library with full path.
+# LLQTWEBKIT_FOUND, If false, do not try to use llqtwebkit.
+# also defined, but not for general use are
+# LLQTWEBKIT_LIBRARIES, the libraries needed to use llqtwebkit.
+# LLQTWEBKIT_LIBRARY_DIRS, where to find the llqtwebkit library.
+# LLQTWEBKIT_DEFINITIONS - You should add_definitions(${LLQTWEBKIT_DEFINITIONS})
+# before compiling code that includes llqtwebkit library files.
+
+# Try to use pkg-config first.
+# This allows to have two different libllqtwebkit packages installed:
+# one for viewer 2.x and one for viewer 1.x.
+include(FindPkgConfig)
+if (PKG_CONFIG_FOUND)
+ if (LLQtWebkit_FIND_REQUIRED AND LLQtWebkit_FIND_VERSION)
+ set(_PACKAGE_ARGS libllqtwebkit>=${LLQtWebkit_FIND_VERSION} REQUIRED)
+ else (LLQtWebkit_FIND_REQUIRED AND LLQtWebkit_FIND_VERSION)
+ set(_PACKAGE_ARGS libllqtwebkit)
+ endif (LLQtWebkit_FIND_REQUIRED AND LLQtWebkit_FIND_VERSION)
+ if (NOT "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_LESS "2.8")
+ # As virtually nobody will have a pkg-config file for this, do this check always quiet.
+ # Unfortunately cmake 2.8 or higher is required for pkg_check_modules to have a 'QUIET'.
+ set(_PACKAGE_ARGS ${_PACKAGE_ARGS} QUIET)
+ endif ()
+ pkg_check_modules(LLQTWEBKIT ${_PACKAGE_ARGS})
+endif (PKG_CONFIG_FOUND)
+set(LLQTWEBKIT_DEFINITIONS ${LLQTWEBKIT_CFLAGS_OTHER})
+
+find_path(LLQTWEBKIT_INCLUDE_DIR llqtwebkit.h NO_SYSTEM_ENVIRONMENT_PATH HINTS ${LLQTWEBKIT_INCLUDE_DIRS})
+
+find_library(LLQTWEBKIT_LIBRARY NAMES llqtwebkit NO_SYSTEM_ENVIRONMENT_PATH HINTS ${LLQTWEBKIT_LIBRARY_DIRS})
+
+if (NOT PKG_CONFIG_FOUND OR NOT LLQTWEBKIT_FOUND) # If pkg-config couldn't find it, pretend we don't have pkg-config.
+ set(LLQTWEBKIT_LIBRARIES llqtwebkit)
+ get_filename_component(LLQTWEBKIT_LIBRARY_DIRS ${LLQTWEBKIT_LIBRARY} PATH)
+endif (NOT PKG_CONFIG_FOUND OR NOT LLQTWEBKIT_FOUND)
+
+# Handle the QUIETLY and REQUIRED arguments and set LLQTWEBKIT_FOUND
+# to TRUE if all listed variables are TRUE.
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(
+ LLQTWEBKIT
+ DEFAULT_MSG
+ LLQTWEBKIT_LIBRARY
+ LLQTWEBKIT_INCLUDE_DIR
+ LLQTWEBKIT_LIBRARIES
+ LLQTWEBKIT_LIBRARY_DIRS
+ )
+
+mark_as_advanced(
+ LLQTWEBKIT_LIBRARY
+ LLQTWEBKIT_INCLUDE_DIR
+ LLQTWEBKIT_LIBRARIES
+ LLQTWEBKIT_LIBRARY_DIRS
+ LLQTWEBKIT_DEFINITIONS
+ )
+
diff --git a/indra/cmake/FindNDOF.cmake b/indra/cmake/FindNDOF.cmake
new file mode 100644
index 0000000000..6dcf590a53
--- /dev/null
+++ b/indra/cmake/FindNDOF.cmake
@@ -0,0 +1,39 @@
+# -*- cmake -*-
+
+# - Find NDOF
+# Find the NDOF includes and library
+# This module defines
+# NDOF_INCLUDE_DIR, where to find ndofdev_external.h, etc.
+# NDOF_LIBRARY, the library needed to use NDOF.
+# NDOF_FOUND, If false, do not try to use NDOF.
+
+find_path(NDOF_INCLUDE_DIR ndofdev_external.h
+ PATH_SUFFIXES ndofdev
+ )
+
+set(NDOF_NAMES ${NDOF_NAMES} ndofdev libndofdev)
+find_library(NDOF_LIBRARY
+ NAMES ${NDOF_NAMES}
+ )
+
+if (NDOF_LIBRARY AND NDOF_INCLUDE_DIR)
+ set(NDOF_FOUND "YES")
+else (NDOF_LIBRARY AND NDOF_INCLUDE_DIR)
+ set(NDOF_FOUND "NO")
+endif (NDOF_LIBRARY AND NDOF_INCLUDE_DIR)
+
+
+if (NDOF_FOUND)
+ if (NOT NDOF_FIND_QUIETLY)
+ message(STATUS "Found NDOF: Library in '${NDOF_LIBRARY}' and header in '${NDOF_INCLUDE_DIR}' ")
+ endif (NOT NDOF_FIND_QUIETLY)
+else (NDOF_FOUND)
+ if (NDOF_FIND_REQUIRED)
+ message(FATAL_ERROR " * * *\nCould not find NDOF library!\nIf you don't need Space Navigator Joystick support you can skip this test by configuring with -DNDOF:BOOL=OFF\n * * *")
+ endif (NDOF_FIND_REQUIRED)
+endif (NDOF_FOUND)
+
+mark_as_advanced(
+ NDOF_LIBRARY
+ NDOF_INCLUDE_DIR
+ )
diff --git a/indra/cmake/FindTut.cmake b/indra/cmake/FindTut.cmake
index b5d58f6396..c2a9f43053 100644
--- a/indra/cmake/FindTut.cmake
+++ b/indra/cmake/FindTut.cmake
@@ -3,12 +3,11 @@
# - Find Tut
# Find the Tut unit test framework includes and library
# This module defines
-# TUT_INCLUDE_DIR, where to find tut.h, etc.
+# TUT_INCLUDE_DIR, where to find tut/tut.hpp.
# TUT_FOUND, If false, do not try to use Tut.
-find_path(TUT_INCLUDE_DIR tut.h
- /usr/local/include/
- /usr/include
+find_path(TUT_INCLUDE_DIR tut/tut.hpp
+ NO_SYSTEM_ENVIRONMENT_PATH
)
if (TUT_INCLUDE_DIR)
diff --git a/indra/cmake/FindZLIB.cmake b/indra/cmake/FindZLIB.cmake
new file mode 100644
index 0000000000..6d630f1ba9
--- /dev/null
+++ b/indra/cmake/FindZLIB.cmake
@@ -0,0 +1,46 @@
+# -*- cmake -*-
+
+# - Find zlib
+# Find the ZLIB includes and library
+# This module defines
+# ZLIB_INCLUDE_DIRS, where to find zlib.h, etc.
+# ZLIB_LIBRARIES, the libraries needed to use zlib.
+# ZLIB_FOUND, If false, do not try to use zlib.
+#
+# This FindZLIB is about 43 times as fast the one provided with cmake (2.8.x),
+# because it doesn't look up the version of zlib, resulting in a dramatic
+# speed up for configure (from 4 minutes 22 seconds to 6 seconds).
+#
+# Note: Since this file is only used for standalone, the windows
+# specific parts were left out.
+
+FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
+ NO_SYSTEM_ENVIRONMENT_PATH
+ )
+
+FIND_LIBRARY(ZLIB_LIBRARY z)
+
+if (ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
+ SET(ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR})
+ SET(ZLIB_LIBRARIES ${ZLIB_LIBRARY})
+ SET(ZLIB_FOUND "YES")
+else (ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
+ SET(ZLIB_FOUND "NO")
+endif (ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
+
+if (ZLIB_FOUND)
+ if (NOT ZLIB_FIND_QUIETLY)
+ message(STATUS "Found ZLIB: ${ZLIB_LIBRARIES}")
+ SET(ZLIB_FIND_QUIETLY TRUE)
+ endif (NOT ZLIB_FIND_QUIETLY)
+else (ZLIB_FOUND)
+ if (ZLIB_FIND_REQUIRED)
+ message(FATAL_ERROR "Could not find ZLIB library")
+ endif (ZLIB_FIND_REQUIRED)
+endif (ZLIB_FOUND)
+
+mark_as_advanced(
+ ZLIB_LIBRARY
+ ZLIB_INCLUDE_DIR
+ )
+
diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake
index 29e2492551..62b764bb30 100644
--- a/indra/cmake/LLAddBuildTest.cmake
+++ b/indra/cmake/LLAddBuildTest.cmake
@@ -205,6 +205,9 @@ FUNCTION(LL_ADD_INTEGRATION_TEST
endif(TEST_DEBUG)
ADD_EXECUTABLE(INTEGRATION_TEST_${testname} ${source_files})
SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${EXE_STAGING_DIR}")
+ if(STANDALONE)
+ SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} PROPERTIES COMPILE_FLAGS -I"${TUT_INCLUDE_DIR}")
+ endif(STANDALONE)
# Add link deps to the executable
if(TEST_DEBUG)
diff --git a/indra/cmake/LLCommon.cmake b/indra/cmake/LLCommon.cmake
index d1ab264a41..17e211cb99 100644
--- a/indra/cmake/LLCommon.cmake
+++ b/indra/cmake/LLCommon.cmake
@@ -13,7 +13,14 @@ set(LLCOMMON_INCLUDE_DIRS
${Boost_INCLUDE_DIRS}
)
-set(LLCOMMON_LIBRARIES llcommon)
+if (LINUX)
+ # In order to support using ld.gold on linux, we need to explicitely
+ # specify all libraries that llcommon uses.
+ # llcommon uses `clock_gettime' which is provided by librt on linux.
+ set(LLCOMMON_LIBRARIES llcommon rt)
+else (LINUX)
+ set(LLCOMMON_LIBRARIES llcommon)
+endif (LINUX)
add_definitions(${TCMALLOC_FLAG})
diff --git a/indra/cmake/LLKDU.cmake b/indra/cmake/LLKDU.cmake
index 27c8ada686..f5cbad03a6 100644
--- a/indra/cmake/LLKDU.cmake
+++ b/indra/cmake/LLKDU.cmake
@@ -1,7 +1,20 @@
# -*- cmake -*-
include(Prebuilt)
+# USE_KDU can be set when launching cmake or develop.py as an option using the argument -DUSE_KDU:BOOL=ON
+# When building using proprietary binaries though (i.e. having access to LL private servers), we always build with KDU
if (INSTALL_PROPRIETARY AND NOT STANDALONE)
- use_prebuilt_binary(kdu)
- set(LLKDU_LIBRARY llkdu)
+ set(USE_KDU ON)
endif (INSTALL_PROPRIETARY AND NOT STANDALONE)
+
+if (USE_KDU)
+ use_prebuilt_binary(kdu)
+ if (WINDOWS)
+ set(KDU_LIBRARY kdu.lib)
+ else (WINDOWS)
+ set(KDU_LIBRARY libkdu.a)
+ endif (WINDOWS)
+ set(KDU_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/kdu)
+ set(LLKDU_INCLUDE_DIRS ${LIBS_OPEN_DIR}/llkdu)
+ set(LLKDU_LIBRARIES llkdu)
+endif (USE_KDU)
diff --git a/indra/cmake/LLPlugin.cmake b/indra/cmake/LLPlugin.cmake
index 9722f16c3c..7ee404b9bd 100644
--- a/indra/cmake/LLPlugin.cmake
+++ b/indra/cmake/LLPlugin.cmake
@@ -5,4 +5,10 @@ set(LLPLUGIN_INCLUDE_DIRS
${LIBS_OPEN_DIR}/llplugin
)
-set(LLPLUGIN_LIBRARIES llplugin)
+if (LINUX)
+ # In order to support using ld.gold on linux, we need to explicitely
+ # specify all libraries that llplugin uses.
+ set(LLPLUGIN_LIBRARIES llplugin pthread)
+else (LINUX)
+ set(LLPLUGIN_LIBRARIES llplugin)
+endif (LINUX)
diff --git a/indra/cmake/NDOF.cmake b/indra/cmake/NDOF.cmake
index dad74e99b1..7a463d1190 100644
--- a/indra/cmake/NDOF.cmake
+++ b/indra/cmake/NDOF.cmake
@@ -1,14 +1,32 @@
# -*- cmake -*-
include(Prebuilt)
-use_prebuilt_binary(ndofdev)
+set(NDOF ON CACHE BOOL "Use NDOF space navigator joystick library.")
-if (WINDOWS OR DARWIN OR LINUX)
+if (NDOF)
+ if (STANDALONE)
+ set(NDOF_FIND_REQUIRED ON)
+ include(FindNDOF)
+ else (STANDALONE)
+ use_prebuilt_binary(ndofdev)
+
+ if (WINDOWS)
+ set(NDOF_LIBRARY libndofdev)
+ elseif (DARWIN OR LINUX)
+ set(NDOF_LIBRARY ndofdev)
+ endif (WINDOWS)
+
+ set(NDOF_INCLUDE_DIR ${ARCH_PREBUILT_DIRS}/include/ndofdev)
+ set(NDOF_FOUND 1)
+ endif (STANDALONE)
+endif (NDOF)
+
+if (NDOF_FOUND)
add_definitions(-DLIB_NDOF=1)
-endif (WINDOWS OR DARWIN OR LINUX)
+ include_directories(${NDOF_INCLUDE_DIR})
+else (NDOF_FOUND)
+ message(STATUS "Building without N-DoF joystick support")
+ set(NDOF_INCLUDE_DIR "")
+ set(NDOF_LIBRARY "")
+endif (NDOF_FOUND)
-if (WINDOWS)
- set(NDOF_LIBRARY libndofdev)
-elseif (DARWIN OR LINUX)
- set(NDOF_LIBRARY ndofdev)
-endif (WINDOWS)
diff --git a/indra/cmake/PulseAudio.cmake b/indra/cmake/PulseAudio.cmake
index e918de0198..360a971058 100644
--- a/indra/cmake/PulseAudio.cmake
+++ b/indra/cmake/PulseAudio.cmake
@@ -1,7 +1,7 @@
# -*- cmake -*-
include(Prebuilt)
-set(PULSEAUDIO ON CACHE BOOL "Build with PulseAudio support, if available.")
+set(PULSEAUDIO OFF CACHE BOOL "Build with PulseAudio support, if available.")
if (PULSEAUDIO)
if (STANDALONE)
diff --git a/indra/cmake/Tut.cmake b/indra/cmake/Tut.cmake
index 784560471d..738c08c42f 100644
--- a/indra/cmake/Tut.cmake
+++ b/indra/cmake/Tut.cmake
@@ -6,7 +6,6 @@ set(TUT_FIND_QUIETLY TRUE)
if (STANDALONE)
include(FindTut)
- include_directories(${TUT_INCLUDE_DIR})
else (STANDALONE)
use_prebuilt_binary(tut)
endif (STANDALONE)
diff --git a/indra/cmake/WebKitLibPlugin.cmake b/indra/cmake/WebKitLibPlugin.cmake
index 12ba1b1b35..1f5b0f5d84 100644
--- a/indra/cmake/WebKitLibPlugin.cmake
+++ b/indra/cmake/WebKitLibPlugin.cmake
@@ -3,6 +3,29 @@ include(Linking)
include(Prebuilt)
if (STANDALONE)
+ # The minimal version, 4.4.3, is rather arbitrary: it's the version in Debian/Lenny.
+ find_package(Qt4 4.4.3 COMPONENTS QtCore QtGui QtNetwork QtOpenGL QtWebKit REQUIRED)
+ include(${QT_USE_FILE})
+ set(QTDIR $ENV{QTDIR})
+ if (QTDIR AND NOT "${QT_BINARY_DIR}" STREQUAL "${QTDIR}/bin")
+ message(FATAL_ERROR "\"${QT_BINARY_DIR}\" is unequal \"${QTDIR}/bin\"; "
+ "Qt is found by looking for qmake in your PATH. "
+ "Please set your PATH such that 'qmake' is found in \$QTDIR/bin, "
+ "or unset QTDIR if the found Qt is correct.")
+ endif (QTDIR AND NOT "${QT_BINARY_DIR}" STREQUAL "${QTDIR}/bin")
+ find_package(LLQtWebkit REQUIRED QUIET)
+ # Add the plugins.
+ set(QT_PLUGIN_LIBRARIES)
+ foreach(qlibname qgif qjpeg)
+ find_library(QT_PLUGIN_${qlibname} ${qlibname} PATHS ${QT_PLUGINS_DIR}/imageformats NO_DEFAULT_PATH)
+ if (QT_PLUGIN_${qlibname})
+ list(APPEND QT_PLUGIN_LIBRARIES ${QT_PLUGIN_${qlibname}})
+ else (QT_PLUGIN_${qtlibname})
+ message(FATAL_ERROR "Could not find the Qt plugin ${qlibname} in \"${QT_PLUGINS_DIR}/imageformats\"!")
+ endif (QT_PLUGIN_${qlibname})
+ endforeach(qlibname)
+ # qjpeg depends on libjpeg
+ list(APPEND QT_PLUGIN_LIBRARIES jpeg)
set(WEBKITLIBPLUGIN OFF CACHE BOOL
"WEBKITLIBPLUGIN support for the llplugin/llmedia test apps.")
else (STANDALONE)
@@ -35,7 +58,7 @@ elseif (DARWIN)
)
elseif (LINUX)
if (STANDALONE)
- set(WEBKIT_PLUGIN_LIBRARIES llqtwebkit)
+ set(WEBKIT_PLUGIN_LIBRARIES ${LLQTWEBKIT_LIBRARY} ${QT_LIBRARIES} ${QT_PLUGIN_LIBRARIES})
else (STANDALONE)
set(WEBKIT_PLUGIN_LIBRARIES
llqtwebkit
diff --git a/indra/integration_tests/llui_libtest/CMakeLists.txt b/indra/integration_tests/llui_libtest/CMakeLists.txt
index 452d37d3be..e0772e55ca 100644
--- a/indra/integration_tests/llui_libtest/CMakeLists.txt
+++ b/indra/integration_tests/llui_libtest/CMakeLists.txt
@@ -10,6 +10,7 @@ include(00-Common)
include(LLCommon)
include(LLImage)
include(LLImageJ2COJ) # ugh, needed for images
+include(LLKDU)
include(LLMath)
include(LLMessage)
include(LLRender)
@@ -71,6 +72,11 @@ endif (DARWIN)
target_link_libraries(llui_libtest
llui
llmessage
+ ${LLRENDER_LIBRARIES}
+ ${LLIMAGE_LIBRARIES}
+ ${LLKDU_LIBRARIES}
+ ${KDU_LIBRARY}
+ ${LLIMAGEJ2COJ_LIBRARIES}
${OS_LIBRARIES}
${GOOGLE_PERFTOOLS_LIBRARIES}
)
diff --git a/indra/lib/python/indra/util/test_win32_manifest.py b/indra/lib/python/indra/util/test_win32_manifest.py
index 786521c068..da8ee6c545 100644
--- a/indra/lib/python/indra/util/test_win32_manifest.py
+++ b/indra/lib/python/indra/util/test_win32_manifest.py
@@ -52,20 +52,22 @@ def get_HKLM_registry_value(key_str, value_str):
def find_vc_dir():
supported_versions = (r'8.0', r'9.0')
+ supported_products = (r'VisualStudio', r'VCExpress')
value_str = (r'ProductDir')
- for version in supported_versions:
- key_str = (r'SOFTWARE\Microsoft\VisualStudio\%s\Setup\VC' %
- version)
- try:
- return get_HKLM_registry_value(key_str, value_str)
- except WindowsError, err:
- x64_key_str = (r'SOFTWARE\Wow6432Node\Microsoft\VisualStudio\%s\Setup\VS' %
- version)
+ for product in supported_products:
+ for version in supported_versions:
+ key_str = (r'SOFTWARE\Microsoft\%s\%s\Setup\VC' %
+ (product, version))
try:
- return get_HKLM_registry_value(x64_key_str, value_str)
- except:
- print >> sys.stderr, "Didn't find MS VC version %s " % version
+ return get_HKLM_registry_value(key_str, value_str)
+ except WindowsError, err:
+ x64_key_str = (r'SOFTWARE\Wow6432Node\Microsoft\VisualStudio\%s\Setup\VS' %
+ version)
+ try:
+ return get_HKLM_registry_value(x64_key_str, value_str)
+ except:
+ print >> sys.stderr, "Didn't find MS %s version %s " % (product,version)
raise
diff --git a/indra/llcommon/llapr.cpp b/indra/llcommon/llapr.cpp
index 66ec5bad2c..d1c44c9403 100644
--- a/indra/llcommon/llapr.cpp
+++ b/indra/llcommon/llapr.cpp
@@ -28,6 +28,7 @@
#include "linden_common.h"
#include "llapr.h"
+#include "apr_dso.h"
apr_pool_t *gAPRPoolp = NULL; // Global APR memory pool
LLVolatileAPRPool *LLAPRFile::sAPRFilePoolp = NULL ; //global volatile APR memory pool.
@@ -279,14 +280,31 @@ bool ll_apr_warn_status(apr_status_t status)
{
if(APR_SUCCESS == status) return false;
char buf[MAX_STRING]; /* Flawfinder: ignore */
- apr_strerror(status, buf, MAX_STRING);
+ apr_strerror(status, buf, sizeof(buf));
LL_WARNS("APR") << "APR: " << buf << LL_ENDL;
return true;
}
+bool ll_apr_warn_status(apr_status_t status, apr_dso_handle_t *handle)
+{
+ bool result = ll_apr_warn_status(status);
+ // Despite observed truncation of actual Mac dylib load errors, increasing
+ // this buffer to more than MAX_STRING doesn't help: it appears that APR
+ // stores the output in a fixed 255-character internal buffer. (*sigh*)
+ char buf[MAX_STRING]; /* Flawfinder: ignore */
+ apr_dso_error(handle, buf, sizeof(buf));
+ LL_WARNS("APR") << "APR: " << buf << LL_ENDL;
+ return result;
+}
+
void ll_apr_assert_status(apr_status_t status)
{
- llassert(ll_apr_warn_status(status) == false);
+ llassert(! ll_apr_warn_status(status));
+}
+
+void ll_apr_assert_status(apr_status_t status, apr_dso_handle_t *handle)
+{
+ llassert(! ll_apr_warn_status(status, handle));
}
//---------------------------------------------------------------------
diff --git a/indra/llcommon/llapr.h b/indra/llcommon/llapr.h
index 4930270af8..af33ce666f 100644
--- a/indra/llcommon/llapr.h
+++ b/indra/llcommon/llapr.h
@@ -53,6 +53,8 @@
extern LL_COMMON_API apr_thread_mutex_t* gLogMutexp;
extern apr_thread_mutex_t* gCallStacksLogMutexp;
+struct apr_dso_handle_t;
+
/**
* @brief initialize the common apr constructs -- apr itself, the
* global pool, and a mutex.
@@ -259,8 +261,11 @@ public:
* @return Returns <code>true</code> if status is an error condition.
*/
bool LL_COMMON_API ll_apr_warn_status(apr_status_t status);
+/// There's a whole other APR error-message function if you pass a DSO handle.
+bool LL_COMMON_API ll_apr_warn_status(apr_status_t status, apr_dso_handle_t* handle);
void LL_COMMON_API ll_apr_assert_status(apr_status_t status);
+void LL_COMMON_API ll_apr_assert_status(apr_status_t status, apr_dso_handle_t* handle);
extern "C" LL_COMMON_API apr_pool_t* gAPRPoolp; // Global APR memory pool
diff --git a/indra/llcommon/llevents.cpp b/indra/llcommon/llevents.cpp
index 84a6620a77..97e2bdeb57 100644
--- a/indra/llcommon/llevents.cpp
+++ b/indra/llcommon/llevents.cpp
@@ -475,7 +475,7 @@ void LLEventPump::stopListening(const std::string& name)
*****************************************************************************/
bool LLEventStream::post(const LLSD& event)
{
- if (! mEnabled)
+ if (! mEnabled || !mSignal)
{
return false;
}
@@ -515,6 +515,8 @@ bool LLEventQueue::post(const LLSD& event)
void LLEventQueue::flush()
{
+ if(!mSignal) return;
+
// Consider the case when a given listener on this LLEventQueue posts yet
// another event on the same queue. If we loop over mEventQueue directly,
// we'll end up processing all those events during the same flush() call
diff --git a/indra/llcommon/llprocesslauncher.cpp b/indra/llcommon/llprocesslauncher.cpp
index 81e5f8820d..4b0f6b0251 100644
--- a/indra/llcommon/llprocesslauncher.cpp
+++ b/indra/llcommon/llprocesslauncher.cpp
@@ -265,14 +265,7 @@ int LLProcessLauncher::launch(void)
delete[] fake_argv;
mProcessID = id;
-
- // At this point, the child process will have been created (since that's how vfork works -- the child borrowed our execution context until it forked)
- // If the process doesn't exist at this point, the exec failed.
- if(!isRunning())
- {
- result = -1;
- }
-
+
return result;
}
diff --git a/indra/llcommon/llqueuedthread.h b/indra/llcommon/llqueuedthread.h
index c75e0e2bbf..a53b22f6fc 100644
--- a/indra/llcommon/llqueuedthread.h
+++ b/indra/llcommon/llqueuedthread.h
@@ -179,7 +179,7 @@ public:
void waitOnPending();
void printQueueStats();
- S32 getPending();
+ virtual S32 getPending();
bool getThreaded() { return mThreaded ? true : false; }
// Request accessors
diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h
index d6fa5b1997..356e0f4c0f 100644
--- a/indra/llcommon/llversionviewer.h
+++ b/indra/llcommon/llversionviewer.h
@@ -35,7 +35,7 @@ const S32 LL_VERSION_BUILD = 0;
const char * const LL_CHANNEL = "Second Life Developer";
#if LL_DARWIN
-const char * const LL_VERSION_BUNDLE_ID = "com.secondlife.snowglobe.viewer";
+const char * const LL_VERSION_BUNDLE_ID = "com.secondlife.indra.viewer";
#endif
#endif
diff --git a/indra/llimage/CMakeLists.txt b/indra/llimage/CMakeLists.txt
index a69621a57b..ea8c1a1107 100644
--- a/indra/llimage/CMakeLists.txt
+++ b/indra/llimage/CMakeLists.txt
@@ -3,12 +3,13 @@
project(llimage)
include(00-Common)
-include(LLAddBuildTest)
include(LLCommon)
include(LLImage)
include(LLMath)
include(LLVFS)
include(ZLIB)
+include(LLAddBuildTest)
+include(Tut)
include_directories(
${LLCOMMON_INCLUDE_DIRS}
@@ -57,11 +58,18 @@ add_library (llimage ${llimage_SOURCE_FILES})
# Sort by high-level to low-level
target_link_libraries(llimage
llcommon
- llimagej2coj # *HACK: In theory a noop for KDU builds?
${JPEG_LIBRARIES}
${PNG_LIBRARIES}
${ZLIB_LIBRARIES}
)
# Add tests
-#ADD_BUILD_TEST(llimageworker llimage)
+if (LL_TESTS)
+ SET(llimage_TEST_SOURCE_FILES
+ llimageworker.cpp
+ )
+ LL_ADD_PROJECT_UNIT_TESTS(llimage "${llimage_TEST_SOURCE_FILES}")
+endif (LL_TESTS)
+
+
+
diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp
index 5c33b675ca..b46a99e030 100644
--- a/indra/llimage/llimage.cpp
+++ b/indra/llimage/llimage.cpp
@@ -52,13 +52,11 @@ LLMutex* LLImage::sMutex = NULL;
void LLImage::initClass()
{
sMutex = new LLMutex(NULL);
- LLImageJ2C::openDSO();
}
//static
void LLImage::cleanupClass()
{
- LLImageJ2C::closeDSO();
delete sMutex;
sMutex = NULL;
}
diff --git a/indra/llimage/llimagej2c.cpp b/indra/llimage/llimagej2c.cpp
index d005aaf29f..cb2a85fa91 100644
--- a/indra/llimage/llimagej2c.cpp
+++ b/indra/llimage/llimagej2c.cpp
@@ -24,9 +24,6 @@
*/
#include "linden_common.h"
-#include "apr_pools.h"
-#include "apr_dso.h"
-
#include "lldir.h"
#include "llimagej2c.h"
#include "llmemtype.h"
@@ -37,18 +34,10 @@ typedef LLImageJ2CImpl* (*CreateLLImageJ2CFunction)();
typedef void (*DestroyLLImageJ2CFunction)(LLImageJ2CImpl*);
typedef const char* (*EngineInfoLLImageJ2CFunction)();
-//some "private static" variables so we only attempt to load
-//dynamic libaries once
-CreateLLImageJ2CFunction j2cimpl_create_func;
-DestroyLLImageJ2CFunction j2cimpl_destroy_func;
-EngineInfoLLImageJ2CFunction j2cimpl_engineinfo_func;
-apr_pool_t *j2cimpl_dso_memory_pool;
-apr_dso_handle_t *j2cimpl_dso_handle;
-
-//Declare the prototype for theses functions here, their functionality
-//will be implemented in other files which define a derived LLImageJ2CImpl
-//but only ONE static library which has the implementation for this
-//function should ever be included
+// Declare the prototype for theses functions here. Their functionality
+// will be implemented in other files which define a derived LLImageJ2CImpl
+// but only ONE static library which has the implementation for these
+// functions should ever be included.
LLImageJ2CImpl* fallbackCreateLLImageJ2CImpl();
void fallbackDestroyLLImageJ2CImpl(LLImageJ2CImpl* impl);
const char* fallbackEngineInfoLLImageJ2CImpl();
@@ -58,120 +47,9 @@ LLImageCompressionTester* LLImageJ2C::sTesterp = NULL ;
const std::string sTesterName("ImageCompressionTester");
//static
-//Loads the required "create", "destroy" and "engineinfo" functions needed
-void LLImageJ2C::openDSO()
-{
- //attempt to load a DSO and get some functions from it
- std::string dso_name;
- std::string dso_path;
-
- bool all_functions_loaded = false;
- apr_status_t rv;
-
-#if LL_WINDOWS
- dso_name = "llkdu.dll";
-#elif LL_DARWIN
- dso_name = "libllkdu.dylib";
-#else
- dso_name = "libllkdu.so";
-#endif
-
- dso_path = gDirUtilp->findFile(dso_name,
- gDirUtilp->getAppRODataDir(),
- gDirUtilp->getExecutableDir());
-
- j2cimpl_dso_handle = NULL;
- j2cimpl_dso_memory_pool = NULL;
-
- //attempt to load the shared library
- apr_pool_create(&j2cimpl_dso_memory_pool, NULL);
- rv = apr_dso_load(&j2cimpl_dso_handle,
- dso_path.c_str(),
- j2cimpl_dso_memory_pool);
-
- //now, check for success
- if ( rv == APR_SUCCESS )
- {
- //found the dynamic library
- //now we want to load the functions we're interested in
- CreateLLImageJ2CFunction create_func = NULL;
- DestroyLLImageJ2CFunction dest_func = NULL;
- EngineInfoLLImageJ2CFunction engineinfo_func = NULL;
-
- rv = apr_dso_sym((apr_dso_handle_sym_t*)&create_func,
- j2cimpl_dso_handle,
- "createLLImageJ2CKDU");
- if ( rv == APR_SUCCESS )
- {
- //we've loaded the create function ok
- //we need to delete via the DSO too
- //so lets check for a destruction function
- rv = apr_dso_sym((apr_dso_handle_sym_t*)&dest_func,
- j2cimpl_dso_handle,
- "destroyLLImageJ2CKDU");
- if ( rv == APR_SUCCESS )
- {
- //we've loaded the destroy function ok
- rv = apr_dso_sym((apr_dso_handle_sym_t*)&engineinfo_func,
- j2cimpl_dso_handle,
- "engineInfoLLImageJ2CKDU");
- if ( rv == APR_SUCCESS )
- {
- //ok, everything is loaded alright
- j2cimpl_create_func = create_func;
- j2cimpl_destroy_func = dest_func;
- j2cimpl_engineinfo_func = engineinfo_func;
- all_functions_loaded = true;
- }
- }
- }
- }
-
- if ( !all_functions_loaded )
- {
- //something went wrong with the DSO or function loading..
- //fall back onto our satefy impl creation function
-
-#if 0
- // precious verbose debugging, sadly we can't use our
- // 'llinfos' stream etc. this early in the initialisation seq.
- char errbuf[256];
- fprintf(stderr, "failed to load syms from DSO %s (%s)\n",
- dso_name.c_str(), dso_path.c_str());
- apr_strerror(rv, errbuf, sizeof(errbuf));
- fprintf(stderr, "error: %d, %s\n", rv, errbuf);
- apr_dso_error(j2cimpl_dso_handle, errbuf, sizeof(errbuf));
- fprintf(stderr, "dso-error: %d, %s\n", rv, errbuf);
-#endif
-
- if ( j2cimpl_dso_handle )
- {
- apr_dso_unload(j2cimpl_dso_handle);
- j2cimpl_dso_handle = NULL;
- }
-
- if ( j2cimpl_dso_memory_pool )
- {
- apr_pool_destroy(j2cimpl_dso_memory_pool);
- j2cimpl_dso_memory_pool = NULL;
- }
- }
-}
-
-//static
-void LLImageJ2C::closeDSO()
-{
- if ( j2cimpl_dso_handle ) apr_dso_unload(j2cimpl_dso_handle);
- if (j2cimpl_dso_memory_pool) apr_pool_destroy(j2cimpl_dso_memory_pool);
-}
-
-//static
std::string LLImageJ2C::getEngineInfo()
{
- if (!j2cimpl_engineinfo_func)
- j2cimpl_engineinfo_func = fallbackEngineInfoLLImageJ2CImpl;
-
- return j2cimpl_engineinfo_func();
+ return fallbackEngineInfoLLImageJ2CImpl();
}
LLImageJ2C::LLImageJ2C() : LLImageFormatted(IMG_CODEC_J2C),
@@ -181,20 +59,7 @@ LLImageJ2C::LLImageJ2C() : LLImageFormatted(IMG_CODEC_J2C),
mReversible(FALSE),
mAreaUsedForDataSizeCalcs(0)
{
- //We assume here that if we wanted to create via
- //a dynamic library that the approriate open calls were made
- //before any calls to this constructor.
-
- //Therefore, a NULL creation function pointer here means
- //we either did not want to create using functions from the dynamic
- //library or there were issues loading it, either way
- //use our fall back
- if ( !j2cimpl_create_func )
- {
- j2cimpl_create_func = fallbackCreateLLImageJ2CImpl;
- }
-
- mImpl = j2cimpl_create_func();
+ mImpl = fallbackCreateLLImageJ2CImpl();
// Clear data size table
for( S32 i = 0; i <= MAX_DISCARD_LEVEL; i++)
@@ -217,22 +82,9 @@ LLImageJ2C::LLImageJ2C() : LLImageFormatted(IMG_CODEC_J2C),
// virtual
LLImageJ2C::~LLImageJ2C()
{
- //We assume here that if we wanted to destroy via
- //a dynamic library that the approriate open calls were made
- //before any calls to this destructor.
-
- //Therefore, a NULL creation function pointer here means
- //we either did not want to destroy using functions from the dynamic
- //library or there were issues loading it, either way
- //use our fall back
- if ( !j2cimpl_destroy_func )
- {
- j2cimpl_destroy_func = fallbackDestroyLLImageJ2CImpl;
- }
-
if ( mImpl )
{
- j2cimpl_destroy_func(mImpl);
+ fallbackDestroyLLImageJ2CImpl(mImpl);
}
}
diff --git a/indra/llimage/llimagej2c.h b/indra/llimage/llimagej2c.h
index cc3dabd7d8..dd5bec8b2e 100644
--- a/indra/llimage/llimagej2c.h
+++ b/indra/llimage/llimagej2c.h
@@ -72,8 +72,6 @@ public:
static S32 calcHeaderSizeJ2C();
static S32 calcDataSizeJ2C(S32 w, S32 h, S32 comp, S32 discard_level, F32 rate = 0.f);
- static void openDSO();
- static void closeDSO();
static std::string getEngineInfo();
protected:
diff --git a/indra/llimage/tests/llimageworker_test.cpp b/indra/llimage/tests/llimageworker_test.cpp
index a109276709..08476fb72c 100644
--- a/indra/llimage/tests/llimageworker_test.cpp
+++ b/indra/llimage/tests/llimageworker_test.cpp
@@ -26,10 +26,8 @@
*/
// Precompiled header: almost always required for newview cpp files
-#include <list>
-#include <map>
-#include <algorithm>
-// Class to test
+#include "linden_common.h"
+// Class to test
#include "../llimageworker.h"
// For timer class
#include "../llcommon/lltimer.h"
@@ -44,7 +42,17 @@
// * Do not make any assumption as to how those classes or methods work (i.e. don't copy/paste code)
// * A simulator for a class can be implemented here. Please comment and document thoroughly.
-LLImageBase::LLImageBase() {}
+LLImageBase::LLImageBase()
+: mData(NULL),
+mDataSize(0),
+mWidth(0),
+mHeight(0),
+mComponents(0),
+mBadBufferAllocation(false),
+mAllowOverSize(false),
+mMemType(LLMemType::MTYPE_IMAGEBASE)
+{
+}
LLImageBase::~LLImageBase() {}
void LLImageBase::dump() { }
void LLImageBase::sanityCheck() { }
diff --git a/indra/llimagej2coj/llimagej2coj.cpp b/indra/llimagej2coj/llimagej2coj.cpp
index 95e0997d5b..13b12c0928 100644
--- a/indra/llimagej2coj/llimagej2coj.cpp
+++ b/indra/llimagej2coj/llimagej2coj.cpp
@@ -90,6 +90,12 @@ void info_callback(const char* msg, void*)
lldebugs << "LLImageJ2COJ: " << chomp(msg) << llendl;
}
+// Divide a by 2 to the power of b and round upwards
+int ceildivpow2(int a, int b)
+{
+ return (a + (1 << b) - 1) >> b;
+}
+
LLImageJ2COJ::LLImageJ2COJ()
: LLImageJ2CImpl()
diff --git a/indra/llimagej2coj/llimagej2coj.h b/indra/llimagej2coj/llimagej2coj.h
index 7edacbe97c..9476665ccb 100644
--- a/indra/llimagej2coj/llimagej2coj.h
+++ b/indra/llimagej2coj/llimagej2coj.h
@@ -34,17 +34,11 @@ class LLImageJ2COJ : public LLImageJ2CImpl
public:
LLImageJ2COJ();
virtual ~LLImageJ2COJ();
-
protected:
/*virtual*/ BOOL getMetadata(LLImageJ2C &base);
/*virtual*/ BOOL decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decode_time, S32 first_channel, S32 max_channel_count);
/*virtual*/ BOOL encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, const char* comment_text, F32 encode_time=0.0,
BOOL reversible = FALSE);
- int ceildivpow2(int a, int b)
- {
- // Divide a by b to the power of 2 and round upwards.
- return (a + (1 << b) - 1) >> b;
- }
};
#endif
diff --git a/indra/llinventory/llnotecard.cpp b/indra/llinventory/llnotecard.cpp
index 62829c284f..69152cefe0 100644
--- a/indra/llinventory/llnotecard.cpp
+++ b/indra/llinventory/llnotecard.cpp
@@ -199,7 +199,7 @@ bool LLNotecard::importStream(std::istream& str)
return FALSE;
}
- if(text_len > mMaxText)
+ if(text_len > mMaxText || text_len < 0)
{
llwarns << "Invalid Linden text length: " << text_len << llendl;
return FALSE;
diff --git a/indra/llkdu/CMakeLists.txt b/indra/llkdu/CMakeLists.txt
new file mode 100644
index 0000000000..7ed1c6c694
--- /dev/null
+++ b/indra/llkdu/CMakeLists.txt
@@ -0,0 +1,55 @@
+# -*- cmake -*-
+
+project(llkdu)
+
+# Visual Studio 2005 has a dumb bug that causes it to fail compilation
+# of KDU if building with both optimisation and /WS (treat warnings as
+# errors), even when the specific warnings that make it croak are
+# disabled.
+
+#set(VS_DISABLE_FATAL_WARNINGS ON)
+
+include(00-Common)
+include(LLCommon)
+include(LLImage)
+include(LLKDU)
+include(LLMath)
+
+include_directories(
+ ${LLCOMMON_INCLUDE_DIRS}
+ ${LLIMAGE_INCLUDE_DIRS}
+ ${KDU_INCLUDE_DIR}
+ ${LLMATH_INCLUDE_DIRS}
+ )
+
+set(llkdu_SOURCE_FILES
+ llimagej2ckdu.cpp
+ llkdumem.cpp
+ )
+
+set(llkdu_HEADER_FILES
+ CMakeLists.txt
+
+ llimagej2ckdu.h
+ llkdumem.h
+ )
+
+set_source_files_properties(${llkdu_HEADER_FILES}
+ PROPERTIES HEADER_FILE_ONLY TRUE)
+
+list(APPEND llkdu_SOURCE_FILES ${llkdu_HEADER_FILES})
+
+if (USE_KDU)
+ add_library (${LLKDU_LIBRARIES} ${llkdu_SOURCE_FILES})
+
+ # Add tests
+ if (LL_TESTS)
+ include(LLAddBuildTest)
+ include(Tut)
+ SET(llkdu_TEST_SOURCE_FILES
+ llimagej2ckdu.cpp
+ )
+ LL_ADD_PROJECT_UNIT_TESTS(llkdu "${llkdu_TEST_SOURCE_FILES}")
+ endif (LL_TESTS)
+
+endif (USE_KDU)
diff --git a/indra/llkdu/llimagej2ckdu.cpp b/indra/llkdu/llimagej2ckdu.cpp
new file mode 100644
index 0000000000..10ea5685e8
--- /dev/null
+++ b/indra/llkdu/llimagej2ckdu.cpp
@@ -0,0 +1,1085 @@
+ /**
+ * @file llimagej2ckdu.cpp
+ * @brief This is an implementation of JPEG2000 encode/decode using Kakadu
+ *
+ * $LicenseInfo:firstyear=2010&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "linden_common.h"
+#include "llimagej2ckdu.h"
+
+#include "lltimer.h"
+#include "llpointer.h"
+#include "llkdumem.h"
+
+
+class kdc_flow_control {
+
+public: // Member functions
+ kdc_flow_control(kdu_image_in_base *img_in, kdu_codestream codestream);
+ ~kdc_flow_control();
+ bool advance_components();
+ void process_components();
+
+private: // Data
+
+ struct kdc_component_flow_control {
+ public: // Data
+ kdu_image_in_base *reader;
+ int vert_subsampling;
+ int ratio_counter; /* Initialized to 0, decremented by `count_delta';
+ when < 0, a new line must be processed, after
+ which it is incremented by `vert_subsampling'. */
+ int initial_lines;
+ int remaining_lines;
+ kdu_line_buf *line;
+ };
+
+ kdu_codestream codestream;
+ kdu_dims valid_tile_indices;
+ kdu_coords tile_idx;
+ kdu_tile tile;
+ int num_components;
+ kdc_component_flow_control *components;
+ int count_delta; // Holds the minimum of the `vert_subsampling' fields
+ kdu_multi_analysis engine;
+ kdu_long max_buffer_memory;
+};
+
+//
+// Kakadu specific implementation
+//
+void set_default_colour_weights(kdu_params *siz);
+
+const char* engineInfoLLImageJ2CKDU()
+{
+ return "KDU v6.4.1";
+}
+
+LLImageJ2CKDU* createLLImageJ2CKDU()
+{
+ return new LLImageJ2CKDU();
+}
+
+void destroyLLImageJ2CKDU(LLImageJ2CKDU* kdu)
+{
+ delete kdu;
+ kdu = NULL;
+}
+
+LLImageJ2CImpl* fallbackCreateLLImageJ2CImpl()
+{
+ return new LLImageJ2CKDU();
+}
+
+void fallbackDestroyLLImageJ2CImpl(LLImageJ2CImpl* impl)
+{
+ delete impl;
+ impl = NULL;
+}
+
+const char* fallbackEngineInfoLLImageJ2CImpl()
+{
+ return engineInfoLLImageJ2CKDU();
+}
+
+class LLKDUDecodeState
+{
+public:
+
+ S32 mNumComponents;
+ BOOL mUseYCC;
+ kdu_dims mDims;
+ kdu_sample_allocator mAllocator;
+ kdu_tile_comp mComps[4];
+ kdu_line_buf mLines[4];
+ kdu_pull_ifc mEngines[4];
+ bool mReversible[4]; // Some components may be reversible and others not.
+ int mBitDepths[4]; // Original bit-depth may be quite different from 8.
+
+ kdu_tile mTile;
+ kdu_byte *mBuf;
+ S32 mRowGap;
+
+ LLKDUDecodeState(kdu_tile tile, kdu_byte *buf, S32 row_gap);
+ ~LLKDUDecodeState();
+ BOOL processTileDecode(F32 decode_time, BOOL limit_time = TRUE);
+
+public:
+ int *AssignLayerBytes(siz_params *siz, int &num_specs);
+
+ void setupCodeStream(BOOL keep_codestream, LLImageJ2CKDU::ECodeStreamMode mode);
+ BOOL initDecode(LLImageRaw &raw_image, F32 decode_time, LLImageJ2CKDU::ECodeStreamMode mode, S32 first_channel, S32 max_channel_count );
+};
+
+void ll_kdu_error( void )
+{
+ // *FIX: This exception is bad, bad, bad. It gets thrown from a
+ // destructor which can lead to immediate program termination!
+ throw "ll_kdu_error() throwing an exception";
+}
+
+// Stuff for new kdu error handling
+class LLKDUMessageWarning : public kdu_message
+{
+public:
+ /*virtual*/ void put_text(const char *s);
+ /*virtual*/ void put_text(const kdu_uint16 *s);
+
+ static LLKDUMessageWarning sDefaultMessage;
+};
+
+class LLKDUMessageError : public kdu_message
+{
+public:
+ /*virtual*/ void put_text(const char *s);
+ /*virtual*/ void put_text(const kdu_uint16 *s);
+ /*virtual*/ void flush(bool end_of_message=false);
+ static LLKDUMessageError sDefaultMessage;
+};
+
+void LLKDUMessageWarning::put_text(const char *s)
+{
+ llinfos << "KDU Warning: " << s << llendl;
+}
+
+void LLKDUMessageWarning::put_text(const kdu_uint16 *s)
+{
+ llinfos << "KDU Warning: " << s << llendl;
+}
+
+void LLKDUMessageError::put_text(const char *s)
+{
+ llinfos << "KDU Error: " << s << llendl;
+}
+
+void LLKDUMessageError::put_text(const kdu_uint16 *s)
+{
+ llinfos << "KDU Error: " << s << llendl;
+}
+
+void LLKDUMessageError::flush(bool end_of_message)
+{
+ if( end_of_message )
+ {
+ throw "KDU throwing an exception";
+ }
+}
+
+LLKDUMessageWarning LLKDUMessageWarning::sDefaultMessage;
+LLKDUMessageError LLKDUMessageError::sDefaultMessage;
+static bool kdu_message_initialized = false;
+
+LLImageJ2CKDU::LLImageJ2CKDU() : LLImageJ2CImpl(),
+mInputp(NULL),
+mCodeStreamp(NULL),
+mTPosp(NULL),
+mTileIndicesp(NULL),
+mRawImagep(NULL),
+mDecodeState(NULL)
+{
+}
+
+LLImageJ2CKDU::~LLImageJ2CKDU()
+{
+ cleanupCodeStream(); // in case destroyed before decode completed
+}
+
+// Stuff for new simple decode
+void transfer_bytes(kdu_byte *dest, kdu_line_buf &src, int gap, int precision);
+
+void LLImageJ2CKDU::setupCodeStream(LLImageJ2C &base, BOOL keep_codestream, ECodeStreamMode mode)
+{
+ S32 data_size = base.getDataSize();
+ S32 max_bytes = base.getMaxBytes() ? base.getMaxBytes() : data_size;
+
+ //
+ // Initialization
+ //
+ if (!kdu_message_initialized)
+ {
+ kdu_message_initialized = true;
+ kdu_customize_errors(&LLKDUMessageError::sDefaultMessage);
+ kdu_customize_warnings(&LLKDUMessageWarning::sDefaultMessage);
+ }
+
+ if (mCodeStreamp)
+ {
+ mCodeStreamp->destroy();
+ delete mCodeStreamp;
+ mCodeStreamp = NULL;
+ }
+
+ if (!mInputp && base.getData())
+ {
+ // The compressed data has been loaded
+ // Setup the source for the codestream
+ mInputp = new LLKDUMemSource(base.getData(), data_size);
+ }
+
+ if (mInputp)
+ {
+ mInputp->reset();
+ }
+ mCodeStreamp = new kdu_codestream;
+
+ mCodeStreamp->create(mInputp);
+
+ // Set the maximum number of bytes to use from the codestream
+ mCodeStreamp->set_max_bytes(max_bytes);
+
+ // If you want to flip or rotate the image for some reason, change
+ // the resolution, or identify a restricted region of interest, this is
+ // the place to do it. You may use "kdu_codestream::change_appearance"
+ // and "kdu_codestream::apply_input_restrictions" for this purpose.
+ // If you wish to truncate the code-stream prior to decompression, you
+ // may use "kdu_codestream::set_max_bytes".
+ // If you wish to retain all compressed data so that the material
+ // can be decompressed multiple times, possibly with different appearance
+ // parameters, you should call "kdu_codestream::set_persistent" here.
+ // There are a variety of other features which must be enabled at
+ // this point if you want to take advantage of them. See the
+ // descriptions appearing with the "kdu_codestream" interface functions
+ // in "kdu_compressed.h" for an itemized account of these capabilities.
+
+ switch( mode )
+ {
+ case MODE_FAST:
+ mCodeStreamp->set_fast();
+ break;
+ case MODE_RESILIENT:
+ mCodeStreamp->set_resilient();
+ break;
+ case MODE_FUSSY:
+ mCodeStreamp->set_fussy();
+ break;
+ default:
+ llassert(0);
+ mCodeStreamp->set_fast();
+ }
+
+ kdu_dims dims;
+ mCodeStreamp->get_dims(0,dims);
+
+ S32 components = mCodeStreamp->get_num_components();
+
+ if (components >= 3)
+ { // Check that components have consistent dimensions (for PPM file)
+ kdu_dims dims1; mCodeStreamp->get_dims(1,dims1);
+ kdu_dims dims2; mCodeStreamp->get_dims(2,dims2);
+ if ((dims1 != dims) || (dims2 != dims))
+ {
+ llerrs << "Components don't have matching dimensions!" << llendl;
+ }
+ }
+
+ base.setSize(dims.size.x, dims.size.y, components);
+
+ if (!keep_codestream)
+ {
+ mCodeStreamp->destroy();
+ delete mCodeStreamp;
+ mCodeStreamp = NULL;
+ delete mInputp;
+ mInputp = NULL;
+ }
+}
+
+void LLImageJ2CKDU::cleanupCodeStream()
+{
+ delete mInputp;
+ mInputp = NULL;
+
+ delete mDecodeState;
+ mDecodeState = NULL;
+
+ if (mCodeStreamp)
+ {
+ mCodeStreamp->destroy();
+ delete mCodeStreamp;
+ mCodeStreamp = NULL;
+ }
+
+ delete mTPosp;
+ mTPosp = NULL;
+
+ delete mTileIndicesp;
+ mTileIndicesp = NULL;
+}
+
+BOOL LLImageJ2CKDU::initDecode(LLImageJ2C &base, LLImageRaw &raw_image, F32 decode_time, ECodeStreamMode mode, S32 first_channel, S32 max_channel_count )
+{
+ base.resetLastError();
+
+ // *FIX: kdu calls our callback function if there's an error, and then bombs.
+ // To regain control, we throw an exception, and catch it here.
+ try
+ {
+ base.updateRawDiscardLevel();
+ setupCodeStream(base, TRUE, mode);
+
+ mRawImagep = &raw_image;
+ mCodeStreamp->change_appearance(false, true, false);
+ mCodeStreamp->apply_input_restrictions(first_channel,max_channel_count,base.getRawDiscardLevel(),0,NULL);
+
+ kdu_dims dims; mCodeStreamp->get_dims(0,dims);
+ S32 channels = base.getComponents() - first_channel;
+ if( channels > max_channel_count )
+ {
+ channels = max_channel_count;
+ }
+ raw_image.resize(dims.size.x, dims.size.y, channels);
+
+ // llinfos << "Resizing to " << dims.size.x << ":" << dims.size.y << llendl;
+ if (!mTileIndicesp)
+ {
+ mTileIndicesp = new kdu_dims;
+ }
+ mCodeStreamp->get_valid_tiles(*mTileIndicesp);
+ if (!mTPosp)
+ {
+ mTPosp = new kdu_coords;
+ mTPosp->y = 0;
+ mTPosp->x = 0;
+ }
+ }
+ catch (const char* msg)
+ {
+ base.setLastError(ll_safe_string(msg));
+ return FALSE;
+ }
+ catch (...)
+ {
+ base.setLastError("Unknown J2C error");
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+
+// Returns TRUE to mean done, whether successful or not.
+BOOL LLImageJ2CKDU::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decode_time, S32 first_channel, S32 max_channel_count)
+{
+ ECodeStreamMode mode = MODE_FAST;
+
+ LLTimer decode_timer;
+
+ if (!mCodeStreamp)
+ {
+ if (!initDecode(base, raw_image, decode_time, mode, first_channel, max_channel_count))
+ {
+ // Initializing the J2C decode failed, bail out.
+ cleanupCodeStream();
+ return TRUE; // done
+ }
+ }
+
+ // These can probably be grabbed from what's saved in the class.
+ kdu_dims dims;
+ mCodeStreamp->get_dims(0,dims);
+
+ // Now we are ready to walk through the tiles processing them one-by-one.
+ kdu_byte *buffer = raw_image.getData();
+
+ while (mTPosp->y < mTileIndicesp->size.y)
+ {
+ while (mTPosp->x < mTileIndicesp->size.x)
+ {
+ try
+ {
+ if (!mDecodeState)
+ {
+ kdu_tile tile = mCodeStreamp->open_tile(*(mTPosp)+mTileIndicesp->pos);
+
+ // Find the region of the buffer occupied by this
+ // tile. Note that we have no control over
+ // sub-sampling factors which might have been used
+ // during compression and so it can happen that tiles
+ // (at the image component level) actually have
+ // different dimensions. For this reason, we cannot
+ // figure out the buffer region occupied by a tile
+ // directly from the tile indices. Instead, we query
+ // the highest resolution of the first tile-component
+ // concerning its location and size on the canvas --
+ // the `dims' object already holds the location and
+ // size of the entire image component on the same
+ // canvas coordinate system. Comparing the two tells
+ // us where the current tile is in the buffer.
+ S32 channels = base.getComponents() - first_channel;
+ if( channels > max_channel_count )
+ {
+ channels = max_channel_count;
+ }
+ kdu_resolution res = tile.access_component(0).access_resolution();
+ kdu_dims tile_dims; res.get_dims(tile_dims);
+ kdu_coords offset = tile_dims.pos - dims.pos;
+ int row_gap = channels*dims.size.x; // inter-row separation
+ kdu_byte *buf = buffer + offset.y*row_gap + offset.x*channels;
+ mDecodeState = new LLKDUDecodeState(tile, buf, row_gap);
+ }
+ // Do the actual processing
+ F32 remaining_time = decode_time - decode_timer.getElapsedTimeF32();
+ // This is where we do the actual decode. If we run out of time, return false.
+ if (mDecodeState->processTileDecode(remaining_time, (decode_time > 0.0f)))
+ {
+ delete mDecodeState;
+ mDecodeState = NULL;
+ }
+ else
+ {
+ // Not finished decoding yet.
+ // setLastError("Ran out of time while decoding");
+ return FALSE;
+ }
+ }
+ catch( const char* msg )
+ {
+ base.setLastError(ll_safe_string(msg));
+ base.decodeFailed();
+ cleanupCodeStream();
+ return TRUE; // done
+ }
+ catch( ... )
+ {
+ base.setLastError( "Unknown J2C error" );
+ base.decodeFailed();
+ cleanupCodeStream();
+ return TRUE; // done
+ }
+
+
+ mTPosp->x++;
+ }
+ mTPosp->y++;
+ mTPosp->x = 0;
+ }
+
+ cleanupCodeStream();
+
+ return TRUE;
+}
+
+
+BOOL LLImageJ2CKDU::encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, const char* comment_text, F32 encode_time, BOOL reversible)
+{
+ // Collect simple arguments.
+ bool transpose, vflip, hflip;
+ bool allow_rate_prediction, mem, quiet, no_weights;
+ int cpu_iterations;
+ std::ostream *record_stream;
+
+ transpose = false;
+ record_stream = NULL;
+ allow_rate_prediction = true;
+ no_weights = false;
+ cpu_iterations = -1;
+ mem = false;
+ quiet = false;
+ vflip = true;
+ hflip = false;
+
+ try
+ {
+ // Set up input image files.
+ siz_params siz;
+
+ // Should set rate someplace here.
+ LLKDUMemIn mem_in(raw_image.getData(),
+ raw_image.getDataSize(),
+ raw_image.getWidth(),
+ raw_image.getHeight(),
+ raw_image.getComponents(),
+ &siz);
+
+ base.setSize(raw_image.getWidth(), raw_image.getHeight(), raw_image.getComponents());
+
+ int num_components = raw_image.getComponents();
+
+ siz.set(Scomponents,0,0,num_components);
+ siz.set(Sdims,0,0,base.getHeight()); // Height of first image component
+ siz.set(Sdims,0,1,base.getWidth()); // Width of first image component
+ siz.set(Sprecision,0,0,8); // Image samples have original bit-depth of 8
+ siz.set(Ssigned,0,0,false); // Image samples are originally unsigned
+
+ kdu_params *siz_ref = &siz; siz_ref->finalize();
+ siz_params transformed_siz; // Use this one to construct code-strea
+ transformed_siz.copy_from(&siz,-1,-1,-1,0,transpose,false,false);
+
+ // Construct the `kdu_codestream' object and parse all remaining arguments.
+
+ U32 max_output_size = base.getWidth()*base.getHeight()*base.getComponents();
+ if (max_output_size < 1000)
+ {
+ max_output_size = 1000;
+ }
+ U8 *output_buffer = new U8[max_output_size];
+
+ U32 output_size = max_output_size; // gets modified
+ LLKDUMemTarget output(output_buffer, output_size, base.getWidth()*base.getHeight()*base.getComponents());
+ if (output_size > max_output_size)
+ {
+ llerrs << llformat("LLImageJ2C::encode output_size(%d) > max_output_size(%d)",
+ output_size,max_output_size) << llendl;
+ }
+
+ kdu_codestream codestream;
+ codestream.create(&transformed_siz,&output);
+
+ if (comment_text)
+ {
+ // Set the comments for the codestream
+ kdu_codestream_comment comment = codestream.add_comment();
+ comment.put_text(comment_text);
+ }
+
+ // Set codestream options
+ int num_layer_specs = 0;
+
+ kdu_long layer_bytes[64];
+ U32 max_bytes = 0;
+
+ if ((num_components >= 3) && !no_weights)
+ {
+ set_default_colour_weights(codestream.access_siz());
+ }
+
+ if (reversible)
+ {
+ // If we're doing reversible, assume we're not using quality layers.
+ // Yes, I know this is incorrect!
+ codestream.access_siz()->parse_string("Creversible=yes");
+ codestream.access_siz()->parse_string("Clayers=1");
+ num_layer_specs = 1;
+ layer_bytes[0] = 0;
+ }
+ else
+ {
+ // Rate is the argument passed into the LLImageJ2C which
+ // specifies the target compression rate. The default is 8:1.
+ // Possibly if max_bytes < 500, we should just use the default setting?
+ if (base.mRate != 0.f)
+ {
+ max_bytes = (U32)(base.mRate*base.getWidth()*base.getHeight()*base.getComponents());
+ }
+ else
+ {
+ max_bytes = (U32)(base.getWidth()*base.getHeight()*base.getComponents()*0.125);
+ }
+
+ const U32 min_bytes = FIRST_PACKET_SIZE;
+ if (max_bytes > min_bytes)
+ {
+ U32 i;
+ // This code is where we specify the target number of bytes for
+ // each layer. Not sure if we should do this for small images
+ // or not. The goal is to have this roughly align with
+ // different quality levels that we decode at.
+ for (i = min_bytes; i < max_bytes; i*=4)
+ {
+ if (i == min_bytes * 4)
+ {
+ i = 2000;
+ }
+ layer_bytes[num_layer_specs] = i;
+ num_layer_specs++;
+ }
+ layer_bytes[num_layer_specs] = max_bytes;
+ num_layer_specs++;
+
+ std::string layer_string = llformat("Clayers=%d",num_layer_specs);
+ codestream.access_siz()->parse_string(layer_string.c_str());
+ }
+ else
+ {
+ layer_bytes[0] = min_bytes;
+ num_layer_specs = 1;
+ std::string layer_string = llformat("Clayers=%d",num_layer_specs);
+ codestream.access_siz()->parse_string(layer_string.c_str());
+ }
+ }
+ codestream.access_siz()->finalize_all();
+ if (cpu_iterations >= 0)
+ {
+ codestream.collect_timing_stats(cpu_iterations);
+ }
+ codestream.change_appearance(transpose,vflip,hflip);
+
+ // Now we are ready for sample data processing.
+ kdc_flow_control *tile = new kdc_flow_control(&mem_in,codestream);
+ bool done = false;
+ while (!done)
+ {
+ // Process line by line
+ done = true;
+ if (tile->advance_components())
+ {
+ done = false;
+ tile->process_components();
+ }
+ }
+
+ // Produce the compressed output
+ codestream.flush(layer_bytes,num_layer_specs);
+
+ // Cleanup
+ delete tile;
+
+ codestream.destroy();
+ if (record_stream != NULL)
+ {
+ delete record_stream;
+ }
+
+ // Now that we're done encoding, create the new data buffer for the compressed
+ // image and stick it there.
+
+ base.copyData(output_buffer, output_size);
+ base.updateData(); // set width, height
+ delete[] output_buffer;
+ }
+ catch(const char* msg)
+ {
+ base.setLastError(ll_safe_string(msg));
+ return FALSE;
+ }
+ catch( ... )
+ {
+ base.setLastError( "Unknown J2C error" );
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+BOOL LLImageJ2CKDU::getMetadata(LLImageJ2C &base)
+{
+ // *FIX: kdu calls our callback function if there's an error, and
+ // then bombs. To regain control, we throw an exception, and
+ // catch it here.
+ try
+ {
+ setupCodeStream(base, FALSE, MODE_FAST);
+ return TRUE;
+ }
+ catch( const char* msg )
+ {
+ base.setLastError(ll_safe_string(msg));
+ return FALSE;
+ }
+ catch( ... )
+ {
+ base.setLastError( "Unknown J2C error" );
+ return FALSE;
+ }
+}
+
+void set_default_colour_weights(kdu_params *siz)
+{
+ kdu_params *cod = siz->access_cluster(COD_params);
+ assert(cod != NULL);
+
+ bool can_use_ycc = true;
+ bool rev0=false;
+ int depth0=0, sub_x0=1, sub_y0=1;
+ for (int c=0; c < 3; c++)
+ {
+ int depth=0; siz->get(Sprecision,c,0,depth);
+ int sub_y=1; siz->get(Ssampling,c,0,sub_y);
+ int sub_x=1; siz->get(Ssampling,c,1,sub_x);
+ kdu_params *coc = cod->access_relation(-1,c);
+ bool rev=false; coc->get(Creversible,0,0,rev);
+ if (c == 0)
+ { rev0=rev; depth0=depth; sub_x0=sub_x; sub_y0=sub_y; }
+ else if ((rev != rev0) || (depth != depth0) ||
+ (sub_x != sub_x0) || (sub_y != sub_y0))
+ can_use_ycc = false;
+ }
+ if (!can_use_ycc)
+ return;
+
+ bool use_ycc;
+ if (!cod->get(Cycc,0,0,use_ycc))
+ cod->set(Cycc,0,0,use_ycc=true);
+ if (!use_ycc)
+ return;
+ float weight;
+ if (cod->get(Clev_weights,0,0,weight) ||
+ cod->get(Cband_weights,0,0,weight))
+ return; // Weights already specified explicitly.
+
+ /* These example weights are adapted from numbers generated by Marcus Nadenau
+ at EPFL, for a viewing distance of 15 cm and a display resolution of
+ 300 DPI. */
+
+ cod->parse_string("Cband_weights:C0="
+ "{0.0901},{0.2758},{0.2758},"
+ "{0.7018},{0.8378},{0.8378},{1}");
+ cod->parse_string("Cband_weights:C1="
+ "{0.0263},{0.0863},{0.0863},"
+ "{0.1362},{0.2564},{0.2564},"
+ "{0.3346},{0.4691},{0.4691},"
+ "{0.5444},{0.6523},{0.6523},"
+ "{0.7078},{0.7797},{0.7797},{1}");
+ cod->parse_string("Cband_weights:C2="
+ "{0.0773},{0.1835},{0.1835},"
+ "{0.2598},{0.4130},{0.4130},"
+ "{0.5040},{0.6464},{0.6464},"
+ "{0.7220},{0.8254},{0.8254},"
+ "{0.8769},{0.9424},{0.9424},{1}");
+}
+
+/******************************************************************************/
+/* transfer_bytes */
+/******************************************************************************/
+
+void transfer_bytes(kdu_byte *dest, kdu_line_buf &src, int gap, int precision)
+/* Transfers source samples from the supplied line buffer into the output
+byte buffer, spacing successive output samples apart by `gap' bytes
+(to allow for interleaving of colour components). The function performs
+all necessary level shifting, type conversion, rounding and truncation. */
+{
+ int width = src.get_width();
+ if (src.get_buf32() != NULL)
+ { // Decompressed samples have a 32-bit representation (integer or float)
+ assert(precision >= 8); // Else would have used 16 bit representation
+ kdu_sample32 *sp = src.get_buf32();
+ if (!src.is_absolute())
+ { // Transferring normalized floating point data.
+ float scale16 = (float)(1<<16);
+ kdu_int32 val;
+
+ for (; width > 0; width--, sp++, dest+=gap)
+ {
+ val = (kdu_int32)(sp->fval*scale16);
+ val = (val+128)>>8; // May be faster than true rounding
+ val += 128;
+ if (val & ((-1)<<8))
+ {
+ val = (val<0)?0:255;
+ }
+ *dest = (kdu_byte) val;
+ }
+ }
+ else
+ { // Transferring 32-bit absolute integers.
+ kdu_int32 val;
+ kdu_int32 downshift = precision-8;
+ kdu_int32 offset = (1<<downshift)>>1;
+
+ for (; width > 0; width--, sp++, dest+=gap)
+ {
+ val = sp->ival;
+ val = (val+offset)>>downshift;
+ val += 128;
+ if (val & ((-1)<<8))
+ {
+ val = (val<0)?0:255;
+ }
+ *dest = (kdu_byte) val;
+ }
+ }
+ }
+ else
+ { // Source data is 16 bits.
+ kdu_sample16 *sp = src.get_buf16();
+ if (!src.is_absolute())
+ { // Transferring 16-bit fixed point quantities
+ kdu_int16 val;
+
+ if (precision >= 8)
+ { // Can essentially ignore the bit-depth.
+ for (; width > 0; width--, sp++, dest+=gap)
+ {
+ val = sp->ival;
+ val += (1<<(KDU_FIX_POINT-8))>>1;
+ val >>= (KDU_FIX_POINT-8);
+ val += 128;
+ if (val & ((-1)<<8))
+ {
+ val = (val<0)?0:255;
+ }
+ *dest = (kdu_byte) val;
+ }
+ }
+ else
+ { // Need to force zeros into one or more least significant bits.
+ kdu_int16 downshift = KDU_FIX_POINT-precision;
+ kdu_int16 upshift = 8-precision;
+ kdu_int16 offset = 1<<(downshift-1);
+
+ for (; width > 0; width--, sp++, dest+=gap)
+ {
+ val = sp->ival;
+ val = (val+offset)>>downshift;
+ val <<= upshift;
+ val += 128;
+ if (val & ((-1)<<8))
+ {
+ val = (val<0)?0:(256-(1<<upshift));
+ }
+ *dest = (kdu_byte) val;
+ }
+ }
+ }
+ else
+ { // Transferring 16-bit absolute integers.
+ kdu_int16 val;
+
+ if (precision >= 8)
+ {
+ kdu_int16 downshift = precision-8;
+ kdu_int16 offset = (1<<downshift)>>1;
+
+ for (; width > 0; width--, sp++, dest+=gap)
+ {
+ val = sp->ival;
+ val = (val+offset)>>downshift;
+ val += 128;
+ if (val & ((-1)<<8))
+ {
+ val = (val<0)?0:255;
+ }
+ *dest = (kdu_byte) val;
+ }
+ }
+ else
+ {
+ kdu_int16 upshift = 8-precision;
+
+ for (; width > 0; width--, sp++, dest+=gap)
+ {
+ val = sp->ival;
+ val <<= upshift;
+ val += 128;
+ if (val & ((-1)<<8))
+ {
+ val = (val<0)?0:(256-(1<<upshift));
+ }
+ *dest = (kdu_byte) val;
+ }
+ }
+ }
+ }
+}
+
+LLKDUDecodeState::LLKDUDecodeState(kdu_tile tile, kdu_byte *buf, S32 row_gap)
+{
+ S32 c;
+
+ mTile = tile;
+ mBuf = buf;
+ mRowGap = row_gap;
+
+ mNumComponents = tile.get_num_components();
+
+ llassert(mNumComponents<=4);
+ mUseYCC = tile.get_ycc();
+
+ for (c=0; c<4; ++c)
+ {
+ mReversible[c] = false;
+ mBitDepths[c] = 0;
+ }
+
+ // Open tile-components and create processing engines and resources
+ for (c=0; c < mNumComponents; c++)
+ {
+ mComps[c] = mTile.access_component(c);
+ mReversible[c] = mComps[c].get_reversible();
+ mBitDepths[c] = mComps[c].get_bit_depth();
+ kdu_resolution res = mComps[c].access_resolution(); // Get top resolution
+ kdu_dims comp_dims; res.get_dims(comp_dims);
+ if (c == 0)
+ {
+ mDims = comp_dims;
+ }
+ else
+ {
+ llassert(mDims == comp_dims); // Safety check; the caller has ensured this
+ }
+ bool use_shorts = (mComps[c].get_bit_depth(true) <= 16);
+ mLines[c].pre_create(&mAllocator,mDims.size.x,mReversible[c],use_shorts);
+ if (res.which() == 0) // No DWT levels used
+ {
+ mEngines[c] = kdu_decoder(res.access_subband(LL_BAND),&mAllocator,use_shorts);
+ }
+ else
+ {
+ mEngines[c] = kdu_synthesis(res,&mAllocator,use_shorts);
+ }
+ }
+ mAllocator.finalize(); // Actually creates buffering resources
+ for (c=0; c < mNumComponents; c++)
+ {
+ mLines[c].create(); // Grabs resources from the allocator.
+ }
+}
+
+LLKDUDecodeState::~LLKDUDecodeState()
+{
+ S32 c;
+ // Cleanup
+ for (c=0; c < mNumComponents; c++)
+ {
+ mEngines[c].destroy(); // engines are interfaces; no default destructors
+ }
+
+ mTile.close();
+}
+
+BOOL LLKDUDecodeState::processTileDecode(F32 decode_time, BOOL limit_time)
+/* Decompresses a tile, writing the data into the supplied byte buffer.
+The buffer contains interleaved image components, if there are any.
+Although you may think of the buffer as belonging entirely to this tile,
+the `buf' pointer may actually point into a larger buffer representing
+multiple tiles. For this reason, `row_gap' is needed to identify the
+separation between consecutive rows in the real buffer. */
+{
+ S32 c;
+ // Now walk through the lines of the buffer, recovering them from the
+ // relevant tile-component processing engines.
+
+ LLTimer decode_timer;
+ while (mDims.size.y--)
+ {
+ for (c=0; c < mNumComponents; c++)
+ {
+ mEngines[c].pull(mLines[c],true);
+ }
+ if ((mNumComponents >= 3) && mUseYCC)
+ {
+ kdu_convert_ycc_to_rgb(mLines[0],mLines[1],mLines[2]);
+ }
+ for (c=0; c < mNumComponents; c++)
+ {
+ transfer_bytes(mBuf+c,mLines[c],mNumComponents,mBitDepths[c]);
+ }
+ mBuf += mRowGap;
+ if (mDims.size.y % 10)
+ {
+ if (limit_time && decode_timer.getElapsedTimeF32() > decode_time)
+ {
+ return FALSE;
+ }
+ }
+ }
+ return TRUE;
+}
+
+// kdc_flow_control
+
+kdc_flow_control::kdc_flow_control (kdu_image_in_base *img_in, kdu_codestream codestream)
+{
+ int n;
+
+ this->codestream = codestream;
+ codestream.get_valid_tiles(valid_tile_indices);
+ tile_idx = valid_tile_indices.pos;
+ tile = codestream.open_tile(tile_idx,NULL);
+
+ // Set up the individual components
+ num_components = codestream.get_num_components(true);
+ components = new kdc_component_flow_control[num_components];
+ count_delta = 0;
+ kdc_component_flow_control *comp = components;
+ for (n = 0; n < num_components; n++, comp++)
+ {
+ comp->line = NULL;
+ comp->reader = img_in;
+ kdu_coords subsampling;
+ codestream.get_subsampling(n,subsampling,true);
+ kdu_dims dims;
+ codestream.get_tile_dims(tile_idx,n,dims,true);
+ comp->vert_subsampling = subsampling.y;
+ if ((n == 0) || (comp->vert_subsampling < count_delta))
+ {
+ count_delta = comp->vert_subsampling;
+ }
+ comp->ratio_counter = 0;
+ comp->remaining_lines = comp->initial_lines = dims.size.y;
+ }
+ assert(num_components >= 0);
+
+ tile.set_components_of_interest(num_components);
+ max_buffer_memory = engine.create(codestream,tile,false,NULL,false,1,NULL,NULL,false);
+}
+
+kdc_flow_control::~kdc_flow_control()
+{
+ if (components != NULL)
+ delete[] components;
+ if (engine.exists())
+ engine.destroy();
+}
+
+bool kdc_flow_control::advance_components()
+{
+ bool found_line = false;
+ while (!found_line)
+ {
+ bool all_done = true;
+ kdc_component_flow_control *comp = components;
+ for (int n = 0; n < num_components; n++, comp++)
+ {
+ assert(comp->ratio_counter >= 0);
+ if (comp->remaining_lines > 0)
+ {
+ all_done = false;
+ comp->ratio_counter -= count_delta;
+ if (comp->ratio_counter < 0)
+ {
+ found_line = true;
+ comp->line = engine.exchange_line(n,NULL,NULL);
+ assert(comp->line != NULL);
+ if (comp->line->get_width())
+ {
+ comp->reader->get(n,*(comp->line),0);
+ }
+ }
+ }
+ }
+ if (all_done)
+ {
+ return false;
+ }
+ }
+ return true;
+}
+
+void kdc_flow_control::process_components()
+{
+ kdc_component_flow_control *comp = components;
+ for (int n = 0; n < num_components; n++, comp++)
+ {
+ if (comp->ratio_counter < 0)
+ {
+ comp->ratio_counter += comp->vert_subsampling;
+ assert(comp->ratio_counter >= 0);
+ assert(comp->remaining_lines > 0);
+ comp->remaining_lines--;
+ assert(comp->line != NULL);
+ engine.exchange_line(n,comp->line,NULL);
+ comp->line = NULL;
+ }
+ }
+}
diff --git a/indra/llkdu/llimagej2ckdu.h b/indra/llkdu/llimagej2ckdu.h
new file mode 100644
index 0000000000..5628f69eeb
--- /dev/null
+++ b/indra/llkdu/llimagej2ckdu.h
@@ -0,0 +1,90 @@
+/**
+ * @file llimagej2ckdu.h
+ * @brief This is an implementation of JPEG2000 encode/decode using Kakadu
+ *
+ * $LicenseInfo:firstyear=2010&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLIMAGEJ2CKDU_H
+#define LL_LLIMAGEJ2CKDU_H
+
+#include "llimagej2c.h"
+
+//
+// KDU core header files
+//
+#include "kdu_elementary.h"
+#include "kdu_messaging.h"
+#include "kdu_params.h"
+#include "kdu_compressed.h"
+#include "kdu_sample_processing.h"
+
+class LLKDUDecodeState;
+class LLKDUMemSource;
+
+class LLImageJ2CKDU : public LLImageJ2CImpl
+{
+public:
+ enum ECodeStreamMode
+ {
+ MODE_FAST = 0,
+ MODE_RESILIENT = 1,
+ MODE_FUSSY = 2
+ };
+ LLImageJ2CKDU();
+ virtual ~LLImageJ2CKDU();
+
+protected:
+ /*virtual*/ BOOL getMetadata(LLImageJ2C &base);
+ /*virtual*/ BOOL decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decode_time, S32 first_channel, S32 max_channel_count);
+ /*virtual*/ BOOL encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, const char* comment_text, F32 encode_time=0.0,
+ BOOL reversible=FALSE);
+
+private:
+ void setupCodeStream(LLImageJ2C &base, BOOL keep_codestream, ECodeStreamMode mode);
+ void cleanupCodeStream();
+ BOOL initDecode(LLImageJ2C &base, LLImageRaw &raw_image, F32 decode_time, ECodeStreamMode mode, S32 first_channel, S32 max_channel_count );
+
+ // Encode variable
+ LLKDUMemSource *mInputp;
+ kdu_codestream *mCodeStreamp;
+ kdu_coords *mTPosp; // tile position
+ kdu_dims *mTileIndicesp;
+
+ // Temporary variables for in-progress decodes...
+ LLImageRaw *mRawImagep;
+ LLKDUDecodeState *mDecodeState;
+};
+
+#if LL_WINDOWS
+# define LLSYMEXPORT __declspec(dllexport)
+#elif LL_LINUX
+# define LLSYMEXPORT __attribute__ ((visibility("default")))
+#else
+# define LLSYMEXPORT
+#endif
+
+extern "C" LLSYMEXPORT const char* engineInfoLLImageJ2CKDU();
+extern "C" LLSYMEXPORT LLImageJ2CKDU* createLLImageJ2CKDU();
+extern "C" LLSYMEXPORT void destroyLLImageJ2CKDU(LLImageJ2CKDU* kdu);
+
+#endif
diff --git a/indra/llkdu/llkdumem.cpp b/indra/llkdu/llkdumem.cpp
new file mode 100644
index 0000000000..1f549cbbe0
--- /dev/null
+++ b/indra/llkdu/llkdumem.cpp
@@ -0,0 +1,196 @@
+ /**
+ * @file llkdumem.cpp
+ * @brief Helper class for kdu memory management
+ *
+ * $LicenseInfo:firstyear=2010&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "linden_common.h"
+#include "llkdumem.h"
+#include "llerror.h"
+
+#if defined(LL_WINDOWS)
+# pragma warning(disable: 4702) // unreachable code
+#endif
+
+LLKDUMemIn::LLKDUMemIn(const U8 *data,
+ const U32 size,
+ const U16 width,
+ const U16 height,
+ const U8 in_num_components,
+ siz_params *siz)
+{
+ U8 n;
+
+ first_comp_idx = 0;
+ rows = height;
+ cols = width;
+ num_components = in_num_components;
+ alignment_bytes = 0;
+
+ for (n=0; n<3; ++n)
+ {
+ precision[n] = 0;
+ }
+
+ for (n=0; n < num_components; ++n)
+ {
+ siz->set(Sdims,n,0,rows);
+ siz->set(Sdims,n,1,cols);
+ siz->set(Ssigned,n,0,false);
+ siz->set(Sprecision,n,0,8);
+ }
+ incomplete_lines = NULL;
+ free_lines = NULL;
+ num_unread_rows = rows;
+
+ mData = data;
+ mDataSize = size;
+ mCurPos = 0;
+}
+
+LLKDUMemIn::~LLKDUMemIn()
+{
+ if ((num_unread_rows > 0) || (incomplete_lines != NULL))
+ {
+ kdu_warning w;
+ w << "Not all rows of image components "
+ << first_comp_idx << " through "
+ << first_comp_idx+num_components-1
+ << " were consumed!";
+ }
+ image_line_buf *tmp;
+ while ((tmp=incomplete_lines) != NULL)
+ {
+ incomplete_lines = tmp->next;
+ delete tmp;
+ }
+ while ((tmp=free_lines) != NULL)
+ {
+ free_lines = tmp->next;
+ delete tmp;
+ }
+}
+
+
+bool LLKDUMemIn::get(int comp_idx, kdu_line_buf &line, int x_tnum)
+{
+ int idx = comp_idx - this->first_comp_idx;
+ assert((idx >= 0) && (idx < num_components));
+ x_tnum = x_tnum*num_components+idx;
+ image_line_buf *scan, *prev=NULL;
+ for (scan=incomplete_lines; scan != NULL; prev=scan, scan=scan->next)
+ {
+ assert(scan->next_x_tnum >= x_tnum);
+ if (scan->next_x_tnum == x_tnum)
+ {
+ break;
+ }
+ }
+ if (scan == NULL)
+ { // Need to read a new image line.
+ assert(x_tnum == 0); // Must consume in very specific order.
+ if (num_unread_rows == 0)
+ {
+ return false;
+ }
+ if ((scan = free_lines) == NULL)
+ {
+ scan = new image_line_buf(cols+3,num_components);
+ }
+ free_lines = scan->next;
+ if (prev == NULL)
+ {
+ incomplete_lines = scan;
+ }
+ else
+ {
+ prev->next = scan;
+ }
+
+ // Copy from image buffer into scan.
+ memcpy(scan->buf, mData+mCurPos, cols*num_components);
+ mCurPos += cols*num_components;
+
+ num_unread_rows--;
+ scan->accessed_samples = 0;
+ scan->next_x_tnum = 0;
+ }
+
+ assert((cols-scan->accessed_samples) >= line.get_width());
+
+ int comp_offset = idx;
+ kdu_byte *sp = scan->buf+num_components*scan->accessed_samples + comp_offset;
+ int n=line.get_width();
+
+ if (line.get_buf32() != NULL)
+ {
+ kdu_sample32 *dp = line.get_buf32();
+ if (line.is_absolute())
+ { // 32-bit absolute integers
+ for (; n > 0; n--, sp+=num_components, dp++)
+ {
+ dp->ival = ((kdu_int32)(*sp)) - 128;
+ }
+ }
+ else
+ { // true 32-bit floats
+ for (; n > 0; n--, sp+=num_components, dp++)
+ {
+ dp->fval = (((float)(*sp)) / 256.0F) - 0.5F;
+ }
+ }
+ }
+ else
+ {
+ kdu_sample16 *dp = line.get_buf16();
+ if (line.is_absolute())
+ { // 16-bit absolute integers
+ for (; n > 0; n--, sp+=num_components, dp++)
+ {
+ dp->ival = ((kdu_int16)(*sp)) - 128;
+ }
+ }
+ else
+ { // 16-bit normalized representation.
+ for (; n > 0; n--, sp+=num_components, dp++)
+ {
+ dp->ival = (((kdu_int16)(*sp)) - 128) << (KDU_FIX_POINT-8);
+ }
+ }
+ }
+
+ scan->next_x_tnum++;
+ if (idx == (num_components-1))
+ {
+ scan->accessed_samples += line.get_width();
+ }
+ if (scan->accessed_samples == cols)
+ { // Send empty line to free list.
+ assert(scan == incomplete_lines);
+ incomplete_lines = scan->next;
+ scan->next = free_lines;
+ free_lines = scan;
+ }
+
+ return true;
+}
diff --git a/indra/llkdu/llkdumem.h b/indra/llkdu/llkdumem.h
new file mode 100644
index 0000000000..7064de4408
--- /dev/null
+++ b/indra/llkdu/llkdumem.h
@@ -0,0 +1,145 @@
+/**
+ * @file llkdumem.h
+ * @brief Helper class for kdu memory management
+ *
+ * $LicenseInfo:firstyear=2010&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLKDUMEM_H
+#define LL_LLKDUMEM_H
+
+// Support classes for reading and writing from memory buffers in KDU
+#include "kdu_image.h"
+#include "kdu_elementary.h"
+#include "kdu_messaging.h"
+#include "kdu_params.h"
+#include "kdu_compressed.h"
+#include "kdu_sample_processing.h"
+#include "image_local.h"
+#include "stdtypes.h"
+
+class LLKDUMemSource: public kdu_compressed_source
+{
+public: // Member functions
+ LLKDUMemSource(U8 *input_buffer, U32 size)
+ {
+ mData = input_buffer;
+ mSize = size;
+ mCurPos = 0;
+ }
+
+ ~LLKDUMemSource()
+ {
+ }
+
+ int read(kdu_byte *buf, int num_bytes)
+ {
+ U32 num_out;
+ num_out = num_bytes;
+
+ if ((mSize - mCurPos) < (U32)num_bytes)
+ {
+ num_out = mSize -mCurPos;
+ }
+ memcpy(buf, mData + mCurPos, num_out);
+ mCurPos += num_out;
+ return num_out;
+ }
+
+ void reset()
+ {
+ mCurPos = 0;
+ }
+
+private: // Data
+ U8 *mData;
+ U32 mSize;
+ U32 mCurPos;
+};
+
+class LLKDUMemTarget: public kdu_compressed_target
+{
+public: // Member functions
+ LLKDUMemTarget(U8 *output_buffer, U32 &output_size, const U32 buffer_size)
+ {
+ mData = output_buffer;
+ mSize = buffer_size;
+ mCurPos = 0;
+ mOutputSize = &output_size;
+ }
+
+ ~LLKDUMemTarget()
+ {
+ }
+
+ bool write(const kdu_byte *buf, int num_bytes)
+ {
+ U32 num_out;
+ num_out = num_bytes;
+
+ if ((mSize - mCurPos) < (U32)num_bytes)
+ {
+ num_out = mSize - mCurPos;
+ memcpy(mData + mCurPos, buf, num_out);
+ return false;
+ }
+ memcpy(mData + mCurPos, buf, num_out);
+ mCurPos += num_out;
+ *mOutputSize = mCurPos;
+ return true;
+ }
+
+private: // Data
+ U8 *mData;
+ U32 mSize;
+ U32 mCurPos;
+ U32 *mOutputSize;
+};
+
+class LLKDUMemIn : public kdu_image_in_base
+{
+public: // Member functions
+ LLKDUMemIn(const U8 *data,
+ const U32 size,
+ const U16 rows,
+ const U16 cols,
+ U8 in_num_components,
+ siz_params *siz);
+ ~LLKDUMemIn();
+
+ bool get(int comp_idx, kdu_line_buf &line, int x_tnum);
+
+private: // Data
+ const U8 *mData;
+ int first_comp_idx;
+ int num_components;
+ int rows, cols;
+ int alignment_bytes; // Number of 0's at end of each line.
+ int precision[3];
+ image_line_buf *incomplete_lines; // Each "sample" represents a full pixel
+ image_line_buf *free_lines;
+ int num_unread_rows;
+
+ U32 mCurPos;
+ U32 mDataSize;
+};
+#endif
diff --git a/indra/llkdu/tests/llimagej2ckdu_test.cpp b/indra/llkdu/tests/llimagej2ckdu_test.cpp
new file mode 100644
index 0000000000..1ccee4bb64
--- /dev/null
+++ b/indra/llkdu/tests/llimagej2ckdu_test.cpp
@@ -0,0 +1,248 @@
+/**
+ * @file llimagej2ckdu_test.cpp
+ * @author Merov Linden
+ * @date 2010-12-17
+ *
+ * $LicenseInfo:firstyear=2006&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "linden_common.h"
+// Class to test
+#include "../llimagej2ckdu.h"
+#include "../llkdumem.h"
+// Tut header
+#include "../test/lltut.h"
+
+// -------------------------------------------------------------------------------------------
+// Stubbing: Declarations required to link and run the class being tested
+// Notes:
+// * Add here stubbed implementation of the few classes and methods used in the class to be tested
+// * Add as little as possible (let the link errors guide you)
+// * Do not make any assumption as to how those classes or methods work (i.e. don't copy/paste code)
+// * A simulator for a class can be implemented here. Please comment and document thoroughly.
+
+// End Stubbing
+// -------------------------------------------------------------------------------------------
+// Stubb the LL Image Classes
+LLImageRaw::LLImageRaw() { }
+LLImageRaw::~LLImageRaw() { }
+U8* LLImageRaw::allocateData(S32 ) { return NULL; }
+void LLImageRaw::deleteData() { }
+U8* LLImageRaw::reallocateData(S32 ) { return NULL; }
+BOOL LLImageRaw::resize(U16, U16, S8) { return TRUE; } // this method always returns TRUE...
+
+LLImageBase::LLImageBase()
+: mData(NULL),
+mDataSize(0),
+mWidth(0),
+mHeight(0),
+mComponents(0),
+mBadBufferAllocation(false),
+mAllowOverSize(false),
+mMemType(LLMemType::MTYPE_IMAGEBASE)
+{ }
+LLImageBase::~LLImageBase() { }
+U8* LLImageBase::allocateData(S32 ) { return NULL; }
+void LLImageBase::deleteData() { }
+void LLImageBase::dump() { }
+const U8* LLImageBase::getData() const { return NULL; }
+U8* LLImageBase::getData() { return NULL; }
+U8* LLImageBase::reallocateData(S32 ) { return NULL; }
+void LLImageBase::sanityCheck() { }
+void LLImageBase::setSize(S32 , S32 , S32 ) { }
+
+LLImageJ2CImpl::~LLImageJ2CImpl() { }
+
+LLImageFormatted::LLImageFormatted(S8 ) { }
+LLImageFormatted::~LLImageFormatted() { }
+U8* LLImageFormatted::allocateData(S32 ) { return NULL; }
+S32 LLImageFormatted::calcDataSize(S32 ) { return 0; }
+S32 LLImageFormatted::calcDiscardLevelBytes(S32 ) { return 0; }
+BOOL LLImageFormatted::decodeChannels(LLImageRaw*, F32, S32, S32) { return FALSE; }
+BOOL LLImageFormatted::copyData(U8 *, S32) { return TRUE; } // this method always returns TRUE...
+void LLImageFormatted::deleteData() { }
+void LLImageFormatted::dump() { }
+U8* LLImageFormatted::reallocateData(S32 ) { return NULL; }
+void LLImageFormatted::resetLastError() { }
+void LLImageFormatted::sanityCheck() { }
+void LLImageFormatted::setLastError(const std::string& , const std::string& ) { }
+
+LLImageJ2C::LLImageJ2C() : LLImageFormatted(IMG_CODEC_J2C) { }
+LLImageJ2C::~LLImageJ2C() { }
+S32 LLImageJ2C::calcDataSize(S32 ) { return 0; }
+S32 LLImageJ2C::calcDiscardLevelBytes(S32 ) { return 0; }
+S32 LLImageJ2C::calcHeaderSize() { return 0; }
+BOOL LLImageJ2C::decode(LLImageRaw*, F32) { return FALSE; }
+BOOL LLImageJ2C::decodeChannels(LLImageRaw*, F32, S32, S32 ) { return FALSE; }
+void LLImageJ2C::decodeFailed() { }
+BOOL LLImageJ2C::encode(const LLImageRaw*, F32) { return FALSE; }
+S8 LLImageJ2C::getRawDiscardLevel() { return 0; }
+void LLImageJ2C::resetLastError() { }
+void LLImageJ2C::setLastError(const std::string&, const std::string&) { }
+BOOL LLImageJ2C::updateData() { return FALSE; }
+void LLImageJ2C::updateRawDiscardLevel() { }
+
+LLKDUMemIn::LLKDUMemIn(const U8*, const U32, const U16, const U16, const U8, siz_params*) { }
+LLKDUMemIn::~LLKDUMemIn() { }
+bool LLKDUMemIn::get(int, kdu_line_buf&, int) { return false; }
+
+// Stub Kakadu Library calls
+kdu_tile_comp kdu_tile::access_component(int ) { kdu_tile_comp a; return a; }
+void kdu_tile::close(kdu_thread_env* ) { }
+int kdu_tile::get_num_components() { return 0; }
+bool kdu_tile::get_ycc() { return false; }
+void kdu_tile::set_components_of_interest(int , const int* ) { }
+kdu_resolution kdu_tile_comp::access_resolution() { kdu_resolution a; return a; }
+int kdu_tile_comp::get_bit_depth(bool ) { return 8; }
+bool kdu_tile_comp::get_reversible() { return false; }
+kdu_subband kdu_resolution::access_subband(int ) { kdu_subband a; return a; }
+void kdu_resolution::get_dims(kdu_dims& ) { }
+int kdu_resolution::which() { return 0; }
+kdu_decoder::kdu_decoder(kdu_subband , kdu_sample_allocator*, bool , float, int, kdu_thread_env*, kdu_thread_queue*) { }
+kdu_synthesis::kdu_synthesis(kdu_resolution, kdu_sample_allocator*, bool, float, kdu_thread_env*, kdu_thread_queue*) { }
+kdu_params::kdu_params(const char*, bool, bool, bool, bool, bool) { }
+kdu_params::~kdu_params() { }
+void kdu_params::set(const char* , int , int , bool ) { }
+void kdu_params::set(const char* , int , int , int ) { }
+void kdu_params::finalize_all(bool ) { }
+void kdu_params::copy_from(kdu_params*, int, int, int, int, int, bool, bool, bool) { }
+bool kdu_params::parse_string(const char*) { return false; }
+bool kdu_params::get(const char*, int, int, bool&, bool, bool, bool) { return false; }
+bool kdu_params::get(const char*, int, int, float&, bool, bool, bool) { return false; }
+bool kdu_params::get(const char*, int, int, int&, bool, bool, bool) { return false; }
+kdu_params* kdu_params::access_relation(int, int, int, bool) { return NULL; }
+kdu_params* kdu_params::access_cluster(const char*) { return NULL; }
+void kdu_codestream::set_fast() { }
+void kdu_codestream::set_fussy() { }
+void kdu_codestream::get_dims(int, kdu_dims&, bool ) { }
+void kdu_codestream::change_appearance(bool, bool, bool) { }
+void kdu_codestream::get_tile_dims(kdu_coords, int, kdu_dims&, bool ) { }
+void kdu_codestream::destroy() { }
+void kdu_codestream::collect_timing_stats(int ) { }
+void kdu_codestream::set_max_bytes(kdu_long, bool, bool ) { }
+void kdu_codestream::get_valid_tiles(kdu_dims& ) { }
+void kdu_codestream::create(siz_params*, kdu_compressed_target*, kdu_dims*, int, kdu_long ) { }
+void kdu_codestream::create(kdu_compressed_source*, kdu_thread_env*) { }
+void kdu_codestream::apply_input_restrictions( int, int, int, int, kdu_dims*, kdu_component_access_mode ) { }
+void kdu_codestream::get_subsampling(int , kdu_coords&, bool ) { }
+void kdu_codestream::flush(kdu_long *, int , kdu_uint16 *, bool, bool, double, kdu_thread_env*) { }
+void kdu_codestream::set_resilient(bool ) { }
+int kdu_codestream::get_num_components(bool ) { return 0; }
+siz_params* kdu_codestream::access_siz() { return NULL; }
+kdu_tile kdu_codestream::open_tile(kdu_coords , kdu_thread_env* ) { kdu_tile a; return a; }
+kdu_codestream_comment kdu_codestream::add_comment() { kdu_codestream_comment a; return a; }
+bool kdu_codestream_comment::put_text(const char*) { return false; }
+void kdu_customize_warnings(kdu_message*) { }
+void kdu_customize_errors(kdu_message*) { }
+void kdu_convert_ycc_to_rgb(kdu_line_buf&, kdu_line_buf&, kdu_line_buf&, int) { }
+kdu_long kdu_multi_analysis::create(kdu_codestream, kdu_tile, bool, kdu_roi_image*, bool, int, kdu_thread_env*, kdu_thread_queue*, bool ) { kdu_long a = 0; return a; }
+siz_params::siz_params() : kdu_params(NULL, false, false, false, false, false) { }
+void siz_params::finalize(bool ) { }
+void siz_params::copy_with_xforms(kdu_params*, int, int, bool, bool, bool) { }
+int siz_params::write_marker_segment(kdu_output*, kdu_params*, int) { return 0; }
+bool siz_params::check_marker_segment(kdu_uint16, int, kdu_byte a[], int&) { return false; }
+bool siz_params::read_marker_segment(kdu_uint16, int, kdu_byte a[], int) { return false; }
+
+// -------------------------------------------------------------------------------------------
+// TUT
+// -------------------------------------------------------------------------------------------
+
+namespace tut
+{
+ // Test wrapper declarations
+ struct llimagej2ckdu_test
+ {
+ // Derived test class
+ class LLTestImageJ2CKDU : public LLImageJ2CKDU
+ {
+ public:
+ // Provides public access to some protected methods for testing
+ BOOL callGetMetadata(LLImageJ2C &base) { return getMetadata(base); }
+ BOOL callDecodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decode_time, S32 first_channel, S32 max_channel_count)
+ {
+ return decodeImpl(base, raw_image, decode_time, first_channel, max_channel_count);
+ }
+ BOOL callEncodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, const char* comment_text)
+ {
+ return encodeImpl(base, raw_image, comment_text);
+ }
+ };
+ // Instance to be tested
+ LLTestImageJ2CKDU* mImage;
+
+ // Constructor and destructor of the test wrapper
+ llimagej2ckdu_test()
+ {
+ mImage = new LLTestImageJ2CKDU;
+ }
+ ~llimagej2ckdu_test()
+ {
+ delete mImage;
+ }
+ };
+
+ // Tut templating thingamagic: test group, object and test instance
+ typedef test_group<llimagej2ckdu_test> llimagej2ckdu_t;
+ typedef llimagej2ckdu_t::object llimagej2ckdu_object_t;
+ tut::llimagej2ckdu_t tut_llimagej2ckdu("LLImageJ2CKDU");
+
+ // ---------------------------------------------------------------------------------------
+ // Test functions
+ // Notes:
+ // * Test as many as you possibly can without requiring a full blown simulation of everything
+ // * The tests are executed in sequence so the test instance state may change between calls
+ // * Remember that you cannot test private methods with tut
+ // ---------------------------------------------------------------------------------------
+
+ // Test 1 : test getMetadata()
+ template<> template<>
+ void llimagej2ckdu_object_t::test<1>()
+ {
+ LLImageJ2C* image = new LLImageJ2C();
+ BOOL res = mImage->callGetMetadata(*image);
+ // Trying to set up a data stream with all NIL values and stubbed KDU will "work" and return TRUE
+ // Note that is linking with KDU, that call will throw an exception and fail, returning FALSE
+ ensure("getMetadata() test failed", res == TRUE);
+ }
+
+ // Test 2 : test decodeImpl()
+ template<> template<>
+ void llimagej2ckdu_object_t::test<2>()
+ {
+ LLImageJ2C* image = new LLImageJ2C();
+ LLImageRaw* raw = new LLImageRaw();
+ BOOL res = mImage->callDecodeImpl(*image, *raw, 0.0, 0, 0);
+ // Decoding returns TRUE whenever there's nothing else to do, including if decoding failed, so we'll get TRUE here
+ ensure("decodeImpl() test failed", res == TRUE);
+ }
+
+ // Test 3 : test encodeImpl()
+ template<> template<>
+ void llimagej2ckdu_object_t::test<3>()
+ {
+ LLImageJ2C* image = new LLImageJ2C();
+ LLImageRaw* raw = new LLImageRaw();
+ BOOL res = mImage->callEncodeImpl(*image, *raw, NULL);
+ // Encoding returns TRUE unless an exception was raised, so we'll get TRUE here though nothing really was done
+ ensure("encodeImpl() test failed", res == TRUE);
+ }
+}
diff --git a/indra/llmath/tests/m3math_test.cpp b/indra/llmath/tests/m3math_test.cpp
index 8abf61b740..e4d31996a3 100644
--- a/indra/llmath/tests/m3math_test.cpp
+++ b/indra/llmath/tests/m3math_test.cpp
@@ -280,7 +280,6 @@ namespace tut
llmat_obj.setRows(llvec1, llvec2, llvec3);
llmat_obj.orthogonalize();
- skip("Grr, LLMatrix3::orthogonalize test is failing. Has it ever worked?");
ensure("LLMatrix3::orthogonalize failed ",
is_approx_equal(0.19611613f, llmat_obj.mMatrix[0][0]) &&
is_approx_equal(0.78446454f, llmat_obj.mMatrix[0][1]) &&
diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp
index b26d412e9f..27a368df3d 100644
--- a/indra/llmessage/llassetstorage.cpp
+++ b/indra/llmessage/llassetstorage.cpp
@@ -513,6 +513,10 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LL
}
+//
+// *NOTE: Logic here is replicated in LLViewerAssetStorage::_queueDataRequest.
+// Changes here may need to be replicated in the viewer's derived class.
+//
void LLAssetStorage::_queueDataRequest(const LLUUID& uuid, LLAssetType::EType atype,
LLGetAssetCallback callback,
void *user_data, BOOL duplicate,
diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp
index 7396117d84..03c28eb2a5 100644
--- a/indra/llmessage/llavatarnamecache.cpp
+++ b/indra/llmessage/llavatarnamecache.cpp
@@ -235,27 +235,21 @@ public:
/*virtual*/ void error(U32 status, const std::string& reason)
{
- // We're going to construct a dummy record and cache it for a while,
- // either briefly for a 503 Service Unavailable, or longer for other
- // errors.
- F64 retry_timestamp = errorRetryTimestamp(status);
-
- // *NOTE: "??" starts trigraphs in C/C++, escape the question marks.
- const std::string DUMMY_NAME("\?\?\?");
- LLAvatarName av_name;
- av_name.mUsername = DUMMY_NAME;
- av_name.mDisplayName = DUMMY_NAME;
- av_name.mIsDisplayNameDefault = false;
- av_name.mIsDummy = true;
- av_name.mExpires = retry_timestamp;
+ // If there's an error, it might be caused by PeopleApi,
+ // or when loading textures on startup and using a very slow
+ // network, this query may time out. Fallback to the legacy
+ // cache.
+
+ llwarns << "LLAvatarNameResponder error " << status << " " << reason << llendl;
// Add dummy records for all agent IDs in this request
std::vector<LLUUID>::const_iterator it = mAgentIDs.begin();
for ( ; it != mAgentIDs.end(); ++it)
{
const LLUUID& agent_id = *it;
- // cache it and fire signals
- LLAvatarNameCache::processName(agent_id, av_name, true);
+ gCacheName->get(agent_id, false, // legacy compatibility
+ boost::bind(&LLAvatarNameCache::legacyNameCallback,
+ _1, _2, _3));
}
}
@@ -357,7 +351,7 @@ void LLAvatarNameCache::requestNamesViaCapability()
if (url.size() > NAME_URL_SEND_THRESHOLD)
{
//llinfos << "requestNames " << url << llendl;
- LLHTTPClient::get(url, new LLAvatarNameResponder(agent_ids));
+ LLHTTPClient::get(url, new LLAvatarNameResponder(agent_ids));//, LLSD(), 10.0f);
url.clear();
agent_ids.clear();
}
@@ -366,7 +360,7 @@ void LLAvatarNameCache::requestNamesViaCapability()
if (!url.empty())
{
//llinfos << "requestNames " << url << llendl;
- LLHTTPClient::get(url, new LLAvatarNameResponder(agent_ids));
+ LLHTTPClient::get(url, new LLAvatarNameResponder(agent_ids));//, LLSD(), 10.0f);
url.clear();
agent_ids.clear();
}
diff --git a/indra/llplugin/CMakeLists.txt b/indra/llplugin/CMakeLists.txt
index d3a73058c4..1dc05e0b20 100644
--- a/indra/llplugin/CMakeLists.txt
+++ b/indra/llplugin/CMakeLists.txt
@@ -20,6 +20,7 @@ include_directories(
${LLRENDER_INCLUDE_DIRS}
${LLXML_INCLUDE_DIRS}
${LLWINDOW_INCLUDE_DIRS}
+ ${LLQTWEBKIT_INCLUDE_DIR}
)
set(llplugin_SOURCE_FILES
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp
index 69ed0fb09c..595c470a19 100644
--- a/indra/llplugin/llpluginclassmedia.cpp
+++ b/indra/llplugin/llpluginclassmedia.cpp
@@ -160,7 +160,7 @@ void LLPluginClassMedia::idle(void)
mPlugin->idle();
}
- if((mMediaWidth == -1) || (!mTextureParamsReceived) || (mPlugin == NULL) || (mPlugin->isBlocked()))
+ if((mMediaWidth == -1) || (!mTextureParamsReceived) || (mPlugin == NULL) || (mPlugin->isBlocked()) || (mOwner == NULL))
{
// Can't process a size change at this time
}
@@ -522,7 +522,15 @@ bool LLPluginClassMedia::keyEvent(EKeyEventType type, int key_code, MASK modifie
}
break;
}
-
+
+#if LL_DARWIN
+ if(modifiers & MASK_ALT)
+ {
+ // Option-key modified characters should be handled by the unicode input path instead of this one.
+ result = false;
+ }
+#endif
+
if(result)
{
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "key_event");
@@ -674,7 +682,21 @@ void LLPluginClassMedia::sendPickFileResponse(const std::string &file)
{
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "pick_file_response");
message.setValue("file", file);
- if(mPlugin->isBlocked())
+ if(mPlugin && mPlugin->isBlocked())
+ {
+ // If the plugin sent a blocking pick-file request, the response should unblock it.
+ message.setValueBoolean("blocking_response", true);
+ }
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::sendAuthResponse(bool ok, const std::string &username, const std::string &password)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "auth_response");
+ message.setValueBoolean("ok", ok);
+ message.setValue("username", username);
+ message.setValue("password", password);
+ if(mPlugin && mPlugin->isBlocked())
{
// If the plugin sent a blocking pick-file request, the response should unblock it.
message.setValueBoolean("blocking_response", true);
@@ -947,6 +969,12 @@ void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message)
{
mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_PICK_FILE_REQUEST);
}
+ else if(message_name == "auth_request")
+ {
+ mAuthURL = message.getValue("url");
+ mAuthRealm = message.getValue("realm");
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_AUTH_REQUEST);
+ }
else
{
LL_WARNS("Plugin") << "Unknown " << message_name << " class message: " << message_name << LL_ENDL;
@@ -1019,6 +1047,15 @@ void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message)
mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_GEOMETRY_CHANGE);
}
+ else if(message_name == "link_hovered")
+ {
+ // text is not currently used -- the tooltip hover text is taken from the "title".
+ mHoverLink = message.getValue("link");
+ mHoverText = message.getValue("title");
+ // message.getValue("text");
+
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_LINK_HOVERED);
+ }
else
{
LL_WARNS("Plugin") << "Unknown " << message_name << " class message: " << message_name << LL_ENDL;
@@ -1192,6 +1229,20 @@ void LLPluginClassMedia::proxyWindowClosed(const std::string &uuid)
sendMessage(message);
}
+void LLPluginClassMedia::ignore_ssl_cert_errors(bool ignore)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "ignore_ssl_cert_errors");
+ message.setValueBoolean("ignore", ignore);
+ sendMessage(message);
+}
+
+void LLPluginClassMedia::addCertificateFilePath(const std::string& path)
+{
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "add_certificate_file_path");
+ message.setValue("path", path);
+ sendMessage(message);
+}
+
void LLPluginClassMedia::crashPlugin()
{
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_INTERNAL, "crash");
diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h
index 9cb67fe909..c826e13c40 100644
--- a/indra/llplugin/llpluginclassmedia.h
+++ b/indra/llplugin/llpluginclassmedia.h
@@ -85,6 +85,8 @@ public:
void setBackgroundColor(LLColor4 color) { mBackgroundColor = color; };
+ void setOwner(LLPluginClassMediaOwner *owner) { mOwner = owner; };
+
// Returns true if all of the texture parameters (depth, format, size, and texture size) are set up and consistent.
// This will initially be false, and will also be false for some time after setSize while the resize is processed.
// Note that if this returns true, it is safe to use all the get() functions above without checking for invalid return values
@@ -159,6 +161,8 @@ public:
void sendPickFileResponse(const std::string &file);
+ void sendAuthResponse(bool ok, const std::string &username, const std::string &password);
+
// Valid after a MEDIA_EVENT_CURSOR_CHANGED event
std::string getCursorName() const { return mCursorName; };
@@ -198,6 +202,8 @@ public:
void setBrowserUserAgent(const std::string& user_agent);
void proxyWindowOpened(const std::string &target, const std::string &uuid);
void proxyWindowClosed(const std::string &uuid);
+ void ignore_ssl_cert_errors(bool ignore);
+ void addCertificateFilePath(const std::string& path);
// This is valid after MEDIA_EVENT_NAVIGATE_BEGIN or MEDIA_EVENT_NAVIGATE_COMPLETE
std::string getNavigateURI() const { return mNavigateURI; };
@@ -231,7 +237,15 @@ public:
S32 getGeometryY() const { return mGeometryY; };
S32 getGeometryWidth() const { return mGeometryWidth; };
S32 getGeometryHeight() const { return mGeometryHeight; };
+
+ // These are valid during MEDIA_EVENT_AUTH_REQUEST
+ std::string getAuthURL() const { return mAuthURL; };
+ std::string getAuthRealm() const { return mAuthRealm; };
+ // These are valid during MEDIA_EVENT_LINK_HOVERED
+ std::string getHoverText() const { return mHoverText; };
+ std::string getHoverLink() const { return mHoverLink; };
+
std::string getMediaName() const { return mMediaName; };
std::string getMediaDescription() const { return mMediaDescription; };
@@ -369,6 +383,10 @@ protected:
S32 mGeometryY;
S32 mGeometryWidth;
S32 mGeometryHeight;
+ std::string mAuthURL;
+ std::string mAuthRealm;
+ std::string mHoverText;
+ std::string mHoverLink;
/////////////////////////////////////////
// media_time class
diff --git a/indra/llplugin/llpluginclassmediaowner.h b/indra/llplugin/llpluginclassmediaowner.h
index c9efff216c..42e93cc6d7 100644
--- a/indra/llplugin/llpluginclassmediaowner.h
+++ b/indra/llplugin/llpluginclassmediaowner.h
@@ -59,7 +59,11 @@ public:
MEDIA_EVENT_GEOMETRY_CHANGE, // The plugin requested its window geometry be changed (per the javascript window interface)
MEDIA_EVENT_PLUGIN_FAILED_LAUNCH, // The plugin failed to launch
- MEDIA_EVENT_PLUGIN_FAILED // The plugin died unexpectedly
+ MEDIA_EVENT_PLUGIN_FAILED, // The plugin died unexpectedly
+
+ MEDIA_EVENT_AUTH_REQUEST, // The plugin wants to display an auth dialog
+
+ MEDIA_EVENT_LINK_HOVERED // Got a "link hovered" event from the plugin
} EMediaEvent;
diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt
index e98201ea63..33ab2e93b5 100644
--- a/indra/llui/CMakeLists.txt
+++ b/indra/llui/CMakeLists.txt
@@ -111,6 +111,7 @@ set(llui_SOURCE_FILES
llviewmodel.cpp
llview.cpp
llviewquery.cpp
+ llwindowshade.cpp
)
set(llui_HEADER_FILES
@@ -159,6 +160,7 @@ set(llui_HEADER_FILES
llnotificationslistener.h
llnotificationsutil.h
llnotificationtemplate.h
+ llnotificationvisibilityrule.h
llpanel.h
llprogressbar.h
llradiogroup.h
@@ -209,6 +211,7 @@ set(llui_HEADER_FILES
llviewmodel.h
llview.h
llviewquery.h
+ llwindowshade.h
)
set_source_files_properties(${llui_HEADER_FILES}
diff --git a/indra/llui/llcheckboxctrl.cpp b/indra/llui/llcheckboxctrl.cpp
index bbd8db2645..4fe444c1a4 100644
--- a/indra/llui/llcheckboxctrl.cpp
+++ b/indra/llui/llcheckboxctrl.cpp
@@ -88,27 +88,19 @@ LLCheckBoxCtrl::LLCheckBoxCtrl(const LLCheckBoxCtrl::Params& p)
tbparams.font(p.font);
}
mLabel = LLUICtrlFactory::create<LLTextBox> (tbparams);
+ mLabel->reshapeToFitText();
addChild(mLabel);
- S32 text_width = mLabel->getTextBoundingRect().getWidth();
- S32 text_height = llround(mFont->getLineHeight());
- LLRect label_rect;
- label_rect.setOriginAndSize(
- llcheckboxctrl_hpad + llcheckboxctrl_btn_size + llcheckboxctrl_spacing,
- llcheckboxctrl_vpad + 1, // padding to get better alignment
- text_width + llcheckboxctrl_hpad,
- text_height );
- mLabel->setShape(label_rect);
-
+ LLRect label_rect = mLabel->getRect();
// Button
// Note: button cover the label by extending all the way to the right.
- LLRect btn_rect;
+ LLRect btn_rect = p.check_button.rect();
btn_rect.setOriginAndSize(
- llcheckboxctrl_hpad,
- llcheckboxctrl_vpad,
- llcheckboxctrl_btn_size + llcheckboxctrl_spacing + text_width + llcheckboxctrl_hpad,
- llmax( text_height, llcheckboxctrl_btn_size() ) + llcheckboxctrl_vpad);
+ btn_rect.mLeft,
+ btn_rect.mBottom,
+ llmax(btn_rect.mRight, label_rect.mRight - btn_rect.mLeft),
+ llmax( label_rect.getHeight(), btn_rect.mTop));
std::string active_true_id, active_false_id;
std::string inactive_true_id, inactive_false_id;
@@ -174,31 +166,20 @@ void LLCheckBoxCtrl::clear()
void LLCheckBoxCtrl::reshape(S32 width, S32 height, BOOL called_from_parent)
{
- //stretch or shrink bounding rectangle of label when rebuilding UI at new scale
- static LLUICachedControl<S32> llcheckboxctrl_spacing ("UICheckboxctrlSpacing", 0);
- static LLUICachedControl<S32> llcheckboxctrl_hpad ("UICheckboxctrlHPad", 0);
- static LLUICachedControl<S32> llcheckboxctrl_vpad ("UICheckboxctrlVPad", 0);
- static LLUICachedControl<S32> llcheckboxctrl_btn_size ("UICheckboxctrlBtnSize", 0);
- S32 text_width = mLabel->getTextBoundingRect().getWidth();
- S32 text_height = llround(mFont->getLineHeight());
- LLRect label_rect;
- label_rect.setOriginAndSize(
- llcheckboxctrl_hpad + llcheckboxctrl_btn_size + llcheckboxctrl_spacing,
- llcheckboxctrl_vpad,
- text_width,
- text_height );
- mLabel->setShape(label_rect);
-
- LLRect btn_rect;
+ mLabel->reshapeToFitText();
+
+ LLRect label_rect = mLabel->getRect();
+
+ // Button
+ // Note: button cover the label by extending all the way to the right.
+ LLRect btn_rect = mButton->getRect();
btn_rect.setOriginAndSize(
- llcheckboxctrl_hpad,
- llcheckboxctrl_vpad,
- llcheckboxctrl_btn_size + llcheckboxctrl_spacing + text_width,
- llmax( text_height, llcheckboxctrl_btn_size() ) );
- mButton->setShape( btn_rect );
-
- LLUICtrl::reshape(width, height, called_from_parent);
+ btn_rect.mLeft,
+ btn_rect.mBottom,
+ llmax(btn_rect.getWidth(), label_rect.mRight - btn_rect.mLeft),
+ llmax(label_rect.mTop - btn_rect.mBottom, btn_rect.getHeight()));
+ mButton->setShape(btn_rect);
}
//virtual
diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp
index 9f32ade280..8b6a73af56 100644
--- a/indra/llui/llcombobox.cpp
+++ b/indra/llui/llcombobox.cpp
@@ -770,7 +770,8 @@ BOOL LLComboBox::handleKeyHere(KEY key, MASK mask)
return FALSE;
}
// if selection has changed, pop open list
- else if ((mList->getLastSelectedItem() != last_selected_item) || (key == KEY_DOWN) || (key == KEY_UP))
+ else if (mList->getLastSelectedItem() != last_selected_item ||
+ (key == KEY_DOWN || key == KEY_UP) && !mList->isEmpty())
{
showList();
}
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 7727e154da..d30697e178 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -1,4 +1,5 @@
/**
+
* @file llfloater.cpp
* @brief LLFloater base class
*
@@ -1189,7 +1190,7 @@ void LLFloater::setFocus( BOOL b )
last_focus->setFocus(TRUE);
}
}
- updateTransparency(this, b ? TT_ACTIVE : TT_INACTIVE);
+ updateTransparency(b ? TT_ACTIVE : TT_INACTIVE);
}
// virtual
@@ -1462,6 +1463,9 @@ void LLFloater::setFrontmost(BOOL take_focus)
// there are more than one floater view
// so we need to query our parent directly
((LLFloaterView*)getParent())->bringToFront(this, take_focus);
+
+ // Make sure to set the appropriate transparency type (STORM-732).
+ updateTransparency(hasFocus() || getIsChrome() ? TT_ACTIVE : TT_INACTIVE);
}
}
@@ -2906,7 +2910,9 @@ bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::str
params.from_xui = true;
applyXUILayout(params, parent);
initFromParams(params);
-
+ // chrome floaters don't take focus at all
+ setFocusRoot(!getIsChrome());
+
initFloater(params);
LLMultiFloater* last_host = LLFloater::getFloaterHost();
diff --git a/indra/llui/llhandle.h b/indra/llui/llhandle.h
index a43f095d67..8c000eee48 100644
--- a/indra/llui/llhandle.h
+++ b/indra/llui/llhandle.h
@@ -61,13 +61,6 @@ public:
return *this;
}
- template<typename Subclass>
- LLHandle<T>& operator =(const LLHandle<Subclass>& other)
- {
- mTombStone = other.mTombStone;
- return *this;
- }
-
bool isDead() const
{
return mTombStone->getTarget() == NULL;
@@ -99,7 +92,6 @@ public:
{
return lhs.mTombStone > rhs.mTombStone;
}
-protected:
protected:
LLPointer<LLTombStone<T> > mTombStone;
diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp
index 940c7e7e18..19ac4c58a8 100644
--- a/indra/llui/lllayoutstack.cpp
+++ b/indra/llui/lllayoutstack.cpp
@@ -38,6 +38,12 @@
static LLDefaultChildRegistry::Register<LLLayoutStack> register_layout_stack("layout_stack");
static LLLayoutStack::LayoutStackRegistry::Register<LLLayoutPanel> register_layout_panel("layout_panel");
+void LLLayoutStack::OrientationNames::declareValues()
+{
+ declare("horizontal", HORIZONTAL);
+ declare("vertical", VERTICAL);
+}
+
//
// LLLayoutPanel
//
@@ -47,47 +53,47 @@ LLLayoutPanel::LLLayoutPanel(const Params& p)
mMaxDim(p.max_dim),
mAutoResize(p.auto_resize),
mUserResize(p.user_resize),
- mCollapsed(FALSE),
- mCollapseAmt(0.f),
- mVisibleAmt(1.f), // default to fully visible
- mResizeBar(NULL)
- {
+ mCollapsed(FALSE),
+ mCollapseAmt(0.f),
+ mVisibleAmt(1.f), // default to fully visible
+ mResizeBar(NULL)
+{
// panels initialized as hidden should not start out partially visible
if (!getVisible())
- {
+ {
mVisibleAmt = 0.f;
- }
- }
+ }
+}
void LLLayoutPanel::initFromParams(const Params& p)
- {
+{
LLPanel::initFromParams(p);
setFollowsNone();
- }
+}
LLLayoutPanel::~LLLayoutPanel()
- {
- // probably not necessary, but...
- delete mResizeBar;
- mResizeBar = NULL;
- }
+{
+ // probably not necessary, but...
+ delete mResizeBar;
+ mResizeBar = NULL;
+}
F32 LLLayoutPanel::getCollapseFactor(LLLayoutStack::ELayoutOrientation orientation)
- {
+{
if (orientation == LLLayoutStack::HORIZONTAL)
- {
- F32 collapse_amt =
- clamp_rescale(mCollapseAmt, 0.f, 1.f, 1.f, (F32)mMinDim / (F32)llmax(1, getRect().getWidth()));
- return mVisibleAmt * collapse_amt;
- }
- else
+ {
+ F32 collapse_amt =
+ clamp_rescale(mCollapseAmt, 0.f, 1.f, 1.f, (F32)mMinDim / (F32)llmax(1, getRect().getWidth()));
+ return mVisibleAmt * collapse_amt;
+ }
+ else
{
F32 collapse_amt =
clamp_rescale(mCollapseAmt, 0.f, 1.f, 1.f, llmin(1.f, (F32)mMinDim / (F32)llmax(1, getRect().getHeight())));
return mVisibleAmt * collapse_amt;
- }
}
+}
//
// LLLayoutStack
@@ -97,6 +103,8 @@ LLLayoutStack::Params::Params()
: orientation("orientation"),
animate("animate", true),
clip("clip", true),
+ open_time_constant("open_time_constant", 0.02f),
+ close_time_constant("close_time_constant", 0.03f),
border_size("border_size", LLCachedControl<S32>(*LLUI::sSettingGroups["config"], "UIResizeBarHeight", 0))
{
name="stack";
@@ -107,10 +115,12 @@ LLLayoutStack::LLLayoutStack(const LLLayoutStack::Params& p)
mMinWidth(0),
mMinHeight(0),
mPanelSpacing(p.border_size),
- mOrientation((p.orientation() == "vertical") ? VERTICAL : HORIZONTAL),
+ mOrientation(p.orientation),
mAnimate(p.animate),
mAnimatedThisFrame(false),
- mClip(p.clip)
+ mClip(p.clip),
+ mOpenTimeConstant(p.open_time_constant),
+ mCloseTimeConstant(p.close_time_constant)
{}
LLLayoutStack::~LLLayoutStack()
@@ -303,9 +313,6 @@ void LLLayoutStack::updateLayout(BOOL force_resize)
S32 total_width = 0;
S32 total_height = 0;
- const F32 ANIM_OPEN_TIME = 0.02f;
- const F32 ANIM_CLOSE_TIME = 0.03f;
-
e_panel_list_t::iterator panel_it;
for (panel_it = mPanels.begin(); panel_it != mPanels.end(); ++panel_it)
{
@@ -316,7 +323,7 @@ void LLLayoutStack::updateLayout(BOOL force_resize)
{
if (!mAnimatedThisFrame)
{
- (*panel_it)->mVisibleAmt = lerp((*panel_it)->mVisibleAmt, 1.f, LLCriticalDamp::getInterpolant(ANIM_OPEN_TIME));
+ (*panel_it)->mVisibleAmt = lerp((*panel_it)->mVisibleAmt, 1.f, LLCriticalDamp::getInterpolant(mOpenTimeConstant));
if ((*panel_it)->mVisibleAmt > 0.99f)
{
(*panel_it)->mVisibleAmt = 1.f;
@@ -334,7 +341,7 @@ void LLLayoutStack::updateLayout(BOOL force_resize)
{
if (!mAnimatedThisFrame)
{
- (*panel_it)->mVisibleAmt = lerp((*panel_it)->mVisibleAmt, 0.f, LLCriticalDamp::getInterpolant(ANIM_CLOSE_TIME));
+ (*panel_it)->mVisibleAmt = lerp((*panel_it)->mVisibleAmt, 0.f, LLCriticalDamp::getInterpolant(mCloseTimeConstant));
if ((*panel_it)->mVisibleAmt < 0.001f)
{
(*panel_it)->mVisibleAmt = 0.f;
@@ -349,11 +356,11 @@ void LLLayoutStack::updateLayout(BOOL force_resize)
if ((*panel_it)->mCollapsed)
{
- (*panel_it)->mCollapseAmt = lerp((*panel_it)->mCollapseAmt, 1.f, LLCriticalDamp::getInterpolant(ANIM_CLOSE_TIME));
+ (*panel_it)->mCollapseAmt = lerp((*panel_it)->mCollapseAmt, 1.f, LLCriticalDamp::getInterpolant(mCloseTimeConstant));
}
else
{
- (*panel_it)->mCollapseAmt = lerp((*panel_it)->mCollapseAmt, 0.f, LLCriticalDamp::getInterpolant(ANIM_CLOSE_TIME));
+ (*panel_it)->mCollapseAmt = lerp((*panel_it)->mCollapseAmt, 0.f, LLCriticalDamp::getInterpolant(mCloseTimeConstant));
}
if (mOrientation == HORIZONTAL)
diff --git a/indra/llui/lllayoutstack.h b/indra/llui/lllayoutstack.h
index e19ef403ef..4ac8ef0ee9 100644
--- a/indra/llui/lllayoutstack.h
+++ b/indra/llui/lllayoutstack.h
@@ -37,27 +37,35 @@ class LLLayoutPanel;
class LLLayoutStack : public LLView, public LLInstanceTracker<LLLayoutStack>
{
public:
+ typedef enum e_layout_orientation
+ {
+ HORIZONTAL,
+ VERTICAL
+ } ELayoutOrientation;
+
+ struct OrientationNames
+ : public LLInitParam::TypeValuesHelper<ELayoutOrientation, OrientationNames>
+ {
+ static void declareValues();
+ };
+
struct LayoutStackRegistry : public LLChildRegistry<LayoutStackRegistry>
{};
struct Params : public LLInitParam::Block<Params, LLView::Params>
{
- Mandatory<std::string> orientation;
+ Mandatory<ELayoutOrientation, OrientationNames> orientation;
Optional<S32> border_size;
Optional<bool> animate,
clip;
+ Optional<F32> open_time_constant,
+ close_time_constant;
Params();
};
typedef LayoutStackRegistry child_registry_t;
- typedef enum e_layout_orientation
- {
- HORIZONTAL,
- VERTICAL
- } ELayoutOrientation;
-
virtual ~LLLayoutStack();
/*virtual*/ void draw();
@@ -137,6 +145,8 @@ private:
bool mAnimatedThisFrame;
bool mAnimate;
bool mClip;
+ F32 mOpenTimeConstant;
+ F32 mCloseTimeConstant;
}; // end class LLLayoutStack
class LLLayoutPanel : public LLPanel
@@ -167,6 +177,9 @@ public:
~LLLayoutPanel();
void initFromParams(const Params& p);
+ void setMinDim(S32 value) { mMinDim = value; }
+ void setMaxDim(S32 value) { mMaxDim = value; }
+
protected:
LLLayoutPanel(const Params& p) ;
diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp
index ba73b74052..7e348656a9 100644
--- a/indra/llui/lllineeditor.cpp
+++ b/indra/llui/lllineeditor.cpp
@@ -88,6 +88,7 @@ LLLineEditor::Params::Params()
revert_on_esc("revert_on_esc", true),
commit_on_focus_lost("commit_on_focus_lost", true),
ignore_tab("ignore_tab", true),
+ is_password("is_password", false),
cursor_color("cursor_color"),
text_color("text_color"),
text_readonly_color("text_readonly_color"),
@@ -129,7 +130,7 @@ LLLineEditor::LLLineEditor(const LLLineEditor::Params& p)
mBorderThickness( 0 ),
mIgnoreArrowKeys( FALSE ),
mIgnoreTab( p.ignore_tab ),
- mDrawAsterixes( FALSE ),
+ mDrawAsterixes( p.is_password ),
mSelectAllonFocusReceived( p.select_on_focus ),
mPassDelete(FALSE),
mReadOnly(FALSE),
@@ -1529,6 +1530,8 @@ void LLLineEditor::drawBackground()
{
image = mBgImage;
}
+
+ if (!image) return;
F32 alpha = getCurrentTransparency();
diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h
index a1aa6b71c6..723423a5b9 100644
--- a/indra/llui/lllineeditor.h
+++ b/indra/llui/lllineeditor.h
@@ -85,7 +85,8 @@ public:
Optional<bool> select_on_focus,
revert_on_esc,
commit_on_focus_lost,
- ignore_tab;
+ ignore_tab,
+ is_password;
// colors
Optional<LLUIColor> cursor_color,
@@ -336,7 +337,7 @@ protected:
std::vector<S32> mPreeditPositions;
LLPreeditor::standouts_t mPreeditStandouts;
- LLHandle<LLView> mContextMenuHandle;
+ LLHandle<LLContextMenu> mContextMenuHandle;
private:
// Instances that by default point to the statics but can be overidden in XML.
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index a6cf86d9b8..6c0d47ef63 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -1462,7 +1462,7 @@ BOOL LLMenuItemBranchDownGL::handleAcceleratorKey(KEY key, MASK mask)
{
BOOL branch_visible = getBranch()->getVisible();
BOOL handled = getBranch()->handleAcceleratorKey(key, mask);
- if (handled && !branch_visible && getVisible())
+ if (handled && !branch_visible && isInVisibleChain())
{
// flash this menu entry because we triggered an invisible menu item
LLMenuHolderGL::setActivatedItem(this);
@@ -2611,6 +2611,7 @@ LLMenuItemGL* LLMenuGL::getHighlightedItem()
LLMenuItemGL* LLMenuGL::highlightNextItem(LLMenuItemGL* cur_item, BOOL skip_disabled)
{
+ if (mItems.empty()) return NULL;
// highlighting first item on a torn off menu is the
// same as giving focus to it
if (!cur_item && getTornOff())
@@ -2711,6 +2712,8 @@ LLMenuItemGL* LLMenuGL::highlightNextItem(LLMenuItemGL* cur_item, BOOL skip_disa
LLMenuItemGL* LLMenuGL::highlightPrevItem(LLMenuItemGL* cur_item, BOOL skip_disabled)
{
+ if (mItems.empty()) return NULL;
+
// highlighting first item on a torn off menu is the
// same as giving focus to it
if (!cur_item && getTornOff())
@@ -3045,6 +3048,11 @@ void LLMenuGL::showPopup(LLView* spawning_view, LLMenuGL* menu, S32 x, S32 y)
const S32 CURSOR_HEIGHT = 22; // Approximate "normal" cursor size
const S32 CURSOR_WIDTH = 12;
+ if(menu->getChildList()->empty())
+ {
+ return;
+ }
+
// Save click point for detecting cursor moves before mouse-up.
// Must be in local coords to compare with mouseUp events.
// If the mouse doesn't move, the menu will stay open ala the Mac.
@@ -3125,7 +3133,10 @@ BOOL LLMenuBarGL::handleAcceleratorKey(KEY key, MASK mask)
mAltKeyTrigger = FALSE;
}
- if(!result && (key == KEY_F10 && mask == MASK_CONTROL) && !gKeyboard->getKeyRepeated(key))
+ if(!result
+ && (key == KEY_F10 && mask == MASK_CONTROL)
+ && !gKeyboard->getKeyRepeated(key)
+ && isInVisibleChain())
{
if (getHighlightedItem())
{
@@ -3508,8 +3519,10 @@ BOOL LLMenuHolderGL::handleKey(KEY key, MASK mask, BOOL called_from_parent)
else
{
//highlight first enabled one
- pMenu->highlightNextItem(NULL);
- handled = true;
+ if(pMenu->highlightNextItem(NULL))
+ {
+ handled = true;
+ }
}
}
}
@@ -3742,9 +3755,7 @@ public:
LLContextMenuBranch(const Params&);
virtual ~LLContextMenuBranch()
- {
- delete mBranch;
- }
+ {}
// called to rebuild the draw label
virtual void buildDrawLabel( void );
@@ -3752,21 +3763,21 @@ public:
// onCommit() - do the primary funcationality of the menu item.
virtual void onCommit( void );
- LLContextMenu* getBranch() { return mBranch; }
+ LLContextMenu* getBranch() { return mBranch.get(); }
void setHighlight( BOOL highlight );
protected:
void showSubMenu();
- LLContextMenu* mBranch;
+ LLHandle<LLContextMenu> mBranch;
};
LLContextMenuBranch::LLContextMenuBranch(const LLContextMenuBranch::Params& p)
: LLMenuItemGL(p),
- mBranch( p.branch )
+ mBranch( p.branch()->getHandle() )
{
- mBranch->hide();
- mBranch->setParentMenuItem(this);
+ mBranch.get()->hide();
+ mBranch.get()->setParentMenuItem(this);
}
// called to rebuild the draw label
@@ -3775,12 +3786,12 @@ void LLContextMenuBranch::buildDrawLabel( void )
{
// default enablement is this -- if any of the subitems are
// enabled, this item is enabled. JC
- U32 sub_count = mBranch->getItemCount();
+ U32 sub_count = mBranch.get()->getItemCount();
U32 i;
BOOL any_enabled = FALSE;
for (i = 0; i < sub_count; i++)
{
- LLMenuItemGL* item = mBranch->getItem(i);
+ LLMenuItemGL* item = mBranch.get()->getItem(i);
item->buildDrawLabel();
if (item->getEnabled() && !item->getDrawTextDisabled() )
{
@@ -3802,13 +3813,13 @@ void LLContextMenuBranch::buildDrawLabel( void )
void LLContextMenuBranch::showSubMenu()
{
- LLMenuItemGL* menu_item = mBranch->getParentMenuItem();
+ LLMenuItemGL* menu_item = mBranch.get()->getParentMenuItem();
if (menu_item != NULL && menu_item->getVisible())
{
S32 center_x;
S32 center_y;
localPointToScreen(getRect().getWidth(), getRect().getHeight() , &center_x, &center_y);
- mBranch->show(center_x, center_y);
+ mBranch.get()->show(center_x, center_y);
}
}
@@ -3828,7 +3839,7 @@ void LLContextMenuBranch::setHighlight( BOOL highlight )
}
else
{
- mBranch->hide();
+ mBranch.get()->hide();
}
}
@@ -3859,6 +3870,11 @@ void LLContextMenu::setVisible(BOOL visible)
// Takes cursor position in screen space?
void LLContextMenu::show(S32 x, S32 y)
{
+ if (getChildList()->empty())
+ {
+ // nothing to show, so abort
+ return;
+ }
// Save click point for detecting cursor moves before mouse-up.
// Must be in local coords to compare with mouseUp events.
// If the mouse doesn't move, the menu will stay open ala the Mac.
diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h
index 35544402f4..7bde8e83ec 100644
--- a/indra/llui/llmenugl.h
+++ b/indra/llui/llmenugl.h
@@ -678,9 +678,12 @@ public:
BOOL appendContextSubMenu(LLContextMenu *menu);
+ LLHandle<LLContextMenu> getHandle() { mHandle.bind(this); return mHandle; }
+
protected:
- BOOL mHoveredAnyItem;
- LLMenuItemGL* mHoverItem;
+ BOOL mHoveredAnyItem;
+ LLMenuItemGL* mHoverItem;
+ LLRootHandle<LLContextMenu> mHandle;
};
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp
index a3df6a3ced..cd0f0e36b0 100644
--- a/indra/llui/llnotifications.cpp
+++ b/indra/llui/llnotifications.cpp
@@ -28,6 +28,7 @@
#include "llnotifications.h"
#include "llnotificationtemplate.h"
+#include "llnotificationvisibilityrule.h"
#include "llavatarnamecache.h"
#include "llinstantmessage.h"
@@ -81,6 +82,7 @@ LLNotificationForm::FormButton::FormButton()
LLNotificationForm::FormInput::FormInput()
: type("type"),
+ text("text"),
max_length_chars("max_length_chars"),
width("width", 0),
value("value")
@@ -137,12 +139,6 @@ private:
bool filterIgnoredNotifications(LLNotificationPtr notification)
{
- // filter everything if we are to ignore ALL
- if(LLNotifications::instance().getIgnoreAllNotifications())
- {
- return false;
- }
-
LLNotificationFormPtr form = notification->getForm();
// Check to see if the user wants to ignore this alert
return !notification->getForm()->getIgnored();
@@ -177,6 +173,28 @@ bool handleIgnoredNotification(const LLSD& payload)
return false;
}
+bool defaultResponse(const LLSD& payload)
+{
+ if (payload["sigtype"].asString() == "add")
+ {
+ LLNotificationPtr pNotif = LLNotifications::instance().find(payload["id"].asUUID());
+ if (pNotif)
+ {
+ // supply default response
+ pNotif->respond(pNotif->getResponseTemplate(LLNotification::WITH_DEFAULT_BUTTON));
+ }
+ }
+ return false;
+}
+
+bool visibilityRuleMached(const LLSD& payload)
+{
+ // This is needed because LLNotifications::isVisibleByRules may have cancelled the notification.
+ // Returning true here makes LLNotificationChannelBase::updateItem do an early out, which prevents things from happening in the wrong order.
+ return true;
+}
+
+
namespace LLNotificationFilters
{
// a sample filter
@@ -404,12 +422,49 @@ LLNotificationTemplate::LLNotificationTemplate(const LLNotificationTemplate::Par
it != end_it;
++it)
{
- mUniqueContext.push_back(it->key);
+ mUniqueContext.push_back(it->value);
+ }
+
+ lldebugs << "notification \"" << mName << "\": tag count is " << p.tags.size() << llendl;
+
+ for(LLInitParam::ParamIterator<LLNotificationTemplate::Tag>::const_iterator it = p.tags.begin(),
+ end_it = p.tags.end();
+ it != end_it;
+ ++it)
+ {
+ lldebugs << " tag \"" << std::string(it->value) << "\"" << llendl;
+ mTags.push_back(it->value);
}
mForm = LLNotificationFormPtr(new LLNotificationForm(p.name, p.form_ref.form));
}
+LLNotificationVisibilityRule::LLNotificationVisibilityRule(const LLNotificationVisibilityRule::Rule &p)
+{
+ if (p.show.isChosen())
+ {
+ mType = p.show.type;
+ mTag = p.show.tag;
+ mName = p.show.name;
+ mVisible = true;
+ }
+ else if (p.hide.isChosen())
+ {
+ mType = p.hide.type;
+ mTag = p.hide.tag;
+ mName = p.hide.name;
+ mVisible = false;
+ }
+ else if (p.respond.isChosen())
+ {
+ mType = p.respond.type;
+ mTag = p.respond.tag;
+ mName = p.respond.name;
+ mVisible = false;
+ mResponse = p.respond.response;
+ }
+}
+
LLNotification::LLNotification(const LLNotification::Params& p) :
mTimestamp(p.time_stamp),
mSubstitutions(p.substitutions),
@@ -679,6 +734,25 @@ bool LLNotification::hasUniquenessConstraints() const
return (mTemplatep ? mTemplatep->mUnique : false);
}
+bool LLNotification::matchesTag(const std::string& tag)
+{
+ bool result = false;
+
+ if(mTemplatep)
+ {
+ std::list<std::string>::iterator it;
+ for(it = mTemplatep->mTags.begin(); it != mTemplatep->mTags.end(); it++)
+ {
+ if((*it) == tag)
+ {
+ result = true;
+ break;
+ }
+ }
+ }
+
+ return result;
+}
void LLNotification::setIgnored(bool ignore)
{
@@ -719,13 +793,19 @@ bool LLNotification::isEquivalentTo(LLNotificationPtr that) const
{
const LLSD& these_substitutions = this->getSubstitutions();
const LLSD& those_substitutions = that->getSubstitutions();
+ const LLSD& this_payload = this->getPayload();
+ const LLSD& that_payload = that->getPayload();
// highlander bit sez there can only be one of these
for (std::vector<std::string>::const_iterator it = mTemplatep->mUniqueContext.begin(), end_it = mTemplatep->mUniqueContext.end();
it != end_it;
++it)
{
- if (these_substitutions.get(*it).asString() != those_substitutions.get(*it).asString())
+ // if templates differ in either substitution strings or payload with the given field name
+ // then they are considered inequivalent
+ // use of get() avoids converting the LLSD value to a map as the [] operator would
+ if (these_substitutions.get(*it).asString() != those_substitutions.get(*it).asString()
+ || this_payload.get(*it).asString() != that_payload.get(*it).asString())
{
return false;
}
@@ -1064,12 +1144,12 @@ std::string LLNotificationChannel::summarize()
// LLNotifications implementation
// ---
LLNotifications::LLNotifications() : LLNotificationChannelBase(LLNotificationFilters::includeEverything,
- LLNotificationComparators::orderByUUID()),
- mIgnoreAllNotifications(false)
+ LLNotificationComparators::orderByUUID()),
+ mIgnoreAllNotifications(false)
{
LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Notification.Show", boost::bind(&LLNotifications::addFromCallback, this, _2));
-
- mListener.reset(new LLNotificationsListener(*this));
+
+ mListener.reset(new LLNotificationsListener(*this));
}
@@ -1184,6 +1264,7 @@ LLNotificationChannelPtr LLNotifications::getChannel(const std::string& channelN
void LLNotifications::initSingleton()
{
loadTemplates();
+ loadVisibilityRules();
createDefaultChannels();
}
@@ -1191,15 +1272,19 @@ void LLNotifications::createDefaultChannels()
{
// now construct the various channels AFTER loading the notifications,
// because the history channel is going to rewrite the stored notifications file
- LLNotificationChannel::buildChannel("Expiration", "",
+ LLNotificationChannel::buildChannel("Enabled", "",
+ !boost::bind(&LLNotifications::getIgnoreAllNotifications, this));
+ LLNotificationChannel::buildChannel("Expiration", "Enabled",
boost::bind(&LLNotifications::expirationFilter, this, _1));
- LLNotificationChannel::buildChannel("Unexpired", "",
+ LLNotificationChannel::buildChannel("Unexpired", "Enabled",
!boost::bind(&LLNotifications::expirationFilter, this, _1)); // use negated bind
LLNotificationChannel::buildChannel("Unique", "Unexpired",
boost::bind(&LLNotifications::uniqueFilter, this, _1));
LLNotificationChannel::buildChannel("Ignore", "Unique",
filterIgnoredNotifications);
- LLNotificationChannel::buildChannel("Visible", "Ignore",
+ LLNotificationChannel::buildChannel("VisibilityRules", "Ignore",
+ boost::bind(&LLNotifications::isVisibleByRules, this, _1));
+ LLNotificationChannel::buildChannel("Visible", "VisibilityRules",
&LLNotificationFilters::includeEverything);
// create special persistent notification channel
@@ -1207,6 +1292,8 @@ void LLNotifications::createDefaultChannels()
new LLPersistentNotificationChannel();
// connect action methods to these channels
+ LLNotifications::instance().getChannel("Enabled")->
+ connectFailedFilter(&defaultResponse);
LLNotifications::instance().getChannel("Expiration")->
connectChanged(boost::bind(&LLNotifications::expirationHandler, this, _1));
// uniqueHandler slot should be added as first slot of the signal due to
@@ -1218,6 +1305,8 @@ void LLNotifications::createDefaultChannels()
// connectFailedFilter(boost::bind(&LLNotifications::failedUniquenessTest, this, _1));
LLNotifications::instance().getChannel("Ignore")->
connectFailedFilter(&handleIgnoredNotification);
+ LLNotifications::instance().getChannel("VisibilityRules")->
+ connectFailedFilter(&visibilityRuleMached);
}
bool LLNotifications::addTemplate(const std::string &name,
@@ -1347,6 +1436,12 @@ bool LLNotifications::loadTemplates()
LLXUIParser parser;
parser.readXUI(root, params, full_filename);
+ if(!params.validateBlock())
+ {
+ llerrs << "Problem reading UI Notifications file: " << full_filename << llendl;
+ return false;
+ }
+
mTemplates.clear();
for(LLInitParam::ParamIterator<LLNotificationTemplate::GlobalString>::const_iterator it = params.strings.begin(), end_it = params.strings.end();
@@ -1396,6 +1491,34 @@ bool LLNotifications::loadTemplates()
return true;
}
+bool LLNotifications::loadVisibilityRules()
+{
+ const std::string xml_filename = "notification_visibility.xml";
+ std::string full_filename = gDirUtilp->findSkinnedFilename(LLUI::getXUIPaths().front(), xml_filename);
+
+ LLNotificationVisibilityRule::Rules params;
+ LLSimpleXUIParser parser;
+ parser.readXUI(full_filename, params);
+
+ if(!params.validateBlock())
+ {
+ llerrs << "Problem reading UI Notification Visibility Rules file: " << full_filename << llendl;
+ return false;
+ }
+
+ mVisibilityRules.clear();
+
+ for(LLInitParam::ParamIterator<LLNotificationVisibilityRule::Rule>::iterator it = params.rules.begin(),
+ end_it = params.rules.end();
+ it != end_it;
+ ++it)
+ {
+ mVisibilityRules.push_back(LLNotificationVisibilityRulePtr(new LLNotificationVisibilityRule(*it)));
+ }
+
+ return true;
+}
+
// Add a simple notification (from XUI)
void LLNotifications::addFromCallback(const LLSD& name)
{
@@ -1546,6 +1669,94 @@ bool LLNotifications::getIgnoreAllNotifications()
return mIgnoreAllNotifications;
}
+bool LLNotifications::isVisibleByRules(LLNotificationPtr n)
+{
+ if(n->isRespondedTo())
+ {
+ // This avoids infinite recursion in the case where the filter calls respond()
+ return true;
+ }
+
+ VisibilityRuleList::iterator it;
+
+ for(it = mVisibilityRules.begin(); it != mVisibilityRules.end(); it++)
+ {
+ // An empty type/tag/name string will match any notification, so only do the comparison when the string is non-empty in the rule.
+
+ lldebugs
+ << "notification \"" << n->getName() << "\" "
+ << "testing against " << ((*it)->mVisible?"show":"hide") << " rule, "
+ << "name = \"" << (*it)->mName << "\" "
+ << "tag = \"" << (*it)->mTag << "\" "
+ << "type = \"" << (*it)->mType << "\" "
+ << llendl;
+
+ if(!(*it)->mType.empty())
+ {
+ if((*it)->mType != n->getType())
+ {
+ // Type doesn't match, so skip this rule.
+ continue;
+ }
+ }
+
+ if(!(*it)->mTag.empty())
+ {
+ // check this notification's tag(s) against it->mTag and continue if no match is found.
+ if(!n->matchesTag((*it)->mTag))
+ {
+ // This rule's non-empty tag didn't match one of the notification's tags. Skip this rule.
+ continue;
+ }
+ }
+
+ if(!(*it)->mName.empty())
+ {
+ // check this notification's name against the notification's name and continue if no match is found.
+ if((*it)->mName != n->getName())
+ {
+ // This rule's non-empty name didn't match the notification. Skip this rule.
+ continue;
+ }
+ }
+
+ // If we got here, the rule matches. Don't evaluate subsequent rules.
+ if(!(*it)->mVisible)
+ {
+ // This notification is being hidden.
+
+ if((*it)->mResponse.empty())
+ {
+ // Response property is empty. Cancel this notification.
+ lldebugs << "cancelling notification " << n->getName() << llendl;
+
+ n->cancel();
+ }
+ else
+ {
+ // Response property is not empty. Return the specified response.
+ LLSD response = n->getResponseTemplate(LLNotification::WITHOUT_DEFAULT_BUTTON);
+ // TODO: verify that the response template has an item with the correct name
+ response[(*it)->mResponse] = true;
+
+ lldebugs << "responding to notification " << n->getName() << " with response = " << response << llendl;
+
+ n->respond(response);
+ }
+
+ return false;
+ }
+
+ // If we got here, exit the loop and return true.
+ break;
+ }
+
+ lldebugs << "allowing notification " << n->getName() << llendl;
+
+ return true;
+}
+
+
// ---
// END OF LLNotifications implementation
// =========================================================
diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h
index 524cff70e8..34d3537781 100644
--- a/indra/llui/llnotifications.h
+++ b/indra/llui/llnotifications.h
@@ -195,6 +195,7 @@ public:
Mandatory<std::string> type;
Optional<S32> width;
Optional<S32> max_length_chars;
+ Optional<std::string> text;
Optional<std::string> value;
FormInput();
@@ -270,6 +271,11 @@ struct LLNotificationTemplate;
// with smart pointers
typedef boost::shared_ptr<LLNotificationTemplate> LLNotificationTemplatePtr;
+
+struct LLNotificationVisibilityRule;
+
+typedef boost::shared_ptr<LLNotificationVisibilityRule> LLNotificationVisibilityRulePtr;
+
/**
* @class LLNotification
* @brief The object that expresses the details of a notification
@@ -506,7 +512,7 @@ public:
std::string getLabel() const;
std::string getURL() const;
S32 getURLOption() const;
- S32 getURLOpenExternally() const;
+ S32 getURLOpenExternally() const;
const LLNotificationFormPtr getForm();
@@ -578,6 +584,8 @@ public:
bool hasUniquenessConstraints() const;
+ bool matchesTag(const std::string& tag);
+
virtual ~LLNotification() {}
};
@@ -859,6 +867,10 @@ public:
// OK to call more than once because it will reload
bool loadTemplates();
+ // load visibility rules from file;
+ // OK to call more than once because it will reload
+ bool loadVisibilityRules();
+
// Add a simple notification (from XUI)
void addFromCallback(const LLSD& name);
@@ -904,6 +916,8 @@ public:
// test for existence
bool templateExists(const std::string& name);
+ typedef std::list<LLNotificationVisibilityRulePtr> VisibilityRuleList;
+
void forceResponse(const LLNotification::Params& params, S32 option);
void createDefaultChannels();
@@ -919,6 +933,8 @@ public:
void setIgnoreAllNotifications(bool ignore);
bool getIgnoreAllNotifications();
+ bool isVisibleByRules(LLNotificationPtr pNotification);
+
private:
// we're a singleton, so we don't have a public constructor
LLNotifications();
@@ -938,6 +954,8 @@ private:
bool addTemplate(const std::string& name, LLNotificationTemplatePtr theTemplate);
TemplateMap mTemplates;
+ VisibilityRuleList mVisibilityRules;
+
std::string mFileName;
LLNotificationMap mUniqueNotifications;
diff --git a/indra/llui/llnotificationtemplate.h b/indra/llui/llnotificationtemplate.h
index 6bc0d2aaff..eff572b553 100644
--- a/indra/llui/llnotificationtemplate.h
+++ b/indra/llui/llnotificationtemplate.h
@@ -74,11 +74,13 @@ struct LLNotificationTemplate
struct UniquenessContext : public LLInitParam::Block<UniquenessContext>
{
- Mandatory<std::string> key;
+ Mandatory<std::string> value;
UniquenessContext()
- : key("key")
- {}
+ : value("value")
+ {
+ addSynonym(value, "key");
+ }
};
@@ -88,7 +90,7 @@ struct LLNotificationTemplate
// this idiom allows
// <notification unique="true">
// as well as
- // <notification> <unique> <context key=""/> </unique>...
+ // <notification> <unique> <context></context> </unique>...
Optional<bool> dummy_val;
public:
Multiple<UniquenessContext> contexts;
@@ -156,6 +158,15 @@ struct LLNotificationTemplate
{}
};
+ struct Tag : public LLInitParam::Block<Tag>
+ {
+ Mandatory<std::string> value;
+
+ Tag()
+ : value("value")
+ {}
+ };
+
struct Params : public LLInitParam::Block<Params>
{
Mandatory<std::string> name;
@@ -173,6 +184,7 @@ struct LLNotificationTemplate
Optional<FormRef> form_ref;
Optional<ENotificationPriority,
NotificationPriorityValues> priority;
+ Multiple<Tag> tags;
Params()
@@ -189,7 +201,8 @@ struct LLNotificationTemplate
expire_option("expireOption", -1),
url("url"),
unique("unique"),
- form_ref("")
+ form_ref(""),
+ tags("tag")
{}
};
@@ -232,8 +245,8 @@ struct LLNotificationTemplate
// (used for things like progress indications, or repeating warnings
// like "the grid is going down in N minutes")
bool mUnique;
- // if we want to be unique only if a certain part of the payload is constant
- // specify the field names for the payload. The notification will only be
+ // if we want to be unique only if a certain part of the payload or substitutions args
+ // are constant specify the field names for the payload. The notification will only be
// combined if all of the fields named in the context are identical in the
// new and the old notification; otherwise, the notification will be
// duplicated. This is to support suppressing duplicate offers from the same
@@ -276,6 +289,8 @@ struct LLNotificationTemplate
// this is loaded as a name, but looked up to get the UUID upon template load.
// If null, it wasn't specified.
LLUUID mSoundEffect;
+ // List of tags that rules can match against.
+ std::list<std::string> mTags;
};
#endif //LL_LLNOTIFICATION_TEMPLATE_H
diff --git a/indra/llui/llnotificationvisibilityrule.h b/indra/llui/llnotificationvisibilityrule.h
new file mode 100644
index 0000000000..78bdec2a8f
--- /dev/null
+++ b/indra/llui/llnotificationvisibilityrule.h
@@ -0,0 +1,104 @@
+/**
+* @file llnotificationvisibility.h
+* @brief Rules for
+* @author Monroe
+*
+* $LicenseInfo:firstyear=2010&license=viewerlgpl$
+* Second Life Viewer Source Code
+* Copyright (C) 2010, Linden Research, Inc.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation;
+* version 2.1 of the License only.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+*
+* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+* $/LicenseInfo$
+*/
+
+#ifndef LL_LLNOTIFICATION_VISIBILITY_RULE_H
+#define LL_LLNOTIFICATION_VISIBILITY_RULE_H
+
+#include "llinitparam.h"
+//#include "llnotifications.h"
+
+
+
+// This is the class of object read from the XML file (notification_visibility.xml,
+// from the appropriate local language directory).
+struct LLNotificationVisibilityRule
+{
+ struct Filter : public LLInitParam::Block<Filter>
+ {
+ Optional<std::string> type,
+ tag,
+ name;
+
+ Filter()
+ : type("type"),
+ tag("tag"),
+ name("name")
+ {}
+ };
+
+ struct Respond : public LLInitParam::Block<Respond, Filter>
+ {
+ Mandatory<std::string> response;
+
+ Respond()
+ : response("response")
+ {}
+ };
+
+ struct Rule : public LLInitParam::Choice<Rule>
+ {
+ Alternative<Filter> show;
+ Alternative<Filter> hide;
+ Alternative<Respond> respond;
+
+ Rule()
+ : show("show"),
+ hide("hide"),
+ respond("respond")
+ {}
+ };
+
+ struct Rules : public LLInitParam::Block<Rules>
+ {
+ Multiple<Rule> rules;
+
+ Rules()
+ : rules("")
+ {}
+ };
+
+ LLNotificationVisibilityRule(const Rule& p);
+
+ // If true, this rule makes matching notifications visible. Otherwise, it makes them invisible.
+ bool mVisible;
+
+ // Which response to give when making a notification invisible. An empty string means the notification should be cancelled instead of responded to.
+ std::string mResponse;
+
+ // String to match against the notification's "type". An empty string matches all notifications.
+ std::string mType;
+
+ // String to match against the notification's tag(s). An empty string matches all notifications.
+ std::string mTag;
+
+ // String to match against the notification's name. An empty string matches all notifications.
+ std::string mName;
+
+};
+
+#endif //LL_LLNOTIFICATION_VISIBILITY_RULE_H
+
diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp
index ff377ba3a1..b2383106a8 100644
--- a/indra/llui/llpanel.cpp
+++ b/indra/llui/llpanel.cpp
@@ -436,7 +436,7 @@ void LLPanel::initFromParams(const LLPanel::Params& p)
//and LLView::initFromParams will use them to set visible and enabled
setVisible(p.visible);
setEnabled(p.enabled);
-
+ setFocusRoot(p.focus_root);
setSoundFlags(p.sound_flags);
// control_name, tab_stop, focus_lost_callback, initial_value, rect, enabled, visible
diff --git a/indra/llui/llprogressbar.cpp b/indra/llui/llprogressbar.cpp
index aaa328754d..ead22686bc 100644
--- a/indra/llui/llprogressbar.cpp
+++ b/indra/llui/llprogressbar.cpp
@@ -50,7 +50,7 @@ LLProgressBar::Params::Params()
LLProgressBar::LLProgressBar(const LLProgressBar::Params& p)
-: LLView(p),
+: LLUICtrl(p),
mImageBar(p.image_bar),
mImageFill(p.image_fill),
mColorBackground(p.color_bg()),
@@ -80,7 +80,7 @@ void LLProgressBar::draw()
mImageFill->draw(progress_rect, bar_color);
}
-void LLProgressBar::setPercent(const F32 percent)
+void LLProgressBar::setValue(const LLSD& value)
{
- mPercentDone = llclamp(percent, 0.f, 100.f);
+ mPercentDone = llclamp((F32)value.asReal(), 0.f, 100.f);
}
diff --git a/indra/llui/llprogressbar.h b/indra/llui/llprogressbar.h
index 13297f7493..3f308e7496 100644
--- a/indra/llui/llprogressbar.h
+++ b/indra/llui/llprogressbar.h
@@ -27,14 +27,14 @@
#ifndef LL_LLPROGRESSBAR_H
#define LL_LLPROGRESSBAR_H
-#include "llview.h"
+#include "lluictrl.h"
#include "llframetimer.h"
class LLProgressBar
- : public LLView
+ : public LLUICtrl
{
public:
- struct Params : public LLInitParam::Block<Params, LLView::Params>
+ struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
{
Optional<LLUIImage*> image_bar,
image_fill;
@@ -47,7 +47,7 @@ public:
LLProgressBar(const Params&);
virtual ~LLProgressBar();
- void setPercent(const F32 percent);
+ void setValue(const LLSD& value);
/*virtual*/ void draw();
diff --git a/indra/llui/llradiogroup.cpp b/indra/llui/llradiogroup.cpp
index cc348fdc63..6e9586369f 100644
--- a/indra/llui/llradiogroup.cpp
+++ b/indra/llui/llradiogroup.cpp
@@ -69,7 +69,7 @@ protected:
static LLWidgetNameRegistry::StaticRegistrar register_radio_item(&typeid(LLRadioGroup::ItemParams), "radio_item");
LLRadioGroup::Params::Params()
-: has_border("draw_border"),
+: allow_deselect("allow_deselect"),
items("item")
{
addSynonym(items, "radio_item");
@@ -85,18 +85,8 @@ LLRadioGroup::LLRadioGroup(const LLRadioGroup::Params& p)
: LLUICtrl(p),
mFont(p.font.isProvided() ? p.font() : LLFontGL::getFontSansSerifSmall()),
mSelectedIndex(-1),
- mHasBorder(p.has_border)
-{
- if (mHasBorder)
- {
- LLViewBorder::Params params;
- params.name("radio group border");
- params.rect(LLRect(0, getRect().getHeight(), getRect().getWidth(), 0));
- params.bevel_style(LLViewBorder::BEVEL_NONE);
- LLViewBorder * vb = LLUICtrlFactory::create<LLViewBorder> (params);
- addChild (vb);
- }
-}
+ mAllowDeselect(p.allow_deselect)
+{}
void LLRadioGroup::initFromParams(const Params& p)
{
@@ -184,7 +174,7 @@ void LLRadioGroup::setIndexEnabled(S32 index, BOOL enabled)
BOOL LLRadioGroup::setSelectedIndex(S32 index, BOOL from_event)
{
- if (index < 0 || (S32)mRadioButtons.size() <= index )
+ if ((S32)mRadioButtons.size() <= index )
{
return FALSE;
}
@@ -202,13 +192,16 @@ BOOL LLRadioGroup::setSelectedIndex(S32 index, BOOL from_event)
mSelectedIndex = index;
- LLRadioCtrl* radio_item = mRadioButtons[mSelectedIndex];
- radio_item->setTabStop(true);
- radio_item->setValue( TRUE );
-
- if (hasFocus())
+ if (mSelectedIndex >= 0)
{
- mRadioButtons[mSelectedIndex]->focusFirstItem(FALSE, FALSE);
+ LLRadioCtrl* radio_item = mRadioButtons[mSelectedIndex];
+ radio_item->setTabStop(true);
+ radio_item->setValue( TRUE );
+
+ if (hasFocus())
+ {
+ radio_item->focusFirstItem(FALSE, FALSE);
+ }
}
if (!from_event)
@@ -307,8 +300,15 @@ void LLRadioGroup::onClickButton(LLUICtrl* ctrl)
LLRadioCtrl* radio = *iter;
if (radio == clicked_radio)
{
- // llinfos << "clicked button " << index << llendl;
- setSelectedIndex(index);
+ if (index == mSelectedIndex && mAllowDeselect)
+ {
+ // don't select anything
+ setSelectedIndex(-1);
+ }
+ else
+ {
+ setSelectedIndex(index);
+ }
// BUG: Calls click callback even if button didn't actually change
onCommit();
diff --git a/indra/llui/llradiogroup.h b/indra/llui/llradiogroup.h
index 0588900600..8bd5698538 100644
--- a/indra/llui/llradiogroup.h
+++ b/indra/llui/llradiogroup.h
@@ -49,7 +49,7 @@ public:
struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
{
- Optional<bool> has_border;
+ Optional<bool> allow_deselect;
Multiple<ItemParams, AtLeast<1> > items;
Params();
};
@@ -73,7 +73,6 @@ public:
void setIndexEnabled(S32 index, BOOL enabled);
// return the index value of the selected item
S32 getSelectedIndex() const { return mSelectedIndex; }
-
// set the index value programatically
BOOL setSelectedIndex(S32 index, BOOL from_event = FALSE);
@@ -103,12 +102,13 @@ public:
/*virtual*/ BOOL operateOnAll(EOperation op);
private:
- const LLFontGL* mFont;
- S32 mSelectedIndex;
+ const LLFontGL* mFont;
+ S32 mSelectedIndex;
+
typedef std::vector<class LLRadioCtrl*> button_list_t;
- button_list_t mRadioButtons;
+ button_list_t mRadioButtons;
- BOOL mHasBorder;
+ bool mAllowDeselect; // user can click on an already selected option to deselect it
};
#endif
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index 8854f0a02e..b7848ec37c 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -322,6 +322,7 @@ LLScrollListCtrl::~LLScrollListCtrl()
delete mSortCallback;
std::for_each(mItemList.begin(), mItemList.end(), DeletePointer());
+ std::for_each(mColumns.begin(), mColumns.end(), DeletePairedPointer());
}
@@ -2371,10 +2372,10 @@ void LLScrollListCtrl::onScrollChange( S32 new_pos, LLScrollbar* scrollbar )
void LLScrollListCtrl::sortByColumn(const std::string& name, BOOL ascending)
{
- std::map<std::string, LLScrollListColumn>::iterator itor = mColumns.find(name);
+ column_map_t::iterator itor = mColumns.find(name);
if (itor != mColumns.end())
{
- sortByColumnIndex((*itor).second.mIndex, ascending);
+ sortByColumnIndex((*itor).second->mIndex, ascending);
}
}
@@ -2420,11 +2421,11 @@ void LLScrollListCtrl::dirtyColumns()
// just in case someone indexes into it immediately
mColumnsIndexed.resize(mColumns.size());
- std::map<std::string, LLScrollListColumn>::iterator column_itor;
+ column_map_t::iterator column_itor;
for (column_itor = mColumns.begin(); column_itor != mColumns.end(); ++column_itor)
{
- LLScrollListColumn *column = &column_itor->second;
- mColumnsIndexed[column_itor->second.mIndex] = column;
+ LLScrollListColumn *column = column_itor->second;
+ mColumnsIndexed[column_itor->second->mIndex] = column;
}
}
@@ -2582,8 +2583,8 @@ void LLScrollListCtrl::addColumn(const LLScrollListColumn::Params& column_params
if (mColumns.find(name) == mColumns.end())
{
// Add column
- mColumns[name] = LLScrollListColumn(column_params, this);
- LLScrollListColumn* new_column = &mColumns[name];
+ mColumns[name] = new LLScrollListColumn(column_params, this);
+ LLScrollListColumn* new_column = mColumns[name];
new_column->mIndex = mColumns.size()-1;
// Add button
@@ -2605,14 +2606,14 @@ void LLScrollListCtrl::addColumn(const LLScrollListColumn::Params& column_params
S32 top = mItemListRect.mTop;
S32 left = mItemListRect.mLeft;
- for (std::map<std::string, LLScrollListColumn>::iterator itor = mColumns.begin();
+ for (column_map_t::iterator itor = mColumns.begin();
itor != mColumns.end();
++itor)
{
- if (itor->second.mIndex < new_column->mIndex &&
- itor->second.getWidth() > 0)
+ if (itor->second->mIndex < new_column->mIndex &&
+ itor->second->getWidth() > 0)
{
- left += itor->second.getWidth() + mColumnPadding;
+ left += itor->second->getWidth() + mColumnPadding;
}
}
@@ -2668,8 +2669,8 @@ void LLScrollListCtrl::onClickColumn(void *userdata)
if (column->mSortingColumn != column->mName
&& parent->mColumns.find(column->mSortingColumn) != parent->mColumns.end())
{
- LLScrollListColumn& info_redir = parent->mColumns[column->mSortingColumn];
- column_index = info_redir.mIndex;
+ LLScrollListColumn* info_redir = parent->mColumns[column->mSortingColumn];
+ column_index = info_redir->mIndex;
}
// if this column is the primary sort key, reverse the direction
@@ -2702,16 +2703,17 @@ BOOL LLScrollListCtrl::hasSortOrder() const
void LLScrollListCtrl::clearColumns()
{
- std::map<std::string, LLScrollListColumn>::iterator itor;
+ column_map_t::iterator itor;
for (itor = mColumns.begin(); itor != mColumns.end(); ++itor)
{
- LLScrollColumnHeader *header = itor->second.mHeader;
+ LLScrollColumnHeader *header = itor->second->mHeader;
if (header)
{
removeChild(header);
delete header;
}
}
+ std::for_each(mColumns.begin(), mColumns.end(), DeletePairedPointer());
mColumns.clear();
mSortColumns.clear();
mTotalStaticColumnWidth = 0;
@@ -2745,7 +2747,7 @@ LLScrollListColumn* LLScrollListCtrl::getColumn(const std::string& name)
column_map_t::iterator column_itor = mColumns.find(name);
if (column_itor != mColumns.end())
{
- return &column_itor->second;
+ return column_itor->second;
}
return NULL;
}
@@ -2806,7 +2808,7 @@ LLScrollListItem* LLScrollListCtrl::addRow(LLScrollListItem *new_item, const LLS
new_column.width.pixel_width = cell_p.width;
}
addColumn(new_column);
- columnp = &mColumns[column];
+ columnp = mColumns[column];
new_item->setNumColumns(mColumns.size());
}
@@ -2843,7 +2845,7 @@ LLScrollListItem* LLScrollListCtrl::addRow(LLScrollListItem *new_item, const LLS
LLScrollListCell* cell = LLScrollListCell::create(LLScrollListCell::Params().value(item_p.value));
if (cell)
{
- LLScrollListColumn* columnp = &(mColumns.begin()->second);
+ LLScrollListColumn* columnp = mColumns.begin()->second;
new_item->setColumn(0, cell);
if (columnp->mHeader
@@ -2858,10 +2860,10 @@ LLScrollListItem* LLScrollListCtrl::addRow(LLScrollListItem *new_item, const LLS
// add dummy cells for missing columns
for (column_map_t::iterator column_it = mColumns.begin(); column_it != mColumns.end(); ++column_it)
{
- S32 column_idx = column_it->second.mIndex;
+ S32 column_idx = column_it->second->mIndex;
if (new_item->getColumn(column_idx) == NULL)
{
- LLScrollListColumn* column_ptr = &column_it->second;
+ LLScrollListColumn* column_ptr = column_it->second;
LLScrollListCell::Params cell_p;
cell_p.width = column_ptr->getWidth();
diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h
index 8a2f893ba2..09ab89960d 100644
--- a/indra/llui/llscrolllistctrl.h
+++ b/indra/llui/llscrolllistctrl.h
@@ -491,7 +491,7 @@ private:
mutable bool mSorted;
- typedef std::map<std::string, LLScrollListColumn> column_map_t;
+ typedef std::map<std::string, LLScrollListColumn*> column_map_t;
column_map_t mColumns;
BOOL mDirty;
diff --git a/indra/llui/llsdparam.cpp b/indra/llui/llsdparam.cpp
index f97f80ab6c..9ad13054cb 100644
--- a/indra/llui/llsdparam.cpp
+++ b/indra/llui/llsdparam.cpp
@@ -45,6 +45,7 @@ LLParamSDParser::LLParamSDParser()
if (sReadFuncs.empty())
{
+ registerParserFuncs<LLInitParam::NoParamValue>(readNoValue, &LLParamSDParser::writeNoValue);
registerParserFuncs<S32>(readS32, &LLParamSDParser::writeTypedValue<S32>);
registerParserFuncs<U32>(readU32, &LLParamSDParser::writeU32Param);
registerParserFuncs<F32>(readF32, &LLParamSDParser::writeTypedValue<F32>);
@@ -71,6 +72,18 @@ bool LLParamSDParser::writeU32Param(LLParamSDParser::parser_t& parser, const voi
return true;
}
+bool LLParamSDParser::writeNoValue(LLParamSDParser::parser_t& parser, const void* val_ptr, const parser_t::name_stack_t& name_stack)
+{
+ LLParamSDParser& sdparser = static_cast<LLParamSDParser&>(parser);
+ if (!sdparser.mWriteRootSD) return false;
+
+ LLSD* sd_to_write = sdparser.getSDWriteNode(name_stack);
+ if (!sd_to_write) return false;
+
+ return true;
+}
+
+
void LLParamSDParser::readSD(const LLSD& sd, LLInitParam::BaseBlock& block, bool silent)
{
mCurReadSD = NULL;
@@ -87,6 +100,8 @@ void LLParamSDParser::writeSD(LLSD& sd, const LLInitParam::BaseBlock& block)
block.serializeBlock(*this);
}
+const LLSD NO_VALUE_MARKER;
+
void LLParamSDParser::readSDValues(const LLSD& sd, LLInitParam::BaseBlock& block)
{
if (sd.isMap())
@@ -110,6 +125,11 @@ void LLParamSDParser::readSDValues(const LLSD& sd, LLInitParam::BaseBlock& block
readSDValues(*it, block);
}
}
+ else if (sd.isUndefined())
+ {
+ mCurReadSD = &NO_VALUE_MARKER;
+ block.submitValue(mNameStack, *this);
+ }
else
{
mCurReadSD = &sd;
@@ -206,6 +226,13 @@ LLSD* LLParamSDParser::getSDWriteNode(const parser_t::name_stack_t& name_stack)
return sd_to_write;
}
+bool LLParamSDParser::readNoValue(Parser& parser, void* val_ptr)
+{
+ LLParamSDParser& self = static_cast<LLParamSDParser&>(parser);
+ return self.mCurReadSD == &NO_VALUE_MARKER;
+}
+
+
bool LLParamSDParser::readS32(Parser& parser, void* val_ptr)
{
LLParamSDParser& self = static_cast<LLParamSDParser&>(parser);
diff --git a/indra/llui/llsdparam.h b/indra/llui/llsdparam.h
index 97e8b58e49..69dab2b411 100644
--- a/indra/llui/llsdparam.h
+++ b/indra/llui/llsdparam.h
@@ -63,7 +63,9 @@ private:
LLSD* getSDWriteNode(const parser_t::name_stack_t& name_stack);
static bool writeU32Param(Parser& parser, const void* value_ptr, const parser_t::name_stack_t& name_stack);
+ static bool writeNoValue(Parser& parser, const void* value_ptr, const parser_t::name_stack_t& name_stack);
+ static bool readNoValue(Parser& parser, void* val_ptr);
static bool readS32(Parser& parser, void* val_ptr);
static bool readU32(Parser& parser, void* val_ptr);
static bool readF32(Parser& parser, void* val_ptr);
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index 94bf716e7d..5a46c7c98e 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -277,6 +277,8 @@ LLTextEditor::LLTextEditor(const LLTextEditor::Params& p) :
mHPad += UI_TEXTEDITOR_LINE_NUMBER_MARGIN;
updateRects();
}
+
+ mParseOnTheFly = TRUE;
}
void LLTextEditor::initFromParams( const LLTextEditor::Params& p)
@@ -324,8 +326,10 @@ void LLTextEditor::setText(const LLStringExplicit &utf8str, const LLStyle::Param
blockUndo();
deselect();
-
+
+ mParseOnTheFly = FALSE;
LLTextBase::setText(utf8str, input_params);
+ mParseOnTheFly = TRUE;
resetDirty();
}
@@ -1367,6 +1371,7 @@ void LLTextEditor::pastePrimary()
// paste from primary (itsprimary==true) or clipboard (itsprimary==false)
void LLTextEditor::pasteHelper(bool is_primary)
{
+ mParseOnTheFly = FALSE;
bool can_paste_it;
if (is_primary)
{
@@ -1450,6 +1455,7 @@ void LLTextEditor::pasteHelper(bool is_primary)
deselect();
onKeyStroke();
+ mParseOnTheFly = TRUE;
}
@@ -2385,7 +2391,7 @@ void LLTextEditor::loadKeywords(const std::string& filename,
void LLTextEditor::updateSegments()
{
- if (mReflowIndex < S32_MAX && mKeywords.isLoaded())
+ if (mReflowIndex < S32_MAX && mKeywords.isLoaded() && mParseOnTheFly)
{
LLFastTimer ft(FTM_SYNTAX_HIGHLIGHTING);
// HACK: No non-ascii keywords for now
diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h
index 58ecefdccb..9e4b95003b 100644
--- a/indra/llui/lltexteditor.h
+++ b/indra/llui/lltexteditor.h
@@ -315,6 +315,7 @@ private:
BOOL mAllowEmbeddedItems;
bool mShowContextMenu;
+ bool mParseOnTheFly;
LLUUID mSourceID;
diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp
index 1e2fe09cd9..c300fe55d9 100644
--- a/indra/llui/llui.cpp
+++ b/indra/llui/llui.cpp
@@ -1596,23 +1596,25 @@ void LLUI::initClass(const settings_map_t& settings,
sWindow = NULL; // set later in startup
LLFontGL::sShadowColor = LLUIColorTable::instance().getColor("ColorDropShadow");
+ LLUICtrl::CommitCallbackRegistry::Registrar& reg = LLUICtrl::CommitCallbackRegistry::defaultRegistrar();
+
// Callbacks for associating controls with floater visibilty:
- LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("Floater.Toggle", boost::bind(&LLFloaterReg::toggleFloaterInstance, _2));
- LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("Floater.Show", boost::bind(&LLFloaterReg::showFloaterInstance, _2));
- LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("Floater.Hide", boost::bind(&LLFloaterReg::hideFloaterInstance, _2));
- LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("Floater.InitToVisibilityControl", boost::bind(&LLFloaterReg::initUICtrlToFloaterVisibilityControl, _1, _2));
+ reg.add("Floater.Toggle", boost::bind(&LLFloaterReg::toggleFloaterInstance, _2));
+ reg.add("Floater.Show", boost::bind(&LLFloaterReg::showFloaterInstance, _2));
+ reg.add("Floater.Hide", boost::bind(&LLFloaterReg::hideFloaterInstance, _2));
+ reg.add("Floater.InitToVisibilityControl", boost::bind(&LLFloaterReg::initUICtrlToFloaterVisibilityControl, _1, _2));
// Button initialization callback for toggle buttons
- LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("Button.SetFloaterToggle", boost::bind(&LLButton::setFloaterToggle, _1, _2));
+ reg.add("Button.SetFloaterToggle", boost::bind(&LLButton::setFloaterToggle, _1, _2));
// Button initialization callback for toggle buttons on dockale floaters
- LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("Button.SetDockableFloaterToggle", boost::bind(&LLButton::setDockableFloaterToggle, _1, _2));
+ reg.add("Button.SetDockableFloaterToggle", boost::bind(&LLButton::setDockableFloaterToggle, _1, _2));
// Display the help topic for the current context
- LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("Button.ShowHelp", boost::bind(&LLButton::showHelp, _1, _2));
+ reg.add("Button.ShowHelp", boost::bind(&LLButton::showHelp, _1, _2));
// Currently unused, but kept for reference:
- LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("Button.ToggleFloater", boost::bind(&LLButton::toggleFloaterAndSetToggleState, _1, _2));
+ reg.add("Button.ToggleFloater", boost::bind(&LLButton::toggleFloaterAndSetToggleState, _1, _2));
// Used by menus along with Floater.Toggle to display visibility as a checkmark
LLUICtrl::EnableCallbackRegistry::defaultRegistrar().add("Floater.Visible", boost::bind(&LLFloaterReg::floaterInstanceVisible, _2));
diff --git a/indra/llui/lluicolortable.cpp b/indra/llui/lluicolortable.cpp
index 0641f6d175..9455d09cc0 100644
--- a/indra/llui/lluicolortable.cpp
+++ b/indra/llui/lluicolortable.cpp
@@ -215,6 +215,12 @@ bool LLUIColorTable::loadFromSettings()
result |= loadFromFilename(current_filename, mLoadedColors);
}
+ current_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SKIN, "colors.xml");
+ if(current_filename != default_filename)
+ {
+ result |= loadFromFilename(current_filename, mLoadedColors);
+ }
+
std::string user_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "colors.xml");
loadFromFilename(user_filename, mUserSetColors);
diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp
index 7e4cb78d80..0a06b5e74f 100644
--- a/indra/llui/lluictrl.cpp
+++ b/indra/llui/lluictrl.cpp
@@ -827,7 +827,7 @@ LLUICtrl* LLUICtrl::findRootMostFocusRoot()
{
LLUICtrl* focus_root = NULL;
LLUICtrl* next_view = this;
- while(next_view)
+ while(next_view && next_view->hasTabStop())
{
if (next_view->isFocusRoot())
{
@@ -944,6 +944,10 @@ F32 LLUICtrl::getCurrentTransparency()
case TT_INACTIVE:
alpha = sInactiveControlTransparency;
break;
+
+ case TT_FADING:
+ alpha = sInactiveControlTransparency / 2;
+ break;
}
return alpha;
diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h
index a78f98ac76..b37e9f6b1b 100644
--- a/indra/llui/lluictrl.h
+++ b/indra/llui/lluictrl.h
@@ -123,8 +123,9 @@ public:
enum ETypeTransparency
{
TT_DEFAULT,
- TT_ACTIVE,
- TT_INACTIVE
+ TT_ACTIVE, // focused floater
+ TT_INACTIVE, // other floaters
+ TT_FADING, // fading toast
};
/*virtual*/ ~LLUICtrl();
diff --git a/indra/llui/lluistring.h b/indra/llui/lluistring.h
index 4faa0e070e..cb40c85582 100644
--- a/indra/llui/lluistring.h
+++ b/indra/llui/lluistring.h
@@ -61,7 +61,6 @@ public:
LLUIString() : mArgs(NULL), mNeedsResult(false), mNeedsWResult(false) {}
LLUIString(const std::string& instring, const LLStringUtil::format_map_t& args);
LLUIString(const std::string& instring) : mArgs(NULL) { assign(instring); }
-
~LLUIString() { delete mArgs; }
void assign(const std::string& instring);
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp
index 6cc72bad82..4f7b4be526 100644
--- a/indra/llui/llurlentry.cpp
+++ b/indra/llui/llurlentry.cpp
@@ -27,6 +27,7 @@
#include "linden_common.h"
#include "llurlentry.h"
+#include "lluictrl.h"
#include "lluri.h"
#include "llurlmatch.h"
#include "llurlregistry.h"
@@ -167,6 +168,15 @@ void LLUrlEntryBase::callObservers(const std::string &id,
}
}
+/// is this a match for a URL that should not be hyperlinked?
+bool LLUrlEntryBase::isLinkDisabled() const
+{
+ // this allows us to have a global setting to turn off text hyperlink highlighting/action
+ bool globally_disabled = LLUI::sSettingGroups["config"]->getBOOL("DisableTextHyperlinkActions");
+
+ return globally_disabled;
+}
+
static std::string getStringAfterToken(const std::string str, const std::string token)
{
size_t pos = str.find(token);
@@ -456,8 +466,8 @@ std::string LLUrlEntryAgent::getLabel(const std::string &url, const LLUrlLabelCa
LLStyle::Params LLUrlEntryAgent::getStyle() const
{
LLStyle::Params style_params = LLUrlEntryBase::getStyle();
- style_params.color = LLUIColorTable::instance().getColor("AgentLinkColor");
- style_params.readonly_color = LLUIColorTable::instance().getColor("AgentLinkColor");
+ style_params.color = LLUIColorTable::instance().getColor("HTMLLinkColor");
+ style_params.readonly_color = LLUIColorTable::instance().getColor("HTMLLinkColor");
return style_params;
}
@@ -796,6 +806,69 @@ std::string LLUrlEntryPlace::getLocation(const std::string &url) const
}
//
+// LLUrlEntryRegion Describes secondlife:///app/region/REGION_NAME/X/Y/Z URLs, e.g.
+// secondlife:///app/region/Ahern/128/128/0
+//
+LLUrlEntryRegion::LLUrlEntryRegion()
+{
+ mPattern = boost::regex("secondlife:///app/region/[^/\\s]+(/\\d+)?(/\\d+)?(/\\d+)?/?",
+ boost::regex::perl|boost::regex::icase);
+ mMenuName = "menu_url_slurl.xml";
+ mTooltip = LLTrans::getString("TooltipSLURL");
+}
+
+std::string LLUrlEntryRegion::getLabel(const std::string &url, const LLUrlLabelCallback &cb)
+{
+ //
+ // we handle SLURLs in the following formats:
+ // - secondlife:///app/region/Place/X/Y/Z
+ // - secondlife:///app/region/Place/X/Y
+ // - secondlife:///app/region/Place/X
+ // - secondlife:///app/region/Place
+ //
+
+ LLSD path_array = LLURI(url).pathArray();
+ S32 path_parts = path_array.size();
+
+ if (path_parts < 3) // no region name
+ {
+ llwarns << "Failed to parse url [" << url << "]" << llendl;
+ return url;
+ }
+
+ std::string label = unescapeUrl(path_array[2]); // region name
+
+ if (path_parts > 3) // secondlife:///app/region/Place/X
+ {
+ std::string x = path_array[3];
+ label += " (" + x;
+
+ if (path_parts > 4) // secondlife:///app/region/Place/X/Y
+ {
+ std::string y = path_array[4];
+ label += "," + y;
+
+ if (path_parts > 5) // secondlife:///app/region/Place/X/Y/Z
+ {
+ std::string z = path_array[5];
+ label = label + "," + z;
+ }
+ }
+
+ label += ")";
+ }
+
+ return label;
+}
+
+std::string LLUrlEntryRegion::getLocation(const std::string &url) const
+{
+ LLSD path_array = LLURI(url).pathArray();
+ std::string region_name = unescapeUrl(path_array[2]);
+ return region_name;
+}
+
+//
// LLUrlEntryTeleport Describes a Second Life teleport Url, e.g.,
// secondlife:///app/teleport/Ahern/50/50/50/
// x-grid-location-info://lincoln.lindenlab.com/app/teleport/Ahern/50/50/50/
diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h
index 1a16056041..1791739061 100644
--- a/indra/llui/llurlentry.h
+++ b/indra/llui/llurlentry.h
@@ -94,6 +94,8 @@ public:
virtual LLUUID getID(const std::string &string) const { return LLUUID::null; }
+ bool isLinkDisabled() const;
+
protected:
std::string getIDStringFromUrl(const std::string &url) const;
std::string escapeUrl(const std::string &url) const;
@@ -300,6 +302,18 @@ public:
};
///
+/// LLUrlEntryRegion Describes a Second Life location Url, e.g.,
+/// secondlife:///app/region/Ahern/128/128/0
+///
+class LLUrlEntryRegion : public LLUrlEntryBase
+{
+public:
+ LLUrlEntryRegion();
+ /*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb);
+ /*virtual*/ std::string getLocation(const std::string &url) const;
+};
+
+///
/// LLUrlEntryTeleport Describes a Second Life teleport Url, e.g.,
/// secondlife:///app/teleport/Ahern/50/50/50/
///
diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp
index 478b412d5e..523ee5d78c 100644
--- a/indra/llui/llurlregistry.cpp
+++ b/indra/llui/llurlregistry.cpp
@@ -54,6 +54,7 @@ LLUrlRegistry::LLUrlRegistry()
registerUrl(new LLUrlEntryGroup());
registerUrl(new LLUrlEntryParcel());
registerUrl(new LLUrlEntryTeleport());
+ registerUrl(new LLUrlEntryRegion());
registerUrl(new LLUrlEntryWorldMap());
registerUrl(new LLUrlEntryObjectIM());
registerUrl(new LLUrlEntryPlace());
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index 3fa86bf0ca..267640a226 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -102,6 +102,7 @@ LLView::Params::Params()
left_pad("left_pad"),
left_delta("left_delta", S32_MAX),
from_xui("from_xui", false),
+ focus_root("focus_root", false),
needs_translate("translate"),
xmlns("xmlns"),
xmlns_xsi("xmlns:xsi"),
@@ -117,7 +118,7 @@ LLView::LLView(const LLView::Params& p)
mParentView(NULL),
mReshapeFlags(FOLLOWS_NONE),
mFromXUI(p.from_xui),
- mIsFocusRoot(FALSE),
+ mIsFocusRoot(p.focus_root),
mLastVisible(FALSE),
mNextInsertionOrdinal(0),
mHoverCursor(getCursorFromString(p.hover_cursor)),
@@ -163,8 +164,6 @@ LLView::~LLView()
if (mDefaultWidgets)
{
- std::for_each(mDefaultWidgets->begin(), mDefaultWidgets->end(),
- DeletePairedPointer());
delete mDefaultWidgets;
mDefaultWidgets = NULL;
}
@@ -1682,18 +1681,7 @@ BOOL LLView::hasChild(const std::string& childname, BOOL recurse) const
//-----------------------------------------------------------------------------
LLView* LLView::getChildView(const std::string& name, BOOL recurse) const
{
- LLView* child = findChildView(name, recurse);
- if (!child)
- {
- child = getDefaultWidget<LLView>(name);
- if (!child)
- {
- LLView::Params view_params;
- view_params.name = name;
- child = LLUICtrlFactory::create<LLView>(view_params);
- }
- }
- return child;
+ return getChild<LLView>(name, recurse);
}
static LLFastTimer::DeclareTimer FTM_FIND_VIEWS("Find Widgets");
@@ -2804,11 +2792,14 @@ LLView::root_to_view_iterator_t LLView::endRootToView()
// only create maps on demand, as they incur heap allocation/deallocation cost
// when a view is constructed/deconstructed
-LLView::default_widget_map_t& LLView::getDefaultWidgetMap() const
+LLView& LLView::getDefaultWidgetContainer() const
{
if (!mDefaultWidgets)
{
- mDefaultWidgets = new default_widget_map_t();
+ LLView::Params p;
+ p.name = "default widget container";
+ p.visible = false; // ensures default widgets can't steal focus, etc.
+ mDefaultWidgets = new LLView(p);
}
return *mDefaultWidgets;
}
diff --git a/indra/llui/llview.h b/indra/llui/llview.h
index 33d345beff..d2bbd663b8 100644
--- a/indra/llui/llview.h
+++ b/indra/llui/llview.h
@@ -116,7 +116,8 @@ public:
visible,
mouse_opaque,
use_bounding_rect,
- from_xui;
+ from_xui,
+ focus_root;
Optional<S32> tab_group,
default_tab_group;
@@ -412,14 +413,9 @@ public:
LLControlVariable *findControl(const std::string& name);
- // Moved setValue(), getValue(), setControlValue(), setControlName(),
- // controlListener() to LLUICtrl because an LLView is NOT assumed to
- // contain a value. If that's what you want, use LLUICtrl instead.
-// virtual bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata);
-
const child_list_t* getChildList() const { return &mChildList; }
- const child_list_const_iter_t beginChild() { return mChildList.begin(); }
- const child_list_const_iter_t endChild() { return mChildList.end(); }
+ child_list_const_iter_t beginChild() const { return mChildList.begin(); }
+ child_list_const_iter_t endChild() const { return mChildList.end(); }
// LLMouseHandler functions
// Default behavior is to pass events to children
@@ -466,12 +462,8 @@ public:
template <class T> T* getDefaultWidget(const std::string& name) const
{
- default_widget_map_t::const_iterator found_it = getDefaultWidgetMap().find(name);
- if (found_it == getDefaultWidgetMap().end())
- {
- return NULL;
- }
- return dynamic_cast<T*>(found_it->second);
+ LLView* widgetp = getDefaultWidgetContainer().findChildView(name);
+ return dynamic_cast<T*>(widgetp);
}
//////////////////////////////////////////////
@@ -585,9 +577,9 @@ private:
typedef std::map<std::string, LLView*> default_widget_map_t;
// allocate this map no demand, as it is rarely needed
- mutable default_widget_map_t* mDefaultWidgets;
+ mutable LLView* mDefaultWidgets;
- default_widget_map_t& getDefaultWidgetMap() const;
+ LLView& getDefaultWidgetContainer() const;
public:
// Depth in view hierarchy during rendering
@@ -654,7 +646,7 @@ template <class T> T* LLView::getChild(const std::string& name, BOOL recurse) co
return NULL;
}
- getDefaultWidgetMap()[name] = result;
+ getDefaultWidgetContainer().addChild(result);
}
}
return result;
diff --git a/indra/llui/llwindowshade.cpp b/indra/llui/llwindowshade.cpp
new file mode 100644
index 0000000000..77e94385d4
--- /dev/null
+++ b/indra/llui/llwindowshade.cpp
@@ -0,0 +1,328 @@
+/**
+ * @file LLWindowShade.cpp
+ * @brief Notification dialog that slides down and optionally disabled a piece of UI
+ *
+ * $LicenseInfo:firstyear=2006&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "linden_common.h"
+#include "llwindowshade.h"
+
+#include "lllayoutstack.h"
+#include "lltextbox.h"
+#include "lliconctrl.h"
+#include "llbutton.h"
+#include "llcheckboxctrl.h"
+#include "lllineeditor.h"
+
+const S32 MIN_NOTIFICATION_AREA_HEIGHT = 30;
+const S32 MAX_NOTIFICATION_AREA_HEIGHT = 100;
+
+LLWindowShade::Params::Params()
+: bg_image("bg_image"),
+ modal("modal", false),
+ text_color("text_color"),
+ can_close("can_close", true)
+{
+ mouse_opaque = false;
+}
+
+LLWindowShade::LLWindowShade(const LLWindowShade::Params& params)
+: LLUICtrl(params),
+ mNotification(params.notification),
+ mModal(params.modal),
+ mFormHeight(0),
+ mTextColor(params.text_color)
+{
+ setFocusRoot(true);
+}
+
+void LLWindowShade::initFromParams(const LLWindowShade::Params& params)
+{
+ LLUICtrl::initFromParams(params);
+
+ LLLayoutStack::Params layout_p;
+ layout_p.name = "notification_stack";
+ layout_p.rect = params.rect;
+ layout_p.follows.flags = FOLLOWS_ALL;
+ layout_p.mouse_opaque = false;
+ layout_p.orientation = LLLayoutStack::VERTICAL;
+ layout_p.border_size = 0;
+
+ LLLayoutStack* stackp = LLUICtrlFactory::create<LLLayoutStack>(layout_p);
+ addChild(stackp);
+
+ LLLayoutPanel::Params panel_p;
+ panel_p.rect = LLRect(0, 30, 800, 0);
+ panel_p.name = "notification_area";
+ panel_p.visible = false;
+ panel_p.user_resize = false;
+ panel_p.background_visible = true;
+ panel_p.bg_alpha_image = params.bg_image;
+ panel_p.auto_resize = false;
+ LLLayoutPanel* notification_panel = LLUICtrlFactory::create<LLLayoutPanel>(panel_p);
+ stackp->addChild(notification_panel);
+
+ panel_p = LLUICtrlFactory::getDefaultParams<LLLayoutPanel>();
+ panel_p.auto_resize = true;
+ panel_p.user_resize = false;
+ panel_p.rect = params.rect;
+ panel_p.name = "background_area";
+ panel_p.mouse_opaque = false;
+ panel_p.background_visible = false;
+ panel_p.bg_alpha_color = LLColor4(0.f, 0.f, 0.f, 0.2f);
+ LLLayoutPanel* dummy_panel = LLUICtrlFactory::create<LLLayoutPanel>(panel_p);
+ stackp->addChild(dummy_panel);
+
+ layout_p = LLUICtrlFactory::getDefaultParams<LLLayoutStack>();
+ layout_p.rect = LLRect(0, 30, 800, 0);
+ layout_p.follows.flags = FOLLOWS_ALL;
+ layout_p.orientation = LLLayoutStack::HORIZONTAL;
+ stackp = LLUICtrlFactory::create<LLLayoutStack>(layout_p);
+ notification_panel->addChild(stackp);
+
+ panel_p = LLUICtrlFactory::getDefaultParams<LLLayoutPanel>();
+ panel_p.rect.height = 30;
+ LLLayoutPanel* panel = LLUICtrlFactory::create<LLLayoutPanel>(panel_p);
+ stackp->addChild(panel);
+
+ LLIconCtrl::Params icon_p;
+ icon_p.name = "notification_icon";
+ icon_p.rect = LLRect(5, 23, 21, 8);
+ panel->addChild(LLUICtrlFactory::create<LLIconCtrl>(icon_p));
+
+ LLTextBox::Params text_p;
+ text_p.rect = LLRect(31, 20, panel->getRect().getWidth() - 5, 0);
+ text_p.follows.flags = FOLLOWS_ALL;
+ text_p.text_color = mTextColor;
+ text_p.font = LLFontGL::getFontSansSerifSmall();
+ text_p.font.style = "BOLD";
+ text_p.name = "notification_text";
+ text_p.use_ellipses = true;
+ text_p.wrap = true;
+ panel->addChild(LLUICtrlFactory::create<LLTextBox>(text_p));
+
+ panel_p = LLUICtrlFactory::getDefaultParams<LLLayoutPanel>();
+ panel_p.auto_resize = false;
+ panel_p.user_resize = false;
+ panel_p.name="form_elements";
+ panel_p.rect = LLRect(0, 30, 130, 0);
+ LLLayoutPanel* form_elements_panel = LLUICtrlFactory::create<LLLayoutPanel>(panel_p);
+ stackp->addChild(form_elements_panel);
+
+ if (params.can_close)
+ {
+ panel_p = LLUICtrlFactory::getDefaultParams<LLLayoutPanel>();
+ panel_p.auto_resize = false;
+ panel_p.user_resize = false;
+ panel_p.rect = LLRect(0, 30, 25, 0);
+ LLLayoutPanel* close_panel = LLUICtrlFactory::create<LLLayoutPanel>(panel_p);
+ stackp->addChild(close_panel);
+
+ LLButton::Params button_p;
+ button_p.name = "close_notification";
+ button_p.rect = LLRect(5, 23, 21, 7);
+ button_p.image_color.control="DkGray_66";
+ button_p.image_unselected.name="Icon_Close_Foreground";
+ button_p.image_selected.name="Icon_Close_Press";
+ button_p.click_callback.function = boost::bind(&LLWindowShade::onCloseNotification, this);
+
+ close_panel->addChild(LLUICtrlFactory::create<LLButton>(button_p));
+ }
+
+ LLSD payload = mNotification->getPayload();
+
+ LLNotificationFormPtr formp = mNotification->getForm();
+ LLLayoutPanel& notification_area = getChildRef<LLLayoutPanel>("notification_area");
+ notification_area.getChild<LLUICtrl>("notification_icon")->setValue(mNotification->getIcon());
+ notification_area.getChild<LLUICtrl>("notification_text")->setValue(mNotification->getMessage());
+ notification_area.getChild<LLUICtrl>("notification_text")->setToolTip(mNotification->getMessage());
+
+ LLNotificationForm::EIgnoreType ignore_type = formp->getIgnoreType();
+ LLLayoutPanel& form_elements = notification_area.getChildRef<LLLayoutPanel>("form_elements");
+ form_elements.deleteAllChildren();
+
+ const S32 FORM_PADDING_HORIZONTAL = 10;
+ const S32 FORM_PADDING_VERTICAL = 3;
+ const S32 WIDGET_HEIGHT = 24;
+ const S32 LINE_EDITOR_WIDTH = 120;
+ S32 cur_x = FORM_PADDING_HORIZONTAL;
+ S32 cur_y = FORM_PADDING_VERTICAL + WIDGET_HEIGHT;
+ S32 form_width = cur_x;
+
+ if (ignore_type != LLNotificationForm::IGNORE_NO)
+ {
+ LLCheckBoxCtrl::Params checkbox_p;
+ checkbox_p.name = "ignore_check";
+ checkbox_p.rect = LLRect(cur_x, cur_y, cur_x, cur_y - WIDGET_HEIGHT);
+ checkbox_p.label = formp->getIgnoreMessage();
+ checkbox_p.label_text.text_color = LLColor4::black;
+ checkbox_p.commit_callback.function = boost::bind(&LLWindowShade::onClickIgnore, this, _1);
+ checkbox_p.initial_value = formp->getIgnored();
+
+ LLCheckBoxCtrl* check = LLUICtrlFactory::create<LLCheckBoxCtrl>(checkbox_p);
+ check->setRect(check->getBoundingRect());
+ form_elements.addChild(check);
+ cur_x = check->getRect().mRight + FORM_PADDING_HORIZONTAL;
+ form_width = llmax(form_width, cur_x);
+ }
+
+ for (S32 i = 0; i < formp->getNumElements(); i++)
+ {
+ LLSD form_element = formp->getElement(i);
+ std::string type = form_element["type"].asString();
+ if (type == "button")
+ {
+ LLButton::Params button_p;
+ button_p.name = form_element["name"];
+ button_p.label = form_element["text"];
+ button_p.rect = LLRect(cur_x, cur_y, cur_x, cur_y - WIDGET_HEIGHT);
+ button_p.click_callback.function = boost::bind(&LLWindowShade::onClickNotificationButton, this, form_element["name"].asString());
+ button_p.auto_resize = true;
+
+ LLButton* button = LLUICtrlFactory::create<LLButton>(button_p);
+ button->autoResize();
+ form_elements.addChild(button);
+
+ if (form_element["default"].asBoolean())
+ {
+ form_elements.setDefaultBtn(button);
+ }
+
+ cur_x = button->getRect().mRight + FORM_PADDING_HORIZONTAL;
+ form_width = llmax(form_width, cur_x);
+ }
+ else if (type == "text" || type == "password")
+ {
+ // if not at beginning of line...
+ if (cur_x != FORM_PADDING_HORIZONTAL)
+ {
+ // start new line
+ cur_x = FORM_PADDING_HORIZONTAL;
+ cur_y -= WIDGET_HEIGHT + FORM_PADDING_VERTICAL;
+ }
+ LLTextBox::Params label_p;
+ label_p.name = form_element["name"].asString() + "_label";
+ label_p.rect = LLRect(cur_x, cur_y, cur_x + LINE_EDITOR_WIDTH, cur_y - WIDGET_HEIGHT);
+ label_p.initial_value = form_element["text"];
+ label_p.text_color = mTextColor;
+ label_p.font_valign = LLFontGL::VCENTER;
+ label_p.v_pad = 5;
+ LLTextBox* textbox = LLUICtrlFactory::create<LLTextBox>(label_p);
+ textbox->reshapeToFitText();
+ textbox->reshape(textbox->getRect().getWidth(), form_elements.getRect().getHeight() - 2 * FORM_PADDING_VERTICAL);
+ form_elements.addChild(textbox);
+ cur_x = textbox->getRect().mRight + FORM_PADDING_HORIZONTAL;
+
+ LLLineEditor::Params line_p;
+ line_p.name = form_element["name"];
+ line_p.keystroke_callback = boost::bind(&LLWindowShade::onEnterNotificationText, this, _1, form_element["name"].asString());
+ line_p.is_password = type == "password";
+ line_p.rect = LLRect(cur_x, cur_y, cur_x + LINE_EDITOR_WIDTH, cur_y - WIDGET_HEIGHT);
+
+ LLLineEditor* line_editor = LLUICtrlFactory::create<LLLineEditor>(line_p);
+ form_elements.addChild(line_editor);
+ form_width = llmax(form_width, cur_x + LINE_EDITOR_WIDTH + FORM_PADDING_HORIZONTAL);
+
+ // reset to start of next line
+ cur_x = FORM_PADDING_HORIZONTAL;
+ cur_y -= WIDGET_HEIGHT + FORM_PADDING_VERTICAL;
+ }
+ }
+
+ mFormHeight = form_elements.getRect().getHeight() - (cur_y - FORM_PADDING_VERTICAL) + WIDGET_HEIGHT;
+ form_elements.reshape(form_width, mFormHeight);
+ form_elements.setMinDim(form_width);
+
+ // move all form elements back onto form surface
+ S32 delta_y = WIDGET_HEIGHT + FORM_PADDING_VERTICAL - cur_y;
+ for (child_list_const_iter_t it = form_elements.getChildList()->begin(), end_it = form_elements.getChildList()->end();
+ it != end_it;
+ ++it)
+ {
+ (*it)->translate(0, delta_y);
+ }
+}
+
+void LLWindowShade::show()
+{
+ getChildRef<LLLayoutPanel>("notification_area").setVisible(true);
+ getChildRef<LLLayoutPanel>("background_area").setBackgroundVisible(mModal);
+
+ setMouseOpaque(mModal);
+}
+
+void LLWindowShade::draw()
+{
+ LLRect message_rect = getChild<LLTextBox>("notification_text")->getTextBoundingRect();
+
+ LLLayoutPanel* notification_area = getChild<LLLayoutPanel>("notification_area");
+
+ notification_area->reshape(notification_area->getRect().getWidth(),
+ llclamp(message_rect.getHeight() + 10,
+ llmin(mFormHeight, MAX_NOTIFICATION_AREA_HEIGHT),
+ MAX_NOTIFICATION_AREA_HEIGHT));
+
+ LLUICtrl::draw();
+ if (mNotification && !mNotification->isActive())
+ {
+ hide();
+ }
+}
+
+void LLWindowShade::hide()
+{
+ getChildRef<LLLayoutPanel>("notification_area").setVisible(false);
+ getChildRef<LLLayoutPanel>("background_area").setBackgroundVisible(false);
+
+ setMouseOpaque(false);
+}
+
+void LLWindowShade::onCloseNotification()
+{
+ LLNotifications::instance().cancel(mNotification);
+}
+
+void LLWindowShade::onClickIgnore(LLUICtrl* ctrl)
+{
+ bool check = ctrl->getValue().asBoolean();
+ if (mNotification && mNotification->getForm()->getIgnoreType() == LLNotificationForm::IGNORE_SHOW_AGAIN)
+ {
+ // question was "show again" so invert value to get "ignore"
+ check = !check;
+ }
+ mNotification->setIgnored(check);
+}
+
+void LLWindowShade::onClickNotificationButton(const std::string& name)
+{
+ if (!mNotification) return;
+
+ mNotificationResponse[name] = true;
+
+ mNotification->respond(mNotificationResponse);
+}
+
+void LLWindowShade::onEnterNotificationText(LLUICtrl* ctrl, const std::string& name)
+{
+ mNotificationResponse[name] = ctrl->getValue().asString();
+}
diff --git a/indra/llui/llwindowshade.h b/indra/llui/llwindowshade.h
new file mode 100644
index 0000000000..0047195929
--- /dev/null
+++ b/indra/llui/llwindowshade.h
@@ -0,0 +1,69 @@
+/**
+ * @file llwindowshade.h
+ * @brief Notification dialog that slides down and optionally disabled a piece of UI
+ *
+ * $LicenseInfo:firstyear=2006&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLWINDOWSHADE_H
+#define LL_LLWINDOWSHADE_H
+
+#include "lluictrl.h"
+#include "llnotifications.h"
+
+class LLWindowShade : public LLUICtrl
+{
+public:
+ struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
+ {
+ Mandatory<LLNotificationPtr> notification;
+ Optional<LLUIImage*> bg_image;
+ Optional<LLUIColor> text_color;
+ Optional<bool> modal,
+ can_close;
+
+ Params();
+ };
+
+ void show();
+ /*virtual*/ void draw();
+ void hide();
+
+private:
+ friend class LLUICtrlFactory;
+
+ LLWindowShade(const Params& p);
+ void initFromParams(const Params& params);
+
+ void onCloseNotification();
+ void onClickNotificationButton(const std::string& name);
+ void onEnterNotificationText(LLUICtrl* ctrl, const std::string& name);
+ void onClickIgnore(LLUICtrl* ctrl);
+
+ LLNotificationPtr mNotification;
+ LLSD mNotificationResponse;
+ bool mModal;
+ S32 mFormHeight;
+ LLUIColor mTextColor;
+};
+
+#endif // LL_LLWINDOWSHADE_H
diff --git a/indra/llui/tests/llurlentry_test.cpp b/indra/llui/tests/llurlentry_test.cpp
index 5c6623da61..8f0a48018f 100644
--- a/indra/llui/tests/llurlentry_test.cpp
+++ b/indra/llui/tests/llurlentry_test.cpp
@@ -27,6 +27,7 @@
#include "linden_common.h"
#include "../llurlentry.h"
+#include "../lluictrl.h"
#include "llurlentry_stub.cpp"
#include "lltut.h"
#include "../lluicolortable.h"
@@ -34,6 +35,14 @@
#include <boost/regex.hpp>
+typedef std::map<std::string, LLControlGroup*> settings_map_t;
+settings_map_t LLUI::sSettingGroups;
+
+BOOL LLControlGroup::getBOOL(const std::string& name)
+{
+ return false;
+}
+
LLUIColor LLUIColorTable::getColor(const std::string& name, const LLColor4& default_color) const
{
return LLUIColor();
@@ -94,6 +103,45 @@ namespace tut
ensure_equals(testname, url, expected);
}
+ void dummyCallback(const std::string &url, const std::string &label, const std::string& icon)
+ {
+ }
+
+ void testLabel(const std::string &testname, LLUrlEntryBase &entry,
+ const char *text, const std::string &expected)
+ {
+ boost::regex regex = entry.getPattern();
+ std::string label = "";
+ boost::cmatch result;
+ bool found = boost::regex_search(text, result, regex);
+ if (found)
+ {
+ S32 start = static_cast<U32>(result[0].first - text);
+ S32 end = static_cast<U32>(result[0].second - text);
+ std::string url = std::string(text+start, end-start);
+ label = entry.getLabel(url, boost::bind(dummyCallback, _1, _2, _3));
+ }
+ ensure_equals(testname, label, expected);
+ }
+
+ void testLocation(const std::string &testname, LLUrlEntryBase &entry,
+ const char *text, const std::string &expected)
+ {
+ boost::regex regex = entry.getPattern();
+ std::string location = "";
+ boost::cmatch result;
+ bool found = boost::regex_search(text, result, regex);
+ if (found)
+ {
+ S32 start = static_cast<U32>(result[0].first - text);
+ S32 end = static_cast<U32>(result[0].second - text);
+ std::string url = std::string(text+start, end-start);
+ location = entry.getLocation(url);
+ }
+ ensure_equals(testname, location, expected);
+ }
+
+
template<> template<>
void object::test<1>()
{
@@ -688,4 +736,114 @@ namespace tut
"<nolink>My Object</nolink>",
"My Object");
}
+
+ template<> template<>
+ void object::test<13>()
+ {
+ //
+ // test LLUrlEntryRegion - secondlife:///app/region/<location> URLs
+ //
+ LLUrlEntryRegion url;
+
+ // Regex tests.
+ testRegex("no valid region", url,
+ "secondlife:///app/region/",
+ "");
+
+ testRegex("invalid coords", url,
+ "secondlife:///app/region/Korea2/a/b/c",
+ "secondlife:///app/region/Korea2/"); // don't count invalid coords
+
+ testRegex("Ahern (50,50,50) [1]", url,
+ "secondlife:///app/region/Ahern/50/50/50/",
+ "secondlife:///app/region/Ahern/50/50/50/");
+
+ testRegex("Ahern (50,50,50) [2]", url,
+ "XXX secondlife:///app/region/Ahern/50/50/50/ XXX",
+ "secondlife:///app/region/Ahern/50/50/50/");
+
+ testRegex("Ahern (50,50,50) [3]", url,
+ "XXX secondlife:///app/region/Ahern/50/50/50 XXX",
+ "secondlife:///app/region/Ahern/50/50/50");
+
+ testRegex("Ahern (50,50,50) multicase", url,
+ "XXX secondlife:///app/region/Ahern/50/50/50/ XXX",
+ "secondlife:///app/region/Ahern/50/50/50/");
+
+ testRegex("Ahern (50,50) [1]", url,
+ "XXX secondlife:///app/region/Ahern/50/50/ XXX",
+ "secondlife:///app/region/Ahern/50/50/");
+
+ testRegex("Ahern (50,50) [2]", url,
+ "XXX secondlife:///app/region/Ahern/50/50 XXX",
+ "secondlife:///app/region/Ahern/50/50");
+
+ // DEV-21577: In-world SLURLs containing "(" or ")" are not treated as a hyperlink in chat
+ testRegex("Region with brackets", url,
+ "XXX secondlife:///app/region/Burning%20Life%20(Hyper)/27/210/30 XXX",
+ "secondlife:///app/region/Burning%20Life%20(Hyper)/27/210/30");
+
+ // DEV-35459: SLURLs and teleport Links not parsed properly
+ testRegex("Region with quote", url,
+ "XXX secondlife:///app/region/A'ksha%20Oasis/41/166/701 XXX",
+ "secondlife:///app/region/A%27ksha%20Oasis/41/166/701");
+
+ // Rendering tests.
+ testLabel("Render /app/region/Ahern/50/50/50/", url,
+ "secondlife:///app/region/Ahern/50/50/50/",
+ "Ahern (50,50,50)");
+
+ testLabel("Render /app/region/Ahern/50/50/50", url,
+ "secondlife:///app/region/Ahern/50/50/50",
+ "Ahern (50,50,50)");
+
+ testLabel("Render /app/region/Ahern/50/50/", url,
+ "secondlife:///app/region/Ahern/50/50/",
+ "Ahern (50,50)");
+
+ testLabel("Render /app/region/Ahern/50/50", url,
+ "secondlife:///app/region/Ahern/50/50",
+ "Ahern (50,50)");
+
+ testLabel("Render /app/region/Ahern/50/", url,
+ "secondlife:///app/region/Ahern/50/",
+ "Ahern (50)");
+
+ testLabel("Render /app/region/Ahern/50", url,
+ "secondlife:///app/region/Ahern/50",
+ "Ahern (50)");
+
+ testLabel("Render /app/region/Ahern/", url,
+ "secondlife:///app/region/Ahern/",
+ "Ahern");
+
+ testLabel("Render /app/region/Ahern/ within context", url,
+ "XXX secondlife:///app/region/Ahern/ XXX",
+ "Ahern");
+
+ testLabel("Render /app/region/Ahern", url,
+ "secondlife:///app/region/Ahern",
+ "Ahern");
+
+ testLabel("Render /app/region/Ahern within context", url,
+ "XXX secondlife:///app/region/Ahern XXX",
+ "Ahern");
+
+ testLabel("Render /app/region/Product%20Engine/", url,
+ "secondlife:///app/region/Product%20Engine/",
+ "Product Engine");
+
+ testLabel("Render /app/region/Product%20Engine", url,
+ "secondlife:///app/region/Product%20Engine",
+ "Product Engine");
+
+ // Location parsing texts.
+ testLocation("Location /app/region/Ahern/50/50/50/", url,
+ "secondlife:///app/region/Ahern/50/50/50/",
+ "Ahern");
+
+ testLocation("Location /app/region/Product%20Engine", url,
+ "secondlife:///app/region/Product%20Engine",
+ "Product Engine");
+ }
}
diff --git a/indra/llvfs/lldir.cpp b/indra/llvfs/lldir.cpp
index 1179180da2..64556bcb4c 100644
--- a/indra/llvfs/lldir.cpp
+++ b/indra/llvfs/lldir.cpp
@@ -382,11 +382,7 @@ std::string LLDir::getExpandedFilename(ELLPath location, const std::string& subd
break;
case LL_PATH_USER_SKIN:
- prefix = getOSUserAppDir();
- prefix += mDirDelimiter;
- prefix += "user_settings";
- prefix += mDirDelimiter;
- prefix += "skins";
+ prefix = getUserSkinDir();
break;
case LL_PATH_SKINS:
diff --git a/indra/llvfs/lldir_win32.cpp b/indra/llvfs/lldir_win32.cpp
index 4a8526cc96..33718e520d 100644
--- a/indra/llvfs/lldir_win32.cpp
+++ b/indra/llvfs/lldir_win32.cpp
@@ -206,14 +206,6 @@ void LLDir_Win32::initAppDirs(const std::string &app_name,
}
}
- res = LLFile::mkdir(getExpandedFilename(LL_PATH_USER_SKIN,""));
- if (res == -1)
- {
- if (errno != EEXIST)
- {
- llwarns << "Couldn't create LL_PATH_SKINS dir " << getExpandedFilename(LL_PATH_USER_SKIN,"") << llendl;
- }
- }
mCAFile = getExpandedFilename(LL_PATH_APP_SETTINGS, "CA.pem");
}
diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt
index bf3233f386..4d2677fd91 100644
--- a/indra/llwindow/CMakeLists.txt
+++ b/indra/llwindow/CMakeLists.txt
@@ -59,12 +59,13 @@ set(viewer_HEADER_FILES
# Libraries on which this library depends, needed for Linux builds
# Sort by high-level to low-level
-if (NOT LINUX OR VIEWER)
+if (LINUX AND VIEWER)
set(llwindow_LINK_LIBRARIES
${UI_LIBRARIES} # for GTK
${SDL_LIBRARY}
+ fontconfig # For FCInit and other FC* functions.
)
-endif (NOT LINUX OR VIEWER)
+endif (LINUX AND VIEWER)
if (DARWIN)
list(APPEND llwindow_SOURCE_FILES
diff --git a/indra/llwindow/llkeyboard.h b/indra/llwindow/llkeyboard.h
index be16f31abc..ba472cfde5 100644
--- a/indra/llwindow/llkeyboard.h
+++ b/indra/llwindow/llkeyboard.h
@@ -40,7 +40,7 @@ enum EKeystate
KEYSTATE_UP
};
-typedef void (*LLKeyFunc)(EKeystate keystate);
+typedef boost::function<void(EKeystate keystate)> LLKeyFunc;
typedef std::string (LLKeyStringTranslatorFunc)(const char *label);
enum EKeyboardInsertMode
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 87075c7318..ab089081e6 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -544,7 +544,27 @@ LLWindowWin32::LLWindowWin32(LLWindowCallbacks* callbacks,
if (closest_refresh == 0)
{
LL_WARNS("Window") << "Couldn't find display mode " << width << " by " << height << " at " << BITS_PER_PIXEL << " bits per pixel" << LL_ENDL;
- success = FALSE;
+ //success = FALSE;
+
+ if (!EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &dev_mode))
+ {
+ success = FALSE;
+ }
+ else
+ {
+ if (dev_mode.dmBitsPerPel == BITS_PER_PIXEL)
+ {
+ LL_WARNS("Window") << "Current BBP is OK falling back to that" << LL_ENDL;
+ window_rect.right=width=dev_mode.dmPelsWidth;
+ window_rect.bottom=height=dev_mode.dmPelsHeight;
+ success = TRUE;
+ }
+ else
+ {
+ LL_WARNS("Window") << "Current BBP is BAD" << LL_ENDL;
+ success = FALSE;
+ }
+ }
}
// If we found a good resolution, use it.
diff --git a/indra/llxml/llcontrol.cpp b/indra/llxml/llcontrol.cpp
index 27c694dde9..6c72609122 100644
--- a/indra/llxml/llcontrol.cpp
+++ b/indra/llxml/llcontrol.cpp
@@ -170,6 +170,20 @@ LLSD LLControlVariable::getComparableValue(const LLSD& value)
storable_value = false;
}
}
+ else if (TYPE_LLSD == type() && value.isString())
+ {
+ LLPointer<LLSDNotationParser> parser = new LLSDNotationParser;
+ LLSD result;
+ std::stringstream value_stream(value.asString());
+ if (parser->parse(value_stream, result, LLSDSerialize::SIZE_UNLIMITED) != LLSDParser::PARSE_FAILURE)
+ {
+ storable_value = result;
+ }
+ else
+ {
+ storable_value = value;
+ }
+ }
else
{
storable_value = value;
diff --git a/indra/llxuixml/llinitparam.cpp b/indra/llxuixml/llinitparam.cpp
index 2c92539387..fcdbaa4309 100644
--- a/indra/llxuixml/llinitparam.cpp
+++ b/indra/llxuixml/llinitparam.cpp
@@ -312,6 +312,14 @@ namespace LLInitParam
}
}
+ // if no match, and no names left on stack, this is just an existence assertion of this block
+ // verify by calling readValue with NoParamValue type, an inherently unparseable type
+ if (!names_left)
+ {
+ NoParamValue no_value;
+ return p.readValue(no_value);
+ }
+
return false;
}
diff --git a/indra/llxuixml/llinitparam.h b/indra/llxuixml/llinitparam.h
index 8cb5bd80fc..1f9045754a 100644
--- a/indra/llxuixml/llinitparam.h
+++ b/indra/llxuixml/llinitparam.h
@@ -278,6 +278,9 @@ namespace LLInitParam
S32 mParseGeneration;
};
+ // used to indicate no matching value to a given name when parsing
+ struct NoParamValue{};
+
class BaseBlock;
class Param
@@ -303,8 +306,8 @@ namespace LLInitParam
private:
friend class BaseBlock;
- bool mIsProvided;
U16 mEnclosingBlockOffset;
+ bool mIsProvided;
};
// various callbacks and constraints associated with an individual param
diff --git a/indra/llxuixml/llregistry.h b/indra/llxuixml/llregistry.h
index eee9933739..36ce6a97b7 100644
--- a/indra/llxuixml/llregistry.h
+++ b/indra/llxuixml/llregistry.h
@@ -343,4 +343,9 @@ private:
ScopedRegistrar* mStaticScope;
};
+// helper macro for doing static registration
+#define GLUED_TOKEN(x, y) x ## y
+#define GLUE_TOKENS(x, y) GLUED_TOKEN(x, y)
+#define LLREGISTER_STATIC(REGISTRY, KEY, VALUE) static REGISTRY::StaticRegistrar GLUE_TOKENS(reg, __LINE__)(KEY, VALUE);
+
#endif
diff --git a/indra/llxuixml/llxuiparser.cpp b/indra/llxuixml/llxuiparser.cpp
index 9942af6b37..72a7bb7af5 100644
--- a/indra/llxuixml/llxuiparser.cpp
+++ b/indra/llxuixml/llxuiparser.cpp
@@ -388,6 +388,7 @@ LLXUIParser::LLXUIParser()
{
if (sXUIReadFuncs.empty())
{
+ registerParserFuncs<LLInitParam::NoParamValue>(readNoValue, writeNoValue);
registerParserFuncs<bool>(readBoolValue, writeBoolValue);
registerParserFuncs<std::string>(readStringValue, writeStringValue);
registerParserFuncs<U8>(readU8Value, writeU8Value);
@@ -406,6 +407,7 @@ LLXUIParser::LLXUIParser()
}
static LLFastTimer::DeclareTimer FTM_PARSE_XUI("XUI Parsing");
+const LLXMLNodePtr DUMMY_NODE = new LLXMLNode();
void LLXUIParser::readXUI(LLXMLNodePtr node, LLInitParam::BaseBlock& block, const std::string& filename, bool silent)
{
@@ -432,6 +434,17 @@ bool LLXUIParser::readXUIImpl(LLXMLNodePtr nodep, LLInitParam::BaseBlock& block)
boost::char_separator<char> sep(".");
bool values_parsed = false;
+ bool silent = mCurReadDepth > 0;
+
+ if (nodep->getFirstChild().isNull()
+ && nodep->mAttributes.empty()
+ && nodep->getSanitizedValue().empty())
+ {
+ // empty node, just parse as NoValue
+ mCurReadNode = DUMMY_NODE;
+ return block.submitValue(mNameStack, *this, silent);
+ }
+
// submit attributes for current node
values_parsed |= readAttributes(nodep, block);
@@ -444,7 +457,6 @@ bool LLXUIParser::readXUIImpl(LLXMLNodePtr nodep, LLInitParam::BaseBlock& block)
mNameStack.push_back(std::make_pair(std::string("value"), newParseGeneration()));
// child nodes are not necessarily valid parameters (could be a child widget)
// so don't complain once we've recursed
- bool silent = mCurReadDepth > 0;
if (!block.submitValue(mNameStack, *this, true))
{
mNameStack.pop_back();
@@ -549,6 +561,7 @@ bool LLXUIParser::readAttributes(LLXMLNodePtr nodep, LLInitParam::BaseBlock& blo
boost::char_separator<char> sep(".");
bool any_parsed = false;
+ bool silent = mCurReadDepth > 0;
for(LLXMLAttribList::const_iterator attribute_it = nodep->mAttributes.begin();
attribute_it != nodep->mAttributes.end();
@@ -567,7 +580,6 @@ bool LLXUIParser::readAttributes(LLXMLNodePtr nodep, LLInitParam::BaseBlock& blo
}
// child nodes are not necessarily valid attributes, so don't complain once we've recursed
- bool silent = mCurReadDepth > 0;
any_parsed |= block.submitValue(mNameStack, *this, silent);
while(num_tokens_pushed-- > 0)
@@ -634,6 +646,19 @@ LLXMLNodePtr LLXUIParser::getNode(const name_stack_t& stack)
return (out_node == mWriteRootNode ? LLXMLNodePtr(NULL) : out_node);
}
+bool LLXUIParser::readNoValue(Parser& parser, void* val_ptr)
+{
+ LLXUIParser& self = static_cast<LLXUIParser&>(parser);
+ return self.mCurReadNode == DUMMY_NODE;
+}
+
+bool LLXUIParser::writeNoValue(Parser& parser, const void* val_ptr, const name_stack_t& stack)
+{
+ // just create node
+ LLXUIParser& self = static_cast<LLXUIParser&>(parser);
+ LLXMLNodePtr node = self.getNode(stack);
+ return node.notNull();
+}
bool LLXUIParser::readBoolValue(Parser& parser, void* val_ptr)
{
@@ -1049,6 +1074,8 @@ static LLInitParam::Parser::parser_read_func_map_t sSimpleXUIReadFuncs;
static LLInitParam::Parser::parser_write_func_map_t sSimpleXUIWriteFuncs;
static LLInitParam::Parser::parser_inspect_func_map_t sSimpleXUIInspectFuncs;
+const char* NO_VALUE_MARKER = "no_value";
+
LLSimpleXUIParser::LLSimpleXUIParser(LLSimpleXUIParser::element_start_callback_t element_cb)
: Parser(sSimpleXUIReadFuncs, sSimpleXUIWriteFuncs, sSimpleXUIInspectFuncs),
mLastWriteGeneration(-1),
@@ -1057,6 +1084,7 @@ LLSimpleXUIParser::LLSimpleXUIParser(LLSimpleXUIParser::element_start_callback_t
{
if (sSimpleXUIReadFuncs.empty())
{
+ registerParserFuncs<LLInitParam::NoParamValue>(readNoValue);
registerParserFuncs<bool>(readBoolValue);
registerParserFuncs<std::string>(readStringValue);
registerParserFuncs<U8>(readU8Value);
@@ -1120,6 +1148,8 @@ bool LLSimpleXUIParser::readXUI(const std::string& filename, LLInitParam::BaseBl
return false;
}
+ mEmptyLeafNode.push_back(false);
+
if( !XML_ParseBuffer(mParser, bytes_read, TRUE ) )
{
LL_WARNS("ReadXUI") << "Error while parsing file " << filename << LL_ENDL;
@@ -1127,6 +1157,8 @@ bool LLSimpleXUIParser::readXUI(const std::string& filename, LLInitParam::BaseBl
return false;
}
+ mEmptyLeafNode.pop_back();
+
XML_ParserFree( mParser );
return true;
}
@@ -1211,8 +1243,14 @@ void LLSimpleXUIParser::startElement(const char *name, const char **atts)
}
}
+ // parent node is not empty
+ mEmptyLeafNode.back() = false;
+ // we are empty if we have no attributes
+ mEmptyLeafNode.push_back(atts[0] == NULL);
+
mTokenSizeStack.push_back(num_tokens_pushed);
readAttributes(atts);
+
}
bool LLSimpleXUIParser::readAttributes(const char **atts)
@@ -1246,7 +1284,7 @@ bool LLSimpleXUIParser::readAttributes(const char **atts)
return any_parsed;
}
-void LLSimpleXUIParser::processText()
+bool LLSimpleXUIParser::processText()
{
if (!mTextContents.empty())
{
@@ -1259,12 +1297,22 @@ void LLSimpleXUIParser::processText()
mNameStack.pop_back();
}
mTextContents.clear();
+ return true;
}
+ return false;
}
void LLSimpleXUIParser::endElement(const char *name)
{
- processText();
+ bool has_text = processText();
+
+ // no text, attributes, or children
+ if (!has_text && mEmptyLeafNode.back())
+ {
+ // submit this as a valueless name (even though there might be text contents we haven't seen yet)
+ mCurAttributeValueBegin = NO_VALUE_MARKER;
+ mOutputStack.back().first->submitValue(mNameStack, *this, mParseSilently);
+ }
if (--mOutputStack.back().second == 0)
{
@@ -1282,6 +1330,7 @@ void LLSimpleXUIParser::endElement(const char *name)
mNameStack.pop_back();
}
mScope.pop_back();
+ mEmptyLeafNode.pop_back();
}
void LLSimpleXUIParser::characterData(const char *s, int len)
@@ -1328,6 +1377,12 @@ void LLSimpleXUIParser::parserError(const std::string& message)
#endif
}
+bool LLSimpleXUIParser::readNoValue(Parser& parser, void* val_ptr)
+{
+ LLSimpleXUIParser& self = static_cast<LLSimpleXUIParser&>(parser);
+ return self.mCurAttributeValueBegin == NO_VALUE_MARKER;
+}
+
bool LLSimpleXUIParser::readBoolValue(Parser& parser, void* val_ptr)
{
LLSimpleXUIParser& self = static_cast<LLSimpleXUIParser&>(parser);
diff --git a/indra/llxuixml/llxuiparser.h b/indra/llxuixml/llxuiparser.h
index 5c613b0c69..7a748d8aea 100644
--- a/indra/llxuixml/llxuiparser.h
+++ b/indra/llxuixml/llxuiparser.h
@@ -116,6 +116,7 @@ private:
bool readAttributes(LLXMLNodePtr nodep, LLInitParam::BaseBlock& block);
//reader helper functions
+ static bool readNoValue(Parser& parser, void* val_ptr);
static bool readBoolValue(Parser& parser, void* val_ptr);
static bool readStringValue(Parser& parser, void* val_ptr);
static bool readU8Value(Parser& parser, void* val_ptr);
@@ -132,6 +133,7 @@ private:
static bool readSDValue(Parser& parser, void* val_ptr);
//writer helper functions
+ static bool writeNoValue(Parser& parser, const void* val_ptr, const name_stack_t&);
static bool writeBoolValue(Parser& parser, const void* val_ptr, const name_stack_t&);
static bool writeStringValue(Parser& parser, const void* val_ptr, const name_stack_t&);
static bool writeU8Value(Parser& parser, const void* val_ptr, const name_stack_t&);
@@ -194,6 +196,7 @@ public:
private:
//reader helper functions
+ static bool readNoValue(Parser&, void* val_ptr);
static bool readBoolValue(Parser&, void* val_ptr);
static bool readStringValue(Parser&, void* val_ptr);
static bool readU8Value(Parser&, void* val_ptr);
@@ -218,7 +221,7 @@ private:
void endElement(const char *name);
void characterData(const char *s, int len);
bool readAttributes(const char **atts);
- void processText();
+ bool processText();
Parser::name_stack_t mNameStack;
struct XML_ParserStruct* mParser;
@@ -230,6 +233,7 @@ private:
const char* mCurAttributeValueBegin;
std::vector<S32> mTokenSizeStack;
std::vector<std::string> mScope;
+ std::vector<bool> mEmptyLeafNode;
element_start_callback_t mElementCB;
std::vector<std::pair<LLInitParam::BaseBlock*, S32> > mOutputStack;
diff --git a/indra/mac_updater/CMakeLists.txt b/indra/mac_updater/CMakeLists.txt
index 44f98e5e18..a4a6b50c6c 100644
--- a/indra/mac_updater/CMakeLists.txt
+++ b/indra/mac_updater/CMakeLists.txt
@@ -3,6 +3,7 @@
project(mac_updater)
include(00-Common)
+include(OpenSSL)
include(CURL)
include(LLCommon)
include(LLVFS)
@@ -49,6 +50,8 @@ set_target_properties(mac-updater
target_link_libraries(mac-updater
${LLVFS_LIBRARIES}
+ ${OPENSSL_LIBRARIES}
+ ${CRYPTO_LIBRARIES}
${CURL_LIBRARIES}
${LLCOMMON_LIBRARIES}
)
diff --git a/indra/media_plugins/example/media_plugin_example.cpp b/indra/media_plugins/example/media_plugin_example.cpp
index f8a871930e..da7de01799 100644
--- a/indra/media_plugins/example/media_plugin_example.cpp
+++ b/indra/media_plugins/example/media_plugin_example.cpp
@@ -6,21 +6,21 @@
* $LicenseInfo:firstyear=2008&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
- *
+ *
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ *
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
* @endcond
@@ -39,48 +39,48 @@
////////////////////////////////////////////////////////////////////////////////
//
class MediaPluginExample :
- public MediaPluginBase
+ public MediaPluginBase
{
- public:
- MediaPluginExample( LLPluginInstance::sendMessageFunction host_send_func, void *host_user_data );
- ~MediaPluginExample();
-
- /*virtual*/ void receiveMessage( const char* message_string );
-
- private:
- bool init();
- void update( F64 milliseconds );
- void write_pixel( int x, int y, unsigned char r, unsigned char g, unsigned char b );
- bool mFirstTime;
-
- time_t mLastUpdateTime;
- enum Constants { ENumObjects = 10 };
- unsigned char* mBackgroundPixels;
- int mColorR[ ENumObjects ];
- int mColorG[ ENumObjects ];
- int mColorB[ ENumObjects ];
- int mXpos[ ENumObjects ];
- int mYpos[ ENumObjects ];
- int mXInc[ ENumObjects ];
- int mYInc[ ENumObjects ];
- int mBlockSize[ ENumObjects ];
- bool mMouseButtonDown;
- bool mStopAction;
+ public:
+ MediaPluginExample( LLPluginInstance::sendMessageFunction host_send_func, void *host_user_data );
+ ~MediaPluginExample();
+
+ /*virtual*/ void receiveMessage( const char* message_string );
+
+ private:
+ bool init();
+ void update( F64 milliseconds );
+ void write_pixel( int x, int y, unsigned char r, unsigned char g, unsigned char b );
+ bool mFirstTime;
+
+ time_t mLastUpdateTime;
+ enum Constants { ENumObjects = 10 };
+ unsigned char* mBackgroundPixels;
+ int mColorR[ ENumObjects ];
+ int mColorG[ ENumObjects ];
+ int mColorB[ ENumObjects ];
+ int mXpos[ ENumObjects ];
+ int mYpos[ ENumObjects ];
+ int mXInc[ ENumObjects ];
+ int mYInc[ ENumObjects ];
+ int mBlockSize[ ENumObjects ];
+ bool mMouseButtonDown;
+ bool mStopAction;
};
////////////////////////////////////////////////////////////////////////////////
//
MediaPluginExample::MediaPluginExample( LLPluginInstance::sendMessageFunction host_send_func, void *host_user_data ) :
- MediaPluginBase( host_send_func, host_user_data )
+ MediaPluginBase( host_send_func, host_user_data )
{
- mFirstTime = true;
- mWidth = 0;
- mHeight = 0;
- mDepth = 4;
- mPixels = 0;
- mMouseButtonDown = false;
- mStopAction = false;
- mLastUpdateTime = 0;
+ mFirstTime = true;
+ mWidth = 0;
+ mHeight = 0;
+ mDepth = 4;
+ mPixels = 0;
+ mMouseButtonDown = false;
+ mStopAction = false;
+ mLastUpdateTime = 0;
}
////////////////////////////////////////////////////////////////////////////////
@@ -93,395 +93,320 @@ MediaPluginExample::~MediaPluginExample()
//
void MediaPluginExample::receiveMessage( const char* message_string )
{
- LLPluginMessage message_in;
-
- if ( message_in.parse( message_string ) >= 0 )
- {
- std::string message_class = message_in.getClass();
- std::string message_name = message_in.getName();
-
- if ( message_class == LLPLUGIN_MESSAGE_CLASS_BASE )
- {
- if ( message_name == "init" )
- {
- LLPluginMessage message( "base", "init_response" );
- LLSD versions = LLSD::emptyMap();
- versions[ LLPLUGIN_MESSAGE_CLASS_BASE ] = LLPLUGIN_MESSAGE_CLASS_BASE_VERSION;
- versions[ LLPLUGIN_MESSAGE_CLASS_MEDIA ] = LLPLUGIN_MESSAGE_CLASS_MEDIA_VERSION;
- versions[ LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER ] = LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER_VERSION;
- message.setValueLLSD( "versions", versions );
-
- std::string plugin_version = "Example media plugin, Example Version 1.0.0.0";
- message.setValue( "plugin_version", plugin_version );
- sendMessage( message );
- }
- else
- if ( message_name == "idle" )
- {
- // no response is necessary here.
- F64 time = message_in.getValueReal( "time" );
-
- // Convert time to milliseconds for update()
- update( time );
- }
- else
- if ( message_name == "cleanup" )
- {
- // clean up here
- }
- else
- if ( message_name == "shm_added" )
- {
- SharedSegmentInfo info;
- info.mAddress = message_in.getValuePointer( "address" );
- info.mSize = ( size_t )message_in.getValueS32( "size" );
- std::string name = message_in.getValue( "name" );
-
- mSharedSegments.insert( SharedSegmentMap::value_type( name, info ) );
-
- }
- else
- if ( message_name == "shm_remove" )
- {
- std::string name = message_in.getValue( "name" );
-
- SharedSegmentMap::iterator iter = mSharedSegments.find( name );
- if( iter != mSharedSegments.end() )
- {
- if ( mPixels == iter->second.mAddress )
- {
- // This is the currently active pixel buffer.
- // Make sure we stop drawing to it.
- mPixels = NULL;
- mTextureSegmentName.clear();
- };
- mSharedSegments.erase( iter );
- }
- else
- {
- //std::cerr << "MediaPluginExample::receiveMessage: unknown shared memory region!" << std::endl;
- };
-
- // Send the response so it can be cleaned up.
- LLPluginMessage message( "base", "shm_remove_response" );
- message.setValue( "name", name );
- sendMessage( message );
- }
- else
- {
- //std::cerr << "MediaPluginExample::receiveMessage: unknown base message: " << message_name << std::endl;
- };
- }
- else
- if ( message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA )
- {
- if ( message_name == "init" )
- {
- // Plugin gets to decide the texture parameters to use.
- LLPluginMessage message( LLPLUGIN_MESSAGE_CLASS_MEDIA, "texture_params" );
- message.setValueS32( "default_width", mWidth );
- message.setValueS32( "default_height", mHeight );
- message.setValueS32( "depth", mDepth );
- message.setValueU32( "internalformat", GL_RGBA );
- message.setValueU32( "format", GL_RGBA );
- message.setValueU32( "type", GL_UNSIGNED_BYTE );
- message.setValueBoolean( "coords_opengl", false );
- sendMessage( message );
- }
- else if ( message_name == "size_change" )
- {
- std::string name = message_in.getValue( "name" );
- S32 width = message_in.getValueS32( "width" );
- S32 height = message_in.getValueS32( "height" );
- S32 texture_width = message_in.getValueS32( "texture_width" );
- S32 texture_height = message_in.getValueS32( "texture_height" );
-
- if ( ! name.empty() )
- {
- // Find the shared memory region with this name
- SharedSegmentMap::iterator iter = mSharedSegments.find( name );
- if ( iter != mSharedSegments.end() )
- {
- mPixels = ( unsigned char* )iter->second.mAddress;
- mWidth = width;
- mHeight = height;
-
- mTextureWidth = texture_width;
- mTextureHeight = texture_height;
-
- init();
- };
- };
-
- LLPluginMessage message( LLPLUGIN_MESSAGE_CLASS_MEDIA, "size_change_response" );
- message.setValue( "name", name );
- message.setValueS32( "width", width );
- message.setValueS32( "height", height );
- message.setValueS32( "texture_width", texture_width );
- message.setValueS32( "texture_height", texture_height );
- sendMessage( message );
- }
- else
- if ( message_name == "load_uri" )
- {
- std::string uri = message_in.getValue( "uri" );
- if ( ! uri.empty() )
- {
- };
- }
- else
- if ( message_name == "mouse_event" )
- {
- std::string event = message_in.getValue( "event" );
- S32 button = message_in.getValueS32( "button" );
-
- // left mouse button
- if ( button == 0 )
- {
- int mouse_x = message_in.getValueS32( "x" );
- int mouse_y = message_in.getValueS32( "y" );
- std::string modifiers = message_in.getValue( "modifiers" );
-
- if ( event == "move" )
- {
- if ( mMouseButtonDown )
- write_pixel( mouse_x, mouse_y, rand() % 0x80 + 0x80, rand() % 0x80 + 0x80, rand() % 0x80 + 0x80 );
- }
- else
- if ( event == "down" )
- {
- mMouseButtonDown = true;
- }
- else
- if ( event == "up" )
- {
- mMouseButtonDown = false;
- }
- else
- if ( event == "double_click" )
- {
- };
- };
- }
- else
- if ( message_name == "key_event" )
- {
- std::string event = message_in.getValue( "event" );
- S32 key = message_in.getValueS32( "key" );
- std::string modifiers = message_in.getValue( "modifiers" );
-
- if ( event == "down" )
- {
- if ( key == ' ')
- {
- mLastUpdateTime = 0;
- update( 0.0f );
- };
- };
- }
- else
- {
- //std::cerr << "MediaPluginExample::receiveMessage: unknown media message: " << message_string << std::endl;
- };
- }
- else
- if ( message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER )
- {
- if ( message_name == "browse_reload" )
- {
- mLastUpdateTime = 0;
- mFirstTime = true;
- mStopAction = false;
- update( 0.0f );
- }
- else
- if ( message_name == "browse_stop" )
- {
- for( int n = 0; n < ENumObjects; ++n )
- mXInc[ n ] = mYInc[ n ] = 0;
-
- mStopAction = true;
- update( 0.0f );
- }
- else
- {
- //std::cerr << "MediaPluginExample::receiveMessage: unknown media_browser message: " << message_string << std::endl;
- };
- }
- else
- {
- //std::cerr << "MediaPluginExample::receiveMessage: unknown message class: " << message_class << std::endl;
- };
- };
+// std::cerr << "MediaPluginWebKit::receiveMessage: received message: \"" << message_string << "\"" << std::endl;
+ LLPluginMessage message_in;
+
+ if(message_in.parse(message_string) >= 0)
+ {
+ std::string message_class = message_in.getClass();
+ std::string message_name = message_in.getName();
+ if(message_class == LLPLUGIN_MESSAGE_CLASS_BASE)
+ {
+ if(message_name == "init")
+ {
+ LLPluginMessage message("base", "init_response");
+ LLSD versions = LLSD::emptyMap();
+ versions[LLPLUGIN_MESSAGE_CLASS_BASE] = LLPLUGIN_MESSAGE_CLASS_BASE_VERSION;
+ versions[LLPLUGIN_MESSAGE_CLASS_MEDIA] = LLPLUGIN_MESSAGE_CLASS_MEDIA_VERSION;
+ versions[LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER] = LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER_VERSION;
+ message.setValueLLSD("versions", versions);
+
+ std::string plugin_version = "Example plugin 1.0..0";
+ message.setValue("plugin_version", plugin_version);
+ sendMessage(message);
+ }
+ else if(message_name == "idle")
+ {
+ // no response is necessary here.
+ F64 time = message_in.getValueReal("time");
+
+ // Convert time to milliseconds for update()
+ update((int)(time * 1000.0f));
+ }
+ else if(message_name == "cleanup")
+ {
+ }
+ else if(message_name == "shm_added")
+ {
+ SharedSegmentInfo info;
+ info.mAddress = message_in.getValuePointer("address");
+ info.mSize = (size_t)message_in.getValueS32("size");
+ std::string name = message_in.getValue("name");
+
+ mSharedSegments.insert(SharedSegmentMap::value_type(name, info));
+
+ }
+ else if(message_name == "shm_remove")
+ {
+ std::string name = message_in.getValue("name");
+
+ SharedSegmentMap::iterator iter = mSharedSegments.find(name);
+ if(iter != mSharedSegments.end())
+ {
+ if(mPixels == iter->second.mAddress)
+ {
+ // This is the currently active pixel buffer. Make sure we stop drawing to it.
+ mPixels = NULL;
+ mTextureSegmentName.clear();
+ }
+ mSharedSegments.erase(iter);
+ }
+ else
+ {
+// std::cerr << "MediaPluginWebKit::receiveMessage: unknown shared memory region!" << std::endl;
+ }
+
+ // Send the response so it can be cleaned up.
+ LLPluginMessage message("base", "shm_remove_response");
+ message.setValue("name", name);
+ sendMessage(message);
+ }
+ else
+ {
+// std::cerr << "MediaPluginWebKit::receiveMessage: unknown base message: " << message_name << std::endl;
+ }
+ }
+ else if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA)
+ {
+ if(message_name == "init")
+ {
+ // Plugin gets to decide the texture parameters to use.
+ mDepth = 4;
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "texture_params");
+ message.setValueS32("default_width", 1024);
+ message.setValueS32("default_height", 1024);
+ message.setValueS32("depth", mDepth);
+ message.setValueU32("internalformat", GL_RGBA);
+ message.setValueU32("format", GL_RGBA);
+ message.setValueU32("type", GL_UNSIGNED_BYTE);
+ message.setValueBoolean("coords_opengl", true);
+ sendMessage(message);
+ }
+ else if(message_name == "size_change")
+ {
+ std::string name = message_in.getValue("name");
+ S32 width = message_in.getValueS32("width");
+ S32 height = message_in.getValueS32("height");
+ S32 texture_width = message_in.getValueS32("texture_width");
+ S32 texture_height = message_in.getValueS32("texture_height");
+
+ if(!name.empty())
+ {
+ // Find the shared memory region with this name
+ SharedSegmentMap::iterator iter = mSharedSegments.find(name);
+ if(iter != mSharedSegments.end())
+ {
+ mPixels = (unsigned char*)iter->second.mAddress;
+ mWidth = width;
+ mHeight = height;
+
+ mTextureWidth = texture_width;
+ mTextureHeight = texture_height;
+ };
+ };
+
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "size_change_response");
+ message.setValue("name", name);
+ message.setValueS32("width", width);
+ message.setValueS32("height", height);
+ message.setValueS32("texture_width", texture_width);
+ message.setValueS32("texture_height", texture_height);
+ sendMessage(message);
+
+ }
+ else if(message_name == "load_uri")
+ {
+ }
+ else if(message_name == "mouse_event")
+ {
+ std::string event = message_in.getValue("event");
+ if(event == "down")
+ {
+
+ }
+ else if(event == "up")
+ {
+ }
+ else if(event == "double_click")
+ {
+ }
+ }
+ }
+ else
+ {
+// std::cerr << "MediaPluginWebKit::receiveMessage: unknown message class: " << message_class << std::endl;
+ };
+ }
}
////////////////////////////////////////////////////////////////////////////////
//
void MediaPluginExample::write_pixel( int x, int y, unsigned char r, unsigned char g, unsigned char b )
{
- // make sure we don't write outside the buffer
- if ( ( x < 0 ) || ( x >= mWidth ) || ( y < 0 ) || ( y >= mHeight ) )
- return;
-
- if ( mBackgroundPixels != NULL )
- {
- unsigned char *pixel = mBackgroundPixels;
- pixel += y * mWidth * mDepth;
- pixel += ( x * mDepth );
- pixel[ 0 ] = b;
- pixel[ 1 ] = g;
- pixel[ 2 ] = r;
-
- setDirty( x, y, x + 1, y + 1 );
- };
+ // make sure we don't write outside the buffer
+ if ( ( x < 0 ) || ( x >= mWidth ) || ( y < 0 ) || ( y >= mHeight ) )
+ return;
+
+ if ( mBackgroundPixels != NULL )
+ {
+ unsigned char *pixel = mBackgroundPixels;
+ pixel += y * mWidth * mDepth;
+ pixel += ( x * mDepth );
+ pixel[ 0 ] = b;
+ pixel[ 1 ] = g;
+ pixel[ 2 ] = r;
+
+ setDirty( x, y, x + 1, y + 1 );
+ };
}
////////////////////////////////////////////////////////////////////////////////
//
void MediaPluginExample::update( F64 milliseconds )
{
- if ( mWidth < 1 || mWidth > 2048 || mHeight < 1 || mHeight > 2048 )
- return;
-
- if ( mPixels == 0 )
- return;
-
- if ( mFirstTime )
- {
- for( int n = 0; n < ENumObjects; ++n )
- {
- mXpos[ n ] = ( mWidth / 2 ) + rand() % ( mWidth / 16 ) - ( mWidth / 32 );
- mYpos[ n ] = ( mHeight / 2 ) + rand() % ( mHeight / 16 ) - ( mHeight / 32 );
-
- mColorR[ n ] = rand() % 0x60 + 0x60;
- mColorG[ n ] = rand() % 0x60 + 0x60;
- mColorB[ n ] = rand() % 0x60 + 0x60;
-
- mXInc[ n ] = 0;
- while ( mXInc[ n ] == 0 )
- mXInc[ n ] = rand() % 7 - 3;
-
- mYInc[ n ] = 0;
- while ( mYInc[ n ] == 0 )
- mYInc[ n ] = rand() % 9 - 4;
-
- mBlockSize[ n ] = rand() % 0x30 + 0x10;
- };
-
- delete [] mBackgroundPixels;
-
- mBackgroundPixels = new unsigned char[ mWidth * mHeight * mDepth ];
-
- mFirstTime = false;
- };
-
- if ( mStopAction )
- return;
-
- if ( time( NULL ) > mLastUpdateTime + 3 )
- {
- const int num_squares = rand() % 20 + 4;
- int sqr1_r = rand() % 0x80 + 0x20;
- int sqr1_g = rand() % 0x80 + 0x20;
- int sqr1_b = rand() % 0x80 + 0x20;
- int sqr2_r = rand() % 0x80 + 0x20;
- int sqr2_g = rand() % 0x80 + 0x20;
- int sqr2_b = rand() % 0x80 + 0x20;
-
- for ( int y1 = 0; y1 < num_squares; ++y1 )
- {
- for ( int x1 = 0; x1 < num_squares; ++x1 )
- {
- int px_start = mWidth * x1 / num_squares;
- int px_end = ( mWidth * ( x1 + 1 ) ) / num_squares;
- int py_start = mHeight * y1 / num_squares;
- int py_end = ( mHeight * ( y1 + 1 ) ) / num_squares;
-
- for( int y2 = py_start; y2 < py_end; ++y2 )
- {
- for( int x2 = px_start; x2 < px_end; ++x2 )
- {
- int rowspan = mWidth * mDepth;
-
- if ( ( y1 % 2 ) ^ ( x1 % 2 ) )
- {
- mBackgroundPixels[ y2 * rowspan + x2 * mDepth + 0 ] = sqr1_r;
- mBackgroundPixels[ y2 * rowspan + x2 * mDepth + 1 ] = sqr1_g;
- mBackgroundPixels[ y2 * rowspan + x2 * mDepth + 2 ] = sqr1_b;
- }
- else
- {
- mBackgroundPixels[ y2 * rowspan + x2 * mDepth + 0 ] = sqr2_r;
- mBackgroundPixels[ y2 * rowspan + x2 * mDepth + 1 ] = sqr2_g;
- mBackgroundPixels[ y2 * rowspan + x2 * mDepth + 2 ] = sqr2_b;
- };
- };
- };
- };
- };
-
- time( &mLastUpdateTime );
- };
-
- memcpy( mPixels, mBackgroundPixels, mWidth * mHeight * mDepth );
-
- for( int n = 0; n < ENumObjects; ++n )
- {
- if ( rand() % 50 == 0 )
- {
- mXInc[ n ] = 0;
- while ( mXInc[ n ] == 0 )
- mXInc[ n ] = rand() % 7 - 3;
-
- mYInc[ n ] = 0;
- while ( mYInc[ n ] == 0 )
- mYInc[ n ] = rand() % 9 - 4;
- };
-
- if ( mXpos[ n ] + mXInc[ n ] < 0 || mXpos[ n ] + mXInc[ n ] >= mWidth - mBlockSize[ n ] )
- mXInc[ n ] =- mXInc[ n ];
-
- if ( mYpos[ n ] + mYInc[ n ] < 0 || mYpos[ n ] + mYInc[ n ] >= mHeight - mBlockSize[ n ] )
- mYInc[ n ] =- mYInc[ n ];
-
- mXpos[ n ] += mXInc[ n ];
- mYpos[ n ] += mYInc[ n ];
-
- for( int y = 0; y < mBlockSize[ n ]; ++y )
- {
- for( int x = 0; x < mBlockSize[ n ]; ++x )
- {
- mPixels[ ( mXpos[ n ] + x ) * mDepth + ( mYpos[ n ] + y ) * mDepth * mWidth + 0 ] = mColorR[ n ];
- mPixels[ ( mXpos[ n ] + x ) * mDepth + ( mYpos[ n ] + y ) * mDepth * mWidth + 1 ] = mColorG[ n ];
- mPixels[ ( mXpos[ n ] + x ) * mDepth + ( mYpos[ n ] + y ) * mDepth * mWidth + 2 ] = mColorB[ n ];
- };
- };
- };
-
- setDirty( 0, 0, mWidth, mHeight );
+ if ( mWidth < 1 || mWidth > 2048 || mHeight < 1 || mHeight > 2048 )
+ return;
+
+ if ( mPixels == 0 )
+ return;
+
+ if ( mFirstTime )
+ {
+ for( int n = 0; n < ENumObjects; ++n )
+ {
+ mXpos[ n ] = ( mWidth / 2 ) + rand() % ( mWidth / 16 ) - ( mWidth / 32 );
+ mYpos[ n ] = ( mHeight / 2 ) + rand() % ( mHeight / 16 ) - ( mHeight / 32 );
+
+ mColorR[ n ] = rand() % 0x60 + 0x60;
+ mColorG[ n ] = rand() % 0x60 + 0x60;
+ mColorB[ n ] = rand() % 0x60 + 0x60;
+
+ mXInc[ n ] = 0;
+ while ( mXInc[ n ] == 0 )
+ mXInc[ n ] = rand() % 7 - 3;
+
+ mYInc[ n ] = 0;
+ while ( mYInc[ n ] == 0 )
+ mYInc[ n ] = rand() % 9 - 4;
+
+ mBlockSize[ n ] = rand() % 0x30 + 0x10;
+ };
+
+ delete [] mBackgroundPixels;
+
+ mBackgroundPixels = new unsigned char[ mWidth * mHeight * mDepth ];
+
+ mFirstTime = false;
+ };
+
+ if ( mStopAction )
+ return;
+
+ if ( time( NULL ) > mLastUpdateTime + 3 )
+ {
+ const int num_squares = rand() % 20 + 4;
+ int sqr1_r = rand() % 0x80 + 0x20;
+ int sqr1_g = rand() % 0x80 + 0x20;
+ int sqr1_b = rand() % 0x80 + 0x20;
+ int sqr2_r = rand() % 0x80 + 0x20;
+ int sqr2_g = rand() % 0x80 + 0x20;
+ int sqr2_b = rand() % 0x80 + 0x20;
+
+ for ( int y1 = 0; y1 < num_squares; ++y1 )
+ {
+ for ( int x1 = 0; x1 < num_squares; ++x1 )
+ {
+ int px_start = mWidth * x1 / num_squares;
+ int px_end = ( mWidth * ( x1 + 1 ) ) / num_squares;
+ int py_start = mHeight * y1 / num_squares;
+ int py_end = ( mHeight * ( y1 + 1 ) ) / num_squares;
+
+ for( int y2 = py_start; y2 < py_end; ++y2 )
+ {
+ for( int x2 = px_start; x2 < px_end; ++x2 )
+ {
+ int rowspan = mWidth * mDepth;
+
+ if ( ( y1 % 2 ) ^ ( x1 % 2 ) )
+ {
+ mBackgroundPixels[ y2 * rowspan + x2 * mDepth + 0 ] = sqr1_r;
+ mBackgroundPixels[ y2 * rowspan + x2 * mDepth + 1 ] = sqr1_g;
+ mBackgroundPixels[ y2 * rowspan + x2 * mDepth + 2 ] = sqr1_b;
+ }
+ else
+ {
+ mBackgroundPixels[ y2 * rowspan + x2 * mDepth + 0 ] = sqr2_r;
+ mBackgroundPixels[ y2 * rowspan + x2 * mDepth + 1 ] = sqr2_g;
+ mBackgroundPixels[ y2 * rowspan + x2 * mDepth + 2 ] = sqr2_b;
+ };
+ };
+ };
+ };
+ };
+
+ time( &mLastUpdateTime );
+ };
+
+ memcpy( mPixels, mBackgroundPixels, mWidth * mHeight * mDepth );
+
+ for( int n = 0; n < ENumObjects; ++n )
+ {
+ if ( rand() % 50 == 0 )
+ {
+ mXInc[ n ] = 0;
+ while ( mXInc[ n ] == 0 )
+ mXInc[ n ] = rand() % 7 - 3;
+
+ mYInc[ n ] = 0;
+ while ( mYInc[ n ] == 0 )
+ mYInc[ n ] = rand() % 9 - 4;
+ };
+
+ if ( mXpos[ n ] + mXInc[ n ] < 0 || mXpos[ n ] + mXInc[ n ] >= mWidth - mBlockSize[ n ] )
+ mXInc[ n ] =- mXInc[ n ];
+
+ if ( mYpos[ n ] + mYInc[ n ] < 0 || mYpos[ n ] + mYInc[ n ] >= mHeight - mBlockSize[ n ] )
+ mYInc[ n ] =- mYInc[ n ];
+
+ mXpos[ n ] += mXInc[ n ];
+ mYpos[ n ] += mYInc[ n ];
+
+ for( int y = 0; y < mBlockSize[ n ]; ++y )
+ {
+ for( int x = 0; x < mBlockSize[ n ]; ++x )
+ {
+ mPixels[ ( mXpos[ n ] + x ) * mDepth + ( mYpos[ n ] + y ) * mDepth * mWidth + 0 ] = mColorR[ n ];
+ mPixels[ ( mXpos[ n ] + x ) * mDepth + ( mYpos[ n ] + y ) * mDepth * mWidth + 1 ] = mColorG[ n ];
+ mPixels[ ( mXpos[ n ] + x ) * mDepth + ( mYpos[ n ] + y ) * mDepth * mWidth + 2 ] = mColorB[ n ];
+ };
+ };
+ };
+
+ setDirty( 0, 0, mWidth, mHeight );
};
////////////////////////////////////////////////////////////////////////////////
//
bool MediaPluginExample::init()
{
- LLPluginMessage message( LLPLUGIN_MESSAGE_CLASS_MEDIA, "name_text" );
- message.setValue( "name", "Example Plugin" );
- sendMessage( message );
+ LLPluginMessage message( LLPLUGIN_MESSAGE_CLASS_MEDIA, "name_text" );
+ message.setValue( "name", "Example Plugin" );
+ sendMessage( message );
- return true;
+ return true;
};
////////////////////////////////////////////////////////////////////////////////
//
int init_media_plugin( LLPluginInstance::sendMessageFunction host_send_func,
- void* host_user_data,
- LLPluginInstance::sendMessageFunction *plugin_send_func,
- void **plugin_user_data )
+ void* host_user_data,
+ LLPluginInstance::sendMessageFunction *plugin_send_func,
+ void **plugin_user_data )
{
- MediaPluginExample* self = new MediaPluginExample( host_send_func, host_user_data );
- *plugin_send_func = MediaPluginExample::staticReceiveMessage;
- *plugin_user_data = ( void* )self;
+ MediaPluginExample* self = new MediaPluginExample( host_send_func, host_user_data );
+ *plugin_send_func = MediaPluginExample::staticReceiveMessage;
+ *plugin_user_data = ( void* )self;
- return 0;
+ return 0;
}
+
diff --git a/indra/media_plugins/webkit/CMakeLists.txt b/indra/media_plugins/webkit/CMakeLists.txt
index 05f1236606..3b1f679540 100644
--- a/indra/media_plugins/webkit/CMakeLists.txt
+++ b/indra/media_plugins/webkit/CMakeLists.txt
@@ -27,6 +27,7 @@ include_directories(
${LLIMAGE_INCLUDE_DIRS}
${LLRENDER_INCLUDE_DIRS}
${LLWINDOW_INCLUDE_DIRS}
+ ${LLQTWEBKIT_INCLUDE_DIR}
)
diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp
index bd1a44a930..d6f8ae3e16 100644
--- a/indra/media_plugins/webkit/media_plugin_webkit.cpp
+++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp
@@ -341,7 +341,7 @@ private:
url << std::setfill('0') << std::setw(2) << std::hex << int(mBackgroundB * 255.0f);
url << "%22%3E%3C/body%3E%3C/html%3E";
- lldebugs << "data url is: " << url.str() << llendl;
+ //lldebugs << "data url is: " << url.str() << llendl;
LLQtWebKit::getInstance()->navigateTo( mBrowserWindowId, url.str() );
// LLQtWebKit::getInstance()->navigateTo( mBrowserWindowId, "about:blank" );
@@ -407,6 +407,8 @@ private:
{
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "navigate_begin");
message.setValue("uri", event.getEventUri());
+ message.setValueBoolean("history_back_available", LLQtWebKit::getInstance()->userActionIsEnabled( mBrowserWindowId, LLQtWebKit::UA_NAVIGATE_BACK));
+ message.setValueBoolean("history_forward_available", LLQtWebKit::getInstance()->userActionIsEnabled( mBrowserWindowId, LLQtWebKit::UA_NAVIGATE_FORWARD));
sendMessage(message);
setStatus(STATUS_LOADING);
@@ -569,6 +571,57 @@ private:
return blockingPickFile();
}
+ std::string mAuthUsername;
+ std::string mAuthPassword;
+ bool mAuthOK;
+
+ ////////////////////////////////////////////////////////////////////////////////
+ // virtual
+ bool onAuthRequest(const std::string &in_url, const std::string &in_realm, std::string &out_username, std::string &out_password)
+ {
+ mAuthOK = false;
+
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "auth_request");
+ message.setValue("url", in_url);
+ message.setValue("realm", in_realm);
+ message.setValueBoolean("blocking_request", true);
+
+ // The "blocking_request" key in the message means this sendMessage call will block until a response is received.
+ sendMessage(message);
+
+ if(mAuthOK)
+ {
+ out_username = mAuthUsername;
+ out_password = mAuthPassword;
+ }
+
+ return mAuthOK;
+ }
+
+ void authResponse(LLPluginMessage &message)
+ {
+ mAuthOK = message.getValueBoolean("ok");
+ if(mAuthOK)
+ {
+ mAuthUsername = message.getValue("username");
+ mAuthPassword = message.getValue("password");
+ }
+ }
+
+ ////////////////////////////////////////////////////////////////////////////////
+ // virtual
+ void onLinkHovered(const EventType& event)
+ {
+ if(mInitState >= INIT_STATE_NAVIGATE_COMPLETE)
+ {
+ LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "link_hovered");
+ message.setValue("link", event.getEventUri());
+ message.setValue("title", event.getStringValue());
+ message.setValue("text", event.getStringValue2());
+ sendMessage(message);
+ }
+ }
+
LLQtWebKit::EKeyboardModifier decodeModifiers(std::string &modifiers)
{
int result = 0;
@@ -1096,6 +1149,10 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)
{
onPickFileResponse(message_in.getValue("file"));
}
+ if(message_name == "auth_response")
+ {
+ authResponse(message_in);
+ }
else
{
// std::cerr << "MediaPluginWebKit::receiveMessage: unknown media message: " << message_string << std::endl;
@@ -1182,6 +1239,22 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)
mUserAgent = message_in.getValue("user_agent");
LLQtWebKit::getInstance()->setBrowserAgentId( mUserAgent );
}
+ else if(message_name == "ignore_ssl_cert_errors")
+ {
+#if LLQTWEBKIT_API_VERSION >= 3
+ LLQtWebKit::getInstance()->setIgnoreSSLCertErrors( message_in.getValueBoolean("ignore") );
+#else
+ llwarns << "Ignoring ignore_ssl_cert_errors message (llqtwebkit version is too old)." << llendl;
+#endif
+ }
+ else if(message_name == "add_certificate_file_path")
+ {
+#if LLQTWEBKIT_API_VERSION >= 6
+ LLQtWebKit::getInstance()->addCAFile( message_in.getValue("path") );
+#else
+ llwarns << "Ignoring add_certificate_file_path message (llqtwebkit version is too old)." << llendl;
+#endif
+ }
else if(message_name == "init_history")
{
// Initialize browser history
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 679637caf6..a61c35abd2 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -50,6 +50,7 @@ include_directories(
${LLCHARACTER_INCLUDE_DIRS}
${LLCOMMON_INCLUDE_DIRS}
${LLIMAGE_INCLUDE_DIRS}
+ ${LLKDU_INCLUDE_DIRS}
${LLINVENTORY_INCLUDE_DIRS}
${LLMATH_INCLUDE_DIRS}
${LLMESSAGE_INCLUDE_DIRS}
@@ -222,6 +223,7 @@ set(viewer_SOURCE_FILES
llfloaterurlentry.cpp
llfloatervoiceeffect.cpp
llfloaterwater.cpp
+ llfloaterwebcontent.cpp
llfloaterwhitelistentry.cpp
llfloaterwindlight.cpp
llfloaterwindowsize.cpp
@@ -403,6 +405,7 @@ set(viewer_SOURCE_FILES
llsecapi.cpp
llsechandler_basic.cpp
llselectmgr.cpp
+ llshareavatarhandler.cpp
llsidepanelappearance.cpp
llsidepanelinventory.cpp
llsidepanelinventorysubpanel.cpp
@@ -481,6 +484,7 @@ set(viewer_SOURCE_FILES
llvectorperfoptions.cpp
llversioninfo.cpp
llviewchildren.cpp
+ llviewerassetstats.cpp
llviewerassetstorage.cpp
llviewerassettype.cpp
llviewerattachmenu.cpp
@@ -543,6 +547,7 @@ set(viewer_SOURCE_FILES
llvoclouds.cpp
llvograss.cpp
llvoground.cpp
+ llvoicecallhandler.cpp
llvoicechannel.cpp
llvoiceclient.cpp
llvoicevisualizer.cpp
@@ -757,6 +762,7 @@ set(viewer_HEADER_FILES
llfloaterurlentry.h
llfloatervoiceeffect.h
llfloaterwater.h
+ llfloaterwebcontent.h
llfloaterwhitelistentry.h
llfloaterwindlight.h
llfloaterwindowsize.h
@@ -1014,6 +1020,7 @@ set(viewer_HEADER_FILES
llvectorperfoptions.h
llversioninfo.h
llviewchildren.h
+ llviewerassetstats.h
llviewerassetstorage.h
llviewerassettype.h
llviewerattachmenu.h
@@ -1325,7 +1332,7 @@ set(viewer_APPSETTINGS_FILES
app_settings/grass.xml
app_settings/high_graphics.xml
app_settings/ignorable_dialogs.xml
- app_settings/keys.ini
+ app_settings/keys.xml
app_settings/keywords.ini
app_settings/logcontrol.xml
app_settings/low_graphics.xml
@@ -1453,11 +1460,6 @@ if (WINDOWS)
# In the meantime, if you have any ideas on how to easily maintain one list, either here or in viewer_manifest.py
# and have the build deps get tracked *please* tell me about it.
- if(LLKDU_LIBRARY)
- # Configure a var for llkdu which may not exist for all builds.
- set(LLKDU_DLL_SOURCE ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/llkdu.dll)
- endif(LLKDU_LIBRARY)
-
if(USE_GOOGLE_PERFTOOLS)
# Configure a var for tcmalloc location, if used.
# Note the need to specify multiple names explicitly.
@@ -1474,7 +1476,6 @@ if (WINDOWS)
#${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libtcmalloc_minimal.dll => None ... Skipping libtcmalloc_minimal.dll
${CMAKE_SOURCE_DIR}/../etc/message.xml
${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg
- ${LLKDU_DLL_SOURCE}
${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/llcommon.dll
${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libapr-1.dll
${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libaprutil-1.dll
@@ -1660,7 +1661,6 @@ target_link_libraries(${VIEWER_BINARY_NAME}
${LLAUDIO_LIBRARIES}
${LLCHARACTER_LIBRARIES}
${LLIMAGE_LIBRARIES}
- ${LLIMAGEJ2COJ_LIBRARIES}
${LLINVENTORY_LIBRARIES}
${LLMESSAGE_LIBRARIES}
${LLPLUGIN_LIBRARIES}
@@ -1696,6 +1696,17 @@ target_link_libraries(${VIEWER_BINARY_NAME}
${GOOGLE_PERFTOOLS_LIBRARIES}
)
+if (USE_KDU)
+ target_link_libraries(${VIEWER_BINARY_NAME}
+ ${LLKDU_LIBRARIES}
+ ${KDU_LIBRARY}
+ )
+else (USE_KDU)
+ target_link_libraries(${VIEWER_BINARY_NAME}
+ ${LLIMAGEJ2COJ_LIBRARIES}
+ )
+endif (USE_KDU)
+
build_version(viewer)
set(ARTWORK_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH
@@ -1843,6 +1854,7 @@ if (PACKAGE)
set(VIEWER_COPY_MANIFEST copy_l_viewer_manifest)
endif (LINUX)
+ if(RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING)
if(CMAKE_CFG_INTDIR STREQUAL ".")
set(LLBUILD_CONFIG ${CMAKE_BUILD_TYPE})
else(CMAKE_CFG_INTDIR STREQUAL ".")
@@ -1861,11 +1873,12 @@ if (PACKAGE)
"${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/bin/dump_syms"
"${VIEWER_SYMBOL_FILE}"
DEPENDS generate_breakpad_symbols.py
- VERBATIM
- )
+ VERBATIM)
+
add_custom_target(generate_breakpad_symbols DEPENDS "${VIEWER_SYMBOL_FILE}")
add_dependencies(generate_breakpad_symbols "${VIEWER_BINARY_NAME}" "${VIEWER_COPY_MANIFEST}")
add_dependencies(package generate_breakpad_symbols)
+ endif(RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING)
endif (PACKAGE)
if (LL_TESTS)
@@ -1880,6 +1893,8 @@ if (LL_TESTS)
llremoteparcelrequest.cpp
llviewerhelputil.cpp
llversioninfo.cpp
+ llworldmap.cpp
+ llworldmipmap.cpp
)
##################################################
@@ -1955,10 +1970,18 @@ if (LL_TESTS)
"${test_libs}"
)
+ LL_ADD_INTEGRATION_TEST(llsimplestat
+ ""
+ "${test_libs}"
+ )
+
+ LL_ADD_INTEGRATION_TEST(llviewerassetstats
+ llviewerassetstats.cpp
+ "${test_libs}"
+ )
+
#ADD_VIEWER_BUILD_TEST(llmemoryview viewer)
#ADD_VIEWER_BUILD_TEST(llagentaccess viewer)
- #ADD_VIEWER_BUILD_TEST(llworldmap viewer)
- #ADD_VIEWER_BUILD_TEST(llworldmipmap viewer)
#ADD_VIEWER_BUILD_TEST(lltextureinfo viewer)
#ADD_VIEWER_BUILD_TEST(lltextureinfodetails viewer)
#ADD_VIEWER_BUILD_TEST(lltexturestatsuploader viewer)
diff --git a/indra/newview/app_settings/cmd_line.xml b/indra/newview/app_settings/cmd_line.xml
index 1b8393330d..e4ac455e7c 100644
--- a/indra/newview/app_settings/cmd_line.xml
+++ b/indra/newview/app_settings/cmd_line.xml
@@ -399,6 +399,5 @@
<key>map-to</key>
<string>DisableCrashLogger</string>
</map>
-
</map>
</llsd>
diff --git a/indra/newview/app_settings/ignorable_dialogs.xml b/indra/newview/app_settings/ignorable_dialogs.xml
index 9ddf007ce7..89fd4e5935 100644
--- a/indra/newview/app_settings/ignorable_dialogs.xml
+++ b/indra/newview/app_settings/ignorable_dialogs.xml
@@ -23,6 +23,17 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>FirstNotUseAvatarPicker</key>
+ <map>
+ <key>Comment</key>
+ <string>Shows hint when resident doesn't activate avatar picker</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>FirstNotUseSidePanel</key>
<map>
<key>Comment</key>
@@ -56,6 +67,17 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>FirstViewPopup</key>
+ <map>
+ <key>Comment</key>
+ <string>Shows hint when resident opens view popup</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>FirstReceiveLindens</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/app_settings/keys.ini b/indra/newview/app_settings/keys.ini
deleted file mode 100644
index b79e5bf508..0000000000
--- a/indra/newview/app_settings/keys.ini
+++ /dev/null
@@ -1,357 +0,0 @@
-# keys.ini
-#
-# keyboard binding initialization
-#
-# comments must have # in the first column
-# blank lines OK
-#
-# Format:
-# mode key mask function
-#
-# mode must be one of FIRST_PERSON, THIRD_PERSON, EDIT, EDIT_AVATAR, or CONVERSATION
-# key must be upper case, or SPACE, HOME, END, PGUP, PGDN, LEFT, RIGHT, UP, DOWN,
-# or one of ,.;'[]
-# mask must be NONE, SHIFT, ALT, ALT_SHIFT.
-# Control is reserved for user commands.
-# function must be a function named in llkeyboard.cpp
-
-FIRST_PERSON A NONE slide_left
-FIRST_PERSON D NONE slide_right
-FIRST_PERSON W NONE push_forward
-FIRST_PERSON S NONE push_backward
-FIRST_PERSON E NONE jump
-FIRST_PERSON C NONE push_down
-FIRST_PERSON F NONE toggle_fly
-
-FIRST_PERSON LEFT NONE slide_left
-FIRST_PERSON RIGHT NONE slide_right
-FIRST_PERSON UP NONE push_forward
-FIRST_PERSON DOWN NONE push_backward
-FIRST_PERSON PGUP NONE jump
-FIRST_PERSON PGDN NONE push_down
-FIRST_PERSON HOME NONE toggle_fly
-
-FIRST_PERSON PAD_LEFT NONE slide_left
-FIRST_PERSON PAD_RIGHT NONE slide_right
-FIRST_PERSON PAD_UP NONE push_forward
-FIRST_PERSON PAD_DOWN NONE push_backward
-FIRST_PERSON PAD_PGUP NONE jump
-FIRST_PERSON PAD_PGDN NONE push_down
-FIRST_PERSON PAD_HOME NONE toggle_fly
-FIRST_PERSON PAD_CENTER NONE stop_moving
-FIRST_PERSON PAD_ENTER NONE start_chat
-FIRST_PERSON PAD_DIVIDE NONE start_gesture
-
-FIRST_PERSON A SHIFT slide_left
-FIRST_PERSON D SHIFT slide_right
-FIRST_PERSON W SHIFT push_forward
-FIRST_PERSON S SHIFT push_backward
-FIRST_PERSON E SHIFT jump
-FIRST_PERSON C SHIFT push_down
-FIRST_PERSON F SHIFT toggle_fly
-
-FIRST_PERSON SPACE NONE stop_moving
-FIRST_PERSON ENTER NONE start_chat
-FIRST_PERSON DIVIDE NONE start_gesture
-
-FIRST_PERSON LEFT SHIFT slide_left
-FIRST_PERSON RIGHT SHIFT slide_right
-FIRST_PERSON UP SHIFT push_forward
-FIRST_PERSON DOWN SHIFT push_backward
-FIRST_PERSON PGUP SHIFT jump
-FIRST_PERSON PGDN SHIFT push_down
-
-FIRST_PERSON PAD_LEFT SHIFT slide_left
-FIRST_PERSON PAD_RIGHT SHIFT slide_right
-FIRST_PERSON PAD_UP SHIFT push_forward
-FIRST_PERSON PAD_DOWN SHIFT push_backward
-FIRST_PERSON PAD_PGUP SHIFT jump
-FIRST_PERSON PAD_PGDN SHIFT push_down
-FIRST_PERSON PAD_HOME SHIFT toggle_fly
-FIRST_PERSON PAD_ENTER SHIFT start_chat
-FIRST_PERSON PAD_DIVIDE SHIFT start_gesture
-
-THIRD_PERSON A NONE turn_left
-THIRD_PERSON D NONE turn_right
-THIRD_PERSON A SHIFT slide_left
-THIRD_PERSON D SHIFT slide_right
-THIRD_PERSON W NONE push_forward
-THIRD_PERSON S NONE push_backward
-THIRD_PERSON W SHIFT push_forward
-THIRD_PERSON S SHIFT push_backward
-THIRD_PERSON E NONE jump
-THIRD_PERSON C NONE push_down
-THIRD_PERSON E SHIFT jump
-THIRD_PERSON C SHIFT push_down
-
-THIRD_PERSON F NONE toggle_fly
-THIRD_PERSON F SHIFT toggle_fly
-
-THIRD_PERSON SPACE NONE stop_moving
-THIRD_PERSON ENTER NONE start_chat
-THIRD_PERSON DIVIDE NONE start_gesture
-
-THIRD_PERSON LEFT NONE turn_left
-THIRD_PERSON LEFT SHIFT slide_left
-THIRD_PERSON RIGHT NONE turn_right
-THIRD_PERSON RIGHT SHIFT slide_right
-THIRD_PERSON UP NONE push_forward
-THIRD_PERSON DOWN NONE push_backward
-THIRD_PERSON UP SHIFT push_forward
-THIRD_PERSON DOWN SHIFT push_backward
-THIRD_PERSON PGUP NONE jump
-THIRD_PERSON PGDN NONE push_down
-THIRD_PERSON PGUP SHIFT jump
-THIRD_PERSON PGDN SHIFT push_down
-THIRD_PERSON HOME SHIFT toggle_fly
-THIRD_PERSON HOME NONE toggle_fly
-
-THIRD_PERSON PAD_LEFT NONE turn_left
-THIRD_PERSON PAD_LEFT SHIFT slide_left
-THIRD_PERSON PAD_RIGHT NONE turn_right
-THIRD_PERSON PAD_RIGHT SHIFT slide_right
-THIRD_PERSON PAD_UP NONE push_forward
-THIRD_PERSON PAD_DOWN NONE push_backward
-THIRD_PERSON PAD_UP SHIFT push_forward
-THIRD_PERSON PAD_DOWN SHIFT push_backward
-THIRD_PERSON PAD_PGUP NONE jump
-THIRD_PERSON PAD_PGDN NONE push_down
-THIRD_PERSON PAD_PGUP SHIFT jump
-THIRD_PERSON PAD_PGDN SHIFT push_down
-THIRD_PERSON PAD_HOME NONE toggle_fly
-THIRD_PERSON PAD_HOME SHIFT toggle_fly
-THIRD_PERSON PAD_CENTER NONE stop_moving
-THIRD_PERSON PAD_CENTER SHIFT stop_moving
-THIRD_PERSON PAD_ENTER NONE start_chat
-THIRD_PERSON PAD_ENTER SHIFT start_chat
-THIRD_PERSON PAD_DIVIDE NONE start_gesture
-THIRD_PERSON PAD_DIVIDE SHIFT start_gesture
-
-# Camera controls in third person on Alt
-THIRD_PERSON LEFT ALT spin_around_cw
-THIRD_PERSON RIGHT ALT spin_around_ccw
-THIRD_PERSON UP ALT move_forward
-THIRD_PERSON DOWN ALT move_backward
-THIRD_PERSON PGUP ALT spin_over
-THIRD_PERSON PGDN ALT spin_under
-
-THIRD_PERSON A ALT spin_around_cw
-THIRD_PERSON D ALT spin_around_ccw
-THIRD_PERSON W ALT move_forward
-THIRD_PERSON S ALT move_backward
-THIRD_PERSON E ALT spin_over
-THIRD_PERSON C ALT spin_under
-
-THIRD_PERSON PAD_LEFT ALT spin_around_cw
-THIRD_PERSON PAD_RIGHT ALT spin_around_ccw
-THIRD_PERSON PAD_UP ALT move_forward
-THIRD_PERSON PAD_DOWN ALT move_backward
-THIRD_PERSON PAD_PGUP ALT spin_over
-THIRD_PERSON PAD_PGDN ALT spin_under
-THIRD_PERSON PAD_ENTER ALT start_chat
-THIRD_PERSON PAD_DIVIDE ALT start_gesture
-
-# mimic alt zoom behavior with keyboard only
-THIRD_PERSON A CTL_ALT spin_around_cw
-THIRD_PERSON D CTL_ALT spin_around_ccw
-THIRD_PERSON W CTL_ALT spin_over
-THIRD_PERSON S CTL_ALT spin_under
-THIRD_PERSON E CTL_ALT spin_over
-THIRD_PERSON C CTL_ALT spin_under
-
-THIRD_PERSON LEFT CTL_ALT spin_around_cw
-THIRD_PERSON RIGHT CTL_ALT spin_around_ccw
-THIRD_PERSON UP CTL_ALT spin_over
-THIRD_PERSON DOWN CTL_ALT spin_under
-THIRD_PERSON PGUP CTL_ALT spin_over
-THIRD_PERSON PGDN CTL_ALT spin_under
-
-THIRD_PERSON PAD_LEFT CTL_ALT spin_around_cw
-THIRD_PERSON PAD_RIGHT CTL_ALT spin_around_ccw
-THIRD_PERSON PAD_UP CTL_ALT spin_over
-THIRD_PERSON PAD_DOWN CTL_ALT spin_under
-THIRD_PERSON PAD_PGUP CTL_ALT spin_over
-THIRD_PERSON PAD_PGDN CTL_ALT spin_under
-THIRD_PERSON PAD_ENTER CTL_ALT start_chat
-THIRD_PERSON PAD_DIVIDE CTL_ALT start_gesture
-
-# Therefore pan on Alt-Shift
-THIRD_PERSON A CTL_ALT_SHIFT pan_left
-THIRD_PERSON D CTL_ALT_SHIFT pan_right
-THIRD_PERSON W CTL_ALT_SHIFT pan_up
-THIRD_PERSON S CTL_ALT_SHIFT pan_down
-
-THIRD_PERSON LEFT CTL_ALT_SHIFT pan_left
-THIRD_PERSON RIGHT CTL_ALT_SHIFT pan_right
-THIRD_PERSON UP CTL_ALT_SHIFT pan_up
-THIRD_PERSON DOWN CTL_ALT_SHIFT pan_down
-
-THIRD_PERSON PAD_LEFT CTL_ALT_SHIFT pan_left
-THIRD_PERSON PAD_RIGHT CTL_ALT_SHIFT pan_right
-THIRD_PERSON PAD_UP CTL_ALT_SHIFT pan_up
-THIRD_PERSON PAD_DOWN CTL_ALT_SHIFT pan_down
-THIRD_PERSON PAD_ENTER CTL_ALT_SHIFT start_chat
-THIRD_PERSON PAD_DIVIDE CTL_ALT_SHIFT start_gesture
-
-# Basic editing camera control
-EDIT A NONE spin_around_cw
-EDIT D NONE spin_around_ccw
-EDIT W NONE move_forward
-EDIT S NONE move_backward
-EDIT E NONE spin_over
-EDIT C NONE spin_under
-EDIT ENTER NONE start_chat
-EDIT DIVIDE NONE start_gesture
-EDIT PAD_ENTER NONE start_chat
-EDIT PAD_DIVIDE NONE start_gesture
-
-EDIT LEFT NONE spin_around_cw
-EDIT RIGHT NONE spin_around_ccw
-EDIT UP NONE move_forward
-EDIT DOWN NONE move_backward
-EDIT PGUP NONE spin_over
-EDIT PGDN NONE spin_under
-
-EDIT A SHIFT pan_left
-EDIT D SHIFT pan_right
-EDIT W SHIFT pan_up
-EDIT S SHIFT pan_down
-
-EDIT LEFT SHIFT pan_left
-EDIT RIGHT SHIFT pan_right
-EDIT UP SHIFT pan_up
-EDIT DOWN SHIFT pan_down
-
-# Walking works with ALT held down.
-EDIT A ALT slide_left
-EDIT D ALT slide_right
-EDIT W ALT push_forward
-EDIT S ALT push_backward
-EDIT E ALT jump
-EDIT C ALT push_down
-
-EDIT LEFT ALT slide_left
-EDIT RIGHT ALT slide_right
-EDIT UP ALT push_forward
-EDIT DOWN ALT push_backward
-EDIT PGUP ALT jump
-EDIT PGDN ALT push_down
-EDIT HOME ALT toggle_fly
-
-EDIT PAD_LEFT ALT slide_left
-EDIT PAD_RIGHT ALT slide_right
-EDIT PAD_UP ALT push_forward
-EDIT PAD_DOWN ALT push_backward
-EDIT PAD_PGUP ALT jump
-EDIT PAD_PGDN ALT push_down
-EDIT PAD_ENTER ALT start_chat
-EDIT PAD_DIVIDE ALT start_gesture
-
-SITTING A ALT spin_around_cw
-SITTING D ALT spin_around_ccw
-SITTING W ALT move_forward
-SITTING S ALT move_backward
-SITTING E ALT spin_over_sitting
-SITTING C ALT spin_under_sitting
-
-SITTING LEFT ALT spin_around_cw
-SITTING RIGHT ALT spin_around_ccw
-SITTING UP ALT move_forward
-SITTING DOWN ALT move_backward
-SITTING PGUP ALT spin_over
-SITTING PGDN ALT spin_under
-
-SITTING A CTL_ALT spin_around_cw
-SITTING D CTL_ALT spin_around_ccw
-SITTING W CTL_ALT spin_over
-SITTING S CTL_ALT spin_under
-SITTING E CTL_ALT spin_over
-SITTING C CTL_ALT spin_under
-
-SITTING LEFT CTL_ALT spin_around_cw
-SITTING RIGHT CTL_ALT spin_around_ccw
-SITTING UP CTL_ALT spin_over
-SITTING DOWN CTL_ALT spin_under
-SITTING PGUP CTL_ALT spin_over
-SITTING PGDN CTL_ALT spin_under
-
-
-SITTING A NONE spin_around_cw_sitting
-SITTING D NONE spin_around_ccw_sitting
-SITTING W NONE move_forward_sitting
-SITTING S NONE move_backward_sitting
-SITTING E NONE spin_over_sitting
-SITTING C NONE spin_under_sitting
-
-SITTING LEFT NONE spin_around_cw_sitting
-SITTING RIGHT NONE spin_around_ccw_sitting
-SITTING UP NONE move_forward_sitting
-SITTING DOWN NONE move_backward_sitting
-SITTING PGUP NONE spin_over_sitting
-SITTING PGDN NONE spin_under_sitting
-
-SITTING PAD_LEFT NONE spin_around_cw_sitting
-SITTING PAD_RIGHT NONE spin_around_ccw_sitting
-SITTING PAD_UP NONE move_forward_sitting
-SITTING PAD_DOWN NONE move_backward_sitting
-SITTING PAD_PGUP NONE spin_over_sitting
-SITTING PAD_PGDN NONE spin_under_sitting
-SITTING PAD_CENTER NONE stop_moving
-SITTING PAD_ENTER NONE start_chat
-SITTING PAD_DIVIDE NONE start_gesture
-
-# these are for passing controls when sitting on vehicles
-SITTING A SHIFT slide_left
-SITTING D SHIFT slide_right
-SITTING LEFT SHIFT slide_left
-SITTING RIGHT SHIFT slide_right
-
-SITTING PAD_LEFT SHIFT slide_left
-SITTING PAD_RIGHT SHIFT slide_right
-SITTING PAD_ENTER SHIFT start_chat
-SITTING PAD_DIVIDE SHIFT start_gesture
-
-# pan on Alt-Shift
-SITTING A CTL_ALT_SHIFT pan_left
-SITTING D CTL_ALT_SHIFT pan_right
-SITTING W CTL_ALT_SHIFT pan_up
-SITTING S CTL_ALT_SHIFT pan_down
-
-SITTING LEFT CTL_ALT_SHIFT pan_left
-SITTING RIGHT CTL_ALT_SHIFT pan_right
-SITTING UP CTL_ALT_SHIFT pan_up
-SITTING DOWN CTL_ALT_SHIFT pan_down
-
-SITTING PAD_LEFT CTL_ALT_SHIFT pan_left
-SITTING PAD_RIGHT CTL_ALT_SHIFT pan_right
-SITTING PAD_UP CTL_ALT_SHIFT pan_up
-SITTING PAD_DOWN CTL_ALT_SHIFT pan_down
-SITTING PAD_ENTER CTL_ALT_SHIFT start_chat
-SITTING PAD_DIVIDE CTL_ALT_SHIFT start_gesture
-
-SITTING ENTER NONE start_chat
-SITTING DIVIDE NONE start_gesture
-
-# Avatar editing camera controls
-EDIT_AVATAR A NONE edit_avatar_spin_cw
-EDIT_AVATAR D NONE edit_avatar_spin_ccw
-EDIT_AVATAR W NONE edit_avatar_move_forward
-EDIT_AVATAR S NONE edit_avatar_move_backward
-EDIT_AVATAR E NONE edit_avatar_spin_over
-EDIT_AVATAR C NONE edit_avatar_spin_under
-EDIT_AVATAR LEFT NONE edit_avatar_spin_cw
-EDIT_AVATAR RIGHT NONE edit_avatar_spin_ccw
-EDIT_AVATAR UP NONE edit_avatar_move_forward
-EDIT_AVATAR DOWN NONE edit_avatar_move_backward
-EDIT_AVATAR PGUP NONE edit_avatar_spin_over
-EDIT_AVATAR PGDN NONE edit_avatar_spin_under
-EDIT_AVATAR ENTER NONE start_chat
-EDIT_AVATAR DIVIDE NONE start_gesture
-EDIT_AVATAR PAD_LEFT NONE edit_avatar_spin_cw
-EDIT_AVATAR PAD_RIGHT NONE edit_avatar_spin_ccw
-EDIT_AVATAR PAD_UP NONE edit_avatar_move_forward
-EDIT_AVATAR PAD_DOWN NONE edit_avatar_move_backward
-EDIT_AVATAR PAD_PGUP NONE edit_avatar_spin_over
-EDIT_AVATAR PAD_PGDN NONE edit_avatar_spin_under
-EDIT_AVATAR PAD_ENTER NONE start_chat
-EDIT_AVATAR PAD_DIVIDE NONE start_gesture
diff --git a/indra/newview/app_settings/keys.xml b/indra/newview/app_settings/keys.xml
new file mode 100644
index 0000000000..d085475c6c
--- /dev/null
+++ b/indra/newview/app_settings/keys.xml
@@ -0,0 +1,350 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<keys>
+ <first_person>
+ <binding key="A" mask="NONE" command="slide_left"/>
+ <binding key="D" mask="NONE" command="slide_right"/>
+ <binding key="W" mask="NONE" command="push_forward"/>
+ <binding key="S" mask="NONE" command="push_backward"/>
+ <binding key="E" mask="NONE" command="jump"/>
+ <binding key="C" mask="NONE" command="push_down"/>
+ <binding key="F" mask="NONE" command="toggle_fly"/>
+
+ <binding key="LEFT" mask="NONE" command="slide_left"/>
+ <binding key="RIGHT" mask="NONE" command="slide_right"/>
+ <binding key="UP" mask="NONE" command="push_forward"/>
+ <binding key="DOWN" mask="NONE" command="push_backward"/>
+ <binding key="PGUP" mask="NONE" command="jump"/>
+ <binding key="PGDN" mask="NONE" command="push_down"/>
+ <binding key="HOME" mask="NONE" command="toggle_fly"/>
+
+ <binding key="PAD_LEFT" mask="NONE" command="slide_left"/>
+ <binding key="PAD_RIGHT" mask="NONE" command="slide_right"/>
+ <binding key="PAD_UP" mask="NONE" command="push_forward"/>
+ <binding key="PAD_DOWN" mask="NONE" command="push_backward"/>
+ <binding key="PAD_PGUP" mask="NONE" command="jump"/>
+ <binding key="PAD_PGDN" mask="NONE" command="push_down"/>
+ <binding key="PAD_HOME" mask="NONE" command="toggle_fly"/>
+ <binding key="PAD_CENTER" mask="NONE" command="stop_moving"/>
+ <binding key="PAD_ENTER" mask="NONE" command="start_chat"/>
+ <binding key="PAD_DIVIDE" mask="NONE" command="start_gesture"/>
+
+ <binding key="A" mask="SHIFT" command="slide_left"/>
+ <binding key="D" mask="SHIFT" command="slide_right"/>
+ <binding key="W" mask="SHIFT" command="push_forward"/>
+ <binding key="S" mask="SHIFT" command="push_backward"/>
+ <binding key="E" mask="SHIFT" command="jump"/>
+ <binding key="C" mask="SHIFT" command="push_down"/>
+ <binding key="F" mask="SHIFT" command="toggle_fly"/>
+
+ <binding key="SPACE" mask="NONE" command="stop_moving"/>
+ <binding key="ENTER" mask="NONE" command="start_chat"/>
+ <binding key="DIVIDE" mask="NONE" command="start_gesture"/>
+
+ <binding key="LEFT" mask="SHIFT" command="slide_left"/>
+ <binding key="RIGHT" mask="SHIFT" command="slide_right"/>
+ <binding key="UP" mask="SHIFT" command="push_forward"/>
+ <binding key="DOWN" mask="SHIFT" command="push_backward"/>
+ <binding key="PGUP" mask="SHIFT" command="jump"/>
+ <binding key="PGDN" mask="SHIFT" command="push_down"/>
+
+ <binding key="PAD_LEFT" mask="SHIFT" command="slide_left"/>
+ <binding key="PAD_RIGHT" mask="SHIFT" command="slide_right"/>
+ <binding key="PAD_UP" mask="SHIFT" command="push_forward"/>
+ <binding key="PAD_DOWN" mask="SHIFT" command="push_backward"/>
+ <binding key="PAD_PGUP" mask="SHIFT" command="jump"/>
+ <binding key="PAD_PGDN" mask="SHIFT" command="push_down"/>
+ <binding key="PAD_HOME" mask="SHIFT" command="toggle_fly"/>
+ <binding key="PAD_ENTER" mask="SHIFT" command="start_chat"/>
+ <binding key="PAD_DIVIDE" mask="SHIFT" command="start_gesture"/>
+ </first_person>
+ <third_person>
+ <binding key="A" mask="NONE" command="turn_left"/>
+ <binding key="D" mask="NONE" command="turn_right"/>
+ <binding key="A" mask="SHIFT" command="slide_left"/>
+ <binding key="D" mask="SHIFT" command="slide_right"/>
+ <binding key="W" mask="NONE" command="push_forward"/>
+ <binding key="S" mask="NONE" command="push_backward"/>
+ <binding key="W" mask="SHIFT" command="push_forward"/>
+ <binding key="S" mask="SHIFT" command="push_backward"/>
+ <binding key="E" mask="NONE" command="jump"/>
+ <binding key="C" mask="NONE" command="push_down"/>
+ <binding key="E" mask="SHIFT" command="jump"/>
+ <binding key="C" mask="SHIFT" command="push_down"/>
+
+ <binding key="F" mask="NONE" command="toggle_fly"/>
+ <binding key="F" mask="SHIFT" command="toggle_fly"/>
+
+ <binding key="SPACE" mask="NONE" command="stop_moving"/>
+ <binding key="ENTER" mask="NONE" command="start_chat"/>
+ <binding key="DIVIDE" mask="NONE" command="start_gesture"/>
+
+ <binding key="LEFT" mask="NONE" command="turn_left"/>
+ <binding key="LEFT" mask="SHIFT" command="slide_left"/>
+ <binding key="RIGHT" mask="NONE" command="turn_right"/>
+ <binding key="RIGHT" mask="SHIFT" command="slide_right"/>
+ <binding key="UP" mask="NONE" command="push_forward"/>
+ <binding key="DOWN" mask="NONE" command="push_backward"/>
+ <binding key="UP" mask="SHIFT" command="push_forward"/>
+ <binding key="DOWN" mask="SHIFT" command="push_backward"/>
+ <binding key="PGUP" mask="NONE" command="jump"/>
+ <binding key="PGDN" mask="NONE" command="push_down"/>
+ <binding key="PGUP" mask="SHIFT" command="jump"/>
+ <binding key="PGDN" mask="SHIFT" command="push_down"/>
+ <binding key="HOME" mask="SHIFT" command="toggle_fly"/>
+ <binding key="HOME" mask="NONE" command="toggle_fly"/>
+
+ <binding key="PAD_LEFT" mask="NONE" command="turn_left"/>
+ <binding key="PAD_LEFT" mask="SHIFT" command="slide_left"/>
+ <binding key="PAD_RIGHT" mask="NONE" command="turn_right"/>
+ <binding key="PAD_RIGHT" mask="SHIFT" command="slide_right"/>
+ <binding key="PAD_UP" mask="NONE" command="push_forward"/>
+ <binding key="PAD_DOWN" mask="NONE" command="push_backward"/>
+ <binding key="PAD_UP" mask="SHIFT" command="push_forward"/>
+ <binding key="PAD_DOWN" mask="SHIFT" command="push_backward"/>
+ <binding key="PAD_PGUP" mask="NONE" command="jump"/>
+ <binding key="PAD_PGDN" mask="NONE" command="push_down"/>
+ <binding key="PAD_PGUP" mask="SHIFT" command="jump"/>
+ <binding key="PAD_PGDN" mask="SHIFT" command="push_down"/>
+ <binding key="PAD_HOME" mask="NONE" command="toggle_fly"/>
+ <binding key="PAD_HOME" mask="SHIFT" command="toggle_fly"/>
+ <binding key="PAD_CENTER" mask="NONE" command="stop_moving"/>
+ <binding key="PAD_CENTER" mask="SHIFT" command="stop_moving"/>
+ <binding key="PAD_ENTER" mask="NONE" command="start_chat"/>
+ <binding key="PAD_ENTER" mask="SHIFT" command="start_chat"/>
+ <binding key="PAD_DIVIDE" mask="NONE" command="start_gesture"/>
+ <binding key="PAD_DIVIDE" mask="SHIFT" command="start_gesture"/>
+
+ <!--Camera controls in third person on Alt-->
+ <binding key="LEFT" mask="ALT" command="spin_around_cw"/>
+ <binding key="RIGHT" mask="ALT" command="spin_around_ccw"/>
+ <binding key="UP" mask="ALT" command="move_forward"/>
+ <binding key="DOWN" mask="ALT" command="move_backward"/>
+ <binding key="PGUP" mask="ALT" command="spin_over"/>
+ <binding key="PGDN" mask="ALT" command="spin_under"/>
+
+ <binding key="A" mask="ALT" command="spin_around_cw"/>
+ <binding key="D" mask="ALT" command="spin_around_ccw"/>
+ <binding key="W" mask="ALT" command="move_forward"/>
+ <binding key="S" mask="ALT" command="move_backward"/>
+ <binding key="E" mask="ALT" command="spin_over"/>
+ <binding key="C" mask="ALT" command="spin_under"/>
+
+ <binding key="PAD_LEFT" mask="ALT" command="spin_around_cw"/>
+ <binding key="PAD_RIGHT" mask="ALT" command="spin_around_ccw"/>
+ <binding key="PAD_UP" mask="ALT" command="move_forward"/>
+ <binding key="PAD_DOWN" mask="ALT" command="move_backward"/>
+ <binding key="PAD_PGUP" mask="ALT" command="spin_over"/>
+ <binding key="PAD_PGDN" mask="ALT" command="spin_under"/>
+ <binding key="PAD_ENTER" mask="ALT" command="start_chat"/>
+ <binding key="PAD_DIVIDE" mask="ALT" command="start_gesture"/>
+
+ <!--mimic alt zoom behavior with keyboard only-->
+ <binding key="A" mask="CTL_ALT" command="spin_around_cw"/>
+ <binding key="D" mask="CTL_ALT" command="spin_around_ccw"/>
+ <binding key="W" mask="CTL_ALT" command="spin_over"/>
+ <binding key="S" mask="CTL_ALT" command="spin_under"/>
+ <binding key="E" mask="CTL_ALT" command="spin_over"/>
+ <binding key="C" mask="CTL_ALT" command="spin_under"/>
+
+ <binding key="LEFT" mask="CTL_ALT" command="spin_around_cw"/>
+ <binding key="RIGHT" mask="CTL_ALT" command="spin_around_ccw"/>
+ <binding key="UP" mask="CTL_ALT" command="spin_over"/>
+ <binding key="DOWN" mask="CTL_ALT" command="spin_under"/>
+ <binding key="PGUP" mask="CTL_ALT" command="spin_over"/>
+ <binding key="PGDN" mask="CTL_ALT" command="spin_under"/>
+
+ <binding key="PAD_LEFT" mask="CTL_ALT" command="spin_around_cw"/>
+ <binding key="PAD_RIGHT" mask="CTL_ALT" command="spin_around_ccw"/>
+ <binding key="PAD_UP" mask="CTL_ALT" command="spin_over"/>
+ <binding key="PAD_DOWN" mask="CTL_ALT" command="spin_under"/>
+ <binding key="PAD_PGUP" mask="CTL_ALT" command="spin_over"/>
+ <binding key="PAD_PGDN" mask="CTL_ALT" command="spin_under"/>
+ <binding key="PAD_ENTER" mask="CTL_ALT" command="start_chat"/>
+ <binding key="PAD_DIVIDE" mask="CTL_ALT" command="start_gesture"/>
+
+ <!--Therefore pan on Alt-Shift-->
+ <binding key="A" mask="CTL_ALT_SHIFT" command="pan_left"/>
+ <binding key="D" mask="CTL_ALT_SHIFT" command="pan_right"/>
+ <binding key="W" mask="CTL_ALT_SHIFT" command="pan_up"/>
+ <binding key="S" mask="CTL_ALT_SHIFT" command="pan_down"/>
+
+ <binding key="LEFT" mask="CTL_ALT_SHIFT" command="pan_left"/>
+ <binding key="RIGHT" mask="CTL_ALT_SHIFT" command="pan_right"/>
+ <binding key="UP" mask="CTL_ALT_SHIFT" command="pan_up"/>
+ <binding key="DOWN" mask="CTL_ALT_SHIFT" command="pan_down"/>
+
+ <binding key="PAD_LEFT" mask="CTL_ALT_SHIFT" command="pan_left"/>
+ <binding key="PAD_RIGHT" mask="CTL_ALT_SHIFT" command="pan_right"/>
+ <binding key="PAD_UP" mask="CTL_ALT_SHIFT" command="pan_up"/>
+ <binding key="PAD_DOWN" mask="CTL_ALT_SHIFT" command="pan_down"/>
+ <binding key="PAD_ENTER" mask="CTL_ALT_SHIFT" command="start_chat"/>
+ <binding key="PAD_DIVIDE" mask="CTL_ALT_SHIFT" command="start_gesture"/>
+ </third_person>
+
+ # Basic editing camera control
+ <edit>
+ <binding key="A" mask="NONE" command="spin_around_cw"/>
+ <binding key="D" mask="NONE" command="spin_around_ccw"/>
+ <binding key="W" mask="NONE" command="move_forward"/>
+ <binding key="S" mask="NONE" command="move_backward"/>
+ <binding key="E" mask="NONE" command="spin_over"/>
+ <binding key="C" mask="NONE" command="spin_under"/>
+ <binding key="ENTER" mask="NONE" command="start_chat"/>
+ <binding key="DIVIDE" mask="NONE" command="start_gesture"/>
+ <binding key="PAD_ENTER" mask="NONE" command="start_chat"/>
+ <binding key="PAD_DIVIDE" mask="NONE" command="start_gesture"/>
+
+ <binding key="LEFT" mask="NONE" command="spin_around_cw"/>
+ <binding key="RIGHT" mask="NONE" command="spin_around_ccw"/>
+ <binding key="UP" mask="NONE" command="move_forward"/>
+ <binding key="DOWN" mask="NONE" command="move_backward"/>
+ <binding key="PGUP" mask="NONE" command="spin_over"/>
+ <binding key="PGDN" mask="NONE" command="spin_under"/>
+
+ <binding key="A" mask="SHIFT" command="pan_left"/>
+ <binding key="D" mask="SHIFT" command="pan_right"/>
+ <binding key="W" mask="SHIFT" command="pan_up"/>
+ <binding key="S" mask="SHIFT" command="pan_down"/>
+
+ <binding key="LEFT" mask="SHIFT" command="pan_left"/>
+ <binding key="RIGHT" mask="SHIFT" command="pan_right"/>
+ <binding key="UP" mask="SHIFT" command="pan_up"/>
+ <binding key="DOWN" mask="SHIFT" command="pan_down"/>
+
+ <!--Walking works with ALT held down.-->
+ <binding key="A" mask="ALT" command="slide_left"/>
+ <binding key="D" mask="ALT" command="slide_right"/>
+ <binding key="W" mask="ALT" command="push_forward"/>
+ <binding key="S" mask="ALT" command="push_backward"/>
+ <binding key="E" mask="ALT" command="jump"/>
+ <binding key="C" mask="ALT" command="push_down"/>
+
+ <binding key="LEFT" mask="ALT" command="slide_left"/>
+ <binding key="RIGHT" mask="ALT" command="slide_right"/>
+ <binding key="UP" mask="ALT" command="push_forward"/>
+ <binding key="DOWN" mask="ALT" command="push_backward"/>
+ <binding key="PGUP" mask="ALT" command="jump"/>
+ <binding key="PGDN" mask="ALT" command="push_down"/>
+ <binding key="HOME" mask="ALT" command="toggle_fly"/>
+
+ <binding key="PAD_LEFT" mask="ALT" command="slide_left"/>
+ <binding key="PAD_RIGHT" mask="ALT" command="slide_right"/>
+ <binding key="PAD_UP" mask="ALT" command="push_forward"/>
+ <binding key="PAD_DOWN" mask="ALT" command="push_backward"/>
+ <binding key="PAD_PGUP" mask="ALT" command="jump"/>
+ <binding key="PAD_PGDN" mask="ALT" command="push_down"/>
+ <binding key="PAD_ENTER" mask="ALT" command="start_chat"/>
+ <binding key="PAD_DIVIDE" mask="ALT" command="start_gesture"/>
+ </edit>
+ <sitting>
+ <binding key="A" mask="ALT" command="spin_around_cw"/>
+ <binding key="D" mask="ALT" command="spin_around_ccw"/>
+ <binding key="W" mask="ALT" command="move_forward"/>
+ <binding key="S" mask="ALT" command="move_backward"/>
+ <binding key="E" mask="ALT" command="spin_over_sitting"/>
+ <binding key="C" mask="ALT" command="spin_under_sitting"/>
+
+ <binding key="LEFT" mask="ALT" command="spin_around_cw"/>
+ <binding key="RIGHT" mask="ALT" command="spin_around_ccw"/>
+ <binding key="UP" mask="ALT" command="move_forward"/>
+ <binding key="DOWN" mask="ALT" command="move_backward"/>
+ <binding key="PGUP" mask="ALT" command="spin_over"/>
+ <binding key="PGDN" mask="ALT" command="spin_under"/>
+
+ <binding key="A" mask="CTL_ALT" command="spin_around_cw"/>
+ <binding key="D" mask="CTL_ALT" command="spin_around_ccw"/>
+ <binding key="W" mask="CTL_ALT" command="spin_over"/>
+ <binding key="S" mask="CTL_ALT" command="spin_under"/>
+ <binding key="E" mask="CTL_ALT" command="spin_over"/>
+ <binding key="C" mask="CTL_ALT" command="spin_under"/>
+
+ <binding key="LEFT" mask="CTL_ALT" command="spin_around_cw"/>
+ <binding key="RIGHT" mask="CTL_ALT" command="spin_around_ccw"/>
+ <binding key="UP" mask="CTL_ALT" command="spin_over"/>
+ <binding key="DOWN" mask="CTL_ALT" command="spin_under"/>
+ <binding key="PGUP" mask="CTL_ALT" command="spin_over"/>
+ <binding key="PGDN" mask="CTL_ALT" command="spin_under"/>
+
+
+ <binding key="A" mask="NONE" command="spin_around_cw_sitting"/>
+ <binding key="D" mask="NONE" command="spin_around_ccw_sitting"/>
+ <binding key="W" mask="NONE" command="move_forward_sitting"/>
+ <binding key="S" mask="NONE" command="move_backward_sitting"/>
+ <binding key="E" mask="NONE" command="spin_over_sitting"/>
+ <binding key="C" mask="NONE" command="spin_under_sitting"/>
+
+ <binding key="LEFT" mask="NONE" command="spin_around_cw_sitting"/>
+ <binding key="RIGHT" mask="NONE" command="spin_around_ccw_sitting"/>
+ <binding key="UP" mask="NONE" command="move_forward_sitting"/>
+ <binding key="DOWN" mask="NONE" command="move_backward_sitting"/>
+ <binding key="PGUP" mask="NONE" command="spin_over_sitting"/>
+ <binding key="PGDN" mask="NONE" command="spin_under_sitting"/>
+
+ <binding key="PAD_LEFT" mask="NONE" command="spin_around_cw_sitting"/>
+ <binding key="PAD_RIGHT" mask="NONE" command="spin_around_ccw_sitting"/>
+ <binding key="PAD_UP" mask="NONE" command="move_forward_sitting"/>
+ <binding key="PAD_DOWN" mask="NONE" command="move_backward_sitting"/>
+ <binding key="PAD_PGUP" mask="NONE" command="spin_over_sitting"/>
+ <binding key="PAD_PGDN" mask="NONE" command="spin_under_sitting"/>
+ <binding key="PAD_CENTER" mask="NONE" command="stop_moving"/>
+ <binding key="PAD_ENTER" mask="NONE" command="start_chat"/>
+ <binding key="PAD_DIVIDE" mask="NONE" command="start_gesture"/>
+
+ <!--these are for passing controls when sitting on vehicles-->
+ <binding key="A" mask="SHIFT" command="slide_left"/>
+ <binding key="D" mask="SHIFT" command="slide_right"/>
+ <binding key="LEFT" mask="SHIFT" command="slide_left"/>
+ <binding key="RIGHT" mask="SHIFT" command="slide_right"/>
+
+ <binding key="PAD_LEFT" mask="SHIFT" command="slide_left"/>
+ <binding key="PAD_RIGHT" mask="SHIFT" command="slide_right"/>
+ <binding key="PAD_ENTER" mask="SHIFT" command="start_chat"/>
+ <binding key="PAD_DIVIDE" mask="SHIFT" command="start_gesture"/>
+
+ <!--pan on Alt-Shift-->
+ <binding key="A" mask="CTL_ALT_SHIFT" command="pan_left"/>
+ <binding key="D" mask="CTL_ALT_SHIFT" command="pan_right"/>
+ <binding key="W" mask="CTL_ALT_SHIFT" command="pan_up"/>
+ <binding key="S" mask="CTL_ALT_SHIFT" command="pan_down"/>
+
+ <binding key="LEFT" mask="CTL_ALT_SHIFT" command="pan_left"/>
+ <binding key="RIGHT" mask="CTL_ALT_SHIFT" command="pan_right"/>
+ <binding key="UP" mask="CTL_ALT_SHIFT" command="pan_up"/>
+ <binding key="DOWN" mask="CTL_ALT_SHIFT" command="pan_down"/>
+
+ <binding key="PAD_LEFT" mask="CTL_ALT_SHIFT" command="pan_left"/>
+ <binding key="PAD_RIGHT" mask="CTL_ALT_SHIFT" command="pan_right"/>
+ <binding key="PAD_UP" mask="CTL_ALT_SHIFT" command="pan_up"/>
+ <binding key="PAD_DOWN" mask="CTL_ALT_SHIFT" command="pan_down"/>
+ <binding key="PAD_ENTER" mask="CTL_ALT_SHIFT" command="start_chat"/>
+ <binding key="PAD_DIVIDE" mask="CTL_ALT_SHIFT" command="start_gesture"/>
+
+ <binding key="ENTER" mask="NONE" command="start_chat"/>
+ <binding key="DIVIDE" mask="NONE" command="start_gesture"/>
+ </sitting>
+ <edit_avatar>
+ <!--Avatar editing camera controls-->
+ <binding key="A" mask="NONE" command="edit_avatar_spin_cw"/>
+ <binding key="D" mask="NONE" command="edit_avatar_spin_ccw"/>
+ <binding key="W" mask="NONE" command="edit_avatar_move_forward"/>
+ <binding key="S" mask="NONE" command="edit_avatar_move_backward"/>
+ <binding key="E" mask="NONE" command="edit_avatar_spin_over"/>
+ <binding key="C" mask="NONE" command="edit_avatar_spin_under"/>
+ <binding key="LEFT" mask="NONE" command="edit_avatar_spin_cw"/>
+ <binding key="RIGHT" mask="NONE" command="edit_avatar_spin_ccw"/>
+ <binding key="UP" mask="NONE" command="edit_avatar_move_forward"/>
+ <binding key="DOWN" mask="NONE" command="edit_avatar_move_backward"/>
+ <binding key="PGUP" mask="NONE" command="edit_avatar_spin_over"/>
+ <binding key="PGDN" mask="NONE" command="edit_avatar_spin_under"/>
+ <binding key="ENTER" mask="NONE" command="start_chat"/>
+ <binding key="DIVIDE" mask="NONE" command="start_gesture"/>
+ <binding key="PAD_LEFT" mask="NONE" command="edit_avatar_spin_cw"/>
+ <binding key="PAD_RIGHT" mask="NONE" command="edit_avatar_spin_ccw"/>
+ <binding key="PAD_UP" mask="NONE" command="edit_avatar_move_forward"/>
+ <binding key="PAD_DOWN" mask="NONE" command="edit_avatar_move_backward"/>
+ <binding key="PAD_PGUP" mask="NONE" command="edit_avatar_spin_over"/>
+ <binding key="PAD_PGDN" mask="NONE" command="edit_avatar_spin_under"/>
+ <binding key="PAD_ENTER" mask="NONE" command="start_chat"/>
+ <binding key="PAD_DIVIDE" mask="NONE" command="start_gesture"/>
+ </edit_avatar>
+</keys> \ No newline at end of file
diff --git a/indra/newview/app_settings/lindenlab.pem b/indra/newview/app_settings/lindenlab.pem
new file mode 100644
index 0000000000..cf88d0e047
--- /dev/null
+++ b/indra/newview/app_settings/lindenlab.pem
@@ -0,0 +1,27 @@
+-----BEGIN CERTIFICATE-----
+MIIEUDCCA7mgAwIBAgIJAN4ppNGwj6yIMA0GCSqGSIb3DQEBBAUAMIHMMQswCQYD
+VQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5j
+aXNjbzEZMBcGA1UEChMQTGluZGVuIExhYiwgSW5jLjEpMCcGA1UECxMgTGluZGVu
+IExhYiBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkxKTAnBgNVBAMTIExpbmRlbiBMYWIg
+Q2VydGlmaWNhdGUgQXV0aG9yaXR5MR8wHQYJKoZIhvcNAQkBFhBjYUBsaW5kZW5s
+YWIuY29tMB4XDTA1MDQyMTAyNDAzMVoXDTI1MDQxNjAyNDAzMVowgcwxCzAJBgNV
+BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNp
+c2NvMRkwFwYDVQQKExBMaW5kZW4gTGFiLCBJbmMuMSkwJwYDVQQLEyBMaW5kZW4g
+TGFiIENlcnRpZmljYXRlIEF1dGhvcml0eTEpMCcGA1UEAxMgTGluZGVuIExhYiBD
+ZXJ0aWZpY2F0ZSBBdXRob3JpdHkxHzAdBgkqhkiG9w0BCQEWEGNhQGxpbmRlbmxh
+Yi5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKXh1MThucdTbMg9bYBO
+rAm8yWns32YojB0PRfbq8rUjepEhTm3/13s0u399Uc202v4ejcGhkIDWJZd2NZMF
+oKrhmRfxGHSKPCuFaXC3jh0lRECj7k8FoPkcmaPjSyodrDFDUUuv+C06oYJoI+rk
+8REyal9NwgHvqCzOrZtiTXAdAgMBAAGjggE2MIIBMjAdBgNVHQ4EFgQUO1zK2e1f
+1wO1fHAjq6DTJobKDrcwggEBBgNVHSMEgfkwgfaAFDtcytntX9cDtXxwI6ug0yaG
+yg63oYHSpIHPMIHMMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEW
+MBQGA1UEBxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQTGluZGVuIExhYiwgSW5j
+LjEpMCcGA1UECxMgTGluZGVuIExhYiBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkxKTAn
+BgNVBAMTIExpbmRlbiBMYWIgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MR8wHQYJKoZI
+hvcNAQkBFhBjYUBsaW5kZW5sYWIuY29tggkA3imk0bCPrIgwDAYDVR0TBAUwAwEB
+/zANBgkqhkiG9w0BAQQFAAOBgQA/ZkgfvwHYqk1UIAKZS3kMCxz0HvYuEQtviwnu
+xA39CIJ65Zozs28Eg1aV9/Y+Of7TnWhW+U3J3/wD/GghaAGiKK6vMn9gJBIdBX/9
+e6ef37VGyiOEFFjnUIbuk0RWty0orN76q/lI/xjCi15XSA/VSq2j4vmnwfZcPTDu
+glmQ1A==
+-----END CERTIFICATE-----
+
diff --git a/indra/newview/app_settings/llsd.xsd b/indra/newview/app_settings/llsd.xsd
new file mode 100644
index 0000000000..34612d9faa
--- /dev/null
+++ b/indra/newview/app_settings/llsd.xsd
@@ -0,0 +1,131 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <!-- LLSD document has exactly one value -->
+ <xsd:element name="llsd">
+ <xsd:complexType>
+ <xsd:group ref="llsd-value" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <!-- Value is one of undef, boolean, integer, real,
+ uuid, string, date, binary, array, or map -->
+ <xsd:group name="llsd-value">
+ <xsd:choice>
+ <xsd:element ref="undef"/>
+ <xsd:element ref="boolean"/>
+ <xsd:element ref="integer"/>
+ <xsd:element ref="real"/>
+ <xsd:element ref="uuid"/>
+ <xsd:element ref="string"/>
+ <xsd:element ref="date"/>
+ <xsd:element ref="uri"/>
+ <xsd:element ref="binary"/>
+ <xsd:element ref="array"/>
+ <xsd:element ref="map"/>
+ </xsd:choice>
+ </xsd:group>
+
+ <!-- Undefined is an empty eleemnt -->
+ <xsd:element name="undef">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:length value="0" />
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:element>
+
+ <!-- Boolean is true or false -->
+ <xsd:element name="boolean">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="true" />
+ <xsd:enumeration value="false" />
+
+ <!-- In practice, these other serializations are seen: -->
+ <xsd:enumeration value="" />
+ <xsd:enumeration value="1" />
+ <xsd:enumeration value="0" />
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:element>
+
+ <!-- Integer is restricted to 32-bit signed values -->
+ <xsd:element name="integer">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:int" />
+ </xsd:simpleType>
+ </xsd:element>
+
+ <!-- Real is an IEEE 754 "double" value, including Infinities and NaN -->
+ <xsd:element name="real">
+ <xsd:simpleType>
+ <!-- TODO: xsd:double uses "INF", "-INF", and "NaN",
+ whereas LLSD prefers "Infinity", "-Infinity" and "NaN" -->
+ <xsd:restriction base="xsd:double" />
+ </xsd:simpleType>
+ </xsd:element>
+
+ <!-- UUID per RFC 4122 -->
+ <xsd:element name="uuid">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:pattern value="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|" />
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:element>
+
+ <!-- String is any sequence of Unicode characters -->
+ <xsd:element name="string">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string" />
+ </xsd:simpleType>
+ </xsd:element>
+
+ <!-- Date is ISO 8601 in UTC -->
+ <xsd:element name="date">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:dateTime">
+ <!-- Restrict to UTC (Z) times -->
+ <xsd:pattern value="[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]+)?Z" />
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:element>
+
+ <!-- URI per RFC 3986 -->
+ <xsd:element name="uri">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:anyURI" />
+ </xsd:simpleType>
+ </xsd:element>
+
+ <!-- Binary data is base64 encoded -->
+ <xsd:element name="binary">
+ <xsd:simpleType>
+ <!-- TODO: Require encoding attribute? -->
+ <xsd:restriction base="xsd:base64Binary" />
+ </xsd:simpleType>
+ </xsd:element>
+
+ <!-- Array is a sequence of zero or more values -->
+ <xsd:element name="array">
+ <xsd:complexType>
+ <xsd:group minOccurs="0" maxOccurs="unbounded" ref="llsd-value" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <!-- Map is a sequence of zero or more key/value pairs -->
+ <xsd:element name="map">
+ <xsd:complexType>
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="key">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string" />
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:group ref="llsd-value" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+</xsd:schema>
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 402a0e85c4..ef6f8fd3ee 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" ?>
-<llsd>
+<llsd xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="llsd.xsd">
<map>
<key>CrashHostUrl</key>
<map>
@@ -607,6 +608,17 @@
<key>Value</key>
<integer>2</integer>
</map>
+ <key>AvatarPickerURL</key>
+ <map>
+ <key>Comment</key>
+ <string>Avatar picker contents</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string>http://interest.secondlife.com/viewer/avatar</string>
+ </map>
<key>AvatarBakedTextureUploadTimeout</key>
<map>
<key>Comment</key>
@@ -674,6 +686,39 @@
<key>Value</key>
<string>http://www.secondlife.com</string>
</map>
+ <key>BrowserIgnoreSSLCertErrors</key>
+ <map>
+ <key>Comment</key>
+ <string>FOR TESTING ONLY: Tell the built-in web browser to ignore SSL cert errors.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>BrowserUseDefaultCAFile</key>
+ <map>
+ <key>Comment</key>
+ <string>Tell the built-in web browser to use the CA.pem file shipped with the client.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
+ <key>BrowserCAFilePath</key>
+ <map>
+ <key>Comment</key>
+ <string>Tell the built-in web browser the path to an alternative CA.pem file (only used if BrowserUseDefaultCAFile is false).</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string></string>
+ </map>
<key>BlockAvatarAppearanceMessages</key>
<map>
<key>Comment</key>
@@ -2556,7 +2601,18 @@
<key>Value</key>
<integer>10</integer>
</map>
- <key>DisableCameraConstraints</key>
+ <key>DestinationGuideURL</key>
+ <map>
+ <key>Comment</key>
+ <string>Destination guide contents</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string>http://www.secondlife.com</string>
+ </map>
+ <key>DisableCameraConstraints</key>
<map>
<key>Comment</key>
<string>Disable the normal bounds put on the camera by avatar position</string>
@@ -2578,6 +2634,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>DisableExternalBrowser</key>
+ <map>
+ <key>Comment</key>
+ <string>Disable opening an external browser.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>DisableRendering</key>
<map>
<key>Comment</key>
@@ -2589,6 +2656,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>DisableTextHyperlinkActions</key>
+ <map>
+ <key>Comment</key>
+ <string>Disable highlighting and linking of URLs in XUI text boxes</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>DisableVerticalSync</key>
<map>
<key>Comment</key>
@@ -2732,6 +2810,28 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>ClickActionBuyEnabled</key>
+ <map>
+ <key>Comment</key>
+ <string>Enable click to buy actions in tool pie menu</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
+ <key>ClickActionPayEnabled</key>
+ <map>
+ <key>Comment</key>
+ <string>Enable click to pay actions in tool pie menu</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>DoubleClickAutoPilot</key>
<map>
<key>Comment</key>
@@ -2875,6 +2975,39 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>EnableGrab</key>
+ <map>
+ <key>Comment</key>
+ <string>Use Ctrl+mouse to grab and manipulate objects</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
+ <key>EnableAltZoom</key>
+ <map>
+ <key>Comment</key>
+ <string>Use Alt+mouse to look at and zoom in on objects</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
+ <key>EnableMouselook</key>
+ <map>
+ <key>Comment</key>
+ <string>Allow first person perspective and mouse control of camera</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>EnableRippleWater</key>
<map>
<key>Comment</key>
@@ -3568,72 +3701,6 @@
<key>Value</key>
<real>0.5</real>
</map>
- <key>FontMonospace</key>
- <map>
- <key>Comment</key>
- <string>Name of monospace font that definitely exists (Truetype file name)</string>
- <key>Persist</key>
- <integer>0</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string>DejaVuSansMono.ttf</string>
- </map>
- <key>FontSansSerif</key>
- <map>
- <key>Comment</key>
- <string>Name of primary sans-serif font that definitely exists (Truetype file name)</string>
- <key>Persist</key>
- <integer>0</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string>MtBkLfRg.ttf</string>
- </map>
- <key>FontSansSerifBundledFallback</key>
- <map>
- <key>Comment</key>
- <string>Name of secondary sans-serif font that definitely exists (Truetype file name)</string>
- <key>Persist</key>
- <integer>0</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string>DejaVuSansCondensed.ttf</string>
- </map>
- <key>FontSansSerifBold</key>
- <map>
- <key>Comment</key>
- <string>Name of bold font (Truetype file name)</string>
- <key>Persist</key>
- <integer>0</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string>MtBdLfRg.ttf</string>
- </map>
- <key>FontSansSerifFallback</key>
- <map>
- <key>Comment</key>
- <string>Name of sans-serif font (Truetype file name)</string>
- <key>Persist</key>
- <integer>0</integer>
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
- <string />
- </map>
- <key>FontSansSerifFallbackScale</key>
- <map>
- <key>Comment</key>
- <string>Scale of fallback font relative to huge font (fraction of huge font size)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>1.0</real>
- </map>
<key>FontScreenDPI</key>
<map>
<key>Comment</key>
@@ -3645,61 +3712,6 @@
<key>Value</key>
<real>96.0</real>
</map>
- <key>FontSizeHuge</key>
- <map>
- <key>Comment</key>
- <string>Size of huge font (points, or 1/72 of an inch)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>16.0</real>
- </map>
- <key>FontSizeLarge</key>
- <map>
- <key>Comment</key>
- <string>Size of large font (points, or 1/72 of an inch)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>12.0</real>
- </map>
- <key>FontSizeMedium</key>
- <map>
- <key>Comment</key>
- <string>Size of medium font (points, or 1/72 of an inch)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>10.0</real>
- </map>
- <key>FontSizeMonospace</key>
- <map>
- <key>Comment</key>
- <string>Size of monospaced font (points, or 1/72 of an inch)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>8.1</real>
- </map>
- <key>FontSizeSmall</key>
- <map>
- <key>Comment</key>
- <string>Size of small font (points, or 1/72 of an inch)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>F32</string>
- <key>Value</key>
- <real>9.0</real>
- </map>
<key>ForceAssetFail</key>
<map>
<key>Comment</key>
@@ -3892,7 +3904,7 @@
<key>Comment</key>
<string>URL pattern for help page; arguments will be encoded; see llviewerhelp.cpp:buildHelpURL for arguments</string>
<key>Persist</key>
- <integer>0</integer>
+ <integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
@@ -3920,6 +3932,17 @@
<key>Value</key>
<string>http://search.secondlife.com/viewer/[CATEGORY]/?q=[QUERY]&amp;p=[AUTH_TOKEN]&amp;r=[MATURITY]&amp;lang=[LANGUAGE]&amp;g=[GODLIKE]&amp;sid=[SESSION_ID]&amp;rid=[REGION_ID]&amp;pid=[PARCEL_ID]&amp;channel=[CHANNEL]&amp;version=[VERSION]&amp;major=[VERSION_MAJOR]&amp;minor=[VERSION_MINOR]&amp;patch=[VERSION_PATCH]&amp;build=[VERSION_BUILD]</string>
</map>
+ <key>WebProfileURL</key>
+ <map>
+ <key>Comment</key>
+ <string>URL for Web Profiles</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string>https://my.secondlife.com/[AGENT_NAME]</string>
+ </map>
<key>HighResSnapshot</key>
<map>
<key>Comment</key>
@@ -3942,6 +3965,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>HostID</key>
+ <map>
+ <key>Comment</key>
+ <string>Machine identifier for hosted Second Life instances</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string />
+ </map>
<key>HtmlHelpLastPage</key>
<map>
<key>Comment</key>
@@ -3980,7 +4014,7 @@
<key>Comment</key>
<string>Ignore all notifications so we never need user input on them.</string>
<key>Persist</key>
- <integer>0</integer>
+ <integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
@@ -4614,6 +4648,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>LocalFileSystemBrowsingEnabled</key>
+ <map>
+ <key>Comment</key>
+ <string>Enable/disable access to the local file system via the file picker</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>LoginSRVTimeout</key>
<map>
<key>Comment</key>
@@ -4746,6 +4791,17 @@
<key>Value</key>
<string>http://map.secondlife.com.s3.amazonaws.com/</string>
</map>
+ <key>CurrentMapServerURL</key>
+ <map>
+ <key>Comment</key>
+ <string>Current Session World map URL</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string></string>
+ </map>
<key>MapShowEvents</key>
<map>
<key>Comment</key>
@@ -5241,61 +5297,6 @@
<key>Value</key>
<real>60.0</real>
</map>
- <key>MeanCollisionBump</key>
- <map>
- <key>Comment</key>
- <string>You have experienced an abuse of being bumped by an object or avatar</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>MeanCollisionPhysical</key>
- <map>
- <key>Comment</key>
- <string>You have experienced an abuse from a physical object</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>MeanCollisionPushObject</key>
- <map>
- <key>Comment</key>
- <string>You have experienced an abuse of being pushed by a scripted object</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>MeanCollisionScripted</key>
- <map>
- <key>Comment</key>
- <string>You have experienced an abuse from a scripted object</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>MeanCollisionSelected</key>
- <map>
- <key>Comment</key>
- <string>You have experienced an abuse of being pushed via a selected object</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>MediaControlFadeTime</key>
<map>
<key>Comment</key>
@@ -6568,6 +6569,28 @@
<key>Value</key>
<real>0.0</real>
</map>
+ <key>QuitAfterSecondsOfAFK</key>
+ <map>
+ <key>Comment</key>
+ <string>The duration allowed after being AFK before quitting.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>0.0</real>
+ </map>
+ <key>QuitOnLoginActivated</key>
+ <map>
+ <key>Comment</key>
+ <string>Quit if login page is activated (used when auto login is on and users must not be able to login manually)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>RadioLandBrushAction</key>
<map>
<key>Comment</key>
@@ -6604,7 +6627,18 @@
<key>MediaBrowserWindowLimit</key>
<map>
<key>Comment</key>
- <string>Maximum number of media brower windows that can be open at once (0 for no limit)</string>
+ <string>Maximum number of media brower windows that can be open at once in the media browser floater (0 for no limit)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>5</integer>
+ </map>
+ <key>WebContentWindowLimit</key>
+ <map>
+ <key>Comment</key>
+ <string>Maximum number of web brower windows that can be open at once in the Web content floater (0 for no limit)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -7825,17 +7859,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>RenderFastUI</key>
- <map>
- <key>Comment</key>
- <string>[NOT USED]</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>RenderFlexTimeFactor</key>
<map>
<key>Comment</key>
@@ -8351,6 +8374,17 @@
<key>Value</key>
<real>1.0</real>
</map>
+ <key>RenderTrackerBeacon</key>
+ <map>
+ <key>Comment</key>
+ <string>Display tracking arrow and beacon to target avatar, teleport destination</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>RenderTransparentWater</key>
<map>
<key>Comment</key>
@@ -8538,6 +8572,17 @@
<key>Value</key>
<integer>512</integer>
</map>
+ <key>RenderParcelSelection</key>
+ <map>
+ <key>Comment</key>
+ <string>Display selected parcel outline</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>RotateRight</key>
<map>
<key>Comment</key>
@@ -8626,6 +8671,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>ScriptsCanShowUI</key>
+ <map>
+ <key>Comment</key>
+ <string>Allow LSL calls (such as LLMapDestination) to spawn viewer UI</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>SecondLifeEnterprise</key>
<map>
<key>Comment</key>
@@ -9990,6 +10046,17 @@
<key>Value</key>
<real>500.0</real>
</map>
+ <key>UpdaterMaximumBandwidth</key>
+ <map>
+ <key>Comment</key>
+ <string>Maximum allowable downstream bandwidth for updater service (kilo bits per second)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>500.0</real>
+ </map>
<key>ToolTipDelay</key>
<map>
<key>Comment</key>
@@ -11090,16 +11157,16 @@
<key>Value</key>
<integer>15</integer>
</map>
- <key>UpdaterServiceActive</key>
+ <key>UpdaterServiceSetting</key>
<map>
<key>Comment</key>
- <string>Enable or disable the updater service.</string>
+ <string>Configure updater service.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
- <string>Boolean</string>
+ <string>U32</string>
<key>Value</key>
- <integer>1</integer>
+ <integer>3</integer>
</map>
<key>UpdaterServiceCheckPeriod</key>
<map>
@@ -11597,6 +11664,28 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>VoiceCallsRejectAll</key>
+ <map>
+ <key>Comment</key>
+ <string>Silently reject all incoming voice calls.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>VoiceDisableMic</key>
+ <map>
+ <key>Comment</key>
+ <string>Completely disable the ability to open the mic.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>VoiceEffectExpiryWarningTime</key>
<map>
<key>Comment</key>
@@ -11905,6 +11994,17 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>WindowFullScreen</key>
+ <map>
+ <key>Comment</key>
+ <string>SL viewer window full screen</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>WindowHeight</key>
<map>
<key>Comment</key>
@@ -12202,6 +12302,7 @@
<key>Comment</key>
<string>Maximum texture width for user uploaded textures</string>
<key>Persist</key>
+ <integer>1</integer>
<key>Type</key>
<string>S32</string>
<key>Value</key>
@@ -12241,6 +12342,7 @@
<key>Value</key>
<array>
<string>snapshot</string>
+ <string>postcard</string>
<string>mini_map</string>
</array>
</map>
@@ -12308,6 +12410,17 @@
<key>Type</key>
<string>F32</string>
<key>Value</key>
+ <real>1200.0</real>
+ </map>
+ <key>AvatarPickerHintTimeout</key>
+ <map>
+ <key>Comment</key>
+ <string>Number of seconds to wait before telling resident about avatar picker.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
<real>600.0</real>
</map>
<key>SidePanelHintTimeout</key>
@@ -12332,5 +12445,16 @@
<key>Value</key>
<string>name</string>
</map>
+ <key>ReleaseNotesURL</key>
+ <map>
+ <key>Comment</key>
+ <string>Release notes URL template</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string>http://secondlife.com/app/releasenotes/?channel=[CHANNEL]&amp;version=[VERSION]</string>
+ </map>
</map>
</llsd>
diff --git a/indra/newview/app_settings/shaders/shader_heirarchy.txt b/indra/newview/app_settings/shaders/shader_hierarchy.txt
index d8bbf69b38..d8bbf69b38 100644
--- a/indra/newview/app_settings/shaders/shader_heirarchy.txt
+++ b/indra/newview/app_settings/shaders/shader_hierarchy.txt
diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt
index a95abd7dd1..a82c3da4c5 100644
--- a/indra/newview/featuretable.txt
+++ b/indra/newview/featuretable.txt
@@ -135,7 +135,7 @@ RenderFlexTimeFactor 1 1.0
RenderGlowResolutionPow 1 9
RenderMaxPartCount 1 4096
RenderObjectBump 1 1
-RenderReflectionDetail 1 2
+RenderReflectionDetail 1 0
RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
RenderTransparentWater 1 1
diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt
index a52b32355d..a2cd4b834c 100644
--- a/indra/newview/featuretable_linux.txt
+++ b/indra/newview/featuretable_linux.txt
@@ -134,7 +134,7 @@ RenderFlexTimeFactor 1 1.0
RenderGlowResolutionPow 1 9
RenderMaxPartCount 1 4096
RenderObjectBump 1 1
-RenderReflectionDetail 1 2
+RenderReflectionDetail 1 0
RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
RenderTransparentWater 1 1
diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt
index 6dabef53a8..3ad7f4e892 100644
--- a/indra/newview/featuretable_mac.txt
+++ b/indra/newview/featuretable_mac.txt
@@ -133,7 +133,7 @@ RenderGlowResolutionPow 1 9
RenderLightingDetail 1 1
RenderMaxPartCount 1 4096
RenderObjectBump 1 1
-RenderReflectionDetail 1 2
+RenderReflectionDetail 1 0
RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
RenderTransparentWater 1 1
diff --git a/indra/newview/featuretable_xp.txt b/indra/newview/featuretable_xp.txt
index a09ba17c62..38e6bb1e5e 100644
--- a/indra/newview/featuretable_xp.txt
+++ b/indra/newview/featuretable_xp.txt
@@ -135,7 +135,7 @@ RenderFlexTimeFactor 1 1.0
RenderGlowResolutionPow 1 9
RenderMaxPartCount 1 4096
RenderObjectBump 1 1
-RenderReflectionDetail 1 2
+RenderReflectionDetail 1 0
RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
RenderTransparentWater 1 1
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 001a6a8851..77552663ab 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -218,7 +218,10 @@ LLAgent::LLAgent() :
mFirstLogin(FALSE),
mGenderChosen(FALSE),
- mAppearanceSerialNum(0)
+ mAppearanceSerialNum(0),
+
+ mMouselookModeInSignal(NULL),
+ mMouselookModeOutSignal(NULL)
{
for (U32 i = 0; i < TOTAL_CONTROLS; i++)
{
@@ -269,6 +272,9 @@ LLAgent::~LLAgent()
{
cleanup();
+ delete mMouselookModeInSignal;
+ delete mMouselookModeOutSignal;
+
// *Note: this is where LLViewerCamera::getInstance() used to be deleted.
}
@@ -637,6 +643,9 @@ void LLAgent::setRegion(LLViewerRegion *regionp)
// Update all of the regions.
LLWorld::getInstance()->updateAgentOffset(mAgentOriginGlobal);
}
+
+ // Pass new region along to metrics components that care about this level of detail.
+ LLAppViewer::metricsUpdateRegion(regionp->getHandle());
}
mRegionp = regionp;
@@ -1732,6 +1741,11 @@ void LLAgent::endAnimationUpdateUI()
LLFloaterCamera::onLeavingMouseLook();
+ if (mMouselookModeOutSignal)
+ {
+ (*mMouselookModeOutSignal)();
+ }
+
// Only pop if we have pushed...
if (TRUE == mViewsPushed)
{
@@ -1837,6 +1851,11 @@ void LLAgent::endAnimationUpdateUI()
mViewsPushed = TRUE;
+ if (mMouselookModeInSignal)
+ {
+ (*mMouselookModeInSignal)();
+ }
+
// hide all floaters except the mini map
#if 0 // Use this once all floaters are registered
@@ -1896,7 +1915,6 @@ void LLAgent::endAnimationUpdateUI()
}
}
}
-
}
else if (gAgentCamera.getCameraMode() == CAMERA_MODE_CUSTOMIZE_AVATAR)
{
@@ -1928,6 +1946,18 @@ void LLAgent::endAnimationUpdateUI()
gAgentCamera.updateLastCamera();
}
+boost::signals2::connection LLAgent::setMouselookModeInCallback( const camera_signal_t::slot_type& cb )
+{
+ if (!mMouselookModeInSignal) mMouselookModeInSignal = new camera_signal_t();
+ return mMouselookModeInSignal->connect(cb);
+}
+
+boost::signals2::connection LLAgent::setMouselookModeOutCallback( const camera_signal_t::slot_type& cb )
+{
+ if (!mMouselookModeOutSignal) mMouselookModeOutSignal = new camera_signal_t();
+ return mMouselookModeOutSignal->connect(cb);
+}
+
//-----------------------------------------------------------------------------
// heardChat()
//-----------------------------------------------------------------------------
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index aebebad96a..896408c0dd 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -39,6 +39,8 @@
#include "llvoavatardefines.h"
#include "llslurl.h"
+#include <boost/signals2.hpp>
+
extern const BOOL ANIMATE;
extern const U8 AGENT_STATE_TYPING; // Typing indication
extern const U8 AGENT_STATE_EDITING; // Set when agent has objects selected
@@ -410,7 +412,13 @@ public:
BOOL getCustomAnim() const { return mCustomAnim; }
void setCustomAnim(BOOL anim) { mCustomAnim = anim; }
+ typedef boost::signals2::signal<void ()> camera_signal_t;
+ boost::signals2::connection setMouselookModeInCallback( const camera_signal_t::slot_type& cb );
+ boost::signals2::connection setMouselookModeOutCallback( const camera_signal_t::slot_type& cb );
+
private:
+ camera_signal_t* mMouselookModeInSignal;
+ camera_signal_t* mMouselookModeOutSignal;
BOOL mCustomAnim; // Current animation is ANIM_AGENT_CUSTOMIZE ?
LLAnimPauseRequest mPauseRequest;
BOOL mViewsPushed; // Keep track of whether or not we have pushed views
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index 7c953cd2dc..f01d5ff1f5 100644
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -2041,7 +2041,7 @@ void LLAgentCamera::resetCamera()
//-----------------------------------------------------------------------------
void LLAgentCamera::changeCameraToMouselook(BOOL animate)
{
- if (LLViewerJoystick::getInstance()->getOverrideCamera())
+ if (!gSavedSettings.getBOOL("EnableMouselook") || LLViewerJoystick::getInstance()->getOverrideCamera())
{
return;
}
@@ -2695,6 +2695,9 @@ void LLAgentCamera::lookAtLastChat()
new_camera_pos -= delta_pos * 0.4f;
new_camera_pos += left * 0.3f;
new_camera_pos += up * 0.2f;
+
+ setFocusOnAvatar(FALSE, FALSE);
+
if (chatter_av->mHeadp)
{
setFocusGlobal(gAgent.getPosGlobalFromAgent(chatter_av->mHeadp->getWorldPosition()), gAgent.getLastChatter());
@@ -2705,7 +2708,6 @@ void LLAgentCamera::lookAtLastChat()
setFocusGlobal(chatter->getPositionGlobal(), gAgent.getLastChatter());
mCameraFocusOffsetTarget = gAgent.getPosGlobalFromAgent(new_camera_pos) - chatter->getPositionGlobal();
}
- setFocusOnAvatar(FALSE, TRUE);
}
else
{
@@ -2725,9 +2727,10 @@ void LLAgentCamera::lookAtLastChat()
new_camera_pos += left * 0.3f;
new_camera_pos += up * 0.2f;
+ setFocusOnAvatar(FALSE, FALSE);
+
setFocusGlobal(chatter->getPositionGlobal(), gAgent.getLastChatter());
mCameraFocusOffsetTarget = gAgent.getPosGlobalFromAgent(new_camera_pos) - chatter->getPositionGlobal();
- setFocusOnAvatar(FALSE, TRUE);
}
}
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 4e0bfb2e22..80734b0d41 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -2947,3 +2947,32 @@ void wear_multiple(const uuid_vec_t& ids, bool replace)
}
}
+// SLapp for easy-wearing of a stock (library) avatar
+//
+class LLWearFolderHandler : public LLCommandHandler
+{
+public:
+ // not allowed from outside the app
+ LLWearFolderHandler() : LLCommandHandler("wear_folder", UNTRUSTED_BLOCK) { }
+
+ bool handle(const LLSD& tokens, const LLSD& query_map,
+ LLMediaCtrl* web)
+ {
+ LLPointer<LLInventoryCategory> category = new LLInventoryCategory(query_map["folder_id"],
+ LLUUID::null,
+ LLFolderType::FT_CLOTHING,
+ "Quick Appearance");
+ LLSD::UUID folder_uuid = query_map["folder_id"].asUUID();
+ if ( gInventory.getCategory( folder_uuid ) != NULL )
+ {
+ LLAppearanceMgr::getInstance()->wearInventoryCategory(category, true, false);
+
+ // *TODOw: This may not be necessary if initial outfit is chosen already -- josh
+ gAgent.setGenderChosen(TRUE);
+ }
+
+ return true;
+ }
+};
+
+LLWearFolderHandler gWearFolderHandler;
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 6c07974f69..3a98c23e05 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -80,6 +80,8 @@
#include "llfeaturemanager.h"
#include "llurlmatch.h"
#include "lltextutil.h"
+#include "lllogininstance.h"
+#include "llprogressview.h"
#include "llweb.h"
#include "llsecondlifeurls.h"
@@ -192,6 +194,7 @@
#include "llparcel.h"
#include "llavatariconctrl.h"
#include "llgroupiconctrl.h"
+#include "llviewerassetstats.h"
// Include for security api initialization
#include "llsecapi.h"
@@ -336,6 +339,14 @@ static std::string gWindowTitle;
LLAppViewer::LLUpdaterInfo *LLAppViewer::sUpdaterInfo = NULL ;
+//----------------------------------------------------------------------------
+// Metrics logging control constants
+//----------------------------------------------------------------------------
+static const F32 METRICS_INTERVAL_DEFAULT = 600.0;
+static const F32 METRICS_INTERVAL_QA = 30.0;
+static F32 app_metrics_interval = METRICS_INTERVAL_DEFAULT;
+static bool app_metrics_qa_mode = false;
+
void idle_afk_check()
{
// check idle timers
@@ -505,6 +516,9 @@ static void settings_modify()
gSavedSettings.setBOOL("VectorizeEnable", FALSE );
gSavedSettings.setU32("VectorizeProcessor", 0 );
gSavedSettings.setBOOL("VectorizeSkin", FALSE);
+
+ // disable fullscreen mode, unsupported
+ gSavedSettings.setBOOL("WindowFullScreen", FALSE);
#endif
}
@@ -590,10 +604,14 @@ LLAppViewer::LLAppViewer() :
setupErrorHandling();
sInstance = this;
gLoggedInTime.stop();
+
+ LLLoginInstance::instance().setUpdaterService(mUpdater.get());
}
LLAppViewer::~LLAppViewer()
{
+ LLLoginInstance::instance().setUpdaterService(0);
+
destroyMainloopTimeout();
// If we got to this destructor somehow, the app didn't hang.
@@ -652,6 +670,21 @@ bool LLAppViewer::init()
// Called before threads are created.
LLCurl::initClass();
LLMachineID::init();
+
+ {
+ // Viewer metrics initialization
+ static LLCachedControl<bool> metrics_submode(gSavedSettings,
+ "QAModeMetrics",
+ false,
+ "Enables QA features (logging, faster cycling) for metrics collector");
+
+ if (metrics_submode)
+ {
+ app_metrics_qa_mode = true;
+ app_metrics_interval = METRICS_INTERVAL_QA;
+ }
+ LLViewerAssetStatsFF::init();
+ }
initThreads();
writeSystemInfo();
@@ -823,16 +856,22 @@ bool LLAppViewer::init()
gGLManager.getGLInfo(gDebugInfo);
gGLManager.printGLInfoString();
- //load key settings
- bind_keyboard_functions();
-
// Load Default bindings
- if (!gViewerKeyboard.loadBindings(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"keys.ini")))
+ std::string key_bindings_file = gDirUtilp->findFile("keys.xml",
+ gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, ""),
+ gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, ""));
+
+
+ if (!gViewerKeyboard.loadBindingsXML(key_bindings_file))
{
- LL_ERRS("InitInfo") << "Unable to open keys.ini" << LL_ENDL;
+ std::string key_bindings_file = gDirUtilp->findFile("keys.ini",
+ gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, ""),
+ gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, ""));
+ if (!gViewerKeyboard.loadBindings(key_bindings_file))
+ {
+ LL_ERRS("InitInfo") << "Unable to open keys.ini" << LL_ENDL;
+ }
}
- // Load Custom bindings (override defaults)
- gViewerKeyboard.loadBindings(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"custom_keys.ini"));
// If we don't have the right GL requirements, exit.
if (!gGLManager.mHasRequirements && !gNoRender)
@@ -1310,6 +1349,21 @@ bool LLAppViewer::mainLoop()
return true;
}
+void LLAppViewer::flushVFSIO()
+{
+ while (1)
+ {
+ S32 pending = LLVFSThread::updateClass(0);
+ pending += LLLFSThread::updateClass(0);
+ if (!pending)
+ {
+ break;
+ }
+ llinfos << "Waiting for pending IO to finish: " << pending << llendflush;
+ ms_sleep(100);
+ }
+}
+
bool LLAppViewer::cleanup()
{
// workaround for DEV-35406 crash on shutdown
@@ -1449,17 +1503,7 @@ bool LLAppViewer::cleanup()
llinfos << "Cache files removed" << llendflush;
// Wait for any pending VFS IO
- while (1)
- {
- S32 pending = LLVFSThread::updateClass(0);
- pending += LLLFSThread::updateClass(0);
- if (!pending)
- {
- break;
- }
- llinfos << "Waiting for pending IO to finish: " << pending << llendflush;
- ms_sleep(100);
- }
+ flushVFSIO();
llinfos << "Shutting down Views" << llendflush;
// Destroy the UI
@@ -1703,6 +1747,8 @@ bool LLAppViewer::cleanup()
LLWatchdog::getInstance()->cleanup();
+ LLViewerAssetStatsFF::cleanup();
+
llinfos << "Shutting down message system" << llendflush;
end_messaging_system();
@@ -1769,7 +1815,10 @@ bool LLAppViewer::initThreads()
// Image decoding
LLAppViewer::sImageDecodeThread = new LLImageDecodeThread(enable_threads && true);
LLAppViewer::sTextureCache = new LLTextureCache(enable_threads && true);
- LLAppViewer::sTextureFetch = new LLTextureFetch(LLAppViewer::getTextureCache(), sImageDecodeThread, enable_threads && true);
+ LLAppViewer::sTextureFetch = new LLTextureFetch(LLAppViewer::getTextureCache(),
+ sImageDecodeThread,
+ enable_threads && true,
+ app_metrics_qa_mode);
LLImage::initClass();
if (LLFastTimer::sLog || LLFastTimer::sMetricLog)
@@ -2196,7 +2245,7 @@ bool LLAppViewer::initConfiguration()
if (clp.hasOption("nonotifications"))
{
- gSavedSettings.setBOOL("IgnoreAllNotifications", TRUE);
+ gSavedSettings.getControl("IgnoreAllNotifications")->setValue(true, false);
}
if (clp.hasOption("debugsession"))
@@ -2243,8 +2292,8 @@ bool LLAppViewer::initConfiguration()
if(skinfolder && LLStringUtil::null != skinfolder->getValue().asString())
{
// hack to force the skin to default.
- //gDirUtilp->setSkinFolder(skinfolder->getValue().asString());
- gDirUtilp->setSkinFolder("default");
+ gDirUtilp->setSkinFolder(skinfolder->getValue().asString());
+ //gDirUtilp->setSkinFolder("default");
}
mYieldTime = gSavedSettings.getS32("YieldTime");
@@ -2389,26 +2438,120 @@ bool LLAppViewer::initConfiguration()
}
namespace {
- // *TODO - decide if there's a better place for this function.
+ // *TODO - decide if there's a better place for these functions.
// do we need a file llupdaterui.cpp or something? -brad
+
+ void apply_update_callback(LLSD const & notification, LLSD const & response)
+ {
+ lldebugs << "LLUpdate user response: " << response << llendl;
+ if(response["OK_okcancelbuttons"].asBoolean())
+ {
+ llinfos << "LLUpdate restarting viewer" << llendl;
+ static const bool install_if_ready = true;
+ // *HACK - this lets us launch the installer immediately for now
+ LLUpdaterService().startChecking(install_if_ready);
+ }
+ }
+
+ void apply_update_ok_callback(LLSD const & notification, LLSD const & response)
+ {
+ llinfos << "LLUpdate restarting viewer" << llendl;
+ static const bool install_if_ready = true;
+ // *HACK - this lets us launch the installer immediately for now
+ LLUpdaterService().startChecking(install_if_ready);
+ }
+
+ void on_update_downloaded(LLSD const & data)
+ {
+ std::string notification_name;
+ void (*apply_callback)(LLSD const &, LLSD const &) = NULL;
+
+ if(data["required"].asBoolean())
+ {
+ apply_callback = &apply_update_ok_callback;
+ if(LLStartUp::getStartupState() <= STATE_LOGIN_WAIT)
+ {
+ // The user never saw the progress bar.
+ notification_name = "RequiredUpdateDownloadedVerboseDialog";
+ }
+ else
+ {
+ notification_name = "RequiredUpdateDownloadedDialog";
+ }
+ }
+ else
+ {
+ apply_callback = &apply_update_callback;
+ if(LLStartUp::getStartupState() < STATE_STARTED)
+ {
+ // CHOP-262 we need to use a different notification
+ // method prior to login.
+ notification_name = "DownloadBackgroundDialog";
+ }
+ else
+ {
+ notification_name = "DownloadBackgroundTip";
+ }
+ }
+
+ LLSD substitutions;
+ substitutions["VERSION"] = data["version"];
+
+ // truncate version at the rightmost '.'
+ std::string version_short(data["version"]);
+ size_t short_length = version_short.rfind('.');
+ if (short_length != std::string::npos)
+ {
+ version_short.resize(short_length);
+ }
+
+ LLUIString relnotes_url("[RELEASE_NOTES_BASE_URL][CHANNEL_URL]/[VERSION_SHORT]");
+ relnotes_url.setArg("[VERSION_SHORT]", version_short);
+
+ // *TODO thread the update service's response through to this point
+ std::string const & channel = LLVersionInfo::getChannel();
+ boost::shared_ptr<char> channel_escaped(curl_escape(channel.c_str(), channel.size()), &curl_free);
+
+ relnotes_url.setArg("[CHANNEL_URL]", channel_escaped.get());
+ relnotes_url.setArg("[RELEASE_NOTES_BASE_URL]", LLTrans::getString("RELEASE_NOTES_BASE_URL"));
+ substitutions["RELEASE_NOTES_FULL_URL"] = relnotes_url.getString();
+
+ LLNotificationsUtil::add(notification_name, substitutions, LLSD(), apply_callback);
+ }
+
+ void install_error_callback(LLSD const & notification, LLSD const & response)
+ {
+ LLAppViewer::instance()->forceQuit();
+ }
+
bool notify_update(LLSD const & evt)
{
+ std::string notification_name;
switch (evt["type"].asInteger())
{
case LLUpdaterService::DOWNLOAD_COMPLETE:
- LLNotificationsUtil::add("DownloadBackground");
+ on_update_downloaded(evt);
break;
case LLUpdaterService::INSTALL_ERROR:
- LLNotificationsUtil::add("FailedUpdateInstall");
+ if(evt["required"].asBoolean()) {
+ LLNotificationsUtil::add("FailedRequiredUpdateInstall", LLSD(), LLSD(), &install_error_callback);
+ } else {
+ LLNotificationsUtil::add("FailedUpdateInstall");
+ }
break;
default:
- llinfos << "unhandled update event " << evt << llendl;
break;
}
// let others also handle this event by default
return false;
}
+
+ bool on_bandwidth_throttle(LLUpdaterService * updater, LLSD const & evt)
+ {
+ updater->setBandwidthLimit(evt.asInteger() * (1024/8));
+ return false; // Let others receive this event.
+ };
};
void LLAppViewer::initUpdater()
@@ -2431,7 +2574,10 @@ void LLAppViewer::initUpdater()
channel,
version);
mUpdater->setCheckPeriod(check_period);
- if(gSavedSettings.getBOOL("UpdaterServiceActive"))
+ mUpdater->setBandwidthLimit((int)gSavedSettings.getF32("UpdaterMaximumBandwidth") * (1024/8));
+ gSavedSettings.getControl("UpdaterMaximumBandwidth")->getSignal()->
+ connect(boost::bind(&on_bandwidth_throttle, mUpdater.get(), _2));
+ if(gSavedSettings.getU32("UpdaterServiceSetting"))
{
bool install_if_ready = true;
mUpdater->startChecking(install_if_ready);
@@ -2499,7 +2645,7 @@ bool LLAppViewer::initWindow()
VIEWER_WINDOW_CLASSNAME,
gSavedSettings.getS32("WindowX"), gSavedSettings.getS32("WindowY"),
gSavedSettings.getS32("WindowWidth"), gSavedSettings.getS32("WindowHeight"),
- FALSE, ignorePixelDepth);
+ gSavedSettings.getBOOL("WindowFullScreen"), ignorePixelDepth);
// Need to load feature table before cheking to start watchdog.
const S32 NEVER_SUBMIT_REPORT = 2;
@@ -2858,8 +3004,10 @@ void LLAppViewer::handleViewerCrash()
pApp->removeMarkerFile(false);
}
+#if LL_SEND_CRASH_REPORTS
// Call to pure virtual, handled by platform specific llappviewer instance.
pApp->handleCrashReporting();
+#endif
return;
}
@@ -2994,6 +3142,23 @@ void LLAppViewer::forceQuit()
LLApp::setQuitting();
}
+//TODO: remove
+void LLAppViewer::fastQuit(S32 error_code)
+{
+ // finish pending transfers
+ flushVFSIO();
+ // let sim know we're logging out
+ sendLogoutRequest();
+ // flush network buffers by shutting down messaging system
+ end_messaging_system();
+ // figure out the error code
+ S32 final_error_code = error_code ? error_code : (S32)isError();
+ // this isn't a crash
+ removeMarkerFile();
+ // get outta here
+ _exit(final_error_code);
+}
+
void LLAppViewer::requestQuit()
{
llinfos << "requestQuit" << llendl;
@@ -3002,11 +3167,21 @@ void LLAppViewer::requestQuit()
if( (LLStartUp::getStartupState() < STATE_STARTED) || !region )
{
+ // If we have a region, make some attempt to send a logout request first.
+ // This prevents the halfway-logged-in avatar from hanging around inworld for a couple minutes.
+ if(region)
+ {
+ sendLogoutRequest();
+ }
+
// Quit immediately
forceQuit();
return;
}
+ // Try to send metrics back to the grid
+ metricsSend(!gDisconnected);
+
LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral*)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINT, TRUE);
effectp->setPositionGlobal(gAgent.getPositionGlobal());
effectp->setColor(LLColor4U(gAgent.getEffectColor()));
@@ -3043,7 +3218,7 @@ static LLNotificationFunctorRegistration finish_quit_reg("ConfirmQuit", finish_q
void LLAppViewer::userQuit()
{
- if (gDisconnected)
+ if (gDisconnected || gViewerWindow->getProgressView()->getVisible())
{
requestQuit();
}
@@ -3066,12 +3241,12 @@ void LLAppViewer::earlyExit(const std::string& name, const LLSD& substitutions)
LLNotificationsUtil::add(name, substitutions, LLSD(), finish_early_exit);
}
-void LLAppViewer::forceExit(S32 arg)
+// case where we need the viewer to exit without any need for notifications
+void LLAppViewer::earlyExitNoNotify()
{
- removeMarkerFile();
-
- // *FIX:Mani - This kind of exit hardly seems appropriate.
- exit(arg);
+ llwarns << "app_early_exit with no notification: " << llendl;
+ gDoDisconnect = TRUE;
+ finish_early_exit( LLSD(), LLSD() );
}
void LLAppViewer::abortQuit()
@@ -3667,6 +3842,18 @@ void LLAppViewer::idle()
}
}
+ // debug setting to quit after N seconds of being AFK - 0 to never do this
+ F32 qas_afk = gSavedSettings.getF32("QuitAfterSecondsOfAFK");
+ if (qas_afk > 0.f)
+ {
+ // idle time is more than setting
+ if ( gAwayTriggerTimer.getElapsedTimeF32() > qas_afk )
+ {
+ // go ahead and just quit gracefully
+ LLAppViewer::instance()->requestQuit();
+ }
+ }
+
// Must wait until both have avatar object and mute list, so poll
// here.
request_initial_instant_messages();
@@ -3772,6 +3959,11 @@ void LLAppViewer::idle()
llinfos << "Unknown object updates: " << gObjectList.mNumUnknownUpdates << llendl;
gObjectList.mNumUnknownUpdates = 0;
}
+
+ // ViewerMetrics FPS piggy-backing on the debug timer.
+ // The 5-second interval is nice for this purpose. If the object debug
+ // bit moves or is disabled, please give this a suitable home.
+ LLViewerAssetStatsFF::record_fps_main(gFPSClamped);
}
}
@@ -3814,6 +4006,18 @@ void LLAppViewer::idle()
gInventory.idleNotifyObservers();
}
+ // Metrics logging (LLViewerAssetStats, etc.)
+ {
+ static LLTimer report_interval;
+
+ // *TODO: Add configuration controls for this
+ if (report_interval.getElapsedTimeF32() >= app_metrics_interval)
+ {
+ metricsSend(! gDisconnected);
+ report_interval.reset();
+ }
+ }
+
if (gDisconnected)
{
return;
@@ -4103,7 +4307,10 @@ void LLAppViewer::sendLogoutRequest()
gLogoutMaxTime = LOGOUT_REQUEST_TIME;
mLogoutRequestSent = TRUE;
- LLVoiceClient::getInstance()->leaveChannel();
+ if(LLVoiceClient::instanceExists())
+ {
+ LLVoiceClient::getInstance()->leaveChannel();
+ }
//Set internal status variables and marker files
gLogoutInProgress = TRUE;
@@ -4527,6 +4734,35 @@ void LLAppViewer::loadEventHostModule(S32 listen_port)
return;
}
+ LL_INFOS("eventhost") << "Found lleventhost at '" << dso_path << "'" << LL_ENDL;
+#if ! defined(LL_WINDOWS)
+ {
+ std::string outfile("/tmp/lleventhost.file.out");
+ std::string command("file '" + dso_path + "' > '" + outfile + "' 2>&1");
+ int rc = system(command.c_str());
+ if (rc != 0)
+ {
+ LL_WARNS("eventhost") << command << " ==> " << rc << ':' << LL_ENDL;
+ }
+ else
+ {
+ LL_INFOS("eventhost") << command << ':' << LL_ENDL;
+ }
+ {
+ std::ifstream reader(outfile.c_str());
+ std::string line;
+ while (std::getline(reader, line))
+ {
+ size_t len = line.length();
+ if (len && line[len-1] == '\n')
+ line.erase(len-1);
+ LL_INFOS("eventhost") << line << LL_ENDL;
+ }
+ }
+ remove(outfile.c_str());
+ }
+#endif // LL_WINDOWS
+
apr_dso_handle_t * eventhost_dso_handle = NULL;
apr_pool_t * eventhost_dso_memory_pool = NULL;
@@ -4535,13 +4771,13 @@ void LLAppViewer::loadEventHostModule(S32 listen_port)
apr_status_t rv = apr_dso_load(&eventhost_dso_handle,
dso_path.c_str(),
eventhost_dso_memory_pool);
- ll_apr_assert_status(rv);
+ llassert_always(! ll_apr_warn_status(rv, eventhost_dso_handle));
llassert_always(eventhost_dso_handle != NULL);
int (*ll_plugin_start_func)(LLSD const &) = NULL;
rv = apr_dso_sym((apr_dso_handle_sym_t*)&ll_plugin_start_func, eventhost_dso_handle, "ll_plugin_start");
- ll_apr_assert_status(rv);
+ llassert_always(! ll_apr_warn_status(rv, eventhost_dso_handle));
llassert_always(ll_plugin_start_func != NULL);
LLSD args;
@@ -4713,3 +4949,75 @@ bool LLAppViewer::getMasterSystemAudioMute()
{
return gSavedSettings.getBOOL("MuteAudio");
}
+
+//----------------------------------------------------------------------------
+// Metrics-related methods (static and otherwise)
+//----------------------------------------------------------------------------
+
+/**
+ * LLViewerAssetStats collects data on a per-region (as defined by the agent's
+ * location) so we need to tell it about region changes which become a kind of
+ * hidden variable/global state in the collectors. For collectors not running
+ * on the main thread, we need to send a message to move the data over safely
+ * and cheaply (amortized over a run).
+ */
+void LLAppViewer::metricsUpdateRegion(U64 region_handle)
+{
+ if (0 != region_handle)
+ {
+ LLViewerAssetStatsFF::set_region_main(region_handle);
+ if (LLAppViewer::sTextureFetch)
+ {
+ // Send a region update message into 'thread1' to get the new region.
+ LLAppViewer::sTextureFetch->commandSetRegion(region_handle);
+ }
+ else
+ {
+ // No 'thread1', a.k.a. TextureFetch, so update directly
+ LLViewerAssetStatsFF::set_region_thread1(region_handle);
+ }
+ }
+}
+
+
+/**
+ * Attempts to start a multi-threaded metrics report to be sent back to
+ * the grid for consumption.
+ */
+void LLAppViewer::metricsSend(bool enable_reporting)
+{
+ if (! gViewerAssetStatsMain)
+ return;
+
+ if (LLAppViewer::sTextureFetch)
+ {
+ LLViewerRegion * regionp = gAgent.getRegion();
+
+ if (enable_reporting && regionp)
+ {
+ std::string caps_url = regionp->getCapability("ViewerMetrics");
+
+ // Make a copy of the main stats to send into another thread.
+ // Receiving thread takes ownership.
+ LLViewerAssetStats * main_stats(new LLViewerAssetStats(*gViewerAssetStatsMain));
+
+ // Send a report request into 'thread1' to get the rest of the data
+ // and provide some additional parameters while here.
+ LLAppViewer::sTextureFetch->commandSendMetrics(caps_url,
+ gAgentSessionID,
+ gAgentID,
+ main_stats);
+ main_stats = 0; // Ownership transferred
+ }
+ else
+ {
+ LLAppViewer::sTextureFetch->commandDataBreak();
+ }
+ }
+
+ // Reset even if we can't report. Rather than gather up a huge chunk of
+ // data, we'll keep to our sampling interval and retain the data
+ // resolution in time.
+ gViewerAssetStatsMain->reset();
+}
+
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index aa4256a2bd..a18e6cbb02 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -65,12 +65,14 @@ public:
virtual bool mainLoop(); // Override for the application main loop. Needs to at least gracefully notice the QUITTING state and exit.
// Application control
+ void flushVFSIO(); // waits for vfs transfers to complete
void forceQuit(); // Puts the viewer into 'shutting down without error' mode.
+ void fastQuit(S32 error_code = 0); // Shuts down the viewer immediately after sending a logout message
void requestQuit(); // Request a quit. A kinder, gentler quit.
void userQuit(); // The users asks to quit. Confirm, then requestQuit()
void earlyExit(const std::string& name,
const LLSD& substitutions = LLSD()); // Display an error dialog and forcibly quit.
- void forceExit(S32 arg); // exit() immediately (after some cleanup).
+ void earlyExitNoNotify(); // Do not display error dialog then forcibly quit.
void abortQuit(); // Called to abort a quit request.
bool quitRequested() { return mQuitRequested; }
@@ -167,6 +169,10 @@ public:
// mute/unmute the system's master audio
virtual void setMasterSystemAudioMute(bool mute);
virtual bool getMasterSystemAudioMute();
+
+ // Metrics policy helper statics.
+ static void metricsUpdateRegion(U64 region_handle);
+ static void metricsSend(bool enable_reporting);
protected:
virtual bool initWindow(); // Initialize the viewer's window.
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 066b4d8bc3..f3f0cde221 100644..100755
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -56,9 +56,11 @@
#include "llmutelist.h"
#include "llnotificationsutil.h" // for LLNotificationsUtil
#include "llpaneloutfitedit.h"
+#include "llpanelprofile.h"
#include "llrecentpeople.h"
#include "llsidetray.h"
#include "lltrans.h"
+#include "llviewercontrol.h"
#include "llviewerobjectlist.h"
#include "llviewermessage.h" // for handle_lure
#include "llviewerregion.h"
@@ -306,6 +308,20 @@ void LLAvatarActions::showProfile(const LLUUID& id)
params["id"] = id;
params["open_tab_name"] = "panel_profile";
+ // PROFILES: open in webkit window
+ std::string full_name;
+ if (gCacheName->getFullName(id,full_name))
+ {
+ std::string agent_name = LLCacheName::buildUsername(full_name);
+ llinfos << "opening web profile for " << agent_name << llendl;
+ std::string url = getProfileURL(agent_name);
+ LLWeb::loadWebURLInternal(url);
+ }
+ else
+ {
+ llwarns << "no name info for agent id " << id << llendl;
+ }
+#if 0
//Show own profile
if(gAgent.getID() == id)
{
@@ -316,6 +332,7 @@ void LLAvatarActions::showProfile(const LLUUID& id)
{
LLSideTray::getInstance()->showPanel("panel_profile_view", params);
}
+#endif
}
}
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp
index 6ccb5aaf54..35e4548483 100644
--- a/indra/newview/llbottomtray.cpp
+++ b/indra/newview/llbottomtray.cpp
@@ -65,31 +65,42 @@ LLDefaultChildRegistry::Register<LLBottomtrayButton> bottomtray_button("bottomtr
// virtual
BOOL LLBottomtrayButton::handleHover(S32 x, S32 y, MASK mask)
{
+ if (mCanDrag)
+ {
S32 screenX, screenY;
localPointToScreen(x, y, &screenX, &screenY);
// pass hover to bottomtray
LLBottomTray::getInstance()->onDraggableButtonHover(screenX, screenY);
- return FALSE;
+ return TRUE;
+ }
+ else
+ {
+ return LLButton::handleHover(x, y, mask);
+ }
}
//virtual
BOOL LLBottomtrayButton::handleMouseUp(S32 x, S32 y, MASK mask)
{
+ if (mCanDrag)
+ {
S32 screenX, screenY;
localPointToScreen(x, y, &screenX, &screenY);
// pass mouse up to bottomtray
LLBottomTray::getInstance()->onDraggableButtonMouseUp(this, screenX, screenY);
- LLButton::handleMouseUp(x, y, mask);
- return FALSE;
+ }
+ return LLButton::handleMouseUp(x, y, mask);
}
//virtual
BOOL LLBottomtrayButton::handleMouseDown(S32 x, S32 y, MASK mask)
{
+ if (mCanDrag)
+ {
S32 screenX, screenY;
localPointToScreen(x, y, &screenX, &screenY);
// pass mouse up to bottomtray
LLBottomTray::getInstance()->onDraggableButtonMouseDown(this, screenX, screenY);
- LLButton::handleMouseDown(x, y, mask);
- return FALSE;
+ }
+ return LLButton::handleMouseDown(x, y, mask);
}
static void update_build_button_enable_state()
@@ -150,8 +161,6 @@ public:
{
mFactoryMap["chat_bar"] = LLCallbackMap(LLBottomTray::createNearbyChatBar, NULL);
buildFromFile("panel_bottomtray_lite.xml");
- // Necessary for focus movement among child controls
- setFocusRoot(TRUE);
}
BOOL postBuild()
@@ -218,9 +227,6 @@ LLBottomTray::LLBottomTray(const LLSD&)
//destroyed LLBottomTray requires some subsystems that are long gone
//LLUI::getRootView()->addChild(this);
- // Necessary for focus movement among child controls
- setFocusRoot(TRUE);
-
{
mBottomTrayLite = new LLBottomTrayLite();
mBottomTrayLite->setFollowsAll();
@@ -513,6 +519,9 @@ void LLBottomTray::toggleCameraControls()
BOOL LLBottomTray::postBuild()
{
+ LLHints::registerHintTarget("bottom_tray", LLView::getHandle());
+ LLHints::registerHintTarget("dest_guide_btn", getChild<LLUICtrl>("destination_btn")->getHandle());
+ LLHints::registerHintTarget("avatar_picker_btn", getChild<LLUICtrl>("avatar_btn")->getHandle());
LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("NearbyChatBar.Action", boost::bind(&LLBottomTray::onContextMenuItemClicked, this, _2));
LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("NearbyChatBar.EnableMenuItem", boost::bind(&LLBottomTray::onContextMenuItemEnabled, this, _2));
diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h
index 8d8a42c553..dc98170049 100644
--- a/indra/newview/llbottomtray.h
+++ b/indra/newview/llbottomtray.h
@@ -54,7 +54,9 @@ class LLBottomtrayButton : public LLButton
public:
struct Params : public LLInitParam::Block<Params, LLButton::Params>
{
- Params(){}
+ Optional<bool> can_drag;
+ Params()
+ : can_drag("can_drag", true){}
};
/*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask);
@@ -62,11 +64,14 @@ public:
protected:
LLBottomtrayButton(const Params& p)
- : LLButton(p)
+ : LLButton(p),
+ mCanDrag(p.can_drag)
{
}
friend class LLUICtrlFactory;
+
+ bool mCanDrag;
};
class LLBottomTray
diff --git a/indra/newview/llbrowsernotification.cpp b/indra/newview/llbrowsernotification.cpp
index d6a813d608..6e77d1e336 100644
--- a/indra/newview/llbrowsernotification.cpp
+++ b/indra/newview/llbrowsernotification.cpp
@@ -29,8 +29,9 @@
#include "llnotificationhandler.h"
#include "llnotifications.h"
-#include "llfloaterreg.h"
#include "llmediactrl.h"
+#include "llviewermedia.h"
+#include "llviewermediafocus.h"
using namespace LLNotificationsUI;
@@ -39,10 +40,19 @@ bool LLBrowserNotification::processNotification(const LLSD& notify)
LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID());
if (!notification) return false;
- LLMediaCtrl* media_instance = LLMediaCtrl::getInstance(notification->getPayload()["media_id"].asUUID());
+ LLUUID media_id = notification->getPayload()["media_id"].asUUID();
+ LLMediaCtrl* media_instance = LLMediaCtrl::getInstance(media_id);
if (media_instance)
{
media_instance->showNotification(notification);
}
+ else if (LLViewerMediaFocus::instance().getControlsMediaID() == media_id)
+ {
+ LLViewerMediaImpl* impl = LLViewerMedia::getMediaImplFromTextureID(media_id);
+ if (impl)
+ {
+ impl->showNotification(notification);
+ }
+ }
return false;
}
diff --git a/indra/newview/llbuycurrencyhtml.cpp b/indra/newview/llbuycurrencyhtml.cpp
index d35c9ed853..e5a9be0203 100644
--- a/indra/newview/llbuycurrencyhtml.cpp
+++ b/indra/newview/llbuycurrencyhtml.cpp
@@ -33,6 +33,7 @@
#include "llfloaterreg.h"
#include "llcommandhandler.h"
#include "llviewercontrol.h"
+#include "llstatusbar.h"
// support for secondlife:///app/buycurrencyhtml/{ACTION}/{NEXT_ACTION}/{RETURN_CODE} SLapps
class LLBuyCurrencyHTMLHandler :
@@ -156,4 +157,7 @@ void LLBuyCurrencyHTML::closeDialog()
{
buy_currency_floater->closeFloater();
};
+
+ // Update L$ balance in the status bar in case L$ were purchased
+ LLStatusBar::sendMoneyBalanceRequest();
}
diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp
index b2e9564f7d..328c326278 100644
--- a/indra/newview/llcallfloater.cpp
+++ b/indra/newview/llcallfloater.cpp
@@ -167,6 +167,7 @@ BOOL LLCallFloater::postBuild()
//chrome="true" hides floater caption
if (mDragHandle)
mDragHandle->setTitleVisible(TRUE);
+ updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730)
updateSession();
@@ -206,6 +207,17 @@ void LLCallFloater::draw()
}
// virtual
+void LLCallFloater::setFocus( BOOL b )
+{
+ LLTransientDockableFloater::setFocus(b);
+
+ // Force using active floater transparency (STORM-730).
+ // We have to override setFocus() for LLCallFloater because selecting an item
+ // of the voice morphing combobox causes the floater to lose focus and thus become transparent.
+ updateTransparency(TT_ACTIVE);
+}
+
+// virtual
void LLCallFloater::onParticipantsChanged()
{
if (NULL == mParticipants) return;
diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h
index 3bc7043353..00a3f76e56 100644
--- a/indra/newview/llcallfloater.h
+++ b/indra/newview/llcallfloater.h
@@ -64,6 +64,7 @@ public:
/*virtual*/ BOOL postBuild();
/*virtual*/ void onOpen(const LLSD& key);
/*virtual*/ void draw();
+ /*virtual*/ void setFocus( BOOL b );
/**
* Is called by LLVoiceClient::notifyParticipantObservers when voice participant list is changed.
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 271ee0c4a4..c98bcbda45 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -586,7 +586,7 @@ void LLChatHistory::initFromParams(const LLChatHistory::Params& p)
LLLayoutStack::Params layout_p;
layout_p.rect = stack_rect;
layout_p.follows.flags = FOLLOWS_ALL;
- layout_p.orientation = "vertical";
+ layout_p.orientation = LLLayoutStack::VERTICAL;
layout_p.mouse_opaque = false;
LLLayoutStack* stackp = LLUICtrlFactory::create<LLLayoutStack>(layout_p, this);
@@ -789,24 +789,22 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
// set the link for the object name to be the objectim SLapp
// (don't let object names with hyperlinks override our objectim Url)
LLStyle::Params link_params(style_params);
- link_params.color.control = "HTMLLinkColor";
+ LLColor4 link_color = LLUIColorTable::instance().getColor("HTMLLinkColor");
+ link_params.color = link_color;
+ link_params.readonly_color = link_color;
link_params.is_link = true;
link_params.link_href = url;
+
mEditor->appendText(chat.mFromName + delimiter,
false, link_params);
}
else if ( chat.mFromName != SYSTEM_FROM && chat.mFromID.notNull() && !message_from_log)
{
LLStyle::Params link_params(style_params);
-
- // Setting is_link = true for agent SLURL to avoid applying default style to it.
- // See LLTextBase::appendTextImpl().
- link_params.is_link = true;
- link_params.link_href = LLSLURL("agent", chat.mFromID, "inspect").getSLURLString();
+ link_params.overwriteFrom(LLStyleMap::instance().lookupAgent(chat.mFromID));
// Add link to avatar's inspector and delimiter to message.
- mEditor->appendText(chat.mFromName, false, link_params);
- mEditor->appendText(delimiter, false, style_params);
+ mEditor->appendText(std::string(link_params.link_href) + delimiter, false, link_params);
}
else
{
diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp
index 3afddc1145..899e0431e7 100644
--- a/indra/newview/llchatitemscontainerctrl.cpp
+++ b/indra/newview/llchatitemscontainerctrl.cpp
@@ -224,7 +224,8 @@ void LLNearbyChatToastPanel::init(LLSD& notification)
href = LLSLURL("object", mFromID, "inspect").getSLURLString();
}
- style_params_name.color(textColor);
+ LLColor4 user_name_color = LLUIColorTable::instance().getColor("HTMLLinkColor");
+ style_params_name.color(user_name_color);
std::string font_name = LLFontGL::nameFromFont(messageFont);
std::string font_style_size = LLFontGL::sizeFromFont(messageFont);
diff --git a/indra/newview/llcommandhandler.cpp b/indra/newview/llcommandhandler.cpp
index 360ba080ac..360ba080ac 100644..100755
--- a/indra/newview/llcommandhandler.cpp
+++ b/indra/newview/llcommandhandler.cpp
diff --git a/indra/newview/llcommandlineparser.cpp b/indra/newview/llcommandlineparser.cpp
index f31ff14df6..65c61c4a8b 100644
--- a/indra/newview/llcommandlineparser.cpp
+++ b/indra/newview/llcommandlineparser.cpp
@@ -345,7 +345,10 @@ bool LLCommandLineParser::parseCommandLine(int argc, char **argv)
bool LLCommandLineParser::parseCommandLineString(const std::string& str)
{
// Split the string content into tokens
- boost::escaped_list_separator<char> sep("\\", "\r\n ", "\"'");
+ const char* escape_chars = "\\";
+ const char* separator_chars = "\r\n ";
+ const char* quote_chars = "\"'";
+ boost::escaped_list_separator<char> sep(escape_chars, separator_chars, quote_chars);
boost::tokenizer< boost::escaped_list_separator<char> > tok(str, sep);
std::vector<std::string> tokens;
// std::copy(tok.begin(), tok.end(), std::back_inserter(tokens));
diff --git a/indra/newview/lldirpicker.cpp b/indra/newview/lldirpicker.cpp
index 53101f0ce2..dd243397a1 100644
--- a/indra/newview/lldirpicker.cpp
+++ b/indra/newview/lldirpicker.cpp
@@ -35,6 +35,7 @@
#include "llframetimer.h"
#include "lltrans.h"
#include "llwindow.h" // beforeDialog()
+#include "llviewercontrol.h"
#if LL_LINUX || LL_SOLARIS
# include "llfilepicker.h"
@@ -53,6 +54,23 @@ LLDirPicker LLDirPicker::sInstance;
//
// Implementation
//
+
+// utility function to check if access to local file system via file browser
+// is enabled and if not, tidy up and indicate we're not allowed to do this.
+bool LLDirPicker::check_local_file_access_enabled()
+{
+ // if local file browsing is turned off, return without opening dialog
+ bool local_file_system_browsing_enabled = gSavedSettings.getBOOL("LocalFileSystemBrowsingEnabled");
+ if ( ! local_file_system_browsing_enabled )
+ {
+ mDir.clear(); // Windows
+ mFileName = NULL; // Mac/Linux
+ return false;
+ }
+
+ return true;
+}
+
#if LL_WINDOWS
LLDirPicker::LLDirPicker() :
@@ -72,6 +90,13 @@ BOOL LLDirPicker::getDir(std::string* filename)
{
return FALSE;
}
+
+ // if local file browsing is turned off, return without opening dialog
+ if ( check_local_file_access_enabled() == false )
+ {
+ return FALSE;
+ }
+
BOOL success = FALSE;
// Modal, so pause agent
@@ -231,7 +256,13 @@ BOOL LLDirPicker::getDir(std::string* filename)
if( mLocked ) return FALSE;
BOOL success = FALSE;
OSStatus error = noErr;
-
+
+ // if local file browsing is turned off, return without opening dialog
+ if ( check_local_file_access_enabled() == false )
+ {
+ return FALSE;
+ }
+
mFileName = filename;
// mNavOptions.saveFileName
@@ -289,6 +320,13 @@ void LLDirPicker::reset()
BOOL LLDirPicker::getDir(std::string* filename)
{
reset();
+
+ // if local file browsing is turned off, return without opening dialog
+ if ( check_local_file_access_enabled() == false )
+ {
+ return FALSE;
+ }
+
if (mFilePicker)
{
GtkWindow* picker = mFilePicker->buildFilePicker(false, true,
diff --git a/indra/newview/lldirpicker.h b/indra/newview/lldirpicker.h
index a360293fff..2188b7edd0 100644
--- a/indra/newview/lldirpicker.h
+++ b/indra/newview/lldirpicker.h
@@ -75,6 +75,7 @@ private:
};
void buildDirname( void );
+ bool check_local_file_access_enabled();
#if LL_DARWIN
NavDialogCreationOptions mNavOptions;
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index 9f1d3a2a7d..0b17d64eb0 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -368,14 +368,15 @@ LLFavoritesBarCtrl::Params::Params()
LLFavoritesBarCtrl::LLFavoritesBarCtrl(const LLFavoritesBarCtrl::Params& p)
: LLUICtrl(p),
mFont(p.font.isProvided() ? p.font() : LLFontGL::getFontSansSerifSmall()),
- mPopupMenuHandle(),
- mInventoryItemsPopupMenuHandle(),
+ mOverflowMenuHandle(),
+ mContextMenuHandle(),
mImageDragIndication(p.image_drag_indication),
mShowDragMarker(FALSE),
mLandingTab(NULL),
mLastTab(NULL),
mTabsHighlightEnabled(TRUE)
, mUpdateDropDownItems(true)
+, mRestoreOverflowMenu(false)
{
// Register callback for menus with current registrar (will be parent panel's registrar)
LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Favorites.DoToSelected",
@@ -402,8 +403,8 @@ LLFavoritesBarCtrl::~LLFavoritesBarCtrl()
{
gInventory.removeObserver(this);
- LLView::deleteViewByHandle(mPopupMenuHandle);
- LLView::deleteViewByHandle(mInventoryItemsPopupMenuHandle);
+ LLView::deleteViewByHandle(mOverflowMenuHandle);
+ LLView::deleteViewByHandle(mContextMenuHandle);
}
BOOL LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
@@ -520,7 +521,7 @@ void LLFavoritesBarCtrl::handleExistingFavoriteDragAndDrop(S32 x, S32 y)
gInventory.saveItemsOrder(mItems);
- LLToggleableMenu* menu = (LLToggleableMenu*) mPopupMenuHandle.get();
+ LLToggleableMenu* menu = (LLToggleableMenu*) mOverflowMenuHandle.get();
if (menu && menu->getVisible())
{
@@ -785,7 +786,7 @@ void LLFavoritesBarCtrl::updateButtons()
mChevronButton->setVisible(TRUE);
}
// Update overflow menu
- LLToggleableMenu* overflow_menu = static_cast <LLToggleableMenu*> (mPopupMenuHandle.get());
+ LLToggleableMenu* overflow_menu = static_cast <LLToggleableMenu*> (mOverflowMenuHandle.get());
if (overflow_menu && overflow_menu->getVisible())
{
overflow_menu->setVisible(FALSE);
@@ -859,7 +860,7 @@ BOOL LLFavoritesBarCtrl::postBuild()
menu = LLUICtrlFactory::getDefaultWidget<LLMenuGL>("inventory_menu");
}
menu->setBackgroundColor(LLUIColorTable::instance().getColor("MenuPopupBgColor"));
- mInventoryItemsPopupMenuHandle = menu->getHandle();
+ mContextMenuHandle = menu->getHandle();
return TRUE;
}
@@ -890,7 +891,7 @@ BOOL LLFavoritesBarCtrl::collectFavoriteItems(LLInventoryModel::item_array_t &it
void LLFavoritesBarCtrl::showDropDownMenu()
{
- if (mPopupMenuHandle.isDead())
+ if (mOverflowMenuHandle.isDead())
{
LLToggleableMenu::Params menu_p;
menu_p.name("favorites menu");
@@ -901,10 +902,10 @@ void LLFavoritesBarCtrl::showDropDownMenu()
menu_p.preferred_width = DROP_DOWN_MENU_WIDTH;
LLToggleableMenu* menu = LLUICtrlFactory::create<LLFavoriteLandmarkToggleableMenu>(menu_p);
- mPopupMenuHandle = menu->getHandle();
+ mOverflowMenuHandle = menu->getHandle();
}
- LLToggleableMenu* menu = (LLToggleableMenu*)mPopupMenuHandle.get();
+ LLToggleableMenu* menu = (LLToggleableMenu*)mOverflowMenuHandle.get();
if (menu)
{
@@ -982,11 +983,19 @@ void LLFavoritesBarCtrl::onButtonRightClick( LLUUID item_id,LLView* fav_button,S
{
mSelectedItemID = item_id;
- LLMenuGL* menu = (LLMenuGL*)mInventoryItemsPopupMenuHandle.get();
+ LLMenuGL* menu = (LLMenuGL*)mContextMenuHandle.get();
if (!menu)
{
return;
}
+
+ // Remember that the context menu was shown simultaneously with the overflow menu,
+ // so that we can restore the overflow menu when user clicks a context menu item
+ // (which hides the overflow menu).
+ {
+ LLView* overflow_menu = mOverflowMenuHandle.get();
+ mRestoreOverflowMenu = overflow_menu && overflow_menu->getVisible();
+ }
// Release mouse capture so hover events go to the popup menu
// because this is happening during a mouse down.
@@ -1091,8 +1100,8 @@ void LLFavoritesBarCtrl::doToSelected(const LLSD& userdata)
// Pop-up the overflow menu again (it gets hidden whenever the user clicks a context menu item).
// See EXT-4217 and STORM-207.
- LLToggleableMenu* menu = (LLToggleableMenu*) mPopupMenuHandle.get();
- if (menu && !menu->getVisible())
+ LLToggleableMenu* menu = (LLToggleableMenu*) mOverflowMenuHandle.get();
+ if (mRestoreOverflowMenu && menu && !menu->getVisible())
{
showDropDownMenu();
}
@@ -1158,11 +1167,11 @@ void LLFavoritesBarCtrl::pastFromClipboard() const
void LLFavoritesBarCtrl::onButtonMouseDown(LLUUID id, LLUICtrl* ctrl, S32 x, S32 y, MASK mask)
{
// EXT-6997 (Fav bar: Pop-up menu for LM in overflow dropdown is kept after LM was dragged away)
- // mInventoryItemsPopupMenuHandle.get() - is a pop-up menu (of items) in already opened dropdown menu.
+ // mContextMenuHandle.get() - is a pop-up menu (of items) in already opened dropdown menu.
// We have to check and set visibility of pop-up menu in such a way instead of using
// LLMenuHolderGL::hideMenus() because it will close both menus(dropdown and pop-up), but
// we need to close only pop-up menu while dropdown one should be still opened.
- LLMenuGL* menu = (LLMenuGL*)mInventoryItemsPopupMenuHandle.get();
+ LLMenuGL* menu = (LLMenuGL*)mContextMenuHandle.get();
if(menu && menu->getVisible())
{
menu->setVisible(FALSE);
diff --git a/indra/newview/llfavoritesbar.h b/indra/newview/llfavoritesbar.h
index 37645523f6..1a28731c4f 100644
--- a/indra/newview/llfavoritesbar.h
+++ b/indra/newview/llfavoritesbar.h
@@ -91,13 +91,14 @@ protected:
void showDropDownMenu();
- LLHandle<LLView> mPopupMenuHandle;
- LLHandle<LLView> mInventoryItemsPopupMenuHandle;
+ LLHandle<LLView> mOverflowMenuHandle;
+ LLHandle<LLView> mContextMenuHandle;
LLUUID mFavoriteFolderId;
const LLFontGL *mFont;
S32 mFirstDropDownItem;
bool mUpdateDropDownItems;
+ bool mRestoreOverflowMenu;
LLUUID mSelectedItemID;
diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp
index c14be89641..f0840774bd 100644
--- a/indra/newview/llfilepicker.cpp
+++ b/indra/newview/llfilepicker.cpp
@@ -33,6 +33,7 @@
#include "lldir.h"
#include "llframetimer.h"
#include "lltrans.h"
+#include "llviewercontrol.h"
#include "llwindow.h" // beforeDialog()
#if LL_SDL
@@ -104,6 +105,20 @@ LLFilePicker::~LLFilePicker()
// nothing
}
+// utility function to check if access to local file system via file browser
+// is enabled and if not, tidy up and indicate we're not allowed to do this.
+bool LLFilePicker::check_local_file_access_enabled()
+{
+ // if local file browsing is turned off, return without opening dialog
+ bool local_file_system_browsing_enabled = gSavedSettings.getBOOL("LocalFileSystemBrowsingEnabled");
+ if ( ! local_file_system_browsing_enabled )
+ {
+ mFiles.clear();
+ return false;
+ }
+
+ return true;
+}
const std::string LLFilePicker::getFirstFile()
{
@@ -203,6 +218,12 @@ BOOL LLFilePicker::getOpenFile(ELoadFilter filter)
}
BOOL success = FALSE;
+ // if local file browsing is turned off, return without opening dialog
+ if ( check_local_file_access_enabled() == false )
+ {
+ return FALSE;
+ }
+
// don't provide default file selection
mFilesW[0] = '\0';
@@ -241,6 +262,12 @@ BOOL LLFilePicker::getMultipleOpenFiles(ELoadFilter filter)
}
BOOL success = FALSE;
+ // if local file browsing is turned off, return without opening dialog
+ if ( check_local_file_access_enabled() == false )
+ {
+ return FALSE;
+ }
+
// don't provide default file selection
mFilesW[0] = '\0';
@@ -304,6 +331,12 @@ BOOL LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename)
}
BOOL success = FALSE;
+ // if local file browsing is turned off, return without opening dialog
+ if ( check_local_file_access_enabled() == false )
+ {
+ return FALSE;
+ }
+
mOFN.lpstrFile = mFilesW;
if (!filename.empty())
{
@@ -581,6 +614,12 @@ OSStatus LLFilePicker::doNavChooseDialog(ELoadFilter filter)
NavDialogRef navRef = NULL;
NavReplyRecord navReply;
+ // if local file browsing is turned off, return without opening dialog
+ if ( check_local_file_access_enabled() == false )
+ {
+ return FALSE;
+ }
+
memset(&navReply, 0, sizeof(navReply));
// NOTE: we are passing the address of a local variable here.
@@ -809,6 +848,12 @@ BOOL LLFilePicker::getOpenFile(ELoadFilter filter)
BOOL success = FALSE;
+ // if local file browsing is turned off, return without opening dialog
+ if ( check_local_file_access_enabled() == false )
+ {
+ return FALSE;
+ }
+
OSStatus error = noErr;
reset();
@@ -845,6 +890,12 @@ BOOL LLFilePicker::getMultipleOpenFiles(ELoadFilter filter)
BOOL success = FALSE;
+ // if local file browsing is turned off, return without opening dialog
+ if ( check_local_file_access_enabled() == false )
+ {
+ return FALSE;
+ }
+
OSStatus error = noErr;
reset();
@@ -876,6 +927,12 @@ BOOL LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename)
BOOL success = FALSE;
OSStatus error = noErr;
+ // if local file browsing is turned off, return without opening dialog
+ if ( check_local_file_access_enabled() == false )
+ {
+ return FALSE;
+ }
+
reset();
mNavOptions.optionFlags &= ~kNavAllowMultipleFiles;
@@ -1100,6 +1157,12 @@ BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename
{
BOOL rtn = FALSE;
+ // if local file browsing is turned off, return without opening dialog
+ if ( check_local_file_access_enabled() == false )
+ {
+ return FALSE;
+ }
+
gViewerWindow->mWindow->beforeDialog();
reset();
@@ -1189,6 +1252,12 @@ BOOL LLFilePicker::getOpenFile( ELoadFilter filter )
{
BOOL rtn = FALSE;
+ // if local file browsing is turned off, return without opening dialog
+ if ( check_local_file_access_enabled() == false )
+ {
+ return FALSE;
+ }
+
gViewerWindow->mWindow->beforeDialog();
reset();
@@ -1233,6 +1302,12 @@ BOOL LLFilePicker::getMultipleOpenFiles( ELoadFilter filter )
{
BOOL rtn = FALSE;
+ // if local file browsing is turned off, return without opening dialog
+ if ( check_local_file_access_enabled() == false )
+ {
+ return FALSE;
+ }
+
gViewerWindow->mWindow->beforeDialog();
reset();
@@ -1263,6 +1338,13 @@ BOOL LLFilePicker::getMultipleOpenFiles( ELoadFilter filter )
BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename )
{
+ // if local file browsing is turned off, return without opening dialog
+ // (Even though this is a stub, I think we still should not return anything at all)
+ if ( check_local_file_access_enabled() == false )
+ {
+ return FALSE;
+ }
+
reset();
llinfos << "getSaveFile suggested filename is [" << filename
@@ -1277,6 +1359,13 @@ BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename
BOOL LLFilePicker::getOpenFile( ELoadFilter filter )
{
+ // if local file browsing is turned off, return without opening dialog
+ // (Even though this is a stub, I think we still should not return anything at all)
+ if ( check_local_file_access_enabled() == false )
+ {
+ return FALSE;
+ }
+
reset();
// HACK: Static filenames for 'open' until we implement filepicker
@@ -1295,6 +1384,13 @@ BOOL LLFilePicker::getOpenFile( ELoadFilter filter )
BOOL LLFilePicker::getMultipleOpenFiles( ELoadFilter filter )
{
+ // if local file browsing is turned off, return without opening dialog
+ // (Even though this is a stub, I think we still should not return anything at all)
+ if ( check_local_file_access_enabled() == false )
+ {
+ return FALSE;
+ }
+
reset();
return FALSE;
}
diff --git a/indra/newview/llfilepicker.h b/indra/newview/llfilepicker.h
index 5819ac4fd8..596bfa3e69 100644
--- a/indra/newview/llfilepicker.h
+++ b/indra/newview/llfilepicker.h
@@ -140,6 +140,10 @@ private:
//FILENAME_BUFFER_SIZE = 65536
FILENAME_BUFFER_SIZE = 65000
};
+
+ // utility function to check if access to local file system via file browser
+ // is enabled and if not, tidy up and indicate we're not allowed to do this.
+ bool check_local_file_access_enabled();
#if LL_WINDOWS
OPENFILENAMEW mOFN; // for open and save dialogs
diff --git a/indra/newview/llfirstuse.cpp b/indra/newview/llfirstuse.cpp
index b08c113923..4c17199895 100644
--- a/indra/newview/llfirstuse.cpp
+++ b/indra/newview/llfirstuse.cpp
@@ -100,9 +100,16 @@ void LLFirstUse::useSandbox()
void LLFirstUse::notUsingDestinationGuide(bool enable)
{
// not doing this yet
- //firstUseNotification("FirstNotUseDestinationGuide", enable, "HintDestinationGuide", LLSD(), LLSD().with("target", "dest_guide_btn").with("direction", "left"));
+ firstUseNotification("FirstNotUseDestinationGuide", enable, "HintDestinationGuide", LLSD(), LLSD().with("target", "dest_guide_btn").with("direction", "top"));
}
+void LLFirstUse::notUsingAvatarPicker(bool enable)
+{
+ // not doing this yet
+ firstUseNotification("FirstNotUseAvatarPicker", enable, "HintAvatarPicker", LLSD(), LLSD().with("target", "avatar_picker_btn").with("direction", "top"));
+}
+
+
// static
void LLFirstUse::notUsingSidePanel(bool enable)
{
@@ -113,7 +120,15 @@ void LLFirstUse::notUsingSidePanel(bool enable)
// static
void LLFirstUse::notMoving(bool enable)
{
+ // fire off 2 notifications and rely on filtering to select the relevant one
firstUseNotification("FirstNotMoving", enable, "HintMove", LLSD(), LLSD().with("target", "move_btn").with("direction", "top"));
+ firstUseNotification("FirstNotMoving", enable, "HintMoveArrows", LLSD(), LLSD().with("target", "bottom_tray").with("direction", "top").with("hint_image", "arrow_keys.png").with("down_arrow", ""));
+}
+
+// static
+void LLFirstUse::viewPopup(bool enable)
+{
+ firstUseNotification("FirstViewPopup", enable, "HintView", LLSD(), LLSD().with("target", "view_popup").with("direction", "right"));
}
// static
diff --git a/indra/newview/llfirstuse.h b/indra/newview/llfirstuse.h
index 3b7ff6383b..81659988e6 100644
--- a/indra/newview/llfirstuse.h
+++ b/indra/newview/llfirstuse.h
@@ -87,8 +87,10 @@ public:
static void otherAvatarChatFirst(bool enable = true);
static void sit(bool enable = true);
static void notUsingDestinationGuide(bool enable = true);
+ static void notUsingAvatarPicker(bool enable = true);
static void notUsingSidePanel(bool enable = true);
static void notMoving(bool enable = true);
+ static void viewPopup(bool enable = true);
static void newInventory(bool enable = true);
static void receiveLindens(bool enable = true);
static void setDisplayName(bool enable = true);
diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp
index 8ae3ccbae3..2873bc0059 100644
--- a/indra/newview/llfloaterabout.cpp
+++ b/indra/newview/llfloaterabout.cpp
@@ -272,7 +272,7 @@ LLSD LLFloaterAbout::getInfo()
}
// TODO: Implement media plugin version query
- info["QT_WEBKIT_VERSION"] = "4.6 (version number hard-coded)";
+ info["QT_WEBKIT_VERSION"] = "4.7.1 (version number hard-coded)";
if (gPacketsIn > 0)
{
diff --git a/indra/newview/llfloaterbuycurrency.cpp b/indra/newview/llfloaterbuycurrency.cpp
index 58c79fdf15..e21a8594bc 100644
--- a/indra/newview/llfloaterbuycurrency.cpp
+++ b/indra/newview/llfloaterbuycurrency.cpp
@@ -267,17 +267,23 @@ void LLFloaterBuyCurrencyUI::onClickBuy()
{
mManager.buy(getString("buy_currency"));
updateUI();
+ // Update L$ balance
+ LLStatusBar::sendMoneyBalanceRequest();
}
void LLFloaterBuyCurrencyUI::onClickCancel()
{
closeFloater();
+ // Update L$ balance
+ LLStatusBar::sendMoneyBalanceRequest();
}
void LLFloaterBuyCurrencyUI::onClickErrorWeb()
{
LLWeb::loadURLExternal(mManager.errorURI());
closeFloater();
+ // Update L$ balance
+ LLStatusBar::sendMoneyBalanceRequest();
}
// static
diff --git a/indra/newview/llfloaterbuycurrencyhtml.cpp b/indra/newview/llfloaterbuycurrencyhtml.cpp
index bde620d965..013cf74c7b 100644
--- a/indra/newview/llfloaterbuycurrencyhtml.cpp
+++ b/indra/newview/llfloaterbuycurrencyhtml.cpp
@@ -82,7 +82,7 @@ void LLFloaterBuyCurrencyHTML::navigateToFinalURL()
LLStringUtil::format( buy_currency_url, replace );
// write final URL to debug console
- llinfos << "Buy currency HTML prased URL is " << buy_currency_url << llendl;
+ llinfos << "Buy currency HTML parsed URL is " << buy_currency_url << llendl;
// kick off the navigation
mBrowser->navigateTo( buy_currency_url, "text/html" );
@@ -105,7 +105,7 @@ void LLFloaterBuyCurrencyHTML::handleMediaEvent( LLPluginClassMedia* self, EMedi
//
void LLFloaterBuyCurrencyHTML::onClose( bool app_quitting )
{
- // update L$ balanace one more time
+ // Update L$ balance one more time
LLStatusBar::sendMoneyBalanceRequest();
destroy();
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp
index ad24c6534a..1dfa904a19 100644
--- a/indra/newview/llfloatercamera.cpp
+++ b/indra/newview/llfloatercamera.cpp
@@ -40,6 +40,8 @@
#include "lltoolmgr.h"
#include "lltoolfocus.h"
#include "llslider.h"
+#include "llfirstuse.h"
+#include "llhints.h"
static LLDefaultChildRegistry::Register<LLPanelCameraItem> r("panel_camera_item");
@@ -73,6 +75,8 @@ protected:
void onZoomPlusHeldDown();
void onZoomMinusHeldDown();
void onSliderValueChanged();
+ void onCameraTrack();
+ void onCameraRotate();
F32 getOrbitRate(F32 time);
private:
@@ -162,6 +166,8 @@ LLPanelCameraZoom::LLPanelCameraZoom()
mCommitCallbackRegistrar.add("Zoom.minus", boost::bind(&LLPanelCameraZoom::onZoomMinusHeldDown, this));
mCommitCallbackRegistrar.add("Zoom.plus", boost::bind(&LLPanelCameraZoom::onZoomPlusHeldDown, this));
mCommitCallbackRegistrar.add("Slider.value_changed", boost::bind(&LLPanelCameraZoom::onSliderValueChanged, this));
+ mCommitCallbackRegistrar.add("Camera.track", boost::bind(&LLPanelCameraZoom::onCameraTrack, this));
+ mCommitCallbackRegistrar.add("Camera.rotate", boost::bind(&LLPanelCameraZoom::onCameraRotate, this));
}
BOOL LLPanelCameraZoom::postBuild()
@@ -198,6 +204,18 @@ void LLPanelCameraZoom::onZoomMinusHeldDown()
gAgentCamera.setOrbitOutKey(getOrbitRate(time));
}
+void LLPanelCameraZoom::onCameraTrack()
+{
+ // EXP-202 when camera panning activated, remove the hint
+ LLFirstUse::viewPopup( false );
+}
+
+void LLPanelCameraZoom::onCameraRotate()
+{
+ // EXP-202 when camera rotation activated, remove the hint
+ LLFirstUse::viewPopup( false );
+}
+
F32 LLPanelCameraZoom::getOrbitRate(F32 time)
{
if( time < NUDGE_TIME )
@@ -294,6 +312,8 @@ LLFloaterCamera* LLFloaterCamera::findInstance()
void LLFloaterCamera::onOpen(const LLSD& key)
{
+ LLFirstUse::viewPopup();
+
LLButton *anchor_panel = LLBottomTray::getInstance()->getChild<LLButton>("camera_btn");
setDockControl(new LLDockControl(
@@ -336,6 +356,7 @@ LLFloaterCamera::LLFloaterCamera(const LLSD& val)
mCurrMode(CAMERA_CTRL_MODE_PAN),
mPrevMode(CAMERA_CTRL_MODE_PAN)
{
+ LLHints::registerHintTarget("view_popup", LLView::getHandle());
}
// virtual
@@ -343,6 +364,7 @@ BOOL LLFloaterCamera::postBuild()
{
setIsChrome(TRUE);
setTitleVisible(TRUE); // restore title visibility after chrome applying
+ updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730)
mRotate = getChild<LLJoystickCameraRotate>(ORBIT);
mZoom = findChild<LLPanelCameraZoom>(ZOOM);
diff --git a/indra/newview/llfloaterhelpbrowser.cpp b/indra/newview/llfloaterhelpbrowser.cpp
index cec98e9992..a650886d89 100644
--- a/indra/newview/llfloaterhelpbrowser.cpp
+++ b/indra/newview/llfloaterhelpbrowser.cpp
@@ -132,9 +132,10 @@ void LLFloaterHelpBrowser::onClickOpenWebBrowser(void* user_data)
void LLFloaterHelpBrowser::openMedia(const std::string& media_url)
{
- mBrowser->setHomePageUrl(media_url);
- //mBrowser->navigateTo("data:text/html;charset=utf-8,I'd really love to be going to:<br><b>" + media_url + "</b>"); // tofu HACK for debugging =:)
- mBrowser->navigateTo(media_url);
+ // explicitly make the media mime type for this floater since it will
+ // only ever display one type of content (Web).
+ mBrowser->setHomePageUrl(media_url, "text/html");
+ mBrowser->navigateTo(media_url, "text/html");
setCurrentURL(media_url);
}
diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp
index 351b9ac5da..1b94d8cbcd 100644
--- a/indra/newview/llfloatermap.cpp
+++ b/indra/newview/llfloatermap.cpp
@@ -83,7 +83,6 @@ LLFloaterMap::~LLFloaterMap()
BOOL LLFloaterMap::postBuild()
{
mMap = getChild<LLNetMap>("Net Map");
- mMap->setScale(gSavedSettings.getF32("MiniMapScale"));
mMap->setToolTipMsg(getString("ToolTipMsg"));
sendChildToBack(mMap);
@@ -288,7 +287,16 @@ void LLFloaterMap::handleZoom(const LLSD& userdata)
std::string level = userdata.asString();
F32 scale = 0.0f;
- if (level == std::string("close"))
+ if (level == std::string("default"))
+ {
+ LLControlVariable *pvar = gSavedSettings.getControl("MiniMapScale");
+ if(pvar)
+ {
+ pvar->resetToDefault();
+ scale = gSavedSettings.getF32("MiniMapScale");
+ }
+ }
+ else if (level == std::string("close"))
scale = LLNetMap::MAP_SCALE_MAX;
else if (level == std::string("medium"))
scale = LLNetMap::MAP_SCALE_MID;
@@ -296,7 +304,6 @@ void LLFloaterMap::handleZoom(const LLSD& userdata)
scale = LLNetMap::MAP_SCALE_MIN;
if (scale != 0.0f)
{
- gSavedSettings.setF32("MiniMapScale", scale );
mMap->setScale(scale);
}
}
diff --git a/indra/newview/llfloatermediabrowser.cpp b/indra/newview/llfloatermediabrowser.cpp
index d20092e344..7a670dd90c 100644
--- a/indra/newview/llfloatermediabrowser.cpp
+++ b/indra/newview/llfloatermediabrowser.cpp
@@ -306,17 +306,14 @@ void LLFloaterMediaBrowser::setCurrentURL(const std::string& url)
{
mCurrentURL = url;
- // redirects will navigate momentarily to about:blank, don't add to history
- if (mCurrentURL != "about:blank")
- {
- mAddressCombo->remove(mCurrentURL);
- mAddressCombo->add(mCurrentURL);
- mAddressCombo->selectByValue(mCurrentURL);
+ mAddressCombo->remove(mCurrentURL);
+ mAddressCombo->add(mCurrentURL);
+ mAddressCombo->selectByValue(mCurrentURL);
+
+ // Serialize url history
+ LLURLHistory::removeURL("browser", mCurrentURL);
+ LLURLHistory::addURL("browser", mCurrentURL);
- // Serialize url history
- LLURLHistory::removeURL("browser", mCurrentURL);
- LLURLHistory::addURL("browser", mCurrentURL);
- }
getChildView("back")->setEnabled(mBrowser->canNavigateBack());
getChildView("forward")->setEnabled(mBrowser->canNavigateForward());
getChildView("reload")->setEnabled(TRUE);
@@ -334,8 +331,15 @@ void LLFloaterMediaBrowser::onClickRefresh(void* user_data)
{
LLFloaterMediaBrowser* self = (LLFloaterMediaBrowser*)user_data;
- self->mAddressCombo->remove(0);
- self->mBrowser->navigateTo(self->mCurrentURL);
+ if( self->mBrowser->getMediaPlugin() && self->mBrowser->getMediaPlugin()->pluginSupportsMediaBrowser())
+ {
+ bool ignore_cache = true;
+ self->mBrowser->getMediaPlugin()->browse_reload( ignore_cache );
+ }
+ else
+ {
+ self->mBrowser->navigateTo(self->mCurrentURL);
+ }
}
//static
diff --git a/indra/newview/llfloaternotificationsconsole.cpp b/indra/newview/llfloaternotificationsconsole.cpp
index 42dc60f9e0..29af81d64c 100644
--- a/indra/newview/llfloaternotificationsconsole.cpp
+++ b/indra/newview/llfloaternotificationsconsole.cpp
@@ -174,6 +174,7 @@ BOOL LLFloaterNotificationConsole::postBuild()
// these are in the order of processing
addChannel("Unexpired");
addChannel("Ignore");
+ addChannel("VisibilityRules");
addChannel("Visible", true);
// all the ones below attach to the Visible channel
addChannel("Persistent");
diff --git a/indra/newview/llfloaterpostcard.cpp b/indra/newview/llfloaterpostcard.cpp
index f0c9d52ccd..dd0b1d999c 100644
--- a/indra/newview/llfloaterpostcard.cpp
+++ b/indra/newview/llfloaterpostcard.cpp
@@ -112,11 +112,14 @@ LLFloaterPostcard* LLFloaterPostcard::showFromSnapshot(LLImageJPEG *jpeg, LLView
// Take the images from the caller
// It's now our job to clean them up
LLFloaterPostcard* instance = LLFloaterReg::showTypedInstance<LLFloaterPostcard>("postcard", LLSD(img->getID()));
-
- instance->mJPEGImage = jpeg;
- instance->mViewerImage = img;
- instance->mImageScale = image_scale;
- instance->mPosTakenGlobal = pos_taken_global;
+
+ if (instance) // may be 0 if we're in mouselook mode
+ {
+ instance->mJPEGImage = jpeg;
+ instance->mViewerImage = img;
+ instance->mImageScale = image_scale;
+ instance->mPosTakenGlobal = pos_taken_global;
+ }
return instance;
}
@@ -363,7 +366,9 @@ void LLFloaterPostcard::sendPostcard()
{
gAssetStorage->storeAssetData(mTransactionID, LLAssetType::AT_IMAGE_JPEG, &uploadCallback, (void *)this, FALSE);
}
-
+
+ // give user feedback of the event
+ gViewerWindow->playSnapshotAnimAndSound();
LLUploadDialog::modalUploadDialog(getString("upload_message"));
// don't destroy the window until the upload is done
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 84b7fbcce2..8c9dfe435a 100644..100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -288,6 +288,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
mDoubleClickActionDirty(false),
mFavoritesRecordMayExist(false)
{
+
//Build Floater is now Called from LLFloaterReg::add("preferences", "floater_preferences.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPreference>);
static bool registered_dialog = false;
@@ -324,16 +325,61 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
mCommitCallbackRegistrar.add("Pref.getUIColor", boost::bind(&LLFloaterPreference::getUIColor, this ,_1, _2));
mCommitCallbackRegistrar.add("Pref.MaturitySettings", boost::bind(&LLFloaterPreference::onChangeMaturity, this));
mCommitCallbackRegistrar.add("Pref.BlockList", boost::bind(&LLFloaterPreference::onClickBlockList, this));
+
+ sSkin = gSavedSettings.getString("SkinCurrent");
+
mCommitCallbackRegistrar.add("Pref.CommitDoubleClickChekbox", boost::bind(&LLFloaterPreference::onDoubleClickCheckBox, this, _1));
mCommitCallbackRegistrar.add("Pref.CommitRadioDoubleClick", boost::bind(&LLFloaterPreference::onDoubleClickRadio, this));
- sSkin = gSavedSettings.getString("SkinCurrent");
-
gSavedSettings.getControl("NameTagShowUsernames")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2));
gSavedSettings.getControl("NameTagShowFriends")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2));
gSavedSettings.getControl("UseDisplayNames")->getCommitSignal()->connect(boost::bind(&handleDisplayNamesOptionChanged, _2));
+
+ LLAvatarPropertiesProcessor::getInstance()->addObserver( gAgent.getID(), this );
}
+void LLFloaterPreference::processProperties( void* pData, EAvatarProcessorType type )
+{
+ if ( APT_PROPERTIES == type )
+ {
+ const LLAvatarData* pAvatarData = static_cast<const LLAvatarData*>( pData );
+ if( pAvatarData && gAgent.getID() == pAvatarData->avatar_id )
+ {
+ storeAvatarProperties( pAvatarData );
+ processProfileProperties( pAvatarData );
+ }
+ }
+}
+
+void LLFloaterPreference::storeAvatarProperties( const LLAvatarData* pAvatarData )
+{
+ mAvatarProperties.avatar_id = gAgent.getID();
+ mAvatarProperties.image_id = pAvatarData->image_id;
+ mAvatarProperties.fl_image_id = pAvatarData->fl_image_id;
+ mAvatarProperties.about_text = pAvatarData->about_text;
+ mAvatarProperties.fl_about_text = pAvatarData->fl_about_text;
+ mAvatarProperties.profile_url = pAvatarData->profile_url;
+ mAvatarProperties.flags = pAvatarData->flags;
+ mAvatarProperties.allow_publish = pAvatarData->flags & AVATAR_ALLOW_PUBLISH;
+}
+
+void LLFloaterPreference::processProfileProperties(const LLAvatarData* pAvatarData )
+{
+ getChild<LLUICtrl>("online_searchresults")->setValue( (bool)(pAvatarData->flags & AVATAR_ALLOW_PUBLISH) );
+}
+
+void LLFloaterPreference::saveAvatarProperties( void )
+{
+ mAvatarProperties.allow_publish = getChild<LLUICtrl>("online_searchresults")->getValue();
+ if ( mAvatarProperties.allow_publish )
+ {
+ mAvatarProperties.flags |= AVATAR_ALLOW_PUBLISH;
+ }
+
+ LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesUpdate( &mAvatarProperties );
+}
+
+
BOOL LLFloaterPreference::postBuild()
{
gSavedSettings.getControl("PlainTextChatHistory")->getSignal()->connect(boost::bind(&LLIMFloater::processChatHistoryStyleUpdate, _2));
@@ -344,6 +390,8 @@ BOOL LLFloaterPreference::postBuild()
gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&LLNearbyChat::processChatHistoryStyleUpdate, _2));
+ gSavedSettings.getControl("ChatBubbleOpacity")->getSignal()->connect(boost::bind(&LLFloaterPreference::onNameTagOpacityChange, this, _2));
+
LLTabContainer* tabcontainer = getChild<LLTabContainer>("pref core");
if (!tabcontainer->selectTab(gSavedSettings.getS32("LastPrefTab")))
tabcontainer->selectFirstTab();
@@ -415,6 +463,8 @@ void LLFloaterPreference::saveSettings()
void LLFloaterPreference::apply()
{
+ LLAvatarPropertiesProcessor::getInstance()->addObserver( gAgent.getID(), this );
+
LLTabContainer* tabcontainer = getChild<LLTabContainer>("pref core");
if (sSkin != gSavedSettings.getString("SkinCurrent"))
{
@@ -486,6 +536,8 @@ void LLFloaterPreference::apply()
}
}
+ saveAvatarProperties();
+
if (mDoubleClickActionDirty)
{
updateDoubleClickSettings();
@@ -555,6 +607,7 @@ void LLFloaterPreference::cancel()
void LLFloaterPreference::onOpen(const LLSD& key)
{
+
// this variable and if that follows it are used to properly handle busy mode response message
static bool initialized = FALSE;
// if user is logged in and we haven't initialized busy_response yet, do it
@@ -581,7 +634,7 @@ void LLFloaterPreference::onOpen(const LLSD& key)
(gAgent.isMature() || gAgent.isGodlike());
LLComboBox* maturity_combo = getChild<LLComboBox>("maturity_desired_combobox");
-
+ LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesRequest( gAgent.getID() );
if (can_choose_maturity)
{
// if they're not adult or a god, they shouldn't see the adult selection, so delete it
@@ -780,6 +833,16 @@ void LLFloaterPreference::onLanguageChange()
}
}
+void LLFloaterPreference::onNameTagOpacityChange(const LLSD& newvalue)
+{
+ LLColorSwatchCtrl* color_swatch = findChild<LLColorSwatchCtrl>("background");
+ if (color_swatch)
+ {
+ LLColor4 new_color = color_swatch->get();
+ color_swatch->set( new_color.setAlpha(newvalue.asReal()) );
+ }
+}
+
void LLFloaterPreference::onClickSetCache()
{
std::string cur_name(gSavedSettings.getString("CacheLocation"));
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index 4522d9e6eb..784033ae95 100644
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -34,6 +34,7 @@
#define LL_LLFLOATERPREFERENCE_H
#include "llfloater.h"
+#include "llavatarpropertiesprocessor.h"
class LLPanelPreference;
class LLPanelLCD;
@@ -55,7 +56,7 @@ typedef enum
// Floater to control preferences (display, audio, bandwidth, general.
-class LLFloaterPreference : public LLFloater
+class LLFloaterPreference : public LLFloater, public LLAvatarPropertiesObserver
{
public:
LLFloaterPreference(const LLSD& key);
@@ -77,6 +78,11 @@ public:
// translate user's busy response message according to current locale if message is default, otherwise do nothing
static void initBusyResponse();
+ void processProperties( void* pData, EAvatarProcessorType type );
+ void processProfileProperties(const LLAvatarData* pAvatarData );
+ void storeAvatarProperties( const LLAvatarData* pAvatarData );
+ void saveAvatarProperties( void );
+
protected:
void onBtnOK();
void onBtnCancel();
@@ -84,6 +90,7 @@ protected:
void onClickBrowserClearCache();
void onLanguageChange();
+ void onNameTagOpacityChange(const LLSD& newvalue);
// set value of "BusyResponseChanged" in account settings depending on whether busy response
// string differs from default after user changes.
@@ -167,6 +174,8 @@ private:
// Record of current user's favorites may be stored in file on disk.
bool mFavoritesRecordMayExist;
std::string mDirectoryVisibility;
+
+ LLAvatarData mAvatarProperties;
};
class LLPanelPreference : public LLPanel
diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp
index 3ed4aec89a..2041fac8d8 100644
--- a/indra/newview/llfloatersearch.cpp
+++ b/indra/newview/llfloatersearch.cpp
@@ -200,5 +200,5 @@ void LLFloaterSearch::search(const LLSD &key)
url = LLWeb::expandURLSubstitutions(url, subs);
// and load the URL in the web view
- mBrowser->navigateTo(url);
+ mBrowser->navigateTo(url, "text/html");
}
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index cad54cd158..0931f77281 100644
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -1004,6 +1004,7 @@ void LLSnapshotLivePreview::saveTexture()
LLFloaterPerms::getEveryonePerms(),
"Snapshot : " + pos_string,
callback, expected_upload_cost, userdata);
+ gViewerWindow->playSnapshotAnimAndSound();
}
else
{
@@ -1025,6 +1026,10 @@ BOOL LLSnapshotLivePreview::saveLocal()
mDataSize = 0;
updateSnapshot(FALSE, FALSE);
+ if(success)
+ {
+ gViewerWindow->playSnapshotAnimAndSound();
+ }
return success;
}
@@ -1044,6 +1049,8 @@ void LLSnapshotLivePreview::saveWeb()
LLLandmarkActions::getRegionNameAndCoordsFromPosGlobal(gAgentCamera.getCameraPositionGlobal(),
boost::bind(&LLSnapshotLivePreview::regionNameCallback, this, jpg, metadata, _1, _2, _3, _4));
+
+ gViewerWindow->playSnapshotAnimAndSound();
}
void LLSnapshotLivePreview::regionNameCallback(LLImageJPEG* snapshot, LLSD& metadata, const std::string& name, S32 x, S32 y, S32 z)
@@ -1533,8 +1540,6 @@ void LLFloaterSnapshot::Impl::onClickNewSnapshot(void* data)
if (previewp && view)
{
previewp->updateSnapshot(TRUE);
-
- gViewerWindow->playSnapshotAnimAndSound();
}
}
@@ -2206,8 +2211,6 @@ void LLFloaterSnapshot::onOpen(const LLSD& key)
gSnapshotFloaterView->setEnabled(TRUE);
gSnapshotFloaterView->setVisible(TRUE);
gSnapshotFloaterView->adjustToFitScreen(this, FALSE);
-
- gViewerWindow->playSnapshotAnimAndSound();
}
void LLFloaterSnapshot::onClose(bool app_quitting)
diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp
new file mode 100644
index 0000000000..51726112a0
--- /dev/null
+++ b/indra/newview/llfloaterwebcontent.cpp
@@ -0,0 +1,402 @@
+/**
+ * @file llfloaterwebcontent.cpp
+ * @brief floater for displaying web content - e.g. profiles and search (eventually)
+ *
+ * $LicenseInfo:firstyear=2006&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llcombobox.h"
+#include "lliconctrl.h"
+#include "llfloaterreg.h"
+#include "lllayoutstack.h"
+#include "llpluginclassmedia.h"
+#include "llprogressbar.h"
+#include "lltextbox.h"
+#include "llurlhistory.h"
+#include "llviewercontrol.h"
+#include "llweb.h"
+#include "llwindow.h"
+
+#include "llfloaterwebcontent.h"
+
+LLFloaterWebContent::LLFloaterWebContent( const LLSD& key )
+ : LLFloater( key )
+{
+ mCommitCallbackRegistrar.add( "WebContent.Back", boost::bind( &LLFloaterWebContent::onClickBack, this ));
+ mCommitCallbackRegistrar.add( "WebContent.Forward", boost::bind( &LLFloaterWebContent::onClickForward, this ));
+ mCommitCallbackRegistrar.add( "WebContent.Reload", boost::bind( &LLFloaterWebContent::onClickReload, this ));
+ mCommitCallbackRegistrar.add( "WebContent.Stop", boost::bind( &LLFloaterWebContent::onClickStop, this ));
+ mCommitCallbackRegistrar.add( "WebContent.EnterAddress", boost::bind( &LLFloaterWebContent::onEnterAddress, this ));
+ mCommitCallbackRegistrar.add( "WebContent.PopExternal", boost::bind( &LLFloaterWebContent::onPopExternal, this ));
+}
+
+BOOL LLFloaterWebContent::postBuild()
+{
+ // these are used in a bunch of places so cache them
+ mWebBrowser = getChild< LLMediaCtrl >( "webbrowser" );
+ mAddressCombo = getChild< LLComboBox >( "address" );
+ mStatusBarText = getChild< LLTextBox >( "statusbartext" );
+ mStatusBarProgress = getChild<LLProgressBar>("statusbarprogress" );
+
+ // observe browser events
+ mWebBrowser->addObserver( this );
+
+ // these buttons are always enabled
+ getChildView("reload")->setEnabled( true );
+ getChildView("popexternal")->setEnabled( true );
+
+ // cache image for secure browsing
+ mSecureLockIcon = getChild< LLIconCtrl >("media_secure_lock_flag");
+
+ // initialize the URL history using the system URL History manager
+ initializeURLHistory();
+
+ return TRUE;
+}
+
+void LLFloaterWebContent::initializeURLHistory()
+{
+ // start with an empty list
+ LLCtrlListInterface* url_list = childGetListInterface("address");
+ if (url_list)
+ {
+ url_list->operateOnAll(LLCtrlListInterface::OP_DELETE);
+ }
+
+ // Get all of the entries in the "browser" collection
+ LLSD browser_history = LLURLHistory::getURLHistory("browser");
+ LLSD::array_iterator iter_history =
+ browser_history.beginArray();
+ LLSD::array_iterator end_history =
+ browser_history.endArray();
+ for(; iter_history != end_history; ++iter_history)
+ {
+ std::string url = (*iter_history).asString();
+ if(! url.empty())
+ url_list->addSimpleElement(url);
+ }
+}
+
+//static
+void LLFloaterWebContent::create( const std::string &url, const std::string& target, const std::string& uuid )
+{
+ lldebugs << "url = " << url << ", target = " << target << ", uuid = " << uuid << llendl;
+
+ std::string tag = target;
+
+ if(target.empty() || target == "_blank")
+ {
+ if(!uuid.empty())
+ {
+ tag = uuid;
+ }
+ else
+ {
+ // create a unique tag for this instance
+ LLUUID id;
+ id.generate();
+ tag = id.asString();
+ }
+ }
+
+ S32 browser_window_limit = gSavedSettings.getS32("WebContentWindowLimit");
+
+ if(LLFloaterReg::findInstance("web_content", tag) != NULL)
+ {
+ // There's already a web browser for this tag, so we won't be opening a new window.
+ }
+ else if(browser_window_limit != 0)
+ {
+ // showInstance will open a new window. Figure out how many web browsers are already open,
+ // and close the least recently opened one if this will put us over the limit.
+
+ LLFloaterReg::const_instance_list_t &instances = LLFloaterReg::getFloaterList("web_content");
+ lldebugs << "total instance count is " << instances.size() << llendl;
+
+ for(LLFloaterReg::const_instance_list_t::const_iterator iter = instances.begin(); iter != instances.end(); iter++)
+ {
+ lldebugs << " " << (*iter)->getKey() << llendl;
+ }
+
+ if(instances.size() >= (size_t)browser_window_limit)
+ {
+ // Destroy the least recently opened instance
+ (*instances.begin())->closeFloater();
+ }
+ }
+
+ LLFloaterWebContent *browser = dynamic_cast<LLFloaterWebContent*> (LLFloaterReg::showInstance("web_content", tag));
+ llassert(browser);
+ if(browser)
+ {
+ browser->mUUID = uuid;
+
+ // tell the browser instance to load the specified URL
+ browser->open_media(url, target);
+ LLViewerMedia::proxyWindowOpened(target, uuid);
+ }
+}
+
+//static
+void LLFloaterWebContent::closeRequest(const std::string &uuid)
+{
+ LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("web_content");
+ lldebugs << "instance list size is " << inst_list.size() << ", incoming uuid is " << uuid << llendl;
+ for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end(); ++iter)
+ {
+ LLFloaterWebContent* i = dynamic_cast<LLFloaterWebContent*>(*iter);
+ lldebugs << " " << i->mUUID << llendl;
+ if (i && i->mUUID == uuid)
+ {
+ i->closeFloater(false);
+ return;
+ }
+ }
+}
+
+//static
+void LLFloaterWebContent::geometryChanged(const std::string &uuid, S32 x, S32 y, S32 width, S32 height)
+{
+ LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("web_content");
+ lldebugs << "instance list size is " << inst_list.size() << ", incoming uuid is " << uuid << llendl;
+ for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end(); ++iter)
+ {
+ LLFloaterWebContent* i = dynamic_cast<LLFloaterWebContent*>(*iter);
+ lldebugs << " " << i->mUUID << llendl;
+ if (i && i->mUUID == uuid)
+ {
+ i->geometryChanged(x, y, width, height);
+ return;
+ }
+ }
+}
+
+void LLFloaterWebContent::geometryChanged(S32 x, S32 y, S32 width, S32 height)
+{
+ // Make sure the layout of the browser control is updated, so this calculation is correct.
+ LLLayoutStack::updateClass();
+
+ // TODO: need to adjust size and constrain position to make sure floaters aren't moved outside the window view, etc.
+ LLCoordWindow window_size;
+ getWindow()->getSize(&window_size);
+
+ // Adjust width and height for the size of the chrome on the web Browser window.
+ width += getRect().getWidth() - mWebBrowser->getRect().getWidth();
+ height += getRect().getHeight() - mWebBrowser->getRect().getHeight();
+
+ LLRect geom;
+ geom.setOriginAndSize(x, window_size.mY - (y + height), width, height);
+
+ lldebugs << "geometry change: " << geom << llendl;
+
+ handleReshape(geom,false);
+}
+
+void LLFloaterWebContent::open_media(const std::string& web_url, const std::string& target)
+{
+ // Specifying a mime type of text/html here causes the plugin system to skip the MIME type probe and just open a browser plugin.
+ mWebBrowser->setHomePageUrl(web_url, "text/html");
+ mWebBrowser->setTarget(target);
+ mWebBrowser->navigateTo(web_url, "text/html");
+ set_current_url(web_url);
+}
+
+//virtual
+void LLFloaterWebContent::onClose(bool app_quitting)
+{
+ LLViewerMedia::proxyWindowClosed(mUUID);
+ destroy();
+}
+
+// virtual
+void LLFloaterWebContent::draw()
+{
+ // this is asychronous so we need to keep checking
+ getChildView( "back" )->setEnabled( mWebBrowser->canNavigateBack() );
+ getChildView( "forward" )->setEnabled( mWebBrowser->canNavigateForward() );
+
+ LLFloater::draw();
+}
+
+// virtual
+void LLFloaterWebContent::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event)
+{
+ if(event == MEDIA_EVENT_LOCATION_CHANGED)
+ {
+ const std::string url = self->getLocation();
+
+ if ( url.length() )
+ mStatusBarText->setText( url );
+
+ set_current_url( url );
+ }
+ else if(event == MEDIA_EVENT_NAVIGATE_BEGIN)
+ {
+ // flags are sent with this event
+ getChildView("back")->setEnabled( self->getHistoryBackAvailable() );
+ getChildView("forward")->setEnabled( self->getHistoryForwardAvailable() );
+
+ // toggle visibility of these buttons based on browser state
+ getChildView("reload")->setVisible( false );
+ getChildView("stop")->setVisible( true );
+
+ // turn "on" progress bar now we're about to start loading
+ mStatusBarProgress->setVisible( true );
+ }
+ else if(event == MEDIA_EVENT_NAVIGATE_COMPLETE)
+ {
+ // flags are sent with this event
+ getChildView("back")->setEnabled( self->getHistoryBackAvailable() );
+ getChildView("forward")->setEnabled( self->getHistoryForwardAvailable() );
+
+ // toggle visibility of these buttons based on browser state
+ getChildView("reload")->setVisible( true );
+ getChildView("stop")->setVisible( false );
+
+ // turn "off" progress bar now we're loaded
+ mStatusBarProgress->setVisible( false );
+
+ // we populate the status bar with URLs as they change so clear it now we're done
+ const std::string end_str = "";
+ mStatusBarText->setText( end_str );
+
+ // decide if secure browsing icon should be displayed
+ std::string prefix = std::string("https://");
+ std::string test_prefix = mCurrentURL.substr(0, prefix.length());
+ LLStringUtil::toLower(test_prefix);
+ if(test_prefix == prefix)
+ {
+ mSecureLockIcon->setVisible(true);
+ }
+ else
+ {
+ mSecureLockIcon->setVisible(false);
+ }
+ }
+ else if(event == MEDIA_EVENT_CLOSE_REQUEST)
+ {
+ // The browser instance wants its window closed.
+ closeFloater();
+ }
+ else if(event == MEDIA_EVENT_GEOMETRY_CHANGE)
+ {
+ geometryChanged(self->getGeometryX(), self->getGeometryY(), self->getGeometryWidth(), self->getGeometryHeight());
+ }
+ else if(event == MEDIA_EVENT_STATUS_TEXT_CHANGED )
+ {
+ const std::string text = self->getStatusText();
+ if ( text.length() )
+ mStatusBarText->setText( text );
+ }
+ else if(event == MEDIA_EVENT_PROGRESS_UPDATED )
+ {
+ int percent = (int)self->getProgressPercent();
+ mStatusBarProgress->setValue( percent );
+ }
+ else if(event == MEDIA_EVENT_NAME_CHANGED )
+ {
+ std::string page_title = self->getMediaName();
+ // simulate browser behavior - title is empty, use the current URL
+ if ( page_title.length() > 0 )
+ setTitle( page_title );
+ else
+ setTitle( mCurrentURL );
+ }
+ else if(event == MEDIA_EVENT_LINK_HOVERED )
+ {
+ const std::string link = self->getHoverLink();
+ mStatusBarText->setText( link );
+ }
+}
+
+void LLFloaterWebContent::set_current_url(const std::string& url)
+{
+ mCurrentURL = url;
+
+ // serialize url history into the system URL History manager
+ LLURLHistory::removeURL("browser", mCurrentURL);
+ LLURLHistory::addURL("browser", mCurrentURL);
+
+ mAddressCombo->remove( mCurrentURL );
+ mAddressCombo->add( mCurrentURL );
+ mAddressCombo->selectByValue( mCurrentURL );
+}
+
+void LLFloaterWebContent::onClickForward()
+{
+ mWebBrowser->navigateForward();
+}
+
+void LLFloaterWebContent::onClickBack()
+{
+ mWebBrowser->navigateBack();
+}
+
+void LLFloaterWebContent::onClickReload()
+{
+
+ if( mWebBrowser->getMediaPlugin() )
+ {
+ bool ignore_cache = true;
+ mWebBrowser->getMediaPlugin()->browse_reload( ignore_cache );
+ }
+ else
+ {
+ mWebBrowser->navigateTo(mCurrentURL);
+ }
+}
+
+void LLFloaterWebContent::onClickStop()
+{
+ if( mWebBrowser->getMediaPlugin() )
+ mWebBrowser->getMediaPlugin()->browse_stop();
+
+ // still should happen when we catch the navigate complete event
+ // but sometimes (don't know why) that event isn't sent from Qt
+ // and we getto a point where the stop button stays active.
+ getChildView("reload")->setVisible( true );
+ getChildView("stop")->setVisible( false );
+}
+
+void LLFloaterWebContent::onEnterAddress()
+{
+ // make sure there is at least something there.
+ // (perhaps this test should be for minimum length of a URL)
+ std::string url = mAddressCombo->getValue().asString();
+ if ( url.length() > 0 )
+ {
+ mWebBrowser->navigateTo( url, "text/html");
+ };
+}
+
+void LLFloaterWebContent::onPopExternal()
+{
+ // make sure there is at least something there.
+ // (perhaps this test should be for minimum length of a URL)
+ std::string url = mAddressCombo->getValue().asString();
+ if ( url.length() > 0 )
+ {
+ LLWeb::loadURLExternal( url );
+ };
+}
diff --git a/indra/newview/llfloaterwebcontent.h b/indra/newview/llfloaterwebcontent.h
new file mode 100644
index 0000000000..001d822ada
--- /dev/null
+++ b/indra/newview/llfloaterwebcontent.h
@@ -0,0 +1,82 @@
+/**
+ * @file llfloaterwebcontent.h
+ * @brief floater for displaying web content - e.g. profiles and search (eventually)
+ *
+ * $LicenseInfo:firstyear=2006&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLFLOATERWEBCONTENT_H
+#define LL_LLFLOATERWEBCONTENT_H
+
+#include "llfloater.h"
+#include "llmediactrl.h"
+
+class LLMediaCtrl;
+class LLComboBox;
+class LLTextBox;
+class LLProgressBar;
+class LLIconCtrl;
+
+class LLFloaterWebContent :
+ public LLFloater,
+ public LLViewerMediaObserver
+{
+public:
+ LOG_CLASS(LLFloaterWebContent);
+ LLFloaterWebContent(const LLSD& key);
+
+ void initializeURLHistory();
+
+ static void create(const std::string &url, const std::string& target, const std::string& uuid = LLStringUtil::null);
+
+ static void closeRequest(const std::string &uuid);
+ static void geometryChanged(const std::string &uuid, S32 x, S32 y, S32 width, S32 height);
+ void geometryChanged(S32 x, S32 y, S32 width, S32 height);
+
+ /* virtual */ BOOL postBuild();
+ /* virtual */ void onClose(bool app_quitting);
+ /* virtual */ void draw();
+
+ // inherited from LLViewerMediaObserver
+ /*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event);
+
+ void onClickBack();
+ void onClickForward();
+ void onClickReload();
+ void onClickStop();
+ void onEnterAddress();
+ void onPopExternal();
+
+private:
+ void open_media(const std::string& media_url, const std::string& target);
+ void set_current_url(const std::string& url);
+
+ LLMediaCtrl* mWebBrowser;
+ LLComboBox* mAddressCombo;
+ LLIconCtrl *mSecureLockIcon;
+ LLTextBox* mStatusBarText;
+ LLProgressBar* mStatusBarProgress;
+ std::string mCurrentURL;
+ std::string mUUID;
+};
+
+#endif // LL_LLFLOATERWEBCONTENT_H
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index ba0eb8a711..017cd2fc49 100644..100755
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -72,7 +72,6 @@
#include "llweb.h"
#include "llslider.h"
#include "message.h"
-
#include "llwindow.h" // copyTextToClipboard()
//---------------------------------------------------------------------------
@@ -106,8 +105,8 @@ class LLWorldMapHandler : public LLCommandHandler
{
public:
// requires trusted browser to trigger
- LLWorldMapHandler() : LLCommandHandler("worldmap", UNTRUSTED_THROTTLE) { }
-
+ LLWorldMapHandler() : LLCommandHandler("worldmap", UNTRUSTED_THROTTLE ) { }
+
bool handle(const LLSD& params, const LLSD& query_map,
LLMediaCtrl* web)
{
@@ -117,21 +116,52 @@ public:
LLFloaterReg::showInstance("world_map", "center");
return true;
}
-
+
// support the secondlife:///app/worldmap/{LOCATION}/{COORDS} SLapp
const std::string region_name = LLURI::unescape(params[0].asString());
S32 x = (params.size() > 1) ? params[1].asInteger() : 128;
S32 y = (params.size() > 2) ? params[2].asInteger() : 128;
S32 z = (params.size() > 3) ? params[3].asInteger() : 0;
-
+
LLFloaterWorldMap::getInstance()->trackURL(region_name, x, y, z);
LLFloaterReg::showInstance("world_map", "center");
-
+
return true;
}
};
LLWorldMapHandler gWorldMapHandler;
+// SocialMap handler secondlife:///app/maptrackavatar/id
+class LLMapTrackAvatarHandler : public LLCommandHandler
+{
+public:
+ // requires trusted browser to trigger
+ LLMapTrackAvatarHandler() : LLCommandHandler("maptrackavatar", UNTRUSTED_THROTTLE)
+ {
+ }
+
+ bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web)
+ {
+ //Make sure we have some parameters
+ if (params.size() == 0)
+ {
+ return false;
+ }
+
+ //Get the ID
+ LLUUID id;
+ if (!id.set( params[0], FALSE ))
+ {
+ return false;
+ }
+
+ LLFloaterWorldMap::getInstance()->avatarTrackFromSlapp( id );
+ LLFloaterReg::showInstance( "world_map", "center" );
+
+ return true;
+ }
+};
+LLMapTrackAvatarHandler gMapTrackAvatar;
LLFloaterWorldMap* gFloaterWorldMap = NULL;
@@ -142,7 +172,7 @@ public:
virtual ~LLMapInventoryObserver() {}
virtual void changed(U32 mask);
};
-
+
void LLMapInventoryObserver::changed(U32 mask)
{
// if there's a change we're interested in.
@@ -184,16 +214,16 @@ const LLUUID LLFloaterWorldMap::sHomeID( "10000000-0000-0000-0000-000000000001"
LLFloaterWorldMap::LLFloaterWorldMap(const LLSD& key)
: LLFloater(key),
- mInventory(NULL),
- mInventoryObserver(NULL),
- mFriendObserver(NULL),
- mCompletingRegionName(),
- mCompletingRegionPos(),
- mWaitingForTracker(FALSE),
- mIsClosing(FALSE),
- mSetToUserPosition(TRUE),
- mTrackedLocation(0,0,0),
- mTrackedStatus(LLTracker::TRACKING_NOTHING)
+mInventory(NULL),
+mInventoryObserver(NULL),
+mFriendObserver(NULL),
+mCompletingRegionName(),
+mCompletingRegionPos(),
+mWaitingForTracker(FALSE),
+mIsClosing(FALSE),
+mSetToUserPosition(TRUE),
+mTrackedLocation(0,0,0),
+mTrackedStatus(LLTracker::TRACKING_NOTHING)
{
gFloaterWorldMap = this;
@@ -210,7 +240,7 @@ LLFloaterWorldMap::LLFloaterWorldMap(const LLSD& key)
mCommitCallbackRegistrar.add("WMap.ShowAgent", boost::bind(&LLFloaterWorldMap::onShowAgentBtn, this));
mCommitCallbackRegistrar.add("WMap.Clear", boost::bind(&LLFloaterWorldMap::onClearBtn, this));
mCommitCallbackRegistrar.add("WMap.CopySLURL", boost::bind(&LLFloaterWorldMap::onCopySLURL, this));
-
+
gSavedSettings.getControl("PreferredMaturity")->getSignal()->connect(boost::bind(&LLFloaterWorldMap::onChangeMaturity, this));
}
@@ -223,32 +253,32 @@ void* LLFloaterWorldMap::createWorldMapView(void* data)
BOOL LLFloaterWorldMap::postBuild()
{
mPanel = getChild<LLPanel>("objects_mapview");
-
+
LLComboBox *avatar_combo = getChild<LLComboBox>("friend combo");
avatar_combo->selectFirstItem();
avatar_combo->setPrearrangeCallback( boost::bind(&LLFloaterWorldMap::onAvatarComboPrearrange, this) );
avatar_combo->setTextEntryCallback( boost::bind(&LLFloaterWorldMap::onComboTextEntry, this) );
-
+
LLSearchEditor *location_editor = getChild<LLSearchEditor>("location");
location_editor->setFocusChangedCallback(boost::bind(&LLFloaterWorldMap::onLocationFocusChanged, this, _1));
location_editor->setKeystrokeCallback( boost::bind(&LLFloaterWorldMap::onSearchTextEntry, this));
getChild<LLScrollListCtrl>("search_results")->setDoubleClickCallback( boost::bind(&LLFloaterWorldMap::onClickTeleportBtn, this));
-
+
LLComboBox *landmark_combo = getChild<LLComboBox>( "landmark combo");
landmark_combo->selectFirstItem();
landmark_combo->setPrearrangeCallback( boost::bind(&LLFloaterWorldMap::onLandmarkComboPrearrange, this) );
landmark_combo->setTextEntryCallback( boost::bind(&LLFloaterWorldMap::onComboTextEntry, this) );
-
+
mCurZoomVal = log(LLWorldMapView::sMapScale)/log(2.f);
getChild<LLUICtrl>("zoom slider")->setValue(LLWorldMapView::sMapScale);
-
+
setDefaultBtn(NULL);
-
+
mZoomTimer.stop();
-
+
onChangeMaturity();
-
+
return TRUE;
}
@@ -257,11 +287,11 @@ LLFloaterWorldMap::~LLFloaterWorldMap()
{
// All cleaned up by LLView destructor
mPanel = NULL;
-
+
// Inventory deletes all observers on shutdown
mInventory = NULL;
mInventoryObserver = NULL;
-
+
// avatar tracker will delete this for us.
mFriendObserver = NULL;
@@ -285,13 +315,13 @@ void LLFloaterWorldMap::onClose(bool app_quitting)
void LLFloaterWorldMap::onOpen(const LLSD& key)
{
bool center_on_target = (key.asString() == "center");
-
+
mIsClosing = FALSE;
-
+
LLWorldMapView* map_panel;
map_panel = (LLWorldMapView*)gFloaterWorldMap->mPanel;
map_panel->clearLastClick();
-
+
{
// reset pan on show, so it centers on you again
if (!center_on_target)
@@ -299,27 +329,27 @@ void LLFloaterWorldMap::onOpen(const LLSD& key)
LLWorldMapView::setPan(0, 0, TRUE);
}
map_panel->updateVisibleBlocks();
-
+
// Reload items as they may have changed
LLWorldMap::getInstance()->reloadItems();
-
+
// We may already have a bounding box for the regions of the world,
// so use that to adjust the view.
adjustZoomSliderBounds();
-
+
// Could be first show
//LLFirstUse::useMap();
-
+
// Start speculative download of landmarks
const LLUUID landmark_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK);
LLInventoryModelBackgroundFetch::instance().start(landmark_folder_id);
-
+
getChild<LLUICtrl>("location")->setFocus( TRUE);
gFocusMgr.triggerFocusFlash();
-
+
buildAvatarIDList();
buildLandmarkIDLists();
-
+
// If nothing is being tracked, set flag so the user position will be found
mSetToUserPosition = ( LLTracker::getTrackingStatus() == LLTracker::TRACKING_NOTHING );
}
@@ -356,7 +386,7 @@ BOOL LLFloaterWorldMap::handleScrollWheel(S32 x, S32 y, S32 clicks)
return TRUE;
}
}
-
+
return LLFloater::handleScrollWheel(x, y, clicks);
}
@@ -381,7 +411,7 @@ void LLFloaterWorldMap::draw()
bool agent_on_prelude = (regionp && regionp->isPrelude());
bool enable_go_home = gAgent.isGodlike() || !agent_on_prelude;
getChildView("Go Home")->setEnabled(enable_go_home);
-
+
updateLocation();
LLTracker::ETrackingStatus tracking_status = LLTracker::getTrackingStatus();
@@ -393,7 +423,7 @@ void LLFloaterWorldMap::draw()
{
getChild<LLUICtrl>("avatar_icon")->setColor( map_track_disabled_color);
}
-
+
if (LLTracker::TRACKING_LANDMARK == tracking_status)
{
getChild<LLUICtrl>("landmark_icon")->setColor( map_track_color);
@@ -402,7 +432,7 @@ void LLFloaterWorldMap::draw()
{
getChild<LLUICtrl>("landmark_icon")->setColor( map_track_disabled_color);
}
-
+
if (LLTracker::TRACKING_LOCATION == tracking_status)
{
getChild<LLUICtrl>("location_icon")->setColor( map_track_color);
@@ -422,21 +452,21 @@ void LLFloaterWorldMap::draw()
getChild<LLUICtrl>("location_icon")->setColor( map_track_disabled_color);
}
}
-
+
// check for completion of tracking data
if (mWaitingForTracker)
{
centerOnTarget(TRUE);
}
-
+
getChildView("Teleport")->setEnabled((BOOL)tracking_status);
-// getChildView("Clear")->setEnabled((BOOL)tracking_status);
+ // getChildView("Clear")->setEnabled((BOOL)tracking_status);
getChildView("Show Destination")->setEnabled((BOOL)tracking_status || LLWorldMap::getInstance()->isTracking());
getChildView("copy_slurl")->setEnabled((mSLURL.isValid()) );
-
+
setMouseOpaque(TRUE);
getDragHandle()->setMouseOpaque(TRUE);
-
+
//RN: snaps to zoom value because interpolation caused jitter in the text rendering
if (!mZoomTimer.getStarted() && mCurZoomVal != (F32)getChild<LLUICtrl>("zoom slider")->getValue().asReal())
{
@@ -451,7 +481,7 @@ void LLFloaterWorldMap::draw()
mCurZoomVal = lerp(mCurZoomVal, (F32)getChild<LLUICtrl>("zoom slider")->getValue().asReal(), interp);
F32 map_scale = 256.f*pow(2.f, mCurZoomVal);
LLWorldMapView::setScale( map_scale );
-
+
// Enable/disable checkboxes depending on the zoom level
// If above threshold level (i.e. low res) -> Disable all checkboxes
// If under threshold level (i.e. high res) -> Enable all checkboxes
@@ -477,7 +507,7 @@ void LLFloaterWorldMap::trackAvatar( const LLUUID& avatar_id, const std::string&
{
LLCtrlSelectionInterface *iface = childGetSelectionInterface("friend combo");
if (!iface) return;
-
+
buildAvatarIDList();
if(iface->setCurrentByID(avatar_id) || gAgent.isGodlike())
{
@@ -507,7 +537,7 @@ void LLFloaterWorldMap::trackLandmark( const LLUUID& landmark_item_id )
{
LLCtrlSelectionInterface *iface = childGetSelectionInterface("landmark combo");
if (!iface) return;
-
+
buildLandmarkIDLists();
BOOL found = FALSE;
S32 idx;
@@ -519,7 +549,7 @@ void LLFloaterWorldMap::trackLandmark( const LLUUID& landmark_item_id )
break;
}
}
-
+
if (found && iface->setCurrentByID( landmark_item_id ) )
{
LLUUID asset_id = mLandmarkAssetIDList.get( idx );
@@ -528,17 +558,17 @@ void LLFloaterWorldMap::trackLandmark( const LLUUID& landmark_item_id )
if (combo) name = combo->getSimple();
mTrackedStatus = LLTracker::TRACKING_LANDMARK;
LLTracker::trackLandmark(mLandmarkAssetIDList.get( idx ), // assetID
- mLandmarkItemIDList.get( idx ), // itemID
- name); // name
-
+ mLandmarkItemIDList.get( idx ), // itemID
+ name); // name
+
if( asset_id != sHomeID )
{
// start the download process
gLandmarkList.getAsset( asset_id);
}
-
+
// We have to download both region info and landmark data, so set busy. JC
-// getWindow()->incBusyCount();
+ // getWindow()->incBusyCount();
}
else
{
@@ -574,10 +604,10 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global)
S32 world_y = S32(pos_global.mdV[1] / 256);
LLWorldMapMessage::getInstance()->sendMapBlockRequest(world_x, world_y, world_x, world_y, true);
setDefaultBtn("");
-
+
// clicked on a non-region - turn off coord display
enableTeleportCoordsDisplay( false );
-
+
return;
}
if (sim_info->isDown())
@@ -588,33 +618,33 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global)
LLWorldMap::getInstance()->setTrackingInvalid();
LLTracker::stopTracking(NULL);
setDefaultBtn("");
-
+
// clicked on a down region - turn off coord display
enableTeleportCoordsDisplay( false );
-
+
return;
}
-
+
std::string sim_name = sim_info->getName();
F32 region_x = (F32)fmod( pos_global.mdV[VX], (F64)REGION_WIDTH_METERS );
F32 region_y = (F32)fmod( pos_global.mdV[VY], (F64)REGION_WIDTH_METERS );
std::string full_name = llformat("%s (%d, %d, %d)",
- sim_name.c_str(),
- llround(region_x),
- llround(region_y),
- llround((F32)pos_global.mdV[VZ]));
-
+ sim_name.c_str(),
+ llround(region_x),
+ llround(region_y),
+ llround((F32)pos_global.mdV[VZ]));
+
std::string tooltip("");
mTrackedStatus = LLTracker::TRACKING_LOCATION;
LLTracker::trackLocation(pos_global, full_name, tooltip);
LLWorldMap::getInstance()->cancelTracking(); // The floater is taking over the tracking
-
+
LLVector3d coord_pos = LLTracker::getTrackedPositionGlobal();
updateTeleportCoordsDisplay( coord_pos );
-
+
// we have a valid region - turn on coord display
enableTeleportCoordsDisplay( true );
-
+
setDefaultBtn("Teleport");
}
@@ -631,7 +661,7 @@ void LLFloaterWorldMap::updateTeleportCoordsDisplay( const LLVector3d& pos )
{
// if we're going to update their value, we should also enable them
enableTeleportCoordsDisplay( true );
-
+
// convert global specified position to a local one
F32 region_local_x = (F32)fmod( pos.mdV[VX], (F64)REGION_WIDTH_METERS );
F32 region_local_y = (F32)fmod( pos.mdV[VY], (F64)REGION_WIDTH_METERS );
@@ -646,16 +676,16 @@ void LLFloaterWorldMap::updateTeleportCoordsDisplay( const LLVector3d& pos )
void LLFloaterWorldMap::updateLocation()
{
bool gotSimName;
-
+
LLTracker::ETrackingStatus status = LLTracker::getTrackingStatus();
-
+
// These values may get updated by a message, so need to check them every frame
// The fields may be changed by the user, so only update them if the data changes
LLVector3d pos_global = LLTracker::getTrackedPositionGlobal();
if (pos_global.isExactlyZero())
{
LLVector3d agentPos = gAgent.getPositionGlobal();
-
+
// Set to avatar's current postion if nothing is selected
if ( status == LLTracker::TRACKING_NOTHING && mSetToUserPosition )
{
@@ -665,19 +695,19 @@ void LLFloaterWorldMap::updateLocation()
if ( gotSimName )
{
mSetToUserPosition = FALSE;
-
+
// Fill out the location field
getChild<LLUICtrl>("location")->setValue(agent_sim_name);
-
+
// update the coordinate display with location of avatar in region
updateTeleportCoordsDisplay( agentPos );
-
+
// Figure out where user is
// Set the current SLURL
mSLURL = LLSLURL(agent_sim_name, gAgent.getPositionGlobal());
}
}
-
+
return; // invalid location
}
std::string sim_name;
@@ -699,17 +729,17 @@ void LLFloaterWorldMap::updateLocation()
pos_global[2] = 200;
}
}
-
+
getChild<LLUICtrl>("location")->setValue(sim_name);
-
+
// refresh coordinate display to reflect where user clicked.
LLVector3d coord_pos = LLTracker::getTrackedPositionGlobal();
updateTeleportCoordsDisplay( coord_pos );
-
+
// simNameFromPosGlobal can fail, so don't give the user an invalid SLURL
if ( gotSimName )
{
- mSLURL = LLSLURL(sim_name, pos_global);
+ mSLURL = LLSLURL(sim_name, pos_global);
}
else
{ // Empty SLURL will disable the "Copy SLURL to clipboard" button
@@ -736,12 +766,12 @@ void LLFloaterWorldMap::trackURL(const std::string& region_name, S32 x_coord, S3
{
// fill in UI based on URL
gFloaterWorldMap->getChild<LLUICtrl>("location")->setValue(region_name);
-
+
// Save local coords to highlight position after region global
// position is returned.
gFloaterWorldMap->mCompletingRegionPos.set(
- (F32)x_coord, (F32)y_coord, (F32)z_coord);
-
+ (F32)x_coord, (F32)y_coord, (F32)z_coord);
+
// pass sim name to combo box
gFloaterWorldMap->mCompletingRegionName = region_name;
LLWorldMapMessage::getInstance()->sendNamedRegionRequest(region_name);
@@ -813,7 +843,7 @@ void LLFloaterWorldMap::buildAvatarIDList()
{
LLCtrlListInterface *list = childGetListInterface("friend combo");
if (!list) return;
-
+
// Delete all but the "None" entry
S32 list_size = list->getItemCount();
if (list_size > 1)
@@ -821,7 +851,7 @@ void LLFloaterWorldMap::buildAvatarIDList()
list->selectItemRange(1, -1);
list->operateOnSelection(LLCtrlListInterface::OP_DELETE);
}
-
+
// Get all of the calling cards for avatar that are currently online
LLCollectMappableBuddies collector;
LLAvatarTracker::instance().applyFunctor(collector);
@@ -833,7 +863,7 @@ void LLFloaterWorldMap::buildAvatarIDList()
{
list->addSimpleElement((*it).first, ADD_BOTTOM, (*it).second);
}
-
+
list->setCurrentByID( LLAvatarTracker::instance().getAvatarID() );
list->selectFirstItem();
}
@@ -843,7 +873,7 @@ void LLFloaterWorldMap::buildLandmarkIDLists()
{
LLCtrlListInterface *list = childGetListInterface("landmark combo");
if (!list) return;
-
+
// Delete all but the "None" entry
S32 list_size = list->getItemCount();
if (list_size > 1)
@@ -851,17 +881,17 @@ void LLFloaterWorldMap::buildLandmarkIDLists()
list->selectItemRange(1, -1);
list->operateOnSelection(LLCtrlListInterface::OP_DELETE);
}
-
+
mLandmarkItemIDList.reset();
mLandmarkAssetIDList.reset();
-
+
// Get all of the current landmarks
mLandmarkAssetIDList.put( LLUUID::null );
mLandmarkItemIDList.put( LLUUID::null );
-
+
mLandmarkAssetIDList.put( sHomeID );
mLandmarkItemIDList.put( sHomeID );
-
+
LLInventoryModel::cat_array_t cats;
LLInventoryModel::item_array_t items;
LLIsType is_landmark(LLAssetType::AT_LANDMARK);
@@ -870,20 +900,20 @@ void LLFloaterWorldMap::buildLandmarkIDLists()
items,
LLInventoryModel::EXCLUDE_TRASH,
is_landmark);
-
+
std::sort(items.begin(), items.end(), LLViewerInventoryItem::comparePointers());
S32 count = items.count();
for(S32 i = 0; i < count; ++i)
{
LLInventoryItem* item = items.get(i);
-
+
list->addSimpleElement(item->getName(), ADD_BOTTOM, item->getUUID());
-
+
mLandmarkAssetIDList.put( item->getAssetUUID() );
mLandmarkItemIDList.put( item->getUUID() );
}
-
+
list->selectFirstItem();
}
@@ -949,31 +979,31 @@ void LLFloaterWorldMap::adjustZoomSliderBounds()
// Currently (01/26/09), this value allows the whole grid to be visible in a 1024x1024 window.
S32 world_width_regions = MAX_VISIBLE_REGIONS;
S32 world_height_regions = MAX_VISIBLE_REGIONS;
-
+
// Find how much space we have to display the world
LLWorldMapView* map_panel;
map_panel = (LLWorldMapView*)mPanel;
LLRect view_rect = map_panel->getRect();
-
+
// View size in pixels
S32 view_width = view_rect.getWidth();
S32 view_height = view_rect.getHeight();
-
+
// Pixels per region to display entire width/height
F32 width_pixels_per_region = (F32) view_width / (F32) world_width_regions;
F32 height_pixels_per_region = (F32) view_height / (F32) world_height_regions;
-
+
F32 pixels_per_region = llmin(width_pixels_per_region,
height_pixels_per_region);
-
+
// Round pixels per region to an even number of slider increments
S32 slider_units = llfloor(pixels_per_region / 0.2f);
pixels_per_region = slider_units * 0.2f;
-
+
// Make sure the zoom slider can be moved at least a little bit.
// Likewise, less than the increment pixels per region is just silly.
pixels_per_region = llclamp(pixels_per_region, 1.f, ZOOM_MAX);
-
+
F32 min_power = log(pixels_per_region/256.f)/log(2.f);
getChild<LLSlider>("zoom slider")->setMinValue(min_power);
@@ -997,19 +1027,19 @@ void LLFloaterWorldMap::onLandmarkComboPrearrange( )
{
return;
}
-
+
LLCtrlListInterface *list = childGetListInterface("landmark combo");
if (!list) return;
-
+
LLUUID current_choice = list->getCurrentID();
-
+
buildLandmarkIDLists();
-
+
if( current_choice.isNull() || !list->setCurrentByID( current_choice ) )
{
LLTracker::stopTracking(NULL);
}
-
+
}
void LLFloaterWorldMap::onComboTextEntry()
@@ -1033,18 +1063,18 @@ void LLFloaterWorldMap::onLandmarkComboCommit()
{
return;
}
-
+
LLCtrlListInterface *list = childGetListInterface("landmark combo");
if (!list) return;
-
+
LLUUID asset_id;
LLUUID item_id = list->getCurrentID();
-
+
LLTracker::stopTracking(NULL);
-
+
//RN: stopTracking() clears current combobox selection, need to reassert it here
list->setCurrentByID(item_id);
-
+
if( item_id.isNull() )
{
}
@@ -1068,7 +1098,7 @@ void LLFloaterWorldMap::onLandmarkComboCommit()
trackLandmark( item_id);
onShowTargetBtn();
-
+
// Reset to user postion if nothing is tracked
mSetToUserPosition = ( LLTracker::getTrackingStatus() == LLTracker::TRACKING_NOTHING );
}
@@ -1080,19 +1110,19 @@ void LLFloaterWorldMap::onAvatarComboPrearrange( )
{
return;
}
-
+
LLCtrlListInterface *list = childGetListInterface("friend combo");
if (!list) return;
-
+
LLUUID current_choice;
-
+
if( LLAvatarTracker::instance().haveTrackingInfo() )
{
current_choice = LLAvatarTracker::instance().getAvatarID();
}
-
+
buildAvatarIDList();
-
+
if( !list->setCurrentByID( current_choice ) || current_choice.isNull() )
{
LLTracker::stopTracking(NULL);
@@ -1105,10 +1135,10 @@ void LLFloaterWorldMap::onAvatarComboCommit()
{
return;
}
-
+
LLCtrlListInterface *list = childGetListInterface("friend combo");
if (!list) return;
-
+
const LLUUID& new_avatar_id = list->getCurrentID();
if (new_avatar_id.notNull())
{
@@ -1124,6 +1154,12 @@ void LLFloaterWorldMap::onAvatarComboCommit()
}
}
+void LLFloaterWorldMap::avatarTrackFromSlapp( const LLUUID& id )
+{
+ trackAvatar( id, "av" );
+ onShowTargetBtn();
+}
+
void LLFloaterWorldMap::onLocationFocusChanged( LLFocusableElement* focus )
{
updateSearchEnabled();
@@ -1148,13 +1184,13 @@ void LLFloaterWorldMap::onLocationCommit()
{
return;
}
-
+
clearLocationSelection(FALSE);
mCompletingRegionName = "";
mLastRegionName = "";
-
+
std::string str = getChild<LLUICtrl>("location")->getValue().asString();
-
+
// Trim any leading and trailing spaces in the search target
std::string saved_str = str;
LLStringUtil::trim( str );
@@ -1162,7 +1198,7 @@ void LLFloaterWorldMap::onLocationCommit()
{ // Set the value in the UI if any spaces were removed
getChild<LLUICtrl>("location")->setValue(str);
}
-
+
LLStringUtil::toLower(str);
mCompletingRegionName = str;
LLWorldMap::getInstance()->setTrackingCommit();
@@ -1183,13 +1219,13 @@ void LLFloaterWorldMap::onCoordinatesCommit()
{
return;
}
-
+
S32 x_coord = (S32)childGetValue("teleport_coordinate_x").asReal();
S32 y_coord = (S32)childGetValue("teleport_coordinate_y").asReal();
S32 z_coord = (S32)childGetValue("teleport_coordinate_z").asReal();
-
+
const std::string region_name = childGetValue("location").asString();
-
+
trackURL( region_name, x_coord, y_coord, z_coord );
}
@@ -1225,7 +1261,7 @@ void LLFloaterWorldMap::onCopySLURL()
LLSD args;
args["SLURL"] = mSLURL.getSLURLString();
-
+
LLNotificationsUtil::add("CopySLURL", args);
}
@@ -1246,26 +1282,26 @@ void LLFloaterWorldMap::centerOnTarget(BOOL animate)
else
{
// We've got the position finally, so we're no longer busy. JC
-// getWindow()->decBusyCount();
+ // getWindow()->decBusyCount();
pos_global = LLTracker::getTrackedPositionGlobal() - gAgentCamera.getCameraPositionGlobal();
}
}
else if(LLWorldMap::getInstance()->isTracking())
{
pos_global = LLWorldMap::getInstance()->getTrackedPositionGlobal() - gAgentCamera.getCameraPositionGlobal();;
-
-
-
+
+
+
}
else
{
// default behavior = center on agent
pos_global.clearVec();
}
-
+
LLWorldMapView::setPan( -llfloor((F32)(pos_global.mdV[VX] * (F64)LLWorldMapView::sMapScale / REGION_WIDTH_METERS)),
- -llfloor((F32)(pos_global.mdV[VY] * (F64)LLWorldMapView::sMapScale / REGION_WIDTH_METERS)),
- !animate);
+ -llfloor((F32)(pos_global.mdV[VY] * (F64)LLWorldMapView::sMapScale / REGION_WIDTH_METERS)),
+ !animate);
mWaitingForTracker = FALSE;
}
@@ -1273,7 +1309,7 @@ void LLFloaterWorldMap::centerOnTarget(BOOL animate)
void LLFloaterWorldMap::fly()
{
LLVector3d pos_global = LLTracker::getTrackedPositionGlobal();
-
+
// Start the autopilot and close the floater,
// so we can see where we're flying
if (!pos_global.isExactlyZero())
@@ -1294,7 +1330,7 @@ void LLFloaterWorldMap::teleport()
BOOL teleport_home = FALSE;
LLVector3d pos_global;
LLAvatarTracker& av_tracker = LLAvatarTracker::instance();
-
+
LLTracker::ETrackingStatus tracking_status = LLTracker::getTrackingStatus();
if (LLTracker::TRACKING_AVATAR == tracking_status
&& av_tracker.haveTrackingInfo() )
@@ -1317,10 +1353,10 @@ void LLFloaterWorldMap::teleport()
&& landmark->getRegionID(region_id))
{
LLLandmark::requestRegionHandle(
- gMessageSystem,
- gAgent.getRegionHost(),
- region_id,
- NULL);
+ gMessageSystem,
+ gAgent.getRegionHost(),
+ region_id,
+ NULL);
}
}
}
@@ -1332,7 +1368,7 @@ void LLFloaterWorldMap::teleport()
{
make_ui_sound("UISndInvalidOp");
}
-
+
// Do the teleport, which will also close the floater
if (teleport_home)
{
@@ -1367,7 +1403,7 @@ void LLFloaterWorldMap::teleportToLandmark()
{
BOOL has_destination = FALSE;
LLUUID destination_id; // Null means "home"
-
+
if( LLTracker::getTrackedLandmarkAssetID() == sHomeID )
{
has_destination = TRUE;
@@ -1388,14 +1424,14 @@ void LLFloaterWorldMap::teleportToLandmark()
if(landmark->getRegionID(region_id))
{
LLLandmark::requestRegionHandle(
- gMessageSystem,
- gAgent.getRegionHost(),
- region_id,
- NULL);
+ gMessageSystem,
+ gAgent.getRegionHost(),
+ region_id,
+ NULL);
}
}
}
-
+
if( has_destination )
{
gAgent.teleportViaLandmark( destination_id );
@@ -1428,12 +1464,12 @@ void LLFloaterWorldMap::updateSims(bool found_null_sim)
{
return;
}
-
+
LLScrollListCtrl *list = getChild<LLScrollListCtrl>("search_results");
list->operateOnAll(LLCtrlListInterface::OP_DELETE);
-
+
S32 name_length = mCompletingRegionName.length();
-
+
LLSD match;
S32 num_results = 0;
@@ -1443,7 +1479,7 @@ void LLFloaterWorldMap::updateSims(bool found_null_sim)
LLSimInfo* info = it->second;
std::string sim_name_lower = info->getName();
LLStringUtil::toLower(sim_name_lower);
-
+
if (sim_name_lower.substr(0, name_length) == mCompletingRegionName)
{
if (sim_name_lower == mCompletingRegionName)
@@ -1459,12 +1495,12 @@ void LLFloaterWorldMap::updateSims(bool found_null_sim)
num_results++;
}
}
-
+
if (found_null_sim)
{
mCompletingRegionName = "";
}
-
+
// if match found, highlight it and go
if (!match.isUndefined())
{
@@ -1472,7 +1508,7 @@ void LLFloaterWorldMap::updateSims(bool found_null_sim)
getChild<LLUICtrl>("search_results")->setFocus(TRUE);
onCommitSearchResult();
}
-
+
// if we found nothing, say "none"
if (num_results == 0)
{
@@ -1486,7 +1522,7 @@ void LLFloaterWorldMap::onCommitSearchResult()
{
LLCtrlListInterface *list = childGetListInterface("search_results");
if (!list) return;
-
+
LLSD selected_value = list->getSelectedValue();
std::string sim_name = selected_value.asString();
if (sim_name.empty())
@@ -1494,19 +1530,19 @@ void LLFloaterWorldMap::onCommitSearchResult()
return;
}
LLStringUtil::toLower(sim_name);
-
+
std::map<U64, LLSimInfo*>::const_iterator it;
for (it = LLWorldMap::getInstance()->getRegionMap().begin(); it != LLWorldMap::getInstance()->getRegionMap().end(); ++it)
{
LLSimInfo* info = it->second;
-
+
if (info->isName(sim_name))
{
LLVector3d pos_global = info->getGlobalOrigin();
-
+
const F64 SIM_COORD_DEFAULT = 128.0;
LLVector3 pos_local(SIM_COORD_DEFAULT, SIM_COORD_DEFAULT, 0.0f);
-
+
// Did this value come from a trackURL() request?
if (!mCompletingRegionPos.isExactlyZero())
{
@@ -1516,14 +1552,14 @@ void LLFloaterWorldMap::onCommitSearchResult()
pos_global.mdV[VX] += (F64)pos_local.mV[VX];
pos_global.mdV[VY] += (F64)pos_local.mV[VY];
pos_global.mdV[VZ] = (F64)pos_local.mV[VZ];
-
+
getChild<LLUICtrl>("location")->setValue(sim_name);
trackLocation(pos_global);
setDefaultBtn("Teleport");
break;
}
}
-
+
onShowTargetBtn();
}
@@ -1531,15 +1567,15 @@ void LLFloaterWorldMap::onChangeMaturity()
{
bool can_access_mature = gAgent.canAccessMature();
bool can_access_adult = gAgent.canAccessAdult();
-
+
getChildView("events_mature_icon")->setVisible( can_access_mature);
getChildView("events_mature_label")->setVisible( can_access_mature);
getChildView("events_mature_chk")->setVisible( can_access_mature);
-
+
getChildView("events_adult_icon")->setVisible( can_access_adult);
getChildView("events_adult_label")->setVisible( can_access_adult);
getChildView("events_adult_chk")->setVisible( can_access_adult);
-
+
// disable mature / adult events.
if (!can_access_mature)
{
diff --git a/indra/newview/llfloaterworldmap.h b/indra/newview/llfloaterworldmap.h
index 1628a421ec..783d9f4819 100644
--- a/indra/newview/llfloaterworldmap.h
+++ b/indra/newview/llfloaterworldmap.h
@@ -106,6 +106,11 @@ public:
// teleport to the tracked item, if there is one
void teleport();
void onChangeMaturity();
+
+
+ //Slapp instigated avatar tracking
+ void avatarTrackFromSlapp( const LLUUID& id );
+
protected:
void onGoHome();
diff --git a/indra/newview/llhints.cpp b/indra/newview/llhints.cpp
index 3f0deb98cd..c4dcaf11f9 100644
--- a/indra/newview/llhints.cpp
+++ b/indra/newview/llhints.cpp
@@ -33,6 +33,7 @@
#include "lltextbox.h"
#include "llviewerwindow.h"
#include "llviewercontrol.h"
+#include "lliconctrl.h"
#include "llsdparam.h"
class LLHintPopup : public LLPanel
@@ -80,7 +81,8 @@ public:
up_arrow,
right_arrow,
down_arrow,
- lower_left_arrow;
+ lower_left_arrow,
+ hint_image;
Optional<S32> left_arrow_offset,
up_arrow_offset,
@@ -96,6 +98,7 @@ public:
right_arrow("right_arrow"),
down_arrow("down_arrow"),
lower_left_arrow("lower_left_arrow"),
+ hint_image("hint_image"),
left_arrow_offset("left_arrow_offset"),
up_arrow_offset("up_arrow_offset"),
right_arrow_offset("right_arrow_offset"),
@@ -166,7 +169,15 @@ LLHintPopup::LLHintPopup(const LLHintPopup::Params& p)
mDirection = p.target_params.direction;
mTarget = p.target_params.target;
}
- buildFromFile( "panel_hint.xml", NULL, p);
+ if (p.hint_image.isProvided())
+ {
+ buildFromFile("panel_hint_image.xml", NULL, p);
+ getChild<LLIconCtrl>("hint_image")->setImage(p.hint_image());
+ }
+ else
+ {
+ buildFromFile( "panel_hint.xml", NULL, p);
+ }
}
BOOL LLHintPopup::postBuild()
diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp
index f7e5103d88..24a876c59a 100644
--- a/indra/newview/llhudtext.cpp
+++ b/indra/newview/llhudtext.cpp
@@ -194,9 +194,6 @@ void LLHUDText::renderText()
mRadius = (width_vec + height_vec).magVec() * 0.5f;
- LLCoordGL screen_pos;
- LLViewerCamera::getInstance()->projectPosAgentToScreen(mPositionAgent, screen_pos, FALSE);
-
LLVector2 screen_offset;
screen_offset = mPositionOffset;
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index bdc0dfa7e2..f74ae92a7b 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -470,7 +470,7 @@ LLIMFloater* LLIMFloater::show(const LLUUID& session_id)
}
//static
-bool LLIMFloater::resetAllowedRectPadding(const LLSD& newvalue)
+bool LLIMFloater::resetAllowedRectPadding()
{
//reset allowed rect right padding if "SidebarCameraMovement" option
//or sidebar state changed
@@ -482,10 +482,10 @@ void LLIMFloater::getAllowedRect(LLRect& rect)
{
if (sAllowedRectRightPadding == RECT_PADDING_NOT_INIT) //wasn't initialized
{
- gSavedSettings.getControl("SidebarCameraMovement")->getSignal()->connect(boost::bind(&LLIMFloater::resetAllowedRectPadding, _2));
+ gSavedSettings.getControl("SidebarCameraMovement")->getSignal()->connect(boost::bind(&LLIMFloater::resetAllowedRectPadding));
LLSideTray* side_bar = LLSideTray::getInstance();
- side_bar->getCollapseSignal().connect(boost::bind(&LLIMFloater::resetAllowedRectPadding, _2));
+ side_bar->setVisibleWidthChangeCallback(boost::bind(&LLIMFloater::resetAllowedRectPadding));
sAllowedRectRightPadding = RECT_PADDING_NEED_RECALC;
}
@@ -500,10 +500,7 @@ void LLIMFloater::getAllowedRect(LLRect& rect)
if (gSavedSettings.getBOOL("SidebarCameraMovement") == FALSE)
{
- LLSideTray* side_bar = LLSideTray::getInstance();
-
- if (side_bar->getVisible() && !side_bar->getCollapsed())
- sAllowedRectRightPadding += side_bar->getRect().getWidth();
+ sAllowedRectRightPadding += LLSideTray::getInstance()->getVisibleWidth();
}
}
rect.mRight -= sAllowedRectRightPadding;
diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h
index e80e45e64a..5158f6c1f7 100644
--- a/indra/newview/llimfloater.h
+++ b/indra/newview/llimfloater.h
@@ -156,7 +156,7 @@ private:
static void closeHiddenIMToasts();
- static bool resetAllowedRectPadding(const LLSD& newvalue);
+ static bool resetAllowedRectPadding();
//need to keep this static for performance issues
static S32 sAllowedRectRightPadding;
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index f5f59d5973..ce305dcd89 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -2107,7 +2107,7 @@ void LLIncomingCallDialog::onOpen(const LLSD& key)
void LLIncomingCallDialog::onAccept(void* user_data)
{
LLIncomingCallDialog* self = (LLIncomingCallDialog*)user_data;
- self->processCallResponse(0);
+ processCallResponse(0, self->mPayload);
self->closeFloater();
}
@@ -2115,7 +2115,7 @@ void LLIncomingCallDialog::onAccept(void* user_data)
void LLIncomingCallDialog::onReject(void* user_data)
{
LLIncomingCallDialog* self = (LLIncomingCallDialog*)user_data;
- self->processCallResponse(1);
+ processCallResponse(1, self->mPayload);
self->closeFloater();
}
@@ -2123,20 +2123,21 @@ void LLIncomingCallDialog::onReject(void* user_data)
void LLIncomingCallDialog::onStartIM(void* user_data)
{
LLIncomingCallDialog* self = (LLIncomingCallDialog*)user_data;
- self->processCallResponse(2);
+ processCallResponse(2, self->mPayload);
self->closeFloater();
}
-void LLIncomingCallDialog::processCallResponse(S32 response)
+// static
+void LLIncomingCallDialog::processCallResponse(S32 response, const LLSD &payload)
{
if (!gIMMgr || gDisconnected)
return;
- LLUUID session_id = mPayload["session_id"].asUUID();
- LLUUID caller_id = mPayload["caller_id"].asUUID();
- std::string session_name = mPayload["session_name"].asString();
- EInstantMessage type = (EInstantMessage)mPayload["type"].asInteger();
- LLIMMgr::EInvitationType inv_type = (LLIMMgr::EInvitationType)mPayload["inv_type"].asInteger();
+ LLUUID session_id = payload["session_id"].asUUID();
+ LLUUID caller_id = payload["caller_id"].asUUID();
+ std::string session_name = payload["session_name"].asString();
+ EInstantMessage type = (EInstantMessage)payload["type"].asInteger();
+ LLIMMgr::EInvitationType inv_type = (LLIMMgr::EInvitationType)payload["inv_type"].asInteger();
bool voice = true;
switch(response)
{
@@ -2153,8 +2154,8 @@ void LLIncomingCallDialog::processCallResponse(S32 response)
session_id = gIMMgr->addP2PSession(
session_name,
caller_id,
- mPayload["session_handle"].asString(),
- mPayload["session_uri"].asString());
+ payload["session_handle"].asString(),
+ payload["session_uri"].asString());
if (voice)
{
@@ -2218,10 +2219,10 @@ void LLIncomingCallDialog::processCallResponse(S32 response)
inv_type));
// send notification message to the corresponding chat
- if (mPayload["notify_box_type"].asString() == "VoiceInviteGroup" || mPayload["notify_box_type"].asString() == "VoiceInviteAdHoc")
+ if (payload["notify_box_type"].asString() == "VoiceInviteGroup" || payload["notify_box_type"].asString() == "VoiceInviteAdHoc")
{
LLStringUtil::format_map_t string_args;
- string_args["[NAME]"] = mPayload["caller_name"].asString();
+ string_args["[NAME]"] = payload["caller_name"].asString();
std::string message = LLTrans::getString("name_started_call", string_args);
LLIMModel::getInstance()->addMessageSilently(session_id, SYSTEM_FROM, LLUUID::null, message);
}
@@ -2238,7 +2239,7 @@ void LLIncomingCallDialog::processCallResponse(S32 response)
{
if(LLVoiceClient::getInstance())
{
- std::string s = mPayload["session_handle"].asString();
+ std::string s = payload["session_handle"].asString();
LLVoiceClient::getInstance()->declineInvite(s);
}
}
@@ -2645,16 +2646,19 @@ void LLIMMgr::inviteToSession(
std::string question_type = "VoiceInviteQuestionDefault";
BOOL ad_hoc_invite = FALSE;
+ BOOL voice_invite = FALSE;
if(type == IM_SESSION_P2P_INVITE)
{
//P2P is different...they only have voice invitations
notify_box_type = "VoiceInviteP2P";
+ voice_invite = TRUE;
}
else if ( gAgent.isInGroup(session_id) )
{
//only really old school groups have voice invitations
notify_box_type = "VoiceInviteGroup";
question_type = "VoiceInviteQuestionGroup";
+ voice_invite = TRUE;
}
else if ( inv_type == INVITATION_TYPE_VOICE )
{
@@ -2662,6 +2666,7 @@ void LLIMMgr::inviteToSession(
//and a voice ad-hoc
notify_box_type = "VoiceInviteAdHoc";
ad_hoc_invite = TRUE;
+ voice_invite = TRUE;
}
else if ( inv_type == INVITATION_TYPE_IMMEDIATE )
{
@@ -2685,23 +2690,21 @@ void LLIMMgr::inviteToSession(
if (channelp && channelp->callStarted())
{
// you have already started a call to the other user, so just accept the invite
- LLNotifications::instance().forceResponse(LLNotification::Params("VoiceInviteP2P").payload(payload), 0);
+ LLIncomingCallDialog::processCallResponse(0, payload);
return;
}
- if (type == IM_SESSION_P2P_INVITE || ad_hoc_invite)
+ if (voice_invite)
{
- // is the inviter a friend?
- if (LLAvatarTracker::instance().getBuddyInfo(caller_id) == NULL)
+ if ( // if we're rejecting all incoming call requests
+ gSavedSettings.getBOOL("VoiceCallsRejectAll")
+ // or we're rejecting non-friend voice calls and this isn't a friend
+ || (gSavedSettings.getBOOL("VoiceCallsFriendsOnly") && (LLAvatarTracker::instance().getBuddyInfo(caller_id) == NULL))
+ )
{
- // if not, and we are ignoring voice invites from non-friends
- // then silently decline
- if (gSavedSettings.getBOOL("VoiceCallsFriendsOnly"))
- {
- // invite not from a friend, so decline
- LLNotifications::instance().forceResponse(LLNotification::Params("VoiceInviteP2P").payload(payload), 1);
- return;
- }
+ // silently decline the call
+ LLIncomingCallDialog::processCallResponse(1, payload);
+ return;
}
}
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index 3f72d66bfb..e765a8da2f 100644
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -542,6 +542,7 @@ public:
static void onReject(void* user_data);
static void onStartIM(void* user_data);
+ static void processCallResponse(S32 response, const LLSD& payload);
private:
void setCallerName(const std::string& ui_title,
const std::string& ui_label,
@@ -551,7 +552,6 @@ private:
const std::string& call_type);
/*virtual*/ void onLifetimeExpired();
- void processCallResponse(S32 response);
};
class LLOutgoingCallDialog : public LLCallDialog
diff --git a/indra/newview/llinspecttoast.cpp b/indra/newview/llinspecttoast.cpp
index 58b3f0309f..d7b82667d1 100644
--- a/indra/newview/llinspecttoast.cpp
+++ b/indra/newview/llinspecttoast.cpp
@@ -46,6 +46,7 @@ public:
virtual ~LLInspectToast();
/*virtual*/ void onOpen(const LLSD& notification_id);
+ /*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask);
private:
void onToastDestroy(LLToast * toast);
@@ -73,6 +74,7 @@ LLInspectToast::~LLInspectToast()
LLTransientFloaterMgr::getInstance()->removeControlView(this);
}
+// virtual
void LLInspectToast::onOpen(const LLSD& notification_id)
{
LLInspect::onOpen(notification_id);
@@ -103,6 +105,15 @@ void LLInspectToast::onOpen(const LLSD& notification_id)
LLUI::positionViewNearMouse(this);
}
+// virtual
+BOOL LLInspectToast::handleToolTip(S32 x, S32 y, MASK mask)
+{
+ // We don't like the way LLInspect handles tooltips
+ // (black tooltips look weird),
+ // so force using the default implementation (STORM-511).
+ return LLFloater::handleToolTip(x, y, mask);
+}
+
void LLInspectToast::onToastDestroy(LLToast * toast)
{
closeFloater(false);
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 5ba87423c7..5108f68592 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -104,6 +104,7 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_
bool move_task_inventory_callback(const LLSD& notification, const LLSD& response, LLMoveInv*);
bool confirm_attachment_rez(const LLSD& notification, const LLSD& response);
void teleport_via_landmark(const LLUUID& asset_id);
+static BOOL can_move_to_outfit(LLInventoryItem* inv_item, BOOL move_is_into_current_outfit);
// +=================================================+
// | LLInvFVBridge |
@@ -2341,6 +2342,10 @@ void LLFolderBridge::pasteFromClipboard()
LLInventoryModel* model = getInventoryModel();
if(model && isClipboardPasteable())
{
+ const LLUUID &current_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, false);
+ const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id);
+ const BOOL move_is_into_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT);
+
const LLUUID parent_id(mUUID);
LLDynamicArray<LLUUID> objects;
@@ -2353,7 +2358,14 @@ void LLFolderBridge::pasteFromClipboard()
LLInventoryItem *item = model->getItem(item_id);
if (item)
{
- if(LLInventoryClipboard::instance().isCutMode())
+ if (move_is_into_current_outfit || move_is_into_outfit)
+ {
+ if (can_move_to_outfit(item, move_is_into_current_outfit))
+ {
+ dropToOutfit(item, move_is_into_current_outfit);
+ }
+ }
+ else if(LLInventoryClipboard::instance().isCutMode())
{
// move_inventory_item() is not enough,
//we have to update inventory locally too
@@ -2381,9 +2393,13 @@ void LLFolderBridge::pasteFromClipboard()
void LLFolderBridge::pasteLinkFromClipboard()
{
- const LLInventoryModel* model = getInventoryModel();
+ LLInventoryModel* model = getInventoryModel();
if(model)
{
+ const LLUUID &current_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, false);
+ const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id);
+ const BOOL move_is_into_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT);
+
const LLUUID parent_id(mUUID);
LLDynamicArray<LLUUID> objects;
@@ -2393,7 +2409,15 @@ void LLFolderBridge::pasteLinkFromClipboard()
++iter)
{
const LLUUID &object_id = (*iter);
- if (LLInventoryCategory *cat = model->getCategory(object_id))
+ if (move_is_into_current_outfit || move_is_into_outfit)
+ {
+ LLInventoryItem *item = model->getItem(object_id);
+ if (item && can_move_to_outfit(item, move_is_into_current_outfit))
+ {
+ dropToOutfit(item, move_is_into_current_outfit);
+ }
+ }
+ else if (LLInventoryCategory *cat = model->getCategory(object_id))
{
const std::string empty_description = "";
link_inventory_item(
@@ -5320,11 +5344,6 @@ void LLRecentItemsFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
menuentry_vec_t disabled_items, items = getMenuItems();
- items.erase(std::remove(items.begin(), items.end(), std::string("New Body Parts")), items.end());
- items.erase(std::remove(items.begin(), items.end(), std::string("New Clothes")), items.end());
- items.erase(std::remove(items.begin(), items.end(), std::string("New Note")), items.end());
- items.erase(std::remove(items.begin(), items.end(), std::string("New Gesture")), items.end());
- items.erase(std::remove(items.begin(), items.end(), std::string("New Script")), items.end());
items.erase(std::remove(items.begin(), items.end(), std::string("New Folder")), items.end());
hide_context_entries(menu, items, disabled_items);
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 0870b5b8dd..5a9d1524f3 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -921,6 +921,8 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open)
{
S32 z_min = S32_MAX;
LLInventoryPanel* res = NULL;
+ LLFloater* active_inv_floaterp = NULL;
+
// A. If the inventory side panel is open, use that preferably.
if (is_inventorysp_active())
{
@@ -941,6 +943,7 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open)
{
res = inventorySP->getActivePanel();
z_min = gFloaterView->getZOrder(inv_floater);
+ active_inv_floaterp = inv_floater;
}
else
{
@@ -960,10 +963,19 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open)
{
res = iv->getPanel();
z_min = z_order;
+ active_inv_floaterp = iv;
}
}
}
- if (res) return res;
+
+ if (res)
+ {
+ // Make sure the floater is not minimized (STORM-438).
+ if (active_inv_floaterp && active_inv_floaterp->isMinimized())
+ active_inv_floaterp->setMinimized(FALSE);
+
+ return res;
+ }
// C. If no panels are open and we don't want to force open a panel, then just abort out.
if (!auto_open) return NULL;
diff --git a/indra/newview/lllistcontextmenu.cpp b/indra/newview/lllistcontextmenu.cpp
index ea744072d2..6421ab42bf 100644
--- a/indra/newview/lllistcontextmenu.cpp
+++ b/indra/newview/lllistcontextmenu.cpp
@@ -36,7 +36,6 @@
#include "llviewermenu.h" // for LLViewerMenuHolderGL
LLListContextMenu::LLListContextMenu()
-: mMenu(NULL)
{
}
@@ -51,23 +50,22 @@ LLListContextMenu::~LLListContextMenu()
// of mMenu has already been deleted except of using LLHandle. EXT-4762.
if (!mMenuHandle.isDead())
{
- mMenu->die();
- mMenu = NULL;
+ mMenuHandle.get()->die();
}
}
void LLListContextMenu::show(LLView* spawning_view, const uuid_vec_t& uuids, S32 x, S32 y)
{
- if (mMenu)
+ LLContextMenu* menup = mMenuHandle.get();
+ if (menup)
{
//preventing parent (menu holder) from deleting already "dead" context menus on exit
- LLView* parent = mMenu->getParent();
+ LLView* parent = menup->getParent();
if (parent)
{
- parent->removeChild(mMenu);
+ parent->removeChild(menup);
}
- delete mMenu;
- mMenu = NULL;
+ delete menup;
mUUIDs.clear();
}
@@ -79,23 +77,23 @@ void LLListContextMenu::show(LLView* spawning_view, const uuid_vec_t& uuids, S32
mUUIDs.resize(uuids.size());
std::copy(uuids.begin(), uuids.end(), mUUIDs.begin());
- mMenu = createMenu();
- if (!mMenu)
+ menup = createMenu();
+ if (!menup)
{
llwarns << "Context menu creation failed" << llendl;
return;
}
- mMenuHandle = mMenu->getHandle();
- mMenu->show(x, y);
- LLMenuGL::showPopup(spawning_view, mMenu, x, y);
+ mMenuHandle = menup->getHandle();
+ menup->show(x, y);
+ LLMenuGL::showPopup(spawning_view, menup, x, y);
}
void LLListContextMenu::hide()
{
- if(mMenu)
+ if(mMenuHandle.get())
{
- mMenu->hide();
+ mMenuHandle.get()->hide();
}
}
diff --git a/indra/newview/lllistcontextmenu.h b/indra/newview/lllistcontextmenu.h
index 5dedc30b0c..fabd68ee20 100644
--- a/indra/newview/lllistcontextmenu.h
+++ b/indra/newview/lllistcontextmenu.h
@@ -71,8 +71,7 @@ protected:
static void handleMultiple(functor_t functor, const uuid_vec_t& ids);
uuid_vec_t mUUIDs;
- LLContextMenu* mMenu;
- LLHandle<LLView> mMenuHandle;
+ LLHandle<LLContextMenu> mMenuHandle;
};
#endif // LL_LLLISTCONTEXTMENU_H
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index 52ce932241..d866db1829 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -49,18 +49,421 @@
#include "llnotifications.h"
#include "llwindow.h"
#include "llviewerwindow.h"
+#include "llprogressview.h"
#if LL_LINUX || LL_SOLARIS
#include "lltrans.h"
#endif
#include "llsecapi.h"
#include "llstartup.h"
#include "llmachineid.h"
+#include "llupdaterservice.h"
+#include "llevents.h"
+#include "llnotificationsutil.h"
+#include "llappviewer.h"
+
+#include <boost/scoped_ptr.hpp>
+#include <sstream>
+
+class LLLoginInstance::Disposable {
+public:
+ virtual ~Disposable() {}
+};
+
+namespace {
+ class MandatoryUpdateMachine:
+ public LLLoginInstance::Disposable
+ {
+ public:
+ MandatoryUpdateMachine(LLLoginInstance & loginInstance, LLUpdaterService & updaterService);
+
+ void start(void);
+
+ private:
+ class State;
+ class CheckingForUpdate;
+ class Error;
+ class ReadyToInstall;
+ class StartingUpdaterService;
+ class WaitingForDownload;
+
+ LLLoginInstance & mLoginInstance;
+ boost::scoped_ptr<State> mState;
+ LLUpdaterService & mUpdaterService;
+
+ void setCurrentState(State * newState);
+ };
+
+
+ class MandatoryUpdateMachine::State {
+ public:
+ virtual ~State() {}
+ virtual void enter(void) {}
+ virtual void exit(void) {}
+ };
+
+
+ class MandatoryUpdateMachine::CheckingForUpdate:
+ public MandatoryUpdateMachine::State
+ {
+ public:
+ CheckingForUpdate(MandatoryUpdateMachine & machine);
+
+ virtual void enter(void);
+ virtual void exit(void);
+
+ private:
+ LLTempBoundListener mConnection;
+ MandatoryUpdateMachine & mMachine;
+ LLProgressView * mProgressView;
+
+ bool onEvent(LLSD const & event);
+ };
+
+
+ class MandatoryUpdateMachine::Error:
+ public MandatoryUpdateMachine::State
+ {
+ public:
+ Error(MandatoryUpdateMachine & machine);
+
+ virtual void enter(void);
+ virtual void exit(void);
+ void onButtonClicked(const LLSD &, const LLSD &);
+
+ private:
+ MandatoryUpdateMachine & mMachine;
+ };
+
+
+ class MandatoryUpdateMachine::ReadyToInstall:
+ public MandatoryUpdateMachine::State
+ {
+ public:
+ ReadyToInstall(MandatoryUpdateMachine & machine);
+
+ virtual void enter(void);
+ virtual void exit(void);
+
+ private:
+ MandatoryUpdateMachine & mMachine;
+ };
+
+
+ class MandatoryUpdateMachine::StartingUpdaterService:
+ public MandatoryUpdateMachine::State
+ {
+ public:
+ StartingUpdaterService(MandatoryUpdateMachine & machine);
+
+ virtual void enter(void);
+ virtual void exit(void);
+ void onButtonClicked(const LLSD & uiform, const LLSD & result);
+ private:
+ MandatoryUpdateMachine & mMachine;
+ };
+
+
+ class MandatoryUpdateMachine::WaitingForDownload:
+ public MandatoryUpdateMachine::State
+ {
+ public:
+ WaitingForDownload(MandatoryUpdateMachine & machine);
+
+ virtual void enter(void);
+ virtual void exit(void);
+
+ private:
+ LLTempBoundListener mConnection;
+ MandatoryUpdateMachine & mMachine;
+ LLProgressView * mProgressView;
+
+ bool onEvent(LLSD const & event);
+ };
+}
static const char * const TOS_REPLY_PUMP = "lllogininstance_tos_callback";
static const char * const TOS_LISTENER_NAME = "lllogininstance_tos";
std::string construct_start_string();
+
+
+// MandatoryUpdateMachine
+//-----------------------------------------------------------------------------
+
+
+MandatoryUpdateMachine::MandatoryUpdateMachine(LLLoginInstance & loginInstance, LLUpdaterService & updaterService):
+ mLoginInstance(loginInstance),
+ mUpdaterService(updaterService)
+{
+ ; // No op.
+}
+
+
+void MandatoryUpdateMachine::start(void)
+{
+ llinfos << "starting manditory update machine" << llendl;
+
+ if(mUpdaterService.isChecking()) {
+ switch(mUpdaterService.getState()) {
+ case LLUpdaterService::UP_TO_DATE:
+ mUpdaterService.stopChecking();
+ mUpdaterService.startChecking();
+ // Fall through.
+ case LLUpdaterService::INITIAL:
+ case LLUpdaterService::CHECKING_FOR_UPDATE:
+ setCurrentState(new CheckingForUpdate(*this));
+ break;
+ case LLUpdaterService::DOWNLOADING:
+ setCurrentState(new WaitingForDownload(*this));
+ break;
+ case LLUpdaterService::TERMINAL:
+ if(LLUpdaterService::updateReadyToInstall()) {
+ setCurrentState(new ReadyToInstall(*this));
+ } else {
+ setCurrentState(new Error(*this));
+ }
+ break;
+ case LLUpdaterService::FAILURE:
+ setCurrentState(new Error(*this));
+ break;
+ default:
+ llassert(!"unpossible case");
+ break;
+ }
+ } else {
+ setCurrentState(new StartingUpdaterService(*this));
+ }
+}
+
+
+void MandatoryUpdateMachine::setCurrentState(State * newStatePointer)
+{
+ {
+ boost::scoped_ptr<State> newState(newStatePointer);
+ if(mState != 0) mState->exit();
+ mState.swap(newState);
+
+ // Old state will be deleted on exit from this block before the new state
+ // is entered.
+ }
+ if(mState != 0) mState->enter();
+}
+
+
+
+// MandatoryUpdateMachine::CheckingForUpdate
+//-----------------------------------------------------------------------------
+
+
+MandatoryUpdateMachine::CheckingForUpdate::CheckingForUpdate(MandatoryUpdateMachine & machine):
+ mMachine(machine)
+{
+ ; // No op.
+}
+
+
+void MandatoryUpdateMachine::CheckingForUpdate::enter(void)
+{
+ llinfos << "entering checking for update" << llendl;
+
+ mProgressView = gViewerWindow->getProgressView();
+ mProgressView->setMessage("Looking for update...");
+ mProgressView->setText("There is a required update for your Second Life installation.");
+ mProgressView->setPercent(0);
+ mProgressView->setVisible(true);
+ mConnection = LLEventPumps::instance().obtain(LLUpdaterService::pumpName()).
+ listen("MandatoryUpdateMachine::CheckingForUpdate", boost::bind(&MandatoryUpdateMachine::CheckingForUpdate::onEvent, this, _1));
+}
+
+
+void MandatoryUpdateMachine::CheckingForUpdate::exit(void)
+{
+}
+
+
+bool MandatoryUpdateMachine::CheckingForUpdate::onEvent(LLSD const & event)
+{
+ if(event["type"].asInteger() == LLUpdaterService::STATE_CHANGE) {
+ switch(event["state"].asInteger()) {
+ case LLUpdaterService::DOWNLOADING:
+ mMachine.setCurrentState(new WaitingForDownload(mMachine));
+ break;
+ case LLUpdaterService::UP_TO_DATE:
+ case LLUpdaterService::TERMINAL:
+ case LLUpdaterService::FAILURE:
+ mProgressView->setVisible(false);
+ mMachine.setCurrentState(new Error(mMachine));
+ break;
+ case LLUpdaterService::INSTALLING:
+ llassert(!"can't possibly be installing");
+ break;
+ default:
+ break;
+ }
+ } else {
+ ; // Ignore.
+ }
+
+ return false;
+}
+
+
+
+// MandatoryUpdateMachine::Error
+//-----------------------------------------------------------------------------
+
+
+MandatoryUpdateMachine::Error::Error(MandatoryUpdateMachine & machine):
+ mMachine(machine)
+{
+ ; // No op.
+}
+
+
+void MandatoryUpdateMachine::Error::enter(void)
+{
+ llinfos << "entering error" << llendl;
+ LLNotificationsUtil::add("FailedUpdateInstall", LLSD(), LLSD(), boost::bind(&MandatoryUpdateMachine::Error::onButtonClicked, this, _1, _2));
+}
+
+
+void MandatoryUpdateMachine::Error::exit(void)
+{
+ LLAppViewer::instance()->forceQuit();
+}
+
+
+void MandatoryUpdateMachine::Error::onButtonClicked(const LLSD &, const LLSD &)
+{
+ mMachine.setCurrentState(0);
+}
+
+
+
+// MandatoryUpdateMachine::ReadyToInstall
+//-----------------------------------------------------------------------------
+
+
+MandatoryUpdateMachine::ReadyToInstall::ReadyToInstall(MandatoryUpdateMachine & machine):
+ mMachine(machine)
+{
+ ; // No op.
+}
+
+
+void MandatoryUpdateMachine::ReadyToInstall::enter(void)
+{
+ llinfos << "entering ready to install" << llendl;
+ // Open update ready dialog.
+}
+
+
+void MandatoryUpdateMachine::ReadyToInstall::exit(void)
+{
+ // Restart viewer.
+}
+
+
+
+// MandatoryUpdateMachine::StartingUpdaterService
+//-----------------------------------------------------------------------------
+
+
+MandatoryUpdateMachine::StartingUpdaterService::StartingUpdaterService(MandatoryUpdateMachine & machine):
+ mMachine(machine)
+{
+ ; // No op.
+}
+
+
+void MandatoryUpdateMachine::StartingUpdaterService::enter(void)
+{
+ llinfos << "entering start update service" << llendl;
+ LLNotificationsUtil::add("UpdaterServiceNotRunning", LLSD(), LLSD(), boost::bind(&MandatoryUpdateMachine::StartingUpdaterService::onButtonClicked, this, _1, _2));
+}
+
+
+void MandatoryUpdateMachine::StartingUpdaterService::exit(void)
+{
+ ; // No op.
+}
+
+
+void MandatoryUpdateMachine::StartingUpdaterService::onButtonClicked(const LLSD & uiform, const LLSD & result)
+{
+ if(result["OK_okcancelbuttons"].asBoolean()) {
+ mMachine.mUpdaterService.startChecking(false);
+ mMachine.setCurrentState(new CheckingForUpdate(mMachine));
+ } else {
+ LLAppViewer::instance()->forceQuit();
+ }
+}
+
+
+
+// MandatoryUpdateMachine::WaitingForDownload
+//-----------------------------------------------------------------------------
+
+
+MandatoryUpdateMachine::WaitingForDownload::WaitingForDownload(MandatoryUpdateMachine & machine):
+ mMachine(machine),
+ mProgressView(0)
+{
+ ; // No op.
+}
+
+
+void MandatoryUpdateMachine::WaitingForDownload::enter(void)
+{
+ llinfos << "entering waiting for download" << llendl;
+ mProgressView = gViewerWindow->getProgressView();
+ mProgressView->setMessage("Downloading update...");
+ std::ostringstream stream;
+ stream << "There is a required update for your Second Life installation." << std::endl <<
+ "Version " << mMachine.mUpdaterService.updatedVersion();
+ mProgressView->setText(stream.str());
+ mProgressView->setPercent(0);
+ mProgressView->setVisible(true);
+ mConnection = LLEventPumps::instance().obtain(LLUpdaterService::pumpName()).
+ listen("MandatoryUpdateMachine::CheckingForUpdate", boost::bind(&MandatoryUpdateMachine::WaitingForDownload::onEvent, this, _1));
+}
+
+
+void MandatoryUpdateMachine::WaitingForDownload::exit(void)
+{
+ mProgressView->setVisible(false);
+}
+
+
+bool MandatoryUpdateMachine::WaitingForDownload::onEvent(LLSD const & event)
+{
+ switch(event["type"].asInteger()) {
+ case LLUpdaterService::DOWNLOAD_COMPLETE:
+ mMachine.setCurrentState(new ReadyToInstall(mMachine));
+ break;
+ case LLUpdaterService::DOWNLOAD_ERROR:
+ mMachine.setCurrentState(new Error(mMachine));
+ break;
+ case LLUpdaterService::PROGRESS: {
+ double downloadSize = event["download_size"].asReal();
+ double bytesDownloaded = event["bytes_downloaded"].asReal();
+ mProgressView->setPercent(100. * bytesDownloaded / downloadSize);
+ break;
+ }
+ default:
+ break;
+ }
+
+ return false;
+}
+
+
+
+// LLLoginInstance
+//-----------------------------------------------------------------------------
+
+
LLLoginInstance::LLLoginInstance() :
mLoginModule(new LLLogin()),
mNotifications(NULL),
@@ -69,7 +472,8 @@ LLLoginInstance::LLLoginInstance() :
mSkipOptionalUpdate(false),
mAttemptComplete(false),
mTransferRate(0.0f),
- mDispatcher("LLLoginInstance", "change")
+ mDispatcher("LLLoginInstance", "change"),
+ mUpdaterService(0)
{
mLoginModule->getEventPump().listen("lllogininstance",
boost::bind(&LLLoginInstance::handleLoginEvent, this, _1));
@@ -186,6 +590,7 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia
request_params["version"] = LLVersionInfo::getChannelAndVersion(); // Includes channel name
request_params["channel"] = LLVersionInfo::getChannel();
request_params["id0"] = mSerialNumber;
+ request_params["host_id"] = gSavedSettings.getString("HostID");
mRequestData.clear();
mRequestData["method"] = "login_to_simulator";
@@ -353,6 +758,15 @@ bool LLLoginInstance::handleTOSResponse(bool accepted, const std::string& key)
void LLLoginInstance::updateApp(bool mandatory, const std::string& auth_msg)
{
+ if(mandatory)
+ {
+ gViewerWindow->setShowProgress(false);
+ MandatoryUpdateMachine * machine = new MandatoryUpdateMachine(*this, *mUpdaterService);
+ mUpdateStateMachine.reset(machine);
+ machine->start();
+ return;
+ }
+
// store off config state, as we might quit soon
gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE);
LLUIColorTable::instance().saveUserSettings();
diff --git a/indra/newview/lllogininstance.h b/indra/newview/lllogininstance.h
index 159e05046c..b872d7d1b1 100644
--- a/indra/newview/lllogininstance.h
+++ b/indra/newview/lllogininstance.h
@@ -34,12 +34,15 @@
class LLLogin;
class LLEventStream;
class LLNotificationsInterface;
+class LLUpdaterService;
// This class hosts the login module and is used to
// negotiate user authentication attempts.
class LLLoginInstance : public LLSingleton<LLLoginInstance>
{
public:
+ class Disposable;
+
LLLoginInstance();
~LLLoginInstance();
@@ -75,6 +78,7 @@ public:
typedef boost::function<void()> UpdaterLauncherCallback;
void setUpdaterLauncher(const UpdaterLauncherCallback& ulc) { mUpdaterLauncher = ulc; }
+ void setUpdaterService(LLUpdaterService * updaterService) { mUpdaterService = updaterService; }
private:
void constructAuthParams(LLPointer<LLCredential> user_credentials);
void updateApp(bool mandatory, const std::string& message);
@@ -104,6 +108,8 @@ private:
int mLastExecEvent;
UpdaterLauncherCallback mUpdaterLauncher;
LLEventDispatcher mDispatcher;
+ LLUpdaterService * mUpdaterService;
+ boost::scoped_ptr<Disposable> mUpdateStateMachine;
};
#endif
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index e84c9152b1..9493fddf50 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -25,7 +25,7 @@
*/
#include "llviewerprecompiledheaders.h"
-
+#include "lltooltip.h"
#include "llmediactrl.h"
@@ -54,6 +54,10 @@
#include "llbutton.h"
#include "llcheckboxctrl.h"
#include "llnotifications.h"
+#include "lllineeditor.h"
+#include "llfloatermediabrowser.h"
+#include "llfloaterwebcontent.h"
+#include "llwindowshade.h"
extern BOOL gRestoreGL;
@@ -70,7 +74,8 @@ LLMediaCtrl::Params::Params()
caret_color("caret_color"),
initial_mime_type("initial_mime_type"),
media_id("media_id"),
- trusted_content("trusted_content", false)
+ trusted_content("trusted_content", false),
+ focus_on_click("focus_on_click", true)
{
tab_stop(false);
}
@@ -86,7 +91,7 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) :
mIgnoreUIScale( true ),
mAlwaysRefresh( false ),
mMediaSource( 0 ),
- mTakeFocusOnClick( true ),
+ mTakeFocusOnClick( p.focus_on_click ),
mCurrentNavUrl( "" ),
mStretchToFill( true ),
mMaintainAspectRatio ( true ),
@@ -97,7 +102,9 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) :
mTextureHeight ( 1024 ),
mClearCache(false),
mHomePageMimeType(p.initial_mime_type),
- mTrusted(p.trusted_content)
+ mTrusted(p.trusted_content),
+ mWindowShade(NULL),
+ mHoverTextChanged(false)
{
{
LLColor4 color = p.caret_color().get();
@@ -126,7 +133,7 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) :
setTextureSize(screen_width, screen_height);
}
- mMediaTextureID.generate();
+ mMediaTextureID = getKey();
// We don't need to create the media source up front anymore unless we have a non-empty home URL to navigate to.
if(!mHomePageUrl.empty())
@@ -140,8 +147,6 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) :
// addChild( mBorder );
}
-////////////////////////////////////////////////////////////////////////////////
-// note: this is now a singleton and destruction happens via initClass() now
LLMediaCtrl::~LLMediaCtrl()
{
@@ -181,6 +186,13 @@ BOOL LLMediaCtrl::handleHover( S32 x, S32 y, MASK mask )
mMediaSource->mouseMove(x, y, mask);
gViewerWindow->setCursor(mMediaSource->getLastSetCursor());
}
+
+ // TODO: Is this the right way to handle hover text changes driven by the plugin?
+ if(mHoverTextChanged)
+ {
+ mHoverTextChanged = false;
+ handleToolTip(x, y, mask);
+ }
return TRUE;
}
@@ -197,6 +209,35 @@ BOOL LLMediaCtrl::handleScrollWheel( S32 x, S32 y, S32 clicks )
}
////////////////////////////////////////////////////////////////////////////////
+// virtual
+BOOL LLMediaCtrl::handleToolTip(S32 x, S32 y, MASK mask)
+{
+ std::string hover_text;
+
+ if (mMediaSource && mMediaSource->hasMedia())
+ hover_text = mMediaSource->getMediaPlugin()->getHoverText();
+
+ if(hover_text.empty())
+ {
+ return FALSE;
+ }
+ else
+ {
+ S32 screen_x, screen_y;
+
+ localPointToScreen(x, y, &screen_x, &screen_y);
+ LLRect sticky_rect_screen;
+ sticky_rect_screen.setCenterAndSize(screen_x, screen_y, 20, 20);
+
+ LLToolTipMgr::instance().show(LLToolTip::Params()
+ .message(hover_text)
+ .sticky_rect(sticky_rect_screen));
+ }
+
+ return TRUE;
+}
+
+////////////////////////////////////////////////////////////////////////////////
//
BOOL LLMediaCtrl::handleMouseUp( S32 x, S32 y, MASK mask )
{
@@ -206,14 +247,6 @@ BOOL LLMediaCtrl::handleMouseUp( S32 x, S32 y, MASK mask )
if (mMediaSource)
{
mMediaSource->mouseUp(x, y, mask);
-
- // *HACK: LLMediaImplLLMozLib automatically takes focus on mouseup,
- // in addition to the onFocusReceived() call below. Undo this. JC
- if (!mTakeFocusOnClick)
- {
- mMediaSource->focus(false);
- gViewerWindow->focusClient();
- }
}
gFocusMgr.setMouseCapture( NULL );
@@ -345,85 +378,6 @@ void LLMediaCtrl::onFocusLost()
//
BOOL LLMediaCtrl::postBuild ()
{
- LLLayoutStack::Params layout_p;
- layout_p.name = "notification_stack";
- layout_p.rect = LLRect(0,getLocalRect().mTop,getLocalRect().mRight, 30);
- layout_p.follows.flags = FOLLOWS_ALL;
- layout_p.mouse_opaque = false;
- layout_p.orientation = "vertical";
-
- LLLayoutStack* stackp = LLUICtrlFactory::create<LLLayoutStack>(layout_p);
- addChild(stackp);
-
- LLLayoutPanel::Params panel_p;
- panel_p.rect = LLRect(0, 30, 800, 0);
- panel_p.min_height = 30;
- panel_p.name = "notification_area";
- panel_p.visible = false;
- panel_p.user_resize = false;
- panel_p.background_visible = true;
- panel_p.bg_alpha_image.name = "Yellow_Gradient";
- panel_p.auto_resize = false;
- LLLayoutPanel* notification_panel = LLUICtrlFactory::create<LLLayoutPanel>(panel_p);
- stackp->addChild(notification_panel);
-
- panel_p = LLUICtrlFactory::getDefaultParams<LLLayoutPanel>();
- panel_p.auto_resize = true;
- panel_p.mouse_opaque = false;
- LLLayoutPanel* dummy_panel = LLUICtrlFactory::create<LLLayoutPanel>(panel_p);
- stackp->addChild(dummy_panel);
-
- layout_p = LLUICtrlFactory::getDefaultParams<LLLayoutStack>();
- layout_p.rect = LLRect(0, 30, 800, 0);
- layout_p.follows.flags = FOLLOWS_ALL;
- layout_p.orientation = "horizontal";
- stackp = LLUICtrlFactory::create<LLLayoutStack>(layout_p);
- notification_panel->addChild(stackp);
-
- panel_p = LLUICtrlFactory::getDefaultParams<LLLayoutPanel>();
- panel_p.rect.height = 30;
- LLLayoutPanel* panel = LLUICtrlFactory::create<LLLayoutPanel>(panel_p);
- stackp->addChild(panel);
-
- LLIconCtrl::Params icon_p;
- icon_p.name = "notification_icon";
- icon_p.rect = LLRect(5, 23, 21, 8);
- panel->addChild(LLUICtrlFactory::create<LLIconCtrl>(icon_p));
-
- LLTextBox::Params text_p;
- text_p.rect = LLRect(31, 20, 430, 0);
- text_p.text_color = LLColor4::black;
- text_p.font = LLFontGL::getFontSansSerif();
- text_p.font.style = "BOLD";
- text_p.name = "notification_text";
- text_p.use_ellipses = true;
- panel->addChild(LLUICtrlFactory::create<LLTextBox>(text_p));
-
- panel_p = LLUICtrlFactory::getDefaultParams<LLLayoutPanel>();
- panel_p.auto_resize = false;
- panel_p.user_resize = false;
- panel_p.name="form_elements";
- panel_p.rect = LLRect(0, 30, 130, 0);
- LLLayoutPanel* form_elements_panel = LLUICtrlFactory::create<LLLayoutPanel>(panel_p);
- stackp->addChild(form_elements_panel);
-
- panel_p = LLUICtrlFactory::getDefaultParams<LLLayoutPanel>();
- panel_p.auto_resize = false;
- panel_p.user_resize = false;
- panel_p.rect = LLRect(0, 30, 25, 0);
- LLLayoutPanel* close_panel = LLUICtrlFactory::create<LLLayoutPanel>(panel_p);
- stackp->addChild(close_panel);
-
- LLButton::Params button_p;
- button_p.name = "close_notification";
- button_p.rect = LLRect(5, 23, 21, 7);
- button_p.image_color=LLUIColorTable::instance().getColor("DkGray_66");
- button_p.image_unselected.name="Icon_Close_Foreground";
- button_p.image_selected.name="Icon_Close_Press";
- button_p.click_callback.function = boost::bind(&LLMediaCtrl::onCloseNotification, this);
-
- close_panel->addChild(LLUICtrlFactory::create<LLButton>(button_p));
-
setVisibleCallback(boost::bind(&LLMediaCtrl::onVisibilityChange, this, _2));
return TRUE;
}
@@ -432,13 +386,15 @@ BOOL LLMediaCtrl::postBuild ()
//
BOOL LLMediaCtrl::handleKeyHere( KEY key, MASK mask )
{
- if (LLPanel::handleKeyHere(key, mask)) return TRUE;
BOOL result = FALSE;
if (mMediaSource)
{
result = mMediaSource->handleKeyHere(key, mask);
}
+
+ if ( ! result )
+ result = LLPanel::handleKeyHere(key, mask);
return result;
}
@@ -458,7 +414,6 @@ void LLMediaCtrl::handleVisibilityChange ( BOOL new_visibility )
//
BOOL LLMediaCtrl::handleUnicodeCharHere(llwchar uni_char)
{
- if (LLPanel::handleUnicodeCharHere(uni_char)) return TRUE;
BOOL result = FALSE;
if (mMediaSource)
@@ -466,6 +421,9 @@ BOOL LLMediaCtrl::handleUnicodeCharHere(llwchar uni_char)
result = mMediaSource->handleUnicodeCharHere(uni_char);
}
+ if ( ! result )
+ result = LLPanel::handleUnicodeCharHere(uni_char);
+
return result;
}
@@ -921,11 +879,6 @@ void LLMediaCtrl::draw()
if ( mBorder && mBorder->getVisible() )
mBorder->setKeyboardFocusHighlight( gFocusMgr.childHasKeyboardFocus( this ) );
- if (mCurNotification && !mCurNotification->isActive())
- {
- hideNotification();
- }
-
LLPanel::draw();
// Restore the previous values
@@ -1033,7 +986,7 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event)
LLNotification::Params notify_params;
notify_params.name = "PopupAttempt";
- notify_params.payload = LLSD().with("target", target).with("url", url).with("uuid", uuid).with("media_id", getKey());
+ notify_params.payload = LLSD().with("target", target).with("url", url).with("uuid", uuid).with("media_id", mMediaTextureID);
notify_params.functor.function = boost::bind(&LLMediaCtrl::onPopup, this, _1, _2);
if (mTrusted)
@@ -1088,6 +1041,31 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event)
LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_GEOMETRY_CHANGE, uuid is " << self->getClickUUID() << LL_ENDL;
}
break;
+
+ case MEDIA_EVENT_AUTH_REQUEST:
+ {
+ LLNotification::Params auth_request_params;
+ auth_request_params.name = "AuthRequest";
+
+ // pass in host name and realm for site (may be zero length but will always exist)
+ LLSD args;
+ LLURL raw_url( self->getAuthURL().c_str() );
+ args["HOST_NAME"] = raw_url.getAuthority();
+ args["REALM"] = self->getAuthRealm();
+ auth_request_params.substitutions = args;
+
+ auth_request_params.payload = LLSD().with("media_id", mMediaTextureID);
+ auth_request_params.functor.function = boost::bind(&LLViewerMedia::onAuthSubmit, _1, _2);
+ LLNotifications::instance().add(auth_request_params);
+ };
+ break;
+
+ case MEDIA_EVENT_LINK_HOVERED:
+ {
+ LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_LINK_HOVERED, hover text is: " << self->getHoverText() << LL_ENDL;
+ mHoverTextChanged = true;
+ };
+ break;
};
// chain all events to any potential observers of this object.
@@ -1105,109 +1083,85 @@ void LLMediaCtrl::onPopup(const LLSD& notification, const LLSD& response)
{
if (response["open"])
{
- LLWeb::loadURL(notification["payload"]["url"], notification["payload"]["target"], notification["payload"]["uuid"]);
+ // name of default floater to open
+ std::string floater_name = "media_browser";
+
+ // look for parent floater name
+ if ( gFloaterView )
+ {
+ if ( gFloaterView->getParentFloater(this) )
+ {
+ floater_name = gFloaterView->getParentFloater(this)->getInstanceName();
+ }
+ else
+ {
+ lldebugs << "No gFloaterView->getParentFloater(this) for onPopuup()" << llendl;
+ };
+ }
+ else
+ {
+ lldebugs << "No gFloaterView for onPopuup()" << llendl;
+ };
+
+ // (for now) open web content floater if that's our parent, otherwise, open the current media floater
+ // (this will change soon)
+ if ( floater_name == "web_content" )
+ {
+ LLWeb::loadWebURL(notification["payload"]["url"], notification["payload"]["target"], notification["payload"]["uuid"]);
+ }
+ else
+ {
+ LLWeb::loadURL(notification["payload"]["url"], notification["payload"]["target"], notification["payload"]["uuid"]);
+ }
}
else
{
// Make sure the opening instance knows its window open request was denied, so it can clean things up.
LLViewerMedia::proxyWindowClosed(notification["payload"]["uuid"]);
}
-
}
-void LLMediaCtrl::onCloseNotification()
-{
- LLNotifications::instance().cancel(mCurNotification);
-}
-
-void LLMediaCtrl::onClickIgnore(LLUICtrl* ctrl)
+void LLMediaCtrl::showNotification(LLNotificationPtr notify)
{
- bool check = ctrl->getValue().asBoolean();
- if (mCurNotification && mCurNotification->getForm()->getIgnoreType() == LLNotificationForm::IGNORE_SHOW_AGAIN)
+ delete mWindowShade;
+
+ LLWindowShade::Params params;
+ params.name = "notification_shade";
+ params.rect = getLocalRect();
+ params.follows.flags = FOLLOWS_ALL;
+ params.notification = notify;
+ params.modal = true;
+ //HACK: don't hardcode this
+ if (notify->getIcon() == "Popup_Caution")
{
- // question was "show again" so invert value to get "ignore"
- check = !check;
+ params.bg_image.name = "Yellow_Gradient";
+ params.text_color = LLColor4::black;
}
- mCurNotification->setIgnored(check);
-}
-
-void LLMediaCtrl::onClickNotificationButton(const std::string& name)
-{
- if (!mCurNotification) return;
-
- LLSD response = mCurNotification->getResponseTemplate();
- response[name] = true;
-
- mCurNotification->respond(response);
-}
-
-void LLMediaCtrl::showNotification(LLNotificationPtr notify)
-{
- mCurNotification = notify;
-
- // add popup here
- LLSD payload = notify->getPayload();
-
- LLNotificationFormPtr formp = notify->getForm();
- LLLayoutPanel& panel = getChildRef<LLLayoutPanel>("notification_area");
- panel.setVisible(true);
- panel.getChild<LLUICtrl>("notification_icon")->setValue(notify->getIcon());
- panel.getChild<LLUICtrl>("notification_text")->setValue(notify->getMessage());
- panel.getChild<LLUICtrl>("notification_text")->setToolTip(notify->getMessage());
- LLNotificationForm::EIgnoreType ignore_type = formp->getIgnoreType();
- LLLayoutPanel& form_elements = panel.getChildRef<LLLayoutPanel>("form_elements");
- form_elements.deleteAllChildren();
-
- const S32 FORM_PADDING_HORIZONTAL = 10;
- const S32 FORM_PADDING_VERTICAL = 3;
- S32 cur_x = FORM_PADDING_HORIZONTAL;
-
- if (ignore_type != LLNotificationForm::IGNORE_NO)
+ else
+ //HACK: another one since XUI doesn't support what we need right now
+ if (notify->getName() == "AuthRequest")
{
- LLCheckBoxCtrl::Params checkbox_p;
- checkbox_p.name = "ignore_check";
- checkbox_p.rect = LLRect(cur_x, form_elements.getRect().getHeight() - FORM_PADDING_VERTICAL, cur_x, FORM_PADDING_VERTICAL);
- checkbox_p.label = formp->getIgnoreMessage();
- checkbox_p.label_text.text_color = LLColor4::black;
- checkbox_p.commit_callback.function = boost::bind(&LLMediaCtrl::onClickIgnore, this, _1);
- checkbox_p.initial_value = formp->getIgnored();
-
- LLCheckBoxCtrl* check = LLUICtrlFactory::create<LLCheckBoxCtrl>(checkbox_p);
- check->setRect(check->getBoundingRect());
- form_elements.addChild(check);
- cur_x = check->getRect().mRight + FORM_PADDING_HORIZONTAL;
+ params.bg_image.name = "Yellow_Gradient";
+ params.text_color = LLColor4::black;
+ params.can_close = false;
}
-
- for (S32 i = 0; i < formp->getNumElements(); i++)
+ else
{
- LLSD form_element = formp->getElement(i);
- if (form_element["type"].asString() == "button")
- {
- LLButton::Params button_p;
- button_p.name = form_element["name"];
- button_p.label = form_element["text"];
- button_p.rect = LLRect(cur_x, form_elements.getRect().getHeight() - FORM_PADDING_VERTICAL, cur_x, FORM_PADDING_VERTICAL);
- button_p.click_callback.function = boost::bind(&LLMediaCtrl::onClickNotificationButton, this, form_element["name"].asString());
- button_p.auto_resize = true;
-
- LLButton* button = LLUICtrlFactory::create<LLButton>(button_p);
- button->autoResize();
- form_elements.addChild(button);
-
- cur_x = button->getRect().mRight + FORM_PADDING_HORIZONTAL;
- }
+ //HACK: make this a property of the notification itself, "cancellable"
+ params.can_close = false;
+ params.text_color.control = "LabelTextColor";
}
+ mWindowShade = LLUICtrlFactory::create<LLWindowShade>(params);
- form_elements.reshape(cur_x, form_elements.getRect().getHeight());
-
- //LLWeb::loadURL(payload["url"], payload["target"]);
+ addChild(mWindowShade);
+ mWindowShade->show();
}
void LLMediaCtrl::hideNotification()
{
- LLLayoutPanel& panel = getChildRef<LLLayoutPanel>("notification_area");
- panel.setVisible(FALSE);
-
- mCurNotification.reset();
+ if (mWindowShade)
+ {
+ mWindowShade->hide();
+ }
}
diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h
index 65dfbbff78..38a74f90d3 100644
--- a/indra/newview/llmediactrl.h
+++ b/indra/newview/llmediactrl.h
@@ -53,7 +53,8 @@ public:
ignore_ui_scale,
hide_loading,
decouple_texture_size,
- trusted_content;
+ trusted_content,
+ focus_on_click;
Optional<S32> texture_width,
texture_height;
@@ -89,6 +90,7 @@ public:
virtual BOOL handleRightMouseUp(S32 x, S32 y, MASK mask);
virtual BOOL handleDoubleClick( S32 x, S32 y, MASK mask );
virtual BOOL handleScrollWheel( S32 x, S32 y, S32 clicks );
+ virtual BOOL handleToolTip(S32 x, S32 y, MASK mask);
// navigation
void navigateTo( std::string url_in, std::string mime_type = "");
@@ -167,9 +169,6 @@ public:
private:
void onVisibilityChange ( const LLSD& new_visibility );
void onPopup(const LLSD& notification, const LLSD& response);
- void onCloseNotification();
- void onClickNotificationButton(const std::string& name);
- void onClickIgnore(LLUICtrl* ctrl);
const S32 mTextureDepthBytes;
LLUUID mMediaTextureID;
@@ -193,7 +192,8 @@ public:
S32 mTextureWidth;
S32 mTextureHeight;
bool mClearCache;
- boost::shared_ptr<class LLNotification> mCurNotification;
+ class LLWindowShade* mWindowShade;
+ bool mHoverTextChanged;
};
#endif // LL_LLMediaCtrl_H
diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp
index d38bb5aa4a..142ee40cc8 100644
--- a/indra/newview/llmoveview.cpp
+++ b/indra/newview/llmoveview.cpp
@@ -94,6 +94,7 @@ BOOL LLFloaterMove::postBuild()
{
setIsChrome(TRUE);
setTitleVisible(TRUE); // restore title visibility after chrome applying
+ updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730)
LLDockableFloater::postBuild();
@@ -448,17 +449,20 @@ void LLFloaterMove::updatePosition()
LLBottomTray* tray = LLBottomTray::getInstance();
if (!tray) return;
- LLButton* movement_btn = tray->getChild<LLButton>(BOTTOM_TRAY_BUTTON_NAME);
+ LLButton* movement_btn = tray->findChild<LLButton>(BOTTOM_TRAY_BUTTON_NAME);
- //align centers of a button and a floater
- S32 x = movement_btn->calcScreenRect().getCenterX() - getRect().getWidth()/2;
-
- S32 y = 0;
- if (!mModeActionsPanel->getVisible())
+ if (movement_btn)
{
- y = mModeActionsPanel->getRect().getHeight();
+ //align centers of a button and a floater
+ S32 x = movement_btn->calcScreenRect().getCenterX() - getRect().getWidth()/2;
+
+ S32 y = 0;
+ if (!mModeActionsPanel->getVisible())
+ {
+ y = mModeActionsPanel->getRect().getHeight();
+ }
+ setOrigin(x, y);
}
- setOrigin(x, y);
}
//static
@@ -735,10 +739,18 @@ void LLPanelStandStopFlying::updatePosition()
LLBottomTray* tray = LLBottomTray::getInstance();
if (!tray || mAttached) return;
- LLButton* movement_btn = tray->getChild<LLButton>(BOTTOM_TRAY_BUTTON_NAME);
+ LLButton* movement_btn = tray->findChild<LLButton>(BOTTOM_TRAY_BUTTON_NAME);
- // Align centers of the button and the panel.
- S32 x = movement_btn->calcScreenRect().getCenterX() - getRect().getWidth()/2;
+ S32 x = 0;
+ if (movement_btn)
+ {
+ // Align centers of the button and the panel.
+ x = movement_btn->calcScreenRect().getCenterX() - getRect().getWidth()/2;
+ }
+ else
+ {
+ x = tray->calcScreenRect().getCenterX() - getRect().getWidth()/2;
+ }
setOrigin(x, 0);
}
diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp
index 58849393b4..e4f83ce6b9 100644
--- a/indra/newview/llnavigationbar.cpp
+++ b/indra/newview/llnavigationbar.cpp
@@ -276,9 +276,6 @@ LLNavigationBar::LLNavigationBar()
// set a listener function for LoginComplete event
LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLNavigationBar::handleLoginComplete, this));
-
- // Necessary for focus movement among child controls
- setFocusRoot(TRUE);
}
LLNavigationBar::~LLNavigationBar()
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp
index 932ad75f29..836ae9a0cf 100644
--- a/indra/newview/llnearbychatbar.cpp
+++ b/indra/newview/llnearbychatbar.cpp
@@ -94,15 +94,19 @@ public:
LLGestureComboList::Params::Params()
: combo_button("combo_button"),
- combo_list("combo_list")
+ combo_list("combo_list"),
+ get_more("get_more", true),
+ view_all("view_all", true)
{
}
LLGestureComboList::LLGestureComboList(const LLGestureComboList::Params& p)
-: LLUICtrl(p)
- , mLabel(p.label)
- , mViewAllItemIndex(0)
- , mGetMoreItemIndex(0)
+: LLUICtrl(p),
+ mLabel(p.label),
+ mViewAllItemIndex(-1),
+ mGetMoreItemIndex(-1),
+ mShowViewAll(p.view_all),
+ mShowGetMore(p.get_more)
{
LLBottomtrayButton::Params button_params = p.combo_button;
button_params.follows.flags(FOLLOWS_LEFT|FOLLOWS_BOTTOM|FOLLOWS_RIGHT);
@@ -286,12 +290,16 @@ void LLGestureComboList::refreshGestures()
sortByName();
// store indices for Get More and View All items (idx is the index followed by the last added Gesture)
- mGetMoreItemIndex = idx;
- mViewAllItemIndex = idx + 1;
-
- // add Get More and View All items at the bottom
- mList->addSimpleElement(LLTrans::getString("GetMoreGestures"), ADD_BOTTOM, LLSD(mGetMoreItemIndex));
- mList->addSimpleElement(LLTrans::getString("ViewAllGestures"), ADD_BOTTOM, LLSD(mViewAllItemIndex));
+ if (mShowGetMore)
+ {
+ mGetMoreItemIndex = idx;
+ mList->addSimpleElement(LLTrans::getString("GetMoreGestures"), ADD_BOTTOM, LLSD(mGetMoreItemIndex));
+ }
+ if (mShowViewAll)
+ {
+ mViewAllItemIndex = idx + 1;
+ mList->addSimpleElement(LLTrans::getString("ViewAllGestures"), ADD_BOTTOM, LLSD(mViewAllItemIndex));
+ }
// Insert label after sorting, at top, with separator below it
mList->addSeparator(ADD_TOP);
diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h
index cc905736fd..033d1dd5a2 100644
--- a/indra/newview/llnearbychatbar.h
+++ b/indra/newview/llnearbychatbar.h
@@ -46,6 +46,8 @@ public:
{
Optional<LLBottomtrayButton::Params> combo_button;
Optional<LLScrollListCtrl::Params> combo_list;
+ Optional<bool> get_more,
+ view_all;
Params();
};
@@ -56,6 +58,8 @@ protected:
LLGestureComboList(const Params&);
std::vector<LLMultiGesture*> mGestures;
std::string mLabel;
+ bool mShowViewAll;
+ bool mShowGetMore;
LLSD::Integer mViewAllItemIndex;
LLSD::Integer mGetMoreItemIndex;
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp
index d2ad78f140..de5439e4e0 100644
--- a/indra/newview/llnearbychathandler.cpp
+++ b/indra/newview/llnearbychathandler.cpp
@@ -121,7 +121,7 @@ protected:
if (!toast) return;
LL_DEBUGS("NearbyChat") << "Pooling toast" << llendl;
toast->setVisible(FALSE);
- toast->stopFading();
+ toast->stopTimer();
toast->setIsHidden(true);
// Nearby chat toasts that are hidden, not destroyed. They are collected to the toast pool, so that
@@ -296,7 +296,7 @@ void LLNearbyChatScreenChannel::addNotification(LLSD& notification)
{
panel->addMessage(notification);
toast->reshapeToPanel();
- toast->startFading();
+ toast->startTimer();
arrangeToasts();
return;
@@ -341,7 +341,7 @@ void LLNearbyChatScreenChannel::addNotification(LLSD& notification)
panel->init(notification);
toast->reshapeToPanel();
- toast->startFading();
+ toast->startTimer();
m_active_toasts.push_back(toast->getHandle());
@@ -382,7 +382,10 @@ void LLNearbyChatScreenChannel::showToastsBottom()
return;
LLRect toast_rect;
- S32 bottom = getRect().mBottom;
+ updateBottom();
+ S32 channel_bottom = getRect().mBottom;
+
+ S32 bottom = channel_bottom;
S32 margin = gSavedSettings.getS32("ToastGap");
//sort active toasts
@@ -514,9 +517,18 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args)
}
nearby_chat->addMessage(chat_msg, true, args);
+
+ if(chat_msg.mSourceType == CHAT_SOURCE_AGENT
+ && chat_msg.mFromID.notNull()
+ && chat_msg.mFromID != gAgentID)
+ {
+ LLFirstUse::otherAvatarChatFirst();
+ }
+
if( nearby_chat->getVisible()
|| ( chat_msg.mSourceType == CHAT_SOURCE_AGENT
- && gSavedSettings.getBOOL("UseChatBubbles") ) )
+ && gSavedSettings.getBOOL("UseChatBubbles") )
+ || !mChannel->getShowToasts() ) // to prevent toasts in Busy mode
return;//no need in toast if chat is visible or if bubble chat is enabled
// Handle irc styled messages for toast panel
@@ -573,13 +585,7 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args)
notification["font_size"] = (S32)LLViewerChat::getChatFontSize() ;
channel->addNotification(notification);
}
-
- if(chat_msg.mSourceType == CHAT_SOURCE_AGENT
- && chat_msg.mFromID.notNull()
- && chat_msg.mFromID != gAgentID)
- {
- LLFirstUse::otherAvatarChatFirst();
- }
+
}
void LLNearbyChatHandler::onDeleteToast(LLToast* toast)
diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp
index f084002385..1a8ec4991d 100644
--- a/indra/newview/llnetmap.cpp
+++ b/indra/newview/llnetmap.cpp
@@ -94,10 +94,12 @@ LLNetMap::LLNetMap (const Params & p)
mToolTipMsg()
{
mDotRadius = llmax(DOT_SCALE * mPixelsPerMeter, MIN_DOT_RADIUS);
+ setScale(gSavedSettings.getF32("MiniMapScale"));
}
LLNetMap::~LLNetMap()
{
+ gSavedSettings.setF32("MiniMapScale", mScale);
}
void LLNetMap::setScale( F32 scale )
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp
index 1249d5d856..94b2340c93 100644
--- a/indra/newview/llpanelavatar.cpp
+++ b/indra/newview/llpanelavatar.cpp
@@ -341,10 +341,11 @@ LLPanelAvatarNotes::~LLPanelAvatarNotes()
if(getAvatarId().notNull())
{
LLAvatarTracker::instance().removeParticularFriendObserver(getAvatarId(), this);
- if(LLVoiceClient::instanceExists())
- {
- LLVoiceClient::getInstance()->removeObserver((LLVoiceClientStatusObserver*)this);
- }
+ }
+
+ if(LLVoiceClient::instanceExists())
+ {
+ LLVoiceClient::getInstance()->removeObserver((LLVoiceClientStatusObserver*)this);
}
}
@@ -476,6 +477,7 @@ LLPanelAvatarProfile::LLPanelAvatarProfile()
BOOL LLPanelAvatarProfile::postBuild()
{
+ childSetCommitCallback("see_profile_btn",(boost::bind(&LLPanelAvatarProfile::onSeeProfileBtnClick,this)),NULL);
childSetCommitCallback("add_friend",(boost::bind(&LLPanelAvatarProfile::onAddFriendButtonClick,this)),NULL);
childSetCommitCallback("im",(boost::bind(&LLPanelAvatarProfile::onIMButtonClick,this)),NULL);
childSetCommitCallback("call",(boost::bind(&LLPanelAvatarProfile::onCallButtonClick,this)),NULL);
@@ -623,6 +625,35 @@ void LLPanelAvatarProfile::processGroupProperties(const LLAvatarGroups* avatar_g
getChild<LLUICtrl>("sl_groups")->setValue(groups);
}
+void LLPanelAvatarProfile::got_full_name_callback( const LLUUID& id, const std::string& full_name, bool is_group )
+{
+ LLStringUtil::format_map_t args;
+
+ std::string name;
+ if (LLAvatarNameCache::useDisplayNames())
+ {
+ name = LLCacheName::buildUsername(full_name);
+ }
+ else
+ {
+ name = full_name;
+ }
+
+ args["[NAME]"] = name;
+
+ std::string linden_name = getString("name_text_args", args);
+ getChild<LLUICtrl>("name_descr_text")->setValue(linden_name);
+}
+
+void LLPanelAvatarProfile::onNameCache(const LLUUID& agent_id, const LLAvatarName& av_name)
+{
+ LLStringUtil::format_map_t args;
+ args["[DISPLAY_NAME]"] = av_name.mDisplayName;
+
+ std::string display_name = getString("display_name_text_args", args);
+ getChild<LLUICtrl>("display_name_descr_text")->setValue(display_name);
+}
+
void LLPanelAvatarProfile::fillCommonData(const LLAvatarData* avatar_data)
{
//remove avatar id from cache to get fresh info
@@ -634,6 +665,24 @@ void LLPanelAvatarProfile::fillCommonData(const LLAvatarData* avatar_data)
LLStringUtil::format(birth_date, LLSD().with("datetime", (S32) avatar_data->born_on.secondsSinceEpoch()));
args["[REG_DATE]"] = birth_date;
}
+
+ // ask (asynchronously) for the avatar name
+ std::string full_name;
+ if (gCacheName->getFullName(avatar_data->agent_id, full_name))
+ {
+ // name in cache, call callback directly
+ got_full_name_callback( avatar_data->agent_id, full_name, false );
+ }
+ else
+ {
+ // not in cache, lookup name
+ gCacheName->get(avatar_data->agent_id, false, boost::bind( &LLPanelAvatarProfile::got_full_name_callback, this, _1, _2, _3 ));
+ }
+
+ // get display name
+ LLAvatarNameCache::get(avatar_data->avatar_id,
+ boost::bind(&LLPanelAvatarProfile::onNameCache, this, _1, _2));
+
args["[AGE]"] = LLDateUtil::ageFromDate( avatar_data->born_on, LLDate::now());
std::string register_date = getString("RegisterDateFormat", args);
getChild<LLUICtrl>("register_date")->setValue(register_date );
@@ -733,6 +782,11 @@ void LLPanelAvatarProfile::onAddFriendButtonClick()
LLAvatarActions::requestFriendshipDialog(getAvatarId());
}
+void LLPanelAvatarProfile::onSeeProfileBtnClick()
+{
+ LLAvatarActions::showProfile(getAvatarId());
+}
+
void LLPanelAvatarProfile::onIMButtonClick()
{
LLAvatarActions::startIM(getAvatarId());
@@ -758,10 +812,11 @@ LLPanelAvatarProfile::~LLPanelAvatarProfile()
if(getAvatarId().notNull())
{
LLAvatarTracker::instance().removeParticularFriendObserver(getAvatarId(), this);
- if(LLVoiceClient::instanceExists())
- {
- LLVoiceClient::getInstance()->removeObserver((LLVoiceClientStatusObserver*)this);
- }
+ }
+
+ if(LLVoiceClient::instanceExists())
+ {
+ LLVoiceClient::getInstance()->removeObserver((LLVoiceClientStatusObserver*)this);
}
}
diff --git a/indra/newview/llpanelavatar.h b/indra/newview/llpanelavatar.h
index 71d9d0a95a..070fe4579a 100644
--- a/indra/newview/llpanelavatar.h
+++ b/indra/newview/llpanelavatar.h
@@ -1,295 +1,298 @@
-/**
- * @file llpanelavatar.h
- * @brief LLPanelAvatar and related class definitions
- *
- * $LicenseInfo:firstyear=2004&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLPANELAVATAR_H
-#define LL_LLPANELAVATAR_H
-
-#include "llpanel.h"
-#include "llavatarpropertiesprocessor.h"
-#include "llcallingcard.h"
-#include "llvoiceclient.h"
-
-class LLComboBox;
-class LLLineEditor;
-
-enum EOnlineStatus
-{
- ONLINE_STATUS_NO = 0,
- ONLINE_STATUS_YES = 1
-};
-
-/**
-* Base class for any Profile View or My Profile Panel.
-*/
-class LLPanelProfileTab
- : public LLPanel
- , public LLAvatarPropertiesObserver
-{
-public:
-
- /**
- * Sets avatar ID, sets panel as observer of avatar related info replies from server.
- */
- virtual void setAvatarId(const LLUUID& id);
-
- /**
- * Returns avatar ID.
- */
- virtual const LLUUID& getAvatarId() { return mAvatarId; }
-
- /**
- * Sends update data request to server.
- */
- virtual void updateData() = 0;
-
- /**
- * Clears panel data if viewing avatar info for first time and sends update data request.
- */
- virtual void onOpen(const LLSD& key);
-
- /**
- * Profile tabs should close any opened panels here.
- *
- * Called from LLPanelProfile::onOpen() before opening new profile.
- * See LLPanelPicks::onClosePanel for example. LLPanelPicks closes picture info panel
- * before new profile is displayed, otherwise new profile will
- * be hidden behind picture info panel.
- */
- virtual void onClosePanel() {}
-
- /**
- * Resets controls visibility, state, etc.
- */
- virtual void resetControls(){};
-
- /**
- * Clears all data received from server.
- */
- virtual void resetData(){};
-
- /*virtual*/ ~LLPanelProfileTab();
-
-protected:
-
- LLPanelProfileTab();
-
- /**
- * Scrolls panel to top when viewing avatar info for first time.
- */
- void scrollToTop();
-
- virtual void onMapButtonClick();
-
- virtual void updateButtons();
-
-private:
-
- LLUUID mAvatarId;
-};
-
-/**
-* Panel for displaying Avatar's first and second life related info.
-*/
-class LLPanelAvatarProfile
- : public LLPanelProfileTab
- , public LLFriendObserver
- , public LLVoiceClientStatusObserver
-{
-public:
- LLPanelAvatarProfile();
- /*virtual*/ ~LLPanelAvatarProfile();
-
- /*virtual*/ void onOpen(const LLSD& key);
-
- /**
- * LLFriendObserver trigger
- */
- virtual void changed(U32 mask);
-
- // Implements LLVoiceClientStatusObserver::onChange() to enable the call
- // button when voice is available
- /*virtual*/ void onChange(EStatusType status, const std::string &channelURI, bool proximal);
-
- /*virtual*/ void setAvatarId(const LLUUID& id);
-
- /**
- * Processes data received from server.
- */
- /*virtual*/ void processProperties(void* data, EAvatarProcessorType type);
-
- /*virtual*/ BOOL postBuild();
-
- /*virtual*/ void updateData();
-
- /*virtual*/ void resetControls();
-
- /*virtual*/ void resetData();
-
-protected:
-
- /**
- * Process profile related data received from server.
- */
- virtual void processProfileProperties(const LLAvatarData* avatar_data);
-
- /**
- * Processes group related data received from server.
- */
- virtual void processGroupProperties(const LLAvatarGroups* avatar_groups);
-
- /**
- * Fills common for Avatar profile and My Profile fields.
- */
- virtual void fillCommonData(const LLAvatarData* avatar_data);
-
- /**
- * Fills partner data.
- */
- virtual void fillPartnerData(const LLAvatarData* avatar_data);
-
- /**
- * Fills account status.
- */
- virtual void fillAccountStatus(const LLAvatarData* avatar_data);
-
- /**
- * Opens "Pay Resident" dialog.
- */
- void pay();
-
- /**
- * opens inventory and IM for sharing items
- */
- void share();
-
- /**
- * Add/remove resident to/from your block list.
- */
- void toggleBlock();
-
- void kick();
- void freeze();
- void unfreeze();
- void csr();
-
- bool enableShowOnMap();
- bool enableBlock();
- bool enableUnblock();
- bool enableGod();
-
-
- void onAddFriendButtonClick();
- void onIMButtonClick();
- void onCallButtonClick();
- void onTeleportButtonClick();
- void onShareButtonClick();
-
-private:
-
- typedef std::map< std::string,LLUUID> group_map_t;
- group_map_t mGroups;
-};
-
-/**
- * Panel for displaying own first and second life related info.
- */
-class LLPanelMyProfile
- : public LLPanelAvatarProfile
-{
-public:
- LLPanelMyProfile();
-
- /*virtual*/ BOOL postBuild();
-
-protected:
-
- /*virtual*/ void onOpen(const LLSD& key);
-
- /*virtual*/ void processProfileProperties(const LLAvatarData* avatar_data);
-
- /*virtual*/ void resetControls();
-
-protected:
- void onStatusMessageChanged();
-};
-
-/**
- * Panel for displaying Avatar's notes and modifying friend's rights.
- */
-class LLPanelAvatarNotes
- : public LLPanelProfileTab
- , public LLFriendObserver
- , public LLVoiceClientStatusObserver
-{
-public:
- LLPanelAvatarNotes();
- /*virtual*/ ~LLPanelAvatarNotes();
-
- virtual void setAvatarId(const LLUUID& id);
-
- /**
- * LLFriendObserver trigger
- */
- virtual void changed(U32 mask);
-
- // Implements LLVoiceClientStatusObserver::onChange() to enable the call
- // button when voice is available
- /*virtual*/ void onChange(EStatusType status, const std::string &channelURI, bool proximal);
-
- /*virtual*/ void onOpen(const LLSD& key);
-
- /*virtual*/ BOOL postBuild();
-
- /*virtual*/ void processProperties(void* data, EAvatarProcessorType type);
-
- /*virtual*/ void updateData();
-
-protected:
-
- /*virtual*/ void resetControls();
-
- /*virtual*/ void resetData();
-
- /**
- * Fills rights data for friends.
- */
- void fillRightsData();
-
- void rightsConfirmationCallback(const LLSD& notification,
- const LLSD& response, S32 rights);
- void confirmModifyRights(bool grant, S32 rights);
- void onCommitRights();
- void onCommitNotes();
-
- void onAddFriendButtonClick();
- void onIMButtonClick();
- void onCallButtonClick();
- void onTeleportButtonClick();
- void onShareButtonClick();
- void enableCheckboxes(bool enable);
-};
-
-#endif // LL_LLPANELAVATAR_H
+/**
+ * @file llpanelavatar.h
+ * @brief LLPanelAvatar and related class definitions
+ *
+ * $LicenseInfo:firstyear=2004&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLPANELAVATAR_H
+#define LL_LLPANELAVATAR_H
+
+#include "llpanel.h"
+#include "llavatarpropertiesprocessor.h"
+#include "llcallingcard.h"
+#include "llvoiceclient.h"
+#include "llavatarnamecache.h"
+
+class LLComboBox;
+class LLLineEditor;
+
+enum EOnlineStatus
+{
+ ONLINE_STATUS_NO = 0,
+ ONLINE_STATUS_YES = 1
+};
+
+/**
+* Base class for any Profile View or My Profile Panel.
+*/
+class LLPanelProfileTab
+ : public LLPanel
+ , public LLAvatarPropertiesObserver
+{
+public:
+
+ /**
+ * Sets avatar ID, sets panel as observer of avatar related info replies from server.
+ */
+ virtual void setAvatarId(const LLUUID& id);
+
+ /**
+ * Returns avatar ID.
+ */
+ virtual const LLUUID& getAvatarId() { return mAvatarId; }
+
+ /**
+ * Sends update data request to server.
+ */
+ virtual void updateData() = 0;
+
+ /**
+ * Clears panel data if viewing avatar info for first time and sends update data request.
+ */
+ virtual void onOpen(const LLSD& key);
+
+ /**
+ * Profile tabs should close any opened panels here.
+ *
+ * Called from LLPanelProfile::onOpen() before opening new profile.
+ * See LLPanelPicks::onClosePanel for example. LLPanelPicks closes picture info panel
+ * before new profile is displayed, otherwise new profile will
+ * be hidden behind picture info panel.
+ */
+ virtual void onClosePanel() {}
+
+ /**
+ * Resets controls visibility, state, etc.
+ */
+ virtual void resetControls(){};
+
+ /**
+ * Clears all data received from server.
+ */
+ virtual void resetData(){};
+
+ /*virtual*/ ~LLPanelProfileTab();
+
+protected:
+
+ LLPanelProfileTab();
+
+ /**
+ * Scrolls panel to top when viewing avatar info for first time.
+ */
+ void scrollToTop();
+
+ virtual void onMapButtonClick();
+
+ virtual void updateButtons();
+
+private:
+
+ LLUUID mAvatarId;
+};
+
+/**
+* Panel for displaying Avatar's first and second life related info.
+*/
+class LLPanelAvatarProfile
+ : public LLPanelProfileTab
+ , public LLFriendObserver
+ , public LLVoiceClientStatusObserver
+{
+public:
+ LLPanelAvatarProfile();
+ /*virtual*/ ~LLPanelAvatarProfile();
+
+ /*virtual*/ void onOpen(const LLSD& key);
+
+ /**
+ * LLFriendObserver trigger
+ */
+ virtual void changed(U32 mask);
+
+ // Implements LLVoiceClientStatusObserver::onChange() to enable the call
+ // button when voice is available
+ /*virtual*/ void onChange(EStatusType status, const std::string &channelURI, bool proximal);
+
+ /*virtual*/ void setAvatarId(const LLUUID& id);
+
+ /**
+ * Processes data received from server.
+ */
+ /*virtual*/ void processProperties(void* data, EAvatarProcessorType type);
+
+ /*virtual*/ BOOL postBuild();
+
+ /*virtual*/ void updateData();
+
+ /*virtual*/ void resetControls();
+
+ /*virtual*/ void resetData();
+
+protected:
+
+ /**
+ * Process profile related data received from server.
+ */
+ virtual void processProfileProperties(const LLAvatarData* avatar_data);
+
+ /**
+ * Processes group related data received from server.
+ */
+ virtual void processGroupProperties(const LLAvatarGroups* avatar_groups);
+
+ /**
+ * Fills common for Avatar profile and My Profile fields.
+ */
+ virtual void fillCommonData(const LLAvatarData* avatar_data);
+
+ /**
+ * Fills partner data.
+ */
+ virtual void fillPartnerData(const LLAvatarData* avatar_data);
+
+ /**
+ * Fills account status.
+ */
+ virtual void fillAccountStatus(const LLAvatarData* avatar_data);
+
+ /**
+ * Opens "Pay Resident" dialog.
+ */
+ void pay();
+
+ /**
+ * opens inventory and IM for sharing items
+ */
+ void share();
+
+ /**
+ * Add/remove resident to/from your block list.
+ */
+ void toggleBlock();
+
+ void kick();
+ void freeze();
+ void unfreeze();
+ void csr();
+
+ bool enableShowOnMap();
+ bool enableBlock();
+ bool enableUnblock();
+ bool enableGod();
+
+ void onSeeProfileBtnClick();
+ void onAddFriendButtonClick();
+ void onIMButtonClick();
+ void onCallButtonClick();
+ void onTeleportButtonClick();
+ void onShareButtonClick();
+
+private:
+ void got_full_name_callback( const LLUUID& id, const std::string& full_name, bool is_group );
+ void onNameCache(const LLUUID& agent_id, const LLAvatarName& av_name);
+
+ typedef std::map< std::string,LLUUID> group_map_t;
+ group_map_t mGroups;
+};
+
+/**
+ * Panel for displaying own first and second life related info.
+ */
+class LLPanelMyProfile
+ : public LLPanelAvatarProfile
+{
+public:
+ LLPanelMyProfile();
+
+ /*virtual*/ BOOL postBuild();
+
+protected:
+
+ /*virtual*/ void onOpen(const LLSD& key);
+
+ /*virtual*/ void processProfileProperties(const LLAvatarData* avatar_data);
+
+ /*virtual*/ void resetControls();
+
+protected:
+ void onStatusMessageChanged();
+};
+
+/**
+ * Panel for displaying Avatar's notes and modifying friend's rights.
+ */
+class LLPanelAvatarNotes
+ : public LLPanelProfileTab
+ , public LLFriendObserver
+ , public LLVoiceClientStatusObserver
+{
+public:
+ LLPanelAvatarNotes();
+ /*virtual*/ ~LLPanelAvatarNotes();
+
+ virtual void setAvatarId(const LLUUID& id);
+
+ /**
+ * LLFriendObserver trigger
+ */
+ virtual void changed(U32 mask);
+
+ // Implements LLVoiceClientStatusObserver::onChange() to enable the call
+ // button when voice is available
+ /*virtual*/ void onChange(EStatusType status, const std::string &channelURI, bool proximal);
+
+ /*virtual*/ void onOpen(const LLSD& key);
+
+ /*virtual*/ BOOL postBuild();
+
+ /*virtual*/ void processProperties(void* data, EAvatarProcessorType type);
+
+ /*virtual*/ void updateData();
+
+protected:
+
+ /*virtual*/ void resetControls();
+
+ /*virtual*/ void resetData();
+
+ /**
+ * Fills rights data for friends.
+ */
+ void fillRightsData();
+
+ void rightsConfirmationCallback(const LLSD& notification,
+ const LLSD& response, S32 rights);
+ void confirmModifyRights(bool grant, S32 rights);
+ void onCommitRights();
+ void onCommitNotes();
+
+ void onAddFriendButtonClick();
+ void onIMButtonClick();
+ void onCallButtonClick();
+ void onTeleportButtonClick();
+ void onShareButtonClick();
+ void enableCheckboxes(bool enable);
+};
+
+#endif // LL_LLPANELAVATAR_H
diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp
index 87acd83b23..c57746ec00 100644
--- a/indra/newview/llpanellandmarkinfo.cpp
+++ b/indra/newview/llpanellandmarkinfo.cpp
@@ -180,6 +180,9 @@ void LLPanelLandmarkInfo::setInfoType(EInfoType type)
populateFoldersList();
+ // Prevent the floater from losing focus (if the sidepanel is undocked).
+ setFocus(TRUE);
+
LLPanelPlaceInfo::setInfoType(type);
}
@@ -330,6 +333,9 @@ void LLPanelLandmarkInfo::toggleLandmarkEditMode(BOOL enabled)
// when it was enabled/disabled we set the text once again.
mNotesEditor->setText(mNotesEditor->getText());
}
+
+ // Prevent the floater from losing focus (if the sidepanel is undocked).
+ setFocus(TRUE);
}
const std::string& LLPanelLandmarkInfo::getLandmarkTitle() const
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 347190da51..c143aff2d4 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -73,7 +73,6 @@
#endif // LL_WINDOWS
#include "llsdserialize.h"
-#define USE_VIEWER_AUTH 0
const S32 BLACK_BORDER_HEIGHT = 160;
const S32 MAX_PASSWORD = 16;
@@ -163,8 +162,6 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
mHtmlAvailable( TRUE ),
mListener(new LLPanelLoginListener(this))
{
- setFocusRoot(TRUE);
-
setBackgroundVisible(FALSE);
setBackgroundOpaque(TRUE);
@@ -181,18 +178,17 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
mPasswordModified = FALSE;
LLPanelLogin::sInstance = this;
- // add to front so we are the bottom-most child
- gViewerWindow->getRootView()->addChildInBack(this);
+ LLView* login_holder = gViewerWindow->getLoginPanelHolder();
+ if (login_holder)
+ {
+ login_holder->addChild(this);
+ }
// Logo
mLogoImage = LLUI::getUIImage("startup_logo");
buildFromFile( "panel_login.xml");
-#if USE_VIEWER_AUTH
- //leave room for the login menu bar
- setRect(LLRect(0, rect.getHeight()-18, rect.getWidth(), 0));
-#endif
// Legacy login web page is hidden under the menu bar.
// Adjust reg-in-client web browser widget to not be hidden.
if (gSavedSettings.getBOOL("RegInClient"))
@@ -204,16 +200,12 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
reshape(rect.getWidth(), rect.getHeight());
}
-#if !USE_VIEWER_AUTH
getChild<LLLineEditor>("password_edit")->setKeystrokeCallback(onPassKey, this);
// change z sort of clickable text to be behind buttons
//sendChildToBack(getChildView("channel_text"));
sendChildToBack(getChildView("forgot_password_text"));
- LLLineEditor* edit = getChild<LLLineEditor>("password_edit");
- if (edit) edit->setDrawAsterixes(TRUE);
-
if(LLStartUp::getStartSLURL().getType() != LLSLURL::LOCATION)
{
LLSLURL slurl(gSavedSettings.getString("LoginLocation"));
@@ -247,7 +239,6 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
LLTextBox* need_help_text = getChild<LLTextBox>("login_help");
need_help_text->setClickedCallback(onClickHelp, NULL);
-#endif
// get the web browser control
LLMediaCtrl* web_browser = getChild<LLMediaCtrl>("login_html");
@@ -330,15 +321,9 @@ void LLPanelLogin::reshapeBrowser()
LLMediaCtrl* web_browser = getChild<LLMediaCtrl>("login_html");
LLRect rect = gViewerWindow->getWindowRectScaled();
LLRect html_rect;
-#if USE_VIEWER_AUTH
- html_rect.setCenterAndSize(
- rect.getCenterX() - 2, rect.getCenterY(),
- rect.getWidth() + 6, rect.getHeight());
-#else
html_rect.setCenterAndSize(
rect.getCenterX() - 2, rect.getCenterY() + 40,
rect.getWidth() + 6, rect.getHeight() - 78 );
-#endif
web_browser->setRect( html_rect );
web_browser->reshape( html_rect.getWidth(), html_rect.getHeight(), TRUE );
reshape( rect.getWidth(), rect.getHeight(), 1 );
@@ -361,7 +346,6 @@ void LLPanelLogin::setSiteIsAlive( bool alive )
else
// the site is not available (missing page, server down, other badness)
{
-#if !USE_VIEWER_AUTH
if ( web_browser )
{
// hide browser control (revealing default one)
@@ -370,16 +354,6 @@ void LLPanelLogin::setSiteIsAlive( bool alive )
// mark as unavailable
mHtmlAvailable = FALSE;
}
-#else
-
- if ( web_browser )
- {
- web_browser->navigateToLocalPage( "loading-error" , "index.html" );
-
- // mark as available
- mHtmlAvailable = TRUE;
- }
-#endif
}
}
@@ -419,7 +393,6 @@ void LLPanelLogin::draw()
if ( mHtmlAvailable )
{
-#if !USE_VIEWER_AUTH
if (getChild<LLView>("login_widgets")->getVisible())
{
// draw a background box in black
@@ -428,7 +401,6 @@ void LLPanelLogin::draw()
// just the blue background to the native client UI
mLogoImage->draw(0, -264, width + 8, mLogoImage->getHeight());
}
-#endif
}
else
{
@@ -474,12 +446,6 @@ void LLPanelLogin::setFocus(BOOL b)
// static
void LLPanelLogin::giveFocus()
{
-#if USE_VIEWER_AUTH
- if (sInstance)
- {
- sInstance->setFocus(TRUE);
- }
-#else
if( sInstance )
{
// Grab focus and move cursor to first blank input field
@@ -513,17 +479,18 @@ void LLPanelLogin::giveFocus()
combo->setFocus(TRUE);
}
}
-#endif
}
// static
void LLPanelLogin::showLoginWidgets()
{
+ // *NOTE: Mani - This may or may not be obselete code.
+ // It seems to be part of the defunct? reg-in-client project.
sInstance->getChildView("login_widgets")->setVisible( true);
LLMediaCtrl* web_browser = sInstance->getChild<LLMediaCtrl>("login_html");
sInstance->reshapeBrowser();
// *TODO: Append all the usual login parameters, like first_login=Y etc.
- std::string splash_screen_url = sInstance->getString("real_url");
+ std::string splash_screen_url = LLGridManager::getInstance()->getLoginPage();
web_browser->navigateTo( splash_screen_url, "text/html" );
LLUICtrl* username_combo = sInstance->getChild<LLUICtrl>("username_combo");
username_combo->setFocus(TRUE);
@@ -823,7 +790,7 @@ void LLPanelLogin::closePanel()
{
if (sInstance)
{
- gViewerWindow->getRootView()->removeChild( LLPanelLogin::sInstance );
+ LLPanelLogin::sInstance->getParent()->removeChild( LLPanelLogin::sInstance );
delete sInstance;
sInstance = NULL;
@@ -894,73 +861,6 @@ void LLPanelLogin::loadLoginPage()
curl_free(curl_grid);
gViewerWindow->setMenuBackgroundColor(false, !LLGridManager::getInstance()->isInProductionGrid());
gLoginMenuBarView->setBackgroundColor(gMenuBarView->getBackgroundColor());
-
-
-#if USE_VIEWER_AUTH
- LLURLSimString::sInstance.parse();
-
- std::string location;
- std::string region;
- std::string password;
-
- if (LLURLSimString::parse())
- {
- std::ostringstream oRegionStr;
- location = "specify";
- oRegionStr << LLURLSimString::sInstance.mSimName << "/" << LLURLSimString::sInstance.mX << "/"
- << LLURLSimString::sInstance.mY << "/"
- << LLURLSimString::sInstance.mZ;
- region = oRegionStr.str();
- }
- else
- {
- location = gSavedSettings.getString("LoginLocation");
- }
-
- std::string username;
-
- if(gSavedSettings.getLLSD("UserLoginInfo").size() == 3)
- {
- LLSD cmd_line_login = gSavedSettings.getLLSD("UserLoginInfo");
- username = cmd_line_login[0].asString() + " " + cmd_line_login[1];
- password = cmd_line_login[2].asString();
- }
-
-
- char* curl_region = curl_escape(region.c_str(), 0);
-
- oStr <<"username=" << username <<
- "&location=" << location << "&region=" << curl_region;
-
- curl_free(curl_region);
-
- if (!password.empty())
- {
- oStr << "&password=" << password;
- }
- else if (!(password = load_password_from_disk()).empty())
- {
- oStr << "&password=$1$" << password;
- }
- if (gAutoLogin)
- {
- oStr << "&auto_login=TRUE";
- }
- if (gSavedSettings.getBOOL("ShowStartLocation"))
- {
- oStr << "&show_start_location=TRUE";
- }
- if (gSavedSettings.getBOOL("RememberPassword"))
- {
- oStr << "&remember_password=TRUE";
- }
-#ifndef LL_RELEASE_FOR_DOWNLOAD
- oStr << "&show_grid=TRUE";
-#else
- if (gSavedSettings.getBOOL("ForceShowGrid"))
- oStr << "&show_grid=TRUE";
-#endif
-#endif
LLMediaCtrl* web_browser = sInstance->getChild<LLMediaCtrl>("login_html");
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 17433a557b..c83176d980 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -506,9 +506,6 @@ void LLPanelMainInventory::onFilterSelected()
return;
}
- BOOL recent_active = ("Recent Items" == mActivePanel->getName());
- getChildView("add_btn_panel")->setVisible( !recent_active);
-
setFilterSubString(mFilterSubString);
LLInventoryFilter* filter = mActivePanel->getFilter();
LLFloaterInventoryFinder *finder = getFinder();
@@ -944,6 +941,11 @@ void LLPanelMainInventory::updateListCommands()
void LLPanelMainInventory::onAddButtonClick()
{
+// Gray out the "New Folder" option when the Recent tab is active as new folders will not be displayed
+// unless "Always show folders" is checked in the filter options.
+ bool recent_active = ("Recent Items" == mActivePanel->getName());
+ mMenuAdd->getChild<LLMenuItemGL>("New Folder")->setEnabled(!recent_active);
+
setUploadCostIfNeeded();
showActionMenu(mMenuAdd,"add_btn");
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index ce9b1c66d7..c10c21683b 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -186,14 +186,8 @@ private:
// Populate the menu with items like "New Skin", "New Pants", etc.
static void populateCreateWearableSubmenus(LLMenuGL* menu)
{
- LLView* menu_clothes = gMenuHolder->findChildView("COF.Gear.New_Clothes", FALSE);
- LLView* menu_bp = gMenuHolder->findChildView("COF.Geear.New_Body_Parts", FALSE);
-
- if (!menu_clothes || !menu_bp)
- {
- llassert(menu_clothes && menu_bp);
- return;
- }
+ LLView* menu_clothes = gMenuHolder->getChildView("COF.Gear.New_Clothes", FALSE);
+ LLView* menu_bp = gMenuHolder->getChildView("COF.Geear.New_Body_Parts", FALSE);
for (U8 i = LLWearableType::WT_SHAPE; i != (U8) LLWearableType::WT_COUNT; ++i)
{
diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp
index ccef563544..c4f3866cad 100644..100755
--- a/indra/newview/llpanelpicks.cpp
+++ b/indra/newview/llpanelpicks.cpp
@@ -70,6 +70,111 @@ static const std::string CLASSIFIED_NAME("classified_name");
static LLRegisterPanelClassWrapper<LLPanelPicks> t_panel_picks("panel_picks");
+class LLPickHandler : public LLCommandHandler,
+ public LLAvatarPropertiesObserver
+{
+public:
+
+ std::set<LLUUID> mPickIds;
+
+ // requires trusted browser to trigger
+ LLPickHandler() : LLCommandHandler("pick", UNTRUSTED_THROTTLE) { }
+
+ bool handle(const LLSD& params, const LLSD& query_map,
+ LLMediaCtrl* web)
+ {
+ // handle app/classified/create urls first
+ if (params.size() == 1 && params[0].asString() == "create")
+ {
+ createPick();
+ return true;
+ }
+
+ // then handle the general app/pick/{UUID}/{CMD} urls
+ if (params.size() < 2)
+ {
+ return false;
+ }
+
+ // get the ID for the pick_id
+ LLUUID pick_id;
+ if (!pick_id.set(params[0], FALSE))
+ {
+ return false;
+ }
+
+ // edit the pick in the side tray.
+ // need to ask the server for more info first though...
+ const std::string verb = params[1].asString();
+ if (verb == "edit")
+ {
+ mPickIds.insert(pick_id);
+ LLAvatarPropertiesProcessor::getInstance()->addObserver(LLUUID(), this);
+ LLAvatarPropertiesProcessor::getInstance()->sendPickInfoRequest(gAgent.getID(),pick_id);
+ return true;
+ }
+ else
+ {
+ llwarns << "unknown verb " << verb << llendl;
+ return false;
+ }
+ }
+
+ void createPick()
+ {
+ LLSD params;
+ params["id"] = gAgent.getID();
+ params["open_tab_name"] = "panel_picks";
+ params["show_tab_panel"] = "create_pick";
+ LLSideTray::getInstance()->showPanel("panel_me", params);
+ }
+
+ void editPick(LLPickData* pick_info)
+ {
+ LLSD params;
+ params["open_tab_name"] = "panel_picks";
+ params["show_tab_panel"] = "edit_pick";
+ params["pick_id"] = pick_info->pick_id;
+ params["avatar_id"] = pick_info->creator_id;
+ params["snapshot_id"] = pick_info->snapshot_id;
+ params["pick_name"] = pick_info->name;
+ params["pick_desc"] = pick_info->desc;
+
+ LLSideTray::getInstance()->showPanel("panel_me", params);
+ }
+
+ /*virtual*/ void processProperties(void* data, EAvatarProcessorType type)
+ {
+ if (APT_PICK_INFO != type)
+ {
+ return;
+ }
+
+ // is this the pick that we asked for?
+ LLPickData* pick_info = static_cast<LLPickData*>(data);
+ if (!pick_info || mPickIds.find(pick_info->pick_id) == mPickIds.end())
+ {
+ return;
+ }
+
+ // open the edit side tray for this pick
+ if (pick_info->creator_id == gAgent.getID())
+ {
+ editPick(pick_info);
+ }
+ else
+ {
+ llwarns << "Can't edit a pick you did not create" << llendl;
+ }
+
+ // remove our observer now that we're done
+ mPickIds.erase(pick_info->pick_id);
+ LLAvatarPropertiesProcessor::getInstance()->removeObserver(LLUUID(), this);
+ }
+};
+
+LLPickHandler gPickHandler;
+
class LLClassifiedHandler :
public LLCommandHandler,
public LLAvatarPropertiesObserver
@@ -80,6 +185,8 @@ public:
std::set<LLUUID> mClassifiedIds;
+ std::string mRequestVerb;
+
bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web)
{
// handle app/classified/create urls first
@@ -107,6 +214,15 @@ public:
const std::string verb = params[1].asString();
if (verb == "about")
{
+ mRequestVerb = verb;
+ mClassifiedIds.insert(classified_id);
+ LLAvatarPropertiesProcessor::getInstance()->addObserver(LLUUID(), this);
+ LLAvatarPropertiesProcessor::getInstance()->sendClassifiedInfoRequest(classified_id);
+ return true;
+ }
+ else if (verb == "edit")
+ {
+ mRequestVerb = verb;
mClassifiedIds.insert(classified_id);
LLAvatarPropertiesProcessor::getInstance()->addObserver(LLUUID(), this);
LLAvatarPropertiesProcessor::getInstance()->sendClassifiedInfoRequest(classified_id);
@@ -128,18 +244,39 @@ public:
void openClassified(LLAvatarClassifiedInfo* c_info)
{
- // open the classified info panel on the Me > Picks sidetray
- LLSD params;
- params["id"] = c_info->creator_id;
- params["open_tab_name"] = "panel_picks";
- params["show_tab_panel"] = "classified_details";
- params["classified_id"] = c_info->classified_id;
- params["classified_creator_id"] = c_info->creator_id;
- params["classified_snapshot_id"] = c_info->snapshot_id;
- params["classified_name"] = c_info->name;
- params["classified_desc"] = c_info->description;
- params["from_search"] = true;
- LLSideTray::getInstance()->showPanel("panel_profile_view", params);
+ if (mRequestVerb == "about")
+ {
+ // open the classified info panel on the Me > Picks sidetray
+ LLSD params;
+ params["id"] = c_info->creator_id;
+ params["open_tab_name"] = "panel_picks";
+ params["show_tab_panel"] = "classified_details";
+ params["classified_id"] = c_info->classified_id;
+ params["classified_creator_id"] = c_info->creator_id;
+ params["classified_snapshot_id"] = c_info->snapshot_id;
+ params["classified_name"] = c_info->name;
+ params["classified_desc"] = c_info->description;
+ params["from_search"] = true;
+ LLSideTray::getInstance()->showPanel("panel_profile_view", params);
+ }
+ else if (mRequestVerb == "edit")
+ {
+ if (c_info->creator_id == gAgent.getID())
+ {
+ llwarns << "edit in progress" << llendl;
+ // open the new classified panel on the Me > Picks sidetray
+ LLSD params;
+ params["id"] = gAgent.getID();
+ params["open_tab_name"] = "panel_picks";
+ params["show_tab_panel"] = "edit_classified";
+ params["classified_id"] = c_info->classified_id;
+ LLSideTray::getInstance()->showPanel("panel_me", params);
+ }
+ else
+ {
+ llwarns << "Can't edit a classified you did not create" << llendl;
+ }
+ }
}
/*virtual*/ void processProperties(void* data, EAvatarProcessorType type)
@@ -212,7 +349,8 @@ void LLPanelPicks::updateData()
mNoPicks = false;
mNoClassifieds = false;
- getChild<LLUICtrl>("picks_panel_text")->setValue(LLTrans::getString("PicksClassifiedsLoadingText"));
+ mNoItemsLabel->setValue(LLTrans::getString("PicksClassifiedsLoadingText"));
+ mNoItemsLabel->setVisible(TRUE);
mPicksList->clear();
LLAvatarPropertiesProcessor::getInstance()->sendAvatarPicksRequest(getAvatarId());
@@ -298,7 +436,10 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type)
pick_value.insert(CLASSIFIED_ID, c_data.classified_id);
pick_value.insert(CLASSIFIED_NAME, c_data.name);
- mClassifiedsList->addItem(c_item, pick_value);
+ if (!findClassifiedById(c_data.classified_id))
+ {
+ mClassifiedsList->addItem(c_item, pick_value);
+ }
c_item->setDoubleClickCallback(boost::bind(&LLPanelPicks::onDoubleClickClassifiedItem, this, _1));
c_item->setRightMouseUpCallback(boost::bind(&LLPanelPicks::onRightMouseUpItem, this, _1, _2, _3, _4));
@@ -314,15 +455,17 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type)
mNoClassifieds = !mClassifiedsList->size();
}
- if (mNoPicks && mNoClassifieds)
+ bool no_data = mNoPicks && mNoClassifieds;
+ mNoItemsLabel->setVisible(no_data);
+ if (no_data)
{
if(getAvatarId() == gAgentID)
{
- getChild<LLUICtrl>("picks_panel_text")->setValue(LLTrans::getString("NoPicksClassifiedsText"));
+ mNoItemsLabel->setValue(LLTrans::getString("NoPicksClassifiedsText"));
}
else
{
- getChild<LLUICtrl>("picks_panel_text")->setValue(LLTrans::getString("NoAvatarPicksClassifiedsText"));
+ mNoItemsLabel->setValue(LLTrans::getString("NoAvatarPicksClassifiedsText"));
}
}
}
@@ -359,6 +502,8 @@ BOOL LLPanelPicks::postBuild()
mPicksList->setNoItemsCommentText(getString("no_picks"));
mClassifiedsList->setNoItemsCommentText(getString("no_classifieds"));
+ mNoItemsLabel = getChild<LLUICtrl>("picks_panel_text");
+
childSetAction(XML_BTN_NEW, boost::bind(&LLPanelPicks::onClickPlusBtn, this));
childSetAction(XML_BTN_DELETE, boost::bind(&LLPanelPicks::onClickDelete, this));
childSetAction(XML_BTN_TELEPORT, boost::bind(&LLPanelPicks::onClickTeleport, this));
@@ -771,6 +916,13 @@ void LLPanelPicks::openClassifiedInfo(const LLSD &params)
getProfilePanel()->openPanel(mPanelClassifiedInfo, params);
}
+void LLPanelPicks::openClassifiedEdit(const LLSD& params)
+{
+ LLUUID classified_id = params["classified_id"].asUUID();;
+ llinfos << "opening classified " << classified_id << " for edit" << llendl;
+ editClassified(classified_id);
+}
+
void LLPanelPicks::showAccordion(const std::string& name, bool show)
{
LLAccordionCtrlTab* tab = getChild<LLAccordionCtrlTab>(name);
@@ -781,7 +933,7 @@ void LLPanelPicks::showAccordion(const std::string& name, bool show)
void LLPanelPicks::onPanelPickClose(LLPanel* panel)
{
- panel->setVisible(FALSE);
+ getProfilePanel()->closePanel(panel);
}
void LLPanelPicks::onPanelPickSave(LLPanel* panel)
@@ -940,6 +1092,12 @@ void LLPanelPicks::createPickEditPanel()
// getProfilePanel()->openPanel(mPanelPickInfo, params);
// }
+void LLPanelPicks::openPickEdit(const LLSD& params)
+{
+ createPickEditPanel();
+ getProfilePanel()->openPanel(mPanelPickEdit, params);
+}
+
void LLPanelPicks::onPanelPickEdit()
{
LLSD selected_value = mPicksList->getSelectedValue();
@@ -973,6 +1131,35 @@ void LLPanelPicks::onPanelClassifiedEdit()
{
return;
}
+ editClassified(c_item->getClassifiedId());
+}
+
+LLClassifiedItem *LLPanelPicks::findClassifiedById(const LLUUID& classified_id)
+{
+ // HACK - find item by classified id. Should be a better way.
+ std::vector<LLPanel*> items;
+ mClassifiedsList->getItems(items);
+ LLClassifiedItem* c_item = NULL;
+ for(std::vector<LLPanel*>::iterator it = items.begin(); it != items.end(); ++it)
+ {
+ LLClassifiedItem *test_item = dynamic_cast<LLClassifiedItem*>(*it);
+ if (test_item && test_item->getClassifiedId() == classified_id)
+ {
+ c_item = test_item;
+ break;
+ }
+ }
+ return c_item;
+}
+
+void LLPanelPicks::editClassified(const LLUUID& classified_id)
+{
+ LLClassifiedItem* c_item = findClassifiedById(classified_id);
+ if (!c_item)
+ {
+ llwarns << "item not found for classified_id " << classified_id << llendl;
+ return;
+ }
LLSD params;
params["classified_id"] = c_item->getClassifiedId();
diff --git a/indra/newview/llpanelpicks.h b/indra/newview/llpanelpicks.h
index 526ba48dcb..29db110523 100644..100755
--- a/indra/newview/llpanelpicks.h
+++ b/indra/newview/llpanelpicks.h
@@ -76,6 +76,7 @@ public:
// returns the selected pick item
LLPickItem* getSelectedPickItem();
LLClassifiedItem* getSelectedClassifiedItem();
+ LLClassifiedItem* findClassifiedById(const LLUUID& classified_id);
//*NOTE top down approch when panel toggling is done only by
// parent panels failed to work (picks related code was in my profile panel)
@@ -106,8 +107,10 @@ private:
void onPanelPickSave(LLPanel* panel);
void onPanelClassifiedSave(LLPanelClassifiedEdit* panel);
void onPanelClassifiedClose(LLPanelClassifiedInfo* panel);
+ void openPickEdit(const LLSD& params);
void onPanelPickEdit();
void onPanelClassifiedEdit();
+ void editClassified(const LLUUID& classified_id);
void onClickMenuEdit();
bool onEnableMenuItem(const LLSD& user_data);
@@ -118,6 +121,7 @@ private:
void openPickInfo();
void openClassifiedInfo();
void openClassifiedInfo(const LLSD& params);
+ void openClassifiedEdit(const LLSD& params);
friend class LLPanelProfile;
void showAccordion(const std::string& name, bool show);
@@ -149,6 +153,7 @@ private:
LLPanelClassifiedInfo* mPanelClassifiedInfo;
LLPanelPickEdit* mPanelPickEdit;
LLToggleableMenu* mPlusMenu;
+ LLUICtrl* mNoItemsLabel;
// <classified_id, edit_panel>
typedef std::map<LLUUID, LLPanelClassifiedEdit*> panel_classified_edit_map_t;
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index c524fd7059..00ac34efa5 100644
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -331,8 +331,7 @@ BOOL LLPanelPlaces::postBuild()
mPlaceProfileBackBtn = mPlaceProfile->getChild<LLButton>("back_btn");
mPlaceProfileBackBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onBackButtonClicked, this));
- mLandmarkInfoBackBtn = mLandmarkInfo->getChild<LLButton>("back_btn");
- mLandmarkInfoBackBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onBackButtonClicked, this));
+ mLandmarkInfo->getChild<LLButton>("back_btn")->setClickedCallback(boost::bind(&LLPanelPlaces::onBackButtonClicked, this));
LLLineEditor* title_editor = mLandmarkInfo->getChild<LLLineEditor>("title_editor");
title_editor->setKeystrokeCallback(boost::bind(&LLPanelPlaces::onEditButtonClicked, this), NULL);
@@ -348,8 +347,6 @@ BOOL LLPanelPlaces::postBuild()
void LLPanelPlaces::onOpen(const LLSD& key)
{
- LLFirstUse::notUsingDestinationGuide(false);
-
if (!mPlaceProfile || !mLandmarkInfo)
return;
@@ -385,12 +382,7 @@ void LLPanelPlaces::onOpen(const LLSD& key)
mLandmarkInfo->displayParcelInfo(LLUUID(), mPosGlobal);
- // Disabling "Save", "Close" and "Back" buttons to prevent closing "Create Landmark"
- // panel before created landmark is loaded.
- // These buttons will be enabled when created landmark is added to inventory.
mSaveBtn->setEnabled(FALSE);
- mCloseBtn->setEnabled(FALSE);
- mLandmarkInfoBackBtn->setEnabled(FALSE);
}
else if (mPlaceInfoType == LANDMARK_INFO_TYPE)
{
@@ -498,8 +490,6 @@ void LLPanelPlaces::setItem(LLInventoryItem* item)
mEditBtn->setEnabled(is_landmark_editable);
mSaveBtn->setEnabled(is_landmark_editable);
- mCloseBtn->setEnabled(TRUE);
- mLandmarkInfoBackBtn->setEnabled(TRUE);
if (is_landmark_editable)
{
@@ -763,6 +753,11 @@ void LLPanelPlaces::onOverflowButtonClicked()
// there is no landmark already pointing to that parcel in agent's inventory.
menu->getChild<LLMenuItemCallGL>("landmark")->setEnabled(is_agent_place_info_visible &&
!LLLandmarkActions::landmarkAlreadyExists());
+ // STORM-411
+ // Creating landmarks for remote locations is impossible.
+ // So hide menu item "Make a Landmark" in "Teleport History Profile" panel.
+ menu->setItemVisible("landmark", mPlaceInfoType != TELEPORT_HISTORY_INFO_TYPE);
+ menu->arrangeAndClear();
}
else if (mPlaceInfoType == LANDMARK_INFO_TYPE && mLandmarkMenu != NULL)
{
@@ -1129,13 +1124,6 @@ void LLPanelPlaces::updateVerbs()
{
mTeleportBtn->setEnabled(have_3d_pos);
}
-
- // Do not enable landmark info Back button when we are waiting
- // for newly created landmark to load.
- if (!is_create_landmark_visible)
- {
- mLandmarkInfoBackBtn->setEnabled(TRUE);
- }
}
else
{
diff --git a/indra/newview/llpanelplaces.h b/indra/newview/llpanelplaces.h
index 5523122a0f..b335f88a48 100644
--- a/indra/newview/llpanelplaces.h
+++ b/indra/newview/llpanelplaces.h
@@ -117,7 +117,6 @@ private:
LLToggleableMenu* mLandmarkMenu;
LLButton* mPlaceProfileBackBtn;
- LLButton* mLandmarkInfoBackBtn;
LLButton* mTeleportBtn;
LLButton* mShowOnMapBtn;
LLButton* mEditBtn;
diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp
index b04971f980..82ff6c3487 100644
--- a/indra/newview/llpanelprimmediacontrols.cpp
+++ b/indra/newview/llpanelprimmediacontrols.cpp
@@ -59,6 +59,7 @@
#include "llvovolume.h"
#include "llweb.h"
#include "llwindow.h"
+#include "llwindowshade.h"
#include "llfloatertools.h" // to enable hide if build tools are up
// Functions pulled from pipeline.cpp
@@ -90,7 +91,9 @@ LLPanelPrimMediaControls::LLPanelPrimMediaControls() :
mTargetObjectNormal(LLVector3::zero),
mZoomObjectID(LLUUID::null),
mZoomObjectFace(0),
- mVolumeSliderVisible(0)
+ mVolumeSliderVisible(0),
+ mWindowShade(NULL),
+ mHideImmediately(false)
{
mCommitCallbackRegistrar.add("MediaCtrl.Close", boost::bind(&LLPanelPrimMediaControls::onClickClose, this));
mCommitCallbackRegistrar.add("MediaCtrl.Back", boost::bind(&LLPanelPrimMediaControls::onClickBack, this));
@@ -205,6 +208,11 @@ BOOL LLPanelPrimMediaControls::postBuild()
mMediaAddress->setFocusReceivedCallback(boost::bind(&LLPanelPrimMediaControls::onInputURL, _1, this ));
+ gAgent.setMouselookModeInCallback(boost::bind(&LLPanelPrimMediaControls::onMouselookModeIn, this));
+
+ LLWindowShade::Params window_shade_params;
+ window_shade_params.name = "window_shade";
+
mCurrentZoom = ZOOM_NONE;
// clicks on buttons do not remove keyboard focus from media
setIsChrome(TRUE);
@@ -519,7 +527,7 @@ void LLPanelPrimMediaControls::updateShape()
if(LLPluginClassMediaOwner::MEDIA_LOADING == media_plugin->getStatus())
{
mMediaProgressPanel->setVisible(true);
- mMediaProgressBar->setPercent(media_plugin->getProgressPercent());
+ mMediaProgressBar->setValue(media_plugin->getProgressPercent());
}
else
{
@@ -620,12 +628,12 @@ void LLPanelPrimMediaControls::updateShape()
// convert screenspace bbox to pixels (in screen coords)
LLRect window_rect = gViewerWindow->getWorldViewRectScaled();
LLCoordGL screen_min;
- screen_min.mX = llround((F32)window_rect.getWidth() * (min.mV[VX] + 1.f) * 0.5f);
- screen_min.mY = llround((F32)window_rect.getHeight() * (min.mV[VY] + 1.f) * 0.5f);
+ screen_min.mX = llround((F32)window_rect.mLeft + (F32)window_rect.getWidth() * (min.mV[VX] + 1.f) * 0.5f);
+ screen_min.mY = llround((F32)window_rect.mBottom + (F32)window_rect.getHeight() * (min.mV[VY] + 1.f) * 0.5f);
LLCoordGL screen_max;
- screen_max.mX = llround((F32)window_rect.getWidth() * (max.mV[VX] + 1.f) * 0.5f);
- screen_max.mY = llround((F32)window_rect.getHeight() * (max.mV[VY] + 1.f) * 0.5f);
+ screen_max.mX = llround((F32)window_rect.mLeft + (F32)window_rect.getWidth() * (max.mV[VX] + 1.f) * 0.5f);
+ screen_max.mY = llround((F32)window_rect.mBottom + (F32)window_rect.getHeight() * (max.mV[VY] + 1.f) * 0.5f);
// grow panel so that screenspace bounding box fits inside "media_region" element of panel
LLRect media_panel_rect;
@@ -698,27 +706,41 @@ void LLPanelPrimMediaControls::updateShape()
/*virtual*/
void LLPanelPrimMediaControls::draw()
{
+ LLViewerMediaImpl* impl = getTargetMediaImpl();
+ if (impl)
+ {
+ LLNotificationPtr notification = impl->getCurrentNotification();
+ if (notification != mActiveNotification)
+ {
+ mActiveNotification = notification;
+ if (notification)
+ {
+ showNotification(notification);
+ }
+ else
+ {
+ hideNotification();
+ }
+ }
+ }
+
F32 alpha = getDrawContext().mAlpha;
- if(mFadeTimer.getStarted())
+ if(mHideImmediately)
+ {
+ //hide this panel
+ clearFaceOnFade();
+
+ mHideImmediately = false;
+ }
+ else if(mFadeTimer.getStarted())
{
F32 time = mFadeTimer.getElapsedTimeF32();
alpha *= llmax(lerp(1.0, 0.0, time / mControlFadeTime), 0.0f);
if(time >= mControlFadeTime)
{
- if(mClearFaceOnFade)
- {
- // Hiding this object makes scroll events go missing after it fades out
- // (see DEV-41755 for a full description of the train wreck).
- // Only hide the controls when we're untargeting.
- setVisible(FALSE);
-
- mClearFaceOnFade = false;
- mVolumeSliderVisible = 0;
- mTargetImplID = LLUUID::null;
- mTargetObjectID = LLUUID::null;
- mTargetObjectFace = 0;
- }
+ //hide this panel
+ clearFaceOnFade();
}
}
@@ -1295,3 +1317,62 @@ bool LLPanelPrimMediaControls::shouldVolumeSliderBeVisible()
{
return mVolumeSliderVisible > 0;
}
+
+
+void LLPanelPrimMediaControls::clearFaceOnFade()
+{
+ if(mClearFaceOnFade)
+ {
+ // Hiding this object makes scroll events go missing after it fades out
+ // (see DEV-41755 for a full description of the train wreck).
+ // Only hide the controls when we're untargeting.
+ setVisible(FALSE);
+
+ mClearFaceOnFade = false;
+ mVolumeSliderVisible = 0;
+ mTargetImplID = LLUUID::null;
+ mTargetObjectID = LLUUID::null;
+ mTargetObjectFace = 0;
+ }
+}
+
+void LLPanelPrimMediaControls::onMouselookModeIn()
+{
+ LLViewerMediaFocus::getInstance()->clearHover();
+ mHideImmediately = true;
+}
+
+void LLPanelPrimMediaControls::showNotification(LLNotificationPtr notify)
+{
+ delete mWindowShade;
+ LLWindowShade::Params params;
+ params.rect = mMediaRegion->getLocalRect();
+ params.follows.flags = FOLLOWS_ALL;
+ params.notification = notify;
+
+ //HACK: don't hardcode this
+ if (notify->getIcon() == "Popup_Caution")
+ {
+ params.bg_image.name = "Yellow_Gradient";
+ params.text_color = LLColor4::black;
+ }
+ else
+ {
+ //HACK: make this a property of the notification itself, "cancellable"
+ params.can_close = false;
+ params.text_color.control = "LabelTextColor";
+ }
+
+ mWindowShade = LLUICtrlFactory::create<LLWindowShade>(params);
+
+ mMediaRegion->addChild(mWindowShade);
+ mWindowShade->show();
+}
+
+void LLPanelPrimMediaControls::hideNotification()
+{
+ if (mWindowShade)
+ {
+ mWindowShade->hide();
+ }
+}
diff --git a/indra/newview/llpanelprimmediacontrols.h b/indra/newview/llpanelprimmediacontrols.h
index 3ec24f0e24..66956181f2 100644
--- a/indra/newview/llpanelprimmediacontrols.h
+++ b/indra/newview/llpanelprimmediacontrols.h
@@ -29,6 +29,7 @@
#include "llpanel.h"
#include "llviewermedia.h"
+#include "llnotificationptr.h"
class LLButton;
class LLCoordWindow;
@@ -37,6 +38,7 @@ class LLLayoutStack;
class LLProgressBar;
class LLSliderCtrl;
class LLViewerMediaImpl;
+class LLWindowShade;
class LLPanelPrimMediaControls : public LLPanel
{
@@ -54,6 +56,10 @@ public:
void updateShape();
bool isMouseOver();
+ void showNotification(LLNotificationPtr notify);
+ void hideNotification();
+
+
enum EZoomLevel
{
ZOOM_NONE = 0,
@@ -131,7 +137,11 @@ private:
LLPluginClassMedia* getTargetMediaPlugin();
private:
-
+
+ void clearFaceOnFade();
+
+ void onMouselookModeIn();
+
LLView *mMediaRegion;
LLUICtrl *mBackCtrl;
LLUICtrl *mFwdCtrl;
@@ -162,6 +172,7 @@ private:
LLUICtrl *mRightBookend;
LLUIImage* mBackgroundImage;
LLUIImage* mVolumeSliderBackgroundImage;
+ LLWindowShade* mWindowShade;
F32 mSkipStep;
S32 mMinWidth;
S32 mMinHeight;
@@ -179,6 +190,7 @@ private:
bool mPauseFadeout;
bool mUpdateSlider;
bool mClearFaceOnFade;
+ bool mHideImmediately;
LLMatrix4 mLastCameraMat;
EZoomLevel mCurrentZoom;
@@ -204,6 +216,8 @@ private:
S32 mZoomObjectFace;
S32 mVolumeSliderVisible;
+
+ LLNotificationPtr mActiveNotification;
};
#endif // LL_PANELPRIMMEDIACONTROLS_H
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index 4e63563979..4f13c0c022 100644..100755
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -33,10 +33,41 @@
#include "llcommandhandler.h"
#include "llpanelpicks.h"
#include "lltabcontainer.h"
+#include "llviewercontrol.h"
static const std::string PANEL_PICKS = "panel_picks";
static const std::string PANEL_PROFILE = "panel_profile";
+std::string getProfileURL(const std::string& agent_name)
+{
+ std::string url = gSavedSettings.getString("WebProfileURL");
+ LLSD subs;
+ subs["AGENT_NAME"] = agent_name;
+ url = LLWeb::expandURLSubstitutions(url,subs);
+ LLStringUtil::toLower(url);
+ return url;
+}
+
+class LLProfileHandler : public LLCommandHandler
+{
+public:
+ // requires trusted browser to trigger
+ LLProfileHandler() : LLCommandHandler("profile", UNTRUSTED_THROTTLE) { }
+
+ bool handle(const LLSD& params, const LLSD& query_map,
+ LLMediaCtrl* web)
+ {
+ if (params.size() < 1) return false;
+ std::string agent_name = params[0];
+ llinfos << "Profile, agent_name " << agent_name << llendl;
+ std::string url = getProfileURL(agent_name);
+ LLWeb::loadWebURLInternal(url);
+
+ return true;
+ }
+};
+LLProfileHandler gProfileHandler;
+
class LLAgentHandler : public LLCommandHandler
{
public:
@@ -114,11 +145,109 @@ public:
LLAgentHandler gAgentHandler;
+//-- LLPanelProfile::ChildStack begins ----------------------------------------
+LLPanelProfile::ChildStack::ChildStack()
+: mParent(NULL)
+{
+}
+
+void LLPanelProfile::ChildStack::setParent(LLPanel* parent)
+{
+ llassert_always(parent != NULL);
+ mParent = parent;
+}
+
+/// Save current parent's child views and remove them from the child list.
+bool LLPanelProfile::ChildStack::push()
+{
+ view_list_t vlist = *mParent->getChildList();
+
+ for (view_list_t::const_iterator it = vlist.begin(); it != vlist.end(); ++it)
+ {
+ LLView* viewp = *it;
+ mParent->removeChild(viewp);
+ }
+
+ mStack.push_back(vlist);
+ dump();
+ return true;
+}
+
+/// Restore saved children (adding them back to the child list).
+bool LLPanelProfile::ChildStack::pop()
+{
+ if (mStack.size() == 0)
+ {
+ llwarns << "Empty stack" << llendl;
+ llassert(mStack.size() == 0);
+ return false;
+ }
+
+ view_list_t& top = mStack.back();
+ for (view_list_t::const_iterator it = top.begin(); it != top.end(); ++it)
+ {
+ LLView* viewp = *it;
+ mParent->addChild(viewp);
+ }
+
+ mStack.pop_back();
+ dump();
+ return true;
+}
+
+/// Temporarily add all saved children back.
+void LLPanelProfile::ChildStack::preParentReshape()
+{
+ mSavedStack = mStack;
+ while(mStack.size() > 0)
+ {
+ pop();
+ }
+}
+
+/// Add the temporarily saved children back.
+void LLPanelProfile::ChildStack::postParentReshape()
+{
+ mStack = mSavedStack;
+ mSavedStack = stack_t();
+
+ for (stack_t::const_iterator stack_it = mStack.begin(); stack_it != mStack.end(); ++stack_it)
+ {
+ const view_list_t& vlist = (*stack_it);
+ for (view_list_t::const_iterator list_it = vlist.begin(); list_it != vlist.end(); ++list_it)
+ {
+ LLView* viewp = *list_it;
+ lldebugs << "removing " << viewp->getName() << llendl;
+ mParent->removeChild(viewp);
+ }
+ }
+}
+
+void LLPanelProfile::ChildStack::dump()
+{
+ unsigned lvl = 0;
+ lldebugs << "child stack dump:" << llendl;
+ for (stack_t::const_iterator stack_it = mStack.begin(); stack_it != mStack.end(); ++stack_it, ++lvl)
+ {
+ std::ostringstream dbg_line;
+ dbg_line << "lvl #" << lvl << ":";
+ const view_list_t& vlist = (*stack_it);
+ for (view_list_t::const_iterator list_it = vlist.begin(); list_it != vlist.end(); ++list_it)
+ {
+ dbg_line << " " << (*list_it)->getName();
+ }
+ lldebugs << dbg_line.str() << llendl;
+ }
+}
+
+//-- LLPanelProfile::ChildStack ends ------------------------------------------
+
LLPanelProfile::LLPanelProfile()
: LLPanel()
, mTabCtrl(NULL)
, mAvatarId(LLUUID::null)
{
+ mChildStack.setParent(this);
}
BOOL LLPanelProfile::postBuild()
@@ -136,6 +265,15 @@ BOOL LLPanelProfile::postBuild()
return TRUE;
}
+// virtual
+void LLPanelProfile::reshape(S32 width, S32 height, BOOL called_from_parent)
+{
+ // Temporarily add saved children back and reshape them.
+ mChildStack.preParentReshape();
+ LLPanel::reshape(width, height, called_from_parent);
+ mChildStack.postParentReshape();
+}
+
void LLPanelProfile::onOpen(const LLSD& key)
{
// open the desired panel
@@ -174,10 +312,39 @@ void LLPanelProfile::onOpen(const LLSD& key)
picks->openClassifiedInfo(params);
}
}
+ else if (panel == "edit_classified")
+ {
+ LLPanelPicks* picks = dynamic_cast<LLPanelPicks *>(getTabContainer()[PANEL_PICKS]);
+ if (picks)
+ {
+ LLSD params = key;
+ params.erase("show_tab_panel");
+ params.erase("open_tab_name");
+ picks->openClassifiedEdit(params);
+ }
+ }
+ else if (panel == "create_pick")
+ {
+ LLPanelPicks* picks = dynamic_cast<LLPanelPicks *>(getTabContainer()[PANEL_PICKS]);
+ if (picks)
+ {
+ picks->createNewPick();
+ }
+ }
+ else if (panel == "edit_pick")
+ {
+ LLPanelPicks* picks = dynamic_cast<LLPanelPicks *>(getTabContainer()[PANEL_PICKS]);
+ if (picks)
+ {
+ LLSD params = key;
+ params.erase("show_tab_panel");
+ params.erase("open_tab_name");
+ picks->openPickEdit(params);
+ }
+ }
}
}
-//*TODO redo panel toggling
void LLPanelProfile::togglePanel(LLPanel* panel, const LLSD& key)
{
// TRUE - we need to open/expand "panel"
@@ -204,19 +371,12 @@ void LLPanelProfile::onTabSelected(const LLSD& param)
}
}
-void LLPanelProfile::setAllChildrenVisible(BOOL visible)
-{
- const child_list_t* child_list = getChildList();
- child_list_const_iter_t child_it = child_list->begin();
- for (; child_it != child_list->end(); ++child_it)
- {
- LLView* viewp = *child_it;
- viewp->setVisible(visible);
- }
-}
-
void LLPanelProfile::openPanel(LLPanel* panel, const LLSD& params)
{
+ // Hide currently visible panel (STORM-690).
+ mChildStack.push();
+
+ // Add the panel or bring it to front.
if (panel->getParent() != this)
{
addChild(panel);
@@ -227,7 +387,7 @@ void LLPanelProfile::openPanel(LLPanel* panel, const LLSD& params)
}
panel->setVisible(TRUE);
-
+ panel->setFocus(TRUE); // prevent losing focus by the floater
panel->onOpen(params);
LLRect new_rect = getRect();
@@ -243,6 +403,20 @@ void LLPanelProfile::closePanel(LLPanel* panel)
if (panel->getParent() == this)
{
removeChild(panel);
+
+ // Make the underlying panel visible.
+ mChildStack.pop();
+
+ // Prevent losing focus by the floater
+ const child_list_t* child_list = getChildList();
+ if (child_list->size() > 0)
+ {
+ child_list->front()->setFocus(TRUE);
+ }
+ else
+ {
+ llwarns << "No underlying panel to focus." << llendl;
+ }
}
}
diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h
index d2bcee8076..fca359f51e 100644..100755
--- a/indra/newview/llpanelprofile.h
+++ b/indra/newview/llpanelprofile.h
@@ -32,6 +32,8 @@
class LLTabContainer;
+std::string getProfileURL(const std::string& agent_name);
+
/**
* Base class for Profile View and My Profile.
*/
@@ -41,7 +43,7 @@ class LLPanelProfile : public LLPanel
public:
/*virtual*/ BOOL postBuild();
-
+ /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
/*virtual*/ void onOpen(const LLSD& key);
virtual void togglePanel(LLPanel*, const LLSD& key = LLSD());
@@ -58,8 +60,6 @@ protected:
virtual void onTabSelected(const LLSD& param);
- virtual void setAllChildrenVisible(BOOL visible);
-
LLTabContainer* getTabCtrl() { return mTabCtrl; }
const LLUUID& getAvatarId() { return mAvatarId; }
@@ -72,8 +72,34 @@ protected:
private:
+ //-- ChildStack begins ----------------------------------------------------
+ class ChildStack
+ {
+ LOG_CLASS(LLPanelProfile::ChildStack);
+ public:
+ ChildStack();
+ void setParent(LLPanel* parent);
+
+ bool push();
+ bool pop();
+ void preParentReshape();
+ void postParentReshape();
+
+ private:
+ void dump();
+
+ typedef LLView::child_list_t view_list_t;
+ typedef std::list<view_list_t> stack_t;
+
+ stack_t mStack;
+ stack_t mSavedStack;
+ LLPanel* mParent;
+ };
+ //-- ChildStack ends ------------------------------------------------------
+
LLTabContainer* mTabCtrl;
profile_tabs_t mTabContainer;
+ ChildStack mChildStack;
LLUUID mAvatarId;
};
diff --git a/indra/newview/llpaneltopinfobar.cpp b/indra/newview/llpaneltopinfobar.cpp
index a9ca7314ce..30949f8f02 100644
--- a/indra/newview/llpaneltopinfobar.cpp
+++ b/indra/newview/llpaneltopinfobar.cpp
@@ -38,6 +38,7 @@
#include "llsidetray.h"
#include "llslurl.h"
#include "llstatusbar.h"
+#include "lltrans.h"
#include "llviewercontrol.h"
#include "llviewerinventory.h"
#include "llviewermenu.h"
@@ -102,6 +103,13 @@ void LLPanelTopInfoBar::initParcelIcons()
mParcelIcon[SCRIPTS_ICON] = getChild<LLIconCtrl>("scripts_icon");
mParcelIcon[DAMAGE_ICON] = getChild<LLIconCtrl>("damage_icon");
+ mParcelIcon[VOICE_ICON]->setToolTip(LLTrans::getString("LocationCtrlVoiceTooltip"));
+ mParcelIcon[FLY_ICON]->setToolTip(LLTrans::getString("LocationCtrlFlyTooltip"));
+ mParcelIcon[PUSH_ICON]->setToolTip(LLTrans::getString("LocationCtrlPushTooltip"));
+ mParcelIcon[BUILD_ICON]->setToolTip(LLTrans::getString("LocationCtrlBuildTooltip"));
+ mParcelIcon[SCRIPTS_ICON]->setToolTip(LLTrans::getString("LocationCtrlScriptsTooltip"));
+ mParcelIcon[DAMAGE_ICON]->setToolTip(LLTrans::getString("LocationCtrlDamageTooltip"));
+
mParcelIcon[VOICE_ICON]->setMouseDownCallback(boost::bind(&LLPanelTopInfoBar::onParcelIconClick, this, VOICE_ICON));
mParcelIcon[FLY_ICON]->setMouseDownCallback(boost::bind(&LLPanelTopInfoBar::onParcelIconClick, this, FLY_ICON));
mParcelIcon[PUSH_ICON]->setMouseDownCallback(boost::bind(&LLPanelTopInfoBar::onParcelIconClick, this, PUSH_ICON));
@@ -129,6 +137,7 @@ BOOL LLPanelTopInfoBar::postBuild()
{
mInfoBtn = getChild<LLButton>("place_info_btn");
mInfoBtn->setClickedCallback(boost::bind(&LLPanelTopInfoBar::onInfoButtonClicked, this));
+ mInfoBtn->setToolTip(LLTrans::getString("LocationCtrlInfoBtnTooltip"));
mParcelInfoText = getChild<LLTextBox>("parcel_info_text");
mDamageText = getChild<LLTextBox>("damage_text");
diff --git a/indra/newview/llpopupview.cpp b/indra/newview/llpopupview.cpp
index 499b6a8f5f..9fbb67a63a 100644
--- a/indra/newview/llpopupview.cpp
+++ b/indra/newview/llpopupview.cpp
@@ -40,7 +40,8 @@ bool view_visible(LLView* viewp)
}
-LLPopupView::LLPopupView()
+LLPopupView::LLPopupView(const LLPopupView::Params& p)
+: LLPanel(p)
{
// register ourself as handler of UI popups
LLUI::setPopupFuncs(boost::bind(&LLPopupView::addPopup, this, _1), boost::bind(&LLPopupView::removePopup, this, _1), boost::bind(&LLPopupView::clearPopups, this));
@@ -137,64 +138,102 @@ BOOL LLPopupView::handleMouseEvent(boost::function<BOOL(LLView*, S32, S32)> func
BOOL LLPopupView::handleMouseDown(S32 x, S32 y, MASK mask)
{
- if (!handleMouseEvent(boost::bind(&LLMouseHandler::handleMouseDown, _1, _2, _3, mask), view_visible_and_enabled, x, y, true))
+ BOOL handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleMouseDown, _1, _2, _3, mask), view_visible_and_enabled, x, y, true);
+ if (!handled)
{
- return FALSE;
+ handled = LLPanel::handleMouseDown(x, y, mask);
}
- return TRUE;
+ return handled;
}
BOOL LLPopupView::handleMouseUp(S32 x, S32 y, MASK mask)
{
- return handleMouseEvent(boost::bind(&LLMouseHandler::handleMouseUp, _1, _2, _3, mask), view_visible_and_enabled, x, y, false);
+ BOOL handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleMouseUp, _1, _2, _3, mask), view_visible_and_enabled, x, y, false);
+ if (!handled)
+ {
+ handled = LLPanel::handleMouseUp(x, y, mask);
+ }
+ return handled;
}
BOOL LLPopupView::handleMiddleMouseDown(S32 x, S32 y, MASK mask)
{
- if (!handleMouseEvent(boost::bind(&LLMouseHandler::handleMiddleMouseDown, _1, _2, _3, mask), view_visible_and_enabled, x, y, true))
+ BOOL handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleMiddleMouseDown, _1, _2, _3, mask), view_visible_and_enabled, x, y, true);
+ if (!handled)
{
- return FALSE;
+ handled = LLPanel::handleMiddleMouseDown(x, y, mask);
}
- return TRUE;
+ return handled;
}
BOOL LLPopupView::handleMiddleMouseUp(S32 x, S32 y, MASK mask)
{
- return handleMouseEvent(boost::bind(&LLMouseHandler::handleMiddleMouseUp, _1, _2, _3, mask), view_visible_and_enabled, x, y, false);
+ BOOL handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleMiddleMouseUp, _1, _2, _3, mask), view_visible_and_enabled, x, y, false);
+ if (!handled)
+ {
+ handled = LLPanel::handleMiddleMouseUp(x, y, mask);
+ }
+ return handled;
}
BOOL LLPopupView::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
- if (!handleMouseEvent(boost::bind(&LLMouseHandler::handleRightMouseDown, _1, _2, _3, mask), view_visible_and_enabled, x, y, true))
+ BOOL handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleRightMouseDown, _1, _2, _3, mask), view_visible_and_enabled, x, y, true);
+ if (!handled)
{
- return FALSE;
+ handled = LLPanel::handleRightMouseDown(x, y, mask);
}
- return TRUE;
+ return handled;
}
BOOL LLPopupView::handleRightMouseUp(S32 x, S32 y, MASK mask)
{
- return handleMouseEvent(boost::bind(&LLMouseHandler::handleRightMouseUp, _1, _2, _3, mask), view_visible_and_enabled, x, y, false);
+ BOOL handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleRightMouseUp, _1, _2, _3, mask), view_visible_and_enabled, x, y, false);
+ if (!handled)
+ {
+ handled = LLPanel::handleRightMouseUp(x, y, mask);
+ }
+ return handled;
}
BOOL LLPopupView::handleDoubleClick(S32 x, S32 y, MASK mask)
{
- return handleMouseEvent(boost::bind(&LLMouseHandler::handleDoubleClick, _1, _2, _3, mask), view_visible_and_enabled, x, y, false);
+ BOOL handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleDoubleClick, _1, _2, _3, mask), view_visible_and_enabled, x, y, false);
+ if (!handled)
+ {
+ handled = LLPanel::handleDoubleClick(x, y, mask);
+ }
+ return handled;
}
BOOL LLPopupView::handleHover(S32 x, S32 y, MASK mask)
{
- return handleMouseEvent(boost::bind(&LLMouseHandler::handleHover, _1, _2, _3, mask), view_visible_and_enabled, x, y, false);
+ BOOL handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleHover, _1, _2, _3, mask), view_visible_and_enabled, x, y, false);
+ if (!handled)
+ {
+ handled = LLPanel::handleHover(x, y, mask);
+ }
+ return handled;
}
BOOL LLPopupView::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
- return handleMouseEvent(boost::bind(&LLMouseHandler::handleScrollWheel, _1, _2, _3, clicks), view_visible_and_enabled, x, y, false);
+ BOOL handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleScrollWheel, _1, _2, _3, clicks), view_visible_and_enabled, x, y, false);
+ if (!handled)
+ {
+ handled = LLPanel::handleScrollWheel(x, y, clicks);
+ }
+ return handled;
}
BOOL LLPopupView::handleToolTip(S32 x, S32 y, MASK mask)
{
- return handleMouseEvent(boost::bind(&LLMouseHandler::handleToolTip, _1, _2, _3, mask), view_visible, x, y, false);
+ BOOL handled = handleMouseEvent(boost::bind(&LLMouseHandler::handleToolTip, _1, _2, _3, mask), view_visible, x, y, false);
+ if (!handled)
+ {
+ handled = LLPanel::handleToolTip(x, y, mask);
+ }
+ return handled;
}
void LLPopupView::addPopup(LLView* popup)
diff --git a/indra/newview/llpopupview.h b/indra/newview/llpopupview.h
index fec4afd79c..b378f61984 100644
--- a/indra/newview/llpopupview.h
+++ b/indra/newview/llpopupview.h
@@ -32,7 +32,7 @@
class LLPopupView : public LLPanel
{
public:
- LLPopupView();
+ LLPopupView(const Params& p = LLPanel::Params());
~LLPopupView();
/*virtual*/ void draw();
diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp
index 69542764d2..a90f23d637 100644
--- a/indra/newview/llpreview.cpp
+++ b/indra/newview/llpreview.cpp
@@ -454,12 +454,13 @@ LLMultiPreview::LLMultiPreview()
{
// start with a rect in the top-left corner ; will get resized
LLRect rect;
- rect.setLeftTopAndSize(0, gViewerWindow->getWindowHeightScaled(), 200, 200);
+ rect.setLeftTopAndSize(0, gViewerWindow->getWindowHeightScaled(), 200, 400);
setRect(rect);
}
setTitle(LLTrans::getString("MultiPreviewTitle"));
buildTabContainer();
setCanResize(TRUE);
+ mAutoResize = FALSE;
}
void LLMultiPreview::onOpen(const LLSD& key)
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index 330e809c53..22ff362b5a 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -123,7 +123,9 @@ static bool have_script_upload_cap(LLUUID& object_id)
class LLLiveLSLFile : public LLLiveFile
{
public:
- LLLiveLSLFile(std::string file_path, LLLiveLSLEditor* parent);
+ typedef boost::function<bool (const std::string& filename)> change_callback_t;
+
+ LLLiveLSLFile(std::string file_path, change_callback_t change_cb);
~LLLiveLSLFile();
void ignoreNextUpdate() { mIgnoreNextUpdate = true; }
@@ -131,15 +133,16 @@ public:
protected:
/*virtual*/ bool loadFile();
- LLLiveLSLEditor* mParent;
+ change_callback_t mOnChangeCallback;
bool mIgnoreNextUpdate;
};
-LLLiveLSLFile::LLLiveLSLFile(std::string file_path, LLLiveLSLEditor* parent)
-: mParent(parent)
+LLLiveLSLFile::LLLiveLSLFile(std::string file_path, change_callback_t change_cb)
+: mOnChangeCallback(change_cb)
, mIgnoreNextUpdate(false)
, LLLiveFile(file_path, 1.0)
{
+ llassert(mOnChangeCallback);
}
LLLiveLSLFile::~LLLiveLSLFile()
@@ -155,14 +158,7 @@ bool LLLiveLSLFile::loadFile()
return true;
}
- if (!mParent->loadScriptText(filename()))
- {
- return false;
- }
-
- // Disable sync to avoid recursive load->save->load calls.
- mParent->saveIfNeeded(false);
- return true;
+ return mOnChangeCallback(filename());
}
/// ---------------------------------------------------------------------------
@@ -327,11 +323,11 @@ struct LLSECKeywordCompare
};
LLScriptEdCore::LLScriptEdCore(
+ LLScriptEdContainer* container,
const std::string& sample,
const LLHandle<LLFloater>& floater_handle,
void (*load_callback)(void*),
void (*save_callback)(void*, BOOL),
- void (*edit_callback)(void*),
void (*search_replace_callback) (void* userdata),
void* userdata,
S32 bottom_pad)
@@ -341,19 +337,21 @@ LLScriptEdCore::LLScriptEdCore(
mEditor( NULL ),
mLoadCallback( load_callback ),
mSaveCallback( save_callback ),
- mEditCallback( edit_callback ),
mSearchReplaceCallback( search_replace_callback ),
mUserdata( userdata ),
mForceClose( FALSE ),
mLastHelpToken(NULL),
mLiveHelpHistorySize(0),
mEnableSave(FALSE),
+ mLiveFile(NULL),
+ mContainer(container),
mHasScriptData(FALSE)
{
setFollowsAll();
setBorderVisible(FALSE);
setXMLFilename("panel_script_ed.xml");
+ llassert_always(mContainer != NULL);
}
LLScriptEdCore::~LLScriptEdCore()
@@ -367,6 +365,8 @@ LLScriptEdCore::~LLScriptEdCore()
script_search->closeFloater();
delete script_search;
}
+
+ delete mLiveFile;
}
BOOL LLScriptEdCore::postBuild()
@@ -381,7 +381,7 @@ BOOL LLScriptEdCore::postBuild()
childSetCommitCallback("lsl errors", &LLScriptEdCore::onErrorList, this);
childSetAction("Save_btn", boost::bind(&LLScriptEdCore::doSave,this,FALSE));
- childSetAction("Edit_btn", boost::bind(&LLScriptEdCore::onEditButtonClick, this));
+ childSetAction("Edit_btn", boost::bind(&LLScriptEdCore::openInExternalEditor, this));
initMenu();
@@ -514,6 +514,79 @@ void LLScriptEdCore::setScriptText(const std::string& text, BOOL is_valid)
}
}
+bool LLScriptEdCore::loadScriptText(const std::string& filename)
+{
+ if (filename.empty())
+ {
+ llwarns << "Empty file name" << llendl;
+ return false;
+ }
+
+ LLFILE* file = LLFile::fopen(filename, "rb"); /*Flawfinder: ignore*/
+ if (!file)
+ {
+ llwarns << "Error opening " << filename << llendl;
+ return false;
+ }
+
+ // read in the whole file
+ fseek(file, 0L, SEEK_END);
+ size_t file_length = (size_t) ftell(file);
+ fseek(file, 0L, SEEK_SET);
+ char* buffer = new char[file_length+1];
+ size_t nread = fread(buffer, 1, file_length, file);
+ if (nread < file_length)
+ {
+ llwarns << "Short read" << llendl;
+ }
+ buffer[nread] = '\0';
+ fclose(file);
+
+ mEditor->setText(LLStringExplicit(buffer));
+ delete[] buffer;
+
+ return true;
+}
+
+bool LLScriptEdCore::writeToFile(const std::string& filename)
+{
+ LLFILE* fp = LLFile::fopen(filename, "wb");
+ if (!fp)
+ {
+ llwarns << "Unable to write to " << filename << llendl;
+
+ LLSD row;
+ row["columns"][0]["value"] = "Error writing to local file. Is your hard drive full?";
+ row["columns"][0]["font"] = "SANSSERIF_SMALL";
+ mErrorList->addElement(row);
+ return false;
+ }
+
+ std::string utf8text = mEditor->getText();
+
+ // Special case for a completely empty script - stuff in one space so it can store properly. See SL-46889
+ if (utf8text.size() == 0)
+ {
+ utf8text = " ";
+ }
+
+ fputs(utf8text.c_str(), fp);
+ fclose(fp);
+ return true;
+}
+
+void LLScriptEdCore::sync()
+{
+ // Sync with external editor.
+ std::string tmp_file = mContainer->getTmpFileName();
+ llstat s;
+ if (LLFile::stat(tmp_file, &s) == 0) // file exists
+ {
+ if (mLiveFile) mLiveFile->ignoreNextUpdate();
+ writeToFile(tmp_file);
+ }
+}
+
bool LLScriptEdCore::hasChanged()
{
if (!mEditor) return false;
@@ -690,6 +763,12 @@ BOOL LLScriptEdCore::canClose()
}
}
+void LLScriptEdCore::setEnableEditing(bool enable)
+{
+ mEditor->setEnabled(enable);
+ getChildView("Edit_btn")->setEnabled(enable);
+}
+
bool LLScriptEdCore::handleSaveChangesDialog(const LLSD& notification, const LLSD& response )
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
@@ -862,11 +941,31 @@ void LLScriptEdCore::doSave( BOOL close_after_save )
}
}
-void LLScriptEdCore::onEditButtonClick()
+void LLScriptEdCore::openInExternalEditor()
{
- if (mEditCallback)
+ delete mLiveFile; // deletes file
+
+ // Save the script to a temporary file.
+ std::string filename = mContainer->getTmpFileName();
+ writeToFile(filename);
+
+ // Start watching file changes.
+ mLiveFile = new LLLiveLSLFile(filename, boost::bind(&LLScriptEdContainer::onExternalChange, mContainer, _1));
+ mLiveFile->addToEventTimer();
+
+ // Open it in external editor.
{
- mEditCallback(mUserdata);
+ LLExternalEditor ed;
+
+ if (!ed.setCommand("LL_SCRIPT_EDITOR"))
+ {
+ std::string msg = "Select an editor by setting the environment variable LL_SCRIPT_EDITOR "
+ "or the ExternalEditor setting"; // *TODO: localize
+ LLNotificationsUtil::add("GenericAlert", LLSD().with("MESSAGE", msg));
+ return;
+ }
+
+ ed.run(filename);
}
}
@@ -983,6 +1082,43 @@ BOOL LLScriptEdCore::handleKeyHere(KEY key, MASK mask)
}
/// ---------------------------------------------------------------------------
+/// LLScriptEdContainer
+/// ---------------------------------------------------------------------------
+
+LLScriptEdContainer::LLScriptEdContainer(const LLSD& key)
+: LLPreview(key)
+, mScriptEd(NULL)
+{
+}
+
+std::string LLScriptEdContainer::getTmpFileName()
+{
+ // Take script inventory item id (within the object inventory)
+ // to consideration so that it's possible to edit multiple scripts
+ // in the same object inventory simultaneously (STORM-781).
+ std::string script_id = mObjectUUID.asString() + "_" + mItemUUID.asString();
+
+ // Use MD5 sum to make the file name shorter and not exceed maximum path length.
+ char script_id_hash_str[33]; /* Flawfinder: ignore */
+ LLMD5 script_id_hash((const U8 *)script_id.c_str());
+ script_id_hash.hex_digest(script_id_hash_str);
+
+ return std::string(LLFile::tmpdir()) + "sl_script_" + script_id_hash_str + ".lsl";
+}
+
+bool LLScriptEdContainer::onExternalChange(const std::string& filename)
+{
+ if (!mScriptEd->loadScriptText(filename))
+ {
+ return false;
+ }
+
+ // Disable sync to avoid recursive load->save->load calls.
+ saveIfNeeded(false);
+ return true;
+}
+
+/// ---------------------------------------------------------------------------
/// LLPreviewLSL
/// ---------------------------------------------------------------------------
@@ -1005,11 +1141,11 @@ void* LLPreviewLSL::createScriptEdPanel(void* userdata)
LLPreviewLSL *self = (LLPreviewLSL*)userdata;
self->mScriptEd = new LLScriptEdCore(
+ self,
HELLO_LSL,
self->getHandle(),
LLPreviewLSL::onLoad,
LLPreviewLSL::onSave,
- NULL, // no edit callback
LLPreviewLSL::onSearchReplace,
self,
0);
@@ -1019,7 +1155,7 @@ void* LLPreviewLSL::createScriptEdPanel(void* userdata)
LLPreviewLSL::LLPreviewLSL(const LLSD& key )
- : LLPreview( key ),
+: LLScriptEdContainer(key),
mPendingUploads(0)
{
mFactoryMap["script panel"] = LLCallbackMap(LLPreviewLSL::createScriptEdPanel, this);
@@ -1110,7 +1246,6 @@ void LLPreviewLSL::loadAsset()
{
mScriptEd->setScriptText(mScriptEd->getString("can_not_view"), FALSE);
mScriptEd->mEditor->makePristine();
- mScriptEd->mEditor->setEnabled(FALSE);
mScriptEd->mFunctions->setEnabled(FALSE);
mAssetStatus = PREVIEW_ASSET_LOADED;
}
@@ -1120,6 +1255,7 @@ void LLPreviewLSL::loadAsset()
else
{
mScriptEd->setScriptText(std::string(HELLO_LSL), TRUE);
+ mScriptEd->setEnableEditing(TRUE);
mAssetStatus = PREVIEW_ASSET_LOADED;
}
}
@@ -1166,7 +1302,7 @@ void LLPreviewLSL::onSave(void* userdata, BOOL close_after_save)
// Save needs to compile the text in the buffer. If the compile
// succeeds, then save both assets out to the database. If the compile
// fails, go ahead and save the text anyway.
-void LLPreviewLSL::saveIfNeeded()
+void LLPreviewLSL::saveIfNeeded(bool sync /*= true*/)
{
// llinfos << "LLPreviewLSL::saveIfNeeded()" << llendl;
if(!mScriptEd->hasChanged())
@@ -1185,23 +1321,13 @@ void LLPreviewLSL::saveIfNeeded()
std::string filepath = gDirUtilp->getExpandedFilename(LL_PATH_CACHE,asset_id.asString());
std::string filename = filepath + ".lsl";
- LLFILE* fp = LLFile::fopen(filename, "wb");
- if(!fp)
- {
- llwarns << "Unable to write to " << filename << llendl;
+ mScriptEd->writeToFile(filename);
- LLSD row;
- row["columns"][0]["value"] = "Error writing to local file. Is your hard drive full?";
- row["columns"][0]["font"] = "SANSSERIF_SMALL";
- mScriptEd->mErrorList->addElement(row);
- return;
+ if (sync)
+ {
+ mScriptEd->sync();
}
- std::string utf8text = mScriptEd->mEditor->getText();
- fputs(utf8text.c_str(), fp);
- fclose(fp);
- fp = NULL;
-
const LLInventoryItem *inv_item = getItem();
// save it out to asset server
std::string url = gAgent.getRegion()->getCapability("UpdateScriptAgent");
@@ -1433,7 +1559,7 @@ void LLPreviewLSL::onLoadComplete( LLVFS *vfs, const LLUUID& asset_uuid, LLAsset
{
is_modifiable = TRUE;
}
- preview->mScriptEd->mEditor->setEnabled(is_modifiable);
+ preview->mScriptEd->setEnableEditing(is_modifiable);
preview->mAssetStatus = PREVIEW_ASSET_LOADED;
}
else
@@ -1474,11 +1600,11 @@ void* LLLiveLSLEditor::createScriptEdPanel(void* userdata)
LLLiveLSLEditor *self = (LLLiveLSLEditor*)userdata;
self->mScriptEd = new LLScriptEdCore(
+ self,
HELLO_LSL,
self->getHandle(),
&LLLiveLSLEditor::onLoad,
&LLLiveLSLEditor::onSave,
- &LLLiveLSLEditor::onEdit,
&LLLiveLSLEditor::onSearchReplace,
self,
0);
@@ -1488,14 +1614,12 @@ void* LLLiveLSLEditor::createScriptEdPanel(void* userdata)
LLLiveLSLEditor::LLLiveLSLEditor(const LLSD& key) :
- LLPreview(key),
- mScriptEd(NULL),
+ LLScriptEdContainer(key),
mAskedForRunningInfo(FALSE),
mHaveRunningInfo(FALSE),
mCloseAfterSave(FALSE),
mPendingUploads(0),
mIsModifiable(FALSE),
- mLiveFile(NULL),
mIsNew(false)
{
mFactoryMap["script ed panel"] = LLCallbackMap(LLLiveLSLEditor::createScriptEdPanel, this);
@@ -1519,11 +1643,6 @@ BOOL LLLiveLSLEditor::postBuild()
return LLPreview::postBuild();
}
-LLLiveLSLEditor::~LLLiveLSLEditor()
-{
- delete mLiveFile;
-}
-
// virtual
void LLLiveLSLEditor::callbackLSLCompileSucceeded(const LLUUID& task_id,
const LLUUID& item_id,
@@ -1580,7 +1699,6 @@ void LLLiveLSLEditor::loadAsset()
mItem = new LLViewerInventoryItem(item);
mScriptEd->setScriptText(getString("not_allowed"), FALSE);
mScriptEd->mEditor->makePristine();
- mScriptEd->mEditor->setEnabled(FALSE);
mScriptEd->enableSave(FALSE);
mAssetStatus = PREVIEW_ASSET_LOADED;
}
@@ -1618,10 +1736,6 @@ void LLLiveLSLEditor::loadAsset()
mIsModifiable = item && gAgent.allowOperation(PERM_MODIFY,
item->getPermissions(),
GP_OBJECT_MANIPULATE);
- if(!mIsModifiable)
- {
- mScriptEd->mEditor->setEnabled(FALSE);
- }
// This is commented out, because we don't completely
// handle script exports yet.
@@ -1677,6 +1791,7 @@ void LLLiveLSLEditor::onLoadComplete(LLVFS *vfs, const LLUUID& asset_id,
if( LL_ERR_NOERR == status )
{
instance->loadScriptText(vfs, asset_id, type);
+ instance->mScriptEd->setEnableEditing(TRUE);
instance->mAssetStatus = PREVIEW_ASSET_LOADED;
}
else
@@ -1703,40 +1818,6 @@ void LLLiveLSLEditor::onLoadComplete(LLVFS *vfs, const LLUUID& asset_id,
delete xored_id;
}
- bool LLLiveLSLEditor::loadScriptText(const std::string& filename)
- {
- if (filename.empty())
- {
- llwarns << "Empty file name" << llendl;
- return false;
- }
-
- LLFILE* file = LLFile::fopen(filename, "rb"); /*Flawfinder: ignore*/
- if (!file)
- {
- llwarns << "Error opening " << filename << llendl;
- return false;
- }
-
- // read in the whole file
- fseek(file, 0L, SEEK_END);
- size_t file_length = (size_t) ftell(file);
- fseek(file, 0L, SEEK_SET);
- char* buffer = new char[file_length+1];
- size_t nread = fread(buffer, 1, file_length, file);
- if (nread < file_length)
- {
- llwarns << "Short read" << llendl;
- }
- buffer[nread] = '\0';
- fclose(file);
- mScriptEd->mEditor->setText(LLStringExplicit(buffer));
- //mScriptEd->mEditor->makePristine();
- delete[] buffer;
-
- return true;
- }
-
void LLLiveLSLEditor::loadScriptText(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType type)
{
LLVFile file(vfs, uuid, type);
@@ -1890,7 +1971,8 @@ LLLiveLSLSaveData::LLLiveLSLSaveData(const LLUUID& id,
mItem = new LLViewerInventoryItem(item);
}
-void LLLiveLSLEditor::saveIfNeeded(bool sync)
+// virtual
+void LLLiveLSLEditor::saveIfNeeded(bool sync /*= true*/)
{
LLViewerObject* object = gObjectList.findObject(mObjectUUID);
if(!object)
@@ -1941,18 +2023,11 @@ void LLLiveLSLEditor::saveIfNeeded(bool sync)
mItem->setAssetUUID(asset_id);
mItem->setTransactionID(tid);
- writeToFile(filename);
+ mScriptEd->writeToFile(filename);
if (sync)
{
- // Sync with external ed2itor.
- std::string tmp_file = getTmpFileName();
- llstat s;
- if (LLFile::stat(tmp_file, &s) == 0) // file exists
- {
- if (mLiveFile) mLiveFile->ignoreNextUpdate();
- writeToFile(tmp_file);
- }
+ mScriptEd->sync();
}
// save it out to asset server
@@ -1970,73 +2045,6 @@ void LLLiveLSLEditor::saveIfNeeded(bool sync)
}
}
-void LLLiveLSLEditor::openExternalEditor()
-{
- LLViewerObject* object = gObjectList.findObject(mObjectUUID);
- if(!object)
- {
- LLNotificationsUtil::add("SaveScriptFailObjectNotFound");
- return;
- }
-
- delete mLiveFile; // deletes file
-
- // Save the script to a temporary file.
- std::string filename = getTmpFileName();
- writeToFile(filename);
-
- // Start watching file changes.
- mLiveFile = new LLLiveLSLFile(filename, this);
- mLiveFile->addToEventTimer();
-
- // Open it in external editor.
- {
- LLExternalEditor ed;
-
- if (!ed.setCommand("LL_SCRIPT_EDITOR"))
- {
- std::string msg = "Select an editor by setting the environment variable LL_SCRIPT_EDITOR "
- "or the ExternalEditor setting"; // *TODO: localize
- LLNotificationsUtil::add("GenericAlert", LLSD().with("MESSAGE", msg));
- return;
- }
-
- ed.run(filename);
- }
-}
-
-bool LLLiveLSLEditor::writeToFile(const std::string& filename)
-{
- LLFILE* fp = LLFile::fopen(filename, "wb");
- if (!fp)
- {
- llwarns << "Unable to write to " << filename << llendl;
-
- LLSD row;
- row["columns"][0]["value"] = "Error writing to local file. Is your hard drive full?";
- row["columns"][0]["font"] = "SANSSERIF_SMALL";
- mScriptEd->mErrorList->addElement(row);
- return false;
- }
-
- std::string utf8text = mScriptEd->mEditor->getText();
-
- // Special case for a completely empty script - stuff in one space so it can store properly. See SL-46889
- if (utf8text.size() == 0)
- {
- utf8text = " ";
- }
-
- fputs(utf8text.c_str(), fp);
- fclose(fp);
- return true;
-}
-
-std::string LLLiveLSLEditor::getTmpFileName()
-{
- return std::string(LLFile::tmpdir()) + "sl_script_" + mObjectUUID.asString() + ".lsl";
-}
-
void LLLiveLSLEditor::uploadAssetViaCaps(const std::string& url,
const std::string& filename,
const LLUUID& task_id,
@@ -2261,13 +2269,6 @@ void LLLiveLSLEditor::onSave(void* userdata, BOOL close_after_save)
// static
-void LLLiveLSLEditor::onEdit(void* userdata)
-{
- LLLiveLSLEditor* self = (LLLiveLSLEditor*)userdata;
- self->openExternalEditor();
-}
-
-// static
void LLLiveLSLEditor::processScriptRunningReply(LLMessageSystem* msg, void**)
{
LLUUID item_id;
diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h
index d35c6b8528..f86be615c4 100644
--- a/indra/newview/llpreviewscript.h
+++ b/indra/newview/llpreviewscript.h
@@ -48,6 +48,7 @@ class LLFloaterScriptSearch;
class LLKeywordToken;
class LLVFS;
class LLViewerInventoryItem;
+class LLScriptEdContainer;
// Inner, implementation class. LLPreviewScript and LLLiveLSLEditor each own one of these.
class LLScriptEdCore : public LLPanel
@@ -56,17 +57,20 @@ class LLScriptEdCore : public LLPanel
friend class LLPreviewLSL;
friend class LLLiveLSLEditor;
friend class LLFloaterScriptSearch;
+ friend class LLScriptEdContainer;
-public:
+protected:
+ // Supposed to be invoked only by the container.
LLScriptEdCore(
+ LLScriptEdContainer* container,
const std::string& sample,
const LLHandle<LLFloater>& floater_handle,
void (*load_callback)(void* userdata),
void (*save_callback)(void* userdata, BOOL close_after_save),
- void (*edit_callback)(void*),
void (*search_replace_callback)(void* userdata),
void* userdata,
S32 bottom_pad = 0); // pad below bottom row of buttons
+public:
~LLScriptEdCore();
void initMenu();
@@ -74,15 +78,19 @@ public:
virtual void draw();
/*virtual*/ BOOL postBuild();
BOOL canClose();
+ void setEnableEditing(bool enable);
void setScriptText(const std::string& text, BOOL is_valid);
+ bool loadScriptText(const std::string& filename);
+ bool writeToFile(const std::string& filename);
+ void sync();
void doSave( BOOL close_after_save );
bool handleSaveChangesDialog(const LLSD& notification, const LLSD& response);
bool handleReloadFromServerDialog(const LLSD& notification, const LLSD& response);
- void onEditButtonClick();
+ void openInExternalEditor();
static void onCheckLock(LLUICtrl*, void*);
static void onHelpComboCommit(LLUICtrl* ctrl, void* userdata);
@@ -118,7 +126,6 @@ private:
LLTextEditor* mEditor;
void (*mLoadCallback)(void* userdata);
void (*mSaveCallback)(void* userdata, BOOL close_after_save);
- void (*mEditCallback)(void* userdata);
void (*mSearchReplaceCallback) (void* userdata);
void* mUserdata;
LLComboBox *mFunctions;
@@ -132,11 +139,28 @@ private:
S32 mLiveHelpHistorySize;
BOOL mEnableSave;
BOOL mHasScriptData;
+ LLLiveLSLFile* mLiveFile;
+
+ LLScriptEdContainer* mContainer; // parent view
};
+class LLScriptEdContainer : public LLPreview
+{
+ friend class LLScriptEdCore;
+
+public:
+ LLScriptEdContainer(const LLSD& key);
+
+protected:
+ std::string getTmpFileName();
+ bool onExternalChange(const std::string& filename);
+ virtual void saveIfNeeded(bool sync = true) = 0;
+
+ LLScriptEdCore* mScriptEd;
+};
// Used to view and edit a LSL from your inventory.
-class LLPreviewLSL : public LLPreview
+class LLPreviewLSL : public LLScriptEdContainer
{
public:
LLPreviewLSL(const LLSD& key );
@@ -150,7 +174,7 @@ protected:
void closeIfNeeded();
virtual void loadAsset();
- void saveIfNeeded();
+ /*virtual*/ void saveIfNeeded(bool sync = true);
void uploadAssetViaCaps(const std::string& url,
const std::string& filename,
const LLUUID& item_id);
@@ -174,7 +198,6 @@ protected:
protected:
- LLScriptEdCore* mScriptEd;
// Can safely close only after both text and bytecode are uploaded
S32 mPendingUploads;
@@ -182,12 +205,11 @@ protected:
// Used to view and edit an LSL that is attached to an object.
-class LLLiveLSLEditor : public LLPreview
+class LLLiveLSLEditor : public LLScriptEdContainer
{
friend class LLLiveLSLFile;
public:
LLLiveLSLEditor(const LLSD& key);
- ~LLLiveLSLEditor();
static void processScriptRunningReply(LLMessageSystem* msg, void**);
@@ -208,10 +230,7 @@ private:
virtual void loadAsset();
void loadAsset(BOOL is_new);
- void saveIfNeeded(bool sync = true);
- void openExternalEditor();
- std::string getTmpFileName();
- bool writeToFile(const std::string& filename);
+ /*virtual*/ void saveIfNeeded(bool sync = true);
void uploadAssetViaCaps(const std::string& url,
const std::string& filename,
const LLUUID& task_id,
@@ -227,7 +246,6 @@ private:
static void onSearchReplace(void* userdata);
static void onLoad(void* userdata);
static void onSave(void* userdata, BOOL close_after_save);
- static void onEdit(void* userdata);
static void onLoadComplete(LLVFS *vfs, const LLUUID& asset_uuid,
LLAssetType::EType type,
@@ -237,7 +255,6 @@ private:
static void onRunningCheckboxClicked(LLUICtrl*, void* userdata);
static void onReset(void* userdata);
- bool loadScriptText(const std::string& filename);
void loadScriptText(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType type);
static void onErrorList(LLUICtrl*, void* user_data);
@@ -248,7 +265,6 @@ private:
private:
bool mIsNew;
- LLScriptEdCore* mScriptEd;
//LLUUID mTransmitID;
LLCheckBoxCtrl* mRunningCheckbox;
BOOL mAskedForRunningInfo;
@@ -263,7 +279,6 @@ private:
LLCheckBoxCtrl* mMonoCheckbox;
BOOL mIsModifiable;
- LLLiveLSLFile* mLiveFile;
};
#endif // LL_LLPREVIEWSCRIPT_H
diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp
index fd6b326ef1..7657cccd4e 100644
--- a/indra/newview/llpreviewtexture.cpp
+++ b/indra/newview/llpreviewtexture.cpp
@@ -318,7 +318,7 @@ void LLPreviewTexture::reshape(S32 width, S32 height, BOOL called_from_parent)
}
}
- mClientRect.setLeftTopAndSize(client_rect.getCenterX() - (client_width / 2), client_rect.getCenterY() + (client_height / 2), client_width, client_height);
+ mClientRect.setLeftTopAndSize(client_rect.getCenterX() - (client_width / 2), client_rect.getCenterY() + (client_height / 2), client_width, client_height);
}
@@ -400,7 +400,6 @@ void LLPreviewTexture::updateDimensions()
{
return;
}
-
mUpdateDimensions = FALSE;
@@ -408,80 +407,12 @@ void LLPreviewTexture::updateDimensions()
getChild<LLUICtrl>("dimensions")->setTextArg("[HEIGHT]", llformat("%d", mImage->getFullHeight()));
- LLRect dim_rect(getChildView("dimensions")->getRect());
-
- S32 horiz_pad = 2 * (LLPANEL_BORDER_WIDTH + PREVIEW_PAD) + PREVIEW_RESIZE_HANDLE_SIZE;
-
- // add space for dimensions and aspect ratio
- S32 info_height = dim_rect.mTop + CLIENT_RECT_VPAD;
-
- S32 screen_width = gFloaterView->getSnapRect().getWidth();
- S32 screen_height = gFloaterView->getSnapRect().getHeight();
-
- S32 max_image_width = screen_width - 2*horiz_pad;
- S32 max_image_height = screen_height - (PREVIEW_HEADER_SIZE + CLIENT_RECT_VPAD)
- - (PREVIEW_BORDER + CLIENT_RECT_VPAD + info_height);
-
- S32 client_width = llmin(max_image_width,mImage->getFullWidth());
- S32 client_height = llmin(max_image_height,mImage->getFullHeight());
-
- if (mAspectRatio > 0.f)
- {
- if(mAspectRatio > 1.f)
- {
- client_height = llceil((F32)client_width / mAspectRatio);
- if(client_height > max_image_height)
- {
- client_height = max_image_height;
- client_width = llceil((F32)client_height * mAspectRatio);
- }
- }
- else//mAspectRatio < 1.f
- {
- client_width = llceil((F32)client_height * mAspectRatio);
- if(client_width > max_image_width)
- {
- client_width = max_image_width;
- client_height = llceil((F32)client_width / mAspectRatio);
- }
- }
- }
- else
- {
-
- if(client_height > max_image_height)
- {
- F32 ratio = (F32)max_image_height/client_height;
- client_height = max_image_height;
- client_width = llceil((F32)client_height * ratio);
- }
-
- if(client_width > max_image_width)
- {
- F32 ratio = (F32)max_image_width/client_width;
- client_width = max_image_width;
- client_height = llceil((F32)client_width * ratio);
- }
- }
-
- //now back to whole floater
- S32 floater_width = llmax(getMinWidth(),client_width + 2*horiz_pad);
- S32 floater_height = llmax(getMinHeight(),client_height + (PREVIEW_HEADER_SIZE + CLIENT_RECT_VPAD)
- + (PREVIEW_BORDER + CLIENT_RECT_VPAD + info_height));
-
//reshape floater
- reshape( floater_width, floater_height );
- gFloaterView->adjustToFitScreen(this, FALSE);
+ reshape(getRect().getWidth(), getRect().getHeight());
- //setup image rect...
- LLRect client_rect(horiz_pad, getRect().getHeight(), getRect().getWidth() - horiz_pad, 0);
- client_rect.mTop -= (PREVIEW_HEADER_SIZE + CLIENT_RECT_VPAD);
- client_rect.mBottom += PREVIEW_BORDER + CLIENT_RECT_VPAD + info_height ;
-
- mClientRect.setLeftTopAndSize(client_rect.getCenterX() - (client_width / 2), client_rect.getCenterY() + (client_height / 2), client_width, client_height);
+ gFloaterView->adjustToFitScreen(this, FALSE);
- // Hide the aspect ratio label if the window is too narrow
- // Assumes the label should be to the right of the dimensions
+ LLRect dim_rect(getChildView("dimensions")->getRect());
LLRect aspect_label_rect(getChildView("aspect_ratio")->getRect());
getChildView("aspect_ratio")->setVisible( dim_rect.mRight < aspect_label_rect.mLeft);
}
diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp
index e9504cbba0..31fde5d58a 100644
--- a/indra/newview/llprogressview.cpp
+++ b/indra/newview/llprogressview.cpp
@@ -133,13 +133,13 @@ void LLProgressView::setVisible(BOOL visible)
mFadeTimer.start();
}
// showing progress view
- else if (!getVisible() && visible)
+ else if (visible && (!getVisible() || mFadeTimer.getStarted()))
{
setFocus(TRUE);
mFadeTimer.stop();
mProgressTimer.start();
LLPanel::setVisible(TRUE);
- }
+ }
}
@@ -207,7 +207,7 @@ void LLProgressView::setText(const std::string& text)
void LLProgressView::setPercent(const F32 percent)
{
- mProgressBar->setPercent(percent);
+ mProgressBar->setValue(percent);
}
void LLProgressView::setMessage(const std::string& msg)
diff --git a/indra/newview/llremoteparcelrequest.cpp b/indra/newview/llremoteparcelrequest.cpp
index 0dff087553..e5ef51bdd1 100644
--- a/indra/newview/llremoteparcelrequest.cpp
+++ b/indra/newview/llremoteparcelrequest.cpp
@@ -140,22 +140,25 @@ void LLRemoteParcelInfoProcessor::processParcelInfoReply(LLMessageSystem* msg, v
typedef std::vector<observer_multimap_t::iterator> deadlist_t;
deadlist_t dead_iters;
- observer_multimap_t::iterator oi;
- observer_multimap_t::iterator start = observers.lower_bound(parcel_data.parcel_id);
+ observer_multimap_t::iterator oi = observers.lower_bound(parcel_data.parcel_id);
observer_multimap_t::iterator end = observers.upper_bound(parcel_data.parcel_id);
- for (oi = start; oi != end; ++oi)
+ while (oi != end)
{
- LLRemoteParcelInfoObserver * observer = oi->second.get();
+ // increment the loop iterator now since it may become invalid below
+ observer_multimap_t::iterator cur_oi = oi++;
+
+ LLRemoteParcelInfoObserver * observer = cur_oi->second.get();
if(observer)
{
+ // may invalidate cur_oi if the observer removes itself
observer->processParcelInfo(parcel_data);
}
else
{
// the handle points to an expired observer, so don't keep it
// around anymore
- dead_iters.push_back(oi);
+ dead_iters.push_back(cur_oi);
}
}
diff --git a/indra/newview/llrootview.h b/indra/newview/llrootview.h
index 4b1ba15a0b..5223a314f3 100644
--- a/indra/newview/llrootview.h
+++ b/indra/newview/llrootview.h
@@ -42,27 +42,5 @@ public:
LLRootView(const Params& p)
: LLView(p)
{}
-
- // added to provide possibility to handle mouse click event inside all application
- // window without creating any floater
- typedef boost::signals2::signal<void(S32 x, S32 y, MASK mask)>
- mouse_signal_t;
-
- private:
- mouse_signal_t mMouseDownSignal;
-
- public:
- /*virtual*/
- BOOL handleMouseDown(S32 x, S32 y, MASK mask)
- {
- mMouseDownSignal(x, y, mask);
- return LLView::handleMouseDown(x, y, mask);
- }
-
- boost::signals2::connection addMouseDownCallback(
- const mouse_signal_t::slot_type& cb)
- {
- return mMouseDownSignal.connect(cb);
- }
};
#endif //LL_LLROOTVIEW_H
diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index 61f4897ed0..e3bc67a414 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -83,11 +83,10 @@ bool LLScreenChannelBase::isHovering()
return mHoveredToast->isHovered();
}
-bool LLScreenChannelBase::resetPositionAndSize(const LLSD& newvalue)
+void LLScreenChannelBase::resetPositionAndSize()
{
LLRect rc = gViewerWindow->getWorldViewRectScaled();
updatePositionAndSize(rc, rc);
- return true;
}
void LLScreenChannelBase::updatePositionAndSize(LLRect old_world_rect, LLRect new_world_rect)
@@ -99,10 +98,7 @@ void LLScreenChannelBase::updatePositionAndSize(LLRect old_world_rect, LLRect ne
if (gSavedSettings.getBOOL("SidebarCameraMovement") == FALSE
&& LLSideTray::instanceCreated ())
{
- LLSideTray* side_bar = LLSideTray::getInstance();
-
- if (side_bar->getVisible() && !side_bar->getCollapsed())
- world_rect_padding += side_bar->getRect().getWidth();
+ world_rect_padding += LLSideTray::getInstance()->getVisibleWidth();
}
@@ -133,15 +129,25 @@ void LLScreenChannelBase::init(S32 channel_left, S32 channel_right)
if(LLSideTray::instanceCreated())
{
LLSideTray* side_bar = LLSideTray::getInstance();
- side_bar->getCollapseSignal().connect(boost::bind(&LLScreenChannelBase::resetPositionAndSize, this, _2));
+ side_bar->setVisibleWidthChangeCallback(boost::bind(&LLScreenChannelBase::resetPositionAndSize, this));
}
+ // top and bottom set by updateBottom()
+ setRect(LLRect(channel_left, 0, channel_right, 0));
+ updateBottom();
+ setVisible(TRUE);
+}
+
+void LLScreenChannelBase::updateBottom()
+{
S32 channel_top = gViewerWindow->getWorldViewRectScaled().getHeight();
- S32 channel_bottom = gViewerWindow->getWorldViewRectScaled().mBottom + gSavedSettings.getS32("ChannelBottomPanelMargin");
+ S32 channel_bottom = gSavedSettings.getS32("ChannelBottomPanelMargin");
+ S32 channel_left = getRect().mLeft;
+ S32 channel_right = getRect().mRight;
setRect(LLRect(channel_left, channel_top, channel_right, channel_bottom));
- setVisible(TRUE);
}
+
//--------------------------------------------------------------------------
//////////////////////
// LLScreenChannel
@@ -204,10 +210,7 @@ void LLScreenChannel::updatePositionAndSize(LLRect old_world_rect, LLRect new_wo
if (gSavedSettings.getBOOL("SidebarCameraMovement") == FALSE
&& LLSideTray::instanceCreated ())
{
- LLSideTray* side_bar = LLSideTray::getInstance();
-
- if (side_bar->getVisible() && !side_bar->getCollapsed())
- world_rect_padding += side_bar->getRect().getWidth();
+ world_rect_padding += LLSideTray::getInstance()->getVisibleWidth();
}
@@ -253,8 +256,8 @@ void LLScreenChannel::addToast(const LLToast::Params& p)
if(mControlHovering)
{
new_toast_elem.toast->setOnToastHoverCallback(boost::bind(&LLScreenChannel::onToastHover, this, _1, _2));
- new_toast_elem.toast->setMouseEnterCallback(boost::bind(&LLScreenChannel::stopFadingToast, this, new_toast_elem.toast));
- new_toast_elem.toast->setMouseLeaveCallback(boost::bind(&LLScreenChannel::startFadingToast, this, new_toast_elem.toast));
+ new_toast_elem.toast->setMouseEnterCallback(boost::bind(&LLScreenChannel::stopToastTimer, this, new_toast_elem.toast));
+ new_toast_elem.toast->setMouseLeaveCallback(boost::bind(&LLScreenChannel::startToastTimer, this, new_toast_elem.toast));
}
if(show_toast)
@@ -369,7 +372,7 @@ void LLScreenChannel::loadStoredToastsToChannel()
for(it = mStoredToastList.begin(); it != mStoredToastList.end(); ++it)
{
(*it).toast->setIsHidden(false);
- (*it).toast->startFading();
+ (*it).toast->startTimer();
mToastList.push_back((*it));
}
@@ -394,7 +397,7 @@ void LLScreenChannel::loadStoredToastByNotificationIDToChannel(LLUUID id)
}
toast->setIsHidden(false);
- toast->startFading();
+ toast->startTimer();
mToastList.push_back((*it));
redrawToasts();
@@ -477,7 +480,7 @@ void LLScreenChannel::modifyToastByNotificationID(LLUUID id, LLPanel* panel)
toast->removeChild(old_panel);
delete old_panel;
toast->insertPanel(panel);
- toast->startFading();
+ toast->startTimer();
redrawToasts();
}
}
@@ -485,7 +488,7 @@ void LLScreenChannel::modifyToastByNotificationID(LLUUID id, LLPanel* panel)
//--------------------------------------------------------------------------
void LLScreenChannel::redrawToasts()
{
- if(mToastList.size() == 0 || isHovering())
+ if(mToastList.size() == 0)
return;
switch(mToastAlignment)
@@ -511,6 +514,8 @@ void LLScreenChannel::showToastsBottom()
S32 toast_margin = 0;
std::vector<ToastElem>::reverse_iterator it;
+ updateBottom();
+
LLDockableFloater* floater = dynamic_cast<LLDockableFloater*>(LLDockableFloater::getInstanceHandle().get());
for(it = mToastList.rbegin(); it != mToastList.rend(); ++it)
@@ -583,20 +588,15 @@ void LLScreenChannel::showToastsBottom()
}
}
+ // Dismiss toasts we don't have space for (STORM-391).
if(it != mToastList.rend())
{
mHiddenToastsNum = 0;
for(; it != mToastList.rend(); it++)
{
- (*it).toast->stopFading();
- (*it).toast->setVisible(FALSE);
- mHiddenToastsNum++;
+ (*it).toast->hide();
}
}
- else
- {
- closeOverflowToastPanel();
- }
}
//--------------------------------------------------------------------------
@@ -697,15 +697,15 @@ void LLScreenChannel::closeStartUpToast()
}
}
-void LLNotificationsUI::LLScreenChannel::stopFadingToast(LLToast* toast)
+void LLNotificationsUI::LLScreenChannel::stopToastTimer(LLToast* toast)
{
if (!toast || toast != mHoveredToast) return;
// Pause fade timer of the hovered toast.
- toast->stopFading();
+ toast->stopTimer();
}
-void LLNotificationsUI::LLScreenChannel::startFadingToast(LLToast* toast)
+void LLNotificationsUI::LLScreenChannel::startToastTimer(LLToast* toast)
{
if (!toast || toast == mHoveredToast)
{
@@ -713,13 +713,12 @@ void LLNotificationsUI::LLScreenChannel::startFadingToast(LLToast* toast)
}
// Reset its fade timer.
- toast->startFading();
+ toast->startTimer();
}
//--------------------------------------------------------------------------
void LLScreenChannel::hideToastsFromScreen()
{
- closeOverflowToastPanel();
for(std::vector<ToastElem>::iterator it = mToastList.begin(); it != mToastList.end(); it++)
(*it).toast->setVisible(FALSE);
}
@@ -835,8 +834,7 @@ void LLScreenChannel::onToastHover(LLToast* toast, bool mouse_enter)
}
}
- if(!isHovering())
- redrawToasts();
+ redrawToasts();
}
//--------------------------------------------------------------------------
@@ -850,13 +848,7 @@ void LLScreenChannel::updateShowToastsState()
return;
}
- S32 channel_bottom = gViewerWindow->getWorldViewRectScaled().mBottom + gSavedSettings.getS32("ChannelBottomPanelMargin");;
- LLRect this_rect = getRect();
-
- if(channel_bottom != this_rect.mBottom)
- {
- setRect(LLRect(this_rect.mLeft, this_rect.mTop, this_rect.mRight, channel_bottom));
- }
+ updateBottom();
}
//--------------------------------------------------------------------------
diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h
index a1fdd6e32c..d207d13981 100644
--- a/indra/newview/llscreenchannel.h
+++ b/indra/newview/llscreenchannel.h
@@ -59,8 +59,8 @@ public:
// Channel's outfit-functions
// update channel's size and position in the World View
virtual void updatePositionAndSize(LLRect old_world_rect, LLRect new_world_rect);
+ void resetPositionAndSize();
- bool resetPositionAndSize(const LLSD& newvalue);
// initialization of channel's shape and position
virtual void init(S32 channel_left, S32 channel_right);
@@ -81,9 +81,6 @@ public:
// show all toasts in a channel
virtual void redrawToasts() {};
- virtual void closeOverflowToastPanel() {};
- virtual void hideOverflowToastPanel() {};
-
// Channel's behavior-functions
// set whether a channel will control hovering inside itself or not
@@ -111,6 +108,8 @@ public:
LLUUID getChannelID() { return mID; }
protected:
+ void updateBottom();
+
// Channel's flags
bool mControlHovering;
LLToast* mHoveredToast;
@@ -194,10 +193,10 @@ public:
/** Stop fading given toast */
- virtual void stopFadingToast(LLToast* toast);
+ virtual void stopToastTimer(LLToast* toast);
/** Start fading given toast */
- virtual void startFadingToast(LLToast* toast);
+ virtual void startToastTimer(LLToast* toast);
// get StartUp Toast's state
static bool getStartUpToastShown() { return mWasStartUpToastShown; }
diff --git a/indra/newview/llscriptfloater.h b/indra/newview/llscriptfloater.h
index dc52baa115..8e959a3d0e 100644
--- a/indra/newview/llscriptfloater.h
+++ b/indra/newview/llscriptfloater.h
@@ -30,7 +30,7 @@
#include "lltransientdockablefloater.h"
#include "llnotificationptr.h"
-class LLToastNotifyPanel;
+class LLToastPanel;
/**
* Handles script notifications ("ScriptDialog" and "ScriptDialogGroup")
@@ -206,7 +206,7 @@ protected:
private:
bool isScriptTextbox(LLNotificationPtr notification);
- LLToastNotifyPanel* mScriptForm;
+ LLToastPanel* mScriptForm;
LLUUID mNotificationId;
LLUUID mObjectId;
bool mSaveFloaterPosition;
diff --git a/indra/newview/llscrollingpanelparam.cpp b/indra/newview/llscrollingpanelparam.cpp
index 05b273cd29..f8c20dada0 100644
--- a/indra/newview/llscrollingpanelparam.cpp
+++ b/indra/newview/llscrollingpanelparam.cpp
@@ -165,12 +165,16 @@ void LLScrollingPanelParam::draw()
getChildView("max param text")->setVisible( FALSE );
LLPanel::draw();
+ // If we're in a focused floater, don't apply the floater's alpha to visual param hint,
+ // making its behavior similar to texture controls'.
+ F32 alpha = getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency();
+
// Draw the hints over the "less" and "more" buttons.
gGL.pushUIMatrix();
{
const LLRect& r = mHintMin->getRect();
gGL.translateUI((F32)r.mLeft, (F32)r.mBottom, 0.f);
- mHintMin->draw();
+ mHintMin->draw(alpha);
}
gGL.popUIMatrix();
@@ -178,7 +182,7 @@ void LLScrollingPanelParam::draw()
{
const LLRect& r = mHintMax->getRect();
gGL.translateUI((F32)r.mLeft, (F32)r.mBottom, 0.f);
- mHintMax->draw();
+ mHintMax->draw(alpha);
}
gGL.popUIMatrix();
diff --git a/indra/newview/llsearchcombobox.cpp b/indra/newview/llsearchcombobox.cpp
index db531b5695..6558c9a7fa 100644
--- a/indra/newview/llsearchcombobox.cpp
+++ b/indra/newview/llsearchcombobox.cpp
@@ -131,6 +131,9 @@ void LLSearchComboBox::focusTextEntry()
if (mTextEntry)
{
gFocusMgr.setKeyboardFocus(mTextEntry);
+
+ // Let the editor handle editing hotkeys (STORM-431).
+ LLEditMenuHandler::gEditMenuHandler = mTextEntry;
}
}
diff --git a/indra/newview/llshareavatarhandler.cpp b/indra/newview/llshareavatarhandler.cpp
new file mode 100644
index 0000000000..34194970b8
--- /dev/null
+++ b/indra/newview/llshareavatarhandler.cpp
@@ -0,0 +1,59 @@
+/**
+ * @file llshareavatarhandler.cpp
+ * @brief slapp to handle sharing with an avatar
+ *
+ * $LicenseInfo:firstyear=2001&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+#include "llcommandhandler.h"
+#include "llavataractions.h"
+
+class LLShareWithAvatarHandler : public LLCommandHandler
+{
+public:
+ // requires trusted browser to trigger
+ LLShareWithAvatarHandler() : LLCommandHandler("sharewithavatar", UNTRUSTED_THROTTLE)
+ {
+ }
+
+ bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web)
+ {
+ //Make sure we have some parameters
+ if (params.size() == 0)
+ {
+ return false;
+ }
+
+ //Get the ID
+ LLUUID id;
+ if (!id.set( params[0], FALSE ))
+ {
+ return false;
+ }
+
+ //instigate share with this avatar
+ LLAvatarActions::share( id );
+ return true;
+ }
+};
+LLShareWithAvatarHandler gShareWithAvatar;
diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp
index be797ea937..c8c6858b81 100644
--- a/indra/newview/llsidepaneliteminfo.cpp
+++ b/indra/newview/llsidepaneliteminfo.cpp
@@ -71,12 +71,12 @@ void LLItemPropertiesObserver::changed(U32 mask)
const std::set<LLUUID>& mChangedItemIDs = gInventory.getChangedIDs();
std::set<LLUUID>::const_iterator it;
- const LLUUID& object_id = mFloater->getObjectID();
+ const LLUUID& item_id = mFloater->getItemID();
for (it = mChangedItemIDs.begin(); it != mChangedItemIDs.end(); it++)
{
// set dirty for 'item profile panel' only if changed item is the item for which 'item profile panel' is shown (STORM-288)
- if (*it == object_id)
+ if (*it == item_id)
{
// if there's a change we're interested in.
if((mask & (LLInventoryObserver::LABEL | LLInventoryObserver::INTERNAL | LLInventoryObserver::REMOVE)) != 0)
@@ -196,6 +196,11 @@ const LLUUID& LLSidepanelItemInfo::getObjectID() const
return mObjectID;
}
+const LLUUID& LLSidepanelItemInfo::getItemID() const
+{
+ return mItemID;
+}
+
void LLSidepanelItemInfo::reset()
{
LLSidepanelInventorySubpanel::reset();
diff --git a/indra/newview/llsidepaneliteminfo.h b/indra/newview/llsidepaneliteminfo.h
index 6416e2cfe4..25be145f64 100644
--- a/indra/newview/llsidepaneliteminfo.h
+++ b/indra/newview/llsidepaneliteminfo.h
@@ -55,6 +55,7 @@ public:
void setEditMode(BOOL edit);
const LLUUID& getObjectID() const;
+ const LLUUID& getItemID() const;
protected:
/*virtual*/ void refresh();
diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp
index 47d904dfcc..8774482acd 100644
--- a/indra/newview/llsidepaneltaskinfo.cpp
+++ b/indra/newview/llsidepaneltaskinfo.cpp
@@ -1120,17 +1120,17 @@ void LLSidepanelTaskInfo::updateVerbs()
*/
LLSafeHandle<LLObjectSelection> object_selection = LLSelectMgr::getInstance()->getSelection();
- const BOOL multi_select = (object_selection->getNumNodes() > 1);
+ const BOOL any_selected = (object_selection->getNumNodes() > 0);
- mOpenBtn->setVisible(!multi_select);
- mPayBtn->setVisible(!multi_select);
- mBuyBtn->setVisible(!multi_select);
- mDetailsBtn->setVisible(multi_select);
- mDetailsBtn->setEnabled(multi_select);
+ mOpenBtn->setVisible(true);
+ mPayBtn->setVisible(true);
+ mBuyBtn->setVisible(true);
+ mDetailsBtn->setVisible(true);
mOpenBtn->setEnabled(enable_object_open());
mPayBtn->setEnabled(enable_pay_object());
mBuyBtn->setEnabled(enable_buy_object());
+ mDetailsBtn->setEnabled(any_selected);
}
void LLSidepanelTaskInfo::onOpenButtonClicked()
diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp
index 9c8557c017..aef665a35c 100644
--- a/indra/newview/llsidetray.cpp
+++ b/indra/newview/llsidetray.cpp
@@ -159,8 +159,6 @@ LLSideTrayTab::LLSideTrayTab(const Params& p)
mDescription(p.description),
mMainPanel(NULL)
{
- // Necessary for focus movement among child controls
- setFocusRoot(TRUE);
}
LLSideTrayTab::~LLSideTrayTab()
@@ -563,7 +561,7 @@ BOOL LLSideTray::postBuild()
{
if ((*it).channel)
{
- getCollapseSignal().connect(boost::bind(&LLScreenChannelBase::resetPositionAndSize, (*it).channel, _2));
+ setVisibleWidthChangeCallback(boost::bind(&LLScreenChannelBase::resetPositionAndSize, (*it).channel));
}
}
@@ -917,7 +915,6 @@ void LLSideTray::createButtons ()
}
}
LLHints::registerHintTarget("inventory_btn", mTabButtons["sidebar_inventory"]->getHandle());
- LLHints::registerHintTarget("dest_guide_btn", mTabButtons["sidebar_places"]->getHandle());
}
void LLSideTray::processTriState ()
@@ -983,9 +980,6 @@ void LLSideTray::reflectCollapseChange()
}
gFloaterView->refresh();
-
- LLSD new_value = mCollapsed;
- mCollapseSignal(this,new_value);
}
void LLSideTray::arrange()
@@ -1265,9 +1259,29 @@ bool LLSideTray::isPanelActive(const std::string& panel_name)
void LLSideTray::updateSidetrayVisibility()
{
// set visibility of parent container based on collapsed state
- if (getParent())
+ LLView* parent = getParent();
+ if (parent)
{
- getParent()->setVisible(!mCollapsed && !gAgentCamera.cameraMouselook());
+ bool old_visibility = parent->getVisible();
+ bool new_visibility = !mCollapsed && !gAgentCamera.cameraMouselook();
+
+ if (old_visibility != new_visibility)
+ {
+ parent->setVisible(new_visibility);
+
+ // Signal change of visible width.
+ llinfos << "Visible: " << new_visibility << llendl;
+ mVisibleWidthChangeSignal(this, new_visibility);
+ }
}
}
+S32 LLSideTray::getVisibleWidth()
+{
+ return (isInVisibleChain() && !mCollapsed) ? getRect().getWidth() : 0;
+}
+
+void LLSideTray::setVisibleWidthChangeCallback(const commit_signal_t::slot_type& cb)
+{
+ mVisibleWidthChangeSignal.connect(cb);
+}
diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h
index 3c572dde95..184d78845f 100644
--- a/indra/newview/llsidetray.h
+++ b/indra/newview/llsidetray.h
@@ -165,9 +165,18 @@ public:
void reshape (S32 width, S32 height, BOOL called_from_parent = TRUE);
- void updateSidetrayVisibility();
+ /**
+ * @return side tray width if it's visible and expanded, 0 otherwise.
+ *
+ * Not that width of the tab buttons is not included.
+ *
+ * @see setVisibleWidthChangeCallback()
+ */
+ S32 getVisibleWidth();
+
+ void setVisibleWidthChangeCallback(const commit_signal_t::slot_type& cb);
- commit_signal_t& getCollapseSignal() { return mCollapseSignal; }
+ void updateSidetrayVisibility();
void handleLoginComplete();
@@ -216,7 +225,7 @@ private:
tab_order_vector_t mOriginalTabOrder;
LLSideTrayTab* mActiveTab;
- commit_signal_t mCollapseSignal;
+ commit_signal_t mVisibleWidthChangeSignal;
LLButton* mCollapseButton;
bool mCollapsed;
diff --git a/indra/newview/llsimplestat.h b/indra/newview/llsimplestat.h
new file mode 100644
index 0000000000..a90e503adb
--- /dev/null
+++ b/indra/newview/llsimplestat.h
@@ -0,0 +1,158 @@
+/**
+ * @file llsimplestat.h
+ * @brief Runtime statistics accumulation.
+ *
+ * $LicenseInfo:firstyear=2010&license=viewergpl$
+ *
+ * Copyright (c) 2010, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_SIMPLESTAT_H
+#define LL_SIMPLESTAT_H
+
+// History
+//
+// The original source for this code is the server repositories'
+// llcommon/llstat.h file. This particular code was added after the
+// viewer/server code schism but before the effort to convert common
+// code to libraries was complete. Rather than add to merge issues,
+// the needed code was cut'n'pasted into this new header as it isn't
+// too awful a burden. Post-modularization, we can look at removing
+// this redundancy.
+
+
+/**
+ * @class LLSimpleStatCounter
+ * @brief Just counts events.
+ *
+ * Really not needed but have a pattern in mind in the future.
+ * Interface limits what can be done at that's just fine.
+ *
+ * *TODO: Update/transfer unit tests
+ * Unit tests: indra/test/llcommon_llstat_tut.cpp
+ */
+class LLSimpleStatCounter
+{
+public:
+ inline LLSimpleStatCounter() { reset(); }
+ // Default destructor and assignment operator are valid
+
+ inline void reset() { mCount = 0; }
+
+ inline void merge(const LLSimpleStatCounter & src)
+ { mCount += src.mCount; }
+
+ inline U32 operator++() { return ++mCount; }
+
+ inline U32 getCount() const { return mCount; }
+
+protected:
+ U32 mCount;
+};
+
+
+/**
+ * @class LLSimpleStatMMM
+ * @brief Templated collector of min, max and mean data for stats.
+ *
+ * Fed a stream of data samples, keeps a running account of the
+ * min, max and mean seen since construction or the last reset()
+ * call. A freshly-constructed or reset instance returns counts
+ * and values of zero.
+ *
+ * Overflows and underflows (integer, inf or -inf) and NaN's
+ * are the caller's problem. As is loss of precision when
+ * the running sum's exponent (when parameterized by a floating
+ * point of some type) differs from a given data sample's.
+ *
+ * Unit tests: indra/test/llcommon_llstat_tut.cpp
+ */
+template <typename VALUE_T = F32>
+class LLSimpleStatMMM
+{
+public:
+ typedef VALUE_T Value;
+
+public:
+ LLSimpleStatMMM() { reset(); }
+ // Default destructor and assignment operator are valid
+
+ /**
+ * Resets the object returning all counts and derived
+ * values back to zero.
+ */
+ void reset()
+ {
+ mCount = 0;
+ mMin = Value(0);
+ mMax = Value(0);
+ mTotal = Value(0);
+ }
+
+ void record(Value v)
+ {
+ if (mCount)
+ {
+ mMin = llmin(mMin, v);
+ mMax = llmax(mMax, v);
+ }
+ else
+ {
+ mMin = v;
+ mMax = v;
+ }
+ mTotal += v;
+ ++mCount;
+ }
+
+ void merge(const LLSimpleStatMMM<VALUE_T> & src)
+ {
+ if (! mCount)
+ {
+ *this = src;
+ }
+ else if (src.mCount)
+ {
+ mMin = llmin(mMin, src.mMin);
+ mMax = llmax(mMax, src.mMax);
+ mCount += src.mCount;
+ mTotal += src.mTotal;
+ }
+ }
+
+ inline U32 getCount() const { return mCount; }
+ inline Value getMin() const { return mMin; }
+ inline Value getMax() const { return mMax; }
+ inline Value getMean() const { return mCount ? mTotal / mCount : mTotal; }
+
+protected:
+ U32 mCount;
+ Value mMin;
+ Value mMax;
+ Value mTotal;
+};
+
+#endif // LL_SIMPLESTAT_H
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 80cf7e3cd0..611f9de2e6 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -233,6 +233,8 @@ static LLHost gFirstSim;
static std::string gFirstSimSeedCap;
static LLVector3 gAgentStartLookAt(1.0f, 0.f, 0.f);
static std::string gAgentStartLocation = "safe";
+static bool mLoginStatePastUI = false;
+
boost::scoped_ptr<LLEventPump> LLStartUp::sStateWatcher(new LLEventStream("StartupState"));
boost::scoped_ptr<LLStartupListener> LLStartUp::sListener(new LLStartupListener());
@@ -706,7 +708,15 @@ bool idle_startup()
if (STATE_LOGIN_SHOW == LLStartUp::getStartupState())
{
LL_DEBUGS("AppInit") << "Initializing Window" << LL_ENDL;
-
+
+ // if we've gone backwards in the login state machine, to this state where we show the UI
+ // AND the debug setting to exit in this case is true, then go ahead and bail quickly
+ if ( mLoginStatePastUI && gSavedSettings.getBOOL("QuitOnLoginActivated") )
+ {
+ // no requirement for notification here - just exit
+ LLAppViewer::instance()->earlyExitNoNotify();
+ }
+
gViewerWindow->getWindow()->setCursor(UI_CURSOR_ARROW);
timeout_count = 0;
@@ -784,6 +794,11 @@ bool idle_startup()
if (STATE_LOGIN_WAIT == LLStartUp::getStartupState())
{
+ // when we get to this state, we've already been past the login UI
+ // (possiblely automatically) - flag this so we can test in the
+ // STATE_LOGIN_SHOW state if we've gone backwards
+ mLoginStatePastUI = true;
+
// Don't do anything. Wait for the login view to call the login_callback,
// which will push us to the next state.
@@ -810,6 +825,11 @@ bool idle_startup()
gKeyboard->resetKeys();
}
+ // when we get to this state, we've already been past the login UI
+ // (possiblely automatically) - flag this so we can test in the
+ // STATE_LOGIN_SHOW state if we've gone backwards
+ mLoginStatePastUI = true;
+
// save the credentials
std::string userid = "unknown";
if(gUserCredential.notNull())
@@ -3075,7 +3095,16 @@ bool process_login_success_response()
std::string map_server_url = response["map-server-url"];
if(!map_server_url.empty())
{
- gSavedSettings.setString("MapServerURL", map_server_url);
+ // We got an answer from the grid -> use that for map for the current session
+ gSavedSettings.setString("CurrentMapServerURL", map_server_url);
+ LL_INFOS("LLStartup") << "map-server-url : we got an answer from the grid : " << map_server_url << LL_ENDL;
+ }
+ else
+ {
+ // No answer from the grid -> use the default setting for current session
+ map_server_url = gSavedSettings.getString("MapServerURL");
+ gSavedSettings.setString("CurrentMapServerURL", map_server_url);
+ LL_INFOS("LLStartup") << "map-server-url : no map-server-url answer, we use the default setting for the map : " << map_server_url << LL_ENDL;
}
// Default male and female avatars allowing the user to choose their avatar on first login.
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index e9fc25404a..1b8be7a5b2 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -115,6 +115,7 @@ LLStatusBar::LLStatusBar(const LLRect& rect)
mSGBandwidth(NULL),
mSGPacketLoss(NULL),
mBtnVolume(NULL),
+ mBoxBalance(NULL),
mBalance(0),
mHealth(100),
mSquareMetersCredit(0),
@@ -168,6 +169,9 @@ BOOL LLStatusBar::postBuild()
getChild<LLUICtrl>("buyL")->setCommitCallback(
boost::bind(&LLStatusBar::onClickBuyCurrency, this));
+ mBoxBalance = getChild<LLTextBox>("balance");
+ mBoxBalance->setClickedCallback( &LLStatusBar::onClickBalance, this );
+
mBtnVolume = getChild<LLButton>( "volume_btn" );
mBtnVolume->setClickedCallback( onClickVolume, this );
mBtnVolume->setMouseEnterCallback(boost::bind(&LLStatusBar::onMouseEnterVolume, this));
@@ -304,6 +308,7 @@ void LLStatusBar::setVisibleForMouselook(bool visible)
{
mTextTime->setVisible(visible);
getChild<LLUICtrl>("balance_bg")->setVisible(visible);
+ mBoxBalance->setVisible(visible);
mBtnVolume->setVisible(visible);
mMediaToggle->setVisible(visible);
mSGBandwidth->setVisible(visible);
@@ -330,16 +335,15 @@ void LLStatusBar::setBalance(S32 balance)
std::string money_str = LLResMgr::getInstance()->getMonetaryString( balance );
- LLTextBox* balance_box = getChild<LLTextBox>("balance");
LLStringUtil::format_map_t string_args;
string_args["[AMT]"] = llformat("%s", money_str.c_str());
std::string label_str = getString("buycurrencylabel", string_args);
- balance_box->setValue(label_str);
+ mBoxBalance->setValue(label_str);
// Resize the L$ balance background to be wide enough for your balance plus the buy button
{
const S32 HPAD = 24;
- LLRect balance_rect = balance_box->getTextBoundingRect();
+ LLRect balance_rect = mBoxBalance->getTextBoundingRect();
LLRect buy_rect = getChildView("buyL")->getRect();
LLView* balance_bg_view = getChildView("balance_bg");
LLRect balance_bg_rect = balance_bg_view->getRect();
@@ -506,6 +510,14 @@ static void onClickVolume(void* data)
}
//static
+void LLStatusBar::onClickBalance(void* )
+{
+ // Force a balance request message:
+ LLStatusBar::sendMoneyBalanceRequest();
+ // The refresh of the display (call to setBalance()) will be done by process_money_balance_reply()
+}
+
+//static
void LLStatusBar::onClickMediaToggle(void* data)
{
LLStatusBar *status_bar = (LLStatusBar*)data;
diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h
index 2388aeb0c8..4ea3183d18 100644
--- a/indra/newview/llstatusbar.h
+++ b/indra/newview/llstatusbar.h
@@ -94,6 +94,7 @@ private:
void onClickScreen(S32 x, S32 y);
static void onClickMediaToggle(void* data);
+ static void onClickBalance(void* data);
private:
LLTextBox *mTextTime;
@@ -102,6 +103,7 @@ private:
LLStatGraph *mSGPacketLoss;
LLButton *mBtnVolume;
+ LLTextBox *mBoxBalance;
LLButton *mMediaToggle;
LLView* mScriptOut;
LLFrameTimer mClockUpdateTimer;
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 13fd51f473..4f63abb152 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -27,6 +27,7 @@
#include "llviewerprecompiledheaders.h"
#include <iostream>
+#include <map>
#include "llstl.h"
@@ -49,6 +50,7 @@
#include "llviewertexture.h"
#include "llviewerregion.h"
#include "llviewerstats.h"
+#include "llviewerassetstats.h"
#include "llworld.h"
//////////////////////////////////////////////////////////////////////////////
@@ -143,7 +145,7 @@ public:
/*virtual*/ bool deleteOK(); // called from update() (WORK THREAD)
~LLTextureFetchWorker();
- void relese() { --mActiveCount; }
+ // void relese() { --mActiveCount; }
S32 callbackHttpGet(const LLChannelDescriptors& channels,
const LLIOPipe::buffer_ptr_t& buffer,
@@ -161,9 +163,11 @@ public:
mGetReason = reason;
}
- void setCanUseHTTP(bool can_use_http) {mCanUseHTTP = can_use_http;}
- bool getCanUseHTTP()const {return mCanUseHTTP ;}
+ void setCanUseHTTP(bool can_use_http) { mCanUseHTTP = can_use_http; }
+ bool getCanUseHTTP() const { return mCanUseHTTP; }
+ LLTextureFetch & getFetcher() { return *mFetcher; }
+
protected:
LLTextureFetchWorker(LLTextureFetch* fetcher, const std::string& url, const LLUUID& id, const LLHost& host,
F32 priority, S32 discard, S32 size);
@@ -277,6 +281,8 @@ private:
S32 mLastPacket;
U16 mTotalPackets;
U8 mImageCodec;
+
+ LLViewerAssetStats::duration_t mMetricsStartTime;
};
//////////////////////////////////////////////////////////////////////////////
@@ -344,6 +350,18 @@ public:
}
mFetcher->removeFromHTTPQueue(mID, data_size);
+
+ if (worker->mMetricsStartTime)
+ {
+ LLViewerAssetStatsFF::record_response_thread1(LLViewerAssetType::AT_TEXTURE,
+ true,
+ LLImageBase::TYPE_AVATAR_BAKE == worker->mType,
+ LLViewerAssetStatsFF::get_timestamp() - worker->mMetricsStartTime);
+ worker->mMetricsStartTime = 0;
+ }
+ LLViewerAssetStatsFF::record_dequeue_thread1(LLViewerAssetType::AT_TEXTURE,
+ true,
+ LLImageBase::TYPE_AVATAR_BAKE == worker->mType);
}
else
{
@@ -368,6 +386,229 @@ private:
//////////////////////////////////////////////////////////////////////////////
+// Cross-thread messaging for asset metrics.
+
+/**
+ * @brief Base class for cross-thread requests made of the fetcher
+ *
+ * I believe the intent of the LLQueuedThread class was to
+ * have these operations derived from LLQueuedThread::QueuedRequest
+ * but the texture fetcher has elected to manage the queue
+ * in its own manner. So these are free-standing objects which are
+ * managed in simple FIFO order on the mCommands queue of the
+ * LLTextureFetch object.
+ *
+ * What each represents is a simple command sent from an
+ * outside thread into the TextureFetch thread to be processed
+ * in order and in a timely fashion (though not an absolute
+ * higher priority than other operations of the thread).
+ * Each operation derives a new class from the base customizing
+ * members, constructors and the doWork() method to effect
+ * the command.
+ *
+ * The flow is one-directional. There are two global instances
+ * of the LLViewerAssetStats collector, one for the main program's
+ * thread pointed to by gViewerAssetStatsMain and one for the
+ * TextureFetch thread pointed to by gViewerAssetStatsThread1.
+ * Common operations has each thread recording metrics events
+ * into the respective collector unconcerned with locking and
+ * the state of any other thread. But when the agent moves into
+ * a different region or the metrics timer expires and a report
+ * needs to be sent back to the grid, messaging across threads
+ * is required to distribute data and perform global actions.
+ * In pseudo-UML, it looks like:
+ *
+ * Main Thread1
+ * . .
+ * . .
+ * +-----+ .
+ * | AM | .
+ * +--+--+ .
+ * +-------+ | .
+ * | Main | +--+--+ .
+ * | | | SRE |---. .
+ * | Stats | +-----+ \ .
+ * | | | \ (uuid) +-----+
+ * | Coll. | +--+--+ `-------->| SR |
+ * +-------+ | MSC | +--+--+
+ * | ^ +-----+ |
+ * | | (uuid) / . +-----+ (uuid)
+ * | `--------' . | MSC |---------.
+ * | . +-----+ |
+ * | +-----+ . v
+ * | | TE | . +-------+
+ * | +--+--+ . | Thd1 |
+ * | | . | |
+ * | +-----+ . | Stats |
+ * `--------->| RSC | . | |
+ * +--+--+ . | Coll. |
+ * | . +-------+
+ * +--+--+ . |
+ * | SME |---. . |
+ * +-----+ \ . |
+ * . \ (clone) +-----+ |
+ * . `-------->| SM | |
+ * . +--+--+ |
+ * . | |
+ * . +-----+ |
+ * . | RSC |<--------'
+ * . +-----+
+ * . |
+ * . +-----+
+ * . | CP |--> HTTP POST
+ * . +-----+
+ * . .
+ * . .
+ *
+ *
+ * Key:
+ *
+ * SRE - Set Region Enqueued. Enqueue a 'Set Region' command in
+ * the other thread providing the new UUID of the region.
+ * TFReqSetRegion carries the data.
+ * SR - Set Region. New region UUID is sent to the thread-local
+ * collector.
+ * SME - Send Metrics Enqueued. Enqueue a 'Send Metrics' command
+ * including an ownership transfer of a cloned LLViewerAssetStats.
+ * TFReqSendMetrics carries the data.
+ * SM - Send Metrics. Global metrics reporting operation. Takes
+ * the cloned stats from the command, merges it with the
+ * thread's local stats, converts to LLSD and sends it on
+ * to the grid.
+ * AM - Agent Moved. Agent has completed some sort of move to a
+ * new region.
+ * TE - Timer Expired. Metrics timer has expired (on the order
+ * of 10 minutes).
+ * CP - CURL Post
+ * MSC - Modify Stats Collector. State change in the thread-local
+ * collector. Typically a region change which affects the
+ * global pointers used to find the 'current stats'.
+ * RSC - Read Stats Collector. Extract collector data cloning it
+ * (i.e. deep copy) when necessary.
+ *
+ */
+class LLTextureFetch::TFRequest // : public LLQueuedThread::QueuedRequest
+{
+public:
+ // Default ctors and assignment operator are correct.
+
+ virtual ~TFRequest()
+ {}
+
+ // Patterned after QueuedRequest's method but expected behavior
+ // is different. Always expected to complete on the first call
+ // and work dispatcher will assume the same and delete the
+ // request after invocation.
+ virtual bool doWork(LLTextureFetch * fetcher) = 0;
+};
+
+namespace
+{
+
+/**
+ * @brief Implements a 'Set Region' cross-thread command.
+ *
+ * When an agent moves to a new region, subsequent metrics need
+ * to be binned into a new or existing stats collection in 1:1
+ * relationship with the region. We communicate this region
+ * change across the threads involved in the communication with
+ * this message.
+ *
+ * Corresponds to LLTextureFetch::commandSetRegion()
+ */
+class TFReqSetRegion : public LLTextureFetch::TFRequest
+{
+public:
+ TFReqSetRegion(U64 region_handle)
+ : LLTextureFetch::TFRequest(),
+ mRegionHandle(region_handle)
+ {}
+ TFReqSetRegion & operator=(const TFReqSetRegion &); // Not defined
+
+ virtual ~TFReqSetRegion()
+ {}
+
+ virtual bool doWork(LLTextureFetch * fetcher);
+
+public:
+ const U64 mRegionHandle;
+};
+
+
+/**
+ * @brief Implements a 'Send Metrics' cross-thread command.
+ *
+ * This is the big operation. The main thread gathers metrics
+ * for a period of minutes into LLViewerAssetStats and other
+ * objects then makes a snapshot of the data by cloning the
+ * collector. This command transfers the clone, along with a few
+ * additional arguments (UUIDs), handing ownership to the
+ * TextureFetch thread. It then merges its own data into the
+ * cloned copy, converts to LLSD and kicks off an HTTP POST of
+ * the resulting data to the currently active metrics collector.
+ *
+ * Corresponds to LLTextureFetch::commandSendMetrics()
+ */
+class TFReqSendMetrics : public LLTextureFetch::TFRequest
+{
+public:
+ /**
+ * Construct the 'Send Metrics' command to have the TextureFetch
+ * thread add and log metrics data.
+ *
+ * @param caps_url URL of a "ViewerMetrics" Caps target
+ * to receive the data. Does not have to
+ * be associated with a particular region.
+ *
+ * @param session_id UUID of the agent's session.
+ *
+ * @param agent_id UUID of the agent. (Being pure here...)
+ *
+ * @param main_stats Pointer to a clone of the main thread's
+ * LLViewerAssetStats data. Thread1 takes
+ * ownership of the copy and disposes of it
+ * when done.
+ */
+ TFReqSendMetrics(const std::string & caps_url,
+ const LLUUID & session_id,
+ const LLUUID & agent_id,
+ LLViewerAssetStats * main_stats)
+ : LLTextureFetch::TFRequest(),
+ mCapsURL(caps_url),
+ mSessionID(session_id),
+ mAgentID(agent_id),
+ mMainStats(main_stats)
+ {}
+ TFReqSendMetrics & operator=(const TFReqSendMetrics &); // Not defined
+
+ virtual ~TFReqSendMetrics();
+
+ virtual bool doWork(LLTextureFetch * fetcher);
+
+public:
+ const std::string mCapsURL;
+ const LLUUID mSessionID;
+ const LLUUID mAgentID;
+ LLViewerAssetStats * mMainStats;
+};
+
+/*
+ * Examines the merged viewer metrics report and if found to be too long,
+ * will attempt to truncate it in some reasonable fashion.
+ *
+ * @param max_regions Limit of regions allowed in report.
+ *
+ * @param metrics Full, merged viewer metrics report.
+ *
+ * @returns If data was truncated, returns true.
+ */
+bool truncate_viewer_metrics(int max_regions, LLSD & metrics);
+
+} // end of anonymous namespace
+
+
+//////////////////////////////////////////////////////////////////////////////
+
//static
const char* LLTextureFetchWorker::sStateDescs[] = {
"INVALID",
@@ -385,6 +626,9 @@ const char* LLTextureFetchWorker::sStateDescs[] = {
"DONE",
};
+// static
+volatile bool LLTextureFetch::svMetricsDataBreak(true); // Start with a data break
+
// called from MAIN THREAD
LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher,
@@ -434,7 +678,8 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher,
mFirstPacket(0),
mLastPacket(-1),
mTotalPackets(0),
- mImageCodec(IMG_CODEC_INVALID)
+ mImageCodec(IMG_CODEC_INVALID),
+ mMetricsStartTime(0)
{
mCanUseNET = mUrl.empty() ;
@@ -602,6 +847,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
return true; // abort
}
}
+
if(mImagePriority < F_ALMOST_ZERO)
{
if (mState == INIT || mState == LOAD_FROM_NETWORK || mState == LOAD_FROM_SIMULATOR)
@@ -811,7 +1057,15 @@ bool LLTextureFetchWorker::doWork(S32 param)
mRequestedDiscard = mDesiredDiscard;
mSentRequest = QUEUED;
mFetcher->addToNetworkQueue(this);
+ if (! mMetricsStartTime)
+ {
+ mMetricsStartTime = LLViewerAssetStatsFF::get_timestamp();
+ }
+ LLViewerAssetStatsFF::record_enqueue_thread1(LLViewerAssetType::AT_TEXTURE,
+ false,
+ LLImageBase::TYPE_AVATAR_BAKE == mType);
setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority);
+
return false;
}
else
@@ -820,6 +1074,12 @@ bool LLTextureFetchWorker::doWork(S32 param)
//llassert_always(mFetcher->mNetworkQueue.find(mID) != mFetcher->mNetworkQueue.end());
// Make certain this is in the network queue
//mFetcher->addToNetworkQueue(this);
+ //if (! mMetricsStartTime)
+ //{
+ // mMetricsStartTime = LLViewerAssetStatsFF::get_timestamp();
+ //}
+ //LLViewerAssetStatsFF::record_enqueue_thread1(LLViewerAssetType::AT_TEXTURE, false,
+ // LLImageBase::TYPE_AVATAR_BAKE == mType);
//setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority);
return false;
}
@@ -843,11 +1103,30 @@ bool LLTextureFetchWorker::doWork(S32 param)
}
setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority);
mState = DECODE_IMAGE;
- mWriteToCacheState = SHOULD_WRITE ;
+ mWriteToCacheState = SHOULD_WRITE;
+
+ if (mMetricsStartTime)
+ {
+ LLViewerAssetStatsFF::record_response_thread1(LLViewerAssetType::AT_TEXTURE,
+ false,
+ LLImageBase::TYPE_AVATAR_BAKE == mType,
+ LLViewerAssetStatsFF::get_timestamp() - mMetricsStartTime);
+ mMetricsStartTime = 0;
+ }
+ LLViewerAssetStatsFF::record_dequeue_thread1(LLViewerAssetType::AT_TEXTURE,
+ false,
+ LLImageBase::TYPE_AVATAR_BAKE == mType);
}
else
{
mFetcher->addToNetworkQueue(this); // failsafe
+ if (! mMetricsStartTime)
+ {
+ mMetricsStartTime = LLViewerAssetStatsFF::get_timestamp();
+ }
+ LLViewerAssetStatsFF::record_enqueue_thread1(LLViewerAssetType::AT_TEXTURE,
+ false,
+ LLImageBase::TYPE_AVATAR_BAKE == mType);
setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority);
}
return false;
@@ -909,6 +1188,14 @@ bool LLTextureFetchWorker::doWork(S32 param)
mState = WAIT_HTTP_REQ;
mFetcher->addToHTTPQueue(mID);
+ if (! mMetricsStartTime)
+ {
+ mMetricsStartTime = LLViewerAssetStatsFF::get_timestamp();
+ }
+ LLViewerAssetStatsFF::record_enqueue_thread1(LLViewerAssetType::AT_TEXTURE,
+ true,
+ LLImageBase::TYPE_AVATAR_BAKE == mType);
+
// Will call callbackHttpGet when curl request completes
std::vector<std::string> headers;
headers.push_back("Accept: image/x-j2c");
@@ -1523,7 +1810,7 @@ bool LLTextureFetchWorker::writeToCacheComplete()
//////////////////////////////////////////////////////////////////////////////
// public
-LLTextureFetch::LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* imagedecodethread, bool threaded)
+LLTextureFetch::LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* imagedecodethread, bool threaded, bool qa_mode)
: LLWorkerThread("TextureFetch", threaded),
mDebugCount(0),
mDebugPause(FALSE),
@@ -1535,8 +1822,10 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* image
mImageDecodeThread(imagedecodethread),
mTextureBandwidth(0),
mHTTPTextureBits(0),
- mCurlGetRequest(NULL)
+ mCurlGetRequest(NULL),
+ mQAMode(qa_mode)
{
+ mCurlPOSTRequestCount = 0;
mMaxBandwidth = gSavedSettings.getF32("ThrottleBandwidthKBPS");
mTextureInfo.setUpLogging(gSavedSettings.getBOOL("LogTextureDownloadsToViewerLog"), gSavedSettings.getBOOL("LogTextureDownloadsToSimulator"), gSavedSettings.getU32("TextureLoggingThreshold"));
}
@@ -1545,6 +1834,13 @@ LLTextureFetch::~LLTextureFetch()
{
clearDeleteList() ;
+ while (! mCommands.empty())
+ {
+ TFRequest * req(mCommands.front());
+ mCommands.erase(mCommands.begin());
+ delete req;
+ }
+
// ~LLQueuedThread() called here
}
@@ -1825,8 +2121,76 @@ bool LLTextureFetch::updateRequestPriority(const LLUUID& id, F32 priority)
return res;
}
+// Replicates and expands upon the base class's
+// getPending() implementation. getPending() and
+// runCondition() replicate one another's logic to
+// an extent and are sometimes used for the same
+// function (deciding whether or not to sleep/pause
+// a thread). So the implementations need to stay
+// in step, at least until this can be refactored and
+// the redundancy eliminated.
+//
+// May be called from any thread
+
+//virtual
+S32 LLTextureFetch::getPending()
+{
+ S32 res;
+ lockData();
+ {
+ LLMutexLock lock(&mQueueMutex);
+
+ res = mRequestQueue.size();
+ res += mCurlPOSTRequestCount;
+ res += mCommands.size();
+ }
+ unlockData();
+ return res;
+}
+
+// virtual
+bool LLTextureFetch::runCondition()
+{
+ // Caller is holding the lock on LLThread's condition variable.
+
+ // LLQueuedThread, unlike its base class LLThread, makes this a
+ // private method which is unfortunate. I want to use it directly
+ // but I'm going to have to re-implement the logic here (or change
+ // declarations, which I don't want to do right now).
+ //
+ // Changes here may need to be reflected in getPending().
+
+ bool have_no_commands(false);
+ {
+ LLMutexLock lock(&mQueueMutex);
+
+ have_no_commands = mCommands.empty();
+ }
+
+ bool have_no_curl_requests(0 == mCurlPOSTRequestCount);
+
+ return ! (have_no_commands
+ && have_no_curl_requests
+ && (mRequestQueue.empty() && mIdleThread)); // From base class
+}
+
//////////////////////////////////////////////////////////////////////////////
+// MAIN THREAD (unthreaded envs), WORKER THREAD (threaded envs)
+void LLTextureFetch::commonUpdate()
+{
+ // Run a cross-thread command, if any.
+ cmdDoWork();
+
+ // Update Curl on same thread as mCurlGetRequest was constructed
+ S32 processed = mCurlGetRequest->process();
+ if (processed > 0)
+ {
+ lldebugs << "processed: " << processed << " messages." << llendl;
+ }
+}
+
+
// MAIN THREAD
//virtual
S32 LLTextureFetch::update(U32 max_time_ms)
@@ -1852,12 +2216,7 @@ S32 LLTextureFetch::update(U32 max_time_ms)
if (!mThreaded)
{
- // Update Curl on same thread as mCurlGetRequest was constructed
- S32 processed = mCurlGetRequest->process();
- if (processed > 0)
- {
- lldebugs << "processed: " << processed << " messages." << llendl;
- }
+ commonUpdate();
}
return res;
@@ -1912,12 +2271,7 @@ void LLTextureFetch::threadedUpdate()
}
process_timer.reset();
- // Update Curl on same thread as mCurlGetRequest was constructed
- S32 processed = mCurlGetRequest->process();
- if (processed > 0)
- {
- lldebugs << "processed: " << processed << " messages." << llendl;
- }
+ commonUpdate();
#if 0
const F32 INFO_TIME = 1.0f;
@@ -2367,3 +2721,280 @@ void LLTextureFetch::dump()
}
}
+//////////////////////////////////////////////////////////////////////////////
+
+// cross-thread command methods
+
+void LLTextureFetch::commandSetRegion(U64 region_handle)
+{
+ TFReqSetRegion * req = new TFReqSetRegion(region_handle);
+
+ cmdEnqueue(req);
+}
+
+void LLTextureFetch::commandSendMetrics(const std::string & caps_url,
+ const LLUUID & session_id,
+ const LLUUID & agent_id,
+ LLViewerAssetStats * main_stats)
+{
+ TFReqSendMetrics * req = new TFReqSendMetrics(caps_url, session_id, agent_id, main_stats);
+
+ cmdEnqueue(req);
+}
+
+void LLTextureFetch::commandDataBreak()
+{
+ // The pedantically correct way to implement this is to create a command
+ // request object in the above fashion and enqueue it. However, this is
+ // simple data of an advisorial not operational nature and this case
+ // of shared-write access is tolerable.
+
+ LLTextureFetch::svMetricsDataBreak = true;
+}
+
+void LLTextureFetch::cmdEnqueue(TFRequest * req)
+{
+ lockQueue();
+ mCommands.push_back(req);
+ unlockQueue();
+
+ unpause();
+}
+
+LLTextureFetch::TFRequest * LLTextureFetch::cmdDequeue()
+{
+ TFRequest * ret = 0;
+
+ lockQueue();
+ if (! mCommands.empty())
+ {
+ ret = mCommands.front();
+ mCommands.erase(mCommands.begin());
+ }
+ unlockQueue();
+
+ return ret;
+}
+
+void LLTextureFetch::cmdDoWork()
+{
+ if (mDebugPause)
+ {
+ return; // debug: don't do any work
+ }
+
+ TFRequest * req = cmdDequeue();
+ if (req)
+ {
+ // One request per pass should really be enough for this.
+ req->doWork(this);
+ delete req;
+ }
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+// Private (anonymous) class methods implementing the command scheme.
+
+namespace
+{
+
+/**
+ * Implements the 'Set Region' command.
+ *
+ * Thread: Thread1 (TextureFetch)
+ */
+bool
+TFReqSetRegion::doWork(LLTextureFetch *)
+{
+ LLViewerAssetStatsFF::set_region_thread1(mRegionHandle);
+
+ return true;
+}
+
+
+TFReqSendMetrics::~TFReqSendMetrics()
+{
+ delete mMainStats;
+ mMainStats = 0;
+}
+
+
+/**
+ * Implements the 'Send Metrics' command. Takes over
+ * ownership of the passed LLViewerAssetStats pointer.
+ *
+ * Thread: Thread1 (TextureFetch)
+ */
+bool
+TFReqSendMetrics::doWork(LLTextureFetch * fetcher)
+{
+ /*
+ * HTTP POST responder. Doesn't do much but tries to
+ * detect simple breaks in recording the metrics stream.
+ *
+ * The 'volatile' modifiers don't indicate signals,
+ * mmap'd memory or threads, really. They indicate that
+ * the referenced data is part of a pseudo-closure for
+ * this responder rather than being required for correct
+ * operation.
+ *
+ * We don't try very hard with the POST request. We give
+ * it one shot and that's more-or-less it. With a proper
+ * refactoring of the LLQueuedThread usage, these POSTs
+ * could be put in a request object and made more reliable.
+ */
+ class lcl_responder : public LLCurl::Responder
+ {
+ public:
+ lcl_responder(LLTextureFetch * fetcher,
+ S32 expected_sequence,
+ volatile const S32 & live_sequence,
+ volatile bool & reporting_break,
+ volatile bool & reporting_started)
+ : LLCurl::Responder(),
+ mFetcher(fetcher),
+ mExpectedSequence(expected_sequence),
+ mLiveSequence(live_sequence),
+ mReportingBreak(reporting_break),
+ mReportingStarted(reporting_started)
+ {
+ mFetcher->incrCurlPOSTCount();
+ }
+
+ ~lcl_responder()
+ {
+ mFetcher->decrCurlPOSTCount();
+ }
+
+ // virtual
+ void error(U32 status_num, const std::string & reason)
+ {
+ if (mLiveSequence == mExpectedSequence)
+ {
+ mReportingBreak = true;
+ }
+ LL_WARNS("Texture") << "Break in metrics stream due to POST failure to metrics collection service. Reason: "
+ << reason << LL_ENDL;
+ }
+
+ // virtual
+ void result(const LLSD & content)
+ {
+ if (mLiveSequence == mExpectedSequence)
+ {
+ mReportingBreak = false;
+ mReportingStarted = true;
+ }
+ }
+
+ private:
+ LLTextureFetch * mFetcher;
+ S32 mExpectedSequence;
+ volatile const S32 & mLiveSequence;
+ volatile bool & mReportingBreak;
+ volatile bool & mReportingStarted;
+
+ }; // class lcl_responder
+
+ if (! gViewerAssetStatsThread1)
+ return true;
+
+ static volatile bool reporting_started(false);
+ static volatile S32 report_sequence(0);
+
+ // We've taken over ownership of the stats copy at this
+ // point. Get a working reference to it for merging here
+ // but leave it in 'this'. Destructor will rid us of it.
+ LLViewerAssetStats & main_stats = *mMainStats;
+
+ // Merge existing stats into those from main, convert to LLSD
+ main_stats.merge(*gViewerAssetStatsThread1);
+ LLSD merged_llsd = main_stats.asLLSD(true);
+
+ // Add some additional meta fields to the content
+ merged_llsd["session_id"] = mSessionID;
+ merged_llsd["agent_id"] = mAgentID;
+ merged_llsd["message"] = "ViewerAssetMetrics"; // Identifies the type of metrics
+ merged_llsd["sequence"] = report_sequence; // Sequence number
+ merged_llsd["initial"] = ! reporting_started; // Initial data from viewer
+ merged_llsd["break"] = LLTextureFetch::svMetricsDataBreak; // Break in data prior to this report
+
+ // Update sequence number
+ if (S32_MAX == ++report_sequence)
+ report_sequence = 0;
+
+ // Limit the size of the stats report if necessary.
+ merged_llsd["truncated"] = truncate_viewer_metrics(10, merged_llsd);
+
+ if (! mCapsURL.empty())
+ {
+ LLCurlRequest::headers_t headers;
+ fetcher->getCurlRequest().post(mCapsURL,
+ headers,
+ merged_llsd,
+ new lcl_responder(fetcher,
+ report_sequence,
+ report_sequence,
+ LLTextureFetch::svMetricsDataBreak,
+ reporting_started));
+ }
+ else
+ {
+ LLTextureFetch::svMetricsDataBreak = true;
+ }
+
+ // In QA mode, Metrics submode, log the result for ease of testing
+ if (fetcher->isQAMode())
+ {
+ LL_INFOS("Textures") << merged_llsd << LL_ENDL;
+ }
+
+ gViewerAssetStatsThread1->reset();
+
+ return true;
+}
+
+
+bool
+truncate_viewer_metrics(int max_regions, LLSD & metrics)
+{
+ static const LLSD::String reg_tag("regions");
+ static const LLSD::String duration_tag("duration");
+
+ LLSD & reg_map(metrics[reg_tag]);
+ if (reg_map.size() <= max_regions)
+ {
+ return false;
+ }
+
+ // Build map of region hashes ordered by duration
+ typedef std::multimap<LLSD::Real, int> reg_ordered_list_t;
+ reg_ordered_list_t regions_by_duration;
+
+ int ind(0);
+ LLSD::array_const_iterator it_end(reg_map.endArray());
+ for (LLSD::array_const_iterator it(reg_map.beginArray()); it_end != it; ++it, ++ind)
+ {
+ LLSD::Real duration = (*it)[duration_tag].asReal();
+ regions_by_duration.insert(reg_ordered_list_t::value_type(duration, ind));
+ }
+
+ // Build a replacement regions array with the longest-persistence regions
+ LLSD new_region(LLSD::emptyArray());
+ reg_ordered_list_t::const_reverse_iterator it2_end(regions_by_duration.rend());
+ reg_ordered_list_t::const_reverse_iterator it2(regions_by_duration.rbegin());
+ for (int i(0); i < max_regions && it2_end != it2; ++i, ++it2)
+ {
+ new_region.append(reg_map[it2->second]);
+ }
+ reg_map = new_region;
+
+ return true;
+}
+
+} // end of anonymous namespace
+
+
+
diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h
index 796109df06..ad00a7ea36 100644
--- a/indra/newview/lltexturefetch.h
+++ b/indra/newview/lltexturefetch.h
@@ -33,6 +33,7 @@
#include "llworkerthread.h"
#include "llcurl.h"
#include "lltextureinfo.h"
+#include "llapr.h"
class LLViewerTexture;
class LLTextureFetchWorker;
@@ -40,6 +41,7 @@ class HTTPGetResponder;
class LLTextureCache;
class LLImageDecodeThread;
class LLHost;
+class LLViewerAssetStats;
// Interface class
class LLTextureFetch : public LLWorkerThread
@@ -48,9 +50,11 @@ class LLTextureFetch : public LLWorkerThread
friend class HTTPGetResponder;
public:
- LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* imagedecodethread, bool threaded);
+ LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* imagedecodethread, bool threaded, bool qa_mode);
~LLTextureFetch();
+ class TFRequest;
+
/*virtual*/ S32 update(U32 max_time_ms);
void shutDownTextureCacheThread() ; //called in the main thread after the TextureCacheThread shuts down.
void shutDownImageDecodeThread() ; //called in the main thread after the ImageDecodeThread shuts down.
@@ -77,28 +81,77 @@ public:
S32 getNumHTTPRequests() ;
// Public for access by callbacks
+ S32 getPending();
void lockQueue() { mQueueMutex.lock(); }
void unlockQueue() { mQueueMutex.unlock(); }
LLTextureFetchWorker* getWorker(const LLUUID& id);
LLTextureFetchWorker* getWorkerAfterLock(const LLUUID& id);
LLTextureInfo* getTextureInfo() { return &mTextureInfo; }
-
+
+ // Commands available to other threads to control metrics gathering operations.
+ void commandSetRegion(U64 region_handle);
+ void commandSendMetrics(const std::string & caps_url,
+ const LLUUID & session_id,
+ const LLUUID & agent_id,
+ LLViewerAssetStats * main_stats);
+ void commandDataBreak();
+
+ LLCurlRequest & getCurlRequest() { return *mCurlGetRequest; }
+
+ bool isQAMode() const { return mQAMode; }
+
+ // Curl POST counter maintenance
+ inline void incrCurlPOSTCount() { mCurlPOSTRequestCount++; }
+ inline void decrCurlPOSTCount() { mCurlPOSTRequestCount--; }
+
protected:
void addToNetworkQueue(LLTextureFetchWorker* worker);
void removeFromNetworkQueue(LLTextureFetchWorker* worker, bool cancel);
void addToHTTPQueue(const LLUUID& id);
void removeFromHTTPQueue(const LLUUID& id, S32 received_size = 0);
void removeRequest(LLTextureFetchWorker* worker, bool cancel);
- // Called from worker thread (during doWork)
- void processCurlRequests();
+
+ // Overrides from the LLThread tree
+ bool runCondition();
private:
void sendRequestListToSimulators();
/*virtual*/ void startThread(void);
/*virtual*/ void endThread(void);
/*virtual*/ void threadedUpdate(void);
-
+ void commonUpdate();
+
+ // Metrics command helpers
+ /**
+ * Enqueues a command request at the end of the command queue
+ * and wakes up the thread as needed.
+ *
+ * Takes ownership of the TFRequest object.
+ *
+ * Method locks the command queue.
+ */
+ void cmdEnqueue(TFRequest *);
+
+ /**
+ * Returns the first TFRequest object in the command queue or
+ * NULL if none is present.
+ *
+ * Caller acquires ownership of the object and must dispose of it.
+ *
+ * Method locks the command queue.
+ */
+ TFRequest * cmdDequeue();
+
+ /**
+ * Processes the first command in the queue disposing of the
+ * request on completion. Successive calls are needed to perform
+ * additional commands.
+ *
+ * Method locks the command queue.
+ */
+ void cmdDoWork();
+
public:
LLUUID mDebugID;
S32 mDebugCount;
@@ -107,7 +160,7 @@ public:
S32 mBadPacketCount;
private:
- LLMutex mQueueMutex; //to protect mRequestMap only
+ LLMutex mQueueMutex; //to protect mRequestMap and mCommands only
LLMutex mNetworkQueueMutex; //to protect mNetworkQueue, mHTTPTextureQueue and mCancelQueue.
LLTextureCache* mTextureCache;
@@ -129,6 +182,29 @@ private:
LLTextureInfo mTextureInfo;
U32 mHTTPTextureBits;
+
+ // Out-of-band cross-thread command queue. This command queue
+ // is logically tied to LLQueuedThread's list of
+ // QueuedRequest instances and so must be covered by the
+ // same locks.
+ typedef std::vector<TFRequest *> command_queue_t;
+ command_queue_t mCommands;
+
+ // If true, modifies some behaviors that help with QA tasks.
+ const bool mQAMode;
+
+ // Count of POST requests outstanding. We maintain the count
+ // indirectly in the CURL request responder's ctor and dtor and
+ // use it when determining whether or not to sleep the thread. Can't
+ // use the LLCurl module's request counter as it isn't thread compatible.
+ // *NOTE: Don't mix Atomic and static, apr_initialize must be called first.
+ LLAtomic32<S32> mCurlPOSTRequestCount;
+
+public:
+ // A probabilistically-correct indicator that the current
+ // attempt to log metrics follows a break in the metrics stream
+ // reporting due to either startup or a problem POSTing data.
+ static volatile bool svMetricsDataBreak;
};
#endif // LL_LLTEXTUREFETCH_H
diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp
index 8176b8c1f9..fd5582d6f7 100644
--- a/indra/newview/lltoast.cpp
+++ b/indra/newview/lltoast.cpp
@@ -113,7 +113,7 @@ LLToast::LLToast(const LLToast::Params& p)
mHideBtnPressed(false),
mIsTip(p.is_tip),
mWrapperPanel(NULL),
- mIsTransparent(false)
+ mIsFading(false)
{
mTimer.reset(new LLToastLifeTimer(this, p.lifetime_secs));
@@ -125,6 +125,9 @@ LLToast::LLToast(const LLToast::Params& p)
mWrapperPanel->setMouseEnterCallback(boost::bind(&LLToast::onToastMouseEnter, this));
mWrapperPanel->setMouseLeaveCallback(boost::bind(&LLToast::onToastMouseLeave, this));
+ setBackgroundOpaque(TRUE); // *TODO: obsolete
+ updateTransparency();
+
if(mPanel)
{
insertPanel(mPanel);
@@ -141,10 +144,6 @@ LLToast::LLToast(const LLToast::Params& p)
// init callbacks if present
if(!p.on_delete_toast().empty())
mOnDeleteToastSignal.connect(p.on_delete_toast());
-
- // *TODO: This signal doesn't seem to be used at all.
- if(!p.on_mouse_enter().empty())
- mOnMouseEnterSignal.connect(p.on_mouse_enter());
}
void LLToast::reshape(S32 width, S32 height, BOOL called_from_parent)
@@ -183,7 +182,7 @@ LLToast::~LLToast()
void LLToast::hide()
{
setVisible(FALSE);
- setTransparentState(false);
+ setFading(false);
mTimer->stop();
mIsHidden = true;
mOnFadeSignal(this);
@@ -194,7 +193,7 @@ void LLToast::onFocusLost()
if(mWrapperPanel && !isBackgroundVisible())
{
// Lets make wrapper panel behave like a floater
- setBackgroundOpaque(FALSE);
+ updateTransparency();
}
}
@@ -203,7 +202,7 @@ void LLToast::onFocusReceived()
if(mWrapperPanel && !isBackgroundVisible())
{
// Lets make wrapper panel behave like a floater
- setBackgroundOpaque(TRUE);
+ updateTransparency();
}
}
@@ -248,22 +247,24 @@ void LLToast::expire()
{
if (mCanFade)
{
- if (mIsTransparent)
+ if (mIsFading)
{
+ // Fade timer expired. Time to hide.
hide();
}
else
{
- setTransparentState(true);
+ // "Life" time has ended. Time to fade.
+ setFading(true);
mTimer->restart();
}
}
}
-void LLToast::setTransparentState(bool transparent)
+void LLToast::setFading(bool transparent)
{
- setBackgroundOpaque(!transparent);
- mIsTransparent = transparent;
+ mIsFading = transparent;
+ updateTransparency();
if (transparent)
{
@@ -279,7 +280,7 @@ F32 LLToast::getTimeLeftToLive()
{
F32 time_to_live = mTimer->getRemainingTimeF32();
- if (!mIsTransparent)
+ if (!mIsFading)
{
time_to_live += mToastFadingTime;
}
@@ -351,7 +352,6 @@ void LLToast::setVisible(BOOL show)
if(show)
{
- setBackgroundOpaque(TRUE);
if(!mTimer->getStarted() && mCanFade)
{
mTimer->start();
@@ -393,7 +393,7 @@ void LLToast::onToastMouseEnter()
{
mOnToastHoverSignal(this, MOUSE_ENTER);
- setBackgroundOpaque(TRUE);
+ updateTransparency();
//toasts fading is management by Screen Channel
@@ -402,7 +402,6 @@ void LLToast::onToastMouseEnter()
{
mHideBtn->setVisible(TRUE);
}
- mOnMouseEnterSignal(this);
mToastMouseEnterSignal(this, getValue());
}
}
@@ -423,6 +422,8 @@ void LLToast::onToastMouseLeave()
{
mOnToastHoverSignal(this, MOUSE_LEAVE);
+ updateTransparency();
+
//toasts fading is management by Screen Channel
if(mHideBtn && mHideBtn->getEnabled())
@@ -450,20 +451,45 @@ void LLToast::setBackgroundOpaque(BOOL b)
}
}
-void LLNotificationsUI::LLToast::stopFading()
+void LLToast::updateTransparency()
+{
+ ETypeTransparency transparency_type;
+
+ if (mCanFade)
+ {
+ // Notification toasts (including IM/chat toasts) change their transparency on hover.
+ if (isHovered())
+ {
+ transparency_type = TT_ACTIVE;
+ }
+ else
+ {
+ transparency_type = mIsFading ? TT_FADING : TT_INACTIVE;
+ }
+ }
+ else
+ {
+ // Transparency of alert toasts depends on focus.
+ transparency_type = hasFocus() ? TT_ACTIVE : TT_INACTIVE;
+ }
+
+ LLFloater::updateTransparency(transparency_type);
+}
+
+void LLNotificationsUI::LLToast::stopTimer()
{
if(mCanFade)
{
- setTransparentState(false);
+ setFading(false);
mTimer->stop();
}
}
-void LLNotificationsUI::LLToast::startFading()
+void LLNotificationsUI::LLToast::startTimer()
{
if(mCanFade)
{
- setTransparentState(false);
+ setFading(false);
mTimer->start();
}
}
diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h
index fb534561c9..242f786bf2 100644
--- a/indra/newview/lltoast.h
+++ b/indra/newview/lltoast.h
@@ -90,8 +90,7 @@ public:
fading_time_secs; // Number of seconds while a toast is transparent
- Optional<toast_callback_t> on_delete_toast,
- on_mouse_enter;
+ Optional<toast_callback_t> on_delete_toast;
Optional<bool> can_fade,
can_be_stored,
enable_hide_btn,
@@ -115,11 +114,11 @@ public:
//Fading
- /** Stop fading timer */
- virtual void stopFading();
+ /** Stop lifetime/fading timer */
+ virtual void stopTimer();
- /** Start fading timer */
- virtual void startFading();
+ /** Start lifetime/fading timer */
+ virtual void startTimer();
bool isHovered();
@@ -182,7 +181,6 @@ public:
// Registers signals/callbacks for events
toast_signal_t mOnFadeSignal;
- toast_signal_t mOnMouseEnterSignal;
toast_signal_t mOnDeleteToastSignal;
toast_signal_t mOnToastDestroyedSignal;
boost::signals2::connection setOnFadeCallback(toast_callback_t cb) { return mOnFadeSignal.connect(cb); }
@@ -200,6 +198,9 @@ public:
LLHandle<LLToast> getHandle() { mHandle.bind(this); return mHandle; }
+protected:
+ void updateTransparency();
+
private:
void onToastMouseEnter();
@@ -208,7 +209,7 @@ private:
void expire();
- void setTransparentState(bool transparent);
+ void setFading(bool fading);
LLUUID mNotificationID;
LLUUID mSessionID;
@@ -234,7 +235,7 @@ private:
bool mHideBtnPressed;
bool mIsHidden; // this flag is TRUE when a toast has faded or was hidden with (x) button (EXT-1849)
bool mIsTip;
- bool mIsTransparent;
+ bool mIsFading;
commit_signal_t mToastMouseEnterSignal;
commit_signal_t mToastMouseLeaveSignal;
diff --git a/indra/newview/lltoastgroupnotifypanel.cpp b/indra/newview/lltoastgroupnotifypanel.cpp
index 563c27c4d7..75178a6ef8 100644
--- a/indra/newview/lltoastgroupnotifypanel.cpp
+++ b/indra/newview/lltoastgroupnotifypanel.cpp
@@ -77,6 +77,7 @@ LLToastGroupNotifyPanel::LLToastGroupNotifyPanel(LLNotificationPtr& notification
from << from_name << "/" << groupData.mName;
LLTextBox* pTitleText = getChild<LLTextBox>("title");
pTitleText->setValue(from.str());
+ pTitleText->setToolTip(from.str());
//message subject
const std::string& subject = payload["subject"].asString();
diff --git a/indra/newview/lltoastscripttextbox.cpp b/indra/newview/lltoastscripttextbox.cpp
index c013f521cc..2529ec865a 100644
--- a/indra/newview/lltoastscripttextbox.cpp
+++ b/indra/newview/lltoastscripttextbox.cpp
@@ -46,11 +46,16 @@
const S32 LLToastScriptTextbox::DEFAULT_MESSAGE_MAX_LINE_COUNT= 7;
-LLToastScriptTextbox::LLToastScriptTextbox(LLNotificationPtr& notification)
-: LLToastNotifyPanel(notification)
+LLToastScriptTextbox::LLToastScriptTextbox(const LLNotificationPtr& notification)
+: LLToastPanel(notification)
{
buildFromFile( "panel_notify_textbox.xml");
+ LLTextEditor* text_editorp = getChild<LLTextEditor>("text_editor_box");
+ text_editorp->setValue(notification->getMessage());
+
+ getChild<LLButton>("ignore_btn")->setClickedCallback(boost::bind(&LLToastScriptTextbox::onClickIgnore, this));
+
const LLSD& payload = notification->getPayload();
//message body
@@ -107,3 +112,10 @@ void LLToastScriptTextbox::onClickSubmit()
llwarns << response << llendl;
}
}
+
+void LLToastScriptTextbox::onClickIgnore()
+{
+ LLSD response = mNotification->getResponseTemplate();
+ mNotification->respond(response);
+ close();
+}
diff --git a/indra/newview/lltoastscripttextbox.h b/indra/newview/lltoastscripttextbox.h
index ae3b545e0a..8e69d8834d 100644
--- a/indra/newview/lltoastscripttextbox.h
+++ b/indra/newview/lltoastscripttextbox.h
@@ -30,13 +30,11 @@
#include "lltoastnotifypanel.h"
#include "llnotificationptr.h"
-class LLButton;
-
/**
* Toast panel for scripted llTextbox notifications.
*/
class LLToastScriptTextbox
-: public LLToastNotifyPanel
+: public LLToastPanel
{
public:
void close();
@@ -46,12 +44,15 @@ public:
// Non-transient messages. You can specify non-default button
// layouts (like one for script dialogs) by passing various
// numbers in for "layout".
- LLToastScriptTextbox(LLNotificationPtr& notification);
+ LLToastScriptTextbox(const LLNotificationPtr& notification);
/*virtual*/ ~LLToastScriptTextbox();
-protected:
- void onClickSubmit();
+
private:
+
+ void onClickSubmit();
+ void onClickIgnore();
+
static const S32 DEFAULT_MESSAGE_MAX_LINE_COUNT;
};
diff --git a/indra/newview/lltool.cpp b/indra/newview/lltool.cpp
index 282d4e19c6..2d8ce95347 100644
--- a/indra/newview/lltool.cpp
+++ b/indra/newview/lltool.cpp
@@ -33,6 +33,7 @@
#include "llview.h"
#include "llviewerwindow.h"
+#include "llviewercontrol.h"
#include "lltoolcomp.h"
#include "lltoolfocus.h"
#include "llfocusmgr.h"
@@ -190,9 +191,12 @@ LLTool* LLTool::getOverrideTool(MASK mask)
{
return NULL;
}
- if (mask & MASK_ALT)
+ if (gSavedSettings.getBOOL("EnableAltZoom"))
{
- return LLToolCamera::getInstance();
+ if (mask & MASK_ALT)
+ {
+ return LLToolCamera::getInstance();
+ }
}
return NULL;
}
diff --git a/indra/newview/lltoolmorph.cpp b/indra/newview/lltoolmorph.cpp
index ca80a1db79..964b17d3a6 100644
--- a/indra/newview/lltoolmorph.cpp
+++ b/indra/newview/lltoolmorph.cpp
@@ -244,13 +244,13 @@ BOOL LLVisualParamHint::render()
//-----------------------------------------------------------------------------
// draw()
//-----------------------------------------------------------------------------
-void LLVisualParamHint::draw()
+void LLVisualParamHint::draw(F32 alpha)
{
if (!mIsVisible) return;
gGL.getTexUnit(0)->bind(this);
- gGL.color4f(1.f, 1.f, 1.f, 1.f);
+ gGL.color4f(1.f, 1.f, 1.f, alpha);
LLGLSUIDefault gls_ui;
gGL.begin(LLRender::QUADS);
diff --git a/indra/newview/lltoolmorph.h b/indra/newview/lltoolmorph.h
index 59201233ae..a6889be151 100644
--- a/indra/newview/lltoolmorph.h
+++ b/indra/newview/lltoolmorph.h
@@ -68,7 +68,7 @@ public:
BOOL render();
void requestUpdate( S32 delay_frames ) {mNeedsUpdate = TRUE; mDelayFrames = delay_frames; }
void setUpdateDelayFrames( S32 delay_frames ) { mDelayFrames = delay_frames; }
- void draw();
+ void draw(F32 alpha);
LLViewerVisualParam* getVisualParam() { return mVisualParam; }
F32 getVisualParamWeight() { return mVisualParamWeight; }
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index d992d808c7..562b9219b4 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -81,9 +81,11 @@ LLToolPie::LLToolPie()
: LLTool(std::string("Pie")),
mGrabMouseButtonDown( FALSE ),
mMouseOutsideSlop( FALSE ),
- mClickAction(0)
-{ }
-
+ mClickAction(0),
+ mClickActionBuyEnabled( gSavedSettings.getBOOL("ClickActionBuyEnabled") ),
+ mClickActionPayEnabled( gSavedSettings.getBOOL("ClickActionPayEnabled") )
+{
+}
BOOL LLToolPie::handleAnyMouseClick(S32 x, S32 y, MASK mask, EClickType clicktype, BOOL down)
{
@@ -211,12 +213,28 @@ BOOL LLToolPie::pickLeftMouseDownCallback()
} // else nothing (fall through to touch)
}
case CLICK_ACTION_PAY:
- if ((object && object->flagTakesMoney())
- || (parent && parent->flagTakesMoney()))
+ if ( mClickActionPayEnabled )
+ {
+ if ((object && object->flagTakesMoney())
+ || (parent && parent->flagTakesMoney()))
+ {
+ // pay event goes to object actually clicked on
+ mClickActionObject = object;
+ mLeftClickSelection = LLToolSelect::handleObjectSelection(mPick, FALSE, TRUE);
+ if (LLSelectMgr::getInstance()->selectGetAllValid())
+ {
+ // call this right away, since we have all the info we need to continue the action
+ selectionPropertiesReceived();
+ }
+ return TRUE;
+ }
+ }
+ break;
+ case CLICK_ACTION_BUY:
+ if ( mClickActionBuyEnabled )
{
- // pay event goes to object actually clicked on
- mClickActionObject = object;
- mLeftClickSelection = LLToolSelect::handleObjectSelection(mPick, FALSE, TRUE);
+ mClickActionObject = parent;
+ mLeftClickSelection = LLToolSelect::handleObjectSelection(mPick, FALSE, TRUE, TRUE);
if (LLSelectMgr::getInstance()->selectGetAllValid())
{
// call this right away, since we have all the info we need to continue the action
@@ -225,15 +243,6 @@ BOOL LLToolPie::pickLeftMouseDownCallback()
return TRUE;
}
break;
- case CLICK_ACTION_BUY:
- mClickActionObject = parent;
- mLeftClickSelection = LLToolSelect::handleObjectSelection(mPick, FALSE, TRUE, TRUE);
- if (LLSelectMgr::getInstance()->selectGetAllValid())
- {
- // call this right away, since we have all the info we need to continue the action
- selectionPropertiesReceived();
- }
- return TRUE;
case CLICK_ACTION_OPEN:
if (parent && parent->allowOpen())
{
@@ -393,7 +402,7 @@ U8 final_click_action(LLViewerObject* obj)
return click_action;
}
-ECursorType cursor_from_object(LLViewerObject* object)
+ECursorType LLToolPie::cursorFromObject(LLViewerObject* object)
{
LLViewerObject* parent = NULL;
if (object)
@@ -413,7 +422,10 @@ ECursorType cursor_from_object(LLViewerObject* object)
}
break;
case CLICK_ACTION_BUY:
- cursor = UI_CURSOR_TOOLBUY;
+ if ( mClickActionBuyEnabled )
+ {
+ cursor = UI_CURSOR_TOOLBUY;
+ }
break;
case CLICK_ACTION_OPEN:
// Open always opens the parent.
@@ -423,10 +435,13 @@ ECursorType cursor_from_object(LLViewerObject* object)
}
break;
case CLICK_ACTION_PAY:
- if ((object && object->flagTakesMoney())
- || (parent && parent->flagTakesMoney()))
+ if ( mClickActionPayEnabled )
{
- cursor = UI_CURSOR_TOOLBUY;
+ if ((object && object->flagTakesMoney())
+ || (parent && parent->flagTakesMoney()))
+ {
+ cursor = UI_CURSOR_TOOLBUY;
+ }
}
break;
case CLICK_ACTION_ZOOM:
@@ -474,10 +489,16 @@ void LLToolPie::selectionPropertiesReceived()
switch (click_action)
{
case CLICK_ACTION_BUY:
- handle_buy();
+ if ( LLToolPie::getInstance()->mClickActionBuyEnabled )
+ {
+ handle_buy();
+ }
break;
case CLICK_ACTION_PAY:
- handle_give_money_dialog();
+ if ( LLToolPie::getInstance()->mClickActionPayEnabled )
+ {
+ handle_give_money_dialog();
+ }
break;
case CLICK_ACTION_OPEN:
LLFloaterReg::showInstance("openobject");
@@ -518,7 +539,7 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
else if (click_action_object && useClickAction(mask, click_action_object, click_action_object->getRootEdit()))
{
show_highlight = true;
- ECursorType cursor = cursor_from_object(click_action_object);
+ ECursorType cursor = cursorFromObject(click_action_object);
gViewerWindow->setCursor(cursor);
lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolPie (inactive)" << llendl;
}
@@ -571,7 +592,9 @@ BOOL LLToolPie::handleMouseUp(S32 x, S32 y, MASK mask)
{
switch(click_action)
{
+ // NOTE: mClickActionBuyEnabled flag enables/disables BUY action but setting cursor to default is okay
case CLICK_ACTION_BUY:
+ // NOTE: mClickActionPayEnabled flag enables/disables PAY action but setting cursor to default is okay
case CLICK_ACTION_PAY:
case CLICK_ACTION_OPEN:
case CLICK_ACTION_ZOOM:
@@ -1228,15 +1251,17 @@ void LLToolPie::handleDeselect()
LLTool* LLToolPie::getOverrideTool(MASK mask)
{
- if (mask == MASK_CONTROL)
+ if (gSavedSettings.getBOOL("EnableGrab"))
{
- return LLToolGrab::getInstance();
- }
- else if (mask == (MASK_CONTROL | MASK_SHIFT))
- {
- return LLToolGrab::getInstance();
+ if (mask == MASK_CONTROL)
+ {
+ return LLToolGrab::getInstance();
+ }
+ else if (mask == (MASK_CONTROL | MASK_SHIFT))
+ {
+ return LLToolGrab::getInstance();
+ }
}
-
return LLTool::getOverrideTool(mask);
}
diff --git a/indra/newview/lltoolpie.h b/indra/newview/lltoolpie.h
index 65cb3e36a7..77200a1da4 100644
--- a/indra/newview/lltoolpie.h
+++ b/indra/newview/lltoolpie.h
@@ -80,6 +80,7 @@ private:
BOOL useClickAction (MASK mask, LLViewerObject* object,LLViewerObject* parent);
void showVisualContextMenuEffect();
+ ECursorType cursorFromObject(LLViewerObject* object);
bool handleMediaClick(const LLPickInfo& info);
bool handleMediaHover(const LLPickInfo& info);
@@ -96,8 +97,8 @@ private:
LLPointer<LLViewerObject> mClickActionObject;
U8 mClickAction;
LLSafeHandle<LLObjectSelection> mLeftClickSelection;
-
+ BOOL mClickActionBuyEnabled;
+ BOOL mClickActionPayEnabled;
};
-
#endif
diff --git a/indra/newview/lltracker.cpp b/indra/newview/lltracker.cpp
index c3dd17def9..983108391f 100644
--- a/indra/newview/lltracker.cpp
+++ b/indra/newview/lltracker.cpp
@@ -109,6 +109,8 @@ void LLTracker::stopTracking(void* userdata)
// static virtual
void LLTracker::drawHUDArrow()
{
+ if (!gSavedSettings.getBOOL("RenderTrackerBeacon")) return;
+
static LLUIColor map_track_color = LLUIColorTable::instance().getColor("MapTrackColor", LLColor4::white);
/* tracking autopilot destination has been disabled
@@ -155,7 +157,7 @@ void LLTracker::drawHUDArrow()
// static
void LLTracker::render3D()
{
- if (!gFloaterWorldMap)
+ if (!gFloaterWorldMap || !gSavedSettings.getBOOL("RenderTrackerBeacon"))
{
return;
}
diff --git a/indra/newview/lltransientfloatermgr.cpp b/indra/newview/lltransientfloatermgr.cpp
index 6deab96b45..c648a6a28a 100644
--- a/indra/newview/lltransientfloatermgr.cpp
+++ b/indra/newview/lltransientfloatermgr.cpp
@@ -38,8 +38,8 @@ LLTransientFloaterMgr::LLTransientFloaterMgr()
{
if(gViewerWindow)
{
- gViewerWindow->getRootView()->addMouseDownCallback(boost::bind(
- &LLTransientFloaterMgr::leftMouseClickCallback, this, _1, _2, _3));
+ gViewerWindow->getRootView()->getChild<LLUICtrl>("popup_holder")->setMouseDownCallback(boost::bind(
+ &LLTransientFloaterMgr::leftMouseClickCallback, this, _2, _3, _4));
}
mGroupControls.insert(std::pair<ETransientGroup, std::set<LLView*> >(GLOBAL, std::set<LLView*>()));
diff --git a/indra/newview/llviewerassetstats.cpp b/indra/newview/llviewerassetstats.cpp
new file mode 100644
index 0000000000..5ad7725b3e
--- /dev/null
+++ b/indra/newview/llviewerassetstats.cpp
@@ -0,0 +1,619 @@
+/**
+ * @file llviewerassetstats.cpp
+ * @brief
+ *
+ * $LicenseInfo:firstyear=2010&license=viewergpl$
+ *
+ * Copyright (c) 2010, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llviewerassetstats.h"
+#include "llregionhandle.h"
+
+#include "stdtypes.h"
+
+/*
+ * Classes and utility functions for per-thread and per-region
+ * asset and experiential metrics to be aggregated grid-wide.
+ *
+ * The basic metrics grouping is LLViewerAssetStats::PerRegionStats.
+ * This provides various counters and simple statistics for asset
+ * fetches binned into a few categories. One of these is maintained
+ * for each region encountered and the 'current' region is available
+ * as a simple reference. Each thread (presently two) interested
+ * in participating in these stats gets an instance of the
+ * LLViewerAssetStats class so that threads are completely
+ * independent.
+ *
+ * The idea of a current region is used for simplicity and speed
+ * of categorization. Each metrics event could have taken a
+ * region uuid argument resulting in a suitable lookup. Arguments
+ * against this design include:
+ *
+ * - Region uuid not trivially available to caller.
+ * - Cost (cpu, disruption in real work flow) too high.
+ * - Additional precision not really meaningful.
+ *
+ * By itself, the LLViewerAssetStats class is thread- and
+ * viewer-agnostic and can be used anywhere without assumptions
+ * of global pointers and other context. For the viewer,
+ * a set of free functions are provided in the namespace
+ * LLViewerAssetStatsFF which *do* implement viewer-native
+ * policies about per-thread globals and will do correct
+ * defensive tests of same.
+ *
+ * References
+ *
+ * Project:
+ * <TBD>
+ *
+ * Test Plan:
+ * <TBD>
+ *
+ * Jiras:
+ * <TBD>
+ *
+ * Unit Tests:
+ * indra/newview/tests/llviewerassetstats_test.cpp
+ *
+ */
+
+
+// ------------------------------------------------------
+// Global data definitions
+// ------------------------------------------------------
+LLViewerAssetStats * gViewerAssetStatsMain(0);
+LLViewerAssetStats * gViewerAssetStatsThread1(0);
+
+
+// ------------------------------------------------------
+// Local declarations
+// ------------------------------------------------------
+namespace
+{
+
+static LLViewerAssetStats::EViewerAssetCategories
+asset_type_to_category(const LLViewerAssetType::EType at, bool with_http, bool is_temp);
+
+}
+
+// ------------------------------------------------------
+// LLViewerAssetStats::PerRegionStats struct definition
+// ------------------------------------------------------
+void
+LLViewerAssetStats::PerRegionStats::reset()
+{
+ for (int i(0); i < LL_ARRAY_SIZE(mRequests); ++i)
+ {
+ mRequests[i].mEnqueued.reset();
+ mRequests[i].mDequeued.reset();
+ mRequests[i].mResponse.reset();
+ }
+ mFPS.reset();
+
+ mTotalTime = 0;
+ mStartTimestamp = LLViewerAssetStatsFF::get_timestamp();
+}
+
+
+void
+LLViewerAssetStats::PerRegionStats::merge(const LLViewerAssetStats::PerRegionStats & src)
+{
+ // mRegionHandle, mTotalTime, mStartTimestamp are left alone.
+
+ // mFPS
+ if (src.mFPS.getCount() && mFPS.getCount())
+ {
+ mFPS.merge(src.mFPS);
+ }
+
+ // Requests
+ for (int i = 0; i < LL_ARRAY_SIZE(mRequests); ++i)
+ {
+ mRequests[i].mEnqueued.merge(src.mRequests[i].mEnqueued);
+ mRequests[i].mDequeued.merge(src.mRequests[i].mDequeued);
+ mRequests[i].mResponse.merge(src.mRequests[i].mResponse);
+ }
+}
+
+
+void
+LLViewerAssetStats::PerRegionStats::accumulateTime(duration_t now)
+{
+ mTotalTime += (now - mStartTimestamp);
+ mStartTimestamp = now;
+}
+
+
+// ------------------------------------------------------
+// LLViewerAssetStats class definition
+// ------------------------------------------------------
+LLViewerAssetStats::LLViewerAssetStats()
+ : mRegionHandle(U64(0))
+{
+ reset();
+}
+
+
+LLViewerAssetStats::LLViewerAssetStats(const LLViewerAssetStats & src)
+ : mRegionHandle(src.mRegionHandle),
+ mResetTimestamp(src.mResetTimestamp)
+{
+ const PerRegionContainer::const_iterator it_end(src.mRegionStats.end());
+ for (PerRegionContainer::const_iterator it(src.mRegionStats.begin()); it_end != it; ++it)
+ {
+ mRegionStats[it->first] = new PerRegionStats(*it->second);
+ }
+ mCurRegionStats = mRegionStats[mRegionHandle];
+}
+
+
+void
+LLViewerAssetStats::reset()
+{
+ // Empty the map of all region stats
+ mRegionStats.clear();
+
+ // If we have a current stats, reset it, otherwise, as at construction,
+ // create a new one as we must always have a current stats block.
+ if (mCurRegionStats)
+ {
+ mCurRegionStats->reset();
+ }
+ else
+ {
+ mCurRegionStats = new PerRegionStats(mRegionHandle);
+ }
+
+ // And add reference to map
+ mRegionStats[mRegionHandle] = mCurRegionStats;
+
+ // Start timestamp consistent with per-region collector
+ mResetTimestamp = mCurRegionStats->mStartTimestamp;
+}
+
+
+void
+LLViewerAssetStats::setRegion(region_handle_t region_handle)
+{
+ if (region_handle == mRegionHandle)
+ {
+ // Already active, ignore.
+ return;
+ }
+
+ // Get duration for current set
+ const duration_t now = LLViewerAssetStatsFF::get_timestamp();
+ mCurRegionStats->accumulateTime(now);
+
+ // Prepare new set
+ PerRegionContainer::iterator new_stats = mRegionStats.find(region_handle);
+ if (mRegionStats.end() == new_stats)
+ {
+ // Haven't seen this region_id before, create a new block and make it current.
+ mCurRegionStats = new PerRegionStats(region_handle);
+ mRegionStats[region_handle] = mCurRegionStats;
+ }
+ else
+ {
+ mCurRegionStats = new_stats->second;
+ }
+ mCurRegionStats->mStartTimestamp = now;
+ mRegionHandle = region_handle;
+}
+
+
+void
+LLViewerAssetStats::recordGetEnqueued(LLViewerAssetType::EType at, bool with_http, bool is_temp)
+{
+ const EViewerAssetCategories eac(asset_type_to_category(at, with_http, is_temp));
+
+ ++(mCurRegionStats->mRequests[int(eac)].mEnqueued);
+}
+
+void
+LLViewerAssetStats::recordGetDequeued(LLViewerAssetType::EType at, bool with_http, bool is_temp)
+{
+ const EViewerAssetCategories eac(asset_type_to_category(at, with_http, is_temp));
+
+ ++(mCurRegionStats->mRequests[int(eac)].mDequeued);
+}
+
+void
+LLViewerAssetStats::recordGetServiced(LLViewerAssetType::EType at, bool with_http, bool is_temp, duration_t duration)
+{
+ const EViewerAssetCategories eac(asset_type_to_category(at, with_http, is_temp));
+
+ mCurRegionStats->mRequests[int(eac)].mResponse.record(duration);
+}
+
+void
+LLViewerAssetStats::recordFPS(F32 fps)
+{
+ mCurRegionStats->mFPS.record(fps);
+}
+
+LLSD
+LLViewerAssetStats::asLLSD(bool compact_output)
+{
+ // Top-level tags
+ static const LLSD::String tags[EVACCount] =
+ {
+ LLSD::String("get_texture_temp_http"),
+ LLSD::String("get_texture_temp_udp"),
+ LLSD::String("get_texture_non_temp_http"),
+ LLSD::String("get_texture_non_temp_udp"),
+ LLSD::String("get_wearable_udp"),
+ LLSD::String("get_sound_udp"),
+ LLSD::String("get_gesture_udp"),
+ LLSD::String("get_other")
+ };
+
+ // Stats Group Sub-tags.
+ static const LLSD::String enq_tag("enqueued");
+ static const LLSD::String deq_tag("dequeued");
+ static const LLSD::String rcnt_tag("resp_count");
+ static const LLSD::String rmin_tag("resp_min");
+ static const LLSD::String rmax_tag("resp_max");
+ static const LLSD::String rmean_tag("resp_mean");
+
+ // MMM Group Sub-tags.
+ static const LLSD::String cnt_tag("count");
+ static const LLSD::String min_tag("min");
+ static const LLSD::String max_tag("max");
+ static const LLSD::String mean_tag("mean");
+
+ const duration_t now = LLViewerAssetStatsFF::get_timestamp();
+ mCurRegionStats->accumulateTime(now);
+
+ LLSD regions = LLSD::emptyArray();
+ for (PerRegionContainer::iterator it = mRegionStats.begin();
+ mRegionStats.end() != it;
+ ++it)
+ {
+ if (0 == it->first)
+ {
+ // Never emit NULL UUID/handle in results.
+ continue;
+ }
+
+ PerRegionStats & stats = *it->second;
+
+ LLSD reg_stat = LLSD::emptyMap();
+
+ for (int i = 0; i < LL_ARRAY_SIZE(tags); ++i)
+ {
+ PerRegionStats::prs_group & group(stats.mRequests[i]);
+
+ if ((! compact_output) ||
+ group.mEnqueued.getCount() ||
+ group.mDequeued.getCount() ||
+ group.mResponse.getCount())
+ {
+ LLSD & slot = reg_stat[tags[i]];
+ slot = LLSD::emptyMap();
+ slot[enq_tag] = LLSD(S32(stats.mRequests[i].mEnqueued.getCount()));
+ slot[deq_tag] = LLSD(S32(stats.mRequests[i].mDequeued.getCount()));
+ slot[rcnt_tag] = LLSD(S32(stats.mRequests[i].mResponse.getCount()));
+ slot[rmin_tag] = LLSD(F64(stats.mRequests[i].mResponse.getMin() * 1.0e-6));
+ slot[rmax_tag] = LLSD(F64(stats.mRequests[i].mResponse.getMax() * 1.0e-6));
+ slot[rmean_tag] = LLSD(F64(stats.mRequests[i].mResponse.getMean() * 1.0e-6));
+ }
+ }
+
+ if ((! compact_output) || stats.mFPS.getCount())
+ {
+ LLSD & slot = reg_stat["fps"];
+ slot = LLSD::emptyMap();
+ slot[cnt_tag] = LLSD(S32(stats.mFPS.getCount()));
+ slot[min_tag] = LLSD(F64(stats.mFPS.getMin()));
+ slot[max_tag] = LLSD(F64(stats.mFPS.getMax()));
+ slot[mean_tag] = LLSD(F64(stats.mFPS.getMean()));
+ }
+
+ U32 grid_x(0), grid_y(0);
+ grid_from_region_handle(it->first, &grid_x, &grid_y);
+ reg_stat["grid_x"] = LLSD::Integer(grid_x);
+ reg_stat["grid_y"] = LLSD::Integer(grid_y);
+ reg_stat["duration"] = LLSD::Real(stats.mTotalTime * 1.0e-6);
+ regions.append(reg_stat);
+ }
+
+ LLSD ret = LLSD::emptyMap();
+ ret["regions"] = regions;
+ ret["duration"] = LLSD::Real((now - mResetTimestamp) * 1.0e-6);
+
+ return ret;
+}
+
+void
+LLViewerAssetStats::merge(const LLViewerAssetStats & src)
+{
+ // mRegionHandle, mCurRegionStats and mResetTimestamp are left untouched.
+ // Just merge the stats bodies
+
+ const PerRegionContainer::const_iterator it_end(src.mRegionStats.end());
+ for (PerRegionContainer::const_iterator it(src.mRegionStats.begin()); it_end != it; ++it)
+ {
+ PerRegionContainer::iterator dst(mRegionStats.find(it->first));
+ if (mRegionStats.end() == dst)
+ {
+ // Destination is missing data, just make a private copy
+ mRegionStats[it->first] = new PerRegionStats(*it->second);
+ }
+ else
+ {
+ dst->second->merge(*it->second);
+ }
+ }
+}
+
+
+// ------------------------------------------------------
+// Global free-function definitions (LLViewerAssetStatsFF namespace)
+// ------------------------------------------------------
+
+namespace LLViewerAssetStatsFF
+{
+
+//
+// Target thread is elaborated in the function name. This could
+// have been something 'templatey' like specializations iterated
+// over a set of constants but with so few, this is clearer I think.
+//
+// As for the threads themselves... rather than do fine-grained
+// locking as we gather statistics, this code creates a collector
+// for each thread, allocated and run independently. Logging
+// happens at relatively infrequent intervals and at that time
+// the data is sent to a single thread to be aggregated into
+// a single entity with locks, thread safety and other niceties.
+//
+// A particularly fussy implementation would distribute the
+// per-thread pointers across separate cache lines. But that should
+// be beyond current requirements.
+//
+
+// 'main' thread - initial program thread
+
+void
+set_region_main(LLViewerAssetStats::region_handle_t region_handle)
+{
+ if (! gViewerAssetStatsMain)
+ return;
+
+ gViewerAssetStatsMain->setRegion(region_handle);
+}
+
+void
+record_enqueue_main(LLViewerAssetType::EType at, bool with_http, bool is_temp)
+{
+ if (! gViewerAssetStatsMain)
+ return;
+
+ gViewerAssetStatsMain->recordGetEnqueued(at, with_http, is_temp);
+}
+
+void
+record_dequeue_main(LLViewerAssetType::EType at, bool with_http, bool is_temp)
+{
+ if (! gViewerAssetStatsMain)
+ return;
+
+ gViewerAssetStatsMain->recordGetDequeued(at, with_http, is_temp);
+}
+
+void
+record_response_main(LLViewerAssetType::EType at, bool with_http, bool is_temp, LLViewerAssetStats::duration_t duration)
+{
+ if (! gViewerAssetStatsMain)
+ return;
+
+ gViewerAssetStatsMain->recordGetServiced(at, with_http, is_temp, duration);
+}
+
+void
+record_fps_main(F32 fps)
+{
+ if (! gViewerAssetStatsMain)
+ return;
+
+ gViewerAssetStatsMain->recordFPS(fps);
+}
+
+
+// 'thread1' - should be for TextureFetch thread
+
+void
+set_region_thread1(LLViewerAssetStats::region_handle_t region_handle)
+{
+ if (! gViewerAssetStatsThread1)
+ return;
+
+ gViewerAssetStatsThread1->setRegion(region_handle);
+}
+
+void
+record_enqueue_thread1(LLViewerAssetType::EType at, bool with_http, bool is_temp)
+{
+ if (! gViewerAssetStatsThread1)
+ return;
+
+ gViewerAssetStatsThread1->recordGetEnqueued(at, with_http, is_temp);
+}
+
+void
+record_dequeue_thread1(LLViewerAssetType::EType at, bool with_http, bool is_temp)
+{
+ if (! gViewerAssetStatsThread1)
+ return;
+
+ gViewerAssetStatsThread1->recordGetDequeued(at, with_http, is_temp);
+}
+
+void
+record_response_thread1(LLViewerAssetType::EType at, bool with_http, bool is_temp, LLViewerAssetStats::duration_t duration)
+{
+ if (! gViewerAssetStatsThread1)
+ return;
+
+ gViewerAssetStatsThread1->recordGetServiced(at, with_http, is_temp, duration);
+}
+
+
+void
+init()
+{
+ if (! gViewerAssetStatsMain)
+ {
+ gViewerAssetStatsMain = new LLViewerAssetStats();
+ }
+ if (! gViewerAssetStatsThread1)
+ {
+ gViewerAssetStatsThread1 = new LLViewerAssetStats();
+ }
+}
+
+void
+cleanup()
+{
+ delete gViewerAssetStatsMain;
+ gViewerAssetStatsMain = 0;
+
+ delete gViewerAssetStatsThread1;
+ gViewerAssetStatsThread1 = 0;
+}
+
+
+} // namespace LLViewerAssetStatsFF
+
+
+// ------------------------------------------------------
+// Local function definitions
+// ------------------------------------------------------
+
+namespace
+{
+
+LLViewerAssetStats::EViewerAssetCategories
+asset_type_to_category(const LLViewerAssetType::EType at, bool with_http, bool is_temp)
+{
+ // For statistical purposes, we divide GETs into several
+ // populations of asset fetches:
+ // - textures which are de-prioritized in the asset system
+ // - wearables (clothing, bodyparts) which directly affect
+ // user experiences when they log in
+ // - sounds
+ // - gestures
+ // - everything else.
+ //
+ llassert_always(26 == LLViewerAssetType::AT_COUNT);
+
+ // Multiple asset definitions are floating around so this requires some
+ // maintenance and attention.
+ static const LLViewerAssetStats::EViewerAssetCategories asset_to_bin_map[LLViewerAssetType::AT_COUNT] =
+ {
+ LLViewerAssetStats::EVACTextureTempHTTPGet, // (0) AT_TEXTURE
+ LLViewerAssetStats::EVACSoundUDPGet, // AT_SOUND
+ LLViewerAssetStats::EVACOtherGet, // AT_CALLINGCARD
+ LLViewerAssetStats::EVACOtherGet, // AT_LANDMARK
+ LLViewerAssetStats::EVACOtherGet, // AT_SCRIPT
+ LLViewerAssetStats::EVACWearableUDPGet, // AT_CLOTHING
+ LLViewerAssetStats::EVACOtherGet, // AT_OBJECT
+ LLViewerAssetStats::EVACOtherGet, // AT_NOTECARD
+ LLViewerAssetStats::EVACOtherGet, // AT_CATEGORY
+ LLViewerAssetStats::EVACOtherGet, // AT_ROOT_CATEGORY
+ LLViewerAssetStats::EVACOtherGet, // (10) AT_LSL_TEXT
+ LLViewerAssetStats::EVACOtherGet, // AT_LSL_BYTECODE
+ LLViewerAssetStats::EVACOtherGet, // AT_TEXTURE_TGA
+ LLViewerAssetStats::EVACWearableUDPGet, // AT_BODYPART
+ LLViewerAssetStats::EVACOtherGet, // AT_TRASH
+ LLViewerAssetStats::EVACOtherGet, // AT_SNAPSHOT_CATEGORY
+ LLViewerAssetStats::EVACOtherGet, // AT_LOST_AND_FOUND
+ LLViewerAssetStats::EVACSoundUDPGet, // AT_SOUND_WAV
+ LLViewerAssetStats::EVACOtherGet, // AT_IMAGE_TGA
+ LLViewerAssetStats::EVACOtherGet, // AT_IMAGE_JPEG
+ LLViewerAssetStats::EVACGestureUDPGet, // (20) AT_ANIMATION
+ LLViewerAssetStats::EVACGestureUDPGet, // AT_GESTURE
+ LLViewerAssetStats::EVACOtherGet, // AT_SIMSTATE
+ LLViewerAssetStats::EVACOtherGet, // AT_FAVORITE
+ LLViewerAssetStats::EVACOtherGet, // AT_LINK
+ LLViewerAssetStats::EVACOtherGet, // AT_LINK_FOLDER
+#if 0
+ // When LLViewerAssetType::AT_COUNT == 49
+ LLViewerAssetStats::EVACOtherGet, // AT_FOLDER_ENSEMBLE_START
+ LLViewerAssetStats::EVACOtherGet, //
+ LLViewerAssetStats::EVACOtherGet, //
+ LLViewerAssetStats::EVACOtherGet, //
+ LLViewerAssetStats::EVACOtherGet, // (30)
+ LLViewerAssetStats::EVACOtherGet, //
+ LLViewerAssetStats::EVACOtherGet, //
+ LLViewerAssetStats::EVACOtherGet, //
+ LLViewerAssetStats::EVACOtherGet, //
+ LLViewerAssetStats::EVACOtherGet, //
+ LLViewerAssetStats::EVACOtherGet, //
+ LLViewerAssetStats::EVACOtherGet, //
+ LLViewerAssetStats::EVACOtherGet, //
+ LLViewerAssetStats::EVACOtherGet, //
+ LLViewerAssetStats::EVACOtherGet, // (40)
+ LLViewerAssetStats::EVACOtherGet, //
+ LLViewerAssetStats::EVACOtherGet, //
+ LLViewerAssetStats::EVACOtherGet, //
+ LLViewerAssetStats::EVACOtherGet, //
+ LLViewerAssetStats::EVACOtherGet, // AT_FOLDER_ENSEMBLE_END
+ LLViewerAssetStats::EVACOtherGet, // AT_CURRENT_OUTFIT
+ LLViewerAssetStats::EVACOtherGet, // AT_OUTFIT
+ LLViewerAssetStats::EVACOtherGet // AT_MY_OUTFITS
+#endif
+ };
+
+ if (at < 0 || at >= LLViewerAssetType::AT_COUNT)
+ {
+ return LLViewerAssetStats::EVACOtherGet;
+ }
+ LLViewerAssetStats::EViewerAssetCategories ret(asset_to_bin_map[at]);
+ if (LLViewerAssetStats::EVACTextureTempHTTPGet == ret)
+ {
+ // Indexed with [is_temp][with_http]
+ static const LLViewerAssetStats::EViewerAssetCategories texture_bin_map[2][2] =
+ {
+ {
+ LLViewerAssetStats::EVACTextureNonTempUDPGet,
+ LLViewerAssetStats::EVACTextureNonTempHTTPGet,
+ },
+ {
+ LLViewerAssetStats::EVACTextureTempUDPGet,
+ LLViewerAssetStats::EVACTextureTempHTTPGet,
+ }
+ };
+
+ ret = texture_bin_map[is_temp][with_http];
+ }
+ return ret;
+}
+
+} // anonymous namespace
diff --git a/indra/newview/llviewerassetstats.h b/indra/newview/llviewerassetstats.h
new file mode 100644
index 0000000000..905ceefad5
--- /dev/null
+++ b/indra/newview/llviewerassetstats.h
@@ -0,0 +1,334 @@
+/**
+ * @file llviewerassetstats.h
+ * @brief Client-side collection of asset request statistics
+ *
+ * $LicenseInfo:firstyear=2010&license=viewergpl$
+ *
+ * Copyright (c) 2010, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLVIEWERASSETSTATUS_H
+#define LL_LLVIEWERASSETSTATUS_H
+
+
+#include "linden_common.h"
+
+#include "llpointer.h"
+#include "llrefcount.h"
+#include "llviewerassettype.h"
+#include "llviewerassetstorage.h"
+#include "llsimplestat.h"
+#include "llsd.h"
+
+/**
+ * @class LLViewerAssetStats
+ * @brief Records performance aspects of asset access operations.
+ *
+ * This facility is derived from a very similar simulator-based
+ * one, LLSimAssetStats. It's function is to count asset access
+ * operations and characterize response times. Collected data
+ * are binned in several dimensions:
+ *
+ * - Asset types collapsed into a few aggregated categories
+ * - By simulator UUID
+ * - By transport mechanism (HTTP vs MessageSystem)
+ * - By persistence (temp vs non-temp)
+ *
+ * Statistics collected are fairly basic at this point:
+ *
+ * - Counts of enqueue and dequeue operations
+ * - Min/Max/Mean of asset transfer operations
+ *
+ * This collector differs from the simulator-based on in a
+ * number of ways:
+ *
+ * - The front-end/back-end distinction doesn't exist in viewer
+ * code
+ * - Multiple threads must be safely accomodated in the viewer
+ *
+ * Access to results is by conversion to an LLSD with some standardized
+ * key names. The intent of this structure is that it be emitted as
+ * standard syslog-based metrics formatting where it can be picked
+ * up by interested parties.
+ *
+ * For convenience, a set of free functions in namespace
+ * LLViewerAssetStatsFF is provided for conditional test-and-call
+ * operations.
+ */
+class LLViewerAssetStats
+{
+public:
+ enum EViewerAssetCategories
+ {
+ EVACTextureTempHTTPGet, //< Texture GETs - temp/baked, HTTP
+ EVACTextureTempUDPGet, //< Texture GETs - temp/baked, UDP
+ EVACTextureNonTempHTTPGet, //< Texture GETs - perm, HTTP
+ EVACTextureNonTempUDPGet, //< Texture GETs - perm, UDP
+ EVACWearableUDPGet, //< Wearable GETs
+ EVACSoundUDPGet, //< Sound GETs
+ EVACGestureUDPGet, //< Gesture GETs
+ EVACOtherGet, //< Other GETs
+
+ EVACCount // Must be last
+ };
+
+ /**
+ * Type for duration and other time values in the metrics. Selected
+ * for compatibility with the pre-existing timestamp on the texture
+ * fetcher class, LLTextureFetch.
+ */
+ typedef U64 duration_t;
+
+ /**
+ * Type for the region identifier used in stats. Currently uses
+ * the region handle's type (a U64) rather than the regions's LLUUID
+ * as the latter isn't available immediately.
+ */
+ typedef U64 region_handle_t;
+
+ /**
+ * @brief Collected data for a single region visited by the avatar.
+ *
+ * Fairly simple, for each asset bin enumerated above a count
+ * of enqueue and dequeue operations and simple stats on response
+ * times for completed requests.
+ */
+ class PerRegionStats : public LLRefCount
+ {
+ public:
+ PerRegionStats(const region_handle_t region_handle)
+ : LLRefCount(),
+ mRegionHandle(region_handle)
+ {
+ reset();
+ }
+
+ PerRegionStats(const PerRegionStats & src)
+ : LLRefCount(),
+ mRegionHandle(src.mRegionHandle),
+ mTotalTime(src.mTotalTime),
+ mStartTimestamp(src.mStartTimestamp),
+ mFPS(src.mFPS)
+ {
+ for (int i = 0; i < LL_ARRAY_SIZE(mRequests); ++i)
+ {
+ mRequests[i] = src.mRequests[i];
+ }
+ }
+
+ // Default assignment and destructor are correct.
+
+ void reset();
+
+ void merge(const PerRegionStats & src);
+
+ // Apply current running time to total and reset start point.
+ // Return current timestamp as a convenience.
+ void accumulateTime(duration_t now);
+
+ public:
+ region_handle_t mRegionHandle;
+ duration_t mTotalTime;
+ duration_t mStartTimestamp;
+ LLSimpleStatMMM<> mFPS;
+
+ struct prs_group
+ {
+ LLSimpleStatCounter mEnqueued;
+ LLSimpleStatCounter mDequeued;
+ LLSimpleStatMMM<duration_t> mResponse;
+ }
+ mRequests [EVACCount];
+ };
+
+public:
+ LLViewerAssetStats();
+ LLViewerAssetStats(const LLViewerAssetStats &);
+ // Default destructor is correct.
+ LLViewerAssetStats & operator=(const LLViewerAssetStats &); // Not defined
+
+ // Clear all metrics data. This leaves the currently-active region
+ // in place but with zero'd data for all metrics. All other regions
+ // are removed from the collection map.
+ void reset();
+
+ // Set hidden region argument and establish context for subsequent
+ // collection calls.
+ void setRegion(region_handle_t region_handle);
+
+ // Asset GET Requests
+ void recordGetEnqueued(LLViewerAssetType::EType at, bool with_http, bool is_temp);
+ void recordGetDequeued(LLViewerAssetType::EType at, bool with_http, bool is_temp);
+ void recordGetServiced(LLViewerAssetType::EType at, bool with_http, bool is_temp, duration_t duration);
+
+ // Frames-Per-Second Samples
+ void recordFPS(F32 fps);
+
+ // Merge a source instance into a destination instance. This is
+ // conceptually an 'operator+=()' method:
+ // - counts are added
+ // - minimums are min'd
+ // - maximums are max'd
+ // - other scalars are ignored ('this' wins)
+ //
+ void merge(const LLViewerAssetStats & src);
+
+ // Retrieve current metrics for all visited regions (NULL region UUID/handle excluded)
+ // Returned LLSD is structured as follows:
+ //
+ // &stats_group = {
+ // enqueued : int,
+ // dequeued : int,
+ // resp_count : int,
+ // resp_min : float,
+ // resp_max : float,
+ // resp_mean : float
+ // }
+ //
+ // &mmm_group = {
+ // count : int,
+ // min : float,
+ // max : float,
+ // mean : float
+ // }
+ //
+ // {
+ // duration: int
+ // regions: {
+ // $: { // Keys are strings of the region's handle in hex
+ // duration: : int,
+ // fps: : &mmm_group,
+ // get_texture_temp_http : &stats_group,
+ // get_texture_temp_udp : &stats_group,
+ // get_texture_non_temp_http : &stats_group,
+ // get_texture_non_temp_udp : &stats_group,
+ // get_wearable_udp : &stats_group,
+ // get_sound_udp : &stats_group,
+ // get_gesture_udp : &stats_group,
+ // get_other : &stats_group
+ // }
+ // }
+ // }
+ //
+ // @param compact_output If true, omits from conversion any mmm_block
+ // or stats_block that would contain all zero data.
+ // Useful for transmission when the receiver knows
+ // what is expected and will assume zero for missing
+ // blocks.
+ LLSD asLLSD(bool compact_output);
+
+protected:
+ typedef std::map<region_handle_t, LLPointer<PerRegionStats> > PerRegionContainer;
+
+ // Region of the currently-active region. Always valid but may
+ // be zero after construction or when explicitly set. Unchanged
+ // by a reset() call.
+ region_handle_t mRegionHandle;
+
+ // Pointer to metrics collection for currently-active region. Always
+ // valid and unchanged after reset() though contents will be changed.
+ // Always points to a collection contained in mRegionStats.
+ LLPointer<PerRegionStats> mCurRegionStats;
+
+ // Metrics data for all regions during one collection cycle
+ PerRegionContainer mRegionStats;
+
+ // Time of last reset
+ duration_t mResetTimestamp;
+};
+
+
+/**
+ * Global stats collectors one for each independent thread where
+ * assets and other statistics are gathered. The globals are
+ * expected to be created at startup time and then picked up by
+ * their respective threads afterwards. A set of free functions
+ * are provided to access methods behind the globals while both
+ * minimally disrupting visual flow and supplying a description
+ * of intent.
+ *
+ * Expected thread assignments:
+ *
+ * - Main: main() program execution thread
+ * - Thread1: TextureFetch worker thread
+ */
+extern LLViewerAssetStats * gViewerAssetStatsMain;
+
+extern LLViewerAssetStats * gViewerAssetStatsThread1;
+
+namespace LLViewerAssetStatsFF
+{
+/**
+ * @brief Allocation and deallocation of globals.
+ *
+ * init() should be called before threads are started that will access it though
+ * you'll likely get away with calling it afterwards. cleanup() should only be
+ * called after threads are shutdown to prevent races on the global pointers.
+ */
+void init();
+
+void cleanup();
+
+/**
+ * We have many timers, clocks etc. in the runtime. This is the
+ * canonical timestamp for these metrics which is compatible with
+ * the pre-existing timestamping in the texture fetcher.
+ */
+inline LLViewerAssetStats::duration_t get_timestamp()
+{
+ return LLTimer::getTotalTime();
+}
+
+/**
+ * Region context, event and duration loggers for the Main thread.
+ */
+void set_region_main(LLViewerAssetStats::region_handle_t region_handle);
+
+void record_enqueue_main(LLViewerAssetType::EType at, bool with_http, bool is_temp);
+
+void record_dequeue_main(LLViewerAssetType::EType at, bool with_http, bool is_temp);
+
+void record_response_main(LLViewerAssetType::EType at, bool with_http, bool is_temp,
+ LLViewerAssetStats::duration_t duration);
+
+void record_fps_main(F32 fps);
+
+
+/**
+ * Region context, event and duration loggers for Thread 1.
+ */
+void set_region_thread1(LLViewerAssetStats::region_handle_t region_handle);
+
+void record_enqueue_thread1(LLViewerAssetType::EType at, bool with_http, bool is_temp);
+
+void record_dequeue_thread1(LLViewerAssetType::EType at, bool with_http, bool is_temp);
+
+void record_response_thread1(LLViewerAssetType::EType at, bool with_http, bool is_temp,
+ LLViewerAssetStats::duration_t duration);
+
+} // namespace LLViewerAssetStatsFF
+
+#endif // LL_LLVIEWERASSETSTATUS_H
diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp
index 2e7ef0fec3..36c8b42a52 100644
--- a/indra/newview/llviewerassetstorage.cpp
+++ b/indra/newview/llviewerassetstorage.cpp
@@ -33,6 +33,61 @@
#include "message.h"
#include "llagent.h"
+#include "lltransfersourceasset.h"
+#include "lltransfertargetvfile.h"
+#include "llviewerassetstats.h"
+
+///----------------------------------------------------------------------------
+/// LLViewerAssetRequest
+///----------------------------------------------------------------------------
+
+/**
+ * @brief Local class to encapsulate asset fetch requests with a timestamp.
+ *
+ * Derived from the common LLAssetRequest class, this is currently used
+ * only for fetch/get operations and its only function is to wrap remote
+ * asset fetch requests so that they can be timed.
+ */
+class LLViewerAssetRequest : public LLAssetRequest
+{
+public:
+ LLViewerAssetRequest(const LLUUID &uuid, const LLAssetType::EType type)
+ : LLAssetRequest(uuid, type),
+ mMetricsStartTime(0)
+ {
+ }
+
+ LLViewerAssetRequest & operator=(const LLViewerAssetRequest &); // Not defined
+ // Default assignment operator valid
+
+ // virtual
+ ~LLViewerAssetRequest()
+ {
+ recordMetrics();
+ }
+
+protected:
+ void recordMetrics()
+ {
+ if (mMetricsStartTime)
+ {
+ // Okay, it appears this request was used for useful things. Record
+ // the expected dequeue and duration of request processing.
+ LLViewerAssetStatsFF::record_dequeue_main(mType, false, false);
+ LLViewerAssetStatsFF::record_response_main(mType, false, false,
+ (LLViewerAssetStatsFF::get_timestamp()
+ - mMetricsStartTime));
+ mMetricsStartTime = 0;
+ }
+ }
+
+public:
+ LLViewerAssetStats::duration_t mMetricsStartTime;
+};
+
+///----------------------------------------------------------------------------
+/// LLViewerAssetStorage
+///----------------------------------------------------------------------------
LLViewerAssetStorage::LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager *xfer,
LLVFS *vfs, LLVFS *static_vfs,
@@ -258,3 +313,77 @@ void LLViewerAssetStorage::storeAssetData(
}
}
}
+
+
+/**
+ * @brief Allocate and queue an asset fetch request for the viewer
+ *
+ * This is a nearly-verbatim copy of the base class's implementation
+ * with the following changes:
+ * - Use a locally-derived request class
+ * - Start timing for metrics when request is queued
+ *
+ * This is an unfortunate implementation choice but it's forced by
+ * current conditions. A refactoring that might clean up the layers
+ * of responsibility or introduce factories or more virtualization
+ * of methods would enable a more attractive solution.
+ *
+ * If LLAssetStorage::_queueDataRequest changes, this must change
+ * as well.
+ */
+
+// virtual
+void LLViewerAssetStorage::_queueDataRequest(
+ const LLUUID& uuid,
+ LLAssetType::EType atype,
+ LLGetAssetCallback callback,
+ void *user_data,
+ BOOL duplicate,
+ BOOL is_priority)
+{
+ if (mUpstreamHost.isOk())
+ {
+ // stash the callback info so we can find it after we get the response message
+ LLViewerAssetRequest *req = new LLViewerAssetRequest(uuid, atype);
+ req->mDownCallback = callback;
+ req->mUserData = user_data;
+ req->mIsPriority = is_priority;
+ if (!duplicate)
+ {
+ // Only collect metrics for non-duplicate requests. Others
+ // are piggy-backing and will artificially lower averages.
+ req->mMetricsStartTime = LLViewerAssetStatsFF::get_timestamp();
+ }
+
+ mPendingDownloads.push_back(req);
+
+ if (!duplicate)
+ {
+ // send request message to our upstream data provider
+ // Create a new asset transfer.
+ LLTransferSourceParamsAsset spa;
+ spa.setAsset(uuid, atype);
+
+ // Set our destination file, and the completion callback.
+ LLTransferTargetParamsVFile tpvf;
+ tpvf.setAsset(uuid, atype);
+ tpvf.setCallback(downloadCompleteCallback, req);
+
+ llinfos << "Starting transfer for " << uuid << llendl;
+ LLTransferTargetChannel *ttcp = gTransferManager.getTargetChannel(mUpstreamHost, LLTCT_ASSET);
+ ttcp->requestTransfer(spa, tpvf, 100.f + (is_priority ? 1.f : 0.f));
+
+ LLViewerAssetStatsFF::record_enqueue_main(atype, false, false);
+ }
+ }
+ else
+ {
+ // uh-oh, we shouldn't have gotten here
+ llwarns << "Attempt to move asset data request upstream w/o valid upstream provider" << llendl;
+ if (callback)
+ {
+ callback(mVFS, uuid, atype, user_data, LL_ERR_CIRCUIT_GONE, LL_EXSTAT_NO_UPSTREAM);
+ }
+ }
+}
+
diff --git a/indra/newview/llviewerassetstorage.h b/indra/newview/llviewerassetstorage.h
index 6346b79f03..ca9b9943fa 100644
--- a/indra/newview/llviewerassetstorage.h
+++ b/indra/newview/llviewerassetstorage.h
@@ -63,6 +63,17 @@ public:
bool is_priority = false,
bool user_waiting=FALSE,
F64 timeout=LL_ASSET_STORAGE_TIMEOUT);
+
+protected:
+ using LLAssetStorage::_queueDataRequest;
+
+ // virtual
+ void _queueDataRequest(const LLUUID& uuid,
+ LLAssetType::EType type,
+ void (*callback) (LLVFS *vfs, const LLUUID&, LLAssetType::EType, void *, S32, LLExtStat),
+ void *user_data,
+ BOOL duplicate,
+ BOOL is_priority);
};
#endif
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 622d09c600..8c5a52c187 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -504,9 +504,10 @@ bool toggle_show_object_render_cost(const LLSD& newvalue)
void toggle_updater_service_active(LLControlVariable* control, const LLSD& new_value)
{
- if(new_value.asBoolean())
+ if(new_value.asInteger())
{
- LLUpdaterService().startChecking();
+ LLUpdaterService update_service;
+ if(!update_service.isChecking()) update_service.startChecking();
}
else
{
@@ -661,7 +662,7 @@ void settings_setup_listeners()
gSavedSettings.getControl("ShowNavbarFavoritesPanel")->getSignal()->connect(boost::bind(&toggle_show_favorites_panel, _2));
gSavedSettings.getControl("ShowMiniLocationPanel")->getSignal()->connect(boost::bind(&toggle_show_mini_location_panel, _2));
gSavedSettings.getControl("ShowObjectRenderingCost")->getSignal()->connect(boost::bind(&toggle_show_object_render_cost, _2));
- gSavedSettings.getControl("UpdaterServiceActive")->getSignal()->connect(&toggle_updater_service_active);
+ gSavedSettings.getControl("UpdaterServiceSetting")->getSignal()->connect(&toggle_updater_service_active);
gSavedSettings.getControl("ForceShowGrid")->getSignal()->connect(boost::bind(&handleForceShowGrid, _2));
gSavedSettings.getControl("RenderTransparentWater")->getSignal()->connect(boost::bind(&handleRenderTransparentWaterChanged, _2));
}
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index f573f25efe..dca1e33e60 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -60,6 +60,7 @@
#include "llfloaterhardwaresettings.h"
#include "llfloaterhelpbrowser.h"
#include "llfloatermediabrowser.h"
+#include "llfloaterwebcontent.h"
#include "llfloatermediasettings.h"
#include "llfloaterhud.h"
#include "llfloaterimagepreview.h"
@@ -252,6 +253,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("voice_controls", "floater_voice_controls.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLCallFloater>);
LLFloaterReg::add("voice_effect", "floater_voice_effect.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterVoiceEffect>);
+ LLFloaterReg::add("web_content", "floater_web_content.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWebContent>);
LLFloaterReg::add("whitelist_entry", "floater_whitelist_entry.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWhiteListEntry>);
LLFloaterWindowSizeUtil::registerFloater();
LLFloaterReg::add("world_map", "floater_world_map.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWorldMap>);
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 9c7ef7922b..b3642a2c1e 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -61,6 +61,7 @@
#include "llviewermessage.h"
#include "llsidepanelappearance.h"
#include "llavatarnamecache.h"
+#include "llavataractions.h"
#include "lllogininstance.h"
///----------------------------------------------------------------------------
@@ -214,6 +215,7 @@ public:
};
LLInventoryHandler gInventoryHandler;
+
///----------------------------------------------------------------------------
/// Class LLViewerInventoryItem
///----------------------------------------------------------------------------
diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp
index d7e15e7d6c..1aa9fd8a45 100644
--- a/indra/newview/llviewerkeyboard.cpp
+++ b/indra/newview/llviewerkeyboard.cpp
@@ -40,6 +40,7 @@
#include "llviewerwindow.h"
#include "llvoavatarself.h"
#include "llfloatercamera.h"
+#include "llinitparam.h"
//
// Constants
@@ -53,6 +54,11 @@ const S32 NUDGE_FRAMES = 2;
const F32 ORBIT_NUDGE_RATE = 0.05f; // fraction of normal speed
const F32 YAW_NUDGE_RATE = 0.05f; // fraction of normal speed
+struct LLKeyboardActionRegistry
+: public LLRegistrySingleton<std::string, boost::function<void (EKeystate keystate)>, LLKeyboardActionRegistry>
+{
+};
+
LLViewerKeyboard gViewerKeyboard;
void agent_jump( EKeystate s )
@@ -550,52 +556,50 @@ void start_gesture( EKeystate s )
}
}
-void bind_keyboard_functions()
-{
- gViewerKeyboard.bindNamedFunction("jump", agent_jump);
- gViewerKeyboard.bindNamedFunction("push_down", agent_push_down);
- gViewerKeyboard.bindNamedFunction("push_forward", agent_push_forward);
- gViewerKeyboard.bindNamedFunction("push_backward", agent_push_backward);
- gViewerKeyboard.bindNamedFunction("look_up", agent_look_up);
- gViewerKeyboard.bindNamedFunction("look_down", agent_look_down);
- gViewerKeyboard.bindNamedFunction("toggle_fly", agent_toggle_fly);
- gViewerKeyboard.bindNamedFunction("turn_left", agent_turn_left);
- gViewerKeyboard.bindNamedFunction("turn_right", agent_turn_right);
- gViewerKeyboard.bindNamedFunction("slide_left", agent_slide_left);
- gViewerKeyboard.bindNamedFunction("slide_right", agent_slide_right);
- gViewerKeyboard.bindNamedFunction("spin_around_ccw", camera_spin_around_ccw);
- gViewerKeyboard.bindNamedFunction("spin_around_cw", camera_spin_around_cw);
- gViewerKeyboard.bindNamedFunction("spin_around_ccw_sitting", camera_spin_around_ccw_sitting);
- gViewerKeyboard.bindNamedFunction("spin_around_cw_sitting", camera_spin_around_cw_sitting);
- gViewerKeyboard.bindNamedFunction("spin_over", camera_spin_over);
- gViewerKeyboard.bindNamedFunction("spin_under", camera_spin_under);
- gViewerKeyboard.bindNamedFunction("spin_over_sitting", camera_spin_over_sitting);
- gViewerKeyboard.bindNamedFunction("spin_under_sitting", camera_spin_under_sitting);
- gViewerKeyboard.bindNamedFunction("move_forward", camera_move_forward);
- gViewerKeyboard.bindNamedFunction("move_backward", camera_move_backward);
- gViewerKeyboard.bindNamedFunction("move_forward_sitting", camera_move_forward_sitting);
- gViewerKeyboard.bindNamedFunction("move_backward_sitting", camera_move_backward_sitting);
- gViewerKeyboard.bindNamedFunction("pan_up", camera_pan_up);
- gViewerKeyboard.bindNamedFunction("pan_down", camera_pan_down);
- gViewerKeyboard.bindNamedFunction("pan_left", camera_pan_left);
- gViewerKeyboard.bindNamedFunction("pan_right", camera_pan_right);
- gViewerKeyboard.bindNamedFunction("pan_in", camera_pan_in);
- gViewerKeyboard.bindNamedFunction("pan_out", camera_pan_out);
- gViewerKeyboard.bindNamedFunction("move_forward_fast", camera_move_forward_fast);
- gViewerKeyboard.bindNamedFunction("move_backward_fast", camera_move_backward_fast);
- gViewerKeyboard.bindNamedFunction("edit_avatar_spin_ccw", edit_avatar_spin_ccw);
- gViewerKeyboard.bindNamedFunction("edit_avatar_spin_cw", edit_avatar_spin_cw);
- gViewerKeyboard.bindNamedFunction("edit_avatar_spin_over", edit_avatar_spin_over);
- gViewerKeyboard.bindNamedFunction("edit_avatar_spin_under", edit_avatar_spin_under);
- gViewerKeyboard.bindNamedFunction("edit_avatar_move_forward", edit_avatar_move_forward);
- gViewerKeyboard.bindNamedFunction("edit_avatar_move_backward", edit_avatar_move_backward);
- gViewerKeyboard.bindNamedFunction("stop_moving", stop_moving);
- gViewerKeyboard.bindNamedFunction("start_chat", start_chat);
- gViewerKeyboard.bindNamedFunction("start_gesture", start_gesture);
-}
-
-LLViewerKeyboard::LLViewerKeyboard() :
- mNamedFunctionCount(0)
+#define REGISTER_KEYBOARD_ACTION(KEY, ACTION) LLREGISTER_STATIC(LLKeyboardActionRegistry, KEY, ACTION);
+REGISTER_KEYBOARD_ACTION("jump", agent_jump);
+REGISTER_KEYBOARD_ACTION("push_down", agent_push_down);
+REGISTER_KEYBOARD_ACTION("push_forward", agent_push_forward);
+REGISTER_KEYBOARD_ACTION("push_backward", agent_push_backward);
+REGISTER_KEYBOARD_ACTION("look_up", agent_look_up);
+REGISTER_KEYBOARD_ACTION("look_down", agent_look_down);
+REGISTER_KEYBOARD_ACTION("toggle_fly", agent_toggle_fly);
+REGISTER_KEYBOARD_ACTION("turn_left", agent_turn_left);
+REGISTER_KEYBOARD_ACTION("turn_right", agent_turn_right);
+REGISTER_KEYBOARD_ACTION("slide_left", agent_slide_left);
+REGISTER_KEYBOARD_ACTION("slide_right", agent_slide_right);
+REGISTER_KEYBOARD_ACTION("spin_around_ccw", camera_spin_around_ccw);
+REGISTER_KEYBOARD_ACTION("spin_around_cw", camera_spin_around_cw);
+REGISTER_KEYBOARD_ACTION("spin_around_ccw_sitting", camera_spin_around_ccw_sitting);
+REGISTER_KEYBOARD_ACTION("spin_around_cw_sitting", camera_spin_around_cw_sitting);
+REGISTER_KEYBOARD_ACTION("spin_over", camera_spin_over);
+REGISTER_KEYBOARD_ACTION("spin_under", camera_spin_under);
+REGISTER_KEYBOARD_ACTION("spin_over_sitting", camera_spin_over_sitting);
+REGISTER_KEYBOARD_ACTION("spin_under_sitting", camera_spin_under_sitting);
+REGISTER_KEYBOARD_ACTION("move_forward", camera_move_forward);
+REGISTER_KEYBOARD_ACTION("move_backward", camera_move_backward);
+REGISTER_KEYBOARD_ACTION("move_forward_sitting", camera_move_forward_sitting);
+REGISTER_KEYBOARD_ACTION("move_backward_sitting", camera_move_backward_sitting);
+REGISTER_KEYBOARD_ACTION("pan_up", camera_pan_up);
+REGISTER_KEYBOARD_ACTION("pan_down", camera_pan_down);
+REGISTER_KEYBOARD_ACTION("pan_left", camera_pan_left);
+REGISTER_KEYBOARD_ACTION("pan_right", camera_pan_right);
+REGISTER_KEYBOARD_ACTION("pan_in", camera_pan_in);
+REGISTER_KEYBOARD_ACTION("pan_out", camera_pan_out);
+REGISTER_KEYBOARD_ACTION("move_forward_fast", camera_move_forward_fast);
+REGISTER_KEYBOARD_ACTION("move_backward_fast", camera_move_backward_fast);
+REGISTER_KEYBOARD_ACTION("edit_avatar_spin_ccw", edit_avatar_spin_ccw);
+REGISTER_KEYBOARD_ACTION("edit_avatar_spin_cw", edit_avatar_spin_cw);
+REGISTER_KEYBOARD_ACTION("edit_avatar_spin_over", edit_avatar_spin_over);
+REGISTER_KEYBOARD_ACTION("edit_avatar_spin_under", edit_avatar_spin_under);
+REGISTER_KEYBOARD_ACTION("edit_avatar_move_forward", edit_avatar_move_forward);
+REGISTER_KEYBOARD_ACTION("edit_avatar_move_backward", edit_avatar_move_backward);
+REGISTER_KEYBOARD_ACTION("stop_moving", stop_moving);
+REGISTER_KEYBOARD_ACTION("start_chat", start_chat);
+REGISTER_KEYBOARD_ACTION("start_gesture", start_gesture);
+#undef REGISTER_KEYBOARD_ACTION
+
+LLViewerKeyboard::LLViewerKeyboard()
{
for (S32 i = 0; i < MODE_COUNT; i++)
{
@@ -613,16 +617,6 @@ LLViewerKeyboard::LLViewerKeyboard() :
}
}
-
-void LLViewerKeyboard::bindNamedFunction(const std::string& name, LLKeyFunc func)
-{
- S32 i = mNamedFunctionCount;
- mNamedFunctions[i].mName = name;
- mNamedFunctions[i].mFunction = func;
- mNamedFunctionCount++;
-}
-
-
BOOL LLViewerKeyboard::modeFromString(const std::string& string, S32 *mode)
{
if (string == "FIRST_PERSON")
@@ -695,8 +689,9 @@ BOOL LLViewerKeyboard::handleKey(KEY translated_key, MASK translated_mask, BOOL
BOOL LLViewerKeyboard::bindKey(const S32 mode, const KEY key, const MASK mask, const std::string& function_name)
{
- S32 i,index;
- void (*function)(EKeystate keystate) = NULL;
+ S32 index;
+ typedef boost::function<void(EKeystate)> function_t;
+ function_t function = NULL;
std::string name;
// Allow remapping of F2-F12
@@ -719,13 +714,11 @@ BOOL LLViewerKeyboard::bindKey(const S32 mode, const KEY key, const MASK mask, c
}
// Not remapped, look for a function
- for (i = 0; i < mNamedFunctionCount; i++)
+
+ function_t* result = LLKeyboardActionRegistry::getValue(function_name);
+ if (result)
{
- if (function_name == mNamedFunctions[i].mName)
- {
- function = mNamedFunctions[i].mFunction;
- name = mNamedFunctions[i].mName;
- }
+ function = *result;
}
if (!function)
@@ -755,7 +748,6 @@ BOOL LLViewerKeyboard::bindKey(const S32 mode, const KEY key, const MASK mask, c
mBindings[mode][index].mKey = key;
mBindings[mode][index].mMask = mask;
-// mBindings[mode][index].mName = name;
mBindings[mode][index].mFunction = function;
if (index == mBindingCount[mode])
@@ -764,6 +756,61 @@ BOOL LLViewerKeyboard::bindKey(const S32 mode, const KEY key, const MASK mask, c
return TRUE;
}
+LLViewerKeyboard::KeyBinding::KeyBinding()
+: key("key"),
+ mask("mask"),
+ command("command")
+{}
+
+LLViewerKeyboard::KeyMode::KeyMode(EKeyboardMode _mode)
+: bindings("binding"),
+ mode(_mode)
+{}
+
+LLViewerKeyboard::Keys::Keys()
+: first_person("first_person", KeyMode(MODE_FIRST_PERSON)),
+ third_person("third_person", KeyMode(MODE_THIRD_PERSON)),
+ edit("edit", KeyMode(MODE_EDIT)),
+ sitting("sitting", KeyMode(MODE_SITTING)),
+ edit_avatar("edit_avatar", KeyMode(MODE_EDIT_AVATAR))
+{}
+
+S32 LLViewerKeyboard::loadBindingsXML(const std::string& filename)
+{
+ S32 binding_count = 0;
+ Keys keys;
+ LLSimpleXUIParser parser;
+
+ if (parser.readXUI(filename, keys)
+ && keys.validateBlock())
+ {
+ binding_count += loadBindingMode(keys.first_person);
+ binding_count += loadBindingMode(keys.third_person);
+ binding_count += loadBindingMode(keys.edit);
+ binding_count += loadBindingMode(keys.sitting);
+ binding_count += loadBindingMode(keys.edit_avatar);
+ }
+ return binding_count;
+}
+
+S32 LLViewerKeyboard::loadBindingMode(const LLViewerKeyboard::KeyMode& keymode)
+{
+ S32 binding_count = 0;
+ for (LLInitParam::ParamIterator<KeyBinding>::const_iterator it = keymode.bindings.begin(),
+ end_it = keymode.bindings.end();
+ it != end_it;
+ ++it)
+ {
+ KEY key;
+ MASK mask;
+ LLKeyboard::keyFromString(it->key, &key);
+ LLKeyboard::maskFromString(it->mask, &mask);
+ bindKey(keymode.mode, key, mask, it->command);
+ binding_count++;
+ }
+
+ return binding_count;
+}
S32 LLViewerKeyboard::loadBindings(const std::string& filename)
{
@@ -912,18 +959,18 @@ void LLViewerKeyboard::scanKey(KEY key, BOOL key_down, BOOL key_up, BOOL key_lev
if (key_down && !repeat)
{
// ...key went down this frame, call function
- (*binding[i].mFunction)( KEYSTATE_DOWN );
+ binding[i].mFunction( KEYSTATE_DOWN );
}
else if (key_up)
{
// ...key went down this frame, call function
- (*binding[i].mFunction)( KEYSTATE_UP );
+ binding[i].mFunction( KEYSTATE_UP );
}
else if (key_level)
{
// ...key held down from previous frame
// Not windows, just call the function.
- (*binding[i].mFunction)( KEYSTATE_LEVEL );
+ binding[i].mFunction( KEYSTATE_LEVEL );
}//if
}//if
}//for
diff --git a/indra/newview/llviewerkeyboard.h b/indra/newview/llviewerkeyboard.h
index 2fa5d5dfa6..925244e89b 100644
--- a/indra/newview/llviewerkeyboard.h
+++ b/indra/newview/llviewerkeyboard.h
@@ -55,26 +55,51 @@ typedef enum e_keyboard_mode
void bind_keyboard_functions();
-
class LLViewerKeyboard
{
public:
+ struct KeyBinding : public LLInitParam::Block<KeyBinding>
+ {
+ Mandatory<std::string> key,
+ mask,
+ command;
+
+ KeyBinding();
+ };
+
+ struct KeyMode : public LLInitParam::Block<KeyMode>
+ {
+ Multiple<KeyBinding> bindings;
+ EKeyboardMode mode;
+ KeyMode(EKeyboardMode mode);
+ };
+
+ struct Keys : public LLInitParam::Block<Keys>
+ {
+ Optional<KeyMode> first_person,
+ third_person,
+ edit,
+ sitting,
+ edit_avatar;
+
+ Keys();
+ };
+
LLViewerKeyboard();
BOOL handleKey(KEY key, MASK mask, BOOL repeated);
- void bindNamedFunction(const std::string& name, LLKeyFunc func);
-
S32 loadBindings(const std::string& filename); // returns number bound, 0 on error
+ S32 loadBindingsXML(const std::string& filename); // returns number bound, 0 on error
EKeyboardMode getMode();
BOOL modeFromString(const std::string& string, S32 *mode); // False on failure
void scanKey(KEY key, BOOL key_down, BOOL key_up, BOOL key_level);
-protected:
+
+private:
+ S32 loadBindingMode(const LLViewerKeyboard::KeyMode& keymode);
BOOL bindKey(const S32 mode, const KEY key, const MASK mask, const std::string& function_name);
- S32 mNamedFunctionCount;
- LLNamedFunction mNamedFunctions[MAX_NAMED_FUNCTIONS];
// Hold all the ugly stuff torn out to make LLKeyboard non-viewer-specific here
S32 mBindingCount[MODE_COUNT];
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index fae4eb3c05..d3b6dcd86f 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -52,6 +52,7 @@
#include "llviewerregion.h"
#include "llwebsharing.h" // For LLWebSharing::setOpenIDCookie(), *TODO: find a better way to do this!
#include "llfilepicker.h"
+#include "llnotifications.h"
#include "llevent.h" // LLSimpleListener
#include "llnotificationsutil.h"
@@ -62,6 +63,7 @@
#include "llwindow.h"
#include "llfloatermediabrowser.h" // for handling window close requests and geometry change requests in media browser windows.
+#include "llfloaterwebcontent.h" // for handling window close requests and geometry change requests in media browser windows.
#include <boost/bind.hpp> // for SkinFolder listener
#include <boost/signals2.hpp>
@@ -293,6 +295,7 @@ public:
LLPluginCookieStore *LLViewerMedia::sCookieStore = NULL;
LLURL LLViewerMedia::sOpenIDURL;
std::string LLViewerMedia::sOpenIDCookie;
+LLPluginClassMedia* LLViewerMedia::sSpareBrowserMediaSource = NULL;
static LLViewerMedia::impl_list sViewerMediaImplList;
static LLViewerMedia::impl_id_map sViewerMediaTextureIDMap;
static LLTimer sMediaCreateTimer;
@@ -742,6 +745,9 @@ void LLViewerMedia::updateMedia(void *dummy_arg)
// Enable/disable the plugin read thread
LLPluginProcessParent::setUseReadThread(gSavedSettings.getBOOL("PluginUseReadThread"));
+ // HACK: we always try to keep a spare running webkit plugin around to improve launch times.
+ createSpareBrowserMediaSource();
+
sAnyMediaShowing = false;
sUpdatedCookies = getCookieStore()->getChangedCookies();
if(!sUpdatedCookies.empty())
@@ -759,6 +765,12 @@ void LLViewerMedia::updateMedia(void *dummy_arg)
pimpl->update();
pimpl->calculateInterest();
}
+
+ // Let the spare media source actually launch
+ if(sSpareBrowserMediaSource)
+ {
+ sSpareBrowserMediaSource->idle();
+ }
// Sort the static instance list using our interest criteria
sViewerMediaImplList.sort(priorityComparitor);
@@ -1034,6 +1046,26 @@ bool LLViewerMedia::isParcelAudioPlaying()
return (LLViewerMedia::hasParcelAudio() && gAudiop && LLAudioEngine::AUDIO_PLAYING == gAudiop->isInternetStreamPlaying());
}
+void LLViewerMedia::onAuthSubmit(const LLSD& notification, const LLSD& response)
+{
+ LLViewerMediaImpl *impl = LLViewerMedia::getMediaImplFromTextureID(notification["payload"]["media_id"]);
+ if(impl)
+ {
+ LLPluginClassMedia* media = impl->getMediaPlugin();
+ if(media)
+ {
+ if (response["ok"])
+ {
+ media->sendAuthResponse(true, response["username"], response["password"]);
+ }
+ else
+ {
+ media->sendAuthResponse(false, "", "");
+ }
+ }
+ }
+}
+
/////////////////////////////////////////////////////////////////////////////////////////
// static
void LLViewerMedia::clearAllCookies()
@@ -1400,6 +1432,29 @@ void LLViewerMedia::proxyWindowClosed(const std::string &uuid)
}
}
+/////////////////////////////////////////////////////////////////////////////////////////
+// static
+void LLViewerMedia::createSpareBrowserMediaSource()
+{
+ if(!sSpareBrowserMediaSource)
+ {
+ // If we don't have a spare browser media source, create one.
+ // The null owner will keep the browser plugin from fully initializing
+ // (specifically, it keeps LLPluginClassMedia from negotiating a size change,
+ // which keeps MediaPluginWebkit::initBrowserWindow from doing anything until we have some necessary data, like the background color)
+ sSpareBrowserMediaSource = LLViewerMediaImpl::newSourceFromMediaType("text/html", NULL, 0, 0);
+ }
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// static
+LLPluginClassMedia* LLViewerMedia::getSpareBrowserMediaSource()
+{
+ LLPluginClassMedia* result = sSpareBrowserMediaSource;
+ sSpareBrowserMediaSource = NULL;
+ return result;
+};
+
bool LLViewerMedia::hasInWorldMedia()
{
if (sInWorldMediaDisabled) return false;
@@ -1636,6 +1691,21 @@ void LLViewerMediaImpl::setMediaType(const std::string& media_type)
LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_type, LLPluginClassMediaOwner *owner /* may be NULL */, S32 default_width, S32 default_height, const std::string target)
{
std::string plugin_basename = LLMIMETypes::implType(media_type);
+ LLPluginClassMedia* media_source = NULL;
+
+ // HACK: we always try to keep a spare running webkit plugin around to improve launch times.
+ if(plugin_basename == "media_plugin_webkit")
+ {
+ media_source = LLViewerMedia::getSpareBrowserMediaSource();
+ if(media_source)
+ {
+ media_source->setOwner(owner);
+ media_source->setTarget(target);
+ media_source->setSize(default_width, default_height);
+
+ return media_source;
+ }
+ }
if(plugin_basename.empty())
{
@@ -1673,7 +1743,7 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_
}
else
{
- LLPluginClassMedia* media_source = new LLPluginClassMedia(owner);
+ media_source = new LLPluginClassMedia(owner);
media_source->setSize(default_width, default_height);
media_source->setUserDataPath(user_data_path);
media_source->setLanguageCode(LLUI::getLanguage());
@@ -1753,6 +1823,22 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type)
media_source->focus(mHasFocus);
media_source->setBackgroundColor(mBackgroundColor);
+ if(gSavedSettings.getBOOL("BrowserIgnoreSSLCertErrors"))
+ {
+ media_source->ignore_ssl_cert_errors(true);
+ }
+
+ // start by assuming the default CA file will be used
+ std::string ca_path = gDirUtilp->getExpandedFilename( LL_PATH_APP_SETTINGS, "lindenlab.pem" );
+
+ // default turned off so pick up the user specified path
+ if( ! gSavedSettings.getBOOL("BrowserUseDefaultCAFile"))
+ {
+ ca_path = gSavedSettings.getString("BrowserCAFilePath");
+ }
+ // set the path to the CA.pem file
+ media_source->addCertificateFilePath( ca_path );
+
media_source->proxy_setup(gSavedSettings.getBOOL("BrowserProxyEnabled"), gSavedSettings.getString("BrowserProxyAddress"), gSavedSettings.getS32("BrowserProxyPort"));
if(mClearCache)
@@ -1849,6 +1935,18 @@ void LLViewerMediaImpl::setSize(int width, int height)
}
//////////////////////////////////////////////////////////////////////////////////////////
+void LLViewerMediaImpl::showNotification(LLNotificationPtr notify)
+{
+ mNotification = notify;
+}
+
+//////////////////////////////////////////////////////////////////////////////////////////
+void LLViewerMediaImpl::hideNotification()
+{
+ mNotification.reset();
+}
+
+//////////////////////////////////////////////////////////////////////////////////////////
void LLViewerMediaImpl::play()
{
// If the media source isn't there, try to initialize it and load an URL.
@@ -2850,7 +2948,6 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla
LL_DEBUGS("Media") << "MEDIA_EVENT_CLICK_LINK_NOFOLLOW, uri is: " << plugin->getClickURL() << LL_ENDL;
std::string url = plugin->getClickURL();
LLURLDispatcher::dispatch(url, NULL, mTrustedBrowser);
-
}
break;
case MEDIA_EVENT_CLICK_LINK_HREF:
@@ -2913,6 +3010,7 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla
case LLViewerMediaObserver::MEDIA_EVENT_NAVIGATE_BEGIN:
{
LL_DEBUGS("Media") << "MEDIA_EVENT_NAVIGATE_BEGIN, uri is: " << plugin->getNavigateURI() << LL_ENDL;
+ hideNotification();
if(getNavState() == MEDIANAVSTATE_SERVER_SENT)
{
@@ -3003,7 +3101,26 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla
plugin->sendPickFileResponse(response);
}
break;
-
+
+
+ case LLViewerMediaObserver::MEDIA_EVENT_AUTH_REQUEST:
+ {
+ LLNotification::Params auth_request_params;
+ auth_request_params.name = "AuthRequest";
+
+ // pass in host name and realm for site (may be zero length but will always exist)
+ LLSD args;
+ LLURL raw_url( plugin->getAuthURL().c_str() );
+ args["HOST_NAME"] = raw_url.getAuthority();
+ args["REALM"] = plugin->getAuthRealm();
+ auth_request_params.substitutions = args;
+
+ auth_request_params.payload = LLSD().with("media_id", mTextureId);
+ auth_request_params.functor.function = boost::bind(&LLViewerMedia::onAuthSubmit, _1, _2);
+ LLNotifications::instance().add(auth_request_params);
+ };
+ break;
+
case LLViewerMediaObserver::MEDIA_EVENT_CLOSE_REQUEST:
{
std::string uuid = plugin->getClickUUID();
@@ -3019,6 +3136,7 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla
// This close request is directed at another instance
pass_through = false;
LLFloaterMediaBrowser::closeRequest(uuid);
+ LLFloaterWebContent::closeRequest(uuid);
}
}
break;
@@ -3038,6 +3156,7 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla
// This request is directed at another instance
pass_through = false;
LLFloaterMediaBrowser::geometryChanged(uuid, plugin->getGeometryX(), plugin->getGeometryY(), plugin->getGeometryWidth(), plugin->getGeometryHeight());
+ LLFloaterWebContent::geometryChanged(uuid, plugin->getGeometryX(), plugin->getGeometryY(), plugin->getGeometryWidth(), plugin->getGeometryHeight());
}
}
break;
@@ -3521,6 +3640,11 @@ bool LLViewerMediaImpl::isInAgentParcel() const
return result;
}
+LLNotificationPtr LLViewerMediaImpl::getCurrentNotification() const
+{
+ return mNotification;
+}
+
//////////////////////////////////////////////////////////////////////////////////////////
//
// static
diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h
index 4025a4484f..e2e342cc45 100644
--- a/indra/newview/llviewermedia.h
+++ b/indra/newview/llviewermedia.h
@@ -37,6 +37,7 @@
#include "llpluginclassmedia.h"
#include "v4color.h"
+#include "llnotificationptr.h"
#include "llurl.h"
@@ -130,6 +131,8 @@ public:
static bool isParcelMediaPlaying();
static bool isParcelAudioPlaying();
+ static void onAuthSubmit(const LLSD& notification, const LLSD& response);
+
// Clear all cookies for all plugins
static void clearAllCookies();
@@ -155,6 +158,9 @@ public:
static void proxyWindowOpened(const std::string &target, const std::string &uuid);
static void proxyWindowClosed(const std::string &uuid);
+ static void createSpareBrowserMediaSource();
+ static LLPluginClassMedia* getSpareBrowserMediaSource();
+
private:
static void setOpenIDCookie();
static void onTeleportFinished();
@@ -162,6 +168,7 @@ private:
static LLPluginCookieStore *sCookieStore;
static LLURL sOpenIDURL;
static std::string sOpenIDCookie;
+ static LLPluginClassMedia* sSpareBrowserMediaSource;
};
// Implementation functions not exported into header file
@@ -195,6 +202,9 @@ public:
LLPluginClassMedia* getMediaPlugin() { return mMediaSource; }
void setSize(int width, int height);
+ void showNotification(LLNotificationPtr notify);
+ void hideNotification();
+
void play();
void stop();
void pause();
@@ -387,6 +397,9 @@ public:
// Is this media in the agent's parcel?
bool isInAgentParcel() const;
+ // get currently active notification associated with this media instance
+ LLNotificationPtr getCurrentNotification() const;
+
private:
bool isAutoPlayable() const;
bool shouldShowBasedOnClass() const;
@@ -444,7 +457,8 @@ private:
bool mNavigateSuspendedDeferred;
bool mTrustedBrowser;
std::string mTarget;
-
+ LLNotificationPtr mNotification;
+
private:
BOOL mIsUpdated ;
std::list< LLVOVolume* > mObjectList ;
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 03490034d8..9e16bf2fbb 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -45,7 +45,7 @@
#include "llconsole.h"
#include "lldebugview.h"
#include "llfilepicker.h"
-//#include "llfirstuse.h"
+#include "llfirstuse.h"
#include "llfloaterbuy.h"
#include "llfloaterbuycontents.h"
#include "llbuycurrencyhtml.h"
@@ -191,6 +191,8 @@ BOOL is_selection_buy_not_take();
S32 selection_price();
BOOL enable_take();
void handle_take();
+void handle_object_show_inspector();
+void handle_avatar_show_inspector();
bool confirm_take(const LLSD& notification, const LLSD& response);
void handle_buy_object(LLSaleInfo sale_info);
@@ -841,6 +843,35 @@ class LLAdvancedCheckFeature : public view_listener_t
}
};
+void LLDestinationAndAvatarShow(const LLSD& value)
+{
+ S32 panel_idx = value.isDefined() ? value.asInteger() : -1;
+ LLView* container = gViewerWindow->getRootView()->getChildView("avatar_picker_and_destination_guide_container");
+ LLMediaCtrl* destinations = container->findChild<LLMediaCtrl>("destination_guide_contents");
+ LLMediaCtrl* avatar_picker = container->findChild<LLMediaCtrl>("avatar_picker_contents");
+
+ switch(panel_idx)
+ {
+ case 0:
+ container->setVisible(true);
+ destinations->setVisible(true);
+ avatar_picker->setVisible(false);
+ LLFirstUse::notUsingDestinationGuide(false);
+ break;
+ case 1:
+ container->setVisible(true);
+ destinations->setVisible(false);
+ avatar_picker->setVisible(true);
+ LLFirstUse::notUsingAvatarPicker(false);
+ break;
+ default:
+ container->setVisible(false);
+ destinations->setVisible(false);
+ avatar_picker->setVisible(false);
+ break;
+ }
+};
+
//////////////////
// INFO DISPLAY //
@@ -4294,6 +4325,33 @@ void handle_take()
}
}
+void handle_object_show_inspector()
+{
+ LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection();
+ LLViewerObject* objectp = selection->getFirstRootObject(TRUE);
+ if (!objectp)
+ {
+ return;
+ }
+
+ LLSD params;
+ params["object_id"] = objectp->getID();
+ LLFloaterReg::showInstance("inspect_object", params);
+}
+
+void handle_avatar_show_inspector()
+{
+ LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
+ if(avatar)
+ {
+ LLSD params;
+ params["avatar_id"] = avatar->getID();
+ LLFloaterReg::showInstance("inspect_avatar", params);
+ }
+}
+
+
+
bool confirm_take(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
@@ -7165,6 +7223,12 @@ void handle_web_browser_test(const LLSD& param)
LLWeb::loadURLInternal(url);
}
+void handle_web_content_test(const LLSD& param)
+{
+ std::string url = param.asString();
+ LLWeb::loadWebURLInternal(url);
+}
+
void handle_buy_currency_test(void*)
{
std::string url =
@@ -7915,7 +7979,8 @@ void initialize_menus()
view_listener_t::addMenu(new LLAdvancedDumpRegionObjectCache(), "Advanced.DumpRegionObjectCache");
// Advanced > UI
- commit.add("Advanced.WebBrowserTest", boost::bind(&handle_web_browser_test, _2));
+ commit.add("Advanced.WebBrowserTest", boost::bind(&handle_web_browser_test, _2)); // sigh! this one opens the MEDIA browser
+ commit.add("Advanced.WebContentTest", boost::bind(&handle_web_content_test, _2)); // this one opens the Web Content floater
view_listener_t::addMenu(new LLAdvancedBuyCurrencyTest(), "Advanced.BuyCurrencyTest");
view_listener_t::addMenu(new LLAdvancedDumpSelectMgr(), "Advanced.DumpSelectMgr");
view_listener_t::addMenu(new LLAdvancedDumpInventory(), "Advanced.DumpInventory");
@@ -8046,6 +8111,7 @@ void initialize_menus()
view_listener_t::addMenu(new LLAvatarVisibleDebug(), "Avatar.VisibleDebug");
view_listener_t::addMenu(new LLAvatarInviteToGroup(), "Avatar.InviteToGroup");
commit.add("Avatar.Eject", boost::bind(&handle_avatar_eject, LLSD()));
+ commit.add("Avatar.ShowInspector", boost::bind(&handle_avatar_show_inspector));
view_listener_t::addMenu(new LLAvatarSendIM(), "Avatar.SendIM");
view_listener_t::addMenu(new LLAvatarCall(), "Avatar.Call");
enable.add("Avatar.EnableCall", boost::bind(&LLAvatarActions::canCall));
@@ -8073,6 +8139,7 @@ void initialize_menus()
commit.add("Object.Inspect", boost::bind(&handle_object_inspect));
commit.add("Object.Open", boost::bind(&handle_object_open));
commit.add("Object.Take", boost::bind(&handle_take));
+ commit.add("Object.ShowInspector", boost::bind(&handle_object_show_inspector));
enable.add("Object.EnableOpen", boost::bind(&enable_object_open));
enable.add("Object.EnableTouch", boost::bind(&enable_object_touch, _1));
enable.add("Object.EnableDelete", boost::bind(&enable_object_delete));
@@ -8132,4 +8199,6 @@ void initialize_menus()
view_listener_t::addMenu(new LLEditableSelectedMono(), "EditableSelectedMono");
view_listener_t::addMenu(new LLToggleUIHints(), "ToggleUIHints");
+
+ commit.add("DestinationAndAvatar.show", boost::bind(&LLDestinationAndAvatarShow, _2));
}
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index 048691696b..fda291f3c1 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -404,6 +404,8 @@ class LLFileTakeSnapshotToDisk : public view_listener_t
gSavedSettings.getBOOL("RenderUIInSnapshot"),
FALSE))
{
+ gViewerWindow->playSnapshotAnimAndSound();
+
LLPointer<LLImageFormatted> formatted;
switch(LLFloaterSnapshot::ESnapshotFormat(gSavedSettings.getS32("SnapshotFormat")))
{
@@ -505,7 +507,7 @@ void upload_new_resource(const std::string& src_filename, std::string name,
"No file extension for the file: '%s'\nPlease make sure the file has a correct file extension",
short_name.c_str());
args["FILE"] = short_name;
- upload_error(error_message, "NofileExtension", filename, args);
+ upload_error(error_message, "NoFileExtension", filename, args);
return;
}
else if( exten == "bmp")
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 5cbd5ffa0b..7dc5d96689 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -171,6 +171,31 @@ const BOOL SCRIPT_QUESTION_IS_CAUTION[SCRIPT_PERMISSION_EOF] =
FALSE // ControlYourCamera
};
+// Extract channel and version from a string like "SL Web Viewer Beta 10.11.29.215604".
+// (channel: "SL Web Viewer Beta", version: "10.11.29.215604")
+static bool parse_version_info(const std::string& version_info, std::string& channel, std::string& ver)
+{
+ size_t last_space = version_info.rfind(" ");
+ channel = version_info;
+
+ if (last_space != std::string::npos)
+ {
+ try
+ {
+ ver = version_info.substr(last_space + 1);
+ channel.replace(last_space, ver.length() + 1, ""); // strip version
+ }
+ catch (std::out_of_range)
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ return false;
+}
+
bool friendship_offer_callback(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
@@ -3347,6 +3372,8 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
// then this info is news to us.
void process_teleport_start(LLMessageSystem *msg, void**)
{
+ // on teleport, don't tell them about destination guide anymore
+ LLFirstUse::notUsingDestinationGuide(false);
U32 teleport_flags = 0x0;
msg->getU32("Info", "TeleportFlags", teleport_flags);
@@ -3823,28 +3850,22 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
if (!gLastVersionChannel.empty())
{
- // work out the URL for this server's Release Notes
- std::string url ="http://wiki.secondlife.com/wiki/Release_Notes/";
- std::string server_version = version_channel;
- std::vector<std::string> s_vect;
- boost::algorithm::split(s_vect, server_version, isspace);
- for(U32 i = 0; i < s_vect.size(); i++)
+ std::string url = regionp->getCapability("ServerReleaseNotes");
+ if (url.empty())
{
- if (i != (s_vect.size() - 1))
+ // The capability hasn't arrived yet or is not supported,
+ // fall back to parsing server version channel.
+ std::string channel, ver;
+ if (!parse_version_info(version_channel, channel, ver))
{
- if(i != (s_vect.size() - 2))
- {
- url += s_vect[i] + "_";
- }
- else
- {
- url += s_vect[i] + "/";
- }
- }
- else
- {
- url += s_vect[i].substr(0,4);
+ llwarns << "Failed to parse server version channel (" << version_channel << ")" << llendl;
}
+
+ url = gSavedSettings.getString("ReleaseNotesURL");
+ LLSD args;
+ args["CHANNEL"] = LLWeb::escapeURL(channel);
+ args["VERSION"] = LLWeb::escapeURL(ver);
+ LLStringUtil::format(url, args);
}
LLSD args;
@@ -6304,6 +6325,9 @@ bool handle_lure_callback(const LLSD& notification, const LLSD& response)
payload["from_id"] = target_id;
payload["SUPPRESS_TOAST"] = true;
LLNotificationsUtil::add("TeleportOfferSent", args, payload);
+
+ // Add the recepient to the recent people list.
+ LLRecentPeople::instance().add(target_id);
}
}
gAgent.sendReliableMessage();
@@ -6686,6 +6710,8 @@ void process_initiate_download(LLMessageSystem* msg, void**)
void process_script_teleport_request(LLMessageSystem* msg, void**)
{
+ if (!gSavedSettings.getBOOL("ScriptsCanShowUI")) return;
+
std::string object_name;
std::string sim_name;
LLVector3 pos;
diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h
index 6ff893f543..b4a9b8e677 100644
--- a/indra/newview/llviewermessage.h
+++ b/indra/newview/llviewermessage.h
@@ -117,7 +117,6 @@ void process_alert_core(const std::string& message, BOOL modal);
typedef std::list<LLMeanCollisionData*> mean_collision_list_t;
extern mean_collision_list_t gMeanCollisionList;
-void handle_show_mean_events(void *);
void process_mean_collision_alert_message(LLMessageSystem* msg, void**);
void process_frozen_message(LLMessageSystem* msg, void**);
diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp
index 99e869dafc..40f0b43313 100644
--- a/indra/newview/llviewerparcelmedia.cpp
+++ b/indra/newview/llviewerparcelmedia.cpp
@@ -586,6 +586,18 @@ void LLViewerParcelMedia::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent
LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_GEOMETRY_CHANGE, uuid is " << self->getClickUUID() << LL_ENDL;
}
break;
+
+ case MEDIA_EVENT_AUTH_REQUEST:
+ {
+ LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_AUTH_REQUEST, url " << self->getAuthURL() << ", realm " << self->getAuthRealm() << LL_ENDL;
+ }
+ break;
+
+ case MEDIA_EVENT_LINK_HOVERED:
+ {
+ LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_LINK_HOVERED, hover text is: " << self->getHoverText() << LL_ENDL;
+ };
+ break;
};
}
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index 11de377410..fccd1156d3 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -850,7 +850,7 @@ LLParcel* LLViewerParcelMgr::getCollisionParcel() const
void LLViewerParcelMgr::render()
{
- if (mSelected && mRenderSelection)
+ if (mSelected && mRenderSelection && gSavedSettings.getBOOL("RenderParcelSelection"))
{
// Rendering is done in agent-coordinates, so need to supply
// an appropriate offset to the render code.
@@ -1784,8 +1784,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
void optionally_start_music(const std::string& music_url)
{
- if (gSavedSettings.getBOOL("AudioStreamingMusic") &&
- gSavedSettings.getBOOL("AudioStreamingMedia"))
+ if (gSavedSettings.getBOOL("AudioStreamingMusic"))
{
// only play music when you enter a new parcel if the UI control for this
// was not *explicitly* stopped by the user. (part of SL-4878)
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index ca07e7c4cf..551ba18dd5 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -1414,6 +1414,7 @@ void LLViewerRegion::setSeedCapability(const std::string& url)
capabilityNames.append("UpdateNotecardTaskInventory");
capabilityNames.append("UpdateScriptTask");
capabilityNames.append("UploadBakedTexture");
+ capabilityNames.append("ViewerMetrics");
capabilityNames.append("ViewerStartAuction");
capabilityNames.append("ViewerStats");
capabilityNames.append("WebFetchInventoryDescendents");
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 6160510c0e..0c05a301e6 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -1494,57 +1494,56 @@ void LLViewerFetchedTexture::setKnownDrawSize(S32 width, S32 height)
//virtual
void LLViewerFetchedTexture::processTextureStats()
{
- static LLCachedControl<bool> textures_fullres(gSavedSettings,"TextureLoadFullRes");
-
if(mFullyLoaded)
- {
- if(needsToSaveRawImage())//needs to reload
+ {
+ if(mDesiredDiscardLevel > mMinDesiredDiscardLevel)//need to load more
{
+ mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, mMinDesiredDiscardLevel) ;
mFullyLoaded = FALSE ;
}
- else
- {
- return ;
- }
- }
-
- //updateVirtualSize() ;
-
- if (textures_fullres)
- {
- mDesiredDiscardLevel = 0;
- }
- else if(!mFullWidth || !mFullHeight)
- {
- mDesiredDiscardLevel = llmin(getMaxDiscardLevel(), (S32)mLoadedCallbackDesiredDiscardLevel) ;
}
else
- {
- if(!mKnownDrawWidth || !mKnownDrawHeight || mFullWidth <= mKnownDrawWidth || mFullHeight <= mKnownDrawHeight)
+ {
+ updateVirtualSize() ;
+
+ static LLCachedControl<bool> textures_fullres(gSavedSettings,"TextureLoadFullRes");
+
+ if (textures_fullres)
{
- if (mFullWidth > MAX_IMAGE_SIZE_DEFAULT || mFullHeight > MAX_IMAGE_SIZE_DEFAULT)
+ mDesiredDiscardLevel = 0;
+ }
+ else if(!mFullWidth || !mFullHeight)
+ {
+ mDesiredDiscardLevel = llmin(getMaxDiscardLevel(), (S32)mLoadedCallbackDesiredDiscardLevel) ;
+ }
+ else
+ {
+ if(!mKnownDrawWidth || !mKnownDrawHeight || mFullWidth <= mKnownDrawWidth || mFullHeight <= mKnownDrawHeight)
{
- mDesiredDiscardLevel = 1; // MAX_IMAGE_SIZE_DEFAULT = 1024 and max size ever is 2048
+ if (mFullWidth > MAX_IMAGE_SIZE_DEFAULT || mFullHeight > MAX_IMAGE_SIZE_DEFAULT)
+ {
+ mDesiredDiscardLevel = 1; // MAX_IMAGE_SIZE_DEFAULT = 1024 and max size ever is 2048
+ }
+ else
+ {
+ mDesiredDiscardLevel = 0;
+ }
}
- else
+ else if(mKnownDrawSizeChanged)//known draw size is set
+ {
+ mDesiredDiscardLevel = (S8)llmin(log((F32)mFullWidth / mKnownDrawWidth) / log_2,
+ log((F32)mFullHeight / mKnownDrawHeight) / log_2) ;
+ mDesiredDiscardLevel = llclamp(mDesiredDiscardLevel, (S8)0, (S8)getMaxDiscardLevel()) ;
+ mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, mMinDesiredDiscardLevel) ;
+ }
+ mKnownDrawSizeChanged = FALSE ;
+
+ if(getDiscardLevel() >= 0 && (getDiscardLevel() <= mDesiredDiscardLevel))
{
- mDesiredDiscardLevel = 0;
+ mFullyLoaded = TRUE ;
}
}
- else if(mKnownDrawSizeChanged)//known draw size is set
- {
- mDesiredDiscardLevel = (S8)llmin(log((F32)mFullWidth / mKnownDrawWidth) / log_2,
- log((F32)mFullHeight / mKnownDrawHeight) / log_2) ;
- mDesiredDiscardLevel = llclamp(mDesiredDiscardLevel, (S8)0, (S8)getMaxDiscardLevel()) ;
- mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, mMinDesiredDiscardLevel) ;
- }
- mKnownDrawSizeChanged = FALSE ;
-
- if(getDiscardLevel() >= 0 && (getDiscardLevel() <= mDesiredDiscardLevel))
- {
- mFullyLoaded = TRUE ;
- }
- }
+ }
if(mForceToSaveRawImage && mDesiredSavedRawDiscardLevel >= 0) //force to refetch the texture.
{
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 275dfaa996..10126219f8 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -1531,42 +1531,45 @@ bool LLUIImageList::initFromFile()
return false;
}
- std::vector<std::string> paths;
- // path to current selected skin
- paths.push_back(gDirUtilp->getSkinDir()
- + gDirUtilp->getDirDelimiter()
- + "textures"
- + gDirUtilp->getDirDelimiter()
- + "textures.xml");
- // path to user overrides on current skin
- paths.push_back(gDirUtilp->getUserSkinDir()
- + gDirUtilp->getDirDelimiter()
- + "textures"
- + gDirUtilp->getDirDelimiter()
- + "textures.xml");
-
- // apply skinned xml files incrementally
- for(std::vector<std::string>::iterator path_it = paths.begin();
- path_it != paths.end();
- ++path_it)
- {
- // don't reapply base file to itself
- if (!path_it->empty() && (*path_it) != base_file_path)
- {
- LLXMLNodePtr update_root;
- if (LLXMLNode::parseFile(*path_it, update_root, NULL))
- {
- LLXMLNode::updateNode(root, update_root);
- }
- }
- }
-
UIImageDeclarations images;
LLXUIParser parser;
parser.readXUI(root, images, base_file_path);
+ // add components defined in current skin
+ std::string skin_update_path = gDirUtilp->getSkinDir()
+ + gDirUtilp->getDirDelimiter()
+ + "textures"
+ + gDirUtilp->getDirDelimiter()
+ + "textures.xml";
+ LLXMLNodePtr update_root;
+ if (skin_update_path != base_file_path
+ && LLXMLNode::parseFile(skin_update_path, update_root, NULL))
+ {
+ parser.readXUI(update_root, images, skin_update_path);
+ }
+
+ // add components defined in user override of current skin
+ skin_update_path = gDirUtilp->getUserSkinDir()
+ + gDirUtilp->getDirDelimiter()
+ + "textures"
+ + gDirUtilp->getDirDelimiter()
+ + "textures.xml";
+ if (skin_update_path != base_file_path
+ && LLXMLNode::parseFile(skin_update_path, update_root, NULL))
+ {
+ parser.readXUI(update_root, images, skin_update_path);
+ }
+
if (!images.validateBlock()) return false;
+ std::map<std::string, UIImageDeclaration> merged_declarations;
+ for (LLInitParam::ParamIterator<UIImageDeclaration>::const_iterator image_it = images.textures.begin();
+ image_it != images.textures.end();
+ ++image_it)
+ {
+ merged_declarations[image_it->name].overwriteFrom(*image_it);
+ }
+
enum e_decode_pass
{
PASS_DECODE_NOW,
@@ -1576,19 +1579,20 @@ bool LLUIImageList::initFromFile()
for (S32 cur_pass = PASS_DECODE_NOW; cur_pass < NUM_PASSES; cur_pass++)
{
- for (LLInitParam::ParamIterator<UIImageDeclaration>::const_iterator image_it = images.textures.begin();
- image_it != images.textures.end();
+ for (std::map<std::string, UIImageDeclaration>::const_iterator image_it = merged_declarations.begin();
+ image_it != merged_declarations.end();
++image_it)
{
- std::string file_name = image_it->file_name.isProvided() ? image_it->file_name() : image_it->name();
+ const UIImageDeclaration& image = image_it->second;
+ std::string file_name = image.file_name.isProvided() ? image.file_name() : image.name();
// load high priority textures on first pass (to kick off decode)
- enum e_decode_pass decode_pass = image_it->preload ? PASS_DECODE_NOW : PASS_DECODE_LATER;
+ enum e_decode_pass decode_pass = image.preload ? PASS_DECODE_NOW : PASS_DECODE_LATER;
if (decode_pass != cur_pass)
{
continue;
}
- preloadUIImage(image_it->name, file_name, image_it->use_mips, image_it->scale);
+ preloadUIImage(image.name, file_name, image.use_mips, image.scale);
}
if (cur_pass == PASS_DECODE_NOW && !gSavedSettings.getBOOL("NoPreload"))
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index a7790243ed..c812fcf2da 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1367,6 +1367,15 @@ LLViewerWindow::LLViewerWindow(
LL_WARNS("Window") << " Someone took over my signal/exception handler (post createWindow)!" << LL_ENDL;
}
+ LLCoordScreen scr;
+ mWindow->getSize(&scr);
+
+ if(fullscreen && ( scr.mX!=width || scr.mY!=height))
+ {
+ llwarns << "Fullscreen has forced us in to a different resolution now using "<<scr.mX<<" x "<<scr.mY<<llendl;
+ gSavedSettings.setS32("FullScreenWidth",scr.mX);
+ gSavedSettings.setS32("FullScreenHeight",scr.mY);
+ }
if (NULL == mWindow)
{
@@ -1378,7 +1387,7 @@ LLViewerWindow::LLViewerWindow(
LL_WARNS("Window") << "Unable to create window, be sure screen is set at 32-bit color in Control Panels->Display->Settings"
<< LL_ENDL;
#endif
- LLAppViewer::instance()->forceExit(1);
+ LLAppViewer::instance()->fastQuit(1);
}
// Get the real window rect the window was created with (since there are various OS-dependent reasons why
@@ -1545,8 +1554,9 @@ void LLViewerWindow::initBase()
mWorldViewPlaceholder = main_view->getChildView("world_view_rect")->getHandle();
mNonSideTrayView = main_view->getChildView("non_side_tray_view")->getHandle();
mFloaterViewHolder = main_view->getChildView("floater_view_holder")->getHandle();
- mPopupView = main_view->findChild<LLPopupView>("popup_holder");
+ mPopupView = main_view->getChild<LLPopupView>("popup_holder");
mHintHolder = main_view->getChild<LLView>("hint_holder")->getHandle();
+ mLoginPanelHolder = main_view->getChild<LLView>("login_panel_holder")->getHandle();
// Constrain floaters to inside the menu and status bar regions.
gFloaterView = main_view->getChild<LLFloaterView>("Floater View");
@@ -1680,7 +1690,7 @@ void LLViewerWindow::initWorldUI()
{
LLRect hud_rect = full_window;
hud_rect.mBottom += 50;
- if (gMenuBarView)
+ if (gMenuBarView && gMenuBarView->isInVisibleChain())
{
hud_rect.mTop -= gMenuBarView->getRect().getHeight();
}
@@ -1709,6 +1719,20 @@ void LLViewerWindow::initWorldUI()
buttons_panel->setShape(buttons_panel_container->getLocalRect());
buttons_panel->setFollowsAll();
buttons_panel_container->addChild(buttons_panel);
+
+ LLView* avatar_picker_destination_guide_container = gViewerWindow->getRootView()->getChild<LLView>("avatar_picker_and_destination_guide_container");
+ LLMediaCtrl* destinations = avatar_picker_destination_guide_container->findChild<LLMediaCtrl>("destination_guide_contents");
+ LLMediaCtrl* avatar_picker = avatar_picker_destination_guide_container->findChild<LLMediaCtrl>("avatar_picker_contents");
+ if (destinations)
+ {
+ destinations->navigateTo(gSavedSettings.getString("DestinationGuideURL"), "text/html");
+ }
+
+ if (avatar_picker)
+ {
+ avatar_picker->navigateTo(gSavedSettings.getString("AvatarPickerURL"), "text/html");
+ }
+
}
// Destroy the UI
@@ -2480,6 +2504,10 @@ void LLViewerWindow::updateUI()
{
LLFirstUse::notUsingDestinationGuide();
}
+ if (gLoggedInTime.getElapsedTimeF32() > gSavedSettings.getF32("AvatarPickerHintTimeout"))
+ {
+ LLFirstUse::notUsingAvatarPicker();
+ }
if (gLoggedInTime.getElapsedTimeF32() > gSavedSettings.getF32("SidePanelHintTimeout"))
{
LLFirstUse::notUsingSidePanel();
@@ -2975,18 +3003,20 @@ void LLViewerWindow::updateKeyboardFocus()
LLUICtrl* parent = cur_focus->getParentUICtrl();
const LLUICtrl* focus_root = cur_focus->findRootMostFocusRoot();
+ bool new_focus_found = false;
while(parent)
{
- if (parent->isCtrl() &&
- (parent->hasTabStop() || parent == focus_root) &&
- !parent->getIsChrome() &&
- parent->isInVisibleChain() &&
- parent->isInEnabledChain())
+ if (parent->isCtrl()
+ && (parent->hasTabStop() || parent == focus_root)
+ && !parent->getIsChrome()
+ && parent->isInVisibleChain()
+ && parent->isInEnabledChain())
{
if (!parent->focusFirstItem())
{
parent->setFocus(TRUE);
}
+ new_focus_found = true;
break;
}
parent = parent->getParentUICtrl();
@@ -2995,7 +3025,7 @@ void LLViewerWindow::updateKeyboardFocus()
// if we didn't find a better place to put focus, just release it
// hasFocus() will return true if and only if we didn't touch focus since we
// are only moving focus higher in the hierarchy
- if (cur_focus->hasFocus())
+ if (!new_focus_found)
{
cur_focus->setFocus(FALSE);
}
@@ -4281,17 +4311,8 @@ void LLViewerWindow::setup3DRender()
void LLViewerWindow::setup3DViewport(S32 x_offset, S32 y_offset)
{
- if (LLRenderTarget::getCurrentBoundTarget() != NULL)
- {
- // don't use translation component of mWorldViewRectRaw, as we are already in a properly sized render target
- gGLViewport[0] = x_offset;
- gGLViewport[1] = y_offset;
- }
- else
- {
- gGLViewport[0] = mWorldViewRectRaw.mLeft + x_offset;
- gGLViewport[1] = mWorldViewRectRaw.mBottom + y_offset;
- }
+ gGLViewport[0] = mWorldViewRectRaw.mLeft + x_offset;
+ gGLViewport[1] = mWorldViewRectRaw.mBottom + y_offset;
gGLViewport[2] = mWorldViewRectRaw.getWidth();
gGLViewport[3] = mWorldViewRectRaw.getHeight();
glViewport(gGLViewport[0], gGLViewport[1], gGLViewport[2], gGLViewport[3]);
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index 47fb7c4883..5eeb02b080 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -186,11 +186,6 @@ public:
/*virtual*/ std::string translateString(const char* tag,
const std::map<std::string, std::string>& args);
- // signal on bottom tray width changed
- typedef boost::function<void (void)> bottom_tray_callback_t;
- typedef boost::signals2::signal<void (void)> bottom_tray_signal_t;
- bottom_tray_signal_t mOnBottomTrayWidthChanged;
- boost::signals2::connection setOnBottomTrayWidthChanged(bottom_tray_callback_t cb) { return mOnBottomTrayWidthChanged.connect(cb); }
// signal on update of WorldView rect
typedef boost::function<void (LLRect old_world_rect, LLRect new_world_rect)> world_rect_callback_t;
typedef boost::signals2::signal<void (LLRect old_world_rect, LLRect new_world_rect)> world_rect_signal_t;
@@ -288,6 +283,7 @@ public:
LLView* getNonSideTrayView() { return mNonSideTrayView.get(); }
LLView* getFloaterViewHolder() { return mFloaterViewHolder.get(); }
LLView* getHintHolder() { return mHintHolder.get(); }
+ LLView* getLoginPanelHolder() { return mLoginPanelHolder.get(); }
BOOL handleKey(KEY key, MASK mask);
void handleScrollWheel (S32 clicks);
@@ -447,6 +443,7 @@ protected:
LLHandle<LLView> mNonSideTrayView; // parent of world view + bottom bar, etc...everything but the side tray
LLHandle<LLView> mFloaterViewHolder; // container for floater_view
LLHandle<LLView> mHintHolder; // container for hints
+ LLHandle<LLView> mLoginPanelHolder; // container for login panel
LLPopupView* mPopupView; // container for transient popups
class LLDebugText* mDebugText; // Internal class for debug text
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index f4dec9294f..bb4c5b1804 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -2333,8 +2333,19 @@ BOOL LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled)
{
- // disable voice visualizer when in mouselook
- mVoiceVisualizer->setVoiceEnabled( voice_enabled && !(isSelf() && gAgentCamera.cameraMouselook()) );
+ bool render_visualizer = voice_enabled;
+
+ // Don't render the user's own voice visualizer when in mouselook, or when opening the mic is disabled.
+ if(isSelf())
+ {
+ if(gAgentCamera.cameraMouselook() || gSavedSettings.getBOOL("VoiceDisableMic"))
+ {
+ render_visualizer = false;
+ }
+ }
+
+ mVoiceVisualizer->setVoiceEnabled(render_visualizer);
+
if ( voice_enabled )
{
//----------------------------------------------------------------
diff --git a/indra/newview/llvoicecallhandler.cpp b/indra/newview/llvoicecallhandler.cpp
new file mode 100644
index 0000000000..274bd75208
--- /dev/null
+++ b/indra/newview/llvoicecallhandler.cpp
@@ -0,0 +1,61 @@
+ /**
+ * @file llvoicecallhandler.cpp
+ * @brief slapp to handle avatar to avatar voice call.
+ *
+ * $LicenseInfo:firstyear=2001&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+#include "llcommandhandler.h"
+#include "llavataractions.h"
+
+class LLVoiceCallAvatarHandler : public LLCommandHandler
+{
+public:
+ // requires trusted browser to trigger
+ LLVoiceCallAvatarHandler() : LLCommandHandler("voicecallavatar", UNTRUSTED_THROTTLE)
+ {
+ }
+
+ bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web)
+ {
+ //Make sure we have some parameters
+ if (params.size() == 0)
+ {
+ return false;
+ }
+
+ //Get the ID
+ LLUUID id;
+ if (!id.set( params[0], FALSE ))
+ {
+ return false;
+ }
+
+ //instigate call with this avatar
+ LLAvatarActions::startCall( id );
+ return true;
+ }
+};
+
+LLVoiceCallAvatarHandler gVoiceCallAvatarHandler;
+
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp
index 6c44f639ec..730f022c50 100644
--- a/indra/newview/llvoiceclient.cpp
+++ b/indra/newview/llvoiceclient.cpp
@@ -35,6 +35,7 @@
#include "llnotificationsutil.h"
#include "llsdserialize.h"
#include "llui.h"
+#include "llkeyboard.h"
const F32 LLVoiceClient::OVERDRIVEN_POWER_LEVEL = 0.7f;
@@ -113,8 +114,18 @@ LLVoiceClient::LLVoiceClient()
mVoiceModule(NULL),
m_servicePump(NULL),
mVoiceEffectEnabled(LLCachedControl<bool>(gSavedSettings, "VoiceMorphingEnabled")),
- mVoiceEffectDefault(LLCachedControl<std::string>(gSavedPerAccountSettings, "VoiceEffectDefault"))
+ mVoiceEffectDefault(LLCachedControl<std::string>(gSavedPerAccountSettings, "VoiceEffectDefault")),
+ mPTTDirty(true),
+ mPTT(true),
+ mUsePTT(true),
+ mPTTIsMiddleMouse(false),
+ mPTTKey(0),
+ mPTTIsToggle(false),
+ mUserPTTState(false),
+ mMuteMic(false),
+ mDisableMic(false)
{
+ updateSettings();
}
//---------------------------------------------------
@@ -173,6 +184,14 @@ const LLVoiceVersionInfo LLVoiceClient::getVersion()
void LLVoiceClient::updateSettings()
{
+ setUsePTT(gSavedSettings.getBOOL("PTTCurrentlyEnabled"));
+ std::string keyString = gSavedSettings.getString("PushToTalkButton");
+ setPTTKey(keyString);
+ setPTTIsToggle(gSavedSettings.getBOOL("PushToTalkToggle"));
+ mDisableMic = gSavedSettings.getBOOL("VoiceDisableMic");
+
+ updateMicMuteLogic();
+
if (mVoiceModule) mVoiceModule->updateSettings();
}
@@ -481,6 +500,26 @@ void LLVoiceClient::setVoiceEnabled(bool enabled)
if (mVoiceModule) mVoiceModule->setVoiceEnabled(enabled);
}
+void LLVoiceClient::updateMicMuteLogic()
+{
+ // If not configured to use PTT, the mic should be open (otherwise the user will be unable to speak).
+ bool new_mic_mute = false;
+
+ if(mUsePTT)
+ {
+ // If configured to use PTT, track the user state.
+ new_mic_mute = !mUserPTTState;
+ }
+
+ if(mMuteMic || mDisableMic)
+ {
+ // Either of these always overrides any other PTT setting.
+ new_mic_mute = true;
+ }
+
+ if (mVoiceModule) mVoiceModule->setMuteMic(new_mic_mute);
+}
+
void LLVoiceClient::setLipSyncEnabled(BOOL enabled)
{
if (mVoiceModule) mVoiceModule->setLipSyncEnabled(enabled);
@@ -500,7 +539,8 @@ BOOL LLVoiceClient::lipSyncEnabled()
void LLVoiceClient::setMuteMic(bool muted)
{
- if (mVoiceModule) mVoiceModule->setMuteMic(muted);
+ mMuteMic = muted;
+ updateMicMuteLogic();
}
@@ -509,64 +549,116 @@ void LLVoiceClient::setMuteMic(bool muted)
void LLVoiceClient::setUserPTTState(bool ptt)
{
- if (mVoiceModule) mVoiceModule->setUserPTTState(ptt);
+ mUserPTTState = ptt;
+ updateMicMuteLogic();
}
bool LLVoiceClient::getUserPTTState()
{
- if (mVoiceModule)
- {
- return mVoiceModule->getUserPTTState();
- }
- else
- {
- return false;
- }
+ return mUserPTTState;
}
void LLVoiceClient::setUsePTT(bool usePTT)
{
- if (mVoiceModule) mVoiceModule->setUsePTT(usePTT);
+ if(usePTT && !mUsePTT)
+ {
+ // When the user turns on PTT, reset the current state.
+ mUserPTTState = false;
+ }
+ mUsePTT = usePTT;
+
+ updateMicMuteLogic();
}
void LLVoiceClient::setPTTIsToggle(bool PTTIsToggle)
{
- if (mVoiceModule) mVoiceModule->setPTTIsToggle(PTTIsToggle);
+ if(!PTTIsToggle && mPTTIsToggle)
+ {
+ // When the user turns off toggle, reset the current state.
+ mUserPTTState = false;
+ }
+
+ mPTTIsToggle = PTTIsToggle;
+
+ updateMicMuteLogic();
}
bool LLVoiceClient::getPTTIsToggle()
{
- if (mVoiceModule)
+ return mPTTIsToggle;
+}
+
+void LLVoiceClient::setPTTKey(std::string &key)
+{
+ if(key == "MiddleMouse")
{
- return mVoiceModule->getPTTIsToggle();
+ mPTTIsMiddleMouse = true;
}
- else {
- return false;
+ else
+ {
+ mPTTIsMiddleMouse = false;
+ if(!LLKeyboard::keyFromString(key, &mPTTKey))
+ {
+ // If the call failed, don't match any key.
+ key = KEY_NONE;
+ }
}
-
}
void LLVoiceClient::inputUserControlState(bool down)
{
- if (mVoiceModule) mVoiceModule->inputUserControlState(down);
+ if(mPTTIsToggle)
+ {
+ if(down) // toggle open-mic state on 'down'
+ {
+ toggleUserPTTState();
+ }
+ }
+ else // set open-mic state as an absolute
+ {
+ setUserPTTState(down);
+ }
}
void LLVoiceClient::toggleUserPTTState(void)
{
- if (mVoiceModule) mVoiceModule->toggleUserPTTState();
+ setUserPTTState(!getUserPTTState());
}
void LLVoiceClient::keyDown(KEY key, MASK mask)
{
- if (mVoiceModule) mVoiceModule->keyDown(key, mask);
+ if (gKeyboard->getKeyRepeated(key))
+ {
+ // ignore auto-repeat keys
+ return;
+ }
+
+ if(!mPTTIsMiddleMouse)
+ {
+ bool down = (mPTTKey != KEY_NONE)
+ && gKeyboard->getKeyDown(mPTTKey);
+ inputUserControlState(down);
+ }
+
}
void LLVoiceClient::keyUp(KEY key, MASK mask)
{
- if (mVoiceModule) mVoiceModule->keyUp(key, mask);
+ if(!mPTTIsMiddleMouse)
+ {
+ bool down = (mPTTKey != KEY_NONE)
+ && gKeyboard->getKeyDown(mPTTKey);
+ inputUserControlState(down);
+ }
}
void LLVoiceClient::middleMouseState(bool down)
{
- if (mVoiceModule) mVoiceModule->middleMouseState(down);
+ if(mPTTIsMiddleMouse)
+ {
+ if(mPTTIsMiddleMouse)
+ {
+ inputUserControlState(down);
+ }
+ }
}
diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h
index 24d7d7163e..c9aeea35a9 100644
--- a/indra/newview/llvoiceclient.h
+++ b/indra/newview/llvoiceclient.h
@@ -191,25 +191,9 @@ public:
virtual void setVoiceEnabled(bool enabled)=0;
virtual void setLipSyncEnabled(BOOL enabled)=0;
virtual BOOL lipSyncEnabled()=0;
- virtual void setMuteMic(bool muted)=0; // Use this to mute the local mic (for when the client is minimized, etc), ignoring user PTT state.
+ virtual void setMuteMic(bool muted)=0; // Set the mute state of the local mic.
//@}
-
- ////////////////////////
- /// @name PTT
- //@{
- virtual void setUserPTTState(bool ptt)=0;
- virtual bool getUserPTTState()=0;
- virtual void setUsePTT(bool usePTT)=0;
- virtual void setPTTIsToggle(bool PTTIsToggle)=0;
- virtual bool getPTTIsToggle()=0;
- virtual void toggleUserPTTState(void)=0;
- virtual void inputUserControlState(bool down)=0; // interpret any sort of up-down mic-open control input according to ptt-toggle prefs
-
- virtual void keyDown(KEY key, MASK mask)=0;
- virtual void keyUp(KEY key, MASK mask)=0;
- virtual void middleMouseState(bool down)=0;
- //@}
-
+
//////////////////////////
/// @name nearby speaker accessors
//@{
@@ -406,6 +390,9 @@ public:
void setUsePTT(bool usePTT);
void setPTTIsToggle(bool PTTIsToggle);
bool getPTTIsToggle();
+ void setPTTKey(std::string &key);
+
+ void updateMicMuteLogic();
BOOL lipSyncEnabled();
@@ -471,6 +458,17 @@ protected:
LLCachedControl<bool> mVoiceEffectEnabled;
LLCachedControl<std::string> mVoiceEffectDefault;
+
+ bool mPTTDirty;
+ bool mPTT;
+
+ bool mUsePTT;
+ bool mPTTIsMiddleMouse;
+ KEY mPTTKey;
+ bool mPTTIsToggle;
+ bool mUserPTTState;
+ bool mMuteMic;
+ bool mDisableMic;
};
/**
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 019629084f..08e242af8e 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -46,7 +46,6 @@
#include "llviewernetwork.h" // for gGridChoice
#include "llbase64.h"
#include "llviewercontrol.h"
-#include "llkeyboard.h"
#include "llappviewer.h" // for gDisconnected, gDisableVoice
// Viewer includes
@@ -326,14 +325,8 @@ LLVivoxVoiceClient::LLVivoxVoiceClient() :
mRenderDeviceDirty(false),
mSpatialCoordsDirty(false),
- mPTTDirty(true),
- mPTT(true),
- mUsePTT(true),
- mPTTIsMiddleMouse(false),
- mPTTKey(0),
- mPTTIsToggle(false),
- mUserPTTState(false),
mMuteMic(false),
+ mMuteMicDirty(false),
mFriendsListDirty(true),
mEarLocation(0),
@@ -435,10 +428,6 @@ const LLVoiceVersionInfo& LLVivoxVoiceClient::getVersion()
void LLVivoxVoiceClient::updateSettings()
{
setVoiceEnabled(gSavedSettings.getBOOL("EnableVoiceChat"));
- setUsePTT(gSavedSettings.getBOOL("PTTCurrentlyEnabled"));
- std::string keyString = gSavedSettings.getString("PushToTalkButton");
- setPTTKey(keyString);
- setPTTIsToggle(gSavedSettings.getBOOL("PushToTalkToggle"));
setEarLocation(gSavedSettings.getS32("VoiceEarLocation"));
std::string inputDevice = gSavedSettings.getString("VoiceInputAudioDevice");
@@ -950,7 +939,7 @@ void LLVivoxVoiceClient::stateMachine()
setState(stateDaemonLaunched);
// Dirty the states we'll need to sync with the daemon when it comes up.
- mPTTDirty = true;
+ mMuteMicDirty = true;
mMicVolumeDirty = true;
mSpeakerVolumeDirty = true;
mSpeakerMuteDirty = true;
@@ -1535,7 +1524,7 @@ void LLVivoxVoiceClient::stateMachine()
if(mAudioSession && mAudioSession->mVoiceEnabled)
{
// Dirty state that may need to be sync'ed with the daemon.
- mPTTDirty = true;
+ mMuteMicDirty = true;
mSpeakerVolumeDirty = true;
mSpatialCoordsDirty = true;
@@ -1576,35 +1565,6 @@ void LLVivoxVoiceClient::stateMachine()
}
else
{
-
- // Figure out whether the PTT state needs to change
- {
- bool newPTT;
- if(mUsePTT)
- {
- // If configured to use PTT, track the user state.
- newPTT = mUserPTTState;
- }
- else
- {
- // If not configured to use PTT, it should always be true (otherwise the user will be unable to speak).
- newPTT = true;
- }
-
- if(mMuteMic)
- {
- // This always overrides any other PTT setting.
- newPTT = false;
- }
-
- // Dirty if state changed.
- if(newPTT != mPTT)
- {
- mPTT = newPTT;
- mPTTDirty = true;
- }
- }
-
if(!inSpatialChannel())
{
// When in a non-spatial channel, never send positional updates.
@@ -1626,7 +1586,7 @@ void LLVivoxVoiceClient::stateMachine()
// Send an update only if the ptt or mute state has changed (which shouldn't be able to happen that often
// -- the user can only click so fast) or every 10hz, whichever is sooner.
// Sending for every volume update causes an excessive flood of messages whenever a volume slider is dragged.
- if((mAudioSession && mAudioSession->mMuteDirty) || mPTTDirty || mUpdateTimer.hasExpired())
+ if((mAudioSession && mAudioSession->mMuteDirty) || mMuteMicDirty || mUpdateTimer.hasExpired())
{
mUpdateTimer.setTimerExpirySec(UPDATE_THROTTLE_SECONDS);
sendPositionalUpdate();
@@ -2749,19 +2709,17 @@ void LLVivoxVoiceClient::buildLocalAudioUpdates(std::ostringstream &stream)
buildSetRenderDevice(stream);
- if(mPTTDirty)
+ if(mMuteMicDirty)
{
- mPTTDirty = false;
+ mMuteMicDirty = false;
// Send a local mute command.
- // NOTE that the state of "PTT" is the inverse of "local mute".
- // (i.e. when PTT is true, we send a mute command with "false", and vice versa)
- LL_DEBUGS("Voice") << "Sending MuteLocalMic command with parameter " << (mPTT?"false":"true") << LL_ENDL;
+ LL_DEBUGS("Voice") << "Sending MuteLocalMic command with parameter " << (mMuteMic?"true":"false") << LL_ENDL;
stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Connector.MuteLocalMic.1\">"
<< "<ConnectorHandle>" << mConnectorHandle << "</ConnectorHandle>"
- << "<Value>" << (mPTT?"false":"true") << "</Value>"
+ << "<Value>" << (mMuteMic?"true":"false") << "</Value>"
<< "</Request>\n\n\n";
}
@@ -5238,40 +5196,13 @@ void LLVivoxVoiceClient::leaveChannel(void)
void LLVivoxVoiceClient::setMuteMic(bool muted)
{
- mMuteMic = muted;
-}
-
-void LLVivoxVoiceClient::setUserPTTState(bool ptt)
-{
- mUserPTTState = ptt;
-}
-
-bool LLVivoxVoiceClient::getUserPTTState()
-{
- return mUserPTTState;
-}
-
-void LLVivoxVoiceClient::inputUserControlState(bool down)
-{
- if(mPTTIsToggle)
+ if(mMuteMic != muted)
{
- if(down) // toggle open-mic state on 'down'
- {
- toggleUserPTTState();
- }
- }
- else // set open-mic state as an absolute
- {
- setUserPTTState(down);
+ mMuteMic = muted;
+ mMuteMicDirty = true;
}
}
-
-void LLVivoxVoiceClient::toggleUserPTTState(void)
-{
- mUserPTTState = !mUserPTTState;
-}
-
void LLVivoxVoiceClient::setVoiceEnabled(bool enabled)
{
if (enabled != mVoiceEnabled)
@@ -5320,48 +5251,6 @@ BOOL LLVivoxVoiceClient::lipSyncEnabled()
}
}
-void LLVivoxVoiceClient::setUsePTT(bool usePTT)
-{
- if(usePTT && !mUsePTT)
- {
- // When the user turns on PTT, reset the current state.
- mUserPTTState = false;
- }
- mUsePTT = usePTT;
-}
-
-void LLVivoxVoiceClient::setPTTIsToggle(bool PTTIsToggle)
-{
- if(!PTTIsToggle && mPTTIsToggle)
- {
- // When the user turns off toggle, reset the current state.
- mUserPTTState = false;
- }
-
- mPTTIsToggle = PTTIsToggle;
-}
-
-bool LLVivoxVoiceClient::getPTTIsToggle()
-{
- return mPTTIsToggle;
-}
-
-void LLVivoxVoiceClient::setPTTKey(std::string &key)
-{
- if(key == "MiddleMouse")
- {
- mPTTIsMiddleMouse = true;
- }
- else
- {
- mPTTIsMiddleMouse = false;
- if(!LLKeyboard::keyFromString(key, &mPTTKey))
- {
- // If the call failed, don't match any key.
- key = KEY_NONE;
- }
- }
-}
void LLVivoxVoiceClient::setEarLocation(S32 loc)
{
@@ -5402,44 +5291,6 @@ void LLVivoxVoiceClient::setMicGain(F32 volume)
}
}
-void LLVivoxVoiceClient::keyDown(KEY key, MASK mask)
-{
- if (gKeyboard->getKeyRepeated(key))
- {
- // ignore auto-repeat keys
- return;
- }
-
- if(!mPTTIsMiddleMouse)
- {
- bool down = (mPTTKey != KEY_NONE)
- && gKeyboard->getKeyDown(mPTTKey);
- inputUserControlState(down);
- }
-
-
-}
-void LLVivoxVoiceClient::keyUp(KEY key, MASK mask)
-{
- if(!mPTTIsMiddleMouse)
- {
- bool down = (mPTTKey != KEY_NONE)
- && gKeyboard->getKeyDown(mPTTKey);
- inputUserControlState(down);
- }
-
-}
-void LLVivoxVoiceClient::middleMouseState(bool down)
-{
- if(mPTTIsMiddleMouse)
- {
- if(mPTTIsMiddleMouse)
- {
- inputUserControlState(down);
- }
- }
-}
-
/////////////////////////////
// Accessors for data related to nearby speakers
BOOL LLVivoxVoiceClient::getVoiceEnabled(const LLUUID& id)
@@ -7015,8 +6866,8 @@ void LLVivoxVoiceClient::captureBufferRecordStartSendMessage()
<< "<Value>false</Value>"
<< "</Request>\n\n\n";
- // Dirty the PTT state so that it will get reset when we finishing previewing
- mPTTDirty = true;
+ // Dirty the mute mic state so that it will get reset when we finishing previewing
+ mMuteMicDirty = true;
writeString(stream.str());
}
@@ -7030,7 +6881,7 @@ void LLVivoxVoiceClient::captureBufferRecordStopSendMessage()
LL_DEBUGS("Voice") << "Stopping audio capture to buffer." << LL_ENDL;
- // Mute the mic. PTT state was dirtied at recording start, so will be reset when finished previewing.
+ // Mute the mic. Mic mute state was dirtied at recording start, so will be reset when finished previewing.
stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Connector.MuteLocalMic.1\">"
<< "<ConnectorHandle>" << mConnectorHandle << "</ConnectorHandle>"
<< "<Value>true</Value>"
diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h
index 3ba517bf36..471545de56 100644
--- a/indra/newview/llvoicevivox.h
+++ b/indra/newview/llvoicevivox.h
@@ -173,25 +173,9 @@ public:
virtual void setVoiceEnabled(bool enabled);
virtual BOOL lipSyncEnabled();
virtual void setLipSyncEnabled(BOOL enabled);
- virtual void setMuteMic(bool muted); // Use this to mute the local mic (for when the client is minimized, etc), ignoring user PTT state.
+ virtual void setMuteMic(bool muted); // Set the mute state of the local mic.
//@}
-
- ////////////////////////
- /// @name PTT
- //@{
- virtual void setUserPTTState(bool ptt);
- virtual bool getUserPTTState();
- virtual void setUsePTT(bool usePTT);
- virtual void setPTTIsToggle(bool PTTIsToggle);
- virtual bool getPTTIsToggle();
- virtual void inputUserControlState(bool down); // interpret any sort of up-down mic-open control input according to ptt-toggle prefs
- virtual void toggleUserPTTState(void);
-
- virtual void keyDown(KEY key, MASK mask);
- virtual void keyUp(KEY key, MASK mask);
- virtual void middleMouseState(bool down);
- //@}
-
+
//////////////////////////
/// @name nearby speaker accessors
//@{
@@ -534,9 +518,6 @@ protected:
// Use this to determine whether to show a "no speech" icon in the menu bar.
- // PTT
- void setPTTKey(std::string &key);
-
/////////////////////////////
// Recording controls
void recordingLoopStart(int seconds = 3600, int deltaFramesPerControlFrame = 200);
@@ -800,15 +781,8 @@ private:
LLVector3 mAvatarVelocity;
LLMatrix3 mAvatarRot;
- bool mPTTDirty;
- bool mPTT;
-
- bool mUsePTT;
- bool mPTTIsMiddleMouse;
- KEY mPTTKey;
- bool mPTTIsToggle;
- bool mUserPTTState;
bool mMuteMic;
+ bool mMuteMicDirty;
// Set to true when the friends list is known to have changed.
bool mFriendsListDirty;
diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp
index 73a37a6993..b73017a51a 100644
--- a/indra/newview/llweb.cpp
+++ b/indra/newview/llweb.cpp
@@ -35,6 +35,7 @@
#include "llagent.h"
#include "llappviewer.h"
#include "llfloatermediabrowser.h"
+#include "llfloaterwebcontent.h"
#include "llfloaterreg.h"
#include "lllogininstance.h"
#include "llparcel.h"
@@ -95,6 +96,23 @@ void LLWeb::loadURL(const std::string& url, const std::string& target, const std
}
}
+// static
+void LLWeb::loadWebURL(const std::string& url, const std::string& target, const std::string& uuid)
+{
+ if(target == "_internal")
+ {
+ // Force load in the internal browser, as if with a blank target.
+ loadWebURLInternal(url, "", uuid);
+ }
+ else if (gSavedSettings.getBOOL("UseExternalBrowser") || (target == "_external"))
+ {
+ loadURLExternal(url);
+ }
+ else
+ {
+ loadWebURLInternal(url, target, uuid);
+ }
+}
// static
void LLWeb::loadURLInternal(const std::string &url, const std::string& target, const std::string& uuid)
@@ -102,6 +120,13 @@ void LLWeb::loadURLInternal(const std::string &url, const std::string& target, c
LLFloaterMediaBrowser::create(url, target, uuid);
}
+// static
+// Explicitly open a Web URL using the Web content floater
+void LLWeb::loadWebURLInternal(const std::string &url, const std::string& target, const std::string& uuid)
+{
+ LLFloaterWebContent::create(url, target, uuid);
+}
+
// static
void LLWeb::loadURLExternal(const std::string& url, const std::string& uuid)
@@ -116,6 +141,13 @@ void LLWeb::loadURLExternal(const std::string& url, bool async, const std::strin
// Act like the proxy window was closed, since we won't be able to track targeted windows in the external browser.
LLViewerMedia::proxyWindowClosed(uuid);
+ if(gSavedSettings.getBOOL("DisableExternalBrowser"))
+ {
+ // Don't open an external browser under any circumstances.
+ llwarns << "Blocked attempt to open external browser." << llendl;
+ return;
+ }
+
LLSD payload;
payload["url"] = url;
LLNotificationsUtil::add( "WebLaunchExternalTarget", LLSD(), payload, boost::bind(on_load_url_external_response, _1, _2, async));
diff --git a/indra/newview/llweb.h b/indra/newview/llweb.h
index 2915376583..dc5958e57f 100644
--- a/indra/newview/llweb.h
+++ b/indra/newview/llweb.h
@@ -57,6 +57,11 @@ public:
static void loadURLExternal(const std::string& url, const std::string& uuid);
static void loadURLExternal(const std::string& url, bool async, const std::string& uuid = LLStringUtil::null);
+ // Explicitly open a Web URL using the Web content floater vs. the more general media browser
+ static void loadWebURL(const std::string& url, const std::string& target, const std::string& uuid);
+ static void loadWebURLInternal(const std::string &url, const std::string& target, const std::string& uuid);
+ static void loadWebURLInternal(const std::string &url) { loadWebURLInternal(url, LLStringUtil::null, LLStringUtil::null); }
+
/// Returns escaped url (eg, " " to "%20") - used by all loadURL methods
static std::string escapeURL(const std::string& url);
/// Expands various strings like [LANG], [VERSION], etc. in a URL
diff --git a/indra/newview/llworldmipmap.cpp b/indra/newview/llworldmipmap.cpp
index be8298daab..74ed844376 100644
--- a/indra/newview/llworldmipmap.cpp
+++ b/indra/newview/llworldmipmap.cpp
@@ -181,8 +181,7 @@ LLPointer<LLViewerFetchedTexture> LLWorldMipmap::getObjectsTile(U32 grid_x, U32
LLPointer<LLViewerFetchedTexture> LLWorldMipmap::loadObjectsTile(U32 grid_x, U32 grid_y, S32 level)
{
// Get the grid coordinates
- std::string imageurl = gSavedSettings.getString("MapServerURL") + llformat("map-%d-%d-%d-objects.jpg", level, grid_x, grid_y);
-
+ std::string imageurl = gSavedSettings.getString("CurrentMapServerURL") + llformat("map-%d-%d-%d-objects.jpg", level, grid_x, grid_y);
// DO NOT COMMIT!! DEBUG ONLY!!!
// Use a local jpeg for every tile to test map speed without S3 access
diff --git a/indra/newview/res/toolbuy.cur b/indra/newview/res/toolbuy.cur
index a1bc278116..65bbf01d45 100644
--- a/indra/newview/res/toolbuy.cur
+++ b/indra/newview/res/toolbuy.cur
Binary files differ
diff --git a/indra/newview/res/toolopen.cur b/indra/newview/res/toolopen.cur
index a72cdfe4c0..22ecbd5228 100644
--- a/indra/newview/res/toolopen.cur
+++ b/indra/newview/res/toolopen.cur
Binary files differ
diff --git a/indra/newview/res/toolsit.cur b/indra/newview/res/toolsit.cur
index 6327bdb281..d26b6f8638 100644
--- a/indra/newview/res/toolsit.cur
+++ b/indra/newview/res/toolsit.cur
Binary files differ
diff --git a/indra/newview/skins/default/textures/arrow_keys.png b/indra/newview/skins/default/textures/arrow_keys.png
new file mode 100644
index 0000000000..f19af59251
--- /dev/null
+++ b/indra/newview/skins/default/textures/arrow_keys.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Web_Profile_Off.png b/indra/newview/skins/default/textures/icons/Web_Profile_Off.png
new file mode 100644
index 0000000000..f5fb774a6f
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Web_Profile_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index b2658d2525..2c00120177 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -371,8 +371,8 @@ with the same filename but different name
<texture name="Play_Off" file_name="icons/Play_Off.png" preload="false" />
<texture name="Play_Over" file_name="icons/Play_Over.png" preload="false" />
<texture name="Play_Press" file_name="icons/Play_Press.png" preload="false" />
-
- <texture name="ProgressBar" file_name="widgets/ProgressBar.png" preload="true" scale.left="4" scale.top="10" scale.right="48" scale.bottom="2" />
+
+ <texture name="ProgressBar" file_name="widgets/ProgressBar.png" preload="true" scale.left="4" scale.top="11" scale.right="48" scale.bottom="3" />
<texture name="ProgressTrack" file_name="widgets/ProgressTrack.png" preload="true" scale.left="4" scale.top="13" scale.right="148" scale.bottom="2" />
<texture name="PushButton_Disabled" file_name="widgets/PushButton_Disabled.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" />
@@ -392,7 +392,7 @@ with the same filename but different name
<texture name="RadioButton_On_Disabled" file_name="widgets/RadioButton_On_Disabled.png" preload="true" />
- <texture name="Refresh_Off" file_name="icons/Refresh_Off.png" preload="false" />
+ <texture name="Refresh_Off" file_name="icons/Refresh_Off.png" preload="true" />
<texture name="Resize_Corner" file_name="windows/Resize_Corner.png" preload="true" />
@@ -468,7 +468,7 @@ with the same filename but different name
<texture name="Stepper_Up_Off" file_name="widgets/Stepper_Up_Off.png" preload="false" />
<texture name="Stepper_Up_Press" file_name="widgets/Stepper_Up_Press.png" preload="false" />
- <texture name="Stop_Off" file_name="icons/Stop_Off.png" preload="false" />
+ <texture name="Stop_Off" file_name="icons/Stop_Off.png" preload="true" />
<texture name="StopReload_Off" file_name="icons/StopReload_Off.png" preload="false" />
<texture name="StopReload_Over" file_name="icons/StopReload_Over.png" preload="false" />
@@ -553,11 +553,11 @@ with the same filename but different name
<texture name="Wearables_Divider" file_name="windows/Wearables_Divider.png" preload="false" />
+ <texture name="Web_Profile_Off" file_name="icons/Web_Profile_Off.png" preload="false" />
+
<texture name="WellButton_Lit" file_name="bottomtray/WellButton_Lit.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" />
<texture name="WellButton_Lit_Selected" file_name="bottomtray/WellButton_Lit_Selected.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" />
-
-
<texture name="Window_Background" file_name="windows/Window_Background.png" preload="true"
scale.left="4" scale.top="24" scale.right="26" scale.bottom="4" />
<texture name="Window_Foreground" file_name="windows/Window_Foreground.png" preload="true"
diff --git a/indra/newview/skins/default/textures/widgets/ProgressBar.png b/indra/newview/skins/default/textures/widgets/ProgressBar.png
index edf11ac1f5..3f0e4eba28 100644
--- a/indra/newview/skins/default/textures/widgets/ProgressBar.png
+++ b/indra/newview/skins/default/textures/widgets/ProgressBar.png
Binary files differ
diff --git a/indra/newview/skins/default/xui/da/floater_hardware_settings.xml b/indra/newview/skins/default/xui/da/floater_hardware_settings.xml
index 2b10afe7e3..a5942eb625 100644
--- a/indra/newview/skins/default/xui/da/floater_hardware_settings.xml
+++ b/indra/newview/skins/default/xui/da/floater_hardware_settings.xml
@@ -14,6 +14,9 @@
<combo_box.item label="8x" name="8x"/>
<combo_box.item label="16x" name="16x"/>
</combo_box>
+ <text name="antialiasing restart">
+ (kræver genstart af din Second Life klient)
+ </text>
<spinner label="Gamma:" name="gamma"/>
<text name="(brightness, lower is brighter)">
(Lysstyrke, lavere er lysere, 0=benyt standard)
diff --git a/indra/newview/skins/default/xui/da/floater_preferences.xml b/indra/newview/skins/default/xui/da/floater_preferences.xml
index a53586eaaf..6caac14cf5 100644
--- a/indra/newview/skins/default/xui/da/floater_preferences.xml
+++ b/indra/newview/skins/default/xui/da/floater_preferences.xml
@@ -5,10 +5,12 @@
<tab_container name="pref core">
<panel label="Generelt" name="general"/>
<panel label="Grafik" name="display"/>
- <panel label="Privatliv" name="im"/>
<panel label="Lyd &amp; medier" name="audio"/>
<panel label="Chat" name="chat"/>
+ <panel label="Flyt &amp; se" name="move"/>
<panel label="Beskeder" name="msgs"/>
+ <panel label="Farver" name="colors"/>
+ <panel label="Privatliv" name="im"/>
<panel label="Opsætning" name="input"/>
<panel label="Avanceret" name="advanced1"/>
</tab_container>
diff --git a/indra/newview/skins/default/xui/da/floater_region_debug_console.xml b/indra/newview/skins/default/xui/da/floater_region_debug_console.xml
new file mode 100644
index 0000000000..71313f4fea
--- /dev/null
+++ b/indra/newview/skins/default/xui/da/floater_region_debug_console.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="region_debug_console" title="Debug region"/>
diff --git a/indra/newview/skins/default/xui/da/menu_inventory_gear_default.xml b/indra/newview/skins/default/xui/da/menu_inventory_gear_default.xml
index 75ce7b22f6..b359d94f07 100644
--- a/indra/newview/skins/default/xui/da/menu_inventory_gear_default.xml
+++ b/indra/newview/skins/default/xui/da/menu_inventory_gear_default.xml
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<menu name="menu_gear_default">
+<toggleable_menu name="menu_gear_default">
<menu_item_call label="Nyt vindue" name="new_window"/>
- <menu_item_call label="Sortér efter navn" name="sort_by_name"/>
- <menu_item_call label="Sortér efter nyeste" name="sort_by_recent"/>
+ <menu_item_check label="Sortér efter navn" name="sort_by_name"/>
+ <menu_item_check label="Sortér efter nyeste" name="sort_by_recent"/>
+ <menu_item_check label="Vis System mapper øverst" name="sort_system_folders_to_top"/>
<menu_item_call label="Vis filtre" name="show_filters"/>
<menu_item_call label="Nulstil filtre" name="reset_filters"/>
<menu_item_call label="Luk alle mapper" name="close_folders"/>
@@ -12,4 +13,4 @@
<menu_item_call label="Find original" name="Find Original"/>
<menu_item_call label="Find alle links" name="Find All Links"/>
<menu_item_call label="Tøm papirkurv" name="empty_trash"/>
-</menu>
+</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/da/menu_viewer.xml b/indra/newview/skins/default/xui/da/menu_viewer.xml
index cfc60c8f84..a3dcfdf4cc 100644
--- a/indra/newview/skins/default/xui/da/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/da/menu_viewer.xml
@@ -10,6 +10,12 @@
<menu_item_check label="Min beholdning" name="ShowSidetrayInventory"/>
<menu_item_check label="Mine bevægelser" name="Gestures"/>
<menu_item_check label="Min stemme" name="ShowVoice"/>
+ <menu label="Bevægelser" name="Movement">
+ <menu_item_call label="Sid ned" name="Sit Down Here"/>
+ <menu_item_check label="Flyv" name="Fly"/>
+ <menu_item_check label="Løb altid" name="Always Run"/>
+ <menu_item_call label="Stop animering" name="Stop Animating My Avatar"/>
+ </menu>
<menu label="Min status" name="Status">
<menu_item_call label="Væk" name="Set Away"/>
<menu_item_call label="Optaget" name="Set Busy"/>
@@ -45,6 +51,7 @@
<menu_item_check label="Grundejere" name="Land Owners"/>
<menu_item_check label="Koordinater" name="Coordinates"/>
<menu_item_check label="Parcel egenskaber" name="Parcel Properties"/>
+ <menu_item_check label="Avanceret menu" name="Show Advanced Menu"/>
</menu>
<menu_item_call label="Teleport hjem" name="Teleport Home"/>
<menu_item_call label="Sæt dette sted som &apos;Hjem&apos;" name="Set Home to Here"/>
@@ -121,7 +128,6 @@
<menu_item_check label="Aktiver tips" name="Enable Hints"/>
</menu>
<menu label="Avanceret" name="Advanced">
- <menu_item_call label="Stop animering af min avatar" name="Stop Animating My Avatar"/>
<menu_item_call label="Gendan teksturer" name="Rebake Texture"/>
<menu_item_call label="Sæt UI størrelse til standard" name="Set UI Size to Default"/>
<menu_item_call label="Vælg vinduesstørrelse..." name="Set Window Size..."/>
@@ -175,8 +181,7 @@
<menu_item_check label="Søg" name="Search"/>
<menu_item_call label="Frigør taster" name="Release Keys"/>
<menu_item_call label="Sæt UI størrelse til standard" name="Set UI Size to Default"/>
- <menu_item_check label="Løb altid" name="Always Run"/>
- <menu_item_check label="Flyv" name="Fly"/>
+ <menu_item_check label="Vis avanceret menu (gammel genvej)" name="Show Advanced Menu - legacy shortcut"/>
<menu_item_call label="Luk vindue" name="Close Window"/>
<menu_item_call label="Luk alle vinduer" name="Close All Windows"/>
<menu_item_call label="Foto til disk" name="Snapshot to Disk"/>
@@ -194,7 +199,6 @@
<menu_item_call label="Zoom ind" name="Zoom In"/>
<menu_item_call label="Zoom standard" name="Zoom Default"/>
<menu_item_call label="Zoom ud" name="Zoom Out"/>
- <menu_item_check label="Vis avanceret menu" name="Show Advanced Menu"/>
</menu>
<menu_item_call label="Vis debug valg" name="Debug Settings"/>
<menu_item_check label="Vis udviklingsmenu" name="Debug Mode"/>
@@ -265,16 +269,13 @@
<menu_item_call label="Test web browser" name="Web Browser Test"/>
<menu_item_call label="Print info om valgt objekt" name="Print Selected Object Info"/>
<menu_item_call label="Hukommelse statistik" name="Memory Stats"/>
- <menu_item_check label="Dobbelt-klink Auto-pilot" name="Double-ClickAuto-Pilot"/>
- <menu_item_check label="Dobeltklik for at teleportere" name="DoubleClick Teleport"/>
+ <menu_item_check label="Debug konsol for region" name="Region Debug Console"/>
<menu_item_check label="Debug klik" name="Debug Clicks"/>
<menu_item_check label="Debug muse-hændelser" name="Debug Mouse Events"/>
</menu>
<menu label="XUI" name="XUI">
<menu_item_call label="Genindlæs farveopsætning" name="Reload Color Settings"/>
<menu_item_call label="Vis font test" name="Show Font Test"/>
- <menu_item_call label="Hent fra XML" name="Load from XML"/>
- <menu_item_call label="Gem til XML" name="Save to XML"/>
<menu_item_check label="Vis XUI navne" name="Show XUI Names"/>
<menu_item_call label="Send testbeskeder (IM)" name="Send Test IMs"/>
<menu_item_call label="Skriv navne-cache til disk" name="Flush Names Caches"/>
@@ -301,9 +302,9 @@
</menu>
<menu_item_check label="HTTP teksturer" name="HTTP Textures"/>
<menu_item_check label="Benyt consol vindue ved næste opstart" name="Console Window"/>
- <menu_item_check label="Vis administrationsmenu" name="View Admin Options"/>
<menu_item_call label="Anmod om administrator status" name="Request Admin Options"/>
<menu_item_call label="Forlad administrationsstatus" name="Leave Admin Options"/>
+ <menu_item_check label="Vis administrationsmenu" name="View Admin Options"/>
</menu>
<menu label="Administrér" name="Admin">
<menu label="Object">
diff --git a/indra/newview/skins/default/xui/da/notifications.xml b/indra/newview/skins/default/xui/da/notifications.xml
index 63c06ec27e..70299c61b4 100644
--- a/indra/newview/skins/default/xui/da/notifications.xml
+++ b/indra/newview/skins/default/xui/da/notifications.xml
@@ -247,6 +247,9 @@ Note: This will clear the cache.
<notification name="ChangeSkin">
Den nye hud vil blive vist ved næste genstart af [APP_NAME].
</notification>
+ <notification name="ChangeLanguage">
+ Ændring af sprog vil først have effekt efter genstart af [APP_NAME].
+ </notification>
<notification name="StartRegionEmpty">
Ups, din start region er ikke angivet.
Indtast venligst navn på region i Start lokation feltet eller vælg &quot;Min sidste lokation&quot; eller &quot;Hjem&quot;.
@@ -288,6 +291,10 @@ og du vil miste dem fra din beholdning hvis du forærer dem væk. Er du sikker p
Gå til [_URL] for information om køb af L$?
</notification>
+ <notification name="SoundFileInvalidChunkSize">
+ Fejl i WAV fil (chunk size):
+[FILE]
+ </notification>
<notification name="CannotEncodeFile">
Kunne ikke &apos;forstå&apos; filen: [FILE]
</notification>
@@ -585,6 +592,16 @@ Denne opdatering er ikke påkrævet, men det anbefales at installere den for at
Download til dit Program bibliotek?
</notification>
+ <notification name="FailedUpdateInstall">
+ Der opstod en fejl ved installation af opdatering.
+Hent og installér venligst den nyeste version fra
+http://secondlife.com/download.
+ <usetemplate name="okbutton" yestext="OK"/>
+ </notification>
+ <notification name="DownloadBackground">
+ En opdateret version af [APP_NAME] er hentet.
+Den vil blive anvendt næste gang du genstarter [APP_NAME]
+ </notification>
<notification name="DeedObjectToGroup">
<usetemplate ignoretext="Bekræft før jeg dedikerer et objekt til en gruppe" name="okcancelignore" notext="Cancel" yestext="Deed"/>
</notification>
@@ -1370,8 +1387,8 @@ Prøv igen om lidt.
Tilbud om venskab afvist.
</notification>
<notification name="OfferCallingCard">
- [NAME] tilbyder dig et visitkort.
-Dette vil lave et bogmørke i din beholding, så du hurtigt kan sende en IM til denne beboer.
+ [NAME] tilbyder sit visitkort.
+Dette vil tilføje et bogmærke i din beholdning, så du hurtigt kan sende en personlig besked til denne beboer.
<form name="form">
<button name="Accept" text="Acceptér"/>
<button name="Decline" text="Afvis"/>
diff --git a/indra/newview/skins/default/xui/da/panel_edit_gloves.xml b/indra/newview/skins/default/xui/da/panel_edit_gloves.xml
index 837abdac80..36f58428a6 100644
--- a/indra/newview/skins/default/xui/da/panel_edit_gloves.xml
+++ b/indra/newview/skins/default/xui/da/panel_edit_gloves.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_gloves_panel">
<panel name="avatar_gloves_color_panel">
- <texture_picker label="Stof" name="Fabric" tool_tip="Klik for at vælge bilede"/>
+ <texture_picker label="Tekstur" name="Fabric" tool_tip="Klik for at vælge bilede"/>
<color_swatch label="Farve/nuance" name="Color/Tint" tool_tip="Klik for at åbne farvevælger"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/da/panel_edit_jacket.xml b/indra/newview/skins/default/xui/da/panel_edit_jacket.xml
index 62934e96c8..4e7336747d 100644
--- a/indra/newview/skins/default/xui/da/panel_edit_jacket.xml
+++ b/indra/newview/skins/default/xui/da/panel_edit_jacket.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_jacket_panel">
<panel name="avatar_jacket_color_panel">
- <texture_picker label="Stof foroven" name="Upper Fabric" tool_tip="Klik for at vælge et billede"/>
- <texture_picker label="Stof forneden" name="Lower Fabric" tool_tip="Klik for at vælge et billede"/>
+ <texture_picker label="Øvre tekstur" name="Upper Fabric" tool_tip="Klik for at vælge et billede"/>
+ <texture_picker label="Nedre tekstur" name="Lower Fabric" tool_tip="Klik for at vælge et billede"/>
<color_swatch label="Farve/nuance" name="Color/Tint" tool_tip="Klik for at åbne farvevælger"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/da/panel_edit_pants.xml b/indra/newview/skins/default/xui/da/panel_edit_pants.xml
index 36a9bc60a9..61056e9e6c 100644
--- a/indra/newview/skins/default/xui/da/panel_edit_pants.xml
+++ b/indra/newview/skins/default/xui/da/panel_edit_pants.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_pants_panel">
<panel name="avatar_pants_color_panel">
- <texture_picker label="Stof" name="Fabric" tool_tip="Klik for at vælge et bilede"/>
+ <texture_picker label="Tekstur" name="Fabric" tool_tip="Klik for at vælge et bilede"/>
<color_swatch label="Farve/Nuance" name="Color/Tint" tool_tip="Klik for at åbne farvevælger"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/da/panel_edit_shirt.xml b/indra/newview/skins/default/xui/da/panel_edit_shirt.xml
index e49667dc8f..4dfb47aab2 100644
--- a/indra/newview/skins/default/xui/da/panel_edit_shirt.xml
+++ b/indra/newview/skins/default/xui/da/panel_edit_shirt.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_shirt_panel">
<panel name="avatar_shirt_color_panel">
- <texture_picker label="Stof" name="Fabric" tool_tip="Klik for at vælge et billede"/>
+ <texture_picker label="Tekstur" name="Fabric" tool_tip="Klik for at vælge et billede"/>
<color_swatch label="Farve/Nuance" name="Color/Tint" tool_tip="Klik for at åbne farvevælger"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/da/panel_edit_shoes.xml b/indra/newview/skins/default/xui/da/panel_edit_shoes.xml
index 00d31da95a..653ea421b5 100644
--- a/indra/newview/skins/default/xui/da/panel_edit_shoes.xml
+++ b/indra/newview/skins/default/xui/da/panel_edit_shoes.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_shoes_panel">
<panel name="avatar_shoes_color_panel">
- <texture_picker label="Stof" name="Fabric" tool_tip="Klik for at vælge et billede"/>
+ <texture_picker label="Tekstur" name="Fabric" tool_tip="Klik for at vælge et billede"/>
<color_swatch label="Farve/nuance" name="Color/Tint" tool_tip="Klik for at åbne farvevælger"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/da/panel_edit_skirt.xml b/indra/newview/skins/default/xui/da/panel_edit_skirt.xml
index 44a5beca45..e80e60efd8 100644
--- a/indra/newview/skins/default/xui/da/panel_edit_skirt.xml
+++ b/indra/newview/skins/default/xui/da/panel_edit_skirt.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_skirt_panel">
<panel name="avatar_skirt_color_panel">
- <texture_picker label="Stof" name="Fabric" tool_tip="Klik for at vælge et billede"/>
+ <texture_picker label="Tekstur" name="Fabric" tool_tip="Klik for at vælge et billede"/>
<color_swatch label="Farve/Nuance" name="Color/Tint" tool_tip="Klik for at åbne farvevælger"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/da/panel_edit_socks.xml b/indra/newview/skins/default/xui/da/panel_edit_socks.xml
index b7abd9d1a0..82a7341317 100644
--- a/indra/newview/skins/default/xui/da/panel_edit_socks.xml
+++ b/indra/newview/skins/default/xui/da/panel_edit_socks.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_socks_panel">
<panel name="avatar_socks_color_panel">
- <texture_picker label="Stof" name="Fabric" tool_tip="Klik for at vælge et billede"/>
+ <texture_picker label="Tekstur" name="Fabric" tool_tip="Klik for at vælge et billede"/>
<color_swatch label="Farve/Nuance" name="Color/Tint" tool_tip="Klik for at åbne farvevælger"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/da/panel_edit_underpants.xml b/indra/newview/skins/default/xui/da/panel_edit_underpants.xml
index 32596be57b..aacfae79e1 100644
--- a/indra/newview/skins/default/xui/da/panel_edit_underpants.xml
+++ b/indra/newview/skins/default/xui/da/panel_edit_underpants.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_underpants_panel">
<panel name="avatar_underpants_color_panel">
- <texture_picker label="Stof" name="Fabric" tool_tip="Klik for at vælge bilede"/>
+ <texture_picker label="Tekstur" name="Fabric" tool_tip="Klik for at vælge bilede"/>
<color_swatch label="Farve/nuance" name="Color/Tint" tool_tip="Klik for at åbne farvevælger"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/da/panel_edit_undershirt.xml b/indra/newview/skins/default/xui/da/panel_edit_undershirt.xml
index 14cf79b97f..a9db5d2ab0 100644
--- a/indra/newview/skins/default/xui/da/panel_edit_undershirt.xml
+++ b/indra/newview/skins/default/xui/da/panel_edit_undershirt.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_undershirt_panel">
<panel name="avatar_undershirt_color_panel">
- <texture_picker label="Stof" name="Fabric" tool_tip="Klik for at vælge bilede"/>
+ <texture_picker label="Tekstur" name="Fabric" tool_tip="Klik for at vælge bilede"/>
<color_swatch label="Farve/nuance" name="Color/Tint" tool_tip="Klik for at åbne farvevælger"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/da/panel_notify_textbox.xml b/indra/newview/skins/default/xui/da/panel_notify_textbox.xml
new file mode 100644
index 0000000000..949ff1a058
--- /dev/null
+++ b/indra/newview/skins/default/xui/da/panel_notify_textbox.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="instant_message" name="panel_notify_textbox">
+ <string name="message_max_lines_count" value="7"/>
+ <panel label="info_panel" name="info_panel">
+ <text_editor name="message" value="besked"/>
+ parse_urls=&quot;false&quot;
+ <button label="Send" name="btn_submit"/>
+ </panel>
+ <panel label="control_panel" name="control_panel"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/da/panel_people.xml b/indra/newview/skins/default/xui/da/panel_people.xml
index 6c910cc3b2..599686d360 100644
--- a/indra/newview/skins/default/xui/da/panel_people.xml
+++ b/indra/newview/skins/default/xui/da/panel_people.xml
@@ -22,7 +22,7 @@ Leder du efter nogen at være sammen med? Prøv [secondlife:///app/worldmap Worl
<tab_container name="tabs">
<panel label="TÆT PÅ" name="nearby_panel">
<panel label="bottom_panel" name="bottom_panel">
- <button name="nearby_view_sort_btn" tool_tip="Valg"/>
+ <menu_button name="nearby_view_sort_btn" tool_tip="Valg"/>
<button name="add_friend_btn" tool_tip="Tilføj valgte beboer til din venneliste"/>
</panel>
</panel>
@@ -34,27 +34,27 @@ Leder du efter nogen at være sammen med? Prøv [secondlife:///app/worldmap Worl
<panel label="bottom_panel" name="bottom_panel">
<layout_stack name="bottom_panel">
<layout_panel name="options_gear_btn_panel">
- <button name="friends_viewsort_btn" tool_tip="Vis flere valg"/>
+ <menu_button name="friends_viewsort_btn" tool_tip="Vis flere valg"/>
</layout_panel>
<layout_panel name="add_btn_panel">
<button name="add_btn" tool_tip="Tilbyd venskab til en beboer"/>
</layout_panel>
<layout_panel name="trash_btn_panel">
- <dnd_button name="trash_btn" tool_tip="Fjern valgte personer fra venneliste"/>
+ <dnd_button name="del_btn" tool_tip="Fjern valgte person fra din venneliste"/>
</layout_panel>
</layout_stack>
</panel>
</panel>
<panel label="MINE GRUPPER" name="groups_panel">
<panel label="bottom_panel" name="bottom_panel">
- <button name="groups_viewsort_btn" tool_tip="Valg"/>
+ <menu_button name="groups_viewsort_btn" tool_tip="Valg"/>
<button name="plus_btn" tool_tip="Bliv medlem af gruppe/Opret ny gruppe"/>
<button name="activate_btn" tool_tip="Activér valgte gruppe"/>
</panel>
</panel>
<panel label="NYLIGE" name="recent_panel">
<panel label="bottom_panel" name="bottom_panel">
- <button name="recent_viewsort_btn" tool_tip="Valg"/>
+ <menu_button name="recent_viewsort_btn" tool_tip="Valg"/>
<button name="add_friend_btn" tool_tip="Tilføj valgte beboer til din venneliste"/>
</panel>
</panel>
diff --git a/indra/newview/skins/default/xui/da/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/da/panel_preferences_advanced.xml
index b267c75673..48106c7dfe 100644
--- a/indra/newview/skins/default/xui/da/panel_preferences_advanced.xml
+++ b/indra/newview/skins/default/xui/da/panel_preferences_advanced.xml
@@ -3,35 +3,16 @@
<panel.string name="aspect_ratio_text">
[NUM]:[DEN]
</panel.string>
- <panel.string name="middle_mouse">
- Midterste mus
- </panel.string>
- <slider label="Synsvinkel" name="camera_fov"/>
- <slider label="Distance" name="camera_offset_scale"/>
- <text name="heading2">
- Automatisk positionering for:
- </text>
- <check_box label="Byg/Redigér" name="edit_camera_movement" tool_tip="Benyt automatisk kamera positionering ved start og slut af editerings modus"/>
- <check_box label="Udseende" name="appearance_camera_movement" tool_tip="Benyt automatisk kamera positionering ved redigering"/>
- <check_box initial_value="sand" label="Sidepanel" name="appearance_sidebar_positioning" tool_tip="Benyt automatisk positionering af kamera"/>
- <check_box label="Vis avatar i førsteperson" name="first_person_avatar_visible"/>
- <check_box label="Piletaster bruges altid til bevægelse" name="arrow_keys_move_avatar_check"/>
- <check_box label="Tast-tast-hold for at løbe" name="tap_tap_hold_to_run"/>
- <check_box label="Bevæg avatarlæber når der tales" name="enable_lip_sync"/>
- <check_box label="Talebobler" name="bubble_text_chat"/>
- <slider label="Synlighed" name="bubble_chat_opacity"/>
- <color_swatch name="background" tool_tip="Vælg farve for talebobler"/>
<text name="UI Size:">
- Brugerflade størrelse
+ UI størrelse:
</text>
<check_box label="Vis script fejl i:" name="show_script_errors"/>
<radio_group name="show_location">
<radio_item label="Chat" name="0"/>
<radio_item label="Separat vindue" name="1"/>
</radio_group>
- <check_box label="Knap til aktiverering af mikrofon:" name="push_to_talk_toggle_check" tool_tip="I walkie-talkie-modus sendes stemme kun når knappen er trykket ned, ellers vil tryk på knap tænde og slukke mikrofon."/>
- <line_editor label="Brug walkie-talkie modus" name="modifier_combo"/>
- <button label="Angiv taste" name="set_voice_hotkey_button"/>
- <button label="Midterste museknap" name="set_voice_middlemouse_button" tool_tip="Nulstil til midterste musetaste"/>
- <button label="Andre enheder" name="joystick_setup_button"/>
+ <check_box label="Tillad flere åbne klienter" name="allow_multiple_viewer_check"/>
+ <check_box label="Vælg netværk ved login" name="show_grid_selection_check"/>
+ <check_box label="Vælg avanceret menu" name="show_advanced_menu_check"/>
+ <check_box label="Vis udvikler menu" name="show_develop_menu_check"/>
</panel>
diff --git a/indra/newview/skins/default/xui/da/panel_preferences_chat.xml b/indra/newview/skins/default/xui/da/panel_preferences_chat.xml
index 72f8476094..3705a5902a 100644
--- a/indra/newview/skins/default/xui/da/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/da/panel_preferences_chat.xml
@@ -8,44 +8,10 @@
<radio_item label="Mellem" name="radio2" value="1"/>
<radio_item label="Stor" name="radio3" value="2"/>
</radio_group>
- <text name="font_colors">
- Skriftfarve:
- </text>
- <color_swatch label="Dig" name="user"/>
- <text name="text_box1">
- Dig
- </text>
- <color_swatch label="Andre" name="agent"/>
- <text name="text_box2">
- Andre
- </text>
- <color_swatch label="IM" name="im"/>
- <text name="text_box3">
- IM
- </text>
- <color_swatch label="System" name="system"/>
- <text name="text_box4">
- System
- </text>
- <color_swatch label="Fejl" name="script_error"/>
- <text name="text_box5">
- Fejl
- </text>
- <color_swatch label="Objekter" name="objects"/>
- <text name="text_box6">
- Objekter
- </text>
- <color_swatch label="Ejer" name="owner"/>
- <text name="text_box7">
- Ejer
- </text>
- <color_swatch label="URL&apos;er" name="links"/>
- <text name="text_box9">
- URL&apos;er
- </text>
<check_box initial_value="true" label="Afspil skrive animation ved chat" name="play_typing_animation"/>
<check_box label="Send e-mail til mig når jeg modtager IM og er offline" name="send_im_to_email"/>
<check_box label="Åben for almindelig tekst i IM og chat historik" name="plain_text_chat_history"/>
+ <check_box label="Boble chat" name="bubble_text_chat"/>
<text name="show_ims_in_label">
Vis IM&apos;er i:
</text>
@@ -56,6 +22,13 @@
<radio_item label="Separate vinduer" name="radio" value="0"/>
<radio_item label="Faner" name="radio2" value="1"/>
</radio_group>
+ <text name="disable_toast_label">
+ Tillad ingående chat popup vinduer:
+ </text>
+ <check_box label="Gruppe chats" name="EnableGroupChatPopups" tool_tip="Vælg for at se popup vindue når gruppe chat beskeder modtages"/>
+ <check_box label="IM chats" name="EnableIMChatPopups" tool_tip="Vælg for at se popup vindue når personlige beskeder (IM) modtages"/>
+ <spinner label="Tid før chatvisning forsvinder:" name="nearby_toasts_lifetime"/>
+ <spinner label="Tid før chatvisning forsvinder:" name="nearby_toasts_fadingtime"/>
<check_box label="Benyt maskin-oversættelse ved chat (håndteret af Google)" name="translate_chat_checkbox"/>
<text name="translate_language_text" width="110">
Oversæt chat til :
diff --git a/indra/newview/skins/default/xui/da/panel_preferences_colors.xml b/indra/newview/skins/default/xui/da/panel_preferences_colors.xml
new file mode 100644
index 0000000000..604a00e0b4
--- /dev/null
+++ b/indra/newview/skins/default/xui/da/panel_preferences_colors.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Farver" name="colors_panel">
+ <text name="effects_color_textbox">
+ Mine effekter (selektions-stråle):
+ </text>
+ <color_swatch name="effect_color_swatch" tool_tip="Klik for at åbne farve-vælger"/>
+ <text name="font_colors">
+ Chat bogstavsfarver:
+ </text>
+ <text name="text_box1">
+ Mig
+ </text>
+ <text name="text_box2">
+ Andre
+ </text>
+ <text name="text_box3">
+ Objekter
+ </text>
+ <text name="text_box4">
+ System
+ </text>
+ <text name="text_box5">
+ Fejl
+ </text>
+ <text name="text_box7">
+ Ejer
+ </text>
+ <text name="text_box9">
+ URL&apos;er
+ </text>
+ <text name="bubble_chat">
+ Chat-boble baggrund:
+ </text>
+ <color_swatch name="background" tool_tip="Vælg farve til chat-boble"/>
+ <slider label="Uigennemsigtighed:" name="bubble_chat_opacity"/>
+ <text name="floater_opacity">
+ Vindue uigennemsigtighed:
+ </text>
+ <slider label="Aktiv:" name="active"/>
+ <slider label="Inaktiv:" name="inactive"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/da/panel_preferences_general.xml b/indra/newview/skins/default/xui/da/panel_preferences_general.xml
index 9c0cb583af..5702d48e97 100644
--- a/indra/newview/skins/default/xui/da/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/da/panel_preferences_general.xml
@@ -46,13 +46,18 @@
<check_box label="Brugernavne" name="show_slids" tool_tip="Vis brugernavne, som bobsmith123"/>
<check_box label="Gruppe titler" name="show_all_title_checkbox1" tool_tip="Vis hgruppetitler, som f.eks. administrator eller medlem"/>
<check_box label="Fremhæv venner" name="show_friends" tool_tip="Fremhæv navne-tags for dine venner"/>
- <text name="effects_color_textbox">
- Farve til mine effekter:
+ <check_box label="Vis visningsnavne" name="display_names_check" tool_tip="Vælg for at bruge visningsnavne i chat, IM, navne-tags m.v."/>
+ <check_box label="Aktivér UI tips i klient" name="viewer_hints_check"/>
+ <text name="inworld_typing_rg_label">
+ Trykker bogstav taster:
</text>
+ <radio_group name="inworld_typing_preference">
+ <radio_item label="Starter lokal chat" name="radio_start_chat" value="1"/>
+ <radio_item label="Påvirker bevægelse (f.eks. WASD)" name="radio_move" value="0"/>
+ </radio_group>
<text name="title_afk_text">
Tid inden &quot;væk&quot;:
</text>
- <color_swatch label="" name="effect_color_swatch" tool_tip="Klik for at åbne farvevælger"/>
<combo_box label="Timeout før &apos;væk&apos;:" name="afk">
<combo_box.item label="2 minutter" name="item0"/>
<combo_box.item label="5 minutter" name="item1"/>
@@ -60,7 +65,6 @@
<combo_box.item label="30 minutter" name="item3"/>
<combo_box.item label="aldrig" name="item4"/>
</combo_box>
- <check_box label="Vis visningsnavne" name="display_names_check" tool_tip="Vælg for at bruge visningsnavne i chat, IM, navne-tags m.v."/>
<text name="text_box3">
Optaget autosvar:
</text>
diff --git a/indra/newview/skins/default/xui/da/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/da/panel_preferences_graphics1.xml
index 5bc5025ff1..15da1f9ec5 100644
--- a/indra/newview/skins/default/xui/da/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/da/panel_preferences_graphics1.xml
@@ -26,6 +26,7 @@
<text name="ShadersText">
Overflader:
</text>
+ <check_box initial_value="sand" label="Gennemsigtig vand" name="TransparentWater"/>
<check_box initial_value="true" label="Glatte flader og skin" name="BumpShiny"/>
<check_box initial_value="true" label="Basale flader" name="BasicShaders" tool_tip="Ved at slå dette valg fra, kan det forhindres at visse grafikkort drivere crasher."/>
<check_box initial_value="true" label="Atmosfæriske flader" name="WindLightUseAtmosShaders"/>
diff --git a/indra/newview/skins/default/xui/da/panel_preferences_move.xml b/indra/newview/skins/default/xui/da/panel_preferences_move.xml
new file mode 100644
index 0000000000..98dfed92c1
--- /dev/null
+++ b/indra/newview/skins/default/xui/da/panel_preferences_move.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Flyv" name="move_panel">
+ <slider label="Se vinkel" name="camera_fov"/>
+ <slider label="Distance" name="camera_offset_scale"/>
+ <text name="heading2">
+ Automatisk position for:
+ </text>
+ <check_box label="Byg/Redigér" name="edit_camera_movement" tool_tip="Benyt automatisk kamera positionering når edit modus aktiveres og forlades"/>
+ <check_box label="Udseende" name="appearance_camera_movement" tool_tip="Benyt automatisk kamera positionering i edit modus"/>
+ <check_box initial_value="sand" label="Sidepanel" name="appearance_sidebar_positioning" tool_tip="Benyt automatisk kamera positionering ved sidepanel"/>
+ <check_box label="Vis avatar i første-person" name="first_person_avatar_visible"/>
+ <text name=" Mouse Sensitivity">
+ Muse-følsomhed i første-person:
+ </text>
+ <check_box label="Omvend" name="invert_mouse"/>
+ <check_box label="Piletaster bevæger altid avatar" name="arrow_keys_move_avatar_check"/>
+ <check_box label="Tryk to gange for at løbe" name="tap_tap_hold_to_run"/>
+ <check_box label="Dobbelt-klik for at:" name="double_click_chkbox"/>
+ <radio_group name="double_click_action">
+ <radio_item label="Teleportere" name="radio_teleport"/>
+ <radio_item label="Auto-pilot" name="radio_autopilot"/>
+ </radio_group>
+ <button label="Andre enheder" name="joystick_setup_button"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/da/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/da/panel_preferences_privacy.xml
index cdb407dbad..2843f0d339 100644
--- a/indra/newview/skins/default/xui/da/panel_preferences_privacy.xml
+++ b/indra/newview/skins/default/xui/da/panel_preferences_privacy.xml
@@ -10,16 +10,19 @@
<check_box label="Kun venner og grupper ved jeg er online" name="online_visibility"/>
<check_box label="Kun venner og grupper kan sende besked til mig" name="voice_call_friends_only_check"/>
<check_box label="Slå mikrofon fra når opkald slutter" name="auto_disengage_mic_check"/>
- <check_box label="Acceptér cookies" name="cookies_enabled"/>
<text name="Logs:">
- Logs:
+ Chat Logs:
</text>
<check_box label="Gem en log med lokal chat på min computer" name="log_nearby_chat"/>
<check_box label="Gem en log med private beskeder (IM) på min computer" name="log_instant_messages"/>
- <check_box label="Tilføj tidsstempel" name="show_timestamps_check_im"/>
+ <check_box label="Tilføj klokkeslæt til hver linie i chat log" name="show_timestamps_check_im"/>
+ <check_box label="Tilføj datostempel til log filnavn." name="logfile_name_datestamp"/>
<text name="log_path_desc">
Placering af logfiler:
</text>
<button label="Ændre sti" label_selected="Ændre sti" left="150" name="log_path_button"/>
<button label="Liste med blokeringer" name="block_list"/>
+ <text name="block_list_label">
+ (Personer og/eller objekter du har blokeret)
+ </text>
</panel>
diff --git a/indra/newview/skins/default/xui/da/panel_preferences_setup.xml b/indra/newview/skins/default/xui/da/panel_preferences_setup.xml
index 553d21d597..332b5ed1c4 100644
--- a/indra/newview/skins/default/xui/da/panel_preferences_setup.xml
+++ b/indra/newview/skins/default/xui/da/panel_preferences_setup.xml
@@ -1,12 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel label="Opsætning" name="Input panel">
- <text name="Mouselook:">
- Første person:
- </text>
- <text name=" Mouse Sensitivity">
- Mus - følsomhed
- </text>
- <check_box label="Omvendt" name="invert_mouse"/>
<text name="Network:">
Netværk:
</text>
@@ -46,4 +39,5 @@
</text>
<line_editor name="web_proxy_editor" tool_tip="Angiv navn eller IP addresse på den proxy du ønsker at anvende"/>
<spinner label="Port nummer:" name="web_proxy_port"/>
+ <check_box initial_value="sand" label="Hent og installer automatisk [APP_NAME] opdateringer" name="updater_service_active"/>
</panel>
diff --git a/indra/newview/skins/default/xui/da/panel_preferences_sound.xml b/indra/newview/skins/default/xui/da/panel_preferences_sound.xml
index 18cb0e47b9..75600a93f6 100644
--- a/indra/newview/skins/default/xui/da/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/da/panel_preferences_sound.xml
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel label="Lyde" name="Preference Media panel">
+ <panel.string name="middle_mouse">
+ Midterste museknap
+ </panel.string>
<slider label="Generel" name="System Volume"/>
<check_box initial_value="true" label="Sluk lyd når minimeret" name="mute_when_minimized"/>
<slider label="Knapper" name="UI Volume"/>
@@ -23,6 +26,11 @@
<radio_item label="Kamera position" name="0"/>
<radio_item label="Avatar position" name="1"/>
</radio_group>
+ <check_box label="Bevæg avatar-læber når der snakkes" name="enable_lip_sync"/>
+ <check_box label="Skift tale tænd/sluk når jeg trykker:" name="push_to_talk_toggle_check" tool_tip="Når du er i skift-modus, vil hvert tryk tænde eller slukke din mikrofon. Når du ikke er i skift-modus, vil din mikrofon kun være tændt når knappen/tasten holdes nede (som en Walkie Talkie)"/>
+ <line_editor label="Tryk-for-tale udløser" name="modifier_combo"/>
+ <button label="Angiv taste" name="set_voice_hotkey_button"/>
+ <button name="set_voice_middlemouse_button" tool_tip="Nulstil til midterste muse-knap"/>
<button label="Input/Output enheder" name="device_settings_btn"/>
<panel label="Enhedsopsætning" name="device_settings_panel">
<panel.string name="default_text">
diff --git a/indra/newview/skins/default/xui/da/panel_script_ed.xml b/indra/newview/skins/default/xui/da/panel_script_ed.xml
index 0bdfa89d3b..8997cab30c 100644
--- a/indra/newview/skins/default/xui/da/panel_script_ed.xml
+++ b/indra/newview/skins/default/xui/da/panel_script_ed.xml
@@ -15,11 +15,6 @@
<panel.string name="Title">
Script: [NAME]
</panel.string>
- <text_editor name="Script Editor">
- Henter...
- </text_editor>
- <button label="Gem" label_selected="Gem" name="Save_btn"/>
- <combo_box label="Indsæt..." name="Insert..."/>
<menu_bar name="script_menu">
<menu label="Filer" name="File">
<menu_item_call label="Gem" name="Save"/>
@@ -40,4 +35,10 @@
<menu_item_call label="Hjælp med keywords..." name="Keyword Help..."/>
</menu>
</menu_bar>
+ <text_editor name="Script Editor">
+ Henter...
+ </text_editor>
+ <combo_box label="Indsæt..." name="Insert..."/>
+ <button label="Gem" label_selected="Gem" name="Save_btn"/>
+ <button label="Redigér..." name="Edit_btn"/>
</panel>
diff --git a/indra/newview/skins/default/xui/da/strings.xml b/indra/newview/skins/default/xui/da/strings.xml
index 198d8eea0e..6f891b8d1b 100644
--- a/indra/newview/skins/default/xui/da/strings.xml
+++ b/indra/newview/skins/default/xui/da/strings.xml
@@ -784,7 +784,7 @@
XML Fil
</string>
<string name="raw_file">
- RAW Fil
+ RAW fil
</string>
<string name="compressed_image_files">
Komprimerede billeder
@@ -1737,11 +1737,8 @@
<string name="InvOfferGaveYou">
gav dig
</string>
- <string name="InvOfferYouDecline">
- Du afslår
- </string>
- <string name="InvOfferFrom">
- fra
+ <string name="InvOfferDecline">
+ Du afslår [DESC] fra &lt;nolink&gt;[NAME]&lt;/nolink&gt;.
</string>
<string name="GroupMoneyTotal">
Total
diff --git a/indra/newview/skins/default/xui/de/floater_hardware_settings.xml b/indra/newview/skins/default/xui/de/floater_hardware_settings.xml
index d931596efe..9644bbbaea 100644
--- a/indra/newview/skins/default/xui/de/floater_hardware_settings.xml
+++ b/indra/newview/skins/default/xui/de/floater_hardware_settings.xml
@@ -14,6 +14,9 @@
<combo_box.item label="8x" name="8x"/>
<combo_box.item label="16x" name="16x"/>
</combo_box>
+ <text name="antialiasing restart">
+ (Neustart des Viewers erforderlich)
+ </text>
<spinner label="Gamma:" name="gamma"/>
<text name="(brightness, lower is brighter)">
(0 = Standard-Helligkeit, weniger = heller)
diff --git a/indra/newview/skins/default/xui/de/floater_preferences.xml b/indra/newview/skins/default/xui/de/floater_preferences.xml
index a2712c437b..3624c4c968 100644
--- a/indra/newview/skins/default/xui/de/floater_preferences.xml
+++ b/indra/newview/skins/default/xui/de/floater_preferences.xml
@@ -5,10 +5,12 @@
<tab_container name="pref core">
<panel label="Allgemein" name="general"/>
<panel label="Grafik" name="display"/>
- <panel label="Privatsphäre" name="im"/>
<panel label="Sound &amp; Medien" name="audio"/>
<panel label="Chat" name="chat"/>
+ <panel label="Bewegen und anzeigen" name="move"/>
<panel label="Meldungen" name="msgs"/>
+ <panel label="Farben" name="colors"/>
+ <panel label="Privatsphäre" name="im"/>
<panel label="Konfiguration" name="input"/>
<panel label="Erweitert" name="advanced1"/>
</tab_container>
diff --git a/indra/newview/skins/default/xui/de/floater_region_debug_console.xml b/indra/newview/skins/default/xui/de/floater_region_debug_console.xml
new file mode 100644
index 0000000000..b8a1a89c30
--- /dev/null
+++ b/indra/newview/skins/default/xui/de/floater_region_debug_console.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="region_debug_console" title="Regions-Debug"/>
diff --git a/indra/newview/skins/default/xui/de/menu_inventory_gear_default.xml b/indra/newview/skins/default/xui/de/menu_inventory_gear_default.xml
index 3fa68a27bd..df86a5cf71 100644
--- a/indra/newview/skins/default/xui/de/menu_inventory_gear_default.xml
+++ b/indra/newview/skins/default/xui/de/menu_inventory_gear_default.xml
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<menu name="menu_gear_default">
+<toggleable_menu name="menu_gear_default">
<menu_item_call label="Neues Inventar-Fenster" name="new_window"/>
- <menu_item_call label="Nach Name sortieren" name="sort_by_name"/>
- <menu_item_call label="Nach aktuellesten Objekten sortieren" name="sort_by_recent"/>
+ <menu_item_check label="Nach Name sortieren" name="sort_by_name"/>
+ <menu_item_check label="Nach aktuellesten Objekten sortieren" name="sort_by_recent"/>
+ <menu_item_check label="Systemordner nach oben" name="sort_system_folders_to_top"/>
<menu_item_call label="Filter anzeigen" name="show_filters"/>
<menu_item_call label="Filter zurücksetzen" name="reset_filters"/>
<menu_item_call label="Alle Ordner schließen" name="close_folders"/>
@@ -12,4 +13,4 @@
<menu_item_call label="Original suchen" name="Find Original"/>
<menu_item_call label="Alle Links suchen" name="Find All Links"/>
<menu_item_call label="Papierkorb ausleeren" name="empty_trash"/>
-</menu>
+</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/de/menu_viewer.xml b/indra/newview/skins/default/xui/de/menu_viewer.xml
index 489990608f..9eeeaccdea 100644
--- a/indra/newview/skins/default/xui/de/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/de/menu_viewer.xml
@@ -12,6 +12,12 @@
<menu_item_check label="Mein Inventar" name="ShowSidetrayInventory"/>
<menu_item_check label="Meine Gesten" name="Gestures"/>
<menu_item_check label="Meine Stimme" name="ShowVoice"/>
+ <menu label="Bewegung" name="Movement">
+ <menu_item_call label="Hinsetzen" name="Sit Down Here"/>
+ <menu_item_check label="Fliegen" name="Fly"/>
+ <menu_item_check label="Immer rennen" name="Always Run"/>
+ <menu_item_call label="Animation meines Avatars stoppen" name="Stop Animating My Avatar"/>
+ </menu>
<menu label="Mein Status" name="Status">
<menu_item_call label="Abwesend" name="Set Away"/>
<menu_item_call label="Beschäftigt" name="Set Busy"/>
@@ -47,6 +53,7 @@
<menu_item_check label="Landeigentümer" name="Land Owners"/>
<menu_item_check label="Koordinaten" name="Coordinates"/>
<menu_item_check label="Parzelleneigenschaften" name="Parcel Properties"/>
+ <menu_item_check label="Menü „Erweitert“" name="Show Advanced Menu"/>
</menu>
<menu_item_call label="Teleport nach Hause" name="Teleport Home"/>
<menu_item_call label="Hier als Zuhause wählen" name="Set Home to Here"/>
@@ -123,7 +130,6 @@
<menu_item_check label="Hinweise aktivieren" name="Enable Hints"/>
</menu>
<menu label="Erweitert" name="Advanced">
- <menu_item_call label="Animation meines Avatars stoppen" name="Stop Animating My Avatar"/>
<menu_item_call label="Textur neu laden" name="Rebake Texture"/>
<menu_item_call label="UI-Größe auf Standard setzen" name="Set UI Size to Default"/>
<menu_item_call label="Fenstergröße einstellen..." name="Set Window Size..."/>
@@ -178,8 +184,7 @@
<menu_item_check label="Suchen" name="Search"/>
<menu_item_call label="Tasten freigeben" name="Release Keys"/>
<menu_item_call label="UI-Größe auf Standard setzen" name="Set UI Size to Default"/>
- <menu_item_check label="Immer rennen" name="Always Run"/>
- <menu_item_check label="Fliegen" name="Fly"/>
+ <menu_item_check label="Erweitert-Menü anzeigen - veraltetet" name="Show Advanced Menu - legacy shortcut"/>
<menu_item_call label="Fenster schließen" name="Close Window"/>
<menu_item_call label="Alle Fenster schließen" name="Close All Windows"/>
<menu_item_call label="Foto auf Datenträger" name="Snapshot to Disk"/>
@@ -197,7 +202,6 @@
<menu_item_call label="Hineinzoomen" name="Zoom In"/>
<menu_item_call label="Zoom-Standard" name="Zoom Default"/>
<menu_item_call label="Wegzoomen" name="Zoom Out"/>
- <menu_item_check label="Menü „Erweitert“ anzeigen" name="Show Advanced Menu"/>
</menu>
<menu_item_call label="Debug-Einstellungen anzeigen" name="Debug Settings"/>
<menu_item_check label="Menü „Entwickler“ anzeigen" name="Debug Mode"/>
@@ -312,8 +316,7 @@
<menu_item_call label="Ausgewählte Objektinfo drucken" name="Print Selected Object Info"/>
<menu_item_call label="Agent-Info drucken" name="Print Agent Info"/>
<menu_item_call label="Speicher-Stats" name="Memory Stats"/>
- <menu_item_check label="Doppelklicken: Auto-Pilot" name="Double-ClickAuto-Pilot"/>
- <menu_item_check label="Doppelklicken: Teleport" name="DoubleClick Teleport"/>
+ <menu_item_check label="Regions-Debug-Konsole" name="Region Debug Console"/>
<menu_item_check label="Fehler in SelectMgr beseitigen" name="Debug SelectMgr"/>
<menu_item_check label="Fehler in Klicks beseitigen" name="Debug Clicks"/>
<menu_item_check label="Debug-Ansichten" name="Debug Views"/>
@@ -325,8 +328,6 @@
<menu label="XUI" name="XUI">
<menu_item_call label="Farbeinstellungen neu laden" name="Reload Color Settings"/>
<menu_item_call label="Schriftarttest anzeigen" name="Show Font Test"/>
- <menu_item_call label="Von XML laden" name="Load from XML"/>
- <menu_item_call label="Als XML speichern" name="Save to XML"/>
<menu_item_check label="XUI-Namen anzeigen" name="Show XUI Names"/>
<menu_item_call label="Test-IMs senden" name="Send Test IMs"/>
<menu_item_call label="Namen-Cache leeren" name="Flush Names Caches"/>
@@ -366,9 +367,9 @@
<menu_item_call label="Bilder komprimieren" name="Compress Images"/>
<menu_item_check label="Ausgabe Fehlerbeseitigung ausgeben" name="Output Debug Minidump"/>
<menu_item_check label="Bei nächster Ausführung Fenster öffnen" name="Console Window"/>
- <menu_item_check label="Admin-Menü anzeigen" name="View Admin Options"/>
<menu_item_call label="Admin-Status anfordern" name="Request Admin Options"/>
<menu_item_call label="Admin-Status verlassen" name="Leave Admin Options"/>
+ <menu_item_check label="Admin-Menü anzeigen" name="View Admin Options"/>
</menu>
<menu label="Admin" name="Admin">
<menu label="Object">
diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml
index a904604b62..06cc02cd84 100644
--- a/indra/newview/skins/default/xui/de/notifications.xml
+++ b/indra/newview/skins/default/xui/de/notifications.xml
@@ -395,6 +395,9 @@ Hinweis: Der Cache wird dabei gelöscht/geleert.
<notification name="ChangeSkin">
Die neue Benutzeroberfläche wird nach einem Neustart von [APP_NAME] angezeigt.
</notification>
+ <notification name="ChangeLanguage">
+ Die Sprachänderung tritt nach Neustart von [APP_NAME] in Kraft.
+ </notification>
<notification name="GoToAuctionPage">
Zur [SECOND_LIFE]-Webseite, um Auktionen anzuzeigen oder ein Gebot abzugeben?
<url name="url">
@@ -607,6 +610,10 @@ Erwartet wurde [VALIDS]
„Daten“-Chunk in WAV-Header nicht gefunden:
[FILE]
</notification>
+ <notification name="SoundFileInvalidChunkSize">
+ Falsche Chunk-Größe in WAV-Datei:
+[FILE]
+ </notification>
<notification name="SoundFileInvalidTooLong">
Audiodatei ist zu lang (max. 10 Sekunden):
[FILE]
@@ -1343,6 +1350,15 @@ Dieses Update ist nicht erforderlich, für bessere Leistung und Stabilität soll
In Ihren Anwendungsordner herunterladen?
<usetemplate name="okcancelbuttons" notext="Weiter" yestext="Herunterladen"/>
</notification>
+ <notification name="FailedUpdateInstall">
+ Beim Installieren des Viewer-Updates ist ein Fehler aufgetreten.
+Laden Sie den neuesten Viewer von http://secondlife.com/download herunter und installieren Sie ihn.
+ <usetemplate name="okbutton" yestext="OK"/>
+ </notification>
+ <notification name="DownloadBackground">
+ Eine aktualisierte Version von [APP_NAME] wurde heruntergeladen.
+Sie wird beim nächsten Neustart von [APP_NAME] verwendet.
+ </notification>
<notification name="DeedObjectToGroup">
Bei Übertragung dieses Objekts erhält die Gruppe:
* An das Objekt bezahlte L$
@@ -2481,8 +2497,8 @@ Versuchen Sie es in einigen Minuten erneut.
Ihr Freundschaftsangebot wurde abgelehnt.
</notification>
<notification name="OfferCallingCard">
- [NAME] bietet Ihnen ihre/seine Visitenkarte an.
-Ihrem Inventar wird ein Lesezeichen erstellt, damit Sie diesem Einwohner einfach eine IM schicken können.
+ [NAME] bietet Ihnen eine Visitenkarte an.
+In Ihrem Inventar wird ein Lesezeichen erstellt, damit Sie diesem Einwohner schnell IMs senden können.
<form name="form">
<button name="Accept" text="Akzeptieren"/>
<button name="Decline" text="Ablehnen"/>
diff --git a/indra/newview/skins/default/xui/de/panel_edit_gloves.xml b/indra/newview/skins/default/xui/de/panel_edit_gloves.xml
index ad87e432d6..fb7d18f66c 100644
--- a/indra/newview/skins/default/xui/de/panel_edit_gloves.xml
+++ b/indra/newview/skins/default/xui/de/panel_edit_gloves.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_gloves_panel">
<panel name="avatar_gloves_color_panel">
- <texture_picker label="Stoff" name="Fabric" tool_tip="Zum Auswählen eines Bildes hier klicken"/>
+ <texture_picker label="Textur" name="Fabric" tool_tip="Zum Auswählen eines Bildes hier klicken"/>
<color_swatch label="Farbe/Ton" name="Color/Tint" tool_tip="Klicken Sie hier, um die Farbauswahl zu öffnen"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/de/panel_edit_jacket.xml b/indra/newview/skins/default/xui/de/panel_edit_jacket.xml
index 8fe76f6225..1b7c1d79a5 100644
--- a/indra/newview/skins/default/xui/de/panel_edit_jacket.xml
+++ b/indra/newview/skins/default/xui/de/panel_edit_jacket.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_jacket_panel">
<panel name="avatar_jacket_color_panel">
- <texture_picker label="Stoff: oben" name="Upper Fabric" tool_tip="Zum Auswählen eines Bildes hier klicken"/>
- <texture_picker label="Stoff: unten" name="Lower Fabric" tool_tip="Zum Auswählen eines Bildes hier klicken"/>
+ <texture_picker label="Obere Textur" name="Upper Fabric" tool_tip="Zum Auswählen eines Bildes hier klicken"/>
+ <texture_picker label="Untere Textur" name="Lower Fabric" tool_tip="Zum Auswählen eines Bildes hier klicken"/>
<color_swatch label="Farbe/Ton" name="Color/Tint" tool_tip="Klicken Sie hier, um die Farbauswahl zu öffnen"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/de/panel_edit_pants.xml b/indra/newview/skins/default/xui/de/panel_edit_pants.xml
index d40a27c5fd..533cf20412 100644
--- a/indra/newview/skins/default/xui/de/panel_edit_pants.xml
+++ b/indra/newview/skins/default/xui/de/panel_edit_pants.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_pants_panel">
<panel name="avatar_pants_color_panel">
- <texture_picker label="Stoff" name="Fabric" tool_tip="Zum Auswählen eines Bildes hier klicken"/>
+ <texture_picker label="Textur" name="Fabric" tool_tip="Zum Auswählen eines Bildes hier klicken"/>
<color_swatch label="Farbe/Ton" name="Color/Tint" tool_tip="Klicken Sie hier, um die Farbauswahl zu öffnen"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/de/panel_edit_shirt.xml b/indra/newview/skins/default/xui/de/panel_edit_shirt.xml
index 344b0b412a..4f140a2b01 100644
--- a/indra/newview/skins/default/xui/de/panel_edit_shirt.xml
+++ b/indra/newview/skins/default/xui/de/panel_edit_shirt.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_shirt_panel">
<panel name="avatar_shirt_color_panel">
- <texture_picker label="Stoff" name="Fabric" tool_tip="Zum Auswählen eines Bildes hier klicken"/>
+ <texture_picker label="Textur" name="Fabric" tool_tip="Zum Auswählen eines Bildes hier klicken"/>
<color_swatch label="Farbe/Ton" name="Color/Tint" tool_tip="Klicken Sie hier, um die Farbauswahl zu öffnen"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/de/panel_edit_shoes.xml b/indra/newview/skins/default/xui/de/panel_edit_shoes.xml
index 56aee5d0fe..abedb8d89e 100644
--- a/indra/newview/skins/default/xui/de/panel_edit_shoes.xml
+++ b/indra/newview/skins/default/xui/de/panel_edit_shoes.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_shoes_panel">
<panel name="avatar_shoes_color_panel">
- <texture_picker label="Stoff" name="Fabric" tool_tip="Zum Auswählen eines Bildes hier klicken"/>
+ <texture_picker label="Textur" name="Fabric" tool_tip="Zum Auswählen eines Bildes hier klicken"/>
<color_swatch label="Farbe/Ton" name="Color/Tint" tool_tip="Klicken Sie hier, um die Farbauswahl zu öffnen"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/de/panel_edit_skirt.xml b/indra/newview/skins/default/xui/de/panel_edit_skirt.xml
index c8931bc947..07ce8a7436 100644
--- a/indra/newview/skins/default/xui/de/panel_edit_skirt.xml
+++ b/indra/newview/skins/default/xui/de/panel_edit_skirt.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_skirt_panel">
<panel name="avatar_skirt_color_panel">
- <texture_picker label="Stoff" name="Fabric" tool_tip="Zum Auswählen eines Bildes hier klicken"/>
+ <texture_picker label="Textur" name="Fabric" tool_tip="Zum Auswählen eines Bildes hier klicken"/>
<color_swatch label="Farbe/Ton" name="Color/Tint" tool_tip="Klicken Sie hier, um die Farbauswahl zu öffnen"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/de/panel_edit_socks.xml b/indra/newview/skins/default/xui/de/panel_edit_socks.xml
index abbeefa44e..4e72b63f49 100644
--- a/indra/newview/skins/default/xui/de/panel_edit_socks.xml
+++ b/indra/newview/skins/default/xui/de/panel_edit_socks.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_socks_panel">
<panel name="avatar_socks_color_panel">
- <texture_picker label="Stoff" name="Fabric" tool_tip="Zum Auswählen eines Bildes hier klicken"/>
+ <texture_picker label="Textur" name="Fabric" tool_tip="Zum Auswählen eines Bildes hier klicken"/>
<color_swatch label="Farbe/Ton" name="Color/Tint" tool_tip="Klicken Sie hier, um die Farbauswahl zu öffnen"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/de/panel_edit_underpants.xml b/indra/newview/skins/default/xui/de/panel_edit_underpants.xml
index 03c61a495d..1fad0ccedb 100644
--- a/indra/newview/skins/default/xui/de/panel_edit_underpants.xml
+++ b/indra/newview/skins/default/xui/de/panel_edit_underpants.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_underpants_panel">
<panel name="avatar_underpants_color_panel">
- <texture_picker label="Stoff" name="Fabric" tool_tip="Zum Auswählen eines Bildes hier klicken"/>
+ <texture_picker label="Textur" name="Fabric" tool_tip="Zum Auswählen eines Bildes hier klicken"/>
<color_swatch label="Farbe/Ton" name="Color/Tint" tool_tip="Klicken Sie hier, um die Farbauswahl zu öffnen"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/de/panel_edit_undershirt.xml b/indra/newview/skins/default/xui/de/panel_edit_undershirt.xml
index 39919393e1..9d193ffedb 100644
--- a/indra/newview/skins/default/xui/de/panel_edit_undershirt.xml
+++ b/indra/newview/skins/default/xui/de/panel_edit_undershirt.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_undershirt_panel">
<panel name="avatar_undershirt_color_panel">
- <texture_picker label="Stoff" name="Fabric" tool_tip="Zum Auswählen eines Bildes hier klicken"/>
+ <texture_picker label="Textur" name="Fabric" tool_tip="Zum Auswählen eines Bildes hier klicken"/>
<color_swatch label="Farbe/Ton" name="Color/Tint" tool_tip="Klicken Sie hier, um die Farbauswahl zu öffnen"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/de/panel_notify_textbox.xml b/indra/newview/skins/default/xui/de/panel_notify_textbox.xml
new file mode 100644
index 0000000000..7187be570c
--- /dev/null
+++ b/indra/newview/skins/default/xui/de/panel_notify_textbox.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="instant_message" name="panel_notify_textbox">
+ <string name="message_max_lines_count" value="7"/>
+ <panel label="info_panel" name="info_panel">
+ <text_editor name="message" value="message"/>
+ parse_urls=&quot;false&quot;
+ <button label="Senden" name="btn_submit"/>
+ </panel>
+ <panel label="control_panel" name="control_panel"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/de/panel_people.xml b/indra/newview/skins/default/xui/de/panel_people.xml
index 6c859da4d6..99e0b933b8 100644
--- a/indra/newview/skins/default/xui/de/panel_people.xml
+++ b/indra/newview/skins/default/xui/de/panel_people.xml
@@ -22,7 +22,7 @@ Sie suchen nach Leuten? Verwenden Sie die [secondlife:///app/worldmap Karte].
<tab_container name="tabs">
<panel label="IN DER NÄHE" name="nearby_panel">
<panel label="bottom_panel" name="bottom_panel">
- <button name="nearby_view_sort_btn" tool_tip="Optionen"/>
+ <menu_button name="nearby_view_sort_btn" tool_tip="Optionen"/>
<button name="add_friend_btn" tool_tip="Ausgewählten Einwohner zur Freundeliste hinzufügen"/>
</panel>
</panel>
@@ -34,27 +34,27 @@ Sie suchen nach Leuten? Verwenden Sie die [secondlife:///app/worldmap Karte].
<panel label="bottom_panel" name="bottom_panel">
<layout_stack name="bottom_panel">
<layout_panel name="options_gear_btn_panel">
- <button name="friends_viewsort_btn" tool_tip="Zusätzliche Optionen anzeigen"/>
+ <menu_button name="friends_viewsort_btn" tool_tip="Zusätzliche Optionen anzeigen"/>
</layout_panel>
<layout_panel name="add_btn_panel">
<button name="add_btn" tool_tip="Bieten Sie einem Einwohner die Freundschaft an"/>
</layout_panel>
<layout_panel name="trash_btn_panel">
- <dnd_button name="trash_btn" tool_tip="Ausgewählte Person von Ihrer Freundesliste entfernen"/>
+ <dnd_button name="del_btn" tool_tip="Ausgewählte Person aus Ihrer Freundesliste entfernen"/>
</layout_panel>
</layout_stack>
</panel>
</panel>
<panel label="MEINE GRUPPEN" name="groups_panel">
<panel label="bottom_panel" name="bottom_panel">
- <button name="groups_viewsort_btn" tool_tip="Optionen"/>
+ <menu_button name="groups_viewsort_btn" tool_tip="Optionen"/>
<button name="plus_btn" tool_tip="Gruppe beitreten/Neue Gruppe erstellen"/>
<button name="activate_btn" tool_tip="Ausgewählte Gruppe aktivieren"/>
</panel>
</panel>
<panel label="AKTUELL" name="recent_panel">
<panel label="bottom_panel" name="bottom_panel">
- <button name="recent_viewsort_btn" tool_tip="Optionen"/>
+ <menu_button name="recent_viewsort_btn" tool_tip="Optionen"/>
<button name="add_friend_btn" tool_tip="Ausgewählten Einwohner zur Freundeliste hinzufügen"/>
</panel>
</panel>
diff --git a/indra/newview/skins/default/xui/de/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/de/panel_preferences_advanced.xml
index 7b6918ae24..0a596f2b25 100644
--- a/indra/newview/skins/default/xui/de/panel_preferences_advanced.xml
+++ b/indra/newview/skins/default/xui/de/panel_preferences_advanced.xml
@@ -3,35 +3,16 @@
<panel.string name="aspect_ratio_text">
[NUM]:[DEN]
</panel.string>
- <panel.string name="middle_mouse">
- Mittlere Maustaste
- </panel.string>
- <slider label="Sichtwinkel" name="camera_fov"/>
- <slider label="Abstand" name="camera_offset_scale"/>
- <text name="heading2">
- Automatische Position für:
- </text>
- <check_box label="Bauen/Bearbeiten" name="edit_camera_movement" tool_tip="Automatische Kamerapositionierung bei Wechsel in und aus dem Bearbeitungsmodus verwenden"/>
- <check_box label="Aussehen" name="appearance_camera_movement" tool_tip="Automatische Kamerapositionierung im Bearbeitenmodus verwenden"/>
- <check_box initial_value="true" label="Seitenleiste" name="appearance_sidebar_positioning" tool_tip="Automatische Kameraposition für Seitenleiste verwenden"/>
- <check_box label="Mich im Mouselook anzeigen" name="first_person_avatar_visible"/>
- <check_box label="Mit Pfeiltasten bewegen" name="arrow_keys_move_avatar_check"/>
- <check_box label="2-mal-drücken-halten, um zu rennen" name="tap_tap_hold_to_run"/>
- <check_box label="Avatarlippen beim Sprechen bewegen" name="enable_lip_sync"/>
- <check_box label="Blasen-Chat" name="bubble_text_chat"/>
- <slider label="Deckkraft" label_width="66" name="bubble_chat_opacity"/>
- <color_swatch left_pad="35" name="background" tool_tip="Farbe für Blasen-Chat auswählen"/>
<text name="UI Size:">
- UI-Größe
+ UI-Größe:
</text>
<check_box label="Skript-Fehler anzeigen:" name="show_script_errors"/>
<radio_group name="show_location">
<radio_item label="Chat in der Nähe" name="0"/>
<radio_item label="Getrenntes Fenster" name="1"/>
</radio_group>
- <check_box label="Sprachfunktion ein-/ausschalten, wenn gedrückt wird:" name="push_to_talk_toggle_check" tool_tip="Wenn der Umschaltmodus aktiviert ist, drücken Sie die Auslöse-Taste EINMAL, um Ihr Mikrofon an oder aus zu stellen. Wenn der Umschaltmodus nicht motiviert ist, ist das Mikro nur dann eingeschaltet, wenn Sie die Auslösetaste gedrückt halten."/>
- <line_editor label="Auslöser für Zum-Sprechen-drücken:" name="modifier_combo"/>
- <button label="Taste festlegen" name="set_voice_hotkey_button"/>
- <button label="Mittlere Maustaste" name="set_voice_middlemouse_button" tool_tip="Auf mittlere Maustaste zurücksetzen"/>
- <button label="Andere Geräte" name="joystick_setup_button"/>
+ <check_box label="Mehrere Viewer zulassen" name="allow_multiple_viewer_check"/>
+ <check_box label="Bei Anmeldung Rasterauswahl anzeigen" name="show_grid_selection_check"/>
+ <check_box label="Menü „Erweitert“ anzeigen" name="show_advanced_menu_check"/>
+ <check_box label="Menü „Entwickler“ anzeigen" name="show_develop_menu_check"/>
</panel>
diff --git a/indra/newview/skins/default/xui/de/panel_preferences_chat.xml b/indra/newview/skins/default/xui/de/panel_preferences_chat.xml
index aa314a1a57..8086128dd7 100644
--- a/indra/newview/skins/default/xui/de/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/de/panel_preferences_chat.xml
@@ -8,44 +8,10 @@
<radio_item label="Mittel" name="radio2" value="1"/>
<radio_item label="Groß" name="radio3" value="2"/>
</radio_group>
- <text name="font_colors">
- Schriftfarben:
- </text>
- <color_swatch label="Sie" name="user"/>
- <text name="text_box1">
- Ich
- </text>
- <color_swatch label="Andere" name="agent"/>
- <text name="text_box2">
- Andere
- </text>
- <color_swatch label="IM" name="im"/>
- <text name="text_box3">
- IM
- </text>
- <color_swatch label="System" name="system"/>
- <text name="text_box4">
- System
- </text>
- <color_swatch label="Skriptfehler" name="script_error"/>
- <text name="text_box5">
- Skriptfehler
- </text>
- <color_swatch label="Objekte" name="objects"/>
- <text name="text_box6">
- Objekte
- </text>
- <color_swatch label="Eigentümer" name="owner"/>
- <text name="text_box7">
- Eigentümer
- </text>
- <color_swatch label="URLs" name="links"/>
- <text name="text_box9">
- URLs
- </text>
<check_box initial_value="true" label="Beim Chatten Tippanimation abspielen" name="play_typing_animation"/>
<check_box label="IMs per Email zuschicken, wenn ich offline bin" name="send_im_to_email"/>
<check_box label="Kompakten IM- und Text-Chatverlauf aktivieren" name="plain_text_chat_history"/>
+ <check_box label="Blasen-Chat" name="bubble_text_chat"/>
<text name="show_ims_in_label">
IMs anzeigen in:
</text>
@@ -56,6 +22,13 @@
<radio_item label="Getrennte Fenster" name="radio" value="0"/>
<radio_item label="Registerkarten" name="radio2" value="1"/>
</radio_group>
+ <text name="disable_toast_label">
+ Popups für eingehende Chats aktivieren:
+ </text>
+ <check_box label="Gruppen-Chats" name="EnableGroupChatPopups" tool_tip="Markieren, um Popups zu sehen, wenn Gruppen-Chat-Message eintrifft"/>
+ <check_box label="IM-Chats" name="EnableIMChatPopups" tool_tip="Markieren, um Popups zu sehen, wenn Instant Message eintrifft"/>
+ <spinner label="Lebenszeit von Toasts für Chat in der Nähe:" name="nearby_toasts_lifetime"/>
+ <spinner label="Ein-/Ausblenddauer von Toasts für Chat in der Nähe:" name="nearby_toasts_fadingtime"/>
<check_box label="Bei Chat Maschinenübersetzung verwenden (Service von Google)" name="translate_chat_checkbox"/>
<text name="translate_language_text">
Chat übersetzen in:
diff --git a/indra/newview/skins/default/xui/de/panel_preferences_colors.xml b/indra/newview/skins/default/xui/de/panel_preferences_colors.xml
new file mode 100644
index 0000000000..d9e5c7f2b5
--- /dev/null
+++ b/indra/newview/skins/default/xui/de/panel_preferences_colors.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Farben" name="colors_panel">
+ <text name="effects_color_textbox">
+ Meine Effekte (Auswahlstrahl):
+ </text>
+ <color_swatch name="effect_color_swatch" tool_tip="Klicken Sie hier, um die Farbauswahl zu öffnen"/>
+ <text name="font_colors">
+ Schriftfarben für Chat:
+ </text>
+ <text name="text_box1">
+ Ich
+ </text>
+ <text name="text_box2">
+ Andere
+ </text>
+ <text name="text_box3">
+ Objekte
+ </text>
+ <text name="text_box4">
+ System
+ </text>
+ <text name="text_box5">
+ Fehler
+ </text>
+ <text name="text_box7">
+ Eigentümer
+ </text>
+ <text name="text_box9">
+ URLs
+ </text>
+ <text name="bubble_chat">
+ Hintergrund für Blasen-Chat:
+ </text>
+ <color_swatch name="background" tool_tip="Farbe für Blasen-Chat auswählen"/>
+ <slider label="Deckkraft:" name="bubble_chat_opacity"/>
+ <text name="floater_opacity">
+ Floater-Deckkraft:
+ </text>
+ <slider label="Aktiv:" name="active"/>
+ <slider label="Inaktiv:" name="inactive"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/de/panel_preferences_general.xml b/indra/newview/skins/default/xui/de/panel_preferences_general.xml
index 8492d36bc7..79b2a544f9 100644
--- a/indra/newview/skins/default/xui/de/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/de/panel_preferences_general.xml
@@ -48,13 +48,18 @@
<check_box label="Benutzernamen" name="show_slids" tool_tip="Benutzernamen wie berndschmidt123 anzeigen"/>
<check_box label="Gruppentitel" name="show_all_title_checkbox1" tool_tip="Gruppentitel wie „Vorstand“ oder „Mitglied“"/>
<check_box label="Freunde hervorheben" name="show_friends" tool_tip="Avatarnamen Ihrer Freunde hervorheben"/>
- <text name="effects_color_textbox">
- Meine Effekte:
+ <check_box label="Anzeigenamen anzeigen" name="display_names_check" tool_tip="Aktivieren Sie diese Option, um Anzeigenamen in Chat, IM, Avatarnamen usw. zu verwenden."/>
+ <check_box label="Viewer-UI-Tipps aktivieren" name="viewer_hints_check"/>
+ <text name="inworld_typing_rg_label">
+ Drücken von Buchstabentasten:
</text>
+ <radio_group name="inworld_typing_preference">
+ <radio_item label="Startet lokalen Chat" name="radio_start_chat" value="1"/>
+ <radio_item label="Beeinflusst Bewegung (z. B. WASD)" name="radio_move" value="0"/>
+ </radio_group>
<text name="title_afk_text">
Zeit bis zur Abwesenheit:
</text>
- <color_swatch label="" name="effect_color_swatch" tool_tip="Klicken Sie hier, um die Farbauswahl zu öffnen"/>
<combo_box label="Timeout für Abwesenheit:" name="afk">
<combo_box.item label="2 Minuten" name="item0"/>
<combo_box.item label="5 Minuten" name="item1"/>
@@ -62,7 +67,6 @@
<combo_box.item label="30 Minuten" name="item3"/>
<combo_box.item label="nie" name="item4"/>
</combo_box>
- <check_box label="Anzeigenamen anzeigen" name="display_names_check" tool_tip="Aktivieren Sie diese Option, um Anzeigenamen in Chat, IM, Avatarnamen usw. zu verwenden."/>
<text name="text_box3">
Antwort, wenn im „Beschäftigt“-Modus:
</text>
diff --git a/indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml
index ae3c791ab9..63161c954e 100644
--- a/indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/de/panel_preferences_graphics1.xml
@@ -25,6 +25,7 @@
<text name="ShadersText">
Shader:
</text>
+ <check_box initial_value="true" label="Transparentes Wasser" name="TransparentWater"/>
<check_box initial_value="true" label="Bumpmapping und Glanz" name="BumpShiny"/>
<check_box initial_value="true" label="Einfache Shader" name="BasicShaders" tool_tip="Deaktivieren Sie diese Option, wenn der Grafikkartentreiber Abstürze verursacht"/>
<check_box initial_value="true" label="Atmosphären-Shader" name="WindLightUseAtmosShaders"/>
@@ -46,7 +47,7 @@
<slider label="Max. Anzahl an voll dargestellten Avataren:" name="MaxNumberAvatarDrawn"/>
<slider label="Post-Processing-Qualität:" name="RenderPostProcess"/>
<text name="MeshDetailText">
- Gitterdetails:
+ Darstellungsgrad:
</text>
<slider label=" Objekte:" name="ObjectMeshDetail"/>
<slider label=" Flexiprimitiva:" name="FlexibleMeshDetail"/>
diff --git a/indra/newview/skins/default/xui/de/panel_preferences_move.xml b/indra/newview/skins/default/xui/de/panel_preferences_move.xml
new file mode 100644
index 0000000000..fb749a16d7
--- /dev/null
+++ b/indra/newview/skins/default/xui/de/panel_preferences_move.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Bewegen" name="move_panel">
+ <slider label="Sichtwinkel" name="camera_fov"/>
+ <slider label="Abstand" name="camera_offset_scale"/>
+ <text name="heading2">
+ Automatische Position für:
+ </text>
+ <check_box label="Bauen/Bearbeiten" name="edit_camera_movement" tool_tip="Automatische Kamerapositionierung bei Wechsel in und aus dem Bearbeitungsmodus verwenden"/>
+ <check_box label="Aussehen" name="appearance_camera_movement" tool_tip="Automatische Kamerapositionierung im Bearbeitenmodus verwenden"/>
+ <check_box initial_value="true" label="Seitenleiste" name="appearance_sidebar_positioning" tool_tip="Automatische Kameraposition für Seitenleiste verwenden"/>
+ <check_box label="Mich im Mouselook anzeigen" name="first_person_avatar_visible"/>
+ <text name=" Mouse Sensitivity">
+ Mausempfindlichkeit für Mouselook:
+ </text>
+ <check_box label="Umkehren" name="invert_mouse"/>
+ <check_box label="Mit Pfeiltasten bewegen" name="arrow_keys_move_avatar_check"/>
+ <check_box label="Drücken-drücken-halten, um zu rennen" name="tap_tap_hold_to_run"/>
+ <check_box label="Doppelklicken:" name="double_click_chkbox"/>
+ <radio_group name="double_click_action">
+ <radio_item label="Teleportieren" name="radio_teleport"/>
+ <radio_item label="Autopilot" name="radio_autopilot"/>
+ </radio_group>
+ <button label="Andere Geräte" name="joystick_setup_button"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/de/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/de/panel_preferences_privacy.xml
index 42a625fbf6..d78064833b 100644
--- a/indra/newview/skins/default/xui/de/panel_preferences_privacy.xml
+++ b/indra/newview/skins/default/xui/de/panel_preferences_privacy.xml
@@ -10,16 +10,19 @@
<check_box label="Nur Freunde und Gruppen wissen, dass ich online bin" name="online_visibility"/>
<check_box label="Nur Freunde und Gruppen können mich anrufen oder mir eine IM schicken" name="voice_call_friends_only_check"/>
<check_box label="Mikrofon ausschalten, wenn Anrufe beendet werden" name="auto_disengage_mic_check"/>
- <check_box label="Cookies annehmen" name="cookies_enabled"/>
<text name="Logs:">
- Protokolle:
+ Chatprotokolle:
</text>
<check_box label="Protokolle von Gesprächen in der Nähe auf meinem Computer speichern" name="log_nearby_chat"/>
<check_box label="IM Protokolle auf meinem Computer speichern" name="log_instant_messages"/>
- <check_box label="Zeitstempel hinzufügen" name="show_timestamps_check_im"/>
+ <check_box label="Zeitstempel zu jeder Zeile im Chatprotokoll hinzufügen" name="show_timestamps_check_im"/>
+ <check_box label="Datumsstempel zu Protokolldateinamen hinzufügen" name="logfile_name_datestamp"/>
<text name="log_path_desc">
Protokolle speichern in:
</text>
<button label="Durchsuchen" label_selected="Durchsuchen" name="log_path_button"/>
<button label="Ignorierte Einwohner/Objekte" name="block_list" width="180"/>
+ <text name="block_list_label">
+ (Personen und/oder Objekte, die Sie blockiert haben)
+ </text>
</panel>
diff --git a/indra/newview/skins/default/xui/de/panel_preferences_setup.xml b/indra/newview/skins/default/xui/de/panel_preferences_setup.xml
index 140b1ce7a4..c4d095dde5 100644
--- a/indra/newview/skins/default/xui/de/panel_preferences_setup.xml
+++ b/indra/newview/skins/default/xui/de/panel_preferences_setup.xml
@@ -1,12 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel label="Hardware/Internet" name="Input panel">
- <text name="Mouselook:">
- Mouselook:
- </text>
- <text name=" Mouse Sensitivity">
- Mausempfindlichkeit:
- </text>
- <check_box label="Umkehren" name="invert_mouse"/>
<text name="Network:">
Netzwerk:
</text>
@@ -46,4 +39,5 @@
</text>
<line_editor name="web_proxy_editor" tool_tip="Name oder IP Adresse des Proxyservers, den Sie benutzen möchten"/>
<spinner label="Portnummer:" name="web_proxy_port"/>
+ <check_box initial_value="true" label="Updates für [APP_NAME] automatisch herunterladen und installieren" name="updater_service_active"/>
</panel>
diff --git a/indra/newview/skins/default/xui/de/panel_preferences_sound.xml b/indra/newview/skins/default/xui/de/panel_preferences_sound.xml
index 5c71b20fb0..26674ea594 100644
--- a/indra/newview/skins/default/xui/de/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/de/panel_preferences_sound.xml
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel label="Sounds" name="Preference Media panel">
+ <panel.string name="middle_mouse">
+ Mittlere Maustaste
+ </panel.string>
<slider label="Master-Lautstärke" name="System Volume"/>
<check_box initial_value="true" label="Stummschalten, wenn minimiert" name="mute_when_minimized"/>
<slider label="Schaltflächen" name="UI Volume"/>
@@ -23,6 +26,11 @@
<radio_item label="Kameraposition" name="0"/>
<radio_item label="Avatarposition" name="1"/>
</radio_group>
+ <check_box label="Avatarlippen beim Sprechen bewegen" name="enable_lip_sync"/>
+ <check_box label="Sprachfunktion beim Drücken folgender Taste(n) ein-/ausschalten:" name="push_to_talk_toggle_check" tool_tip="Wenn der Umschaltmodus aktiviert ist, drücken Sie die Auslöse-Taste EINMAL, um Ihr Mikrofon ein- oder auszuschalten. Wenn der Umschaltmodus nicht aktiviert ist, ist das Mikrofon nur dann eingeschaltet, wenn Sie die Auslösetaste gedrückt halten."/>
+ <line_editor label="Auslöser für Zum-Sprechen-drücken:" name="modifier_combo"/>
+ <button label="Taste festlegen" name="set_voice_hotkey_button"/>
+ <button name="set_voice_middlemouse_button" tool_tip="Auf mittlere Maustaste zurücksetzen"/>
<button label="Eingabe-/Ausgabegeräte" name="device_settings_btn"/>
<panel label="Geräte-Einstellungen" name="device_settings_panel">
<panel.string name="default_text">
diff --git a/indra/newview/skins/default/xui/de/panel_script_ed.xml b/indra/newview/skins/default/xui/de/panel_script_ed.xml
index 17970cf261..73789f06d8 100644
--- a/indra/newview/skins/default/xui/de/panel_script_ed.xml
+++ b/indra/newview/skins/default/xui/de/panel_script_ed.xml
@@ -15,11 +15,6 @@
<panel.string name="Title">
Skript: [NAME]
</panel.string>
- <text_editor name="Script Editor">
- Wird geladen...
- </text_editor>
- <button label="Speichern" label_selected="Speichern" name="Save_btn"/>
- <combo_box label="Einfügen..." name="Insert..."/>
<menu_bar name="script_menu">
<menu label="Datei" name="File">
<menu_item_call label="Speichern" name="Save"/>
@@ -40,4 +35,10 @@
<menu_item_call label="Schlüsselwort-Hilfe" name="Keyword Help..."/>
</menu>
</menu_bar>
+ <text_editor name="Script Editor">
+ Wird geladen...
+ </text_editor>
+ <combo_box label="Einfügen..." name="Insert..."/>
+ <button label="Speichern" label_selected="Speichern" name="Save_btn"/>
+ <button label="Bearbeiten..." name="Edit_btn"/>
</panel>
diff --git a/indra/newview/skins/default/xui/de/strings.xml b/indra/newview/skins/default/xui/de/strings.xml
index f890506a5d..e4676194aa 100644
--- a/indra/newview/skins/default/xui/de/strings.xml
+++ b/indra/newview/skins/default/xui/de/strings.xml
@@ -1773,11 +1773,8 @@
<string name="InvOfferGaveYou">
hat Ihnen folgendes übergeben
</string>
- <string name="InvOfferYouDecline">
- Sie lehnen folgendes ab:
- </string>
- <string name="InvOfferFrom">
- von
+ <string name="InvOfferDecline">
+ Sie lehnen [DESC] von &lt;nolink&gt;[NAME]&lt;/nolink&gt; ab.
</string>
<string name="GroupMoneyTotal">
Gesamtbetrag
diff --git a/indra/newview/skins/default/xui/en/floater_env_settings.xml b/indra/newview/skins/default/xui/en/floater_env_settings.xml
index 14f9e2db95..8df5e232d9 100644
--- a/indra/newview/skins/default/xui/en/floater_env_settings.xml
+++ b/indra/newview/skins/default/xui/en/floater_env_settings.xml
@@ -44,6 +44,7 @@
left="85"
name="EnvDayCycle"
top="30"
+ use_draw_context_alpha="false"
width="200" />
<slider
control_name="EnvTimeSlider"
diff --git a/indra/newview/skins/default/xui/en/floater_help_browser.xml b/indra/newview/skins/default/xui/en/floater_help_browser.xml
index 837923bcf6..02e50ee584 100644
--- a/indra/newview/skins/default/xui/en/floater_help_browser.xml
+++ b/indra/newview/skins/default/xui/en/floater_help_browser.xml
@@ -36,7 +36,8 @@
user_resize="false"
width="620">
<web_browser
- trusted_content="true"
+ trusted_content="true"
+ initial_mime_type="text/html"
bottom="-25"
follows="left|right|top|bottom"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/floater_media_browser.xml b/indra/newview/skins/default/xui/en/floater_media_browser.xml
index 49e835cce4..43729d7c9f 100644
--- a/indra/newview/skins/default/xui/en/floater_media_browser.xml
+++ b/indra/newview/skins/default/xui/en/floater_media_browser.xml
@@ -101,7 +101,7 @@
left_pad="5"
name="go"
top_delta="0"
- width="55">
+ width="50">
<button.commit_callback
function="MediaBrowser.Go" />
</button>
diff --git a/indra/newview/skins/default/xui/en/floater_web_content.xml b/indra/newview/skins/default/xui/en/floater_web_content.xml
new file mode 100644
index 0000000000..2ad46824c2
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_web_content.xml
@@ -0,0 +1,190 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater
+ legacy_header_height="18"
+ can_resize="true"
+ height="440"
+ layout="topleft"
+ min_height="140"
+ min_width="467"
+ name="floater_web_content"
+ help_topic="floater_web_content"
+ save_rect="true"
+ auto_tile="true"
+ title=""
+ initial_mime_type="text/html"
+ width="820">
+ <layout_stack
+ bottom="440"
+ follows="left|right|top|bottom"
+ layout="topleft"
+ left="5"
+ name="stack1"
+ orientation="vertical"
+ top="20"
+ width="810">
+ <layout_panel
+ auto_resize="false"
+ default_tab_group="1"
+ height="22"
+ layout="topleft"
+ left="0"
+ min_height="20"
+ name="nav_controls"
+ top="400"
+ user_resize="false"
+ width="800">
+ <button
+ image_overlay="Arrow_Left_Off"
+ image_disabled="PushButton_Disabled"
+ image_disabled_selected="PushButton_Disabled"
+ image_selected="PushButton_Selected"
+ image_unselected="PushButton_Off"
+ hover_glow_amount="0.15"
+ tool_tip="Navigate back"
+ follows="left|top"
+ height="22"
+ layout="topleft"
+ left="1"
+ name="back"
+ top="0"
+ width="22">
+ <button.commit_callback
+ function="WebContent.Back" />
+ </button>
+ <button
+ image_overlay="Arrow_Right_Off"
+ image_disabled="PushButton_Disabled"
+ image_disabled_selected="PushButton_Disabled"
+ image_selected="PushButton_Selected"
+ image_unselected="PushButton_Off"
+ tool_tip="Navigate forward"
+ follows="left|top"
+ height="22"
+ layout="topleft"
+ left="27"
+ name="forward"
+ top_delta="0"
+ width="22">
+ <button.commit_callback
+ function="WebContent.Forward" />
+ </button>
+ <button
+ image_overlay="Stop_Off"
+ image_disabled="PushButton_Disabled"
+ image_disabled_selected="PushButton_Disabled"
+ image_selected="PushButton_Selected"
+ image_unselected="PushButton_Off"
+ tool_tip="Stop navigation"
+ enabled="true"
+ follows="left|top"
+ height="22"
+ layout="topleft"
+ left="51"
+ name="stop"
+ top_delta="0"
+ width="22">
+ <button.commit_callback
+ function="WebContent.Stop" />
+ </button>
+ <button
+ image_overlay="Refresh_Off"
+ image_disabled="PushButton_Disabled"
+ image_disabled_selected="PushButton_Disabled"
+ image_selected="PushButton_Selected"
+ image_unselected="PushButton_Off"
+ tool_tip="Reload page"
+ follows="left|top"
+ height="22"
+ layout="topleft"
+ left="51"
+ name="reload"
+ top_delta="0"
+ width="22">
+ <button.commit_callback
+ function="WebContent.Reload" />
+ </button>
+ <combo_box
+ allow_text_entry="true"
+ follows="left|top|right"
+ tab_group="1"
+ height="22"
+ layout="topleft"
+ left_pad="4"
+ max_chars="1024"
+ name="address"
+ combo_editor.select_on_focus="true"
+ tool_tip="Enter URL here"
+ top_delta="0"
+ width="702">
+ <combo_box.commit_callback
+ function="WebContent.EnterAddress" />
+ </combo_box>
+ <icon
+ name="media_secure_lock_flag"
+ height="16"
+ follows="top|right"
+ image_name="Lock2"
+ layout="topleft"
+ left_delta="656"
+ top_delta="2"
+ visible="false"
+ tool_tip="Secured Browsing"
+ width="16" />
+ <button
+ image_overlay="ExternalBrowser_Off"
+ image_disabled="PushButton_Disabled"
+ image_disabled_selected="PushButton_Disabled"
+ image_selected="PushButton_Selected"
+ image_unselected="PushButton_Off"
+ tool_tip="Open current URL in your desktop browser"
+ follows="right|top"
+ enabled="true"
+ height="22"
+ layout="topleft"
+ name="popexternal"
+ right="800"
+ top_delta="-2"
+ width="22">
+ <button.commit_callback
+ function="WebContent.PopExternal" />
+ </button>
+ </layout_panel>
+ <layout_panel
+ height="40"
+ layout="topleft"
+ left_delta="0"
+ name="external_controls"
+ top_delta="0"
+ user_resize="false"
+ width="540">
+ <web_browser
+ bottom="-22"
+ follows="all"
+ layout="topleft"
+ left="0"
+ name="webbrowser"
+ top="0"/>
+ <text
+ type="string"
+ length="100"
+ follows="bottom|left"
+ height="20"
+ layout="topleft"
+ left_delta="0"
+ name="statusbartext"
+ parse_urls="false"
+ text_color="0.4 0.4 0.4 1"
+ top_pad="5"
+ width="452"/>
+ <progress_bar
+ color_bar="0.3 1.0 0.3 1"
+ follows="bottom|right"
+ height="16"
+ top_delta="-1"
+ left_pad="24"
+ layout="topleft"
+ name="statusbarprogress"
+ width="64"/>
+ </layout_panel>
+ </layout_stack>
+</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_windlight_options.xml b/indra/newview/skins/default/xui/en/floater_windlight_options.xml
index 85a5be369c..249ad95c41 100644
--- a/indra/newview/skins/default/xui/en/floater_windlight_options.xml
+++ b/indra/newview/skins/default/xui/en/floater_windlight_options.xml
@@ -594,6 +594,7 @@
left_delta="14"
top_pad="10"
name="SkyDayCycle"
+ use_draw_context_alpha="false"
width="148" />
<slider
control_name="WLSunAngle"
diff --git a/indra/newview/skins/default/xui/en/inspect_object.xml b/indra/newview/skins/default/xui/en/inspect_object.xml
index eb2e7ea788..8d14c974b4 100644
--- a/indra/newview/skins/default/xui/en/inspect_object.xml
+++ b/indra/newview/skins/default/xui/en/inspect_object.xml
@@ -76,13 +76,24 @@ L$30,000
</text>
<!-- Overlapping buttons for all default actions. Show "Buy" if
for sale, "Sit" if can sit, etc. -->
+ <icon
+ name="secure_browsing"
+ image_name="Lock"
+ left="0"
+ visible="false"
+ width="18"
+ height="18"
+ top="103"
+ tool_tip="Secure Browsing"
+ follows="left|top" />
<text
follows="all"
font="SansSerifSmall"
height="13"
name="object_media_url"
- width="220"
- top_pad="0"
+ width="207"
+ left_pad="2"
+ top_delta="0"
max_length = "50"
use_ellipses="true">
http://www.superdupertest.com
@@ -135,16 +146,6 @@ L$30,000
name="open_btn"
top_delta="0"
width="80" />
- <icon
- name="secure_browsing"
- image_name="Lock"
- left_delta="80"
- visible="false"
- width="18"
- height="18"
- top_delta="0"
- tool_tip="Secure Browsing"
- follows="left|top" />
<!-- non-overlapping buttons here -->
<button
@@ -153,7 +154,7 @@ L$30,000
label="More"
layout="topleft"
name="more_info_btn"
- left_delta="10"
+ left_pad="10"
top_delta="0"
tab_stop="false"
width="80" />
diff --git a/indra/newview/skins/default/xui/en/main_view.xml b/indra/newview/skins/default/xui/en/main_view.xml
index 520a604bde..d9991fcae9 100644
--- a/indra/newview/skins/default/xui/en/main_view.xml
+++ b/indra/newview/skins/default/xui/en/main_view.xml
@@ -8,6 +8,12 @@
tab_stop="false"
name="main_view"
width="1024">
+ <panel top="0"
+ follows="all"
+ height="768"
+ mouse_opaque="false"
+ name="login_panel_holder"
+ width="1024"/>
<layout_stack border_size="0"
follows="all"
mouse_opaque="false"
@@ -120,7 +126,7 @@
user_resize="false"
visible="false"
width="333"/>
- </layout_stack>
+ </layout_stack>
<panel follows="all"
height="500"
left="0"
diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml
index 4f982cc8e9..0d4a095e14 100644
--- a/indra/newview/skins/default/xui/en/menu_login.xml
+++ b/indra/newview/skins/default/xui/en/menu_login.xml
@@ -176,13 +176,19 @@
parameter="message_critical" />
</menu_item_call>
<menu_item_call
- label="Web Browser Test"
+ label="Media Browser Test"
name="Web Browser Test">
<menu_item_call.on_click
function="Advanced.WebBrowserTest"
parameter="http://join.secondlife.com/"/>
</menu_item_call>
- <menu_item_separator/>
+ <menu_item_call
+ label="Web Content Floater Test"
+ name="Web Content Floater Test">
+ <menu_item_call.on_click
+ function="Advanced.WebContentTest"
+ parameter="http://www.google.com"/>
+ </menu_item_call>
<menu_item_check
label="Show Grid Picker"
name="Show Grid Picker"
diff --git a/indra/newview/skins/default/xui/en/menu_mini_map.xml b/indra/newview/skins/default/xui/en/menu_mini_map.xml
index 8fe89d3934..ea263d05ce 100644
--- a/indra/newview/skins/default/xui/en/menu_mini_map.xml
+++ b/indra/newview/skins/default/xui/en/menu_mini_map.xml
@@ -8,7 +8,7 @@
top="724"
visible="false"
width="128">
- <menu_item_call
+ <menu_item_call
label="Zoom Close"
name="Zoom Close">
<menu_item_call.on_click
@@ -29,7 +29,14 @@
function="Minimap.Zoom"
parameter="far" />
</menu_item_call>
- <menu_item_separator />
+ <menu_item_call
+ label="Zoom Default"
+ name="Zoom Default">
+ <menu_item_call.on_click
+ function="Minimap.Zoom"
+ parameter="default" />
+ </menu_item_call>
+ <menu_item_separator />
<menu_item_check
label="Rotate Map"
name="Rotate Map">
diff --git a/indra/newview/skins/default/xui/en/menu_place.xml b/indra/newview/skins/default/xui/en/menu_place.xml
index 1b96eb51f0..288811d2f6 100644
--- a/indra/newview/skins/default/xui/en/menu_place.xml
+++ b/indra/newview/skins/default/xui/en/menu_place.xml
@@ -24,26 +24,4 @@
function="Places.OverflowMenu.Enable"
parameter="can_create_pick" />
</menu_item_call>
- <menu_item_separator
- layout="topleft"/>
- <menu_item_call
- enabled="false"
- label="Buy Pass"
- layout="topleft"
- name="pass">
- <menu_item_call.on_click
- function="Places.OverflowMenu.Action"
- parameter="pass" />
- </menu_item_call>
- <menu_item_separator
- layout="topleft"/>
- <menu_item_call
- enabled="false"
- label="Edit"
- layout="topleft"
- name="edit">
- <menu_item_call.on_click
- function="Places.OverflowMenu.Action"
- parameter="edit" />
- </menu_item_call>
</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 907f68dc06..d997a262a8 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -976,6 +976,29 @@
parameter="perm_prefs" />
</menu_item_call>
</menu>
+ <menu_item_separator/>
+ <menu_item_call
+ enabled="false"
+ label="Undo"
+ name="Undo"
+ shortcut="control|Z">
+ <on_click
+ function="Edit.Undo"
+ userdata="" />
+ <on_enable
+ function="Edit.EnableUndo" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Redo"
+ name="Redo"
+ shortcut="control|Y">
+ <on_click
+ function="Edit.Redo"
+ userdata="" />
+ <on_enable
+ function="Edit.EnableRedo" />
+ </menu_item_call>
</menu>
<menu
create_jump_keys="true"
@@ -2623,13 +2646,21 @@
parameter="BottomPanelNew" />
</menu_item_check>-->
<menu_item_call
- label="Web Browser Test"
+ label="Media Browser Test"
name="Web Browser Test">
<menu_item_call.on_click
function="Advanced.WebBrowserTest"
parameter="http://secondlife.com/app/search/slurls.html"/>
</menu_item_call>
- <menu_item_call
+ <menu_item_call
+ label="Web Content Browser"
+ name="Web Content Browser"
+ shortcut="control|alt|W">
+ <menu_item_call.on_click
+ function="Advanced.WebContentTest"
+ parameter="http://google.com"/>
+ </menu_item_call>
+ <menu_item_call
label="Dump SelectMgr"
name="Dump SelectMgr">
<menu_item_call.on_click
diff --git a/indra/newview/skins/default/xui/en/notification_visibility.xml b/indra/newview/skins/default/xui/en/notification_visibility.xml
new file mode 100644
index 0000000000..db292100d7
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/notification_visibility.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" ?>
+<notification_visibility>
+ <hide tag="custom_skin"/>
+ <show/>
+</notification_visibility>
+
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 34ccecce09..3df53ac442 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -451,6 +451,7 @@ Please invite members within 48 hours.
icon="alertmodal.tga"
name="LandBuyPass"
type="alertmodal">
+ <tag>fail</tag>
For L$[COST] you can enter this land (&apos;[PARCEL_NAME]&apos;) for [TIME] hours. Buy a pass?
<usetemplate
name="okcancelbuttons"
@@ -1614,6 +1615,7 @@ If you continue to get this message, please check the [SUPPORT_SITE].
icon="alertmodal.tga"
name="blocked_tport"
type="alertmodal">
+ <tag>fail</tag>
Sorry, teleport is currently blocked. Try again in a moment. If you still cannot teleport, please log out and log back in to resolve the problem.
</notification>
<notification
@@ -1626,42 +1628,49 @@ Sorry, but system was unable to locate landmark destination.
icon="alertmodal.tga"
name="timeout_tport"
type="alertmodal">
+ <tag>fail</tag>
Sorry, but system was unable to complete the teleport connection. Try again in a moment.
</notification>
<notification
icon="alertmodal.tga"
name="noaccess_tport"
type="alertmodal">
+ <tag>fail</tag>
Sorry, you do not have access to that teleport destination.
</notification>
<notification
icon="alertmodal.tga"
name="missing_attach_tport"
type="alertmodal">
+ <tag>fail</tag>
Your attachments have not arrived yet. Try waiting for a few more seconds or log out and back in again before attempting to teleport.
</notification>
<notification
icon="alertmodal.tga"
name="too_many_uploads_tport"
type="alertmodal">
+ <tag>fail</tag>
The asset queue in this region is currently clogged so your teleport request will not be able to succeed in a timely manner. Please try again in a few minutes or go to a less busy area.
</notification>
<notification
icon="alertmodal.tga"
name="expired_tport"
type="alertmodal">
+ <tag>fail</tag>
Sorry, but the system was unable to complete your teleport request in a timely fashion. Please try again in a few minutes.
</notification>
<notification
icon="alertmodal.tga"
name="expired_region_handoff"
type="alertmodal">
+ <tag>fail</tag>
Sorry, but the system was unable to complete your region crossing in a timely fashion. Please try again in a few minutes.
</notification>
<notification
icon="alertmodal.tga"
name="no_host"
type="alertmodal">
+ <tag>fail</tag>
Unable to find teleport destination. The destination may be temporarily unavailable or no longer exists. Please try again in a few minutes.
</notification>
<notification
@@ -2080,7 +2089,7 @@ Would you be my friend?
<button
default="true"
index="0"
- name="Offer"
+ name="OK"
text="OK"/>
<button
index="1"
@@ -2102,7 +2111,7 @@ Would you be my friend?
<button
default="true"
index="0"
- name="Offer"
+ name="OK"
text="OK"/>
<button
index="1"
@@ -2125,7 +2134,7 @@ Would you be my friend?
<button
default="true"
index="0"
- name="Offer"
+ name="OK"
text="OK"/>
<button
index="1"
@@ -2429,6 +2438,7 @@ Display settings have been set to recommended levels based on your system config
icon="alertmodal.tga"
name="AvatarMovedDesired"
type="alertmodal">
+ <tag>fail</tag>
Your desired location is not currently available.
You have been moved into a nearby region.
</notification>
@@ -2437,6 +2447,7 @@ You have been moved into a nearby region.
icon="alertmodal.tga"
name="AvatarMovedLast"
type="alertmodal">
+ <tag>fail</tag>
Your last location is not currently available.
You have been moved into a nearby region.
</notification>
@@ -2445,6 +2456,7 @@ You have been moved into a nearby region.
icon="alertmodal.tga"
name="AvatarMovedHome"
type="alertmodal">
+ <tag>fail</tag>
Your home location is not currently available.
You have been moved into a nearby region.
You may want to set a new home location.
@@ -2454,6 +2466,7 @@ You may want to set a new home location.
icon="alertmodal.tga"
name="ClothingLoading"
type="alertmodal">
+ <tag>fail</tag>
Your clothing is still downloading.
You can use [SECOND_LIFE] normally and other people will see you correctly.
<form name="form">
@@ -2481,6 +2494,7 @@ Return to [http://join.secondlife.com secondlife.com] to create a new account?
icon="alertmodal.tga"
name="LoginPacketNeverReceived"
type="alertmodal">
+ <tag>fail</tag>
We&apos;re having trouble connecting. There may be a problem with your Internet connection or the [SECOND_LIFE_GRID].
You can either check your Internet connection and try again in a few minutes, click Help to view the [SUPPORT_SITE], or click Teleport to attempt to teleport home.
@@ -2897,12 +2911,80 @@ http://secondlife.com/download.
name="okbutton"
yestext="OK"/>
</notification>
+
<notification
- icon="notifytip.tga"
- name="DownloadBackground"
- type="notifytip">
-An updated version of [APP_NAME] has been downloaded.
-It will be applied the next time you restart [APP_NAME]
+ icon="alertmodal.tga"
+ name="FailedRequiredUpdateInstall"
+ type="alertmodal">
+We were unable to install a required update.
+You will be unable to log in until [APP_NAME] has been updated.
+
+Please download and install the latest viewer from
+http://secondlife.com/download.
+ <usetemplate
+ name="okbutton"
+ yestext="Quit"/>
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="UpdaterServiceNotRunning"
+ type="alertmodal">
+There is a required update for your Second Life Installation.
+
+You may download this update from http://www.secondlife.com/downloads
+or you can install it now.
+ <usetemplate
+ name="okcancelbuttons"
+ notext="Quit Second Life"
+ yestext="Download and install now"/>
+ </notification>
+
+ <notification
+ icon="notify.tga"
+ name="DownloadBackgroundTip"
+ type="notify">
+We have downloaded an update to your [APP_NAME] installation.
+Version [VERSION] [[RELEASE_NOTES_FULL_URL] Information about this update]
+ <usetemplate
+ name="okcancelbuttons"
+ notext="Later..."
+ yestext="Install now and restart [APP_NAME]"/>
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="DownloadBackgroundDialog"
+ type="alertmodal">
+We have downloaded an update to your [APP_NAME] installation.
+Version [VERSION] [[RELEASE_NOTES_FULL_URL] Information about this update]
+ <usetemplate
+ name="okcancelbuttons"
+ notext="Later..."
+ yestext="Install now and restart [APP_NAME]"/>
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="RequiredUpdateDownloadedVerboseDialog"
+ type="alertmodal">
+We have downloaded a required software update.
+Version [VERSION]
+
+We must restart [APP_NAME] to install the update.
+ <usetemplate
+ name="okbutton"
+ yestext="OK"/>
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="RequiredUpdateDownloadedDialog"
+ type="alertmodal">
+We must restart [APP_NAME] to install the update.
+ <usetemplate
+ name="okbutton"
+ yestext="OK"/>
</notification>
<notification
@@ -3148,6 +3230,7 @@ You have reached your maximum number of groups. Please leave some group before j
icon="alert.tga"
name="KickUser"
type="alert">
+ <tag>win</tag>
Kick this Resident with what message?
<form name="form">
<input name="message" type="text">
@@ -3169,6 +3252,7 @@ An administrator has logged you off.
icon="alert.tga"
name="KickAllUsers"
type="alert">
+ <tag>win</tag>
Kick everyone currently on the grid with what message?
<form name="form">
<input name="message" type="text">
@@ -3190,6 +3274,7 @@ An administrator has logged you off.
icon="alert.tga"
name="FreezeUser"
type="alert">
+ <tag>win</tag>
Freeze this Resident with what message?
<form name="form">
<input name="message" type="text">
@@ -3211,6 +3296,7 @@ You have been frozen. You cannot move or chat. An administrator will contact you
icon="alert.tga"
name="UnFreezeUser"
type="alert">
+ <tag>win</tag>
Unfreeze this Resident with what message?
<form name="form">
<input name="message" type="text">
@@ -3582,6 +3668,7 @@ Are you sure you want to change the Estate Covenant?
icon="alertmodal.tga"
name="RegionEntryAccessBlocked"
type="alertmodal">
+ <tag>fail</tag>
You are not allowed in that Region due to your maturity Rating. This may be a result of a lack of information validating your age.
Please verify you have the latest Viewer installed, and go to the Knowledge Base for details on accessing areas with this maturity rating.
@@ -3594,6 +3681,7 @@ Please verify you have the latest Viewer installed, and go to the Knowledge Base
icon="alertmodal.tga"
name="RegionEntryAccessBlocked_KB"
type="alertmodal">
+ <tag>fail</tag>
You are not allowed in that region due to your maturity Rating.
Go to the Knowledge Base for more information about maturity Ratings?
@@ -3611,6 +3699,7 @@ Go to the Knowledge Base for more information about maturity Ratings?
icon="notifytip.tga"
name="RegionEntryAccessBlocked_Notify"
type="notifytip">
+ <tag>fail</tag>
You are not allowed in that region due to your maturity Rating.
</notification>
@@ -3618,6 +3707,7 @@ You are not allowed in that region due to your maturity Rating.
icon="alertmodal.tga"
name="RegionEntryAccessBlocked_Change"
type="alertmodal">
+ <tag>fail</tag>
You are not allowed in that Region due to your maturity Rating preference.
To enter the desired region, please change your maturity Rating preference. This will allow you to search for and access [REGIONMATURITY] content. To undo any changes, go to Me &gt; Preferences &gt; General.
@@ -4534,6 +4624,7 @@ Would you like to automatically wear the clothing you are about to create?
icon="alertmodal.tga"
name="NotAgeVerified"
type="alertmodal">
+ <tag>fail</tag>
You must be age-verified to visit this area. Do you want to go to the [SECOND_LIFE] website and verify your age?
[_URL]
@@ -4917,24 +5008,6 @@ Please select at least one type of content to search (General, Moderate, or Adul
<notification
icon="notify.tga"
- name="GroupVote"
- type="notify">
-[NAME] has proposed to vote on:
-[MESSAGE]
- <form name="form">
- <button
- index="0"
- name="VoteNow"
- text="Vote Now"/>
- <button
- index="1"
- name="Later"
- text="Later"/>
- </form>
- </notification>
-
- <notification
- icon="notify.tga"
name="SystemMessage"
persist="true"
type="notify">
@@ -5019,7 +5092,7 @@ If you want to view streaming media on parcels that support it you should go to
type="notify">
No Media Plugin was found to handle the "[MIME_TYPE]" mime type. Media of this type will be unavailable.
<unique>
- <context key="[MIME_TYPE]"/>
+ <context>MIME_TYPE</context>
</unique>
</notification>
@@ -5103,6 +5176,7 @@ You can be hurt here. If you die, you will be teleported to your home location.
persist="true"
type="notify"
unique="true">
+ <tag>fail</tag>
This area has flying disabled.
You can&apos;t fly here.
</notification>
@@ -5155,6 +5229,7 @@ This region is not running any scripts.
name="NoOutsideScripts"
persist="true"
type="notify">
+ <tag>fail</tag>
This land has outside scripts disabled.
No scripts will work here except those belonging to the land owner.
@@ -5173,6 +5248,7 @@ You can only claim public land in the Region you&apos;re in.
name="RegionTPAccessBlocked"
persist="true"
type="notify">
+ <tag>fail</tag>
You aren&apos;t allowed in that Region due to your maturity Rating. You may need to validate your age and/or install the latest Viewer.
Please go to the Knowledge Base for details on accessing areas with this maturity Rating.
@@ -5183,6 +5259,7 @@ Please go to the Knowledge Base for details on accessing areas with this maturit
name="URBannedFromRegion"
persist="true"
type="notify">
+ <tag>fail</tag>
You are banned from the region.
</notification>
@@ -5191,6 +5268,7 @@ You are banned from the region.
name="NoTeenGridAccess"
persist="true"
type="notify">
+ <tag>fail</tag>
Your account cannot connect to this teen grid region.
</notification>
@@ -5199,6 +5277,7 @@ Your account cannot connect to this teen grid region.
name="ImproperPaymentStatus"
persist="true"
type="notify">
+ <tag>fail</tag>
You do not have proper payment status to enter this region.
</notification>
@@ -5207,6 +5286,7 @@ You do not have proper payment status to enter this region.
name="MustGetAgeRgion"
persist="true"
type="notify">
+ <tag>fail</tag>
You must be age-verified to enter this region.
</notification>
@@ -5215,6 +5295,7 @@ You must be age-verified to enter this region.
name="MustGetAgeParcel"
persist="true"
type="notify">
+ <tag>fail</tag>
You must be age-verified to enter this parcel.
</notification>
@@ -5223,6 +5304,7 @@ You must be age-verified to enter this parcel.
name="NoDestRegion"
persist="true"
type="notify">
+ <tag>fail</tag>
No destination region found.
</notification>
@@ -5231,6 +5313,7 @@ No destination region found.
name="NotAllowedInDest"
persist="true"
type="notify">
+ <tag>fail</tag>
You are not allowed into the destination.
</notification>
@@ -5239,6 +5322,7 @@ You are not allowed into the destination.
name="RegionParcelBan"
persist="true"
type="notify">
+ <tag>fail</tag>
Cannot region cross into banned parcel. Try another way.
</notification>
@@ -5247,6 +5331,7 @@ Cannot region cross into banned parcel. Try another way.
name="TelehubRedirect"
persist="true"
type="notify">
+ <tag>fail</tag>
You have been redirected to a telehub.
</notification>
@@ -5255,6 +5340,7 @@ You have been redirected to a telehub.
name="CouldntTPCloser"
persist="true"
type="notify">
+ <tag>fail</tag>
Could not teleport closer to destination.
</notification>
@@ -5271,6 +5357,7 @@ Teleport cancelled.
name="FullRegionTryAgain"
persist="true"
type="notify">
+ <tag>fail</tag>
The region you are attempting to enter is currently full.
Please try again in a few moments.
</notification>
@@ -5280,6 +5367,7 @@ Please try again in a few moments.
name="GeneralFailure"
persist="true"
type="notify">
+ <tag>fail</tag>
General failure.
</notification>
@@ -5288,6 +5376,7 @@ General failure.
name="RoutedWrongRegion"
persist="true"
type="notify">
+ <tag>fail</tag>
Routed to wrong region. Please try again.
</notification>
@@ -5296,6 +5385,7 @@ Routed to wrong region. Please try again.
name="NoValidAgentID"
persist="true"
type="notify">
+ <tag>fail</tag>
No valid agent id.
</notification>
@@ -5304,6 +5394,7 @@ No valid agent id.
name="NoValidSession"
persist="true"
type="notify">
+ <tag>fail</tag>
No valid session id.
</notification>
@@ -5312,6 +5403,7 @@ No valid session id.
name="NoValidCircuit"
persist="true"
type="notify">
+ <tag>fail</tag>
No valid circuit code.
</notification>
@@ -5320,6 +5412,7 @@ No valid circuit code.
name="NoValidTimestamp"
persist="true"
type="notify">
+ <tag>fail</tag>
No valid timestamp.
</notification>
@@ -5328,6 +5421,7 @@ No valid timestamp.
name="NoPendingConnection"
persist="true"
type="notify">
+ <tag>fail</tag>
Unable to create pending connection.
</notification>
@@ -5336,6 +5430,7 @@ Unable to create pending connection.
name="InternalUsherError"
persist="true"
type="notify">
+ <tag>fail</tag>
Internal error attempting to connect agent usher.
</notification>
@@ -5344,6 +5439,7 @@ Internal error attempting to connect agent usher.
name="NoGoodTPDestination"
persist="true"
type="notify">
+ <tag>fail</tag>
Unable to find a good teleport destination in this region.
</notification>
@@ -5352,6 +5448,7 @@ Unable to find a good teleport destination in this region.
name="InternalErrorRegionResolver"
persist="true"
type="notify">
+ <tag>fail</tag>
Internal error attempting to activate region resolver.
</notification>
@@ -5360,6 +5457,7 @@ Internal error attempting to activate region resolver.
name="NoValidLanding"
persist="true"
type="notify">
+ <tag>fail</tag>
A valid landing point could not be found.
</notification>
@@ -5368,6 +5466,7 @@ A valid landing point could not be found.
name="NoValidParcel"
persist="true"
type="notify">
+ <tag>fail</tag>
No valid parcel could be found.
</notification>
@@ -5744,6 +5843,7 @@ Grant this request?
name="FirstBalanceIncrease"
persist="true"
type="notify">
+ <tag>win</tag>
You just received L$[AMOUNT].
Your L$ balance is shown in the upper-right.
</notification>
@@ -5921,7 +6021,7 @@ You may only select up to [MAX_SELECT] items from this list.
[NAME] is inviting you to a Voice Chat call.
Click Accept to join the call or Decline to decline the invitation. Click Block to block this caller.
<unique>
- <context key="NAME"/>
+ <context>NAME</context>
</unique>
<form name="form">
<button
@@ -5970,8 +6070,8 @@ Click Accept to join the call or Decline to decline the invitation. Click Block
[NAME] has joined a Voice Chat call with the group [GROUP].
Click Accept to join the call or Decline to decline the invitation. Click Block to block this caller.
<unique>
- <context key="NAME"/>
- <context key="GROUP"/>
+ <context>NAME</context>
+ <context>GROUP</context>
</unique>
<form name="form">
<button
@@ -5996,7 +6096,7 @@ Click Accept to join the call or Decline to decline the invitation. Click Block
[NAME] has joined a voice chat call with a conference chat.
Click Accept to join the call or Decline to decline the invitation. Click Block to block this caller.
<unique>
- <context key="NAME"/>
+ <context>NAME</context>
</unique>
<form name="form">
<button
@@ -6021,7 +6121,7 @@ Click Accept to join the call or Decline to decline the invitation. Click Block
[NAME] is inviting you to a conference chat.
Click Accept to join the chat or Decline to decline the invitation. Click Block to block this caller.
<unique>
- <context key="NAME"/>
+ <context>NAME</context>
</unique>
<form name="form">
<button
@@ -6045,7 +6145,7 @@ Click Accept to join the chat or Decline to decline the invitation. Click Block
type="notifytip">
The voice call you are trying to join, [VOICE_CHANNEL_NAME], has reached maximum capacity. Please try again later.
<unique>
- <context key="VOICE_CHANNEL_NAME"/>
+ <context>VOICE_CHANNEL_NAME</context>
</unique>
</notification>
@@ -6063,7 +6163,7 @@ We&apos;re sorry. This area has reached maximum capacity for voice conversation
type="notifytip">
You have been disconnected from [VOICE_CHANNEL_NAME]. You will now be reconnected to Nearby Voice Chat.
<unique>
- <context key="VOICE_CHANNEL_NAME"/>
+ <context>VOICE_CHANNEL_NAME</context>
</unique>
</notification>
@@ -6073,7 +6173,7 @@ You have been disconnected from [VOICE_CHANNEL_NAME]. You will now be reconnect
type="notifytip">
[VOICE_CHANNEL_NAME] has ended the call. You will now be reconnected to Nearby Voice Chat.
<unique>
- <context key="VOICE_CHANNEL_NAME"/>
+ <context>VOICE_CHANNEL_NAME</context>
</unique>
</notification>
@@ -6083,7 +6183,7 @@ You have been disconnected from [VOICE_CHANNEL_NAME]. You will now be reconnect
type="notifytip">
[VOICE_CHANNEL_NAME] has declined your call. You will now be reconnected to Nearby Voice Chat.
<unique>
- <context key="VOICE_CHANNEL_NAME"/>
+ <context>VOICE_CHANNEL_NAME</context>
</unique>
</notification>
@@ -6093,7 +6193,7 @@ You have been disconnected from [VOICE_CHANNEL_NAME]. You will now be reconnect
type="notifytip">
[VOICE_CHANNEL_NAME] is not available to take your call. You will now be reconnected to Nearby Voice Chat.
<unique>
- <context key="VOICE_CHANNEL_NAME"/>
+ <context>VOICE_CHANNEL_NAME</context>
</unique>
</notification>
@@ -6103,7 +6203,7 @@ You have been disconnected from [VOICE_CHANNEL_NAME]. You will now be reconnect
type="notifytip">
Failed to connect to [VOICE_CHANNEL_NAME], please try again later. You will now be reconnected to Nearby Voice Chat.
<unique>
- <context key="VOICE_CHANNEL_NAME"/>
+ <context>VOICE_CHANNEL_NAME</context>
</unique>
</notification>
@@ -6163,6 +6263,7 @@ New Voice Morphs are available!
icon="notifytip.tga"
name="Cannot enter parcel: not a group member"
type="notifytip">
+ <tag>fail</tag>
Only members of a certain group can visit this area.
</notification>
@@ -6170,6 +6271,7 @@ Only members of a certain group can visit this area.
icon="notifytip.tga"
name="Cannot enter parcel: banned"
type="notifytip">
+ <tag>fail</tag>
Cannot enter parcel, you have been banned.
</notification>
@@ -6177,6 +6279,7 @@ Cannot enter parcel, you have been banned.
icon="notifytip.tga"
name="Cannot enter parcel: not on access list"
type="notifytip">
+ <tag>fail</tag>
Cannot enter parcel, you are not on the access list.
</notification>
@@ -6186,7 +6289,7 @@ Cannot enter parcel, you are not on the access list.
type="notifytip">
You do not have permission to connect to voice chat for [VOICE_CHANNEL_NAME].
<unique>
- <context key="VOICE_CHANNEL_NAME"/>
+ <context>VOICE_CHANNEL_NAME</context>
</unique>
</notification>
@@ -6196,7 +6299,7 @@ You do not have permission to connect to voice chat for [VOICE_CHANNEL_NAME].
type="notifytip">
An error has occurred while trying to connect to voice chat for [VOICE_CHANNEL_NAME]. Please try again later.
<unique>
- <context key="VOICE_CHANNEL_NAME"/>
+ <context>VOICE_CHANNEL_NAME</context>
</unique>
</notification>
@@ -6222,6 +6325,7 @@ The SLurl you clicked on is not supported.
name="BlockedSLURL"
priority="high"
type="notifytip">
+ <tag>win</tag>
A SLurl was received from an untrusted browser and has been blocked for your security.
</notification>
@@ -6421,13 +6525,9 @@ Avatar '[NAME]' left appearance mode.
type="alertmodal">
We're having trouble connecting using [PROTOCOL] [HOSTID].
Please check your network and firewall setup.
- <form name="form">
- <button
- default="true"
- index="0"
- name="OK"
- text="OK"/>
- </form>
+ <usetemplate
+ name="okbutton"
+ yestext="OK"/>
</notification>
<notification
@@ -6440,13 +6540,9 @@ We're having trouble connecting to your voice server:
Voice communications will not be available.
Please check your network and firewall setup.
- <form name="form">
- <button
- default="true"
- index="0"
- name="OK"
- text="OK"/>
- </form>
+ <usetemplate
+ name="okbutton"
+ yestext="OK"/>
</notification>
<notification
@@ -6528,6 +6624,14 @@ Mute everyone?
</notification>
<notification
+ name="HintAvatarPicker"
+ label="Change your Look"
+ type="hint"
+ unique="true">
+ Would you like to try a new look? Click the button below to see more Avatars.
+ </notification>
+
+ <notification
name="HintSidePanel"
label="Side Panel"
type="hint"
@@ -6552,6 +6656,24 @@ Mute everyone?
</notification>
<notification
+ name="HintMoveArrows"
+ label="Move"
+ type="hint"
+ unique="true">
+ To walk, use the directional keys on your keyboard. You can run by pressing the Up arrow twice.
+ <tag>custom_skin</tag>
+ </notification>
+
+ <notification
+ name="HintView"
+ label="View"
+ type="hint"
+ unique="true">
+ To change your camera view, use the Orbit and Pan controls. Reset your view by pressing Escape or walking.
+ <tag>custom_skin</tag>
+ </notification>
+
+ <notification
name="HintInventory"
label="Inventory"
type="hint"
@@ -6584,6 +6706,23 @@ Mute everyone?
</form>
</notification>
+ <notification
+ name="AuthRequest"
+ type="browser">
+The site at &apos;&lt;nolink&gt;[HOST_NAME]&lt;/nolink&gt;&apos; in realm &apos;[REALM]&apos; requires a user name and password.
+ <form name="form">
+ <input name="username" type="text" text="User Name"/>
+ <input name="password" type="password" text="Password "/>
+ <button default="true"
+ index="0"
+ name="ok"
+ text="Submit"/>
+ <button index="1"
+ name="cancel"
+ text="Cancel"/>
+ </form>
+ </notification>
+
<global name="UnsupportedCPU">
- Your CPU speed does not meet the minimum requirements.
diff --git a/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml b/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml
index 4b21ffa1f9..e40dc430fc 100644
--- a/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml
@@ -134,7 +134,7 @@
<button
follows="right"
height="20"
- image_overlay="ForwardArrow_Off"
+ image_overlay="Web_Profile_Off"
layout="topleft"
left_pad="5"
right="-28"
diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
index 63068a069f..013a8090f7 100644
--- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml
+++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
@@ -5,6 +5,7 @@
bg_opaque_color="DkGray"
chrome="true"
follows="left|bottom|right"
+ focus_root="true"
height="33"
layout="topleft"
left="0"
diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray_lite.xml b/indra/newview/skins/default/xui/en/panel_bottomtray_lite.xml
index efb1da4c05..b5e1a5f16d 100644
--- a/indra/newview/skins/default/xui/en/panel_bottomtray_lite.xml
+++ b/indra/newview/skins/default/xui/en/panel_bottomtray_lite.xml
@@ -10,6 +10,7 @@
layout="topleft"
left="0"
name="bottom_tray_lite"
+ focus_root="true"
tab_stop="true"
top="28"
chrome="true"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_profile.xml b/indra/newview/skins/default/xui/en/panel_edit_profile.xml
index 90dbddaff7..37265d65f1 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_profile.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_profile.xml
@@ -328,17 +328,6 @@
name="homepage_edit"
width="272">
</line_editor>
- <check_box
- follows="left|top"
- font="SansSerifSmall"
- label="Show me in Search results"
- layout="topleft"
- left="8"
- name="show_in_search_checkbox"
- height="15"
- label_text.text_color="white"
- top_pad="12"
- width="100" />
<text
follows="left|top"
font="SansSerifSmall"
diff --git a/indra/newview/skins/default/xui/en/panel_group_invite.xml b/indra/newview/skins/default/xui/en/panel_group_invite.xml
index 15a3191bdf..cd834b61ce 100644
--- a/indra/newview/skins/default/xui/en/panel_group_invite.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_invite.xml
@@ -94,7 +94,7 @@
left_pad="2"
name="cancel_button"
top_delta="0"
- width="70" />
+ width="65" />
<string
name="GroupInvitation">
Group Invitation
diff --git a/indra/newview/skins/default/xui/en/panel_group_land_money.xml b/indra/newview/skins/default/xui/en/panel_group_land_money.xml
index 1270a21710..61d6cbb2d0 100644
--- a/indra/newview/skins/default/xui/en/panel_group_land_money.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_land_money.xml
@@ -117,7 +117,7 @@
name="map_button"
top_delta="-4"
left_pad="0"
- width="60"
+ width="57"
enabled="false" />
<text
type="string"
diff --git a/indra/newview/skins/default/xui/en/panel_group_list_item.xml b/indra/newview/skins/default/xui/en/panel_group_list_item.xml
index 0b84ac03c5..12735026fa 100644
--- a/indra/newview/skins/default/xui/en/panel_group_list_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_list_item.xml
@@ -34,6 +34,7 @@
mouse_opaque="true"
left="5"
top="2"
+ use_draw_context_alpha="false"
width="20" />
<text
parse_urls="false"
@@ -62,7 +63,7 @@
<button
follows="right"
height="20"
- image_overlay="ForwardArrow_Off"
+ image_overlay="Web_Profile_Off"
layout="topleft"
left_pad="5"
right="-3"
diff --git a/indra/newview/skins/default/xui/en/panel_hint_image.xml b/indra/newview/skins/default/xui/en/panel_hint_image.xml
new file mode 100644
index 0000000000..00b6e42497
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_hint_image.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<panel
+ width="205"
+ height="140"
+ layout="topleft">
+ <text name="hint_title"
+ font="SansSerifMedium"
+ left="8"
+ right="180"
+ top="8"
+ bottom="20"
+ follows="left|right|top"
+ text_color="Black"
+ wrap="false"/>
+ <icon name="hint_image"
+ left="42"
+ top="25"
+ width="115"
+ height="86"
+ image_name="arrow_keys.png"
+ />
+ <text name="hint_text"
+ left="8"
+ right="197"
+ top_pad="5"
+ bottom="120"
+ follows="all"
+ text_color="Black"
+ wrap="true"/>
+ <button right="197"
+ top="8"
+ width="16"
+ height="16"
+ name="close"
+ follows="right|top"
+ image_color="DkGray"
+ image_unselected="Icon_Close_Foreground"
+ image_selected="Icon_Close_Press"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml
index 5ad8d1fd40..806182bcb4 100644
--- a/indra/newview/skins/default/xui/en/panel_login.xml
+++ b/indra/newview/skins/default/xui/en/panel_login.xml
@@ -5,17 +5,14 @@ height="600"
layout="topleft"
left="0"
name="panel_login"
+focus_root="true"
top="600"
width="996">
<panel.string
name="create_account_url">
http://join.secondlife.com/
</panel.string>
-<panel.string
- name="real_url" translate="false">
- http://secondlife.com/app/login/
-</panel.string>
- <string name="reg_in_client_url" translate="false">
+<string name="reg_in_client_url" translate="false">
http://secondlife.eniac15.lindenlab.com/reg-in-client/
</string>
<panel.string
@@ -96,6 +93,7 @@ follows="left|bottom"
height="22"
max_length_bytes="16"
name="password_edit"
+is_password="true"
select_on_focus="true"
top_pad="0"
width="135" />
diff --git a/indra/newview/skins/default/xui/en/panel_my_profile.xml b/indra/newview/skins/default/xui/en/panel_my_profile.xml
index 1b41f602cd..4bd2235cda 100644
--- a/indra/newview/skins/default/xui/en/panel_my_profile.xml
+++ b/indra/newview/skins/default/xui/en/panel_my_profile.xml
@@ -31,10 +31,18 @@
name="no_group_text"
value="None" />
<string
- name="RegisterDateFormat">
- [REG_DATE] ([AGE])
- </string>
- <layout_stack
+ name="RegisterDateFormat">
+ [REG_DATE] ([AGE])
+ </string>
+ <string
+ name="name_text_args">
+ [NAME]
+ </string>
+ <string
+ name="display_name_text_args">
+ [DISPLAY_NAME]
+ </string>
+ <layout_stack
name="layout"
orientation="vertical"
follows="all"
@@ -79,11 +87,12 @@
name="second_life_image_panel"
top="0"
width="297">
+
<texture_picker
allow_no_texture="true"
default_image_name="None"
enabled="false"
- fallback_image="Generic_Person_Large"
+ fallback_image="Generic_Person_Large"
follows="top|left"
height="124"
layout="topleft"
@@ -91,258 +100,47 @@
name="2nd_life_pic"
top="10"
width="102" />
- <icon
- height="102"
- image_name="Blank"
- layout="topleft"
- name="2nd_life_edit_icon"
- label=""
- left="3"
- tool_tip="Click the Edit Profile button below to change image"
- top="10"
- width="102" />
- <text
- follows="left|top|right"
- font.style="BOLD"
- height="15"
- layout="topleft"
- left_pad="10"
- name="title_sl_descr_text"
- text_color="white"
- top_delta="0"
- value="[SECOND_LIFE]:"
- width="180" />
- <expandable_text
- follows="left|top|right"
- height="95"
- layout="topleft"
- left="107"
- textbox.max_length="512"
- textbox.show_context_menu="true"
- name="sl_description_edit"
- top_pad="-3"
- translate="false"
- width="181"
- expanded_bg_visible="true"
- expanded_bg_color="DkGray">
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum.
- </expandable_text>
- </panel>
- <panel
- follows="left|top|right"
- height="117"
- layout="topleft"
- top_pad="0"
- left="10"
- name="first_life_image_panel"
- width="297">
- <texture_picker
- allow_no_texture="true"
- default_image_name="None"
- enabled="false"
- fallback_image="Generic_Person_Large"
- follows="top|left"
- height="124"
- layout="topleft"
- left="3"
- name="real_world_pic"
- width="102" />
- <icon
- height="102"
- image_name="Blank"
- layout="topleft"
- name="real_world_edit_icon"
- label=""
- left="3"
- tool_tip="Click the Edit Profile button below to change image"
- top="4"
- width="102" />
+
<text
- follows="left|top|right"
- font.style="BOLD"
- height="15"
- layout="topleft"
- left_pad="10"
- name="title_rw_descr_text"
- text_color="white"
- top_delta="0"
- value="Real World:"
- width="180" />
- <expandable_text
- follows="left|top|right"
- height="95"
- layout="topleft"
- left="107"
- textbox.max_length="512"
- textbox.show_context_menu="true"
- name="fl_description_edit"
- top_pad="-3"
- translate="false"
- width="181"
- expanded_bg_visible="true"
- expanded_bg_color="DkGray">
- Lorem ipsum dolor sit amet, consectetur adlkjpiscing elit moose moose. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet. adipiscing elit. Aenean rigviverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet sorbet ipsum. adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum.
- </expandable_text>
- </panel>
- <text
- follows="left|top"
- height="15"
- font.style="BOLD"
- font="SansSerifMedium"
- layout="topleft"
- left="10"
- name="homepage_edit"
- top_pad="0"
- translate="false"
- value="http://librarianavengers.org"
- width="300"
- word_wrap="false"
- use_ellipses="true"
- />
- <text
- follows="left|top"
- font.style="BOLD"
- height="10"
- layout="topleft"
- left="10"
- name="title_member_text"
- text_color="white"
- top_pad="10"
- value="Resident Since:"
- width="300" />
- <text_editor
- allow_scroll="false"
- bg_visible="false"
- follows="left|top"
- h_pad="0"
- height="15"
- layout="topleft"
- left="10"
- name="register_date"
- read_only="true"
- translate="false"
- v_pad="0"
- value="05/31/2376"
- width="300"
- word_wrap="true" />
- <text
- follows="left|top"
- font.style="BOLD"
- height="15"
- layout="topleft"
- left="10"
- name="title_acc_status_text"
- text_color="white"
- top_pad="5"
- value="Account Status:"
- width="300" />
- <!-- <text
- type="string"
- follows="left|top"
- font="SansSerifSmall"
- height="15"
- layout="topleft"
- left_pad="10"
- name="my_account_link"
- top_delta="0"
- value="Go to Dashboard"
- width="100"/> -->
- <text_editor
- allow_scroll="false"
- bg_visible="false"
- follows="left|top"
- h_pad="0"
- height="28"
- layout="topleft"
- left="10"
- name="acc_status_text"
- read_only="true"
- top_pad="0"
- translate="false"
- v_pad="0"
- width="300"
- word_wrap="true">
- Resident. No payment info on file.
- Linden.
- </text_editor>
- <text
- follows="left|top"
- font.style="BOLD"
- height="15"
- layout="topleft"
- left="10"
- name="title_partner_text"
- text_color="white"
- top_pad="3"
- value="Partner:"
- width="300" />
- <panel
- follows="left|top"
- height="15"
- layout="topleft"
- left="10"
- name="partner_data_panel"
- top_pad="0"
- width="300">
+ follows="left|top|right"
+ font="SansSerifLarge"
+ font.style="BOLD"
+ height="15"
+ layout="topleft"
+ left_pad="10"
+ name="display_name_descr_text"
+ text_color="0.7 0.7 0.7 1.0"
+ top_delta="0"
+ width="280" >
+ User name
+ </text>
+
<text
- follows="left|top"
- height="10"
- initial_value="(retrieving)"
- layout="topleft"
- left="0"
- link="true"
- name="partner_text"
- top="0"
- use_ellipses="true"
- width="300" />
+ follows="left|top|right"
+ font.style="BOLD"
+ height="15"
+ layout="topleft"
+ left_delta="0"
+ name="name_descr_text"
+ text_color="0.4 0.4 0.4 1.0"
+ top_delta="20"
+ width="280">
+ Display Name
+ </text>
+
+ <button
+ follows="bottom"
+ height="23"
+ left_delta="0"
+ top_delta="20"
+ label="Profile"
+ name="see_profile_btn"
+ tool_tip="See profile for this avatar"
+ width="120" />
+
</panel>
- <text
- follows="left|top"
- font.style="BOLD"
- height="13"
- layout="topleft"
- left="10"
- name="title_groups_text"
- text_color="white"
- top_pad="3"
- value="Groups:"
- width="300" />
- <expandable_text
- follows="all"
- height="113"
- layout="topleft"
- left="7"
- name="sl_groups"
- top_pad="0"
- translate="false"
- textbox.show_context_menu="true"
- width="298"
- expanded_bg_visible="true"
- expanded_bg_color="DkGray">
- Lorem ipsum dolor sit amet, consectetur adlkjpiscing elit moose moose. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet. adipiscing elit. Aenean rigviverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet sorbet ipsum. adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum. Aenean viverra tulip moosetop. Slan de heelish marfnik tooplod. Sum sum to whop de wompam booster copm.
- </expandable_text>
</panel>
</scroll_container>
</layout_panel>
</layout_stack>
- <panel
- follows="bottom|left|right"
- height="23"
- layout="topleft"
- left="0"
- top_pad="1"
- name="profile_me_buttons_panel"
- visible="false"
- width="315">
- <button
- follows="bottom"
- height="23"
- left="6"
- top="1"
- label="Edit Profile"
- name="edit_profile_btn"
- tool_tip="Edit your personal information"
- width="152" />
- </panel>
-
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
index 082d51ed3c..8a7bd53054 100644
--- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
@@ -4,6 +4,7 @@
background_visible="true"
bg_opaque_color="MouseGray"
follows="left|top|right"
+ focus_root="true"
height="60"
layout="topleft"
name="navigation_bar"
diff --git a/indra/newview/skins/default/xui/en/panel_notify_textbox.xml b/indra/newview/skins/default/xui/en/panel_notify_textbox.xml
index 4634eeed46..d5b6057233 100644
--- a/indra/newview/skins/default/xui/en/panel_notify_textbox.xml
+++ b/indra/newview/skins/default/xui/en/panel_notify_textbox.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
background_visible="true"
- height="230"
+ height="220"
label="instant_message"
layout="topleft"
left="0"
@@ -14,55 +14,81 @@
<panel
bevel_style="none"
follows="left|right|top"
- height="150"
+ height="185"
label="info_panel"
layout="topleft"
left="0"
name="info_panel"
top="0"
- width="305">
+ width="305">
+ <text_editor
+ bg_readonly_color="0.0 0.0 0.0 0"
+ enabled="false"
+ follows="left|right|top|bottom"
+ font="SansSerif"
+ height="110"
+ layout="topleft"
+ left="10"
+ mouse_opaque="false"
+ name="text_editor_box"
+ read_only="true"
+ text_color="white"
+ text_readonly_color="white"
+ top="10"
+ width="285"
+ wrap="true"
+ parse_highlights="true"
+ parse_urls="true"/>
<text_editor
parse_urls="true"
enabled="true"
follows="all"
- height="60"
+ height="50"
layout="topleft"
- left="25"
+ left="10"
max_length="250"
name="message"
parse_highlights="true"
read_only="false"
- top="40"
+ top_pad="10"
type="string"
use_ellipses="true"
value="message"
- width="260"
- word_wrap="true" >
+ width="285"
+ word_wrap="true"
+ parse_url="false" >
</text_editor>
- parse_urls="false"
- <button
- top="110"
- follows="top|left"
- height="20"
- label="Submit"
- layout="topleft"
- left="25"
- name="btn_submit"
- width="70" />
</panel>
<panel
background_visible="false"
follows="left|right|bottom"
- height="0"
+ height="25"
width="290"
label="control_panel"
layout="topleft"
left="10"
name="control_panel"
- top_pad="5">
+ top_pad="0">
<!--
Notes:
This panel holds the Ignore button and possibly other buttons of notification.
-->
+ <button
+ top="0"
+ follows="top|left"
+ height="20"
+ label="Submit"
+ layout="topleft"
+ name="btn_submit"
+ width="70" />
+ <button
+ follows="top|right"
+ height="20"
+ label="Ignore"
+ layout="topleft"
+ left="215"
+ name="ignore_btn"
+ top="0"
+ width="70" />
</panel>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
index d6e4c56113..37aab059a9 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
@@ -82,7 +82,7 @@
control_name="AllowMultipleViewers"
follows="top|left"
height="15"
- label="Allow Multiple Viewer"
+ label="Allow Multiple Viewers"
layout="topleft"
left="30"
name="allow_multiple_viewer_check"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_colors.xml b/indra/newview/skins/default/xui/en/panel_preferences_colors.xml
index 5797a63f4e..8a37822413 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_colors.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_colors.xml
@@ -275,9 +275,9 @@
height="12"
name="bubble_chat"
top_pad="20"
- width="140"
+ width="450"
>
- Bubble chat background:
+ Name tag background color (also affects Bubble Chat):
</text>
<color_swatch
can_apply_immediately="true"
@@ -290,7 +290,7 @@
left_delta="10"
top_pad="5"
name="background"
- tool_tip="Choose color for bubble chat"
+ tool_tip="Choose name tag color"
width="44">
<color_swatch.init_callback
function="Pref.getUIColor"
@@ -310,6 +310,7 @@
left_pad="10"
label_width="70"
name="bubble_chat_opacity"
+ tool_tip="Choose name tag opacity"
top_delta = "6"
width="378" />
<text
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml
index 9d012550fc..ef25588ca3 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml
@@ -42,6 +42,15 @@
</text>
<check_box
height="16"
+ enabled="true"
+ label="Show me in Search results"
+ layout="topleft"
+ left="30"
+ name="online_searchresults"
+ top_pad="20"
+ width="350" />
+ <check_box
+ height="16"
enabled="false"
label="Only friends and groups know I'm online"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml
index 584bd1ea9d..901a1257e0 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml
@@ -142,7 +142,7 @@
layout="topleft"
left="80"
name="Cache location"
- top_delta="40"
+ top_delta="20"
width="300">
Cache location:
</text>
@@ -341,20 +341,41 @@
name="web_proxy_port"
top_delta="0"
width="145" />
-
- <check_box
- top_delta="2"
- enabled="true"
- follows="left|top"
- height="18"
- initial_value="true"
- control_name="UpdaterServiceActive"
- label="Automatically download and install [APP_NAME] updates"
- left="30"
- mouse_opaque="true"
- name="updater_service_active"
- radio_style="false"
- width="400"
- top_pad="10"/>
-
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="10"
+ layout="topleft"
+ left="30"
+ name="Software updates:"
+ mouse_opaque="false"
+ top_pad="5"
+ width="300">
+ Software updates:
+ </text>
+ <combo_box
+ control_name="UpdaterServiceSetting"
+ follows="left|top"
+ height="23"
+ layout="topleft"
+ left_delta="50"
+ top_pad="5"
+ name="updater_service_combobox"
+ width="300">
+ <combo_box.item
+ label="Install automatically"
+ name="Install_automatically"
+ value="3" />
+ <!--
+ <combo_box.item
+ label="Ask before installing"
+ name="Install_ask"
+ value="1" />
+ -->
+ <combo_box.item
+ label="Download and install updates manually"
+ name="Install_manual"
+ value="0" />
+ </combo_box>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
index da366f30ae..f0ce8b849a 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
@@ -296,6 +296,7 @@
<check_box
name="media_auto_play_btn"
control_name="ParcelMediaAutoPlayEnable"
+ enabled_control="AudioStreamingMedia"
value="true"
follows="left|bottom|right"
height="15"
diff --git a/indra/newview/skins/default/xui/en/panel_profile.xml b/indra/newview/skins/default/xui/en/panel_profile.xml
index 7caf425058..61e3bb354f 100644
--- a/indra/newview/skins/default/xui/en/panel_profile.xml
+++ b/indra/newview/skins/default/xui/en/panel_profile.xml
@@ -59,7 +59,7 @@
left="0"
name="profile_scroll"
opaque="true"
- height="527"
+ height="400"
width="317"
top="0">
<panel
diff --git a/indra/newview/skins/default/xui/en/panel_script_ed.xml b/indra/newview/skins/default/xui/en/panel_script_ed.xml
index a041c9b229..627b12cfe1 100644
--- a/indra/newview/skins/default/xui/en/panel_script_ed.xml
+++ b/indra/newview/skins/default/xui/en/panel_script_ed.xml
@@ -180,6 +180,7 @@
name="Save_btn"
width="81" />
<button
+ enabled="false"
follows="right|bottom"
height="23"
label="Edit..."
diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml
index 2f52ca660b..d756dfb7de 100644
--- a/indra/newview/skins/default/xui/en/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml
@@ -51,7 +51,7 @@
height="18"
left="0"
name="balance"
- tool_tip="My Balance"
+ tool_tip="Click to refresh your L$ balance"
v_pad="4"
top="0"
wrap="false"
diff --git a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
index afaf41d073..e2b3d81bf6 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_task_info.xml
@@ -533,7 +533,7 @@
left="5"
name="open_btn"
top="0"
- width="100" />
+ width="73" />
<button
follows="bottom|left"
height="23"
@@ -542,7 +542,7 @@
left_pad="5"
name="pay_btn"
top="0"
- width="100" />
+ width="73" />
<button
follows="bottom|left"
height="23"
@@ -551,17 +551,16 @@
left_pad="5"
name="buy_btn"
top="0"
- width="100" />
+ width="73" />
<button
follows="bottom|left"
height="23"
label="Details"
layout="topleft"
- left="5"
+ left_pad="5"
name="details_btn"
top="0"
- width="100"
- visible="false" />
+ width="74" />
</panel>
</panel>
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 51fba470cb..752bb6ed3a 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -1716,8 +1716,8 @@ integer llGetRegionAgentCount()
Returns the number of avatars in the region
</string>
<string name="LSLTipText_llTextBox" translate="false">
-llTextBox(key avatar, string message, integer chat_channel
-Shows a dialog box on the avatar&apos;s screen with the message.
+llTextBox(key avatar, string message, integer chat_channel)
+Shows a window on the avatar&apos;s screen with the message.
It contains a text box for input, and if entered that text is chatted on chat_channel.
</string>
<string name="LSLTipText_llGetAgentLanguage" translate="false">
diff --git a/indra/newview/skins/default/xui/en/widgets/button.xml b/indra/newview/skins/default/xui/en/widgets/button.xml
index 1746a045cf..16241ed84e 100644
--- a/indra/newview/skins/default/xui/en/widgets/button.xml
+++ b/indra/newview/skins/default/xui/en/widgets/button.xml
@@ -19,7 +19,7 @@
image_color="ButtonImageColor"
image_color_disabled="ButtonImageColor"
flash_color="ButtonFlashBgColor"
- font="SansSerifSmall"
+ font="SansSerifSmall"
hover_glow_amount="0.15"
halign="center"
pad_bottom="3"
diff --git a/indra/newview/skins/default/xui/en/widgets/check_box.xml b/indra/newview/skins/default/xui/en/widgets/check_box.xml
index 7a60bee338..cca64fad2a 100644
--- a/indra/newview/skins/default/xui/en/widgets/check_box.xml
+++ b/indra/newview/skins/default/xui/en/widgets/check_box.xml
@@ -2,9 +2,17 @@
<check_box font="SansSerifSmall"
follows="left|top">
<check_box.label_text name="checkbox label"
+ left="20"
+ bottom="3"
+ width="0"
+ height="0"
text_color="LabelTextColor"
text_readonly_color="LabelDisabledColor"/>
<check_box.check_button name="CheckboxCtrl Button"
+ left="2"
+ bottom="2"
+ width="13"
+ height="13"
commit_on_return="false"
label=""
is_toggle="true"
diff --git a/indra/newview/skins/default/xui/en/widgets/group_icon.xml b/indra/newview/skins/default/xui/en/widgets/group_icon.xml
index 58d5e19fcc..36ee6dd7eb 100644
--- a/indra/newview/skins/default/xui/en/widgets/group_icon.xml
+++ b/indra/newview/skins/default/xui/en/widgets/group_icon.xml
@@ -2,4 +2,5 @@
<group_icon
default_icon_name="Generic_Group"
image_name="Generic_Group"
- name="group_icon" />
+ name="group_icon"
+ use_draw_context_alpha="false" />
diff --git a/indra/newview/skins/default/xui/en/widgets/sidetray_tab.xml b/indra/newview/skins/default/xui/en/widgets/sidetray_tab.xml
new file mode 100644
index 0000000000..aa8461d367
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/widgets/sidetray_tab.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<sidetray_tab
+ focus_root="true"
+ />
diff --git a/indra/newview/skins/default/xui/es/floater_hardware_settings.xml b/indra/newview/skins/default/xui/es/floater_hardware_settings.xml
index f967d697c5..0150241d9a 100644
--- a/indra/newview/skins/default/xui/es/floater_hardware_settings.xml
+++ b/indra/newview/skins/default/xui/es/floater_hardware_settings.xml
@@ -14,6 +14,9 @@
<combo_box.item label="8x" name="8x"/>
<combo_box.item label="16x" name="16x"/>
</combo_box>
+ <text name="antialiasing restart">
+ (requiere reiniciar el visor)
+ </text>
<spinner label="Gamma:" name="gamma"/>
<text name="(brightness, lower is brighter)">
(0 = brillo por defecto, más bajo = más brillo)
diff --git a/indra/newview/skins/default/xui/es/floater_preferences.xml b/indra/newview/skins/default/xui/es/floater_preferences.xml
index 61f12fc0d7..372680f55d 100644
--- a/indra/newview/skins/default/xui/es/floater_preferences.xml
+++ b/indra/newview/skins/default/xui/es/floater_preferences.xml
@@ -5,10 +5,12 @@
<tab_container name="pref core">
<panel label="General" name="general"/>
<panel label="Gráficos" name="display"/>
- <panel label="Privacidad" name="im"/>
<panel label="Sonido y Media" name="audio"/>
<panel label="Chat" name="chat"/>
+ <panel label="Mover y ver" name="move"/>
<panel label="Notificaciones" name="msgs"/>
+ <panel label="Colores" name="colors"/>
+ <panel label="Privacidad" name="im"/>
<panel label="Configurar" name="input"/>
<panel label="Avanzado" name="advanced1"/>
</tab_container>
diff --git a/indra/newview/skins/default/xui/es/floater_region_debug_console.xml b/indra/newview/skins/default/xui/es/floater_region_debug_console.xml
new file mode 100644
index 0000000000..40851f897e
--- /dev/null
+++ b/indra/newview/skins/default/xui/es/floater_region_debug_console.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="region_debug_console" title="Depuración de región"/>
diff --git a/indra/newview/skins/default/xui/es/menu_inventory_gear_default.xml b/indra/newview/skins/default/xui/es/menu_inventory_gear_default.xml
index 8c4488a285..8e498fefba 100644
--- a/indra/newview/skins/default/xui/es/menu_inventory_gear_default.xml
+++ b/indra/newview/skins/default/xui/es/menu_inventory_gear_default.xml
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<menu name="menu_gear_default">
+<toggleable_menu name="menu_gear_default">
<menu_item_call label="Nueva ventana del inventario" name="new_window"/>
- <menu_item_call label="Ordenar alfabéticamente" name="sort_by_name"/>
- <menu_item_call label="Ordenar por los más recientes" name="sort_by_recent"/>
+ <menu_item_check label="Ordenar alfabéticamente" name="sort_by_name"/>
+ <menu_item_check label="Ordenar por los más recientes" name="sort_by_recent"/>
+ <menu_item_check label="Las carpetas del sistema, arriba" name="sort_system_folders_to_top"/>
<menu_item_call label="Ver los filtros" name="show_filters"/>
<menu_item_call label="Restablecer los filtros" name="reset_filters"/>
<menu_item_call label="Cerrar todas las carpetas" name="close_folders"/>
@@ -12,4 +13,4 @@
<menu_item_call label="Encontrar el original" name="Find Original"/>
<menu_item_call label="Encontrar todos los enlazados" name="Find All Links"/>
<menu_item_call label="Vaciar la Papelera" name="empty_trash"/>
-</menu>
+</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/es/menu_viewer.xml b/indra/newview/skins/default/xui/es/menu_viewer.xml
index 649c0c2043..3dd940c331 100644
--- a/indra/newview/skins/default/xui/es/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/es/menu_viewer.xml
@@ -12,6 +12,12 @@
<menu_item_check label="Mi Inventario" name="ShowSidetrayInventory"/>
<menu_item_check label="Mis gestos" name="Gestures"/>
<menu_item_check label="Mi voz" name="ShowVoice"/>
+ <menu label="Movimiento" name="Movement">
+ <menu_item_call label="Sentarte" name="Sit Down Here"/>
+ <menu_item_check label="Volar" name="Fly"/>
+ <menu_item_check label="Correr siempre" name="Always Run"/>
+ <menu_item_call label="Parar mis animaciones" name="Stop Animating My Avatar"/>
+ </menu>
<menu label="Mi estado" name="Status">
<menu_item_call label="Ausente" name="Set Away"/>
<menu_item_call label="Ocupado" name="Set Busy"/>
@@ -47,6 +53,7 @@
<menu_item_check label="Propietarios del terreno" name="Land Owners"/>
<menu_item_check label="Coordenadas" name="Coordinates"/>
<menu_item_check label="Propiedades de la parcela" name="Parcel Properties"/>
+ <menu_item_check label="Menú Avanzado" name="Show Advanced Menu"/>
</menu>
<menu_item_call label="Teleportar a la Base" name="Teleport Home"/>
<menu_item_call label="Fijar mi Base aquí" name="Set Home to Here"/>
@@ -123,7 +130,6 @@
<menu_item_check label="Permitir consejos" name="Enable Hints"/>
</menu>
<menu label="Avanzado" name="Advanced">
- <menu_item_call label="Parar mis animaciones" name="Stop Animating My Avatar"/>
<menu_item_call label="Recargar las texturas" name="Rebake Texture"/>
<menu_item_call label="Interfaz en el tamaño predeterminado" name="Set UI Size to Default"/>
<menu_item_call label="Definir el tamaño de la ventana..." name="Set Window Size..."/>
@@ -177,8 +183,7 @@
<menu_item_check label="Buscar" name="Search"/>
<menu_item_call label="Recuperar las teclas" name="Release Keys"/>
<menu_item_call label="Interfaz en el tamaño predeterminado" name="Set UI Size to Default"/>
- <menu_item_check label="Correr siempre" name="Always Run"/>
- <menu_item_check label="Volar" name="Fly"/>
+ <menu_item_check label="Mostrar el menú Avanzado - acceso directo antiguo" name="Show Advanced Menu - legacy shortcut"/>
<menu_item_call label="Cerrar la ventana" name="Close Window"/>
<menu_item_call label="Cerrar todas las ventanas" name="Close All Windows"/>
<menu_item_call label="Guardar una foto" name="Snapshot to Disk"/>
@@ -196,7 +201,6 @@
<menu_item_call label="Acercar el zoom" name="Zoom In"/>
<menu_item_call label="Zoom por defecto" name="Zoom Default"/>
<menu_item_call label="Alejar el zoom" name="Zoom Out"/>
- <menu_item_check label="Mostrar el menú Avanzado" name="Show Advanced Menu"/>
</menu>
<menu_item_call label="Mostrar las configuraciones del depurador" name="Debug Settings"/>
<menu_item_check label="Mostrar el menú &apos;Develop&apos;" name="Debug Mode"/>
@@ -267,16 +271,13 @@
<menu_item_call label="Web Browser Test" name="Web Browser Test"/>
<menu_item_call label="Print Selected Object Info" name="Print Selected Object Info"/>
<menu_item_call label="Memory Stats" name="Memory Stats"/>
- <menu_item_check label="Haz doble clic en Piloto automático" name="Double-ClickAuto-Pilot"/>
- <menu_item_check label="Teleportar mediante doble clic" name="DoubleClick Teleport"/>
+ <menu_item_check label="Consola de depuración de región" name="Region Debug Console"/>
<menu_item_check label="Debug Clicks" name="Debug Clicks"/>
<menu_item_check label="Debug Mouse Events" name="Debug Mouse Events"/>
</menu>
<menu label="XUI" name="XUI">
<menu_item_call label="Reload Color Settings" name="Reload Color Settings"/>
<menu_item_call label="Show Font Test" name="Show Font Test"/>
- <menu_item_call label="Load from XML" name="Load from XML"/>
- <menu_item_call label="Save to XML" name="Save to XML"/>
<menu_item_check label="Show XUI Names" name="Show XUI Names"/>
<menu_item_call label="Send Test IMs" name="Send Test IMs"/>
<menu_item_call label="Eliminar registros de nombres en caché" name="Flush Names Caches"/>
@@ -303,9 +304,9 @@
</menu>
<menu_item_check label="HTTP Textures" name="HTTP Textures"/>
<menu_item_check label="Console Window on next Run" name="Console Window"/>
- <menu_item_check label="Show Admin Menu" name="View Admin Options"/>
<menu_item_call label="Request Admin Status" name="Request Admin Options"/>
<menu_item_call label="Leave Admin Status" name="Leave Admin Options"/>
+ <menu_item_check label="Show Admin Menu" name="View Admin Options"/>
</menu>
<menu label="Admin" name="Admin">
<menu label="Object">
diff --git a/indra/newview/skins/default/xui/es/notifications.xml b/indra/newview/skins/default/xui/es/notifications.xml
index 6c5fe6a9eb..2dd7a6b0f5 100644
--- a/indra/newview/skins/default/xui/es/notifications.xml
+++ b/indra/newview/skins/default/xui/es/notifications.xml
@@ -385,6 +385,9 @@ Nota: esto vaciará la caché.
<notification name="ChangeSkin">
Verás la nueva apariencia cuando reinicies [APP_NAME].
</notification>
+ <notification name="ChangeLanguage">
+ El cambio de idioma tendrá efecto cuando reinicies [APP_NAME].
+ </notification>
<notification name="GoToAuctionPage">
¿Ir a la página web de [SECOND_LIFE] para ver los detalles de la subasta
o hacer una puja?
@@ -599,6 +602,10 @@ Podría ser [VALIDS]
No se encontró el fragmento &apos;data&apos; en la cabecera del WAV:
[FILE]
</notification>
+ <notification name="SoundFileInvalidChunkSize">
+ Tamaño de lote erróneo en el archivo WAV:
+[FILE]
+ </notification>
<notification name="SoundFileInvalidTooLong">
El archivo de audio es demasiado largo (10 segundos como máximo):
[FILE]
@@ -1334,6 +1341,16 @@ Esta actualización no es obligatoria, pero te sugerimos instalarla para mejorar
¿Descargarla a tu carpeta de Programas?
<usetemplate name="okcancelbuttons" notext="Continuar" yestext="Descargarla"/>
</notification>
+ <notification name="FailedUpdateInstall">
+ Se ha producido un error al instalar la actualización del visor.
+Descarga e instala el último visor a través de
+http://secondlife.com/download.
+ <usetemplate name="okbutton" yestext="OK"/>
+ </notification>
+ <notification name="DownloadBackground">
+ Se ha descargado una versión actualizada de [APP_NAME].
+Se aplicará la próxima vez que reinicies [APP_NAME]
+ </notification>
<notification name="DeedObjectToGroup">
Transferir este objeto al grupo hará que:
* Reciba los L$ pagados en el objeto
diff --git a/indra/newview/skins/default/xui/es/panel_edit_gloves.xml b/indra/newview/skins/default/xui/es/panel_edit_gloves.xml
index 684a35a830..d536a862f5 100644
--- a/indra/newview/skins/default/xui/es/panel_edit_gloves.xml
+++ b/indra/newview/skins/default/xui/es/panel_edit_gloves.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_gloves_panel">
<panel name="avatar_gloves_color_panel">
- <texture_picker label="Tela" name="Fabric" tool_tip="Pulsa para elegir una imagen"/>
+ <texture_picker label="Textura" name="Fabric" tool_tip="Pulsa para elegir una imagen"/>
<color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulsa para abrir el selector de color"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/es/panel_edit_jacket.xml b/indra/newview/skins/default/xui/es/panel_edit_jacket.xml
index 347107d746..22a46a2f75 100644
--- a/indra/newview/skins/default/xui/es/panel_edit_jacket.xml
+++ b/indra/newview/skins/default/xui/es/panel_edit_jacket.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_jacket_panel">
<panel name="avatar_jacket_color_panel">
- <texture_picker label="Tejido superior" name="Upper Fabric" tool_tip="Pulsa para elegir una imagen"/>
- <texture_picker label="Tejido inferior" name="Lower Fabric" tool_tip="Pulsa para elegir una imagen"/>
+ <texture_picker label="Textura superior" name="Upper Fabric" tool_tip="Pulsa para elegir una imagen"/>
+ <texture_picker label="Textura inferior" name="Lower Fabric" tool_tip="Pulsa para elegir una imagen"/>
<color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulsa para abrir el selector de color"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/es/panel_edit_pants.xml b/indra/newview/skins/default/xui/es/panel_edit_pants.xml
index e765702343..fb35e0953b 100644
--- a/indra/newview/skins/default/xui/es/panel_edit_pants.xml
+++ b/indra/newview/skins/default/xui/es/panel_edit_pants.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_pants_panel">
<panel name="avatar_pants_color_panel">
- <texture_picker label="Tela" name="Fabric" tool_tip="Pulsa para elegir una imagen"/>
+ <texture_picker label="Textura" name="Fabric" tool_tip="Pulsa para elegir una imagen"/>
<color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulsa para abrir el selector de color"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/es/panel_edit_shirt.xml b/indra/newview/skins/default/xui/es/panel_edit_shirt.xml
index f763e1b18d..73b712374e 100644
--- a/indra/newview/skins/default/xui/es/panel_edit_shirt.xml
+++ b/indra/newview/skins/default/xui/es/panel_edit_shirt.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_shirt_panel">
<panel name="avatar_shirt_color_panel">
- <texture_picker label="Tela" name="Fabric" tool_tip="Pulsa para elegir una imagen"/>
+ <texture_picker label="Textura" name="Fabric" tool_tip="Pulsa para elegir una imagen"/>
<color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulsa para abrir el selector de color"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/es/panel_edit_shoes.xml b/indra/newview/skins/default/xui/es/panel_edit_shoes.xml
index 70f2027398..5e457612d5 100644
--- a/indra/newview/skins/default/xui/es/panel_edit_shoes.xml
+++ b/indra/newview/skins/default/xui/es/panel_edit_shoes.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_shoes_panel">
<panel name="avatar_shoes_color_panel">
- <texture_picker label="Tela" name="Fabric" tool_tip="Pulsa para elegir una imagen"/>
+ <texture_picker label="Textura" name="Fabric" tool_tip="Pulsa para elegir una imagen"/>
<color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulsa para abrir el selector de color"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/es/panel_edit_skirt.xml b/indra/newview/skins/default/xui/es/panel_edit_skirt.xml
index 2c7196642c..416d174298 100644
--- a/indra/newview/skins/default/xui/es/panel_edit_skirt.xml
+++ b/indra/newview/skins/default/xui/es/panel_edit_skirt.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_skirt_panel">
<panel name="avatar_skirt_color_panel">
- <texture_picker label="Tela" name="Fabric" tool_tip="Pulsa para elegir una imagen"/>
+ <texture_picker label="Textura" name="Fabric" tool_tip="Pulsa para elegir una imagen"/>
<color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulsa para abrir el selector de color"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/es/panel_edit_socks.xml b/indra/newview/skins/default/xui/es/panel_edit_socks.xml
index 28423eaf61..ac9b2a773e 100644
--- a/indra/newview/skins/default/xui/es/panel_edit_socks.xml
+++ b/indra/newview/skins/default/xui/es/panel_edit_socks.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_socks_panel">
<panel name="avatar_socks_color_panel">
- <texture_picker label="Tela" name="Fabric" tool_tip="Pulsa para elegir una imagen"/>
+ <texture_picker label="Textura" name="Fabric" tool_tip="Pulsa para elegir una imagen"/>
<color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulsa para abrir el selector de color"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/es/panel_edit_underpants.xml b/indra/newview/skins/default/xui/es/panel_edit_underpants.xml
index 6c82bcfedf..aac8af44b9 100644
--- a/indra/newview/skins/default/xui/es/panel_edit_underpants.xml
+++ b/indra/newview/skins/default/xui/es/panel_edit_underpants.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_underpants_panel">
<panel name="avatar_underpants_color_panel">
- <texture_picker label="Tela" name="Fabric" tool_tip="Pulsa para elegir una imagen"/>
+ <texture_picker label="Textura" name="Fabric" tool_tip="Pulsa para elegir una imagen"/>
<color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulsa para abrir el selector de color"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/es/panel_edit_undershirt.xml b/indra/newview/skins/default/xui/es/panel_edit_undershirt.xml
index 412bdceddf..c26c554c1a 100644
--- a/indra/newview/skins/default/xui/es/panel_edit_undershirt.xml
+++ b/indra/newview/skins/default/xui/es/panel_edit_undershirt.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_undershirt_panel">
<panel name="avatar_undershirt_color_panel">
- <texture_picker label="Tela" name="Fabric" tool_tip="Pulsa para elegir una imagen"/>
+ <texture_picker label="Textura" name="Fabric" tool_tip="Pulsa para elegir una imagen"/>
<color_swatch label="Color/Tinte" name="Color/Tint" tool_tip="Pulsa para abrir el selector de color"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/es/panel_notify_textbox.xml b/indra/newview/skins/default/xui/es/panel_notify_textbox.xml
new file mode 100644
index 0000000000..10aaa288d7
--- /dev/null
+++ b/indra/newview/skins/default/xui/es/panel_notify_textbox.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="instant_message" name="panel_notify_textbox">
+ <string name="message_max_lines_count" value="7"/>
+ <panel label="info_panel" name="info_panel">
+ <text_editor name="message" value="message"/>
+ parse_urls=&quot;false&quot;
+ <button label="Enviar" name="btn_submit"/>
+ </panel>
+ <panel label="control_panel" name="control_panel"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/es/panel_people.xml b/indra/newview/skins/default/xui/es/panel_people.xml
index 1773735598..d0c80ebae5 100644
--- a/indra/newview/skins/default/xui/es/panel_people.xml
+++ b/indra/newview/skins/default/xui/es/panel_people.xml
@@ -22,7 +22,7 @@
<tab_container name="tabs">
<panel label="CERCANA" name="nearby_panel">
<panel label="bottom_panel" name="bottom_panel">
- <button name="nearby_view_sort_btn" tool_tip="Opciones"/>
+ <menu_button name="nearby_view_sort_btn" tool_tip="Opciones"/>
<button name="add_friend_btn" tool_tip="Añadir al Residente seleccionado a la lista de tus amigos"/>
</panel>
</panel>
@@ -34,27 +34,27 @@
<panel label="bottom_panel" name="bottom_panel">
<layout_stack name="bottom_panel">
<layout_panel name="options_gear_btn_panel">
- <button name="friends_viewsort_btn" tool_tip="Ver más opciones"/>
+ <menu_button name="friends_viewsort_btn" tool_tip="Ver más opciones"/>
</layout_panel>
<layout_panel name="add_btn_panel">
<button name="add_btn" tool_tip="Ofrecer amistad a un Residente"/>
</layout_panel>
<layout_panel name="trash_btn_panel">
- <dnd_button name="trash_btn" tool_tip="Quitar a la persona seleccionada de tu lista de amigos"/>
+ <dnd_button name="del_btn" tool_tip="Quitar a la persona seleccionada de tu lista de amigos"/>
</layout_panel>
</layout_stack>
</panel>
</panel>
<panel label="MIS GRUPOS" name="groups_panel">
<panel label="bottom_panel" name="bottom_panel">
- <button name="groups_viewsort_btn" tool_tip="Opciones"/>
+ <menu_button name="groups_viewsort_btn" tool_tip="Opciones"/>
<button name="plus_btn" tool_tip="Entrar en un grupo o crear uno"/>
<button name="activate_btn" tool_tip="Activar el grupo seleccionado"/>
</panel>
</panel>
<panel label="RECIENTE" name="recent_panel">
<panel label="bottom_panel" name="bottom_panel">
- <button name="recent_viewsort_btn" tool_tip="Opciones"/>
+ <menu_button name="recent_viewsort_btn" tool_tip="Opciones"/>
<button name="add_friend_btn" tool_tip="Añadir al Residente seleccionado a la lista de tus amigos"/>
</panel>
</panel>
diff --git a/indra/newview/skins/default/xui/es/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/es/panel_preferences_advanced.xml
index d65868c0a8..7c2c9f505e 100644
--- a/indra/newview/skins/default/xui/es/panel_preferences_advanced.xml
+++ b/indra/newview/skins/default/xui/es/panel_preferences_advanced.xml
@@ -3,35 +3,16 @@
<panel.string name="aspect_ratio_text">
[NUM]:[DEN]
</panel.string>
- <panel.string name="middle_mouse">
- Botón medio del ratón
- </panel.string>
- <slider label="Ángulo de visión" name="camera_fov"/>
- <slider label="Distancia" name="camera_offset_scale"/>
- <text name="heading2">
- Posición automática para:
- </text>
- <check_box label="Construir/Editar" name="edit_camera_movement" tool_tip="Usar el posicionamiento automático de la cámara al entrar en o salir del modo de edición"/>
- <check_box label="Apariencia" name="appearance_camera_movement" tool_tip="Usar el posicionamiento automático de la cámara mientras se está editando"/>
- <check_box initial_value="true" label="Barra lateral" name="appearance_sidebar_positioning" tool_tip="Usar el posicionamiento automático de la cámara para la barra lateral"/>
- <check_box label="Verme en vista subjetiva" name="first_person_avatar_visible"/>
- <check_box label="Las teclas del cursor siempre para moverme" name="arrow_keys_move_avatar_check"/>
- <check_box label="Correr siempre: atajo de teclado" name="tap_tap_hold_to_run"/>
- <check_box label="Al hablar, mover los labios del avatar" name="enable_lip_sync"/>
- <check_box label="Chat en bocadillos" name="bubble_text_chat"/>
- <slider label="Opacidad" name="bubble_chat_opacity"/>
- <color_swatch name="background" tool_tip="Elegir el color de los bocadillos del chat"/>
<text name="UI Size:">
- Tamaño de la UI
+ Tamaño de la UI:
</text>
<check_box label="Mostrar los errores de los scripts en:" name="show_script_errors"/>
<radio_group name="show_location">
<radio_item label="Chat" name="0"/>
<radio_item label="Ventanas distintas" name="1"/>
</radio_group>
- <check_box label="Cambiar entre hablar on/off cuando pulse:" name="push_to_talk_toggle_check" tool_tip="En el modo &apos;un toque&apos;, pulsa y suelta el botón UNA VEZ para activar o desactivar el micrófono. Si no estás en el modo &apos;un toque&apos;, el micrófono sólo recogerá tu voz mientras mantengas pulsado el botón."/>
- <line_editor label="Botón de Apretar para Hablar" name="modifier_combo"/>
- <button label="Elegir la tecla" name="set_voice_hotkey_button"/>
- <button label="Botón de en medio del ratón" name="set_voice_middlemouse_button" tool_tip="Reconfigurarlo al botón medio del ratón"/>
- <button label="Otros dispositivos" name="joystick_setup_button"/>
+ <check_box label="Permitir el acceso de varios usuarios" name="allow_multiple_viewer_check"/>
+ <check_box label="Mostrar la selección de cuadrícula al iniciar sesión" name="show_grid_selection_check"/>
+ <check_box label="Mostrar el menú Avanzado" name="show_advanced_menu_check"/>
+ <check_box label="Mostrar el menú Desarrollador" name="show_develop_menu_check"/>
</panel>
diff --git a/indra/newview/skins/default/xui/es/panel_preferences_chat.xml b/indra/newview/skins/default/xui/es/panel_preferences_chat.xml
index 05aea82d82..67f9a929f6 100644
--- a/indra/newview/skins/default/xui/es/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/es/panel_preferences_chat.xml
@@ -8,44 +8,10 @@
<radio_item label="Medio" name="radio2" value="1"/>
<radio_item label="Aumentar" name="radio3" value="2"/>
</radio_group>
- <text name="font_colors">
- Colores de la fuente:
- </text>
- <color_swatch label="Usted" name="user"/>
- <text name="text_box1">
- Yo
- </text>
- <color_swatch label="Otros" name="agent"/>
- <text name="text_box2">
- Otros
- </text>
- <color_swatch label="MI" name="im"/>
- <text name="text_box3">
- MI
- </text>
- <color_swatch label="Sistema" name="system"/>
- <text name="text_box4">
- Sistema
- </text>
- <color_swatch label="Errores de script" name="script_error"/>
- <text name="text_box5">
- Errores de script
- </text>
- <color_swatch label="Objetos" name="objects"/>
- <text name="text_box6">
- Objetos
- </text>
- <color_swatch label="Propietario" name="owner"/>
- <text name="text_box7">
- Propietario
- </text>
- <color_swatch label="URL" name="links"/>
- <text name="text_box9">
- URL
- </text>
<check_box initial_value="true" label="Ejecutar la animación de escribir al hacerlo en el chat" name="play_typing_animation"/>
<check_box label="Cuando estoy desconectado, enviarme los MI al correo-e" name="send_im_to_email"/>
<check_box label="Permitir el historial de MI y chat en texto sin formato" name="plain_text_chat_history"/>
+ <check_box label="Bocadillos del chat" name="bubble_text_chat"/>
<text name="show_ims_in_label">
Mostrar los MI en:
</text>
@@ -53,9 +19,16 @@
(requiere reiniciar)
</text>
<radio_group name="chat_window" tool_tip="Muestra tus mensajes instantáneos en varias ventanas flotantes o en una sola con varias pestañas (requiere que reinicies)">
- <radio_item label="Varias ventanas" name="radio" value="0"/>
+ <radio_item label="Ventanas distintas" name="radio" value="0"/>
<radio_item label="Pestañas" name="radio2" value="1"/>
</radio_group>
+ <text name="disable_toast_label">
+ Permitir ventanas de chat emergentes:
+ </text>
+ <check_box label="Chats de grupo" name="EnableGroupChatPopups" tool_tip="Activa esta casilla para ver una ventana emergente cada vez que recibas un mensaje de un grupo de chat"/>
+ <check_box label="Chats de MI" name="EnableIMChatPopups" tool_tip="Activa esta casilla para ver una ventana emergente cada vez que recibas un mensaje instantáneo"/>
+ <spinner label="Duración de los interlocutores favoritos en los chats:" name="nearby_toasts_lifetime"/>
+ <spinner label="Tiempo restante de los interlocutores favoritos en los chats:" name="nearby_toasts_fadingtime"/>
<check_box label="Utiliza la herramienta de traducción automática mientras utilizas el chat (mediante Google)" name="translate_chat_checkbox"/>
<text name="translate_language_text">
Traducir el chat al:
diff --git a/indra/newview/skins/default/xui/es/panel_preferences_colors.xml b/indra/newview/skins/default/xui/es/panel_preferences_colors.xml
new file mode 100644
index 0000000000..4fa5c4ce63
--- /dev/null
+++ b/indra/newview/skins/default/xui/es/panel_preferences_colors.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Colores" name="colors_panel">
+ <text name="effects_color_textbox">
+ Mis efectos (rayo indicador):
+ </text>
+ <color_swatch name="effect_color_swatch" tool_tip="Pulsa para abrir el selector de color"/>
+ <text name="font_colors">
+ Colores de fuente del chat:
+ </text>
+ <text name="text_box1">
+ Yo
+ </text>
+ <text name="text_box2">
+ Otros avatares
+ </text>
+ <text name="text_box3">
+ Objetos
+ </text>
+ <text name="text_box4">
+ Sistema
+ </text>
+ <text name="text_box5">
+ Errores
+ </text>
+ <text name="text_box7">
+ Propietario
+ </text>
+ <text name="text_box9">
+ URL
+ </text>
+ <text name="bubble_chat">
+ Fondo de los bocadillos del chat:
+ </text>
+ <color_swatch name="background" tool_tip="Elegir el color de los bocadillos del chat"/>
+ <slider label="Opacidad:" name="bubble_chat_opacity"/>
+ <text name="floater_opacity">
+ Opacidad de la ventana:
+ </text>
+ <slider label="Activo:" name="active"/>
+ <slider label="Inactivo:" name="inactive"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/es/panel_preferences_general.xml b/indra/newview/skins/default/xui/es/panel_preferences_general.xml
index 5b8cb77173..91cf9524a3 100644
--- a/indra/newview/skins/default/xui/es/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/es/panel_preferences_general.xml
@@ -48,13 +48,18 @@
<check_box label="Nombre de usuario" name="show_slids" tool_tip="Mostrar el nombre de usuario, como bobsmith123"/>
<check_box label="Títulos de grupos" name="show_all_title_checkbox1" tool_tip="Mostrar títulos de grupos, como Jefe o Miembro"/>
<check_box label="Realzar amigos" name="show_friends" tool_tip="Realzar las etiquetas de los nombres de tus amigos"/>
- <text name="effects_color_textbox">
- Mis efectos:
+ <check_box label="Ver nombres mostrados" name="display_names_check" tool_tip="Comprobar para utilizar nombres mostrados en chat, MI, etiquetas de nombres, etc."/>
+ <check_box label="Permitir los consejos de la IU del visor" name="viewer_hints_check"/>
+ <text name="inworld_typing_rg_label">
+ Si pulsas las teclas de letras:
</text>
+ <radio_group name="inworld_typing_preference">
+ <radio_item label="Inicia el chat local" name="radio_start_chat" value="1"/>
+ <radio_item label="Se verá afectado el movimiento (por ejemplo, mediante las teclas WASD)" name="radio_move" value="0"/>
+ </radio_group>
<text name="title_afk_text">
Ausente tras:
</text>
- <color_swatch label="" name="effect_color_swatch" tool_tip="Pulse para abrir el selector de color"/>
<combo_box label="Ausente tras:" name="afk">
<combo_box.item label="2 minutos" name="item0"/>
<combo_box.item label="5 minutos" name="item1"/>
@@ -62,7 +67,6 @@
<combo_box.item label="30 minutos" name="item3"/>
<combo_box.item label="nunca" name="item4"/>
</combo_box>
- <check_box label="Ver nombres mostrados" name="display_names_check" tool_tip="Comprobar para utilizar nombres mostrados en chat, MI, etiquetas de nombres, etc."/>
<text name="text_box3">
Respuesta cuando estoy en modo ocupado:
</text>
diff --git a/indra/newview/skins/default/xui/es/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/es/panel_preferences_graphics1.xml
index 36b6493004..c569db3376 100644
--- a/indra/newview/skins/default/xui/es/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/es/panel_preferences_graphics1.xml
@@ -25,6 +25,7 @@
<text name="ShadersText">
Shaders:
</text>
+ <check_box initial_value="verdadero" label="Agua transparente" name="TransparentWater"/>
<check_box initial_value="true" label="Efecto de relieve y brillo" name="BumpShiny"/>
<check_box initial_value="true" label="Shaders básicos" name="BasicShaders" tool_tip="Desactivando esta opción puede prevenir fallos en algunos controladores de la tarjeta gráfica."/>
<check_box initial_value="true" label="Shaders de la atmósfera" name="WindLightUseAtmosShaders"/>
diff --git a/indra/newview/skins/default/xui/es/panel_preferences_move.xml b/indra/newview/skins/default/xui/es/panel_preferences_move.xml
new file mode 100644
index 0000000000..d95e167361
--- /dev/null
+++ b/indra/newview/skins/default/xui/es/panel_preferences_move.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Mover" name="move_panel">
+ <slider label="Ángulo de visión" name="camera_fov"/>
+ <slider label="Distancia" name="camera_offset_scale"/>
+ <text name="heading2">
+ Posición automática para:
+ </text>
+ <check_box label="Construir/Editar" name="edit_camera_movement" tool_tip="Usar el posicionamiento automático de la cámara al entrar en o salir del modo de edición"/>
+ <check_box label="Apariencia" name="appearance_camera_movement" tool_tip="Usar el posicionamiento automático de la cámara mientras se está editando"/>
+ <check_box initial_value="verdadero" label="Barra lateral" name="appearance_sidebar_positioning" tool_tip="Usar el posicionamiento automático de la cámara para la barra lateral"/>
+ <check_box label="Verme en vista subjetiva" name="first_person_avatar_visible"/>
+ <text name=" Mouse Sensitivity">
+ Sensibilidad del ratón en la Vista subjetiva:
+ </text>
+ <check_box label="Invertir" name="invert_mouse"/>
+ <check_box label="Las teclas del cursor siempre para moverme" name="arrow_keys_move_avatar_check"/>
+ <check_box label="Correr siempre: atajo de teclado" name="tap_tap_hold_to_run"/>
+ <check_box label="Haz doble clic para:" name="double_click_chkbox"/>
+ <radio_group name="double_click_action">
+ <radio_item label="Teleportarte" name="radio_teleport"/>
+ <radio_item label="Piloto automático" name="radio_autopilot"/>
+ </radio_group>
+ <button label="Otros dispositivos" name="joystick_setup_button"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/es/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/es/panel_preferences_privacy.xml
index bf2c6b7aa6..abff72c346 100644
--- a/indra/newview/skins/default/xui/es/panel_preferences_privacy.xml
+++ b/indra/newview/skins/default/xui/es/panel_preferences_privacy.xml
@@ -10,17 +10,20 @@
<check_box label="Sólo saben si estoy conectado mis amigos y grupos" name="online_visibility"/>
<check_box label="Sólo pueden llamarme o mandarme un MI mis amigos y grupos" name="voice_call_friends_only_check"/>
<check_box label="Desconectar el micrófono cuando finalicen las llamadas" name="auto_disengage_mic_check"/>
- <check_box label="Aceptar las &apos;cookies&apos;" name="cookies_enabled"/>
<text name="Logs:">
- Registros:
+ Registros de chat:
</text>
<check_box label="Guardar en mi ordenador registros del chat" name="log_nearby_chat"/>
<check_box label="Guardar en mi ordenador registros de los MI" name="log_instant_messages"/>
- <check_box label="Añadir fecha y hora" name="show_timestamps_check_im"/>
+ <check_box label="Añadir fecha y hora a todas las líneas del registro de chat" name="show_timestamps_check_im"/>
+ <check_box label="Añadir la fecha al nombre del archivo del registro." name="logfile_name_datestamp"/>
<text name="log_path_desc">
Ruta de los registros:
</text>
<line_editor left="278" name="log_path_string" right="-20"/>
<button label="Elegir" label_selected="Elegir" name="log_path_button" width="120"/>
<button label="Lista de ignorados" name="block_list"/>
+ <text name="block_list_label">
+ (Gente u objetos que has bloqueado)
+ </text>
</panel>
diff --git a/indra/newview/skins/default/xui/es/panel_preferences_setup.xml b/indra/newview/skins/default/xui/es/panel_preferences_setup.xml
index 100951a51e..f968f48910 100644
--- a/indra/newview/skins/default/xui/es/panel_preferences_setup.xml
+++ b/indra/newview/skins/default/xui/es/panel_preferences_setup.xml
@@ -1,12 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel label="Configurar" name="Input panel">
- <text name="Mouselook:">
- Vista subjetiva:
- </text>
- <text name=" Mouse Sensitivity">
- Sensibilidad del ratón
- </text>
- <check_box label="Invertir" name="invert_mouse"/>
<text name="Network:">
Red:
</text>
@@ -46,4 +39,5 @@
</text>
<line_editor name="web_proxy_editor" tool_tip="Nombre o dirección IP del proxy que quieres usar"/>
<spinner label="Nº del puerto:" name="web_proxy_port"/>
+ <check_box initial_value="verdadero" label="Descargar e instalar automáticamente actualizaciones de [APP_NAME]" name="updater_service_active"/>
</panel>
diff --git a/indra/newview/skins/default/xui/es/panel_preferences_sound.xml b/indra/newview/skins/default/xui/es/panel_preferences_sound.xml
index b0088ee1a2..7989100c09 100644
--- a/indra/newview/skins/default/xui/es/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/es/panel_preferences_sound.xml
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel label="Sonidos" name="Preference Media panel">
+ <panel.string name="middle_mouse">
+ Botón medio del ratón
+ </panel.string>
<slider label="Volumen general" name="System Volume"/>
<check_box initial_value="true" label="Silenciar cuando minimice" name="mute_when_minimized"/>
<slider label="Botones" name="UI Volume"/>
@@ -23,6 +26,11 @@
<radio_item label="La posición de la cámara" name="0"/>
<radio_item label="La posición del avatar" name="1"/>
</radio_group>
+ <check_box label="Al hablar, mover los labios del avatar" name="enable_lip_sync"/>
+ <check_box label="Cambiar entre hablar on/off cuando pulse:" name="push_to_talk_toggle_check" tool_tip="En el modo &apos;un toque&apos;, pulsa y suelta el botón UNA VEZ para activar o desactivar el micrófono. Si no estás en el modo &apos;un toque&apos;, el micrófono sólo recogerá tu voz mientras mantengas pulsado el botón."/>
+ <line_editor label="Botón de Apretar para Hablar" name="modifier_combo"/>
+ <button label="Elegir la tecla" name="set_voice_hotkey_button"/>
+ <button name="set_voice_middlemouse_button" tool_tip="Reconfigurarlo al botón medio del ratón"/>
<button label="Dispositivos de entrada y salida" name="device_settings_btn" width="210"/>
<panel label="Configuración de dispositivos" name="device_settings_panel">
<panel.string name="default_text">
diff --git a/indra/newview/skins/default/xui/es/panel_script_ed.xml b/indra/newview/skins/default/xui/es/panel_script_ed.xml
index c73db729fe..5be25a286d 100644
--- a/indra/newview/skins/default/xui/es/panel_script_ed.xml
+++ b/indra/newview/skins/default/xui/es/panel_script_ed.xml
@@ -15,11 +15,6 @@
<panel.string name="Title">
Script: [NAME]
</panel.string>
- <text_editor name="Script Editor">
- Cargando...
- </text_editor>
- <button label="Guardar" label_selected="Guardar" name="Save_btn"/>
- <combo_box label="Insertar..." name="Insert..."/>
<menu_bar name="script_menu">
<menu label="Archivo" name="File">
<menu_item_call label="Guardar" name="Save"/>
@@ -40,4 +35,10 @@
<menu_item_call label="Ayuda de palabras clave..." name="Keyword Help..."/>
</menu>
</menu_bar>
+ <text_editor name="Script Editor">
+ Cargando...
+ </text_editor>
+ <combo_box label="Insertar..." name="Insert..."/>
+ <button label="Guardar" label_selected="Guardar" name="Save_btn"/>
+ <button label="Editar..." name="Edit_btn"/>
</panel>
diff --git a/indra/newview/skins/default/xui/es/strings.xml b/indra/newview/skins/default/xui/es/strings.xml
index 0be827f5f7..810b1630dd 100644
--- a/indra/newview/skins/default/xui/es/strings.xml
+++ b/indra/newview/skins/default/xui/es/strings.xml
@@ -1740,11 +1740,8 @@
<string name="InvOfferGaveYou">
te ha dado
</string>
- <string name="InvOfferYouDecline">
- Has rehusado
- </string>
- <string name="InvOfferFrom">
- de
+ <string name="InvOfferDecline">
+ Rechazas [DESC] de &lt;nolink&gt;[NAME]&lt;/nolink&gt;.
</string>
<string name="GroupMoneyTotal">
Total
diff --git a/indra/newview/skins/default/xui/fr/floater_hardware_settings.xml b/indra/newview/skins/default/xui/fr/floater_hardware_settings.xml
index e3d604477c..8ad301823b 100644
--- a/indra/newview/skins/default/xui/fr/floater_hardware_settings.xml
+++ b/indra/newview/skins/default/xui/fr/floater_hardware_settings.xml
@@ -14,6 +14,9 @@
<combo_box.item label="8x" name="8x"/>
<combo_box.item label="16x" name="16x"/>
</combo_box>
+ <text name="antialiasing restart">
+ (redémarrage du client requis)
+ </text>
<spinner label="Gamma :" name="gamma"/>
<text left="217" name="(brightness, lower is brighter)">
(0 = défaut, valeur faible = plus lumineux)
diff --git a/indra/newview/skins/default/xui/fr/floater_preferences.xml b/indra/newview/skins/default/xui/fr/floater_preferences.xml
index 052e43388b..0f9fb1334b 100644
--- a/indra/newview/skins/default/xui/fr/floater_preferences.xml
+++ b/indra/newview/skins/default/xui/fr/floater_preferences.xml
@@ -5,10 +5,12 @@
<tab_container name="pref core">
<panel label="Général" name="general"/>
<panel label="Graphiques" name="display"/>
- <panel label="Confidentialité" name="im"/>
<panel label="Son et Média" name="audio"/>
<panel label="Chat" name="chat"/>
+ <panel label="Affichage/Déplacement" name="move"/>
<panel label="Notifications" name="msgs"/>
+ <panel label="Couleurs" name="colors"/>
+ <panel label="Confidentialité" name="im"/>
<panel label="Configuration" name="input"/>
<panel label="Avancées" name="advanced1"/>
</tab_container>
diff --git a/indra/newview/skins/default/xui/fr/floater_region_debug_console.xml b/indra/newview/skins/default/xui/fr/floater_region_debug_console.xml
new file mode 100644
index 0000000000..1747155b60
--- /dev/null
+++ b/indra/newview/skins/default/xui/fr/floater_region_debug_console.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="region_debug_console" title="Débogage de région"/>
diff --git a/indra/newview/skins/default/xui/fr/menu_inventory_gear_default.xml b/indra/newview/skins/default/xui/fr/menu_inventory_gear_default.xml
index 73770dce5f..f28918ae14 100644
--- a/indra/newview/skins/default/xui/fr/menu_inventory_gear_default.xml
+++ b/indra/newview/skins/default/xui/fr/menu_inventory_gear_default.xml
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<menu name="menu_gear_default">
+<toggleable_menu name="menu_gear_default">
<menu_item_call label="Nouvelle fenêtre d&apos;inventaire" name="new_window"/>
- <menu_item_call label="Trier par nom" name="sort_by_name"/>
- <menu_item_call label="Trier en commençant par le plus récent" name="sort_by_recent"/>
+ <menu_item_check label="Trier par nom" name="sort_by_name"/>
+ <menu_item_check label="Trier en commençant par le plus récent" name="sort_by_recent"/>
+ <menu_item_check label="Dossiers système en premier" name="sort_system_folders_to_top"/>
<menu_item_call label="Afficher les filtres" name="show_filters"/>
<menu_item_call label="Réinitialiser les filtres" name="reset_filters"/>
<menu_item_call label="Fermer tous les dossiers" name="close_folders"/>
@@ -12,4 +13,4 @@
<menu_item_call label="Trouver l&apos;original" name="Find Original"/>
<menu_item_call label="Trouver tous les liens" name="Find All Links"/>
<menu_item_call label="Vider la corbeille" name="empty_trash"/>
-</menu>
+</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/fr/menu_viewer.xml b/indra/newview/skins/default/xui/fr/menu_viewer.xml
index 4e09a9bec3..fb4ab314af 100644
--- a/indra/newview/skins/default/xui/fr/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/fr/menu_viewer.xml
@@ -12,6 +12,12 @@
<menu_item_check label="Mon inventaire" name="ShowSidetrayInventory"/>
<menu_item_check label="Mes gestes" name="Gestures"/>
<menu_item_check label="Ma voix" name="ShowVoice"/>
+ <menu label="Déplacement" name="Movement">
+ <menu_item_call label="M&apos;asseoir" name="Sit Down Here"/>
+ <menu_item_check label="Voler" name="Fly"/>
+ <menu_item_check label="Toujours courir" name="Always Run"/>
+ <menu_item_call label="Arrêter mon animation" name="Stop Animating My Avatar"/>
+ </menu>
<menu label="Mon statut" name="Status">
<menu_item_call label="Absent" name="Set Away"/>
<menu_item_call label="Occupé" name="Set Busy"/>
@@ -47,6 +53,7 @@
<menu_item_check label="Propriétaires de terrains" name="Land Owners"/>
<menu_item_check label="Coordonnées" name="Coordinates"/>
<menu_item_check label="Propriétés de la parcelle" name="Parcel Properties"/>
+ <menu_item_check label="Menu Avancé" name="Show Advanced Menu"/>
</menu>
<menu_item_call label="Me téléporter chez moi" name="Teleport Home"/>
<menu_item_call label="Définir le domicile ici" name="Set Home to Here"/>
@@ -123,7 +130,6 @@
<menu_item_check label="Activer les astuces" name="Enable Hints"/>
</menu>
<menu label="Avancé" name="Advanced">
- <menu_item_call label="Arrêter mon animation" name="Stop Animating My Avatar"/>
<menu_item_call label="Refixer les textures" name="Rebake Texture"/>
<menu_item_call label="Taille de l&apos;interface par défaut" name="Set UI Size to Default"/>
<menu_item_call label="Définir la taille de la fenêtre…" name="Set Window Size..."/>
@@ -177,8 +183,7 @@
<menu_item_check label="Rechercher" name="Search"/>
<menu_item_call label="Relâcher les touches" name="Release Keys"/>
<menu_item_call label="Taille de l&apos;interface par défaut" name="Set UI Size to Default"/>
- <menu_item_check label="Toujours courir" name="Always Run"/>
- <menu_item_check label="Voler" name="Fly"/>
+ <menu_item_check label="Afficher le menu Avancé - raccourci existant" name="Show Advanced Menu - legacy shortcut"/>
<menu_item_call label="Fermer la fenêtre" name="Close Window"/>
<menu_item_call label="Fermer toutes les fenêtres" name="Close All Windows"/>
<menu_item_call label="Photo sur disque" name="Snapshot to Disk"/>
@@ -196,7 +201,6 @@
<menu_item_call label="Zoomer en avant" name="Zoom In"/>
<menu_item_call label="Zoom par défaut" name="Zoom Default"/>
<menu_item_call label="Zoomer en arrière" name="Zoom Out"/>
- <menu_item_check label="Afficher le menu Avancé" name="Show Advanced Menu"/>
</menu>
<menu_item_call label="Afficher les paramètres de débogage" name="Debug Settings"/>
<menu_item_check label="Afficher le menu Développeurs" name="Debug Mode"/>
@@ -311,8 +315,7 @@
<menu_item_call label="Imprimer les infos sur l&apos;objet sélectionné" name="Print Selected Object Info"/>
<menu_item_call label="Imprimer les infos sur l&apos;avatar" name="Print Agent Info"/>
<menu_item_call label="Statistiques de mémoire" name="Memory Stats"/>
- <menu_item_check label="Pilotage auto par double-clic" name="Double-ClickAuto-Pilot"/>
- <menu_item_check label="Téléportation par double-clic" name="DoubleClick Teleport"/>
+ <menu_item_check label="Console de débogage de région" name="Region Debug Console"/>
<menu_item_check label="Débogage SelectMgr" name="Debug SelectMgr"/>
<menu_item_check label="Débogage clics" name="Debug Clicks"/>
<menu_item_check label="Débogage des vues" name="Debug Views"/>
@@ -324,8 +327,6 @@
<menu label="XUI" name="XUI">
<menu_item_call label="Recharger les paramètres de couleurs" name="Reload Color Settings"/>
<menu_item_call label="Afficher le test de police" name="Show Font Test"/>
- <menu_item_call label="Charger à partir de XML" name="Load from XML"/>
- <menu_item_call label="Enregistrer en XML" name="Save to XML"/>
<menu_item_check label="Afficher les noms XUI" name="Show XUI Names"/>
<menu_item_call label="Envoyer des IM tests" name="Send Test IMs"/>
<menu_item_call label="Vider les caches de noms" name="Flush Names Caches"/>
@@ -365,9 +366,9 @@
<menu_item_call label="Compresser les images" name="Compress Images"/>
<menu_item_check label="Output Debug Minidump" name="Output Debug Minidump"/>
<menu_item_check label="Console Window on next Run" name="Console Window"/>
- <menu_item_check label="Afficher le menu Admin" name="View Admin Options"/>
<menu_item_call label="Demander le statut Admin" name="Request Admin Options"/>
<menu_item_call label="Quitter le statut Admin" name="Leave Admin Options"/>
+ <menu_item_check label="Afficher le menu Admin" name="View Admin Options"/>
</menu>
<menu label="Admin" name="Admin">
<menu label="Object">
diff --git a/indra/newview/skins/default/xui/fr/notifications.xml b/indra/newview/skins/default/xui/fr/notifications.xml
index 341cc9830d..ec362d7f22 100644
--- a/indra/newview/skins/default/xui/fr/notifications.xml
+++ b/indra/newview/skins/default/xui/fr/notifications.xml
@@ -387,6 +387,9 @@ Remarque : cela videra le cache.
<notification name="ChangeSkin">
Le nouveau thème apparaîtra après le redémarrage de [APP_NAME].
</notification>
+ <notification name="ChangeLanguage">
+ Le changement de langue sera effectué au redémarrage de [APP_NAME].
+ </notification>
<notification name="GoToAuctionPage">
Aller à la page web de [SECOND_LIFE] pour voir le détail des enchères ou enchérir ?
<url name="url">
@@ -599,6 +602,10 @@ Assurez-vous que le fichier a l&apos;extension correcte.
Impossible de trouver les données dans l&apos;en-tête WAV :
[FILE]
</notification>
+ <notification name="SoundFileInvalidChunkSize">
+ Taille de fragment incorrecte dans le fichier WAV :
+[FILE]
+ </notification>
<notification name="SoundFileInvalidTooLong">
Le fichier audio est trop long (10 secondes maximum) :
[FILE]
@@ -1325,6 +1332,16 @@ Cette mise à jour n&apos;est pas requise mais si vous voulez une meilleure perf
Télécharger vers le dossier Applications ?
<usetemplate name="okcancelbuttons" notext="Continuer" yestext="Télécharger"/>
</notification>
+ <notification name="FailedUpdateInstall">
+ Une erreur est survenue lors de l&apos;installation de la mise à jour du client.
+Veuillez télécharger et installer la dernière version du client à la page Web
+http://secondlife.com/download.
+ <usetemplate name="okbutton" yestext="OK"/>
+ </notification>
+ <notification name="DownloadBackground">
+ Une mise à jour de [APP_NAME] a été téléchargée.
+Elle sera appliquée au prochain redémarrage de [APP_NAME].
+ </notification>
<notification name="DeedObjectToGroup">
Si vous cédez cet objet, le groupe :
* recevra les L$ versés pour l&apos;objet ;
@@ -2465,7 +2482,7 @@ Veuillez réessayer dans quelques minutes.
</notification>
<notification name="OfferCallingCard">
[NAME] vous offre sa carte de visite.
-Cela ajoute un marque-page dans votre inventaire, ce qui vous permet d&apos;envoyer rapidement un IM à ce résident.
+Un signet sera ajouté dans votre inventaire afin que vous puissiez envoyer rapidement un IM à ce résident.
<form name="form">
<button name="Accept" text="Accepter"/>
<button name="Decline" text="Refuser"/>
diff --git a/indra/newview/skins/default/xui/fr/panel_edit_gloves.xml b/indra/newview/skins/default/xui/fr/panel_edit_gloves.xml
index 7f02222bef..68a7ac54e2 100644
--- a/indra/newview/skins/default/xui/fr/panel_edit_gloves.xml
+++ b/indra/newview/skins/default/xui/fr/panel_edit_gloves.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_gloves_panel">
<panel name="avatar_gloves_color_panel">
- <texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image"/>
+ <texture_picker label="Texture" name="Fabric" tool_tip="Cliquez pour sélectionner une image"/>
<color_swatch label="Coul./Teinte" name="Color/Tint" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs" width="80"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/fr/panel_edit_jacket.xml b/indra/newview/skins/default/xui/fr/panel_edit_jacket.xml
index 0a87471db8..7e467b130c 100644
--- a/indra/newview/skins/default/xui/fr/panel_edit_jacket.xml
+++ b/indra/newview/skins/default/xui/fr/panel_edit_jacket.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_jacket_panel">
<panel name="avatar_jacket_color_panel">
- <texture_picker label="Tissu (haut)" name="Upper Fabric" tool_tip="Cliquez pour sélectionner une image"/>
- <texture_picker label="Tissu (bas)" name="Lower Fabric" tool_tip="Cliquez pour sélectionner une image"/>
+ <texture_picker label="Texture (haut)" name="Upper Fabric" tool_tip="Cliquez pour sélectionner une image"/>
+ <texture_picker label="Texture (bas)" name="Lower Fabric" tool_tip="Cliquez pour sélectionner une image"/>
<color_swatch label="Coul./Teinte" name="Color/Tint" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs" width="80"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/fr/panel_edit_pants.xml b/indra/newview/skins/default/xui/fr/panel_edit_pants.xml
index b9f81278e2..60d8e947f8 100644
--- a/indra/newview/skins/default/xui/fr/panel_edit_pants.xml
+++ b/indra/newview/skins/default/xui/fr/panel_edit_pants.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_pants_panel">
<panel name="avatar_pants_color_panel">
- <texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image"/>
+ <texture_picker label="Texture" name="Fabric" tool_tip="Cliquez pour sélectionner une image"/>
<color_swatch label="Coul./Teinte" name="Color/Tint" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs" width="80"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/fr/panel_edit_shirt.xml b/indra/newview/skins/default/xui/fr/panel_edit_shirt.xml
index e4e66db2ed..9a263f6148 100644
--- a/indra/newview/skins/default/xui/fr/panel_edit_shirt.xml
+++ b/indra/newview/skins/default/xui/fr/panel_edit_shirt.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_shirt_panel">
<panel name="avatar_shirt_color_panel">
- <texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image"/>
+ <texture_picker label="Texture" name="Fabric" tool_tip="Cliquez pour sélectionner une image"/>
<color_swatch label="Coul./Teinte" name="Color/Tint" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs" width="80"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/fr/panel_edit_shoes.xml b/indra/newview/skins/default/xui/fr/panel_edit_shoes.xml
index 6fca0fe121..3eb70923ef 100644
--- a/indra/newview/skins/default/xui/fr/panel_edit_shoes.xml
+++ b/indra/newview/skins/default/xui/fr/panel_edit_shoes.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_shoes_panel">
<panel name="avatar_shoes_color_panel">
- <texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image"/>
+ <texture_picker label="Texture" name="Fabric" tool_tip="Cliquez pour sélectionner une image"/>
<color_swatch label="Coul./Teinte" name="Color/Tint" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs" width="80"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/fr/panel_edit_skirt.xml b/indra/newview/skins/default/xui/fr/panel_edit_skirt.xml
index 65fed2fbf4..f562d67937 100644
--- a/indra/newview/skins/default/xui/fr/panel_edit_skirt.xml
+++ b/indra/newview/skins/default/xui/fr/panel_edit_skirt.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_skirt_panel">
<panel name="avatar_skirt_color_panel">
- <texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image"/>
+ <texture_picker label="Texture" name="Fabric" tool_tip="Cliquez pour sélectionner une image"/>
<color_swatch label="Coul./Teinte" name="Color/Tint" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs" width="80"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/fr/panel_edit_socks.xml b/indra/newview/skins/default/xui/fr/panel_edit_socks.xml
index b9e9a07b8c..f97047ae28 100644
--- a/indra/newview/skins/default/xui/fr/panel_edit_socks.xml
+++ b/indra/newview/skins/default/xui/fr/panel_edit_socks.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_socks_panel">
<panel name="avatar_socks_color_panel">
- <texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image"/>
+ <texture_picker label="Texture" name="Fabric" tool_tip="Cliquez pour sélectionner une image"/>
<color_swatch label="Coul./Teinte" name="Color/Tint" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs" width="80"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/fr/panel_edit_underpants.xml b/indra/newview/skins/default/xui/fr/panel_edit_underpants.xml
index 7eddbd93f6..c83ce04885 100644
--- a/indra/newview/skins/default/xui/fr/panel_edit_underpants.xml
+++ b/indra/newview/skins/default/xui/fr/panel_edit_underpants.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_underpants_panel">
<panel name="avatar_underpants_color_panel">
- <texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image"/>
+ <texture_picker label="Texture" name="Fabric" tool_tip="Cliquez pour sélectionner une image"/>
<color_swatch label="Coul./Teinte" name="Color/Tint" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs" width="80"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/fr/panel_edit_undershirt.xml b/indra/newview/skins/default/xui/fr/panel_edit_undershirt.xml
index e6bac22c23..689b7b81f4 100644
--- a/indra/newview/skins/default/xui/fr/panel_edit_undershirt.xml
+++ b/indra/newview/skins/default/xui/fr/panel_edit_undershirt.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_undershirt_panel">
<panel name="avatar_undershirt_color_panel">
- <texture_picker label="Tissu" name="Fabric" tool_tip="Cliquez pour sélectionner une image"/>
+ <texture_picker label="Texture" name="Fabric" tool_tip="Cliquez pour sélectionner une image"/>
<color_swatch label="Coul./Teinte" name="Color/Tint" tool_tip="Cliquez pour ouvrir le sélecteur de couleurs" width="80"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/fr/panel_main_inventory.xml b/indra/newview/skins/default/xui/fr/panel_main_inventory.xml
index 3e7225d8ac..db7d254b7a 100644
--- a/indra/newview/skins/default/xui/fr/panel_main_inventory.xml
+++ b/indra/newview/skins/default/xui/fr/panel_main_inventory.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel label="Choses" name="main inventory panel">
<panel.string name="ItemcountFetching">
- Récupération : [ITEM_COUNT] articles... [FILTER]
+ [ITEM_COUNT] articles récupérés... [FILTER]
</panel.string>
<panel.string name="ItemcountCompleted">
[ITEM_COUNT] articles [FILTER]
diff --git a/indra/newview/skins/default/xui/fr/panel_notify_textbox.xml b/indra/newview/skins/default/xui/fr/panel_notify_textbox.xml
new file mode 100644
index 0000000000..a37770e184
--- /dev/null
+++ b/indra/newview/skins/default/xui/fr/panel_notify_textbox.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="instant_message" name="panel_notify_textbox">
+ <string name="message_max_lines_count" value="7"/>
+ <panel label="info_panel" name="info_panel">
+ <text_editor name="message" value="message"/>
+ parse_urls=&quot;false&quot;
+ <button label="Soumettre" name="btn_submit"/>
+ </panel>
+ <panel label="control_panel" name="control_panel"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_people.xml b/indra/newview/skins/default/xui/fr/panel_people.xml
index 0ca4208282..eecbabae2b 100644
--- a/indra/newview/skins/default/xui/fr/panel_people.xml
+++ b/indra/newview/skins/default/xui/fr/panel_people.xml
@@ -2,9 +2,9 @@
<!-- Side tray panel -->
<panel label="Résidents" name="people_panel">
<string name="no_recent_people" value="Personne de récent. Pour rechercher des résidents avec qui passer du temps, voir [secondlife:///app/search/people Rechercher] ou [secondlife:///app/worldmap Carte du monde]."/>
- <string name="no_filtered_recent_people" value="Vous n&apos;avez pas trouvé ce que vous cherchiez ? Essayez [secondlife:///app/search/people/Rechercher [SEARCH_TERM]]."/>
+ <string name="no_filtered_recent_people" value="Vous n&apos;avez pas trouvé ce que vous cherchiez ? Essayez [secondlife:///app/search/people/[SEARCH_TERM] Rechercher]."/>
<string name="no_one_near" value="Personne près de vous. Pour rechercher des résidents avec qui passer du temps, voir [secondlife:///app/search/people Rechercher] ou [secondlife:///app/worldmap Carte du monde]."/>
- <string name="no_one_filtered_near" value="Vous n&apos;avez pas trouvé ce que vous cherchiez ? Essayez [secondlife:///app/search/people/Rechercher [SEARCH_TERM]]."/>
+ <string name="no_one_filtered_near" value="Vous n&apos;avez pas trouvé ce que vous cherchiez ? Essayez [secondlife:///app/search/people/[SEARCH_TERM] Rechercher]."/>
<string name="no_friends_online" value="Pas d&apos;amis connectés"/>
<string name="no_friends" value="Pas d&apos;amis"/>
<string name="no_friends_msg">
@@ -12,17 +12,17 @@
Pour rechercher des résidents avec qui passer du temps, utilisez [secondlife:///app/worldmap Carte du monde].
</string>
<string name="no_filtered_friends_msg">
- Vous n&apos;avez pas trouvé ce que vous cherchiez ? Essayez [secondlife:///app/search/people/Rechercher [SEARCH_TERM]].
+ Vous n&apos;avez pas trouvé ce que vous cherchiez ? Essayez [secondlife:///app/search/people/[SEARCH_TERM] Rechercher].
</string>
<string name="people_filter_label" value="Filtrer les personnes"/>
<string name="groups_filter_label" value="Filtrer les groupes"/>
- <string name="no_filtered_groups_msg" value="Vous n&apos;avez pas trouvé ce que vous cherchiez ? Essayez [secondlife:///app/search/groups/Rechercher [SEARCH_TERM]]."/>
+ <string name="no_filtered_groups_msg" value="Vous n&apos;avez pas trouvé ce que vous cherchiez ? Essayez [secondlife:///app/search/groups/[SEARCH_TERM] Rechercher]."/>
<string name="no_groups_msg" value="Vous souhaitez trouver des groupes à rejoindre ? Utilisez [secondlife:///app/search/groups Rechercher]."/>
<filter_editor label="Filtre" name="filter_input"/>
<tab_container name="tabs">
<panel label="PRÈS DE VOUS" name="nearby_panel">
<panel label="bottom_panel" name="bottom_panel">
- <button name="nearby_view_sort_btn" tool_tip="Options"/>
+ <menu_button name="nearby_view_sort_btn" tool_tip="Options"/>
<button name="add_friend_btn" tool_tip="Ajouter le résident sélectionné à votre liste d&apos;amis"/>
</panel>
</panel>
@@ -34,27 +34,27 @@ Pour rechercher des résidents avec qui passer du temps, utilisez [secondlife://
<panel label="bottom_panel" name="bottom_panel">
<layout_stack name="bottom_panel">
<layout_panel name="options_gear_btn_panel">
- <button name="friends_viewsort_btn" tool_tip="Afficher d&apos;autres options"/>
+ <menu_button name="friends_viewsort_btn" tool_tip="Afficher d&apos;autres options"/>
</layout_panel>
<layout_panel name="add_btn_panel">
<button name="add_btn" tool_tip="Proposer à un résident de devenir votre ami"/>
</layout_panel>
<layout_panel name="trash_btn_panel">
- <dnd_button name="trash_btn" tool_tip="Supprimer le résident sélectionné de votre liste d&apos;amis"/>
+ <dnd_button name="del_btn" tool_tip="Supprimer le résident sélectionné de votre liste d&apos;amis."/>
</layout_panel>
</layout_stack>
</panel>
</panel>
<panel label="MES GROUPES" name="groups_panel">
<panel label="bottom_panel" name="bottom_panel">
- <button name="groups_viewsort_btn" tool_tip="Options"/>
+ <menu_button name="groups_viewsort_btn" tool_tip="Options"/>
<button name="plus_btn" tool_tip="Rejoindre/créer un nouveau groupe"/>
<button name="activate_btn" tool_tip="Activer le groupe sélectionné"/>
</panel>
</panel>
<panel label="RÉCENT" name="recent_panel">
<panel label="bottom_panel" name="bottom_panel">
- <button name="recent_viewsort_btn" tool_tip="Options"/>
+ <menu_button name="recent_viewsort_btn" tool_tip="Options"/>
<button name="add_friend_btn" tool_tip="Ajouter le résident sélectionné à votre liste d&apos;amis"/>
</panel>
</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/fr/panel_preferences_advanced.xml
index 9af3a8a5d8..3468afbafe 100644
--- a/indra/newview/skins/default/xui/fr/panel_preferences_advanced.xml
+++ b/indra/newview/skins/default/xui/fr/panel_preferences_advanced.xml
@@ -3,35 +3,16 @@
<panel.string name="aspect_ratio_text">
[NUM]:[DEN]
</panel.string>
- <panel.string name="middle_mouse">
- Bouton central de la souris
- </panel.string>
- <slider label="Angle de vue" name="camera_fov"/>
- <slider label="Distance" name="camera_offset_scale"/>
- <text name="heading2">
- Positionnement automatique pour :
- </text>
- <check_box label="Construire/Modifier" name="edit_camera_movement" tool_tip="Utilisez le positionnement automatique de la caméra quand vous accédez au mode de modification et quand vous le quittez"/>
- <check_box label="Apparence" name="appearance_camera_movement" tool_tip="Utiliser le positionnement automatique de la caméra quand je suis en mode Édition"/>
- <check_box initial_value="true" label="Panneau latéral" name="appearance_sidebar_positioning" tool_tip="Positionnement auto de la caméra pour le panneau latéral"/>
- <check_box label="Afficher en vue subjective" name="first_person_avatar_visible"/>
- <check_box label="Les touches de direction me font toujours me déplacer" name="arrow_keys_move_avatar_check"/>
- <check_box label="Appuyer deux fois et maintenir enfoncé pour courir" name="tap_tap_hold_to_run"/>
- <check_box label="Faire bouger les lèvres de l&apos;avatar quand il parle" name="enable_lip_sync"/>
- <check_box label="Bulles de chat" name="bubble_text_chat"/>
- <slider label="Opacité" name="bubble_chat_opacity"/>
- <color_swatch name="background" tool_tip="Choisir la couleur des bulles de chat"/>
<text name="UI Size:">
- Taille de l&apos;interface
+ Taille d&apos;interface :
</text>
<check_box label="Afficher les erreurs de script dans :" name="show_script_errors"/>
<radio_group name="show_location">
<radio_item label="Chat près de moi" name="0"/>
<radio_item label="Autre fenêtre" name="1"/>
</radio_group>
- <check_box label="Activer/désactiver la fonction Parler quand j&apos;appuie sur :" name="push_to_talk_toggle_check" tool_tip="En mode bascule, appuyez une fois sur la touche de contrôle de la fonction, puis relâchez-la pour activer/désactiver votre micro. Si vous n&apos;êtes pas en mode bascule, le micro ne diffuse votre voix que quand vous maintenez la touche de contrôle de la fonction enfoncée."/>
- <line_editor label="Touche de contrôle de la fonction Appuyer pour parler" name="modifier_combo"/>
- <button label="Définir la touche" name="set_voice_hotkey_button"/>
- <button label="Bouton central de la souris" name="set_voice_middlemouse_button" tool_tip="Réinitialiser sur le bouton central de la souris"/>
- <button label="Autres accessoires" name="joystick_setup_button"/>
+ <check_box label="Clients multiples autorisés" name="allow_multiple_viewer_check"/>
+ <check_box label="Liste de sélection de grille affichée à la connexion" name="show_grid_selection_check"/>
+ <check_box label="Menu Avancé affiché" name="show_advanced_menu_check"/>
+ <check_box label="Menu Développeurs affiché" name="show_develop_menu_check"/>
</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_chat.xml b/indra/newview/skins/default/xui/fr/panel_preferences_chat.xml
index a482fa99d0..4b3fc35150 100644
--- a/indra/newview/skins/default/xui/fr/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/fr/panel_preferences_chat.xml
@@ -8,44 +8,10 @@
<radio_item label="Moyenne" name="radio2" value="1"/>
<radio_item label="Grande" name="radio3" value="2"/>
</radio_group>
- <text name="font_colors">
- Couleurs de police :
- </text>
- <color_swatch label="Vous" name="user"/>
- <text name="text_box1">
- Moi
- </text>
- <color_swatch label="Avatars" name="agent"/>
- <text name="text_box2">
- Avatars
- </text>
- <color_swatch label="IM" name="im"/>
- <text name="text_box3">
- IM
- </text>
- <color_swatch label="Système" name="system"/>
- <text name="text_box4">
- Système
- </text>
- <color_swatch label="Erreurs de script" name="script_error"/>
- <text name="text_box5">
- Erreurs de script
- </text>
- <color_swatch label="Objets" name="objects"/>
- <text name="text_box6">
- Objets
- </text>
- <color_swatch label="Propriétaire" name="owner"/>
- <text name="text_box7">
- Propriétaire
- </text>
- <color_swatch label="URL" name="links"/>
- <text name="text_box9">
- URL
- </text>
<check_box initial_value="true" label="Jouer l&apos;animation clavier quand vous écrivez" name="play_typing_animation"/>
<check_box label="M&apos;envoyer les IM par e-mail une fois déconnecté" name="send_im_to_email"/>
<check_box label="Activer l&apos;historique des chats et des IM en texte brut" name="plain_text_chat_history"/>
+ <check_box label="Bulles de chat" name="bubble_text_chat"/>
<text name="show_ims_in_label">
Afficher les IM dans :
</text>
@@ -56,6 +22,13 @@
<radio_item label="Plusieurs fenêtres" name="radio" value="0"/>
<radio_item label="Onglets" name="radio2" value="1"/>
</radio_group>
+ <text name="disable_toast_label">
+ Activer les popups de chat entrant :
+ </text>
+ <check_box label="Chats de groupe" name="EnableGroupChatPopups" tool_tip="Cocher cette case pour qu&apos;un popup s&apos;affiche à réception d&apos;un message de chat de groupe."/>
+ <check_box label="Chats IM" name="EnableIMChatPopups" tool_tip="Cocher cette case pour qu&apos;un popup s&apos;affiche à réception d&apos;un message instantané."/>
+ <spinner label="Durée de vie du popup Chat près de moi :" name="nearby_toasts_lifetime"/>
+ <spinner label="Disparition progressive du popup Chat près de moi :" name="nearby_toasts_fadingtime"/>
<check_box label="Utiliser la traduction automatique lors des chats (fournie par Google)" name="translate_chat_checkbox"/>
<text name="translate_language_text">
Traduire le chat en :
diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_colors.xml b/indra/newview/skins/default/xui/fr/panel_preferences_colors.xml
new file mode 100644
index 0000000000..e94bb08c9c
--- /dev/null
+++ b/indra/newview/skins/default/xui/fr/panel_preferences_colors.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Couleurs" name="colors_panel">
+ <text name="effects_color_textbox">
+ Mes effets (faisceau de sélection lumineux) :
+ </text>
+ <color_swatch name="effect_color_swatch" tool_tip="Cliquer pour ouvrir le sélecteur de couleurs."/>
+ <text name="font_colors">
+ Couleurs de la police du chat :
+ </text>
+ <text name="text_box1">
+ Moi
+ </text>
+ <text name="text_box2">
+ Autres résidents
+ </text>
+ <text name="text_box3">
+ Objets
+ </text>
+ <text name="text_box4">
+ Système
+ </text>
+ <text name="text_box5">
+ Erreurs
+ </text>
+ <text name="text_box7">
+ Propriétaire
+ </text>
+ <text name="text_box9">
+ URL
+ </text>
+ <text name="bubble_chat">
+ Arrière-plan des bulles de chat :
+ </text>
+ <color_swatch name="background" tool_tip="Choisir la couleur des bulles de chat."/>
+ <slider label="Opacité :" name="bubble_chat_opacity"/>
+ <text name="floater_opacity">
+ Opacité des fenêtres flottantes :
+ </text>
+ <slider label="Actives :" name="active"/>
+ <slider label="Inactives :" name="inactive"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_general.xml b/indra/newview/skins/default/xui/fr/panel_preferences_general.xml
index 30389a0ef9..2786798173 100644
--- a/indra/newview/skins/default/xui/fr/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/fr/panel_preferences_general.xml
@@ -48,13 +48,18 @@
<check_box label="Noms d&apos;utilisateur" name="show_slids" tool_tip="Afficher le nom d&apos;utilisateur, comme bobsmith123."/>
<check_box label="Titres de groupe" name="show_all_title_checkbox1" tool_tip="Afficher les titres de groupe, comme Officier ou Membre."/>
<check_box label="Mettre mes amis en surbrillance" name="show_friends" tool_tip="Mettre en surbrillance l&apos;affichage des noms de vos amis."/>
- <text name="effects_color_textbox">
- Mes effets :
+ <check_box label="Voir les noms d&apos;affichage" name="display_names_check" tool_tip="Cocher pour utiliser les noms d&apos;affichage dans les chats, les IM, l&apos;affichage des noms, etc."/>
+ <check_box label="Activer les astuces de l&apos;interface" name="viewer_hints_check"/>
+ <text name="inworld_typing_rg_label">
+ Appuyer sur les touches lettre :
</text>
+ <radio_group name="inworld_typing_preference">
+ <radio_item label="Lance le chat local" name="radio_start_chat" value="1"/>
+ <radio_item label="Affecte le déplacement (ZQSD/WASD)" name="radio_move" value="0"/>
+ </radio_group>
<text name="title_afk_text">
Me montrer absent après :
</text>
- <color_swatch label="" name="effect_color_swatch" tool_tip="Cliquer pour ouvrir le sélecteur de couleurs"/>
<combo_box label="Me montrer absent après :" name="afk">
<combo_box.item label="2 minutes" name="item0"/>
<combo_box.item label="5 minutes" name="item1"/>
@@ -62,7 +67,6 @@
<combo_box.item label="30 minutes" name="item3"/>
<combo_box.item label="Jamais" name="item4"/>
</combo_box>
- <check_box label="Voir les noms d&apos;affichage" name="display_names_check" tool_tip="Cocher pour utiliser les noms d&apos;affichage dans les chats, les IM, l&apos;affichage des noms, etc."/>
<text name="text_box3">
Réponse si occupé(e) :
</text>
diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/fr/panel_preferences_graphics1.xml
index 0c8d957f5b..c90edd443e 100644
--- a/indra/newview/skins/default/xui/fr/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/fr/panel_preferences_graphics1.xml
@@ -25,6 +25,7 @@
<text name="ShadersText">
Effets :
</text>
+ <check_box initial_value="true" label="Eau transparente" name="TransparentWater"/>
<check_box initial_value="true" label="Placage de relief et brillance" name="BumpShiny"/>
<check_box initial_value="true" label="Effets de base" name="BasicShaders" tool_tip="La désactivation de cette option peut éviter le plantage de certains pilotes de cartes graphiques"/>
<check_box initial_value="true" label="Effets atmosphériques" name="WindLightUseAtmosShaders"/>
@@ -42,8 +43,8 @@
<text name="DrawDistanceMeterText2">
m
</text>
- <slider label="Nombre de particules max. :" label_width="147" name="MaxParticleCount"/>
- <slider label="Nb max d&apos;avatars non éloignés en 2D :" name="MaxNumberAvatarDrawn"/>
+ <slider label="Nb max. de particules :" label_width="147" name="MaxParticleCount"/>
+ <slider label="Avatars max. non éloignés en 2D :" name="MaxNumberAvatarDrawn"/>
<slider label="Qualité post-traitement :" name="RenderPostProcess"/>
<text name="MeshDetailText">
Détails des rendus :
diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_move.xml b/indra/newview/skins/default/xui/fr/panel_preferences_move.xml
new file mode 100644
index 0000000000..5f1b206a39
--- /dev/null
+++ b/indra/newview/skins/default/xui/fr/panel_preferences_move.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Déplacement" name="move_panel">
+ <slider label="Angle de vue" name="camera_fov"/>
+ <slider label="Distance" name="camera_offset_scale"/>
+ <text name="heading2">
+ Positionnement automatique pour :
+ </text>
+ <check_box label="Construire/Modifier" name="edit_camera_movement" tool_tip="Utiliser le positionnement automatique de la caméra lorsque vous entrez en mode de modification et le quittez."/>
+ <check_box label="Apparence" name="appearance_camera_movement" tool_tip="Utiliser le positionnement automatique de la caméra en mode de modification."/>
+ <check_box initial_value="true" label="Panneau latéral" name="appearance_sidebar_positioning" tool_tip="Utiliser le positionnement automatique de la caméra pour le panneau latéral."/>
+ <check_box label="Afficher en vue subjective" name="first_person_avatar_visible"/>
+ <text name=" Mouse Sensitivity">
+ Sensibilité de la souris en vue subjective :
+ </text>
+ <check_box label="Inverser" name="invert_mouse"/>
+ <check_box label="Les touches de direction me font toujours me déplacer" name="arrow_keys_move_avatar_check"/>
+ <check_box label="Appuyer deux fois et maintenir enfoncé pour courir" name="tap_tap_hold_to_run"/>
+ <check_box label="Double-cliquer pour :" name="double_click_chkbox"/>
+ <radio_group name="double_click_action">
+ <radio_item label="Téléportation" name="radio_teleport"/>
+ <radio_item label="Pilotage auto" name="radio_autopilot"/>
+ </radio_group>
+ <button label="Autres accessoires" name="joystick_setup_button"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/fr/panel_preferences_privacy.xml
index f14ccc3a8e..6a4c77a10e 100644
--- a/indra/newview/skins/default/xui/fr/panel_preferences_privacy.xml
+++ b/indra/newview/skins/default/xui/fr/panel_preferences_privacy.xml
@@ -10,17 +10,20 @@
<check_box label="Seuls mes amis et groupes voient quand je suis en ligne" name="online_visibility"/>
<check_box label="Seuls mes amis et groupes peuvent m&apos;appeler ou m&apos;envoyer un IM" name="voice_call_friends_only_check"/>
<check_box label="Fermer le micro à la fin d&apos;un appel" name="auto_disengage_mic_check"/>
- <check_box label="Accepter les cookies" name="cookies_enabled"/>
<text name="Logs:">
- Journaux :
+ Journaux de chat :
</text>
<check_box label="Sauvegarder les chats près de moi sur mon ordinateur" name="log_nearby_chat"/>
<check_box label="Sauvegarder les IM sur mon ordinateur" name="log_instant_messages"/>
- <check_box label="Inclure les dates et heures" name="show_timestamps_check_im"/>
+ <check_box label="Inclure la date et l&apos;heure pour chaque ligne du journal de chat" name="show_timestamps_check_im"/>
+ <check_box label="Inclure la date dans le nom du fichier journal" name="logfile_name_datestamp"/>
<text name="log_path_desc">
Emplacement :
</text>
<line_editor left="308" name="log_path_string" right="-20"/>
<button label="Parcourir" label_selected="Parcourir" name="log_path_button" width="150"/>
<button label="Liste des ignorés" name="block_list"/>
+ <text name="block_list_label">
+ (personnes et/ou objets que vous avez ignorés)
+ </text>
</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_setup.xml b/indra/newview/skins/default/xui/fr/panel_preferences_setup.xml
index c1cec7537e..8fa499d14a 100644
--- a/indra/newview/skins/default/xui/fr/panel_preferences_setup.xml
+++ b/indra/newview/skins/default/xui/fr/panel_preferences_setup.xml
@@ -1,12 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel label="Configuration" name="Input panel">
- <text name="Mouselook:">
- Vue subjective :
- </text>
- <text name=" Mouse Sensitivity">
- Sensibilité de la souris
- </text>
- <check_box label="Inverser" name="invert_mouse"/>
<text name="Network:">
Réseau :
</text>
@@ -46,4 +39,5 @@
</text>
<line_editor name="web_proxy_editor" tool_tip="Le nom ou adresse IP du proxy que vous souhaitez utiliser"/>
<spinner label="Numéro de port :" label_width="95" name="web_proxy_port" width="170"/>
+ <check_box initial_value="true" label="Télécharger et installer automatiquement les mises à jour [APP_NAME]" name="updater_service_active"/>
</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_sound.xml b/indra/newview/skins/default/xui/fr/panel_preferences_sound.xml
index b82d8bcd18..654d40e2f9 100644
--- a/indra/newview/skins/default/xui/fr/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/fr/panel_preferences_sound.xml
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel label="Sons" name="Preference Media panel">
+ <panel.string name="middle_mouse">
+ Bouton central de la souris
+ </panel.string>
<slider label="Volume principal" name="System Volume"/>
<check_box initial_value="true" label="Couper quand minimisé" name="mute_when_minimized"/>
<slider label="Boutons" name="UI Volume"/>
@@ -23,6 +26,11 @@
<radio_item label="Position de la caméra" name="0"/>
<radio_item label="Position de l&apos;avatar" name="1"/>
</radio_group>
+ <check_box label="Faire bouger les lèvres de l&apos;avatar lorsqu&apos;il parle" name="enable_lip_sync"/>
+ <check_box label="Activer/désactiver la fonction Parler quand j&apos;appuie sur :" name="push_to_talk_toggle_check" tool_tip="En mode bascule, appuyez une fois sur la touche de contrôle de la fonction, puis relâchez-la pour activer/désactiver votre micro. Si vous n&apos;êtes pas en mode bascule, le micro ne diffuse votre voix que lorsque vous maintenez la touche de contrôle de la fonction enfoncée."/>
+ <line_editor label="Touche de contrôle de la fonction Appuyer pour parler" name="modifier_combo"/>
+ <button label="Définir la touche" name="set_voice_hotkey_button"/>
+ <button name="set_voice_middlemouse_button" tool_tip="Réinitialiser sur le bouton central de la souris"/>
<button label="Périphériques d&apos;entrée/de sortie" name="device_settings_btn"/>
<panel label="Paramètres du matériel" name="device_settings_panel">
<panel.string name="default_text">
diff --git a/indra/newview/skins/default/xui/fr/panel_script_ed.xml b/indra/newview/skins/default/xui/fr/panel_script_ed.xml
index 3b3b676aa1..2c86dd72b6 100644
--- a/indra/newview/skins/default/xui/fr/panel_script_ed.xml
+++ b/indra/newview/skins/default/xui/fr/panel_script_ed.xml
@@ -15,11 +15,6 @@
<panel.string name="Title">
Script : [NAME]
</panel.string>
- <text_editor name="Script Editor">
- Chargement...
- </text_editor>
- <button label="Enregistrer" label_selected="Enregistrer" name="Save_btn"/>
- <combo_box label="Insérer..." name="Insert..."/>
<menu_bar name="script_menu">
<menu label="Fichier" name="File">
<menu_item_call label="Enregistrer" name="Save"/>
@@ -40,4 +35,10 @@
<menu_item_call label="Aide par mots-clés..." name="Keyword Help..."/>
</menu>
</menu_bar>
+ <text_editor name="Script Editor">
+ Chargement...
+ </text_editor>
+ <combo_box label="Insérer..." name="Insert..."/>
+ <button label="Enregistrer" label_selected="Enregistrer" name="Save_btn"/>
+ <button label="Modifier..." name="Edit_btn"/>
</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_teleport_history.xml b/indra/newview/skins/default/xui/fr/panel_teleport_history.xml
index 1586c201da..cf1266a460 100644
--- a/indra/newview/skins/default/xui/fr/panel_teleport_history.xml
+++ b/indra/newview/skins/default/xui/fr/panel_teleport_history.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="Teleport History">
<accordion name="history_accordion">
- <no_matched_tabs_text name="no_matched_teleports_msg" value="Vous n&apos;avez pas trouvé ce que vous cherchiez ? Essayez [secondlife:///app/search/places/Rechercher [SEARCH_TERM]]."/>
+ <no_matched_tabs_text name="no_matched_teleports_msg" value="Vous n&apos;avez pas trouvé ce que vous cherchiez ? Essayez [secondlife:///app/search/places/[SEARCH_TERM] Rechercher]."/>
<no_visible_tabs_text name="no_teleports_msg" value="L&apos;historique des téléportations est vide. Essayez [secondlife:///app/search/places/ Rechercher]."/>
<accordion_tab name="today" title="Aujourd&apos;hui"/>
<accordion_tab name="yesterday" title="Hier"/>
diff --git a/indra/newview/skins/default/xui/fr/strings.xml b/indra/newview/skins/default/xui/fr/strings.xml
index 8b958119eb..d75f6c731d 100644
--- a/indra/newview/skins/default/xui/fr/strings.xml
+++ b/indra/newview/skins/default/xui/fr/strings.xml
@@ -1036,10 +1036,10 @@
Appuyez sur ESC pour quitter la vue subjective
</string>
<string name="InventoryNoMatchingItems">
- Vous n&apos;avez pas trouvé ce que vous cherchiez ? Essayez [secondlife:///app/search/all/ Rechercher [SEARCH_TERM]].
+ Vous n&apos;avez pas trouvé ce que vous cherchiez ? Essayez [secondlife:///app/search/all/[SEARCH_TERM] Rechercher].
</string>
<string name="PlacesNoMatchingItems">
- Vous n&apos;avez pas trouvé ce que vous cherchiez ? Essayez [secondlife:///app/search/places/ Rechercher [SEARCH_TERM]].
+ Vous n&apos;avez pas trouvé ce que vous cherchiez ? Essayez [secondlife:///app/search/places/[SEARCH_TERM] Rechercher].
</string>
<string name="FavoritesNoMatchingItems">
Faites glisser un repère ici pour l&apos;ajouter à vos Favoris.
@@ -1089,7 +1089,7 @@
<string name="Textures" value=" Textures,"/>
<string name="Snapshots" value=" Photos,"/>
<string name="No Filters" value="Non "/>
- <string name="Since Logoff" value=" depuis la déconnexion"/>
+ <string name="Since Logoff" value="depuis la déconnexion"/>
<string name="InvFolder My Inventory">
Mon inventaire
</string>
@@ -1773,11 +1773,8 @@
<string name="InvOfferGaveYou">
vous a donné
</string>
- <string name="InvOfferYouDecline">
- Vous avez refusé
- </string>
- <string name="InvOfferFrom">
- de la part de
+ <string name="InvOfferDecline">
+ Vous refusez l&apos;offre [DESC] de &lt;nolink&gt;[NAME]&lt;/nolink&gt;.
</string>
<string name="GroupMoneyTotal">
Total
diff --git a/indra/newview/skins/default/xui/pt/floater_hardware_settings.xml b/indra/newview/skins/default/xui/pt/floater_hardware_settings.xml
index c666a941fe..8c95a3b548 100644
--- a/indra/newview/skins/default/xui/pt/floater_hardware_settings.xml
+++ b/indra/newview/skins/default/xui/pt/floater_hardware_settings.xml
@@ -14,6 +14,9 @@
<combo_box.item label="8x" name="8x"/>
<combo_box.item label="16x" name="16x"/>
</combo_box>
+ <text name="antialiasing restart">
+ (Reinicie para ativar)
+ </text>
<spinner label="Gama:" name="gamma"/>
<text name="(brightness, lower is brighter)">
(0 = brilho padrão, menor = mais brilho)
diff --git a/indra/newview/skins/default/xui/pt/floater_preferences.xml b/indra/newview/skins/default/xui/pt/floater_preferences.xml
index 2c76a72ca8..c89a61d9b1 100644
--- a/indra/newview/skins/default/xui/pt/floater_preferences.xml
+++ b/indra/newview/skins/default/xui/pt/floater_preferences.xml
@@ -5,10 +5,12 @@
<tab_container name="pref core">
<panel label="Geral" name="general"/>
<panel label="Vídeo" name="display"/>
- <panel label="Privacidade" name="im"/>
<panel label="Som e mídia" name="audio"/>
<panel label="Bate-papo" name="chat"/>
+ <panel label="Mover e ver" name="move"/>
<panel label="Notificações" name="msgs"/>
+ <panel label="Cores" name="colors"/>
+ <panel label="Privacidade" name="im"/>
<panel label="Configurações" name="input"/>
<panel label="Avançado" name="advanced1"/>
</tab_container>
diff --git a/indra/newview/skins/default/xui/pt/floater_region_debug_console.xml b/indra/newview/skins/default/xui/pt/floater_region_debug_console.xml
new file mode 100644
index 0000000000..d3b5df2d74
--- /dev/null
+++ b/indra/newview/skins/default/xui/pt/floater_region_debug_console.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="region_debug_console" title="Depuração de região"/>
diff --git a/indra/newview/skins/default/xui/pt/menu_inventory_gear_default.xml b/indra/newview/skins/default/xui/pt/menu_inventory_gear_default.xml
index a3e62924ec..3400578d9a 100644
--- a/indra/newview/skins/default/xui/pt/menu_inventory_gear_default.xml
+++ b/indra/newview/skins/default/xui/pt/menu_inventory_gear_default.xml
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<menu name="menu_gear_default">
+<toggleable_menu name="menu_gear_default">
<menu_item_call label="Nova janela de inventário" name="new_window"/>
- <menu_item_call label="Ordenar por nome" name="sort_by_name"/>
- <menu_item_call label="Ordenar por mais recente" name="sort_by_recent"/>
+ <menu_item_check label="Ordenar por nome" name="sort_by_name"/>
+ <menu_item_check label="Ordenar por mais recente" name="sort_by_recent"/>
+ <menu_item_check label="Pastas do sistema no topo" name="sort_system_folders_to_top"/>
<menu_item_call label="Mostrar filtros" name="show_filters"/>
<menu_item_call label="Restabelecer filtros" name="reset_filters"/>
<menu_item_call label="Fechar todas as pastas" name="close_folders"/>
@@ -12,4 +13,4 @@
<menu_item_call label="Encontrar original" name="Find Original"/>
<menu_item_call label="Encontrar todos os links" name="Find All Links"/>
<menu_item_call label="Esvaziar lixeira" name="empty_trash"/>
-</menu>
+</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/pt/menu_viewer.xml b/indra/newview/skins/default/xui/pt/menu_viewer.xml
index dc0e2ffb64..95c37c53ca 100644
--- a/indra/newview/skins/default/xui/pt/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/pt/menu_viewer.xml
@@ -12,6 +12,12 @@
<menu_item_check label="Meu inventário" name="ShowSidetrayInventory"/>
<menu_item_check label="Meus gestos" name="Gestures"/>
<menu_item_check label="Minha voz" name="ShowVoice"/>
+ <menu label="Movimentos" name="Movement">
+ <menu_item_call label="Sentar" name="Sit Down Here"/>
+ <menu_item_check label="Voar" name="Fly"/>
+ <menu_item_check label="Correr sempre" name="Always Run"/>
+ <menu_item_call label="Parar minha animação" name="Stop Animating My Avatar"/>
+ </menu>
<menu label="Meu status" name="Status">
<menu_item_call label="Ausente" name="Set Away"/>
<menu_item_call label="Ocupado" name="Set Busy"/>
@@ -47,6 +53,7 @@
<menu_item_check label="Proprietários" name="Land Owners"/>
<menu_item_check label="Coordenadas" name="Coordinates"/>
<menu_item_check label="Propriedades do lote" name="Parcel Properties"/>
+ <menu_item_check label="Menu avançado" name="Show Advanced Menu"/>
</menu>
<menu_item_call label="Teletransportar para meu início" name="Teleport Home"/>
<menu_item_call label="Definir como Início" name="Set Home to Here"/>
@@ -123,7 +130,6 @@
<menu_item_check label="Ativar dicas" name="Enable Hints"/>
</menu>
<menu label="Avançado" name="Advanced">
- <menu_item_call label="Parar minha animação" name="Stop Animating My Avatar"/>
<menu_item_call label="Recarregar texturas" name="Rebake Texture"/>
<menu_item_call label="Interface tamanho padrão" name="Set UI Size to Default"/>
<menu_item_call label="Definir tamanho da janela:" name="Set Window Size..."/>
@@ -177,8 +183,7 @@
<menu_item_check label="Busca" name="Search"/>
<menu_item_call label="Soltar objeto" name="Release Keys"/>
<menu_item_call label="Interface tamanho padrão" name="Set UI Size to Default"/>
- <menu_item_check label="Correr sempre" name="Always Run"/>
- <menu_item_check label="Voar" name="Fly"/>
+ <menu_item_check label="Mostrar menu avançado - atalho antigo" name="Show Advanced Menu - legacy shortcut"/>
<menu_item_call label="Fechar janela" name="Close Window"/>
<menu_item_call label="Fechar todas as janelas" name="Close All Windows"/>
<menu_item_call label="Gravar fotos no HD" name="Snapshot to Disk"/>
@@ -196,7 +201,6 @@
<menu_item_call label="Mais zoom" name="Zoom In"/>
<menu_item_call label="Zoom padrão" name="Zoom Default"/>
<menu_item_call label="Menos zoom" name="Zoom Out"/>
- <menu_item_check label="Exibir menu avançado" name="Show Advanced Menu"/>
</menu>
<menu_item_call label="Mostrar configurações de depuração" name="Debug Settings"/>
<menu_item_check label="Show Develop Menu" name="Debug Mode"/>
@@ -267,16 +271,13 @@
<menu_item_call label="Teste de navegador web" name="Web Browser Test"/>
<menu_item_call label="Print Selected Object Info" name="Print Selected Object Info"/>
<menu_item_call label="Dados de memória" name="Memory Stats"/>
- <menu_item_check label="Trajeto c/ dois cliques" name="Double-ClickAuto-Pilot"/>
- <menu_item_check label="Teletransportar c/ dois cliques" name="DoubleClick Teleport"/>
+ <menu_item_check label="Console de depuração de região" name="Region Debug Console"/>
<menu_item_check label="Debug Clicks" name="Debug Clicks"/>
<menu_item_check label="Debug Mouse Events" name="Debug Mouse Events"/>
</menu>
<menu label="XUI" name="XUI">
<menu_item_call label="Recarregar cores" name="Reload Color Settings"/>
<menu_item_call label="Teste de fonte" name="Show Font Test"/>
- <menu_item_call label="Carregar de XML" name="Load from XML"/>
- <menu_item_call label="Salvar para XML" name="Save to XML"/>
<menu_item_check label="Mostrar nomes XUI" name="Show XUI Names"/>
<menu_item_call label="Enviar MIs de teste" name="Send Test IMs"/>
<menu_item_call label="Limpar cache de nomes" name="Flush Names Caches"/>
@@ -303,9 +304,9 @@
</menu>
<menu_item_check label="Texturas HTTP" name="HTTP Textures"/>
<menu_item_check label="Console Window on next Run" name="Console Window"/>
- <menu_item_check label="Mostrar menu admin" name="View Admin Options"/>
<menu_item_call label="Request Admin Status" name="Request Admin Options"/>
<menu_item_call label="Sair do modo admin" name="Leave Admin Options"/>
+ <menu_item_check label="Mostrar menu admin" name="View Admin Options"/>
</menu>
<menu label="Admin" name="Admin">
<menu label="Object">
diff --git a/indra/newview/skins/default/xui/pt/notifications.xml b/indra/newview/skins/default/xui/pt/notifications.xml
index 76399e966c..dc38b740aa 100644
--- a/indra/newview/skins/default/xui/pt/notifications.xml
+++ b/indra/newview/skins/default/xui/pt/notifications.xml
@@ -385,6 +385,9 @@ Nota: Este procedimento limpa o cache.
<notification name="ChangeSkin">
Reinicie o [APP_NAME] para ativar a pele nova.
</notification>
+ <notification name="ChangeLanguage">
+ Reinicie o [APP_NAME] para exibir o idioma selecionado.
+ </notification>
<notification name="GoToAuctionPage">
Ir para a página do [SECOND_LIFE] para ver os detalhes do leilão ou fazer um lance?
<usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Ir para a página"/>
@@ -594,6 +597,10 @@ Esperada [VALIDS]
Não pode ser encontrado bloco de dados no cabeçalho WAV:
[FILE]
</notification>
+ <notification name="SoundFileInvalidChunkSize">
+ Pedaço de arquivo WAV de tamanho errado:
+[FILE]
+ </notification>
<notification name="SoundFileInvalidTooLong">
Arquivo de áudio é muito longo (no máximo 10 segundos):
[FILE]
@@ -1316,6 +1323,16 @@ Não é preciso passar para a nova versão, mas ela pode melhorar o desempenho e
Salvar na pasta Aplicativos?
<usetemplate name="okcancelbuttons" notext="Continuar" yestext="Atualizar"/>
</notification>
+ <notification name="FailedUpdateInstall">
+ Ocorreu um erro de atualização do visualizador.
+Baixe e instale a versão mais recente do visualizador em
+http://secondlife.com/download.
+ <usetemplate name="okbutton" yestext="OK"/>
+ </notification>
+ <notification name="DownloadBackground">
+ Foi baixada uma nova versão do [APP_NAME]
+A nova versão será exibida quando o [APP_NAME] for reiniciado.
+ </notification>
<notification name="DeedObjectToGroup">
Delegar este objeto causará ao grupo:
* Receber os L$ pagos ao objeto
@@ -2448,8 +2465,8 @@ Cada um pode ver o status do outro (definição padrão).
Oferta de amizada aceita.
</notification>
<notification name="OfferCallingCard">
- [NAME] estão te oferecendo um cartão de visita.
-Ele colocará um item de inventário, para você possa contatá-lo facilmente.
+ [NOME] está te oferecendo um cartão de visita.
+Ele será um item no seu inventário, para você possa contatá-lo facilmente.
<form name="form">
<button name="Accept" text="Aceitar"/>
<button name="Decline" text="Recusar"/>
diff --git a/indra/newview/skins/default/xui/pt/panel_edit_gloves.xml b/indra/newview/skins/default/xui/pt/panel_edit_gloves.xml
index a94716e659..281823d641 100644
--- a/indra/newview/skins/default/xui/pt/panel_edit_gloves.xml
+++ b/indra/newview/skins/default/xui/pt/panel_edit_gloves.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_gloves_panel">
<panel name="avatar_gloves_color_panel">
- <texture_picker label="Tecido" name="Fabric" tool_tip="Selecionar imagem"/>
+ <texture_picker label="Textura" name="Fabric" tool_tip="Selecionar imagem"/>
<color_swatch label="Cor/Tonalidade" name="Color/Tint" tool_tip="Selecionar a cor"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/pt/panel_edit_jacket.xml b/indra/newview/skins/default/xui/pt/panel_edit_jacket.xml
index f555bd9ac7..5798325bd7 100644
--- a/indra/newview/skins/default/xui/pt/panel_edit_jacket.xml
+++ b/indra/newview/skins/default/xui/pt/panel_edit_jacket.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_jacket_panel">
<panel name="avatar_jacket_color_panel">
- <texture_picker label="Tecido de cima" name="Upper Fabric" tool_tip="Selecionar imagem"/>
- <texture_picker label="Tecido de baixo" name="Lower Fabric" tool_tip="Selecionar imagem"/>
+ <texture_picker label="Textura superior" name="Upper Fabric" tool_tip="Selecionar imagem"/>
+ <texture_picker label="Textura inferior" name="Lower Fabric" tool_tip="Selecionar imagem"/>
<color_swatch label="Cor/Tonalidade" name="Color/Tint" tool_tip="Selecionar a cor"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/pt/panel_edit_pants.xml b/indra/newview/skins/default/xui/pt/panel_edit_pants.xml
index 67c300cc8d..18568a81a8 100644
--- a/indra/newview/skins/default/xui/pt/panel_edit_pants.xml
+++ b/indra/newview/skins/default/xui/pt/panel_edit_pants.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_pants_panel">
<panel name="avatar_pants_color_panel">
- <texture_picker label="Tecido" name="Fabric" tool_tip="Selecionar imagem"/>
+ <texture_picker label="Textura" name="Fabric" tool_tip="Selecionar imagem"/>
<color_swatch label="Cor/Tonalidade" name="Color/Tint" tool_tip="Selecionar a cor"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/pt/panel_edit_shirt.xml b/indra/newview/skins/default/xui/pt/panel_edit_shirt.xml
index fb7c4c080c..c7e2b1e64c 100644
--- a/indra/newview/skins/default/xui/pt/panel_edit_shirt.xml
+++ b/indra/newview/skins/default/xui/pt/panel_edit_shirt.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_shirt_panel">
<panel name="avatar_shirt_color_panel">
- <texture_picker label="tecido" name="Fabric" tool_tip="Clique para escolher uma foto"/>
+ <texture_picker label="Textura" name="Fabric" tool_tip="Clique para escolher uma foto"/>
<color_swatch label="Cor/Matiz" name="Color/Tint" tool_tip="Clique para abrir o selecionador de cor"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/pt/panel_edit_shoes.xml b/indra/newview/skins/default/xui/pt/panel_edit_shoes.xml
index d1d30cf46e..08465d09e7 100644
--- a/indra/newview/skins/default/xui/pt/panel_edit_shoes.xml
+++ b/indra/newview/skins/default/xui/pt/panel_edit_shoes.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_shoes_panel">
<panel name="avatar_shoes_color_panel">
- <texture_picker label="Tecido" name="Fabric" tool_tip="Selecionar imagem"/>
+ <texture_picker label="Textura" name="Fabric" tool_tip="Selecionar imagem"/>
<color_swatch label="Cor/Tonalidade" name="Color/Tint" tool_tip="Selecionar a cor"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/pt/panel_edit_skirt.xml b/indra/newview/skins/default/xui/pt/panel_edit_skirt.xml
index b67cd53a83..275efba6e6 100644
--- a/indra/newview/skins/default/xui/pt/panel_edit_skirt.xml
+++ b/indra/newview/skins/default/xui/pt/panel_edit_skirt.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_skirt_panel">
<panel name="avatar_skirt_color_panel">
- <texture_picker label="Tecido" name="Fabric" tool_tip="Selecionar imagem"/>
+ <texture_picker label="Textura" name="Fabric" tool_tip="Selecionar imagem"/>
<color_swatch label="Cor/Tonalidade" name="Color/Tint" tool_tip="Selecionar a cor"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/pt/panel_edit_socks.xml b/indra/newview/skins/default/xui/pt/panel_edit_socks.xml
index 405568abeb..6f4779d855 100644
--- a/indra/newview/skins/default/xui/pt/panel_edit_socks.xml
+++ b/indra/newview/skins/default/xui/pt/panel_edit_socks.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_socks_panel">
<panel name="avatar_socks_color_panel">
- <texture_picker label="Tecido" name="Fabric" tool_tip="Selecionar imagem"/>
+ <texture_picker label="Textura" name="Fabric" tool_tip="Selecionar imagem"/>
<color_swatch label="Cor/Tonalidade" name="Color/Tint" tool_tip="Selecionar a cor"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/pt/panel_edit_underpants.xml b/indra/newview/skins/default/xui/pt/panel_edit_underpants.xml
index f858dc0495..c383471851 100644
--- a/indra/newview/skins/default/xui/pt/panel_edit_underpants.xml
+++ b/indra/newview/skins/default/xui/pt/panel_edit_underpants.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_underpants_panel">
<panel name="avatar_underpants_color_panel">
- <texture_picker label="Tecido" name="Fabric" tool_tip="Selecionar imagem"/>
+ <texture_picker label="Textura" name="Fabric" tool_tip="Selecionar imagem"/>
<color_swatch label="Cor/Tonalidade" name="Color/Tint" tool_tip="Selecionar a cor"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/pt/panel_edit_undershirt.xml b/indra/newview/skins/default/xui/pt/panel_edit_undershirt.xml
index 9c18fc1d6c..0bf510c67f 100644
--- a/indra/newview/skins/default/xui/pt/panel_edit_undershirt.xml
+++ b/indra/newview/skins/default/xui/pt/panel_edit_undershirt.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="edit_undershirt_panel">
<panel name="avatar_undershirt_color_panel">
- <texture_picker label="Tecido" name="Fabric" tool_tip="Selecionar imagem"/>
+ <texture_picker label="Textura" name="Fabric" tool_tip="Selecionar imagem"/>
<color_swatch label="Cor/Tonalidade" name="Color/Tint" tool_tip="Selecionar a cor"/>
</panel>
<panel name="accordion_panel">
diff --git a/indra/newview/skins/default/xui/pt/panel_notify_textbox.xml b/indra/newview/skins/default/xui/pt/panel_notify_textbox.xml
new file mode 100644
index 0000000000..d9614fe76b
--- /dev/null
+++ b/indra/newview/skins/default/xui/pt/panel_notify_textbox.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="instant_message" name="panel_notify_textbox">
+ <string name="message_max_lines_count" value="7"/>
+ <panel label="info_panel" name="info_panel">
+ <text_editor name="message" value="mensagem"/>
+ parse_urls=&quot;false&quot;
+ <button label="Enviar" name="btn_submit"/>
+ </panel>
+ <panel label="control_panel" name="control_panel"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/pt/panel_people.xml b/indra/newview/skins/default/xui/pt/panel_people.xml
index e02e3998eb..f1632729a9 100644
--- a/indra/newview/skins/default/xui/pt/panel_people.xml
+++ b/indra/newview/skins/default/xui/pt/panel_people.xml
@@ -22,7 +22,7 @@ Em busca de alguém para conversar? Procure no [secondlife:///app/worldmap Mapa-
<tab_container name="tabs">
<panel label="PROXIMIDADE" name="nearby_panel">
<panel label="bottom_panel" name="bottom_panel">
- <button name="nearby_view_sort_btn" tool_tip="Opções"/>
+ <menu_button name="nearby_view_sort_btn" tool_tip="Opções"/>
<button name="add_friend_btn" tool_tip="Adicionar o residente selecionado para sua lista de amigos"/>
</panel>
</panel>
@@ -34,27 +34,27 @@ Em busca de alguém para conversar? Procure no [secondlife:///app/worldmap Mapa-
<panel label="bottom_panel" name="bottom_panel">
<layout_stack name="bottom_panel">
<layout_panel name="options_gear_btn_panel">
- <button name="friends_viewsort_btn" tool_tip="Mostrar opções adicionais"/>
+ <menu_button name="friends_viewsort_btn" tool_tip="Mostrar opções adicionais"/>
</layout_panel>
<layout_panel name="add_btn_panel">
<button name="add_btn" tool_tip="Oferecer amizade para um residente"/>
</layout_panel>
<layout_panel name="trash_btn_panel">
- <dnd_button name="trash_btn" tool_tip="Remover a pessoa selecionada da sua lista de amigos"/>
+ <dnd_button name="del_btn" tool_tip="Remover a pessoa selecionada da sua lista de amigos"/>
</layout_panel>
</layout_stack>
</panel>
</panel>
<panel label="MEUS GRUPOS" name="groups_panel">
<panel label="bottom_panel" name="bottom_panel">
- <button name="groups_viewsort_btn" tool_tip="Opções"/>
+ <menu_button name="groups_viewsort_btn" tool_tip="Opções"/>
<button name="plus_btn" tool_tip="Ingressar em um grupo/Criar novo grupo"/>
<button name="activate_btn" tool_tip="Ativar o grupo selecionado"/>
</panel>
</panel>
<panel label="RECENTE" name="recent_panel">
<panel label="bottom_panel" name="bottom_panel">
- <button name="recent_viewsort_btn" tool_tip="Opções"/>
+ <menu_button name="recent_viewsort_btn" tool_tip="Opções"/>
<button name="add_friend_btn" tool_tip="Adicionar o residente selecionado para sua lista de amigos"/>
</panel>
</panel>
diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/pt/panel_preferences_advanced.xml
index 13cb8a444e..bbe7e15ba2 100644
--- a/indra/newview/skins/default/xui/pt/panel_preferences_advanced.xml
+++ b/indra/newview/skins/default/xui/pt/panel_preferences_advanced.xml
@@ -3,35 +3,16 @@
<panel.string name="aspect_ratio_text">
[NUM]:[DEN]
</panel.string>
- <panel.string name="middle_mouse">
- Botão do meio do mouse
- </panel.string>
- <slider label="Ângulo de visão" name="camera_fov"/>
- <slider label="Distância" name="camera_offset_scale"/>
- <text name="heading2">
- Posicionamento automático da:
- </text>
- <check_box label="Construção/Edição" name="edit_camera_movement" tool_tip="Use o posicionamento automático da câmera quando entrar e sair do modo de edição"/>
- <check_box label="Aparência" name="appearance_camera_movement" tool_tip="Use o posicionamento automático da câmera quando em modo de edição"/>
- <check_box initial_value="verdadeiro" label="Barra lateral" name="appearance_sidebar_positioning" tool_tip="Usar posicionamento automático da câmera na barra lateral"/>
- <check_box label="Mostre-me em visão de mouse" name="first_person_avatar_visible"/>
- <check_box label="Teclas de seta sempre me movem" name="arrow_keys_move_avatar_check"/>
- <check_box label="Dê dois toques e pressione para correr" name="tap_tap_hold_to_run"/>
- <check_box label="Mover os lábios do avatar ao falar" name="enable_lip_sync"/>
- <check_box label="Balão de bate-papo" name="bubble_text_chat"/>
- <slider label="Opacidade" name="bubble_chat_opacity"/>
- <color_swatch name="background" tool_tip="Cor do balão de bate-papo"/>
<text name="UI Size:">
- Interface
+ Interface:
</text>
<check_box label="Mostrar erros de script" name="show_script_errors"/>
<radio_group name="show_location">
<radio_item label="Bate-papo local" name="0"/>
<radio_item label="Janelas separadas" name="1"/>
</radio_group>
- <check_box label="Tecla liga/desliga da minha voz:" name="push_to_talk_toggle_check" tool_tip="Quando em modo de alternância, pressione e solte o botão UMA vez para ligar e desligar o microfone. Quando em modo de alternância, o microfone só transmite sua voz quando o botão estiver pressionado."/>
- <line_editor label="Botão apertar e falar" name="modifier_combo"/>
- <button label="Definir tecla" name="set_voice_hotkey_button"/>
- <button label="Botão do meio do mouse" name="set_voice_middlemouse_button" tool_tip="Redefinir como botão do meio do mouse"/>
- <button label="Outros dispositivos" name="joystick_setup_button"/>
+ <check_box label="Permitir vários visualizadores" name="allow_multiple_viewer_check"/>
+ <check_box label="Mostrar grade selecionada ao entrar" name="show_grid_selection_check"/>
+ <check_box label="Exibir menu avançado" name="show_advanced_menu_check"/>
+ <check_box label="Exibir menu desenvolvedor" name="show_develop_menu_check"/>
</panel>
diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_chat.xml b/indra/newview/skins/default/xui/pt/panel_preferences_chat.xml
index ea15b90628..368c474ee9 100644
--- a/indra/newview/skins/default/xui/pt/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/pt/panel_preferences_chat.xml
@@ -8,44 +8,10 @@
<radio_item label="Médio" name="radio2" value="1"/>
<radio_item label="Grande" name="radio3" value="2"/>
</radio_group>
- <text name="font_colors">
- Cor da fonte:
- </text>
- <color_swatch label="Você" name="user"/>
- <text name="text_box1">
- Eu
- </text>
- <color_swatch label="Outros" name="agent"/>
- <text name="text_box2">
- Outros
- </text>
- <color_swatch label="MI" name="im"/>
- <text name="text_box3">
- MI
- </text>
- <color_swatch label="Sistema" name="system"/>
- <text name="text_box4">
- Sistema
- </text>
- <color_swatch label="Erros" name="script_error"/>
- <text name="text_box5">
- Erros
- </text>
- <color_swatch label="Objetos" name="objects"/>
- <text name="text_box6">
- Objetos
- </text>
- <color_swatch label="Dono" name="owner"/>
- <text name="text_box7">
- Dono
- </text>
- <color_swatch label="URLs" name="links"/>
- <text name="text_box9">
- URLs
- </text>
<check_box initial_value="true" label="Executar animação digitada quando estiver conversando" name="play_typing_animation"/>
<check_box label="Enviar MIs por email se estiver desconectado" name="send_im_to_email"/>
<check_box label="Ativar MIs e bate-papos de texto simples" name="plain_text_chat_history"/>
+ <check_box label="Balão de bate-papo" name="bubble_text_chat"/>
<text name="show_ims_in_label">
Mostrar MIs em:
</text>
@@ -56,6 +22,13 @@
<radio_item label="Janelas separadas" name="radio" value="0"/>
<radio_item label="Guias" name="radio2" value="1"/>
</radio_group>
+ <text name="disable_toast_label">
+ Ativar pop-ups de novos bate-papos:
+ </text>
+ <check_box label="Bate-papo de grupo" name="EnableGroupChatPopups" tool_tip="Exibir pop-up de bate-papos novos de grupos"/>
+ <check_box label="Bate-papos de MI" name="EnableIMChatPopups" tool_tip="Exibir pop-up de mensagens instantâneas novas"/>
+ <spinner label="Transição de avisos de bate-papos por perto:" name="nearby_toasts_lifetime"/>
+ <spinner label="Transição de avisos de bate-papos por perto:" name="nearby_toasts_fadingtime"/>
<check_box label="Traduzir bate-papo automaticamente (via Google)" name="translate_chat_checkbox"/>
<text name="translate_language_text">
Traduzir bate-papo para:
diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_colors.xml b/indra/newview/skins/default/xui/pt/panel_preferences_colors.xml
new file mode 100644
index 0000000000..3ca9da06c9
--- /dev/null
+++ b/indra/newview/skins/default/xui/pt/panel_preferences_colors.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Cores" name="colors_panel">
+ <text name="effects_color_textbox">
+ Meus efeitos (raio de seleção):
+ </text>
+ <color_swatch name="effect_color_swatch" tool_tip="Selecionar a cor"/>
+ <text name="font_colors">
+ Cores no bate-papo:
+ </text>
+ <text name="text_box1">
+ Eu
+ </text>
+ <text name="text_box2">
+ Outros
+ </text>
+ <text name="text_box3">
+ Objetos
+ </text>
+ <text name="text_box4">
+ Sistema
+ </text>
+ <text name="text_box5">
+ Erros
+ </text>
+ <text name="text_box7">
+ Proprietário
+ </text>
+ <text name="text_box9">
+ URLs
+ </text>
+ <text name="bubble_chat">
+ Fundo do balão:
+ </text>
+ <color_swatch name="background" tool_tip="Escolha a cor do balão de bate-papo"/>
+ <slider label="Opacidade:" name="bubble_chat_opacity"/>
+ <text name="floater_opacity">
+ Opacidade:
+ </text>
+ <slider label="Ativo:" name="active"/>
+ <slider label="Inativo:" name="inactive"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_general.xml b/indra/newview/skins/default/xui/pt/panel_preferences_general.xml
index ea618d097d..deeb917e82 100644
--- a/indra/newview/skins/default/xui/pt/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/pt/panel_preferences_general.xml
@@ -48,13 +48,18 @@
<check_box label="Nomes de usuário" name="show_slids" tool_tip="Mostrar nome de usuário, como zecazc123"/>
<check_box label="Cargos do grupo" name="show_all_title_checkbox1" tool_tip="Mostrar os títulos de cargos, como membro ou diretor"/>
<check_box label="Realçar amigos" name="show_friends" tool_tip="Realçar nomes de tela de amigos"/>
- <text name="effects_color_textbox">
- Meus efeitos:
+ <check_box label="Ver nomes de tela" name="display_names_check" tool_tip="Usar nome de tela no bate-papo, MI, etc."/>
+ <check_box label="Exibir dicas da interface" name="viewer_hints_check"/>
+ <text name="inworld_typing_rg_label">
+ Teclas de letras:
</text>
+ <radio_group name="inworld_typing_preference">
+ <radio_item label="Inicia o bate-papo local" name="radio_start_chat" value="1"/>
+ <radio_item label="Afeta o movimento (ex.: WASD)" name="radio_move" value="0"/>
+ </radio_group>
<text name="title_afk_text">
Entrar no modo ausente em:
</text>
- <color_swatch label="" name="effect_color_swatch" tool_tip="Clique para abrir o seletor de cores"/>
<combo_box label="Entrar no modo ausente em:" name="afk">
<combo_box.item label="2 minutos" name="item0"/>
<combo_box.item label="5 minutos" name="item1"/>
@@ -62,7 +67,6 @@
<combo_box.item label="30 minutos" name="item3"/>
<combo_box.item label="(nunca)" name="item4"/>
</combo_box>
- <check_box label="Ver nomes de tela" name="display_names_check" tool_tip="Usar nome de tela no bate-papo, MI, etc."/>
<text name="text_box3">
Mensagem do modo ocupado:
</text>
diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/pt/panel_preferences_graphics1.xml
index 912eea13b8..c2efbf0300 100644
--- a/indra/newview/skins/default/xui/pt/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/pt/panel_preferences_graphics1.xml
@@ -26,6 +26,7 @@ rápido
<text name="ShadersText">
Sombreadores:
</text>
+ <check_box initial_value="verdadeiro" label="Água transparente" name="TransparentWater"/>
<check_box initial_value="true" label="Bump de Mapeamento e Brilho" name="BumpShiny"/>
<check_box initial_value="true" label="Sombreadores básicos" name="BasicShaders" tool_tip="Desabilitar esta opção poderá impedir que alguns drivers de placa de vídeo a travem."/>
<check_box initial_value="true" label="Sombreadores Atmosféricos" name="WindLightUseAtmosShaders"/>
diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_move.xml b/indra/newview/skins/default/xui/pt/panel_preferences_move.xml
new file mode 100644
index 0000000000..1a4c271827
--- /dev/null
+++ b/indra/newview/skins/default/xui/pt/panel_preferences_move.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Movimentar" name="move_panel">
+ <slider label="Ângulo de visão" name="camera_fov"/>
+ <slider label="Distância" name="camera_offset_scale"/>
+ <text name="heading2">
+ Posicionamento automático:
+ </text>
+ <check_box label="Construir/Editar" name="edit_camera_movement" tool_tip="Use o posicionamento automático da câmera quando entrar e sair do modo de edição"/>
+ <check_box label="Aparência" name="appearance_camera_movement" tool_tip="Use o posicionamento automático da câmera quando em modo de edição"/>
+ <check_box initial_value="verdadeiro" label="Barra lateral" name="appearance_sidebar_positioning" tool_tip="Usar posicionamento automático da câmera na barra lateral"/>
+ <check_box label="Mostre-me em visão de mouse" name="first_person_avatar_visible"/>
+ <text name=" Mouse Sensitivity">
+ Sensibilidade do mouse:
+ </text>
+ <check_box label="Inverter" name="invert_mouse"/>
+ <check_box label="Teclas de seta sempre me movem" name="arrow_keys_move_avatar_check"/>
+ <check_box label="Dê dois toques e pressione para correr" name="tap_tap_hold_to_run"/>
+ <check_box label="Dar dois cliques para:" name="double_click_chkbox"/>
+ <radio_group name="double_click_action">
+ <radio_item label="Teletransportar" name="radio_teleport"/>
+ <radio_item label="Piloto automático" name="radio_autopilot"/>
+ </radio_group>
+ <button label="Outros dispositivos" name="joystick_setup_button"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/pt/panel_preferences_privacy.xml
index ba4ebdb9bf..5545dcda38 100644
--- a/indra/newview/skins/default/xui/pt/panel_preferences_privacy.xml
+++ b/indra/newview/skins/default/xui/pt/panel_preferences_privacy.xml
@@ -10,17 +10,20 @@
<check_box label="Apenas amigos e grupos sabem que estou online" name="online_visibility"/>
<check_box label="Apenas amigos e grupos podem me chamar ou enviar MI" name="voice_call_friends_only_check"/>
<check_box label="Desligar o microfone quando terminar chamadas" name="auto_disengage_mic_check"/>
- <check_box label="Aceitar cookies" name="cookies_enabled"/>
<text name="Logs:">
- Logs:
+ Registro de bate-papos:
</text>
<check_box label="Salvar logs de bate- papo das proximidades no meu computador" name="log_nearby_chat"/>
<check_box label="Salvar logs de MI no meu computador" name="log_instant_messages"/>
- <check_box label="Adicionar timestamp" name="show_timestamps_check_im"/>
+ <check_box label="Anotar horas de cada linha de bate-papo" name="show_timestamps_check_im"/>
+ <check_box label="Anotar a data ao arquivo." name="logfile_name_datestamp"/>
<text name="log_path_desc">
Localização dos logs:
</text>
<line_editor left="278" name="log_path_string" right="-20"/>
<button label="Procurar" label_selected="Procurar" name="log_path_button" width="120"/>
<button label="Lista de bloqueados" name="block_list"/>
+ <text name="block_list_label">
+ (Pessoas ou objetos que você bloqueou)
+ </text>
</panel>
diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_setup.xml b/indra/newview/skins/default/xui/pt/panel_preferences_setup.xml
index deb8573ba3..0c6fb68140 100644
--- a/indra/newview/skins/default/xui/pt/panel_preferences_setup.xml
+++ b/indra/newview/skins/default/xui/pt/panel_preferences_setup.xml
@@ -1,12 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel label="Configurações" name="Input panel">
- <text name="Mouselook:">
- Visão subjetiva:
- </text>
- <text name=" Mouse Sensitivity">
- Sensibilidade do mouse
- </text>
- <check_box label="Inverter" name="invert_mouse"/>
<text name="Network:">
Rede:
</text>
@@ -46,4 +39,5 @@
</text>
<line_editor name="web_proxy_editor" tool_tip="O nome ou endereço IP do proxy da sua preferência"/>
<spinner label="Porta:" name="web_proxy_port"/>
+ <check_box initial_value="verdadeiro" label="Baixar e instalar atualizações [APP_NAME] automaticamente" name="updater_service_active"/>
</panel>
diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_sound.xml b/indra/newview/skins/default/xui/pt/panel_preferences_sound.xml
index 5be07f4d1f..60f51c33e5 100644
--- a/indra/newview/skins/default/xui/pt/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/pt/panel_preferences_sound.xml
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel label="Sons" name="Preference Media panel">
+ <panel.string name="middle_mouse">
+ Botão do meio do mouse
+ </panel.string>
<slider label="Volume principal" name="System Volume"/>
<check_box initial_value="true" label="Silenciar ao minimizar" name="mute_when_minimized"/>
<slider label="Botões" name="UI Volume"/>
@@ -23,6 +26,11 @@
<radio_item label="Posição de câmera" name="0"/>
<radio_item label="Posição do avatar" name="1"/>
</radio_group>
+ <check_box label="Mover os lábios do avatar quando estiver falando" name="enable_lip_sync"/>
+ <check_box label="Tecla liga/desliga da minha voz:" name="push_to_talk_toggle_check" tool_tip="Quando em modo de alternância, pressione e solte o botão UMA vez para ligar e desligar o microfone. Fora do modo de alternância, o microfone só transmite sua voz enquanto o botão estiver pressionado."/>
+ <line_editor label="Botão apertar e falar" name="modifier_combo"/>
+ <button label="Definir chave" name="set_voice_hotkey_button"/>
+ <button name="set_voice_middlemouse_button" tool_tip="Redefinir como botão do meio do mouse"/>
<button label="Controles de entrada/saída" name="device_settings_btn" width="180"/>
<panel label="Configuração dos dispositivo" name="device_settings_panel">
<panel.string name="default_text">
diff --git a/indra/newview/skins/default/xui/pt/panel_script_ed.xml b/indra/newview/skins/default/xui/pt/panel_script_ed.xml
index 6f022945c2..563f4fe054 100644
--- a/indra/newview/skins/default/xui/pt/panel_script_ed.xml
+++ b/indra/newview/skins/default/xui/pt/panel_script_ed.xml
@@ -15,11 +15,6 @@
<panel.string name="Title">
Script: [NOME]
</panel.string>
- <text_editor name="Script Editor">
- Carregando...
- </text_editor>
- <button label="Salvar" label_selected="Salvar" name="Save_btn"/>
- <combo_box label="Inserir..." name="Insert..."/>
<menu_bar name="script_menu">
<menu label="Arquivo" name="File">
<menu_item_call label="Salvar" name="Save"/>
@@ -40,4 +35,10 @@
<menu_item_call label="ajuda palavra- chave..." name="Keyword Help..."/>
</menu>
</menu_bar>
+ <text_editor name="Script Editor">
+ Carregando...
+ </text_editor>
+ <combo_box label="Inserir..." name="Insert..."/>
+ <button label="Salvar" label_selected="Salvar" name="Save_btn"/>
+ <button label="Editar..." name="Edit_btn"/>
</panel>
diff --git a/indra/newview/skins/default/xui/pt/strings.xml b/indra/newview/skins/default/xui/pt/strings.xml
index 59c6c8f080..ce2c2ddaa1 100644
--- a/indra/newview/skins/default/xui/pt/strings.xml
+++ b/indra/newview/skins/default/xui/pt/strings.xml
@@ -1740,11 +1740,8 @@
<string name="InvOfferGaveYou">
deu a você
</string>
- <string name="InvOfferYouDecline">
- Você recusa
- </string>
- <string name="InvOfferFrom">
- de
+ <string name="InvOfferDecline">
+ Você recusou um(a) [DESC] de &lt;nolink&gt;[NAME]&lt;/nolink&gt;.
</string>
<string name="GroupMoneyTotal">
Total
diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp
index 309e9e9ee3..9e321db889 100644
--- a/indra/newview/tests/lllogininstance_test.cpp
+++ b/indra/newview/tests/lllogininstance_test.cpp
@@ -40,6 +40,7 @@
#if defined(LL_WINDOWS)
#pragma warning(disable: 4355) // using 'this' in base-class ctor initializer expr
+#pragma warning(disable: 4702) // disable 'unreachable code' so we can safely use skip().
#endif
// Constants
@@ -68,6 +69,7 @@ static bool gDisconnectCalled = false;
#include "../llviewerwindow.h"
void LLViewerWindow::setShowProgress(BOOL show) {}
+LLProgressView * LLViewerWindow::getProgressView(void) const { return 0; }
LLViewerWindow* gViewerWindow;
@@ -185,6 +187,41 @@ const std::string &LLVersionInfo::getChannelAndVersion() { return VIEWERLOGIN_VE
const std::string &LLVersionInfo::getChannel() { return VIEWERLOGIN_CHANNEL; }
//-----------------------------------------------------------------------------
+#include "../llappviewer.h"
+void LLAppViewer::forceQuit(void) {}
+LLAppViewer * LLAppViewer::sInstance = 0;
+
+//-----------------------------------------------------------------------------
+#include "llnotificationsutil.h"
+LLNotificationPtr LLNotificationsUtil::add(const std::string& name,
+ const LLSD& substitutions,
+ const LLSD& payload,
+ boost::function<void (const LLSD&, const LLSD&)> functor) { return LLNotificationPtr((LLNotification*)0); }
+
+
+//-----------------------------------------------------------------------------
+#include "llupdaterservice.h"
+
+std::string const & LLUpdaterService::pumpName(void)
+{
+ static std::string wakka = "wakka wakka wakka";
+ return wakka;
+}
+bool LLUpdaterService::updateReadyToInstall(void) { return false; }
+void LLUpdaterService::initialize(const std::string& protocol_version,
+ const std::string& url,
+ const std::string& path,
+ const std::string& channel,
+ const std::string& version) {}
+
+void LLUpdaterService::setCheckPeriod(unsigned int seconds) {}
+void LLUpdaterService::startChecking(bool install_if_ready) {}
+void LLUpdaterService::stopChecking() {}
+bool LLUpdaterService::isChecking() { return false; }
+LLUpdaterService::eUpdaterState LLUpdaterService::getState() { return INITIAL; }
+std::string LLUpdaterService::updatedVersion() { return ""; }
+
+//-----------------------------------------------------------------------------
#include "llnotifications.h"
#include "llfloaterreg.h"
static std::string gTOSType;
@@ -198,6 +235,12 @@ LLFloater* LLFloaterReg::showInstance(const std::string& name, const LLSD& key,
return NULL;
}
+//----------------------------------------------------------------------------
+#include "../llprogressview.h"
+void LLProgressView::setText(std::string const &){}
+void LLProgressView::setPercent(float){}
+void LLProgressView::setMessage(std::string const &){}
+
//-----------------------------------------------------------------------------
// LLNotifications
class MockNotifications : public LLNotificationsInterface
@@ -435,6 +478,8 @@ namespace tut
template<> template<>
void lllogininstance_object::test<3>()
{
+ skip();
+
set_test_name("Test Mandatory Update User Accepts");
// Part 1 - Mandatory Update, with User accepts response.
@@ -462,6 +507,8 @@ namespace tut
template<> template<>
void lllogininstance_object::test<4>()
{
+ skip();
+
set_test_name("Test Mandatory Update User Decline");
// Test connect with update needed.
diff --git a/indra/newview/tests/llsimplestat_test.cpp b/indra/newview/tests/llsimplestat_test.cpp
new file mode 100644
index 0000000000..60a8cac995
--- /dev/null
+++ b/indra/newview/tests/llsimplestat_test.cpp
@@ -0,0 +1,586 @@
+/**
+ * @file llsimplestats_test.cpp
+ * @date 2010-10-22
+ * @brief Test cases for some of llsimplestat.h
+ *
+ * $LicenseInfo:firstyear=2010&license=viewergpl$
+ *
+ * Copyright (c) 2010, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "linden_common.h"
+
+#include <tut/tut.hpp>
+
+#include "lltut.h"
+#include "../llsimplestat.h"
+#include "llsd.h"
+#include "llmath.h"
+
+// @brief Used as a pointer cast type to get access to LLSimpleStatCounter
+class TutStatCounter: public LLSimpleStatCounter
+{
+public:
+ TutStatCounter(); // Not defined
+ ~TutStatCounter(); // Not defined
+ void operator=(const TutStatCounter &); // Not defined
+
+ void setRawCount(U32 c) { mCount = c; }
+ U32 getRawCount() const { return mCount; }
+};
+
+
+namespace tut
+{
+ struct stat_counter_index
+ {};
+ typedef test_group<stat_counter_index> stat_counter_index_t;
+ typedef stat_counter_index_t::object stat_counter_index_object_t;
+ tut::stat_counter_index_t tut_stat_counter_index("stat_counter_test");
+
+ // Testing LLSimpleStatCounter's external interface
+ template<> template<>
+ void stat_counter_index_object_t::test<1>()
+ {
+ LLSimpleStatCounter c1;
+ ensure("Initialized counter is zero", (0 == c1.getCount()));
+
+ ensure("Counter increment return is 1", (1 == ++c1));
+ ensure("Counter increment return is 2", (2 == ++c1));
+
+ ensure("Current counter is 2", (2 == c1.getCount()));
+
+ c1.reset();
+ ensure("Counter is 0 after reset", (0 == c1.getCount()));
+
+ ensure("Counter increment return is 1", (1 == ++c1));
+ }
+
+ // Testing LLSimpleStatCounter's internal state
+ template<> template<>
+ void stat_counter_index_object_t::test<2>()
+ {
+ LLSimpleStatCounter c1;
+ TutStatCounter * tc1 = (TutStatCounter *) &c1;
+
+ ensure("Initialized private counter is zero", (0 == tc1->getRawCount()));
+
+ ++c1;
+ ++c1;
+
+ ensure("Current private counter is 2", (2 == tc1->getRawCount()));
+
+ c1.reset();
+ ensure("Raw counter is 0 after reset", (0 == tc1->getRawCount()));
+ }
+
+ // Testing LLSimpleStatCounter's wrapping behavior
+ template<> template<>
+ void stat_counter_index_object_t::test<3>()
+ {
+ LLSimpleStatCounter c1;
+ TutStatCounter * tc1 = (TutStatCounter *) &c1;
+
+ tc1->setRawCount(U32_MAX);
+ ensure("Initialized private counter is zero", (U32_MAX == c1.getCount()));
+
+ ensure("Increment of max value wraps to 0", (0 == ++c1));
+ }
+
+ // Testing LLSimpleStatMMM's external behavior
+ template<> template<>
+ void stat_counter_index_object_t::test<4>()
+ {
+ LLSimpleStatMMM<> m1;
+ typedef LLSimpleStatMMM<>::Value lcl_float;
+ lcl_float zero(0);
+
+ // Freshly-constructed
+ ensure("Constructed MMM<> has 0 count", (0 == m1.getCount()));
+ ensure("Constructed MMM<> has 0 min", (zero == m1.getMin()));
+ ensure("Constructed MMM<> has 0 max", (zero == m1.getMax()));
+ ensure("Constructed MMM<> has 0 mean no div-by-zero", (zero == m1.getMean()));
+
+ // Single insert
+ m1.record(1.0);
+ ensure("Single insert MMM<> has 1 count", (1 == m1.getCount()));
+ ensure("Single insert MMM<> has 1.0 min", (1.0 == m1.getMin()));
+ ensure("Single insert MMM<> has 1.0 max", (1.0 == m1.getMax()));
+ ensure("Single insert MMM<> has 1.0 mean", (1.0 == m1.getMean()));
+
+ // Second insert
+ m1.record(3.0);
+ ensure("2nd insert MMM<> has 2 count", (2 == m1.getCount()));
+ ensure("2nd insert MMM<> has 1.0 min", (1.0 == m1.getMin()));
+ ensure("2nd insert MMM<> has 3.0 max", (3.0 == m1.getMax()));
+ ensure_approximately_equals("2nd insert MMM<> has 2.0 mean", m1.getMean(), lcl_float(2.0), 1);
+
+ // Third insert
+ m1.record(5.0);
+ ensure("3rd insert MMM<> has 3 count", (3 == m1.getCount()));
+ ensure("3rd insert MMM<> has 1.0 min", (1.0 == m1.getMin()));
+ ensure("3rd insert MMM<> has 5.0 max", (5.0 == m1.getMax()));
+ ensure_approximately_equals("3rd insert MMM<> has 3.0 mean", m1.getMean(), lcl_float(3.0), 1);
+
+ // Fourth insert
+ m1.record(1000000.0);
+ ensure("4th insert MMM<> has 4 count", (4 == m1.getCount()));
+ ensure("4th insert MMM<> has 1.0 min", (1.0 == m1.getMin()));
+ ensure("4th insert MMM<> has 100000.0 max", (1000000.0 == m1.getMax()));
+ ensure_approximately_equals("4th insert MMM<> has 250002.0 mean", m1.getMean(), lcl_float(250002.0), 1);
+
+ // Reset
+ m1.reset();
+ ensure("Reset MMM<> has 0 count", (0 == m1.getCount()));
+ ensure("Reset MMM<> has 0 min", (zero == m1.getMin()));
+ ensure("Reset MMM<> has 0 max", (zero == m1.getMax()));
+ ensure("Reset MMM<> has 0 mean no div-by-zero", (zero == m1.getMean()));
+ }
+
+ // Testing LLSimpleStatMMM's response to large values
+ template<> template<>
+ void stat_counter_index_object_t::test<5>()
+ {
+ LLSimpleStatMMM<> m1;
+ typedef LLSimpleStatMMM<>::Value lcl_float;
+ lcl_float zero(0);
+
+ // Insert overflowing values
+ const lcl_float bignum(F32_MAX / 2);
+
+ m1.record(bignum);
+ m1.record(bignum);
+ m1.record(bignum);
+ m1.record(bignum);
+ m1.record(bignum);
+ m1.record(bignum);
+ m1.record(bignum);
+ m1.record(zero);
+
+ ensure("Overflowed MMM<> has 8 count", (8 == m1.getCount()));
+ ensure("Overflowed MMM<> has 0 min", (zero == m1.getMin()));
+ ensure("Overflowed MMM<> has huge max", (bignum == m1.getMax()));
+ ensure("Overflowed MMM<> has fetchable mean", (1.0 == m1.getMean() || true));
+ // We should be infinte but not interested in proving the IEEE standard here.
+ LLSD sd1(m1.getMean());
+ // std::cout << "Thingy: " << m1.getMean() << " and as LLSD: " << sd1 << std::endl;
+ ensure("Overflowed MMM<> produces LLSDable Real", (sd1.isReal()));
+ }
+
+ // Testing LLSimpleStatMMM<F32>'s external behavior
+ template<> template<>
+ void stat_counter_index_object_t::test<6>()
+ {
+ LLSimpleStatMMM<F32> m1;
+ typedef LLSimpleStatMMM<F32>::Value lcl_float;
+ lcl_float zero(0);
+
+ // Freshly-constructed
+ ensure("Constructed MMM<F32> has 0 count", (0 == m1.getCount()));
+ ensure("Constructed MMM<F32> has 0 min", (zero == m1.getMin()));
+ ensure("Constructed MMM<F32> has 0 max", (zero == m1.getMax()));
+ ensure("Constructed MMM<F32> has 0 mean no div-by-zero", (zero == m1.getMean()));
+
+ // Single insert
+ m1.record(1.0);
+ ensure("Single insert MMM<F32> has 1 count", (1 == m1.getCount()));
+ ensure("Single insert MMM<F32> has 1.0 min", (1.0 == m1.getMin()));
+ ensure("Single insert MMM<F32> has 1.0 max", (1.0 == m1.getMax()));
+ ensure("Single insert MMM<F32> has 1.0 mean", (1.0 == m1.getMean()));
+
+ // Second insert
+ m1.record(3.0);
+ ensure("2nd insert MMM<F32> has 2 count", (2 == m1.getCount()));
+ ensure("2nd insert MMM<F32> has 1.0 min", (1.0 == m1.getMin()));
+ ensure("2nd insert MMM<F32> has 3.0 max", (3.0 == m1.getMax()));
+ ensure_approximately_equals("2nd insert MMM<F32> has 2.0 mean", m1.getMean(), lcl_float(2.0), 1);
+
+ // Third insert
+ m1.record(5.0);
+ ensure("3rd insert MMM<F32> has 3 count", (3 == m1.getCount()));
+ ensure("3rd insert MMM<F32> has 1.0 min", (1.0 == m1.getMin()));
+ ensure("3rd insert MMM<F32> has 5.0 max", (5.0 == m1.getMax()));
+ ensure_approximately_equals("3rd insert MMM<F32> has 3.0 mean", m1.getMean(), lcl_float(3.0), 1);
+
+ // Fourth insert
+ m1.record(1000000.0);
+ ensure("4th insert MMM<F32> has 4 count", (4 == m1.getCount()));
+ ensure("4th insert MMM<F32> has 1.0 min", (1.0 == m1.getMin()));
+ ensure("4th insert MMM<F32> has 1000000.0 max", (1000000.0 == m1.getMax()));
+ ensure_approximately_equals("4th insert MMM<F32> has 250002.0 mean", m1.getMean(), lcl_float(250002.0), 1);
+
+ // Reset
+ m1.reset();
+ ensure("Reset MMM<F32> has 0 count", (0 == m1.getCount()));
+ ensure("Reset MMM<F32> has 0 min", (zero == m1.getMin()));
+ ensure("Reset MMM<F32> has 0 max", (zero == m1.getMax()));
+ ensure("Reset MMM<F32> has 0 mean no div-by-zero", (zero == m1.getMean()));
+ }
+
+ // Testing LLSimpleStatMMM's response to large values
+ template<> template<>
+ void stat_counter_index_object_t::test<7>()
+ {
+ LLSimpleStatMMM<F32> m1;
+ typedef LLSimpleStatMMM<F32>::Value lcl_float;
+ lcl_float zero(0);
+
+ // Insert overflowing values
+ const lcl_float bignum(F32_MAX / 2);
+
+ m1.record(bignum);
+ m1.record(bignum);
+ m1.record(bignum);
+ m1.record(bignum);
+ m1.record(bignum);
+ m1.record(bignum);
+ m1.record(bignum);
+ m1.record(zero);
+
+ ensure("Overflowed MMM<F32> has 8 count", (8 == m1.getCount()));
+ ensure("Overflowed MMM<F32> has 0 min", (zero == m1.getMin()));
+ ensure("Overflowed MMM<F32> has huge max", (bignum == m1.getMax()));
+ ensure("Overflowed MMM<F32> has fetchable mean", (1.0 == m1.getMean() || true));
+ // We should be infinte but not interested in proving the IEEE standard here.
+ LLSD sd1(m1.getMean());
+ // std::cout << "Thingy: " << m1.getMean() << " and as LLSD: " << sd1 << std::endl;
+ ensure("Overflowed MMM<F32> produces LLSDable Real", (sd1.isReal()));
+ }
+
+ // Testing LLSimpleStatMMM<F64>'s external behavior
+ template<> template<>
+ void stat_counter_index_object_t::test<8>()
+ {
+ LLSimpleStatMMM<F64> m1;
+ typedef LLSimpleStatMMM<F64>::Value lcl_float;
+ lcl_float zero(0);
+
+ // Freshly-constructed
+ ensure("Constructed MMM<F64> has 0 count", (0 == m1.getCount()));
+ ensure("Constructed MMM<F64> has 0 min", (zero == m1.getMin()));
+ ensure("Constructed MMM<F64> has 0 max", (zero == m1.getMax()));
+ ensure("Constructed MMM<F64> has 0 mean no div-by-zero", (zero == m1.getMean()));
+
+ // Single insert
+ m1.record(1.0);
+ ensure("Single insert MMM<F64> has 1 count", (1 == m1.getCount()));
+ ensure("Single insert MMM<F64> has 1.0 min", (1.0 == m1.getMin()));
+ ensure("Single insert MMM<F64> has 1.0 max", (1.0 == m1.getMax()));
+ ensure("Single insert MMM<F64> has 1.0 mean", (1.0 == m1.getMean()));
+
+ // Second insert
+ m1.record(3.0);
+ ensure("2nd insert MMM<F64> has 2 count", (2 == m1.getCount()));
+ ensure("2nd insert MMM<F64> has 1.0 min", (1.0 == m1.getMin()));
+ ensure("2nd insert MMM<F64> has 3.0 max", (3.0 == m1.getMax()));
+ ensure_approximately_equals("2nd insert MMM<F64> has 2.0 mean", m1.getMean(), lcl_float(2.0), 1);
+
+ // Third insert
+ m1.record(5.0);
+ ensure("3rd insert MMM<F64> has 3 count", (3 == m1.getCount()));
+ ensure("3rd insert MMM<F64> has 1.0 min", (1.0 == m1.getMin()));
+ ensure("3rd insert MMM<F64> has 5.0 max", (5.0 == m1.getMax()));
+ ensure_approximately_equals("3rd insert MMM<F64> has 3.0 mean", m1.getMean(), lcl_float(3.0), 1);
+
+ // Fourth insert
+ m1.record(1000000.0);
+ ensure("4th insert MMM<F64> has 4 count", (4 == m1.getCount()));
+ ensure("4th insert MMM<F64> has 1.0 min", (1.0 == m1.getMin()));
+ ensure("4th insert MMM<F64> has 1000000.0 max", (1000000.0 == m1.getMax()));
+ ensure_approximately_equals("4th insert MMM<F64> has 250002.0 mean", m1.getMean(), lcl_float(250002.0), 1);
+
+ // Reset
+ m1.reset();
+ ensure("Reset MMM<F64> has 0 count", (0 == m1.getCount()));
+ ensure("Reset MMM<F64> has 0 min", (zero == m1.getMin()));
+ ensure("Reset MMM<F64> has 0 max", (zero == m1.getMax()));
+ ensure("Reset MMM<F64> has 0 mean no div-by-zero", (zero == m1.getMean()));
+ }
+
+ // Testing LLSimpleStatMMM's response to large values
+ template<> template<>
+ void stat_counter_index_object_t::test<9>()
+ {
+ LLSimpleStatMMM<F64> m1;
+ typedef LLSimpleStatMMM<F64>::Value lcl_float;
+ lcl_float zero(0);
+
+ // Insert overflowing values
+ const lcl_float bignum(F64_MAX / 2);
+
+ m1.record(bignum);
+ m1.record(bignum);
+ m1.record(bignum);
+ m1.record(bignum);
+ m1.record(bignum);
+ m1.record(bignum);
+ m1.record(bignum);
+ m1.record(zero);
+
+ ensure("Overflowed MMM<F64> has 8 count", (8 == m1.getCount()));
+ ensure("Overflowed MMM<F64> has 0 min", (zero == m1.getMin()));
+ ensure("Overflowed MMM<F64> has huge max", (bignum == m1.getMax()));
+ ensure("Overflowed MMM<F64> has fetchable mean", (1.0 == m1.getMean() || true));
+ // We should be infinte but not interested in proving the IEEE standard here.
+ LLSD sd1(m1.getMean());
+ // std::cout << "Thingy: " << m1.getMean() << " and as LLSD: " << sd1 << std::endl;
+ ensure("Overflowed MMM<F64> produces LLSDable Real", (sd1.isReal()));
+ }
+
+ // Testing LLSimpleStatMMM<U64>'s external behavior
+ template<> template<>
+ void stat_counter_index_object_t::test<10>()
+ {
+ LLSimpleStatMMM<U64> m1;
+ typedef LLSimpleStatMMM<U64>::Value lcl_int;
+ lcl_int zero(0);
+
+ // Freshly-constructed
+ ensure("Constructed MMM<U64> has 0 count", (0 == m1.getCount()));
+ ensure("Constructed MMM<U64> has 0 min", (zero == m1.getMin()));
+ ensure("Constructed MMM<U64> has 0 max", (zero == m1.getMax()));
+ ensure("Constructed MMM<U64> has 0 mean no div-by-zero", (zero == m1.getMean()));
+
+ // Single insert
+ m1.record(1);
+ ensure("Single insert MMM<U64> has 1 count", (1 == m1.getCount()));
+ ensure("Single insert MMM<U64> has 1 min", (1 == m1.getMin()));
+ ensure("Single insert MMM<U64> has 1 max", (1 == m1.getMax()));
+ ensure("Single insert MMM<U64> has 1 mean", (1 == m1.getMean()));
+
+ // Second insert
+ m1.record(3);
+ ensure("2nd insert MMM<U64> has 2 count", (2 == m1.getCount()));
+ ensure("2nd insert MMM<U64> has 1 min", (1 == m1.getMin()));
+ ensure("2nd insert MMM<U64> has 3 max", (3 == m1.getMax()));
+ ensure("2nd insert MMM<U64> has 2 mean", (2 == m1.getMean()));
+
+ // Third insert
+ m1.record(5);
+ ensure("3rd insert MMM<U64> has 3 count", (3 == m1.getCount()));
+ ensure("3rd insert MMM<U64> has 1 min", (1 == m1.getMin()));
+ ensure("3rd insert MMM<U64> has 5 max", (5 == m1.getMax()));
+ ensure("3rd insert MMM<U64> has 3 mean", (3 == m1.getMean()));
+
+ // Fourth insert
+ m1.record(U64L(1000000000000));
+ ensure("4th insert MMM<U64> has 4 count", (4 == m1.getCount()));
+ ensure("4th insert MMM<U64> has 1 min", (1 == m1.getMin()));
+ ensure("4th insert MMM<U64> has 1000000000000ULL max", (U64L(1000000000000) == m1.getMax()));
+ ensure("4th insert MMM<U64> has 250000000002ULL mean", (U64L( 250000000002) == m1.getMean()));
+
+ // Reset
+ m1.reset();
+ ensure("Reset MMM<U64> has 0 count", (0 == m1.getCount()));
+ ensure("Reset MMM<U64> has 0 min", (zero == m1.getMin()));
+ ensure("Reset MMM<U64> has 0 max", (zero == m1.getMax()));
+ ensure("Reset MMM<U64> has 0 mean no div-by-zero", (zero == m1.getMean()));
+ }
+
+ // Testing LLSimpleStatMMM's response to large values
+ template<> template<>
+ void stat_counter_index_object_t::test<11>()
+ {
+ LLSimpleStatMMM<U64> m1;
+ typedef LLSimpleStatMMM<U64>::Value lcl_int;
+ lcl_int zero(0);
+
+ // Insert overflowing values
+ const lcl_int bignum(U64L(0xffffffffffffffff) / 2);
+
+ m1.record(bignum);
+ m1.record(bignum);
+ m1.record(bignum);
+ m1.record(bignum);
+ m1.record(bignum);
+ m1.record(bignum);
+ m1.record(bignum);
+ m1.record(zero);
+
+ ensure("Overflowed MMM<U64> has 8 count", (8 == m1.getCount()));
+ ensure("Overflowed MMM<U64> has 0 min", (zero == m1.getMin()));
+ ensure("Overflowed MMM<U64> has huge max", (bignum == m1.getMax()));
+ ensure("Overflowed MMM<U64> has fetchable mean", (zero == m1.getMean() || true));
+ }
+
+ // Testing LLSimpleStatCounter's merge() method
+ template<> template<>
+ void stat_counter_index_object_t::test<12>()
+ {
+ LLSimpleStatCounter c1;
+ LLSimpleStatCounter c2;
+
+ ++c1;
+ ++c1;
+ ++c1;
+ ++c1;
+
+ ++c2;
+ ++c2;
+ c2.merge(c1);
+
+ ensure_equals("4 merged into 2 results in 6", 6, c2.getCount());
+
+ ensure_equals("Source of merge is undamaged", 4, c1.getCount());
+ }
+
+ // Testing LLSimpleStatMMM's merge() method
+ template<> template<>
+ void stat_counter_index_object_t::test<13>()
+ {
+ LLSimpleStatMMM<> m1;
+ LLSimpleStatMMM<> m2;
+
+ m1.record(3.5);
+ m1.record(4.5);
+ m1.record(5.5);
+ m1.record(6.5);
+
+ m2.record(5.0);
+ m2.record(7.0);
+ m2.record(9.0);
+
+ m2.merge(m1);
+
+ ensure_equals("Count after merge (p1)", 7, m2.getCount());
+ ensure_approximately_equals("Min after merge (p1)", F32(3.5), m2.getMin(), 22);
+ ensure_approximately_equals("Max after merge (p1)", F32(9.0), m2.getMax(), 22);
+ ensure_approximately_equals("Mean after merge (p1)", F32(41.000/7.000), m2.getMean(), 22);
+
+
+ ensure_equals("Source count of merge is undamaged (p1)", 4, m1.getCount());
+ ensure_approximately_equals("Source min of merge is undamaged (p1)", F32(3.5), m1.getMin(), 22);
+ ensure_approximately_equals("Source max of merge is undamaged (p1)", F32(6.5), m1.getMax(), 22);
+ ensure_approximately_equals("Source mean of merge is undamaged (p1)", F32(5.0), m1.getMean(), 22);
+
+ m2.reset();
+
+ m2.record(-22.0);
+ m2.record(-1.0);
+ m2.record(30.0);
+
+ m2.merge(m1);
+
+ ensure_equals("Count after merge (p2)", 7, m2.getCount());
+ ensure_approximately_equals("Min after merge (p2)", F32(-22.0), m2.getMin(), 22);
+ ensure_approximately_equals("Max after merge (p2)", F32(30.0), m2.getMax(), 22);
+ ensure_approximately_equals("Mean after merge (p2)", F32(27.000/7.000), m2.getMean(), 22);
+
+ }
+
+ // Testing LLSimpleStatMMM's merge() method when src contributes nothing
+ template<> template<>
+ void stat_counter_index_object_t::test<14>()
+ {
+ LLSimpleStatMMM<> m1;
+ LLSimpleStatMMM<> m2;
+
+ m2.record(5.0);
+ m2.record(7.0);
+ m2.record(9.0);
+
+ m2.merge(m1);
+
+ ensure_equals("Count after merge (p1)", 3, m2.getCount());
+ ensure_approximately_equals("Min after merge (p1)", F32(5.0), m2.getMin(), 22);
+ ensure_approximately_equals("Max after merge (p1)", F32(9.0), m2.getMax(), 22);
+ ensure_approximately_equals("Mean after merge (p1)", F32(7.000), m2.getMean(), 22);
+
+ ensure_equals("Source count of merge is undamaged (p1)", 0, m1.getCount());
+ ensure_approximately_equals("Source min of merge is undamaged (p1)", F32(0), m1.getMin(), 22);
+ ensure_approximately_equals("Source max of merge is undamaged (p1)", F32(0), m1.getMax(), 22);
+ ensure_approximately_equals("Source mean of merge is undamaged (p1)", F32(0), m1.getMean(), 22);
+
+ m2.reset();
+
+ m2.record(-22.0);
+ m2.record(-1.0);
+
+ m2.merge(m1);
+
+ ensure_equals("Count after merge (p2)", 2, m2.getCount());
+ ensure_approximately_equals("Min after merge (p2)", F32(-22.0), m2.getMin(), 22);
+ ensure_approximately_equals("Max after merge (p2)", F32(-1.0), m2.getMax(), 22);
+ ensure_approximately_equals("Mean after merge (p2)", F32(-11.5), m2.getMean(), 22);
+ }
+
+ // Testing LLSimpleStatMMM's merge() method when dst contributes nothing
+ template<> template<>
+ void stat_counter_index_object_t::test<15>()
+ {
+ LLSimpleStatMMM<> m1;
+ LLSimpleStatMMM<> m2;
+
+ m1.record(5.0);
+ m1.record(7.0);
+ m1.record(9.0);
+
+ m2.merge(m1);
+
+ ensure_equals("Count after merge (p1)", 3, m2.getCount());
+ ensure_approximately_equals("Min after merge (p1)", F32(5.0), m2.getMin(), 22);
+ ensure_approximately_equals("Max after merge (p1)", F32(9.0), m2.getMax(), 22);
+ ensure_approximately_equals("Mean after merge (p1)", F32(7.000), m2.getMean(), 22);
+
+ ensure_equals("Source count of merge is undamaged (p1)", 3, m1.getCount());
+ ensure_approximately_equals("Source min of merge is undamaged (p1)", F32(5.0), m1.getMin(), 22);
+ ensure_approximately_equals("Source max of merge is undamaged (p1)", F32(9.0), m1.getMax(), 22);
+ ensure_approximately_equals("Source mean of merge is undamaged (p1)", F32(7.0), m1.getMean(), 22);
+
+ m1.reset();
+ m2.reset();
+
+ m1.record(-22.0);
+ m1.record(-1.0);
+
+ m2.merge(m1);
+
+ ensure_equals("Count after merge (p2)", 2, m2.getCount());
+ ensure_approximately_equals("Min after merge (p2)", F32(-22.0), m2.getMin(), 22);
+ ensure_approximately_equals("Max after merge (p2)", F32(-1.0), m2.getMax(), 22);
+ ensure_approximately_equals("Mean after merge (p2)", F32(-11.5), m2.getMean(), 22);
+ }
+
+ // Testing LLSimpleStatMMM's merge() method when neither dst nor src contributes
+ template<> template<>
+ void stat_counter_index_object_t::test<16>()
+ {
+ LLSimpleStatMMM<> m1;
+ LLSimpleStatMMM<> m2;
+
+ m2.merge(m1);
+
+ ensure_equals("Count after merge (p1)", 0, m2.getCount());
+ ensure_approximately_equals("Min after merge (p1)", F32(0), m2.getMin(), 22);
+ ensure_approximately_equals("Max after merge (p1)", F32(0), m2.getMax(), 22);
+ ensure_approximately_equals("Mean after merge (p1)", F32(0), m2.getMean(), 22);
+
+ ensure_equals("Source count of merge is undamaged (p1)", 0, m1.getCount());
+ ensure_approximately_equals("Source min of merge is undamaged (p1)", F32(0), m1.getMin(), 22);
+ ensure_approximately_equals("Source max of merge is undamaged (p1)", F32(0), m1.getMax(), 22);
+ ensure_approximately_equals("Source mean of merge is undamaged (p1)", F32(0), m1.getMean(), 22);
+ }
+}
diff --git a/indra/newview/tests/llviewerassetstats_test.cpp b/indra/newview/tests/llviewerassetstats_test.cpp
new file mode 100644
index 0000000000..1bb4fb7c0c
--- /dev/null
+++ b/indra/newview/tests/llviewerassetstats_test.cpp
@@ -0,0 +1,990 @@
+/**
+ * @file llviewerassetstats_tut.cpp
+ * @date 2010-10-28
+ * @brief Test cases for some of newview/llviewerassetstats.cpp
+ *
+ * $LicenseInfo:firstyear=2010&license=viewergpl$
+ *
+ * Copyright (c) 2010, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "linden_common.h"
+
+#include <tut/tut.hpp>
+#include <iostream>
+
+#include "lltut.h"
+#include "../llviewerassetstats.h"
+#include "lluuid.h"
+#include "llsdutil.h"
+#include "llregionhandle.h"
+
+static const char * all_keys[] =
+{
+ "duration",
+ "fps",
+ "get_other",
+ "get_texture_temp_http",
+ "get_texture_temp_udp",
+ "get_texture_non_temp_http",
+ "get_texture_non_temp_udp",
+ "get_wearable_udp",
+ "get_sound_udp",
+ "get_gesture_udp"
+};
+
+static const char * resp_keys[] =
+{
+ "get_other",
+ "get_texture_temp_http",
+ "get_texture_temp_udp",
+ "get_texture_non_temp_http",
+ "get_texture_non_temp_udp",
+ "get_wearable_udp",
+ "get_sound_udp",
+ "get_gesture_udp"
+};
+
+static const char * sub_keys[] =
+{
+ "dequeued",
+ "enqueued",
+ "resp_count",
+ "resp_max",
+ "resp_min",
+ "resp_mean"
+};
+
+static const char * mmm_resp_keys[] =
+{
+ "fps"
+};
+
+static const char * mmm_sub_keys[] =
+{
+ "count",
+ "max",
+ "min",
+ "mean"
+};
+
+static const LLUUID region1("4e2d81a3-6263-6ffe-ad5c-8ce04bee07e8");
+static const LLUUID region2("68762cc8-b68b-4e45-854b-e830734f2d4a");
+static const U64 region1_handle(0x0000040000003f00ULL);
+static const U64 region2_handle(0x0000030000004200ULL);
+static const std::string region1_handle_str("0000040000003f00");
+static const std::string region2_handle_str("0000030000004200");
+
+#if 0
+static bool
+is_empty_map(const LLSD & sd)
+{
+ return sd.isMap() && 0 == sd.size();
+}
+
+static bool
+is_single_key_map(const LLSD & sd, const std::string & key)
+{
+ return sd.isMap() && 1 == sd.size() && sd.has(key);
+}
+#endif
+
+static bool
+is_double_key_map(const LLSD & sd, const std::string & key1, const std::string & key2)
+{
+ return sd.isMap() && 2 == sd.size() && sd.has(key1) && sd.has(key2);
+}
+
+static bool
+is_no_stats_map(const LLSD & sd)
+{
+ return is_double_key_map(sd, "duration", "regions");
+}
+
+static bool
+is_single_slot_array(const LLSD & sd, U64 region_handle)
+{
+ U32 grid_x(0), grid_y(0);
+ grid_from_region_handle(region_handle, &grid_x, &grid_y);
+
+ return (sd.isArray() &&
+ 1 == sd.size() &&
+ sd[0].has("grid_x") &&
+ sd[0].has("grid_y") &&
+ sd[0]["grid_x"].isInteger() &&
+ sd[0]["grid_y"].isInteger() &&
+ grid_x == sd[0]["grid_x"].asInteger() &&
+ grid_y == sd[0]["grid_y"].asInteger());
+}
+
+static bool
+is_double_slot_array(const LLSD & sd, U64 region_handle1, U64 region_handle2)
+{
+ U32 grid_x1(0), grid_y1(0);
+ U32 grid_x2(0), grid_y2(0);
+ grid_from_region_handle(region_handle1, &grid_x1, &grid_y1);
+ grid_from_region_handle(region_handle2, &grid_x2, &grid_y2);
+
+ return (sd.isArray() &&
+ 2 == sd.size() &&
+ sd[0].has("grid_x") &&
+ sd[0].has("grid_y") &&
+ sd[0]["grid_x"].isInteger() &&
+ sd[0]["grid_y"].isInteger() &&
+ sd[1].has("grid_x") &&
+ sd[1].has("grid_y") &&
+ sd[1]["grid_x"].isInteger() &&
+ sd[1]["grid_y"].isInteger() &&
+ ((grid_x1 == sd[0]["grid_x"].asInteger() &&
+ grid_y1 == sd[0]["grid_y"].asInteger() &&
+ grid_x2 == sd[1]["grid_x"].asInteger() &&
+ grid_y2 == sd[1]["grid_y"].asInteger()) ||
+ (grid_x1 == sd[1]["grid_x"].asInteger() &&
+ grid_y1 == sd[1]["grid_y"].asInteger() &&
+ grid_x2 == sd[0]["grid_x"].asInteger() &&
+ grid_y2 == sd[0]["grid_y"].asInteger())));
+}
+
+static LLSD
+get_region(const LLSD & sd, U64 region_handle1)
+{
+ U32 grid_x(0), grid_y(0);
+ grid_from_region_handle(region_handle1, &grid_x, &grid_y);
+
+ for (LLSD::array_const_iterator it(sd["regions"].beginArray());
+ sd["regions"].endArray() != it;
+ ++it)
+ {
+ if ((*it).has("grid_x") &&
+ (*it).has("grid_y") &&
+ (*it)["grid_x"].isInteger() &&
+ (*it)["grid_y"].isInteger() &&
+ (*it)["grid_x"].asInteger() == grid_x &&
+ (*it)["grid_y"].asInteger() == grid_y)
+ {
+ return *it;
+ }
+ }
+ return LLSD();
+}
+
+namespace tut
+{
+ struct tst_viewerassetstats_index
+ {};
+ typedef test_group<tst_viewerassetstats_index> tst_viewerassetstats_index_t;
+ typedef tst_viewerassetstats_index_t::object tst_viewerassetstats_index_object_t;
+ tut::tst_viewerassetstats_index_t tut_tst_viewerassetstats_index("tst_viewerassetstats_test");
+
+ // Testing free functions without global stats allocated
+ template<> template<>
+ void tst_viewerassetstats_index_object_t::test<1>()
+ {
+ // Check that helpers aren't bothered by missing global stats
+ ensure("Global gViewerAssetStatsMain should be NULL", (NULL == gViewerAssetStatsMain));
+
+ LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_TEXTURE, false, false);
+
+ LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_TEXTURE, false, false);
+
+ LLViewerAssetStatsFF::record_response_main(LLViewerAssetType::AT_GESTURE, false, false, 12300000ULL);
+ }
+
+ // Create a non-global instance and check the structure
+ template<> template<>
+ void tst_viewerassetstats_index_object_t::test<2>()
+ {
+ ensure("Global gViewerAssetStatsMain should be NULL", (NULL == gViewerAssetStatsMain));
+
+ LLViewerAssetStats * it = new LLViewerAssetStats();
+
+ ensure("Global gViewerAssetStatsMain should still be NULL", (NULL == gViewerAssetStatsMain));
+
+ LLSD sd_full = it->asLLSD(false);
+
+ // Default (NULL) region ID doesn't produce LLSD results so should
+ // get an empty map back from output
+ ensure("Stat-less LLSD initially", is_no_stats_map(sd_full));
+
+ // Once the region is set, we will get a response even with no data collection
+ it->setRegion(region1_handle);
+ sd_full = it->asLLSD(false);
+ ensure("Correct single-key LLSD map root", is_double_key_map(sd_full, "duration", "regions"));
+ ensure("Correct single-slot LLSD array regions", is_single_slot_array(sd_full["regions"], region1_handle));
+
+ LLSD sd = sd_full["regions"][0];
+
+ delete it;
+
+ // Check the structure of the LLSD
+ for (int i = 0; i < LL_ARRAY_SIZE(all_keys); ++i)
+ {
+ std::string line = llformat("Has '%s' key", all_keys[i]);
+ ensure(line, sd.has(all_keys[i]));
+ }
+
+ for (int i = 0; i < LL_ARRAY_SIZE(resp_keys); ++i)
+ {
+ for (int j = 0; j < LL_ARRAY_SIZE(sub_keys); ++j)
+ {
+ std::string line = llformat("Key '%s' has '%s' key", resp_keys[i], sub_keys[j]);
+ ensure(line, sd[resp_keys[i]].has(sub_keys[j]));
+ }
+ }
+
+ for (int i = 0; i < LL_ARRAY_SIZE(mmm_resp_keys); ++i)
+ {
+ for (int j = 0; j < LL_ARRAY_SIZE(mmm_sub_keys); ++j)
+ {
+ std::string line = llformat("Key '%s' has '%s' key", mmm_resp_keys[i], mmm_sub_keys[j]);
+ ensure(line, sd[mmm_resp_keys[i]].has(mmm_sub_keys[j]));
+ }
+ }
+ }
+
+ // Create a non-global instance and check some content
+ template<> template<>
+ void tst_viewerassetstats_index_object_t::test<3>()
+ {
+ LLViewerAssetStats * it = new LLViewerAssetStats();
+ it->setRegion(region1_handle);
+
+ LLSD sd = it->asLLSD(false);
+ ensure("Correct single-key LLSD map root", is_double_key_map(sd, "regions", "duration"));
+ ensure("Correct single-slot LLSD array regions", is_single_slot_array(sd["regions"], region1_handle));
+ sd = sd[0];
+
+ delete it;
+
+ // Check a few points on the tree for content
+ ensure("sd[get_texture_temp_http][dequeued] is 0", (0 == sd["get_texture_temp_http"]["dequeued"].asInteger()));
+ ensure("sd[get_sound_udp][resp_min] is 0", (0.0 == sd["get_sound_udp"]["resp_min"].asReal()));
+ }
+
+ // Create a global instance and verify free functions do something useful
+ template<> template<>
+ void tst_viewerassetstats_index_object_t::test<4>()
+ {
+ gViewerAssetStatsMain = new LLViewerAssetStats();
+ LLViewerAssetStatsFF::set_region_main(region1_handle);
+
+ LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_TEXTURE, false, false);
+ LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_TEXTURE, false, false);
+
+ LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_BODYPART, false, false);
+ LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_BODYPART, false, false);
+
+ LLSD sd = gViewerAssetStatsMain->asLLSD(false);
+ ensure("Correct single-key LLSD map root", is_double_key_map(sd, "regions", "duration"));
+ ensure("Correct single-slot LLSD array regions", is_single_slot_array(sd["regions"], region1_handle));
+ sd = sd["regions"][0];
+
+ // Check a few points on the tree for content
+ ensure("sd[get_texture_non_temp_udp][enqueued] is 1", (1 == sd["get_texture_non_temp_udp"]["enqueued"].asInteger()));
+ ensure("sd[get_texture_temp_udp][enqueued] is 0", (0 == sd["get_texture_temp_udp"]["enqueued"].asInteger()));
+ ensure("sd[get_texture_non_temp_http][enqueued] is 0", (0 == sd["get_texture_non_temp_http"]["enqueued"].asInteger()));
+ ensure("sd[get_texture_temp_http][enqueued] is 0", (0 == sd["get_texture_temp_http"]["enqueued"].asInteger()));
+ ensure("sd[get_gesture_udp][dequeued] is 0", (0 == sd["get_gesture_udp"]["dequeued"].asInteger()));
+
+ // Reset and check zeros...
+ // Reset leaves current region in place
+ gViewerAssetStatsMain->reset();
+ sd = gViewerAssetStatsMain->asLLSD(false)["regions"][region1_handle_str];
+
+ delete gViewerAssetStatsMain;
+ gViewerAssetStatsMain = NULL;
+
+ ensure("sd[get_texture_non_temp_udp][enqueued] is reset", (0 == sd["get_texture_non_temp_udp"]["enqueued"].asInteger()));
+ ensure("sd[get_gesture_udp][dequeued] is reset", (0 == sd["get_gesture_udp"]["dequeued"].asInteger()));
+ }
+
+ // Create two global instances and verify no interactions
+ template<> template<>
+ void tst_viewerassetstats_index_object_t::test<5>()
+ {
+ gViewerAssetStatsThread1 = new LLViewerAssetStats();
+ gViewerAssetStatsMain = new LLViewerAssetStats();
+ LLViewerAssetStatsFF::set_region_main(region1_handle);
+
+ LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_TEXTURE, false, false);
+ LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_TEXTURE, false, false);
+
+ LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_BODYPART, false, false);
+ LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_BODYPART, false, false);
+
+ LLSD sd = gViewerAssetStatsThread1->asLLSD(false);
+ ensure("Other collector is empty", is_no_stats_map(sd));
+ sd = gViewerAssetStatsMain->asLLSD(false);
+ ensure("Correct single-key LLSD map root", is_double_key_map(sd, "regions", "duration"));
+ ensure("Correct single-slot LLSD array regions", is_single_slot_array(sd["regions"], region1_handle));
+ sd = sd["regions"][0];
+
+ // Check a few points on the tree for content
+ ensure("sd[get_texture_non_temp_udp][enqueued] is 1", (1 == sd["get_texture_non_temp_udp"]["enqueued"].asInteger()));
+ ensure("sd[get_texture_temp_udp][enqueued] is 0", (0 == sd["get_texture_temp_udp"]["enqueued"].asInteger()));
+ ensure("sd[get_texture_non_temp_http][enqueued] is 0", (0 == sd["get_texture_non_temp_http"]["enqueued"].asInteger()));
+ ensure("sd[get_texture_temp_http][enqueued] is 0", (0 == sd["get_texture_temp_http"]["enqueued"].asInteger()));
+ ensure("sd[get_gesture_udp][dequeued] is 0", (0 == sd["get_gesture_udp"]["dequeued"].asInteger()));
+
+ // Reset and check zeros...
+ // Reset leaves current region in place
+ gViewerAssetStatsMain->reset();
+ sd = gViewerAssetStatsMain->asLLSD(false)["regions"][0];
+
+ delete gViewerAssetStatsMain;
+ gViewerAssetStatsMain = NULL;
+ delete gViewerAssetStatsThread1;
+ gViewerAssetStatsThread1 = NULL;
+
+ ensure("sd[get_texture_non_temp_udp][enqueued] is reset", (0 == sd["get_texture_non_temp_udp"]["enqueued"].asInteger()));
+ ensure("sd[get_gesture_udp][dequeued] is reset", (0 == sd["get_gesture_udp"]["dequeued"].asInteger()));
+ }
+
+ // Check multiple region collection
+ template<> template<>
+ void tst_viewerassetstats_index_object_t::test<6>()
+ {
+ gViewerAssetStatsMain = new LLViewerAssetStats();
+
+ LLViewerAssetStatsFF::set_region_main(region1_handle);
+
+ LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_TEXTURE, false, false);
+ LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_TEXTURE, false, false);
+
+ LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_BODYPART, false, false);
+ LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_BODYPART, false, false);
+
+ LLViewerAssetStatsFF::set_region_main(region2_handle);
+
+ LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
+
+ LLSD sd = gViewerAssetStatsMain->asLLSD(false);
+
+ // std::cout << sd << std::endl;
+
+ ensure("Correct double-key LLSD map root", is_double_key_map(sd, "duration", "regions"));
+ ensure("Correct double-slot LLSD array regions", is_double_slot_array(sd["regions"], region1_handle, region2_handle));
+ LLSD sd1 = get_region(sd, region1_handle);
+ LLSD sd2 = get_region(sd, region2_handle);
+ ensure("Region1 is present in results", sd1.isMap());
+ ensure("Region2 is present in results", sd2.isMap());
+
+ // Check a few points on the tree for content
+ ensure_equals("sd1[get_texture_non_temp_udp][enqueued] is 1", sd1["get_texture_non_temp_udp"]["enqueued"].asInteger(), 1);
+ ensure_equals("sd1[get_texture_temp_udp][enqueued] is 0", sd1["get_texture_temp_udp"]["enqueued"].asInteger(), 0);
+ ensure_equals("sd1[get_texture_non_temp_http][enqueued] is 0", sd1["get_texture_non_temp_http"]["enqueued"].asInteger(), 0);
+ ensure_equals("sd1[get_texture_temp_http][enqueued] is 0", sd1["get_texture_temp_http"]["enqueued"].asInteger(), 0);
+ ensure_equals("sd1[get_gesture_udp][dequeued] is 0", sd1["get_gesture_udp"]["dequeued"].asInteger(), 0);
+
+ // Check a few points on the tree for content
+ ensure("sd2[get_gesture_udp][enqueued] is 4", (4 == sd2["get_gesture_udp"]["enqueued"].asInteger()));
+ ensure("sd2[get_gesture_udp][dequeued] is 0", (0 == sd2["get_gesture_udp"]["dequeued"].asInteger()));
+ ensure("sd2[get_texture_non_temp_udp][enqueued] is 0", (0 == sd2["get_texture_non_temp_udp"]["enqueued"].asInteger()));
+
+ // Reset and check zeros...
+ // Reset leaves current region in place
+ gViewerAssetStatsMain->reset();
+ sd = gViewerAssetStatsMain->asLLSD(false);
+ ensure("Correct single-key LLSD map root", is_double_key_map(sd, "regions", "duration"));
+ ensure("Correct single-slot LLSD array regions (p2)", is_single_slot_array(sd["regions"], region2_handle));
+ sd2 = sd["regions"][0];
+
+ delete gViewerAssetStatsMain;
+ gViewerAssetStatsMain = NULL;
+
+ ensure("sd2[get_texture_non_temp_udp][enqueued] is reset", (0 == sd2["get_texture_non_temp_udp"]["enqueued"].asInteger()));
+ ensure("sd2[get_gesture_udp][enqueued] is reset", (0 == sd2["get_gesture_udp"]["enqueued"].asInteger()));
+ }
+
+ // Check multiple region collection jumping back-and-forth between regions
+ template<> template<>
+ void tst_viewerassetstats_index_object_t::test<7>()
+ {
+ gViewerAssetStatsMain = new LLViewerAssetStats();
+
+ LLViewerAssetStatsFF::set_region_main(region1_handle);
+
+ LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_TEXTURE, false, false);
+ LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_TEXTURE, false, false);
+
+ LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_BODYPART, false, false);
+ LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_BODYPART, false, false);
+
+ LLViewerAssetStatsFF::set_region_main(region2_handle);
+
+ LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
+
+ LLViewerAssetStatsFF::set_region_main(region1_handle);
+
+ LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_TEXTURE, true, true);
+ LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_TEXTURE, true, true);
+
+ LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_BODYPART, false, false);
+ LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_BODYPART, false, false);
+
+ LLViewerAssetStatsFF::set_region_main(region2_handle);
+
+ LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
+ LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_GESTURE, false, false);
+
+ LLSD sd = gViewerAssetStatsMain->asLLSD(false);
+
+ ensure("Correct double-key LLSD map root", is_double_key_map(sd, "duration", "regions"));
+ ensure("Correct double-slot LLSD array regions", is_double_slot_array(sd["regions"], region1_handle, region2_handle));
+ LLSD sd1 = get_region(sd, region1_handle);
+ LLSD sd2 = get_region(sd, region2_handle);
+ ensure("Region1 is present in results", sd1.isMap());
+ ensure("Region2 is present in results", sd2.isMap());
+
+ // Check a few points on the tree for content
+ ensure("sd1[get_texture_non_temp_udp][enqueued] is 1", (1 == sd1["get_texture_non_temp_udp"]["enqueued"].asInteger()));
+ ensure("sd1[get_texture_temp_udp][enqueued] is 0", (0 == sd1["get_texture_temp_udp"]["enqueued"].asInteger()));
+ ensure("sd1[get_texture_non_temp_http][enqueued] is 0", (0 == sd1["get_texture_non_temp_http"]["enqueued"].asInteger()));
+ ensure("sd1[get_texture_temp_http][enqueued] is 1", (1 == sd1["get_texture_temp_http"]["enqueued"].asInteger()));
+ ensure("sd1[get_gesture_udp][dequeued] is 0", (0 == sd1["get_gesture_udp"]["dequeued"].asInteger()));
+
+ // Check a few points on the tree for content
+ ensure("sd2[get_gesture_udp][enqueued] is 8", (8 == sd2["get_gesture_udp"]["enqueued"].asInteger()));
+ ensure("sd2[get_gesture_udp][dequeued] is 0", (0 == sd2["get_gesture_udp"]["dequeued"].asInteger()));
+ ensure("sd2[get_texture_non_temp_udp][enqueued] is 0", (0 == sd2["get_texture_non_temp_udp"]["enqueued"].asInteger()));
+
+ // Reset and check zeros...
+ // Reset leaves current region in place
+ gViewerAssetStatsMain->reset();
+ sd = gViewerAssetStatsMain->asLLSD(false);
+ ensure("Correct single-key LLSD map root", is_double_key_map(sd, "duration", "regions"));
+ ensure("Correct single-slot LLSD array regions (p2)", is_single_slot_array(sd["regions"], region2_handle));
+ sd2 = get_region(sd, region2_handle);
+ ensure("Region2 is present in results", sd2.isMap());
+
+ delete gViewerAssetStatsMain;
+ gViewerAssetStatsMain = NULL;
+
+ ensure_equals("sd2[get_texture_non_temp_udp][enqueued] is reset", sd2["get_texture_non_temp_udp"]["enqueued"].asInteger(), 0);
+ ensure_equals("sd2[get_gesture_udp][enqueued] is reset", sd2["get_gesture_udp"]["enqueued"].asInteger(), 0);
+ }
+
+ // Non-texture assets ignore transport and persistence flags
+ template<> template<>
+ void tst_viewerassetstats_index_object_t::test<8>()
+ {
+ gViewerAssetStatsThread1 = new LLViewerAssetStats();
+ gViewerAssetStatsMain = new LLViewerAssetStats();
+ LLViewerAssetStatsFF::set_region_main(region1_handle);
+
+ LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_TEXTURE, false, false);
+ LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_TEXTURE, false, false);
+
+ LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_BODYPART, false, false);
+ LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_BODYPART, false, false);
+
+ LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_BODYPART, false, true);
+ LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_BODYPART, false, true);
+
+ LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_BODYPART, true, false);
+ LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_BODYPART, true, false);
+
+ LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_BODYPART, true, true);
+ LLViewerAssetStatsFF::record_dequeue_main(LLViewerAssetType::AT_BODYPART, true, true);
+
+ LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_LSL_BYTECODE, false, false);
+
+ LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_LSL_BYTECODE, false, true);
+
+ LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_LSL_BYTECODE, true, false);
+
+ LLViewerAssetStatsFF::record_enqueue_main(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+
+ LLSD sd = gViewerAssetStatsThread1->asLLSD(false);
+ ensure("Other collector is empty", is_no_stats_map(sd));
+ sd = gViewerAssetStatsMain->asLLSD(false);
+ ensure("Correct single-key LLSD map root", is_double_key_map(sd, "regions", "duration"));
+ ensure("Correct single-slot LLSD array regions", is_single_slot_array(sd["regions"], region1_handle));
+ sd = get_region(sd, region1_handle);
+ ensure("Region1 is present in results", sd.isMap());
+
+ // Check a few points on the tree for content
+ ensure("sd[get_gesture_udp][enqueued] is 0", (0 == sd["get_gesture_udp"]["enqueued"].asInteger()));
+ ensure("sd[get_gesture_udp][dequeued] is 0", (0 == sd["get_gesture_udp"]["dequeued"].asInteger()));
+
+ ensure("sd[get_wearable_udp][enqueued] is 4", (4 == sd["get_wearable_udp"]["enqueued"].asInteger()));
+ ensure("sd[get_wearable_udp][dequeued] is 4", (4 == sd["get_wearable_udp"]["dequeued"].asInteger()));
+
+ ensure("sd[get_other][enqueued] is 4", (4 == sd["get_other"]["enqueued"].asInteger()));
+ ensure("sd[get_other][dequeued] is 0", (0 == sd["get_other"]["dequeued"].asInteger()));
+
+ // Reset and check zeros...
+ // Reset leaves current region in place
+ gViewerAssetStatsMain->reset();
+ sd = get_region(gViewerAssetStatsMain->asLLSD(false), region1_handle);
+ ensure("Region1 is present in results", sd.isMap());
+
+ delete gViewerAssetStatsMain;
+ gViewerAssetStatsMain = NULL;
+ delete gViewerAssetStatsThread1;
+ gViewerAssetStatsThread1 = NULL;
+
+ ensure_equals("sd[get_texture_non_temp_udp][enqueued] is reset", sd["get_texture_non_temp_udp"]["enqueued"].asInteger(), 0);
+ ensure_equals("sd[get_gesture_udp][dequeued] is reset", sd["get_gesture_udp"]["dequeued"].asInteger(), 0);
+ }
+
+
+ // LLViewerAssetStats::merge() basic functions work
+ template<> template<>
+ void tst_viewerassetstats_index_object_t::test<9>()
+ {
+ LLViewerAssetStats s1;
+ LLViewerAssetStats s2;
+
+ s1.setRegion(region1_handle);
+ s2.setRegion(region1_handle);
+
+ s1.recordGetServiced(LLViewerAssetType::AT_TEXTURE, true, true, 5000000);
+ s1.recordGetServiced(LLViewerAssetType::AT_TEXTURE, true, true, 6000000);
+ s1.recordGetServiced(LLViewerAssetType::AT_TEXTURE, true, true, 8000000);
+ s1.recordGetServiced(LLViewerAssetType::AT_TEXTURE, true, true, 7000000);
+ s1.recordGetServiced(LLViewerAssetType::AT_TEXTURE, true, true, 9000000);
+
+ s2.recordGetServiced(LLViewerAssetType::AT_TEXTURE, true, true, 2000000);
+ s2.recordGetServiced(LLViewerAssetType::AT_TEXTURE, true, true, 3000000);
+ s2.recordGetServiced(LLViewerAssetType::AT_TEXTURE, true, true, 4000000);
+
+ s2.merge(s1);
+
+ LLSD s2_llsd = get_region(s2.asLLSD(false), region1_handle);
+ ensure("Region1 is present in results", s2_llsd.isMap());
+
+ ensure_equals("count after merge", s2_llsd["get_texture_temp_http"]["resp_count"].asInteger(), 8);
+ ensure_approximately_equals("min after merge", s2_llsd["get_texture_temp_http"]["resp_min"].asReal(), 2.0, 22);
+ ensure_approximately_equals("max after merge", s2_llsd["get_texture_temp_http"]["resp_max"].asReal(), 9.0, 22);
+ ensure_approximately_equals("max after merge", s2_llsd["get_texture_temp_http"]["resp_mean"].asReal(), 5.5, 22);
+ }
+
+ // LLViewerAssetStats::merge() basic functions work without corrupting source data
+ template<> template<>
+ void tst_viewerassetstats_index_object_t::test<10>()
+ {
+ LLViewerAssetStats s1;
+ LLViewerAssetStats s2;
+
+ s1.setRegion(region1_handle);
+ s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+
+ s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+
+ s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 23289200);
+ s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 282900);
+
+
+ s2.setRegion(region2_handle);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+
+ s2.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 6500000);
+ s2.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 10000);
+
+ {
+ s2.merge(s1);
+
+ LLSD src = s1.asLLSD(false);
+ LLSD dst = s2.asLLSD(false);
+
+ ensure_equals("merge src has single region", src["regions"].size(), 1);
+ ensure_equals("merge dst has dual regions", dst["regions"].size(), 2);
+
+ // Remove time stamps, they're a problem
+ src.erase("duration");
+ src["regions"][0].erase("duration");
+ dst.erase("duration");
+ dst["regions"][0].erase("duration");
+ dst["regions"][1].erase("duration");
+
+ LLSD s1_llsd = get_region(src, region1_handle);
+ ensure("Region1 is present in src", s1_llsd.isMap());
+ LLSD s2_llsd = get_region(dst, region1_handle);
+ ensure("Region1 is present in dst", s2_llsd.isMap());
+
+ ensure("result from src is in dst", llsd_equals(s1_llsd, s2_llsd));
+ }
+
+ s1.setRegion(region1_handle);
+ s2.setRegion(region1_handle);
+ s1.reset();
+ s2.reset();
+
+ s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+
+ s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+
+ s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 23289200);
+ s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 282900);
+
+
+ s2.setRegion(region1_handle);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+
+ s2.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 6500000);
+ s2.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 10000);
+
+ {
+ s2.merge(s1);
+
+ LLSD src = s1.asLLSD(false);
+ LLSD dst = s2.asLLSD(false);
+
+ ensure_equals("merge src has single region (p2)", src["regions"].size(), 1);
+ ensure_equals("merge dst has single region (p2)", dst["regions"].size(), 1);
+
+ // Remove time stamps, they're a problem
+ src.erase("duration");
+ src["regions"][0].erase("duration");
+ dst.erase("duration");
+ dst["regions"][0].erase("duration");
+
+ LLSD s1_llsd = get_region(src, region1_handle);
+ ensure("Region1 is present in src", s1_llsd.isMap());
+ LLSD s2_llsd = get_region(dst, region1_handle);
+ ensure("Region1 is present in dst", s2_llsd.isMap());
+
+ ensure_equals("src counts okay (enq)", s1_llsd["get_other"]["enqueued"].asInteger(), 4);
+ ensure_equals("src counts okay (deq)", s1_llsd["get_other"]["dequeued"].asInteger(), 4);
+ ensure_equals("src resp counts okay", s1_llsd["get_other"]["resp_count"].asInteger(), 2);
+ ensure_approximately_equals("src respmin okay", s1_llsd["get_other"]["resp_min"].asReal(), 0.2829, 20);
+ ensure_approximately_equals("src respmax okay", s1_llsd["get_other"]["resp_max"].asReal(), 23.2892, 20);
+
+ ensure_equals("dst counts okay (enq)", s2_llsd["get_other"]["enqueued"].asInteger(), 12);
+ ensure_equals("src counts okay (deq)", s2_llsd["get_other"]["dequeued"].asInteger(), 11);
+ ensure_equals("dst resp counts okay", s2_llsd["get_other"]["resp_count"].asInteger(), 4);
+ ensure_approximately_equals("dst respmin okay", s2_llsd["get_other"]["resp_min"].asReal(), 0.010, 20);
+ ensure_approximately_equals("dst respmax okay", s2_llsd["get_other"]["resp_max"].asReal(), 23.2892, 20);
+ }
+ }
+
+
+ // Maximum merges are interesting when one side contributes nothing
+ template<> template<>
+ void tst_viewerassetstats_index_object_t::test<11>()
+ {
+ LLViewerAssetStats s1;
+ LLViewerAssetStats s2;
+
+ s1.setRegion(region1_handle);
+ s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+
+ s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+
+ // Want to test negative numbers here but have to work in U64
+ s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 0);
+ s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 0);
+ s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 0);
+
+ s2.setRegion(region1_handle);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+
+ {
+ s2.merge(s1);
+
+ LLSD src = s1.asLLSD(false);
+ LLSD dst = s2.asLLSD(false);
+
+ ensure_equals("merge src has single region", src["regions"].size(), 1);
+ ensure_equals("merge dst has single region", dst["regions"].size(), 1);
+
+ // Remove time stamps, they're a problem
+ src.erase("duration");
+ src["regions"][0].erase("duration");
+ dst.erase("duration");
+ dst["regions"][0].erase("duration");
+
+ LLSD s2_llsd = get_region(dst, region1_handle);
+ ensure("Region1 is present in dst", s2_llsd.isMap());
+
+ ensure_equals("dst counts come from src only", s2_llsd["get_other"]["resp_count"].asInteger(), 3);
+
+ ensure_approximately_equals("dst maximum with count 0 does not contribute to merged maximum",
+ s2_llsd["get_other"]["resp_max"].asReal(), F64(0.0), 20);
+ }
+
+ // Other way around
+ s1.setRegion(region1_handle);
+ s2.setRegion(region1_handle);
+ s1.reset();
+ s2.reset();
+
+ s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+
+ s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+
+ // Want to test negative numbers here but have to work in U64
+ s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 0);
+ s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 0);
+ s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 0);
+
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+
+ {
+ s1.merge(s2);
+
+ LLSD src = s2.asLLSD(false);
+ LLSD dst = s1.asLLSD(false);
+
+ ensure_equals("merge src has single region", src["regions"].size(), 1);
+ ensure_equals("merge dst has single region", dst["regions"].size(), 1);
+
+ // Remove time stamps, they're a problem
+ src.erase("duration");
+ src["regions"][0].erase("duration");
+ dst.erase("duration");
+ dst["regions"][0].erase("duration");
+
+ LLSD s2_llsd = get_region(dst, region1_handle);
+ ensure("Region1 is present in dst", s2_llsd.isMap());
+
+ ensure_equals("dst counts come from src only (flipped)", s2_llsd["get_other"]["resp_count"].asInteger(), 3);
+
+ ensure_approximately_equals("dst maximum with count 0 does not contribute to merged maximum (flipped)",
+ s2_llsd["get_other"]["resp_max"].asReal(), F64(0.0), 20);
+ }
+ }
+
+ // Minimum merges are interesting when one side contributes nothing
+ template<> template<>
+ void tst_viewerassetstats_index_object_t::test<12>()
+ {
+ LLViewerAssetStats s1;
+ LLViewerAssetStats s2;
+
+ s1.setRegion(region1_handle);
+ s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+
+ s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+
+ s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 3800000);
+ s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 2700000);
+ s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 2900000);
+
+ s2.setRegion(region1_handle);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+
+ {
+ s2.merge(s1);
+
+ LLSD src = s1.asLLSD(false);
+ LLSD dst = s2.asLLSD(false);
+
+ ensure_equals("merge src has single region", src["regions"].size(), 1);
+ ensure_equals("merge dst has single region", dst["regions"].size(), 1);
+
+ // Remove time stamps, they're a problem
+ src.erase("duration");
+ src["regions"][0].erase("duration");
+ dst.erase("duration");
+ dst["regions"][0].erase("duration");
+
+ LLSD s2_llsd = get_region(dst, region1_handle);
+ ensure("Region1 is present in dst", s2_llsd.isMap());
+
+ ensure_equals("dst counts come from src only", s2_llsd["get_other"]["resp_count"].asInteger(), 3);
+
+ ensure_approximately_equals("dst minimum with count 0 does not contribute to merged minimum",
+ s2_llsd["get_other"]["resp_min"].asReal(), F64(2.7), 20);
+ }
+
+ // Other way around
+ s1.setRegion(region1_handle);
+ s2.setRegion(region1_handle);
+ s1.reset();
+ s2.reset();
+
+ s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s1.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+
+ s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s1.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+
+ s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 3800000);
+ s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 2700000);
+ s1.recordGetServiced(LLViewerAssetType::AT_LSL_BYTECODE, true, true, 2900000);
+
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetEnqueued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+ s2.recordGetDequeued(LLViewerAssetType::AT_LSL_BYTECODE, true, true);
+
+ {
+ s1.merge(s2);
+
+ LLSD src = s2.asLLSD(false);
+ LLSD dst = s1.asLLSD(false);
+
+ ensure_equals("merge src has single region", src["regions"].size(), 1);
+ ensure_equals("merge dst has single region", dst["regions"].size(), 1);
+
+ // Remove time stamps, they're a problem
+ src.erase("duration");
+ src["regions"][0].erase("duration");
+ dst.erase("duration");
+ dst["regions"][0].erase("duration");
+
+ LLSD s2_llsd = get_region(dst, region1_handle);
+ ensure("Region1 is present in dst", s2_llsd.isMap());
+
+ ensure_equals("dst counts come from src only (flipped)", s2_llsd["get_other"]["resp_count"].asInteger(), 3);
+
+ ensure_approximately_equals("dst minimum with count 0 does not contribute to merged minimum (flipped)",
+ s2_llsd["get_other"]["resp_min"].asReal(), F64(2.7), 20);
+ }
+ }
+
+}
diff --git a/indra/newview/tests/llworldmap_test.cpp b/indra/newview/tests/llworldmap_test.cpp
index b976ac5ea9..acc6e814bc 100644
--- a/indra/newview/tests/llworldmap_test.cpp
+++ b/indra/newview/tests/llworldmap_test.cpp
@@ -25,13 +25,16 @@
* $/LicenseInfo$
*/
-// Precompiled header: almost always required for newview cpp files
-#include "../llviewerprecompiledheaders.h"
-// Class to test
-#include "../llworldmap.h"
// Dependencies
-#include "../llviewerimagelist.h"
+#include "linden_common.h"
+#include "llapr.h"
+#include "llsingleton.h"
+#include "lltrans.h"
+#include "lluistring.h"
+#include "../llviewertexture.h"
#include "../llworldmapmessage.h"
+// Class to test
+#include "../llworldmap.h"
// Tut header
#include "../test/lltut.h"
@@ -44,34 +47,29 @@
// * A simulator for a class can be implemented here. Please comment and document thoroughly.
// Stub image calls
-LLViewerImageList::LLViewerImageList() { }
-LLViewerImageList::~LLViewerImageList() { }
-LLViewerImageList gImageList;
-LLViewerImage* LLViewerImageList::getImage(const LLUUID &image_id,
- BOOL usemipmaps,
- BOOL level_immediate,
- LLGLint internal_format,
- LLGLenum primary_format,
- LLHost request_from_host)
-{ return NULL; }
-void LLViewerImage::setBoostLevel(S32 level) { }
-void LLImageGL::setAddressMode(LLTexUnit::eTextureAddressMode mode) { }
+void LLViewerTexture::setBoostLevel(S32 ) { }
+void LLViewerTexture::setAddressMode(LLTexUnit::eTextureAddressMode ) { }
+LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTexture(const LLUUID&, BOOL, LLViewerTexture::EBoostLevel, S8,
+ LLGLint, LLGLenum, LLHost ) { return NULL; }
// Stub related map calls
LLWorldMapMessage::LLWorldMapMessage() { }
LLWorldMapMessage::~LLWorldMapMessage() { }
void LLWorldMapMessage::sendItemRequest(U32 type, U64 handle) { }
void LLWorldMapMessage::sendMapBlockRequest(U16 min_x, U16 min_y, U16 max_x, U16 max_y, bool return_nonexistent) { }
+
LLWorldMipmap::LLWorldMipmap() { }
LLWorldMipmap::~LLWorldMipmap() { }
void LLWorldMipmap::reset() { }
void LLWorldMipmap::dropBoostLevels() { }
void LLWorldMipmap::equalizeBoostLevels() { }
-LLPointer<LLViewerImage> LLWorldMipmap::getObjectsTile(U32 grid_x, U32 grid_y, S32 level, bool load)
-{ return NULL; }
+LLPointer<LLViewerFetchedTexture> LLWorldMipmap::getObjectsTile(U32 grid_x, U32 grid_y, S32 level, bool load) { return NULL; }
// Stub other stuff
-BOOL gPacificDaylightTime;
+std::string LLTrans::getString(const std::string &, const LLStringUtil::format_map_t& ) { return std::string("test_trans"); }
+void LLUIString::updateResult() const { }
+void LLUIString::setArg(const std::string& , const std::string& ) { }
+void LLUIString::assign(const std::string& ) { }
// End Stubbing
// -------------------------------------------------------------------------------------------
@@ -237,7 +235,7 @@ namespace tut
// Test 9 : setLandForSaleImage() / getLandForSaleImage()
LLUUID id;
mSim->setLandForSaleImage(id);
- LLPointer<LLViewerImage> image = mSim->getLandForSaleImage();
+ LLPointer<LLViewerFetchedTexture> image = mSim->getLandForSaleImage();
ensure("LLSimInfo::getLandForSaleImage() test failed", image.isNull());
// Test 10 : isPG()
mSim->setAccess(SIM_ACCESS_PG);
@@ -370,7 +368,7 @@ namespace tut
}
// Test 7 : getObjectsTile()
try {
- LLPointer<LLViewerImage> image = mWorld->getObjectsTile((U32)(X_WORLD_TEST/REGION_WIDTH_METERS), (U32)(Y_WORLD_TEST/REGION_WIDTH_METERS), 1);
+ LLPointer<LLViewerFetchedTexture> image = mWorld->getObjectsTile((U32)(X_WORLD_TEST/REGION_WIDTH_METERS), (U32)(Y_WORLD_TEST/REGION_WIDTH_METERS), 1);
ensure("LLWorldMap::getObjectsTile() failed", image.isNull());
} catch (...) {
fail("LLWorldMap::getObjectsTile() test failed with exception");
diff --git a/indra/newview/tests/llworldmipmap_test.cpp b/indra/newview/tests/llworldmipmap_test.cpp
index 54887ae219..4c0959d1a9 100644
--- a/indra/newview/tests/llworldmipmap_test.cpp
+++ b/indra/newview/tests/llworldmipmap_test.cpp
@@ -25,12 +25,12 @@
* $/LicenseInfo$
*/
-// Precompiled header: almost always required for newview cpp files
-#include "../llviewerprecompiledheaders.h"
+// Dependencies
+#include "linden_common.h"
+#include "../llviewertexture.h"
+#include "../llviewercontrol.h"
// Class to test
#include "../llworldmipmap.h"
-// Dependencies
-#include "../llviewerimagelist.h"
// Tut header
#include "../test/lltut.h"
@@ -42,19 +42,14 @@
// * Do not make any assumption as to how those classes or methods work (i.e. don't copy/paste code)
// * A simulator for a class can be implemented here. Please comment and document thoroughly.
-LLViewerImageList::LLViewerImageList() { }
-LLViewerImageList::~LLViewerImageList() { }
-
-LLViewerImageList gImageList;
+void LLViewerTexture::setBoostLevel(S32 ) { }
+LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromUrl(const std::string&, BOOL, LLViewerTexture::EBoostLevel, S8,
+ LLGLint, LLGLenum, const LLUUID& ) { return NULL; }
-LLViewerImage* LLViewerImageList::getImageFromUrl(const std::string& url,
- BOOL usemipmaps,
- BOOL level_immediate,
- LLGLint internal_format,
- LLGLenum primary_format,
- const LLUUID& force_id)
-{ return NULL; }
-void LLViewerImage::setBoostLevel(S32 level) { }
+LLControlGroup::LLControlGroup(const std::string& name) : LLInstanceTracker<LLControlGroup, std::string>(name) { }
+LLControlGroup::~LLControlGroup() { }
+std::string LLControlGroup::getString(const std::string& ) { return std::string("test_url"); }
+LLControlGroup gSavedSettings("test_settings");
// End Stubbing
// -------------------------------------------------------------------------------------------
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 6c77f8ec38..338c62b9fb 100644
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -255,12 +255,6 @@ class WindowsManifest(ViewerManifest):
self.enable_crt_manifest_check()
- # Get kdu dll, continue if missing.
- try:
- self.path('llkdu.dll', dst='llkdu.dll')
- except RuntimeError:
- print "Skipping llkdu.dll"
-
# Get llcommon and deps. If missing assume static linkage and continue.
try:
self.path('llcommon.dll')
@@ -625,21 +619,21 @@ class DarwinManifest(ViewerManifest):
libdir = "../../libraries/universal-darwin/lib_release"
dylibs = {}
- # need to get the kdu dll from any of the build directories as well
- for lib in "llkdu", "llcommon":
- libfile = "lib%s.dylib" % lib
- try:
- self.path(self.find_existing_file(os.path.join(os.pardir,
- lib,
- self.args['configuration'],
- libfile),
- os.path.join(libdir, libfile)),
- dst=libfile)
- except RuntimeError:
- print "Skipping %s" % libfile
- dylibs[lib] = False
- else:
- dylibs[lib] = True
+ # Need to get the llcommon dll from any of the build directories as well
+ lib = "llcommon"
+ libfile = "lib%s.dylib" % lib
+ try:
+ self.path(self.find_existing_file(os.path.join(os.pardir,
+ lib,
+ self.args['configuration'],
+ libfile),
+ os.path.join(libdir, libfile)),
+ dst=libfile)
+ except RuntimeError:
+ print "Skipping %s" % libfile
+ dylibs[lib] = False
+ else:
+ dylibs[lib] = True
if dylibs["llcommon"]:
for libfile in ("libapr-1.0.3.7.dylib",
@@ -931,15 +925,6 @@ class Linux_i686Manifest(LinuxManifest):
def construct(self):
super(Linux_i686Manifest, self).construct()
- # install either the libllkdu we just built, or a prebuilt one, in
- # decreasing order of preference. for linux package, this goes to bin/
- try:
- self.path(self.find_existing_file('../llkdu/libllkdu.so',
- '../../libraries/i686-linux/lib_release_client/libllkdu.so'),
- dst='bin/libllkdu.so')
- except:
- print "Skipping libllkdu.so - not found"
-
if self.prefix("../../libraries/i686-linux/lib_release_client", dst="lib"):
self.path("libapr-1.so.0")
self.path("libaprutil-1.so.0")
@@ -956,12 +941,6 @@ class Linux_i686Manifest(LinuxManifest):
self.path("libopenal.so", "libopenal.so.1")
self.path("libopenal.so", "libvivoxoal.so.1") # vivox's sdk expects this soname
try:
- self.path("libkdu.so")
- pass
- except:
- print "Skipping libkdu.so - not found"
- pass
- try:
self.path("libfmod-3.75.so")
pass
except:
diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt
index 66c78a86c4..e9eb3c1884 100644
--- a/indra/test/CMakeLists.txt
+++ b/indra/test/CMakeLists.txt
@@ -27,6 +27,7 @@ include_directories(
${LLXML_INCLUDE_DIRS}
${LSCRIPT_INCLUDE_DIRS}
${GOOGLEMOCK_INCLUDE_DIRS}
+ ${TUT_INCLUDE_DIR}
)
set(test_SOURCE_FILES
diff --git a/indra/test_apps/llplugintest/llmediaplugintest.cpp b/indra/test_apps/llplugintest/llmediaplugintest.cpp
index 873fa23db8..4a2272032b 100644
--- a/indra/test_apps/llplugintest/llmediaplugintest.cpp
+++ b/indra/test_apps/llplugintest/llmediaplugintest.cpp
@@ -2220,6 +2220,21 @@ void LLMediaPluginTest::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent e
<< ", height = " << self->getGeometryHeight()
<< std::endl;
break;
+
+ case MEDIA_EVENT_AUTH_REQUEST:
+ {
+ //std::cerr << "Media event: MEDIA_EVENT_AUTH_REQUEST, url " << self->getAuthURL() ", realm " << self->getAuthRealm() << std::endl;
+
+ // TODO: display an auth dialog
+ self->sendAuthResponse(false, "", "");
+ }
+ break;
+
+ case MEDIA_EVENT_LINK_HOVERED:
+ {
+ std::cerr << "Media event: MEDIA_EVENT_LINK_HOVERED, hover text is: " << self->getHoverText() << std::endl;
+ };
+ break;
}
}
diff --git a/indra/viewer_components/updater/llupdatedownloader.cpp b/indra/viewer_components/updater/llupdatedownloader.cpp
index c17a50e242..e88d1bf811 100644
--- a/indra/viewer_components/updater/llupdatedownloader.cpp
+++ b/indra/viewer_components/updater/llupdatedownloader.cpp
@@ -24,17 +24,20 @@
*/
#include "linden_common.h"
+
+#include "llupdatedownloader.h"
+
#include <stdexcept>
#include <boost/format.hpp>
#include <boost/lexical_cast.hpp>
#include <curl/curl.h>
#include "lldir.h"
+#include "llevents.h"
#include "llfile.h"
#include "llmd5.h"
#include "llsd.h"
#include "llsdserialize.h"
#include "llthread.h"
-#include "llupdatedownloader.h"
#include "llupdaterservice.h"
@@ -45,18 +48,25 @@ public:
Implementation(LLUpdateDownloader::Client & client);
~Implementation();
void cancel(void);
- void download(LLURI const & uri, std::string const & hash);
+ void download(LLURI const & uri,
+ std::string const & hash,
+ std::string const & updateVersion,
+ bool required);
bool isDownloading(void);
size_t onHeader(void * header, size_t size);
size_t onBody(void * header, size_t size);
+ int onProgress(double downloadSize, double bytesDownloaded);
void resume(void);
+ void setBandwidthLimit(U64 bytesPerSecond);
private:
+ curl_off_t mBandwidthLimit;
bool mCancelled;
LLUpdateDownloader::Client & mClient;
CURL * mCurl;
LLSD mDownloadData;
llofstream mDownloadStream;
+ unsigned char mDownloadPercent;
std::string mDownloadRecordPath;
curl_slist * mHeaderList;
@@ -113,9 +123,12 @@ void LLUpdateDownloader::cancel(void)
}
-void LLUpdateDownloader::download(LLURI const & uri, std::string const & hash)
+void LLUpdateDownloader::download(LLURI const & uri,
+ std::string const & hash,
+ std::string const & updateVersion,
+ bool required)
{
- mImplementation->download(uri, hash);
+ mImplementation->download(uri, hash, updateVersion, required);
}
@@ -131,6 +144,12 @@ void LLUpdateDownloader::resume(void)
}
+void LLUpdateDownloader::setBandwidthLimit(U64 bytesPerSecond)
+{
+ mImplementation->setBandwidthLimit(bytesPerSecond);
+}
+
+
// LLUpdateDownloader::Implementation
//-----------------------------------------------------------------------------
@@ -149,14 +168,27 @@ namespace {
size_t bytes = blockSize * blocks;
return reinterpret_cast<LLUpdateDownloader::Implementation *>(downloader)->onHeader(data, bytes);
}
+
+
+ int progress_callback(void * downloader,
+ double dowloadTotal,
+ double downloadNow,
+ double uploadTotal,
+ double uploadNow)
+ {
+ return reinterpret_cast<LLUpdateDownloader::Implementation *>(downloader)->
+ onProgress(dowloadTotal, downloadNow);
+ }
}
LLUpdateDownloader::Implementation::Implementation(LLUpdateDownloader::Client & client):
LLThread("LLUpdateDownloader"),
+ mBandwidthLimit(0),
mCancelled(false),
mClient(client),
mCurl(0),
+ mDownloadPercent(0),
mHeaderList(0)
{
CURLcode code = curl_global_init(CURL_GLOBAL_ALL); // Just in case.
@@ -182,12 +214,17 @@ void LLUpdateDownloader::Implementation::cancel(void)
}
-void LLUpdateDownloader::Implementation::download(LLURI const & uri, std::string const & hash)
+void LLUpdateDownloader::Implementation::download(LLURI const & uri,
+ std::string const & hash,
+ std::string const & updateVersion,
+ bool required)
{
if(isDownloading()) mClient.downloadError("download in progress");
mDownloadRecordPath = downloadMarkerPath();
mDownloadData = LLSD();
+ mDownloadData["required"] = required;
+ mDownloadData["update_version"] = updateVersion;
try {
startDownloading(uri, hash);
} catch(DownloadError const & e) {
@@ -233,12 +270,18 @@ void LLUpdateDownloader::Implementation::resume(void)
resumeDownloading(fileStatus.st_size);
} else if(!validateDownload()) {
LLFile::remove(filePath);
- download(LLURI(mDownloadData["url"].asString()), mDownloadData["hash"].asString());
+ download(LLURI(mDownloadData["url"].asString()),
+ mDownloadData["hash"].asString(),
+ mDownloadData["update_version"].asString(),
+ mDownloadData["required"].asBoolean());
} else {
mClient.downloadComplete(mDownloadData);
}
} else {
- download(LLURI(mDownloadData["url"].asString()), mDownloadData["hash"].asString());
+ download(LLURI(mDownloadData["url"].asString()),
+ mDownloadData["hash"].asString(),
+ mDownloadData["update_version"].asString(),
+ mDownloadData["required"].asBoolean());
}
} catch(DownloadError & e) {
mClient.downloadError(e.what());
@@ -246,6 +289,20 @@ void LLUpdateDownloader::Implementation::resume(void)
}
+void LLUpdateDownloader::Implementation::setBandwidthLimit(U64 bytesPerSecond)
+{
+ if((mBandwidthLimit != bytesPerSecond) && isDownloading() && !mDownloadData["required"].asBoolean()) {
+ llassert(mCurl != 0);
+ mBandwidthLimit = bytesPerSecond;
+ CURLcode code = curl_easy_setopt(mCurl, CURLOPT_MAX_RECV_SPEED_LARGE, &mBandwidthLimit);
+ if(code != CURLE_OK) LL_WARNS("UpdateDownload") <<
+ "unable to change dowload bandwidth" << LL_ENDL;
+ } else {
+ mBandwidthLimit = bytesPerSecond;
+ }
+}
+
+
size_t LLUpdateDownloader::Implementation::onHeader(void * buffer, size_t size)
{
char const * headerPtr = reinterpret_cast<const char *> (buffer);
@@ -290,6 +347,30 @@ size_t LLUpdateDownloader::Implementation::onBody(void * buffer, size_t size)
}
+int LLUpdateDownloader::Implementation::onProgress(double downloadSize, double bytesDownloaded)
+{
+ int downloadPercent = static_cast<int>(100. * (bytesDownloaded / downloadSize));
+ if(downloadPercent > mDownloadPercent) {
+ mDownloadPercent = downloadPercent;
+
+ LLSD event;
+ event["pump"] = LLUpdaterService::pumpName();
+ LLSD payload;
+ payload["type"] = LLSD(LLUpdaterService::PROGRESS);
+ payload["download_size"] = downloadSize;
+ payload["bytes_downloaded"] = bytesDownloaded;
+ event["payload"] = payload;
+ LLEventPumps::instance().obtain("mainlooprepeater").post(event);
+
+ LL_INFOS("UpdateDownload") << "progress event " << payload << LL_ENDL;
+ } else {
+ ; // Keep events to a reasonalbe number.
+ }
+
+ return 0;
+}
+
+
void LLUpdateDownloader::Implementation::run(void)
{
CURLcode code = curl_easy_perform(mCurl);
@@ -343,6 +424,14 @@ void LLUpdateDownloader::Implementation::initializeCurlGet(std::string const & u
}
throwOnCurlError(curl_easy_setopt(mCurl, CURLOPT_HTTPGET, true));
throwOnCurlError(curl_easy_setopt(mCurl, CURLOPT_URL, url.c_str()));
+ throwOnCurlError(curl_easy_setopt(mCurl, CURLOPT_PROGRESSFUNCTION, &progress_callback));
+ throwOnCurlError(curl_easy_setopt(mCurl, CURLOPT_PROGRESSDATA, this));
+ throwOnCurlError(curl_easy_setopt(mCurl, CURLOPT_NOPROGRESS, false));
+ // if it's a required update set the bandwidth limit to 0 (unlimited)
+ curl_off_t limit = mDownloadData["required"].asBoolean() ? 0 : mBandwidthLimit;
+ throwOnCurlError(curl_easy_setopt(mCurl, CURLOPT_MAX_RECV_SPEED_LARGE, limit));
+
+ mDownloadPercent = 0;
}
diff --git a/indra/viewer_components/updater/llupdatedownloader.h b/indra/viewer_components/updater/llupdatedownloader.h
index 1b3d7480fd..0d635640cf 100644
--- a/indra/viewer_components/updater/llupdatedownloader.h
+++ b/indra/viewer_components/updater/llupdatedownloader.h
@@ -52,7 +52,10 @@ public:
void cancel(void);
// Start a new download.
- void download(LLURI const & uri, std::string const & hash);
+ void download(LLURI const & uri,
+ std::string const & hash,
+ std::string const & updateVersion,
+ bool required=false);
// Returns true if a download is in progress.
bool isDownloading(void);
@@ -60,6 +63,9 @@ public:
// Resume a partial download.
void resume(void);
+ // Set a limit on the dowload rate.
+ void setBandwidthLimit(U64 bytesPerSecond);
+
private:
boost::shared_ptr<Implementation> mImplementation;
};
@@ -76,6 +82,7 @@ public:
// url - source (remote) location
// hash - the md5 sum that should match the installer file.
// path - destination (local) location
+ // required - boolean indicating if this is a required update.
// size - the size of the installer in bytes
virtual void downloadComplete(LLSD const & data) = 0;
diff --git a/indra/viewer_components/updater/llupdateinstaller.cpp b/indra/viewer_components/updater/llupdateinstaller.cpp
index 6e69bcf28b..d450c068ad 100644
--- a/indra/viewer_components/updater/llupdateinstaller.cpp
+++ b/indra/viewer_components/updater/llupdateinstaller.cpp
@@ -31,6 +31,12 @@
#include "lldir.h"
+#if defined(LL_WINDOWS)
+#pragma warning(disable: 4702) // disable 'unreachable code' so we can use lexical_cast (really!).
+#endif
+#include <boost/lexical_cast.hpp>
+
+
namespace {
class RelocateError {};
@@ -47,7 +53,10 @@ namespace {
}
-int ll_install_update(std::string const & script, std::string const & updatePath, LLInstallScriptMode mode)
+int ll_install_update(std::string const & script,
+ std::string const & updatePath,
+ bool required,
+ LLInstallScriptMode mode)
{
std::string actualScriptPath;
switch(mode) {
@@ -73,6 +82,7 @@ int ll_install_update(std::string const & script, std::string const & updatePath
launcher.setExecutable(actualScriptPath);
launcher.addArgument(updatePath);
launcher.addArgument(ll_install_failed_marker_path().c_str());
+ launcher.addArgument(boost::lexical_cast<std::string>(required));
int result = launcher.launch();
launcher.orphan();
diff --git a/indra/viewer_components/updater/llupdateinstaller.h b/indra/viewer_components/updater/llupdateinstaller.h
index 6ce08ce6fa..fe5b1d19b5 100644
--- a/indra/viewer_components/updater/llupdateinstaller.h
+++ b/indra/viewer_components/updater/llupdateinstaller.h
@@ -42,9 +42,10 @@ enum LLInstallScriptMode {
// that the current application terminate once this function is called.
//
int ll_install_update(
- std::string const & script, // Script to execute.
- std::string const & updatePath, // Path to update file.
- LLInstallScriptMode mode=LL_COPY_INSTALL_SCRIPT_TO_TEMP); // Run in place or copy to temp?
+ std::string const & script, // Script to execute.
+ std::string const & updatePath, // Path to update file.
+ bool required, // Is the update required.
+ LLInstallScriptMode mode=LL_COPY_INSTALL_SCRIPT_TO_TEMP); // Run in place or copy to temp?
//
diff --git a/indra/viewer_components/updater/llupdaterservice.cpp b/indra/viewer_components/updater/llupdaterservice.cpp
index cc60eaead2..aa4983a3b6 100644
--- a/indra/viewer_components/updater/llupdaterservice.cpp
+++ b/indra/viewer_components/updater/llupdaterservice.cpp
@@ -25,10 +25,11 @@
#include "linden_common.h"
+#include "llupdaterservice.h"
+
#include "llupdatedownloader.h"
#include "llevents.h"
#include "lltimer.h"
-#include "llupdaterservice.h"
#include "llupdatechecker.h"
#include "llupdateinstaller.h"
#include "llversionviewer.h"
@@ -98,6 +99,8 @@ class LLUpdaterServiceImpl :
LLUpdaterService::app_exit_callback_t mAppExitCallback;
+ LLUpdaterService::eUpdaterState mState;
+
LOG_CLASS(LLUpdaterServiceImpl);
public:
@@ -111,12 +114,15 @@ public:
const std::string& version);
void setCheckPeriod(unsigned int seconds);
+ void setBandwidthLimit(U64 bytesPerSecond);
void startChecking(bool install_if_ready);
void stopChecking();
bool isChecking();
+ LLUpdaterService::eUpdaterState getState();
void setAppExitCallback(LLUpdaterService::app_exit_callback_t aecb) { mAppExitCallback = aecb;}
+ std::string updatedVersion(void);
bool checkForInstall(bool launchInstaller); // Test if a local install is ready.
bool checkForResume(); // Test for resumeable d/l.
@@ -138,7 +144,10 @@ public:
bool onMainLoop(LLSD const & event);
private:
+ std::string mNewVersion;
+
void restartTimer(unsigned int seconds);
+ void setState(LLUpdaterService::eUpdaterState state);
void stopTimer();
};
@@ -149,7 +158,8 @@ LLUpdaterServiceImpl::LLUpdaterServiceImpl() :
mIsDownloading(false),
mCheckPeriod(0),
mUpdateChecker(*this),
- mUpdateDownloader(*this)
+ mUpdateDownloader(*this),
+ mState(LLUpdaterService::INITIAL)
{
}
@@ -183,6 +193,11 @@ void LLUpdaterServiceImpl::setCheckPeriod(unsigned int seconds)
mCheckPeriod = seconds;
}
+void LLUpdaterServiceImpl::setBandwidthLimit(U64 bytesPerSecond)
+{
+ mUpdateDownloader.setBandwidthLimit(bytesPerSecond);
+}
+
void LLUpdaterServiceImpl::startChecking(bool install_if_ready)
{
if(mUrl.empty() || mChannel.empty() || mVersion.empty())
@@ -201,10 +216,16 @@ void LLUpdaterServiceImpl::startChecking(bool install_if_ready)
if(!mIsDownloading)
{
+ setState(LLUpdaterService::CHECKING_FOR_UPDATE);
+
// Checking can only occur during the mainloop.
// reset the timer to 0 so that the next mainloop event
// triggers a check;
restartTimer(0);
+ }
+ else
+ {
+ setState(LLUpdaterService::DOWNLOADING);
}
}
}
@@ -222,6 +243,8 @@ void LLUpdaterServiceImpl::stopChecking()
mUpdateDownloader.cancel();
mIsDownloading = false;
}
+
+ setState(LLUpdaterService::TERMINAL);
}
bool LLUpdaterServiceImpl::isChecking()
@@ -229,6 +252,16 @@ bool LLUpdaterServiceImpl::isChecking()
return mIsChecking;
}
+LLUpdaterService::eUpdaterState LLUpdaterServiceImpl::getState()
+{
+ return mState;
+}
+
+std::string LLUpdaterServiceImpl::updatedVersion(void)
+{
+ return mNewVersion;
+}
+
bool LLUpdaterServiceImpl::checkForInstall(bool launchInstaller)
{
bool foundInstall = false; // return true if install is found.
@@ -266,10 +299,13 @@ bool LLUpdaterServiceImpl::checkForInstall(bool launchInstaller)
{
if(launchInstaller)
{
+ setState(LLUpdaterService::INSTALLING);
+
LLFile::remove(update_marker_path());
int result = ll_install_update(install_script_path(),
update_info["path"].asString(),
+ update_info["required"].asBoolean(),
install_script_mode());
if((result == 0) && mAppExitCallback)
@@ -304,6 +340,7 @@ bool LLUpdaterServiceImpl::checkForResume()
if(download_info["current_version"].asString() == ll_get_version())
{
mIsDownloading = true;
+ mNewVersion = download_info["update_version"].asString();
mUpdateDownloader.resume();
result = true;
}
@@ -333,8 +370,11 @@ void LLUpdaterServiceImpl::optionalUpdate(std::string const & newVersion,
std::string const & hash)
{
stopTimer();
+ mNewVersion = newVersion;
mIsDownloading = true;
- mUpdateDownloader.download(uri, hash);
+ mUpdateDownloader.download(uri, hash, newVersion, false);
+
+ setState(LLUpdaterService::DOWNLOADING);
}
void LLUpdaterServiceImpl::requiredUpdate(std::string const & newVersion,
@@ -342,8 +382,11 @@ void LLUpdaterServiceImpl::requiredUpdate(std::string const & newVersion,
std::string const & hash)
{
stopTimer();
+ mNewVersion = newVersion;
mIsDownloading = true;
- mUpdateDownloader.download(uri, hash);
+ mUpdateDownloader.download(uri, hash, newVersion, true);
+
+ setState(LLUpdaterService::DOWNLOADING);
}
void LLUpdaterServiceImpl::upToDate(void)
@@ -352,6 +395,8 @@ void LLUpdaterServiceImpl::upToDate(void)
{
restartTimer(mCheckPeriod);
}
+
+ setState(LLUpdaterService::UP_TO_DATE);
}
void LLUpdaterServiceImpl::downloadComplete(LLSD const & data)
@@ -367,8 +412,12 @@ void LLUpdaterServiceImpl::downloadComplete(LLSD const & data)
event["pump"] = LLUpdaterService::pumpName();
LLSD payload;
payload["type"] = LLSD(LLUpdaterService::DOWNLOAD_COMPLETE);
+ payload["required"] = data["required"];
+ payload["version"] = mNewVersion;
event["payload"] = payload;
LLEventPumps::instance().obtain("mainlooprepeater").post(event);
+
+ setState(LLUpdaterService::TERMINAL);
}
void LLUpdaterServiceImpl::downloadError(std::string const & message)
@@ -390,6 +439,8 @@ void LLUpdaterServiceImpl::downloadError(std::string const & message)
payload["message"] = message;
event["payload"] = payload;
LLEventPumps::instance().obtain("mainlooprepeater").post(event);
+
+ setState(LLUpdaterService::FAILURE);
}
void LLUpdaterServiceImpl::restartTimer(unsigned int seconds)
@@ -402,6 +453,28 @@ void LLUpdaterServiceImpl::restartTimer(unsigned int seconds)
sListenerName, boost::bind(&LLUpdaterServiceImpl::onMainLoop, this, _1));
}
+void LLUpdaterServiceImpl::setState(LLUpdaterService::eUpdaterState state)
+{
+ if(state != mState)
+ {
+ mState = state;
+
+ LLSD event;
+ event["pump"] = LLUpdaterService::pumpName();
+ LLSD payload;
+ payload["type"] = LLSD(LLUpdaterService::STATE_CHANGE);
+ payload["state"] = state;
+ event["payload"] = payload;
+ LLEventPumps::instance().obtain("mainlooprepeater").post(event);
+
+ LL_INFOS("UpdaterService") << "setting state to " << state << LL_ENDL;
+ }
+ else
+ {
+ ; // State unchanged; noop.
+ }
+}
+
void LLUpdaterServiceImpl::stopTimer()
{
mTimer.stop();
@@ -417,6 +490,12 @@ bool LLUpdaterServiceImpl::onMainLoop(LLSD const & event)
// Check for failed install.
if(LLFile::isfile(ll_install_failed_marker_path()))
{
+ int requiredValue = 0;
+ {
+ llifstream stream(ll_install_failed_marker_path());
+ stream >> requiredValue;
+ if(stream.fail()) requiredValue = 0;
+ }
// TODO: notify the user.
llinfos << "found marker " << ll_install_failed_marker_path() << llendl;
llinfos << "last install attempt failed" << llendl;
@@ -424,11 +503,15 @@ bool LLUpdaterServiceImpl::onMainLoop(LLSD const & event)
LLSD event;
event["type"] = LLSD(LLUpdaterService::INSTALL_ERROR);
+ event["required"] = LLSD(requiredValue);
LLEventPumps::instance().obtain(LLUpdaterService::pumpName()).post(event);
+
+ setState(LLUpdaterService::TERMINAL);
}
else
{
mUpdateChecker.check(mProtocolVersion, mUrl, mPath, mChannel, mVersion);
+ setState(LLUpdaterService::CHECKING_FOR_UPDATE);
}
}
else
@@ -449,6 +532,11 @@ std::string const & LLUpdaterService::pumpName(void)
return name;
}
+bool LLUpdaterService::updateReadyToInstall(void)
+{
+ return LLFile::isfile(update_marker_path());
+}
+
LLUpdaterService::LLUpdaterService()
{
if(gUpdater.expired())
@@ -480,6 +568,11 @@ void LLUpdaterService::setCheckPeriod(unsigned int seconds)
{
mImpl->setCheckPeriod(seconds);
}
+
+void LLUpdaterService::setBandwidthLimit(U64 bytesPerSecond)
+{
+ mImpl->setBandwidthLimit(bytesPerSecond);
+}
void LLUpdaterService::startChecking(bool install_if_ready)
{
@@ -496,11 +589,21 @@ bool LLUpdaterService::isChecking()
return mImpl->isChecking();
}
+LLUpdaterService::eUpdaterState LLUpdaterService::getState()
+{
+ return mImpl->getState();
+}
+
void LLUpdaterService::setImplAppExitCallback(LLUpdaterService::app_exit_callback_t aecb)
{
return mImpl->setAppExitCallback(aecb);
}
+std::string LLUpdaterService::updatedVersion(void)
+{
+ return mImpl->updatedVersion();
+}
+
std::string const & ll_get_version(void) {
static std::string version("");
diff --git a/indra/viewer_components/updater/llupdaterservice.h b/indra/viewer_components/updater/llupdaterservice.h
index 752a6f834b..421481bc43 100644
--- a/indra/viewer_components/updater/llupdaterservice.h
+++ b/indra/viewer_components/updater/llupdaterservice.h
@@ -43,12 +43,27 @@ public:
// Name of the event pump through which update events will be delivered.
static std::string const & pumpName(void);
+ // Returns true if an update has been completely downloaded and is now ready to install.
+ static bool updateReadyToInstall(void);
+
// Type codes for events posted by this service. Stored the event's 'type' element.
- enum eUpdateEvent {
+ enum eUpdaterEvent {
INVALID,
DOWNLOAD_COMPLETE,
DOWNLOAD_ERROR,
- INSTALL_ERROR
+ INSTALL_ERROR,
+ PROGRESS,
+ STATE_CHANGE
+ };
+
+ enum eUpdaterState {
+ INITIAL,
+ CHECKING_FOR_UPDATE,
+ DOWNLOADING,
+ INSTALLING,
+ UP_TO_DATE,
+ TERMINAL,
+ FAILURE
};
LLUpdaterService();
@@ -61,10 +76,12 @@ public:
const std::string& version);
void setCheckPeriod(unsigned int seconds);
+ void setBandwidthLimit(U64 bytesPerSecond);
void startChecking(bool install_if_ready = false);
void stopChecking();
bool isChecking();
+ eUpdaterState getState();
typedef boost::function<void (void)> app_exit_callback_t;
template <typename F>
@@ -73,6 +90,11 @@ public:
app_exit_callback_t aecb = callable;
setImplAppExitCallback(aecb);
}
+
+ // If an update is or has been downloaded, this method will return the
+ // version string for that update. An empty string will be returned
+ // otherwise.
+ std::string updatedVersion(void);
private:
boost::shared_ptr<LLUpdaterServiceImpl> mImpl;
diff --git a/indra/viewer_components/updater/scripts/darwin/update_install b/indra/viewer_components/updater/scripts/darwin/update_install
index b174b3570a..6a95f96d86 100644
--- a/indra/viewer_components/updater/scripts/darwin/update_install
+++ b/indra/viewer_components/updater/scripts/darwin/update_install
@@ -5,5 +5,6 @@
# to a marker file which should be created if the installer fails.q
#
-open ../Resources/mac-updater.app --args -dmg "$1" -name "Second Life Viewer 2" -marker "$2"
+cd "$(dirname "$0")"
+(../Resources/mac-updater.app/Contents/MacOS/mac-updater -dmg "$1" -name "Second Life Viewer 2"; if [ $? -ne 0 ]; then echo $3 >> "$2"; fi;) &
exit 0
diff --git a/indra/viewer_components/updater/scripts/linux/update_install b/indra/viewer_components/updater/scripts/linux/update_install
index fef5ef7d09..88451340ec 100644
--- a/indra/viewer_components/updater/scripts/linux/update_install
+++ b/indra/viewer_components/updater/scripts/linux/update_install
@@ -1,10 +1,10 @@
#! /bin/bash
-INSTALL_DIR=$(cd "$(dirname $0)/.." ; pwd)
-export LD_LIBRARY_PATH=$INSTALL_DIR/lib
+INSTALL_DIR=$(cd "$(dirname "$0")/.." ; pwd)
+export LD_LIBRARY_PATH="$INSTALL_DIR/lib"
bin/linux-updater.bin --file "$1" --dest "$INSTALL_DIR" --name "Second Life Viewer 2" --stringsdir "$INSTALL_DIR/skins/default/xui/en" --stringsfile "strings.xml"
if [ $? -ne 0 ]
- then touch $2
+ then echo $3 >> "$2"
fi
-rm -f $1
+rm -f "$1"
diff --git a/indra/viewer_components/updater/scripts/windows/update_install.bat b/indra/viewer_components/updater/scripts/windows/update_install.bat
index 42e148a707..96687226a8 100644
--- a/indra/viewer_components/updater/scripts/windows/update_install.bat
+++ b/indra/viewer_components/updater/scripts/windows/update_install.bat
@@ -1,3 +1,3 @@
start /WAIT %1 /SKIP_DIALOGS
-IF ERRORLEVEL 1 ECHO %ERRORLEVEL% > %2
+IF ERRORLEVEL 1 ECHO %3 > %2
DEL %1
diff --git a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp
index 04ed4e6364..5f8cd28f29 100644
--- a/indra/viewer_components/updater/tests/llupdaterservice_test.cpp
+++ b/indra/viewer_components/updater/tests/llupdaterservice_test.cpp
@@ -48,7 +48,7 @@ void LLUpdateChecker::check(std::string const & protocolVersion, std::string con
std::string const & servicePath, std::string channel, std::string version)
{}
LLUpdateDownloader::LLUpdateDownloader(Client & ) {}
-void LLUpdateDownloader::download(LLURI const & , std::string const &){}
+void LLUpdateDownloader::download(LLURI const & , std::string const &, std::string const &, bool){}
class LLDir_Mock : public LLDir
{
@@ -101,8 +101,9 @@ std::string LLUpdateDownloader::downloadMarkerPath(void)
void LLUpdateDownloader::resume(void) {}
void LLUpdateDownloader::cancel(void) {}
+void LLUpdateDownloader::setBandwidthLimit(U64 bytesPerSecond) {}
-int ll_install_update(std::string const &, std::string const &, LLInstallScriptMode)
+int ll_install_update(std::string const &, std::string const &, bool, LLInstallScriptMode)
{
return 0;
}