summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRick Pasetto <rick@lindenlab.com>2009-10-26 13:05:54 -0700
committerRick Pasetto <rick@lindenlab.com>2009-10-26 13:05:54 -0700
commit1d67a9084199910d35a44ac427a07fc1d9d6a4fd (patch)
tree4d942a13d1fd358a8a10a67554ea9a85b7f04c6f /indra/newview
parent19fc3fb32c3cd95fcfb5708b59b5620e506c5179 (diff)
parente84ff39e4c7c5b028a6b8b4f6dc5d37c525eb1c4 (diff)
merge with remote repo
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/CMakeLists.txt16
-rw-r--r--indra/newview/app_settings/foldertypes.xml6
-rw-r--r--indra/newview/app_settings/settings.xml59
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/blurLightF.glsl16
-rw-r--r--indra/newview/llagentpicksinfo.cpp130
-rw-r--r--indra/newview/llagentpicksinfo.h106
-rw-r--r--indra/newview/llagentwearables.cpp79
-rw-r--r--indra/newview/llagentwearables.h8
-rw-r--r--indra/newview/llappearancemgr.cpp46
-rw-r--r--indra/newview/llappearancemgr.h2
-rw-r--r--indra/newview/llappviewer.cpp7
-rw-r--r--indra/newview/llavatariconctrl.cpp2
-rw-r--r--indra/newview/llavatarlist.cpp27
-rw-r--r--indra/newview/llavatarlist.h8
-rw-r--r--indra/newview/llavatarlistitem.cpp13
-rw-r--r--indra/newview/llavatarlistitem.h5
-rw-r--r--indra/newview/llavatarpropertiesprocessor.cpp13
-rw-r--r--indra/newview/llavatarpropertiesprocessor.h4
-rw-r--r--indra/newview/llbottomtray.cpp228
-rw-r--r--indra/newview/llbottomtray.h18
-rw-r--r--indra/newview/llcapabilitylistener.cpp23
-rw-r--r--indra/newview/llcapabilitylistener.h23
-rw-r--r--indra/newview/llcapabilityprovider.h23
-rw-r--r--indra/newview/llchannelmanager.cpp13
-rw-r--r--indra/newview/llchathistory.cpp12
-rw-r--r--indra/newview/llchiclet.cpp158
-rw-r--r--indra/newview/llchiclet.h80
-rw-r--r--indra/newview/llconfirmationmanager.cpp1
-rw-r--r--indra/newview/lldndbutton.cpp60
-rw-r--r--indra/newview/lldndbutton.h89
-rw-r--r--indra/newview/lldriverparam.cpp19
-rw-r--r--indra/newview/lldriverparam.h4
-rw-r--r--indra/newview/llface.inl7
-rw-r--r--indra/newview/llfavoritesbar.cpp6
-rw-r--r--indra/newview/llfirstuse.cpp4
-rw-r--r--indra/newview/llfloateravatartextures.cpp20
-rw-r--r--indra/newview/llfloaterbuyland.cpp16
-rw-r--r--indra/newview/llfloatercamera.cpp53
-rw-r--r--indra/newview/llfloatercamera.h18
-rw-r--r--indra/newview/llfloaterinventory.cpp84
-rw-r--r--indra/newview/llfloaterinventory.h14
-rw-r--r--indra/newview/llfloaterland.cpp6
-rw-r--r--indra/newview/llfloaterproperties.cpp1
-rw-r--r--indra/newview/llfloaterregioninfo.cpp153
-rw-r--r--indra/newview/llfloaterregioninfo.h18
-rw-r--r--indra/newview/llfloateruipreview.cpp53
-rw-r--r--indra/newview/llfolderview.cpp10
-rw-r--r--indra/newview/llfolderviewitem.cpp6
-rw-r--r--indra/newview/llfolderviewitem.h1
-rw-r--r--indra/newview/llfriendcard.cpp87
-rw-r--r--indra/newview/llfriendcard.h6
-rw-r--r--indra/newview/llgrouplist.cpp9
-rw-r--r--indra/newview/llgrouplist.h1
-rw-r--r--indra/newview/llimfloater.cpp81
-rw-r--r--indra/newview/llimfloater.h17
-rw-r--r--indra/newview/llimpanel.cpp20
-rw-r--r--indra/newview/llimpanel.h4
-rw-r--r--indra/newview/llimview.cpp148
-rw-r--r--indra/newview/llimview.h44
-rw-r--r--indra/newview/llinventorybridge.cpp170
-rw-r--r--indra/newview/llinventorybridge.h1
-rw-r--r--indra/newview/llinventorymodel.cpp37
-rw-r--r--indra/newview/llinventorymodel.h11
-rw-r--r--indra/newview/lllocaltextureobject.cpp16
-rw-r--r--indra/newview/lllocaltextureobject.h11
-rw-r--r--indra/newview/lllocationinputctrl.cpp2
-rw-r--r--indra/newview/llmediactrl.cpp90
-rw-r--r--indra/newview/llmediactrl.h2
-rw-r--r--indra/newview/llmimetypes.cpp1
-rw-r--r--indra/newview/llmoveview.cpp10
-rw-r--r--indra/newview/llmoveview.h4
-rw-r--r--indra/newview/llmutelist.h8
-rw-r--r--indra/newview/llnavigationbar.cpp6
-rw-r--r--indra/newview/llnearbychat.cpp295
-rw-r--r--indra/newview/llnearbychat.h43
-rw-r--r--indra/newview/llnearbychatbar.cpp38
-rw-r--r--indra/newview/llnearbychatbar.h3
-rw-r--r--indra/newview/llnearbychathandler.cpp2
-rw-r--r--indra/newview/llnotificationtiphandler.cpp1
-rw-r--r--indra/newview/llpanelavatar.cpp18
-rw-r--r--indra/newview/llpanelavatar.h4
-rw-r--r--indra/newview/llpaneleditwearable.cpp11
-rw-r--r--indra/newview/llpanelimcontrolpanel.cpp23
-rw-r--r--indra/newview/llpanelimcontrolpanel.h11
-rw-r--r--indra/newview/llpanellandmarks.cpp257
-rw-r--r--indra/newview/llpanellandmarks.h19
-rw-r--r--indra/newview/llpanelmediasettingsgeneral.cpp17
-rw-r--r--indra/newview/llpanelmediasettingsgeneral.h1
-rw-r--r--indra/newview/llpanelpeople.cpp34
-rw-r--r--indra/newview/llpanelpeople.h1
-rw-r--r--indra/newview/llpanelpeoplemenus.cpp104
-rw-r--r--indra/newview/llpanelpeoplemenus.h10
-rw-r--r--indra/newview/llpanelpick.cpp23
-rw-r--r--indra/newview/llpanelpick.h1
-rw-r--r--indra/newview/llpanelpicks.cpp75
-rw-r--r--indra/newview/llpanelpicks.h6
-rw-r--r--indra/newview/llpanelplaceinfo.cpp77
-rw-r--r--indra/newview/llpanelplaceinfo.h14
-rw-r--r--indra/newview/llpanelplaces.cpp13
-rw-r--r--indra/newview/llpanelplaces.h1
-rw-r--r--indra/newview/llpanelprofile.cpp3
-rw-r--r--indra/newview/llpanelprofileview.cpp5
-rw-r--r--indra/newview/llpanelteleporthistory.cpp80
-rw-r--r--indra/newview/llpanelteleporthistory.h5
-rw-r--r--indra/newview/llparticipantlist.cpp105
-rw-r--r--indra/newview/llparticipantlist.h83
-rw-r--r--indra/newview/llpolymesh.cpp2
-rw-r--r--indra/newview/llpolymesh.h2
-rw-r--r--indra/newview/llpolymorph.cpp2
-rw-r--r--indra/newview/llpolymorph.h2
-rw-r--r--indra/newview/llrootview.h22
-rw-r--r--indra/newview/llscreenchannel.cpp28
-rw-r--r--indra/newview/llscreenchannel.h4
-rw-r--r--indra/newview/llsearchcombobox.cpp5
-rw-r--r--indra/newview/llsidetray.cpp234
-rw-r--r--indra/newview/llsidetray.h80
-rw-r--r--indra/newview/llstartup.cpp3
-rw-r--r--indra/newview/llsyswellwindow.cpp6
-rw-r--r--indra/newview/llteleporthistorystorage.cpp13
-rw-r--r--indra/newview/llteleporthistorystorage.h5
-rw-r--r--indra/newview/lltexglobalcolor.cpp2
-rw-r--r--indra/newview/lltexglobalcolor.h2
-rw-r--r--indra/newview/lltexlayer.cpp12
-rw-r--r--indra/newview/lltexlayer.h7
-rw-r--r--indra/newview/lltexlayerparams.cpp21
-rw-r--r--indra/newview/lltexlayerparams.h9
-rw-r--r--indra/newview/lltoast.cpp52
-rw-r--r--indra/newview/lltoast.h52
-rw-r--r--indra/newview/lltooldraganddrop.cpp2
-rw-r--r--indra/newview/lltoolpie.cpp5
-rw-r--r--indra/newview/lltransientdockablefloater.cpp96
-rw-r--r--indra/newview/lltransientdockablefloater.h57
-rw-r--r--indra/newview/lltransientfloatermgr.cpp110
-rw-r--r--indra/newview/lltransientfloatermgr.h63
-rw-r--r--indra/newview/llviewerfloaterreg.cpp2
-rw-r--r--indra/newview/llviewerinventory.cpp16
-rw-r--r--indra/newview/llviewerinventory.h3
-rw-r--r--indra/newview/llviewermedia.cpp74
-rw-r--r--indra/newview/llviewermedia.h14
-rw-r--r--indra/newview/llviewermediafocus.cpp2
-rw-r--r--indra/newview/llviewermenu.cpp13
-rw-r--r--indra/newview/llviewermessage.cpp48
-rw-r--r--indra/newview/llviewerparcelmgr.cpp7
-rw-r--r--indra/newview/llviewerparcelmgr.h2
-rw-r--r--indra/newview/llviewerprecompiledheaders.h1
-rw-r--r--indra/newview/llviewertexture.cpp8
-rw-r--r--indra/newview/llviewertexture.h8
-rw-r--r--indra/newview/llviewertexturelist.cpp74
-rw-r--r--indra/newview/llviewertexturelist.h10
-rw-r--r--indra/newview/llviewervisualparam.h2
-rw-r--r--indra/newview/llvoavatar.cpp216
-rw-r--r--indra/newview/llvoavatar.h9
-rw-r--r--indra/newview/llvoavatardefines.cpp3
-rw-r--r--indra/newview/llvoavatarself.cpp202
-rw-r--r--indra/newview/llvoavatarself.h20
-rw-r--r--indra/newview/llwearable.cpp48
-rw-r--r--indra/newview/llwearable.h12
-rw-r--r--indra/newview/llwearablelist.cpp15
-rw-r--r--indra/newview/llwldaycycle.cpp1
-rw-r--r--indra/newview/llworldmapview.cpp2
-rw-r--r--indra/newview/skins/default/textures/alpha_gradient.tgabin0 -> 300 bytes
-rw-r--r--indra/newview/skins/default/textures/alpha_gradient_2d.j2cbin0 -> 4325 bytes
-rw-r--r--indra/newview/skins/default/textures/textures.xml7
-rw-r--r--indra/newview/skins/default/xui/en/favorites_bar_button.xml4
-rw-r--r--indra/newview/skins/default/xui/en/floater_avatar_textures.xml105
-rw-r--r--indra/newview/skins/default/xui/en/floater_camera.xml69
-rw-r--r--indra/newview/skins/default/xui/en/floater_critical.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_customize.xml60
-rw-r--r--indra/newview/skins/default/xui/en/floater_im_session.xml24
-rw-r--r--indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml4
-rw-r--r--indra/newview/skins/default/xui/en/floater_media_settings.xml90
-rw-r--r--indra/newview/skins/default/xui/en/floater_nearby_chat.xml37
-rw-r--r--indra/newview/skins/default/xui/en/floater_preview_notecard.xml4
-rw-r--r--indra/newview/skins/default/xui/en/floater_script_preview.xml4
-rw-r--r--indra/newview/skins/default/xui/en/floater_select_key.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_tools.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_tos.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_wearable_save_as.xml1
-rw-r--r--indra/newview/skins/default/xui/en/menu_landmark.xml3
-rw-r--r--indra/newview/skins/default/xui/en/menu_login.xml6
-rw-r--r--indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml47
-rw-r--r--indra/newview/skins/default/xui/en/menu_place.xml3
-rw-r--r--indra/newview/skins/default/xui/en/menu_places_gear_folder.xml11
-rw-r--r--indra/newview/skins/default/xui/en/menu_places_gear_landmark.xml29
-rw-r--r--indra/newview/skins/default/xui/en/menu_teleport_history_item.xml6
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml27
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml7
-rw-r--r--indra/newview/skins/default/xui/en/panel_avatar_list_item.xml7
-rw-r--r--indra/newview/skins/default/xui/en/panel_bottomtray.xml114
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_profile.xml71
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_control_panel.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_general.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml8
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_land_money.xml18
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_list_item.xml27
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_notices.xml6
-rw-r--r--indra/newview/skins/default/xui/en/panel_landmarks.xml5
-rw-r--r--indra/newview/skins/default/xui/en/panel_media_settings_general.xml62
-rw-r--r--indra/newview/skins/default/xui/en/panel_media_settings_permissions.xml6
-rw-r--r--indra/newview/skins/default/xui/en/panel_media_settings_security.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_navigation_bar.xml29
-rw-r--r--indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml31
-rw-r--r--indra/newview/skins/default/xui/en/panel_notification.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_people.xml12
-rw-r--r--indra/newview/skins/default/xui/en/panel_picks.xml67
-rw-r--r--indra/newview/skins/default/xui/en/panel_places.xml71
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_advanced.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_general.xml81
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml38
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_privacy.xml18
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_setup.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_sound.xml38
-rw-r--r--indra/newview/skins/default/xui/en/panel_profile.xml50
-rw-r--r--indra/newview/skins/default/xui/en/panel_profile_view.xml9
-rw-r--r--indra/newview/skins/default/xui/en/panel_side_tray.xml24
-rw-r--r--indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml3
-rw-r--r--indra/newview/skins/default/xui/en/panel_toast.xml8
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml55
-rw-r--r--indra/newview/skins/default/xui/en/widgets/accordion_tab.xml6
-rw-r--r--indra/newview/skins/default/xui/en/widgets/location_input.xml4
-rw-r--r--indra/newview/skins/default/xui/en/widgets/tab_container.xml23
-rw-r--r--indra/newview/tests/llcapabilitylistener_test.cpp25
-rwxr-xr-xindra/newview/viewer_manifest.py41
223 files changed, 4854 insertions, 2318 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 1e5a798202..dd3937a6ef 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -70,6 +70,7 @@ set(viewer_SOURCE_FILES
llagentaccess.cpp
llagentdata.cpp
llagentlanguage.cpp
+ llagentpicksinfo.cpp
llagentpilot.cpp
llagentui.cpp
llagentwearables.cpp
@@ -113,6 +114,7 @@ set(viewer_SOURCE_FILES
lldebugview.cpp
lldelayedgestureerror.cpp
lldirpicker.cpp
+ lldndbutton.cpp
lldrawable.cpp
lldrawpoolalpha.cpp
lldrawpoolavatar.cpp
@@ -341,6 +343,7 @@ set(viewer_SOURCE_FILES
llpanelteleporthistory.cpp
llpanelvolume.cpp
llparcelselection.cpp
+ llparticipantlist.cpp
llpatchvertexarray.cpp
llplacesinventorybridge.cpp
llpolymesh.cpp
@@ -414,6 +417,8 @@ set(viewer_SOURCE_FILES
lltoolselectland.cpp
lltoolselectrect.cpp
lltracker.cpp
+ lltransientdockablefloater.cpp
+ lltransientfloatermgr.cpp
lluilistener.cpp
lluploaddialog.cpp
llurl.cpp
@@ -540,6 +545,7 @@ set(viewer_HEADER_FILES
llagentaccess.h
llagentdata.h
llagentlanguage.h
+ llagentpicksinfo.h
llagentpilot.h
llagentui.h
llagentwearables.h
@@ -585,6 +591,7 @@ set(viewer_HEADER_FILES
lldebugview.h
lldelayedgestureerror.h
lldirpicker.h
+ lldndbutton.h
lldrawable.h
lldrawpool.h
lldrawpoolalpha.h
@@ -810,6 +817,7 @@ set(viewer_HEADER_FILES
llpanelteleporthistory.h
llpanelvolume.h
llparcelselection.h
+ llparticipantlist.h
llpatchvertexarray.h
llplacesinventorybridge.h
llpolymesh.h
@@ -886,6 +894,8 @@ set(viewer_HEADER_FILES
lltoolselectland.h
lltoolselectrect.h
lltracker.h
+ lltransientdockablefloater.h
+ lltransientfloatermgr.h
lluiconstants.h
lluilistener.h
lluploaddialog.h
@@ -1378,7 +1388,11 @@ if (WINDOWS)
COMMENT "Copying staged dlls."
)
- add_dependencies(${VIEWER_BINARY_NAME} stage_third_party_libs llcommon llkdu)
+ 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)
if (EXISTS ${CMAKE_SOURCE_DIR}/copy_win_scripts)
diff --git a/indra/newview/app_settings/foldertypes.xml b/indra/newview/app_settings/foldertypes.xml
index 698158308e..2038779c4f 100644
--- a/indra/newview/app_settings/foldertypes.xml
+++ b/indra/newview/app_settings/foldertypes.xml
@@ -65,10 +65,4 @@
icon_name="inv_folder_outfit_undershirt.tga"
allowed="undershirt"
/>
- <ensemble
- asset_num="47"
- xui_name="outfit"
- icon_name="inv_folder_outfit.tga"
- allowed="outfit"
- />
</ensemble_defs>
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 9adf893e4b..c34b2798d1 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -375,6 +375,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>AutoPlayMedia</key>
+ <map>
+ <key>Comment</key>
+ <string>Allow media objects to automatically play or navigate?</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>AutoSnapshot</key>
<map>
<key>Comment</key>
@@ -4842,10 +4853,10 @@
<key>Value</key>
<integer>350</integer>
</map>
- <key>NotificationToastTime</key>
+ <key>NotificationToastLifeTime</key>
<map>
<key>Comment</key>
- <string>Width of notification messages</string>
+ <string>Number of seconds while a notification toast exists</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -4853,21 +4864,32 @@
<key>Value</key>
<integer>5</integer>
</map>
+ <key>NotificationTipToastLifeTime</key>
+ <map>
+ <key>Comment</key>
+ <string>Number of seconds while a notification tip toast exist</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>10</integer>
+ </map>
<key>ToastOpaqueTime</key>
<map>
<key>Comment</key>
- <string>Width of notification messages</string>
+ <string>Number of seconds while a toast is fading </string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>S32</string>
<key>Value</key>
- <integer>4</integer>
+ <integer>1</integer>
</map>
- <key>StartUpToastTime</key>
+ <key>StartUpToastLifeTime</key>
<map>
<key>Comment</key>
- <string>Width of notification messages</string>
+ <string>Number of seconds while a StartUp toast exist</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -4875,10 +4897,10 @@
<key>Value</key>
<integer>5</integer>
</map>
- <key>ToastMargin</key>
+ <key>ToastGap</key>
<map>
<key>Comment</key>
- <string>Width of notification messages</string>
+ <string>Gap between toasts on a screen</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -4889,7 +4911,7 @@
<key>ChannelBottomPanelMargin</key>
<map>
<key>Comment</key>
- <string>Width of notification messages</string>
+ <string>Space from a lower toast to the Bottom Tray</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -4900,7 +4922,7 @@
<key>NotificationChannelRightMargin</key>
<map>
<key>Comment</key>
- <string>Width of notification messages</string>
+ <string>Space between toasts and a right border of an area where they can appear</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -4911,7 +4933,7 @@
<key>OverflowToastHeight</key>
<map>
<key>Comment</key>
- <string>Width of notification messages</string>
+ <string>Height of an overflow toast</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -8570,13 +8592,13 @@
<key>ToolTipVisibleTimeNear</key>
<map>
<key>Comment</key>
- <string>Fade tooltip after after time passes (seconds) while mouse near tooltip</string>
+ <string>Fade tooltip after after time passes (seconds) while mouse near tooltip or original position</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
- <real>5.0</real>
+ <real>10.0</real>
</map>
<key>ToolTipVisibleTimeOver</key>
<map>
@@ -10537,6 +10559,17 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>ShowDeviceSettings</key>
+ <map>
+ <key>Comment</key>
+ <string>Show device settings</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>soundsbeacon</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/app_settings/shaders/class2/deferred/blurLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/blurLightF.glsl
index 8bd702a8da..28908a311d 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/blurLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/blurLightF.glsl
@@ -46,11 +46,15 @@ void main()
dlt /= max(-pos.z*dist_factor, 1.0);
- vec2 defined_weight = kern[0].xy; // special case the first (centre) sample's weight in the blur; we have to sample it anyway so we get it for 'free'
+ vec2 defined_weight = kern[0].xy; // special case the kern[0] (centre) sample's weight in the blur; we have to sample it anyway so we get it for 'free'
vec4 col = defined_weight.xyxx * ccol;
+
+ float center_e = 1.0 - (texture2DRect(edgeMap, vary_fragcoord.xy).a+
+ texture2DRect(edgeMap, vary_fragcoord.xy+dlt*0.333).a+
+ texture2DRect(edgeMap, vary_fragcoord.xy-dlt*0.333).a);
- float e = 1.0;
- for (int i = 0; i < 4; i++)
+ float e = center_e;
+ for (int i = 1; i < 4; i++)
{
vec2 tc = vary_fragcoord.xy + kern[i].z*dlt;
@@ -67,10 +71,8 @@ void main()
texture2DRect(edgeMap, tc.xy-dlt*0.333).a;
}
-
- e = 1.0;
-
- for (int i = 0; i < 4; i++)
+ e = center_e;
+ for (int i = 1; i < 4; i++)
{
vec2 tc = vary_fragcoord.xy - kern[i].z*dlt;
diff --git a/indra/newview/llagentpicksinfo.cpp b/indra/newview/llagentpicksinfo.cpp
new file mode 100644
index 0000000000..6e5835bace
--- /dev/null
+++ b/indra/newview/llagentpicksinfo.cpp
@@ -0,0 +1,130 @@
+/**
+ * @file llagentpicksinfo.cpp
+ * @brief LLAgentPicksInfo class implementation
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ *
+ * Copyright (c) 2001-2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+#include "llagentpicksinfo.h"
+
+#include "llagent.h"
+#include "llavatarconstants.h"
+#include "llavatarpropertiesprocessor.h"
+
+class LLAgentPicksInfo::LLAgentPicksObserver : public LLAvatarPropertiesObserver
+{
+public:
+ LLAgentPicksObserver()
+ {
+ LLAvatarPropertiesProcessor::getInstance()->addObserver(gAgent.getID(), this);
+ }
+
+ ~LLAgentPicksObserver()
+ {
+ LLAvatarPropertiesProcessor::getInstance()->removeObserver(gAgent.getID(), this);
+ }
+
+ void sendAgentPicksRequest()
+ {
+ LLAvatarPropertiesProcessor::getInstance()->sendAvatarPicksRequest(gAgent.getID());
+ }
+
+ typedef boost::function<void(LLAvatarPicks*)> server_respond_callback_t;
+
+ void setServerRespondCallback(const server_respond_callback_t& cb)
+ {
+ mServerRespondCallback = cb;
+ }
+
+ virtual void processProperties(void* data, EAvatarProcessorType type)
+ {
+ if(APT_PICKS == type)
+ {
+ LLAvatarPicks* picks = static_cast<LLAvatarPicks*>(data);
+ if(picks && gAgent.getID() == picks->target_id)
+ {
+ if(mServerRespondCallback)
+ {
+ mServerRespondCallback(picks);
+ }
+ }
+ }
+ }
+
+private:
+
+ server_respond_callback_t mServerRespondCallback;
+};
+
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+
+LLAgentPicksInfo::LLAgentPicksInfo()
+ : mAgentPicksObserver(NULL)
+ , mMaxNumberOfPicks(MAX_AVATAR_PICKS)
+ // Disable Pick creation until we get number of Picks from server - in case
+ // avatar has maximum number of Picks.
+ , mNumberOfPicks(mMaxNumberOfPicks)
+{
+}
+
+LLAgentPicksInfo::~LLAgentPicksInfo()
+{
+ delete mAgentPicksObserver;
+}
+
+void LLAgentPicksInfo::requestNumberOfPicks()
+{
+ if(!mAgentPicksObserver)
+ {
+ mAgentPicksObserver = new LLAgentPicksObserver();
+
+ mAgentPicksObserver->setServerRespondCallback(boost::bind(
+ &LLAgentPicksInfo::onServerRespond, this, _1));
+ }
+
+ mAgentPicksObserver->sendAgentPicksRequest();
+}
+
+bool LLAgentPicksInfo::isPickLimitReached()
+{
+ return getNumberOfPicks() >= getMaxNumberOfPicks();
+}
+
+void LLAgentPicksInfo::onServerRespond(LLAvatarPicks* picks)
+{
+ if(!picks)
+ {
+ llerrs << "Unexpected value" << llendl;
+ return;
+ }
+
+ setNumberOfPicks(picks->picks_list.size());
+}
diff --git a/indra/newview/llagentpicksinfo.h b/indra/newview/llagentpicksinfo.h
new file mode 100644
index 0000000000..0e30f2c5a0
--- /dev/null
+++ b/indra/newview/llagentpicksinfo.h
@@ -0,0 +1,106 @@
+/**
+ * @file llagentpicksinfo.h
+ * @brief LLAgentPicksInfo class header file
+ *
+ * $LicenseInfo:firstyear=2000&license=viewergpl$
+ *
+ * Copyright (c) 2000-2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLAGENTPICKS_H
+#define LL_LLAGENTPICKS_H
+
+#include "llsingleton.h"
+
+struct LLAvatarPicks;
+
+/**
+ * Class that provides information about Agent Picks
+ */
+class LLAgentPicksInfo : public LLSingleton<LLAgentPicksInfo>
+{
+ class LLAgentPicksObserver;
+
+public:
+
+ LLAgentPicksInfo();
+
+ virtual ~LLAgentPicksInfo();
+
+ /**
+ * Requests number of picks from server.
+ *
+ * Number of Picks is requested from server, thus it is not available immediately.
+ */
+ void requestNumberOfPicks();
+
+ /**
+ * Returns number of Picks.
+ */
+ S32 getNumberOfPicks() { return mNumberOfPicks; }
+
+ /**
+ * Returns maximum number of Picks.
+ */
+ S32 getMaxNumberOfPicks() { return mMaxNumberOfPicks; }
+
+ /**
+ * Returns TRUE if Agent has maximum allowed number of Picks.
+ */
+ bool isPickLimitReached();
+
+ /**
+ * After creating or deleting a Pick we can assume operation on server will be
+ * completed successfully. Incrementing/decrementing number of picks makes new number
+ * of picks available immediately. Actual number of picks will be updated when we receive
+ * response from server.
+ */
+ void incrementNumberOfPicks() { ++mNumberOfPicks; }
+
+ void decrementNumberOfPicks() { --mNumberOfPicks; }
+
+private:
+
+ void onServerRespond(LLAvatarPicks* picks);
+
+ /**
+ * Sets number of Picks.
+ */
+ void setNumberOfPicks(S32 number) { mNumberOfPicks = number; }
+
+ /**
+ * Sets maximum number of Picks.
+ */
+ void setMaxNumberOfPicks(S32 max_picks) { mMaxNumberOfPicks = max_picks; }
+
+private:
+
+ LLAgentPicksObserver* mAgentPicksObserver;
+ S32 mMaxNumberOfPicks;
+ S32 mNumberOfPicks;
+};
+
+#endif //LL_LLAGENTPICKS_H
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 34d2c00007..b9a0b4293d 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -68,8 +68,11 @@ public:
EWearableType mType;
LLUUID mItemID;
LLUUID mAssetID;
- InitialWearableData(EWearableType type, LLUUID itemID, LLUUID assetID) :
- mType(type), mItemID(itemID), mAssetID(assetID) { }
+ InitialWearableData(EWearableType type, LLUUID& itemID, LLUUID& assetID) :
+ mType(type),
+ mItemID(itemID),
+ mAssetID(assetID)
+ {}
};
typedef std::vector<InitialWearableData> initial_wearable_data_vec_t;
@@ -646,6 +649,7 @@ void LLAgentWearables::setWearable(const EWearableType type, U32 index, LLWearab
else
{
wearable_vec[index] = wearable;
+ mAvatarObject->wearableUpdated(wearable->getType());
}
}
@@ -654,20 +658,29 @@ U32 LLAgentWearables::pushWearable(const EWearableType type, LLWearable *wearabl
if (wearable == NULL)
{
// no null wearables please!
- //TODO: insert llwarns
+ llwarns << "Null wearable sent for type " << type << llendl;
return MAX_WEARABLES_PER_TYPE;
}
if (type < WT_COUNT || mWearableDatas[type].size() < MAX_WEARABLES_PER_TYPE)
{
mWearableDatas[type].push_back(wearable);
+ mAvatarObject->wearableUpdated(wearable->getType());
return mWearableDatas[type].size()-1;
}
return MAX_WEARABLES_PER_TYPE;
}
-void LLAgentWearables::popWearable(const EWearableType type, LLWearable *wearable)
+void LLAgentWearables::popWearable(LLWearable *wearable)
{
- U32 index = getWearableIndex(type, wearable);
+ if (wearable == NULL)
+ {
+ // nothing to do here. move along.
+ return;
+ }
+
+ U32 index = getWearableIndex(wearable);
+ EWearableType type = wearable->getType();
+
if (index < MAX_WEARABLES_PER_TYPE && index < getWearableCount(type))
{
popWearable(type, index);
@@ -676,14 +689,22 @@ void LLAgentWearables::popWearable(const EWearableType type, LLWearable *wearabl
void LLAgentWearables::popWearable(const EWearableType type, U32 index)
{
- if (getWearable(type, index))
+ LLWearable *wearable = getWearable(type, index);
+ if (wearable)
{
mWearableDatas[type].erase(mWearableDatas[type].begin() + index);
+ mAvatarObject->wearableUpdated(wearable->getType());
}
}
-U32 LLAgentWearables::getWearableIndex(const EWearableType type, LLWearable *wearable)
+U32 LLAgentWearables::getWearableIndex(LLWearable *wearable)
{
+ if (wearable == NULL)
+ {
+ return MAX_WEARABLES_PER_TYPE;
+ }
+
+ const EWearableType type = wearable->getType();
wearableentry_map_t::const_iterator wearable_iter = mWearableDatas.find(type);
if (wearable_iter == mWearableDatas.end())
{
@@ -777,22 +798,12 @@ const LLUUID LLAgentWearables::getWearableAssetID(EWearableType type, U32 index)
return LLUUID();
}
-// Warning: include_linked_items = TRUE makes this operation expensive.
-BOOL LLAgentWearables::isWearingItem(const LLUUID& item_id, BOOL include_linked_items) const
+BOOL LLAgentWearables::isWearingItem(const LLUUID& item_id) const
{
- if (getWearableFromItemID(item_id) != NULL) return TRUE;
- if (include_linked_items)
+ const LLUUID& base_item_id = gInventory.getLinkedItemID(item_id);
+ if (getWearableFromItemID(base_item_id) != NULL)
{
- LLInventoryModel::item_array_t item_array;
- gInventory.collectLinkedItems(item_id, item_array);
- for (LLInventoryModel::item_array_t::iterator iter = item_array.begin();
- iter != item_array.end();
- iter++)
- {
- LLViewerInventoryItem *linked_item = (*iter);
- const LLUUID &linked_item_id = linked_item->getUUID();
- if (getWearableFromItemID(linked_item_id) != NULL) return TRUE;
- }
+ return TRUE;
}
return FALSE;
}
@@ -1090,7 +1101,7 @@ void LLAgentWearables::getAllWearablesArray(LLDynamicArray<S32>& wearables)
{
for( S32 i = 0; i < WT_COUNT; ++i )
{
- if (getWearableCount( (EWearableType) i) != 0 )
+ if (getWearableCount((EWearableType) i) != 0)
{
wearables.push_back(i);
}
@@ -1300,13 +1311,18 @@ void LLAgentWearables::addWearableToAgentInventory(LLPointer<LLInventoryCallback
void LLAgentWearables::removeWearable(const EWearableType type, bool do_remove_all, U32 index)
{
- if ((gAgent.isTeen())
- && (type == WT_UNDERSHIRT || type == WT_UNDERPANTS))
+ if (gAgent.isTeen() &&
+ (type == WT_UNDERSHIRT || type == WT_UNDERPANTS))
{
// Can't take off underclothing in simple UI mode or on PG accounts
// TODO: enable the removing of a single undershirt/underpants if multiple are worn. - Nyx
return;
}
+ if (getWearableCount(type) == 0)
+ {
+ // no wearables to remove
+ return;
+ }
if (do_remove_all)
{
@@ -1373,8 +1389,9 @@ void LLAgentWearables::removeWearableFinal(const EWearableType type, bool do_rem
for (S32 i=max_entry; i>=0; i--)
{
LLWearable* old_wearable = getWearable(type,i);
- gInventory.addChangedMask(LLInventoryObserver::LABEL, getWearableItemID(type,i));
+ const LLUUID &item_id = getWearableItemID(type,i);
popWearable(type,i);
+ gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id);
//queryWearableCache(); // moved below
if (old_wearable)
@@ -1388,8 +1405,9 @@ void LLAgentWearables::removeWearableFinal(const EWearableType type, bool do_rem
{
LLWearable* old_wearable = getWearable(type, index);
- gInventory.addChangedMask(LLInventoryObserver::LABEL, getWearableItemID(type,index));
+ const LLUUID &item_id = getWearableItemID(type,index);
popWearable(type, index);
+ gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id);
//queryWearableCache(); // moved below
@@ -1428,6 +1446,9 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
wearables_to_remove[WT_UNDERSHIRT] = (!gAgent.isTeen()) & remove;
wearables_to_remove[WT_UNDERPANTS] = (!gAgent.isTeen()) & remove;
wearables_to_remove[WT_SKIRT] = remove;
+ wearables_to_remove[WT_ALPHA] = remove;
+ wearables_to_remove[WT_TATTOO] = remove;
+
S32 count = wearables.count();
llassert(items.count() == count);
@@ -1454,7 +1475,6 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
}
gInventory.addChangedMask(LLInventoryObserver::LABEL, old_item_id);
-
// Assumes existing wearables are not dirty.
if (old_wearable->isDirty())
{
@@ -1476,7 +1496,8 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
{
// MULTI_WEARABLE: assuming 0th
LLWearable* wearable = getWearable((EWearableType)i, 0);
- gInventory.addChangedMask(LLInventoryObserver::LABEL, getWearableItemID((EWearableType)i,0));
+ const LLUUID &item_id = getWearableItemID((EWearableType)i,0);
+ gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id);
if (wearable)
{
wearables_being_removed.push_back(wearable);
@@ -1740,6 +1761,8 @@ void LLAgentWearables::userRemoveAllClothesStep2(BOOL proceed)
gAgentWearables.removeWearable(WT_UNDERSHIRT,true,0);
gAgentWearables.removeWearable(WT_UNDERPANTS,true,0);
gAgentWearables.removeWearable(WT_SKIRT,true,0);
+ gAgentWearables.removeWearable(WT_ALPHA,true,0);
+ gAgentWearables.removeWearable(WT_TATTOO,true,0);
}
}
diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h
index 6b456abfa7..667cb94552 100644
--- a/indra/newview/llagentwearables.h
+++ b/indra/newview/llagentwearables.h
@@ -70,7 +70,7 @@ protected:
// Queries
//--------------------------------------------------------------------
public:
- BOOL isWearingItem(const LLUUID& item_id, const BOOL include_linked_items = FALSE) const;
+ BOOL isWearingItem(const LLUUID& item_id) const;
BOOL isWearableModifiable(EWearableType type, U32 index /*= 0*/) const;
BOOL isWearableCopyable(EWearableType type, U32 index /*= 0*/) const;
BOOL areWearablesLoaded() const;
@@ -79,7 +79,6 @@ public:
// Note: False for shape, skin, eyes, and hair, unless you have MORE than 1.
bool canWearableBeRemoved(const LLWearable* wearable) const;
-
//--------------------------------------------------------------------
// Accessors
@@ -106,7 +105,7 @@ private:
// Low-level data structure setter - public access is via setWearableItem, etc.
void setWearable(const EWearableType type, U32 index, LLWearable *wearable);
U32 pushWearable(const EWearableType type, LLWearable *wearable);
- void popWearable(const EWearableType type, LLWearable *wearable);
+ void popWearable(LLWearable *wearable);
void popWearable(const EWearableType type, U32 index);
public:
@@ -114,7 +113,8 @@ public:
void setWearableOutfit(const LLInventoryItem::item_array_t& items, const LLDynamicArray< LLWearable* >& wearables, BOOL remove);
void setWearableName(const LLUUID& item_id, const std::string& new_name);
void addLocalTextureObject(const EWearableType wearable_type, const LLVOAvatarDefines::ETextureIndex texture_type, U32 wearable_index);
- U32 getWearableIndex(const EWearableType type, LLWearable *wearable);
+ U32 getWearableIndex(LLWearable *wearable);
+
protected:
void setWearableFinal(LLInventoryItem* new_item, LLWearable* new_wearable, bool do_append = false);
static bool onSetWearableDialog(const LLSD& notification, const LLSD& response, LLWearable* wearable);
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 0cf28f590a..4e022aeb29 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -350,13 +350,15 @@ void removeDuplicateItems(LLInventoryModel::item_array_t& dst, const LLInventory
}
-/* static */ LLUUID LLAppearanceManager::getCOF()
+/* static */
+LLUUID LLAppearanceManager::getCOF()
{
return gInventory.findCategoryUUIDForType(LLAssetType::AT_CURRENT_OUTFIT);
}
// Update appearance from outfit folder.
-/* static */ void LLAppearanceManager::changeOutfit(bool proceed, const LLUUID& category, bool append)
+/* static */
+void LLAppearanceManager::changeOutfit(bool proceed, const LLUUID& category, bool append)
{
if (!proceed)
return;
@@ -381,7 +383,8 @@ void removeDuplicateItems(LLInventoryModel::item_array_t& dst, const LLInventory
}
// Append to current COF contents by recursively traversing a folder.
-/* static */ void LLAppearanceManager::updateCOFFromCategory(const LLUUID& category, bool append)
+/* static */
+void LLAppearanceManager::updateCOFFromCategory(const LLUUID& category, bool append)
{
// BAP consolidate into one "get all 3 types of descendents" function, use both places.
LLInventoryModel::item_array_t wear_items;
@@ -473,8 +476,9 @@ void removeDuplicateItems(LLInventoryModel::item_array_t& dst, const LLInventory
}
}
-/* static */ void LLAppearanceManager::shallowCopyCategory(const LLUUID& src_id, const LLUUID& dst_id,
- LLPointer<LLInventoryCallback> cb)
+/* static */
+void LLAppearanceManager::shallowCopyCategory(const LLUUID& src_id, const LLUUID& dst_id,
+ LLPointer<LLInventoryCallback> cb)
{
LLInventoryModel::cat_array_t cats;
LLInventoryModel::item_array_t items;
@@ -517,13 +521,15 @@ void removeDuplicateItems(LLInventoryModel::item_array_t& dst, const LLInventory
}
}
-/* static */ bool LLAppearanceManager::isMandatoryWearableType(EWearableType type)
+/* static */
+bool LLAppearanceManager::isMandatoryWearableType(EWearableType type)
{
return (type==WT_SHAPE) || (type==WT_SKIN) || (type== WT_HAIR) || (type==WT_EYES);
}
// For mandatory body parts.
-/* static */ void LLAppearanceManager::checkMandatoryWearableTypes(const LLUUID& category, std::set<EWearableType>& types_found)
+/* static */
+void LLAppearanceManager::checkMandatoryWearableTypes(const LLUUID& category, std::set<EWearableType>& types_found)
{
LLInventoryModel::cat_array_t new_cats;
LLInventoryModel::item_array_t new_items;
@@ -548,7 +554,8 @@ void removeDuplicateItems(LLInventoryModel::item_array_t& dst, const LLInventory
// with contents of new category. This means preserving any mandatory
// body parts that aren't present in the new category, and getting rid
// of everything else.
-/* static */ void LLAppearanceManager::purgeCOFBeforeRebuild(const LLUUID& category)
+/* static */
+void LLAppearanceManager::purgeCOFBeforeRebuild(const LLUUID& category)
{
// See which mandatory body types are present in the new category.
std::set<EWearableType> wt_types_found;
@@ -580,7 +587,8 @@ void removeDuplicateItems(LLInventoryModel::item_array_t& dst, const LLInventory
}
// Replace COF contents from a given outfit folder.
-/* static */ void LLAppearanceManager::rebuildCOFFromOutfit(const LLUUID& category)
+/* static */
+void LLAppearanceManager::rebuildCOFFromOutfit(const LLUUID& category)
{
lldebugs << "rebuildCOFFromOutfit()" << llendl;
@@ -688,7 +696,8 @@ void LLAppearanceManager::updateAgentWearables(LLWearableHoldingPattern* holder,
// dec_busy_count();
}
-/* static */ void LLAppearanceManager::updateAppearanceFromCOF()
+/* static */
+void LLAppearanceManager::updateAppearanceFromCOF()
{
dumpCat(getCOF(),"COF, start");
@@ -739,7 +748,7 @@ void LLAppearanceManager::updateAgentWearables(LLWearableHoldingPattern* holder,
LLDynamicArray<LLFoundData*> found_container;
for(S32 i = 0; i < wear_items.count(); ++i)
{
- found = new LLFoundData(wear_items.get(i)->getUUID(),
+ found = new LLFoundData(wear_items.get(i)->getLinkedUUID(), // Wear the base item, not the link
wear_items.get(i)->getAssetUUID(),
wear_items.get(i)->getName(),
wear_items.get(i)->getType());
@@ -770,7 +779,7 @@ void LLAppearanceManager::updateAgentWearables(LLWearableHoldingPattern* holder,
/* static */
void LLAppearanceManager::getCOFValidDescendents(const LLUUID& category,
- LLInventoryModel::item_array_t& items)
+ LLInventoryModel::item_array_t& items)
{
LLInventoryModel::cat_array_t cats;
LLFindCOFValidItems is_cof_valid;
@@ -783,11 +792,12 @@ void LLAppearanceManager::getCOFValidDescendents(const LLUUID& category,
follow_folder_links);
}
-/* static */ void LLAppearanceManager::getUserDescendents(const LLUUID& category,
- LLInventoryModel::item_array_t& wear_items,
- LLInventoryModel::item_array_t& obj_items,
- LLInventoryModel::item_array_t& gest_items,
- bool follow_folder_links)
+/* static */
+void LLAppearanceManager::getUserDescendents(const LLUUID& category,
+ LLInventoryModel::item_array_t& wear_items,
+ LLInventoryModel::item_array_t& obj_items,
+ LLInventoryModel::item_array_t& gest_items,
+ bool follow_folder_links)
{
LLInventoryModel::cat_array_t wear_cats;
LLFindWearables is_wearable;
@@ -966,7 +976,7 @@ void LLAppearanceManager::wearEnsemble( LLInventoryCategory* cat, bool do_update
}
/* static */
-void LLAppearanceManager::removeItemLinks(LLUUID& item_id, bool do_update)
+void LLAppearanceManager::removeItemLinks(const LLUUID& item_id, bool do_update)
{
LLInventoryModel::cat_array_t cat_array;
LLInventoryModel::item_array_t item_array;
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index 928b5f2bcd..828af32101 100644
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -62,7 +62,7 @@ public:
static LLUUID getCOF();
// Remove COF entries
- static void removeItemLinks(LLUUID& item_id, bool do_update = true);
+ static void removeItemLinks(const LLUUID& item_id, bool do_update = true);
// For debugging - could be moved elsewhere.
static void dumpCat(const LLUUID& cat_id, std::string str);
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 5b769dcab4..923a66ee8e 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1206,6 +1206,9 @@ bool LLAppViewer::mainLoop()
bool LLAppViewer::cleanup()
{
+ // workaround for DEV-35406 crash on shutdown
+ LLEventPumps::instance().reset();
+
// *TODO - generalize this and move DSO wrangling to a helper class -brad
std::set<struct apr_dso_handle_t *>::const_iterator i;
for(i = mPlugins.begin(); i != mPlugins.end(); ++i)
@@ -1214,9 +1217,7 @@ bool LLAppViewer::cleanup()
apr_status_t rv = apr_dso_sym((apr_dso_handle_sym_t*)&ll_plugin_stop_func, *i, "ll_plugin_stop");
ll_plugin_stop_func();
- // *NOTE - disabled unloading as partial solution to DEV-35406 crash on shutdown
- //rv = apr_dso_unload(*i);
- (void)rv;
+ rv = apr_dso_unload(*i);
}
mPlugins.clear();
diff --git a/indra/newview/llavatariconctrl.cpp b/indra/newview/llavatariconctrl.cpp
index 7ae1b5cd4a..ebcda13dd4 100644
--- a/indra/newview/llavatariconctrl.cpp
+++ b/indra/newview/llavatariconctrl.cpp
@@ -152,6 +152,8 @@ LLAvatarIconCtrl::LLAvatarIconCtrl(const LLAvatarIconCtrl::Params& p)
: LLIconCtrl(p),
mDrawTooltip(p.draw_tooltip)
{
+ mPriority = LLViewerFetchedTexture::BOOST_ICON;
+
LLRect rect = p.rect;
static LLUICachedControl<S32> llavatariconctrl_symbol_hpad("UIAvatariconctrlSymbolHPad", 2);
diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp
index ef48420490..3a07c6e5ef 100644
--- a/indra/newview/llavatarlist.cpp
+++ b/indra/newview/llavatarlist.cpp
@@ -57,17 +57,13 @@ static const LLAvatarItemNameComparator NAME_COMPARATOR;
static const LLFlatListView::ItemReverseComparator REVERSE_NAME_COMPARATOR(NAME_COMPARATOR);
LLAvatarList::Params::Params()
-:
-volume_column_width("volume_column_width", 0)
-, online_go_first("online_go_first", true)
+: ignore_online_status("ignore_online_status", false)
{
}
-
-
LLAvatarList::LLAvatarList(const Params& p)
: LLFlatListView(p)
-, mOnlineGoFirst(p.online_go_first)
+, mIgnoreOnlineStatus(p.ignore_online_status)
, mContextMenu(NULL)
, mDirty(true) // to force initial update
{
@@ -194,15 +190,15 @@ void LLAvatarList::refresh()
}
-void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is_bold, EAddPosition pos)
+void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is_online, EAddPosition pos)
{
LLAvatarListItem* item = new LLAvatarListItem();
item->showStatus(false);
item->showInfoBtn(true);
item->showSpeakingIndicator(true);
item->setName(name);
- item->setAvatarId(id);
- item->setOnline(is_bold);
+ item->setAvatarId(id, mIgnoreOnlineStatus);
+ item->setOnline(mIgnoreOnlineStatus ? true : is_online);
item->setContextMenu(mContextMenu);
item->childSetVisible("info_btn", false);
@@ -210,6 +206,19 @@ void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is
addItem(item, id, pos);
}
+// virtual
+BOOL LLAvatarList::handleRightMouseDown(S32 x, S32 y, MASK mask)
+{
+ BOOL handled = LLUICtrl::handleRightMouseDown(x, y, mask);
+ if ( mContextMenu )
+ {
+ std::vector<LLUUID> selected_uuids;
+ getSelectedUUIDs(selected_uuids);
+ mContextMenu->show(this, selected_uuids, x, y);
+ }
+ return handled;
+}
+
void LLAvatarList::computeDifference(
const std::vector<LLUUID>& vnew_unsorted,
std::vector<LLUUID>& vadded,
diff --git a/indra/newview/llavatarlist.h b/indra/newview/llavatarlist.h
index ec801645fe..a83a72b26c 100644
--- a/indra/newview/llavatarlist.h
+++ b/indra/newview/llavatarlist.h
@@ -55,8 +55,7 @@ public:
struct Params : public LLInitParam::Block<Params, LLFlatListView::Params>
{
- Optional<S32> volume_column_width;
- Optional<bool> online_go_first;
+ Optional<bool> ignore_online_status; // show all items as online
Params();
};
@@ -72,11 +71,12 @@ public:
void setContextMenu(LLAvatarListItem::ContextMenu* menu) { mContextMenu = menu; }
void sortByName();
+ virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
protected:
void refresh();
- void addNewItem(const LLUUID& id, const std::string& name, BOOL is_bold, EAddPosition pos = ADD_BOTTOM);
+ void addNewItem(const LLUUID& id, const std::string& name, BOOL is_online, EAddPosition pos = ADD_BOTTOM);
void computeDifference(
const std::vector<LLUUID>& vnew,
std::vector<LLUUID>& vadded,
@@ -84,7 +84,7 @@ protected:
private:
- bool mOnlineGoFirst;
+ bool mIgnoreOnlineStatus;
bool mDirty;
std::string mNameFilter;
diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp
index 90408beca0..ebc79aae48 100644
--- a/indra/newview/llavatarlistitem.cpp
+++ b/indra/newview/llavatarlistitem.cpp
@@ -130,15 +130,6 @@ void LLAvatarListItem::onMouseLeave(S32 x, S32 y, MASK mask)
LLPanel::onMouseLeave(x, y, mask);
}
-// virtual
-BOOL LLAvatarListItem::handleRightMouseDown(S32 x, S32 y, MASK mask)
-{
- if (mContextMenu)
- mContextMenu->show(this, const_cast<const LLUUID&>(mAvatarId), x, y);
-
- return LLPanel::handleRightMouseDown(x, y, mask);
-}
-
void LLAvatarListItem::setStatus(const std::string& status)
{
mStatus->setValue(status);
@@ -180,7 +171,7 @@ void LLAvatarListItem::setName(const std::string& name)
mAvatarName->setToolTip(name);
}
-void LLAvatarListItem::setAvatarId(const LLUUID& id)
+void LLAvatarListItem::setAvatarId(const LLUUID& id, bool ignore_status_changes)
{
if (mAvatarId.notNull())
LLAvatarTracker::instance().removeParticularFriendObserver(mAvatarId, this);
@@ -190,7 +181,7 @@ void LLAvatarListItem::setAvatarId(const LLUUID& id)
mSpeakingIndicator->setSpeakerId(id);
// We'll be notified on avatar online status changes
- if (mAvatarId.notNull())
+ if (!ignore_status_changes && mAvatarId.notNull())
LLAvatarTracker::instance().addParticularFriendObserver(mAvatarId, this);
// Set avatar name.
diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h
index 2330db5249..b9cfed4b7b 100644
--- a/indra/newview/llavatarlistitem.h
+++ b/indra/newview/llavatarlistitem.h
@@ -48,7 +48,7 @@ public:
class ContextMenu
{
public:
- virtual void show(LLView* spawning_view, const LLUUID& id, S32 x, S32 y) = 0;
+ virtual void show(LLView* spawning_view, const std::vector<LLUUID>& selected_uuids, S32 x, S32 y) = 0;
};
LLAvatarListItem();
@@ -57,14 +57,13 @@ public:
virtual BOOL postBuild();
virtual void onMouseLeave(S32 x, S32 y, MASK mask);
virtual void onMouseEnter(S32 x, S32 y, MASK mask);
- virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
virtual void setValue(const LLSD& value);
virtual void changed(U32 mask); // from LLFriendObserver
void setStatus(const std::string& status);
void setOnline(bool online);
void setName(const std::string& name);
- void setAvatarId(const LLUUID& id);
+ void setAvatarId(const LLUUID& id, bool ignore_status_changes = false);
const LLUUID& getAvatarId() const;
const std::string getAvatarName() const;
diff --git a/indra/newview/llavatarpropertiesprocessor.cpp b/indra/newview/llavatarpropertiesprocessor.cpp
index f58c85d8c5..73e24ca8e7 100644
--- a/indra/newview/llavatarpropertiesprocessor.cpp
+++ b/indra/newview/llavatarpropertiesprocessor.cpp
@@ -36,6 +36,7 @@
// Viewer includes
#include "llagent.h"
+#include "llagentpicksinfo.h"
#include "llviewergenericmessage.h"
// Linden library includes
@@ -150,6 +151,13 @@ void LLAvatarPropertiesProcessor::sendAvatarGroupsRequest(const LLUUID& avatar_i
sendGenericRequest(avatar_id, APT_GROUPS, "avatargroupsrequest");
}
+void LLAvatarPropertiesProcessor::sendAvatarTexturesRequest(const LLUUID& avatar_id)
+{
+ sendGenericRequest(avatar_id, APT_TEXTURES, "avatartexturesrequest");
+ // No response expected.
+ removePendingRequest(avatar_id, APT_TEXTURES);
+}
+
void LLAvatarPropertiesProcessor::sendAvatarPropertiesUpdate(const LLAvatarData* avatar_props)
{
llinfos << "Sending avatarinfo update" << llendl;
@@ -438,6 +446,9 @@ void LLAvatarPropertiesProcessor::sendPickDelete( const LLUUID& pick_id )
msg->nextBlock(_PREHASH_Data);
msg->addUUID(_PREHASH_PickID, pick_id);
gAgent.sendReliableMessage();
+
+ LLAgentPicksInfo::getInstance()->requestNumberOfPicks();
+ LLAgentPicksInfo::getInstance()->decrementNumberOfPicks();
}
void LLAvatarPropertiesProcessor::sendPickInfoUpdate(const LLPickData* new_pick)
@@ -470,6 +481,8 @@ void LLAvatarPropertiesProcessor::sendPickInfoUpdate(const LLPickData* new_pick)
msg->addBOOL(_PREHASH_Enabled, new_pick->enabled);
gAgent.sendReliableMessage();
+
+ LLAgentPicksInfo::getInstance()->requestNumberOfPicks();
}
void LLAvatarPropertiesProcessor::sendPickInfoRequest(const LLUUID& creator_id, const LLUUID& pick_id)
diff --git a/indra/newview/llavatarpropertiesprocessor.h b/indra/newview/llavatarpropertiesprocessor.h
index ea80c3d4f8..e6563024b2 100644
--- a/indra/newview/llavatarpropertiesprocessor.h
+++ b/indra/newview/llavatarpropertiesprocessor.h
@@ -52,7 +52,8 @@ enum EAvatarProcessorType
APT_NOTES,
APT_GROUPS,
APT_PICKS,
- APT_PICK_INFO
+ APT_PICK_INFO,
+ APT_TEXTURES
};
struct LLAvatarData
@@ -160,6 +161,7 @@ public:
void sendAvatarPicksRequest(const LLUUID& avatar_id);
void sendAvatarNotesRequest(const LLUUID& avatar_id);
void sendAvatarGroupsRequest(const LLUUID& avatar_id);
+ void sendAvatarTexturesRequest(const LLUUID& avatar_id);
// Duplicate pick info requests are not suppressed.
void sendPickInfoRequest(const LLUUID& creator_id, const LLUUID& pick_id);
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp
index 8987f14e97..ddcee5f453 100644
--- a/indra/newview/llbottomtray.cpp
+++ b/indra/newview/llbottomtray.cpp
@@ -65,7 +65,7 @@ LLBottomTray::LLBottomTray(const LLSD&)
mChicletPanel->setChicletClickedCallback(boost::bind(&LLBottomTray::onChicletClick,this,_1));
- LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("CameraPresets.ChangeView",&LLFloaterCameraPresets::onClickCameraPresets);
+ LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("CameraPresets.ChangeView", boost::bind(&LLFloaterCamera::onClickCameraPresets, _2));
LLIMMgr::getInstance()->addSessionObserver(this);
//this is to fix a crash that occurs because LLBottomTray is a singleton
@@ -77,22 +77,6 @@ LLBottomTray::LLBottomTray(const LLSD&)
setFocusRoot(TRUE);
}
-BOOL LLBottomTray::postBuild()
-{
- mBottomTrayContextMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_bottomtray.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
- gMenuHolder->addChild(mBottomTrayContextMenu);
-
- mNearbyChatBar = getChild<LLNearbyChatBar>("chat_bar");
- mToolbarStack = getChild<LLLayoutStack>("toolbar_stack");
- mMovementPanel = getChild<LLPanel>("movement_panel");
- mGestureCombo = getChild<LLComboBox>("Gesture");
- mCamPanel = getChild<LLPanel>("cam_panel");
- mSnapshotPanel = getChild<LLPanel>("snapshot_panel");
- setRightMouseDownCallback(boost::bind(&LLBottomTray::showBottomTrayContextMenu,this, _2, _3,_4));
-
- return TRUE;
-}
-
LLBottomTray::~LLBottomTray()
{
if (!LLSingleton<LLIMMgr>::destroyed())
@@ -134,8 +118,9 @@ LLIMChiclet* LLBottomTray::createIMChiclet(const LLUUID& session_id)
case LLIMChiclet::TYPE_IM:
return getChicletPanel()->createChiclet<LLIMP2PChiclet>(session_id);
case LLIMChiclet::TYPE_GROUP:
- case LLIMChiclet::TYPE_AD_HOC:
return getChicletPanel()->createChiclet<LLIMGroupChiclet>(session_id);
+ case LLIMChiclet::TYPE_AD_HOC:
+ return getChicletPanel()->createChiclet<LLAdHocChiclet>(session_id);
case LLIMChiclet::TYPE_UNKNOWN:
break;
}
@@ -250,24 +235,7 @@ void LLBottomTray::showBottomTrayContextMenu(S32 x, S32 y, MASK mask)
void LLBottomTray::showGestureButton(BOOL visible)
{
- if (visible != mGestureCombo->getVisible())
- {
- LLRect r = mNearbyChatBar->getRect();
-
- mGestureCombo->setVisible(visible);
-
- if (!visible)
- {
- LLFloaterReg::hideFloaterInstance("gestures");
- r.mRight -= mGestureCombo->getRect().getWidth();
- }
- else
- {
- r.mRight += mGestureCombo->getRect().getWidth();
- }
-
- mNearbyChatBar->setRect(r);
- }
+ mGesturePanel->setVisible(visible);
}
void LLBottomTray::showMoveButton(BOOL visible)
@@ -284,3 +252,191 @@ void LLBottomTray::showSnapshotButton(BOOL visible)
{
mSnapshotPanel->setVisible(visible);
}
+
+namespace
+{
+ const std::string& PANEL_CHICLET_NAME = "chiclet_list_panel";
+ const std::string& PANEL_CHATBAR_NAME = "chat_bar";
+ const std::string& PANEL_MOVEMENT_NAME = "movement_panel";
+ const std::string& PANEL_CAMERA_NAME = "cam_panel";
+}
+
+BOOL LLBottomTray::postBuild()
+{
+ mBottomTrayContextMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_bottomtray.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+ gMenuHolder->addChild(mBottomTrayContextMenu);
+
+ mNearbyChatBar = getChild<LLNearbyChatBar>("chat_bar");
+ mToolbarStack = getChild<LLLayoutStack>("toolbar_stack");
+ mMovementPanel = getChild<LLPanel>("movement_panel");
+ mMovementButton = mMovementPanel->getChild<LLButton>("movement_btn");
+ mGesturePanel = getChild<LLPanel>("gesture_panel");
+ mCamPanel = getChild<LLPanel>("cam_panel");
+ mCamButton = mCamPanel->getChild<LLButton>("camera_btn");
+ mSnapshotPanel = getChild<LLPanel>("snapshot_panel");
+ setRightMouseDownCallback(boost::bind(&LLBottomTray::showBottomTrayContextMenu,this, _2, _3,_4));
+
+ if (mChicletPanel && mToolbarStack && mNearbyChatBar)
+ {
+ verifyChildControlsSizes();
+ }
+
+ return TRUE;
+}
+
+void LLBottomTray::verifyChildControlsSizes()
+{
+ LLRect rect = mChicletPanel->getRect();
+ if (rect.getWidth() < mChicletPanel->getMinWidth())
+ {
+ mChicletPanel->reshape(mChicletPanel->getMinWidth(), rect.getHeight());
+ }
+
+ rect = mNearbyChatBar->getRect();
+ if (rect.getWidth() < mNearbyChatBar->getMinWidth())
+ {
+ mNearbyChatBar->reshape(mNearbyChatBar->getMinWidth(), rect.getHeight());
+ }
+ else if (rect.getWidth() > mNearbyChatBar->getMaxWidth())
+ {
+ rect.setLeftTopAndSize(rect.mLeft, rect.mTop, mNearbyChatBar->getMaxWidth(), rect.getHeight());
+ mNearbyChatBar->reshape(mNearbyChatBar->getMaxWidth(), rect.getHeight());
+ mNearbyChatBar->setRect(rect);
+ }
+}
+
+void LLBottomTray::reshape(S32 width, S32 height, BOOL called_from_parent)
+{
+
+ if (mChicletPanel && mToolbarStack && mNearbyChatBar)
+ {
+#ifdef __FEATURE_EXT_991__
+ BOOL shrink = width < getRect().getWidth();
+ const S32 MIN_RENDERED_CHARS = 3;
+#endif
+
+ verifyChildControlsSizes();
+ updateResizeState(width, height);
+
+ switch (mResizeState)
+ {
+ case STATE_CHICLET_PANEL:
+ mToolbarStack->updatePanelAutoResize(PANEL_CHICLET_NAME, TRUE);
+
+ mToolbarStack->updatePanelAutoResize(PANEL_CHATBAR_NAME, FALSE);
+ mToolbarStack->updatePanelAutoResize(PANEL_CAMERA_NAME, FALSE);
+ mToolbarStack->updatePanelAutoResize(PANEL_MOVEMENT_NAME, FALSE);
+
+ break;
+ case STATE_CHATBAR_INPUT:
+ mToolbarStack->updatePanelAutoResize(PANEL_CHATBAR_NAME, TRUE);
+
+ mToolbarStack->updatePanelAutoResize(PANEL_CHICLET_NAME, FALSE);
+ mToolbarStack->updatePanelAutoResize(PANEL_CAMERA_NAME, FALSE);
+ mToolbarStack->updatePanelAutoResize(PANEL_MOVEMENT_NAME, FALSE);
+
+ break;
+
+#ifdef __FEATURE_EXT_991__
+
+ case STATE_BUTTONS:
+ mToolbarStack->updatePanelAutoResize(PANEL_CAMERA_NAME, TRUE);
+ mToolbarStack->updatePanelAutoResize(PANEL_MOVEMENT_NAME, TRUE);
+
+ mToolbarStack->updatePanelAutoResize(PANEL_CHICLET_NAME, FALSE);
+ mToolbarStack->updatePanelAutoResize(PANEL_CHATBAR_NAME, FALSE);
+
+ if (shrink)
+ {
+
+ if (mSnapshotPanel->getVisible())
+ {
+ showSnapshotButton(FALSE);
+ }
+
+ if (mCamPanel->getVisible() && mCamButton->getLastDrawCharsCount() < MIN_RENDERED_CHARS)
+ {
+ showCameraButton(FALSE);
+ }
+
+ if (mMovementPanel->getVisible() && mMovementButton->getLastDrawCharsCount() < MIN_RENDERED_CHARS)
+ {
+ showMoveButton(FALSE);
+ }
+
+ }
+ else
+ {
+ showMoveButton(TRUE);
+ mMovementPanel->draw();
+
+ if (mMovementButton->getLastDrawCharsCount() >= MIN_RENDERED_CHARS)
+ {
+ showMoveButton(TRUE);
+ }
+ else
+ {
+ showMoveButton(FALSE);
+ }
+ }
+ break;
+#endif
+
+ default:
+ break;
+ }
+ }
+
+ LLPanel::reshape(width, height, called_from_parent);
+}
+
+void LLBottomTray::updateResizeState(S32 width, S32 height)
+{
+ mResizeState = STATE_BUTTONS;
+
+ const S32 chiclet_panel_width = mChicletPanel->getRect().getWidth();
+ const S32 chiclet_panel_min_width = mChicletPanel->getMinWidth();
+
+ const S32 chatbar_panel_width = mNearbyChatBar->getRect().getWidth();
+ const S32 chatbar_panel_min_width = mNearbyChatBar->getMinWidth();
+ const S32 chatbar_panel_max_width = mNearbyChatBar->getMaxWidth();
+
+ // bottom tray is narrowed
+ if (width < getRect().getWidth())
+ {
+ if (chiclet_panel_width > chiclet_panel_min_width)
+ {
+ mResizeState = STATE_CHICLET_PANEL;
+ }
+ else if (chatbar_panel_width > chatbar_panel_min_width)
+ {
+ mResizeState = STATE_CHATBAR_INPUT;
+ }
+ else
+ {
+ mResizeState = STATE_BUTTONS;
+ }
+ }
+ // bottom tray is widen
+ else
+ {
+#ifdef __FEATURE_EXT_991__
+ if (!mMovementPanel->getVisible())
+ {
+ mResizeState = STATE_BUTTONS;
+ }
+ else
+#endif
+ if (chatbar_panel_width < chatbar_panel_max_width)
+ {
+ mResizeState = STATE_CHATBAR_INPUT;
+ }
+ else
+ {
+ mResizeState = STATE_CHICLET_PANEL;
+ }
+ }
+
+
+ // TODO: finish implementation
+}
diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h
index cc35e63524..a28f1e42ec 100644
--- a/indra/newview/llbottomtray.h
+++ b/indra/newview/llbottomtray.h
@@ -69,6 +69,8 @@ public:
virtual void sessionRemoved(const LLUUID& session_id);
void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id);
+ virtual void reshape(S32 width, S32 height, BOOL called_from_parent);
+
virtual void onFocusLost();
virtual void setVisible(BOOL visible);
@@ -81,6 +83,18 @@ public:
private:
+ enum EResizeState
+ {
+ STATE_CHICLET_PANEL = 1,
+ STATE_CHATBAR_INPUT,
+ STATE_BUTTONS
+ };
+
+ void updateResizeState(S32 width, S32 height);
+ void verifyChildControlsSizes();
+
+ EResizeState mResizeState;
+
protected:
LLBottomTray(const LLSD& key = LLSD());
@@ -103,7 +117,9 @@ protected:
LLPanel* mMovementPanel;
LLPanel* mCamPanel;
LLPanel* mSnapshotPanel;
- LLComboBox* mGestureCombo;
+ LLPanel* mGesturePanel;
+ LLButton* mCamButton;
+ LLButton* mMovementButton;
};
#endif // LL_LLBOTTOMPANEL_H
diff --git a/indra/newview/llcapabilitylistener.cpp b/indra/newview/llcapabilitylistener.cpp
index 785a647fa2..ed9613c1bc 100644
--- a/indra/newview/llcapabilitylistener.cpp
+++ b/indra/newview/llcapabilitylistener.cpp
@@ -5,7 +5,30 @@
* @brief Implementation for llcapabilitylistener.
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
+ *
* Copyright (c) 2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
*/
diff --git a/indra/newview/llcapabilitylistener.h b/indra/newview/llcapabilitylistener.h
index ce16b7da5d..be51cf1b8c 100644
--- a/indra/newview/llcapabilitylistener.h
+++ b/indra/newview/llcapabilitylistener.h
@@ -5,7 +5,30 @@
* @brief Provide an event-based API for capability requests
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
+ *
* Copyright (c) 2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
*/
diff --git a/indra/newview/llcapabilityprovider.h b/indra/newview/llcapabilityprovider.h
index 0ddb2b6cb9..3d07904775 100644
--- a/indra/newview/llcapabilityprovider.h
+++ b/indra/newview/llcapabilityprovider.h
@@ -6,7 +6,30 @@
* capability.
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
+ *
* Copyright (c) 2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
*/
diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp
index c4619dc57a..77f941eef0 100644
--- a/indra/newview/llchannelmanager.cpp
+++ b/indra/newview/llchannelmanager.cpp
@@ -39,6 +39,7 @@
#include "llimview.h"
#include "llbottomtray.h"
#include "llviewerwindow.h"
+#include "llrootview.h"
#include <algorithm>
@@ -121,6 +122,8 @@ void LLChannelManager::onLoginCompleted()
return;
}
+ gViewerWindow->getRootView()->addChild(mStartUpChannel);
+
// init channel's position and size
S32 channel_right_bound = gViewerWindow->getWorldViewRect().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
@@ -128,7 +131,7 @@ void LLChannelManager::onLoginCompleted()
mStartUpChannel->setShowToasts(true);
mStartUpChannel->setCommitCallback(boost::bind(&LLChannelManager::onStartUpToastClose, this));
- mStartUpChannel->createStartUpToast(away_notifications, gSavedSettings.getS32("ChannelBottomPanelMargin"), gSavedSettings.getS32("StartUpToastTime"));
+ mStartUpChannel->createStartUpToast(away_notifications, gSavedSettings.getS32("StartUpToastLifeTime"));
}
//--------------------------------------------------------------------------
@@ -139,19 +142,11 @@ void LLChannelManager::onStartUpToastClose()
mStartUpChannel->setVisible(FALSE);
mStartUpChannel->closeStartUpToast();
removeChannelByID(LLUUID(gSavedSettings.getString("StartUpChannelUUID")));
- delete mStartUpChannel;
mStartUpChannel = NULL;
}
// set StartUp Toast Flag to allow all other channels to show incoming toasts
LLScreenChannel::setStartUpToastShown();
-
- // force NEARBY CHAT CHANNEL to repost all toasts if present
- //LLScreenChannelBase* nearby_channel = findChannelByID(LLUUID(gSavedSettings.getString("NearByChatChannelUUID")));
- //!!!!!!!!!!!!!!
- //FIXME
- //nearby_channel->loadStoredToastsToChannel();
- //nearby_channel->setCanStoreToasts(false);
}
//--------------------------------------------------------------------------
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index cc21b636f1..ebf46a6e3f 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -101,12 +101,12 @@ void LLChatHistory::appendWidgetMessage(const LLUUID& avatar_id, std::string& fr
if (mLastFromName == from)
{
view = getSeparator();
- view_text = "\n";
+ view_text = " ";
}
else
{
view = getHeader(avatar_id, from, time);
- view_text = from + MESSAGE_USERNAME_DATE_SEPARATOR + time;
+ view_text = "\n" + from + MESSAGE_USERNAME_DATE_SEPARATOR + time;
}
//Prepare the rect for the view
LLRect target_rect = getDocumentView()->getRect();
@@ -115,12 +115,12 @@ void LLChatHistory::appendWidgetMessage(const LLUUID& avatar_id, std::string& fr
view->reshape(target_rect.getWidth(), view->getRect().getHeight());
view->setOrigin(target_rect.mLeft, view->getRect().mBottom);
- this->appendWidget(view, view_text, FALSE, TRUE);
+ appendWidget(view, view_text, FALSE, TRUE, mLeftWidgetPad, 0);
//Append the text message
- this->appendText(message, TRUE, style_params);
+ appendText(message, TRUE, style_params);
mLastFromName = from;
- this->blockUndo();
- this->setCursorAndScrollToEnd();
+ blockUndo();
+ setCursorAndScrollToEnd();
}
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index 340b0fa22c..61a60a24be 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -468,6 +468,115 @@ void LLIMP2PChiclet::setShowSpeaker(bool show)
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
+LLAdHocChiclet::Params::Params()
+: avatar_icon("avatar_icon")
+, unread_notifications("unread_notifications")
+, speaker("speaker")
+, show_speaker("show_speaker")
+{
+ // *TODO Vadim: Get rid of hardcoded values.
+ rect(LLRect(0, 25, 45, 0));
+
+ avatar_icon.name("avatar_icon");
+ avatar_icon.follows.flags(FOLLOWS_LEFT | FOLLOWS_TOP | FOLLOWS_BOTTOM);
+
+ // *NOTE dzaporozhan
+ // 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.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);
+ unread_notifications.text_color(LLColor4::white);
+ unread_notifications.mouse_opaque(false);
+
+ speaker.name("speaker");
+ speaker.rect(LLRect(45, 25, 65, 0));
+
+ show_speaker = false;
+}
+
+LLAdHocChiclet::LLAdHocChiclet(const Params& p)
+: LLIMChiclet(p)
+, mChicletIconCtrl(NULL)
+, mCounterCtrl(NULL)
+, mSpeakerCtrl(NULL)
+, mPopupMenu(NULL)
+{
+ LLChicletAvatarIconCtrl::Params avatar_params = p.avatar_icon;
+ mChicletIconCtrl = LLUICtrlFactory::create<LLChicletAvatarIconCtrl>(avatar_params);
+ addChild(mChicletIconCtrl);
+
+ LLChicletNotificationCounterCtrl::Params unread_params = p.unread_notifications;
+ mCounterCtrl = LLUICtrlFactory::create<LLChicletNotificationCounterCtrl>(unread_params);
+ addChild(mCounterCtrl);
+
+ setCounter(getCounter());
+ setShowCounter(getShowCounter());
+
+ LLChicletSpeakerCtrl::Params speaker_params = p.speaker;
+ mSpeakerCtrl = LLUICtrlFactory::create<LLChicletSpeakerCtrl>(speaker_params);
+ addChild(mSpeakerCtrl);
+
+ setShowSpeaker(p.show_speaker);
+}
+
+void LLAdHocChiclet::setSessionId(const LLUUID& session_id)
+{
+ LLChiclet::setSessionId(session_id);
+ LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(session_id);
+ mChicletIconCtrl->setValue(im_session->mOtherParticipantID);
+}
+
+void LLAdHocChiclet::setCounter(S32 counter)
+{
+ mCounterCtrl->setCounter(counter);
+
+ if(getShowCounter())
+ {
+ LLRect counter_rect = mCounterCtrl->getRect();
+ LLRect required_rect = mCounterCtrl->getRequiredRect();
+ bool needs_resize = required_rect.getWidth() != counter_rect.getWidth();
+
+ if(needs_resize)
+ {
+ counter_rect.mRight = counter_rect.mLeft + required_rect.getWidth();
+ mCounterCtrl->reshape(counter_rect.getWidth(), counter_rect.getHeight());
+ mCounterCtrl->setRect(counter_rect);
+
+ onChicletSizeChanged();
+ }
+ }
+}
+
+LLRect LLAdHocChiclet::getRequiredRect()
+{
+ LLRect rect(0, 0, mChicletIconCtrl->getRect().getWidth(), 0);
+ if(getShowCounter())
+ {
+ rect.mRight += mCounterCtrl->getRequiredRect().getWidth();
+ }
+ if(getShowSpeaker())
+ {
+ rect.mRight += mSpeakerCtrl->getRect().getWidth();
+ }
+ return rect;
+}
+
+BOOL LLAdHocChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask)
+{
+ return TRUE;
+}
+
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+
LLIMGroupChiclet::Params::Params()
: group_icon("group_icon")
{
@@ -669,7 +778,12 @@ LLChicletPanel::Params::Params()
{
chiclet_padding = 3;
scrolling_offset = 40;
- min_width = 70;
+
+ if (!min_width.isProvided())
+ {
+ // min_width = 4 chiclets + 3 paddings
+ min_width = 179 + 3*chiclet_padding;
+ }
LLRect scroll_button_rect(0, 25, 19, 5);
@@ -704,6 +818,7 @@ LLChicletPanel::LLChicletPanel(const Params&p)
mLeftScrollButton = LLUICtrlFactory::create<LLButton>(scroll_button_params);
addChild(mLeftScrollButton);
+ LLTransientFloaterMgr::getInstance()->addControlView(mLeftScrollButton);
mLeftScrollButton->setClickedCallback(boost::bind(&LLChicletPanel::onLeftScrollClick,this));
mLeftScrollButton->setEnabled(false);
@@ -711,6 +826,7 @@ LLChicletPanel::LLChicletPanel(const Params&p)
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);
@@ -752,25 +868,36 @@ void im_chiclet_callback(LLChicletPanel* panel, const LLSD& data){
BOOL LLChicletPanel::postBuild()
{
LLPanel::postBuild();
- LLIMModel::instance().addChangedCallback(boost::bind(im_chiclet_callback, this, _1));
+ 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));
return TRUE;
}
+S32 LLChicletPanel::calcChickletPanleWidth()
+{
+ S32 res = 0;
+
+ for (chiclet_list_t::iterator it = mChicletList.begin(); it
+ != mChicletList.end(); it++)
+ {
+ res = (*it)->getRect().getWidth() + getChicletPadding();
+ }
+ return res;
+}
+
bool LLChicletPanel::addChiclet(LLChiclet* chiclet, S32 index)
{
if(mScrollArea->addChild(chiclet))
{
+ // chicklets should be aligned to right edge of scroll panel
S32 offset = 0;
- // if index == 0 and chickelt list isn't empty insert chiclet before first in the list
- // without scrolling, so other visible chicklets aren't change screen position
- if (0 == index && !mChicletList.empty())
+ if (!canScrollLeft())
{
- offset = getChiclet(0)->getRect().mLeft
- - (chiclet->getRequiredRect().getWidth()
- + getChicletPadding());
+ offset = mScrollArea->getRect().getWidth()
+ - chiclet->getRect().getWidth() - calcChickletPanleWidth();
}
mChicletList.insert(mChicletList.begin() + index, chiclet);
@@ -963,25 +1090,16 @@ void LLChicletPanel::arrange()
void LLChicletPanel::trimChiclets()
{
// trim right
- if(canScrollLeft() && !canScrollRight())
+ if(!mChicletList.empty())
{
S32 last_chiclet_right = (*mChicletList.rbegin())->getRect().mRight;
+ S32 first_chiclet_left = getChiclet(0)->getRect().mLeft;
S32 scroll_width = mScrollArea->getRect().getWidth();
- if(last_chiclet_right < scroll_width)
+ if(last_chiclet_right < scroll_width || first_chiclet_left > 0)
{
shiftChiclets(scroll_width - last_chiclet_right);
}
}
-
- // trim left
- if(!mChicletList.empty())
- {
- LLRect first_chiclet_rect = getChiclet(0)->getRect();
- if(first_chiclet_rect.mLeft > 0)
- {
- shiftChiclets( - first_chiclet_rect.mLeft);
- }
- }
}
void LLChicletPanel::showScrollButtonsIfNeeded()
diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h
index 458bc73bc4..d1153a075d 100644
--- a/indra/newview/llchiclet.h
+++ b/indra/newview/llchiclet.h
@@ -442,6 +442,65 @@ private:
};
/**
+ * Implements AD-HOC chiclet.
+ */
+class LLAdHocChiclet : public LLIMChiclet
+{
+public:
+ struct Params : public LLInitParam::Block<Params, LLChiclet::Params>
+ {
+ Optional<LLChicletAvatarIconCtrl::Params> avatar_icon;
+
+ Optional<LLChicletNotificationCounterCtrl::Params> unread_notifications;
+
+ Optional<LLChicletSpeakerCtrl::Params> speaker;
+
+ Optional<bool> show_speaker;
+
+ Params();
+ };
+
+ /**
+ * Sets session id.
+ * Session ID for group chat is actually Group ID.
+ */
+ /*virtual*/ void setSessionId(const LLUUID& session_id);
+
+ /*
+ * 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.
+ */
+ /*virtual*/ void setCounter(S32);
+
+ /*
+ * Returns number of unread messages.
+ */
+ /*virtual*/ S32 getCounter() { return mCounterCtrl->getCounter(); }
+
+ /*
+ * Returns rect, required to display chiclet.
+ * Width is the only valid value.
+ */
+ /*virtual*/ LLRect getRequiredRect();
+
+protected:
+ LLAdHocChiclet(const Params& p);
+ friend class LLUICtrlFactory;
+
+ /*
+ * Displays popup menu.
+ */
+ virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
+
+private:
+
+ LLChicletAvatarIconCtrl* mChicletIconCtrl;
+ LLChicletNotificationCounterCtrl* mCounterCtrl;
+ LLChicletSpeakerCtrl* mSpeakerCtrl;
+ LLMenuGL* mPopupMenu;
+};
+
+/**
* Implements Group chat chiclet.
*/
class LLIMGroupChiclet : public LLIMChiclet, public LLGroupMgrObserver
@@ -594,9 +653,14 @@ public:
virtual ~LLChicletPanel();
/*
- * Creates chiclet and adds it to chiclet list.
+ * Creates chiclet and adds it to chiclet list at specified index.
+ */
+ template<class T> T* createChiclet(const LLUUID& session_id, S32 index);
+
+ /*
+ * Creates chiclet and adds it to chiclet list at right.
*/
- template<class T> T* createChiclet(const LLUUID& session_id = LLUUID::null, S32 index = 0);
+ template<class T> T* createChiclet(const LLUUID& session_id);
/*
* Returns pointer to chiclet of specified type at specified index.
@@ -660,10 +724,14 @@ public:
/*virtual*/ void draw();
+ S32 getMinWidth() const { return mMinWidth; }
+
protected:
LLChicletPanel(const Params&p);
friend class LLUICtrlFactory;
+ S32 calcChickletPanleWidth();
+
/*
* Adds chiclet to list and rearranges all chiclets.
*/
@@ -804,7 +872,7 @@ private:
};
template<class T>
-T* LLChicletPanel::createChiclet(const LLUUID& session_id /*= LLUUID::null*/, S32 index /*= 0*/)
+T* LLChicletPanel::createChiclet(const LLUUID& session_id, S32 index)
{
typename T::Params params;
T* chiclet = LLUICtrlFactory::create<T>(params);
@@ -831,6 +899,12 @@ T* LLChicletPanel::createChiclet(const LLUUID& session_id /*= LLUUID::null*/, S3
}
template<class T>
+T* LLChicletPanel::createChiclet(const LLUUID& session_id)
+{
+ return createChiclet<T>(session_id, mChicletList.size());
+}
+
+template<class T>
T* LLChicletPanel::findChiclet(const LLUUID& im_session_id)
{
if(im_session_id.isNull())
diff --git a/indra/newview/llconfirmationmanager.cpp b/indra/newview/llconfirmationmanager.cpp
index 225f177546..5813943ad3 100644
--- a/indra/newview/llconfirmationmanager.cpp
+++ b/indra/newview/llconfirmationmanager.cpp
@@ -39,6 +39,7 @@
// viewer includes
#include "llnotifications.h"
#include "llstring.h"
+#include "llxmlnode.h"
LLConfirmationManager::ListenerBase::~ListenerBase()
{
diff --git a/indra/newview/lldndbutton.cpp b/indra/newview/lldndbutton.cpp
new file mode 100644
index 0000000000..22f2bb1d16
--- /dev/null
+++ b/indra/newview/lldndbutton.cpp
@@ -0,0 +1,60 @@
+/**
+ * @file lldndbutton.cpp
+ * @brief Implementation of the drag-n-drop button.
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ *
+ * Copyright (c) 2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "lldndbutton.h"
+
+
+static LLDefaultChildRegistry::Register<LLDragAndDropButton> r("dnd_button");
+
+LLDragAndDropButton::Params::Params()
+{
+
+}
+
+LLDragAndDropButton::LLDragAndDropButton(Params& params)
+: LLButton(params)
+{
+
+}
+
+BOOL LLDragAndDropButton::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg)
+{
+ if (mDragDropHandler)
+ {
+ return mDragDropHandler(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
+ }
+ return false;
+}
+
+// EOF
diff --git a/indra/newview/lldndbutton.h b/indra/newview/lldndbutton.h
new file mode 100644
index 0000000000..c888268187
--- /dev/null
+++ b/indra/newview/lldndbutton.h
@@ -0,0 +1,89 @@
+/**
+ * @file lldndbutton.h
+ * @brief Declaration of the drag-n-drop button.
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ *
+ * Copyright (c) 2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLDNDBUTTON_H
+#define LL_LLDNDBUTTON_H
+
+#include "llbutton.h"
+
+/**
+ * Class representing a button which can handle Drag-And-Drop event.
+ *
+ * LLDragAndDropButton does not contain any logic to handle Drag-And-Drop itself.
+ * Instead it provides drag_drop_handler_t which can be set to the button.
+ * Then each Drag-And-Drop will be delegated to this handler without any pre/post processing.
+ *
+ * All xml parameters are the same as LLButton has.
+ *
+ * @see LLLandmarksPanel for example of usage of this class.
+ */
+class LLDragAndDropButton : public LLButton
+{
+public:
+ struct Params : public LLInitParam::Block<Params, LLButton::Params>
+ {
+ Params();
+ };
+
+ LLDragAndDropButton(Params& params);
+
+ typedef boost::function<bool (
+ S32 /*x*/, S32 /*y*/, MASK /*mask*/, BOOL /*drop*/,
+ EDragAndDropType /*cargo_type*/,
+ void* /*cargo_data*/,
+ EAcceptance* /*accept*/,
+ std::string& /*tooltip_msg*/)> drag_drop_handler_t;
+
+
+ /**
+ * Sets a handler which should process Drag-And-Drop.
+ */
+ void setDragAndDropHandler(drag_drop_handler_t handler) { mDragDropHandler = handler; }
+
+
+ /**
+ * Process Drag-And-Drop by delegating the event to drag_drop_handler_t.
+ *
+ * @return BOOL - value returned by drag_drop_handler_t if it is set, FALSE otherwise.
+ */
+ /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ EDragAndDropType cargo_type,
+ void* cargo_data,
+ EAcceptance* accept,
+ std::string& tooltip_msg);
+
+private:
+ drag_drop_handler_t mDragDropHandler;
+};
+
+
+#endif // LL_LLDNDBUTTON_H
diff --git a/indra/newview/lldriverparam.cpp b/indra/newview/lldriverparam.cpp
index e7295512c1..45f4b4fbd0 100644
--- a/indra/newview/lldriverparam.cpp
+++ b/indra/newview/lldriverparam.cpp
@@ -156,13 +156,17 @@ void LLDriverParamInfo::toStream(std::ostream &out)
// LLDriverParam
//-----------------------------------------------------------------------------
-LLDriverParam::LLDriverParam(LLVOAvatar *avatarp)
- : mCurrentDistortionParam( NULL ), mAvatarp(avatarp), mWearablep(NULL)
+LLDriverParam::LLDriverParam(LLVOAvatar *avatarp) :
+ mCurrentDistortionParam( NULL ),
+ mAvatarp(avatarp),
+ mWearablep(NULL)
{
}
-LLDriverParam::LLDriverParam(LLWearable *wearablep)
- : mCurrentDistortionParam( NULL ), mAvatarp(NULL), mWearablep(wearablep)
+LLDriverParam::LLDriverParam(LLWearable *wearablep) :
+ mCurrentDistortionParam( NULL ),
+ mAvatarp(NULL),
+ mWearablep(wearablep)
{
}
@@ -201,7 +205,7 @@ void LLDriverParam::setAvatar(LLVOAvatar *avatarp)
}
}
-/*virtual*/ LLViewerVisualParam * LLDriverParam::cloneParam(LLWearable* wearable) const
+/*virtual*/ LLViewerVisualParam* LLDriverParam::cloneParam(LLWearable* wearable) const
{
LLDriverParam *new_param;
if (wearable)
@@ -481,7 +485,7 @@ void LLDriverParam::stopAnimating(BOOL set_by_user)
}
/*virtual*/
-BOOL LLDriverParam::linkDrivenParams(visual_param_mapper mapper, bool only_cross_params)
+BOOL LLDriverParam::linkDrivenParams(visual_param_mapper mapper, BOOL only_cross_params)
{
BOOL success = TRUE;
LLDriverParamInfo::entry_info_list_t::iterator iter;
@@ -584,7 +588,8 @@ F32 LLDriverParam::getDrivenWeight(const LLDrivenEntry* driven, F32 input_weight
void LLDriverParam::setDrivenWeight(LLDrivenEntry *driven, F32 driven_weight, bool set_by_user)
{
LLVOAvatarSelf *avatar_self = gAgent.getAvatarObject();
- if(mWearablep && driven->mParam->getCrossWearable() &&
+ if(mWearablep &&
+ driven->mParam->getCrossWearable() &&
mWearablep->isOnTop())
{
// call setWeight through LLVOAvatarSelf so other wearables can be updated with the correct values
diff --git a/indra/newview/lldriverparam.h b/indra/newview/lldriverparam.h
index c73e740574..069e71a2cb 100644
--- a/indra/newview/lldriverparam.h
+++ b/indra/newview/lldriverparam.h
@@ -94,7 +94,7 @@ public:
void setWearable(LLWearable *wearablep);
void setAvatar(LLVOAvatar *avatarp);
- /*virtual*/ LLViewerVisualParam * cloneParam(LLWearable* wearable) const;
+ /*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable) const;
// LLVisualParam Virtual functions
///*virtual*/ BOOL parseData(LLXmlTreeNode* node);
@@ -102,7 +102,7 @@ public:
/*virtual*/ void setWeight(F32 weight, BOOL set_by_user);
/*virtual*/ void setAnimationTarget( F32 target_value, BOOL set_by_user );
/*virtual*/ void stopAnimating(BOOL set_by_user);
- /*virtual*/ BOOL linkDrivenParams(visual_param_mapper mapper, bool only_cross_params);
+ /*virtual*/ BOOL linkDrivenParams(visual_param_mapper mapper, BOOL only_cross_params);
/*virtual*/ void resetDrivenParams();
// LLViewerVisualParam Virtual functions
diff --git a/indra/newview/llface.inl b/indra/newview/llface.inl
index 38f38f5466..176c73e38e 100644
--- a/indra/newview/llface.inl
+++ b/indra/newview/llface.inl
@@ -4,7 +4,7 @@
*
* $LicenseInfo:firstyear=2001&license=viewergpl$
*
- * Copyright (c) 2001-2007, Linden Research, Inc.
+ * Copyright (c) 2001-2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
@@ -12,12 +12,13 @@
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index 76ece9d165..3b5b7f570e 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -626,8 +626,6 @@ void LLFavoritesBarCtrl::updateButtons(U32 bar_width)
buttonXMLNode->getAttributeS32("width", buttonWidth);
S32 buttonHGap = 2; // default value
buttonXMLNode->getAttributeS32("left", buttonHGap);
-
- const S32 buttonVGap = 2;
S32 count = mItems.count();
@@ -713,7 +711,7 @@ void LLFavoritesBarCtrl::updateButtons(U32 bar_width)
if (chevron_button)
{
LLRect rect;
- rect.setOriginAndSize(bar_width - chevron_button_width - buttonHGap, buttonVGap, chevron_button_width, getRect().getHeight()-buttonVGap);
+ rect.setOriginAndSize(bar_width - chevron_button_width - buttonHGap, 0, chevron_button_width, getRect().getHeight());
chevron_button->setRect(rect);
chevron_button->setVisible(TRUE);
mChevronRect = rect;
@@ -728,7 +726,7 @@ void LLFavoritesBarCtrl::updateButtons(U32 bar_width)
LLButton::Params bparams;
LLRect rect;
- rect.setOriginAndSize(bar_width - chevron_button_width - buttonHGap, buttonVGap, chevron_button_width, getRect().getHeight()-buttonVGap);
+ rect.setOriginAndSize(bar_width - chevron_button_width - buttonHGap, 0, chevron_button_width, getRect().getHeight());
bparams.follows.flags (FOLLOWS_LEFT | FOLLOWS_BOTTOM);
bparams.image_unselected.name(flat_icon);
diff --git a/indra/newview/llfirstuse.cpp b/indra/newview/llfirstuse.cpp
index de079b7123..893b12ec35 100644
--- a/indra/newview/llfirstuse.cpp
+++ b/indra/newview/llfirstuse.cpp
@@ -272,6 +272,8 @@ void LLFirstUse::useMedia()
{
gWarningSettings.setBOOL("FirstMedia", FALSE);
- LLNotifications::instance().add("FirstMedia");
+ // Popup removed as a short-term fix for EXT-1643.
+ // Ultimately, the plan is to kill all First Use dialogs
+ //LLNotifications::instance().add("FirstMedia");
}
}
diff --git a/indra/newview/llfloateravatartextures.cpp b/indra/newview/llfloateravatartextures.cpp
index 81d38f8f68..8c7899af3e 100644
--- a/indra/newview/llfloateravatartextures.cpp
+++ b/indra/newview/llfloateravatartextures.cpp
@@ -81,16 +81,24 @@ static void update_texture_ctrl(LLVOAvatar* avatarp,
ETextureIndex te)
{
LLUUID id = IMG_DEFAULT_AVATAR;
- EWearableType wearable_type = LLVOAvatarDictionary::getInstance()->getTEWearableType(te);
- LLWearable *wearable = gAgentWearables.getWearable(wearable_type, 0);
- if (wearable)
+ const LLVOAvatarDictionary::TextureEntry* tex_entry = LLVOAvatarDictionary::getInstance()->getTexture(te);
+ if (tex_entry->mIsLocalTexture)
{
- LLLocalTextureObject *lto = wearable->getLocalTextureObject(te);
- if (lto)
+ const EWearableType wearable_type = tex_entry->mWearableType;
+ LLWearable *wearable = gAgentWearables.getWearable(wearable_type, 0);
+ if (wearable)
{
- id = lto->getID();
+ LLLocalTextureObject *lto = wearable->getLocalTextureObject(te);
+ if (lto)
+ {
+ id = lto->getID();
+ }
}
}
+ else
+ {
+ id = avatarp->getTE(te)->getID();
+ }
//id = avatarp->getTE(te)->getID();
if (id == IMG_DEFAULT_AVATAR)
{
diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp
index 2c2a5107f5..36f0315790 100644
--- a/indra/newview/llfloaterbuyland.cpp
+++ b/indra/newview/llfloaterbuyland.cpp
@@ -81,6 +81,8 @@ public:
LLFloaterBuyLandUI(const LLSD& key);
virtual ~LLFloaterBuyLandUI();
+ /*virtual*/ void onClose(bool app_quitting);
+
private:
class SelectionObserver : public LLParcelObserver
{
@@ -300,11 +302,21 @@ LLFloaterBuyLandUI::LLFloaterBuyLandUI(const LLSD& key)
LLFloaterBuyLandUI::~LLFloaterBuyLandUI()
{
LLViewerParcelMgr::getInstance()->removeObserver(&mParcelSelectionObserver);
- LLViewerParcelMgr::getInstance()->deleteParcelBuy(mParcelBuyInfo);
+ LLViewerParcelMgr::getInstance()->deleteParcelBuy(&mParcelBuyInfo);
delete mTransaction;
}
+// virtual
+void LLFloaterBuyLandUI::onClose(bool app_quitting)
+{
+ // This object holds onto observer, transactions, and parcel state.
+ // Despite being single_instance, destroy it to call destructors and clean
+ // everything up.
+ setVisible(FALSE);
+ destroy();
+}
+
void LLFloaterBuyLandUI::SelectionObserver::changed()
{
if (LLViewerParcelMgr::getInstance()->selectionEmpty())
@@ -756,7 +768,7 @@ void LLFloaterBuyLandUI::sendBuyLand()
if (mParcelBuyInfo)
{
LLViewerParcelMgr::getInstance()->sendParcelBuy(mParcelBuyInfo);
- LLViewerParcelMgr::getInstance()->deleteParcelBuy(mParcelBuyInfo);
+ LLViewerParcelMgr::getInstance()->deleteParcelBuy(&mParcelBuyInfo);
mBought = true;
}
}
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp
index db20b11efd..dca0773139 100644
--- a/indra/newview/llfloatercamera.cpp
+++ b/indra/newview/llfloatercamera.cpp
@@ -50,6 +50,8 @@ const F32 CAMERA_BUTTON_DELAY = 0.0f;
#define ORBIT "cam_rotate_stick"
#define PAN "cam_track_stick"
+#define ZOOM "zoom"
+#define PRESETS "camera_presets"
#define CONTROLS "controls"
@@ -125,9 +127,15 @@ void LLFloaterCamera::onOpen(const LLSD& key)
}
+void LLFloaterCamera::onClose(bool app_quitting)
+{
+ //We don't care of camera mode if app is quitting
+ if(!app_quitting)
+ switchMode(CAMERA_CTRL_MODE_ORBIT);
+}
LLFloaterCamera::LLFloaterCamera(const LLSD& val)
-: LLDockableFloater(NULL, val),
+: LLTransientDockableFloater(NULL, true, val),
mCurrMode(CAMERA_CTRL_MODE_ORBIT),
mPrevMode(CAMERA_CTRL_MODE_ORBIT)
{
@@ -139,7 +147,7 @@ BOOL LLFloaterCamera::postBuild()
setIsChrome(TRUE);
mRotate = getChild<LLJoystickCameraRotate>(ORBIT);
- mZoom = getChild<LLJoystickCameraZoom>("zoom");
+ mZoom = getChild<LLJoystickCameraZoom>(ZOOM);
mTrack = getChild<LLJoystickCameraTrack>(PAN);
assignButton2Mode(CAMERA_CTRL_MODE_ORBIT, "orbit_btn");
@@ -210,7 +218,6 @@ void LLFloaterCamera::switchMode(ECameraControlMode mode)
break;
case CAMERA_CTRL_MODE_AVATAR_VIEW:
- gAgent.changeCameraToMouselook();
break;
default:
@@ -246,15 +253,13 @@ void LLFloaterCamera::updateState()
iter->second->setToggleState(iter->first == mCurrMode);
}
- //updating controls
- bool isOrbitMode = CAMERA_CTRL_MODE_ORBIT == mCurrMode;
- bool isPanMode = CAMERA_CTRL_MODE_PAN == mCurrMode;
-
- childSetVisible(ORBIT, isOrbitMode);
- childSetVisible(PAN, isPanMode);
+ childSetVisible(ORBIT, CAMERA_CTRL_MODE_ORBIT == mCurrMode);
+ childSetVisible(PAN, CAMERA_CTRL_MODE_PAN == mCurrMode);
+ childSetVisible(ZOOM, CAMERA_CTRL_MODE_AVATAR_VIEW != mCurrMode);
+ childSetVisible(PRESETS, CAMERA_CTRL_MODE_AVATAR_VIEW == mCurrMode);
//hiding or showing the panel with controls by reshaping the floater
- bool showControls = isOrbitMode || isPanMode;
+ bool showControls = CAMERA_CTRL_MODE_FREE_CAMERA != mCurrMode;
if (showControls == childIsVisible(CONTROLS)) return;
childSetVisible(CONTROLS, showControls);
@@ -283,29 +288,7 @@ void LLFloaterCamera::updateState()
}
}
-//-------------LLFloaterCameraPresets------------------------
-
-LLFloaterCameraPresets::LLFloaterCameraPresets(const LLSD& key):
-LLDockableFloater(NULL, key)
-{}
-
-BOOL LLFloaterCameraPresets::postBuild()
-{
- setIsChrome(TRUE);
-
- //build dockTongue
- LLDockableFloater::postBuild();
-
- LLButton *anchor_btn = LLBottomTray::getInstance()->getChild<LLButton>("camera_presets_btn");
-
- setDockControl(new LLDockControl(
- anchor_btn, this,
- getDockTongue(), LLDockControl::TOP));
- return TRUE;
-}
-
-/*static*/
-void LLFloaterCameraPresets::onClickCameraPresets(LLUICtrl* ctrl, const LLSD& param)
+void LLFloaterCamera::onClickCameraPresets(const LLSD& param)
{
std::string name = param.asString();
@@ -321,5 +304,9 @@ void LLFloaterCameraPresets::onClickCameraPresets(LLUICtrl* ctrl, const LLSD& pa
{
gAgent.switchCameraPreset(CAMERA_PRESET_FRONT_VIEW);
}
+ else if ("mouselook_view" == name)
+ {
+ gAgent.changeCameraToMouselook();
+ }
}
diff --git a/indra/newview/llfloatercamera.h b/indra/newview/llfloatercamera.h
index 69df861a20..583f279e62 100644
--- a/indra/newview/llfloatercamera.h
+++ b/indra/newview/llfloatercamera.h
@@ -33,7 +33,7 @@
#ifndef LLFLOATERCAMERA_H
#define LLFLOATERCAMERA_H
-#include "lldockablefloater.h"
+#include "lltransientdockablefloater.h"
class LLJoystickCameraRotate;
class LLJoystickCameraZoom;
@@ -49,7 +49,7 @@ enum ECameraControlMode
};
class LLFloaterCamera
- : public LLDockableFloater
+ : public LLTransientDockableFloater
{
friend class LLFloaterReg;
@@ -57,6 +57,8 @@ public:
/* whether in free camera mode */
static bool inFreeCameraMode();
+ /* callback for camera presets changing */
+ static void onClickCameraPresets(const LLSD& param);
static void toPrevModeIfInAvatarViewMode();
@@ -69,6 +71,7 @@ public:
static void updateIfNotInAvatarViewMode();
virtual void onOpen(const LLSD& key);
+ virtual void onClose(bool app_quitting);
LLJoystickCameraRotate* mRotate;
LLJoystickCameraZoom* mZoom;
@@ -111,15 +114,4 @@ private:
};
-class LLFloaterCameraPresets : public LLDockableFloater
-{
- friend class LLFloaterReg;
-public:
- static void onClickCameraPresets(LLUICtrl* ctrl, const LLSD& param);
-private:
- LLFloaterCameraPresets(const LLSD&);
- ~LLFloaterCameraPresets(){}
- /*virtual*/ BOOL postBuild();
-
-};
#endif
diff --git a/indra/newview/llfloaterinventory.cpp b/indra/newview/llfloaterinventory.cpp
index a33a605f50..c890f9f122 100644
--- a/indra/newview/llfloaterinventory.cpp
+++ b/indra/newview/llfloaterinventory.cpp
@@ -48,6 +48,7 @@
#include "message.h"
// newview includes
+#include "llappearancemgr.h"
#include "llappviewer.h"
#include "llfirstuse.h"
#include "llfloaterchat.h"
@@ -1174,7 +1175,6 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p)
mHasInventoryConnection(false),
mStartFolderString(p.start_folder)
, mBuildDefaultHierarchy(true)
-, mRootInventoryItemUUID(LLUUID::null)
, mInvFVBridgeBuilder(NULL)
{
mInvFVBridgeBuilder = &INVENTORY_BRIDGE_BUILDER;
@@ -1241,7 +1241,19 @@ BOOL LLInventoryPanel::postBuild()
// determine the root folder, if any, so inventory contents show just the children
// of that folder (i.e. not including the folder itself).
const LLAssetType::EType preferred_type = LLAssetType::lookupHumanReadable(mStartFolderString);
- mStartFolderID = (preferred_type != LLAssetType::AT_NONE ? gInventory.findCategoryUUIDForType(preferred_type) : LLUUID::null);
+
+ if ("inventory" == mStartFolderString)
+ {
+ mStartFolderID = gInventory.getRootFolderID();
+ }
+ else if ("library" == mStartFolderString)
+ {
+ mStartFolderID = gInventory.getLibraryRootFolderID();
+ }
+ else
+ {
+ mStartFolderID = (preferred_type != LLAssetType::AT_NONE ? gInventory.findCategoryUUIDForType(preferred_type) : LLUUID::null);
+ }
// build view of inventory if we need default full hierarchy and inventory ready, otherwise wait for modelChanged() callback
if (mBuildDefaultHierarchy && mInventory->isInventoryUsable() && !mHasInventoryConnection)
@@ -1462,24 +1474,6 @@ void LLInventoryPanel::modelChanged(U32 mask)
}
}
-void LLInventoryPanel::setInvFVBridgeBuilder(const LLInventoryFVBridgeBuilder* bridge_builder)
-{
- if (NULL == bridge_builder)
- {
- llwarns << "NULL is passed as Inventory Bridge Builder. Default will be used." << llendl;
- }
- else
- {
- mInvFVBridgeBuilder = bridge_builder;
- }
-
- if (mInventory->isInventoryUsable() && !mHasInventoryConnection)
- {
- rebuildViewsFor(mRootInventoryItemUUID);
- mHasInventoryConnection = true;
- }
-}
-
void LLInventoryPanel::rebuildViewsFor(const LLUUID& id)
{
@@ -1508,14 +1502,28 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id)
objectp = gInventory.getObject(id);
if (objectp)
{
+ const LLUUID &parent_id = objectp->getParentUUID();
+ // If this item's parent is the starting folder, then just add it to the top level (recall that
+ // the starting folder isn't actually represented in the view, parent_folder would be NULL in
+ // this case otherwise).
+ LLFolderViewFolder* parent_folder = (parent_id == mStartFolderID ?
+ mFolders : (LLFolderViewFolder*)mFolders->getItemByID(parent_id));
+
+ // This item exists outside the inventory's hierarchy, so don't add it.
+ if (!parent_folder)
+ {
+ return;
+ }
+
if (objectp->getType() <= LLAssetType::AT_NONE ||
objectp->getType() >= LLAssetType::AT_COUNT)
{
- llwarns << "LLInventoryPanel::buildNewViews called with objectp->mType == "
- << ((S32) objectp->getType())
- << " (shouldn't happen)" << llendl;
+ llwarns << "LLInventoryPanel::buildNewViews called with invalid objectp->mType : " <<
+ ((S32) objectp->getType()) << llendl;
+ return;
}
- else if (objectp->getType() == LLAssetType::AT_CATEGORY &&
+
+ if (objectp->getType() == LLAssetType::AT_CATEGORY &&
objectp->getActualType() != LLAssetType::AT_LINK_FOLDER)
{
LLInvFVBridge* new_listener = mInvFVBridgeBuilder->createBridge(objectp->getType(),
@@ -1563,27 +1571,7 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id)
if (itemp)
{
-
- const LLUUID &parent_id = objectp->getParentUUID();
- LLFolderViewFolder* parent_folder = (LLFolderViewFolder*)mFolders->getItemByID(parent_id);
-
- // If this item's parent is the starting folder, then just add it to the top level (recall that
- // the starting folder isn't actually represented in the view, parent_folder would be NULL in
- // this case otherwise).
- if (parent_id == mStartFolderID)
- {
- parent_folder = mFolders;
- }
-
- if (parent_folder)
- {
- itemp->addToFolder(parent_folder, mFolders);
- }
- else
- {
- llwarns << "Couldn't find parent folder for child " << itemp->getLabel() << llendl;
- delete itemp;
- }
+ itemp->addToFolder(parent_folder, mFolders);
}
}
}
@@ -1732,6 +1720,12 @@ void LLInventoryPanel::openDefaultFolderForType(LLAssetType::EType type)
void LLInventoryPanel::setSelection(const LLUUID& obj_id, BOOL take_keyboard_focus)
{
+ // Don't select objects in COF (e.g. to prevent refocus when items are worn).
+ const LLInventoryObject *obj = gInventory.getObject(obj_id);
+ if (obj && obj->getParentUUID() == LLAppearanceManager::getCOF())
+ {
+ return;
+ }
mFolders->setSelectionByID(obj_id, take_keyboard_focus);
}
diff --git a/indra/newview/llfloaterinventory.h b/indra/newview/llfloaterinventory.h
index 1666f18c05..4c9ac5d4c6 100644
--- a/indra/newview/llfloaterinventory.h
+++ b/indra/newview/llfloaterinventory.h
@@ -175,9 +175,6 @@ protected:
void rebuildViewsFor(const LLUUID& id);
virtual void buildNewViews(const LLUUID& id); // made virtual to support derived classes. EXT-719
- // Be sure that passed pointer will be destroyed where it was created.
- void setInvFVBridgeBuilder(const LLInventoryFVBridgeBuilder* bridge_builder);
-
protected:
LLInventoryModel* mInventory;
LLInventoryObserver* mInventoryObserver;
@@ -187,6 +184,12 @@ protected:
//private: // Can not make these private - needed by llinventorysubtreepanel
LLFolderView* mFolders;
std::string mStartFolderString;
+
+ /**
+ * Contains UUID of Inventory item from which hierarchy should be built.
+ * Can be set with the "start_folder" xml property.
+ * Default is LLUUID::null that means total Inventory hierarchy.
+ */
LLUUID mStartFolderID;
LLScrollContainer* mScroller;
bool mHasInventoryConnection;
@@ -196,11 +199,6 @@ protected:
*/
bool mBuildDefaultHierarchy;
- /**
- * Contains UUID of Inventory item from which hierarchy should be built.
- * Should be set by derived class before modelChanged() is called.
- * Default is LLUUID::null that means total Inventory hierarchy.
- */
LLUUID mRootInventoryItemUUID;
/**
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 488d71aa70..bdf9842b01 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -1054,9 +1054,9 @@ BOOL LLPanelLandObjects::postBuild()
mBtnReturnOwnerList = getChild<LLButton>("Return objects...");
mBtnReturnOwnerList->setClickedCallback(onClickReturnOwnerList, this);
- mIconAvatarOnline = LLUIImageList::getInstance()->getUIImage("icon_avatar_online.tga");
- mIconAvatarOffline = LLUIImageList::getInstance()->getUIImage("icon_avatar_offline.tga");
- mIconGroup = LLUIImageList::getInstance()->getUIImage("icon_group.tga");
+ mIconAvatarOnline = LLUIImageList::getInstance()->getUIImage("icon_avatar_online.tga", 0);
+ mIconAvatarOffline = LLUIImageList::getInstance()->getUIImage("icon_avatar_offline.tga", 0);
+ mIconGroup = LLUIImageList::getInstance()->getUIImage("icon_group.tga", 0);
mOwnerList = getChild<LLNameListCtrl>("owner list");
mOwnerList->sortByColumnIndex(3, FALSE);
diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp
index 091debe95e..4375787ea2 100644
--- a/indra/newview/llfloaterproperties.cpp
+++ b/indra/newview/llfloaterproperties.cpp
@@ -586,7 +586,6 @@ void LLFloaterProperties::onCommitName()
{
new_item->updateServer(FALSE);
gInventory.updateItem(new_item);
- gInventory.updateLinkedObjects(new_item->getUUID());
gInventory.notifyObservers();
}
else
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index e15fdd3e35..11544f5b7b 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -442,52 +442,43 @@ LLPanelRegionInfo::LLPanelRegionInfo()
{
}
-// static
-void LLPanelRegionInfo::onBtnSet(void* user_data)
+void LLPanelRegionInfo::onBtnSet()
{
- LLPanelRegionInfo* panel = (LLPanelRegionInfo*)user_data;
- if(!panel) return;
- if (panel->sendUpdate())
+ if (sendUpdate())
{
- panel->disableButton("apply_btn");
+ disableButton("apply_btn");
}
}
-//static
-void LLPanelRegionInfo::onChangeChildCtrl(LLUICtrl* ctrl, void* user_data)
+void LLPanelRegionInfo::onChangeChildCtrl(LLUICtrl* ctrl)
{
- if (ctrl)
- {
- LLPanelRegionInfo* panel = (LLPanelRegionInfo*) ctrl->getParent();
- panel->updateChild(ctrl);
- }
+ updateChild(ctrl); // virtual function
}
-// static
// Enables the "set" button if it is not already enabled
-void LLPanelRegionInfo::onChangeAnything(LLUICtrl* ctrl, void* user_data)
+void LLPanelRegionInfo::onChangeAnything()
{
- LLPanelRegionInfo* panel = (LLPanelRegionInfo*)user_data;
- if(panel)
- {
- panel->enableButton("apply_btn");
- panel->refresh();
- }
+ enableButton("apply_btn");
+ refresh();
}
// static
// Enables set button on change to line editor
void LLPanelRegionInfo::onChangeText(LLLineEditor* caller, void* user_data)
{
- // reuse the previous method
- onChangeAnything(0, user_data);
+ LLPanelRegionInfo* panel = dynamic_cast<LLPanelRegionInfo*>(caller->getParent());
+ if(panel)
+ {
+ panel->enableButton("apply_btn");
+ panel->refresh();
+ }
}
// virtual
BOOL LLPanelRegionInfo::postBuild()
{
- childSetAction("apply_btn", onBtnSet, this);
+ getChild<LLUICtrl>("apply_btn")->setCommitCallback(boost::bind(&LLPanelRegionInfo::onBtnSet, this));
childDisable("apply_btn");
refresh();
return TRUE;
@@ -550,19 +541,17 @@ void LLPanelRegionInfo::disableButton(const std::string& btn_name)
void LLPanelRegionInfo::initCtrl(const std::string& name)
{
- childSetCommitCallback(name, onChangeAnything, this);
+ getChild<LLUICtrl>(name)->setCommitCallback(boost::bind(&LLPanelRegionInfo::onChangeAnything, this));
}
void LLPanelRegionInfo::initHelpBtn(const std::string& name, const std::string& xml_alert)
{
- childSetAction(name, onClickHelp, new std::string(xml_alert));
+ getChild<LLUICtrl>(name)->setCommitCallback(boost::bind(&LLPanelRegionInfo::onClickHelp, this, xml_alert));
}
-// static
-void LLPanelRegionInfo::onClickHelp(void* data)
+void LLPanelRegionInfo::onClickHelp(std::string xml_alert)
{
- std::string* xml_alert = (std::string*)data;
- LLNotifications::instance().add(*xml_alert);
+ LLNotifications::instance().add(xml_alert);
}
/////////////////////////////////////////////////////////////////////////////
@@ -1207,9 +1196,9 @@ BOOL LLPanelRegionTerrainInfo::postBuild()
initCtrl("terrain_lower_spin");
initCtrl("fixed_sun_check");
- childSetCommitCallback("fixed_sun_check", onChangeFixedSun, this);
- childSetCommitCallback("use_estate_sun_check", onChangeUseEstateTime, this);
- childSetCommitCallback("sun_hour_slider", onChangeSunHour, this);
+ getChild<LLUICtrl>("fixed_sun_check")->setCommitCallback(boost::bind(&LLPanelRegionTerrainInfo::onChangeFixedSun, this));
+ getChild<LLUICtrl>("use_estate_sun_check")->setCommitCallback(boost::bind(&LLPanelRegionTerrainInfo::onChangeUseEstateTime, this));
+ getChild<LLUICtrl>("sun_hour_slider")->setCommitCallback(boost::bind(&LLPanelRegionTerrainInfo::onChangeSunHour, this));
childSetAction("download_raw_btn", onClickDownloadRaw, this);
childSetAction("upload_raw_btn", onClickUploadRaw, this);
@@ -1292,39 +1281,29 @@ BOOL LLPanelRegionTerrainInfo::sendUpdate()
return TRUE;
}
-// static
-void LLPanelRegionTerrainInfo::onChangeUseEstateTime(LLUICtrl* ctrl, void* user_data)
+void LLPanelRegionTerrainInfo::onChangeUseEstateTime()
{
- LLPanelRegionTerrainInfo* panel = (LLPanelRegionTerrainInfo*) user_data;
- if (!panel) return;
- BOOL use_estate_sun = panel->childGetValue("use_estate_sun_check").asBoolean();
- panel->childSetEnabled("fixed_sun_check", !use_estate_sun);
- panel->childSetEnabled("sun_hour_slider", !use_estate_sun);
+ BOOL use_estate_sun = childGetValue("use_estate_sun_check").asBoolean();
+ childSetEnabled("fixed_sun_check", !use_estate_sun);
+ childSetEnabled("sun_hour_slider", !use_estate_sun);
if (use_estate_sun)
{
- panel->childSetValue("fixed_sun_check", LLSD(FALSE));
- panel->childSetValue("sun_hour_slider", LLSD(0.f));
+ childSetValue("fixed_sun_check", LLSD(FALSE));
+ childSetValue("sun_hour_slider", LLSD(0.f));
}
- panel->childEnable("apply_btn");
+ childEnable("apply_btn");
}
-// static
-void LLPanelRegionTerrainInfo::onChangeFixedSun(LLUICtrl* ctrl, void* user_data)
+void LLPanelRegionTerrainInfo::onChangeFixedSun()
{
- LLPanelRegionTerrainInfo* panel = (LLPanelRegionTerrainInfo*) user_data;
- if (!panel) return;
// Just enable the apply button. We let the sun-hour slider be enabled
// for both fixed-sun and non-fixed-sun. JC
- panel->childEnable("apply_btn");
+ childEnable("apply_btn");
}
-// static
-void LLPanelRegionTerrainInfo::onChangeSunHour(LLUICtrl* ctrl, void*)
+void LLPanelRegionTerrainInfo::onChangeSunHour()
{
- // can't use userdata to get panel, slider uses it internally
- LLPanelRegionTerrainInfo* panel = (LLPanelRegionTerrainInfo*) ctrl->getParent();
- if (!panel) return;
- panel->childEnable("apply_btn");
+ childEnable("apply_btn");
}
// static
@@ -1420,32 +1399,23 @@ void LLPanelEstateInfo::initDispatch(LLDispatcher& dispatch)
estate_dispatch_initialized = true;
}
-// static
// Disables the sun-hour slider and the use fixed time check if the use global time is check
-void LLPanelEstateInfo::onChangeUseGlobalTime(LLUICtrl* ctrl, void* user_data)
+void LLPanelEstateInfo::onChangeUseGlobalTime()
{
- LLPanelEstateInfo* panel = (LLPanelEstateInfo*) user_data;
- if (panel)
- {
- bool enabled = !panel->childGetValue("use_global_time_check").asBoolean();
- panel->childSetEnabled("sun_hour_slider", enabled);
- panel->childSetEnabled("fixed_sun_check", enabled);
- panel->childSetValue("fixed_sun_check", LLSD(FALSE));
- panel->enableButton("apply_btn");
- }
+ bool enabled = !childGetValue("use_global_time_check").asBoolean();
+ childSetEnabled("sun_hour_slider", enabled);
+ childSetEnabled("fixed_sun_check", enabled);
+ childSetValue("fixed_sun_check", LLSD(FALSE));
+ enableButton("apply_btn");
}
// Enables the sun-hour slider if the fixed-sun checkbox is set
-void LLPanelEstateInfo::onChangeFixedSun(LLUICtrl* ctrl, void* user_data)
+void LLPanelEstateInfo::onChangeFixedSun()
{
- LLPanelEstateInfo* panel = (LLPanelEstateInfo*) user_data;
- if (panel)
- {
- bool enabled = !panel->childGetValue("fixed_sun_check").asBoolean();
- panel->childSetEnabled("use_global_time_check", enabled);
- panel->childSetValue("use_global_time_check", LLSD(FALSE));
- panel->enableButton("apply_btn");
- }
+ bool enabled = !childGetValue("fixed_sun_check").asBoolean();
+ childSetEnabled("use_global_time_check", enabled);
+ childSetValue("use_global_time_check", LLSD(FALSE));
+ enableButton("apply_btn");
}
@@ -2130,7 +2100,7 @@ BOOL LLPanelEstateInfo::postBuild()
initCtrl("limit_payment");
initCtrl("limit_age_verified");
initCtrl("voice_chat_check");
- childSetCommitCallback("abuse_email_address", onChangeAnything, this);
+ getChild<LLUICtrl>("abuse_email_address")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeAnything, this));
getChild<LLLineEditor>("abuse_email_address")->setKeystrokeCallback(onChangeText, this);
initHelpBtn("estate_manager_help", "HelpEstateEstateManager");
@@ -2144,15 +2114,15 @@ BOOL LLPanelEstateInfo::postBuild()
initHelpBtn("allow_resident_help", "HelpEstateAllowResident");
initHelpBtn("allow_group_help", "HelpEstateAllowGroup");
initHelpBtn("ban_resident_help", "HelpEstateBanResident");
- initHelpBtn("abuse_email_address_help", "HelpEstateAbuseEmailAddress");
- initHelpBtn("voice_chat_help", "HelpEstateVoiceChat");
+ initHelpBtn("abuse_email_address_help", "HelpEstateAbuseEmailAddress");
+ initHelpBtn("voice_chat_help", "HelpEstateVoiceChat");
// set up the use global time checkbox
- childSetCommitCallback("use_global_time_check", onChangeUseGlobalTime, this);
- childSetCommitCallback("fixed_sun_check", onChangeFixedSun, this);
- childSetCommitCallback("sun_hour_slider", onChangeChildCtrl, this);
-
- childSetCommitCallback("allowed_avatar_name_list", onChangeChildCtrl, this);
+ getChild<LLUICtrl>("use_global_time_check")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeUseGlobalTime, this));
+ getChild<LLUICtrl>("fixed_sun_check")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeFixedSun, this));
+ getChild<LLUICtrl>("sun_hour_slider")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeChildCtrl, this, _1));
+
+ getChild<LLUICtrl>("allowed_avatar_name_list")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeChildCtrl, this, _1));
LLNameListCtrl *avatar_name_list = getChild<LLNameListCtrl>("allowed_avatar_name_list");
if (avatar_name_list)
{
@@ -2163,7 +2133,7 @@ BOOL LLPanelEstateInfo::postBuild()
childSetAction("add_allowed_avatar_btn", onClickAddAllowedAgent, this);
childSetAction("remove_allowed_avatar_btn", onClickRemoveAllowedAgent, this);
- childSetCommitCallback("allowed_group_name_list", onChangeChildCtrl, this);
+ getChild<LLUICtrl>("allowed_group_name_list")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeChildCtrl, this, _1));
LLNameListCtrl* group_name_list = getChild<LLNameListCtrl>("allowed_group_name_list");
if (group_name_list)
{
@@ -2174,7 +2144,7 @@ BOOL LLPanelEstateInfo::postBuild()
getChild<LLUICtrl>("add_allowed_group_btn")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onClickAddAllowedGroup, this));
childSetAction("remove_allowed_group_btn", onClickRemoveAllowedGroup, this);
- childSetCommitCallback("banned_avatar_name_list", onChangeChildCtrl, this);
+ getChild<LLUICtrl>("banned_avatar_name_list")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeChildCtrl, this, _1));
LLNameListCtrl* banned_name_list = getChild<LLNameListCtrl>("banned_avatar_name_list");
if (banned_name_list)
{
@@ -2185,7 +2155,7 @@ BOOL LLPanelEstateInfo::postBuild()
childSetAction("add_banned_avatar_btn", onClickAddBannedAgent, this);
childSetAction("remove_banned_avatar_btn", onClickRemoveBannedAgent, this);
- childSetCommitCallback("estate_manager_name_list", onChangeChildCtrl, this);
+ getChild<LLUICtrl>("estate_manager_name_list")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeChildCtrl, this, _1));
LLNameListCtrl* manager_name_list = getChild<LLNameListCtrl>("estate_manager_name_list");
if (manager_name_list)
{
@@ -2299,13 +2269,18 @@ void LLPanelEstateInfo::getEstateOwner()
class LLEstateChangeInfoResponder : public LLHTTPClient::Responder
{
public:
- LLEstateChangeInfoResponder(void* userdata) : mpPanel((LLPanelEstateInfo*)userdata) {};
+ LLEstateChangeInfoResponder(LLPanelEstateInfo* panel)
+ {
+ mpPanel = panel->getHandle();
+ }
// if we get a normal response, handle it here
virtual void result(const LLSD& content)
{
// refresh the panel from the database
- mpPanel->refresh();
+ LLPanelEstateInfo* panel = dynamic_cast<LLPanelEstateInfo*>(mpPanel.get());
+ if (panel)
+ panel->refresh();
}
// if we get an error response
@@ -2315,7 +2290,7 @@ public:
<< status << ": " << reason << llendl;
}
private:
- LLPanelEstateInfo* mpPanel;
+ LLHandle<LLPanel> mpPanel;
};
// tries to send estate info using a cap; returns true if it succeeded
@@ -2353,7 +2328,7 @@ bool LLPanelEstateInfo::commitEstateInfoCaps()
body["owner_abuse_email"] = childGetValue("abuse_email_address").asString();
// we use a responder so that we can re-get the data after committing to the database
- LLHTTPClient::post(url, body, new LLEstateChangeInfoResponder((void*)this));
+ LLHTTPClient::post(url, body, new LLEstateChangeInfoResponder(this));
return true;
}
diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h
index 68ed4e0c89..95833af8a1 100644
--- a/indra/newview/llfloaterregioninfo.h
+++ b/indra/newview/llfloaterregioninfo.h
@@ -109,9 +109,9 @@ class LLPanelRegionInfo : public LLPanel
public:
LLPanelRegionInfo();
- static void onBtnSet(void* user_data);
- static void onChangeChildCtrl(LLUICtrl* ctrl, void* user_data);
- static void onChangeAnything(LLUICtrl* ctrl, void* user_data);
+ void onBtnSet();
+ void onChangeChildCtrl(LLUICtrl* ctrl);
+ void onChangeAnything();
static void onChangeText(LLLineEditor* caller, void* user_data);
virtual bool refreshFromRegion(LLViewerRegion* region);
@@ -128,7 +128,7 @@ protected:
void initHelpBtn(const std::string& name, const std::string& xml_alert);
// Callback for all help buttons, data is name of XML alert to show.
- static void onClickHelp(void* data);
+ void onClickHelp(std::string xml_alert);
// Returns TRUE if update sent and apply button should be
// disabled.
@@ -239,9 +239,9 @@ public:
protected:
virtual BOOL sendUpdate();
- static void onChangeUseEstateTime(LLUICtrl* ctrl, void* user_data);
- static void onChangeFixedSun(LLUICtrl* ctrl, void* user_data);
- static void onChangeSunHour(LLUICtrl* ctrl, void*);
+ void onChangeUseEstateTime();
+ void onChangeFixedSun();
+ void onChangeSunHour();
static void onClickDownloadRaw(void*);
static void onClickUploadRaw(void*);
@@ -256,8 +256,8 @@ class LLPanelEstateInfo : public LLPanelRegionInfo
public:
static void initDispatch(LLDispatcher& dispatch);
- static void onChangeFixedSun(LLUICtrl* ctrl, void* user_data);
- static void onChangeUseGlobalTime(LLUICtrl* ctrl, void* user_data);
+ void onChangeFixedSun();
+ void onChangeUseGlobalTime();
static void onClickEditSky(void* userdata);
static void onClickEditSkyHelp(void* userdata);
diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp
index de0b995f8f..ac743df4f1 100644
--- a/indra/newview/llfloateruipreview.cpp
+++ b/indra/newview/llfloateruipreview.cpp
@@ -553,32 +553,33 @@ void LLFloaterUIPreview::onLanguageComboSelect(LLUICtrl* ctrl)
void LLFloaterUIPreview::onClickExportSchema()
{
- gViewerWindow->setCursor(UI_CURSOR_WAIT);
- std::string template_path = gDirUtilp->getExpandedFilename(LL_PATH_DEFAULT_SKIN, "xui", "schema");
-
- typedef LLWidgetTypeRegistry::Registrar::registry_map_t::const_iterator registry_it;
- registry_it end_it = LLWidgetTypeRegistry::defaultRegistrar().endItems();
- for(registry_it it = LLWidgetTypeRegistry::defaultRegistrar().beginItems();
- it != end_it;
- ++it)
- {
- std::string widget_name = it->first;
- const LLInitParam::BaseBlock& block =
- (*LLDefaultParamBlockRegistry::instance().getValue(*LLWidgetTypeRegistry::instance().getValue(widget_name)))();
- LLXMLNodePtr root_nodep = new LLXMLNode();
- LLRNGWriter().writeRNG(widget_name, root_nodep, block, "http://www.lindenlab.com/xui");
-
- std::string file_name(template_path + gDirUtilp->getDirDelimiter() + widget_name + ".rng");
-
- LLFILE* rng_file = LLFile::fopen(file_name.c_str(), "w");
- {
- LLXMLNode::writeHeaderToFile(rng_file);
- const bool use_type_decorations = false;
- root_nodep->writeToFile(rng_file, std::string(), use_type_decorations);
- }
- fclose(rng_file);
- }
- gViewerWindow->setCursor(UI_CURSOR_ARROW);
+ //NOTE: schema generation not complete
+ //gViewerWindow->setCursor(UI_CURSOR_WAIT);
+ //std::string template_path = gDirUtilp->getExpandedFilename(LL_PATH_DEFAULT_SKIN, "xui", "schema");
+
+ //typedef LLWidgetTypeRegistry::Registrar::registry_map_t::const_iterator registry_it;
+ //registry_it end_it = LLWidgetTypeRegistry::defaultRegistrar().endItems();
+ //for(registry_it it = LLWidgetTypeRegistry::defaultRegistrar().beginItems();
+ // it != end_it;
+ // ++it)
+ //{
+ // std::string widget_name = it->first;
+ // const LLInitParam::BaseBlock& block =
+ // (*LLDefaultParamBlockRegistry::instance().getValue(*LLWidgetTypeRegistry::instance().getValue(widget_name)))();
+ // LLXMLNodePtr root_nodep = new LLXMLNode();
+ // LLRNGWriter().writeRNG(widget_name, root_nodep, block, "http://www.lindenlab.com/xui");
+
+ // std::string file_name(template_path + gDirUtilp->getDirDelimiter() + widget_name + ".rng");
+
+ // LLFILE* rng_file = LLFile::fopen(file_name.c_str(), "w");
+ // {
+ // LLXMLNode::writeHeaderToFile(rng_file);
+ // const bool use_type_decorations = false;
+ // root_nodep->writeToFile(rng_file, std::string(), use_type_decorations);
+ // }
+ // fclose(rng_file);
+ //}
+ //gViewerWindow->setCursor(UI_CURSOR_ARROW);
}
void LLFloaterUIPreview::onClickShowRectangles(const LLSD& data)
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 155262ee13..de18e74752 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -189,9 +189,9 @@ LLFolderView::LLFolderView(const Params& p)
mMinWidth(0),
mDragAndDropThisFrame(FALSE),
mCallbackRegistrar(NULL),
- mParentPanel(p.parent_panel)
-, mUseEllipses(false)
-, mDraggingOverItem(NULL)
+ mParentPanel(p.parent_panel),
+ mUseEllipses(false),
+ mDraggingOverItem(NULL)
{
LLRect rect = p.rect;
LLRect new_rect(rect.mLeft, rect.mBottom + getRect().getHeight(), rect.mLeft + getRect().getWidth(), rect.mBottom);
@@ -1240,7 +1240,9 @@ BOOL LLFolderView::canCut() const
{
const LLFolderViewItem* item = *selected_it;
const LLFolderViewEventListener* listener = item->getListener();
- if (!listener || !listener->isItemMovable())
+
+ // *WARKAROUND: it is too many places where the "isItemRemovable" method should be changed with "const" modifier
+ if (!listener || !(const_cast<LLFolderViewEventListener*>(listener))->isItemRemovable())
{
return FALSE;
}
diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp
index 9208beec9e..f83a426cda 100644
--- a/indra/newview/llfolderviewitem.cpp
+++ b/indra/newview/llfolderviewitem.cpp
@@ -890,11 +890,11 @@ void LLFolderViewItem::draw()
llfloor(getRect().getHeight() - font->getLineHeight() - ICON_PAD),
sHighlightFgColor, FALSE);
}
- if (getRect().getHeight() > llround(font->getLineHeight()) + ICON_PAD + 2)
+ if (getRect().getHeight() > llround(font->getLineHeight()) + ICON_PAD + 4)
{
gl_rect_2d(
0,
- llfloor(getRect().getHeight() - font->getLineHeight() - ICON_PAD) - 2,
+ llfloor(getRect().getHeight() - font->getLineHeight() - ICON_PAD) - 4,
getRect().getWidth() - 2,
2,
sHighlightFgColor, FALSE);
@@ -902,7 +902,7 @@ void LLFolderViewItem::draw()
{
gl_rect_2d(
0,
- llfloor(getRect().getHeight() - font->getLineHeight() - ICON_PAD) - 2,
+ llfloor(getRect().getHeight() - font->getLineHeight() - ICON_PAD) - 4,
getRect().getWidth() - 2,
2,
sHighlightBgColor, TRUE);
diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h
index 90c346b381..62a4b9a187 100644
--- a/indra/newview/llfolderviewitem.h
+++ b/indra/newview/llfolderviewitem.h
@@ -202,6 +202,7 @@ public:
virtual S32 arrange( S32* width, S32* height, S32 filter_generation );
virtual S32 getItemHeight();
void setDontShowInHierarchy(bool dont_show) { mDontShowInHierarhy = dont_show; }
+ bool getDontShowInHierarchy() { return mDontShowInHierarhy; }
// applies filters to control visibility of inventory items
virtual void filter( LLInventoryFilter& filter);
diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp
index 97b7f3e9ad..fbcaeee01f 100644
--- a/indra/newview/llfriendcard.cpp
+++ b/indra/newview/llfriendcard.cpp
@@ -166,6 +166,93 @@ bool LLFriendCardsManager::isItemInAnyFriendsList(const LLViewerInventoryItem* i
return items.count() > 0;
}
+
+bool LLFriendCardsManager::isObjDirectDescendentOfCategory(const LLInventoryObject* obj,
+ const LLViewerInventoryCategory* cat) const
+{
+ // we need both params to proceed.
+ if ( !obj || !cat )
+ return false;
+
+ // Need to check that target category is in the Calling Card/Friends folder.
+ // In other case function returns unpredictable result.
+ if ( !isCategoryInFriendFolder(cat) )
+ return false;
+
+ bool result = false;
+
+ LLInventoryModel::item_array_t* items;
+ LLInventoryModel::cat_array_t* cats;
+
+ gInventory.lockDirectDescendentArrays(cat->getUUID(), cats, items);
+ if ( items )
+ {
+ if ( obj->getType() == LLAssetType::AT_CALLINGCARD )
+ {
+ // For CALLINGCARD compare items by creator's id, if they are equal assume
+ // that it is same card and return true. Note: UUID's of compared items
+ // may be not equal. Also, we already know that obj should be type of LLInventoryItem,
+ // but in case inventory database is broken check what dynamic_cast returns.
+ const LLInventoryItem* item = dynamic_cast < const LLInventoryItem* > (obj);
+ if ( item )
+ {
+ LLUUID creator_id = item->getCreatorUUID();
+ LLViewerInventoryItem* cur_item = NULL;
+ for ( S32 i = items->count() - 1; i >= 0; --i )
+ {
+ cur_item = items->get(i);
+ if ( creator_id == cur_item->getCreatorUUID() )
+ {
+ result = true;
+ break;
+ }
+ }
+ }
+ }
+ else
+ {
+ // Else check that items have same type and name.
+ // Note: UUID's of compared items also may be not equal.
+ std::string obj_name = obj->getName();
+ LLViewerInventoryItem* cur_item = NULL;
+ for ( S32 i = items->count() - 1; i >= 0; --i )
+ {
+ cur_item = items->get(i);
+ if ( obj->getType() != cur_item->getType() )
+ continue;
+ if ( obj_name == cur_item->getName() )
+ {
+ result = true;
+ break;
+ }
+ }
+ }
+ }
+ if ( !result && cats )
+ {
+ // There is no direct descendent in items, so check categories.
+ // If target obj and descendent category have same type and name
+ // then return true. Note: UUID's of compared items also may be not equal.
+ std::string obj_name = obj->getName();
+ LLViewerInventoryCategory* cur_cat = NULL;
+ for ( S32 i = cats->count() - 1; i >= 0; --i )
+ {
+ cur_cat = cats->get(i);
+ if ( obj->getType() != cur_cat->getType() )
+ continue;
+ if ( obj_name == cur_cat->getName() )
+ {
+ result = true;
+ break;
+ }
+ }
+ }
+ gInventory.unlockDirectDescendentArrays(cat->getUUID());
+
+ return result;
+}
+
+
bool LLFriendCardsManager::isCategoryInFriendFolder(const LLViewerInventoryCategory* cat) const
{
if (NULL == cat)
diff --git a/indra/newview/llfriendcard.h b/indra/newview/llfriendcard.h
index aa391ce2c1..6ada342831 100644
--- a/indra/newview/llfriendcard.h
+++ b/indra/newview/llfriendcard.h
@@ -72,6 +72,12 @@ public:
bool isItemInAnyFriendsList(const LLViewerInventoryItem* item);
/**
+ * Checks if specified category is contained in the Calling Card/Friends folder and
+ * determines if specified Inventory Object exists in that category.
+ */
+ bool isObjDirectDescendentOfCategory(const LLInventoryObject* obj, const LLViewerInventoryCategory* cat) const;
+
+ /**
* Checks is the specified category is in the Calling Card/Friends folder
*/
bool isCategoryInFriendFolder(const LLViewerInventoryCategory* cat) const;
diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp
index 27e31d4edd..2e2b2d5101 100644
--- a/indra/newview/llgrouplist.cpp
+++ b/indra/newview/llgrouplist.cpp
@@ -43,6 +43,7 @@
// newview
#include "llagent.h"
#include "llgroupactions.h"
+#include "llfloaterreg.h"
#include "llviewercontrol.h" // for gSavedSettings
static LLDefaultChildRegistry::Register<LLGroupList> r("group_list");
@@ -231,6 +232,8 @@ BOOL LLGroupListItem::postBuild()
mInfoBtn = getChild<LLButton>("info_btn");
mInfoBtn->setClickedCallback(boost::bind(&LLGroupListItem::onInfoBtnClick, this));
+ childSetAction("profile_btn", boost::bind(&LLGroupListItem::onProfileBtnClick, this));
+
return TRUE;
}
@@ -321,6 +324,12 @@ void LLGroupListItem::setActive(bool active)
void LLGroupListItem::onInfoBtnClick()
{
+ LLFloaterReg::showInstance("inspect_group", LLSD().insert("group_id", mGroupID));
+}
+
+void LLGroupListItem::onProfileBtnClick()
+{
LLGroupActions::show(mGroupID);
}
+
//EOF
diff --git a/indra/newview/llgrouplist.h b/indra/newview/llgrouplist.h
index 9c3ab88901..8dbc13997c 100644
--- a/indra/newview/llgrouplist.h
+++ b/indra/newview/llgrouplist.h
@@ -98,6 +98,7 @@ public:
private:
void setActive(bool active);
void onInfoBtnClick();
+ void onProfileBtnClick();
LLTextBox* mGroupNameBox;
LLUUID mGroupID;
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index a35c04440b..a20b5ea66c 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -48,20 +48,19 @@
#include "llpanelimcontrolpanel.h"
#include "llscreenchannel.h"
#include "lltrans.h"
-#include "llviewertexteditor.h"
+#include "llchathistory.h"
#include "llviewerwindow.h"
#include "lltransientfloatermgr.h"
LLIMFloater::LLIMFloater(const LLUUID& session_id)
- : LLDockableFloater(NULL, session_id),
+ : LLTransientDockableFloater(NULL, true, session_id),
mControlPanel(NULL),
mSessionID(session_id),
mLastMessageIndex(-1),
- mLastFromName(),
mDialog(IM_NOTHING_SPECIAL),
- mHistoryEditor(NULL),
+ mChatHistory(NULL),
mInputEditor(NULL),
mPositioned(false),
mSessionInitialized(false)
@@ -81,17 +80,22 @@ LLIMFloater::LLIMFloater(const LLUUID& session_id)
mFactoryMap["panel_im_control_panel"] = LLCallbackMap(createPanelGroupControl, this);
}
}
+}
+
+void LLIMFloater::onFocusLost()
+{
+ LLIMModel::getInstance()->resetActiveSessionID();
+}
- LLTransientFloaterMgr::getInstance()->registerTransientFloater(this);
+void LLIMFloater::onFocusReceived()
+{
+ LLIMModel::getInstance()->setActiveSessionID(mSessionID);
}
// virtual
void LLIMFloater::onClose(bool app_quitting)
{
- LLIMModel::instance().sendLeaveSession(mSessionID, mOtherParticipantUUID);
-
- //*TODO - move to the IMModel::sendLeaveSession() for the integrity (IB)
- gIMMgr->removeSession(mSessionID);
+ gIMMgr->leaveSession(mSessionID);
}
/* static */
@@ -116,6 +120,23 @@ void LLIMFloater::newIMCallback(const LLSD& data){
}
}
+void LLIMFloater::onVisibilityChange(const LLSD& new_visibility)
+{
+ bool visible = new_visibility.asBoolean();
+
+ LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(mSessionID);
+
+ if (visible && voice_channel &&
+ voice_channel->getState() == LLVoiceChannel::STATE_CONNECTED)
+ {
+ LLFloaterReg::showInstance("voice_call", mSessionID);
+ }
+ else
+ {
+ LLFloaterReg::hideInstance("voice_call", mSessionID);
+ }
+}
+
void LLIMFloater::onSendMsg( LLUICtrl* ctrl, void* userdata )
{
LLIMFloater* self = (LLIMFloater*) userdata;
@@ -163,7 +184,6 @@ void LLIMFloater::sendMsg()
LLIMFloater::~LLIMFloater()
{
- LLTransientFloaterMgr::getInstance()->unregisterTransientFloater(this);
}
//virtual
@@ -198,7 +218,7 @@ BOOL LLIMFloater::postBuild()
childSetCommitCallback("chat_editor", onSendMsg, this);
- mHistoryEditor = getChild<LLViewerTextEditor>("im_text");
+ mChatHistory = getChild<LLChatHistory>("chat_history");
setTitle(LLIMModel::instance().getName(mSessionID));
setDocked(true);
@@ -230,7 +250,7 @@ void* LLIMFloater::createPanelIMControl(void* userdata)
void* LLIMFloater::createPanelGroupControl(void* userdata)
{
LLIMFloater *self = (LLIMFloater*)userdata;
- self->mControlPanel = new LLPanelGroupControlPanel();
+ self->mControlPanel = new LLPanelGroupControlPanel(self->mSessionID);
self->mControlPanel->setXMLFilename("panel_group_control_panel.xml");
return self->mControlPanel;
}
@@ -296,8 +316,10 @@ void LLIMFloater::setDocked(bool docked, bool pop_on_undock)
LLNotificationsUI::LLScreenChannel* channel = dynamic_cast<LLNotificationsUI::LLScreenChannel*>
(LLNotificationsUI::LLChannelManager::getInstance()->
findChannelByID(LLUUID(gSavedSettings.getString("NotificationChannelUUID"))));
+
+ setCanResize(!docked);
- LLDockableFloater::setDocked(docked, pop_on_undock);
+ LLTransientDockableFloater::setDocked(docked, pop_on_undock);
// update notification channel state
if(channel)
@@ -311,7 +333,7 @@ void LLIMFloater::setVisible(BOOL visible)
LLNotificationsUI::LLScreenChannel* channel = dynamic_cast<LLNotificationsUI::LLScreenChannel*>
(LLNotificationsUI::LLChannelManager::getInstance()->
findChannelByID(LLUUID(gSavedSettings.getString("NotificationChannelUUID"))));
- LLDockableFloater::setVisible(visible);
+ LLTransientDockableFloater::setVisible(visible);
// update notification channel state
if(channel)
@@ -387,7 +409,6 @@ void LLIMFloater::updateMessages()
if (messages.size())
{
- LLUIColor divider_color = LLUIColorTable::instance().getColor("LtGray_50");
LLUIColor chat_color = LLUIColorTable::instance().getColor("IMChatColor");
std::ostringstream message;
@@ -397,30 +418,20 @@ void LLIMFloater::updateMessages()
{
LLSD msg = *iter;
- const bool prepend_newline = true;
std::string from = msg["from"].asString();
+ std::string time = msg["time"].asString();
+ LLUUID from_id = msg["from_id"].asUUID();
+ std::string message = msg["message"].asString();
+ LLStyle::Params style_params;
+ style_params.color(chat_color);
+
if (from == agent_name)
from = LLTrans::getString("You");
- if (mLastFromName != from)
- {
- message << from << " ----- " << msg["time"].asString();
- mHistoryEditor->appendText(message.str(),
- prepend_newline, LLStyle::Params().color(divider_color) );
- message.str("");
- mLastFromName = from;
- }
- message << msg["message"].asString();
- mHistoryEditor->appendText(message.str(),
- prepend_newline,
- LLStyle::Params().color(chat_color) );
- message.str("");
+ mChatHistory->appendWidgetMessage(from_id, from, time, message, style_params);
mLastMessageIndex = msg["index"].asInteger();
}
- mHistoryEditor->blockUndo();
-
- mHistoryEditor->setCursorAndScrollToEnd();
}
}
@@ -432,7 +443,7 @@ void LLIMFloater::onInputEditorFocusReceived( LLFocusableElement* caller, void*
//in disconnected state IM input editor should be disabled
self->mInputEditor->setEnabled(!gDisconnected);
- self->mHistoryEditor->setCursorAndScrollToEnd();
+ self->mChatHistory->setCursorAndScrollToEnd();
}
// static
@@ -495,7 +506,7 @@ void LLIMFloater::chatFromLogFile(LLLogChat::ELogLineType type, std::string line
break;
}
- self->mHistoryEditor->appendText(message, true, LLStyle::Params().color(LLUIColorTable::instance().getColor("ChatHistoryTextColor")));
- self->mHistoryEditor->blockUndo();
+ self->mChatHistory->appendText(message, true, LLStyle::Params().color(LLUIColorTable::instance().getColor("ChatHistoryTextColor")));
+ self->mChatHistory->blockUndo();
}
diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h
index 9b519ee7e3..99810b6d6d 100644
--- a/indra/newview/llimfloater.h
+++ b/indra/newview/llimfloater.h
@@ -33,19 +33,19 @@
#ifndef LL_IMFLOATER_H
#define LL_IMFLOATER_H
-#include "lldockablefloater.h"
+#include "lltransientdockablefloater.h"
#include "lllogchat.h"
class LLLineEditor;
class LLPanelChatControlPanel;
-class LLViewerTextEditor;
+class LLChatHistory;
/**
* Individual IM window that appears at the bottom of the screen,
* optionally "docked" to the bottom tray.
*/
-class LLIMFloater : public LLDockableFloater
+class LLIMFloater : public LLTransientDockableFloater
{
public:
LLIMFloater(const LLUUID& session_id);
@@ -84,7 +84,12 @@ public:
// called when docked floater's position has been set by chiclet
void setPositioned(bool b) { mPositioned = b; };
+ void onVisibilityChange(const LLSD& new_visibility);
+
private:
+ // process focus events to set a currently active session
+ /* virtual */ void onFocusLost();
+ /* virtual */ void onFocusReceived();
static void onInputEditorFocusReceived( LLFocusableElement* caller, void* userdata );
static void onInputEditorFocusLost(LLFocusableElement* caller, void* userdata);
@@ -103,13 +108,9 @@ private:
LLUUID mSessionID;
S32 mLastMessageIndex;
- // username of last user who added text to this conversation, used to
- // suppress duplicate username divider bars
- std::string mLastFromName;
-
EInstantMessage mDialog;
LLUUID mOtherParticipantUUID;
- LLViewerTextEditor* mHistoryEditor;
+ LLChatHistory* mChatHistory;
LLLineEditor* mInputEditor;
bool mPositioned;
diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp
index 0ff3bd24e9..163984f740 100644
--- a/indra/newview/llimpanel.cpp
+++ b/indra/newview/llimpanel.cpp
@@ -951,7 +951,6 @@ LLFloaterIMPanel::LLFloaterIMPanel(const std::string& session_label,
mSentTypingState(TRUE),
mNumUnreadMessages(0),
mShowSpeakersOnConnect(TRUE),
- mAutoConnect(FALSE),
mTextIMPossible(TRUE),
mProfileButtonEnabled(TRUE),
mCallBackEnabled(TRUE),
@@ -1179,12 +1178,6 @@ void LLFloaterIMPanel::draw()
mInputEditor->setLabel(getString("default_text_label"));
}
- if (mAutoConnect && enable_connect)
- {
- onClickStartCall(this);
- mAutoConnect = FALSE;
- }
-
// show speakers window when voice first connects
if (mShowSpeakersOnConnect && voice_channel->isActive())
{
@@ -1525,7 +1518,7 @@ void LLFloaterIMPanel::onClickStartCall(void* userdata)
{
LLFloaterIMPanel* self = (LLFloaterIMPanel*) userdata;
- LLIMModel::getInstance()->getVoiceChannel(self->mSessionUUID)->activate();
+ gIMMgr->startCall(self->mSessionUUID);
}
// static
@@ -1533,7 +1526,7 @@ void LLFloaterIMPanel::onClickEndCall(void* userdata)
{
LLFloaterIMPanel* self = (LLFloaterIMPanel*) userdata;
- LLIMModel::getInstance()->getVoiceChannel(self->mSessionUUID)->deactivate();
+ gIMMgr->endCall(self->mSessionUUID);
}
// static
@@ -1593,9 +1586,7 @@ void LLFloaterIMPanel::onClose(bool app_quitting)
{
setTyping(FALSE);
- LLIMModel::instance().sendLeaveSession(mSessionUUID, mOtherParticipantUUID);
-
- gIMMgr->removeSession(mSessionUUID);
+ gIMMgr->leaveSession(mSessionUUID);
// *HACK hide the voice floater
LLFloaterReg::hideInstance("voice_call", mSessionUUID);
@@ -1712,11 +1703,6 @@ void LLFloaterIMPanel::sessionInitReplyReceived(const LLUUID& session_id)
}
}
-void LLFloaterIMPanel::requestAutoConnect()
-{
- mAutoConnect = TRUE;
-}
-
void LLFloaterIMPanel::setTyping(BOOL typing)
{
LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionUUID);
diff --git a/indra/newview/llimpanel.h b/indra/newview/llimpanel.h
index 57379b2c0d..4e306c7fab 100644
--- a/indra/newview/llimpanel.h
+++ b/indra/newview/llimpanel.h
@@ -250,8 +250,6 @@ public:
EInstantMessage getDialogType() const { return mDialog; }
void setDialogType(EInstantMessage dialog) { mDialog = dialog; }
- void requestAutoConnect();
-
void sessionInitReplyReceived(const LLUUID& im_session_id);
// Handle other participant in the session typing.
@@ -336,8 +334,6 @@ private:
BOOL mShowSpeakersOnConnect;
- BOOL mAutoConnect;
-
BOOL mTextIMPossible;
BOOL mProfileButtonEnabled;
BOOL mCallBackEnabled;
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 619e7044b4..b631c991ae 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -93,30 +93,45 @@ std::map<LLUUID, LLIMModel::LLIMSession*> LLIMModel::sSessionsMap;
void toast_callback(const LLSD& msg){
- // do not show toast in busy mode
- if (gAgent.getBusy())
+ // do not show toast in busy mode or it goes from agent
+ if (gAgent.getBusy() || gAgent.getID() == msg["from_id"])
{
return;
}
-
- //we send notifications to reset counter also
- if (msg["num_unread"].asInteger())
+
+ // check whether incoming IM belongs to an active session or not
+ if (LLIMModel::getInstance()->getActiveSessionID() == msg["session_id"])
{
- LLSD args;
- args["MESSAGE"] = msg["message"];
- args["TIME"] = msg["time"];
- args["FROM"] = msg["from"];
- args["FROM_ID"] = msg["from_id"];
- args["SESSION_ID"] = msg["session_id"];
+ return;
+ }
+
+ LLSD args;
+ args["MESSAGE"] = msg["message"];
+ args["TIME"] = msg["time"];
+ args["FROM"] = msg["from"];
+ args["FROM_ID"] = msg["from_id"];
+ args["SESSION_ID"] = msg["session_id"];
- LLNotifications::instance().add("IMToast", args, LLSD(), boost::bind(&LLIMFloater::show, msg["session_id"].asUUID()));
+ LLNotifications::instance().add("IMToast", args, LLSD(), boost::bind(&LLIMFloater::show, msg["session_id"].asUUID()));
+}
+
+void LLIMModel::setActiveSessionID(const LLUUID& session_id)
+{
+ // check if such an ID really exists
+ if (!findIMSession(session_id))
+ {
+ llwarns << "Trying to set as active a non-existent session!" << llendl;
+ return;
}
+
+ mActiveSessionID = session_id;
}
LLIMModel::LLIMModel()
{
- addChangedCallback(LLIMFloater::newIMCallback);
- addChangedCallback(toast_callback);
+ addNewMsgCallback(LLIMFloater::newIMCallback);
+ addNoUnreadMsgsCallback(LLIMFloater::newIMCallback);
+ addNewMsgCallback(toast_callback);
}
@@ -311,7 +326,7 @@ std::list<LLSD> LLIMModel::getMessages(LLUUID session_id, int start_index)
LLSD arg;
arg["session_id"] = session_id;
arg["num_unread"] = 0;
- mChangedSignal(arg);
+ mNoUnreadMsgsSignal(arg);
// TODO: in the future is there a more efficient way to return these
//of course there is - return as parameter (IB)
@@ -319,7 +334,7 @@ std::list<LLSD> LLIMModel::getMessages(LLUUID session_id, int start_index)
}
-bool LLIMModel::addToHistory(LLUUID session_id, std::string from, std::string utf8_text) {
+bool LLIMModel::addToHistory(LLUUID session_id, std::string from, LLUUID from_id, std::string utf8_text) {
LLIMSession* session = findIMSession(session_id);
@@ -331,6 +346,7 @@ bool LLIMModel::addToHistory(LLUUID session_id, std::string from, std::string ut
LLSD message;
message["from"] = from;
+ message["from_id"] = from_id;
message["message"] = utf8_text;
message["time"] = LLLogChat::timestamp(false); //might want to add date separately
message["index"] = (LLSD::Integer)session->mMsgs.size();
@@ -377,7 +393,7 @@ bool LLIMModel::addMessage(LLUUID session_id, std::string from, LLUUID from_id,
return false;
}
- addToHistory(session_id, from, utf8_text);
+ addToHistory(session_id, from, from_id, utf8_text);
if (log2file) logToFile(session_id, from, utf8_text);
session->mNumUnread++;
@@ -390,7 +406,7 @@ bool LLIMModel::addMessage(LLUUID session_id, std::string from, LLUUID from_id,
arg["from"] = from;
arg["from_id"] = from_id;
arg["time"] = LLLogChat::timestamp(false);
- mChangedSignal(arg);
+ mNewMsgSignal(arg);
return true;
}
@@ -620,14 +636,8 @@ void LLIMModel::sendMessage(const std::string& utf8_text,
}
// Add the recipient to the recent people list.
- //*TODO should be deleted, because speaker manager updates through callback the recent list
LLRecentPeople::instance().add(other_participant_id);
}
-
-boost::signals2::connection LLIMModel::addChangedCallback( boost::function<void (const LLSD& data)> cb )
-{
- return mChangedSignal.connect(cb);
-}
void session_starter_helper(
const LLUUID& temp_session_id,
@@ -854,23 +864,18 @@ public:
//in case of race conditions
speaker_mgr->updateSpeakers(gIMMgr->getPendingAgentListUpdates(mSessionID));
}
-
- LLFloaterIMPanel* floaterp =
- gIMMgr->findFloaterBySession(mSessionID);
- if (floaterp)
+ if (LLIMMgr::INVITATION_TYPE_VOICE == mInvitiationType)
{
- if ( mInvitiationType == LLIMMgr::INVITATION_TYPE_VOICE )
- {
- floaterp->requestAutoConnect();
- LLFloaterIMPanel::onClickStartCall(floaterp);
- // always open IM window when connecting to voice
- LLFloaterReg::showInstance("communicate", LLSD(), TRUE);
- }
- else if ( mInvitiationType == LLIMMgr::INVITATION_TYPE_IMMEDIATE )
- {
- LLFloaterReg::showInstance("communicate", LLSD(), TRUE);
- }
+ gIMMgr->startCall(mSessionID);
+ }
+
+ if ((mInvitiationType == LLIMMgr::INVITATION_TYPE_VOICE
+ || mInvitiationType == LLIMMgr::INVITATION_TYPE_IMMEDIATE)
+ && LLIMModel::getInstance()->findIMSession(mSessionID))
+ {
+ // always open IM window when connecting to voice
+ LLIMFloater::show(mSessionID);
}
gIMMgr->clearPendingAgentListUpdates(mSessionID);
@@ -1041,20 +1046,13 @@ void LLIncomingCallDialog::processCallResponse(S32 response)
if (voice)
{
- LLFloaterIMPanel* im_floater =
- gIMMgr->findFloaterBySession(
- session_id);
-
- if (im_floater)
+ if (gIMMgr->startCall(session_id))
{
- im_floater->requestAutoConnect();
- LLFloaterIMPanel::onClickStartCall(im_floater);
+ // always open IM window when connecting to voice
+ LLIMFloater::show(session_id);
}
}
- // always open IM window when connecting to voice
- LLFloaterReg::showInstance("communicate", session_id);
-
gIMMgr->clearPendingAgentListUpdates(session_id);
gIMMgr->clearPendingInvitation(session_id);
}
@@ -1159,15 +1157,10 @@ bool inviteUserResponse(const LLSD& notification, const LLSD& response)
payload["session_handle"].asString(),
payload["session_uri"].asString());
- LLFloaterIMPanel* im_floater =
- gIMMgr->findFloaterBySession(
- session_id);
- if (im_floater)
+ if (gIMMgr->startCall(session_id))
{
- im_floater->requestAutoConnect();
- LLFloaterIMPanel::onClickStartCall(im_floater);
// always open IM window when connecting to voice
- LLFloaterReg::showInstance("communicate", session_id, TRUE);
+ LLIMFloater::show(session_id);
}
gIMMgr->clearPendingAgentListUpdates(session_id);
@@ -1291,13 +1284,6 @@ void LLIMMgr::addMessage(
return;
}
- //not sure why...but if it is from ourselves we set the target_id
- //to be NULL
- if( other_participant_id == gAgent.getID() )
- {
- other_participant_id = LLUUID::null;
- }
-
LLFloaterIMPanel* floater;
LLUUID new_session_id = session_id;
if (new_session_id.isNull())
@@ -1429,12 +1415,10 @@ void LLIMMgr::addSystemMessage(const LLUUID& session_id, const std::string& mess
}
else // going to IM session
{
- LLFloaterIMPanel* floaterp = findFloaterBySession(session_id);
- if (floaterp)
+ if (hasSession(session_id))
{
- message = floaterp->getString(message_name);
+ message = LLTrans::getString(message_name + "-im");
message.setArgs(args);
-
gIMMgr->addMessage(session_id, LLUUID::null, SYSTEM_FROM, message.getString());
}
}
@@ -1566,6 +1550,16 @@ LLUUID LLIMMgr::addSession(
return session_id;
}
+bool LLIMMgr::leaveSession(const LLUUID& session_id)
+{
+ LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(session_id);
+ if (!im_session) return false;
+
+ LLIMModel::getInstance()->sendLeaveSession(session_id, im_session->mOtherParticipantID);
+ gIMMgr->removeSession(session_id);
+ return true;
+}
+
// This removes the panel referenced by the uuid, and then restores
// internal consistency. The internal pointer is not deleted? Did you mean
// a pointer to the corresponding LLIMSession? Session data is cleared now.
@@ -1779,7 +1773,7 @@ LLFloaterIMPanel* LLIMMgr::findFloaterBySession(const LLUUID& session_id)
BOOL LLIMMgr::hasSession(const LLUUID& session_id)
{
- return (findFloaterBySession(session_id) != NULL);
+ return LLIMModel::getInstance()->findIMSession(session_id) != NULL;
}
void LLIMMgr::clearPendingInvitation(const LLUUID& session_id)
@@ -1905,6 +1899,24 @@ void LLIMMgr::removeSessionObserver(LLIMSessionObserver *observer)
mSessionObservers.remove(observer);
}
+bool LLIMMgr::startCall(const LLUUID& session_id)
+{
+ LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(session_id);
+ if (!voice_channel) return false;
+
+ voice_channel->activate();
+ return true;
+}
+
+bool LLIMMgr::endCall(const LLUUID& session_id)
+{
+ LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(session_id);
+ if (!voice_channel) return false;
+
+ voice_channel->deactivate();
+ return true;
+}
+
// create a floater and update internal representation for
// consistency. Returns the pointer, caller (the class instance since
// it is a private method) is not responsible for deleting the
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index 84646a9a6f..68beb29034 100644
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -75,10 +75,20 @@ public:
LLIMModel();
+
+ //we should control the currently active session
+ LLUUID mActiveSessionID;
+ void setActiveSessionID(const LLUUID& session_id);
+ void resetActiveSessionID() { mActiveSessionID.setNull(); }
+ LLUUID getActiveSessionID() { return mActiveSessionID; }
+
//*TODO make it non-static as LLIMMOdel is a singleton (IB)
static std::map<LLUUID, LLIMSession*> sSessionsMap; //mapping session_id to session
- boost::signals2::signal<void(const LLSD&)> mChangedSignal;
+ typedef boost::signals2::signal<void(const LLSD&)> session_signal_t;
+ typedef boost::function<void(const LLSD&)> session_callback_t;
+ session_signal_t mNewMsgSignal;
+ session_signal_t mNoUnreadMsgsSignal;
/**
* Find an IM Session corresponding to session_id
@@ -91,7 +101,8 @@ public:
*/
void updateSessionID(const LLUUID& old_session_id, const LLUUID& new_session_id);
- boost::signals2::connection addChangedCallback( boost::function<void (const LLSD& data)> cb );
+ boost::signals2::connection addNewMsgCallback( session_callback_t cb ) { return mNewMsgSignal.connect(cb); }
+ boost::signals2::connection addNoUnreadMsgsCallback( session_callback_t cb ) { return mNoUnreadMsgsSignal.connect(cb); }
bool newSession(LLUUID session_id, std::string name, EInstantMessage type, LLUUID other_participant_id,
const std::vector<LLUUID>& ids = std::vector<LLUUID>());
@@ -99,7 +110,7 @@ public:
std::list<LLSD> getMessages(LLUUID session_id, int start_index = 0);
bool addMessage(LLUUID session_id, std::string from, LLUUID other_participant_id, std::string utf8_text, bool log2file = true);
- bool addToHistory(LLUUID session_id, std::string from, std::string utf8_text);
+ bool addToHistory(LLUUID session_id, std::string from, LLUUID from_id, std::string utf8_text);
bool logToFile(const LLUUID& session_id, const std::string& from, const std::string& utf8_text);
@@ -219,10 +230,12 @@ public:
const std::string& voice_session_handle,
const std::string& caller_uri = LLStringUtil::null);
- // This removes the panel referenced by the uuid, and then
- // restores internal consistency. The internal pointer is not
- // deleted.
- void removeSession(LLUUID session_id);
+ /**
+ * Leave the session with session id. Send leave session notification
+ * to the server and removes all associated session data
+ * @return false if the session with specified id was not exist
+ */
+ bool leaveSession(const LLUUID& session_id);
void inviteToSession(
const LLUUID& session_id,
@@ -282,7 +295,24 @@ public:
void addSessionObserver(LLIMSessionObserver *);
void removeSessionObserver(LLIMSessionObserver *);
+ /**
+ * Start call in a session
+ * @return false if voice channel doesn't exist
+ **/
+ bool startCall(const LLUUID& session_id);
+
+ /**
+ * End call in a session
+ * @return false if voice channel doesn't exist
+ **/
+ bool endCall(const LLUUID& session_id);
+
private:
+ // This removes the panel referenced by the uuid, and then
+ // restores internal consistency. The internal pointer is not
+ // deleted.
+ void removeSession(LLUUID session_id);
+
// create a panel and update internal representation for
// consistency. Returns the pointer, caller (the class instance
// since it is a private method) is not responsible for deleting
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index db7d4f4c8f..3aa35d98f8 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -238,8 +238,7 @@ void LLInvFVBridge::renameLinkedItems(const LLUUID &item_id, const std::string&
return;
}
- LLInventoryModel::item_array_t item_array;
- model->collectLinkedItems(item_id, item_array);
+ LLInventoryModel::item_array_t item_array = model->collectLinkedItems(item_id);
for (LLInventoryModel::item_array_t::iterator iter = item_array.begin();
iter != item_array.end();
iter++)
@@ -1242,7 +1241,6 @@ BOOL LLItemBridge::renameItem(const std::string& new_name)
buildDisplayName(new_item, mDisplayName);
new_item->updateServer(FALSE);
model->updateItem(new_item);
- model->updateLinkedObjects(item->getUUID());
model->notifyObservers();
}
@@ -1292,7 +1290,7 @@ BOOL LLItemBridge::isItemCopyable() const
return FALSE;
}
- if( avatarp->isWearingAttachment( mUUID, TRUE ) )
+ if(avatarp->isWearingAttachment(mUUID))
{
return FALSE;
}
@@ -1416,7 +1414,7 @@ BOOL LLFolderBridge::isItemRemovable()
if( (item->getType() == LLAssetType::AT_CLOTHING) ||
(item->getType() == LLAssetType::AT_BODYPART) )
{
- if( gAgentWearables.isWearingItem( item->getUUID(), TRUE ) )
+ if(gAgentWearables.isWearingItem(item->getUUID()))
{
return FALSE;
}
@@ -1424,7 +1422,7 @@ BOOL LLFolderBridge::isItemRemovable()
else
if( item->getType() == LLAssetType::AT_OBJECT )
{
- if( avatar->isWearingAttachment( item->getUUID(), TRUE ) )
+ if(avatar->isWearingAttachment(item->getUUID()))
{
return FALSE;
}
@@ -1462,6 +1460,39 @@ BOOL LLFolderBridge::copyToClipboard() const
return FALSE;
}
+BOOL LLFolderBridge::isClipboardPasteable() const
+{
+ if ( ! LLInvFVBridge::isClipboardPasteable() )
+ return FALSE;
+
+ // Don't allow pasting duplicates to the Calling Card/Friends subfolders, see bug EXT-1599
+ if ( LLFriendCardsManager::instance().isCategoryInFriendFolder( getCategory() ) )
+ {
+ LLInventoryModel* model = getInventoryModel();
+ if ( !model )
+ {
+ return FALSE;
+ }
+
+ LLDynamicArray<LLUUID> objects;
+ LLInventoryClipboard::instance().retrieve(objects);
+ const LLViewerInventoryCategory *current_cat = getCategory();
+
+ // Search for the direct descendent of current Friends subfolder among all pasted items,
+ // and return false if is found.
+ for(S32 i = objects.count() - 1; i >= 0; --i)
+ {
+ const LLUUID &obj_id = objects.get(i);
+ if ( LLFriendCardsManager::instance().isObjDirectDescendentOfCategory(model->getObject(obj_id), current_cat) )
+ {
+ return FALSE;
+ }
+ }
+
+ }
+ return TRUE;
+}
+
BOOL LLFolderBridge::isClipboardPasteableAsLink() const
{
// Check normal paste-as-link permissions
@@ -1479,13 +1510,15 @@ BOOL LLFolderBridge::isClipboardPasteableAsLink() const
const LLViewerInventoryCategory *current_cat = getCategory();
if (current_cat)
{
+ const BOOL is_in_friend_folder = LLFriendCardsManager::instance().isCategoryInFriendFolder( current_cat );
const LLUUID &current_cat_id = current_cat->getUUID();
LLDynamicArray<LLUUID> objects;
LLInventoryClipboard::instance().retrieve(objects);
S32 count = objects.count();
for(S32 i = 0; i < count; i++)
{
- const LLInventoryCategory *cat = model->getCategory(objects.get(i));
+ const LLUUID &obj_id = objects.get(i);
+ const LLInventoryCategory *cat = model->getCategory(obj_id);
if (cat)
{
const LLUUID &cat_id = cat->getUUID();
@@ -1496,6 +1529,17 @@ BOOL LLFolderBridge::isClipboardPasteableAsLink() const
return FALSE;
}
}
+ // Don't allow pasting duplicates to the Calling Card/Friends subfolders, see bug EXT-1599
+ if ( is_in_friend_folder )
+ {
+ // If object is direct descendent of current Friends subfolder than return false.
+ // Note: We can't use 'const LLInventoryCategory *cat', because it may be null
+ // in case type of obj_id is LLInventoryItem.
+ if ( LLFriendCardsManager::instance().isObjDirectDescendentOfCategory(model->getObject(obj_id), current_cat) )
+ {
+ return FALSE;
+ }
+ }
}
}
return TRUE;
@@ -1547,6 +1591,12 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
// BAP - restrictions?
is_movable = true;
}
+
+ if (mUUID == gInventory.findCategoryUUIDForType(LLAssetType::AT_FAVORITE))
+ {
+ is_movable = FALSE; // It's generally movable but not into Favorites folder. EXT-1604
+ }
+
if( is_movable )
{
gInventory.collectDescendents( cat_id, descendent_categories, descendent_items, FALSE );
@@ -2155,7 +2205,6 @@ BOOL LLFolderBridge::renameItem(const std::string& new_name)
new_cat->rename(new_name);
new_cat->updateServer(FALSE);
model->updateCategory(new_cat);
- model->updateLinkedObjects(cat->getUUID());
model->notifyObservers();
}
@@ -2803,16 +2852,27 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
{
case LLAssetType::AT_CLOTHING:
case LLAssetType::AT_BODYPART:
- is_movable = !gAgentWearables.isWearingItem(inv_item->getUUID(), TRUE);
+ is_movable = !gAgentWearables.isWearingItem(inv_item->getUUID());
break;
case LLAssetType::AT_OBJECT:
- is_movable = !avatar->isWearingAttachment(inv_item->getUUID(), TRUE);
+ is_movable = !avatar->isWearingAttachment(inv_item->getUUID());
break;
default:
break;
}
}
+
+ if ( is_movable )
+ {
+ // Don't allow creating duplicates in the Calling Card/Friends
+ // subfolders, see bug EXT-1599. Check is item direct descendent
+ // of target folder and forbid item's movement if it so.
+ // Note: isItemDirectDescendentOfCategory checks if
+ // passed category is in the Calling Card/Friends folder
+ is_movable = ! LLFriendCardsManager::instance()
+ .isObjDirectDescendentOfCategory (inv_item, getCategory());
+ }
LLUUID favorites_id = model->findCategoryUUIDForType(LLAssetType::AT_FAVORITE);
@@ -3706,7 +3766,7 @@ BOOL LLObjectBridge::isItemRemovable()
{
LLVOAvatarSelf* avatar = gAgent.getAvatarObject();
if(!avatar) return FALSE;
- if(avatar->isWearingAttachment(mUUID, TRUE)) return FALSE;
+ if(avatar->isWearingAttachment(mUUID)) return FALSE;
return LLInvFVBridge::isItemRemovable();
}
@@ -3755,14 +3815,13 @@ void LLObjectBridge::performAction(LLFolderView* folder, LLInventoryModel* model
else if ("detach" == action)
{
LLInventoryItem* item = gInventory.getItem(mUUID);
- if( item )
+ if(item)
{
gMessageSystem->newMessageFast(_PREHASH_DetachAttachmentIntoInv);
- gMessageSystem->nextBlockFast(_PREHASH_ObjectData );
- gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() );
- gMessageSystem->addUUIDFast(_PREHASH_ItemID, item->getUUID() );
-
- gMessageSystem->sendReliable( gAgent.getRegion()->getHost() );
+ gMessageSystem->nextBlockFast(_PREHASH_ObjectData);
+ gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
+ gMessageSystem->addUUIDFast(_PREHASH_ItemID, item->getLinkedUUID());
+ gMessageSystem->sendReliable( gAgent.getRegion()->getHost());
}
// this object might have been selected, so let the selection manager know it's gone now
LLViewerObject *found_obj =
@@ -3819,7 +3878,10 @@ std::string LLObjectBridge::getLabelSuffix() const
{
std::string attachment_point_name = avatar->getAttachedPointName(mUUID);
LLStringUtil::toLower(attachment_point_name);
- return LLItemBridge::getLabelSuffix() + std::string(" (worn on ") + attachment_point_name + std::string(")");
+
+ LLStringUtil::format_map_t args;
+ args["[ATTACHMENT_POINT]"] = attachment_point_name.c_str();
+ return LLItemBridge::getLabelSuffix() + LLTrans::getString("WornOnAttachmentPoint", args);
}
else
{
@@ -4015,7 +4077,6 @@ BOOL LLObjectBridge::renameItem(const std::string& new_name)
buildDisplayName(new_item, mDisplayName);
new_item->updateServer(FALSE);
model->updateItem(new_item);
- model->updateLinkedObjects(item->getUUID());
model->notifyObservers();
@@ -4115,10 +4176,8 @@ void remove_inventory_category_from_avatar( LLInventoryCategory* category )
struct OnRemoveStruct
{
LLUUID mUUID;
- LLFolderView *mFolderToDeleteSelected;
- OnRemoveStruct(const LLUUID& uuid, LLFolderView *fv = NULL):
- mUUID(uuid),
- mFolderToDeleteSelected(fv)
+ OnRemoveStruct(const LLUUID& uuid):
+ mUUID(uuid)
{
}
};
@@ -4230,7 +4289,7 @@ BOOL LLWearableBridge::renameItem(const std::string& new_name)
BOOL LLWearableBridge::isItemRemovable()
{
- if (gAgentWearables.isWearingItem(mUUID, TRUE)) return FALSE;
+ if (gAgentWearables.isWearingItem(mUUID)) return FALSE;
return LLInvFVBridge::isItemRemovable();
}
@@ -4238,7 +4297,7 @@ std::string LLWearableBridge::getLabelSuffix() const
{
if( gAgentWearables.isWearingItem( mUUID ) )
{
- return LLItemBridge::getLabelSuffix() + " (worn)";
+ return LLItemBridge::getLabelSuffix() + LLTrans::getString("worn");
}
else
{
@@ -4274,24 +4333,11 @@ void LLWearableBridge::performAction(LLFolderView* folder, LLInventoryModel* mod
LLViewerInventoryItem* item = getItem();
if (item)
{
- if (item->getIsLinkType() &&
- model->isObjectDescendentOf(mUUID,LLAppearanceManager::getCOF()))
- {
- // Delete link after item has been taken off.
- LLWearableList::instance().getAsset(item->getAssetUUID(),
- item->getName(),
- item->getType(),
- LLWearableBridge::onRemoveFromAvatarArrived,
- new OnRemoveStruct(mUUID, folder));
- }
- else
- {
- LLWearableList::instance().getAsset(item->getAssetUUID(),
- item->getName(),
- item->getType(),
- LLWearableBridge::onRemoveFromAvatarArrived,
- new OnRemoveStruct(mUUID));
- }
+ LLWearableList::instance().getAsset(item->getAssetUUID(),
+ item->getName(),
+ item->getType(),
+ LLWearableBridge::onRemoveFromAvatarArrived,
+ new OnRemoveStruct(mUUID));
}
}
}
@@ -4402,9 +4448,27 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
disabled_items.push_back(std::string("Wearable Edit"));
}
- if( item && (item->getType() == LLAssetType::AT_CLOTHING) )
+ // Disable wear and take off based on whether the item is worn.
+ if(item)
{
- items.push_back(std::string("Take Off"));
+ switch (item->getType())
+ {
+ case LLAssetType::AT_CLOTHING:
+ items.push_back(std::string("Take Off"));
+ case LLAssetType::AT_BODYPART:
+ if (gAgentWearables.isWearingItem(item->getUUID()))
+ {
+ disabled_items.push_back(std::string("Wearable Wear"));
+ disabled_items.push_back(std::string("Wearable Add"));
+ }
+ else
+ {
+ disabled_items.push_back(std::string("Take Off"));
+ }
+ break;
+ default:
+ break;
+ }
}
}
hideContextEntries(menu, items, disabled_items);
@@ -4619,7 +4683,7 @@ void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable,
void* userdata)
{
OnRemoveStruct *on_remove_struct = (OnRemoveStruct*) userdata;
- LLUUID item_id = on_remove_struct->mUUID;
+ const LLUUID &item_id = gInventory.getLinkedItemID(on_remove_struct->mUUID);
if(wearable)
{
if( gAgentWearables.isWearingItem( item_id ) )
@@ -4635,10 +4699,20 @@ void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable,
}
}
}
- if (on_remove_struct->mFolderToDeleteSelected)
+
+ // Find and remove this item from the COF.
+ LLInventoryModel::item_array_t items = gInventory.collectLinkedItems(item_id, LLAppearanceManager::getCOF());
+ llassert(items.size() == 1); // Should always have one and only one item linked to this in the COF.
+ for (LLInventoryModel::item_array_t::const_iterator iter = items.begin();
+ iter != items.end();
+ ++iter)
{
- on_remove_struct->mFolderToDeleteSelected->removeSelectedItems();
+ const LLViewerInventoryItem *linked_item = (*iter);
+ const LLUUID &item_id = linked_item->getUUID();
+ gInventory.purgeObject(item_id);
}
+ gInventory.notifyObservers();
+
delete on_remove_struct;
}
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index d1d2c57f07..6b2a2d32de 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -315,6 +315,7 @@ public:
virtual BOOL isItemMovable() const ;
virtual BOOL isUpToDate() const;
virtual BOOL isItemCopyable() const;
+ virtual BOOL isClipboardPasteable() const;
virtual BOOL isClipboardPasteableAsLink() const;
virtual BOOL copyToClipboard() const;
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 9a8647aba4..d5a527773c 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -507,8 +507,12 @@ void LLInventoryModel::collectDescendentsIf(const LLUUID& id,
}
}
-void LLInventoryModel::updateLinkedObjects(const LLUUID& object_id)
+void LLInventoryModel::updateLinkedItems(const LLUUID& object_id)
{
+ const LLInventoryObject *obj = getObject(object_id);
+ if (!obj || obj->getIsLinkType())
+ return;
+
LLInventoryModel::cat_array_t cat_array;
LLInventoryModel::item_array_t item_array;
LLLinkedItemIDMatches is_linked_item_match(object_id);
@@ -536,16 +540,31 @@ void LLInventoryModel::updateLinkedObjects(const LLUUID& object_id)
notifyObservers();
}
-void LLInventoryModel::collectLinkedItems(const LLUUID& id,
- item_array_t& items)
+const LLUUID& LLInventoryModel::getLinkedItemID(const LLUUID& object_id) const
{
+ const LLInventoryItem *item = gInventory.getItem(object_id);
+ if (!item)
+ {
+ return object_id;
+ }
+
+ // Find the base item in case this a link (if it's not a link,
+ // this will just be inv_item_id)
+ return item->getLinkedUUID();
+}
+
+LLInventoryModel::item_array_t LLInventoryModel::collectLinkedItems(const LLUUID& id,
+ const LLUUID& start_folder_id)
+{
+ item_array_t items;
LLInventoryModel::cat_array_t cat_array;
LLLinkedItemIDMatches is_linked_item_match(id);
- collectDescendentsIf(gInventory.getRootFolderID(),
+ collectDescendentsIf((start_folder_id == LLUUID::null ? gInventory.getRootFolderID() : start_folder_id),
cat_array,
items,
LLInventoryModel::INCLUDE_TRASH,
is_linked_item_match);
+ return items;
}
// Generates a string containing the path to the item specified by
@@ -909,8 +928,7 @@ void LLInventoryModel::purgeLinkedObjects(const LLUUID &id)
return;
}
- LLInventoryModel::item_array_t item_array;
- collectLinkedItems(id, item_array);
+ LLInventoryModel::item_array_t item_array = collectLinkedItems(id);
for (LLInventoryModel::item_array_t::iterator iter = item_array.begin();
iter != item_array.end();
@@ -1131,6 +1149,13 @@ void LLInventoryModel::addChangedMask(U32 mask, const LLUUID& referent)
{
mChangedItemIDs.insert(referent);
}
+
+ // Update all linked items. Starting with just LABEL because I'm
+ // not sure what else might need to be accounted for this.
+ if (mModifyMask & LLInventoryObserver::LABEL)
+ {
+ updateLinkedItems(referent);
+ }
}
// This method to prepares a set of mock inventory which provides
diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h
index e7f9db9221..7d4f3372e9 100644
--- a/indra/newview/llinventorymodel.h
+++ b/indra/newview/llinventorymodel.h
@@ -190,10 +190,13 @@ public:
// Collect all items in inventory that are linked to item_id.
// Assumes item_id is itself not a linked item.
- void collectLinkedItems(const LLUUID& item_id,
- item_array_t& items);
- // Updates all linked objects pointing to this id.
- void updateLinkedObjects(const LLUUID& object_id);
+ item_array_t collectLinkedItems(const LLUUID& item_id,
+ const LLUUID& start_folder_id = LLUUID::null);
+ // Updates all linked items pointing to this id.
+ void updateLinkedItems(const LLUUID& object_id);
+
+ // Get the inventoryID that this item points to, else just return item_id
+ const LLUUID& getLinkedItemID(const LLUUID& object_id) const;
// The inventory model usage is sensitive to the initial construction of the
// model.
diff --git a/indra/newview/lllocaltextureobject.cpp b/indra/newview/lllocaltextureobject.cpp
index 99c98ec16e..6bcbe6f58c 100644
--- a/indra/newview/lllocaltextureobject.cpp
+++ b/indra/newview/lllocaltextureobject.cpp
@@ -47,18 +47,18 @@ LLLocalTextureObject::LLLocalTextureObject() :
mImage = NULL;
}
-LLLocalTextureObject::LLLocalTextureObject(LLViewerFetchedTexture *image, LLUUID id)
+LLLocalTextureObject::LLLocalTextureObject(LLViewerFetchedTexture* image, const LLUUID& id)
{
mImage = image;
gGL.getTexUnit(0)->bind(mImage);
mID = id;
}
-LLLocalTextureObject::LLLocalTextureObject(const LLLocalTextureObject &lto) :
-mImage(lto.mImage),
-mID(lto.mID),
-mIsBakedReady(lto.mIsBakedReady),
-mDiscard(lto.mDiscard)
+LLLocalTextureObject::LLLocalTextureObject(const LLLocalTextureObject& lto) :
+ mImage(lto.mImage),
+ mID(lto.mID),
+ mIsBakedReady(lto.mIsBakedReady),
+ mDiscard(lto.mDiscard)
{
U32 num_layers = lto.getNumTexLayers();
mTexLayers.reserve(num_layers);
@@ -97,7 +97,7 @@ LLTexLayer* LLLocalTextureObject::getTexLayer(U32 index) const
LLTexLayer* LLLocalTextureObject::getTexLayer(const std::string &name)
{
- for( tex_layer_p::iterator iter = mTexLayers.begin(); iter != mTexLayers.end(); iter++)
+ for( tex_layer_vec_t::iterator iter = mTexLayers.begin(); iter != mTexLayers.end(); iter++)
{
LLTexLayer *layer = *iter;
if (layer->getName().compare(name) == 0)
@@ -190,7 +190,7 @@ BOOL LLLocalTextureObject::removeTexLayer(U32 index)
{
return FALSE;
}
- tex_layer_p::iterator iter = mTexLayers.begin();
+ tex_layer_vec_t::iterator iter = mTexLayers.begin();
iter += index;
delete *iter;
diff --git a/indra/newview/lllocaltextureobject.h b/indra/newview/lllocaltextureobject.h
index 138bbad677..c8b8aa924b 100644
--- a/indra/newview/lllocaltextureobject.h
+++ b/indra/newview/lllocaltextureobject.h
@@ -35,7 +35,8 @@
#include <boost/shared_ptr.hpp>
-class LLViewerFetchedTexture;
+#include "llviewertexture.h"
+
class LLUUID;
class LLTexLayer;
class LLTextureEntry;
@@ -49,8 +50,8 @@ class LLLocalTextureObject
{
public:
LLLocalTextureObject();
- LLLocalTextureObject(LLViewerFetchedTexture *image, LLUUID id);
- LLLocalTextureObject(const LLLocalTextureObject &lto);
+ LLLocalTextureObject(LLViewerFetchedTexture* image, const LLUUID& id);
+ LLLocalTextureObject(const LLLocalTextureObject& lto);
~LLLocalTextureObject();
LLViewerFetchedTexture* getImage() const;
@@ -79,8 +80,8 @@ private:
// NOTE: LLLocalTextureObject should be the exclusive owner of mTexEntry and mTexLayer
// using shared pointers here only for smart assignment & cleanup
// do NOT create new shared pointers to these objects, or keep pointers to them around
- typedef std::vector<LLTexLayer*> tex_layer_p;
- tex_layer_p mTexLayers;
+ typedef std::vector<LLTexLayer*> tex_layer_vec_t;
+ tex_layer_vec_t mTexLayers;
LLUUID mID;
diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp
index 42838b311b..00f12ae2eb 100644
--- a/indra/newview/lllocationinputctrl.cpp
+++ b/indra/newview/lllocationinputctrl.cpp
@@ -264,6 +264,8 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p)
mAddLandmarkTooltip = LLTrans::getString("LocationCtrlAddLandmarkTooltip");
mEditLandmarkTooltip = LLTrans::getString("LocationCtrlEditLandmarkTooltip");
+ getChild<LLView>("Location History")->setToolTip(LLTrans::getString("LocationCtrlComboBtnTooltip"));
+ getChild<LLView>("Place Information")->setToolTip(LLTrans::getString("LocationCtrlInfoBtnTooltip"));
}
LLLocationInputCtrl::~LLLocationInputCtrl()
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index 8005cd1180..8f29f908e5 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -51,6 +51,7 @@
#include "llpluginclassmedia.h"
#include "llslurl.h"
#include "lluictrlfactory.h" // LLDefaultChildRegistry
+#include "llkeyboard.h"
// linden library includes
#include "llfocusmgr.h"
@@ -193,7 +194,7 @@ BOOL LLMediaCtrl::handleHover( S32 x, S32 y, MASK mask )
if (mMediaSource)
{
- mMediaSource->mouseMove(x, y);
+ mMediaSource->mouseMove(x, y, mask);
gViewerWindow->setCursor(mMediaSource->getLastSetCursor());
}
@@ -205,7 +206,7 @@ BOOL LLMediaCtrl::handleHover( S32 x, S32 y, MASK mask )
BOOL LLMediaCtrl::handleScrollWheel( S32 x, S32 y, S32 clicks )
{
if (mMediaSource && mMediaSource->hasMedia())
- mMediaSource->getMediaPlugin()->scrollEvent(0, clicks, MASK_NONE);
+ mMediaSource->getMediaPlugin()->scrollEvent(0, clicks, gKeyboard->currentMask(TRUE));
return TRUE;
}
@@ -218,7 +219,7 @@ BOOL LLMediaCtrl::handleMouseUp( S32 x, S32 y, MASK mask )
if (mMediaSource)
{
- mMediaSource->mouseUp(x, y);
+ mMediaSource->mouseUp(x, y, mask);
// *HACK: LLMediaImplLLMozLib automatically takes focus on mouseup,
// in addition to the onFocusReceived() call below. Undo this. JC
@@ -241,7 +242,50 @@ BOOL LLMediaCtrl::handleMouseDown( S32 x, S32 y, MASK mask )
convertInputCoords(x, y);
if (mMediaSource)
- mMediaSource->mouseDown(x, y);
+ mMediaSource->mouseDown(x, y, mask);
+
+ gFocusMgr.setMouseCapture( this );
+
+ if (mTakeFocusOnClick)
+ {
+ setFocus( TRUE );
+ }
+
+ return TRUE;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+BOOL LLMediaCtrl::handleRightMouseUp( S32 x, S32 y, MASK mask )
+{
+ convertInputCoords(x, y);
+
+ if (mMediaSource)
+ {
+ mMediaSource->mouseUp(x, y, mask, 1);
+
+ // *HACK: LLMediaImplLLMozLib automatically takes focus on mouseup,
+ // in addition to the onFocusReceived() call below. Undo this. JC
+ if (!mTakeFocusOnClick)
+ {
+ mMediaSource->focus(false);
+ gViewerWindow->focusClient();
+ }
+ }
+
+ gFocusMgr.setMouseCapture( NULL );
+
+ return TRUE;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
+BOOL LLMediaCtrl::handleRightMouseDown( S32 x, S32 y, MASK mask )
+{
+ convertInputCoords(x, y);
+
+ if (mMediaSource)
+ mMediaSource->mouseDown(x, y, mask, 1);
gFocusMgr.setMouseCapture( this );
@@ -260,7 +304,7 @@ BOOL LLMediaCtrl::handleDoubleClick( S32 x, S32 y, MASK mask )
convertInputCoords(x, y);
if (mMediaSource)
- mMediaSource->mouseLeftDoubleClick( x, y );
+ mMediaSource->mouseDoubleClick( x, y, mask);
gFocusMgr.setMouseCapture( this );
@@ -321,36 +365,9 @@ BOOL LLMediaCtrl::handleKeyHere( KEY key, MASK mask )
{
BOOL result = FALSE;
- // FIXME: THIS IS SO WRONG.
- // Menu keys should be handled by the menu system and not passed to UI elements, but this is how LLTextEditor and LLLineEditor do it...
-
if (mMediaSource)
{
- if( MASK_CONTROL & mask )
- {
- if( 'C' == key )
- {
- mMediaSource->copy();
- result = TRUE;
- }
- else
- if( 'V' == key )
- {
- mMediaSource->paste();
- result = TRUE;
- }
- else
- if( 'X' == key )
- {
- mMediaSource->cut();
- result = TRUE;
- }
- }
-
- if(!result)
- {
- result = mMediaSource->handleKeyHere(key, mask);
- }
+ result = mMediaSource->handleKeyHere(key, mask);
}
return result;
@@ -373,12 +390,9 @@ BOOL LLMediaCtrl::handleUnicodeCharHere(llwchar uni_char)
{
BOOL result = FALSE;
- // only accept 'printable' characters, sigh...
- if (uni_char >= 32 // discard 'control' characters
- && uni_char != 127) // SDL thinks this is 'delete' - yuck.
+ if (mMediaSource)
{
- if (mMediaSource)
- result = mMediaSource->handleUnicodeCharHere(uni_char);
+ result = mMediaSource->handleUnicodeCharHere(uni_char);
}
return result;
diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h
index 5ea03f1e6c..76ddc61ebf 100644
--- a/indra/newview/llmediactrl.h
+++ b/indra/newview/llmediactrl.h
@@ -86,6 +86,8 @@ public:
virtual BOOL handleHover( S32 x, S32 y, MASK mask );
virtual BOOL handleMouseUp( S32 x, S32 y, MASK mask );
virtual BOOL handleMouseDown( S32 x, S32 y, MASK mask );
+ virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
+ virtual BOOL handleRightMouseUp(S32 x, S32 y, MASK mask);
virtual BOOL handleDoubleClick( S32 x, S32 y, MASK mask );
virtual BOOL handleScrollWheel( S32 x, S32 y, S32 clicks );
diff --git a/indra/newview/llmimetypes.cpp b/indra/newview/llmimetypes.cpp
index 525e89cdff..235487cf46 100644
--- a/indra/newview/llmimetypes.cpp
+++ b/indra/newview/llmimetypes.cpp
@@ -34,6 +34,7 @@
#include "llviewerprecompiledheaders.h"
#include "llmimetypes.h"
+#include "llxmlnode.h"
#include "lluictrlfactory.h"
diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp
index 1bbcc3f98e..2b4e35208a 100644
--- a/indra/newview/llmoveview.cpp
+++ b/indra/newview/llmoveview.cpp
@@ -70,7 +70,7 @@ const std::string BOTTOM_TRAY_BUTTON_NAME = "movement_btn";
// protected
LLFloaterMove::LLFloaterMove(const LLSD& key)
-: LLDockableFloater(NULL, key),
+: LLTransientDockableFloater(NULL, true, key),
mForwardButton(NULL),
mBackwardButton(NULL),
mTurnLeftButton(NULL),
@@ -498,7 +498,13 @@ void LLFloaterMove::setDocked(bool docked, bool pop_on_undock/* = true*/)
{
LLDockableFloater::setDocked(docked, pop_on_undock);
bool show_mode_buttons = isDocked() || !gAgent.getFlying();
- updateHeight(show_mode_buttons);
+
+ if (!isMinimized())
+ {
+ updateHeight(show_mode_buttons);
+ }
+
+ LLTransientDockableFloater::setDocked(docked, pop_on_undock);
}
void LLFloaterMove::setModeButtonToggleState(const EMovementMode mode)
diff --git a/indra/newview/llmoveview.h b/indra/newview/llmoveview.h
index cbed36f10d..cee6078ee9 100644
--- a/indra/newview/llmoveview.h
+++ b/indra/newview/llmoveview.h
@@ -34,7 +34,7 @@
#define LL_LLMOVEVIEW_H
// Library includes
-#include "lldockablefloater.h"
+#include "lltransientdockablefloater.h"
class LLButton;
class LLJoystickAgentTurn;
@@ -44,7 +44,7 @@ class LLJoystickAgentSlide;
// Classes
//
class LLFloaterMove
-: public LLDockableFloater
+: public LLTransientDockableFloater
{
friend class LLFloaterReg;
diff --git a/indra/newview/llmutelist.h b/indra/newview/llmutelist.h
index dec8d7576e..409b637bf2 100644
--- a/indra/newview/llmutelist.h
+++ b/indra/newview/llmutelist.h
@@ -153,7 +153,13 @@ private:
{
bool operator()(const LLMute& a, const LLMute& b) const
{
- return a.mName < b.mName;
+ std::string name1 = a.mName;
+ std::string name2 = b.mName;
+
+ LLStringUtil::toUpper(name1);
+ LLStringUtil::toUpper(name2);
+
+ return name1 < name2;
}
};
struct compare_by_id
diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp
index b77415dfee..b91e23eace 100644
--- a/indra/newview/llnavigationbar.cpp
+++ b/indra/newview/llnavigationbar.cpp
@@ -613,6 +613,9 @@ void LLNavigationBar::showNavigationPanel(BOOL visible)
}
}
+ childSetVisible("bg_icon", fpVisible);
+ childSetVisible("bg_icon_no_fav", !fpVisible);
+
if(LLSideTray::instanceCreated())
{
LLSideTray::getInstance()->resetPanelRect();
@@ -677,6 +680,9 @@ void LLNavigationBar::showFavoritesPanel(BOOL visible)
setRect(nbRect);
}
+ childSetVisible("bg_icon", visible);
+ childSetVisible("bg_icon_no_fav", !visible);
+
fb->setVisible(visible);
if(LLSideTray::instanceCreated())
{
diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp
index 7160cce5cb..bbab9944f3 100644
--- a/indra/newview/llnearbychat.cpp
+++ b/indra/newview/llnearbychat.cpp
@@ -54,17 +54,17 @@
#include "llstylemap.h"
#include "lldraghandle.h"
-
+#include "lltrans.h"
+#include "llbottomtray.h"
+#include "llnearbychatbar.h"
static const S32 RESIZE_BAR_THICKNESS = 3;
-LLNearbyChat::LLNearbyChat(const LLSD& key) :
- LLFloater(key),
- mEChatTearofState(CHAT_PINNED),
- mChatCaptionPanel(NULL),
- mChatHistory(NULL)
+LLNearbyChat::LLNearbyChat(const LLSD& key)
+ : LLDockableFloater(NULL, key)
+ ,mChatHistory(NULL)
{
- m_isDirty = false;
+
}
LLNearbyChat::~LLNearbyChat()
@@ -73,25 +73,6 @@ LLNearbyChat::~LLNearbyChat()
BOOL LLNearbyChat::postBuild()
{
- //resize bars
- setCanResize(true);
-
- mResizeBar[LLResizeBar::BOTTOM]->setVisible(false);
- mResizeBar[LLResizeBar::LEFT]->setVisible(false);
- mResizeBar[LLResizeBar::RIGHT]->setVisible(false);
-
- mResizeBar[LLResizeBar::BOTTOM]->setResizeLimits(120,500);
- mResizeBar[LLResizeBar::TOP]->setResizeLimits(120,500);
- mResizeBar[LLResizeBar::LEFT]->setResizeLimits(220,600);
- mResizeBar[LLResizeBar::RIGHT]->setResizeLimits(220,600);
-
- mResizeHandle[0]->setVisible(false);
- mResizeHandle[1]->setVisible(false);
- mResizeHandle[2]->setVisible(false);
- mResizeHandle[3]->setVisible(false);
-
- getDragHandle()->setVisible(false);
-
//menu
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar;
@@ -101,18 +82,26 @@ BOOL LLNearbyChat::postBuild()
LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_nearby_chat.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
-
if(menu)
mPopupMenuHandle = menu->getHandle();
gSavedSettings.declareS32("nearbychat_showicons_and_names",2,"NearByChat header settings",true);
- mChatCaptionPanel = getChild<LLPanel>("chat_caption", false);
mChatHistory = getChild<LLChatHistory>("chat_history");
- reshape(getRect().getWidth(), getRect().getHeight(), FALSE);
-
- return LLFloater::postBuild();
+ setCanResize(true);
+
+ if(!LLDockableFloater::postBuild())
+ return false;
+
+ if (getDockControl() == NULL)
+ {
+ setDockControl(new LLDockControl(
+ LLBottomTray::getInstance()->getNearbyChatBar(), this,
+ getDockTongue(), LLDockControl::LEFT, boost::bind(&LLNearbyChat::getAllowedRect, this, _1)));
+ }
+
+ return true;
}
@@ -181,6 +170,22 @@ LLColor4 nearbychat_get_text_color(const LLChat& chat)
return text_color;
}
+std::string formatCurrentTime()
+{
+ time_t utc_time;
+ utc_time = time_corrected();
+ std::string timeStr ="["+ LLTrans::getString("TimeHour")+"]:["
+ +LLTrans::getString("TimeMin")+"] ";
+
+ LLSD substitution;
+
+ substitution["datetime"] = (S32) utc_time;
+ LLStringUtil::format (timeStr, substitution);
+
+ return timeStr;
+}
+
+
void LLNearbyChat::add_timestamped_line(const LLChat& chat, const LLColor4& color)
{
S32 font_size = gSavedSettings.getS32("ChatFontSize");
@@ -205,7 +210,7 @@ void LLNearbyChat::add_timestamped_line(const LLChat& chat, const LLColor4& colo
style_params.font(fontp);
LLUUID uuid = chat.mFromID;
std::string from = chat.mFromName;
- std::string time = "";
+ std::string time = formatCurrentTime();
std::string message = chat.mText;
mChatHistory->appendWidgetMessage(uuid, from, time, message, style_params);
}
@@ -239,193 +244,6 @@ void LLNearbyChat::onNearbySpeakers()
LLSideTray::getInstance()->showPanel("panel_people",param);
}
-void LLNearbyChat::onTearOff()
-{
- if(mEChatTearofState == CHAT_PINNED)
- float_panel();
- else
- pinn_panel();
-}
-
-void LLNearbyChat::reshape(S32 width, S32 height, BOOL called_from_parent)
-{
-
- LLFloater::reshape(width, height, called_from_parent);
-
- LLRect resize_rect;
- resize_rect.setLeftTopAndSize( 0, height, width, RESIZE_BAR_THICKNESS);
- if (mResizeBar[LLResizeBar::TOP])
- {
- mResizeBar[LLResizeBar::TOP]->reshape(width,RESIZE_BAR_THICKNESS);
- mResizeBar[LLResizeBar::TOP]->setRect(resize_rect);
- }
-
- resize_rect.setLeftTopAndSize( 0, RESIZE_BAR_THICKNESS, width, RESIZE_BAR_THICKNESS);
- if (mResizeBar[LLResizeBar::BOTTOM])
- {
- mResizeBar[LLResizeBar::BOTTOM]->reshape(width,RESIZE_BAR_THICKNESS);
- mResizeBar[LLResizeBar::BOTTOM]->setRect(resize_rect);
- }
-
- resize_rect.setLeftTopAndSize( 0, height, RESIZE_BAR_THICKNESS, height);
- if (mResizeBar[LLResizeBar::LEFT])
- {
- mResizeBar[LLResizeBar::LEFT]->reshape(RESIZE_BAR_THICKNESS,height);
- mResizeBar[LLResizeBar::LEFT]->setRect(resize_rect);
- }
-
- resize_rect.setLeftTopAndSize( width - RESIZE_BAR_THICKNESS, height, RESIZE_BAR_THICKNESS, height);
- if (mResizeBar[LLResizeBar::RIGHT])
- {
- mResizeBar[LLResizeBar::RIGHT]->reshape(RESIZE_BAR_THICKNESS,height);
- mResizeBar[LLResizeBar::RIGHT]->setRect(resize_rect);
- }
-
- // *NOTE: we must check mChatCaptionPanel and mChatHistory against NULL because reshape is called from the
- // LLView::initFromParams BEFORE postBuild is called and child controls are not exist yet
- LLRect caption_rect;
- if (NULL != mChatCaptionPanel)
- {
- caption_rect = mChatCaptionPanel->getRect();
- caption_rect.setLeftTopAndSize( 2, height - RESIZE_BAR_THICKNESS, width - 4, caption_rect.getHeight());
- mChatCaptionPanel->reshape( width - 4, caption_rect.getHeight(), 1);
- mChatCaptionPanel->setRect(caption_rect);
- }
-
- if (NULL != mChatHistory)
- {
- LLRect scroll_rect = mChatHistory->getRect();
- scroll_rect.setLeftTopAndSize( 2, height - caption_rect.getHeight() - RESIZE_BAR_THICKNESS, width - 4, height - caption_rect.getHeight() - RESIZE_BAR_THICKNESS*2);
- mChatHistory->reshape( width - 4, height - caption_rect.getHeight() - RESIZE_BAR_THICKNESS*2, 1);
- mChatHistory->setRect(scroll_rect);
- }
-
- //
- if(mEChatTearofState == CHAT_PINNED)
- {
- const LLRect& parent_rect = gViewerWindow->getRootView()->getRect();
-
- LLRect panel_rect;
- panel_rect.setLeftTopAndSize( parent_rect.mLeft+2, parent_rect.mBottom+height+4, width, height);
- setRect(panel_rect);
- }
- else
- {
- LLRect panel_rect;
- panel_rect.setLeftTopAndSize( getRect().mLeft, getRect().mTop, width, height);
- setRect(panel_rect);
- }
-
-}
-
-BOOL LLNearbyChat::handleMouseDown (S32 x, S32 y, MASK mask)
-{
- LLUICtrl* nearby_speakers_btn = mChatCaptionPanel->getChild<LLUICtrl>("nearby_speakers_btn");
- LLUICtrl* tearoff_btn = mChatCaptionPanel->getChild<LLUICtrl>("tearoff_btn");
- LLUICtrl* close_btn = mChatCaptionPanel->getChild<LLUICtrl>("close_btn");
-
- S32 caption_local_x = x - mChatCaptionPanel->getRect().mLeft;
- S32 caption_local_y = y - mChatCaptionPanel->getRect().mBottom;
-
- S32 local_x = caption_local_x - nearby_speakers_btn->getRect().mLeft;
- S32 local_y = caption_local_y - nearby_speakers_btn->getRect().mBottom;
- if(nearby_speakers_btn->pointInView(local_x, local_y))
- {
-
- onNearbySpeakers();
- bringToFront( x, y );
- return true;
- }
- local_x = caption_local_x - tearoff_btn->getRect().mLeft;
- local_y = caption_local_y- tearoff_btn->getRect().mBottom;
- if(tearoff_btn->pointInView(local_x, local_y))
- {
- onTearOff();
- bringToFront( x, y );
- return true;
- }
-
- local_x = caption_local_x - close_btn->getRect().mLeft;
- local_y = caption_local_y - close_btn->getRect().mBottom;
- if(close_btn->pointInView(local_x, local_y))
- {
- setVisible(false);
- bringToFront( x, y );
- return true;
- }
-
- if(mEChatTearofState == CHAT_UNPINNED && mChatCaptionPanel->pointInView(caption_local_x, caption_local_y) )
- {
- //start draggind
- gFocusMgr.setMouseCapture(this);
- mStart_Y = y;
- mStart_X = x;
- bringToFront( x, y );
- return true;
- }
-
- return LLFloater::handleMouseDown(x,y,mask);
-}
-
-BOOL LLNearbyChat::handleMouseUp(S32 x, S32 y, MASK mask)
-{
- if( hasMouseCapture() )
- {
- // Release the mouse
- gFocusMgr.setMouseCapture( NULL );
- mStart_X = 0;
- mStart_Y = 0;
- return true;
- }
-
- return LLFloater::handleMouseUp(x,y,mask);
-}
-
-BOOL LLNearbyChat::handleHover(S32 x, S32 y, MASK mask)
-{
- if( hasMouseCapture() )
- {
- translate(x-mStart_X,y-mStart_Y);
- return true;
- }
- return LLFloater::handleHover(x,y,mask);
-}
-
-void LLNearbyChat::pinn_panel()
-{
- mEChatTearofState = CHAT_PINNED;
- LLIconCtrl* tearoff_btn = mChatCaptionPanel->getChild<LLIconCtrl>("tearoff_btn",false);
-
- tearoff_btn->setValue("Inv_Landmark");
-
- const LLRect& parent_rect = gViewerWindow->getRootView()->getRect();
-
- LLRect panel_rect;
- panel_rect.setLeftTopAndSize( parent_rect.mLeft+2, parent_rect.mBottom+getRect().getHeight()+4, getRect().getWidth(), getRect().getHeight());
- setRect(panel_rect);
-
- mResizeBar[LLResizeBar::BOTTOM]->setVisible(false);
- mResizeBar[LLResizeBar::LEFT]->setVisible(false);
- mResizeBar[LLResizeBar::RIGHT]->setVisible(false);
-
- getDragHandle()->setVisible(false);
-
-}
-
-void LLNearbyChat::float_panel()
-{
- mEChatTearofState = CHAT_UNPINNED;
- LLIconCtrl* tearoff_btn = mChatCaptionPanel->getChild<LLIconCtrl>("tearoff_btn", false);
-
- tearoff_btn->setValue("Inv_Landmark");
- mResizeBar[LLResizeBar::BOTTOM]->setVisible(true);
- mResizeBar[LLResizeBar::LEFT]->setVisible(true);
- mResizeBar[LLResizeBar::RIGHT]->setVisible(true);
-
- getDragHandle()->setVisible(true);
-
- translate(4,4);
-}
void LLNearbyChat::onNearbyChatContextMenuItemClicked(const LLSD& userdata)
{
@@ -438,23 +256,6 @@ bool LLNearbyChat::onNearbyChatCheckContextMenuItem(const LLSD& userdata)
return false;
}
-BOOL LLNearbyChat::handleRightMouseDown(S32 x, S32 y, MASK mask)
-{
- if(mChatCaptionPanel->pointInView(x - mChatCaptionPanel->getRect().mLeft, y - mChatCaptionPanel->getRect().mBottom) )
- {
- LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandle.get();
-
- if(menu)
- {
- menu->buildDrawLabels();
- menu->updateParent(LLMenuGL::sMenuContainer);
- LLMenuGL::showPopup(this, menu, x, y);
- }
- return true;
- }
- return LLFloater::handleRightMouseDown(x, y, mask);
-}
-
void LLNearbyChat::onOpen(const LLSD& key )
{
LLNotificationsUI::LLScreenChannelBase* chat_channel = LLNotificationsUI::LLChannelManager::getInstance()->findChannelByID(LLUUID(gSavedSettings.getString("NearByChatChannelUUID")));
@@ -464,9 +265,27 @@ void LLNearbyChat::onOpen(const LLSD& key )
}
}
-void LLNearbyChat::draw ()
+void LLNearbyChat::setDocked (bool docked, bool pop_on_undock)
+{
+ LLDockableFloater::setDocked(docked, pop_on_undock);
+
+ setCanResize(!docked);
+}
+
+void LLNearbyChat::setRect (const LLRect &rect)
{
- LLFloater::draw();
+ LLDockableFloater::setRect(rect);
}
+void LLNearbyChat::getAllowedRect(LLRect& rect)
+{
+ rect = gViewerWindow->getWorldViewRect();
+}
+void LLNearbyChat::setVisible (BOOL visible)
+{
+ LLDockableFloater::setVisible(visible);
+}
+void LLNearbyChat::toggleWindow()
+{
+}
diff --git a/indra/newview/llnearbychat.h b/indra/newview/llnearbychat.h
index 47cae8ed0d..20cbf7537d 100644
--- a/indra/newview/llnearbychat.h
+++ b/indra/newview/llnearbychat.h
@@ -33,65 +33,44 @@
#ifndef LL_LLNEARBYCHAT_H_
#define LL_LLNEARBYCHAT_H_
-#include "llfloater.h"
+#include "lldockablefloater.h"
#include "llscrollbar.h"
#include "llchat.h"
class LLResizeBar;
class LLChatHistory;
-class LLNearbyChat: public LLFloater
+class LLNearbyChat: public LLDockableFloater
{
public:
- // enumerations used by the chat system
- typedef enum e_chat_tearof_state
- {
- CHAT_PINNED = 0,
- CHAT_UNPINNED = 1,
- } EChatTearofState;
-
- enum { RESIZE_BAR_COUNT=4 };
-
LLNearbyChat(const LLSD& key);
~LLNearbyChat();
BOOL postBuild ();
- void reshape (S32 width, S32 height, BOOL called_from_parent = TRUE);
-
- BOOL handleMouseDown (S32 x, S32 y, MASK mask);
- BOOL handleMouseUp (S32 x, S32 y, MASK mask);
- BOOL handleHover (S32 x, S32 y, MASK mask);
-
- BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
-
void addMessage (const LLChat& message);
- void onNearbySpeakers ();
- void onTearOff();
-
void onNearbyChatContextMenuItemClicked(const LLSD& userdata);
bool onNearbyChatCheckContextMenuItem(const LLSD& userdata);
+ void setDocked (bool docked, bool pop_on_undock);
+ void toggleWindow ();
+
/*virtual*/ void onOpen (const LLSD& key);
- /*virtual*/ void draw ();
+ virtual void setVisible (BOOL visible);
+
+ virtual void setRect (const LLRect &rect);
private:
+ void getAllowedRect (LLRect& rect);
+
+ void onNearbySpeakers ();
void add_timestamped_line(const LLChat& chat, const LLColor4& color);
- void pinn_panel();
- void float_panel();
private:
- EChatTearofState mEChatTearofState;
- S32 mStart_X;
- S32 mStart_Y;
-
LLHandle<LLView> mPopupMenuHandle;
- LLPanel* mChatCaptionPanel;
LLChatHistory* mChatHistory;
-
- bool m_isDirty;
};
#endif
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp
index 4f3bca50ff..5fa97926a5 100644
--- a/indra/newview/llnearbychatbar.cpp
+++ b/indra/newview/llnearbychatbar.cpp
@@ -203,7 +203,7 @@ BOOL LLNearbyChatBar::postBuild()
mOutputMonitor = getChild<LLOutputMonitorCtrl>("chat_zone_indicator");
mOutputMonitor->setVisible(FALSE);
- mTalkBtn = getChild<LLTalkButton>("talk");
+ mTalkBtn = getParent()->getChild<LLTalkButton>("talk");
// Speak button should be initially disabled because
// it takes some time between logging in to world and connecting to voice channel.
@@ -229,6 +229,16 @@ bool LLNearbyChatBar::instanceExists()
void LLNearbyChatBar::draw()
{
+ LLRect rect = getRect();
+ S32 max_width = getMaxWidth();
+
+ if (rect.getWidth() > max_width)
+ {
+ rect.setLeftTopAndSize(rect.mLeft, rect.mTop, max_width, rect.getHeight());
+ reshape(rect.getWidth(), rect.getHeight(), FALSE);
+ setRect(rect);
+ }
+
displaySpeakingIndicator();
LLPanel::draw();
}
@@ -254,6 +264,32 @@ BOOL LLNearbyChatBar::handleKeyHere( KEY key, MASK mask )
return handled;
}
+S32 LLNearbyChatBar::getMinWidth() const
+{
+ static S32 min_width = -1;
+
+ if (min_width < 0)
+ {
+ const std::string& s = getString("min_width");
+ min_width = !s.empty() ? atoi(s.c_str()) : 300;
+ }
+
+ return min_width;
+}
+
+S32 LLNearbyChatBar::getMaxWidth() const
+{
+ static S32 max_width = -1;
+
+ if (max_width < 0)
+ {
+ const std::string& s = getString("max_width");
+ max_width = !s.empty() ? atoi(s.c_str()) : 510;
+ }
+
+ return max_width;
+}
+
BOOL LLNearbyChatBar::matchChatTypeTrigger(const std::string& in_str, std::string* out_str)
{
U32 in_len = in_str.length();
diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h
index d6827315f2..b902ff86cc 100644
--- a/indra/newview/llnearbychatbar.h
+++ b/indra/newview/llnearbychatbar.h
@@ -97,6 +97,9 @@ public:
static void sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate);
static void sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate);
+ S32 getMinWidth() const;
+ S32 getMaxWidth() const;
+
/**
* Implements LLVoiceClientStatusObserver::onChange()
*/
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp
index 59b19b6dcb..4aefbd1a33 100644
--- a/indra/newview/llnearbychathandler.cpp
+++ b/indra/newview/llnearbychathandler.cpp
@@ -225,7 +225,7 @@ void LLNearbyChatScreenChannel::showToastsBottom()
LLRect toast_rect;
S32 bottom = getRect().mBottom;
- S32 margin = gSavedSettings.getS32("ToastMargin");
+ S32 margin = gSavedSettings.getS32("ToastGap");
for(std::vector<LLToast*>::iterator it = m_active_toasts.begin(); it != m_active_toasts.end(); ++it)
{
diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp
index c08f92b983..7239f49b7f 100644
--- a/indra/newview/llnotificationtiphandler.cpp
+++ b/indra/newview/llnotificationtiphandler.cpp
@@ -91,6 +91,7 @@ bool LLTipHandler::processNotification(const LLSD& notify)
LLToast::Params p;
p.notif_id = notification->getID();
p.notification = notification;
+ p.lifetime_secs = gSavedSettings.getS32("NotificationTipToastLifeTime");
p.panel = notify_box;
p.is_tip = true;
p.can_be_stored = false;
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp
index 7670a5120c..6413d939f0 100644
--- a/indra/newview/llpanelavatar.cpp
+++ b/indra/newview/llpanelavatar.cpp
@@ -336,10 +336,10 @@ BOOL LLPanelAvatarProfile::postBuild()
childSetCommitCallback("share",(boost::bind(&LLPanelAvatarProfile::onShareButtonClick,this)),NULL);
LLTextureCtrl* pic = getChild<LLTextureCtrl>("2nd_life_pic");
- pic->setFallbackImageName("default_land_picture.j2c");
+ pic->setFallbackImageName("default_profile_picture.j2c");
pic = getChild<LLTextureCtrl>("real_world_pic");
- pic->setFallbackImageName("default_land_picture.j2c");
+ pic->setFallbackImageName("default_profile_picture.j2c");
resetControls();
resetData();
@@ -351,6 +351,8 @@ void LLPanelAvatarProfile::onOpen(const LLSD& key)
{
LLPanelProfileTab::onOpen(key);
+ mGroups.erase();
+
//Disable "Add Friend" button for friends.
childSetEnabled("add_friend", !LLAvatarActions::isFriend(getAvatarId()));
}
@@ -381,6 +383,7 @@ void LLPanelAvatarProfile::resetControls()
void LLPanelAvatarProfile::resetData()
{
+ mGroups.erase();
childSetValue("2nd_life_pic",LLUUID::null);
childSetValue("real_world_pic",LLUUID::null);
childSetValue("online_status",LLStringUtil::null);
@@ -428,11 +431,15 @@ void LLPanelAvatarProfile::processProfileProperties(const LLAvatarData* avatar_d
void LLPanelAvatarProfile::processGroupProperties(const LLAvatarGroups* avatar_groups)
{
- std::string groups;
+ // *NOTE dzaporozhan
+ // Group properties may arrive in two callbacks, we need to save them across
+ // different calls. We can't do that in textbox as textbox may change the text.
+
+ std::string groups = mGroups;
LLAvatarGroups::group_list_t::const_iterator it = avatar_groups->group_list.begin();
const LLAvatarGroups::group_list_t::const_iterator it_end = avatar_groups->group_list.end();
- if(it_end != it)
+ if(groups.empty() && it_end != it)
{
groups = (*it).group_name;
++it;
@@ -443,7 +450,8 @@ void LLPanelAvatarProfile::processGroupProperties(const LLAvatarGroups* avatar_g
groups += ", ";
groups += group_data.group_name;
}
- childSetValue("sl_groups",groups);
+ mGroups = groups;
+ childSetValue("sl_groups",mGroups);
}
void LLPanelAvatarProfile::fillCommonData(const LLAvatarData* avatar_data)
diff --git a/indra/newview/llpanelavatar.h b/indra/newview/llpanelavatar.h
index a03902caba..ae0b8e9844 100644
--- a/indra/newview/llpanelavatar.h
+++ b/indra/newview/llpanelavatar.h
@@ -173,6 +173,10 @@ protected:
void onCallButtonClick();
void onTeleportButtonClick();
void onShareButtonClick();
+
+private:
+
+ std::string mGroups;
};
/**
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index c2c32527fb..e7acc68b93 100644
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -369,7 +369,7 @@ void LLPanelEditWearable::saveChanges()
return;
}
- U32 index = gAgentWearables.getWearableIndex(mWearablePtr->getType(), mWearablePtr);
+ U32 index = gAgentWearables.getWearableIndex(mWearablePtr);
if (mWearablePtr->getName().compare(mTextEditor->getText()) != 0)
{
@@ -601,15 +601,14 @@ LLPanel* LLPanelEditWearable::getPanel(EWearableType type)
void LLPanelEditWearable::getSortedParams(value_map_t &sorted_params, const std::string &edit_group)
{
- LLWearable::visualParamCluster_t param_list;
+ LLWearable::visual_param_vec_t param_list;
ESex avatar_sex = gAgent.getAvatarObject()->getSex();
mWearablePtr->getVisualParams(param_list);
- LLWearable::visualParamCluster_t::iterator iter = param_list.begin();
- LLWearable::visualParamCluster_t::iterator end = param_list.end();
-
- for (; iter != end; ++iter)
+ for (LLWearable::visual_param_vec_t::iterator iter = param_list.begin();
+ iter != param_list.end();
+ ++iter)
{
LLViewerVisualParam *param = (LLViewerVisualParam*) *iter;
diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp
index a7590ac1dd..6eed956eb8 100644
--- a/indra/newview/llpanelimcontrolpanel.cpp
+++ b/indra/newview/llpanelimcontrolpanel.cpp
@@ -38,6 +38,9 @@
#include "llavatariconctrl.h"
#include "llbutton.h"
#include "llgroupactions.h"
+#include "llavatarlist.h"
+#include "llparticipantlist.h"
+#include "llimview.h"
LLPanelIMControlPanel::LLPanelIMControlPanel()
{
@@ -89,15 +92,35 @@ void LLPanelIMControlPanel::setID(const LLUUID& avatar_id)
}
+LLPanelGroupControlPanel::LLPanelGroupControlPanel(const LLUUID& session_id)
+{
+ mSpeakerManager = LLIMModel::getInstance()->getSpeakerManager(session_id);
+}
BOOL LLPanelGroupControlPanel::postBuild()
{
childSetAction("group_info_btn", boost::bind(&LLPanelGroupControlPanel::onGroupInfoButtonClicked, this));
childSetAction("call_btn", boost::bind(&LLPanelGroupControlPanel::onCallButtonClicked, this));
+ mAvatarList = getChild<LLAvatarList>("speakers_list");
+ mParticipantList = new LLParticipantList(mSpeakerManager, mAvatarList);
+
return TRUE;
}
+LLPanelGroupControlPanel::~LLPanelGroupControlPanel()
+{
+ delete mParticipantList;
+ mParticipantList = NULL;
+}
+
+// virtual
+void LLPanelGroupControlPanel::draw()
+{
+ mSpeakerManager->update(true);
+ LLPanelChatControlPanel::draw();
+}
+
void LLPanelGroupControlPanel::onGroupInfoButtonClicked()
{
LLGroupActions::show(mGroupID);
diff --git a/indra/newview/llpanelimcontrolpanel.h b/indra/newview/llpanelimcontrolpanel.h
index e82942a31d..138b1630c4 100644
--- a/indra/newview/llpanelimcontrolpanel.h
+++ b/indra/newview/llpanelimcontrolpanel.h
@@ -35,6 +35,9 @@
#include "llpanel.h"
+class LLSpeakerMgr;
+class LLAvatarList;
+class LLParticipantList;
class LLPanelChatControlPanel : public LLPanel
{
@@ -68,18 +71,22 @@ private:
class LLPanelGroupControlPanel : public LLPanelChatControlPanel
{
public:
- LLPanelGroupControlPanel() {};
- ~LLPanelGroupControlPanel() {};
+ LLPanelGroupControlPanel(const LLUUID& session_id);
+ ~LLPanelGroupControlPanel();
BOOL postBuild();
void setID(const LLUUID& id);
+ /*virtual*/ void draw();
private:
void onGroupInfoButtonClicked();
void onCallButtonClicked();
LLUUID mGroupID;
+ LLSpeakerMgr* mSpeakerManager;
+ LLAvatarList* mAvatarList;
+ LLParticipantList* mParticipantList;
};
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index 521e145816..83fb147a49 100644
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -40,7 +40,9 @@
#include "llaccordionctrltab.h"
#include "llagent.h"
+#include "llagentpicksinfo.h"
#include "llagentui.h"
+#include "lldndbutton.h"
#include "llfloaterworldmap.h"
#include "llfolderviewitem.h"
#include "llinventorysubtreepanel.h"
@@ -58,7 +60,6 @@ static const std::string ADD_LANDMARK_BUTTON_NAME = "add_landmark_btn";
static const std::string ADD_FOLDER_BUTTON_NAME = "add_folder_btn";
static const std::string TRASH_BUTTON_NAME = "trash_btn";
-static const LLPlacesInventoryBridgeBuilder PLACES_INVENTORY_BUILDER;
// helper functions
static void filter_list(LLInventorySubTreePanel* inventory_list, const std::string& string);
@@ -214,6 +215,17 @@ bool LLLandmarksPanel::isLandmarkSelected() const
return false;
}
+bool LLLandmarksPanel::isReceivedFolderSelected() const
+{
+ // Received Folder can be only in Landmarks accordion
+ if (mCurrentSelectedList != mLandmarksInventoryPanel) return false;
+
+ // *TODO: it should be filled with logic when EXT-976 is done.
+
+ llwarns << "Not implemented yet until EXT-976 is done." << llendl;
+
+ return false;
+}
LLLandmark* LLLandmarksPanel::getCurSelectedLandmark() const
{
@@ -317,9 +329,7 @@ void LLLandmarksPanel::initFavoritesInventroyPanel()
{
mFavoritesInventoryPanel = getChild<LLInventorySubTreePanel>("favorites_list");
- LLUUID start_folder_id = mFavoritesInventoryPanel->getModel()->findCategoryUUIDForType(LLAssetType::AT_FAVORITE);
-
- initLandmarksPanel(mFavoritesInventoryPanel, start_folder_id);
+ initLandmarksPanel(mFavoritesInventoryPanel);
initAccordion("tab_favorites", mFavoritesInventoryPanel);
}
@@ -328,9 +338,8 @@ void LLLandmarksPanel::initLandmarksInventroyPanel()
{
mLandmarksInventoryPanel = getChild<LLInventorySubTreePanel>("landmarks_list");
- LLUUID start_folder_id = mLandmarksInventoryPanel->getModel()->findCategoryUUIDForType(LLAssetType::AT_LANDMARK);
+ initLandmarksPanel(mLandmarksInventoryPanel);
- initLandmarksPanel(mLandmarksInventoryPanel, start_folder_id);
mLandmarksInventoryPanel->setShowFolderState(LLInventoryFilter::SHOW_ALL_FOLDERS);
// subscribe to have auto-rename functionality while creating New Folder
@@ -343,9 +352,7 @@ void LLLandmarksPanel::initMyInventroyPanel()
{
mMyInventoryPanel= getChild<LLInventorySubTreePanel>("my_inventory_list");
- LLUUID start_folder_id = mMyInventoryPanel->getModel()->getRootFolderID();
-
- initLandmarksPanel(mMyInventoryPanel, start_folder_id);
+ initLandmarksPanel(mMyInventoryPanel);
initAccordion("tab_inventory", mMyInventoryPanel);
}
@@ -354,18 +361,13 @@ void LLLandmarksPanel::initLibraryInventroyPanel()
{
mLibraryInventoryPanel = getChild<LLInventorySubTreePanel>("library_list");
- LLUUID start_folder_id = mLibraryInventoryPanel->getModel()->getLibraryRootFolderID();
-
- initLandmarksPanel(mLibraryInventoryPanel, start_folder_id);
+ initLandmarksPanel(mLibraryInventoryPanel);
initAccordion("tab_library", mLibraryInventoryPanel);
}
-
-void LLLandmarksPanel::initLandmarksPanel(LLInventorySubTreePanel* inventory_list, const LLUUID& start_folder_id)
+void LLLandmarksPanel::initLandmarksPanel(LLInventorySubTreePanel* inventory_list)
{
- inventory_list->buildSubtreeViewsFor(start_folder_id, &PLACES_INVENTORY_BUILDER);
-
inventory_list->setFilterTypes(0x1 << LLInventoryType::IT_LANDMARK);
inventory_list->setSelectCallback(boost::bind(&LLLandmarksPanel::onSelectionChange, this, inventory_list, _1, _2));
@@ -378,6 +380,10 @@ void LLLandmarksPanel::initLandmarksPanel(LLInventorySubTreePanel* inventory_lis
root_folder->setupMenuHandle(LLInventoryType::IT_CATEGORY, mGearFolderMenu->getHandle());
root_folder->setupMenuHandle(LLInventoryType::IT_LANDMARK, mGearLandmarkMenu->getHandle());
}
+
+ // save initial folder state to avoid incorrect work while switching between Landmarks & Teleport History tabs
+ // See EXT-1609.
+ inventory_list->saveFolderState();
}
void LLLandmarksPanel::initAccordion(const std::string& accordion_tab_name, LLInventorySubTreePanel* inventory_list)
@@ -432,10 +438,18 @@ void LLLandmarksPanel::initListCommandsHandlers()
mListCommands->childSetAction(TRASH_BUTTON_NAME, boost::bind(&LLLandmarksPanel::onTrashButtonClick, this));
+ LLDragAndDropButton* trash_btn = mListCommands->getChild<LLDragAndDropButton>(TRASH_BUTTON_NAME);
+ trash_btn->setDragAndDropHandler(boost::bind(&LLLandmarksPanel::handleDragAndDropToTrash, this
+ , _4 // BOOL drop
+ , _5 // EDragAndDropType cargo_type
+ , _7 // EAcceptance* accept
+ ));
+
mCommitCallbackRegistrar.add("Places.LandmarksGear.Add.Action", boost::bind(&LLLandmarksPanel::onAddAction, this, _2));
- mCommitCallbackRegistrar.add("Places.LandmarksGear.CopyPaste.Action", boost::bind(&LLLandmarksPanel::onCopyPasteAction, this, _2));
+ mCommitCallbackRegistrar.add("Places.LandmarksGear.CopyPaste.Action", boost::bind(&LLLandmarksPanel::onClipboardAction, this, _2));
mCommitCallbackRegistrar.add("Places.LandmarksGear.Custom.Action", boost::bind(&LLLandmarksPanel::onCustomAction, this, _2));
mCommitCallbackRegistrar.add("Places.LandmarksGear.Folding.Action", boost::bind(&LLLandmarksPanel::onFoldingAction, this, _2));
+ mEnableCallbackRegistrar.add("Places.LandmarksGear.Check", boost::bind(&LLLandmarksPanel::isActionChecked, this, _2));
mEnableCallbackRegistrar.add("Places.LandmarksGear.Enable", boost::bind(&LLLandmarksPanel::isActionEnabled, this, _2));
mGearLandmarkMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_places_gear_landmark.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
mGearFolderMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_places_gear_folder.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
@@ -444,20 +458,8 @@ void LLLandmarksPanel::initListCommandsHandlers()
void LLLandmarksPanel::updateListCommands()
{
- // TODO: should be false when "Received" folder is selected
- bool add_folder_enabled = mCurrentSelectedList == mLandmarksInventoryPanel;
- bool trash_enabled = false; // TODO: should be false when "Received" folder is selected
-
- LLFolderViewItem* current_item = getCurSelectedItem();
-
- if (current_item)
- {
- LLFolderViewEventListener* listenerp = current_item->getListener();
- if (listenerp->getInventoryType() == LLInventoryType::IT_LANDMARK)
- {
- trash_enabled = mCurrentSelectedList != mLibraryInventoryPanel;
- }
- }
+ bool add_folder_enabled = isActionEnabled("category");
+ bool trash_enabled = isActionEnabled("delete");
// keep Options & Add Landmark buttons always enabled
mListCommands->childSetEnabled(ADD_FOLDER_BUTTON_NAME, add_folder_enabled);
@@ -515,31 +517,29 @@ void LLLandmarksPanel::onAddFolderButtonClick() const
LLFolderViewItem* item = getCurSelectedItem();
if(item && mCurrentSelectedList == mLandmarksInventoryPanel)
{
- LLFolderBridge *parentBridge = NULL;
+ LLFolderViewEventListener* folder_bridge = NULL;
if(item-> getListener()->getInventoryType() == LLInventoryType::IT_LANDMARK)
{
- parentBridge = dynamic_cast<LLFolderBridge*>(item->getParentFolder()->getListener());
- /*WORKAROUND:*
- LLFolderView::doIdle() is calling in each frame,
- it changes selected items before LLFolderView::startRenamingSelectedItem.
- To avoid it we have to change keyboardFocus.
- */
- gFocusMgr.setKeyboardFocus(item->getParentFolder());
+ // for a landmark get parent folder bridge
+ folder_bridge = item->getParentFolder()->getListener();
}
else if (item-> getListener()->getInventoryType() == LLInventoryType::IT_CATEGORY)
{
- parentBridge = dynamic_cast<LLFolderBridge*>(item->getListener());
- gFocusMgr.setKeyboardFocus(item);
+ // for a folder get its own bridge
+ folder_bridge = item->getListener();
}
- menu_create_inventory_item(mCurrentSelectedList->getRootFolder(),parentBridge, LLSD("category"));
+
+ menu_create_inventory_item(mCurrentSelectedList->getRootFolder()
+ , dynamic_cast<LLFolderBridge*>(folder_bridge)
+ , LLSD("category")
+ , gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK)
+ );
}
}
void LLLandmarksPanel::onTrashButtonClick() const
{
- if(!mCurrentSelectedList) return;
-
- mCurrentSelectedList->getRootFolder()->doToSelected(mCurrentSelectedList->getModel(), "delete");
+ onClipboardAction("delete");
}
void LLLandmarksPanel::onAddAction(const LLSD& userdata) const
@@ -555,7 +555,7 @@ void LLLandmarksPanel::onAddAction(const LLSD& userdata) const
}
}
-void LLLandmarksPanel::onCopyPasteAction(const LLSD& userdata) const
+void LLLandmarksPanel::onClipboardAction(const LLSD& userdata) const
{
if(!mCurrentSelectedList)
return;
@@ -599,7 +599,6 @@ void LLLandmarksPanel::onFoldingAction(const LLSD& userdata)
else if ( "sort_by_date" == command_name)
{
mSortByDate = !mSortByDate;
- updateSortOrder(mFavoritesInventoryPanel, mSortByDate);
updateSortOrder(mLandmarksInventoryPanel, mSortByDate);
updateSortOrder(mMyInventoryPanel, mSortByDate);
updateSortOrder(mLibraryInventoryPanel, mSortByDate);
@@ -610,31 +609,79 @@ void LLLandmarksPanel::onFoldingAction(const LLSD& userdata)
}
}
+bool LLLandmarksPanel::isActionChecked(const LLSD& userdata) const
+{
+ const std::string command_name = userdata.asString();
+
+ if ( "sort_by_date" == command_name)
+ {
+ return mSortByDate;
+ }
+
+ return false;
+}
+
bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const
{
std::string command_name = userdata.asString();
+
+
+ LLPlacesFolderView* rootFolderView = mCurrentSelectedList ?
+ static_cast<LLPlacesFolderView*>(mCurrentSelectedList->getRootFolder()) : NULL;
+
+ if (NULL == rootFolderView) return false;
+
+ // disable some commands for multi-selection. EXT-1757
+ if (rootFolderView->getSelectedCount() > 1)
+ {
+ if ( "teleport" == command_name
+ || "more_info" == command_name
+ || "rename" == command_name
+ || "show_on_map" == command_name
+ || "copy_slurl" == command_name
+ )
+ {
+ return false;
+ }
+
+ }
+
+ // disable some commands for Favorites accordion. EXT-1758
+ if (mCurrentSelectedList == mFavoritesInventoryPanel)
+ {
+ if ( "expand_all" == command_name
+ || "collapse_all" == command_name
+ || "sort_by_date" == command_name
+ )
+ return false;
+ }
+
+
if("category" == command_name)
{
- return mCurrentSelectedList == mLandmarksInventoryPanel;
+ // we can add folder only in Landmarks Accordion
+ if (mCurrentSelectedList == mLandmarksInventoryPanel)
+ {
+ // ... but except Received folder
+ return !isReceivedFolderSelected();
+ }
+ else return false;
}
- else if("paste" == command_name)
+ else if("paste" == command_name || "rename" == command_name || "cut" == command_name || "delete" == command_name)
{
- return mCurrentSelectedList ? mCurrentSelectedList->getRootFolder()->canPaste() : false;
+ return canSelectedBeModified(command_name);
}
else if ( "sort_by_date" == command_name)
{
return mSortByDate;
}
- // do not allow teleport and more info for multi-selections
- else if ("teleport" == command_name || "more_info" == command_name)
+ else if("create_pick" == command_name)
{
- return mCurrentSelectedList ?
- static_cast<LLPlacesFolderView*>(mCurrentSelectedList->getRootFolder())->getSelectedCount() == 1 : false;
+ return !LLAgentPicksInfo::getInstance()->isPickLimitReached();
}
- // we can add folder, or change item/folder only in Landmarks Accordion
- else if ("add_folder" == command_name || "rename" == command_name || "delete" == command_name)
+ else
{
- return mLandmarksInventoryPanel == mCurrentSelectedList;
+ llwarns << "Unprocessed command has come: " << command_name << llendl;
}
return true;
@@ -699,6 +746,75 @@ void LLLandmarksPanel::onCustomAction(const LLSD& userdata)
}
}
+/*
+Processes such actions: cut/rename/delete/paste actions
+
+Rules:
+ 1. We can't perform any action in Library
+ 2. For Landmarks we can:
+ - cut/rename/delete in any other accordions
+ - paste - only in Favorites, Landmarks accordions
+ 3. For Folders we can: perform any action in Landmarks accordion, except Received folder
+ 4. We can not paste folders from Clipboard (processed by LLFolderView::canPaste())
+ 5. Check LLFolderView/Inventory Bridges rules
+ */
+bool LLLandmarksPanel::canSelectedBeModified(const std::string& command_name) const
+{
+ // validate own rules first
+
+ // nothing can be modified in Library
+ if (mLibraryInventoryPanel == mCurrentSelectedList) return false;
+
+ bool can_be_modified = false;
+
+ // landmarks can be modified in any other accordion...
+ if (isLandmarkSelected())
+ {
+ can_be_modified = true;
+
+ // we can modify landmarks anywhere except paste to My Inventory
+ if ("paste" == command_name)
+ {
+ can_be_modified = (mCurrentSelectedList != mMyInventoryPanel);
+ }
+ }
+ else
+ {
+ // ...folders only in the Landmarks accordion...
+ can_be_modified = mLandmarksInventoryPanel == mCurrentSelectedList;
+
+ // ...except "Received" folder
+ can_be_modified &= !isReceivedFolderSelected();
+ }
+
+ // then ask LLFolderView permissions
+ if (can_be_modified)
+ {
+ if ("cut" == command_name)
+ {
+ can_be_modified = mCurrentSelectedList->getRootFolder()->canCut();
+ }
+ else if ("rename" == command_name)
+ {
+ can_be_modified = getCurSelectedItem()->getListener()->isItemRenameable();
+ }
+ else if ("delete" == command_name)
+ {
+ can_be_modified = getCurSelectedItem()->getListener()->isItemRemovable();
+ }
+ else if("paste" == command_name)
+ {
+ return mCurrentSelectedList->getRootFolder()->canPaste();
+ }
+ else
+ {
+ llwarns << "Unprocessed command has come: " << command_name << llendl;
+ }
+ }
+
+ return can_be_modified;
+}
+
void LLLandmarksPanel::onPickPanelExit( LLPanelPickEdit* pick_panel, LLView* owner, const LLSD& params)
{
pick_panel->setVisible(FALSE);
@@ -710,6 +826,33 @@ void LLLandmarksPanel::onPickPanelExit( LLPanelPickEdit* pick_panel, LLView* own
pick_panel = NULL;
}
+bool LLLandmarksPanel::handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, EAcceptance* accept)
+{
+ *accept = ACCEPT_NO;
+
+ switch (cargo_type)
+ {
+
+ case DAD_LANDMARK:
+ case DAD_CATEGORY:
+ {
+ bool is_enabled = isActionEnabled("delete");
+
+ if (is_enabled) *accept = ACCEPT_YES_MULTI;
+
+ if (is_enabled && drop)
+ {
+ onClipboardAction("delete");
+ }
+ }
+ break;
+ default:
+ break;
+ }
+
+ return true;
+}
+
//////////////////////////////////////////////////////////////////////////
// HELPER FUNCTIONS
diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h
index 389a04a76f..47c9f7647c 100644
--- a/indra/newview/llpanellandmarks.h
+++ b/indra/newview/llpanellandmarks.h
@@ -66,6 +66,7 @@ protected:
* @return true - if current selected panel is not null and selected item is a landmark
*/
bool isLandmarkSelected() const;
+ bool isReceivedFolderSelected() const;
LLLandmark* getCurSelectedLandmark() const;
LLFolderViewItem* getCurSelectedItem () const;
void updateSortOrder(LLInventoryPanel* panel, bool byDate);
@@ -80,7 +81,7 @@ private:
void initLandmarksInventroyPanel();
void initMyInventroyPanel();
void initLibraryInventroyPanel();
- void initLandmarksPanel(LLInventorySubTreePanel* inventory_list, const LLUUID& start_folder_id);
+ void initLandmarksPanel(LLInventorySubTreePanel* inventory_list);
void initAccordion(const std::string& accordion_tab_name, LLInventorySubTreePanel* inventory_list);
void onAccordionExpandedCollapsed(const LLSD& param, LLInventorySubTreePanel* inventory_list);
void deselectOtherThan(const LLInventorySubTreePanel* inventory_list);
@@ -93,12 +94,26 @@ private:
void onAddFolderButtonClick() const;
void onTrashButtonClick() const;
void onAddAction(const LLSD& command_name) const;
- void onCopyPasteAction(const LLSD& command_name) const;
+ void onClipboardAction(const LLSD& command_name) const;
void onFoldingAction(const LLSD& command_name);
+ bool isActionChecked(const LLSD& userdata) const;
bool isActionEnabled(const LLSD& command_name) const;
void onCustomAction(const LLSD& command_name);
+
+ /**
+ * Determines if selected item can be modified via context/gear menu.
+ *
+ * It validates Places Landmarks rules first. And then LLFolderView permissions.
+ * For now it checks cut/rename/delete/paste actions.
+ */
+ bool canSelectedBeModified(const std::string& command_name) const;
void onPickPanelExit( LLPanelPickEdit* pick_panel, LLView* owner, const LLSD& params);
+ /**
+ * Processes drag-n-drop of the Landmarks and folders into trash button.
+ */
+ bool handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, EAcceptance* accept);
+
private:
LLInventorySubTreePanel* mFavoritesInventoryPanel;
LLInventorySubTreePanel* mLandmarksInventoryPanel;
diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp
index ab5d8601d0..6a3617f008 100644
--- a/indra/newview/llpanelmediasettingsgeneral.cpp
+++ b/indra/newview/llpanelmediasettingsgeneral.cpp
@@ -68,15 +68,11 @@ LLPanelMediaSettingsGeneral::LLPanelMediaSettingsGeneral() :
mHeightPixels( NULL ),
mHomeURL( NULL ),
mCurrentURL( NULL ),
- mAltImageEnable( NULL ),
mParent( NULL ),
mMediaEditable(false)
{
// build dialog from XML
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_media_settings_general.xml");
-// mCommitCallbackRegistrar.add("Media.ResetCurrentUrl", boost::bind(&LLPanelMediaSettingsGeneral::onBtnResetCurrentUrl, this));
-// mCommitCallbackRegistrar.add("Media.CommitHomeURL", boost::bind(&LLPanelMediaSettingsGeneral::onCommitHomeURL, this));
-
}
////////////////////////////////////////////////////////////////////////////////
@@ -84,7 +80,6 @@ LLPanelMediaSettingsGeneral::LLPanelMediaSettingsGeneral() :
BOOL LLPanelMediaSettingsGeneral::postBuild()
{
// connect member vars with UI widgets
- mAltImageEnable = getChild< LLCheckBoxCtrl >( LLMediaEntry::ALT_IMAGE_ENABLE_KEY );
mAutoLoop = getChild< LLCheckBoxCtrl >( LLMediaEntry::AUTO_LOOP_KEY );
mAutoPlay = getChild< LLCheckBoxCtrl >( LLMediaEntry::AUTO_PLAY_KEY );
mAutoScale = getChild< LLCheckBoxCtrl >( LLMediaEntry::AUTO_SCALE_KEY );
@@ -192,7 +187,6 @@ void LLPanelMediaSettingsGeneral::draw()
void LLPanelMediaSettingsGeneral::clearValues( void* userdata, bool editable)
{
LLPanelMediaSettingsGeneral *self =(LLPanelMediaSettingsGeneral *)userdata;
- self->mAltImageEnable ->clear();
self->mAutoLoop->clear();
self->mAutoPlay->clear();
self->mAutoScale->clear();
@@ -203,7 +197,6 @@ void LLPanelMediaSettingsGeneral::clearValues( void* userdata, bool editable)
self->mHeightPixels->clear();
self->mHomeURL->clear();
self->mWidthPixels->clear();
- self->mAltImageEnable ->setEnabled(editable);
self->mAutoLoop ->setEnabled(editable);
self->mAutoPlay ->setEnabled(editable);
self->mAutoScale ->setEnabled(editable);
@@ -214,7 +207,7 @@ void LLPanelMediaSettingsGeneral::clearValues( void* userdata, bool editable)
self->mHeightPixels ->setEnabled(editable);
self->mHomeURL ->setEnabled(editable);
self->mWidthPixels ->setEnabled(editable);
- self->mPreviewMedia->unloadMediaSource();
+ self->updateMediaPreview();
}
////////////////////////////////////////////////////////////////////////////////
@@ -272,7 +265,6 @@ void LLPanelMediaSettingsGeneral::initValues( void* userdata, const LLSD& media_
{ LLMediaEntry::HOME_URL_KEY, self->mHomeURL, "LLLineEditor" },
{ LLMediaEntry::FIRST_CLICK_INTERACT_KEY, self->mFirstClick, "LLCheckBoxCtrl" },
{ LLMediaEntry::WIDTH_PIXELS_KEY, self->mWidthPixels, "LLSpinCtrl" },
- { LLMediaEntry::ALT_IMAGE_ENABLE_KEY, self->mAltImageEnable, "LLCheckBoxCtrl" },
{ "", NULL , "" }
};
@@ -320,10 +312,10 @@ void LLPanelMediaSettingsGeneral::updateMediaPreview()
mPreviewMedia->navigateTo( mHomeURL->getValue().asString() );
}
else
- // new home URL will be empty if media is deleted but
- // we still need to clean out the preview.
+ // new home URL will be empty if media is deleted so display a
+ // "preview goes here" data url page
{
- mPreviewMedia->unloadMediaSource();
+ mPreviewMedia->navigateTo( "data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22100%%22 height=%22100%%22 %3E%3Cdefs%3E%3Cpattern id=%22checker%22 patternUnits=%22userSpaceOnUse%22 x=%220%22 y=%220%22 width=%22128%22 height=%22128%22 viewBox=%220 0 128 128%22 %3E%3Crect x=%220%22 y=%220%22 width=%2264%22 height=%2264%22 fill=%22#ddddff%22 /%3E%3Crect x=%2264%22 y=%2264%22 width=%2264%22 height=%2264%22 fill=%22#ddddff%22 /%3E%3C/pattern%3E%3C/defs%3E%3Crect x=%220%22 y=%220%22 width=%22100%%22 height=%22100%%22 fill=%22url(#checker)%22 /%3E%3C/svg%3E" );
};
}
@@ -393,7 +385,6 @@ void LLPanelMediaSettingsGeneral::apply( void* userdata )
//
void LLPanelMediaSettingsGeneral::getValues( LLSD &fill_me_in )
{
- fill_me_in[LLMediaEntry::ALT_IMAGE_ENABLE_KEY] = mAltImageEnable->getValue();
fill_me_in[LLMediaEntry::AUTO_LOOP_KEY] = mAutoLoop->getValue();
fill_me_in[LLMediaEntry::AUTO_PLAY_KEY] = mAutoPlay->getValue();
fill_me_in[LLMediaEntry::AUTO_SCALE_KEY] = mAutoScale->getValue();
diff --git a/indra/newview/llpanelmediasettingsgeneral.h b/indra/newview/llpanelmediasettingsgeneral.h
index 5eb42ffaf4..e82a31382e 100644
--- a/indra/newview/llpanelmediasettingsgeneral.h
+++ b/indra/newview/llpanelmediasettingsgeneral.h
@@ -85,7 +85,6 @@ private:
LLSpinCtrl* mHeightPixels;
LLLineEditor* mHomeURL;
LLLineEditor* mCurrentURL;
- LLCheckBoxCtrl* mAltImageEnable;
LLMediaCtrl* mPreviewMedia;
};
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index 9dc80c0515..61d66873ea 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -690,6 +690,27 @@ LLUUID LLPanelPeople::getCurrentItemID() const
return LLUUID::null;
}
+void LLPanelPeople::getCurrentItemIDs(std::vector<LLUUID>& selected_uuids) const
+{
+ std::string cur_tab = getActiveTabName();
+
+ if (cur_tab == FRIENDS_TAB_NAME)
+ {
+ // friends tab has two lists
+ mOnlineFriendList->getSelectedUUIDs(selected_uuids);
+ mAllFriendList->getSelectedUUIDs(selected_uuids);
+ }
+ else if (cur_tab == NEARBY_TAB_NAME)
+ mNearbyList->getSelectedUUIDs(selected_uuids);
+ else if (cur_tab == RECENT_TAB_NAME)
+ mRecentList->getSelectedUUIDs(selected_uuids);
+ else if (cur_tab == GROUP_TAB_NAME)
+ mGroupList->getSelectedUUIDs(selected_uuids);
+ else
+ llassert(0 && "unknown tab selected");
+
+}
+
void LLPanelPeople::showGroupMenu(LLMenuGL* menu)
{
// Shows the menu at the top of the button bar.
@@ -873,10 +894,17 @@ void LLPanelPeople::onChatButtonClicked()
void LLPanelPeople::onImButtonClicked()
{
- LLUUID id = getCurrentItemID();
- if (id.notNull())
+ std::vector<LLUUID> selected_uuids;
+ getCurrentItemIDs(selected_uuids);
+ if ( selected_uuids.size() == 1 )
+ {
+ // if selected only one person then start up IM
+ LLAvatarActions::startIM(selected_uuids.at(0));
+ }
+ else if ( selected_uuids.size() > 1 )
{
- LLAvatarActions::startIM(id);
+ // for multiple selection start up friends conference
+ LLAvatarActions::startConference(selected_uuids);
}
}
diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h
index aa78080d7e..dc0aaeb70f 100644
--- a/indra/newview/llpanelpeople.h
+++ b/indra/newview/llpanelpeople.h
@@ -72,6 +72,7 @@ private:
void updateButtons();
std::string getActiveTabName() const;
LLUUID getCurrentItemID() const;
+ void getCurrentItemIDs(std::vector<LLUUID>& selected_uuids) const;
void buttonSetVisible(std::string btn_name, BOOL visible);
void buttonSetEnabled(const std::string& btn_name, bool enabled);
void buttonSetAction(const std::string& btn_name, const commit_signal_t::slot_type& cb);
diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp
index 0e88058bb1..aaf6849fe9 100644
--- a/indra/newview/llpanelpeoplemenus.cpp
+++ b/indra/newview/llpanelpeoplemenus.cpp
@@ -55,7 +55,7 @@ ContextMenu::ContextMenu()
{
}
-void ContextMenu::show(LLView* spawning_view, const LLUUID& id, S32 x, S32 y)
+void ContextMenu::show(LLView* spawning_view, const std::vector<LLUUID>& uuids, S32 x, S32 y)
{
if (mMenu)
{
@@ -67,9 +67,16 @@ void ContextMenu::show(LLView* spawning_view, const LLUUID& id, S32 x, S32 y)
mMenu->setParent(NULL);
}
delete mMenu;
+ mMenu = NULL;
+ mUUIDs.clear();
}
- mID = id;
+ if ( uuids.empty() )
+ return;
+
+ mUUIDs.resize(uuids.size());
+ std::copy(uuids.begin(), uuids.end(), mUUIDs.begin());
+
mMenu = createMenu();
mMenu->show(x, y);
LLMenuGL::showPopup(spawning_view, mMenu, x, y);
@@ -80,47 +87,92 @@ void ContextMenu::show(LLView* spawning_view, const LLUUID& id, S32 x, S32 y)
LLContextMenu* NearbyMenu::createMenu()
{
// set up the callbacks for all of the avatar menu items
- // (N.B. callbacks don't take const refs as mID is local scope)
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar;
- registrar.add("Avatar.Profile", boost::bind(&LLAvatarActions::showProfile, mID));
- registrar.add("Avatar.AddFriend", boost::bind(&LLAvatarActions::requestFriendshipDialog, mID));
- registrar.add("Avatar.IM", boost::bind(&LLAvatarActions::startIM, mID));
- registrar.add("Avatar.Call", boost::bind(&LLAvatarActions::startIM, mID)); // *TODO: unimplemented
- registrar.add("Avatar.OfferTeleport", boost::bind(&NearbyMenu::offerTeleport, this));
- registrar.add("Avatar.ShowOnMap", boost::bind(&LLAvatarActions::startIM, mID)); // *TODO: unimplemented
- registrar.add("Avatar.Share", boost::bind(&LLAvatarActions::startIM, mID)); // *TODO: unimplemented
- registrar.add("Avatar.Pay", boost::bind(&LLAvatarActions::pay, mID));
- registrar.add("Avatar.BlockUnblock", boost::bind(&LLAvatarActions::toggleBlock, mID));
-
- enable_registrar.add("Avatar.EnableItem", boost::bind(&NearbyMenu::enableContextMenuItem, this, _2));
- enable_registrar.add("Avatar.CheckItem", boost::bind(&NearbyMenu::checkContextMenuItem, this, _2));
-
- // create the context menu from the XUI
- return LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>(
- "menu_people_nearby.xml", LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance());
+ if ( mUUIDs.size() == 1 )
+ {
+ // Set up for one person selected menu
+
+ const LLUUID& id = mUUIDs.front();
+ registrar.add("Avatar.Profile", boost::bind(&LLAvatarActions::showProfile, id));
+ registrar.add("Avatar.AddFriend", boost::bind(&LLAvatarActions::requestFriendshipDialog, id));
+ registrar.add("Avatar.IM", boost::bind(&LLAvatarActions::startIM, id));
+ registrar.add("Avatar.Call", boost::bind(&LLAvatarActions::startIM, id)); // *TODO: unimplemented
+ registrar.add("Avatar.OfferTeleport", boost::bind(&NearbyMenu::offerTeleport, this));
+ registrar.add("Avatar.ShowOnMap", boost::bind(&LLAvatarActions::startIM, id)); // *TODO: unimplemented
+ registrar.add("Avatar.Share", boost::bind(&LLAvatarActions::startIM, id)); // *TODO: unimplemented
+ registrar.add("Avatar.Pay", boost::bind(&LLAvatarActions::pay, id));
+ registrar.add("Avatar.BlockUnblock", boost::bind(&LLAvatarActions::toggleBlock, id));
+
+ enable_registrar.add("Avatar.EnableItem", boost::bind(&NearbyMenu::enableContextMenuItem, this, _2));
+ enable_registrar.add("Avatar.CheckItem", boost::bind(&NearbyMenu::checkContextMenuItem, this, _2));
+
+ // create the context menu from the XUI
+ return LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>(
+ "menu_people_nearby.xml", LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance());
+ }
+ else
+ {
+ // Set up for multi-selected People
+
+ // registrar.add("Avatar.AddFriend", boost::bind(&LLAvatarActions::requestFriendshipDialog, mUUIDs)); // *TODO: unimplemented
+ registrar.add("Avatar.IM", boost::bind(&LLAvatarActions::startConference, mUUIDs));
+ // registrar.add("Avatar.Call", boost::bind(&LLAvatarActions::startConference, mUUIDs)); // *TODO: unimplemented
+ // registrar.add("Avatar.Share", boost::bind(&LLAvatarActions::startIM, mUUIDs)); // *TODO: unimplemented
+ // registrar.add("Avatar.Pay", boost::bind(&LLAvatarActions::pay, mUUIDs)); // *TODO: unimplemented
+ enable_registrar.add("Avatar.EnableItem", boost::bind(&NearbyMenu::enableContextMenuItem, this, _2));
+
+ // create the context menu from the XUI
+ return LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>
+ ("menu_people_nearby_multiselect.xml", LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance());
+
+ }
}
bool NearbyMenu::enableContextMenuItem(const LLSD& userdata)
{
std::string item = userdata.asString();
+ // Note: can_block and can_delete is used only for one person selected menu
+ // so we don't need to go over all uuids.
+
if (item == std::string("can_block"))
{
+ const LLUUID& id = mUUIDs.front();
std::string firstname, lastname;
- gCacheName->getName(mID, firstname, lastname);
+ gCacheName->getName(id, firstname, lastname);
bool is_linden = !LLStringUtil::compareStrings(lastname, "Linden");
- bool is_self = mID == gAgentID;
+ bool is_self = id == gAgentID;
return !is_self && !is_linden;
}
else if (item == std::string("can_add"))
{
- return !LLAvatarActions::isFriend(mID);
+ // We can add friends if:
+ // - there are selected people
+ // - and there are no friends among selection yet.
+
+ bool result = (mUUIDs.size() > 0);
+
+ std::vector<LLUUID>::const_iterator
+ id = mUUIDs.begin(),
+ uuids_end = mUUIDs.end();
+
+ for (;id != uuids_end; ++id)
+ {
+ if ( LLAvatarActions::isFriend(*id) )
+ {
+ result = false;
+ break;
+ }
+ }
+
+ return result;
}
else if (item == std::string("can_delete"))
{
- return LLAvatarActions::isFriend(mID);
+ const LLUUID& id = mUUIDs.front();
+ return LLAvatarActions::isFriend(id);
}
return false;
@@ -129,10 +181,11 @@ bool NearbyMenu::enableContextMenuItem(const LLSD& userdata)
bool NearbyMenu::checkContextMenuItem(const LLSD& userdata)
{
std::string item = userdata.asString();
+ const LLUUID& id = mUUIDs.front();
if (item == std::string("is_blocked"))
{
- return LLAvatarActions::isBlocked(mID);
+ return LLAvatarActions::isBlocked(id);
}
return false;
@@ -142,7 +195,8 @@ void NearbyMenu::offerTeleport()
{
// boost::bind cannot recognize overloaded method LLAvatarActions::offerTeleport(),
// so we have to use a wrapper.
- LLAvatarActions::offerTeleport(mID);
+ const LLUUID& id = mUUIDs.front();
+ LLAvatarActions::offerTeleport(id);
}
} // namespace LLPanelPeopleMenus
diff --git a/indra/newview/llpanelpeoplemenus.h b/indra/newview/llpanelpeoplemenus.h
index 0012ac38f8..ed0f8208f6 100644
--- a/indra/newview/llpanelpeoplemenus.h
+++ b/indra/newview/llpanelpeoplemenus.h
@@ -49,17 +49,17 @@ public:
/**
* Show the menu at specified coordinates.
- *
- * @param id either avatar or group id
+ *
+ * @param uuids - an array of avatar or group ids
*/
- /*virtual*/ void show(LLView* spawning_view, const LLUUID& id, S32 x, S32 y);
+ /*virtual*/ void show(LLView* spawning_view, const std::vector<LLUUID>& uuids, S32 x, S32 y);
protected:
virtual LLContextMenu* createMenu() = 0;
- LLUUID mID;
- LLContextMenu* mMenu;
+ std::vector<LLUUID> mUUIDs;
+ LLContextMenu* mMenu;
};
/**
diff --git a/indra/newview/llpanelpick.cpp b/indra/newview/llpanelpick.cpp
index 664ebfd7a4..e725479abb 100644
--- a/indra/newview/llpanelpick.cpp
+++ b/indra/newview/llpanelpick.cpp
@@ -38,6 +38,7 @@
#include "llpanel.h"
#include "message.h"
#include "llagent.h"
+#include "llagentpicksinfo.h"
#include "llbutton.h"
#include "lllineeditor.h"
#include "llparcel.h"
@@ -45,6 +46,7 @@
#include "lltexteditor.h"
#include "lltexturectrl.h"
#include "lluiconstants.h"
+#include "llviewerregion.h"
#include "llworldmap.h"
#include "llfloaterworldmap.h"
#include "llfloaterreg.h"
@@ -310,6 +312,7 @@ LLPanelPickEdit::LLPanelPickEdit()
: LLPanelPickInfo()
, mLocationChanged(false)
, mNeedData(true)
+ , mNewPick(false)
{
}
@@ -325,6 +328,8 @@ void LLPanelPickEdit::onOpen(const LLSD& key)
// creating new Pick
if(pick_id.isNull())
{
+ mNewPick = true;
+
setAvatarId(gAgent.getID());
resetData();
@@ -344,6 +349,15 @@ void LLPanelPickEdit::onOpen(const LLSD& key)
snapshot_id = parcel->getSnapshotID();
}
+ if(pick_name.empty())
+ {
+ LLViewerRegion* region = gAgent.getRegion();
+ if(region)
+ {
+ pick_name = region->getName();
+ }
+ }
+
setParcelID(parcel_id);
childSetValue("pick_name", pick_name);
childSetValue("pick_desc", pick_desc);
@@ -356,6 +370,7 @@ void LLPanelPickEdit::onOpen(const LLSD& key)
// editing existing pick
else
{
+ mNewPick = false;
LLPanelPickInfo::onOpen(key);
enableSaveButton(false);
@@ -463,6 +478,14 @@ void LLPanelPickEdit::sendUpdate()
pick_data.enabled = TRUE;
LLAvatarPropertiesProcessor::instance().sendPickInfoUpdate(&pick_data);
+
+ if(mNewPick)
+ {
+ // Assume a successful create pick operation, make new number of picks
+ // available immediately. Actual number of picks will be requested in
+ // LLAvatarPropertiesProcessor::sendPickInfoUpdate and updated upon server respond.
+ LLAgentPicksInfo::getInstance()->incrementNumberOfPicks();
+ }
}
void LLPanelPickEdit::onPickChanged(LLUICtrl* ctrl)
diff --git a/indra/newview/llpanelpick.h b/indra/newview/llpanelpick.h
index c5b13c69ea..9b605cd6b1 100644
--- a/indra/newview/llpanelpick.h
+++ b/indra/newview/llpanelpick.h
@@ -235,6 +235,7 @@ protected:
bool mLocationChanged;
bool mNeedData;
+ bool mNewPick;
};
#endif // LL_LLPANELPICK_H
diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp
index 073da5cc06..aa6909560d 100644
--- a/indra/newview/llpanelpicks.cpp
+++ b/indra/newview/llpanelpicks.cpp
@@ -33,11 +33,13 @@
#include "llviewerprecompiledheaders.h"
#include "llagent.h"
+#include "llagentpicksinfo.h"
#include "llavatarconstants.h"
#include "llflatlistview.h"
#include "llfloaterreg.h"
#include "llfloaterworldmap.h"
#include "lltexturectrl.h"
+#include "lltoggleablemenu.h"
#include "llviewergenericmessage.h" // send_generic_message
#include "llmenugl.h"
#include "llviewermenu.h"
@@ -54,6 +56,7 @@ static const std::string XML_BTN_DELETE = "trash_btn";
static const std::string XML_BTN_INFO = "info_btn";
static const std::string XML_BTN_TELEPORT = "teleport_btn";
static const std::string XML_BTN_SHOW_ON_MAP = "show_on_map_btn";
+static const std::string XML_BTN_OVERFLOW = "overflow_btn";
static const std::string PICK_ID("pick_id");
static const std::string PICK_CREATOR_ID("pick_creator_id");
@@ -73,6 +76,7 @@ LLPanelPicks::LLPanelPicks()
mPicksList(NULL)
, mPanelPickInfo(NULL)
, mPanelPickEdit(NULL)
+ , mOverflowMenu(NULL)
{
}
@@ -91,7 +95,12 @@ void* LLPanelPicks::create(void* data /* = NULL */)
void LLPanelPicks::updateData()
{
- LLAvatarPropertiesProcessor::getInstance()->sendAvatarPicksRequest(getAvatarId());
+ // Send Picks request only when we need to, not on every onOpen(during tab switch).
+ if(isDirty())
+ {
+ mPicksList->clear();
+ LLAvatarPropertiesProcessor::getInstance()->sendAvatarPicksRequest(getAvatarId());
+ }
}
void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type)
@@ -134,6 +143,7 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type)
picture->setMouseUpCallback(boost::bind(&LLPanelPicks::updateButtons, this));
}
+ resetDirty();
LLAvatarPropertiesProcessor::getInstance()->removeObserver(getAvatarId(),this);
updateButtons();
}
@@ -152,25 +162,56 @@ BOOL LLPanelPicks::postBuild()
{
mPicksList = getChild<LLFlatListView>("picks_list");
+ childSetAction(XML_BTN_NEW, boost::bind(&LLPanelPicks::onClickNew, this));
childSetAction(XML_BTN_DELETE, boost::bind(&LLPanelPicks::onClickDelete, this));
-
- childSetAction("teleport_btn", boost::bind(&LLPanelPicks::onClickTeleport, this));
- childSetAction("show_on_map_btn", boost::bind(&LLPanelPicks::onClickMap, this));
-
- childSetAction("info_btn", boost::bind(&LLPanelPicks::onClickInfo, this));
- childSetAction("new_btn", boost::bind(&LLPanelPicks::onClickNew, 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));
- CommitCallbackRegistry::ScopedRegistrar registar;
+ LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registar;
registar.add("Pick.Info", boost::bind(&LLPanelPicks::onClickInfo, this));
registar.add("Pick.Edit", boost::bind(&LLPanelPicks::onClickMenuEdit, this));
registar.add("Pick.Teleport", boost::bind(&LLPanelPicks::onClickTeleport, this));
registar.add("Pick.Map", boost::bind(&LLPanelPicks::onClickMap, this));
registar.add("Pick.Delete", boost::bind(&LLPanelPicks::onClickDelete, this));
mPopupMenu = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>("menu_picks.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+
+ 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());
return TRUE;
}
+void LLPanelPicks::onOverflowMenuItemClicked(const LLSD& param)
+{
+ std::string value = param.asString();
+
+ if("info" == value)
+ {
+ onClickInfo();
+ }
+ else if("teleport" == value)
+ {
+ onClickTeleport();
+ }
+ else if("map" == value)
+ {
+ onClickMap();
+ }
+}
+
+void LLPanelPicks::onOverflowButtonClicked()
+{
+ LLRect rect;
+ childGetRect(XML_BTN_OVERFLOW, rect);
+
+ mOverflowMenu->updateParent(LLMenuGL::sMenuContainer);
+ mOverflowMenu->setButtonRect(rect, this);
+ LLMenuGL::showPopup(this, mOverflowMenu, rect.mRight, rect.mTop);
+}
+
void LLPanelPicks::onOpen(const LLSD& key)
{
const LLUUID id(key.asUUID());
@@ -183,8 +224,6 @@ void LLPanelPicks::onOpen(const LLSD& key)
// Disable buttons when viewing profile for first time
if(getAvatarId() != id)
{
- clear();
-
childSetEnabled(XML_BTN_INFO,FALSE);
childSetEnabled(XML_BTN_TELEPORT,FALSE);
childSetEnabled(XML_BTN_SHOW_ON_MAP,FALSE);
@@ -204,6 +243,8 @@ void LLPanelPicks::onOpen(const LLSD& key)
if(getAvatarId() != id)
{
mPicksList->goToTop();
+ // Set dummy value to make panel dirty and make it reload picks
+ setValue(LLSD());
}
LLPanelProfileTab::onOpen(key);
@@ -296,20 +337,18 @@ void LLPanelPicks::onDoubleClickItem(LLUICtrl* item)
void LLPanelPicks::updateButtons()
{
- int picks_num = mPicksList->size();
bool has_selected = mPicksList->numSelected();
- childSetEnabled(XML_BTN_INFO, has_selected);
-
if (getAvatarId() == gAgentID)
{
- childSetEnabled(XML_BTN_NEW, picks_num < MAX_AVATAR_PICKS);
+ childSetEnabled(XML_BTN_NEW, !LLAgentPicksInfo::getInstance()->isPickLimitReached());
childSetEnabled(XML_BTN_DELETE, has_selected);
}
childSetEnabled(XML_BTN_INFO, has_selected);
childSetEnabled(XML_BTN_TELEPORT, has_selected);
childSetEnabled(XML_BTN_SHOW_ON_MAP, has_selected);
+ childSetEnabled(XML_BTN_OVERFLOW, has_selected);
}
void LLPanelPicks::setProfilePanel(LLPanelProfile* profile_panel)
@@ -358,6 +397,12 @@ void LLPanelPicks::onPanelPickClose(LLPanel* panel)
panel->setVisible(FALSE);
}
+void LLPanelPicks::onPanelPickSave(LLPanel* panel)
+{
+ onPanelPickClose(panel);
+ updateButtons();
+}
+
void LLPanelPicks::createPickInfoPanel()
{
if(!mPanelPickInfo)
@@ -375,7 +420,7 @@ void LLPanelPicks::createPickEditPanel()
{
mPanelPickEdit = LLPanelPickEdit::create();
mPanelPickEdit->setExitCallback(boost::bind(&LLPanelPicks::onPanelPickClose, this, mPanelPickEdit));
- mPanelPickEdit->setSaveCallback(boost::bind(&LLPanelPicks::onPanelPickClose, this, mPanelPickEdit));
+ mPanelPickEdit->setSaveCallback(boost::bind(&LLPanelPicks::onPanelPickSave, this, mPanelPickEdit));
mPanelPickEdit->setCancelCallback(boost::bind(&LLPanelPicks::onPanelPickClose, this, mPanelPickEdit));
mPanelPickEdit->setVisible(FALSE);
}
diff --git a/indra/newview/llpanelpicks.h b/indra/newview/llpanelpicks.h
index 6264a19318..06a0f0a0fd 100644
--- a/indra/newview/llpanelpicks.h
+++ b/indra/newview/llpanelpicks.h
@@ -50,6 +50,7 @@ class LLPickItem;
class LLFlatListView;
class LLPanelPickInfo;
class LLPanelPickEdit;
+class LLToggleableMenu;
class LLPanelPicks
: public LLPanelProfileTab
@@ -80,12 +81,16 @@ private:
void onClickTeleport();
void onClickMap();
+ void onOverflowMenuItemClicked(const LLSD& param);
+ void onOverflowButtonClicked();
+
//------------------------------------------------
// Callbacks which require panel toggling
//------------------------------------------------
void onClickNew();
void onClickInfo();
void onPanelPickClose(LLPanel* panel);
+ void onPanelPickSave(LLPanel* panel);
void onPanelPickEdit();
void onClickMenuEdit();
@@ -112,6 +117,7 @@ private:
LLFlatListView* mPicksList;
LLPanelPickInfo* mPanelPickInfo;
LLPanelPickEdit* mPanelPickEdit;
+ LLToggleableMenu* mOverflowMenu;
};
class LLPickItem : public LLPanel, public LLAvatarPropertiesObserver
diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp
index 6d1a5fb184..cb9f7184f0 100644
--- a/indra/newview/llpanelplaceinfo.cpp
+++ b/indra/newview/llpanelplaceinfo.cpp
@@ -56,10 +56,12 @@
#include "llagentui.h"
#include "llavatarpropertiesprocessor.h"
#include "llfloaterworldmap.h"
+#include "llfloaterbuycurrency.h"
#include "llinventorymodel.h"
#include "lllandmarkactions.h"
#include "llpanelpick.h"
#include "lltexturectrl.h"
+#include "llstatusbar.h"
#include "llviewerinventory.h"
#include "llviewerparcelmgr.h"
#include "llviewerregion.h"
@@ -88,7 +90,10 @@ LLPanelPlaceInfo::LLPanelPlaceInfo()
mMinHeight(0),
mScrollingPanel(NULL),
mInfoPanel(NULL),
- mMediaPanel(NULL)
+ mMediaPanel(NULL),
+ mForSalePanel(NULL),
+ mYouAreHerePanel(NULL),
+ mSelectedParcelID(-1)
{}
LLPanelPlaceInfo::~LLPanelPlaceInfo()
@@ -104,14 +109,15 @@ BOOL LLPanelPlaceInfo::postBuild()
mTitle = getChild<LLTextBox>("panel_title");
mCurrentTitle = mTitle->getText();
- mForSaleIcon = getChild<LLIconCtrl>("icon_for_sale");
+ mForSalePanel = getChild<LLPanel>("for_sale_panel");
+ mYouAreHerePanel = getChild<LLPanel>("here_panel");
+ LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback(boost::bind(&LLPanelPlaceInfo::updateYouAreHereBanner,this));
+
+ //Icon value should contain sale price of last selected parcel.
+ mForSalePanel->getChild<LLIconCtrl>("icon_for_sale")->
+ setMouseDownCallback(boost::bind(&LLPanelPlaceInfo::onForSaleBannerClick, this));
- // Since this is only used in the directory browser, always
- // disable the snapshot control. Otherwise clicking on it will
- // open a texture picker.
mSnapshotCtrl = getChild<LLTextureCtrl>("logo");
- mSnapshotCtrl->setEnabled(FALSE);
-
mRegionName = getChild<LLTextBox>("region_title");
mParcelName = getChild<LLTextBox>("parcel_title");
mDescEditor = getChild<LLTextEditor>("description");
@@ -267,7 +273,8 @@ void LLPanelPlaceInfo::resetLocation()
mRequestedID.setNull();
mLandmarkID.setNull();
mPosRegion.clearVec();
- mForSaleIcon->setVisible(FALSE);
+ mForSalePanel->setVisible(FALSE);
+ mYouAreHerePanel->setVisible(FALSE);
std::string not_available = getString("not_available");
mMaturityRatingText->setValue(not_available);
mParcelOwner->setValue(not_available);
@@ -480,9 +487,9 @@ void LLPanelPlaceInfo::processParcelInfo(const LLParcelData& parcel_data)
//update for_sale banner, here we should use DFQ_FOR_SALE instead of PF_FOR_SALE
//because we deal with remote parcel response format
- bool isForSale = (parcel_data.flags & DFQ_FOR_SALE) &&
+ bool is_for_sale = (parcel_data.flags & DFQ_FOR_SALE) &&
mInfoType == AGENT ? TRUE : FALSE;
- mForSaleIcon->setVisible(isForSale);
+ mForSalePanel->setVisible(is_for_sale);
S32 region_x;
S32 region_y;
@@ -798,11 +805,11 @@ void LLPanelPlaceInfo::displaySelectedParcelInfo(LLParcel* parcel,
}
}
+ mSelectedParcelID = parcel->getLocalID();
+ mLastSelectedRegionID = region->getRegionID();
processParcelInfo(parcel_data);
- // TODO: If agent is in currently within the selected parcel
- // show the "You Are Here" banner.
-
+ mYouAreHerePanel->setVisible(is_current_parcel);
getChild<LLAccordionCtrlTab>("sales_tab")->setVisible(for_sale);
}
@@ -979,6 +986,50 @@ void LLPanelPlaceInfo::populateFoldersList()
mFolderCombo->add(it->second, LLSD(it->first));
}
+void LLPanelPlaceInfo::updateYouAreHereBanner()
+{
+ //YouAreHere Banner should be displayed only for selected places,
+ // If you want to display it for landmark or teleport history item, you should check by mParcelId
+
+ bool is_you_are_here = false;
+ if (mSelectedParcelID != S32(-1) && !mLastSelectedRegionID.isNull())
+ {
+ is_you_are_here = gAgent.getRegion()->getRegionID()== mLastSelectedRegionID &&
+ mSelectedParcelID == LLViewerParcelMgr::getInstance()->getAgentParcel()->getLocalID();
+ }
+ mYouAreHerePanel->setVisible(is_you_are_here);
+}
+
+void LLPanelPlaceInfo::onForSaleBannerClick()
+{
+ LLViewerParcelMgr* mgr = LLViewerParcelMgr::getInstance();
+ LLParcelSelectionHandle hParcel = mgr->getFloatingParcelSelection();
+ LLViewerRegion* selected_region = mgr->getSelectionRegion();
+ if(!hParcel.isNull() && selected_region)
+ {
+ if(hParcel->getParcel()->getLocalID() == mSelectedParcelID &&
+ mLastSelectedRegionID ==selected_region->getRegionID())
+ {
+ if(hParcel->getParcel()->getSalePrice() - gStatusBar->getBalance() > 0)
+ {
+ LLFloaterBuyCurrency::buyCurrency("Buying selected land ", hParcel->getParcel()->getSalePrice());
+ }
+ else
+ {
+ LLViewerParcelMgr::getInstance()->startBuyLand();
+ }
+ }
+ else
+ {
+ LL_WARNS("Places") << "User is trying to buy remote parcel.Operation is not supported"<< LL_ENDL;
+ }
+
+ }
+
+
+}
+
+
static bool cmp_folders(const folder_pair_t& left, const folder_pair_t& right)
{
return left.second < right.second;
diff --git a/indra/newview/llpanelplaceinfo.h b/indra/newview/llpanelplaceinfo.h
index 06fee2224e..7b3a8f050b 100644
--- a/indra/newview/llpanelplaceinfo.h
+++ b/indra/newview/llpanelplaceinfo.h
@@ -135,7 +135,12 @@ public:
private:
void populateFoldersList();
+ void updateYouAreHereBanner();
+ void onForSaleBannerClick();
+ /**
+ * mParcelID is valid only for remote places, in other cases it's null. See resetLocation()
+ */
LLUUID mParcelID;
LLUUID mRequestedID;
LLUUID mLandmarkID;
@@ -144,8 +149,15 @@ private:
S32 mMinHeight;
INFO_TYPE mInfoType;
+ /**
+ * Hold last displayed parcel. Needs for YouAreHere banner.
+ */
+ S32 mSelectedParcelID;
+ LLUUID mLastSelectedRegionID;
+
LLTextBox* mTitle;
- LLIconCtrl* mForSaleIcon;
+ LLPanel* mForSalePanel;
+ LLPanel* mYouAreHerePanel;
LLTextureCtrl* mSnapshotCtrl;
LLTextBox* mRegionName;
LLTextBox* mParcelName;
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index f30bb1a0a6..5ab823b6e5 100644
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -50,6 +50,7 @@
#include "lluictrlfactory.h"
#include "llagent.h"
+#include "llagentpicksinfo.h"
#include "llavatarpropertiesprocessor.h"
#include "llfloaterworldmap.h"
#include "llinventorybridge.h"
@@ -178,6 +179,8 @@ BOOL LLPanelPlaces::postBuild()
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
registrar.add("Places.OverflowMenu.Action", boost::bind(&LLPanelPlaces::onOverflowMenuItemClicked, this, _2));
+ LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar;
+ enable_registrar.add("Places.OverflowMenu.Enable", boost::bind(&LLPanelPlaces::onOverflowMenuItemEnable, this, _2));
mPlaceMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_place.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
if (!mPlaceMenu)
@@ -606,6 +609,16 @@ void LLPanelPlaces::onOverflowButtonClicked()
LLMenuGL::showPopup(this, menu, rect.mRight, rect.mTop);
}
+bool LLPanelPlaces::onOverflowMenuItemEnable(const LLSD& param)
+{
+ std::string value = param.asString();
+ if("can_create_pick" == value)
+ {
+ return !LLAgentPicksInfo::getInstance()->isPickLimitReached();
+ }
+ return true;
+}
+
void LLPanelPlaces::onOverflowMenuItemClicked(const LLSD& param)
{
std::string item = param.asString();
diff --git a/indra/newview/llpanelplaces.h b/indra/newview/llpanelplaces.h
index 70c50b2058..e2d281dd84 100644
--- a/indra/newview/llpanelplaces.h
+++ b/indra/newview/llpanelplaces.h
@@ -77,6 +77,7 @@ private:
void onCancelButtonClicked();
void onOverflowButtonClicked();
void onOverflowMenuItemClicked(const LLSD& param);
+ bool onOverflowMenuItemEnable(const LLSD& param);
void onCreateLandmarkButtonClicked(const LLUUID& folder_id);
void onBackButtonClicked();
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index 08d2baf6cd..bec670cdaa 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -192,8 +192,9 @@ void LLPanelProfile::openPanel(LLPanel* panel, const LLSD& params)
void LLPanelProfile::notifyParent(const LLSD& info)
{
+ std::string action = info["action"];
// lets update Picks list after Pick was saved
- if("save_new_pick" == info["action"])
+ if("save_new_pick" == action)
{
onOpen(info);
return;
diff --git a/indra/newview/llpanelprofileview.cpp b/indra/newview/llpanelprofileview.cpp
index f1db2416e4..1d16c4ef5e 100644
--- a/indra/newview/llpanelprofileview.cpp
+++ b/indra/newview/llpanelprofileview.cpp
@@ -46,6 +46,7 @@ static LLRegisterPanelClassWrapper<LLPanelProfileView> t_panel_target_profile("p
static std::string PANEL_NOTES = "panel_notes";
static const std::string PANEL_PROFILE = "panel_profile";
+static const std::string PANEL_PICKS = "panel_picks";
LLPanelProfileView::LLPanelProfileView()
: LLPanelProfile()
@@ -103,6 +104,10 @@ BOOL LLPanelProfileView::postBuild()
void LLPanelProfileView::onBackBtnClick()
{
+ // Set dummy value to make picks panel dirty,
+ // This will make Picks reload on next open.
+ getTabContainer()[PANEL_PICKS]->setValue(LLSD());
+
LLSideTrayPanelContainer* parent = dynamic_cast<LLSideTrayPanelContainer*>(getParent());
if(parent)
{
diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp
index 207ed723b2..7dd9df674c 100644
--- a/indra/newview/llpanelteleporthistory.cpp
+++ b/indra/newview/llpanelteleporthistory.cpp
@@ -60,6 +60,7 @@ public:
virtual BOOL postBuild();
S32 getIndex() { return mIndex; }
+ void setIndex(S32 index) { mIndex = index; }
const std::string& getRegionName() { return mRegionName;}
/*virtual*/ void setValue(const LLSD& value);
@@ -180,7 +181,7 @@ LLContextMenu* LLTeleportHistoryPanel::ContextMenu::createMenu()
registrar.add("TeleportHistory.Teleport", boost::bind(&LLTeleportHistoryPanel::ContextMenu::onTeleport, this));
registrar.add("TeleportHistory.MoreInformation",boost::bind(&LLTeleportHistoryPanel::ContextMenu::onInfo, this));
- registrar.add("TeleportHistory.Copy", boost::bind(&LLTeleportHistoryPanel::ContextMenu::onCopy, this));
+ registrar.add("TeleportHistory.CopyToClipboard",boost::bind(&LLTeleportHistoryPanel::ContextMenu::onCopyToClipboard, this));
// create the context menu from the XUI
return LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>(
@@ -203,11 +204,11 @@ void LLTeleportHistoryPanel::ContextMenu::gotSLURLCallback(const std::string& sl
gClipboard.copyFromString(utf8str_to_wstring(slurl));
}
-void LLTeleportHistoryPanel::ContextMenu::onCopy()
+void LLTeleportHistoryPanel::ContextMenu::onCopyToClipboard()
{
LLVector3d globalPos = LLTeleportHistoryStorage::getInstance()->getItems()[mIndex].mGlobalPos;
LLLandmarkActions::getSLURLfromPosGlobal(globalPos,
- boost::bind(&LLTeleportHistoryPanel::ContextMenu::gotSLURLCallback, _1), false);
+ boost::bind(&LLTeleportHistoryPanel::ContextMenu::gotSLURLCallback, _1));
}
// Not yet implemented; need to remove buildPanel() from constructor when we switch
@@ -237,7 +238,7 @@ BOOL LLTeleportHistoryPanel::postBuild()
mTeleportHistory = LLTeleportHistoryStorage::getInstance();
if (mTeleportHistory)
{
- mTeleportHistory->setHistoryChangedCallback(boost::bind(&LLTeleportHistoryPanel::onTeleportHistoryChange, this));
+ mTeleportHistory->setHistoryChangedCallback(boost::bind(&LLTeleportHistoryPanel::onTeleportHistoryChange, this, _1));
}
mHistoryAccordion = getChild<LLAccordionCtrl>("history_accordion");
@@ -488,7 +489,7 @@ void LLTeleportHistoryPanel::refresh()
if (mLastSelectedItemIndex == mCurrentItem)
curr_flat_view->selectItem(item, true);
}
-
+
mCurrentItem--;
if (++added_items >= ADD_LIMIT)
@@ -503,10 +504,75 @@ void LLTeleportHistoryPanel::refresh()
mDirty = false;
}
-void LLTeleportHistoryPanel::onTeleportHistoryChange()
+void LLTeleportHistoryPanel::onTeleportHistoryChange(S32 removed_index)
{
mLastSelectedItemIndex = -1;
- showTeleportHistory();
+
+ if (-1 == removed_index)
+ showTeleportHistory(); // recreate all items
+ else
+ replaceItem(removed_index); // replace removed item by most recent
+}
+
+void LLTeleportHistoryPanel::replaceItem(S32 removed_index)
+{
+ // Flat list for 'Today' (mItemContainers keeps accordion tabs in reverse order)
+ LLFlatListView* fv = getFlatListViewFromTab(mItemContainers[mItemContainers.size() - 1]);
+
+ // Empty flat list for 'Today' means that other flat lists are empty as well,
+ // so all items from teleport history should be added.
+ if (!fv || fv->size() == 0)
+ {
+ showTeleportHistory();
+ return;
+ }
+
+ const LLTeleportHistoryStorage::slurl_list_t& history_items = mTeleportHistory->getItems();
+ LLTeleportHistoryFlatItem* item = new LLTeleportHistoryFlatItem(history_items.size(), // index will be decremented inside loop below
+ &mContextMenu,
+ history_items[history_items.size() - 1].mTitle); // Most recent item, it was
+ // added instead of removed
+ fv->addItem(item, LLUUID::null, ADD_TOP);
+
+ // Index of each item, from last to removed item should be decremented
+ // to point to the right item in LLTeleportHistoryStorage
+ for (S32 tab_idx = mItemContainers.size() - 1; tab_idx >= 0; --tab_idx)
+ {
+ LLAccordionCtrlTab* tab = mItemContainers.get(tab_idx);
+ if (!tab->getVisible())
+ continue;
+
+ fv = getFlatListViewFromTab(tab);
+ if (!fv)
+ {
+ showTeleportHistory();
+ return;
+ }
+
+ std::vector<LLPanel*> items;
+ fv->getItems(items);
+
+ S32 items_cnt = items.size();
+ for (S32 n = 0; n < items_cnt; ++n)
+ {
+ LLTeleportHistoryFlatItem *item = (LLTeleportHistoryFlatItem*) items[n];
+
+ if (item->getIndex() == removed_index)
+ {
+ fv->removeItem(item);
+
+ // If flat list becames empty, then accordion tab should be hidden
+ if (fv->size() == 0)
+ tab->setVisible(false);
+
+ mHistoryAccordion->arrange();
+
+ return; // No need to decrement idexes for the rest of items
+ }
+
+ item->setIndex(item->getIndex() - 1);
+ }
+ }
}
void LLTeleportHistoryPanel::showTeleportHistory()
diff --git a/indra/newview/llpanelteleporthistory.h b/indra/newview/llpanelteleporthistory.h
index 49a97c5022..7c1b403432 100644
--- a/indra/newview/llpanelteleporthistory.h
+++ b/indra/newview/llpanelteleporthistory.h
@@ -57,7 +57,7 @@ public:
LLContextMenu* createMenu();
void onTeleport();
void onInfo();
- void onCopy();
+ void onCopyToClipboard();
static void gotSLURLCallback(const std::string& slurl);
@@ -90,7 +90,8 @@ private:
void refresh();
void getNextTab(const LLDate& item_date, S32& curr_tab, LLDate& tab_date);
- void onTeleportHistoryChange();
+ void onTeleportHistoryChange(S32 removed_index);
+ void replaceItem(S32 removed_index);
void showTeleportHistory();
void handleItemSelect(LLFlatListView* );
LLFlatListView* getFlatListViewFromTab(LLAccordionCtrlTab *);
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
new file mode 100644
index 0000000000..25e773e8b8
--- /dev/null
+++ b/indra/newview/llparticipantlist.cpp
@@ -0,0 +1,105 @@
+/**
+ * @file llparticipantlist.cpp
+ * @brief LLParticipantList intended to update view(LLAvatarList) according to incoming messages
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ *
+ * Copyright (c) 2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llparticipantlist.h"
+#include "llavatarlist.h"
+#include "llfloateractivespeakers.h"
+
+//LLParticipantList retrieves add, clear and remove events and updates view accordingly
+LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list):
+ mSpeakerMgr(data_source),
+ mAvatarList(avatar_list)
+{
+ mSpeakerAddListener = new SpeakerAddListener(mAvatarList);
+ mSpeakerRemoveListener = new SpeakerRemoveListener(mAvatarList);
+ mSpeakerClearListener = new SpeakerClearListener(mAvatarList);
+
+ mSpeakerMgr->addListener(mSpeakerAddListener, "add");
+ mSpeakerMgr->addListener(mSpeakerRemoveListener, "remove");
+ mSpeakerMgr->addListener(mSpeakerClearListener, "clear");
+}
+
+LLParticipantList::~LLParticipantList()
+{
+ delete mSpeakerAddListener;
+ delete mSpeakerRemoveListener;
+ delete mSpeakerClearListener;
+ mSpeakerAddListener = NULL;
+ mSpeakerRemoveListener = NULL;
+ mSpeakerClearListener = NULL;
+}
+
+//
+// LLParticipantList::SpeakerAddListener
+//
+bool LLParticipantList::SpeakerAddListener::handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata)
+{
+ LLAvatarList::uuid_vector_t& group_members = mAvatarList->getIDs();
+ LLUUID uu_id = event->getValue().asUUID();
+
+ LLAvatarList::uuid_vector_t::iterator found = std::find(group_members.begin(), group_members.end(), uu_id);
+ if(found != group_members.end())
+ {
+ llinfos << "Already got a buddy" << llendl;
+ return true;
+ }
+
+ group_members.push_back(uu_id);
+ mAvatarList->setDirty();
+ mAvatarList->sortByName();
+ return true;
+}
+
+//
+// LLParticipantList::SpeakerRemoveListener
+//
+bool LLParticipantList::SpeakerRemoveListener::handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata)
+{
+ LLAvatarList::uuid_vector_t& group_members = mAvatarList->getIDs();
+ group_members.erase(std::find(group_members.begin(), group_members.end(), event->getValue().asUUID()));
+ mAvatarList->setDirty();
+ return true;
+}
+
+//
+// LLParticipantList::SpeakerClearListener
+//
+bool LLParticipantList::SpeakerClearListener::handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata)
+{
+ LLAvatarList::uuid_vector_t& group_members = mAvatarList->getIDs();
+ group_members.clear();
+ mAvatarList->setDirty();
+ return true;
+}
+
diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h
new file mode 100644
index 0000000000..68aae0aee5
--- /dev/null
+++ b/indra/newview/llparticipantlist.h
@@ -0,0 +1,83 @@
+/**
+ * @file llparticipantlist.h
+ * @brief LLParticipantList intended to update view(LLAvatarList) according to incoming messages
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ *
+ * Copyright (c) 2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+#include "llevent.h"
+
+class LLSpeakerMgr;
+class LLAvatarList;
+
+class LLParticipantList
+{
+ public:
+ LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list);
+ ~LLParticipantList();
+
+ protected:
+
+ //List of listeners implementing LLOldEvents::LLSimpleListener.
+ //There is no way to handle all the events in one listener as LLSpeakerMgr registers listeners in such a way
+ //that one listener can handle only one type of event
+ class SpeakerAddListener : public LLOldEvents::LLSimpleListener
+ {
+ public:
+ SpeakerAddListener(LLAvatarList* avatar_list) : mAvatarList(avatar_list) {}
+
+ /*virtual*/ bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata);
+ LLAvatarList* mAvatarList;
+ };
+
+ class SpeakerRemoveListener : public LLOldEvents::LLSimpleListener
+ {
+ public:
+ SpeakerRemoveListener(LLAvatarList* avatar_list) : mAvatarList(avatar_list) {}
+
+ /*virtual*/ bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata);
+ LLAvatarList* mAvatarList;
+ };
+
+ class SpeakerClearListener : public LLOldEvents::LLSimpleListener
+ {
+ public:
+ SpeakerClearListener(LLAvatarList* avatar_list) : mAvatarList(avatar_list) {}
+
+ /*virtual*/ bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata);
+ LLAvatarList* mAvatarList;
+ };
+ private:
+ LLSpeakerMgr* mSpeakerMgr;
+ LLAvatarList* mAvatarList;
+
+ SpeakerAddListener* mSpeakerAddListener;
+ SpeakerRemoveListener* mSpeakerRemoveListener;
+ SpeakerClearListener* mSpeakerClearListener;
+};
diff --git a/indra/newview/llpolymesh.cpp b/indra/newview/llpolymesh.cpp
index 02e11cefad..d5a2d66bcf 100644
--- a/indra/newview/llpolymesh.cpp
+++ b/indra/newview/llpolymesh.cpp
@@ -1118,7 +1118,7 @@ BOOL LLPolySkeletalDistortion::setInfo(LLPolySkeletalDistortionInfo *info)
return TRUE;
}
-/*virtual*/ LLViewerVisualParam * LLPolySkeletalDistortion::cloneParam(LLWearable* wearable) const
+/*virtual*/ LLViewerVisualParam* LLPolySkeletalDistortion::cloneParam(LLWearable* wearable) const
{
LLPolySkeletalDistortion *new_param = new LLPolySkeletalDistortion(mAvatar);
*new_param = *this;
diff --git a/indra/newview/llpolymesh.h b/indra/newview/llpolymesh.h
index 709b176c8d..c2e5451dfe 100644
--- a/indra/newview/llpolymesh.h
+++ b/indra/newview/llpolymesh.h
@@ -417,7 +417,7 @@ public:
// This sets mInfo and calls initialization functions
BOOL setInfo(LLPolySkeletalDistortionInfo *info);
- /*virtual*/ LLViewerVisualParam * cloneParam(LLWearable* wearable) const;
+ /*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable) const;
// LLVisualParam Virtual functions
///*virtual*/ BOOL parseData(LLXmlTreeNode* node);
diff --git a/indra/newview/llpolymorph.cpp b/indra/newview/llpolymorph.cpp
index 924b1a4d6e..80983cad24 100644
--- a/indra/newview/llpolymorph.cpp
+++ b/indra/newview/llpolymorph.cpp
@@ -302,7 +302,7 @@ BOOL LLPolyMorphTarget::setInfo(LLPolyMorphTargetInfo* info)
return TRUE;
}
-/*virtual*/ LLViewerVisualParam * LLPolyMorphTarget::cloneParam(LLWearable* wearable) const
+/*virtual*/ LLViewerVisualParam* LLPolyMorphTarget::cloneParam(LLWearable* wearable) const
{
LLPolyMorphTarget *new_param = new LLPolyMorphTarget(mMesh);
*new_param = *this;
diff --git a/indra/newview/llpolymorph.h b/indra/newview/llpolymorph.h
index 5089fc2e8a..01731402df 100644
--- a/indra/newview/llpolymorph.h
+++ b/indra/newview/llpolymorph.h
@@ -154,7 +154,7 @@ public:
// This sets mInfo and calls initialization functions
BOOL setInfo(LLPolyMorphTargetInfo *info);
- /*virtual*/ LLViewerVisualParam * cloneParam(LLWearable* wearable) const;
+ /*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable) const;
// LLVisualParam Virtual functions
///*virtual*/ BOOL parseData(LLXmlTreeNode* node);
diff --git a/indra/newview/llrootview.h b/indra/newview/llrootview.h
index f704fecddd..760b1a7a4c 100644
--- a/indra/newview/llrootview.h
+++ b/indra/newview/llrootview.h
@@ -47,5 +47,27 @@ public:
LLRootView(const Params& p)
: LLView(p)
{}
+
+ // added to provide possibility to handle mouse click event inside all application
+ // window without creating any floater
+ typedef boost::signals2::signal<void(S32 x, S32 y, MASK mask)>
+ mouse_signal_t;
+
+ private:
+ mouse_signal_t mMouseDownSignal;
+
+ public:
+ /*virtual*/
+ BOOL handleMouseDown(S32 x, S32 y, MASK mask)
+ {
+ mMouseDownSignal(x, y, mask);
+ return LLView::handleMouseDown(x, y, mask);
+ }
+
+ boost::signals2::connection addMouseDownCallback(
+ const mouse_signal_t::slot_type& cb)
+ {
+ return mMouseDownSignal.connect(cb);
+ }
};
#endif //LL_LLROOTVIEW_H
diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index a72100a9b3..1683d113a9 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -138,7 +138,7 @@ void LLScreenChannel::updatePositionAndSize(LLRect old_world_rect, LLRect new_wo
}
//--------------------------------------------------------------------------
-void LLScreenChannel::addToast(LLToast::Params p)
+void LLScreenChannel::addToast(const LLToast::Params& p)
{
bool store_toast = false, show_toast = false;
@@ -381,7 +381,7 @@ void LLScreenChannel::showToastsBottom()
if(it != mToastList.rbegin())
{
bottom = (*(it-1)).toast->getRect().mTop;
- toast_margin = gSavedSettings.getS32("ToastMargin");
+ toast_margin = gSavedSettings.getS32("ToastGap");
}
toast_rect = (*it).toast->getRect();
@@ -394,7 +394,7 @@ void LLScreenChannel::showToastsBottom()
{
if( it != mToastList.rend()-1)
{
- stop_showing_toasts = ((*it).toast->getRect().mTop + gSavedSettings.getS32("OverflowToastHeight") + gSavedSettings.getS32("ToastMargin")) > getRect().mTop;
+ stop_showing_toasts = ((*it).toast->getRect().mTop + gSavedSettings.getS32("OverflowToastHeight") + gSavedSettings.getS32("ToastGap")) > getRect().mTop;
}
}
@@ -412,7 +412,7 @@ void LLScreenChannel::showToastsBottom()
(*it).toast->stopTimer();
mHiddenToastsNum++;
}
- createOverflowToast(bottom, gSavedSettings.getS32("NotificationToastTime"));
+ createOverflowToast(bottom, gSavedSettings.getS32("NotificationTipToastLifeTime"));
}
}
@@ -426,7 +426,7 @@ void LLScreenChannel::showToastsCentre()
for(it = mToastList.rbegin(); it != mToastList.rend(); ++it)
{
toast_rect = (*it).toast->getRect();
- toast_rect.setLeftTopAndSize(getRect().mLeft - toast_rect.getWidth() / 2, bottom + toast_rect.getHeight() / 2 + gSavedSettings.getS32("ToastMargin"), toast_rect.getWidth() ,toast_rect.getHeight());
+ toast_rect.setLeftTopAndSize(getRect().mLeft - toast_rect.getWidth() / 2, bottom + toast_rect.getHeight() / 2 + gSavedSettings.getS32("ToastGap"), toast_rect.getWidth() ,toast_rect.getHeight());
(*it).toast->setRect(toast_rect);
(*it).toast->setVisible(TRUE);
@@ -443,13 +443,13 @@ void LLScreenChannel::createOverflowToast(S32 bottom, F32 timer)
{
LLRect toast_rect;
LLToast::Params p;
- p.timer_period = timer;
+ p.lifetime_secs = timer;
mOverflowToastPanel = new LLToast(p);
if(!mOverflowToastPanel)
return;
- mOverflowToastPanel->setOnFadeCallback(boost::bind(&LLScreenChannel::onOverflowToastHide, this));
+ mOverflowToastPanel->setOnFadeCallback(boost::bind(&LLScreenChannel::closeOverflowToastPanel, this));
LLTextBox* text_box = mOverflowToastPanel->getChild<LLTextBox>("toast_text");
LLIconCtrl* icon = mOverflowToastPanel->getChild<LLIconCtrl>("icon");
@@ -465,7 +465,7 @@ void LLScreenChannel::createOverflowToast(S32 bottom, F32 timer)
toast_rect = mOverflowToastPanel->getRect();
mOverflowToastPanel->reshape(getRect().getWidth(), toast_rect.getHeight(), true);
- toast_rect.setLeftTopAndSize(getRect().mLeft, bottom + toast_rect.getHeight()+gSavedSettings.getS32("ToastMargin"), getRect().getWidth(), toast_rect.getHeight());
+ toast_rect.setLeftTopAndSize(getRect().mLeft, bottom + toast_rect.getHeight()+gSavedSettings.getS32("ToastGap"), getRect().getWidth(), toast_rect.getHeight());
mOverflowToastPanel->setRect(toast_rect);
text_box->setValue(text);
@@ -514,11 +514,11 @@ void LLScreenChannel::closeOverflowToastPanel()
}
//--------------------------------------------------------------------------
-void LLScreenChannel::createStartUpToast(S32 notif_num, S32 bottom, F32 timer)
+void LLScreenChannel::createStartUpToast(S32 notif_num, F32 timer)
{
LLRect toast_rect;
LLToast::Params p;
- p.timer_period = timer;
+ p.lifetime_secs = timer;
mStartUpToastPanel = new LLToast(p);
if(!mStartUpToastPanel)
@@ -545,13 +545,15 @@ void LLScreenChannel::createStartUpToast(S32 notif_num, S32 bottom, F32 timer)
toast_rect = mStartUpToastPanel->getRect();
mStartUpToastPanel->reshape(getRect().getWidth(), toast_rect.getHeight(), true);
- toast_rect.setLeftTopAndSize(getRect().mLeft, bottom + toast_rect.getHeight()+gSavedSettings.getS32("ToastMargin"), getRect().getWidth(), toast_rect.getHeight());
+ toast_rect.setLeftTopAndSize(0, toast_rect.getHeight()+gSavedSettings.getS32("ToastGap"), getRect().getWidth(), toast_rect.getHeight());
mStartUpToastPanel->setRect(toast_rect);
text_box->setValue(text);
text_box->setVisible(TRUE);
icon->setVisible(TRUE);
+ addChild(mStartUpToastPanel);
+
mStartUpToastPanel->setVisible(TRUE);
}
@@ -572,7 +574,7 @@ void LLScreenChannel::closeStartUpToast()
{
if(mStartUpToastPanel != NULL)
{
- mStartUpToastPanel->closeFloater();
+ mStartUpToastPanel->setVisible(FALSE);
mStartUpToastPanel = NULL;
}
}
@@ -703,7 +705,7 @@ void LLScreenChannel::updateShowToastsState()
LLRect this_rect = getRect();
if(floater->getVisible() && floater->isDocked())
{
- channel_bottom += (floater->getRect().getHeight() + gSavedSettings.getS32("ToastMargin"));
+ channel_bottom += (floater->getRect().getHeight() + gSavedSettings.getS32("ToastGap"));
}
if(channel_bottom != this_rect.mBottom)
diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h
index 459c28ac7c..987bc4b596 100644
--- a/indra/newview/llscreenchannel.h
+++ b/indra/newview/llscreenchannel.h
@@ -158,7 +158,7 @@ public:
// Operating with toasts
// add a toast to a channel
- void addToast(LLToast::Params p);
+ void addToast(const LLToast::Params& p);
// kill or modify a toast by its ID
void killToastByNotificationID(LLUUID id);
void modifyToastByNotificationID(LLUUID id, LLPanel* panel);
@@ -256,7 +256,7 @@ private:
void createOverflowToast(S32 bottom, F32 timer);
// create the StartUp Toast
- void createStartUpToast(S32 notif_num, S32 bottom, F32 timer);
+ void createStartUpToast(S32 notif_num, F32 timer);
// Channel's flags
static bool mWasStartUpToastShown;
diff --git a/indra/newview/llsearchcombobox.cpp b/indra/newview/llsearchcombobox.cpp
index 5123d862ce..f95671685b 100644
--- a/indra/newview/llsearchcombobox.cpp
+++ b/indra/newview/llsearchcombobox.cpp
@@ -85,11 +85,6 @@ LLSearchComboBox::LLSearchComboBox(const Params&p)
setSelectionCallback(boost::bind(&LLSearchComboBox::onSelectionCommit, this));
setPrearrangeCallback(boost::bind(&LLSearchComboBox::onSearchPrearrange, this, _2));
mSearchButton->setCommitCallback(boost::bind(&LLSearchComboBox::onTextCommit, this, _2));
-
- // set tooltip here for now since we don't want to parse /en/widgets
- std::string tool_tip = LLTrans::getString("Search");
- getChild<LLView>("child1")->setToolTip(tool_tip);
- getChild<LLView>("child3")->setToolTip(tool_tip);
}
void LLSearchComboBox::rebuildSearchHistory(const std::string& filter)
diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp
index ff95f8adce..a11ee05532 100644
--- a/indra/newview/llsidetray.cpp
+++ b/indra/newview/llsidetray.cpp
@@ -111,12 +111,72 @@ bool LLSideTray::instanceCreated ()
return sInstance!=0;
}
-LLSideTrayTab::LLSideTrayTab(const Params& params):mMainPanel(0)
+//////////////////////////////////////////////////////////////////////////////
+// LLSideTrayTab
+// Represents a single tab in the side tray, only used by LLSideTray
+//////////////////////////////////////////////////////////////////////////////
+
+class LLSideTrayTab: public LLPanel
{
- mImagePath = params.image_path;
- mTabTitle = params.tab_title;
- mDescription = params.description;
+ friend class LLUICtrlFactory;
+ friend class LLSideTray;
+public:
+
+ struct Params
+ : public LLInitParam::Block<Params, LLPanel::Params>
+ {
+ // image name
+ Optional<std::string> image;
+ Optional<std::string> image_selected;
+ Optional<std::string> tab_title;
+ Optional<std::string> description;
+ Params()
+ : image("image"),
+ image_selected("image_selected"),
+ tab_title("tab_title","no title"),
+ description("description","no description")
+ {};
+ };
+protected:
+ LLSideTrayTab(const Params& params);
+
+
+public:
+ virtual ~LLSideTrayTab();
+
+ /*virtual*/ BOOL postBuild ();
+ /*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 ();
+
+ const std::string& getDescription () const { return mDescription;}
+ const std::string& getTabTitle() const { return mTabTitle;}
+
+ void draw();
+
+ void onOpen (const LLSD& key);
+
+private:
+ std::string mTabTitle;
+ std::string mImage;
+ std::string mImageSelected;
+ std::string mDescription;
+
+ LLView* mMainPanel;
+};
+LLSideTrayTab::LLSideTrayTab(const Params& p)
+: LLPanel(),
+ mTabTitle(p.tab_title),
+ mImage(p.image),
+ mImageSelected(p.image_selected),
+ mDescription(p.description),
+ mMainPanel(NULL)
+{
// Necessary for focus movement among child controls
setFocusRoot(TRUE);
}
@@ -144,12 +204,6 @@ BOOL LLSideTrayTab::postBuild()
title_panel->getChild<LLTextBox>(TAB_PANEL_CAPTION_TITLE_BOX)->setValue(mTabTitle);
- static LLUIColor default_background_color = LLUIColorTable::instance().getColor("FloaterDefaultBackgroundColor");
- static LLUIColor focus_background_color = LLUIColorTable::instance().getColor("FloaterFocusBackgroundColor");
-
- setTransparentColor(default_background_color);
- setBackgroundColor(focus_background_color);
-
return true;
}
@@ -209,11 +263,6 @@ void LLSideTrayTab::reshape (S32 width, S32 height, BOOL called_from_parent )
void LLSideTrayTab::draw()
{
LLPanel::draw();
-
- //border
- gl_rect_2d(0,0,getRect().getWidth() - 1,getRect().getHeight() - 1,LLColor4::black,false);
-
-
}
void LLSideTrayTab::onOpen (const LLSD& key)
@@ -232,6 +281,18 @@ LLSideTrayTab* LLSideTrayTab::createInstance ()
return tab;
}
+//////////////////////////////////////////////////////////////////////////////
+// LLSideTray
+//////////////////////////////////////////////////////////////////////////////
+
+LLSideTray::Params::Params()
+: collapsed("collapsed",false),
+ tab_btn_image_normal("tab_btn_image","sidebar_tab_left.tga"),
+ tab_btn_image_selected("tab_btn_image_selected","button_enabled_selected_32x128.tga"),
+ default_button_width("tab_btn_width",32),
+ default_button_height("tab_btn_height",32),
+ default_button_margin("tab_btn_margin",0)
+{}
//virtual
LLSideTray::LLSideTray(Params& params)
@@ -266,35 +327,6 @@ BOOL LLSideTray::postBuild()
setMouseOpaque(false);
return true;
}
-
-/**
- * add new panel to tab with tab_name name
- * @param tab_name - name of sidebar tab to add new panel
- * @param panel - pointer to panel
- */
-bool LLSideTray::addPanel ( const std::string& tab_name
- ,LLPanel* panel )
-{
- return false;
-}
-/**
- * Add new tab to side bar
- * @param tab_name - name of the new tab
- * @param image - image for new sidebar button
- * @param title - title for new tab
- */
-bool LLSideTray::addTab ( const std::string& tab_name
- ,const std::string& image
- ,const std::string& title)
-{
- LLSideTrayTab::Params params;
- params.image_path = image;
- params.tab_title = title;
- LLSideTrayTab* tab = LLUICtrlFactory::create<LLSideTrayTab> (params);
- addChild(tab,1);
- return true;
-}
-
LLSideTrayTab* LLSideTray::getTab(const std::string& name)
{
@@ -302,15 +334,19 @@ LLSideTrayTab* LLSideTray::getTab(const std::string& name)
}
-
-void LLSideTray::toggleTabButton (LLSideTrayTab* tab)
+void LLSideTray::toggleTabButton(LLSideTrayTab* tab)
{
if(tab == NULL)
return;
- string name = tab->getName();
- std::map<std::string,LLButton*>::iterator tIt = mTabButtons.find(name);
- if(tIt!=mTabButtons.end())
- tIt->second->setToggleState(!tIt->second->getToggleState());
+ std::string name = tab->getName();
+ std::map<std::string,LLButton*>::iterator it = mTabButtons.find(name);
+ if(it != mTabButtons.end())
+ {
+ LLButton* btn = it->second;
+ bool new_state = !btn->getToggleState();
+ btn->setToggleState(new_state);
+ btn->setImageOverlay( new_state ? tab->mImageSelected : tab->mImage );
+ }
}
bool LLSideTray::selectTabByIndex(size_t index)
@@ -318,9 +354,7 @@ bool LLSideTray::selectTabByIndex(size_t index)
if(index>=mTabs.size())
return false;
- LLSideTrayTab* sidebar_tab = dynamic_cast<LLSideTrayTab*>(mTabs[index]);
- if(sidebar_tab == NULL)
- return false;
+ LLSideTrayTab* sidebar_tab = mTabs[index];
return selectTabByName(sidebar_tab->getName());
}
@@ -349,9 +383,7 @@ bool LLSideTray::selectTabByName (const std::string& name)
child_vector_const_iter_t child_it;
for ( child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it)
{
- LLSideTrayTab* sidebar_tab = dynamic_cast<LLSideTrayTab*>(*child_it);
- if(sidebar_tab == NULL)
- continue;
+ LLSideTrayTab* sidebar_tab = *child_it;
sidebar_tab->setVisible(sidebar_tab == mActiveTab);
}
return true;
@@ -404,25 +436,28 @@ bool LLSideTray::addChild(LLView* view, S32 tab_group)
void LLSideTray::createButtons ()
{
- //create show/hide button
- mCollapseButton = createButton(EXPANDED_NAME,"",boost::bind(&LLSideTray::onToggleCollapse, this));
-
//create buttons for tabs
child_vector_const_iter_t child_it = mTabs.begin();
- ++child_it;
-
for ( ; child_it != mTabs.end(); ++child_it)
{
- LLSideTrayTab* sidebar_tab = dynamic_cast<LLSideTrayTab*>(*child_it);
- if(sidebar_tab == NULL)
- continue;
+ LLSideTrayTab* sidebar_tab = *child_it;
- string name = sidebar_tab->getName();
+ std::string name = sidebar_tab->getName();
- LLButton* button = createButton("",sidebar_tab->mImagePath,boost::bind(&LLSideTray::onTabButtonClick, this, sidebar_tab->getName()));
- mTabButtons[sidebar_tab->getName()] = button;
+ // The "home" button will open/close the whole panel, this will need to
+ // change if the home screen becomes its own tab.
+ if (name == "sidebar_home")
+ {
+ mCollapseButton = createButton("",sidebar_tab->mImage,
+ boost::bind(&LLSideTray::onToggleCollapse, this));
+ }
+ else
+ {
+ LLButton* button = createButton("",sidebar_tab->mImage,
+ boost::bind(&LLSideTray::onTabButtonClick, this, name));
+ mTabButtons[name] = button;
+ }
}
-
}
void LLSideTray::onTabButtonClick(string name)
@@ -491,9 +526,7 @@ void LLSideTray::arrange ()
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 = dynamic_cast<LLSideTrayTab*>(*child_it);
- if(sidebar_tab == NULL)
- continue;
+ LLSideTrayTab* sidebar_tab = *child_it;
ctrl_rect.setLeftTopAndSize(0,getRect().getHeight()-offset
,sidetray_params.default_button_width
@@ -516,49 +549,69 @@ void LLSideTray::arrange ()
//arrange tabs
for ( child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it)
{
- LLSideTrayTab* sidebar_tab = dynamic_cast<LLSideTrayTab*>(*child_it);
- if(sidebar_tab == NULL)
- continue;
-
+ LLSideTrayTab* sidebar_tab = *child_it;
sidebar_tab->setRect(ctrl_rect);
sidebar_tab->arrange(mMaxBarWidth,getRect().getHeight());
}
}
-void LLSideTray::collapseSideBar ()
+void LLSideTray::collapseSideBar()
{
mCollapsed = true;
- mCollapseButton->setLabel(COLLAPSED_NAME);
+ // Reset all overlay images, because there is no "selected" tab when the
+ // whole side tray is hidden.
+ child_vector_const_iter_t it = mTabs.begin();
+ for ( ; it != mTabs.end(); ++it )
+ {
+ LLSideTrayTab* tab = *it;
+ std::string name = tab->getName();
+ std::map<std::string,LLButton*>::const_iterator btn_it =
+ mTabButtons.find(name);
+ if (btn_it != mTabButtons.end())
+ {
+ LLButton* btn = btn_it->second;
+ btn->setImageOverlay( tab->mImage );
+ }
+ }
+
+ // Home tab doesn't put its button in mTabButtons
+ LLSideTrayTab* home_tab = getTab("sidebar_home");
+ if (home_tab)
+ {
+ mCollapseButton->setImageOverlay( home_tab->mImage );
+ }
mActiveTab->setVisible(FALSE);
reflectCollapseChange();
setFocus( FALSE );
}
-void LLSideTray::expandSideBar ()
+
+void LLSideTray::expandSideBar()
{
mCollapsed = false;
- mCollapseButton->setLabel(EXPANDED_NAME);
+ LLSideTrayTab* home_tab = getTab("sidebar_home");
+ if (home_tab)
+ {
+ mCollapseButton->setImageOverlay( home_tab->mImageSelected );
+ }
LLSD key;//empty
mActiveTab->onOpen(key);
mActiveTab->setVisible(TRUE);
reflectCollapseChange();
-
}
void LLSideTray::highlightFocused()
{
+ /* uncomment in case something change
if(!mActiveTab)
return;
- /* uncomment in case something change
BOOL dependent_has_focus = gFocusMgr.childHasKeyboardFocus(this);
setBackgroundOpaque( dependent_has_focus );
mActiveTab->setBackgroundOpaque( dependent_has_focus );
*/
- mActiveTab->setBackgroundOpaque( true );
-
-
}
+
BOOL LLSideTray::handleScrollWheel(S32 x, S32 y, S32 mask)
{
BOOL ret = LLPanel::handleScrollWheel(x,y,mask);
@@ -576,6 +629,7 @@ BOOL LLSideTray::handleMouseDown (S32 x, S32 y, MASK mask)
setFocus(true);
return ret;
}
+
void LLSideTray::reshape (S32 width, S32 height, BOOL called_from_parent)
{
@@ -600,9 +654,7 @@ void LLSideTray::reshape (S32 width, S32 height, BOOL called_from_parent)
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 = dynamic_cast<LLSideTrayTab*>(*child_it);
- if(sidebar_tab == NULL)
- continue;
+ LLSideTrayTab* sidebar_tab = *child_it;
ctrl_rect.setLeftTopAndSize(0,getRect().getHeight()-offset
,sidetray_params.default_button_width
@@ -624,9 +676,7 @@ void LLSideTray::reshape (S32 width, S32 height, BOOL called_from_parent)
for ( child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it)
{
- LLSideTrayTab* sidebar_tab = dynamic_cast<LLSideTrayTab*>(*child_it);
- if(sidebar_tab == NULL)
- continue;
+ 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);
@@ -686,7 +736,7 @@ void LLSideTray::resetPanelRect ()
static LLSideTray::Params sidetray_params(LLUICtrlFactory::getDefaultParams<LLSideTray>());
S32 panel_width = sidetray_params.default_button_width;
- panel_width += mCollapsed ? sidetray_params.default_button_margin : mMaxBarWidth;
+ panel_width += mCollapsed ? 0 : mMaxBarWidth;
S32 panel_height = parent_rect.getHeight()-fake_top_offset;
@@ -703,7 +753,7 @@ void LLSideTray::setPanelRect ()
const LLRect& parent_rect = gViewerWindow->getRootView()->getRect();
S32 panel_width = sidetray_params.default_button_width;
- panel_width += mCollapsed ? sidetray_params.default_button_margin : mMaxBarWidth;
+ 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();
diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h
index 6ea6bafac9..b49251ec79 100644
--- a/indra/newview/llsidetray.h
+++ b/indra/newview/llsidetray.h
@@ -36,59 +36,9 @@
#include "llpanel.h"
#include "string"
-class LLSideTray;
+class LLSideTrayTab;
class LLAccordionCtrl;
-class LLSideTrayTab: public LLPanel
-{
- friend class LLUICtrlFactory;
- friend class LLSideTray;
-public:
-
- struct Params
- : public LLInitParam::Block<Params, LLPanel::Params>
- {
- // image name
- Optional<std::string> image_path;
- Optional<std::string> tab_title;
- Optional<std::string> description;
- Params()
- : image_path("image"),
- tab_title("tab_title","no title"),
- description("description","no description")
- {};
- };
-protected:
- LLSideTrayTab(const Params& params);
-
-
-public:
- virtual ~LLSideTrayTab();
-
- /*virtual*/ BOOL postBuild ();
- /*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 ();
-
- const std::string& getDescription () const { return mDescription;}
- const std::string& getTabTitle() const { return mTabTitle;}
-
- void draw();
-
- void onOpen (const LLSD& key);
-
-private:
- std::string mTabTitle;
- std::string mImagePath;
- std::string mDescription;
-
- LLView* mMainPanel;
-};
-
// added inheritance from LLDestroyClass<LLSideTray> to enable Side Tray perform necessary actions
// while disconnecting viewer in LLAppViewer::disconnectViewer().
// LLDestroyClassList::instance().fireCallbacks() calls destroyClass method. See EXT-245.
@@ -112,21 +62,14 @@ public:
Optional<S32> default_button_height;
Optional<S32> default_button_margin;
- Params()
- : collapsed("collapsed",false),
- tab_btn_image_normal("tab_btn_image","sidebar_tab_left.tga"),
- tab_btn_image_selected("tab_btn_image_selected","button_enabled_selected_32x128.tga"),
- default_button_width("tab_btn_width",32),
- default_button_height("tab_btn_height",32),
- default_button_margin("tab_btn_margin",0)
- {};
+ Params();
};
static LLSideTray* getInstance ();
static bool instanceCreated ();
protected:
LLSideTray(Params& params);
- typedef std::vector<LLView*> child_vector_t;
+ typedef std::vector<LLSideTrayTab*> child_vector_t;
typedef child_vector_t::iterator child_vector_iter_t;
typedef child_vector_t::const_iterator child_vector_const_iter_t;
typedef child_vector_t::reverse_iterator child_vector_reverse_iter_t;
@@ -146,23 +89,6 @@ public:
*/
bool selectTabByIndex(size_t index);
- /**
- * add new panel to tab with tab_name name
- * @param tab_name - name of sidebar tab to add new panel
- * @param panel - pointer to panel
- */
- bool addPanel ( const std::string& tab_name
- ,LLPanel* panel );
- /**
- * Add new tab to side bar
- * @param tab_name - name of the new tab
- * @param image - image for new sidebar button
- * @param title - title for new tab
- */
- bool addTab ( const std::string& tab_name
- ,const std::string& image
- ,const std::string& title);
-
/**
* Activate tab with "panel_name" panel
* if no such tab - return NULL, otherwise a pointer to the panel
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 3d0e25a734..43b039f94e 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -83,6 +83,7 @@
#include "v3math.h"
#include "llagent.h"
+#include "llagentpicksinfo.h"
#include "llagentwearables.h"
#include "llagentpilot.h"
#include "llfloateravatarpicker.h"
@@ -2088,7 +2089,7 @@ bool idle_startup()
// reset timers now that we are running "logged in" logic
LLFastTimer::reset();
-
+ LLAgentPicksInfo::getInstance()->requestNumberOfPicks();
return TRUE;
}
diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp
index 6714fe908f..86290e6695 100644
--- a/indra/newview/llsyswellwindow.cpp
+++ b/indra/newview/llsyswellwindow.cpp
@@ -246,6 +246,10 @@ void LLSysWellWindow::toggleWindow()
if(!getVisible() || isMinimized())
{
+ if(mChannel)
+ {
+ mChannel->removeAndStoreAllStorableToasts();
+ }
if(isWindowEmpty())
{
return;
@@ -524,7 +528,7 @@ LLSysWellWindow::RowPanel::~RowPanel()
//---------------------------------------------------------------------------------
void LLSysWellWindow::RowPanel::onClosePanel()
{
- gIMMgr->removeSession(mChiclet->getSessionId());
+ gIMMgr->leaveSession(mChiclet->getSessionId());
// This row panel will be removed from the list in LLSysWellWindow::sessionRemoved().
}
diff --git a/indra/newview/llteleporthistorystorage.cpp b/indra/newview/llteleporthistorystorage.cpp
index a588153ca2..d3bbda1c72 100644
--- a/indra/newview/llteleporthistorystorage.cpp
+++ b/indra/newview/llteleporthistorystorage.cpp
@@ -93,14 +93,12 @@ void LLTeleportHistoryStorage::onTeleportHistoryChange()
addItem(item.mTitle, item.mGlobalPos);
save();
-
- mHistoryChangedSignal();
}
void LLTeleportHistoryStorage::purgeItems()
{
mItems.clear();
- mHistoryChangedSignal();
+ mHistoryChangedSignal(-1);
}
void LLTeleportHistoryStorage::addItem(const std::string title, const LLVector3d& global_pos)
@@ -116,15 +114,16 @@ bool LLTeleportHistoryStorage::compareByTitleAndGlobalPos(const LLTeleportHistor
void LLTeleportHistoryStorage::addItem(const std::string title, const LLVector3d& global_pos, const LLDate& date)
{
-
LLTeleportHistoryPersistentItem item(title, global_pos, date);
slurl_list_t::iterator item_iter = std::find_if(mItems.begin(), mItems.end(),
boost::bind(&LLTeleportHistoryStorage::compareByTitleAndGlobalPos, this, _1, item));
// If there is such item already, remove it, since new item is more recent
+ S32 removed_index = -1;
if (item_iter != mItems.end())
{
+ removed_index = item_iter - mItems.begin();
mItems.erase(item_iter);
}
@@ -141,9 +140,12 @@ void LLTeleportHistoryStorage::addItem(const std::string title, const LLVector3d
// If second to last item is more recent than last, then resort items
if (item_iter->mDate > item.mDate)
{
+ removed_index = -1;
std::sort(mItems.begin(), mItems.end(), LLSortItemsByDate());
}
}
+
+ mHistoryChangedSignal(removed_index);
}
void LLTeleportHistoryStorage::removeItem(S32 idx)
@@ -211,6 +213,8 @@ void LLTeleportHistoryStorage::load()
file.close();
std::sort(mItems.begin(), mItems.end(), LLSortItemsByDate());
+
+ mHistoryChangedSignal(-1);
}
void LLTeleportHistoryStorage::dump() const
@@ -234,7 +238,6 @@ boost::signals2::connection LLTeleportHistoryStorage::setHistoryChangedCallback(
}
void LLTeleportHistoryStorage::goToItem(S32 idx)
-
{
// Validate specified index.
if (idx < 0 || idx >= (S32)mItems.size())
diff --git a/indra/newview/llteleporthistorystorage.h b/indra/newview/llteleporthistorystorage.h
index f67c4e2fb9..2eaa94f2ed 100644
--- a/indra/newview/llteleporthistorystorage.h
+++ b/indra/newview/llteleporthistorystorage.h
@@ -80,8 +80,9 @@ public:
typedef std::vector<LLTeleportHistoryPersistentItem> slurl_list_t;
- typedef boost::function<void()> history_callback_t;
- typedef boost::signals2::signal<void()> history_signal_t;
+ // removed_index is index of removed item, which replaced by more recent
+ typedef boost::function<void(S32 removed_index)> history_callback_t;
+ typedef boost::signals2::signal<void(S32 removed_index)> history_signal_t;
LLTeleportHistoryStorage();
~LLTeleportHistoryStorage();
diff --git a/indra/newview/lltexglobalcolor.cpp b/indra/newview/lltexglobalcolor.cpp
index d0bb9e1cf1..595b24ad47 100644
--- a/indra/newview/lltexglobalcolor.cpp
+++ b/indra/newview/lltexglobalcolor.cpp
@@ -101,7 +101,7 @@ LLTexParamGlobalColor::LLTexParamGlobalColor(LLTexGlobalColor* tex_global_color)
{
}
-/*virtual*/ LLViewerVisualParam * LLTexParamGlobalColor::cloneParam(LLWearable* wearable) const
+/*virtual*/ LLViewerVisualParam* LLTexParamGlobalColor::cloneParam(LLWearable* wearable) const
{
LLTexParamGlobalColor *new_param = new LLTexParamGlobalColor(mTexGlobalColor);
*new_param = *this;
diff --git a/indra/newview/lltexglobalcolor.h b/indra/newview/lltexglobalcolor.h
index f0d22d317c..1e6754133f 100644
--- a/indra/newview/lltexglobalcolor.h
+++ b/indra/newview/lltexglobalcolor.h
@@ -78,7 +78,7 @@ class LLTexParamGlobalColor : public LLTexLayerParamColor
{
public:
LLTexParamGlobalColor(LLTexGlobalColor *tex_color);
- /*virtual*/ LLViewerVisualParam * cloneParam(LLWearable* wearable) const;
+ /*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable) const;
protected:
/*virtual*/ void onGlobalColorChanged(bool set_by_user);
private:
diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp
index de8458c0fa..17547cae39 100644
--- a/indra/newview/lltexlayer.cpp
+++ b/indra/newview/lltexlayer.cpp
@@ -1078,13 +1078,13 @@ BOOL LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearab
mInfo = info;
//mID = info->mID; // No ID
- mParamColorList.reserve(mInfo->mParamColorInfoList.size());
+ mParamColorList.reserve(mInfo->mParamColorInfoList.size());
for (param_color_info_list_t::const_iterator iter = mInfo->mParamColorInfoList.begin();
iter != mInfo->mParamColorInfoList.end();
iter++)
{
LLTexLayerParamColor* param_color;
- if (!wearable)
+ if (!wearable)
{
param_color = new LLTexLayerParamColor(this);
if (!param_color->setInfo(*iter, TRUE))
@@ -1105,7 +1105,7 @@ BOOL LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearab
mParamColorList.push_back( param_color );
}
- mParamAlphaList.reserve(mInfo->mParamAlphaInfoList.size());
+ mParamAlphaList.reserve(mInfo->mParamAlphaInfoList.size());
for (param_alpha_info_list_t::const_iterator iter = mInfo->mParamAlphaInfoList.begin();
iter != mInfo->mParamAlphaInfoList.end();
iter++)
@@ -1893,13 +1893,13 @@ LLTexLayer* LLTexLayerTemplate::getLayer(U32 i)
//-----------------------------------------------------------------------------
// finds a specific layer based on a passed in name
//-----------------------------------------------------------------------------
-LLTexLayerInterface* LLTexLayerSet::findLayerByName(std::string name)
+LLTexLayerInterface* LLTexLayerSet::findLayerByName(const std::string& name)
{
for( layer_list_t::iterator iter = mLayerList.begin(); iter != mLayerList.end(); iter++ )
{
LLTexLayerInterface* layer = *iter;
- if (layer->getName().compare(name) == 0)
+ if (layer->getName() == name)
{
return layer;
}
@@ -1908,7 +1908,7 @@ LLTexLayerInterface* LLTexLayerSet::findLayerByName(std::string name)
{
LLTexLayerInterface* layer = *iter;
- if (layer->getName().compare(name) == 0)
+ if (layer->getName() == name)
{
return layer;
}
diff --git a/indra/newview/lltexlayer.h b/indra/newview/lltexlayer.h
index 2269c3c9a5..e4a6e82ba5 100644
--- a/indra/newview/lltexlayer.h
+++ b/indra/newview/lltexlayer.h
@@ -60,6 +60,11 @@ typedef std::vector<LLTexLayerParamAlpha *> param_alpha_list_t;
typedef std::vector<LLTexLayerParamColorInfo *> param_color_info_list_t;
typedef std::vector<LLTexLayerParamAlphaInfo *> param_alpha_info_list_t;
+
+//-----------------------------------------------------------------------------
+// LLTexLayerInterface
+// Interface class to generalize functionality shared by LLTexLayer and LLTexLayerTemplate.
+
class LLTexLayerInterface
{
public:
@@ -256,7 +261,7 @@ public:
void deleteCaches();
void gatherMorphMaskAlpha(U8 *data, S32 width, S32 height);
void applyMorphMask(U8* tex_data, S32 width, S32 height, S32 num_components);
- LLTexLayerInterface* findLayerByName(std::string name);
+ LLTexLayerInterface* findLayerByName(const std::string& name);
void cloneTemplates(LLLocalTextureObject *lto, LLVOAvatarDefines::ETextureIndex tex_index, LLWearable* wearable);
LLVOAvatarSelf* getAvatar() const { return mAvatar; }
diff --git a/indra/newview/lltexlayerparams.cpp b/indra/newview/lltexlayerparams.cpp
index 9cd73c4656..e1643af71d 100644
--- a/indra/newview/lltexlayerparams.cpp
+++ b/indra/newview/lltexlayerparams.cpp
@@ -42,7 +42,8 @@
//-----------------------------------------------------------------------------
LLTexLayerParam::LLTexLayerParam(LLTexLayerInterface *layer) :
mTexLayer(layer),
- mAvatar(NULL)
+ mAvatar(NULL),
+ mIsWearableParam(TRUE)
{
if (mTexLayer != NULL)
{
@@ -55,7 +56,8 @@ LLTexLayerParam::LLTexLayerParam(LLTexLayerInterface *layer) :
}
LLTexLayerParam::LLTexLayerParam(LLVOAvatar *avatar) :
- mTexLayer(NULL)
+ mTexLayer(NULL),
+ mIsWearableParam(FALSE)
{
mAvatar = avatar;
}
@@ -140,7 +142,7 @@ LLTexLayerParamAlpha::~LLTexLayerParamAlpha()
sInstances.remove(this);
}
-/*virtual*/ LLViewerVisualParam * LLTexLayerParamAlpha::cloneParam(LLWearable* wearable) const
+/*virtual*/ LLViewerVisualParam* LLTexLayerParamAlpha::cloneParam(LLWearable* wearable) const
{
LLTexLayerParamAlpha *new_param = new LLTexLayerParamAlpha(mTexLayer);
*new_param = *this;
@@ -175,16 +177,15 @@ void LLTexLayerParamAlpha::setWeight(F32 weight, BOOL set_by_user)
{
mCurWeight = new_weight;
- LLVOAvatar* avatar = mTexLayer->getTexLayerSet()->getAvatar();
- if (avatar->getSex() & getSex())
+ if ((mAvatar->getSex() & getSex()) && !mIsWearableParam) // only trigger a baked texture update if we're changing a wearable's visual param.
{
if (gAgent.cameraCustomizeAvatar())
{
set_by_user = FALSE;
}
- avatar->invalidateComposite(mTexLayer->getTexLayerSet(), set_by_user);
+ mAvatar->invalidateComposite(mTexLayer->getTexLayerSet(), set_by_user);
mTexLayer->invalidateMorphMasks();
- avatar->updateMeshTextures();
+ mAvatar->updateMeshTextures();
}
}
}
@@ -409,7 +410,7 @@ LLTexLayerParamColor::~LLTexLayerParamColor()
{
}
-/*virtual*/ LLViewerVisualParam * LLTexLayerParamColor::cloneParam(LLWearable* wearable) const
+/*virtual*/ LLViewerVisualParam* LLTexLayerParamColor::cloneParam(LLWearable* wearable) const
{
LLTexLayerParamColor *new_param = new LLTexLayerParamColor(mTexLayer);
*new_param = *this;
@@ -467,14 +468,16 @@ void LLTexLayerParamColor::setWeight(F32 weight, BOOL set_by_user)
return;
}
- if (mAvatar->getSex() & getSex())
+ if ((mAvatar->getSex() & getSex()) && !mIsWearableParam) // only trigger a baked texture update if we're changing a wearable's visual param.
{
onGlobalColorChanged(set_by_user);
if (mTexLayer)
{
mAvatar->invalidateComposite(mTexLayer->getTexLayerSet(), set_by_user);
+ mAvatar->updateMeshTextures();
}
}
+
// llinfos << "param " << mName << " = " << new_weight << llendl;
}
}
diff --git a/indra/newview/lltexlayerparams.h b/indra/newview/lltexlayerparams.h
index 589bd41054..dcb108bbf6 100644
--- a/indra/newview/lltexlayerparams.h
+++ b/indra/newview/lltexlayerparams.h
@@ -43,12 +43,13 @@ class LLTexLayerParam : public LLViewerVisualParam
public:
LLTexLayerParam(LLTexLayerInterface *layer);
LLTexLayerParam(LLVOAvatar *avatar);
- /* Virtual */ BOOL setInfo(LLViewerVisualParamInfo *info, BOOL add_to_avatar );
- /*virtual*/ LLViewerVisualParam * cloneParam(LLWearable* wearable) const = 0;
+ /*virtual*/ BOOL setInfo(LLViewerVisualParamInfo *info, BOOL add_to_avatar );
+ /*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable) const = 0;
protected:
LLTexLayerInterface* mTexLayer;
LLVOAvatar* mAvatar;
+ BOOL mIsWearableParam;
};
//-----------------------------------------------------------------------------
@@ -61,7 +62,7 @@ public:
LLTexLayerParamAlpha( LLVOAvatar* avatar );
/*virtual*/ ~LLTexLayerParamAlpha();
- /*virtual*/ LLViewerVisualParam * cloneParam(LLWearable* wearable = NULL) const;
+ /*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable = NULL) const;
// LLVisualParam Virtual functions
///*virtual*/ BOOL parseData(LLXmlTreeNode* node);
@@ -138,7 +139,7 @@ public:
LLTexLayerParamColor( LLVOAvatar* avatar );
/* virtual */ ~LLTexLayerParamColor();
- /*virtual*/ LLViewerVisualParam * cloneParam(LLWearable* wearable = NULL) const;
+ /*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable = NULL) const;
// LLVisualParam Virtual functions
///*virtual*/ BOOL parseData(LLXmlTreeNode* node);
diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp
index 84931e4d2d..eba43d76a6 100644
--- a/indra/newview/lltoast.cpp
+++ b/indra/newview/lltoast.cpp
@@ -41,17 +41,29 @@
using namespace LLNotificationsUI;
//--------------------------------------------------------------------------
-LLToast::LLToast(LLToast::Params p) : LLModalDialog(LLSD(), p.is_modal),
- mPanel(p.panel),
- mTimerValue(p.timer_period),
- mNotificationID(p.notif_id),
- mSessionID(p.session_id),
- mCanFade(p.can_fade),
- mCanBeStored(p.can_be_stored),
- mHideBtnEnabled(p.enable_hide_btn),
- mHideBtn(NULL),
- mNotification(p.notification),
- mHideBtnPressed(false)
+LLToast::Params::Params()
+: can_fade("can_fade", true),
+ can_be_stored("can_be_stored", true),
+ is_modal("is_modal", false),
+ is_tip("is_tip", false),
+ enable_hide_btn("enable_hide_btn", true),
+ force_show("force_show", false),
+ force_store("force_store", false),
+ lifetime_secs("lifetime_secs", gSavedSettings.getS32("NotificationToastLifeTime"))
+{};
+
+LLToast::LLToast(const LLToast::Params& p)
+: LLModalDialog(LLSD(), p.is_modal),
+ mPanel(p.panel),
+ mToastLifetime(p.lifetime_secs),
+ mNotificationID(p.notif_id),
+ mSessionID(p.session_id),
+ mCanFade(p.can_fade),
+ mCanBeStored(p.can_be_stored),
+ mHideBtnEnabled(p.enable_hide_btn),
+ mHideBtn(NULL),
+ mNotification(p.notification),
+ mHideBtnPressed(false)
{
LLUICtrlFactory::getInstance()->buildFloater(this, "panel_toast.xml", NULL);
@@ -67,11 +79,11 @@ LLToast::LLToast(LLToast::Params p) : LLModalDialog(LLSD(), p.is_modal),
}
// init callbacks if present
- if(!p.on_delete_toast.empty())
- mOnDeleteToastSignal.connect(p.on_delete_toast);
+ if(!p.on_delete_toast().empty())
+ mOnDeleteToastSignal.connect(p.on_delete_toast());
- if(!p.on_mouse_enter.empty())
- mOnMouseEnterSignal.connect(p.on_mouse_enter);
+ if(!p.on_mouse_enter().empty())
+ mOnMouseEnterSignal.connect(p.on_mouse_enter());
}
//--------------------------------------------------------------------------
@@ -103,22 +115,22 @@ void LLToast::setAndStartTimer(F32 period)
{
if(mCanFade)
{
- mTimerValue = period;
+ mToastLifetime = period;
mTimer.start();
}
}
//--------------------------------------------------------------------------
-bool LLToast::timerHasExpired()
+bool LLToast::lifetimeHasExpired()
{
if (mTimer.getStarted())
{
F32 elapsed_time = mTimer.getElapsedTimeF32();
- if (elapsed_time > gSavedSettings.getS32("ToastOpaqueTime"))
+ if ((mToastLifetime - elapsed_time) <= gSavedSettings.getS32("ToastOpaqueTime"))
{
setBackgroundOpaque(FALSE);
}
- if (elapsed_time > mTimerValue)
+ if (elapsed_time > mToastLifetime)
{
return true;
}
@@ -183,7 +195,7 @@ void LLToast::insertPanel(LLPanel* panel)
//--------------------------------------------------------------------------
void LLToast::draw()
{
- if(timerHasExpired())
+ if(lifetimeHasExpired())
{
tick();
}
diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h
index 29c231a01d..1826c13ebc 100644
--- a/indra/newview/lltoast.h
+++ b/indra/newview/lltoast.h
@@ -57,37 +57,28 @@ public:
typedef boost::function<void (LLToast* toast)> toast_callback_t;
typedef boost::signals2::signal<void (LLToast* toast)> toast_signal_t;
- struct Params
+ struct Params : public LLInitParam::Block<Params>
{
- LLPanel* panel;
- LLUUID notif_id; //notification ID
- LLUUID session_id; //im session ID
- LLNotificationPtr notification;
- F32 timer_period;
- toast_callback_t on_delete_toast;
- toast_callback_t on_mouse_enter;
- bool can_fade;
- bool can_be_stored;
- bool enable_hide_btn;
- bool is_modal;
- bool is_tip;
- bool force_show;
- bool force_store;
-
- Params() : can_fade(true),
- can_be_stored(true),
- is_modal(false),
- is_tip(false),
- enable_hide_btn(true),
- force_show(false),
- force_store(false),
- panel(NULL),
- timer_period(gSavedSettings.getS32("NotificationToastTime"))
-
- {};
+ Mandatory<LLPanel*> panel;
+ Optional<LLUUID> notif_id, //notification ID
+ session_id; //im session ID
+ Optional<LLNotificationPtr> notification;
+ Optional<F32> lifetime_secs;
+ Optional<toast_callback_t> on_delete_toast,
+ on_mouse_enter;
+ Optional<bool> can_fade,
+ can_be_stored,
+ enable_hide_btn,
+ is_modal,
+ is_tip,
+ force_show,
+ force_store;
+
+
+ Params();
};
- LLToast(LLToast::Params p);
+ LLToast(const LLToast::Params& p);
virtual ~LLToast();
BOOL postBuild();
@@ -153,7 +144,7 @@ public:
private:
// check timer
- bool timerHasExpired();
+ bool lifetimeHasExpired();
// on timer finished function
void tick();
@@ -161,8 +152,9 @@ private:
LLUUID mSessionID;
LLNotificationPtr mNotification;
+ // timer counts a lifetime of a toast
LLTimer mTimer;
- F32 mTimerValue;
+ F32 mToastLifetime; // in seconds
LLPanel* mPanel;
LLButton* mHideBtn;
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index bc0a654eb9..9a63f07a7e 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -1905,7 +1905,7 @@ BOOL LLToolDragAndDrop::isInventoryGroupGiveAcceptable(LLInventoryItem* item)
switch(item->getType())
{
case LLAssetType::AT_OBJECT:
- if(my_avatar->isWearingAttachment(item->getUUID(), TRUE))
+ if(my_avatar->isWearingAttachment(item->getUUID()))
{
acceptable = FALSE;
}
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index b035fd53fd..22ed1ec219 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -48,6 +48,7 @@
#include "lltooltip.h"
#include "llhudeffecttrail.h"
#include "llhudmanager.h"
+#include "llkeyboard.h"
#include "llmediaentry.h"
#include "llmenugl.h"
#include "llmutelist.h"
@@ -1048,7 +1049,7 @@ bool LLToolPie::handleMediaClick(const LLPickInfo& pick)
}
else
{
- media_impl->mouseDown(pick.mUVCoords);
+ media_impl->mouseDown(pick.mUVCoords, gKeyboard->currentMask(TRUE));
mMediaMouseCaptureID = mep->getMediaID();
setMouseCapture(TRUE); // This object will send a mouse-up to the media when it loses capture.
}
@@ -1098,7 +1099,7 @@ bool LLToolPie::handleMediaHover(const LLPickInfo& pick)
// If this is the focused media face, send mouse move events.
if (LLViewerMediaFocus::getInstance()->isFocusedOnFace(objectp, pick.mObjectFace))
{
- media_impl->mouseMove(pick.mUVCoords);
+ media_impl->mouseMove(pick.mUVCoords, gKeyboard->currentMask(TRUE));
gViewerWindow->setCursor(media_impl->getLastSetCursor());
}
else
diff --git a/indra/newview/lltransientdockablefloater.cpp b/indra/newview/lltransientdockablefloater.cpp
new file mode 100644
index 0000000000..7e4d4988d1
--- /dev/null
+++ b/indra/newview/lltransientdockablefloater.cpp
@@ -0,0 +1,96 @@
+/**
+ * @file lltransientdockablefloater.cpp
+ * @brief Creates a panel of a specific kind for a toast
+ *
+ * $LicenseInfo:firstyear=2000&license=viewergpl$
+ *
+ * Copyright (c) 2000-2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "lltransientfloatermgr.h"
+#include "lltransientdockablefloater.h"
+#include "llfloaterreg.h"
+
+
+LLTransientDockableFloater::LLTransientDockableFloater(LLDockControl* dockControl, bool uniqueDocking,
+ const LLSD& key, const Params& params) :
+ LLDockableFloater(dockControl, uniqueDocking, key, params)
+{
+ LLTransientFloaterMgr::getInstance()->registerTransientFloater(this);
+}
+
+LLTransientDockableFloater::~LLTransientDockableFloater()
+{
+ LLTransientFloaterMgr::getInstance()->unregisterTransientFloater(this);
+}
+
+void LLTransientDockableFloater::setVisible(BOOL visible)
+{
+ LLView* dock = getDockWidget();
+ if(visible && isDocked())
+ {
+ LLTransientFloaterMgr::getInstance()->addControlView(this);
+ if (dock != NULL)
+ {
+ LLTransientFloaterMgr::getInstance()->addControlView(dock);
+ }
+ }
+ else
+ {
+ LLTransientFloaterMgr::getInstance()->removeControlView(this);
+ if (dock != NULL)
+ {
+ LLTransientFloaterMgr::getInstance()->removeControlView(dock);
+ }
+ }
+
+ LLDockableFloater::setVisible(visible);
+}
+
+void LLTransientDockableFloater::setDocked(bool docked, bool pop_on_undock)
+{
+ LLView* dock = getDockWidget();
+ if(docked)
+ {
+ LLTransientFloaterMgr::getInstance()->addControlView(this);
+ if (dock != NULL)
+ {
+ LLTransientFloaterMgr::getInstance()->addControlView(dock);
+ }
+ }
+ else
+ {
+ LLTransientFloaterMgr::getInstance()->removeControlView(this);
+ if (dock != NULL)
+ {
+ LLTransientFloaterMgr::getInstance()->removeControlView(dock);
+ }
+ }
+
+ LLDockableFloater::setDocked(docked, pop_on_undock);
+}
diff --git a/indra/newview/lltransientdockablefloater.h b/indra/newview/lltransientdockablefloater.h
new file mode 100644
index 0000000000..6e8a3afd22
--- /dev/null
+++ b/indra/newview/lltransientdockablefloater.h
@@ -0,0 +1,57 @@
+/**
+ * @file lltransientdockablefloater.h
+ * @brief Creates a panel of a specific kind for a toast.
+ *
+ * $LicenseInfo:firstyear=2003&license=viewergpl$
+ *
+ * Copyright (c) 2003-2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_TRANSIENTDOCKABLEFLOATER_H
+#define LL_TRANSIENTDOCKABLEFLOATER_H
+
+#include "llerror.h"
+#include "llfloater.h"
+#include "lldockcontrol.h"
+#include "lldockablefloater.h"
+
+/**
+ * Represents floater that can dock and managed by transient floater manager.
+ * Transient floaters should be hidden if user click anywhere except defined view list.
+ */
+class LLTransientDockableFloater : public LLDockableFloater
+{
+public:
+ LOG_CLASS(LLTransientDockableFloater);
+ LLTransientDockableFloater(LLDockControl* dockControl, bool uniqueDocking,
+ const LLSD& key, const Params& params = getDefaultParams());
+ virtual ~LLTransientDockableFloater();
+
+ /*virtual*/ void setVisible(BOOL visible);
+ /* virtual */void setDocked(bool docked, bool pop_on_undock = true);
+};
+
+#endif /* LL_TRANSIENTDOCKABLEFLOATER_H */
diff --git a/indra/newview/lltransientfloatermgr.cpp b/indra/newview/lltransientfloatermgr.cpp
new file mode 100644
index 0000000000..7befb87248
--- /dev/null
+++ b/indra/newview/lltransientfloatermgr.cpp
@@ -0,0 +1,110 @@
+/**
+ * @file lltransientfloatermgr.cpp
+ * @brief LLFocusMgr base class
+ *
+ * $LicenseInfo:firstyear=2002&license=viewergpl$
+ *
+ * Copyright (c) 2002-2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "lltransientfloatermgr.h"
+#include "llfocusmgr.h"
+#include "llrootview.h"
+#include "llviewerwindow.h"
+#include "lldockablefloater.h"
+
+
+LLTransientFloaterMgr::LLTransientFloaterMgr()
+{
+ gViewerWindow->getRootView()->addMouseDownCallback(boost::bind(
+ &LLTransientFloaterMgr::leftMouseClickCallback, this, _1, _2, _3));
+}
+
+void LLTransientFloaterMgr::registerTransientFloater(LLFloater* floater)
+{
+ mTransSet.insert(floater);
+}
+
+void LLTransientFloaterMgr::unregisterTransientFloater(LLFloater* floater)
+{
+ mTransSet.erase(floater);
+}
+
+void LLTransientFloaterMgr::addControlView(LLView* view)
+{
+ mControlsSet.insert(view);
+}
+
+void LLTransientFloaterMgr::removeControlView(LLView* view)
+{
+ // we will still get focus lost callbacks on this view, but that's ok
+ // since we run sanity checking logic every time
+ mControlsSet.erase(view);
+}
+
+void LLTransientFloaterMgr::hideTransientFloaters()
+{
+ for (std::set<LLFloater*>::iterator it = mTransSet.begin(); it
+ != mTransSet.end(); it++)
+ {
+ LLFloater* floater = *it;
+ if (floater->isDocked())
+ {
+ floater->setVisible(FALSE);
+ }
+ }
+}
+
+void LLTransientFloaterMgr::leftMouseClickCallback(S32 x, S32 y,
+ MASK mask)
+{
+ bool hide = true;
+ for (controls_set_t::iterator it = mControlsSet.begin(); it
+ != mControlsSet.end(); it++)
+ {
+ LLView* control_view = *it;
+ if (!control_view->getVisible())
+ {
+ continue;
+ }
+
+ LLRect rect = control_view->calcScreenRect();
+ // if click inside view rect
+ if (rect.pointInRect(x, y))
+ {
+ hide = false;
+ break;
+ }
+ }
+
+ if (hide)
+ {
+ hideTransientFloaters();
+ }
+}
+
diff --git a/indra/newview/lltransientfloatermgr.h b/indra/newview/lltransientfloatermgr.h
new file mode 100644
index 0000000000..cef6e1fe45
--- /dev/null
+++ b/indra/newview/lltransientfloatermgr.h
@@ -0,0 +1,63 @@
+/**
+ * @file lltransientfloatermgr.h
+ * @brief LLFocusMgr base class
+ *
+ * $LicenseInfo:firstyear=2002&license=viewergpl$
+ *
+ * Copyright (c) 2002-2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLTRANSIENTFLOATERMGR_H
+#define LL_LLTRANSIENTFLOATERMGR_H
+
+#include "llui.h"
+#include "llsingleton.h"
+#include "llfloater.h"
+
+
+/**
+ * Provides functionality to hide transient floaters.
+ */
+class LLTransientFloaterMgr: public LLSingleton<LLTransientFloaterMgr>
+{
+public:
+ LLTransientFloaterMgr();
+ void registerTransientFloater(LLFloater* floater);
+ void unregisterTransientFloater(LLFloater* floater);
+ void addControlView(LLView* view);
+ void removeControlView(LLView* view);
+
+private:
+ void hideTransientFloaters();
+ void leftMouseClickCallback(S32 x, S32 y, MASK mask);
+
+private:
+ std::set<LLFloater*> mTransSet;
+ typedef std::set<LLView*> controls_set_t;
+ controls_set_t mControlsSet;
+};
+
+#endif // LL_LLTRANSIENTFLOATERMGR_H
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index 81917ec76e..dace3f875f 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -147,7 +147,6 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("bumps", "floater_bumps.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBump>);
LLFloaterReg::add("camera", "floater_camera.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCamera>);
- LLFloaterReg::add("camera_presets", "floater_camera_presets.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCameraPresets>);
LLFloaterReg::add("chat", "floater_chat_history.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterChat>);
LLFloaterReg::add("nearby_chat", "floater_nearby_chat.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLNearbyChat>);
LLFloaterReg::add("communicate", "floater_chatterbox.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterChatterBox>);
@@ -190,7 +189,6 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("syswell_window", "floater_sys_well.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLSysWellWindow>);
LLFloaterReg::add("notifications_console", "floater_notifications_console.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNotificationConsole>);
- LLFloaterReg::add("nearby_chat", "floater_nearby_chat.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLNearbyChat>);
LLFloaterReg::add("openobject", "floater_openobject.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterOpenObject>);
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 7e88320f49..57a4117d5d 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -657,7 +657,6 @@ void LLViewerInventoryCategory::changeType(LLAssetType::EType new_folder_type)
setPreferredType(new_folder_type);
gInventory.addChangedMask(LLInventoryObserver::LABEL, folder_id);
- gInventory.updateLinkedObjects(folder_id);
}
///----------------------------------------------------------------------------
@@ -990,7 +989,7 @@ const std::string NEW_LSL_NAME = "New Script"; // *TODO:Translate? (probably not
const std::string NEW_NOTECARD_NAME = "New Note"; // *TODO:Translate? (probably not)
const std::string NEW_GESTURE_NAME = "New Gesture"; // *TODO:Translate? (probably not)
-void menu_create_inventory_item(LLFolderView* folder, LLFolderBridge *bridge, const LLSD& userdata)
+void menu_create_inventory_item(LLFolderView* folder, LLFolderBridge *bridge, const LLSD& userdata, const LLUUID& default_parent_uuid)
{
std::string type = userdata.asString();
@@ -1003,15 +1002,22 @@ void menu_create_inventory_item(LLFolderView* folder, LLFolderBridge *bridge, co
a_type = LLAssetType::AT_OUTFIT;
if ("my_otfts" == type)
a_type = LLAssetType::AT_MY_OUTFITS;
- LLUUID category;
+
+ LLUUID parent_id;
if (bridge)
{
- category = gInventory.createNewCategory(bridge->getUUID(), a_type, LLStringUtil::null);
+ parent_id = bridge->getUUID();
+ }
+ else if (default_parent_uuid.notNull())
+ {
+ parent_id = default_parent_uuid;
}
else
{
- category = gInventory.createNewCategory(gInventory.getRootFolderID(), a_type, LLStringUtil::null);
+ parent_id = gInventory.getRootFolderID();
}
+
+ LLUUID category = gInventory.createNewCategory(parent_id, a_type, LLStringUtil::null);
gInventory.notifyObservers();
folder->setSelectionByID(category, TRUE);
}
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h
index f55a695652..d523bf2859 100644
--- a/indra/newview/llviewerinventory.h
+++ b/indra/newview/llviewerinventory.h
@@ -341,6 +341,7 @@ void copy_inventory_from_notecard(const LLUUID& object_id,
void menu_create_inventory_item(LLFolderView* folder,
LLFolderBridge* bridge,
- const LLSD& userdata);
+ const LLSD& userdata,
+ const LLUUID& default_parent_uuid = LLUUID::null);
#endif // LL_LLVIEWERINVENTORY_H
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index ba3d1914a7..464ba4a5b1 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -48,6 +48,7 @@
#include "llevent.h" // LLSimpleListener
#include "llnotifications.h"
#include "lluuid.h"
+#include "llkeyboard.h"
#include <boost/bind.hpp> // for SkinFolder listener
#include <boost/signals2.hpp>
@@ -250,7 +251,7 @@ viewer_media_t LLViewerMedia::updateMediaImpl(LLMediaEntry* media_entry, const s
media_impl->mMediaSource->setSize(media_entry->getWidthPixels(), media_entry->getHeightPixels());
}
- if((was_loaded || media_entry->getAutoPlay()) && !update_from_self)
+ if((was_loaded || (media_entry->getAutoPlay() && gSavedSettings.getBOOL("AutoPlayMedia"))) && !update_from_self)
{
if(!media_entry->getCurrentURL().empty())
{
@@ -273,7 +274,7 @@ viewer_media_t LLViewerMedia::updateMediaImpl(LLMediaEntry* media_entry, const s
media_impl->setHomeURL(media_entry->getHomeURL());
- if(media_entry->getAutoPlay())
+ if(media_entry->getAutoPlay() && gSavedSettings.getBOOL("AutoPlayMedia"))
{
needs_navigate = true;
}
@@ -792,6 +793,7 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type)
media_source->setLoop(mMediaLoop);
media_source->setAutoScale(mMediaAutoScale);
media_source->setBrowserUserAgent(LLViewerMedia::getCurrentUserAgent());
+ media_source->focus(mHasFocus);
mMediaSource = media_source;
return true;
@@ -917,7 +919,7 @@ bool LLViewerMediaImpl::hasFocus() const
}
//////////////////////////////////////////////////////////////////////////////////////////
-void LLViewerMediaImpl::mouseDown(S32 x, S32 y)
+void LLViewerMediaImpl::mouseDown(S32 x, S32 y, MASK mask, S32 button)
{
scaleMouse(&x, &y);
mLastMouseX = x;
@@ -925,12 +927,12 @@ void LLViewerMediaImpl::mouseDown(S32 x, S32 y)
// llinfos << "mouse down (" << x << ", " << y << ")" << llendl;
if (mMediaSource)
{
- mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_DOWN, x, y, 0);
+ mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_DOWN, button, x, y, mask);
}
}
//////////////////////////////////////////////////////////////////////////////////////////
-void LLViewerMediaImpl::mouseUp(S32 x, S32 y)
+void LLViewerMediaImpl::mouseUp(S32 x, S32 y, MASK mask, S32 button)
{
scaleMouse(&x, &y);
mLastMouseX = x;
@@ -938,12 +940,12 @@ void LLViewerMediaImpl::mouseUp(S32 x, S32 y)
// llinfos << "mouse up (" << x << ", " << y << ")" << llendl;
if (mMediaSource)
{
- mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_UP, x, y, 0);
+ mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_UP, button, x, y, mask);
}
}
//////////////////////////////////////////////////////////////////////////////////////////
-void LLViewerMediaImpl::mouseMove(S32 x, S32 y)
+void LLViewerMediaImpl::mouseMove(S32 x, S32 y, MASK mask)
{
scaleMouse(&x, &y);
mLastMouseX = x;
@@ -951,50 +953,53 @@ void LLViewerMediaImpl::mouseMove(S32 x, S32 y)
// llinfos << "mouse move (" << x << ", " << y << ")" << llendl;
if (mMediaSource)
{
- mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_MOVE, x, y, 0);
+ mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_MOVE, 0, x, y, mask);
}
}
//////////////////////////////////////////////////////////////////////////////////////////
-void LLViewerMediaImpl::mouseDown(const LLVector2& texture_coords)
+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()));
+ llround((1.0f - texture_coords.mV[VY]) * mMediaSource->getTextureHeight()),
+ mask, button);
}
}
-void LLViewerMediaImpl::mouseUp(const LLVector2& texture_coords)
+void LLViewerMediaImpl::mouseUp(const LLVector2& texture_coords, MASK mask, S32 button)
{
if(mMediaSource)
{
mouseUp(
llround(texture_coords.mV[VX] * mMediaSource->getTextureWidth()),
- llround((1.0f - texture_coords.mV[VY]) * mMediaSource->getTextureHeight()));
+ llround((1.0f - texture_coords.mV[VY]) * mMediaSource->getTextureHeight()),
+ mask, button);
}
}
-void LLViewerMediaImpl::mouseMove(const LLVector2& texture_coords)
+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()));
+ llround((1.0f - texture_coords.mV[VY]) * mMediaSource->getTextureHeight()),
+ mask);
}
}
//////////////////////////////////////////////////////////////////////////////////////////
-void LLViewerMediaImpl::mouseLeftDoubleClick(S32 x, S32 y)
+void LLViewerMediaImpl::mouseDoubleClick(S32 x, S32 y, MASK mask, S32 button)
{
scaleMouse(&x, &y);
mLastMouseX = x;
mLastMouseY = y;
if (mMediaSource)
{
- mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_DOUBLE_CLICK, x, y, 0);
+ mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_DOUBLE_CLICK, button, x, y, mask);
}
}
@@ -1003,7 +1008,7 @@ void LLViewerMediaImpl::onMouseCaptureLost()
{
if (mMediaSource)
{
- mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_UP, mLastMouseX, mLastMouseY, 0);
+ mMediaSource->mouseEvent(LLPluginClassMedia::MOUSE_EVENT_UP, 0, mLastMouseX, mLastMouseY, 0);
}
}
@@ -1197,7 +1202,33 @@ bool LLViewerMediaImpl::handleKeyHere(KEY key, MASK mask)
if (mMediaSource)
{
- result = mMediaSource->keyEvent(LLPluginClassMedia::KEY_EVENT_DOWN ,key, mask);
+ // FIXME: THIS IS SO WRONG.
+ // Menu keys should be handled by the menu system and not passed to UI elements, but this is how LLTextEditor and LLLineEditor do it...
+ if( MASK_CONTROL & mask )
+ {
+ if( 'C' == key )
+ {
+ mMediaSource->copy();
+ result = true;
+ }
+ else
+ if( 'V' == key )
+ {
+ mMediaSource->paste();
+ result = true;
+ }
+ else
+ if( 'X' == key )
+ {
+ mMediaSource->cut();
+ result = true;
+ }
+ }
+
+ if(!result)
+ {
+ result = mMediaSource->keyEvent(LLPluginClassMedia::KEY_EVENT_DOWN ,key, mask);
+ }
}
return result;
@@ -1210,7 +1241,12 @@ bool LLViewerMediaImpl::handleUnicodeCharHere(llwchar uni_char)
if (mMediaSource)
{
- mMediaSource->textInput(wstring_to_utf8str(LLWString(1, uni_char)));
+ // only accept 'printable' characters, sigh...
+ if (uni_char >= 32 // discard 'control' characters
+ && uni_char != 127) // SDL thinks this is 'delete' - yuck.
+ {
+ mMediaSource->textInput(wstring_to_utf8str(LLWString(1, uni_char)), gKeyboard->currentMask(FALSE));
+ }
}
return result;
diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h
index fc2776ee91..01640de33a 100644
--- a/indra/newview/llviewermedia.h
+++ b/indra/newview/llviewermedia.h
@@ -133,13 +133,13 @@ public:
void focus(bool focus);
// True if the impl has user focus.
bool hasFocus() const;
- void mouseDown(S32 x, S32 y);
- void mouseUp(S32 x, S32 y);
- void mouseMove(S32 x, S32 y);
- void mouseDown(const LLVector2& texture_coords);
- void mouseUp(const LLVector2& texture_coords);
- void mouseMove(const LLVector2& texture_coords);
- void mouseLeftDoubleClick(S32 x,S32 y );
+ void mouseDown(S32 x, S32 y, MASK mask, S32 button = 0);
+ void mouseUp(S32 x, S32 y, MASK mask, S32 button = 0);
+ void mouseMove(S32 x, S32 y, MASK mask);
+ void mouseDown(const LLVector2& texture_coords, MASK mask, S32 button = 0);
+ void mouseUp(const LLVector2& texture_coords, MASK mask, S32 button = 0);
+ void mouseMove(const LLVector2& texture_coords, MASK mask);
+ void mouseDoubleClick(S32 x,S32 y, MASK mask, S32 button = 0);
void mouseCapture();
void navigateBack();
diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp
index cad8b5f0ce..ad48ec145b 100644
--- a/indra/newview/llviewermediafocus.cpp
+++ b/indra/newview/llviewermediafocus.cpp
@@ -77,7 +77,6 @@ void LLViewerMediaFocus::setFocusFace(LLPointer<LLViewerObject> objectp, S32 fac
if (media_impl.notNull() && objectp.notNull())
{
bool face_auto_zoom = false;
- media_impl->focus(true);
mFocusedImplID = media_impl->getMediaTextureID();
mFocusedObjectID = objectp->getID();
@@ -101,6 +100,7 @@ void LLViewerMediaFocus::setFocusFace(LLPointer<LLViewerObject> objectp, S32 fac
llwarns << "Can't find media entry for focused face" << llendl;
}
+ media_impl->focus(true);
gFocusMgr.setKeyboardFocus(this);
// We must do this before processing the media HUD zoom, or it may zoom to the wrong face.
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index cb4f4de05e..a1c15d9d0f 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -3450,6 +3450,15 @@ bool enable_standup_self()
return new_value;
}
+// Used from the login screen to aid in UI work on side tray
+void handle_show_side_tray()
+{
+ LLSideTray* side_tray = LLSideTray::getInstance();
+ LLView* root = gViewerWindow->getRootView();
+ // automatically removes and re-adds if there already
+ root->addChild(side_tray);
+}
+
class LLSelfFriends : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@@ -6912,7 +6921,7 @@ void handle_debug_avatar_textures(void*)
LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
if (objectp)
{
- LLFloaterReg::showInstance( "avatar_tetures", LLSD(objectp->getID()) );
+ LLFloaterReg::showInstance( "avatar_textures", LLSD(objectp->getID()) );
}
}
@@ -7934,7 +7943,7 @@ void initialize_menus()
view_listener_t::addMenu(new LLAdvancedCheckDebugKeys(), "Advanced.CheckDebugKeys");
view_listener_t::addMenu(new LLAdvancedToggleDebugWindowProc(), "Advanced.ToggleDebugWindowProc");
view_listener_t::addMenu(new LLAdvancedCheckDebugWindowProc(), "Advanced.CheckDebugWindowProc");
-
+ commit.add("Advanced.ShowSideTray", boost::bind(&handle_show_side_tray));
// Advanced > XUI
commit.add("Advanced.ReloadColorSettings", boost::bind(&LLUIColorTable::loadFromSettings, LLUIColorTable::getInstance()));
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index b268413d36..791ec07349 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1947,52 +1947,10 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
{
return;
}
- chat.mText = name + separator_string + message.substr(message_offset);
- chat.mFromName = name;
-
- // Build a link to open the object IM info window.
- std::string location = ll_safe_string((char*)binary_bucket,binary_bucket_size);
-
- LLSD query_string;
- query_string["owner"] = from_id;
- query_string["slurl"] = location.c_str();
- query_string["name"] = name;
- if (from_group)
- {
- query_string["groupowned"] = "true";
- }
-
- if (session_id.notNull())
- {
- chat.mFromID = session_id;
- }
- else
- {
- // This message originated on a region without the updated code for task id and slurl information.
- // We just need a unique ID for this object that isn't the owner ID.
- // If it is the owner ID it will overwrite the style that contains the link to that owner's profile.
- // This isn't ideal - it will make 1 style for all objects owned by the the same person/group.
- // This works because the only thing we can really do in this case is show the owner name and link to their profile.
- chat.mFromID = from_id ^ gAgent.getSessionID();
- }
-
- std::ostringstream link;
- link << "secondlife:///app/objectim/" << session_id
- << LLURI::mapToQueryString(query_string);
-
- chat.mURL = link.str();
- chat.mText = name + separator_string + message.substr(message_offset);
-
- // Note: lie to LLFloaterChat::addChat(), pretending that this is NOT an IM, because
- // IMs from objcts don't open IM sessions.
- chat.mSourceType = CHAT_SOURCE_OBJECT;
- LLFloaterChat::addChat(chat, FALSE, FALSE);
-
- // archive message in nearby chat
- LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD());
- if(nearby_chat)
- nearby_chat->addMessage(chat);
+ LLSD substitutions;
+ substitutions["MSG"] = message.substr(message_offset);
+ LLNotifications::instance().add("ServerObjectMessage", substitutions);
}
break;
case IM_FROM_TASK_AS_ALERT:
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index 44de848d19..77b023f6dd 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -1162,10 +1162,11 @@ void LLViewerParcelMgr::sendParcelBuy(ParcelBuyInfo* info)
msg->sendReliable(info->mHost);
}
-void LLViewerParcelMgr::deleteParcelBuy(ParcelBuyInfo*& info)
+void LLViewerParcelMgr::deleteParcelBuy(ParcelBuyInfo* *info)
{
- delete info;
- info = NULL;
+ // Must be here because ParcelBuyInfo is local to this .cpp file
+ delete *info;
+ *info = NULL;
}
void LLViewerParcelMgr::sendParcelDeed(const LLUUID& group_id)
diff --git a/indra/newview/llviewerparcelmgr.h b/indra/newview/llviewerparcelmgr.h
index 3964a56bf6..1c8fe23dba 100644
--- a/indra/newview/llviewerparcelmgr.h
+++ b/indra/newview/llviewerparcelmgr.h
@@ -246,7 +246,7 @@ public:
BOOL remove_contribution);
// callers responsibility to call deleteParcelBuy() on return value
void sendParcelBuy(ParcelBuyInfo*);
- void deleteParcelBuy(ParcelBuyInfo*&);
+ void deleteParcelBuy(ParcelBuyInfo* *info);
void sendParcelDeed(const LLUUID& group_id);
diff --git a/indra/newview/llviewerprecompiledheaders.h b/indra/newview/llviewerprecompiledheaders.h
index 21d4c72428..bb317aeb5f 100644
--- a/indra/newview/llviewerprecompiledheaders.h
+++ b/indra/newview/llviewerprecompiledheaders.h
@@ -105,7 +105,6 @@
#include "llstl.h"
#include "llstrider.h"
#include "llstring.h"
-#include "llstringtable.h"
#include "llsys.h"
#include "llthread.h"
#include "lltimer.h"
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 95459a7116..e5c53c91c9 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -191,25 +191,25 @@ LLPointer<LLViewerTexture> LLViewerTextureManager::getLocalTexture(const U32 wid
LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTexture(
const LLUUID &image_id,
BOOL usemipmaps,
- BOOL level_immediate,
+ S32 boost_priority,
S8 texture_type,
LLGLint internal_format,
LLGLenum primary_format,
LLHost request_from_host)
{
- return gTextureList.getImage(image_id, usemipmaps, level_immediate, texture_type, internal_format, primary_format, request_from_host) ;
+ return gTextureList.getImage(image_id, usemipmaps, boost_priority, texture_type, internal_format, primary_format, request_from_host) ;
}
LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromFile(
const std::string& filename,
BOOL usemipmaps,
- BOOL level_immediate,
+ S32 boost_priority,
S8 texture_type,
LLGLint internal_format,
LLGLenum primary_format,
const LLUUID& force_id)
{
- return gTextureList.getImageFromFile(filename, usemipmaps, level_immediate, texture_type, internal_format, primary_format, force_id) ;
+ return gTextureList.getImageFromFile(filename, usemipmaps, boost_priority, texture_type, internal_format, primary_format, force_id) ;
}
LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromHost(const LLUUID& image_id, LLHost host)
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index 596bfea670..480e1c1cbc 100644
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -118,10 +118,10 @@ public:
BOOST_SELECTED = 12,
BOOST_HUD = 13,
BOOST_AVATAR_BAKED_SELF = 14,
- BOOST_UI = 15,
- BOOST_PREVIEW = 16,
- BOOST_MAP = 17,
- BOOST_MAP_LAYER = 18,
+ BOOST_ICON = 15,
+ BOOST_UI = 16,
+ BOOST_PREVIEW = 17,
+ BOOST_MAP = 18,
BOOST_AVATAR_SELF = 19, // needed for baking avatar
BOOST_MAX_LEVEL
};
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index dac2331ca3..b5986c70f5 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -111,10 +111,10 @@ void LLViewerTextureList::doPreloadImages()
LL_DEBUGS("ViewerImages") << "Preloading images..." << LL_ENDL;
// Set the "missing asset" image
- LLViewerFetchedTexture::sMissingAssetImagep = LLViewerTextureManager::getFetchedTextureFromFile("missing_asset.tga", MIPMAP_NO, IMMEDIATE_YES);
+ LLViewerFetchedTexture::sMissingAssetImagep = LLViewerTextureManager::getFetchedTextureFromFile("missing_asset.tga", MIPMAP_NO, LLViewerFetchedTexture::BOOST_UI);
// Set the "white" image
- LLViewerFetchedTexture::sWhiteImagep = LLViewerTextureManager::getFetchedTextureFromFile("white.tga", MIPMAP_NO, IMMEDIATE_YES);
+ LLViewerFetchedTexture::sWhiteImagep = LLViewerTextureManager::getFetchedTextureFromFile("white.tga", MIPMAP_NO, LLViewerFetchedTexture::BOOST_UI);
LLUIImageList* image_list = LLUIImageList::getInstance();
@@ -131,31 +131,31 @@ void LLViewerTextureList::doPreloadImages()
// prefetch specific UUIDs
LLViewerTextureManager::getFetchedTexture(IMG_SHOT, TRUE);
LLViewerTextureManager::getFetchedTexture(IMG_SMOKE_POOF, TRUE);
- LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTextureFromFile("silhouette.j2c", MIPMAP_YES, IMMEDIATE_YES);
+ LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTextureFromFile("silhouette.j2c", MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI);
if (image)
{
image->setAddressMode(LLTexUnit::TAM_WRAP);
mImagePreloads.insert(image);
}
- image = LLViewerTextureManager::getFetchedTextureFromFile("world/NoEntryLines.png", MIPMAP_YES, IMMEDIATE_YES);
+ image = LLViewerTextureManager::getFetchedTextureFromFile("world/NoEntryLines.png", MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI);
if (image)
{
image->setAddressMode(LLTexUnit::TAM_WRAP);
mImagePreloads.insert(image);
}
- image = LLViewerTextureManager::getFetchedTextureFromFile("world/NoEntryPassLines.png", MIPMAP_YES, IMMEDIATE_YES);
+ image = LLViewerTextureManager::getFetchedTextureFromFile("world/NoEntryPassLines.png", MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI);
if (image)
{
image->setAddressMode(LLTexUnit::TAM_WRAP);
mImagePreloads.insert(image);
}
- image = LLViewerTextureManager::getFetchedTexture(DEFAULT_WATER_NORMAL, MIPMAP_YES, IMMEDIATE_YES);
+ image = LLViewerTextureManager::getFetchedTexture(DEFAULT_WATER_NORMAL, MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI);
if (image)
{
image->setAddressMode(LLTexUnit::TAM_WRAP);
mImagePreloads.insert(image);
}
- image = LLViewerTextureManager::getFetchedTextureFromFile("transparent.j2c", MIPMAP_YES, IMMEDIATE_YES, LLViewerTexture::FETCHED_TEXTURE,
+ image = LLViewerTextureManager::getFetchedTextureFromFile("transparent.j2c", MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI, LLViewerTexture::FETCHED_TEXTURE,
0,0,LLUUID("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903"));
if (image)
{
@@ -315,7 +315,7 @@ void LLViewerTextureList::restoreGL()
LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string& filename,
BOOL usemipmaps,
- BOOL level_immediate,
+ S32 boost_priority,
S8 texture_type,
LLGLint internal_format,
LLGLenum primary_format,
@@ -369,10 +369,14 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string&
addImage(imagep);
- if (level_immediate)
+ if (boost_priority != 0)
{
- imagep->dontDiscard();
- imagep->setBoostLevel(LLViewerFetchedTexture::BOOST_UI);
+ if (boost_priority == LLViewerFetchedTexture::BOOST_UI ||
+ boost_priority == LLViewerFetchedTexture::BOOST_ICON)
+ {
+ imagep->dontDiscard();
+ }
+ imagep->setBoostLevel(boost_priority);
}
}
@@ -384,7 +388,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string&
LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id,
BOOL usemipmaps,
- BOOL level_immediate,
+ S32 boost_priority,
S8 texture_type,
LLGLint internal_format,
LLGLenum primary_format,
@@ -403,7 +407,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id,
if (imagep.isNull())
{
- imagep = createImage(image_id, usemipmaps, level_immediate, texture_type, internal_format, primary_format, request_from_host) ;
+ imagep = createImage(image_id, usemipmaps, boost_priority, texture_type, internal_format, primary_format, request_from_host) ;
}
imagep->setGLTextureCreated(true);
@@ -414,7 +418,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id,
//when this function is called, there is no such texture in the gTextureList with image_id.
LLViewerFetchedTexture* LLViewerTextureList::createImage(const LLUUID &image_id,
BOOL usemipmaps,
- BOOL level_immediate,
+ S32 boost_priority,
S8 texture_type,
LLGLint internal_format,
LLGLenum primary_format,
@@ -443,16 +447,20 @@ LLViewerFetchedTexture* LLViewerTextureList::createImage(const LLUUID &image_id,
addImage(imagep);
- if (level_immediate)
+ if (boost_priority != 0)
{
- imagep->dontDiscard();
- imagep->setBoostLevel(LLViewerFetchedTexture::BOOST_UI);
+ if (boost_priority == LLViewerFetchedTexture::BOOST_UI ||
+ boost_priority == LLViewerFetchedTexture::BOOST_ICON)
+ {
+ imagep->dontDiscard();
+ }
+ imagep->setBoostLevel(boost_priority);
}
else
{
//by default, the texure can not be removed from memory even if it is not used.
//here turn this off
- //if this texture should be set to NO_DELETE, either pass level_immediate == TRUE here, or call setNoDelete() afterwards.
+ //if this texture should be set to NO_DELETE, call setNoDelete() afterwards.
imagep->forceActive() ;
}
@@ -1286,7 +1294,7 @@ void LLUIImageList::cleanUp()
mUITextureList.clear() ;
}
-LLUIImagePtr LLUIImageList::getUIImageByID(const LLUUID& image_id)
+LLUIImagePtr LLUIImageList::getUIImageByID(const LLUUID& image_id, S32 priority)
{
// use id as image name
std::string image_name = image_id.asString();
@@ -1298,10 +1306,12 @@ LLUIImagePtr LLUIImageList::getUIImageByID(const LLUUID& image_id)
return found_it->second;
}
- return loadUIImageByID(image_id);
+ const BOOL use_mips = FALSE;
+ const LLRect scale_rect = LLRect::null;
+ return loadUIImageByID(image_id, use_mips, scale_rect, priority);
}
-LLUIImagePtr LLUIImageList::getUIImage(const std::string& image_name)
+LLUIImagePtr LLUIImageList::getUIImage(const std::string& image_name, S32 priority)
{
// look for existing image
uuid_ui_image_map_t::iterator found_it = mUIImages.find(image_name);
@@ -1310,18 +1320,24 @@ LLUIImagePtr LLUIImageList::getUIImage(const std::string& image_name)
return found_it->second;
}
- return loadUIImageByName(image_name, image_name);
+ const BOOL use_mips = FALSE;
+ const LLRect scale_rect = LLRect::null;
+ return loadUIImageByName(image_name, image_name, use_mips, scale_rect, priority);
}
-LLUIImagePtr LLUIImageList::loadUIImageByName(const std::string& name, const std::string& filename, BOOL use_mips, const LLRect& scale_rect)
+LLUIImagePtr LLUIImageList::loadUIImageByName(const std::string& name, const std::string& filename,
+ BOOL use_mips, const LLRect& scale_rect, S32 boost_priority )
{
- LLViewerFetchedTexture* imagep = LLViewerTextureManager::getFetchedTextureFromFile(filename, MIPMAP_NO, IMMEDIATE_YES);
+ if (boost_priority == 0) boost_priority = LLViewerFetchedTexture::BOOST_UI;
+ LLViewerFetchedTexture* imagep = LLViewerTextureManager::getFetchedTextureFromFile(filename, MIPMAP_NO, boost_priority);
return loadUIImage(imagep, name, use_mips, scale_rect);
}
-LLUIImagePtr LLUIImageList::loadUIImageByID(const LLUUID& id, BOOL use_mips, const LLRect& scale_rect)
+LLUIImagePtr LLUIImageList::loadUIImageByID(const LLUUID& id,
+ BOOL use_mips, const LLRect& scale_rect, S32 boost_priority)
{
- LLViewerFetchedTexture* imagep = LLViewerTextureManager::getFetchedTexture(id, MIPMAP_NO, IMMEDIATE_YES);
+ if (boost_priority == 0) boost_priority = LLViewerFetchedTexture::BOOST_UI;
+ LLViewerFetchedTexture* imagep = LLViewerTextureManager::getFetchedTexture(id, MIPMAP_NO, boost_priority);
return loadUIImage(imagep, id.asString(), use_mips, scale_rect);
}
@@ -1332,11 +1348,11 @@ LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const st
imagep->setAddressMode(LLTexUnit::TAM_CLAMP);
//all UI images are non-deletable
- imagep->setNoDelete() ;
+ imagep->setNoDelete();
LLUIImagePtr new_imagep = new LLUIImage(name, imagep);
mUIImages.insert(std::make_pair(name, new_imagep));
- mUITextureList.push_back(imagep) ;
+ mUITextureList.push_back(imagep);
LLUIImageLoadData* datap = new LLUIImageLoadData;
datap->mImageName = name;
@@ -1474,7 +1490,7 @@ bool LLUIImageList::initFromFile()
}
UIImageDeclarations images;
- LLXUIParser::instance().readXUI(root, images);
+ LLXUIParser::instance().readXUI(root, images, base_file_path);
if (!images.validateBlock()) return false;
diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h
index 11d1dd855f..fda57ce981 100644
--- a/indra/newview/llviewertexturelist.h
+++ b/indra/newview/llviewertexturelist.h
@@ -202,8 +202,8 @@ class LLUIImageList : public LLImageProviderInterface, public LLSingleton<LLUIIm
{
public:
// LLImageProviderInterface
- LLUIImagePtr getUIImageByID(const LLUUID& id);
- LLUIImagePtr getUIImage(const std::string& name);
+ /*virtual*/ LLUIImagePtr getUIImageByID(const LLUUID& id, S32 priority);
+ /*virtual*/ LLUIImagePtr getUIImage(const std::string& name, S32 priority);
void cleanUp();
bool initFromFile();
@@ -212,8 +212,10 @@ public:
static void onUIImageLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, BOOL final, void* userdata );
private:
- LLUIImagePtr loadUIImageByName(const std::string& name, const std::string& filename, BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null);
- LLUIImagePtr loadUIImageByID(const LLUUID& id, BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null);
+ LLUIImagePtr loadUIImageByName(const std::string& name, const std::string& filename,
+ BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null, S32 boost_priority = 0);
+ LLUIImagePtr loadUIImageByID(const LLUUID& id,
+ BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null, S32 boost_priority = 0);
LLUIImagePtr loadUIImage(LLViewerFetchedTexture* imagep, const std::string& name, BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null);
diff --git a/indra/newview/llviewervisualparam.h b/indra/newview/llviewervisualparam.h
index 82a694e277..3550a46fbf 100644
--- a/indra/newview/llviewervisualparam.h
+++ b/indra/newview/llviewervisualparam.h
@@ -83,7 +83,7 @@ public:
// This sets mInfo and calls initialization functions
BOOL setInfo(LLViewerVisualParamInfo *info);
- virtual LLViewerVisualParam * cloneParam(LLWearable* wearable) const = 0;
+ virtual LLViewerVisualParam* cloneParam(LLWearable* wearable) const = 0;
// LLVisualParam Virtual functions
///*virtual*/ BOOL parseData(LLXmlTreeNode* node);
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 76e00db91c..a402aff8ab 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -49,6 +49,7 @@
#include "llagent.h" // Get state values from here
#include "llagentwearables.h"
#include "llanimationstates.h"
+#include "llavatarpropertiesprocessor.h"
#include "llviewercontrol.h"
#include "lldrawpoolavatar.h"
#include "lldriverparam.h"
@@ -792,7 +793,8 @@ LLVOAvatar::~LLVOAvatar()
mMeshes.clear();
for (std::vector<LLViewerJoint*>::iterator jointIter = mMeshLOD.begin();
- jointIter != mMeshLOD.end(); jointIter++)
+ jointIter != mMeshLOD.end();
+ ++jointIter)
{
LLViewerJoint* joint = (LLViewerJoint *) *jointIter;
std::for_each(joint->mMeshParts.begin(), joint->mMeshParts.end(), DeletePointer());
@@ -943,7 +945,7 @@ void LLVOAvatar::dumpBakedStatus()
for (LLVOAvatarDictionary::BakedTextures::const_iterator iter = LLVOAvatarDictionary::getInstance()->getBakedTextures().begin();
iter != LLVOAvatarDictionary::getInstance()->getBakedTextures().end();
- iter++)
+ ++iter)
{
const LLVOAvatarDictionary::BakedEntry *baked_dict = iter->second;
const ETextureIndex index = baked_dict->mTextureIndex;
@@ -1135,7 +1137,7 @@ void LLVOAvatar::initInstance(void)
for (LLVOAvatarDictionary::Meshes::const_iterator iter = LLVOAvatarDictionary::getInstance()->getMeshes().begin();
iter != LLVOAvatarDictionary::getInstance()->getMeshes().end();
- iter++)
+ ++iter)
{
const EMeshIndex mesh_index = iter->first;
const LLVOAvatarDictionary::MeshEntry *mesh_dict = iter->second;
@@ -1181,7 +1183,7 @@ void LLVOAvatar::initInstance(void)
//-------------------------------------------------------------------------
for (LLVOAvatarDictionary::Meshes::const_iterator iter = LLVOAvatarDictionary::getInstance()->getMeshes().begin();
iter != LLVOAvatarDictionary::getInstance()->getMeshes().end();
- iter++)
+ ++iter)
{
const EMeshIndex mesh_index = iter->first;
const LLVOAvatarDictionary::MeshEntry *mesh_dict = iter->second;
@@ -1190,7 +1192,8 @@ void LLVOAvatar::initInstance(void)
if (baked_texture_index == BAKED_NUM_INDICES) continue;
for (std::vector<LLViewerJointMesh* >::iterator iter = mMeshLOD[mesh_index]->mMeshParts.begin();
- iter != mMeshLOD[mesh_index]->mMeshParts.end(); iter++)
+ iter != mMeshLOD[mesh_index]->mMeshParts.end();
+ ++iter)
{
LLViewerJointMesh* mesh = (LLViewerJointMesh*) *iter;
mBakedTextureDatas[(int)baked_texture_index].mMeshes.push_back(mesh);
@@ -1576,7 +1579,7 @@ BOOL LLVOAvatar::setupBone(const LLVOAvatarBoneInfo* info, LLViewerJoint* parent
// setup children
LLVOAvatarBoneInfo::child_list_t::const_iterator iter;
- for (iter = info->mChildList.begin(); iter != info->mChildList.end(); iter++)
+ for (iter = info->mChildList.begin(); iter != info->mChildList.end(); ++iter)
{
LLVOAvatarBoneInfo *child_info = *iter;
if (!setupBone(child_info, joint, volume_num, joint_num))
@@ -1619,7 +1622,7 @@ BOOL LLVOAvatar::buildSkeleton(const LLVOAvatarSkeletonInfo *info)
S32 current_joint_num = 0;
S32 current_volume_num = 0;
LLVOAvatarSkeletonInfo::bone_info_list_t::const_iterator iter;
- for (iter = info->mBoneInfoList.begin(); iter != info->mBoneInfoList.end(); iter++)
+ for (iter = info->mBoneInfoList.begin(); iter != info->mBoneInfoList.end(); ++iter)
{
LLVOAvatarBoneInfo *info = *iter;
if (!setupBone(info, NULL, current_volume_num, current_joint_num))
@@ -1682,11 +1685,11 @@ void LLVOAvatar::buildCharacter()
// clear mesh data
//-------------------------------------------------------------------------
for (std::vector<LLViewerJoint*>::iterator jointIter = mMeshLOD.begin();
- jointIter != mMeshLOD.end(); jointIter++)
+ jointIter != mMeshLOD.end(); ++jointIter)
{
LLViewerJoint* joint = (LLViewerJoint*) *jointIter;
for (std::vector<LLViewerJointMesh*>::iterator meshIter = joint->mMeshParts.begin();
- meshIter != joint->mMeshParts.end(); meshIter++)
+ meshIter != joint->mMeshParts.end(); ++meshIter)
{
LLViewerJointMesh * mesh = (LLViewerJointMesh *) *meshIter;
mesh->setMesh(NULL);
@@ -1831,7 +1834,8 @@ void LLVOAvatar::releaseMeshData()
// cleanup mesh data
for (std::vector<LLViewerJoint*>::iterator iter = mMeshLOD.begin();
- iter != mMeshLOD.end(); iter++)
+ iter != mMeshLOD.end();
+ ++iter)
{
LLViewerJoint* joint = (LLViewerJoint*) *iter;
joint->setValid(FALSE, TRUE);
@@ -1850,10 +1854,10 @@ void LLVOAvatar::releaseMeshData()
}
for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
- iter != mAttachmentPoints.end(); )
+ iter != mAttachmentPoints.end();
+ ++iter)
{
- attachment_map_t::iterator curiter = iter++;
- LLViewerJointAttachment* attachment = curiter->second;
+ LLViewerJointAttachment* attachment = iter->second;
if (!attachment->getIsHUDAttachment())
{
attachment->setAttachmentVisibility(FALSE);
@@ -1876,10 +1880,10 @@ void LLVOAvatar::restoreMeshData()
updateJointLODs();
for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
- iter != mAttachmentPoints.end(); )
+ iter != mAttachmentPoints.end();
+ ++iter)
{
- attachment_map_t::iterator curiter = iter++;
- LLViewerJointAttachment* attachment = curiter->second;
+ LLViewerJointAttachment* attachment = iter->second;
if (!attachment->getIsHUDAttachment())
{
attachment->setAttachmentVisibility(TRUE);
@@ -2328,10 +2332,10 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update)
{
LLFastTimer t(FTM_ATTACHMENT_UPDATE);
for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
- iter != mAttachmentPoints.end(); )
+ iter != mAttachmentPoints.end();
+ ++iter)
{
- attachment_map_t::iterator curiter = iter++;
- LLViewerJointAttachment* attachment = curiter->second;
+ LLViewerJointAttachment* attachment = iter->second;
for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin();
attachment_iter != attachment->mAttachedObjects.end();
@@ -3554,10 +3558,10 @@ void LLVOAvatar::updateVisibility()
/*llinfos << "SPA: " << sel_pos_agent << llendl;
llinfos << "WPA: " << wrist_right_pos_agent << llendl;*/
for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
- iter != mAttachmentPoints.end(); )
+ iter != mAttachmentPoints.end();
+ ++iter)
{
- attachment_map_t::iterator curiter = iter++;
- LLViewerJointAttachment* attachment = curiter->second;
+ LLViewerJointAttachment* attachment = iter->second;
for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin();
attachment_iter != attachment->mAttachedObjects.end();
@@ -3989,32 +3993,32 @@ void LLVOAvatar::updateTextures(LLAgent &agent)
mMaxPixelArea = 0.f;
mMinPixelArea = 99999999.f;
mHasGrey = FALSE; // debug
- for (U32 texture = 0; texture < getNumTEs(); texture++)
+ for (U32 texture_index = 0; texture_index < getNumTEs(); texture_index++)
{
- EWearableType wearable_type = LLVOAvatarDictionary::getTEWearableType((ETextureIndex)texture);
+ EWearableType wearable_type = LLVOAvatarDictionary::getTEWearableType((ETextureIndex)texture_index);
U32 num_wearables = gAgentWearables.getWearableCount(wearable_type);
- const LLTextureEntry *te = getTE(texture);
+ const LLTextureEntry *te = getTE(texture_index);
const F32 texel_area_ratio = fabs(te->mScaleS * te->mScaleT);
LLViewerFetchedTexture *imagep = NULL;
for (U32 wearable_index = 0; wearable_index < num_wearables; wearable_index++)
{
- imagep = LLViewerTextureManager::staticCastToFetchedTexture(getImage(texture, wearable_index), TRUE);
+ imagep = LLViewerTextureManager::staticCastToFetchedTexture(getImage(texture_index, wearable_index), TRUE);
if (imagep)
{
- const LLVOAvatarDictionary::TextureEntry *texture_dict = LLVOAvatarDictionary::getInstance()->getTexture((ETextureIndex)texture);
+ const LLVOAvatarDictionary::TextureEntry *texture_dict = LLVOAvatarDictionary::getInstance()->getTexture((ETextureIndex)texture_index);
const EBakedTextureIndex baked_index = texture_dict->mBakedTextureIndex;
if (texture_dict->mIsLocalTexture)
{
- addLocalTextureStats((ETextureIndex)texture, imagep, texel_area_ratio, render_avatar, layer_baked[baked_index]);
+ addLocalTextureStats((ETextureIndex)texture_index, imagep, texel_area_ratio, render_avatar, layer_baked[baked_index]);
}
}
}
- if (isIndexBakedTexture((ETextureIndex) texture))
+ if (isIndexBakedTexture((ETextureIndex) texture_index))
{
const S32 boost_level = getAvatarBakedBoostLevel();
- imagep = LLViewerTextureManager::staticCastToFetchedTexture(getImage(texture,0), TRUE);
+ imagep = LLViewerTextureManager::staticCastToFetchedTexture(getImage(texture_index,0), TRUE);
// Spam if this is a baked texture, not set to default image, without valid host info
- if (isIndexBakedTexture((ETextureIndex)texture)
+ if (isIndexBakedTexture((ETextureIndex)texture_index)
&& imagep->getID() != IMG_DEFAULT_AVATAR
&& !imagep->getTargetHost().isOk())
{
@@ -4731,7 +4735,7 @@ BOOL LLVOAvatar::loadAvatar()
// avatar_lad.xml : <morph_masks>
for (LLVOAvatarXmlInfo::morph_info_list_t::iterator iter = sAvatarXmlInfo->mMorphMaskInfoList.begin();
iter != sAvatarXmlInfo->mMorphMaskInfoList.end();
- iter++)
+ ++iter)
{
LLVOAvatarXmlInfo::LLVOAvatarMorphInfo *info = *iter;
@@ -4755,7 +4759,7 @@ BOOL LLVOAvatar::loadAvatar()
// avatar_lad.xml : <driver_parameters>
for (LLVOAvatarXmlInfo::driver_info_list_t::iterator iter = sAvatarXmlInfo->mDriverInfoList.begin();
iter != sAvatarXmlInfo->mDriverInfoList.end();
- iter++)
+ ++iter)
{
LLDriverParamInfo *info = *iter;
LLDriverParam* driver_param = new LLDriverParam( this );
@@ -4801,7 +4805,8 @@ BOOL LLVOAvatar::loadSkeletonNode ()
mRoot.addChild( &mSkeleton[0] );
for (std::vector<LLViewerJoint *>::iterator iter = mMeshLOD.begin();
- iter != mMeshLOD.end(); iter++)
+ iter != mMeshLOD.end();
+ ++iter)
{
LLViewerJoint *joint = (LLViewerJoint *) *iter;
joint->mUpdateXform = FALSE;
@@ -4837,7 +4842,8 @@ BOOL LLVOAvatar::loadSkeletonNode ()
{
LLVOAvatarXmlInfo::skeletal_distortion_info_list_t::iterator iter;
for (iter = sAvatarXmlInfo->mSkeletalDistortionInfoList.begin();
- iter != sAvatarXmlInfo->mSkeletalDistortionInfoList.end(); iter++)
+ iter != sAvatarXmlInfo->mSkeletalDistortionInfoList.end();
+ ++iter)
{
LLPolySkeletalDistortionInfo *info = *iter;
LLPolySkeletalDistortion *param = new LLPolySkeletalDistortion(this);
@@ -4857,7 +4863,8 @@ BOOL LLVOAvatar::loadSkeletonNode ()
{
LLVOAvatarXmlInfo::attachment_info_list_t::iterator iter;
for (iter = sAvatarXmlInfo->mAttachmentInfoList.begin();
- iter != sAvatarXmlInfo->mAttachmentInfoList.end(); iter++)
+ iter != sAvatarXmlInfo->mAttachmentInfoList.end();
+ ++iter)
{
LLVOAvatarXmlInfo::LLVOAvatarAttachmentInfo *info = *iter;
if (!isSelf() && info->mJointName == "mScreen")
@@ -4938,7 +4945,7 @@ BOOL LLVOAvatar::loadMeshNodes()
{
for (LLVOAvatarXmlInfo::mesh_info_list_t::const_iterator meshinfo_iter = sAvatarXmlInfo->mMeshInfoList.begin();
meshinfo_iter != sAvatarXmlInfo->mMeshInfoList.end();
- meshinfo_iter++)
+ ++meshinfo_iter)
{
const LLVOAvatarXmlInfo::LLVOAvatarMeshInfo *info = *meshinfo_iter;
const std::string &type = info->mType;
@@ -4954,7 +4961,7 @@ BOOL LLVOAvatar::loadMeshNodes()
mesh = &mHairMesh0; */
for (LLVOAvatarDictionary::Meshes::const_iterator mesh_iter = LLVOAvatarDictionary::getInstance()->getMeshes().begin();
mesh_iter != LLVOAvatarDictionary::getInstance()->getMeshes().end();
- mesh_iter++)
+ ++mesh_iter)
{
const EMeshIndex mesh_index = mesh_iter->first;
const LLVOAvatarDictionary::MeshEntry *mesh_dict = mesh_iter->second;
@@ -5026,7 +5033,7 @@ BOOL LLVOAvatar::loadMeshNodes()
for (LLVOAvatarXmlInfo::LLVOAvatarMeshInfo::morph_info_list_t::const_iterator xmlinfo_iter = info->mPolyMorphTargetInfoList.begin();
xmlinfo_iter != info->mPolyMorphTargetInfoList.end();
- xmlinfo_iter++)
+ ++xmlinfo_iter)
{
const LLVOAvatarXmlInfo::LLVOAvatarMeshInfo::morph_info_pair_t *info_pair = &(*xmlinfo_iter);
LLPolyMorphTarget *param = new LLPolyMorphTarget(mesh->getMesh());
@@ -5060,7 +5067,7 @@ BOOL LLVOAvatar::loadLayersets()
BOOL success = TRUE;
for (LLVOAvatarXmlInfo::layer_info_list_t::const_iterator layerset_iter = sAvatarXmlInfo->mLayerInfoList.begin();
layerset_iter != sAvatarXmlInfo->mLayerInfoList.end();
- layerset_iter++)
+ ++layerset_iter)
{
// Construct a layerset for each one specified in avatar_lad.xml and initialize it as such.
LLTexLayerSetInfo *layerset_info = *layerset_iter;
@@ -5467,7 +5474,7 @@ U32 LLVOAvatar::getNumAttachments() const
U32 num_attachments = 0;
for (attachment_map_t::const_iterator iter = mAttachmentPoints.begin();
iter != mAttachmentPoints.end();
- iter++)
+ ++iter)
{
const LLViewerJointAttachment *attachment_pt = (*iter).second;
num_attachments += attachment_pt->getNumObjects();
@@ -5508,10 +5515,10 @@ void LLVOAvatar::lazyAttach()
void LLVOAvatar::resetHUDAttachments()
{
for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
- iter != mAttachmentPoints.end(); )
+ iter != mAttachmentPoints.end();
+ ++iter)
{
- attachment_map_t::iterator curiter = iter++;
- LLViewerJointAttachment* attachment = curiter->second;
+ LLViewerJointAttachment* attachment = iter->second;
if (attachment->getIsHUDAttachment())
{
for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin();
@@ -5534,55 +5541,15 @@ void LLVOAvatar::resetHUDAttachments()
BOOL LLVOAvatar::detachObject(LLViewerObject *viewer_object)
{
for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
- iter != mAttachmentPoints.end(); )
+ iter != mAttachmentPoints.end();
+ ++iter)
{
- attachment_map_t::iterator curiter = iter++;
- LLViewerJointAttachment* attachment = curiter->second;
+ LLViewerJointAttachment* attachment = iter->second;
if (attachment->isObjectAttached(viewer_object))
{
- LLUUID item_id = viewer_object->getItemID();
attachment->removeObject(viewer_object);
- if (isSelf())
- {
- // the simulator should automatically handle
- // permission revocation
-
- stopMotionFromSource(viewer_object->getID());
- LLFollowCamMgr::setCameraActive(viewer_object->getID(), FALSE);
-
- LLViewerObject::const_child_list_t& child_list = viewer_object->getChildren();
- for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
- iter != child_list.end(); iter++)
- {
- LLViewerObject* child_objectp = *iter;
- // the simulator should automatically handle
- // permissions revocation
-
- stopMotionFromSource(child_objectp->getID());
- LLFollowCamMgr::setCameraActive(child_objectp->getID(), FALSE);
- }
- }
lldebugs << "Detaching object " << viewer_object->mID << " from " << attachment->getName() << llendl;
- if (isSelf())
- {
- // Then make sure the inventory is in sync with the avatar.
-
- // Update COF contents, don't trigger appearance update.
- if (gAgent.getAvatarObject() == NULL)
- {
- llinfos << "removeItemLinks skipped, avatar is under destruction" << llendl;
- }
- else
- {
- LLAppearanceManager::dumpCat(LLAppearanceManager::getCOF(),"Removing attachment link:");
- LLAppearanceManager::removeItemLinks(item_id, false);
- }
-
- // BAP - needs to change for label to track link.
- gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id);
- gInventory.notifyObservers();
- }
return TRUE;
}
}
@@ -5667,7 +5634,7 @@ void LLVOAvatar::getOffObject()
LLViewerObject::const_child_list_t& child_list = sit_object->getChildren();
for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
- iter != child_list.end(); iter++)
+ iter != child_list.end(); ++iter)
{
LLViewerObject* child_objectp = *iter;
@@ -5837,9 +5804,38 @@ BOOL LLVOAvatar::updateIsFullyLoaded()
loading = TRUE;
}
+ updateRuthTimer(loading);
return processFullyLoadedChange(loading);
}
+void LLVOAvatar::updateRuthTimer(bool loading)
+{
+ if (isSelf() || !loading)
+ {
+ return;
+ }
+
+ if (mPreviousFullyLoaded)
+ {
+ mRuthTimer.reset();
+ }
+
+ const F32 LOADING_TIMEOUT = 120.f;
+ if (mRuthTimer.getElapsedTimeF32() > LOADING_TIMEOUT)
+ {
+ /*
+ llinfos << "Ruth Timer timeout: Missing texture data for '" << getFullname() << "' "
+ << "( Params loaded : " << !visualParamWeightsAreDefault() << " ) "
+ << "( Lower : " << isTextureDefined(TEX_LOWER_BAKED) << " ) "
+ << "( Upper : " << isTextureDefined(TEX_UPPER_BAKED) << " ) "
+ << "( Head : " << isTextureDefined(TEX_HEAD_BAKED) << " )."
+ << llendl;
+ */
+ LLAvatarPropertiesProcessor::getInstance()->sendAvatarTexturesRequest(getID());
+ mRuthTimer.reset();
+ }
+}
+
BOOL LLVOAvatar::processFullyLoadedChange(bool loading)
{
// we wait a little bit before giving the all clear,
@@ -6008,14 +6004,14 @@ void LLVOAvatar::updateMeshTextures()
for (LLVOAvatarDictionary::BakedTextures::const_iterator baked_iter = LLVOAvatarDictionary::getInstance()->getBakedTextures().begin();
baked_iter != LLVOAvatarDictionary::getInstance()->getBakedTextures().end();
- baked_iter++)
+ ++baked_iter)
{
const EBakedTextureIndex baked_index = baked_iter->first;
const LLVOAvatarDictionary::BakedEntry *baked_dict = baked_iter->second;
for (texture_vec_t::const_iterator local_tex_iter = baked_dict->mLocalTextures.begin();
local_tex_iter != baked_dict->mLocalTextures.end();
- local_tex_iter++)
+ ++local_tex_iter)
{
const ETextureIndex texture_index = *local_tex_iter;
const BOOL is_baked_ready = (is_layer_baked[baked_index] && mBakedTextureDatas[baked_index].mIsLoaded) || other_culled;
@@ -6039,7 +6035,7 @@ void LLVOAvatar::setLocalTexture( ETextureIndex type, LLViewerTexture* in_tex, B
}
//virtual
-void LLVOAvatar::setBakedReady(LLVOAvatarDefines::ETextureIndex type, BOOL baked_version_exists, U32 index)
+void LLVOAvatar::setBakedReady(LLVOAvatarDefines::ETextureIndex type, BOOL baked_version_exists, U32 index)
{
// invalid for anyone but self
llassert(0);
@@ -6131,7 +6127,7 @@ void LLVOAvatar::applyMorphMask(U8* tex_data, S32 width, S32 height, S32 num_com
}
for (morph_list_t::const_iterator iter = mBakedTextureDatas[index].mMaskedMorphs.begin();
- iter != mBakedTextureDatas[index].mMaskedMorphs.end(); iter++)
+ iter != mBakedTextureDatas[index].mMaskedMorphs.end(); ++iter)
{
const LLMaskedMorph* maskedMorph = (*iter);
maskedMorph->mMorphTarget->applyMask(tex_data, width, height, num_components, maskedMorph->mInvert);
@@ -6283,7 +6279,7 @@ void LLVOAvatar::dumpAvatarTEs( const std::string& context )
llinfos << (isSelf() ? "Self: " : "Other: ") << context << llendl;
for (LLVOAvatarDictionary::Textures::const_iterator iter = LLVOAvatarDictionary::getInstance()->getTextures().begin();
iter != LLVOAvatarDictionary::getInstance()->getTextures().end();
- iter++)
+ ++iter)
{
const LLVOAvatarDictionary::TextureEntry *texture_dict = iter->second;
// TODO: handle multiple textures for self
@@ -6332,7 +6328,7 @@ BOOL LLVOAvatar::isWearingWearableType(EWearableType type) const
indicator_te = TEX_UPPER_SHIRT; */
for (LLVOAvatarDictionary::Textures::const_iterator tex_iter = LLVOAvatarDictionary::getInstance()->getTextures().begin();
tex_iter != LLVOAvatarDictionary::getInstance()->getTextures().end();
- tex_iter++)
+ ++tex_iter)
{
const LLVOAvatarDictionary::TextureEntry *texture_dict = tex_iter->second;
if (texture_dict->mWearableType == type)
@@ -6363,10 +6359,10 @@ void LLVOAvatar::clampAttachmentPositions()
return;
}
for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
- iter != mAttachmentPoints.end(); )
+ iter != mAttachmentPoints.end();
+ ++iter)
{
- attachment_map_t::iterator curiter = iter++;
- LLViewerJointAttachment* attachment = curiter->second;
+ LLViewerJointAttachment* attachment = iter->second;
if (attachment)
{
attachment->clampObjectPosition();
@@ -6377,10 +6373,10 @@ void LLVOAvatar::clampAttachmentPositions()
BOOL LLVOAvatar::hasHUDAttachment() const
{
for (attachment_map_t::const_iterator iter = mAttachmentPoints.begin();
- iter != mAttachmentPoints.end(); )
+ iter != mAttachmentPoints.end();
+ ++iter)
{
- attachment_map_t::const_iterator curiter = iter++;
- LLViewerJointAttachment* attachment = curiter->second;
+ LLViewerJointAttachment* attachment = iter->second;
if (attachment->getIsHUDAttachment() && attachment->getNumObjects() > 0)
{
return TRUE;
@@ -6393,10 +6389,10 @@ LLBBox LLVOAvatar::getHUDBBox() const
{
LLBBox bbox;
for (attachment_map_t::const_iterator iter = mAttachmentPoints.begin();
- iter != mAttachmentPoints.end(); )
+ iter != mAttachmentPoints.end();
+ ++iter)
{
- attachment_map_t::const_iterator curiter = iter++;
- LLViewerJointAttachment* attachment = curiter->second;
+ LLViewerJointAttachment* attachment = iter->second;
if (attachment->getIsHUDAttachment())
{
for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin();
@@ -6410,7 +6406,8 @@ LLBBox LLVOAvatar::getHUDBBox() const
bbox.addBBoxAgent(attached_object->getBoundingBoxAgent());
LLViewerObject::const_child_list_t& child_list = attached_object->getChildren();
for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
- iter != child_list.end(); iter++)
+ iter != child_list.end();
+ ++iter)
{
const LLViewerObject* child_objectp = *iter;
bbox.addBBoxAgent(child_objectp->getBoundingBoxAgent());
@@ -6691,7 +6688,7 @@ void LLVOAvatar::onBakedTextureMasksLoaded( BOOL success, LLViewerFetchedTexture
BOOL found_texture_id = false;
for (LLVOAvatarDictionary::Textures::const_iterator iter = LLVOAvatarDictionary::getInstance()->getTextures().begin();
iter != LLVOAvatarDictionary::getInstance()->getTextures().end();
- iter++)
+ ++iter)
{
const LLVOAvatarDictionary::TextureEntry *texture_dict = iter->second;
@@ -6802,9 +6799,9 @@ void LLVOAvatar::useBakedTexture( const LLUUID& id )
const LLVOAvatarDictionary::BakedEntry *baked_dict = LLVOAvatarDictionary::getInstance()->getBakedTexture((EBakedTextureIndex)i);
for (texture_vec_t::const_iterator local_tex_iter = baked_dict->mLocalTextures.begin();
local_tex_iter != baked_dict->mLocalTextures.end();
- local_tex_iter++)
+ ++local_tex_iter)
{
- this->setBakedReady(*local_tex_iter, TRUE);
+ setBakedReady(*local_tex_iter, TRUE);
}
// ! BACKWARDS COMPATIBILITY !
@@ -7697,7 +7694,7 @@ const std::string LLVOAvatar::getBakedStatusForPrintout() const
for (LLVOAvatarDictionary::Textures::const_iterator iter = LLVOAvatarDictionary::getInstance()->getTextures().begin();
iter != LLVOAvatarDictionary::getInstance()->getTextures().end();
- iter++)
+ ++iter)
{
const ETextureIndex index = iter->first;
const LLVOAvatarDictionary::TextureEntry *texture_dict = iter->second;
@@ -7802,7 +7799,8 @@ U32 calc_shame(const LLVOVolume* volume, std::set<LLUUID> &textures)
LLViewerObject::const_child_list_t& child_list = volume->getChildren();
for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
- iter != child_list.end(); iter++)
+ iter != child_list.end();
+ ++iter)
{
const LLViewerObject* child_objectp = *iter;
const LLDrawable* child_drawablep = child_objectp->mDrawable;
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 1180d43438..e3add8aa78 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -195,7 +195,6 @@ public:
public:
virtual bool isSelf() const { return false; } // True if this avatar is for this viewer's agent
bool isBuilt() const { return mIsBuilt; }
-
private:
BOOL mSupportsAlphaLayers; // For backwards compatibility, TRUE for 1.23+ clients
@@ -247,15 +246,18 @@ public:
//--------------------------------------------------------------------
public:
BOOL isFullyLoaded() const;
+protected:
virtual BOOL updateIsFullyLoaded();
BOOL processFullyLoadedChange(bool loading);
+ void updateRuthTimer(bool loading);
private:
BOOL mFullyLoaded;
BOOL mPreviousFullyLoaded;
BOOL mFullyLoadedInitialized;
S32 mFullyLoadedFrameCounter;
LLFrameTimer mFullyLoadedTimer;
-
+ LLFrameTimer mRuthTimer;
+
/** State
** **
*******************************************************************************/
@@ -649,7 +651,7 @@ public:
public:
void clampAttachmentPositions();
virtual const LLViewerJointAttachment* attachObject(LLViewerObject *viewer_object);
- BOOL detachObject(LLViewerObject *viewer_object);
+ virtual BOOL detachObject(LLViewerObject *viewer_object);
static LLVOAvatar* findAvatarFromAttachment(LLViewerObject* obj);
protected:
LLViewerJointAttachment* getTargetAttachmentPoint(LLViewerObject* viewer_object);
@@ -800,7 +802,6 @@ public:
BOOL isSitting(){return mIsSitting;}
void sitOnObject(LLViewerObject *sit_object);
void getOffObject();
-
private:
// set this property only with LLVOAvatar::sitDown method
BOOL mIsSitting;
diff --git a/indra/newview/llvoavatardefines.cpp b/indra/newview/llvoavatardefines.cpp
index 978a61972f..17b502ae80 100644
--- a/indra/newview/llvoavatardefines.cpp
+++ b/indra/newview/llvoavatardefines.cpp
@@ -61,14 +61,17 @@ LLVOAvatarDictionary::Textures::Textures()
addEntry(TEX_UPPER_UNDERSHIRT, new TextureEntry("upper_undershirt", TRUE, BAKED_NUM_INDICES, "UIImgDefaultUnderwearUUID", WT_UNDERSHIRT));
addEntry(TEX_LOWER_UNDERPANTS, new TextureEntry("lower_underpants", TRUE, BAKED_NUM_INDICES, "UIImgDefaultUnderwearUUID", WT_UNDERPANTS));
addEntry(TEX_SKIRT, new TextureEntry("skirt", TRUE, BAKED_NUM_INDICES, "UIImgDefaultSkirtUUID", WT_SKIRT));
+
addEntry(TEX_LOWER_ALPHA, new TextureEntry("lower_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", WT_ALPHA));
addEntry(TEX_UPPER_ALPHA, new TextureEntry("upper_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", WT_ALPHA));
addEntry(TEX_HEAD_ALPHA, new TextureEntry("head_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", WT_ALPHA));
addEntry(TEX_EYES_ALPHA, new TextureEntry("eyes_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", WT_ALPHA));
addEntry(TEX_HAIR_ALPHA, new TextureEntry("hair_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", WT_ALPHA));
+
addEntry(TEX_HEAD_TATTOO, new TextureEntry("head_tattoo", TRUE, BAKED_NUM_INDICES, "UIImgDefaultTattooUUID", WT_TATTOO));
addEntry(TEX_UPPER_TATTOO, new TextureEntry("upper_tattoo", TRUE, BAKED_NUM_INDICES, "UIImgDefaultTattooUUID", WT_TATTOO));
addEntry(TEX_LOWER_TATTOO, new TextureEntry("lower_tattoo", TRUE, BAKED_NUM_INDICES, "UIImgDefaultTattooUUID", WT_TATTOO));
+
addEntry(TEX_HEAD_BAKED, new TextureEntry("head-baked", FALSE, BAKED_HEAD));
addEntry(TEX_UPPER_BAKED, new TextureEntry("upper-baked", FALSE, BAKED_UPPER));
addEntry(TEX_LOWER_BAKED, new TextureEntry("lower-baked", FALSE, BAKED_LOWER));
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 99e358f409..4760d5a472 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -296,10 +296,10 @@ BOOL LLVOAvatarSelf::buildMenus()
{
BOOL attachment_found = FALSE;
for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
- iter != mAttachmentPoints.end(); )
+ iter != mAttachmentPoints.end();
+ ++iter)
{
- attachment_map_t::iterator curiter = iter++;
- LLViewerJointAttachment* attachment = curiter->second;
+ LLViewerJointAttachment* attachment = iter->second;
if (attachment->getGroup() == i)
{
LLMenuItemCallGL::Params item_params;
@@ -315,9 +315,9 @@ BOOL LLVOAvatarSelf::buildMenus()
}
item_params.name =(item_params.label );
item_params.on_click.function_name = "Object.AttachToAvatar";
- item_params.on_click.parameter = curiter->first;
+ item_params.on_click.parameter = iter->first;
item_params.on_enable.function_name = "Object.EnableWear";
- item_params.on_enable.parameter = curiter->first;
+ item_params.on_enable.parameter = iter->first;
LLMenuItemCallGL* item = LLUICtrlFactory::create<LLMenuItemCallGL>(item_params);
gAttachPieMenu->addChild(item);
@@ -342,10 +342,10 @@ BOOL LLVOAvatarSelf::buildMenus()
{
BOOL attachment_found = FALSE;
for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
- iter != mAttachmentPoints.end(); )
+ iter != mAttachmentPoints.end();
+ ++iter)
{
- attachment_map_t::iterator curiter = iter++;
- LLViewerJointAttachment* attachment = curiter->second;
+ LLViewerJointAttachment* attachment = iter->second;
if (attachment->getGroup() == i)
{
LLMenuItemCallGL::Params item_params;
@@ -360,9 +360,9 @@ BOOL LLVOAvatarSelf::buildMenus()
}
item_params.name =(item_params.label );
item_params.on_click.function_name = "Attachment.Detach";
- item_params.on_click.parameter = curiter->first;
+ item_params.on_click.parameter = iter->first;
item_params.on_enable.function_name = "Attachment.EnableDetach";
- item_params.on_enable.parameter = curiter->first;
+ item_params.on_enable.parameter = iter->first;
LLMenuItemCallGL* item = LLUICtrlFactory::create<LLMenuItemCallGL>(item_params);
gDetachPieMenu->addChild(item);
@@ -381,10 +381,10 @@ BOOL LLVOAvatarSelf::buildMenus()
// add screen attachments
for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
- iter != mAttachmentPoints.end(); )
+ iter != mAttachmentPoints.end();
+ ++iter)
{
- attachment_map_t::iterator curiter = iter++;
- LLViewerJointAttachment* attachment = curiter->second;
+ LLViewerJointAttachment* attachment = iter->second;
if (attachment->getGroup() == 8)
{
LLMenuItemCallGL::Params item_params;
@@ -399,16 +399,16 @@ BOOL LLVOAvatarSelf::buildMenus()
}
item_params.name =(item_params.label );
item_params.on_click.function_name = "Object.AttachToAvatar";
- item_params.on_click.parameter = curiter->first;
+ item_params.on_click.parameter = iter->first;
item_params.on_enable.function_name = "Object.EnableWear";
- item_params.on_enable.parameter = curiter->first;
+ item_params.on_enable.parameter = iter->first;
LLMenuItemCallGL* item = LLUICtrlFactory::create<LLMenuItemCallGL>(item_params);
gAttachScreenPieMenu->addChild(item);
item_params.on_click.function_name = "Attachment.DetachFromPoint";
- item_params.on_click.parameter = curiter->first;
+ item_params.on_click.parameter = iter->first;
item_params.on_enable.function_name = "Attachment.PointFilled";
- item_params.on_enable.parameter = curiter->first;
+ item_params.on_enable.parameter = iter->first;
item = LLUICtrlFactory::create<LLMenuItemCallGL>(item_params);
gDetachScreenPieMenu->addChild(item);
}
@@ -422,10 +422,10 @@ BOOL LLVOAvatarSelf::buildMenus()
break;
}
for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
- iter != mAttachmentPoints.end(); )
+ iter != mAttachmentPoints.end();
+ ++iter)
{
- attachment_map_t::iterator curiter = iter++;
- LLViewerJointAttachment* attachment = curiter->second;
+ LLViewerJointAttachment* attachment = iter->second;
if (attachment->getIsHUDAttachment() != (pass == 1))
{
continue;
@@ -442,12 +442,12 @@ BOOL LLVOAvatarSelf::buildMenus()
}
item_params.name =(item_params.label );
item_params.on_click.function_name = "Object.AttachToAvatar";
- item_params.on_click.parameter = curiter->first;
+ item_params.on_click.parameter = iter->first;
item_params.on_enable.function_name = "Object.EnableWear";
- item_params.on_enable.parameter = curiter->first;
+ item_params.on_enable.parameter = iter->first;
//* TODO: Skinning:
//LLSD params;
- //params["index"] = curiter->first;
+ //params["index"] = iter->first;
//params["label"] = attachment->getName();
//item->addEventHandler("on_enable", LLMenuItemCallGL::MenuCallback().function_name("Attachment.Label").parameter(params));
@@ -455,9 +455,9 @@ BOOL LLVOAvatarSelf::buildMenus()
gAttachSubMenu->addChild(item);
item_params.on_click.function_name = "Attachment.DetachFromPoint";
- item_params.on_click.parameter = curiter->first;
+ item_params.on_click.parameter = iter->first;
item_params.on_enable.function_name = "Attachment.PointFilled";
- item_params.on_enable.parameter = curiter->first;
+ item_params.on_enable.parameter = iter->first;
//* TODO: Skinning: item->addEventHandler("on_enable", LLMenuItemCallGL::MenuCallback().function_name("Attachment.Label").parameter(params));
item = LLUICtrlFactory::create<LLMenuItemCallGL>(item_params);
@@ -483,15 +483,15 @@ BOOL LLVOAvatarSelf::buildMenus()
// gather up all attachment points assigned to this group, and throw into map sorted by pie slice number
for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
- iter != mAttachmentPoints.end(); )
+ iter != mAttachmentPoints.end();
+ ++iter)
{
- attachment_map_t::iterator curiter = iter++;
- LLViewerJointAttachment* attachment = curiter->second;
+ LLViewerJointAttachment* attachment = iter->second;
if(attachment->getGroup() == group)
{
// use multimap to provide a partial order off of the pie slice key
S32 pie_index = attachment->getPieSlice();
- attachment_pie_menu_map.insert(std::make_pair(pie_index, curiter->first));
+ attachment_pie_menu_map.insert(std::make_pair(pie_index, iter->first));
}
}
@@ -556,7 +556,7 @@ BOOL LLVOAvatarSelf::loadLayersets()
BOOL success = TRUE;
for (LLVOAvatarXmlInfo::layer_info_list_t::const_iterator iter = sAvatarXmlInfo->mLayerInfoList.begin();
iter != sAvatarXmlInfo->mLayerInfoList.end();
- iter++)
+ ++iter)
{
// Construct a layerset for each one specified in avatar_lad.xml and initialize it as such.
const LLTexLayerSetInfo *info = *iter;
@@ -574,7 +574,7 @@ BOOL LLVOAvatarSelf::loadLayersets()
EBakedTextureIndex baked_index = BAKED_NUM_INDICES;
for (LLVOAvatarDictionary::BakedTextures::const_iterator baked_iter = LLVOAvatarDictionary::getInstance()->getBakedTextures().begin();
baked_iter != LLVOAvatarDictionary::getInstance()->getBakedTextures().end();
- baked_iter++)
+ ++baked_iter)
{
const LLVOAvatarDictionary::BakedEntry *baked_dict = baked_iter->second;
if (layer_set->isBodyRegion(baked_dict->mName))
@@ -597,7 +597,7 @@ BOOL LLVOAvatarSelf::loadLayersets()
// scan morph masks and let any affected layers know they have an associated morph
for (LLVOAvatar::morph_list_t::const_iterator morph_iter = mBakedTextureDatas[baked_index].mMaskedMorphs.begin();
morph_iter != mBakedTextureDatas[baked_index].mMaskedMorphs.end();
- morph_iter++)
+ ++morph_iter)
{
LLMaskedMorph *morph = *morph_iter;
LLTexLayerInterface* layer = layer_set->findLayerByName(morph->mLayer);
@@ -704,6 +704,13 @@ void LLVOAvatarSelf::updateVisualParams()
}
}
+ LLWearable *shape = gAgentWearables.getWearable(WT_SHAPE,0);
+ if (shape)
+ {
+ F32 gender = shape->getVisualParamWeight(80); // param 80 == gender
+ setVisualParamWeight("male",gender ,TRUE);
+ }
+
LLVOAvatar::updateVisualParams();
}
@@ -907,10 +914,10 @@ void LLVOAvatarSelf::restoreMeshData()
void LLVOAvatarSelf::updateAttachmentVisibility(U32 camera_mode)
{
for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
- iter != mAttachmentPoints.end(); )
+ iter != mAttachmentPoints.end();
+ ++iter)
{
- attachment_map_t::iterator curiter = iter++;
- LLViewerJointAttachment* attachment = curiter->second;
+ LLViewerJointAttachment* attachment = iter->second;
if (attachment->getIsHUDAttachment())
{
attachment->setAttachmentVisibility(TRUE);
@@ -951,7 +958,7 @@ void LLVOAvatarSelf::wearableUpdated( EWearableType type )
{
for (LLVOAvatarDictionary::BakedTextures::const_iterator baked_iter = LLVOAvatarDictionary::getInstance()->getBakedTextures().begin();
baked_iter != LLVOAvatarDictionary::getInstance()->getBakedTextures().end();
- baked_iter++)
+ ++baked_iter)
{
const LLVOAvatarDictionary::BakedEntry *baked_dict = baked_iter->second;
const LLVOAvatarDefines::EBakedTextureIndex index = baked_iter->first;
@@ -959,15 +966,14 @@ void LLVOAvatarSelf::wearableUpdated( EWearableType type )
{
for (LLVOAvatarDefines::wearables_vec_t::const_iterator type_iter = baked_dict->mWearables.begin();
type_iter != baked_dict->mWearables.end();
- type_iter++)
+ ++type_iter)
{
const EWearableType comp_type = *type_iter;
if (comp_type == type)
{
if (mBakedTextureDatas[index].mTexLayerSet)
{
- mBakedTextureDatas[index].mTexLayerSet->requestUpdate();
- mBakedTextureDatas[index].mTexLayerSet->requestUpload();
+ invalidateComposite(mBakedTextureDatas[index].mTexLayerSet, TRUE);
}
break;
}
@@ -979,57 +985,34 @@ void LLVOAvatarSelf::wearableUpdated( EWearableType type )
//-----------------------------------------------------------------------------
// isWearingAttachment()
//-----------------------------------------------------------------------------
-// Warning: include_linked_items = TRUE makes this operation expensive.
-BOOL LLVOAvatarSelf::isWearingAttachment( const LLUUID& inv_item_id , BOOL include_linked_items ) const
+BOOL LLVOAvatarSelf::isWearingAttachment(const LLUUID& inv_item_id) const
{
+ const LLUUID& base_inv_item_id = gInventory.getLinkedItemID(inv_item_id);
for (attachment_map_t::const_iterator iter = mAttachmentPoints.begin();
- iter != mAttachmentPoints.end(); )
+ iter != mAttachmentPoints.end();
+ ++iter)
{
- attachment_map_t::const_iterator curiter = iter++;
- const LLViewerJointAttachment* attachment = curiter->second;
- if (attachment->getAttachedObject(inv_item_id))
+ const LLViewerJointAttachment* attachment = iter->second;
+ if (attachment->getAttachedObject(base_inv_item_id))
{
return TRUE;
}
}
-
- if (include_linked_items)
- {
- LLInventoryModel::item_array_t item_array;
- gInventory.collectLinkedItems(inv_item_id, item_array);
- for (LLInventoryModel::item_array_t::const_iterator iter = item_array.begin();
- iter != item_array.end();
- iter++)
- {
- const LLViewerInventoryItem *linked_item = (*iter);
- const LLUUID &item_id = linked_item->getUUID();
- for (attachment_map_t::const_iterator iter = mAttachmentPoints.begin();
- iter != mAttachmentPoints.end(); )
- {
- attachment_map_t::const_iterator curiter = iter++;
- const LLViewerJointAttachment* attachment = curiter->second;
- if (attachment->getAttachedObject(item_id))
- {
- return TRUE;
- }
- }
- }
- }
-
return FALSE;
}
//-----------------------------------------------------------------------------
// getWornAttachment()
//-----------------------------------------------------------------------------
-LLViewerObject* LLVOAvatarSelf::getWornAttachment( const LLUUID& inv_item_id )
+LLViewerObject* LLVOAvatarSelf::getWornAttachment(const LLUUID& inv_item_id)
{
- for (attachment_map_t::iterator iter = mAttachmentPoints.begin();
- iter != mAttachmentPoints.end(); )
+ const LLUUID& base_inv_item_id = gInventory.getLinkedItemID(inv_item_id);
+ for (attachment_map_t::const_iterator iter = mAttachmentPoints.begin();
+ iter != mAttachmentPoints.end();
+ ++iter)
{
- attachment_map_t::iterator curiter = iter++;
- LLViewerJointAttachment* attachment = curiter->second;
- if (LLViewerObject *attached_object = attachment->getAttachedObject(inv_item_id))
+ LLViewerJointAttachment* attachment = iter->second;
+ if (LLViewerObject *attached_object = attachment->getAttachedObject(base_inv_item_id))
{
return attached_object;
}
@@ -1039,12 +1022,13 @@ LLViewerObject* LLVOAvatarSelf::getWornAttachment( const LLUUID& inv_item_id )
const std::string LLVOAvatarSelf::getAttachedPointName(const LLUUID& inv_item_id) const
{
+ const LLUUID& base_inv_item_id = gInventory.getLinkedItemID(inv_item_id);
for (attachment_map_t::const_iterator iter = mAttachmentPoints.begin();
- iter != mAttachmentPoints.end(); )
+ iter != mAttachmentPoints.end();
+ ++iter)
{
- attachment_map_t::const_iterator curiter = iter++;
- const LLViewerJointAttachment* attachment = curiter->second;
- if (attachment->getAttachedObject(inv_item_id))
+ const LLViewerJointAttachment* attachment = iter->second;
+ if (attachment->getAttachedObject(base_inv_item_id))
{
return attachment->getName();
}
@@ -1078,12 +1062,56 @@ const LLViewerJointAttachment *LLVOAvatarSelf::attachObject(LLViewerObject *view
gInventory.addChangedMask(LLInventoryObserver::LABEL, attachment_id);
}
}
-
gInventory.notifyObservers();
return attachment;
}
+//virtual
+BOOL LLVOAvatarSelf::detachObject(LLViewerObject *viewer_object)
+{
+ const LLUUID item_id = viewer_object->getItemID();
+ if (LLVOAvatar::detachObject(viewer_object))
+ {
+ // the simulator should automatically handle permission revocation
+
+ stopMotionFromSource(item_id);
+ LLFollowCamMgr::setCameraActive(viewer_object->getID(), FALSE);
+
+ LLViewerObject::const_child_list_t& child_list = viewer_object->getChildren();
+ for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
+ iter != child_list.end();
+ ++iter)
+ {
+ LLViewerObject* child_objectp = *iter;
+ // the simulator should automatically handle
+ // permissions revocation
+
+ stopMotionFromSource(child_objectp->getID());
+ LLFollowCamMgr::setCameraActive(child_objectp->getID(), FALSE);
+ }
+
+ // Make sure the inventory is in sync with the avatar.
+
+ // Update COF contents, don't trigger appearance update.
+ if (gAgent.getAvatarObject() == NULL)
+ {
+ llinfos << "removeItemLinks skipped, avatar is under destruction" << llendl;
+ }
+ else
+ {
+ LLAppearanceManager::dumpCat(LLAppearanceManager::getCOF(),"Removing attachment link:");
+ LLAppearanceManager::removeItemLinks(item_id, false);
+ }
+
+ // BAP - needs to change for label to track link.
+ gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id);
+ gInventory.notifyObservers();
+ return TRUE;
+ }
+ return FALSE;
+}
+
void LLVOAvatarSelf::getAllAttachmentsArray(LLDynamicArray<S32>& attachments)
{
for (LLVOAvatar::attachment_map_t::const_iterator iter = mAttachmentPoints.begin();
@@ -1235,7 +1263,7 @@ BOOL LLVOAvatarSelf::isLocalTextureDataAvailable(const LLTexLayerSet* layerset)
return getLocalDiscardLevel(TEX_HEAD_BODYPAINT) >= 0; */
for (LLVOAvatarDictionary::BakedTextures::const_iterator baked_iter = LLVOAvatarDictionary::getInstance()->getBakedTextures().begin();
baked_iter != LLVOAvatarDictionary::getInstance()->getBakedTextures().end();
- baked_iter++)
+ ++baked_iter)
{
const EBakedTextureIndex baked_index = baked_iter->first;
if (layerset == mBakedTextureDatas[baked_index].mTexLayerSet)
@@ -1244,7 +1272,7 @@ BOOL LLVOAvatarSelf::isLocalTextureDataAvailable(const LLTexLayerSet* layerset)
const LLVOAvatarDictionary::BakedEntry *baked_dict = baked_iter->second;
for (texture_vec_t::const_iterator local_tex_iter = baked_dict->mLocalTextures.begin();
local_tex_iter != baked_dict->mLocalTextures.end();
- local_tex_iter++)
+ ++local_tex_iter)
{
const ETextureIndex tex_index = *local_tex_iter;
const EWearableType wearable_type = LLVOAvatarDictionary::getTEWearableType(tex_index);
@@ -1276,7 +1304,7 @@ BOOL LLVOAvatarSelf::isLocalTextureDataFinal(const LLTexLayerSet* layerset) cons
const LLVOAvatarDictionary::BakedEntry *baked_dict = LLVOAvatarDictionary::getInstance()->getBakedTexture((EBakedTextureIndex)i);
for (texture_vec_t::const_iterator local_tex_iter = baked_dict->mLocalTextures.begin();
local_tex_iter != baked_dict->mLocalTextures.end();
- local_tex_iter++)
+ ++local_tex_iter)
{
const ETextureIndex tex_index = *local_tex_iter;
const EWearableType wearable_type = LLVOAvatarDictionary::getTEWearableType(tex_index);
@@ -1562,7 +1590,7 @@ void LLVOAvatarSelf::setLocalTexture(ETextureIndex type, LLViewerTexture* src_te
setBakedReady(type,baked_version_ready,index);
}
//virtual
-void LLVOAvatarSelf::setBakedReady(LLVOAvatarDefines::ETextureIndex type, BOOL baked_version_exists, U32 index)
+void LLVOAvatarSelf::setBakedReady(LLVOAvatarDefines::ETextureIndex type, BOOL baked_version_exists, U32 index)
{
if (!isIndexLocalTexture(type)) return;
LLLocalTextureObject *local_tex_obj = getLocalTextureObject(type,index);
@@ -1583,7 +1611,7 @@ void LLVOAvatarSelf::dumpLocalTextures() const
if (isTextureDefined(baked_equiv[i])) */
for (LLVOAvatarDictionary::Textures::const_iterator iter = LLVOAvatarDictionary::getInstance()->getTextures().begin();
iter != LLVOAvatarDictionary::getInstance()->getTextures().end();
- iter++)
+ ++iter)
{
const LLVOAvatarDictionary::TextureEntry *texture_dict = iter->second;
if (!texture_dict->mIsLocalTexture || !texture_dict->mIsUsedByBakedTexture)
@@ -1773,7 +1801,7 @@ BOOL LLVOAvatarSelf::canGrabLocalTexture(ETextureIndex type, U32 index) const
const LLVOAvatarDictionary::BakedEntry *baked_dict = LLVOAvatarDictionary::getInstance()->getBakedTexture(baked_index);
for (texture_vec_t::const_iterator iter = baked_dict->mLocalTextures.begin();
iter != baked_dict->mLocalTextures.end();
- iter++)
+ ++iter)
{
const ETextureIndex t_index = (*iter);
lldebugs << "Checking index " << (U32) t_index << llendl;
@@ -1949,7 +1977,7 @@ void LLVOAvatarSelf::processRebakeAvatarTextures(LLMessageSystem* msg, void**)
TEX_UPPER_BAKED, */
for (LLVOAvatarDictionary::Textures::const_iterator iter = LLVOAvatarDictionary::getInstance()->getTextures().begin();
iter != LLVOAvatarDictionary::getInstance()->getTextures().end();
- iter++)
+ ++iter)
{
const ETextureIndex index = iter->first;
const LLVOAvatarDictionary::TextureEntry *texture_dict = iter->second;
diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h
index 0b76d3e960..a555d04a63 100644
--- a/indra/newview/llvoavatarself.h
+++ b/indra/newview/llvoavatarself.h
@@ -187,8 +187,8 @@ public:
void setLocalTextureTE(U8 te, LLViewerTexture* image, BOOL set_by_user, U32 index);
const LLUUID& grabLocalTexture(LLVOAvatarDefines::ETextureIndex type, U32 index) const;
BOOL canGrabLocalTexture(LLVOAvatarDefines::ETextureIndex type, U32 index) const;
-protected:
/*virtual*/ void setLocalTexture(LLVOAvatarDefines::ETextureIndex type, LLViewerTexture* tex, BOOL baked_version_exits, U32 index);
+protected:
/*virtual*/ void setBakedReady(LLVOAvatarDefines::ETextureIndex type, BOOL baked_version_exists, U32 index);
void localTextureLoaded(BOOL succcess, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata);
void getLocalTextureByteCount(S32* gl_byte_count) const;
@@ -198,8 +198,8 @@ protected:
private:
static void onLocalTextureLoaded(BOOL succcess, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata);
- /*virtual*/ void setImage(const U8 te, LLViewerTexture *imagep, const U32 index);
- /*virtual*/ LLViewerTexture* getImage(const U8 te, const U32 index) const;
+ /*virtual*/ void setImage(const U8 te, LLViewerTexture *imagep, const U32 index);
+ /*virtual*/ LLViewerTexture* getImage(const U8 te, const U32 index) const;
//--------------------------------------------------------------------
@@ -220,7 +220,6 @@ protected:
public:
void requestLayerSetUploads();
void requestLayerSetUpdate(LLVOAvatarDefines::ETextureIndex i);
-public:
LLTexLayerSet* getLayerSet(LLVOAvatarDefines::ETextureIndex index) const;
//--------------------------------------------------------------------
@@ -267,26 +266,27 @@ protected:
**/
public:
- /*virtual*/ BOOL isWearingWearableType(EWearableType type ) const;
- void wearableUpdated(EWearableType type);
+ /*virtual*/ BOOL isWearingWearableType(EWearableType type) const;
+ void wearableUpdated(EWearableType type);
+protected:
+ U32 getNumWearables(LLVOAvatarDefines::ETextureIndex i) const;
//--------------------------------------------------------------------
// Attachments
//--------------------------------------------------------------------
public:
void updateAttachmentVisibility(U32 camera_mode);
- BOOL isWearingAttachment(const LLUUID& inv_item_id, BOOL include_linked_items = FALSE) const;
- LLViewerObject* getWornAttachment(const LLUUID& inv_item_id );
+ BOOL isWearingAttachment(const LLUUID& inv_item_id) const;
+ LLViewerObject* getWornAttachment(const LLUUID& inv_item_id);
const std::string getAttachedPointName(const LLUUID& inv_item_id) const;
/*virtual*/ const LLViewerJointAttachment *attachObject(LLViewerObject *viewer_object);
+ /*virtual*/ BOOL detachObject(LLViewerObject *viewer_object);
void getAllAttachmentsArray(LLDynamicArray<S32>& attachments);
//--------------------------------------------------------------------
// HUDs
//--------------------------------------------------------------------
private:
- U32 getNumWearables(LLVOAvatarDefines::ETextureIndex i) const;
-
LLViewerJoint* mScreenp; // special purpose joint for HUD attachments
/** Attachments
diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp
index 09e8c522b0..8f74ea29ac 100644
--- a/indra/newview/llwearable.cpp
+++ b/indra/newview/llwearable.cpp
@@ -35,6 +35,7 @@
#include "llagent.h"
#include "llagentwearables.h"
#include "llfloatercustomize.h"
+#include "lllocaltextureobject.h"
#include "llviewertexturelist.h"
#include "llinventorymodel.h"
#include "llviewerregion.h"
@@ -138,11 +139,12 @@ BOOL LLWearable::exportFile(LLFILE* file) const
return FALSE;
}
- for (VisualParamIndexMap_t::const_iterator iter = mVisualParamIndexMap.begin();
- iter != mVisualParamIndexMap.end(); ++iter)
+ for (visual_param_index_map_t::const_iterator iter = mVisualParamIndexMap.begin();
+ iter != mVisualParamIndexMap.end();
+ ++iter)
{
S32 param_id = iter->first;
- LLVisualParam* param = iter->second;
+ const LLVisualParam* param = iter->second;
F32 param_weight = param->getWeight();
if( fprintf( file, "%d %s\n", param_id, terse_F32_to_string( param_weight ).c_str() ) < 0 )
{
@@ -173,13 +175,13 @@ BOOL LLWearable::exportFile(LLFILE* file) const
void LLWearable::createVisualParams()
{
LLVOAvatar* avatar = gAgent.getAvatarObject();
- for( LLViewerVisualParam* param = (LLViewerVisualParam*) avatar->getFirstVisualParam();
- param;
- param = (LLViewerVisualParam*) avatar->getNextVisualParam() )
+ for (LLViewerVisualParam* param = (LLViewerVisualParam*) avatar->getFirstVisualParam();
+ param;
+ param = (LLViewerVisualParam*) avatar->getNextVisualParam())
{
- if( (param->getWearableType() == mType) )
+ if (param->getWearableType() == mType)
{
- if( mVisualParamIndexMap[param->getID()] )
+ if (mVisualParamIndexMap[param->getID()])
{
delete mVisualParamIndexMap[param->getID()];
}
@@ -188,7 +190,9 @@ void LLWearable::createVisualParams()
}
// resync driver parameters to point to the newly cloned driven parameters
- for( VisualParamIndexMap_t::iterator param_iter = mVisualParamIndexMap.begin(); param_iter != mVisualParamIndexMap.end(); param_iter++ )
+ for (visual_param_index_map_t::iterator param_iter = mVisualParamIndexMap.begin();
+ param_iter != mVisualParamIndexMap.end();
+ ++param_iter)
{
LLVisualParam* param = param_iter->second;
LLVisualParam*(LLWearable::*wearable_function)(S32)const = &LLWearable::getVisualParam;
@@ -404,9 +408,10 @@ BOOL LLWearable::importFile( LLFILE* file )
{
delete mSavedTEMap[te];
}
-
- mTEMap[te] = new LLLocalTextureObject(image, LLUUID(text_buffer));
- mSavedTEMap[te] = new LLLocalTextureObject(image, LLUUID(text_buffer));
+
+ LLUUID textureid(text_buffer);
+ mTEMap[te] = new LLLocalTextureObject(image, textureid);
+ mSavedTEMap[te] = new LLLocalTextureObject(image, textureid);
createLayers(te);
}
@@ -533,6 +538,7 @@ BOOL LLWearable::isDirty() const
const LLUUID& saved_image_id = saved_iter->second->getID();
if (saved_image_id != current_image_id)
{
+ // saved vs current images are different, wearable is dirty
return TRUE;
}
}
@@ -873,7 +879,7 @@ void LLWearable::setVisualParams()
{
LLVOAvatarSelf* avatar = gAgent.getAvatarObject();
- for (VisualParamIndexMap_t::const_iterator iter = mVisualParamIndexMap.begin(); iter != mVisualParamIndexMap.end(); iter++)
+ for (visual_param_index_map_t::const_iterator iter = mVisualParamIndexMap.begin(); iter != mVisualParamIndexMap.end(); iter++)
{
S32 id = iter->first;
LLVisualParam *wearable_param = iter->second;
@@ -912,15 +918,15 @@ F32 LLWearable::getVisualParamWeight(S32 param_index) const
LLVisualParam* LLWearable::getVisualParam(S32 index) const
{
- VisualParamIndexMap_t::const_iterator iter = mVisualParamIndexMap.find(index);
+ visual_param_index_map_t::const_iterator iter = mVisualParamIndexMap.find(index);
return (iter == mVisualParamIndexMap.end()) ? NULL : iter->second;
}
-void LLWearable::getVisualParams(visualParamCluster_t &list)
+void LLWearable::getVisualParams(visual_param_vec_t &list)
{
- VisualParamIndexMap_t::iterator iter = mVisualParamIndexMap.begin();
- VisualParamIndexMap_t::iterator end = mVisualParamIndexMap.end();
+ visual_param_index_map_t::iterator iter = mVisualParamIndexMap.begin();
+ visual_param_index_map_t::iterator end = mVisualParamIndexMap.end();
// add all visual params to the passed-in vector
for( ; iter != end; ++iter )
@@ -929,7 +935,7 @@ void LLWearable::getVisualParams(visualParamCluster_t &list)
}
}
-LLColor4 LLWearable::getClothesColor(S32 te)
+LLColor4 LLWearable::getClothesColor(S32 te) const
{
LLColor4 color;
U32 param_name[3];
@@ -973,7 +979,7 @@ void LLWearable::revertValues()
}
}
-BOOL LLWearable::isOnTop()
+BOOL LLWearable::isOnTop() const
{
return (this == gAgentWearables.getTopWearable(mType));
}
@@ -996,7 +1002,7 @@ void LLWearable::saveValues()
{
//update saved settings so wearable is no longer dirty
mSavedVisualParamMap.clear();
- for (VisualParamIndexMap_t::const_iterator iter = mVisualParamIndexMap.begin(); iter != mVisualParamIndexMap.end(); ++iter)
+ for (visual_param_index_map_t::const_iterator iter = mVisualParamIndexMap.begin(); iter != mVisualParamIndexMap.end(); ++iter)
{
S32 id = iter->first;
LLVisualParam *wearable_param = iter->second;
@@ -1174,7 +1180,7 @@ std::ostream& operator<<(std::ostream &s, const LLWearable &w)
//w.mSaleInfo
s << " Params:" << "\n";
- for (LLWearable::VisualParamIndexMap_t::const_iterator iter = w.mVisualParamIndexMap.begin();
+ for (LLWearable::visual_param_index_map_t::const_iterator iter = w.mVisualParamIndexMap.begin();
iter != w.mVisualParamIndexMap.end(); ++iter)
{
S32 param_id = iter->first;
diff --git a/indra/newview/llwearable.h b/indra/newview/llwearable.h
index 201f4f91ef..01bd9652a5 100644
--- a/indra/newview/llwearable.h
+++ b/indra/newview/llwearable.h
@@ -84,7 +84,7 @@ public:
LLLocalTextureObject* getLocalTextureObject(S32 index) const;
public:
- typedef std::vector<LLVisualParam*> visualParamCluster_t;
+ typedef std::vector<LLVisualParam*> visual_param_vec_t;
BOOL isDirty() const;
BOOL isOldVersion() const;
@@ -118,19 +118,19 @@ public:
void setVisualParamWeight(S32 index, F32 value, BOOL set_by_user);
F32 getVisualParamWeight(S32 index) const;
LLVisualParam* getVisualParam(S32 index) const;
- void getVisualParams(visualParamCluster_t &list);
+ void getVisualParams(visual_param_vec_t &list);
- LLColor4 getClothesColor(S32 te);
+ LLColor4 getClothesColor(S32 te) const;
void setClothesColor( S32 te, const LLColor4& new_color, BOOL set_by_user );
void revertValues();
- BOOL isOnTop();
+ BOOL isOnTop() const;
private:
typedef std::map<S32, LLLocalTextureObject*> te_map_t;
- typedef std::map<S32, LLVisualParam *> VisualParamIndexMap_t;
+ typedef std::map<S32, LLVisualParam *> visual_param_index_map_t;
void createLayers(S32 te);
void createVisualParams();
@@ -151,7 +151,7 @@ private:
typedef std::map<S32, F32> param_map_t;
param_map_t mSavedVisualParamMap; // last saved version of visual params
- VisualParamIndexMap_t mVisualParamIndexMap;
+ visual_param_index_map_t mVisualParamIndexMap;
te_map_t mTEMap; // maps TE to LocalTextureObject
te_map_t mSavedTEMap; // last saved version of TEMap
diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp
index 0257329dc1..da62223aac 100644
--- a/indra/newview/llwearablelist.cpp
+++ b/indra/newview/llwearablelist.cpp
@@ -74,21 +74,8 @@ LLWearableList::~LLWearableList()
mList.clear();
}
-void LLWearableList::getAsset(const LLAssetID& _assetID, const std::string& wearable_name, LLAssetType::EType asset_type, void(*asset_arrived_callback)(LLWearable*, void* userdata), void* userdata)
+void LLWearableList::getAsset(const LLAssetID& assetID, const std::string& wearable_name, LLAssetType::EType asset_type, void(*asset_arrived_callback)(LLWearable*, void* userdata), void* userdata)
{
- LLAssetID assetID = _assetID;
-
- // A bit of a hack since wearables database doesn't contain asset types...
- // Perform indirection in case this assetID is in fact a link. This only works
- // because of the assumption that all assetIDs and itemIDs are unique (i.e.
- // no assetID is also used as an itemID elsewhere); therefore if the assetID
- // exists as an itemID in the user's inventory, then this must be a link.
- const LLInventoryItem *linked_item = gInventory.getItem(_assetID);
- if (linked_item)
- {
- assetID = linked_item->getAssetUUID();
- asset_type = linked_item->getType();
- }
llassert( (asset_type == LLAssetType::AT_CLOTHING) || (asset_type == LLAssetType::AT_BODYPART) );
LLWearable* instance = get_if_there(mList, assetID, (LLWearable*)NULL );
if( instance )
diff --git a/indra/newview/llwldaycycle.cpp b/indra/newview/llwldaycycle.cpp
index 10a9703d1a..7f0c1a13f3 100644
--- a/indra/newview/llwldaycycle.cpp
+++ b/indra/newview/llwldaycycle.cpp
@@ -36,6 +36,7 @@
#include "llsdserialize.h"
#include "llwlparammanager.h"
#include "llnotifications.h"
+#include "llxmlnode.h"
#include <map>
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp
index 3aad5c7378..823db027ee 100644
--- a/indra/newview/llworldmapview.cpp
+++ b/indra/newview/llworldmapview.cpp
@@ -368,7 +368,7 @@ void LLWorldMapView::draw()
continue;
}
- current_image->setBoostLevel(LLViewerTexture::BOOST_MAP_LAYER);
+ current_image->setBoostLevel(LLViewerTexture::BOOST_MAP);
current_image->setKnownDrawSize(llround(pix_width * LLUI::sGLScaleFactor.mV[VX]), llround(pix_height * LLUI::sGLScaleFactor.mV[VY]));
if (!current_image->hasGLTexture())
diff --git a/indra/newview/skins/default/textures/alpha_gradient.tga b/indra/newview/skins/default/textures/alpha_gradient.tga
new file mode 100644
index 0000000000..6fdba25d4e
--- /dev/null
+++ b/indra/newview/skins/default/textures/alpha_gradient.tga
Binary files differ
diff --git a/indra/newview/skins/default/textures/alpha_gradient_2d.j2c b/indra/newview/skins/default/textures/alpha_gradient_2d.j2c
new file mode 100644
index 0000000000..5de5a80a65
--- /dev/null
+++ b/indra/newview/skins/default/textures/alpha_gradient_2d.j2c
Binary files differ
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index 546a06b93f..01976c9a5c 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -54,6 +54,11 @@
<texture name="CameraView_Off" file_name="bottomtray/CameraView_Off.png" preload="false" />
<texture name="CameraView_Over" file_name="bottomtray/CameraView_Over.png" preload="false" />
+ <texture name="CameraPreset_Rear" file_name="camera_presets/camera_presets_rear.png" preload="false" />
+ <texture name="CameraPreset_3_4" file_name="camera_presets/camera_presets_3_4.png" preload="false" />
+ <texture name="CameraPreset_Front" file_name="camera_presets/camera_presets_front.png" preload="false" />
+ <texture name="CameraPreset_Mouselook" file_name="camera_presets/camera_presets_mouselook.png" preload="false" />
+
<texture name="Checkbox_Off_Disabled" file_name="widgets/Checkbox_Disabled.png" preload="true" />
<texture name="Checkbox_On_Disabled" file_name="widgets/Checkbox_On_Disabled.png" preload="true" />
<texture name="Checkbox_Off" file_name="widgets/Checkbox_Off.png" preload="true" />
@@ -118,6 +123,8 @@
<texture name="Icon_Dock_Press" file_name="windows/Icon_Dock_Press.png" preload="true" />
<texture name="Icon_For_Sale" file_name="icons/Icon_For_sale.png" preload="false" />
+ <texture name="Banner_ForSale" file_name="Banner_ForSale.png" preload="false" />
+ <texture name="Banner_YouAreHere" file_name="Banner_YouAreHere.png" preload="false" />
<texture name="Icon_Gear_Background" file_name="windows/Icon_Gear_Background.png" preload="false" />
<texture name="Icon_Gear_Foreground" file_name="windows/Icon_Gear_Foreground.png" preload="false" />
diff --git a/indra/newview/skins/default/xui/en/favorites_bar_button.xml b/indra/newview/skins/default/xui/en/favorites_bar_button.xml
index a8d3f440c3..c35cbb1539 100644
--- a/indra/newview/skins/default/xui/en/favorites_bar_button.xml
+++ b/indra/newview/skins/default/xui/en/favorites_bar_button.xml
@@ -4,7 +4,7 @@
<button
follows="left|bottom"
halign="center"
- height="23"
+ height="15"
image_disabled="transparent.j2c"
image_disabled_selected="transparent.j2c"
image_selected="transparent.j2c"
@@ -18,6 +18,6 @@
left="0"
name="favorites_bar_btn"
tab_stop="false"
- top="10"
+ top="0"
use_ellipses="true"
width="120" />
diff --git a/indra/newview/skins/default/xui/en/floater_avatar_textures.xml b/indra/newview/skins/default/xui/en/floater_avatar_textures.xml
index f6b965f139..e677426ee5 100644
--- a/indra/newview/skins/default/xui/en/floater_avatar_textures.xml
+++ b/indra/newview/skins/default/xui/en/floater_avatar_textures.xml
@@ -5,7 +5,7 @@
name="avatar_texture_debug"
help_topic="avatar_texture_debug"
title="Avatar Textures"
- width="960">
+ width="1250">
<floater.string
name="InvalidAvatar">
INVALID AVATAR
@@ -41,6 +41,7 @@
name="Dump"
top_delta="1"
width="150" />
+
<texture_picker
height="143"
label="Hair"
@@ -54,11 +55,20 @@
label="Hair"
layout="topleft"
left_pad="7"
- name="hair"
+ name="hair_grain"
top_delta="0"
width="128" />
<texture_picker
height="143"
+ label="Hair Alpha"
+ layout="topleft"
+ left_pad="7"
+ name="hair_alpha"
+ top_delta="0"
+ width="128" />
+
+ <texture_picker
+ height="143"
label="Head"
layout="topleft"
left="10"
@@ -70,11 +80,28 @@
label="Makeup"
layout="topleft"
left_pad="7"
- name="head bodypaint"
+ name="head_bodypaint"
+ top_delta="0"
+ width="128" />
+ <texture_picker
+ height="143"
+ label="Head Alpha"
+ layout="topleft"
+ left_pad="7"
+ name="head_alpha"
top_delta="0"
width="128" />
<texture_picker
height="143"
+ label="Head Tattoo"
+ layout="topleft"
+ left_pad="7"
+ name="head_tattoo"
+ top_delta="0"
+ width="128" />
+
+ <texture_picker
+ height="143"
label="Eyes"
layout="topleft"
left="10"
@@ -86,9 +113,18 @@
label="Eye"
layout="topleft"
left_pad="7"
- name="iris"
+ name="eyes_iris"
+ top_delta="0"
+ width="128" />
+ <texture_picker
+ height="143"
+ label="Eyes Alpha"
+ layout="topleft"
+ left_pad="7"
+ name="eyes_alpha"
top_delta="0"
width="128" />
+
<texture_picker
height="143"
label="Upper Body"
@@ -99,10 +135,10 @@
width="128" />
<texture_picker
height="143"
- label="Upper Body Tattoo"
+ label="Upper Body Bodypaint"
layout="topleft"
left_pad="7"
- name="upper bodypaint"
+ name="upper_bodypaint"
top_delta="0"
width="128" />
<texture_picker
@@ -110,7 +146,7 @@
label="Undershirt"
layout="topleft"
left_pad="7"
- name="undershirt"
+ name="upper_undershirt"
top_delta="0"
width="128" />
<texture_picker
@@ -118,7 +154,7 @@
label="Gloves"
layout="topleft"
left_pad="7"
- name="gloves"
+ name="upper_gloves"
top_delta="0"
width="128" />
<texture_picker
@@ -126,7 +162,7 @@
label="Shirt"
layout="topleft"
left_pad="7"
- name="shirt"
+ name="upper_shirt"
top_delta="0"
width="128" />
<texture_picker
@@ -134,11 +170,28 @@
label="Upper Jacket"
layout="topleft"
left_pad="7"
- name="upper jacket"
+ name="upper_jacket"
top_delta="0"
width="128" />
<texture_picker
height="143"
+ label="Upper Alpha"
+ layout="topleft"
+ left_pad="7"
+ name="upper_alpha"
+ top_delta="0"
+ width="128" />
+ <texture_picker
+ height="143"
+ label="Upper Tattoo"
+ layout="topleft"
+ left_pad="7"
+ name="upper_tattoo"
+ top_delta="0"
+ width="128" />
+
+ <texture_picker
+ height="143"
label="Lower Body"
layout="topleft"
left="10"
@@ -147,10 +200,10 @@
width="128" />
<texture_picker
height="143"
- label="Lower Body Tattoo"
+ label="Lower Body Bodypaint"
layout="topleft"
left_pad="7"
- name="lower bodypaint"
+ name="lower_bodypaint"
top_delta="0"
width="128" />
<texture_picker
@@ -158,7 +211,7 @@
label="Underpants"
layout="topleft"
left_pad="7"
- name="underpants"
+ name="lower_underpants"
top_delta="0"
width="128" />
<texture_picker
@@ -166,7 +219,7 @@
label="Socks"
layout="topleft"
left_pad="7"
- name="socks"
+ name="lower_socks"
top_delta="0"
width="128" />
<texture_picker
@@ -174,7 +227,7 @@
label="Shoes"
layout="topleft"
left_pad="7"
- name="shoes"
+ name="lower_shoes"
top_delta="0"
width="128" />
<texture_picker
@@ -182,7 +235,7 @@
label="Pants"
layout="topleft"
left_pad="7"
- name="pants"
+ name="lower_pants"
top_delta="0"
width="128" />
<texture_picker
@@ -190,9 +243,26 @@
label="Jacket"
layout="topleft"
left_pad="7"
- name="lower jacket"
+ name="lower_jacket"
+ top_delta="0"
+ width="128" />
+ <texture_picker
+ height="143"
+ label="Lower Alpha"
+ layout="topleft"
+ left_pad="7"
+ name="lower_alpha"
+ top_delta="0"
+ width="128" />
+ <texture_picker
+ height="143"
+ label="Lower Tattoo"
+ layout="topleft"
+ left_pad="7"
+ name="lower_tattoo"
top_delta="0"
width="128" />
+
<texture_picker
height="143"
label="Skirt"
@@ -209,4 +279,5 @@
name="skirt"
top_delta="0"
width="128" />
+
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_camera.xml b/indra/newview/skins/default/xui/en/floater_camera.xml
index a5c73a7ca4..520249c2a2 100644
--- a/indra/newview/skins/default/xui/en/floater_camera.xml
+++ b/indra/newview/skins/default/xui/en/floater_camera.xml
@@ -80,6 +80,75 @@
tool_tip="Zoom camera toward focus"
top_delta="0"
width="16" />
+ <panel
+ height="70"
+ layout="topleft"
+ left="15"
+ name="camera_presets"
+ top="15"
+ visible="false"
+ width="75">
+ <button
+ height="30"
+ image_selected="CameraPreset_Rear"
+ image_unselected="CameraPreset_Rear"
+ layout="topleft"
+ left="5"
+ name="rear_view"
+ picture_style="true"
+ tool_tip="Rear View"
+ top="2"
+ width="30">
+ <click_callback
+ function="CameraPresets.ChangeView"
+ parameter="rear_view" />
+ </button>
+ <button
+ height="30"
+ image_selected="CameraPreset_3_4"
+ image_unselected="CameraPreset_3_4"
+ layout="topleft"
+ left_pad="5"
+ name="group_view"
+ picture_style="true"
+ tool_tip="Group View"
+ top="2"
+ width="30">
+ <click_callback
+ function="CameraPresets.ChangeView"
+ parameter="group_view" />
+ </button>
+ <button
+ height="30"
+ image_selected="CameraPreset_Front"
+ image_unselected="CameraPreset_Front"
+ layout="topleft"
+ left="5"
+ name="front_view"
+ picture_style="true"
+ tool_tip="Front View"
+ top_pad="2"
+ width="30">
+ <click_callback
+ function="CameraPresets.ChangeView"
+ parameter="front_view" />
+ </button>
+ <button
+ height="30"
+ image_selected="CameraPreset_Mouselook"
+ image_unselected="CameraPreset_Mouselook"
+ layout="topleft"
+ left_pad="5"
+ name="mouselook_view"
+ picture_style="true"
+ tool_tip="Mouselook View"
+ top_pad="-30"
+ width="30">
+ <click_callback
+ function="CameraPresets.ChangeView"
+ parameter="mouselook_view" />
+ </button>
+ </panel>
</panel>
<panel
border="true"
diff --git a/indra/newview/skins/default/xui/en/floater_critical.xml b/indra/newview/skins/default/xui/en/floater_critical.xml
index 7d1a1113b0..5475a1cf6a 100644
--- a/indra/newview/skins/default/xui/en/floater_critical.xml
+++ b/indra/newview/skins/default/xui/en/floater_critical.xml
@@ -5,7 +5,6 @@
height="500"
layout="topleft"
name="modal container"
- help_topic="modal_container"
width="600">
<button
height="20"
diff --git a/indra/newview/skins/default/xui/en/floater_customize.xml b/indra/newview/skins/default/xui/en/floater_customize.xml
index 70468e7474..57f5800f2c 100644
--- a/indra/newview/skins/default/xui/en/floater_customize.xml
+++ b/indra/newview/skins/default/xui/en/floater_customize.xml
@@ -39,10 +39,10 @@
height="18"
image_name="Lock"
layout="topleft"
- left="333"
+ left="315"
mouse_opaque="true"
name="square"
- top="5"
+ top="4"
width="18" />
<icon
height="16"
@@ -335,10 +335,10 @@ scratch and wear it.
height="18"
image_name="Lock"
layout="topleft"
- left="333"
+ left="315"
mouse_opaque="true"
name="square"
- top="5"
+ top="4"
width="18" />
<icon
height="16"
@@ -590,10 +590,10 @@ scratch and wear it.
height="18"
image_name="Lock"
layout="topleft"
- left="333"
+ left="315"
mouse_opaque="true"
name="square"
- top="5"
+ top="4"
width="18" />
<icon
height="16"
@@ -818,10 +818,10 @@ scratch and wear it.
height="18"
image_name="Lock"
layout="topleft"
- left="333"
+ left="315"
mouse_opaque="true"
name="square"
- top="5"
+ top="4"
width="18" />
<icon
height="16"
@@ -1006,10 +1006,10 @@ scratch and wear it.
height="18"
image_name="Lock"
layout="topleft"
- left="333"
+ left="315"
mouse_opaque="true"
name="square"
- top="5"
+ top="4"
width="18" />
<icon
height="16"
@@ -1212,10 +1212,10 @@ scratch and wear it.
height="18"
image_name="Lock"
layout="topleft"
- left="333"
+ left="315"
mouse_opaque="true"
name="square"
- top="5"
+ top="4"
width="18" />
<icon
height="16"
@@ -1418,10 +1418,10 @@ scratch and wear it.
height="18"
image_name="Lock"
layout="topleft"
- left="333"
+ left="315"
mouse_opaque="true"
name="square"
- top="5"
+ top="4"
width="18" />
<icon
height="16"
@@ -1624,10 +1624,10 @@ scratch and wear it.
height="18"
image_name="Lock"
layout="topleft"
- left="333"
+ left="315"
mouse_opaque="true"
name="square"
- top="5"
+ top="4"
width="18" />
<icon
height="16"
@@ -1830,10 +1830,10 @@ scratch and wear it.
height="18"
image_name="Lock"
layout="topleft"
- left="333"
+ left="315"
mouse_opaque="true"
name="square"
- top="5"
+ top="4"
width="18" />
<icon
height="16"
@@ -2048,10 +2048,10 @@ scratch and wear it.
height="18"
image_name="Lock"
layout="topleft"
- left="333"
+ left="315"
mouse_opaque="true"
name="square"
- top="5"
+ top="4"
width="18" />
<icon
height="16"
@@ -2254,10 +2254,10 @@ scratch and wear it.
height="18"
image_name="Lock"
layout="topleft"
- left="333"
+ left="315"
mouse_opaque="true"
name="square"
- top="5"
+ top="4"
width="18" />
<icon
height="16"
@@ -2460,10 +2460,10 @@ scratch and wear it.
height="18"
image_name="Lock"
layout="topleft"
- left="333"
+ left="315"
mouse_opaque="true"
name="square"
- top="5"
+ top="4"
width="18" />
<icon
height="16"
@@ -2666,10 +2666,10 @@ scratch and wear it.
height="18"
image_name="Lock"
layout="topleft"
- left="333"
+ left="315"
mouse_opaque="true"
name="square"
- top="5"
+ top="4"
width="18" />
<icon
height="16"
@@ -2872,10 +2872,10 @@ scratch and wear it.
height="18"
image_name="Lock"
layout="topleft"
- left="333"
+ left="315"
mouse_opaque="true"
name="square"
- top="5"
+ top="4"
width="18" />
<icon
height="16"
@@ -3159,10 +3159,10 @@ scratch and wear it.
height="18"
image_name="Lock"
layout="topleft"
- left="333"
+ left="315"
mouse_opaque="true"
name="square"
- top="5"
+ top="4"
width="18" />
<icon
height="16"
diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml
index 611c51ad11..0037c6ef04 100644
--- a/indra/newview/skins/default/xui/en/floater_im_session.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_session.xml
@@ -11,7 +11,10 @@
can_dock="true"
can_minimize="true"
visible="true"
- width="365">
+ width="365"
+ can_resize="true"
+ min_width="200"
+ min_height="150">
<layout_stack follows="left|top|right|bottom"
height="235"
width="365"
@@ -24,9 +27,9 @@
name="panel_im_control_panel"
layout="topleft"
top_delta="-3"
- min_width="96"
width="146"
height="225"
+ follows="left"
label="IM Control Panel"
user_resize="false" />
<layout_panel height="235"
@@ -35,33 +38,30 @@
top="0"
user_resize="false">
<button height="12"
+ follows="left|top"
top="8"
label="&lt;&lt;"
layout="topleft"
width="35"
name="slide_left_btn" />
<button height="12"
+ follows="left|top"
top="8"
label="&gt;&gt;"
layout="topleft"
width="35"
name="slide_right_btn" />
- <text_editor
- enabled="false"
- type="string"
+ <chat_history
length="1"
- follows="left|top|right"
+ follows="left|top|right|bottom"
font="SansSerif"
height="185"
layout="topleft"
- max_length="2147483647"
- name="im_text"
+ name="chat_history"
parse_highlights="true"
allow_html="true"
- track_bottom="true"
- width="195"
- word_wrap="true">
- </text_editor>
+ width="195">
+ </chat_history>
<line_editor follows="left|right" name="chat_editor" height="20" layout="topleft" width="190">
</line_editor>
</layout_panel>
diff --git a/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml
index 2882f233c2..e3e2decef7 100644
--- a/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml
+++ b/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml
@@ -33,10 +33,10 @@
height="18"
image_name="Lock"
layout="topleft"
- left="294"
+ left="276"
mouse_opaque="true"
name="IconLocked"
- top="5"
+ top="4"
width="18" />
<text
type="string"
diff --git a/indra/newview/skins/default/xui/en/floater_media_settings.xml b/indra/newview/skins/default/xui/en/floater_media_settings.xml
index 6ba26f938d..b96573b32a 100644
--- a/indra/newview/skins/default/xui/en/floater_media_settings.xml
+++ b/indra/newview/skins/default/xui/en/floater_media_settings.xml
@@ -1,20 +1,74 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater bottom="-666" can_close="true" can_drag_on_left="false" can_minimize="true"
- can_resize="false" can_tear_off="true" default_tab_group="1" enabled="true"
- width="365" height="535" left="330" min_height="430" min_width="620"
- mouse_opaque="true" name="Medis Settings" title="Media Settings">
- <button bottom="-525" enabled="true" follows="right|bottom" font="SansSerif"
- halign="center" height="20" label="OK" label_selected="OK" left="75"
- mouse_opaque="true" name="OK" scale_image="true" width="90" />
- <button bottom_delta="0" enabled="true" follows="right|bottom" font="SansSerif"
- halign="center" height="20" label="Cancel" label_selected="Cancel"
- left_delta="93" mouse_opaque="true" name="Cancel" scale_image="true"
- width="90" />
- <button bottom_delta="0" enabled="true" follows="right|bottom" font="SansSerif"
- halign="center" height="20" label="Apply" label_selected="Apply"
- left_delta="93" mouse_opaque="true" name="Apply" scale_image="true"
- width="90" />
- <tab_container bottom="-500" enabled="true" follows="left|top|right|bottom" height="485"
- left="0" mouse_opaque="false" name="tab_container" tab_group="1"
- tab_position="top" tab_width="80" width="365" />
+<floater
+ bottom="-666"
+ can_close="true"
+ can_drag_on_left="false"
+ can_minimize="true"
+ can_resize="false"
+ can_tear_off="true"
+ default_tab_group="1"
+ enabled="true"
+ width="365"
+ height="535"
+ left="330"
+ min_height="430"
+ min_width="620"
+ mouse_opaque="true"
+ name="Medis Settings"
+ help_topic = "media_settings"
+ title="Media Settings">
+ <button
+ bottom="-525"
+ enabled="true"
+ follows="right|bottom"
+ font="SansSerif"
+ halign="center"
+ height="20"
+ label="OK"
+ label_selected="OK"
+ left="75"
+ mouse_opaque="true"
+ name="OK"
+ scale_image="true"
+ width="90" />
+ <button
+ bottom_delta="0"
+ enabled="true"
+ follows="right|bottom"
+ font="SansSerif"
+ halign="center"
+ height="20"
+ label="Cancel"
+ label_selected="Cancel"
+ left_delta="93"
+ mouse_opaque="true"
+ name="Cancel"
+ scale_image="true"
+ width="90" />
+ <button
+ bottom_delta="0"
+ enabled="true"
+ follows="right|bottom"
+ font="SansSerif"
+ halign="center"
+ height="20"
+ label="Apply"
+ label_selected="Apply"
+ left_delta="93"
+ mouse_opaque="true"
+ name="Apply"
+ scale_image="true"
+ width="90" />
+ <tab_container
+ bottom="-500"
+ enabled="true"
+ follows="left|top|right|bottom"
+ height="485"
+ left="0"
+ mouse_opaque="false"
+ name="tab_container"
+ tab_group="1"
+ tab_position="top"
+ tab_width="80"
+ width="365" />
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_nearby_chat.xml b/indra/newview/skins/default/xui/en/floater_nearby_chat.xml
index 6fbfed5f60..25d337ccec 100644
--- a/indra/newview/skins/default/xui/en/floater_nearby_chat.xml
+++ b/indra/newview/skins/default/xui/en/floater_nearby_chat.xml
@@ -1,47 +1,34 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater
- background_opaque="false"
- background_visible="true"
+ can_minimize="true"
+ can_tear_off="false"
+ can_resize="false"
+ can_drag_on_left="false"
+ can_close="false"
+ can_dock="true"
bevel_style="in"
- bg_alpha_color="0.3 0.3 0.3 1.0"
height="300"
layout="topleft"
name="nearby_chat"
help_topic="nearby_chat"
save_rect="true"
title="Nearby Chat"
- single_instance="true"
+ save_visibility="true"
width="320">
- <panel top="20" width="320" height="30" background_visible="true" background_opaque="false" bg_alpha_color="0.0 0.0 0.0 1.0" name="chat_caption">
- <text
- width="140" left="25" height="20" follows="left|right|top"
- font="SansSerifBigBold" text_color="white" word_wrap="true"
- mouse_opaque="true" name="sender_name" >NEARBY CHAT </text>
- <icon top="5" left="250"
- width="20" height="20" follows="top|right"
- color="1 1 1 1" enabled="true" image_name="icn_voice-groupfocus.tga"
- mouse_opaque="true" name="nearby_speakers_btn"/>
- <icon top="5" left="275"
- width="20" height="20" follows="top|right"
- color="1 1 1 1" enabled="true" image_name="inv_item_landmark_visited.tga"
- mouse_opaque="true" name="tearoff_btn"/>
- <icon top="5" left="300"
- width="15" height="15" follows="top|right"
- color="1 1 1 1" enabled="true" image_name="closebox.tga"
- name="close_btn"/>
- </panel>
<chat_history
allow_html="true"
bg_readonly_color="ChatHistoryBgColor"
bg_writeable_color="ChatHistoryBgColor"
- follows="left|top|right"
+ follows="all"
+ left="1"
+ top="20"
font="SansSerif"
layout="topleft"
- height="320"
+ height="280"
name="chat_history"
parse_highlights="true"
text_color="ChatHistoryTextColor"
text_readonly_color="ChatHistoryTextColor"
- width="250"/>
+ width="320"/>
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_preview_notecard.xml b/indra/newview/skins/default/xui/en/floater_preview_notecard.xml
index 448b0fa6af..8cdafe110a 100644
--- a/indra/newview/skins/default/xui/en/floater_preview_notecard.xml
+++ b/indra/newview/skins/default/xui/en/floater_preview_notecard.xml
@@ -33,10 +33,10 @@
height="18"
image_name="Lock"
layout="topleft"
- left="340"
+ left="322"
mouse_opaque="true"
name="lock"
- top="1"
+ top="4"
width="18" />
<text
type="string"
diff --git a/indra/newview/skins/default/xui/en/floater_script_preview.xml b/indra/newview/skins/default/xui/en/floater_script_preview.xml
index 54ab30124a..a415239867 100644
--- a/indra/newview/skins/default/xui/en/floater_script_preview.xml
+++ b/indra/newview/skins/default/xui/en/floater_script_preview.xml
@@ -30,10 +30,10 @@
height="18"
image_name="Lock"
layout="topleft"
- left="444"
+ left="426"
mouse_opaque="true"
name="lock"
- top="3"
+ top="4"
width="18" />
<text
type="string"
diff --git a/indra/newview/skins/default/xui/en/floater_select_key.xml b/indra/newview/skins/default/xui/en/floater_select_key.xml
index 8e1317440e..b89af0ef3e 100644
--- a/indra/newview/skins/default/xui/en/floater_select_key.xml
+++ b/indra/newview/skins/default/xui/en/floater_select_key.xml
@@ -6,7 +6,6 @@
height="100"
layout="topleft"
name="modal container"
- help_topic="modal_container"
width="240">
<button
height="20"
diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml
index b898fd7c93..8cdcee6927 100644
--- a/indra/newview/skins/default/xui/en/floater_tools.xml
+++ b/indra/newview/skins/default/xui/en/floater_tools.xml
@@ -247,7 +247,7 @@
name="radio stretch" />
<radio_item
top_pad="6"
- label="Select Texture"
+ label="Select Face"
layout="topleft"
name="radio select face" />
<radio_group.commit_callback
diff --git a/indra/newview/skins/default/xui/en/floater_tos.xml b/indra/newview/skins/default/xui/en/floater_tos.xml
index b290a9c87d..54facbb659 100644
--- a/indra/newview/skins/default/xui/en/floater_tos.xml
+++ b/indra/newview/skins/default/xui/en/floater_tos.xml
@@ -5,7 +5,6 @@
height="500"
layout="topleft"
name="modal container"
- help_topic="modal_container"
width="600">
<floater.string
name="real_url">
diff --git a/indra/newview/skins/default/xui/en/floater_wearable_save_as.xml b/indra/newview/skins/default/xui/en/floater_wearable_save_as.xml
index e698dfe2dc..ee67989d33 100644
--- a/indra/newview/skins/default/xui/en/floater_wearable_save_as.xml
+++ b/indra/newview/skins/default/xui/en/floater_wearable_save_as.xml
@@ -6,7 +6,6 @@
height="100"
layout="topleft"
name="modal container"
- help_topic="modal_container"
width="240">
<button
height="20"
diff --git a/indra/newview/skins/default/xui/en/menu_landmark.xml b/indra/newview/skins/default/xui/en/menu_landmark.xml
index 54a4095967..93b6db222a 100644
--- a/indra/newview/skins/default/xui/en/menu_landmark.xml
+++ b/indra/newview/skins/default/xui/en/menu_landmark.xml
@@ -28,6 +28,9 @@
<menu_item_call.on_click
function="Places.OverflowMenu.Action"
parameter="pick" />
+ <menu_item_call.on_enable
+ function="Places.OverflowMenu.Enable"
+ parameter="can_create_pick" />
</menu_item_call>
<menu_item_call
label="Add to Favorites Bar"
diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml
index 8cb0a69906..c3ee6e250b 100644
--- a/indra/newview/skins/default/xui/en/menu_login.xml
+++ b/indra/newview/skins/default/xui/en/menu_login.xml
@@ -222,6 +222,12 @@
function="ShowFloater"
parameter="test_inspectors" />
</menu_item_call>
+ <menu_item_call
+ label="Show Side Tray"
+ name="Show Side Tray">
+ <menu_item_call.on_click
+ function="Advanced.ShowSideTray" />
+ </menu_item_call>
<menu_item_separator />
<menu_item_call
label="Show TOS"
diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml b/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml
new file mode 100644
index 0000000000..df74d2dcd4
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/menu_people_nearby_multiselect.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<context_menu
+ layout="topleft"
+ name="Multi-Selected People Context Menu">
+ <menu_item_call
+ enabled="false"
+ label="Add Friends"
+ layout="topleft"
+ name="Add Friends">
+ <on_click
+ function="Avatar.AddFriends" />
+ <on_enable
+ function="Avatar.EnableItem"
+ parameter="can_add" />
+ </menu_item_call>
+ <menu_item_call
+ label="IM"
+ layout="topleft"
+ name="IM">
+ <on_click
+ function="Avatar.IM" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Call"
+ layout="topleft"
+ name="Call">
+ <on_click
+ function="Avatar.Call" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Share"
+ layout="topleft"
+ name="Share">
+ <on_click
+ function="Avatar.Share" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Pay"
+ layout="topleft"
+ name="Pay">
+ <on_click
+ function="Avatar.Pay" />
+ </menu_item_call>
+</context_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_place.xml b/indra/newview/skins/default/xui/en/menu_place.xml
index 01f62985ca..1b96eb51f0 100644
--- a/indra/newview/skins/default/xui/en/menu_place.xml
+++ b/indra/newview/skins/default/xui/en/menu_place.xml
@@ -20,6 +20,9 @@
<menu_item_call.on_click
function="Places.OverflowMenu.Action"
parameter="pick" />
+ <menu_item_call.on_enable
+ function="Places.OverflowMenu.Enable"
+ parameter="can_create_pick" />
</menu_item_call>
<menu_item_separator
layout="topleft"/>
diff --git a/indra/newview/skins/default/xui/en/menu_places_gear_folder.xml b/indra/newview/skins/default/xui/en/menu_places_gear_folder.xml
index c95cf32a5a..c849188699 100644
--- a/indra/newview/skins/default/xui/en/menu_places_gear_folder.xml
+++ b/indra/newview/skins/default/xui/en/menu_places_gear_folder.xml
@@ -34,6 +34,9 @@
<on_click
function="Places.LandmarksGear.CopyPaste.Action"
parameter="cut" />
+ <on_enable
+ function="Places.LandmarksGear.Enable"
+ parameter="cut" />
</menu_item_call>
<menu_item_call
label="Copy"
@@ -61,6 +64,9 @@
<on_click
function="Places.LandmarksGear.CopyPaste.Action"
parameter="rename" />
+ <on_enable
+ function="Places.LandmarksGear.Enable"
+ parameter="rename" />
</menu_item_call>
<menu_item_call
label="Delete"
@@ -69,6 +75,9 @@
<on_click
function="Places.LandmarksGear.CopyPaste.Action"
parameter="delete" />
+ <on_enable
+ function="Places.LandmarksGear.Enable"
+ parameter="delete" />
</menu_item_call>
<menu_item_separator
layout="topleft" />
@@ -109,7 +118,7 @@
layout="topleft"
name="sort_by_date">
<on_check
- function="Places.LandmarksGear.Enable"
+ function="Places.LandmarksGear.Check"
parameter="sort_by_date" />
<on_click
function="Places.LandmarksGear.Folding.Action"
diff --git a/indra/newview/skins/default/xui/en/menu_places_gear_landmark.xml b/indra/newview/skins/default/xui/en/menu_places_gear_landmark.xml
index 0246d775ee..63d1a67d0f 100644
--- a/indra/newview/skins/default/xui/en/menu_places_gear_landmark.xml
+++ b/indra/newview/skins/default/xui/en/menu_places_gear_landmark.xml
@@ -35,6 +35,9 @@
<on_click
function="Places.LandmarksGear.Custom.Action"
parameter="show_on_map" />
+ <on_enable
+ function="Places.LandmarksGear.Enable"
+ parameter="show_on_map" />
</menu_item_call>
<menu_item_separator
layout="topleft" />
@@ -66,6 +69,9 @@
<on_click
function="Places.LandmarksGear.CopyPaste.Action"
parameter="cut" />
+ <on_enable
+ function="Places.LandmarksGear.Enable"
+ parameter="cut" />
</menu_item_call>
<menu_item_call
label="Copy Landmark"
@@ -82,6 +88,9 @@
<on_click
function="Places.LandmarksGear.CopyPaste.Action"
parameter="copy_slurl" />
+ <on_enable
+ function="Places.LandmarksGear.Enable"
+ parameter="copy_slurl" />
</menu_item_call>
<menu_item_call
label="Paste"
@@ -101,6 +110,9 @@
<on_click
function="Places.LandmarksGear.CopyPaste.Action"
parameter="rename" />
+ <on_enable
+ function="Places.LandmarksGear.Enable"
+ parameter="rename" />
</menu_item_call>
<menu_item_call
label="Delete"
@@ -109,6 +121,9 @@
<on_click
function="Places.LandmarksGear.CopyPaste.Action"
parameter="delete" />
+ <on_enable
+ function="Places.LandmarksGear.Enable"
+ parameter="delete" />
</menu_item_call>
<menu_item_separator
layout="topleft" />
@@ -119,6 +134,9 @@
<on_click
function="Places.LandmarksGear.Folding.Action"
parameter="expand_all" />
+ <on_enable
+ function="Places.LandmarksGear.Enable"
+ parameter="expand_all" />
</menu_item_call>
<menu_item_call
label="Collapse all folders"
@@ -127,17 +145,23 @@
<on_click
function="Places.LandmarksGear.Folding.Action"
parameter="collapse_all" />
+ <on_enable
+ function="Places.LandmarksGear.Enable"
+ parameter="collapse_all" />
</menu_item_call>
<menu_item_check
label="Sort by Date"
layout="topleft"
name="sort_by_date">
<on_check
- function="Places.LandmarksGear.Enable"
+ function="Places.LandmarksGear.Check"
parameter="sort_by_date" />
<on_click
function="Places.LandmarksGear.Folding.Action"
parameter="sort_by_date" />
+ <on_enable
+ function="Places.LandmarksGear.Enable"
+ parameter="sort_by_date" />
</menu_item_check>
<menu_item_call
label="Create Pick"
@@ -146,5 +170,8 @@
<on_click
function="Places.LandmarksGear.Custom.Action"
parameter="create_pick" />
+ <on_enable
+ function="Places.LandmarksGear.Enable"
+ parameter="create_pick" />
</menu_item_call>
</menu>
diff --git a/indra/newview/skins/default/xui/en/menu_teleport_history_item.xml b/indra/newview/skins/default/xui/en/menu_teleport_history_item.xml
index 515278c23d..0160d52b17 100644
--- a/indra/newview/skins/default/xui/en/menu_teleport_history_item.xml
+++ b/indra/newview/skins/default/xui/en/menu_teleport_history_item.xml
@@ -17,10 +17,10 @@
function="TeleportHistory.MoreInformation" />
</menu_item_call>
<menu_item_call
- label="Copy"
+ label="Copy to Clipboard"
layout="topleft"
- name="Copy">
+ name="CopyToClipboard">
<menu_item_call.on_click
- function="TeleportHistory.Copy" />
+ function="TeleportHistory.CopyToClipboard" />
</menu_item_call>
</context_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 495795d14a..34d0498180 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -56,7 +56,7 @@
function="Edit.EnableCustomizeAvatar" />
</menu_item_call>
<menu_item_check
- label="My Things"
+ label="My Inventory"
layout="topleft"
name="Inventory"
shortcut="control|I">
@@ -2933,7 +2933,8 @@
function="Advanced.GrabBakedTexture"
parameter="iris" />
<menu_item_call.on_enable
- function="Advanced.EnableGrabBakedTexture" />
+ function="Advanced.EnableGrabBakedTexture"
+ parameter="iris" />
</menu_item_call>
<menu_item_call
label="Head"
@@ -2943,7 +2944,8 @@
function="Advanced.GrabBakedTexture"
parameter="head" />
<menu_item_call.on_enable
- function="Advanced.EnableGrabBakedTexture" />
+ function="Advanced.EnableGrabBakedTexture"
+ parameter="head" />
</menu_item_call>
<menu_item_call
label="Upper Body"
@@ -2953,7 +2955,8 @@
function="Advanced.GrabBakedTexture"
parameter="upper" />
<menu_item_call.on_enable
- function="Advanced.EnableGrabBakedTexture" />
+ function="Advanced.EnableGrabBakedTexture"
+ parameter="upper" />
</menu_item_call>
<menu_item_call
label="Lower Body"
@@ -2963,7 +2966,8 @@
function="Advanced.GrabBakedTexture"
parameter="lower" />
<menu_item_call.on_enable
- function="Advanced.EnableGrabBakedTexture" />
+ function="Advanced.EnableGrabBakedTexture"
+ parameter="lower" />
</menu_item_call>
<menu_item_call
label="Skirt"
@@ -2973,17 +2977,8 @@
function="Advanced.GrabBakedTexture"
parameter="skirt" />
<menu_item_call.on_enable
- function="Advanced.EnableGrabBakedTexture" />
- </menu_item_call>
- <menu_item_call
- label="Skirt"
- layout="topleft"
- name="Hair">
- <menu_item_call.on_click
- function="Advanced.GrabBakedTexture"
- parameter="hair" />
- <menu_item_call.on_enable
- function="Advanced.EnableGrabBakedTexture" />
+ function="Advanced.EnableGrabBakedTexture"
+ parameter="skirt" />
</menu_item_call>
</menu>
<menu
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 7c5925550a..7d2ef4923e 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -5523,6 +5523,13 @@ The objects on the selected parcel that are NOT owned by you have been returned
<notification
icon="notify.tga"
+ name="ServerObjectMessage"
+ type="notify">
+[MSG]
+ </notification>
+
+ <notification
+ icon="notify.tga"
name="NotSafe"
type="notify">
This land has damage enabled.
diff --git a/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml b/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml
index 2c9109449c..f747c557e2 100644
--- a/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml
@@ -69,14 +69,14 @@
name="speaking_indicator"
visible="true"
width="20" />
- <button
+ <button
follows="right"
height="16"
image_pressed="Info_Press"
image_hover="Info_Over"
image_unselected="Info_Off"
- layout="topleft"
- left_pad="5"
+ left_pad="3"
+ right="-25"
name="info_btn"
picture_style="true"
width="16" />
@@ -88,6 +88,7 @@
image_unselected="BuyArrow_Press"
layout="topleft"
left_pad="5"
+ right="-5"
name="profile_btn"
picture_style="true"
width="16" />
diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
index 100b2d7aaa..1196d788e4 100644
--- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml
+++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
@@ -36,15 +36,15 @@
width="5"/>
<layout_panel
mouse_opaque="false"
- auto_resize="true"
+ auto_resize="false"
follows="left|right"
height="28"
layout="topleft"
left="5"
min_height="28"
- width="450"
+ width="310"
top="0"
- min_width="305"
+ min_width="300"
name="chat_bar"
user_resize="false"
filename="panel_nearby_chat_bar.xml"/>
@@ -60,21 +60,88 @@
top="0"
width="3"/>
<layout_panel
+ mouse_opaque="false"
+ auto_resize="false"
+ follows="right"
+ height="28"
+ layout="topleft"
+ min_height="28"
+ width="100"
+ top_delta="-10"
+ min_width="100"
+ name="speak_panel"
+ user_resize="false">
+ <chiclet_talk
+ follows="right"
+ height="20"
+ speak_button.font="SansSerifMedium"
+ speak_button.tab_stop="true"
+ show_button.tab_stop="true"
+ layout="topleft"
+ left="0"
+ name="talk"
+ top="6"
+ width="100" />
+ </layout_panel>
+ <icon
+ auto_resize="false"
+ color="0 0 0 0"
+ follows="left|right"
+ height="10"
+ image_name="spacer24.tga"
+ layout="topleft"
+ left="0"
+ name="DUMMY"
+ top="0"
+ width="5"/>
+ <layout_panel
+ mouse_opaque="false"
+ auto_resize="false"
+ follows="right"
+ height="28"
+ layout="topleft"
+ min_height="28"
+ width="90"
+ top_delta="-10"
+ min_width="90"
+ name="gesture_panel"
+ user_resize="false">
+ <gesture_combo_box
+ follows="right"
+ height="20"
+ label="Gestures"
+ layout="topleft"
+ name="Gesture"
+ left="0"
+ top="6"
+ width="90" />
+ </layout_panel>
+ <icon
+ auto_resize="false"
+ color="0 0 0 0"
+ follows="left|right"
+ height="10"
+ image_name="spacer24.tga"
+ layout="topleft"
+ left="0"
+ name="DUMMY"
+ top="0"
+ width="5"/>
+ <layout_panel
mouse_opaque="false"
auto_resize="false"
follows="right"
height="28"
layout="topleft"
- left="5"
min_height="28"
+ name="movement_panel"
width="70"
top_delta="-10"
- min_width="70"
- name="movement_panel"
- user_resize="false">
+ min_width="70">
<button
- follows="right"
+ follows="left|right"
height="20"
+ use_ellipses="true"
is_toggle="true"
label="Move"
layout="topleft"
@@ -101,7 +168,7 @@
<layout_panel
mouse_opaque="false"
auto_resize="false"
- follows="right"
+ follows="left|right"
height="28"
layout="topleft"
min_height="28"
@@ -110,8 +177,9 @@
top_delta="-10"
width="100">
<button
- follows="right"
+ follows="left|right"
height="20"
+ use_ellipses="true"
is_toggle="true"
label="View"
layout="topleft"
@@ -124,22 +192,6 @@
function="Button.SetDockableFloaterToggle"
parameter="camera" />
</button>
- <button
- follows="right"
- name="camera_presets_btn"
- top="6"
- height="20"
- width="20"
- left_pad="0"
- is_toggle="true"
- picture_style="true"
- image_selected="toggle_button_selected"
- image_unselected="toggle_button_off">
- <button.init_callback
- function="Button.SetDockableFloaterToggle"
- parameter="camera_presets"
- />
- </button>
</layout_panel>
<layout_panel
mouse_opaque="false"
@@ -183,8 +235,10 @@
min_height="28"
top="0"
name="chiclet_list_panel"
- width="150"
- user_resize="false">
+ width="189"
+ min_width="189"
+ user_resize="false"
+ auto_resize="true">
<chiclet_panel
mouse_opaque="false"
follows="left|right"
@@ -195,7 +249,7 @@
top="1"
chiclet_padding="3"
scrolling_offset="40"
- width="150" />
+ width="189" />
</layout_panel>
<icon
auto_resize="false"
@@ -282,4 +336,4 @@
top="0"
width="5"/>
</layout_stack>
-</panel>
+</panel> \ No newline at end of file
diff --git a/indra/newview/skins/default/xui/en/panel_edit_profile.xml b/indra/newview/skins/default/xui/en/panel_edit_profile.xml
index d268258f6f..b002034a08 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_profile.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_profile.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
+ background_visible="true"
class="edit_profile_panel"
follows="all"
height="535"
@@ -301,76 +302,6 @@
width="285"
word_wrap="true" />
</panel>
- <text
- type="string"
- length="1"
- follows="left|top"
- font="SansSerifSmall"
- font.style="BOLD"
- height="15"
- layout="topleft"
- left="10"
- name="title_afk_text"
- text_color="white"
- top_pad="0"
- width="190">
- Away Timeout:
- </text>
- <spinner
- control_name="AFKTimeout"
- decimal_digits="0"
- follows="left|top"
- halign="right"
- height="15"
- increment="1"
- initial_value="300"
- label=""
- label_width="0"
- layout="topleft"
- max_val="600"
- min_val="30"
- name="afk_timeout_spinner"
- left_pad="4"
- width="50" />
- <text
- type="string"
- length="1"
- follows="left|top"
- halign="left"
- height="15"
- layout="topleft"
- left_pad="2"
- name="seconds_textbox"
- width="70">
- seconds
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- font="SansSerifSmall"
- font.style="BOLD"
- text_color="white"
- left="10"
- mouse_opaque="false"
- name="text_box3"
- width="240">
- Busy Mode Response:
- </text>
- <text_editor
- control_name="BusyModeResponse2"
- commit_on_focus_lost = "true"
- follows="left|top"
- height="56"
- layout="topleft"
- left="10"
- name="busy_response"
- width="285"
- word_wrap="true">
- log_in_to_change
- </text_editor>
</panel>
</panel>
</scroll_container>
diff --git a/indra/newview/skins/default/xui/en/panel_group_control_panel.xml b/indra/newview/skins/default/xui/en/panel_group_control_panel.xml
index be38492c82..9767a673f6 100644
--- a/indra/newview/skins/default/xui/en/panel_group_control_panel.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_control_panel.xml
@@ -4,7 +4,7 @@
width="146"
height="215"
border="false">
- <avatar_list_tmp
+ <avatar_list
color="DkGray2"
follows="left|top|right|bottom"
height="150"
diff --git a/indra/newview/skins/default/xui/en/panel_group_general.xml b/indra/newview/skins/default/xui/en/panel_group_general.xml
index c18b625033..9bd240eccc 100644
--- a/indra/newview/skins/default/xui/en/panel_group_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_general.xml
@@ -46,6 +46,7 @@ Hover your mouse over the options for more help.
layout="topleft"
left="5"
name="text_owners_and_visible_members"
+ text_color="EmphasisColor"
top_pad="10"
width="270">
Members
@@ -74,6 +75,7 @@ Hover your mouse over the options for more help.
follows="left|top"
height="16"
type="string"
+ text_color="EmphasisColor"
top_pad="10"
font="SansSerifBig"
layout="topleft"
@@ -165,7 +167,7 @@ Hover your mouse over the options for more help.
name="spin_enrollment_fee"
tool_tip="New members must pay this fee to join the group when Enrollment Fee is checked."
top_delta="-2"
- width="75" />
+ width="105" />
<check_box
height="16"
initial_value="true"
diff --git a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml
index c3b277fb1d..da6cf8891a 100644
--- a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml
@@ -151,16 +151,16 @@
visible="false"
width="65" />
<accordion layout="topleft" left="2" width="296" top="135" height="500" follows="all" name="group_accordion">
- <accordion_tab min_height="445" title="Group General" name="group_general_tab">
+ <accordion_tab min_height="445" title="General" name="group_general_tab">
<panel class="panel_group_general" filename="panel_group_general.xml" name="group_general_tab_panel"/>
</accordion_tab>
- <accordion_tab min_height="380" title="Group Roles" name="group_roles_tab" expanded="False" can_resize="false">
+ <accordion_tab min_height="380" title="Members &amp; Roles" name="group_roles_tab" expanded="False" can_resize="false">
<panel class="panel_group_roles" filename="panel_group_roles.xml" name="group_roles_tab_panel"/>
</accordion_tab>
- <accordion_tab min_height="530" title="Group Notices" name="group_notices_tab" expanded="False" can_resize="false">
+ <accordion_tab min_height="530" title="Notices" name="group_notices_tab" expanded="False" can_resize="false">
<panel class="panel_group_notices" filename="panel_group_notices.xml" name="group_notices_tab_panel"/>
</accordion_tab>
- <accordion_tab min_height="270" title="Group Land Money" name="group_land_tab" expanded="False" can_resize="false">
+ <accordion_tab min_height="270" title="Land &amp; L$" name="group_land_tab" expanded="False" can_resize="false">
<panel class="panel_group_land_money" filename="panel_group_land_money.xml" name="group_land_tab_panel"/>
</accordion_tab>
</accordion>
diff --git a/indra/newview/skins/default/xui/en/panel_group_land_money.xml b/indra/newview/skins/default/xui/en/panel_group_land_money.xml
index d61fcf529a..0845ec014e 100644
--- a/indra/newview/skins/default/xui/en/panel_group_land_money.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_land_money.xml
@@ -2,7 +2,7 @@
<panel
border="true"
follows="all"
- height="410"
+ height="510"
label="Land &amp; L$"
layout="topleft"
left="1"
@@ -194,7 +194,7 @@
left_pad="5"
name="your_contribution_units"
top_delta="2">
- ( m² )
+ m²
</text>
<text
type="string"
@@ -239,13 +239,14 @@
layout="topleft"
left="10"
name="group_money_heading"
+ text_color="EmphasisColor"
top_pad="0"
width="150">
Group L$
</text>
<tab_container
follows="all"
- height="100"
+ height="200"
layout="topleft"
left="10"
name="group_money_tab_container"
@@ -268,13 +269,14 @@
bg_readonly_color="0.784314 0.819608 0.8 1"
follows="all"
font="Monospace"
- height="172"
+ height="168"
layout="topleft"
left="8"
max_length="4096"
name="group_money_planning_text"
top="5"
- width="250">
+ width="250"
+ word_wrap="true">
Computing...
</text_editor>
</panel>
@@ -300,7 +302,8 @@
max_length="4096"
name="group_money_details_text"
top="7"
- width="250">
+ width="250"
+ word_wrap="true">
Computing...
</text_editor>
<button
@@ -346,7 +349,8 @@
max_length="4096"
name="group_money_sales_text"
top="7"
- width="250">
+ width="250"
+ word_wrap="true">
Computing...
</text_editor>
<button
diff --git a/indra/newview/skins/default/xui/en/panel_group_list_item.xml b/indra/newview/skins/default/xui/en/panel_group_list_item.xml
index 6eec0ffe7a..7bdcaafe31 100644
--- a/indra/newview/skins/default/xui/en/panel_group_list_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_list_item.xml
@@ -31,33 +31,44 @@
follows="top|left"
height="20"
image_name="Generic_Group"
+ name="group_icon"
layout="topleft"
left="5"
mouse_opaque="true"
- name="group_icon"
- top="4"
+ top="2"
width="20" />
- <text
+ <text
follows="left|right"
font="SansSerifSmall"
- height="17"
+ height="15"
layout="topleft"
left_pad="5"
name="group_name"
- top="7"
+ top="6"
use_ellipses="true"
value="Unknown"
- width="263" />
+ width="246" />
<button
follows="right"
height="16"
image_pressed="Info_Press"
image_hover="Info_Over"
image_unselected="Info_Off"
- layout="topleft"
+ left_pad="3"
+ right="-25"
name="info_btn"
picture_style="true"
+ width="16" />
+ <button
+ follows="right"
+ height="16"
+ image_selected="BuyArrow_Press"
+ image_pressed="BuyArrow_Press"
+ image_unselected="BuyArrow_Press"
+ layout="topleft"
+ left_pad="5"
right="-5"
- top="4"
+ name="profile_btn"
+ picture_style="true"
width="16" />
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_group_notices.xml b/indra/newview/skins/default/xui/en/panel_group_notices.xml
index 82a3c98dd9..d9fb962998 100644
--- a/indra/newview/skins/default/xui/en/panel_group_notices.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_notices.xml
@@ -52,6 +52,7 @@ the General tab.
layout="topleft"
left_delta="10"
name="lbl2"
+ text_color="EmphasisColor"
top_pad="10"
width="270">
Notices are kept for 14 days. Notice lists are limited to 200 notices per group on a daily basis.
@@ -135,6 +136,7 @@ the General tab.
left="10"
mouse_opaque="false"
name="lbl"
+ text_color="EmphasisColor"
top_pad="0"
width="265">
Create a Notice
@@ -147,6 +149,7 @@ the General tab.
layout="topleft"
left_delta="0"
name="lbl2"
+ text_color="EmphasisColor"
top_pad="4"
width="195">
You can add a single item to a notice by dragging it from your inventory to this panel. Attached items must be copiable and transferrable, and you can&apos;t send a folder.
@@ -289,6 +292,7 @@ the General tab.
left="10"
mouse_opaque="false"
name="lbl"
+ text_color="EmphasisColor"
top_pad="0"
width="265">
Archived Notice
@@ -302,7 +306,7 @@ the General tab.
name="lbl2"
top_pad="4"
width="265">
- To send a new notice, click the &apos;Create New Notice&apos; button above.
+ To send a new notice, click the &apos;New Notice&apos; button above.
</text>
<text
type="string"
diff --git a/indra/newview/skins/default/xui/en/panel_landmarks.xml b/indra/newview/skins/default/xui/en/panel_landmarks.xml
index ad452b16a7..c33f68eaf7 100644
--- a/indra/newview/skins/default/xui/en/panel_landmarks.xml
+++ b/indra/newview/skins/default/xui/en/panel_landmarks.xml
@@ -31,6 +31,7 @@
left="0"
mouse_opaque="true"
name="favorites_list"
+ start_folder="favorite"
width="380"/>
</accordion_tab>
<accordion_tab
@@ -62,6 +63,7 @@
left="0"
mouse_opaque="true"
name="my_inventory_list"
+ start_folder="inventory"
width="380"/>
</accordion_tab>
<accordion_tab
@@ -77,6 +79,7 @@
left="0"
mouse_opaque="true"
name="library_list"
+ start_folder="library"
width="380"/>
</accordion_tab>
</accordion>
@@ -127,7 +130,7 @@
picture_style="true"
tool_tip="Add new folder"
width="18" />
- <button
+ <dnd_button
follows="bottom|right"
height="18"
image_selected="TrashItem_Press"
diff --git a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
index c725334fc0..cc47e99c2c 100644
--- a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
@@ -8,6 +8,7 @@
left="102"
mouse_opaque="true"
name="Media Settings General"
+ help_topic = "media_settings_general"
width="365">
<text
@@ -31,6 +32,27 @@
<!-- <line_editor.commit_callback
function="Media.CommitHomeURL"/> -->
</line_editor>
+
+ <web_browser
+ border_visible="true"
+ bottom_delta="-133"
+ follows="top|left"
+ left="120"
+ name="preview_media"
+ width="128"
+ height="128"
+ start_url="about:blank"
+ decouple_texture_size="true" />
+
+ <text
+ bottom_delta="-15"
+ follows="top|left"
+ height="15"
+ left="164"
+ name="">
+ Preview
+ </text>
+
<text
bottom_delta="-20"
follows="top|left"
@@ -61,27 +83,6 @@
<button.commit_callback
function="Media.ResetCurrentUrl"/>
</button>
-
- <web_browser
- border_visible="false"
- bottom_delta="-133"
- follows="top|left"
- left="120"
- name="preview_media"
- width="128"
- height="128"
- start_url="about:blank"
- decouple_texture_size="true" />
-
- <text
- bottom_delta="-15"
- follows="top|left"
- height="15"
- left="164"
- name="">
- Preview
- </text>
-
<text
bottom_delta="-5"
follows="top|left"
@@ -135,7 +136,8 @@
<check_box
bottom_delta="-25"
- enabled="true"
+ visible="false"
+ enabled="false"
follows="left|top"
font="SansSerifSmall"
height="16"
@@ -148,7 +150,7 @@
width="150" />
<check_box
- bottom_delta="-25"
+ bottom_delta="0"
enabled="true"
follows="left|top"
font="SansSerifSmall"
@@ -168,20 +170,6 @@
font="SansSerifSmall"
height="16"
initial_value="false"
- label="Use Default Alternative Image"
- left="10"
- mouse_opaque="true"
- name="alt_image_enable"
- radio_style="false"
- width="150" />
-
- <check_box
- bottom_delta="-25"
- enabled="true"
- follows="left|top"
- font="SansSerifSmall"
- height="16"
- initial_value="false"
label="Auto Play Media"
left="10"
mouse_opaque="true"
diff --git a/indra/newview/skins/default/xui/en/panel_media_settings_permissions.xml b/indra/newview/skins/default/xui/en/panel_media_settings_permissions.xml
index 0cc1406d62..85f534c4a3 100644
--- a/indra/newview/skins/default/xui/en/panel_media_settings_permissions.xml
+++ b/indra/newview/skins/default/xui/en/panel_media_settings_permissions.xml
@@ -8,6 +8,7 @@
left="102"
mouse_opaque="true"
name="Media settings for controls"
+ help_topic = "media_settings_controls"
width="365">
<text
@@ -15,7 +16,6 @@
follows="top|left"
height="15"
left="10"
- name="media_perms_label_owner"
enabled="false">
Owner
</text>
@@ -53,9 +53,8 @@
follows="top|left"
height="15"
left="10"
- name="media_perms_label_group"
enabled="false">
- Group
+ Group:
</text>
<name_box
@@ -101,7 +100,6 @@
follows="top|left"
height="15"
left="10"
- name="media_perms_label_anyone"
enabled="false">
Anyone
</text>
diff --git a/indra/newview/skins/default/xui/en/panel_media_settings_security.xml b/indra/newview/skins/default/xui/en/panel_media_settings_security.xml
index 695e956e41..a26f74844e 100644
--- a/indra/newview/skins/default/xui/en/panel_media_settings_security.xml
+++ b/indra/newview/skins/default/xui/en/panel_media_settings_security.xml
@@ -8,6 +8,7 @@
left="102"
mouse_opaque="true"
name="Media Settings Security"
+ help_topic = "media_settings_security"
width="365">
<check_box
bottom_delta="-40"
diff --git a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
index 00100693cc..4175d21639 100644
--- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
@@ -8,10 +8,33 @@
layout="topleft"
name="navigation_bar"
width="600">
+ <icon
+ follows="all"
+ image_name="NavBar_BG"
+ mouse_opaque="true"
+ name="bg_icon"
+ scale_image="true"
+ visible="true"
+ left="0"
+ top="0"
+ height="65"
+ width="600"/>
+ <icon
+ follows="all"
+ image_name="NavBar_BG_NoFav"
+ mouse_opaque="true"
+ name="bg_icon_no_fav"
+ scale_image="true"
+ visible="false"
+ left="0"
+ top="0"
+ height="65"
+ width="600"/>
<panel
background_visible="false"
follows="left|top|right"
- height="60"
+ top="5"
+ height="23"
layout="topleft"
name="navigation_panel"
width="600">
@@ -131,12 +154,12 @@
<favorites_bar
follows="left|right|top"
- height="25"
+ height="15"
layout="topleft"
left="0"
name="favorite"
image_drag_indication="Arrow_Down"
chevron_button_tool_tip="Show more of My Favorites"
- top="32"
+ bottom="62"
width="590" />
</panel>
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 4219d9f58f..2fd82d8f3d 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
@@ -7,7 +7,13 @@
left="0"
name="chat_bar"
top="24"
- width="510">
+ width="310">
+ <string name="min_width">
+ 310
+ </string>
+ <string name="max_width">
+ 320
+ </string>
<line_editor
border_style="line"
border_thickness="1"
@@ -45,27 +51,4 @@
tool_tip="Shows/hides nearby chat log">
<button.commit_callback function="Floater.Toggle" parameter="nearby_chat"/>
</button>
- <chiclet_talk
- follows="right"
- height="20"
- speak_button.font="SansSerifMedium"
- speak_button.tab_stop="true"
- show_button.tab_stop="true"
- layout="topleft"
- left_pad="5"
- name="talk"
- top="3"
- width="100"
- speak_button.tool_tip="Turns microphone on/off"
- show_button.tool_tip="Shows/hides voice control panel" />
- <gesture_combo_box
- follows="right"
- height="20"
- label="Gestures"
- layout="topleft"
- name="Gesture"
- left_pad="5"
- top="3"
- width="90"
- tool_tip="Shows/hides gestures" />
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_notification.xml b/indra/newview/skins/default/xui/en/panel_notification.xml
index 4d890b1d46..9c2829d92d 100644
--- a/indra/newview/skins/default/xui/en/panel_notification.xml
+++ b/indra/newview/skins/default/xui/en/panel_notification.xml
@@ -12,6 +12,7 @@
width="350">
<panel
background_visible="true"
+ bg_alpha_color="0.3 0.3 0.3 0"
follows="left|right|top"
height="100"
label="info_panel"
@@ -70,6 +71,7 @@
</panel>
<panel
background_visible="true"
+ bg_alpha_color="0.3 0.3 0.3 0"
follows="left|right|bottom"
height="40"
label="control_panel"
diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml
index 8274beb538..7b19ab1a1c 100644
--- a/indra/newview/skins/default/xui/en/panel_people.xml
+++ b/indra/newview/skins/default/xui/en/panel_people.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<!-- Side tray panel -->
<panel
background_visible="true"
- draw_border="false"
follows="all"
height="570"
label="People"
@@ -10,7 +10,6 @@ background_visible="true"
name="people_panel"
top="0"
left="0"
- bevel_style="none"
width="333">
<string
name="no_people"
@@ -67,10 +66,13 @@ background_visible="true"
top="0"
width="313">
<avatar_list
+ allow_select="true"
follows="all"
height="470"
+ ignore_online_status="true"
layout="topleft"
left="0"
+ multi_select="true"
name="avatar_list"
top="0"
volume_column_width="20"
@@ -124,10 +126,12 @@ background_visible="true"
name="tab_online"
title="Online">
<avatar_list
+ allow_select="true"
follows="all"
height="150"
layout="topleft"
left="0"
+ multi_select="true"
name="avatars_online"
top="0"
width="313" />
@@ -139,10 +143,12 @@ background_visible="true"
name="tab_all"
title="All">
<avatar_list
+ allow_select="true"
follows="all"
height="230"
layout="topleft"
left="0"
+ multi_select="true"
name="avatars_all"
top="0"
width="313" />
@@ -288,10 +294,12 @@ background_visible="true"
name="recent_panel"
width="313">
<avatar_list
+ allow_select="true"
follows="all"
height="470"
layout="topleft"
left="0"
+ multi_select="true"
name="avatar_list"
top="2"
width="313" />
diff --git a/indra/newview/skins/default/xui/en/panel_picks.xml b/indra/newview/skins/default/xui/en/panel_picks.xml
index ac2cf19a96..cbe1f11e3d 100644
--- a/indra/newview/skins/default/xui/en/panel_picks.xml
+++ b/indra/newview/skins/default/xui/en/panel_picks.xml
@@ -71,59 +71,60 @@
width="18" />
</panel>
<panel
- follows="bottom"
- auto_resize="false"
layout="topleft"
- height="19"
+ left="0"
+ height="25"
+ top_pad="10"
name="buttons_cucks"
+ help_topic="picks_button_tab"
width="313">
<button
+ enabled="false"
follows="bottom|left"
- height="19"
- label="Add"
+ font="SansSerifSmallBold"
+ height="25"
+ label="Info"
layout="topleft"
- left="0"
- mouse_opaque="false"
- name="add_friend"
- top="5"
+ left="5"
+ name="info_btn"
+ tab_stop="false"
+ top="0"
width="55" />
<button
- follows="bottom|left"
- height="19"
- label="IM"
- layout="topleft"
- name="im"
- top="5"
- left_pad="5"
- width="40" />
- <button
enabled="false"
follows="bottom|left"
- height="19"
- label="Call"
+ font="SansSerifSmallBold"
+ height="25"
+ label="Teleport"
layout="topleft"
- name="call"
left_pad="5"
- top="5"
- width="55" />
+ name="teleport_btn"
+ tab_stop="false"
+ top="0"
+ width="77" />
<button
enabled="false"
follows="bottom|left"
- height="19"
+ font="SansSerifSmallBold"
+ height="25"
label="Map"
layout="topleft"
- name="show_on_map_btn"
- top="5"
left_pad="5"
+ name="show_on_map_btn"
+ tab_stop="false"
+ top="0"
width="50" />
<button
- follows="bottom|left"
- height="19"
- label="Teleport"
+ enabled="false"
+ follows="bottom|right"
+ font="SansSerifSmallBold"
+ height="25"
+ label="â–¼"
layout="topleft"
- name="teleport"
- left_pad="5"
- top="5"
- width="90" />
+ name="overflow_btn"
+ right="-10"
+ tab_stop="false"
+ top="0"
+ width="30" />
</panel>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_places.xml b/indra/newview/skins/default/xui/en/panel_places.xml
index 1ea6e1149d..50108aa21f 100644
--- a/indra/newview/skins/default/xui/en/panel_places.xml
+++ b/indra/newview/skins/default/xui/en/panel_places.xml
@@ -1,17 +1,18 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
- background_visible="true"
+background_visible="true"
follows="all"
- height="400"
+ height="570"
label="Places"
layout="topleft"
min_height="350"
- min_width="240"
name="places panel"
+ top="0"
+ left="0"
width="333">
<string
name="landmarks_tab_title"
- value="Landmarks" />
+ value="My Landmarks" />
<string
name="teleport_history_tab_title"
value="Teleport History" />
@@ -19,44 +20,47 @@
follows="left|top|right"
font="SansSerif"
height="23"
- label="Filter"
layout="topleft"
left="15"
+ label="Filter"
+ max_length="300"
name="Filter"
top="3"
- width="300" />
+ width="303" />
<tab_container
follows="all"
- height="326"
+ height="500"
layout="topleft"
- left="9"
+ left="10"
name="Places Tabs"
+ tab_min_width="70"
+ tab_height="30"
tab_position="top"
- top="30"
+ top_pad="10"
width="313" />
<panel
class="panel_place_info"
filename="panel_place_info.xml"
follows="all"
- height="326"
+ height="533"
layout="topleft"
left="0"
help_topic="places_info_tab"
name="panel_place_info"
- top="30"
- visible="false" />
+ top="5"
+ visible="false"
+ width="313" />
<panel
- height="25"
+ height="19"
layout="topleft"
left="0"
help_topic="places_button_tab"
name="button_panel"
- top_pad="10"
width="313">
<button
follows="bottom|left"
- font="SansSerifSmallBold"
- height="25"
+ font="SansSerifSmall"
+ height="19"
label="Teleport"
layout="topleft"
left="5"
@@ -65,8 +69,8 @@
width="77" />
<button
follows="bottom|left"
- font="SansSerifSmallBold"
- height="25"
+ font="SansSerifSmall"
+ height="19"
label="Map"
layout="topleft"
left_pad="5"
@@ -76,8 +80,8 @@
<button
enabled="false"
follows="bottom|left"
- font="SansSerifSmallBold"
- height="25"
+ font="SansSerifSmall"
+ height="19"
label="Share"
layout="topleft"
left_pad="5"
@@ -86,8 +90,8 @@
width="60" />
<button
follows="bottom|left"
- font="SansSerifSmallBold"
- height="25"
+ font="SansSerifSmall"
+ height="19"
label="Edit"
layout="topleft"
left_pad="5"
@@ -96,18 +100,21 @@
width="50" />
<button
follows="bottom|right"
- font="SansSerifSmallBold"
- height="25"
- label="â–¼"
+ font="SansSerifSmall"
+ height="19"
+ image_disabled="ForwardArrow_Disabled"
+ image_selected="ForwardArrow_Press"
+ image_unselected="ForwardArrow_Off"
+ picture_style="true"
layout="topleft"
name="overflow_btn"
right="-10"
top="0"
- width="30" />
+ width="18" />
<button
follows="bottom|right"
- font="SansSerifSmallBold"
- height="25"
+ font="SansSerifSmall"
+ height="19"
label="Close"
layout="topleft"
name="close_btn"
@@ -116,8 +123,8 @@
width="60" />
<button
follows="bottom|right"
- font="SansSerifSmallBold"
- height="25"
+ font="SansSerifSmall"
+ height="19"
label="Cancel"
layout="topleft"
name="cancel_btn"
@@ -126,8 +133,8 @@
width="60" />
<button
follows="bottom|right"
- font="SansSerifSmallBold"
- height="25"
+ font="SansSerifSmall"
+ height="19"
label="Save"
layout="topleft"
name="save_btn"
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 f7d7d52b68..16fdbd7045 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
@@ -196,7 +196,7 @@ Automatic positioning for:
name="heading3"
top_pad="10"
width="270">
-My Avatar:
+Avatars:
</text>
<check_box
control_name="FirstPersonAvatarVisible"
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 a94cfbeec4..975d21aaa6 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml
@@ -33,7 +33,7 @@
width="170">
<combo_box.item
enabled="true"
- label="System Default"
+ label="System default"
name="System Default Language"
value="default" />
<combo_box.item
@@ -189,7 +189,7 @@
name="start_location_textbox"
top_delta="20"
width="394">
- Start Location:
+ Start location:
</text>
<combo_box
control_name="LoginLocation"
@@ -213,7 +213,7 @@
control_name="ShowStartLocation"
height="16"
initial_value="true"
- label="Show on Login"
+ label="Show on login"
layout="topleft"
left_delta="175"
name="show_location_checkbox"
@@ -272,7 +272,7 @@
layout="topleft"
left_delta="0"
name="show_my_name_checkbox1"
- top_pad="5"
+ top_pad="-7"
width="300" />
<check_box
enabled_control="AvatarNameTagMode"
@@ -303,7 +303,7 @@
layout="topleft"
left="30"
name="effects_color_textbox"
- top_pad="10"
+ top_pad="5"
width="400">
My Effects:
</text>
@@ -316,7 +316,76 @@
left_delta="50"
name="effect_color_swatch"
tool_tip="Click to open Color Picker"
- top_pad="10"
+ top_pad="5"
width="32" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="15"
+ layout="topleft"
+ left="30"
+ name="title_afk_text"
+ text_color="white"
+ top_pad="-5"
+ width="190">
+ Away timeout:
+ </text>
+ <spinner
+ control_name="AFKTimeout"
+ decimal_digits="0"
+ follows="left|top"
+ halign="right"
+ height="15"
+ increment="1"
+ initial_value="300"
+ label=""
+ label_width="0"
+ layout="topleft"
+ left_delta="50"
+ max_val="600"
+ min_val="30"
+ name="afk_timeout_spinner"
+ top_pad="5"
+ width="50" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ halign="left"
+ height="15"
+ layout="topleft"
+ left_pad="2"
+ name="seconds_textbox"
+ width="70">
+ seconds
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="10"
+ layout="topleft"
+ text_color="white"
+ left="30"
+ mouse_opaque="false"
+ name="text_box3"
+ top_pad="10"
+ width="240">
+ Busy mode response:
+ </text>
+ <text_editor
+ control_name="BusyModeResponse2"
+ commit_on_focus_lost = "true"
+ follows="left|top"
+ height="56"
+ layout="topleft"
+ left_delta="50"
+ name="busy_response"
+ width="400"
+ word_wrap="true"
+ top_pad="5">
+ log_in_to_change
+ </text_editor>
</panel>
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 519b469868..b1308a1942 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
@@ -92,7 +92,7 @@
name="UI Size:"
top_pad="4"
width="300">
- UI Size:
+ UI size:
</text>
<slider
can_edit_text="true"
@@ -290,7 +290,7 @@
control_name="RenderObjectBump"
height="16"
initial_value="true"
- label="Bump Mapping and Shiny"
+ label="Bump mapping and shiny"
layout="topleft"
left_delta="0"
name="BumpShiny"
@@ -300,7 +300,7 @@
control_name="VertexShaderEnable"
height="16"
initial_value="true"
- label="Basic Shaders"
+ label="Basic shaders"
layout="topleft"
left_delta="0"
name="BasicShaders"
@@ -314,7 +314,7 @@
control_name="WindLightUseAtmosShaders"
height="16"
initial_value="true"
- label="Atmospheric Shaders"
+ label="Atmospheric shaders"
layout="topleft"
left_delta="0"
name="WindLightUseAtmosShaders"
@@ -327,7 +327,7 @@
control_name="RenderWaterReflections"
height="16"
initial_value="true"
- label="Water Reflections"
+ label="Water reflections"
layout="topleft"
left_delta="0"
name="Reflections"
@@ -346,7 +346,7 @@
name="ReflectionDetailText"
top_pad="7"
width="128">
- Reflection Detail:
+ Reflection detail:
</text>
<radio_group
control_name="RenderReflectionDetail"
@@ -359,7 +359,7 @@
width="321">
<radio_item
height="16"
- label="Terrain and Trees"
+ label="Terrain and trees"
layout="topleft"
left="3"
name="0"
@@ -367,7 +367,7 @@
width="315" />
<radio_item
height="16"
- label="All Static Objects"
+ label="All static objects"
layout="topleft"
left_delta="0"
name="1"
@@ -375,7 +375,7 @@
width="315" />
<radio_item
height="16"
- label="All Avatars and Objects"
+ label="All avatars and objects"
layout="topleft"
left_delta="0"
name="2"
@@ -400,13 +400,13 @@
name="AvatarRenderingText"
top_pad="5"
width="128">
- Avatar Rendering:
+ Avatar rendering:
</text>
<check_box
control_name="RenderUseImpostors"
height="16"
initial_value="true"
- label="Avatar Impostors"
+ label="Avatar impostors"
layout="topleft"
left_delta="0"
name="AvatarImpostors"
@@ -416,7 +416,7 @@
control_name="RenderAvatarVP"
height="16"
initial_value="true"
- label="Hardware Skinning"
+ label="Hardware skinning"
layout="topleft"
left_delta="0"
name="AvatarVertexProgram"
@@ -429,7 +429,7 @@
control_name="RenderAvatarCloth"
height="16"
initial_value="true"
- label="Avatar Cloth"
+ label="Avatar cloth"
layout="topleft"
left_delta="0"
name="AvatarCloth"
@@ -443,7 +443,7 @@
height="16"
increment="8"
initial_value="160"
- label="Draw Distance:"
+ label="Draw distance:"
label_width="140"
layout="topleft"
left="216"
@@ -474,7 +474,7 @@
height="16"
increment="256"
initial_value="4096"
- label="Max. Particle Count:"
+ label="Max. particle count:"
label_width="140"
layout="topleft"
left="216"
@@ -489,7 +489,7 @@
height="16"
increment="1"
initial_value="8"
- label="Post Process Quality:"
+ label="Post process quality:"
label_width="140"
layout="topleft"
left_delta="0"
@@ -513,7 +513,7 @@
name="MeshDetailText"
top_pad="5"
width="128">
- Mesh Detail:
+ Mesh detail:
</text>
<slider
control_name="RenderVolumeLODFactor"
@@ -724,7 +724,7 @@
name="LightingDetailText"
top_pad="8"
width="128">
- Lighting Detail:
+ Lighting detail:
</text>
<radio_group
control_name="RenderLightingDetail"
@@ -762,7 +762,7 @@
name="TerrainDetailText"
top="465"
width="128">
- Terrain Detail:
+ Terrain detail:
</text>
<radio_group
control_name="RenderTerrainDetail"
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 c4dc8834db..ce7939c00f 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml
@@ -77,10 +77,19 @@
name="cookies_enabled"
top_pad="10"
width="350" />
+ <check_box
+ control_name="AutoPlayMedia"
+ height="16"
+ label="Allow Media Autoplay"
+ layout="topleft"
+ left="30"
+ name="autoplay_enabled"
+ top_pad="10"
+ width="350" />
<text
- type="string"
- length="1"
- follows="left|top"
+ type="string"
+ length="1"
+ follows="left|top"
height="10"
layout="topleft"
left="30"
@@ -88,8 +97,9 @@
top_pad="10"
width="350">
Logs:
- </text>
+ </text>
<check_box
+
enabled="false"
control_name="LogInstantMessages"
height="16"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml
index df347cfb5f..9cf0bd26d8 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml
@@ -141,7 +141,7 @@
height="16"
increment="1"
initial_value="80"
- label="Port Number:"
+ label="Port number:"
label_width="75"
layout="topleft"
left_delta="160"
@@ -294,7 +294,7 @@
follows="left|top"
height="16"
initial_value="false"
- label="Web Proxy"
+ label="Web proxy"
left_delta="0"
mouse_opaque="true"
name="web_proxy_enabled"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
index f5f9850a4e..8a28719d98 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
@@ -15,7 +15,7 @@
height="15"
increment="0.05"
initial_value="0.5"
- label="Master Volume"
+ label="Master volume"
label_width="125"
layout="topleft"
left="30"
@@ -314,23 +314,27 @@
Sound out/in:
</text>
<button
- enabled_control="EnableVoiceChat"
+ control_name="ShowDeviceSettings"
follows="left|top"
height="20"
- label="Device Settings"
+ is_toggle="true"
+ label="Device settings"
layout="topleft"
left_delta="55"
name="device_settings_btn"
top_pad="0"
- width="155">
- <button.commit_callback
- function="Floater.Show"
- parameter="pref_voicedevicesettings" />
- </button>
- <panel.string
- name="default_text">
- Default
- </panel.string>
+ width="155" />
+ <panel
+ visiblity_control="ShowDeviceSettings"
+ border="false"
+ follows="top|left"
+ height="260"
+ label="DeviceSettings"
+ layout="topleft"
+ left="0"
+ name="Device Settings"
+ top_pad="5"
+ width="485">
<text
type="string"
length="1"
@@ -339,14 +343,14 @@
layout="topleft"
left="30"
name="Input device (microphone):"
- top_pad="5"
+ top_pad="0"
width="200">
Input device (microphone):
</text>
<combo_box
height="18"
layout="topleft"
- left_delta="70"
+ left_delta="55"
max_chars="128"
name="voice_input_device"
top_pad="2"
@@ -366,7 +370,7 @@
<combo_box
height="18"
layout="topleft"
- left_delta="70"
+ left_delta="55"
max_chars="128"
name="voice_output_device"
top_pad="2"
@@ -381,7 +385,7 @@
name="Input level:"
top_pad="10"
width="200">
- Input Level
+ Input level
</text>
<slider_bar
follows="left|top"
@@ -452,6 +456,6 @@
word_wrap="true">
Adjust the slider to control how loud you sound to other Residents. To test the input level, simply speak into your microphone.
</text>
-
+ </panel>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_profile.xml b/indra/newview/skins/default/xui/en/panel_profile.xml
index a32be90a33..73a759a8ba 100644
--- a/indra/newview/skins/default/xui/en/panel_profile.xml
+++ b/indra/newview/skins/default/xui/en/panel_profile.xml
@@ -53,7 +53,7 @@
left="10"
name="second_life_image_panel"
top="0"
- width="290">
+ width="280">
<texture_picker
allow_no_texture="true"
default_image_name="None"
@@ -75,13 +75,14 @@
text_color="white"
top_delta="0"
value="[SECOND_LIFE]:"
- width="170" />
+ width="165" />
<expandable_text
follows="left|top|right"
height="95"
layout="topleft"
left="107"
name="sl_description_edit"
+ top_pad="-3"
width="173"
expanded_bg_visible="true"
expanded_bg_color="DkGray">
@@ -95,7 +96,7 @@
top_pad="10"
left="10"
name="first_life_image_panel"
- width="290">
+ width="280">
<texture_picker
allow_no_texture="true"
default_image_name="None"
@@ -116,13 +117,14 @@
text_color="white"
top_delta="0"
value="Real World:"
- width="173" />
+ width="165" />
<expandable_text
follows="left|top|right"
height="95"
layout="topleft"
left="107"
name="fl_description_edit"
+ top_pad="-3"
width="173"
expanded_bg_visible="true"
expanded_bg_color="DkGray">
@@ -151,7 +153,7 @@
name="homepage_edit"
top_pad="0"
value="http://librarianavengers.org"
- width="290"
+ width="280"
word_wrap="false"
use_elipsis="true"
/>
@@ -205,7 +207,7 @@
name="acc_status_text"
top_pad="0"
value="Resident. No payment info on file."
- width="295"
+ width="280"
word_wrap="true" />
<text
follows="left|top"
@@ -215,7 +217,7 @@
left="10"
name="title_partner_text"
text_color="white"
- top_pad="10"
+ top_pad="5"
value="Partner:"
width="280" />
<panel
@@ -245,21 +247,21 @@
left="10"
name="title_groups_text"
text_color="white"
- top_pad="10"
+ top_pad="8"
value="Groups:"
width="280" />
- <text
+ <expandable_text
follows="left|top|bottom"
- height="160"
+ height="60"
layout="topleft"
left="10"
- name="sl_groups"
- top_pad="0"
- width="290"
- word_wrap="true"
- use_elipsis="true">
+ name="sl_groups"
+ top_pad="0"
+ width="280"
+ expanded_bg_visible="true"
+ expanded_bg_color="DkGray">
Lorem ipsum dolor sit amet, consectetur adlkjpiscing elit moose moose. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet. adipiscing elit. Aenean rigviverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet sorbet ipsum. adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum.
- </text>
+ </expandable_text>
</panel>
</scroll_container>
<panel
@@ -270,17 +272,17 @@
top_pad="2"
bottom="10"
height="19"
- width="313">
+ width="303">
<button
follows="bottom|left"
height="19"
- label="Add"
+ label="Add Friend"
layout="topleft"
left="0"
mouse_opaque="false"
name="add_friend"
top="5"
- width="55" />
+ width="75" />
<button
follows="bottom|left"
height="19"
@@ -289,7 +291,7 @@
name="im"
top="5"
left_pad="5"
- width="40" />
+ width="45" />
<button
enabled="false"
follows="bottom|left"
@@ -299,7 +301,7 @@
name="call"
left_pad="5"
top="5"
- width="55" />
+ width="45" />
<button
enabled="false"
follows="bottom|left"
@@ -309,7 +311,7 @@
name="show_on_map_btn"
top="5"
left_pad="5"
- width="50" />
+ width="45" />
<button
follows="bottom|left"
height="19"
@@ -318,7 +320,7 @@
name="teleport"
left_pad="5"
top="5"
- width="90" />
+ width="80" />
</panel>
<panel
follows="bottom|left"
@@ -328,7 +330,7 @@
name="profile_me_buttons_panel"
visible="false"
height="19"
- width="313">
+ width="303">
<button
follows="bottom|right"
font="SansSerifSmall"
diff --git a/indra/newview/skins/default/xui/en/panel_profile_view.xml b/indra/newview/skins/default/xui/en/panel_profile_view.xml
index 8a48574440..7a5781651d 100644
--- a/indra/newview/skins/default/xui/en/panel_profile_view.xml
+++ b/indra/newview/skins/default/xui/en/panel_profile_view.xml
@@ -52,8 +52,9 @@
height="535"
layout="topleft"
left="10"
+ min_width="333"
name="tabs"
- tab_min_width="95"
+ tab_min_width="80"
tab_height="30"
tab_position="top"
top_pad="10"
@@ -61,21 +62,21 @@
<panel
class="panel_profile"
filename="panel_profile.xml"
- label="Profile"
+ label="PROFILE"
layout="topleft"
help_topic="profile_profile_tab"
name="panel_profile" />
<panel
class="panel_picks"
filename="panel_picks.xml"
- label="Picks"
+ label="PICKS"
layout="topleft"
help_topic="profile_picks_tab"
name="panel_picks" />
<panel
class="panel_notes"
filename="panel_notes.xml"
- label="Notes &amp; Privacy"
+ label="NOTES &amp; PRIVACY"
layout="topleft"
help_topic="profile_notes_tab"
name="panel_notes" />
diff --git a/indra/newview/skins/default/xui/en/panel_side_tray.xml b/indra/newview/skins/default/xui/en/panel_side_tray.xml
index d3d45640cb..3f64c9c633 100644
--- a/indra/newview/skins/default/xui/en/panel_side_tray.xml
+++ b/indra/newview/skins/default/xui/en/panel_side_tray.xml
@@ -1,4 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<!-- Side tray cannot show background because it is always
+ partially on screen to hold tab buttons. -->
<side_tray
name="sidebar"
background_visible="false"
@@ -6,21 +8,24 @@
width="333"
collapsed="true"
>
+ <!-- Individual tabs must show background to have seemless
+ appearance up to tray panel header word like "Home".
+ Embedded panels are inset by a pixel and so their
+ backgrounds will not block the world fully. -->
<sidetray_tab
name="sidebar_home"
help_topic="sidebar_home"
tab_title="Home"
description="Home."
image="TabIcon_Open_Off"
+ image_selected="TabIcon_Close_Off"
mouse_opaque="false"
- background_opaque="false"
background_visible="true"
>
<panel
name="panel_home"
filename="panel_sidetray_home_tab.xml"
label="home"
- border="true"
/>
</sidetray_tab>
@@ -30,8 +35,8 @@
tab_title="People"
description="Find your friends, contacts and people nearby."
image="TabIcon_People_Off"
+ image_selected="TabIcon_People_Selected"
mouse_opaque="false"
- background_opaque="false"
background_visible="true"
>
<panel_container
@@ -42,20 +47,17 @@
class="panel_people"
name="panel_people"
filename="panel_people.xml"
- border="true"
/>
<panel
class="panel_profile_view"
name="panel_profile_view"
filename="panel_profile_view.xml"
- border="true"
/>
<panel
class="panel_group_info_sidetray"
name="panel_group_info_sidetray"
filename="panel_group_info_sidetray.xml"
label="Group Info"
- border="true"
font="SansSerifBold"
/>
<panel
@@ -63,12 +65,12 @@
name="panel_block_list_sidetray"
filename="panel_block_list_sidetray.xml"
label="Blocked Residents &amp; Objects"
- border="true"
font="SansSerifBold"
/>
</panel_container>
</sidetray_tab>
+
<sidetray_tab
name="sidebar_places"
help_topic="sidebar_places"
@@ -76,6 +78,7 @@
label="Places"
description="Find places to go and places you&apos;ve visited before."
image="TabIcon_Places_Off"
+ image_selected="TabIcon_Places_Selected"
mouse_opaque="false"
background_visible="true"
>
@@ -84,7 +87,6 @@
name="panel_places"
filename="panel_places.xml"
label="Places"
- border="true"
font="SansSerifBold"
/>
</sidetray_tab>
@@ -95,6 +97,7 @@
tab_title="Me"
description="Edit your public profile and Picks."
image="TabIcon_Me_Off"
+ image_selected="TabIcon_Me_Selected"
mouse_opaque="false"
background_visible="true"
>
@@ -103,7 +106,6 @@
name="panel_me_profile"
filename="panel_me_profile.xml"
label="Me"
- border="true"
/>
</sidetray_tab>
@@ -113,19 +115,17 @@
tab_title="Appearance"
description="Change your appearance and current look."
image="TabIcon_Appearance_Off"
+ image_selected="TabIcon_Appearance_Selected"
mouse_opaque="false"
- background_opaque="false"
background_visible="true"
>
<panel
class="panel_appearance"
name="panel_appearance"
filename="panel_appearance.xml"
- border="true"
label="Edit Appearance"
font="SansSerifBold"
/>
</sidetray_tab>
-
</side_tray>
diff --git a/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml b/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml
index e991861e94..247054772e 100644
--- a/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml
+++ b/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<!-- Part of side tray, see that XML file for panel config -->
<panel
- background_visible="true"
- bevel_style="out"
follows="all"
height="560"
label="home_tab"
diff --git a/indra/newview/skins/default/xui/en/panel_toast.xml b/indra/newview/skins/default/xui/en/panel_toast.xml
index 01fd84e09d..2e500fc2aa 100644
--- a/indra/newview/skins/default/xui/en/panel_toast.xml
+++ b/indra/newview/skins/default/xui/en/panel_toast.xml
@@ -7,7 +7,7 @@
visible="false"
layout="topleft"
width="350"
- height="72"
+ height="40"
left="100"
top="500"
follows="right|bottom"
@@ -24,18 +24,18 @@
visible="false"
follows="left|top|right|bottom"
font="SansSerifBold"
- height="40"
+ height="28"
layout="topleft"
left="60"
name="toast_text"
word_wrap="true"
text_color="white"
- top="20"
+ top="10"
width="290">
Toast text;
</text>
<icon
- top="20"
+ top="4"
left="10"
width="32"
height="32"
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 0ca6c87585..4c19b22ac5 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -16,7 +16,7 @@
<string name="StartupLoading">Loading</string>
<!-- Legacy strings, almost never used -->
- <string name="Fullbright">Fullbright (Legacy)</string>
+ <string name="Fullbright">Fullbright (Legacy)</string> <!-- used in the Build > materials dropdown-->
<!-- Login -->
<string name="LoginInProgress">Logging in. [APP_NAME] may appear frozen. Please wait.</string>
@@ -130,7 +130,7 @@
<string name="AssetErrorPriceMismatch">Viewer and server do not agree on price</string>
<string name="AssetErrorUnknownStatus">Unknown status</string>
- <!-- Asset Type Human Names -->
+ <!-- Asset Type human readable names: these will replace variable [TYPE] in notification FailedToFindWearable* -->
<string name="texture">texture</string>
<string name="sound">sound</string>
<string name="calling card">calling card</string>
@@ -138,23 +138,23 @@
<string name="legacy script">legacy script</string>
<string name="clothing">clothing</string>
<string name="object">object</string>
- <string name="note card">note card</string>
+ <string name="note card">notecard</string>
<string name="folder">folder</string>
<string name="root">root</string>
- <string name="lsl2 script">lsl2 script</string>
- <string name="lsl bytecode">lsl bytecode</string>
+ <string name="lsl2 script">LSL2 script</string>
+ <string name="lsl bytecode">LSL bytecode</string>
<string name="tga texture">tga texture</string>
- <string name="body part">body part</string>
- <string name="snapshot">snapshot</string>
- <string name="lost and found">lost and found</string>
- <string name="targa image">targa image</string>
- <string name="trash">trash</string>
- <string name="jpeg image">jpeg image</string>
- <string name="animation">animation</string>
- <string name="gesture">gesture</string>
- <string name="simstate">simstate</string>
- <string name="favorite">favorite</string>
- <string name="symbolic link">link</string>
+ <string name="body part">body part</string>
+ <string name="snapshot">snapshot</string>
+ <string name="lost and found">Lost and Found</string>
+ <string name="targa image">targa image</string>
+ <string name="trash">Trash</string>
+ <string name="jpeg image">jpeg image</string>
+ <string name="animation">animation</string>
+ <string name="gesture">gesture</string>
+ <string name="simstate">simstate</string>
+ <string name="favorite">favorite</string>
+ <string name="symbolic link">link</string>
<!-- llvoavatar. Displayed in the avatar chat bubble -->
<string name="AvatarEditingAppearance">(Editing Appearance)</string>
@@ -1819,6 +1819,7 @@ this texture in your inventory
<string name="broken_link" value=" (broken_link)" />
<string name="LoadingContents">Loading contents...</string>
<string name="NoContents">No contents</string>
+ <string name="WornOnAttachmentPoint"> (worn on [ATTACHMENT_POINT])</string>
<!-- Gestures labels -->
<!-- use value="" because they have preceding spaces -->
@@ -2844,13 +2845,13 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
<string name="Wide Lips">Wide Lips</string>
<string name="Wild">Wild</string>
<string name="Wrinkles">Wrinkles</string>
-
- <string name="Search">Search</string>
<!-- Favorites Bar -->
<string name="LocationCtrlAddLandmarkTooltip">Add to My Landmarks</string>
<string name="LocationCtrlEditLandmarkTooltip">Edit My Landmark</string>
-
+ <string name="LocationCtrlInfoBtnTooltip">See more info about the current location</string>
+ <string name="LocationCtrlComboBtnTooltip">My location history</string>
+
<!-- Strings used by the (currently Linux) auto-updater app -->
<string name="UpdaterWindowTitle">
[APP_NAME] Update
@@ -2884,6 +2885,22 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
</string>
<!-- IM system messages -->
+ <string name="ringing-im">
+ Joining Voice Chat...
+ </string>
+ <string name="connected-im">
+ Connected, click End Call to hang up
+ </string>
+ <string name="hang_up-im">
+ Left Voice Chat
+ </string>
+ <string name="answering-im">
+ Connecting...
+ </string>
+ <string name="inventory_item_offered-im">
+ Inventory item offered
+ </string>
+
<string name="only_user_message">
You are the only user in this session.
</string>
diff --git a/indra/newview/skins/default/xui/en/widgets/accordion_tab.xml b/indra/newview/skins/default/xui/en/widgets/accordion_tab.xml
index 3ff0b3062a..dabcb1038b 100644
--- a/indra/newview/skins/default/xui/en/widgets/accordion_tab.xml
+++ b/indra/newview/skins/default/xui/en/widgets/accordion_tab.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<accordion_tab
- header_bg_color="0.68 0.68 0.68 1"
- header_txt_color="0.68 0.68 0.68 1"
+ header_bg_color="DkGray2"
+ header_txt_color="LtGray"
header_collapse_img="Accordion_ArrowClosed_Off"
header_collapse_img_pressed="Accordion_ArrowClosed_Press"
header_expand_img="Accordion_ArrowOpened_Off"
header_expand_img_pressed="Accordion_ArrowOpened_Press"
- header_image="Accordion_Off.png"
+ header_image="Accordion_Off"
header_image_over="Accordion_Over"
header_image_pressed="Accordion_Press"
/>
diff --git a/indra/newview/skins/default/xui/en/widgets/location_input.xml b/indra/newview/skins/default/xui/en/widgets/location_input.xml
index 1377a3c945..f2e48c517d 100644
--- a/indra/newview/skins/default/xui/en/widgets/location_input.xml
+++ b/indra/newview/skins/default/xui/en/widgets/location_input.xml
@@ -21,7 +21,6 @@
>
<info_button name="Place Information"
label=""
- tool_tip="See more info about the current location"
width="16"
height="16"
follows="left|top"
@@ -43,8 +42,7 @@
left="-3" />
<combo_button name="Location History"
label=""
- pad_right="0"
- tool_tip="My location history"/>
+ pad_right="0"/>
<combo_list bg_writeable_color="MenuDefaultBgColor" page_lines="10"
scroll_bar_bg_visible="true" />
<combo_editor name="Combo Text Entry"
diff --git a/indra/newview/skins/default/xui/en/widgets/tab_container.xml b/indra/newview/skins/default/xui/en/widgets/tab_container.xml
index 25d85899a1..2fe5f517a2 100644
--- a/indra/newview/skins/default/xui/en/widgets/tab_container.xml
+++ b/indra/newview/skins/default/xui/en/widgets/tab_container.xml
@@ -1,10 +1,23 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<tab_container tab_min_width="60"
tab_max_width="150"
- tab_height="16"
- tab_top_image_unselected="TabTop_Middle_Off"
- tab_top_image_selected="TabTop_Middle_Selected"
+ tab_height="16">
+ <first_tab tab_top_image_unselected="TabTop_Left_Off"
+ tab_top_image_selected="TabTop_Left_Selected"
tab_bottom_image_unselected="Toolbar_Left_Off"
tab_bottom_image_selected="Toolbar_Left_Selected"
- tab_left_image_unselected="TabTop_Left_Off"
- tab_left_image_selected="TabTop_Left_Selected"/> \ No newline at end of file
+ tab_left_image_unselected="TabTop_Middle_Off"
+ tab_left_image_selected="TabTop_Middle_Selected"/>
+ <middle_tab tab_top_image_unselected="TabTop_Middle_Off"
+ tab_top_image_selected="TabTop_Middle_Selected"
+ tab_bottom_image_unselected="Toolbar_Middle_Off"
+ tab_bottom_image_selected="Toolbar_Middle_Selected"
+ tab_left_image_unselected="TabTop_Middle_Off"
+ tab_left_image_selected="TabTop_Middle_Selected"/>
+ <last_tab tab_top_image_unselected="TabTop_Right_Off"
+ tab_top_image_selected="TabTop_Right_Selected"
+ tab_bottom_image_unselected="Toolbar_Right_Off"
+ tab_bottom_image_selected="Toolbar_Right_Selected"
+ tab_left_image_unselected="TabTop_Middle_Off"
+ tab_left_image_selected="TabTop_Middle_Selected"/>
+</tab_container> \ No newline at end of file
diff --git a/indra/newview/tests/llcapabilitylistener_test.cpp b/indra/newview/tests/llcapabilitylistener_test.cpp
index b965379c9c..4759c7dc91 100644
--- a/indra/newview/tests/llcapabilitylistener_test.cpp
+++ b/indra/newview/tests/llcapabilitylistener_test.cpp
@@ -5,7 +5,30 @@
* @brief Test for llcapabilitylistener.cpp.
*
* $LicenseInfo:firstyear=2008&license=viewergpl$
- * Copyright (c) 2008, Linden Research, Inc.
+ *
+ * Copyright (c) 2008-2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
*/
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 06eb1e1265..b85d31d1ac 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -573,6 +573,24 @@ class DarwinManifest(ViewerManifest):
self.path("../mac_crash_logger/" + self.args['configuration'] + "/mac-crash-logger.app", "mac-crash-logger.app")
self.path("../mac_updater/" + self.args['configuration'] + "/mac-updater.app", "mac-updater.app")
+ # our apps dependencies on shared libs
+ if dylibs["llcommon"]:
+ mac_crash_logger_res_path = self.dst_path_of("mac-crash-logger.app/Contents/Resources")
+ mac_updater_res_path = self.dst_path_of("mac-updater.app/Contents/Resources")
+ for libfile in ("libllcommon.dylib",
+ "libapr-1.0.3.7.dylib",
+ "libaprutil-1.0.3.8.dylib",
+ "libexpat.0.5.0.dylib"):
+ target_lib = os.path.join('../../..', libfile)
+ self.run_command("ln -sf %(target)r %(link)r" %
+ {'target': target_lib,
+ 'link' : os.path.join(mac_crash_logger_res_path, libfile)}
+ )
+ self.run_command("ln -sf %(target)r %(link)r" %
+ {'target': target_lib,
+ 'link' : os.path.join(mac_updater_res_path, libfile)}
+ )
+
# plugin launcher
self.path("../llplugin/slplugin/" + self.args['configuration'] + "/SLPlugin", "SLPlugin")
@@ -597,7 +615,7 @@ class DarwinManifest(ViewerManifest):
# This may be desirable for the final release. Or not.
if ("package" in self.args['actions'] or
"unpacked" in self.args['actions']):
- self.run_command('strip -S "%(viewer_binary)s"' %
+ self.run_command('strip -S %(viewer_binary)r' %
{ 'viewer_binary' : self.dst_path_of('Contents/MacOS/Second Life')})
@@ -626,12 +644,12 @@ class DarwinManifest(ViewerManifest):
# make sure we don't have stale files laying about
self.remove(sparsename, finalname)
- self.run_command('hdiutil create "%(sparse)s" -volname "%(vol)s" -fs HFS+ -type SPARSE -megabytes 700 -layout SPUD' % {
+ self.run_command('hdiutil create %(sparse)r -volname %(vol)r -fs HFS+ -type SPARSE -megabytes 700 -layout SPUD' % {
'sparse':sparsename,
'vol':volname})
# mount the image and get the name of the mount point and device node
- hdi_output = self.run_command('hdiutil attach -private "' + sparsename + '"')
+ hdi_output = self.run_command('hdiutil attach -private %r' % sparsename)
devfile = re.search("/dev/disk([0-9]+)[^s]", hdi_output).group(0).strip()
volpath = re.search('HFS\s+(.+)', hdi_output).group(1).strip()
@@ -665,24 +683,25 @@ class DarwinManifest(ViewerManifest):
self.copy_action(self.src_path_of(s), os.path.join(volpath, d))
# Hide the background image, DS_Store file, and volume icon file (set their "visible" bit)
- self.run_command('SetFile -a V "' + os.path.join(volpath, ".VolumeIcon.icns") + '"')
- self.run_command('SetFile -a V "' + os.path.join(volpath, "background.jpg") + '"')
- self.run_command('SetFile -a V "' + os.path.join(volpath, ".DS_Store") + '"')
+ for f in ".VolumeIcon.icns", "background.jpg", ".DS_Store":
+ self.run_command('SetFile -a V %r' % os.path.join(volpath, f))
# Create the alias file (which is a resource file) from the .r
- self.run_command('rez "' + self.src_path_of("installers/darwin/release-dmg/Applications-alias.r") + '" -o "' + os.path.join(volpath, "Applications") + '"')
+ self.run_command('rez %r -o %r' %
+ (self.src_path_of("installers/darwin/release-dmg/Applications-alias.r"),
+ os.path.join(volpath, "Applications")))
# Set the alias file's alias and custom icon bits
- self.run_command('SetFile -a AC "' + os.path.join(volpath, "Applications") + '"')
+ self.run_command('SetFile -a AC %r' % os.path.join(volpath, "Applications"))
# Set the disk image root's custom icon bit
- self.run_command('SetFile -a C "' + volpath + '"')
+ self.run_command('SetFile -a C %r' % volpath)
# Unmount the image
- self.run_command('hdiutil detach -force "' + devfile + '"')
+ self.run_command('hdiutil detach -force %r' % devfile)
print "Converting temp disk image to final disk image"
- self.run_command('hdiutil convert "%(sparse)s" -format UDZO -imagekey zlib-level=9 -o "%(final)s"' % {'sparse':sparsename, 'final':finalname})
+ self.run_command('hdiutil convert %(sparse)r -format UDZO -imagekey zlib-level=9 -o %(final)r' % {'sparse':sparsename, 'final':finalname})
# get rid of the temp file
self.package_file = finalname
self.remove(sparsename)