summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.hgtags8
-rw-r--r--autobuild.xml8
-rw-r--r--doc/contributions.txt7
-rw-r--r--indra/cmake/00-Common.cmake4
-rw-r--r--indra/llcommon/llmemory.cpp1
-rw-r--r--indra/llcommon/llpreprocessor.h1
-rw-r--r--indra/llcommon/llsd.cpp212
-rw-r--r--indra/llcommon/llsd.h130
-rw-r--r--indra/llcommon/llthread.h7
-rw-r--r--indra/llcommon/llversionviewer.h2
-rw-r--r--indra/llimage/llimage.cpp2
-rw-r--r--indra/llmessage/llcurl.cpp433
-rw-r--r--indra/llmessage/llcurl.h116
-rw-r--r--indra/llmessage/llsdmessagereader.cpp3
-rw-r--r--indra/llmessage/llurlrequest.cpp6
-rw-r--r--indra/llplugin/llpluginclassmedia.h2
-rw-r--r--indra/llplugin/llplugininstance.h2
-rw-r--r--indra/llplugin/llpluginmessagepipe.cpp51
-rw-r--r--indra/llplugin/llpluginmessagepipe.h3
-rw-r--r--indra/llplugin/llpluginprocessparent.h2
-rw-r--r--indra/llprimitive/llmodel.cpp9
-rw-r--r--indra/llprimitive/lltextureanim.cpp4
-rw-r--r--indra/llprimitive/llvolumexml.cpp19
-rw-r--r--indra/llprimitive/llvolumexml.h6
-rw-r--r--indra/llrender/llfontfreetype.cpp7
-rw-r--r--indra/llrender/llrender.cpp5
-rw-r--r--indra/llrender/llrender.h1
-rw-r--r--indra/llrender/llshadermgr.cpp54
-rw-r--r--indra/llrender/llvertexbuffer.cpp2
-rw-r--r--indra/llui/llbutton.cpp3
-rw-r--r--indra/llui/llfloater.cpp107
-rw-r--r--indra/llui/llfloater.h15
-rw-r--r--indra/llui/llhandle.h67
-rw-r--r--indra/llui/llmenugl.h2
-rw-r--r--indra/llui/llpanel.cpp2
-rw-r--r--indra/llui/llpanel.h3
-rw-r--r--indra/llui/llscrolllistctrl.cpp8
-rw-r--r--indra/llui/llscrolllistctrl.h2
-rw-r--r--indra/llui/lltabcontainer.cpp185
-rw-r--r--indra/llui/lltabcontainer.h6
-rw-r--r--indra/llui/lltextparser.cpp2
-rw-r--r--indra/llui/lltoolbar.cpp6
-rw-r--r--indra/llui/llui.cpp7
-rw-r--r--indra/llui/lluictrl.cpp11
-rw-r--r--indra/llui/lluictrl.h3
-rw-r--r--indra/llui/llview.h9
-rw-r--r--indra/llui/tests/llurlentry_stub.cpp3
-rw-r--r--indra/llui/tests/llurlmatch_test.cpp5
-rw-r--r--indra/llwindow/llwindow.cpp33
-rw-r--r--indra/llwindow/llwindow.h11
-rw-r--r--indra/llwindow/llwindowheadless.h4
-rw-r--r--indra/llwindow/llwindowmacosx.cpp230
-rw-r--r--indra/llwindow/llwindowmacosx.h4
-rw-r--r--indra/llwindow/llwindowmesaheadless.h4
-rw-r--r--indra/llwindow/llwindowsdl.cpp44
-rw-r--r--indra/llwindow/llwindowsdl.h5
-rw-r--r--indra/llwindow/llwindowwin32.cpp20
-rw-r--r--indra/llwindow/llwindowwin32.h4
-rw-r--r--indra/llxml/llxmlnode.cpp10
-rw-r--r--indra/llxuixml/llinitparam.cpp21
-rw-r--r--indra/llxuixml/llinitparam.h556
-rw-r--r--indra/llxuixml/llxuiparser.cpp257
-rw-r--r--indra/media_plugins/webkit/media_plugin_webkit.cpp4
-rw-r--r--indra/newview/CMakeLists.txt6
-rw-r--r--indra/newview/app_settings/settings.xml114
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl13
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskV.glsl5
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl13
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl13
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl11
-rw-r--r--indra/newview/app_settings/toolbars.xml3
-rw-r--r--indra/newview/character/avatar_lad.xml4
-rw-r--r--indra/newview/featuretable_mac.txt6
-rwxr-xr-xindra/newview/llagent.cpp12
-rw-r--r--indra/newview/llagent.h3
-rw-r--r--indra/newview/llappviewer.cpp29
-rwxr-xr-xindra/newview/llavataractions.cpp22
-rw-r--r--indra/newview/llchiclet.cpp6
-rw-r--r--indra/newview/llchicletbar.cpp34
-rw-r--r--indra/newview/llchicletbar.h6
-rw-r--r--indra/newview/lldebugview.cpp37
-rw-r--r--indra/newview/lldebugview.h4
-rw-r--r--indra/newview/lldrawpool.h1
-rw-r--r--indra/newview/lldrawpooltree.cpp154
-rw-r--r--indra/newview/lldrawpooltree.h3
-rw-r--r--indra/newview/llfasttimerview.cpp2
-rw-r--r--indra/newview/llfloatercamera.cpp23
-rw-r--r--indra/newview/llfloatercamera.h3
-rw-r--r--indra/newview/llfloaterchat.cpp485
-rw-r--r--indra/newview/llfloaterchat.h78
-rw-r--r--indra/newview/llfloaterchatterbox.cpp344
-rw-r--r--indra/newview/llfloaterchatterbox.h80
-rw-r--r--indra/newview/llfloaterfriends.cpp807
-rw-r--r--indra/newview/llfloaterfriends.h140
-rw-r--r--indra/newview/llfloaterinspect.cpp39
-rw-r--r--indra/newview/llfloaterinspect.h4
-rw-r--r--indra/newview/llfloaterland.cpp14
-rw-r--r--indra/newview/llfloaterland.h1
-rwxr-xr-xindra/newview/llfloatermodelpreview.cpp46
-rw-r--r--indra/newview/llfloatersnapshot.cpp461
-rw-r--r--indra/newview/llfloaterwebcontent.cpp115
-rw-r--r--indra/newview/llfloaterwebcontent.h8
-rw-r--r--indra/newview/llfloaterwebprofile.cpp79
-rw-r--r--indra/newview/llfloaterwebprofile.h (renamed from indra/newview/llmenucommands.h)44
-rw-r--r--indra/newview/llfloaterwindowsize.cpp35
-rw-r--r--indra/newview/llfloaterwindowsize.h22
-rw-r--r--indra/newview/llfolderviewitem.cpp4
-rw-r--r--indra/newview/llinventoryfilter.cpp25
-rw-r--r--indra/newview/llinventoryfilter.h4
-rw-r--r--indra/newview/llinventorymodel.h2
-rw-r--r--indra/newview/llinventorypanel.cpp11
-rw-r--r--indra/newview/llmenucommands.cpp94
-rw-r--r--indra/newview/llnavigationbar.cpp2
-rw-r--r--indra/newview/llnearbychatbar.cpp17
-rw-r--r--indra/newview/llnearbychatbar.h7
-rw-r--r--indra/newview/llnearbychathandler.cpp54
-rw-r--r--indra/newview/llnotificationtiphandler.cpp2
-rw-r--r--indra/newview/lloverlaybar.cpp378
-rw-r--r--indra/newview/lloverlaybar.h95
-rw-r--r--indra/newview/llpanelavatar.cpp709
-rw-r--r--indra/newview/llpanelavatar.h191
-rw-r--r--indra/newview/llpanelme.cpp285
-rw-r--r--indra/newview/llpanelme.h64
-rw-r--r--indra/newview/llpanelnearbymedia.cpp42
-rw-r--r--indra/newview/llpanelnearbymedia.h1
-rwxr-xr-xindra/newview/llpanelpicks.cpp24
-rwxr-xr-xindra/newview/llpanelprofile.cpp19
-rwxr-xr-xindra/newview/llpanelprofile.h1
-rw-r--r--indra/newview/llpanelprofileview.cpp247
-rw-r--r--indra/newview/llpanelprofileview.h108
-rw-r--r--indra/newview/llpaneltopinfobar.cpp18
-rw-r--r--indra/newview/llpaneltopinfobar.h6
-rw-r--r--indra/newview/llparticipantlist.cpp9
-rw-r--r--indra/newview/llparticipantlist.h2
-rw-r--r--indra/newview/llscreenchannel.cpp42
-rw-r--r--indra/newview/llscreenchannel.h7
-rw-r--r--indra/newview/llscriptfloater.cpp11
-rw-r--r--indra/newview/llsidepaneltaskinfo.cpp159
-rw-r--r--indra/newview/llsidepaneltaskinfo.h40
-rw-r--r--indra/newview/llstatusbar.cpp5
-rw-r--r--indra/newview/llstatusbar.h3
-rw-r--r--indra/newview/llsyswellwindow.cpp13
-rw-r--r--indra/newview/llsyswellwindow.h1
-rw-r--r--indra/newview/lltoast.cpp137
-rw-r--r--indra/newview/lltoast.h20
-rw-r--r--indra/newview/lltoolbarview.cpp13
-rw-r--r--indra/newview/lltoolbarview.h1
-rw-r--r--indra/newview/llurldispatcher.cpp4
-rw-r--r--indra/newview/llvieweraudio.cpp238
-rw-r--r--indra/newview/llvieweraudio.h47
-rw-r--r--indra/newview/llviewercontrol.cpp1
-rw-r--r--indra/newview/llviewerdisplay.cpp4
-rw-r--r--indra/newview/llviewerfloaterreg.cpp6
-rw-r--r--indra/newview/llviewerfoldertype.cpp71
-rw-r--r--indra/newview/llviewerfoldertype.h1
-rw-r--r--indra/newview/llviewermedia.cpp25
-rw-r--r--indra/newview/llviewermenu.cpp30
-rwxr-xr-xindra/newview/llviewermessage.cpp3
-rw-r--r--indra/newview/llviewerparcelmgr.cpp166
-rw-r--r--indra/newview/llviewerprecompiledheaders.h3
-rw-r--r--indra/newview/llviewershadermgr.cpp1
-rw-r--r--indra/newview/llviewertexture.cpp34
-rw-r--r--indra/newview/llviewerwindow.cpp78
-rw-r--r--indra/newview/llviewerwindow.h19
-rw-r--r--indra/newview/llvoavatar.cpp8
-rw-r--r--indra/newview/llvoavatar.h3
-rw-r--r--indra/newview/llvoicevivox.cpp2
-rw-r--r--indra/newview/llvotree.cpp96
-rw-r--r--indra/newview/llvotree.h1
-rw-r--r--indra/newview/llvovolume.cpp26
-rw-r--r--indra/newview/llvovolume.h3
-rw-r--r--indra/newview/llworld.cpp9
-rw-r--r--indra/newview/llxmlrpctransaction.cpp16
-rw-r--r--indra/newview/pipeline.cpp127
-rw-r--r--indra/newview/pipeline.h4
-rw-r--r--indra/newview/skins/default/xui/da/floater_camera.xml9
-rw-r--r--indra/newview/skins/default/xui/da/notifications.xml10
-rw-r--r--indra/newview/skins/default/xui/da/panel_my_profile.xml31
-rw-r--r--indra/newview/skins/default/xui/da/panel_notes.xml35
-rw-r--r--indra/newview/skins/default/xui/da/panel_profile.xml59
-rw-r--r--indra/newview/skins/default/xui/da/panel_profile_view.xml20
-rw-r--r--indra/newview/skins/default/xui/da/strings.xml3
-rw-r--r--indra/newview/skins/default/xui/de/floater_camera.xml9
-rw-r--r--indra/newview/skins/default/xui/de/notifications.xml10
-rw-r--r--indra/newview/skins/default/xui/de/panel_my_profile.xml42
-rw-r--r--indra/newview/skins/default/xui/de/panel_notes.xml35
-rw-r--r--indra/newview/skins/default/xui/de/panel_profile.xml74
-rw-r--r--indra/newview/skins/default/xui/de/panel_profile_view.xml20
-rw-r--r--indra/newview/skins/default/xui/en/floater_about_land.xml113
-rw-r--r--indra/newview/skins/default/xui/en/floater_activeim.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_avatar.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_build_options.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_camera.xml17
-rw-r--r--indra/newview/skins/default/xui/en/floater_chat_bar.xml10
-rw-r--r--indra/newview/skins/default/xui/en/floater_color_picker.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_event.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_gesture.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_im_session.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_live_lsleditor.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_lsl_guide.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_map.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_mem_leaking.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_moveview.xml5
-rw-r--r--indra/newview/skins/default/xui/en/floater_my_appearance.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_my_web_profile.xml9
-rw-r--r--indra/newview/skins/default/xui/en/floater_people.xml4
-rw-r--r--indra/newview/skins/default/xui/en/floater_places.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_preview_notecard.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_preview_texture.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_script.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_script_debug_panel.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_snapshot.xml5
-rw-r--r--indra/newview/skins/default/xui/en/floater_stats.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_sys_well.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_tools.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_voice_effect.xml1
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml333
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml14
-rw-r--r--indra/newview/skins/default/xui/en/panel_my_profile.xml146
-rw-r--r--indra/newview/skins/default/xui/en/panel_notes.xml236
-rw-r--r--indra/newview/skins/default/xui/en/panel_postcard_settings.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_setup.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_profile.xml458
-rw-r--r--indra/newview/skins/default/xui/en/panel_profile_view.xml162
-rw-r--r--indra/newview/skins/default/xui/en/panel_region_covenant.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_toast.xml1
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml4
-rw-r--r--indra/newview/skins/default/xui/es/floater_camera.xml9
-rw-r--r--indra/newview/skins/default/xui/es/notifications.xml10
-rw-r--r--indra/newview/skins/default/xui/es/panel_my_profile.xml31
-rw-r--r--indra/newview/skins/default/xui/es/panel_navigation_bar.xml2
-rw-r--r--indra/newview/skins/default/xui/es/panel_notes.xml35
-rw-r--r--indra/newview/skins/default/xui/es/panel_profile.xml70
-rw-r--r--indra/newview/skins/default/xui/es/panel_profile_view.xml20
-rw-r--r--indra/newview/skins/default/xui/es/strings.xml3
-rw-r--r--indra/newview/skins/default/xui/fr/floater_camera.xml9
-rw-r--r--indra/newview/skins/default/xui/fr/floater_object_weights.xml14
-rw-r--r--indra/newview/skins/default/xui/fr/floater_preview_animation.xml4
-rw-r--r--indra/newview/skins/default/xui/fr/floater_stats.xml16
-rw-r--r--indra/newview/skins/default/xui/fr/floater_tools.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/floater_toybox.xml8
-rw-r--r--indra/newview/skins/default/xui/fr/menu_group_plus.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/menu_inventory.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/menu_people_nearby_view_sort.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/menu_toolbars.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/menu_viewer.xml6
-rw-r--r--indra/newview/skins/default/xui/fr/notifications.xml14
-rw-r--r--indra/newview/skins/default/xui/fr/panel_my_profile.xml42
-rw-r--r--indra/newview/skins/default/xui/fr/panel_notes.xml35
-rw-r--r--indra/newview/skins/default/xui/fr/panel_preferences_move.xml10
-rw-r--r--indra/newview/skins/default/xui/fr/panel_preferences_privacy.xml2
-rw-r--r--indra/newview/skins/default/xui/fr/panel_prim_media_controls.xml8
-rw-r--r--indra/newview/skins/default/xui/fr/panel_profile.xml74
-rw-r--r--indra/newview/skins/default/xui/fr/panel_profile_view.xml20
-rw-r--r--indra/newview/skins/default/xui/fr/panel_status_bar.xml8
-rw-r--r--indra/newview/skins/default/xui/it/floater_camera.xml9
-rw-r--r--indra/newview/skins/default/xui/it/notifications.xml10
-rw-r--r--indra/newview/skins/default/xui/it/panel_my_profile.xml31
-rw-r--r--indra/newview/skins/default/xui/it/panel_notes.xml35
-rw-r--r--indra/newview/skins/default/xui/it/panel_profile.xml70
-rw-r--r--indra/newview/skins/default/xui/it/panel_profile_view.xml22
-rw-r--r--indra/newview/skins/default/xui/it/strings.xml3
-rw-r--r--indra/newview/skins/default/xui/ja/floater_camera.xml9
-rw-r--r--indra/newview/skins/default/xui/ja/notifications.xml10
-rw-r--r--indra/newview/skins/default/xui/ja/panel_my_profile.xml42
-rw-r--r--indra/newview/skins/default/xui/ja/panel_notes.xml35
-rw-r--r--indra/newview/skins/default/xui/ja/panel_profile.xml74
-rw-r--r--indra/newview/skins/default/xui/ja/panel_profile_view.xml22
-rw-r--r--indra/newview/skins/default/xui/pl/floater_camera.xml9
-rw-r--r--indra/newview/skins/default/xui/pl/notifications.xml10
-rw-r--r--indra/newview/skins/default/xui/pl/panel_my_profile.xml31
-rw-r--r--indra/newview/skins/default/xui/pl/panel_notes.xml35
-rw-r--r--indra/newview/skins/default/xui/pl/panel_profile.xml59
-rw-r--r--indra/newview/skins/default/xui/pl/panel_profile_view.xml20
-rw-r--r--indra/newview/skins/default/xui/pl/strings.xml3
-rw-r--r--indra/newview/skins/default/xui/pt/floater_camera.xml9
-rw-r--r--indra/newview/skins/default/xui/pt/notifications.xml10
-rw-r--r--indra/newview/skins/default/xui/pt/panel_my_profile.xml31
-rw-r--r--indra/newview/skins/default/xui/pt/panel_notes.xml35
-rw-r--r--indra/newview/skins/default/xui/pt/panel_profile.xml70
-rw-r--r--indra/newview/skins/default/xui/pt/panel_profile_view.xml20
-rw-r--r--indra/newview/skins/default/xui/pt/strings.xml3
-rw-r--r--indra/newview/skins/default/xui/ru/floater_camera.xml9
-rw-r--r--indra/newview/skins/default/xui/ru/notifications.xml10
-rw-r--r--indra/newview/skins/default/xui/ru/panel_my_profile.xml42
-rw-r--r--indra/newview/skins/default/xui/ru/panel_notes.xml35
-rw-r--r--indra/newview/skins/default/xui/ru/panel_profile.xml67
-rw-r--r--indra/newview/skins/default/xui/ru/panel_profile_view.xml20
-rw-r--r--indra/newview/skins/default/xui/tr/floater_camera.xml9
-rw-r--r--indra/newview/skins/default/xui/tr/notifications.xml10
-rw-r--r--indra/newview/skins/default/xui/tr/panel_my_profile.xml42
-rw-r--r--indra/newview/skins/default/xui/tr/panel_notes.xml35
-rw-r--r--indra/newview/skins/default/xui/tr/panel_profile.xml67
-rw-r--r--indra/newview/skins/default/xui/tr/panel_profile_view.xml20
-rw-r--r--indra/newview/skins/default/xui/zh/floater_camera.xml9
-rw-r--r--indra/newview/skins/default/xui/zh/notifications.xml10
-rw-r--r--indra/newview/skins/default/xui/zh/panel_my_profile.xml42
-rw-r--r--indra/newview/skins/default/xui/zh/panel_notes.xml35
-rw-r--r--indra/newview/skins/default/xui/zh/panel_profile.xml67
-rw-r--r--indra/newview/skins/default/xui/zh/panel_profile_view.xml20
-rw-r--r--indra/test/llsd_new_tut.cpp45
-rw-r--r--indra/test/lltut.cpp5
304 files changed, 4072 insertions, 9606 deletions
diff --git a/.hgtags b/.hgtags
index cf3c06b3f9..787998203d 100644
--- a/.hgtags
+++ b/.hgtags
@@ -232,9 +232,17 @@ a9abb9633a266c8d2fe62411cfd1c86d32da72bf DRTVWR-60_2.7.1-release
fe3a8e7973072ea62043c08b19b66626c1a720eb DRTVWR-60_2.7.1-release
a9abb9633a266c8d2fe62411cfd1c86d32da72bf 2.7.1-release
fe3a8e7973072ea62043c08b19b66626c1a720eb 2.7.1-release
+3fe994349fae64fc40874bb59db387131eb35a41 3.2.4-start
3fe994349fae64fc40874bb59db387131eb35a41 DRTVWR-104_3.2.4-beta1
3fe994349fae64fc40874bb59db387131eb35a41 3.2.4-beta1
fe3a8e7973072ea62043c08b19b66626c1a720eb DRTVWR-62_2.7.2-release
fe3a8e7973072ea62043c08b19b66626c1a720eb 2.7.2-release
bd6bcde2584491fd9228f1fa51c4575f4e764e19 DRTVWR-103_3.2.4-release
bd6bcde2584491fd9228f1fa51c4575f4e764e19 3.2.4-release
+8a44ff3d2104269ce76145c2772cf1bdff2a2abe 3.2.5-start
+3d2d5d244c6398a4214c666d5dd3965b0918709a DRTVWR-106_3.2.5-beta1
+3d2d5d244c6398a4214c666d5dd3965b0918709a 3.2.5-beta1
+65a2c1c8d855b88edfbea4e16ef2f27e7cff8b1d DRTVWR-107_3.2.5-beta2
+65a2c1c8d855b88edfbea4e16ef2f27e7cff8b1d 3.2.5-beta2
+c6175c955a19e9b9353d242889ec1779b5762522 DRTVWR-105_3.2.5-release
+c6175c955a19e9b9353d242889ec1779b5762522 3.2.5-release
diff --git a/autobuild.xml b/autobuild.xml
index 49031b9f17..9914be6867 100644
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -1206,9 +1206,9 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>7108c2443dbcf4c032305814ce65ebb7</string>
+ <string>26aa7c367ffadd573f61a6a96f820f80</string>
<key>url</key>
- <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llqtwebkit/rev/244065/arch/Darwin/installer/llqtwebkit-4.7.1-darwin-20111028.tar.bz2</string>
+ <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llqtwebkit/rev/245988/arch/Darwin/installer/llqtwebkit-4.7.1-darwin-20111201.tar.bz2</string>
</map>
<key>name</key>
<string>darwin</string>
@@ -1230,9 +1230,9 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>24048a31d7b852774dc3117acbd4a86a</string>
+ <string>270db8568a0c4bab266d98e1a820aec4</string>
<key>url</key>
- <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llqtwebkit/rev/244065/arch/CYGWIN/installer/llqtwebkit-4.7.1-windows-20111028.tar.bz2</string>
+ <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llqtwebkit/rev/245988/arch/CYGWIN/installer/llqtwebkit-4.7.1-windows-20111201.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
diff --git a/doc/contributions.txt b/doc/contributions.txt
index 9f6de781b4..274632a804 100644
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -171,6 +171,7 @@ Ansariel Hiller
VWR-25480
VWR-26150
STORM-1685
+ STORM-1713
Aralara Rajal
Ardy Lay
STORM-859
@@ -583,12 +584,17 @@ Jonathan Yap
STORM-1639
STORM-910
STORM-1642
+ STORM-591
STORM-1105
STORM-1679
STORM-1222
STORM-1659
STORM-1674
STORM-1685
+ STORM-1721
+ STORM-1719
+ STORM-1712
+ STORM-1728
Kadah Coba
STORM-1060
Jondan Lundquist
@@ -923,6 +929,7 @@ Robin Cornelius
SNOW-599
SNOW-747
STORM-422
+ STORM-591
STORM-960
STORM-1019
STORM-1095
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index 0266239454..98eeed09b3 100644
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -46,7 +46,7 @@ if (WINDOWS)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Od /Zi /MDd /MP -D_SCL_SECURE_NO_WARNINGS=1"
CACHE STRING "C++ compiler debug options" FORCE)
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
- "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Od /Zi /MD /MP /Ob2 -D_SECURE_STL=0"
+ "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Od /Zi /MD /MP /Ob0 -D_SECURE_STL=0"
CACHE STRING "C++ compiler release-with-debug options" FORCE)
set(CMAKE_CXX_FLAGS_RELEASE
"${CMAKE_CXX_FLAGS_RELEASE} ${LL_CXX_FLAGS} /O2 /Zi /MD /MP /Ob2 -D_SECURE_STL=0 -D_HAS_ITERATOR_DEBUGGING=0"
@@ -62,7 +62,7 @@ if (WINDOWS)
/D_UNICODE
/GS
/TP
- /W2
+ /W3
/c
/Zc:forScope
/nologo
diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp
index bb7998c0a8..3b9758f996 100644
--- a/indra/llcommon/llmemory.cpp
+++ b/indra/llcommon/llmemory.cpp
@@ -159,6 +159,7 @@ void LLMemory::logMemoryInfo(BOOL update)
if(update)
{
updateMemoryInfo() ;
+ LLPrivateMemoryPoolManager::getInstance()->updateStatistics() ;
}
llinfos << "Current allocated physical memory(KB): " << sAllocatedMemInKB << llendl ;
diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h
index 17a4287538..31d5f3d2c7 100644
--- a/indra/llcommon/llpreprocessor.h
+++ b/indra/llcommon/llpreprocessor.h
@@ -151,6 +151,7 @@
#pragma warning (disable : 4251) // member needs to have dll-interface to be used by clients of class
#pragma warning (disable : 4275) // non dll-interface class used as base for dll-interface class
+#pragma warning (disable : 4018) // '<' : signed/unsigned mismatch
#endif // LL_MSVC
#if LL_WINDOWS
diff --git a/indra/llcommon/llsd.cpp b/indra/llcommon/llsd.cpp
index 6ca0737445..e295e3c621 100644
--- a/indra/llcommon/llsd.cpp
+++ b/indra/llcommon/llsd.cpp
@@ -24,6 +24,9 @@
* $/LicenseInfo$
*/
+// Must turn on conditional declarations in header file so definitions end up
+// with proper linkage.
+#define LLSD_DEBUG_INFO
#include "linden_common.h"
#include "llsd.h"
@@ -31,6 +34,7 @@
#include "../llmath/llmath.h"
#include "llformat.h"
#include "llsdserialize.h"
+#include "stringize.h"
#ifndef LL_RELEASE_FOR_DOWNLOAD
#define NAME_UNNAMED_NAMESPACE
@@ -50,6 +54,18 @@ namespace
using namespace LLSDUnnamedNamespace;
#endif
+namespace llsd
+{
+
+// statics
+S32 sLLSDAllocationCount = 0;
+S32 sLLSDNetObjects = 0;
+
+} // namespace llsd
+
+#define ALLOC_LLSD_OBJECT { llsd::sLLSDNetObjects++; llsd::sLLSDAllocationCount++; }
+#define FREE_LLSD_OBJECT { llsd::sLLSDNetObjects--; }
+
class LLSD::Impl
/**< This class is the abstract base class of the implementation of LLSD
It provides the reference counting implementation, and the default
@@ -58,13 +74,10 @@ class LLSD::Impl
*/
{
-private:
- U32 mUseCount;
-
protected:
Impl();
- enum StaticAllocationMarker { STATIC };
+ enum StaticAllocationMarker { STATIC_USAGE_COUNT = 0xFFFFFFFF };
Impl(StaticAllocationMarker);
///< This constructor is used for static objects and causes the
// suppresses adjusting the debugging counters when they are
@@ -72,8 +85,10 @@ protected:
virtual ~Impl();
- bool shared() const { return mUseCount > 1; }
+ bool shared() const { return (mUseCount > 1) && (mUseCount != STATIC_USAGE_COUNT); }
+ U32 mUseCount;
+
public:
static void reset(Impl*& var, Impl* impl);
///< safely set var to refer to the new impl (possibly shared)
@@ -128,6 +143,18 @@ public:
virtual LLSD::array_const_iterator beginArray() const { return endArray(); }
virtual LLSD::array_const_iterator endArray() const { static const std::vector<LLSD> empty; return empty.end(); }
+ virtual void dumpStats() const;
+ virtual void calcStats(S32 type_counts[], S32 share_counts[]) const;
+ // Container subclasses contain LLSD objects, rather than directly
+ // containing Impl objects. This helper forwards through LLSD.
+ void calcStats(const LLSD& llsd, S32 type_counts[], S32 share_counts[]) const
+ {
+ safe(llsd.impl).calcStats(type_counts, share_counts);
+ }
+
+ static const Impl& getImpl(const LLSD& llsd) { return safe(llsd.impl); }
+ static Impl& getImpl(LLSD& llsd) { return safe(llsd.impl); }
+
static const LLSD& undef();
static U32 sAllocationCount;
@@ -360,6 +387,9 @@ namespace
LLSD::map_iterator endMap() { return mData.end(); }
virtual LLSD::map_const_iterator beginMap() const { return mData.begin(); }
virtual LLSD::map_const_iterator endMap() const { return mData.end(); }
+
+ virtual void dumpStats() const;
+ virtual void calcStats(S32 type_counts[], S32 share_counts[]) const;
};
ImplMap& ImplMap::makeMap(LLSD::Impl*& var)
@@ -414,6 +444,34 @@ namespace
return i->second;
}
+ void ImplMap::dumpStats() const
+ {
+ std::cout << "Map size: " << mData.size() << std::endl;
+
+ std::cout << "LLSD Net Objects: " << llsd::sLLSDNetObjects << std::endl;
+ std::cout << "LLSD allocations: " << llsd::sLLSDAllocationCount << std::endl;
+
+ std::cout << "LLSD::Impl Net Objects: " << sOutstandingCount << std::endl;
+ std::cout << "LLSD::Impl allocations: " << sAllocationCount << std::endl;
+
+ Impl::dumpStats();
+ }
+
+ void ImplMap::calcStats(S32 type_counts[], S32 share_counts[]) const
+ {
+ LLSD::map_const_iterator iter = beginMap();
+ while (iter != endMap())
+ {
+ //std::cout << " " << (*iter).first << ": " << (*iter).second << std::endl;
+ Impl::calcStats((*iter).second, type_counts, share_counts);
+ iter++;
+ }
+
+ // Add in the values for this map
+ Impl::calcStats(type_counts, share_counts);
+ }
+
+
class ImplArray : public LLSD::Impl
{
private:
@@ -449,6 +507,8 @@ namespace
LLSD::array_iterator endArray() { return mData.end(); }
virtual LLSD::array_const_iterator beginArray() const { return mData.begin(); }
virtual LLSD::array_const_iterator endArray() const { return mData.end(); }
+
+ virtual void calcStats(S32 type_counts[], S32 share_counts[]) const;
};
ImplArray& ImplArray::makeArray(Impl*& var)
@@ -490,12 +550,13 @@ namespace
void ImplArray::insert(LLSD::Integer i, const LLSD& v)
{
- if (i < 0) {
+ if (i < 0)
+ {
return;
}
DataVector::size_type index = i;
- if (index >= mData.size())
+ if (index >= mData.size()) // tbd - sanity check limit for index ?
{
mData.resize(index + 1);
}
@@ -543,6 +604,19 @@ namespace
return mData[index];
}
+
+ void ImplArray::calcStats(S32 type_counts[], S32 share_counts[]) const
+ {
+ LLSD::array_const_iterator iter = beginArray();
+ while (iter != endArray())
+ { // Add values for all items held in the array
+ Impl::calcStats((*iter), type_counts, share_counts);
+ iter++;
+ }
+
+ // Add in the values for this array
+ Impl::calcStats(type_counts, share_counts);
+ }
}
LLSD::Impl::Impl()
@@ -564,8 +638,11 @@ LLSD::Impl::~Impl()
void LLSD::Impl::reset(Impl*& var, Impl* impl)
{
- if (impl) ++impl->mUseCount;
- if (var && --var->mUseCount == 0)
+ if (impl && impl->mUseCount != STATIC_USAGE_COUNT)
+ {
+ ++impl->mUseCount;
+ }
+ if (var && var->mUseCount != STATIC_USAGE_COUNT && --var->mUseCount == 0)
{
delete var;
}
@@ -574,13 +651,13 @@ void LLSD::Impl::reset(Impl*& var, Impl* impl)
LLSD::Impl& LLSD::Impl::safe(Impl* impl)
{
- static Impl theUndefined(STATIC);
+ static Impl theUndefined(STATIC_USAGE_COUNT);
return impl ? *impl : theUndefined;
}
const LLSD::Impl& LLSD::Impl::safe(const Impl* impl)
{
- static Impl theUndefined(STATIC);
+ static Impl theUndefined(STATIC_USAGE_COUNT);
return impl ? *impl : theUndefined;
}
@@ -656,6 +733,43 @@ const LLSD& LLSD::Impl::undef()
return immutableUndefined;
}
+void LLSD::Impl::dumpStats() const
+{
+ S32 type_counts[LLSD::TypeLLSDNumTypes + 1];
+ memset(&type_counts, 0, sizeof(type_counts));
+
+ S32 share_counts[LLSD::TypeLLSDNumTypes + 1];
+ memset(&share_counts, 0, sizeof(share_counts));
+
+ // Add info from all the values this object has
+ calcStats(type_counts, share_counts);
+
+ S32 type_index = LLSD::TypeLLSDTypeBegin;
+ while (type_index != LLSD::TypeLLSDTypeEnd)
+ {
+ std::cout << LLSD::typeString((LLSD::Type)type_index) << " type "
+ << type_counts[type_index] << " objects, "
+ << share_counts[type_index] << " shared"
+ << std::endl;
+ type_index++;
+ }
+}
+
+
+void LLSD::Impl::calcStats(S32 type_counts[], S32 share_counts[]) const
+{
+ S32 tp = S32(type());
+ if (0 <= tp && tp < LLSD::TypeLLSDNumTypes)
+ {
+ type_counts[tp]++;
+ if (shared())
+ {
+ share_counts[tp]++;
+ }
+ }
+}
+
+
U32 LLSD::Impl::sAllocationCount = 0;
U32 LLSD::Impl::sOutstandingCount = 0;
@@ -681,10 +795,10 @@ namespace
}
-LLSD::LLSD() : impl(0) { }
-LLSD::~LLSD() { Impl::reset(impl, 0); }
+LLSD::LLSD() : impl(0) { ALLOC_LLSD_OBJECT; }
+LLSD::~LLSD() { FREE_LLSD_OBJECT; Impl::reset(impl, 0); }
-LLSD::LLSD(const LLSD& other) : impl(0) { assign(other); }
+LLSD::LLSD(const LLSD& other) : impl(0) { ALLOC_LLSD_OBJECT; assign(other); }
void LLSD::assign(const LLSD& other) { Impl::assign(impl, other.impl); }
@@ -692,18 +806,18 @@ void LLSD::clear() { Impl::assignUndefined(impl); }
LLSD::Type LLSD::type() const { return safe(impl).type(); }
-// Scaler Constructors
-LLSD::LLSD(Boolean v) : impl(0) { assign(v); }
-LLSD::LLSD(Integer v) : impl(0) { assign(v); }
-LLSD::LLSD(Real v) : impl(0) { assign(v); }
-LLSD::LLSD(const UUID& v) : impl(0) { assign(v); }
-LLSD::LLSD(const String& v) : impl(0) { assign(v); }
-LLSD::LLSD(const Date& v) : impl(0) { assign(v); }
-LLSD::LLSD(const URI& v) : impl(0) { assign(v); }
-LLSD::LLSD(const Binary& v) : impl(0) { assign(v); }
+// Scalar Constructors
+LLSD::LLSD(Boolean v) : impl(0) { ALLOC_LLSD_OBJECT; assign(v); }
+LLSD::LLSD(Integer v) : impl(0) { ALLOC_LLSD_OBJECT; assign(v); }
+LLSD::LLSD(Real v) : impl(0) { ALLOC_LLSD_OBJECT; assign(v); }
+LLSD::LLSD(const UUID& v) : impl(0) { ALLOC_LLSD_OBJECT; assign(v); }
+LLSD::LLSD(const String& v) : impl(0) { ALLOC_LLSD_OBJECT; assign(v); }
+LLSD::LLSD(const Date& v) : impl(0) { ALLOC_LLSD_OBJECT; assign(v); }
+LLSD::LLSD(const URI& v) : impl(0) { ALLOC_LLSD_OBJECT; assign(v); }
+LLSD::LLSD(const Binary& v) : impl(0) { ALLOC_LLSD_OBJECT; assign(v); }
// Convenience Constructors
-LLSD::LLSD(F32 v) : impl(0) { assign((Real)v); }
+LLSD::LLSD(F32 v) : impl(0) { ALLOC_LLSD_OBJECT; assign((Real)v); }
// Scalar Assignment
void LLSD::assign(Boolean v) { safe(impl).assign(impl, v); }
@@ -726,7 +840,7 @@ LLSD::URI LLSD::asURI() const { return safe(impl).asURI(); }
LLSD::Binary LLSD::asBinary() const { return safe(impl).asBinary(); }
// const char * helpers
-LLSD::LLSD(const char* v) : impl(0) { assign(v); }
+LLSD::LLSD(const char* v) : impl(0) { ALLOC_LLSD_OBJECT; assign(v); }
void LLSD::assign(const char* v)
{
if(v) assign(std::string(v));
@@ -784,9 +898,6 @@ LLSD& LLSD::operator[](Integer i)
const LLSD& LLSD::operator[](Integer i) const
{ return safe(impl).ref(i); }
-U32 LLSD::allocationCount() { return Impl::sAllocationCount; }
-U32 LLSD::outstandingCount() { return Impl::sOutstandingCount; }
-
static const char *llsd_dump(const LLSD &llsd, bool useXMLFormat)
{
// sStorage is used to hold the string representation of the llsd last
@@ -801,15 +912,9 @@ static const char *llsd_dump(const LLSD &llsd, bool useXMLFormat)
{
std::ostringstream out;
if (useXMLFormat)
- {
- LLSDXMLStreamer xml_streamer(llsd);
- out << xml_streamer;
- }
+ out << LLSDXMLStreamer(llsd);
else
- {
- LLSDNotationStreamer notation_streamer(llsd);
- out << notation_streamer;
- }
+ out << LLSDNotationStreamer(llsd);
out_string = out.str();
}
int len = out_string.length();
@@ -840,3 +945,38 @@ LLSD::array_iterator LLSD::beginArray() { return makeArray(impl).beginArray();
LLSD::array_iterator LLSD::endArray() { return makeArray(impl).endArray(); }
LLSD::array_const_iterator LLSD::beginArray() const{ return safe(impl).beginArray(); }
LLSD::array_const_iterator LLSD::endArray() const { return safe(impl).endArray(); }
+
+namespace llsd
+{
+
+U32 allocationCount() { return LLSD::Impl::sAllocationCount; }
+U32 outstandingCount() { return LLSD::Impl::sOutstandingCount; }
+
+// Diagnostic dump of contents in an LLSD object
+void dumpStats(const LLSD& llsd) { LLSD::Impl::getImpl(llsd).dumpStats(); }
+
+} // namespace llsd
+
+// static
+std::string LLSD::typeString(Type type)
+{
+ static const char * sTypeNameArray[] = {
+ "Undefined",
+ "Boolean",
+ "Integer",
+ "Real",
+ "String",
+ "UUID",
+ "Date",
+ "URI",
+ "Binary",
+ "Map",
+ "Array"
+ };
+
+ if (0 <= type && type < LL_ARRAY_SIZE(sTypeNameArray))
+ {
+ return sTypeNameArray[type];
+ }
+ return STRINGIZE("** invalid type value " << type);
+}
diff --git a/indra/llcommon/llsd.h b/indra/llcommon/llsd.h
index 90d0f97873..5eb69059ac 100644
--- a/indra/llcommon/llsd.h
+++ b/indra/llcommon/llsd.h
@@ -40,10 +40,10 @@
/**
LLSD provides a flexible data system similar to the data facilities of
dynamic languages like Perl and Python. It is created to support exchange
- of structured data between loosly coupled systems. (Here, "loosly coupled"
+ of structured data between loosely coupled systems. (Here, "loosely coupled"
means not compiled together into the same module.)
- Data in such exchanges must be highly tollerant of changes on either side
+ Data in such exchanges must be highly tolerant of changes on either side
such as:
- recompilation
- implementation in a different langauge
@@ -51,19 +51,19 @@
- execution of older versions (with fewer parameters)
To this aim, the C++ API of LLSD strives to be very easy to use, and to
- default to "the right thing" whereever possible. It is extremely tollerant
+ default to "the right thing" wherever possible. It is extremely tolerant
of errors and unexpected situations.
- The fundimental class is LLSD. LLSD is a value holding object. It holds
+ The fundamental class is LLSD. LLSD is a value holding object. It holds
one value that is either undefined, one of the scalar types, or a map or an
array. LLSD objects have value semantics (copying them copies the value,
- though it can be considered efficient, due to shareing.), and mutable.
+ though it can be considered efficient, due to sharing), and mutable.
Undefined is the singular value given to LLSD objects that are not
initialized with any data. It is also used as the return value for
- operations that return an LLSD,
+ operations that return an LLSD.
- The sclar data types are:
+ The scalar data types are:
- Boolean - true or false
- Integer - a 32 bit signed integer
- Real - a 64 IEEE 754 floating point value
@@ -80,9 +80,73 @@
An array is a sequence of zero or more LLSD values.
+ Thread Safety
+
+ In general, these LLSD classes offer *less* safety than STL container
+ classes. Implementations prior to this one were unsafe even when
+ completely unrelated LLSD trees were in two threads due to reference
+ sharing of special 'undefined' values that participated in the reference
+ counting mechanism.
+
+ The dereference-before-refcount and aggressive tree sharing also make
+ it impractical to share an LLSD across threads. A strategy of passing
+ ownership or a copy to another thread is still difficult due to a lack
+ of a cloning interface but it can be done with some care.
+
+ One way of transferring ownership is as follows:
+
+ void method(const LLSD input) {
+ ...
+ LLSD * xfer_tree = new LLSD();
+ {
+ // Top-level values
+ (* xfer_tree)['label'] = "Some text";
+ (* xfer_tree)['mode'] = APP_MODE_CONSTANT;
+
+ // There will be a second-level
+ LLSD subtree(LLSD::emptyMap());
+ (* xfer_tree)['subtree'] = subtree;
+
+ // Do *not* copy from LLSD objects via LLSD
+ // intermediaries. Only use plain-old-data
+ // types as intermediaries to prevent reference
+ // sharing.
+ subtree['value1'] = input['value1'].asInteger();
+ subtree['value2'] = input['value2'].asString();
+
+ // Close scope and drop 'subtree's reference.
+ // Only xfer_tree has a reference to the second
+ // level data.
+ }
+ ...
+ // Transfer the LLSD pointer to another thread. Ownership
+ // transfers, this thread no longer has a reference to any
+ // part of the xfer_tree and there's nothing to free or
+ // release here. Receiving thread does need to delete the
+ // pointer when it is done with the LLSD. Transfer
+ // mechanism must perform correct data ordering operations
+ // as dictated by architecture.
+ other_thread.sendMessageAndPointer("Take This", xfer_tree);
+ xfer_tree = NULL;
+
+
+ Avoid this pattern which provides half of a race condition:
+
+ void method(const LLSD input) {
+ ...
+ LLSD xfer_tree(LLSD::emptyMap());
+ xfer_tree['label'] = "Some text";
+ xfer_tree['mode'] = APP_MODE_CONSTANT;
+ ...
+ other_thread.sendMessageAndPointer("Take This", xfer_tree);
+
+
@nosubgrouping
*/
+// Normally undefined, used for diagnostics
+//#define LLSD_DEBUG_INFO 1
+
class LL_COMMON_API LLSD
{
public:
@@ -202,7 +266,7 @@ public:
//@}
/** @name Character Pointer Helpers
- These are helper routines to make working with char* the same as easy as
+ These are helper routines to make working with char* as easy as
working with strings.
*/
//@{
@@ -266,7 +330,7 @@ public:
/** @name Type Testing */
//@{
enum Type {
- TypeUndefined,
+ TypeUndefined = 0,
TypeBoolean,
TypeInteger,
TypeReal,
@@ -276,7 +340,10 @@ public:
TypeURI,
TypeBinary,
TypeMap,
- TypeArray
+ TypeArray,
+ TypeLLSDTypeEnd,
+ TypeLLSDTypeBegin = TypeUndefined,
+ TypeLLSDNumTypes = (TypeLLSDTypeEnd - TypeLLSDTypeBegin)
};
Type type() const;
@@ -302,7 +369,7 @@ public:
If you get a linker error about these being missing, you have made
mistake in your code. DO NOT IMPLEMENT THESE FUNCTIONS as a fix.
- All of thse problems stem from trying to support char* in LLSD or in
+ All of these problems stem from trying to support char* in LLSD or in
std::string. There are too many automatic casts that will lead to
using an arbitrary pointer or scalar type to std::string.
*/
@@ -311,7 +378,7 @@ public:
void assign(const void*); ///< assign from arbitrary pointers
LLSD& operator=(const void*); ///< assign from arbitrary pointers
- bool has(Integer) const; ///< has only works for Maps
+ bool has(Integer) const; ///< has() only works for Maps
//@}
/** @name Implementation */
@@ -320,13 +387,7 @@ public:
class Impl;
private:
Impl* impl;
- //@}
-
- /** @name Unit Testing Interface */
- //@{
-public:
- static U32 allocationCount(); ///< how many Impls have been made
- static U32 outstandingCount(); ///< how many Impls are still alive
+ friend class LLSD::Impl;
//@}
private:
@@ -338,6 +399,10 @@ private:
/// Returns Notation version of llsd -- only to be called from debugger
static const char *dump(const LLSD &llsd);
//@}
+
+public:
+
+ static std::string typeString(Type type); // Return human-readable type as a string
};
struct llsd_select_bool : public std::unary_function<LLSD, LLSD::Boolean>
@@ -385,9 +450,32 @@ struct llsd_select_string : public std::unary_function<LLSD, LLSD::String>
LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLSD& llsd);
+namespace llsd
+{
+
+#ifdef LLSD_DEBUG_INFO
+/** @name Unit Testing Interface */
+//@{
+ LL_COMMON_API void dumpStats(const LLSD&); ///< Output information on object and usage
+
+ /// @warn THE FOLLOWING COUNTS WILL NOT BE ACCURATE IN A MULTI-THREADED
+ /// ENVIRONMENT.
+ ///
+ /// These counts track LLSD::Impl (hidden) objects.
+ LL_COMMON_API U32 allocationCount(); ///< how many Impls have been made
+ LL_COMMON_API U32 outstandingCount(); ///< how many Impls are still alive
+
+ /// These counts track LLSD (public) objects.
+ LL_COMMON_API extern S32 sLLSDAllocationCount; ///< Number of LLSD objects ever created
+ LL_COMMON_API extern S32 sLLSDNetObjects; ///< Number of LLSD objects that exist
+#endif
+//@}
+
+} // namespace llsd
+
/** QUESTIONS & TO DOS
- - Would Binary be more convenient as usigned char* buffer semantics?
- - Should Binary be convertable to/from String, and if so how?
+ - Would Binary be more convenient as unsigned char* buffer semantics?
+ - Should Binary be convertible to/from String, and if so how?
- as UTF8 encoded strings (making not like UUID<->String)
- as Base64 or Base96 encoded (making like UUID<->String)
- Conversions to std::string and LLUUID do not result in easy assignment
diff --git a/indra/llcommon/llthread.h b/indra/llcommon/llthread.h
index 40291a2569..f0e0de6173 100644
--- a/indra/llcommon/llthread.h
+++ b/indra/llcommon/llthread.h
@@ -187,11 +187,14 @@ public:
LLMutexLock(LLMutex* mutex)
{
mMutex = mutex;
- mMutex->lock();
+
+ if(mMutex)
+ mMutex->lock();
}
~LLMutexLock()
{
- mMutex->unlock();
+ if(mMutex)
+ mMutex->unlock();
}
private:
LLMutex* mMutex;
diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h
index b50405421d..deac3d1780 100644
--- a/indra/llcommon/llversionviewer.h
+++ b/indra/llcommon/llversionviewer.h
@@ -29,7 +29,7 @@
const S32 LL_VERSION_MAJOR = 3;
const S32 LL_VERSION_MINOR = 2;
-const S32 LL_VERSION_PATCH = 4;
+const S32 LL_VERSION_PATCH = 5;
const S32 LL_VERSION_BUILD = 0;
const char * const LL_CHANNEL = "Second Life Developer";
diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp
index c239e3df88..56e01ac851 100644
--- a/indra/llimage/llimage.cpp
+++ b/indra/llimage/llimage.cpp
@@ -195,7 +195,7 @@ U8* LLImageBase::allocateData(S32 size)
mData = (U8*)ALLOCATE_MEM(sPrivatePoolp, size);
if (!mData)
{
- llwarns << "allocate image data: " << size << llendl;
+ llwarns << "Failed to allocate image data size [" << size << "]" << llendl;
size = 0 ;
mWidth = mHeight = 0 ;
mBadBufferAllocation = true ;
diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp
index 330028c926..f569630766 100644
--- a/indra/llmessage/llcurl.cpp
+++ b/indra/llmessage/llcurl.cpp
@@ -86,9 +86,7 @@ S32 gCurlMultiCount = 0;
std::vector<LLMutex*> LLCurl::sSSLMutex;
std::string LLCurl::sCAPath;
std::string LLCurl::sCAFile;
-
-bool LLCurl::sMultiThreaded = false;
-static U32 sMainThreadID = 0;
+LLCurlThread* LLCurl::sCurlThread = NULL ;
void check_curl_code(CURLcode code)
{
@@ -221,14 +219,15 @@ namespace boost
std::set<CURL*> LLCurl::Easy::sFreeHandles;
std::set<CURL*> LLCurl::Easy::sActiveHandles;
-LLMutex* LLCurl::Easy::sHandleMutex = NULL;
-LLMutex* LLCurl::Easy::sMultiMutex = NULL;
+LLMutex* LLCurl::Easy::sHandleMutexp = NULL ;
//static
CURL* LLCurl::Easy::allocEasyHandle()
{
CURL* ret = NULL;
- LLMutexLock lock(sHandleMutex);
+
+ LLMutexLock lock(sHandleMutexp) ;
+
if (sFreeHandles.empty())
{
ret = curl_easy_init();
@@ -256,8 +255,7 @@ void LLCurl::Easy::releaseEasyHandle(CURL* handle)
llerrs << "handle cannot be NULL!" << llendl;
}
- LLMutexLock lock(sHandleMutex);
-
+ LLMutexLock lock(sHandleMutexp) ;
if (sActiveHandles.find(handle) != sActiveHandles.end())
{
sActiveHandles.erase(handle);
@@ -519,48 +517,38 @@ void LLCurl::Easy::prepRequest(const std::string& url,
}
////////////////////////////////////////////////////////////////////////////
-
+LLMutex* LLCurl::Multi::sMultiInitMutexp = NULL ;
LLCurl::Multi::Multi()
- : LLThread("Curl Multi"),
- mQueued(0),
+ : mQueued(0),
mErrorCount(0),
- mPerformState(PERFORM_STATE_READY)
+ mState(STATE_READY),
+ mDead(FALSE),
+ mMutexp(NULL),
+ mDeletionMutexp(NULL),
+ mEasyMutexp(NULL)
{
- mQuitting = false;
-
- mThreaded = LLCurl::sMultiThreaded && LLThread::currentID() == sMainThreadID;
- if (mThreaded)
- {
- mSignal = new LLCondition(NULL);
- }
- else
- {
- mSignal = NULL;
- }
-
- mCurlMultiHandle = curl_multi_init();
+ mCurlMultiHandle = initMulti();
if (!mCurlMultiHandle)
{
llwarns << "curl_multi_init() returned NULL! Easy handles: " << gCurlEasyCount << " Multi handles: " << gCurlMultiCount << llendl;
- mCurlMultiHandle = curl_multi_init();
+ mCurlMultiHandle = initMulti();
}
- llassert_always(mCurlMultiHandle);
- ++gCurlMultiCount;
-}
-
-LLCurl::Multi::~Multi()
-{
- llassert(isStopped());
+ llassert_always(mCurlMultiHandle);
- if (LLCurl::sMultiThreaded)
+ if(LLCurl::getCurlThread()->getThreaded())
{
- LLCurl::Easy::sMultiMutex->lock();
+ mMutexp = new LLMutex(NULL) ;
+ mDeletionMutexp = new LLMutex(NULL) ;
+ mEasyMutexp = new LLMutex(NULL) ;
}
+ LLCurl::getCurlThread()->addMulti(this) ;
- delete mSignal;
- mSignal = NULL;
+ ++gCurlMultiCount;
+}
+LLCurl::Multi::~Multi()
+{
// Clean up active
for(easy_active_list_t::iterator iter = mEasyActiveList.begin();
iter != mEasyActiveList.end(); ++iter)
@@ -577,75 +565,137 @@ LLCurl::Multi::~Multi()
mEasyFreeList.clear();
check_curl_multi_code(curl_multi_cleanup(mCurlMultiHandle));
+
+ delete mMutexp ;
+ mMutexp = NULL ;
+ delete mDeletionMutexp ;
+ mDeletionMutexp = NULL ;
+ delete mEasyMutexp ;
+ mEasyMutexp = NULL ;
+
--gCurlMultiCount;
+}
+
+CURLM* LLCurl::Multi::initMulti()
+{
+ LLMutexLock lock(sMultiInitMutexp) ;
+
+ return curl_multi_init() ;
+}
- if (LLCurl::sMultiThreaded)
+void LLCurl::Multi::lock()
+{
+ if(mMutexp)
{
- LLCurl::Easy::sMultiMutex->unlock();
+ mMutexp->lock() ;
}
}
-CURLMsg* LLCurl::Multi::info_read(S32* msgs_in_queue)
+void LLCurl::Multi::unlock()
{
- CURLMsg* curlmsg = curl_multi_info_read(mCurlMultiHandle, msgs_in_queue);
- return curlmsg;
+ if(mMutexp)
+ {
+ mMutexp->unlock() ;
+ }
+}
+
+void LLCurl::Multi::markDead()
+{
+ LLMutexLock lock(mDeletionMutexp) ;
+
+ mDead = TRUE ;
}
-void LLCurl::Multi::perform()
+void LLCurl::Multi::setState(LLCurl::Multi::ePerformState state)
{
- if (mThreaded)
+ lock() ;
+ mState = state ;
+ unlock() ;
+
+ if(mState == STATE_READY)
{
- if (mPerformState == PERFORM_STATE_READY)
- {
- mSignal->signal();
- }
+ LLCurl::getCurlThread()->setPriority(mHandle, LLQueuedThread::PRIORITY_NORMAL) ;
+ }
+}
+
+LLCurl::Multi::ePerformState LLCurl::Multi::getState()
+{
+ return mState;
+}
+
+bool LLCurl::Multi::isCompleted()
+{
+ return STATE_COMPLETED == getState() ;
+}
+
+bool LLCurl::Multi::waitToComplete()
+{
+ if(!mMutexp) //not threaded
+ {
+ doPerform() ;
+ return true ;
}
- else
+
+ bool completed = (STATE_COMPLETED == mState) ;
+ if(!completed)
{
- doPerform();
+ LLCurl::getCurlThread()->setPriority(mHandle, LLQueuedThread::PRIORITY_URGENT) ;
}
+
+ return completed;
}
-void LLCurl::Multi::run()
+CURLMsg* LLCurl::Multi::info_read(S32* msgs_in_queue)
{
- llassert(mThreaded);
+ LLMutexLock lock(mMutexp) ;
- while (!mQuitting)
- {
- mSignal->wait();
- mPerformState = PERFORM_STATE_PERFORMING;
- if (!mQuitting)
- {
- LLMutexLock lock(LLCurl::Easy::sMultiMutex);
- doPerform();
- }
- }
+ CURLMsg* curlmsg = curl_multi_info_read(mCurlMultiHandle, msgs_in_queue);
+ return curlmsg;
}
-void LLCurl::Multi::doPerform()
+//return true if dead
+bool LLCurl::Multi::doPerform()
{
- S32 q = 0;
- for (S32 call_count = 0;
- call_count < MULTI_PERFORM_CALL_REPEAT;
- call_count += 1)
+ LLMutexLock lock(mDeletionMutexp) ;
+
+ bool dead = mDead ;
+
+ if(mDead)
{
- CURLMcode code = curl_multi_perform(mCurlMultiHandle, &q);
- if (CURLM_CALL_MULTI_PERFORM != code || q == 0)
+ setState(STATE_COMPLETED);
+ mQueued = 0 ;
+ }
+ else if(getState() != STATE_COMPLETED)
+ {
+ setState(STATE_PERFORMING);
+
+ S32 q = 0;
+ for (S32 call_count = 0;
+ call_count < MULTI_PERFORM_CALL_REPEAT;
+ call_count++)
{
- check_curl_multi_code(code);
- break;
+ LLMutexLock lock(mMutexp) ;
+ CURLMcode code = curl_multi_perform(mCurlMultiHandle, &q);
+ if (CURLM_CALL_MULTI_PERFORM != code || q == 0)
+ {
+ check_curl_multi_code(code);
+
+ break;
+ }
}
-
+
+ mQueued = q;
+ setState(STATE_COMPLETED) ;
}
- mQueued = q;
- mPerformState = PERFORM_STATE_COMPLETED;
+
+ return dead ;
}
S32 LLCurl::Multi::process()
{
- perform();
+ waitToComplete() ;
- if (mPerformState != PERFORM_STATE_COMPLETED)
+ if (getState() != STATE_COMPLETED)
{
return 0;
}
@@ -660,10 +710,19 @@ S32 LLCurl::Multi::process()
if (msg->msg == CURLMSG_DONE)
{
U32 response = 0;
- easy_active_map_t::iterator iter = mEasyActiveMap.find(msg->easy_handle);
- if (iter != mEasyActiveMap.end())
+ Easy* easy = NULL ;
+
+ {
+ LLMutexLock lock(mEasyMutexp) ;
+ easy_active_map_t::iterator iter = mEasyActiveMap.find(msg->easy_handle);
+ if (iter != mEasyActiveMap.end())
+ {
+ easy = iter->second;
+ }
+ }
+
+ if(easy)
{
- Easy* easy = iter->second;
response = easy->report(msg->data.result);
removeEasy(easy);
}
@@ -681,25 +740,28 @@ S32 LLCurl::Multi::process()
}
}
- mPerformState = PERFORM_STATE_READY;
+ setState(STATE_READY);
+
return processed;
}
LLCurl::Easy* LLCurl::Multi::allocEasy()
{
- Easy* easy = 0;
+ Easy* easy = 0;
if (mEasyFreeList.empty())
- {
+ {
easy = Easy::getEasy();
}
else
{
+ LLMutexLock lock(mEasyMutexp) ;
easy = *(mEasyFreeList.begin());
mEasyFreeList.erase(easy);
}
if (easy)
{
+ LLMutexLock lock(mEasyMutexp) ;
mEasyActiveList.insert(easy);
mEasyActiveMap[easy->getCurlHandle()] = easy;
}
@@ -708,6 +770,7 @@ LLCurl::Easy* LLCurl::Multi::allocEasy()
bool LLCurl::Multi::addEasy(Easy* easy)
{
+ LLMutexLock lock(mMutexp) ;
CURLMcode mcode = curl_multi_add_handle(mCurlMultiHandle, easy->getCurlHandle());
check_curl_multi_code(mcode);
//if (mcode != CURLM_OK)
@@ -720,25 +783,131 @@ bool LLCurl::Multi::addEasy(Easy* easy)
void LLCurl::Multi::easyFree(Easy* easy)
{
+ if(mEasyMutexp)
+ {
+ mEasyMutexp->lock() ;
+ }
+
mEasyActiveList.erase(easy);
mEasyActiveMap.erase(easy->getCurlHandle());
+
if (mEasyFreeList.size() < EASY_HANDLE_POOL_SIZE)
- {
- easy->resetState();
+ {
mEasyFreeList.insert(easy);
+
+ if(mEasyMutexp)
+ {
+ mEasyMutexp->unlock() ;
+ }
+
+ easy->resetState();
}
else
{
+ if(mEasyMutexp)
+ {
+ mEasyMutexp->unlock() ;
+ }
delete easy;
}
}
void LLCurl::Multi::removeEasy(Easy* easy)
{
- check_curl_multi_code(curl_multi_remove_handle(mCurlMultiHandle, easy->getCurlHandle()));
+ {
+ LLMutexLock lock(mMutexp) ;
+ check_curl_multi_code(curl_multi_remove_handle(mCurlMultiHandle, easy->getCurlHandle()));
+ }
easyFree(easy);
}
+//------------------------------------------------------------
+//LLCurlThread
+LLCurlThread::CurlRequest::CurlRequest(handle_t handle, LLCurl::Multi* multi, LLCurlThread* curl_thread) :
+ LLQueuedThread::QueuedRequest(handle, LLQueuedThread::PRIORITY_NORMAL, FLAG_AUTO_COMPLETE),
+ mMulti(multi),
+ mCurlThread(curl_thread)
+{
+}
+
+LLCurlThread::CurlRequest::~CurlRequest()
+{
+ if(mMulti)
+ {
+ mCurlThread->deleteMulti(mMulti) ;
+ mMulti = NULL ;
+ }
+}
+
+bool LLCurlThread::CurlRequest::processRequest()
+{
+ bool completed = true ;
+ if(mMulti)
+ {
+ completed = mCurlThread->doMultiPerform(mMulti) ;
+ setPriority(LLQueuedThread::PRIORITY_LOW) ;
+ }
+
+ return completed ;
+}
+
+void LLCurlThread::CurlRequest::finishRequest(bool completed)
+{
+ mCurlThread->deleteMulti(mMulti) ;
+ mMulti = NULL ;
+}
+
+LLCurlThread::LLCurlThread(bool threaded) :
+ LLQueuedThread("curlthread", threaded)
+{
+ if(!LLCurl::Multi::sMultiInitMutexp)
+ {
+ LLCurl::Multi::sMultiInitMutexp = new LLMutex(NULL) ;
+ }
+}
+
+//virtual
+LLCurlThread::~LLCurlThread()
+{
+ delete LLCurl::Multi::sMultiInitMutexp ;
+ LLCurl::Multi::sMultiInitMutexp = NULL ;
+}
+
+S32 LLCurlThread::update(U32 max_time_ms)
+{
+ return LLQueuedThread::update(max_time_ms);
+}
+
+void LLCurlThread::addMulti(LLCurl::Multi* multi)
+{
+ multi->mHandle = generateHandle() ;
+
+ CurlRequest* req = new CurlRequest(multi->mHandle, multi, this) ;
+
+ if (!addRequest(req))
+ {
+ llwarns << "curl request added when the thread is quitted" << llendl;
+ }
+}
+
+void LLCurlThread::killMulti(LLCurl::Multi* multi)
+{
+ multi->markDead() ;
+}
+
+//private
+bool LLCurlThread::doMultiPerform(LLCurl::Multi* multi)
+{
+ return multi->doPerform() ;
+}
+
+//private
+void LLCurlThread::deleteMulti(LLCurl::Multi* multi)
+{
+ delete multi ;
+}
+//------------------------------------------------------------
+
//static
std::string LLCurl::strerror(CURLcode errorcode)
{
@@ -753,39 +922,23 @@ LLCurlRequest::LLCurlRequest() :
mActiveMulti(NULL),
mActiveRequestCount(0)
{
- mThreadID = LLThread::currentID();
mProcessing = FALSE;
}
LLCurlRequest::~LLCurlRequest()
{
- llassert_always(mThreadID == LLThread::currentID());
-
//stop all Multi handle background threads
for (curlmulti_set_t::iterator iter = mMultiSet.begin(); iter != mMultiSet.end(); ++iter)
{
- LLCurl::Multi* multi = *iter;
- multi->mQuitting = true;
- if (multi->mThreaded)
- {
- while (!multi->isStopped())
- {
- multi->mSignal->signal();
- apr_sleep(1000);
- }
- }
+ LLCurl::getCurlThread()->killMulti(*iter) ;
}
- for_each(mMultiSet.begin(), mMultiSet.end(), DeletePointer());
+ mMultiSet.clear() ;
}
void LLCurlRequest::addMulti()
{
- llassert_always(mThreadID == LLThread::currentID());
LLCurl::Multi* multi = new LLCurl::Multi();
- if (multi->mThreaded)
- {
- multi->start();
- }
+
mMultiSet.insert(multi);
mActiveMulti = multi;
mActiveRequestCount = 0;
@@ -901,7 +1054,6 @@ bool LLCurlRequest::post(const std::string& url,
// Note: call once per frame
S32 LLCurlRequest::process()
{
- llassert_always(mThreadID == LLThread::currentID());
S32 res = 0;
mProcessing = TRUE;
@@ -915,17 +1067,7 @@ S32 LLCurlRequest::process()
if (multi != mActiveMulti && tres == 0 && multi->mQueued == 0)
{
mMultiSet.erase(curiter);
- multi->mQuitting = true;
- if (multi->mThreaded)
- {
- while (!multi->isStopped())
- {
- multi->mSignal->signal();
- apr_sleep(1000);
- }
- }
-
- delete multi;
+ LLCurl::getCurlThread()->killMulti(multi);
}
}
mProcessing = FALSE;
@@ -934,7 +1076,6 @@ S32 LLCurlRequest::process()
S32 LLCurlRequest::getQueued()
{
- llassert_always(mThreadID == LLThread::currentID());
S32 queued = 0;
for (curlmulti_set_t::iterator iter = mMultiSet.begin();
iter != mMultiSet.end(); )
@@ -942,7 +1083,7 @@ S32 LLCurlRequest::getQueued()
curlmulti_set_t::iterator curiter = iter++;
LLCurl::Multi* multi = *curiter;
queued += multi->mQueued;
- if (multi->mPerformState != LLCurl::Multi::PERFORM_STATE_READY)
+ if (multi->getState() != LLCurl::Multi::STATE_READY)
{
++queued;
}
@@ -959,10 +1100,7 @@ LLCurlEasyRequest::LLCurlEasyRequest()
mResultReturned(false)
{
mMulti = new LLCurl::Multi();
- if (mMulti->mThreaded)
- {
- mMulti->start();
- }
+
mEasy = mMulti->allocEasy();
if (mEasy)
{
@@ -975,16 +1113,7 @@ LLCurlEasyRequest::LLCurlEasyRequest()
LLCurlEasyRequest::~LLCurlEasyRequest()
{
- mMulti->mQuitting = true;
- if (mMulti->mThreaded)
- {
- while (!mMulti->isStopped())
- {
- mMulti->mSignal->signal();
- apr_sleep(1000);
- }
- }
- delete mMulti;
+ LLCurl::getCurlThread()->killMulti(mMulti) ;
}
void LLCurlEasyRequest::setopt(CURLoption option, S32 value)
@@ -1080,19 +1209,14 @@ void LLCurlEasyRequest::requestComplete()
}
}
-void LLCurlEasyRequest::perform()
-{
- mMulti->perform();
-}
-
// Usage: Call getRestult until it returns false (no more messages)
bool LLCurlEasyRequest::getResult(CURLcode* result, LLCurl::TransferInfo* info)
{
- if (mMulti->mPerformState != LLCurl::Multi::PERFORM_STATE_COMPLETED)
+ if (!mMulti->isCompleted())
{ //we're busy, try again later
return false;
}
- mMulti->mPerformState = LLCurl::Multi::PERFORM_STATE_READY;
+ mMulti->setState(LLCurl::Multi::STATE_READY) ;
if (!mEasy)
{
@@ -1180,8 +1304,6 @@ unsigned long LLCurl::ssl_thread_id(void)
void LLCurl::initClass(bool multi_threaded)
{
- sMainThreadID = LLThread::currentID();
- sMultiThreaded = multi_threaded;
// Do not change this "unless you are familiar with and mean to control
// internal operations of libcurl"
// - http://curl.haxx.se/libcurl/c/curl_global_init.html
@@ -1189,9 +1311,6 @@ void LLCurl::initClass(bool multi_threaded)
check_curl_code(code);
- Easy::sHandleMutex = new LLMutex(NULL);
- Easy::sMultiMutex = new LLMutex(NULL);
-
#if SAFE_SSL
S32 mutex_count = CRYPTO_num_locks();
for (S32 i=0; i<mutex_count; i++)
@@ -1201,20 +1320,33 @@ void LLCurl::initClass(bool multi_threaded)
CRYPTO_set_id_callback(&LLCurl::ssl_thread_id);
CRYPTO_set_locking_callback(&LLCurl::ssl_locking_callback);
#endif
+
+ sCurlThread = new LLCurlThread(multi_threaded) ;
+ if(multi_threaded)
+ {
+ Easy::sHandleMutexp = new LLMutex(NULL) ;
+ }
}
void LLCurl::cleanupClass()
{
+ //shut down curl thread
+ while(1)
+ {
+ if(!sCurlThread->update(1)) //finish all tasks
+ {
+ break ;
+ }
+ }
+ sCurlThread->shutdown() ;
+ delete sCurlThread ;
+ sCurlThread = NULL ;
+
#if SAFE_SSL
CRYPTO_set_locking_callback(NULL);
for_each(sSSLMutex.begin(), sSSLMutex.end(), DeletePointer());
#endif
- delete Easy::sHandleMutex;
- Easy::sHandleMutex = NULL;
- delete Easy::sMultiMutex;
- Easy::sMultiMutex = NULL;
-
for (std::set<CURL*>::iterator iter = Easy::sFreeHandles.begin(); iter != Easy::sFreeHandles.end(); ++iter)
{
CURL* curl = *iter;
@@ -1223,6 +1355,9 @@ void LLCurl::cleanupClass()
Easy::sFreeHandles.clear();
+ delete Easy::sHandleMutexp ;
+ Easy::sHandleMutexp = NULL ;
+
llassert(Easy::sActiveHandles.empty());
}
diff --git a/indra/llmessage/llcurl.h b/indra/llmessage/llcurl.h
index 87de202717..705cdcbbcc 100644
--- a/indra/llmessage/llcurl.h
+++ b/indra/llmessage/llcurl.h
@@ -42,8 +42,10 @@
#include "lliopipe.h"
#include "llsd.h"
#include "llthread.h"
+#include "llqueuedthread.h"
class LLMutex;
+class LLCurlThread;
// For whatever reason, this is not typedef'd in curl.h
typedef size_t (*curl_header_callback)(void *ptr, size_t size, size_t nmemb, void *stream);
@@ -56,8 +58,6 @@ public:
class Easy;
class Multi;
- static bool sMultiThreaded;
-
struct TransferInfo
{
TransferInfo() : mSizeDownload(0.0), mTotalTime(0.0), mSpeedDownload(0.0) {}
@@ -181,10 +181,12 @@ public:
static void ssl_locking_callback(int mode, int type, const char *file, int line);
static unsigned long ssl_thread_id(void);
+ static LLCurlThread* getCurlThread() { return sCurlThread ;}
private:
static std::string sCAPath;
static std::string sCAFile;
static const unsigned int MAX_REDIRECTS;
+ static LLCurlThread* sCurlThread;
};
class LLCurl::Easy
@@ -216,7 +218,7 @@ public:
U32 report(CURLcode);
void getTransferInfo(LLCurl::TransferInfo* info);
- void prepRequest(const std::string& url, const std::vector<std::string>& headers, ResponderPtr, S32 time_out = 0, bool post = false);
+ void prepRequest(const std::string& url, const std::vector<std::string>& headers, LLCurl::ResponderPtr, S32 time_out = 0, bool post = false);
const char* getErrorBuffer();
@@ -247,64 +249,116 @@ private:
// Note: char*'s not strings since we pass pointers to curl
std::vector<char*> mStrings;
- ResponderPtr mResponder;
+ LLCurl::ResponderPtr mResponder;
static std::set<CURL*> sFreeHandles;
static std::set<CURL*> sActiveHandles;
- static LLMutex* sHandleMutex;
- static LLMutex* sMultiMutex;
+ static LLMutex* sHandleMutexp ;
};
-class LLCurl::Multi : public LLThread
+class LLCurl::Multi
{
LOG_CLASS(Multi);
+
+ friend class LLCurlThread ;
+
+private:
+ ~Multi();
+
+ void markDead() ;
+ bool doPerform();
+
public:
typedef enum
{
- PERFORM_STATE_READY=0,
- PERFORM_STATE_PERFORMING=1,
- PERFORM_STATE_COMPLETED=2
+ STATE_READY=0,
+ STATE_PERFORMING=1,
+ STATE_COMPLETED=2
} ePerformState;
- Multi();
- ~Multi();
+ Multi();
- Easy* allocEasy();
- bool addEasy(Easy* easy);
+ LLCurl::Easy* allocEasy();
+ bool addEasy(LLCurl::Easy* easy);
+ void removeEasy(LLCurl::Easy* easy);
- void removeEasy(Easy* easy);
+ void lock() ;
+ void unlock() ;
+
+ void setState(ePerformState state) ;
+ ePerformState getState() ;
+ bool isCompleted() ;
+
+ bool waitToComplete() ;
S32 process();
- void perform();
- void doPerform();
- virtual void run();
-
CURLMsg* info_read(S32* msgs_in_queue);
S32 mQueued;
S32 mErrorCount;
- S32 mPerformState;
-
- LLCondition* mSignal;
- bool mQuitting;
- bool mThreaded;
-
+ static CURLM* initMulti() ;
private:
- void easyFree(Easy*);
+ void easyFree(LLCurl::Easy*);
CURLM* mCurlMultiHandle;
- typedef std::set<Easy*> easy_active_list_t;
+ typedef std::set<LLCurl::Easy*> easy_active_list_t;
easy_active_list_t mEasyActiveList;
- typedef std::map<CURL*, Easy*> easy_active_map_t;
+ typedef std::map<CURL*, LLCurl::Easy*> easy_active_map_t;
easy_active_map_t mEasyActiveMap;
- typedef std::set<Easy*> easy_free_list_t;
+ typedef std::set<LLCurl::Easy*> easy_free_list_t;
easy_free_list_t mEasyFreeList;
+
+ LLQueuedThread::handle_t mHandle ;
+ ePerformState mState;
+
+ BOOL mDead ;
+ LLMutex* mMutexp ;
+ LLMutex* mDeletionMutexp ;
+ LLMutex* mEasyMutexp ;
+
+ static LLMutex* sMultiInitMutexp ;
};
+class LLCurlThread : public LLQueuedThread
+{
+public:
+
+ class CurlRequest : public LLQueuedThread::QueuedRequest
+ {
+ protected:
+ virtual ~CurlRequest(); // use deleteRequest()
+
+ public:
+ CurlRequest(handle_t handle, LLCurl::Multi* multi, LLCurlThread* curl_thread);
+
+ /*virtual*/ bool processRequest();
+ /*virtual*/ void finishRequest(bool completed);
+
+ private:
+ // input
+ LLCurl::Multi* mMulti;
+ LLCurlThread* mCurlThread;
+ };
+ friend class CurlRequest;
+
+public:
+ LLCurlThread(bool threaded = true) ;
+ virtual ~LLCurlThread() ;
+
+ S32 update(U32 max_time_ms);
+
+ void addMulti(LLCurl::Multi* multi) ;
+ void killMulti(LLCurl::Multi* multi) ;
+
+private:
+ bool doMultiPerform(LLCurl::Multi* multi) ;
+ void deleteMulti(LLCurl::Multi* multi) ;
+} ;
+
namespace boost
{
void intrusive_ptr_add_ref(LLCurl::Responder* p);
@@ -339,7 +393,6 @@ private:
LLCurl::Multi* mActiveMulti;
S32 mActiveRequestCount;
BOOL mProcessing;
- U32 mThreadID; // debug
};
class LLCurlEasyRequest
@@ -357,9 +410,10 @@ public:
void slist_append(const char* str);
void sendRequest(const std::string& url);
void requestComplete();
- void perform();
bool getResult(CURLcode* result, LLCurl::TransferInfo* info = NULL);
std::string getErrorString();
+ bool isCompleted() {return mMulti->isCompleted() ;}
+ bool wait() { return mMulti->waitToComplete(); }
LLCurl::Easy* getEasy() const { return mEasy; }
diff --git a/indra/llmessage/llsdmessagereader.cpp b/indra/llmessage/llsdmessagereader.cpp
index 304a692cdf..3d8ca2ad9f 100644
--- a/indra/llmessage/llsdmessagereader.cpp
+++ b/indra/llmessage/llsdmessagereader.cpp
@@ -291,9 +291,10 @@ S32 getElementSize(const LLSD& llsd)
case LLSD::TypeMap:
case LLSD::TypeArray:
case LLSD::TypeUndefined:
+ default: // TypeLLSDTypeEnd, TypeLLSDNumTypes, etc.
return 0;
}
- return 0;
+ //return 0;
}
//virtual
diff --git a/indra/llmessage/llurlrequest.cpp b/indra/llmessage/llurlrequest.cpp
index fa03bb7512..a3a2b2b1b8 100644
--- a/indra/llmessage/llurlrequest.cpp
+++ b/indra/llmessage/llurlrequest.cpp
@@ -170,6 +170,7 @@ LLURLRequest::~LLURLRequest()
{
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
delete mDetail;
+ mDetail = NULL ;
}
void LLURLRequest::setURL(const std::string& url)
@@ -344,7 +345,10 @@ LLIOPipe::EStatus LLURLRequest::process_impl(
static LLFastTimer::DeclareTimer FTM_URL_PERFORM("Perform");
{
LLFastTimer t(FTM_URL_PERFORM);
- mDetail->mCurlRequest->perform();
+ if(!mDetail->mCurlRequest->wait())
+ {
+ return status ;
+ }
}
while(1)
diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h
index 47d7593479..5fe8254331 100644
--- a/indra/llplugin/llpluginclassmedia.h
+++ b/indra/llplugin/llpluginclassmedia.h
@@ -41,7 +41,7 @@ class LLPluginClassMedia : public LLPluginProcessParentOwner
LOG_CLASS(LLPluginClassMedia);
public:
LLPluginClassMedia(LLPluginClassMediaOwner *owner);
- ~LLPluginClassMedia();
+ virtual ~LLPluginClassMedia();
// local initialization, called by the media manager when creating a source
bool init(const std::string &launcher_filename,
diff --git a/indra/llplugin/llplugininstance.h b/indra/llplugin/llplugininstance.h
index 3643a15d8c..e6926c3e37 100644
--- a/indra/llplugin/llplugininstance.h
+++ b/indra/llplugin/llplugininstance.h
@@ -39,7 +39,7 @@
class LLPluginInstanceMessageListener
{
public:
- ~LLPluginInstanceMessageListener();
+ virtual ~LLPluginInstanceMessageListener();
/** Plugin receives message from plugin loader shell. */
virtual void receivePluginMessage(const std::string &message) = 0;
};
diff --git a/indra/llplugin/llpluginmessagepipe.cpp b/indra/llplugin/llpluginmessagepipe.cpp
index 8d13e38ad5..091e93ea4b 100644
--- a/indra/llplugin/llpluginmessagepipe.cpp
+++ b/indra/llplugin/llpluginmessagepipe.cpp
@@ -94,10 +94,10 @@ void LLPluginMessagePipeOwner::killMessagePipe(void)
LLPluginMessagePipe::LLPluginMessagePipe(LLPluginMessagePipeOwner *owner, LLSocket::ptr_t socket):
mInputMutex(gAPRPoolp),
mOutputMutex(gAPRPoolp),
+ mOutputStartIndex(0),
mOwner(owner),
mSocket(socket)
{
-
mOwner->setMessagePipe(this);
}
@@ -113,6 +113,14 @@ bool LLPluginMessagePipe::addMessage(const std::string &message)
{
// queue the message for later output
LLMutexLock lock(&mOutputMutex);
+
+ // If we're starting to use up too much memory, clear
+ if (mOutputStartIndex > 1024 * 1024)
+ {
+ mOutput = mOutput.substr(mOutputStartIndex);
+ mOutputStartIndex = 0;
+ }
+
mOutput += message;
mOutput += MESSAGE_DELIMITER; // message separator
@@ -165,35 +173,44 @@ bool LLPluginMessagePipe::pumpOutput()
if(mSocket)
{
apr_status_t status;
- apr_size_t size;
+ apr_size_t in_size, out_size;
LLMutexLock lock(&mOutputMutex);
- if(!mOutput.empty())
+
+ const char * output_data = &(mOutput.data()[mOutputStartIndex]);
+ if(*output_data != '\0')
{
// write any outgoing messages
- size = (apr_size_t)mOutput.size();
+ in_size = (apr_size_t) (mOutput.size() - mOutputStartIndex);
+ out_size = in_size;
setSocketTimeout(0);
// LL_INFOS("Plugin") << "before apr_socket_send, size = " << size << LL_ENDL;
- status = apr_socket_send(
- mSocket->getSocket(),
- (const char*)mOutput.data(),
- &size);
+ status = apr_socket_send(mSocket->getSocket(),
+ output_data,
+ &out_size);
// LL_INFOS("Plugin") << "after apr_socket_send, size = " << size << LL_ENDL;
- if(status == APR_SUCCESS)
+ if((status == APR_SUCCESS) || APR_STATUS_IS_EAGAIN(status))
{
- // success
- mOutput = mOutput.substr(size);
- }
- else if(APR_STATUS_IS_EAGAIN(status))
- {
- // Socket buffer is full...
- // remove the written part from the buffer and try again later.
- mOutput = mOutput.substr(size);
+ // Success or Socket buffer is full...
+
+ // If we've pumped the entire string, clear it
+ if (out_size == in_size)
+ {
+ mOutputStartIndex = 0;
+ mOutput.clear();
+ }
+ else
+ {
+ llassert(in_size > out_size);
+
+ // Remove the written part from the buffer and try again later.
+ mOutputStartIndex += out_size;
+ }
}
else if(APR_STATUS_IS_EOF(status))
{
diff --git a/indra/llplugin/llpluginmessagepipe.h b/indra/llplugin/llpluginmessagepipe.h
index beb942c0fe..c3498beac0 100644
--- a/indra/llplugin/llpluginmessagepipe.h
+++ b/indra/llplugin/llpluginmessagepipe.h
@@ -40,7 +40,7 @@ class LLPluginMessagePipeOwner
LOG_CLASS(LLPluginMessagePipeOwner);
public:
LLPluginMessagePipeOwner();
- ~LLPluginMessagePipeOwner();
+ virtual ~LLPluginMessagePipeOwner();
// called with incoming messages
virtual void receiveMessageRaw(const std::string &message) = 0;
@@ -86,6 +86,7 @@ protected:
std::string mInput;
LLMutex mOutputMutex;
std::string mOutput;
+ std::string::size_type mOutputStartIndex;
LLPluginMessagePipeOwner *mOwner;
LLSocket::ptr_t mSocket;
diff --git a/indra/llplugin/llpluginprocessparent.h b/indra/llplugin/llpluginprocessparent.h
index 26c6b0c402..c66723f175 100644
--- a/indra/llplugin/llpluginprocessparent.h
+++ b/indra/llplugin/llpluginprocessparent.h
@@ -41,7 +41,7 @@
class LLPluginProcessParentOwner
{
public:
- ~LLPluginProcessParentOwner();
+ virtual ~LLPluginProcessParentOwner();
virtual void receivePluginMessage(const LLPluginMessage &message) = 0;
virtual bool receivePluginMessageEarly(const LLPluginMessage &message) {return false;};
// This will only be called when the plugin has died unexpectedly
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp
index 6e4bb7ec97..cb32a510b8 100644
--- a/indra/llprimitive/llmodel.cpp
+++ b/indra/llprimitive/llmodel.cpp
@@ -31,11 +31,18 @@
#include "llconvexdecomposition.h"
#include "llsdserialize.h"
#include "llvector4a.h"
-
+#if LL_MSVC
+#pragma warning (disable : 4263)
+#pragma warning (disable : 4264)
+#endif
#include "dae.h"
#include "dae/daeErrorHandler.h"
#include "dom/domConstants.h"
#include "dom/domMesh.h"
+#if LL_MSVC
+#pragma warning (default : 4263)
+#pragma warning (default : 4264)
+#endif
#ifdef LL_STANDALONE
# include <zlib.h>
diff --git a/indra/llprimitive/lltextureanim.cpp b/indra/llprimitive/lltextureanim.cpp
index 398af4e6e8..185a3f69c0 100644
--- a/indra/llprimitive/lltextureanim.cpp
+++ b/indra/llprimitive/lltextureanim.cpp
@@ -168,8 +168,8 @@ void LLTextureAnim::unpackTAMessage(LLDataPacker &dp)
mMode = data[0];
mFace = data[1];
- mSizeX = llmax((U8)1, data[2]);
- mSizeY = llmax((U8)1, data[3]);
+ mSizeX = data[2];
+ mSizeY = data[3];
htonmemcpy(&mStart, data + 4, MVT_F32, sizeof(F32));
htonmemcpy(&mLength, data + 8, MVT_F32, sizeof(F32));
htonmemcpy(&mRate, data + 12, MVT_F32, sizeof(F32));
diff --git a/indra/llprimitive/llvolumexml.cpp b/indra/llprimitive/llvolumexml.cpp
index f4f9d4d713..bf2297a029 100644
--- a/indra/llprimitive/llvolumexml.cpp
+++ b/indra/llprimitive/llvolumexml.cpp
@@ -34,9 +34,9 @@
//============================================================================
-LLXMLNode *LLVolumeXml::exportProfileParams(const LLProfileParams* params)
+LLPointer<LLXMLNode> LLVolumeXml::exportProfileParams(const LLProfileParams* params)
{
- LLXMLNode *ret = new LLXMLNode("profile", FALSE);
+ LLPointer<LLXMLNode> ret = new LLXMLNode("profile", FALSE);
ret->createChild("curve_type", TRUE)->setByteValue(1, &params->getCurveType());
ret->createChild("interval", FALSE)->setFloatValue(2, &params->getBegin());
@@ -46,9 +46,9 @@ LLXMLNode *LLVolumeXml::exportProfileParams(const LLProfileParams* params)
}
-LLXMLNode *LLVolumeXml::exportPathParams(const LLPathParams* params)
+LLPointer<LLXMLNode> LLVolumeXml::exportPathParams(const LLPathParams* params)
{
- LLXMLNode *ret = new LLXMLNode("path", FALSE);
+ LLPointer<LLXMLNode> ret = new LLXMLNode("path", FALSE);
ret->createChild("curve_type", TRUE)->setByteValue(1, &params->getCurveType());
ret->createChild("interval", FALSE)->setFloatValue(2, &params->getBegin());
ret->createChild("scale", FALSE)->setFloatValue(2, params->getScale().mV);
@@ -63,12 +63,15 @@ LLXMLNode *LLVolumeXml::exportPathParams(const LLPathParams* params)
}
-LLXMLNode *LLVolumeXml::exportVolumeParams(const LLVolumeParams* params)
+LLPointer<LLXMLNode> LLVolumeXml::exportVolumeParams(const LLVolumeParams* params)
{
- LLXMLNode *ret = new LLXMLNode("shape", FALSE);
+ LLPointer<LLXMLNode> ret = new LLXMLNode("shape", FALSE);
- exportPathParams(&params->getPathParams())->setParent(ret);
- exportProfileParams(&params->getProfileParams())->setParent(ret);
+ LLPointer<LLXMLNode> node ;
+ node = exportPathParams(&params->getPathParams()) ;
+ node->setParent(ret);
+ node = exportProfileParams(&params->getProfileParams()) ;
+ node->setParent(ret);
return ret;
}
diff --git a/indra/llprimitive/llvolumexml.h b/indra/llprimitive/llvolumexml.h
index 5e79205d9a..9d4d989475 100644
--- a/indra/llprimitive/llvolumexml.h
+++ b/indra/llprimitive/llvolumexml.h
@@ -34,11 +34,11 @@
class LLVolumeXml
{
public:
- static LLXMLNode* exportProfileParams(const LLProfileParams* params);
+ static LLPointer<LLXMLNode> exportProfileParams(const LLProfileParams* params);
- static LLXMLNode* exportPathParams(const LLPathParams* params);
+ static LLPointer<LLXMLNode> exportPathParams(const LLPathParams* params);
- static LLXMLNode* exportVolumeParams(const LLVolumeParams* params);
+ static LLPointer<LLXMLNode> exportVolumeParams(const LLVolumeParams* params);
};
#endif // LL_LLVOLUMEXML_H
diff --git a/indra/llrender/llfontfreetype.cpp b/indra/llrender/llfontfreetype.cpp
index 91c8a37022..66d4ad2d87 100644
--- a/indra/llrender/llfontfreetype.cpp
+++ b/indra/llrender/llfontfreetype.cpp
@@ -55,7 +55,10 @@ FT_Library gFTLibrary = NULL;
//static
void LLFontManager::initClass()
{
- gFontManagerp = new LLFontManager;
+ if (!gFontManagerp)
+ {
+ gFontManagerp = new LLFontManager;
+ }
}
//static
@@ -136,7 +139,7 @@ BOOL LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 v
FT_Done_Face(mFTFace);
mFTFace = NULL;
}
-
+
int error;
error = FT_New_Face( gFTLibrary,
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index 812fa7024b..cd827f5091 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -1444,6 +1444,11 @@ const glh::matrix4f& LLRender::getModelviewMatrix()
return mMatrix[MM_MODELVIEW][mMatIdx[MM_MODELVIEW]];
}
+const glh::matrix4f& LLRender::getProjectionMatrix()
+{
+ return mMatrix[MM_PROJECTION][mMatIdx[MM_PROJECTION]];
+}
+
void LLRender::translateUI(F32 x, F32 y, F32 z)
{
if (mUIOffset.empty())
diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h
index 7581b9f908..fa5f7f311d 100644
--- a/indra/llrender/llrender.h
+++ b/indra/llrender/llrender.h
@@ -348,6 +348,7 @@ public:
void matrixMode(U32 mode);
const glh::matrix4f& getModelviewMatrix();
+ const glh::matrix4f& getProjectionMatrix();
void syncMatrices();
void syncLightState();
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index eea768a3ea..ac9dc9544d 100644
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -845,28 +845,42 @@ BOOL LLShaderMgr::linkProgramObject(GLhandleARB obj, BOOL suppress_errors)
LL_WARNS("ShaderLoading") << "GLSL Linker Error:" << LL_ENDL;
}
-// NOTE: Removing LL_DARWIN block as it doesn't seem to actually give the correct answer,
-// but want it for reference once I move it.
-#if 0
- // Force an evaluation of the gl state so the driver can tell if the shader will run in hardware or software
- // per Apple's suggestion
- glBegin(gGL.mMode);
- glEnd();
-
- // Query whether the shader can or cannot run in hardware
- // http://developer.apple.com/qa/qa2007/qa1502.html
- long vertexGPUProcessing;
- CGLContextObj ctx = CGLGetCurrentContext();
- CGLGetParameter (ctx, kCGLCPGPUVertexProcessing, &vertexGPUProcessing);
- long fragmentGPUProcessing;
- CGLGetParameter (ctx, kCGLCPGPUFragmentProcessing, &fragmentGPUProcessing);
- if (!fragmentGPUProcessing || !vertexGPUProcessing)
+#if LL_DARWIN
+
+ // For some reason this absolutely kills the frame rate when VBO's are enabled
+ if (0)
{
- LL_WARNS("ShaderLoading") << "GLSL Linker: Running in Software:" << LL_ENDL;
- success = GL_FALSE;
- suppress_errors = FALSE;
+ // Force an evaluation of the gl state so the driver can tell if the shader will run in hardware or software
+ // per Apple's suggestion
+ LLGLSLShader::sNoFixedFunction = false;
+
+ glUseProgramObjectARB(obj);
+
+ gGL.begin(LLRender::TRIANGLES);
+ gGL.vertex3f(0.0f, 0.0f, 0.0f);
+ gGL.vertex3f(0.0f, 0.0f, 0.0f);
+ gGL.vertex3f(0.0f, 0.0f, 0.0f);
+ gGL.end();
+ gGL.flush();
+
+ glUseProgramObjectARB(0);
+
+ LLGLSLShader::sNoFixedFunction = true;
+
+ // Query whether the shader can or cannot run in hardware
+ // http://developer.apple.com/qa/qa2007/qa1502.html
+ GLint vertexGPUProcessing, fragmentGPUProcessing;
+ CGLContextObj ctx = CGLGetCurrentContext();
+ CGLGetParameter(ctx, kCGLCPGPUVertexProcessing, &vertexGPUProcessing);
+ CGLGetParameter(ctx, kCGLCPGPUFragmentProcessing, &fragmentGPUProcessing);
+ if (!fragmentGPUProcessing || !vertexGPUProcessing)
+ {
+ LL_WARNS("ShaderLoading") << "GLSL Linker: Running in Software:" << LL_ENDL;
+ success = GL_FALSE;
+ suppress_errors = FALSE;
+ }
}
-
+
#else
std::string log = get_object_log(obj);
LLStringUtil::toLower(log);
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 3948145580..20a450fbfb 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -95,7 +95,7 @@ public:
#endif
}
- ~LLGLSyncFence()
+ virtual ~LLGLSyncFence()
{
#ifdef GL_ARB_sync
if (mSync)
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 74b8885e1f..93d8282aa7 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -115,7 +115,7 @@ LLButton::Params::Params()
LLButton::LLButton(const LLButton::Params& p)
: LLUICtrl(p),
- LLBadgeOwner(LLView::getHandle()),
+ LLBadgeOwner(getHandle()),
mMouseDownFrame(0),
mMouseHeldDownCount(0),
mBorderEnabled( FALSE ),
@@ -1234,7 +1234,6 @@ void LLButton::resetMouseDownTimer()
mMouseDownTimer.reset();
}
-
BOOL LLButton::handleDoubleClick(S32 x, S32 y, MASK mask)
{
// just treat a double click as a second click
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 432397d3e9..33548151fd 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -58,6 +58,8 @@
#include "llhelp.h"
#include "llmultifloater.h"
#include "llsdutil.h"
+#include <boost/foreach.hpp>
+
// use this to control "jumping" behavior when Ctrl-Tabbing
const S32 TABBED_FLOATER_OFFSET = 0;
@@ -111,7 +113,6 @@ LLFloater::click_callback LLFloater::sButtonCallbacks[BUTTON_COUNT] =
LLMultiFloater* LLFloater::sHostp = NULL;
BOOL LLFloater::sQuitting = FALSE; // Flag to prevent storing visibility controls while quitting
-LLFloater::handle_map_t LLFloater::sFloaterMap;
LLFloaterView* gFloaterView = NULL;
@@ -194,7 +195,8 @@ LLFloater::Params::Params()
dock_pressed_image("dock_pressed_image"),
help_pressed_image("help_pressed_image"),
open_callback("open_callback"),
- close_callback("close_callback")
+ close_callback("close_callback"),
+ follows("follows")
{
changeDefault(visible, false);
}
@@ -268,7 +270,6 @@ LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p)
mMinimizeSignal(NULL)
// mNotificationContext(NULL)
{
- mHandle.bind(this);
// mNotificationContext = new LLFloaterNotificationContext(getHandle());
// Clicks stop here.
@@ -323,9 +324,6 @@ void LLFloater::initFloater(const Params& p)
// Floaters are created in the invisible state
setVisible(FALSE);
- // add self to handle->floater map
- sFloaterMap[mHandle] = this;
-
if (!getParent())
{
gFloaterView->addChild(this);
@@ -532,8 +530,6 @@ LLFloater::~LLFloater()
// correct, non-minimized positions.
setMinimized( FALSE );
- sFloaterMap.erase(mHandle);
-
delete mDragHandle;
for (S32 i = 0; i < 4; i++)
{
@@ -1038,7 +1034,9 @@ BOOL LLFloater::canSnapTo(const LLView* other_view)
if (other_view != getParent())
{
const LLFloater* other_floaterp = dynamic_cast<const LLFloater*>(other_view);
- if (other_floaterp && other_floaterp->getSnapTarget() == getHandle() && mDependents.find(other_floaterp->getHandle()) != mDependents.end())
+ if (other_floaterp
+ && other_floaterp->getSnapTarget() == getHandle()
+ && mDependents.find(other_floaterp->getHandle()) != mDependents.end())
{
// this is a dependent that is already snapped to us, so don't snap back to it
return FALSE;
@@ -1677,18 +1675,17 @@ void LLFloater::onClickHelp( LLFloater* self )
LLFloater* LLFloater::getClosableFloaterFromFocus()
{
LLFloater* focused_floater = NULL;
-
- handle_map_iter_t iter;
- for(iter = sFloaterMap.begin(); iter != sFloaterMap.end(); ++iter)
+ LLInstanceTracker<LLFloater>::instance_iter it = beginInstances();
+ LLInstanceTracker<LLFloater>::instance_iter end_it = endInstances();
+ for (; it != end_it; ++it)
{
- focused_floater = iter->second;
- if (focused_floater->hasFocus())
+ if (it->hasFocus())
{
break;
}
}
- if (iter == sFloaterMap.end())
+ if (it == endInstances())
{
// nothing found, return
return NULL;
@@ -1949,6 +1946,12 @@ void LLFloater::setCanDrag(BOOL can_drag)
}
}
+bool LLFloater::getCanDrag()
+{
+ return mDragHandle->getEnabled();
+}
+
+
void LLFloater::updateTitleButtons()
{
static LLUICachedControl<S32> floater_close_box_size ("UIFloaterCloseBoxSize", 0);
@@ -2163,8 +2166,15 @@ LLFloaterView::LLFloaterView (const Params& p)
// By default, adjust vertical.
void LLFloaterView::reshape(S32 width, S32 height, BOOL called_from_parent)
{
- S32 old_width = getRect().getWidth();
- S32 old_height = getRect().getHeight();
+ S32 old_right = mLastSnapRect.mRight;
+ S32 old_top = mLastSnapRect.mTop;
+
+ LLView::reshape(width, height, called_from_parent);
+
+ S32 new_right = getSnapRect().mRight;
+ S32 new_top = getSnapRect().mTop;
+
+ mLastSnapRect = getSnapRect();
for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it)
{
@@ -2172,66 +2182,48 @@ void LLFloaterView::reshape(S32 width, S32 height, BOOL called_from_parent)
LLFloater* floaterp = (LLFloater*)viewp;
if (floaterp->isDependent())
{
- // dependents use same follow flags as their "dependee"
+ // dependents are moved with their "dependee"
continue;
}
- // Make if follow the edge it is closest to
- U32 follow_flags = 0x0;
-
- if (floaterp->isMinimized())
- {
- follow_flags |= (FOLLOWS_LEFT | FOLLOWS_TOP);
- }
- else
+ if (!floaterp->isMinimized())
{
LLRect r = floaterp->getRect();
// Compute absolute distance from each edge of screen
S32 left_offset = llabs(r.mLeft - 0);
- S32 right_offset = llabs(old_width - r.mRight);
+ S32 right_offset = llabs(old_right - r.mRight);
- S32 top_offset = llabs(old_height - r.mTop);
+ S32 top_offset = llabs(old_top - r.mTop);
S32 bottom_offset = llabs(r.mBottom - 0);
+ S32 translate_x = 0;
+ S32 translate_y = 0;
- if (left_offset < right_offset)
+ if (left_offset > right_offset)
{
- follow_flags |= FOLLOWS_LEFT;
- }
- else
- {
- follow_flags |= FOLLOWS_RIGHT;
+ translate_x = new_right - old_right;
}
- // "No vertical adjustment" usually means that the bottom of the view
- // has been pushed up or down. Hence we want the floaters to follow
- // the top.
if (top_offset < bottom_offset)
{
- follow_flags |= FOLLOWS_TOP;
+ translate_y = new_top - old_top;
}
- else
+
+ // don't reposition immovable floaters
+ if (floaterp->getCanDrag())
{
- follow_flags |= FOLLOWS_BOTTOM;
+ floaterp->translate(translate_x, translate_y);
}
- }
-
- floaterp->setFollows(follow_flags);
-
- //RN: all dependent floaters copy follow behavior of "parent"
- for(LLFloater::handle_set_iter_t dependent_it = floaterp->mDependents.begin();
- dependent_it != floaterp->mDependents.end(); ++dependent_it)
- {
- LLFloater* dependent_floaterp = dependent_it->get();
- if (dependent_floaterp)
+ BOOST_FOREACH(LLHandle<LLFloater> dependent_floater, floaterp->mDependents)
{
- dependent_floaterp->setFollows(follow_flags);
+ if (dependent_floater.get())
+ {
+ dependent_floater.get()->translate(translate_x, translate_y);
+ }
}
}
}
-
- LLView::reshape(width, height, called_from_parent);
}
@@ -2631,6 +2623,12 @@ void LLFloaterView::shiftFloaters(S32 x_offset, S32 y_offset)
void LLFloaterView::refresh()
{
+ LLRect snap_rect = getSnapRect();
+ if (snap_rect != mLastSnapRect)
+ {
+ reshape(getRect().getWidth(), getRect().getHeight(), TRUE);
+ }
+
// Constrain children to be entirely on the screen
for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it)
{
@@ -2968,6 +2966,9 @@ void LLFloater::initFromParams(const LLFloater::Params& p)
// control_name, tab_stop, focus_lost_callback, initial_value, rect, enabled, visible
LLPanel::initFromParams(p);
+ // override any follows flags
+ setFollows(FOLLOWS_NONE);
+
mTitle = p.title;
mShortTitle = p.short_title;
applyTitle();
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index 73e9c9e831..59b35d206f 100644
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -83,7 +83,7 @@ namespace LLInitParam
}
-class LLFloater : public LLPanel
+class LLFloater : public LLPanel, public LLInstanceTracker<LLFloater>
{
friend class LLFloaterView;
friend class LLFloaterReg;
@@ -156,6 +156,8 @@ public:
Optional<CommitCallbackParam> open_callback,
close_callback;
+
+ Ignored follows;
Params();
};
@@ -234,6 +236,7 @@ public:
void setCanTearOff(BOOL can_tear_off);
virtual void setCanResize(BOOL can_resize);
void setCanDrag(BOOL can_drag);
+ bool getCanDrag();
void setHost(LLMultiFloater* host);
BOOL isResizable() const { return mResizable; }
void setResizeLimits( S32 min_width, S32 min_height );
@@ -282,7 +285,7 @@ public:
void clearSnapTarget() { mSnappedTo.markDead(); }
LLHandle<LLFloater> getSnapTarget() const { return mSnappedTo; }
- LLHandle<LLFloater> getHandle() const { return mHandle; }
+ LLHandle<LLFloater> getHandle() const { return getDerivedHandle<LLFloater>(); }
const LLSD& getKey() { return mKey; }
virtual bool matchesKey(const LLSD& key) { return mSingleInstance || KeyCompare::equate(key, mKey); }
@@ -460,16 +463,9 @@ private:
typedef void(*click_callback)(LLFloater*);
static click_callback sButtonCallbacks[BUTTON_COUNT];
- typedef std::map<LLHandle<LLFloater>, LLFloater*> handle_map_t;
- typedef std::map<LLHandle<LLFloater>, LLFloater*>::iterator handle_map_iter_t;
- static handle_map_t sFloaterMap;
-
BOOL mHasBeenDraggedWhileMinimized;
S32 mPreviousMinimizedBottom;
S32 mPreviousMinimizedLeft;
-
-// LLFloaterNotificationContext* mNotificationContext;
- LLRootHandle<LLFloater> mHandle;
};
@@ -537,6 +533,7 @@ public:
private:
void hiddenFloaterClosed(LLFloater* floater);
+ LLRect mLastSnapRect;
LLHandle<LLView> mSnapView;
BOOL mFocusCycleMode;
S32 mSnapOffsetBottom;
diff --git a/indra/llui/llhandle.h b/indra/llui/llhandle.h
index 8c000eee48..37c657dd92 100644
--- a/indra/llui/llhandle.h
+++ b/indra/llui/llhandle.h
@@ -28,17 +28,18 @@
#define LLHANDLE_H
#include "llpointer.h"
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/utility/enable_if.hpp>
-template <typename T>
class LLTombStone : public LLRefCount
{
public:
- LLTombStone(T* target = NULL) : mTarget(target) {}
+ LLTombStone(void* target = NULL) : mTarget(target) {}
- void setTarget(T* target) { mTarget = target; }
- T* getTarget() const { return mTarget; }
+ void setTarget(void* target) { mTarget = target; }
+ void* getTarget() const { return mTarget; }
private:
- T* mTarget;
+ mutable void* mTarget;
};
// LLHandles are used to refer to objects whose lifetime you do not control or influence.
@@ -53,13 +54,15 @@ private:
template <typename T>
class LLHandle
{
+ template <typename U> friend class LLHandle;
+ template <typename U> friend class LLHandleProvider;
public:
LLHandle() : mTombStone(getDefaultTombStone()) {}
- const LLHandle<T>& operator =(const LLHandle<T>& other)
- {
- mTombStone = other.mTombStone;
- return *this;
- }
+
+ template<typename U>
+ LLHandle(const LLHandle<U>& other, typename boost::enable_if< typename boost::is_convertible<U*, T*> >::type* dummy = 0)
+ : mTombStone(other.mTombStone)
+ {}
bool isDead() const
{
@@ -73,7 +76,7 @@ public:
T* get() const
{
- return mTombStone->getTarget();
+ return reinterpret_cast<T*>(mTombStone->getTarget());
}
friend bool operator== (const LLHandle<T>& lhs, const LLHandle<T>& rhs)
@@ -94,12 +97,13 @@ public:
}
protected:
- LLPointer<LLTombStone<T> > mTombStone;
+ LLPointer<LLTombStone> mTombStone;
private:
- static LLPointer<LLTombStone<T> >& getDefaultTombStone()
+ typedef T* pointer_t;
+ static LLPointer<LLTombStone>& getDefaultTombStone()
{
- static LLPointer<LLTombStone<T> > sDefaultTombStone = new LLTombStone<T>;
+ static LLPointer<LLTombStone> sDefaultTombStone = new LLTombStone;
return sDefaultTombStone;
}
};
@@ -108,23 +112,26 @@ template <typename T>
class LLRootHandle : public LLHandle<T>
{
public:
+ typedef LLRootHandle<T> self_t;
+ typedef LLHandle<T> base_t;
+
LLRootHandle(T* object) { bind(object); }
LLRootHandle() {};
~LLRootHandle() { unbind(); }
- // this is redundant, since a LLRootHandle *is* an LLHandle
- LLHandle<T> getHandle() { return LLHandle<T>(*this); }
+ // this is redundant, since an LLRootHandle *is* an LLHandle
+ //LLHandle<T> getHandle() { return LLHandle<T>(*this); }
void bind(T* object)
{
// unbind existing tombstone
if (LLHandle<T>::mTombStone.notNull())
{
- if (LLHandle<T>::mTombStone->getTarget() == object) return;
+ if (LLHandle<T>::mTombStone->getTarget() == (void*)object) return;
LLHandle<T>::mTombStone->setTarget(NULL);
}
// tombstone reference counted, so no paired delete
- LLHandle<T>::mTombStone = new LLTombStone<T>(object);
+ LLHandle<T>::mTombStone = new LLTombStone((void*)object);
}
void unbind()
@@ -142,6 +149,15 @@ private:
template <typename T>
class LLHandleProvider
{
+public:
+ LLHandle<T> getHandle() const
+ {
+ // perform lazy binding to avoid small tombstone allocations for handle
+ // providers whose handles are never referenced
+ mHandle.bind(static_cast<T*>(const_cast<LLHandleProvider<T>* >(this)));
+ return mHandle;
+ }
+
protected:
typedef LLHandle<T> handle_type_t;
LLHandleProvider()
@@ -149,16 +165,17 @@ protected:
// provided here to enforce T deriving from LLHandleProvider<T>
}
- LLHandle<T> getHandle()
- {
- // perform lazy binding to avoid small tombstone allocations for handle
- // providers whose handles are never referenced
- mHandle.bind(static_cast<T*>(this));
- return mHandle;
+ template <typename U>
+ LLHandle<U> getDerivedHandle(typename boost::enable_if< typename boost::is_convertible<U*, T*> >::type* dummy = 0) const
+ {
+ LLHandle<U> downcast_handle;
+ downcast_handle.mTombStone = getHandle().mTombStone;
+ return downcast_handle;
}
+
private:
- LLRootHandle<T> mHandle;
+ mutable LLRootHandle<T> mHandle;
};
#endif
diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h
index bdae899933..36f3ba34b9 100644
--- a/indra/llui/llmenugl.h
+++ b/indra/llui/llmenugl.h
@@ -681,7 +681,7 @@ public:
BOOL appendContextSubMenu(LLContextMenu *menu);
- LLHandle<LLContextMenu> getHandle() { mHandle.bind(this); return mHandle; }
+ LLHandle<LLContextMenu> getHandle() { return getDerivedHandle<LLContextMenu>(); }
protected:
BOOL mHoveredAnyItem;
diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp
index a45b617c2e..00318cec6b 100644
--- a/indra/llui/llpanel.cpp
+++ b/indra/llui/llpanel.cpp
@@ -122,8 +122,6 @@ LLPanel::LLPanel(const LLPanel::Params& p)
{
addBorder(p.border);
}
-
- mPanelHandle.bind(this);
}
LLPanel::~LLPanel()
diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h
index ab1c87caff..cd33938226 100644
--- a/indra/llui/llpanel.h
+++ b/indra/llui/llpanel.h
@@ -153,7 +153,7 @@ public:
void setCtrlsEnabled(BOOL b);
- LLHandle<LLPanel> getHandle() const { return mPanelHandle; }
+ LLHandle<LLPanel> getHandle() const { return getDerivedHandle<LLPanel>(); }
const LLCallbackMap::map_t& getFactoryMap() const { return mFactoryMap; }
@@ -278,7 +278,6 @@ private:
LLViewBorder* mBorder;
LLButton* mDefaultBtn;
LLUIString mLabel;
- LLRootHandle<LLPanel> mPanelHandle;
typedef std::map<std::string, std::string> ui_string_map_t;
ui_string_map_t mUIStrings;
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index 622f3e215c..466fac33ea 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -175,6 +175,7 @@ LLScrollListCtrl::LLScrollListCtrl(const LLScrollListCtrl::Params& p)
mBorder(NULL),
mSortCallback(NULL),
mPopupMenu(NULL),
+ mCommentTextView(NULL),
mNumDynamicWidthColumns(0),
mTotalStaticColumnWidth(0),
mTotalColumnPadding(0),
@@ -476,7 +477,12 @@ void LLScrollListCtrl::updateLayout()
getRect().getWidth() - 2 * mBorderThickness,
getRect().getHeight() - (2 * mBorderThickness ) - heading_size );
- getChildView("comment_text")->setShape(mItemListRect);
+ if (mCommentTextView == NULL)
+ {
+ mCommentTextView = getChildView("comment_text");
+ }
+
+ mCommentTextView->setShape(mItemListRect);
// how many lines of content in a single "page"
S32 page_lines = getLinesPerPage();
diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h
index 09ab89960d..ae8aea9245 100644
--- a/indra/llui/llscrolllistctrl.h
+++ b/indra/llui/llscrolllistctrl.h
@@ -480,6 +480,8 @@ private:
S32 mHighlightedItem;
class LLViewBorder* mBorder;
LLContextMenu *mPopupMenu;
+
+ LLView *mCommentTextView;
LLWString mSearchString;
LLFrameTimer mSearchTimer;
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp
index ad1f3c504d..d5f8707381 100644
--- a/indra/llui/lltabcontainer.cpp
+++ b/indra/llui/lltabcontainer.cpp
@@ -214,6 +214,7 @@ LLTabContainer::Params::Params()
middle_tab("middle_tab"),
last_tab("last_tab"),
use_custom_icon_ctrl("use_custom_icon_ctrl", false),
+ open_tabs_on_drag_and_drop("open_tabs_on_drag_and_drop", false),
tab_icon_ctrl_pad("tab_icon_ctrl_pad", 0),
use_ellipses("use_ellipses"),
font_halign("halign")
@@ -250,6 +251,7 @@ LLTabContainer::LLTabContainer(const LLTabContainer::Params& p)
mMiddleTabParams(p.middle_tab),
mLastTabParams(p.last_tab),
mCustomIconCtrlUsed(p.use_custom_icon_ctrl),
+ mOpenTabsOnDragAndDrop(p.open_tabs_on_drag_and_drop),
mTabIconCtrlPad(p.tab_icon_ctrl_pad),
mUseTabEllipses(p.use_ellipses)
{
@@ -812,50 +814,62 @@ BOOL LLTabContainer::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDrag
{
BOOL has_scroll_arrows = (getMaxScrollPos() > 0);
- if( !getTabsHidden()
- && mDragAndDropDelayTimer.getStarted()
- && mDragAndDropDelayTimer.getElapsedTimeF32() > SCROLL_DELAY_TIME )
+ if(mOpenTabsOnDragAndDrop && !getTabsHidden())
{
- if (has_scroll_arrows)
+ // In that case, we'll open the hovered tab while dragging and dropping items.
+ // This allows for drilling through tabs.
+ if (mDragAndDropDelayTimer.getStarted())
{
- if (mJumpPrevArrowBtn && mJumpPrevArrowBtn->getRect().pointInRect(x, y))
+ if (mDragAndDropDelayTimer.getElapsedTimeF32() > SCROLL_DELAY_TIME)
{
- S32 local_x = x - mJumpPrevArrowBtn->getRect().mLeft;
- S32 local_y = y - mJumpPrevArrowBtn->getRect().mBottom;
- mJumpPrevArrowBtn->handleHover(local_x, local_y, mask);
- }
- if (mJumpNextArrowBtn && mJumpNextArrowBtn->getRect().pointInRect(x, y))
- {
- S32 local_x = x - mJumpNextArrowBtn->getRect().mLeft;
- S32 local_y = y - mJumpNextArrowBtn->getRect().mBottom;
- mJumpNextArrowBtn->handleHover(local_x, local_y, mask);
- }
- if (mPrevArrowBtn->getRect().pointInRect(x, y))
- {
- S32 local_x = x - mPrevArrowBtn->getRect().mLeft;
- S32 local_y = y - mPrevArrowBtn->getRect().mBottom;
- mPrevArrowBtn->handleHover(local_x, local_y, mask);
- }
- else if (mNextArrowBtn->getRect().pointInRect(x, y))
- {
- S32 local_x = x - mNextArrowBtn->getRect().mLeft;
- S32 local_y = y - mNextArrowBtn->getRect().mBottom;
- mNextArrowBtn->handleHover(local_x, local_y, mask);
- }
- }
+ if (has_scroll_arrows)
+ {
+ if (mJumpPrevArrowBtn && mJumpPrevArrowBtn->getRect().pointInRect(x, y))
+ {
+ S32 local_x = x - mJumpPrevArrowBtn->getRect().mLeft;
+ S32 local_y = y - mJumpPrevArrowBtn->getRect().mBottom;
+ mJumpPrevArrowBtn->handleHover(local_x, local_y, mask);
+ }
+ if (mJumpNextArrowBtn && mJumpNextArrowBtn->getRect().pointInRect(x, y))
+ {
+ S32 local_x = x - mJumpNextArrowBtn->getRect().mLeft;
+ S32 local_y = y - mJumpNextArrowBtn->getRect().mBottom;
+ mJumpNextArrowBtn->handleHover(local_x, local_y, mask);
+ }
+ if (mPrevArrowBtn->getRect().pointInRect(x, y))
+ {
+ S32 local_x = x - mPrevArrowBtn->getRect().mLeft;
+ S32 local_y = y - mPrevArrowBtn->getRect().mBottom;
+ mPrevArrowBtn->handleHover(local_x, local_y, mask);
+ }
+ else if (mNextArrowBtn->getRect().pointInRect(x, y))
+ {
+ S32 local_x = x - mNextArrowBtn->getRect().mLeft;
+ S32 local_y = y - mNextArrowBtn->getRect().mBottom;
+ mNextArrowBtn->handleHover(local_x, local_y, mask);
+ }
+ }
- for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter)
- {
- LLTabTuple* tuple = *iter;
- tuple->mButton->setVisible( TRUE );
- S32 local_x = x - tuple->mButton->getRect().mLeft;
- S32 local_y = y - tuple->mButton->getRect().mBottom;
- if (tuple->mButton->pointInView(local_x, local_y) && tuple->mButton->getEnabled() && !tuple->mTabPanel->getVisible())
- {
- tuple->mButton->onCommit();
+ for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter)
+ {
+ LLTabTuple* tuple = *iter;
+ tuple->mButton->setVisible( TRUE );
+ S32 local_x = x - tuple->mButton->getRect().mLeft;
+ S32 local_y = y - tuple->mButton->getRect().mBottom;
+ if (tuple->mButton->pointInView(local_x, local_y) && tuple->mButton->getEnabled() && !tuple->mTabPanel->getVisible())
+ {
+ tuple->mButton->onCommit();
+ }
+ }
+ // Stop the timer whether successful or not. Don't let it run forever.
mDragAndDropDelayTimer.stop();
}
}
+ else
+ {
+ // Start a timer so we don't open tabs as soon as we hover on them
+ mDragAndDropDelayTimer.start();
+ }
}
return LLView::handleDragAndDrop(x, y, mask, drop, type, cargo_data, accept, tooltip);
@@ -1025,85 +1039,50 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel)
}
else
{
+ LLButton::Params& p = (mCustomIconCtrlUsed ? custom_btn_params : normal_btn_params);
+
+ p.rect(btn_rect);
+ p.font(mFont);
+ p.font_halign = mFontHalign;
+ p.label(trimmed_label);
+ p.click_callback.function(boost::bind(&LLTabContainer::onTabBtn, this, _2, child));
+ if (indent)
+ {
+ p.pad_left(indent);
+ }
+ p.pad_bottom( mLabelPadBottom );
+ p.scale_image(true);
+ p.tab_stop(false);
+ p.label_shadow(false);
+ p.follows.flags = FOLLOWS_LEFT;
+
if (mIsVertical)
{
- LLButton::Params& p = (mCustomIconCtrlUsed)?
- custom_btn_params:normal_btn_params;
-
p.name(std::string("vert tab button"));
- p.rect(btn_rect);
- p.follows.flags(FOLLOWS_TOP | FOLLOWS_LEFT);
- p.click_callback.function(boost::bind(&LLTabContainer::onTabBtn, this, _2, child));
- p.font(mFont);
- p.label(trimmed_label);
p.image_unselected(mMiddleTabParams.tab_left_image_unselected);
p.image_selected(mMiddleTabParams.tab_left_image_selected);
- p.scale_image(true);
- p.font_halign = mFontHalign;
- p.pad_bottom( mLabelPadBottom );
- p.tab_stop(false);
- p.label_shadow(false);
- if (indent)
- {
- p.pad_left(indent);
- }
-
-
- if(mCustomIconCtrlUsed)
- {
- btn = LLUICtrlFactory::create<LLCustomButtonIconCtrl>(custom_btn_params);
-
- }
- else
- {
- btn = LLUICtrlFactory::create<LLButton>(p);
- }
+ p.follows.flags = p.follows.flags() | FOLLOWS_TOP;
}
else
{
- LLButton::Params& p = (mCustomIconCtrlUsed)?
- custom_btn_params:normal_btn_params;
p.name(std::string(child->getName()) + " tab");
- p.rect(btn_rect);
- p.click_callback.function(boost::bind(&LLTabContainer::onTabBtn, this, _2, child));
- p.font(mFont);
- p.label(trimmed_label);
p.visible(false);
- p.scale_image(true);
p.image_unselected(tab_img);
p.image_selected(tab_selected_img);
- p.tab_stop(false);
- p.label_shadow(false);
+ p.follows.flags = p.follows.flags() | (getTabPosition() == TOP ? FOLLOWS_TOP : FOLLOWS_BOTTOM);
// Try to squeeze in a bit more text
p.pad_left( mLabelPadLeft );
p.pad_right(2);
- p.pad_bottom( mLabelPadBottom );
- p.font_halign = mFontHalign;
- p.follows.flags = FOLLOWS_LEFT;
- p.follows.flags = FOLLOWS_LEFT;
-
- if (indent)
- {
- p.pad_left(indent);
- }
-
- if( getTabPosition() == TOP )
- {
- p.follows.flags = p.follows.flags() | FOLLOWS_TOP;
- }
- else
- {
- p.follows.flags = p.follows.flags() | FOLLOWS_BOTTOM;
- }
-
- if(mCustomIconCtrlUsed)
- {
- btn = LLUICtrlFactory::create<LLCustomButtonIconCtrl>(custom_btn_params);
- }
- else
- {
- btn = LLUICtrlFactory::create<LLButton>(p);
- }
+ }
+
+ // *TODO : It seems wrong not to use p in both cases considering the way p is initialized
+ if (mCustomIconCtrlUsed)
+ {
+ btn = LLUICtrlFactory::create<LLCustomButtonIconCtrl>(custom_btn_params);
+ }
+ else
+ {
+ btn = LLUICtrlFactory::create<LLButton>(p);
}
}
@@ -1280,6 +1259,10 @@ void LLTabContainer::enableTabButton(S32 which, BOOL enable)
{
mTabList[which]->mButton->setEnabled(enable);
}
+ // Stop the DaD timer as it might run forever
+ // enableTabButton() is typically called on refresh and draw when anything changed
+ // in the tab container so it's a good time to reset that.
+ mDragAndDropDelayTimer.stop();
}
void LLTabContainer::deleteAllTabs()
diff --git a/indra/llui/lltabcontainer.h b/indra/llui/lltabcontainer.h
index eaa2fd54e0..cebace2ceb 100644
--- a/indra/llui/lltabcontainer.h
+++ b/indra/llui/lltabcontainer.h
@@ -105,6 +105,11 @@ public:
Optional<bool> use_custom_icon_ctrl;
/**
+ * Open tabs on hover in drag and drop situations
+ */
+ Optional<bool> open_tabs_on_drag_and_drop;
+
+ /**
* Paddings for LLIconCtrl in case of LLCustomButtonIconCtrl usage(use_custom_icon_ctrl = true)
*/
Optional<S32> tab_icon_ctrl_pad;
@@ -300,6 +305,7 @@ private:
TabParams mLastTabParams;
bool mCustomIconCtrlUsed;
+ bool mOpenTabsOnDragAndDrop;
S32 mTabIconCtrlPad;
bool mUseTabEllipses;
};
diff --git a/indra/llui/lltextparser.cpp b/indra/llui/lltextparser.cpp
index a4fe4f6ca8..8a85f99e0c 100644
--- a/indra/llui/lltextparser.cpp
+++ b/indra/llui/lltextparser.cpp
@@ -46,8 +46,6 @@ LLTextParser::LLTextParser()
{}
-// Moved triggerAlerts() to llfloaterchat.cpp to break llui/llaudio library dependency.
-
S32 LLTextParser::findPattern(const std::string &text, LLSD highlight)
{
if (!highlight.has("pattern")) return -1;
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp
index e7642ae190..7f96c1373c 100644
--- a/indra/llui/lltoolbar.cpp
+++ b/indra/llui/lltoolbar.cpp
@@ -770,6 +770,12 @@ void LLToolBar::updateLayoutAsNeeded()
// re-center toolbar buttons
mCenteringStack->updateLayout();
+ if (!mButtons.empty())
+ {
+ mButtonPanel->setVisible(TRUE);
+ mButtonPanel->setMouseOpaque(TRUE);
+ }
+
// don't clear flag until after we've resized ourselves, to avoid laying out every frame
mNeedsLayout = false;
}
diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp
index 33bc247987..6b74c5a6be 100644
--- a/indra/llui/llui.cpp
+++ b/indra/llui/llui.cpp
@@ -1833,9 +1833,12 @@ void LLUI::setupPaths()
LLXMLNodePtr root;
BOOL success = LLXMLNode::parseFile(filename, root, NULL);
Paths paths;
- LLXUIParser parser;
- parser.readXUI(root, paths, filename);
+ if(success)
+ {
+ LLXUIParser parser;
+ parser.readXUI(root, paths, filename);
+ }
sXUIPaths.clear();
if (success && paths.validateBlock())
diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp
index 2fa260ded1..b9c843e931 100644
--- a/indra/llui/lluictrl.cpp
+++ b/indra/llui/lluictrl.cpp
@@ -118,7 +118,6 @@ LLUICtrl::LLUICtrl(const LLUICtrl::Params& p, const LLViewModelPtr& viewmodel)
mDoubleClickSignal(NULL),
mTransparencyType(TT_DEFAULT)
{
- mUICtrlHandle.bind(this);
}
void LLUICtrl::initFromParams(const Params& p)
@@ -460,7 +459,7 @@ void LLUICtrl::setControlVariable(LLControlVariable* control)
if (control)
{
mControlVariable = control;
- mControlConnection = mControlVariable->getSignal()->connect(boost::bind(&controlListener, _2, getUICtrlHandle(), std::string("value")));
+ mControlConnection = mControlVariable->getSignal()->connect(boost::bind(&controlListener, _2, getHandle(), std::string("value")));
setValue(mControlVariable->getValue());
}
}
@@ -491,7 +490,7 @@ void LLUICtrl::setEnabledControlVariable(LLControlVariable* control)
if (control)
{
mEnabledControlVariable = control;
- mEnabledControlConnection = mEnabledControlVariable->getSignal()->connect(boost::bind(&controlListener, _2, getUICtrlHandle(), std::string("enabled")));
+ mEnabledControlConnection = mEnabledControlVariable->getSignal()->connect(boost::bind(&controlListener, _2, getHandle(), std::string("enabled")));
setEnabled(mEnabledControlVariable->getValue().asBoolean());
}
}
@@ -506,7 +505,7 @@ void LLUICtrl::setDisabledControlVariable(LLControlVariable* control)
if (control)
{
mDisabledControlVariable = control;
- mDisabledControlConnection = mDisabledControlVariable->getSignal()->connect(boost::bind(&controlListener, _2, getUICtrlHandle(), std::string("disabled")));
+ mDisabledControlConnection = mDisabledControlVariable->getSignal()->connect(boost::bind(&controlListener, _2, getHandle(), std::string("disabled")));
setEnabled(!(mDisabledControlVariable->getValue().asBoolean()));
}
}
@@ -521,7 +520,7 @@ void LLUICtrl::setMakeVisibleControlVariable(LLControlVariable* control)
if (control)
{
mMakeVisibleControlVariable = control;
- mMakeVisibleControlConnection = mMakeVisibleControlVariable->getSignal()->connect(boost::bind(&controlListener, _2, getUICtrlHandle(), std::string("visible")));
+ mMakeVisibleControlConnection = mMakeVisibleControlVariable->getSignal()->connect(boost::bind(&controlListener, _2, getHandle(), std::string("visible")));
setVisible(mMakeVisibleControlVariable->getValue().asBoolean());
}
}
@@ -536,7 +535,7 @@ void LLUICtrl::setMakeInvisibleControlVariable(LLControlVariable* control)
if (control)
{
mMakeInvisibleControlVariable = control;
- mMakeInvisibleControlConnection = mMakeInvisibleControlVariable->getSignal()->connect(boost::bind(&controlListener, _2, getUICtrlHandle(), std::string("invisible")));
+ mMakeInvisibleControlConnection = mMakeInvisibleControlVariable->getSignal()->connect(boost::bind(&controlListener, _2, getHandle(), std::string("invisible")));
setVisible(!(mMakeInvisibleControlVariable->getValue().asBoolean()));
}
}
diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h
index 3e055a9d06..fb2196bb16 100644
--- a/indra/llui/lluictrl.h
+++ b/indra/llui/lluictrl.h
@@ -223,7 +223,7 @@ public:
BOOL focusLastItem(BOOL prefer_text_fields = FALSE);
// Non Virtuals
- LLHandle<LLUICtrl> getUICtrlHandle() const { return mUICtrlHandle; }
+ LLHandle<LLUICtrl> getHandle() const { return getDerivedHandle<LLUICtrl>(); }
BOOL getIsChrome() const;
void setTabStop( BOOL b );
@@ -313,7 +313,6 @@ private:
BOOL mRequestsFront;
BOOL mTabStop;
BOOL mTentative;
- LLRootHandle<LLUICtrl> mUICtrlHandle;
ETypeTransparency mTransparencyType;
diff --git a/indra/llui/llview.h b/indra/llui/llview.h
index ec7f8e385d..f21fb37e18 100644
--- a/indra/llui/llview.h
+++ b/indra/llui/llview.h
@@ -97,7 +97,11 @@ private:
static std::vector<LLViewDrawContext*> sDrawContextStack;
};
-class LLView : public LLMouseHandler, public LLMortician, public LLFocusableElement
+class LLView
+: public LLMouseHandler, // handles mouse events
+ public LLFocusableElement, // handles keyboard events
+ public LLMortician, // lazy deletion
+ public LLHandleProvider<LLView> // passes out weak references to self
{
public:
struct Follows : public LLInitParam::ChoiceBlock<Follows>
@@ -306,8 +310,6 @@ public:
void popVisible() { setVisible(mLastVisible); }
BOOL getLastVisible() const { return mLastVisible; }
- LLHandle<LLView> getHandle() { mHandle.bind(this); return mHandle; }
-
U32 getFollows() const { return mReshapeFlags; }
BOOL followsLeft() const { return mReshapeFlags & FOLLOWS_LEFT; }
BOOL followsRight() const { return mReshapeFlags & FOLLOWS_RIGHT; }
@@ -606,7 +608,6 @@ private:
BOOL mIsFocusRoot;
BOOL mUseBoundingRect; // hit test against bounding rectangle that includes all child elements
- LLRootHandle<LLView> mHandle;
BOOL mLastVisible;
S32 mNextInsertionOrdinal;
diff --git a/indra/llui/tests/llurlentry_stub.cpp b/indra/llui/tests/llurlentry_stub.cpp
index 4f251db93b..c75df86891 100644
--- a/indra/llui/tests/llurlentry_stub.cpp
+++ b/indra/llui/tests/llurlentry_stub.cpp
@@ -105,8 +105,6 @@ LLStyle::Params::Params()
namespace LLInitParam
{
- BaseBlock::BaseBlock() {}
- BaseBlock::~BaseBlock() {}
Param::Param(BaseBlock* enclosing_block)
: mIsProvided(false)
{
@@ -114,7 +112,6 @@ namespace LLInitParam
const U8* block_addr = reinterpret_cast<const U8*>(enclosing_block);
mEnclosingBlockOffset = (U16)(my_addr - block_addr);
}
- void BaseBlock::paramChanged(const Param& last_param, bool user_provided) {}
void BaseBlock::addParam(BlockDescriptor& block_data, const ParamDescriptorPtr in_param, const char* char_name){}
void BaseBlock::addSynonym(Param& param, const std::string& synonym) {}
diff --git a/indra/llui/tests/llurlmatch_test.cpp b/indra/llui/tests/llurlmatch_test.cpp
index 627f3129e9..7183413463 100644
--- a/indra/llui/tests/llurlmatch_test.cpp
+++ b/indra/llui/tests/llurlmatch_test.cpp
@@ -63,9 +63,6 @@ S32 LLUIImage::getHeight() const
namespace LLInitParam
{
- BaseBlock::BaseBlock() {}
- BaseBlock::~BaseBlock() {}
-
BlockDescriptor::BlockDescriptor() {}
ParamDescriptor::ParamDescriptor(param_handle_t p,
merge_func_t merge_func,
@@ -77,8 +74,6 @@ namespace LLInitParam
S32 max_count){}
ParamDescriptor::~ParamDescriptor() {}
- void BaseBlock::paramChanged(const Param& last_param, bool user_provided) {}
-
void BaseBlock::addParam(BlockDescriptor& block_data, const ParamDescriptorPtr in_param, const char* char_name){}
param_handle_t BaseBlock::getHandleFromParam(const Param* param) const {return 0;}
void BaseBlock::addSynonym(Param& param, const std::string& synonym) {}
diff --git a/indra/llwindow/llwindow.cpp b/indra/llwindow/llwindow.cpp
index dc3a1099b1..1351bed547 100644
--- a/indra/llwindow/llwindow.cpp
+++ b/indra/llwindow/llwindow.cpp
@@ -108,9 +108,12 @@ LLWindow::LLWindow(LLWindowCallbacks* callbacks, BOOL fullscreen, U32 flags)
mSupportedResolutions(NULL),
mNumSupportedResolutions(0),
mCurrentCursor(UI_CURSOR_ARROW),
+ mNextCursor(UI_CURSOR_ARROW),
mCursorHidden(FALSE),
mBusyCount(0),
mIsMouseClipping(FALSE),
+ mMinWindowWidth(0),
+ mMinWindowHeight(0),
mSwapMethod(SWAP_METHOD_UNDEFINED),
mHideCursorPermanent(FALSE),
mFlags(flags),
@@ -179,6 +182,36 @@ void *LLWindow::getMediaWindow()
return getPlatformWindow();
}
+BOOL LLWindow::setSize(LLCoordScreen size)
+{
+ if (!getMaximized())
+ {
+ size.mX = llmin(size.mX, mMinWindowWidth);
+ size.mY = llmin(size.mY, mMinWindowHeight);
+ }
+ return setSizeImpl(size);
+}
+
+
+// virtual
+void LLWindow::setMinSize(U32 min_width, U32 min_height, bool enforce_immediately)
+{
+ mMinWindowWidth = min_width;
+ mMinWindowHeight = min_height;
+
+ if (enforce_immediately)
+ {
+ LLCoordScreen cur_size;
+ if (!getMaximized() && getSize(&cur_size))
+ {
+ if (cur_size.mX < mMinWindowWidth || cur_size.mY < mMinWindowHeight)
+ {
+ setSizeImpl(LLCoordScreen(llmin(cur_size.mX, mMinWindowWidth), llmin(cur_size.mY, mMinWindowHeight)));
+ }
+ }
+ }
+}
+
//virtual
void LLWindow::processMiscNativeEvents()
{
diff --git a/indra/llwindow/llwindow.h b/indra/llwindow/llwindow.h
index e8a86a1880..cab2d0a8fb 100644
--- a/indra/llwindow/llwindow.h
+++ b/indra/llwindow/llwindow.h
@@ -72,7 +72,8 @@ public:
virtual BOOL getSize(LLCoordScreen *size) = 0;
virtual BOOL getSize(LLCoordWindow *size) = 0;
virtual BOOL setPosition(LLCoordScreen position) = 0;
- virtual BOOL setSize(LLCoordScreen size) = 0;
+ BOOL setSize(LLCoordScreen size);
+ virtual void setMinSize(U32 min_width, U32 min_height, bool enforce_immediately = true);
virtual BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL disable_vsync, const LLCoordScreen * const posp = NULL) = 0;
virtual BOOL setCursorPosition(LLCoordWindow position) = 0;
virtual BOOL getCursorPosition(LLCoordWindow *position) = 0;
@@ -91,8 +92,9 @@ public:
virtual S32 getBusyCount() const;
// Sets cursor, may set to arrow+hourglass
- virtual void setCursor(ECursorType cursor) = 0;
+ virtual void setCursor(ECursorType cursor) { mNextCursor = cursor; };
virtual ECursorType getCursor() const;
+ virtual void updateCursor() = 0;
virtual void captureMouse() = 0;
virtual void releaseMouse() = 0;
@@ -169,6 +171,8 @@ protected:
// Defaults to true
virtual BOOL canDelete();
+ virtual BOOL setSizeImpl(LLCoordScreen size) = 0;
+
protected:
LLWindowCallbacks* mCallbacks;
@@ -181,6 +185,7 @@ protected:
LLWindowResolution* mSupportedResolutions;
S32 mNumSupportedResolutions;
ECursorType mCurrentCursor;
+ ECursorType mNextCursor;
BOOL mCursorHidden;
S32 mBusyCount; // how deep is the "cursor busy" stack?
BOOL mIsMouseClipping; // Is this window currently clipping the mouse
@@ -188,6 +193,8 @@ protected:
BOOL mHideCursorPermanent;
U32 mFlags;
U16 mHighSurrogate;
+ S32 mMinWindowWidth;
+ S32 mMinWindowHeight;
// Handle a UTF-16 encoding unit received from keyboard.
// Converting the series of UTF-16 encoding units to UTF-32 data,
diff --git a/indra/llwindow/llwindowheadless.h b/indra/llwindow/llwindowheadless.h
index ac53e6a86e..d4a778cb85 100644
--- a/indra/llwindow/llwindowheadless.h
+++ b/indra/llwindow/llwindowheadless.h
@@ -46,7 +46,7 @@ public:
/*virtual*/ BOOL getSize(LLCoordScreen *size) {return FALSE;};
/*virtual*/ BOOL getSize(LLCoordWindow *size) {return FALSE;};
/*virtual*/ BOOL setPosition(LLCoordScreen position) {return FALSE;};
- /*virtual*/ BOOL setSize(LLCoordScreen size) {return FALSE;};
+ /*virtual*/ BOOL setSizeImpl(LLCoordScreen size) {return FALSE;};
/*virtual*/ BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL disable_vsync, const LLCoordScreen * const posp = NULL) {return FALSE;};
/*virtual*/ BOOL setCursorPosition(LLCoordWindow position) {return FALSE;};
/*virtual*/ BOOL getCursorPosition(LLCoordWindow *position) {return FALSE;};
@@ -55,7 +55,7 @@ public:
/*virtual*/ void showCursorFromMouseMove() {};
/*virtual*/ void hideCursorUntilMouseMove() {};
/*virtual*/ BOOL isCursorHidden() {return FALSE;};
- /*virtual*/ void setCursor(ECursorType cursor) {};
+ /*virtual*/ void updateCursor() {};
//virtual ECursorType getCursor() { return mCurrentCursor; };
/*virtual*/ void captureMouse() {};
/*virtual*/ void releaseMouse() {};
diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp
index d116f0dfff..c952f8bbcf 100644
--- a/indra/llwindow/llwindowmacosx.cpp
+++ b/indra/llwindow/llwindowmacosx.cpp
@@ -1,25 +1,25 @@
-/**
+/**
* @file llwindowmacosx.cpp
* @brief Platform-dependent implementation of llwindow
*
* $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$
*/
@@ -220,10 +220,10 @@ LLWindowMacOSX::LLWindowMacOSX(LLWindowCallbacks* callbacks,
// Route them to a dummy callback structure until the end of constructor.
LLWindowCallbacks null_callbacks;
mCallbacks = &null_callbacks;
-
+
// Voodoo for calling cocoa from carbon (see llwindowmacosx-objc.mm).
setupCocoa();
-
+
// Initialize the keyboard
gKeyboard = new LLKeyboardMacOSX();
gKeyboard->setCallbacks(callbacks);
@@ -254,10 +254,10 @@ LLWindowMacOSX::LLWindowMacOSX(LLWindowCallbacks* callbacks,
mRawKeyEvent = NULL;
mFSAASamples = fsaa_samples;
mForceRebuild = FALSE;
-
+
// For reasons that aren't clear to me, LLTimers seem to be created in the "started" state.
// Since the started state of this one is used to track whether the NMRec has been installed, it wants to start out in the "stopped" state.
- mBounceTimer.stop();
+ mBounceTimer.stop();
// Get the original aspect ratio of the main device.
mOriginalAspectRatio = (double)CGDisplayPixelsWide(mDisplay) / (double)CGDisplayPixelsHigh(mDisplay);
@@ -270,7 +270,7 @@ LLWindowMacOSX::LLWindowMacOSX(LLWindowCallbacks* callbacks,
mMoveEventCampartorUPP = NewEventComparatorUPP(staticMoveEventComparator);
mGlobalHandlerRef = NULL;
mWindowHandlerRef = NULL;
-
+
mDragOverrideCursor = -1;
// We're not clipping yet
@@ -445,7 +445,7 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits
mFullscreenBits = -1;
mFullscreenRefresh = -1;
- std::string error= llformat("Unable to run fullscreen at %d x %d.\nRunning in window.", width, height);
+ std::string error= llformat("Unable to run fullscreen at %d x %d.\nRunning in window.", width, height);
OSMessageBox(error, "Error", OSMB_OK);
}
}
@@ -477,7 +477,7 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits
kFirstWindowOfClass,
true,
(long)this);
-
+
if (!mWindow)
{
setupFailure("Window creation error", "Error", OSMB_OK);
@@ -493,7 +493,7 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits
InstallStandardEventHandler(GetWindowEventTarget(mWindow));
InstallWindowEventHandler(mWindow, mEventHandlerUPP, GetEventTypeCount (WindowHandlerEventList), WindowHandlerEventList, (void*)this, &mWindowHandlerRef); // add event handler
#if LL_OS_DRAGDROP_ENABLED
- InstallTrackingHandler( dragTrackingHandler, mWindow, (void*)this );
+ InstallTrackingHandler( dragTrackingHandler, mWindow, (void*)this );
InstallReceiveHandler( dragReceiveHandler, mWindow, (void*)this );
#endif // LL_OS_DRAGDROP_ENABLED
}
@@ -790,7 +790,7 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits
LL_DEBUGS("GLinit") << "Keeping vertical sync" << LL_ENDL;
frames_per_swap = 1;
}
- aglSetInteger(mContext, AGL_SWAP_INTERVAL, &frames_per_swap);
+ aglSetInteger(mContext, AGL_SWAP_INTERVAL, &frames_per_swap);
//enable multi-threaded OpenGL
if (sUseMultGL)
@@ -803,7 +803,7 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits
if (cgl_err != kCGLNoError )
{
LL_DEBUGS("GLInit") << "Multi-threaded OpenGL not available." << LL_ENDL;
- }
+ }
else
{
LL_DEBUGS("GLInit") << "Multi-threaded OpenGL enabled." << LL_ENDL;
@@ -1109,7 +1109,7 @@ BOOL LLWindowMacOSX::maximize()
{
ZoomWindow(mWindow, inContent, true);
}
-
+
return mMaximized;
}
@@ -1164,6 +1164,8 @@ void LLWindowMacOSX::gatherInput()
}
}
+
+ updateCursor();
}
BOOL LLWindowMacOSX::getPosition(LLCoordScreen *position)
@@ -1254,7 +1256,7 @@ BOOL LLWindowMacOSX::setPosition(const LLCoordScreen position)
return TRUE;
}
-BOOL LLWindowMacOSX::setSize(const LLCoordScreen size)
+BOOL LLWindowMacOSX::setSizeImpl(const LLCoordScreen size)
{
if(mWindow)
{
@@ -1432,7 +1434,7 @@ static void fixOrigin(void)
GrafPtr port;
Rect portrect;
- ::GetPort(&port);
+ ::GetPort(&port);
::GetPortBounds(port, &portrect);
if((portrect.left != 0) || (portrect.top != 0))
{
@@ -1446,17 +1448,17 @@ BOOL LLWindowMacOSX::getCursorPosition(LLCoordWindow *position)
Point cursor_point;
LLCoordScreen screen_pos;
GrafPtr save;
-
+
if(mWindow == NULL)
return FALSE;
-
+
::GetPort(&save);
::SetPort(GetWindowPort(mWindow));
fixOrigin();
// gets the mouse location in local coordinates
::GetMouse(&cursor_point);
-
+
// lldebugs << "getCursorPosition(): cursor is at " << cursor_point.h << ", " << cursor_point.v << " port origin: " << portrect.left << ", " << portrect.top << llendl;
::SetPort(save);
@@ -1521,7 +1523,7 @@ F32 LLWindowMacOSX::getNativeAspectRatio()
{
// The constructor for this class grabs the aspect ratio of the monitor before doing any resolution
// switching, and stashes it in mOriginalAspectRatio. Here, we just return it.
-
+
if (mOverrideAspectRatio > 0.f)
{
return mOverrideAspectRatio;
@@ -1996,7 +1998,7 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
if (mPreeditor
&& (result = GetEventParameter(event, kEventParamTextInputSendFixLen,
typeLongInteger, &param_type, sizeof(fix_len), NULL, &fix_len)) == noErr
- && typeLongInteger == param_type
+ && typeLongInteger == param_type
&& (result = GetEventParameter(event, kEventParamTextInputSendText,
typeUnicodeText, &param_type, 0, &text_len, NULL)) == noErr
&& typeUnicodeText == param_type)
@@ -2016,7 +2018,7 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
mPreeditor->markAsPreedit(location, length);
}
mPreeditor->resetPreedit();
-
+
// Receive the text from input method.
U16 *const text = new U16[text_len / sizeof(U16)];
GetEventParameter(event, kEventParamTextInputSendText, typeUnicodeText, NULL, text_len, NULL, text);
@@ -2055,11 +2057,11 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
GetEventParameter(event, kEventParamTextInputSendHiliteRng, typeTextRangeArray,
NULL, text_range_array_size, NULL, text_range_array);
- // WARNING: We assume ranges are in ascending order,
+ // WARNING: We assume ranges are in ascending order,
// although the condition is undocumented. It seems
// OK to assume this. I also assumed
// the ranges are contiguous in previous versions, but I
- // have heard a rumore that older versions os ATOK may
+ // have heard a rumore that older versions os ATOK may
// return ranges with some _gap_. I don't know whether
// it is true, but I'm preparing my code for the case.
@@ -2123,7 +2125,7 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
}
}
break;
-
+
case kEventTextInputUnicodeForKeyEvent:
{
UInt32 modifiers = 0;
@@ -2132,7 +2134,7 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
// First, process the raw event.
{
EventRef rawEvent = NULL;
-
+
// Get the original event and extract the modifier keys, so we can ignore command-key events.
if (GetEventParameter(event, kEventParamTextInputSendKeyboardEvent, typeEventRef, NULL, sizeof(rawEvent), NULL, &rawEvent) == noErr)
{
@@ -2141,7 +2143,7 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
// and call this function recursively to handle the raw key event.
eventHandler (myHandler, rawEvent);
-
+
// save the raw event until we're done processing the unicode input as well.
mRawKeyEvent = rawEvent;
}
@@ -2172,7 +2174,7 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
else
{
MASK mask = LLWindowMacOSX::modifiersToMask(modifiers);
-
+
llassert( actualType == typeUnicodeText );
// The result is a UTF16 buffer. Pass the characters in turn to handleUnicodeChar.
@@ -2198,7 +2200,7 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
result = err;
}
break;
-
+
case kEventTextInputOffsetToPos:
{
EventParamType param_type;
@@ -2211,7 +2213,7 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
S32 preedit, preedit_length;
mPreeditor->getPreeditRange(&preedit, &preedit_length);
const LLWString & text = mPreeditor->getPreeditString();
-
+
LLCoordGL caret_coord;
LLRect preedit_bounds;
if (0 <= offset
@@ -2225,10 +2227,10 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
qd_point.h = caret_base_coord_screen.mX;
qd_point.v = caret_base_coord_screen.mY;
SetEventParameter(event, kEventParamTextInputReplyPoint, typeQDPoint, sizeof(qd_point), &qd_point);
-
+
short line_height = (short) preedit_bounds.getHeight();
SetEventParameter(event, kEventParamTextInputReplyLineHeight, typeShortInteger, sizeof(line_height), &line_height);
-
+
result = noErr;
}
else
@@ -2281,7 +2283,7 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
case kEventRawKeyRepeat:
if (gDebugWindowProc)
{
- printf("key down, key code = 0x%08x, char code = 0x%02x (%c), modifiers = 0x%08x\n",
+ printf("key down, key code = 0x%08x, char code = 0x%02x (%c), modifiers = 0x%08x\n",
(unsigned int)keyCode, charCode, (char)charCode, (unsigned int)modifiers);
fflush(stdout);
}
@@ -2292,7 +2294,7 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
case kEventRawKeyUp:
if (gDebugWindowProc)
{
- printf("key up, key code = 0x%08x, char code = 0x%02x (%c), modifiers = 0x%08x\n",
+ printf("key up, key code = 0x%08x, char code = 0x%02x (%c), modifiers = 0x%08x\n",
(unsigned int)keyCode, charCode, (char)charCode, (unsigned int)modifiers);
fflush(stdout);
}
@@ -2350,7 +2352,7 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
}
// When the state of the 'Fn' key (the one that changes some of the mappings on a powerbook/macbook keyboard
- // to an embedded keypad) changes, it may subsequently cause a key up event to be lost, which may lead to
+ // to an embedded keypad) changes, it may subsequently cause a key up event to be lost, which may lead to
// a movement key getting "stuck" down. This is bad.
// This is an OS bug -- even the GetKeys() API doesn't tell you the key has been released.
// This workaround causes all held-down keys to be reset whenever the state of the Fn key changes. This isn't
@@ -2360,14 +2362,14 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
if (gDebugWindowProc) printf("Fn key state change event\n");
gKeyboard->resetKeys();
}
-
+
if (gDebugWindowProc) fflush(stdout);
mLastModifiers = modifiers;
result = eventNotHandledErr;
break;
}
-
+
mRawKeyEvent = NULL;
}
break;
@@ -2462,7 +2464,7 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
case kEventMouseButtonSecondary:
mCallbacks->handleRightMouseDown(this, outCoords, mask);
break;
-
+
case kEventMouseButtonTertiary:
mCallbacks->handleMiddleMouseDown(this, outCoords, mask);
break;
@@ -2524,7 +2526,7 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
case kEventClassWindow:
switch(evtKind)
- {
+ {
case kEventWindowActivated:
if (mTSMDocument)
{
@@ -2539,20 +2541,20 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
}
mCallbacks->handleFocusLost(this);
break;
-
+
case kEventWindowBoundsChanging:
{
// This is where we would constrain move/resize to a particular screen
- const S32 MIN_WIDTH = 1024;
- const S32 MIN_HEIGHT = 768;
-
+ const S32 MIN_WIDTH = mMinWindowWidth;
+ const S32 MIN_HEIGHT = mMinWindowHeight;
+
Rect currentBounds;
Rect previousBounds;
GetEventParameter(event, kEventParamCurrentBounds, typeQDRectangle, NULL, sizeof(Rect), NULL, &currentBounds);
GetEventParameter(event, kEventParamPreviousBounds, typeQDRectangle, NULL, sizeof(Rect), NULL, &previousBounds);
-
+
// Put an offset into window un-maximize operation since the kEventWindowGetIdealSize
// event only allows the specification of size and not position.
if (mMaximized)
@@ -2560,7 +2562,7 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
short leftOffset = mPreviousWindowRect.left - currentBounds.left;
currentBounds.left += leftOffset;
currentBounds.right += leftOffset;
-
+
short topOffset = mPreviousWindowRect.top - currentBounds.top;
currentBounds.top += topOffset;
currentBounds.bottom += topOffset;
@@ -2580,7 +2582,7 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
{
currentBounds.bottom = currentBounds.top + MIN_HEIGHT;
}
-
+
SetEventParameter(event, kEventParamCurrentBounds, typeQDRectangle, sizeof(Rect), &currentBounds);
result = noErr;
}
@@ -2591,38 +2593,38 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
// Get new window bounds
Rect newBounds;
GetEventParameter(event, kEventParamCurrentBounds, typeQDRectangle, NULL, sizeof(Rect), NULL, &newBounds);
-
+
// Get previous window bounds
Rect oldBounds;
GetEventParameter(event, kEventParamPreviousBounds, typeQDRectangle, NULL, sizeof(Rect), NULL, &oldBounds);
-
+
// Determine if the new size is larger than the old
bool newBoundsLarger = ((newBounds.right - newBounds.left) >= (oldBounds.right - oldBounds.left));
newBoundsLarger &= ((newBounds.bottom - newBounds.top) >= (oldBounds.bottom - oldBounds.top));
-
+
// Check to see if this is a zoom event (+ button on window pane)
unsigned int eventParams;
GetEventParameter(event, kEventParamAttributes, typeUInt32, NULL, sizeof(int), NULL, &eventParams);
bool isZoomEvent = ((eventParams & kWindowBoundsChangeZoom) != 0);
-
+
// Maximized flag is if zoom event and increasing window size
mMaximized = (isZoomEvent && newBoundsLarger);
-
+
aglUpdateContext(mContext);
-
+
mCallbacks->handleResize(this, newBounds.right - newBounds.left, newBounds.bottom - newBounds.top);
}
break;
-
+
case kEventWindowGetIdealSize:
// Only recommend a new ideal size when un-maximizing
if (mMaximized == TRUE)
{
Point nonMaximizedSize;
-
+
nonMaximizedSize.v = mPreviousWindowRect.bottom - mPreviousWindowRect.top;
nonMaximizedSize.h = mPreviousWindowRect.right - mPreviousWindowRect.left;
-
+
SetEventParameter(event, kEventParamDimensions, typeQDPoint, sizeof(Point), &nonMaximizedSize);
result = noErr;
}
@@ -2677,7 +2679,7 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
if (mPreeditor)
{
switch(evtKind)
- {
+ {
case kEventTSMDocumentAccessGetLength:
{
@@ -2696,14 +2698,14 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
{
// Return the selected range, excluding preedit.
// In our preeditor, preedit and selection are exclusive, so,
- // when it has a preedit, there is no selection and the
+ // when it has a preedit, there is no selection and the
// insertion point is on the preedit that corrupses into the
// beginning of the preedit when the preedit was removed.
S32 preedit, preedit_length;
mPreeditor->getPreeditRange(&preedit, &preedit_length);
const LLWString & text = mPreeditor->getPreeditString();
-
+
CFRange range;
if (preedit_length)
{
@@ -2767,7 +2769,7 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
memcpy(target_pointer, text_utf16.c_str() + range.location, range.length * sizeof(UniChar));
// Note that result has already been set above.
- }
+ }
}
break;
@@ -2814,14 +2816,14 @@ const char* cursorIDToName(int id)
case UI_CURSOR_TOOLPLAY: return "UI_CURSOR_TOOLPLAY";
case UI_CURSOR_TOOLPAUSE: return "UI_CURSOR_TOOLPAUSE";
case UI_CURSOR_TOOLMEDIAOPEN: return "UI_CURSOR_TOOLMEDIAOPEN";
- case UI_CURSOR_PIPETTE: return "UI_CURSOR_PIPETTE";
+ case UI_CURSOR_PIPETTE: return "UI_CURSOR_PIPETTE";
case UI_CURSOR_TOOLSIT: return "UI_CURSOR_TOOLSIT";
case UI_CURSOR_TOOLBUY: return "UI_CURSOR_TOOLBUY";
case UI_CURSOR_TOOLOPEN: return "UI_CURSOR_TOOLOPEN";
}
llerrs << "cursorIDToName: unknown cursor id" << id << llendl;
-
+
return "UI_CURSOR_ARROW";
}
@@ -2837,42 +2839,42 @@ static void initPixmapCursor(int cursorid, int hotspotX, int hotspotY)
fullpath += gDirUtilp->getDirDelimiter();
fullpath += cursorIDToName(cursorid);
fullpath += ".tif";
-
+
gCursors[cursorid] = createImageCursor(fullpath.c_str(), hotspotX, hotspotY);
}
-void LLWindowMacOSX::setCursor(ECursorType cursor)
+void LLWindowMacOSX::updateCursor()
{
OSStatus result = noErr;
- if (mDragOverrideCursor != -1)
+ if (mDragOverrideCursor != -1)
{
// A drag is in progress...remember the requested cursor and we'll
// restore it when it is done
- mCurrentCursor = cursor;
+ mCurrentCursor = mNextCursor;
return;
}
- if (cursor == UI_CURSOR_ARROW
+ if (mNextCursor == UI_CURSOR_ARROW
&& mBusyCount > 0)
{
- cursor = UI_CURSOR_WORKING;
+ mNextCursor = UI_CURSOR_WORKING;
}
- if(mCurrentCursor == cursor)
+ if(mCurrentCursor == mNextCursor)
return;
// RN: replace multi-drag cursors with single versions
- if (cursor == UI_CURSOR_ARROWDRAGMULTI)
+ if (mNextCursor == UI_CURSOR_ARROWDRAGMULTI)
{
- cursor = UI_CURSOR_ARROWDRAG;
+ mNextCursor = UI_CURSOR_ARROWDRAG;
}
- else if (cursor == UI_CURSOR_ARROWCOPYMULTI)
+ else if (mNextCursor == UI_CURSOR_ARROWCOPYMULTI)
{
- cursor = UI_CURSOR_ARROWCOPY;
+ mNextCursor = UI_CURSOR_ARROWCOPY;
}
- switch(cursor)
+ switch(mNextCursor)
{
default:
case UI_CURSOR_ARROW:
@@ -2923,7 +2925,7 @@ void LLWindowMacOSX::setCursor(ECursorType cursor)
case UI_CURSOR_TOOLSIT:
case UI_CURSOR_TOOLBUY:
case UI_CURSOR_TOOLOPEN:
- result = setImageCursor(gCursors[cursor]);
+ result = setImageCursor(gCursors[mNextCursor]);
break;
}
@@ -2933,7 +2935,7 @@ void LLWindowMacOSX::setCursor(ECursorType cursor)
InitCursor();
}
- mCurrentCursor = cursor;
+ mCurrentCursor = mNextCursor;
}
ECursorType LLWindowMacOSX::getCursor() const
@@ -3268,14 +3270,14 @@ void LLWindowMacOSX::spawnWebBrowser(const std::string& escaped_url, bool async)
LLSD LLWindowMacOSX::getNativeKeyData()
{
LLSD result = LLSD::emptyMap();
-
+
if(mRawKeyEvent)
{
char char_code = 0;
UInt32 key_code = 0;
UInt32 modifiers = 0;
UInt32 keyboard_type = 0;
-
+
GetEventParameter (mRawKeyEvent, kEventParamKeyMacCharCodes, typeChar, NULL, sizeof(char), NULL, &char_code);
GetEventParameter (mRawKeyEvent, kEventParamKeyCode, typeUInt32, NULL, sizeof(UInt32), NULL, &key_code);
GetEventParameter (mRawKeyEvent, kEventParamKeyModifiers, typeUInt32, NULL, sizeof(UInt32), NULL, &modifiers);
@@ -3285,7 +3287,7 @@ LLSD LLWindowMacOSX::getNativeKeyData()
result["key_code"] = (S32)key_code;
result["modifiers"] = (S32)modifiers;
result["keyboard_type"] = (S32)keyboard_type;
-
+
#if 0
// This causes trouble for control characters -- apparently character codes less than 32 (escape, control-A, etc)
// cause llsd serialization to create XML that the llsd deserializer won't parse!
@@ -3294,7 +3296,7 @@ LLSD LLWindowMacOSX::getNativeKeyData()
EventParamType actualType = typeUTF8Text;
UInt32 actualSize = 0;
char *buffer = NULL;
-
+
err = GetEventParameter (mRawKeyEvent, kEventParamKeyUnicodes, typeUTF8Text, &actualType, 0, &actualSize, NULL);
if(err == noErr)
{
@@ -3307,7 +3309,7 @@ LLSD LLWindowMacOSX::getNativeKeyData()
}
delete[] buffer;
}
-
+
result["unicode"] = unicode;
#endif
@@ -3315,7 +3317,7 @@ LLSD LLWindowMacOSX::getNativeKeyData()
lldebugs << "native key data is: " << result << llendl;
-
+
return result;
}
@@ -3362,17 +3364,17 @@ void *LLWindowMacOSX::getPlatformWindow()
void *LLWindowMacOSX::getMediaWindow()
{
- /*
- Mozilla needs to be initialized with a WindowRef to function properly.
+ /*
+ Mozilla needs to be initialized with a WindowRef to function properly.
(There's no good reason for this, since it shouldn't be interacting with our window in any way, but that's another issue.)
- If we're in windowed mode, we _could_ hand it our actual window pointer, but a subsequent switch to fullscreen will destroy that window,
+ If we're in windowed mode, we _could_ hand it our actual window pointer, but a subsequent switch to fullscreen will destroy that window,
which trips up Mozilla.
Instead of using our actual window, we create an invisible window which will persist for the lifetime of the application and pass that to Mozilla.
This satisfies its deep-seated need to latch onto a WindowRef and solves the issue with switching between fullscreen and windowed modes.
Note that we will never destroy this window (by design!), but since only one will ever be created per run of the application, that's okay.
*/
-
+
if(sMediaWindow == NULL)
{
Rect window_rect = {100, 100, 200, 200};
@@ -3381,13 +3383,13 @@ void *LLWindowMacOSX::getMediaWindow()
NULL,
&window_rect,
(ConstStr255Param) "\p",
- false, // Create the window invisible.
+ false, // Create the window invisible.
zoomDocProc, // Window with a grow box and a zoom box
kLastWindowOfClass, // create it behind other windows
false, // no close box
0);
}
-
+
return (void*)sMediaWindow;
}
@@ -3437,7 +3439,7 @@ void LLWindowMacOSX::allowLanguageTextInput(LLPreeditor *preeditor, BOOL b)
}
UseInputWindow(mTSMDocument, !b);
-
+
// Take care of old and new preeditors.
if (preeditor != mPreeditor || !b)
{
@@ -3456,7 +3458,7 @@ void LLWindowMacOSX::allowLanguageTextInput(LLPreeditor *preeditor, BOOL b)
return;
}
mLanguageTextInputAllowed = b;
-
+
if (b)
{
if (mTSMScriptCode != smRoman)
@@ -3505,7 +3507,7 @@ MASK LLWindowMacOSX::modifiersToMask(SInt16 modifiers)
if(modifiers & (cmdKey | controlKey)) { mask |= MASK_CONTROL; }
if(modifiers & optionKey) { mask |= MASK_ALT; }
return mask;
-}
+}
#if LL_OS_DRAGDROP_ENABLED
@@ -3516,53 +3518,53 @@ OSErr LLWindowMacOSX::dragTrackingHandler(DragTrackingMessage message, WindowRef
LLWindowMacOSX *self = (LLWindowMacOSX*)handlerRefCon;
lldebugs << "drag tracking handler, message = " << message << llendl;
-
+
switch(message)
{
case kDragTrackingInWindow:
result = self->handleDragNDrop(drag, LLWindowCallbacks::DNDA_TRACK);
break;
-
+
case kDragTrackingEnterHandler:
result = self->handleDragNDrop(drag, LLWindowCallbacks::DNDA_START_TRACKING);
break;
-
+
case kDragTrackingLeaveHandler:
result = self->handleDragNDrop(drag, LLWindowCallbacks::DNDA_STOP_TRACKING);
break;
-
+
default:
break;
}
-
+
return result;
}
-OSErr LLWindowMacOSX::dragReceiveHandler(WindowRef theWindow, void * handlerRefCon,
+OSErr LLWindowMacOSX::dragReceiveHandler(WindowRef theWindow, void * handlerRefCon,
DragRef drag)
-{
+{
LLWindowMacOSX *self = (LLWindowMacOSX*)handlerRefCon;
return self->handleDragNDrop(drag, LLWindowCallbacks::DNDA_DROPPED);
}
OSErr LLWindowMacOSX::handleDragNDrop(DragRef drag, LLWindowCallbacks::DragNDropAction action)
-{
+{
OSErr result = dragNotAcceptedErr; // overall function result
OSErr err = noErr; // for local error handling
-
+
// Get the mouse position and modifiers of this drag.
SInt16 modifiers, mouseDownModifiers, mouseUpModifiers;
::GetDragModifiers(drag, &modifiers, &mouseDownModifiers, &mouseUpModifiers);
MASK mask = LLWindowMacOSX::modifiersToMask(modifiers);
-
+
Point mouse_point;
// This will return the mouse point in global screen coords
::GetDragMouse(drag, &mouse_point, NULL);
LLCoordScreen screen_coords(mouse_point.h, mouse_point.v);
LLCoordGL gl_pos;
convertCoords(screen_coords, &gl_pos);
-
+
// Look at the pasteboard and try to extract an URL from it
PasteboardRef pasteboard;
if(GetDragPasteboard(drag, &pasteboard) == noErr)
@@ -3570,22 +3572,22 @@ OSErr LLWindowMacOSX::handleDragNDrop(DragRef drag, LLWindowCallbacks::DragNDrop
ItemCount num_items = 0;
// Treat an error here as an item count of 0
(void)PasteboardGetItemCount(pasteboard, &num_items);
-
+
// Only deal with single-item drags.
if(num_items == 1)
{
PasteboardItemID item_id = NULL;
CFArrayRef flavors = NULL;
CFDataRef data = NULL;
-
+
err = PasteboardGetItemIdentifier(pasteboard, 1, &item_id); // Yes, this really is 1-based.
-
+
// Try to extract an URL from the pasteboard
if(err == noErr)
{
err = PasteboardCopyItemFlavors( pasteboard, item_id, &flavors);
}
-
+
if(err == noErr)
{
if(CFArrayContainsValue(flavors, CFRangeMake(0, CFArrayGetCount(flavors)), kUTTypeURL))
@@ -3598,9 +3600,9 @@ OSErr LLWindowMacOSX::handleDragNDrop(DragRef drag, LLWindowCallbacks::DragNDrop
// This is a string that might be an URL.
err = PasteboardCopyItemFlavorData(pasteboard, item_id, kUTTypeUTF8PlainText, &data);
}
-
+
}
-
+
if(flavors != NULL)
{
CFRelease(flavors);
@@ -3611,12 +3613,12 @@ OSErr LLWindowMacOSX::handleDragNDrop(DragRef drag, LLWindowCallbacks::DragNDrop
std::string url;
url.assign((char*)CFDataGetBytePtr(data), CFDataGetLength(data));
CFRelease(data);
-
+
if(!url.empty())
{
- LLWindowCallbacks::DragNDropResult res =
+ LLWindowCallbacks::DragNDropResult res =
mCallbacks->handleDragNDrop(this, gl_pos, mask, action, url);
-
+
switch (res) {
case LLWindowCallbacks::DND_NONE: // No drop allowed
if (action == LLWindowCallbacks::DNDA_TRACK)
@@ -3651,7 +3653,7 @@ OSErr LLWindowMacOSX::handleDragNDrop(DragRef drag, LLWindowCallbacks::DragNDrop
// Restore the cursor
ECursorType temp_cursor = mCurrentCursor;
// get around the "setting the same cursor" code in setCursor()
- mCurrentCursor = UI_CURSOR_COUNT;
+ mCurrentCursor = UI_CURSOR_COUNT;
setCursor(temp_cursor);
}
else {
@@ -3663,7 +3665,7 @@ OSErr LLWindowMacOSX::handleDragNDrop(DragRef drag, LLWindowCallbacks::DragNDrop
}
}
}
-
+
return result;
}
diff --git a/indra/llwindow/llwindowmacosx.h b/indra/llwindow/llwindowmacosx.h
index 6c9e075a21..073f294b54 100644
--- a/indra/llwindow/llwindowmacosx.h
+++ b/indra/llwindow/llwindowmacosx.h
@@ -58,7 +58,7 @@ public:
/*virtual*/ BOOL getSize(LLCoordScreen *size);
/*virtual*/ BOOL getSize(LLCoordWindow *size);
/*virtual*/ BOOL setPosition(LLCoordScreen position);
- /*virtual*/ BOOL setSize(LLCoordScreen size);
+ /*virtual*/ BOOL setSizeImpl(LLCoordScreen size);
/*virtual*/ BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL disable_vsync, const LLCoordScreen * const posp = NULL);
/*virtual*/ BOOL setCursorPosition(LLCoordWindow position);
/*virtual*/ BOOL getCursorPosition(LLCoordWindow *position);
@@ -67,7 +67,7 @@ public:
/*virtual*/ void showCursorFromMouseMove();
/*virtual*/ void hideCursorUntilMouseMove();
/*virtual*/ BOOL isCursorHidden();
- /*virtual*/ void setCursor(ECursorType cursor);
+ /*virtual*/ void updateCursor();
/*virtual*/ ECursorType getCursor() const;
/*virtual*/ void captureMouse();
/*virtual*/ void releaseMouse();
diff --git a/indra/llwindow/llwindowmesaheadless.h b/indra/llwindow/llwindowmesaheadless.h
index fd4bd635e2..8f70aee4f6 100644
--- a/indra/llwindow/llwindowmesaheadless.h
+++ b/indra/llwindow/llwindowmesaheadless.h
@@ -50,7 +50,7 @@ public:
/*virtual*/ BOOL getSize(LLCoordScreen *size) {return FALSE;};
/*virtual*/ BOOL getSize(LLCoordWindow *size) {return FALSE;};
/*virtual*/ BOOL setPosition(LLCoordScreen position) {return FALSE;};
- /*virtual*/ BOOL setSize(LLCoordScreen size) {return FALSE;};
+ /*virtual*/ BOOL setSizeImpl(LLCoordScreen size) {return FALSE;};
/*virtual*/ BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL disable_vsync, const LLCoordScreen * const posp = NULL) {return FALSE;};
/*virtual*/ BOOL setCursorPosition(LLCoordWindow position) {return FALSE;};
/*virtual*/ BOOL getCursorPosition(LLCoordWindow *position) {return FALSE;};
@@ -59,7 +59,7 @@ public:
/*virtual*/ void showCursorFromMouseMove() {};
/*virtual*/ void hideCursorUntilMouseMove() {};
/*virtual*/ BOOL isCursorHidden() {return FALSE;};
- /*virtual*/ void setCursor(ECursorType cursor) {};
+ /*virtual*/ void updateCursor() {};
//virtual ECursorType getCursor() { return mCurrentCursor; };
/*virtual*/ void captureMouse() {};
/*virtual*/ void releaseMouse() {};
diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp
index 8acb52516a..5f5baceef8 100644
--- a/indra/llwindow/llwindowsdl.cpp
+++ b/indra/llwindow/llwindowsdl.cpp
@@ -63,9 +63,6 @@ extern BOOL gDebugWindowProc;
const S32 MAX_NUM_RESOLUTIONS = 200;
-const S32 MIN_WINDOW_WIDTH = 1024;
-const S32 MIN_WINDOW_HEIGHT = 768;
-
// static variable for ATI mouse cursor crash work-around:
static bool ATIbug = false;
@@ -966,7 +963,7 @@ BOOL LLWindowSDL::setPosition(const LLCoordScreen position)
return TRUE;
}
-BOOL LLWindowSDL::setSize(const LLCoordScreen size)
+BOOL LLWindowSDL::setSizeImpl(const LLCoordScreen size)
{
if(mWindow)
{
@@ -1036,6 +1033,25 @@ void LLWindowSDL::setMouseClipping( BOOL b )
//SDL_WM_GrabInput(b ? SDL_GRAB_ON : SDL_GRAB_OFF);
}
+// virtual
+void LLWindowSDL::setMinSize(U32 min_width, U32 min_height, bool enforce_immediately)
+{
+ LLWindow::setMinSize(min_width, min_height, enforce_immediately);
+
+#if LL_X11
+ // Set the minimum size limits for X11 window
+ // so the window manager doesn't allow resizing below those limits.
+ XSizeHints* hints = XAllocSizeHints();
+ hints->flags |= PMinSize;
+ hints->min_width = mMinWindowWidth;
+ hints->min_height = mMinWindowHeight;
+
+ XSetWMNormalHints(mSDL_Display, mSDL_XWindowID, hints);
+
+ XFree(hints);
+#endif
+}
+
BOOL LLWindowSDL::setCursorPosition(const LLCoordWindow position)
{
BOOL result = TRUE;
@@ -1849,8 +1865,8 @@ void LLWindowSDL::gatherInput()
llinfos << "Handling a resize event: " << event.resize.w <<
"x" << event.resize.h << llendl;
- S32 width = llmax(event.resize.w, MIN_WINDOW_WIDTH);
- S32 height = llmax(event.resize.h, MIN_WINDOW_HEIGHT);
+ S32 width = llmax(event.resize.w, (S32)mMinWindowWidth);
+ S32 height = llmax(event.resize.h, (S32)mMinWindowHeight);
// *FIX: I'm not sure this is necessary!
mWindow = SDL_SetVideoMode(width, height, 32, mSDLFlags);
@@ -1866,7 +1882,7 @@ void LLWindowSDL::gatherInput()
}
break;
}
-
+
mCallbacks->handleResize(this, width, height);
break;
}
@@ -1920,6 +1936,8 @@ void LLWindowSDL::gatherInput()
break;
}
}
+
+ updateCursor();
#if LL_X11
// This is a good time to stop flashing the icon if our mFlashTimer has
@@ -2006,7 +2024,7 @@ static SDL_Cursor *makeSDLCursorFromBMP(const char *filename, int hotx, int hoty
return sdlcursor;
}
-void LLWindowSDL::setCursor(ECursorType cursor)
+void LLWindowSDL::updateCursor()
{
if (ATIbug) {
// cursor-updating is very flaky when this bug is
@@ -2014,11 +2032,11 @@ void LLWindowSDL::setCursor(ECursorType cursor)
return;
}
- if (mCurrentCursor != cursor)
+ if (mCurrentCursor != mNextCursor)
{
- if (cursor < UI_CURSOR_COUNT)
+ if (mNextCursor < UI_CURSOR_COUNT)
{
- SDL_Cursor *sdlcursor = mSDLCursors[cursor];
+ SDL_Cursor *sdlcursor = mSDLCursors[mNextCursor];
// Try to default to the arrow for any cursors that
// did not load correctly.
if (!sdlcursor && mSDLCursors[UI_CURSOR_ARROW])
@@ -2026,9 +2044,9 @@ void LLWindowSDL::setCursor(ECursorType cursor)
if (sdlcursor)
SDL_SetCursor(sdlcursor);
} else {
- llwarns << "Tried to set invalid cursor number " << cursor << llendl;
+ llwarns << "Tried to set invalid cursor number " << mNextCursor << llendl;
}
- mCurrentCursor = cursor;
+ mCurrentCursor = mNextCursor;
}
}
diff --git a/indra/llwindow/llwindowsdl.h b/indra/llwindow/llwindowsdl.h
index fa544b16ce..59719e4046 100644
--- a/indra/llwindow/llwindowsdl.h
+++ b/indra/llwindow/llwindowsdl.h
@@ -63,7 +63,7 @@ public:
/*virtual*/ BOOL getSize(LLCoordScreen *size);
/*virtual*/ BOOL getSize(LLCoordWindow *size);
/*virtual*/ BOOL setPosition(LLCoordScreen position);
- /*virtual*/ BOOL setSize(LLCoordScreen size);
+ /*virtual*/ BOOL setSizeImpl(LLCoordScreen size);
/*virtual*/ BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL disable_vsync, const LLCoordScreen * const posp = NULL);
/*virtual*/ BOOL setCursorPosition(LLCoordWindow position);
/*virtual*/ BOOL getCursorPosition(LLCoordWindow *position);
@@ -72,10 +72,11 @@ public:
/*virtual*/ void showCursorFromMouseMove();
/*virtual*/ void hideCursorUntilMouseMove();
/*virtual*/ BOOL isCursorHidden();
- /*virtual*/ void setCursor(ECursorType cursor);
+ /*virtual*/ void updateCursor();
/*virtual*/ void captureMouse();
/*virtual*/ void releaseMouse();
/*virtual*/ void setMouseClipping( BOOL b );
+ /*virtual*/ void setMinSize(U32 min_width, U32 min_height, bool enforce_immediately = true);
/*virtual*/ BOOL isClipboardTextAvailable();
/*virtual*/ BOOL pasteTextFromClipboard(LLWString &dst);
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 799f0a3fab..52c27b6736 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -862,7 +862,7 @@ BOOL LLWindowWin32::setPosition(const LLCoordScreen position)
return TRUE;
}
-BOOL LLWindowWin32::setSize(const LLCoordScreen size)
+BOOL LLWindowWin32::setSizeImpl(const LLCoordScreen size)
{
LLCoordScreen position;
@@ -1667,18 +1667,18 @@ void LLWindowWin32::initCursors()
-void LLWindowWin32::setCursor(ECursorType cursor)
+void LLWindowWin32::updateCursor()
{
- if (cursor == UI_CURSOR_ARROW
+ if (mNextCursor == UI_CURSOR_ARROW
&& mBusyCount > 0)
{
- cursor = UI_CURSOR_WORKING;
+ mNextCursor = UI_CURSOR_WORKING;
}
- if( mCurrentCursor != cursor )
+ if( mCurrentCursor != mNextCursor )
{
- mCurrentCursor = cursor;
- SetCursor( mCursor[cursor] );
+ mCurrentCursor = mNextCursor;
+ SetCursor( mCursor[mNextCursor] );
}
}
@@ -1760,6 +1760,8 @@ void LLWindowWin32::gatherInput()
mInputProcessingPaused = FALSE;
+ updateCursor();
+
// clear this once we've processed all mouse messages that might have occurred after
// we slammed the mouse position
mMousePositionModified = FALSE;
@@ -2410,8 +2412,8 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
case WM_GETMINMAXINFO:
{
LPMINMAXINFO min_max = (LPMINMAXINFO)l_param;
- min_max->ptMinTrackSize.x = 1024;
- min_max->ptMinTrackSize.y = 768;
+ min_max->ptMinTrackSize.x = window_imp->mMinWindowWidth;
+ min_max->ptMinTrackSize.y = window_imp->mMinWindowHeight;
return 0;
}
diff --git a/indra/llwindow/llwindowwin32.h b/indra/llwindow/llwindowwin32.h
index 387e4cbdb6..b3602be8b7 100644
--- a/indra/llwindow/llwindowwin32.h
+++ b/indra/llwindow/llwindowwin32.h
@@ -57,7 +57,7 @@ public:
/*virtual*/ BOOL getSize(LLCoordScreen *size);
/*virtual*/ BOOL getSize(LLCoordWindow *size);
/*virtual*/ BOOL setPosition(LLCoordScreen position);
- /*virtual*/ BOOL setSize(LLCoordScreen size);
+ /*virtual*/ BOOL setSizeImpl(LLCoordScreen size);
/*virtual*/ BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL disable_vsync, const LLCoordScreen * const posp = NULL);
/*virtual*/ BOOL setCursorPosition(LLCoordWindow position);
/*virtual*/ BOOL getCursorPosition(LLCoordWindow *position);
@@ -66,7 +66,7 @@ public:
/*virtual*/ void showCursorFromMouseMove();
/*virtual*/ void hideCursorUntilMouseMove();
/*virtual*/ BOOL isCursorHidden();
- /*virtual*/ void setCursor(ECursorType cursor);
+ /*virtual*/ void updateCursor();
/*virtual*/ ECursorType getCursor() const;
/*virtual*/ void captureMouse();
/*virtual*/ void releaseMouse();
diff --git a/indra/llxml/llxmlnode.cpp b/indra/llxml/llxmlnode.cpp
index 9f1e249ddd..2b4a0fc2a1 100644
--- a/indra/llxml/llxmlnode.cpp
+++ b/indra/llxml/llxmlnode.cpp
@@ -693,7 +693,7 @@ bool LLXMLNode::parseFile(const std::string& filename, LLXMLNodePtr& node, LLXML
LLFILE* fp = LLFile::fopen(filename, "rb"); /* Flawfinder: ignore */
if (fp == NULL)
{
- node = new LLXMLNode();
+ node = NULL ;
return false;
}
fseek(fp, 0, SEEK_END);
@@ -746,7 +746,7 @@ bool LLXMLNode::parseBuffer(
{
llwarns << "Parse failure - wrong number of top-level nodes xml."
<< llendl;
- node = new LLXMLNode();
+ node = NULL ;
return false;
}
@@ -805,7 +805,7 @@ bool LLXMLNode::parseStream(
{
llwarns << "Parse failure - wrong number of top-level nodes xml."
<< llendl;
- node = new LLXMLNode();
+ node = NULL;
return false;
}
@@ -1206,7 +1206,7 @@ bool LLXMLNode::getChild(const LLStringTableEntry* name, LLXMLNodePtr& node, BOO
{
return mDefault->getChild(name, node, FALSE);
}
- node = new LLXMLNode();
+ node = NULL;
return false;
}
@@ -1277,7 +1277,7 @@ bool LLXMLNode::getAttribute(const LLStringTableEntry* name, LLXMLNodePtr& node,
{
return mDefault->getAttribute(name, node, FALSE);
}
- node = new LLXMLNode();
+
return false;
}
diff --git a/indra/llxuixml/llinitparam.cpp b/indra/llxuixml/llinitparam.cpp
index 482064ed7b..db72aa19b9 100644
--- a/indra/llxuixml/llinitparam.cpp
+++ b/indra/llxuixml/llinitparam.cpp
@@ -40,7 +40,7 @@ namespace LLInitParam
{
const U8* my_addr = reinterpret_cast<const U8*>(this);
const U8* block_addr = reinterpret_cast<const U8*>(enclosing_block);
- mEnclosingBlockOffset = 0x7FFFffff & ((U32)(my_addr - block_addr));
+ mEnclosingBlockOffset = 0x7FFFffff & (U32)(my_addr - block_addr);
}
//
@@ -118,16 +118,6 @@ namespace LLInitParam
mCurrentBlockPtr(NULL)
{}
- //
- // BaseBlock
- //
- BaseBlock::BaseBlock()
- : mChangeVersion(0)
- {}
-
- BaseBlock::~BaseBlock()
- {}
-
// called by each derived class in least to most derived order
void BaseBlock::init(BlockDescriptor& descriptor, BlockDescriptor& base_descriptor, size_t block_size)
{
@@ -427,14 +417,6 @@ namespace LLInitParam
}
}
- void BaseBlock::paramChanged(const Param& changed_param, bool user_provided)
- {
- if (user_provided)
- {
- mChangeVersion++;
- }
- }
-
const std::string& BaseBlock::getParamName(const BlockDescriptor& block_data, const Param* paramp) const
{
param_handle_t handle = getHandleFromParam(paramp);
@@ -478,6 +460,7 @@ namespace LLInitParam
if (merge_func)
{
Param* paramp = getParamFromHandle((*it)->mParamHandle);
+ llassert(paramp->mEnclosingBlockOffset == (*it)->mParamHandle);
some_param_changed |= merge_func(*paramp, *other_paramp, overwrite);
}
}
diff --git a/indra/llxuixml/llinitparam.h b/indra/llxuixml/llinitparam.h
index 183472450d..ab20957760 100644
--- a/indra/llxuixml/llinitparam.h
+++ b/indra/llxuixml/llinitparam.h
@@ -51,7 +51,7 @@ namespace LLInitParam
return a == b;
}
};
-
+
// boost function types are not comparable
template<typename T>
struct ParamCompare<T, true>
@@ -74,6 +74,7 @@ namespace LLInitParam
static bool equals(const Flag& a, const Flag& b) { return false; }
};
+
// helper functions and classes
typedef ptrdiff_t param_handle_t;
@@ -82,8 +83,11 @@ namespace LLInitParam
template <typename T>
class TypeValues
{
+ private:
+ struct Inaccessable{};
public:
typedef std::map<std::string, T> value_name_map_t;
+ typedef Inaccessable name_t;
void setValueName(const std::string& key) {}
std::string getValueName() const { return ""; }
@@ -113,6 +117,7 @@ namespace LLInitParam
{
public:
typedef typename std::map<std::string, T> value_name_map_t;
+ typedef std::string name_t;
//TODO: cache key by index to save on param block size
void setValueName(const std::string& value_name)
@@ -293,36 +298,7 @@ namespace LLInitParam
parser_inspect_func_map_t* mParserInspectFuncs;
};
- class BaseBlock;
-
- class Param
- {
- public:
- // public to allow choice blocks to clear provided flag on stale choices
- void setProvided(bool is_provided) { mIsProvided = is_provided; }
-
- protected:
- bool anyProvided() const { return mIsProvided; }
-
- Param(BaseBlock* enclosing_block);
-
- // store pointer to enclosing block as offset to reduce space and allow for quick copying
- BaseBlock& enclosingBlock() const
- {
- const U8* my_addr = reinterpret_cast<const U8*>(this);
- // get address of enclosing BLOCK class using stored offset to enclosing BaseBlock class
- return *const_cast<BaseBlock*>
- (reinterpret_cast<const BaseBlock*>
- (my_addr - (ptrdiff_t)(S32)mEnclosingBlockOffset));
- }
-
- private:
- friend class BaseBlock;
-
- U32 mEnclosingBlockOffset:31;
- U32 mIsProvided:1;
-
- };
+ class Param;
// various callbacks and constraints associated with an individual param
struct ParamDescriptor
@@ -390,12 +366,91 @@ namespace LLInitParam
all_params_list_t mAllParams; // all parameters, owns descriptors
size_t mMaxParamOffset;
EInitializationState mInitializationState; // whether or not static block data has been initialized
- BaseBlock* mCurrentBlockPtr; // pointer to block currently being constructed
+ class BaseBlock* mCurrentBlockPtr; // pointer to block currently being constructed
};
class BaseBlock
{
public:
+ //TODO: implement in terms of owned_ptr
+ template<typename T>
+ class Lazy
+ {
+ public:
+ Lazy()
+ : mPtr(NULL)
+ {}
+
+ ~Lazy()
+ {
+ delete mPtr;
+ }
+
+ Lazy(const Lazy& other)
+ {
+ if (other.mPtr)
+ {
+ mPtr = new T(*other.mPtr);
+ }
+ else
+ {
+ mPtr = NULL;
+ }
+ }
+
+ Lazy<T>& operator = (const Lazy<T>& other)
+ {
+ if (other.mPtr)
+ {
+ mPtr = new T(*other.mPtr);
+ }
+ else
+ {
+ mPtr = NULL;
+ }
+ return *this;
+ }
+
+ bool empty() const
+ {
+ return mPtr == NULL;
+ }
+
+ void set(const T& other)
+ {
+ delete mPtr;
+ mPtr = new T(other);
+ }
+
+ const T& get() const
+ {
+ return ensureInstance();
+ }
+
+ T& get()
+ {
+ return ensureInstance();
+ }
+
+ private:
+ // lazily allocate an instance of T
+ T* ensureInstance() const
+ {
+ if (mPtr == NULL)
+ {
+ mPtr = new T();
+ }
+ return mPtr;
+ }
+
+ private:
+ // if you get a compilation error with this, that means you are using a forward declared struct for T
+ // unfortunately, the type traits we rely on don't work with forward declared typed
+ //static const int dummy = sizeof(T);
+
+ mutable T* mPtr;
+ };
+
// "Multiple" constraint types, put here in root class to avoid ambiguity during use
struct AnyAmount
{
@@ -436,8 +491,7 @@ namespace LLInitParam
LOG_CLASS(BaseBlock);
friend class Param;
- BaseBlock();
- virtual ~BaseBlock();
+ virtual ~BaseBlock() {}
bool submitValue(Parser::name_stack_t& name_stack, Parser& p, bool silent=false);
param_handle_t getHandleFromParam(const Param* param) const;
@@ -460,9 +514,7 @@ namespace LLInitParam
void addSynonym(Param& param, const std::string& synonym);
// Blocks can override this to do custom tracking of changes
- virtual void paramChanged(const Param& changed_param, bool user_provided);
-
- S32 getLastChangeVersion() const { return mChangeVersion; }
+ virtual void paramChanged(const Param& changed_param, bool user_provided) {}
bool deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack_range, bool new_name);
void serializeBlock(Parser& p, Parser::name_stack_t& name_stack, const BaseBlock* diff_block = NULL) const;
@@ -498,9 +550,6 @@ namespace LLInitParam
// take all provided params from other and apply to self
bool mergeBlock(BlockDescriptor& block_data, const BaseBlock& other, bool overwrite);
- // can be updated in getters
- mutable S32 mChangeVersion;
-
static BlockDescriptor& selfBlockDescriptor()
{
static BlockDescriptor sBlockDescriptor;
@@ -511,18 +560,73 @@ namespace LLInitParam
const std::string& getParamName(const BlockDescriptor& block_data, const Param* paramp) const;
};
+ template<typename T>
+ struct ParamCompare<BaseBlock::Lazy<T>, false >
+ {
+ static bool equals(const BaseBlock::Lazy<T>& a, const BaseBlock::Lazy<T>& b) { return !a.empty() || !b.empty(); }
+ };
+
+ class Param
+ {
+ public:
+ void setProvided(bool is_provided = true)
+ {
+ mIsProvided = is_provided;
+ enclosingBlock().paramChanged(*this, is_provided);
+ }
+
+ Param& operator =(const Param& other)
+ {
+ mIsProvided = other.mIsProvided;
+ // don't change mEnclosingblockoffset
+ return *this;
+ }
+ protected:
+
+ bool anyProvided() const { return mIsProvided; }
+
+ Param(BaseBlock* enclosing_block);
+
+ // store pointer to enclosing block as offset to reduce space and allow for quick copying
+ BaseBlock& enclosingBlock() const
+ {
+ const U8* my_addr = reinterpret_cast<const U8*>(this);
+ // get address of enclosing BLOCK class using stored offset to enclosing BaseBlock class
+ return *const_cast<BaseBlock*>
+ (reinterpret_cast<const BaseBlock*>
+ (my_addr - (ptrdiff_t)(S32)mEnclosingBlockOffset));
+ }
+
+ private:
+ friend class BaseBlock;
+
+ U32 mEnclosingBlockOffset:31;
+ U32 mIsProvided:1;
+
+ };
+
// these templates allow us to distinguish between template parameters
// that derive from BaseBlock and those that don't
template<typename T, typename Void = void>
struct IsBlock
{
static const bool value = false;
+ struct EmptyBase {};
+ typedef EmptyBase base_class_t;
};
template<typename T>
struct IsBlock<T, typename T::baseblock_base_class_t>
{
static const bool value = true;
+ typedef BaseBlock base_class_t;
+ };
+
+ template<typename T>
+ struct IsBlock<BaseBlock::Lazy<T>, typename T::baseblock_base_class_t >
+ {
+ static const bool value = true;
+ typedef BaseBlock base_class_t;
};
template<typename T, typename NAME_VALUE_LOOKUP, bool VALUE_IS_BLOCK = IsBlock<T>::value>
@@ -530,6 +634,8 @@ namespace LLInitParam
{
public:
typedef const T& value_assignment_t;
+ typedef T value_t;
+ typedef ParamValue<T, NAME_VALUE_LOOKUP, VALUE_IS_BLOCK> self_t;
ParamValue(): mValue() {}
ParamValue(value_assignment_t other) : mValue(other) {}
@@ -559,8 +665,22 @@ namespace LLInitParam
return mValue;
}
+ void operator ()(const typename NAME_VALUE_LOOKUP::name_t& name)
+ {
+ *this = name;
+ }
- private:
+ self_t& operator =(const typename NAME_VALUE_LOOKUP::name_t& name)
+ {
+ if (NAME_VALUE_LOOKUP::getValueFromName(name, mValue))
+ {
+ setValueName(name);
+ }
+
+ return *this;
+ }
+
+ protected:
T mValue;
};
@@ -571,18 +691,16 @@ namespace LLInitParam
{
public:
typedef const T& value_assignment_t;
+ typedef T value_t;
+ typedef ParamValue<T, NAME_VALUE_LOOKUP, true> self_t;
ParamValue()
: T(),
- mKeyVersion(0),
- mValidatedVersion(-1),
mValidated(false)
{}
ParamValue(value_assignment_t other)
: T(other),
- mKeyVersion(0),
- mValidatedVersion(-1),
mValidated(false)
{}
@@ -611,13 +729,74 @@ namespace LLInitParam
return *this;
}
- S32 mKeyVersion;
+ void operator ()(const typename NAME_VALUE_LOOKUP::name_t& name)
+ {
+ *this = name;
+ }
+
+ self_t& operator =(const typename NAME_VALUE_LOOKUP::name_t& name)
+ {
+ if (NAME_VALUE_LOOKUP::getValueFromName(name, *this))
+ {
+ setValueName(name);
+ }
+
+ return *this;
+ }
protected:
- mutable S32 mValidatedVersion;
mutable bool mValidated; // lazy validation flag
};
+ template<typename NAME_VALUE_LOOKUP>
+ class ParamValue<std::string, NAME_VALUE_LOOKUP, false>
+ : public NAME_VALUE_LOOKUP
+ {
+ public:
+ typedef const std::string& value_assignment_t;
+ typedef std::string value_t;
+ typedef ParamValue<std::string, NAME_VALUE_LOOKUP, false> self_t;
+
+ ParamValue(): mValue() {}
+ ParamValue(value_assignment_t other) : mValue(other) {}
+
+ void setValue(value_assignment_t val)
+ {
+ if (NAME_VALUE_LOOKUP::getValueFromName(val, mValue))
+ {
+ NAME_VALUE_LOOKUP::setValueName(val);
+ }
+ else
+ {
+ mValue = val;
+ }
+ }
+
+ value_assignment_t getValue() const
+ {
+ return mValue;
+ }
+
+ std::string& getValue()
+ {
+ return mValue;
+ }
+
+ operator value_assignment_t() const
+ {
+ return mValue;
+ }
+
+ value_assignment_t operator()() const
+ {
+ return mValue;
+ }
+
+ protected:
+ std::string mValue;
+ };
+
+
template<typename T, typename NAME_VALUE_LOOKUP = TypeValues<T> >
struct ParamIterator
{
@@ -636,10 +815,12 @@ namespace LLInitParam
public ParamValue<T, NAME_VALUE_LOOKUP>
{
public:
- typedef const T& value_assignment_t;
typedef TypedParam<T, NAME_VALUE_LOOKUP, HAS_MULTIPLE_VALUES, VALUE_IS_BLOCK> self_t;
- typedef NAME_VALUE_LOOKUP name_value_lookup_t;
typedef ParamValue<T, NAME_VALUE_LOOKUP> param_value_t;
+ typedef typename param_value_t::value_assignment_t value_assignment_t;
+ typedef NAME_VALUE_LOOKUP name_value_lookup_t;
+
+ using param_value_t::operator();
TypedParam(BlockDescriptor& block_descriptor, const char* name, value_assignment_t value, ParamDescriptor::validation_func_t validate_func, S32 min_count, S32 max_count)
: Param(block_descriptor.mCurrentBlockPtr)
@@ -671,8 +852,7 @@ namespace LLInitParam
if (parser.readValue(typed_param.getValue()))
{
typed_param.clearValueName();
- typed_param.setProvided(true);
- typed_param.enclosingBlock().paramChanged(param, true);
+ typed_param.setProvided();
return true;
}
@@ -687,8 +867,7 @@ namespace LLInitParam
if (name_value_lookup_t::getValueFromName(name, typed_param.getValue()))
{
typed_param.setValueName(name);
- typed_param.setProvided(true);
- typed_param.enclosingBlock().paramChanged(param, true);
+ typed_param.setProvided();
return true;
}
@@ -746,14 +925,25 @@ namespace LLInitParam
void set(value_assignment_t val, bool flag_as_provided = true)
{
- setValue(val);
param_value_t::clearValueName();
+ setValue(val);
setProvided(flag_as_provided);
- Param::enclosingBlock().paramChanged(*this, flag_as_provided);
+ }
+
+ self_t& operator =(const typename NAME_VALUE_LOOKUP::name_t& name)
+ {
+ return static_cast<self_t&>(param_value_t::operator =(name));
}
protected:
+ self_t& operator =(const self_t& other)
+ {
+ param_value_t::operator =(other);
+ Param::operator =(other);
+ return *this;
+ }
+
static bool mergeWith(Param& dst, const Param& src, bool overwrite)
{
const self_t& src_typed_param = static_cast<const self_t&>(src);
@@ -776,12 +966,12 @@ namespace LLInitParam
public ParamValue<T, NAME_VALUE_LOOKUP>
{
public:
- typedef const T value_const_t;
- typedef T value_t;
- typedef value_const_t& value_assignment_t;
+ typedef ParamValue<T, NAME_VALUE_LOOKUP> param_value_t;
+ typedef typename param_value_t::value_assignment_t value_assignment_t;
typedef TypedParam<T, NAME_VALUE_LOOKUP, false, true> self_t;
typedef NAME_VALUE_LOOKUP name_value_lookup_t;
- typedef ParamValue<T, NAME_VALUE_LOOKUP> param_value_t;
+
+ using param_value_t::operator();
TypedParam(BlockDescriptor& block_descriptor, const char* name, value_assignment_t value, ParamDescriptor::validation_func_t validate_func, S32 min_count, S32 max_count)
: Param(block_descriptor.mCurrentBlockPtr),
@@ -808,8 +998,7 @@ namespace LLInitParam
if(typed_param.deserializeBlock(parser, name_stack_range, new_name))
{
typed_param.clearValueName();
- typed_param.enclosingBlock().paramChanged(param, true);
- typed_param.setProvided(true);
+ typed_param.setProvided();
return true;
}
@@ -822,10 +1011,8 @@ namespace LLInitParam
// try to parse a per type named value
if (name_value_lookup_t::getValueFromName(name, typed_param.getValue()))
{
- typed_param.enclosingBlock().paramChanged(param, true);
typed_param.setValueName(name);
- typed_param.setProvided(true);
- typed_param.mKeyVersion = typed_param.getLastChangeVersion();
+ typed_param.setProvided();
return true;
}
@@ -845,7 +1032,7 @@ namespace LLInitParam
}
std::string key = typed_param.getValueName();
- if (!key.empty() && typed_param.mKeyVersion == typed_param.getLastChangeVersion())
+ if (!key.empty())
{
if (!parser.writeValue(key, name_stack))
{
@@ -870,11 +1057,10 @@ namespace LLInitParam
bool isProvided() const
{
// only validate block when it hasn't already passed validation with current data
- if (Param::anyProvided() && param_value_t::mValidatedVersion < param_value_t::getLastChangeVersion())
+ if (Param::anyProvided() && !param_value_t::mValidated)
{
// a sub-block is "provided" when it has been filled in enough to be valid
param_value_t::mValidated = param_value_t::validateBlock(false);
- param_value_t::mValidatedVersion = param_value_t::getLastChangeVersion();
}
return Param::anyProvided() && param_value_t::mValidated;
}
@@ -884,28 +1070,44 @@ namespace LLInitParam
{
setValue(val);
param_value_t::clearValueName();
- // force revalidation of block by clearing known provided version
+ // force revalidation of block
// next call to isProvided() will update provision status based on validity
- param_value_t::mValidatedVersion = -1;
+ param_value_t::mValidated = false;
setProvided(flag_as_provided);
- Param::enclosingBlock().paramChanged(*this, flag_as_provided);
+ }
+
+ self_t& operator =(const typename NAME_VALUE_LOOKUP::name_t& name)
+ {
+ return static_cast<self_t&>(param_value_t::operator =(name));
}
// propagate changed status up to enclosing block
/*virtual*/ void paramChanged(const Param& changed_param, bool user_provided)
{
param_value_t::paramChanged(changed_param, user_provided);
- Param::enclosingBlock().paramChanged(*this, user_provided);
if (user_provided)
{
// a child param has been explicitly changed
// so *some* aspect of this block is now provided
- setProvided(true);
+ param_value_t::mValidated = false;
+ setProvided();
+ param_value_t::clearValueName();
+ }
+ else
+ {
+ Param::enclosingBlock().paramChanged(*this, user_provided);
}
}
protected:
+ self_t& operator =(const self_t& other)
+ {
+ param_value_t::operator =(other);
+ Param::operator =(other);
+ return *this;
+ }
+
static bool mergeWith(Param& dst, const Param& src, bool overwrite)
{
const self_t& src_typed_param = static_cast<const self_t&>(src);
@@ -917,7 +1119,6 @@ namespace LLInitParam
{
dst_typed_param.clearValueName();
dst_typed_param.setProvided(true);
- dst_typed_param.enclosingBlock().paramChanged(dst_typed_param, true);
return true;
}
}
@@ -936,7 +1137,7 @@ namespace LLInitParam
typedef typename std::vector<param_value_t> container_t;
typedef const container_t& value_assignment_t;
- typedef VALUE_TYPE value_t;
+ typedef typename param_value_t::value_t value_t;
typedef NAME_VALUE_LOOKUP name_value_lookup_t;
TypedParam(BlockDescriptor& block_descriptor, const char* name, value_assignment_t value, ParamDescriptor::validation_func_t validate_func, S32 min_count, S32 max_count)
@@ -1004,7 +1205,7 @@ namespace LLInitParam
it != end_it;
++it)
{
- std::string key = it->getValue();
+ std::string key = it->getValueName();
name_stack.back().second = true;
if(key.empty())
@@ -1013,7 +1214,7 @@ namespace LLInitParam
bool value_written = parser.writeValue(*it, name_stack);
if (!value_written)
{
- std::string calculated_key = it->calcValueName(key);
+ std::string calculated_key = it->calcValueName(it->getValue());
if (!parser.writeValue(calculated_key, name_stack))
{
break;
@@ -1043,22 +1244,33 @@ namespace LLInitParam
{
mValues = val;
setProvided(flag_as_provided);
- Param::enclosingBlock().paramChanged(*this, flag_as_provided);
}
- value_t& add()
+ param_value_t& add()
{
mValues.push_back(param_value_t(value_t()));
- setProvided(true);
- Param::enclosingBlock().paramChanged(*this, true);
+ Param::setProvided();
return mValues.back();
}
void add(const value_t& item)
{
- mValues.push_back(param_value_t(item));
- setProvided(true);
- Param::enclosingBlock().paramChanged(*this, true);
+ param_value_t param_value;
+ param_value.setValue(item);
+ mValues.push_back(param_value);
+ setProvided();
+ }
+
+ void add(const typename name_value_lookup_t::name_t& name)
+ {
+ value_t value;
+
+ // try to parse a per type named value
+ if (name_value_lookup_t::getValueFromName(name, value))
+ {
+ add(value);
+ mValues.back().setValueName(name);
+ }
}
// implicit conversion
@@ -1099,8 +1311,7 @@ namespace LLInitParam
if (src_typed_param.begin() != src_typed_param.end())
{
- dst_typed_param.setProvided(true);
- dst_typed_param.enclosingBlock().paramChanged(dst_typed_param, true);
+ dst_typed_param.setProvided();
}
return true;
}
@@ -1116,9 +1327,9 @@ namespace LLInitParam
public:
typedef TypedParam<VALUE_TYPE, NAME_VALUE_LOOKUP, true, true> self_t;
typedef ParamValue<VALUE_TYPE, NAME_VALUE_LOOKUP> param_value_t;
- typedef typename std::vector<param_value_t> container_t;
+ typedef typename std::vector<param_value_t> container_t;
typedef const container_t& value_assignment_t;
- typedef VALUE_TYPE value_t;
+ typedef typename param_value_t::value_t value_t;
typedef NAME_VALUE_LOOKUP name_value_lookup_t;
TypedParam(BlockDescriptor& block_descriptor, const char* name, value_assignment_t value, ParamDescriptor::validation_func_t validate_func, S32 min_count, S32 max_count)
@@ -1158,8 +1369,7 @@ namespace LLInitParam
// attempt to parse block...
if(value.deserializeBlock(parser, name_stack_range, new_name))
{
- typed_param.enclosingBlock().paramChanged(param, true);
- typed_param.setProvided(true);
+ typed_param.setProvided();
return true;
}
else if(name_value_lookup_t::valueNamesExist())
@@ -1172,9 +1382,7 @@ namespace LLInitParam
if (name_value_lookup_t::getValueFromName(name, value.getValue()))
{
typed_param.mValues.back().setValueName(name);
- typed_param.mValues.back().mKeyVersion = value.getLastChangeVersion();
- typed_param.enclosingBlock().paramChanged(param, true);
- typed_param.setProvided(true);
+ typed_param.setProvided();
return true;
}
@@ -1201,7 +1409,7 @@ namespace LLInitParam
name_stack.back().second = true;
std::string key = it->getValueName();
- if (!key.empty() && it->mKeyVersion == it->getLastChangeVersion())
+ if (!key.empty())
{
parser.writeValue(key, name_stack);
}
@@ -1224,22 +1432,31 @@ namespace LLInitParam
{
mValues = val;
setProvided(flag_as_provided);
- Param::enclosingBlock().paramChanged(*this, flag_as_provided);
}
- value_t& add()
+ param_value_t& add()
{
mValues.push_back(value_t());
- setProvided(true);
- Param::enclosingBlock().paramChanged(*this, true);
+ setProvided();
return mValues.back();
}
void add(const value_t& item)
{
mValues.push_back(item);
- setProvided(true);
- Param::enclosingBlock().paramChanged(*this, true);
+ setProvided();
+ }
+
+ void add(const typename name_value_lookup_t::name_t& name)
+ {
+ value_t value;
+
+ // try to parse a per type named value
+ if (name_value_lookup_t::getValueFromName(name, value))
+ {
+ add(value);
+ mValues.back().setValueName(name);
+ }
}
// implicit conversion
@@ -1288,8 +1505,7 @@ namespace LLInitParam
if (src_typed_param.begin() != src_typed_param.end())
{
- dst_typed_param.setProvided(true);
- dst_typed_param.enclosingBlock().paramChanged(dst_typed_param, true);
+ dst_typed_param.setProvided();
}
return true;
@@ -1298,24 +1514,25 @@ namespace LLInitParam
container_t mValues;
};
- template <typename DERIVED_BLOCK>
- class ChoiceBlock : public BaseBlock
+ template <typename DERIVED_BLOCK, typename BASE_BLOCK = BaseBlock>
+ class ChoiceBlock : public BASE_BLOCK
{
- typedef ChoiceBlock<DERIVED_BLOCK> self_t;
- typedef ChoiceBlock<DERIVED_BLOCK> enclosing_block_t;
+ typedef ChoiceBlock<DERIVED_BLOCK, BASE_BLOCK> self_t;
+ typedef ChoiceBlock<DERIVED_BLOCK, BASE_BLOCK> enclosing_block_t;
+ typedef BASE_BLOCK base_block_t;
LOG_CLASS(self_t);
public:
// take all provided params from other and apply to self
bool overwriteFrom(const self_t& other)
{
- return mergeBlock(selfBlockDescriptor(), other, true);
+ return static_cast<DERIVED_BLOCK*>(this)->mergeBlock(selfBlockDescriptor(), other, true);
}
// take all provided params that are not already provided, and apply to self
bool fillFrom(const self_t& other)
{
- return mergeBlock(selfBlockDescriptor(), other, false);
+ return static_cast<DERIVED_BLOCK*>(this)->mergeBlock(selfBlockDescriptor(), other, false);
}
bool mergeBlockParam(bool source_provided, bool dest_provided, BlockDescriptor& block_data, const self_t& source, bool overwrite)
@@ -1333,25 +1550,25 @@ namespace LLInitParam
bool mergeBlock(BlockDescriptor& block_data, const self_t& other, bool overwrite)
{
mCurChoice = other.mCurChoice;
- return BaseBlock::mergeBlock(selfBlockDescriptor(), other, overwrite);
+ return base_block_t::mergeBlock(selfBlockDescriptor(), other, overwrite);
}
// clear out old choice when param has changed
/*virtual*/ void paramChanged(const Param& changed_param, bool user_provided)
{
- param_handle_t changed_param_handle = BaseBlock::getHandleFromParam(&changed_param);
+ param_handle_t changed_param_handle = base_block_t::getHandleFromParam(&changed_param);
// if we have a new choice...
if (changed_param_handle != mCurChoice)
{
// clear provided flag on previous choice
- Param* previous_choice = BaseBlock::getParamFromHandle(mCurChoice);
+ Param* previous_choice = base_block_t::getParamFromHandle(mCurChoice);
if (previous_choice)
{
previous_choice->setProvided(false);
}
mCurChoice = changed_param_handle;
}
- BaseBlock::paramChanged(changed_param, user_provided);
+ base_block_t::paramChanged(changed_param, user_provided);
}
virtual const BlockDescriptor& mostDerivedBlockDescriptor() const { return selfBlockDescriptor(); }
@@ -1361,7 +1578,7 @@ namespace LLInitParam
ChoiceBlock()
: mCurChoice(0)
{
- BaseBlock::init(selfBlockDescriptor(), BaseBlock::selfBlockDescriptor(), sizeof(DERIVED_BLOCK));
+ BaseBlock::init(selfBlockDescriptor(), base_block_t::selfBlockDescriptor(), sizeof(DERIVED_BLOCK));
}
// Alternatives are mutually exclusive wrt other Alternatives in the same block.
@@ -1377,6 +1594,8 @@ namespace LLInitParam
typedef TypedParam<T, NAME_VALUE_LOOKUP, false, IsBlock<ParamValue<T, NAME_VALUE_LOOKUP> >::value> super_t;
typedef typename super_t::value_assignment_t value_assignment_t;
+ using super_t::operator =;
+
explicit Alternative(const char* name = "", value_assignment_t val = defaultValue<T>())
: super_t(DERIVED_BLOCK::selfBlockDescriptor(), name, val, NULL, 0, 1),
mOriginalValue(val)
@@ -1402,7 +1621,7 @@ namespace LLInitParam
super_t::set(val);
}
- void operator=(value_assignment_t val)
+ void operator =(value_assignment_t val)
{
super_t::set(val);
}
@@ -1447,7 +1666,7 @@ namespace LLInitParam
const Param* getCurrentChoice() const
{
- return BaseBlock::getParamFromHandle(mCurChoice);
+ return base_block_t::getParamFromHandle(mCurChoice);
}
};
@@ -1493,13 +1712,16 @@ namespace LLInitParam
typedef TypedParam<T, NAME_VALUE_LOOKUP, false, IsBlock<ParamValue<T, NAME_VALUE_LOOKUP> >::value> super_t;
typedef typename super_t::value_assignment_t value_assignment_t;
+ using super_t::operator();
+ using super_t::operator =;
+
explicit Optional(const char* name = "", value_assignment_t val = defaultValue<T>())
: super_t(DERIVED_BLOCK::selfBlockDescriptor(), name, val, NULL, 0, 1)
{
//#pragma message("Parsing LLInitParam::Block::Optional")
}
- Optional& operator=(value_assignment_t val)
+ Optional& operator =(value_assignment_t val)
{
set(val);
return *this;
@@ -1510,7 +1732,6 @@ namespace LLInitParam
super_t::set(val);
return static_cast<DERIVED_BLOCK&>(Param::enclosingBlock());
}
- using super_t::operator();
};
template <typename T, typename NAME_VALUE_LOOKUP = TypeValues<T> >
@@ -1521,12 +1742,15 @@ namespace LLInitParam
typedef Mandatory<T, NAME_VALUE_LOOKUP> self_t;
typedef typename super_t::value_assignment_t value_assignment_t;
+ using super_t::operator();
+ using super_t::operator =;
+
// mandatory parameters require a name to be parseable
explicit Mandatory(const char* name = "", value_assignment_t val = defaultValue<T>())
: super_t(DERIVED_BLOCK::selfBlockDescriptor(), name, val, &validate, 1, 1)
{}
- Mandatory& operator=(value_assignment_t val)
+ Mandatory& operator =(value_assignment_t val)
{
set(val);
return *this;
@@ -1537,7 +1761,6 @@ namespace LLInitParam
super_t::set(val);
return static_cast<DERIVED_BLOCK&>(Param::enclosingBlock());
}
- using super_t::operator();
static bool validate(const Param* p)
{
@@ -1562,7 +1785,7 @@ namespace LLInitParam
: super_t(DERIVED_BLOCK::selfBlockDescriptor(), name, container_t(), &validate, RANGE::minCount, RANGE::maxCount)
{}
- Multiple& operator=(value_assignment_t val)
+ Multiple& operator =(value_assignment_t val)
{
set(val);
return *this;
@@ -1690,18 +1913,15 @@ namespace LLInitParam
public:
typedef BatchBlock<DERIVED_BLOCK, BASE_BLOCK> block_t;
typedef const BatchBlock<DERIVED_BLOCK, BASE_BLOCK>& value_assignment_t;
+ typedef block_t value_t;
ParamValue()
: block_t(),
- mKeyVersion(0),
- mValidatedVersion(-1),
mValidated(false)
{}
ParamValue(value_assignment_t other)
: block_t(other),
- mKeyVersion(0),
- mValidatedVersion(-1),
mValidated(false)
{
}
@@ -1731,11 +1951,80 @@ namespace LLInitParam
return *this;
}
- S32 mKeyVersion;
+ protected:
+ mutable bool mValidated; // lazy validation flag
+ };
+
+ template<typename T, bool IS_BLOCK>
+ class ParamValue <BaseBlock::Lazy<T>,
+ TypeValues<T>,
+ IS_BLOCK>
+ : public IsBlock<T>::base_class_t
+ {
+ public:
+ typedef ParamValue <BaseBlock::Lazy<T>, TypeValues<T>, false> self_t;
+ typedef const T& value_assignment_t;
+ typedef T value_t;
+
+ ParamValue()
+ : mValue(),
+ mValidated(false)
+ {}
+
+ ParamValue(value_assignment_t other)
+ : mValue(other),
+ mValidated(false)
+ {}
+
+ void setValue(value_assignment_t val)
+ {
+ mValue.set(val);
+ }
+
+ value_assignment_t getValue() const
+ {
+ return mValue.get();
+ }
+
+ T& getValue()
+ {
+ return mValue.get();
+ }
+
+ operator value_assignment_t() const
+ {
+ return mValue.get();
+ }
+
+ value_assignment_t operator()() const
+ {
+ return mValue.get();
+ }
+
+ bool deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack_range, bool new_name)
+ {
+ return mValue.get().deserializeBlock(p, name_stack_range, new_name);
+ }
+
+ void serializeBlock(Parser& p, Parser::name_stack_t& name_stack, const BaseBlock* diff_block = NULL) const
+ {
+ if (mValue.empty()) return;
+
+ mValue.get().serializeBlock(p, name_stack, diff_block);
+ }
+
+ bool inspectBlock(Parser& p, Parser::name_stack_t name_stack = Parser::name_stack_t(), S32 min_count = 0, S32 max_count = S32_MAX) const
+ {
+ if (mValue.empty()) return false;
+
+ return mValue.get().inspectBlock(p, name_stack, min_count, max_count);
+ }
protected:
- mutable S32 mValidatedVersion;
mutable bool mValidated; // lazy validation flag
+
+ private:
+ BaseBlock::Lazy<T> mValue;
};
template <>
@@ -1750,15 +2039,11 @@ namespace LLInitParam
typedef const LLSD& value_assignment_t;
ParamValue()
- : mKeyVersion(0),
- mValidatedVersion(-1),
- mValidated(false)
+ : mValidated(false)
{}
ParamValue(value_assignment_t other)
: mValue(other),
- mKeyVersion(0),
- mValidatedVersion(-1),
mValidated(false)
{}
@@ -1770,7 +2055,6 @@ namespace LLInitParam
operator value_assignment_t() const { return mValue; }
value_assignment_t operator()() const { return mValue; }
- S32 mKeyVersion;
// block param interface
bool deserializeBlock(Parser& p, Parser::name_stack_range_t name_stack_range, bool new_name);
@@ -1782,7 +2066,6 @@ namespace LLInitParam
}
protected:
- mutable S32 mValidatedVersion;
mutable bool mValidated; // lazy validation flag
private:
@@ -1806,14 +2089,14 @@ namespace LLInitParam
typedef ParamValue<T, TypeValues<T> > derived_t;
typedef CustomParamValue<T> self_t;
- typedef Block<derived_t> block_t;
+ typedef Block<derived_t> block_t;
typedef const T& value_assignment_t;
+ typedef T value_t;
+
CustomParamValue(const T& value = T())
: mValue(value),
mValueAge(VALUE_AUTHORITATIVE),
- mKeyVersion(0),
- mValidatedVersion(-1),
mValidated(false)
{}
@@ -1966,8 +2249,6 @@ namespace LLInitParam
return getValue();
}
- S32 mKeyVersion;
-
protected:
// use this from within updateValueFromBlock() to set the value without making it authoritative
@@ -2001,7 +2282,6 @@ namespace LLInitParam
return block_t::mergeBlock(block_data, source, overwrite);
}
- mutable S32 mValidatedVersion;
mutable bool mValidated; // lazy validation flag
private:
diff --git a/indra/llxuixml/llxuiparser.cpp b/indra/llxuixml/llxuiparser.cpp
index 878f992178..afc76024d1 100644
--- a/indra/llxuixml/llxuiparser.cpp
+++ b/indra/llxuixml/llxuiparser.cpp
@@ -59,28 +59,24 @@ const char* NO_VALUE_MARKER = "no_value";
const S32 LINE_NUMBER_HERE = 0;
-struct MaxOccur : public LLInitParam::ChoiceBlock<MaxOccur>
+struct MaxOccursValues : public LLInitParam::TypeValuesHelper<U32, MaxOccursValues>
{
- Alternative<int> count;
- Alternative<std::string> unbounded;
-
- MaxOccur()
- : unbounded("", "unbounded")
- {}
+ static void declareValues()
+ {
+ declare("unbounded", U32_MAX);
+ }
};
struct Occurs : public LLInitParam::Block<Occurs>
{
- Optional<S32> minOccurs;
- Optional<MaxOccur> maxOccurs;
+ Optional<U32> minOccurs;
+ Optional<U32, MaxOccursValues> maxOccurs;
Occurs()
- : minOccurs("minOccurs"),
- maxOccurs("maxOccurs")
- {
- minOccurs = 0;
- maxOccurs.unbounded.choose();
- }
+ : minOccurs("minOccurs", 0),
+ maxOccurs("maxOccurs", U32_MAX)
+
+ {}
};
@@ -103,18 +99,15 @@ namespace LLInitParam
};
}
-struct Name : public LLInitParam::Block<Name>
-{
- Mandatory<std::string> name;
-
- Name()
- : name("name")
- {}
-};
+struct Element;
+struct Group;
+struct Choice;
+struct Sequence;
+struct Any;
struct Attribute : public LLInitParam::Block<Attribute>
{
- Mandatory<Name> name;
+ Mandatory<std::string> name;
Mandatory<std::string> type;
Mandatory<EUse> use;
@@ -122,41 +115,170 @@ struct Attribute : public LLInitParam::Block<Attribute>
: name("name"),
type("type"),
use("use")
+ {}
+};
+
+struct Any : public LLInitParam::Block<Any, Occurs>
+{
+ Optional<std::string> _namespace;
+
+ Any()
+ : _namespace("namespace")
+ {}
+};
+
+struct All : public LLInitParam::Block<All, Occurs>
+{
+ Multiple< Lazy<Element> > elements;
+
+ All()
+ : elements("element")
{
+ maxOccurs = 1;
}
};
-struct ComplexType : public LLInitParam::Block<ComplexType>
+struct Choice : public LLInitParam::ChoiceBlock<Choice, Occurs>
+{
+ Alternative< Lazy<Element> > element;
+ Alternative< Lazy<Group> > group;
+ Alternative< Lazy<Choice> > choice;
+ Alternative< Lazy<Sequence> > sequence;
+ Alternative< Lazy<Any> > any;
+
+ Choice()
+ : element("element"),
+ group("group"),
+ choice("choice"),
+ sequence("sequence"),
+ any("any")
+ {}
+
+};
+
+struct Sequence : public LLInitParam::ChoiceBlock<Sequence, Occurs>
{
- Multiple<Attribute> attribute;
- //Multiple<struct Element> elements;
- Optional<bool> mixed;
+ Alternative< Lazy<Element> > element;
+ Alternative< Lazy<Group> > group;
+ Alternative< Lazy<Choice> > choice;
+ Alternative< Lazy<Sequence> > sequence;
+ Alternative< Lazy<Any> > any;
+};
+
+struct GroupContents : public LLInitParam::ChoiceBlock<GroupContents, Occurs>
+{
+ Alternative<All> all;
+ Alternative<Choice> choice;
+ Alternative<Sequence> sequence;
+
+ GroupContents()
+ : all("all"),
+ choice("choice"),
+ sequence("sequence")
+ {}
+};
+
+struct Group : public LLInitParam::Block<Group, GroupContents>
+{
+ Optional<std::string> name,
+ ref;
+
+ Group()
+ : name("name"),
+ ref("ref")
+ {}
+};
+
+struct Restriction : public LLInitParam::Block<Restriction>
+{
+};
+
+struct Extension : public LLInitParam::Block<Extension>
+{
+};
+
+struct SimpleContent : public LLInitParam::ChoiceBlock<SimpleContent>
+{
+ Alternative<Restriction> restriction;
+ Alternative<Extension> extension;
+
+ SimpleContent()
+ : restriction("restriction"),
+ extension("extension")
+ {}
+};
+
+struct SimpleType : public LLInitParam::Block<SimpleType>
+{
+ // TODO
+};
+
+struct ComplexContent : public LLInitParam::Block<ComplexContent, SimpleContent>
+{
+ Optional<bool> mixed;
+
+ ComplexContent()
+ : mixed("mixed", true)
+ {}
+};
+
+struct ComplexTypeContents : public LLInitParam::ChoiceBlock<ComplexTypeContents>
+{
+ Alternative<SimpleContent> simple_content;
+ Alternative<ComplexContent> complex_content;
+ Alternative<Group> group;
+ Alternative<All> all;
+ Alternative<Choice> choice;
+ Alternative<Sequence> sequence;
+
+ ComplexTypeContents()
+ : simple_content("simpleContent"),
+ complex_content("complexContent"),
+ group("group"),
+ all("all"),
+ choice("choice"),
+ sequence("sequence")
+ {}
+};
+
+struct ComplexType : public LLInitParam::Block<ComplexType, ComplexTypeContents>
+{
+ Optional<std::string> name;
+ Optional<bool> mixed;
+
+ Multiple<Attribute> attribute;
+ Multiple< Lazy<Element> > elements;
ComplexType()
- : attribute("xs:attribute"),
- //elements("xs:element"),
+ : name("name"),
+ attribute("xs:attribute"),
+ elements("xs:element"),
mixed("mixed")
{
- mixed = true;
}
};
-struct Element : public LLInitParam::Block<Element, Occurs>
+struct ElementContents : public LLInitParam::ChoiceBlock<ElementContents, Occurs>
{
- Mandatory<ComplexType> complexType;
- Mandatory<Name> name;
+ Alternative<SimpleType> simpleType;
+ Alternative<ComplexType> complexType;
- Element()
- : complexType("xs:complexType")
+ ElementContents()
+ : simpleType("simpleType"),
+ complexType("complexType")
{}
};
-struct Elements : public LLInitParam::Block<Elements, Occurs>
+struct Element : public LLInitParam::Block<Element, ElementContents>
{
- Multiple<Element> elements;
+ Optional<std::string> name,
+ ref,
+ type;
- Elements()
- : elements("xs:element")
+ Element()
+ : name("xs:name"),
+ ref("xs:ref"),
+ type("xs:type")
{}
};
@@ -164,28 +286,32 @@ struct Schema : public LLInitParam::Block<Schema>
{
private:
Mandatory<std::string> targetNamespace,
- xmlns;
+ xmlns,
+ xs;
public:
Optional<std::string> attributeFormDefault,
- elementFormDefault,
- xs;
+ elementFormDefault;
- Optional<Elements> elements;
+ Mandatory<Element> root_element;
void setNameSpace(const std::string& ns) {targetNamespace = ns; xmlns = ns;}
- Schema()
+ Schema(const std::string& ns = LLStringUtil::null)
: attributeFormDefault("attributeFormDefault"),
elementFormDefault("elementFormDefault"),
xs("xmlns:xs"),
targetNamespace("targetNamespace"),
xmlns("xmlns"),
- elements("xs:choice")
+ root_element("xs:element")
{
attributeFormDefault = "unqualified";
elementFormDefault = "qualified";
xs = "http://www.w3.org/2001/XMLSchema";
+ if (!ns.empty())
+ {
+ setNameSpace(ns);
+ };
}
};
@@ -214,22 +340,30 @@ LLXSDWriter::LLXSDWriter()
void LLXSDWriter::writeXSD(const std::string& type_name, LLXMLNodePtr node, const LLInitParam::BaseBlock& block, const std::string& xml_namespace)
{
+ Schema schema(xml_namespace);
+
+ schema.root_element.name = type_name;
+ Choice& choice = schema.root_element.complexType.choice;
+
+ choice.minOccurs = 0;
+ choice.maxOccurs = "unbounded";
+
mSchemaNode = node;
- node->setName("xs:schema");
- node->createChild("attributeFormDefault", true)->setStringValue("unqualified");
- node->createChild("elementFormDefault", true)->setStringValue("qualified");
- node->createChild("targetNamespace", true)->setStringValue(xml_namespace);
- node->createChild("xmlns:xs", true)->setStringValue("http://www.w3.org/2001/XMLSchema");
- node->createChild("xmlns", true)->setStringValue(xml_namespace);
-
- node = node->createChild("xs:complexType", false);
- node->createChild("name", true)->setStringValue(type_name);
- node->createChild("mixed", true)->setStringValue("true");
-
- mAttributeNode = node;
- mElementNode = node->createChild("xs:choice", false);
- mElementNode->createChild("minOccurs", true)->setStringValue("0");
- mElementNode->createChild("maxOccurs", true)->setStringValue("unbounded");
+ //node->setName("xs:schema");
+ //node->createChild("attributeFormDefault", true)->setStringValue("unqualified");
+ //node->createChild("elementFormDefault", true)->setStringValue("qualified");
+ //node->createChild("targetNamespace", true)->setStringValue(xml_namespace);
+ //node->createChild("xmlns:xs", true)->setStringValue("http://www.w3.org/2001/XMLSchema");
+ //node->createChild("xmlns", true)->setStringValue(xml_namespace);
+
+ //node = node->createChild("xs:complexType", false);
+ //node->createChild("name", true)->setStringValue(type_name);
+ //node->createChild("mixed", true)->setStringValue("true");
+
+ //mAttributeNode = node;
+ //mElementNode = node->createChild("xs:choice", false);
+ //mElementNode->createChild("minOccurs", true)->setStringValue("0");
+ //mElementNode->createChild("maxOccurs", true)->setStringValue("unbounded");
block.inspectBlock(*this);
// duplicate element choices
@@ -1247,6 +1381,7 @@ bool LLSimpleXUIParser::readXUI(const std::string& filename, LLInitParam::BaseBl
if( !file.isOpen() )
{
LL_WARNS("ReadXUI") << "Unable to open file " << filename << LL_ENDL;
+ XML_ParserFree( mParser );
return false;
}
diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp
index 13d51099a8..47f8dcd545 100644
--- a/indra/media_plugins/webkit/media_plugin_webkit.cpp
+++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp
@@ -382,9 +382,9 @@ private:
//lldebugs << "data url is: " << url.str() << llendl;
- // loading overlay debug screen follows media debugging flag from client for now.
+ // always display loading overlay now
#if LLQTWEBKIT_API_VERSION >= 16
- LLQtWebKit::getInstance()->enableLoadingOverlay(mBrowserWindowId, mEnableMediaPluginDebugging);
+ LLQtWebKit::getInstance()->enableLoadingOverlay(mBrowserWindowId, true);
#else
llwarns << "Ignoring enableLoadingOverlay() call (llqtwebkit version is too old)." << llendl;
#endif
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 84ac293c63..6b2fe1e45a 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -244,6 +244,7 @@ set(viewer_SOURCE_FILES
llfloaterurlentry.cpp
llfloatervoiceeffect.cpp
llfloaterwebcontent.cpp
+ llfloaterwebprofile.cpp
llfloaterwhitelistentry.cpp
llfloaterwindowsize.cpp
llfloaterworldmap.cpp
@@ -316,7 +317,6 @@ set(viewer_SOURCE_FILES
llmediactrl.cpp
llmediadataclient.cpp
llmemoryview.cpp
- llmenucommands.cpp
llmeshrepository.cpp
llmimetypes.cpp
llmorphview.cpp
@@ -393,7 +393,6 @@ set(viewer_SOURCE_FILES
llpanelplacestab.cpp
llpanelprimmediacontrols.cpp
llpanelprofile.cpp
- llpanelprofileview.cpp
llpanelsnapshot.cpp
llpanelsnapshotinventory.cpp
llpanelsnapshotlocal.cpp
@@ -799,6 +798,7 @@ set(viewer_HEADER_FILES
llfloaterurlentry.h
llfloatervoiceeffect.h
llfloaterwebcontent.h
+ llfloaterwebprofile.h
llfloaterwhitelistentry.h
llfloaterwindowsize.h
llfloaterworldmap.h
@@ -871,7 +871,6 @@ set(viewer_HEADER_FILES
llmediactrl.h
llmediadataclient.h
llmemoryview.h
- llmenucommands.h
llmeshrepository.h
llmimetypes.h
llmorphview.h
@@ -942,7 +941,6 @@ set(viewer_HEADER_FILES
llpanelplacestab.h
llpanelprimmediacontrols.h
llpanelprofile.h
- llpanelprofileview.h
llpanelsnapshot.h
llpanelteleporthistory.h
llpaneltiptoast.h
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 6c2ff61274..aa8ad53a3d 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -1562,17 +1562,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>ChatVisible</key>
- <map>
- <key>Comment</key>
- <string>Chat bar is visible</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>ChatWindow</key>
<map>
<key>Comment</key>
@@ -1905,6 +1894,17 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>DebugHideEmptySystemFolders</key>
+ <map>
+ <key>Comment</key>
+ <string>Hide empty system folders when on</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>DebugInventoryFilters</key>
<map>
<key>Comment</key>
@@ -7858,18 +7858,6 @@
<integer>0</integer>
</map>
- <key>RenderAnimateTrees</key>
- <map>
- <key>Comment</key>
- <string>Use GL matrix ops to animate tree branches.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
-
<key>RenderMinimumLODTriangleCount</key>
<map>
<key>Comment</key>
@@ -10379,39 +10367,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>SnapshotLocalLastResolution</key>
- <map>
- <key>Comment</key>
- <string>Take next local snapshot at this resolution</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>SnapshotProfileLastResolution</key>
- <map>
- <key>Comment</key>
- <string>Take next profile snapshot at this resolution</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
- <key>SnapshotPostcardLastResolution</key>
- <map>
- <key>Comment</key>
- <string>Take next postcard snapshot at this resolution</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>SnapshotQuality</key>
<map>
<key>Comment</key>
@@ -10445,17 +10400,6 @@
<key>Value</key>
<string>http://photos.apps.staging.avatarsunited.com/viewer_config</string>
</map>
- <key>SnapshotTextureLastResolution</key>
- <map>
- <key>Comment</key>
- <string>Take next texture snapshot at this resolution</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>SpeedTest</key>
<map>
<key>Comment</key>
@@ -12070,7 +12014,7 @@
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
- <integer>1</integer>
+ <boolean>1</boolean>
</map>
<key>UseFreezeFrame</key>
<map>
@@ -12676,6 +12620,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>MinWindowHeight</key>
+ <map>
+ <key>Comment</key>
+ <string>SL viewer minimum window height in pixels</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>U32</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>WindowHeight</key>
<map>
<key>Comment</key>
@@ -12683,7 +12638,7 @@
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
- <string>S32</string>
+ <string>U32</string>
<key>Value</key>
<integer>738</integer>
</map>
@@ -12698,6 +12653,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>MinWindowWidth</key>
+ <map>
+ <key>Comment</key>
+ <string>SL viewer minimum window width in pixels</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>U32</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>WindowWidth</key>
<map>
<key>Comment</key>
@@ -12705,7 +12671,7 @@
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
- <string>S32</string>
+ <string>U32</string>
<key>Value</key>
<integer>1024</integer>
</map>
@@ -13402,10 +13368,10 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>WebProfileRect</key>
+ <key>WebProfileFloaterRect</key>
<map>
<key>Comment</key>
- <string>Web profile dimensions</string>
+ <string>Web profile floater dimensions</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -13413,8 +13379,8 @@
<key>Value</key>
<array>
<integer>0</integer>
- <integer>650</integer>
- <integer>490</integer>
+ <integer>680</integer>
+ <integer>485</integer>
<integer>0</integer>
</array>
</map>
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
index 4cca287356..c012efa056 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
@@ -51,19 +51,6 @@ VARYING vec2 vary_texcoord0;
uniform mat4 inv_proj;
-vec4 getPosition(vec2 pos_screen)
-{
- float depth = texture2DRect(depthMap, pos_screen.xy).a;
- vec2 sc = pos_screen.xy*2.0;
- sc /= screen_res;
- sc -= vec2(1.0,1.0);
- vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
- vec4 pos = inv_proj * ndc;
- pos /= pos.w;
- pos.w = 1.0;
- return pos;
-}
-
void main()
{
vec2 frag = vary_fragcoord.xy/vary_fragcoord.z*0.5+0.5;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl
index 46d42d2a4a..c1fb7b55d4 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl
@@ -37,7 +37,7 @@ VARYING vec2 vary_texcoord0;
void main()
{
- float alpha = texture2D(diffuseMap, vary_texcoord0.xy).a * vertex_color.a;
+ float alpha = diffuseLookup(vary_texcoord0.xy).a * vertex_color.a;
if (alpha < minimum_alpha)
{
diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskV.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskV.glsl
index 6a3cba771b..7d3b06c56e 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskV.glsl
@@ -34,15 +34,18 @@ VARYING vec4 post_pos;
VARYING vec4 vertex_color;
VARYING vec2 vary_texcoord0;
+void passTextureIndex();
+
void main()
{
//transform vertex
vec4 pos = modelview_projection_matrix*vec4(position.xyz, 1.0);
-
post_pos = pos;
gl_Position = vec4(pos.x, pos.y, pos.w*0.5, pos.w);
+ passTextureIndex();
+
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
vertex_color = diffuse_color;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
index 60952ea38e..51110ae4df 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
@@ -35,7 +35,6 @@ uniform sampler2DRect positionMap;
uniform sampler2DRect normalMap;
uniform sampler2DRect lightMap;
uniform sampler2DRect depthMap;
-uniform sampler2D noiseMap;
uniform samplerCube environmentMap;
uniform sampler2D lightFunc;
@@ -60,9 +59,7 @@ uniform vec4 distance_multiplier;
uniform vec4 max_y;
uniform vec4 glow;
uniform float scene_light_strength;
-uniform vec3 env_mat[3];
-//uniform mat4 shadow_matrix[3];
-//uniform vec4 shadow_clip;
+uniform mat3 env_mat;
uniform mat3 ssao_effect_mat;
uniform vec3 sun_dir;
@@ -279,8 +276,7 @@ void main()
vec3 pos = getPosition_d(tc, depth).xyz;
vec3 norm = texture2DRect(normalMap, tc).xyz;
norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
- //vec3 nz = texture2D(noiseMap, vary_fragcoord.xy/128.0).xyz;
-
+
float da = max(dot(norm.xyz, sun_dir.xyz), 0.0);
vec4 diffuse = texture2DRect(diffuseRect, tc);
@@ -309,6 +305,11 @@ void main()
vec3 spec_contrib = dumbshiny * spec.rgb;
bloom = dot(spec_contrib, spec_contrib);
col += spec_contrib;
+
+ //add environmentmap
+ vec3 env_vec = env_mat * refnormpersp;
+ col = mix(col.rgb, textureCube(environmentMap, env_vec).rgb,
+ max(spec.a-diffuse.a*2.0, 0.0));
}
col = atmosLighting(col);
diff --git a/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl b/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl
index e014e53d25..5522e6c41d 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl
@@ -52,7 +52,7 @@ void main()
vec4 outColor = mix( mix(color3, color2, alpha2), mix(color1, color0, alpha1), alphaFinal );
gl_FragData[0] = vec4(outColor.rgb, 0.0);
- gl_FragData[1] = vec4(outColor.rgb*0.2, 0.2);
+ gl_FragData[1] = vec4(0,0,0,0);
vec3 nvn = normalize(vary_normal);
gl_FragData[2] = vec4(nvn.xy * 0.5 + 0.5, nvn.z, 0.0);
}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
index 8d88e93698..1179b212ae 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
@@ -56,19 +56,6 @@ uniform float shadow_bias;
uniform mat4 inv_proj;
-vec4 getPosition(vec2 pos_screen)
-{
- float depth = texture2DRect(depthMap, pos_screen.xy).a;
- vec2 sc = pos_screen.xy*2.0;
- sc /= screen_res;
- sc -= vec2(1.0,1.0);
- vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
- vec4 pos = inv_proj * ndc;
- pos.xyz /= pos.w;
- pos.w = 1.0;
- return pos;
-}
-
float pcfShadow(sampler2DRectShadow shadowMap, vec4 stc, float scl)
{
stc.xyz /= stc.w;
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
index eb367d4ad6..97f3063a9e 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -34,7 +34,6 @@ uniform sampler2DRect specularRect;
uniform sampler2DRect normalMap;
uniform sampler2DRect lightMap;
uniform sampler2DRect depthMap;
-uniform sampler2D noiseMap;
uniform samplerCube environmentMap;
uniform sampler2D lightFunc;
uniform vec3 gi_quad;
@@ -60,7 +59,7 @@ uniform vec4 distance_multiplier;
uniform vec4 max_y;
uniform vec4 glow;
uniform float scene_light_strength;
-uniform vec3 env_mat[3];
+uniform mat3 env_mat;
uniform vec4 shadow_clip;
uniform mat3 ssao_effect_mat;
@@ -279,8 +278,7 @@ void main()
vec3 pos = getPosition_d(tc, depth).xyz;
vec3 norm = texture2DRect(normalMap, tc).xyz;
norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
- //vec3 nz = texture2D(noiseMap, vary_fragcoord.xy/128.0).xyz;
-
+
float da = max(dot(norm.xyz, sun_dir.xyz), 0.0);
vec4 diffuse = texture2DRect(diffuseRect, tc);
@@ -315,6 +313,11 @@ void main()
vec3 spec_contrib = dumbshiny * spec.rgb;
bloom = dot(spec_contrib, spec_contrib);
col += spec_contrib;
+
+ //add environmentmap
+ vec3 env_vec = env_mat * refnormpersp;
+ col = mix(col.rgb, textureCube(environmentMap, env_vec).rgb,
+ max(spec.a-diffuse.a*2.0, 0.0));
}
col = atmosLighting(col);
diff --git a/indra/newview/app_settings/toolbars.xml b/indra/newview/app_settings/toolbars.xml
index f2192a75ad..29c019719d 100644
--- a/indra/newview/app_settings/toolbars.xml
+++ b/indra/newview/app_settings/toolbars.xml
@@ -7,8 +7,8 @@
<command name="destinations"/>
<command name="people"/>
<command name="profile"/>
- <command name="view"/>
<command name="move"/>
+ <command name="view"/>
<command name="howto"/>
</bottom_toolbar>
<left_toolbar
@@ -20,5 +20,6 @@
<command name="places"/>
<command name="voice"/>
<command name="minimap"/>
+ <command name="snapshot"/>
</left_toolbar>
</toolbars>
diff --git a/indra/newview/character/avatar_lad.xml b/indra/newview/character/avatar_lad.xml
index 6641c80b94..99dbfcae51 100644
--- a/indra/newview/character/avatar_lad.xml
+++ b/indra/newview/character/avatar_lad.xml
@@ -395,7 +395,7 @@
<attachment_point
id="39"
- group="9"
+ group="6"
pie_slice="1"
name="Neck"
joint="mNeck"
@@ -405,7 +405,7 @@
<attachment_point
id="40"
- group="9"
+ group="6"
pie_slice="2"
name="Avatar Center"
joint="mRoot"
diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt
index 390da2273d..942c043081 100644
--- a/indra/newview/featuretable_mac.txt
+++ b/indra/newview/featuretable_mac.txt
@@ -1,4 +1,4 @@
-version 31
+version 32
// The version number above should be implemented IF AND ONLY IF some
// change has been made that is sufficiently important to justify
// resetting the graphics preferences of all users to the recommended
@@ -51,7 +51,7 @@ RenderTerrainLODFactor 1 2.0
RenderTransparentWater 1 1
RenderTreeLODFactor 1 1.0
RenderUseImpostors 1 1
-RenderVBOEnable 1 0
+RenderVBOEnable 1 1
RenderVBOMappingDisable 1 1
RenderVolumeLODFactor 1 2.0
UseStartScreen 1 1
@@ -67,7 +67,7 @@ RenderDeferred 1 1
RenderDeferredSSAO 1 1
RenderShadowDetail 1 2
WatchdogDisabled 1 1
-RenderUseStreamVBO 1 0
+RenderUseStreamVBO 1 1
RenderFSAASamples 1 16
RenderMaxTextureIndex 1 16
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index cd56b04258..54ad3cd187 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -205,6 +205,12 @@ void LLAgent::releaseMicrophone(const LLSD& name)
}
// static
+void LLAgent::toggleMicrophone(const LLSD& name)
+{
+ LLVoiceClient::getInstance()->toggleUserPTTState();
+}
+
+// static
bool LLAgent::isMicrophoneOn(const LLSD& sdname)
{
return LLVoiceClient::getInstance()->getUserPTTState();
@@ -331,12 +337,6 @@ void LLAgent::init()
LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback(boost::bind(&LLAgent::parcelChangedCallback));
- LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Agent.IsActionAllowed", boost::bind(&LLAgent::isActionAllowed, _2));
- LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Agent.PressMicrophone", boost::bind(&LLAgent::pressMicrophone, _2));
- LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Agent.ReleaseMicrophone", boost::bind(&LLAgent::releaseMicrophone, _2));
- LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Agent.IsMicrophoneOn", boost::bind(&LLAgent::isMicrophoneOn, _2));
-
-
mInitialized = TRUE;
}
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index 0f7ed9ce68..740770bbdf 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -292,7 +292,9 @@ public:
static void pressMicrophone(const LLSD& name);
static void releaseMicrophone(const LLSD& name);
+ static void toggleMicrophone(const LLSD& name);
static bool isMicrophoneOn(const LLSD& sdname);
+ static bool isActionAllowed(const LLSD& sdname);
private:
bool mVoiceConnected;
@@ -595,7 +597,6 @@ public:
private:
bool mCanEditParcel;
- static bool isActionAllowed(const LLSD& sdname);
static void parcelChangedCallback();
/********************************************************************************
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 8946bb6904..0861fe85a8 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -75,6 +75,7 @@
//#include "llfirstuse.h"
#include "llrender.h"
#include "llteleporthistory.h"
+#include "lltoast.h"
#include "lllocationhistory.h"
#include "llfasttimerview.h"
#include "llvector4a.h"
@@ -1381,6 +1382,11 @@ bool LLAppViewer::mainLoop()
}
}
gMeshRepo.update() ;
+
+ if(!LLCurl::getCurlThread()->update(1))
+ {
+ LLCurl::getCurlThread()->pause() ; //nothing in the curl thread.
+ }
if(!total_work_pending) //pause texture fetching threads if nothing to process.
{
@@ -1776,6 +1782,7 @@ bool LLAppViewer::cleanup()
pending += LLAppViewer::getTextureFetch()->update(1); // unpauses the texture fetch thread
pending += LLVFSThread::updateClass(0);
pending += LLLFSThread::updateClass(0);
+ pending += LLCurl::getCurlThread()->update(1) ;
F64 idle_time = idleTimer.getElapsedTimeF64();
if(!pending)
{
@@ -1787,6 +1794,7 @@ bool LLAppViewer::cleanup()
break;
}
}
+ LLCurl::getCurlThread()->pause() ;
// Delete workers first
// shotdown all worker threads before deleting them in case of co-dependencies
@@ -2824,11 +2832,21 @@ bool LLAppViewer::initWindow()
// always start windowed
BOOL ignorePixelDepth = gSavedSettings.getBOOL("IgnorePixelDepth");
- gViewerWindow = new LLViewerWindow(gWindowTitle,
- VIEWER_WINDOW_CLASSNAME,
- gSavedSettings.getS32("WindowX"), gSavedSettings.getS32("WindowY"),
- gSavedSettings.getS32("WindowWidth"), gSavedSettings.getS32("WindowHeight"),
- gSavedSettings.getBOOL("FullScreen"), ignorePixelDepth);
+
+ LLViewerWindow::Params window_params;
+ window_params
+ .title(gWindowTitle)
+ .name(VIEWER_WINDOW_CLASSNAME)
+ .x(gSavedSettings.getS32("WindowX"))
+ .y(gSavedSettings.getS32("WindowY"))
+ .width(gSavedSettings.getU32("WindowWidth"))
+ .height(gSavedSettings.getU32("WindowHeight"))
+ .min_width(gSavedSettings.getU32("MinWindowWidth"))
+ .min_height(gSavedSettings.getU32("MinWindowHeight"))
+ .fullscreen(gSavedSettings.getBOOL("FullScreen"))
+ .ignore_pixel_depth(ignorePixelDepth);
+
+ gViewerWindow = new LLViewerWindow(window_params);
LL_INFOS("AppInit") << "gViewerwindow created." << LL_ENDL;
@@ -4034,6 +4052,7 @@ void LLAppViewer::idle()
LLFrameTimer::updateFrameTime();
LLFrameTimer::updateFrameCount();
LLEventTimer::updateClass();
+ LLNotificationsUI::LLToast::updateClass();
LLCriticalDamp::updateInterpolants();
LLMortician::updateClass();
LLFilePickerThread::clearDead(); //calls LLFilePickerThread::notify()
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 10fd6b739e..8ca621538f 100755
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -302,6 +302,12 @@ void LLAvatarActions::startConference(const uuid_vec_t& ids)
make_ui_sound("UISndStartIM");
}
+static const char* get_profile_floater_name(const LLUUID& avatar_id)
+{
+ // Use different floater XML for our profile to be able to save its rect.
+ return avatar_id == gAgentID ? "my_profile" : "profile";
+}
+
static void on_avatar_name_show_profile(const LLUUID& agent_id, const LLAvatarName& av_name)
{
std::string username = av_name.mUsername;
@@ -314,15 +320,10 @@ static void on_avatar_name_show_profile(const LLUUID& agent_id, const LLAvatarNa
std::string url = getProfileURL(username);
// PROFILES: open in webkit window
- const bool show_chrome = false;
- static LLCachedControl<LLRect> profile_rect(gSavedSettings, "WebProfileRect");
LLFloaterWebContent::Params p;
p.url(url).
- id(agent_id.asString()).
- show_chrome(show_chrome).
- window_class("profile").
- preferred_media_size(profile_rect);
- LLFloaterReg::showInstance("profile", p);
+ id(agent_id.asString());
+ LLFloaterReg::showInstance(get_profile_floater_name(agent_id), p);
}
// static
@@ -339,14 +340,15 @@ bool LLAvatarActions::profileVisible(const LLUUID& id)
{
LLSD sd;
sd["id"] = id;
- LLFloaterWebContent *browser = dynamic_cast<LLFloaterWebContent*> (LLFloaterReg::findInstance("profile", sd));
+ LLFloater* browser = getProfileFloater(id);
return browser && browser->isShown();
}
//static
LLFloater* LLAvatarActions::getProfileFloater(const LLUUID& id)
{
- LLFloaterWebContent *browser = dynamic_cast<LLFloaterWebContent*> (LLFloaterReg::findInstance("profile", LLSD().with("id", id)));
+ LLFloaterWebContent *browser = dynamic_cast<LLFloaterWebContent*>
+ (LLFloaterReg::findInstance(get_profile_floater_name(id), LLSD().with("id", id)));
return browser;
}
@@ -355,7 +357,7 @@ void LLAvatarActions::hideProfile(const LLUUID& id)
{
LLSD sd;
sd["id"] = id;
- LLFloaterWebContent *browser = dynamic_cast<LLFloaterWebContent*> (LLFloaterReg::findInstance("profile", sd));
+ LLFloater* browser = getProfileFloater(id);
if (browser)
{
browser->closeFloater();
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index a076374903..045c9017be 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -250,6 +250,12 @@ LLIMWellChiclet::LLIMWellChiclet(const Params& p)
LLIMWellChiclet::~LLIMWellChiclet()
{
+ LLIMWellWindow* im_well_window = LLIMWellWindow::findInstance();
+ if (im_well_window)
+ {
+ im_well_window->setSysWellChiclet(NULL);
+ }
+
LLIMMgr::getInstance()->removeSessionObserver(this);
}
diff --git a/indra/newview/llchicletbar.cpp b/indra/newview/llchicletbar.cpp
index a17e1d13f5..a879651060 100644
--- a/indra/newview/llchicletbar.cpp
+++ b/indra/newview/llchicletbar.cpp
@@ -35,6 +35,7 @@
// newview includes
#include "llchiclet.h"
#include "llimfloater.h" // for LLIMFloater
+#include "llpaneltopinfobar.h"
#include "llsyswellwindow.h"
namespace
@@ -181,6 +182,9 @@ BOOL LLChicletBar::postBuild()
showWellButton("im_well", !LLIMWellWindow::getInstance()->isWindowEmpty());
showWellButton("notification_well", !LLNotificationWellWindow::getInstance()->isWindowEmpty());
+ LLPanelTopInfoBar::instance().setResizeCallback(boost::bind(&LLChicletBar::fitWithTopInfoBar, this));
+ LLPanelTopInfoBar::instance().setVisibleCallback(boost::bind(&LLChicletBar::fitWithTopInfoBar, this));
+
return TRUE;
}
@@ -338,3 +342,33 @@ S32 LLChicletBar::getChicletPanelShrinkHeadroom() const
llassert(shrink_headroom >= 0); // the panel cannot get narrower than the minimum
return shrink_headroom;
}
+
+void LLChicletBar::fitWithTopInfoBar()
+{
+ LLPanelTopInfoBar& top_info_bar = LLPanelTopInfoBar::instance();
+
+ LLRect rect = getRect();
+ S32 width = rect.getWidth();
+
+ if (top_info_bar.getVisible())
+ {
+ S32 delta = top_info_bar.calcScreenRect().mRight - calcScreenRect().mLeft;
+ if (delta < 0 && rect.mLeft < llabs(delta))
+ delta = -rect.mLeft;
+ rect.setLeftTopAndSize(rect.mLeft + delta, rect.mTop, rect.getWidth(), rect.getHeight());
+ width = rect.getWidth() - delta;
+ }
+ else
+ {
+ LLView* parent = getParent();
+ if (parent)
+ {
+ LLRect parent_rect = parent->getRect();
+ rect.setLeftTopAndSize(0, rect.mTop, rect.getWidth(), rect.getHeight());
+ width = parent_rect.getWidth();
+ }
+ }
+
+ setRect(rect);
+ LLPanel::reshape(width, rect.getHeight(), false);
+}
diff --git a/indra/newview/llchicletbar.h b/indra/newview/llchicletbar.h
index 224dfbb647..1427bf95e0 100644
--- a/indra/newview/llchicletbar.h
+++ b/indra/newview/llchicletbar.h
@@ -89,6 +89,12 @@ private:
*/
S32 getChicletPanelShrinkHeadroom() const;
+ /**
+ * function adjusts Chiclet bar width to prevent overlapping with Mini-Location bar
+ * EXP-1463
+ */
+ void fitWithTopInfoBar();
+
protected:
LLChicletBar(const LLSD& key = LLSD());
diff --git a/indra/newview/lldebugview.cpp b/indra/newview/lldebugview.cpp
index ba511a3693..7d3170cb76 100644
--- a/indra/newview/lldebugview.cpp
+++ b/indra/newview/lldebugview.cpp
@@ -55,9 +55,23 @@ LLDebugView* gDebugView = NULL;
static LLDefaultChildRegistry::Register<LLDebugView> r("debug_view");
LLDebugView::LLDebugView(const LLDebugView::Params& p)
-: LLView(p)
+: LLView(p),
+ mFastTimerView(NULL),
+ mMemoryView(NULL),
+ mDebugConsolep(NULL),
+ mFloaterSnapRegion(NULL)
{}
+LLDebugView::~LLDebugView()
+{
+ // These have already been deleted. Fix the globals appropriately.
+ gDebugView = NULL;
+ gTextureView = NULL;
+ gSceneView = NULL;
+ gTextureSizeView = NULL;
+ gTextureCategoryView = NULL;
+}
+
void LLDebugView::init()
{
LLRect r;
@@ -109,8 +123,6 @@ void LLDebugView::init()
addChild(gTextureView);
//gTextureView->reshape(r.getWidth(), r.getHeight(), TRUE);
-
-
if(gAuditTexture)
{
@@ -136,22 +148,15 @@ void LLDebugView::init()
}
}
-
-LLDebugView::~LLDebugView()
-{
- // These have already been deleted. Fix the globals appropriately.
- gDebugView = NULL;
- gTextureView = NULL;
- gSceneView = NULL;
- gTextureSizeView = NULL;
- gTextureCategoryView = NULL;
-}
-
void LLDebugView::draw()
{
- LLView* floater_snap_region = getRootView()->getChildView("floater_snap_region");
+ if (mFloaterSnapRegion == NULL)
+ {
+ mFloaterSnapRegion = getRootView()->getChildView("floater_snap_region");
+ }
+
LLRect debug_rect;
- floater_snap_region->localRectToOtherView(floater_snap_region->getLocalRect(), &debug_rect, getParent());
+ mFloaterSnapRegion->localRectToOtherView(mFloaterSnapRegion->getLocalRect(), &debug_rect, getParent());
setShape(debug_rect);
LLView::draw();
diff --git a/indra/newview/lldebugview.h b/indra/newview/lldebugview.h
index 907a42c981..5aec77ad62 100644
--- a/indra/newview/lldebugview.h
+++ b/indra/newview/lldebugview.h
@@ -51,17 +51,19 @@ public:
changeDefault(mouse_opaque, false);
}
};
+
LLDebugView(const Params&);
~LLDebugView();
void init();
void draw();
-
+
void setStatsVisible(BOOL visible);
LLFastTimerView* mFastTimerView;
LLMemoryView* mMemoryView;
LLConsole* mDebugConsolep;
+ LLView* mFloaterSnapRegion;
};
extern LLDebugView* gDebugView;
diff --git a/indra/newview/lldrawpool.h b/indra/newview/lldrawpool.h
index c7acbb42c6..5a2981e749 100644
--- a/indra/newview/lldrawpool.h
+++ b/indra/newview/lldrawpool.h
@@ -133,7 +133,6 @@ public:
PASS_ALPHA,
PASS_ALPHA_MASK,
PASS_FULLBRIGHT_ALPHA_MASK,
- PASS_ALPHA_SHADOW,
NUM_RENDER_TYPES,
};
diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp
index d198e28c14..3165a3516c 100644
--- a/indra/newview/lldrawpooltree.cpp
+++ b/indra/newview/lldrawpooltree.cpp
@@ -97,25 +97,18 @@ void LLDrawPoolTree::render(S32 pass)
LLGLState test(GL_ALPHA_TEST, LLGLSLShader::sNoFixedFunction ? 0 : 1);
LLOverrideFaceColor color(this, 1.f, 1.f, 1.f, 1.f);
- if (gSavedSettings.getBOOL("RenderAnimateTrees"))
- {
- renderTree();
- }
- else
+ gGL.getTexUnit(sDiffTex)->bind(mTexturep);
+
+ for (std::vector<LLFace*>::iterator iter = mDrawFace.begin();
+ iter != mDrawFace.end(); iter++)
{
- gGL.getTexUnit(sDiffTex)->bind(mTexturep);
-
- for (std::vector<LLFace*>::iterator iter = mDrawFace.begin();
- iter != mDrawFace.end(); iter++)
+ LLFace *face = *iter;
+ LLVertexBuffer* buff = face->getVertexBuffer();
+ if(buff)
{
- LLFace *face = *iter;
- LLVertexBuffer* buff = face->getVertexBuffer();
- if(buff)
- {
- buff->setBuffer(LLDrawPoolTree::VERTEX_DATA_MASK);
- buff->drawRange(LLRender::TRIANGLES, 0, buff->getNumVerts()-1, buff->getNumIndices(), 0);
- gPipeline.addTrianglesDrawn(buff->getNumIndices());
- }
+ buff->setBuffer(LLDrawPoolTree::VERTEX_DATA_MASK);
+ buff->drawRange(LLRender::TRIANGLES, 0, buff->getNumVerts()-1, buff->getNumIndices(), 0);
+ gPipeline.addTrianglesDrawn(buff->getNumIndices());
}
}
}
@@ -187,133 +180,6 @@ void LLDrawPoolTree::endShadowPass(S32 pass)
gDeferredTreeShadowProgram.unbind();
}
-
-void LLDrawPoolTree::renderTree(BOOL selecting)
-{
- LLGLState normalize(GL_NORMALIZE, TRUE);
-
- // Bind the texture for this tree.
- gGL.getTexUnit(sDiffTex)->bind(mTexturep.get(), TRUE);
-
- U32 indices_drawn = 0;
-
- gGL.matrixMode(LLRender::MM_MODELVIEW);
-
- for (std::vector<LLFace*>::iterator iter = mDrawFace.begin();
- iter != mDrawFace.end(); iter++)
- {
- LLFace *face = *iter;
- LLDrawable *drawablep = face->getDrawable();
-
- if (drawablep->isDead() || !face->getVertexBuffer())
- {
- continue;
- }
-
- face->getVertexBuffer()->setBuffer(LLDrawPoolTree::VERTEX_DATA_MASK);
- U16* indicesp = (U16*) face->getVertexBuffer()->getIndicesPointer();
-
- // Render each of the trees
- LLVOTree *treep = (LLVOTree *)drawablep->getVObj().get();
-
- LLColor4U color(255,255,255,255);
-
- if (!selecting || treep->mGLName != 0)
- {
- if (selecting)
- {
- S32 name = treep->mGLName;
-
- color = LLColor4U((U8)(name >> 16), (U8)(name >> 8), (U8)name, 255);
- }
-
- gGLLastMatrix = NULL;
- gGL.loadMatrix(gGLModelView);
- //gGL.pushMatrix();
- F32 mat[16];
- for (U32 i = 0; i < 16; i++)
- mat[i] = (F32) gGLModelView[i];
-
- LLMatrix4 matrix(mat);
-
- // Translate to tree base HACK - adjustment in Z plants tree underground
- const LLVector3 &pos_agent = treep->getPositionAgent();
- //gGL.translatef(pos_agent.mV[VX], pos_agent.mV[VY], pos_agent.mV[VZ] - 0.1f);
- LLMatrix4 trans_mat;
- trans_mat.setTranslation(pos_agent.mV[VX], pos_agent.mV[VY], pos_agent.mV[VZ] - 0.1f);
- trans_mat *= matrix;
-
- // Rotate to tree position and bend for current trunk/wind
- // Note that trunk stiffness controls the amount of bend at the trunk as
- // opposed to the crown of the tree
- //
- const F32 TRUNK_STIFF = 22.f;
-
- LLQuaternion rot =
- LLQuaternion(treep->mTrunkBend.magVec()*TRUNK_STIFF*DEG_TO_RAD, LLVector4(treep->mTrunkBend.mV[VX], treep->mTrunkBend.mV[VY], 0)) *
- LLQuaternion(90.f*DEG_TO_RAD, LLVector4(0,0,1)) *
- treep->getRotation();
-
- LLMatrix4 rot_mat(rot);
- rot_mat *= trans_mat;
-
- F32 radius = treep->getScale().magVec()*0.05f;
- LLMatrix4 scale_mat;
- scale_mat.mMatrix[0][0] =
- scale_mat.mMatrix[1][1] =
- scale_mat.mMatrix[2][2] = radius;
-
- scale_mat *= rot_mat;
-
- const F32 THRESH_ANGLE_FOR_BILLBOARD = 15.f;
- const F32 BLEND_RANGE_FOR_BILLBOARD = 3.f;
-
- F32 droop = treep->mDroop + 25.f*(1.f - treep->mTrunkBend.magVec());
-
- S32 stop_depth = 0;
- F32 app_angle = treep->getAppAngle()*LLVOTree::sTreeFactor;
- F32 alpha = 1.0;
- S32 trunk_LOD = LLVOTree::sMAX_NUM_TREE_LOD_LEVELS;
-
- for (S32 j = 0; j < 4; j++)
- {
-
- if (app_angle > LLVOTree::sLODAngles[j])
- {
- trunk_LOD = j;
- break;
- }
- }
- if(trunk_LOD >= LLVOTree::sMAX_NUM_TREE_LOD_LEVELS)
- {
- continue ; //do not render.
- }
-
- if (app_angle < (THRESH_ANGLE_FOR_BILLBOARD - BLEND_RANGE_FOR_BILLBOARD))
- {
- //
- // Draw only the billboard
- //
- // Only the billboard, can use closer to normal alpha func.
- stop_depth = -1;
- LLFacePool::LLOverrideFaceColor clr(this, color);
- indices_drawn += treep->drawBranchPipeline(scale_mat, indicesp, trunk_LOD, stop_depth, treep->mDepth, treep->mTrunkDepth, 1.0, treep->mTwist, droop, treep->mBranches, alpha);
- }
- else // if (app_angle > (THRESH_ANGLE_FOR_BILLBOARD + BLEND_RANGE_FOR_BILLBOARD))
- {
- //
- // Draw only the full geometry tree
- //
- //stop_depth = (app_angle < THRESH_ANGLE_FOR_RECURSION_REDUCTION);
- LLFacePool::LLOverrideFaceColor clr(this, color);
- indices_drawn += treep->drawBranchPipeline(scale_mat, indicesp, trunk_LOD, stop_depth, treep->mDepth, treep->mTrunkDepth, 1.0, treep->mTwist, droop, treep->mBranches, alpha);
- }
-
- //gGL.popMatrix();
- }
- }
-}
-
BOOL LLDrawPoolTree::verify() const
{
/* BOOL ok = TRUE;
diff --git a/indra/newview/lldrawpooltree.h b/indra/newview/lldrawpooltree.h
index ddb259bb82..e7e25453cf 100644
--- a/indra/newview/lldrawpooltree.h
+++ b/indra/newview/lldrawpooltree.h
@@ -68,9 +68,6 @@ public:
/*virtual*/ LLColor3 getDebugColor() const; // For AGP debug display
static S32 sDiffTex;
-
-private:
- void renderTree(BOOL selecting = FALSE);
};
#endif // LL_LLDRAWPOOLTREE_H
diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp
index 065dc5f4be..233038daba 100644
--- a/indra/newview/llfasttimerview.cpp
+++ b/indra/newview/llfasttimerview.cpp
@@ -105,6 +105,7 @@ void LLFastTimerView::onPause()
if (!LLFastTimer::sPauseHistory)
{
mScrollIndex = 0;
+ LLFastTimer::sResetHistory = true;
getChild<LLButton>("pause_btn")->setLabel(getString("pause"));
}
else
@@ -591,6 +592,7 @@ void LLFastTimerView::draw()
{
mAvgCountTotal = ticks;
mMaxCountTotal = ticks;
+ LLFastTimer::sResetHistory = false;
}
}
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp
index b33dea4890..21b58d3e3d 100644
--- a/indra/newview/llfloatercamera.cpp
+++ b/indra/newview/llfloatercamera.cpp
@@ -346,7 +346,7 @@ LLFloaterCamera::LLFloaterCamera(const LLSD& val)
mCurrMode(CAMERA_CTRL_MODE_PAN),
mPrevMode(CAMERA_CTRL_MODE_PAN)
{
- LLHints::registerHintTarget("view_popup", LLView::getHandle());
+ LLHints::registerHintTarget("view_popup", getHandle());
mCommitCallbackRegistrar.add("CameraPresets.ChangeView", boost::bind(&LLFloaterCamera::onClickCameraItem, _2));
}
@@ -433,26 +433,6 @@ void LLFloaterCamera::setMode(ECameraControlMode mode)
updateState();
}
-void LLFloaterCamera::setModeTitle(const ECameraControlMode mode)
-{
- std::string title;
- switch(mode)
- {
- case CAMERA_CTRL_MODE_MODES:
- title = getString("camera_modes_title");
- break;
- case CAMERA_CTRL_MODE_PAN:
- title = getString("pan_mode_title");
- break;
- case CAMERA_CTRL_MODE_PRESETS:
- title = getString("presets_mode_title");
- break;
- default:
- break;
- }
- setTitle(title);
-}
-
void LLFloaterCamera::switchMode(ECameraControlMode mode)
{
setMode(mode);
@@ -532,7 +512,6 @@ void LLFloaterCamera::updateState()
{
iter->second->setToggleState(iter->first == mCurrMode);
}
- setModeTitle(mCurrMode);
}
void LLFloaterCamera::updateItemsSelection()
diff --git a/indra/newview/llfloatercamera.h b/indra/newview/llfloatercamera.h
index 4572932853..4d6d03f22d 100644
--- a/indra/newview/llfloatercamera.h
+++ b/indra/newview/llfloatercamera.h
@@ -102,9 +102,6 @@ private:
/* sets a new mode preserving previous one and updates ui*/
void setMode(ECameraControlMode mode);
- /** set title appropriate to passed mode */
- void setModeTitle(const ECameraControlMode mode);
-
/* updates the state (UI) according to the current mode */
void updateState();
diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp
deleted file mode 100644
index 2679dbb78b..0000000000
--- a/indra/newview/llfloaterchat.cpp
+++ /dev/null
@@ -1,485 +0,0 @@
-/**
- * @file llfloaterchat.cpp
- * @brief LLFloaterChat class implementation
- *
- * $LicenseInfo:firstyear=2002&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$
- */
-
-/**
- * Actually the "Chat History" floater.
- * Should be llfloaterchathistory, not llfloaterchat.
- */
-
-#include "llviewerprecompiledheaders.h"
-
-// project include
-#include "llagent.h"
-#include "llappviewer.h"
-#include "llbutton.h"
-#include "llcheckboxctrl.h"
-#include "llcombobox.h"
-#include "llconsole.h"
-#include "llfloateractivespeakers.h"
-#include "llfloaterchatterbox.h"
-#include "llfloaterreg.h"
-#include "llfloaterscriptdebug.h"
-#include "llkeyboard.h"
-//#include "lllineeditor.h"
-#include "llmutelist.h"
-//#include "llresizehandle.h"
-#include "llchatbar.h"
-#include "llrecentpeople.h"
-#include "llpanelblockedlist.h"
-#include "llslurl.h"
-#include "llstatusbar.h"
-#include "llviewertexteditor.h"
-#include "llviewergesture.h" // for triggering gestures
-#include "llviewermessage.h"
-#include "llviewerwindow.h"
-#include "llviewercontrol.h"
-#include "lluictrlfactory.h"
-#include "lllogchat.h"
-#include "lltexteditor.h"
-#include "lltextparser.h"
-#include "llweb.h"
-#include "llstylemap.h"
-
-// linden library includes
-#include "llaudioengine.h"
-#include "llchat.h"
-#include "llfontgl.h"
-#include "llrect.h"
-#include "llerror.h"
-#include "llstring.h"
-#include "llwindow.h"
-#include "message.h"
-
-//
-// Constants
-//
-const F32 INSTANT_MSG_SIZE = 8.0f;
-const F32 CHAT_MSG_SIZE = 8.0f;
-
-
-//
-// Global statics
-//
-LLColor4 get_text_color(const LLChat& chat);
-
-//
-// Member Functions
-//
-LLFloaterChat::LLFloaterChat(const LLSD& seed)
- : LLFloater(seed),
- mPanel(NULL)
-{
- mFactoryMap["chat_panel"] = LLCallbackMap(createChatPanel, NULL);
- mFactoryMap["active_speakers_panel"] = LLCallbackMap(createSpeakersPanel, NULL);
- //Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this,"floater_chat_history.xml");
-
-}
-
-LLFloaterChat::~LLFloaterChat()
-{
- // Children all cleaned up by default view destructor.
-}
-
-void LLFloaterChat::draw()
-{
- // enable say and shout only when text available
-
- childSetValue("toggle_active_speakers_btn", childIsVisible("active_speakers_panel"));
-
- LLChatBar* chat_barp = findChild<LLChatBar>("chat_panel", TRUE);
- if (chat_barp)
- {
- chat_barp->refresh();
- }
-
- mPanel->refreshSpeakers();
- LLFloater::draw();
-}
-
-BOOL LLFloaterChat::postBuild()
-{
- // Hide the chat overlay when our history is visible.
- setVisibleCallback(boost::bind(&LLFloaterChat::updateConsoleVisibility, this));
-
- mPanel = (LLPanelActiveSpeakers*)getChild<LLPanel>("active_speakers_panel");
-
- childSetCommitCallback("show mutes",onClickToggleShowMute,this); //show mutes
- childSetVisible("Chat History Editor with mute",FALSE);
- childSetAction("toggle_active_speakers_btn", onClickToggleActiveSpeakers, this);
-
- return TRUE;
-}
-
-void LLFloaterChat::updateConsoleVisibility()
-{
- if(gDisconnected)
- {
- return;
- }
- // determine whether we should show console due to not being visible
- gConsole->setVisible( !isInVisibleChain() // are we not in part of UI being drawn?
- || isMinimized() // are we minimized?
- || (getHost() && getHost()->isMinimized() )); // are we hosted in a minimized floater?
-}
-
-void add_timestamped_line(LLViewerTextEditor* edit, LLChat chat, const LLColor4& color)
-{
- std::string line = chat.mText;
- bool prepend_newline = true;
- if (gSavedSettings.getBOOL("ChatShowTimestamps"))
- {
- edit->appendTime(prepend_newline);
- prepend_newline = false;
- }
-
- // If the msg is from an agent (not yourself though),
- // extract out the sender name and replace it with the hotlinked name.
- if (chat.mSourceType == CHAT_SOURCE_AGENT &&
- chat.mFromID != LLUUID::null)
- {
- chat.mURL = LLSLURL("agent", chat.mFromID, "inspect").getSLURLString();
- }
-
- // If the chat line has an associated url, link it up to the name.
- if (!chat.mURL.empty()
- && (line.length() > chat.mFromName.length() && line.find(chat.mFromName,0) == 0))
- {
- std::string start_line = line.substr(0, chat.mFromName.length() + 1);
- line = line.substr(chat.mFromName.length() + 1);
- edit->appendText(start_line, prepend_newline, LLStyleMap::instance().lookup(chat.mFromID,chat.mURL));
- edit->blockUndo();
- prepend_newline = false;
- }
- edit->appendText(line, prepend_newline, LLStyle::Params().color(color));
- edit->blockUndo();
-}
-
-// static
-void LLFloaterChat::addChatHistory(const LLChat& chat, bool log_to_file)
-{
- if (log_to_file && (gSavedPerAccountSettings.getBOOL("LogChat")))
- {
- if (chat.mChatType != CHAT_TYPE_WHISPER && chat.mChatType != CHAT_TYPE_SHOUT)
- {
- LLLogChat::saveHistory("chat", chat.mFromName, chat.mFromID, chat.mText);
- }
- else
- {
- LLLogChat::saveHistory("chat", "", chat.mFromID, chat.mFromName + " " + chat.mText);
- }
- }
-
- LLColor4 color = get_text_color(chat);
-
- if (!log_to_file) color = LLColor4::grey; //Recap from log file.
-
- if (chat.mChatType == CHAT_TYPE_DEBUG_MSG)
- {
- if(gSavedSettings.getBOOL("ShowScriptErrors") == FALSE)
- return;
- if (gSavedSettings.getS32("ShowScriptErrorsLocation") == 1)
- {
- LLFloaterScriptDebug::addScriptLine(chat.mText,
- chat.mFromName,
- color,
- chat.mFromID);
- return;
- }
- }
-
- // could flash the chat button in the status bar here. JC
- LLFloaterChat* chat_floater = LLFloaterChat::getInstance();
- LLViewerTextEditor* history_editor = chat_floater->getChild<LLViewerTextEditor>("Chat History Editor");
- LLViewerTextEditor* history_editor_with_mute = chat_floater->getChild<LLViewerTextEditor>("Chat History Editor with mute");
-
- if (!chat.mMuted)
- {
- add_timestamped_line(history_editor, chat, color);
- add_timestamped_line(history_editor_with_mute, chat, color);
- }
- else
- {
- // desaturate muted chat
- LLColor4 muted_color = lerp(color, LLColor4::grey, 0.5f);
- add_timestamped_line(history_editor_with_mute, chat, color);
- }
-
- // add objects as transient speakers that can be muted
- if (chat.mSourceType == CHAT_SOURCE_OBJECT)
- {
- chat_floater->mPanel->setSpeaker(chat.mFromID, chat.mFromName, LLSpeaker::STATUS_NOT_IN_CHANNEL, LLSpeaker::SPEAKER_OBJECT);
- }
-
- // start tab flashing on incoming text from other users (ignoring system text, etc)
- if (!chat_floater->isInVisibleChain() && chat.mSourceType == CHAT_SOURCE_AGENT)
- {
- LLFloaterChatterBox::getInstance()->setFloaterFlashing(chat_floater, TRUE);
- }
-}
-
-// static
-void LLFloaterChat::setHistoryCursorAndScrollToEnd()
-{
- LLViewerTextEditor* history_editor = LLFloaterChat::getInstance()->getChild<LLViewerTextEditor>("Chat History Editor");
- LLViewerTextEditor* history_editor_with_mute = LLFloaterChat::getInstance()->getChild<LLViewerTextEditor>("Chat History Editor with mute");
-
- if (history_editor)
- {
- history_editor->setCursorAndScrollToEnd();
- }
- if (history_editor_with_mute)
- {
- history_editor_with_mute->setCursorAndScrollToEnd();
- }
-}
-
-
-//static
-void LLFloaterChat::onClickMute(void *data)
-{
- LLFloaterChat* self = (LLFloaterChat*)data;
-
- LLComboBox* chatter_combo = self->getChild<LLComboBox>("chatter combobox");
-
- const std::string& name = chatter_combo->getSimple();
- LLUUID id = chatter_combo->getCurrentID();
-
- if (name.empty()) return;
-
- LLMute mute(id);
- mute.setFromDisplayName(name);
- LLMuteList::getInstance()->add(mute);
- LLPanelBlockedList::showPanelAndSelect(mute.mID);
-}
-
-//static
-void LLFloaterChat::onClickToggleShowMute(LLUICtrl* caller, void *data)
-{
- LLFloaterChat* floater = (LLFloaterChat*)data;
-
-
- //LLCheckBoxCtrl*
- BOOL show_mute = floater->getChild<LLCheckBoxCtrl>("show mutes")->get();
- LLViewerTextEditor* history_editor = floater->getChild<LLViewerTextEditor>("Chat History Editor");
- LLViewerTextEditor* history_editor_with_mute = floater->getChild<LLViewerTextEditor>("Chat History Editor with mute");
-
- if (!history_editor || !history_editor_with_mute)
- return;
-
- //BOOL show_mute = floater->mShowMuteCheckBox->get();
- if (show_mute)
- {
- history_editor->setVisible(FALSE);
- history_editor_with_mute->setVisible(TRUE);
- history_editor_with_mute->setCursorAndScrollToEnd();
- }
- else
- {
- history_editor->setVisible(TRUE);
- history_editor_with_mute->setVisible(FALSE);
- history_editor->setCursorAndScrollToEnd();
- }
-}
-
-// Put a line of chat in all the right places
-void LLFloaterChat::addChat(const LLChat& chat, BOOL local_agent)
-{
- triggerAlerts(chat.mText);
-
- // Add the sender to the list of people with which we've recently interacted.
- // this is not the best place to add _all_ messages to recent list
- // comment this for now, may remove later on code cleanup
- //if(chat.mSourceType == CHAT_SOURCE_AGENT && chat.mFromID.notNull())
- // LLRecentPeople::instance().add(chat.mFromID);
-
- addChatHistory(chat, true);
-}
-
-// Moved from lltextparser.cpp to break llui/llaudio library dependency.
-//static
-void LLFloaterChat::triggerAlerts(const std::string& text)
-{
- LLTextParser* parser = LLTextParser::getInstance();
-// bool spoken=FALSE;
- for (S32 i=0;i<parser->mHighlights.size();i++)
- {
- LLSD& highlight = parser->mHighlights[i];
- if (parser->findPattern(text,highlight) >= 0 )
- {
- if(gAudiop)
- {
- if ((std::string)highlight["sound_lluuid"] != LLUUID::null.asString())
- {
- gAudiop->triggerSound(highlight["sound_lluuid"].asUUID(),
- gAgent.getID(),
- 1.f,
- LLAudioEngine::AUDIO_TYPE_UI,
- gAgent.getPositionGlobal() );
- }
-/*
- if (!spoken)
- {
- LLTextToSpeech* text_to_speech = NULL;
- text_to_speech = LLTextToSpeech::getInstance();
- spoken = text_to_speech->speak((LLString)highlight["voice"],text);
- }
- */
- }
- if (highlight["flash"])
- {
- LLWindow* viewer_window = gViewerWindow->getWindow();
- if (viewer_window && viewer_window->getMinimized())
- {
- viewer_window->flashIcon(5.f);
- }
- }
- }
- }
-}
-
-LLColor4 get_text_color(const LLChat& chat)
-{
- LLColor4 text_color;
-
- if(chat.mMuted)
- {
- text_color.setVec(0.8f, 0.8f, 0.8f, 1.f);
- }
- else
- {
- switch(chat.mSourceType)
- {
- case CHAT_SOURCE_SYSTEM:
- text_color = LLUIColorTable::instance().getColor("SystemChatColor");
- break;
- case CHAT_SOURCE_AGENT:
- if (chat.mFromID.isNull())
- {
- text_color = LLUIColorTable::instance().getColor("SystemChatColor");
- }
- else
- {
- if(gAgent.getID() == chat.mFromID)
- {
- text_color = LLUIColorTable::instance().getColor("UserChatColor");
- }
- else
- {
- text_color = LLUIColorTable::instance().getColor("AgentChatColor");
- }
- }
- break;
- case CHAT_SOURCE_OBJECT:
- if (chat.mChatType == CHAT_TYPE_DEBUG_MSG)
- {
- text_color = LLUIColorTable::instance().getColor("ScriptErrorColor");
- }
- else if ( chat.mChatType == CHAT_TYPE_OWNER )
- {
- text_color = LLUIColorTable::instance().getColor("llOwnerSayChatColor");
- }
- else
- {
- text_color = LLUIColorTable::instance().getColor("ObjectChatColor");
- }
- break;
- default:
- text_color.setToWhite();
- }
-
- if (!chat.mPosAgent.isExactlyZero())
- {
- LLVector3 pos_agent = gAgent.getPositionAgent();
- F32 distance_squared = dist_vec_squared(pos_agent, chat.mPosAgent);
- F32 dist_near_chat = gAgent.getNearChatRadius();
- if (distance_squared > dist_near_chat * dist_near_chat)
- {
- // diminish far-off chat
- text_color.mV[VALPHA] = 0.8f;
- }
- }
- }
-
- return text_color;
-}
-
-//static
-void LLFloaterChat::loadHistory()
-{
- LLLogChat::loadHistory(std::string("chat"), &chatFromLogFile, (void *)LLFloaterChat::getInstance());
-}
-
-//static
-void LLFloaterChat::chatFromLogFile(LLLogChat::ELogLineType type , const LLSD& line, void* userdata)
-{
- switch (type)
- {
- case LLLogChat::LOG_EMPTY:
- case LLLogChat::LOG_END:
- // *TODO: nice message from XML file here
- break;
- case LLLogChat::LOG_LINE:
- case LLLogChat::LOG_LLSD:
- {
- LLChat chat;
- chat.mText = line["message"].asString();
- get_text_color(chat);
- addChatHistory(chat, FALSE);
- }
- break;
- default:
- // nothing
- break;
- }
-}
-
-//static
-void* LLFloaterChat::createSpeakersPanel(void* data)
-{
- return new LLPanelActiveSpeakers(LLLocalSpeakerMgr::getInstance(), TRUE);
-}
-
-//static
-void* LLFloaterChat::createChatPanel(void* data)
-{
- LLChatBar* chatp = new LLChatBar();
- return chatp;
-}
-
-// static
-void LLFloaterChat::onClickToggleActiveSpeakers(void* userdata)
-{
- LLFloaterChat* self = (LLFloaterChat*)userdata;
-
- self->childSetVisible("active_speakers_panel", !self->childIsVisible("active_speakers_panel"));
-}
-
-//static
- LLFloaterChat* LLFloaterChat::getInstance()
- {
- return LLFloaterReg::getTypedInstance<LLFloaterChat>("chat", LLSD()) ;
-
- }
diff --git a/indra/newview/llfloaterchat.h b/indra/newview/llfloaterchat.h
deleted file mode 100644
index fb2aabbfdf..0000000000
--- a/indra/newview/llfloaterchat.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * @file llfloaterchat.h
- * @brief LLFloaterChat class definition
- *
- * $LicenseInfo:firstyear=2002&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$
- */
-
-/*
- * Actually the "Chat History" floater.
- * Should be llfloaterchathistory, not llfloaterchat.
- */
-
-#ifndef LL_LLFLOATERCHAT_H
-#define LL_LLFLOATERCHAT_H
-
-#include "llfloater.h"
-#include "lllogchat.h"
-
-class LLChat;
-class LLPanelActiveSpeakers;
-class LLLogChat;
-
-class LLFloaterChat : public LLFloater
-{
-public:
- LLFloaterChat(const LLSD& seed);
- ~LLFloaterChat();
-
- virtual void draw();
- virtual BOOL postBuild();
-
- void updateConsoleVisibility();
-
- static void setHistoryCursorAndScrollToEnd();
-
- // *TODO:Skinning - move these to LLChat (or LLViewerChat?)
- // Add chat to console and history list.
- // Color based on source, type, distance.
- static void addChat(const LLChat& chat, BOOL local_agent = FALSE);
- // Add chat to history alone.
- static void addChatHistory(const LLChat& chat, bool log_to_file = true);
-
- static void triggerAlerts(const std::string& text);
-
- static void onClickMute(void *data);
- static void onClickToggleShowMute(LLUICtrl* caller, void *data);
- static void onClickToggleActiveSpeakers(void* userdata);
- static void chatFromLogFile(LLLogChat::ELogLineType type, const LLSD& line, void* userdata);
- static void loadHistory();
- static void* createSpeakersPanel(void* data);
- static void* createChatPanel(void* data);
-
- static LLFloaterChat* getInstance(); // *TODO:Skinning Deprecate
-
- LLPanelActiveSpeakers* mPanel;
- BOOL mScrolledToEnd;
-};
-
-#endif
diff --git a/indra/newview/llfloaterchatterbox.cpp b/indra/newview/llfloaterchatterbox.cpp
deleted file mode 100644
index dc33e45dd4..0000000000
--- a/indra/newview/llfloaterchatterbox.cpp
+++ /dev/null
@@ -1,344 +0,0 @@
-/**
- * @file llfloaterchatterbox.cpp
- * @author Richard
- * @date 2007-05-08
- * @brief Implementation of the chatterbox integrated conversation ui
- *
- * $LicenseInfo:firstyear=2007&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 "llfloaterreg.h"
-#include "llfloaterchatterbox.h"
-#include "lluictrlfactory.h"
-#include "llfloaterfriends.h"
-#include "llfloatergroups.h"
-#include "llviewercontrol.h"
-#include "llvoicechannel.h"
-#include "llimpanel.h"
-#include "llimview.h"
-
-//
-// LLFloaterMyFriends
-//
-
-LLFloaterMyFriends::LLFloaterMyFriends(const LLSD& seed)
- : LLFloater(seed)
-{
- mFactoryMap["friends_panel"] = LLCallbackMap(LLFloaterMyFriends::createFriendsPanel, NULL);
- mFactoryMap["groups_panel"] = LLCallbackMap(LLFloaterMyFriends::createGroupsPanel, NULL);
- //Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_my_friends.xml");
-}
-
-LLFloaterMyFriends::~LLFloaterMyFriends()
-{
-}
-
-BOOL LLFloaterMyFriends::postBuild()
-{
- return TRUE;
-}
-
-void LLFloaterMyFriends::onOpen(const LLSD& key)
-{
- if (key.asString() == "friends")
- {
- childShowTab("friends_and_groups", "friends_panel");
- }
- else if (key.asString() == "groups")
- {
- childShowTab("friends_and_groups", "groups_panel");
- }
-}
-
-//static
-void* LLFloaterMyFriends::createFriendsPanel(void* data)
-{
- return new LLPanelFriends();
-}
-
-//static
-void* LLFloaterMyFriends::createGroupsPanel(void* data)
-{
- return new LLPanelGroups();
-}
-
-//static
-LLFloaterMyFriends* LLFloaterMyFriends::getInstance()
-{
- return LLFloaterReg::getTypedInstance<LLFloaterMyFriends>("contacts", "friends") ;
-}
-
-//
-// LLFloaterChatterBox
-//
-LLFloaterChatterBox::LLFloaterChatterBox(const LLSD& seed)
-: LLMultiFloater(seed),
- mActiveVoiceFloater(NULL)
-{
- mAutoResize = FALSE;
-
- //Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_chatterbox.xml", FALSE);
-}
-
-LLFloaterChatterBox::~LLFloaterChatterBox()
-{
-}
-
-BOOL LLFloaterChatterBox::postBuild()
-{
- setVisibleCallback(boost::bind(&LLFloaterChatterBox::onVisibilityChange, this, _2));
-
- if (gSavedSettings.getBOOL("ContactsTornOff"))
- {
- LLFloaterMyFriends* floater_contacts = LLFloaterMyFriends::getInstance();
- if(floater_contacts)
- {
- // add then remove to set up relationship for re-attach
- addFloater(floater_contacts, FALSE);
- removeFloater(floater_contacts);
- // reparent to floater view
- gFloaterView->addChild(floater_contacts);
- }
- }
- else
- {
- addFloater(LLFloaterMyFriends::getInstance(), TRUE);
- }
-
- mTabContainer->lockTabs();
- return TRUE;
-}
-
-BOOL LLFloaterChatterBox::handleKeyHere(KEY key, MASK mask)
-{
- if (key == 'W' && mask == MASK_CONTROL)
- {
- LLFloater* floater = getActiveFloater();
- // is user closeable and is system closeable
- if (floater && floater->canClose())
- {
- if (floater->isCloseable())
- {
- floater->closeFloater();
- }
- else
- {
- // close chatterbox window if frontmost tab is reserved, non-closeable tab
- // such as contacts or near me
- closeFloater();
- }
- }
- return TRUE;
- }
-
- return LLMultiFloater::handleKeyHere(key, mask);
-}
-
-void LLFloaterChatterBox::draw()
-{
- // clear new im notifications when chatterbox is visible
- if (!isMinimized())
- {
- gIMMgr->clearNewIMNotification();
- }
- LLFloater* current_active_floater = getCurrentVoiceFloater();
- // set icon on tab for floater currently associated with active voice channel
- if(mActiveVoiceFloater != current_active_floater)
- {
- // remove image from old floater's tab
- if (mActiveVoiceFloater)
- {
- mTabContainer->setTabImage(mActiveVoiceFloater, "");
- }
- }
-
- // update image on current active tab
- if (current_active_floater)
- {
- LLColor4 icon_color = LLColor4::white;
- LLVoiceChannel* channelp = LLVoiceChannel::getCurrentVoiceChannel();
- if (channelp)
- {
- if (channelp->isActive())
- {
- icon_color = LLColor4::green;
- }
- else if (channelp->getState() == LLVoiceChannel::STATE_ERROR)
- {
- icon_color = LLColor4::red;
- }
- else // active, but not connected
- {
- icon_color = LLColor4::yellow;
- }
- }
- mTabContainer->setTabImage(current_active_floater, "active_voice_tab.tga", icon_color);
- }
-
- mActiveVoiceFloater = current_active_floater;
-
- LLMultiFloater::draw();
-}
-
-void LLFloaterChatterBox::onOpen(const LLSD& key)
-{
- //*TODO:Skinning show the session id associated with key
- if (key.asString() == "local")
- {
- }
- else if (key.isDefined())
- {
- /*LLFloaterIMPanel* impanel = gIMMgr->findFloaterBySession(key.asUUID());
- if (impanel)
- {
- impanel->openFloater();
- }*/
- }
-}
-
-void LLFloaterChatterBox::onVisibilityChange ( const LLSD& new_visibility )
-{
-}
-
-void LLFloaterChatterBox::removeFloater(LLFloater* floaterp)
-{
- if(!floaterp) return;
-
- if (floaterp->getName() == "chat floater")
- {
- // only my friends floater now locked
- mTabContainer->lockTabs(mTabContainer->getNumLockedTabs() - 1);
- gSavedSettings.setBOOL("ChatHistoryTornOff", TRUE);
- floaterp->setCanClose(TRUE);
- }
- else if (floaterp->getName() == "floater_my_friends")
- {
- // only chat floater now locked
- mTabContainer->lockTabs(mTabContainer->getNumLockedTabs() - 1);
- gSavedSettings.setBOOL("ContactsTornOff", TRUE);
- floaterp->setCanClose(TRUE);
- }
- LLMultiFloater::removeFloater(floaterp);
-}
-
-void LLFloaterChatterBox::addFloater(LLFloater* floaterp,
- BOOL select_added_floater,
- LLTabContainer::eInsertionPoint insertion_point)
-{
- if(!floaterp) return;
-
- S32 num_locked_tabs = mTabContainer->getNumLockedTabs();
-
- // already here
- if (floaterp->getHost() == this)
- {
- openFloater(floaterp->getKey());
- return;
- }
-
- // make sure my friends and chat history both locked when re-attaching chat history
- if (floaterp->getName() == "chat floater")
- {
- mTabContainer->unlockTabs();
- // add chat history as second tab if contact window is present, first tab otherwise
- if (getChildView("floater_my_friends"))
- {
- // assuming contacts window is first tab, select it
- mTabContainer->selectFirstTab();
- // and add ourselves after
- LLMultiFloater::addFloater(floaterp, select_added_floater, LLTabContainer::RIGHT_OF_CURRENT);
- }
- else
- {
- LLMultiFloater::addFloater(floaterp, select_added_floater, LLTabContainer::START);
- }
-
- // make sure first two tabs are now locked
- mTabContainer->lockTabs(num_locked_tabs + 1);
- gSavedSettings.setBOOL("ChatHistoryTornOff", FALSE);
- floaterp->setCanClose(FALSE);
- }
- else if (floaterp->getName() == "floater_my_friends")
- {
- mTabContainer->unlockTabs();
- // add contacts window as first tab
- LLMultiFloater::addFloater(floaterp, select_added_floater, LLTabContainer::START);
- // make sure first two tabs are now locked
- mTabContainer->lockTabs(num_locked_tabs + 1);
- gSavedSettings.setBOOL("ContactsTornOff", FALSE);
- floaterp->setCanClose(FALSE);
- }
- else
- {
- LLMultiFloater::addFloater(floaterp, select_added_floater, insertion_point);
- // openFloater(floaterp->getKey());
- }
-
- // make sure active voice icon shows up for new tab
- if (floaterp == mActiveVoiceFloater)
- {
- mTabContainer->setTabImage(floaterp, "active_voice_tab.tga");
- }
-}
-
-//static
-LLFloaterChatterBox* LLFloaterChatterBox::getInstance()
-{
- return LLFloaterReg::getTypedInstance<LLFloaterChatterBox>("communicate", LLSD()) ;
-}
-
-//static
-LLFloater* LLFloaterChatterBox::getCurrentVoiceFloater()
-{
- if (!LLVoiceClient::getInstance()->voiceEnabled())
- {
- return NULL;
- }
- if (LLVoiceChannelProximal::getInstance() == LLVoiceChannel::getCurrentVoiceChannel())
- {
- return NULL;
- }
- else
- {
- LLFloaterChatterBox* floater = LLFloaterChatterBox::getInstance();
- if(!floater) return NULL;
- // iterator over all IM tabs (skip friends and near me)
- for (S32 i = 0; i < floater->getFloaterCount(); i++)
- {
- LLPanel* panelp = floater->mTabContainer->getPanelByIndex(i);
- if (panelp->getName() == "im_floater")
- {
- // only LLFloaterIMPanels are called "im_floater"
- LLFloaterIMPanel* im_floaterp = (LLFloaterIMPanel*)panelp;
- LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(im_floaterp->getSessionID());
- if (voice_channel == LLVoiceChannel::getCurrentVoiceChannel())
- {
- return im_floaterp;
- }
- }
- }
- }
- return NULL;
-}
diff --git a/indra/newview/llfloaterchatterbox.h b/indra/newview/llfloaterchatterbox.h
deleted file mode 100644
index 3a8bfe2fa4..0000000000
--- a/indra/newview/llfloaterchatterbox.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * @file llfloaterchatterbox.h
- * @author Richard
- * @date 2007-05-04
- * @brief Integrated friends and group management/communication tool
- *
- * $LicenseInfo:firstyear=2007&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_LLFLOATERCHATTERBOX_H
-#define LL_LLFLOATERCHATTERBOX_H
-
-#include "llfloater.h"
-#include "llmultifloater.h"
-#include "llstring.h"
-#include "llimpanel.h"
-
-class LLTabContainer;
-
-class LLFloaterChatterBox : public LLMultiFloater
-{
-public:
- LLFloaterChatterBox(const LLSD& seed);
- virtual ~LLFloaterChatterBox();
-
- /*virtual*/ BOOL postBuild();
- /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask);
- /*virtual*/ void draw();
- /*virtual*/ void onOpen(const LLSD& key);
-
- /*virtual*/ void removeFloater(LLFloater* floaterp);
- /*virtual*/ void addFloater(LLFloater* floaterp,
- BOOL select_added_floater,
- LLTabContainer::eInsertionPoint insertion_point = LLTabContainer::END);
-
- static LLFloaterChatterBox* getInstance(); // *TODO:Skinning Deprecate
- static LLFloater* getCurrentVoiceFloater();
-
-protected:
- void onVisibilityChange ( const LLSD& new_visibility );
-
- LLFloater* mActiveVoiceFloater;
-};
-
-
-class LLFloaterMyFriends : public LLFloater
-{
-public:
- LLFloaterMyFriends(const LLSD& seed);
- virtual ~LLFloaterMyFriends();
-
- /*virtual*/ BOOL postBuild();
- /*virtual*/ void onOpen(const LLSD& key);
-
- static LLFloaterMyFriends* getInstance(); // *TODO:Skinning Deprecate
-
- static void* createFriendsPanel(void* data);
- static void* createGroupsPanel(void* data);
-};
-
-#endif // LL_LLFLOATERCHATTERBOX_H
diff --git a/indra/newview/llfloaterfriends.cpp b/indra/newview/llfloaterfriends.cpp
deleted file mode 100644
index f93568d617..0000000000
--- a/indra/newview/llfloaterfriends.cpp
+++ /dev/null
@@ -1,807 +0,0 @@
-/**
- * @file llfloaterfriends.cpp
- * @author Phoenix
- * @date 2005-01-13
- * @brief Implementation of the friends floater
- *
- * $LicenseInfo:firstyear=2005&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 "llfloaterfriends.h"
-
-#include <sstream>
-
-#include "lldir.h"
-
-#include "llagent.h"
-#include "llappviewer.h" // for gLastVersionChannel
-#include "llfloateravatarpicker.h"
-#include "llviewerwindow.h"
-#include "llbutton.h"
-#include "llavataractions.h"
-#include "llinventorymodel.h"
-#include "llnamelistctrl.h"
-#include "llnotificationsutil.h"
-#include "llresmgr.h"
-#include "llscrolllistctrl.h"
-#include "llscrolllistitem.h"
-#include "llscrolllistcell.h"
-#include "lluictrlfactory.h"
-#include "llmenucommands.h"
-#include "llviewercontrol.h"
-#include "llviewermessage.h"
-#include "lleventtimer.h"
-#include "lltextbox.h"
-#include "llvoiceclient.h"
-
-// *TODO: Move more common stuff to LLAvatarActions?
-
-//Maximum number of people you can select to do an operation on at once.
-#define MAX_FRIEND_SELECT 20
-#define DEFAULT_PERIOD 5.0
-#define RIGHTS_CHANGE_TIMEOUT 5.0
-#define OBSERVER_TIMEOUT 0.5
-
-#define ONLINE_SIP_ICON_NAME "slim_icon_16_viewer.tga"
-
-// simple class to observe the calling cards.
-class LLLocalFriendsObserver : public LLFriendObserver, public LLEventTimer
-{
-public:
- LLLocalFriendsObserver(LLPanelFriends* floater) : mFloater(floater), LLEventTimer(OBSERVER_TIMEOUT)
- {
- mEventTimer.stop();
- }
- virtual ~LLLocalFriendsObserver()
- {
- mFloater = NULL;
- }
- virtual void changed(U32 mask)
- {
- // events can arrive quickly in bulk - we need not process EVERY one of them -
- // so we wait a short while to let others pile-in, and process them in aggregate.
- mEventTimer.start();
-
- // save-up all the mask-bits which have come-in
- mMask |= mask;
- }
- virtual BOOL tick()
- {
- mFloater->updateFriends(mMask);
-
- mEventTimer.stop();
- mMask = 0;
-
- return FALSE;
- }
-
-protected:
- LLPanelFriends* mFloater;
- U32 mMask;
-};
-
-LLPanelFriends::LLPanelFriends() :
- LLPanel(),
- LLEventTimer(DEFAULT_PERIOD),
- mObserver(NULL),
- mShowMaxSelectWarning(TRUE),
- mAllowRightsChange(TRUE),
- mNumRightsChanged(0)
-{
- mEventTimer.stop();
- mObserver = new LLLocalFriendsObserver(this);
- LLAvatarTracker::instance().addObserver(mObserver);
- // For notification when SIP online status changes.
- LLVoiceClient::getInstance()->addObserver(mObserver);
-}
-
-LLPanelFriends::~LLPanelFriends()
-{
- // For notification when SIP online status changes.
- LLVoiceClient::getInstance()->removeObserver(mObserver);
- LLAvatarTracker::instance().removeObserver(mObserver);
- delete mObserver;
-}
-
-BOOL LLPanelFriends::tick()
-{
- mEventTimer.stop();
- mPeriod = DEFAULT_PERIOD;
- mAllowRightsChange = TRUE;
- updateFriends(LLFriendObserver::ADD);
- return FALSE;
-}
-
-void LLPanelFriends::updateFriends(U32 changed_mask)
-{
- LLUUID selected_id;
- LLCtrlListInterface *friends_list = childGetListInterface("friend_list");
- if (!friends_list) return;
- LLCtrlScrollInterface *friends_scroll = childGetScrollInterface("friend_list");
- if (!friends_scroll) return;
-
- // We kill the selection warning, otherwise we'll spam with warning popups
- // if the maximum amount of friends are selected
- mShowMaxSelectWarning = false;
-
- std::vector<LLUUID> selected_friends = getSelectedIDs();
- if(changed_mask & (LLFriendObserver::ADD | LLFriendObserver::REMOVE | LLFriendObserver::ONLINE))
- {
- refreshNames(changed_mask);
- }
- else if(changed_mask & LLFriendObserver::POWERS)
- {
- --mNumRightsChanged;
- if(mNumRightsChanged > 0)
- {
- mPeriod = RIGHTS_CHANGE_TIMEOUT;
- mEventTimer.start();
- mAllowRightsChange = FALSE;
- }
- else
- {
- tick();
- }
- }
- if(selected_friends.size() > 0)
- {
- // only non-null if friends was already found. This may fail,
- // but we don't really care here, because refreshUI() will
- // clean up the interface.
- friends_list->setCurrentByID(selected_id);
- for(std::vector<LLUUID>::iterator itr = selected_friends.begin(); itr != selected_friends.end(); ++itr)
- {
- friends_list->setSelectedByValue(*itr, true);
- }
- }
-
- refreshUI();
- mShowMaxSelectWarning = true;
-}
-
-// virtual
-BOOL LLPanelFriends::postBuild()
-{
- mFriendsList = getChild<LLScrollListCtrl>("friend_list");
- mFriendsList->setMaxSelectable(MAX_FRIEND_SELECT);
- mFriendsList->setMaximumSelectCallback(boost::bind(&LLPanelFriends::onMaximumSelect));
- mFriendsList->setCommitOnSelectionChange(TRUE);
- mFriendsList->setContextMenu(LLScrollListCtrl::MENU_AVATAR);
- childSetCommitCallback("friend_list", onSelectName, this);
- getChild<LLScrollListCtrl>("friend_list")->setDoubleClickCallback(onClickIM, this);
-
- U32 changed_mask = LLFriendObserver::ADD | LLFriendObserver::REMOVE | LLFriendObserver::ONLINE;
- refreshNames(changed_mask);
-
- childSetAction("im_btn", onClickIM, this);
- childSetAction("profile_btn", onClickProfile, this);
- childSetAction("offer_teleport_btn", onClickOfferTeleport, this);
- childSetAction("pay_btn", onClickPay, this);
- childSetAction("add_btn", onClickAddFriend, this);
- childSetAction("remove_btn", onClickRemove, this);
-
- setDefaultBtn("im_btn");
-
- updateFriends(LLFriendObserver::ADD);
- refreshUI();
-
- // primary sort = online status, secondary sort = name
- mFriendsList->sortByColumn(std::string("friend_name"), TRUE);
- mFriendsList->sortByColumn(std::string("icon_online_status"), FALSE);
-
- return TRUE;
-}
-
-BOOL LLPanelFriends::addFriend(const LLUUID& agent_id)
-{
- LLAvatarTracker& at = LLAvatarTracker::instance();
- const LLRelationship* relationInfo = at.getBuddyInfo(agent_id);
- if(!relationInfo) return FALSE;
-
- bool isOnlineSIP = LLVoiceClient::getInstance()->isOnlineSIP(agent_id);
- bool isOnline = relationInfo->isOnline();
-
- std::string fullname;
- BOOL have_name = gCacheName->getFullName(agent_id, fullname);
-
- LLSD element;
- element["id"] = agent_id;
- LLSD& friend_column = element["columns"][LIST_FRIEND_NAME];
- friend_column["column"] = "friend_name";
- friend_column["value"] = fullname;
- friend_column["font"]["name"] = "SANSSERIF";
- friend_column["font"]["style"] = "NORMAL";
-
- LLSD& online_status_column = element["columns"][LIST_ONLINE_STATUS];
- online_status_column["column"] = "icon_online_status";
- online_status_column["type"] = "icon";
-
- if (isOnline)
- {
- friend_column["font"]["style"] = "BOLD";
- online_status_column["value"] = "icon_avatar_online.tga";
- }
- else if(isOnlineSIP)
- {
- friend_column["font"]["style"] = "BOLD";
- online_status_column["value"] = ONLINE_SIP_ICON_NAME;
- }
-
- LLSD& online_column = element["columns"][LIST_VISIBLE_ONLINE];
- online_column["column"] = "icon_visible_online";
- online_column["type"] = "checkbox";
- online_column["value"] = relationInfo->isRightGrantedTo(LLRelationship::GRANT_ONLINE_STATUS);
-
- LLSD& visible_map_column = element["columns"][LIST_VISIBLE_MAP];
- visible_map_column["column"] = "icon_visible_map";
- visible_map_column["type"] = "checkbox";
- visible_map_column["value"] = relationInfo->isRightGrantedTo(LLRelationship::GRANT_MAP_LOCATION);
-
- LLSD& edit_my_object_column = element["columns"][LIST_EDIT_MINE];
- edit_my_object_column["column"] = "icon_edit_mine";
- edit_my_object_column["type"] = "checkbox";
- edit_my_object_column["value"] = relationInfo->isRightGrantedTo(LLRelationship::GRANT_MODIFY_OBJECTS);
-
- LLSD& edit_their_object_column = element["columns"][LIST_EDIT_THEIRS];
- edit_their_object_column["column"] = "icon_edit_theirs";
- edit_their_object_column["type"] = "checkbox";
- edit_their_object_column["enabled"] = "";
- edit_their_object_column["value"] = relationInfo->isRightGrantedFrom(LLRelationship::GRANT_MODIFY_OBJECTS);
-
- LLSD& update_gen_column = element["columns"][LIST_FRIEND_UPDATE_GEN];
- update_gen_column["column"] = "friend_last_update_generation";
- update_gen_column["value"] = have_name ? relationInfo->getChangeSerialNum() : -1;
-
- mFriendsList->addElement(element, ADD_BOTTOM);
- return have_name;
-}
-
-// propagate actual relationship to UI.
-// Does not resort the UI list because it can be called frequently. JC
-BOOL LLPanelFriends::updateFriendItem(const LLUUID& agent_id, const LLRelationship* info)
-{
- if (!info) return FALSE;
- LLScrollListItem* itemp = mFriendsList->getItem(agent_id);
- if (!itemp) return FALSE;
-
- bool isOnlineSIP = LLVoiceClient::getInstance()->isOnlineSIP(itemp->getUUID());
- bool isOnline = info->isOnline();
-
- std::string fullname;
- BOOL have_name = gCacheName->getFullName(agent_id, fullname);
-
- // Name of the status icon to use
- std::string statusIcon;
-
- if(isOnline)
- {
- statusIcon = "icon_avatar_online.tga";
- }
- else if(isOnlineSIP)
- {
- statusIcon = ONLINE_SIP_ICON_NAME;
- }
-
- itemp->getColumn(LIST_ONLINE_STATUS)->setValue(statusIcon);
-
- itemp->getColumn(LIST_FRIEND_NAME)->setValue(fullname);
- // render name of online friends in bold text
- ((LLScrollListText*)itemp->getColumn(LIST_FRIEND_NAME))->setFontStyle((isOnline || isOnlineSIP) ? LLFontGL::BOLD : LLFontGL::NORMAL);
- itemp->getColumn(LIST_VISIBLE_ONLINE)->setValue(info->isRightGrantedTo(LLRelationship::GRANT_ONLINE_STATUS));
- itemp->getColumn(LIST_VISIBLE_MAP)->setValue(info->isRightGrantedTo(LLRelationship::GRANT_MAP_LOCATION));
- itemp->getColumn(LIST_EDIT_MINE)->setValue(info->isRightGrantedTo(LLRelationship::GRANT_MODIFY_OBJECTS));
- S32 change_generation = have_name ? info->getChangeSerialNum() : -1;
- itemp->getColumn(LIST_FRIEND_UPDATE_GEN)->setValue(change_generation);
-
- // enable this item, in case it was disabled after user input
- itemp->setEnabled(TRUE);
-
- // Do not resort, this function can be called frequently.
- return have_name;
-}
-
-void LLPanelFriends::refreshRightsChangeList()
-{
- std::vector<LLUUID> friends = getSelectedIDs();
- S32 num_selected = friends.size();
-
- bool can_offer_teleport = num_selected >= 1;
- bool selected_friends_online = true;
-
- const LLRelationship* friend_status = NULL;
- for(std::vector<LLUUID>::iterator itr = friends.begin(); itr != friends.end(); ++itr)
- {
- friend_status = LLAvatarTracker::instance().getBuddyInfo(*itr);
- if (friend_status)
- {
- if(!friend_status->isOnline())
- {
- can_offer_teleport = false;
- selected_friends_online = false;
- }
- }
- else // missing buddy info, don't allow any operations
- {
- can_offer_teleport = false;
- }
- }
-
- if (num_selected == 0) // nothing selected
- {
- childSetEnabled("im_btn", FALSE);
- childSetEnabled("offer_teleport_btn", FALSE);
- }
- else // we have at least one friend selected...
- {
- // only allow IMs to groups when everyone in the group is online
- // to be consistent with context menus in inventory and because otherwise
- // offline friends would be silently dropped from the session
- childSetEnabled("im_btn", selected_friends_online || num_selected == 1);
- childSetEnabled("offer_teleport_btn", can_offer_teleport);
- }
-}
-
-struct SortFriendsByID
-{
- bool operator() (const LLScrollListItem* const a, const LLScrollListItem* const b) const
- {
- return a->getValue().asUUID() < b->getValue().asUUID();
- }
-};
-
-void LLPanelFriends::refreshNames(U32 changed_mask)
-{
- std::vector<LLUUID> selected_ids = getSelectedIDs();
- S32 pos = mFriendsList->getScrollPos();
-
- // get all buddies we know about
- LLAvatarTracker::buddy_map_t all_buddies;
- LLAvatarTracker::instance().copyBuddyList(all_buddies);
-
- BOOL have_names = TRUE;
-
- if(changed_mask & (LLFriendObserver::ADD | LLFriendObserver::REMOVE))
- {
- have_names &= refreshNamesSync(all_buddies);
- }
-
- if(changed_mask & LLFriendObserver::ONLINE)
- {
- have_names &= refreshNamesPresence(all_buddies);
- }
-
- if (!have_names)
- {
- mEventTimer.start();
- }
- // Changed item in place, need to request sort and update columns
- // because we might have changed data in a column on which the user
- // has already sorted. JC
- mFriendsList->updateSort();
-
- // re-select items
- mFriendsList->selectMultiple(selected_ids);
- mFriendsList->setScrollPos(pos);
-}
-
-BOOL LLPanelFriends::refreshNamesSync(const LLAvatarTracker::buddy_map_t & all_buddies)
-{
- mFriendsList->deleteAllItems();
-
- BOOL have_names = TRUE;
- LLAvatarTracker::buddy_map_t::const_iterator buddy_it = all_buddies.begin();
-
- for(; buddy_it != all_buddies.end(); ++buddy_it)
- {
- have_names &= addFriend(buddy_it->first);
- }
-
- return have_names;
-}
-
-BOOL LLPanelFriends::refreshNamesPresence(const LLAvatarTracker::buddy_map_t & all_buddies)
-{
- std::vector<LLScrollListItem*> items = mFriendsList->getAllData();
- std::sort(items.begin(), items.end(), SortFriendsByID());
-
- LLAvatarTracker::buddy_map_t::const_iterator buddy_it = all_buddies.begin();
- std::vector<LLScrollListItem*>::const_iterator item_it = items.begin();
- BOOL have_names = TRUE;
-
- while(true)
- {
- if(item_it == items.end() || buddy_it == all_buddies.end())
- {
- break;
- }
-
- const LLUUID & buddy_uuid = buddy_it->first;
- const LLUUID & item_uuid = (*item_it)->getValue().asUUID();
- if(item_uuid == buddy_uuid)
- {
- const LLRelationship* info = buddy_it->second;
- if (!info)
- {
- ++item_it;
- continue;
- }
-
- S32 last_change_generation = (*item_it)->getColumn(LIST_FRIEND_UPDATE_GEN)->getValue().asInteger();
- if (last_change_generation < info->getChangeSerialNum())
- {
- // update existing item in UI
- have_names &= updateFriendItem(buddy_it->first, info);
- }
-
- ++buddy_it;
- ++item_it;
- }
- else if(item_uuid < buddy_uuid)
- {
- ++item_it;
- }
- else //if(item_uuid > buddy_uuid)
- {
- ++buddy_it;
- }
- }
-
- return have_names;
-}
-
-void LLPanelFriends::refreshUI()
-{
- BOOL single_selected = FALSE;
- BOOL multiple_selected = FALSE;
- int num_selected = mFriendsList->getAllSelected().size();
- if(num_selected > 0)
- {
- single_selected = TRUE;
- if(num_selected > 1)
- {
- multiple_selected = TRUE;
- }
- }
-
-
- //Options that can only be performed with one friend selected
- childSetEnabled("profile_btn", single_selected && !multiple_selected);
- childSetEnabled("pay_btn", single_selected && !multiple_selected);
-
- //Options that can be performed with up to MAX_FRIEND_SELECT friends selected
- //(single_selected will always be true in this situations)
- childSetEnabled("remove_btn", single_selected);
- childSetEnabled("im_btn", single_selected);
-// childSetEnabled("friend_rights", single_selected);
-
- refreshRightsChangeList();
-}
-
-std::vector<LLUUID> LLPanelFriends::getSelectedIDs()
-{
- LLUUID selected_id;
- std::vector<LLUUID> friend_ids;
- std::vector<LLScrollListItem*> selected = mFriendsList->getAllSelected();
- for(std::vector<LLScrollListItem*>::iterator itr = selected.begin(); itr != selected.end(); ++itr)
- {
- friend_ids.push_back((*itr)->getUUID());
- }
- return friend_ids;
-}
-
-// static
-void LLPanelFriends::onSelectName(LLUICtrl* ctrl, void* user_data)
-{
- LLPanelFriends* panelp = (LLPanelFriends*)user_data;
-
- if(panelp)
- {
- panelp->refreshUI();
- // check to see if rights have changed
- panelp->applyRightsToFriends();
- }
-}
-
-//static
-void LLPanelFriends::onMaximumSelect()
-{
- LLSD args;
- args["MAX_SELECT"] = llformat("%d", MAX_FRIEND_SELECT);
- LLNotificationsUtil::add("MaxListSelectMessage", args);
-};
-
-// static
-void LLPanelFriends::onClickProfile(void* user_data)
-{
- LLPanelFriends* panelp = (LLPanelFriends*)user_data;
-
- std::vector<LLUUID> ids = panelp->getSelectedIDs();
- if(ids.size() > 0)
- {
- LLUUID agent_id = ids[0];
- LLAvatarActions::showProfile(agent_id);
- }
-}
-
-// static
-void LLPanelFriends::onClickIM(void* user_data)
-{
- LLPanelFriends* panelp = (LLPanelFriends*)user_data;
-
- std::vector<LLUUID> ids = panelp->getSelectedIDs();
- if(ids.size() > 0)
- {
- if(ids.size() == 1)
- {
- LLAvatarActions::startIM(ids[0]);
- }
- else
- {
- LLAvatarActions::startConference(ids);
- }
- }
-}
-
-// static
-void LLPanelFriends::onPickAvatar(const std::vector<std::string>& names,
- const std::vector<LLUUID>& ids)
-{
- if (names.empty()) return;
- if (ids.empty()) return;
- LLAvatarActions::requestFriendshipDialog(ids[0], names[0]);
-}
-
-// static
-void LLPanelFriends::onClickAddFriend(void* user_data)
-{
- LLPanelFriends* panelp = (LLPanelFriends*)user_data;
- LLFloater* root_floater = gFloaterView->getParentFloater(panelp);
- LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLPanelFriends::onPickAvatar, _1,_2), FALSE, TRUE);
- if (root_floater)
- {
- root_floater->addDependentFloater(picker);
- }
-}
-
-// static
-void LLPanelFriends::onClickRemove(void* user_data)
-{
- LLPanelFriends* panelp = (LLPanelFriends*)user_data;
- LLAvatarActions::removeFriendsDialog(panelp->getSelectedIDs());
-}
-
-// static
-void LLPanelFriends::onClickOfferTeleport(void* user_data)
-{
- LLPanelFriends* panelp = (LLPanelFriends*)user_data;
- LLAvatarActions::offerTeleport(panelp->getSelectedIDs());
-}
-
-// static
-void LLPanelFriends::onClickPay(void* user_data)
-{
- LLPanelFriends* panelp = (LLPanelFriends*)user_data;
-
- std::vector<LLUUID> ids = panelp->getSelectedIDs();
- if(ids.size() == 1)
- {
- LLAvatarActions::pay(ids[0]);
- }
-}
-
-void LLPanelFriends::confirmModifyRights(rights_map_t& ids, EGrantRevoke command)
-{
- if (ids.empty()) return;
-
- LLSD args;
- if(ids.size() > 0)
- {
- rights_map_t* rights = new rights_map_t(ids);
-
- // for single friend, show their name
- if(ids.size() == 1)
- {
- LLUUID agent_id = ids.begin()->first;
- std::string first, last;
- if(gCacheName->getName(agent_id, first, last))
- {
- args["FIRST_NAME"] = first;
- args["LAST_NAME"] = last;
- }
- if (command == GRANT)
- {
- LLNotificationsUtil::add("GrantModifyRights",
- args,
- LLSD(),
- boost::bind(&LLPanelFriends::modifyRightsConfirmation, this, _1, _2, rights));
- }
- else
- {
- LLNotificationsUtil::add("RevokeModifyRights",
- args,
- LLSD(),
- boost::bind(&LLPanelFriends::modifyRightsConfirmation, this, _1, _2, rights));
- }
- }
- else
- {
- if (command == GRANT)
- {
- LLNotificationsUtil::add("GrantModifyRightsMultiple",
- args,
- LLSD(),
- boost::bind(&LLPanelFriends::modifyRightsConfirmation, this, _1, _2, rights));
- }
- else
- {
- LLNotificationsUtil::add("RevokeModifyRightsMultiple",
- args,
- LLSD(),
- boost::bind(&LLPanelFriends::modifyRightsConfirmation, this, _1, _2, rights));
- }
- }
- }
-}
-
-bool LLPanelFriends::modifyRightsConfirmation(const LLSD& notification, const LLSD& response, rights_map_t* rights)
-{
- S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
- if(0 == option)
- {
- sendRightsGrant(*rights);
- }
- else
- {
- // need to resync view with model, since user cancelled operation
- rights_map_t::iterator rights_it;
- for (rights_it = rights->begin(); rights_it != rights->end(); ++rights_it)
- {
- const LLRelationship* info = LLAvatarTracker::instance().getBuddyInfo(rights_it->first);
- updateFriendItem(rights_it->first, info);
- }
- }
- refreshUI();
-
- delete rights;
- return false;
-}
-
-void LLPanelFriends::applyRightsToFriends()
-{
- BOOL rights_changed = FALSE;
-
- // store modify rights separately for confirmation
- rights_map_t rights_updates;
-
- BOOL need_confirmation = FALSE;
- EGrantRevoke confirmation_type = GRANT;
-
- // this assumes that changes only happened to selected items
- std::vector<LLScrollListItem*> selected = mFriendsList->getAllSelected();
- for(std::vector<LLScrollListItem*>::iterator itr = selected.begin(); itr != selected.end(); ++itr)
- {
- LLUUID id = (*itr)->getValue();
- const LLRelationship* buddy_relationship = LLAvatarTracker::instance().getBuddyInfo(id);
- if (buddy_relationship == NULL) continue;
-
- bool show_online_staus = (*itr)->getColumn(LIST_VISIBLE_ONLINE)->getValue().asBoolean();
- bool show_map_location = (*itr)->getColumn(LIST_VISIBLE_MAP)->getValue().asBoolean();
- bool allow_modify_objects = (*itr)->getColumn(LIST_EDIT_MINE)->getValue().asBoolean();
-
- S32 rights = buddy_relationship->getRightsGrantedTo();
- if(buddy_relationship->isRightGrantedTo(LLRelationship::GRANT_ONLINE_STATUS) != show_online_staus)
- {
- rights_changed = TRUE;
- if(show_online_staus)
- {
- rights |= LLRelationship::GRANT_ONLINE_STATUS;
- }
- else
- {
- // ONLINE_STATUS necessary for MAP_LOCATION
- rights &= ~LLRelationship::GRANT_ONLINE_STATUS;
- rights &= ~LLRelationship::GRANT_MAP_LOCATION;
- // propagate rights constraint to UI
- (*itr)->getColumn(LIST_VISIBLE_MAP)->setValue(FALSE);
- }
- }
- if(buddy_relationship->isRightGrantedTo(LLRelationship::GRANT_MAP_LOCATION) != show_map_location)
- {
- rights_changed = TRUE;
- if(show_map_location)
- {
- // ONLINE_STATUS necessary for MAP_LOCATION
- rights |= LLRelationship::GRANT_MAP_LOCATION;
- rights |= LLRelationship::GRANT_ONLINE_STATUS;
- (*itr)->getColumn(LIST_VISIBLE_ONLINE)->setValue(TRUE);
- }
- else
- {
- rights &= ~LLRelationship::GRANT_MAP_LOCATION;
- }
- }
-
- // now check for change in modify object rights, which requires confirmation
- if(buddy_relationship->isRightGrantedTo(LLRelationship::GRANT_MODIFY_OBJECTS) != allow_modify_objects)
- {
- rights_changed = TRUE;
- need_confirmation = TRUE;
-
- if(allow_modify_objects)
- {
- rights |= LLRelationship::GRANT_MODIFY_OBJECTS;
- confirmation_type = GRANT;
- }
- else
- {
- rights &= ~LLRelationship::GRANT_MODIFY_OBJECTS;
- confirmation_type = REVOKE;
- }
- }
-
- if (rights_changed)
- {
- rights_updates.insert(std::make_pair(id, rights));
- // disable these ui elements until response from server
- // to avoid race conditions
- (*itr)->setEnabled(FALSE);
- }
- }
-
- // separately confirm grant and revoke of modify rights
- if (need_confirmation)
- {
- confirmModifyRights(rights_updates, confirmation_type);
- }
- else
- {
- sendRightsGrant(rights_updates);
- }
-}
-
-void LLPanelFriends::sendRightsGrant(rights_map_t& ids)
-{
- if (ids.empty()) return;
-
- LLMessageSystem* msg = gMessageSystem;
-
- // setup message header
- msg->newMessageFast(_PREHASH_GrantUserRights);
- msg->nextBlockFast(_PREHASH_AgentData);
- msg->addUUID(_PREHASH_AgentID, gAgent.getID());
- msg->addUUID(_PREHASH_SessionID, gAgent.getSessionID());
-
- rights_map_t::iterator id_it;
- rights_map_t::iterator end_it = ids.end();
- for(id_it = ids.begin(); id_it != end_it; ++id_it)
- {
- msg->nextBlockFast(_PREHASH_Rights);
- msg->addUUID(_PREHASH_AgentRelated, id_it->first);
- msg->addS32(_PREHASH_RelatedRights, id_it->second);
- }
-
- mNumRightsChanged = ids.size();
- gAgent.sendReliableMessage();
-}
diff --git a/indra/newview/llfloaterfriends.h b/indra/newview/llfloaterfriends.h
deleted file mode 100644
index a303477c95..0000000000
--- a/indra/newview/llfloaterfriends.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/**
- * @file llfloaterfriends.h
- * @author Phoenix
- * @date 2005-01-13
- * @brief Declaration of class for displaying the local agent's friends.
- *
- * $LicenseInfo:firstyear=2005&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_LLFLOATERFRIENDS_H
-#define LL_LLFLOATERFRIENDS_H
-
-#include "llpanel.h"
-#include "llstring.h"
-#include "lluuid.h"
-#include "lltimer.h"
-#include "llcallingcard.h"
-
-class LLFriendObserver;
-class LLRelationship;
-class LLScrollListItem;
-class LLScrollListCtrl;
-
-/**
- * @class LLPanelFriends
- * @brief An instance of this class is used for displaying your friends
- * and gives you quick access to all agents which a user relationship.
- *
- * @sa LLFloater
- */
-class LLPanelFriends : public LLPanel, public LLEventTimer
-{
-public:
- LLPanelFriends();
- virtual ~LLPanelFriends();
-
- /**
- * @brief This method either creates or brings to the front the
- * current instantiation of this floater. There is only once since
- * you can currently only look at your local friends.
- */
- virtual BOOL tick();
-
- /**
- * @brief This method is called in response to the LLAvatarTracker
- * sending out a changed() message.
- */
- void updateFriends(U32 changed_mask);
-
- virtual BOOL postBuild();
-
- // *HACK Made public to remove friends from LLAvatarIconCtrl context menu
- static bool handleRemove(const LLSD& notification, const LLSD& response);
-
-private:
-
- enum FRIENDS_COLUMN_ORDER
- {
- LIST_ONLINE_STATUS,
- LIST_FRIEND_NAME,
- LIST_VISIBLE_ONLINE,
- LIST_VISIBLE_MAP,
- LIST_EDIT_MINE,
- LIST_EDIT_THEIRS,
- LIST_FRIEND_UPDATE_GEN
- };
-
- // protected members
- typedef std::map<LLUUID, S32> rights_map_t;
- void refreshNames(U32 changed_mask);
- BOOL refreshNamesSync(const LLAvatarTracker::buddy_map_t & all_buddies);
- BOOL refreshNamesPresence(const LLAvatarTracker::buddy_map_t & all_buddies);
- void refreshUI();
- void refreshRightsChangeList();
- void applyRightsToFriends();
- BOOL addFriend(const LLUUID& agent_id);
- BOOL updateFriendItem(const LLUUID& agent_id, const LLRelationship* relationship);
-
- typedef enum
- {
- GRANT,
- REVOKE
- } EGrantRevoke;
- void confirmModifyRights(rights_map_t& ids, EGrantRevoke command);
- void sendRightsGrant(rights_map_t& ids);
-
- // return empty vector if nothing is selected
- std::vector<LLUUID> getSelectedIDs();
-
- // callback methods
- static void onSelectName(LLUICtrl* ctrl, void* user_data);
- static bool callbackAddFriend(const LLSD& notification, const LLSD& response);
- static bool callbackAddFriendWithMessage(const LLSD& notification, const LLSD& response);
- static void onPickAvatar(const std::vector<std::string>& names, const std::vector<LLUUID>& ids);
- static void onMaximumSelect();
-
- static void onClickIM(void* user_data);
- static void onClickProfile(void* user_data);
- static void onClickAddFriend(void* user_data);
- static void onClickRemove(void* user_data);
-
- static void onClickOfferTeleport(void* user_data);
- static void onClickPay(void* user_data);
-
- static void onClickModifyStatus(LLUICtrl* ctrl, void* user_data);
-
- bool modifyRightsConfirmation(const LLSD& notification, const LLSD& response, rights_map_t* rights);
-
-private:
- // member data
- LLFriendObserver* mObserver;
- LLUUID mAddFriendID;
- std::string mAddFriendName;
- LLScrollListCtrl* mFriendsList;
- BOOL mShowMaxSelectWarning;
- BOOL mAllowRightsChange;
- S32 mNumRightsChanged;
-};
-
-
-#endif // LL_LLFLOATERFRIENDS_H
diff --git a/indra/newview/llfloaterinspect.cpp b/indra/newview/llfloaterinspect.cpp
index a09b9ea235..cece8d299c 100644
--- a/indra/newview/llfloaterinspect.cpp
+++ b/indra/newview/llfloaterinspect.cpp
@@ -37,6 +37,7 @@
#include "llselectmgr.h"
#include "lltoolcomp.h"
#include "lltoolmgr.h"
+#include "lltrans.h"
#include "llviewercontrol.h"
#include "llviewerobject.h"
#include "lluictrlfactory.h"
@@ -166,6 +167,15 @@ LLUUID LLFloaterInspect::getSelectedUUID()
return LLUUID::null;
}
+void LLFloaterInspect::onGetAvNameCallback(const LLUUID& idCreator, const LLAvatarName& av_name, void* FloaterPtr)
+{
+ if (FloaterPtr)
+ {
+ LLFloaterInspect* floater = (LLFloaterInspect*)FloaterPtr;
+ floater->dirty();
+ }
+}
+
void LLFloaterInspect::refresh()
{
LLUUID creator_id;
@@ -205,11 +215,32 @@ void LLFloaterInspect::refresh()
substitution["datetime"] = (S32) timestamp;
LLStringUtil::format (timeStr, substitution);
+ const LLUUID& idOwner = obj->mPermissions->getOwner();
+ const LLUUID& idCreator = obj->mPermissions->getCreator();
LLAvatarName av_name;
- LLAvatarNameCache::get(obj->mPermissions->getOwner(), &av_name);
- owner_name = av_name.getCompleteName();
- LLAvatarNameCache::get(obj->mPermissions->getCreator(), &av_name);
- creator_name = av_name.getCompleteName();
+
+ // Only work with the names if we actually get a result
+ // from the name cache. If not, defer setting the
+ // actual name and set a placeholder.
+ if (LLAvatarNameCache::get(idOwner, &av_name))
+ {
+ owner_name = av_name.getCompleteName();
+ }
+ else
+ {
+ owner_name = LLTrans::getString("RetrievingData");
+ LLAvatarNameCache::get(idOwner, boost::bind(&LLFloaterInspect::onGetAvNameCallback, _1, _2, this));
+ }
+
+ if (LLAvatarNameCache::get(idCreator, &av_name))
+ {
+ creator_name = av_name.getCompleteName();
+ }
+ else
+ {
+ creator_name = LLTrans::getString("RetrievingData");
+ LLAvatarNameCache::get(idCreator, boost::bind(&LLFloaterInspect::onGetAvNameCallback, _1, _2, this));
+ }
row["id"] = obj->getObject()->getID();
row["columns"][0]["column"] = "object_name";
diff --git a/indra/newview/llfloaterinspect.h b/indra/newview/llfloaterinspect.h
index d9ffdf114b..7ee83ccdb4 100644
--- a/indra/newview/llfloaterinspect.h
+++ b/indra/newview/llfloaterinspect.h
@@ -29,6 +29,7 @@
#ifndef LL_LLFLOATERINSPECT_H
#define LL_LLFLOATERINSPECT_H
+#include "llavatarname.h"
#include "llfloater.h"
//class LLTool;
@@ -53,6 +54,9 @@ public:
void onClickCreatorProfile();
void onClickOwnerProfile();
void onSelectObject();
+
+ static void onGetAvNameCallback(const LLUUID& idCreator, const LLAvatarName& av_name, void* FloaterPtr);
+
LLScrollListCtrl* mObjectList;
protected:
// protected members
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 2bb1075ec4..b13a9aab88 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -1806,7 +1806,6 @@ LLPanelLandOptions::LLPanelLandOptions(LLParcelSelectionHandle& parcel)
mCheckEditGroupObjects(NULL),
mCheckAllObjectEntry(NULL),
mCheckGroupObjectEntry(NULL),
- mCheckEditLand(NULL),
mCheckSafe(NULL),
mCheckFly(NULL),
mCheckGroupScripts(NULL),
@@ -1840,10 +1839,6 @@ BOOL LLPanelLandOptions::postBuild()
mCheckGroupObjectEntry = getChild<LLCheckBoxCtrl>( "group object entry check");
childSetCommitCallback("group object entry check", onCommitAny, this);
- mCheckEditLand = getChild<LLCheckBoxCtrl>( "edit land check");
- childSetCommitCallback("edit land check", onCommitAny, this);
-
-
mCheckGroupScripts = getChild<LLCheckBoxCtrl>( "check group scripts");
childSetCommitCallback("check group scripts", onCommitAny, this);
@@ -1956,9 +1951,6 @@ void LLPanelLandOptions::refresh()
mCheckGroupObjectEntry ->set(FALSE);
mCheckGroupObjectEntry ->setEnabled(FALSE);
- mCheckEditLand ->set(FALSE);
- mCheckEditLand ->setEnabled(FALSE);
-
mCheckSafe ->set(FALSE);
mCheckSafe ->setEnabled(FALSE);
@@ -2006,10 +1998,6 @@ void LLPanelLandOptions::refresh()
mCheckGroupObjectEntry ->set( parcel->getAllowGroupObjectEntry() || parcel->getAllowAllObjectEntry());
mCheckGroupObjectEntry ->setEnabled( can_change_options && !parcel->getAllowAllObjectEntry() );
-
- BOOL can_change_terraform = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_EDIT);
- mCheckEditLand ->set( parcel->getAllowTerraform() );
- mCheckEditLand ->setEnabled( can_change_terraform );
mCheckSafe ->set( !parcel->getAllowDamage() );
mCheckSafe ->setEnabled( can_change_options );
@@ -2235,7 +2223,7 @@ void LLPanelLandOptions::onCommitAny(LLUICtrl *ctrl, void *userdata)
BOOL create_group_objects = self->mCheckEditGroupObjects->get() || self->mCheckEditObjects->get();
BOOL all_object_entry = self->mCheckAllObjectEntry->get();
BOOL group_object_entry = self->mCheckGroupObjectEntry->get() || self->mCheckAllObjectEntry->get();
- BOOL allow_terraform = self->mCheckEditLand->get();
+ BOOL allow_terraform = false; // removed from UI so always off now - self->mCheckEditLand->get();
BOOL allow_damage = !self->mCheckSafe->get();
BOOL allow_fly = self->mCheckFly->get();
BOOL allow_landmark = TRUE; // cannot restrict landmark creation
diff --git a/indra/newview/llfloaterland.h b/indra/newview/llfloaterland.h
index 6fceca1acd..4f1c10274a 100644
--- a/indra/newview/llfloaterland.h
+++ b/indra/newview/llfloaterland.h
@@ -330,7 +330,6 @@ private:
LLCheckBoxCtrl* mCheckEditGroupObjects;
LLCheckBoxCtrl* mCheckAllObjectEntry;
LLCheckBoxCtrl* mCheckGroupObjectEntry;
- LLCheckBoxCtrl* mCheckEditLand;
LLCheckBoxCtrl* mCheckSafe;
LLCheckBoxCtrl* mCheckFly;
LLCheckBoxCtrl* mCheckGroupScripts;
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 1148db8b5a..64bdcccd9f 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -26,6 +26,10 @@
#include "llviewerprecompiledheaders.h"
+#if LL_MSVC
+#pragma warning (disable : 4263)
+#pragma warning (disable : 4264)
+#endif
#include "dae.h"
//#include "dom.h"
#include "dom/domAsset.h"
@@ -47,6 +51,10 @@
#include "dom/domScale.h"
#include "dom/domTranslate.h"
#include "dom/domVisual_scene.h"
+#if LL_MSVC
+#pragma warning (default : 4263)
+#pragma warning (default : 4264)
+#endif
#include "llfloatermodelpreview.h"
@@ -1006,38 +1014,38 @@ void LLFloaterModelPreview::onPhysicsBrowse(LLUICtrl* ctrl, void* userdata)
//static
void LLFloaterModelPreview::onPhysicsUseLOD(LLUICtrl* ctrl, void* userdata)
{
- S32 num_modes = 4;
- S32 which_mode = 3;
- static S32 previous_mode = which_mode;
+ S32 num_lods = 4;
+ S32 which_mode;
LLCtrlSelectionInterface* iface = sInstance->childGetSelectionInterface("physics_lod_combo");
if (iface)
{
which_mode = iface->getFirstSelectedIndex();
}
+ else
+ {
+ llwarns << "no iface" << llendl;
+ return;
+ }
- S32 file_mode = iface->getItemCount() - 1;
- bool file_browse = which_mode == file_mode;
- bool lod_to_file = file_browse && (previous_mode != file_mode);
- bool file_to_lod = !file_browse && (previous_mode == file_mode);
-
- if (!lod_to_file)
+ if (which_mode <= 0)
{
- which_mode = num_modes - which_mode;
- sInstance->mModelPreview->setPhysicsFromLOD(which_mode);
+ llwarns << "which_mode out of range, " << which_mode << llendl;
}
- if (lod_to_file || file_to_lod)
+ S32 file_mode = iface->getItemCount() - 1;
+ if (which_mode < file_mode)
{
- LLModelPreview *model_preview = sInstance->mModelPreview;
- if (model_preview)
- {
- model_preview->refresh();
- model_preview->updateStatusMessages();
- }
+ S32 which_lod = num_lods - which_mode;
+ sInstance->mModelPreview->setPhysicsFromLOD(which_lod);
}
- previous_mode = which_mode;
+ LLModelPreview *model_preview = sInstance->mModelPreview;
+ if (model_preview)
+ {
+ model_preview->refresh();
+ model_preview->updateStatusMessages();
+ }
}
//static
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index cfa35fa561..1b3290d5a8 100644
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -100,9 +100,6 @@ S32 BORDER_WIDTH = 6;
const S32 MAX_POSTCARD_DATASIZE = 1024 * 1024; // one megabyte
const S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512
-static std::string lastSnapshotWidthName(S32 shot_type);
-static std::string lastSnapshotHeightName(S32 shot_type);
-
static LLDefaultChildRegistry::Register<LLSnapshotFloaterView> r("snapshot_floater_view");
///----------------------------------------------------------------------------
@@ -138,7 +135,11 @@ public:
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent);
void setSize(S32 w, S32 h);
+ void setWidth(S32 w) { mWidth[mCurImageIndex] = w; }
+ void setHeight(S32 h) { mHeight[mCurImageIndex] = h; }
void getSize(S32& w, S32& h) const;
+ S32 getWidth() const { return mWidth[mCurImageIndex]; }
+ S32 getHeight() const { return mHeight[mCurImageIndex]; }
S32 getDataSize() const { return mDataSize; }
void setMaxImageSize(S32 size) ;
S32 getMaxImageSize() {return mMaxImageSize ;}
@@ -155,8 +156,9 @@ public:
LLViewerTexture* getCurrentImage();
F32 getImageAspect();
F32 getAspect() ;
- LLRect getImageRect();
- BOOL isImageScaled();
+ const LLRect& getImageRect() const { return mImageRect[mCurImageIndex]; }
+ BOOL isImageScaled() const { return mImageScaled[mCurImageIndex]; }
+ void setImageScaled(BOOL scaled) { mImageScaled[mCurImageIndex] = scaled; }
const LLVector3d& getPosTakenGlobal() const { return mPosTakenGlobal; }
void setSnapshotType(ESnapshotType type) { mSnapshotType = type; }
@@ -171,6 +173,7 @@ public:
LLPointer<LLImageFormatted> getFormattedImage() const { return mFormattedImage; }
LLPointer<LLImageRaw> getEncodedImage() const { return mPreviewImageEncoded; }
+ /// Sets size of preview thumbnail image and thhe surrounding rect.
BOOL setThumbnailImageSize() ;
void generateThumbnailImage(BOOL force_update = FALSE) ;
void resetThumbnailImage() { mThumbnailImage = NULL ; }
@@ -299,7 +302,7 @@ LLViewerTexture* LLSnapshotLivePreview::getCurrentImage()
F32 LLSnapshotLivePreview::getAspect()
{
- F32 image_aspect_ratio = ((F32)mWidth[mCurImageIndex]) / ((F32)mHeight[mCurImageIndex]);
+ F32 image_aspect_ratio = ((F32)getWidth()) / ((F32)getHeight());
F32 window_aspect_ratio = ((F32)getRect().getWidth()) / ((F32)getRect().getHeight());
if (!mKeepAspectRatio)//gSavedSettings.getBOOL("KeepAspectForSnapshot"))
@@ -314,7 +317,7 @@ F32 LLSnapshotLivePreview::getAspect()
F32 LLSnapshotLivePreview::getImageAspect()
{
- if (!mViewerImage[mCurImageIndex])
+ if (!getCurrentImage())
{
return 0.f;
}
@@ -322,33 +325,25 @@ F32 LLSnapshotLivePreview::getImageAspect()
return getAspect() ;
}
-LLRect LLSnapshotLivePreview::getImageRect()
-{
- return mImageRect[mCurImageIndex];
-}
-
-BOOL LLSnapshotLivePreview::isImageScaled()
-{
- return mImageScaled[mCurImageIndex];
-}
-
void LLSnapshotLivePreview::updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail, F32 delay)
{
- lldebugs << "updateSnapshot: mSnapshotUpToDate = " << mSnapshotUpToDate << llendl;
- if (mSnapshotUpToDate)
+ // Invalidate current image.
+ lldebugs << "updateSnapshot: mSnapshotUpToDate = " << getSnapshotUpToDate() << llendl;
+ if (getSnapshotUpToDate())
{
S32 old_image_index = mCurImageIndex;
mCurImageIndex = (mCurImageIndex + 1) % 2;
- mWidth[mCurImageIndex] = mWidth[old_image_index];
- mHeight[mCurImageIndex] = mHeight[old_image_index];
+ setWidth(mWidth[old_image_index]);
+ setHeight(mHeight[old_image_index]);
mFallAnimTimer.start();
}
mSnapshotUpToDate = FALSE;
+ // Update snapshot source rect depending on whether we keep the aspect ratio.
LLRect& rect = mImageRect[mCurImageIndex];
rect.set(0, getRect().getHeight(), getRect().getWidth(), 0);
- F32 image_aspect_ratio = ((F32)mWidth[mCurImageIndex]) / ((F32)mHeight[mCurImageIndex]);
+ F32 image_aspect_ratio = ((F32)getWidth()) / ((F32)getHeight());
F32 window_aspect_ratio = ((F32)getRect().getWidth()) / ((F32)getRect().getHeight());
if (mKeepAspectRatio)//gSavedSettings.getBOOL("KeepAspectForSnapshot"))
@@ -369,13 +364,18 @@ void LLSnapshotLivePreview::updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail
}
}
+ // Stop shining animation.
mShineAnimTimer.stop();
+
+ // Update snapshot if requested.
if (new_snapshot)
{
mSnapshotDelayTimer.start();
mSnapshotDelayTimer.setTimerExpirySec(delay);
LLFloaterSnapshot::preUpdate();
}
+
+ // Update thumbnail if requested.
if(new_thumbnail)
{
mThumbnailUpToDate = FALSE ;
@@ -435,23 +435,23 @@ void LLSnapshotLivePreview::drawPreviewRect(S32 offset_x, S32 offset_y)
//called when the frame is frozen.
void LLSnapshotLivePreview::draw()
{
- if (mViewerImage[mCurImageIndex].notNull() &&
+ if (getCurrentImage() &&
mPreviewImageEncoded.notNull() &&
- mSnapshotUpToDate)
+ getSnapshotUpToDate())
{
LLColor4 bg_color(0.f, 0.f, 0.3f, 0.4f);
gl_rect_2d(getRect(), bg_color);
- LLRect &rect = mImageRect[mCurImageIndex];
- LLRect shadow_rect = mImageRect[mCurImageIndex];
+ const LLRect& rect = getImageRect();
+ LLRect shadow_rect = rect;
shadow_rect.stretch(BORDER_WIDTH);
gl_drop_shadow(shadow_rect.mLeft, shadow_rect.mTop, shadow_rect.mRight, shadow_rect.mBottom, LLColor4(0.f, 0.f, 0.f, mNeedsFlash ? 0.f :0.5f), 10);
LLColor4 image_color(1.f, 1.f, 1.f, 1.f);
gGL.color4fv(image_color.mV);
- gGL.getTexUnit(0)->bind(mViewerImage[mCurImageIndex]);
+ gGL.getTexUnit(0)->bind(getCurrentImage());
// calculate UV scale
- F32 uv_width = mImageScaled[mCurImageIndex] ? 1.f : llmin((F32)mWidth[mCurImageIndex] / (F32)mViewerImage[mCurImageIndex]->getWidth(), 1.f);
- F32 uv_height = mImageScaled[mCurImageIndex] ? 1.f : llmin((F32)mHeight[mCurImageIndex] / (F32)mViewerImage[mCurImageIndex]->getHeight(), 1.f);
+ F32 uv_width = isImageScaled() ? 1.f : llmin((F32)getWidth() / (F32)getCurrentImage()->getWidth(), 1.f);
+ F32 uv_height = isImageScaled() ? 1.f : llmin((F32)getHeight() / (F32)getCurrentImage()->getHeight(), 1.f);
gGL.pushMatrix();
{
gGL.translatef((F32)rect.mLeft, (F32)rect.mBottom, 0.f);
@@ -491,6 +491,7 @@ void LLSnapshotLivePreview::draw()
mFlashAlpha = lerp(mFlashAlpha, 0.f, LLCriticalDamp::getInterpolant(0.15f));
}
+ // Draw shining animation if appropriate.
if (mShineCountdown > 0)
{
mShineCountdown--;
@@ -501,6 +502,7 @@ void LLSnapshotLivePreview::draw()
}
else if (mShineAnimTimer.getStarted())
{
+ lldebugs << "Drawing shining animation" << llendl;
F32 shine_interp = llmin(1.f, mShineAnimTimer.getElapsedTimeF32() / SHINE_TIME);
// draw "shine" effect
@@ -545,7 +547,7 @@ void LLSnapshotLivePreview::draw()
{
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gGL.color4f(1.f, 1.f, 1.f, 1.f);
- LLRect outline_rect = mImageRect[mCurImageIndex];
+ const LLRect& outline_rect = getImageRect();
gGL.begin(LLRender::QUADS);
{
gGL.vertex2i(outline_rect.mLeft - BORDER_WIDTH, outline_rect.mTop + BORDER_WIDTH);
@@ -577,6 +579,7 @@ void LLSnapshotLivePreview::draw()
S32 old_image_index = (mCurImageIndex + 1) % 2;
if (mViewerImage[old_image_index].notNull() && mFallAnimTimer.getElapsedTimeF32() < FALL_TIME)
{
+ lldebugs << "Drawing fall animation" << llendl;
F32 fall_interp = mFallAnimTimer.getElapsedTimeF32() / FALL_TIME;
F32 alpha = clamp_rescale(fall_interp, 0.f, 1.f, 0.8f, 0.4f);
LLColor4 image_color(1.f, 1.f, 1.f, alpha);
@@ -620,13 +623,14 @@ void LLSnapshotLivePreview::reshape(S32 width, S32 height, BOOL called_from_pare
LLView::reshape(width, height, called_from_parent);
if (old_rect.getWidth() != width || old_rect.getHeight() != height)
{
+ lldebugs << "window reshaped, updating thumbnail" << llendl;
updateSnapshot(FALSE, TRUE);
}
}
BOOL LLSnapshotLivePreview::setThumbnailImageSize()
{
- if(mWidth[mCurImageIndex] < 10 || mHeight[mCurImageIndex] < 10)
+ if(getWidth() < 10 || getHeight() < 10)
{
return FALSE ;
}
@@ -662,11 +666,11 @@ BOOL LLSnapshotLivePreview::setThumbnailImageSize()
S32 left = 0 , top = mThumbnailHeight, right = mThumbnailWidth, bottom = 0 ;
if(!mKeepAspectRatio)
{
- F32 ratio_x = (F32)mWidth[mCurImageIndex] / window_width ;
- F32 ratio_y = (F32)mHeight[mCurImageIndex] / window_height ;
+ F32 ratio_x = (F32)getWidth() / window_width ;
+ F32 ratio_y = (F32)getHeight() / window_height ;
- //if(mWidth[mCurImageIndex] > window_width ||
- // mHeight[mCurImageIndex] > window_height )
+ //if(getWidth() > window_width ||
+ // getHeight() > window_height )
{
if(ratio_x > ratio_y)
{
@@ -698,11 +702,11 @@ void LLSnapshotLivePreview::generateThumbnailImage(BOOL force_update)
{
return ;
}
- if(mThumbnailUpToDate && !force_update)//already updated
+ if(getThumbnailUpToDate() && !force_update)//already updated
{
return ;
}
- if(mWidth[mCurImageIndex] < 10 || mHeight[mCurImageIndex] < 10)
+ if(getWidth() < 10 || getHeight() < 10)
{
return ;
}
@@ -750,15 +754,13 @@ void LLSnapshotLivePreview::generateThumbnailImage(BOOL force_update)
BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
{
LLSnapshotLivePreview* previewp = (LLSnapshotLivePreview*)snapshot_preview;
-
-#if 1 // XXX tmp
- if (previewp->mWidth[previewp->mCurImageIndex] == 0 || previewp->mHeight[previewp->mCurImageIndex] == 0)
+ if (previewp->getWidth() == 0 || previewp->getHeight() == 0)
{
- llwarns << "Incorrect dimensions: " << previewp->mWidth[previewp->mCurImageIndex] << "x" << previewp->mHeight[previewp->mCurImageIndex] << llendl;
+ llwarns << "Incorrect dimensions: " << previewp->getWidth() << "x" << previewp->getHeight() << llendl;
return FALSE;
}
-#endif
+ // If we're in freeze-frame mode and camera has moved, update snapshot.
LLVector3 new_camera_pos = LLViewerCamera::getInstance()->getOrigin();
LLQuaternion new_camera_rot = LLViewerCamera::getInstance()->getQuaternion();
if (gSavedSettings.getBOOL("FreezeTime") &&
@@ -768,6 +770,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
previewp->mCameraRot = new_camera_rot;
// request a new snapshot whenever the camera moves, with a time delay
BOOL autosnap = gSavedSettings.getBOOL("AutoSnapshot");
+ lldebugs << "camera moved, updating thumbnail" << llendl;
previewp->updateSnapshot(
autosnap, // whether a new snapshot is needed or merely invalidate the existing one
FALSE, // or if 1st arg is false, whether to produce a new thumbnail image.
@@ -801,13 +804,13 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
previewp->setEnabled(FALSE);
previewp->getWindow()->incBusyCount();
- previewp->mImageScaled[previewp->mCurImageIndex] = FALSE;
+ previewp->setImageScaled(FALSE);
// grab the raw image and encode it into desired format
if(gViewerWindow->rawSnapshot(
previewp->mPreviewImage,
- previewp->mWidth[previewp->mCurImageIndex],
- previewp->mHeight[previewp->mCurImageIndex],
+ previewp->getWidth(),
+ previewp->getHeight(),
previewp->mKeepAspectRatio,//gSavedSettings.getBOOL("KeepAspectForSnapshot"),
previewp->getSnapshotType() == LLSnapshotLivePreview::SNAPSHOT_TEXTURE,
gSavedSettings.getBOOL("RenderUIInSnapshot"),
@@ -831,7 +834,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
previewp->mPreviewImage->getComponents());
scaled->biasedScaleToPowerOfTwo(512);
- previewp->mImageScaled[previewp->mCurImageIndex] = TRUE;
+ previewp->setImageScaled(TRUE);
if (formatted->encode(scaled, 0.f))
{
previewp->mDataSize = formatted->getDataSize();
@@ -886,7 +889,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
{
// go ahead and shrink image to appropriate power of 2 for display
scaled->biasedScaleToPowerOfTwo(1024);
- previewp->mImageScaled[previewp->mCurImageIndex] = TRUE;
+ previewp->setImageScaled(TRUE);
}
else
{
@@ -933,14 +936,14 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
void LLSnapshotLivePreview::setSize(S32 w, S32 h)
{
lldebugs << "setSize(" << w << ", " << h << ")" << llendl;
- mWidth[mCurImageIndex] = w;
- mHeight[mCurImageIndex] = h;
+ setWidth(w);
+ setHeight(h);
}
void LLSnapshotLivePreview::getSize(S32& w, S32& h) const
{
- w = mWidth[mCurImageIndex];
- h = mHeight[mCurImageIndex];
+ w = getWidth();
+ h = getHeight();
}
void LLSnapshotLivePreview::saveTexture()
@@ -959,7 +962,7 @@ void LLSnapshotLivePreview::saveTexture()
scaled->biasedScaleToPowerOfTwo(512);
lldebugs << "scaled texture to " << scaled->getWidth() << "x" << scaled->getHeight() << llendl;
-
+
if (formatted->encode(scaled, 0.0f))
{
LLVFile::writeFile(formatted->getData(), formatted->getDataSize(), gVFS, new_asset_id, LLAssetType::AT_TEXTURE);
@@ -1068,24 +1071,18 @@ public:
static void onClickMore(void* data) ;
static void onClickUICheck(LLUICtrl *ctrl, void* data);
static void onClickHUDCheck(LLUICtrl *ctrl, void* data);
-#if 0
- static void onClickKeepAspectCheck(LLUICtrl *ctrl, void* data);
-#endif
static void applyKeepAspectCheck(LLFloaterSnapshot* view, BOOL checked);
static void updateResolution(LLUICtrl* ctrl, void* data, BOOL do_update = TRUE);
static void onCommitFreezeFrame(LLUICtrl* ctrl, void* data);
static void onCommitLayerTypes(LLUICtrl* ctrl, void*data);
static void onImageQualityChange(LLFloaterSnapshot* view, S32 quality_val);
static void onImageFormatChange(LLFloaterSnapshot* view);
-#if 0
- static void onCommitSnapshotType(LLUICtrl* ctrl, void* data);
- static void onCommitCustomResolution(LLUICtrl *ctrl, void* data);
-#endif
static void applyCustomResolution(LLFloaterSnapshot* view, S32 w, S32 h);
static void onSnapshotUploadFinished(bool status);
static void onSendingPostcardFinished(bool status);
- static void resetSnapshotSizeOnUI(LLFloaterSnapshot *view, S32 width, S32 height) ;
static BOOL checkImageSize(LLSnapshotLivePreview* previewp, S32& width, S32& height, BOOL isWidthChanged, S32 max_value);
+ static void setImageSizeSpinnersValues(LLFloaterSnapshot *view, S32 width, S32 height) ;
+ static void updateSpinners(LLFloaterSnapshot* view, LLSnapshotLivePreview* previewp, S32& width, S32& height, BOOL is_width_changed);
static LLPanelSnapshot* getActivePanel(LLFloaterSnapshot* floater, bool ok_if_not_found = true);
static LLSnapshotLivePreview::ESnapshotType getActiveSnapshotType(LLFloaterSnapshot* floater);
@@ -1256,16 +1253,9 @@ void LLFloaterSnapshot::Impl::updateLayout(LLFloaterSnapshot* floaterp)
previewp->mKeepAspectRatio = TRUE;
floaterp->getChild<LLComboBox>("profile_size_combo")->setCurrentByIndex(0);
- gSavedSettings.setS32("SnapshotProfileLastResolution", 0);
-
floaterp->getChild<LLComboBox>("postcard_size_combo")->setCurrentByIndex(0);
- gSavedSettings.setS32("SnapshotPostcardLastResolution", 0);
-
floaterp->getChild<LLComboBox>("texture_size_combo")->setCurrentByIndex(0);
- gSavedSettings.setS32("SnapshotTextureLastResolution", 0);
-
floaterp->getChild<LLComboBox>("local_size_combo")->setCurrentByIndex(0);
- gSavedSettings.setS32("SnapshotLocalLastResolution", 0);
LLSnapshotLivePreview* previewp = getPreviewView(floaterp);
previewp->setSize(gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw());
@@ -1349,19 +1339,7 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
floater->getChildView("share_to_web")->setVisible( gSavedSettings.getBOOL("SnapshotSharingEnabled"));
#endif
-#if 0
- floater->getChildView("postcard_size_combo")->setVisible( FALSE);
- floater->getChildView("texture_size_combo")->setVisible( FALSE);
- floater->getChildView("local_size_combo")->setVisible( FALSE);
-#endif
-
- floater->getChild<LLComboBox>("profile_size_combo")->selectNthItem(gSavedSettings.getS32("SnapshotProfileLastResolution"));
- floater->getChild<LLComboBox>("postcard_size_combo")->selectNthItem(gSavedSettings.getS32("SnapshotPostcardLastResolution"));
- floater->getChild<LLComboBox>("texture_size_combo")->selectNthItem(gSavedSettings.getS32("SnapshotTextureLastResolution"));
- floater->getChild<LLComboBox>("local_size_combo")->selectNthItem(gSavedSettings.getS32("SnapshotLocalLastResolution"));
floater->getChild<LLComboBox>("local_format_combo")->selectNthItem(gSavedSettings.getS32("SnapshotFormat"));
-
- // *TODO: Separate settings for Web images from postcards
enableAspectRatioCheckbox(floater, !floater->impl.mAspectRatioCheckOff);
setAspectRatioCheckboxValue(floater, gSavedSettings.getBOOL("KeepAspectForSnapshot"));
floater->getChildView("layer_types")->setEnabled(shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL);
@@ -1375,19 +1353,20 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
// Initialize spinners.
if (width_ctrl->getValue().asInteger() == 0)
{
- S32 w = gSavedSettings.getS32(lastSnapshotWidthName(shot_type));
+ S32 w = gViewerWindow->getWindowWidthRaw();
lldebugs << "Initializing width spinner (" << width_ctrl->getName() << "): " << w << llendl;
width_ctrl->setValue(w);
}
if (height_ctrl->getValue().asInteger() == 0)
{
- S32 h = gSavedSettings.getS32(lastSnapshotHeightName(shot_type));
+ S32 h = gViewerWindow->getWindowHeightRaw();
lldebugs << "Initializing height spinner (" << height_ctrl->getName() << "): " << h << llendl;
height_ctrl->setValue(h);
}
+ // Сlamp snapshot resolution to window size when showing UI or HUD in snapshot.
if (gSavedSettings.getBOOL("RenderUIInSnapshot") || gSavedSettings.getBOOL("RenderHUDInSnapshot"))
- { //clamp snapshot resolution to window size when showing UI or HUD in snapshot
+ {
S32 width = gViewerWindow->getWindowWidthRaw();
S32 height = gViewerWindow->getWindowHeightRaw();
@@ -1416,7 +1395,7 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
BOOL got_snap = previewp && previewp->getSnapshotUpToDate();
// *TODO: Separate maximum size for Web images from postcards
- //lldebugs << "Is snapshot up-to-date? " << got_snap << llendl;
+ lldebugs << "Is snapshot up-to-date? " << got_snap << llendl;
LLLocale locale(LLLocale::USER_LOCALE);
std::string bytes_string;
@@ -1441,6 +1420,7 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
&& got_bytes
&& previewp->getDataSize() > MAX_POSTCARD_DATASIZE ? LLUIColor(LLColor4::red) : LLUIColorTable::instance().getColor( "LabelTextColor" ));
+ // Update the width and height spinners based on the corresponding resolution combos. (?)
switch(shot_type)
{
case LLSnapshotLivePreview::SNAPSHOT_WEB:
@@ -1520,6 +1500,7 @@ void LLFloaterSnapshot::Impl::checkAutoSnapshot(LLSnapshotLivePreview* previewp,
if (previewp)
{
BOOL autosnap = gSavedSettings.getBOOL("AutoSnapshot");
+ lldebugs << "updating " << (autosnap ? "snapshot" : "thumbnail") << llendl;
previewp->updateSnapshot(autosnap, update_thumbnail, autosnap ? AUTO_SNAPSHOT_TIME_DELAY : 0.f);
}
}
@@ -1532,6 +1513,7 @@ void LLFloaterSnapshot::Impl::onClickNewSnapshot(void* data)
if (previewp && view)
{
view->impl.setStatus(Impl::STATUS_READY);
+ lldebugs << "updating snapshot" << llendl;
previewp->updateSnapshot(TRUE);
}
}
@@ -1559,17 +1541,8 @@ void LLFloaterSnapshot::Impl::onClickMore(void* data)
{
view->impl.setStatus(Impl::STATUS_READY);
gSavedSettings.setBOOL("AdvanceSnapshot", !visible);
-#if 0
- view->translate( 0, view->getUIWinHeightShort() - view->getUIWinHeightLong() );
- view->reshape(view->getRect().getWidth(), view->getUIWinHeightLong());
-#endif
updateControls(view) ;
updateLayout(view) ;
- // *TODO: redundant?
- if(getPreviewView(view))
- {
- getPreviewView(view)->setThumbnailImageSize() ;
- }
}
}
@@ -1601,16 +1574,6 @@ void LLFloaterSnapshot::Impl::onClickHUDCheck(LLUICtrl *ctrl, void* data)
}
}
-#if 0
-// static
-void LLFloaterSnapshot::Impl::onClickKeepAspectCheck(LLUICtrl* ctrl, void* data)
-{
- LLCheckBoxCtrl *check = (LLCheckBoxCtrl *)ctrl;
- LLFloaterSnapshot *view = (LLFloaterSnapshot *)data;
- applyKeepAspectCheck(view, check->get());
-}
-#endif
-
// static
void LLFloaterSnapshot::Impl::applyKeepAspectCheck(LLFloaterSnapshot* view, BOOL checked)
{
@@ -1625,11 +1588,9 @@ void LLFloaterSnapshot::Impl::applyKeepAspectCheck(LLFloaterSnapshot* view, BOOL
S32 w, h ;
previewp->getSize(w, h) ;
- if(checkImageSize(previewp, w, h, TRUE, previewp->getMaxImageSize()))
- {
- resetSnapshotSizeOnUI(view, w, h) ;
- }
+ updateSpinners(view, previewp, w, h, TRUE); // may change w and h
+ lldebugs << "updating thumbnail" << llendl;
previewp->setSize(w, h) ;
previewp->updateSnapshot(FALSE, TRUE);
checkAutoSnapshot(previewp, TRUE);
@@ -1664,39 +1625,31 @@ void LLFloaterSnapshot::Impl::checkAspectRatio(LLFloaterSnapshot *view, S32 inde
previewp->mKeepAspectRatio = FALSE ;
return ;
}
-
- if(0 == index) //current window size
- {
- view->impl.mAspectRatioCheckOff = true ;
- enableAspectRatioCheckbox(view, FALSE);
- if(previewp)
- {
- previewp->mKeepAspectRatio = TRUE ;
- }
+ BOOL keep_aspect = FALSE, enable_cb = FALSE;
+
+ if (0 == index) // current window size
+ {
+ enable_cb = FALSE;
+ keep_aspect = TRUE;
}
- else if(-1 == index) //custom
+ else if (-1 == index) // custom
{
- view->impl.mAspectRatioCheckOff = false ;
- enableAspectRatioCheckbox(view, TRUE);
-
- if(previewp)
- {
- previewp->mKeepAspectRatio = gSavedSettings.getBOOL("KeepAspectForSnapshot") ;
- }
+ enable_cb = TRUE;
+ keep_aspect = gSavedSettings.getBOOL("KeepAspectForSnapshot");
}
- else
+ else // predefined resolution
{
- view->impl.mAspectRatioCheckOff = true ;
- enableAspectRatioCheckbox(view, FALSE);
-
- if(previewp)
- {
- previewp->mKeepAspectRatio = FALSE ;
- }
+ enable_cb = FALSE;
+ keep_aspect = FALSE;
}
- return ;
+ view->impl.mAspectRatioCheckOff = !enable_cb;
+ enableAspectRatioCheckbox(view, enable_cb);
+ if (previewp)
+ {
+ previewp->mKeepAspectRatio = keep_aspect;
+ }
}
// Show/hide upload progress indicators.
@@ -1743,27 +1696,6 @@ void LLFloaterSnapshot::Impl::setFinished(LLFloaterSnapshot* floater, bool finis
}
}
-static std::string lastSnapshotWidthName(S32 shot_type)
-{
- switch (shot_type)
- {
- case LLSnapshotLivePreview::SNAPSHOT_WEB: return "LastSnapshotToProfileWidth";
- case LLSnapshotLivePreview::SNAPSHOT_POSTCARD: return "LastSnapshotToEmailWidth";
- case LLSnapshotLivePreview::SNAPSHOT_TEXTURE: return "LastSnapshotToInventoryWidth";
- default: return "LastSnapshotToDiskWidth";
- }
-}
-static std::string lastSnapshotHeightName(S32 shot_type)
-{
- switch (shot_type)
- {
- case LLSnapshotLivePreview::SNAPSHOT_WEB: return "LastSnapshotToProfileHeight";
- case LLSnapshotLivePreview::SNAPSHOT_POSTCARD: return "LastSnapshotToEmailHeight";
- case LLSnapshotLivePreview::SNAPSHOT_TEXTURE: return "LastSnapshotToInventoryHeight";
- default: return "LastSnapshotToDiskHeight";
- }
-}
-
// static
void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL do_update)
{
@@ -1776,12 +1708,6 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL
return;
}
- // save off all selected resolution values
- gSavedSettings.setS32("SnapshotProfileLastResolution", view->getChild<LLComboBox>("profile_size_combo")->getCurrentIndex());
- gSavedSettings.setS32("SnapshotPostcardLastResolution", view->getChild<LLComboBox>("postcard_size_combo")->getCurrentIndex());
- gSavedSettings.setS32("SnapshotTextureLastResolution", view->getChild<LLComboBox>("texture_size_combo")->getCurrentIndex());
- gSavedSettings.setS32("SnapshotLocalLastResolution", view->getChild<LLComboBox>("local_size_combo")->getCurrentIndex());
-
std::string sdstring = combobox->getSelectedValue();
LLSD sdres;
std::stringstream sstream(sdstring);
@@ -1805,7 +1731,6 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL
else if (width == -1 || height == -1)
{
// load last custom value
-#if 1
S32 new_width = 0, new_height = 0;
LLPanelSnapshot* spanel = getActivePanel(view);
if (spanel)
@@ -1816,23 +1741,14 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL
}
else
{
- const S32 shot_type = getActiveSnapshotType(view);
- lldebugs << "Loading saved res for shot_type " << shot_type << llendl;
- new_width = gSavedSettings.getS32(lastSnapshotWidthName(shot_type));
- new_height = gSavedSettings.getS32(lastSnapshotHeightName(shot_type));
+ lldebugs << "No custom res chosen, setting preview res from window: "
+ << gViewerWindow->getWindowWidthRaw() << "x" << gViewerWindow->getWindowHeightRaw() << llendl;
+ new_width = gViewerWindow->getWindowWidthRaw();
+ new_height = gViewerWindow->getWindowHeightRaw();
}
llassert(new_width > 0 && new_height > 0);
previewp->setSize(new_width, new_height);
-#else
- LLPanelSnapshot* spanel = getActivePanel(view);
- if (spanel)
- {
- lldebugs << "Setting custom preview res : " << spanel->getTypedPreviewWidth() << "x" << spanel->getTypedPreviewHeight() << llendl;
- previewp->setSize(spanel->getTypedPreviewWidth(), spanel->getTypedPreviewHeight());
- }
- //previewp->setSize(gSavedSettings.getS32(lastSnapshotWidthName()), gSavedSettings.getS32(lastSnapshotHeightName()));
-#endif
}
else
{
@@ -1851,11 +1767,7 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL
height = llmin(height, gViewerWindow->getWindowHeightRaw());
}
-
- if(checkImageSize(previewp, width, height, TRUE, previewp->getMaxImageSize()))
- {
- resetSnapshotSizeOnUI(view, width, height) ;
- }
+ updateSpinners(view, previewp, width, height, TRUE); // may change width and height
if(getWidthSpinner(view)->getValue().asInteger() != width || getHeightSpinner(view)->getValue().asInteger() != height)
{
@@ -1869,9 +1781,11 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL
// hide old preview as the aspect ratio could be wrong
checkAutoSnapshot(previewp, FALSE);
+ lldebugs << "updating thumbnail" << llendl;
getPreviewView(view)->updateSnapshot(FALSE, TRUE);
if(do_update)
{
+ lldebugs << "Will update controls" << llendl;
updateControls(view);
setNeedRefresh(view, true);
}
@@ -1914,93 +1828,29 @@ void LLFloaterSnapshot::Impl::onImageFormatChange(LLFloaterSnapshot* view)
if (view)
{
gSavedSettings.setS32("SnapshotFormat", getImageFormat(view));
+ lldebugs << "image format changed, updating snapshot" << llendl;
getPreviewView(view)->updateSnapshot(TRUE);
updateControls(view);
setNeedRefresh(view, false); // we're refreshing
}
}
-#if 0
-//static
-void LLFloaterSnapshot::Impl::onCommitSnapshotType(LLUICtrl* ctrl, void* data)
-{
- LLFloaterSnapshot *view = (LLFloaterSnapshot *)data;
- if (view)
- {
- gSavedSettings.setS32("LastSnapshotType", getTypeIndex(view));
- getPreviewView(view)->updateSnapshot(TRUE);
- updateControls(view);
- }
-}
-#endif
-
// Sets the named size combo to "custom" mode.
// static
void LLFloaterSnapshot::Impl::comboSetCustom(LLFloaterSnapshot* floater, const std::string& comboname)
{
LLComboBox* combo = floater->getChild<LLComboBox>(comboname);
-
combo->setCurrentByIndex(combo->getItemCount() - 1); // "custom" is always the last index
-
- if(comboname == "postcard_size_combo")
- {
- gSavedSettings.setS32("SnapshotPostcardLastResolution", combo->getCurrentIndex());
- }
- else if(comboname == "profile_size_combo")
- {
- gSavedSettings.setS32("SnapshotProfileLastResolution", combo->getCurrentIndex());
- }
- else if(comboname == "texture_size_combo")
- {
- gSavedSettings.setS32("SnapshotTextureLastResolution", combo->getCurrentIndex());
- }
- else if(comboname == "local_size_combo")
- {
- gSavedSettings.setS32("SnapshotLocalLastResolution", combo->getCurrentIndex());
- }
-
checkAspectRatio(floater, -1); // -1 means custom
}
-
-
+// Update supplied width and height according to the constrain proportions flag; limit them by max_val.
//static
BOOL LLFloaterSnapshot::Impl::checkImageSize(LLSnapshotLivePreview* previewp, S32& width, S32& height, BOOL isWidthChanged, S32 max_value)
{
S32 w = width ;
S32 h = height ;
- //if texture, ignore aspect ratio setting, round image size to power of 2.
-#if 0 // Don't round texture sizes; textures are commonly stretched in world, profiles, etc and need to be "squashed" during upload, not cropped here
- if(LLSnapshotLivePreview::SNAPSHOT_TEXTURE == gSavedSettings.getS32("LastSnapshotType"))
- {
- if(width > max_value)
- {
- width = max_value ;
- }
- if(height > max_value)
- {
- height = max_value ;
- }
-
- //round to nearest power of 2 based on the direction of movement
- // i.e. higher power of two if increasing texture resolution
- if(gSavedSettings.getS32("LastSnapshotToInventoryWidth") < width ||
- gSavedSettings.getS32("LastSnapshotToInventoryHeight") < height)
- {
- // Up arrow pressed
- width = get_next_power_two(width, MAX_TEXTURE_SIZE) ;
- height = get_next_power_two(height, MAX_TEXTURE_SIZE) ;
- }
- else
- {
- // Down or no change
- width = get_lower_power_two(width, MAX_TEXTURE_SIZE) ;
- height = get_lower_power_two(height, MAX_TEXTURE_SIZE) ;
- }
- }
- else
-#endif
if(previewp && previewp->mKeepAspectRatio)
{
if(gViewerWindow->getWindowWidthRaw() < 1 || gViewerWindow->getWindowHeightRaw() < 1)
@@ -2036,32 +1886,25 @@ BOOL LLFloaterSnapshot::Impl::checkImageSize(LLSnapshotLivePreview* previewp, S3
}
}
}
- else
- {
- }
return (w != width || h != height) ;
}
//static
-void LLFloaterSnapshot::Impl::resetSnapshotSizeOnUI(LLFloaterSnapshot *view, S32 width, S32 height)
+void LLFloaterSnapshot::Impl::setImageSizeSpinnersValues(LLFloaterSnapshot *view, S32 width, S32 height)
{
getWidthSpinner(view)->forceSetValue(width);
getHeightSpinner(view)->forceSetValue(height);
- gSavedSettings.setS32(lastSnapshotWidthName(getActiveSnapshotType(view)), width);
- gSavedSettings.setS32(lastSnapshotHeightName(getActiveSnapshotType(view)), height);
}
-#if 0
-//static
-void LLFloaterSnapshot::Impl::onCommitCustomResolution(LLUICtrl *ctrl, void* data)
+// static
+void LLFloaterSnapshot::Impl::updateSpinners(LLFloaterSnapshot* view, LLSnapshotLivePreview* previewp, S32& width, S32& height, BOOL is_width_changed)
{
- LLFloaterSnapshot *view = (LLFloaterSnapshot *)data;
- S32 w = llfloor((F32)getWidthSpinner(view)->getValue().asReal());
- S32 h = llfloor((F32)getHeightSpinner(view)->getValue().asReal());
- applyCustomResolution(view, w, h);
+ if (checkImageSize(previewp, width, height, is_width_changed, previewp->getMaxImageSize()))
+ {
+ setImageSizeSpinnersValues(view, width, height);
+ }
}
-#endif
// static
void LLFloaterSnapshot::Impl::applyCustomResolution(LLFloaterSnapshot* view, S32 w, S32 h)
@@ -2069,68 +1912,38 @@ void LLFloaterSnapshot::Impl::applyCustomResolution(LLFloaterSnapshot* view, S32
bool need_refresh = false;
lldebugs << "applyCustomResolution(" << w << ", " << h << ")" << llendl;
- if (view)
+ if (!view) return;
+
+ LLSnapshotLivePreview* previewp = getPreviewView(view);
+ if (previewp)
{
- LLSnapshotLivePreview* previewp = getPreviewView(view);
- if (previewp)
- {
- S32 curw,curh;
- previewp->getSize(curw, curh);
-
- if (w != curw || h != curh)
- {
- BOOL update_ = FALSE ;
- //if to upload a snapshot, process spinner input in a special way.
-#if 0 // Don't round texture sizes; textures are commonly stretched in world, profiles, etc and need to be "squashed" during upload, not cropped here
- if(LLSnapshotLivePreview::SNAPSHOT_TEXTURE == gSavedSettings.getS32("LastSnapshotType"))
- {
- S32 spinner_increment = (S32)((LLSpinCtrl*)ctrl)->getIncrement() ;
- S32 dw = w - curw ;
- S32 dh = h - curh ;
- dw = (dw == spinner_increment) ? 1 : ((dw == -spinner_increment) ? -1 : 0) ;
- dh = (dh == spinner_increment) ? 1 : ((dh == -spinner_increment) ? -1 : 0) ;
-
- if(dw)
- {
- w = (dw > 0) ? curw << dw : curw >> -dw ;
- update_ = TRUE ;
- }
- if(dh)
- {
- h = (dh > 0) ? curh << dh : curh >> -dh ;
- update_ = TRUE ;
- }
- }
-#endif
- previewp->setMaxImageSize((S32) getWidthSpinner(view)->getMaxValue()) ;
-
- // Check image size changes the value of height and width
- if(checkImageSize(previewp, w, h, w != curw, previewp->getMaxImageSize())
- || update_)
- {
- resetSnapshotSizeOnUI(view, w, h) ;
- }
+ S32 curw,curh;
+ previewp->getSize(curw, curh);
- previewp->setSize(w,h);
- checkAutoSnapshot(previewp, FALSE);
- previewp->updateSnapshot(FALSE, TRUE);
- comboSetCustom(view, "profile_size_combo");
- comboSetCustom(view, "postcard_size_combo");
- comboSetCustom(view, "texture_size_combo");
- comboSetCustom(view, "local_size_combo");
- need_refresh = true;
- }
- }
+ if (w != curw || h != curh)
+ {
+ //if to upload a snapshot, process spinner input in a special way.
+ previewp->setMaxImageSize((S32) getWidthSpinner(view)->getMaxValue()) ;
- gSavedSettings.setS32(lastSnapshotWidthName(getActiveSnapshotType(view)), w);
- gSavedSettings.setS32(lastSnapshotHeightName(getActiveSnapshotType(view)), h);
+ updateSpinners(view, previewp, w, h, w != curw); // may change w and h
- updateControls(view);
- if (need_refresh)
- {
- setNeedRefresh(view, true); // need to do this after updateControls()
+ previewp->setSize(w,h);
+ checkAutoSnapshot(previewp, FALSE);
+ lldebugs << "applied custom resolution, updating thumbnail" << llendl;
+ previewp->updateSnapshot(FALSE, TRUE);
+ comboSetCustom(view, "profile_size_combo");
+ comboSetCustom(view, "postcard_size_combo");
+ comboSetCustom(view, "texture_size_combo");
+ comboSetCustom(view, "local_size_combo");
+ need_refresh = true;
}
}
+
+ updateControls(view);
+ if (need_refresh)
+ {
+ setNeedRefresh(view, true); // need to do this after updateControls()
+ }
}
// static
@@ -2186,10 +1999,6 @@ BOOL LLFloaterSnapshot::postBuild()
LLWebSharing::instance().init();
}
-#if 0
- childSetCommitCallback("snapshot_type_radio", Impl::onCommitSnapshotType, this);
-#endif
-
mRefreshBtn = getChild<LLUICtrl>("new_snapshot_btn");
childSetAction("new_snapshot_btn", Impl::onClickNewSnapshot, this);
mRefreshLabel = getChild<LLUICtrl>("refresh_lbl");
@@ -2198,31 +2007,18 @@ BOOL LLFloaterSnapshot::postBuild()
childSetAction("advanced_options_btn", Impl::onClickMore, this);
-#if 0
- childSetCommitCallback("snapshot_width", Impl::onCommitCustomResolution, this);
- childSetCommitCallback("snapshot_height", Impl::onCommitCustomResolution, this);
-#endif
-
childSetCommitCallback("ui_check", Impl::onClickUICheck, this);
getChild<LLUICtrl>("ui_check")->setValue(gSavedSettings.getBOOL("RenderUIInSnapshot"));
childSetCommitCallback("hud_check", Impl::onClickHUDCheck, this);
getChild<LLUICtrl>("hud_check")->setValue(gSavedSettings.getBOOL("RenderHUDInSnapshot"));
-#if 0
- childSetCommitCallback("keep_aspect_check", Impl::onClickKeepAspectCheck, this);
-#endif
impl.setAspectRatioCheckboxValue(this, gSavedSettings.getBOOL("KeepAspectForSnapshot"));
childSetCommitCallback("layer_types", Impl::onCommitLayerTypes, this);
getChild<LLUICtrl>("layer_types")->setValue("colors");
getChildView("layer_types")->setEnabled(FALSE);
-#if 0 // leads to crash later if one of the settings values is 0
- impl.getWidthSpinner(this)->setValue(gSavedSettings.getS32(lastSnapshotWidthName()));
- impl.getHeightSpinner(this)->setValue(gSavedSettings.getS32(lastSnapshotHeightName()));
-#endif
-
getChild<LLUICtrl>("freeze_frame_check")->setValue(gSavedSettings.getBOOL("UseFreezeFrame"));
childSetCommitCallback("freeze_frame_check", Impl::onCommitFreezeFrame, this);
@@ -2341,6 +2137,7 @@ void LLFloaterSnapshot::onOpen(const LLSD& key)
LLSnapshotLivePreview* preview = LLFloaterSnapshot::Impl::getPreviewView(this);
if(preview)
{
+ lldebugs << "opened, updating snapshot" << llendl;
preview->updateSnapshot(TRUE);
}
focusFirstItem(FALSE);
@@ -2422,6 +2219,7 @@ void LLFloaterSnapshot::update()
return;
BOOL changed = FALSE;
+ lldebugs << "npreviews: " << LLSnapshotLivePreview::sList.size() << llendl;
for (std::set<LLSnapshotLivePreview*>::iterator iter = LLSnapshotLivePreview::sList.begin();
iter != LLSnapshotLivePreview::sList.end(); ++iter)
{
@@ -2429,6 +2227,7 @@ void LLFloaterSnapshot::update()
}
if(changed)
{
+ lldebugs << "changed" << llendl;
inst->impl.updateControls(inst);
}
}
diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp
index f410c31f44..3b5c3663fb 100644
--- a/indra/newview/llfloaterwebcontent.cpp
+++ b/indra/newview/llfloaterwebcontent.cpp
@@ -55,6 +55,15 @@ LLFloaterWebContent::_Params::_Params()
LLFloaterWebContent::LLFloaterWebContent( const Params& params )
: LLFloater( params ),
LLInstanceTracker<LLFloaterWebContent, std::string>(params.id()),
+ mWebBrowser(NULL),
+ mAddressCombo(NULL),
+ mSecureLockIcon(NULL),
+ mStatusBarText(NULL),
+ mStatusBarProgress(NULL),
+ mBtnBack(NULL),
+ mBtnForward(NULL),
+ mBtnReload(NULL),
+ mBtnStop(NULL),
mUUID(params.id()),
mShowPageTitle(params.show_page_title)
{
@@ -74,11 +83,16 @@ BOOL LLFloaterWebContent::postBuild()
mStatusBarText = getChild< LLTextBox >( "statusbartext" );
mStatusBarProgress = getChild<LLProgressBar>("statusbarprogress" );
+ mBtnBack = getChildView( "back" );
+ mBtnForward = getChildView( "forward" );
+ mBtnReload = getChildView( "reload" );
+ mBtnStop = getChildView( "stop" );
+
// observe browser events
mWebBrowser->addObserver( this );
// these buttons are always enabled
- getChildView("reload")->setEnabled( true );
+ mBtnReload->setEnabled( true );
getChildView("popexternal")->setEnabled( true );
// cache image for secure browsing
@@ -128,46 +142,14 @@ bool LLFloaterWebContent::matchesKey(const LLSD& key)
//static
LLFloater* LLFloaterWebContent::create( Params p)
{
- lldebugs << "url = " << p.url() << ", target = " << p.target() << ", uuid = " << p.id() << llendl;
-
- if (!p.id.isProvided())
- {
- p.id = LLUUID::generateNewID().asString();
- }
-
- if(p.target().empty() || p.target() == "_blank")
- {
- p.target = p.id();
- }
-
- S32 browser_window_limit = gSavedSettings.getS32("WebContentWindowLimit");
- 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(p.window_class);
- 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()["target"] << llendl;
- }
-
- if(instances.size() >= (size_t)browser_window_limit)
- {
- // Destroy the least recently opened instance
- (*instances.begin())->closeFloater();
- }
- }
-
+ preCreate(p);
return new LLFloaterWebContent(p);
}
//static
void LLFloaterWebContent::closeRequest(const std::string &uuid)
{
- LLFloaterWebContent* floaterp = getInstance(uuid);
+ LLFloaterWebContent* floaterp = instance_tracker_t::getInstance(uuid);
if (floaterp)
{
floaterp->closeFloater(false);
@@ -177,7 +159,7 @@ void LLFloaterWebContent::closeRequest(const std::string &uuid)
//static
void LLFloaterWebContent::geometryChanged(const std::string &uuid, S32 x, S32 y, S32 width, S32 height)
{
- LLFloaterWebContent* floaterp = getInstance(uuid);
+ LLFloaterWebContent* floaterp = instance_tracker_t::getInstance(uuid);
if (floaterp)
{
floaterp->geometryChanged(x, y, width, height);
@@ -211,6 +193,43 @@ void LLFloaterWebContent::geometryChanged(S32 x, S32 y, S32 width, S32 height)
setShape(new_rect);
}
+// static
+void LLFloaterWebContent::preCreate(LLFloaterWebContent::Params& p)
+{
+ lldebugs << "url = " << p.url() << ", target = " << p.target() << ", uuid = " << p.id() << llendl;
+
+ if (!p.id.isProvided())
+ {
+ p.id = LLUUID::generateNewID().asString();
+ }
+
+ if(p.target().empty() || p.target() == "_blank")
+ {
+ p.target = p.id();
+ }
+
+ S32 browser_window_limit = gSavedSettings.getS32("WebContentWindowLimit");
+ 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(p.window_class);
+ 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()["target"] << llendl;
+ }
+
+ if(instances.size() >= (size_t)browser_window_limit)
+ {
+ // Destroy the least recently opened instance
+ (*instances.begin())->closeFloater();
+ }
+ }
+}
+
void LLFloaterWebContent::open_media(const Params& p)
{
// Specifying a mime type of text/html here causes the plugin system to skip the MIME type probe and just open a browser plugin.
@@ -276,8 +295,8 @@ void LLFloaterWebContent::onClose(bool app_quitting)
void LLFloaterWebContent::draw()
{
// this is asynchronous so we need to keep checking
- getChildView( "back" )->setEnabled( mWebBrowser->canNavigateBack() );
- getChildView( "forward" )->setEnabled( mWebBrowser->canNavigateForward() );
+ mBtnBack->setEnabled( mWebBrowser->canNavigateBack() );
+ mBtnForward->setEnabled( mWebBrowser->canNavigateForward() );
LLFloater::draw();
}
@@ -297,12 +316,12 @@ void LLFloaterWebContent::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent
else if(event == MEDIA_EVENT_NAVIGATE_BEGIN)
{
// flags are sent with this event
- getChildView("back")->setEnabled( self->getHistoryBackAvailable() );
- getChildView("forward")->setEnabled( self->getHistoryForwardAvailable() );
+ mBtnBack->setEnabled( self->getHistoryBackAvailable() );
+ mBtnForward->setEnabled( self->getHistoryForwardAvailable() );
// toggle visibility of these buttons based on browser state
- getChildView("reload")->setVisible( false );
- getChildView("stop")->setVisible( true );
+ mBtnReload->setVisible( false );
+ mBtnStop->setVisible( true );
// turn "on" progress bar now we're about to start loading
mStatusBarProgress->setVisible( true );
@@ -310,12 +329,12 @@ void LLFloaterWebContent::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent
else if(event == MEDIA_EVENT_NAVIGATE_COMPLETE)
{
// flags are sent with this event
- getChildView("back")->setEnabled( self->getHistoryBackAvailable() );
- getChildView("forward")->setEnabled( self->getHistoryForwardAvailable() );
+ mBtnBack->setEnabled( self->getHistoryBackAvailable() );
+ mBtnForward->setEnabled( self->getHistoryForwardAvailable() );
// toggle visibility of these buttons based on browser state
- getChildView("reload")->setVisible( true );
- getChildView("stop")->setVisible( false );
+ mBtnReload->setVisible( true );
+ mBtnStop->setVisible( false );
// turn "off" progress bar now we're loaded
mStatusBarProgress->setVisible( false );
@@ -421,8 +440,8 @@ void LLFloaterWebContent::onClickStop()
// 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 ghetto a point where the stop button stays active.
- getChildView("reload")->setVisible( true );
- getChildView("stop")->setVisible( false );
+ mBtnReload->setVisible( true );
+ mBtnStop->setVisible( false );
}
void LLFloaterWebContent::onEnterAddress()
diff --git a/indra/newview/llfloaterwebcontent.h b/indra/newview/llfloaterwebcontent.h
index 6fc66d1ad8..cfc87e9015 100644
--- a/indra/newview/llfloaterwebcontent.h
+++ b/indra/newview/llfloaterwebcontent.h
@@ -43,6 +43,7 @@ class LLFloaterWebContent :
public LLInstanceTracker<LLFloaterWebContent, std::string>
{
public:
+ typedef LLInstanceTracker<LLFloaterWebContent, std::string> instance_tracker_t;
LOG_CLASS(LLFloaterWebContent);
struct _Params : public LLInitParam::Block<_Params>
@@ -89,6 +90,7 @@ protected:
void onEnterAddress();
void onPopExternal();
+ static void preCreate(Params& p);
void open_media(const Params& );
void set_current_url(const std::string& url);
@@ -97,6 +99,12 @@ protected:
LLIconCtrl* mSecureLockIcon;
LLTextBox* mStatusBarText;
LLProgressBar* mStatusBarProgress;
+
+ LLView* mBtnBack;
+ LLView* mBtnForward;
+ LLView* mBtnReload;
+ LLView* mBtnStop;
+
std::string mCurrentURL;
std::string mUUID;
bool mShowPageTitle;
diff --git a/indra/newview/llfloaterwebprofile.cpp b/indra/newview/llfloaterwebprofile.cpp
new file mode 100644
index 0000000000..c41f6f148f
--- /dev/null
+++ b/indra/newview/llfloaterwebprofile.cpp
@@ -0,0 +1,79 @@
+/**
+ * @file llfloaterwebprofile.cpp
+ * @brief Avatar profile floater.
+ *
+ * $LicenseInfo:firstyear=2009&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 "llfloaterwebprofile.h"
+
+#include "llviewercontrol.h"
+
+LLFloaterWebProfile::LLFloaterWebProfile(const Params& key) :
+ LLFloaterWebContent(key)
+{
+}
+
+void LLFloaterWebProfile::onOpen(const LLSD& key)
+{
+ Params p(key);
+ p.show_chrome(false).
+ window_class("profile");
+ LLFloaterWebContent::onOpen(p);
+ applyPreferredRect();
+}
+
+// virtual
+void LLFloaterWebProfile::handleReshape(const LLRect& new_rect, bool by_user)
+{
+ lldebugs << "handleReshape: " << new_rect << llendl;
+
+ if (by_user && !isMinimized())
+ {
+ lldebugs << "Storing new rect" << llendl;
+ gSavedSettings.setRect("WebProfileFloaterRect", new_rect);
+ }
+
+ LLFloaterWebContent::handleReshape(new_rect, by_user);
+}
+
+LLFloater* LLFloaterWebProfile::create(const LLSD& key)
+{
+ LLFloaterWebContent::Params p(key);
+ preCreate(p);
+ return new LLFloaterWebProfile(p);
+}
+
+void LLFloaterWebProfile::applyPreferredRect()
+{
+ const LLRect preferred_rect = gSavedSettings.getRect("WebProfileFloaterRect");
+ lldebugs << "Applying preferred rect: " << preferred_rect << llendl;
+
+ // Don't override position that may have been set by floater stacking code.
+ LLRect new_rect = getRect();
+ new_rect.setLeftTopAndSize(
+ new_rect.mLeft, new_rect.mTop,
+ preferred_rect.getWidth(), preferred_rect.getHeight());
+ setShape(new_rect);
+}
diff --git a/indra/newview/llmenucommands.h b/indra/newview/llfloaterwebprofile.h
index fa845c6f02..4c355e401b 100644
--- a/indra/newview/llmenucommands.h
+++ b/indra/newview/llfloaterwebprofile.h
@@ -1,8 +1,8 @@
/**
- * @file llmenucommands.h
- * @brief Implementations of menu commands.
+ * @file llfloaterwebprofile.h
+ * @brief Avatar profile floater.
*
- * $LicenseInfo:firstyear=2003&license=viewerlgpl$
+ * $LicenseInfo:firstyear=2009&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
@@ -24,14 +24,36 @@
* $/LicenseInfo$
*/
-#ifndef LL_LLMENUCOMMANDS_H
-#define LL_LLMENUCOMMANDS_H
+#ifndef LL_LLFLOATERWEBPROFILE_H
+#define LL_LLFLOATERWEBPROFILE_H
-class LLUUID;
+#include "llfloaterwebcontent.h"
+#include "llviewermediaobserver.h"
-void handle_mouselook(void*);
-void handle_chat(void*);
-void handle_return_key(void*);
-void handle_slash_key(void*);
+#include <string>
+
+class LLMediaCtrl;
+
+/**
+ * Displays avatar profile web page.
+ */
+class LLFloaterWebProfile
+: public LLFloaterWebContent
+{
+ LOG_CLASS(LLFloaterWebProfile);
+public:
+ typedef LLFloaterWebContent::Params Params;
+
+ LLFloaterWebProfile(const Params& key);
+
+ /*virtual*/ void onOpen(const LLSD& key);
+ /*virtual*/ void handleReshape(const LLRect& new_rect, bool by_user = false);
+
+ static LLFloater* create(const LLSD& key);
+
+private:
+ void applyPreferredRect();
+};
+
+#endif // LL_LLFLOATERWEBPROFILE_H
-#endif
diff --git a/indra/newview/llfloaterwindowsize.cpp b/indra/newview/llfloaterwindowsize.cpp
index a70f2af11a..ec161018b8 100644
--- a/indra/newview/llfloaterwindowsize.cpp
+++ b/indra/newview/llfloaterwindowsize.cpp
@@ -58,33 +58,12 @@ bool extractWindowSizeFromString(const std::string& instr, U32 *width, U32 *heig
}
-///----------------------------------------------------------------------------
-/// Class LLFloaterWindowSize
-///----------------------------------------------------------------------------
-class LLFloaterWindowSize
-: public LLFloater
-{
- friend class LLFloaterReg;
-private:
- LLFloaterWindowSize(const LLSD& key);
- virtual ~LLFloaterWindowSize();
-
-public:
- /*virtual*/ BOOL postBuild();
- void initWindowSizeControls();
- void onClickSet();
- void onClickCancel();
-};
-
-
LLFloaterWindowSize::LLFloaterWindowSize(const LLSD& key)
: LLFloater(key)
-{
-}
+{}
LLFloaterWindowSize::~LLFloaterWindowSize()
-{
-}
+{}
BOOL LLFloaterWindowSize::postBuild()
{
@@ -145,13 +124,3 @@ void LLFloaterWindowSize::onClickCancel()
{
closeFloater();
}
-
-///----------------------------------------------------------------------------
-/// LLFloaterWindowSizeUtil
-///----------------------------------------------------------------------------
-void LLFloaterWindowSizeUtil::registerFloater()
-{
- LLFloaterReg::add("window_size", "floater_window_size.xml",
- &LLFloaterReg::build<LLFloaterWindowSize>);
-
-}
diff --git a/indra/newview/llfloaterwindowsize.h b/indra/newview/llfloaterwindowsize.h
index 40f1a25bb3..a71e5e273c 100644
--- a/indra/newview/llfloaterwindowsize.h
+++ b/indra/newview/llfloaterwindowsize.h
@@ -26,10 +26,24 @@
#ifndef LLFLOATERWINDOWSIZE_H
#define LLFLOATERWINDOWSIZE_H
-// Allow user to set the window size for filming tutorials, machinima, etc
-namespace LLFloaterWindowSizeUtil
+#include "llfloater.h"
+
+///----------------------------------------------------------------------------
+/// Class LLFloaterWindowSize
+///----------------------------------------------------------------------------
+class LLFloaterWindowSize
+ : public LLFloater
{
- void registerFloater();
-}
+ friend class LLFloaterReg;
+private:
+ LLFloaterWindowSize(const LLSD& key);
+ virtual ~LLFloaterWindowSize();
+
+public:
+ /*virtual*/ BOOL postBuild();
+ void initWindowSizeControls();
+ void onClickSet();
+ void onClickCancel();
+};
#endif
diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp
index 02222e430f..f27fd035db 100644
--- a/indra/newview/llfolderviewitem.cpp
+++ b/indra/newview/llfolderviewitem.cpp
@@ -1173,8 +1173,8 @@ BOOL LLFolderViewFolder::addToFolder(LLFolderViewFolder* folder, LLFolderView* r
return folder->addFolder(this);
}
-// Finds width and height of this object and it's children. Also
-// makes sure that this view and it's children are the right size.
+// Finds width and height of this object and its children. Also
+// makes sure that this view and its children are the right size.
S32 LLFolderViewFolder::arrange( S32* width, S32* height, S32 filter_generation)
{
// sort before laying out contents
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index 516b47e616..d54bce4619 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -36,6 +36,7 @@
#include "llviewercontrol.h"
#include "llfolderview.h"
#include "llinventorybridge.h"
+#include "llviewerfoldertype.h"
// linden library includes
#include "lltrans.h"
@@ -117,7 +118,7 @@ bool LLInventoryFilter::checkFolder(const LLFolderViewFolder* folder)
const LLFolderViewEventListener* listener = folder->getListener();
const LLUUID folder_id = listener->getUUID();
-
+
if (mFilterOps.mFilterTypes & FILTERTYPE_CATEGORY)
{
// Can only filter categories for items in your inventory
@@ -206,6 +207,23 @@ BOOL LLInventoryFilter::checkAgainstFilterType(const LLFolderViewItem* item) con
}
}
+ ////////////////////////////////////////////////////////////////////////////////
+ // FILTERTYPE_EMPTYFOLDERS
+ // Pass if this item is a folder and is not a system folder that should be hidden
+ if (filterTypes & FILTERTYPE_EMPTYFOLDERS)
+ {
+ if (object_type == LLInventoryType::IT_CATEGORY)
+ {
+ bool is_hidden_if_empty = LLViewerFolderType::lookupIsHiddenIfEmpty(listener->getPreferredType());
+ if (is_hidden_if_empty)
+ {
+ // Force the fetching of those folders so they are hidden iff they really are empty...
+ gInventory.fetchDescendentsOf(object_id);
+ return FALSE;
+ }
+ }
+ }
+
return TRUE;
}
@@ -343,6 +361,11 @@ void LLInventoryFilter::setFilterWearableTypes(U64 types)
mFilterOps.mFilterTypes |= FILTERTYPE_WEARABLE;
}
+void LLInventoryFilter::setFilterEmptySystemFolders()
+{
+ mFilterOps.mFilterTypes |= FILTERTYPE_EMPTYFOLDERS;
+}
+
void LLInventoryFilter::setFilterUUID(const LLUUID& object_id)
{
if (mFilterOps.mFilterUUID == LLUUID::null)
diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h
index f9460822f7..bba24ac652 100644
--- a/indra/newview/llinventoryfilter.h
+++ b/indra/newview/llinventoryfilter.h
@@ -57,7 +57,8 @@ public:
FILTERTYPE_CATEGORY = 0x1 << 1, // search by folder type
FILTERTYPE_UUID = 0x1 << 2, // find the object with UUID and any links to it
FILTERTYPE_DATE = 0x1 << 3, // search by date range
- FILTERTYPE_WEARABLE = 0x1 << 4 // search by wearable type
+ FILTERTYPE_WEARABLE = 0x1 << 4, // search by wearable type
+ FILTERTYPE_EMPTYFOLDERS = 0x1 << 5 // pass if folder is not a system folder to be hidden if empty
};
enum EFilterLink
@@ -88,6 +89,7 @@ public:
void setFilterCategoryTypes(U64 types);
void setFilterUUID(const LLUUID &object_id);
void setFilterWearableTypes(U64 types);
+ void setFilterEmptySystemFolders();
void updateFilterTypes(U64 types, U64& current_types);
void setFilterSubString(const std::string& string);
diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h
index a0fd455cf3..340c1b0c22 100644
--- a/indra/newview/llinventorymodel.h
+++ b/indra/newview/llinventorymodel.h
@@ -411,7 +411,7 @@ public:
// Return (yes/no/maybe) child status of category children.
EHasChildren categoryHasChildren(const LLUUID& cat_id) const;
- // Returns true iff category version is known and theoretical
+ // Returns true if category version is known and theoretical
// descendents == actual descendents.
bool isCategoryComplete(const LLUUID& cat_id) const;
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index acbec531b6..d06374d232 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -240,6 +240,12 @@ void LLInventoryPanel::initFromParams(const LLInventoryPanel::Params& params)
getFilter()->setFilterCategoryTypes(getFilter()->getFilterCategoryTypes() & ~(1ULL << LLFolderType::FT_INBOX));
getFilter()->setFilterCategoryTypes(getFilter()->getFilterCategoryTypes() & ~(1ULL << LLFolderType::FT_OUTBOX));
+ // set the filter for the empty folder if the debug setting is on
+ if (gSavedSettings.getBOOL("DebugHideEmptySystemFolders"))
+ {
+ getFilter()->setFilterEmptySystemFolders();
+ }
+
// Initialize base class params.
LLPanel::initFromParams(params);
}
@@ -697,7 +703,10 @@ LLFolderViewItem* LLInventoryPanel::buildNewViews(const LLUUID& id)
if (new_listener)
{
LLFolderViewFolder* folderp = createFolderViewFolder(new_listener);
- folderp->setItemSortOrder(mFolderRoot->getSortOrder());
+ if (folderp)
+ {
+ folderp->setItemSortOrder(mFolderRoot->getSortOrder());
+ }
itemp = folderp;
}
}
diff --git a/indra/newview/llmenucommands.cpp b/indra/newview/llmenucommands.cpp
deleted file mode 100644
index 4b7f9432e3..0000000000
--- a/indra/newview/llmenucommands.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * @file llmenucommands.cpp
- * @brief Implementations of menu commands.
- *
- * $LicenseInfo:firstyear=2003&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 "llmenucommands.h"
-
-#include "imageids.h"
-#include "llfloaterreg.h"
-#include "llfontgl.h"
-#include "llrect.h"
-#include "llerror.h"
-#include "llstring.h"
-#include "message.h"
-
-#include "llagentcamera.h"
-#include "llcallingcard.h"
-#include "llviewercontrol.h"
-//#include "llfirstuse.h"
-#include "llfloaterworldmap.h"
-#include "lllineeditor.h"
-#include "llstatusbar.h"
-#include "llimview.h"
-#include "lltextbox.h"
-#include "llui.h"
-#include "llviewergesture.h" // for triggering gestures
-#include "llviewermessage.h"
-#include "llviewerparceloverlay.h"
-#include "llviewerregion.h"
-#include "llviewerstats.h"
-#include "lluictrlfactory.h"
-#include "llviewerwindow.h"
-#include "llworld.h"
-#include "llworldmap.h"
-#include "llfocusmgr.h"
-#include "llnearbychatbar.h"
-
-void handle_mouselook(void*)
-{
- gAgentCamera.changeCameraToMouselook();
-}
-
-
-void handle_chat(void*)
-{
- // give focus to chatbar if it's open but not focused
- if (gSavedSettings.getBOOL("ChatVisible") &&
- gFocusMgr.childHasKeyboardFocus(LLNearbyChatBar::getInstance()->getChatBox()))
- {
- LLNearbyChatBar::stopChat();
- }
- else
- {
- LLNearbyChatBar::startChat(NULL);
- }
-}
-
-void handle_slash_key(void*)
-{
- // LLBottomTray::startChat("/");
- //
- // Don't do this, it results in a double-slash in the input field.
- // Another "/" will be automatically typed for us, because the WM_KEYDOWN event
- // that generated the menu accelerator call (and hence puts focus in
- // the chat edtior) will be followed by a "/" WM_CHAR character message,
- // which will type the slash. Yes, it's weird. It only matters for
- // menu accelerators that put input focus into a field. And Mac works
- // the same way. JC
-
- LLNearbyChatBar::startChat(NULL);
-}
diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp
index 146bcbe47b..2a08cb1845 100644
--- a/indra/newview/llnavigationbar.cpp
+++ b/indra/newview/llnavigationbar.cpp
@@ -317,7 +317,7 @@ BOOL LLNavigationBar::postBuild()
LLTeleportHistory::getInstance()->setHistoryChangedCallback(
boost::bind(&LLNavigationBar::onTeleportHistoryChanged, this));
- LLHints::registerHintTarget("nav_bar", LLView::getHandle());
+ LLHints::registerHintTarget("nav_bar", getHandle());
return TRUE;
}
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp
index 114472ba56..183063f1db 100644
--- a/indra/newview/llnearbychatbar.cpp
+++ b/indra/newview/llnearbychatbar.cpp
@@ -71,9 +71,14 @@ static LLChatTypeTrigger sChatTypeTriggers[] = {
};
LLNearbyChatBar::LLNearbyChatBar(const LLSD& key)
- : LLFloater(key),
- mChatBox(NULL)
-{ mSpeakerMgr = LLLocalSpeakerMgr::getInstance();
+: LLFloater(key),
+ mChatBox(NULL),
+ mNearbyChat(NULL),
+ mOutputMonitor(NULL),
+ mSpeakerMgr(NULL),
+ mExpandedHeight(COLLAPSED_HEIGHT + EXPANDED_HEIGHT)
+{
+ mSpeakerMgr = LLLocalSpeakerMgr::getInstance();
}
//virtual
@@ -95,6 +100,7 @@ BOOL LLNearbyChatBar::postBuild()
mChatBox->setEnableLineHistory(TRUE);
mChatBox->setFont(LLViewerChat::getChatFont());
+ mNearbyChat = getChildView("nearby_chat");
LLUICtrl* show_btn = getChild<LLUICtrl>("show_nearby_chat");
show_btn->setCommitCallback(boost::bind(&LLNearbyChatBar::onToggleNearbyChatPanel, this));
@@ -105,8 +111,6 @@ BOOL LLNearbyChatBar::postBuild()
// Register for font change notifications
LLViewerChat::setFontChangedCallback(boost::bind(&LLNearbyChatBar::onChatFontChange, this, _1));
- mExpandedHeight = COLLAPSED_HEIGHT + EXPANDED_HEIGHT;
-
enableResizeCtrls(true, true, false);
return TRUE;
@@ -116,8 +120,7 @@ bool LLNearbyChatBar::applyRectControl()
{
bool rect_controlled = LLFloater::applyRectControl();
- LLView* nearby_chat = getChildView("nearby_chat");
- if (!nearby_chat->getVisible())
+ if (!mNearbyChat->getVisible())
{
reshape(getRect().getWidth(), getMinHeight());
enableResizeCtrls(true, true, false);
diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h
index e9734899b3..c2f57dc4ca 100644
--- a/indra/newview/llnearbychatbar.h
+++ b/indra/newview/llnearbychatbar.h
@@ -84,9 +84,10 @@ protected:
// Which non-zero channel did we last chat on?
static S32 sLastSpecialChatChannel;
- LLLineEditor* mChatBox;
- LLOutputMonitorCtrl* mOutputMonitor;
- LLLocalSpeakerMgr* mSpeakerMgr;
+ LLLineEditor* mChatBox;
+ LLView* mNearbyChat;
+ LLOutputMonitorCtrl* mOutputMonitor;
+ LLLocalSpeakerMgr* mSpeakerMgr;
S32 mExpandedHeight;
};
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp
index c43c95a366..240a7c7a35 100644
--- a/indra/newview/llnearbychathandler.cpp
+++ b/indra/newview/llnearbychathandler.cpp
@@ -63,7 +63,8 @@ public:
typedef std::vector<LLHandle<LLToast> > toast_vec_t;
typedef std::list<LLHandle<LLToast> > toast_list_t;
- LLNearbyChatScreenChannel(const Params& p):LLScreenChannelBase(p)
+ LLNearbyChatScreenChannel(const Params& p)
+ : LLScreenChannelBase(p)
{
mStopProcessing = false;
@@ -365,12 +366,15 @@ void LLNearbyChatScreenChannel::arrangeToasts()
if(mStopProcessing || isHovering())
return;
- LLView* floater_snap_region = gViewerWindow->getRootView()->getChildView("floater_snap_region");
-
+ if (mFloaterSnapRegion == NULL)
+ {
+ mFloaterSnapRegion = gViewerWindow->getRootView()->getChildView("floater_snap_region");
+ }
+
if (!getParent())
{
// connect to floater snap region just to get resize events, we don't care about being a proper widget
- floater_snap_region->addChild(this);
+ mFloaterSnapRegion->addChild(this);
setFollows(FOLLOWS_ALL);
}
@@ -378,13 +382,13 @@ void LLNearbyChatScreenChannel::arrangeToasts()
updateRect();
LLRect channel_rect;
- floater_snap_region->localRectToOtherView(floater_snap_region->getLocalRect(), &channel_rect, gFloaterView);
+ mFloaterSnapRegion->localRectToOtherView(mFloaterSnapRegion->getLocalRect(), &channel_rect, gFloaterView);
channel_rect.mLeft += 10;
channel_rect.mRight = channel_rect.mLeft + 300;
S32 channel_bottom = channel_rect.mBottom;
- S32 bottom = channel_bottom + 10;
+ S32 bottom = channel_bottom + 80;
S32 margin = gSavedSettings.getS32("ToastGap");
//sort active toasts
@@ -470,7 +474,7 @@ void LLNearbyChatHandler::initChannel()
-void LLNearbyChatHandler::processChat(const LLChat& chat_msg, // WARNING - not really const, see hack below changing chat_msg.mText
+void LLNearbyChatHandler::processChat(const LLChat& chat_msg,
const LLSD &args)
{
if(chat_msg.mMuted == TRUE)
@@ -479,28 +483,10 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, // WARNING - not
if(chat_msg.mText.empty())
return;//don't process empty messages
- // Handle irc styled messages for toast panel
- // HACK ALERT - changes mText, stripping out IRC style "/me" prefixes
- LLChat& tmp_chat = const_cast<LLChat&>(chat_msg);
- std::string original_message = tmp_chat.mText; // Save un-modified version of chat text
- if (tmp_chat.mChatStyle == CHAT_STYLE_IRC)
- {
- if(!tmp_chat.mFromName.empty())
- tmp_chat.mText = tmp_chat.mFromName + tmp_chat.mText.substr(3);
- else
- tmp_chat.mText = tmp_chat.mText.substr(3);
- }
-
LLFloater* chat_bar = LLFloaterReg::getInstance("chat_bar");
LLNearbyChat* nearby_chat = chat_bar->findChild<LLNearbyChat>("nearby_chat");
- {
- //sometimes its usefull to have no name at all...
- //if(tmp_chat.mFromName.empty() && tmp_chat.mFromID!= LLUUID::null)
- // tmp_chat.mFromName = tmp_chat.mFromID.asString();
- }
-
// Build notification data
LLSD notification;
notification["message"] = chat_msg.mText;
@@ -543,7 +529,7 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, // WARNING - not
LLViewerChat::getChatColor(chat_msg,txt_color);
- LLFloaterScriptDebug::addScriptLine(original_message, // Send full message with "/me" style prefix
+ LLFloaterScriptDebug::addScriptLine(chat_msg.mText,
chat_msg.mFromName,
txt_color,
chat_msg.mFromID);
@@ -597,6 +583,21 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, // WARNING - not
if(channel)
{
+ // Handle IRC styled messages.
+ std::string toast_msg;
+ if (chat_msg.mChatStyle == CHAT_STYLE_IRC)
+ {
+ if (!chat_msg.mFromName.empty())
+ {
+ toast_msg += chat_msg.mFromName;
+ }
+ toast_msg += chat_msg.mText.substr(3);
+ }
+ else
+ {
+ toast_msg = chat_msg.mText;
+ }
+
// Add a nearby chat toast.
LLUUID id;
id.generate();
@@ -608,6 +609,7 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, // WARNING - not
notification["text_color"] = r_color_name;
notification["color_alpha"] = r_color_alpha;
notification["font_size"] = (S32)LLViewerChat::getChatFontSize() ;
+ notification["message"] = toast_msg;
channel->addNotification(notification);
}
}
diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp
index aa009a76fa..fb0891c4c5 100644
--- a/indra/newview/llnotificationtiphandler.cpp
+++ b/indra/newview/llnotificationtiphandler.cpp
@@ -95,7 +95,7 @@ bool LLTipHandler::processNotification(const LLSD& notify)
// don't show toast if Nearby Chat is opened
LLNearbyChat* nearby_chat = LLNearbyChat::getInstance();
LLNearbyChatBar* nearby_chat_bar = LLNearbyChatBar::getInstance();
- if (nearby_chat_bar->getVisible() && nearby_chat->getVisible())
+ if (!nearby_chat_bar->isMinimized() && nearby_chat_bar->getVisible() && nearby_chat->getVisible())
{
return false;
}
diff --git a/indra/newview/lloverlaybar.cpp b/indra/newview/lloverlaybar.cpp
deleted file mode 100644
index c2bbec0470..0000000000
--- a/indra/newview/lloverlaybar.cpp
+++ /dev/null
@@ -1,378 +0,0 @@
-/**
- * @file lloverlaybar.cpp
- * @brief LLOverlayBar class implementation
- *
- * $LicenseInfo:firstyear=2002&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$
- */
-
-// Temporary buttons that appear at the bottom of the screen when you
-// are in a mode.
-
-#include "llviewerprecompiledheaders.h"
-
-#include "lloverlaybar.h"
-
-#include "llaudioengine.h"
-#include "llrender.h"
-#include "llagent.h"
-#include "llbutton.h"
-#include "llfocusmgr.h"
-#include "llimview.h"
-#include "llmediaremotectrl.h"
-#include "llparcel.h"
-#include "lltextbox.h"
-#include "llui.h"
-#include "llviewercontrol.h"
-#include "llviewertexturelist.h"
-#include "llviewerjoystick.h"
-#include "llviewermedia.h"
-#include "llviewermenu.h" // handle_reset_view()
-#include "llviewermedia.h"
-#include "llviewerparcelmedia.h"
-#include "llviewerparcelmgr.h"
-#include "lluictrlfactory.h"
-#include "llviewerwindow.h"
-#include "llvoiceclient.h"
-#include "llvoavatarself.h"
-#include "llvoiceremotectrl.h"
-#include "llmediactrl.h"
-#include "llselectmgr.h"
-
-//
-// Globals
-//
-
-LLOverlayBar *gOverlayBar = NULL;
-
-extern S32 MENU_BAR_HEIGHT;
-
-//
-// Functions
-//
-
-
-
-void* LLOverlayBar::createMediaRemote(void* userdata)
-{
- LLOverlayBar *self = (LLOverlayBar*)userdata;
- self->mMediaRemote = new LLMediaRemoteCtrl ();
- return self->mMediaRemote;
-}
-
-void* LLOverlayBar::createVoiceRemote(void* userdata)
-{
- LLOverlayBar *self = (LLOverlayBar*)userdata;
- self->mVoiceRemote = new LLVoiceRemoteCtrl();
- return self->mVoiceRemote;
-}
-
-LLOverlayBar::LLOverlayBar()
- : LLPanel(),
- mMediaRemote(NULL),
- mVoiceRemote(NULL),
- mMusicState(STOPPED)
-{
- setMouseOpaque(FALSE);
- setIsChrome(TRUE);
-
- mBuilt = false;
-
- mFactoryMap["media_remote"] = LLCallbackMap(LLOverlayBar::createMediaRemote, this);
- mFactoryMap["voice_remote"] = LLCallbackMap(LLOverlayBar::createVoiceRemote, this);
-
- LLUICtrlFactory::getInstance()->buildPanel(this, "panel_overlaybar.xml");
-}
-
-BOOL LLOverlayBar::postBuild()
-{
- childSetAction("Set Not Busy",onClickSetNotBusy,this);
- childSetAction("Mouselook",onClickMouselook,this);
- childSetAction("Stand Up",onClickStandUp,this);
- childSetAction("Flycam",onClickFlycam,this);
- childSetVisible("chat_bar", gSavedSettings.getBOOL("ChatVisible"));
-
- mVoiceRemote->expandOrCollapse();
- mMediaRemote->expandOrCollapse();
-
- setFocusRoot(TRUE);
- mBuilt = true;
-
- layoutButtons();
- return TRUE;
-}
-
-LLOverlayBar::~LLOverlayBar()
-{
- // LLView destructor cleans up children
-}
-
-// virtual
-void LLOverlayBar::reshape(S32 width, S32 height, BOOL called_from_parent)
-{
- LLView::reshape(width, height, called_from_parent);
-
- if (mBuilt)
- {
- layoutButtons();
- }
-}
-
-void LLOverlayBar::layoutButtons()
-{
- LLView* state_buttons_panel = getChildView("state_buttons");
-
- if (state_buttons_panel->getVisible())
- {
- LLViewQuery query;
- LLWidgetTypeFilter<LLButton> widget_filter;
- query.addPreFilter(LLEnabledFilter::getInstance());
- query.addPreFilter(&widget_filter);
-
- child_list_t button_list = query(state_buttons_panel);
-
- const S32 MAX_BAR_WIDTH = 600;
- S32 bar_width = llclamp(state_buttons_panel->getRect().getWidth(), 0, MAX_BAR_WIDTH);
-
- // calculate button widths
- const S32 MAX_BUTTON_WIDTH = 150;
- const S32 STATUS_BAR_PAD = 10;
- S32 segment_width = llclamp(lltrunc((F32)(bar_width) / (F32)button_list.size()), 0, MAX_BUTTON_WIDTH);
- S32 btn_width = segment_width - STATUS_BAR_PAD;
-
- // Evenly space all buttons, starting from left
- S32 left = 0;
- S32 bottom = 1;
-
- for (child_list_reverse_iter_t child_iter = button_list.rbegin();
- child_iter != button_list.rend(); ++child_iter)
- {
- LLView *view = *child_iter;
- LLRect r = view->getRect();
- r.setOriginAndSize(left, bottom, btn_width, r.getHeight());
- view->setRect(r);
- left += segment_width;
- }
- }
-}
-
-// Per-frame updates of visibility
-void LLOverlayBar::refresh()
-{
- BOOL buttons_changed = FALSE;
-
- BOOL im_received = gIMMgr->getIMReceived();
- LLButton* button = getChild<LLButton>("IM Received");
- if (button && button->getVisible() != im_received)
- {
- button->setVisible(im_received);
- sendChildToFront(button);
- moveChildToBackOfTabGroup(button);
- buttons_changed = TRUE;
- }
-
- BOOL busy = gAgent.getBusy();
- button = getChild<LLButton>("Set Not Busy");
- if (button && button->getVisible() != busy)
- {
- button->setVisible(busy);
- sendChildToFront(button);
- moveChildToBackOfTabGroup(button);
- buttons_changed = TRUE;
- }
-
- BOOL flycam = LLViewerJoystick::getInstance()->getOverrideCamera();
- button = getChild<LLButton>("Flycam");
- if (button && button->getVisible() != flycam)
- {
- button->setVisible(flycam);
- sendChildToFront(button);
- moveChildToBackOfTabGroup(button);
- buttons_changed = TRUE;
- }
-
- BOOL mouselook_grabbed;
- mouselook_grabbed = gAgent.isControlGrabbed(CONTROL_ML_LBUTTON_DOWN_INDEX)
- || gAgent.isControlGrabbed(CONTROL_ML_LBUTTON_UP_INDEX);
- button = getChild<LLButton>("Mouselook");
-
- if (button && button->getVisible() != mouselook_grabbed)
- {
- button->setVisible(mouselook_grabbed);
- sendChildToFront(button);
- moveChildToBackOfTabGroup(button);
- buttons_changed = TRUE;
- }
-
- BOOL sitting = FALSE;
- if (gAgent.getAvatarObject())
- {
- sitting = gAgent.getAvatarObject()->isSitting();
- }
- button = getChild<LLButton>("Stand Up");
-
- if (button && button->getVisible() != sitting)
- {
- button->setVisible(sitting);
- sendChildToFront(button);
- moveChildToBackOfTabGroup(button);
- buttons_changed = TRUE;
- }
-
-
- moveChildToBackOfTabGroup(mMediaRemote);
- moveChildToBackOfTabGroup(mVoiceRemote);
-
- // turn off the whole bar in mouselook
- if (gAgent.cameraMouselook())
- {
- childSetVisible("media_remote_container", FALSE);
- childSetVisible("voice_remote_container", FALSE);
- childSetVisible("state_buttons", FALSE);
- }
- else
- {
- // update "remotes"
- childSetVisible("media_remote_container", TRUE);
- childSetVisible("voice_remote_container", LLVoiceClient::getInstance()->voiceEnabled());
- childSetVisible("state_buttons", TRUE);
- }
-
- // always let user toggle into and out of chatbar
- childSetVisible("chat_bar", gSavedSettings.getBOOL("ChatVisible"));
-
- if (buttons_changed)
- {
- layoutButtons();
- }
-}
-
-//-----------------------------------------------------------------------
-// Static functions
-//-----------------------------------------------------------------------
-
-// static
-void LLOverlayBar::onClickSetNotBusy(void*)
-{
- gAgent.clearBusy();
-}
-
-
-// static
-void LLOverlayBar::onClickFlycam(void*)
-{
- LLViewerJoystick::getInstance()->toggleFlycam();
-}
-
-// static
-void LLOverlayBar::onClickResetView(void* data)
-{
- handle_reset_view();
-}
-
-//static
-void LLOverlayBar::onClickMouselook(void*)
-{
- gAgent.changeCameraToMouselook();
-}
-
-//static
-void LLOverlayBar::onClickStandUp(void*)
-{
- LLSelectMgr::getInstance()->deselectAllForStandingUp();
- gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// static media helpers
-// *TODO: Move this into an audio manager abstraction
-//static
-void LLOverlayBar::mediaStop(void*)
-{
- if (!gOverlayBar)
- {
- // return;
- }
- LLViewerParcelMedia::stop();
-}
-//static
-void LLOverlayBar::toggleMediaPlay(void*)
-{
- if (!gOverlayBar)
- {
- // return;
- }
-
-
- if (LLViewerParcelMedia::getStatus() == LLViewerMediaImpl::MEDIA_PAUSED)
- {
- LLViewerParcelMedia::start();
- }
- else if(LLViewerParcelMedia::getStatus() == LLViewerMediaImpl::MEDIA_PLAYING)
- {
- LLViewerParcelMedia::pause();
- }
- else
- {
- LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
- if (parcel)
- {
- LLViewerParcelMedia::play(parcel);
- }
- }
-}
-
-//static
-void LLOverlayBar::toggleMusicPlay(void*)
-{
- if (gAudiop->isInternetStreamPlaying() != 1)
- {
- if (gAudiop)
- {
- LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
- if ( parcel )
- {
- // this doesn't work properly when crossing parcel boundaries - even when the
- // stream is stopped, it doesn't return the right thing - commenting out for now.
- // if ( gAudiop->isInternetStreamPlaying() == 0 )
- {
- gAudiop->startInternetStream(parcel->getMusicURL());
- }
- }
- }
- }
- //else
- //{
- // gOverlayBar->mMusicState = PAUSED; // desired state
- // if (gAudiop)
- // {
- // gAudiop->pauseInternetStream(1);
- // }
- //}
- else
- {
- if (gAudiop)
- {
- gAudiop->stopInternetStream();
- }
- }
-}
-
diff --git a/indra/newview/lloverlaybar.h b/indra/newview/lloverlaybar.h
deleted file mode 100644
index b36f5ebb73..0000000000
--- a/indra/newview/lloverlaybar.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * @file lloverlaybar.h
- * @brief LLOverlayBar class definition
- *
- * $LicenseInfo:firstyear=2002&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_LLOVERLAYBAR_H
-#define LL_LLOVERLAYBAR_H
-
-#include "llpanel.h"
-
-// "Constants" loaded from settings.xml at start time
-extern S32 STATUS_BAR_HEIGHT;
-
-class LLButton;
-class LLLineEditor;
-class LLMediaRemoteCtrl;
-class LLMessageSystem;
-class LLTextBox;
-class LLTextEditor;
-class LLUICtrl;
-class LLUUID;
-class LLFrameTimer;
-class LLStatGraph;
-class LLSlider;
-class LLVoiceRemoteCtrl;
-
-class LLOverlayBar
-: public LLPanel
-{
-public:
- LLOverlayBar();
- ~LLOverlayBar();
-
- /*virtual*/ void refresh();
- /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
- /*virtual*/ BOOL postBuild();
-
- void layoutButtons();
-
- // helpers for returning desired state
- BOOL musicPlaying() { return mMusicState == PLAYING; }
-
- static void onClickSetNotBusy(void* data);
- static void onClickMouselook(void* data);
- static void onClickStandUp(void* data);
- static void onClickResetView(void* data);
- static void onClickFlycam(void* data);
-
- //static media helper functions
- static void toggleMediaPlay(void*);
- static void toggleMusicPlay(void*);
- static void musicPause(void*);
- static void musicStop(void*);
- static void mediaStop(void*);
-
- static void toggleAudioVolumeFloater(void*);
-
-protected:
- static void* createMediaRemote(void* userdata);
- static void* createVoiceRemote(void* userdata);
-
- void enableMediaButtons();
-
-protected:
- LLMediaRemoteCtrl* mMediaRemote;
- LLVoiceRemoteCtrl* mVoiceRemote;
- bool mBuilt; // dialog constructed yet?
- enum { STOPPED=0, PLAYING=1, PAUSED=2 };
- S32 mMusicState;
-};
-
-extern LLOverlayBar* gOverlayBar;
-
-#endif
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp
index 988e801b61..679b1bdcda 100644
--- a/indra/newview/llpanelavatar.cpp
+++ b/indra/newview/llpanelavatar.cpp
@@ -120,269 +120,6 @@ BOOL LLDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
static LLDefaultChildRegistry::Register<LLDropTarget> r("drop_target");
-static LLRegisterPanelClassWrapper<LLPanelAvatarProfile> t_panel_profile("panel_profile");
-static LLRegisterPanelClassWrapper<LLPanelMyProfile> t_panel_my_profile("panel_my_profile");
-static LLRegisterPanelClassWrapper<LLPanelAvatarNotes> t_panel_notes("panel_notes");
-
-//-----------------------------------------------------------------------------
-// LLPanelAvatarNotes()
-//-----------------------------------------------------------------------------
-LLPanelAvatarNotes::LLPanelAvatarNotes()
-: LLPanelProfileTab()
-{
-
-}
-
-void LLPanelAvatarNotes::updateData()
-{
- LLAvatarPropertiesProcessor::getInstance()->
- sendAvatarNotesRequest(getAvatarId());
-}
-
-BOOL LLPanelAvatarNotes::postBuild()
-{
- childSetCommitCallback("status_check", boost::bind(&LLPanelAvatarNotes::onCommitRights, this), NULL);
- childSetCommitCallback("map_check", boost::bind(&LLPanelAvatarNotes::onCommitRights, this), NULL);
- childSetCommitCallback("objects_check", boost::bind(&LLPanelAvatarNotes::onCommitRights, this), NULL);
-
- childSetCommitCallback("add_friend", boost::bind(&LLPanelAvatarNotes::onAddFriendButtonClick, this),NULL);
- childSetCommitCallback("im", boost::bind(&LLPanelAvatarNotes::onIMButtonClick, this), NULL);
- childSetCommitCallback("call", boost::bind(&LLPanelAvatarNotes::onCallButtonClick, this), NULL);
- childSetCommitCallback("teleport", boost::bind(&LLPanelAvatarNotes::onTeleportButtonClick, this), NULL);
- childSetCommitCallback("share", boost::bind(&LLPanelAvatarNotes::onShareButtonClick, this), NULL);
- childSetCommitCallback("show_on_map_btn", (boost::bind(
- &LLPanelAvatarNotes::onMapButtonClick, this)), NULL);
-
- LLTextEditor* te = getChild<LLTextEditor>("notes_edit");
- te->setCommitCallback(boost::bind(&LLPanelAvatarNotes::onCommitNotes,this));
- te->setCommitOnFocusLost(TRUE);
-
- resetControls();
- resetData();
-
- LLVoiceClient::getInstance()->addObserver((LLVoiceClientStatusObserver*)this);
-
- return TRUE;
-}
-
-void LLPanelAvatarNotes::onOpen(const LLSD& key)
-{
- LLPanelProfileTab::onOpen(key);
-
- fillRightsData();
-
- //Disable "Add Friend" button for friends.
- getChildView("add_friend")->setEnabled(!LLAvatarActions::isFriend(getAvatarId()));
-}
-
-void LLPanelAvatarNotes::fillRightsData()
-{
- getChild<LLUICtrl>("status_check")->setValue(FALSE);
- getChild<LLUICtrl>("map_check")->setValue(FALSE);
- getChild<LLUICtrl>("objects_check")->setValue(FALSE);
-
- const LLRelationship* relation = LLAvatarTracker::instance().getBuddyInfo(getAvatarId());
- // If true - we are viewing friend's profile, enable check boxes and set values.
- if(relation)
- {
- S32 rights = relation->getRightsGrantedTo();
-
- getChild<LLUICtrl>("status_check")->setValue(LLRelationship::GRANT_ONLINE_STATUS & rights ? TRUE : FALSE);
- getChild<LLUICtrl>("map_check")->setValue(LLRelationship::GRANT_MAP_LOCATION & rights ? TRUE : FALSE);
- getChild<LLUICtrl>("objects_check")->setValue(LLRelationship::GRANT_MODIFY_OBJECTS & rights ? TRUE : FALSE);
-
- }
-
- enableCheckboxes(NULL != relation);
-}
-
-void LLPanelAvatarNotes::onCommitNotes()
-{
- std::string notes = getChild<LLUICtrl>("notes_edit")->getValue().asString();
- LLAvatarPropertiesProcessor::getInstance()-> sendNotes(getAvatarId(),notes);
-}
-
-void LLPanelAvatarNotes::rightsConfirmationCallback(const LLSD& notification,
- const LLSD& response, S32 rights)
-{
- S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
- if (option == 0)
- {
- LLAvatarPropertiesProcessor::getInstance()->sendFriendRights(
- getAvatarId(), rights);
- }
- else
- {
- getChild<LLUICtrl>("objects_check")->setValue(
- getChild<LLUICtrl>("objects_check")->getValue().asBoolean() ? FALSE : TRUE);
- }
-}
-
-void LLPanelAvatarNotes::confirmModifyRights(bool grant, S32 rights)
-{
- LLSD args;
- args["NAME"] = LLSLURL("agent", getAvatarId(), "displayname").getSLURLString();
-
- if (grant)
- {
- LLNotificationsUtil::add("GrantModifyRights", args, LLSD(),
- boost::bind(&LLPanelAvatarNotes::rightsConfirmationCallback, this,
- _1, _2, rights));
- }
- else
- {
- LLNotificationsUtil::add("RevokeModifyRights", args, LLSD(),
- boost::bind(&LLPanelAvatarNotes::rightsConfirmationCallback, this,
- _1, _2, rights));
- }
-}
-
-void LLPanelAvatarNotes::onCommitRights()
-{
- const LLRelationship* buddy_relationship =
- LLAvatarTracker::instance().getBuddyInfo(getAvatarId());
-
- if (NULL == buddy_relationship)
- {
- // Lets have a warning log message instead of having a crash. EXT-4947.
- llwarns << "Trying to modify rights for non-friend avatar. Skipped." << llendl;
- return;
- }
-
-
- S32 rights = 0;
-
- if(getChild<LLUICtrl>("status_check")->getValue().asBoolean())
- rights |= LLRelationship::GRANT_ONLINE_STATUS;
- if(getChild<LLUICtrl>("map_check")->getValue().asBoolean())
- rights |= LLRelationship::GRANT_MAP_LOCATION;
- if(getChild<LLUICtrl>("objects_check")->getValue().asBoolean())
- rights |= LLRelationship::GRANT_MODIFY_OBJECTS;
-
- bool allow_modify_objects = getChild<LLUICtrl>("objects_check")->getValue().asBoolean();
-
- // if modify objects checkbox clicked
- if (buddy_relationship->isRightGrantedTo(
- LLRelationship::GRANT_MODIFY_OBJECTS) != allow_modify_objects)
- {
- confirmModifyRights(allow_modify_objects, rights);
- }
- // only one checkbox can trigger commit, so store the rest of rights
- else
- {
- LLAvatarPropertiesProcessor::getInstance()->sendFriendRights(
- getAvatarId(), rights);
- }
-}
-
-void LLPanelAvatarNotes::processProperties(void* data, EAvatarProcessorType type)
-{
- if(APT_NOTES == type)
- {
- LLAvatarNotes* avatar_notes = static_cast<LLAvatarNotes*>(data);
- if(avatar_notes && getAvatarId() == avatar_notes->target_id)
- {
- getChild<LLUICtrl>("notes_edit")->setValue(avatar_notes->notes);
- getChildView("notes edit")->setEnabled(true);
-
- LLAvatarPropertiesProcessor::getInstance()->removeObserver(getAvatarId(),this);
- }
- }
-}
-
-void LLPanelAvatarNotes::resetData()
-{
- getChild<LLUICtrl>("notes_edit")->setValue(LLStringUtil::null);
- // Default value is TRUE
- getChild<LLUICtrl>("status_check")->setValue(TRUE);
-}
-
-void LLPanelAvatarNotes::resetControls()
-{
- //Disable "Add Friend" button for friends.
- getChildView("add_friend")->setEnabled(TRUE);
-
- enableCheckboxes(false);
-}
-
-void LLPanelAvatarNotes::onAddFriendButtonClick()
-{
- LLAvatarActions::requestFriendshipDialog(getAvatarId());
-}
-
-void LLPanelAvatarNotes::onIMButtonClick()
-{
- LLAvatarActions::startIM(getAvatarId());
-}
-
-void LLPanelAvatarNotes::onTeleportButtonClick()
-{
- LLAvatarActions::offerTeleport(getAvatarId());
-}
-
-void LLPanelAvatarNotes::onCallButtonClick()
-{
- LLAvatarActions::startCall(getAvatarId());
-}
-
-void LLPanelAvatarNotes::onShareButtonClick()
-{
- //*TODO not implemented.
-}
-
-void LLPanelAvatarNotes::enableCheckboxes(bool enable)
-{
- getChildView("status_check")->setEnabled(enable);
- getChildView("map_check")->setEnabled(enable);
- getChildView("objects_check")->setEnabled(enable);
-}
-
-LLPanelAvatarNotes::~LLPanelAvatarNotes()
-{
- if(getAvatarId().notNull())
- {
- LLAvatarTracker::instance().removeParticularFriendObserver(getAvatarId(), this);
- }
-
- if(LLVoiceClient::instanceExists())
- {
- LLVoiceClient::getInstance()->removeObserver((LLVoiceClientStatusObserver*)this);
- }
-}
-
-// virtual, called by LLAvatarTracker
-void LLPanelAvatarNotes::changed(U32 mask)
-{
- getChildView("teleport")->setEnabled(LLAvatarTracker::instance().isBuddyOnline(getAvatarId()));
-
- // update rights to avoid have checkboxes enabled when friendship is terminated. EXT-4947.
- fillRightsData();
-}
-
-// virtual
-void LLPanelAvatarNotes::onChange(EStatusType status, const std::string &channelURI, bool proximal)
-{
- if(status == STATUS_JOINING || status == STATUS_LEFT_CHANNEL)
- {
- return;
- }
-
- getChildView("call")->setEnabled(LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking());
-}
-
-void LLPanelAvatarNotes::setAvatarId(const LLUUID& id)
-{
- if(id.notNull())
- {
- if(getAvatarId().notNull())
- {
- LLAvatarTracker::instance().removeParticularFriendObserver(getAvatarId(), this);
- }
- LLPanelProfileTab::setAvatarId(id);
- LLAvatarTracker::instance().addParticularFriendObserver(getAvatarId(), this);
- }
-}
-
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
@@ -461,449 +198,3 @@ void LLPanelProfileTab::updateButtons()
|| gAgent.isGodlike();
getChildView("show_on_map_btn")->setEnabled(enable_map_btn);
}
-
-//////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////
-
-bool enable_god()
-{
- return gAgent.isGodlike();
-}
-
-LLPanelAvatarProfile::LLPanelAvatarProfile()
-: LLPanelProfileTab()
-{
-}
-
-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);
- childSetCommitCallback("teleport",(boost::bind(&LLPanelAvatarProfile::onTeleportButtonClick,this)),NULL);
- childSetCommitCallback("share",(boost::bind(&LLPanelAvatarProfile::onShareButtonClick,this)),NULL);
- childSetCommitCallback("show_on_map_btn", (boost::bind(
- &LLPanelAvatarProfile::onMapButtonClick, this)), NULL);
-
- LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
- registrar.add("Profile.ShowOnMap", boost::bind(&LLPanelAvatarProfile::onMapButtonClick, this));
- registrar.add("Profile.Pay", boost::bind(&LLPanelAvatarProfile::pay, this));
- registrar.add("Profile.Share", boost::bind(&LLPanelAvatarProfile::share, this));
- registrar.add("Profile.BlockUnblock", boost::bind(&LLPanelAvatarProfile::toggleBlock, this));
- registrar.add("Profile.Kick", boost::bind(&LLPanelAvatarProfile::kick, this));
- registrar.add("Profile.Freeze", boost::bind(&LLPanelAvatarProfile::freeze, this));
- registrar.add("Profile.Unfreeze", boost::bind(&LLPanelAvatarProfile::unfreeze, this));
- registrar.add("Profile.CSR", boost::bind(&LLPanelAvatarProfile::csr, this));
-
- LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable;
- enable.add("Profile.EnableShowOnMap", boost::bind(&LLPanelAvatarProfile::enableShowOnMap, this));
- enable.add("Profile.EnableGod", boost::bind(&enable_god));
- enable.add("Profile.EnableBlock", boost::bind(&LLPanelAvatarProfile::enableBlock, this));
- enable.add("Profile.EnableUnblock", boost::bind(&LLPanelAvatarProfile::enableUnblock, this));
-
- LLToggleableMenu* profile_menu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_profile_overflow.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
- getChild<LLMenuButton>("overflow_btn")->setMenu(profile_menu, LLMenuButton::MP_TOP_RIGHT);
-
- LLVoiceClient::getInstance()->addObserver((LLVoiceClientStatusObserver*)this);
-
- resetControls();
- resetData();
-
- return TRUE;
-}
-
-void LLPanelAvatarProfile::onOpen(const LLSD& key)
-{
- LLPanelProfileTab::onOpen(key);
-
- mGroups.clear();
-
- //Disable "Add Friend" button for friends.
- getChildView("add_friend")->setEnabled(!LLAvatarActions::isFriend(getAvatarId()));
-}
-
-void LLPanelAvatarProfile::updateData()
-{
- if (getAvatarId().notNull())
- {
- LLAvatarPropertiesProcessor::getInstance()->
- sendAvatarPropertiesRequest(getAvatarId());
- LLAvatarPropertiesProcessor::getInstance()->
- sendAvatarGroupsRequest(getAvatarId());
- }
-}
-
-void LLPanelAvatarProfile::resetControls()
-{
- getChildView("status_panel")->setVisible( true);
- getChildView("profile_buttons_panel")->setVisible( true);
- getChildView("title_groups_text")->setVisible( true);
- getChildView("sl_groups")->setVisible( true);
- getChildView("add_friend")->setEnabled(true);
-
- getChildView("status_me_panel")->setVisible( false);
- getChildView("profile_me_buttons_panel")->setVisible( false);
- getChildView("account_actions_panel")->setVisible( false);
-}
-
-void LLPanelAvatarProfile::resetData()
-{
- mGroups.clear();
- getChild<LLUICtrl>("2nd_life_pic")->setValue(LLUUID::null);
- getChild<LLUICtrl>("real_world_pic")->setValue(LLUUID::null);
- getChild<LLUICtrl>("online_status")->setValue(LLStringUtil::null);
- getChild<LLUICtrl>("status_message")->setValue(LLStringUtil::null);
- getChild<LLUICtrl>("sl_description_edit")->setValue(LLStringUtil::null);
- getChild<LLUICtrl>("fl_description_edit")->setValue(LLStringUtil::null);
- getChild<LLUICtrl>("sl_groups")->setValue(LLStringUtil::null);
- getChild<LLUICtrl>("homepage_edit")->setValue(LLStringUtil::null);
- getChild<LLUICtrl>("register_date")->setValue(LLStringUtil::null);
- getChild<LLUICtrl>("acc_status_text")->setValue(LLStringUtil::null);
- getChild<LLUICtrl>("partner_text")->setValue(LLStringUtil::null);
-}
-
-void LLPanelAvatarProfile::processProperties(void* data, EAvatarProcessorType type)
-{
- if(APT_PROPERTIES == type)
- {
- const LLAvatarData* avatar_data = static_cast<const LLAvatarData*>(data);
- if(avatar_data && getAvatarId() == avatar_data->avatar_id)
- {
- processProfileProperties(avatar_data);
- }
- }
- else if(APT_GROUPS == type)
- {
- LLAvatarGroups* avatar_groups = static_cast<LLAvatarGroups*>(data);
- if(avatar_groups && getAvatarId() == avatar_groups->avatar_id)
- {
- processGroupProperties(avatar_groups);
- }
- }
-}
-
-void LLPanelAvatarProfile::processProfileProperties(const LLAvatarData* avatar_data)
-{
- fillCommonData(avatar_data);
-
- fillPartnerData(avatar_data);
-
- fillAccountStatus(avatar_data);
-}
-
-void LLPanelAvatarProfile::processGroupProperties(const LLAvatarGroups* avatar_groups)
-{
- // *NOTE dzaporozhan
- // Group properties may arrive in two callbacks, we need to save them across
- // different calls. We can't do that in textbox as textbox may change the text.
-
- LLAvatarGroups::group_list_t::const_iterator it = avatar_groups->group_list.begin();
- const LLAvatarGroups::group_list_t::const_iterator it_end = avatar_groups->group_list.end();
-
- for(; it_end != it; ++it)
- {
- LLAvatarGroups::LLGroupData group_data = *it;
- mGroups[group_data.group_name] = group_data.group_id;
- }
-
- // Creating string, containing group list
- std::string groups = "";
- for (group_map_t::iterator it = mGroups.begin(); it != mGroups.end(); ++it)
- {
- if (it != mGroups.begin())
- groups += ", ";
-
- std::string group_name = LLURI::escape(it->first);
- std::string group_url= it->second.notNull()
- ? "[secondlife:///app/group/" + it->second.asString() + "/about " + group_name + "]"
- : getString("no_group_text");
-
- groups += group_url;
- }
-
- getChild<LLUICtrl>("sl_groups")->setValue(groups);
-}
-
-static void got_full_name_callback( LLHandle<LLPanel> profile_panel_handle, const std::string& full_name )
-{
- if (profile_panel_handle.isDead() ) return;
-
- LLPanelAvatarProfile* profile_panel = dynamic_cast<LLPanelAvatarProfile*>(profile_panel_handle.get());
- if ( ! profile_panel ) return;
-
- 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 = profile_panel->getString("name_text_args", args);
- profile_panel->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
- LLAvatarIconIDCache::getInstance()->remove(avatar_data->avatar_id);
-
- LLStringUtil::format_map_t args;
- {
- std::string birth_date = LLTrans::getString("AvatarBirthDateFormat");
- LLStringUtil::format(birth_date, LLSD().with("datetime", (S32) avatar_data->born_on.secondsSinceEpoch()));
- args["[REG_DATE]"] = birth_date;
- }
-
- // ask (asynchronously) for the avatar name
- LLHandle<LLPanel> profile_panel_handle = getHandle();
- std::string full_name;
- if (gCacheName->getFullName(avatar_data->agent_id, full_name))
- {
- // name in cache, call callback directly
- got_full_name_callback( profile_panel_handle, full_name );
- }
- else
- {
- // not in cache, lookup name
- gCacheName->get(avatar_data->agent_id, false, boost::bind( got_full_name_callback, profile_panel_handle, _2 ));
- }
-
- // 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 );
- getChild<LLUICtrl>("sl_description_edit")->setValue(avatar_data->about_text);
- getChild<LLUICtrl>("fl_description_edit")->setValue(avatar_data->fl_about_text);
- getChild<LLUICtrl>("2nd_life_pic")->setValue(avatar_data->image_id);
- getChild<LLUICtrl>("real_world_pic")->setValue(avatar_data->fl_image_id);
- getChild<LLUICtrl>("homepage_edit")->setValue(avatar_data->profile_url);
-
- // Hide home page textbox if no page was set to fix "homepage URL appears clickable without URL - EXT-4734"
- getChildView("homepage_edit")->setVisible( !avatar_data->profile_url.empty());
-}
-
-void LLPanelAvatarProfile::fillPartnerData(const LLAvatarData* avatar_data)
-{
- LLTextBox* partner_text = getChild<LLTextBox>("partner_text");
- if (avatar_data->partner_id.notNull())
- {
- partner_text->setText(LLSLURL("agent", avatar_data->partner_id, "inspect").getSLURLString());
- }
- else
- {
- partner_text->setText(getString("no_partner_text"));
- }
-}
-
-void LLPanelAvatarProfile::fillAccountStatus(const LLAvatarData* avatar_data)
-{
- LLStringUtil::format_map_t args;
- args["[ACCTTYPE]"] = LLAvatarPropertiesProcessor::accountType(avatar_data);
- args["[PAYMENTINFO]"] = LLAvatarPropertiesProcessor::paymentInfo(avatar_data);
- // *NOTE: AVATAR_AGEVERIFIED not currently getting set in
- // dataserver/lldataavatar.cpp for privacy considerations
- args["[AGEVERIFICATION]"] = "";
- std::string caption_text = getString("CaptionTextAcctInfo", args);
- getChild<LLUICtrl>("acc_status_text")->setValue(caption_text);
-}
-
-void LLPanelAvatarProfile::pay()
-{
- LLAvatarActions::pay(getAvatarId());
-}
-
-void LLPanelAvatarProfile::share()
-{
- LLAvatarActions::share(getAvatarId());
-}
-
-void LLPanelAvatarProfile::toggleBlock()
-{
- LLAvatarActions::toggleBlock(getAvatarId());
-}
-
-bool LLPanelAvatarProfile::enableShowOnMap()
-{
- bool is_buddy_online = LLAvatarTracker::instance().isBuddyOnline(getAvatarId());
-
- bool enable_map_btn = (is_buddy_online && is_agent_mappable(getAvatarId()))
- || gAgent.isGodlike();
- return enable_map_btn;
-}
-
-bool LLPanelAvatarProfile::enableBlock()
-{
- return LLAvatarActions::canBlock(getAvatarId()) && !LLAvatarActions::isBlocked(getAvatarId());
-}
-
-bool LLPanelAvatarProfile::enableUnblock()
-{
- return LLAvatarActions::isBlocked(getAvatarId());
-}
-
-void LLPanelAvatarProfile::kick()
-{
- LLAvatarActions::kick(getAvatarId());
-}
-
-void LLPanelAvatarProfile::freeze()
-{
- LLAvatarActions::freeze(getAvatarId());
-}
-
-void LLPanelAvatarProfile::unfreeze()
-{
- LLAvatarActions::unfreeze(getAvatarId());
-}
-
-void LLPanelAvatarProfile::csr()
-{
- std::string name;
- gCacheName->getFullName(getAvatarId(), name);
- LLAvatarActions::csr(getAvatarId(), name);
-}
-
-void LLPanelAvatarProfile::onAddFriendButtonClick()
-{
- LLAvatarActions::requestFriendshipDialog(getAvatarId());
-}
-
-void LLPanelAvatarProfile::onSeeProfileBtnClick()
-{
- LLAvatarActions::showProfile(getAvatarId());
-}
-
-void LLPanelAvatarProfile::onIMButtonClick()
-{
- LLAvatarActions::startIM(getAvatarId());
-}
-
-void LLPanelAvatarProfile::onTeleportButtonClick()
-{
- LLAvatarActions::offerTeleport(getAvatarId());
-}
-
-void LLPanelAvatarProfile::onCallButtonClick()
-{
- LLAvatarActions::startCall(getAvatarId());
-}
-
-void LLPanelAvatarProfile::onShareButtonClick()
-{
- //*TODO not implemented
-}
-
-LLPanelAvatarProfile::~LLPanelAvatarProfile()
-{
- if(getAvatarId().notNull())
- {
- LLAvatarTracker::instance().removeParticularFriendObserver(getAvatarId(), this);
- }
-
- if(LLVoiceClient::instanceExists())
- {
- LLVoiceClient::getInstance()->removeObserver((LLVoiceClientStatusObserver*)this);
- }
-}
-
-// virtual, called by LLAvatarTracker
-void LLPanelAvatarProfile::changed(U32 mask)
-{
- getChildView("teleport")->setEnabled(LLAvatarTracker::instance().isBuddyOnline(getAvatarId()));
-}
-
-// virtual
-void LLPanelAvatarProfile::onChange(EStatusType status, const std::string &channelURI, bool proximal)
-{
- if(status == STATUS_JOINING || status == STATUS_LEFT_CHANNEL)
- {
- return;
- }
-
- getChildView("call")->setEnabled(LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking());
-}
-
-void LLPanelAvatarProfile::setAvatarId(const LLUUID& id)
-{
- if(id.notNull())
- {
- if(getAvatarId().notNull())
- {
- LLAvatarTracker::instance().removeParticularFriendObserver(getAvatarId(), this);
- }
- LLPanelProfileTab::setAvatarId(id);
- LLAvatarTracker::instance().addParticularFriendObserver(getAvatarId(), this);
- }
-}
-
-//////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////
-
-LLPanelMyProfile::LLPanelMyProfile()
-: LLPanelAvatarProfile()
-{
-}
-
-BOOL LLPanelMyProfile::postBuild()
-{
- LLPanelAvatarProfile::postBuild();
-
- childSetCommitCallback("status_me_message_text", boost::bind(&LLPanelMyProfile::onStatusMessageChanged, this), NULL);
-
- resetControls();
- resetData();
-
- return TRUE;
-}
-
-void LLPanelMyProfile::onOpen(const LLSD& key)
-{
- LLPanelProfileTab::onOpen(key);
-}
-
-void LLPanelMyProfile::processProfileProperties(const LLAvatarData* avatar_data)
-{
- fillCommonData(avatar_data);
-
- fillPartnerData(avatar_data);
-
- fillAccountStatus(avatar_data);
-}
-
-void LLPanelMyProfile::resetControls()
-{
- getChildView("status_panel")->setVisible( false);
- getChildView("profile_buttons_panel")->setVisible( false);
- getChildView("title_groups_text")->setVisible( false);
- getChildView("sl_groups")->setVisible( false);
- getChildView("status_me_panel")->setVisible( true);
- getChildView("profile_me_buttons_panel")->setVisible( true);
-}
-
-
-void LLPanelMyProfile::onStatusMessageChanged()
-{
- updateData();
-}
diff --git a/indra/newview/llpanelavatar.h b/indra/newview/llpanelavatar.h
index e95441cd58..e33a850cfa 100644
--- a/indra/newview/llpanelavatar.h
+++ b/indra/newview/llpanelavatar.h
@@ -36,14 +36,8 @@
class LLComboBox;
class LLLineEditor;
-enum EOnlineStatus
-{
- ONLINE_STATUS_NO = 0,
- ONLINE_STATUS_YES = 1
-};
-
/**
-* Base class for any Profile View or My Profile Panel.
+* Base class for any Profile View.
*/
class LLPanelProfileTab
: public LLPanel
@@ -111,187 +105,4 @@ 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 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/llpanelme.cpp b/indra/newview/llpanelme.cpp
index 7e47a96f44..a9af56f750 100644
--- a/indra/newview/llpanelme.cpp
+++ b/indra/newview/llpanelme.cpp
@@ -48,16 +48,10 @@
#include "lltabcontainer.h"
#include "lltexturectrl.h"
-#define PICKER_SECOND_LIFE "2nd_life_pic"
-#define PICKER_FIRST_LIFE "real_world_pic"
-#define PANEL_PROFILE "panel_profile"
-
-static LLRegisterPanelClassWrapper<LLPanelMyProfileEdit> t_panel_me_profile_edit("edit_profile_panel");
static LLRegisterPanelClassWrapper<LLPanelMe> t_panel_me_profile("panel_me");
LLPanelMe::LLPanelMe(void)
: LLPanelProfile()
- , mEditPanel(NULL)
{
setAvatarId(gAgent.getID());
}
@@ -73,282 +67,3 @@ void LLPanelMe::onOpen(const LLSD& key)
{
LLPanelProfile::onOpen(key);
}
-
-void LLPanelMe::buildEditPanel()
-{
- if (NULL == mEditPanel)
- {
- mEditPanel = new LLPanelMyProfileEdit();
-
- // Note: Remove support for editing profile through this method.
- // All profile editing should go through the web.
- //mEditPanel->childSetAction("save_btn", boost::bind(&LLPanelMe::onSaveChangesClicked, this), this);
-
- //mEditPanel->childSetAction("cancel_btn", boost::bind(&LLPanelMe::onCancelClicked, this), this);
- }
-}
-
-
-void LLPanelMe::onEditProfileClicked()
-{
- buildEditPanel();
-}
-
-//////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////
-
-LLPanelMyProfileEdit::LLPanelMyProfileEdit()
- : LLPanelMyProfile()
-{
- buildFromFile( "panel_edit_profile.xml");
-
- setAvatarId(gAgent.getID());
-
- LLAvatarNameCache::addUseDisplayNamesCallback(boost::bind(&LLPanelMyProfileEdit::onAvatarNameChanged, this));
-}
-
-void LLPanelMyProfileEdit::onOpen(const LLSD& key)
-{
- resetData();
-
- // Disable editing until data is loaded, or edited fields will be overwritten when data
- // is loaded.
- enableEditing(false);
-
- // force new avatar name fetch so we have latest update time
- LLAvatarNameCache::fetch(gAgent.getID());
- LLPanelMyProfile::onOpen(getAvatarId());
-
- LLAvatarName av_name;
- if (LLAvatarNameCache::useDisplayNames())
- {
- if (LLAvatarNameCache::get(gAgent.getID(), &av_name) && av_name.mIsDisplayNameDefault)
- {
- LLFirstUse::setDisplayName();
- }
- else
- {
- LLFirstUse::setDisplayName(false);
- }
- }
-
- if (LLAvatarNameCache::useDisplayNames())
- {
- getChild<LLUICtrl>("user_label")->setVisible( true );
- getChild<LLUICtrl>("user_slid")->setVisible( true );
- getChild<LLUICtrl>("display_name_label")->setVisible( true );
- getChild<LLUICtrl>("set_name")->setVisible( true );
- getChild<LLUICtrl>("set_name")->setEnabled( true );
- getChild<LLUICtrl>("solo_user_name")->setVisible( false );
- getChild<LLUICtrl>("solo_username_label")->setVisible( false );
- }
- else
- {
- getChild<LLUICtrl>("user_label")->setVisible( false );
- getChild<LLUICtrl>("user_slid")->setVisible( false );
- getChild<LLUICtrl>("display_name_label")->setVisible( false );
- getChild<LLUICtrl>("set_name")->setVisible( false );
- getChild<LLUICtrl>("set_name")->setEnabled( false );
- getChild<LLUICtrl>("solo_user_name")->setVisible( true );
- getChild<LLUICtrl>("solo_username_label")->setVisible( true );
- }
-}
-
-void LLPanelMyProfileEdit::onClose(const LLSD& key)
-{
- if (LLAvatarNameCache::useDisplayNames())
- {
- LLFirstUse::setDisplayName(false);
- }
-}
-
-void LLPanelMyProfileEdit::processProperties(void* data, EAvatarProcessorType type)
-{
- if(APT_PROPERTIES == type)
- {
- const LLAvatarData* avatar_data = static_cast<const LLAvatarData*>(data);
- if(avatar_data && getAvatarId() == avatar_data->avatar_id)
- {
- // *TODO dzaporozhan
- // Workaround for ticket EXT-1099, waiting for fix for ticket EXT-1128
- enableEditing(true);
- processProfileProperties(avatar_data);
- LLAvatarPropertiesProcessor::getInstance()->removeObserver(getAvatarId(),this);
- }
- }
-}
-
-void LLPanelMyProfileEdit::processProfileProperties(const LLAvatarData* avatar_data)
-{
- fillCommonData(avatar_data);
-
- // 'Home page' was hidden in LLPanelAvatarProfile::fillCommonData() to fix EXT-4734
- // Show 'Home page' in Edit My Profile (EXT-4873)
- getChildView("homepage_edit")->setVisible( true);
-
- fillPartnerData(avatar_data);
-
- fillAccountStatus(avatar_data);
-
- getChild<LLUICtrl>("show_in_search_checkbox")->setValue((BOOL)(avatar_data->flags & AVATAR_ALLOW_PUBLISH));
-
- LLAvatarNameCache::get(avatar_data->avatar_id,
- boost::bind(&LLPanelMyProfileEdit::onNameCache, this, _1, _2));
-}
-
-void LLPanelMyProfileEdit::onNameCache(const LLUUID& agent_id, const LLAvatarName& av_name)
-{
- getChild<LLUICtrl>("user_name")->setValue( av_name.mDisplayName );
- getChild<LLUICtrl>("user_slid")->setValue( av_name.mUsername );
- getChild<LLUICtrl>("user_name_small")->setValue( av_name.mDisplayName );
- getChild<LLUICtrl>("solo_user_name")->setValue( av_name.mDisplayName );
-
-
- if (LLAvatarNameCache::useDisplayNames())
- {
- getChild<LLUICtrl>("user_label")->setVisible( true );
- getChild<LLUICtrl>("user_slid")->setVisible( true );
- getChild<LLUICtrl>("display_name_label")->setVisible( true );
- getChild<LLUICtrl>("set_name")->setVisible( true );
- getChild<LLUICtrl>("set_name")->setEnabled( true );
-
- getChild<LLUICtrl>("solo_user_name")->setVisible( false );
- getChild<LLUICtrl>("solo_username_label")->setVisible( false );
-
- // show smaller display name if too long to display in regular size
- if (getChild<LLTextBox>("user_name")->getTextPixelWidth() > getChild<LLTextBox>("user_name")->getRect().getWidth())
- {
- getChild<LLUICtrl>("user_name_small")->setVisible( true );
- getChild<LLUICtrl>("user_name")->setVisible( false );
- }
- else
- {
- getChild<LLUICtrl>("user_name_small")->setVisible( false );
- getChild<LLUICtrl>("user_name")->setVisible( true );
- }
- }
- else
- {
- getChild<LLUICtrl>("user_label")->setVisible( false );
- getChild<LLUICtrl>("user_slid")->setVisible( false );
- getChild<LLUICtrl>("display_name_label")->setVisible( false );
- getChild<LLUICtrl>("set_name")->setVisible( false );
- getChild<LLUICtrl>("set_name")->setEnabled( false );
-
- getChild<LLUICtrl>("solo_user_name")->setVisible( true );
- getChild<LLUICtrl>("user_name_small")->setVisible( false );
- getChild<LLUICtrl>("user_name")->setVisible( false );
- getChild<LLUICtrl>("solo_username_label")->setVisible( true );
- }
-}
-
-
-void LLPanelMyProfileEdit::onAvatarNameChanged()
-{
- LLAvatarNameCache::get(getAvatarId(),
- boost::bind(&LLPanelMyProfileEdit::onNameCache, this, _1, _2));
-}
-
-BOOL LLPanelMyProfileEdit::postBuild()
-{
- initTexturePickerMouseEvents();
-
- getChild<LLUICtrl>("partner_edit_link")->setTextArg("[URL]", getString("partner_edit_link_url"));
- getChild<LLUICtrl>("my_account_link")->setTextArg("[URL]", getString("my_account_link_url"));
-
- getChild<LLUICtrl>("set_name")->setCommitCallback(
- boost::bind(&LLPanelMyProfileEdit::onClickSetName, this));
-
- LLHints::registerHintTarget("set_display_name", getChild<LLUICtrl>("set_name")->getHandle());
- LLViewerDisplayName::addNameChangedCallback(boost::bind(&LLPanelMyProfileEdit::onAvatarNameChanged, this));
- return LLPanelAvatarProfile::postBuild();
-}
-/**
- * Inits map with texture picker and appropriate edit icon.
- * Sets callbacks of Mouse Enter and Mouse Leave signals of Texture Pickers
- */
-void LLPanelMyProfileEdit::initTexturePickerMouseEvents()
-{
- LLTextureCtrl* text_pic = getChild<LLTextureCtrl>(PICKER_SECOND_LIFE);
- LLIconCtrl* text_icon = getChild<LLIconCtrl>("2nd_life_edit_icon");
- mTextureEditIconMap[text_pic->getName()] = text_icon;
- text_pic->setMouseEnterCallback(boost::bind(&LLPanelMyProfileEdit::onTexturePickerMouseEnter, this, _1));
- text_pic->setMouseLeaveCallback(boost::bind(&LLPanelMyProfileEdit::onTexturePickerMouseLeave, this, _1));
- text_icon->setVisible(FALSE);
-
- text_pic = getChild<LLTextureCtrl>(PICKER_FIRST_LIFE);
- text_icon = getChild<LLIconCtrl>("real_world_edit_icon");
- mTextureEditIconMap[text_pic->getName()] = text_icon;
- text_pic->setMouseEnterCallback(boost::bind(&LLPanelMyProfileEdit::onTexturePickerMouseEnter, this, _1));
- text_pic->setMouseLeaveCallback(boost::bind(&LLPanelMyProfileEdit::onTexturePickerMouseLeave, this, _1));
- text_icon->setVisible(FALSE);
-}
-
-void LLPanelMyProfileEdit::resetData()
-{
- LLPanelMyProfile::resetData();
-
- //childSetTextArg("name_text", "[FIRST]", LLStringUtil::null);
- //childSetTextArg("name_text", "[LAST]", LLStringUtil::null);
- getChild<LLUICtrl>("user_name")->setValue( LLSD() );
- getChild<LLUICtrl>("user_slid")->setValue( LLSD() );
- getChild<LLUICtrl>("solo_user_name")->setValue( LLSD() );
- getChild<LLUICtrl>("user_name_small")->setValue( LLSD() );
-}
-
-void LLPanelMyProfileEdit::onTexturePickerMouseEnter(LLUICtrl* ctrl)
-{
- mTextureEditIconMap[ctrl->getName()]->setVisible(TRUE);
-}
-void LLPanelMyProfileEdit::onTexturePickerMouseLeave(LLUICtrl* ctrl)
-{
- mTextureEditIconMap[ctrl->getName()]->setVisible(FALSE);
-}
-
-void LLPanelMyProfileEdit::onClickSetName()
-{
- LLAvatarNameCache::get(getAvatarId(),
- boost::bind(&LLPanelMyProfileEdit::onAvatarNameCache,
- this, _1, _2));
-
- LLFirstUse::setDisplayName(false);
-}
-
-void LLPanelMyProfileEdit::onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name)
-{
- if (av_name.mDisplayName.empty())
- {
- // something is wrong, tell user to try again later
- LLNotificationsUtil::add("SetDisplayNameFailedGeneric");
- return;
- }
-
- llinfos << "name-change now " << LLDate::now() << " next_update "
- << LLDate(av_name.mNextUpdate) << llendl;
- F64 now_secs = LLDate::now().secondsSinceEpoch();
-
- if (now_secs < av_name.mNextUpdate)
- {
- // if the update time is more than a year in the future, it means updates have been blocked
- // show a more general message
- const int YEAR = 60*60*24*365;
- if (now_secs + YEAR < av_name.mNextUpdate)
- {
- LLNotificationsUtil::add("SetDisplayNameBlocked");
- return;
- }
- }
-
- LLFloaterReg::showInstance("display_name");
-}
-
-void LLPanelMyProfileEdit::enableEditing(bool enable)
-{
- getChildView("2nd_life_pic")->setEnabled(enable);
- getChildView("real_world_pic")->setEnabled(enable);
- getChildView("sl_description_edit")->setEnabled(enable);
- getChildView("fl_description_edit")->setEnabled(enable);
- getChildView("homepage_edit")->setEnabled(enable);
- getChildView("show_in_search_checkbox")->setEnabled(enable);
-}
diff --git a/indra/newview/llpanelme.h b/indra/newview/llpanelme.h
index b0f5d184cc..60e9d4317d 100644
--- a/indra/newview/llpanelme.h
+++ b/indra/newview/llpanelme.h
@@ -30,15 +30,9 @@
#include "llpanel.h"
#include "llpanelprofile.h"
-class LLAvatarName;
-class LLPanelMyProfileEdit;
-class LLPanelProfile;
-class LLIconCtrl;
-
/**
-* Panel for displaying Agent's profile, it consists of two sub panels - Profile
-* and Picks.
-* LLPanelMe allows user to edit his profile and picks.
+* Panel for displaying Agent's Picks and Classifieds panel.
+* LLPanelMe allows user to edit his picks and classifieds.
*/
class LLPanelMe : public LLPanelProfile
{
@@ -51,60 +45,6 @@ public:
/*virtual*/ void onOpen(const LLSD& key);
/*virtual*/ BOOL postBuild();
-
-private:
-
- void buildEditPanel();
-
- void onEditProfileClicked();
-
- LLPanelMyProfileEdit * mEditPanel;
-
-};
-
-class LLPanelMyProfileEdit : public LLPanelMyProfile
-{
- LOG_CLASS(LLPanelMyProfileEdit);
-
-public:
-
- LLPanelMyProfileEdit();
-
- /*virtual*/void processProperties(void* data, EAvatarProcessorType type);
-
- /*virtual*/BOOL postBuild();
-
- /*virtual*/ void onOpen(const LLSD& key);
- /*virtual*/ void onClose(const LLSD& key);
-
- void onAvatarNameChanged();
-
-protected:
-
- /*virtual*/void resetData();
-
- void processProfileProperties(const LLAvatarData* avatar_data);
- void onNameCache(const LLUUID& agent_id, const LLAvatarName& av_name);
-
-private:
- void initTexturePickerMouseEvents();
- void onTexturePickerMouseEnter(LLUICtrl* ctrl);
- void onTexturePickerMouseLeave(LLUICtrl* ctrl);
- void onClickSetName();
- void onAvatarNameCache(const LLUUID& id, const LLAvatarName& av_name);
-
- /**
- * Enabled/disables controls to prevent overwriting edited data upon receiving
- * current data from server.
- */
- void enableEditing(bool enable);
-
-
-
-private:
- // map TexturePicker name => Edit Icon pointer should be visible while hovering Texture Picker
- typedef std::map<std::string, LLIconCtrl*> texture_edit_icon_map_t;
- texture_edit_icon_map_t mTextureEditIconMap;
};
#endif // LL_LLPANELMEPROFILE_H
diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp
index 2bbd15ae11..c01adc3c35 100644
--- a/indra/newview/llpanelnearbymedia.cpp
+++ b/indra/newview/llpanelnearbymedia.cpp
@@ -52,6 +52,7 @@
#include "llvovolume.h"
#include "llstatusbar.h"
#include "llsdutil.h"
+#include "llvieweraudio.h"
#include "llfloaterreg.h"
#include "llfloaterpreference.h" // for the gear icon
@@ -807,14 +808,26 @@ bool LLPanelNearByMedia::setDisabled(const LLUUID &row_id, bool disabled)
{
if (row_id == PARCEL_AUDIO_LIST_ITEM_UUID)
{
- if (disabled) onClickParcelAudioStop();
- else onClickParcelAudioStart();
+ if (disabled)
+ {
+ onClickParcelAudioStop();
+ }
+ else
+ {
+ onClickParcelAudioPlay();
+ }
return true;
}
else if (row_id == PARCEL_MEDIA_LIST_ITEM_UUID)
{
- if (disabled) onClickDisableParcelMedia();
- else onClickEnableParcelMedia();
+ if (disabled)
+ {
+ onClickDisableParcelMedia();
+ }
+ else
+ {
+ onClickEnableParcelMedia();
+ }
return true;
}
else {
@@ -857,24 +870,11 @@ void LLPanelNearByMedia::onClickParcelMediaPause()
LLViewerParcelMedia::pause();
}
-void LLPanelNearByMedia::onClickParcelAudioStart()
-{
- // User *explicitly* started the internet stream, so keep the stream
- // playing and updated as they cross to other parcels etc.
- mParcelAudioAutoStart = true;
-
- if (!gAudiop)
- return;
-
- gAudiop->startInternetStream(LLViewerMedia::getParcelAudioURL());
-}
-
void LLPanelNearByMedia::onClickParcelAudioPlay()
{
// User *explicitly* started the internet stream, so keep the stream
// playing and updated as they cross to other parcels etc.
mParcelAudioAutoStart = true;
-
if (!gAudiop)
return;
@@ -883,8 +883,9 @@ void LLPanelNearByMedia::onClickParcelAudioPlay()
// 'false' means unpause
gAudiop->pauseInternetStream(false);
}
- else {
- gAudiop->startInternetStream(LLViewerMedia::getParcelAudioURL());
+ else
+ {
+ LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLViewerMedia::getParcelAudioURL());
}
}
@@ -894,11 +895,10 @@ void LLPanelNearByMedia::onClickParcelAudioStop()
// re-start audio when i.e. they move to another parcel, until
// they explicitly start it again.
mParcelAudioAutoStart = false;
-
if (!gAudiop)
return;
- gAudiop->stopInternetStream();
+ LLViewerAudio::getInstance()->stopInternetStreamWithAutoFade();
}
void LLPanelNearByMedia::onClickParcelAudioPause()
diff --git a/indra/newview/llpanelnearbymedia.h b/indra/newview/llpanelnearbymedia.h
index be4d313743..c3634de9b4 100644
--- a/indra/newview/llpanelnearbymedia.h
+++ b/indra/newview/llpanelnearbymedia.h
@@ -115,7 +115,6 @@ private:
void onClickParcelMediaPause();
void onClickParcelAudioPlay();
void onClickParcelAudioStop();
- void onClickParcelAudioStart();
void onClickParcelAudioPause();
void onCheckAutoPlay();
void onAdvancedButtonClick();
diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp
index 50dc66ed7c..cfbc8f1a94 100755
--- a/indra/newview/llpanelpicks.cpp
+++ b/indra/newview/llpanelpicks.cpp
@@ -1048,13 +1048,10 @@ void LLPanelPicks::createPickInfoPanel()
void LLPanelPicks::createClassifiedInfoPanel()
{
- if(!mPanelClassifiedInfo)
- {
- mPanelClassifiedInfo = LLPanelClassifiedInfo::create();
- mPanelClassifiedInfo->setExitCallback(boost::bind(&LLPanelPicks::onPanelClassifiedClose, this, mPanelClassifiedInfo));
- mPanelClassifiedInfo->setEditClassifiedCallback(boost::bind(&LLPanelPicks::onPanelClassifiedEdit, this));
- mPanelClassifiedInfo->setVisible(FALSE);
- }
+ mPanelClassifiedInfo = LLPanelClassifiedInfo::create();
+ mPanelClassifiedInfo->setExitCallback(boost::bind(&LLPanelPicks::onPanelClassifiedClose, this, mPanelClassifiedInfo));
+ mPanelClassifiedInfo->setEditClassifiedCallback(boost::bind(&LLPanelPicks::onPanelClassifiedEdit, this));
+ mPanelClassifiedInfo->setVisible(FALSE);
}
void LLPanelPicks::createClassifiedEditPanel(LLPanelClassifiedEdit** panel)
@@ -1072,14 +1069,11 @@ void LLPanelPicks::createClassifiedEditPanel(LLPanelClassifiedEdit** panel)
void LLPanelPicks::createPickEditPanel()
{
- if(!mPanelPickEdit)
- {
- mPanelPickEdit = LLPanelPickEdit::create();
- mPanelPickEdit->setExitCallback(boost::bind(&LLPanelPicks::onPanelPickClose, this, mPanelPickEdit));
- mPanelPickEdit->setSaveCallback(boost::bind(&LLPanelPicks::onPanelPickSave, this, mPanelPickEdit));
- mPanelPickEdit->setCancelCallback(boost::bind(&LLPanelPicks::onPanelPickClose, this, mPanelPickEdit));
- mPanelPickEdit->setVisible(FALSE);
- }
+ mPanelPickEdit = LLPanelPickEdit::create();
+ mPanelPickEdit->setExitCallback(boost::bind(&LLPanelPicks::onPanelPickClose, this, mPanelPickEdit));
+ mPanelPickEdit->setSaveCallback(boost::bind(&LLPanelPicks::onPanelPickSave, this, mPanelPickEdit));
+ mPanelPickEdit->setCancelCallback(boost::bind(&LLPanelPicks::onPanelPickClose, this, mPanelPickEdit));
+ mPanelPickEdit->setVisible(FALSE);
}
// void LLPanelPicks::openPickEditPanel(LLPickItem* pick)
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index 5ce59d8959..b1eeabb028 100755
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -38,7 +38,6 @@
#include "llviewernetwork.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)
{
@@ -168,6 +167,23 @@ LLPanelProfile::ChildStack::ChildStack()
{
}
+LLPanelProfile::ChildStack::~ChildStack()
+{
+ while (mStack.size() != 0)
+ {
+ view_list_t& top = mStack.back();
+ for (view_list_t::const_iterator it = top.begin(); it != top.end(); ++it)
+ {
+ LLView* viewp = *it;
+ if (viewp)
+ {
+ delete viewp;
+ }
+ }
+ mStack.pop_back();
+ }
+}
+
void LLPanelProfile::ChildStack::setParent(LLPanel* parent)
{
llassert_always(parent != NULL);
@@ -272,7 +288,6 @@ BOOL LLPanelProfile::postBuild()
panel_picks->setProfilePanel(this);
getTabContainer()[PANEL_PICKS] = panel_picks;
- getTabContainer()[PANEL_PROFILE] = findChild<LLPanelAvatarProfile>(PANEL_PROFILE);
return TRUE;
}
diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h
index bd4457c240..d97f60ed22 100755
--- a/indra/newview/llpanelprofile.h
+++ b/indra/newview/llpanelprofile.h
@@ -74,6 +74,7 @@ private:
LOG_CLASS(LLPanelProfile::ChildStack);
public:
ChildStack();
+ ~ChildStack();
void setParent(LLPanel* parent);
bool push();
diff --git a/indra/newview/llpanelprofileview.cpp b/indra/newview/llpanelprofileview.cpp
deleted file mode 100644
index 7635aedf58..0000000000
--- a/indra/newview/llpanelprofileview.cpp
+++ /dev/null
@@ -1,247 +0,0 @@
-/**
-* @file llpanelprofileview.cpp
-* @brief Side tray "Profile View" panel
-*
-* $LicenseInfo:firstyear=2009&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 "llpanelprofileview.h"
-
-#include "llavatarconstants.h"
-#include "llavatarnamecache.h" // IDEVO
-#include "llclipboard.h"
-#include "lluserrelations.h"
-
-#include "llavatarpropertiesprocessor.h"
-#include "llcallingcard.h"
-#include "llpanelavatar.h"
-#include "llpanelpicks.h"
-#include "llpanelprofile.h"
-#include "llsidetraypanelcontainer.h"
-
-static LLRegisterPanelClassWrapper<LLPanelProfileView> t_panel_target_profile("panel_profile_view");
-
-static std::string PANEL_NOTES = "panel_notes";
-static const std::string PANEL_PROFILE = "panel_profile";
-static const std::string PANEL_PICKS = "panel_picks";
-
-
-class AvatarStatusObserver : public LLAvatarPropertiesObserver
-{
-public:
- AvatarStatusObserver(LLPanelProfileView* profile_view)
- {
- mProfileView = profile_view;
- }
-
- void processProperties(void* data, EAvatarProcessorType type)
- {
- if(APT_PROPERTIES != type) return;
- const LLAvatarData* avatar_data = static_cast<const LLAvatarData*>(data);
- if(avatar_data && mProfileView->getAvatarId() == avatar_data->avatar_id)
- {
- mProfileView->processOnlineStatus(avatar_data->flags & AVATAR_ONLINE);
- LLAvatarPropertiesProcessor::instance().removeObserver(mProfileView->getAvatarId(), this);
- }
- }
-
- void subscribe()
- {
- LLAvatarPropertiesProcessor::instance().addObserver(mProfileView->getAvatarId(), this);
- }
-
-private:
- LLPanelProfileView* mProfileView;
-};
-
-LLPanelProfileView::LLPanelProfileView()
-: LLPanelProfile()
-, mStatusText(NULL)
-, mAvatarStatusObserver(NULL)
-{
- mAvatarStatusObserver = new AvatarStatusObserver(this);
-}
-
-LLPanelProfileView::~LLPanelProfileView(void)
-{
- delete mAvatarStatusObserver;
-}
-
-/*virtual*/
-void LLPanelProfileView::onOpen(const LLSD& key)
-{
- LLUUID id;
- if(key.has("id"))
- {
- id = key["id"];
- }
-
- if(id.notNull() && getAvatarId() != id)
- {
- setAvatarId(id);
-
- // clear name fields, which might have old data
- getChild<LLUICtrl>("user_name")->setValue( LLSD() );
- getChild<LLUICtrl>("user_slid")->setValue( LLSD() );
- }
-
- // Update the avatar name.
- LLAvatarNameCache::get(getAvatarId(),
- boost::bind(&LLPanelProfileView::onAvatarNameCache, this, _1, _2));
-
- updateOnlineStatus();
-
-
- LLPanelProfile::onOpen(key);
-}
-
-BOOL LLPanelProfileView::postBuild()
-{
- LLPanelProfile::postBuild();
-
- getTabContainer()[PANEL_NOTES] = findChild<LLPanelAvatarNotes>(PANEL_NOTES);
-
- //*TODO remove this, according to style guide we don't use status combobox
- getTabContainer()[PANEL_PROFILE]->getChildView("online_me_status_text")->setVisible( FALSE);
- getTabContainer()[PANEL_PROFILE]->getChildView("status_combo")->setVisible( FALSE);
-
- mStatusText = getChild<LLTextBox>("status");
- mStatusText->setVisible(false);
-
- childSetCommitCallback("back",boost::bind(&LLPanelProfileView::onBackBtnClick,this),NULL);
- childSetCommitCallback("copy_to_clipboard",boost::bind(&LLPanelProfileView::onCopyToClipboard,this),NULL);
-
- return TRUE;
-}
-
-
-//private
-
-void LLPanelProfileView::onBackBtnClick()
-{
- // Set dummy value to make picks panel dirty,
- // This will make Picks reload on next open.
- getTabContainer()[PANEL_PICKS]->setValue(LLSD());
-
- LLSideTrayPanelContainer* parent = dynamic_cast<LLSideTrayPanelContainer*>(getParent());
- if(parent)
- {
- parent->openPreviousPanel();
- }
-}
-
-void LLPanelProfileView::onCopyToClipboard()
-{
- std::string name = getChild<LLUICtrl>("user_name")->getValue().asString() + " (" + getChild<LLUICtrl>("user_slid")->getValue().asString() + ")";
- gClipboard.copyFromString(utf8str_to_wstring(name));
-}
-
-bool LLPanelProfileView::isGrantedToSeeOnlineStatus()
-{
- const LLRelationship* relationship = LLAvatarTracker::instance().getBuddyInfo(getAvatarId());
- if (NULL == relationship)
- return false;
-
- // *NOTE: GRANT_ONLINE_STATUS is always set to false while changing any other status.
- // When avatar disallow me to see her online status processOfflineNotification Message is received by the viewer
- // see comments for ChangeUserRights template message. EXT-453.
- // If GRANT_ONLINE_STATUS flag is changed it will be applied when viewer restarts. EXT-3880
- return relationship->isRightGrantedFrom(LLRelationship::GRANT_ONLINE_STATUS);
-}
-
-// method was disabled according to EXT-2022. Re-enabled & improved according to EXT-3880
-void LLPanelProfileView::updateOnlineStatus()
-{
- // set text box visible to show online status for non-friends who has not set in Preferences
- // "Only Friends & Groups can see when I am online"
- mStatusText->setVisible(TRUE);
-
- const LLRelationship* relationship = LLAvatarTracker::instance().getBuddyInfo(getAvatarId());
- if (NULL == relationship)
- {
- // this is non-friend avatar. Status will be updated from LLAvatarPropertiesProcessor.
- // in LLPanelProfileView::processOnlineStatus()
-
- // subscribe observer to get online status. Request will be sent by LLPanelAvatarProfile itself.
- // do not subscribe for friend avatar because online status can be wrong overridden
- // via LLAvatarData::flags if Preferences: "Only Friends & Groups can see when I am online" is set.
- mAvatarStatusObserver->subscribe();
- return;
- }
- // For friend let check if he allowed me to see his status
-
- // status should only show if viewer has permission to view online/offline. EXT-453, EXT-3880
- mStatusText->setVisible(isGrantedToSeeOnlineStatus());
-
- bool online = relationship->isOnline();
- processOnlineStatus(online);
-}
-
-void LLPanelProfileView::processOnlineStatus(bool online)
-{
- std::string status = getString(online ? "status_online" : "status_offline");
-
- mStatusText->setValue(status);
-}
-
-void LLPanelProfileView::onAvatarNameCache(const LLUUID& agent_id,
- const LLAvatarName& av_name)
-{
- getChild<LLUICtrl>("user_name")->setValue( av_name.mDisplayName );
- getChild<LLUICtrl>("user_name_small")->setValue( av_name.mDisplayName );
- getChild<LLUICtrl>("user_slid")->setValue( av_name.mUsername );
-
- // show smaller display name if too long to display in regular size
- if (getChild<LLTextBox>("user_name")->getTextPixelWidth() > getChild<LLTextBox>("user_name")->getRect().getWidth())
- {
- getChild<LLUICtrl>("user_name_small")->setVisible( true );
- getChild<LLUICtrl>("user_name")->setVisible( false );
- }
- else
- {
- getChild<LLUICtrl>("user_name_small")->setVisible( false );
- getChild<LLUICtrl>("user_name")->setVisible( true );
- }
-
- if (LLAvatarNameCache::useDisplayNames())
- {
- getChild<LLUICtrl>("user_label")->setVisible( true );
- getChild<LLUICtrl>("user_slid")->setVisible( true );
- getChild<LLUICtrl>("display_name_label")->setVisible( true );
- getChild<LLUICtrl>("copy_to_clipboard")->setVisible( true );
- getChild<LLUICtrl>("copy_to_clipboard")->setEnabled( true );
- getChild<LLUICtrl>("solo_username_label")->setVisible( false );
- }
- else
- {
- getChild<LLUICtrl>("user_label")->setVisible( false );
- getChild<LLUICtrl>("user_slid")->setVisible( false );
- getChild<LLUICtrl>("display_name_label")->setVisible( false );
- getChild<LLUICtrl>("copy_to_clipboard")->setVisible( false );
- getChild<LLUICtrl>("copy_to_clipboard")->setEnabled( false );
- getChild<LLUICtrl>("solo_username_label")->setVisible( true );
- }
-}
-
-// EOF
diff --git a/indra/newview/llpanelprofileview.h b/indra/newview/llpanelprofileview.h
deleted file mode 100644
index c6d921fdc4..0000000000
--- a/indra/newview/llpanelprofileview.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
-* @file llpanelprofileview.h
-* @brief Side tray "Profile View" panel
-*
-* $LicenseInfo:firstyear=2009&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_LLPANELPROFILEVIEW_H
-#define LL_LLPANELPROFILEVIEW_H
-
-#include "llpanel.h"
-#include "llpanelprofile.h"
-#include "llavatarpropertiesprocessor.h"
-#include "llagent.h"
-#include "lltooldraganddrop.h"
-
-class LLAvatarName;
-class LLPanelProfile;
-class LLPanelProfileTab;
-class LLTextBox;
-class AvatarStatusObserver;
-
-/**
-* Panel for displaying Avatar's profile. It consists of three sub panels - Profile,
-* Picks and Notes.
-*/
-class LLPanelProfileView : public LLPanelProfile
-{
- LOG_CLASS(LLPanelProfileView);
- friend class LLUICtrlFactory;
- friend class AvatarStatusObserver;
-
-public:
-
- LLPanelProfileView();
-
- /*virtual*/ ~LLPanelProfileView();
-
- /*virtual*/ void onOpen(const LLSD& key);
-
- /*virtual*/ BOOL postBuild();
-
- BOOL handleDragAndDrop(S32 x, S32 y, MASK mask,
- BOOL drop, EDragAndDropType cargo_type,
- void *cargo_data, EAcceptance *accept,
- std::string& tooltip_msg)
- {
- LLToolDragAndDrop::handleGiveDragAndDrop(getAvatarId(), gAgent.getSessionID(), drop,
- cargo_type, cargo_data, accept);
-
- return TRUE;
- }
-
-
-protected:
-
- void onBackBtnClick();
- void onCopyToClipboard();
- bool isGrantedToSeeOnlineStatus();
-
- /**
- * Displays avatar's online status if possible.
- *
- * Requirements from EXT-3880:
- * For friends:
- * - Online when online and privacy settings allow to show
- * - Offline when offline and privacy settings allow to show
- * - Else: nothing
- * For other avatars:
- * - Online when online and was not set in Preferences/"Only Friends & Groups can see when I am online"
- * - Else: Offline
- */
- void updateOnlineStatus();
- void processOnlineStatus(bool online);
-
-private:
- // LLCacheName will call this function when avatar name is loaded from server.
- // This is required to display names that have not been cached yet.
-// void onNameCache(
-// const LLUUID& id,
-// const std::string& full_name,
-// bool is_group);
- void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name);
-
- LLTextBox* mStatusText;
- AvatarStatusObserver* mAvatarStatusObserver;
-};
-
-#endif //LL_LLPANELPROFILEVIEW_H
diff --git a/indra/newview/llpaneltopinfobar.cpp b/indra/newview/llpaneltopinfobar.cpp
index 5ed23d2f42..eb4c7572d4 100644
--- a/indra/newview/llpaneltopinfobar.cpp
+++ b/indra/newview/llpaneltopinfobar.cpp
@@ -203,6 +203,11 @@ void LLPanelTopInfoBar::onVisibilityChange(const LLSD& show)
gFloaterView->setMinimizePositionVerticalOffset(minimize_pos_offset);
}
+boost::signals2::connection LLPanelTopInfoBar::setResizeCallback( const resize_signal_t::slot_type& cb )
+{
+ return mResizeSignal.connect(cb);
+}
+
void LLPanelTopInfoBar::draw()
{
updateParcelInfoText();
@@ -224,6 +229,7 @@ void LLPanelTopInfoBar::buildLocationString(std::string& loc_str, bool show_coor
void LLPanelTopInfoBar::setParcelInfoText(const std::string& new_text)
{
+ LLRect old_rect = getRect();
const LLFontGL* font = mParcelInfoText->getDefaultFont();
S32 new_text_width = font->getWidth(new_text);
@@ -235,6 +241,11 @@ void LLPanelTopInfoBar::setParcelInfoText(const std::string& new_text)
mParcelInfoText->reshape(rect.getWidth(), rect.getHeight(), TRUE);
mParcelInfoText->setRect(rect);
layoutParcelIcons();
+
+ if (old_rect != getRect())
+ {
+ mResizeSignal();
+ }
}
void LLPanelTopInfoBar::update()
@@ -342,6 +353,8 @@ void LLPanelTopInfoBar::updateHealth()
void LLPanelTopInfoBar::layoutParcelIcons()
{
+ LLRect old_rect = getRect();
+
// TODO: remove hard-coded values and read them as xml parameters
static const int FIRST_ICON_HPAD = 32;
static const int LAST_ICON_HPAD = 11;
@@ -358,6 +371,11 @@ void LLPanelTopInfoBar::layoutParcelIcons()
LLRect rect = getRect();
rect.set(rect.mLeft, rect.mTop, left + LAST_ICON_HPAD, rect.mBottom);
setRect(rect);
+
+ if (old_rect != getRect())
+ {
+ mResizeSignal();
+ }
}
S32 LLPanelTopInfoBar::layoutWidget(LLUICtrl* ctrl, S32 left)
diff --git a/indra/newview/llpaneltopinfobar.h b/indra/newview/llpaneltopinfobar.h
index e934b522be..d58d95be90 100644
--- a/indra/newview/llpaneltopinfobar.h
+++ b/indra/newview/llpaneltopinfobar.h
@@ -41,6 +41,8 @@ class LLPanelTopInfoBar : public LLPanel, public LLSingleton<LLPanelTopInfoBar>,
friend class LLDestroyClass<LLPanelTopInfoBar>;
public:
+ typedef boost::signals2::signal<void ()> resize_signal_t;
+
LLPanelTopInfoBar();
~LLPanelTopInfoBar();
@@ -57,6 +59,8 @@ public:
*/
void onVisibilityChange(const LLSD& show);
+ boost::signals2::connection setResizeCallback( const resize_signal_t::slot_type& cb );
+
private:
class LLParcelChangeObserver;
@@ -167,6 +171,8 @@ private:
boost::signals2::connection mParcelPropsCtrlConnection;
boost::signals2::connection mShowCoordsCtrlConnection;
boost::signals2::connection mParcelMgrConnection;
+
+ resize_signal_t mResizeSignal;
};
#endif /* LLPANELTOPINFOBAR_H_ */
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index fb1153980a..5c95e805ce 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -468,7 +468,7 @@ void LLParticipantList::setValidateSpeakerCallback(validate_speaker_callback_t c
void LLParticipantList::updateRecentSpeakersOrder()
{
- if (E_SORT_BY_RECENT_SPEAKERS == getSortOrder())
+ if (E_SORT_BY_RECENT_SPEAKERS == getSortOrder() && !isHovered())
{
// Need to update speakers to sort list correctly
mSpeakerMgr->update(true);
@@ -477,6 +477,13 @@ void LLParticipantList::updateRecentSpeakersOrder()
}
}
+bool LLParticipantList::isHovered()
+{
+ S32 x, y;
+ LLUI::getMousePositionScreen(&x, &y);
+ return mAvatarList->calcScreenRect().pointInRect(x, y);
+}
+
bool LLParticipantList::onAddItemEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata)
{
LLUUID uu_id = event->getValue().asUUID();
diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h
index e0b3d42c25..a001d29b67 100644
--- a/indra/newview/llparticipantlist.h
+++ b/indra/newview/llparticipantlist.h
@@ -251,6 +251,8 @@ private:
*/
void adjustParticipant(const LLUUID& speaker_id);
+ bool isHovered();
+
LLSpeakerMgr* mSpeakerMgr;
LLAvatarList* mAvatarList;
diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index 15ba5195d9..5301955964 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -53,13 +53,22 @@ LLFastTimer::DeclareTimer FTM_GET_CHANNEL_RECT("Calculate Notification Channel R
LLRect LLScreenChannelBase::getChannelRect()
{
LLFastTimer _(FTM_GET_CHANNEL_RECT);
+
+ if (mFloaterSnapRegion == NULL)
+ {
+ mFloaterSnapRegion = gViewerWindow->getRootView()->getChildView("floater_snap_region");
+ }
+
+ if (mChicletRegion == NULL)
+ {
+ mChicletRegion = gViewerWindow->getRootView()->getChildView("chiclet_container");
+ }
+
LLRect channel_rect;
LLRect chiclet_rect;
- LLView* floater_snap_region = gViewerWindow->getRootView()->getChildView("floater_snap_region");
- floater_snap_region->localRectToScreen(floater_snap_region->getLocalRect(), &channel_rect);
- LLView* chiclet_region = gViewerWindow->getRootView()->getChildView("chiclet_container");
- chiclet_region->localRectToScreen(chiclet_region->getLocalRect(), &chiclet_rect);
+ mFloaterSnapRegion->localRectToScreen(mFloaterSnapRegion->getLocalRect(), &channel_rect);
+ mChicletRegion->localRectToScreen(mChicletRegion->getLocalRect(), &chiclet_rect);
channel_rect.mTop = chiclet_rect.mBottom;
return channel_rect;
@@ -81,14 +90,31 @@ LLScreenChannelBase::LLScreenChannelBase(const Params& p)
mShowToasts(true),
mID(p.id),
mDisplayToastsAlways(p.display_toasts_always),
- mChannelAlignment(p.channel_align)
-{
+ mChannelAlignment(p.channel_align),
+ mFloaterSnapRegion(NULL),
+ mChicletRegion(NULL)
+{
mID = p.id;
setMouseOpaque( false );
setVisible(FALSE);
}
+BOOL LLScreenChannelBase::postBuild()
+{
+ if (mFloaterSnapRegion == NULL)
+ {
+ mFloaterSnapRegion = gViewerWindow->getRootView()->getChildView("floater_snap_region");
+ }
+
+ if (mChicletRegion == NULL)
+ {
+ mChicletRegion = gViewerWindow->getRootView()->getChildView("chiclet_container");
+ }
+
+ return TRUE;
+}
+
void LLScreenChannelBase::reshape(S32 width, S32 height, BOOL called_from_parent)
{
redrawToasts();
@@ -473,12 +499,10 @@ void LLScreenChannel::modifyToastByNotificationID(LLUUID id, LLPanel* panel)
//--------------------------------------------------------------------------
void LLScreenChannel::redrawToasts()
{
- LLView* floater_snap_region = gViewerWindow->getRootView()->getChildView("floater_snap_region");
-
if (!getParent())
{
// connect to floater snap region just to get resize events, we don't care about being a proper widget
- floater_snap_region->addChild(this);
+ mFloaterSnapRegion->addChild(this);
setFollows(FOLLOWS_ALL);
}
diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h
index 2f23552828..c9f8855fe6 100644
--- a/indra/newview/llscreenchannel.h
+++ b/indra/newview/llscreenchannel.h
@@ -69,6 +69,8 @@ public:
};
LLScreenChannelBase(const Params&);
+
+ BOOL postBuild();
void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
@@ -123,7 +125,7 @@ protected:
// Channel's flags
bool mControlHovering;
- LLToast* mHoveredToast;
+ LLToast* mHoveredToast;
bool mCanStoreToasts;
bool mDisplayToastsAlways;
// controls whether a channel shows toasts or not
@@ -137,6 +139,9 @@ protected:
// channel's ID
LLUUID mID;
+
+ LLView* mFloaterSnapRegion;
+ LLView* mChicletRegion;
};
diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp
index 85a7e75271..6f98be1cb8 100644
--- a/indra/newview/llscriptfloater.cpp
+++ b/indra/newview/llscriptfloater.cpp
@@ -408,9 +408,16 @@ void LLScriptFloaterManager::onRemoveNotification(const LLUUID& notification_id)
}
// remove related chiclet
- LLChicletBar::getInstance()->getChicletPanel()->removeChiclet(notification_id);
+ if (LLChicletBar::instanceExists())
+ {
+ LLChicletBar::getInstance()->getChicletPanel()->removeChiclet(notification_id);
+ }
- LLIMWellWindow::getInstance()->removeObjectRow(notification_id);
+ LLIMWellWindow* im_well_window = LLIMWellWindow::findInstance();
+ if (im_well_window)
+ {
+ im_well_window->removeObjectRow(notification_id);
+ }
mNotifications.erase(notification_id);
diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp
index 8774482acd..24cb559fd0 100644
--- a/indra/newview/llsidepaneltaskinfo.cpp
+++ b/indra/newview/llsidepaneltaskinfo.cpp
@@ -117,6 +117,42 @@ BOOL LLSidepanelTaskInfo::postBuild()
childSetCommitCallback("checkbox next owner can transfer", &LLSidepanelTaskInfo::onCommitNextOwnerTransfer,this);
childSetCommitCallback("clickaction", &LLSidepanelTaskInfo::onCommitClickAction,this);
childSetCommitCallback("search_check", &LLSidepanelTaskInfo::onCommitIncludeInSearch,this);
+
+ mDAPermModify = getChild<LLUICtrl>("perm_modify");
+ mDACreator = getChildView("Creator:");
+ mDACreatorName = getChild<LLUICtrl>("Creator Name");
+ mDAOwner = getChildView("Owner:");
+ mDAOwnerName = getChild<LLUICtrl>("Owner Name");
+ mDAGroup = getChildView("Group:");
+ mDAGroupName = getChild<LLUICtrl>("Group Name");
+ mDAButtonSetGroup = getChildView("button set group");
+ mDAObjectName = getChild<LLUICtrl>("Object Name");
+ mDAName = getChildView("Name:");
+ mDADescription = getChildView("Description:");
+ mDAObjectDescription = getChild<LLUICtrl>("Object Description");
+ mDAPermissions = getChildView("Permissions:");
+ mDACheckboxShareWithGroup = getChild<LLUICtrl>("checkbox share with group");
+ mDAButtonDeed = getChildView("button deed");
+ mDACheckboxAllowEveryoneMove = getChild<LLUICtrl>("checkbox allow everyone move");
+ mDACheckboxAllowEveryoneCopy = getChild<LLUICtrl>("checkbox allow everyone copy");
+ mDANextOwnerCan = getChildView("Next owner can:");
+ mDACheckboxNextOwnerCanModify = getChild<LLUICtrl>("checkbox next owner can modify");
+ mDACheckboxNextOwnerCanCopy = getChild<LLUICtrl>("checkbox next owner can copy");
+ mDACheckboxNextOwnerCanTransfer = getChild<LLUICtrl>("checkbox next owner can transfer");
+ mDACheckboxForSale = getChild<LLUICtrl>("checkbox for sale");
+ mDASearchCheck = getChild<LLUICtrl>("search_check");
+ mDAComboSaleType = getChild<LLComboBox>("sale type");
+ mDACost = getChild<LLUICtrl>("Cost");
+ mDAEditCost = getChild<LLUICtrl>("Edit Cost");
+ mDALabelClickAction = getChildView("label click action");
+ mDAComboClickAction = getChild<LLComboBox>("clickaction");
+ mDAB = getChildView("B:");
+ mDAO = getChildView("O:");
+ mDAG = getChildView("G:");
+ mDAE = getChildView("E:");
+ mDAN = getChildView("N:");
+ mDAF = getChildView("F:");
+
return TRUE;
}
@@ -138,81 +174,80 @@ BOOL LLSidepanelTaskInfo::postBuild()
void LLSidepanelTaskInfo::disableAll()
{
- getChildView("perm_modify")->setEnabled(FALSE);
- getChild<LLUICtrl>("perm_modify")->setValue(LLStringUtil::null);
-
- getChildView("Creator:")->setEnabled(FALSE);
- getChild<LLUICtrl>("Creator Name")->setValue(LLStringUtil::null);
- getChildView("Creator Name")->setEnabled(FALSE);
-
- getChildView("Owner:")->setEnabled(FALSE);
- getChild<LLUICtrl>("Owner Name")->setValue(LLStringUtil::null);
- getChildView("Owner Name")->setEnabled(FALSE);
-
- getChildView("Group:")->setEnabled(FALSE);
- getChild<LLUICtrl>("Group Name")->setValue(LLStringUtil::null);
- getChildView("Group Name")->setEnabled(FALSE);
- getChildView("button set group")->setEnabled(FALSE);
-
- getChild<LLUICtrl>("Object Name")->setValue(LLStringUtil::null);
- getChildView("Object Name")->setEnabled(FALSE);
- getChildView("Name:")->setEnabled(FALSE);
- getChild<LLUICtrl>("Group Name")->setValue(LLStringUtil::null);
- getChildView("Group Name")->setEnabled(FALSE);
- getChildView("Description:")->setEnabled(FALSE);
- getChild<LLUICtrl>("Object Description")->setValue(LLStringUtil::null);
- getChildView("Object Description")->setEnabled(FALSE);
-
- getChildView("Permissions:")->setEnabled(FALSE);
+ mDAPermModify->setEnabled(FALSE);
+ mDAPermModify->setValue(LLStringUtil::null);
+
+ mDACreator->setEnabled(FALSE);
+ mDACreatorName->setValue(LLStringUtil::null);
+ mDACreatorName->setEnabled(FALSE);
+
+ mDAOwner->setEnabled(FALSE);
+ mDAOwnerName->setValue(LLStringUtil::null);
+ mDAOwnerName->setEnabled(FALSE);
+
+ mDAGroup->setEnabled(FALSE);
+ mDAGroupName->setValue(LLStringUtil::null);
+ mDAGroupName->setEnabled(FALSE);
+ mDAButtonSetGroup->setEnabled(FALSE);
+
+ mDAObjectName->setValue(LLStringUtil::null);
+ mDAObjectName->setEnabled(FALSE);
+ mDAName->setEnabled(FALSE);
+ mDAGroupName->setValue(LLStringUtil::null);
+ mDAGroupName->setEnabled(FALSE);
+ mDADescription->setEnabled(FALSE);
+ mDAObjectDescription->setValue(LLStringUtil::null);
+ mDAObjectDescription->setEnabled(FALSE);
+
+ mDAPermissions->setEnabled(FALSE);
- getChild<LLUICtrl>("checkbox share with group")->setValue(FALSE);
- getChildView("checkbox share with group")->setEnabled(FALSE);
- getChildView("button deed")->setEnabled(FALSE);
+ mDACheckboxShareWithGroup->setValue(FALSE);
+ mDACheckboxShareWithGroup->setEnabled(FALSE);
+ mDAButtonDeed->setEnabled(FALSE);
- getChild<LLUICtrl>("checkbox allow everyone move")->setValue(FALSE);
- getChildView("checkbox allow everyone move")->setEnabled(FALSE);
- getChild<LLUICtrl>("checkbox allow everyone copy")->setValue(FALSE);
- getChildView("checkbox allow everyone copy")->setEnabled(FALSE);
+ mDACheckboxAllowEveryoneMove->setValue(FALSE);
+ mDACheckboxAllowEveryoneMove->setEnabled(FALSE);
+ mDACheckboxAllowEveryoneCopy->setValue(FALSE);
+ mDACheckboxAllowEveryoneCopy->setEnabled(FALSE);
//Next owner can:
- getChildView("Next owner can:")->setEnabled(FALSE);
- getChild<LLUICtrl>("checkbox next owner can modify")->setValue(FALSE);
- getChildView("checkbox next owner can modify")->setEnabled(FALSE);
- getChild<LLUICtrl>("checkbox next owner can copy")->setValue(FALSE);
- getChildView("checkbox next owner can copy")->setEnabled(FALSE);
- getChild<LLUICtrl>("checkbox next owner can transfer")->setValue(FALSE);
- getChildView("checkbox next owner can transfer")->setEnabled(FALSE);
+ mDANextOwnerCan->setEnabled(FALSE);
+ mDACheckboxNextOwnerCanModify->setValue(FALSE);
+ mDACheckboxNextOwnerCanModify->setEnabled(FALSE);
+ mDACheckboxNextOwnerCanCopy->setValue(FALSE);
+ mDACheckboxNextOwnerCanCopy->setEnabled(FALSE);
+ mDACheckboxNextOwnerCanTransfer->setValue(FALSE);
+ mDACheckboxNextOwnerCanTransfer->setEnabled(FALSE);
//checkbox for sale
- getChild<LLUICtrl>("checkbox for sale")->setValue(FALSE);
- getChildView("checkbox for sale")->setEnabled(FALSE);
+ mDACheckboxForSale->setValue(FALSE);
+ mDACheckboxForSale->setEnabled(FALSE);
//checkbox include in search
- getChild<LLUICtrl>("search_check")->setValue(FALSE);
- getChildView("search_check")->setEnabled(FALSE);
+ mDASearchCheck->setValue(FALSE);
+ mDASearchCheck->setEnabled(FALSE);
- LLComboBox* combo_sale_type = getChild<LLComboBox>("sale type");
- combo_sale_type->setValue(LLSaleInfo::FS_COPY);
- combo_sale_type->setEnabled(FALSE);
+ mDAComboSaleType->setValue(LLSaleInfo::FS_COPY);
+ mDAComboSaleType->setEnabled(FALSE);
- getChildView("Cost")->setEnabled(FALSE);
- getChild<LLUICtrl>("Cost")->setValue(getString("Cost Default"));
- getChild<LLUICtrl>("Edit Cost")->setValue(LLStringUtil::null);
- getChildView("Edit Cost")->setEnabled(FALSE);
+ mDACost->setEnabled(FALSE);
+ mDACost->setValue(getString("Cost Default"));
+ mDAEditCost->setValue(LLStringUtil::null);
+ mDAEditCost->setEnabled(FALSE);
- getChildView("label click action")->setEnabled(FALSE);
- LLComboBox* combo_click_action = getChild<LLComboBox>("clickaction");
- if (combo_click_action)
+ mDALabelClickAction->setEnabled(FALSE);
+ if (mDAComboClickAction)
{
- combo_click_action->setEnabled(FALSE);
- combo_click_action->clear();
+ mDAComboClickAction->setEnabled(FALSE);
+ mDAComboClickAction->clear();
}
- getChildView("B:")->setVisible( FALSE);
- getChildView("O:")->setVisible( FALSE);
- getChildView("G:")->setVisible( FALSE);
- getChildView("E:")->setVisible( FALSE);
- getChildView("N:")->setVisible( FALSE);
- getChildView("F:")->setVisible( FALSE);
+
+ mDAB->setVisible(FALSE);
+ mDAO->setVisible(FALSE);
+ mDAG->setVisible(FALSE);
+ mDAE->setVisible(FALSE);
+ mDAN->setVisible(FALSE);
+ mDAF->setVisible(FALSE);
mOpenBtn->setEnabled(FALSE);
mPayBtn->setEnabled(FALSE);
diff --git a/indra/newview/llsidepaneltaskinfo.h b/indra/newview/llsidepaneltaskinfo.h
index 384bc479d6..be0fee2127 100644
--- a/indra/newview/llsidepaneltaskinfo.h
+++ b/indra/newview/llsidepaneltaskinfo.h
@@ -37,8 +37,9 @@
// Panel for permissions of an object.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-class LLNameBox;
class LLCheckBoxCtrl;
+class LLComboBox;
+class LLNameBox;
class LLViewerObject;
class LLSidepanelTaskInfo : public LLSidepanelInventorySubpanel
@@ -118,6 +119,43 @@ private:
LLPointer<LLViewerObject> mObject;
LLObjectSelectionHandle mObjectSelection;
static LLSidepanelTaskInfo* sActivePanel;
+
+private:
+ // Pointers cached here to speed up the "disableAll" function which gets called on idle
+ LLUICtrl* mDAPermModify;
+ LLView* mDACreator;
+ LLUICtrl* mDACreatorName;
+ LLView* mDAOwner;
+ LLUICtrl* mDAOwnerName;
+ LLView* mDAGroup;
+ LLUICtrl* mDAGroupName;
+ LLView* mDAButtonSetGroup;
+ LLUICtrl* mDAObjectName;
+ LLView* mDAName;
+ LLView* mDADescription;
+ LLUICtrl* mDAObjectDescription;
+ LLView* mDAPermissions;
+ LLUICtrl* mDACheckboxShareWithGroup;
+ LLView* mDAButtonDeed;
+ LLUICtrl* mDACheckboxAllowEveryoneMove;
+ LLUICtrl* mDACheckboxAllowEveryoneCopy;
+ LLView* mDANextOwnerCan;
+ LLUICtrl* mDACheckboxNextOwnerCanModify;
+ LLUICtrl* mDACheckboxNextOwnerCanCopy;
+ LLUICtrl* mDACheckboxNextOwnerCanTransfer;
+ LLUICtrl* mDACheckboxForSale;
+ LLUICtrl* mDASearchCheck;
+ LLComboBox* mDAComboSaleType;
+ LLUICtrl* mDACost;
+ LLUICtrl* mDAEditCost;
+ LLView* mDALabelClickAction;
+ LLComboBox* mDAComboClickAction;
+ LLView* mDAB;
+ LLView* mDAO;
+ LLView* mDAG;
+ LLView* mDAE;
+ LLView* mDAN;
+ LLView* mDAF;
};
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index 75db269bde..89240c982f 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -114,6 +114,7 @@ LLStatusBar::LLStatusBar(const LLRect& rect)
mTextTime(NULL),
mSGBandwidth(NULL),
mSGPacketLoss(NULL),
+ mBtnStats(NULL),
mBtnVolume(NULL),
mBoxBalance(NULL),
mBalance(0),
@@ -173,6 +174,8 @@ BOOL LLStatusBar::postBuild()
mBoxBalance = getChild<LLTextBox>("balance");
mBoxBalance->setClickedCallback( &LLStatusBar::onClickBalance, this );
+
+ mBtnStats = getChildView("stat_btn");
mBtnVolume = getChild<LLButton>( "volume_btn" );
mBtnVolume->setClickedCallback( onClickVolume, this );
@@ -288,7 +291,7 @@ void LLStatusBar::refresh()
mSGBandwidth->setVisible(net_stats_visible);
mSGPacketLoss->setVisible(net_stats_visible);
- getChildView("stat_btn")->setEnabled(net_stats_visible);
+ mBtnStats->setEnabled(net_stats_visible);
// update the master volume button state
bool mute_audio = LLAppViewer::instance()->getMasterSystemAudioMute();
diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h
index 4ea3183d18..9d28e6c2bc 100644
--- a/indra/newview/llstatusbar.h
+++ b/indra/newview/llstatusbar.h
@@ -102,10 +102,11 @@ private:
LLStatGraph *mSGBandwidth;
LLStatGraph *mSGPacketLoss;
+ LLView *mBtnStats;
LLButton *mBtnVolume;
LLTextBox *mBoxBalance;
LLButton *mMediaToggle;
- LLView* mScriptOut;
+ LLView *mScriptOut;
LLFrameTimer mClockUpdateTimer;
S32 mBalance;
diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp
index 3aa6a3b7e5..0cb6c85012 100644
--- a/indra/newview/llsyswellwindow.cpp
+++ b/indra/newview/llsyswellwindow.cpp
@@ -159,6 +159,7 @@ void LLSysWellWindow::setVisible(BOOL visible)
LLTransientDockableFloater::setVisible(visible);
// update notification channel state
+ initChannel(); // make sure the channel still exists
if(mChannel)
{
mChannel->updateShowToastsState();
@@ -598,6 +599,13 @@ LLIMWellWindow* LLIMWellWindow::getInstance(const LLSD& key /*= LLSD()*/)
return LLFloaterReg::getTypedInstance<LLIMWellWindow>("im_well_window", key);
}
+
+// static
+LLIMWellWindow* LLIMWellWindow::findInstance(const LLSD& key /*= LLSD()*/)
+{
+ return LLFloaterReg::findTypedInstance<LLIMWellWindow>("im_well_window", key);
+}
+
BOOL LLIMWellWindow::postBuild()
{
BOOL rv = LLSysWellWindow::postBuild();
@@ -751,7 +759,10 @@ void LLIMWellWindow::removeObjectRow(const LLUUID& notification_id)
{
if (mMessageList->removeItemByValue(notification_id))
{
- mSysWellChiclet->updateWidget(isWindowEmpty());
+ if (mSysWellChiclet)
+ {
+ mSysWellChiclet->updateWidget(isWindowEmpty());
+ }
}
else
{
diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h
index 52e5370505..272e9cfcb1 100644
--- a/indra/newview/llsyswellwindow.h
+++ b/indra/newview/llsyswellwindow.h
@@ -153,6 +153,7 @@ public:
~LLIMWellWindow();
static LLIMWellWindow* getInstance(const LLSD& key = LLSD());
+ static LLIMWellWindow* findInstance(const LLSD& key = LLSD());
static void initClass() { getInstance(); }
/*virtual*/ BOOL postBuild();
diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp
index e0b07ed408..da691a2d0c 100644
--- a/indra/newview/lltoast.cpp
+++ b/indra/newview/lltoast.cpp
@@ -113,7 +113,8 @@ LLToast::LLToast(const LLToast::Params& p)
mHideBtnPressed(false),
mIsTip(p.is_tip),
mWrapperPanel(NULL),
- mIsFading(false)
+ mIsFading(false),
+ mIsHovered(false)
{
mTimer.reset(new LLToastLifeTimer(this, p.lifetime_secs));
@@ -122,8 +123,6 @@ LLToast::LLToast(const LLToast::Params& p)
setCanDrag(FALSE);
mWrapperPanel = getChild<LLPanel>("wrapper_panel");
- mWrapperPanel->setMouseEnterCallback(boost::bind(&LLToast::onToastMouseEnter, this));
- mWrapperPanel->setMouseLeaveCallback(boost::bind(&LLToast::onToastMouseLeave, this));
setBackgroundOpaque(TRUE); // *TODO: obsolete
updateTransparency();
@@ -137,13 +136,13 @@ LLToast::LLToast(const LLToast::Params& p)
{
mHideBtn = getChild<LLButton>("hide_btn");
mHideBtn->setClickedCallback(boost::bind(&LLToast::hide,this));
- mHideBtn->setMouseEnterCallback(boost::bind(&LLToast::onToastMouseEnter, this));
- mHideBtn->setMouseLeaveCallback(boost::bind(&LLToast::onToastMouseLeave, this));
}
// init callbacks if present
if(!p.on_delete_toast().empty())
+ {
mOnDeleteToastSignal.connect(p.on_delete_toast());
+ }
}
void LLToast::reshape(S32 width, S32 height, BOOL called_from_parent)
@@ -239,7 +238,9 @@ void LLToast::setCanFade(bool can_fade)
{
mCanFade = can_fade;
if(!mCanFade)
+ {
mTimer->stop();
+ }
}
//--------------------------------------------------------------------------
@@ -378,8 +379,11 @@ void LLToast::setVisible(BOOL show)
}
}
-void LLToast::onToastMouseEnter()
+void LLToast::updateHoveredState()
{
+ S32 x, y;
+ LLUI::getMousePositionScreen(&x, &y);
+
LLRect panel_rc = mWrapperPanel->calcScreenRect();
LLRect button_rc;
if(mHideBtn)
@@ -387,56 +391,83 @@ void LLToast::onToastMouseEnter()
button_rc = mHideBtn->calcScreenRect();
}
- S32 x, y;
- LLUI::getMousePositionScreen(&x, &y);
-
- if(panel_rc.pointInRect(x, y) || button_rc.pointInRect(x, y))
+ if (!panel_rc.pointInRect(x, y) && !button_rc.pointInRect(x, y))
{
- mOnToastHoverSignal(this, MOUSE_ENTER);
-
- updateTransparency();
+ // mouse is not over this toast
+ mIsHovered = false;
+ }
+ else
+ {
+ bool is_overlapped_by_other_floater = false;
- //toasts fading is management by Screen Channel
+ const child_list_t* child_list = gFloaterView->getChildList();
- sendChildToFront(mHideBtn);
- if(mHideBtn && mHideBtn->getEnabled())
+ // find this toast in gFloaterView child list to check whether any floater
+ // with higher Z-order is visible under the mouse pointer overlapping this toast
+ child_list_const_reverse_iter_t r_iter = std::find(child_list->rbegin(), child_list->rend(), this);
+ if (r_iter != child_list->rend())
{
- mHideBtn->setVisible(TRUE);
+ // skip this toast and proceed to views above in Z-order
+ for (++r_iter; r_iter != child_list->rend(); ++r_iter)
+ {
+ LLView* view = *r_iter;
+ is_overlapped_by_other_floater = view->isInVisibleChain() && view->calcScreenRect().pointInRect(x, y);
+ if (is_overlapped_by_other_floater)
+ {
+ break;
+ }
+ }
}
- mToastMouseEnterSignal(this, getValue());
- }
-}
-void LLToast::onToastMouseLeave()
-{
- LLRect panel_rc = mWrapperPanel->calcScreenRect();
- LLRect button_rc;
- if(mHideBtn)
- {
- button_rc = mHideBtn->calcScreenRect();
+ mIsHovered = !is_overlapped_by_other_floater;
}
- S32 x, y;
- LLUI::getMousePositionScreen(&x, &y);
-
- if( !panel_rc.pointInRect(x, y) && !button_rc.pointInRect(x, y))
- {
- mOnToastHoverSignal(this, MOUSE_LEAVE);
-
- updateTransparency();
-
- //toasts fading is management by Screen Channel
-
- if(mHideBtn && mHideBtn->getEnabled())
+ LLToastLifeTimer* timer = getTimer();
+
+ if (timer)
+ {
+ // Started timer means the mouse had left the toast previously.
+ // If toast is hovered in the current frame we should handle
+ // a mouse enter event.
+ if(timer->getStarted() && mIsHovered)
+ {
+ mOnToastHoverSignal(this, MOUSE_ENTER);
+
+ updateTransparency();
+
+ //toasts fading is management by Screen Channel
+
+ sendChildToFront(mHideBtn);
+ if(mHideBtn && mHideBtn->getEnabled())
+ {
+ mHideBtn->setVisible(TRUE);
+ }
+
+ mToastMouseEnterSignal(this, getValue());
+ }
+ // Stopped timer means the mouse had entered the toast previously.
+ // If the toast is not hovered in the current frame we should handle
+ // a mouse leave event.
+ else if(!timer->getStarted() && !mIsHovered)
{
- if( mHideBtnPressed )
+ mOnToastHoverSignal(this, MOUSE_LEAVE);
+
+ updateTransparency();
+
+ //toasts fading is management by Screen Channel
+
+ if(mHideBtn && mHideBtn->getEnabled())
{
- mHideBtnPressed = false;
- return;
+ if( mHideBtnPressed )
+ {
+ mHideBtnPressed = false;
+ return;
+ }
+ mHideBtn->setVisible(FALSE);
}
- mHideBtn->setVisible(FALSE);
+
+ mToastMouseLeaveSignal(this, getValue());
}
- mToastMouseLeaveSignal(this, getValue());
}
}
@@ -495,13 +526,6 @@ void LLNotificationsUI::LLToast::startTimer()
}
}
-bool LLToast::isHovered()
-{
- S32 x, y;
- LLUI::getMousePositionScreen(&x, &y);
- return mWrapperPanel->calcScreenRect().pointInRect(x, y);
-}
-
//--------------------------------------------------------------------------
BOOL LLToast::handleMouseDown(S32 x, S32 y, MASK mask)
@@ -536,3 +560,14 @@ S32 LLToast::notifyParent(const LLSD& info)
return LLModalDialog::notifyParent(info);
}
+
+//static
+void LLToast::updateClass()
+{
+ for (LLInstanceTracker<LLToast>::instance_iter iter = LLInstanceTracker<LLToast>::beginInstances(); iter != LLInstanceTracker<LLToast>::endInstances(); )
+ {
+ LLToast& toast = *iter++;
+
+ toast.updateHoveredState();
+ }
+}
diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h
index 242f786bf2..0b06728935 100644
--- a/indra/newview/lltoast.h
+++ b/indra/newview/lltoast.h
@@ -27,7 +27,7 @@
#ifndef LL_LLTOAST_H
#define LL_LLTOAST_H
-
+#include "llinstancetracker.h"
#include "llpanel.h"
#include "llmodaldialog.h"
#include "lleventtimer.h"
@@ -69,7 +69,7 @@ private :
* Represents toast pop-up.
* This is a parent view for all toast panels.
*/
-class LLToast : public LLModalDialog
+class LLToast : public LLModalDialog, public LLInstanceTracker<LLToast>
{
friend class LLToastLifeTimer;
public:
@@ -102,6 +102,8 @@ public:
Params();
};
+
+ static void updateClass();
LLToast(const LLToast::Params& p);
virtual ~LLToast();
@@ -120,7 +122,7 @@ public:
/** Start lifetime/fading timer */
virtual void startTimer();
- bool isHovered();
+ bool isHovered() { return mIsHovered; }
// Operating with toasts
// insert a panel to a toast
@@ -196,16 +198,13 @@ public:
virtual S32 notifyParent(const LLSD& info);
- LLHandle<LLToast> getHandle() { mHandle.bind(this); return mHandle; }
+ LLHandle<LLToast> getHandle() const { return getDerivedHandle<LLToast>(); }
protected:
void updateTransparency();
private:
-
- void onToastMouseEnter();
-
- void onToastMouseLeave();
+ void updateHoveredState();
void expire();
@@ -215,7 +214,7 @@ private:
LLUUID mSessionID;
LLNotificationPtr mNotification;
- LLRootHandle<LLToast> mHandle;
+ //LLRootHandle<LLToast> mHandle;
LLPanel* mWrapperPanel;
@@ -224,7 +223,7 @@ private:
F32 mToastLifetime; // in seconds
F32 mToastFadingTime; // in seconds
-
+
LLPanel* mPanel;
LLButton* mHideBtn;
@@ -236,6 +235,7 @@ private:
bool mIsHidden; // this flag is TRUE when a toast has faded or was hidden with (x) button (EXT-1849)
bool mIsTip;
bool mIsFading;
+ bool mIsHovered;
commit_signal_t mToastMouseEnterSignal;
commit_signal_t mToastMouseLeaveSignal;
diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp
index 5ff0ccfeb2..eccb2cf2f1 100644
--- a/indra/newview/lltoolbarview.cpp
+++ b/indra/newview/lltoolbarview.cpp
@@ -73,6 +73,7 @@ LLToolBarView::ToolbarSet::ToolbarSet()
LLToolBarView::LLToolBarView(const LLToolBarView::Params& p)
: LLUICtrl(p),
mDragStarted(false),
+ mShowToolbars(true),
mDragToolbarButton(NULL),
mToolbarsLoaded(false)
{
@@ -530,6 +531,13 @@ void LLToolBarView::draw()
}
}
+ for (S32 i = TOOLBAR_FIRST; i <= TOOLBAR_LAST; i++)
+ {
+ mToolbars[i]->getParent()->setVisible(mShowToolbars
+ && (mToolbars[i]->hasButtons()
+ || isToolDragged()));
+ }
+
// Draw drop zones if drop of a tool is active
if (isToolDragged())
{
@@ -656,10 +664,7 @@ void LLToolBarView::resetDragTool(LLToolBarButton* toolbarButton)
void LLToolBarView::setToolBarsVisible(bool visible)
{
- for (S32 i = TOOLBAR_FIRST; i <= TOOLBAR_LAST; i++)
- {
- mToolbars[i]->getParent()->setVisible(visible);
- }
+ mShowToolbars = visible;
}
bool LLToolBarView::isModified() const
diff --git a/indra/newview/lltoolbarview.h b/indra/newview/lltoolbarview.h
index b99e8bc28d..be66bcae36 100644
--- a/indra/newview/lltoolbarview.h
+++ b/indra/newview/lltoolbarview.h
@@ -129,6 +129,7 @@ private:
bool mDragStarted;
LLToolBarButton* mDragToolbarButton;
+ bool mShowToolbars;
};
extern LLToolBarView* gToolBarView;
diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp
index f6d7ceeec3..4240a38326 100644
--- a/indra/newview/llurldispatcher.cpp
+++ b/indra/newview/llurldispatcher.cpp
@@ -167,9 +167,9 @@ bool LLURLDispatcherImpl::dispatchApp(const LLSLURL& slurl,
// static
bool LLURLDispatcherImpl::dispatchRegion(const LLSLURL& slurl, const std::string& nav_type, bool right_mouse)
{
- if(slurl.getType() != LLSLURL::LOCATION)
+ if(slurl.getType() != LLSLURL::LOCATION)
{
- return false;
+ return false;
}
// Before we're logged in, need to update the startup screen
// to tell the user where they are going.
diff --git a/indra/newview/llvieweraudio.cpp b/indra/newview/llvieweraudio.cpp
index f7fa5690d6..2447f5dea8 100644
--- a/indra/newview/llvieweraudio.cpp
+++ b/indra/newview/llvieweraudio.cpp
@@ -37,9 +37,226 @@
#include "llvoiceclient.h"
#include "llviewermedia.h"
#include "llprogressview.h"
+#include "llcallbacklist.h"
+#include "llstartup.h"
+#include "llviewerparcelmgr.h"
+#include "llparcel.h"
/////////////////////////////////////////////////////////
+LLViewerAudio::LLViewerAudio() :
+ mDone(true),
+ mFadeState(FADE_IDLE),
+ mFadeTime(),
+ mIdleListnerActive(false),
+ mForcedTeleportFade(false)
+{
+ mTeleportFailedConnection = LLViewerParcelMgr::getInstance()->
+ setTeleportFailedCallback(boost::bind(&LLViewerAudio::onTeleportFailed, this));
+}
+
+LLViewerAudio::~LLViewerAudio()
+{
+ mTeleportFailedConnection.disconnect();
+}
+
+void LLViewerAudio::registerIdleListener()
+{
+ if(mIdleListnerActive==false)
+ {
+ mIdleListnerActive = true;
+ doOnIdleRepeating(boost::bind(boost::bind(&LLViewerAudio::onIdleUpdate, this)));
+ }
+
+}
+
+void LLViewerAudio::startInternetStreamWithAutoFade(std::string streamURI)
+{
+ // Old and new stream are identical
+ if (mNextStreamURI == streamURI)
+ {
+ return;
+ }
+
+ // Record the URI we are going to be switching to
+ mNextStreamURI = streamURI;
+
+ switch (mFadeState)
+ {
+ case FADE_IDLE:
+ // If a stream is playing fade it out first
+ if (!gAudiop->getInternetStreamURL().empty())
+ {
+ // The order of these tests is important, state FADE_OUT will be processed below
+ mFadeState = FADE_OUT;
+ }
+ // Otherwise the new stream can be faded in
+ else
+ {
+ mFadeState = FADE_IN;
+ gAudiop->startInternetStream(mNextStreamURI);
+ startFading();
+ registerIdleListener();
+ break;
+ }
+
+ case FADE_OUT:
+ startFading();
+ registerIdleListener();
+ break;
+
+ case FADE_IN:
+ registerIdleListener();
+ break;
+
+ default:
+ llwarns << "Unknown fading state: " << mFadeState << llendl;
+ break;
+ }
+}
+
+// A return of false from onIdleUpdate means it will be called again next idle update.
+// A return of true means we have finished with it and the callback will be deleted.
+bool LLViewerAudio::onIdleUpdate()
+{
+ bool fadeIsFinished = false;
+
+ // There is a delay in the login sequence between when the parcel information has
+ // arrived and the music stream is started and when the audio system is called to set
+ // initial volume levels. This code extends the fade time so you hear a full fade in.
+ if ((LLStartUp::getStartupState() < STATE_STARTED))
+ {
+ stream_fade_timer.reset();
+ stream_fade_timer.setTimerExpirySec(mFadeTime);
+ }
+
+ if (mDone)
+ {
+ // This should be a rare or never occurring state.
+ if (mFadeState == FADE_IDLE)
+ {
+ deregisterIdleListener();
+ fadeIsFinished = true; // Stop calling onIdleUpdate
+ }
+
+ // we have finished the current fade operation
+ if (mFadeState == FADE_OUT)
+ {
+ // Clear URI
+ gAudiop->startInternetStream(LLStringUtil::null);
+ gAudiop->stopInternetStream();
+
+ if (!mNextStreamURI.empty())
+ {
+ mFadeState = FADE_IN;
+ gAudiop->startInternetStream(mNextStreamURI);
+ startFading();
+ }
+ else
+ {
+ mFadeState = FADE_IDLE;
+ deregisterIdleListener();
+ fadeIsFinished = true; // Stop calling onIdleUpdate
+ }
+ }
+ else if (mFadeState == FADE_IN)
+ {
+ if (mNextStreamURI != gAudiop->getInternetStreamURL())
+ {
+ mFadeState = FADE_OUT;
+ startFading();
+ }
+ else
+ {
+ mFadeState = FADE_IDLE;
+ deregisterIdleListener();
+ fadeIsFinished = true; // Stop calling onIdleUpdate
+ }
+ }
+ }
+
+ return fadeIsFinished;
+}
+
+void LLViewerAudio::stopInternetStreamWithAutoFade()
+{
+ mFadeState = FADE_IDLE;
+ mNextStreamURI = LLStringUtil::null;
+ mDone = true;
+
+ gAudiop->startInternetStream(LLStringUtil::null);
+ gAudiop->stopInternetStream();
+}
+
+void LLViewerAudio::startFading()
+{
+ const F32 AUDIO_MUSIC_FADE_IN_TIME = 3.0f;
+ const F32 AUDIO_MUSIC_FADE_OUT_TIME = 2.0f;
+ // This minimum fade time prevents divide by zero and negative times
+ const F32 AUDIO_MUSIC_MINIMUM_FADE_TIME = 0.01f;
+
+ if(mDone)
+ {
+ // The fade state here should only be one of FADE_IN or FADE_OUT, but, in case it is not,
+ // rather than check for both states assume a fade in and check for the fade out case.
+ mFadeTime = AUDIO_MUSIC_FADE_IN_TIME;
+ if (LLViewerAudio::getInstance()->getFadeState() == LLViewerAudio::FADE_OUT)
+ {
+ mFadeTime = AUDIO_MUSIC_FADE_OUT_TIME;
+ }
+
+ // Prevent invalid fade time
+ mFadeTime = llmax(mFadeTime, AUDIO_MUSIC_MINIMUM_FADE_TIME);
+
+ stream_fade_timer.reset();
+ stream_fade_timer.setTimerExpirySec(mFadeTime);
+ mDone = false;
+ }
+}
+
+F32 LLViewerAudio::getFadeVolume()
+{
+ F32 fade_volume = 1.0f;
+
+ if (stream_fade_timer.hasExpired())
+ {
+ mDone = true;
+ // If we have been fading out set volume to 0 until the next fade state occurs to prevent
+ // an audio transient.
+ if (LLViewerAudio::getInstance()->getFadeState() == LLViewerAudio::FADE_OUT)
+ {
+ fade_volume = 0.0f;
+ }
+ }
+
+ if (!mDone)
+ {
+ // Calculate how far we are into the fade time
+ fade_volume = stream_fade_timer.getElapsedTimeF32() / mFadeTime;
+
+ if (LLViewerAudio::getInstance()->getFadeState() == LLViewerAudio::FADE_OUT)
+ {
+ // If we are not fading in then we are fading out, so invert the fade
+ // direction; start loud and move towards zero volume.
+ fade_volume = 1.0f - fade_volume;
+ }
+ }
+
+ return fade_volume;
+}
+
+void LLViewerAudio::onTeleportFailed()
+{
+ if (gAudiop)
+ {
+ LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
+ if (parcel)
+ {
+ mNextStreamURI = parcel->getMusicURL();
+ }
+ }
+}
+
void init_audio()
{
if (!gAudiop)
@@ -142,12 +359,25 @@ void audio_update_volume(bool force_update)
// Streaming Music
if (gAudiop)
- {
+ {
+ if (progress_view_visible && !LLViewerAudio::getInstance()->getForcedTeleportFade())
+ {
+ LLViewerAudio::getInstance()->setForcedTeleportFade(true);
+ LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLStringUtil::null);
+ LLViewerAudio::getInstance()->setNextStreamURI(LLStringUtil::null);
+ }
+
+ if (!progress_view_visible && LLViewerAudio::getInstance()->getForcedTeleportFade() == true)
+ {
+ LLViewerAudio::getInstance()->setForcedTeleportFade(false);
+ }
+
F32 music_volume = gSavedSettings.getF32("AudioLevelMusic");
BOOL music_muted = gSavedSettings.getBOOL("MuteMusic");
- music_volume = mute_volume * master_volume * music_volume;
- gAudiop->setInternetStreamGain ( music_muted || progress_view_visible ? 0.f : music_volume );
-
+ F32 fade_volume = LLViewerAudio::getInstance()->getFadeVolume();
+
+ music_volume = mute_volume * master_volume * music_volume * fade_volume;
+ gAudiop->setInternetStreamGain (music_muted ? 0.f : music_volume);
}
// Streaming Media
diff --git a/indra/newview/llvieweraudio.h b/indra/newview/llvieweraudio.h
index e5916285fb..a3da9fc6b8 100644
--- a/indra/newview/llvieweraudio.h
+++ b/indra/newview/llvieweraudio.h
@@ -27,6 +27,9 @@
#ifndef LL_VIEWERAUDIO_H
#define LL_VIEWERAUDIO_H
+#include "llframetimer.h"
+#include "llsingleton.h"
+
// comment out to turn off wind
#define kAUDIO_ENABLE_WIND
//#define kAUDIO_ENABLE_WATER 1 // comment out to turn off water
@@ -38,4 +41,48 @@ void audio_update_volume(bool force_update = true);
void audio_update_listener();
void audio_update_wind(bool force_update = true);
+class LLViewerAudio : public LLSingleton<LLViewerAudio>
+{
+public:
+
+ enum EFadeState
+ {
+ FADE_IDLE,
+ FADE_IN,
+ FADE_OUT,
+ };
+
+ LLViewerAudio();
+ virtual ~LLViewerAudio();
+
+ void startInternetStreamWithAutoFade(std::string streamURI);
+ void stopInternetStreamWithAutoFade();
+
+ bool onIdleUpdate();
+
+ EFadeState getFadeState() { return mFadeState; }
+ bool isDone() { return mDone; };
+ F32 getFadeVolume();
+ bool getForcedTeleportFade() { return mForcedTeleportFade; };
+ void setForcedTeleportFade(bool fade) { mForcedTeleportFade = fade;} ;
+ void setNextStreamURI(std::string stream) { mNextStreamURI = stream; } ;
+
+private:
+
+ bool mDone;
+ F32 mFadeTime;
+ std::string mNextStreamURI;
+ EFadeState mFadeState;
+ LLFrameTimer stream_fade_timer;
+ bool mIdleListnerActive;
+ bool mForcedTeleportFade;
+ boost::signals2::connection mTeleportFailedConnection;
+
+ void registerIdleListener();
+ void deregisterIdleListener() { mIdleListnerActive = false; };
+ void startFading();
+ void onTeleportFailed();
+
+};
+
#endif //LL_VIEWER_H
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 73e4d11d7b..093b84413a 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -564,7 +564,6 @@ void settings_setup_listeners()
gSavedSettings.getControl("OctreeAttachmentSizeFactor")->getSignal()->connect(boost::bind(&handleRepartition, _2));
gSavedSettings.getControl("RenderMaxTextureIndex")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
gSavedSettings.getControl("RenderUseTriStrips")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
- gSavedSettings.getControl("RenderAnimateTrees")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2));
gSavedSettings.getControl("RenderAvatarVP")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
gSavedSettings.getControl("VertexShaderEnable")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
gSavedSettings.getControl("RenderUIBuffer")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2));
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 3f0b5bf3fb..cb40af7061 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -230,7 +230,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
glClear(GL_COLOR_BUFFER_BIT);
gViewerWindow->getWindow()->swapBuffers();
LLPipeline::refreshCachedSettings();
- LLPipeline::refreshRenderDeferred();
gPipeline.resizeScreenTexture();
gResizeScreenTexture = FALSE;
gWindowResized = FALSE;
@@ -617,9 +616,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
//Increment drawable frame counter
LLDrawable::incrementVisible();
- LLPipeline::refreshCachedSettings();
- LLPipeline::refreshRenderDeferred();
-
LLSpatialGroup::sNoDelete = TRUE;
LLTexUnit::sWhiteTexture = LLViewerFetchedTexture::sWhiteImagep->getTexName();
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index 273bf822bc..8406f639df 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -65,6 +65,7 @@
#include "llfloaterhardwaresettings.h"
#include "llfloaterhelpbrowser.h"
#include "llfloaterwebcontent.h"
+#include "llfloaterwebprofile.h"
#include "llfloatermediasettings.h"
#include "llfloaterhud.h"
#include "llfloaterimagepreview.h"
@@ -285,7 +286,8 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("stop_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNotRunQueue>);
LLFloaterReg::add("snapshot", "floater_snapshot.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSnapshot>);
LLFloaterReg::add("search", "floater_search.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSearch>);
- LLFloaterReg::add("profile", "floater_web_profile.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create);
+ LLFloaterReg::add("my_profile", "floater_my_web_profile.xml", (LLFloaterBuildFunc)&LLFloaterWebProfile::create);
+ LLFloaterReg::add("profile", "floater_web_profile.xml", (LLFloaterBuildFunc)&LLFloaterWebProfile::create);
LLFloaterReg::add("how_to", "floater_how_to.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create);
@@ -301,7 +303,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("web_content", "floater_web_content.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create);
LLFloaterReg::add("whitelist_entry", "floater_whitelist_entry.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWhiteListEntry>);
- LLFloaterWindowSizeUtil::registerFloater();
+ LLFloaterReg::add("window_size", "floater_window_size.xml", &LLFloaterReg::build<LLFloaterWindowSize>);
LLFloaterReg::add("world_map", "floater_world_map.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWorldMap>);
// *NOTE: Please keep these alphabetized for easier merges
diff --git a/indra/newview/llviewerfoldertype.cpp b/indra/newview/llviewerfoldertype.cpp
index 9101222393..a179b61cff 100644
--- a/indra/newview/llviewerfoldertype.cpp
+++ b/indra/newview/llviewerfoldertype.cpp
@@ -40,6 +40,7 @@ struct ViewerFolderEntry : public LLDictionaryEntry
const std::string &icon_name_open, // name of the folder icon
const std::string &icon_name_closed,
BOOL is_quiet, // folder doesn't need a UI update when changed
+ bool hide_if_empty, // folder not shown if empty
const std::string &dictionary_name = empty_string // no reverse lookup needed on non-ensembles, so in most cases just leave this blank
)
:
@@ -47,7 +48,8 @@ struct ViewerFolderEntry : public LLDictionaryEntry
mNewCategoryName(new_category_name),
mIconNameOpen(icon_name_open),
mIconNameClosed(icon_name_closed),
- mIsQuiet(is_quiet)
+ mIsQuiet(is_quiet),
+ mHideIfEmpty(hide_if_empty)
{
mAllowedNames.clear();
}
@@ -66,7 +68,8 @@ struct ViewerFolderEntry : public LLDictionaryEntry
*/
mIconNameOpen("Inv_FolderOpen"), mIconNameClosed("Inv_FolderClosed"),
mNewCategoryName(new_category_name),
- mIsQuiet(FALSE)
+ mIsQuiet(FALSE),
+ mHideIfEmpty(false)
{
const std::string delims (",");
LLStringUtilBase<char>::getTokens(allowed_names, mAllowedNames, delims);
@@ -91,6 +94,7 @@ struct ViewerFolderEntry : public LLDictionaryEntry
typedef std::vector<std::string> name_vec_t;
name_vec_t mAllowedNames;
BOOL mIsQuiet;
+ bool mHideIfEmpty;
};
class LLViewerFolderDictionary : public LLSingleton<LLViewerFolderDictionary>,
@@ -104,43 +108,43 @@ protected:
LLViewerFolderDictionary::LLViewerFolderDictionary()
{
- // NEW CATEGORY NAME FOLDER OPEN FOLDER CLOSED QUIET?
- // |-------------------------|-----------------------|----------------------|-----------|
- addEntry(LLFolderType::FT_TEXTURE, new ViewerFolderEntry("Textures", "Inv_SysOpen", "Inv_SysClosed", FALSE));
- addEntry(LLFolderType::FT_SOUND, new ViewerFolderEntry("Sounds", "Inv_SysOpen", "Inv_SysClosed", FALSE));
- addEntry(LLFolderType::FT_CALLINGCARD, new ViewerFolderEntry("Calling Cards", "Inv_SysOpen", "Inv_SysClosed", FALSE));
- addEntry(LLFolderType::FT_LANDMARK, new ViewerFolderEntry("Landmarks", "Inv_SysOpen", "Inv_SysClosed", FALSE));
- addEntry(LLFolderType::FT_CLOTHING, new ViewerFolderEntry("Clothing", "Inv_SysOpen", "Inv_SysClosed", FALSE));
- addEntry(LLFolderType::FT_OBJECT, new ViewerFolderEntry("Objects", "Inv_SysOpen", "Inv_SysClosed", FALSE));
- addEntry(LLFolderType::FT_NOTECARD, new ViewerFolderEntry("Notecards", "Inv_SysOpen", "Inv_SysClosed", FALSE));
- addEntry(LLFolderType::FT_ROOT_INVENTORY, new ViewerFolderEntry("My Inventory", "Inv_SysOpen", "Inv_SysClosed", FALSE));
- addEntry(LLFolderType::FT_LSL_TEXT, new ViewerFolderEntry("Scripts", "Inv_SysOpen", "Inv_SysClosed", FALSE));
- addEntry(LLFolderType::FT_BODYPART, new ViewerFolderEntry("Body Parts", "Inv_SysOpen", "Inv_SysClosed", FALSE));
- addEntry(LLFolderType::FT_TRASH, new ViewerFolderEntry("Trash", "Inv_TrashOpen", "Inv_TrashClosed", TRUE));
- addEntry(LLFolderType::FT_SNAPSHOT_CATEGORY, new ViewerFolderEntry("Photo Album", "Inv_SysOpen", "Inv_SysClosed", FALSE));
- addEntry(LLFolderType::FT_LOST_AND_FOUND, new ViewerFolderEntry("Lost And Found", "Inv_LostOpen", "Inv_LostClosed", TRUE));
- addEntry(LLFolderType::FT_ANIMATION, new ViewerFolderEntry("Animations", "Inv_SysOpen", "Inv_SysClosed", FALSE));
- addEntry(LLFolderType::FT_GESTURE, new ViewerFolderEntry("Gestures", "Inv_SysOpen", "Inv_SysClosed", FALSE));
- addEntry(LLFolderType::FT_FAVORITE, new ViewerFolderEntry("Favorites", "Inv_SysOpen", "Inv_SysClosed", FALSE));
+ // NEW CATEGORY NAME FOLDER OPEN FOLDER CLOSED QUIET? HIDE IF EMPTY?
+ // |-------------------------|-----------------------|----------------------|-----------|--------------|
+ addEntry(LLFolderType::FT_TEXTURE, new ViewerFolderEntry("Textures", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
+ addEntry(LLFolderType::FT_SOUND, new ViewerFolderEntry("Sounds", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
+ addEntry(LLFolderType::FT_CALLINGCARD, new ViewerFolderEntry("Calling Cards", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
+ addEntry(LLFolderType::FT_LANDMARK, new ViewerFolderEntry("Landmarks", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
+ addEntry(LLFolderType::FT_CLOTHING, new ViewerFolderEntry("Clothing", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
+ addEntry(LLFolderType::FT_OBJECT, new ViewerFolderEntry("Objects", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
+ addEntry(LLFolderType::FT_NOTECARD, new ViewerFolderEntry("Notecards", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
+ addEntry(LLFolderType::FT_ROOT_INVENTORY, new ViewerFolderEntry("My Inventory", "Inv_SysOpen", "Inv_SysClosed", FALSE, false));
+ addEntry(LLFolderType::FT_LSL_TEXT, new ViewerFolderEntry("Scripts", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
+ addEntry(LLFolderType::FT_BODYPART, new ViewerFolderEntry("Body Parts", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
+ addEntry(LLFolderType::FT_TRASH, new ViewerFolderEntry("Trash", "Inv_TrashOpen", "Inv_TrashClosed", TRUE, false));
+ addEntry(LLFolderType::FT_SNAPSHOT_CATEGORY, new ViewerFolderEntry("Photo Album", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
+ addEntry(LLFolderType::FT_LOST_AND_FOUND, new ViewerFolderEntry("Lost And Found", "Inv_LostOpen", "Inv_LostClosed", TRUE, true));
+ addEntry(LLFolderType::FT_ANIMATION, new ViewerFolderEntry("Animations", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
+ addEntry(LLFolderType::FT_GESTURE, new ViewerFolderEntry("Gestures", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
+ addEntry(LLFolderType::FT_FAVORITE, new ViewerFolderEntry("Favorites", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
- addEntry(LLFolderType::FT_CURRENT_OUTFIT, new ViewerFolderEntry("Current Outfit", "Inv_SysOpen", "Inv_SysClosed", TRUE));
- addEntry(LLFolderType::FT_OUTFIT, new ViewerFolderEntry("New Outfit", "Inv_LookFolderOpen", "Inv_LookFolderClosed", TRUE));
- addEntry(LLFolderType::FT_MY_OUTFITS, new ViewerFolderEntry("My Outfits", "Inv_SysOpen", "Inv_SysClosed", TRUE));
- addEntry(LLFolderType::FT_MESH, new ViewerFolderEntry("Meshes", "Inv_SysOpen", "Inv_SysClosed", FALSE));
+ addEntry(LLFolderType::FT_CURRENT_OUTFIT, new ViewerFolderEntry("Current Outfit", "Inv_SysOpen", "Inv_SysClosed", TRUE, false));
+ addEntry(LLFolderType::FT_OUTFIT, new ViewerFolderEntry("New Outfit", "Inv_LookFolderOpen", "Inv_LookFolderClosed", TRUE, true));
+ addEntry(LLFolderType::FT_MY_OUTFITS, new ViewerFolderEntry("My Outfits", "Inv_SysOpen", "Inv_SysClosed", TRUE, true));
+ addEntry(LLFolderType::FT_MESH, new ViewerFolderEntry("Meshes", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
- addEntry(LLFolderType::FT_INBOX, new ViewerFolderEntry("Inbox", "Inv_SysOpen", "Inv_SysClosed", FALSE));
- addEntry(LLFolderType::FT_OUTBOX, new ViewerFolderEntry("Outbox", "Inv_SysOpen", "Inv_SysClosed", FALSE));
+ addEntry(LLFolderType::FT_INBOX, new ViewerFolderEntry("Inbox", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
+ addEntry(LLFolderType::FT_OUTBOX, new ViewerFolderEntry("Outbox", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
- addEntry(LLFolderType::FT_BASIC_ROOT, new ViewerFolderEntry("Basic Root", "Inv_SysOpen", "Inv_SysClosed", FALSE));
+ addEntry(LLFolderType::FT_BASIC_ROOT, new ViewerFolderEntry("Basic Root", "Inv_SysOpen", "Inv_SysClosed", FALSE, true));
- addEntry(LLFolderType::FT_NONE, new ViewerFolderEntry("New Folder", "Inv_FolderOpen", "Inv_FolderClosed", FALSE, "default"));
+ addEntry(LLFolderType::FT_NONE, new ViewerFolderEntry("New Folder", "Inv_FolderOpen", "Inv_FolderClosed", FALSE, false, "default"));
#if SUPPORT_ENSEMBLES
initEnsemblesFromFile();
#else
for (U32 type = (U32)LLFolderType::FT_ENSEMBLE_START; type <= (U32)LLFolderType::FT_ENSEMBLE_END; ++type)
{
- addEntry((LLFolderType::EType)type, new ViewerFolderEntry("New Folder", "Inv_FolderOpen", "Inv_FolderClosed", FALSE));
+ addEntry((LLFolderType::EType)type, new ViewerFolderEntry("New Folder", "Inv_FolderOpen", "Inv_FolderClosed", FALSE, false));
}
#endif
}
@@ -259,6 +263,15 @@ BOOL LLViewerFolderType::lookupIsQuietType(LLFolderType::EType folder_type)
return FALSE;
}
+bool LLViewerFolderType::lookupIsHiddenIfEmpty(LLFolderType::EType folder_type)
+{
+ const ViewerFolderEntry *entry = LLViewerFolderDictionary::getInstance()->lookup(folder_type);
+ if (entry)
+ {
+ return entry->mHideIfEmpty;
+ }
+ return false;
+}
const std::string &LLViewerFolderType::lookupNewCategoryName(LLFolderType::EType folder_type)
{
diff --git a/indra/newview/llviewerfoldertype.h b/indra/newview/llviewerfoldertype.h
index f5938de619..13d5a8fbbd 100644
--- a/indra/newview/llviewerfoldertype.h
+++ b/indra/newview/llviewerfoldertype.h
@@ -40,6 +40,7 @@ public:
static const std::string& lookupIconName(EType folder_type, BOOL is_open = FALSE); // folder icon name
static BOOL lookupIsQuietType(EType folder_type); // folder doesn't require UI update when changes have occured
+ static bool lookupIsHiddenIfEmpty(EType folder_type); // folder is not displayed if empty
static const std::string& lookupNewCategoryName(EType folder_type); // default name when creating new category
static LLFolderType::EType lookupTypeFromNewCategoryName(const std::string& name); // default name when creating new category
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 98f4ce58fe..42dabdec0d 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -67,7 +67,7 @@
//#include "llfirstuse.h"
#include "llviewernetwork.h"
#include "llwindow.h"
-
+#include "llvieweraudio.h"
#include "llfloaterwebcontent.h" // for handling window close requests and geometry change requests in media browser windows.
@@ -986,7 +986,7 @@ void LLViewerMedia::updateMedia(void *dummy_arg)
{
if(LLViewerMedia::isParcelAudioPlaying() && gAudiop && LLViewerMedia::hasParcelAudio())
{
- gAudiop->stopInternetStream();
+ LLViewerAudio::getInstance()->stopInternetStreamWithAutoFade();
}
}
pimpl->setPriority(new_priority);
@@ -1090,13 +1090,24 @@ void LLViewerMedia::setAllMediaEnabled(bool val)
gAudiop &&
LLViewerMedia::hasParcelAudio())
{
- gAudiop->startInternetStream(LLViewerMedia::getParcelAudioURL());
+ if (LLAudioEngine::AUDIO_PAUSED == gAudiop->isInternetStreamPlaying())
+ {
+ // 'false' means unpause
+ gAudiop->pauseInternetStream(false);
+ }
+ else
+ {
+ LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLViewerMedia::getParcelAudioURL());
+ }
}
}
else {
// This actually unloads the impl, as opposed to "stop"ping the media
LLViewerParcelMedia::stop();
- if (gAudiop) gAudiop->stopInternetStream();
+ if (gAudiop)
+ {
+ LLViewerAudio::getInstance()->stopInternetStreamWithAutoFade();
+ }
}
}
@@ -1886,7 +1897,7 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_
if(plugin_basename.empty())
{
- LL_WARNS("Media") << "Couldn't find plugin for media type " << media_type << LL_ENDL;
+ LL_WARNS_ONCE("Media") << "Couldn't find plugin for media type " << media_type << LL_ENDL;
}
else
{
@@ -1912,11 +1923,11 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_
llstat s;
if(LLFile::stat(launcher_name, &s))
{
- LL_WARNS("Media") << "Couldn't find launcher at " << launcher_name << LL_ENDL;
+ LL_WARNS_ONCE("Media") << "Couldn't find launcher at " << launcher_name << LL_ENDL;
}
else if(LLFile::stat(plugin_name, &s))
{
- LL_WARNS("Media") << "Couldn't find plugin at " << plugin_name << LL_ENDL;
+ LL_WARNS_ONCE("Media") << "Couldn't find plugin at " << plugin_name << LL_ENDL;
}
else
{
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 4069ac1a69..3a1b8d7623 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -76,7 +76,6 @@
#include "llinventoryfunctions.h"
#include "llpanellogin.h"
#include "llpanelblockedlist.h"
-#include "llmenucommands.h"
#include "llmoveview.h"
#include "llparcel.h"
#include "llrootview.h"
@@ -3102,7 +3101,7 @@ void handle_avatar_eject(const LLSD& avatar_id)
bool my_profile_visible()
{
- LLFloater* floaterp = LLFloaterReg::findInstance("profile", LLSD().with("id", gAgent.getID()));
+ LLFloater* floaterp = LLAvatarActions::getProfileFloater(gAgentID);
return floaterp && floaterp->isInVisibleChain();
}
@@ -7790,24 +7789,6 @@ class LLWorldPostProcess : public view_listener_t
}
};
-class LLWorldToggleMovementControls : public view_listener_t
-{
- bool handleEvent(const LLSD& userdata)
- {
- LLFloaterReg::toggleInstanceOrBringToFront("moveview");
- return true;
- }
-};
-
-class LLWorldToggleCameraControls : public view_listener_t
-{
- bool handleEvent(const LLSD& userdata)
- {
- LLFloaterReg::toggleInstanceOrBringToFront("camera");
- return true;
- }
-};
-
void handle_flush_name_caches()
{
// Toggle display names on and off to flush
@@ -7963,6 +7944,11 @@ void initialize_menus()
// Agent
commit.add("Agent.toggleFlying", boost::bind(&LLAgent::toggleFlying));
enable.add("Agent.enableFlying", boost::bind(&LLAgent::enableFlying));
+ commit.add("Agent.PressMicrophone", boost::bind(&LLAgent::pressMicrophone, _2));
+ commit.add("Agent.ReleaseMicrophone", boost::bind(&LLAgent::releaseMicrophone, _2));
+ commit.add("Agent.ToggleMicrophone", boost::bind(&LLAgent::toggleMicrophone, _2));
+ enable.add("Agent.IsMicrophoneOn", boost::bind(&LLAgent::isMicrophoneOn, _2));
+ enable.add("Agent.IsActionAllowed", boost::bind(&LLAgent::isActionAllowed, _2));
// File menu
init_menu_file();
@@ -8005,7 +7991,6 @@ void initialize_menus()
view_listener_t::addMenu(new LLAdvancedAgentFlyingInfo(), "Agent.getFlying");
// World menu
- commit.add("World.Chat", boost::bind(&handle_chat, (void*)NULL));
view_listener_t::addMenu(new LLWorldAlwaysRun(), "World.AlwaysRun");
view_listener_t::addMenu(new LLWorldCreateLandmark(), "World.CreateLandmark");
view_listener_t::addMenu(new LLWorldPlaceProfile(), "World.PlaceProfile");
@@ -8026,9 +8011,6 @@ void initialize_menus()
view_listener_t::addMenu(new LLWorldEnableEnvPreset(), "World.EnableEnvPreset");
view_listener_t::addMenu(new LLWorldPostProcess(), "World.PostProcess");
- view_listener_t::addMenu(new LLWorldToggleMovementControls(), "World.Toggle.MovementControls");
- view_listener_t::addMenu(new LLWorldToggleCameraControls(), "World.Toggle.CameraControls");
-
// Tools menu
view_listener_t::addMenu(new LLToolsSelectTool(), "Tools.SelectTool");
view_listener_t::addMenu(new LLToolsSelectOnlyMyObjects(), "Tools.SelectOnlyMyObjects");
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index dca5cdd06d..ad333a71ff 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -3638,6 +3638,9 @@ void process_teleport_finish(LLMessageSystem* msg, void**)
gCacheName->setUpstream(sim);
*/
+ // Make sure we're standing
+ gAgent.standUp();
+
// now, use the circuit info to tell simulator about us!
LL_INFOS("Messaging") << "process_teleport_finish() Enabling "
<< sim_host << " with code " << msg->mOurCircuitCode << LL_ENDL;
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index d6002e7320..9db784101d 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -67,6 +67,7 @@
#include "llworld.h"
#include "roles_constants.h"
#include "llweb.h"
+#include "llvieweraudio.h"
const F32 PARCEL_COLLISION_DRAW_SECS = 1.f;
@@ -1457,6 +1458,8 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
S32 other_clean_time = 0;
+ LLViewerParcelMgr& parcel_mgr = LLViewerParcelMgr::instance();
+
msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_RequestResult, request_result );
msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_SequenceID, sequence_id );
@@ -1472,31 +1475,31 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
if (sequence_id == SELECTED_PARCEL_SEQ_ID)
{
// ...selected parcels report this sequence id
- LLViewerParcelMgr::getInstance()->mRequestResult = PARCEL_RESULT_SUCCESS;
- parcel = LLViewerParcelMgr::getInstance()->mCurrentParcel;
+ parcel_mgr.mRequestResult = PARCEL_RESULT_SUCCESS;
+ parcel = parcel_mgr.mCurrentParcel;
}
else if (sequence_id == HOVERED_PARCEL_SEQ_ID)
{
- LLViewerParcelMgr::getInstance()->mHoverRequestResult = PARCEL_RESULT_SUCCESS;
- parcel = LLViewerParcelMgr::getInstance()->mHoverParcel;
+ parcel_mgr.mHoverRequestResult = PARCEL_RESULT_SUCCESS;
+ parcel = parcel_mgr.mHoverParcel;
}
else if (sequence_id == COLLISION_NOT_IN_GROUP_PARCEL_SEQ_ID ||
sequence_id == COLLISION_NOT_ON_LIST_PARCEL_SEQ_ID ||
sequence_id == COLLISION_BANNED_PARCEL_SEQ_ID)
{
- LLViewerParcelMgr::getInstance()->mHoverRequestResult = PARCEL_RESULT_SUCCESS;
- parcel = LLViewerParcelMgr::getInstance()->mCollisionParcel;
+ parcel_mgr.mHoverRequestResult = PARCEL_RESULT_SUCCESS;
+ parcel = parcel_mgr.mCollisionParcel;
}
- else if (sequence_id == 0 || sequence_id > LLViewerParcelMgr::getInstance()->mAgentParcelSequenceID)
+ else if (sequence_id == 0 || sequence_id > parcel_mgr.mAgentParcelSequenceID)
{
// new agent parcel
- LLViewerParcelMgr::getInstance()->mAgentParcelSequenceID = sequence_id;
- parcel = LLViewerParcelMgr::getInstance()->mAgentParcel;
+ parcel_mgr.mAgentParcelSequenceID = sequence_id;
+ parcel = parcel_mgr.mAgentParcel;
}
else
{
llinfos << "out of order agent parcel sequence id " << sequence_id
- << " last good " << LLViewerParcelMgr::getInstance()->mAgentParcelSequenceID
+ << " last good " << parcel_mgr.mAgentParcelSequenceID
<< llendl;
return;
}
@@ -1567,15 +1570,15 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
parcel->setRegionDenyAgeUnverifiedOverride(region_deny_age_unverified_override);
parcel->unpackMessage(msg);
- if (parcel == LLViewerParcelMgr::getInstance()->mAgentParcel)
+ if (parcel == parcel_mgr.mAgentParcel)
{
- S32 bitmap_size = LLViewerParcelMgr::getInstance()->mParcelsPerEdge
- * LLViewerParcelMgr::getInstance()->mParcelsPerEdge
+ S32 bitmap_size = parcel_mgr.mParcelsPerEdge
+ * parcel_mgr.mParcelsPerEdge
/ 8;
U8* bitmap = new U8[ bitmap_size ];
msg->getBinaryDataFast(_PREHASH_ParcelData, _PREHASH_Bitmap, bitmap, bitmap_size);
- LLViewerParcelMgr::getInstance()->writeAgentParcelFromBitmap(bitmap);
+ parcel_mgr.writeAgentParcelFromBitmap(bitmap);
delete[] bitmap;
// Let interesting parties know about agent parcel change.
@@ -1595,11 +1598,11 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
if (sequence_id == SELECTED_PARCEL_SEQ_ID)
{
// Update selected counts
- LLViewerParcelMgr::getInstance()->mCurrentParcelSelection->mSelectedSelfCount = self_count;
- LLViewerParcelMgr::getInstance()->mCurrentParcelSelection->mSelectedOtherCount = other_count;
- LLViewerParcelMgr::getInstance()->mCurrentParcelSelection->mSelectedPublicCount = public_count;
+ parcel_mgr.mCurrentParcelSelection->mSelectedSelfCount = self_count;
+ parcel_mgr.mCurrentParcelSelection->mSelectedOtherCount = other_count;
+ parcel_mgr.mCurrentParcelSelection->mSelectedPublicCount = public_count;
- LLViewerParcelMgr::getInstance()->mCurrentParcelSelection->mSelectedMultipleOwners =
+ parcel_mgr.mCurrentParcelSelection->mSelectedMultipleOwners =
(request_result == PARCEL_RESULT_MULTIPLE);
// Select the whole parcel
@@ -1610,67 +1613,67 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
{
// don't muck with the westsouth and eastnorth.
// just highlight it
- LLVector3 west_south = region->getPosRegionFromGlobal(LLViewerParcelMgr::getInstance()->mWestSouth);
- LLVector3 east_north = region->getPosRegionFromGlobal(LLViewerParcelMgr::getInstance()->mEastNorth);
+ LLVector3 west_south = region->getPosRegionFromGlobal(parcel_mgr.mWestSouth);
+ LLVector3 east_north = region->getPosRegionFromGlobal(parcel_mgr.mEastNorth);
- LLViewerParcelMgr::getInstance()->resetSegments(LLViewerParcelMgr::getInstance()->mHighlightSegments);
- LLViewerParcelMgr::getInstance()->writeHighlightSegments(
+ parcel_mgr.resetSegments(parcel_mgr.mHighlightSegments);
+ parcel_mgr.writeHighlightSegments(
west_south.mV[VX],
west_south.mV[VY],
east_north.mV[VX],
east_north.mV[VY] );
- LLViewerParcelMgr::getInstance()->mCurrentParcelSelection->mWholeParcelSelected = FALSE;
+ parcel_mgr.mCurrentParcelSelection->mWholeParcelSelected = FALSE;
}
else if (0 == local_id)
{
// this is public land, just highlight the selection
- LLViewerParcelMgr::getInstance()->mWestSouth = region->getPosGlobalFromRegion( aabb_min );
- LLViewerParcelMgr::getInstance()->mEastNorth = region->getPosGlobalFromRegion( aabb_max );
+ parcel_mgr.mWestSouth = region->getPosGlobalFromRegion( aabb_min );
+ parcel_mgr.mEastNorth = region->getPosGlobalFromRegion( aabb_max );
- LLViewerParcelMgr::getInstance()->resetSegments(LLViewerParcelMgr::getInstance()->mHighlightSegments);
- LLViewerParcelMgr::getInstance()->writeHighlightSegments(
+ parcel_mgr.resetSegments(parcel_mgr.mHighlightSegments);
+ parcel_mgr.writeHighlightSegments(
aabb_min.mV[VX],
aabb_min.mV[VY],
aabb_max.mV[VX],
aabb_max.mV[VY] );
- LLViewerParcelMgr::getInstance()->mCurrentParcelSelection->mWholeParcelSelected = TRUE;
+ parcel_mgr.mCurrentParcelSelection->mWholeParcelSelected = TRUE;
}
else
{
- LLViewerParcelMgr::getInstance()->mWestSouth = region->getPosGlobalFromRegion( aabb_min );
- LLViewerParcelMgr::getInstance()->mEastNorth = region->getPosGlobalFromRegion( aabb_max );
+ parcel_mgr.mWestSouth = region->getPosGlobalFromRegion( aabb_min );
+ parcel_mgr.mEastNorth = region->getPosGlobalFromRegion( aabb_max );
// Owned land, highlight the boundaries
- S32 bitmap_size = LLViewerParcelMgr::getInstance()->mParcelsPerEdge
- * LLViewerParcelMgr::getInstance()->mParcelsPerEdge
+ S32 bitmap_size = parcel_mgr.mParcelsPerEdge
+ * parcel_mgr.mParcelsPerEdge
/ 8;
U8* bitmap = new U8[ bitmap_size ];
msg->getBinaryDataFast(_PREHASH_ParcelData, _PREHASH_Bitmap, bitmap, bitmap_size);
- LLViewerParcelMgr::getInstance()->resetSegments(LLViewerParcelMgr::getInstance()->mHighlightSegments);
- LLViewerParcelMgr::getInstance()->writeSegmentsFromBitmap( bitmap, LLViewerParcelMgr::getInstance()->mHighlightSegments );
+ parcel_mgr.resetSegments(parcel_mgr.mHighlightSegments);
+ parcel_mgr.writeSegmentsFromBitmap( bitmap, parcel_mgr.mHighlightSegments );
delete[] bitmap;
bitmap = NULL;
- LLViewerParcelMgr::getInstance()->mCurrentParcelSelection->mWholeParcelSelected = TRUE;
+ parcel_mgr.mCurrentParcelSelection->mWholeParcelSelected = TRUE;
}
// Request access list information for this land
- LLViewerParcelMgr::getInstance()->sendParcelAccessListRequest(AL_ACCESS | AL_BAN);
+ parcel_mgr.sendParcelAccessListRequest(AL_ACCESS | AL_BAN);
// Request the media url filter list for this land
- LLViewerParcelMgr::getInstance()->requestParcelMediaURLFilter();
+ parcel_mgr.requestParcelMediaURLFilter();
// Request dwell for this land, if it's not public land.
- LLViewerParcelMgr::getInstance()->mSelectedDwell = DWELL_NAN;
+ parcel_mgr.mSelectedDwell = DWELL_NAN;
if (0 != local_id)
{
- LLViewerParcelMgr::getInstance()->sendParcelDwellRequest();
+ parcel_mgr.sendParcelDwellRequest();
}
- LLViewerParcelMgr::getInstance()->mSelected = TRUE;
- LLViewerParcelMgr::getInstance()->notifyObservers();
+ parcel_mgr.mSelected = TRUE;
+ parcel_mgr.notifyObservers();
}
}
else if (sequence_id == COLLISION_NOT_IN_GROUP_PARCEL_SEQ_ID ||
@@ -1678,32 +1681,32 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
sequence_id == COLLISION_BANNED_PARCEL_SEQ_ID)
{
// We're about to collide with this parcel
- LLViewerParcelMgr::getInstance()->mRenderCollision = TRUE;
- LLViewerParcelMgr::getInstance()->mCollisionTimer.reset();
+ parcel_mgr.mRenderCollision = TRUE;
+ parcel_mgr.mCollisionTimer.reset();
// Differentiate this parcel if we are banned from it.
if (sequence_id == COLLISION_BANNED_PARCEL_SEQ_ID)
{
- LLViewerParcelMgr::getInstance()->mCollisionBanned = BA_BANNED;
+ parcel_mgr.mCollisionBanned = BA_BANNED;
}
else if (sequence_id == COLLISION_NOT_IN_GROUP_PARCEL_SEQ_ID)
{
- LLViewerParcelMgr::getInstance()->mCollisionBanned = BA_NOT_IN_GROUP;
+ parcel_mgr.mCollisionBanned = BA_NOT_IN_GROUP;
}
else
{
- LLViewerParcelMgr::getInstance()->mCollisionBanned = BA_NOT_ON_LIST;
+ parcel_mgr.mCollisionBanned = BA_NOT_ON_LIST;
}
- S32 bitmap_size = LLViewerParcelMgr::getInstance()->mParcelsPerEdge
- * LLViewerParcelMgr::getInstance()->mParcelsPerEdge
+ S32 bitmap_size = parcel_mgr.mParcelsPerEdge
+ * parcel_mgr.mParcelsPerEdge
/ 8;
U8* bitmap = new U8[ bitmap_size ];
msg->getBinaryDataFast(_PREHASH_ParcelData, _PREHASH_Bitmap, bitmap, bitmap_size);
- LLViewerParcelMgr::getInstance()->resetSegments(LLViewerParcelMgr::getInstance()->mCollisionSegments);
- LLViewerParcelMgr::getInstance()->writeSegmentsFromBitmap( bitmap, LLViewerParcelMgr::getInstance()->mCollisionSegments );
+ parcel_mgr.resetSegments(parcel_mgr.mCollisionSegments);
+ parcel_mgr.writeSegmentsFromBitmap( bitmap, parcel_mgr.mCollisionSegments );
delete[] bitmap;
bitmap = NULL;
@@ -1714,18 +1717,21 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
LLViewerRegion *region = LLWorld::getInstance()->getRegion( msg->getSender() );
if (region)
{
- LLViewerParcelMgr::getInstance()->mHoverWestSouth = region->getPosGlobalFromRegion( aabb_min );
- LLViewerParcelMgr::getInstance()->mHoverEastNorth = region->getPosGlobalFromRegion( aabb_max );
+ parcel_mgr.mHoverWestSouth = region->getPosGlobalFromRegion( aabb_min );
+ parcel_mgr.mHoverEastNorth = region->getPosGlobalFromRegion( aabb_max );
}
else
{
- LLViewerParcelMgr::getInstance()->mHoverWestSouth.clearVec();
- LLViewerParcelMgr::getInstance()->mHoverEastNorth.clearVec();
+ parcel_mgr.mHoverWestSouth.clearVec();
+ parcel_mgr.mHoverEastNorth.clearVec();
}
}
else
{
- // look for music.
+ // Check for video
+ LLViewerParcelMedia::update(parcel);
+
+ // Then check for music
if (gAudiop)
{
if (parcel)
@@ -1736,46 +1742,34 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
std::string music_url = music_url_raw;
LLStringUtil::trim(music_url);
- // On entering a new parcel, stop the last stream if the
- // new parcel has a different music url. (Empty URL counts
- // as different.)
- const std::string& stream_url = gAudiop->getInternetStreamURL();
-
- if (music_url.empty() || music_url != stream_url)
+ // If there is a new music URL and it's valid, play it.
+ if (music_url.size() > 12)
{
- // URL is different from one currently playing.
- gAudiop->stopInternetStream();
-
- // If there is a new music URL and it's valid, play it.
- if (music_url.size() > 12)
+ if (music_url.substr(0,7) == "http://")
{
- if (music_url.substr(0,7) == "http://")
- {
- optionally_start_music(music_url);
- }
- else
- {
- llinfos << "Stopping parcel music (invalid audio stream URL)" << llendl;
- // clears the URL
- gAudiop->startInternetStream(LLStringUtil::null);
- }
+ optionally_start_music(music_url);
}
- else if (!gAudiop->getInternetStreamURL().empty())
+ else
{
- llinfos << "Stopping parcel music (parcel stream URL is empty)" << llendl;
- gAudiop->startInternetStream(LLStringUtil::null);
+ llinfos << "Stopping parcel music (invalid audio stream URL)" << llendl;
+ // clears the URL
+ // null value causes fade out
+ LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLStringUtil::null);
}
}
+ else if (!gAudiop->getInternetStreamURL().empty())
+ {
+ llinfos << "Stopping parcel music (parcel stream URL is empty)" << llendl;
+ // null value causes fade out
+ LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLStringUtil::null);
+ }
}
else
{
// Public land has no music
- gAudiop->stopInternetStream();
+ LLViewerAudio::getInstance()->stopInternetStreamWithAutoFade();
}
}//if gAudiop
-
- // now check for video
- LLViewerParcelMedia::update( parcel );
};
}
@@ -1794,7 +1788,11 @@ void optionally_start_music(const std::string& music_url)
gSavedSettings.getBOOL("MediaTentativeAutoPlay")))
{
llinfos << "Starting parcel music " << music_url << llendl;
- gAudiop->startInternetStream(music_url);
+ LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(music_url);
+ }
+ else
+ {
+ LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLStringUtil::null);
}
}
}
diff --git a/indra/newview/llviewerprecompiledheaders.h b/indra/newview/llviewerprecompiledheaders.h
index 12f6a0dd1c..f738b84bb9 100644
--- a/indra/newview/llviewerprecompiledheaders.h
+++ b/indra/newview/llviewerprecompiledheaders.h
@@ -124,4 +124,7 @@
// Library includes from llmessage project
#include "llcachename.h"
+// Library includes from llxuixml
+#include "llinitparam.h"
+
#endif
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 18ae83e3b6..bddc07b395 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -1338,6 +1338,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
if (success)
{
gDeferredShadowAlphaMaskProgram.mName = "Deferred Shadow Alpha Mask Shader";
+ gDeferredShadowAlphaMaskProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels;
gDeferredShadowAlphaMaskProgram.mShaderFiles.clear();
gDeferredShadowAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/shadowAlphaMaskV.glsl", GL_VERTEX_SHADER_ARB));
gDeferredShadowAlphaMaskProgram.mShaderFiles.push_back(make_pair("deferred/shadowAlphaMaskF.glsl", GL_FRAGMENT_SHADER_ARB));
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 786e2b73b1..f4bbc2b067 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -2269,6 +2269,7 @@ void LLViewerFetchedTexture::unpauseLoadedCallbacks(const LLLoadedCallbackEntry:
}
}
mPauseLoadedCallBacks = FALSE ;
+ mLastCallBackActiveTime = sCurrentTime ;
if(need_raw)
{
mSaveRawImage = TRUE ;
@@ -2308,13 +2309,18 @@ void LLViewerFetchedTexture::pauseLoadedCallbacks(const LLLoadedCallbackEntry::s
bool LLViewerFetchedTexture::doLoadedCallbacks()
{
- static const F32 MAX_INACTIVE_TIME = 120.f ; //seconds
+ static const F32 MAX_INACTIVE_TIME = 900.f ; //seconds
if (mNeedsCreateTexture)
{
return false;
}
- if(sCurrentTime - mLastCallBackActiveTime > MAX_INACTIVE_TIME)
+ if(mPauseLoadedCallBacks)
+ {
+ destroyRawImage();
+ return false; //paused
+ }
+ if(sCurrentTime - mLastCallBackActiveTime > MAX_INACTIVE_TIME && !mIsFetching)
{
clearCallbackEntryList() ; //remove all callbacks.
return false ;
@@ -2337,12 +2343,8 @@ bool LLViewerFetchedTexture::doLoadedCallbacks()
// Remove ourself from the global list of textures with callbacks
gTextureList.mCallbackList.erase(this);
- }
- if(mPauseLoadedCallBacks)
- {
- destroyRawImage();
- return res; //paused
- }
+ return false ;
+ }
S32 gl_discard = getDiscardLevel();
@@ -2604,7 +2606,11 @@ bool LLViewerFetchedTexture::needsToSaveRawImage()
void LLViewerFetchedTexture::destroyRawImage()
{
- if (mAuxRawImage.notNull()) sAuxCount--;
+ if (mAuxRawImage.notNull())
+ {
+ sAuxCount--;
+ mAuxRawImage = NULL;
+ }
if (mRawImage.notNull())
{
@@ -2618,12 +2624,12 @@ void LLViewerFetchedTexture::destroyRawImage()
}
setCachedRawImage() ;
}
+
+ mRawImage = NULL;
+
+ mIsRawImageValid = FALSE;
+ mRawDiscardLevel = INVALID_DISCARD_LEVEL;
}
-
- mRawImage = NULL;
- mAuxRawImage = NULL;
- mIsRawImageValid = FALSE;
- mRawDiscardLevel = INVALID_DISCARD_LEVEL;
}
//use the mCachedRawImage to (re)generate the gl texture.
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 62e526a42f..31dfa1923c 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -810,6 +810,20 @@ void LLViewerWindow::updateDebugText()
// LLViewerWindow
//
+LLViewerWindow::Params::Params()
+: title("title"),
+ name("name"),
+ x("x"),
+ y("y"),
+ width("width"),
+ height("height"),
+ min_width("min_width"),
+ min_height("min_height"),
+ fullscreen("fullscreen", false),
+ ignore_pixel_depth("ignore_pixel_depth", false)
+{}
+
+
BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK mask, LLMouseHandler::EClickType clicktype, BOOL down)
{
const char* buttonname = "";
@@ -1503,18 +1517,13 @@ std::string LLViewerWindow::translateString(const char* tag,
//
// Classes
//
-LLViewerWindow::LLViewerWindow(
- const std::string& title, const std::string& name,
- S32 x, S32 y,
- S32 width, S32 height,
- BOOL fullscreen, BOOL ignore_pixel_depth) // fullscreen is no longer used
- :
- mWindow(NULL),
+LLViewerWindow::LLViewerWindow(const Params& p)
+: mWindow(NULL),
mActive(true),
mUIVisible(true),
- mWindowRectRaw(0, height, width, 0),
- mWindowRectScaled(0, height, width, 0),
- mWorldViewRectRaw(0, height, width, 0),
+ mWindowRectRaw(0, p.height, p.width, 0),
+ mWindowRectScaled(0, p.height, p.width, 0),
+ mWorldViewRectRaw(0, p.height, p.width, 0),
mLeftMouseDown(FALSE),
mMiddleMouseDown(FALSE),
mRightMouseDown(FALSE),
@@ -1550,12 +1559,12 @@ LLViewerWindow::LLViewerWindow(
// create window
mWindow = LLWindowManager::createWindow(this,
- title, name, x, y, width, height, 0,
- fullscreen,
+ p.title, p.name, p.x, p.y, p.width, p.height, 0,
+ p.fullscreen,
gHeadlessClient,
gSavedSettings.getBOOL("DisableVerticalSync"),
!gHeadlessClient,
- ignore_pixel_depth,
+ p.ignore_pixel_depth,
gSavedSettings.getBOOL("RenderDeferred") ? 0 : gSavedSettings.getU32("RenderFSAASamples")); //don't use window level anti-aliasing if FBOs are enabled
if (!LLViewerShaderMgr::sInitialized)
@@ -1588,10 +1597,12 @@ LLViewerWindow::LLViewerWindow(
LL_WARNS("Window") << " Someone took over my signal/exception handler (post createWindow)!" << LL_ENDL;
}
+ const bool do_not_enforce = false;
+ mWindow->setMinSize(p.min_width, p.min_height, do_not_enforce); // root view not set
LLCoordScreen scr;
mWindow->getSize(&scr);
- if(fullscreen && ( scr.mX!=width || scr.mY!=height))
+ if(p.fullscreen && ( scr.mX!=p.width || scr.mY!=p.height))
{
llwarns << "Fullscreen has forced us in to a different resolution now using "<<scr.mX<<" x "<<scr.mY<<llendl;
gSavedSettings.setS32("FullScreenWidth",scr.mX);
@@ -2129,16 +2140,19 @@ void LLViewerWindow::reshape(S32 width, S32 height)
sendShapeToSim();
// store new settings for the mode we are in, regardless
- // Only save size if not maximized
BOOL maximized = mWindow->getMaximized();
gSavedSettings.setBOOL("WindowMaximized", maximized);
- LLCoordScreen window_size;
- if (!maximized
- && mWindow->getSize(&window_size))
+ if (!maximized)
{
- gSavedSettings.setS32("WindowWidth", window_size.mX);
- gSavedSettings.setS32("WindowHeight", window_size.mY);
+ U32 min_window_width=gSavedSettings.getU32("MinWindowWidth");
+ U32 min_window_height=gSavedSettings.getU32("MinWindowHeight");
+ // tell the OS specific window code about min window size
+ mWindow->setMinSize(min_window_width, min_window_height);
+
+ // Only save size if not maximized
+ gSavedSettings.setU32("WindowWidth", mWindowRectRaw.getWidth());
+ gSavedSettings.setU32("WindowHeight", mWindowRectRaw.getHeight());
}
LLViewerStats::getInstance()->setStat(LLViewerStats::ST_WINDOW_WIDTH, (F64)width);
@@ -4073,25 +4087,18 @@ void LLViewerWindow::resetSnapshotLoc()
sSnapshotDir.clear();
}
-static S32 BORDERHEIGHT = 0;
-static S32 BORDERWIDTH = 0;
-
// static
void LLViewerWindow::movieSize(S32 new_width, S32 new_height)
{
- LLCoordScreen size;
+ LLCoordWindow size;
gViewerWindow->getWindow()->getSize(&size);
- if ( (size.mX != new_width + BORDERWIDTH)
- ||(size.mY != new_height + BORDERHEIGHT))
+ if ( size.mX != new_width
+ || size.mY != new_height)
{
- // use actual display dimensions, not virtual UI dimensions
- S32 x = gViewerWindow->getWindowWidthRaw();
- S32 y = gViewerWindow->getWindowHeightRaw();
- BORDERWIDTH = size.mX - x;
- BORDERHEIGHT = size.mY- y;
- LLCoordScreen new_size(new_width + BORDERWIDTH,
- new_height + BORDERHEIGHT);
- gViewerWindow->getWindow()->setSize(new_size);
+ LLCoordWindow new_size(new_width, new_height);
+ LLCoordScreen screen_size;
+ gViewerWindow->getWindow()->convertCoords(new_size, &screen_size);
+ gViewerWindow->getWindow()->setSize(screen_size);
}
}
@@ -4723,6 +4730,9 @@ void LLViewerWindow::initFonts(F32 zoom_factor)
{
LLFontGL::destroyAllGL();
// Initialize with possibly different zoom factor
+
+ LLFontManager::initClass();
+
LLFontGL::initClass( gSavedSettings.getF32("FontScreenDPI"),
mDisplayScale.mV[VX] * zoom_factor,
mDisplayScale.mV[VY] * zoom_factor,
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index 0cb7f82b58..6efcaeaf18 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -44,6 +44,7 @@
#include "llstat.h"
#include "llmousehandler.h"
#include "llhandle.h"
+#include "llinitparam.h"
#include <boost/function.hpp>
#include <boost/signals2.hpp>
@@ -133,7 +134,23 @@ public:
//
// CREATORS
//
- LLViewerWindow(const std::string& title, const std::string& name, S32 x, S32 y, S32 width, S32 height, BOOL fullscreen, BOOL ignore_pixel_depth);
+ struct Params : public LLInitParam::Block<Params>
+ {
+ Mandatory<std::string> title,
+ name;
+ Mandatory<S32> x,
+ y,
+ width,
+ height,
+ min_width,
+ min_height;
+ Optional<bool> fullscreen,
+ ignore_pixel_depth;
+
+ Params();
+ };
+
+ LLViewerWindow(const Params& p);
virtual ~LLViewerWindow();
void shutdownViews();
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 4c33716c32..4767ba2bed 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -690,7 +690,8 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mFullyLoadedInitialized(FALSE),
mSupportsAlphaLayers(FALSE),
mLoadedCallbacksPaused(FALSE),
- mHasPelvisOffset( FALSE )
+ mHasPelvisOffset( FALSE ),
+ mRenderUnloadedAvatar(LLCachedControl<bool>(gSavedSettings, "RenderUnloadedAvatar"))
{
LLMemType mt(LLMemType::MTYPE_AVATAR);
//VTResume(); // VTune
@@ -6493,10 +6494,7 @@ BOOL LLVOAvatar::processFullyLoadedChange(bool loading)
BOOL LLVOAvatar::isFullyLoaded() const
{
- if (gSavedSettings.getBOOL("RenderUnloadedAvatar"))
- return TRUE;
- else
- return mFullyLoaded;
+ return (mRenderUnloadedAvatar || mFullyLoaded);
}
bool LLVOAvatar::isTooComplex() const
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index e53b8e3f4b..59796370ae 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -40,6 +40,7 @@
#include "lldrawpoolalpha.h"
#include "llviewerobject.h"
#include "llcharacter.h"
+#include "llcontrol.h"
#include "llviewerjointmesh.h"
#include "llviewerjointattachment.h"
#include "llrendertarget.h"
@@ -450,6 +451,8 @@ private:
F32 mImpostorDistance;
F32 mImpostorPixelArea;
LLVector3 mLastAnimExtents[2];
+
+ LLCachedControl<bool> mRenderUnloadedAvatar;
//--------------------------------------------------------------------
// Wind rippling in clothes
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 8ecf4a80b7..df1d3f2955 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -61,7 +61,6 @@
#include "llviewerwindow.h"
#include "llviewercamera.h"
-#include "llfloaterfriends.h" //VIVOX, inorder to refresh communicate panel
#include "llviewernetwork.h"
#include "llnotificationsutil.h"
@@ -7020,7 +7019,6 @@ void LLVivoxVoiceClient::captureBufferPlayStopSendMessage()
LLVivoxProtocolParser::LLVivoxProtocolParser()
{
- parser = NULL;
parser = XML_ParserCreate(NULL);
reset();
diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp
index 6486fd24ea..4564207da4 100644
--- a/indra/newview/llvotree.cpp
+++ b/indra/newview/llvotree.cpp
@@ -341,45 +341,11 @@ U32 LLVOTree::processUpdateMessage(LLMessageSystem *mesgsys,
BOOL LLVOTree::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
{
- const U16 FRAMES_PER_WIND_UPDATE = 20; // How many frames between wind update per tree
- const F32 TREE_WIND_SENSITIVITY = 0.005f;
- const F32 TREE_TRUNK_STIFFNESS = 0.1f;
-
if (mDead || !(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_TREE)))
{
return TRUE;
}
- if (gSavedSettings.getBOOL("RenderAnimateTrees"))
- {
- F32 mass_inv;
-
- // For all tree objects, update the trunk bending with the current wind
- // Walk sprite list in order away from viewer
- if (!(mFrameCount % FRAMES_PER_WIND_UPDATE))
- {
- // If needed, Get latest wind for this tree
- mWind = mRegionp->mWind.getVelocity(getPositionRegion());
- }
- mFrameCount++;
-
- mass_inv = 1.f/(5.f + mDepth*mBranches*0.2f);
- mTrunkVel += (mWind * mass_inv * TREE_WIND_SENSITIVITY); // Pull in direction of wind
- mTrunkVel -= (mTrunkBend * mass_inv * TREE_TRUNK_STIFFNESS); // Restoring force in direction of trunk
- mTrunkBend += mTrunkVel;
- mTrunkVel *= 0.99f; // Add damping
-
- if (mTrunkBend.length() > 1.f)
- {
- mTrunkBend.normalize();
- }
-
- if (mTrunkVel.length() > 1.f)
- {
- mTrunkVel.normalize();
- }
- }
-
S32 trunk_LOD = sMAX_NUM_TREE_LOD_LEVELS ;
F32 app_angle = getAppAngle()*LLVOTree::sTreeFactor;
@@ -392,39 +358,36 @@ BOOL LLVOTree::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
}
}
- if (!gSavedSettings.getBOOL("RenderAnimateTrees"))
+ if (mReferenceBuffer.isNull())
{
- if (mReferenceBuffer.isNull())
- {
- gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE);
- }
- else if (trunk_LOD != mTrunkLOD)
+ gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE);
+ }
+ else if (trunk_LOD != mTrunkLOD)
+ {
+ gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, FALSE);
+ }
+ else
+ {
+ // we're not animating but we may *still* need to
+ // regenerate the mesh if we moved, since position
+ // and rotation are baked into the mesh.
+ // *TODO: I don't know what's so special about trees
+ // that they don't get REBUILD_POSITION automatically
+ // at a higher level.
+ const LLVector3 &this_position = getPositionAgent();
+ if (this_position != mLastPosition)
{
- gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, FALSE);
+ gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_POSITION);
+ mLastPosition = this_position;
}
else
{
- // we're not animating but we may *still* need to
- // regenerate the mesh if we moved, since position
- // and rotation are baked into the mesh.
- // *TODO: I don't know what's so special about trees
- // that they don't get REBUILD_POSITION automatically
- // at a higher level.
- const LLVector3 &this_position = getPositionAgent();
- if (this_position != mLastPosition)
+ const LLQuaternion &this_rotation = getRotation();
+
+ if (this_rotation != mLastRotation)
{
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_POSITION);
- mLastPosition = this_position;
- }
- else
- {
- const LLQuaternion &this_rotation = getRotation();
-
- if (this_rotation != mLastRotation)
- {
- gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_POSITION);
- mLastRotation = this_rotation;
- }
+ mLastRotation = this_rotation;
}
}
}
@@ -559,7 +522,7 @@ BOOL LLVOTree::updateGeometry(LLDrawable *drawable)
max_vertices += sLODVertexCount[lod];
}
- mReferenceBuffer = new LLVertexBuffer(LLDrawPoolTree::VERTEX_DATA_MASK, gSavedSettings.getBOOL("RenderAnimateTrees") ? GL_STATIC_DRAW_ARB : 0);
+ mReferenceBuffer = new LLVertexBuffer(LLDrawPoolTree::VERTEX_DATA_MASK, 0);
mReferenceBuffer->allocateBuffer(max_vertices, max_indices, TRUE);
LLStrider<LLVector3> vertices;
@@ -863,15 +826,8 @@ BOOL LLVOTree::updateGeometry(LLDrawable *drawable)
llassert(index_count == max_indices);
}
- if (gSavedSettings.getBOOL("RenderAnimateTrees"))
- {
- mDrawable->getFace(0)->setVertexBuffer(mReferenceBuffer);
- }
- else
- {
- //generate tree mesh
- updateMesh();
- }
+ //generate tree mesh
+ updateMesh();
return TRUE;
}
diff --git a/indra/newview/llvotree.h b/indra/newview/llvotree.h
index 1e1deede26..0554935539 100644
--- a/indra/newview/llvotree.h
+++ b/indra/newview/llvotree.h
@@ -152,7 +152,6 @@ public:
friend class LLDrawPoolTree;
protected:
LLVector3 mTrunkBend; // Accumulated wind (used for blowing trees)
- LLVector3 mTrunkVel; //
LLVector3 mWind;
LLPointer<LLVertexBuffer> mReferenceBuffer; //reference geometry for generating tree mesh
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index baab191cb6..20f8674655 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -4624,6 +4624,19 @@ struct CompareBatchBreakerModified
void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::vector<LLFace*>& faces, BOOL distance_sort, BOOL batch_textures)
{
+ U32 buffer_usage = group->mBufferUsage;
+
+#if LL_DARWIN
+ // HACK from Leslie:
+ // Disable VBO usage for alpha on Mac OS X because it kills the framerate
+ // due to implicit calls to glTexSubImage that are beyond our control.
+ // (this works because the only calls here that sort by distance are alpha)
+ if (distance_sort)
+ {
+ buffer_usage = 0x0;
+ }
+#endif
+
//calculate maximum number of vertices to store in a single buffer
U32 max_vertices = (gSavedSettings.getS32("RenderMaxVBOSize")*1024)/LLVertexBuffer::calcVertexSize(group->mSpatialPartition->mVertexDataMask);
max_vertices = llmin(max_vertices, (U32) 65535);
@@ -4805,17 +4818,15 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
if (!buffer)
{ //create new buffer if needed
- buffer = createVertexBuffer(mask,
- group->mBufferUsage);
+ buffer = createVertexBuffer(mask, buffer_usage);
buffer->allocateBuffer(geom_count, index_count, TRUE);
}
else
{ //resize pre-existing buffer
- if (LLVertexBuffer::sEnableVBOs && buffer->getUsage() != group->mBufferUsage ||
+ if (LLVertexBuffer::sEnableVBOs && buffer->getUsage() != buffer_usage ||
buffer->getTypeMask() != mask)
{
- buffer = createVertexBuffer(mask,
- group->mBufferUsage);
+ buffer = createVertexBuffer(mask, buffer_usage);
buffer->allocateBuffer(geom_count, index_count, TRUE);
}
else
@@ -4896,11 +4907,6 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
{
registerFace(group, facep, LLRenderPass::PASS_ALPHA);
}
-
- if (LLPipeline::sRenderDeferred)
- {
- registerFace(group, facep, LLRenderPass::PASS_ALPHA_SHADOW);
- }
}
else if (gPipeline.canUseVertexShaders()
&& group->mSpatialPartition->mPartitionType != LLViewerRegion::PARTITION_HUD
diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h
index 64457975f8..3cf434dc26 100644
--- a/indra/newview/llvovolume.h
+++ b/indra/newview/llvovolume.h
@@ -131,7 +131,8 @@ public:
/*virtual*/ const LLMatrix4 getRenderMatrix() const;
typedef std::map<LLUUID, S32> texture_cost_t;
U32 getRenderCost(texture_cost_t &textures) const;
- /*virtual*/ F32 getStreamingCost(S32* bytes = NULL, S32* visible_bytes = NULL, F32* unscaled_value = NULL) const;
+ F32 getStreamingCost(S32* bytes, S32* visible_bytes, F32* unscaled_value) const;
+ /*virtual*/ F32 getStreamingCost(S32* bytes = NULL, S32* visible_bytes = NULL) { return getStreamingCost(bytes, visible_bytes, NULL); }
/*virtual*/ U32 getTriangleCount(S32* vcount = NULL) const;
/*virtual*/ U32 getHighLODTriangleCount();
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index 6f6e0d2334..676287c0ad 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -818,14 +818,11 @@ void LLWorld::updateWaterObjects()
max_x = (S32)region_x + range;
max_y = (S32)region_y + range;
- F32 height = 0.f;
-
for (region_list_t::iterator iter = mRegionList.begin();
iter != mRegionList.end(); ++iter)
{
LLViewerRegion* regionp = *iter;
LLVOWater* waterp = regionp->getLand().getWaterObj();
- height += regionp->getWaterHeight();
if (waterp)
{
gObjectList.updateActive(waterp);
@@ -842,6 +839,7 @@ void LLWorld::updateWaterObjects()
// Now, get a list of the holes
S32 x, y;
+ F32 water_height = gAgent.getRegion()->getWaterHeight() + 256.f;
for (x = min_x; x <= max_x; x += rwidth)
{
for (y = min_y; y <= max_y; y += rwidth)
@@ -853,7 +851,7 @@ void LLWorld::updateWaterObjects()
waterp->setUseTexture(FALSE);
waterp->setPositionGlobal(LLVector3d(x + rwidth/2,
y + rwidth/2,
- 256.f+DEFAULT_WATER_HEIGHT));
+ water_height));
waterp->setScale(LLVector3((F32)rwidth, (F32)rwidth, 512.f));
gPipeline.createObject(waterp);
mHoleWaterObjects.push_back(waterp);
@@ -910,8 +908,7 @@ void LLWorld::updateWaterObjects()
}
waterp->setRegion(gAgent.getRegion());
- LLVector3d water_pos(water_center_x, water_center_y,
- DEFAULT_WATER_HEIGHT+256.f);
+ LLVector3d water_pos(water_center_x, water_center_y, water_height) ;
LLVector3 water_scale((F32) dim[0], (F32) dim[1], 512.f);
//stretch out to horizon
diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp
index f483ba5af8..920a9a3752 100644
--- a/indra/newview/llxmlrpctransaction.cpp
+++ b/indra/newview/llxmlrpctransaction.cpp
@@ -382,19 +382,11 @@ bool LLXMLRPCTransaction::Impl::process()
// continue onward
}
}
-
- //const F32 MAX_PROCESSING_TIME = 0.05f;
- //LLTimer timer;
-
- mCurlRequest->perform();
-
- /*while (mCurlRequest->perform() > 0)
+
+ if(!mCurlRequest->wait())
{
- if (timer.getElapsedTimeF32() >= MAX_PROCESSING_TIME)
- {
- return false;
- }
- }*/
+ return false ;
+ }
while(1)
{
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index d8e271811a..657cdc0e07 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -509,6 +509,92 @@ void LLPipeline::init()
mDeferredVB = new LLVertexBuffer(DEFERRED_VB_MASK, 0);
mDeferredVB->allocateBuffer(8, 0, true);
setLightingDetail(-1);
+
+ //
+ // Update all settings to trigger a cached settings refresh
+ //
+
+ gSavedSettings.getControl("RenderAutoMaskAlphaDeferred")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderAutoMaskAlphaNonDeferred")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderUseFarClip")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderAvatarMaxVisible")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderDelayVBUpdate")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+
+ gSavedSettings.getControl("UseOcclusion")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+
+ gSavedSettings.getControl("VertexShaderEnable")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderAvatarVP")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("WindLightUseAtmosShaders")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderDeferred")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderDeferredSunWash")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderFSAASamples")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderResolutionDivisor")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderUIBuffer")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderShadowDetail")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderDeferredSSAO")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderShadowResolutionScale")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderLocalLights")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderDelayCreation")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderAnimateRes")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("FreezeTime")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("DebugBeaconLineWidth")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderHighlightBrightness")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderHighlightColor")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderHighlightThickness")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderSpotLightsInNondeferred")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("PreviewAmbientColor")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("PreviewDiffuse0")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("PreviewSpecular0")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("PreviewDiffuse1")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("PreviewSpecular1")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("PreviewDiffuse2")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("PreviewSpecular2")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("PreviewDirection0")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("PreviewDirection1")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("PreviewDirection2")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderGlowMinLuminance")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderGlowMaxExtractAlpha")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderGlowWarmthAmount")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderGlowLumWeights")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderGlowWarmthWeights")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderGlowResolutionPow")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderGlowIterations")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderGlowWidth")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderGlowStrength")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderDepthOfField")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("CameraFocusTransitionTime")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("CameraFNumber")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("CameraFocalLength")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("CameraFieldOfView")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderShadowNoise")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderShadowBlurSize")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderSSAOScale")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderSSAOMaxScale")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderSSAOFactor")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderSSAOEffect")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderShadowOffsetError")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderShadowBiasError")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderShadowOffset")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderShadowBias")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderSpotShadowOffset")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderSpotShadowBias")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderEdgeDepthCutoff")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderEdgeNormCutoff")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderShadowGaussian")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderShadowBlurDistFactor")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderDeferredAtmospheric")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderReflectionDetail")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderHighlightFadeTime")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderShadowClipPlanes")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderShadowOrthoClipPlanes")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderShadowNearDist")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderFarClip")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderShadowSplitExponent")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderShadowErrorCutoff")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("RenderShadowFOVCutoff")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("CameraOffset")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("CameraMaxCoF")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
+ gSavedSettings.getControl("CameraDoFResScale")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
}
LLPipeline::~LLPipeline()
@@ -707,7 +793,6 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
{
refreshCachedSettings();
- refreshRenderDeferred();
// remember these dimensions
mScreenWidth = resX;
@@ -840,12 +925,6 @@ void LLPipeline::updateRenderDeferred()
}
//static
-void LLPipeline::refreshRenderDeferred()
-{
- updateRenderDeferred();
-}
-
-//static
void LLPipeline::refreshCachedSettings()
{
LLPipeline::sAutoMaskAlphaDeferred = gSavedSettings.getBOOL("RenderAutoMaskAlphaDeferred");
@@ -933,6 +1012,8 @@ void LLPipeline::refreshCachedSettings()
CameraOffset = gSavedSettings.getBOOL("CameraOffset");
CameraMaxCoF = gSavedSettings.getF32("CameraMaxCoF");
CameraDoFResScale = gSavedSettings.getF32("CameraDoFResScale");
+
+ updateRenderDeferred();
}
void LLPipeline::releaseGLBuffers()
@@ -6159,13 +6240,13 @@ void LLPipeline::resetVertexBuffers()
LLVertexBuffer::initClass(LLVertexBuffer::sEnableVBOs, LLVertexBuffer::sDisableVBOMapping);
}
-void LLPipeline::renderObjects(U32 type, U32 mask, BOOL texture)
+void LLPipeline::renderObjects(U32 type, U32 mask, BOOL texture, BOOL batch_texture)
{
LLMemType mt_ro(LLMemType::MTYPE_PIPELINE_RENDER_OBJECTS);
assertInitialized();
gGL.loadMatrix(gGLModelView);
gGLLastMatrix = NULL;
- mSimplePool->pushBatches(type, mask);
+ mSimplePool->pushBatches(type, mask, texture, batch_texture);
gGL.loadMatrix(gGLModelView);
gGLLastMatrix = NULL;
}
@@ -7027,13 +7108,12 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 n
cube_map->enable(channel);
cube_map->bind();
F32* m = gGLModelView;
-
-
+
F32 mat[] = { m[0], m[1], m[2],
m[4], m[5], m[6],
m[8], m[9], m[10] };
- shader.uniform3fv(LLShaderMgr::DEFERRED_ENV_MAT, 3, mat);
+ shader.uniformMatrix3fv(LLShaderMgr::DEFERRED_ENV_MAT, 1, TRUE, mat);
}
}
@@ -8195,7 +8275,14 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera
}
LLPipeline::sShadowRender = TRUE;
- U32 types[] = { LLRenderPass::PASS_SIMPLE, LLRenderPass::PASS_FULLBRIGHT, LLRenderPass::PASS_SHINY, LLRenderPass::PASS_BUMP, LLRenderPass::PASS_FULLBRIGHT_SHINY };
+ U32 types[] = {
+ LLRenderPass::PASS_SIMPLE,
+ LLRenderPass::PASS_FULLBRIGHT,
+ LLRenderPass::PASS_SHINY,
+ LLRenderPass::PASS_BUMP,
+ LLRenderPass::PASS_FULLBRIGHT_SHINY
+ };
+
LLGLEnable cull(GL_CULL_FACE);
if (use_shader)
@@ -8267,7 +8354,15 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera
LLFastTimer ftm(FTM_SHADOW_ALPHA);
gDeferredShadowAlphaMaskProgram.bind();
gDeferredShadowAlphaMaskProgram.setMinimumAlpha(0.598f);
- renderObjects(LLRenderPass::PASS_ALPHA_SHADOW, LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_COLOR, TRUE);
+
+ U32 mask = LLVertexBuffer::MAP_VERTEX |
+ LLVertexBuffer::MAP_TEXCOORD0 |
+ LLVertexBuffer::MAP_COLOR |
+ LLVertexBuffer::MAP_TEXTURE_INDEX;
+
+ renderObjects(LLRenderPass::PASS_ALPHA_MASK, mask, TRUE, TRUE);
+ renderObjects(LLRenderPass::PASS_FULLBRIGHT_ALPHA_MASK, mask, TRUE, TRUE);
+ renderObjects(LLRenderPass::PASS_ALPHA, mask, TRUE, TRUE);
gDeferredTreeShadowProgram.bind();
gDeferredTreeShadowProgram.setMinimumAlpha(0.598f);
renderObjects(LLRenderPass::PASS_GRASS, LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0, TRUE);
@@ -8589,7 +8684,9 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
LLPipeline::RENDER_TYPE_TERRAIN,
LLPipeline::RENDER_TYPE_WATER,
LLPipeline::RENDER_TYPE_VOIDWATER,
- LLPipeline::RENDER_TYPE_PASS_ALPHA_SHADOW,
+ LLPipeline::RENDER_TYPE_PASS_ALPHA,
+ LLPipeline::RENDER_TYPE_PASS_ALPHA_MASK,
+ LLPipeline::RENDER_TYPE_PASS_FULLBRIGHT_ALPHA_MASK,
LLPipeline::RENDER_TYPE_PASS_GRASS,
LLPipeline::RENDER_TYPE_PASS_SIMPLE,
LLPipeline::RENDER_TYPE_PASS_BUMP,
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 8b6532ca25..2815d736e4 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -231,7 +231,7 @@ public:
void postSort(LLCamera& camera);
void forAllVisibleDrawables(void (*func)(LLDrawable*));
- void renderObjects(U32 type, U32 mask, BOOL texture = TRUE);
+ void renderObjects(U32 type, U32 mask, BOOL texture = TRUE, BOOL batch_texture = FALSE);
void renderGroups(LLRenderPass* pass, U32 type, U32 mask, BOOL texture);
void grabReferences(LLCullResult& result);
@@ -359,7 +359,6 @@ public:
static BOOL getRenderHighlights(void* data);
static void updateRenderDeferred();
- static void refreshRenderDeferred();
static void refreshCachedSettings();
static void throttleNewMemoryAllocation(BOOL disable);
@@ -408,7 +407,6 @@ public:
RENDER_TYPE_PASS_ALPHA = LLRenderPass::PASS_ALPHA,
RENDER_TYPE_PASS_ALPHA_MASK = LLRenderPass::PASS_ALPHA_MASK,
RENDER_TYPE_PASS_FULLBRIGHT_ALPHA_MASK = LLRenderPass::PASS_FULLBRIGHT_ALPHA_MASK,
- RENDER_TYPE_PASS_ALPHA_SHADOW = LLRenderPass::PASS_ALPHA_SHADOW,
// Following are object types (only used in drawable mRenderType)
RENDER_TYPE_HUD = LLRenderPass::NUM_RENDER_TYPES,
RENDER_TYPE_VOLUME,
diff --git a/indra/newview/skins/default/xui/da/floater_camera.xml b/indra/newview/skins/default/xui/da/floater_camera.xml
index 5b7ef6db54..b5d5e8bc08 100644
--- a/indra/newview/skins/default/xui/da/floater_camera.xml
+++ b/indra/newview/skins/default/xui/da/floater_camera.xml
@@ -9,15 +9,6 @@
<floater.string name="move_tooltip">
Flyt kamera op og ned, til venstre og højre
</floater.string>
- <floater.string name="camera_modes_title">
- Kamera valg
- </floater.string>
- <floater.string name="pan_mode_title">
- Kredsløb zoom panorering
- </floater.string>
- <floater.string name="presets_mode_title">
- Forvalg
- </floater.string>
<floater.string name="free_mode_title">
Se objekt
</floater.string>
diff --git a/indra/newview/skins/default/xui/da/notifications.xml b/indra/newview/skins/default/xui/da/notifications.xml
index 3ccdfc036a..cf6f1ccdd9 100644
--- a/indra/newview/skins/default/xui/da/notifications.xml
+++ b/indra/newview/skins/default/xui/da/notifications.xml
@@ -438,7 +438,7 @@ Tilbyd venskab til [NAME]?
</form>
</notification>
<notification name="RemoveFromFriends">
- Ønsker du at fjerne [NAME] fra din venneliste?
+ Ønsker du at fjerne &lt;nolink&gt;[NAME]&lt;/nolink&gt; fra din venneliste?
</notification>
<notification name="ConfirmItemDeleteHasLinks">
Mindst en af genstandene har lænkede genstande der peger på den. Hvis du sletter denne genstand, vil lænkninger ikke virke mere. Det anbefales kraftigt at fjerne lænkninger først.
@@ -1023,10 +1023,10 @@ Henvis til dette fra en hjemmeside for at give andre nem adgang til denne lokati
Erstattet manglende tøj/kropsdele med standard.
</notification>
<notification name="FriendOnline">
- [NAME] er logget på
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; er logget på
</notification>
<notification name="FriendOffline">
- [NAME] er logget af
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; er logget af
</notification>
<notification name="AddSelfFriend">
Selvom du nok er meget sød, kan du ikke tilføje dig selv som ven.
@@ -1404,10 +1404,10 @@ Prøv igen om lidt.
(Som udgangspunkt, vil du være i stand til at se den andens online status)
</notification>
<notification name="FriendshipAccepted">
- [NAME] accepterede dit tilbud om venskab.
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; accepterede dit tilbud om venskab.
</notification>
<notification name="FriendshipDeclined">
- [NAME] afviste dit tilbud om venskab.
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; afviste dit tilbud om venskab.
</notification>
<notification name="FriendshipAcceptedByMe">
Tilbud om venskab accepteret.
diff --git a/indra/newview/skins/default/xui/da/panel_my_profile.xml b/indra/newview/skins/default/xui/da/panel_my_profile.xml
deleted file mode 100644
index 94da58389f..0000000000
--- a/indra/newview/skins/default/xui/da/panel_my_profile.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Profil" name="panel_profile">
- <string name="no_partner_text" value="Ingen"/>
- <string name="no_group_text" value="Ingen"/>
- <string 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">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="scroll_content_panel">
- <panel name="second_life_image_panel">
- <text name="display_name_descr_text">
- Brugernavn
- </text>
- <text name="name_descr_text">
- Visningsnavn
- </text>
- <button label="Profil" name="see_profile_btn" tool_tip="Se profil for denne avatar"/>
- </panel>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/da/panel_notes.xml b/indra/newview/skins/default/xui/da/panel_notes.xml
deleted file mode 100644
index 7d8097f6ff..0000000000
--- a/indra/newview/skins/default/xui/da/panel_notes.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Noter &amp; Privatliv" name="panel_notes">
- <layout_stack name="layout">
- <layout_panel name="notes_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <text name="status_message" value="Min private noter:"/>
- <text name="status_message2" value="Tillad denne person at:"/>
- <check_box label="Se min online status" name="status_check"/>
- <check_box label="Se mig på kortet" name="map_check"/>
- <check_box label="Editére, slette og tage mine objekter" name="objects_check"/>
- </panel>
- </scroll_container>
- </layout_panel>
- <layout_panel name="notes_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="Tilføj ven" name="add_friend" tool_tip="Tilbyd venskab til beboer"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="IM" name="im" tool_tip="Åben session med personlige beskeder"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="Opkald" name="call" tool_tip="Opkald til denne beboer"/>
- </layout_panel>
- <layout_panel name="show_on_map_btn_lp">
- <button label="Kort" name="show_on_map_btn" tool_tip="Vis denne beboer på kortet"/>
- </layout_panel>
- <layout_panel name="teleport_btn_lp">
- <button label="Teleportér" name="teleport" tool_tip="Tilbyd teleport"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/da/panel_profile.xml b/indra/newview/skins/default/xui/da/panel_profile.xml
deleted file mode 100644
index db85eb23a8..0000000000
--- a/indra/newview/skins/default/xui/da/panel_profile.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Profil" name="panel_profile">
- <string name="no_partner_text" value="Ingen"/>
- <string name="no_group_text" value="Ingen"/>
- <string 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">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <panel name="second_life_image_panel">
- <text name="title_sl_descr_text" value="[SECOND_LIFE]:"/>
- </panel>
- <panel name="first_life_image_panel">
- <text name="title_rw_descr_text" value="Real World:"/>
- </panel>
- <text name="title_member_text" value="Beboer siden:"/>
- <text name="title_acc_status_text" value="Konto status:"/>
- <text name="title_partner_text" value="Partner:"/>
- <panel name="partner_data_panel">
- <text initial_value="(henter)" name="partner_text"/>
- </panel>
- <text name="title_groups_text" value="Grupper:"/>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
- <layout_stack name="layout_verb_buttons">
- <layout_panel name="profile_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="Tilføj ven" name="add_friend" tool_tip="Tilbyd venskab til beboeren"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="Personlig besked" name="im" tool_tip="Åben session med personlig besked"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="Opkald" name="call" tool_tip="Opkald til denne beboer"/>
- </layout_panel>
- <layout_panel name="chat_btn_lp">
- <button label="Teleportér" name="teleport" tool_tip="Tilbyd teleport"/>
- </layout_panel>
- <layout_panel name="overflow_btn_lp">
- <menu_button label="▼" name="overflow_btn" tool_tip="Betal eller del beholdning med denne beboer"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- <layout_panel name="profile_me_buttons_panel">
- <button label="Redigér profil" name="edit_profile_btn" tool_tip="Redigér din personlige information"/>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/da/panel_profile_view.xml b/indra/newview/skins/default/xui/da/panel_profile_view.xml
deleted file mode 100644
index e6e8ca4d10..0000000000
--- a/indra/newview/skins/default/xui/da/panel_profile_view.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel name="panel_target_profile">
- <string name="status_online">
- Online
- </string>
- <string name="status_offline">
- Offline
- </string>
- <text name="display_name_label" value="Visningsnavn:"/>
- <text name="solo_username_label" value="Brugernavn:"/>
- <text name="status" value="Online"/>
- <text name="user_name_small" value="Se på mig med dette enormt ekstremt super lange navn"/>
- <button name="copy_to_clipboard" tool_tip="Kopiér til udskriftsholder"/>
- <text name="user_label" value="Brugernavn:"/>
- <tab_container name="tabs">
- <panel label="PROFIL" name="panel_profile"/>
- <panel label="FAVORITTER" name="panel_picks"/>
- <panel label="NOTER &amp; PRIVATLIV" name="panel_notes"/>
- </tab_container>
-</panel>
diff --git a/indra/newview/skins/default/xui/da/strings.xml b/indra/newview/skins/default/xui/da/strings.xml
index 165d47c931..11d100eeff 100644
--- a/indra/newview/skins/default/xui/da/strings.xml
+++ b/indra/newview/skins/default/xui/da/strings.xml
@@ -560,6 +560,9 @@ Prøv venligst om lidt igen.
<string name="mesh">
mesh
</string>
+ <string name="AvatarEditingAppearance">
+ (Redigering Udseende)
+ </string>
<string name="AvatarAway">
Væk
</string>
diff --git a/indra/newview/skins/default/xui/de/floater_camera.xml b/indra/newview/skins/default/xui/de/floater_camera.xml
index bbf1c8af60..7e9ebdb643 100644
--- a/indra/newview/skins/default/xui/de/floater_camera.xml
+++ b/indra/newview/skins/default/xui/de/floater_camera.xml
@@ -9,15 +9,6 @@
<floater.string name="move_tooltip">
Kamera nach oben, unten, links und rechts bewegen
</floater.string>
- <floater.string name="camera_modes_title">
- Kameramodi
- </floater.string>
- <floater.string name="pan_mode_title">
- Kreisen - Zoomen - Schwenken
- </floater.string>
- <floater.string name="presets_mode_title">
- Ansichten
- </floater.string>
<floater.string name="free_mode_title">
Objekt ansehen
</floater.string>
diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml
index fc38608df5..72e7ec8eb4 100644
--- a/indra/newview/skins/default/xui/de/notifications.xml
+++ b/indra/newview/skins/default/xui/de/notifications.xml
@@ -992,7 +992,7 @@ Sie sind nicht berechtigt, Land für die aktive Gruppe zu kaufen.
</form>
</notification>
<notification name="RemoveFromFriends">
- Möchten Sie [NAME] aus Ihrer Freundesliste entfernen?
+ Möchten Sie &lt;nolink&gt;[NAME]&lt;/nolink&gt; aus Ihrer Freundesliste entfernen?
<usetemplate name="okcancelbuttons" notext="Abbrechen" yestext="OK"/>
</notification>
<notification name="RemoveMultipleFromFriends">
@@ -2134,10 +2134,10 @@ Hierzu wird Ihr Webbrowser geöffnet.
Betreff: [SUBJECT], Nachricht: [MESSAGE]
</notification>
<notification name="FriendOnline">
- [NAME] ist online
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; ist online
</notification>
<notification name="FriendOffline">
- [NAME] ist offline
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; ist offline
</notification>
<notification name="AddSelfFriend">
Obwohl Sie ein sehr netter Mensch sind, können Sie sich nicht selbst als Freund hinzufügen.
@@ -2532,10 +2532,10 @@ Versuchen Sie es in einigen Minuten erneut.
</form>
</notification>
<notification name="FriendshipAccepted">
- [NAME] hat Ihr Freundschaftsangebot akzeptiert.
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; hat Ihr Freundschaftsangebot akzeptiert.
</notification>
<notification name="FriendshipDeclined">
- [NAME] hat Ihr Freundschaftsangebot abgelehnt.
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; hat Ihr Freundschaftsangebot abgelehnt.
</notification>
<notification name="FriendshipAcceptedByMe">
Ihr Freundschaftsangebot wurde angeommen.
diff --git a/indra/newview/skins/default/xui/de/panel_my_profile.xml b/indra/newview/skins/default/xui/de/panel_my_profile.xml
deleted file mode 100644
index 89a4dfdaba..0000000000
--- a/indra/newview/skins/default/xui/de/panel_my_profile.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Profil" name="panel_profile">
- <string name="CaptionTextAcctInfo">
- [ACCTTYPE]
-[PAYMENTINFO] [AGEVERIFICATION]
- </string>
- <string name="payment_update_link_url">
- http://www.secondlife.com/account/billing.php?lang=de-DE
- </string>
- <string name="partner_edit_link_url">
- http://www.secondlife.com/account/partners.php?lang=de
- </string>
- <string name="my_account_link_url" value="http://secondlife.com/my/account/index.php?lang=de-DE"/>
- <string name="no_partner_text" value="Keiner"/>
- <string name="no_group_text" value="Keiner"/>
- <string 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">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="scroll_content_panel">
- <panel name="second_life_image_panel">
- <text name="display_name_descr_text">
- Benutzername
- </text>
- <text name="name_descr_text">
- Anzeigename
- </text>
- <button label="Profil" name="see_profile_btn" tool_tip="Profil zu diesem Avatar anzeigen"/>
- </panel>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/de/panel_notes.xml b/indra/newview/skins/default/xui/de/panel_notes.xml
deleted file mode 100644
index ef1961b63d..0000000000
--- a/indra/newview/skins/default/xui/de/panel_notes.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Notizen &amp; Privatsphäre" name="panel_notes">
- <layout_stack name="layout">
- <layout_panel name="notes_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <text name="status_message" value="Meine Notizen:"/>
- <text name="status_message2" value="Diese Person kann:"/>
- <check_box label="meinen Online-Status sehen." name="status_check"/>
- <check_box label="mich auf der Karte sehen." name="map_check"/>
- <check_box label="meine Objekte bearbeiten, löschen oder nehmen." name="objects_check"/>
- </panel>
- </scroll_container>
- </layout_panel>
- <layout_panel name="notes_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="Freund hinzufügen" name="add_friend" tool_tip="Dem Einwohner die Freundschaft anbieten"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="IM" name="im" tool_tip="Instant Messenger öffnen"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="Anrufen" name="call" tool_tip="Diesen Einwohner anrufen"/>
- </layout_panel>
- <layout_panel name="show_on_map_btn_lp">
- <button label="Karte" name="show_on_map_btn" tool_tip="Einwohner auf Karte anzeigen"/>
- </layout_panel>
- <layout_panel name="teleport_btn_lp">
- <button label="Teleportieren" name="teleport" tool_tip="Teleport anbieten"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/de/panel_profile.xml b/indra/newview/skins/default/xui/de/panel_profile.xml
deleted file mode 100644
index b4c6e67108..0000000000
--- a/indra/newview/skins/default/xui/de/panel_profile.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Profil" name="panel_profile">
- <string name="CaptionTextAcctInfo">
- [ACCTTYPE]
-[PAYMENTINFO] [AGEVERIFICATION]
- </string>
- <string name="payment_update_link_url">
- http://www.secondlife.com/account/billing.php?lang=de-DE
- </string>
- <string name="partner_edit_link_url">
- http://www.secondlife.com/account/partners.php?lang=de
- </string>
- <string name="my_account_link_url" value="http://secondlife.com/my/account/index.php?lang=de-DE"/>
- <string name="no_partner_text" value="Keiner"/>
- <string name="no_group_text" value="Keiner"/>
- <string 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">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <panel name="second_life_image_panel">
- <text name="title_sl_descr_text" value="[SECOND_LIFE]:"/>
- </panel>
- <panel name="first_life_image_panel">
- <text name="title_rw_descr_text" value="Echtes Leben:"/>
- </panel>
- <text name="title_member_text" value="Einwohner seit:"/>
- <text name="title_acc_status_text" value="Kontostatus:"/>
- <text_editor name="acc_status_text">
- Einwohner. Keine Zahlungsinfo archiviert.
- Linden.
- </text_editor>
- <text name="title_partner_text" value="Partner:"/>
- <panel name="partner_data_panel">
- <text initial_value="(wird in Datenbank gesucht)" name="partner_text"/>
- </panel>
- <text name="title_groups_text" value="Gruppen:"/>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
- <layout_stack name="layout_verb_buttons">
- <layout_panel name="profile_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="Freund hinzufügen" name="add_friend" tool_tip="Dem Einwohner die Freundschaft anbieten"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="IM" name="im" tool_tip="Instant Messenger öffnen"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="Anrufen" name="call" tool_tip="Diesen Einwohner anrufen"/>
- </layout_panel>
- <layout_panel name="chat_btn_lp">
- <button label="Teleportieren" name="teleport" tool_tip="Teleport anbieten"/>
- </layout_panel>
- <layout_panel name="overflow_btn_lp">
- <menu_button label="▼" name="overflow_btn" tool_tip="Dem Einwohner Geld geben oder Inventar an den Einwohner schicken"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- <layout_panel name="profile_me_buttons_panel">
- <button label="Profil bearbeiten" name="edit_profile_btn" tool_tip="Ihre persönlichen Informationen bearbeiten"/>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/de/panel_profile_view.xml b/indra/newview/skins/default/xui/de/panel_profile_view.xml
deleted file mode 100644
index 7e93bd1ede..0000000000
--- a/indra/newview/skins/default/xui/de/panel_profile_view.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel name="panel_target_profile">
- <string name="status_online">
- Online
- </string>
- <string name="status_offline">
- Offline
- </string>
- <text name="display_name_label" value="Anzeigename:"/>
- <text name="solo_username_label" value="Benutzername:"/>
- <text name="status" value="Online"/>
- <text name="user_name_small" value="Dieser Name ist ein ganz außerordentlich langer Name"/>
- <button name="copy_to_clipboard" tool_tip="In Zwischenablage kopieren"/>
- <text name="user_label" value="Benutzername:"/>
- <tab_container name="tabs" tab_min_width="60">
- <panel label="PROFIL" name="panel_profile"/>
- <panel label="AUSWAHL" name="panel_picks"/>
- <panel label="NOTIZEN &amp; PRIVATSPHÄRE" name="panel_notes"/>
- </tab_container>
-</panel>
diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml
index 1c7b354221..4772f744ea 100644
--- a/indra/newview/skins/default/xui/en/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/en/floater_about_land.xml
@@ -1208,7 +1208,7 @@ Only large parcels can be listed in search.
</panel.string>
<panel.string
name="see_avs_text">
- See and chat with residents on this parcel
+ Avatars on other parcels can see
</panel.string>
<text
type="string"
@@ -1223,30 +1223,33 @@ Only large parcels can be listed in search.
width="278">
Allow other Residents to:
</text>
- <check_box
- height="16"
- label="Edit Terrain"
- layout="topleft"
- left="14"
- name="edit land check"
- tool_tip="If checked, anyone can terraform your land. It is best to leave this unchecked, as you can always edit your own land."
- top_pad="4"
- width="147i" />
- <check_box
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left="20"
+ name="allow_label0"
+ width="150">
+ Fly:
+ </text>
+
+ <check_box
height="16"
- label="Fly"
+ label="Everyone"
layout="topleft"
name="check fly"
tool_tip="If checked, Residents can fly on your land. If unchecked, they can only fly into and over your land."
- left_pad="4"
- width="150" />
+ left_pad="2"
+ width="130" />
<text
type="string"
length="1"
follows="left|top"
height="16"
layout="topleft"
- left="14"
+ left="20"
name="allow_label2"
width="150">
Build:
@@ -1271,7 +1274,7 @@ Only large parcels can be listed in search.
follows="left|top"
height="16"
layout="topleft"
- left="14"
+ left="20"
name="allow_label3"
width="150">
Object Entry:
@@ -1298,7 +1301,7 @@ Only large parcels can be listed in search.
follows="left|top"
height="16"
layout="topleft"
- left="14"
+ left="20"
name="allow_label4"
width="150">
Run Scripts:
@@ -1319,49 +1322,47 @@ Only large parcels can be listed in search.
name="check group scripts"
top_delta="0"
width="70" />
- <text
- type="string"
- text_color="white"
- length="1"
- follows="left|top"
- height="16"
- layout="topleft"
- left="10"
- name="land_options_label"
- width="278">
- Land Options:
- </text>
- <check_box
+ <panel
+ bevel_style="none"
+ border="true"
+ top="146"
+ bottom="146"
+ follows="left|bottom|right"
+ left="20"
+ right="-20"/>
+ <check_box
height="16"
label="Safe (no damage)"
layout="topleft"
- left="14"
+ left="18"
name="check safe"
tool_tip="If checked, sets the land to Safe, disabling damage combat. If cleared, damage combat is enabled."
- top_pad="5"
+ top="130"
width="200" />
<check_box
height="16"
label="No Pushing"
layout="topleft"
- left_pad="5"
+ left_pad="35"
name="PushRestrictCheck"
tool_tip="Prevents scripts from pushing. Checking this option may be useful for preventing disruptive behavior on your land."
- top_delta="0"
+ top="130"
width="119" />
<check_box
height="16"
label="Show Place in Search (L$30/week)"
layout="topleft"
- left="14"
+ left="18"
name="ShowDirectoryCheck"
tool_tip="Let people see this parcel in search results"
+ top="150"
width="430" />
<combo_box
enabled="false"
height="23"
layout="topleft"
- left="30"
+ left="20"
+ top="194"
name="land category with adult"
visible="false"
width="140">
@@ -1426,7 +1427,8 @@ Only large parcels can be listed in search.
enabled="false"
height="23"
layout="topleft"
- left="30"
+ left="20"
+ top="194"
name="land category"
visible="false"
width="140">
@@ -1487,11 +1489,11 @@ Only large parcels can be listed in search.
height="16"
label="Moderate Content"
layout="topleft"
- left="14"
+ left="18"
name="MatureCheck"
- top="177"
+ top="170"
label_text.valign="center"
- label_text.v_pad="-5"
+ label_text.v_pad="-1"
tool_tip=" "
width="200" />
<text
@@ -1500,18 +1502,19 @@ Only large parcels can be listed in search.
follows="left|top"
height="16"
layout="topleft"
- left="10"
+ left="20"
name="Snapshot:"
text_color="white"
- top="220"
+ top="225"
width="200">
Snapshot:
</text>
<texture_picker
follows="left|top"
+ top_pad="0"
height="150"
layout="topleft"
- left="14"
+ left="20"
name="snapshot_ctrl"
fallback_image="default_land_picture.j2c"
tool_tip="Click to choose a picture"
@@ -1520,23 +1523,24 @@ Only large parcels can be listed in search.
type="string"
length="1"
follows="left|top"
- text_color="white"
+ text_color="LtGray"
height="16"
layout="topleft"
- left="230"
- top="174"
+ left="274"
+ top="166"
name="allow_label5"
width="278">
- Allow Residents on other parcels to:
+ and chat with avatars on this parcel
</text>
<check_box
height="16"
label="See Avatars"
follows="top"
layout="topleft"
- left="230"
+ left="253"
+ top="150"
name="SeeAvatarsCheck"
- tool_tip="Allows residents on other parcels to see and chat with residents on this parcel, and you to see and chat with them."
+ tool_tip="Allows avatars on other parcels to see and chat with avatars on this parcel, and you to see and chat with them."
width="120" />
<text
type="string"
@@ -1544,8 +1548,8 @@ Only large parcels can be listed in search.
follows="left|top"
height="16"
layout="topleft"
- left="230"
- top="230"
+ left="255"
+ top="282"
text_color="white"
name="landing_point"
word_wrap="true"
@@ -1554,12 +1558,13 @@ Only large parcels can be listed in search.
</text>
<button
follows="right|top"
+ top_pad="0"
height="23"
label="Set"
label_selected="Set"
layout="topleft"
name="Set"
- left="230"
+ left="255"
tool_tip="Sets the landing point where visitors arrive. Sets to your avatar&apos;s location inside this parcel."
width="50" />
<button
@@ -1579,7 +1584,7 @@ Only large parcels can be listed in search.
follows="left|top"
height="16"
layout="topleft"
- left="230"
+ left="255"
top_pad="10"
name="Teleport Routing: "
width="200">
@@ -1589,7 +1594,7 @@ Only large parcels can be listed in search.
height="23"
layout="topleft"
name="landing type"
- top_pad="3"
+ top_pad="0"
tool_tip="Teleport Routing -- select how to handle teleports onto your land"
width="120">
<combo_box.item
diff --git a/indra/newview/skins/default/xui/en/floater_activeim.xml b/indra/newview/skins/default/xui/en/floater_activeim.xml
index 670c528f08..b79c5d9a19 100644
--- a/indra/newview/skins/default/xui/en/floater_activeim.xml
+++ b/indra/newview/skins/default/xui/en/floater_activeim.xml
@@ -6,7 +6,6 @@
title="ACTIVE IM"
height="22"
width="320"
- follows="right|bottom"
background_visible="true"
can_close="true"
can_dock="true"
diff --git a/indra/newview/skins/default/xui/en/floater_avatar.xml b/indra/newview/skins/default/xui/en/floater_avatar.xml
index 6009821f7f..82c3403008 100644
--- a/indra/newview/skins/default/xui/en/floater_avatar.xml
+++ b/indra/newview/skins/default/xui/en/floater_avatar.xml
@@ -15,7 +15,7 @@
help_topic="avatar"
save_rect="true"
save_visibility="true"
- title="AVATAR PICKER"
+ title="CHOOSE AN AVATAR"
width="700">
<web_browser
top="25"
diff --git a/indra/newview/skins/default/xui/en/floater_build_options.xml b/indra/newview/skins/default/xui/en/floater_build_options.xml
index afb7917043..35918e9705 100644
--- a/indra/newview/skins/default/xui/en/floater_build_options.xml
+++ b/indra/newview/skins/default/xui/en/floater_build_options.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
legacy_header_height="18"
- follows="right"
height="198"
layout="topleft"
name="build options floater"
diff --git a/indra/newview/skins/default/xui/en/floater_camera.xml b/indra/newview/skins/default/xui/en/floater_camera.xml
index e7f5207271..4673c6def5 100644
--- a/indra/newview/skins/default/xui/en/floater_camera.xml
+++ b/indra/newview/skins/default/xui/en/floater_camera.xml
@@ -1,19 +1,18 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
open_positioning="specified"
- specified_left="320"
+ specified_left="458"
specified_bottom="80"
legacy_header_height="18"
can_minimize="true"
can_close="true"
- follows="bottom"
height="164"
layout="topleft"
name="camera_floater"
help_topic="camera_floater"
save_visibility="true"
single_instance="true"
- title="VIEW"
+ title="CAMERA CONTROLS"
chrome="true"
save_rect="true"
width="228">
@@ -30,18 +29,6 @@
Move Camera Up and Down, Left and Right
</floater.string>
<floater.string
- name="camera_modes_title">
- Camera modes
- </floater.string>
- <floater.string
- name="pan_mode_title">
- Orbit Zoom Pan
- </floater.string>
- <floater.string
- name="presets_mode_title">
- Preset Views
- </floater.string>
- <floater.string
name="free_mode_title">
View Object
</floater.string>
diff --git a/indra/newview/skins/default/xui/en/floater_chat_bar.xml b/indra/newview/skins/default/xui/en/floater_chat_bar.xml
index 87606c1a2a..8d0cecdac3 100644
--- a/indra/newview/skins/default/xui/en/floater_chat_bar.xml
+++ b/indra/newview/skins/default/xui/en/floater_chat_bar.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
open_positioning="specified"
- specified_left="320"
+ specified_left="10"
specified_bottom="10"
height="60"
layout="topleft"
@@ -17,17 +17,17 @@
can_resize="true"
default_tab_group="1"
name="chat_bar"
- width="380">
+ width="300">
<panel
top="20"
class="panel_nearby_chat"
follow="all"
- width="380"
+ width="300"
height="0"
visible="false"
filename="panel_nearby_chat.xml"
name="nearby_chat" />
- <panel width="380"
+ <panel width="300"
height="31"
left="0"
bottom="-1"
@@ -48,7 +48,7 @@
text_pad_right="25"
tool_tip="Press Enter to say, Ctrl+Enter to shout"
top="2"
- width="335" />
+ width="255" />
<output_monitor
auto_update="true"
follows="right"
diff --git a/indra/newview/skins/default/xui/en/floater_color_picker.xml b/indra/newview/skins/default/xui/en/floater_color_picker.xml
index 421f3a72c6..e06d10606a 100644
--- a/indra/newview/skins/default/xui/en/floater_color_picker.xml
+++ b/indra/newview/skins/default/xui/en/floater_color_picker.xml
@@ -2,7 +2,6 @@
<floater
legacy_header_height="18"
can_minimize="false"
- follows="left|top"
height="380"
layout="topleft"
name="ColorPicker"
diff --git a/indra/newview/skins/default/xui/en/floater_event.xml b/indra/newview/skins/default/xui/en/floater_event.xml
index 7ed020f832..cf61b7d24d 100644
--- a/indra/newview/skins/default/xui/en/floater_event.xml
+++ b/indra/newview/skins/default/xui/en/floater_event.xml
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
- follows="all"
height="400"
can_resize="true"
help_topic="event_details"
diff --git a/indra/newview/skins/default/xui/en/floater_gesture.xml b/indra/newview/skins/default/xui/en/floater_gesture.xml
index a941734358..b96a94a849 100644
--- a/indra/newview/skins/default/xui/en/floater_gesture.xml
+++ b/indra/newview/skins/default/xui/en/floater_gesture.xml
@@ -9,7 +9,6 @@
help_topic="gestures"
title="GESTURES"
background_visible="true"
- follows="all"
label="Places"
layout="topleft"
min_height="350"
diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml
index cb7d91abb8..5fe8f3c114 100644
--- a/indra/newview/skins/default/xui/en/floater_im_session.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_session.xml
@@ -3,8 +3,8 @@
legacy_header_height="18"
background_visible="true"
default_tab_group="1"
- follows="all"
height="350"
+ help_topic="floater_im_box"
layout="topleft"
name="panel_im"
can_dock="false"
diff --git a/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml b/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml
index 1f192f9b28..5cd7cd196d 100644
--- a/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml
+++ b/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml
@@ -4,7 +4,6 @@
bevel_style="none"
border_style="line"
can_resize="true"
- follows="left|top"
height="580"
layout="topleft"
min_height="271"
diff --git a/indra/newview/skins/default/xui/en/floater_lsl_guide.xml b/indra/newview/skins/default/xui/en/floater_lsl_guide.xml
index c9d87f158f..e9676777f4 100644
--- a/indra/newview/skins/default/xui/en/floater_lsl_guide.xml
+++ b/indra/newview/skins/default/xui/en/floater_lsl_guide.xml
@@ -2,7 +2,6 @@
<floater
legacy_header_height="18"
can_resize="true"
- follows="left|top"
height="400"
layout="topleft"
min_height="271"
diff --git a/indra/newview/skins/default/xui/en/floater_map.xml b/indra/newview/skins/default/xui/en/floater_map.xml
index 31972d4122..3eeebcf120 100644
--- a/indra/newview/skins/default/xui/en/floater_map.xml
+++ b/indra/newview/skins/default/xui/en/floater_map.xml
@@ -4,7 +4,6 @@
can_minimize="true"
can_resize="true"
chrome="true"
- follows="top|right"
height="200"
layout="topleft"
min_height="128"
diff --git a/indra/newview/skins/default/xui/en/floater_mem_leaking.xml b/indra/newview/skins/default/xui/en/floater_mem_leaking.xml
index 28a29c42aa..fb7d09a21e 100644
--- a/indra/newview/skins/default/xui/en/floater_mem_leaking.xml
+++ b/indra/newview/skins/default/xui/en/floater_mem_leaking.xml
@@ -2,7 +2,6 @@
<floater
legacy_header_height="18"
can_minimize="false"
- follows="left|top"
height="175"
layout="topleft"
name="MemLeak"
diff --git a/indra/newview/skins/default/xui/en/floater_moveview.xml b/indra/newview/skins/default/xui/en/floater_moveview.xml
index e96039a3e1..065dab0413 100644
--- a/indra/newview/skins/default/xui/en/floater_moveview.xml
+++ b/indra/newview/skins/default/xui/en/floater_moveview.xml
@@ -1,13 +1,12 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
open_positioning="specified"
- specified_left="558"
+ specified_left="320"
specified_bottom="80"
legacy_header_height="18"
can_dock="false"
can_minimize="true"
can_close="true"
- follows="bottom"
height="110"
layout="topleft"
name="move_floater"
@@ -16,7 +15,7 @@
save_visibility="true"
single_instance="true"
chrome="true"
- title="MOVE"
+ title="WALK / RUN / FLY"
width="133">
<string
name="walk_forward_tooltip">
diff --git a/indra/newview/skins/default/xui/en/floater_my_appearance.xml b/indra/newview/skins/default/xui/en/floater_my_appearance.xml
index a40393aed8..1c4b25a7b0 100644
--- a/indra/newview/skins/default/xui/en/floater_my_appearance.xml
+++ b/indra/newview/skins/default/xui/en/floater_my_appearance.xml
@@ -12,7 +12,7 @@
single_instance="true"
reuse_instance="true"
title="APPEARANCE"
- min_height="260"
+ min_height="440"
min_width="333"
width="333">
<panel
diff --git a/indra/newview/skins/default/xui/en/floater_my_web_profile.xml b/indra/newview/skins/default/xui/en/floater_my_web_profile.xml
new file mode 100644
index 0000000000..df46fc198f
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_my_web_profile.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater name="floater_my_web_profile"
+ help_topic="web_profile"
+ width="780"
+ height="775"
+ save_rect="true"
+ single_instance="true"
+ reuse_instance="false"
+ filename="floater_web_content.xml"/> \ No newline at end of file
diff --git a/indra/newview/skins/default/xui/en/floater_people.xml b/indra/newview/skins/default/xui/en/floater_people.xml
index 32dda1b694..d6d8431150 100644
--- a/indra/newview/skins/default/xui/en/floater_people.xml
+++ b/indra/newview/skins/default/xui/en/floater_people.xml
@@ -26,10 +26,6 @@
name="panel_people"
filename="panel_people.xml"/>
<panel
- class="panel_profile_view"
- name="panel_profile_view"
- filename="panel_profile_view.xml"/>
- <panel
class="panel_group_info_sidetray"
name="panel_group_info_sidetray"
filename="panel_group_info_sidetray.xml"
diff --git a/indra/newview/skins/default/xui/en/floater_places.xml b/indra/newview/skins/default/xui/en/floater_places.xml
index 6484b54360..ccceac0a7b 100644
--- a/indra/newview/skins/default/xui/en/floater_places.xml
+++ b/indra/newview/skins/default/xui/en/floater_places.xml
@@ -11,7 +11,7 @@
save_rect="true"
reuse_instance="true"
title="PLACES"
- min_height="230"
+ min_height="440"
min_width="333"
width="333">
<panel
diff --git a/indra/newview/skins/default/xui/en/floater_preview_notecard.xml b/indra/newview/skins/default/xui/en/floater_preview_notecard.xml
index f35628f8e5..be3b2d179d 100644
--- a/indra/newview/skins/default/xui/en/floater_preview_notecard.xml
+++ b/indra/newview/skins/default/xui/en/floater_preview_notecard.xml
@@ -3,7 +3,6 @@
legacy_header_height="18"
can_resize="true"
default_tab_group="1"
- follows="left|top"
height="361"
layout="topleft"
min_height="243"
diff --git a/indra/newview/skins/default/xui/en/floater_preview_texture.xml b/indra/newview/skins/default/xui/en/floater_preview_texture.xml
index 92d3a6702c..137e278ddc 100644
--- a/indra/newview/skins/default/xui/en/floater_preview_texture.xml
+++ b/indra/newview/skins/default/xui/en/floater_preview_texture.xml
@@ -2,7 +2,6 @@
<floater
legacy_header_height="18"
can_resize="true"
- follows="left|top"
height="350"
layout="topleft"
min_height="200"
diff --git a/indra/newview/skins/default/xui/en/floater_script.xml b/indra/newview/skins/default/xui/en/floater_script.xml
index 73e6d6147a..bd4edb81c8 100644
--- a/indra/newview/skins/default/xui/en/floater_script.xml
+++ b/indra/newview/skins/default/xui/en/floater_script.xml
@@ -2,7 +2,6 @@
<floater
legacy_header_height="18"
background_visible="true"
- follows="left|top|right|bottom"
height="250"
layout="topleft"
name="script_floater"
diff --git a/indra/newview/skins/default/xui/en/floater_script_debug_panel.xml b/indra/newview/skins/default/xui/en/floater_script_debug_panel.xml
index ce96ea232e..b5dd2f97b9 100644
--- a/indra/newview/skins/default/xui/en/floater_script_debug_panel.xml
+++ b/indra/newview/skins/default/xui/en/floater_script_debug_panel.xml
@@ -2,7 +2,6 @@
<floater
legacy_header_height="18"
can_resize="true"
- follows="left|top|right|bottom"
height="200"
layout="topleft"
name="script"
diff --git a/indra/newview/skins/default/xui/en/floater_snapshot.xml b/indra/newview/skins/default/xui/en/floater_snapshot.xml
index 61f2e7e72d..0c38283d59 100644
--- a/indra/newview/skins/default/xui/en/floater_snapshot.xml
+++ b/indra/newview/skins/default/xui/en/floater_snapshot.xml
@@ -4,7 +4,6 @@
legacy_header_height="18"
can_minimize="true"
can_close="true"
- follows="left|top"
height="500"
layout="topleft"
name="Snapshot"
@@ -35,7 +34,7 @@
</string>
<string
name="profile_succeeded_str">
- Profile feed updated!
+ Image uploaded
</string>
<string
name="postcard_succeeded_str">
@@ -51,7 +50,7 @@
</string>
<string
name="profile_failed_str">
- Failed to update your Profile Feed.
+ Failed to upload image to your Profile Feed.
</string>
<string
name="postcard_failed_str">
diff --git a/indra/newview/skins/default/xui/en/floater_stats.xml b/indra/newview/skins/default/xui/en/floater_stats.xml
index 406114294d..2fd932786b 100644
--- a/indra/newview/skins/default/xui/en/floater_stats.xml
+++ b/indra/newview/skins/default/xui/en/floater_stats.xml
@@ -2,7 +2,6 @@
<floater
legacy_header_height="18"
can_resize="true"
- follows="top|right"
height="400"
layout="topleft"
name="Statistics"
diff --git a/indra/newview/skins/default/xui/en/floater_sys_well.xml b/indra/newview/skins/default/xui/en/floater_sys_well.xml
index 9b96a5badc..ecedb27438 100644
--- a/indra/newview/skins/default/xui/en/floater_sys_well.xml
+++ b/indra/newview/skins/default/xui/en/floater_sys_well.xml
@@ -2,7 +2,6 @@
<floater
legacy_header_height="18"
bevel_style="in"
- follows="right|bottom"
layout="topleft"
name="sys_well_window"
help_topic="notification_chiclet"
diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml
index 1808cab2a5..f9147ea650 100644
--- a/indra/newview/skins/default/xui/en/floater_tools.xml
+++ b/indra/newview/skins/default/xui/en/floater_tools.xml
@@ -2,7 +2,6 @@
<floater
open_positioning="cascading"
legacy_header_height="18"
- follows="left|top|right"
height="580"
layout="topleft"
bg_opaque_image="Window_NoTitle_Foreground"
@@ -791,6 +790,7 @@
tab_min_width="40"
tab_position="top"
tab_height="25"
+ open_tabs_on_drag_and_drop="true"
top="173"
width="295">
diff --git a/indra/newview/skins/default/xui/en/floater_voice_effect.xml b/indra/newview/skins/default/xui/en/floater_voice_effect.xml
index 2c754cd8d0..77fb21e27c 100644
--- a/indra/newview/skins/default/xui/en/floater_voice_effect.xml
+++ b/indra/newview/skins/default/xui/en/floater_voice_effect.xml
@@ -7,7 +7,6 @@
help_topic="voice_effects"
title="VOICE MORPHING"
background_visible="true"
- follows="all"
label="Places"
layout="topleft"
min_height="360"
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index c8c1922bf6..1834be2d48 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -9,14 +9,6 @@
name="Me"
tear_off="true">
<menu_item_call
- label="Dashboard..."
- name="Manage My Account">
- <menu_item_call.on_click
- function="PromptShowURL"
- name="ManageMyAccount_url"
- parameter="WebLaunchJoinNow,http://secondlife.com/account/" />
- </menu_item_call>
- <menu_item_call
label="Profile..."
name="Profile">
<menu_item_call.on_click
@@ -31,6 +23,14 @@
<menu_item_call.on_enable
function="Edit.EnableCustomizeAvatar" />
</menu_item_call>
+ <menu_item_call
+ label="Choose an avatar..."
+ name="Avatar Picker">
+ <menu_item_call.on_click
+ function="Floater.ToggleOrBringToFront"
+ parameter="avatar" />
+ </menu_item_call>
+ <menu_item_separator/>
<menu_item_check
label="Inventory..."
name="Inventory"
@@ -52,29 +52,28 @@
function="Inventory.NewWindow"
parameter="" />
</menu_item_call>
- <menu_item_check
- label="Gestures..."
- name="Gestures"
- shortcut="control|G">
- <menu_item_check.on_check
- function="Floater.Visible"
- parameter="gestures" />
- <menu_item_check.on_click
- function="Floater.Toggle"
- parameter="gestures" />
- </menu_item_check>
- <menu_item_check
- label="Voice..."
- name="ShowVoice"
- visibility_control="VoiceMorphingEnabled">
- <menu_item_check.on_check
- function="Floater.Visible"
- Parameter="voice_effect" />
- <menu_item_check.on_click
- function="Floater.Toggle"
- parameter="voice_effect" />
- </menu_item_check>
-
+ <menu_item_call
+ label="Places..."
+ name="Places">
+ <menu_item_call.on_click
+ function="Floater.ToggleOrBringToFront"
+ parameter="places" />
+ </menu_item_call>
+ <menu_item_call
+ label="Picks..."
+ name="Picks">
+ <menu_item_call.on_click
+ function="Floater.ToggleOrBringToFront"
+ parameter="picks" />
+ </menu_item_call>
+ <menu_item_separator/>
+ <menu_item_call
+ label="Camera Controls..."
+ name="Camera Controls">
+ <menu_item_call.on_click
+ function="Floater.ToggleOrBringToFront"
+ parameter="camera" />
+ </menu_item_call>
<menu
create_jump_keys="true"
label="Movement"
@@ -117,6 +116,13 @@
<menu_item_call.on_click
function="Tools.StopAllAnimations" />
</menu_item_call>
+ <menu_item_call
+ label="Walk / run / fly..."
+ name="Stop Animating My Avatar">
+ <menu_item_call.on_click
+ function="Floater.ToggleOrBringToFront"
+ parameter="moveview" />
+ </menu_item_call>
</menu>
<menu
@@ -163,6 +169,14 @@
<menu_item_call.on_click
function="BuyCurrency" />
</menu_item_call>
+ <menu_item_call
+ label="Account dashboard..."
+ name="Manage My Account">
+ <menu_item_call.on_click
+ function="PromptShowURL"
+ name="ManageMyAccount_url"
+ parameter="WebLaunchJoinNow,http://secondlife.com/account/" />
+ </menu_item_call>
<menu_item_separator/>
@@ -205,33 +219,8 @@
label="Communicate"
name="Communicate"
tear_off="true">
- <menu_item_call
- label="My Friends"
- name="My Friends"
- shortcut="control|shift|F">
- <menu_item_call.on_click
- function="SideTray.PanelPeopleTab"
- parameter="friends_panel" />
- </menu_item_call>
- <menu_item_call
- label="My Groups"
- name="My Groups"
- shortcut="control|shift|G">
- <menu_item_call.on_click
- function="SideTray.PanelPeopleTab"
- parameter="groups_panel" />
- </menu_item_call>
-
- <menu_item_separator/>
-
- <!--menu_item_call
- label="Chat"
- name="Chat">
- <menu_item_call.on_click
- function="World.Chat" />
- </menu_item_call-->
<menu_item_check
- label="Nearby Chat"
+ label="Chat..."
name="Nearby Chat"
shortcut="control|H"
use_mac_ctrl="true">
@@ -242,16 +231,21 @@
function="Floater.Toggle"
parameter="chat_bar" />
</menu_item_check>
- <menu_item_call
- label="Nearby People"
- name="Active Speakers"
- shortcut="control|shift|A">
- <menu_item_call.on_click
- function="SideTray.PanelPeopleTab"
- parameter="nearby_panel" />
- </menu_item_call>
<menu_item_check
- label="Nearby Voice"
+ label="Speak"
+ name="Speak">
+ <menu_item_check.on_check
+ function="Agent.IsMicrophoneOn"
+ parameter="speak" />
+ <menu_item_check.on_enable
+ function="Agent.IsActionAllowed"
+ parameter="speak" />
+ <menu_item_check.on_click
+ function="Agent.ToggleMicrophone"
+ parameter="speak" />
+ </menu_item_check>
+ <menu_item_check
+ label="Voice settings..."
name="Nearby Voice">
<menu_item_check.on_check
function="Floater.Visible"
@@ -260,12 +254,86 @@
function="Floater.Toggle"
parameter="voice_controls" />
</menu_item_check>
+ <menu_item_check
+ label="Voice morphing..."
+ name="ShowVoice"
+ visibility_control="VoiceMorphingEnabled">
+ <menu_item_check.on_check
+ function="Floater.Visible"
+ parameter="voice_effect" />
+ <menu_item_check.on_click
+ function="Floater.Toggle"
+ parameter="voice_effect" />
+ </menu_item_check>
+ <menu_item_check
+ label="Gestures..."
+ name="Gestures"
+ shortcut="control|G">
+ <menu_item_check.on_check
+ function="Floater.Visible"
+ parameter="gestures" />
+ <menu_item_check.on_click
+ function="Floater.Toggle"
+ parameter="gestures" />
+ </menu_item_check>
+ <menu_item_separator/>
+ <menu_item_call
+ label="Friends"
+ name="My Friends"
+ shortcut="control|shift|F">
+ <menu_item_call.on_click
+ function="SideTray.PanelPeopleTab"
+ parameter="friends_panel" />
+ </menu_item_call>
+ <menu_item_call
+ label="Groups"
+ name="My Groups"
+ shortcut="control|shift|G">
+ <menu_item_call.on_click
+ function="SideTray.PanelPeopleTab"
+ parameter="groups_panel" />
+ </menu_item_call>
+ <menu_item_call
+ label="Nearby people"
+ name="Active Speakers"
+ shortcut="control|shift|A">
+ <menu_item_call.on_click
+ function="SideTray.PanelPeopleTab"
+ parameter="nearby_panel" />
+ </menu_item_call>
</menu>
<menu
create_jump_keys="true"
label="World"
name="World"
tear_off="true">
+ <menu_item_call
+ label="Landmark This Place"
+ name="Create Landmark Here">
+ <menu_item_call.on_click
+ function="World.CreateLandmark" />
+ <menu_item_call.on_enable
+ function="World.EnableCreateLandmark" />
+ </menu_item_call>
+ <menu_item_call
+ label="Destinations..."
+ name="Destinations">
+ <menu_item_call.on_click
+ function="Floater.ToggleOrBringToFront"
+ parameter="destinations" />
+ </menu_item_call>
+ <menu_item_check
+ label="World map"
+ name="World Map"
+ shortcut="control|M"
+ use_mac_ctrl="true">
+ <menu_item_check.on_check
+ function="Floater.Visible"
+ parameter="world_map" />
+ <menu_item_check.on_click
+ function="Floater.Toggle"
+ parameter="world_map" />
+ </menu_item_check>
<menu_item_check
label="Mini-map"
name="Mini-Map"
@@ -277,18 +345,6 @@
function="Floater.Toggle"
parameter="mini_map" />
</menu_item_check>
- <menu_item_check
- label="World Map"
- name="World Map"
- shortcut="control|M"
- use_mac_ctrl="true">
- <menu_item_check.on_check
- function="Floater.Visible"
- parameter="world_map" />
- <menu_item_check.on_click
- function="Floater.Toggle"
- parameter="world_map" />
- </menu_item_check>
<menu_item_check
label="Search"
name="Search"
@@ -300,6 +356,25 @@
function="Floater.Toggle"
parameter="search" />
</menu_item_check>
+ <menu_item_separator/>
+ <menu_item_call
+ label="Teleport home"
+ name="Teleport Home"
+ shortcut="control|shift|H">
+ <menu_item_call.on_click
+ function="World.TeleportHome" />
+ <menu_item_call.on_enable
+ function="World.EnableTeleportHome" />
+ </menu_item_call>
+ <menu_item_call
+ label="Set home to here"
+ name="Set Home to Here">
+ <menu_item_call.on_click
+ function="World.SetHomeLocation" />
+ <menu_item_call.on_enable
+ function="World.EnableSetHomeLocation" />
+ </menu_item_call>
+ <menu_item_separator/>
<menu_item_call
label="Snapshot"
name="Take Snapshot"
@@ -308,82 +383,51 @@
function="Floater.Show"
parameter="snapshot" />
</menu_item_call>
- <menu_item_call
- label="Landmark This Place"
- name="Create Landmark Here">
- <menu_item_call.on_click
- function="World.CreateLandmark" />
- <menu_item_call.on_enable
- function="World.EnableCreateLandmark" />
- </menu_item_call>
- <menu
- create_jump_keys="true"
- label="Place Profile"
- name="Land"
- tear_off="true">
+ <menu_item_separator/>
<menu_item_call
- label="Place Profile"
+ label="Place profile"
layout="topleft"
name="Place Profile">
<menu_item_call.on_click
function="World.PlaceProfile" />
</menu_item_call>
<menu_item_call
- label="About Land"
+ label="About land"
name="About Land">
<menu_item_call.on_click
function="Floater.Show"
parameter="about_land" />
</menu_item_call>
<menu_item_call
- label="Region/Estate"
+ label="Region / Estate"
name="Region/Estate">
<menu_item_call.on_click
function="Floater.Show"
parameter="region_info" />
</menu_item_call>
- </menu>
+ <menu_item_call
+ label="My land holdings..."
+ name="My Land">
+ <menu_item_call.on_click
+ function="Floater.Show"
+ parameter="land_holdings" />
+ </menu_item_call>
+ <menu_item_call
+ label="Buy this land"
+ name="Buy Land">
+ <menu_item_call.on_click
+ function="Land.Buy" />
+ <menu_item_call.on_enable
+ function="World.EnableBuyLand" />
+ </menu_item_call>
<menu_item_separator/>
- <menu_item_call
- label="Buy This Land"
- name="Buy Land">
- <menu_item_call.on_click
- function="Land.Buy" />
- <menu_item_call.on_enable
- function="World.EnableBuyLand" />
- </menu_item_call>
- <menu_item_call
- label="My Land"
- name="My Land">
- <menu_item_call.on_click
- function="Floater.Show"
- parameter="land_holdings" />
- </menu_item_call>
<menu
create_jump_keys="true"
label="Show"
name="LandShow"
tear_off="true">
- <menu_item_check
- label="Move Controls"
- name="Movement Controls">
- <menu_item_check.on_check
- function="Floater.Visible"
- parameter="moveview" />
- <menu_item_check.on_click
- function="World.Toggle.MovementControls" />
- </menu_item_check>
- <menu_item_check
- label="View Controls"
- name="Camera Controls">
- <menu_item_check.on_check
- function="Floater.Visible"
- parameter="camera" />
- <menu_item_check.on_click
- function="World.Toggle.CameraControls" />
- </menu_item_check>
<menu_item_check
label="Ban Lines"
name="Ban Lines">
@@ -456,24 +500,6 @@
</menu>
<menu_item_separator/>
-
- <menu_item_call
- label="Teleport Home"
- name="Teleport Home"
- shortcut="control|shift|H">
- <menu_item_call.on_click
- function="World.TeleportHome" />
- <menu_item_call.on_enable
- function="World.EnableTeleportHome" />
- </menu_item_call>
- <menu_item_call
- label="Set Home to Here"
- name="Set Home to Here">
- <menu_item_call.on_click
- function="World.SetHomeLocation" />
- <menu_item_call.on_enable
- function="World.EnableSetHomeLocation" />
- </menu_item_call>
<!-- <menu_item_check
label="Show Navigation Bar"
name="ShowNavbarNavigationPanel">
@@ -496,8 +522,6 @@
</menu_item_check>
<menu_item_separator/>-->
- <menu_item_separator/>
-
<menu
create_jump_keys="true"
label="Sun"
@@ -1155,6 +1179,13 @@
name="Help"
tear_off="true">
<menu_item_call
+ label="How to..."
+ name="How To">
+ <menu_item_call.on_click
+ function="Help.ToggleHowTo"
+ parameter="" />
+ </menu_item_call>
+ <menu_item_call
label="[SECOND_LIFE] Help"
name="Second Life Help"
shortcut="F1">
@@ -1723,12 +1754,6 @@
function="Tools.EnableReleaseKeys"
parameter="" />
</menu_item_call>
- <menu_item_call
- label="Set UI Size to Default"
- name="Set UI Size to Default">
- <menu_item_call.on_click
- function="View.DefaultUISize" />
- </menu_item_call>
<!-- This second, alternative shortcut for Show Advanced Menu is for backward compatibility. The main shortcut has been changed so it's Linux-friendly, where the old shortcut is typically eaten by the window manager. -->
<menu_item_check
label="Show Advanced Menu - legacy shortcut"
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index e4458f33b1..0ba4b84abe 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -2369,7 +2369,7 @@ Would you be my friend?
name="RemoveFromFriends"
type="alertmodal">
<tag>friendship</tag>
-Do you want to remove [NAME] from your Friends List?
+Do you want to remove &lt;nolink&gt;[NAME]&lt;/nolink&gt; from your Friends List?
<tag>confirm</tag>
<usetemplate
name="okcancelbuttons"
@@ -5161,7 +5161,7 @@ Topic: [SUBJECT], Message: [MESSAGE]
name="FriendOnline"
type="notifytip">
<tag>friendship</tag>
-[NAME] is Online
+&lt;nolink&gt;[NAME]&lt;/nolink&gt; is Online
</notification>
<notification
@@ -5169,7 +5169,7 @@ Topic: [SUBJECT], Message: [MESSAGE]
name="FriendOffline"
type="notifytip">
<tag>friendship</tag>
-[NAME] is Offline
+&lt;nolink&gt;[NAME]&lt;/nolink&gt; is Offline
</notification>
<notification
@@ -6171,7 +6171,7 @@ Your object named &lt;nolink&gt;[OBJECTFROMNAME]&lt;/nolink&gt; has given you th
name="FriendshipAccepted"
type="offer">
<tag>friendship</tag>
-[NAME] accepted your friendship offer.
+&lt;nolink&gt;[NAME]&lt;/nolink&gt; accepted your friendship offer.
</notification>
<notification
@@ -6180,7 +6180,7 @@ Your object named &lt;nolink&gt;[OBJECTFROMNAME]&lt;/nolink&gt; has given you th
persist="true"
type="notify">
<tag>friendship</tag>
-[NAME] declined your friendship offer.
+&lt;nolink&gt;[NAME]&lt;/nolink&gt; declined your friendship offer.
</notification>
<notification
@@ -6939,7 +6939,7 @@ With the following Residents:
<usetemplate
name="okcancelbuttons"
notext="Cancel"
- yestext="Ok"/>
+ yestext="OK"/>
</notification>
<notification
@@ -7135,7 +7135,7 @@ Mute everyone?
<usetemplate
ignoretext="Confirm before I mute all participants in a group call"
name="okcancelignore"
- yestext="Ok"
+ yestext="OK"
notext="Cancel">
<unique/>
</usetemplate>
diff --git a/indra/newview/skins/default/xui/en/panel_my_profile.xml b/indra/newview/skins/default/xui/en/panel_my_profile.xml
deleted file mode 100644
index 4bd2235cda..0000000000
--- a/indra/newview/skins/default/xui/en/panel_my_profile.xml
+++ /dev/null
@@ -1,146 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel
- follows="all"
- height="535"
- label="Profile"
- layout="topleft"
- left="0"
- name="panel_profile"
- top="0"
- width="315">
- <string
- name="CaptionTextAcctInfo">
- [ACCTTYPE]
-[PAYMENTINFO] [AGEVERIFICATION]
- </string>
- <string
- name="payment_update_link_url">
- http://www.secondlife.com/account/billing.php?lang=en
- </string>
- <string
- name="partner_edit_link_url">
- http://www.secondlife.com/account/partners.php?lang=en
- </string>
- <string
- name="my_account_link_url"
- value="http://secondlife.com/account" />
- <string
- name="no_partner_text"
- value="None" />
- <string
- name="no_group_text"
- value="None" />
- <string
- 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"
- layout="topleft"
- left="0"
- top="0"
- height="510"
- width="315"
- border_size="0">
- <layout_panel
- name="profile_stack"
- follows="all"
- layout="topleft"
- top="0"
- left="0"
- height="492"
- user_resize="false"
- width="315">
- <scroll_container
- color="DkGray2"
- follows="all"
- layout="topleft"
- left="0"
- name="profile_scroll"
- opaque="true"
- height="488"
- width="315"
- top="0">
- <panel
- layout="topleft"
- follows="left|top|right"
- height="488"
- name="scroll_content_panel"
- top="0"
- left="0"
- width="297">
- <panel
- follows="left|top|right"
- height="117"
- layout="topleft"
- left="10"
- 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"
- follows="top|left"
- height="124"
- layout="topleft"
- left="3"
- name="2nd_life_pic"
- top="10"
- width="102" />
-
- <text
- 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|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>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_notes.xml b/indra/newview/skins/default/xui/en/panel_notes.xml
deleted file mode 100644
index 124b1cfc6b..0000000000
--- a/indra/newview/skins/default/xui/en/panel_notes.xml
+++ /dev/null
@@ -1,236 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel
- follows="all"
- height="515"
- label="Notes &amp; Privacy"
- layout="topleft"
- left="0"
- name="panel_notes"
- top="0"
- width="313"
->
- <layout_stack
- name="layout"
- orientation="vertical"
- follows="all"
- layout="topleft"
- left="0"
- top="0"
- height="517"
- width="313"
- border_size="0">
- <layout_panel
- name="notes_stack"
- follows="all"
- layout="topleft"
- top="0"
- left="0"
- height="450"
- width="313">
- <scroll_container
- color="DkGray2"
- follows="all"
- layout="topleft"
- left="0"
- name="profile_scroll"
- opaque="true"
- height="450"
- width="313"
- top="0">
- <panel
- height="450"
- layout="topleft"
- name="profile_scroll_panel"
- top="0"
- left="0"
- width="303">
- <text
- follows="left|top"
- font.style="BOLD"
- height="16"
- layout="topleft"
- left="11"
- name="status_message"
- text_color="white"
- top="10"
- value="My private notes:"
- width="293" />
- <text_editor
- follows="left|top"
- height="120"
- layout="topleft"
- left="12"
- max_length="1000"
- name="notes_edit"
- text_color="DkGray"
- top_pad="3"
- width="288"
- word_wrap="true" />
- <text
- follows="left|top"
- font.style="BOLD"
- height="16"
- layout="topleft"
- left="11"
- name="status_message2"
- text_color="white"
- top_pad="20"
- value="Allow this person to:"
- width="293" />
- <check_box
- enabled="false"
- height="16"
- label="See my online status"
- layout="topleft"
- left="10"
- name="status_check"
- width="293" />
- <check_box
- enabled="false"
- height="16"
- label="See me on the map"
- layout="topleft"
- left="10"
- name="map_check"
- width="293" />
- <check_box
- enabled="false"
- height="16"
- label="Edit, delete or take my objects"
- layout="topleft"
- left="10"
- name="objects_check"
- width="293" />
- </panel>
- </scroll_container>
- </layout_panel>
- <layout_panel
- follows="bottom|left"
- height="30"
- layout="topleft"
- left="0"
- name="notes_buttons_panel"
- auto_resize="false"
- width="313">
-
- <layout_stack
- follows="bottom|left|right"
- height="23"
- layout="topleft"
- name="bottom_bar_ls"
- left="2"
- orientation="horizontal"
- top_pad="5"
- width="309">
-
- <layout_panel
- follows="bottom|left|right"
- height="23"
- layout="bottomleft"
- left="0"
- name="add_friend_btn_lp"
- user_resize="false"
- auto_resize="true"
- width="118">
- <button
- follows="bottom|left|right"
- height="23"
- label="Add Friend"
- layout="topleft"
- left="1"
- mouse_opaque="false"
- name="add_friend"
- tool_tip="Offer friendship to the Resident"
- top="0"
- width="117" />
- </layout_panel>
-
- <layout_panel
- follows="bottom|left|right"
- height="23"
- layout="bottomleft"
- left_pad="3"
- name="im_btn_lp"
- user_resize="false"
- auto_resize="true"
- width="22">
- <button
- follows="bottom|left|right"
- height="23"
- label="IM"
- layout="topleft"
- name="im"
- tool_tip="Open instant message session"
- top="0"
- left="1"
- width="21" />
- </layout_panel>
-
- <layout_panel
- follows="bottom|left|right"
- height="23"
- layout="bottomleft"
- left_pad="3"
- name="call_btn_lp"
- user_resize="false"
- auto_resize="true"
- width="52">
- <button
- follows="bottom|left|right"
- height="23"
- label="Call"
- layout="topleft"
- name="call"
- tool_tip="Call this Resident"
- left="1"
- top="0"
- use_ellipses="true"
- width="51" />
- </layout_panel>
-
- <layout_panel
- follows="bottom|left|right"
- height="23"
- layout="bottomleft"
- left_pad="3"
- name="show_on_map_btn_lp"
- user_resize="false"
- auto_resize="true"
- width="46">
- <button
- enabled="false"
- follows="bottom|left|right"
- height="23"
- label="Map"
- layout="topleft"
- name="show_on_map_btn"
- tool_tip="Show the Resident on the map"
- top="0"
- left="1"
- width="45" />
- </layout_panel>
-
- <layout_panel
- follows="bottom|left|right"
- height="23"
- layout="bottomleft"
- left_pad="3"
- name="teleport_btn_lp"
- user_resize="false"
- auto_resize="true"
- width="81">
- <button
- follows="bottom|left|right"
- height="23"
- label="Teleport"
- layout="topleft"
- name="teleport"
- tool_tip="Offer teleport"
- left="1"
- top="0"
- width="80" />
- </layout_panel>
- </layout_stack>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_postcard_settings.xml b/indra/newview/skins/default/xui/en/panel_postcard_settings.xml
index aebbc51be1..2e0bb88f53 100644
--- a/indra/newview/skins/default/xui/en/panel_postcard_settings.xml
+++ b/indra/newview/skins/default/xui/en/panel_postcard_settings.xml
@@ -113,11 +113,11 @@
label="Image quality"
label_width="80"
layout="topleft"
- left="10"
+ left="0"
max_val="100"
name="image_quality_slider"
top_pad="7"
- width="200" />
+ width="190" />
<text
type="string"
follows="left|top"
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 a7078ce2e1..4aeea8823e 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml
@@ -122,7 +122,7 @@
layout="topleft"
left_delta="0"
name="external"
- value="1"
+ value="true"
top="0"
tool_tip="Use the default system web browser for help, web links, etc. Not recommended if running full screen."
width="480" />
diff --git a/indra/newview/skins/default/xui/en/panel_profile.xml b/indra/newview/skins/default/xui/en/panel_profile.xml
deleted file mode 100644
index f5a9daa994..0000000000
--- a/indra/newview/skins/default/xui/en/panel_profile.xml
+++ /dev/null
@@ -1,458 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel
- follows="all"
- height="430"
- label="Profile"
- layout="topleft"
- left="0"
- name="panel_profile"
- top="0"
- width="317">
- <string
- name="CaptionTextAcctInfo">
- [ACCTTYPE]
-[PAYMENTINFO] [AGEVERIFICATION]
- </string>
- <string
- name="payment_update_link_url">
- http://www.secondlife.com/account/billing.php?lang=en
- </string>
- <string
- name="partner_edit_link_url">
- http://www.secondlife.com/account/partners.php?lang=en
- </string>
- <string
- name="my_account_link_url"
- value="http://secondlife.com/account" />
- <string
- name="no_partner_text"
- value="None" />
- <string
- name="no_group_text"
- value="None" />
- <string
- 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"
- layout="topleft"
- left="0"
- top="0"
- height="400"
- width="317"
- border_size="0">
- <layout_panel
- name="profile_stack"
- follows="all"
- layout="topleft"
- top="0"
- left="0"
- height="400"
- width="317">
- <scroll_container
- color="DkGray2"
- follows="all"
- layout="topleft"
- left="0"
- name="profile_scroll"
- opaque="true"
- height="400"
- width="317"
- top="0">
- <panel
- layout="topleft"
- follows="left|top|right"
- height="505"
- min_height="505"
- name="profile_scroll_panel"
- top="0"
- left="0"
- width="297">
- <panel
- follows="left|top|right"
- height="124"
- layout="topleft"
- left="13"
- 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"
- follows="top|left"
- height="124"
- layout="topleft"
- left="0"
- name="2nd_life_pic"
- 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="97"
- layout="topleft"
- left="107"
- textbox.max_length="512"
- textbox.show_context_menu="true"
- name="sl_description_edit"
- top_pad="-3"
- translate="false"
- width="180"
- expanded_bg_visible="true"
- expanded_bg_color="DkGray">
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean viverra orci et justo sagittis aliquet.Nullamma lesuada mauris sit amet ipsum. adipiscing elit. Ae nean 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="124"
- layout="topleft"
- top_pad="0"
- left="13"
- 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="0"
- name="real_world_pic"
- 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="97"
- layout="topleft"
- left="107"
- textbox.max_length="512"
- textbox.show_context_menu="true"
- name="fl_description_edit"
- top_pad="-3"
- translate="false"
- width="180"
- 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">
- <text
- follows="left|top"
- height="10"
- initial_value="(retrieving)"
- layout="topleft"
- left="0"
- parse_urls="true"
- name="partner_text"
- top="0"
- use_ellipses="true"
- width="300" />
- </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="103"
- layout="topleft"
- left="7"
- name="sl_groups"
- textbox.max_length="512"
- textbox.show_context_menu="true"
- top_pad="0"
- translate="false"
- width="290"
- 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>
-
- <layout_stack
- name="layout_verb_buttons"
- orientation="horizontal"
- follows="bottom|left|right"
- layout="topleft"
- left="2"
- top_pad="1"
- height="30"
- width="315"
- border_size="0">
- <layout_panel
- follows="bottom|left"
- height="30"
- layout="topleft"
- name="profile_buttons_panel"
- top="0"
- auto_resize="false"
- width="317">
-
- <layout_stack
- follows="bottom|left|right"
- height="23"
- layout="topleft"
- name="bottom_bar_ls"
- left="0"
- orientation="horizontal"
- top_pad="5"
- width="317">
-
- <layout_panel
- follows="bottom|left|right"
- height="23"
- layout="bottomleft"
- left="0"
- name="add_friend_btn_lp"
- user_resize="false"
- auto_resize="true"
- width="121">
- <button
- follows="bottom|left|right"
- height="23"
- label="Add Friend"
- layout="topleft"
- left="1"
- mouse_opaque="false"
- name="add_friend"
- tool_tip="Offer friendship to the Resident"
- top="0"
- width="120" />
- </layout_panel>
-
- <layout_panel
- follows="bottom|left|right"
- height="23"
- layout="bottomleft"
- left_pad="3"
- name="im_btn_lp"
- user_resize="false"
- auto_resize="true"
- width="22">
- <button
- follows="bottom|left|right"
- height="23"
- label="IM"
- layout="topleft"
- name="im"
- tool_tip="Open instant message session"
- top="0"
- left="1"
- width="21" />
- </layout_panel>
-
- <layout_panel
- follows="bottom|left|right"
- height="23"
- layout="bottomleft"
- left_pad="3"
- name="call_btn_lp"
- user_resize="false"
- auto_resize="true"
- width="52">
- <button
- follows="bottom|left|right"
- height="23"
- label="Call"
- layout="topleft"
- name="call"
- tool_tip="Call this Resident"
- left="1"
- top="0"
- use_ellipses="true"
- width="51" />
- </layout_panel>
-
- <layout_panel
- follows="bottom|left|right"
- height="23"
- layout="bottomleft"
- left_pad="3"
- name="chat_btn_lp"
- user_resize="false"
- auto_resize="true"
- width="93">
- <button
- follows="bottom|left|right"
- height="23"
- label="Teleport"
- layout="topleft"
- name="teleport"
- tool_tip="Offer teleport"
- left="1"
- top="0"
- use_ellipses="true"
- width="92" />
- </layout_panel>
-
- <layout_panel
- follows="bottom|left|right"
- height="23"
- layout="bottomleft"
- left_pad="3"
- name="overflow_btn_lp"
- user_resize="false"
- auto_resize="false"
- width="24">
- <menu_button
- follows="bottom|left|right"
- height="23"
- label="▼"
- layout="topleft"
- name="overflow_btn"
- tool_tip="Pay money to or share inventory with the Resident"
- left="1"
- top="0"
- width="23" />
- </layout_panel>
- </layout_stack>
- </layout_panel>
- </layout_stack>
-
-</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_profile_view.xml b/indra/newview/skins/default/xui/en/panel_profile_view.xml
deleted file mode 100644
index 646875b52e..0000000000
--- a/indra/newview/skins/default/xui/en/panel_profile_view.xml
+++ /dev/null
@@ -1,162 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel
- background_visible="true"
- follows="all"
- height="570"
- layout="topleft"
- min_height="350"
- name="panel_target_profile"
- left="0"
- width="333">
- <string
- name="status_online">
- Online
- </string>
- <string
- name="status_offline">
- Offline
- </string>
- <button
- follows="top|left"
- height="24"
- image_hover_unselected="BackButton_Over"
- image_pressed="BackButton_Press"
- image_unselected="BackButton_Off"
- layout="topleft"
- name="back"
- left="10"
- tab_stop="false"
- top="2"
- width="30"
- use_draw_context_alpha="false" />
- <text
- top="10"
- follows="top|left"
- height="13"
- layout="topleft"
- left="45"
- name="display_name_label"
- text_color="LtGray"
- value="Display Name:"
- width="80" />
- <text
- top_delta="0"
- follows="top|left"
- height="13"
- layout="topleft"
- left="45"
- name="solo_username_label"
- text_color="LtGray"
- value="Username:"
- visible="false"
- width="80" />
- <text
- follows="top|right"
- halign="right"
- height="13"
- layout="topleft"
- right="-15"
- name="status"
- text_color="LtGray_50"
- top_delta="0"
- value="Online"
- width="150" />
- <text
- follows="top|left|right"
- font="SansSerifBigBold"
- height="29"
- layout="topleft"
- left="45"
- name="user_name_small"
- text_color="LtGray"
- top="22"
- value="Jack oh look at me this is a super duper long name"
- use_ellipses="true"
- word_wrap="true"
- visible="false"
- width="255" />
- <text
- follows="top|left|right"
- font="SansSerifHugeBold"
- height="27"
- layout="topleft"
- left="45"
- name="user_name"
- text_color="LtGray"
- translate="false"
- top="25"
- value="TestString PleaseIgnore"
- visible="true"
- use_ellipses="true"
- width="258" />
- <button
- name="copy_to_clipboard"
- layout="topleft"
- follows="top|right"
- image_overlay="Copy"
- top_delta="0"
- right="-15"
- height="21"
- width="21"
- tab_stop="false"
- tool_tip="Copy to Clipboard"/>
- <text
- follows="top|left"
- height="13"
- layout="topleft"
- left="45"
- name="user_label"
- text_color="LtGray"
- top_pad="10"
- value="Username:"
- width="70" />
- <text
- follows="top|left"
- height="20"
- layout="topleft"
- left_pad="0"
- name="user_slid"
- text_color="EmphasisColor"
- font="SansSerifBold"
- top_delta="-2"
- translate="false"
- use_ellipses="true"
- value="teststring.pleaseignore"
- width="195"
- wrap="true "/>
- <tab_container
- follows="all"
- height="489"
- halign="center"
- layout="topleft"
- left="5"
- min_width="333"
- name="tabs"
- tab_min_width="80"
- tab_height="30"
- tab_position="top"
- top_pad="5"
- width="317">
- <panel
- class="panel_profile"
- filename="panel_profile.xml"
- label="PROFILE"
- layout="topleft"
- help_topic="profile_profile_tab"
- name="panel_profile" />
- <panel
- class="panel_picks"
- filename="panel_picks.xml"
- label="PICKS"
- layout="topleft"
- help_topic="profile_picks_tab"
- name="panel_picks" />
- <panel
- class="panel_notes"
- filename="panel_notes.xml"
- label="NOTES &amp; PRIVACY"
- layout="topleft"
- help_topic="profile_notes_tab"
- name="panel_notes" />
- </tab_container>
-</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_region_covenant.xml b/indra/newview/skins/default/xui/en/panel_region_covenant.xml
index df16f6fd37..112f12500d 100644
--- a/indra/newview/skins/default/xui/en/panel_region_covenant.xml
+++ b/indra/newview/skins/default/xui/en/panel_region_covenant.xml
@@ -57,7 +57,7 @@
mouse_opaque="false"
name="estate_name_text"
top_delta="0"
- width="150">
+ width="350">
mainland
</text>
<text
@@ -79,7 +79,7 @@
mouse_opaque="false"
name="estate_owner_text"
top_delta="0"
- width="150">
+ width="350">
(none)
</text>
<text
diff --git a/indra/newview/skins/default/xui/en/panel_toast.xml b/indra/newview/skins/default/xui/en/panel_toast.xml
index b9e714dd30..062c403a26 100644
--- a/indra/newview/skins/default/xui/en/panel_toast.xml
+++ b/indra/newview/skins/default/xui/en/panel_toast.xml
@@ -21,7 +21,6 @@
width="310"
left="0"
top="0"
- follows="right|bottom"
background_visible="false"
bg_opaque_image="Toast_Over"
bg_alpha_image="Toast_Background"
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index befcc5dd87..c25d1f57d6 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -3674,7 +3674,7 @@ Try enclosing path to the editor with double quotes.
<string name="Command_Map_Label">Map</string>
<string name="Command_Marketplace_Label">Marketplace</string>
<string name="Command_MiniMap_Label">Mini-map</string>
- <string name="Command_Move_Label">Move</string>
+ <string name="Command_Move_Label">Walk / run / fly</string>
<string name="Command_People_Label">People</string>
<string name="Command_Picks_Label">Picks</string>
<string name="Command_Places_Label">Places</string>
@@ -3683,7 +3683,7 @@ Try enclosing path to the editor with double quotes.
<string name="Command_Search_Label">Search</string>
<string name="Command_Snapshot_Label">Snapshot</string>
<string name="Command_Speak_Label">Speak</string>
- <string name="Command_View_Label">View</string>
+ <string name="Command_View_Label">Camera controls</string>
<string name="Command_Voice_Label">Voice settings</string>
<string name="Command_AboutLand_Tooltip">Information about the land you're visiting</string>
diff --git a/indra/newview/skins/default/xui/es/floater_camera.xml b/indra/newview/skins/default/xui/es/floater_camera.xml
index cdcb9a146b..f8911f3a4a 100644
--- a/indra/newview/skins/default/xui/es/floater_camera.xml
+++ b/indra/newview/skins/default/xui/es/floater_camera.xml
@@ -9,15 +9,6 @@
<floater.string name="move_tooltip">
Mover la cámara arriba y abajo, izquierda y derecha
</floater.string>
- <floater.string name="camera_modes_title">
- Modos de cámara
- </floater.string>
- <floater.string name="pan_mode_title">
- Orbital - Zoom - Panorámica
- </floater.string>
- <floater.string name="presets_mode_title">
- Vistas predefinidas
- </floater.string>
<floater.string name="free_mode_title">
Centrar el objeto
</floater.string>
diff --git a/indra/newview/skins/default/xui/es/notifications.xml b/indra/newview/skins/default/xui/es/notifications.xml
index 3fe0072a20..9591b424fc 100644
--- a/indra/newview/skins/default/xui/es/notifications.xml
+++ b/indra/newview/skins/default/xui/es/notifications.xml
@@ -981,7 +981,7 @@ no tienes el permiso de comprar terreno para el grupo que tienes activado actual
</form>
</notification>
<notification name="RemoveFromFriends">
- ¿Quieres eliminar a [NAME] de tu lista de amigos?
+ ¿Quieres eliminar a &lt;nolink&gt;[NAME]&lt;/nolink&gt; de tu lista de amigos?
<usetemplate name="okcancelbuttons" notext="Cancelar" yestext="OK"/>
</notification>
<notification name="RemoveMultipleFromFriends">
@@ -2128,10 +2128,10 @@ Al hacerlo se iniciará el navegador web.
Asunto: [SUBJECT], Mensaje: [MESSAGE]
</notification>
<notification name="FriendOnline">
- [NAME] está conectado
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; está conectado
</notification>
<notification name="FriendOffline">
- [NAME] está desconectado
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; está desconectado
</notification>
<notification name="AddSelfFriend">
Aunque eres muy agradable, no puedes añadirte como amigo a ti mismo.
@@ -2526,10 +2526,10 @@ Por favor, vuelve a intentarlo en unos momentos.
</form>
</notification>
<notification name="FriendshipAccepted">
- [NAME] ha aceptado tu oferta de amistad.
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; ha aceptado tu oferta de amistad.
</notification>
<notification name="FriendshipDeclined">
- [NAME] ha rehusado tu oferta de amistad.
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; ha rehusado tu oferta de amistad.
</notification>
<notification name="FriendshipAcceptedByMe">
Aceptado el ofrecimiento de amistad.
diff --git a/indra/newview/skins/default/xui/es/panel_my_profile.xml b/indra/newview/skins/default/xui/es/panel_my_profile.xml
deleted file mode 100644
index 29e5e6f652..0000000000
--- a/indra/newview/skins/default/xui/es/panel_my_profile.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Perfil" name="panel_profile">
- <string name="no_partner_text" value="Ninguno/a"/>
- <string name="no_group_text" value="Ninguno"/>
- <string 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">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="scroll_content_panel">
- <panel name="second_life_image_panel">
- <text name="display_name_descr_text">
- Nombre de usuario
- </text>
- <text name="name_descr_text">
- Nombre mostrado
- </text>
- <button label="Perfil" name="see_profile_btn" tool_tip="Ver el perfil de este avatar"/>
- </panel>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/es/panel_navigation_bar.xml b/indra/newview/skins/default/xui/es/panel_navigation_bar.xml
index 1b7f5d5a9f..d36c6283bc 100644
--- a/indra/newview/skins/default/xui/es/panel_navigation_bar.xml
+++ b/indra/newview/skins/default/xui/es/panel_navigation_bar.xml
@@ -3,7 +3,7 @@
<layout_stack name="nvp_stack">
<layout_panel name="navigation_layout_panel">
<panel name="navigation_panel">
- <pull_button name="back_btn" tool_tip="Volver a lo localización anterior"/>
+ <pull_button name="back_btn" tool_tip="Volver a la localización anterior"/>
<pull_button name="forward_btn" tool_tip="Ir una localización adelante"/>
<button name="home_btn" tool_tip="Teleportar a mi Base"/>
<location_input label="Lugar" name="location_combo"/>
diff --git a/indra/newview/skins/default/xui/es/panel_notes.xml b/indra/newview/skins/default/xui/es/panel_notes.xml
deleted file mode 100644
index 00d4caf468..0000000000
--- a/indra/newview/skins/default/xui/es/panel_notes.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Notas y Privacidad" name="panel_notes">
- <layout_stack name="layout">
- <layout_panel name="notes_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <text name="status_message" value="Mis notas privadas:"/>
- <text name="status_message2" value="Permitir que esta persona:"/>
- <check_box label="Vea si estoy conectado" name="status_check"/>
- <check_box label="Me vea en el mapa" name="map_check"/>
- <check_box label="Edite, borre o coja mis objetos" name="objects_check"/>
- </panel>
- </scroll_container>
- </layout_panel>
- <layout_panel name="notes_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="Añadir como amigo" name="add_friend" tool_tip="Ofrecer amistad a este Residente"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="MI" name="im" tool_tip="Abrir una sesión de mensajes instantáneos"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="Llamar" name="call" tool_tip="Llamar a este Residente"/>
- </layout_panel>
- <layout_panel name="show_on_map_btn_lp">
- <button label="Mapa" name="show_on_map_btn" tool_tip="Mostrar al Residente en el mapa"/>
- </layout_panel>
- <layout_panel name="teleport_btn_lp">
- <button label="Teleporte" name="teleport" tool_tip="Ofrecer teleporte"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/es/panel_profile.xml b/indra/newview/skins/default/xui/es/panel_profile.xml
deleted file mode 100644
index 334c0541af..0000000000
--- a/indra/newview/skins/default/xui/es/panel_profile.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Perfil" name="panel_profile">
- <string name="CaptionTextAcctInfo">
- [ACCTTYPE]
-[PAYMENTINFO] [AGEVERIFICATION]
- </string>
- <string name="payment_update_link_url">
- http://www.secondlife.com/account/billing.php?lang=es-ES
- </string>
- <string name="partner_edit_link_url">
- http://www.secondlife.com/account/partners.php?lang=es
- </string>
- <string name="my_account_link_url" value="http://secondlife.com/my/account/index.php?lang=es-ES"/>
- <string name="no_partner_text" value="Ninguno"/>
- <string name="no_group_text" value="Ninguno"/>
- <string 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">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <panel name="second_life_image_panel">
- <text name="title_sl_descr_text" value="[SECOND_LIFE]:"/>
- </panel>
- <panel name="first_life_image_panel">
- <text name="title_rw_descr_text" value="Mundo real:"/>
- </panel>
- <text name="title_member_text" value="Residente desde:"/>
- <text name="title_acc_status_text" value="Estado de la cuenta:"/>
- <text name="title_partner_text" value="Compañero/a:"/>
- <panel name="partner_data_panel">
- <text initial_value="(obteniendo)" name="partner_text"/>
- </panel>
- <text name="title_groups_text" value="Grupos:"/>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
- <layout_stack name="layout_verb_buttons">
- <layout_panel name="profile_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="Añadir como amigo" name="add_friend" tool_tip="Ofrecer amistad a este Residente"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="MI" name="im" tool_tip="Abrir una sesión de mensajes instantáneos"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="Llamar" name="call" tool_tip="Llamar a este Residente"/>
- </layout_panel>
- <layout_panel name="chat_btn_lp">
- <button label="Teleporte" name="teleport" tool_tip="Ofrecer teleporte"/>
- </layout_panel>
- <layout_panel name="overflow_btn_lp">
- <menu_button label="▼" name="overflow_btn" tool_tip="Pagar dinero al Residente o compartir algo del inventario con él"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- <layout_panel name="profile_me_buttons_panel">
- <button label="Editar el perfil" name="edit_profile_btn" tool_tip="Modificar tu información personal"/>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/es/panel_profile_view.xml b/indra/newview/skins/default/xui/es/panel_profile_view.xml
deleted file mode 100644
index cb374dee52..0000000000
--- a/indra/newview/skins/default/xui/es/panel_profile_view.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel name="panel_target_profile">
- <string name="status_online">
- Conectado/a
- </string>
- <string name="status_offline">
- Desconectado/a
- </string>
- <text name="display_name_label" value="Nombre mostrado:"/>
- <text name="solo_username_label" value="Nombre de usuario:"/>
- <text name="status" value="Conectado/a"/>
- <text name="user_name_small" value="Jack, ¿has visto esto? Es un nombre larguísimo."/>
- <button name="copy_to_clipboard" tool_tip="Copiar al portapapeles"/>
- <text name="user_label" value="Nombre de usuario:"/>
- <tab_container name="tabs">
- <panel label="PERFIL" name="panel_profile"/>
- <panel label="DESTACADOS" name="panel_picks"/>
- <panel label="NOTAS Y PRIVACIDAD" name="panel_notes"/>
- </tab_container>
-</panel>
diff --git a/indra/newview/skins/default/xui/es/strings.xml b/indra/newview/skins/default/xui/es/strings.xml
index 4cae6ce5e8..e3ea4baa6c 100644
--- a/indra/newview/skins/default/xui/es/strings.xml
+++ b/indra/newview/skins/default/xui/es/strings.xml
@@ -586,6 +586,9 @@ Intenta iniciar sesión de nuevo en unos instantes.
<string name="mesh">
red
</string>
+ <string name="AvatarEditingAppearance">
+ (Edición de Apariencia)
+ </string>
<string name="AvatarAway">
Ausente
</string>
diff --git a/indra/newview/skins/default/xui/fr/floater_camera.xml b/indra/newview/skins/default/xui/fr/floater_camera.xml
index 97ff246c4d..77d3c2cfe4 100644
--- a/indra/newview/skins/default/xui/fr/floater_camera.xml
+++ b/indra/newview/skins/default/xui/fr/floater_camera.xml
@@ -9,15 +9,6 @@
<floater.string name="move_tooltip">
Déplacer la caméra vers le haut et le bas, la gauche et la droite
</floater.string>
- <floater.string name="camera_modes_title">
- Modes
- </floater.string>
- <floater.string name="pan_mode_title">
- Rotation - Zoom - Panoramique
- </floater.string>
- <floater.string name="presets_mode_title">
- Préréglages
- </floater.string>
<floater.string name="free_mode_title">
Voir l&apos;objet
</floater.string>
diff --git a/indra/newview/skins/default/xui/fr/floater_object_weights.xml b/indra/newview/skins/default/xui/fr/floater_object_weights.xml
index f1b063a3da..2667188308 100644
--- a/indra/newview/skins/default/xui/fr/floater_object_weights.xml
+++ b/indra/newview/skins/default/xui/fr/floater_object_weights.xml
@@ -1,28 +1,28 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="object_weights" title="AVANCÉ">
<floater.string name="nothing_selected" value="--"/>
- <text name="selected_text" value="SELECTIONNÉ"/>
+ <text name="selected_text" value="SÉLECTION"/>
<text name="objects" value="--"/>
<text name="objects_label" value="Objets"/>
<text name="prims" value="--"/>
<text name="prims_label" value="Prims"/>
- <text name="weights_of_selected_text" value="POIDS DES OBJETS SELECTIONNÉS"/>
+ <text name="weights_of_selected_text" value="POIDS DE LA SÉLECTION"/>
<text name="download" value="--"/>
- <text name="download_label" value="Télécharger"/>
+ <text name="download_label" value="Téléchargement"/>
<text name="physics" value="--"/>
- <text name="physics_label" value="Propriétés physiques"/>
+ <text name="physics_label" value="Physique"/>
<text name="server" value="--"/>
<text name="server_label" value="Serveur"/>
<text name="display" value="--"/>
- <text name="display_label" value="Afficher"/>
+ <text name="display_label" value="Affichage"/>
<text name="land_impacts_text" value="IMPACTS SUR LE TERRAIN"/>
<text name="selected" value="--"/>
<text name="selected_label" value="Sélection"/>
<text name="rezzed_on_land" value="--"/>
- <text name="rezzed_on_land_label" value="Rezzé sur le terrain"/>
+ <text name="rezzed_on_land_label" value="Rezzés sur le terrain"/>
<text name="remaining_capacity" value="--"/>
<text name="remaining_capacity_label" value="Capacité restante"/>
<text name="total_capacity" value="--"/>
<text name="total_capacity_label" value="Capacité totale"/>
- <text name="help_SLURL" value="[secondlife:///app/help/object_weights What is all this?...]"/>
+ <text name="help_SLURL" value="[secondlife:///app/help/object_weights De quoi s&apos;agit-il ?...]"/>
</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_preview_animation.xml b/indra/newview/skins/default/xui/fr/floater_preview_animation.xml
index a9407abfde..fdd2ac8beb 100644
--- a/indra/newview/skins/default/xui/fr/floater_preview_animation.xml
+++ b/indra/newview/skins/default/xui/fr/floater_preview_animation.xml
@@ -6,6 +6,6 @@
<text name="desc txt">
Description :
</text>
- <button label="Jouer dans Second Life" label_selected="Stop" name="Anim play btn" tool_tip="Lire cette animation de façon à ce que les autres puissent la voir" width="131"/>
- <button label="Jouer localement" label_selected="Stop" left="160" name="Anim audition btn" tool_tip="Lire cette animation de façon à ce que vous soyez la seule personne à pouvoir la voir" width="120"/>
+ <button label="Exécuter dans Second Life" label_selected="Stop" name="Anim play btn" tool_tip="Lire cette animation de façon à ce que les autres puissent la voir" width="131"/>
+ <button label="Exécuter localement" label_selected="Stop" left="160" name="Anim audition btn" tool_tip="Lire cette animation de façon à ce que vous soyez la seule personne à pouvoir la voir" width="120"/>
</floater>
diff --git a/indra/newview/skins/default/xui/fr/floater_stats.xml b/indra/newview/skins/default/xui/fr/floater_stats.xml
index a74a338bd7..2ce2e6dcd5 100644
--- a/indra/newview/skins/default/xui/fr/floater_stats.xml
+++ b/indra/newview/skins/default/xui/fr/floater_stats.xml
@@ -38,7 +38,7 @@
<stat_view label="Simulateur" name="sim">
<stat_bar label="Dilatation temporelle" name="simtimedilation"/>
<stat_bar label="FPS sim" name="simfps"/>
- <stat_bar label="Propriétés physiques FPS" name="simphysicsfps"/>
+ <stat_bar label="FPS physique" name="simphysicsfps"/>
<stat_view label="Détails des propriétés physiques" name="physicsdetail">
<stat_bar label="Objets fixés" name="physicspinnedtasks"/>
<stat_bar label="Objets LOD faibles" name="physicslodtasks"/>
@@ -53,17 +53,17 @@
<stat_bar label="Événements de scripts" name="simscripteps"/>
<stat_bar label="Paquets en entrée" name="siminpps"/>
<stat_bar label="Paquets en sortie" name="simoutpps"/>
- <stat_bar label="En attente des téléchargements" name="simpendingdownloads"/>
- <stat_bar label="En attente des chargements" name="simpendinguploads"/>
+ <stat_bar label="Téléchargements en attente" name="simpendingdownloads"/>
+ <stat_bar label="Chargements en attente" name="simpendinguploads"/>
<stat_bar label="Total Unacked Bytes" name="simtotalunackedbytes"/>
<stat_view label="Temps (ms)" name="simperf">
- <stat_bar label="Durée du cadre totale" name="simframemsec"/>
+ <stat_bar label="Durée totale de l'image" name="simframemsec"/>
<stat_bar label="Durée nette" name="simnetmsec"/>
- <stat_bar label="Durée physique" name="simsimphysicsmsec"/>
- <stat_bar label="Durée de la simulation" name="simsimothermsec"/>
- <stat_bar label="Durée de l&apos;avatar" name="simagentmsec"/>
+ <stat_bar label="Durée sim (physique)" name="simsimphysicsmsec"/>
+ <stat_bar label="Durée sim (autre)" name="simsimothermsec"/>
+ <stat_bar label="Durée des avatars" name="simagentmsec"/>
<stat_bar label="Durée des images" name="simimagesmsec"/>
- <stat_bar label="Durée du script" name="simscriptmsec"/>
+ <stat_bar label="Durée des scripts" name="simscriptmsec"/>
<stat_bar label="Temps d&apos;inactivité" name="simsparemsec"/>
<stat_view label="Détails Temps (ms)" name="timedetails">
<stat_bar label="Etape propr. physiques" name="simsimphysicsstepmsec"/>
diff --git a/indra/newview/skins/default/xui/fr/floater_tools.xml b/indra/newview/skins/default/xui/fr/floater_tools.xml
index 1ecf47f2e5..af5678ff0e 100644
--- a/indra/newview/skins/default/xui/fr/floater_tools.xml
+++ b/indra/newview/skins/default/xui/fr/floater_tools.xml
@@ -106,7 +106,7 @@
Aucune sélection effectuée.
</text>
<text name="remaining_capacity">
- [CAPACITY_STRING] [secondlife:///app/openfloater/object_weights More info]
+ [CAPACITY_STRING] [secondlife:///app/openfloater/object_weights Plus d'infos]
</text>
<tab_container name="Object Info Tabs">
<panel label="Général" name="General">
diff --git a/indra/newview/skins/default/xui/fr/floater_toybox.xml b/indra/newview/skins/default/xui/fr/floater_toybox.xml
index e6fa212c65..33aea6bb2d 100644
--- a/indra/newview/skins/default/xui/fr/floater_toybox.xml
+++ b/indra/newview/skins/default/xui/fr/floater_toybox.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="Toybox" title="PERSONNALISER LA BARRE D&apos;OUTILS">
+<floater name="Toybox" title="PERSONNALISER LES BARRES D&apos;OUTILS">
<text name="toybox label 1">
- Ajouter ou supprimer des boutons en les faisant glisser vers les barres d&apos;outils ou à partir de ces dernières.
+ Ajouter ou supprimer des boutons : les faire glisser vers ou depuis les barres d&apos;outils.
</text>
<text name="toybox label 2">
- Les boutons s&apos;afficheront comme indiqué ou comme des icônes, en fonction des paramètres de chaque barre d&apos;outils.
+ Ils s&apos;afficheront comme indiqué ou comme des icônes, selon les paramètres de barre d&apos;outils.
</text>
- <button label="Restaurer les choix par défaut" label_selected="Restaurer les choix par défaut" name="btn_restore_defaults"/>
+ <button label="Valeurs par défaut" label_selected="Valeurs par défaut" name="btn_restore_defaults"/>
</floater>
diff --git a/indra/newview/skins/default/xui/fr/menu_group_plus.xml b/indra/newview/skins/default/xui/fr/menu_group_plus.xml
index 0db5afedc7..ad76f11d79 100644
--- a/indra/newview/skins/default/xui/fr/menu_group_plus.xml
+++ b/indra/newview/skins/default/xui/fr/menu_group_plus.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<menu name="menu_group_plus">
- <menu_item_call label="Rejoindre des groupes..." name="item_join"/>
+ <menu_item_call label="Rejoindre un groupe..." name="item_join"/>
<menu_item_call label="Nouveau groupe..." name="item_new"/>
</menu>
diff --git a/indra/newview/skins/default/xui/fr/menu_inventory.xml b/indra/newview/skins/default/xui/fr/menu_inventory.xml
index 53df8d11da..403111c4de 100644
--- a/indra/newview/skins/default/xui/fr/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/fr/menu_inventory.xml
@@ -71,7 +71,7 @@
<menu_item_call label="Jouer dans Second Life" name="Animation Play"/>
<menu_item_call label="Jouer localement" name="Animation Audition"/>
<menu_item_call label="Envoyer un message instantané" name="Send Instant Message"/>
- <menu_item_call label="Offrir de téléporter..." name="Offer Teleport..."/>
+ <menu_item_call label="Proposer une téléportation..." name="Offer Teleport..."/>
<menu_item_call label="Démarrer le chat conférence" name="Conference Chat"/>
<menu_item_call label="Activer" name="Activate"/>
<menu_item_call label="Désactiver" name="Deactivate"/>
diff --git a/indra/newview/skins/default/xui/fr/menu_people_nearby_view_sort.xml b/indra/newview/skins/default/xui/fr/menu_people_nearby_view_sort.xml
index 0aad174fbd..8bb466b8d6 100644
--- a/indra/newview/skins/default/xui/fr/menu_people_nearby_view_sort.xml
+++ b/indra/newview/skins/default/xui/fr/menu_people_nearby_view_sort.xml
@@ -5,5 +5,5 @@
<menu_item_check label="Trier par distance" name="sort_distance"/>
<menu_item_check label="Afficher les icônes des résidents" name="view_icons"/>
<menu_item_check label="Afficher la carte" name="view_map"/>
- <menu_item_call label="Afficher les résidents et les objets interdits" name="show_blocked_list"/>
+ <menu_item_call label="Afficher les résidents et les objets ignorés" name="show_blocked_list"/>
</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/fr/menu_toolbars.xml b/indra/newview/skins/default/xui/fr/menu_toolbars.xml
index bbfbe4b9ed..d3e9f92770 100644
--- a/indra/newview/skins/default/xui/fr/menu_toolbars.xml
+++ b/indra/newview/skins/default/xui/fr/menu_toolbars.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<context_menu name="Toolbars Popup">
<menu_item_call label="Choisir les boutons..." name="Chose Buttons"/>
- <menu_item_check label="Icônes et étiquettes" name="icons_with_text"/>
+ <menu_item_check label="Icônes et libellés" name="icons_with_text"/>
<menu_item_check label="Icônes uniquement" name="icons_only"/>
</context_menu>
diff --git a/indra/newview/skins/default/xui/fr/menu_viewer.xml b/indra/newview/skins/default/xui/fr/menu_viewer.xml
index 64cd463070..e2cb1f999d 100644
--- a/indra/newview/skins/default/xui/fr/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/fr/menu_viewer.xml
@@ -24,7 +24,7 @@
<menu_item_call label="Acheter des L$" name="Buy and Sell L$"/>
<menu_item_call label="Préférences..." name="Preferences"/>
<menu_item_call label="Barres d&apos;outils..." name="Toolbars"/>
- <menu_item_call label="Cacher tous les contrôles" name="Hide UI"/>
+ <menu_item_call label="Masquer tous les contrôles" name="Hide UI"/>
<menu_item_call label="Quitter [APP_NAME]" name="Quit"/>
</menu>
<menu label="Communiquer" name="Communicate">
@@ -319,7 +319,7 @@
<menu_item_check label="Pauser l&apos;avatar" name="AgentPause"/>
<menu_item_call label="Activer le journal des messages" name="Enable Message Log"/>
<menu_item_call label="Désactiver le journal des messages" name="Disable Message Log"/>
- <menu_item_check label="Velocity Interpolate Objects" name="Velocity Interpolate Objects"/>
+ <menu_item_check label="Objets d&apos;interpolation de vitesse" name="Velocity Interpolate Objects"/>
<menu_item_check label="Interpolation ping des positions des objets" name="Ping Interpolate Object Positions"/>
<menu_item_call label="Abandonner un paquet" name="Drop a Packet"/>
</menu>
@@ -336,7 +336,7 @@
<menu_item_check label="Ignorer les paramètres du soleil de la sim" name="Sim Sun Override"/>
<menu_item_check label="Balise animée" name="Cheesy Beacon"/>
<menu_item_check label="Météo fixe" name="Fixed Weather"/>
- <menu_item_call label="Dump Region Object Cache" name="Dump Region Object Cache"/>
+ <menu_item_call label="Vidage de cache d&apos;objet de la région" name="Dump Region Object Cache"/>
</menu>
<menu label="Interface" name="UI">
<menu_item_call label="Test du navigateur de médias" name="Web Browser Test"/>
diff --git a/indra/newview/skins/default/xui/fr/notifications.xml b/indra/newview/skins/default/xui/fr/notifications.xml
index 31c29029b5..d8d79d8dde 100644
--- a/indra/newview/skins/default/xui/fr/notifications.xml
+++ b/indra/newview/skins/default/xui/fr/notifications.xml
@@ -980,7 +980,7 @@ Proposer à [NAME] de devenir votre ami(e) ?
</form>
</notification>
<notification name="RemoveFromFriends">
- Voulez-vous supprimer [NAME] de votre liste d&apos;amis ?
+ Voulez-vous supprimer &lt;nolink&gt;[NAME]&lt;/nolink&gt; de votre liste d&apos;amis ?
<usetemplate name="okcancelbuttons" notext="Annuler" yestext="OK"/>
</notification>
<notification name="RemoveMultipleFromFriends">
@@ -2119,10 +2119,10 @@ Cette opération lancera votre navigateur Web.
Sujet : [SUBJECT], Message : [MESSAGE]
</notification>
<notification name="FriendOnline">
- [NAME] est en ligne
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; est en ligne
</notification>
<notification name="FriendOffline">
- [NAME] est hors ligne
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; est hors ligne
</notification>
<notification name="AddSelfFriend">
Même si vous êtes extrêmement sympathique, vous ne pouvez pas devenir ami avec vous-même.
@@ -2518,10 +2518,10 @@ Veuillez réessayer dans quelques minutes.
</form>
</notification>
<notification name="FriendshipAccepted">
- [NAME] a accepté votre amitié.
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; a accepté votre amitié.
</notification>
<notification name="FriendshipDeclined">
- [NAME] a refusé votre amitié.
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; a refusé votre amitié.
</notification>
<notification name="FriendshipAcceptedByMe">
Amitié acceptée.
@@ -3046,8 +3046,8 @@ Cliquez sur un point dans le monde et faites glisser votre souris pour faire tou
<usetemplate name="okcancelbuttons" notext="Ne pas quitter" yestext="Quitter"/>
</notification>
<notification label="" name="ConfirmHideUI">
- Cette action cachera tous les objets des menus et boutons. Pour les récupérer, cliquez de nouveau sur [SHORTCUT].
- <usetemplate ignoretext="Confimer avant de cacher l&apos;interface" name="okcancelignore" notext="Annuler" yestext="OK"/>
+ Cette action masquera tous les boutons et articles de menu. Pour les récupérer, cliquez de nouveau sur [SHORTCUT].
+ <usetemplate ignoretext="Confirmer avant de masquer l&apos;interface" name="okcancelignore" notext="Annuler" yestext="OK"/>
</notification>
<global name="UnsupportedGLRequirements">
Vous semblez ne pas avoir le matériel requis pour utiliser [APP_NAME]. [APP_NAME] requiert une carte graphique OpenGL avec une prise en charge du multitexturing. Si vous avez une telle carte, assurez-vous que vous avez aussi les pilotes les plus récents pour la carte, ainsi que les service packs et les patchs pour votre système d&apos;exploitation.
diff --git a/indra/newview/skins/default/xui/fr/panel_my_profile.xml b/indra/newview/skins/default/xui/fr/panel_my_profile.xml
deleted file mode 100644
index 5207c5a28e..0000000000
--- a/indra/newview/skins/default/xui/fr/panel_my_profile.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Profil" name="panel_profile">
- <string name="CaptionTextAcctInfo">
- [ACCTTYPE]
-[PAYMENTINFO] [AGEVERIFICATION]
- </string>
- <string name="payment_update_link_url">
- http://www.secondlife.com/account/billing.php?lang=en
- </string>
- <string name="partner_edit_link_url">
- http://www.secondlife.com/account/partners.php?lang=en
- </string>
- <string name="my_account_link_url" value="http://secondlife.com/account"/>
- <string name="no_partner_text" value="Aucun"/>
- <string name="no_group_text" value="Aucun"/>
- <string 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">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="scroll_content_panel">
- <panel name="second_life_image_panel">
- <text name="display_name_descr_text">
- Nom d&apos;utilisateur
- </text>
- <text name="name_descr_text">
- Nom d&apos;affichage
- </text>
- <button label="Profil" name="see_profile_btn" tool_tip="Afficher le profil de cet avatar."/>
- </panel>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_notes.xml b/indra/newview/skins/default/xui/fr/panel_notes.xml
deleted file mode 100644
index 1b44bc4b73..0000000000
--- a/indra/newview/skins/default/xui/fr/panel_notes.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Notes/Perso" name="panel_notes">
- <layout_stack name="layout">
- <layout_panel name="notes_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <text name="status_message" value="Mes notes perso :"/>
- <text name="status_message2" value="Autoriser cette personne à :"/>
- <check_box label="Afficher mon statut en ligne" name="status_check"/>
- <check_box label="Me situer sur la carte" name="map_check"/>
- <check_box label="Modifier, supprimer ou prendre mes objets" name="objects_check"/>
- </panel>
- </scroll_container>
- </layout_panel>
- <layout_panel name="notes_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="Devenir amis" name="add_friend" tool_tip="Proposer à ce résident de devenir votre ami"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="IM" name="im" tool_tip="Ouvrir une session IM"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="Appeler" name="call" tool_tip="Appeler ce résident"/>
- </layout_panel>
- <layout_panel name="show_on_map_btn_lp">
- <button label="Carte" name="show_on_map_btn" tool_tip="Afficher le résident sur la carte"/>
- </layout_panel>
- <layout_panel name="teleport_btn_lp">
- <button label="Téléporter" name="teleport" tool_tip="Proposer une téléportation"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_move.xml b/indra/newview/skins/default/xui/fr/panel_preferences_move.xml
index efb520bfd3..94d7322b22 100644
--- a/indra/newview/skins/default/xui/fr/panel_preferences_move.xml
+++ b/indra/newview/skins/default/xui/fr/panel_preferences_move.xml
@@ -24,16 +24,16 @@
Clic simple sur le terrain :
</text>
<combo_box name="single_click_action_combo">
- <combo_box.item label="Pas d&apos;action" name="0"/>
- <combo_box.item label="Bouger vers le point cliqué" name="1"/>
+ <combo_box.item label="Aucune action" name="0"/>
+ <combo_box.item label="Déplacement vers le clic" name="1"/>
</combo_box>
<text name="double_click_action_lbl">
Double-clic sur le terrain :
</text>
<combo_box name="double_click_action_combo">
- <combo_box.item label="Pas d&apos;action" name="0"/>
- <combo_box.item label="Bouger vers le point cliqué" name="1"/>
- <combo_box.item label="Téléporter vers le point cliqué" name="2"/>
+ <combo_box.item label="Aucune action" name="0"/>
+ <combo_box.item label="Déplacement vers le double clic" name="1"/>
+ <combo_box.item label="Téléportation vers le double clic" name="2"/>
</combo_box>
<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 b122db9502..cf1a374da6 100644
--- a/indra/newview/skins/default/xui/fr/panel_preferences_privacy.xml
+++ b/indra/newview/skins/default/xui/fr/panel_preferences_privacy.xml
@@ -20,7 +20,7 @@
<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 des journaux :
+ Emplacement journaux :
</text>
<line_editor left="308" name="log_path_string" right="-20"/>
<button label="Parcourir" label_selected="Parcourir" name="log_path_button" width="150"/>
diff --git a/indra/newview/skins/default/xui/fr/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/fr/panel_prim_media_controls.xml
index f16fcebd02..ad744b7760 100644
--- a/indra/newview/skins/default/xui/fr/panel_prim_media_controls.xml
+++ b/indra/newview/skins/default/xui/fr/panel_prim_media_controls.xml
@@ -13,10 +13,10 @@
</layout_stack>
<layout_stack name="media_controls">
<layout_panel name="back">
- <button name="back_btn" tool_tip="Naviguer en arrière"/>
+ <button name="back_btn" tool_tip="Précédente"/>
</layout_panel>
<layout_panel name="fwd">
- <button name="fwd_btn" tool_tip="Naviguer vers l&apos;avant"/>
+ <button name="fwd_btn" tool_tip="Suivante"/>
</layout_panel>
<layout_panel name="home">
<button name="home_btn" tool_tip="Page d&apos;accueil"/>
@@ -34,7 +34,7 @@
<button name="play_btn" tool_tip="Lire le média"/>
</layout_panel>
<layout_panel name="pause">
- <button name="pause_btn" tool_tip="Pauser le média"/>
+ <button name="pause_btn" tool_tip="Mettre le média sur pause"/>
</layout_panel>
<layout_panel name="media_address">
<line_editor name="media_address_url" tool_tip="URL du média"/>
@@ -48,7 +48,7 @@
</layout_stack>
</layout_panel>
<layout_panel name="media_play_position">
- <slider_bar initial_value="0.5" name="media_play_slider" tool_tip="Progrès de la lecture du film"/>
+ <slider_bar initial_value="0.5" name="media_play_slider" tool_tip="Progression de la lecture du film"/>
</layout_panel>
<layout_panel name="skip_back">
<button name="skip_back_btn" tool_tip="Reculer"/>
diff --git a/indra/newview/skins/default/xui/fr/panel_profile.xml b/indra/newview/skins/default/xui/fr/panel_profile.xml
deleted file mode 100644
index 9aa6fe97a1..0000000000
--- a/indra/newview/skins/default/xui/fr/panel_profile.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Profil" name="panel_profile">
- <string name="CaptionTextAcctInfo">
- [ACCTTYPE]
-[PAYMENTINFO] [AGEVERIFICATION]
- </string>
- <string name="payment_update_link_url">
- http://www.secondlife.com/account/billing.php?lang=fr-FR
- </string>
- <string name="partner_edit_link_url">
- http://www.secondlife.com/account/partners.php?lang=fr
- </string>
- <string name="my_account_link_url" value="http://secondlife.com/my/account/index.php?lang=fr-FR"/>
- <string name="no_partner_text" value="Aucun"/>
- <string name="no_group_text" value="Aucun"/>
- <string 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">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <panel name="second_life_image_panel">
- <text name="title_sl_descr_text" value="[SECOND_LIFE]:"/>
- </panel>
- <panel name="first_life_image_panel">
- <text name="title_rw_descr_text" value="Vie réelle :"/>
- </panel>
- <text name="title_member_text" value="Résident depuis :"/>
- <text name="title_acc_status_text" value="Statut du compte :"/>
- <text_editor name="acc_status_text">
- Résident. Aucune info de paiement enregistrée.
- Linden.
- </text_editor>
- <text name="title_partner_text" value="Partenaire :"/>
- <panel name="partner_data_panel">
- <text initial_value="(récupération en cours)" name="partner_text"/>
- </panel>
- <text name="title_groups_text" value="Groupes :"/>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
- <layout_stack name="layout_verb_buttons">
- <layout_panel name="profile_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="Devenir amis" name="add_friend" tool_tip="Proposer à ce résident de devenir votre ami"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="IM" name="im" tool_tip="Ouvrir une session IM"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="Appeler" name="call" tool_tip="Appeler ce résident"/>
- </layout_panel>
- <layout_panel name="chat_btn_lp">
- <button label="Téléporter" name="teleport" tool_tip="Proposer une téléportation"/>
- </layout_panel>
- <layout_panel name="overflow_btn_lp">
- <menu_button label="▼" name="overflow_btn" tool_tip="Payer le résident ou partager l&apos;inventaire avec lui"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- <layout_panel name="profile_me_buttons_panel">
- <button label="Modifier le profil" name="edit_profile_btn" tool_tip="Modifier vos informations personnelles"/>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_profile_view.xml b/indra/newview/skins/default/xui/fr/panel_profile_view.xml
deleted file mode 100644
index 76ba44e899..0000000000
--- a/indra/newview/skins/default/xui/fr/panel_profile_view.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel name="panel_target_profile">
- <string name="status_online">
- En ligne
- </string>
- <string name="status_offline">
- Hors ligne
- </string>
- <text name="display_name_label" value="Nom d&apos;affichage :"/>
- <text name="solo_username_label" value="Nom d&apos;utilisateur :"/>
- <text name="status" value="En ligne"/>
- <text name="user_name_small" value="Jack oh look at me this is a super duper long name"/>
- <button name="copy_to_clipboard" tool_tip="Copier dans le presse-papiers"/>
- <text name="user_label" value="Nom d&apos;utilisateur :"/>
- <tab_container name="tabs">
- <panel label="PROFIL" name="panel_profile"/>
- <panel label="FAVORIS" name="panel_picks"/>
- <panel label="NOTES/PERSO" name="panel_notes"/>
- </tab_container>
-</panel>
diff --git a/indra/newview/skins/default/xui/fr/panel_status_bar.xml b/indra/newview/skins/default/xui/fr/panel_status_bar.xml
index e836c24a94..ac61eb7e52 100644
--- a/indra/newview/skins/default/xui/fr/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/fr/panel_status_bar.xml
@@ -17,12 +17,12 @@
</panel.string>
<panel name="balance_bg">
<text name="balance" tool_tip="Cliquer sur ce bouton pour actualiser votre solde en L$." value="20 L$"/>
- <button label="Achat de L$" name="buyL" tool_tip="Cliquer pour acheter plus de L$"/>
- <button label="Achats" name="goShop" tool_tip="Ouvrir la Place du marché Second Life"/>
+ <button label="Acheter L$" name="buyL" tool_tip="Cliquer pour acheter plus de L$."/>
+ <button label="Achats" name="goShop" tool_tip="Ouvrir la Place du marché Second Life."/>
</panel>
<text name="TimeText" tool_tip="Heure actuelle (Pacifique)">
00h00 PST
</text>
- <button name="media_toggle_btn" tool_tip="Arrêter tous les médias (musique, vidéo, pages web)"/>
- <button name="volume_btn" tool_tip="Contrôle du volume global"/>
+ <button name="media_toggle_btn" tool_tip="Arrêter tous les médias (musique, vidéo, pages web)."/>
+ <button name="volume_btn" tool_tip="Régler le volume global."/>
</panel>
diff --git a/indra/newview/skins/default/xui/it/floater_camera.xml b/indra/newview/skins/default/xui/it/floater_camera.xml
index be4b8e210d..7e6ca4307e 100644
--- a/indra/newview/skins/default/xui/it/floater_camera.xml
+++ b/indra/newview/skins/default/xui/it/floater_camera.xml
@@ -9,15 +9,6 @@
<floater.string name="move_tooltip">
Muovi la telecamera su e giù e a sinistra e destra
</floater.string>
- <floater.string name="camera_modes_title">
- Modalità della fotocamera
- </floater.string>
- <floater.string name="pan_mode_title">
- Ruota visuale - Ingrandisci - Panoramica
- </floater.string>
- <floater.string name="presets_mode_title">
- Visuali predefinite
- </floater.string>
<floater.string name="free_mode_title">
Vedi oggetto
</floater.string>
diff --git a/indra/newview/skins/default/xui/it/notifications.xml b/indra/newview/skins/default/xui/it/notifications.xml
index e19b84912a..2db0892cd6 100644
--- a/indra/newview/skins/default/xui/it/notifications.xml
+++ b/indra/newview/skins/default/xui/it/notifications.xml
@@ -978,7 +978,7 @@ Offri l&apos;amicizia a [NAME]?
</form>
</notification>
<notification name="RemoveFromFriends">
- Vuoi rimuovere [NAME] dalla lista dei tuoi amici?
+ Vuoi rimuovere &lt;nolink&gt;[NAME]&lt;/nolink&gt; dalla lista dei tuoi amici?
<usetemplate name="okcancelbuttons" notext="Annulla" yestext="OK"/>
</notification>
<notification name="RemoveMultipleFromFriends">
@@ -2125,10 +2125,10 @@ Verrà avviato il browser Web.
Oggetto: [SUBJECT], Messaggio: [MESSAGE]
</notification>
<notification name="FriendOnline">
- [NAME] è Online
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; è Online
</notification>
<notification name="FriendOffline">
- [NAME] è Offline
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; è Offline
</notification>
<notification name="AddSelfFriend">
Anche se sei molto simpatico, non puoi aggiungere te stesso all&apos;elenco degli amici.
@@ -2520,10 +2520,10 @@ Riprova tra qualche istante.
</form>
</notification>
<notification name="FriendshipAccepted">
- [NAME] ha accettato la tua offerta di amicizia.
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; ha accettato la tua offerta di amicizia.
</notification>
<notification name="FriendshipDeclined">
- [NAME] ha rifiutato la tua offerta di amicizia.
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; ha rifiutato la tua offerta di amicizia.
</notification>
<notification name="FriendshipAcceptedByMe">
Offerta di amicizia accettata.
diff --git a/indra/newview/skins/default/xui/it/panel_my_profile.xml b/indra/newview/skins/default/xui/it/panel_my_profile.xml
deleted file mode 100644
index 094b97962f..0000000000
--- a/indra/newview/skins/default/xui/it/panel_my_profile.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Profilo" name="panel_profile">
- <string name="no_partner_text" value="Nessuno"/>
- <string name="no_group_text" value="Nessuno"/>
- <string 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">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="scroll_content_panel">
- <panel name="second_life_image_panel">
- <text name="display_name_descr_text">
- Nome utente
- </text>
- <text name="name_descr_text">
- Nome visualizzato
- </text>
- <button label="Profilo" name="see_profile_btn" tool_tip="Visualizza profilo per questo avatar"/>
- </panel>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/it/panel_notes.xml b/indra/newview/skins/default/xui/it/panel_notes.xml
deleted file mode 100644
index e127138277..0000000000
--- a/indra/newview/skins/default/xui/it/panel_notes.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Note e Privacy" name="panel_notes">
- <layout_stack name="layout">
- <layout_panel name="notes_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <text name="status_message" value="Le mie note private:"/>
- <text name="status_message2" value="Consenti a questa persona di:"/>
- <check_box label="Vedere se sono online" name="status_check"/>
- <check_box label="Vedermi sulla mappa" name="map_check"/>
- <check_box label="Modificare, eliminare o prendere i miei oggetti" name="objects_check"/>
- </panel>
- </scroll_container>
- </layout_panel>
- <layout_panel name="notes_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="Aggiungi come amico" name="add_friend" tool_tip="Offri amicizia a questo residente"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="IM" name="im" tool_tip="Apri una sessione messaggio istantaneo"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="Chiama" name="call" tool_tip="Chiama questo residente"/>
- </layout_panel>
- <layout_panel name="show_on_map_btn_lp">
- <button label="Mappa" name="show_on_map_btn" tool_tip="Mostra il residente sulla mappa"/>
- </layout_panel>
- <layout_panel name="teleport_btn_lp">
- <button label="Teleport" name="teleport" tool_tip="Offri teleport"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/it/panel_profile.xml b/indra/newview/skins/default/xui/it/panel_profile.xml
deleted file mode 100644
index 309937c5a0..0000000000
--- a/indra/newview/skins/default/xui/it/panel_profile.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Profilo" name="panel_profile">
- <string name="CaptionTextAcctInfo">
- [ACCTTYPE]
-[PAYMENTINFO] [AGEVERIFICATION]
- </string>
- <string name="payment_update_link_url">
- http://www.secondlife.com/account/billing.php?lang=it-IT
- </string>
- <string name="partner_edit_link_url">
- http://www.secondlife.com/account/partners.php?lang=it
- </string>
- <string name="my_account_link_url" value="http://secondlife.com/my/account/index.php?lang=it-IT"/>
- <string name="no_partner_text" value="Nessuno"/>
- <string name="no_group_text" value="Nessuno"/>
- <string 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">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <panel name="second_life_image_panel">
- <text name="title_sl_descr_text" value="[SECOND_LIFE]:"/>
- </panel>
- <panel name="first_life_image_panel">
- <text name="title_rw_descr_text" value="Mondo reale:"/>
- </panel>
- <text name="title_member_text" value="Residente dal:"/>
- <text name="title_acc_status_text" value="Stato account:"/>
- <text name="title_partner_text" value="Partner:"/>
- <panel name="partner_data_panel">
- <text initial_value="(recupero)" name="partner_text"/>
- </panel>
- <text name="title_groups_text" value="Gruppi:"/>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
- <layout_stack name="layout_verb_buttons">
- <layout_panel name="profile_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="Aggiungi come amico" name="add_friend" tool_tip="Offri amicizia a questo residente"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="IM" name="im" tool_tip="Apri una sessione messaggio istantaneo"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="Chiama" name="call" tool_tip="Chiama questo residente"/>
- </layout_panel>
- <layout_panel name="chat_btn_lp">
- <button label="Teleport" name="teleport" tool_tip="Offri teleport"/>
- </layout_panel>
- <layout_panel name="overflow_btn_lp">
- <menu_button label="▼" name="overflow_btn" tool_tip="Paga del denaro o condividi qualcosa dall&apos;inventario con il residente"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- <layout_panel name="profile_me_buttons_panel">
- <button label="Modifica profilo" name="edit_profile_btn" tool_tip="Modifica le tue informazioni personali"/>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/it/panel_profile_view.xml b/indra/newview/skins/default/xui/it/panel_profile_view.xml
deleted file mode 100644
index 409eb5d1f4..0000000000
--- a/indra/newview/skins/default/xui/it/panel_profile_view.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel name="panel_target_profile">
- <string name="status_online">
- Online
- </string>
- <string name="status_offline">
- Offline
- </string>
- <text name="display_name_label" value="Nome visualizzato:"/>
- <text name="solo_username_label" value="Nome utente:"/>
- <text name="status" value="Online"/>
- <text name="user_name_small" value="Jack guarda quanto è lungo questo splendido nome"/>
- <text name="user_name" value="Jack Linden"/>
- <button name="copy_to_clipboard" tool_tip="Copia negli appunti"/>
- <text name="user_label" value="Nome utente:"/>
- <text name="user_slid" value="jack.linden"/>
- <tab_container name="tabs">
- <panel label="PROFILO" name="panel_profile"/>
- <panel label="LUOGHI CONSIGLIATI" name="panel_picks"/>
- <panel label="NOTE E PRIVACY" name="panel_notes"/>
- </tab_container>
-</panel>
diff --git a/indra/newview/skins/default/xui/it/strings.xml b/indra/newview/skins/default/xui/it/strings.xml
index e58ce0cd70..8f29233825 100644
--- a/indra/newview/skins/default/xui/it/strings.xml
+++ b/indra/newview/skins/default/xui/it/strings.xml
@@ -592,6 +592,9 @@ Prova ad accedere nuovamente tra un minuto.
<string name="mesh">
reticolo
</string>
+ <string name="AvatarEditingAppearance">
+ (Modifica Aspetto)
+ </string>
<string name="AvatarAway">
Assente
</string>
diff --git a/indra/newview/skins/default/xui/ja/floater_camera.xml b/indra/newview/skins/default/xui/ja/floater_camera.xml
index 5d3a048975..0661e17309 100644
--- a/indra/newview/skins/default/xui/ja/floater_camera.xml
+++ b/indra/newview/skins/default/xui/ja/floater_camera.xml
@@ -9,15 +9,6 @@
<floater.string name="move_tooltip">
カメラを上下左右に移動
</floater.string>
- <floater.string name="camera_modes_title">
- カメラモード
- </floater.string>
- <floater.string name="pan_mode_title">
- 旋回 - ズーム - 水平・垂直移動
- </floater.string>
- <floater.string name="presets_mode_title">
- 事前設定の視野
- </floater.string>
<floater.string name="free_mode_title">
オブジェクトを見る
</floater.string>
diff --git a/indra/newview/skins/default/xui/ja/notifications.xml b/indra/newview/skins/default/xui/ja/notifications.xml
index 85f09b4500..7dfa6d2f7a 100644
--- a/indra/newview/skins/default/xui/ja/notifications.xml
+++ b/indra/newview/skins/default/xui/ja/notifications.xml
@@ -1010,7 +1010,7 @@ L$ は返金されません。
</form>
</notification>
<notification name="RemoveFromFriends">
- フレンドリストから [NAME] を削除しますか?
+ フレンドリストから &lt;nolink&gt;[NAME]&lt;/nolink&gt; を削除しますか?
<usetemplate name="okcancelbuttons" notext="取り消し" yestext="OK"/>
</notification>
<notification name="RemoveMultipleFromFriends">
@@ -2167,10 +2167,10 @@ Web ページにリンクすると、他人がこの場所に簡単にアクセ
件名: [SUBJECT]、メッセージ: [MESSAGE]
</notification>
<notification name="FriendOnline">
- [NAME] はオンライン中です
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; はオンライン中です
</notification>
<notification name="FriendOffline">
- [NAME] はオフライン中です
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; はオフライン中です
</notification>
<notification name="AddSelfFriend">
残念ながら自分自身をフレンド登録することはできません。
@@ -2567,10 +2567,10 @@ Web ページにリンクすると、他人がこの場所に簡単にアクセ
</form>
</notification>
<notification name="FriendshipAccepted">
- [NAME]は、フレンド登録を受け入れました。
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt;は、フレンド登録を受け入れました。
</notification>
<notification name="FriendshipDeclined">
- [NAME]は、フレンド登録を断りました。
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt;は、フレンド登録を断りました。
</notification>
<notification name="FriendshipAcceptedByMe">
フレンドの登録依頼が承認されました。
diff --git a/indra/newview/skins/default/xui/ja/panel_my_profile.xml b/indra/newview/skins/default/xui/ja/panel_my_profile.xml
deleted file mode 100644
index a0d99ba5a8..0000000000
--- a/indra/newview/skins/default/xui/ja/panel_my_profile.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="プロフィール" name="panel_profile">
- <string name="CaptionTextAcctInfo">
- [ACCTTYPE]
-[PAYMENTINFO] [AGEVERIFICATION]
- </string>
- <string name="payment_update_link_url">
- http://www.secondlife.com/account/billing.php?lang=ja
- </string>
- <string name="partner_edit_link_url">
- http://www.secondlife.com/account/billing.php?lang=ja
- </string>
- <string name="my_account_link_url" value="http://secondlife.com/account"/>
- <string name="no_partner_text" value="なし"/>
- <string name="no_group_text" value="なし"/>
- <string 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">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="scroll_content_panel">
- <panel name="second_life_image_panel">
- <text name="display_name_descr_text">
- ユーザー名
- </text>
- <text name="name_descr_text">
- 表示名
- </text>
- <button label="プロフィール" name="see_profile_btn" tool_tip="このアバターのプロフィールを表示"/>
- </panel>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/ja/panel_notes.xml b/indra/newview/skins/default/xui/ja/panel_notes.xml
deleted file mode 100644
index aa6d823c59..0000000000
--- a/indra/newview/skins/default/xui/ja/panel_notes.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="メモとプライバシー" name="panel_notes">
- <layout_stack name="layout">
- <layout_panel name="notes_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <text name="status_message" value="個人的メモ:"/>
- <text name="status_message2" value="この人に許可:"/>
- <check_box label="オンライン状態の確認" name="status_check"/>
- <check_box label="地図で居場所を確認" name="map_check"/>
- <check_box label="私のオブジェクトの編集・削除・取得" name="objects_check"/>
- </panel>
- </scroll_container>
- </layout_panel>
- <layout_panel name="notes_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="フレンド登録" name="add_friend" tool_tip="フレンド登録を申し出ます"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="IM" name="im" tool_tip="インスタントメッセージを開きます"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="コール" name="call" tool_tip="この住人にコールする"/>
- </layout_panel>
- <layout_panel name="show_on_map_btn_lp">
- <button label="地図" name="show_on_map_btn" tool_tip="住人を地図上で表示する"/>
- </layout_panel>
- <layout_panel name="teleport_btn_lp">
- <button label="テレポート" name="teleport" tool_tip="テレポートを送ります"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/ja/panel_profile.xml b/indra/newview/skins/default/xui/ja/panel_profile.xml
deleted file mode 100644
index 1acad9f81a..0000000000
--- a/indra/newview/skins/default/xui/ja/panel_profile.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="プロフィール" name="panel_profile">
- <string name="CaptionTextAcctInfo">
- [ACCTTYPE]
-[PAYMENTINFO] [AGEVERIFICATION]
- </string>
- <string name="payment_update_link_url">
- http://www.secondlife.com/account/billing.php?lang=ja-JP
- </string>
- <string name="partner_edit_link_url">
- http://www.secondlife.com/account/partners.php?lang=ja
- </string>
- <string name="my_account_link_url" value="http://secondlife.com/my/account/index.php?lang=ja-JP"/>
- <string name="no_partner_text" value="なし"/>
- <string name="no_group_text" value="なし"/>
- <string 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">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <panel name="second_life_image_panel">
- <text name="title_sl_descr_text" value="[SECOND_LIFE]:"/>
- </panel>
- <panel name="first_life_image_panel">
- <text name="title_rw_descr_text" value="現実世界:"/>
- </panel>
- <text name="title_member_text" value="住人登録:"/>
- <text name="title_acc_status_text" value="アカウントの状態:"/>
- <text_editor name="acc_status_text">
- 住人。 支払情報未登録。
- リンデン。
- </text_editor>
- <text name="title_partner_text" value="パートナー:"/>
- <panel name="partner_data_panel">
- <text initial_value="(取得中)" name="partner_text"/>
- </panel>
- <text name="title_groups_text" value="グループ:"/>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
- <layout_stack name="layout_verb_buttons">
- <layout_panel name="profile_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="フレンド登録" name="add_friend" tool_tip="フレンド登録を申し出ます"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="IM" name="im" tool_tip="インスタントメッセージを開きます"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="コール" name="call" tool_tip="この住人にコールする"/>
- </layout_panel>
- <layout_panel name="chat_btn_lp">
- <button label="テレポート" name="teleport" tool_tip="テレポートを送ります"/>
- </layout_panel>
- <layout_panel name="overflow_btn_lp">
- <menu_button label="▼" name="overflow_btn" tool_tip="住人にお金を渡すか持ち物を共有します"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- <layout_panel name="profile_me_buttons_panel">
- <button label="プロフィールの編集" name="edit_profile_btn" tool_tip="個人的な情報を編集します"/>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/ja/panel_profile_view.xml b/indra/newview/skins/default/xui/ja/panel_profile_view.xml
deleted file mode 100644
index 5cb6575773..0000000000
--- a/indra/newview/skins/default/xui/ja/panel_profile_view.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel name="panel_target_profile">
- <string name="status_online">
- オンライン
- </string>
- <string name="status_offline">
- オフライン
- </string>
- <text name="display_name_label" value="表示名:"/>
- <text name="solo_username_label" value="ユーザー名:"/>
- <text name="status" value="オンライン"/>
- <text name="user_name_small" value="Jack oh look at me this is a super duper long name"/>
- <text name="user_name" value="Jack Linden"/>
- <button name="copy_to_clipboard" tool_tip="クリップボードにコピー"/>
- <text name="user_label" value="ユーザー名:"/>
- <text name="user_slid" value="jack.linden"/>
- <tab_container name="tabs">
- <panel label="プロフィール" name="panel_profile"/>
- <panel label="ピック" name="panel_picks"/>
- <panel label="メモとプライバシー" name="panel_notes"/>
- </tab_container>
-</panel>
diff --git a/indra/newview/skins/default/xui/pl/floater_camera.xml b/indra/newview/skins/default/xui/pl/floater_camera.xml
index 5b9dd47616..60f3cd0fff 100644
--- a/indra/newview/skins/default/xui/pl/floater_camera.xml
+++ b/indra/newview/skins/default/xui/pl/floater_camera.xml
@@ -9,15 +9,6 @@
<floater.string name="move_tooltip">
Poruszaj kamerą w dół/górę oraz w prawo/lewo
</floater.string>
- <floater.string name="camera_modes_title">
- Ustawienia
- </floater.string>
- <floater.string name="pan_mode_title">
- W prawo lub w lewo
- </floater.string>
- <floater.string name="presets_mode_title">
- Ustaw widok
- </floater.string>
<floater.string name="free_mode_title">
Zobacz obiekt
</floater.string>
diff --git a/indra/newview/skins/default/xui/pl/notifications.xml b/indra/newview/skins/default/xui/pl/notifications.xml
index 7d3225ea31..e1fb6dd3f1 100644
--- a/indra/newview/skins/default/xui/pl/notifications.xml
+++ b/indra/newview/skins/default/xui/pl/notifications.xml
@@ -946,7 +946,7 @@ Zaproponować znajomość [NAME]?
</form>
</notification>
<notification name="RemoveFromFriends">
- Czy chcesz usunąć [NAME] z listy znajomych?
+ Czy chcesz usunąć &lt;nolink&gt;[NAME]&lt;/nolink&gt; z listy znajomych?
<usetemplate name="okcancelbuttons" notext="Anuluj" yestext="OK"/>
</notification>
<notification name="RemoveMultipleFromFriends">
@@ -2078,10 +2078,10 @@ Zamieść go na stronie internetowej żeby umożliwić innym łatwy dostęp do t
Temat: [SUBJECT], Treść: [MESSAGE]
</notification>
<notification name="FriendOnline">
- [NAME] jest w Second Life
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; jest w Second Life
</notification>
<notification name="FriendOffline">
- [NAME] opuszcza Second Life
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; opuszcza Second Life
</notification>
<notification name="AddSelfFriend">
Nie możesz dodać siebie do listy znajomych.
@@ -2458,10 +2458,10 @@ Spróbuj ponowanie za kilka minut.
</form>
</notification>
<notification name="FriendshipAccepted">
- Twoja propozycja znajomości została przyjęta przez [NAME].
+ Twoja propozycja znajomości została przyjęta przez &lt;nolink&gt;[NAME]&lt;/nolink&gt;.
</notification>
<notification name="FriendshipDeclined">
- Twoja propozycja znajomości została odrzucona przez [NAME].
+ Twoja propozycja znajomości została odrzucona przez &lt;nolink&gt;[NAME]&lt;/nolink&gt;.
</notification>
<notification name="FriendshipAcceptedByMe">
Propozycja znajomości została zaakceptowana.
diff --git a/indra/newview/skins/default/xui/pl/panel_my_profile.xml b/indra/newview/skins/default/xui/pl/panel_my_profile.xml
deleted file mode 100644
index cdc833241d..0000000000
--- a/indra/newview/skins/default/xui/pl/panel_my_profile.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Profil" name="panel_profile">
- <string name="no_partner_text" value="Żadne"/>
- <string name="no_group_text" value="Żadne"/>
- <string 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">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="scroll_content_panel">
- <panel name="second_life_image_panel">
- <text name="display_name_descr_text">
- Nazwa użytkownika
- </text>
- <text name="name_descr_text">
- Wyświetlana nazwa
- </text>
- <button label="Profil" name="see_profile_btn" tool_tip="Zobacz profil tego awatara"/>
- </panel>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/pl/panel_notes.xml b/indra/newview/skins/default/xui/pl/panel_notes.xml
deleted file mode 100644
index 571171d64c..0000000000
--- a/indra/newview/skins/default/xui/pl/panel_notes.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Notatki &amp; Prywatność" name="panel_notes">
- <layout_stack name="layout">
- <layout_panel name="notes_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <text name="status_message" value="Notatki:"/>
- <text name="status_message2" value="Pozwól tej osobie na:"/>
- <check_box label="Widzenie mojego statusu" name="status_check"/>
- <check_box label="Lokalizowanie mnie na mapie" name="map_check"/>
- <check_box label="Edytowanie, kasowanie lub zabieranie moich obiektów" name="objects_check"/>
- </panel>
- </scroll_container>
- </layout_panel>
- <layout_panel name="notes_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="Dodaj do Znajomych" name="add_friend" tool_tip="Zaoferuj znajomość Rezydentowi"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="IM" name="im" tool_tip="Otwórz wiadomości IM"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="Dzwoń" name="call" tool_tip="Zadzwoń do Rezydenta"/>
- </layout_panel>
- <layout_panel name="show_on_map_btn_lp">
- <button label="Mapa" name="show_on_map_btn" tool_tip="Pokaż Rezydenta na mapie"/>
- </layout_panel>
- <layout_panel name="teleport_btn_lp">
- <button label="Teleportuj" name="teleport" tool_tip="Teleportuj"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/pl/panel_profile.xml b/indra/newview/skins/default/xui/pl/panel_profile.xml
deleted file mode 100644
index 77dd951bc4..0000000000
--- a/indra/newview/skins/default/xui/pl/panel_profile.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Profil" name="panel_profile">
- <string name="no_partner_text" value="Brak"/>
- <string name="no_group_text" value="Żadne"/>
- <string 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">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <panel name="second_life_image_panel">
- <text name="title_sl_descr_text" value="[SECOND_LIFE]:"/>
- </panel>
- <panel name="first_life_image_panel">
- <text name="title_rw_descr_text" value="Życie#1:"/>
- </panel>
- <text name="title_member_text" value="Urodziny:"/>
- <text name="title_acc_status_text" value="Konto:"/>
- <text name="title_partner_text" value="Partner:"/>
- <panel name="partner_data_panel">
- <text initial_value="(przetwarzanie)" name="partner_text"/>
- </panel>
- <text name="title_groups_text" value="Grupy:"/>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
- <layout_stack name="layout_verb_buttons">
- <layout_panel name="profile_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="Poznaj" name="add_friend" tool_tip="Zaproponuj znajomość Rezydentowi"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="IM" name="im" tool_tip="Otwórz wiadomości IM"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="Dzwoń" name="call" tool_tip="Zadzwoń do tego Rezydenta"/>
- </layout_panel>
- <layout_panel name="chat_btn_lp">
- <button label="Teleportuj" name="teleport" tool_tip="Teleportuj"/>
- </layout_panel>
- <layout_panel name="overflow_btn_lp">
- <menu_button label="▼" name="overflow_btn" tool_tip="Zapłać lub udostępnij obiekt Rezydentowi"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- <layout_panel name="profile_me_buttons_panel">
- <button label="Edytuj profil" name="edit_profile_btn" tool_tip="Edytuj informacje o sobie"/>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/pl/panel_profile_view.xml b/indra/newview/skins/default/xui/pl/panel_profile_view.xml
deleted file mode 100644
index 1fd6bc1d10..0000000000
--- a/indra/newview/skins/default/xui/pl/panel_profile_view.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel name="panel_target_profile">
- <string name="status_online">
- Obecnie w SL
- </string>
- <string name="status_offline">
- Nieaktywny
- </string>
- <text name="display_name_label" value="Wyświetlana nazwa:"/>
- <text name="solo_username_label" value="Nazwa użytkownika:"/>
- <text name="status" value="Obecnie w SL"/>
- <text name="user_name_small" value="Jack oh look at me this is a super duper long name"/>
- <button name="copy_to_clipboard" tool_tip="Kopiuj do schowka"/>
- <text name="user_label" value="Nazwa użytkownika:"/>
- <tab_container name="tabs">
- <panel label="PROFIL" name="panel_profile"/>
- <panel label="ULUBIONE" name="panel_picks"/>
- <panel label="NOTATKI &amp; PRYWATNOŚĆ" name="panel_notes"/>
- </tab_container>
-</panel>
diff --git a/indra/newview/skins/default/xui/pl/strings.xml b/indra/newview/skins/default/xui/pl/strings.xml
index 6a8309cca5..f6dec8536b 100644
--- a/indra/newview/skins/default/xui/pl/strings.xml
+++ b/indra/newview/skins/default/xui/pl/strings.xml
@@ -423,6 +423,9 @@
<string name="symbolic folder link">
link folderu
</string>
+ <string name="AvatarEditingAppearance">
+ (Edycja Wygląd)
+ </string>
<string name="AvatarAway">
Śpi
</string>
diff --git a/indra/newview/skins/default/xui/pt/floater_camera.xml b/indra/newview/skins/default/xui/pt/floater_camera.xml
index 0e4fc1b455..6b66d01781 100644
--- a/indra/newview/skins/default/xui/pt/floater_camera.xml
+++ b/indra/newview/skins/default/xui/pt/floater_camera.xml
@@ -9,15 +9,6 @@
<floater.string name="move_tooltip">
Mover a Câmera para Cima e para Baixo, para a Esquerda e para a Direita
</floater.string>
- <floater.string name="camera_modes_title">
- Modos de câmera
- </floater.string>
- <floater.string name="pan_mode_title">
- Pan zoom orbital
- </floater.string>
- <floater.string name="presets_mode_title">
- Ângulos predefinidos
- </floater.string>
<floater.string name="free_mode_title">
Visualizar objeto
</floater.string>
diff --git a/indra/newview/skins/default/xui/pt/notifications.xml b/indra/newview/skins/default/xui/pt/notifications.xml
index 4bd9f86e0f..d3547beeb3 100644
--- a/indra/newview/skins/default/xui/pt/notifications.xml
+++ b/indra/newview/skins/default/xui/pt/notifications.xml
@@ -973,7 +973,7 @@ Oferecer amizade para [NAME]?
</form>
</notification>
<notification name="RemoveFromFriends">
- Remover [NAME] da sua lista de amigos?
+ Remover &lt;nolink&gt;[NAME]&lt;/nolink&gt; da sua lista de amigos?
<usetemplate name="okcancelbuttons" notext="Cancelar" yestext="Remover"/>
</notification>
<notification name="RemoveMultipleFromFriends">
@@ -2109,10 +2109,10 @@ Isso abrirá o seu navegador.
Assunto: [SUBJECT], Mensagem: [MESSAGE]
</notification>
<notification name="FriendOnline">
- [NAME] está online
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; está online
</notification>
<notification name="FriendOffline">
- [NAME] está offline
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; está offline
</notification>
<notification name="AddSelfFriend">
Você é o máximo! Mesmo assim, não dá para adicionar a si mesmo(a) como amigo(a).
@@ -2501,10 +2501,10 @@ Cada um pode ver o status do outro (definição padrão).
</form>
</notification>
<notification name="FriendshipAccepted">
- [NAME] aceitou seu convite de amizade.
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; aceitou seu convite de amizade.
</notification>
<notification name="FriendshipDeclined">
- [NAME] recusou seu convite de amizade
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; recusou seu convite de amizade
</notification>
<notification name="FriendshipAcceptedByMe">
Oferta de amizada aceita.
diff --git a/indra/newview/skins/default/xui/pt/panel_my_profile.xml b/indra/newview/skins/default/xui/pt/panel_my_profile.xml
deleted file mode 100644
index aa15a2445d..0000000000
--- a/indra/newview/skins/default/xui/pt/panel_my_profile.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Perfil" name="panel_profile">
- <string name="no_partner_text" value="Nenhum"/>
- <string name="no_group_text" value="Nenhum"/>
- <string 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">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="scroll_content_panel">
- <panel name="second_life_image_panel">
- <text name="display_name_descr_text">
- Nome de usuário
- </text>
- <text name="name_descr_text">
- Nome de tela
- </text>
- <button label="Perfil" name="see_profile_btn" tool_tip="Ver o perfil deste avatar"/>
- </panel>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/pt/panel_notes.xml b/indra/newview/skins/default/xui/pt/panel_notes.xml
deleted file mode 100644
index c15e838b34..0000000000
--- a/indra/newview/skins/default/xui/pt/panel_notes.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Anotações e Privacidade" name="panel_notes">
- <layout_stack name="layout">
- <layout_panel name="notes_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <text name="status_message" value="Minhas anotações privadas:"/>
- <text name="status_message2" value="Deixar esta pessoa:"/>
- <check_box label="Ver meu status" name="status_check"/>
- <check_box label="Ver minha localização no mapa" name="map_check"/>
- <check_box label="Pegar, editar ou excluir objetos meus" name="objects_check"/>
- </panel>
- </scroll_container>
- </layout_panel>
- <layout_panel name="notes_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="Adicionar amigo" name="add_friend" tool_tip="Oferecer amizade ao residente"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="MI" name="im" tool_tip="Abrir sessão de mensagem instantânea"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="Ligar" name="call" tool_tip="Ligar para este residente"/>
- </layout_panel>
- <layout_panel name="show_on_map_btn_lp">
- <button label="Mapa" name="show_on_map_btn" tool_tip="Exibir o residente no mapa"/>
- </layout_panel>
- <layout_panel name="teleport_btn_lp">
- <button label="Teletransportar" name="teleport" tool_tip="Oferecer teletransporte"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/pt/panel_profile.xml b/indra/newview/skins/default/xui/pt/panel_profile.xml
deleted file mode 100644
index 075ef55dee..0000000000
--- a/indra/newview/skins/default/xui/pt/panel_profile.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Perfil" name="panel_profile">
- <string name="CaptionTextAcctInfo">
- [ACCTTYPE]
-[PAYMENTINFO] [AGEVERIFICATION]
- </string>
- <string name="payment_update_link_url">
- http://www.secondlife.com/account/billing.php?lang=pt-BR
- </string>
- <string name="partner_edit_link_url">
- http://www.secondlife.com/account/partners.php?lang=pt
- </string>
- <string name="my_account_link_url" value="http://secondlife.com/my/account/index.php?lang=pt-BR"/>
- <string name="no_partner_text" value="Ninguém"/>
- <string name="no_group_text" value="Nenhum"/>
- <string 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">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <panel name="second_life_image_panel">
- <text name="title_sl_descr_text" value="[SECOND_LIFE]:"/>
- </panel>
- <panel name="first_life_image_panel">
- <text name="title_rw_descr_text" value="Mundo real:"/>
- </panel>
- <text name="title_member_text" value="Residente desde:"/>
- <text name="title_acc_status_text" value="Conta:"/>
- <text name="title_partner_text" value="Parceiro(a):"/>
- <panel name="partner_data_panel">
- <text initial_value="(pesquisando)" name="partner_text"/>
- </panel>
- <text name="title_groups_text" value="Grupos:"/>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
- <layout_stack name="layout_verb_buttons">
- <layout_panel name="profile_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="Adicionar amigo" name="add_friend" tool_tip="Oferecer amizade ao residente"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="MI" name="im" tool_tip="Abrir sessão de mensagem instantânea"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="Ligar" name="call" tool_tip="Ligar para este residente"/>
- </layout_panel>
- <layout_panel name="chat_btn_lp">
- <button label="Teletransportar" name="teleport" tool_tip="Oferecer teletransporte"/>
- </layout_panel>
- <layout_panel name="overflow_btn_lp">
- <menu_button label="▼" name="overflow_btn" tool_tip="Pagar ou compartilhar inventário com o residente"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- <layout_panel name="profile_me_buttons_panel">
- <button label="Editar perfil" name="edit_profile_btn" tool_tip="Editar dados pessoais"/>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/pt/panel_profile_view.xml b/indra/newview/skins/default/xui/pt/panel_profile_view.xml
deleted file mode 100644
index d81ee08e6c..0000000000
--- a/indra/newview/skins/default/xui/pt/panel_profile_view.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel name="panel_target_profile">
- <string name="status_online">
- Conectado
- </string>
- <string name="status_offline">
- Desconectado
- </string>
- <text name="display_name_label" value="Nome de tela:"/>
- <text name="solo_username_label" value="Nome de usuário:"/>
- <text name="status" value="Conectado"/>
- <text name="user_name_small" value="Jack oh look at me this is a super duper long name"/>
- <button name="copy_to_clipboard" tool_tip="Copiar para área de transferência"/>
- <text name="user_label" value="Nome de usuário:"/>
- <tab_container name="tabs">
- <panel label="PERFIL" name="panel_profile"/>
- <panel label="DESTAQUES" name="panel_picks"/>
- <panel label="ANOTAÇÕES E PRIVACIDADE" name="panel_notes"/>
- </tab_container>
-</panel>
diff --git a/indra/newview/skins/default/xui/pt/strings.xml b/indra/newview/skins/default/xui/pt/strings.xml
index cc61ad76d7..4535c7aaeb 100644
--- a/indra/newview/skins/default/xui/pt/strings.xml
+++ b/indra/newview/skins/default/xui/pt/strings.xml
@@ -547,6 +547,9 @@ Titulares de contas gratuitas não poderão acessar o Second Life para acomodar
<string name="mesh">
mesh
</string>
+ <string name="AvatarEditingAppearance">
+ (Edição Aparência)
+ </string>
<string name="AvatarAway">
Distante
</string>
diff --git a/indra/newview/skins/default/xui/ru/floater_camera.xml b/indra/newview/skins/default/xui/ru/floater_camera.xml
index 7a1f530668..945a63c0eb 100644
--- a/indra/newview/skins/default/xui/ru/floater_camera.xml
+++ b/indra/newview/skins/default/xui/ru/floater_camera.xml
@@ -9,15 +9,6 @@
<floater.string name="move_tooltip">
Переместить камеру вверх, вниз, влево или вправо
</floater.string>
- <floater.string name="camera_modes_title">
- Режимы камеры
- </floater.string>
- <floater.string name="pan_mode_title">
- Вращение, приближение, сдвиг
- </floater.string>
- <floater.string name="presets_mode_title">
- Стандартные настройки
- </floater.string>
<floater.string name="free_mode_title">
Смотреть на объект
</floater.string>
diff --git a/indra/newview/skins/default/xui/ru/notifications.xml b/indra/newview/skins/default/xui/ru/notifications.xml
index d43d907164..1be14160ed 100644
--- a/indra/newview/skins/default/xui/ru/notifications.xml
+++ b/indra/newview/skins/default/xui/ru/notifications.xml
@@ -979,7 +979,7 @@
</form>
</notification>
<notification name="RemoveFromFriends">
- Удалить жителя [NAME] из вашего списка друзей?
+ Удалить жителя &lt;nolink&gt;[NAME]&lt;/nolink&gt; из вашего списка друзей?
<usetemplate name="okcancelbuttons" notext="Отмена" yestext="OK"/>
</notification>
<notification name="RemoveMultipleFromFriends">
@@ -2119,10 +2119,10 @@ http://secondlife.com/download.
Раздел: [SUBJECT], сообщение: [MESSAGE]
</notification>
<notification name="FriendOnline">
- [NAME] в сети
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; в сети
</notification>
<notification name="FriendOffline">
- [NAME] не в сети
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; не в сети
</notification>
<notification name="AddSelfFriend">
Вы лучше всех, но нельзя добавить в друзья себя самого.
@@ -2518,10 +2518,10 @@ http://secondlife.com/download.
</form>
</notification>
<notification name="FriendshipAccepted">
- [NAME] принял(а) ваше предложение дружить.
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; принял(а) ваше предложение дружить.
</notification>
<notification name="FriendshipDeclined">
- [NAME] отклонил(а) ваше предложение дружить.
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; отклонил(а) ваше предложение дружить.
</notification>
<notification name="FriendshipAcceptedByMe">
Предложение дружить принято.
diff --git a/indra/newview/skins/default/xui/ru/panel_my_profile.xml b/indra/newview/skins/default/xui/ru/panel_my_profile.xml
deleted file mode 100644
index 9117bfec18..0000000000
--- a/indra/newview/skins/default/xui/ru/panel_my_profile.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Профиль" name="panel_profile">
- <string name="CaptionTextAcctInfo">
- [ACCTTYPE]
-[PAYMENTINFO] [AGEVERIFICATION]
- </string>
- <string name="payment_update_link_url">
- http://www.secondlife.com/account/billing.php?lang=en
- </string>
- <string name="partner_edit_link_url">
- http://www.secondlife.com/account/partners.php?lang=en
- </string>
- <string name="my_account_link_url" value="http://secondlife.com/account"/>
- <string name="no_partner_text" value="Нет"/>
- <string name="no_group_text" value="Нет"/>
- <string 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">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="scroll_content_panel">
- <panel name="second_life_image_panel">
- <text name="display_name_descr_text">
- Имя пользователя
- </text>
- <text name="name_descr_text">
- Экранное имя
- </text>
- <button label="Профиль" name="see_profile_btn" tool_tip="Посмотреть профиль этого аватара"/>
- </panel>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/ru/panel_notes.xml b/indra/newview/skins/default/xui/ru/panel_notes.xml
deleted file mode 100644
index aa74383349..0000000000
--- a/indra/newview/skins/default/xui/ru/panel_notes.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Заметки и приватность" name="panel_notes">
- <layout_stack name="layout">
- <layout_panel name="notes_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <text name="status_message" value="Мои личные заметки:"/>
- <text name="status_message2" value="Разрешить этому жителю:"/>
- <check_box label="Видеть мой статус в сети" name="status_check"/>
- <check_box label="Видеть меня на карте" name="map_check"/>
- <check_box label="Редактировать, удалять или брать мои объекты" name="objects_check"/>
- </panel>
- </scroll_container>
- </layout_panel>
- <layout_panel name="notes_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="Добавить в друзья" name="add_friend" tool_tip="Предложить дружбу этому жителю"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="IM" name="im" tool_tip="Начать сеанс IM"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="Звонок" name="call" tool_tip="Позвонить этому жителю"/>
- </layout_panel>
- <layout_panel name="show_on_map_btn_lp">
- <button label="Карта" name="show_on_map_btn" tool_tip="Показать жителя на карте"/>
- </layout_panel>
- <layout_panel name="teleport_btn_lp">
- <button label="Телепортация" name="teleport" tool_tip="Предложить телепортацию"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/ru/panel_profile.xml b/indra/newview/skins/default/xui/ru/panel_profile.xml
deleted file mode 100644
index fab57d678c..0000000000
--- a/indra/newview/skins/default/xui/ru/panel_profile.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Профиль" name="panel_profile">
- <string name="CaptionTextAcctInfo">
- [ACCTTYPE]
-[PAYMENTINFO] [AGEVERIFICATION]
- </string>
- <string name="payment_update_link_url">
- http://www.secondlife.com/account/billing.php?lang=en
- </string>
- <string name="partner_edit_link_url">
- http://www.secondlife.com/account/partners.php?lang=en
- </string>
- <string name="my_account_link_url" value="http://secondlife.com/account"/>
- <string name="no_partner_text" value="Нет"/>
- <string name="no_group_text" value="Нет"/>
- <string 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">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <panel name="second_life_image_panel">
- <text name="title_sl_descr_text" value="[SECOND_LIFE]:"/>
- </panel>
- <panel name="first_life_image_panel">
- <text name="title_rw_descr_text" value="Реальный мир:"/>
- </panel>
- <text name="title_member_text" value="Обитатель SL с:"/>
- <text name="title_acc_status_text" value="Статус аккаунта:"/>
- <text name="title_partner_text" value="Партнер:"/>
- <panel name="partner_data_panel">
- <text initial_value="(получение информации)" name="partner_text"/>
- </panel>
- <text name="title_groups_text" value="Группы:"/>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
- <layout_stack name="layout_verb_buttons">
- <layout_panel name="profile_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="В друзья" name="add_friend" tool_tip="Предложить дружбу этому жителю"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="IM" name="im" tool_tip="Начать сеанс IM"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="Звонок" name="call" tool_tip="Позвонить этому жителю"/>
- </layout_panel>
- <layout_panel name="chat_btn_lp">
- <button label="Телепортация" name="teleport" tool_tip="Предложить телепортацию"/>
- </layout_panel>
- <layout_panel name="overflow_btn_lp">
- <menu_button label="▼" name="overflow_btn" tool_tip="Заплатить жителю или поделиться с ним вещами"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/ru/panel_profile_view.xml b/indra/newview/skins/default/xui/ru/panel_profile_view.xml
deleted file mode 100644
index c97c5afc01..0000000000
--- a/indra/newview/skins/default/xui/ru/panel_profile_view.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel name="panel_target_profile">
- <string name="status_online">
- Онлайн
- </string>
- <string name="status_offline">
- Оффлайн
- </string>
- <text name="display_name_label" value="Экранное имя:"/>
- <text name="solo_username_label" value="Имя пользователя:"/>
- <text name="status" value="Онлайн"/>
- <text name="user_name_small" value="Взгляни-ка, друг, какое длиннющее имя"/>
- <button name="copy_to_clipboard" tool_tip="Копировать в буфер обмена"/>
- <text name="user_label" value="Имя пользователя:"/>
- <tab_container name="tabs">
- <panel label="ПРОФИЛЬ" name="panel_profile"/>
- <panel label="ПОДБОРКА" name="panel_picks"/>
- <panel label="ЗАМЕТКИ И ДОСТУП" name="panel_notes"/>
- </tab_container>
-</panel>
diff --git a/indra/newview/skins/default/xui/tr/floater_camera.xml b/indra/newview/skins/default/xui/tr/floater_camera.xml
index 4161e6ea52..c92d4e9db4 100644
--- a/indra/newview/skins/default/xui/tr/floater_camera.xml
+++ b/indra/newview/skins/default/xui/tr/floater_camera.xml
@@ -9,15 +9,6 @@
<floater.string name="move_tooltip">
Kamerayı Yukarı ve Aşağı, Sola ve Sağa Hareket Ettir
</floater.string>
- <floater.string name="camera_modes_title">
- Kamera modları
- </floater.string>
- <floater.string name="pan_mode_title">
- Yörünge - Yakınlş. - Kamerayı Çvr.
- </floater.string>
- <floater.string name="presets_mode_title">
- Ön Ayarlı Görünümler
- </floater.string>
<floater.string name="free_mode_title">
Nesneyi Göster
</floater.string>
diff --git a/indra/newview/skins/default/xui/tr/notifications.xml b/indra/newview/skins/default/xui/tr/notifications.xml
index b62ff01ab9..6908f6867f 100644
--- a/indra/newview/skins/default/xui/tr/notifications.xml
+++ b/indra/newview/skins/default/xui/tr/notifications.xml
@@ -979,7 +979,7 @@ Etkin grubunuz adına arazi satın almak için gerekli izne sahip değilsiniz.
</form>
</notification>
<notification name="RemoveFromFriends">
- [NAME] adlı kişiyi Arkadaş Listenizden çıkarmak istiyor musunuz?
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; adlı kişiyi Arkadaş Listenizden çıkarmak istiyor musunuz?
<usetemplate name="okcancelbuttons" notext="İptal" yestext="Tamam"/>
</notification>
<notification name="RemoveMultipleFromFriends">
@@ -2119,10 +2119,10 @@ Bu adımda web tarayıcınızın başlatılacağına dikkat edin.
Konu: [SUBJECT], İleti: [MESSAGE]
</notification>
<notification name="FriendOnline">
- [NAME] Çevrimiçi
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; Çevrimiçi
</notification>
<notification name="FriendOffline">
- [NAME] Çevrimdışı
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; Çevrimdışı
</notification>
<notification name="AddSelfFriend">
Çok iyi biri olduğunuza eminiz fakat kendinizi arkadaş olarak ekleyemezsiniz.
@@ -2518,10 +2518,10 @@ Lütfen biraz sonra tekrar deneyin.
</form>
</notification>
<notification name="FriendshipAccepted">
- [NAME] arkadaşlık teklifinizi kabul etti.
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; arkadaşlık teklifinizi kabul etti.
</notification>
<notification name="FriendshipDeclined">
- [NAME] arkadaşlık teklifinizi reddetti.
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; arkadaşlık teklifinizi reddetti.
</notification>
<notification name="FriendshipAcceptedByMe">
Arkadaşlık teklifi kabul edildi.
diff --git a/indra/newview/skins/default/xui/tr/panel_my_profile.xml b/indra/newview/skins/default/xui/tr/panel_my_profile.xml
deleted file mode 100644
index fc0b9b6e03..0000000000
--- a/indra/newview/skins/default/xui/tr/panel_my_profile.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Profil" name="panel_profile">
- <string name="CaptionTextAcctInfo">
- [ACCTTYPE]
-[PAYMENTINFO] [AGEVERIFICATION]
- </string>
- <string name="payment_update_link_url">
- http://www.secondlife.com/account/billing.php?lang=en
- </string>
- <string name="partner_edit_link_url">
- http://www.secondlife.com/account/partners.php?lang=en
- </string>
- <string name="my_account_link_url" value="http://secondlife.com/account"/>
- <string name="no_partner_text" value="Hiçbiri"/>
- <string name="no_group_text" value="Hiçbiri"/>
- <string 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">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="scroll_content_panel">
- <panel name="second_life_image_panel">
- <text name="display_name_descr_text">
- Kullanıcı adı
- </text>
- <text name="name_descr_text">
- Görüntü Adı
- </text>
- <button label="Profil" name="see_profile_btn" tool_tip="Bu avatar profiline bak"/>
- </panel>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/tr/panel_notes.xml b/indra/newview/skins/default/xui/tr/panel_notes.xml
deleted file mode 100644
index ff5b60996a..0000000000
--- a/indra/newview/skins/default/xui/tr/panel_notes.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Notlar ve Gizlilik" name="panel_notes">
- <layout_stack name="layout">
- <layout_panel name="notes_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <text name="status_message" value="Özel notlarım:"/>
- <text name="status_message2" value="Bu kişiye şu izinler verilsin:"/>
- <check_box label="Çevrimiçi durumumu görme" name="status_check"/>
- <check_box label="Beni haritada görme" name="map_check"/>
- <check_box label="Nesnelerimi düzenleme, silme veya alma" name="objects_check"/>
- </panel>
- </scroll_container>
- </layout_panel>
- <layout_panel name="notes_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="Arkadaş Ekle" name="add_friend" tool_tip="Sakine arkadaşlık öner"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="Aİ" name="im" tool_tip="Anlık ileti oturumu aç"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="Ara" name="call" tool_tip="Bu Sakini ara"/>
- </layout_panel>
- <layout_panel name="show_on_map_btn_lp">
- <button label="Harita" name="show_on_map_btn" tool_tip="Sakini haritada göster"/>
- </layout_panel>
- <layout_panel name="teleport_btn_lp">
- <button label="Işınla" name="teleport" tool_tip="Işınlama teklif et"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/tr/panel_profile.xml b/indra/newview/skins/default/xui/tr/panel_profile.xml
deleted file mode 100644
index 4b7a964537..0000000000
--- a/indra/newview/skins/default/xui/tr/panel_profile.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Profil" name="panel_profile">
- <string name="CaptionTextAcctInfo">
- [ACCTTYPE]
-[PAYMENTINFO] [AGEVERIFICATION]
- </string>
- <string name="payment_update_link_url">
- http://www.secondlife.com/account/billing.php?lang=en
- </string>
- <string name="partner_edit_link_url">
- http://www.secondlife.com/account/partners.php?lang=en
- </string>
- <string name="my_account_link_url" value="http://secondlife.com/account"/>
- <string name="no_partner_text" value="Hiçbiri"/>
- <string name="no_group_text" value="Hiçbiri"/>
- <string 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">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <panel name="second_life_image_panel">
- <text name="title_sl_descr_text" value="[SECOND_LIFE]:"/>
- </panel>
- <panel name="first_life_image_panel">
- <text name="title_rw_descr_text" value="Gerçek Dünya:"/>
- </panel>
- <text name="title_member_text" value="Ne Zamandan Beri SL Sakini:"/>
- <text name="title_acc_status_text" value="Hesap Durumu:"/>
- <text name="title_partner_text" value="Partner:"/>
- <panel name="partner_data_panel">
- <text initial_value="(alınıyor)" name="partner_text"/>
- </panel>
- <text name="title_groups_text" value="Gruplar:"/>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
- <layout_stack name="layout_verb_buttons">
- <layout_panel name="profile_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="Arkadaş Ekle" name="add_friend" tool_tip="Sakine arkadaşlık öner"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="Aİ" name="im" tool_tip="Anlık ileti oturumu aç"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="Ara" name="call" tool_tip="Bu Sakini ara"/>
- </layout_panel>
- <layout_panel name="chat_btn_lp">
- <button label="Işınla" name="teleport" tool_tip="Işınlama teklif et"/>
- </layout_panel>
- <layout_panel name="overflow_btn_lp">
- <menu_button label="▼" name="overflow_btn" tool_tip="Sakine para öde veya envanteri paylaş"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/tr/panel_profile_view.xml b/indra/newview/skins/default/xui/tr/panel_profile_view.xml
deleted file mode 100644
index 17c5002bd7..0000000000
--- a/indra/newview/skins/default/xui/tr/panel_profile_view.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel name="panel_target_profile">
- <string name="status_online">
- Çevrimiçi
- </string>
- <string name="status_offline">
- Çevrimdışı
- </string>
- <text name="display_name_label" value="Ekran Adı:"/>
- <text name="solo_username_label" value="Kullanıcı Adı:"/>
- <text name="status" value="Çevrimiçi"/>
- <text name="user_name_small" value="Bak arkadaşım bu çok uzun bir ad"/>
- <button name="copy_to_clipboard" tool_tip="Panoya Kopyala"/>
- <text name="user_label" value="Kullanıcı Adı:"/>
- <tab_container name="tabs">
- <panel label="PROFİL" name="panel_profile"/>
- <panel label="SEÇMELER" name="panel_picks"/>
- <panel label="NOTLAR &amp; GİZLİLİK" name="panel_notes"/>
- </tab_container>
-</panel>
diff --git a/indra/newview/skins/default/xui/zh/floater_camera.xml b/indra/newview/skins/default/xui/zh/floater_camera.xml
index f4db20684c..b75474340c 100644
--- a/indra/newview/skins/default/xui/zh/floater_camera.xml
+++ b/indra/newview/skins/default/xui/zh/floater_camera.xml
@@ -9,15 +9,6 @@
<floater.string name="move_tooltip">
Move Camera Up and Down, Left and Right
</floater.string>
- <floater.string name="camera_modes_title">
- 攝影機模式
- </floater.string>
- <floater.string name="pan_mode_title">
- 環繞縮放平移
- </floater.string>
- <floater.string name="presets_mode_title">
- 預設視角
- </floater.string>
<floater.string name="free_mode_title">
視角物件
</floater.string>
diff --git a/indra/newview/skins/default/xui/zh/notifications.xml b/indra/newview/skins/default/xui/zh/notifications.xml
index 2d309a2af0..17ff6288a5 100644
--- a/indra/newview/skins/default/xui/zh/notifications.xml
+++ b/indra/newview/skins/default/xui/zh/notifications.xml
@@ -966,7 +966,7 @@ Offer friendship to [NAME]?
</form>
</notification>
<notification name="RemoveFromFriends">
- Do you want to remove [NAME] from your Friends List?
+ Do you want to remove &lt;nolink&gt;[NAME]&lt;/nolink&gt; from your Friends List?
<usetemplate name="okcancelbuttons" notext="取消" yestext="確定"/>
</notification>
<notification name="RemoveMultipleFromFriends">
@@ -2109,10 +2109,10 @@ Link to this from a web page to give others easy access to this location, or try
Topic: [SUBJECT], Message: [MESSAGE]
</notification>
<notification name="FriendOnline">
- [NAME] 上線
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; 上線
</notification>
<notification name="FriendOffline">
- [NAME] 離線
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; 離線
</notification>
<notification name="AddSelfFriend">
Although you&apos;re very nice, you can&apos;t add yourself as a friend.
@@ -2491,10 +2491,10 @@ Please try again in a few moments.
</form>
</notification>
<notification name="FriendshipAccepted">
- [NAME] accepted your friendship offer.
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; accepted your friendship offer.
</notification>
<notification name="FriendshipDeclined">
- [NAME] 謝絕你的交友邀請。
+ &lt;nolink&gt;[NAME]&lt;/nolink&gt; 謝絕你的交友邀請。
</notification>
<notification name="FriendshipAcceptedByMe">
交友邀請被接受。
diff --git a/indra/newview/skins/default/xui/zh/panel_my_profile.xml b/indra/newview/skins/default/xui/zh/panel_my_profile.xml
deleted file mode 100644
index 79817d7be9..0000000000
--- a/indra/newview/skins/default/xui/zh/panel_my_profile.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="檔案" name="panel_profile">
- <string name="CaptionTextAcctInfo">
- [ACCTTYPE]
-[PAYMENTINFO] [AGEVERIFICATION]
- </string>
- <string name="payment_update_link_url">
- http://www.secondlife.com/account/billing.php?lang=en
- </string>
- <string name="partner_edit_link_url">
- http://www.secondlife.com/account/partners.php?lang=en
- </string>
- <string name="my_account_link_url" value="http://secondlife.com/account"/>
- <string name="no_partner_text" value="無"/>
- <string name="no_group_text" value="無"/>
- <string 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">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="scroll_content_panel">
- <panel name="second_life_image_panel">
- <text name="display_name_descr_text">
- User name
- </text>
- <text name="name_descr_text">
- 顯示名稱
- </text>
- <button label="檔案" name="see_profile_btn" tool_tip="察看這位化身的檔案"/>
- </panel>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/zh/panel_notes.xml b/indra/newview/skins/default/xui/zh/panel_notes.xml
deleted file mode 100644
index 875c6bb328..0000000000
--- a/indra/newview/skins/default/xui/zh/panel_notes.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="Notes &amp; Privacy" name="panel_notes">
- <layout_stack name="layout">
- <layout_panel name="notes_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <text name="status_message" value="My private notes:"/>
- <text name="status_message2" value="允許這個人可以:"/>
- <check_box label="看到我上線狀態" name="status_check"/>
- <check_box label="在地圖上看見我" name="map_check"/>
- <check_box label="邊輯,刪除或取下我的物件" name="objects_check"/>
- </panel>
- </scroll_container>
- </layout_panel>
- <layout_panel name="notes_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="加為朋友" name="add_friend" tool_tip="向這個居民提出交友邀請"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="IM" name="im" tool_tip="開啟即時訊息會話"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="通話" name="call" tool_tip="與這位居民通話"/>
- </layout_panel>
- <layout_panel name="show_on_map_btn_lp">
- <button label="地圖" name="show_on_map_btn" tool_tip="在地圖上顯示這個居民"/>
- </layout_panel>
- <layout_panel name="teleport_btn_lp">
- <button label="瞬間傳送" name="teleport" tool_tip="發給瞬間傳送請求"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/zh/panel_profile.xml b/indra/newview/skins/default/xui/zh/panel_profile.xml
deleted file mode 100644
index 502449ac3a..0000000000
--- a/indra/newview/skins/default/xui/zh/panel_profile.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel label="檔案" name="panel_profile">
- <string name="CaptionTextAcctInfo">
- [ACCTTYPE]
-[PAYMENTINFO] [AGEVERIFICATION]
- </string>
- <string name="payment_update_link_url">
- http://www.secondlife.com/account/billing.php?lang=en
- </string>
- <string name="partner_edit_link_url">
- http://www.secondlife.com/account/partners.php?lang=en
- </string>
- <string name="my_account_link_url" value="http://secondlife.com/account"/>
- <string name="no_partner_text" value="無"/>
- <string name="no_group_text" value="無"/>
- <string 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">
- <layout_panel name="profile_stack">
- <scroll_container name="profile_scroll">
- <panel name="profile_scroll_panel">
- <panel name="second_life_image_panel">
- <text name="title_sl_descr_text" value="[SECOND_LIFE]:"/>
- </panel>
- <panel name="first_life_image_panel">
- <text name="title_rw_descr_text" value="真實世界:"/>
- </panel>
- <text name="title_member_text" value="成為居民自:"/>
- <text name="title_acc_status_text" value="帳戶狀態:"/>
- <text name="title_partner_text" value="配偶:"/>
- <panel name="partner_data_panel">
- <text initial_value="(檢索中)" name="partner_text"/>
- </panel>
- <text name="title_groups_text" value="群組:"/>
- </panel>
- </scroll_container>
- </layout_panel>
- </layout_stack>
- <layout_stack name="layout_verb_buttons">
- <layout_panel name="profile_buttons_panel">
- <layout_stack name="bottom_bar_ls">
- <layout_panel name="add_friend_btn_lp">
- <button label="加為朋友" name="add_friend" tool_tip="發出交友邀請給這居民"/>
- </layout_panel>
- <layout_panel name="im_btn_lp">
- <button label="IM" name="im" tool_tip="開啟即時訊息會話"/>
- </layout_panel>
- <layout_panel name="call_btn_lp">
- <button label="通話" name="call" tool_tip="與這位居民通話"/>
- </layout_panel>
- <layout_panel name="chat_btn_lp">
- <button label="瞬間傳送" name="teleport" tool_tip="發給瞬間傳送請求"/>
- </layout_panel>
- <layout_panel name="overflow_btn_lp">
- <menu_button label="▼" name="overflow_btn" tool_tip="支付金錢,或分享收納區給居民"/>
- </layout_panel>
- </layout_stack>
- </layout_panel>
- </layout_stack>
-</panel>
diff --git a/indra/newview/skins/default/xui/zh/panel_profile_view.xml b/indra/newview/skins/default/xui/zh/panel_profile_view.xml
deleted file mode 100644
index 2684287692..0000000000
--- a/indra/newview/skins/default/xui/zh/panel_profile_view.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<panel name="panel_target_profile">
- <string name="status_online">
- 上線
- </string>
- <string name="status_offline">
- 離線
- </string>
- <text name="display_name_label" value="顯示名稱:"/>
- <text name="solo_username_label" value="使用者名稱:"/>
- <text name="status" value="上線"/>
- <text name="user_name_small" value="Jack oh look at me this is a super duper long name"/>
- <button name="copy_to_clipboard" tool_tip="覆製到剪貼簿"/>
- <text name="user_label" value="使用者名稱:"/>
- <tab_container name="tabs">
- <panel label="檔案" name="panel_profile"/>
- <panel label="精選地點" name="panel_picks"/>
- <panel label="NOTES &amp; PRIVACY" name="panel_notes"/>
- </tab_container>
-</panel>
diff --git a/indra/test/llsd_new_tut.cpp b/indra/test/llsd_new_tut.cpp
index b2fa54a688..f928a1bad0 100644
--- a/indra/test/llsd_new_tut.cpp
+++ b/indra/test/llsd_new_tut.cpp
@@ -25,6 +25,7 @@
* $/LicenseInfo$
*/
+#define LLSD_DEBUG_INFO
#include <tut/tut.hpp>
#include "linden_common.h"
#include "lltut.h"
@@ -52,11 +53,11 @@ namespace tut
private:
U32 mOutstandingAtStart;
public:
- SDCleanupCheck() : mOutstandingAtStart(LLSD::outstandingCount()) { }
+ SDCleanupCheck() : mOutstandingAtStart(llsd::outstandingCount()) { }
~SDCleanupCheck()
{
ensure_equals("SDCleanupCheck",
- LLSD::outstandingCount(), mOutstandingAtStart);
+ llsd::outstandingCount(), mOutstandingAtStart);
}
};
@@ -70,12 +71,12 @@ namespace tut
SDAllocationCheck(const std::string& message, int expectedAllocations)
: mMessage(message),
mExpectedAllocations(expectedAllocations),
- mAllocationAtStart(LLSD::allocationCount())
+ mAllocationAtStart(llsd::allocationCount())
{ }
~SDAllocationCheck()
{
ensure_equals(mMessage + " SDAllocationCheck",
- LLSD::allocationCount() - mAllocationAtStart,
+ llsd::allocationCount() - mAllocationAtStart,
mExpectedAllocations);
}
};
@@ -756,6 +757,42 @@ namespace tut
{
SDAllocationCheck check("shared values test for threaded work", 9);
+ //U32 start_llsd_count = llsd::outstandingCount();
+
+ LLSD m = LLSD::emptyMap();
+
+ m["one"] = 1;
+ m["two"] = 2;
+ m["one_copy"] = m["one"]; // 3 (m, "one" and "two")
+
+ m["undef_one"] = LLSD();
+ m["undef_two"] = LLSD();
+ m["undef_one_copy"] = m["undef_one"];
+
+ { // Ensure first_array gets freed to avoid counting it
+ LLSD first_array = LLSD::emptyArray();
+ first_array.append(1.0f);
+ first_array.append(2.0f);
+ first_array.append(3.0f); // 7
+
+ m["array"] = first_array;
+ m["array_clone"] = first_array;
+ m["array_copy"] = m["array"]; // 7
+ }
+
+ m["string_one"] = "string one value";
+ m["string_two"] = "string two value";
+ m["string_one_copy"] = m["string_one"]; // 9
+
+ //U32 llsd_object_count = llsd::outstandingCount();
+ //std::cout << "Using " << (llsd_object_count - start_llsd_count) << " LLSD objects" << std::endl;
+
+ //m.dumpStats();
+ }
+
+ {
+ SDAllocationCheck check("shared values test for threaded work", 9);
+
//U32 start_llsd_count = LLSD::outstandingCount();
LLSD m = LLSD::emptyMap();
diff --git a/indra/test/lltut.cpp b/indra/test/lltut.cpp
index da7031b52a..c43a8f0c7d 100644
--- a/indra/test/lltut.cpp
+++ b/indra/test/lltut.cpp
@@ -34,6 +34,7 @@
#include "llformat.h"
#include "llsd.h"
#include "lluri.h"
+#include "stringize.h"
namespace tut
{
@@ -144,6 +145,10 @@ namespace tut
}
return;
}
+ default:
+ // should never get here, but compiler produces warning if we
+ // don't cover this case, and at Linden warnings are fatal.
+ throw failure(STRINGIZE("invalid type field " << actual.type()));
}
}