summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/cmake/CMakeLists.txt2
-rw-r--r--indra/cmake/Copy3rdPartyLibs.cmake389
-rw-r--r--indra/cmake/DeploySharedLibs.cmake42
-rw-r--r--indra/cmake/GetPrerequisites_2_8.cmake786
-rw-r--r--indra/cmake/LLAddBuildTest.cmake13
-rw-r--r--indra/cmake/LLSharedLibs.cmake71
-rw-r--r--indra/cmake/Linking.cmake5
-rwxr-xr-xindra/develop.py3
-rw-r--r--indra/lib/python/indra/util/llmanifest.py5
-rw-r--r--indra/llcommon/CMakeLists.txt39
-rw-r--r--indra/llcommon/llprocesslauncher.h8
-rw-r--r--indra/llmath/llinterp.h7
-rw-r--r--indra/llplugin/llpluginclassmedia.cpp4
-rw-r--r--indra/llplugin/llpluginclassmedia.h2
-rw-r--r--indra/llplugin/llpluginmessage.cpp5
-rw-r--r--indra/llplugin/llpluginmessage.h1
-rw-r--r--indra/llplugin/llpluginprocessparent.cpp31
-rw-r--r--indra/llplugin/llpluginprocessparent.h5
-rw-r--r--indra/llprimitive/llmediaentry.cpp8
-rw-r--r--indra/llprimitive/tests/llmediaentry_test.cpp206
-rw-r--r--indra/llui/llconsole.cpp2
-rw-r--r--indra/llui/llfloater.cpp2
-rw-r--r--indra/llui/llhelp.h2
-rw-r--r--indra/llui/lllayoutstack.cpp43
-rw-r--r--indra/llui/lllayoutstack.h8
-rw-r--r--indra/llui/llmenugl.cpp6
-rw-r--r--indra/llui/llmenugl.h4
-rw-r--r--indra/llui/llscrolllistcolumn.cpp11
-rw-r--r--indra/llui/llscrolllistctrl.cpp2
-rw-r--r--indra/llui/llstyle.cpp1
-rw-r--r--indra/llui/llstyle.h7
-rw-r--r--indra/llui/lltabcontainer.cpp41
-rw-r--r--indra/llui/lltextbase.cpp5
-rw-r--r--indra/llui/lltexteditor.cpp3
-rw-r--r--indra/llui/lltooltip.cpp8
-rw-r--r--indra/llui/lltooltip.h6
-rw-r--r--indra/llui/lluicolortable.cpp13
-rw-r--r--indra/llui/lluictrlfactory.cpp6
-rw-r--r--indra/llui/lluictrlfactory.h7
-rw-r--r--indra/llui/lluiimage.cpp7
-rw-r--r--indra/llui/llview.cpp3
-rw-r--r--indra/llui/llview.h3
-rw-r--r--indra/mac_crash_logger/CMakeLists.txt7
-rw-r--r--indra/mac_updater/CMakeLists.txt5
-rw-r--r--indra/newview/CMakeLists.txt153
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/llagent.cpp8
-rw-r--r--indra/newview/llagentui.cpp6
-rw-r--r--indra/newview/llappviewer.cpp2
-rw-r--r--indra/newview/llavatariconctrl.cpp73
-rw-r--r--indra/newview/llavatariconctrl.h5
-rw-r--r--indra/newview/llavatarpropertiesprocessor.cpp120
-rw-r--r--indra/newview/llavatarpropertiesprocessor.h52
-rw-r--r--indra/newview/llbottomtray.cpp2
-rw-r--r--indra/newview/llchannelmanager.cpp2
-rw-r--r--indra/newview/llchiclet.cpp305
-rw-r--r--indra/newview/llchiclet.h102
-rw-r--r--indra/newview/lldebugview.cpp14
-rw-r--r--indra/newview/lldebugview.h2
-rw-r--r--indra/newview/lldrawable.cpp2
-rw-r--r--indra/newview/lldynamictexture.cpp2
-rw-r--r--indra/newview/llface.cpp2
-rw-r--r--indra/newview/llfasttimerview.cpp7
-rw-r--r--indra/newview/llfloaterauction.cpp4
-rw-r--r--indra/newview/llfloatermediasettings.cpp9
-rw-r--r--indra/newview/llfloaterpreference.cpp73
-rw-r--r--indra/newview/llfloaterpreference.h5
-rw-r--r--indra/newview/llfloaterproperties.cpp2
-rw-r--r--indra/newview/llfloatersearch.cpp7
-rw-r--r--indra/newview/llfloatersnapshot.cpp46
-rw-r--r--indra/newview/llfloatertools.cpp41
-rw-r--r--indra/newview/llfloateruipreview.cpp1
-rw-r--r--indra/newview/llfolderview.cpp2
-rw-r--r--indra/newview/llgrouplist.cpp10
-rw-r--r--indra/newview/llhudicon.cpp8
-rw-r--r--indra/newview/llhudrender.cpp6
-rw-r--r--indra/newview/llhudtext.cpp16
-rw-r--r--indra/newview/llimfloater.cpp2
-rw-r--r--indra/newview/llimhandler.cpp2
-rw-r--r--indra/newview/llimview.cpp6
-rw-r--r--indra/newview/llinventorymodel.cpp7
-rw-r--r--indra/newview/llmanip.cpp14
-rw-r--r--indra/newview/llmaniprotate.cpp10
-rw-r--r--indra/newview/llmanipscale.cpp9
-rw-r--r--indra/newview/llmaniptranslate.cpp14
-rwxr-xr-xindra/newview/llmediadataclient.cpp21
-rwxr-xr-xindra/newview/llmediadataclient.h8
-rw-r--r--indra/newview/llmemoryview.cpp4
-rw-r--r--indra/newview/llmoveview.cpp7
-rw-r--r--indra/newview/llnavigationbar.cpp18
-rw-r--r--indra/newview/llnearbychat.cpp2
-rw-r--r--indra/newview/llnearbychathandler.cpp4
-rw-r--r--indra/newview/llnotificationalerthandler.cpp2
-rw-r--r--indra/newview/llnotificationgrouphandler.cpp2
-rw-r--r--indra/newview/llnotificationofferhandler.cpp2
-rw-r--r--indra/newview/llnotificationscripthandler.cpp2
-rw-r--r--indra/newview/llnotificationtiphandler.cpp2
-rw-r--r--indra/newview/llpanelclassified.cpp526
-rw-r--r--indra/newview/llpanelclassified.h136
-rw-r--r--indra/newview/llpanelimcontrolpanel.cpp21
-rw-r--r--indra/newview/llpanelimcontrolpanel.h2
-rw-r--r--indra/newview/llpanellandmarkinfo.cpp31
-rw-r--r--indra/newview/llpanellogin.cpp2
-rw-r--r--indra/newview/llpanelmediasettingsgeneral.cpp69
-rw-r--r--indra/newview/llpanelmediasettingsgeneral.h23
-rw-r--r--indra/newview/llpanelmediasettingspermissions.cpp21
-rw-r--r--indra/newview/llpanelmediasettingspermissions.h46
-rw-r--r--indra/newview/llpanelmediasettingssecurity.cpp54
-rw-r--r--indra/newview/llpanelmediasettingssecurity.h56
-rw-r--r--indra/newview/llpanelpeople.cpp133
-rw-r--r--indra/newview/llpanelpeople.h5
-rw-r--r--indra/newview/llpanelpeoplemenus.cpp1
-rw-r--r--indra/newview/llpanelpick.cpp3
-rw-r--r--indra/newview/llpanelpicks.cpp486
-rw-r--r--indra/newview/llpanelpicks.h90
-rw-r--r--indra/newview/llpanelplaceinfo.cpp25
-rw-r--r--indra/newview/llpanelplaceinfo.h3
-rw-r--r--indra/newview/llpanelplaceprofile.cpp48
-rw-r--r--indra/newview/llpanelplaceprofile.h4
-rw-r--r--indra/newview/llpanelplaces.cpp1
-rw-r--r--indra/newview/llpanelprimmediacontrols.cpp9
-rw-r--r--indra/newview/llpanelprofile.cpp1
-rw-r--r--indra/newview/llpanelteleporthistory.cpp2
-rw-r--r--indra/newview/llparticipantlist.cpp148
-rw-r--r--indra/newview/llparticipantlist.h24
-rw-r--r--indra/newview/llpreview.cpp2
-rw-r--r--indra/newview/llpreviewtexture.cpp4
-rw-r--r--indra/newview/llrecentpeople.cpp17
-rw-r--r--indra/newview/llscreenchannel.cpp6
-rw-r--r--indra/newview/llsidetray.cpp249
-rw-r--r--indra/newview/llsidetray.h14
-rw-r--r--indra/newview/llspeakbutton.cpp2
-rw-r--r--indra/newview/llstartup.cpp9
-rw-r--r--indra/newview/llsyswellwindow.cpp2
-rw-r--r--indra/newview/lltexturecache.cpp2
-rw-r--r--indra/newview/lltoolbar.cpp2
-rw-r--r--indra/newview/lltoolfocus.cpp6
-rw-r--r--indra/newview/lltoolgrab.cpp14
-rw-r--r--indra/newview/lltoolgun.cpp4
-rw-r--r--indra/newview/lltoolpie.cpp46
-rw-r--r--indra/newview/llviewercamera.cpp16
-rw-r--r--indra/newview/llviewerdisplay.cpp42
-rw-r--r--indra/newview/llviewerhelp.cpp23
-rw-r--r--indra/newview/llviewerhelp.h3
-rw-r--r--indra/newview/llviewermedia.cpp56
-rw-r--r--indra/newview/llviewermenu.cpp24
-rw-r--r--indra/newview/llviewermenu.h5
-rw-r--r--indra/newview/llviewermenufile.cpp4
-rw-r--r--indra/newview/llviewermessage.cpp2
-rw-r--r--indra/newview/llviewerstats.cpp4
-rw-r--r--indra/newview/llviewerwindow.cpp442
-rw-r--r--indra/newview/llviewerwindow.h42
-rw-r--r--indra/newview/llviewerwindowlistener.cpp4
-rw-r--r--indra/newview/llvoicechannel.cpp3
-rw-r--r--indra/newview/llvoicechannel.h7
-rw-r--r--indra/newview/llvovolume.cpp13
-rw-r--r--indra/newview/llvovolume.h5
-rw-r--r--indra/newview/pipeline.cpp30
-rw-r--r--indra/newview/skins/default/colors.xml2
-rw-r--r--indra/newview/skins/default/textures/icons/AudioMute_Off.pngbin0 -> 600 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/AudioMute_Over.pngbin0 -> 587 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Audio_Off.pngbin0 -> 467 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Audio_Press.pngbin0 -> 477 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/ExternalBrowser_Off.pngbin0 -> 279 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Pause_Off.pngbin0 -> 163 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Pause_Over.pngbin0 -> 160 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Pause_Press.pngbin0 -> 156 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Play_Off.pngbin0 -> 293 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Play_Over.pngbin0 -> 258 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Play_Press.pngbin0 -> 287 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/SkipBackward_Off.pngbin0 -> 293 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/SkipForward_Off.pngbin0 -> 304 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/StopReload_Off.pngbin0 -> 533 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/StopReload_Over.pngbin0 -> 529 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Zoom_Off.pngbin0 -> 435 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/parcel_color_EVRY.pngbin0 -> 393 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/parcel_color_EXP.pngbin0 -> 272 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/parcel_color_M.pngbin0 -> 306 bytes
-rw-r--r--indra/newview/skins/default/textures/navbar/Flag.pngbin0 -> 338 bytes
-rw-r--r--indra/newview/skins/default/textures/navbar/Lock.pngbin0 -> 302 bytes
-rw-r--r--indra/newview/skins/default/textures/textures.xml58
-rw-r--r--indra/newview/skins/default/xui/en/floater_aaa.xml21
-rw-r--r--indra/newview/skins/default/xui/en/floater_search.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_test_textbox.xml92
-rw-r--r--indra/newview/skins/default/xui/en/fonts.xml8
-rw-r--r--indra/newview/skins/default/xui/en/main_view.xml159
-rw-r--r--indra/newview/skins/default/xui/en/menu_participant_list.xml31
-rw-r--r--indra/newview/skins/default/xui/en/menu_people_nearby_view_sort.xml39
-rw-r--r--indra/newview/skins/default/xui/en/menu_picks_plus.xml22
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml22
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml12
-rw-r--r--indra/newview/skins/default/xui/en/panel_bottomtray.xml89
-rw-r--r--indra/newview/skins/default/xui/en/panel_classified_info.xml183
-rw-r--r--indra/newview/skins/default/xui/en/panel_classifieds_list_item.xml83
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_classified.xml255
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_pick.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_notify.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_landmark_info.xml28
-rw-r--r--indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml8
-rw-r--r--indra/newview/skins/default/xui/en/panel_picks.xml43
-rw-r--r--indra/newview/skins/default/xui/en/panel_place_profile.xml523
-rw-r--r--indra/newview/skins/default/xui/en/panel_places.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_advanced.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_chat.xml82
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_general.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml14
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_privacy.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_stand_stop_flying.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_status_bar.xml2
-rw-r--r--indra/newview/skins/default/xui/en/widgets/context_menu.xml2
-rw-r--r--indra/newview/skins/default/xui/en/widgets/inspector.xml8
-rw-r--r--indra/newview/skins/default/xui/en/widgets/scroll_column_header.xml9
-rw-r--r--indra/newview/skins/default/xui/en/widgets/side_tray.xml9
-rw-r--r--indra/newview/skins/default/xui/en/widgets/toggleable_menu.xml2
-rw-r--r--indra/newview/tests/llmediadataclient_test.cpp35
-rwxr-xr-xindra/newview/viewer_manifest.py94
-rw-r--r--indra/test_apps/llplugintest/CMakeLists.txt43
-rw-r--r--indra/win_crash_logger/CMakeLists.txt3
-rw-r--r--indra/win_updater/CMakeLists.txt3
-rw-r--r--install.xml6
220 files changed, 6048 insertions, 2104 deletions
diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt
index 4563b59ad2..4fc25dcc24 100644
--- a/indra/cmake/CMakeLists.txt
+++ b/indra/cmake/CMakeLists.txt
@@ -16,7 +16,7 @@ set(cmake_SOURCE_FILES
CARes.cmake
CURL.cmake
CMakeCopyIfDifferent.cmake
- CopyWinLibs.cmake
+ Copy3rdPartyLibs.cmake
CSharpMacros.cmake
DBusGlib.cmake
DirectX.cmake
diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake
new file mode 100644
index 0000000000..af407d52de
--- /dev/null
+++ b/indra/cmake/Copy3rdPartyLibs.cmake
@@ -0,0 +1,389 @@
+# -*- cmake -*-
+
+# The copy_win_libs folder contains file lists and a script used to
+# copy dlls, exes and such needed to run the SecondLife from within
+# VisualStudio.
+
+include(CMakeCopyIfDifferent)
+
+###################################################################
+# set up platform specific lists of files that need to be copied
+###################################################################
+if(WINDOWS)
+ set(SHARED_LIB_STAGING_DIR_DEBUG "${SHARED_LIB_STAGING_DIR}/Debug")
+ set(SHARED_LIB_STAGING_DIR_RELWITHDEBINFO "${SHARED_LIB_STAGING_DIR}/RelWithDebInfo")
+ set(SHARED_LIB_STAGING_DIR_RELEASE "${SHARED_LIB_STAGING_DIR}/Release")
+
+ #*******************************
+ # VIVOX - *NOTE: no debug version
+ set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-win32")
+ set(vivox_files
+ SLVoice.exe
+ alut.dll
+ vivoxsdk.dll
+ ortp.dll
+ wrap_oal.dll
+ )
+
+ #*******************************
+ # Misc shared libs
+
+ # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables
+ # or ARCH_PREBUILT_DIRS
+ set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug")
+ set(debug_files
+ openjpegd.dll
+ libtcmalloc_minimal-debug.dll
+ libapr-1.dll
+ libaprutil-1.dll
+ libapriconv-1.dll
+ )
+
+ # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables
+ # or ARCH_PREBUILT_DIRS
+ set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release")
+ set(release_files
+ openjpeg.dll
+ libtcmalloc_minimal.dll
+ libapr-1.dll
+ libaprutil-1.dll
+ libapriconv-1.dll
+ )
+
+ if (FMOD_SDK_DIR)
+ set(fmod_files fmod.dll)
+ endif (FMOD_SDK_DIR)
+
+ #*******************************
+ # LLKDU
+ set(internal_llkdu_path "${CMAKE_SOURCE_DIR}/llkdu")
+ if(NOT EXISTS ${internal_llkdu_path})
+ if (EXISTS "${debug_src_dir}/llkdu.dll")
+ set(debug_llkdu_src "${debug_src_dir}/llkdu.dll")
+ set(debug_llkdu_dst "${SHARED_LIB_STAGING_DIR_DEBUG}/llkdu.dll")
+ endif (EXISTS "${debug_src_dir}/llkdu.dll")
+
+ if (EXISTS "${release_src_dir}/llkdu.dll")
+ set(release_llkdu_src "${release_src_dir}/llkdu.dll")
+ set(release_llkdu_dst "${SHARED_LIB_STAGING_DIR_RELEASE}/llkdu.dll")
+ set(relwithdebinfo_llkdu_dst "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}/llkdu.dll")
+ endif (EXISTS "${release_src_dir}/llkdu.dll")
+ endif (NOT EXISTS ${internal_llkdu_path})
+
+#*******************************
+# Copy MS C runtime dlls, required for packaging.
+# *TODO - Adapt this to support VC9
+if (MSVC80)
+ FIND_PATH(debug_msvc8_redist_path msvcr80d.dll
+ PATHS
+ [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VC;ProductDir]/redist/Debug_NonRedist/x86/Microsoft.VC80.DebugCRT
+ NO_DEFAULT_PATH
+ NO_DEFAULT_PATH
+ )
+
+ if(EXISTS ${debug_msvc8_redist_path})
+ set(debug_msvc8_files
+ msvcr80d.dll
+ msvcp80d.dll
+ Microsoft.VC80.DebugCRT.manifest
+ )
+
+ copy_if_different(
+ ${debug_msvc8_redist_path}
+ "${SHARED_LIB_STAGING_DIR_DEBUG}"
+ out_targets
+ ${debug_msvc8_files}
+ )
+ set(third_party_targets ${third_party_targets} ${out_targets})
+
+ endif (EXISTS ${debug_msvc8_redist_path})
+
+ FIND_PATH(release_msvc8_redist_path msvcr80.dll
+ PATHS
+ [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VC;ProductDir]/redist/x86/Microsoft.VC80.CRT
+ NO_DEFAULT_PATH
+ NO_DEFAULT_PATH
+ )
+
+ if(EXISTS ${release_msvc8_redist_path})
+ set(release_msvc8_files
+ msvcr80.dll
+ msvcp80.dll
+ Microsoft.VC80.CRT.manifest
+ )
+
+ copy_if_different(
+ ${release_msvc8_redist_path}
+ "${SHARED_LIB_STAGING_DIR_RELEASE}"
+ out_targets
+ ${release_msvc8_files}
+ )
+ set(third_party_targets ${third_party_targets} ${out_targets})
+
+ copy_if_different(
+ ${release_msvc8_redist_path}
+ "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}"
+ out_targets
+ ${release_msvc8_files}
+ )
+ set(third_party_targets ${third_party_targets} ${out_targets})
+
+ endif (EXISTS ${release_msvc8_redist_path})
+endif (MSVC80)
+
+elseif(DARWIN)
+ set(SHARED_LIB_STAGING_DIR_DEBUG "${SHARED_LIB_STAGING_DIR}/Debug/Resources")
+ set(SHARED_LIB_STAGING_DIR_RELWITHDEBINFO "${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/Resources")
+ set(SHARED_LIB_STAGING_DIR_RELEASE "${SHARED_LIB_STAGING_DIR}/Release/Resources")
+
+ set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/universal-darwin")
+ set(vivox_files
+ SLVoice
+ libalut.dylib
+ libopenal.dylib
+ libortp.dylib
+ libvivoxsdk.dylib
+ )
+ # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables
+ # or ARCH_PREBUILT_DIRS
+ set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/universal-darwin/lib_debug")
+ set(debug_files
+ )
+ # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables
+ # or ARCH_PREBUILT_DIRS
+ set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/universal-darwin/lib_release")
+ set(release_files
+ libapr-1.0.3.7.dylib
+ libapr-1.dylib
+ libaprutil-1.0.3.8.dylib
+ libaprutil-1.dylib
+ libexpat.0.5.0.dylib
+ libexpat.dylib
+ libllqtwebkit.dylib
+ libndofdev.dylib
+ )
+
+ # fmod is statically linked on darwin
+ set(fmod_files "")
+
+ #*******************************
+ # LLKDU
+ set(internal_llkdu_path "${CMAKE_SOURCE_DIR}/llkdu")
+ if(NOT EXISTS ${internal_llkdu_path})
+ if (EXISTS "${debug_src_dir}/libllkdu.dylib")
+ set(debug_llkdu_src "${debug_src_dir}/libllkdu.dylib")
+ set(debug_llkdu_dst "${SHARED_LIB_STAGING_DIR_DEBUG}/libllkdu.dylib")
+ endif (EXISTS "${debug_src_dir}/libllkdu.dylib")
+
+ if (EXISTS "${release_src_dir}/libllkdu.dylib")
+ set(release_llkdu_src "${release_src_dir}/libllkdu.dylib")
+ set(release_llkdu_dst "${SHARED_LIB_STAGING_DIR_RELEASE}/libllkdu.dylib")
+ set(relwithdebinfo_llkdu_dst "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}/libllkdu.dylib")
+ endif (EXISTS "${release_src_dir}/libllkdu.dylib")
+ endif (NOT EXISTS ${internal_llkdu_path})
+elseif(LINUX)
+ # linux is weird, multiple side by side configurations aren't supported
+ # and we don't seem to have any debug shared libs built yet anyways...
+ set(SHARED_LIB_STAGING_DIR_DEBUG "${SHARED_LIB_STAGING_DIR}")
+ set(SHARED_LIB_STAGING_DIR_RELWITHDEBINFO "${SHARED_LIB_STAGING_DIR}")
+ set(SHARED_LIB_STAGING_DIR_RELEASE "${SHARED_LIB_STAGING_DIR}")
+
+ set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-linux")
+ set(vivox_files
+ libalut.so
+ libopenal.so.1
+ libortp.so
+ libvivoxsdk.so
+ SLVoice
+ )
+ # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables
+ # or ARCH_PREBUILT_DIRS
+ set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-linux/lib_debug")
+ set(debug_files
+ )
+ # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables
+ # or ARCH_PREBUILT_DIRS
+ set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-linux/lib_release_client")
+ # *FIX - figure out what to do with duplicate libalut.so here -brad
+ set(release_files
+ libapr-1.so.0
+ libaprutil-1.so.0
+ libatk-1.0.so
+ libcrypto.so
+ libdb-4.2.so
+ libexpat.so
+ libgmock_main.so
+ libgmock.so.0
+ libgmodule-2.0.so
+ libgobject-2.0.so
+ libgtest_main.so
+ libgtest.so.0
+ libopenal.so
+ libopenjpeg.so
+ libssl.so
+ libstacktrace.so
+ libtcmalloc.so
+ libuuid.so.1
+ libz.so
+ libssl.so.0.9.7
+ )
+
+ if (FMOD_SDK_DIR)
+ set(fmod_files "libfmod-3.75.so")
+ endif (FMOD_SDK_DIR)
+
+ #*******************************
+ # LLKDU
+ set(internal_llkdu_path "${CMAKE_SOURCE_DIR}/llkdu")
+ if(NOT EXISTS ${internal_llkdu_path})
+ if (EXISTS "${debug_src_dir}/libllkdu.so")
+ set(debug_llkdu_src "${debug_src_dir}/libllkdu.so")
+ set(debug_llkdu_dst "${SHARED_LIB_STAGING_DIR_DEBUG}/libllkdu.so")
+ endif (EXISTS "${debug_src_dir}/libllkdu.so")
+
+ if (EXISTS "${release_src_dir}/libllkdu.so")
+ set(release_llkdu_src "${release_src_dir}/libllkdu.so")
+ set(release_llkdu_dst "${SHARED_LIB_STAGING_DIR_RELEASE}/libllkdu.so")
+ set(relwithdebinfo_llkdu_dst "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}/libllkdu.so")
+ endif (EXISTS "${release_src_dir}/libllkdu.so")
+ endif(NOT EXISTS ${internal_llkdu_path})
+else(WINDOWS)
+ message(STATUS "WARNING: unrecognized platform for staging 3rd party libs, skipping...")
+ set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-linux")
+ set(vivox_files "")
+ # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables
+ # or ARCH_PREBUILT_DIRS
+ set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-linux/lib/debug")
+ set(debug_files "")
+ # *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables
+ # or ARCH_PREBUILT_DIRS
+ set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-linux/lib/release")
+ set(release_files "")
+
+ set(fmod_files "")
+
+ set(debug_llkdu_src "")
+ set(debug_llkdu_dst "")
+ set(release_llkdu_src "")
+ set(release_llkdu_dst "")
+ set(relwithdebinfo_llkdu_dst "")
+endif(WINDOWS)
+
+
+################################################################
+# Done building the file lists, now set up the copy commands.
+################################################################
+
+copy_if_different(
+ ${vivox_src_dir}
+ "${SHARED_LIB_STAGING_DIR_DEBUG}"
+ out_targets
+ ${vivox_files}
+ )
+set(third_party_targets ${third_party_targets} ${out_targets})
+
+copy_if_different(
+ ${vivox_src_dir}
+ "${SHARED_LIB_STAGING_DIR_RELEASE}"
+ out_targets
+ ${vivox_files}
+ )
+set(third_party_targets ${third_party_targets} ${out_targets})
+
+copy_if_different(
+ ${vivox_src_dir}
+ "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}"
+ out_targets
+ ${vivox_files}
+ )
+set(third_party_targets ${third_party_targets} ${out_targets})
+
+
+
+copy_if_different(
+ ${debug_src_dir}
+ "${SHARED_LIB_STAGING_DIR_DEBUG}"
+ out_targets
+ ${debug_files}
+ )
+set(third_party_targets ${third_party_targets} ${out_targets})
+
+copy_if_different(
+ ${release_src_dir}
+ "${SHARED_LIB_STAGING_DIR_RELEASE}"
+ out_targets
+ ${release_files}
+ )
+set(third_party_targets ${third_party_targets} ${out_targets})
+
+copy_if_different(
+ ${release_src_dir}
+ "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}"
+ out_targets
+ ${release_files}
+ )
+set(third_party_targets ${third_party_targets} ${out_targets})
+
+if (FMOD_SDK_DIR)
+ copy_if_different(
+ ${FMOD_SDK_DIR}
+ "${CMAKE_CURRENT_BINARY_DIR}/Debug"
+ out_targets
+ ${fmod_files}
+ )
+ set(all_targets ${all_targets} ${out_targets})
+ copy_if_different(
+ ${FMOD_SDK_DIR}
+ "${CMAKE_CURRENT_BINARY_DIR}/Release"
+ out_targets
+ ${fmod_files}
+ )
+ set(all_targets ${all_targets} ${out_targets})
+ copy_if_different(
+ ${FMOD_SDK_DIR}
+ "${CMAKE_CURRENT_BINARY_DIR}/RelWithDbgInfo"
+ out_targets
+ ${fmod_files}
+ )
+ set(all_targets ${all_targets} ${out_targets})
+endif (FMOD_SDK_DIR)
+
+#*******************************
+# LLKDU
+set(internal_llkdu_path "${CMAKE_SOURCE_DIR}/llkdu")
+if(NOT EXISTS ${internal_llkdu_path})
+ if (EXISTS "${debug_llkdu_src}")
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${debug_llkdu_dst}
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${debug_llkdu_src} ${debug_llkdu_dst}
+ DEPENDS ${debug_llkdu_src}
+ COMMENT "Copying llkdu.dll ${SHARED_LIB_STAGING_DIR_DEBUG}"
+ )
+ set(third_party_targets ${third_party_targets} $} ${debug_llkdu_dst})
+ endif (EXISTS "${debug_llkdu_src}")
+
+ if (EXISTS "${release_llkdu_src}")
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${release_llkdu_dst}
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${release_llkdu_src} ${release_llkdu_dst}
+ DEPENDS ${release_llkdu_src}
+ COMMENT "Copying llkdu.dll ${SHARED_LIB_STAGING_DIR_RELEASE}"
+ )
+ set(third_party_targets ${third_party_targets} ${release_llkdu_dst})
+
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${relwithdebinfo_llkdu_dst}
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${release_llkdu_src} ${relwithdebinfo_llkdu_dst}
+ DEPENDS ${release_llkdu_src}
+ COMMENT "Copying llkdu.dll ${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}"
+ )
+ set(third_party_targets ${third_party_targets} ${relwithdebinfo_llkdu_dst})
+ endif (EXISTS "${release_llkdu_src}")
+
+endif (NOT EXISTS ${internal_llkdu_path})
+
+
+add_custom_target(stage_third_party_libs ALL
+ DEPENDS
+ ${third_party_targets}
+ )
diff --git a/indra/cmake/DeploySharedLibs.cmake b/indra/cmake/DeploySharedLibs.cmake
index a7e772bd75..663c272e50 100644
--- a/indra/cmake/DeploySharedLibs.cmake
+++ b/indra/cmake/DeploySharedLibs.cmake
@@ -6,8 +6,14 @@
# BIN_NAME= The full path the the binary to search for dependecies.
# SEARCH_DIRS= The full paths to dirs to search for dependencies.
# DST_PATH= The full path where the dependecies will be copied.
-include(GetPrerequisites)
+
+# *FIX:Mani - I pulled in the CMake 2.8 GetPrerequisites.cmake script here, because it works on windows where 2.6 did not.
+# Once we have officially upgraded to 2.8 we can just use that version of GetPrerequisites.cmake.
+get_filename_component(current_dir ${CMAKE_CURRENT_LIST_FILE} PATH)
+include(${current_dir}/GetPrerequisites_2_8.cmake)
+
message("Getting recursive dependencies for file: ${BIN_NAME}")
+
set(EXCLUDE_SYSTEM 1)
set(RECURSE 1)
get_filename_component(EXE_PATH ${BIN_NAME} PATH)
@@ -26,42 +32,42 @@ endif(DEP_FILES)
foreach(DEP_FILE ${DEP_FILES})
if(FOUND_FILES)
- list(FIND FOUND_FILES ${DEP_FILE} FOUND)
+ list(FIND FOUND_FILES ${DEP_FILE} FOUND)
else(FOUND_FILES)
- set(FOUND -1)
+ set(FOUND -1)
endif(FOUND_FILES)
if(FOUND EQUAL -1)
- find_path(DEP_PATH ${DEP_FILE} PATHS ${SEARCH_DIRS} NO_DEFAULT_PATH)
- if(DEP_PATH)
- set(FOUND_FILES ${FOUND_FILES} "${DEP_PATH}/${DEP_FILE}")
- set(DEP_PATH NOTFOUND) #reset DEP_PATH for the next find_path call.
- else(DEP_PATH)
- set(MISSING_FILES ${MISSING_FILES} ${DEP_FILE})
- endif(DEP_PATH)
+ find_path(DEP_PATH ${DEP_FILE} PATHS ${SEARCH_DIRS} NO_DEFAULT_PATH)
+ if(DEP_PATH)
+ set(FOUND_FILES ${FOUND_FILES} "${DEP_PATH}/${DEP_FILE}")
+ set(DEP_PATH NOTFOUND) #reset DEP_PATH for the next find_path call.
+ else(DEP_PATH)
+ set(MISSING_FILES ${MISSING_FILES} ${DEP_FILE})
+ endif(DEP_PATH)
endif(FOUND EQUAL -1)
endforeach(DEP_FILE)
if(MISSING_FILES)
message("Missing:")
foreach(FILE ${MISSING_FILES})
- message(" ${FILE}")
+ message(" ${FILE}")
endforeach(FILE)
message("Searched in:")
foreach(SEARCH_DIR ${SEARCH_DIRS})
- message(" ${SEARCH_DIR}")
+ message(" ${SEARCH_DIR}")
endforeach(SEARCH_DIR)
message(FATAL_ERROR "Failed")
endif(MISSING_FILES)
if(FOUND_FILES)
foreach(FILE ${FOUND_FILES})
- get_filename_component(DST_FILE ${FILE} NAME)
- set(DST_FILE "${DST_PATH}/${DST_FILE}")
- message("Copying ${FILE} to ${DST_FILE}")
- execute_process(
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${FILE} ${DST_FILE}
- )
+ get_filename_component(DST_FILE ${FILE} NAME)
+ set(DST_FILE "${DST_PATH}/${DST_FILE}")
+ message("Copying ${FILE} to ${DST_FILE}")
+ execute_process(
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${FILE} ${DST_FILE}
+ )
endforeach(FILE ${FOUND_FILES})
endif(FOUND_FILES)
message("Success!")
diff --git a/indra/cmake/GetPrerequisites_2_8.cmake b/indra/cmake/GetPrerequisites_2_8.cmake
new file mode 100644
index 0000000000..5a24842c89
--- /dev/null
+++ b/indra/cmake/GetPrerequisites_2_8.cmake
@@ -0,0 +1,786 @@
+# GetPrerequisites.cmake
+#
+# This script provides functions to list the .dll, .dylib or .so files that an
+# executable or shared library file depends on. (Its prerequisites.)
+#
+# It uses various tools to obtain the list of required shared library files:
+# dumpbin (Windows)
+# ldd (Linux/Unix)
+# otool (Mac OSX)
+#
+# The following functions are provided by this script:
+# gp_append_unique
+# is_file_executable
+# gp_item_default_embedded_path
+# (projects can override with gp_item_default_embedded_path_override)
+# gp_resolve_item
+# (projects can override with gp_resolve_item_override)
+# gp_resolved_file_type
+# gp_file_type
+# get_prerequisites
+# list_prerequisites
+# list_prerequisites_by_glob
+#
+# Requires CMake 2.6 or greater because it uses function, break, return and
+# PARENT_SCOPE.
+
+#=============================================================================
+# Copyright 2008-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+# gp_append_unique list_var value
+#
+# Append value to the list variable ${list_var} only if the value is not
+# already in the list.
+#
+function(gp_append_unique list_var value)
+ set(contains 0)
+
+ foreach(item ${${list_var}})
+ if("${item}" STREQUAL "${value}")
+ set(contains 1)
+ break()
+ endif("${item}" STREQUAL "${value}")
+ endforeach(item)
+
+ if(NOT contains)
+ set(${list_var} ${${list_var}} "${value}" PARENT_SCOPE)
+ endif(NOT contains)
+endfunction(gp_append_unique)
+
+
+# is_file_executable file result_var
+#
+# Return 1 in ${result_var} if ${file} is a binary executable.
+#
+# Return 0 in ${result_var} otherwise.
+#
+function(is_file_executable file result_var)
+ #
+ # A file is not executable until proven otherwise:
+ #
+ set(${result_var} 0 PARENT_SCOPE)
+
+ get_filename_component(file_full "${file}" ABSOLUTE)
+ string(TOLOWER "${file_full}" file_full_lower)
+
+ # If file name ends in .exe on Windows, *assume* executable:
+ #
+ if(WIN32)
+ if("${file_full_lower}" MATCHES "\\.exe$")
+ set(${result_var} 1 PARENT_SCOPE)
+ return()
+ endif("${file_full_lower}" MATCHES "\\.exe$")
+
+ # A clause could be added here that uses output or return value of dumpbin
+ # to determine ${result_var}. In 99%+? practical cases, the exe name
+ # match will be sufficient...
+ #
+ endif(WIN32)
+
+ # Use the information returned from the Unix shell command "file" to
+ # determine if ${file_full} should be considered an executable file...
+ #
+ # If the file command's output contains "executable" and does *not* contain
+ # "text" then it is likely an executable suitable for prerequisite analysis
+ # via the get_prerequisites macro.
+ #
+ if(UNIX)
+ if(NOT file_cmd)
+ find_program(file_cmd "file")
+ endif(NOT file_cmd)
+
+ if(file_cmd)
+ execute_process(COMMAND "${file_cmd}" "${file_full}"
+ OUTPUT_VARIABLE file_ov
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+
+ # Replace the name of the file in the output with a placeholder token
+ # (the string " _file_full_ ") so that just in case the path name of
+ # the file contains the word "text" or "executable" we are not fooled
+ # into thinking "the wrong thing" because the file name matches the
+ # other 'file' command output we are looking for...
+ #
+ string(REPLACE "${file_full}" " _file_full_ " file_ov "${file_ov}")
+ string(TOLOWER "${file_ov}" file_ov)
+
+ #message(STATUS "file_ov='${file_ov}'")
+ if("${file_ov}" MATCHES "executable")
+ #message(STATUS "executable!")
+ if("${file_ov}" MATCHES "text")
+ #message(STATUS "but text, so *not* a binary executable!")
+ else("${file_ov}" MATCHES "text")
+ set(${result_var} 1 PARENT_SCOPE)
+ return()
+ endif("${file_ov}" MATCHES "text")
+ endif("${file_ov}" MATCHES "executable")
+ else(file_cmd)
+ message(STATUS "warning: No 'file' command, skipping execute_process...")
+ endif(file_cmd)
+ endif(UNIX)
+endfunction(is_file_executable)
+
+
+# gp_item_default_embedded_path item default_embedded_path_var
+#
+# Return the path that others should refer to the item by when the item
+# is embedded inside a bundle.
+#
+# Override on a per-project basis by providing a project-specific
+# gp_item_default_embedded_path_override function.
+#
+function(gp_item_default_embedded_path item default_embedded_path_var)
+
+ # On Windows and Linux, "embed" prerequisites in the same directory
+ # as the executable by default:
+ #
+ set(path "@executable_path")
+ set(overridden 0)
+
+ # On the Mac, relative to the executable depending on the type
+ # of the thing we are embedding:
+ #
+ if(APPLE)
+ #
+ # The assumption here is that all executables in the bundle will be
+ # in same-level-directories inside the bundle. The parent directory
+ # of an executable inside the bundle should be MacOS or a sibling of
+ # MacOS and all embedded paths returned from here will begin with
+ # "@executable_path/../" and will work from all executables in all
+ # such same-level-directories inside the bundle.
+ #
+
+ # By default, embed things right next to the main bundle executable:
+ #
+ set(path "@executable_path/../../Contents/MacOS")
+
+ # Embed .dylibs right next to the main bundle executable:
+ #
+ if(item MATCHES "\\.dylib$")
+ set(path "@executable_path/../MacOS")
+ set(overridden 1)
+ endif(item MATCHES "\\.dylib$")
+
+ # Embed frameworks in the embedded "Frameworks" directory (sibling of MacOS):
+ #
+ if(NOT overridden)
+ if(item MATCHES "[^/]+\\.framework/")
+ set(path "@executable_path/../Frameworks")
+ set(overridden 1)
+ endif(item MATCHES "[^/]+\\.framework/")
+ endif(NOT overridden)
+ endif()
+
+ # Provide a hook so that projects can override the default embedded location
+ # of any given library by whatever logic they choose:
+ #
+ if(COMMAND gp_item_default_embedded_path_override)
+ gp_item_default_embedded_path_override("${item}" path)
+ endif(COMMAND gp_item_default_embedded_path_override)
+
+ set(${default_embedded_path_var} "${path}" PARENT_SCOPE)
+endfunction(gp_item_default_embedded_path)
+
+
+# gp_resolve_item context item exepath dirs resolved_item_var
+#
+# Resolve an item into an existing full path file.
+#
+# Override on a per-project basis by providing a project-specific
+# gp_resolve_item_override function.
+#
+function(gp_resolve_item context item exepath dirs resolved_item_var)
+ set(resolved 0)
+ set(resolved_item "${item}")
+
+ # Is it already resolved?
+ #
+ if(EXISTS "${resolved_item}")
+ set(resolved 1)
+ endif(EXISTS "${resolved_item}")
+
+ if(NOT resolved)
+ if(item MATCHES "@executable_path")
+ #
+ # @executable_path references are assumed relative to exepath
+ #
+ string(REPLACE "@executable_path" "${exepath}" ri "${item}")
+ get_filename_component(ri "${ri}" ABSOLUTE)
+
+ if(EXISTS "${ri}")
+ #message(STATUS "info: embedded item exists (${ri})")
+ set(resolved 1)
+ set(resolved_item "${ri}")
+ else(EXISTS "${ri}")
+ message(STATUS "warning: embedded item does not exist '${ri}'")
+ endif(EXISTS "${ri}")
+ endif(item MATCHES "@executable_path")
+ endif(NOT resolved)
+
+ if(NOT resolved)
+ if(item MATCHES "@loader_path")
+ #
+ # @loader_path references are assumed relative to the
+ # PATH of the given "context" (presumably another library)
+ #
+ get_filename_component(contextpath "${context}" PATH)
+ string(REPLACE "@loader_path" "${contextpath}" ri "${item}")
+ get_filename_component(ri "${ri}" ABSOLUTE)
+
+ if(EXISTS "${ri}")
+ #message(STATUS "info: embedded item exists (${ri})")
+ set(resolved 1)
+ set(resolved_item "${ri}")
+ else(EXISTS "${ri}")
+ message(STATUS "warning: embedded item does not exist '${ri}'")
+ endif(EXISTS "${ri}")
+ endif(item MATCHES "@loader_path")
+ endif(NOT resolved)
+
+ if(NOT resolved)
+ set(ri "ri-NOTFOUND")
+ find_file(ri "${item}" ${exepath} ${dirs} NO_DEFAULT_PATH)
+ find_file(ri "${item}" ${exepath} ${dirs} /usr/lib)
+ if(ri)
+ #message(STATUS "info: 'find_file' in exepath/dirs (${ri})")
+ set(resolved 1)
+ set(resolved_item "${ri}")
+ set(ri "ri-NOTFOUND")
+ endif(ri)
+ endif(NOT resolved)
+
+ if(NOT resolved)
+ if(item MATCHES "[^/]+\\.framework/")
+ set(fw "fw-NOTFOUND")
+ find_file(fw "${item}"
+ "~/Library/Frameworks"
+ "/Library/Frameworks"
+ "/System/Library/Frameworks"
+ )
+ if(fw)
+ #message(STATUS "info: 'find_file' found framework (${fw})")
+ set(resolved 1)
+ set(resolved_item "${fw}")
+ set(fw "fw-NOTFOUND")
+ endif(fw)
+ endif(item MATCHES "[^/]+\\.framework/")
+ endif(NOT resolved)
+
+ # Using find_program on Windows will find dll files that are in the PATH.
+ # (Converting simple file names into full path names if found.)
+ #
+ if(WIN32)
+ if(NOT resolved)
+ set(ri "ri-NOTFOUND")
+ find_program(ri "${item}" PATHS "${exepath};${dirs}" NO_DEFAULT_PATH)
+ find_program(ri "${item}" PATHS "${exepath};${dirs}")
+ if(ri)
+ #message(STATUS "info: 'find_program' in exepath/dirs (${ri})")
+ set(resolved 1)
+ set(resolved_item "${ri}")
+ set(ri "ri-NOTFOUND")
+ endif(ri)
+ endif(NOT resolved)
+ endif(WIN32)
+
+ # Provide a hook so that projects can override item resolution
+ # by whatever logic they choose:
+ #
+ if(COMMAND gp_resolve_item_override)
+ gp_resolve_item_override("${context}" "${item}" "${exepath}" "${dirs}" resolved_item resolved)
+ endif(COMMAND gp_resolve_item_override)
+
+ if(NOT resolved)
+ message(STATUS "
+warning: cannot resolve item '${item}'
+
+ possible problems:
+ need more directories?
+ need to use InstallRequiredSystemLibraries?
+ run in install tree instead of build tree?
+")
+# message(STATUS "
+#******************************************************************************
+#warning: cannot resolve item '${item}'
+#
+# possible problems:
+# need more directories?
+# need to use InstallRequiredSystemLibraries?
+# run in install tree instead of build tree?
+#
+# context='${context}'
+# item='${item}'
+# exepath='${exepath}'
+# dirs='${dirs}'
+# resolved_item_var='${resolved_item_var}'
+#******************************************************************************
+#")
+ endif(NOT resolved)
+
+ set(${resolved_item_var} "${resolved_item}" PARENT_SCOPE)
+endfunction(gp_resolve_item)
+
+
+# gp_resolved_file_type original_file file exepath dirs type_var
+#
+# Return the type of ${file} with respect to ${original_file}. String
+# describing type of prerequisite is returned in variable named ${type_var}.
+#
+# Use ${exepath} and ${dirs} if necessary to resolve non-absolute ${file}
+# values -- but only for non-embedded items.
+#
+# Possible types are:
+# system
+# local
+# embedded
+# other
+#
+function(gp_resolved_file_type original_file file exepath dirs type_var)
+ #message(STATUS "**")
+
+ if(NOT IS_ABSOLUTE "${original_file}")
+ message(STATUS "warning: gp_resolved_file_type expects absolute full path for first arg original_file")
+ endif()
+
+ set(is_embedded 0)
+ set(is_local 0)
+ set(is_system 0)
+
+ set(resolved_file "${file}")
+
+ if("${file}" MATCHES "^@(executable|loader)_path")
+ set(is_embedded 1)
+ endif()
+
+ if(NOT is_embedded)
+ if(NOT IS_ABSOLUTE "${file}")
+ gp_resolve_item("${original_file}" "${file}" "${exepath}" "${dirs}" resolved_file)
+ endif()
+
+ string(TOLOWER "${original_file}" original_lower)
+ string(TOLOWER "${resolved_file}" lower)
+
+ if(UNIX)
+ if(resolved_file MATCHES "^(/lib/|/lib32/|/lib64/|/usr/lib/|/usr/lib32/|/usr/lib64/|/usr/X11R6/)")
+ set(is_system 1)
+ endif()
+ endif()
+
+ if(APPLE)
+ if(resolved_file MATCHES "^(/System/Library/|/usr/lib/)")
+ set(is_system 1)
+ endif()
+ endif()
+
+ if(WIN32)
+ string(TOLOWER "$ENV{SystemRoot}" sysroot)
+ string(REGEX REPLACE "\\\\" "/" sysroot "${sysroot}")
+
+ string(TOLOWER "$ENV{windir}" windir)
+ string(REGEX REPLACE "\\\\" "/" windir "${windir}")
+
+ if(lower MATCHES "^(${sysroot}/system|${windir}/system|${sysroot}/syswow|${windir}/syswow|(.*/)*msvc[^/]+dll)")
+ set(is_system 1)
+ endif()
+ endif()
+
+ if(NOT is_system)
+ get_filename_component(original_path "${original_lower}" PATH)
+ get_filename_component(path "${lower}" PATH)
+ if("${original_path}" STREQUAL "${path}")
+ set(is_local 1)
+ endif()
+ endif()
+ endif()
+
+ # Return type string based on computed booleans:
+ #
+ set(type "other")
+
+ if(is_system)
+ set(type "system")
+ elseif(is_embedded)
+ set(type "embedded")
+ elseif(is_local)
+ set(type "local")
+ endif()
+
+ #message(STATUS "gp_resolved_file_type: '${file}' '${resolved_file}'")
+ #message(STATUS " type: '${type}'")
+
+ if(NOT is_embedded)
+ if(NOT IS_ABSOLUTE "${resolved_file}")
+ if(lower MATCHES "^msvc[^/]+dll" AND is_system)
+ message(STATUS "info: non-absolute msvc file '${file}' returning type '${type}'")
+ else()
+ message(STATUS "warning: gp_resolved_file_type non-absolute file '${file}' returning type '${type}' -- possibly incorrect")
+ endif()
+ endif()
+ endif()
+
+ set(${type_var} "${type}" PARENT_SCOPE)
+
+ #message(STATUS "**")
+endfunction()
+
+
+# gp_file_type original_file file type_var
+#
+# Return the type of ${file} with respect to ${original_file}. String
+# describing type of prerequisite is returned in variable named ${type_var}.
+#
+# Possible types are:
+# system
+# local
+# embedded
+# other
+#
+function(gp_file_type original_file file type_var)
+ if(NOT IS_ABSOLUTE "${original_file}")
+ message(STATUS "warning: gp_file_type expects absolute full path for first arg original_file")
+ endif()
+
+ get_filename_component(exepath "${original_file}" PATH)
+
+ set(type "")
+ gp_resolved_file_type("${original_file}" "${file}" "${exepath}" "" type)
+
+ set(${type_var} "${type}" PARENT_SCOPE)
+endfunction(gp_file_type)
+
+
+# get_prerequisites target prerequisites_var exclude_system recurse dirs
+#
+# Get the list of shared library files required by ${target}. The list in
+# the variable named ${prerequisites_var} should be empty on first entry to
+# this function. On exit, ${prerequisites_var} will contain the list of
+# required shared library files.
+#
+# target is the full path to an executable file
+#
+# prerequisites_var is the name of a CMake variable to contain the results
+#
+# exclude_system is 0 or 1: 0 to include "system" prerequisites , 1 to
+# exclude them
+#
+# recurse is 0 or 1: 0 for direct prerequisites only, 1 for all prerequisites
+# recursively
+#
+# exepath is the path to the top level executable used for @executable_path
+# replacment on the Mac
+#
+# dirs is a list of paths where libraries might be found: these paths are
+# searched first when a target without any path info is given. Then standard
+# system locations are also searched: PATH, Framework locations, /usr/lib...
+#
+function(get_prerequisites target prerequisites_var exclude_system recurse exepath dirs)
+ set(verbose 0)
+ set(eol_char "E")
+
+ if(NOT IS_ABSOLUTE "${target}")
+ message("warning: target '${target}' is not absolute...")
+ endif(NOT IS_ABSOLUTE "${target}")
+
+ if(NOT EXISTS "${target}")
+ message("warning: target '${target}' does not exist...")
+ endif(NOT EXISTS "${target}")
+
+ # <setup-gp_tool-vars>
+ #
+ # Try to choose the right tool by default. Caller can set gp_tool prior to
+ # calling this function to force using a different tool.
+ #
+ if("${gp_tool}" STREQUAL "")
+ set(gp_tool "ldd")
+ if(APPLE)
+ set(gp_tool "otool")
+ endif(APPLE)
+ if(WIN32)
+ set(gp_tool "dumpbin")
+ endif(WIN32)
+ endif("${gp_tool}" STREQUAL "")
+
+ set(gp_tool_known 0)
+
+ if("${gp_tool}" STREQUAL "ldd")
+ set(gp_cmd_args "")
+ set(gp_regex "^[\t ]*[^\t ]+ => ([^\t ]+).*${eol_char}$")
+ set(gp_regex_cmp_count 1)
+ set(gp_tool_known 1)
+ endif("${gp_tool}" STREQUAL "ldd")
+
+ if("${gp_tool}" STREQUAL "otool")
+ set(gp_cmd_args "-L")
+ set(gp_regex "^\t([^\t]+) \\(compatibility version ([0-9]+.[0-9]+.[0-9]+), current version ([0-9]+.[0-9]+.[0-9]+)\\)${eol_char}$")
+ set(gp_regex_cmp_count 3)
+ set(gp_tool_known 1)
+ endif("${gp_tool}" STREQUAL "otool")
+
+ if("${gp_tool}" STREQUAL "dumpbin")
+ set(gp_cmd_args "/dependents")
+ set(gp_regex "^ ([^ ].*[Dd][Ll][Ll])${eol_char}$")
+ set(gp_regex_cmp_count 1)
+ set(gp_tool_known 1)
+ set(ENV{VS_UNICODE_OUTPUT} "") # Block extra output from inside VS IDE.
+ endif("${gp_tool}" STREQUAL "dumpbin")
+
+ if(NOT gp_tool_known)
+ message(STATUS "warning: gp_tool='${gp_tool}' is an unknown tool...")
+ message(STATUS "CMake function get_prerequisites needs more code to handle '${gp_tool}'")
+ message(STATUS "Valid gp_tool values are dumpbin, ldd and otool.")
+ return()
+ endif(NOT gp_tool_known)
+
+ set(gp_cmd_paths ${gp_cmd_paths}
+ "C:/Program Files/Microsoft Visual Studio 9.0/VC/bin"
+ "C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin"
+ "C:/Program Files/Microsoft Visual Studio 8/VC/BIN"
+ "C:/Program Files (x86)/Microsoft Visual Studio 8/VC/BIN"
+ "C:/Program Files/Microsoft Visual Studio .NET 2003/VC7/BIN"
+ "C:/Program Files (x86)/Microsoft Visual Studio .NET 2003/VC7/BIN"
+ "/usr/local/bin"
+ "/usr/bin"
+ )
+
+ find_program(gp_cmd ${gp_tool} PATHS ${gp_cmd_paths})
+
+ if(NOT gp_cmd)
+ message(STATUS "warning: could not find '${gp_tool}' - cannot analyze prerequisites...")
+ return()
+ endif(NOT gp_cmd)
+
+ if("${gp_tool}" STREQUAL "dumpbin")
+ # When running dumpbin, it also needs the "Common7/IDE" directory in the
+ # PATH. It will already be in the PATH if being run from a Visual Studio
+ # command prompt. Add it to the PATH here in case we are running from a
+ # different command prompt.
+ #
+ get_filename_component(gp_cmd_dir "${gp_cmd}" PATH)
+ get_filename_component(gp_cmd_dlls_dir "${gp_cmd_dir}/../../Common7/IDE" ABSOLUTE)
+ if(EXISTS "${gp_cmd_dlls_dir}")
+ # only add to the path if it is not already in the path
+ if(NOT "$ENV{PATH}" MATCHES "${gp_cmd_dlls_dir}")
+ set(ENV{PATH} "$ENV{PATH};${gp_cmd_dlls_dir}")
+ endif(NOT "$ENV{PATH}" MATCHES "${gp_cmd_dlls_dir}")
+ endif(EXISTS "${gp_cmd_dlls_dir}")
+ endif("${gp_tool}" STREQUAL "dumpbin")
+ #
+ # </setup-gp_tool-vars>
+
+ if("${gp_tool}" STREQUAL "ldd")
+ set(old_ld_env "$ENV{LD_LIBRARY_PATH}")
+ foreach(dir ${exepath} ${dirs})
+ set(ENV{LD_LIBRARY_PATH} "${dir}:$ENV{LD_LIBRARY_PATH}")
+ endforeach(dir)
+ endif("${gp_tool}" STREQUAL "ldd")
+
+
+ # Track new prerequisites at each new level of recursion. Start with an
+ # empty list at each level:
+ #
+ set(unseen_prereqs)
+
+ # Run gp_cmd on the target:
+ #
+ execute_process(
+ COMMAND ${gp_cmd} ${gp_cmd_args} ${target}
+ OUTPUT_VARIABLE gp_cmd_ov
+ )
+
+ if("${gp_tool}" STREQUAL "ldd")
+ set(ENV{LD_LIBRARY_PATH} "${old_ld_env}")
+ endif("${gp_tool}" STREQUAL "ldd")
+
+ if(verbose)
+ message(STATUS "<RawOutput cmd='${gp_cmd} ${gp_cmd_args} ${target}'>")
+ message(STATUS "gp_cmd_ov='${gp_cmd_ov}'")
+ message(STATUS "</RawOutput>")
+ endif(verbose)
+
+ get_filename_component(target_dir "${target}" PATH)
+
+ # Convert to a list of lines:
+ #
+ string(REGEX REPLACE ";" "\\\\;" candidates "${gp_cmd_ov}")
+ string(REGEX REPLACE "\n" "${eol_char};" candidates "${candidates}")
+
+ # Analyze each line for file names that match the regular expression:
+ #
+ foreach(candidate ${candidates})
+ if("${candidate}" MATCHES "${gp_regex}")
+ # Extract information from each candidate:
+ string(REGEX REPLACE "${gp_regex}" "\\1" raw_item "${candidate}")
+
+ if(gp_regex_cmp_count GREATER 1)
+ string(REGEX REPLACE "${gp_regex}" "\\2" raw_compat_version "${candidate}")
+ string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)$" "\\1" compat_major_version "${raw_compat_version}")
+ string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)$" "\\2" compat_minor_version "${raw_compat_version}")
+ string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)$" "\\3" compat_patch_version "${raw_compat_version}")
+ endif(gp_regex_cmp_count GREATER 1)
+
+ if(gp_regex_cmp_count GREATER 2)
+ string(REGEX REPLACE "${gp_regex}" "\\3" raw_current_version "${candidate}")
+ string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)$" "\\1" current_major_version "${raw_current_version}")
+ string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)$" "\\2" current_minor_version "${raw_current_version}")
+ string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)$" "\\3" current_patch_version "${raw_current_version}")
+ endif(gp_regex_cmp_count GREATER 2)
+
+ # Use the raw_item as the list entries returned by this function. Use the
+ # gp_resolve_item function to resolve it to an actual full path file if
+ # necessary.
+ #
+ set(item "${raw_item}")
+
+ # Add each item unless it is excluded:
+ #
+ set(add_item 1)
+
+ if(${exclude_system})
+ set(type "")
+ gp_resolved_file_type("${target}" "${item}" "${exepath}" "${dirs}" type)
+ if("${type}" STREQUAL "system")
+ set(add_item 0)
+ endif("${type}" STREQUAL "system")
+ endif(${exclude_system})
+
+ if(add_item)
+ list(LENGTH ${prerequisites_var} list_length_before_append)
+ gp_append_unique(${prerequisites_var} "${item}")
+ list(LENGTH ${prerequisites_var} list_length_after_append)
+
+ if(${recurse})
+ # If item was really added, this is the first time we have seen it.
+ # Add it to unseen_prereqs so that we can recursively add *its*
+ # prerequisites...
+ #
+ # But first: resolve its name to an absolute full path name such
+ # that the analysis tools can simply accept it as input.
+ #
+ if(NOT list_length_before_append EQUAL list_length_after_append)
+ gp_resolve_item("${target}" "${item}" "${exepath}" "${dirs}" resolved_item)
+ set(unseen_prereqs ${unseen_prereqs} "${resolved_item}")
+ endif(NOT list_length_before_append EQUAL list_length_after_append)
+ endif(${recurse})
+ endif(add_item)
+ else("${candidate}" MATCHES "${gp_regex}")
+ if(verbose)
+ message(STATUS "ignoring non-matching line: '${candidate}'")
+ endif(verbose)
+ endif("${candidate}" MATCHES "${gp_regex}")
+ endforeach(candidate)
+
+ list(LENGTH ${prerequisites_var} prerequisites_var_length)
+ if(prerequisites_var_length GREATER 0)
+ list(SORT ${prerequisites_var})
+ endif(prerequisites_var_length GREATER 0)
+ if(${recurse})
+ set(more_inputs ${unseen_prereqs})
+ foreach(input ${more_inputs})
+ get_prerequisites("${input}" ${prerequisites_var} ${exclude_system} ${recurse} "${exepath}" "${dirs}")
+ endforeach(input)
+ endif(${recurse})
+
+ set(${prerequisites_var} ${${prerequisites_var}} PARENT_SCOPE)
+endfunction(get_prerequisites)
+
+
+# list_prerequisites target all exclude_system verbose
+#
+# ARGV0 (target) is the full path to an executable file
+#
+# optional ARGV1 (all) is 0 or 1: 0 for direct prerequisites only,
+# 1 for all prerequisites recursively
+#
+# optional ARGV2 (exclude_system) is 0 or 1: 0 to include "system"
+# prerequisites , 1 to exclude them
+#
+# optional ARGV3 (verbose) is 0 or 1: 0 to print only full path
+# names of prerequisites, 1 to print extra information
+#
+function(list_prerequisites target)
+ if("${ARGV1}" STREQUAL "")
+ set(all 1)
+ else("${ARGV1}" STREQUAL "")
+ set(all "${ARGV1}")
+ endif("${ARGV1}" STREQUAL "")
+
+ if("${ARGV2}" STREQUAL "")
+ set(exclude_system 0)
+ else("${ARGV2}" STREQUAL "")
+ set(exclude_system "${ARGV2}")
+ endif("${ARGV2}" STREQUAL "")
+
+ if("${ARGV3}" STREQUAL "")
+ set(verbose 0)
+ else("${ARGV3}" STREQUAL "")
+ set(verbose "${ARGV3}")
+ endif("${ARGV3}" STREQUAL "")
+
+ set(count 0)
+ set(count_str "")
+ set(print_count "${verbose}")
+ set(print_prerequisite_type "${verbose}")
+ set(print_target "${verbose}")
+ set(type_str "")
+
+ get_filename_component(exepath "${target}" PATH)
+
+ set(prereqs "")
+ get_prerequisites("${target}" prereqs ${exclude_system} ${all} "${exepath}" "")
+
+ if(print_target)
+ message(STATUS "File '${target}' depends on:")
+ endif(print_target)
+
+ foreach(d ${prereqs})
+ math(EXPR count "${count} + 1")
+
+ if(print_count)
+ set(count_str "${count}. ")
+ endif(print_count)
+
+ if(print_prerequisite_type)
+ gp_file_type("${target}" "${d}" type)
+ set(type_str " (${type})")
+ endif(print_prerequisite_type)
+
+ message(STATUS "${count_str}${d}${type_str}")
+ endforeach(d)
+endfunction(list_prerequisites)
+
+
+# list_prerequisites_by_glob glob_arg glob_exp
+#
+# glob_arg is GLOB or GLOB_RECURSE
+#
+# glob_exp is a globbing expression used with "file(GLOB" to retrieve a list
+# of matching files. If a matching file is executable, its prerequisites are
+# listed.
+#
+# Any additional (optional) arguments provided are passed along as the
+# optional arguments to the list_prerequisites calls.
+#
+function(list_prerequisites_by_glob glob_arg glob_exp)
+ message(STATUS "=============================================================================")
+ message(STATUS "List prerequisites of executables matching ${glob_arg} '${glob_exp}'")
+ message(STATUS "")
+ file(${glob_arg} file_list ${glob_exp})
+ foreach(f ${file_list})
+ is_file_executable("${f}" is_f_executable)
+ if(is_f_executable)
+ message(STATUS "=============================================================================")
+ list_prerequisites("${f}" ${ARGN})
+ message(STATUS "")
+ endif(is_f_executable)
+ endforeach(f)
+endfunction(list_prerequisites_by_glob)
diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake
index d8f64199cf..bf4d9b72a9 100644
--- a/indra/cmake/LLAddBuildTest.cmake
+++ b/indra/cmake/LLAddBuildTest.cmake
@@ -107,6 +107,8 @@ INCLUDE(GoogleMock)
# Setup target
ADD_EXECUTABLE(PROJECT_${project}_TEST_${name} ${${name}_test_SOURCE_FILES})
+ SET_TARGET_PROPERTIES(PROJECT_${project}_TEST_${name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${EXE_STAGING_DIR})
+
#
# Per-codefile additional / external project dep and lib dep property extraction
#
@@ -142,8 +144,10 @@ INCLUDE(GoogleMock)
IF(WINDOWS)
set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR})
+ ELSEIF(DARWIN)
+ set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources:/usr/lib)
ELSE(WINDOWS)
- set(LD_LIBRARY_PATH ${ARCH_PREBUILT_DIRS}:${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}:/usr/lib)
+ set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}:/usr/lib)
ENDIF(WINDOWS)
LL_TEST_COMMAND("${LD_LIBRARY_PATH}" ${TEST_CMD})
@@ -200,6 +204,7 @@ FUNCTION(LL_ADD_INTEGRATION_TEST
message(STATUS "ADD_EXECUTABLE(INTEGRATION_TEST_${testname} ${source_files})")
endif(TEST_DEBUG)
ADD_EXECUTABLE(INTEGRATION_TEST_${testname} ${source_files})
+ SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${EXE_STAGING_DIR})
# Add link deps to the executable
if(TEST_DEBUG)
@@ -230,8 +235,10 @@ FUNCTION(LL_ADD_INTEGRATION_TEST
IF(WINDOWS)
set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR})
+ ELSEIF(DARWIN)
+ set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources:/usr/lib)
ELSE(WINDOWS)
- set(LD_LIBRARY_PATH ${ARCH_PREBUILT_DIRS}:${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}:/usr/lib)
+ set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}:/usr/lib)
ENDIF(WINDOWS)
LL_TEST_COMMAND("${LD_LIBRARY_PATH}" ${test_command})
@@ -250,4 +257,4 @@ FUNCTION(LL_ADD_INTEGRATION_TEST
# Use CTEST? Not sure how to yet...
# ADD_TEST(INTEGRATION_TEST_RUNNER_${testname} ${TEST_SCRIPT_CMD})
-ENDFUNCTION(LL_ADD_INTEGRATION_TEST) \ No newline at end of file
+ENDFUNCTION(LL_ADD_INTEGRATION_TEST)
diff --git a/indra/cmake/LLSharedLibs.cmake b/indra/cmake/LLSharedLibs.cmake
index a8c81609bb..6f602680f4 100644
--- a/indra/cmake/LLSharedLibs.cmake
+++ b/indra/cmake/LLSharedLibs.cmake
@@ -1,31 +1,74 @@
# ll_deploy_sharedlibs_command
# target_exe: the cmake target of the executable for which the shared libs will be deployed.
-# search_dirs: a list of dirs to search for the dependencies
-# dst_path: path to copy deps to, relative to the output location of the target_exe
-macro(ll_deploy_sharedlibs_command target_exe search_dirs dst_path)
- get_target_property(OUTPUT_LOCATION ${target_exe} LOCATION)
-
+macro(ll_deploy_sharedlibs_command target_exe)
+ get_target_property(TARGET_LOCATION ${target_exe} LOCATION)
+ get_filename_component(OUTPUT_PATH ${TARGET_LOCATION} PATH)
+
if(DARWIN)
+ set(SEARCH_DIRS "${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources")
get_target_property(IS_BUNDLE ${target_exe} MACOSX_BUNDLE)
if(IS_BUNDLE)
- get_filename_component(TARGET_FILE ${OUTPUT_LOCATION} NAME)
- set(OUTPUT_PATH ${OUTPUT_LOCATION}.app/Contents/MacOS)
- set(OUTPUT_LOCATION ${OUTPUT_PATH}/${TARGET_FILE})
+ # If its a bundle the exe is not in the target location, this should find it.
+ get_filename_component(TARGET_FILE ${TARGET_LOCATION} NAME)
+ set(OUTPUT_PATH ${TARGET_LOCATION}.app/Contents/MacOS)
+ set(TARGET_LOCATION ${OUTPUT_PATH}/${TARGET_FILE})
+ set(OUTPUT_PATH ${OUTPUT_PATH}/../Resources)
endif(IS_BUNDLE)
- else(DARWIN)
- message(FATAL_ERROR "Only darwin currently supported!")
+ elseif(WINDOWS)
+ set(SEARCH_DIRS "${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}" "$ENV{SystemRoot}/system32")
+ elseif(LINUX)
+ set(SEARCH_DIRS "${SHARED_LIB_STAGING_DIR}")
+ set(OUTPUT_PATH ${OUTPUT_PATH}/lib)
endif(DARWIN)
-
+
add_custom_command(
TARGET ${target_exe} POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS
- "-DBIN_NAME=\"${OUTPUT_LOCATION}\""
- "-DSEARCH_DIRS=\"${search_dirs}\""
- "-DDST_PATH=\"${OUTPUT_PATH}/${dst_path}\""
+ "-DBIN_NAME=\"${TARGET_LOCATION}\""
+ "-DSEARCH_DIRS=\"${SEARCH_DIRS}\""
+ "-DDST_PATH=\"${OUTPUT_PATH}\""
"-P"
"${CMAKE_SOURCE_DIR}/cmake/DeploySharedLibs.cmake"
)
endmacro(ll_deploy_sharedlibs_command)
+# ll_stage_sharedlib
+# Performs config and adds a copy command for a sharedlib target.
+macro(ll_stage_sharedlib DSO_TARGET)
+ if(SHARED_LIB_STAGING_DIR)
+ # target gets written to the DLL staging directory.
+ # Also this directory is shared with RunBuildTest.cmake, y'know, for the tests.
+ set_target_properties(${DSO_TARGET} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${SHARED_LIB_STAGING_DIR})
+ if(NOT WINDOWS)
+ get_target_property(DSO_PATH ${DSO_TARGET} LOCATION)
+ get_filename_component(DSO_FILE ${DSO_PATH} NAME)
+ if(DARWIN)
+ set(SHARED_LIB_STAGING_DIR_CONFIG ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources)
+ else(DARWIN)
+ set(SHARED_LIB_STAGING_DIR_CONFIG ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR})
+ endif(DARWIN)
+
+ # *TODO - maybe make this a symbolic link? -brad
+ add_custom_command(
+ TARGET ${DSO_TARGET} POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS
+ -E
+ copy_if_different
+ ${DSO_PATH}
+ ${SHARED_LIB_STAGING_DIR_CONFIG}/${DSO_FILE}
+ COMMENT "Copying llcommon to the staging folder."
+ )
+ endif(NOT WINDOWS)
+ endif(SHARED_LIB_STAGING_DIR)
+
+ if (DARWIN)
+ set_target_properties(${DSO_TARGET} PROPERTIES
+ BUILD_WITH_INSTALL_RPATH 1
+ INSTALL_NAME_DIR "@executable_path/../Resources"
+ )
+ endif(DARWIN)
+
+endmacro(ll_stage_sharedlib) \ No newline at end of file
diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake
index 1f3553539f..bca99caf2a 100644
--- a/indra/cmake/Linking.cmake
+++ b/indra/cmake/Linking.cmake
@@ -6,6 +6,7 @@ if (NOT STANDALONE)
set(ARCH_PREBUILT_DIRS_RELEASE ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib/release)
set(ARCH_PREBUILT_DIRS_DEBUG ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib/debug)
set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs CACHE FILEPATH "Location of staged DLLs")
+ set(EXE_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs CACHE FILEPATH "Location of staged executables")
elseif (LINUX)
if (VIEWER)
set(ARCH_PREBUILT_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib_release_client)
@@ -14,12 +15,14 @@ if (NOT STANDALONE)
endif (VIEWER)
set(ARCH_PREBUILT_DIRS_RELEASE ${ARCH_PREBUILT_DIRS})
set(ARCH_PREBUILT_DIRS_DEBUG ${ARCH_PREBUILT_DIRS})
- set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs CACHE FILEPATH "Location of staged .sos")
+ set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/lib CACHE FILEPATH "Location of staged .sos")
+ set(EXE_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/bin CACHE FILEPATH "Location of staged executables")
elseif (DARWIN)
set(ARCH_PREBUILT_DIRS_RELEASE ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/lib_release)
set(ARCH_PREBUILT_DIRS ${ARCH_PREBUILT_DIRS_RELEASE})
set(ARCH_PREBUILT_DIRS_DEBUG ${ARCH_PREBUILT_DIRS_RELEASE})
set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs CACHE FILEPATH "Location of staged DLLs")
+ set(EXE_STAGING_DIR "${CMAKE_BINARY_DIR}/sharedlibs/\$(CONFIGURATION)" CACHE FILEPATH "Location of staged executables")
endif (WINDOWS)
endif (NOT STANDALONE)
diff --git a/indra/develop.py b/indra/develop.py
index 7836c97473..79baa613ad 100755
--- a/indra/develop.py
+++ b/indra/develop.py
@@ -239,6 +239,7 @@ class UnixSetup(PlatformSetup):
def run(self, command, name=None):
'''Run a program. If the program fails, raise an exception.'''
+ sys.stdout.flush()
ret = os.system(command)
if ret:
if name is None:
@@ -456,7 +457,7 @@ class DarwinSetup(UnixSetup):
targets = ' '.join(['-target ' + repr(t) for t in targets])
else:
targets = ''
- cmd = ('xcodebuild -configuration %s %s %s' %
+ cmd = ('xcodebuild -configuration %s %s %s | grep -v "^[[:space:]]*setenv" ; exit ${PIPESTATUS[0]}' %
(self.build_type, ' '.join(opts), targets))
for d in self.build_dirs():
try:
diff --git a/indra/lib/python/indra/util/llmanifest.py b/indra/lib/python/indra/util/llmanifest.py
index 59c84e571b..8c05210618 100644
--- a/indra/lib/python/indra/util/llmanifest.py
+++ b/indra/lib/python/indra/util/llmanifest.py
@@ -120,9 +120,8 @@ ARGUMENTS=[
default=""),
dict(name='build', description='Build directory.', default=DEFAULT_SRCTREE),
dict(name='configuration',
- description="""The build configuration used. Only used on OS X for
- now, but it could be used for other platforms as well.""",
- default="Universal"),
+ description="""The build configuration used.""",
+ default="Release"),
dict(name='dest', description='Destination directory.', default=DEFAULT_SRCTREE),
dict(name='grid',
description="""Which grid the client will try to connect to. Even
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index f785698612..f40359790a 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -1,3 +1,4 @@
+
# -*- cmake -*-
project(llcommon)
@@ -6,11 +7,9 @@ include(00-Common)
include(LLCommon)
include(Linking)
include(Boost)
-include (Pth)
-
-if (WINDOWS)
- include(CopyWinLibs)
-endif (WINDOWS)
+include(Pth)
+include(LLSharedLibs)
+include(Copy3rdPartyLibs)
include_directories(
${EXPAT_INCLUDE_DIRS}
@@ -243,35 +242,7 @@ list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES})
if(LLCOMMON_LINK_SHARED)
add_library (llcommon SHARED ${llcommon_SOURCE_FILES})
-
- if(SHARED_LIB_STAGING_DIR)
- # *FIX:Mani ---
- # llcommon.dll get written to the DLL staging directory.
- # Also this directory is shared with RunBuildTest.cmake, y'know, for the tests.
- set_target_properties(llcommon PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${SHARED_LIB_STAGING_DIR})
- if(NOT WINDOWS)
- get_target_property(LLCOMMON_PATH llcommon LOCATION)
- get_filename_component(LLCOMMON_FILE ${LLCOMMON_PATH} NAME)
- add_custom_command(
- TARGET llcommon POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS
- -E
- copy_if_different
- ${LLCOMMON_PATH}
- ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/${LLCOMMON_FILE}
- COMMENT "Copying llcommon to the staging folder."
- )
- endif(NOT WINDOWS)
- endif(SHARED_LIB_STAGING_DIR)
-
- if (DARWIN)
- set_target_properties(llcommon PROPERTIES
- BUILD_WITH_INSTALL_RPATH 1
- INSTALL_NAME_DIR "@executable_path/../Resources"
- )
- endif(DARWIN)
-
+ ll_stage_sharedlib(llcommon)
else(LLCOMMON_LINK_SHARED)
add_library (llcommon ${llcommon_SOURCE_FILES})
endif(LLCOMMON_LINK_SHARED)
diff --git a/indra/llcommon/llprocesslauncher.h b/indra/llcommon/llprocesslauncher.h
index 880562157f..929d547f6e 100644
--- a/indra/llcommon/llprocesslauncher.h
+++ b/indra/llcommon/llprocesslauncher.h
@@ -70,6 +70,14 @@ public:
// This needs to be called periodically on Mac/Linux to clean up zombie processes.
static void reap(void);
+
+ // Accessors for platform-specific process ID
+#if LL_WINDOWS
+ HANDLE getProcessHandle() { return mProcessHandle; };
+#else
+ pid_t getProcessID() { return mProcessID; };
+#endif
+
private:
std::string mExecutable;
std::string mWorkingDir;
diff --git a/indra/llmath/llinterp.h b/indra/llmath/llinterp.h
index 8beeef480b..36ca2e9865 100644
--- a/indra/llmath/llinterp.h
+++ b/indra/llmath/llinterp.h
@@ -32,6 +32,13 @@
#ifndef LL_LLINTERP_H
#define LL_LLINTERP_H
+#if defined(LL_WINDOWS)
+// macro definitions for common math constants (e.g. M_PI) are declared under the _USE_MATH_DEFINES
+// on Windows system.
+// So, let's define _USE_MATH_DEFINES before including math.h
+ #define _USE_MATH_DEFINES
+#endif
+
#include "math.h"
// Class from which different types of interpolators can be derived
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp
index 457c074ef1..42d5ec49cd 100644
--- a/indra/llplugin/llpluginclassmedia.cpp
+++ b/indra/llplugin/llpluginclassmedia.cpp
@@ -61,14 +61,14 @@ LLPluginClassMedia::~LLPluginClassMedia()
reset();
}
-bool LLPluginClassMedia::init(const std::string &launcher_filename, const std::string &plugin_filename)
+bool LLPluginClassMedia::init(const std::string &launcher_filename, const std::string &plugin_filename, bool debug)
{
LL_DEBUGS("Plugin") << "launcher: " << launcher_filename << LL_ENDL;
LL_DEBUGS("Plugin") << "plugin: " << plugin_filename << LL_ENDL;
mPlugin = new LLPluginProcessParent(this);
mPlugin->setSleepTime(mSleepTime);
- mPlugin->init(launcher_filename, plugin_filename);
+ mPlugin->init(launcher_filename, plugin_filename, debug);
return true;
}
diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h
index 90ecd1e073..dcc4a3bd6a 100644
--- a/indra/llplugin/llpluginclassmedia.h
+++ b/indra/llplugin/llpluginclassmedia.h
@@ -47,7 +47,7 @@ public:
virtual ~LLPluginClassMedia();
// local initialization, called by the media manager when creating a source
- virtual bool init(const std::string &launcher_filename, const std::string &plugin_filename);
+ virtual bool init(const std::string &launcher_filename, const std::string &plugin_filename, bool debug = false);
// undoes everything init() didm called by the media manager when destroying a source
virtual void reset();
diff --git a/indra/llplugin/llpluginmessage.cpp b/indra/llplugin/llpluginmessage.cpp
index e7412a1d8f..32601b47db 100644
--- a/indra/llplugin/llpluginmessage.cpp
+++ b/indra/llplugin/llpluginmessage.cpp
@@ -39,6 +39,11 @@ LLPluginMessage::LLPluginMessage()
{
}
+LLPluginMessage::LLPluginMessage(const LLPluginMessage &p)
+{
+ mMessage = p.mMessage;
+}
+
LLPluginMessage::LLPluginMessage(const std::string &message_class, const std::string &message_name)
{
setMessage(message_class, message_name);
diff --git a/indra/llplugin/llpluginmessage.h b/indra/llplugin/llpluginmessage.h
index f1a0e7c624..5e93d8b7a1 100644
--- a/indra/llplugin/llpluginmessage.h
+++ b/indra/llplugin/llpluginmessage.h
@@ -40,6 +40,7 @@ class LLPluginMessage
LOG_CLASS(LLPluginMessage);
public:
LLPluginMessage();
+ LLPluginMessage(const LLPluginMessage &p);
LLPluginMessage(const std::string &message_class, const std::string &message_name);
~LLPluginMessage();
diff --git a/indra/llplugin/llpluginprocessparent.cpp b/indra/llplugin/llpluginprocessparent.cpp
index 39f9438fb3..b7ce800c3a 100644
--- a/indra/llplugin/llpluginprocessparent.cpp
+++ b/indra/llplugin/llpluginprocessparent.cpp
@@ -55,6 +55,7 @@ LLPluginProcessParent::LLPluginProcessParent(LLPluginProcessParentOwner *owner)
mBoundPort = 0;
mState = STATE_UNINITIALIZED;
mDisableTimeout = false;
+ mDebug = false;
// initialize timer - heartbeat test (mHeartbeat.hasExpired())
// can sometimes return true immediately otherwise and plugins
@@ -96,11 +97,12 @@ void LLPluginProcessParent::errorState(void)
setState(STATE_ERROR);
}
-void LLPluginProcessParent::init(const std::string &launcher_filename, const std::string &plugin_filename)
+void LLPluginProcessParent::init(const std::string &launcher_filename, const std::string &plugin_filename, bool debug)
{
mProcess.setExecutable(launcher_filename);
mPluginFile = plugin_filename;
mCPUUsage = 0.0f;
+ mDebug = debug;
setState(STATE_INITIALIZED);
}
@@ -291,6 +293,31 @@ void LLPluginProcessParent::idle(void)
}
else
{
+ if(mDebug)
+ {
+ #if LL_DARWIN
+ // If we're set to debug, start up a gdb instance in a new terminal window and have it attach to the plugin process and continue.
+
+ // The command we're constructing would look like this on the command line:
+ // osascript -e 'tell application "Terminal"' -e 'set win to do script "gdb -pid 12345"' -e 'do script "continue" in win' -e 'end tell'
+
+ std::stringstream cmd;
+
+ mDebugger.setExecutable("/usr/bin/osascript");
+ mDebugger.addArgument("-e");
+ mDebugger.addArgument("tell application \"Terminal\"");
+ mDebugger.addArgument("-e");
+ cmd << "set win to do script \"gdb -pid " << mProcess.getProcessID() << "\"";
+ mDebugger.addArgument(cmd.str());
+ mDebugger.addArgument("-e");
+ mDebugger.addArgument("do script \"continue\" in win");
+ mDebugger.addArgument("-e");
+ mDebugger.addArgument("end tell");
+ mDebugger.launch();
+
+ #endif
+ }
+
// This will allow us to time out if the process never starts.
mHeartbeat.start();
mHeartbeat.setTimerExpirySec(PLUGIN_LAUNCH_SECONDS);
@@ -661,7 +688,7 @@ bool LLPluginProcessParent::pluginLockedUpOrQuit()
{
bool result = false;
- if(!mDisableTimeout)
+ if(!mDisableTimeout && !mDebug)
{
if(!mProcess.isRunning())
{
diff --git a/indra/llplugin/llpluginprocessparent.h b/indra/llplugin/llpluginprocessparent.h
index 754ebeb946..1289e86c13 100644
--- a/indra/llplugin/llpluginprocessparent.h
+++ b/indra/llplugin/llpluginprocessparent.h
@@ -56,7 +56,7 @@ public:
LLPluginProcessParent(LLPluginProcessParentOwner *owner);
~LLPluginProcessParent();
- void init(const std::string &launcher_filename, const std::string &plugin_filename);
+ void init(const std::string &launcher_filename, const std::string &plugin_filename, bool debug = false);
void idle(void);
// returns true if the plugin is on its way to steady state
@@ -150,6 +150,9 @@ private:
F64 mCPUUsage;
bool mDisableTimeout;
+ bool mDebug;
+
+ LLProcessLauncher mDebugger;
};
#endif // LL_LLPLUGINPROCESSPARENT_H
diff --git a/indra/llprimitive/llmediaentry.cpp b/indra/llprimitive/llmediaentry.cpp
index 701300163a..2fc1e5e60c 100644
--- a/indra/llprimitive/llmediaentry.cpp
+++ b/indra/llprimitive/llmediaentry.cpp
@@ -389,8 +389,12 @@ U32 LLMediaEntry::setWhiteList( const std::vector<std::string> &whitelist )
U32 LLMediaEntry::setWhiteList( const LLSD &whitelist )
{
- // If whitelist is undef, this is a no-op.
- if (whitelist.isUndefined()) return LSL_STATUS_OK;
+ // If whitelist is undef, the whitelist is cleared
+ if (whitelist.isUndefined())
+ {
+ mWhiteList.clear();
+ return LSL_STATUS_OK;
+ }
// However, if the whitelist is an empty array, erase it.
if (whitelist.isArray())
diff --git a/indra/llprimitive/tests/llmediaentry_test.cpp b/indra/llprimitive/tests/llmediaentry_test.cpp
index cd9608d56b..277e370ca4 100644
--- a/indra/llprimitive/tests/llmediaentry_test.cpp
+++ b/indra/llprimitive/tests/llmediaentry_test.cpp
@@ -9,7 +9,14 @@
#include "linden_common.h"
#include "lltut.h"
-#include "boost/lexical_cast.hpp"
+#if LL_WINDOWS
+#pragma warning (push)
+#pragma warning (disable : 4702) // boost::lexical_cast generates this warning
+#endif
+#include <boost/lexical_cast.hpp>
+#if LL_WINDOWS
+#pragma warning (pop)
+#endif
#include "llstring.h"
#include "llsdutil.h"
#include "llsdserialize.h"
@@ -190,9 +197,9 @@ namespace tut
entry.setWhiteList(tokens);
}
- void whitelist_test(bool enable, const char *whitelist, const char *candidate_url, bool expected_pass)
+ void whitelist_test(int num, bool enable, const char *whitelist, const char *candidate_url, bool expected_pass)
{
- std::string message = "Whitelist test";
+ std::string message = "Whitelist test " + boost::lexical_cast<std::string>(num);
LLMediaEntry entry;
entry.setWhiteListEnable(enable);
set_whitelist(entry, whitelist);
@@ -209,13 +216,13 @@ namespace tut
ensure(message, expected_pass == passed_whitelist);
}
- void whitelist_test(const char *whitelist, const char *candidate_url, bool expected_pass)
+ void whitelist_test(int num, const char *whitelist, const char *candidate_url, bool expected_pass)
{
- whitelist_test(true, whitelist, candidate_url, expected_pass);
+ whitelist_test(num, true, whitelist, candidate_url, expected_pass);
}
- void whitelist_test(const char *whitelist, const char *candidate_url)
+ void whitelist_test(int num, const char *whitelist, const char *candidate_url)
{
- whitelist_test(true, whitelist, candidate_url, true);
+ whitelist_test(num, true, whitelist, candidate_url, true);
}
template<> template<>
@@ -265,12 +272,30 @@ namespace tut
ensure_llsd_equals(get_test_name() + " failed", defaultMediaEntryLLSD, sd);
}
+
+ template<> template<>
+ void object::test<5>()
+ {
+ set_test_name("Test LLMediaEntry::asLLSD() -> LLMediaEntry::fromLLSD()");
+ LLMediaEntry entry1, entry2;
+ // Add a whitelist to entry2
+ std::vector<std::string> whitelist;
+ whitelist.push_back("*.example.com");
+ entry2.setWhiteList(whitelist);
+ // Render entry1 (which has no whitelist) as an LLSD
+ LLSD sd;
+ entry1.asLLSD(sd);
+ // "read" that LLSD into entry 2
+ entry2.fromLLSD(sd);
+ ensure_llsd_equals(get_test_name() + " failed", defaultMediaEntryLLSD, entry2.asLLSD());
+ }
+
// limit tests
const char *URL_OK = "http://www.example.com";
const char *URL_TOO_BIG = "http://www.example.com.qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq";
template<> template<>
- void object::test<5>()
+ void object::test<6>()
{
set_test_name("Test Limits on setting current URL");
LLMediaEntry entry;
@@ -281,7 +306,7 @@ namespace tut
}
template<> template<>
- void object::test<6>()
+ void object::test<7>()
{
set_test_name("Test Limits on setting home URL");
LLMediaEntry entry;
@@ -292,7 +317,7 @@ namespace tut
}
template<> template<>
- void object::test<7>()
+ void object::test<8>()
{
set_test_name("Test Limits on setting whitelist");
@@ -306,7 +331,7 @@ namespace tut
}
template<> template<>
- void object::test<8>()
+ void object::test<9>()
{
set_test_name("Test Limits on setting whitelist too big");
@@ -321,7 +346,7 @@ namespace tut
}
template<> template<>
- void object::test<9>()
+ void object::test<10>()
{
set_test_name("Test Limits on setting whitelist too many");
@@ -337,7 +362,7 @@ namespace tut
}
template<> template<>
- void object::test<10>()
+ void object::test<11>()
{
set_test_name("Test to make sure both setWhiteList() functions behave the same");
@@ -355,7 +380,7 @@ namespace tut
}
template<> template<>
- void object::test<11>()
+ void object::test<12>()
{
set_test_name("Test to make sure both setWhiteList() functions behave the same");
@@ -376,7 +401,7 @@ namespace tut
}
template<> template<>
- void object::test<12>()
+ void object::test<13>()
{
set_test_name("Test to make sure both setWhiteList() functions behave the same");
@@ -396,103 +421,70 @@ namespace tut
empty == entry2.getWhiteList());
}
- // Whitelist check tests
-
- // Check the "empty whitelist" case
template<> template<>
- void object::test<13>() { whitelist_test("", "http://www.example.com", true); }
+ void object::test<14>()
+ {
+ // Whitelist check tests
+ int n=0;
+
+ // Check the "empty whitelist" case
+ whitelist_test(++n, "", "http://www.example.com", true);
- // Check the "missing scheme" case
- template<> template<>
- void object::test<14>() { whitelist_test("www.example.com", "http://www.example.com", true); }
+ // Check the "missing scheme" case
+ whitelist_test(++n, "www.example.com", "http://www.example.com", true);
- // Check the "exactly the same" case
- template<> template<>
- void object::test<15>() { whitelist_test("http://example.com", "http://example.com", true); }
+ // Check the "exactly the same" case
+ whitelist_test(++n, "http://example.com", "http://example.com", true);
- // Check the enable flag
- template<> template<>
- void object::test<16>() { whitelist_test(false, "www.example.com", "http://www.secondlife.com", true); }
- template<> template<>
- void object::test<17>() { whitelist_test(true, "www.example.com", "http://www.secondlife.com", false); }
+ // Check the enable flag
+ whitelist_test(++n, false, "www.example.com", "http://www.secondlife.com", true);
+ whitelist_test(++n, true, "www.example.com", "http://www.secondlife.com", false);
- // Check permutations of trailing slash:
- template<> template<>
- void object::test<18>() { whitelist_test("http://www.example.com", "http://www.example.com/", true); }
- template<> template<>
- void object::test<19>() { whitelist_test("http://www.example.com/", "http://www.example.com/", true); }
- template<> template<>
- void object::test<20>() { whitelist_test("http://www.example.com/", "http://www.example.com", false); }
- template<> template<>
- void object::test<21>() { whitelist_test("http://www.example.com", "http://www.example.com/foobar", true); }
- template<> template<>
- void object::test<22>() { whitelist_test("http://www.example.com/", "http://www.example.com/foobar", false); }
+ // Check permutations of trailing slash:
+ whitelist_test(++n, "http://www.example.com", "http://www.example.com/", true);
+ whitelist_test(++n, "http://www.example.com/", "http://www.example.com/", true);
+ whitelist_test(++n, "http://www.example.com/", "http://www.example.com", false);
+ whitelist_test(++n, "http://www.example.com", "http://www.example.com/foobar", true);
+ whitelist_test(++n, "http://www.example.com/", "http://www.example.com/foobar", false);
- // More cases...
- template<> template<>
- void object::test<23>() { whitelist_test("http://example.com", "http://example.com/wiki", true); }
- template<> template<>
- void object::test<24>() { whitelist_test("www.example.com", "http://www.example.com/help", true); }
- template<> template<>
- void object::test<25>() { whitelist_test("http://www.example.com", "http://wwwexample.com", false); }
- template<> template<>
- void object::test<26>() { whitelist_test("http://www.example.com", "http://www.example.com/wiki", true); }
- template<> template<>
- void object::test<27>() { whitelist_test("example.com", "http://wwwexample.com", false); }
- template<> template<>
- void object::test<28>() { whitelist_test("http://www.example.com/", "http://www.amazon.com/wiki", false); }
- template<> template<>
- void object::test<29>() { whitelist_test("www.example.com", "http://www.amazon.com", false); }
-
- // regexp cases
- template<> template<>
- void object::test<30>() { whitelist_test("*.example.com", "http://www.example.com", true); }
- template<> template<>
- void object::test<31>() { whitelist_test("*.example.com", "http://www.amazon.com", false); }
- template<> template<>
- void object::test<32>() { whitelist_test("*.example.com", "http://www.example.com/foo/bar", true); }
- template<> template<>
- void object::test<33>() { whitelist_test("*.example.com", "http:/example.com/foo/bar", false); }
- template<> template<>
- void object::test<34>() { whitelist_test("*example.com", "http://example.com/foo/bar", true); }
- template<> template<>
- void object::test<35>() { whitelist_test("*example.com", "http://my.virus.com/foo/bar?example.com", false); }
- template<> template<>
- void object::test<36>() { whitelist_test("example.com", "http://my.virus.com/foo/bar?example.com", false); }
- template<> template<>
- void object::test<37>() { whitelist_test("*example.com", "http://my.virus.com/foo/bar?*example.com", false); }
- template<> template<>
- void object::test<38>() { whitelist_test("http://*example.com", "http://www.example.com", true); }
- template<> template<>
- void object::test<39>() { whitelist_test("http://*.example.com", "http://www.example.com", true); }
- template<> template<>
- void object::test<40>() { whitelist_test("http://*.e$?^.com", "http://www.e$?^.com", true); }
- template<> template<>
- void object::test<41>() { whitelist_test("*.example.com/foo/bar", "http://www.example.com/", false); }
- template<> template<>
- void object::test<42>() { whitelist_test("*.example.com/foo/bar", "http://example.com/foo/bar", false); }
- template<> template<>
- void object::test<43>() { whitelist_test("http://*.example.com/foo/bar", "http://www.example.com", false); }
- template<> template<>
- void object::test<44>() { whitelist_test("http://*.example.com", "https://www.example.com", false); }
- template<> template<>
- void object::test<45>() { whitelist_test("http*://*.example.com", "rtsp://www.example.com", false); }
- template<> template<>
- void object::test<46>() { whitelist_test("http*://*.example.com", "https://www.example.com", true); }
- template<> template<>
- void object::test<47>() { whitelist_test("example.com", "http://www.example.com", false); }
- template<> template<>
- void object::test<48>() { whitelist_test("www.example.com", "http://www.example.com:80", false); }
- template<> template<>
- void object::test<49>() { whitelist_test("www.example.com", "http://www.example.com", true); }
- template<> template<>
- void object::test<50>() { whitelist_test("www.example.com/", "http://www.example.com", false); }
- template<> template<>
- void object::test<51>() { whitelist_test("www.example.com/foo/bar/*", "http://www.example.com/foo/bar/baz", true); }
- // Path only
- template<> template<>
- void object::test<52>() { whitelist_test("/foo/*/baz", "http://www.example.com/foo/bar/baz", true); }
- template<> template<>
- void object::test<53>() { whitelist_test("/foo/*/baz", "http://www.example.com/foo/bar/", false); }
+ // More cases...
+ whitelist_test(++n, "http://example.com", "http://example.com/wiki", true);
+ whitelist_test(++n, "www.example.com", "http://www.example.com/help", true);
+ whitelist_test(++n, "http://www.example.com", "http://wwwexample.com", false);
+ whitelist_test(++n, "http://www.example.com", "http://www.example.com/wiki", true);
+ whitelist_test(++n, "example.com", "http://wwwexample.com", false);
+ whitelist_test(++n, "http://www.example.com/", "http://www.amazon.com/wiki", false);
+ whitelist_test(++n, "www.example.com", "http://www.amazon.com", false);
+
+ // regexp cases
+ whitelist_test(++n, "*.example.com", "http://www.example.com", true);
+ whitelist_test(++n, "*.example.com", "http://www.amazon.com", false);
+ whitelist_test(++n, "*.example.com", "http://www.example.com/foo/bar", true);
+ whitelist_test(++n, "*.example.com", "http:/example.com/foo/bar", false);
+ whitelist_test(++n, "*example.com", "http://example.com/foo/bar", true);
+ whitelist_test(++n, "*example.com", "http://my.virus.com/foo/bar?example.com", false);
+ whitelist_test(++n, "example.com", "http://my.virus.com/foo/bar?example.com", false);
+ whitelist_test(++n, "*example.com", "http://my.virus.com/foo/bar?*example.com", false);
+ whitelist_test(++n, "http://*example.com", "http://www.example.com", true);
+ whitelist_test(++n, "http://*.example.com", "http://www.example.com", true);
+ whitelist_test(++n, "http://*.e$?^.com", "http://www.e$?^.com", true);
+ whitelist_test(++n, "*.example.com/foo/bar", "http://www.example.com/", false);
+ whitelist_test(++n, "*.example.com/foo/bar", "http://example.com/foo/bar", false);
+ whitelist_test(++n, "http://*.example.com/foo/bar", "http://www.example.com", false);
+ whitelist_test(++n, "http://*.example.com", "https://www.example.com", false);
+ whitelist_test(++n, "http*://*.example.com", "rtsp://www.example.com", false);
+ whitelist_test(++n, "http*://*.example.com", "https://www.example.com", true);
+ whitelist_test(++n, "example.com", "http://www.example.com", false);
+ whitelist_test(++n, "www.example.com", "http://www.example.com:80", false);
+ whitelist_test(++n, "www.example.com", "http://www.example.com", true);
+ whitelist_test(++n, "www.example.com/", "http://www.example.com", false);
+ whitelist_test(++n, "www.example.com/foo/bar/*", "http://www.example.com/foo/bar/baz", true);
+
+ // Path only
+ whitelist_test(++n, "/foo/*/baz", "http://www.example.com/foo/bar/baz", true);
+ whitelist_test(++n, "/foo/*/baz", "http://www.example.com/foo/bar/", false);
+ }
+
}
+
diff --git a/indra/llui/llconsole.cpp b/indra/llui/llconsole.cpp
index e0053b4cc7..48c76cf105 100644
--- a/indra/llui/llconsole.cpp
+++ b/indra/llui/llconsole.cpp
@@ -60,6 +60,8 @@ LLConsole* gConsole = NULL; // Created and destroyed in LLViewerWindow.
const F32 FADE_DURATION = 2.f;
const S32 MIN_CONSOLE_WIDTH = 200;
+static LLDefaultChildRegistry::Register<LLConsole> r("console");
+
LLConsole::LLConsole(const LLConsole::Params& p)
: LLUICtrl(p),
LLFixedBuffer(p.max_lines),
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index aac27e6562..f2cdad8854 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -1857,6 +1857,8 @@ void LLFloater::buildButtons()
/////////////////////////////////////////////////////
// LLFloaterView
+static LLDefaultChildRegistry::Register<LLFloaterView> r("floater_view");
+
LLFloaterView::LLFloaterView (const Params& p)
: LLUICtrl (p),
mFocusCycleMode(FALSE),
diff --git a/indra/llui/llhelp.h b/indra/llui/llhelp.h
index c06d29a4bd..82c3bc385f 100644
--- a/indra/llui/llhelp.h
+++ b/indra/llui/llhelp.h
@@ -40,6 +40,8 @@ class LLHelp
virtual void showTopic(const std::string &topic) = 0;
// return default (fallback) topic name suitable for showTopic()
virtual std::string defaultTopic() = 0;
+ // return topic to use before the user logs in
+ virtual std::string preLoginTopic() = 0;
};
#endif // headerguard
diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp
index bac5491943..9399ace1f7 100644
--- a/indra/llui/lllayoutstack.cpp
+++ b/indra/llui/lllayoutstack.cpp
@@ -137,6 +137,7 @@ LLLayoutStack::LLLayoutStack(const LLLayoutStack::Params& p)
mPanelSpacing(p.border_size),
mOrientation((p.orientation() == "vertical") ? VERTICAL : HORIZONTAL),
mAnimate(p.animate),
+ mAnimatedThisFrame(false),
mClip(p.clip)
{}
@@ -172,6 +173,7 @@ void LLLayoutStack::draw()
// only force drawing invisible children if visible amount is non-zero
drawChild(panelp, 0, 0, !clip_rect.isEmpty());
}
+ mAnimatedThisFrame = false;
}
void LLLayoutStack::removeChild(LLView* view)
@@ -411,8 +413,10 @@ void LLLayoutStack::updatePanelAutoResize(const std::string& panel_name, BOOL au
}
}
+static LLFastTimer::DeclareTimer FTM_UPDATE_LAYOUT("Update LayoutStacks");
void LLLayoutStack::updateLayout(BOOL force_resize)
{
+ LLFastTimer ft(FTM_UPDATE_LAYOUT);
static LLUICachedControl<S32> resize_bar_overlap ("UIResizeBarOverlap", 0);
calcMinExtents();
@@ -431,10 +435,13 @@ void LLLayoutStack::updateLayout(BOOL force_resize)
{
if (mAnimate)
{
- (*panel_it)->mVisibleAmt = lerp((*panel_it)->mVisibleAmt, 1.f, LLCriticalDamp::getInterpolant(ANIM_OPEN_TIME));
- if ((*panel_it)->mVisibleAmt > 0.99f)
+ if (!mAnimatedThisFrame)
{
- (*panel_it)->mVisibleAmt = 1.f;
+ (*panel_it)->mVisibleAmt = lerp((*panel_it)->mVisibleAmt, 1.f, LLCriticalDamp::getInterpolant(ANIM_OPEN_TIME));
+ if ((*panel_it)->mVisibleAmt > 0.99f)
+ {
+ (*panel_it)->mVisibleAmt = 1.f;
+ }
}
}
else
@@ -446,10 +453,13 @@ void LLLayoutStack::updateLayout(BOOL force_resize)
{
if (mAnimate)
{
- (*panel_it)->mVisibleAmt = lerp((*panel_it)->mVisibleAmt, 0.f, LLCriticalDamp::getInterpolant(ANIM_CLOSE_TIME));
- if ((*panel_it)->mVisibleAmt < 0.001f)
+ if (!mAnimatedThisFrame)
{
- (*panel_it)->mVisibleAmt = 0.f;
+ (*panel_it)->mVisibleAmt = lerp((*panel_it)->mVisibleAmt, 0.f, LLCriticalDamp::getInterpolant(ANIM_CLOSE_TIME));
+ if ((*panel_it)->mVisibleAmt < 0.001f)
+ {
+ (*panel_it)->mVisibleAmt = 0.f;
+ }
}
}
else
@@ -631,10 +641,10 @@ void LLLayoutStack::updateLayout(BOOL force_resize)
// adjust running headroom count based on new sizes
shrink_headroom_total += delta_size;
- panelp->reshape(new_width, new_height);
- panelp->setOrigin(cur_x, cur_y - new_height);
+ LLRect panel_rect;
+ panel_rect.setLeftTopAndSize(cur_x, cur_y, new_width, new_height);
+ panelp->setShape(panel_rect);
- LLRect panel_rect = panelp->getRect();
LLRect resize_bar_rect = panel_rect;
if (mOrientation == HORIZONTAL)
{
@@ -705,6 +715,8 @@ void LLLayoutStack::updateLayout(BOOL force_resize)
llassert_always(force_resize == FALSE);
updateLayout(TRUE);
}
+
+ mAnimatedThisFrame = true;
} // end LLLayoutStack::updateLayout
@@ -772,3 +784,16 @@ void LLLayoutStack::calcMinExtents()
}
}
}
+
+// update layout stack animations, etc. once per frame
+// NOTE: we use this to size world view based on animating UI, *before* we draw the UI
+// we might still need to call updateLayout during UI draw phase, in case UI elements
+// are resizing themselves dynamically
+//static
+void LLLayoutStack::updateClass()
+{
+ for (LLInstanceTracker<LLLayoutStack>::instance_iter it = beginInstances(); it != endInstances(); ++it)
+ {
+ (*it)->updateLayout();
+ }
+}
diff --git a/indra/llui/lllayoutstack.h b/indra/llui/lllayoutstack.h
index 9ded48ef6a..3a073fa1b2 100644
--- a/indra/llui/lllayoutstack.h
+++ b/indra/llui/lllayoutstack.h
@@ -38,7 +38,7 @@
class LLPanel;
-class LLLayoutStack : public LLView
+class LLLayoutStack : public LLView, public LLInstanceTracker<LLLayoutStack>
{
public:
struct Params : public LLInitParam::Block<Params, LLView::Params>
@@ -81,6 +81,10 @@ public:
S32 getNumPanels() { return mPanels.size(); }
void updatePanelAutoResize(const std::string& panel_name, BOOL auto_resize);
+
+
+ static void updateClass();
+
protected:
LLLayoutStack(const Params&);
friend class LLUICtrlFactory;
@@ -105,6 +109,8 @@ private:
S32 mMinHeight; // calculated by calcMinExtents
S32 mPanelSpacing;
+ // true if we already applied animation this frame
+ bool mAnimatedThisFrame;
bool mAnimate;
bool mClip;
}; // end class LLLayoutStack
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index c6a38c7ca7..de9a854f63 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -3270,11 +3270,9 @@ BOOL LLMenuBarGL::handleHover( S32 x, S32 y, MASK mask )
///============================================================================
LLCoordGL LLMenuHolderGL::sContextMenuSpawnPos(S32_MAX, S32_MAX);
-LLMenuHolderGL::LLMenuHolderGL()
- : LLPanel()
+LLMenuHolderGL::LLMenuHolderGL(const LLMenuHolderGL::Params& p)
+ : LLPanel(p)
{
- setName("Menu Holder");
- setMouseOpaque(FALSE);
sItemActivationTimer.stop();
mCanHide = TRUE;
}
diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h
index dc8ed3b3fd..cbb9b4d344 100644
--- a/indra/llui/llmenugl.h
+++ b/indra/llui/llmenugl.h
@@ -746,7 +746,9 @@ private:
class LLMenuHolderGL : public LLPanel
{
public:
- LLMenuHolderGL();
+ struct Params : public LLInitParam::Block<Params, LLPanel::Params>
+ {};
+ LLMenuHolderGL(const Params& p);
virtual ~LLMenuHolderGL() {}
virtual BOOL hideMenus();
diff --git a/indra/llui/llscrolllistcolumn.cpp b/indra/llui/llscrolllistcolumn.cpp
index ba53f84877..d281341202 100644
--- a/indra/llui/llscrolllistcolumn.cpp
+++ b/indra/llui/llscrolllistcolumn.cpp
@@ -44,6 +44,9 @@
const S32 MIN_COLUMN_WIDTH = 20;
+// defaults for LLScrollColumnHeader param block pulled from widgets/scroll_column_header.xml
+static LLWidgetNameRegistry::StaticRegistrar sRegisterColumnHeaderParams(&typeid(LLScrollColumnHeader::Params), "scroll_column_header");
+
//---------------------------------------------------------------------------
// LLScrollColumnHeader
//---------------------------------------------------------------------------
@@ -51,15 +54,7 @@ LLScrollColumnHeader::Params::Params()
: column("column")
{
name = "column_header";
- image_unselected.name("square_btn_32x128.tga");
- image_selected.name("square_btn_selected_32x128.tga");
- image_disabled.name("square_btn_32x128.tga");
- image_disabled_selected.name("square_btn_selected_32x128.tga");
- image_overlay.name("combobox_arrow.tga");
- image_overlay_alignment("right");
- font_halign = LLFontGL::LEFT;
tab_stop(false);
- scale_image(true);
}
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index a6cd6412e5..1c2c02e1cc 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -2624,7 +2624,7 @@ void LLScrollListCtrl::addColumn(const LLScrollListColumn::Params& column_params
LLRect temp_rect = LLRect(left,top+mHeadingHeight,right,top);
- LLScrollColumnHeader::Params params;
+ LLScrollColumnHeader::Params params(LLUICtrlFactory::getDefaultParams<LLScrollColumnHeader>());
params.name = "btn_" + name;
params.rect = temp_rect;
params.column = new_column;
diff --git a/indra/llui/llstyle.cpp b/indra/llui/llstyle.cpp
index fd3f88d1f6..71511f69a4 100644
--- a/indra/llui/llstyle.cpp
+++ b/indra/llui/llstyle.cpp
@@ -51,6 +51,7 @@ LLStyle::Params::Params()
LLStyle::LLStyle(const LLStyle::Params& p)
: mVisible(p.visible),
mColor(p.color()),
+ mReadOnlyColor(p.readonly_color()),
mFont(p.font()),
mLink(p.link_href),
mDropShadow(p.drop_shadow),
diff --git a/indra/llui/llstyle.h b/indra/llui/llstyle.h
index c769964136..ee9ca730e9 100644
--- a/indra/llui/llstyle.h
+++ b/indra/llui/llstyle.h
@@ -46,7 +46,8 @@ public:
{
Optional<bool> visible;
Optional<LLFontGL::ShadowType> drop_shadow;
- Optional<LLUIColor> color;
+ Optional<LLUIColor> color,
+ readonly_color;
Optional<const LLFontGL*> font;
Optional<LLUIImage*> image;
Optional<std::string> link_href;
@@ -57,6 +58,8 @@ public:
const LLColor4& getColor() const { return mColor; }
void setColor(const LLColor4 &color) { mColor = color; }
+ const LLColor4& getReadOnlyColor() const { return mReadOnlyColor; }
+
BOOL isVisible() const;
void setVisible(BOOL is_visible);
@@ -81,6 +84,7 @@ public:
return
mVisible == rhs.mVisible
&& mColor == rhs.mColor
+ && mReadOnlyColor == rhs.mReadOnlyColor
&& mFont == rhs.mFont
&& mLink == rhs.mLink
&& mImagep == rhs.mImagep
@@ -104,6 +108,7 @@ protected:
private:
BOOL mVisible;
LLUIColor mColor;
+ LLUIColor mReadOnlyColor;
std::string mFontName;
const LLFontGL* mFont; // cached for performance
std::string mLink;
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp
index b67f753d39..44eff8d357 100644
--- a/indra/llui/lltabcontainer.cpp
+++ b/indra/llui/lltabcontainer.cpp
@@ -346,7 +346,13 @@ void LLTabContainer::draw()
}
}
- LLPanel::draw();
+ {
+ LLRect clip_rect = getLocalRect();
+ clip_rect.mLeft+=(LLPANEL_BORDER_WIDTH + 2);
+ clip_rect.mRight-=(LLPANEL_BORDER_WIDTH + 2);
+ LLLocalClipRect clip(clip_rect);
+ LLPanel::draw();
+ }
// if tabs are hidden, don't draw them and leave them in the invisible state
if (!getTabsHidden())
@@ -358,24 +364,6 @@ void LLTabContainer::draw()
tuple->mButton->setVisible( TRUE );
}
- // Draw some of the buttons...
- LLRect clip_rect = getLocalRect();
- if (has_scroll_arrows)
- {
- // ...but clip them.
- if (mIsVertical)
- {
- clip_rect.mBottom = mNextArrowBtn->getRect().mTop + 3*tabcntrv_pad;
- clip_rect.mTop = mPrevArrowBtn->getRect().mBottom - 3*tabcntrv_pad;
- }
- else
- {
- clip_rect.mLeft = mPrevArrowBtn->getRect().mRight;
- clip_rect.mRight = mNextArrowBtn->getRect().mLeft;
- }
- }
- LLLocalClipRect clip(clip_rect);
-
S32 max_scroll_visible = getTabCount() - getMaxScrollPos() + getScrollPos();
S32 idx = 0;
for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter)
@@ -403,7 +391,7 @@ void LLTabContainer::draw()
mNextArrowBtn->setFlashing( TRUE );
}
}
- }
+ }
idx++;
}
@@ -1039,6 +1027,11 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel)
{
LLUICtrl::addChild(child, 1);
}
+
+ sendChildToFront(mPrevArrowBtn);
+ sendChildToFront(mNextArrowBtn);
+ sendChildToFront(mJumpPrevArrowBtn);
+ sendChildToFront(mJumpNextArrowBtn);
if( select )
{
@@ -1672,23 +1665,23 @@ void LLTabContainer::initButtons()
S32 btn_top = (getTabPosition() == TOP ) ? getRect().getHeight() - getTopBorderHeight() : tabcntr_arrow_btn_size + 1;
LLRect left_arrow_btn_rect;
- left_arrow_btn_rect.setLeftTopAndSize( LLPANEL_BORDER_WIDTH+1+tabcntr_arrow_btn_size, btn_top + arrow_fudge, tabcntr_arrow_btn_size, tabcntr_arrow_btn_size );
+ left_arrow_btn_rect.setLeftTopAndSize( LLPANEL_BORDER_WIDTH+1+tabcntr_arrow_btn_size, btn_top + arrow_fudge, tabcntr_arrow_btn_size, mTabHeight );
LLRect jump_left_arrow_btn_rect;
- jump_left_arrow_btn_rect.setLeftTopAndSize( LLPANEL_BORDER_WIDTH+1, btn_top + arrow_fudge, tabcntr_arrow_btn_size, tabcntr_arrow_btn_size );
+ jump_left_arrow_btn_rect.setLeftTopAndSize( LLPANEL_BORDER_WIDTH+1, btn_top + arrow_fudge, tabcntr_arrow_btn_size, mTabHeight );
S32 right_pad = tabcntr_arrow_btn_size + LLPANEL_BORDER_WIDTH + 1;
LLRect right_arrow_btn_rect;
right_arrow_btn_rect.setLeftTopAndSize( getRect().getWidth() - mRightTabBtnOffset - right_pad - tabcntr_arrow_btn_size,
btn_top + arrow_fudge,
- tabcntr_arrow_btn_size, tabcntr_arrow_btn_size );
+ tabcntr_arrow_btn_size, mTabHeight );
LLRect jump_right_arrow_btn_rect;
jump_right_arrow_btn_rect.setLeftTopAndSize( getRect().getWidth() - mRightTabBtnOffset - right_pad,
btn_top + arrow_fudge,
- tabcntr_arrow_btn_size, tabcntr_arrow_btn_size );
+ tabcntr_arrow_btn_size, mTabHeight );
LLButton::Params p;
p.name(std::string("Jump Left Arrow"));
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 97ba691341..8d36c9c616 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -286,8 +286,7 @@ bool LLTextBase::truncate()
LLStyle::Params LLTextBase::getDefaultStyle()
{
- LLColor4 text_color = ( mReadOnly ? mReadOnlyFgColor.get() : mFgColor.get() );
- return LLStyle::Params().color(text_color).font(mDefaultFont).drop_shadow(mFontShadow);
+ return LLStyle::Params().color(mFgColor.get()).readonly_color(mReadOnlyFgColor.get()).font(mDefaultFont).drop_shadow(mFontShadow);
}
void LLTextBase::onValueChange(S32 start, S32 end)
@@ -2232,7 +2231,7 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele
const LLFontGL* font = mStyle->getFont();
- LLColor4 color = mStyle->getColor() % alpha;
+ LLColor4 color = (mEditor.getReadOnly() ? mStyle->getReadOnlyColor() : mStyle->getColor()) % alpha;
font = mStyle->getFont();
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index 3ce5a0320b..d136c6b49d 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -2005,7 +2005,8 @@ void LLTextEditor::setEnabled(BOOL enabled)
bool read_only = !enabled;
if (read_only != mReadOnly)
{
- mReadOnly = read_only;
+ //mReadOnly = read_only;
+ LLTextBase::setReadOnly(read_only);
updateSegments();
updateAllowingLanguageInput();
}
diff --git a/indra/llui/lltooltip.cpp b/indra/llui/lltooltip.cpp
index 4bc9a9c042..984a534da6 100644
--- a/indra/llui/lltooltip.cpp
+++ b/indra/llui/lltooltip.cpp
@@ -57,6 +57,8 @@ LLToolTipView *gToolTipView = NULL;
// Member functions
//
+static LLDefaultChildRegistry::Register<LLToolTipView> register_tooltip_view("tooltip_view");
+
LLToolTipView::Params::Params()
{
mouse_opaque = false;
@@ -137,12 +139,16 @@ void LLToolTipView::drawStickyRect()
{
gl_rect_2d(LLToolTipMgr::instance().getMouseNearRect(), LLColor4::white, false);
}
+
+// defaults for floater param block pulled from widgets/floater.xml
+static LLWidgetNameRegistry::StaticRegistrar sRegisterInspectorParams(&typeid(LLInspector::Params), "inspector");
+
//
// LLToolTip
//
-static LLDefaultChildRegistry::Register<LLToolTip> r("tool_tip");
+static LLDefaultChildRegistry::Register<LLToolTip> register_tooltip("tool_tip");
LLToolTip::Params::Params()
diff --git a/indra/llui/lltooltip.h b/indra/llui/lltooltip.h
index 30d251266c..774ca507c1 100644
--- a/indra/llui/lltooltip.h
+++ b/indra/llui/lltooltip.h
@@ -116,6 +116,12 @@ private:
S32 mPadding; // pixels
};
+// used for the inspector tooltips which need different background images etc.
+class LLInspector : public LLToolTip
+{
+public:
+ struct Params : public LLInitParam::Block<Params, LLToolTip::Params> {};
+};
class LLToolTipMgr : public LLSingleton<LLToolTipMgr>
{
diff --git a/indra/llui/lluicolortable.cpp b/indra/llui/lluicolortable.cpp
index 851091f0ca..f1e3000547 100644
--- a/indra/llui/lluicolortable.cpp
+++ b/indra/llui/lluicolortable.cpp
@@ -69,7 +69,14 @@ void LLUIColorTable::insertFromParams(const Params& p)
ColorEntryParams color_entry = *it;
if(color_entry.color.value.isChosen())
{
- setColor(color_entry.name, color_entry.color.value, mLoadedColors);
+ if(mUserSetColors.find(color_entry.name)!=mUserSetColors.end())
+ {
+ setColor(color_entry.name, color_entry.color.value);
+ }
+ else
+ {
+ setColor(color_entry.name, color_entry.color.value, mLoadedColors);
+ }
}
else
{
@@ -213,7 +220,7 @@ bool LLUIColorTable::loadFromSettings()
result |= loadFromFilename(current_filename);
}
- std::string user_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SKIN, "colors.xml");
+ std::string user_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "colors.xml");
loadFromFilename(user_filename);
return result;
@@ -239,7 +246,7 @@ void LLUIColorTable::saveUserSettings() const
if(!output_node->isNull())
{
- const std::string& filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SKIN, "colors.xml");
+ const std::string& filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "colors.xml");
LLFILE *fp = LLFile::fopen(filename, "w");
if(fp != NULL)
diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp
index c3c0daed0f..adfbb41feb 100644
--- a/indra/llui/lluictrlfactory.cpp
+++ b/indra/llui/lluictrlfactory.cpp
@@ -449,3 +449,9 @@ const std::string* LLUICtrlFactory::getWidgetTag(const std::type_info* widget_ty
{
return LLWidgetNameRegistry::instance().getValue(widget_type);
}
+
+// static
+void LLUICtrlFactory::connect(LLView* parent, LLView* child)
+{
+ parent->addChild(child);
+}
diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h
index 17e32dc7a9..8a9c9e23c1 100644
--- a/indra/llui/lluictrlfactory.h
+++ b/indra/llui/lluictrlfactory.h
@@ -188,10 +188,15 @@ public:
T* widget = new T(params);
widget->initFromParams(params);
if (parent)
- widget->setParent(parent);
+ {
+ connect(parent, widget);
+ }
return widget;
}
+ // fix for gcc template instantiation annoyance
+ static void connect(LLView* parent, LLView* child);
+
LLView* createFromXML(LLXMLNodePtr node, LLView* parent, const std::string& filename, const widget_registry_t&, LLXMLNodePtr output_node );
template<typename T>
diff --git a/indra/llui/lluiimage.cpp b/indra/llui/lluiimage.cpp
index 6c1a32722f..a8683e55c3 100644
--- a/indra/llui/lluiimage.cpp
+++ b/indra/llui/lluiimage.cpp
@@ -142,6 +142,13 @@ namespace LLInitParam
{
LLUIImage* TypedParam<LLUIImage*>::getValueFromBlock() const
{
+ // The keyword "none" is specifically requesting a null image
+ // do not default to current value. Used to overwrite template images.
+ if (name() == "none")
+ {
+ return NULL;
+ }
+
LLUIImage* imagep = LLUI::getUIImage(name());
if (!imagep)
{
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index f9b4a6b73d..dba24ee165 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -1697,8 +1697,11 @@ LLView* LLView::getChildView(const std::string& name, BOOL recurse) const
return child;
}
+static LLFastTimer::DeclareTimer FTM_FIND_VIEWS("Find Widgets");
+
LLView* LLView::findChildView(const std::string& name, BOOL recurse) const
{
+ LLFastTimer ft(FTM_FIND_VIEWS);
//richard: should we allow empty names?
//if(name.empty())
// return NULL;
diff --git a/indra/llui/llview.h b/indra/llui/llview.h
index c3b442e022..2607120e17 100644
--- a/indra/llui/llview.h
+++ b/indra/llui/llview.h
@@ -267,9 +267,6 @@ public:
// remove the specified child from the view, and set it's parent to NULL.
virtual void removeChild(LLView* view);
- // helper function for lluictrlfactory.h create<> template
- void setParent(LLView* parent) { if (parent) parent->addChild(this); }
-
virtual BOOL postBuild() { return TRUE; }
child_tab_order_t getCtrlOrder() const { return mCtrlOrder; }
diff --git a/indra/mac_crash_logger/CMakeLists.txt b/indra/mac_crash_logger/CMakeLists.txt
index 1d6494fecf..420e836e36 100644
--- a/indra/mac_crash_logger/CMakeLists.txt
+++ b/indra/mac_crash_logger/CMakeLists.txt
@@ -75,7 +75,6 @@ add_custom_command(
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/mac-crash-logger.app/Contents/Resources/CrashReporter.nib
)
-ll_deploy_sharedlibs_command(
- mac-crash-logger
- "${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR};${ARCH_PREBUILT_DIRS}"
- "../Resources")
+ll_deploy_sharedlibs_command(mac-crash-logger)
+
+
diff --git a/indra/mac_updater/CMakeLists.txt b/indra/mac_updater/CMakeLists.txt
index d7bd6f993c..57d426aa24 100644
--- a/indra/mac_updater/CMakeLists.txt
+++ b/indra/mac_updater/CMakeLists.txt
@@ -77,7 +77,4 @@ add_custom_command(
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/mac-updater.app/Contents/Resources/AutoUpdater.nib
)
-ll_deploy_sharedlibs_command(
- mac-updater
- "${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR};${ARCH_PREBUILT_DIRS}"
- "../Resources")
+ll_deploy_sharedlibs_command(mac-updater)
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 649d86aaa6..13c381edae 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -185,7 +185,7 @@ set(viewer_SOURCE_FILES
llfloatermediasettings.cpp
llfloatermemleak.cpp
llfloaternamedesc.cpp
- llfloaternearbymedia.cpp
+ llfloaternearbymedia.cpp
llfloaternotificationsconsole.cpp
llfloateropenobject.cpp
llfloaterparcel.cpp
@@ -681,7 +681,7 @@ set(viewer_HEADER_FILES
llfloatermediasettings.h
llfloatermemleak.h
llfloaternamedesc.h
- llfloaternearbymedia.h
+ llfloaternearbymedia.h
llfloaternotificationsconsole.h
llfloateropenobject.h
llfloaterparcel.h
@@ -1168,7 +1168,7 @@ if (WINDOWS)
if (NOT STANDALONE)
list(APPEND viewer_SOURCE_FILES ${viewer_RESOURCE_FILES})
- endif (NOT STANDALONE)
+ endif (NOT STANDALONE)
find_library(DINPUT_LIBRARY dinput8 ${DIRECTX_LIBRARY_DIR})
find_library(DXGUID_LIBRARY dxguid ${DIRECTX_LIBRARY_DIR})
@@ -1350,7 +1350,7 @@ file(GLOB EVENT_HOST_SCRIPT_GLOB_LIST
${CMAKE_CURRENT_SOURCE_DIR}/../viewer_components/*.py)
list(APPEND EVENT_HOST_SCRIPTS ${EVENT_HOST_SCRIPT_GLOB_LIST})
-set(PACKAGE OFF CACHE BOOL
+set(PACKAGE ON CACHE BOOL
"Add a package target that builds an installer package.")
if (WINDOWS)
@@ -1379,7 +1379,7 @@ if (WINDOWS)
${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}.sln
--workingdir
${VIEWER_BINARY_NAME}
- ${CMAKE_CURRENT_SOURCE_DIR}
+ "./${CMAKE_CFG_INTDIR}"
COMMENT "Setting the ${VIEWER_BINARY_NAME} working directory for debugging."
)
endif (NOT UNATTENDED)
@@ -1396,85 +1396,87 @@ if (WINDOWS)
)
add_custom_command(
- TARGET ${VIEWER_BINARY_NAME} PRE_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS
- -E
- copy_if_different
- ${CMAKE_CURRENT_SOURCE_DIR}/../../etc/message.xml
- ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/app_settings/message.xml
- COMMENT "Copying message.xml to the runtime folder."
- )
+ TARGET ${VIEWER_BINARY_NAME} PRE_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS
+ -E
+ copy_if_different
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../etc/message.xml
+ ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/app_settings/message.xml
+ COMMENT "Copying message.xml to the runtime folder."
+ )
- if(WINDOWS)
- # Copy Win Libs...
- # This happens at build time, not config time. We can't glob files in this cmake.
- # *FIX:Mani Write a sub script to glob the files...
- # *FIX:Mani Use actually dependencies rather than bulk copy.
- add_custom_command(
- TARGET ${VIEWER_BINARY_NAME} PRE_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS
- -E
- copy_directory
- ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}
- ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
- COMMENT "Copying staged dlls."
- )
+ add_custom_command(
+ TARGET ${VIEWER_BINARY_NAME} POST_BUILD
+ COMMAND ${PYTHON_EXECUTABLE}
+ ARGS
+ ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
+ --actions=copy
+ --artwork=${ARTWORK_DIR}
+ --build=${CMAKE_CURRENT_BINARY_DIR}
+ --configuration=${CMAKE_CFG_INTDIR}
+ --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
+ --grid=${GRID}
+ --source=${CMAKE_CURRENT_SOURCE_DIR}
+ DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
+ COMMENT "Performing viewer_manifest copy"
+ )
- add_dependencies(${VIEWER_BINARY_NAME} stage_third_party_libs llcommon)
- if(LLKDU_LIBRARY)
- # kdu may not exist!
- add_dependencies(${VIEWER_BINARY_NAME} llkdu)
- endif(LLKDU_LIBRARY)
- endif(WINDOWS)
+ add_dependencies(${VIEWER_BINARY_NAME} stage_third_party_libs llcommon)
+
+ if(LLKDU_LIBRARY)
+ # kdu may not exist!
+ add_dependencies(${VIEWER_BINARY_NAME} llkdu)
+ endif(LLKDU_LIBRARY)
if (EXISTS ${CMAKE_SOURCE_DIR}/copy_win_scripts)
add_dependencies(${VIEWER_BINARY_NAME} copy_win_scripts)
endif (EXISTS ${CMAKE_SOURCE_DIR}/copy_win_scripts)
- add_custom_command(
+ add_dependencies(${VIEWER_BINARY_NAME}
+ SLPlugin
+ media_plugin_quicktime
+ media_plugin_webkit
+ windows-updater
+ windows-crash-logger
+ )
+
+ if (PACKAGE)
+ add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.bz2
+ COMMAND ${PYTHON_EXECUTABLE}
+ ARGS
+ ${CMAKE_CURRENT_SOURCE_DIR}/event_host_manifest.py
+ ${CMAKE_CURRENT_SOURCE_DIR}/..
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CFG_INTDIR}
+ DEPENDS
+ lleventhost
+ ${EVENT_HOST_SCRIPTS}
+ ${CMAKE_CURRENT_SOURCE_DIR}/event_host_manifest.py
+ )
+
+ add_custom_command(
OUTPUT ${CMAKE_CFG_INTDIR}/touched.bat
COMMAND ${PYTHON_EXECUTABLE}
ARGS
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
- --configuration=${CMAKE_CFG_INTDIR}
+ --artwork=${ARTWORK_DIR}
+ --build=${CMAKE_CURRENT_BINARY_DIR}
--channel=${VIEWER_CHANNEL}
- --login_channel=${VIEWER_LOGIN_CHANNEL}
+ --configuration=${CMAKE_CFG_INTDIR}
+ --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
--grid=${GRID}
+ --login_channel=${VIEWER_LOGIN_CHANNEL}
--source=${CMAKE_CURRENT_SOURCE_DIR}
- --artwork=${ARTWORK_DIR}
- --build=${CMAKE_CURRENT_BINARY_DIR}
- --dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
- --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/touched.bat
+ --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/touched.bat
DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
)
- add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_quicktime media_plugin_webkit)
-
- if (PACKAGE)
- add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.bz2
- COMMAND ${PYTHON_EXECUTABLE}
- ARGS
- ${CMAKE_CURRENT_SOURCE_DIR}/event_host_manifest.py
- ${CMAKE_CURRENT_SOURCE_DIR}/..
- ${CMAKE_CURRENT_BINARY_DIR}
- ${CMAKE_CFG_INTDIR}
-
- DEPENDS
- lleventhost
- ${EVENT_HOST_SCRIPTS}
- ${CMAKE_CURRENT_SOURCE_DIR}/event_host_manifest.py)
-
- add_custom_target(package ALL
- DEPENDS
- ${CMAKE_CFG_INTDIR}/touched.bat)
- # temporarily disable packaging of event_host until hg subrepos get
- # sorted out on the parabuild cluster...
- #${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.bz2)
- add_dependencies(package windows-updater windows-crash-logger)
-
+ add_custom_target(package ALL DEPENDS ${CMAKE_CFG_INTDIR}/touched.bat)
+ # temporarily disable packaging of event_host until hg subrepos get
+ # sorted out on the parabuild cluster...
+ #${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.bz2)
endif (PACKAGE)
endif (WINDOWS)
@@ -1537,15 +1539,16 @@ if (LINUX)
COMMAND ${PYTHON_EXECUTABLE}
ARGS
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
- --grid=${GRID}
- --channel=${VIEWER_CHANNEL}
- --login_channel=${VIEWER_LOGIN_CHANNEL}
- --installer_name=${product}
--arch=${ARCH}
- --source=${CMAKE_CURRENT_SOURCE_DIR}
--artwork=${ARTWORK_DIR}
--build=${CMAKE_CURRENT_BINARY_DIR}
+ --channel=${VIEWER_CHANNEL}
+ --configuration=${CMAKE_CFG_INTDIR}
--dest=${CMAKE_CURRENT_BINARY_DIR}/packaged
+ --grid=${GRID}
+ --installer_name=${product}
+ --login_channel=${VIEWER_LOGIN_CHANNEL}
+ --source=${CMAKE_CURRENT_SOURCE_DIR}
--touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched
DEPENDS secondlife-stripped ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
)
@@ -1580,13 +1583,13 @@ if (DARWIN)
COMMAND ${PYTHON_EXECUTABLE}
ARGS
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
- --grid=${GRID}
--actions=copy
- --configuration=${CMAKE_CFG_INTDIR}
- --source=${CMAKE_CURRENT_SOURCE_DIR}
--artwork=${ARTWORK_DIR}
--build=${CMAKE_CURRENT_BINARY_DIR}
+ --configuration=${CMAKE_CFG_INTDIR}
--dest=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app
+ --grid=${GRID}
+ --source=${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
)
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 55ff255c38..15c9499bbc 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -5327,6 +5327,17 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>PluginAttachDebuggerToPlugins</key>
+ <map>
+ <key>Comment</key>
+ <string>If true, attach a debugger session to each plugin process as it's launched.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>PluginInstancesCPULimit</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 24bdf66c2a..d2c8558f0b 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -2619,9 +2619,9 @@ void LLAgent::updateLookAt(const S32 mouse_x, const S32 mouse_y)
{
// range from -.5 to .5
F32 x_from_center =
- ((F32) mouse_x / (F32) gViewerWindow->getWindowWidth() ) - 0.5f;
+ ((F32) mouse_x / (F32) gViewerWindow->getWindowWidthScaled() ) - 0.5f;
F32 y_from_center =
- ((F32) mouse_y / (F32) gViewerWindow->getWindowHeight() ) - 0.5f;
+ ((F32) mouse_y / (F32) gViewerWindow->getWindowHeightScaled() ) - 0.5f;
frameCamera.yaw( - x_from_center * gSavedSettings.getF32("YawFromMousePosition") * DEG_TO_RAD);
frameCamera.pitch( - y_from_center * gSavedSettings.getF32("PitchFromMousePosition") * DEG_TO_RAD);
@@ -3436,11 +3436,11 @@ F32 LLAgent::calcCustomizeAvatarUIOffset( const LLVector3d& camera_pos_global )
const LLRect& rect = gFloaterCustomize->getRect();
// Move the camera so that the avatar isn't covered up by this floater.
- F32 fraction_of_fov = 0.5f - (0.5f * (1.f - llmin(1.f, ((F32)rect.getWidth() / (F32)gViewerWindow->getWindowWidth()))));
+ F32 fraction_of_fov = 0.5f - (0.5f * (1.f - llmin(1.f, ((F32)rect.getWidth() / (F32)gViewerWindow->getWindowWidthScaled()))));
F32 apparent_angle = fraction_of_fov * LLViewerCamera::getInstance()->getView() * LLViewerCamera::getInstance()->getAspect(); // radians
F32 offset = tan(apparent_angle);
- if( rect.mLeft < (gViewerWindow->getWindowWidth() - rect.mRight) )
+ if( rect.mLeft < (gViewerWindow->getWindowWidthScaled() - rect.mRight) )
{
// Move the avatar to the right (camera to the left)
ui_offset = offset;
diff --git a/indra/newview/llagentui.cpp b/indra/newview/llagentui.cpp
index 2911a35581..568ac4164a 100644
--- a/indra/newview/llagentui.cpp
+++ b/indra/newview/llagentui.cpp
@@ -159,19 +159,19 @@ BOOL LLAgentUI::buildLocationString(std::string& str, ELocationFormat fmt,const
buffer = llformat("%.100s", parcel_name.c_str());
break;
case LOCATION_FORMAT_NORMAL:
- buffer = llformat("%s, %s", region_name.c_str(), parcel_name.c_str());
+ buffer = llformat("%s, %s", parcel_name.c_str(), region_name.c_str());
break;
case LOCATION_FORMAT_WITHOUT_SIM:
buffer = llformat("%s, %s (%d, %d, %d)",
- region_name.c_str(),
parcel_name.c_str(),
+ region_name.c_str(),
pos_x, pos_y, pos_z);
break;
case LOCATION_FORMAT_FULL:
std::string sim_access_string = region->getSimAccessString();
buffer = llformat("%s, %s (%d, %d, %d)%s%s",
- region_name.c_str(),
parcel_name.c_str(),
+ region_name.c_str(),
pos_x, pos_y, pos_z,
sim_access_string.empty() ? "" : " - ",
sim_access_string.c_str());
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 8e6d6b885d..ddb6589b49 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -3282,7 +3282,7 @@ void LLAppViewer::saveFinalSnapshot()
snap_filename += gDirUtilp->getDirDelimiter();
snap_filename += SCREEN_LAST_FILENAME;
// use full pixel dimensions of viewer window (not post-scale dimensions)
- gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowDisplayWidth(), gViewerWindow->getWindowDisplayHeight(), FALSE, TRUE);
+ gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw(), FALSE, TRUE);
mSavedFinalSnapshot = TRUE;
}
}
diff --git a/indra/newview/llavatariconctrl.cpp b/indra/newview/llavatariconctrl.cpp
index 0ee3e78409..46902006a6 100644
--- a/indra/newview/llavatariconctrl.cpp
+++ b/indra/newview/llavatariconctrl.cpp
@@ -195,14 +195,6 @@ LLAvatarIconCtrl::LLAvatarIconCtrl(const LLAvatarIconCtrl::Params& p)
{
LLIconCtrl::setValue("default_profile_picture.j2c");
}
-
- LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
-
- registrar.add("AvatarIcon.Action", boost::bind(&LLAvatarIconCtrl::onAvatarIconContextMenuItemClicked, this, _2));
-
- LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_avatar_icon.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
-
- mPopupMenuHandle = menu->getHandle();
}
LLAvatarIconCtrl::~LLAvatarIconCtrl()
@@ -212,8 +204,6 @@ LLAvatarIconCtrl::~LLAvatarIconCtrl()
LLAvatarPropertiesProcessor::getInstance()->removeObserver(mAvatarId, this);
// Name callbacks will be automatically disconnected since LLUICtrl is trackable
}
-
- LLView::deleteViewByHandle(mPopupMenuHandle);
}
//virtual
@@ -295,32 +285,6 @@ void LLAvatarIconCtrl::processProperties(void* data, EAvatarProcessorType type)
}
}
-BOOL LLAvatarIconCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask)
-{
- LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandle.get();
-
- if(menu)
- {
- bool is_friend = LLAvatarTracker::instance().getBuddyInfo(mAvatarId) != NULL;
-
- menu->setItemEnabled("Add Friend", !is_friend);
- menu->setItemEnabled("Remove Friend", is_friend);
-
- if(gAgentID == mAvatarId)
- {
- menu->setItemEnabled("Add Friend", false);
- menu->setItemEnabled("Send IM", false);
- menu->setItemEnabled("Remove Friend", false);
- }
-
- menu->buildDrawLabels();
- menu->updateParent(LLMenuGL::sMenuContainer);
- LLMenuGL::showPopup(this, menu, x, y);
- }
-
- return TRUE;
-}
-
void LLAvatarIconCtrl::nameUpdatedCallback(
const LLUUID& id,
const std::string& first,
@@ -338,40 +302,3 @@ void LLAvatarIconCtrl::nameUpdatedCallback(
}
}
}
-
-void LLAvatarIconCtrl::onAvatarIconContextMenuItemClicked(const LLSD& userdata)
-{
- std::string level = userdata.asString();
- LLUUID id = getAvatarId();
-
- if (level == "profile")
- {
- LLAvatarActions::showProfile(id);
- }
- else if (level == "im")
- {
- std::string name;
- name.assign(getFirstName());
- name.append(" ");
- name.append(getLastName());
-
- LLUUID session_id = gIMMgr->addSession(name, IM_NOTHING_SPECIAL, id);
- if (session_id != LLUUID::null)
- {
- LLIMFloater::show(session_id);
- }
- }
- else if (level == "add")
- {
- std::string name;
- name.assign(getFirstName());
- name.append(" ");
- name.append(getLastName());
-
- LLAvatarActions::requestFriendshipDialog(id, name);
- }
- else if (level == "remove")
- {
- LLAvatarActions::removeFriendDialog(id);
- }
-}
diff --git a/indra/newview/llavatariconctrl.h b/indra/newview/llavatariconctrl.h
index 65b5c86ed5..5eb830df4b 100644
--- a/indra/newview/llavatariconctrl.h
+++ b/indra/newview/llavatariconctrl.h
@@ -81,8 +81,6 @@ protected:
LLAvatarIconCtrl(const Params&);
friend class LLUICtrlFactory;
- void onAvatarIconContextMenuItemClicked(const LLSD& userdata);
-
public:
virtual ~LLAvatarIconCtrl();
@@ -91,8 +89,6 @@ public:
// LLAvatarPropertiesProcessor observer trigger
virtual void processProperties(void* data, EAvatarProcessorType type);
- BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
-
void nameUpdatedCallback(
const LLUUID& id,
const std::string& first,
@@ -109,7 +105,6 @@ protected:
LLUUID mAvatarId;
std::string mFirstName;
std::string mLastName;
- LLHandle<LLView> mPopupMenuHandle;
bool mDrawTooltip;
diff --git a/indra/newview/llavatarpropertiesprocessor.cpp b/indra/newview/llavatarpropertiesprocessor.cpp
index 73e24ca8e7..7cda2d31e6 100644
--- a/indra/newview/llavatarpropertiesprocessor.cpp
+++ b/indra/newview/llavatarpropertiesprocessor.cpp
@@ -158,6 +158,11 @@ void LLAvatarPropertiesProcessor::sendAvatarTexturesRequest(const LLUUID& avatar
removePendingRequest(avatar_id, APT_TEXTURES);
}
+void LLAvatarPropertiesProcessor::sendAvatarClassifiedsRequest(const LLUUID& avatar_id)
+{
+ sendGenericRequest(avatar_id, APT_CLASSIFIEDS, "avatarclassifiedsrequest");
+}
+
void LLAvatarPropertiesProcessor::sendAvatarPropertiesUpdate(const LLAvatarData* avatar_props)
{
llinfos << "Sending avatarinfo update" << llendl;
@@ -284,12 +289,60 @@ void LLAvatarPropertiesProcessor::processAvatarInterestsReply(LLMessageSystem* m
*/
}
-void LLAvatarPropertiesProcessor::processAvatarClassifiedReply(LLMessageSystem* msg, void**)
+void LLAvatarPropertiesProcessor::processAvatarClassifiedsReply(LLMessageSystem* msg, void**)
{
- // avatarclassifiedsrequest is not sent according to new UI design but
- // keep this method according to resolved issues.
+ LLAvatarClassifieds classifieds;
+
+ msg->getUUID(_PREHASH_AgentData, _PREHASH_AgentID, classifieds.agent_id);
+ msg->getUUID(_PREHASH_AgentData, _PREHASH_TargetID, classifieds.target_id);
+
+ S32 block_count = msg->getNumberOfBlocks(_PREHASH_Data);
+
+ for(int n = 0; n < block_count; ++n)
+ {
+ LLAvatarClassifieds::classified_data data;
+
+ msg->getUUID(_PREHASH_Data, _PREHASH_ClassifiedID, data.classified_id, n);
+ msg->getString(_PREHASH_Data, _PREHASH_Name, data.name, n);
+
+ classifieds.classifieds_list.push_back(data);
+ }
+
+ LLAvatarPropertiesProcessor* self = getInstance();
+ // Request processed, no longer pending
+ self->removePendingRequest(classifieds.target_id, APT_CLASSIFIEDS);
+ self->notifyObservers(classifieds.target_id,&classifieds,APT_CLASSIFIEDS);
}
+void LLAvatarPropertiesProcessor::processClassifiedInfoReply(LLMessageSystem* msg, void**)
+{
+ LLAvatarClassifiedInfo c_info;
+
+ msg->getUUID(_PREHASH_AgentData, _PREHASH_AgentID, c_info.agent_id);
+
+ msg->getUUID(_PREHASH_Data, _PREHASH_ClassifiedID, c_info.classified_id);
+ msg->getUUID(_PREHASH_Data, _PREHASH_CreatorID, c_info.creator_id);
+ msg->getU32(_PREHASH_Data, _PREHASH_CreationDate, c_info.creation_date);
+ msg->getU32(_PREHASH_Data, _PREHASH_ExpirationDate, c_info.expiration_date);
+ msg->getU32(_PREHASH_Data, _PREHASH_Category, c_info.category);
+ msg->getString(_PREHASH_Data, _PREHASH_Name, c_info.name);
+ msg->getString(_PREHASH_Data, _PREHASH_Desc, c_info.description);
+ msg->getUUID(_PREHASH_Data, _PREHASH_ParcelID, c_info.parcel_id);
+ msg->getU32(_PREHASH_Data, _PREHASH_ParentEstate, c_info.parent_estate);
+ msg->getUUID(_PREHASH_Data, _PREHASH_SnapshotID, c_info.snapshot_id);
+ msg->getString(_PREHASH_Data, _PREHASH_SimName, c_info.sim_name);
+ msg->getVector3d(_PREHASH_Data, _PREHASH_PosGlobal, c_info.pos_global);
+ msg->getString(_PREHASH_Data, _PREHASH_ParcelName, c_info.parcel_name);
+ msg->getU8(_PREHASH_Data, _PREHASH_ClassifiedFlags, c_info.flags);
+ msg->getS32(_PREHASH_Data, _PREHASH_PriceForListing, c_info.price_for_listing);
+
+ LLAvatarPropertiesProcessor* self = getInstance();
+ // Request processed, no longer pending
+ self->removePendingRequest(c_info.creator_id, APT_CLASSIFIED_INFO);
+ self->notifyObservers(c_info.creator_id, &c_info, APT_CLASSIFIED_INFO);
+}
+
+
void LLAvatarPropertiesProcessor::processAvatarNotesReply(LLMessageSystem* msg, void**)
{
LLAvatarNotes avatar_notes;
@@ -451,6 +504,22 @@ void LLAvatarPropertiesProcessor::sendPickDelete( const LLUUID& pick_id )
LLAgentPicksInfo::getInstance()->decrementNumberOfPicks();
}
+void LLAvatarPropertiesProcessor::sendClassifiedDelete(const LLUUID& classified_id)
+{
+ LLMessageSystem* msg = gMessageSystem;
+
+ msg->newMessage(_PREHASH_ClassifiedDelete);
+
+ msg->nextBlock(_PREHASH_AgentData);
+ msg->addUUID(_PREHASH_AgentID, gAgent.getID());
+ msg->addUUID(_PREHASH_SessionID, gAgent.getSessionID());
+
+ msg->nextBlock(_PREHASH_Data);
+ msg->addUUID(_PREHASH_ClassifiedID, classified_id);
+
+ gAgent.sendReliableMessage();
+}
+
void LLAvatarPropertiesProcessor::sendPickInfoUpdate(const LLPickData* new_pick)
{
if (!new_pick) return;
@@ -485,6 +554,36 @@ void LLAvatarPropertiesProcessor::sendPickInfoUpdate(const LLPickData* new_pick)
LLAgentPicksInfo::getInstance()->requestNumberOfPicks();
}
+void LLAvatarPropertiesProcessor::sendClassifiedInfoUpdate(const LLAvatarClassifiedInfo* c_data)
+{
+ if(!c_data)
+ {
+ return;
+ }
+
+ LLMessageSystem* msg = gMessageSystem;
+
+ msg->newMessage(_PREHASH_ClassifiedInfoUpdate);
+
+ msg->nextBlock(_PREHASH_AgentData);
+ msg->addUUID(_PREHASH_AgentID, gAgent.getID());
+ msg->addUUID(_PREHASH_SessionID, gAgent.getSessionID());
+
+ msg->nextBlock(_PREHASH_Data);
+ msg->addUUID(_PREHASH_ClassifiedID, c_data->classified_id);
+ msg->addU32(_PREHASH_Category, c_data->category);
+ msg->addString(_PREHASH_Name, c_data->name);
+ msg->addString(_PREHASH_Desc, c_data->description);
+ msg->addUUID(_PREHASH_ParcelID, c_data->parcel_id);
+ msg->addU32(_PREHASH_ParentEstate, 0);
+ msg->addUUID(_PREHASH_SnapshotID, c_data->snapshot_id);
+ msg->addVector3d(_PREHASH_PosGlobal, c_data->pos_global);
+ msg->addU8(_PREHASH_ClassifiedFlags, c_data->flags);
+ msg->addS32(_PREHASH_PriceForListing, c_data->price_for_listing);
+
+ gAgent.sendReliableMessage();
+}
+
void LLAvatarPropertiesProcessor::sendPickInfoRequest(const LLUUID& creator_id, const LLUUID& pick_id)
{
// Must ask for a pick based on the creator id because
@@ -495,6 +594,21 @@ void LLAvatarPropertiesProcessor::sendPickInfoRequest(const LLUUID& creator_id,
send_generic_message("pickinforequest", request_params);
}
+void LLAvatarPropertiesProcessor::sendClassifiedInfoRequest(const LLUUID& classified_id)
+{
+ LLMessageSystem* msg = gMessageSystem;
+
+ msg->newMessage(_PREHASH_ClassifiedInfoRequest);
+ msg->nextBlock(_PREHASH_AgentData);
+
+ msg->addUUID(_PREHASH_AgentID, gAgent.getID());
+ msg->addUUID(_PREHASH_SessionID, gAgent.getSessionID());
+
+ msg->nextBlock(_PREHASH_Data);
+ msg->addUUID(_PREHASH_ClassifiedID, classified_id);
+
+ gAgent.sendReliableMessage();
+}
bool LLAvatarPropertiesProcessor::isPendingRequest(const LLUUID& avatar_id, EAvatarProcessorType type)
{
diff --git a/indra/newview/llavatarpropertiesprocessor.h b/indra/newview/llavatarpropertiesprocessor.h
index e6563024b2..716c1b8065 100644
--- a/indra/newview/llavatarpropertiesprocessor.h
+++ b/indra/newview/llavatarpropertiesprocessor.h
@@ -53,7 +53,9 @@ enum EAvatarProcessorType
APT_GROUPS,
APT_PICKS,
APT_PICK_INFO,
- APT_TEXTURES
+ APT_TEXTURES,
+ APT_CLASSIFIEDS,
+ APT_CLASSIFIED_INFO
};
struct LLAvatarData
@@ -136,6 +138,43 @@ struct LLAvatarGroups
};
};
+struct LLAvatarClassifieds
+{
+ LLUUID agent_id;
+ LLUUID target_id;
+
+ struct classified_data;
+ typedef std::list<classified_data> classifieds_list_t;
+
+ classifieds_list_t classifieds_list;
+
+ struct classified_data
+ {
+ LLUUID classified_id;
+ std::string name;
+ };
+};
+
+struct LLAvatarClassifiedInfo
+{
+ LLUUID agent_id;
+ LLUUID classified_id;
+ LLUUID creator_id;
+ U32 creation_date;
+ U32 expiration_date;
+ U32 category;
+ std::string name;
+ std::string description;
+ LLUUID parcel_id;
+ U32 parent_estate;
+ LLUUID snapshot_id;
+ std::string sim_name;
+ LLVector3d pos_global;
+ std::string parcel_name;
+ U8 flags;
+ S32 price_for_listing;
+};
+
class LLAvatarPropertiesObserver
{
public:
@@ -162,20 +201,27 @@ public:
void sendAvatarNotesRequest(const LLUUID& avatar_id);
void sendAvatarGroupsRequest(const LLUUID& avatar_id);
void sendAvatarTexturesRequest(const LLUUID& avatar_id);
+ void sendAvatarClassifiedsRequest(const LLUUID& avatar_id);
// Duplicate pick info requests are not suppressed.
void sendPickInfoRequest(const LLUUID& creator_id, const LLUUID& pick_id);
+ void sendClassifiedInfoRequest(const LLUUID& classified_id);
+
void sendAvatarPropertiesUpdate(const LLAvatarData* avatar_props);
void sendPickInfoUpdate(const LLPickData* new_pick);
+ void sendClassifiedInfoUpdate(const LLAvatarClassifiedInfo* c_data);
+
void sendFriendRights(const LLUUID& avatar_id, S32 rights);
void sendNotes(const LLUUID& avatar_id, const std::string notes);
void sendPickDelete(const LLUUID& pick_id);
+ void sendClassifiedDelete(const LLUUID& classified_id);
+
// Returns translated, human readable string for account type, such
// as "Resident" or "Linden Employee". Used for profiles, inspectors.
static std::string accountType(const LLAvatarData* avatar_data);
@@ -189,7 +235,9 @@ public:
static void processAvatarInterestsReply(LLMessageSystem* msg, void**);
- static void processAvatarClassifiedReply(LLMessageSystem* msg, void**);
+ static void processAvatarClassifiedsReply(LLMessageSystem* msg, void**);
+
+ static void processClassifiedInfoReply(LLMessageSystem* msg, void**);
static void processAvatarGroupsReply(LLMessageSystem* msg, void**);
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp
index e5cc2fce88..832694873f 100644
--- a/indra/newview/llbottomtray.cpp
+++ b/indra/newview/llbottomtray.cpp
@@ -70,7 +70,7 @@ LLBottomTray::LLBottomTray(const LLSD&)
//this is to fix a crash that occurs because LLBottomTray is a singleton
//and thus is deleted at the end of the viewers lifetime, but to be cleanly
//destroyed LLBottomTray requires some subsystems that are long gone
- LLUI::getRootView()->addChild(this);
+ //LLUI::getRootView()->addChild(this);
// Necessary for focus movement among child controls
setFocusRoot(TRUE);
diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp
index 6427422572..914435b640 100644
--- a/indra/newview/llchannelmanager.cpp
+++ b/indra/newview/llchannelmanager.cpp
@@ -127,7 +127,7 @@ void LLChannelManager::onLoginCompleted()
gViewerWindow->getRootView()->addChild(mStartUpChannel);
// init channel's position and size
- S32 channel_right_bound = gViewerWindow->getWorldViewRect().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
+ S32 channel_right_bound = gViewerWindow->getWorldViewRectRaw().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
mStartUpChannel->init(channel_right_bound - channel_width, channel_right_bound);
mStartUpChannel->setMouseDownCallback(boost::bind(&LLSysWellWindow::onStartUpToastClick, LLFloaterReg::getTypedInstance<LLSysWellWindow>("syswell_window"), _2, _3, _4));
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index 53c4bb32ca..6e0654e157 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -55,6 +55,13 @@ static LLDefaultChildRegistry::Register<LLNotificationChiclet> t2("chiclet_notif
static LLDefaultChildRegistry::Register<LLIMP2PChiclet> t3("chiclet_im_p2p");
static LLDefaultChildRegistry::Register<LLIMGroupChiclet> t4("chiclet_im_group");
+static const LLRect CHICLET_RECT(0, 25, 25, 0);
+static const LLRect CHICLET_ICON_RECT(0, 24, 24, 0);
+static const LLRect VOICE_INDICATOR_RECT(25, 25, 45, 0);
+
+// static
+const S32 LLChicletPanel::s_scroll_ratio = 10;
+
S32 LLNotificationChiclet::mUreadSystemNotifications = 0;
boost::signals2::signal<LLChiclet* (const LLUUID&),
@@ -199,7 +206,9 @@ void LLChiclet::setValue(const LLSD& value)
LLIMChiclet::LLIMChiclet(const LLIMChiclet::Params& p)
: LLChiclet(p)
+, mShowSpeaker(false)
, mNewMessagesIcon(NULL)
+, mSpeakerCtrl(NULL)
, mCounterCtrl(NULL)
{
// initialize an overlay icon for new messages
@@ -218,6 +227,40 @@ LLIMChiclet::LLIMChiclet(const LLIMChiclet::Params& p)
setShowCounter(false);
}
+void LLIMChiclet::setShowSpeaker(bool show)
+{
+ bool needs_resize = getShowSpeaker() != show;
+ if(needs_resize)
+ {
+ mShowSpeaker = show;
+ toggleSpeakerControl();
+ onChicletSizeChanged();
+ }
+}
+void LLIMChiclet::initSpeakerControl()
+{
+ // virtual
+}
+
+void LLIMChiclet::toggleSpeakerControl()
+{
+ LLRect speaker_rect = mSpeakerCtrl->getRect();
+ S32 required_width = getRect().getWidth();
+
+ if(getShowSpeaker())
+ {
+ required_width = required_width + speaker_rect.getWidth();
+ initSpeakerControl();
+ }
+ else
+ {
+ required_width = required_width - speaker_rect.getWidth();
+ }
+
+ reshape(required_width, getRect().getHeight());
+ mSpeakerCtrl->setVisible(getShowSpeaker());
+}
+
void LLIMChiclet::setShowNewMessagesIcon(bool show)
{
if(mNewMessagesIcon)
@@ -300,7 +343,7 @@ LLIMP2PChiclet::Params::Params()
, show_speaker("show_speaker")
{
// *TODO Vadim: Get rid of hardcoded values.
- rect(LLRect(0, 25, 25, 0));
+ rect(CHICLET_RECT);
avatar_icon.name("avatar_icon");
avatar_icon.follows.flags(FOLLOWS_LEFT | FOLLOWS_TOP | FOLLOWS_BOTTOM);
@@ -309,11 +352,10 @@ LLIMP2PChiclet::Params::Params()
// Changed icon height from 25 to 24 to fix ticket EXT-794.
// In some cases(after changing UI scale) 25 pixel height icon was
// drawn incorrectly, i'm not sure why.
- avatar_icon.rect(LLRect(0, 24, 25, 0));
+ avatar_icon.rect(CHICLET_ICON_RECT);
avatar_icon.mouse_opaque(false);
unread_notifications.name("unread");
- unread_notifications.rect(LLRect(25, 25, 45, 0));
unread_notifications.font(LLFontGL::getFontSansSerif());
unread_notifications.font_halign(LLFontGL::HCENTER);
unread_notifications.v_pad(5);
@@ -322,7 +364,9 @@ LLIMP2PChiclet::Params::Params()
unread_notifications.visible(false);
speaker.name("speaker");
- speaker.rect(LLRect(45, 25, 65, 0));
+ speaker.rect(VOICE_INDICATOR_RECT);
+ speaker.auto_update(true);
+ speaker.draw_border(false);
show_speaker = false;
}
@@ -330,7 +374,6 @@ LLIMP2PChiclet::Params::Params()
LLIMP2PChiclet::LLIMP2PChiclet(const Params& p)
: LLIMChiclet(p)
, mChicletIconCtrl(NULL)
-, mSpeakerCtrl(NULL)
, mPopupMenu(NULL)
{
LLChicletAvatarIconCtrl::Params avatar_params = p.avatar_icon;
@@ -358,18 +401,9 @@ void LLIMP2PChiclet::setCounter(S32 counter)
setShowNewMessagesIcon(counter);
}
-LLRect LLIMP2PChiclet::getRequiredRect()
+void LLIMP2PChiclet::initSpeakerControl()
{
- LLRect rect(0, 0, mChicletIconCtrl->getRect().getWidth(), 0);
- if(getShowCounter())
- {
- rect.mRight += mCounterCtrl->getRequiredRect().getWidth();
- }
- if(getShowSpeaker())
- {
- rect.mRight += mSpeakerCtrl->getRect().getWidth();
- }
- return rect;
+ mSpeakerCtrl->setSpeakerId(getOtherParticipantId());
}
void LLIMP2PChiclet::setOtherParticipantId(const LLUUID& other_participant_id)
@@ -446,18 +480,6 @@ void LLIMP2PChiclet::onMenuItemClicked(const LLSD& user_data)
}
}
-void LLIMP2PChiclet::setShowSpeaker(bool show)
-{
- LLIMChiclet::setShowSpeaker(show);
-
- bool needs_resize = getShowSpeaker() != show;
- mSpeakerCtrl->setVisible(getShowSpeaker());
- if(needs_resize)
- {
- onChicletSizeChanged();
- }
-}
-
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
@@ -470,7 +492,7 @@ LLAdHocChiclet::Params::Params()
, avatar_icon_color("avatar_icon_color", LLColor4::green)
{
// *TODO Vadim: Get rid of hardcoded values.
- rect(LLRect(0, 25, 25, 0));
+ rect(CHICLET_RECT);
avatar_icon.name("avatar_icon");
avatar_icon.follows.flags(FOLLOWS_LEFT | FOLLOWS_TOP | FOLLOWS_BOTTOM);
@@ -479,11 +501,10 @@ LLAdHocChiclet::Params::Params()
// Changed icon height from 25 to 24 to fix ticket EXT-794.
// In some cases(after changing UI scale) 25 pixel height icon was
// drawn incorrectly, i'm not sure why.
- avatar_icon.rect(LLRect(0, 24, 25, 0));
+ avatar_icon.rect(CHICLET_ICON_RECT);
avatar_icon.mouse_opaque(false);
unread_notifications.name("unread");
- unread_notifications.rect(LLRect(25, 25, 45, 0));
unread_notifications.font(LLFontGL::getFontSansSerif());
unread_notifications.font_halign(LLFontGL::HCENTER);
unread_notifications.v_pad(5);
@@ -493,7 +514,9 @@ LLAdHocChiclet::Params::Params()
speaker.name("speaker");
- speaker.rect(LLRect(45, 25, 65, 0));
+ speaker.rect(VOICE_INDICATOR_RECT);
+ speaker.auto_update(true);
+ speaker.draw_border(false);
show_speaker = false;
}
@@ -501,7 +524,6 @@ LLAdHocChiclet::Params::Params()
LLAdHocChiclet::LLAdHocChiclet(const Params& p)
: LLIMChiclet(p)
, mChicletIconCtrl(NULL)
-, mSpeakerCtrl(NULL)
, mPopupMenu(NULL)
{
LLChicletAvatarIconCtrl::Params avatar_params = p.avatar_icon;
@@ -532,24 +554,40 @@ void LLAdHocChiclet::setSessionId(const LLUUID& session_id)
mChicletIconCtrl->setValue(im_session->mOtherParticipantID);
}
-void LLAdHocChiclet::setCounter(S32 counter)
+void LLAdHocChiclet::draw()
{
- mCounterCtrl->setCounter(counter);
- setShowNewMessagesIcon(counter);
+ switchToCurrentSpeaker();
+ LLIMChiclet::draw();
}
-LLRect LLAdHocChiclet::getRequiredRect()
+void LLAdHocChiclet::initSpeakerControl()
{
- LLRect rect(0, 0, mChicletIconCtrl->getRect().getWidth(), 0);
- if(getShowCounter())
- {
- rect.mRight += mCounterCtrl->getRequiredRect().getWidth();
- }
- if(getShowSpeaker())
+ switchToCurrentSpeaker();
+}
+
+void LLAdHocChiclet::switchToCurrentSpeaker()
+{
+ LLUUID speaker_id;
+ LLSpeakerMgr::speaker_list_t speaker_list;
+
+ LLIMModel::getInstance()->findIMSession(getSessionId())->mSpeakers->getSpeakerList(&speaker_list, FALSE);
+ for (LLSpeakerMgr::speaker_list_t::iterator i = speaker_list.begin(); i != speaker_list.end(); ++i)
{
- rect.mRight += mSpeakerCtrl->getRect().getWidth();
+ LLPointer<LLSpeaker> s = *i;
+ if (s->mSpeechVolume > 0 || s->mStatus == LLSpeaker::STATUS_SPEAKING)
+ {
+ speaker_id = s->mID;
+ break;
+ }
}
- return rect;
+
+ mSpeakerCtrl->setSpeakerId(speaker_id);
+}
+
+void LLAdHocChiclet::setCounter(S32 counter)
+{
+ mCounterCtrl->setCounter(counter);
+ setShowNewMessagesIcon(counter);
}
BOOL LLAdHocChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask)
@@ -564,7 +602,7 @@ BOOL LLAdHocChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask)
LLIMGroupChiclet::Params::Params()
: group_icon("group_icon")
{
- rect(LLRect(0, 25, 25, 0));
+ rect(CHICLET_RECT);
group_icon.name("group_icon");
@@ -572,10 +610,9 @@ LLIMGroupChiclet::Params::Params()
// Changed icon height from 25 to 24 to fix ticket EXT-794.
// In some cases(after changing UI scale) 25 pixel height icon was
// drawn incorrectly, i'm not sure why.
- group_icon.rect(LLRect(0, 24, 25, 0));
+ group_icon.rect(CHICLET_ICON_RECT);
unread_notifications.name("unread");
- unread_notifications.rect(LLRect(25, 25, 45, 0));
unread_notifications.font(LLFontGL::getFontSansSerif());
unread_notifications.font_halign(LLFontGL::HCENTER);
unread_notifications.v_pad(5);
@@ -583,7 +620,9 @@ LLIMGroupChiclet::Params::Params()
unread_notifications.visible(false);
speaker.name("speaker");
- speaker.rect(LLRect(45, 25, 65, 0));
+ speaker.rect(VOICE_INDICATOR_RECT);
+ speaker.auto_update(true);
+ speaker.draw_border(false);
show_speaker = false;
}
@@ -592,7 +631,6 @@ LLIMGroupChiclet::LLIMGroupChiclet(const Params& p)
: LLIMChiclet(p)
, LLGroupMgrObserver(LLUUID::null)
, mChicletIconCtrl(NULL)
-, mSpeakerCtrl(NULL)
, mPopupMenu(NULL)
{
LLChicletGroupIconCtrl::Params avatar_params = p.group_icon;
@@ -625,18 +663,34 @@ void LLIMGroupChiclet::setCounter(S32 counter)
setShowNewMessagesIcon(counter);
}
-LLRect LLIMGroupChiclet::getRequiredRect()
+void LLIMGroupChiclet::draw()
{
- LLRect rect(0, 0, mChicletIconCtrl->getRect().getWidth(), 0);
- if(getShowCounter())
- {
- rect.mRight += mCounterCtrl->getRequiredRect().getWidth();
- }
- if(getShowSpeaker())
+ switchToCurrentSpeaker();
+ LLIMChiclet::draw();
+}
+
+void LLIMGroupChiclet::initSpeakerControl()
+{
+ switchToCurrentSpeaker();
+}
+
+void LLIMGroupChiclet::switchToCurrentSpeaker()
+{
+ LLUUID speaker_id;
+ LLSpeakerMgr::speaker_list_t speaker_list;
+
+ LLIMModel::getInstance()->findIMSession(getSessionId())->mSpeakers->getSpeakerList(&speaker_list, FALSE);
+ for (LLSpeakerMgr::speaker_list_t::iterator i = speaker_list.begin(); i != speaker_list.end(); ++i)
{
- rect.mRight += mSpeakerCtrl->getRect().getWidth();
+ LLPointer<LLSpeaker> s = *i;
+ if (s->mSpeechVolume > 0 || s->mStatus == LLSpeaker::STATUS_SPEAKING)
+ {
+ speaker_id = s->mID;
+ break;
+ }
}
- return rect;
+
+ mSpeakerCtrl->setSpeakerId(speaker_id);
}
void LLIMGroupChiclet::setSessionId(const LLUUID& session_id)
@@ -723,17 +777,6 @@ void LLIMGroupChiclet::onMenuItemClicked(const LLSD& user_data)
}
}
-void LLIMGroupChiclet::setShowSpeaker(bool show)
-{
- LLIMChiclet::setShowSpeaker(show);
-
- bool needs_resize = getShowSpeaker() != show;
- mSpeakerCtrl->setVisible(getShowSpeaker());
- if(needs_resize)
- {
- onChicletSizeChanged();
- }
-}
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
@@ -742,8 +785,6 @@ void LLIMGroupChiclet::setShowSpeaker(bool show)
LLChicletPanel::Params::Params()
: chiclet_padding("chiclet_padding")
, scrolling_offset("scrolling_offset")
-, left_scroll_button("left_scroll_button")
-, right_scroll_button("right_scroll_button")
, min_width("min_width")
{
chiclet_padding = 3;
@@ -754,24 +795,6 @@ LLChicletPanel::Params::Params()
// min_width = 4 chiclets + 3 paddings
min_width = 179 + 3*chiclet_padding;
}
-
- LLRect scroll_button_rect(0, 25, 19, 5);
-
- left_scroll_button.name("left_scroll");
- left_scroll_button.label(LLStringUtil::null);
- left_scroll_button.rect(scroll_button_rect);
- left_scroll_button.tab_stop(false);
- left_scroll_button.image_selected(LLUI::getUIImage("bottom_tray_scroll_left.tga"));
- left_scroll_button.image_unselected(LLUI::getUIImage("bottom_tray_scroll_left.tga"));
- left_scroll_button.image_hover_selected(LLUI::getUIImage("bottom_tray_scroll_left.tga"));
-
- right_scroll_button.name("right_scroll");
- right_scroll_button.label(LLStringUtil::null);
- right_scroll_button.rect(scroll_button_rect);
- right_scroll_button.tab_stop(false);
- right_scroll_button.image_selected(LLUI::getUIImage("bottom_tray_scroll_right.tga"));
- right_scroll_button.image_unselected(LLUI::getUIImage("bottom_tray_scroll_right.tga"));
- right_scroll_button.image_hover_selected(LLUI::getUIImage("bottom_tray_scroll_right.tga"));
};
LLChicletPanel::LLChicletPanel(const Params&p)
@@ -784,23 +807,6 @@ LLChicletPanel::LLChicletPanel(const Params&p)
, mMinWidth(p.min_width)
, mShowControls(true)
{
- LLButton::Params scroll_button_params = p.left_scroll_button;
-
- mLeftScrollButton = LLUICtrlFactory::create<LLButton>(scroll_button_params);
- addChild(mLeftScrollButton);
- LLTransientFloaterMgr::getInstance()->addControlView(mLeftScrollButton);
-
- mLeftScrollButton->setClickedCallback(boost::bind(&LLChicletPanel::onLeftScrollClick,this));
- mLeftScrollButton->setEnabled(false);
-
- scroll_button_params = p.right_scroll_button;
- mRightScrollButton = LLUICtrlFactory::create<LLButton>(scroll_button_params);
- addChild(mRightScrollButton);
- LLTransientFloaterMgr::getInstance()->addControlView(mRightScrollButton);
-
- mRightScrollButton->setClickedCallback(boost::bind(&LLChicletPanel::onRightScrollClick,this));
- mRightScrollButton->setEnabled(false);
-
LLPanel::Params panel_params;
mScrollArea = LLUICtrlFactory::create<LLPanel>(panel_params,this);
@@ -812,6 +818,8 @@ LLChicletPanel::LLChicletPanel(const Params&p)
LLChicletPanel::~LLChicletPanel()
{
+ LLTransientFloaterMgr::getInstance()->removeControlView(mLeftScrollButton);
+ LLTransientFloaterMgr::getInstance()->removeControlView(mRightScrollButton);
}
@@ -849,10 +857,40 @@ BOOL LLChicletPanel::postBuild()
LLIMModel::instance().addNewMsgCallback(boost::bind(im_chiclet_callback, this, _1));
LLIMModel::instance().addNoUnreadMsgsCallback(boost::bind(im_chiclet_callback, this, _1));
LLIMChiclet::sFindChicletsSignal.connect(boost::bind(&LLChicletPanel::findChiclet<LLChiclet>, this, _1));
+ LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLChicletPanel::onCurrentVoiceChannelChanged, this, _1));
+
+ mLeftScrollButton=getChild<LLButton>("chicklet_left_scroll_button");
+ LLTransientFloaterMgr::getInstance()->addControlView(mLeftScrollButton);
+ mLeftScrollButton->setMouseDownCallback(boost::bind(&LLChicletPanel::onLeftScrollClick,this));
+ mLeftScrollButton->setHeldDownCallback(boost::bind(&LLChicletPanel::onLeftScrollHeldDown,this));
+ mLeftScrollButton->setEnabled(false);
+
+ mRightScrollButton=getChild<LLButton>("chicklet_right_scroll_button");
+ LLTransientFloaterMgr::getInstance()->addControlView(mRightScrollButton);
+ mRightScrollButton->setMouseDownCallback(boost::bind(&LLChicletPanel::onRightScrollClick,this));
+ mRightScrollButton->setHeldDownCallback(boost::bind(&LLChicletPanel::onRightScrollHeldDown,this));
+ mRightScrollButton->setEnabled(false);
return TRUE;
}
+void LLChicletPanel::onCurrentVoiceChannelChanged(const LLUUID& session_id)
+{
+ for(chiclet_list_t::iterator it = mChicletList.begin(); it != mChicletList.end(); ++it)
+ {
+ LLIMChiclet* chiclet = dynamic_cast<LLIMChiclet*>(*it);
+ if(chiclet)
+ {
+ if(chiclet->getSessionId() == session_id)
+ {
+ chiclet->setShowSpeaker(true);
+ continue;
+ }
+ chiclet->setShowSpeaker(false);
+ }
+ }
+}
+
S32 LLChicletPanel::calcChickletPanleWidth()
{
S32 res = 0;
@@ -896,23 +934,7 @@ bool LLChicletPanel::addChiclet(LLChiclet* chiclet, S32 index)
void LLChicletPanel::onChicletSizeChanged(LLChiclet* ctrl, const LLSD& param)
{
- S32 chiclet_width = ctrl->getRect().getWidth();
- S32 chiclet_new_width = ctrl->getRequiredRect().getWidth();
-
- if(chiclet_new_width == chiclet_width)
- {
- return;
- }
-
- LLRect chiclet_rect = ctrl->getRect();
- chiclet_rect.mRight = chiclet_rect.mLeft + chiclet_new_width;
-
- ctrl->setRect(chiclet_rect);
-
- S32 offset = chiclet_new_width - chiclet_width;
- S32 index = getChicletIndex(ctrl);
-
- shiftChiclets(offset, index + 1);
+ arrange();
trimChiclets();
showScrollButtonsIfNeeded();
}
@@ -1024,23 +1046,24 @@ void LLChicletPanel::reshape(S32 width, S32 height, BOOL called_from_parent )
static const S32 SCROLL_BUTTON_PAD = 5;
+ //Needed once- to avoid error at first call of reshape() before postBuild()
+ if(!mLeftScrollButton||!mRightScrollButton)
+ return;
+
LLRect scroll_button_rect = mLeftScrollButton->getRect();
- mLeftScrollButton->setRect(LLRect(0,height,scroll_button_rect.getWidth(),
- height - scroll_button_rect.getHeight()));
-
+ mLeftScrollButton->setRect(LLRect(0,scroll_button_rect.mTop,scroll_button_rect.getWidth(),
+ scroll_button_rect.mBottom));
scroll_button_rect = mRightScrollButton->getRect();
- mRightScrollButton->setRect(LLRect(width - scroll_button_rect.getWidth(),height,
- width, height - scroll_button_rect.getHeight()));
-
+ mRightScrollButton->setRect(LLRect(width - scroll_button_rect.getWidth(),scroll_button_rect.mTop,
+ width, scroll_button_rect.mBottom));
mScrollArea->setRect(LLRect(scroll_button_rect.getWidth() + SCROLL_BUTTON_PAD,
height, width - scroll_button_rect.getWidth() - SCROLL_BUTTON_PAD, 0));
-
mShowControls = width > mMinWidth;
mScrollArea->setVisible(mShowControls);
trimChiclets();
-
showScrollButtonsIfNeeded();
+
}
void LLChicletPanel::arrange()
@@ -1204,6 +1227,22 @@ void LLChicletPanel::onRightScrollClick()
scrollRight();
}
+void LLChicletPanel::onLeftScrollHeldDown()
+{
+ S32 offset = mScrollingOffset;
+ mScrollingOffset = mScrollingOffset / s_scroll_ratio;
+ scrollLeft();
+ mScrollingOffset = offset;
+}
+
+void LLChicletPanel::onRightScrollHeldDown()
+{
+ S32 offset = mScrollingOffset;
+ mScrollingOffset = mScrollingOffset / s_scroll_ratio;
+ scrollRight();
+ mScrollingOffset = offset;
+}
+
boost::signals2::connection LLChicletPanel::setChicletClickedCallback(
const commit_callback_t& cb)
{
@@ -1327,6 +1366,6 @@ void LLChicletGroupIconCtrl::setValue(const LLSD& value )
//////////////////////////////////////////////////////////////////////////
LLChicletSpeakerCtrl::LLChicletSpeakerCtrl(const Params&p)
- : LLIconCtrl(p)
+ : LLOutputMonitorCtrl(p)
{
}
diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h
index b50702205c..e7afd7f08e 100644
--- a/indra/newview/llchiclet.h
+++ b/indra/newview/llchiclet.h
@@ -147,13 +147,13 @@ protected:
};
/*
- * Class for displaying status of Voice Chat
+ * Class for displaying of speaker's voice indicator
*/
-class LLChicletSpeakerCtrl : public LLIconCtrl
+class LLChicletSpeakerCtrl : public LLOutputMonitorCtrl
{
public:
- struct Params : public LLInitParam::Block<Params, LLIconCtrl::Params>
+ struct Params : public LLInitParam::Block<Params, LLOutputMonitorCtrl::Params>
{
Params(){};
};
@@ -266,8 +266,6 @@ private:
* Base class for Instant Message chiclets.
* IMChiclet displays icon, number of unread messages(optional)
* and voice chat status(optional).
-* Every chiclet should override LLUICtrl::getRequiredRect and return
-* desired width.
*/
class LLIMChiclet : public LLChiclet
{
@@ -306,9 +304,14 @@ public:
virtual LLUUID getOtherParticipantId() { return mOtherParticipantId; }
/*
- * Shows/hides voice chat status control.
+ * Init Speaker Control with speaker's ID
*/
- virtual void setShowSpeaker(bool show) { mShowSpeaker = show; }
+ virtual void initSpeakerControl();
+
+ /*
+ * set status (Shows/Hide) for voice control.
+ */
+ virtual void setShowSpeaker(bool show);
/*
* Returns voice chat status control visibility.
@@ -316,6 +319,11 @@ public:
virtual bool getShowSpeaker() {return mShowSpeaker;};
/*
+ * Shows/Hides for voice control for a chiclet.
+ */
+ virtual void toggleSpeakerControl();
+
+ /*
* Shows/hides overlay icon concerning new unread messages.
*/
virtual void setShowNewMessagesIcon(bool show);
@@ -325,10 +333,7 @@ public:
*/
virtual bool getShowNewMessagesIcon();
- /*
- * Draws border around chiclet.
- */
- /*virtual*/ void draw();
+ virtual void draw();
/**
* Determine whether given ID refers to a group or an IM chat session.
@@ -363,6 +368,8 @@ protected:
LLIconCtrl* mNewMessagesIcon;
LLChicletNotificationCounterCtrl* mCounterCtrl;
+ LLChicletSpeakerCtrl* mSpeakerCtrl;
+
/** the id of another participant, either an avatar id or a group id*/
LLUUID mOtherParticipantId;
@@ -410,8 +417,6 @@ public:
/* virtual */ void setOtherParticipantId(const LLUUID& other_participant_id);
- /*virtual*/ void setShowSpeaker(bool show);
-
/*
* Sets number of unread messages. Will update chiclet's width if number text
* exceeds size of counter and notify it's parent about size change.
@@ -419,15 +424,14 @@ public:
/*virtual*/ void setCounter(S32);
/*
- * Returns number of unread messages.
+ * Init Speaker Control with speaker's ID
*/
- /*virtual*/ S32 getCounter() { return mCounterCtrl->getCounter(); }
+ /*virtual*/ void initSpeakerControl();
/*
- * Returns rect, required to display chiclet.
- * Width is the only valid value.
+ * Returns number of unread messages.
*/
- /*virtual*/ LLRect getRequiredRect();
+ /*virtual*/ S32 getCounter() { return mCounterCtrl->getCounter(); }
protected:
LLIMP2PChiclet(const Params& p);
@@ -457,7 +461,6 @@ protected:
private:
LLChicletAvatarIconCtrl* mChicletIconCtrl;
- LLChicletSpeakerCtrl* mSpeakerCtrl;
LLMenuGL* mPopupMenu;
};
@@ -495,15 +498,19 @@ public:
/*virtual*/ void setCounter(S32);
/*
- * Returns number of unread messages.
+ * Keep Speaker Control with actual speaker's ID
*/
- /*virtual*/ S32 getCounter() { return mCounterCtrl->getCounter(); }
+ /*virtual*/ void draw();
/*
- * Returns rect, required to display chiclet.
- * Width is the only valid value.
+ * Init Speaker Control with speaker's ID
*/
- /*virtual*/ LLRect getRequiredRect();
+ /*virtual*/ void initSpeakerControl();
+
+ /*
+ * Returns number of unread messages.
+ */
+ /*virtual*/ S32 getCounter() { return mCounterCtrl->getCounter(); }
protected:
LLAdHocChiclet(const Params& p);
@@ -514,10 +521,14 @@ protected:
*/
virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
+ /*
+ * Finds a current speaker and resets the SpeakerControl with speaker's ID
+ */
+ /*virtual*/ void switchToCurrentSpeaker();
+
private:
LLChicletAvatarIconCtrl* mChicletIconCtrl;
- LLChicletSpeakerCtrl* mSpeakerCtrl;
LLMenuGL* mPopupMenu;
};
@@ -547,14 +558,17 @@ public:
*/
/*virtual*/ void setSessionId(const LLUUID& session_id);
+ /*
+ * Keep Speaker Control with actual speaker's ID
+ */
+ /*virtual*/ void draw();
+
/**
* Callback for LLGroupMgrObserver, we get this when group data is available or changed.
* Sets group icon.
*/
/*virtual*/ void changed(LLGroupChange gc);
- /*virtual*/ void setShowSpeaker(bool show);
-
/*
* Sets number of unread messages. Will update chiclet's width if number text
* exceeds size of counter and notify it's parent about size change.
@@ -562,15 +576,14 @@ public:
/*virtual*/ void setCounter(S32);
/*
- * Returns number of unread messages.
+ * Init Speaker Control with speaker's ID
*/
- /*virtual*/ S32 getCounter() { return mCounterCtrl->getCounter(); }
+ /*virtual*/ void initSpeakerControl();
/*
- * Returns rect, required to display chiclet.
- * Width is the only valid value.
+ * Returns number of unread messages.
*/
- /*virtual*/ LLRect getRequiredRect();
+ /*virtual*/ S32 getCounter() { return mCounterCtrl->getCounter(); }
~LLIMGroupChiclet();
@@ -579,6 +592,11 @@ protected:
friend class LLUICtrlFactory;
/*
+ * Finds a current speaker and resets the SpeakerControl with speaker's ID
+ */
+ /*virtual*/ void switchToCurrentSpeaker();
+
+ /*
* Creates chiclet popup menu. Will create P2P or Group IM Chat menu
* based on other participant's id.
*/
@@ -597,7 +615,6 @@ protected:
private:
LLChicletGroupIconCtrl* mChicletIconCtrl;
- LLChicletSpeakerCtrl* mSpeakerCtrl;
LLMenuGL* mPopupMenu;
};
@@ -660,9 +677,6 @@ public:
Optional<S32> chiclet_padding,
scrolling_offset;
- Optional<LLButton::Params> left_scroll_button,
- right_scroll_button;
-
Optional<S32> min_width;
Params();
@@ -736,6 +750,11 @@ public:
/*virtual*/ BOOL postBuild();
/*
+ * Handler for the Voice Client's signal. Finds a corresponding chiclet and toggles its SpeakerControl
+ */
+ void onCurrentVoiceChannelChanged(const LLUUID& session_id);
+
+ /*
* Reshapes controls and rearranges chiclets if needed.
*/
/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE );
@@ -812,6 +831,16 @@ protected:
void onRightScrollClick();
/*
+ * Callback for right scroll button held down event
+ */
+ void onLeftScrollHeldDown();
+
+ /*
+ * Callback for left scroll button held down event
+ */
+ void onRightScrollHeldDown();
+
+ /*
* Callback for mouse wheel scrolled, calls scrollRight() or scrollLeft()
*/
BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
@@ -851,6 +880,7 @@ protected:
S32 mScrollingOffset;
S32 mMinWidth;
bool mShowControls;
+ static const S32 s_scroll_ratio;
};
template<class T>
diff --git a/indra/newview/lldebugview.cpp b/indra/newview/lldebugview.cpp
index 9057d84f63..20dc4440c2 100644
--- a/indra/newview/lldebugview.cpp
+++ b/indra/newview/lldebugview.cpp
@@ -55,12 +55,16 @@ LLDebugView* gDebugView = NULL;
//
// Methods
//
+static LLDefaultChildRegistry::Register<LLDebugView> r("debug_view");
LLDebugView::LLDebugView(const LLDebugView::Params& p)
: LLView(p)
+{}
+
+void LLDebugView::init()
{
LLRect r;
- LLRect rect(p.rect);
+ LLRect rect = getLocalRect();
r.set(10, rect.getHeight() - 100, rect.getWidth()/2, 100);
LLConsole::Params cp;
@@ -75,16 +79,16 @@ LLDebugView::LLDebugView(const LLDebugView::Params& p)
r.set(150 - 25, rect.getHeight() - 50, rect.getWidth()/2 - 25, rect.getHeight() - 450);
- r.set(25, rect.getHeight() - 50, (S32) (gViewerWindow->getVirtualWindowRect().getWidth() * 0.75f),
- (S32) (gViewerWindow->getVirtualWindowRect().getHeight() * 0.75f));
+ r.set(25, rect.getHeight() - 50, (S32) (gViewerWindow->getWindowRectScaled().getWidth() * 0.75f),
+ (S32) (gViewerWindow->getWindowRectScaled().getHeight() * 0.75f));
mFastTimerView = new LLFastTimerView(r);
mFastTimerView->setFollowsTop();
mFastTimerView->setFollowsLeft();
mFastTimerView->setVisible(FALSE); // start invisible
addChild(mFastTimerView);
- r.set(25, rect.getHeight() - 50, (S32) (gViewerWindow->getVirtualWindowRect().getWidth() * 0.75f),
- (S32) (gViewerWindow->getVirtualWindowRect().getHeight() * 0.75f));
+ r.set(25, rect.getHeight() - 50, (S32) (gViewerWindow->getWindowRectScaled().getWidth() * 0.75f),
+ (S32) (gViewerWindow->getWindowRectScaled().getHeight() * 0.75f));
LLMemoryView::Params mp;
mp.name("memory");
mp.rect(r);
diff --git a/indra/newview/lldebugview.h b/indra/newview/lldebugview.h
index 9cf2a59a0a..b17cdb43cd 100644
--- a/indra/newview/lldebugview.h
+++ b/indra/newview/lldebugview.h
@@ -60,6 +60,8 @@ public:
LLDebugView(const Params&);
~LLDebugView();
+ void init();
+
void setStatsVisible(BOOL visible);
LLFastTimerView* mFastTimerView;
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index 03a3f2b43d..d60330024a 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -89,7 +89,7 @@ LLDynamicArrayPtr<LLPointer<LLDrawable> > LLDrawable::sDeadList;
void LLDrawable::incrementVisible()
{
sCurVisible++;
- sCurPixelAngle = (F32) gViewerWindow->getWindowDisplayHeight()/LLViewerCamera::getInstance()->getView();
+ sCurPixelAngle = (F32) gViewerWindow->getWindowHeightRaw()/LLViewerCamera::getInstance()->getView();
}
void LLDrawable::init()
{
diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp
index e41c4104eb..9bc7221dc8 100644
--- a/indra/newview/lldynamictexture.cpp
+++ b/indra/newview/lldynamictexture.cpp
@@ -126,7 +126,7 @@ void LLViewerDynamicTexture::preRender(BOOL clear_depth)
// force rendering to on-screen portion of frame buffer
LLCoordScreen window_pos;
gViewerWindow->getWindow()->getPosition( &window_pos );
- mOrigin.set(0, gViewerWindow->getWindowDisplayHeight() - mFullHeight); // top left corner
+ mOrigin.set(0, gViewerWindow->getWindowHeightRaw() - mFullHeight); // top left corner
if (window_pos.mX < 0)
{
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index c54b83d865..31f1462a12 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -1403,7 +1403,7 @@ F32 LLFace::calcPixelArea(F32& cos_angle_to_view_dir, F32& radius)
//the projection of the face partially overlaps with the screen
F32 LLFace::adjustPartialOverlapPixelArea(F32 cos_angle_to_view_dir, F32 radius )
{
- F32 screen_radius = (F32)llmax(gViewerWindow->getWindowDisplayWidth(), gViewerWindow->getWindowDisplayHeight()) ;
+ F32 screen_radius = (F32)llmax(gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw()) ;
F32 center_angle = acosf(cos_angle_to_view_dir) ;
F32 d = center_angle * LLDrawable::sCurPixelAngle ;
diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp
index 2ab17d6220..0b27001f10 100644
--- a/indra/newview/llfasttimerview.cpp
+++ b/indra/newview/llfasttimerview.cpp
@@ -256,7 +256,8 @@ BOOL LLFastTimerView::handleToolTip(S32 x, S32 y, MASK mask)
LLToolTipMgr::instance().show(LLToolTip::Params()
.message(mHoverTimer->getToolTip(LLFastTimer::NamedTimer::HISTORY_NUM - mScrollIndex - mHoverBarIndex))
- .sticky_rect(screen_rect));
+ .sticky_rect(screen_rect)
+ .delay_time(0.f));
return TRUE;
}
@@ -302,8 +303,8 @@ void LLFastTimerView::draw()
F64 iclock_freq = 1000.0 / clock_freq;
S32 margin = 10;
- S32 height = (S32) (gViewerWindow->getVirtualWindowRect().getHeight()*0.75f);
- S32 width = (S32) (gViewerWindow->getVirtualWindowRect().getWidth() * 0.75f);
+ S32 height = (S32) (gViewerWindow->getWindowRectScaled().getHeight()*0.75f);
+ S32 width = (S32) (gViewerWindow->getWindowRectScaled().getWidth() * 0.75f);
// HACK: casting away const. Should use setRect or some helper function instead.
const_cast<LLRect&>(getRect()).setLeftTopAndSize(getRect().mLeft, getRect().mTop, width, height);
diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp
index 262dc1804d..9ba61ba92f 100644
--- a/indra/newview/llfloaterauction.cpp
+++ b/indra/newview/llfloaterauction.cpp
@@ -188,8 +188,8 @@ void LLFloaterAuction::onClickSnapshot(void* data)
gForceRenderLandFence = self->childGetValue("fence_check").asBoolean();
BOOL success = gViewerWindow->rawSnapshot(raw,
- gViewerWindow->getWindowWidth(),
- gViewerWindow->getWindowHeight(),
+ gViewerWindow->getWindowWidthScaled(),
+ gViewerWindow->getWindowHeightScaled(),
TRUE, FALSE,
FALSE, FALSE);
gForceRenderLandFence = FALSE;
diff --git a/indra/newview/llfloatermediasettings.cpp b/indra/newview/llfloatermediasettings.cpp
index d941f24f49..44e68d7745 100644
--- a/indra/newview/llfloatermediasettings.cpp
+++ b/indra/newview/llfloatermediasettings.cpp
@@ -145,13 +145,18 @@ LLFloaterMediaSettings* LLFloaterMediaSettings::getInstance()
//static
void LLFloaterMediaSettings::apply()
{
-
LLSD settings;
+ sInstance->mPanelMediaSettingsGeneral->preApply();
sInstance->mPanelMediaSettingsGeneral->getValues( settings );
- sInstance->mPanelMediaSettingsSecurity->getValues( settings );
+ sInstance->mPanelMediaSettingsSecurity->preApply();
+ sInstance->mPanelMediaSettingsSecurity->getValues( settings );
+ sInstance->mPanelMediaSettingsPermissions->preApply();
sInstance->mPanelMediaSettingsPermissions->getValues( settings );
LLSelectMgr::getInstance()->selectionSetMedia( LLTextureEntry::MF_HAS_MEDIA );
LLSelectMgr::getInstance()->selectionSetMediaData(settings);
+ sInstance->mPanelMediaSettingsGeneral->postApply();
+ sInstance->mPanelMediaSettingsSecurity->postApply();
+ sInstance->mPanelMediaSettingsPermissions->postApply();
}
////////////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 2af1313db4..4434a8013d 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -348,6 +348,8 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
mCommitCallbackRegistrar.add("Pref.AutoDetectAspect", boost::bind(&LLFloaterPreference::onCommitAutoDetectAspect, this));
mCommitCallbackRegistrar.add("Pref.onSelectAspectRatio", boost::bind(&LLFloaterPreference::onKeystrokeAspectRatio, this));
mCommitCallbackRegistrar.add("Pref.QualityPerformance", boost::bind(&LLFloaterPreference::onChangeQuality, this, _2));
+ mCommitCallbackRegistrar.add("Pref.applyUIColor", boost::bind(&LLFloaterPreference::applyUIColor, this ,_1, _2));
+ mCommitCallbackRegistrar.add("Pref.getUIColor", boost::bind(&LLFloaterPreference::getUIColor, this ,_1, _2));
sSkin = gSavedSettings.getString("SkinCurrent");
@@ -1332,8 +1334,8 @@ void LLFloaterPreference::initWindowSizeControls(LLPanel* panelp)
// Look to see if current window size matches existing window sizes, if so then
// just set the selection value...
- const U32 height = gViewerWindow->getWindowDisplayHeight();
- const U32 width = gViewerWindow->getWindowDisplayWidth();
+ const U32 height = gViewerWindow->getWindowHeightRaw();
+ const U32 width = gViewerWindow->getWindowWidthRaw();
for (S32 i=0; i < ctrl_window_size->getItemCount(); i++)
{
U32 height_test = 0;
@@ -1356,18 +1358,24 @@ void LLFloaterPreference::initWindowSizeControls(LLPanel* panelp)
}
+void LLFloaterPreference::applyUIColor(LLUICtrl* ctrl, const LLSD& param)
+{
+ LLUIColorTable::instance().setColor(param.asString(), LLColor4(ctrl->getValue()));
+}
+
+void LLFloaterPreference::getUIColor(LLUICtrl* ctrl, const LLSD& param)
+{
+ LLColorSwatchCtrl* color_swatch = (LLColorSwatchCtrl*) ctrl;
+ color_swatch->setOriginal(LLUIColorTable::instance().getColor(param.asString()));
+}
+
//----------------------------------------------------------------------------
static LLRegisterPanelClassWrapper<LLPanelPreference> t_places("panel_preference");
LLPanelPreference::LLPanelPreference()
: LLPanel()
{
- mCommitCallbackRegistrar.add("Pref.setControlFalse", boost::bind(&LLPanelPreference::setControlFalse,this, _2));
-}
-
-static void applyUIColor(const std::string& color_name, LLUICtrl* ctrl, const LLSD& param)
-{
- LLUIColorTable::instance().setColor(color_name, LLColor4(param));
+ mCommitCallbackRegistrar.add("Pref.setControlFalse", boost::bind(&LLPanelPreference::setControlFalse,this, _2));
}
//virtual
@@ -1496,55 +1504,6 @@ BOOL LLPanelPreference::postBuild()
refresh();
}
-
- if(hasChild("user") && hasChild("agent") && hasChild("im")
- && hasChild("system") && hasChild("script_error") && hasChild("objects")
- && hasChild("owner") && hasChild("background") && hasChild("links"))
- {
- LLColorSwatchCtrl* color_swatch = getChild<LLColorSwatchCtrl>("user");
- color_swatch->setCommitCallback(boost::bind(&applyUIColor, "UserChatColor", _1, _2));
- color_swatch->setOriginal(LLUIColorTable::instance().getColor("UserChatColor"));
-
- color_swatch = getChild<LLColorSwatchCtrl>("agent");
- color_swatch->setCommitCallback(boost::bind(&applyUIColor, "AgentChatColor", _1, _2));
- color_swatch->setOriginal(LLUIColorTable::instance().getColor("AgentChatColor"));
-
- color_swatch = getChild<LLColorSwatchCtrl>("im");
- color_swatch->setCommitCallback(boost::bind(&applyUIColor, "IMChatColor", _1, _2));
- color_swatch->setOriginal(LLUIColorTable::instance().getColor("IMChatColor"));
-
- color_swatch = getChild<LLColorSwatchCtrl>("system");
- color_swatch->setCommitCallback(boost::bind(&applyUIColor, "SystemChatColor", _1, _2));
- color_swatch->setOriginal(LLUIColorTable::instance().getColor("SystemChatColor"));
-
- color_swatch = getChild<LLColorSwatchCtrl>("script_error");
- color_swatch->setCommitCallback(boost::bind(&applyUIColor, "ScriptErrorColor", _1, _2));
- color_swatch->setOriginal(LLUIColorTable::instance().getColor("ScriptErrorColor"));
-
- color_swatch = getChild<LLColorSwatchCtrl>("objects");
- color_swatch->setCommitCallback(boost::bind(&applyUIColor, "ObjectChatColor", _1, _2));
- color_swatch->setOriginal(LLUIColorTable::instance().getColor("ObjectChatColor"));
-
- color_swatch = getChild<LLColorSwatchCtrl>("owner");
- color_swatch->setCommitCallback(boost::bind(&applyUIColor, "llOwnerSayChatColor", _1, _2));
- color_swatch->setOriginal(LLUIColorTable::instance().getColor("llOwnerSayChatColor"));
-
- color_swatch = getChild<LLColorSwatchCtrl>("background");
- color_swatch->setCommitCallback(boost::bind(&applyUIColor, "BackgroundChatColor", _1, _2));
- color_swatch->setOriginal(LLUIColorTable::instance().getColor("BackgroundChatColor"));
-
- color_swatch = getChild<LLColorSwatchCtrl>("links");
- color_swatch->setCommitCallback(boost::bind(&applyUIColor, "HTMLLinkColor", _1, _2));
- color_swatch->setOriginal(LLUIColorTable::instance().getColor("HTMLLinkColor"));
- }
-
- if(hasChild("effect_color_swatch"))
- {
- LLColorSwatchCtrl* color_swatch = getChild<LLColorSwatchCtrl>("effect_color_swatch");
- color_swatch->setCommitCallback(boost::bind(&applyUIColor, "EffectColor", _1, _2));
- color_swatch->setOriginal(LLUIColorTable::instance().getColor("EffectColor"));
- }
-
apply();
return true;
}
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index b1ad0348c0..10f39e46f1 100644
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -133,7 +133,9 @@ public:
void onCommitAutoDetectAspect();
void applyResolution();
void applyWindowSize();
-
+ void applyUIColor(LLUICtrl* ctrl, const LLSD& param);
+ void getUIColor(LLUICtrl* ctrl, const LLSD& param);
+
static void initWindowSizeControls(LLPanel* panelp);
static void buildLists(void* data);
@@ -159,6 +161,7 @@ public:
virtual void apply();
virtual void cancel();
void setControlFalse(const LLSD& user_data);
+
private:
typedef std::map<LLControlVariable*, LLSD> control_values_map_t;
control_values_map_t mSavedValues;
diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp
index 4375787ea2..928126bff9 100644
--- a/indra/newview/llfloaterproperties.cpp
+++ b/indra/newview/llfloaterproperties.cpp
@@ -900,7 +900,7 @@ LLMultiProperties::LLMultiProperties()
{
// start with a small rect in the top-left corner ; will get resized
LLRect rect;
- rect.setLeftTopAndSize(0, gViewerWindow->getWindowHeight(), 20, 20);
+ rect.setLeftTopAndSize(0, gViewerWindow->getWindowHeightScaled(), 20, 20);
setRect(rect);
}
setTitle(LLTrans::getString("MultiPropertiesTitle"));
diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp
index 97c573ddea..ca2cdffcf8 100644
--- a/indra/newview/llfloatersearch.cpp
+++ b/indra/newview/llfloatersearch.cpp
@@ -36,6 +36,7 @@
#include "llmediactrl.h"
#include "lllogininstance.h"
#include "lluri.h"
+#include "llagent.h"
LLFloaterSearch::LLFloaterSearch(const LLSD& key) :
LLFloater(key),
@@ -122,6 +123,12 @@ void LLFloaterSearch::search(const LLSD &key)
LLSD search_token = LLLoginInstance::getInstance()->getResponse("search_token");
url += "&p=" + search_token.asString();
+ // also append the user's preferred maturity (can be changed via prefs)
+ std::string maturity = "pg";
+ if (gAgent.prefersMature()) maturity += ",mature";
+ if (gAgent.prefersAdult()) maturity += ",adult";
+ url += "&r=" + maturity;
+
// and load the URL in the web view
mBrowser->navigateTo(url);
}
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index fd2e7b3487..1cc7042c3a 100644
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -101,6 +101,8 @@ 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 LLDefaultChildRegistry::Register<LLSnapshotFloaterView> r("snapshot_floater_view");
+
///----------------------------------------------------------------------------
/// Class LLSnapshotLivePreview
///----------------------------------------------------------------------------
@@ -243,10 +245,10 @@ LLSnapshotLivePreview::LLSnapshotLivePreview (const LLSnapshotLivePreview::Param
// gIdleCallbacks.addFunction( &LLSnapshotLivePreview::onIdle, (void*)this );
sList.insert(this);
setFollowsAll();
- mWidth[0] = gViewerWindow->getWindowDisplayWidth();
- mWidth[1] = gViewerWindow->getWindowDisplayWidth();
- mHeight[0] = gViewerWindow->getWindowDisplayHeight();
- mHeight[1] = gViewerWindow->getWindowDisplayHeight();
+ mWidth[0] = gViewerWindow->getWindowWidthRaw();
+ mWidth[1] = gViewerWindow->getWindowWidthRaw();
+ mHeight[0] = gViewerWindow->getWindowHeightRaw();
+ mHeight[1] = gViewerWindow->getWindowHeightRaw();
mImageScaled[0] = FALSE;
mImageScaled[1] = FALSE;
@@ -492,27 +494,27 @@ void LLSnapshotLivePreview::draw()
LLLocalClipRect clip(getLocalRect());
{
// draw diagonal stripe with gradient that passes over screen
- S32 x1 = gViewerWindow->getWindowWidth() * llround((clamp_rescale(shine_interp, 0.f, 1.f, -1.f - SHINE_WIDTH, 1.f)));
- S32 x2 = x1 + llround(gViewerWindow->getWindowWidth() * SHINE_WIDTH);
- S32 x3 = x2 + llround(gViewerWindow->getWindowWidth() * SHINE_WIDTH);
+ S32 x1 = gViewerWindow->getWindowWidthScaled() * llround((clamp_rescale(shine_interp, 0.f, 1.f, -1.f - SHINE_WIDTH, 1.f)));
+ S32 x2 = x1 + llround(gViewerWindow->getWindowWidthScaled() * SHINE_WIDTH);
+ S32 x3 = x2 + llround(gViewerWindow->getWindowWidthScaled() * SHINE_WIDTH);
S32 y1 = 0;
- S32 y2 = gViewerWindow->getWindowHeight();
+ S32 y2 = gViewerWindow->getWindowHeightScaled();
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gGL.begin(LLRender::QUADS);
{
gGL.color4f(1.f, 1.f, 1.f, 0.f);
gGL.vertex2i(x1, y1);
- gGL.vertex2i(x1 + gViewerWindow->getWindowWidth(), y2);
+ gGL.vertex2i(x1 + gViewerWindow->getWindowWidthScaled(), y2);
gGL.color4f(1.f, 1.f, 1.f, SHINE_OPACITY);
- gGL.vertex2i(x2 + gViewerWindow->getWindowWidth(), y2);
+ gGL.vertex2i(x2 + gViewerWindow->getWindowWidthScaled(), y2);
gGL.vertex2i(x2, y1);
gGL.color4f(1.f, 1.f, 1.f, SHINE_OPACITY);
gGL.vertex2i(x2, y1);
- gGL.vertex2i(x2 + gViewerWindow->getWindowWidth(), y2);
+ gGL.vertex2i(x2 + gViewerWindow->getWindowWidthScaled(), y2);
gGL.color4f(1.f, 1.f, 1.f, 0.f);
- gGL.vertex2i(x3 + gViewerWindow->getWindowWidth(), y2);
+ gGL.vertex2i(x3 + gViewerWindow->getWindowWidthScaled(), y2);
gGL.vertex2i(x3, y1);
}
gGL.end();
@@ -615,8 +617,8 @@ BOOL LLSnapshotLivePreview::setThumbnailImageSize()
{
return FALSE ;
}
- S32 window_width = gViewerWindow->getWindowDisplayWidth() ;
- S32 window_height = gViewerWindow->getWindowDisplayHeight() ;
+ S32 window_width = gViewerWindow->getWindowWidthRaw() ;
+ S32 window_height = gViewerWindow->getWindowHeightRaw() ;
F32 window_aspect_ratio = ((F32)window_width) / ((F32)window_height);
@@ -1166,7 +1168,7 @@ void LLFloaterSnapshot::Impl::updateLayout(LLFloaterSnapshot* floaterp)
gSavedSettings.setS32("SnapshotLocalLastResolution", 0);
LLSnapshotLivePreview* previewp = getPreviewView(floaterp);
- previewp->setSize(gViewerWindow->getWindowDisplayWidth(), gViewerWindow->getWindowDisplayHeight());
+ previewp->setSize(gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw());
}
bool use_freeze_frame = floaterp->childGetValue("freeze_frame_check").asBoolean();
@@ -1691,7 +1693,7 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL
if (width == 0 || height == 0)
{
// take resolution from current window size
- previewp->setSize(gViewerWindow->getWindowDisplayWidth(), gViewerWindow->getWindowDisplayHeight());
+ previewp->setSize(gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw());
}
else if (width == -1 || height == -1)
{
@@ -1844,13 +1846,13 @@ BOOL LLFloaterSnapshot::Impl::checkImageSize(LLSnapshotLivePreview* previewp, S3
#endif
if(previewp && previewp->mKeepAspectRatio)
{
- if(gViewerWindow->getWindowDisplayWidth() < 1 || gViewerWindow->getWindowDisplayHeight() < 1)
+ if(gViewerWindow->getWindowWidthRaw() < 1 || gViewerWindow->getWindowHeightRaw() < 1)
{
return FALSE ;
}
//aspect ratio of the current window
- F32 aspect_ratio = (F32)gViewerWindow->getWindowDisplayWidth() / gViewerWindow->getWindowDisplayHeight() ;
+ F32 aspect_ratio = (F32)gViewerWindow->getWindowWidthRaw() / gViewerWindow->getWindowHeightRaw() ;
//change another value proportionally
if(isWidthChanged)
@@ -2042,10 +2044,12 @@ BOOL LLFloaterSnapshot::postBuild()
LLSnapshotLivePreview::Params p;
p.rect(full_screen_rect);
LLSnapshotLivePreview* previewp = new LLSnapshotLivePreview(p);
- getRootView()->removeChild(gSnapshotFloaterView);
+ LLView* parent_view = gSnapshotFloaterView->getParent();
+
+ parent_view->removeChild(gSnapshotFloaterView);
// make sure preview is below snapshot floater
- getRootView()->addChild(previewp);
- getRootView()->addChild(gSnapshotFloaterView);
+ parent_view->addChild(previewp);
+ parent_view->addChild(gSnapshotFloaterView);
//move snapshot floater to special purpose snapshotfloaterview
gFloaterView->removeChild(this);
diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp
index 3aef15a35c..3c3dfb760e 100644
--- a/indra/newview/llfloatertools.cpp
+++ b/indra/newview/llfloatertools.cpp
@@ -86,6 +86,7 @@
#include "llviewermenu.h"
#include "llviewerparcelmgr.h"
#include "llviewerwindow.h"
+#include "llvovolume.h"
#include "lluictrlfactory.h"
// Globals
@@ -1079,21 +1080,45 @@ void LLFloaterTools::getMediaState()
}
bool editable = (first_object->permModify() || selectedMediaEditable());
-
+
+ // Check modify permissions and whether any selected objects are in
+ // the process of being fetched. If they are, then we're not editable
+ if (editable)
+ {
+ LLObjectSelection::iterator iter = selected_objects->begin();
+ LLObjectSelection::iterator end = selected_objects->end();
+ for ( ; iter != end; ++iter)
+ {
+ LLSelectNode* node = *iter;
+ LLVOVolume* object = dynamic_cast<LLVOVolume*>(node->getObject());
+ if (NULL != object)
+ {
+ if (!object->permModify() || object->isMediaDataBeingFetched())
+ {
+ editable = false;
+ break;
+ }
+ }
+ }
+ }
+
// Media settings
- U8 has_media = (U8)0;
- struct media_functor : public LLSelectedTEGetFunctor<U8>
+ bool bool_has_media = false;
+ struct media_functor : public LLSelectedTEGetFunctor<bool>
{
- U8 get(LLViewerObject* object, S32 face)
+ bool get(LLViewerObject* object, S32 face)
{
- return (object->getTE(face)->getMediaTexGen());
+ LLTextureEntry *te = object->getTE(face);
+ if (te)
+ {
+ return te->hasMedia();
+ }
+ return false;
}
} func;
// check if all faces have media(or, all dont have media)
- LLFloaterMediaSettings::getInstance()->mIdenticalHasMediaInfo = selected_objects->getSelectedTEValue( &func, has_media );
- bool bool_has_media = (has_media & LLTextureEntry::MF_HAS_MEDIA);
-
+ LLFloaterMediaSettings::getInstance()->mIdenticalHasMediaInfo = selected_objects->getSelectedTEValue( &func, bool_has_media );
const LLMediaEntry default_media_data;
diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp
index 663bd232f7..3613ac803e 100644
--- a/indra/newview/llfloateruipreview.cpp
+++ b/indra/newview/llfloateruipreview.cpp
@@ -849,6 +849,7 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save)
{
LLUICtrlFactory::getInstance()->buildFloater(*floaterp, path, NULL); // just build it
(*floaterp)->openFloater((*floaterp)->getKey());
+ (*floaterp)->setCanResize((*floaterp)->isResizable());
}
}
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 7863c373c6..21458f83cd 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -2174,7 +2174,7 @@ void LLFolderView::updateRenamerPosition()
screenPointToLocal( x, y, &x, &y );
mRenamer->setOrigin( x, y );
- LLRect scroller_rect(0, 0, gViewerWindow->getWindowWidth(), 0);
+ LLRect scroller_rect(0, 0, gViewerWindow->getWindowWidthScaled(), 0);
if (mScrollContainer)
{
scroller_rect = mScrollContainer->getContentWindowRect();
diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp
index 010ed23918..cdb85f5b1c 100644
--- a/indra/newview/llgrouplist.cpp
+++ b/indra/newview/llgrouplist.cpp
@@ -181,13 +181,9 @@ void LLGroupList::addNewItem(const LLUUID& id, const std::string& name, const LL
// item->setContextMenu(mContextMenu);
item->childSetVisible("info_btn", false);
+ item->childSetVisible("profile_btn", false);
item->setGroupIconVisible(mShowIcons);
- if (id.isNull())
- {
- item->childSetVisible("profile_btn", false);
- }
-
addItem(item, id, pos);
// setCommentVisible(false);
@@ -254,7 +250,10 @@ void LLGroupListItem::onMouseEnter(S32 x, S32 y, MASK mask)
{
childSetVisible("hovered_icon", true);
if (mGroupID.notNull()) // don't show the info button for the "none" group
+ {
mInfoBtn->setVisible(true);
+ childSetVisible("profile_btn", true);
+ }
LLPanel::onMouseEnter(x, y, mask);
}
@@ -263,6 +262,7 @@ void LLGroupListItem::onMouseLeave(S32 x, S32 y, MASK mask)
{
childSetVisible("hovered_icon", false);
mInfoBtn->setVisible(false);
+ childSetVisible("profile_btn", false);
LLPanel::onMouseLeave(x, y, mask);
}
diff --git a/indra/newview/llhudicon.cpp b/indra/newview/llhudicon.cpp
index eda1d3fc55..040027c70d 100644
--- a/indra/newview/llhudicon.cpp
+++ b/indra/newview/llhudicon.cpp
@@ -145,8 +145,8 @@ void LLHUDIcon::renderIcon(BOOL for_select)
}
F32 image_aspect = (F32)mImagep->getFullWidth() / (F32)mImagep->getFullHeight() ;
- LLVector3 x_scale = image_aspect * (F32)gViewerWindow->getWindowHeight() * mScale * scale_factor * x_pixel_vec;
- LLVector3 y_scale = (F32)gViewerWindow->getWindowHeight() * mScale * scale_factor * y_pixel_vec;
+ LLVector3 x_scale = image_aspect * (F32)gViewerWindow->getWindowHeightScaled() * mScale * scale_factor * x_pixel_vec;
+ LLVector3 y_scale = (F32)gViewerWindow->getWindowHeightScaled() * mScale * scale_factor * y_pixel_vec;
LLVector3 lower_left = icon_position - (x_scale * 0.5f);
LLVector3 lower_right = icon_position + (x_scale * 0.5f);
@@ -261,8 +261,8 @@ BOOL LLHUDIcon::lineSegmentIntersect(const LLVector3& start, const LLVector3& en
}
F32 image_aspect = (F32)mImagep->getFullWidth() / (F32)mImagep->getFullHeight() ;
- LLVector3 x_scale = image_aspect * (F32)gViewerWindow->getWindowHeight() * mScale * scale_factor * x_pixel_vec;
- LLVector3 y_scale = (F32)gViewerWindow->getWindowHeight() * mScale * scale_factor * y_pixel_vec;
+ LLVector3 x_scale = image_aspect * (F32)gViewerWindow->getWindowHeightScaled() * mScale * scale_factor * x_pixel_vec;
+ LLVector3 y_scale = (F32)gViewerWindow->getWindowHeightScaled() * mScale * scale_factor * y_pixel_vec;
LLVector3 lower_left = icon_position - (x_scale * 0.5f);
LLVector3 lower_right = icon_position + (x_scale * 0.5f);
diff --git a/indra/newview/llhudrender.cpp b/indra/newview/llhudrender.cpp
index 886fe3da07..ab0be90def 100644
--- a/indra/newview/llhudrender.cpp
+++ b/indra/newview/llhudrender.cpp
@@ -77,8 +77,8 @@ void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent,
LLVector3 up_axis;
if (orthographic)
{
- right_axis.setVec(0.f, -1.f / gViewerWindow->getWorldViewWidth(), 0.f);
- up_axis.setVec(0.f, 0.f, 1.f / gViewerWindow->getWorldViewHeight());
+ right_axis.setVec(0.f, -1.f / gViewerWindow->getWorldViewWidthRaw(), 0.f);
+ up_axis.setVec(0.f, 0.f, 1.f / gViewerWindow->getWorldViewHeightRaw());
}
else
{
@@ -106,7 +106,7 @@ void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent,
//get the render_pos in screen space
F64 winX, winY, winZ;
- LLRect world_view_rect = gViewerWindow->getWorldViewRect();
+ LLRect world_view_rect = gViewerWindow->getWorldViewRectRaw();
S32 viewport[4];
viewport[0] = world_view_rect.mLeft;
viewport[1] = world_view_rect.mBottom;
diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp
index 55019f91f8..0b5da40be4 100644
--- a/indra/newview/llhudtext.cpp
+++ b/indra/newview/llhudtext.cpp
@@ -156,8 +156,8 @@ BOOL LLHUDText::lineSegmentIntersect(const LLVector3& start, const LLVector3& en
if (mOnHUDAttachment)
{
- x_pixel_vec = LLVector3::y_axis / (F32)gViewerWindow->getWindowWidth();
- y_pixel_vec = LLVector3::z_axis / (F32)gViewerWindow->getWindowHeight();
+ x_pixel_vec = LLVector3::y_axis / (F32)gViewerWindow->getWindowWidthScaled();
+ y_pixel_vec = LLVector3::z_axis / (F32)gViewerWindow->getWindowHeightScaled();
}
else
{
@@ -316,8 +316,8 @@ void LLHUDText::renderText(BOOL for_select)
if (mOnHUDAttachment)
{
- x_pixel_vec = LLVector3::y_axis / (F32)gViewerWindow->getWorldViewWidth();
- y_pixel_vec = LLVector3::z_axis / (F32)gViewerWindow->getWorldViewHeight();
+ x_pixel_vec = LLVector3::y_axis / (F32)gViewerWindow->getWorldViewWidthRaw();
+ y_pixel_vec = LLVector3::z_axis / (F32)gViewerWindow->getWorldViewHeightRaw();
}
else
{
@@ -351,8 +351,8 @@ void LLHUDText::renderText(BOOL for_select)
//if (mOnHUD)
//{
- // render_position.mV[VY] -= fmodf(render_position.mV[VY], 1.f / (F32)gViewerWindow->getWindowWidth());
- // render_position.mV[VZ] -= fmodf(render_position.mV[VZ], 1.f / (F32)gViewerWindow->getWindowHeight());
+ // render_position.mV[VY] -= fmodf(render_position.mV[VY], 1.f / (F32)gViewerWindow->getWindowWidthScaled());
+ // render_position.mV[VZ] -= fmodf(render_position.mV[VZ], 1.f / (F32)gViewerWindow->getWindowHeightScaled());
//}
//else
//{
@@ -800,7 +800,7 @@ LLVector2 LLHUDText::updateScreenPos(LLVector2 &offset)
screen_pos_vec.setVec((F32)screen_pos.mX, (F32)screen_pos.mY);
- LLRect world_rect = gViewerWindow->getVirtualWorldViewRect();
+ LLRect world_rect = gViewerWindow->getWorldViewRectScaled();
S32 bottom = world_rect.mBottom + STATUS_BAR_HEIGHT;
LLVector2 screen_center;
@@ -897,7 +897,7 @@ void LLHUDText::updateAll()
std::sort(sVisibleHUDTextObjects.begin(), sVisibleHUDTextObjects.end(), lltextobject_further_away());
// iterate from front to back, and set LOD based on current screen coverage
- F32 screen_area = (F32)(gViewerWindow->getWindowWidth() * gViewerWindow->getWindowHeight());
+ F32 screen_area = (F32)(gViewerWindow->getWindowWidthScaled() * gViewerWindow->getWindowHeightScaled());
F32 current_screen_area = 0.f;
std::vector<LLPointer<LLHUDText> >::reverse_iterator r_it;
for (r_it = sVisibleTextObjects.rbegin(); r_it != sVisibleTextObjects.rend(); ++r_it)
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index a634a1b0fd..5a2331aa06 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -363,7 +363,7 @@ LLIMFloater* LLIMFloater::show(const LLUUID& session_id)
void LLIMFloater::getAllowedRect(LLRect& rect)
{
- rect = gViewerWindow->getWorldViewRect();
+ rect = gViewerWindow->getWorldViewRectRaw();
}
void LLIMFloater::setDocked(bool docked, bool pop_on_undock)
diff --git a/indra/newview/llimhandler.cpp b/indra/newview/llimhandler.cpp
index 74971f3fd8..524a889f97 100644
--- a/indra/newview/llimhandler.cpp
+++ b/indra/newview/llimhandler.cpp
@@ -58,7 +58,7 @@ LLIMHandler::~LLIMHandler()
//--------------------------------------------------------------------------
void LLIMHandler::initChannel()
{
- S32 channel_right_bound = gViewerWindow->getWorldViewRect().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
+ S32 channel_right_bound = gViewerWindow->getWorldViewRectRaw().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
mChannel->init(channel_right_bound - channel_width, channel_right_bound);
}
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index d009d45db4..14f94d5a88 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -1167,6 +1167,9 @@ void LLIncomingCallDialog::onStartIM(void* user_data)
void LLIncomingCallDialog::processCallResponse(S32 response)
{
+ if (!gIMMgr)
+ return;
+
LLUUID session_id = mPayload["session_id"].asUUID();
EInstantMessage type = (EInstantMessage)mPayload["type"].asInteger();
LLIMMgr::EInvitationType inv_type = (LLIMMgr::EInvitationType)mPayload["inv_type"].asInteger();
@@ -1264,6 +1267,9 @@ void LLIncomingCallDialog::processCallResponse(S32 response)
bool inviteUserResponse(const LLSD& notification, const LLSD& response)
{
+ if (!gIMMgr)
+ return false;
+
const LLSD& payload = notification["payload"];
LLUUID session_id = payload["session_id"].asUUID();
EInstantMessage type = (EInstantMessage)payload["type"].asInteger();
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 4b7e364cf9..e7d7eb19d0 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -1271,8 +1271,11 @@ void LLInventoryModel::fetchInventoryResponder::error(U32 status, const std::str
bool LLInventoryModel::fetchDescendentsOf(const LLUUID& folder_id)
{
- if(folder_id.isNull()) return false;
-
+ if(folder_id.isNull())
+ {
+ llwarns << "Calling fetch descendents on NULL folder id!" << llendl;
+ return false;
+ }
LLViewerInventoryCategory* cat = getCategory(folder_id);
if(!cat)
{
diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp
index f62d7229a3..fa1dbe0603 100644
--- a/indra/newview/llmanip.cpp
+++ b/indra/newview/llmanip.cpp
@@ -265,8 +265,8 @@ BOOL LLManip::getMousePointOnPlaneGlobal(LLVector3d& point, S32 x, S32 y, LLVect
if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
{
BOOL result = FALSE;
- F32 mouse_x = ((F32)x / gViewerWindow->getWindowWidth() - 0.5f) * LLViewerCamera::getInstance()->getAspect() / gAgent.mHUDCurZoom;
- F32 mouse_y = ((F32)y / gViewerWindow->getWindowHeight() - 0.5f) / gAgent.mHUDCurZoom;
+ F32 mouse_x = ((F32)x / gViewerWindow->getWindowWidthScaled() - 0.5f) * LLViewerCamera::getInstance()->getAspect() / gAgent.mHUDCurZoom;
+ F32 mouse_y = ((F32)y / gViewerWindow->getWindowHeightScaled() - 0.5f) / gAgent.mHUDCurZoom;
LLVector3 origin_agent = gAgent.getPosAgentFromGlobal(origin);
LLVector3 mouse_pos = LLVector3(0.f, -mouse_x, mouse_y);
@@ -304,8 +304,8 @@ BOOL LLManip::nearestPointOnLineFromMouse( S32 x, S32 y, const LLVector3& b1, co
if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
{
- F32 mouse_x = (((F32)x / gViewerWindow->getWindowWidth()) - 0.5f) * LLViewerCamera::getInstance()->getAspect() / gAgent.mHUDCurZoom;
- F32 mouse_y = (((F32)y / gViewerWindow->getWindowHeight()) - 0.5f) / gAgent.mHUDCurZoom;
+ F32 mouse_x = (((F32)x / gViewerWindow->getWindowWidthScaled()) - 0.5f) * LLViewerCamera::getInstance()->getAspect() / gAgent.mHUDCurZoom;
+ F32 mouse_y = (((F32)y / gViewerWindow->getWindowHeightScaled()) - 0.5f) / gAgent.mHUDCurZoom;
a1 = LLVector3(llmin(b1.mV[VX] - 0.1f, b2.mV[VX] - 0.1f, 0.f), -mouse_x, mouse_y);
a2 = a1 + LLVector3(1.f, 0.f, 0.f);
}
@@ -429,9 +429,9 @@ void LLManip::renderXYZ(const LLVector3 &vec)
const S32 PAD = 10;
std::string feedback_string;
LLVector3 camera_pos = LLViewerCamera::getInstance()->getOrigin() + LLViewerCamera::getInstance()->getAtAxis();
- S32 vertical_offset = gViewerWindow->getWindowHeight() / 2 - VERTICAL_OFFSET;
- S32 window_center_x = gViewerWindow->getWindowWidth() / 2;
- S32 window_center_y = gViewerWindow->getWindowHeight() / 2;
+ S32 vertical_offset = gViewerWindow->getWindowHeightScaled() / 2 - VERTICAL_OFFSET;
+ S32 window_center_x = gViewerWindow->getWindowWidthScaled() / 2;
+ S32 window_center_y = gViewerWindow->getWindowHeightScaled() / 2;
glPushMatrix();
{
diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp
index c99e67be3f..bcaebb6bbb 100644
--- a/indra/newview/llmaniprotate.cpp
+++ b/indra/newview/llmaniprotate.cpp
@@ -1107,8 +1107,8 @@ BOOL LLManipRotate::updateVisiblity()
mCenterToProfilePlaneMag = mRadiusMeters * mRadiusMeters / mCenterToCamMag;
mCenterToProfilePlane = -mCenterToProfilePlaneMag * mCenterToCamNorm;
- mCenterScreen.set((S32)((0.5f - mRotationCenter.mdV[VY]) / gAgent.mHUDCurZoom * gViewerWindow->getWorldViewWidth()),
- (S32)((mRotationCenter.mdV[VZ] + 0.5f) / gAgent.mHUDCurZoom * gViewerWindow->getWorldViewHeight()));
+ mCenterScreen.set((S32)((0.5f - mRotationCenter.mdV[VY]) / gAgent.mHUDCurZoom * gViewerWindow->getWorldViewWidthRaw()),
+ (S32)((mRotationCenter.mdV[VZ] + 0.5f) / gAgent.mHUDCurZoom * gViewerWindow->getWorldViewHeightRaw()));
visible = TRUE;
}
else
@@ -1624,8 +1624,8 @@ void LLManipRotate::mouseToRay( S32 x, S32 y, LLVector3* ray_pt, LLVector3* ray_
{
if (LLSelectMgr::getInstance()->getSelection()->getSelectType() == SELECT_TYPE_HUD)
{
- F32 mouse_x = (((F32)x / gViewerWindow->getWorldViewWidth()) - 0.5f) / gAgent.mHUDCurZoom;
- F32 mouse_y = ((((F32)y) / gViewerWindow->getWorldViewHeight()) - 0.5f) / gAgent.mHUDCurZoom;
+ F32 mouse_x = (((F32)x / gViewerWindow->getWorldViewWidthRaw()) - 0.5f) / gAgent.mHUDCurZoom;
+ F32 mouse_y = ((((F32)y) / gViewerWindow->getWorldViewHeightRaw()) - 0.5f) / gAgent.mHUDCurZoom;
*ray_pt = LLVector3(-1.f, -mouse_x, mouse_y);
*ray_dir = LLVector3(1.f, 0.f, 0.f);
@@ -1699,7 +1699,7 @@ void LLManipRotate::highlightManipulators( S32 x, S32 y )
F32 dist_y = mouse_dir_y.normVec();
F32 dist_z = mouse_dir_z.normVec();
- F32 distance_threshold = (MAX_MANIP_SELECT_DISTANCE * mRadiusMeters) / gViewerWindow->getWorldViewHeight();
+ F32 distance_threshold = (MAX_MANIP_SELECT_DISTANCE * mRadiusMeters) / gViewerWindow->getWorldViewHeightRaw();
if (llabs(dist_x - mRadiusMeters) * llmax(0.05f, proj_rot_x_axis) < distance_threshold)
{
diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp
index 72596e850a..84a5eb7352 100644
--- a/indra/newview/llmanipscale.cpp
+++ b/indra/newview/llmanipscale.cpp
@@ -493,8 +493,9 @@ void LLManipScale::highlightManipulators(S32 x, S32 y)
mProjectedManipulators.insert(projManipulator);
}
- F32 half_width = (F32)gViewerWindow->getWorldViewWidth() / 2.f;
- F32 half_height = (F32)gViewerWindow->getWorldViewHeight() / 2.f;
+ LLRect world_view_rect = gViewerWindow->getWorldViewRectScaled();
+ F32 half_width = (F32)world_view_rect.getWidth() / 2.f;
+ F32 half_height = (F32)world_view_rect.getHeight() / 2.f;
LLVector2 manip2d;
LLVector2 mousePos((F32)x - half_width, (F32)y - half_height);
LLVector2 delta;
@@ -1368,7 +1369,7 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox)
else
{
F32 object_distance = dist_vec(mScaleCenter, LLViewerCamera::getInstance()->getOrigin());
- mSnapRegimeOffset = (SNAP_GUIDE_SCREEN_OFFSET * gViewerWindow->getWorldViewWidth() * object_distance) / LLViewerCamera::getInstance()->getPixelMeterRatio();
+ mSnapRegimeOffset = (SNAP_GUIDE_SCREEN_OFFSET * gViewerWindow->getWorldViewWidthRaw() * object_distance) / LLViewerCamera::getInstance()->getPixelMeterRatio();
}
LLVector3 cam_at_axis;
F32 snap_guide_length;
@@ -1381,7 +1382,7 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox)
{
cam_at_axis = LLViewerCamera::getInstance()->getAtAxis();
F32 manipulator_distance = dist_vec(box_corner_agent, LLViewerCamera::getInstance()->getOrigin());
- snap_guide_length = (SNAP_GUIDE_SCREEN_LENGTH * gViewerWindow->getWorldViewWidth() * manipulator_distance) / LLViewerCamera::getInstance()->getPixelMeterRatio();
+ snap_guide_length = (SNAP_GUIDE_SCREEN_LENGTH * gViewerWindow->getWorldViewWidthRaw() * manipulator_distance) / LLViewerCamera::getInstance()->getPixelMeterRatio();
}
mSnapGuideLength = snap_guide_length / llmax(0.1f, (llmin(mSnapGuideDir1 * cam_at_axis, mSnapGuideDir2 * cam_at_axis)));
diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp
index f1b3a37677..932a3d8a83 100644
--- a/indra/newview/llmaniptranslate.cpp
+++ b/indra/newview/llmaniptranslate.cpp
@@ -413,8 +413,9 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
}
// Handle auto-rotation if necessary.
+ LLRect world_rect = gViewerWindow->getWorldViewRectScaled();
const F32 ROTATE_ANGLE_PER_SECOND = 30.f * DEG_TO_RAD;
- const S32 ROTATE_H_MARGIN = gViewerWindow->getWorldViewWidth() / 20;
+ const S32 ROTATE_H_MARGIN = world_rect.getWidth() / 20;
const F32 rotate_angle = ROTATE_ANGLE_PER_SECOND / gFPSClamped;
BOOL rotated = FALSE;
@@ -426,7 +427,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
gAgent.cameraOrbitAround(rotate_angle);
rotated = TRUE;
}
- else if (x > gViewerWindow->getWorldViewWidth() - ROTATE_H_MARGIN)
+ else if (x > world_rect.getWidth() - ROTATE_H_MARGIN)
{
gAgent.cameraOrbitAround(-rotate_angle);
rotated = TRUE;
@@ -960,8 +961,9 @@ void LLManipTranslate::highlightManipulators(S32 x, S32 y)
LLVector2 manip_start_2d;
LLVector2 manip_end_2d;
LLVector2 manip_dir;
- F32 half_width = gViewerWindow->getWorldViewWidth() / 2.f;
- F32 half_height = gViewerWindow->getWorldViewHeight() / 2.f;
+ LLRect world_view_rect = gViewerWindow->getWorldViewRectScaled();
+ F32 half_width = (F32)world_view_rect.getWidth() / 2.f;
+ F32 half_height = (F32)world_view_rect.getHeight() / 2.f;
LLVector2 mousePos((F32)x - half_width, (F32)y - half_height);
LLVector2 mouse_delta;
@@ -1225,7 +1227,7 @@ void LLManipTranslate::renderSnapGuides()
{
LLVector3 cam_to_selection = getPivotPoint() - LLViewerCamera::getInstance()->getOrigin();
F32 current_range = cam_to_selection.normVec();
- guide_size_meters = SNAP_GUIDE_SCREEN_SIZE * gViewerWindow->getWorldViewHeight() * current_range / LLViewerCamera::getInstance()->getPixelMeterRatio();
+ guide_size_meters = SNAP_GUIDE_SCREEN_SIZE * gViewerWindow->getWorldViewHeightRaw() * current_range / LLViewerCamera::getInstance()->getPixelMeterRatio();
F32 fraction_of_fov = mAxisArrowLength / (F32) LLViewerCamera::getInstance()->getViewHeightInPixels();
F32 apparent_angle = fraction_of_fov * LLViewerCamera::getInstance()->getView(); // radians
@@ -1800,7 +1802,7 @@ void LLManipTranslate::renderTranslationHandles()
// Drag handles
if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
{
- mArrowLengthMeters = mAxisArrowLength / gViewerWindow->getWorldViewHeight();
+ mArrowLengthMeters = mAxisArrowLength / gViewerWindow->getWorldViewHeightRaw();
mArrowLengthMeters /= gAgent.mHUDCurZoom;
}
else
diff --git a/indra/newview/llmediadataclient.cpp b/indra/newview/llmediadataclient.cpp
index 512104a2f4..986c14acff 100755
--- a/indra/newview/llmediadataclient.cpp
+++ b/indra/newview/llmediadataclient.cpp
@@ -324,6 +324,22 @@ std::ostream& operator<<(std::ostream &s, const LLMediaDataClient::PriorityQueue
return s;
}
+// find the given object in the queue.
+bool LLMediaDataClient::PriorityQueue::find(const LLMediaDataClientObject::ptr_t &obj) const
+{
+ std::vector<LLMediaDataClient::request_ptr_t>::const_iterator iter = c.begin();
+ std::vector<LLMediaDataClient::request_ptr_t>::const_iterator end = c.end();
+ while (iter < end)
+ {
+ if (obj->getID() == (*iter)->getObject()->getID())
+ {
+ return true;
+ }
+ iter++;
+ }
+ return false;
+}
+
//////////////////////////////////////////////////////////////////////////////////////
//
// LLMediaDataClient::QueueTimer
@@ -491,6 +507,11 @@ bool LLMediaDataClient::isEmpty() const
return (NULL == pRequestQueue) ? true : pRequestQueue->empty();
}
+bool LLMediaDataClient::isInQueue(const LLMediaDataClientObject::ptr_t &object) const
+{
+ return (NULL == pRequestQueue) ? false : pRequestQueue->find(object);
+}
+
//////////////////////////////////////////////////////////////////////////////////////
//
// LLObjectMediaDataClient
diff --git a/indra/newview/llmediadataclient.h b/indra/newview/llmediadataclient.h
index 9d0aa0981e..0d1450ffbe 100755
--- a/indra/newview/llmediadataclient.h
+++ b/indra/newview/llmediadataclient.h
@@ -89,7 +89,10 @@ public:
F32 getRetryTimerDelay() const { return mRetryTimerDelay; }
// Returns true iff the queue is empty
- bool isEmpty() const;
+ bool isEmpty() const;
+
+ // Returns true iff the given object is in the queue
+ bool isInQueue(const LLMediaDataClientObject::ptr_t &object) const;
protected:
// Destructor
@@ -206,6 +209,9 @@ private:
Comparator >
{
public:
+ // Return whether the given object is in the queue
+ bool find(const LLMediaDataClientObject::ptr_t &obj) const;
+
friend std::ostream& operator<<(std::ostream &s, const PriorityQueue &q);
};
diff --git a/indra/newview/llmemoryview.cpp b/indra/newview/llmemoryview.cpp
index b3aa67733b..cbe4cef12f 100644
--- a/indra/newview/llmemoryview.cpp
+++ b/indra/newview/llmemoryview.cpp
@@ -130,8 +130,8 @@ void LLMemoryView::draw()
curUpdate++;
// setup window properly
- S32 height = (S32) (gViewerWindow->getVirtualWindowRect().getHeight()*0.75f);
- S32 width = (S32) (gViewerWindow->getVirtualWindowRect().getWidth() * 0.9f);
+ S32 height = (S32) (gViewerWindow->getWindowRectScaled().getHeight()*0.75f);
+ S32 width = (S32) (gViewerWindow->getWindowRectScaled().getWidth() * 0.9f);
setRect(LLRect().setLeftTopAndSize(getRect().mLeft, getRect().mTop, width, height));
// setup window color
diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp
index 14da35594f..e3ba1b8e4a 100644
--- a/indra/newview/llmoveview.cpp
+++ b/indra/newview/llmoveview.cpp
@@ -598,14 +598,11 @@ BOOL LLPanelStandStopFlying::postBuild()
void LLPanelStandStopFlying::setVisible(BOOL visible)
{
//we dont need to show the panel if these buttons are not activated
- if (visible && !mStandButton->getVisible() && !mStopFlyingButton->getVisible()) visible = false;
-
if (gAgent.getCameraMode() == CAMERA_MODE_MOUSELOOK) visible = false;
if (visible)
{
updatePosition();
- getParent()->sendChildToFront(this);
}
LLPanel::setVisible(visible);
@@ -638,7 +635,7 @@ LLPanelStandStopFlying* LLPanelStandStopFlying::getStandStopFlyingPanel()
LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_stand_stop_flying.xml");
panel->setVisible(FALSE);
- LLUI::getRootView()->addChild(panel);
+ //LLUI::getRootView()->addChild(panel);
llinfos << "Build LLPanelStandStopFlying panel" << llendl;
@@ -680,7 +677,7 @@ void LLPanelStandStopFlying::updatePosition()
//align centers of a button and a floater
S32 x = movement_btn->calcScreenRect().getCenterX() - getRect().getWidth()/2;
- S32 y = tray->getRect().getHeight();
+ S32 y = 0;
LLFloater *move_floater = LLFloaterReg::findInstance("moveview");
if (move_floater)
diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp
index 63794be085..794d73a5ad 100644
--- a/indra/newview/llnavigationbar.cpp
+++ b/indra/newview/llnavigationbar.cpp
@@ -480,7 +480,7 @@ void LLNavigationBar::rebuildTeleportHistoryMenu()
type = LLTeleportHistoryMenuItem::TYPE_CURRENT;
LLTeleportHistoryMenuItem::Params item_params;
- item_params.label = item_params.name = hist_items[i].getTitle();
+ item_params.label = item_params.name = hist_items[i].mTitle;
item_params.item_type = type;
item_params.on_click.function(boost::bind(&LLNavigationBar::onTeleportHistoryMenuItemClicked, this, i));
LLTeleportHistoryMenuItem* new_itemp = LLUICtrlFactory::create<LLTeleportHistoryMenuItem>(item_params);
@@ -586,6 +586,8 @@ void LLNavigationBar::showNavigationPanel(BOOL visible)
// this is duplicated in 'else' section because it should be called BEFORE fb->reshape
reshape(nbRect.getWidth(), nbRect.getHeight());
setRect(nbRect);
+ // propagate size to parent container
+ getParent()->reshape(nbRect.getWidth(), nbRect.getHeight());
fb->reshape(fbRect.getWidth(), fbRect.getHeight());
fb->setRect(fbRect);
@@ -599,6 +601,7 @@ void LLNavigationBar::showNavigationPanel(BOOL visible)
reshape(nbRect.getWidth(), nbRect.getHeight());
setRect(nbRect);
+ getParent()->reshape(nbRect.getWidth(), nbRect.getHeight());
}
}
else
@@ -613,6 +616,7 @@ void LLNavigationBar::showNavigationPanel(BOOL visible)
// this is duplicated in 'else' section because it should be called BEFORE fb->reshape
reshape(nbRect.getWidth(), nbRect.getHeight());
setRect(nbRect);
+ getParent()->reshape(nbRect.getWidth(), nbRect.getHeight());
fb->reshape(fbRect.getWidth(), fbRect.getHeight());
fb->setRect(fbRect);
@@ -625,16 +629,12 @@ void LLNavigationBar::showNavigationPanel(BOOL visible)
reshape(nbRect.getWidth(), nbRect.getHeight());
setRect(nbRect);
+ getParent()->reshape(nbRect.getWidth(), nbRect.getHeight());
}
}
childSetVisible("bg_icon", fpVisible);
childSetVisible("bg_icon_no_fav", !fpVisible);
-
- if(LLSideTray::instanceCreated())
- {
- LLSideTray::getInstance()->resetPanelRect();
- }
}
void LLNavigationBar::showFavoritesPanel(BOOL visible)
@@ -669,6 +669,7 @@ void LLNavigationBar::showFavoritesPanel(BOOL visible)
reshape(nbRect.getWidth(), nbRect.getHeight());
setRect(nbRect);
+ getParent()->reshape(nbRect.getWidth(), nbRect.getHeight());
fb->reshape(fbRect.getWidth(), fbRect.getHeight());
fb->setRect(fbRect);
@@ -693,14 +694,11 @@ void LLNavigationBar::showFavoritesPanel(BOOL visible)
reshape(nbRect.getWidth(), nbRect.getHeight());
setRect(nbRect);
+ getParent()->reshape(nbRect.getWidth(), nbRect.getHeight());
}
childSetVisible("bg_icon", visible);
childSetVisible("bg_icon_no_fav", !visible);
fb->setVisible(visible);
- if(LLSideTray::instanceCreated())
- {
- LLSideTray::getInstance()->resetPanelRect();
- }
}
diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp
index 974291a54e..ac806d7106 100644
--- a/indra/newview/llnearbychat.cpp
+++ b/indra/newview/llnearbychat.cpp
@@ -290,7 +290,7 @@ void LLNearbyChat::setRect (const LLRect &rect)
void LLNearbyChat::getAllowedRect(LLRect& rect)
{
- rect = gViewerWindow->getWorldViewRect();
+ rect = gViewerWindow->getWorldViewRectRaw();
}
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp
index 8a8ad9d073..e10c506f08 100644
--- a/indra/newview/llnearbychathandler.cpp
+++ b/indra/newview/llnearbychathandler.cpp
@@ -122,8 +122,8 @@ protected:
void LLNearbyChatScreenChannel::init(S32 channel_left, S32 channel_right)
{
- S32 channel_top = gViewerWindow->getWorldViewRect().getHeight();
- S32 channel_bottom = gViewerWindow->getWorldViewRect().mBottom;
+ S32 channel_top = gViewerWindow->getWorldViewRectRaw().getHeight();
+ S32 channel_bottom = gViewerWindow->getWorldViewRectRaw().mBottom;
setRect(LLRect(channel_left, channel_top, channel_right, channel_bottom));
setVisible(TRUE);
}
diff --git a/indra/newview/llnotificationalerthandler.cpp b/indra/newview/llnotificationalerthandler.cpp
index 1be03cef0b..1f68c76bfc 100644
--- a/indra/newview/llnotificationalerthandler.cpp
+++ b/indra/newview/llnotificationalerthandler.cpp
@@ -66,7 +66,7 @@ LLAlertHandler::~LLAlertHandler()
//--------------------------------------------------------------------------
void LLAlertHandler::initChannel()
{
- S32 channel_right_bound = gViewerWindow->getWorldViewRect().getWidth() / 2;
+ S32 channel_right_bound = gViewerWindow->getWorldViewRectRaw().getWidth() / 2;
mChannel->init(channel_right_bound, channel_right_bound);
}
diff --git a/indra/newview/llnotificationgrouphandler.cpp b/indra/newview/llnotificationgrouphandler.cpp
index ffa92b543c..fc6fb25644 100644
--- a/indra/newview/llnotificationgrouphandler.cpp
+++ b/indra/newview/llnotificationgrouphandler.cpp
@@ -57,7 +57,7 @@ LLGroupHandler::~LLGroupHandler()
//--------------------------------------------------------------------------
void LLGroupHandler::initChannel()
{
- S32 channel_right_bound = gViewerWindow->getWorldViewRect().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
+ S32 channel_right_bound = gViewerWindow->getWorldViewRectRaw().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
mChannel->init(channel_right_bound - channel_width, channel_right_bound);
}
diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp
index 75ef5208e7..1bf7be1c4e 100644
--- a/indra/newview/llnotificationofferhandler.cpp
+++ b/indra/newview/llnotificationofferhandler.cpp
@@ -65,7 +65,7 @@ LLOfferHandler::~LLOfferHandler()
//--------------------------------------------------------------------------
void LLOfferHandler::initChannel()
{
- S32 channel_right_bound = gViewerWindow->getWorldViewRect().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
+ S32 channel_right_bound = gViewerWindow->getWorldViewRectRaw().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
mChannel->init(channel_right_bound - channel_width, channel_right_bound);
}
diff --git a/indra/newview/llnotificationscripthandler.cpp b/indra/newview/llnotificationscripthandler.cpp
index dac7a4ca3a..70b86e8b97 100644
--- a/indra/newview/llnotificationscripthandler.cpp
+++ b/indra/newview/llnotificationscripthandler.cpp
@@ -64,7 +64,7 @@ LLScriptHandler::~LLScriptHandler()
//--------------------------------------------------------------------------
void LLScriptHandler::initChannel()
{
- S32 channel_right_bound = gViewerWindow->getWorldViewRect().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
+ S32 channel_right_bound = gViewerWindow->getWorldViewRectRaw().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
mChannel->init(channel_right_bound - channel_width, channel_right_bound);
}
diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp
index 543198c1d2..823c92a94e 100644
--- a/indra/newview/llnotificationtiphandler.cpp
+++ b/indra/newview/llnotificationtiphandler.cpp
@@ -60,7 +60,7 @@ LLTipHandler::~LLTipHandler()
//--------------------------------------------------------------------------
void LLTipHandler::initChannel()
{
- S32 channel_right_bound = gViewerWindow->getWorldViewRect().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
+ S32 channel_right_bound = gViewerWindow->getWorldViewRectRaw().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
mChannel->init(channel_right_bound - channel_width, channel_right_bound);
}
diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp
index a29c9752e6..5679233844 100644
--- a/indra/newview/llpanelclassified.cpp
+++ b/indra/newview/llpanelclassified.cpp
@@ -1142,3 +1142,529 @@ void LLPanelClassified::setDefaultAccessCombo()
break;
}
}
+
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+
+LLPanelClassifiedInfo::LLPanelClassifiedInfo()
+ : LLPanel()
+ , mInfoLoaded(false)
+{
+}
+
+LLPanelClassifiedInfo::~LLPanelClassifiedInfo()
+{
+}
+
+// static
+LLPanelClassifiedInfo* LLPanelClassifiedInfo::create()
+{
+ LLPanelClassifiedInfo* panel = new LLPanelClassifiedInfo();
+ LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_classified_info.xml");
+ return panel;
+}
+
+BOOL LLPanelClassifiedInfo::postBuild()
+{
+ childSetAction("back_btn", boost::bind(&LLPanelClassifiedInfo::onExit, this), NULL);
+
+ return TRUE;
+}
+
+void LLPanelClassifiedInfo::setExitCallback(const commit_callback_t& cb)
+{
+ getChild<LLButton>("back_btn")->setClickedCallback(cb);
+}
+
+void LLPanelClassifiedInfo::onOpen(const LLSD& key)
+{
+ LLUUID avatar_id = key["avatar_id"];
+ if(avatar_id.isNull())
+ {
+ return;
+ }
+
+ if(getAvatarId().notNull())
+ {
+ LLAvatarPropertiesProcessor::getInstance()->removeObserver(getAvatarId(), this);
+ }
+
+ setAvatarId(avatar_id);
+
+ resetData();
+ resetControls();
+
+ setClassifiedId(key["classified_id"]);
+ setClassifiedName(key["name"]);
+ setDescription(key["desc"]);
+ setSnapshotId(key["snapshot_id"]);
+
+ LLAvatarPropertiesProcessor::getInstance()->addObserver(getAvatarId(), this);
+ LLAvatarPropertiesProcessor::getInstance()->sendClassifiedInfoRequest(getClassifiedId());
+ setInfoLoaded(false);
+}
+
+void LLPanelClassifiedInfo::processProperties(void* data, EAvatarProcessorType type)
+{
+ if(APT_CLASSIFIED_INFO == type)
+ {
+ LLAvatarClassifiedInfo* c_info = static_cast<LLAvatarClassifiedInfo*>(data);
+ if(c_info && getClassifiedId() == c_info->classified_id)
+ {
+ setClassifiedName(c_info->name);
+ setDescription(c_info->description);
+ setSnapshotId(c_info->snapshot_id);
+ setParcelId(c_info->parcel_id);
+ setClassifiedLocation(createLocationText(c_info->parcel_name, c_info->sim_name, c_info->pos_global));
+ childSetValue("category", LLClassifiedInfo::sCategories[c_info->category]);
+
+ static std::string mature_str = getString("type_mature");
+ static std::string pg_str = getString("type_pg");
+
+ bool mature = is_cf_mature(c_info->flags);
+ childSetValue("content_type", mature ? mature_str : pg_str);
+ childSetValue("auto_renew", is_cf_auto_renew(c_info->flags));
+
+ childSetTextArg("price_for_listing", "[PRICE]", llformat("%d", c_info->price_for_listing));
+
+ setInfoLoaded(true);
+ }
+ }
+}
+
+void LLPanelClassifiedInfo::resetData()
+{
+ setClassifiedName(LLStringUtil::null);
+ setDescription(LLStringUtil::null);
+ setClassifiedLocation(LLStringUtil::null);
+ setClassifiedId(LLUUID::null);
+ setSnapshotId(LLUUID::null);
+ mPosGlobal.clearVec();
+ childSetValue("category", LLStringUtil::null);
+ childSetValue("content_type", LLStringUtil::null);
+}
+
+void LLPanelClassifiedInfo::resetControls()
+{
+ if(getAvatarId() == gAgent.getID())
+ {
+ childSetEnabled("edit_btn", TRUE);
+ childSetVisible("edit_btn", TRUE);
+ }
+ else
+ {
+ childSetEnabled("edit_btn", FALSE);
+ childSetVisible("edit_btn", FALSE);
+ }
+}
+
+void LLPanelClassifiedInfo::setClassifiedName(const std::string& name)
+{
+ childSetValue("classified_name", name);
+}
+
+std::string LLPanelClassifiedInfo::getClassifiedName()
+{
+ return childGetValue("classified_name").asString();
+}
+
+void LLPanelClassifiedInfo::setDescription(const std::string& desc)
+{
+ childSetValue("classified_desc", desc);
+}
+
+std::string LLPanelClassifiedInfo::getDescription()
+{
+ return childGetValue("classified_desc").asString();
+}
+
+void LLPanelClassifiedInfo::setClassifiedLocation(const std::string& location)
+{
+ childSetValue("classified_location", location);
+}
+
+void LLPanelClassifiedInfo::setSnapshotId(const LLUUID& id)
+{
+ childSetValue("classified_snapshot", id);
+}
+
+LLUUID LLPanelClassifiedInfo::getSnapshotId()
+{
+ return childGetValue("classified_snapshot").asUUID();
+}
+
+// static
+std::string LLPanelClassifiedInfo::createLocationText(
+ const std::string& original_name,
+ const std::string& sim_name,
+ const LLVector3d& pos_global)
+{
+ std::string location_text;
+
+ location_text.append(original_name);
+
+ if (!sim_name.empty())
+ {
+ if (!location_text.empty())
+ location_text.append(", ");
+ location_text.append(sim_name);
+ }
+
+ if (!location_text.empty())
+ location_text.append(" ");
+
+ if (!pos_global.isNull())
+ {
+ S32 region_x = llround((F32)pos_global.mdV[VX]) % REGION_WIDTH_UNITS;
+ S32 region_y = llround((F32)pos_global.mdV[VY]) % REGION_WIDTH_UNITS;
+ S32 region_z = llround((F32)pos_global.mdV[VZ]);
+ location_text.append(llformat(" (%d, %d, %d)", region_x, region_y, region_z));
+ }
+
+ return location_text;
+}
+
+void LLPanelClassifiedInfo::onExit()
+{
+ LLAvatarPropertiesProcessor::getInstance()->removeObserver(getAvatarId(), this);
+}
+
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+
+static const S32 CB_ITEM_MATURE = 0;
+static const S32 CB_ITEM_PG = 1;
+
+LLPanelClassifiedEdit::LLPanelClassifiedEdit()
+ : LLPanelClassifiedInfo()
+ , mIsNew(false)
+{
+}
+
+LLPanelClassifiedEdit::~LLPanelClassifiedEdit()
+{
+}
+
+//static
+LLPanelClassifiedEdit* LLPanelClassifiedEdit::create()
+{
+ LLPanelClassifiedEdit* panel = new LLPanelClassifiedEdit();
+ LLUICtrlFactory::getInstance()->buildPanel(panel, "panel_edit_classified.xml");
+ return panel;
+}
+
+BOOL LLPanelClassifiedEdit::postBuild()
+{
+ LLPanelClassifiedInfo::postBuild();
+
+ LLTextureCtrl* snapshot = getChild<LLTextureCtrl>("classified_snapshot");
+ snapshot->setOnSelectCallback(boost::bind(&LLPanelClassifiedEdit::onChange, this));
+
+ LLUICtrl* edit_icon = getChild<LLUICtrl>("edit_icon");
+ snapshot->setMouseEnterCallback(boost::bind(&LLPanelClassifiedEdit::onTexturePickerMouseEnter, this, edit_icon));
+ snapshot->setMouseLeaveCallback(boost::bind(&LLPanelClassifiedEdit::onTexturePickerMouseLeave, this, edit_icon));
+ edit_icon->setVisible(false);
+
+ LLLineEditor* line_edit = getChild<LLLineEditor>("classified_name");
+ line_edit->setKeystrokeCallback(boost::bind(&LLPanelClassifiedEdit::onChange, this), NULL);
+
+ LLTextEditor* text_edit = getChild<LLTextEditor>("classified_desc");
+ text_edit->setKeystrokeCallback(boost::bind(&LLPanelClassifiedEdit::onChange, this));
+
+ LLComboBox* combobox = getChild<LLComboBox>( "category");
+ LLClassifiedInfo::cat_map::iterator iter;
+ for (iter = LLClassifiedInfo::sCategories.begin();
+ iter != LLClassifiedInfo::sCategories.end();
+ iter++)
+ {
+ combobox->add(LLTrans::getString(iter->second));
+ }
+
+ combobox->setCommitCallback(boost::bind(&LLPanelClassifiedEdit::onChange, this));
+
+ childSetCommitCallback("content_type", boost::bind(&LLPanelClassifiedEdit::onChange, this), NULL);
+ childSetCommitCallback("price_for_listing", boost::bind(&LLPanelClassifiedEdit::onChange, this), NULL);
+ childSetCommitCallback("auto_renew", boost::bind(&LLPanelClassifiedEdit::onChange, this), NULL);
+
+ childSetAction("save_changes_btn", boost::bind(&LLPanelClassifiedEdit::onSaveClick, this));
+ childSetAction("set_to_curr_location_btn", boost::bind(&LLPanelClassifiedEdit::onSetLocationClick, this));
+
+ return TRUE;
+}
+
+void LLPanelClassifiedEdit::onOpen(const LLSD& key)
+{
+ LLUUID classified_id = key["classified_id"];
+
+ mIsNew = classified_id.isNull();
+
+ if(mIsNew)
+ {
+ setAvatarId(gAgent.getID());
+
+ resetData();
+ resetControls();
+
+ setPosGlobal(gAgent.getPositionGlobal());
+
+ LLUUID snapshot_id = LLUUID::null;
+ std::string desc;
+ LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
+
+ if(parcel)
+ {
+ desc = parcel->getDesc();
+ snapshot_id = parcel->getSnapshotID();
+ }
+
+ std::string region_name = LLTrans::getString("ClassifiedUpdateAfterPublish");
+ LLViewerRegion* region = gAgent.getRegion();
+ if (region)
+ {
+ region_name = region->getName();
+ }
+
+ childSetValue("classified_name", makeClassifiedName());
+ childSetValue("classified_desc", desc);
+ setSnapshotId(snapshot_id);
+
+ setClassifiedLocation(createLocationText(getLocationNotice(), region_name, getPosGlobal()));
+
+ // server will set valid parcel id
+ setParcelId(LLUUID::null);
+
+ enableVerbs(true);
+ enableEditing(true);
+ }
+ else
+ {
+ LLPanelClassifiedInfo::onOpen(key);
+ enableVerbs(false);
+ enableEditing(false);
+ }
+
+ resetDirty();
+ setInfoLoaded(false);
+}
+
+void LLPanelClassifiedEdit::processProperties(void* data, EAvatarProcessorType type)
+{
+ if(APT_CLASSIFIED_INFO == type)
+ {
+ LLAvatarClassifiedInfo* c_info = static_cast<LLAvatarClassifiedInfo*>(data);
+ if(c_info && getClassifiedId() == c_info->classified_id)
+ {
+ enableEditing(true);
+
+ setClassifiedName(c_info->name);
+ setDescription(c_info->description);
+ setSnapshotId(c_info->snapshot_id);
+ setPosGlobal(c_info->pos_global);
+
+ setClassifiedLocation(createLocationText(c_info->parcel_name, c_info->sim_name, c_info->pos_global));
+ getChild<LLComboBox>("category")->setCurrentByIndex(c_info->category + 1);
+ getChild<LLComboBox>("category")->resetDirty();
+
+ bool mature = is_cf_mature(c_info->flags);
+ bool auto_renew = is_cf_auto_renew(c_info->flags);
+
+ getChild<LLComboBox>("content_type")->setCurrentByIndex(mature ? CB_ITEM_MATURE : CB_ITEM_PG);
+ childSetValue("auto_renew", auto_renew);
+ childSetValue("price_for_listing", c_info->price_for_listing);
+
+ resetDirty();
+ setInfoLoaded(true);
+ }
+ }
+}
+
+BOOL LLPanelClassifiedEdit::isDirty() const
+{
+ if(mIsNew)
+ {
+ return TRUE;
+ }
+
+ BOOL dirty = false;
+
+ dirty |= LLPanelClassifiedInfo::isDirty();
+ dirty |= getChild<LLUICtrl>("classified_snapshot")->isDirty();
+ dirty |= getChild<LLUICtrl>("classified_name")->isDirty();
+ dirty |= getChild<LLUICtrl>("classified_desc")->isDirty();
+ dirty |= getChild<LLUICtrl>("category")->isDirty();
+ dirty |= getChild<LLUICtrl>("content_type")->isDirty();
+ dirty |= getChild<LLUICtrl>("auto_renew")->isDirty();
+ dirty |= getChild<LLUICtrl>("price_for_listing")->isDirty();
+
+ return dirty;
+}
+
+void LLPanelClassifiedEdit::resetDirty()
+{
+ LLPanelClassifiedInfo::resetDirty();
+ getChild<LLUICtrl>("classified_snapshot")->resetDirty();
+ getChild<LLUICtrl>("classified_name")->resetDirty();
+ getChild<LLUICtrl>("classified_desc")->resetDirty();
+ getChild<LLUICtrl>("category")->resetDirty();
+ getChild<LLUICtrl>("content_type")->resetDirty();
+ getChild<LLUICtrl>("auto_renew")->resetDirty();
+ getChild<LLUICtrl>("price_for_listing")->resetDirty();
+}
+
+void LLPanelClassifiedEdit::setSaveCallback(const commit_callback_t& cb)
+{
+ getChild<LLButton>("save_changes_btn")->setClickedCallback(cb);
+}
+
+void LLPanelClassifiedEdit::setCancelCallback(const commit_callback_t& cb)
+{
+ getChild<LLButton>("cancel_btn")->setClickedCallback(cb);
+}
+
+void LLPanelClassifiedEdit::resetControls()
+{
+ LLPanelClassifiedInfo::resetControls();
+
+ getChild<LLComboBox>("category")->setCurrentByIndex(0);
+ getChild<LLComboBox>("content_type")->setCurrentByIndex(0);
+ childSetValue("auto_renew", false);
+ childSetValue("price_for_listing", MINIMUM_PRICE_FOR_LISTING);
+}
+
+void LLPanelClassifiedEdit::sendUpdate()
+{
+ LLAvatarClassifiedInfo c_data;
+
+ if(getClassifiedId().isNull())
+ {
+ LLUUID id;
+ id.generate();
+ setClassifiedId(id);
+ }
+
+ c_data.agent_id = gAgent.getID();
+ c_data.classified_id = getClassifiedId();
+ c_data.category = getCategory();
+ c_data.name = getClassifiedName();
+ c_data.description = getDescription();
+ c_data.parcel_id = getParcelId();
+ c_data.snapshot_id = getSnapshotId();
+ c_data.pos_global = getPosGlobal();
+ c_data.flags = getFlags();
+ c_data.price_for_listing = getPriceForListing();
+
+ LLAvatarPropertiesProcessor::getInstance()->sendClassifiedInfoUpdate(&c_data);
+}
+
+U32 LLPanelClassifiedEdit::getCategory()
+{
+ LLComboBox* cat_cb = getChild<LLComboBox>("category");
+ return cat_cb->getCurrentIndex() + 1;
+}
+
+U8 LLPanelClassifiedEdit::getFlags()
+{
+ bool auto_renew = childGetValue("auto_renew").asBoolean();
+
+ LLComboBox* content_cb = getChild<LLComboBox>("content_type");
+ bool mature = content_cb->getCurrentIndex() == CB_ITEM_MATURE;
+
+ return pack_classified_flags_request(auto_renew, false, mature, false);
+}
+
+void LLPanelClassifiedEdit::enableVerbs(bool enable)
+{
+ childSetEnabled("save_changes_btn", enable);
+}
+
+void LLPanelClassifiedEdit::enableEditing(bool enable)
+{
+ childSetEnabled("classified_snapshot", enable);
+ childSetEnabled("classified_name", enable);
+ childSetEnabled("classified_desc", enable);
+ childSetEnabled("set_to_curr_location_btn", enable);
+ childSetEnabled("category", enable);
+ childSetEnabled("content_type", enable);
+ childSetEnabled("price_for_listing", enable);
+ childSetEnabled("auto_renew", enable);
+}
+
+std::string LLPanelClassifiedEdit::makeClassifiedName()
+{
+ std::string name;
+
+ LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
+ if(parcel)
+ {
+ name = parcel->getName();
+ }
+
+ if(!name.empty())
+ {
+ return name;
+ }
+
+ LLViewerRegion* region = gAgent.getRegion();
+ if(region)
+ {
+ name = region->getName();
+ }
+
+ return name;
+}
+
+S32 LLPanelClassifiedEdit::getPriceForListing()
+{
+ return childGetValue("price_for_listing").asInteger();
+}
+
+void LLPanelClassifiedEdit::onSetLocationClick()
+{
+ setPosGlobal(gAgent.getPositionGlobal());
+ setParcelId(LLUUID::null);
+
+ std::string region_name = LLTrans::getString("ClassifiedUpdateAfterPublish");
+ LLViewerRegion* region = gAgent.getRegion();
+ if (region)
+ {
+ region_name = region->getName();
+ }
+
+ setClassifiedLocation(createLocationText(getLocationNotice(), region_name, getPosGlobal()));
+
+ // mark classified as dirty
+ setValue(LLSD());
+
+ onChange();
+}
+
+void LLPanelClassifiedEdit::onChange()
+{
+ enableVerbs(isDirty());
+}
+
+void LLPanelClassifiedEdit::onSaveClick()
+{
+ sendUpdate();
+ resetDirty();
+}
+
+std::string LLPanelClassifiedEdit::getLocationNotice()
+{
+ static std::string location_notice = getString("location_notice");
+ return location_notice;
+}
+
+void LLPanelClassifiedEdit::onTexturePickerMouseEnter(LLUICtrl* ctrl)
+{
+ ctrl->setVisible(TRUE);
+}
+
+void LLPanelClassifiedEdit::onTexturePickerMouseLeave(LLUICtrl* ctrl)
+{
+ ctrl->setVisible(FALSE);
+}
+
+//EOF
diff --git a/indra/newview/llpanelclassified.h b/indra/newview/llpanelclassified.h
index 417eddf460..187bdbb37e 100644
--- a/indra/newview/llpanelclassified.h
+++ b/indra/newview/llpanelclassified.h
@@ -37,6 +37,7 @@
#ifndef LL_LLPANELCLASSIFIED_H
#define LL_LLPANELCLASSIFIED_H
+#include "llavatarpropertiesprocessor.h"
#include "llpanel.h"
#include "llclassifiedinfo.h"
#include "v3dmath.h"
@@ -55,6 +56,8 @@ class LLTextureCtrl;
class LLUICtrl;
class LLMessageSystem;
+// *TODO deprecated, should be removed.
+// New class implemented in ticket EXT-2095
class LLPanelClassified : public LLPanel
{
public:
@@ -198,5 +201,138 @@ private:
void* mUserData;
};
+class LLPanelClassifiedInfo : public LLPanel, public LLAvatarPropertiesObserver
+{
+public:
+
+ static LLPanelClassifiedInfo* create();
+
+ virtual ~LLPanelClassifiedInfo();
+
+ /*virtual*/ void onOpen(const LLSD& key);
+
+ /*virtual*/ BOOL postBuild();
+
+ /*virtual*/ void processProperties(void* data, EAvatarProcessorType type);
+
+ void setAvatarId(const LLUUID& avatar_id) { mAvatarId = avatar_id; }
+
+ LLUUID& getAvatarId() { return mAvatarId; }
+
+ void setSnapshotId(const LLUUID& id);
+
+ LLUUID getSnapshotId();
+
+ void setClassifiedId(const LLUUID& id) { mClassifiedId = id; }
+
+ LLUUID& getClassifiedId() { return mClassifiedId; }
+
+ void setClassifiedName(const std::string& name);
+
+ std::string getClassifiedName();
+
+ void setDescription(const std::string& desc);
+
+ std::string getDescription();
+
+ void setClassifiedLocation(const std::string& location);
+
+ void setPosGlobal(const LLVector3d& pos) { mPosGlobal = pos; }
+
+ LLVector3d& getPosGlobal() { return mPosGlobal; }
+
+ void setParcelId(const LLUUID& id) { mParcelId = id; }
+
+ LLUUID getParcelId() { return mParcelId; }
+
+ bool getInfoLoaded() { return mInfoLoaded; }
+
+ void setInfoLoaded(bool loaded) { mInfoLoaded = loaded; }
+
+ virtual void setExitCallback(const commit_callback_t& cb);
+
+protected:
+
+ LLPanelClassifiedInfo();
+
+ virtual void resetData();
+
+ virtual void resetControls();
+
+ static std::string createLocationText(
+ const std::string& original_name,
+ const std::string& sim_name,
+ const LLVector3d& pos_global);
+
+ void onClickMap();
+ void onClickTeleport();
+ void onClickBack();
+ void onExit();
+
+private:
+
+ LLUUID mAvatarId;
+ LLUUID mClassifiedId;
+ LLVector3d mPosGlobal;
+ LLUUID mParcelId;
+ bool mInfoLoaded;
+};
+
+class LLPanelClassifiedEdit : public LLPanelClassifiedInfo
+{
+public:
+
+ static LLPanelClassifiedEdit* create();
+
+ virtual ~LLPanelClassifiedEdit();
+
+ /*virtual*/ BOOL postBuild();
+
+ /*virtual*/ void onOpen(const LLSD& key);
+
+ /*virtual*/ void processProperties(void* data, EAvatarProcessorType type);
+
+ /*virtual*/ BOOL isDirty() const;
+
+ /*virtual*/ void resetDirty();
+
+ void setSaveCallback(const commit_callback_t& cb);
+
+ void setCancelCallback(const commit_callback_t& cb);
+
+ /*virtual*/ void resetControls();
+
+ bool isNew() { return mIsNew; }
+
+protected:
+
+ LLPanelClassifiedEdit();
+
+ void sendUpdate();
+
+ U32 getCategory();
+
+ void enableVerbs(bool enable);
+
+ void enableEditing(bool enable);
+
+ std::string makeClassifiedName();
+
+ S32 getPriceForListing();
+
+ U8 getFlags();
+
+ std::string getLocationNotice();
+
+ void onSetLocationClick();
+ void onChange();
+ void onSaveClick();
+
+ void onTexturePickerMouseEnter(LLUICtrl* ctrl);
+ void onTexturePickerMouseLeave(LLUICtrl* ctrl);
+
+private:
+ bool mIsNew;
+};
#endif // LL_LLPANELCLASSIFIED_H
diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp
index 53db225f12..5a0c1164de 100644
--- a/indra/newview/llpanelimcontrolpanel.cpp
+++ b/indra/newview/llpanelimcontrolpanel.cpp
@@ -86,10 +86,8 @@ void LLPanelChatControlPanel::draw()
bool session_initialized = session->mSessionInitialized;
bool callback_enabled = session->mCallBackEnabled;
- LLViewerRegion* region = gAgent.getRegion();
- BOOL enable_connect = (region && region->getCapability("ChatSessionRequest") != "")
- && session_initialized
+ BOOL enable_connect = session_initialized
&& voice_enabled
&& callback_enabled;
childSetEnabled("call_btn", enable_connect);
@@ -198,7 +196,8 @@ void LLPanelIMControlPanel::nameUpdatedCallback(const LLUUID& id, const std::str
}
}
-LLPanelGroupControlPanel::LLPanelGroupControlPanel(const LLUUID& session_id)
+LLPanelGroupControlPanel::LLPanelGroupControlPanel(const LLUUID& session_id):
+mParticipantList(NULL)
{
mSpeakerManager = LLIMModel::getInstance()->getSpeakerManager(session_id);
}
@@ -207,9 +206,6 @@ BOOL LLPanelGroupControlPanel::postBuild()
{
childSetAction("group_info_btn", boost::bind(&LLPanelGroupControlPanel::onGroupInfoButtonClicked, this));
- mAvatarList = getChild<LLAvatarList>("speakers_list");
- mParticipantList = new LLParticipantList(mSpeakerManager, mAvatarList);
-
return LLPanelChatControlPanel::postBuild();
}
@@ -222,6 +218,8 @@ LLPanelGroupControlPanel::~LLPanelGroupControlPanel()
// virtual
void LLPanelGroupControlPanel::draw()
{
+ //Remove event does not raised until speakerp->mActivityTimer.hasExpired() is false, see LLSpeakerManager::update()
+ //so we need update it to raise needed event
mSpeakerManager->update(true);
LLPanelChatControlPanel::draw();
}
@@ -249,7 +247,7 @@ void LLPanelGroupControlPanel::onSortMenuItemClicked(const LLSD& userdata)
void LLPanelGroupControlPanel::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state)
{
LLPanelChatControlPanel::onVoiceChannelStateChanged(old_state, new_state);
- mAvatarList->setSpeakingIndicatorsVisible(new_state >= LLVoiceChannel::STATE_CALL_STARTED);
+ mParticipantList->setSpeakingIndicatorsVisible(new_state >= LLVoiceChannel::STATE_CALL_STARTED);
}
void LLPanelGroupControlPanel::setSessionId(const LLUUID& session_id)
@@ -257,6 +255,9 @@ void LLPanelGroupControlPanel::setSessionId(const LLUUID& session_id)
LLPanelChatControlPanel::setSessionId(session_id);
mGroupID = LLIMModel::getInstance()->getOtherParticipantID(session_id);
+
+ if(!mParticipantList)
+ mParticipantList = new LLParticipantList(mSpeakerManager, getChild<LLAvatarList>("speakers_list"));
}
@@ -266,9 +267,7 @@ LLPanelAdHocControlPanel::LLPanelAdHocControlPanel(const LLUUID& session_id):LLP
BOOL LLPanelAdHocControlPanel::postBuild()
{
- mAvatarList = getChild<LLAvatarList>("speakers_list");
- mParticipantList = new LLParticipantList(mSpeakerManager, mAvatarList);
-
+ //We don't need LLPanelGroupControlPanel::postBuild() to be executed as there is no group_info_btn at AdHoc chat
return LLPanelChatControlPanel::postBuild();
}
diff --git a/indra/newview/llpanelimcontrolpanel.h b/indra/newview/llpanelimcontrolpanel.h
index adfb2fdd86..923c5acbd2 100644
--- a/indra/newview/llpanelimcontrolpanel.h
+++ b/indra/newview/llpanelimcontrolpanel.h
@@ -103,7 +103,7 @@ public:
protected:
LLUUID mGroupID;
LLSpeakerMgr* mSpeakerManager;
- LLAvatarList* mAvatarList;
+
LLParticipantList* mParticipantList;
private:
diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp
index 4985663833..f94a59ecef 100644
--- a/indra/newview/llpanellandmarkinfo.cpp
+++ b/indra/newview/llpanellandmarkinfo.cpp
@@ -35,6 +35,7 @@
#include "llpanellandmarkinfo.h"
#include "llcombobox.h"
+#include "lliconctrl.h"
#include "lllineeditor.h"
#include "lltextbox.h"
#include "lltexteditor.h"
@@ -58,6 +59,11 @@ static void collectLandmarkFolders(LLInventoryModel::cat_array_t& cats);
static LLRegisterPanelClassWrapper<LLPanelLandmarkInfo> t_landmark_info("panel_landmark_info");
+// Statics for textures filenames
+static std::string icon_pg;
+static std::string icon_m;
+static std::string icon_r;
+
LLPanelLandmarkInfo::LLPanelLandmarkInfo()
: LLPanelPlaceInfo()
{}
@@ -79,6 +85,10 @@ BOOL LLPanelLandmarkInfo::postBuild()
mNotesEditor = getChild<LLTextEditor>("notes_editor");
mFolderCombo = getChild<LLComboBox>("folder_combo");
+ icon_pg = getString("icon_PG");
+ icon_m = getString("icon_M");
+ icon_r = getString("icon_R");
+
return TRUE;
}
@@ -101,9 +111,8 @@ void LLPanelLandmarkInfo::setInfoType(INFO_TYPE type)
LLPanel* landmark_info_panel = getChild<LLPanel>("landmark_info_panel");
bool is_info_type_create_landmark = type == CREATE_LANDMARK;
- bool is_info_type_landmark = type == LANDMARK;
- landmark_info_panel->setVisible(is_info_type_landmark);
+ landmark_info_panel->setVisible(type == LANDMARK);
getChild<LLTextBox>("folder_label")->setVisible(is_info_type_create_landmark);
mFolderCombo->setVisible(is_info_type_create_landmark);
@@ -136,6 +145,24 @@ void LLPanelLandmarkInfo::processParcelInfo(const LLParcelData& parcel_data)
{
LLPanelPlaceInfo::processParcelInfo(parcel_data);
+ // HACK: Flag 0x2 == adult region,
+ // Flag 0x1 == mature region, otherwise assume PG
+ if (parcel_data.flags & 0x2)
+ {
+ mMaturityRatingIcon->setValue(icon_r);
+ mMaturityRatingText->setText(LLViewerRegion::accessToString(SIM_ACCESS_ADULT));
+ }
+ else if (parcel_data.flags & 0x1)
+ {
+ mMaturityRatingIcon->setValue(icon_m);
+ mMaturityRatingText->setText(LLViewerRegion::accessToString(SIM_ACCESS_MATURE));
+ }
+ else
+ {
+ mMaturityRatingIcon->setValue(icon_pg);
+ mMaturityRatingText->setText(LLViewerRegion::accessToString(SIM_ACCESS_PG));
+ }
+
S32 region_x;
S32 region_y;
S32 region_z;
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 5d826f0a56..b3e14eb2fb 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -310,7 +310,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
void LLPanelLogin::reshapeBrowser()
{
LLMediaCtrl* web_browser = getChild<LLMediaCtrl>("login_html");
- LLRect rect = gViewerWindow->getVirtualWindowRect();
+ LLRect rect = gViewerWindow->getWindowRectScaled();
LLRect html_rect;
#if USE_VIEWER_AUTH
html_rect.setCenterAndSize(
diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp
index 5186a5888b..2cf56d5571 100644
--- a/indra/newview/llpanelmediasettingsgeneral.cpp
+++ b/indra/newview/llpanelmediasettingsgeneral.cpp
@@ -366,21 +366,15 @@ void LLPanelMediaSettingsGeneral::onCommitHomeURL( LLUICtrl* ctrl, void *userdat
void LLPanelMediaSettingsGeneral::onBtnResetCurrentUrl(LLUICtrl* ctrl, void *userdata)
{
LLPanelMediaSettingsGeneral* self =(LLPanelMediaSettingsGeneral *)userdata;
- self->navigateHomeSelectedFace();
+ self->navigateHomeSelectedFace(false);
}
////////////////////////////////////////////////////////////////////////////////
-// static
-void LLPanelMediaSettingsGeneral::apply( void* userdata )
+//
+void LLPanelMediaSettingsGeneral::preApply()
{
- LLPanelMediaSettingsGeneral *self =(LLPanelMediaSettingsGeneral *)userdata;
- self->mHomeURL->onCommit();
- // build LLSD Fragment
- LLSD media_data_general;
- self->getValues(media_data_general);
-
- // this merges contents of LLSD passed in with what's there so this is ok
- LLSelectMgr::getInstance()->selectionSetMediaData( media_data_general );
+ // Make sure the home URL entry is committed
+ mHomeURL->onCommit();
}
////////////////////////////////////////////////////////////////////////////////
@@ -392,7 +386,8 @@ void LLPanelMediaSettingsGeneral::getValues( LLSD &fill_me_in )
fill_me_in[LLMediaEntry::AUTO_SCALE_KEY] = mAutoScale->getValue();
fill_me_in[LLMediaEntry::AUTO_ZOOM_KEY] = mAutoZoom->getValue();
fill_me_in[LLMediaEntry::CONTROLS_KEY] = mControls->getCurrentIndex();
- fill_me_in[LLMediaEntry::CURRENT_URL_KEY] = mCurrentURL->getValue();
+ //Don't fill in current URL: this is only supposed to get changed via navigate
+ // fill_me_in[LLMediaEntry::CURRENT_URL_KEY] = mCurrentURL->getValue();
fill_me_in[LLMediaEntry::HEIGHT_PIXELS_KEY] = mHeightPixels->getValue();
fill_me_in[LLMediaEntry::HOME_URL_KEY] = mHomeURL->getValue();
fill_me_in[LLMediaEntry::FIRST_CLICK_INTERACT_KEY] = mFirstClick->getValue();
@@ -400,39 +395,53 @@ void LLPanelMediaSettingsGeneral::getValues( LLSD &fill_me_in )
}
////////////////////////////////////////////////////////////////////////////////
+//
+void LLPanelMediaSettingsGeneral::postApply()
+{
+ // Make sure to navigate to the home URL if the current URL is empty and
+ // autoplay is on
+ navigateHomeSelectedFace(true);
+}
+
+
+////////////////////////////////////////////////////////////////////////////////
//
void LLPanelMediaSettingsGeneral::setParent( LLFloaterMediaSettings* parent )
{
mParent = parent;
};
-bool LLPanelMediaSettingsGeneral::navigateHomeSelectedFace()
+////////////////////////////////////////////////////////////////////////////////
+//
+bool LLPanelMediaSettingsGeneral::navigateHomeSelectedFace(bool only_if_current_is_empty)
{
- // HACK: This is directly referencing an impl name. BAD!
- // This can be removed when we have a truly generic media browser that only
- // builds an impl based on the type of url it is passed.
struct functor_navigate_media : public LLSelectedTEGetFunctor< bool>
{
+ functor_navigate_media(bool flag) : only_if_current_is_empty(flag) {}
bool get( LLViewerObject* object, S32 face )
{
- if ( object )
- if ( object->getTE(face) )
- if ( object->getTE(face)->getMediaData() )
+ if ( object && object->getTE(face) && object->permModify() )
+ {
+ const LLMediaEntry *media_data = object->getTE(face)->getMediaData();
+ if ( media_data )
+ {
+ if (!only_if_current_is_empty || (media_data->getCurrentURL().empty() && media_data->getAutoPlay()))
{
- if(object->permModify())
+ viewer_media_t media_impl =
+ LLViewerMedia::getMediaImplFromTextureID(object->getTE(face)->getMediaData()->getMediaID());
+ if(media_impl)
{
- viewer_media_t media_impl = LLViewerMedia::getMediaImplFromTextureID(object->getTE(face)->getMediaData()->getMediaID());
- if(media_impl)
- {
- media_impl->navigateHome();
- return true;
- }
- }
+ media_impl->navigateHome();
+ return true;
+ }
}
- return false;
- };
+ }
+ }
+ return false;
+ };
+ bool only_if_current_is_empty;
- } functor_navigate_media;
+ } functor_navigate_media(only_if_current_is_empty);
bool all_face_media_navigated = false;
LLObjectSelectionHandle selected_objects =LLSelectMgr::getInstance()->getSelection();
diff --git a/indra/newview/llpanelmediasettingsgeneral.h b/indra/newview/llpanelmediasettingsgeneral.h
index b48e081a1b..f8b8f0d224 100644
--- a/indra/newview/llpanelmediasettingsgeneral.h
+++ b/indra/newview/llpanelmediasettingsgeneral.h
@@ -47,21 +47,30 @@ class LLFloaterMediaSettings;
class LLPanelMediaSettingsGeneral : public LLPanel
{
public:
+ LLPanelMediaSettingsGeneral();
+ ~LLPanelMediaSettingsGeneral();
+
+ // XXX TODO: put these into a common parent class?
+ // Hook that the floater calls before applying changes from the panel
+ void preApply();
+ // Function that asks the panel to fill in values associated with the panel
+ void getValues(LLSD &fill_me_in);
+ // Hook that the floater calls after applying changes to the panel
+ void postApply();
+
BOOL postBuild();
/*virtual*/ void draw();
/*virtual*/ void onClose(bool app_quitting);
- static void apply(void*);
- void getValues(LLSD &fill_me_in);
-
- LLPanelMediaSettingsGeneral();
- ~LLPanelMediaSettingsGeneral();
-
void setParent( LLFloaterMediaSettings* parent );
static void initValues( void* userdata, const LLSD& media_settings ,bool editable);
static void clearValues( void* userdata, bool editable);
- bool navigateHomeSelectedFace();
+ // Navigates the current selected face to the Home URL.
+ // If 'only_if_current_is_empty' is "true", it only performs
+ // the operation if: 1) the current URL is empty, and 2) auto play is true.
+ bool navigateHomeSelectedFace(bool only_if_current_is_empty);
+
void updateMediaPreview();
const std::string getHomeUrl();
diff --git a/indra/newview/llpanelmediasettingspermissions.cpp b/indra/newview/llpanelmediasettingspermissions.cpp
index 4d84874e7a..2f3f550e35 100644
--- a/indra/newview/llpanelmediasettingspermissions.cpp
+++ b/indra/newview/llpanelmediasettingspermissions.cpp
@@ -218,17 +218,10 @@ void LLPanelMediaSettingsPermissions::initValues( void* userdata, const LLSD& me
}
////////////////////////////////////////////////////////////////////////////////
-// static
-void LLPanelMediaSettingsPermissions::apply( void* userdata )
+//
+void LLPanelMediaSettingsPermissions::preApply()
{
- LLPanelMediaSettingsPermissions *self =(LLPanelMediaSettingsPermissions *)userdata;
-
- // build LLSD Fragment
- LLSD media_data_permissions;
- self->getValues(media_data_permissions);
-
- // this merges contents of LLSD passed in with what's there so this is ok
- LLSelectMgr::getInstance()->selectionSetMediaData( media_data_permissions );
+ // no-op
}
////////////////////////////////////////////////////////////////////////////////
@@ -254,3 +247,11 @@ void LLPanelMediaSettingsPermissions::getValues( LLSD &fill_me_in )
fill_me_in[LLMediaEntry::PERMS_CONTROL_KEY] = control;
fill_me_in[LLMediaEntry::PERMS_INTERACT_KEY] = interact;
}
+
+
+////////////////////////////////////////////////////////////////////////////////
+//
+void LLPanelMediaSettingsPermissions::postApply()
+{
+ // no-op
+}
diff --git a/indra/newview/llpanelmediasettingspermissions.h b/indra/newview/llpanelmediasettingspermissions.h
index ecc50e3582..45a596c615 100644
--- a/indra/newview/llpanelmediasettingspermissions.h
+++ b/indra/newview/llpanelmediasettingspermissions.h
@@ -46,26 +46,32 @@ class LLNameBox;
class LLPanelMediaSettingsPermissions : public LLPanel
{
- public:
- BOOL postBuild();
- virtual void draw();
- static void apply(void*);
- void getValues(LLSD &fill_me_in);
-
- LLPanelMediaSettingsPermissions();
- ~LLPanelMediaSettingsPermissions();
-
- static void initValues( void* userdata, const LLSD& media_settings, bool editable );
- static void clearValues( void* userdata, bool editable);
-
- private:
- LLCheckBoxCtrl* mPermsOwnerInteract;
- LLCheckBoxCtrl* mPermsOwnerControl;
- LLNameBox* mPermsGroupName;
- LLCheckBoxCtrl* mPermsGroupInteract;
- LLCheckBoxCtrl* mPermsGroupControl;
- LLCheckBoxCtrl* mPermsWorldInteract;
- LLCheckBoxCtrl* mPermsWorldControl;
+public:
+ LLPanelMediaSettingsPermissions();
+ ~LLPanelMediaSettingsPermissions();
+
+ BOOL postBuild();
+ virtual void draw();
+
+ // XXX TODO: put these into a common parent class?
+ // Hook that the floater calls before applying changes from the panel
+ void preApply();
+ // Function that asks the panel to fill in values associated with the panel
+ void getValues(LLSD &fill_me_in);
+ // Hook that the floater calls after applying changes to the panel
+ void postApply();
+
+ static void initValues( void* userdata, const LLSD& media_settings, bool editable );
+ static void clearValues( void* userdata, bool editable);
+
+private:
+ LLCheckBoxCtrl* mPermsOwnerInteract;
+ LLCheckBoxCtrl* mPermsOwnerControl;
+ LLNameBox* mPermsGroupName;
+ LLCheckBoxCtrl* mPermsGroupInteract;
+ LLCheckBoxCtrl* mPermsGroupControl;
+ LLCheckBoxCtrl* mPermsWorldInteract;
+ LLCheckBoxCtrl* mPermsWorldControl;
};
#endif // LL_LLPANELMEDIAMEDIASETTINGSPERMISSIONS_H
diff --git a/indra/newview/llpanelmediasettingssecurity.cpp b/indra/newview/llpanelmediasettingssecurity.cpp
index 3577f63340..bec2494eac 100644
--- a/indra/newview/llpanelmediasettingssecurity.cpp
+++ b/indra/newview/llpanelmediasettingssecurity.cpp
@@ -198,17 +198,12 @@ void LLPanelMediaSettingsSecurity::clearValues( void* userdata , bool editable)
self->mEnableWhiteList->setEnabled(editable);
self->mWhiteListList->setEnabled(editable);
}
+
////////////////////////////////////////////////////////////////////////////////
-// static
-void LLPanelMediaSettingsSecurity::apply( void* userdata )
+//
+void LLPanelMediaSettingsSecurity::preApply()
{
- LLPanelMediaSettingsSecurity *self =(LLPanelMediaSettingsSecurity *)userdata;
-
- // build LLSD Fragment
- LLSD media_data_security;
- self->getValues(media_data_security);
- // this merges contents of LLSD passed in with what's there so this is ok
- LLSelectMgr::getInstance()->selectionSetMediaData( media_data_security );
+ // no-op
}
////////////////////////////////////////////////////////////////////////////////
@@ -220,7 +215,9 @@ void LLPanelMediaSettingsSecurity::getValues( LLSD &fill_me_in )
// iterate over white list and extract items
std::vector< LLScrollListItem* > white_list_items = mWhiteListList->getAllData();
std::vector< LLScrollListItem* >::iterator iter = white_list_items.begin();
- fill_me_in[LLMediaEntry::WHITELIST_KEY].clear();
+ // *NOTE: need actually set the key to be an emptyArray(), or the merge
+ // we do with this LLSD will think there's nothing to change.
+ fill_me_in[LLMediaEntry::WHITELIST_KEY] = LLSD::emptyArray();
while( iter != white_list_items.end() )
{
std::string white_list_url = (*iter)->getValue().asString();
@@ -229,23 +226,30 @@ void LLPanelMediaSettingsSecurity::getValues( LLSD &fill_me_in )
};
}
+////////////////////////////////////////////////////////////////////////////////
+//
+void LLPanelMediaSettingsSecurity::postApply()
+{
+ // no-op
+}
+
///////////////////////////////////////////////////////////////////////////////
// Try to make a valid URL if a fragment (
// white list list box widget and build a list to test against. Can also
const std::string LLPanelMediaSettingsSecurity::makeValidUrl( const std::string& src_url )
{
// use LLURI to determine if we have a valid scheme
- LLURI candidate_url( src_url );
- if ( candidate_url.scheme().empty() )
- {
+ LLURI candidate_url( src_url );
+ if ( candidate_url.scheme().empty() )
+ {
// build a URL comprised of default scheme and the original fragment
const std::string default_scheme( "http://" );
return default_scheme + src_url;
- };
-
- // we *could* test the "default scheme" + "original fragment" URL again
- // using LLURI to see if it's valid but I think the outcome is the same
- // in either case - our only option is to return the original URL
+ };
+
+ // we *could* test the "default scheme" + "original fragment" URL again
+ // using LLURI to see if it's valid but I think the outcome is the same
+ // in either case - our only option is to return the original URL
// we *think* the original url passed in was valid
return src_url;
@@ -332,10 +336,10 @@ void LLPanelMediaSettingsSecurity::onBtnDel( void* userdata )
self->mWhiteListList->deleteSelectedItems();
}
-////////////////////////////////////////////////////////////////////////////////
-//
-void LLPanelMediaSettingsSecurity::setParent( LLFloaterMediaSettings* parent )
-{
- mParent = parent;
-};
-
+////////////////////////////////////////////////////////////////////////////////
+//
+void LLPanelMediaSettingsSecurity::setParent( LLFloaterMediaSettings* parent )
+{
+ mParent = parent;
+};
+
diff --git a/indra/newview/llpanelmediasettingssecurity.h b/indra/newview/llpanelmediasettingssecurity.h
index 2555bb8dc8..638664e59d 100644
--- a/indra/newview/llpanelmediasettingssecurity.h
+++ b/indra/newview/llpanelmediasettingssecurity.h
@@ -41,31 +41,37 @@ class LLFloaterMediaSettings;
class LLPanelMediaSettingsSecurity : public LLPanel
{
- public:
- BOOL postBuild();
- virtual void draw();
- static void apply(void*);
- void getValues(LLSD &fill_me_in);
-
- LLPanelMediaSettingsSecurity();
- ~LLPanelMediaSettingsSecurity();
-
- static void initValues( void* userdata, const LLSD& media_settings,bool editable );
- static void clearValues( void* userdata, bool editable);
- void addWhiteListItem(const std::string& url);
- void setParent( LLFloaterMediaSettings* parent );
- const std::string makeValidUrl( const std::string& src_url );
- bool passesWhiteList( const std::string& added_url, const std::string& test_url );
-
- protected:
- LLFloaterMediaSettings* mParent;
-
- private:
- LLCheckBoxCtrl* mEnableWhiteList;
- LLScrollListCtrl* mWhiteListList;
-
- static void onBtnAdd(void*);
- static void onBtnDel(void*);
+public:
+ LLPanelMediaSettingsSecurity();
+ ~LLPanelMediaSettingsSecurity();
+
+ BOOL postBuild();
+ virtual void draw();
+
+ // XXX TODO: put these into a common parent class?
+ // Hook that the floater calls before applying changes from the panel
+ void preApply();
+ // Function that asks the panel to fill in values associated with the panel
+ void getValues(LLSD &fill_me_in);
+ // Hook that the floater calls after applying changes to the panel
+ void postApply();
+
+ static void initValues( void* userdata, const LLSD& media_settings,bool editable );
+ static void clearValues( void* userdata, bool editable);
+ void addWhiteListItem(const std::string& url);
+ void setParent( LLFloaterMediaSettings* parent );
+ const std::string makeValidUrl( const std::string& src_url );
+ bool passesWhiteList( const std::string& added_url, const std::string& test_url );
+
+protected:
+ LLFloaterMediaSettings* mParent;
+
+private:
+ LLCheckBoxCtrl* mEnableWhiteList;
+ LLScrollListCtrl* mWhiteListList;
+
+ static void onBtnAdd(void*);
+ static void onBtnDel(void*);
};
#endif // LL_LLPANELMEDIAMEDIASETTINGSSECURITY_H
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index 482f3d6c7e..9ba94c8ca9 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -60,6 +60,7 @@
#include "llviewermenu.h" // for gMenuHolder
#include "llvoiceclient.h"
#include "llworld.h"
+#include "llspeakers.h"
#define FRIEND_LIST_UPDATE_TIMEOUT 0.5
#define NEARBY_LIST_UPDATE_INTERVAL 1
@@ -119,8 +120,84 @@ protected:
}
};
+/** Compares avatar items by distance between you and them */
+class LLAvatarItemDistanceComparator : public LLAvatarItemComparator
+{
+public:
+ typedef std::map < LLUUID, LLVector3d > id_to_pos_map_t;
+ LLAvatarItemDistanceComparator() {};
+
+ void updateAvatarsPositions(std::vector<LLVector3d>& positions, std::vector<LLUUID>& uuids)
+ {
+ std::vector<LLVector3d>::const_iterator
+ pos_it = positions.begin(),
+ pos_end = positions.end();
+
+ std::vector<LLUUID>::const_iterator
+ id_it = uuids.begin(),
+ id_end = uuids.end();
+
+ LLAvatarItemDistanceComparator::id_to_pos_map_t pos_map;
+
+ mAvatarsPositions.clear();
+
+ for (;pos_it != pos_end && id_it != id_end; ++pos_it, ++id_it )
+ {
+ mAvatarsPositions[*id_it] = *pos_it;
+ }
+ };
+
+protected:
+ virtual bool doCompare(const LLAvatarListItem* item1, const LLAvatarListItem* item2) const
+ {
+ const LLVector3d& me_pos = gAgent.getPositionGlobal();
+ const LLVector3d& item1_pos = mAvatarsPositions.find(item1->getAvatarId())->second;
+ const LLVector3d& item2_pos = mAvatarsPositions.find(item2->getAvatarId())->second;
+ F32 dist1 = dist_vec(item1_pos, me_pos);
+ F32 dist2 = dist_vec(item2_pos, me_pos);
+ return dist1 < dist2;
+ }
+private:
+ id_to_pos_map_t mAvatarsPositions;
+};
+
+/** Comparator for comparing nearby avatar items by last spoken time */
+class LLAvatarItemRecentSpeakerComparator : public LLAvatarItemNameComparator
+{
+public:
+ LLAvatarItemRecentSpeakerComparator() {};
+ virtual ~LLAvatarItemRecentSpeakerComparator() {};
+
+protected:
+ virtual bool doCompare(const LLAvatarListItem* item1, const LLAvatarListItem* item2) const
+ {
+ LLPointer<LLSpeaker> lhs = LLLocalSpeakerMgr::instance().findSpeaker(item1->getAvatarId());
+ LLPointer<LLSpeaker> rhs = LLLocalSpeakerMgr::instance().findSpeaker(item2->getAvatarId());
+ if ( lhs.notNull() && rhs.notNull() )
+ {
+ // Compare by last speaking time
+ if( lhs->mLastSpokeTime != rhs->mLastSpokeTime )
+ return ( lhs->mLastSpokeTime > rhs->mLastSpokeTime );
+ }
+ else if ( lhs.notNull() )
+ {
+ // True if only item1 speaker info available
+ return true;
+ }
+ else if ( rhs.notNull() )
+ {
+ // False if only item2 speaker info available
+ return false;
+ }
+ // By default compare by name.
+ return LLAvatarItemNameComparator::doCompare(item1, item2);
+ }
+};
+
static const LLAvatarItemRecentComparator RECENT_COMPARATOR;
static const LLAvatarItemStatusComparator STATUS_COMPARATOR;
+static LLAvatarItemDistanceComparator DISTANCE_COMPARATOR;
+static const LLAvatarItemRecentSpeakerComparator RECENT_SPEAKER_COMPARATOR;
static LLRegisterPanelClassWrapper<LLPanelPeople> t_people("panel_people");
@@ -198,7 +275,8 @@ public:
~LLFriendListUpdater()
{
- delete mInvObserver;
+ // will be deleted by ~LLInventoryModel
+ //delete mInvObserver;
LLVoiceClient::getInstance()->removeObserver(this);
LLAvatarTracker::instance().removeObserver(this);
}
@@ -431,9 +509,12 @@ BOOL LLPanelPeople::postBuild()
mNearbyList->setContextMenu(&LLPanelPeopleMenus::gNearbyMenu);
mRecentList->setContextMenu(&LLPanelPeopleMenus::gNearbyMenu);
+ mAllFriendList->setContextMenu(&LLPanelPeopleMenus::gNearbyMenu);
+ mOnlineFriendList->setContextMenu(&LLPanelPeopleMenus::gNearbyMenu);
setSortOrder(mRecentList, (ESortOrder)gSavedSettings.getU32("RecentPeopleSortOrder"), false);
setSortOrder(mAllFriendList, (ESortOrder)gSavedSettings.getU32("FriendsSortOrder"), false);
+ setSortOrder(mNearbyList, (ESortOrder)gSavedSettings.getU32("NearbyPeopleSortOrder"), false);
LLPanel* groups_panel = getChild<LLPanel>(GROUP_TAB_NAME);
groups_panel->childSetAction("activate_btn", boost::bind(&LLPanelPeople::onActivateButtonClicked, this));
@@ -494,7 +575,8 @@ BOOL LLPanelPeople::postBuild()
enable_registrar.add("People.Friends.ViewSort.CheckItem", boost::bind(&LLPanelPeople::onFriendsViewSortMenuItemCheck, this, _2));
enable_registrar.add("People.Recent.ViewSort.CheckItem", boost::bind(&LLPanelPeople::onRecentViewSortMenuItemCheck, this, _2));
-
+ enable_registrar.add("People.Nearby.ViewSort.CheckItem", boost::bind(&LLPanelPeople::onNearbyViewSortMenuItemCheck, this, _2));
+
LLMenuGL* plus_menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_group_plus.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
mGroupPlusMenuHandle = plus_menu->getHandle();
@@ -573,8 +655,13 @@ void LLPanelPeople::updateNearbyList()
if (!mNearbyList)
return;
- LLWorld::getInstance()->getAvatars(&mNearbyList->getIDs(), NULL, gAgent.getPositionGlobal(), gSavedSettings.getF32("NearMeRange"));
+ std::vector<LLVector3d> positions;
+
+ LLWorld::getInstance()->getAvatars(&mNearbyList->getIDs(), &positions, gAgent.getPositionGlobal(), gSavedSettings.getF32("NearMeRange"));
mNearbyList->setDirty();
+
+ DISTANCE_COMPARATOR.updateAvatarsPositions(positions, mNearbyList->getIDs());
+ LLLocalSpeakerMgr::instance().update(TRUE);
}
void LLPanelPeople::updateRecentList()
@@ -607,6 +694,12 @@ void LLPanelPeople::buttonSetAction(const std::string& btn_name, const commit_si
button->setClickedCallback(cb);
}
+bool LLPanelPeople::isFriendOnline(const LLUUID& id)
+{
+ LLAvatarList::uuid_vector_t ids = mOnlineFriendList->getIDs();
+ return std::find(ids.begin(), ids.end(), id) != ids.end();
+}
+
void LLPanelPeople::updateButtons()
{
std::string cur_tab = getActiveTabName();
@@ -659,7 +752,7 @@ void LLPanelPeople::updateButtons()
childSetEnabled("add_friend_btn", !is_friend);
}
- buttonSetEnabled("teleport_btn", friends_tab_active && item_selected);
+ buttonSetEnabled("teleport_btn", friends_tab_active && item_selected && isFriendOnline(selected_uuids.front()));
buttonSetEnabled("view_profile_btn", item_selected);
buttonSetEnabled("im_btn", multiple_selected); // allow starting the friends conference for multiple selection
buttonSetEnabled("call_btn", multiple_selected);
@@ -757,6 +850,14 @@ void LLPanelPeople::setSortOrder(LLAvatarList* list, ESortOrder order, bool save
list->setComparator(&RECENT_COMPARATOR);
list->sort();
break;
+ case E_SORT_BY_RECENT_SPEAKERS:
+ list->setComparator(&RECENT_SPEAKER_COMPARATOR);
+ list->sort();
+ break;
+ case E_SORT_BY_DISTANCE:
+ list->setComparator(&DISTANCE_COMPARATOR);
+ list->sort();
+ break;
default:
llwarns << "Unrecognized people sort order for " << list->getName() << llendl;
return;
@@ -771,7 +872,7 @@ void LLPanelPeople::setSortOrder(LLAvatarList* list, ESortOrder order, bool save
else if (list == mRecentList)
setting = "RecentPeopleSortOrder";
else if (list == mNearbyList)
- setting = "NearbyPeopleSortOrder"; // *TODO: unused by current implementation
+ setting = "NearbyPeopleSortOrder";
if (!setting.empty())
gSavedSettings.setU32(setting, order);
@@ -1007,12 +1108,13 @@ void LLPanelPeople::onNearbyViewSortMenuItemClicked(const LLSD& userdata)
{
std::string chosen_item = userdata.asString();
- if (chosen_item == "sort_recent")
+ if (chosen_item == "sort_by_recent_speakers")
{
+ setSortOrder(mNearbyList, E_SORT_BY_RECENT_SPEAKERS);
}
else if (chosen_item == "sort_name")
{
- mNearbyList->sortByName();
+ setSortOrder(mNearbyList, E_SORT_BY_NAME);
}
else if (chosen_item == "view_icons")
{
@@ -1020,8 +1122,25 @@ void LLPanelPeople::onNearbyViewSortMenuItemClicked(const LLSD& userdata)
}
else if (chosen_item == "sort_distance")
{
+ setSortOrder(mNearbyList, E_SORT_BY_DISTANCE);
}
}
+
+bool LLPanelPeople::onNearbyViewSortMenuItemCheck(const LLSD& userdata)
+{
+ std::string item = userdata.asString();
+ U32 sort_order = gSavedSettings.getU32("NearbyPeopleSortOrder");
+
+ if (item == "sort_by_recent_speakers")
+ return sort_order == E_SORT_BY_RECENT_SPEAKERS;
+ if (item == "sort_name")
+ return sort_order == E_SORT_BY_NAME;
+ if (item == "sort_distance")
+ return sort_order == E_SORT_BY_DISTANCE;
+
+ return false;
+}
+
void LLPanelPeople::onRecentViewSortMenuItemClicked(const LLSD& userdata)
{
std::string chosen_item = userdata.asString();
diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h
index 9bf9befe90..a369bcd3e2 100644
--- a/indra/newview/llpanelpeople.h
+++ b/indra/newview/llpanelpeople.h
@@ -62,6 +62,8 @@ private:
E_SORT_BY_NAME = 0,
E_SORT_BY_STATUS = 1,
E_SORT_BY_MOST_RECENT = 2,
+ E_SORT_BY_DISTANCE = 3,
+ E_SORT_BY_RECENT_SPEAKERS = 4,
} ESortOrder;
// methods indirectly called by the updaters
@@ -69,6 +71,8 @@ private:
void updateNearbyList();
void updateRecentList();
+ bool isFriendOnline(const LLUUID& id);
+
void updateButtons();
std::string getActiveTabName() const;
LLUUID getCurrentItemID() const;
@@ -115,6 +119,7 @@ private:
bool onFriendsViewSortMenuItemCheck(const LLSD& userdata);
bool onRecentViewSortMenuItemCheck(const LLSD& userdata);
+ bool onNearbyViewSortMenuItemCheck(const LLSD& userdata);
// misc callbacks
static void onAvatarPicked(
diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp
index aaf6849fe9..7dea5eaf67 100644
--- a/indra/newview/llpanelpeoplemenus.cpp
+++ b/indra/newview/llpanelpeoplemenus.cpp
@@ -64,7 +64,6 @@ void ContextMenu::show(LLView* spawning_view, const std::vector<LLUUID>& uuids,
if (parent)
{
parent->removeChild(mMenu);
- mMenu->setParent(NULL);
}
delete mMenu;
mMenu = NULL;
diff --git a/indra/newview/llpanelpick.cpp b/indra/newview/llpanelpick.cpp
index f5c4f89702..da0c8d5020 100644
--- a/indra/newview/llpanelpick.cpp
+++ b/indra/newview/llpanelpick.cpp
@@ -440,7 +440,8 @@ void LLPanelPickEdit::resetDirty()
BOOL LLPanelPickEdit::isDirty() const
{
- if( LLPanelPickInfo::isDirty()
+ if( mNewPick
+ || LLPanelPickInfo::isDirty()
|| mLocationChanged
|| mSnapshotCtrl->isDirty()
|| getChild<LLLineEditor>("pick_name")->isDirty()
diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp
index 2bf04f9681..c30658755a 100644
--- a/indra/newview/llpanelpicks.cpp
+++ b/indra/newview/llpanelpicks.cpp
@@ -45,11 +45,14 @@
#include "llviewermenu.h"
#include "llregistry.h"
+#include "llaccordionctrl.h"
+#include "llaccordionctrltab.h"
#include "llpanelpicks.h"
#include "llavatarpropertiesprocessor.h"
#include "llpanelavatar.h"
#include "llpanelprofile.h"
#include "llpanelpick.h"
+#include "llpanelclassified.h"
static const std::string XML_BTN_NEW = "new_btn";
static const std::string XML_BTN_DELETE = "trash_btn";
@@ -62,9 +65,40 @@ static const std::string PICK_ID("pick_id");
static const std::string PICK_CREATOR_ID("pick_creator_id");
static const std::string PICK_NAME("pick_name");
+static const std::string CLASSIFIED_ID("classified_id");
+static const std::string CLASSIFIED_NAME("classified_name");
+
static LLRegisterPanelClassWrapper<LLPanelPicks> t_panel_picks("panel_picks");
+//////////////////////////////////////////////////////////////////////////
+
+/**
+ * Copy&Pasted from old LLPanelClassified. This class does nothing at the moment.
+ * Subscribing to "classifiedclickthrough" removes a few warnings.
+ */
+class LLClassifiedClickThrough : public LLDispatchHandler
+{
+public:
+
+ // "classifiedclickthrough"
+ // strings[0] = classified_id
+ // strings[1] = teleport_clicks
+ // strings[2] = map_clicks
+ // strings[3] = profile_clicks
+ virtual bool operator()(
+ const LLDispatcher* dispatcher,
+ const std::string& key,
+ const LLUUID& invoice,
+ const sparam_t& strings)
+ {
+ if (strings.size() != 4)
+ return false;
+
+ return true;
+ }
+};
+
//-----------------------------------------------------------------------------
// LLPanelPicks
//-----------------------------------------------------------------------------
@@ -74,10 +108,19 @@ LLPanelPicks::LLPanelPicks()
mProfilePanel(NULL),
mPickPanel(NULL),
mPicksList(NULL),
+ mClassifiedsList(NULL),
mPanelPickInfo(NULL),
mPanelPickEdit(NULL),
- mOverflowMenu(NULL)
+ mOverflowMenu(NULL),
+ mPlusMenu(NULL),
+ mPicksAccTab(NULL),
+ mClassifiedsAccTab(NULL),
+ mPanelClassifiedInfo(NULL),
+ mPanelClassifiedEdit(NULL),
+ mClickThroughDisp(NULL)
{
+ mClickThroughDisp = new LLClassifiedClickThrough();
+ gGenericDispatcher.addHandler("classifiedclickthrough", mClickThroughDisp);
}
LLPanelPicks::~LLPanelPicks()
@@ -86,6 +129,8 @@ LLPanelPicks::~LLPanelPicks()
{
LLAvatarPropertiesProcessor::getInstance()->removeObserver(getAvatarId(),this);
}
+
+ delete mClickThroughDisp;
}
void* LLPanelPicks::create(void* data /* = NULL */)
@@ -100,6 +145,9 @@ void LLPanelPicks::updateData()
{
mPicksList->clear();
LLAvatarPropertiesProcessor::getInstance()->sendAvatarPicksRequest(getAvatarId());
+
+ mClassifiedsList->clear();
+ LLAvatarPropertiesProcessor::getInstance()->sendAvatarClassifiedsRequest(getAvatarId());
}
}
@@ -138,13 +186,47 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type)
mPicksList->addItem(picture, pick_value);
- picture->setDoubleClickCallback(boost::bind(&LLPanelPicks::onDoubleClickItem, this, _1));
+ picture->setDoubleClickCallback(boost::bind(&LLPanelPicks::onDoubleClickPickItem, this, _1));
picture->setRightMouseUpCallback(boost::bind(&LLPanelPicks::onRightMouseUpItem, this, _1, _2, _3, _4));
picture->setMouseUpCallback(boost::bind(&LLPanelPicks::updateButtons, this));
}
+ showAccordion("tab_picks", mPicksList->size());
+
+ resetDirty();
+ updateButtons();
+ }
+ }
+ else if(APT_CLASSIFIEDS == type)
+ {
+ LLAvatarClassifieds* c_info = static_cast<LLAvatarClassifieds*>(data);
+ if(c_info && getAvatarId() == c_info->target_id)
+ {
+ mClassifiedsList->clear();
+
+ LLAvatarClassifieds::classifieds_list_t::const_iterator it = c_info->classifieds_list.begin();
+ for(; c_info->classifieds_list.end() != it; ++it)
+ {
+ LLAvatarClassifieds::classified_data c_data = *it;
+
+ LLClassifiedItem* c_item = new LLClassifiedItem(getAvatarId(), c_data.classified_id);
+ c_item->childSetAction("info_chevron", boost::bind(&LLPanelPicks::onClickInfo, this));
+ c_item->setClassifiedName(c_data.name);
+
+ LLSD pick_value = LLSD();
+ pick_value.insert(CLASSIFIED_ID, c_data.classified_id);
+ pick_value.insert(CLASSIFIED_NAME, c_data.name);
+
+ mClassifiedsList->addItem(c_item, pick_value);
+
+ c_item->setDoubleClickCallback(boost::bind(&LLPanelPicks::onDoubleClickClassifiedItem, this, _1));
+ c_item->setRightMouseUpCallback(boost::bind(&LLPanelPicks::onRightMouseUpItem, this, _1, _2, _3, _4));
+ c_item->setMouseUpCallback(boost::bind(&LLPanelPicks::updateButtons, this));
+ }
+
+ showAccordion("tab_classifieds", mClassifiedsList->size());
+
resetDirty();
- LLAvatarPropertiesProcessor::getInstance()->removeObserver(getAvatarId(),this);
updateButtons();
}
}
@@ -158,16 +240,44 @@ LLPickItem* LLPanelPicks::getSelectedPickItem()
return dynamic_cast<LLPickItem*>(selected_item);
}
+LLClassifiedItem* LLPanelPicks::getSelectedClassifiedItem()
+{
+ LLPanel* selected_item = mClassifiedsList->getSelectedItem();
+ if (!selected_item)
+ {
+ return NULL;
+ }
+ return dynamic_cast<LLClassifiedItem*>(selected_item);
+}
+
BOOL LLPanelPicks::postBuild()
{
mPicksList = getChild<LLFlatListView>("picks_list");
+ mClassifiedsList = getChild<LLFlatListView>("classifieds_list");
+
+ mPicksList->setCommitOnSelectionChange(true);
+ mClassifiedsList->setCommitOnSelectionChange(true);
+
+ mPicksList->setCommitCallback(boost::bind(&LLPanelPicks::onListCommit, this, mPicksList));
+ mClassifiedsList->setCommitCallback(boost::bind(&LLPanelPicks::onListCommit, this, mClassifiedsList));
+
+ mPicksList->setNoItemsCommentText(getString("no_picks"));
+ mClassifiedsList->setNoItemsCommentText(getString("no_classifieds"));
- childSetAction(XML_BTN_NEW, boost::bind(&LLPanelPicks::onClickNew, this));
+ childSetAction(XML_BTN_NEW, boost::bind(&LLPanelPicks::onClickPlusBtn, this));
childSetAction(XML_BTN_DELETE, boost::bind(&LLPanelPicks::onClickDelete, this));
childSetAction(XML_BTN_TELEPORT, boost::bind(&LLPanelPicks::onClickTeleport, this));
childSetAction(XML_BTN_SHOW_ON_MAP, boost::bind(&LLPanelPicks::onClickMap, this));
childSetAction(XML_BTN_INFO, boost::bind(&LLPanelPicks::onClickInfo, this));
childSetAction(XML_BTN_OVERFLOW, boost::bind(&LLPanelPicks::onOverflowButtonClicked, this));
+
+ mPicksAccTab = getChild<LLAccordionCtrlTab>("tab_picks");
+ mPicksAccTab->setDropDownStateChangedCallback(boost::bind(&LLPanelPicks::onAccordionStateChanged, this, mPicksAccTab));
+ mPicksAccTab->setDisplayChildren(true);
+
+ mClassifiedsAccTab = getChild<LLAccordionCtrlTab>("tab_classifieds");
+ mClassifiedsAccTab->setDropDownStateChangedCallback(boost::bind(&LLPanelPicks::onAccordionStateChanged, this, mClassifiedsAccTab));
+ mClassifiedsAccTab->setDisplayChildren(false);
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registar;
registar.add("Pick.Info", boost::bind(&LLPanelPicks::onClickInfo, this));
@@ -180,6 +290,10 @@ BOOL LLPanelPicks::postBuild()
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar overflow_registar;
overflow_registar.add("PicksList.Overflow", boost::bind(&LLPanelPicks::onOverflowMenuItemClicked, this, _2));
mOverflowMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_picks_overflow.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+
+ LLUICtrl::CommitCallbackRegistry::ScopedRegistrar plus_registar;
+ plus_registar.add("Picks.Plus.Action", boost::bind(&LLPanelPicks::onPlusMenuItemClicked, this, _2));
+ mPlusMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_picks_plus.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
return TRUE;
}
@@ -202,6 +316,34 @@ void LLPanelPicks::onOverflowMenuItemClicked(const LLSD& param)
}
}
+void LLPanelPicks::onPlusMenuItemClicked(const LLSD& param)
+{
+ std::string value = param.asString();
+
+ if("new_pick" == value)
+ {
+ createNewPick();
+ }
+ else if("new_classified" == value)
+ {
+ createNewClassified();
+ }
+}
+
+void LLPanelPicks::onAccordionStateChanged(const LLAccordionCtrlTab* acc_tab)
+{
+ if(!mPicksAccTab->getDisplayChildren())
+ {
+ mPicksList->resetSelection(true);
+ }
+ if(!mClassifiedsAccTab->getDisplayChildren())
+ {
+ mClassifiedsList->resetSelection(true);
+ }
+
+ updateButtons();
+}
+
void LLPanelPicks::onOverflowButtonClicked()
{
LLRect rect;
@@ -242,6 +384,9 @@ void LLPanelPicks::onOpen(const LLSD& key)
if(getAvatarId() != id)
{
+ showAccordion("tab_picks", false);
+ showAccordion("tab_classifieds", false);
+
mPicksList->goToTop();
// Set dummy value to make panel dirty and make it reload picks
setValue(LLSD());
@@ -250,21 +395,50 @@ void LLPanelPicks::onOpen(const LLSD& key)
LLPanelProfileTab::onOpen(key);
}
+void LLPanelPicks::onListCommit(const LLFlatListView* f_list)
+{
+ // Make sure only one of the lists has selection.
+ if(f_list == mPicksList)
+ {
+ mClassifiedsList->resetSelection(true);
+ }
+ else if(f_list == mClassifiedsList)
+ {
+ mPicksList->resetSelection(true);
+ }
+ else
+ {
+ llwarns << "Unknown list" << llendl;
+ }
+
+ updateButtons();
+}
+
//static
void LLPanelPicks::onClickDelete()
{
- LLSD pick_value = mPicksList->getSelectedValue();
- if (pick_value.isUndefined()) return;
+ LLSD value = mPicksList->getSelectedValue();
+ if (value.isDefined())
+ {
+ LLSD args;
+ args["PICK"] = value[PICK_NAME];
+ LLNotifications::instance().add("DeleteAvatarPick", args, LLSD(), boost::bind(&LLPanelPicks::callbackDeletePick, this, _1, _2));
+ return;
+ }
- LLSD args;
- args["PICK"] = pick_value[PICK_NAME];
- LLNotifications::instance().add("DeleteAvatarPick", args, LLSD(), boost::bind(&LLPanelPicks::callbackDelete, this, _1, _2));
+ value = mClassifiedsList->getSelectedValue();
+ if(value.isDefined())
+ {
+ LLSD args;
+ args["NAME"] = value[CLASSIFIED_NAME];
+ LLNotifications::instance().add("DeleteClassified", args, LLSD(), boost::bind(&LLPanelPicks::callbackDeleteClassified, this, _1, _2));
+ return;
+ }
}
-bool LLPanelPicks::callbackDelete(const LLSD& notification, const LLSD& response)
+bool LLPanelPicks::callbackDeletePick(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
-
LLSD pick_value = mPicksList->getSelectedValue();
if (0 == option)
@@ -276,6 +450,20 @@ bool LLPanelPicks::callbackDelete(const LLSD& notification, const LLSD& response
return false;
}
+bool LLPanelPicks::callbackDeleteClassified(const LLSD& notification, const LLSD& response)
+{
+ S32 option = LLNotification::getSelectedOption(notification, response);
+ LLSD value = mClassifiedsList->getSelectedValue();
+
+ if (0 == option)
+ {
+ LLAvatarPropertiesProcessor::instance().sendClassifiedDelete(value[CLASSIFIED_ID]);
+ mClassifiedsList->removeItemByValue(value);
+ }
+ updateButtons();
+ return false;
+}
+
bool LLPanelPicks::callbackTeleport( const LLSD& notification, const LLSD& response )
{
S32 option = LLNotification::getSelectedOption(notification, response);
@@ -291,9 +479,14 @@ bool LLPanelPicks::callbackTeleport( const LLSD& notification, const LLSD& respo
void LLPanelPicks::onClickTeleport()
{
LLPickItem* pick_item = getSelectedPickItem();
- if (!pick_item) return;
+ LLClassifiedItem* c_item = getSelectedClassifiedItem();
+
+ LLVector3d pos;
+ if(pick_item)
+ pos = pick_item->getPosGlobal();
+ else if(c_item)
+ pos = c_item->getPosGlobal();
- LLVector3d pos = pick_item->getPosGlobal();
if (!pos.isExactlyZero())
{
gAgent.teleportViaLocation(pos);
@@ -305,9 +498,15 @@ void LLPanelPicks::onClickTeleport()
void LLPanelPicks::onClickMap()
{
LLPickItem* pick_item = getSelectedPickItem();
- if (!pick_item) return;
+ LLClassifiedItem* c_item = getSelectedClassifiedItem();
+
+ LLVector3d pos;
+ if (pick_item)
+ pos = pick_item->getPosGlobal();
+ else if(c_item)
+ pos = c_item->getPosGlobal();
- LLFloaterWorldMap::getInstance()->trackLocation(pick_item->getPosGlobal());
+ LLFloaterWorldMap::getInstance()->trackLocation(pos);
LLFloaterReg::showInstance("world_map", "center");
}
@@ -325,7 +524,7 @@ void LLPanelPicks::onRightMouseUpItem(LLUICtrl* item, S32 x, S32 y, MASK mask)
}
}
-void LLPanelPicks::onDoubleClickItem(LLUICtrl* item)
+void LLPanelPicks::onDoubleClickPickItem(LLUICtrl* item)
{
LLSD pick_value = mPicksList->getSelectedValue();
if (pick_value.isUndefined()) return;
@@ -335,9 +534,19 @@ void LLPanelPicks::onDoubleClickItem(LLUICtrl* item)
LLNotifications::instance().add("TeleportToPick", args, LLSD(), boost::bind(&LLPanelPicks::callbackTeleport, this, _1, _2));
}
+void LLPanelPicks::onDoubleClickClassifiedItem(LLUICtrl* item)
+{
+ LLSD value = mClassifiedsList->getSelectedValue();
+ if (value.isUndefined()) return;
+
+ LLSD args;
+ args["CLASSIFIED"] = value[CLASSIFIED_NAME];
+ LLNotifications::instance().add("TeleportToClassified", args, LLSD(), boost::bind(&LLPanelPicks::callbackTeleport, this, _1, _2));
+}
+
void LLPanelPicks::updateButtons()
{
- bool has_selected = mPicksList->numSelected();
+ bool has_selected = mPicksList->numSelected() > 0 || mClassifiedsList->numSelected() > 0;
if (getAvatarId() == gAgentID)
{
@@ -366,15 +575,44 @@ void LLPanelPicks::buildPickPanel()
// }
}
-void LLPanelPicks::onClickNew()
+void LLPanelPicks::onClickPlusBtn()
+{
+ LLRect rect;
+ childGetRect(XML_BTN_NEW, rect);
+
+ mPlusMenu->updateParent(LLMenuGL::sMenuContainer);
+ mPlusMenu->setButtonRect(rect, this);
+ LLMenuGL::showPopup(this, mPlusMenu, rect.mLeft, rect.mTop);
+}
+
+void LLPanelPicks::createNewPick()
{
createPickEditPanel();
getProfilePanel()->openPanel(mPanelPickEdit, LLSD());
}
+void LLPanelPicks::createNewClassified()
+{
+ createClassifiedEditPanel();
+
+ getProfilePanel()->openPanel(mPanelClassifiedEdit, LLSD());
+}
+
void LLPanelPicks::onClickInfo()
{
+ if(mPicksList->numSelected() > 0)
+ {
+ openPickInfo();
+ }
+ else if(mClassifiedsList->numSelected() > 0)
+ {
+ openClassifiedInfo();
+ }
+}
+
+void LLPanelPicks::openPickInfo()
+{
LLSD selected_value = mPicksList->getSelectedValue();
if (selected_value.isUndefined()) return;
@@ -392,6 +630,33 @@ void LLPanelPicks::onClickInfo()
getProfilePanel()->openPanel(mPanelPickInfo, params);
}
+void LLPanelPicks::openClassifiedInfo()
+{
+ LLSD selected_value = mClassifiedsList->getSelectedValue();
+ if (selected_value.isUndefined()) return;
+
+ LLClassifiedItem* c_item = getSelectedClassifiedItem();
+
+ createClassifiedInfoPanel();
+
+ LLSD params;
+ params["classified_id"] = c_item->getClassifiedId();
+ params["avatar_id"] = c_item->getAvatarId();
+ params["snapshot_id"] = c_item->getSnapshotId();
+ params["name"] = c_item->getClassifiedName();
+ params["desc"] = c_item->getDescription();
+
+ getProfilePanel()->openPanel(mPanelClassifiedInfo, params);
+}
+
+void LLPanelPicks::showAccordion(const std::string& name, bool show)
+{
+ LLAccordionCtrlTab* tab = getChild<LLAccordionCtrlTab>(name);
+ tab->setVisible(show);
+ LLAccordionCtrl* acc = getChild<LLAccordionCtrl>("accordion");
+ acc->arrange();
+}
+
void LLPanelPicks::onPanelPickClose(LLPanel* panel)
{
panel->setVisible(FALSE);
@@ -403,6 +668,61 @@ void LLPanelPicks::onPanelPickSave(LLPanel* panel)
updateButtons();
}
+void LLPanelPicks::onPanelClassifiedSave(LLPanelClassifiedEdit* panel)
+{
+ if(panel->isNew())
+ {
+ LLClassifiedItem* c_item = new LLClassifiedItem(getAvatarId(), panel->getClassifiedId());
+
+ c_item->setClassifiedName(panel->getClassifiedName());
+ c_item->setDescription(panel->getDescription());
+ c_item->setSnapshotId(panel->getSnapshotId());
+
+ LLSD c_value;
+ c_value.insert(CLASSIFIED_ID, c_item->getClassifiedId());
+ c_value.insert(CLASSIFIED_NAME, c_item->getClassifiedName());
+ mClassifiedsList->addItem(c_item, c_value, ADD_TOP);
+
+ c_item->setDoubleClickCallback(boost::bind(&LLPanelPicks::onDoubleClickClassifiedItem, this, _1));
+ c_item->setRightMouseUpCallback(boost::bind(&LLPanelPicks::onRightMouseUpItem, this, _1, _2, _3, _4));
+ c_item->setMouseUpCallback(boost::bind(&LLPanelPicks::updateButtons, this));
+ c_item->childSetAction("info_chevron", boost::bind(&LLPanelPicks::onClickInfo, this));
+ }
+ else
+ {
+ onPanelClassifiedClose(panel);
+ return;
+ }
+
+ onPanelPickClose(panel);
+ updateButtons();
+}
+
+void LLPanelPicks::onPanelClassifiedClose(LLPanelClassifiedInfo* panel)
+{
+ if(panel->getInfoLoaded() && !panel->isDirty())
+ {
+ std::vector<LLSD> values;
+ mClassifiedsList->getValues(values);
+ for(size_t n = 0; n < values.size(); ++n)
+ {
+ LLUUID c_id = values[n][CLASSIFIED_ID].asUUID();
+ if(panel->getClassifiedId() == c_id)
+ {
+ LLClassifiedItem* c_item = dynamic_cast<LLClassifiedItem*>(
+ mClassifiedsList->getItemByValue(values[n]));
+
+ c_item->setClassifiedName(panel->getClassifiedName());
+ c_item->setDescription(panel->getDescription());
+ c_item->setSnapshotId(panel->getSnapshotId());
+ }
+ }
+ }
+
+ onPanelPickClose(panel);
+ updateButtons();
+}
+
void LLPanelPicks::createPickInfoPanel()
{
if(!mPanelPickInfo)
@@ -414,6 +734,28 @@ void LLPanelPicks::createPickInfoPanel()
}
}
+void LLPanelPicks::createClassifiedInfoPanel()
+{
+ if(!mPanelClassifiedInfo)
+ {
+ mPanelClassifiedInfo = LLPanelClassifiedInfo::create();
+ mPanelClassifiedInfo->setExitCallback(boost::bind(&LLPanelPicks::onPanelClassifiedClose, this, mPanelClassifiedInfo));
+ mPanelClassifiedInfo->setVisible(FALSE);
+ }
+}
+
+void LLPanelPicks::createClassifiedEditPanel()
+{
+ if(!mPanelClassifiedEdit)
+ {
+ mPanelClassifiedEdit = LLPanelClassifiedEdit::create();
+ mPanelClassifiedEdit->setExitCallback(boost::bind(&LLPanelPicks::onPanelClassifiedClose, this, mPanelClassifiedEdit));
+ mPanelClassifiedEdit->setSaveCallback(boost::bind(&LLPanelPicks::onPanelClassifiedSave, this, mPanelClassifiedEdit));
+ mPanelClassifiedEdit->setCancelCallback(boost::bind(&LLPanelPicks::onPanelClassifiedClose, this, mPanelClassifiedEdit));
+ mPanelClassifiedEdit->setVisible(FALSE);
+ }
+}
+
void LLPanelPicks::createPickEditPanel()
{
if(!mPanelPickEdit)
@@ -473,9 +815,38 @@ void LLPanelPicks::onPanelPickEdit()
getProfilePanel()->openPanel(mPanelPickEdit, params);
}
+void LLPanelPicks::onPanelClassifiedEdit()
+{
+ LLSD selected_value = mClassifiedsList->getSelectedValue();
+ if (selected_value.isUndefined())
+ {
+ return;
+ }
+
+ LLClassifiedItem* c_item = dynamic_cast<LLClassifiedItem*>(mClassifiedsList->getSelectedItem());
+
+ createClassifiedEditPanel();
+
+ LLSD params;
+ params["classified_id"] = c_item->getClassifiedId();
+ params["avatar_id"] = c_item->getAvatarId();
+ params["snapshot_id"] = c_item->getSnapshotId();
+ params["name"] = c_item->getClassifiedName();
+ params["desc"] = c_item->getDescription();
+
+ getProfilePanel()->openPanel(mPanelClassifiedEdit, params);
+}
+
void LLPanelPicks::onClickMenuEdit()
{
- onPanelPickEdit();
+ if(getSelectedPickItem())
+ {
+ onPanelPickEdit();
+ }
+ else if(getSelectedClassifiedItem())
+ {
+ onPanelClassifiedEdit();
+ }
}
inline LLPanelProfile* LLPanelPicks::getProfilePanel()
@@ -610,3 +981,80 @@ void LLPickItem::setValue(const LLSD& value)
if (!value.has("selected")) return;
childSetVisible("selected_icon", value["selected"]);
}
+
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+
+LLClassifiedItem::LLClassifiedItem(const LLUUID& avatar_id, const LLUUID& classified_id)
+ : LLPanel()
+ , mAvatarId(avatar_id)
+ , mClassifiedId(classified_id)
+{
+ LLUICtrlFactory::getInstance()->buildPanel(this,"panel_classifieds_list_item.xml");
+
+ LLAvatarPropertiesProcessor::getInstance()->addObserver(getAvatarId(), this);
+ LLAvatarPropertiesProcessor::getInstance()->sendClassifiedInfoRequest(getClassifiedId());
+}
+
+LLClassifiedItem::~LLClassifiedItem()
+{
+ LLAvatarPropertiesProcessor::getInstance()->removeObserver(getAvatarId(), this);
+}
+
+void LLClassifiedItem::processProperties(void* data, EAvatarProcessorType type)
+{
+ if(APT_CLASSIFIED_INFO != type)
+ {
+ return;
+ }
+
+ LLAvatarClassifiedInfo* c_info = static_cast<LLAvatarClassifiedInfo*>(data);
+ if( !c_info || c_info->classified_id != getClassifiedId() )
+ {
+ return;
+ }
+
+ setClassifiedName(c_info->name);
+ setDescription(c_info->description);
+ setSnapshotId(c_info->snapshot_id);
+ setPosGlobal(c_info->pos_global);
+
+ LLAvatarPropertiesProcessor::getInstance()->removeObserver(getAvatarId(), this);
+}
+
+BOOL LLClassifiedItem::postBuild()
+{
+ setMouseEnterCallback(boost::bind(&LLPanelPickInfo::childSetVisible, this, "hovered_icon", true));
+ setMouseLeaveCallback(boost::bind(&LLPanelPickInfo::childSetVisible, this, "hovered_icon", false));
+ return TRUE;
+}
+
+void LLClassifiedItem::setValue(const LLSD& value)
+{
+ if (!value.isMap()) return;;
+ if (!value.has("selected")) return;
+ childSetVisible("selected_icon", value["selected"]);
+}
+
+void LLClassifiedItem::setClassifiedName(const std::string& name)
+{
+ childSetValue("name", name);
+}
+
+void LLClassifiedItem::setDescription(const std::string& desc)
+{
+ childSetValue("description", desc);
+}
+
+void LLClassifiedItem::setSnapshotId(const LLUUID& snapshot_id)
+{
+ childSetValue("picture", snapshot_id);
+}
+
+LLUUID LLClassifiedItem::getSnapshotId()
+{
+ return childGetValue("picture");
+}
+
+//EOF
diff --git a/indra/newview/llpanelpicks.h b/indra/newview/llpanelpicks.h
index 5a2754ad10..4b90ea5048 100644
--- a/indra/newview/llpanelpicks.h
+++ b/indra/newview/llpanelpicks.h
@@ -40,6 +40,7 @@
#include "llpanelavatar.h"
#include "llregistry.h"
+class LLAccordionCtrlTab;
class LLPanelProfile;
class LLMessageSystem;
class LLVector3d;
@@ -47,10 +48,18 @@ class LLPanelProfileTab;
class LLAgent;
class LLMenuGL;
class LLPickItem;
+class LLClassifiedItem;
class LLFlatListView;
class LLPanelPickInfo;
class LLPanelPickEdit;
class LLToggleableMenu;
+class LLPanelClassifiedInfo;
+class LLPanelClassifiedEdit;
+class LLClassifiedClickThrough;
+
+// *TODO
+// Panel Picks has been consolidated with Classifieds (EXT-2095), give LLPanelPicks
+// and corresponding files (cpp, h, xml) a new name. (new name is TBD at the moment)
class LLPanelPicks
: public LLPanelProfileTab
@@ -71,6 +80,7 @@ public:
// returns the selected pick item
LLPickItem* getSelectedPickItem();
+ LLClassifiedItem* getSelectedClassifiedItem();
//*NOTE top down approch when panel toggling is done only by
// parent panels failed to work (picks related code was in me profile panel)
@@ -83,41 +93,67 @@ private:
void onOverflowMenuItemClicked(const LLSD& param);
void onOverflowButtonClicked();
+ void onPlusMenuItemClicked(const LLSD& param);
+
+ void onListCommit(const LLFlatListView* f_list);
+ void onAccordionStateChanged(const LLAccordionCtrlTab* acc_tab);
//------------------------------------------------
// Callbacks which require panel toggling
//------------------------------------------------
- void onClickNew();
+ void onClickPlusBtn();
void onClickInfo();
void onPanelPickClose(LLPanel* panel);
void onPanelPickSave(LLPanel* panel);
+ void onPanelClassifiedSave(LLPanelClassifiedEdit* panel);
+ void onPanelClassifiedClose(LLPanelClassifiedInfo* panel);
void onPanelPickEdit();
+ void onPanelClassifiedEdit();
void onClickMenuEdit();
+ void createNewPick();
+ void createNewClassified();
+
+ void openPickInfo();
+ void openClassifiedInfo();
+
+ void showAccordion(const std::string& name, bool show);
+
void buildPickPanel();
- bool callbackDelete(const LLSD& notification, const LLSD& response);
+ bool callbackDeletePick(const LLSD& notification, const LLSD& response);
+ bool callbackDeleteClassified(const LLSD& notification, const LLSD& response);
bool callbackTeleport(const LLSD& notification, const LLSD& response);
void updateButtons();
- virtual void onDoubleClickItem(LLUICtrl* item);
+ virtual void onDoubleClickPickItem(LLUICtrl* item);
+ virtual void onDoubleClickClassifiedItem(LLUICtrl* item);
virtual void onRightMouseUpItem(LLUICtrl* item, S32 x, S32 y, MASK mask);
LLPanelProfile* getProfilePanel();
void createPickInfoPanel();
void createPickEditPanel();
-// void openPickEditPanel(LLPickItem* pick);
-// void openPickInfoPanel(LLPickItem* pick);
+ void createClassifiedInfoPanel();
+ void createClassifiedEditPanel();
LLMenuGL* mPopupMenu;
LLPanelProfile* mProfilePanel;
LLPanelPickInfo* mPickPanel;
LLFlatListView* mPicksList;
+ LLFlatListView* mClassifiedsList;
LLPanelPickInfo* mPanelPickInfo;
+ LLPanelClassifiedInfo* mPanelClassifiedInfo;
+ LLPanelClassifiedEdit* mPanelClassifiedEdit;
LLPanelPickEdit* mPanelPickEdit;
LLToggleableMenu* mOverflowMenu;
+ LLToggleableMenu* mPlusMenu;
+
+ LLAccordionCtrlTab* mPicksAccTab;
+ LLAccordionCtrlTab* mClassifiedsAccTab;
+
+ LLClassifiedClickThrough* mClickThroughDisp;
};
class LLPickItem : public LLPanel, public LLAvatarPropertiesObserver
@@ -189,4 +225,48 @@ protected:
std::string mSimName;
};
+class LLClassifiedItem : public LLPanel, public LLAvatarPropertiesObserver
+{
+public:
+
+ LLClassifiedItem(const LLUUID& avatar_id, const LLUUID& classified_id);
+
+ virtual ~LLClassifiedItem();
+
+ /*virtual*/ void processProperties(void* data, EAvatarProcessorType type);
+
+ /*virtual*/ BOOL postBuild();
+
+ /*virtual*/ void setValue(const LLSD& value);
+
+ LLUUID getAvatarId() {return mAvatarId;}
+
+ void setAvatarId(const LLUUID& avatar_id) {mAvatarId = avatar_id;}
+
+ LLUUID getClassifiedId() {return mClassifiedId;}
+
+ void setClassifiedId(const LLUUID& classified_id) {mClassifiedId = classified_id;}
+
+ void setPosGlobal(const LLVector3d& pos) { mPosGlobal = pos; }
+
+ const LLVector3d& getPosGlobal() { return mPosGlobal; }
+
+ void setClassifiedName (const std::string& name);
+
+ std::string getClassifiedName() { return childGetValue("name").asString(); }
+
+ void setDescription(const std::string& desc);
+
+ std::string getDescription() { return childGetValue("description").asString(); }
+
+ void setSnapshotId(const LLUUID& snapshot_id);
+
+ LLUUID getSnapshotId();
+
+private:
+ LLUUID mAvatarId;
+ LLUUID mClassifiedId;
+ LLVector3d mPosGlobal;
+};
+
#endif // LL_LLPANELPICKS_H
diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp
index c600651015..963d39de8a 100644
--- a/indra/newview/llpanelplaceinfo.cpp
+++ b/indra/newview/llpanelplaceinfo.cpp
@@ -40,7 +40,7 @@
#include "llsdutil_math.h"
-#include "llscrollcontainer.h"
+#include "lliconctrl.h"
#include "lltextbox.h"
#include "llagent.h"
@@ -57,8 +57,7 @@ LLPanelPlaceInfo::LLPanelPlaceInfo()
: LLPanel(),
mParcelID(),
mRequestedID(),
- mPosRegion(),
- mMinHeight(0)
+ mPosRegion()
{}
//virtual
@@ -81,12 +80,9 @@ BOOL LLPanelPlaceInfo::postBuild()
mParcelName = getChild<LLTextBox>("parcel_title");
mDescEditor = getChild<LLExpandableTextBox>("description");
+ mMaturityRatingIcon = getChild<LLIconCtrl>("maturity_icon");
mMaturityRatingText = getChild<LLTextBox>("maturity_value");
- LLScrollContainer* scroll_container = getChild<LLScrollContainer>("place_scroll");
- scroll_container->setBorderVisible(FALSE);
- mMinHeight = scroll_container->getScrolledViewRect().getHeight();
-
return TRUE;
}
@@ -98,6 +94,7 @@ void LLPanelPlaceInfo::resetLocation()
mPosRegion.clearVec();
std::string not_available = getString("not_available");
+ mMaturityRatingIcon->setValue(not_available);
mMaturityRatingText->setValue(not_available);
mRegionName->setText(not_available);
mParcelName->setText(not_available);
@@ -204,20 +201,6 @@ void LLPanelPlaceInfo::processParcelInfo(const LLParcelData& parcel_data)
mDescEditor->setText(parcel_data.desc);
}
- // HACK: Flag 0x2 == adult region,
- // Flag 0x1 == mature region, otherwise assume PG
- std::string rating = LLViewerRegion::accessToString(SIM_ACCESS_PG);
- if (parcel_data.flags & 0x2)
- {
- rating = LLViewerRegion::accessToString(SIM_ACCESS_ADULT);
- }
- else if (parcel_data.flags & 0x1)
- {
- rating = LLViewerRegion::accessToString(SIM_ACCESS_MATURE);
- }
-
- mMaturityRatingText->setValue(rating);
-
S32 region_x;
S32 region_y;
S32 region_z;
diff --git a/indra/newview/llpanelplaceinfo.h b/indra/newview/llpanelplaceinfo.h
index ec30397cff..133933a880 100644
--- a/indra/newview/llpanelplaceinfo.h
+++ b/indra/newview/llpanelplaceinfo.h
@@ -41,6 +41,7 @@
#include "llremoteparcelrequest.h"
class LLExpandableTextBox;
+class LLIconCtrl;
class LLInventoryItem;
class LLPanelPickEdit;
class LLParcel;
@@ -109,7 +110,6 @@ protected:
LLUUID mRequestedID;
LLVector3 mPosRegion;
std::string mCurrentTitle;
- S32 mMinHeight;
INFO_TYPE mInfoType;
LLTextBox* mTitle;
@@ -117,6 +117,7 @@ protected:
LLTextBox* mRegionName;
LLTextBox* mParcelName;
LLExpandableTextBox* mDescEditor;
+ LLIconCtrl* mMaturityRatingIcon;
LLTextBox* mMaturityRatingText;
};
diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp
index 2a9ba4697d..61501cc1b1 100644
--- a/indra/newview/llpanelplaceprofile.cpp
+++ b/indra/newview/llpanelplaceprofile.cpp
@@ -97,7 +97,6 @@ BOOL LLPanelPlaceProfile::postBuild()
setMouseDownCallback(boost::bind(&LLPanelPlaceProfile::onForSaleBannerClick, this));
mParcelOwner = getChild<LLTextBox>("owner_value");
- mLastVisited = getChild<LLTextBox>("last_visited_value");
mParcelRatingIcon = getChild<LLIconCtrl>("rating_icon");
mParcelRatingText = getChild<LLTextBox>("rating_value");
@@ -165,7 +164,6 @@ void LLPanelPlaceProfile::resetLocation()
std::string not_available = getString("not_available");
mParcelOwner->setValue(not_available);
- mLastVisited->setValue(not_available);
mParcelRatingIcon->setValue(not_available);
mParcelRatingText->setText(not_available);
@@ -209,17 +207,13 @@ void LLPanelPlaceProfile::resetLocation()
void LLPanelPlaceProfile::setInfoType(INFO_TYPE type)
{
bool is_info_type_agent = type == AGENT;
- bool is_info_type_teleport_history = type == TELEPORT_HISTORY;
- getChild<LLTextBox>("maturity_label")->setVisible(!is_info_type_agent);
+ mMaturityRatingIcon->setVisible(!is_info_type_agent);
mMaturityRatingText->setVisible(!is_info_type_agent);
getChild<LLTextBox>("owner_label")->setVisible(is_info_type_agent);
mParcelOwner->setVisible(is_info_type_agent);
- getChild<LLTextBox>("last_visited_label")->setVisible(is_info_type_teleport_history);
- mLastVisited->setVisible(is_info_type_teleport_history);
-
getChild<LLAccordionCtrl>("advanced_info_accordion")->setVisible(is_info_type_agent);
switch(type)
@@ -238,6 +232,30 @@ void LLPanelPlaceProfile::setInfoType(INFO_TYPE type)
LLPanelPlaceInfo::setInfoType(type);
}
+// virtual
+void LLPanelPlaceProfile::processParcelInfo(const LLParcelData& parcel_data)
+{
+ LLPanelPlaceInfo::processParcelInfo(parcel_data);
+
+ // HACK: Flag 0x2 == adult region,
+ // Flag 0x1 == mature region, otherwise assume PG
+ if (parcel_data.flags & 0x2)
+ {
+ mMaturityRatingIcon->setValue(icon_r);
+ mMaturityRatingText->setText(LLViewerRegion::accessToString(SIM_ACCESS_ADULT));
+ }
+ else if (parcel_data.flags & 0x1)
+ {
+ mMaturityRatingIcon->setValue(icon_m);
+ mMaturityRatingText->setText(LLViewerRegion::accessToString(SIM_ACCESS_MATURE));
+ }
+ else
+ {
+ mMaturityRatingIcon->setValue(icon_pg);
+ mMaturityRatingText->setText(LLViewerRegion::accessToString(SIM_ACCESS_PG));
+ }
+}
+
void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel,
LLViewerRegion* region,
const LLVector3d& pos_global,
@@ -521,22 +539,6 @@ void LLPanelPlaceProfile::updateCovenantText(const std::string &text)
mCovenantText->setText(text);
}
-void LLPanelPlaceProfile::updateLastVisitedText(const LLDate &date)
-{
- if (date.isNull())
- {
- mLastVisited->setText(getString("unknown"));
- }
- else
- {
- std::string timeStr = getString("acquired_date");
- LLSD substitution;
- substitution["datetime"] = (S32) date.secondsSinceEpoch();
- LLStringUtil::format (timeStr, substitution);
- mLastVisited->setText(timeStr);
- }
-}
-
void LLPanelPlaceProfile::onForSaleBannerClick()
{
LLViewerParcelMgr* mgr = LLViewerParcelMgr::getInstance();
diff --git a/indra/newview/llpanelplaceprofile.h b/indra/newview/llpanelplaceprofile.h
index b3ef4acf51..8c30ca92fb 100644
--- a/indra/newview/llpanelplaceprofile.h
+++ b/indra/newview/llpanelplaceprofile.h
@@ -50,6 +50,8 @@ public:
/*virtual*/ void setInfoType(INFO_TYPE type);
+ /*virtual*/ void processParcelInfo(const LLParcelData& parcel_data);
+
// Displays information about the currently selected parcel
// without sending a request to the server.
// If is_current_parcel true shows "You Are Here" banner.
@@ -61,7 +63,6 @@ public:
void updateEstateName(const std::string& name);
void updateEstateOwnerName(const std::string& name);
void updateCovenantText(const std::string &text);
- void updateLastVisitedText(const LLDate &date);
private:
void onForSaleBannerClick();
@@ -78,7 +79,6 @@ private:
LLPanel* mYouAreHerePanel;
LLTextBox* mParcelOwner;
- LLTextBox* mLastVisited;
LLIconCtrl* mParcelRatingIcon;
LLTextBox* mParcelRatingText;
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index 8d117afcfe..3d0fba9426 100644
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -293,7 +293,6 @@ void LLPanelPlaces::onOpen(const LLSD& key)
mPosGlobal = hist_items[index].mGlobalPos;
mPlaceProfile->setInfoType(LLPanelPlaceInfo::TELEPORT_HISTORY);
- mPlaceProfile->updateLastVisitedText(hist_items[index].mDate);
mPlaceProfile->displayParcelInfo(LLUUID(), mPosGlobal);
}
diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp
index 73e19b3b2a..5c3c260549 100644
--- a/indra/newview/llpanelprimmediacontrols.cpp
+++ b/indra/newview/llpanelprimmediacontrols.cpp
@@ -561,12 +561,12 @@ void LLPanelPrimMediaControls::updateShape()
}
LLCoordGL screen_min;
- screen_min.mX = llround((F32)gViewerWindow->getWorldViewWidth() * (min.mV[VX] + 1.f) * 0.5f);
- screen_min.mY = llround((F32)gViewerWindow->getWorldViewHeight() * (min.mV[VY] + 1.f) * 0.5f);
+ screen_min.mX = llround((F32)gViewerWindow->getWorldViewWidthRaw() * (min.mV[VX] + 1.f) * 0.5f);
+ screen_min.mY = llround((F32)gViewerWindow->getWorldViewHeightRaw() * (min.mV[VY] + 1.f) * 0.5f);
LLCoordGL screen_max;
- screen_max.mX = llround((F32)gViewerWindow->getWorldViewWidth() * (max.mV[VX] + 1.f) * 0.5f);
- screen_max.mY = llround((F32)gViewerWindow->getWorldViewHeight() * (max.mV[VY] + 1.f) * 0.5f);
+ screen_max.mX = llround((F32)gViewerWindow->getWorldViewWidthRaw() * (max.mV[VX] + 1.f) * 0.5f);
+ screen_max.mY = llround((F32)gViewerWindow->getWorldViewHeightRaw() * (max.mV[VY] + 1.f) * 0.5f);
// grow panel so that screenspace bounding box fits inside "media_region" element of HUD
LLRect media_controls_rect;
@@ -697,6 +697,7 @@ bool LLPanelPrimMediaControls::isMouseOver()
LLView* controls_view = NULL;
controls_view = getChild<LLView>("media_controls");
+ //FIXME: rewrite as LLViewQuery or get hover set from LLViewerWindow?
if(controls_view && controls_view->getVisible())
{
controls_view->screenPointToLocal(cursor_pos_gl.mX, cursor_pos_gl.mY, &x, &y);
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index 8147ff17f0..02f45c1b48 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -243,5 +243,6 @@ void LLPanelProfile::notifyParent(const LLSD& info)
onOpen(info);
return;
}
+
LLPanel::notifyParent(info);
}
diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp
index 72856d5b82..057cdde6f0 100644
--- a/indra/newview/llpanelteleporthistory.cpp
+++ b/indra/newview/llpanelteleporthistory.cpp
@@ -163,7 +163,6 @@ void LLTeleportHistoryPanel::ContextMenu::show(LLView* spawning_view, S32 index,
if (parent)
{
parent->removeChild(mMenu);
- mMenu->setParent(NULL);
}
delete mMenu;
}
@@ -658,7 +657,6 @@ void LLTeleportHistoryPanel::onAccordionTabRightClick(LLView *view, S32 x, S32 y
if (parent)
{
parent->removeChild(mAccordionTabMenu);
- mAccordionTabMenu->setParent(NULL);
}
delete mAccordionTabMenu;
}
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index 2be0781487..f5367c0477 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -36,10 +36,12 @@
#include "lltrans.h"
#include "llavataractions.h"
#include "llagent.h"
+#include "llimview.h"
#include "llparticipantlist.h"
#include "llavatarlist.h"
#include "llspeakers.h"
+#include "llviewermenu.h"
//LLParticipantList retrieves add, clear and remove events and updates view accordingly
#if LL_MSVC
@@ -64,6 +66,9 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* av
mAvatarList->setDoubleClickCallback(boost::bind(&LLParticipantList::onAvatarListDoubleClicked, this, mAvatarList));
mAvatarList->setRefreshCompleteCallback(boost::bind(&LLParticipantList::onAvatarListRefreshed, this, _1, _2));
+ mParticipantListMenu = new LLParticipantListMenu(*this);
+ mAvatarList->setContextMenu(mParticipantListMenu);
+
//Lets fill avatarList with existing speakers
LLAvatarList::uuid_vector_t& group_members = mAvatarList->getIDs();
@@ -83,8 +88,15 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* av
LLParticipantList::~LLParticipantList()
{
+ delete mParticipantListMenu;
+ mParticipantListMenu = NULL;
}
+void LLParticipantList::setSpeakingIndicatorsVisible(BOOL visible)
+{
+ mAvatarList->setSpeakingIndicatorsVisible(visible);
+};
+
void LLParticipantList::onAvatarListDoubleClicked(LLAvatarList* list)
{
LLUUID clicked_id = list->getSelectedUUID();
@@ -265,3 +277,139 @@ bool LLParticipantList::SpeakerModeratorUpdateListener::handleEvent(LLPointer<LL
{
return mParent.onModeratorUpdateEvent(event, userdata);
}
+
+LLContextMenu* LLParticipantList::LLParticipantListMenu::createMenu()
+{
+ // set up the callbacks for all of the avatar menu items
+ LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
+ LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar;
+
+ registrar.add("ParticipantList.ToggleAllowTextChat", boost::bind(&LLParticipantList::LLParticipantListMenu::toggleAllowTextChat, this, _2));
+ registrar.add("ParticipantList.ToggleMuteText", boost::bind(&LLParticipantList::LLParticipantListMenu::toggleMuteText, this, _2));
+
+ enable_registrar.add("ParticipantList.EnableItem", boost::bind(&LLParticipantList::LLParticipantListMenu::enableContextMenuItem, this, _2));
+ enable_registrar.add("ParticipantList.CheckItem", boost::bind(&LLParticipantList::LLParticipantListMenu::checkContextMenuItem, this, _2));
+
+ // create the context menu from the XUI
+ return LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>(
+ "menu_participant_list.xml", LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance());
+}
+
+void LLParticipantList::LLParticipantListMenu::toggleAllowTextChat(const LLSD& userdata)
+{
+ const LLUUID speaker_id = mUUIDs.front();
+
+ std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest");
+ LLSD data;
+ data["method"] = "mute update";
+ data["session-id"] = mParent.mSpeakerMgr->getSessionID();
+ data["params"] = LLSD::emptyMap();
+ data["params"]["agent_id"] = speaker_id;
+ data["params"]["mute_info"] = LLSD::emptyMap();
+ //current value represents ability to type, so invert
+ data["params"]["mute_info"]["text"] = !mParent.mSpeakerMgr->findSpeaker(speaker_id)->mModeratorMutedText;
+
+ class MuteTextResponder : public LLHTTPClient::Responder
+ {
+ public:
+ MuteTextResponder(const LLUUID& session_id)
+ {
+ mSessionID = session_id;
+ }
+
+ virtual void error(U32 status, const std::string& reason)
+ {
+ llwarns << status << ": " << reason << llendl;
+
+ if ( gIMMgr )
+ {
+ //403 == you're not a mod
+ //should be disabled if you're not a moderator
+ if ( 403 == status )
+ {
+ gIMMgr->showSessionEventError(
+ "mute",
+ "not_a_moderator",
+ mSessionID);
+ }
+ else
+ {
+ gIMMgr->showSessionEventError(
+ "mute",
+ "generic",
+ mSessionID);
+ }
+ }
+ }
+
+ private:
+ LLUUID mSessionID;
+ };
+
+ LLHTTPClient::post(
+ url,
+ data,
+ new MuteTextResponder(mParent.mSpeakerMgr->getSessionID()));
+}
+
+void LLParticipantList::LLParticipantListMenu::toggleMuteText(const LLSD& userdata)
+{
+ const LLUUID speaker_id = mUUIDs.front();
+ BOOL is_muted = LLMuteList::getInstance()->isMuted(speaker_id, LLMute::flagTextChat);
+ std::string name;
+
+ //fill in name using voice client's copy of name cache
+ LLPointer<LLSpeaker> speakerp = mParent.mSpeakerMgr->findSpeaker(speaker_id);
+ if (speakerp.isNull())
+ {
+ return;
+ }
+
+ name = speakerp->mDisplayName;
+
+ LLMute mute(speaker_id, name, speakerp->mType == LLSpeaker::SPEAKER_AGENT ? LLMute::AGENT : LLMute::OBJECT);
+
+ if (!is_muted)
+ {
+ LLMuteList::getInstance()->add(mute, LLMute::flagTextChat);
+ }
+ else
+ {
+ LLMuteList::getInstance()->remove(mute, LLMute::flagTextChat);
+ }
+}
+
+bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD& userdata)
+{
+ std::string item = userdata.asString();
+ if (item == "can_mute_text")
+ {
+ return mUUIDs.front() != gAgentID;
+ }
+ else
+ if (item == "can_allow_text_chat")
+ {
+ LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(mParent.mSpeakerMgr->getSessionID());
+ return im_session->mType == IM_SESSION_GROUP_START && mParent.mSpeakerMgr->findSpeaker(gAgentID)->mIsModerator;
+ }
+ return true;
+}
+
+bool LLParticipantList::LLParticipantListMenu::checkContextMenuItem(const LLSD& userdata)
+{
+ std::string item = userdata.asString();
+ const LLUUID& id = mUUIDs.front();
+ if (item == "is_muted")
+ return LLMuteList::getInstance()->isMuted(id, LLMute::flagTextChat);
+ else
+ if (item == "is_allowed_text_chat")
+ {
+ LLPointer<LLSpeaker> selected_speakerp = mParent.mSpeakerMgr->findSpeaker(id);
+
+ if (selected_speakerp.notNull())
+ {
+ return !selected_speakerp->mModeratorMutedText;
+ }
+ }
+ return false;
+}
diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h
index fc34dd308b..5e26c39fc8 100644
--- a/indra/newview/llparticipantlist.h
+++ b/indra/newview/llparticipantlist.h
@@ -32,6 +32,8 @@
#include "llviewerprecompiledheaders.h"
#include "llevent.h"
+#include "llpanelpeoplemenus.h"
+#include "llimview.h"
class LLSpeakerMgr;
class LLAvatarList;
@@ -43,6 +45,7 @@ class LLParticipantList
public:
LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list);
~LLParticipantList();
+ void setSpeakingIndicatorsVisible(BOOL visible);
typedef enum e_participant_sort_oder {
E_SORT_BY_NAME = 0,
@@ -105,6 +108,25 @@ class LLParticipantList
SpeakerModeratorUpdateListener(LLParticipantList& parent) : BaseSpeakerListner(parent) {}
/*virtual*/ bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata);
};
+
+ /**
+ * Menu used in the participant list.
+ */
+ class LLParticipantListMenu : public LLPanelPeopleMenus::ContextMenu
+ {
+ public:
+ LLParticipantListMenu(LLParticipantList& parent):mParent(parent){};
+ /*virtual*/ LLContextMenu* createMenu();
+ protected:
+ LLParticipantList& mParent;
+ private:
+ bool enableContextMenuItem(const LLSD& userdata);
+ bool checkContextMenuItem(const LLSD& userdata);
+
+ void toggleAllowTextChat(const LLSD& userdata);
+ void toggleMuteText(const LLSD& userdata);
+
+ };
private:
void onAvatarListDoubleClicked(LLAvatarList* list);
@@ -121,5 +143,7 @@ class LLParticipantList
LLPointer<SpeakerClearListener> mSpeakerClearListener;
LLPointer<SpeakerModeratorUpdateListener> mSpeakerModeratorListener;
+ LLParticipantListMenu* mParticipantListMenu;
+
EParticipantSortOrder mSortOrder;
};
diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp
index 34e78b5c46..c95882931b 100644
--- a/indra/newview/llpreview.cpp
+++ b/indra/newview/llpreview.cpp
@@ -454,7 +454,7 @@ LLMultiPreview::LLMultiPreview()
{
// start with a rect in the top-left corner ; will get resized
LLRect rect;
- rect.setLeftTopAndSize(0, gViewerWindow->getWindowHeight(), 200, 200);
+ rect.setLeftTopAndSize(0, gViewerWindow->getWindowHeightScaled(), 200, 200);
setRect(rect);
}
setTitle(LLTrans::getString("MultiPreviewTitle"));
diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp
index 3eab13fc4a..13d02b7dec 100644
--- a/indra/newview/llpreviewtexture.cpp
+++ b/indra/newview/llpreviewtexture.cpp
@@ -394,8 +394,8 @@ void LLPreviewTexture::updateDimensions()
S32 client_height = image_height;
S32 horiz_pad = 2 * (LLPANEL_BORDER_WIDTH + PREVIEW_PAD) + PREVIEW_RESIZE_HANDLE_SIZE;
S32 vert_pad = PREVIEW_HEADER_SIZE + 2 * CLIENT_RECT_VPAD + LLPANEL_BORDER_WIDTH;
- S32 max_client_width = gViewerWindow->getWindowWidth() - horiz_pad;
- S32 max_client_height = gViewerWindow->getWindowHeight() - vert_pad;
+ S32 max_client_width = gViewerWindow->getWindowWidthScaled() - horiz_pad;
+ S32 max_client_height = gViewerWindow->getWindowHeightScaled() - vert_pad;
if (mAspectRatio > 0.f)
{
diff --git a/indra/newview/llrecentpeople.cpp b/indra/newview/llrecentpeople.cpp
index b491c7e109..bd46b5b56a 100644
--- a/indra/newview/llrecentpeople.cpp
+++ b/indra/newview/llrecentpeople.cpp
@@ -33,6 +33,7 @@
#include "llviewerprecompiledheaders.h"
#include "llrecentpeople.h"
+#include "llgroupmgr.h"
#include "llagent.h"
@@ -43,12 +44,18 @@ bool LLRecentPeople::add(const LLUUID& id)
if (id == gAgent.getID())
return false;
- LLDate date_added = LLDate::now();
+ bool is_not_group_id = LLGroupMgr::getInstance()->getGroupData(id) == NULL;
- //[] instead of insert to replace existing id->date with new date value
- mPeople[id] = date_added;
- mChangedSignal();
- return true;
+ if (is_not_group_id)
+ {
+ LLDate date_added = LLDate::now();
+
+ //[] instead of insert to replace existing id->date with new date value
+ mPeople[id] = date_added;
+ mChangedSignal();
+ }
+
+ return is_not_group_id;
}
bool LLRecentPeople::contains(const LLUUID& id) const
diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index e4dbcbd219..b667fbf5fd 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -103,8 +103,8 @@ void LLScreenChannelBase::updatePositionAndSize(LLRect old_world_rect, LLRect ne
void LLScreenChannelBase::init(S32 channel_left, S32 channel_right)
{
- S32 channel_top = gViewerWindow->getWorldViewRect().getHeight();
- S32 channel_bottom = gViewerWindow->getWorldViewRect().mBottom + gSavedSettings.getS32("ChannelBottomPanelMargin");
+ S32 channel_top = gViewerWindow->getWorldViewRectRaw().getHeight();
+ S32 channel_bottom = gViewerWindow->getWorldViewRectRaw().mBottom + gSavedSettings.getS32("ChannelBottomPanelMargin");
setRect(LLRect(channel_left, channel_top, channel_right, channel_bottom));
setVisible(TRUE);
}
@@ -706,7 +706,7 @@ void LLScreenChannel::updateShowToastsState()
// for Message Well floater showed in a docked state - adjust channel's height
if(dynamic_cast<LLSysWellWindow*>(floater))
{
- S32 channel_bottom = gViewerWindow->getWorldViewRect().mBottom + gSavedSettings.getS32("ChannelBottomPanelMargin");;
+ S32 channel_bottom = gViewerWindow->getWorldViewRectRaw().mBottom + gSavedSettings.getS32("ChannelBottomPanelMargin");;
LLRect this_rect = getRect();
if(floater->getVisible() && floater->isDocked())
{
diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp
index a11ee05532..3d0b4de88a 100644
--- a/indra/newview/llsidetray.cpp
+++ b/indra/newview/llsidetray.cpp
@@ -100,7 +100,7 @@ LLSideTray* LLSideTray::getInstance()
{
if (!sInstance)
{
- sInstance = LLUICtrlFactory::createFromFile<LLSideTray>("panel_side_tray.xml",gViewerWindow->getRootView(), LLRootView::child_registry_t::instance());
+ sInstance = LLUICtrlFactory::createFromFile<LLSideTray>("panel_side_tray.xml",NULL, LLRootView::child_registry_t::instance());
}
return sInstance;
@@ -148,7 +148,6 @@ public:
/*virtual*/ bool addChild (LLView* view, S32 tab_group);
- void arrange (S32 width, S32 height);
void reshape (S32 width, S32 height, BOOL called_from_parent = TRUE);
static LLSideTrayTab* createInstance ();
@@ -156,8 +155,6 @@ public:
const std::string& getDescription () const { return mDescription;}
const std::string& getTabTitle() const { return mTabTitle;}
- void draw();
-
void onOpen (const LLSD& key);
private:
@@ -209,60 +206,24 @@ BOOL LLSideTrayTab::postBuild()
static const S32 splitter_margin = 1;
-//virtual
-void LLSideTrayTab::arrange(S32 width, S32 height )
-{
- if(!mMainPanel)
- return;
-
- S32 offset = 0;
-
- LLView* title_panel = findChildView(TAB_PANEL_CAPTION_NAME, true);
-
- if(title_panel)
- {
- title_panel->setOrigin( 0, height - title_panel->getRect().getHeight() );
- offset = title_panel->getRect().getHeight();
- }
-
- LLRect sRect = mMainPanel->getRect();
- sRect.setLeftTopAndSize( splitter_margin, height - offset - splitter_margin, width - 2*splitter_margin, height - offset - 2*splitter_margin);
- mMainPanel->reshape(sRect.getWidth(),sRect.getHeight());
- mMainPanel->setRect(sRect);
-
-
-
-}
-
void LLSideTrayTab::reshape (S32 width, S32 height, BOOL called_from_parent )
{
- if(!mMainPanel)
- return;
- S32 offset = 0;
-
+ LLPanel::reshape(width, height, called_from_parent);
LLView* title_panel = findChildView(TAB_PANEL_CAPTION_NAME, true);
-
- if(title_panel)
+ if (!title_panel)
{
- title_panel->setOrigin( 0, height - title_panel->getRect().getHeight() );
- title_panel->reshape(width,title_panel->getRect().getHeight());
- offset = title_panel->getRect().getHeight();
+ // not fully constructed yet
+ return;
}
-
-
- LLRect sRect = mMainPanel->getRect();
- sRect.setLeftTopAndSize( splitter_margin, height - offset - splitter_margin, width - 2*splitter_margin, height - offset - 2*splitter_margin);
- //mMainPanel->setMaxWidth(sRect.getWidth());
- mMainPanel->reshape(sRect.getWidth(), sRect.getHeight());
-
- mMainPanel->setRect(sRect);
+ S32 title_height = title_panel->getRect().getHeight();
+ title_panel->setOrigin( 0, height - title_height );
+ title_panel->reshape(width,title_height);
-}
-
-void LLSideTrayTab::draw()
-{
- LLPanel::draw();
+ LLRect sRect;
+ sRect.setLeftTopAndSize( splitter_margin, height - title_height - splitter_margin,
+ width - 2*splitter_margin, height - title_height - 2*splitter_margin);
+ mMainPanel->setShape(sRect);
}
void LLSideTrayTab::onOpen (const LLSD& key)
@@ -300,17 +261,20 @@ LLSideTray::LLSideTray(Params& params)
,mActiveTab(0)
,mCollapsed(false)
,mCollapseButton(0)
- ,mMaxBarWidth(params.rect.width)
{
mCollapsed=params.collapsed;
-
LLUICtrl::CommitCallbackRegistry::Registrar& commit = LLUICtrl::CommitCallbackRegistry::currentRegistrar();
// register handler function to process data from the xml.
// panel_name should be specified via "parameter" attribute.
commit.add("SideTray.ShowPanel", boost::bind(&LLSideTray::showPanel, this, _2, LLUUID::null));
LLTransientFloaterMgr::getInstance()->addControlView(this);
+
+ LLPanel::Params p;
+ p.name = "buttons_panel";
+ p.mouse_opaque = false;
+ mButtonsPanel = LLUICtrlFactory::create<LLPanel>(p);
}
@@ -399,7 +363,7 @@ LLButton* LLSideTray::createButton (const std::string& name,const std::string& i
rect.setOriginAndSize(0, 0, sidetray_params.default_button_width, sidetray_params.default_button_height);
bparams.name(name);
- bparams.follows.flags (FOLLOWS_LEFT | FOLLOWS_BOTTOM);
+ bparams.follows.flags (FOLLOWS_LEFT | FOLLOWS_TOP);
bparams.rect (rect);
bparams.tab_stop(false);
bparams.image_unselected.name(sidetray_params.tab_btn_image_normal);
@@ -416,7 +380,7 @@ LLButton* LLSideTray::createButton (const std::string& name,const std::string& i
button->setImageOverlay(image);
}
- addChildInBack(button);
+ mButtonsPanel->addChildInBack(button);
return button;
}
@@ -460,16 +424,51 @@ void LLSideTray::createButtons ()
}
}
+void LLSideTray::processTriState ()
+{
+ if(mCollapsed)
+ expandSideBar();
+ else
+ {
+ //!!!!!!!!!!!!!!!!!
+ //** HARDCODED!!!!!
+ //!!!!!!!!!!!!!!!!!
+
+ //there is no common way to determine "default" panel for tab
+ //so default panels for now will be hardcoded
+
+ //hardcoded for people tab and profile tab
+
+ /*if(mActiveTab == getTab("sidebar_people"))
+ {
+ LLSideTrayPanelContainer* container = findChild<LLSideTrayPanelContainer>("panel_container");
+ if(container && container->getCurrentPanelIndex()>0)
+ {
+ container->onOpen(LLSD().insert("sub_panel_name","panel_people"));
+ }
+ else
+ collapseSideBar();
+ }
+ else if(mActiveTab == getTab("sidebar_me"))
+ {
+ LLTabContainer* tab_container = findChild<LLTabContainer>("tabs");
+ if(tab_container && tab_container->getCurrentPanelIndex()>0)
+ tab_container->selectFirstTab();
+ else
+ collapseSideBar();
+ }
+ else*/
+ collapseSideBar();
+ }
+}
+
void LLSideTray::onTabButtonClick(string name)
{
LLSideTrayTab* side_bar = getTab(name);
if(side_bar == mActiveTab)
{
- if(mCollapsed)
- expandSideBar();
- else
- collapseSideBar();
+ processTriState ();
return;
}
selectTabByName (name);
@@ -491,7 +490,7 @@ void LLSideTray::onToggleCollapse()
void LLSideTray::reflectCollapseChange()
{
- setPanelRect();
+ updateSidetrayVisibility();
if(mCollapsed)
{
@@ -500,23 +499,24 @@ void LLSideTray::reflectCollapseChange()
}
else
{
- gFloaterView->setSnapOffsetRight(mMaxBarWidth);
+ gFloaterView->setSnapOffsetRight(getRect().getWidth());
setFocus(TRUE);
}
gFloaterView->refresh();
}
-void LLSideTray::arrange ()
+void LLSideTray::arrange()
{
static LLSideTray::Params sidetray_params(LLUICtrlFactory::getDefaultParams<LLSideTray>());
- setPanelRect();
+ updateSidetrayVisibility();
LLRect ctrl_rect;
- ctrl_rect.setLeftTopAndSize(0,getRect().getHeight()-sidetray_params.default_button_width
- ,sidetray_params.default_button_width
- ,sidetray_params.default_button_height);
+ ctrl_rect.setLeftTopAndSize(0,
+ mButtonsPanel->getRect().getHeight() - sidetray_params.default_button_width,
+ sidetray_params.default_button_width,
+ sidetray_params.default_button_height);
mCollapseButton->setRect(ctrl_rect);
@@ -528,9 +528,10 @@ void LLSideTray::arrange ()
{
LLSideTrayTab* sidebar_tab = *child_it;
- ctrl_rect.setLeftTopAndSize(0,getRect().getHeight()-offset
- ,sidetray_params.default_button_width
- ,sidetray_params.default_button_height);
+ ctrl_rect.setLeftTopAndSize(0,
+ mButtonsPanel->getRect().getHeight()-offset,
+ sidetray_params.default_button_width,
+ sidetray_params.default_button_height);
if(mTabButtons.find(sidebar_tab->getName()) == mTabButtons.end())
continue;
@@ -544,14 +545,11 @@ void LLSideTray::arrange ()
btn->setVisible(ctrl_rect.mBottom > 0);
}
- ctrl_rect.setLeftTopAndSize(sidetray_params.default_button_width,getRect().getHeight(),mMaxBarWidth,getRect().getHeight());
-
//arrange tabs
- for ( child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it)
+ for ( child_vector_t::iterator child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it)
{
LLSideTrayTab* sidebar_tab = *child_it;
- sidebar_tab->setRect(ctrl_rect);
- sidebar_tab->arrange(mMaxBarWidth,getRect().getHeight());
+ sidebar_tab->setShape(getLocalRect());
}
}
@@ -580,7 +578,7 @@ void LLSideTray::collapseSideBar()
{
mCollapseButton->setImageOverlay( home_tab->mImage );
}
- mActiveTab->setVisible(FALSE);
+ //mActiveTab->setVisible(FALSE);
reflectCollapseChange();
setFocus( FALSE );
@@ -596,7 +594,6 @@ void LLSideTray::expandSideBar()
}
LLSD key;//empty
mActiveTab->onOpen(key);
- mActiveTab->setVisible(TRUE);
reflectCollapseChange();
}
@@ -612,15 +609,6 @@ void LLSideTray::highlightFocused()
*/
}
-BOOL LLSideTray::handleScrollWheel(S32 x, S32 y, S32 mask)
-{
- BOOL ret = LLPanel::handleScrollWheel(x,y,mask);
-
- if(!ret && childFromPoint(x,y) != 0 )
- return TRUE;//mouse wheel over sidetray buttons, eat mouse wheel
- return ret;
-}
-
//virtual
BOOL LLSideTray::handleMouseDown (S32 x, S32 y, MASK mask)
{
@@ -630,58 +618,13 @@ BOOL LLSideTray::handleMouseDown (S32 x, S32 y, MASK mask)
return ret;
}
-void LLSideTray::reshape (S32 width, S32 height, BOOL called_from_parent)
+void LLSideTray::reshape(S32 width, S32 height, BOOL called_from_parent)
{
-
LLPanel::reshape(width, height, called_from_parent);
if(!mActiveTab)
return;
- static LLSideTray::Params sidetray_params(LLUICtrlFactory::getDefaultParams<LLSideTray>());
-
- setPanelRect();
-
- LLRect ctrl_rect;
- ctrl_rect.setLeftTopAndSize(0
- ,getRect().getHeight()-sidetray_params.default_button_width
- ,sidetray_params.default_button_width
- ,sidetray_params.default_button_height);
-
- mCollapseButton->setRect(ctrl_rect);
-
- //arrange tab buttons
- child_vector_const_iter_t child_it;
- int offset = (sidetray_params.default_button_height+sidetray_params.default_button_margin)*2;
- for ( child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it)
- {
- LLSideTrayTab* sidebar_tab = *child_it;
-
- ctrl_rect.setLeftTopAndSize(0,getRect().getHeight()-offset
- ,sidetray_params.default_button_width
- ,sidetray_params.default_button_height);
-
- if(mTabButtons.find(sidebar_tab->getName()) == mTabButtons.end())
- continue;
-
- LLButton* btn = mTabButtons[sidebar_tab->getName()];
-
- btn->setRect(ctrl_rect);
- offset+=sidetray_params.default_button_height;
- offset+=sidetray_params.default_button_margin;
-
- btn->setVisible(ctrl_rect.mBottom > 0);
- }
-
- //arrange tabs
-
- for ( child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it)
- {
- LLSideTrayTab* sidebar_tab = *child_it;
- sidebar_tab->reshape(mMaxBarWidth,getRect().getHeight());
- ctrl_rect.setLeftTopAndSize(sidetray_params.default_button_width,getRect().getHeight(),mMaxBarWidth,getRect().getHeight());
- sidebar_tab->setRect(ctrl_rect);
-
- }
+ arrange();
}
/**
@@ -729,42 +672,12 @@ LLPanel* LLSideTray::showPanel (const std::string& panel_name, const LLSD& para
static const S32 fake_offset = 132;
static const S32 fake_top_offset = 18;
-void LLSideTray::resetPanelRect ()
+void LLSideTray::updateSidetrayVisibility()
{
- const LLRect& parent_rect = gViewerWindow->getRootView()->getRect();
-
- static LLSideTray::Params sidetray_params(LLUICtrlFactory::getDefaultParams<LLSideTray>());
-
- S32 panel_width = sidetray_params.default_button_width;
- panel_width += mCollapsed ? 0 : mMaxBarWidth;
-
- S32 panel_height = parent_rect.getHeight()-fake_top_offset;
-
- reshape(panel_width,panel_height);
-}
-
-void LLSideTray::setPanelRect ()
-{
- LLNavigationBar* nav_bar = LLNavigationBar::getInstance();
- LLRect nav_rect = nav_bar->getRect();
-
- static LLSideTray::Params sidetray_params(LLUICtrlFactory::getDefaultParams<LLSideTray>());
-
- const LLRect& parent_rect = gViewerWindow->getRootView()->getRect();
-
- S32 panel_width = sidetray_params.default_button_width;
- panel_width += mCollapsed ? 0 : mMaxBarWidth;
-
- S32 panel_height = parent_rect.getHeight()-fake_top_offset - nav_rect.getHeight();
- S32 panel_top = parent_rect.mTop-fake_top_offset - nav_rect.getHeight();
-
- LLRect panel_rect;
- panel_rect.setLeftTopAndSize( parent_rect.mRight-panel_width, panel_top, panel_width, panel_height);
- setRect(panel_rect);
+ // set visibility of parent container based on collapsed state
+ if (getParent())
+ {
+ getParent()->setVisible(!mCollapsed);
+ }
}
-S32 LLSideTray::getTrayWidth()
-{
- static LLSideTray::Params sidetray_params(LLUICtrlFactory::getDefaultParams<LLSideTray>());
- return getRect().getWidth() - (sidetray_params.default_button_width + sidetray_params.default_button_margin);
-}
diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h
index b49251ec79..5bb17eedd5 100644
--- a/indra/newview/llsidetray.h
+++ b/indra/newview/llsidetray.h
@@ -118,6 +118,8 @@ public:
LLPanel::setVisible(visible);
}
+ LLPanel* getButtonsPanel() { return mButtonsPanel; }
+
public:
virtual ~LLSideTray(){};
@@ -129,12 +131,10 @@ public:
bool addChild (LLView* view, S32 tab_group);
BOOL handleMouseDown (S32 x, S32 y, MASK mask);
- BOOL handleScrollWheel(S32 x, S32 y, S32 mask);
void reshape (S32 width, S32 height, BOOL called_from_parent = TRUE);
- S32 getTrayWidth();
- void resetPanelRect ();
+ void processTriState ();
protected:
@@ -147,7 +147,7 @@ protected:
void toggleTabButton (LLSideTrayTab* tab);
- void setPanelRect ();
+ void updateSidetrayVisibility();
@@ -163,15 +163,15 @@ private:
private:
- std::map<std::string,LLButton*> mTabButtons;
+ LLPanel* mButtonsPanel;
+ typedef std::map<std::string,LLButton*> button_map_t;
+ button_map_t mTabButtons;
child_vector_t mTabs;
LLSideTrayTab* mActiveTab;
LLButton* mCollapseButton;
bool mCollapsed;
- S32 mMaxBarWidth;
-
static LLSideTray* sInstance;
};
diff --git a/indra/newview/llspeakbutton.cpp b/indra/newview/llspeakbutton.cpp
index d441762fa6..57ea018f25 100644
--- a/indra/newview/llspeakbutton.cpp
+++ b/indra/newview/llspeakbutton.cpp
@@ -129,6 +129,8 @@ LLSpeakButton::LLSpeakButton(const Params& p)
LLSpeakButton::~LLSpeakButton()
{
+ LLTransientFloaterMgr::getInstance()->removeControlView(mSpeakBtn);
+ LLTransientFloaterMgr::getInstance()->removeControlView(mShowBtn);
}
void LLSpeakButton::onMouseDown_SpeakBtn()
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 2c1f468f77..64dcd7b97f 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -1386,7 +1386,7 @@ bool idle_startup()
// Make sure agent knows correct aspect ratio
// FOV limits depend upon aspect ratio so this needs to happen before initializing the FOV below
- LLViewerCamera::getInstance()->setViewHeightInPixels(gViewerWindow->getWorldViewHeight());
+ LLViewerCamera::getInstance()->setViewHeightInPixels(gViewerWindow->getWorldViewHeightRaw());
LLViewerCamera::getInstance()->setAspect(gViewerWindow->getWorldViewAspectRatio());
// Initialize FOV
LLViewerCamera::getInstance()->setDefaultFOV(gSavedSettings.getF32("CameraAngle"));
@@ -2122,7 +2122,7 @@ void login_show()
BOOL bUseDebugLogin = TRUE;
#endif
- LLPanelLogin::show( gViewerWindow->getVirtualWindowRect(),
+ LLPanelLogin::show( gViewerWindow->getWindowRectScaled(),
bUseDebugLogin,
login_callback, NULL );
@@ -2478,7 +2478,7 @@ void register_viewer_callbacks(LLMessageSystem* msg)
msg->setHandlerFunc("AvatarPicksReply",
&LLAvatarPropertiesProcessor::processAvatarPicksReply);
msg->setHandlerFunc("AvatarClassifiedReply",
- &LLAvatarPropertiesProcessor::processAvatarClassifiedReply);
+ &LLAvatarPropertiesProcessor::processAvatarClassifiedsReply);
msg->setHandlerFuncFast(_PREHASH_CreateGroupReply,
LLGroupMgr::processCreateGroupReply);
@@ -2543,7 +2543,8 @@ void register_viewer_callbacks(LLMessageSystem* msg)
msg->setHandlerFunc("EventInfoReply", LLPanelEvent::processEventInfoReply);
msg->setHandlerFunc("PickInfoReply", &LLAvatarPropertiesProcessor::processPickInfoReply);
- msg->setHandlerFunc("ClassifiedInfoReply", LLPanelClassified::processClassifiedInfoReply);
+// msg->setHandlerFunc("ClassifiedInfoReply", LLPanelClassified::processClassifiedInfoReply);
+ msg->setHandlerFunc("ClassifiedInfoReply", LLAvatarPropertiesProcessor::processClassifiedInfoReply);
msg->setHandlerFunc("ParcelInfoReply", LLRemoteParcelInfoProcessor::processParcelInfoReply);
msg->setHandlerFunc("ScriptDialog", process_script_dialog);
msg->setHandlerFunc("LoadURL", process_load_url);
diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp
index 723ac0fc33..4422c4b672 100644
--- a/indra/newview/llsyswellwindow.cpp
+++ b/indra/newview/llsyswellwindow.cpp
@@ -238,7 +238,7 @@ void LLSysWellWindow::initChannel()
//---------------------------------------------------------------------------------
void LLSysWellWindow::getAllowedRect(LLRect& rect)
{
- rect = gViewerWindow->getWorldViewRect();
+ rect = gViewerWindow->getWorldViewRectRaw();
}
//---------------------------------------------------------------------------------
diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp
index 69a2d1d7a6..6a4b967487 100644
--- a/indra/newview/lltexturecache.cpp
+++ b/indra/newview/lltexturecache.cpp
@@ -1543,6 +1543,8 @@ bool LLTextureCache::readComplete(handle_t handle, bool abort)
handle_map_t::iterator iter = mReaders.find(handle);
llassert_always(iter != mReaders.end() || abort);
LLTextureCacheWorker* worker = iter->second;
+ if (!worker)
+ return false;
bool res = worker->complete();
if (res || abort)
{
diff --git a/indra/newview/lltoolbar.cpp b/indra/newview/lltoolbar.cpp
index 0572f9a698..268a18d2a2 100644
--- a/indra/newview/lltoolbar.cpp
+++ b/indra/newview/lltoolbar.cpp
@@ -206,7 +206,7 @@ void LLToolBar::layoutButtons()
{
#if LL_DARWIN
const S32 FUDGE_WIDTH_OF_SCREEN = 4;
- S32 width = gViewerWindow->getWindowWidth() + FUDGE_WIDTH_OF_SCREEN;
+ S32 width = gViewerWindow->getWindowWidthScaled() + FUDGE_WIDTH_OF_SCREEN;
S32 pad = 2;
// this function may be called before postBuild(), in which case mResizeHandle won't have been set up yet.
diff --git a/indra/newview/lltoolfocus.cpp b/indra/newview/lltoolfocus.cpp
index 9400840bdf..e2ccc05e30 100644
--- a/indra/newview/lltoolfocus.cpp
+++ b/indra/newview/lltoolfocus.cpp
@@ -365,7 +365,7 @@ BOOL LLToolCamera::handleHover(S32 x, S32 y, MASK mask)
// Orbit tool
if (hasMouseCapture())
{
- const F32 RADIANS_PER_PIXEL = 360.f * DEG_TO_RAD / gViewerWindow->getWorldViewWidth();
+ const F32 RADIANS_PER_PIXEL = 360.f * DEG_TO_RAD / gViewerWindow->getWorldViewWidthRaw();
if (dx != 0)
{
@@ -393,7 +393,7 @@ BOOL LLToolCamera::handleHover(S32 x, S32 y, MASK mask)
F32 dist = (F32) camera_to_focus.normVec();
// Fudge factor for pan
- F32 meters_per_pixel = 3.f * dist / gViewerWindow->getWorldViewWidth();
+ F32 meters_per_pixel = 3.f * dist / gViewerWindow->getWorldViewWidthRaw();
if (dx != 0)
{
@@ -415,7 +415,7 @@ BOOL LLToolCamera::handleHover(S32 x, S32 y, MASK mask)
if (hasMouseCapture())
{
- const F32 RADIANS_PER_PIXEL = 360.f * DEG_TO_RAD / gViewerWindow->getWorldViewWidth();
+ const F32 RADIANS_PER_PIXEL = 360.f * DEG_TO_RAD / gViewerWindow->getWorldViewWidthRaw();
if (dx != 0)
{
diff --git a/indra/newview/lltoolgrab.cpp b/indra/newview/lltoolgrab.cpp
index b7a97562bd..44fb6e9271 100644
--- a/indra/newview/lltoolgrab.cpp
+++ b/indra/newview/lltoolgrab.cpp
@@ -510,8 +510,8 @@ void LLToolGrab::handleHoverActive(S32 x, S32 y, MASK mask)
const F32 RADIANS_PER_PIXEL_X = 0.01f;
const F32 RADIANS_PER_PIXEL_Y = 0.01f;
- S32 dx = x - (gViewerWindow->getWorldViewWidth() / 2);
- S32 dy = y - (gViewerWindow->getWorldViewHeight() / 2);
+ S32 dx = x - (gViewerWindow->getWorldViewWidthRaw() / 2);
+ S32 dy = y - (gViewerWindow->getWorldViewHeightRaw() / 2);
if (dx != 0 || dy != 0)
{
@@ -631,10 +631,10 @@ void LLToolGrab::handleHoverActive(S32 x, S32 y, MASK mask)
// Handle auto-rotation at screen edge.
LLVector3 grab_pos_agent = gAgent.getPosAgentFromGlobal( grab_point_global );
- LLCoordGL grab_center_gl( gViewerWindow->getWorldViewWidth() / 2, gViewerWindow->getWorldViewHeight() / 2);
+ LLCoordGL grab_center_gl( gViewerWindow->getWorldViewWidthRaw() / 2, gViewerWindow->getWorldViewHeightRaw() / 2);
LLViewerCamera::getInstance()->projectPosAgentToScreen(grab_pos_agent, grab_center_gl);
- const S32 ROTATE_H_MARGIN = gViewerWindow->getWorldViewWidth() / 20;
+ const S32 ROTATE_H_MARGIN = gViewerWindow->getWorldViewWidthRaw() / 20;
const F32 ROTATE_ANGLE_PER_SECOND = 30.f * DEG_TO_RAD;
const F32 rotate_angle = ROTATE_ANGLE_PER_SECOND / gFPSClamped;
// ...build mode moves camera about focus point
@@ -649,7 +649,7 @@ void LLToolGrab::handleHoverActive(S32 x, S32 y, MASK mask)
gAgent.cameraOrbitAround(rotate_angle);
}
}
- else if (grab_center_gl.mX > gViewerWindow->getWorldViewWidth() - ROTATE_H_MARGIN)
+ else if (grab_center_gl.mX > gViewerWindow->getWorldViewWidthRaw() - ROTATE_H_MARGIN)
{
if (gAgent.getFocusOnAvatar())
{
@@ -662,7 +662,7 @@ void LLToolGrab::handleHoverActive(S32 x, S32 y, MASK mask)
}
// Don't move above top of screen or below bottom
- if ((grab_center_gl.mY < gViewerWindow->getWorldViewHeight() - 6)
+ if ((grab_center_gl.mY < gViewerWindow->getWorldViewHeightRaw() - 6)
&& (grab_center_gl.mY > 24))
{
// Transmit update to simulator
@@ -893,7 +893,7 @@ void LLToolGrab::handleHoverInactive(S32 x, S32 y, MASK mask)
gAgent.yaw(rotate_angle);
//gAgent.setControlFlags(AGENT_CONTROL_YAW_POS);
}
- else if (x == (gViewerWindow->getWorldViewWidth() - 1) )
+ else if (x == (gViewerWindow->getWorldViewWidthRaw() - 1) )
{
gAgent.yaw(-rotate_angle);
//gAgent.setControlFlags(AGENT_CONTROL_YAW_NEG);
diff --git a/indra/newview/lltoolgun.cpp b/indra/newview/lltoolgun.cpp
index 53d71a42cf..a441d653c7 100644
--- a/indra/newview/lltoolgun.cpp
+++ b/indra/newview/lltoolgun.cpp
@@ -140,7 +140,7 @@ void LLToolGun::draw()
{
LLUIImagePtr crosshair = LLUI::getUIImage("crosshairs.tga");
crosshair->draw(
- ( gViewerWindow->getVirtualWorldViewRect().getWidth() - crosshair->getWidth() ) / 2,
- ( gViewerWindow->getVirtualWorldViewRect().getHeight() - crosshair->getHeight() ) / 2);
+ ( gViewerWindow->getWorldViewRectScaled().getWidth() - crosshair->getWidth() ) / 2,
+ ( gViewerWindow->getWorldViewRectScaled().getHeight() - crosshair->getHeight() ) / 2);
}
}
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index 93da32b115..d49ea5109d 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -700,13 +700,17 @@ BOOL LLToolPie::handleToolTip(S32 local_x, S32 local_y, MASK mask)
// *HACK: We may select this object, so pretend it was clicked
mPick = mHoverPick;
- LLToolTipMgr::instance().show(LLToolTip::Params()
- .message(avatar_name)
- .image(LLUI::getUIImage("Info"))
- .click_callback(boost::bind(showAvatarInspector, hover_object->getID()))
- .visible_time_near(6.f)
- .visible_time_far(3.f)
- .wrap(false));
+ LLInspector::Params p;
+ p.message(avatar_name);
+ p.image(LLUI::getUIImage("Info"));
+ p.click_callback(boost::bind(showAvatarInspector, hover_object->getID()));
+ p.visible_time_near(6.f);
+ p.visible_time_far(3.f);
+ p.wrap(false);
+
+ p.fillFrom(LLUICtrlFactory::instance().getDefaultParams<LLInspector>());
+
+ LLToolTipMgr::instance().show(p);
}
}
else
@@ -787,18 +791,22 @@ BOOL LLToolPie::handleToolTip(S32 local_x, S32 local_y, MASK mask)
{
// We may select this object, so pretend it was clicked
mPick = mHoverPick;
- LLToolTipMgr::instance().show(LLToolTip::Params()
- .message(tooltip_msg)
- .image(LLUI::getUIImage("Info_Off"))
- .click_callback(boost::bind(showObjectInspector, hover_object->getID(), mHoverPick.mObjectFace))
- .time_based_media(is_time_based_media)
- .web_based_media(is_web_based_media)
- .media_playing(is_media_playing)
- .click_playmedia_callback(boost::bind(playCurrentMedia, mHoverPick))
- .click_homepage_callback(boost::bind(VisitHomePage, mHoverPick))
- .visible_time_near(6.f)
- .visible_time_far(3.f)
- .wrap(false));
+ LLInspector::Params p;
+ p.message(tooltip_msg);
+ p.image(LLUI::getUIImage("Info_Off"));
+ p.click_callback(boost::bind(showObjectInspector, hover_object->getID(), mHoverPick.mObjectFace));
+ p.time_based_media(is_time_based_media);
+ p.web_based_media(is_web_based_media);
+ p.media_playing(is_media_playing);
+ p.click_playmedia_callback(boost::bind(playCurrentMedia, mHoverPick));
+ p.click_homepage_callback(boost::bind(VisitHomePage, mHoverPick));
+ p.visible_time_near(6.f);
+ p.visible_time_far(3.f);
+ p.wrap(false);
+
+ p.fillFrom(LLUICtrlFactory::instance().getDefaultParams<LLInspector>());
+
+ LLToolTipMgr::instance().show(p);
}
}
}
diff --git a/indra/newview/llviewercamera.cpp b/indra/newview/llviewercamera.cpp
index b5709fa102..5566fea89f 100644
--- a/indra/newview/llviewercamera.cpp
+++ b/indra/newview/llviewercamera.cpp
@@ -401,10 +401,10 @@ void LLViewerCamera::setPerspective(BOOL for_selection,
if (for_selection && (width > 1 || height > 1))
{
- calculateFrustumPlanesFromWindow((F32)(x - width / 2) / (F32)gViewerWindow->getWindowWidth() - 0.5f,
- (F32)(y_from_bot - height / 2) / (F32)gViewerWindow->getWindowHeight() - 0.5f,
- (F32)(x + width / 2) / (F32)gViewerWindow->getWindowWidth() - 0.5f,
- (F32)(y_from_bot + height / 2) / (F32)gViewerWindow->getWindowHeight() - 0.5f);
+ calculateFrustumPlanesFromWindow((F32)(x - width / 2) / (F32)gViewerWindow->getWindowWidthScaled() - 0.5f,
+ (F32)(y_from_bot - height / 2) / (F32)gViewerWindow->getWindowHeightScaled() - 0.5f,
+ (F32)(x + width / 2) / (F32)gViewerWindow->getWindowWidthScaled() - 0.5f,
+ (F32)(y_from_bot + height / 2) / (F32)gViewerWindow->getWindowHeightScaled() - 0.5f);
}
@@ -469,7 +469,7 @@ BOOL LLViewerCamera::projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoord
}
}
- LLRect world_view_rect = gViewerWindow->getWorldViewRect();
+ LLRect world_view_rect = gViewerWindow->getWorldViewRectRaw();
S32 viewport[4];
viewport[0] = world_view_rect.mLeft;
viewport[1] = world_view_rect.mBottom;
@@ -485,7 +485,7 @@ BOOL LLViewerCamera::projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoord
y /= gViewerWindow->getDisplayScale().mV[VY];
// should now have the x,y coords of grab_point in screen space
- LLRect world_view_rect = gViewerWindow->getVirtualWorldViewRect();
+ LLRect world_view_rect = gViewerWindow->getWorldViewRectScaled();
// convert to pixel coordinates
S32 int_x = lltrunc(x);
@@ -572,7 +572,7 @@ BOOL LLViewerCamera::projectPosAgentToScreenEdge(const LLVector3 &pos_agent,
in_front = FALSE;
}
- LLRect world_view_rect = gViewerWindow->getWorldViewRect();
+ LLRect world_view_rect = gViewerWindow->getWorldViewRectRaw();
S32 viewport[4];
viewport[0] = world_view_rect.mLeft;
viewport[1] = world_view_rect.mBottom;
@@ -587,7 +587,7 @@ BOOL LLViewerCamera::projectPosAgentToScreenEdge(const LLVector3 &pos_agent,
x /= gViewerWindow->getDisplayScale().mV[VX];
y /= gViewerWindow->getDisplayScale().mV[VY];
// should now have the x,y coords of grab_point in screen space
- const LLRect& world_rect = gViewerWindow->getVirtualWorldViewRect();
+ const LLRect& world_rect = gViewerWindow->getWorldViewRectScaled();
// ...sanity check
S32 int_x = lltrunc(x);
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index e0bb8fedeb..5b733ed817 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -782,10 +782,10 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
// LLRect floater_rect = frontmost_floaterp->calcScreenRect();
// // deflate by one pixel so rounding errors don't occlude outside of floater extents
// floater_rect.stretch(-1);
- // LLRectf floater_3d_rect((F32)floater_rect.mLeft / (F32)gViewerWindow->getWindowWidth(),
- // (F32)floater_rect.mTop / (F32)gViewerWindow->getWindowHeight(),
- // (F32)floater_rect.mRight / (F32)gViewerWindow->getWindowWidth(),
- // (F32)floater_rect.mBottom / (F32)gViewerWindow->getWindowHeight());
+ // LLRectf floater_3d_rect((F32)floater_rect.mLeft / (F32)gViewerWindow->getWindowWidthScaled(),
+ // (F32)floater_rect.mTop / (F32)gViewerWindow->getWindowHeightScaled(),
+ // (F32)floater_rect.mRight / (F32)gViewerWindow->getWindowWidthScaled(),
+ // (F32)floater_rect.mBottom / (F32)gViewerWindow->getWindowHeightScaled());
// floater_3d_rect.translate(-0.5f, -0.5f);
// glTranslatef(0.f, 0.f, -LLViewerCamera::getInstance()->getNear());
// glScalef(LLViewerCamera::getInstance()->getNear() * LLViewerCamera::getInstance()->getAspect() / sinf(LLViewerCamera::getInstance()->getView()), LLViewerCamera::getInstance()->getNear() / sinf(LLViewerCamera::getInstance()->getView()), 1.f);
@@ -874,7 +874,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
/// and then display it again with compositor effects.
/// Using render to texture would be faster/better, but I don't have a
/// grasp of their full display stack just yet.
- // gPostProcess->apply(gViewerWindow->getWindowDisplayWidth(), gViewerWindow->getWindowDisplayHeight());
+ // gPostProcess->apply(gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw());
if (LLPipeline::sRenderDeferred && !LLPipeline::sUnderWaterRender)
{
@@ -1011,7 +1011,7 @@ void render_hud_attachments()
BOOL setup_hud_matrices()
{
- LLRect whole_screen = gViewerWindow->getVirtualWindowRect();
+ LLRect whole_screen = gViewerWindow->getWindowRectScaled();
// apply camera zoom transform (for high res screenshots)
F32 zoom_factor = LLViewerCamera::getInstance()->getZoomFactor();
@@ -1019,13 +1019,13 @@ BOOL setup_hud_matrices()
if (zoom_factor > 1.f)
{
S32 num_horizontal_tiles = llceil(zoom_factor);
- S32 tile_width = llround((F32)gViewerWindow->getWindowWidth() / zoom_factor);
- S32 tile_height = llround((F32)gViewerWindow->getWindowHeight() / zoom_factor);
+ S32 tile_width = llround((F32)gViewerWindow->getWindowWidthScaled() / zoom_factor);
+ S32 tile_height = llround((F32)gViewerWindow->getWindowHeightScaled() / zoom_factor);
int tile_y = sub_region / num_horizontal_tiles;
int tile_x = sub_region - (tile_y * num_horizontal_tiles);
glh::matrix4f mat;
- whole_screen.setLeftTopAndSize(tile_x * tile_width, gViewerWindow->getWindowHeight() - (tile_y * tile_height), tile_width, tile_height);
+ whole_screen.setLeftTopAndSize(tile_x * tile_width, gViewerWindow->getWindowHeightScaled() - (tile_y * tile_height), tile_width, tile_height);
}
return setup_hud_matrices(whole_screen);
@@ -1048,12 +1048,12 @@ BOOL setup_hud_matrices(const LLRect& screen_region)
F32 aspect_ratio = LLViewerCamera::getInstance()->getAspect();
glh::matrix4f mat;
- F32 scale_x = (F32)gViewerWindow->getWindowWidth() / (F32)screen_region.getWidth();
- F32 scale_y = (F32)gViewerWindow->getWindowHeight() / (F32)screen_region.getHeight();
+ F32 scale_x = (F32)gViewerWindow->getWindowWidthScaled() / (F32)screen_region.getWidth();
+ F32 scale_y = (F32)gViewerWindow->getWindowHeightScaled() / (F32)screen_region.getHeight();
mat.set_scale(glh::vec3f(scale_x, scale_y, 1.f));
mat.set_translate(
- glh::vec3f(clamp_rescale((F32)screen_region.getCenterX(), 0.f, (F32)gViewerWindow->getWindowWidth(), 0.5f * scale_x * aspect_ratio, -0.5f * scale_x * aspect_ratio),
- clamp_rescale((F32)screen_region.getCenterY(), 0.f, (F32)gViewerWindow->getWindowHeight(), 0.5f * scale_y, -0.5f * scale_y),
+ glh::vec3f(clamp_rescale((F32)screen_region.getCenterX(), 0.f, (F32)gViewerWindow->getWindowWidthScaled(), 0.5f * scale_x * aspect_ratio, -0.5f * scale_x * aspect_ratio),
+ clamp_rescale((F32)screen_region.getCenterY(), 0.f, (F32)gViewerWindow->getWindowHeightScaled(), 0.5f * scale_y, -0.5f * scale_y),
0.f));
proj *= mat;
@@ -1269,8 +1269,8 @@ void render_ui_2d()
int pos_y = sub_region / llceil(zoom_factor);
int pos_x = sub_region - (pos_y*llceil(zoom_factor));
// offset for this tile
- LLFontGL::sCurOrigin.mX -= llround((F32)gViewerWindow->getWindowWidth() * (F32)pos_x / zoom_factor);
- LLFontGL::sCurOrigin.mY -= llround((F32)gViewerWindow->getWindowHeight() * (F32)pos_y / zoom_factor);
+ LLFontGL::sCurOrigin.mX -= llround((F32)gViewerWindow->getWindowWidthScaled() * (F32)pos_x / zoom_factor);
+ LLFontGL::sCurOrigin.mY -= llround((F32)gViewerWindow->getWindowHeightScaled() * (F32)pos_y / zoom_factor);
}
stop_glerror();
@@ -1280,8 +1280,8 @@ void render_ui_2d()
if (gAgent.getAvatarObject() && gAgent.mHUDCurZoom < 0.98f)
{
glPushMatrix();
- S32 half_width = (gViewerWindow->getWindowWidth() / 2);
- S32 half_height = (gViewerWindow->getWindowHeight() / 2);
+ S32 half_width = (gViewerWindow->getWindowWidthScaled() / 2);
+ S32 half_height = (gViewerWindow->getWindowHeightScaled() / 2);
glScalef(LLUI::sGLScaleFactor.mV[0], LLUI::sGLScaleFactor.mV[1], 1.f);
glTranslatef((F32)half_width, (F32)half_height, 0.f);
F32 zoom = gAgent.mHUDCurZoom;
@@ -1341,8 +1341,8 @@ void render_ui_2d()
LLGLDisable cull(GL_CULL_FACE);
LLGLDisable blend(GL_BLEND);
- S32 width = gViewerWindow->getWindowWidth();
- S32 height = gViewerWindow->getWindowHeight();
+ S32 width = gViewerWindow->getWindowWidthScaled();
+ S32 height = gViewerWindow->getWindowHeightScaled();
gGL.getTexUnit(0)->bind(&gPipeline.mUIScreen);
gGL.begin(LLRender::TRIANGLE_STRIP);
gGL.color4f(1,1,1,1);
@@ -1411,8 +1411,8 @@ void render_disconnected_background()
}
// Make sure the progress view always fills the entire window.
- S32 width = gViewerWindow->getWindowWidth();
- S32 height = gViewerWindow->getWindowHeight();
+ S32 width = gViewerWindow->getWindowWidthScaled();
+ S32 height = gViewerWindow->getWindowHeightScaled();
if (gDisconnectedImagep)
{
diff --git a/indra/newview/llviewerhelp.cpp b/indra/newview/llviewerhelp.cpp
index 0e0727e382..056260791c 100644
--- a/indra/newview/llviewerhelp.cpp
+++ b/indra/newview/llviewerhelp.cpp
@@ -39,6 +39,7 @@
#include "llviewercontrol.h"
#include "llversionviewer.h"
#include "llappviewer.h"
+#include "lllogininstance.h"
#include "llviewerhelputil.h"
#include "llviewerhelp.h"
@@ -51,17 +52,25 @@ void LLViewerHelp::showTopic(const std::string &topic)
{
showHelp();
+ // allow overriding the help server with a local help file
if( gSavedSettings.getBOOL("HelpUseLocal") )
{
LLFloaterHelpBrowser* helpbrowser = dynamic_cast<LLFloaterHelpBrowser*>(LLFloaterReg::getInstance("help_browser"));
helpbrowser->navigateToLocalPage( "help-offline" , "index.html" );
+ return;
}
- else
+
+ // use a special login topic before the user logs in
+ std::string help_topic = topic;
+ if (! LLLoginInstance::getInstance()->authSuccess())
{
- const LLOSInfo& osinfo = LLAppViewer::instance()->getOSInfo();
- std::string helpURL = LLViewerHelpUtil::buildHelpURL( topic, gSavedSettings, osinfo );
- setRawURL( helpURL );
+ help_topic = preLoginTopic();
}
+
+ // work out the URL for this topic and display it
+ const LLOSInfo& osinfo = LLAppViewer::instance()->getOSInfo();
+ std::string helpURL = LLViewerHelpUtil::buildHelpURL( help_topic, gSavedSettings, osinfo );
+ setRawURL( helpURL );
}
std::string LLViewerHelp::defaultTopic()
@@ -70,6 +79,12 @@ std::string LLViewerHelp::defaultTopic()
return "this_is_fallbacktopic";
}
+std::string LLViewerHelp::preLoginTopic()
+{
+ // *hack: to be done properly
+ return "pre_login_help";
+}
+
//////////////////////////////
// our own interfaces
diff --git a/indra/newview/llviewerhelp.h b/indra/newview/llviewerhelp.h
index 17aab6f239..dcb5ae32c9 100644
--- a/indra/newview/llviewerhelp.h
+++ b/indra/newview/llviewerhelp.h
@@ -57,6 +57,9 @@ class LLViewerHelp : public LLHelp, public LLSingleton<LLViewerHelp>
// return topic derived from viewer UI focus, else default topic
std::string getTopicFromFocus();
+ // return topic to use before the user logs in
+ std::string preLoginTopic();
+
private:
static void showHelp(); // make sure help UI is visible & raised
static void setRawURL(std::string url); // send URL to help UI
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 69650425cb..493457704b 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -295,11 +295,21 @@ viewer_media_t LLViewerMedia::updateMediaImpl(LLMediaEntry* media_entry, const s
}
}
- if(media_impl && needs_navigate)
+ if(media_impl)
{
std::string url = media_entry->getCurrentURL();
-
- media_impl->navigateTo(url, "", true, true);
+ if(needs_navigate)
+ {
+ media_impl->navigateTo(url, "", true, true);
+ }
+ else if(!media_impl->mMediaURL.empty() && (media_impl->mMediaURL != url))
+ {
+ // If we already have a non-empty media URL set and we aren't doing a navigate, update the media URL to match the media entry.
+ media_impl->mMediaURL = url;
+
+ // If this causes a navigate at some point (such as after a reload), it should be considered server-driven so it isn't broadcast.
+ media_impl->mNavigateServerRequest = true;
+ }
}
return media_impl;
@@ -847,7 +857,7 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_
{
LLPluginClassMedia* media_source = new LLPluginClassMedia(owner);
media_source->setSize(default_width, default_height);
- if (media_source->init(launcher_name, plugin_name))
+ if (media_source->init(launcher_name, plugin_name, gSavedSettings.getBOOL("PluginAttachDebuggerToPlugins")))
{
return media_source;
}
@@ -1133,11 +1143,15 @@ void LLViewerMediaImpl::mouseMove(S32 x, S32 y, MASK mask)
void LLViewerMediaImpl::mouseDown(const LLVector2& texture_coords, MASK mask, S32 button)
{
if(mMediaSource)
- {
- mouseDown(
- llround(texture_coords.mV[VX] * mMediaSource->getTextureWidth()),
- llround((1.0f - texture_coords.mV[VY]) * mMediaSource->getTextureHeight()),
- mask, button);
+ {
+ // scale x and y to texel units.
+ S32 x = llround(texture_coords.mV[VX] * mMediaSource->getTextureWidth());
+ S32 y = llround((1.0f - texture_coords.mV[VY]) * mMediaSource->getTextureHeight());
+
+ // Adjust for the difference between the actual texture height and the amount of the texture in use.
+ y -= (mMediaSource->getTextureHeight() - mMediaSource->getHeight());
+
+ mouseDown(x, y, mask, button);
}
}
@@ -1145,10 +1159,14 @@ void LLViewerMediaImpl::mouseUp(const LLVector2& texture_coords, MASK mask, S32
{
if(mMediaSource)
{
- mouseUp(
- llround(texture_coords.mV[VX] * mMediaSource->getTextureWidth()),
- llround((1.0f - texture_coords.mV[VY]) * mMediaSource->getTextureHeight()),
- mask, button);
+ // scale x and y to texel units.
+ S32 x = llround(texture_coords.mV[VX] * mMediaSource->getTextureWidth());
+ S32 y = llround((1.0f - texture_coords.mV[VY]) * mMediaSource->getTextureHeight());
+
+ // Adjust for the difference between the actual texture height and the amount of the texture in use.
+ y -= (mMediaSource->getTextureHeight() - mMediaSource->getHeight());
+
+ mouseUp(x, y, mask, button);
}
}
@@ -1156,10 +1174,14 @@ void LLViewerMediaImpl::mouseMove(const LLVector2& texture_coords, MASK mask)
{
if(mMediaSource)
{
- mouseMove(
- llround(texture_coords.mV[VX] * mMediaSource->getTextureWidth()),
- llround((1.0f - texture_coords.mV[VY]) * mMediaSource->getTextureHeight()),
- mask);
+ // scale x and y to texel units.
+ S32 x = llround(texture_coords.mV[VX] * mMediaSource->getTextureWidth());
+ S32 y = llround((1.0f - texture_coords.mV[VY]) * mMediaSource->getTextureHeight());
+
+ // Adjust for the difference between the actual texture height and the amount of the texture in use.
+ y -= (mMediaSource->getTextureHeight() - mMediaSource->getHeight());
+
+ mouseMove(x, y, mask);
}
}
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index cb1be5fabc..820f709ba5 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -468,16 +468,6 @@ void set_underclothes_menu_options()
void init_menus()
{
S32 top = gViewerWindow->getRootView()->getRect().getHeight();
- S32 width = gViewerWindow->getRootView()->getRect().getWidth();
-
- //
- // Main menu bar
- //
- gMenuHolder = new LLViewerMenuHolderGL();
- gMenuHolder->setRect(LLRect(0, top, width, 0));
- gMenuHolder->setFollowsAll();
-
- LLMenuGL::sMenuContainer = gMenuHolder;
// Initialize actions
initialize_menus();
@@ -3807,7 +3797,7 @@ class LLViewDefaultUISize : public view_listener_t
{
gSavedSettings.setF32("UIScaleFactor", 1.0f);
gSavedSettings.setBOOL("UIAutoScale", FALSE);
- gViewerWindow->reshape(gViewerWindow->getWindowDisplayWidth(), gViewerWindow->getWindowDisplayHeight());
+ gViewerWindow->reshape(gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw());
return true;
}
};
@@ -7078,6 +7068,11 @@ void handle_test_load_url(void*)
//
// LLViewerMenuHolderGL
//
+static LLDefaultChildRegistry::Register<LLViewerMenuHolderGL> r("menu_holder");
+
+LLViewerMenuHolderGL::LLViewerMenuHolderGL(const LLViewerMenuHolderGL::Params& p)
+: LLMenuHolderGL(p)
+{}
BOOL LLViewerMenuHolderGL::hideMenus()
{
@@ -7087,8 +7082,11 @@ BOOL LLViewerMenuHolderGL::hideMenus()
mParcelSelection = NULL;
mObjectSelection = NULL;
- gMenuBarView->clearHoverItem();
- gMenuBarView->resetMenuTrigger();
+ if (gMenuBarView)
+ {
+ gMenuBarView->clearHoverItem();
+ gMenuBarView->resetMenuTrigger();
+ }
return handled;
}
diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h
index db4eb3be9d..9a6fe03f9f 100644
--- a/indra/newview/llviewermenu.h
+++ b/indra/newview/llviewermenu.h
@@ -133,6 +133,11 @@ void handle_export_selected( void * );
class LLViewerMenuHolderGL : public LLMenuHolderGL
{
public:
+ struct Params : public LLInitParam::Block<Params, LLMenuHolderGL::Params>
+ {};
+
+ LLViewerMenuHolderGL(const Params& p);
+
virtual BOOL hideMenus();
void setParcelSelection(LLSafeHandle<LLParcelSelection> selection);
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index d17c7e486f..753acab172 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -404,8 +404,8 @@ class LLFileTakeSnapshotToDisk : public view_listener_t
{
LLPointer<LLImageRaw> raw = new LLImageRaw;
- S32 width = gViewerWindow->getWindowDisplayWidth();
- S32 height = gViewerWindow->getWindowDisplayHeight();
+ S32 width = gViewerWindow->getWindowWidthRaw();
+ S32 height = gViewerWindow->getWindowHeightRaw();
if (gSavedSettings.getBOOL("HighResSnapshot"))
{
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index ea1097c477..a90790c59a 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -4338,7 +4338,7 @@ void process_alert_core(const std::string& message, BOOL modal)
std::string snap_filename = gDirUtilp->getLindenUserDir();
snap_filename += gDirUtilp->getDirDelimiter();
snap_filename += SCREEN_HOME_FILENAME;
- gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowDisplayWidth(), gViewerWindow->getWindowDisplayHeight(), FALSE, FALSE);
+ gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw(), FALSE, FALSE);
}
const std::string ALERT_PREFIX("ALERT: ");
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index caa94dba38..939d5e3970 100644
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -822,8 +822,8 @@ void send_stats()
// Screen size so the UI team can figure out how big the widgets
// appear and use a "typical" size for end user tests.
- S32 window_width = gViewerWindow->getWindowDisplayWidth();
- S32 window_height = gViewerWindow->getWindowDisplayHeight();
+ S32 window_width = gViewerWindow->getWindowWidthRaw();
+ S32 window_height = gViewerWindow->getWindowHeightRaw();
S32 window_size = (window_width * window_height) / 1024;
misc["string_1"] = llformat("%d", window_size);
// misc["string_2"] =
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index fc09c946af..6b0f8814b9 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -315,7 +315,7 @@ public:
mTextColor = LLColor4( 0.86f, 0.86f, 0.86f, 1.f );
// Draw stuff growing up from right lower corner of screen
- U32 xpos = mWindow->getWindowWidth() - 350;
+ U32 xpos = mWindow->getWindowWidthScaled() - 350;
U32 ypos = 64;
const U32 y_inc = 20;
@@ -600,8 +600,8 @@ void LLViewerWindow::updateDebugText()
BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK mask, LLMouseHandler::EClickType clicktype, BOOL down)
{
- std::string buttonname;
- std::string buttonstatestr;
+ const char* buttonname = "";
+ const char* buttonstatestr = "";
BOOL handled = FALSE;
S32 x = pos.mX;
S32 y = pos.mY;
@@ -1196,9 +1196,9 @@ LLViewerWindow::LLViewerWindow(
mActive(TRUE),
mWantFullscreen(fullscreen),
mShowFullscreenProgress(FALSE),
- mWindowRect(0, height, width, 0),
- mVirtualWindowRect(0, height, width, 0),
- mWorldViewRect(0, height, width, 0),
+ mWindowRectRaw(0, height, width, 0),
+ mWindowRectScaled(0, height, width, 0),
+ mWorldViewRectRaw(0, height, width, 0),
mLeftMouseDown(FALSE),
mMiddleMouseDown(FALSE),
mRightMouseDown(FALSE),
@@ -1267,8 +1267,8 @@ LLViewerWindow::LLViewerWindow(
{
LLCoordWindow size;
mWindow->getSize(&size);
- mWindowRect.set(0, size.mY, size.mX, 0);
- mVirtualWindowRect.set(0, llround((F32)size.mY / mDisplayScale.mV[VY]), llround((F32)size.mX / mDisplayScale.mV[VX]), 0);
+ mWindowRectRaw.set(0, size.mY, size.mX, 0);
+ mWindowRectScaled.set(0, llround((F32)size.mY / mDisplayScale.mV[VY]), llround((F32)size.mX / mDisplayScale.mV[VX]), 0);
}
LLFontManager::initClass();
@@ -1324,15 +1324,15 @@ LLViewerWindow::LLViewerWindow(
// Create container for all sub-views
LLView::Params rvp;
rvp.name("root");
- rvp.rect(mVirtualWindowRect);
+ rvp.rect(mWindowRectScaled);
rvp.mouse_opaque(false);
rvp.follows.flags(FOLLOWS_NONE);
mRootView = LLUICtrlFactory::create<LLRootView>(rvp);
LLUI::setRootView(mRootView);
// Make avatar head look forward at start
- mCurrentMousePoint.mX = getWindowWidth() / 2;
- mCurrentMousePoint.mY = getWindowHeight() / 2;
+ mCurrentMousePoint.mX = getWindowWidthScaled() / 2;
+ mCurrentMousePoint.mY = getWindowHeightScaled() / 2;
gShowOverlayTitle = gSavedSettings.getBOOL("ShowOverlayTitle");
mOverlayTitle = gSavedSettings.getString("OverlayTitle");
@@ -1377,10 +1377,14 @@ void LLViewerWindow::initGLDefaults()
gCylinder.prerender();
}
+struct MainPanel : public LLPanel
+{
+};
+
void LLViewerWindow::initBase()
{
- S32 height = getWindowHeight();
- S32 width = getWindowWidth();
+ S32 height = getWindowHeightScaled();
+ S32 width = getWindowWidthScaled();
LLRect full_window(0, height, width, 0);
@@ -1400,30 +1404,18 @@ void LLViewerWindow::initBase()
// Create the floater view at the start so that other views can add children to it.
// (But wait to add it as a child of the root view so that it will be in front of the
// other views.)
+ MainPanel* main_view = new MainPanel();
+ LLUICtrlFactory::instance().buildPanel(main_view, "main_view.xml");
+ main_view->setShape(full_window);
+ getRootView()->addChild(main_view);
+
+ // placeholder widget that controls where "world" is rendered
+ mWorldViewPlaceholder = main_view->getChildView("world_view_rect")->getHandle();
// Constrain floaters to inside the menu and status bar regions.
- LLRect floater_view_rect = full_window;
- // make space for menu bar
- floater_view_rect.mTop -= MENU_BAR_HEIGHT;
-
- LLFloaterView::Params fvparams;
- fvparams.name("Floater View");
- fvparams.rect(floater_view_rect);
- fvparams.mouse_opaque(false);
- fvparams.follows.flags(FOLLOWS_ALL);
- fvparams.tab_stop(false);
- gFloaterView = LLUICtrlFactory::create<LLFloaterView> (fvparams);
-
- LLSnapshotFloaterView::Params snapParams;
- snapParams.name("Snapshot Floater View");
- snapParams.rect(full_window);
- snapParams.enabled(false);
- gSnapshotFloaterView = LLUICtrlFactory::create<LLSnapshotFloaterView> (snapParams);
+ gFloaterView = getRootView()->getChild<LLFloaterView>("Floater View");
+ gSnapshotFloaterView = getRootView()->getChild<LLSnapshotFloaterView>("Snapshot Floater View");
- // Snapshot floater must start invisible otherwise it eats all
- // the tooltips. JC
- gSnapshotFloaterView->setVisible(FALSE);
-
// Console
llassert( !gConsole );
LLConsole::Params cp;
@@ -1447,43 +1439,21 @@ void LLViewerWindow::initBase()
}
#endif
- // Debug view over the console
- LLDebugView::Params debug_p;
- debug_p.name("DebugView");
- debug_p.rect(full_window);
- debug_p.follows.flags(FOLLOWS_ALL);
- debug_p.visible(true);
- gDebugView = LLUICtrlFactory::create<LLDebugView>(debug_p);
- getRootView()->addChild(gDebugView);
-
- // Add floater view at the end so it will be on top, and give it tab priority over others
- getRootView()->addChild(gFloaterView, -1);
- getRootView()->addChild(gSnapshotFloaterView);
-
- // notify above floaters!
- LLRect notify_rect = floater_view_rect;
- LLNotifyBoxView::Params p;
- p.name("notify_container");
- p.rect(notify_rect);
- p.mouse_opaque(false);
- p.follows.flags(FOLLOWS_ALL);
- gNotifyBoxView = LLUICtrlFactory::create<LLNotifyBoxView> (p);
- getRootView()->addChild(gNotifyBoxView, -2);
-
- // View for tooltips
- LLToolTipView::Params hvp;
- hvp.name("tooltip view");
- hvp.rect(full_window);
- hvp.follows.flags(FOLLOWS_ALL);
- gToolTipView = LLUICtrlFactory::create<LLToolTipView>(hvp);
- gToolTipView->setFollowsAll();
- getRootView()->addChild(gToolTipView);
+ gDebugView = getRootView()->getChild<LLDebugView>("DebugView");
+ gDebugView->init();
+ gNotifyBoxView = getRootView()->getChild<LLNotifyBoxView>("notify_container");
+ gToolTipView = getRootView()->getChild<LLToolTipView>("tooltip view");
// Add the progress bar view (startup view), which overrides everything
mProgressView = new LLProgressView(full_window);
getRootView()->addChild(mProgressView);
setShowProgress(FALSE);
setProgressCancelButtonVisible(FALSE);
+
+ gMenuHolder = getRootView()->getChild<LLViewerMenuHolderGL>("Menu Holder");
+
+ LLMenuGL::sMenuContainer = gMenuHolder;
+
}
void LLViewerWindow::initWorldUI()
@@ -1492,20 +1462,19 @@ void LLViewerWindow::initWorldUI()
S32 width = mRootView->getRect().getWidth();
LLRect full_window(0, height, width, 0);
- gIMMgr = LLIMMgr::getInstance();
- // side tray
- getRootView()->addChild(LLSideTray::getInstance());
+ gIMMgr = LLIMMgr::getInstance();
getRootView()->sendChildToFront(gFloaterView);
getRootView()->sendChildToFront(gSnapshotFloaterView);
// new bottom panel
- LLRect rc = LLBottomTray::getInstance()->getRect();
- rc.mLeft = 0;
- rc.mRight = mRootView->getRect().getWidth();
- LLBottomTray::getInstance()->reshape(rc.getWidth(),rc.getHeight(),FALSE);
- LLBottomTray::getInstance()->setRect(rc);
+ LLPanel* bottom_tray_container = getRootView()->getChild<LLPanel>("bottom_tray_container");
+ LLBottomTray* bottom_tray = LLBottomTray::getInstance();
+ bottom_tray->setShape(bottom_tray_container->getLocalRect());
+ bottom_tray->setFollowsAll();
+ bottom_tray_container->addChild(bottom_tray);
+ bottom_tray_container->setVisible(TRUE);
// Pre initialize instance communicate instance;
// currently needs to happen before initializing chat or IM
@@ -1521,17 +1490,6 @@ void LLViewerWindow::initWorldUI()
gMorphView = LLUICtrlFactory::create<LLMorphView>(mvp);
getRootView()->addChild(gMorphView);
- // Make space for nav bar.
- LLNavigationBar* navbar = LLNavigationBar::getInstance();
- LLRect floater_view_rect = gFloaterView->getRect();
- LLRect notify_view_rect = gNotifyBoxView->getRect();
- floater_view_rect.mTop -= navbar->getDefNavBarHeight();
- floater_view_rect.mBottom += LLBottomTray::getInstance()->getRect().getHeight();
- notify_view_rect.mTop -= navbar->getDefNavBarHeight();
- notify_view_rect.mBottom += LLBottomTray::getInstance()->getRect().getHeight();
- gFloaterView->setRect(floater_view_rect);
- gNotifyBoxView->setRect(notify_view_rect);
-
LLWorldMapView::initClass();
// Force gFloaterWorldMap to initialize
@@ -1542,22 +1500,23 @@ void LLViewerWindow::initWorldUI()
LLFloaterReg::hideInstance("build");
// Status bar
- S32 menu_bar_height = gMenuBarView->getRect().getHeight();
- LLRect root_rect = getRootView()->getRect();
- LLRect status_rect(0, root_rect.getHeight(), root_rect.getWidth(), root_rect.getHeight() - menu_bar_height);
- gStatusBar = new LLStatusBar(status_rect);
- gStatusBar->setFollows(FOLLOWS_LEFT | FOLLOWS_RIGHT | FOLLOWS_TOP);
-
- gStatusBar->reshape(root_rect.getWidth(), gStatusBar->getRect().getHeight(), TRUE);
- gStatusBar->translate(0, root_rect.getHeight() - gStatusBar->getRect().getHeight());
+ LLPanel* status_bar_container = getRootView()->getChild<LLPanel>("status_bar_container");
+ gStatusBar = new LLStatusBar(status_bar_container->getLocalRect());
+ gStatusBar->setFollowsAll();
+ gStatusBar->setShape(status_bar_container->getLocalRect());
// sync bg color with menu bar
gStatusBar->setBackgroundColor( gMenuBarView->getBackgroundColor().get() );
+ status_bar_container->addChild(gStatusBar);
+ status_bar_container->setVisible(TRUE);
// Navigation bar
- navbar->reshape(root_rect.getWidth(), navbar->getRect().getHeight(), TRUE); // *TODO: redundant?
- navbar->translate(0, root_rect.getHeight() - menu_bar_height - navbar->getRect().getHeight()); // FIXME
- navbar->setBackgroundColor(gMenuBarView->getBackgroundColor().get());
+ LLPanel* nav_bar_container = getRootView()->getChild<LLPanel>("nav_bar_container");
+ LLNavigationBar* navbar = LLNavigationBar::getInstance();
+ navbar->setShape(nav_bar_container->getLocalRect());
+ navbar->setBackgroundColor(gMenuBarView->getBackgroundColor().get());
+ nav_bar_container->addChild(navbar);
+ nav_bar_container->setVisible(TRUE);
if (!gSavedSettings.getBOOL("ShowNavbarNavigationPanel"))
{
@@ -1589,19 +1548,6 @@ void LLViewerWindow::initWorldUI()
LLBottomTray::getInstance()->showGestureButton(FALSE);
}
- getRootView()->addChild(gStatusBar);
- getRootView()->addChild(navbar);
-
-
- //sidetray
- //then notify area
- //then menu
- //getRootView()->sendChildToFront(LLSideTray::getInstance());
-
- getRootView()->sendChildToFront(gNotifyBoxView);
- // menu holder appears on top to get first pass at all mouse events
- getRootView()->sendChildToFront(gMenuHolder);
-
if ( gHUDView == NULL )
{
LLRect hud_rect = full_window;
@@ -1615,11 +1561,27 @@ void LLViewerWindow::initWorldUI()
getRootView()->addChildInBack(gHUDView);
}
- // this allows not to see UI elements created while UI initializing after Alt+Tab was pressed during login. EXT-744.
- moveProgressViewToFront();
-
- // tooltips are always on top
- getRootView()->sendChildToFront(gToolTipView);
+ LLPanel* panel_ssf_container = getRootView()->getChild<LLPanel>("stand_stop_flying_container");
+ LLPanelStandStopFlying* panel_stand_stop_flying = LLPanelStandStopFlying::getInstance();
+ panel_stand_stop_flying->setShape(panel_ssf_container->getLocalRect());
+ panel_stand_stop_flying->setFollowsAll();
+ panel_ssf_container->addChild(panel_stand_stop_flying);
+ panel_ssf_container->setVisible(TRUE);
+
+ // put sidetray in container
+ LLPanel* side_tray_container = getRootView()->getChild<LLPanel>("side_tray_container");
+ LLSideTray* sidetrayp = LLSideTray::getInstance();
+ sidetrayp->setShape(side_tray_container->getLocalRect());
+ sidetrayp->setFollowsAll();
+ side_tray_container->addChild(sidetrayp);
+ side_tray_container->setVisible(FALSE);
+
+ // put sidetray buttons in their own panel
+ LLPanel* buttons_panel = sidetrayp->getButtonsPanel();
+ LLPanel* buttons_panel_container = getRootView()->getChild<LLPanel>("side_bar_tabs");
+ buttons_panel->setShape(buttons_panel_container->getLocalRect());
+ buttons_panel->setFollowsAll();
+ buttons_panel_container->addChild(buttons_panel);
}
// Destroy the UI
@@ -1747,8 +1709,8 @@ void LLViewerWindow::sendShapeToSim()
msg->addU32Fast(_PREHASH_CircuitCode, gMessageSystem->mOurCircuitCode);
msg->nextBlockFast(_PREHASH_HeightWidthBlock);
msg->addU32Fast(_PREHASH_GenCounter, 0);
- U16 height16 = (U16) mWorldViewRect.getHeight();
- U16 width16 = (U16) mWorldViewRect.getWidth();
+ U16 height16 = (U16) mWorldViewRectRaw.getHeight();
+ U16 width16 = (U16) mWorldViewRectRaw.getWidth();
msg->addU16Fast(_PREHASH_Height, height16);
msg->addU16Fast(_PREHASH_Width, width16);
gAgent.sendReliableMessage();
@@ -1770,14 +1732,14 @@ void LLViewerWindow::reshape(S32 width, S32 height)
}
// update our window rectangle
- mWindowRect.mRight = mWindowRect.mLeft + width;
- mWindowRect.mTop = mWindowRect.mBottom + height;
+ mWindowRectRaw.mRight = mWindowRectRaw.mLeft + width;
+ mWindowRectRaw.mTop = mWindowRectRaw.mBottom + height;
//glViewport(0, 0, width, height );
if (height > 0)
{
- LLViewerCamera::getInstance()->setViewHeightInPixels( mWorldViewRect.getHeight() );
+ LLViewerCamera::getInstance()->setViewHeightInPixels( mWorldViewRectRaw.getHeight() );
LLViewerCamera::getInstance()->setAspect( getWorldViewAspectRatio() );
}
@@ -1787,8 +1749,8 @@ void LLViewerWindow::reshape(S32 width, S32 height)
LLUI::setScaleFactor(mDisplayScale);
// update our window rectangle
- mVirtualWindowRect.mRight = mVirtualWindowRect.mLeft + llround((F32)width / mDisplayScale.mV[VX]);
- mVirtualWindowRect.mTop = mVirtualWindowRect.mBottom + llround((F32)height / mDisplayScale.mV[VY]);
+ mWindowRectScaled.mRight = mWindowRectScaled.mLeft + llround((F32)width / mDisplayScale.mV[VX]);
+ mWindowRectScaled.mTop = mWindowRectScaled.mBottom + llround((F32)height / mDisplayScale.mV[VY]);
setup2DViewport();
@@ -1930,7 +1892,7 @@ void LLViewerWindow::draw()
if (!gSavedSettings.getBOOL("RenderUIBuffer"))
{
- LLUI::sDirtyRect = this->getWindowRect();
+ LLUI::sDirtyRect = this->getWindowRectRaw();
}
// HACK for timecode debugging
@@ -1944,8 +1906,8 @@ void LLViewerWindow::draw()
microsecondsToTimecodeString(gFrameTime,text);
const LLFontGL* font = LLFontGL::getFontSansSerif();
font->renderUTF8(text, 0,
- llround((getWindowWidth()/2)-100.f),
- llround((getWindowHeight()-60.f)),
+ llround((getWindowWidthScaled()/2)-100.f),
+ llround((getWindowHeightScaled()-60.f)),
LLColor4( 1.f, 1.f, 1.f, 1.f ),
LLFontGL::LEFT, LLFontGL::TOP);
}
@@ -1968,8 +1930,8 @@ void LLViewerWindow::draw()
int pos_y = sub_region / llceil(zoom_factor);
int pos_x = sub_region - (pos_y*llceil(zoom_factor));
// offset for this tile
- glTranslatef((F32)getWindowWidth() * -(F32)pos_x,
- (F32)getWindowHeight() * -(F32)pos_y,
+ glTranslatef((F32)getWindowWidthScaled() * -(F32)pos_x,
+ (F32)getWindowHeightScaled() * -(F32)pos_y,
0.f);
glScalef(zoom_factor, zoom_factor, 1.f);
LLUI::sGLScaleFactor *= zoom_factor;
@@ -2014,8 +1976,8 @@ void LLViewerWindow::draw()
const S32 DIST_FROM_TOP = 20;
LLFontGL::getFontSansSerifBig()->renderUTF8(
mOverlayTitle, 0,
- llround( getWindowWidth() * 0.5f),
- getWindowHeight() - DIST_FROM_TOP,
+ llround( getWindowWidthScaled() * 0.5f),
+ getWindowHeightScaled() - DIST_FROM_TOP,
LLColor4(1, 1, 1, 0.4f),
LLFontGL::HCENTER, LLFontGL::TOP);
}
@@ -2315,7 +2277,7 @@ void LLViewerWindow::handleScrollWheel(S32 clicks)
// Zoom the camera in and out behavior
- if(top_ctrl == 0 && mWorldViewRect.pointInRect(mCurrentMousePoint.mX, mCurrentMousePoint.mY) )
+ if(top_ctrl == 0 && mWorldViewRectRaw.pointInRect(mCurrentMousePoint.mX, mCurrentMousePoint.mY) )
gAgent.handleScrollWheel(clicks);
return;
@@ -2323,8 +2285,8 @@ void LLViewerWindow::handleScrollWheel(S32 clicks)
void LLViewerWindow::moveCursorToCenter()
{
- S32 x = mWorldViewRect.getWidth() / 2;
- S32 y = mWorldViewRect.getHeight() / 2;
+ S32 x = mWorldViewRectRaw.getWidth() / 2;
+ S32 y = mWorldViewRectRaw.getHeight() / 2;
//on a forced move, all deltas get zeroed out to prevent jumping
mCurrentMousePoint.set(x,y);
@@ -2334,29 +2296,6 @@ void LLViewerWindow::moveCursorToCenter()
LLUI::setMousePositionScreen(x, y);
}
-void LLViewerWindow::updateBottomTrayRect()
-{
- if(LLBottomTray::instanceExists() && LLSideTray::instanceCreated())
- {
- S32 side_tray_width = 0;
- if(LLSideTray::getInstance()->getVisible())
- {
- side_tray_width = LLSideTray::getInstance()->getTrayWidth();
- }
-
- LLBottomTray* bottom_tray = LLBottomTray::getInstance();
- S32 right = llround((F32)mWindowRect.mRight / mDisplayScale.mV[VX]) - side_tray_width;
-
- LLRect rc = bottom_tray->getRect();
- if (right != rc.mRight)
- {
- rc.mRight = right;
- bottom_tray->reshape(rc.getWidth(), rc.getHeight(), FALSE);
- bottom_tray->setRect(rc);
- mOnBottomTrayWidthChanged();
- }
- }
-}
//////////////////////////////////////////////////////////////////////
//
@@ -2398,9 +2337,10 @@ void LLViewerWindow::updateUI()
{
static std::string last_handle_msg;
- updateWorldViewRect();
+ // animate layout stacks so we have up to date rect for world view
+ LLLayoutStack::updateClass();
- updateBottomTrayRect();
+ updateWorldViewRect();
LLView::sMouseHandlerMessage.clear();
@@ -2784,8 +2724,8 @@ void LLViewerWindow::updateMouseDelta()
mWindow->getCursorPosition(&mouse_pos);
if (mouse_pos.mX < 0 ||
mouse_pos.mY < 0 ||
- mouse_pos.mX > mWindowRect.getWidth() ||
- mouse_pos.mY > mWindowRect.getHeight())
+ mouse_pos.mX > mWindowRectRaw.getWidth() ||
+ mouse_pos.mY > mWindowRectRaw.getHeight())
{
mMouseInWindow = FALSE;
}
@@ -2900,42 +2840,30 @@ void LLViewerWindow::updateKeyboardFocus()
LLSideTray::getInstance()->highlightFocused();
}
+static LLFastTimer::DeclareTimer FTM_UPDATE_WORLD_VIEW("Update World View");
void LLViewerWindow::updateWorldViewRect(bool use_full_window)
{
- if (!LLSideTray::instanceCreated()) return;
+ LLFastTimer ft(FTM_UPDATE_WORLD_VIEW);
// start off using whole window to render world
- LLRect new_world_rect = mWindowRect;
+ LLRect new_world_rect = mWindowRectRaw;
- if (use_full_window == false)
+ if (use_full_window == false && mWorldViewPlaceholder.get())
{
- // pull in right side of world view based on sidetray
- LLSideTray* sidetray = LLSideTray::getInstance();
- if (sidetray->getVisible())
- {
- new_world_rect.mRight -= llround((F32)sidetray->getTrayWidth() * mDisplayScale.mV[VX]);
- }
-
- // push top of world view below nav bar
- if (LLNavigationBar::getInstance()->getVisible())
- {
- LLNavigationBar* barp = LLNavigationBar::getInstance();
- LLRect nav_bar_rect;
- if(barp->localRectToOtherView(barp->getLocalRect(), &nav_bar_rect, mRootView))
- {
- new_world_rect.mTop = llround((F32)LLNavigationBar::getInstance()->getRect().mBottom * mDisplayScale.mV[VY]);
- }
- }
+ new_world_rect = mWorldViewPlaceholder.get()->calcScreenRect();
+ // clamp to at least a 1x1 rect so we don't try to allocate zero width gl buffers
+ new_world_rect.mTop = llmax(new_world_rect.mTop, new_world_rect.mBottom + 1);
+ new_world_rect.mRight = llmax(new_world_rect.mRight, new_world_rect.mLeft + 1);
}
- if (mWorldViewRect != new_world_rect)
+ if (mWorldViewRectRaw != new_world_rect)
{
// sending a signal with a new WorldView rect
- mOnWorldViewRectUpdated(mWorldViewRect, new_world_rect);
+ mOnWorldViewRectUpdated(mWorldViewRectRaw, new_world_rect);
- mWorldViewRect = new_world_rect;
+ mWorldViewRectRaw = new_world_rect;
gResizeScreenTexture = TRUE;
- LLViewerCamera::getInstance()->setViewHeightInPixels( mWorldViewRect.getHeight() );
+ LLViewerCamera::getInstance()->setViewHeightInPixels( mWorldViewRectRaw.getHeight() );
LLViewerCamera::getInstance()->setAspect( getWorldViewAspectRatio() );
}
}
@@ -2948,9 +2876,9 @@ void LLViewerWindow::saveLastMouse(const LLCoordGL &point)
{
mCurrentMousePoint.mX = 0;
}
- else if (point.mX > getWindowWidth())
+ else if (point.mX > getWindowWidthScaled())
{
- mCurrentMousePoint.mX = getWindowWidth();
+ mCurrentMousePoint.mX = getWindowWidthScaled();
}
else
{
@@ -2961,9 +2889,9 @@ void LLViewerWindow::saveLastMouse(const LLCoordGL &point)
{
mCurrentMousePoint.mY = 0;
}
- else if (point.mY > getWindowHeight() )
+ else if (point.mY > getWindowHeightScaled() )
{
- mCurrentMousePoint.mY = getWindowHeight();
+ mCurrentMousePoint.mY = getWindowHeightScaled();
}
else
{
@@ -3208,10 +3136,10 @@ void LLViewerWindow::pickAsync(S32 x, S32 y_from_bot, MASK mask, void (*callback
{
mPickScreenRegion.setCenterAndSize(x, y_from_bot, PICK_DIAMETER, PICK_DIAMETER);
- if (mPickScreenRegion.mLeft < mWorldViewRect.mLeft) mPickScreenRegion.translate(mWorldViewRect.mLeft - mPickScreenRegion.mLeft, 0);
- if (mPickScreenRegion.mBottom < mWorldViewRect.mBottom) mPickScreenRegion.translate(0, mWorldViewRect.mBottom - mPickScreenRegion.mBottom);
- if (mPickScreenRegion.mRight > mWorldViewRect.mRight ) mPickScreenRegion.translate(mWorldViewRect.mRight - mPickScreenRegion.mRight, 0);
- if (mPickScreenRegion.mTop > mWorldViewRect.mTop ) mPickScreenRegion.translate(0, mWorldViewRect.mTop - mPickScreenRegion.mTop);
+ if (mPickScreenRegion.mLeft < mWorldViewRectRaw.mLeft) mPickScreenRegion.translate(mWorldViewRectRaw.mLeft - mPickScreenRegion.mLeft, 0);
+ if (mPickScreenRegion.mBottom < mWorldViewRectRaw.mBottom) mPickScreenRegion.translate(0, mWorldViewRectRaw.mBottom - mPickScreenRegion.mBottom);
+ if (mPickScreenRegion.mRight > mWorldViewRectRaw.mRight ) mPickScreenRegion.translate(mWorldViewRectRaw.mRight - mPickScreenRegion.mRight, 0);
+ if (mPickScreenRegion.mTop > mWorldViewRectRaw.mTop ) mPickScreenRegion.translate(0, mWorldViewRectRaw.mTop - mPickScreenRegion.mTop);
}
// set frame buffer region for picking results
@@ -3417,11 +3345,11 @@ LLVector3 LLViewerWindow::mouseDirectionGlobal(const S32 x, const S32 y) const
F32 fov = LLViewerCamera::getInstance()->getView();
// find world view center in scaled ui coordinates
- F32 center_x = (F32)getWorldViewRect().getCenterX() / mDisplayScale.mV[VX];
- F32 center_y = (F32)getWorldViewRect().getCenterY() / mDisplayScale.mV[VY];
+ F32 center_x = (F32)getWorldViewRectRaw().getCenterX() / mDisplayScale.mV[VX];
+ F32 center_y = (F32)getWorldViewRectRaw().getCenterY() / mDisplayScale.mV[VY];
// calculate pixel distance to screen
- F32 distance = ((F32)getWorldViewHeight() / (mDisplayScale.mV[VY] * 2.f)) / (tan(fov / 2.f));
+ F32 distance = ((F32)getWorldViewHeightRaw() / (mDisplayScale.mV[VY] * 2.f)) / (tan(fov / 2.f));
// calculate click point relative to middle of screen
F32 click_x = x - center_x;
@@ -3440,11 +3368,11 @@ LLVector3 LLViewerWindow::mouseDirectionGlobal(const S32 x, const S32 y) const
LLVector3 LLViewerWindow::mousePointHUD(const S32 x, const S32 y) const
{
// find screen resolution
- S32 height = llround((F32)getWorldViewHeight() / mDisplayScale.mV[VY]);
+ S32 height = llround((F32)getWorldViewHeightRaw() / mDisplayScale.mV[VY]);
// find world view center
- F32 center_x = (F32)getWorldViewRect().getCenterX() / mDisplayScale.mV[VX];
- F32 center_y = (F32)getWorldViewRect().getCenterY() / mDisplayScale.mV[VY];
+ F32 center_x = (F32)getWorldViewRectRaw().getCenterX() / mDisplayScale.mV[VX];
+ F32 center_y = (F32)getWorldViewRectRaw().getCenterY() / mDisplayScale.mV[VY];
// remap with uniform scale (1/height) so that top is -0.5, bottom is +0.5
F32 hud_x = -((F32)x - center_x) / height;
@@ -3462,12 +3390,12 @@ LLVector3 LLViewerWindow::mouseDirectionCamera(const S32 x, const S32 y) const
F32 fov_width = fov_height * LLViewerCamera::getInstance()->getAspect();
// find screen resolution
- S32 height = llround((F32)getWorldViewHeight() / mDisplayScale.mV[VY]);
- S32 width = llround((F32)getWorldViewWidth() / mDisplayScale.mV[VX]);
+ S32 height = llround((F32)getWorldViewHeightRaw() / mDisplayScale.mV[VY]);
+ S32 width = llround((F32)getWorldViewWidthRaw() / mDisplayScale.mV[VX]);
// find world view center
- F32 center_x = (F32)getWorldViewRect().getCenterX() / mDisplayScale.mV[VX];
- F32 center_y = (F32)getWorldViewRect().getCenterY() / mDisplayScale.mV[VY];
+ F32 center_x = (F32)getWorldViewRectRaw().getCenterX() / mDisplayScale.mV[VX];
+ F32 center_y = (F32)getWorldViewRectRaw().getCenterY() / mDisplayScale.mV[VY];
// calculate click point relative to middle of screen
F32 click_x = (((F32)x - center_x) / (F32)width) * fov_width * -1.f;
@@ -3707,8 +3635,8 @@ void LLViewerWindow::movieSize(S32 new_width, S32 new_height)
||(size.mY != new_height + BORDERHEIGHT))
{
// use actual display dimensions, not virtual UI dimensions
- S32 x = gViewerWindow->getWindowDisplayWidth();
- S32 y = gViewerWindow->getWindowDisplayHeight();
+ S32 x = gViewerWindow->getWindowWidthRaw();
+ S32 y = gViewerWindow->getWindowHeightRaw();
BORDERWIDTH = size.mX - x;
BORDERHEIGHT = size.mY- y;
LLCoordScreen new_size(new_width + BORDERWIDTH,
@@ -3806,9 +3734,9 @@ BOOL LLViewerWindow::thumbnailSnapshot(LLImageRaw *raw, S32 preview_width, S32 p
S32 w = preview_width ;
S32 h = preview_height ;
LLVector2 display_scale = mDisplayScale ;
- mDisplayScale.setVec((F32)w / mWindowRect.getWidth(), (F32)h / mWindowRect.getHeight()) ;
- LLRect window_rect = mWindowRect;
- mWindowRect.set(0, h, w, 0);
+ mDisplayScale.setVec((F32)w / mWindowRectRaw.getWidth(), (F32)h / mWindowRectRaw.getHeight()) ;
+ LLRect window_rect = mWindowRectRaw;
+ mWindowRectRaw.set(0, h, w, 0);
gDisplaySwapBuffers = FALSE;
gDepthDirty = TRUE;
@@ -3820,7 +3748,7 @@ BOOL LLViewerWindow::thumbnailSnapshot(LLImageRaw *raw, S32 preview_width, S32 p
LLHUDText::setDisplayText(FALSE) ;
if (type == SNAPSHOT_TYPE_OBJECT_ID)
{
- gObjectList.renderPickList(gViewerWindow->getVirtualWindowRect(), FALSE, FALSE);
+ gObjectList.renderPickList(gViewerWindow->getWindowRectScaled(), FALSE, FALSE);
}
else
{
@@ -3873,7 +3801,7 @@ BOOL LLViewerWindow::thumbnailSnapshot(LLImageRaw *raw, S32 preview_width, S32 p
LLFontGL::setFontDisplay(TRUE) ;
LLHUDText::setDisplayText(TRUE) ;
mDisplayScale.setVec(display_scale) ;
- mWindowRect = window_rect;
+ mWindowRectRaw = window_rect;
setup3DRender();
gDisplaySwapBuffers = FALSE;
gDepthDirty = TRUE;
@@ -3941,12 +3869,12 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
// Copy screen to a buffer
// crop sides or top and bottom, if taking a snapshot of different aspect ratio
// from window
- S32 snapshot_width = mWindowRect.getWidth();
- S32 snapshot_height = mWindowRect.getHeight();
+ S32 snapshot_width = mWindowRectRaw.getWidth();
+ S32 snapshot_height = mWindowRectRaw.getHeight();
// SNAPSHOT
- S32 window_width = mWindowRect.getWidth();
- S32 window_height = mWindowRect.getHeight();
- LLRect window_rect = mWindowRect;
+ S32 window_width = mWindowRectRaw.getWidth();
+ S32 window_height = mWindowRectRaw.getHeight();
+ LLRect window_rect = mWindowRectRaw;
BOOL use_fbo = FALSE;
LLRenderTarget target;
@@ -3977,7 +3905,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
window_width = snapshot_width;
window_height = snapshot_height;
scale_factor = 1.f;
- mWindowRect.set(0, snapshot_height, snapshot_width, 0);
+ mWindowRectRaw.set(0, snapshot_height, snapshot_width, 0);
target.bindTarget();
}
}
@@ -4045,7 +3973,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
LLViewerCamera::getInstance()->setZoomParameters(scale_factor, subimage_x+(subimage_y*llceil(scale_factor)));
setup3DRender();
- gObjectList.renderPickList(gViewerWindow->getVirtualWindowRect(), FALSE, FALSE);
+ gObjectList.renderPickList(gViewerWindow->getWindowRectScaled(), FALSE, FALSE);
}
else
{
@@ -4124,7 +4052,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
if (use_fbo)
{
- mWindowRect = window_rect;
+ mWindowRectRaw = window_rect;
target.flush();
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
}
@@ -4205,23 +4133,13 @@ void LLViewerWindow::drawMouselookInstructions()
font->renderUTF8(
instructions, 0,
- getVirtualWorldViewRect().getCenterX(),
- getVirtualWorldViewRect().mBottom + INSTRUCTIONS_PAD,
+ getWorldViewRectScaled().getCenterX(),
+ getWorldViewRectScaled().mBottom + INSTRUCTIONS_PAD,
LLColor4( 1.0f, 1.0f, 1.0f, 0.5f ),
LLFontGL::HCENTER, LLFontGL::TOP,
LLFontGL::NORMAL,LLFontGL::DROP_SHADOW);
}
-S32 LLViewerWindow::getWindowHeight() const
-{
- return mVirtualWindowRect.getHeight();
-}
-
-S32 LLViewerWindow::getWindowWidth() const
-{
- return mVirtualWindowRect.getWidth();
-}
-
void* LLViewerWindow::getPlatformWindow() const
{
return mWindow->getPlatformWindow();
@@ -4242,9 +4160,9 @@ LLRootView* LLViewerWindow::getRootView() const
return mRootView;
}
-LLRect LLViewerWindow::getVirtualWorldViewRect() const
+LLRect LLViewerWindow::getWorldViewRectScaled() const
{
- LLRect world_view_rect = mWorldViewRect;
+ LLRect world_view_rect = mWorldViewRectRaw;
world_view_rect.mLeft = llround((F32)world_view_rect.mLeft / mDisplayScale.mV[VX]);
world_view_rect.mRight = llround((F32)world_view_rect.mRight / mDisplayScale.mV[VX]);
world_view_rect.mBottom = llround((F32)world_view_rect.mBottom / mDisplayScale.mV[VY]);
@@ -4252,39 +4170,49 @@ LLRect LLViewerWindow::getVirtualWorldViewRect() const
return world_view_rect;
}
-S32 LLViewerWindow::getWorldViewHeight() const
+S32 LLViewerWindow::getWorldViewHeightRaw() const
{
- return mWorldViewRect.getHeight();
+ return mWorldViewRectRaw.getHeight();
}
-S32 LLViewerWindow::getWorldViewWidth() const
+S32 LLViewerWindow::getWorldViewWidthRaw() const
{
- return mWorldViewRect.getWidth();
+ return mWorldViewRectRaw.getWidth();
+}
+
+S32 LLViewerWindow::getWindowHeightScaled() const
+{
+ return mWindowRectScaled.getHeight();
+}
+
+S32 LLViewerWindow::getWindowWidthScaled() const
+{
+ return mWindowRectScaled.getWidth();
}
-S32 LLViewerWindow::getWindowDisplayHeight() const
+S32 LLViewerWindow::getWindowHeightRaw() const
{
- return mWindowRect.getHeight();
+ return mWindowRectRaw.getHeight();
}
-S32 LLViewerWindow::getWindowDisplayWidth() const
+S32 LLViewerWindow::getWindowWidthRaw() const
{
- return mWindowRect.getWidth();
+ return mWindowRectRaw.getWidth();
}
void LLViewerWindow::setup2DRender()
{
// setup ortho camera
- gl_state_for_2d(mWindowRect.getWidth(), mWindowRect.getHeight());
+ gl_state_for_2d(mWindowRectRaw.getWidth(), mWindowRectRaw.getHeight());
setup2DViewport();
}
void LLViewerWindow::setup2DViewport(S32 x_offset, S32 y_offset)
{
- gGLViewport[0] = mWindowRect.mLeft + x_offset;
- gGLViewport[1] = mWindowRect.mBottom + y_offset;
- gGLViewport[2] = mWindowRect.getWidth();
- gGLViewport[3] = mWindowRect.getHeight();
+ gGLViewport[0] = mWindowRectRaw.mLeft + x_offset;
+ gGLViewport[1] = mWindowRectRaw.mBottom + y_offset;
+ gGLViewport[2] = mWindowRectRaw.getWidth();
+ gGLViewport[3] = mWindowRectRaw.getHeight();
glViewport(gGLViewport[0], gGLViewport[1], gGLViewport[2], gGLViewport[3]);
}
@@ -4292,7 +4220,7 @@ void LLViewerWindow::setup2DViewport(S32 x_offset, S32 y_offset)
void LLViewerWindow::setup3DRender()
{
// setup perspective camera
- LLViewerCamera::getInstance()->setPerspective(NOT_FOR_SELECTION, mWorldViewRect.mLeft, mWorldViewRect.mBottom, mWorldViewRect.getWidth(), mWorldViewRect.getHeight(), FALSE, LLViewerCamera::getInstance()->getNear(), MAX_FAR_CLIP*2.f);
+ LLViewerCamera::getInstance()->setPerspective(NOT_FOR_SELECTION, mWorldViewRectRaw.mLeft, mWorldViewRectRaw.mBottom, mWorldViewRectRaw.getWidth(), mWorldViewRectRaw.getHeight(), FALSE, LLViewerCamera::getInstance()->getNear(), MAX_FAR_CLIP*2.f);
setup3DViewport();
}
@@ -4300,17 +4228,17 @@ void LLViewerWindow::setup3DViewport(S32 x_offset, S32 y_offset)
{
if (LLRenderTarget::getCurrentBoundTarget() != NULL)
{
- // don't use translation component of mWorldViewRect, as we are already in a properly sized render target
+ // don't use translation component of mWorldViewRectRaw, as we are already in a properly sized render target
gGLViewport[0] = x_offset;
gGLViewport[1] = y_offset;
}
else
{
- gGLViewport[0] = mWorldViewRect.mLeft + x_offset;
- gGLViewport[1] = mWorldViewRect.mBottom + y_offset;
+ gGLViewport[0] = mWorldViewRectRaw.mLeft + x_offset;
+ gGLViewport[1] = mWorldViewRectRaw.mBottom + y_offset;
}
- gGLViewport[2] = mWorldViewRect.getWidth();
- gGLViewport[3] = mWorldViewRect.getHeight();
+ gGLViewport[2] = mWorldViewRectRaw.getWidth();
+ gGLViewport[3] = mWorldViewRectRaw.getHeight();
glViewport(gGLViewport[0], gGLViewport[1], gGLViewport[2], gGLViewport[3]);
}
@@ -4521,8 +4449,8 @@ void LLViewerWindow::getTargetWindow(BOOL& fullscreen, S32& width, S32& height)
if (mWindow
&& mWindow->getFullscreen() == mWantFullscreen)
{
- width = getWindowDisplayWidth();
- height = getWindowDisplayHeight();
+ width = getWindowWidthRaw();
+ height = getWindowHeightRaw();
}
else if (mWantFullscreen)
{
@@ -4569,7 +4497,7 @@ BOOL LLViewerWindow::checkSettings()
getWindow()->setNativeAspectRatio(gSavedSettings.getF32("FullScreenAspectRatio"));
}
- reshape(getWindowDisplayWidth(), getWindowDisplayHeight());
+ reshape(getWindowWidthRaw(), getWindowHeightRaw());
// force aspect ratio
if (mIsFullscreenChecked)
@@ -4795,8 +4723,8 @@ F32 LLViewerWindow::getDisplayAspectRatio() const
F32 LLViewerWindow::getWorldViewAspectRatio() const
{
- F32 world_aspect = (F32)mWorldViewRect.getWidth() / (F32)mWorldViewRect.getHeight();
- //F32 window_aspect = (F32)mWindowRect.getWidth() / (F32)mWindowRect.getHeight();
+ F32 world_aspect = (F32)mWorldViewRectRaw.getWidth() / (F32)mWorldViewRectRaw.getHeight();
+ //F32 window_aspect = (F32)mWindowRectRaw.getWidth() / (F32)mWindowRectRaw.getHeight();
if (mWindow->getFullscreen())
{
return world_aspect * mWindow->getPixelAspectRatio();
@@ -4813,7 +4741,7 @@ void LLViewerWindow::calcDisplayScale()
F32 ui_scale_factor = gSavedSettings.getF32("UIScaleFactor");
LLVector2 display_scale;
display_scale.setVec(llmax(1.f / mWindow->getPixelAspectRatio(), 1.f), llmax(mWindow->getPixelAspectRatio(), 1.f));
- F32 height_normalization = gSavedSettings.getBOOL("UIAutoScale") ? ((F32)mWindowRect.getHeight() / display_scale.mV[VY]) / 768.f : 1.f;
+ F32 height_normalization = gSavedSettings.getBOOL("UIAutoScale") ? ((F32)mWindowRectRaw.getHeight() / display_scale.mV[VY]) / 768.f : 1.f;
if(mWindow->getFullscreen())
{
display_scale *= (ui_scale_factor * height_normalization);
@@ -4831,8 +4759,8 @@ void LLViewerWindow::calcDisplayScale()
if (mWindow->getFullscreen())
{
- display_scale.mV[0] = llround(display_scale.mV[0], 2.0f/(F32) mWindowRect.getWidth());
- display_scale.mV[1] = llround(display_scale.mV[1], 2.0f/(F32) mWindowRect.getHeight());
+ display_scale.mV[0] = llround(display_scale.mV[0], 2.0f/(F32) mWindowRectRaw.getWidth());
+ display_scale.mV[1] = llround(display_scale.mV[1], 2.0f/(F32) mWindowRectRaw.getHeight());
}
if (display_scale != mDisplayScale)
@@ -4857,7 +4785,7 @@ S32 LLViewerWindow::getChatConsoleBottomPad()
LLRect LLViewerWindow::getChatConsoleRect()
{
- LLRect full_window(0, getWindowHeight(), getWindowWidth(), 0);
+ LLRect full_window(0, getWindowHeightScaled(), getWindowWidthScaled(), 0);
LLRect console_rect = full_window;
const S32 CONSOLE_PADDING_TOP = 24;
@@ -4879,7 +4807,7 @@ LLRect LLViewerWindow::getChatConsoleRect()
{
// Make console rect somewhat narrow so having inventory open is
// less of a problem.
- console_rect.mRight = console_rect.mLeft + 2 * getWindowWidth() / 3;
+ console_rect.mRight = console_rect.mLeft + 2 * getWindowWidthScaled() / 3;
}
return console_rect;
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index c2906b1718..ce71ef6173 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -210,21 +210,23 @@ public:
//
LLRootView* getRootView() const;
+ // 3D world area in scaled pixels (via UI scale), use for most UI computations
+ LLRect getWorldViewRectScaled() const;
+
+ // 3D world area, in raw unscaled pixels
+ LLRect getWorldViewRectRaw() const { return mWorldViewRectRaw; }
+ S32 getWorldViewHeightRaw() const;
+ S32 getWorldViewWidthRaw() const;
+
+ // Window in scaled pixels (via UI scale), use for most UI computations
+ LLRect getWindowRectScaled() const { return mWindowRectScaled; }
+ S32 getWindowHeightScaled() const;
+ S32 getWindowWidthScaled() const;
+
// Window in raw pixels as seen on screen.
- const LLRect& getWindowRect() const { return mWindowRect; };
- // portion of window that shows 3d world
- const LLRect& getWorldViewRect() const { return mWorldViewRect; };
- LLRect getVirtualWorldViewRect() const;
- S32 getWorldViewHeight() const;
- S32 getWorldViewWidth() const;
- S32 getWindowDisplayHeight() const;
- S32 getWindowDisplayWidth() const;
-
- // Window in scaled pixels (via UI scale), use this for
- // UI elements checking size.
- const LLRect& getVirtualWindowRect() const { return mVirtualWindowRect; };
- S32 getWindowHeight() const;
- S32 getWindowWidth() const;
+ LLRect getWindowRectRaw() const { return mWindowRectRaw; }
+ S32 getWindowHeightRaw() const;
+ S32 getWindowWidthRaw() const;
LLWindow* getWindow() const { return mWindow; }
void* getPlatformWindow() const;
@@ -294,7 +296,6 @@ public:
void updateKeyboardFocus();
void updateWorldViewRect(bool use_full_window=false);
- void updateBottomTrayRect();
BOOL handleKey(KEY key, MASK mask);
void handleScrollWheel (S32 clicks);
@@ -410,10 +411,11 @@ protected:
BOOL mActive;
BOOL mWantFullscreen;
BOOL mShowFullscreenProgress;
- LLRect mWindowRect;
- LLRect mVirtualWindowRect;
- LLRect mWorldViewRect; // specifies area of screen where we render the 3D world
- LLRootView* mRootView; // a view of size mWindowRect, containing all child views
+
+ LLRect mWindowRectRaw; // whole window, including UI
+ LLRect mWindowRectScaled; // whole window, scaled by UI size
+ LLRect mWorldViewRectRaw; // area of screen for 3D world
+ LLRootView* mRootView; // a view of size mWindowRectRaw, containing all child views
LLVector2 mDisplayScale;
LLCoordGL mCurrentMousePoint; // last mouse position in GL coords
@@ -451,6 +453,8 @@ protected:
BOOL mIgnoreActivate;
std::string mInitAlert; // Window / GL initialization requires an alert
+
+ LLHandle<LLView> mWorldViewPlaceholder; // widget that spans the portion of screen dedicated to rendering the 3d world
class LLDebugText* mDebugText; // Internal class for debug text
diff --git a/indra/newview/llviewerwindowlistener.cpp b/indra/newview/llviewerwindowlistener.cpp
index 317e361c80..a890b042ae 100644
--- a/indra/newview/llviewerwindowlistener.cpp
+++ b/indra/newview/llviewerwindowlistener.cpp
@@ -50,8 +50,8 @@ void LLViewerWindowListener::saveSnapshot(const LLSD& event) const
#undef tp
// Our add() call should ensure that the incoming LLSD does in fact
// contain our required arguments. Deal with the optional ones.
- S32 width (mViewerWindow->getWindowDisplayWidth());
- S32 height(mViewerWindow->getWindowDisplayHeight());
+ S32 width (mViewerWindow->getWindowWidthRaw());
+ S32 height(mViewerWindow->getWindowHeightRaw());
if (event.has("width"))
width = event["width"].asInteger();
if (event.has("height"))
diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp
index cefc88ebee..89649407ff 100644
--- a/indra/newview/llvoicechannel.cpp
+++ b/indra/newview/llvoicechannel.cpp
@@ -46,6 +46,7 @@ LLVoiceChannel::voice_channel_map_t LLVoiceChannel::sVoiceChannelMap;
LLVoiceChannel::voice_channel_map_uri_t LLVoiceChannel::sVoiceChannelURIMap;
LLVoiceChannel* LLVoiceChannel::sCurrentVoiceChannel = NULL;
LLVoiceChannel* LLVoiceChannel::sSuspendedVoiceChannel = NULL;
+LLVoiceChannel::channel_changed_signal_t LLVoiceChannel::sCurrentVoiceChannelChangedSignal;
BOOL LLVoiceChannel::sSuspended = FALSE;
@@ -320,6 +321,8 @@ void LLVoiceChannel::activate()
{
setState(STATE_CALL_STARTED);
}
+
+ sCurrentVoiceChannelChangedSignal(this->mSessionID);
}
void LLVoiceChannel::getChannelInfo()
diff --git a/indra/newview/llvoicechannel.h b/indra/newview/llvoicechannel.h
index 8f1e9ff02d..20b6157b48 100644
--- a/indra/newview/llvoicechannel.h
+++ b/indra/newview/llvoicechannel.h
@@ -54,6 +54,13 @@ public:
typedef boost::function<void(const EState& old_state, const EState& new_state)> state_changed_callback_t;
+ // on current channel changed signal
+ typedef boost::function<void(const LLUUID& session_id)> channel_changed_callback_t;
+ typedef boost::signals2::signal<void(const LLUUID& session_id)> channel_changed_signal_t;
+ static channel_changed_signal_t sCurrentVoiceChannelChangedSignal;
+ static boost::signals2::connection setCurrentVoiceChannelChangedCallback(channel_changed_callback_t cb) { return sCurrentVoiceChannelChangedSignal.connect(cb); }
+
+
LLVoiceChannel(const LLUUID& session_id, const std::string& session_name);
virtual ~LLVoiceChannel();
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index c987dd1764..2def905bbb 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -108,6 +108,12 @@ public:
if (te->getMediaData() != NULL)
{
result = te->getMediaData()->asLLSD();
+ // XXX HACK: workaround bug in asLLSD() where whitelist is not set properly
+ // See DEV-41949
+ if (!result.has(LLMediaEntry::WHITELIST_KEY))
+ {
+ result[LLMediaEntry::WHITELIST_KEY] = LLSD::emptyArray();
+ }
}
}
return result;
@@ -1663,6 +1669,13 @@ void LLVOVolume::requestMediaDataUpdate()
sObjectMediaClient->fetchMedia(new LLMediaDataClientObjectImpl(this));
}
+bool LLVOVolume::isMediaDataBeingFetched() const
+{
+ // I know what I'm doing by const_casting this away: this is just
+ // a wrapper class that is only going to do a lookup.
+ return sObjectMediaClient->isInQueue(new LLMediaDataClientObjectImpl(const_cast<LLVOVolume*>(this)));
+}
+
void LLVOVolume::cleanUpMediaImpls()
{
// Iterate through our TEs and remove any Impls that are no longer used
diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h
index 784ef16ba3..10fc8865fc 100644
--- a/indra/newview/llvovolume.h
+++ b/indra/newview/llvovolume.h
@@ -265,7 +265,10 @@ public:
bool hasMedia() const;
LLVector3 getApproximateFaceNormal(U8 face_id);
-
+
+ // Returns 'true' iff the media data for this object is in flight
+ bool isMediaDataBeingFetched() const;
+
protected:
S32 computeLODDetail(F32 distance, F32 radius);
BOOL calcLOD();
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 2daaf77772..1129e9ffd1 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -506,12 +506,14 @@ void LLPipeline::destroyGL()
}
}
+static LLFastTimer::DeclareTimer FTM_RESIZE_SCREEN_TEXTURE("Resize Screen Texture");
void LLPipeline::resizeScreenTexture()
{
+ LLFastTimer ft(FTM_RESIZE_SCREEN_TEXTURE);
if (gPipeline.canUseVertexShaders() && assertInitialized())
{
- GLuint resX = gViewerWindow->getWorldViewWidth();
- GLuint resY = gViewerWindow->getWorldViewHeight();
+ GLuint resX = gViewerWindow->getWorldViewWidthRaw();
+ GLuint resY = gViewerWindow->getWorldViewHeightRaw();
allocateScreenBuffer(resX,resY);
@@ -696,8 +698,8 @@ void LLPipeline::createGLBuffers()
stop_glerror();
- GLuint resX = gViewerWindow->getWorldViewWidth();
- GLuint resY = gViewerWindow->getWorldViewHeight();
+ GLuint resX = gViewerWindow->getWorldViewWidthRaw();
+ GLuint resY = gViewerWindow->getWorldViewHeightRaw();
if (LLPipeline::sRenderGlow)
{ //screen space glow buffers
@@ -3049,7 +3051,7 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_PICKING))
{
LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderForSelect");
- gObjectList.renderObjectsForSelect(camera, gViewerWindow->getVirtualWindowRect());
+ gObjectList.renderObjectsForSelect(camera, gViewerWindow->getWindowRectScaled());
}
else
{
@@ -5530,8 +5532,8 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
U32 res_mod = gSavedSettings.getU32("RenderResolutionDivisor");
LLVector2 tc1(0,0);
- LLVector2 tc2((F32) gViewerWindow->getWorldViewWidth()*2,
- (F32) gViewerWindow->getWorldViewHeight()*2);
+ LLVector2 tc2((F32) gViewerWindow->getWorldViewWidthRaw()*2,
+ (F32) gViewerWindow->getWorldViewHeightRaw()*2);
if (res_mod > 1)
{
@@ -5731,14 +5733,14 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
}
- gGLViewport[0] = gViewerWindow->getWorldViewRect().mLeft;
- gGLViewport[1] = gViewerWindow->getWorldViewRect().mBottom;
- gGLViewport[2] = gViewerWindow->getWorldViewRect().getWidth();
- gGLViewport[3] = gViewerWindow->getWorldViewRect().getHeight();
+ gGLViewport[0] = gViewerWindow->getWorldViewRectRaw().mLeft;
+ gGLViewport[1] = gViewerWindow->getWorldViewRectRaw().mBottom;
+ gGLViewport[2] = gViewerWindow->getWorldViewRectRaw().getWidth();
+ gGLViewport[3] = gViewerWindow->getWorldViewRectRaw().getHeight();
glViewport(gGLViewport[0], gGLViewport[1], gGLViewport[2], gGLViewport[3]);
- tc2.setVec((F32) gViewerWindow->getWorldViewWidth(),
- (F32) gViewerWindow->getWorldViewHeight());
+ tc2.setVec((F32) gViewerWindow->getWorldViewWidthRaw(),
+ (F32) gViewerWindow->getWorldViewHeightRaw());
gGL.flush();
@@ -8742,7 +8744,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
glClearStencil(0);
// get the number of pixels per angle
- F32 pa = gViewerWindow->getWindowDisplayHeight() / (RAD_TO_DEG * LLViewerCamera::getInstance()->getView());
+ F32 pa = gViewerWindow->getWindowHeightRaw() / (RAD_TO_DEG * LLViewerCamera::getInstance()->getView());
//get resolution based on angle width and height of impostor (double desired resolution to prevent aliasing)
U32 resY = llmin(nhpo2((U32) (fov*pa)), (U32) 512);
diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml
index 572a4cf9e9..7e19a80c10 100644
--- a/indra/newview/skins/default/colors.xml
+++ b/indra/newview/skins/default/colors.xml
@@ -70,7 +70,7 @@
value="1 1 0 1" />
<color
name="Unused?"
- value="1 0 1 1" />
+ value="1 0.5 0 1" />
<color
name="Transparent"
value="0 0 0 0" />
diff --git a/indra/newview/skins/default/textures/icons/AudioMute_Off.png b/indra/newview/skins/default/textures/icons/AudioMute_Off.png
new file mode 100644
index 0000000000..938aaef491
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/AudioMute_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/AudioMute_Over.png b/indra/newview/skins/default/textures/icons/AudioMute_Over.png
new file mode 100644
index 0000000000..7bd1b12aae
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/AudioMute_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Audio_Off.png b/indra/newview/skins/default/textures/icons/Audio_Off.png
new file mode 100644
index 0000000000..ef746aab92
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Audio_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Audio_Press.png b/indra/newview/skins/default/textures/icons/Audio_Press.png
new file mode 100644
index 0000000000..25a669224a
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Audio_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/ExternalBrowser_Off.png b/indra/newview/skins/default/textures/icons/ExternalBrowser_Off.png
new file mode 100644
index 0000000000..69646ce473
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/ExternalBrowser_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Pause_Off.png b/indra/newview/skins/default/textures/icons/Pause_Off.png
new file mode 100644
index 0000000000..77f6be569d
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Pause_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Pause_Over.png b/indra/newview/skins/default/textures/icons/Pause_Over.png
new file mode 100644
index 0000000000..580808bf7e
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Pause_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Pause_Press.png b/indra/newview/skins/default/textures/icons/Pause_Press.png
new file mode 100644
index 0000000000..859db34cae
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Pause_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Play_Off.png b/indra/newview/skins/default/textures/icons/Play_Off.png
new file mode 100644
index 0000000000..e594c1a4cb
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Play_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Play_Over.png b/indra/newview/skins/default/textures/icons/Play_Over.png
new file mode 100644
index 0000000000..70ab94e8c2
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Play_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Play_Press.png b/indra/newview/skins/default/textures/icons/Play_Press.png
new file mode 100644
index 0000000000..b52742c6da
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Play_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/SkipBackward_Off.png b/indra/newview/skins/default/textures/icons/SkipBackward_Off.png
new file mode 100644
index 0000000000..8fc10e6583
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/SkipBackward_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/SkipForward_Off.png b/indra/newview/skins/default/textures/icons/SkipForward_Off.png
new file mode 100644
index 0000000000..2892e3cfa9
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/SkipForward_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/StopReload_Off.png b/indra/newview/skins/default/textures/icons/StopReload_Off.png
new file mode 100644
index 0000000000..698569a540
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/StopReload_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/StopReload_Over.png b/indra/newview/skins/default/textures/icons/StopReload_Over.png
new file mode 100644
index 0000000000..251b38630a
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/StopReload_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Zoom_Off.png b/indra/newview/skins/default/textures/icons/Zoom_Off.png
new file mode 100644
index 0000000000..d096720c9c
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Zoom_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/parcel_color_EVRY.png b/indra/newview/skins/default/textures/icons/parcel_color_EVRY.png
new file mode 100644
index 0000000000..b5508423eb
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/parcel_color_EVRY.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/parcel_color_EXP.png b/indra/newview/skins/default/textures/icons/parcel_color_EXP.png
new file mode 100644
index 0000000000..4813d37198
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/parcel_color_EXP.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/parcel_color_M.png b/indra/newview/skins/default/textures/icons/parcel_color_M.png
new file mode 100644
index 0000000000..41984c43e4
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/parcel_color_M.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/navbar/Flag.png b/indra/newview/skins/default/textures/navbar/Flag.png
new file mode 100644
index 0000000000..df53c89224
--- /dev/null
+++ b/indra/newview/skins/default/textures/navbar/Flag.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/navbar/Lock.png b/indra/newview/skins/default/textures/navbar/Lock.png
new file mode 100644
index 0000000000..cf569d6ad2
--- /dev/null
+++ b/indra/newview/skins/default/textures/navbar/Lock.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index fba8e0b06c..e881665578 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -23,6 +23,14 @@
<texture name="Arrow_Up" file_name="widgets/Arrow_Up.png" preload="true" />
<texture name="Arrow_Down" file_name="widgets/Arrow_Down.png" preload="true" />
+ <texture name="AudioMute_Off.png" file_name="icons/AudioMute_Off.png" preload="false" />
+ <texture name="AudioMute_Over.png" file_name="icons/AudioMute_Over.png" preload="false" />
+ <texture name="AudioMute_Press.png" file_name="icons/AudioMute_Press.png" preload="false" />
+
+ <texture name="Audio_Off.png" file_name="icons/Audio_Off.png" preload="false" />
+ <texture name="Audio_Over.png" file_name="icons/Audio_Over.png" preload="false" />
+ <texture name="Audio_Press.png" file_name="icons/Audio_Press.png" preload="false" />
+
<texture name="BackArrow_Disabled" file_name="icons/BackArrow_Disabled.png" preload="false" />
<texture name="BackArrow_Off" file_name="icons/BackArrow_Off.png" preload="false" />
<texture name="BackArrow_Press" file_name="icons/BackArrow_Press.png" preload="false" />
@@ -30,6 +38,8 @@
<texture name="Blank" file_name="Blank.png" preload="false" />
<texture name="BottomTray_BG" file_name="bottomtray/BottomTray_BG.png" preload="false" />
+ <texture name="BottomTray_Scroll_Right" file_name="navbar/Arrow_Right_Off.png" preload="false" />
+ <texture name="BottomTray_Scroll_Left" file_name="navbar/Arrow_Left_Off.png" preload="false" />
<texture name="BuyArrow_Off" file_name="navbar/BuyArrow_Off.png" preload="true" scale.left="1" scale.top="1" scale.right="0" scale.bottom="0" />
<texture name="BuyArrow_Over" file_name="navbar/BuyArrow_Over.png" preload="true" scale.left="1" scale.top="1" scale.right="0" scale.bottom="0" />
@@ -99,6 +109,10 @@
<texture name="DropTarget" file_name="widgets/DropTarget.png" preload="false" />
+ <texture name="ExternalBrowser_Off.png" file_name="icons/ExternalBrowser_Off.png" preload="false" />
+ <texture name="ExternalBrowser_Over.png" file_name="icons/ExternalBrowser_Over.png" preload="false" />
+ <texture name="ExternalBrowser_Press.png" file_name="icons/ExternalBrowser_Press.png" preload="false" />
+
<texture name="Favorite_Star_Active" file_name="navbar/Favorite_Star_Active.png" preload="false" />
<texture name="Favorite_Star_Off" file_name="navbar/Favorite_Star_Off.png" preload="false" />
<texture name="Favorite_Star_Press" file_name="navbar/Favorite_Star_Press.png" preload="false" />
@@ -108,6 +122,8 @@
<texture name="FileMenu_BarSelect" file_name="navbar/FileMenu_BarSelect.png" preload="false" scale.left="2" scale.top="0" scale.right="2" scale.bottom="0" />
<texture name="FileMenu_BG" file_name="navbar/FileMenu_BG.png" preload="false" />
+ <texture name="Flag" file_name="navbar/Flag.png" preload="false" />
+
<texture name="ForSale_Badge" file_name="icons/ForSale_Badge.png" preload="false" />
<texture name="ForwardArrow_Off" file_name="icons/ForwardArrow_Off.png" preload="false" />
<texture name="ForwardArrow_Press" file_name="icons/ForwardArrow_Press.png" preload="false" />
@@ -207,6 +223,7 @@
<texture name="ListItem_Over" file_name="widgets/ListItem_Over.png" preload="true" />
<texture name="Lock" file_name="icons/Lock.png" preload="false" />
+ <texture name="Lock2" file_name="navbar/Lock.png" preload="false" />
<texture name="Login_Pod" file_name="windows/Login_Pod.png" preload="true" />
@@ -277,10 +294,16 @@
<texture name="Overhead_M" file_name="world/Overhead_M.png" preload="false" />
<texture name="Overhead_S" file_name="world/Overhead_S.png" preload="false" />
+ <texture name="parcel_color_EVRY" file_name="icons/parcel_color_EVRY.png" preload="false" />
+ <texture name="parcel_color_EXP" file_name="icons/parcel_color_EXP.png" preload="false" />
+ <texture name="parcel_color_M" file_name="icons/parcel_color_M.png" preload="false" />
+
<texture name="parcel_drk_Build" file_name="icons/parcel_drk_Build.png" preload="false" />
<texture name="parcel_drk_BuildNo" file_name="icons/parcel_drk_BuildNo.png" preload="false" />
<texture name="parcel_drk_Damage" file_name="icons/parcel_drk_Damage.png" preload="false" />
<texture name="parcel_drk_DamageNo" file_name="icons/parcel_drk_DamageNo.png" preload="false" />
+ <texture name="parcel_drk_EVRY" file_name="icons/parcel_drk_EVRY.png" preload="false" />
+ <texture name="parcel_drk_EXP" file_name="icons/parcel_drk_EXP.png" preload="false" />
<texture name="parcel_drk_Fly" file_name="icons/parcel_drk_Fly.png" preload="false" />
<texture name="parcel_drk_FlyNo" file_name="icons/parcel_drk_FlyNo.png" preload="false" />
<texture name="parcel_drk_ForSale" file_name="icons/parcel_drk_ForSale.png" preload="false" />
@@ -299,6 +322,8 @@
<texture name="parcel_lght_BuildNo" file_name="icons/parcel_lght_BuildNo.png" preload="false" />
<texture name="parcel_lght_Damage" file_name="icons/parcel_lght_Damage.png" preload="false" />
<texture name="parcel_lght_DamageNo" file_name="icons/parcel_lght_DamageNo.png" preload="false" />
+ <texture name="parcel_lght_EVRY" file_name="icons/parcel_lght_EVRY.png" preload="false" />
+ <texture name="parcel_lght_EXP" file_name="icons/parcel_lght_EXP.png" preload="false" />
<texture name="parcel_lght_Fly" file_name="icons/parcel_lght_Fly.png" preload="false" />
<texture name="parcel_lght_FlyNo" file_name="icons/parcel_lght_FlyNo.png" preload="false" />
<texture name="parcel_lght_ForSale" file_name="icons/parcel_lght_ForSale.png" preload="false" />
@@ -313,6 +338,13 @@
<texture name="parcel_lght_Voice" file_name="icons/parcel_lght_Voice.png" preload="false" />
<texture name="parcel_lght_VoiceNo" file_name="icons/parcel_lght_VoiceNo.png" preload="false" />
+ <texture name="Pause_Off.png" file_name="icons/Pause_Off.png" preload="false" />
+ <texture name="Pause_Over.png" file_name="icons/Pause_Over.png" preload="false" />
+ <texture name="Pause_Press.png" file_name="icons/Pause_Press.png" preload="false" />
+ <texture name="Play_Off.png" file_name="icons/Play_Off.png" preload="false" />
+ <texture name="Play_Over.png" file_name="icons/Play_Over.png" preload="false" />
+ <texture name="Play_Press.png" file_name="icons/Play_Press.png" preload="false" />
+
<texture name="Progress_1" file_name="icons/Progress_1.png" preload="false" />
<texture name="Progress_2" file_name="icons/Progress_2.png" preload="false" />
<texture name="Progress_3" file_name="icons/Progress_3.png" preload="false" />
@@ -364,6 +396,12 @@
<texture name="ScrollTrack_Vert" file_name="widgets/ScrollTrack_Vert.png" preload="true" scale.left="2" scale.top="40" scale.bottom="13" scale.right="0" />
<texture name="ScrollTrack_Horiz" file_name="widgets/ScrollTrack_Horiz.png" preload="true" scale.left="4" scale.top="0" scale.bottom="0" scale.right="2" />
+ <texture name="ScrubberThumb_Disabled" file_name="widgets/ScrubberThumb_Disabled.png" preload="false" />
+ <texture name="ScrubberThumb_Focus" file_name="widgets/ScrubberThumb_Focus.png" preload="false" />
+ <texture name="ScrubberThumb_Off" file_name="widgets/ScrubberThumb_Off.png" preload="false" />
+ <texture name="ScrubberThumb_Over" file_name="widgets/ScrubberThumb_Over.png" preload="false" />
+ <texture name="ScrubberThumb_Press" file_name="widgets/ScrubberThumb_Press.png" preload="false" />
+
<texture name="Search" file_name="navbar/Search.png" preload="false" />
<texture name="SegmentedBtn_Left_Off" file_name="widgets/SegmentedBtn_Left_Off.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" />
@@ -387,6 +425,13 @@
<texture name="SegmentedBtn_Right_Selected_Press" file_name="widgets/SegmentedBtn_Right_Selected_Press.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" />
<texture name="SegmentedBtn_Right_Selected_Disabled" file_name="widgets/SegmentedBtn_Right_Selected_Disabled.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" />
+ <texture name="SkipBackward_Off.png" file_name="icons/SkipBackward_Off.png" preload="false" />
+ <texture name="SkipBackward_Over.png" file_name="icons/SkipBackward_Over.png" preload="false" />
+ <texture name="SkipBackward_Press.png" file_name="icons/SkipBackward_Press.png" preload="false" />
+ <texture name="SkipForward_Off.png" file_name="icons/SkipForward_Off.png" preload="false" />
+ <texture name="SkipForward_Over.png" file_name="icons/SkipForward_Over.png" preload="false" />
+ <texture name="SkipForward_Press.png" file_name="icons/SkipForward_Press.png" preload="false" />
+
<texture name="SliderTrack_Horiz" file_name="widgets/SliderTrack_Horiz.png" scale.left="4" scale.top="4" scale.right="100" scale.bottom="2" />
<texture name="SliderTrack_Vert" file_name="widgets/SliderTrack_Vert.png" scale.left="2" scale.top="100" scale.right="4" scale.bottom="4" />
<texture name="SliderThumb_Off" file_name="widgets/SliderThumb_Off.png" />
@@ -404,6 +449,10 @@
<texture name="Stepper_Up_Off" file_name="widgets/Stepper_Up_Off.png" preload="true" />
<texture name="Stepper_Up_Press" file_name="widgets/Stepper_Up_Press.png" preload="true" />
+ <texture name="StopReload_Off.png" file_name="icons/StopReload_Off.png" preload="false" />
+ <texture name="StopReload_Over.png" file_name="icons/StopReload_Over.png" preload="false" />
+ <texture name="StopReload_Press.png" file_name="icons/StopReload_Press.png" preload="false" />
+
<texture name="TabIcon_Appearance_Large" file_name="taskpanel/TabIcon_Appearance_Large.png" preload="false" />
<texture name="TabIcon_Appearance_Off" file_name="taskpanel/TabIcon_Appearance_Off.png" preload="false" />
<texture name="TabIcon_Appearance_Over" file_name="taskpanel/TabIcon_Appearance_Over.png" preload="false" />
@@ -459,6 +508,9 @@
<texture name="TextField_Disabled" file_name="widgets/TextField_Disabled.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" />
<texture name="TextField_Active" file_name="widgets/TextField_Active.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" />
+ <texture name="TimeBasedMediaBackground" file_name="windows/TimeBasedMediaBackground.png" preload="false" />
+
+
<texture name="Toast_CloseBtn" file_name="windows/Toast_CloseBtn.png" preload="true" />
<texture name="Toast_Background" file_name="windows/Toast_Background.png" preload="true"
scale.left="4" scale.top="28" scale.right="60" scale.bottom="4" />
@@ -493,6 +545,8 @@
<texture name="VoicePTT_Off" file_name="bottomtray/VoicePTT_Off.png" preload="false" />
<texture name="VoicePTT_On" file_name="bottomtray/VoicePTT_On.png" preload="false" />
+ <texture name="WebBasedMediaBackground" file_name="windows/WebBasedMediaBackground.png" preload="false" />
+
<texture name="Widget_DownArrow" file_name="icons/Widget_DownArrow.png" preload="true" />
<texture name="Widget_UpArrow" file_name="icons/Widget_UpArrow.png" preload="true" />
@@ -507,6 +561,10 @@
<texture name="YouAreHere_Badge" file_name="icons/YouAreHere_Badge.png" preload="false" />
+ <texture name="Zoom_Off.png" file_name="icons/Zoom_Off.png" preload="false" />
+ <texture name="Zoom_Over.png" file_name="icons/Zoom_Over.png" preload="false" />
+ <texture name="Zoom_Press.png" file_name="icons/Zoom_Press.png" preload="false" />
+
<!--WARNING OLD ART *do not use*-->
<texture name="btn_chatbar.tga" scale.left="20" scale.top="24" scale.right="44" scale.bottom="0" />
diff --git a/indra/newview/skins/default/xui/en/floater_aaa.xml b/indra/newview/skins/default/xui/en/floater_aaa.xml
index 4d5268681b..d0d0cc64c5 100644
--- a/indra/newview/skins/default/xui/en/floater_aaa.xml
+++ b/indra/newview/skins/default/xui/en/floater_aaa.xml
@@ -1,24 +1,9 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
- legacy_header_height="18"
- height="440"
+ height="768"
layout="topleft"
name="floater_aaa"
- help_topic="floater_aaa"
- save_rect="true"
can_resize="true"
- title="ABOUT [APP_NAME]"
- width="470">
- <text_editor
- follows="left|top|right|bottom"
- height="400"
- layout="topleft"
- left="6"
- max_length="65536"
- name="credits_editor"
- top="25"
- width="458"
- word_wrap="true">
-This is line 4
- </text_editor>
+ width="1024">
+ <panel filename="main_view.xml" follows="all" width="1024" height="768" top="0"/>
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_search.xml b/indra/newview/skins/default/xui/en/floater_search.xml
index edc1fb8838..b9cf456842 100644
--- a/indra/newview/skins/default/xui/en/floater_search.xml
+++ b/indra/newview/skins/default/xui/en/floater_search.xml
@@ -2,7 +2,7 @@
<floater
legacy_header_height="18"
can_resize="true"
- height="400"
+ height="512"
layout="topleft"
min_height="140"
min_width="467"
diff --git a/indra/newview/skins/default/xui/en/floater_test_textbox.xml b/indra/newview/skins/default/xui/en/floater_test_textbox.xml
index 8dba05f1ee..3aeb7c93e7 100644
--- a/indra/newview/skins/default/xui/en/floater_test_textbox.xml
+++ b/indra/newview/skins/default/xui/en/floater_test_textbox.xml
@@ -10,83 +10,64 @@
<text
type="string"
length="1"
- height="10"
- layout="topleft"
- left="10"
- top="30"
- width="300">
- Bottom and left specified
- </text>
- <text
- type="string"
- length="1"
- height="10"
- layout="topleft"
- left_delta="200"
- top_delta="0"
- width="300">
- Bottom delta left delta
- </text>
- <text
- type="string"
- length="1"
- height="10"
+ height="90"
layout="topleft"
left="10"
- top="50"
- width="300">
- Bottom delta -20
- </text>
- <text
- type="string"
- length="1"
- height="10"
- layout="topleft"
- left_delta="0"
top_pad="30"
width="300">
First line of multiple lines
- Second line of multiple lines
+Second line of multiple lines
+Third line of multiple lines
+Fourth line of multiple lines
+Fifth line of multiple lines
</text>
<text
top_pad="10"
left="10"
- right="-10"
+ right="-10"
+ height="20"
follows="top|left"
font.name="SansSerifSmall"
name="test_text10"
tool_tip="text">
- SansSerifSmall. Русский 中文 (简体) The quick brown fox jumped over the lazy dog.
+ SansSerifSmall
+The 华文细黑 brown fox ヒラキjumped over the lazy dog.
</text>
<text
top_pad="10"
left="10"
- right="-10"
+ right="-10"
+ height="25"
follows="top|left"
- font.name="SansSerif"
+ font.name="SansSerifMedium"
name="test_text11"
tool_tip="text">
- SansSerif. Русский 中文 (简体) The quick brown fox jumped over the lazy dog.
+ SansSerif
+The 华文细黑 brown fox ヒラキjumped over the lazy dog.
</text>
<text
top_pad="10"
left="10"
- right="-10"
+ right="-10"
follows="top|left"
+ height="26"
font.name="SansSerifLarge"
name="test_text12"
tool_tip="text">
- SansSerifLarge. Русский 中文 (简体) The quick brown fox jumped over the lazy dog.
+ SansSerifLarge
+The 华文细黑 brown fox ヒラキjumped over the lazy dog.
</text>
<text
top_pad="10"
left="10"
- right="-10"
+ height="35"
+ right="-10"
follows="top|left"
font.name="SansSerifHuge"
name="test_text13"
tool_tip="text">
- SansSerifHuge. Русский 中文 (简体) The quick brown fox jumped over the lazy dog.
+ SansSerifHuge
+The 华文细黑 brown fox ヒラキjumped over the lazy dog.
</text>
<text
type="string"
@@ -113,27 +94,6 @@
SansSerif BOLD UNDERLINE
</text>
<text
- type="string"
- length="1"
- font="SansSerif"
- height="10"
- layout="topleft"
- left_delta="0"
- top_pad="10"
- width="300">
- SansSerif UNDERLINE
- </text>
- <text
- type="string"
- length="1"
- height="10"
- layout="topleft"
- left_delta="0"
- top_pad="10"
- width="300">
- Escaped greater than &gt;
- </text>
- <text
type="string"
length="1"
bottom="390"
@@ -142,8 +102,7 @@
left="10"
name="right_aligned_text"
width="380"
- halign="right"
- text_color="1 1 1 0.7"
+ halign="right"
top_pad="10">
Right aligned text
</text>
@@ -157,21 +116,19 @@
name="centered_text"
width="380"
halign="center"
- text_color="1 1 1 0.7"
top_pad="10">
Centered text
</text>
<text
type="string"
length="1"
- height="60"
+ height="60"
label="N"
layout="topleft"
left="10"
name="left_aligned_text"
width="380"
halign="left"
- text_color="1 1 1 0.7"
top_pad="10">
Left aligned text
</text>
@@ -184,7 +141,6 @@
left="10"
name="floater_map_north"
right="30"
- text_color="1 1 1 0.7"
top="370">
N
</text>
diff --git a/indra/newview/skins/default/xui/en/fonts.xml b/indra/newview/skins/default/xui/en/fonts.xml
index f3da62a896..ebbb53729d 100644
--- a/indra/newview/skins/default/xui/en/fonts.xml
+++ b/indra/newview/skins/default/xui/en/fonts.xml
@@ -144,18 +144,18 @@
/>
<font_size name="Huge"
comment="Size of huge font (points, or 1/72 of an inch)"
- size="15.0"
+ size="16.0"
/>
<font_size name="Large"
comment="Size of large font (points, or 1/72 of an inch)"
- size="10.0"
+ size="10.6"
/>
<font_size name="Medium"
comment="Size of medium font (points, or 1/72 of an inch)"
- size="9.0"
+ size="8.6"
/>
<font_size name="Small"
comment="Size of small font (points, or 1/72 of an inch)"
- size="7.8"
+ size="7.6"
/>
</fonts>
diff --git a/indra/newview/skins/default/xui/en/main_view.xml b/indra/newview/skins/default/xui/en/main_view.xml
new file mode 100644
index 0000000000..08f7ee456e
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/main_view.xml
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<panel
+ follows="left|right|top|bottom"
+ height="768"
+ layout="topleft"
+ left="0"
+ mouse_opaque="false"
+ name="main_view"
+ width="1024">
+ <layout_stack border_size="0"
+ follows="all"
+ mouse_opaque="false"
+ height="772"
+ name="menu_stack"
+ orientation="vertical"
+ top="0">
+ <layout_panel auto_resize="false"
+ min_height="19"
+ mouse_opaque="false"
+ name="status_bar_container"
+ height="19"
+ width="1024"
+ visible="false"/>
+ <layout_panel auto_resize="false"
+ height="65"
+ mouse_opaque="false"
+ name="nav_bar_container"
+ width="1024"
+ visible="false"/>
+ <panel auto_resize="true"
+ follows="all"
+ height="500"
+ layout="topleft"
+ mouse_opaque="false"
+ name="hud"
+ width="1024">
+ <layout_stack border_size="0"
+ follows="all"
+ height="500"
+ left="0"
+ mouse_opaque="false"
+ name="hud_stack"
+ orientation="horizontal"
+ top="0"
+ width="1024">
+ <panel auto_resize="true"
+ follows="all"
+ height="500"
+ layout="topleft"
+ mouse_opaque="false"
+ name="main_view"
+ user_resize="true"
+ width="500">
+ <layout_stack border_size="0"
+ bottom="500"
+ follows="all"
+ height="500"
+ left="0"
+ mouse_opaque="false"
+ name="world_stack"
+ orientation="vertical">
+ <panel auto_resize="true"
+ follows="all"
+ height="500"
+ layout="topleft"
+ mouse_opaque="false"
+ name="hud container"
+ width="500">
+ <view bottom="500"
+ follows="all"
+ height="500"
+ left="0"
+ mouse_opaque="false"
+ name="world_view_rect"
+ width="500"/>
+ <panel follows="right|top|bottom"
+ height="500"
+ mouse_opaque="false"
+ name="side_bar_tabs"
+ right="500"
+ top="0"
+ width="32"/>
+ <panel bottom="500"
+ follows="left|right|bottom"
+ height="25"
+ left="0"
+ mouse_opaque="false"
+ name="stand_stop_flying_container"
+ visible="false"
+ width="500"/>
+ </panel>
+ <layout_panel auto_resize="false"
+ follows="all"
+ min_height="33"
+ mouse_opaque="false"
+ name="bottom_tray_container"
+ visible="false"/>
+ </layout_stack>
+ </panel>
+ <!-- side tray -->
+ <layout_panel auto_resize="false"
+ follows="all"
+ height="500"
+ min_width="333"
+ mouse_opaque="false"
+ name="side_tray_container"
+ user_resize="true"
+ visible="false"
+ width="333"/>
+ </layout_stack>
+ <floater_view follows="all"
+ height="500"
+ left="0"
+ mouse_opaque="false"
+ name="Floater View"
+ tab_group="-1"
+ tab_stop="false"
+ top="0"
+ width="1024"/>
+ <debug_view follows="all"
+ left="0"
+ top="0"
+ mouse_opaque="false"
+ height="500"
+ name="DebugView"
+ width="1024"/>
+ </panel>
+ </layout_stack>
+ <notify_box_view top="0"
+ follows="all"
+ height="768"
+ mouse_opaque="false"
+ name="notify_container"
+ tab_group="-2"
+ width="1024"/>
+ <menu_holder top="0"
+ follows="all"
+ height="768"
+ mouse_opaque="false"
+ name="Menu Holder"
+ width="1024"/>
+ <snapshot_floater_view enabled="false"
+ follows="all"
+ height="768"
+ left="0"
+ mouse_opaque="false"
+ name="Snapshot Floater View"
+ tab_stop="false"
+ top="0"
+ visible="false"
+ width="1024"/>
+ <tooltip_view top="0"
+ follows="all"
+ height="768"
+ mouse_opaque="false"
+ name="tooltip view"
+ tab_group="-2"
+ width="1024"/>
+</panel>
diff --git a/indra/newview/skins/default/xui/en/menu_participant_list.xml b/indra/newview/skins/default/xui/en/menu_participant_list.xml
new file mode 100644
index 0000000000..c3283c6014
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/menu_participant_list.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<context_menu
+ layout="topleft"
+ name="Participant List Context Menu">
+ <menu_item_check
+ label="Mute Text"
+ layout="topleft"
+ name="MuteText">
+ <on_check
+ function="ParticipantList.CheckItem"
+ parameter="is_muted" />
+ <on_click
+ function="ParticipantList.ToggleMuteText" />
+ <on_enable
+ function="ParticipantList.EnableItem"
+ parameter="can_mute_text" />
+ </menu_item_check>
+ <menu_item_check
+ label="Allow text chat"
+ layout="topleft"
+ name="AllowTextChat">
+ <on_check
+ function="ParticipantList.CheckItem"
+ parameter="is_allowed_text_chat" />
+ <on_click
+ function="ParticipantList.ToggleAllowTextChat" />
+ <on_enable
+ function="ParticipantList.EnableItem"
+ parameter="can_allow_text_chat" />
+ </menu_item_check>
+</context_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby_view_sort.xml b/indra/newview/skins/default/xui/en/menu_people_nearby_view_sort.xml
index c002cd078f..39f9e48609 100644
--- a/indra/newview/skins/default/xui/en/menu_people_nearby_view_sort.xml
+++ b/indra/newview/skins/default/xui/en/menu_people_nearby_view_sort.xml
@@ -2,15 +2,36 @@
<menu name="menu_group_plus"
left="0" bottom="0" visible="false"
mouse_opaque="false" opaque="true" color="MenuDefaultBgColor" drop_shadow="false">
- <menu_item_call name="sort_recent" label="Sort by Recent Speakers">
- <menu_item_call.on_click function="People.Nearby.ViewSort.Action" userdata="sort_recent" />
- </menu_item_call>
- <menu_item_call name="sort_name" label="Sort by Name">
- <menu_item_call.on_click function="People.Nearby.ViewSort.Action" userdata="sort_name" />
- </menu_item_call>
- <menu_item_call name="sort_distance" label="Sort by Distance">
- <menu_item_call.on_click function="People.Nearby.ViewSort.Action" userdata="sort_distance" />
- </menu_item_call>
+ <menu_item_check
+ label="Sort by Recent Speakers"
+ name="sort_by_recent_speakers">
+ <menu_item_check.on_click
+ function="People.Nearby.ViewSort.Action"
+ parameter="sort_by_recent_speakers"/>
+ <menu_item_check.on_check
+ function="People.Nearby.ViewSort.CheckItem"
+ parameter="sort_by_recent_speakers"/>
+ </menu_item_check>
+ <menu_item_check
+ label="Sort by Name"
+ name="sort_name">
+ <menu_item_check.on_click
+ function="People.Nearby.ViewSort.Action"
+ parameter="sort_name"/>
+ <menu_item_check.on_check
+ function="People.Nearby.ViewSort.CheckItem"
+ parameter="sort_name"/>
+ </menu_item_check>
+ <menu_item_check
+ label="Sort by Distance"
+ name="sort_distance">
+ <menu_item_check.on_click
+ function="People.Nearby.ViewSort.Action"
+ parameter="sort_distance"/>
+ <menu_item_check.on_check
+ function="People.Nearby.ViewSort.CheckItem"
+ parameter="sort_distance"/>
+ </menu_item_check>
<menu_item_separator layout="topleft" />
<menu_item_check name="view_icons" label="View People Icons">
<menu_item_check.on_click
diff --git a/indra/newview/skins/default/xui/en/menu_picks_plus.xml b/indra/newview/skins/default/xui/en/menu_picks_plus.xml
new file mode 100644
index 0000000000..3065239615
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/menu_picks_plus.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<toggleable_menu
+ height="201"
+ layout="topleft"
+ mouse_opaque="false"
+ name="picks_plus_menu"
+ width="120">
+ <menu_item_call
+ name="create_pick"
+ label="New Pick">
+ <menu_item_call.on_click
+ function="Picks.Plus.Action"
+ userdata="new_pick" />
+ </menu_item_call>
+ <menu_item_call
+ name="create_classified"
+ label="New Classified">
+ <menu_item_call.on_click
+ function="Picks.Plus.Action"
+ userdata="new_classified" />
+ </menu_item_call>
+</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 1499095bcc..e98a6d57bb 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -843,18 +843,18 @@
<menu_item_call.on_click
function="Floater.Toggle"
parameter="perm_prefs" />
- <menu_item_check
- label="Show Advanced Permissions"
- layout="topleft"
- name="DebugPermissions">
- <menu_item_check.on_check
- function="CheckControl"
- parameter="DebugPermissions" />
- <menu_item_check.on_click
- function="ToggleControl"
- parameter="DebugPermissions" />
- </menu_item_check>
</menu_item_call>
+ <menu_item_check
+ label="Show Advanced Permissions"
+ layout="topleft"
+ name="DebugPermissions">
+ <menu_item_check.on_check
+ function="CheckControl"
+ parameter="DebugPermissions" />
+ <menu_item_check.on_click
+ function="ToggleControl"
+ parameter="DebugPermissions" />
+ </menu_item_check>
<!--menu_item_call
label="Show Script Warning/Error Window"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 989dc88851..ccd8bc569e 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -3051,6 +3051,18 @@ Teleport to [PICK]?
</notification>
<notification
+ icon="alertmodal.tga"
+ name="TeleportToClassified"
+ type="alertmodal">
+ Teleport to [CLASSIFIED]?
+ <usetemplate
+ ignoretext="Confirm that I want to teleport to a location in Classifieds"
+ name="okcancelignore"
+ notext="Cancel"
+ yestext="Teleport"/>
+ </notification>
+
+ <notification
icon="alert.tga"
label="Message everyone in your Estate"
name="MessageEstate"
diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
index c5e129cf2f..ca6d8334a2 100644
--- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml
+++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
@@ -31,6 +31,7 @@
height="10"
image_name="spacer24.tga"
layout="topleft"
+ min_width="4"
left="0"
top="0"
width="4" />
@@ -44,7 +45,7 @@
min_height="23"
width="310"
top="0"
- min_width="300"
+ min_width="310"
name="chat_bar"
user_resize="false"
filename="panel_nearby_chat_bar.xml" />
@@ -55,34 +56,35 @@
height="28"
layout="topleft"
min_height="28"
- width="100"
+ width="104"
top_delta="0"
- min_width="96"
+ min_width="104"
name="speak_panel"
user_resize="false">
- <talk_button
- follows="right"
- height="23"
- speak_button.tab_stop="true"
- show_button.tab_stop="true"
- layout="topleft"
- left="0"
- name="talk"
- top="3"
+ <talk_button
+ follows="right"
+ height="23"
+ speak_button.tab_stop="true"
+ show_button.tab_stop="true"
+ layout="topleft"
+ left="0"
+ name="talk"
+ top="3"
width="100"
speak_button.tool_tip="Turns microphone on/off"
show_button.tool_tip="Shows/hides voice control panel" />
</layout_panel>
- <icon
- auto_resize="false"
- follows="left|right"
- height="10"
- image_name="spacer24.tga"
- layout="topleft"
- left="0"
- name="DUMMY"
- top="0"
- width="4"/>
+ <icon
+ auto_resize="false"
+ follows="left|right"
+ height="10"
+ image_name="spacer24.tga"
+ layout="topleft"
+ left="0"
+ name="DUMMY"
+ min_width="4"
+ top="0"
+ width="4"/>
<layout_panel
mouse_opaque="false"
auto_resize="false"
@@ -115,6 +117,7 @@
image_name="spacer24.tga"
layout="topleft"
left="0"
+ min_width="4"
name="DUMMY"
top="0"
width="4"/>
@@ -152,6 +155,7 @@
image_name="spacer24.tga"
layout="topleft"
left="0"
+ min_width="4"
name="DUMMY"
top="0"
width="4"/>
@@ -191,6 +195,7 @@
image_name="spacer24.tga"
layout="topleft"
left="0"
+ min_width="4"
name="DUMMY"
top="0"
width="4"/>
@@ -203,7 +208,7 @@
name="snapshot_panel"
width="40">
<button
- follows="left|right"
+ follows="left|right"
height="23"
left="0"
label=""
@@ -212,9 +217,12 @@
width="36"
top="3"
image_overlay="Snapshot_Off"
- tool_tip="Take snapshot"
- />
- </layout_panel>
+ tool_tip="Take snapshot">
+ <button.commit_callback
+ function="Floater.Toggle"
+ parameter="snapshot" />
+ </button>
+ </layout_panel>
<layout_panel
mouse_opaque="false"
follows="left|right"
@@ -236,7 +244,32 @@
top="0"
chiclet_padding="3"
scrolling_offset="40"
- width="189" />
+ width="189">
+ <button
+ auto_resize="true"
+ follows="right"
+ height="23"
+ image_selected="BottomTray_Scroll_Left"
+ image_unselected="BottomTray_Scroll_Left"
+ layout="topleft"
+ name="chicklet_left_scroll_button"
+ tab_stop="false"
+ top="3"
+ visible="false"
+ width="20" />
+ <button
+ auto_resize="true"
+ follows="right"
+ height="23"
+ image_selected="BottomTray_Scroll_Right"
+ image_unselected="BottomTray_Scroll_Right"
+ layout="topleft"
+ name="chicklet_right_scroll_button"
+ tab_stop="false"
+ top="3"
+ visible="false"
+ width="20" />
+ </chiclet_panel>
</layout_panel>
<icon
auto_resize="false"
@@ -246,6 +279,7 @@
image_name="spacer24.tga"
layout="topleft"
left="0"
+ min_width="4"
top="0"
width="5"/>
<layout_panel
@@ -291,6 +325,7 @@
height="10"
image_name="spacer24.tga"
layout="topleft"
+ min_width="4"
right="-1"
top="0"
width="26"/>
diff --git a/indra/newview/skins/default/xui/en/panel_classified_info.xml b/indra/newview/skins/default/xui/en/panel_classified_info.xml
new file mode 100644
index 0000000000..bdca8531dc
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_classified_info.xml
@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<panel
+ background_visible="true"
+ follows="all"
+ height="570"
+ layout="topleft"
+ left="0"
+ min_height="350"
+ name="panel_classified_info"
+ top="0"
+ width="333">
+ <panel.string
+ name="type_mature">
+ Mature
+ </panel.string>
+ <panel.string
+ name="type_pg">
+ PG Content
+ </panel.string>
+ <button
+ follows="top|right"
+ height="23"
+ image_overlay="BackArrow_Off"
+ layout="topleft"
+ name="back_btn"
+ picture_style="true"
+ left="10"
+ tab_stop="false"
+ top="2"
+ width="23" />
+ <text
+ follows="top|left|right"
+ font="SansSerifHugeBold"
+ height="26"
+ layout="topleft"
+ left_pad="10"
+ name="title"
+ text_color="white"
+ top="0"
+ value="Classified Info"
+ use_ellipses="true"
+ width="275" />
+ <scroll_container
+ color="DkGray2"
+ opaque="true"
+ follows="all"
+ height="500"
+ layout="topleft"
+ left="10"
+ top_pad="10"
+ name="profile_scroll"
+ reserve_scroll_corner="false"
+ width="313">
+ <panel
+ name="scroll_content_panel"
+ follows="left|top"
+ min_height="300"
+ layout="topleft"
+ top="0"
+ background_visible="false"
+ height="500"
+ left="0"
+ width="295">
+ <texture_picker
+ enabled="false"
+ follows="left|top"
+ height="197"
+ layout="topleft"
+ left="10"
+ name="classified_snapshot"
+ top="20"
+ width="290" />
+ <text
+ follows="left|top|right"
+ height="35"
+ width="290"
+ layout="topleft"
+ font="SansSerifBig"
+ font.style="BOLD"
+ left="10"
+ top_pad="10"
+ name="classified_name"
+ text_color="white"
+ value="[name]"
+ use_ellipses="true" />
+ <text
+ follows="left|top"
+ height="25"
+ layout="topleft"
+ left="10"
+ name="classified_location"
+ width="290"
+ word_wrap="true"
+ value="[loading...]" />
+ <text
+ follows="left|top|right"
+ height="18"
+ layout="topleft"
+ left="10"
+ name="content_type"
+ width="290"
+ top_pad="5"
+ value="[content type]" />
+ <text
+ follows="left|top|right"
+ height="18"
+ layout="topleft"
+ left="10"
+ name="category"
+ width="290"
+ top_pad="5"
+ value="[category]" />
+ <check_box
+ enabled="false"
+ height="16"
+ label="Auto renew each week"
+ layout="topleft"
+ left="10"
+ name="auto_renew"
+ top_pad="5"
+ width="290" />
+ <text
+ follows="left|top"
+ halign="left"
+ height="16"
+ layout="topleft"
+ left="10"
+ name="price_for_listing"
+ top_pad="5"
+ tool_tip="Price for listing."
+ width="105">
+ L$[PRICE]
+ </text>
+ <text
+ follows="left|top|right"
+ height="200"
+ layout="topleft"
+ left="10"
+ name="classified_desc"
+ width="290"
+ value="[description]"
+ word_wrap="true" />
+ </panel>
+ </scroll_container>
+ <panel
+ follows="left|right|bottom"
+ height="20"
+ layout="topleft"
+ top_pad="8"
+ left="10"
+ name="buttons">
+ <button
+ follows="bottom|left"
+ font="SansSerifSmall"
+ height="19"
+ label="Teleport"
+ layout="topleft"
+ left="0"
+ name="teleport_btn"
+ top="0"
+ width="90" />
+ <button
+ follows="bottom|left"
+ font="SansSerifSmall"
+ height="19"
+ label="Map"
+ layout="topleft"
+ left_pad="10"
+ name="show_on_map_btn"
+ top="0"
+ width="90" />
+ <button
+ follows="bottom|left"
+ font="SansSerifSmall"
+ height="19"
+ label="Edit"
+ layout="topleft"
+ right="-1"
+ name="edit_btn"
+ top="0"
+ width="90" />
+ </panel>
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_classifieds_list_item.xml b/indra/newview/skins/default/xui/en/panel_classifieds_list_item.xml
new file mode 100644
index 0000000000..ee333be0cb
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_classifieds_list_item.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<panel
+ bevel_style="none"
+ follows="top|left|right"
+ height="85"
+ layout="topleft"
+ left="0"
+ name="classified_item"
+ top="0"
+ width="313">
+ <icon
+ follows="all"
+ height="85"
+ image_name="ListItem_Over"
+ right="-3"
+ mouse_opaque="false"
+ name="hovered_icon"
+ top="1"
+ scale_image="true"
+ visible="false"
+ width="307"/>
+ <icon
+ follows="all"
+ height="85"
+ image_name="ListItem_Select"
+ right="-3"
+ mouse_opaque="false"
+ name="selected_icon"
+ top="1"
+ scale_image="true"
+ visible="false"
+ width="307"/>
+ <texture_picker
+ allow_no_texture="true"
+ border_enabled="true"
+ default_image_name="TabIcon_Places_Large"
+ enabled="false"
+ follows="left|top"
+ height="80"
+ layout="topleft"
+ left="10"
+ mouse_opaque="false"
+ name="picture"
+ tab_stop="false"
+ top="10"
+ top_pad="10"
+ width="90" />
+ <text
+ follows="top|left|right"
+ font="SansSerifSmallBold"
+ height="16"
+ layout="topleft"
+ left="110"
+ name="name"
+ text_color="white"
+ top="9"
+ use_ellipses="false"
+ width="197"
+ word_wrap="false" />
+ <expandable_text
+ follows="top|left|right"
+ font="SansSerifSmall"
+ height="40"
+ layout="topleft"
+ left="110"
+ name="description"
+ top_pad="3"
+ width="178"
+ word_wrap="true" />
+ <button
+ follows="top|right"
+ height="16"
+ image_selected="BuyArrow_Press"
+ image_pressed="BuyArrow_Press"
+ image_unselected="BuyArrow_Press"
+ layout="topleft"
+ name="info_chevron"
+ picture_style="true"
+ right="-7"
+ tab_stop="false"
+ top="27"
+ width="16" />
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_edit_classified.xml b/indra/newview/skins/default/xui/en/panel_edit_classified.xml
new file mode 100644
index 0000000000..2f3277804f
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_edit_classified.xml
@@ -0,0 +1,255 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<panel
+ background_visible="true"
+ bevel_style="in"
+ follows="left|top|right|bottom"
+ height="570"
+ label="Edit Classified"
+ layout="topleft"
+ left="0"
+ min_height="350"
+ name="panel_edit_classified"
+ top="0"
+ width="333">
+ <panel.string
+ name="location_notice">
+ (will update after save)
+ </panel.string>
+ <button
+ follows="top|right"
+ height="23"
+ image_overlay="BackArrow_Off"
+ layout="topleft"
+ name="back_btn"
+ picture_style="true"
+ left="10"
+ tab_stop="false"
+ top="2"
+ width="23" />
+ <text
+ type="string"
+ length="1"
+ follows="top"
+ font="SansSerifHuge"
+ height="15"
+ layout="topleft"
+ left_pad="10"
+ name="title"
+ text_color="white"
+ top="5"
+ width="250">
+ Edit Classified
+ </text>
+ <scroll_container
+ color="DkGray2"
+ follows="all"
+ height="510"
+ layout="topleft"
+ left="10"
+ top_pad="10"
+ name="profile_scroll"
+ reserve_scroll_corner="false"
+ opaque="true"
+ width="313">
+ <panel
+ name="scroll_content_panel"
+ follows="left|top"
+ min_height="300"
+ layout="topleft"
+ top="0"
+ background_visible="false"
+ height="600"
+ left="0"
+ width="295">
+ <texture_picker
+ follows="left|top|right"
+ height="197"
+ width="290"
+ layout="topleft"
+ top="20"
+ left="10"
+ name="classified_snapshot" />
+ <icon
+ height="18"
+ image_name="AddItem_Off"
+ layout="topleft"
+ right="-5"
+ name="edit_icon"
+ label=""
+ tool_tip="Click to select an image"
+ top="27"
+ width="18" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="15"
+ font="SansSerifSmall"
+ font.style="BOLD"
+ layout="topleft"
+ left="10"
+ top="215"
+ name="Name:"
+ text_color="white"
+ width="290">
+ Title:
+ </text>
+ <line_editor
+ follows="left|top|right"
+ font="SansSerif"
+ height="20"
+ layout="topleft"
+ left="10"
+ top_pad="2"
+ max_length="63"
+ name="classified_name"
+ text_color="black"
+ width="290" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="15"
+ font="SansSerifSmall"
+ font.style="BOLD"
+ layout="topleft"
+ left="10"
+ top_pad="20"
+ name="description_label"
+ text_color="white"
+ width="290">
+ Description:
+ </text>
+ <text_editor
+ follows="left|top|right"
+ height="100"
+ width="290"
+ hide_scrollbar="false"
+ layout="topleft"
+ left="10"
+ top_pad="2"
+ max_length="1023"
+ name="classified_desc"
+ text_color="black"
+ word_wrap="true" />
+ <text
+ type="string"
+ length="1"
+ font="SansSerifSmall"
+ font.style="BOLD"
+ follows="left|top"
+ height="15"
+ layout="topleft"
+ left="10"
+ name="location_label"
+ text_color="white"
+ top_pad="20"
+ width="290">
+ Location:
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="50"
+ layout="topleft"
+ left="10"
+ name="classified_location"
+ right="-10"
+ top_pad="2"
+ width="290"
+ word_wrap="true">
+ loading...
+ </text>
+ <button
+ follows="left|top"
+ height="20"
+ label="Set to Current Location"
+ layout="topleft"
+ left="8"
+ top_pad="5"
+ name="set_to_curr_location_btn"
+ width="200" />
+ <combo_box
+ follows="left|top"
+ height="18"
+ label=""
+ left="10"
+ name="category"
+ top_pad="5"
+ width="200" />
+ <combo_box
+ allow_text_entry="false"
+ follows="left|top"
+ height="18"
+ left="10"
+ name="content_type"
+ top_pad="5"
+ width="200">
+ <combo_item
+ name="mature_ci"
+ value="Mature">
+ Mature Content
+ </combo_item>
+ <combo_item
+ name="pg_ci"
+ value="PG">
+ PG Content
+ </combo_item>
+ </combo_box>
+ <spinner
+ decimal_digits="0"
+ follows="left|top"
+ halign="left"
+ height="16"
+ increment="1"
+ label_width="20"
+ label="L$"
+ layout="topleft"
+ left="10"
+ value="50"
+ min_val="50"
+ max_val="99999"
+ name="price_for_listing"
+ top_pad="5"
+ tool_tip="Price for listing."
+ width="105" />
+ <check_box
+ height="16"
+ label="Auto renew each week"
+ layout="topleft"
+ left="10"
+ name="auto_renew"
+ top_pad="5"
+ width="250" />
+ </panel>
+ </scroll_container>
+ <panel
+ follows="left|right|bottom"
+ height="20"
+ label="bottom_panel"
+ layout="topleft"
+ left="10"
+ name="bottom_panel"
+ top_pad="5"
+ width="303">
+ <button
+ follows="bottom|left"
+ height="19"
+ label="Save"
+ layout="topleft"
+ name="save_changes_btn"
+ left="0"
+ top="0"
+ width="130" />
+ <button
+ follows="bottom|left"
+ height="19"
+ label="Cancel"
+ layout="topleft"
+ name="cancel_btn"
+ left_pad="5"
+ right="-1"
+ width="130" />
+ </panel>
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_edit_pick.xml b/indra/newview/skins/default/xui/en/panel_edit_pick.xml
index f4a212ba0a..d6de5af32d 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_pick.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_pick.xml
@@ -53,7 +53,7 @@
layout="topleft"
top="0"
background_visible="false"
- height="470"
+ height="510"
left="0"
width="295">
<texture_picker
diff --git a/indra/newview/skins/default/xui/en/panel_group_notify.xml b/indra/newview/skins/default/xui/en/panel_group_notify.xml
index bd98996ae1..ef3120174e 100644
--- a/indra/newview/skins/default/xui/en/panel_group_notify.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_notify.xml
@@ -25,7 +25,7 @@
name="subject"
text_color="GroupNotifyTextColor"
font="SansSerifBig"
- top="60"
+ top="40"
use_ellipses="true"
value="subject"
width="300"
diff --git a/indra/newview/skins/default/xui/en/panel_landmark_info.xml b/indra/newview/skins/default/xui/en/panel_landmark_info.xml
index 0c24adfad5..b01ddbf75a 100644
--- a/indra/newview/skins/default/xui/en/panel_landmark_info.xml
+++ b/indra/newview/skins/default/xui/en/panel_landmark_info.xml
@@ -43,6 +43,16 @@
name="acquired_date">
[wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local]
</string>
+ <!-- Texture names for rating icons -->
+ <string
+ name="icon_PG"
+ value="parcel_drk_PG" />
+ <string
+ name="icon_M"
+ value="parcel_drk_M" />
+ <string
+ name="icon_R"
+ value="parcel_drk_R" />
<button
follows="top|right"
height="23"
@@ -125,6 +135,24 @@
top_pad="10"
value="Du waltz die spritz"
width="300" />
+ <icon
+ follows="top|left"
+ height="16"
+ image_name="unknown"
+ layout="topleft"
+ left="10"
+ name="maturity_icon"
+ top_pad="10"
+ width="18" />
+ <text
+ follows="right|top"
+ height="16"
+ layout="topleft"
+ left_pad="8"
+ name="maturity_value"
+ top_delta="0"
+ value="unknown"
+ width="268" />
<panel
follows="left|top|right"
height="55"
diff --git a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml
index 7128c20038..a12797d96b 100644
--- a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml
@@ -43,11 +43,13 @@
<button
follows="right"
is_toggle="true"
- width="45"
+ width="20"
top="0"
layout="topleft"
- left_pad="8"
- label="Log"
+ left_pad="4 "
+ image_disabled="ComboButton_UpOff"
+ image_unselected="ComboButton_UpOff"
+ image_selected="ComboButton_UpSelected"
height="23"
name="show_nearby_chat"
tool_tip="Shows/hides nearby chat log">
diff --git a/indra/newview/skins/default/xui/en/panel_picks.xml b/indra/newview/skins/default/xui/en/panel_picks.xml
index ae61852f68..dbe76e553b 100644
--- a/indra/newview/skins/default/xui/en/panel_picks.xml
+++ b/indra/newview/skins/default/xui/en/panel_picks.xml
@@ -8,16 +8,57 @@
name="panel_picks"
top="0"
width="313">
+ <string
+ name="no_picks"
+ value="No Picks" />
+ <string
+ name="no_classifieds"
+ value="No Classifieds" />
+
+ <accordion
+ follows="all"
+ height="465"
+ layout="topleft"
+ left="0"
+ name="accordion"
+ top="0"
+ width="313">
+ <accordion_tab
+ can_resize="false"
+ layout="topleft"
+ height="235"
+ min_height="150"
+ name="tab_picks"
+ title="Picks"
+ visible="false">
<flat_list_view
color="DkGray2"
follows="all"
- height="465"
layout="topleft"
left="0"
name="picks_list"
opaque="true"
top="0"
width="313" />
+ </accordion_tab>
+ <accordion_tab
+ can_resize="false"
+ layout="topleft"
+ height="235"
+ name="tab_classifieds"
+ title="Classified"
+ visible="false">
+ <flat_list_view
+ color="DkGray2"
+ follows="all"
+ layout="topleft"
+ left="0"
+ name="classifieds_list"
+ opaque="true"
+ top="0"
+ width="313" />
+ </accordion_tab>
+ </accordion>
<panel
background_visible="true"
bevel_style="none"
diff --git a/indra/newview/skins/default/xui/en/panel_place_profile.xml b/indra/newview/skins/default/xui/en/panel_place_profile.xml
index 65f150b33c..e6084202d7 100644
--- a/indra/newview/skins/default/xui/en/panel_place_profile.xml
+++ b/indra/newview/skins/default/xui/en/panel_place_profile.xml
@@ -179,7 +179,6 @@
min_height="300"
name="scrolling_panel"
top="0"
- value="&gt;"
width="313">
<texture_picker
enabled="false"
@@ -296,6 +295,24 @@
top_delta="0"
value="Alex Superduperlongenamenton"
width="205" />
+ <icon
+ follows="top|left"
+ height="16"
+ image_name="unknown"
+ layout="topleft"
+ left="10"
+ name="maturity_icon"
+ top_delta="0"
+ width="18" />
+ <text
+ follows="right|top"
+ height="16"
+ layout="topleft"
+ left_pad="8"
+ name="maturity_value"
+ top_delta="0"
+ value="unknown"
+ width="268" />
<accordion
follows="all"
height="230"
@@ -308,222 +325,211 @@
layout="topleft"
name="parcel_characteristics_tab"
title="Parcel">
- <scroll_container
- color="DkGray2"
+ <panel
follows="all"
- height="132"
+ height="160"
layout="topleft"
left="0"
- name="parcel_scroll"
- opaque="true"
top="0"
- width="290">
- <panel
- follows="all"
- height="165"
+ width="275">
+ <icon
+ follows="top|left"
+ height="16"
+ image_name="parcel_drk_PG"
layout="topleft"
- left="0"
+ left="10"
+ name="rating_icon"
top="0"
- width="275">
- <icon
- follows="top|left"
- height="16"
- image_name="parcel_drk_PG"
- layout="topleft"
- left="20"
- name="rating_icon"
- top="0"
- width="18" />
- <text
- follows="left|top"
- height="16"
- layout="topleft"
- left_pad="8"
- name="rating_label"
- value="Rating:"
- width="80" />
- <text
- follows="right|top"
- height="16"
- layout="topleft"
- left_pad="0"
- name="rating_value"
- top_delta="0"
- value="unknown"
- width="120" />
- <icon
- follows="top|left"
- height="18"
- image_name="parcel_drk_Voice"
- layout="topleft"
- left="20"
- name="voice_icon"
- top_pad="5"
- width="22" />
- <text
- follows="left|top"
- height="18"
- layout="topleft"
- left_pad="8"
- name="voice_label"
- top_delta="0"
- value="Voice:"
- width="76" />
- <text
- follows="right|top"
- height="18"
- layout="topleft"
- left_pad="0"
- name="voice_value"
- top_delta="0"
- value="On"
- width="60" />
- <icon
- follows="top|left"
- height="18"
- image_name="parcel_drk_Fly"
- layout="topleft"
- left="20"
- name="fly_icon"
- top_pad="3"
- width="22" />
- <text
- follows="left|top"
- height="16"
- layout="topleft"
- left_pad="8"
- name="fly_label"
- value="Fly:"
- width="76" />
- <text
- follows="right|top"
- height="16"
- layout="topleft"
- left_pad="0"
- name="fly_value"
- top_delta="0"
- value="On"
- width="60" />
- <icon
- follows="top|left"
- height="18"
- image_name="parcel_drk_Push"
- layout="topleft"
- left="20"
- name="push_icon"
- top_pad="3"
- width="22" />
- <text
- follows="left|top"
- height="14"
- layout="topleft"
- left_pad="8"
- name="push_label"
- value="Push:"
- width="76" />
- <text
- follows="right|top"
- height="14"
- layout="topleft"
- left_pad="0"
- name="push_value"
- top_delta="0"
- value="Off"
- width="60" />
- <icon
- follows="top|left"
- height="18"
- image_name="parcel_drk_Build"
- layout="topleft"
- left="20"
- name="build_icon"
- top_pad="3"
- width="22" />
- <text
- follows="left|top"
- height="14"
- layout="topleft"
- left_pad="8"
- name="build_label"
- value="Build:"
- width="76" />
- <text
- follows="right|top"
- height="15"
- layout="topleft"
- left_pad="0"
- name="build_value"
- top_delta="0"
- value="On"
- width="60" />
- <icon
- follows="top|left"
- height="18"
- image_name="parcel_drk_Scripts"
- layout="topleft"
- left="20"
- name="scripts_icon"
- top_pad="3"
- width="22" />
- <text
- follows="left|top"
- height="14"
- layout="topleft"
- left_pad="8"
- name="scripts_label"
- value="Scripts:"
- width="76" />
- <text
- follows="right|top"
- height="14"
- layout="topleft"
- left_pad="0"
- name="scripts_value"
- top_delta="0"
- value="On"
- width="60" />
- <icon
- follows="top|left"
- height="18"
- image_name="parcel_drk_Damage"
- layout="topleft"
- left="20"
- name="damage_icon"
- top_pad="7"
- width="22" />
- <text
- follows="left|top"
- height="14"
- layout="topleft"
- left_pad="8"
- name="damage_label"
- value="Damage:"
- width="76" />
- <text
- follows="right|top"
- height="14"
- layout="topleft"
- left_pad="0"
- name="damage_value"
- top_delta="0"
- value="Off"
- width="60" />
- <button
- follows="bottom|right"
- height="19"
- label="About Land"
- layout="topleft"
- name="about_land_btn"
- right="-5"
- tab_stop="false"
- top="138"
- width="90">
- <click_callback
- function="ShowFloater"
- parameter="about_land" />
- </button>
- </panel>
- </scroll_container>
+ width="18" />
+ <text
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left_pad="12"
+ name="rating_label"
+ value="Rating:"
+ width="60" />
+ <text
+ follows="left|right|top"
+ height="16"
+ layout="topleft"
+ left_pad="0"
+ name="rating_value"
+ top_delta="0"
+ value="unknown"
+ width="60" />
+ <icon
+ follows="top|left"
+ height="18"
+ image_name="parcel_drk_Voice"
+ layout="topleft"
+ left="10"
+ name="voice_icon"
+ top_pad="5"
+ width="22" />
+ <text
+ follows="left|top"
+ height="18"
+ layout="topleft"
+ left_pad="8"
+ name="voice_label"
+ top_delta="0"
+ value="Voice:"
+ width="60" />
+ <text
+ follows="left|right|top"
+ height="18"
+ layout="topleft"
+ left_pad="0"
+ name="voice_value"
+ top_delta="0"
+ value="On"
+ width="60" />
+ <icon
+ follows="top|left"
+ height="18"
+ image_name="parcel_drk_Fly"
+ layout="topleft"
+ left="10"
+ name="fly_icon"
+ top_pad="3"
+ width="22" />
+ <text
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ left_pad="8"
+ name="fly_label"
+ value="Fly:"
+ width="60" />
+ <text
+ follows="left|right|top"
+ height="16"
+ layout="topleft"
+ left_pad="0"
+ name="fly_value"
+ top_delta="0"
+ value="On"
+ width="60" />
+ <icon
+ follows="top|left"
+ height="18"
+ image_name="parcel_drk_Push"
+ layout="topleft"
+ left="10"
+ name="push_icon"
+ top_pad="3"
+ width="22" />
+ <text
+ follows="left|top"
+ height="14"
+ layout="topleft"
+ left_pad="8"
+ name="push_label"
+ value="Push:"
+ width="60" />
+ <text
+ follows="left|right|top"
+ height="14"
+ layout="topleft"
+ left_pad="0"
+ name="push_value"
+ top_delta="0"
+ value="Off"
+ width="60" />
+ <icon
+ follows="top|left"
+ height="18"
+ image_name="parcel_drk_Build"
+ layout="topleft"
+ left="10"
+ name="build_icon"
+ top_pad="3"
+ width="22" />
+ <text
+ follows="left|top"
+ height="14"
+ layout="topleft"
+ left_pad="8"
+ name="build_label"
+ value="Build:"
+ width="60" />
+ <text
+ follows="left|right|top"
+ height="15"
+ layout="topleft"
+ left_pad="0"
+ name="build_value"
+ top_delta="0"
+ value="On"
+ width="60" />
+ <icon
+ follows="top|left"
+ height="18"
+ image_name="parcel_drk_Scripts"
+ layout="topleft"
+ left="10"
+ name="scripts_icon"
+ top_pad="3"
+ width="22" />
+ <text
+ follows="left|top"
+ height="14"
+ layout="topleft"
+ left_pad="8"
+ name="scripts_label"
+ value="Scripts:"
+ width="60" />
+ <text
+ follows="left|right|top"
+ height="14"
+ layout="topleft"
+ left_pad="0"
+ name="scripts_value"
+ top_delta="0"
+ value="On"
+ width="60" />
+ <icon
+ follows="top|left"
+ height="18"
+ image_name="parcel_drk_Damage"
+ layout="topleft"
+ left="10"
+ name="damage_icon"
+ top_pad="7"
+ width="22" />
+ <text
+ follows="left|top"
+ height="14"
+ layout="topleft"
+ left_pad="8"
+ name="damage_label"
+ value="Damage:"
+ width="60" />
+ <text
+ follows="left|right|top"
+ height="14"
+ layout="topleft"
+ left_pad="0"
+ name="damage_value"
+ top_delta="0"
+ value="Off"
+ width="60" />
+ <button
+ follows="bottom|right"
+ height="19"
+ label="About Land"
+ layout="topleft"
+ name="about_land_btn"
+ right="-5"
+ tab_stop="false"
+ top="138"
+ width="90">
+ <click_callback
+ function="ShowFloater"
+ parameter="about_land" />
+ </button>
+ </panel>
</accordion_tab>
<accordion_tab
expanded="false"
@@ -545,7 +551,7 @@
name="region_name_label"
top_pad="5"
value="Region:"
- width="80" />
+ width="90" />
<text
follows="left|top|right"
height="15"
@@ -554,7 +560,7 @@
name="region_name"
top_delta="0"
value="Mooseland"
- width="195" />
+ width="187" />
<text
follows="left|top"
height="15"
@@ -563,7 +569,7 @@
name="region_type_label"
top_pad="5"
value="Type:"
- width="80" />
+ width="90" />
<text
follows="left|top|right"
height="15"
@@ -572,7 +578,7 @@
name="region_type"
top_delta="0"
value="Moose"
- width="195" />
+ width="187" />
<text
follows="left|top"
height="15"
@@ -581,7 +587,7 @@
name="region_rating_label"
top_pad="7"
value="Rating:"
- width="80" />
+ width="90" />
<icon
follows="top|left"
height="16"
@@ -597,7 +603,7 @@
left_pad="10"
name="region_rating"
value="Explicit"
- width="100" />
+ width="159" />
<text
follows="left|top"
height="15"
@@ -606,7 +612,7 @@
name="region_owner_label"
top_pad="5"
value="Owner:"
- width="80" />
+ width="90" />
<text
follows="left|top|right"
height="15"
@@ -615,7 +621,7 @@
name="region_owner"
top_delta="0"
value="moose Van Moose"
- width="195" />
+ width="187" />
<text
follows="left|top"
height="15"
@@ -624,7 +630,7 @@
name="region_group_label"
top_pad="5"
value="Group:"
- width="80" />
+ width="90" />
<text
follows="left|top|right"
height="15"
@@ -633,7 +639,7 @@
name="region_group"
top_delta="0"
use_ellipses="true"
- width="195">
+ width="187">
The Mighty Moose of mooseville soundvillemoose
</text>
<button
@@ -671,15 +677,15 @@
name="estate_name_label"
top_pad="5"
value="Estate:"
- width="80" />
+ width="90" />
<text
follows="left|top|right"
height="15"
layout="topleft"
- left="90"
+ left_pad="0"
name="estate_name"
top_delta="0"
- width="160" />
+ width="187" />
<text
follows="left|top"
height="15"
@@ -688,15 +694,15 @@
name="estate_rating_label"
top_pad="5"
value="Rating:"
- width="80" />
+ width="90" />
<text
follows="left|top|right"
height="15"
layout="topleft"
- left="90"
+ left_pad="0"
name="estate_rating"
top_delta="0"
- width="160" />
+ width="187" />
<text
follows="left|top"
height="15"
@@ -705,15 +711,15 @@
name="estate_owner_label"
top_pad="5"
value="Owner:"
- width="80" />
+ width="90" />
<text
follows="left|top|right"
height="15"
layout="topleft"
- left="90"
+ left_pad="0"
name="estate_owner"
top_delta="0"
- width="160" />
+ width="187" />
<text
follows="left|top"
height="15"
@@ -722,7 +728,7 @@
name="covenant_label"
top_pad="5"
value="Covenant:"
- width="220" />
+ width="277" />
<text_editor
bg_focus_color="DkGray2"
bg_readonly_color="DkGray2"
@@ -735,7 +741,8 @@
name="covenant"
read_only="true"
top_pad="0"
- width="280" />
+ width="277"
+ word_wrap="true" />
</panel>
</accordion_tab>
<accordion_tab
@@ -758,15 +765,15 @@
name="sales_price_label"
top_pad="5"
value="Price:"
- width="100" />
+ width="90" />
<text
follows="left|top|right"
height="15"
layout="topleft"
- left="110"
+ left_pad="0"
name="sales_price"
top_delta="0"
- width="140" />
+ width="187" />
<text
follows="left|top"
height="15"
@@ -775,15 +782,15 @@
name="area_label"
top_pad="5"
value="Area:"
- width="100" />
+ width="90" />
<text
follows="left|top|right"
height="15"
layout="topleft"
- left="110"
+ left_pad="0"
name="area"
top_delta="0"
- width="140" />
+ width="187" />
<text
follows="left|top"
height="15"
@@ -792,15 +799,15 @@
name="traffic_label"
top_pad="5"
value="Traffic:"
- width="100" />
+ width="90" />
<text
follows="left|top|right"
height="15"
layout="topleft"
- left="110"
+ left_pad="0"
name="traffic"
top_delta="0"
- width="140" />
+ width="187" />
<text
follows="left|top"
height="15"
@@ -809,15 +816,15 @@
name="primitives_label"
top_pad="5"
value="Primitives:"
- width="100" />
+ width="90" />
<text
follows="left|top|right"
height="15"
layout="topleft"
- left="110"
+ left_pad="0"
name="primitives"
top_delta="0"
- width="140" />
+ width="187" />
<text
follows="left|top"
height="15"
@@ -826,15 +833,15 @@
name="parcel_scripts_label"
top_pad="5"
value="Scripts:"
- width="100" />
+ width="90" />
<text
follows="left|top|right"
height="15"
layout="topleft"
- left="110"
+ left_pad="0"
name="parcel_scripts"
top_delta="0"
- width="140" />
+ width="187" />
<text
follows="left|top"
height="15"
@@ -843,15 +850,15 @@
name="terraform_limits_label"
top_pad="5"
value="Terraform limits:"
- width="100" />
+ width="90" />
<text
follows="left|top|right"
height="15"
layout="topleft"
- left="110"
+ left_pad="0"
name="terraform_limits"
top_delta="0"
- width="140" />
+ width="187" />
<text
follows="left|top"
height="15"
@@ -860,7 +867,7 @@
name="subdivide_label"
top_pad="5"
value="Subdivide/Join ability:"
- width="220" />
+ width="277" />
<text_editor
bg_focus_color="DkGray2"
bg_readonly_color="DkGray2"
@@ -872,7 +879,8 @@
name="subdivide"
read_only="true"
top_pad="5"
- width="245" />
+ width="277"
+ word_wrap="true" />
<text
follows="left|top"
height="15"
@@ -881,7 +889,7 @@
name="resale_label"
top_pad="5"
value="ReSale ability:"
- width="80" />
+ width="277" />
<text_editor
bg_focus_color="DkGray2"
bg_readonly_color="DkGray2"
@@ -893,7 +901,8 @@
name="resale"
read_only="true"
top_pad="5"
- width="245" />
+ width="277"
+ word_wrap="true" />
<text
follows="left|top"
height="15"
@@ -902,15 +911,15 @@
name="sale_to_label"
top_pad="5"
value="For sale to:"
- width="80" />
+ width="90" />
<text
follows="left|top|right"
height="15"
layout="topleft"
- left="90"
+ left_pad="0"
name="sale_to"
top_delta="0"
- width="160" />
+ width="187" />
</panel>
</accordion_tab>
</accordion>
diff --git a/indra/newview/skins/default/xui/en/panel_places.xml b/indra/newview/skins/default/xui/en/panel_places.xml
index cbbcfe5068..5efacb68be 100644
--- a/indra/newview/skins/default/xui/en/panel_places.xml
+++ b/indra/newview/skins/default/xui/en/panel_places.xml
@@ -104,7 +104,7 @@ background_visible="true"
follows="bottom|right"
font="SansSerifSmall"
height="19"
- image_disabled="ForwardArrow_Disabled"
+ image_disabled="ForwardArrow_Off"
image_selected="ForwardArrow_Press"
image_unselected="ForwardArrow_Off"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
index 06f0710406..0ac0521b10 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
@@ -284,7 +284,7 @@ Avatars:
enabled_control="EnableVoiceChat"
control_name="PushToTalkToggle"
height="20"
- label="Toggle mode for microphone when I press the Speak trigger key:"
+ label="Toggle mode for microphone when I press the speak trigger key:"
layout="topleft"
left="30"
name="push_to_talk_toggle_check"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
index 645863e7a4..5a4b0a3892 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
@@ -45,14 +45,20 @@
<color_swatch
border_color="0.45098 0.517647 0.607843 1"
can_apply_immediately="true"
- control_name="UserChatColor"
follows="left|top"
height="47"
layout="topleft"
left="30"
name="user"
top_pad="10"
- width="44" />
+ width="44" >
+ <color_swatch.init_callback
+ function="Pref.getUIColor"
+ parameter="UserChatColor" />
+ <color_swatch.commit_callback
+ function="Pref.applyUIColor"
+ parameter="UserChatColor" />
+ </color_swatch>
<text
type="string"
length="1"
@@ -69,14 +75,20 @@
<color_swatch
border_color="0.45098 0.517647 0.607843 1"
can_apply_immediately="true"
- control_name="AgentChatColor"
follows="left|top"
height="47"
layout="topleft"
left="180"
name="agent"
top_pad="-17"
- width="44" />
+ width="44" >
+ <color_swatch.init_callback
+ function="Pref.getUIColor"
+ parameter="AgentChatColor" />
+ <color_swatch.commit_callback
+ function="Pref.applyUIColor"
+ parameter="AgentChatColor" />
+ </color_swatch>
<text
type="string"
length="1"
@@ -94,7 +106,6 @@
border_color="0.45098 0.517647 0.607843 1"
can_apply_immediately="true"
color="0.6 0.6 1 1"
- control_name="IMChatColor"
follows="left|top"
height="47"
label_width="60"
@@ -102,8 +113,15 @@
left="350"
name="im"
top_pad="-17"
- width="44" />
- <text
+ width="44">
+ <color_swatch.init_callback
+ function="Pref.getUIColor"
+ parameter="IMChatColor" />
+ <color_swatch.commit_callback
+ function="Pref.applyUIColor"
+ parameter="IMChatColor" />
+ </color_swatch>
+ <text
type="string"
length="1"
follows="left|top"
@@ -120,7 +138,6 @@
border_color="0.45098 0.517647 0.607843 1"
can_apply_immediately="true"
color="0.8 1 1 1"
- control_name="SystemChatColor"
follows="left|top"
height="47"
label_width="44"
@@ -128,7 +145,14 @@
left="30"
name="system"
top_pad="40"
- width="44" />
+ width="44" >
+ <color_swatch.init_callback
+ function="Pref.getUIColor"
+ parameter="SystemChatColor" />
+ <color_swatch.commit_callback
+ function="Pref.applyUIColor"
+ parameter="SystemChatColor" />
+ </color_swatch>
<text
type="string"
length="1"
@@ -146,14 +170,20 @@
border_color="0.45098 0.517647 0.607843 1"
can_apply_immediately="true"
color="0.82 0.82 0.99 1"
- control_name="ScriptErrorColor"
follows="left|top"
height="47"
layout="topleft"
left="180"
name="script_error"
top_pad="-17"
- width="44" />
+ width="44">
+ <color_swatch.init_callback
+ function="Pref.getUIColor"
+ parameter="ScriptErrorColor" />
+ <color_swatch.commit_callback
+ function="Pref.applyUIColor"
+ parameter="ScriptErrorColor" />
+ </color_swatch>
<text
type="string"
length="1"
@@ -171,14 +201,20 @@
border_color="0.45098 0.517647 0.607843 1"
can_apply_immediately="true"
color="0.7 0.9 0.7 1"
- control_name="ObjectChatColor"
follows="left|top"
height="47"
layout="topleft"
left="350"
name="objects"
top_pad="-17"
- width="44" />
+ width="44" >
+ <color_swatch.init_callback
+ function="Pref.getUIColor"
+ parameter="ObjectChatColor" />
+ <color_swatch.commit_callback
+ function="Pref.applyUIColor"
+ parameter="ObjectChatColor" />
+ </color_swatch>
<text
type="string"
length="1"
@@ -196,14 +232,20 @@
border_color="0.45098 0.517647 0.607843 1"
can_apply_immediately="true"
color="0.7 0.9 0.7 1"
- control_name="llOwnerSayChatColor"
follows="left|top"
height="47"
layout="topleft"
left="30"
name="owner"
top_pad="40"
- width="44" />
+ width="44" >
+ <color_swatch.init_callback
+ function="Pref.getUIColor"
+ parameter="llOwnerSayChatColor" />
+ <color_swatch.commit_callback
+ function="Pref.applyUIColor"
+ parameter="llOwnerSayChatColor" />
+ </color_swatch>
<text
type="string"
length="1"
@@ -221,14 +263,20 @@
border_color="0.45098 0.517647 0.607843 1"
can_apply_immediately="true"
color="0.6 0.6 1 1"
- control_name="HTMLLinkColor"
follows="left|top"
height="47"
layout="topleft"
left="180"
name="links"
top_pad="-17"
- width="44" />
+ width="44" >
+ <color_swatch.init_callback
+ function="Pref.getUIColor"
+ parameter="HTMLLinkColor" />
+ <color_swatch.commit_callback
+ function="Pref.applyUIColor"
+ parameter="HTMLLinkColor" />
+ </color_swatch>
<text
type="string"
length="1"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_general.xml b/indra/newview/skins/default/xui/en/panel_preferences_general.xml
index 975d21aaa6..a6ca73d4b7 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml
@@ -305,7 +305,7 @@
name="effects_color_textbox"
top_pad="5"
width="400">
- My Effects:
+ My effects:
</text>
<color_swatch
border_color="0.45098 0.517647 0.607843 1"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
index b1308a1942..9b10edde33 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
@@ -109,19 +109,7 @@
name="ui_scale_slider"
top_pad="2"
width="180" />
- <spinner
- control_name="UIScaleFactor"
- height="16"
- increment="0.025"
- initial_value="1"
- layout="topleft"
- left_pad="10"
- max_val="1.4"
- min_val="0.75"
- name="ui_scale_slider"
- top_delta="0"
- width="58" />
- <text
+ <text
type="string"
length="1"
follows="left|top"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml
index acf4601bfe..8c22a5e483 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml
@@ -208,7 +208,7 @@
<button
follows="left|bottom"
height="20"
- label="Block List"
+ label="Block list"
layout="topleft"
left="30"
name="block_list"
diff --git a/indra/newview/skins/default/xui/en/panel_stand_stop_flying.xml b/indra/newview/skins/default/xui/en/panel_stand_stop_flying.xml
index c8703aa895..b48943c699 100644
--- a/indra/newview/skins/default/xui/en/panel_stand_stop_flying.xml
+++ b/indra/newview/skins/default/xui/en/panel_stand_stop_flying.xml
@@ -5,7 +5,7 @@
layout="topleft"
name="panel_stand_stop_flying"
mouse_opaque="false"
- visible="false"
+ visible="true"
width="115">
<button
follows="left|bottom"
diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml
index 7b9c9f47a2..1171a8f0b5 100644
--- a/indra/newview/skins/default/xui/en/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml
@@ -3,7 +3,7 @@
background_opaque="true"
background_visible="true"
bg_opaque_color="MouseGray"
- follows="top|left|right"
+ follows="all"
height="19"
layout="topleft"
left="0"
diff --git a/indra/newview/skins/default/xui/en/widgets/context_menu.xml b/indra/newview/skins/default/xui/en/widgets/context_menu.xml
new file mode 100644
index 0000000000..459706c689
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/widgets/context_menu.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<context_menu visible="false"/>
diff --git a/indra/newview/skins/default/xui/en/widgets/inspector.xml b/indra/newview/skins/default/xui/en/widgets/inspector.xml
new file mode 100644
index 0000000000..61950d7554
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/widgets/inspector.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<!-- See also settings.xml UIFloater* settings for configuration -->
+<inspector name="inspector"
+ bg_opaque_color="ToolTipBgColor"
+ background_visible="true"
+ bg_opaque_image="none"
+ bg_alpha_image="none"
+ />
diff --git a/indra/newview/skins/default/xui/en/widgets/scroll_column_header.xml b/indra/newview/skins/default/xui/en/widgets/scroll_column_header.xml
new file mode 100644
index 0000000000..0794b49a0c
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/widgets/scroll_column_header.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<scroll_column_header image_unselected="square_btn_32x128.tga"
+ image_selected="square_btn_selected_32x128.tga"
+ image_disabled="square_btn_32x128.tga"
+ image_disabled_selected="square_btn_selected_32x128.tga"
+ image_overlay="combobox_arrow.tga"
+ image_overlay_alignment="right"
+ halign="left"
+ scale_image="true"/>
diff --git a/indra/newview/skins/default/xui/en/widgets/side_tray.xml b/indra/newview/skins/default/xui/en/widgets/side_tray.xml
index 8b4a5afbe9..022564c12f 100644
--- a/indra/newview/skins/default/xui/en/widgets/side_tray.xml
+++ b/indra/newview/skins/default/xui/en/widgets/side_tray.xml
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<side_tray tab_btn_image="TaskPanel_Tab_Off"
- tab_btn_image_selected="TaskPanel_Tab_Selected"
- tab_btn_width="32"
- tab_btn_height="40"
- tab_btn_margin="1"
- >
+ tab_btn_image_selected="TaskPanel_Tab_Selected"
+ tab_btn_width="32"
+ tab_btn_height="40"
+ tab_btn_margin="1">
</side_tray>
diff --git a/indra/newview/skins/default/xui/en/widgets/toggleable_menu.xml b/indra/newview/skins/default/xui/en/widgets/toggleable_menu.xml
new file mode 100644
index 0000000000..48950a98ad
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/widgets/toggleable_menu.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<toggleable_menu visible="false"/>
diff --git a/indra/newview/tests/llmediadataclient_test.cpp b/indra/newview/tests/llmediadataclient_test.cpp
index 445ec7aa34..3ac631d96e 100644
--- a/indra/newview/tests/llmediadataclient_test.cpp
+++ b/indra/newview/tests/llmediadataclient_test.cpp
@@ -497,5 +497,38 @@ namespace tut
ensure("REF COUNT", o->getNumRefs(), 1);
}
-
+ template<> template<>
+ void mediadataclient_object_t::test<7>()
+ {
+ // Test LLMediaDataClient::isInQueue()
+ LOG_TEST(7);
+
+ LLMediaDataClientObject::ptr_t o1 = new LLMediaDataClientObjectTest(
+ _DATA(VALID_OBJECT_ID_1,"3.0","1.0"));
+ LLMediaDataClientObject::ptr_t o2 = new LLMediaDataClientObjectTest(
+ _DATA(VALID_OBJECT_ID_2,"1.0","1.0"));
+ int num_refs_start = o1->getNumRefs();
+ {
+ LLPointer<LLObjectMediaDataClient> mdc = new LLObjectMediaDataClient(NO_PERIOD,NO_PERIOD);
+
+ ensure("not in queue yet 1", ! mdc->isInQueue(o1));
+ ensure("not in queue yet 2", ! mdc->isInQueue(o2));
+
+ mdc->fetchMedia(o1);
+
+ ensure("is in queue", mdc->isInQueue(o1));
+ ensure("is not in queue", ! mdc->isInQueue(o2));
+
+ ::pump_timers();
+
+ ensure("not in queue anymore", ! mdc->isInQueue(o1));
+ ensure("still is not in queue", ! mdc->isInQueue(o2));
+
+ ensure("queue empty", mdc->isEmpty());
+ }
+
+ // Make sure everyone's destroyed properly
+ ensure("REF COUNT", o1->getNumRefs(), num_refs_start);
+
+ }
}
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index b85d31d1ac..7e5c30a978 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -231,8 +231,21 @@ class WindowsManifest(ViewerManifest):
'llplugin', 'slplugin', self.args['configuration'], "slplugin.exe"),
"slplugin.exe")
- # need to get the llcommon.dll from the build directory as well
- if self.prefix(src=self.args['configuration'], dst=""):
+ self.disable_manifest_check()
+
+ # Get shared libs from the shared libs staging directory
+ if self.prefix(src=os.path.join(os.pardir, 'sharedlibs', self.args['configuration']),
+ dst=""):
+
+ self.enable_crt_manifest_check()
+
+ # Get kdu dll, continue if missing.
+ try:
+ self.path('%s/llkdu.dll' % self.args['configuration'], dst='llkdu.dll')
+ except RuntimeError:
+ print "Skipping llkdu.dll"
+
+ # Get llcommon and deps. If missing assume static linkage and continue.
try:
self.path('llcommon.dll')
self.path('libapr-1.dll')
@@ -242,22 +255,41 @@ class WindowsManifest(ViewerManifest):
print err.message
print "Skipping llcommon.dll (assuming llcommon was linked statically)"
- self.end_prefix()
+ self.disable_manifest_check()
- # need to get the kdu dll from the build directory as well
- try:
- self.path('%s/llkdu.dll' % self.args['configuration'], dst='llkdu.dll')
- except RuntimeError:
- print "Skipping llkdu.dll"
-
- self.disable_manifest_check()
-
- # For textures
- if self.prefix(src=self.args['configuration'], dst=""):
- if(self.args['configuration'].lower() == 'debug'):
+ # For textures
+ if self.args['configuration'].lower() == 'debug':
self.path("openjpegd.dll")
else:
self.path("openjpeg.dll")
+
+ # These need to be installed as a SxS assembly, currently a 'private' assembly.
+ # See http://msdn.microsoft.com/en-us/library/ms235291(VS.80).aspx
+ if self.args['configuration'].lower() == 'debug':
+ self.path("msvcr80d.dll")
+ self.path("msvcp80d.dll")
+ self.path("Microsoft.VC80.DebugCRT.manifest")
+ else:
+ self.path("msvcr80.dll")
+ self.path("msvcp80.dll")
+ self.path("Microsoft.VC80.CRT.manifest")
+
+ # Vivox runtimes
+ self.path("SLVoice.exe")
+ self.path("alut.dll")
+ self.path("vivoxsdk.dll")
+ self.path("ortp.dll")
+ self.path("wrap_oal.dll")
+
+ # For google-perftools tcmalloc allocator.
+ try:
+ if self.args['configuration'].lower() == 'debug':
+ self.path('libtcmalloc_minimal-debug.dll')
+ else:
+ self.path('libtcmalloc_minimal.dll')
+ except:
+ print "Skipping libtcmalloc_minimal.dll"
+
self.end_prefix()
self.path(src="licenses-win32.txt", dst="licenses.txt")
@@ -270,6 +302,7 @@ class WindowsManifest(ViewerManifest):
self.path("fmod.dll")
self.enable_no_crt_manifest_check()
+
# Media plugins - QuickTime
if self.prefix(src='../media_plugins/quicktime/%s' % self.args['configuration'], dst="llplugin"):
self.path("media_plugin_quicktime.dll")
@@ -302,28 +335,6 @@ class WindowsManifest(ViewerManifest):
self.disable_manifest_check()
- # These need to be installed as a SxS assembly, currently a 'private' assembly.
- # See http://msdn.microsoft.com/en-us/library/ms235291(VS.80).aspx
- if self.prefix(src=self.args['configuration'], dst=""):
- if self.args['configuration'] == 'Debug':
- self.path("msvcr80d.dll")
- self.path("msvcp80d.dll")
- self.path("Microsoft.VC80.DebugCRT.manifest")
- else:
- self.path("msvcr80.dll")
- self.path("msvcp80.dll")
- self.path("Microsoft.VC80.CRT.manifest")
- self.end_prefix()
-
- # Vivox runtimes
- if self.prefix(src=self.args['configuration'], dst=""):
- self.path("SLVoice.exe")
- self.path("alut.dll")
- self.path("vivoxsdk.dll")
- self.path("ortp.dll")
- self.path("wrap_oal.dll")
- self.end_prefix()
-
# pull in the crash logger and updater from other projects
# tag:"crash-logger" here as a cue to the exporter
self.path(src='../win_crash_logger/%s/windows-crash-logger.exe' % self.args['configuration'],
@@ -331,17 +342,6 @@ class WindowsManifest(ViewerManifest):
self.path(src='../win_updater/%s/windows-updater.exe' % self.args['configuration'],
dst="updater.exe")
- # For google-perftools tcmalloc allocator.
- if self.prefix(src=self.args['configuration'], dst=""):
- try:
- if self.args['configuration'] == 'Debug':
- self.path('libtcmalloc_minimal-debug.dll')
- else:
- self.path('libtcmalloc_minimal.dll')
- except:
- print "Skipping libtcmalloc_minimal.dll"
- self.end_prefix()
-
def nsi_file_commands(self, install=True):
def wpath(path):
if path.endswith('/') or path.endswith(os.path.sep):
diff --git a/indra/test_apps/llplugintest/CMakeLists.txt b/indra/test_apps/llplugintest/CMakeLists.txt
index 53b981cccd..0011daaec6 100644
--- a/indra/test_apps/llplugintest/CMakeLists.txt
+++ b/indra/test_apps/llplugintest/CMakeLists.txt
@@ -7,6 +7,7 @@ include(FindOpenGL)
include(LLCommon)
include(LLPlugin)
include(Linking)
+include(LLSharedLibs)
include(PluginAPI)
include(LLImage)
include(LLMath)
@@ -324,27 +325,7 @@ if (DARWIN)
make_directory
${PLUGINS_DESTINATION_DIR}
COMMENT "Creating Resources directory in app bundle."
- )
-
- # copy the llcommon dylib and its dependencies to Contents/Resources.
- get_target_property(BUILT_LLCOMMON llcommon LOCATION)
- add_custom_command(TARGET llmediaplugintest POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy ${BUILT_LLCOMMON} ${PLUGINS_DESTINATION_DIR}
- DEPENDS ${BUILT_LLCOMMON}
- )
- # FIXME: these paths should come from somewhere reliable. The canonical list seems to be in indra/newview/viewer_manifest.py
- add_custom_command(TARGET llmediaplugintest POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy ${ARCH_PREBUILT_DIRS_RELEASE}/libapr-1.0.3.7.dylib ${PLUGINS_DESTINATION_DIR}
- DEPENDS ${ARCH_PREBUILT_DIRS_RELEASE}/libapr-1.0.3.7.dylib
- )
- add_custom_command(TARGET llmediaplugintest POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy ${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.0.3.8.dylib ${PLUGINS_DESTINATION_DIR}
- DEPENDS ${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.0.3.8.dylib
- )
- add_custom_command(TARGET llmediaplugintest POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy ${ARCH_PREBUILT_DIRS_RELEASE}/libexpat.0.5.0.dylib ${PLUGINS_DESTINATION_DIR}
- DEPENDS ${ARCH_PREBUILT_DIRS_RELEASE}/libexpat.0.5.0.dylib
- )
+ )
else (DARWIN)
set(PLUGINS_DESTINATION_DIR
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/
@@ -497,22 +478,14 @@ if(WINDOWS)
${plugintest_release_files}
)
set(plugin_test_targets ${plugin_test_targets} ${out_targets})
-
- copy_if_different(
- "${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}"
- "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}"
- out_targets
- llcommon.dll libapr-1.dll libaprutil-1.dll libapriconv-1.dll
- )
- set(plugin_test_targets ${plugin_test_targets} ${out_targets})
-
- add_custom_target(copy_plugintest_libs ALL
- DEPENDS
- ${plugin_test_targets}
- llcommon
- )
+
+ add_custom_target(copy_plugintest_libs ALL
+ DEPENDS
+ ${plugin_test_targets}
+ )
add_dependencies(llmediaplugintest copy_plugintest_libs)
endif(WINDOWS)
+ll_deploy_sharedlibs_command(llmediaplugintest)
diff --git a/indra/win_crash_logger/CMakeLists.txt b/indra/win_crash_logger/CMakeLists.txt
index 0bd59f0990..990dc6783e 100644
--- a/indra/win_crash_logger/CMakeLists.txt
+++ b/indra/win_crash_logger/CMakeLists.txt
@@ -11,6 +11,7 @@ include(LLVFS)
include(LLWindow)
include(LLXML)
include(Linking)
+include(LLSharedLibs)
include_directories(
${LLCOMMON_INCLUDE_DIRS}
@@ -87,3 +88,5 @@ if (WINDOWS)
LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\""
)
endif (WINDOWS)
+
+ll_deploy_sharedlibs_command(windows-crash-logger) \ No newline at end of file
diff --git a/indra/win_updater/CMakeLists.txt b/indra/win_updater/CMakeLists.txt
index dedb7cfcc7..82347adf20 100644
--- a/indra/win_updater/CMakeLists.txt
+++ b/indra/win_updater/CMakeLists.txt
@@ -33,3 +33,6 @@ set_target_properties(windows-updater
LINK_FLAGS "/NODEFAULTLIB:LIBCMT"
LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\""
)
+
+# The windows-updater doesn't link against anything non-system, apparently
+#ll_deploy_sharedlibs_command(windows-updater) \ No newline at end of file
diff --git a/install.xml b/install.xml
index 6d40d6fe4e..ff9fa80500 100644
--- a/install.xml
+++ b/install.xml
@@ -1269,7 +1269,7 @@ anguage Infrstructure (CLI) international standard</string>
<key>quicktime</key>
<map>
<key>copyright</key>
- <string>Copyright (C) 1990-2006 by Apple Computer, Inc., all rights reserved.</string>
+ <string>Copyright (C) 1990-2007 by Apple Computer, Inc., all rights reserved.</string>
<key>description</key>
<string>Separate download. Used to play in-world video clips on a prim. </string>
<key>license</key>
@@ -1279,9 +1279,9 @@ anguage Infrstructure (CLI) international standard</string>
<key>windows</key>
<map>
<key>md5sum</key>
- <string>7a2e6fc89b1ef027f3a36ebb46fb0c8a</string>
+ <string>be45825cc14ede53790ac93c58307dcb</string>
<key>url</key>
- <uri>scp:install-packages.lindenlab.com:/local/www/install-packages/doc/quicktime-windows-20080611.tar.bz2</uri>
+ <uri>scp:install-packages.lindenlab.com:/local/www/install-packages/doc/quicktime-sdk-windows-7.3-20091110.tar.bz2</uri>
</map>
</map>
</map>