summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/cmake/Copy3rdPartyLibs.cmake1
-rw-r--r--indra/cmake/LLAudio.cmake3
-rw-r--r--indra/cmake/Variables.cmake3
-rw-r--r--indra/llcommon/CMakeLists.txt2
-rw-r--r--indra/llcommon/ll_template_cast.h160
-rw-r--r--indra/llcommon/llevents.cpp25
-rw-r--r--indra/llcommon/llevents.h97
-rw-r--r--indra/llcommon/lllistenerwrapper.h181
-rw-r--r--indra/llcommon/tests/llerror_test.cpp9
-rw-r--r--indra/llmessage/tests/llsdmessage_test.cpp27
-rw-r--r--indra/llplugin/llplugininstance.cpp33
-rw-r--r--indra/llplugin/llplugininstance.h24
-rw-r--r--indra/llplugin/llpluginmessage.cpp166
-rw-r--r--indra/llplugin/llpluginmessage.h16
-rw-r--r--indra/llrender/llfontgl.cpp4
-rw-r--r--indra/llui/llflatlistview.cpp99
-rw-r--r--indra/llui/llflatlistview.h6
-rw-r--r--indra/llui/llfloater.cpp12
-rw-r--r--indra/llui/llfloater.h3
-rw-r--r--indra/llui/llnotificationsutil.cpp5
-rw-r--r--indra/llui/llnotificationsutil.h2
-rw-r--r--indra/llui/llscrollcontainer.cpp31
-rw-r--r--indra/llui/llsearcheditor.cpp9
-rw-r--r--indra/llui/llsearcheditor.h1
-rw-r--r--indra/llui/lltextbase.cpp41
-rw-r--r--indra/llui/lltextbase.h8
-rw-r--r--indra/llui/llui.cpp6
-rw-r--r--indra/llui/lluiimage.cpp36
-rw-r--r--indra/llui/lluiimage.h9
-rw-r--r--indra/llui/llurlentry.cpp26
-rw-r--r--indra/llui/llurlregistry.cpp4
-rw-r--r--indra/llui/llview.cpp11
-rw-r--r--indra/llui/llview.h11
-rw-r--r--indra/llwindow/llwindow.h2
-rw-r--r--indra/llwindow/llwindowheadless.h2
-rw-r--r--indra/llwindow/llwindowmacosx.cpp4
-rw-r--r--indra/llwindow/llwindowmacosx.h5
-rw-r--r--indra/llwindow/llwindowmesaheadless.h2
-rw-r--r--indra/llwindow/llwindowsdl.cpp2
-rw-r--r--indra/llwindow/llwindowsdl.h5
-rw-r--r--indra/llwindow/llwindowwin32.cpp3
-rw-r--r--indra/llwindow/llwindowwin32.h5
-rw-r--r--indra/media_plugins/base/media_plugin_base.cpp56
-rw-r--r--indra/media_plugins/base/media_plugin_base.h44
-rw-r--r--indra/newview/CMakeLists.txt64
-rw-r--r--indra/newview/app_settings/settings.xml28
-rw-r--r--indra/newview/llagentwearables.cpp8
-rw-r--r--indra/newview/llappearancemgr.cpp15
-rw-r--r--indra/newview/llappviewer.cpp44
-rw-r--r--indra/newview/llassetuploadresponders.cpp12
-rw-r--r--indra/newview/llavataractions.cpp7
-rw-r--r--indra/newview/llavatarlist.cpp11
-rw-r--r--indra/newview/llavatarlistitem.cpp29
-rw-r--r--indra/newview/llavatarlistitem.h5
-rw-r--r--indra/newview/llbottomtray.cpp15
-rw-r--r--indra/newview/llbottomtray.h2
-rw-r--r--indra/newview/llcallfloater.cpp2
-rw-r--r--indra/newview/llchannelmanager.cpp2
-rw-r--r--indra/newview/llchathistory.cpp41
-rw-r--r--indra/newview/llchathistory.h1
-rw-r--r--indra/newview/llchatitemscontainerctrl.cpp2
-rw-r--r--indra/newview/llchiclet.cpp93
-rw-r--r--indra/newview/llchiclet.h61
-rw-r--r--indra/newview/llcurrencyuimanager.cpp18
-rw-r--r--indra/newview/llfloaterabout.cpp24
-rw-r--r--indra/newview/llfloateravatarpicker.cpp53
-rw-r--r--indra/newview/llfloateravatarpicker.h9
-rw-r--r--indra/newview/llfloaterinventory.cpp22
-rw-r--r--indra/newview/llfloaterinventory.h5
-rw-r--r--indra/newview/llfloateropenobject.cpp6
-rw-r--r--indra/newview/llfloaterpreference.cpp63
-rw-r--r--indra/newview/llfloaterpreference.h4
-rw-r--r--indra/newview/llfloaterreporter.cpp14
-rw-r--r--indra/newview/llfloatersearch.cpp4
-rw-r--r--indra/newview/llfolderview.cpp4
-rw-r--r--indra/newview/llfolderview.h5
-rw-r--r--indra/newview/llfolderviewitem.cpp24
-rw-r--r--indra/newview/llfolderviewitem.h3
-rw-r--r--indra/newview/llgesturemgr.cpp3
-rw-r--r--indra/newview/llgrouplist.cpp26
-rw-r--r--indra/newview/llgrouplist.h6
-rw-r--r--indra/newview/llimfloater.cpp1
-rw-r--r--indra/newview/llimview.cpp259
-rw-r--r--indra/newview/llimview.h67
-rw-r--r--indra/newview/llinventorybridge.cpp120
-rw-r--r--indra/newview/llinventorybridge.h3
-rw-r--r--indra/newview/llinventoryfilter.cpp309
-rw-r--r--indra/newview/llinventoryfilter.h198
-rw-r--r--indra/newview/llinventoryfunctions.h27
-rw-r--r--indra/newview/llinventorymodel.cpp126
-rw-r--r--indra/newview/llinventorymodel.h15
-rw-r--r--indra/newview/llinventoryobserver.h7
-rw-r--r--indra/newview/llinventorypanel.cpp421
-rw-r--r--indra/newview/llinventorypanel.h17
-rw-r--r--indra/newview/lllocationinputctrl.cpp9
-rw-r--r--indra/newview/llloginhandler.cpp29
-rw-r--r--indra/newview/lllogininstance.cpp3
-rw-r--r--indra/newview/llmoveview.cpp2
-rw-r--r--indra/newview/llnavigationbar.cpp46
-rw-r--r--indra/newview/llnearbychat.cpp29
-rw-r--r--indra/newview/llnearbychathandler.cpp18
-rw-r--r--indra/newview/llnotificationhandler.h5
-rw-r--r--indra/newview/llnotificationhandlerutil.cpp22
-rw-r--r--indra/newview/llnotificationofferhandler.cpp58
-rw-r--r--indra/newview/llpanelgroupnotices.cpp3
-rw-r--r--indra/newview/llpanelhome.cpp43
-rw-r--r--indra/newview/llpanelhome.h4
-rw-r--r--indra/newview/llpanelimcontrolpanel.cpp9
-rw-r--r--indra/newview/llpanelimcontrolpanel.h5
-rw-r--r--indra/newview/llpanellandmarks.cpp22
-rw-r--r--indra/newview/llpanellogin.cpp30
-rw-r--r--indra/newview/llpanellogin.h1
-rw-r--r--indra/newview/llpanelmaininventory.cpp81
-rw-r--r--indra/newview/llpanelme.cpp7
-rw-r--r--indra/newview/llpanelme.h2
-rw-r--r--indra/newview/llpanelobjectinventory.cpp3
-rw-r--r--indra/newview/llpaneloutfitsinventory.cpp2
-rw-r--r--indra/newview/llpanelpeople.cpp26
-rw-r--r--indra/newview/llpanelpeople.h3
-rw-r--r--indra/newview/llpanelpeoplemenus.cpp4
-rw-r--r--indra/newview/llpanelpicks.cpp7
-rw-r--r--indra/newview/llpanelplaces.cpp18
-rw-r--r--indra/newview/llpanelplacestab.h8
-rw-r--r--indra/newview/llpanelprimmediacontrols.cpp112
-rw-r--r--indra/newview/llpanelprimmediacontrols.h7
-rw-r--r--indra/newview/llpanelprofile.cpp6
-rw-r--r--indra/newview/llpanelprofile.h2
-rw-r--r--indra/newview/llpanelteleporthistory.cpp25
-rw-r--r--indra/newview/llscreenchannel.cpp35
-rw-r--r--indra/newview/llscreenchannel.h7
-rw-r--r--indra/newview/llscriptfloater.cpp69
-rw-r--r--indra/newview/llscriptfloater.h13
-rw-r--r--indra/newview/llsidepanelinventory.cpp22
-rw-r--r--indra/newview/llsidepanelinventory.h4
-rw-r--r--indra/newview/llsidetray.cpp26
-rw-r--r--indra/newview/llsidetray.h6
-rw-r--r--indra/newview/llstartup.cpp8
-rw-r--r--indra/newview/llsyswellwindow.cpp537
-rw-r--r--indra/newview/llsyswellwindow.h107
-rw-r--r--indra/newview/llteleporthistory.cpp5
-rw-r--r--indra/newview/lltexturefetch.cpp8
-rw-r--r--indra/newview/lltoast.cpp33
-rw-r--r--indra/newview/lltoast.h9
-rw-r--r--indra/newview/lltoastimpanel.cpp16
-rw-r--r--indra/newview/lltoastimpanel.h3
-rw-r--r--indra/newview/lltoolbar.cpp12
-rw-r--r--indra/newview/llversioninfo.cpp109
-rw-r--r--indra/newview/llversioninfo.h71
-rw-r--r--indra/newview/llviewerassetstorage.cpp1
-rw-r--r--indra/newview/llviewercontrol.cpp1
-rw-r--r--indra/newview/llviewerfloaterreg.cpp5
-rw-r--r--indra/newview/llviewerfoldertype.cpp67
-rw-r--r--indra/newview/llviewerfoldertype.h4
-rw-r--r--indra/newview/llviewerhelp.cpp1
-rw-r--r--indra/newview/llviewerhelputil.cpp34
-rw-r--r--indra/newview/llviewerhome.cpp73
-rw-r--r--indra/newview/llviewerhome.h49
-rw-r--r--indra/newview/llviewerinventory.cpp100
-rw-r--r--indra/newview/llviewerinventory.h5
-rw-r--r--indra/newview/llviewerkeyboard.cpp3
-rw-r--r--indra/newview/llviewermedia.cpp86
-rw-r--r--indra/newview/llviewermedia.h7
-rw-r--r--indra/newview/llviewermenu.cpp149
-rw-r--r--indra/newview/llviewermessage.cpp251
-rw-r--r--indra/newview/llviewerprecompiledheaders.h1
-rw-r--r--indra/newview/llviewertexturelist.cpp6
-rw-r--r--indra/newview/llviewerwindow.cpp4
-rw-r--r--indra/newview/llvoavatar.cpp19
-rw-r--r--indra/newview/llvoicechannel.cpp87
-rw-r--r--indra/newview/llvoicechannel.h1
-rw-r--r--indra/newview/llwearable.cpp10
-rw-r--r--indra/newview/llwearable.h4
-rw-r--r--indra/newview/skins/default/colors.xml2
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_LinkFolder.pngbin0 -> 296 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Inv_LinkItem.pngbin0 -> 296 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_BuildNo_Dark.pngbin0 -> 516 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_BuildNo_Light.pngbin0 -> 505 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_Build_Dark.pngbin0 -> 343 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_DamageNo_Dark.pngbin0 -> 457 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_Damage_Dark.pngbin0 -> 325 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_Exp_Color.pngbin0 -> 272 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_FlyNo_Dark.pngbin0 -> 424 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_FlyNo_Light.pngbin0 -> 429 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_Fly_Dark.pngbin0 -> 271 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_ForSale_Light.pngbin0 -> 561 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_Health_Dark.pngbin0 -> 285 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_M_Dark.pngbin0 -> 333 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_M_Light.pngbin0 -> 322 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_NoScripts_Light.pngbin0 -> 620 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_PG_Dark.pngbin0 -> 407 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_PG_Light.pngbin0 -> 387 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_PushNo_Dark.pngbin0 -> 523 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_PushNo_Light.pngbin0 -> 516 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_Push_Dark.pngbin0 -> 430 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_R_Dark.pngbin0 -> 319 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_R_Light.pngbin0 -> 309 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_ScriptsNo_Dark.pngbin0 -> 620 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_Scripts_Dark.pngbin0 -> 471 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_VoiceNo_Dark.pngbin0 -> 492 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_VoiceNo_Light.pngbin0 -> 516 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_Voice_Dark.pngbin0 -> 380 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Parcel_Voice_Light.pngbin0 -> 405 bytes
-rw-r--r--indra/newview/skins/default/textures/textures.xml99
-rw-r--r--indra/newview/skins/default/xui/en/floater_aaa.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_lagmeter.xml4
-rw-r--r--indra/newview/skins/default/xui/en/floater_search.xml20
-rw-r--r--indra/newview/skins/default/xui/en/floater_select_key.xml33
-rw-r--r--indra/newview/skins/default/xui/en/floater_sell_land.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_sys_well.xml16
-rw-r--r--indra/newview/skins/default/xui/en/floater_telehub.xml49
-rw-r--r--indra/newview/skins/default/xui/en/floater_test_text_editor.xml12
-rw-r--r--indra/newview/skins/default/xui/en/floater_top_objects.xml84
-rw-r--r--indra/newview/skins/default/xui/en/floater_water.xml32
-rw-r--r--indra/newview/skins/default/xui/en/floater_world_map.xml4
-rw-r--r--indra/newview/skins/default/xui/en/inspect_remote_object.xml67
-rw-r--r--indra/newview/skins/default/xui/en/main_view.xml3
-rw-r--r--indra/newview/skins/default/xui/en/menu_avatar_icon.xml2
-rw-r--r--indra/newview/skins/default/xui/en/menu_imchiclet_p2p.xml2
-rw-r--r--indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml26
-rw-r--r--indra/newview/skins/default/xui/en/menu_login.xml3
-rw-r--r--indra/newview/skins/default/xui/en/menu_navbar.xml2
-rw-r--r--indra/newview/skins/default/xui/en/menu_participant_list.xml61
-rw-r--r--indra/newview/skins/default/xui/en/menu_people_nearby.xml1
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml30
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml11
-rw-r--r--indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml45
-rw-r--r--indra/newview/skins/default/xui/en/panel_bottomtray.xml68
-rw-r--r--indra/newview/skins/default/xui/en/panel_classified.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_profile.xml6
-rw-r--r--indra/newview/skins/default/xui/en/panel_friends.xml10
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_control_panel.xml42
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_general.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_notices.xml15
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_roles.xml8
-rw-r--r--indra/newview/skins/default/xui/en/panel_instant_message.xml11
-rw-r--r--indra/newview/skins/default/xui/en/panel_landmark_info.xml6
-rw-r--r--indra/newview/skins/default/xui/en/panel_login.xml35
-rw-r--r--indra/newview/skins/default/xui/en/panel_main_inventory.xml9
-rw-r--r--indra/newview/skins/default/xui/en/panel_media_settings_security.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_my_profile.xml36
-rw-r--r--indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml3
-rw-r--r--indra/newview/skins/default/xui/en/panel_outfits_inventory.xml123
-rw-r--r--indra/newview/skins/default/xui/en/panel_picks.xml5
-rw-r--r--indra/newview/skins/default/xui/en/panel_place_profile.xml46
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_chat.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_privacy.xml11
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_sound.xml127
-rw-r--r--indra/newview/skins/default/xui/en/panel_prim_media_controls.xml175
-rw-r--r--indra/newview/skins/default/xui/en/panel_profile.xml8
-rw-r--r--indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml55
-rw-r--r--indra/newview/skins/default/xui/en/panel_status_bar.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_toast.xml2
-rw-r--r--indra/newview/skins/default/xui/en/sidepanel_appearance.xml276
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml23
-rw-r--r--indra/newview/skins/default/xui/en/widgets/filter_editor.xml1
-rw-r--r--indra/newview/skins/default/xui/en/widgets/floater.xml2
-rw-r--r--indra/newview/skins/default/xui/en/widgets/location_input.xml25
-rw-r--r--indra/newview/skins/default/xui/en/widgets/output_monitor.xml2
-rw-r--r--indra/newview/skins/default/xui/en/widgets/search_combo_box.xml3
-rw-r--r--indra/newview/skins/default/xui/en/widgets/search_editor.xml1
-rw-r--r--indra/newview/skins/default/xui/en/widgets/spinner.xml2
-rw-r--r--indra/newview/skins/default/xui/en/widgets/teleport_history_menu_item.xml12
-rw-r--r--indra/newview/tests/llviewerhelputil_test.cpp11
-rw-r--r--indra/test/CMakeLists.txt4
-rw-r--r--indra/test/llevents_tut.cpp30
-rw-r--r--indra/test/llsdutil_tut.cpp2
-rw-r--r--indra/viewer_components/login/tests/lllogin_test.cpp18
-rw-r--r--install.xml32
268 files changed, 5176 insertions, 2919 deletions
diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake
index 5a142f23c9..faf9da8b14 100644
--- a/indra/cmake/Copy3rdPartyLibs.cmake
+++ b/indra/cmake/Copy3rdPartyLibs.cmake
@@ -231,7 +231,6 @@ elseif(LINUX)
libstacktrace.so
libtcmalloc.so
libuuid.so.1
- libz.so
libssl.so.0.9.7
)
diff --git a/indra/cmake/LLAudio.cmake b/indra/cmake/LLAudio.cmake
index 89b790c6b0..7c248dfc72 100644
--- a/indra/cmake/LLAudio.cmake
+++ b/indra/cmake/LLAudio.cmake
@@ -6,4 +6,5 @@ set(LLAUDIO_INCLUDE_DIRS
${LIBS_OPEN_DIR}/llaudio
)
-set(LLAUDIO_LIBRARIES llaudio ${OPENAL_LIBRARIES})
+# be exhaustive here
+set(LLAUDIO_LIBRARIES llaudio ${VORBISFILE_LIBRARIES} ${VORBIS_LIBRARIES} ${VORBISENC_LIBRARIES} ${OGG_LIBRARIES} ${OPENAL_LIBRARIES})
diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake
index d4f9ed79de..db0b44eb8f 100644
--- a/indra/cmake/Variables.cmake
+++ b/indra/cmake/Variables.cmake
@@ -116,4 +116,7 @@ For more information, please see JIRA DEV-14943 - Cmake Linux cannot build both
")
endif (LINUX AND SERVER AND VIEWER)
+
+set(USE_PRECOMPILED_HEADERS ON CACHE BOOL "Enable use of precompiled header directives where supported.")
+
source_group("CMake Rules" FILES CMakeLists.txt)
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index eb0d180a4b..ac7cc2cdac 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -167,6 +167,7 @@ set(llcommon_HEADER_FILES
llinstancetracker.h
llkeythrottle.h
lllazy.h
+ lllistenerwrapper.h
lllinkedqueue.h
llliveappconfig.h
lllivefile.h
@@ -224,6 +225,7 @@ set(llcommon_HEADER_FILES
llversionserver.h
llversionviewer.h
llworkerthread.h
+ ll_template_cast.h
metaclass.h
metaclasst.h
metaproperty.h
diff --git a/indra/llcommon/ll_template_cast.h b/indra/llcommon/ll_template_cast.h
new file mode 100644
index 0000000000..cff58ce00d
--- /dev/null
+++ b/indra/llcommon/ll_template_cast.h
@@ -0,0 +1,160 @@
+/**
+ * @file ll_template_cast.h
+ * @author Nat Goodspeed
+ * @date 2009-11-21
+ * @brief Define ll_template_cast function
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#if ! defined(LL_LL_TEMPLATE_CAST_H)
+#define LL_LL_TEMPLATE_CAST_H
+
+/**
+ * Implementation for ll_template_cast() (q.v.).
+ *
+ * Default implementation: trying to cast two completely unrelated types
+ * returns 0. Typically you'd specify T and U as pointer types, but in fact T
+ * can be any type that can be initialized with 0.
+ */
+template <typename T, typename U>
+struct ll_template_cast_impl
+{
+ T operator()(U)
+ {
+ return 0;
+ }
+};
+
+/**
+ * ll_template_cast<T>(some_value) is for use in a template function when
+ * some_value might be of arbitrary type, but you want to recognize type T
+ * specially.
+ *
+ * It's designed for use with pointer types. Example:
+ * @code
+ * struct SpecialClass
+ * {
+ * void someMethod(const std::string&) const;
+ * };
+ *
+ * template <class REALCLASS>
+ * void somefunc(const REALCLASS& instance)
+ * {
+ * const SpecialClass* ptr = ll_template_cast<const SpecialClass*>(&instance);
+ * if (ptr)
+ * {
+ * ptr->someMethod("Call method only available on SpecialClass");
+ * }
+ * }
+ * @endcode
+ *
+ * Why is this better than dynamic_cast<>? Because unless OtherClass is
+ * polymorphic, the following won't even compile (gcc 4.0.1):
+ * @code
+ * OtherClass other;
+ * SpecialClass* ptr = dynamic_cast<SpecialClass*>(&other);
+ * @endcode
+ * to say nothing of this:
+ * @code
+ * void function(int);
+ * SpecialClass* ptr = dynamic_cast<SpecialClass*>(&function);
+ * @endcode
+ * ll_template_cast handles these kinds of cases by returning 0.
+ */
+template <typename T, typename U>
+T ll_template_cast(U value)
+{
+ return ll_template_cast_impl<T, U>()(value);
+}
+
+/**
+ * Implementation for ll_template_cast() (q.v.).
+ *
+ * Implementation for identical types: return same value.
+ */
+template <typename T>
+struct ll_template_cast_impl<T, T>
+{
+ T operator()(T value)
+ {
+ return value;
+ }
+};
+
+/**
+ * LL_TEMPLATE_CONVERTIBLE(dest, source) asserts that, for a value @c s of
+ * type @c source, <tt>ll_template_cast<dest>(s)</tt> will return @c s --
+ * presuming that @c source can be converted to @c dest by the normal rules of
+ * C++.
+ *
+ * By default, <tt>ll_template_cast<dest>(s)</tt> will return 0 unless @c s's
+ * type is literally identical to @c dest. (This is because of the
+ * straightforward application of template specialization rules.) That can
+ * lead to surprising results, e.g.:
+ *
+ * @code
+ * Foo myFoo;
+ * const Foo* fooptr = ll_template_cast<const Foo*>(&myFoo);
+ * @endcode
+ *
+ * Here @c fooptr will be 0 because <tt>&myFoo</tt> is of type <tt>Foo*</tt>
+ * -- @em not <tt>const Foo*</tt>. (Declaring <tt>const Foo myFoo;</tt> would
+ * force the compiler to do the right thing.)
+ *
+ * More disappointingly:
+ * @code
+ * struct Base {};
+ * struct Subclass: public Base {};
+ * Subclass object;
+ * Base* ptr = ll_template_cast<Base*>(&object);
+ * @endcode
+ *
+ * Here @c ptr will be 0 because <tt>&object</tt> is of type
+ * <tt>Subclass*</tt> rather than <tt>Base*</tt>. We @em want this cast to
+ * succeed, but without our help ll_template_cast can't recognize it.
+ *
+ * The following would suffice:
+ * @code
+ * LL_TEMPLATE_CONVERTIBLE(Base*, Subclass*);
+ * ...
+ * Base* ptr = ll_template_cast<Base*>(&object);
+ * @endcode
+ *
+ * However, as noted earlier, this is easily fooled:
+ * @code
+ * const Base* ptr = ll_template_cast<const Base*>(&object);
+ * @endcode
+ * would still produce 0 because we haven't yet seen:
+ * @code
+ * LL_TEMPLATE_CONVERTIBLE(const Base*, Subclass*);
+ * @endcode
+ *
+ * @TODO
+ * This macro should use Boost type_traits facilities for stripping and
+ * re-adding @c const and @c volatile qualifiers so that invoking
+ * LL_TEMPLATE_CONVERTIBLE(dest, source) will automatically generate all
+ * permitted permutations. It's really not fair to the coder to require
+ * separate:
+ * @code
+ * LL_TEMPLATE_CONVERTIBLE(Base*, Subclass*);
+ * LL_TEMPLATE_CONVERTIBLE(const Base*, Subclass*);
+ * LL_TEMPLATE_CONVERTIBLE(const Base*, const Subclass*);
+ * @endcode
+ *
+ * (Naturally we omit <tt>LL_TEMPLATE_CONVERTIBLE(Base*, const Subclass*)</tt>
+ * because that's not permitted by normal C++ assignment anyway.)
+ */
+#define LL_TEMPLATE_CONVERTIBLE(DEST, SOURCE) \
+template <> \
+struct ll_template_cast_impl<DEST, SOURCE> \
+{ \
+ DEST operator()(SOURCE wrapper) \
+ { \
+ return wrapper; \
+ } \
+}
+
+#endif /* ! defined(LL_LL_TEMPLATE_CAST_H) */
diff --git a/indra/llcommon/llevents.cpp b/indra/llcommon/llevents.cpp
index 4bdfe5a867..31fdd9e60a 100644
--- a/indra/llcommon/llevents.cpp
+++ b/indra/llcommon/llevents.cpp
@@ -459,11 +459,25 @@ void LLEventPump::stopListening(const std::string& name)
bool LLEventStream::post(const LLSD& event)
{
if (! mEnabled)
+ {
return false;
+ }
+ // NOTE NOTE NOTE: Any new access to member data beyond this point should
+ // cause us to move our LLStandardSignal object to a pimpl class along
+ // with said member data. Then the local shared_ptr will preserve both.
+
+ // DEV-43463: capture a local copy of mSignal. We've turned up a
+ // cross-coroutine scenario (described in the Jira) in which this post()
+ // call could end up destroying 'this', the LLEventPump subclass instance
+ // containing mSignal, during the call through *mSignal. So -- capture a
+ // *stack* instance of the shared_ptr, ensuring that our heap
+ // LLStandardSignal object will live at least until post() returns, even
+ // if 'this' gets destroyed during the call.
+ boost::shared_ptr<LLStandardSignal> signal(mSignal);
// Let caller know if any one listener handled the event. This is mostly
// useful when using LLEventStream as a listener for an upstream
// LLEventPump.
- return (*mSignal)(event);
+ return (*signal)(event);
}
/*****************************************************************************
@@ -492,9 +506,16 @@ void LLEventQueue::flush()
// be processed in the *next* flush() call.
EventQueue queue(mEventQueue);
mEventQueue.clear();
+ // NOTE NOTE NOTE: Any new access to member data beyond this point should
+ // cause us to move our LLStandardSignal object to a pimpl class along
+ // with said member data. Then the local shared_ptr will preserve both.
+
+ // DEV-43463: capture a local copy of mSignal. See LLEventStream::post()
+ // for detailed comments.
+ boost::shared_ptr<LLStandardSignal> signal(mSignal);
for ( ; ! queue.empty(); queue.pop_front())
{
- (*mSignal)(queue.front());
+ (*signal)(queue.front());
}
}
diff --git a/indra/llcommon/llevents.h b/indra/llcommon/llevents.h
index f52cf33fd8..a73ada2931 100644
--- a/indra/llcommon/llevents.h
+++ b/indra/llcommon/llevents.h
@@ -44,6 +44,7 @@
#include "llsd.h"
#include "llsingleton.h"
#include "lldependencies.h"
+#include "ll_template_cast.h"
/*==========================================================================*|
// override this to allow binding free functions with more parameters
@@ -256,6 +257,11 @@ namespace LLEventDetail
/// signature.
typedef boost::function<LLBoundListener(const LLEventListener&)> ConnectFunc;
+ /// overload of visit_and_connect() when we have a string identifier available
+ template <typename LISTENER>
+ LLBoundListener visit_and_connect(const std::string& name,
+ const LISTENER& listener,
+ const ConnectFunc& connect_func);
/**
* Utility template function to use Visitor appropriately
*
@@ -266,7 +272,10 @@ namespace LLEventDetail
*/
template <typename LISTENER>
LLBoundListener visit_and_connect(const LISTENER& listener,
- const ConnectFunc& connect_func);
+ const ConnectFunc& connect_func)
+ {
+ return visit_and_connect("", listener, connect_func);
+ }
} // namespace LLEventDetail
/*****************************************************************************
@@ -468,7 +477,8 @@ public:
// This is why listen() is a template. Conversion from boost::bind()
// to LLEventListener performs type erasure, so it's important to look
// at the boost::bind object itself before that happens.
- return LLEventDetail::visit_and_connect(listener,
+ return LLEventDetail::visit_and_connect(name,
+ listener,
boost::bind(&LLEventPump::listen_impl,
this,
name,
@@ -522,7 +532,7 @@ private:
protected:
/// implement the dispatching
- boost::scoped_ptr<LLStandardSignal> mSignal;
+ boost::shared_ptr<LLStandardSignal> mSignal;
/// valve open?
bool mEnabled;
@@ -664,6 +674,62 @@ private:
LLSD mReqid;
};
+/**
+ * Base class for LLListenerWrapper. See visit_and_connect() and llwrap(). We
+ * provide virtual @c accept_xxx() methods, customization points allowing a
+ * subclass access to certain data visible at LLEventPump::listen() time.
+ * Example subclass usage:
+ *
+ * @code
+ * myEventPump.listen("somename",
+ * llwrap<MyListenerWrapper>(boost::bind(&MyClass::method, instance, _1)));
+ * @endcode
+ *
+ * Because of the anticipated usage (note the anonymous temporary
+ * MyListenerWrapper instance in the example above), the @c accept_xxx()
+ * methods must be @c const.
+ */
+class LL_COMMON_API LLListenerWrapperBase
+{
+public:
+ /// New instance. The accept_xxx() machinery makes it important to use
+ /// shared_ptrs for our data. Many copies of this object are made before
+ /// the instance that actually ends up in the signal, yet accept_xxx()
+ /// will later be called on the @em original instance. All copies of the
+ /// same original instance must share the same data.
+ LLListenerWrapperBase():
+ mName(new std::string),
+ mConnection(new LLBoundListener)
+ {
+ }
+
+ /// Copy constructor. Copy shared_ptrs to original instance data.
+ LLListenerWrapperBase(const LLListenerWrapperBase& that):
+ mName(that.mName),
+ mConnection(that.mConnection)
+ {
+ }
+ virtual ~LLListenerWrapperBase() {}
+
+ /// Ask LLEventPump::listen() for the listener name
+ virtual void accept_name(const std::string& name) const
+ {
+ *mName = name;
+ }
+
+ /// Ask LLEventPump::listen() for the new connection
+ virtual void accept_connection(const LLBoundListener& connection) const
+ {
+ *mConnection = connection;
+ }
+
+protected:
+ /// Listener name.
+ boost::shared_ptr<std::string> mName;
+ /// Connection.
+ boost::shared_ptr<LLBoundListener> mConnection;
+};
+
/*****************************************************************************
* Underpinnings
*****************************************************************************/
@@ -898,7 +964,8 @@ namespace LLEventDetail
* LLStandardSignal, returning LLBoundListener.
*/
template <typename LISTENER>
- LLBoundListener visit_and_connect(const LISTENER& raw_listener,
+ LLBoundListener visit_and_connect(const std::string& name,
+ const LISTENER& raw_listener,
const ConnectFunc& connect_func)
{
// Capture the listener
@@ -913,14 +980,20 @@ namespace LLEventDetail
// which type details have been erased. unwrap() comes from
// Boost.Signals, in case we were passed a boost::ref().
visit_each(visitor, LLEventDetail::unwrap(raw_listener));
- // Make the connection using passed function. At present, wrapping
- // this functionality into this function is a bit silly: we don't
- // really need a visit_and_connect() function any more, just a visit()
- // function. The definition of this function dates from when, after
- // visit_each(), after establishing the connection, we had to
- // postprocess the new connection with the visitor object. That's no
- // longer necessary.
- return connect_func(listener);
+ // Make the connection using passed function.
+ LLBoundListener connection(connect_func(listener));
+ // If the LISTENER is an LLListenerWrapperBase subclass, pass it the
+ // desired information. It's important that we pass the raw_listener
+ // so the compiler can make decisions based on its original type.
+ const LLListenerWrapperBase* lwb =
+ ll_template_cast<const LLListenerWrapperBase*>(&raw_listener);
+ if (lwb)
+ {
+ lwb->accept_name(name);
+ lwb->accept_connection(connection);
+ }
+ // In any case, show new connection to caller.
+ return connection;
}
} // namespace LLEventDetail
diff --git a/indra/llcommon/lllistenerwrapper.h b/indra/llcommon/lllistenerwrapper.h
new file mode 100644
index 0000000000..2f747fb182
--- /dev/null
+++ b/indra/llcommon/lllistenerwrapper.h
@@ -0,0 +1,181 @@
+/**
+ * @file lllistenerwrapper.h
+ * @author Nat Goodspeed
+ * @date 2009-11-30
+ * @brief Introduce LLListenerWrapper template
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ * Copyright (c) 2009, Linden Research, Inc.
+ * $/LicenseInfo$
+ */
+
+#if ! defined(LL_LLLISTENERWRAPPER_H)
+#define LL_LLLISTENERWRAPPER_H
+
+#include "llevents.h" // LLListenerWrapperBase
+#include <boost/visit_each.hpp>
+
+/**
+ * Template base class for coding wrappers for LLEventPump listeners.
+ *
+ * Derive your listener wrapper from LLListenerWrapper. You must use
+ * LLLISTENER_WRAPPER_SUBCLASS() so your subclass will play nicely with
+ * boost::visit_each (q.v.). That way boost::signals2 can still detect
+ * derivation from LLEventTrackable, and so forth.
+ */
+template <typename LISTENER>
+class LLListenerWrapper: public LLListenerWrapperBase
+{
+public:
+ /// Wrap an arbitrary listener object
+ LLListenerWrapper(const LISTENER& listener):
+ mListener(listener)
+ {}
+
+ /// call
+ virtual bool operator()(const LLSD& event)
+ {
+ return mListener(event);
+ }
+
+ /// Allow boost::visit_each() to peek at our mListener.
+ template <class V>
+ void accept_visitor(V& visitor) const
+ {
+ using boost::visit_each;
+ visit_each(visitor, mListener, 0);
+ }
+
+private:
+ LISTENER mListener;
+};
+
+/**
+ * Specialize boost::visit_each() (leveraging ADL) to peek inside an
+ * LLListenerWrapper<T> to traverse its LISTENER. We borrow the
+ * accept_visitor() pattern from boost::bind(), avoiding the need to make
+ * mListener public.
+ */
+template <class V, typename T>
+void visit_each(V& visitor, const LLListenerWrapper<T>& wrapper, int)
+{
+ wrapper.accept_visitor(visitor);
+}
+
+/// use this (sigh!) for each subclass of LLListenerWrapper<T> you write
+#define LLLISTENER_WRAPPER_SUBCLASS(CLASS) \
+template <class V, typename T> \
+void visit_each(V& visitor, const CLASS<T>& wrapper, int) \
+{ \
+ visit_each(visitor, static_cast<const LLListenerWrapper<T>&>(wrapper), 0); \
+} \
+ \
+/* Have to state this explicitly, rather than using LL_TEMPLATE_CONVERTIBLE, */ \
+/* because the source type is itself a template. */ \
+template <typename T> \
+struct ll_template_cast_impl<const LLListenerWrapperBase*, const CLASS<T>*> \
+{ \
+ const LLListenerWrapperBase* operator()(const CLASS<T>* wrapper) \
+ { \
+ return wrapper; \
+ } \
+}
+
+/**
+ * Make an instance of a listener wrapper. Every wrapper class must be a
+ * template accepting a listener object of arbitrary type. In particular, the
+ * type of a boost::bind() expression is deliberately undocumented. So we
+ * can't just write Wrapper<CorrectType>(boost::bind(...)). Instead we must
+ * write llwrap<Wrapper>(boost::bind(...)).
+ */
+template <template<typename> class WRAPPER, typename T>
+WRAPPER<T> llwrap(const T& listener)
+{
+ return WRAPPER<T>(listener);
+}
+
+/**
+ * This LLListenerWrapper template subclass is used to report entry/exit to an
+ * event listener, by changing this:
+ * @code
+ * someEventPump.listen("MyClass",
+ * boost::bind(&MyClass::method, ptr, _1));
+ * @endcode
+ * to this:
+ * @code
+ * someEventPump.listen("MyClass",
+ * llwrap<LLCoutListener>(
+ * boost::bind(&MyClass::method, ptr, _1)));
+ * @endcode
+ */
+template <class LISTENER>
+class LLCoutListener: public LLListenerWrapper<LISTENER>
+{
+ typedef LLListenerWrapper<LISTENER> super;
+
+public:
+ /// Wrap an arbitrary listener object
+ LLCoutListener(const LISTENER& listener):
+ super(listener)
+ {}
+
+ /// call
+ virtual bool operator()(const LLSD& event)
+ {
+ std::cout << "Entering listener " << *super::mName << " with " << event << std::endl;
+ bool handled = super::operator()(event);
+ std::cout << "Leaving listener " << *super::mName;
+ if (handled)
+ {
+ std::cout << " (handled)";
+ }
+ std::cout << std::endl;
+ return handled;
+ }
+};
+
+LLLISTENER_WRAPPER_SUBCLASS(LLCoutListener);
+
+/**
+ * This LLListenerWrapper template subclass is used to log entry/exit to an
+ * event listener, by changing this:
+ * @code
+ * someEventPump.listen("MyClass",
+ * boost::bind(&MyClass::method, ptr, _1));
+ * @endcode
+ * to this:
+ * @code
+ * someEventPump.listen("MyClass",
+ * llwrap<LLLogListener>(
+ * boost::bind(&MyClass::method, ptr, _1)));
+ * @endcode
+ */
+template <class LISTENER>
+class LLLogListener: public LLListenerWrapper<LISTENER>
+{
+ typedef LLListenerWrapper<LISTENER> super;
+
+public:
+ /// Wrap an arbitrary listener object
+ LLLogListener(const LISTENER& listener):
+ super(listener)
+ {}
+
+ /// call
+ virtual bool operator()(const LLSD& event)
+ {
+ LL_DEBUGS("LLLogListener") << "Entering listener " << *super::mName << " with " << event << LL_ENDL;
+ bool handled = super::operator()(event);
+ LL_DEBUGS("LLLogListener") << "Leaving listener " << *super::mName;
+ if (handled)
+ {
+ LL_CONT << " (handled)";
+ }
+ LL_CONT << LL_ENDL;
+ return handled;
+ }
+};
+
+LLLISTENER_WRAPPER_SUBCLASS(LLLogListener);
+
+#endif /* ! defined(LL_LLLISTENERWRAPPER_H) */
diff --git a/indra/llcommon/tests/llerror_test.cpp b/indra/llcommon/tests/llerror_test.cpp
index 1558df231a..6785d0cf17 100644
--- a/indra/llcommon/tests/llerror_test.cpp
+++ b/indra/llcommon/tests/llerror_test.cpp
@@ -545,6 +545,15 @@ namespace tut
// output order
void ErrorTestObject::test<10>()
{
+#if LL_LINUX
+ skip("Fails on Linux, see comments");
+// on Linux:
+// [error, 10] fail: 'order is time type location function message: expected
+// '1947-07-08T03:04:05Z INFO: llcommon/tests/llerror_test.cpp(268) :
+// writeReturningLocationAndFunction: apple' actual
+// '1947-07-08T03:04:05Z INFO: llcommon/tests/llerror_test.cpp(268) :
+// LLError::NoClassInfo::writeReturningLocationAndFunction: apple''
+#endif
LLError::setPrintLocation(true);
LLError::setTimeFunction(roswell);
mRecorder.setWantsTime(true);
diff --git a/indra/llmessage/tests/llsdmessage_test.cpp b/indra/llmessage/tests/llsdmessage_test.cpp
index 9b018d685b..de2c7e00c8 100644
--- a/indra/llmessage/tests/llsdmessage_test.cpp
+++ b/indra/llmessage/tests/llsdmessage_test.cpp
@@ -21,6 +21,7 @@
#include <iostream>
// std headers
#include <stdexcept>
+#include <typeinfo>
// external library headers
// other Linden headers
#include "../test/lltut.h"
@@ -63,6 +64,32 @@ namespace tut
{
threw = true;
}
+ catch (const std::runtime_error& ex)
+ {
+ // This clause is because on Linux, on the viewer side, for this
+ // one test program (though not others!), the
+ // LLEventPump::DupPumpName exception isn't caught by the clause
+ // above. Warn the user...
+ std::cerr << "Failed to catch " << typeid(ex).name() << std::endl;
+ // But if the expected exception was thrown, allow the test to
+ // succeed anyway. Not sure how else to handle this odd case.
+ if (std::string(typeid(ex).name()) == typeid(LLEventPump::DupPumpName).name())
+ {
+ threw = true;
+ }
+ else
+ {
+ // We don't even recognize this exception. Let it propagate
+ // out to TUT to fail the test.
+ throw;
+ }
+ }
+ catch (...)
+ {
+ std::cerr << "Utterly failed to catch expected exception!" << std::endl;
+ // This case is full of fail. We HAVE to address it.
+ throw;
+ }
ensure("second LLSDMessage should throw", threw);
}
diff --git a/indra/llplugin/llplugininstance.cpp b/indra/llplugin/llplugininstance.cpp
index 16ba492669..44e3b4950f 100644
--- a/indra/llplugin/llplugininstance.cpp
+++ b/indra/llplugin/llplugininstance.cpp
@@ -37,13 +37,21 @@
#include "llapr.h"
-//virtual
+/** Virtual destructor. */
LLPluginInstanceMessageListener::~LLPluginInstanceMessageListener()
{
}
+/**
+ * TODO:DOC describe how it's used
+ */
const char *LLPluginInstance::PLUGIN_INIT_FUNCTION_NAME = "LLPluginInitEntryPoint";
+/**
+ * Constructor.
+ *
+ * @param[in] owner Plugin instance. TODO:DOC is this a good description of what "owner" is?
+ */
LLPluginInstance::LLPluginInstance(LLPluginInstanceMessageListener *owner) :
mDSOHandle(NULL),
mPluginUserData(NULL),
@@ -52,6 +60,9 @@ LLPluginInstance::LLPluginInstance(LLPluginInstanceMessageListener *owner) :
mOwner = owner;
}
+/**
+ * Destructor.
+ */
LLPluginInstance::~LLPluginInstance()
{
if(mDSOHandle != NULL)
@@ -61,6 +72,12 @@ LLPluginInstance::~LLPluginInstance()
}
}
+/**
+ * Dynamically loads the plugin and runs the plugin's init function.
+ *
+ * @param[in] plugin_file Name of plugin dll/dylib/so. TODO:DOC is this correct? see .h
+ * @return 0 if successful, APR error code or error code from the plugin's init function on failure.
+ */
int LLPluginInstance::load(std::string &plugin_file)
{
pluginInitFunction init_function = NULL;
@@ -102,6 +119,11 @@ int LLPluginInstance::load(std::string &plugin_file)
return (int)result;
}
+/**
+ * Sends a message to the plugin.
+ *
+ * @param[in] message Message
+ */
void LLPluginInstance::sendMessage(const std::string &message)
{
if(mPluginSendMessageFunction)
@@ -115,6 +137,10 @@ void LLPluginInstance::sendMessage(const std::string &message)
}
}
+/**
+ * Idle. TODO:DOC what's the purpose of this?
+ *
+ */
void LLPluginInstance::idle(void)
{
}
@@ -128,6 +154,11 @@ void LLPluginInstance::staticReceiveMessage(const char *message_string, void **u
self->receiveMessage(message_string);
}
+/**
+ * Plugin receives message from plugin loader shell.
+ *
+ * @param[in] message_string Message
+ */
void LLPluginInstance::receiveMessage(const char *message_string)
{
if(mOwner)
diff --git a/indra/llplugin/llplugininstance.h b/indra/llplugin/llplugininstance.h
index 02936f65fb..c11d5ab5d4 100644
--- a/indra/llplugin/llplugininstance.h
+++ b/indra/llplugin/llplugininstance.h
@@ -1,6 +1,5 @@
/**
* @file llplugininstance.h
- * @brief LLPluginInstance handles loading the dynamic library of a plugin and setting up its entry points for message passing.
*
* @cond
* $LicenseInfo:firstyear=2008&license=viewergpl$
@@ -39,13 +38,20 @@
#include "apr_dso.h"
+/**
+ * @brief LLPluginInstanceMessageListener receives messages sent from the plugin loader shell to the plugin.
+ */
class LLPluginInstanceMessageListener
{
public:
virtual ~LLPluginInstanceMessageListener();
+ /** Plugin receives message from plugin loader shell. */
virtual void receivePluginMessage(const std::string &message) = 0;
};
+/**
+ * @brief LLPluginInstance handles loading the dynamic library of a plugin and setting up its entry points for message passing.
+ */
class LLPluginInstance
{
LOG_CLASS(LLPluginInstance);
@@ -60,19 +66,27 @@ public:
// Sends a message to the plugin.
void sendMessage(const std::string &message);
+ // TODO:DOC is this comment obsolete? can't find "send_count" anywhere in indra tree.
// send_count is the maximum number of message to process from the send queue. If negative, it will drain the queue completely.
// The receive queue is always drained completely.
// Returns the total number of messages processed from both queues.
void idle(void);
- // this is the signature of the "send a message" function.
- // message_string is a null-terminated C string
- // user_data is the opaque reference that the callee supplied during setup.
+ /** The signature of the function for sending a message from plugin to plugin loader shell.
+ *
+ * @param[in] message_string Null-terminated C string
+ * @param[in] user_data The opaque reference that the callee supplied during setup.
+ */
typedef void (*sendMessageFunction) (const char *message_string, void **user_data);
- // signature of the plugin init function
+ /** The signature of the plugin init function. TODO:DOC check direction (pluging loader shell to plugin?)
+ *
+ * @param[in] host_user_data Data from plugin loader shell.
+ * @param[in] plugin_send_function Function for sending from the plugin loader shell to plugin.
+ */
typedef int (*pluginInitFunction) (sendMessageFunction host_send_func, void *host_user_data, sendMessageFunction *plugin_send_func, void **plugin_user_data);
+ /** Name of plugin init function */
static const char *PLUGIN_INIT_FUNCTION_NAME;
private:
diff --git a/indra/llplugin/llpluginmessage.cpp b/indra/llplugin/llpluginmessage.cpp
index 34e02c356e..f76d848a70 100644
--- a/indra/llplugin/llpluginmessage.cpp
+++ b/indra/llplugin/llpluginmessage.cpp
@@ -37,31 +37,57 @@
#include "llsdserialize.h"
#include "u64.h"
+/**
+ * Constructor.
+ */
LLPluginMessage::LLPluginMessage()
{
}
+/**
+ * Constructor.
+ *
+ * @param[in] p Existing message
+ */
LLPluginMessage::LLPluginMessage(const LLPluginMessage &p)
{
mMessage = p.mMessage;
}
+/**
+ * Constructor.
+ *
+ * @param[in] message_class Message class
+ * @param[in] message_name Message name
+ */
LLPluginMessage::LLPluginMessage(const std::string &message_class, const std::string &message_name)
{
setMessage(message_class, message_name);
}
+/**
+ * Destructor.
+ */
LLPluginMessage::~LLPluginMessage()
{
}
+/**
+ * Reset all internal state.
+ */
void LLPluginMessage::clear()
{
mMessage = LLSD::emptyMap();
mMessage["params"] = LLSD::emptyMap();
}
+/**
+ * Sets the message class and name. Also has the side-effect of clearing any key-value pairs in the message.
+ *
+ * @param[in] message_class Message class
+ * @param[in] message_name Message name
+ */
void LLPluginMessage::setMessage(const std::string &message_class, const std::string &message_name)
{
clear();
@@ -69,21 +95,45 @@ void LLPluginMessage::setMessage(const std::string &message_class, const std::st
mMessage["name"] = message_name;
}
+/**
+ * Sets a key/value pair in the message, where the value is a string.
+ *
+ * @param[in] key Key
+ * @param[in] value String value
+ */
void LLPluginMessage::setValue(const std::string &key, const std::string &value)
{
mMessage["params"][key] = value;
}
+/**
+ * Sets a key/value pair in the message, where the value is LLSD.
+ *
+ * @param[in] key Key
+ * @param[in] value LLSD value
+ */
void LLPluginMessage::setValueLLSD(const std::string &key, const LLSD &value)
{
mMessage["params"][key] = value;
}
+/**
+ * Sets a key/value pair in the message, where the value is signed 32-bit.
+ *
+ * @param[in] key Key
+ * @param[in] value 32-bit signed value
+ */
void LLPluginMessage::setValueS32(const std::string &key, S32 value)
{
mMessage["params"][key] = value;
}
+/**
+ * Sets a key/value pair in the message, where the value is unsigned 32-bit. The value is stored as a string beginning with "0x".
+ *
+ * @param[in] key Key
+ * @param[in] value 32-bit unsigned value
+ */
void LLPluginMessage::setValueU32(const std::string &key, U32 value)
{
std::stringstream temp;
@@ -91,16 +141,34 @@ void LLPluginMessage::setValueU32(const std::string &key, U32 value)
setValue(key, temp.str());
}
+/**
+ * Sets a key/value pair in the message, where the value is a bool.
+ *
+ * @param[in] key Key
+ * @param[in] value Boolean value
+ */
void LLPluginMessage::setValueBoolean(const std::string &key, bool value)
{
mMessage["params"][key] = value;
}
+/**
+ * Sets a key/value pair in the message, where the value is a double.
+ *
+ * @param[in] key Key
+ * @param[in] value Boolean value
+ */
void LLPluginMessage::setValueReal(const std::string &key, F64 value)
{
mMessage["params"][key] = value;
}
+/**
+ * Sets a key/value pair in the message, where the value is a pointer. The pointer is stored as a string.
+ *
+ * @param[in] key Key
+ * @param[in] value Pointer value
+ */
void LLPluginMessage::setValuePointer(const std::string &key, void* value)
{
std::stringstream temp;
@@ -109,16 +177,33 @@ void LLPluginMessage::setValuePointer(const std::string &key, void* value)
setValue(key, temp.str());
}
+/**
+ * Gets the message class.
+ *
+ * @return Message class
+ */
std::string LLPluginMessage::getClass(void) const
{
return mMessage["class"];
}
+/**
+ * Gets the message name.
+ *
+ * @return Message name
+ */
std::string LLPluginMessage::getName(void) const
{
return mMessage["name"];
}
+/**
+ * Returns true if the specified key exists in this message (useful for optional parameters).
+ *
+ * @param[in] key Key
+ *
+ * @return True if key exists, false otherwise.
+ */
bool LLPluginMessage::hasValue(const std::string &key) const
{
bool result = false;
@@ -131,6 +216,13 @@ bool LLPluginMessage::hasValue(const std::string &key) const
return result;
}
+/**
+ * Gets the value of a key as a string. If the key does not exist, an empty string will be returned.
+ *
+ * @param[in] key Key
+ *
+ * @return String value of key if key exists, empty string if key does not exist.
+ */
std::string LLPluginMessage::getValue(const std::string &key) const
{
std::string result;
@@ -143,6 +235,13 @@ std::string LLPluginMessage::getValue(const std::string &key) const
return result;
}
+/**
+ * Gets the value of a key as LLSD. If the key does not exist, a null LLSD will be returned.
+ *
+ * @param[in] key Key
+ *
+ * @return LLSD value of key if key exists, null LLSD if key does not exist.
+ */
LLSD LLPluginMessage::getValueLLSD(const std::string &key) const
{
LLSD result;
@@ -155,6 +254,13 @@ LLSD LLPluginMessage::getValueLLSD(const std::string &key) const
return result;
}
+/**
+ * Gets the value of a key as signed 32-bit int. If the key does not exist, 0 will be returned.
+ *
+ * @param[in] key Key
+ *
+ * @return Signed 32-bit int value of key if key exists, 0 if key does not exist.
+ */
S32 LLPluginMessage::getValueS32(const std::string &key) const
{
S32 result = 0;
@@ -167,6 +273,13 @@ S32 LLPluginMessage::getValueS32(const std::string &key) const
return result;
}
+/**
+ * Gets the value of a key as unsigned 32-bit int. If the key does not exist, 0 will be returned.
+ *
+ * @param[in] key Key
+ *
+ * @return Unsigned 32-bit int value of key if key exists, 0 if key does not exist.
+ */
U32 LLPluginMessage::getValueU32(const std::string &key) const
{
U32 result = 0;
@@ -181,6 +294,13 @@ U32 LLPluginMessage::getValueU32(const std::string &key) const
return result;
}
+/**
+ * Gets the value of a key as a bool. If the key does not exist, false will be returned.
+ *
+ * @param[in] key Key
+ *
+ * @return Boolean value of key if it exists, false otherwise.
+ */
bool LLPluginMessage::getValueBoolean(const std::string &key) const
{
bool result = false;
@@ -193,6 +313,13 @@ bool LLPluginMessage::getValueBoolean(const std::string &key) const
return result;
}
+/**
+ * Gets the value of a key as a double. If the key does not exist, 0 will be returned.
+ *
+ * @param[in] key Key
+ *
+ * @return Value as a double if key exists, 0 otherwise.
+ */
F64 LLPluginMessage::getValueReal(const std::string &key) const
{
F64 result = 0.0f;
@@ -205,6 +332,13 @@ F64 LLPluginMessage::getValueReal(const std::string &key) const
return result;
}
+/**
+ * Gets the value of a key as a pointer. If the key does not exist, NULL will be returned.
+ *
+ * @param[in] key Key
+ *
+ * @return Pointer value if key exists, NULL otherwise.
+ */
void* LLPluginMessage::getValuePointer(const std::string &key) const
{
void* result = NULL;
@@ -219,6 +353,11 @@ void* LLPluginMessage::getValuePointer(const std::string &key) const
return result;
}
+/**
+ * Flatten the message into a string.
+ *
+ * @return Message as a string.
+ */
std::string LLPluginMessage::generate(void) const
{
std::ostringstream result;
@@ -230,7 +369,11 @@ std::string LLPluginMessage::generate(void) const
return result.str();
}
-
+/**
+ * Parse an incoming message into component parts. Clears all existing state before starting the parse.
+ *
+ * @return Returns -1 on failure, otherwise returns the number of key/value pairs in the incoming message.
+ */
int LLPluginMessage::parse(const std::string &message)
{
// clear any previous state
@@ -244,27 +387,48 @@ int LLPluginMessage::parse(const std::string &message)
}
+/**
+ * Destructor
+ */
LLPluginMessageListener::~LLPluginMessageListener()
{
// TODO: should listeners have a way to ensure they're removed from dispatcher lists when deleted?
}
+/**
+ * Destructor
+ */
LLPluginMessageDispatcher::~LLPluginMessageDispatcher()
{
}
+/**
+ * Add a message listener. TODO:DOC need more info on what uses this. when are multiple listeners needed?
+ *
+ * @param[in] listener Message listener
+ */
void LLPluginMessageDispatcher::addPluginMessageListener(LLPluginMessageListener *listener)
{
mListeners.insert(listener);
}
+/**
+ * Remove a message listener.
+ *
+ * @param[in] listener Message listener
+ */
void LLPluginMessageDispatcher::removePluginMessageListener(LLPluginMessageListener *listener)
{
mListeners.erase(listener);
}
+/**
+ * Distribute a message to all message listeners.
+ *
+ * @param[in] message Message
+ */
void LLPluginMessageDispatcher::dispatchPluginMessage(const LLPluginMessage &message)
{
for (listener_set_t::iterator it = mListeners.begin();
diff --git a/indra/llplugin/llpluginmessage.h b/indra/llplugin/llpluginmessage.h
index 99f8d1194f..cbd31e0964 100644
--- a/indra/llplugin/llpluginmessage.h
+++ b/indra/llplugin/llpluginmessage.h
@@ -1,6 +1,5 @@
/**
* @file llpluginmessage.h
- * @brief LLPluginMessage encapsulates the serialization/deserialization of messages passed to and from plugins.
*
* @cond
* $LicenseInfo:firstyear=2008&license=viewergpl$
@@ -36,7 +35,9 @@
#include "llsd.h"
-
+/**
+ * @brief LLPluginMessage encapsulates the serialization/deserialization of messages passed to and from plugins.
+ */
class LLPluginMessage
{
LOG_CLASS(LLPluginMessage);
@@ -104,14 +105,23 @@ private:
};
+/**
+ * @brief Listener for plugin messages.
+ */
class LLPluginMessageListener
{
public:
virtual ~LLPluginMessageListener();
+ /** Plugin receives message from plugin loader shell. */
virtual void receivePluginMessage(const LLPluginMessage &message) = 0;
};
+/**
+ * @brief Dispatcher for plugin messages.
+ *
+ * Manages the set of plugin message listeners and distributes messages to plugin message listeners.
+ */
class LLPluginMessageDispatcher
{
public:
@@ -122,7 +132,9 @@ public:
protected:
void dispatchPluginMessage(const LLPluginMessage &message);
+ /** A set of message listeners. */
typedef std::set<LLPluginMessageListener*> listener_set_t;
+ /** The set of message listeners. */
listener_set_t mListeners;
};
diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp
index 9ba0cfc6b8..a28ffbfdc0 100644
--- a/indra/llrender/llfontgl.cpp
+++ b/indra/llrender/llfontgl.cpp
@@ -446,7 +446,9 @@ F32 LLFontGL::getWidthF32(const llwchar* wchars, S32 begin_offset, S32 max_chars
// for the last character we want to measure the greater of its width and xadvance values
// so keep track of the difference between these values for the each character we measure
// so we can fix things up at the end
- width_padding = llmax(0.f, (F32)fgi->mWidth - advance);
+ width_padding = llmax( 0.f, // always use positive padding amount
+ width_padding - advance, // previous padding left over after advance of current character
+ (F32)(fgi->mWidth + fgi->mXBearing) - advance); // difference between width of this character and advance to next character
cur_x += advance;
llwchar next_char = wchars[i+1];
diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp
index f4a5f1c990..831ac66d06 100644
--- a/indra/llui/llflatlistview.cpp
+++ b/indra/llui/llflatlistview.cpp
@@ -689,6 +689,17 @@ LLRect LLFlatListView::getSelectedItemsRect()
return rc;
}
+void LLFlatListView::selectFirstItem ()
+{
+ selectItemPair(mItemPairs.front(), true);
+}
+
+void LLFlatListView::selectLastItem ()
+{
+ selectItemPair(mItemPairs.back(), true);
+}
+
+
// virtual
bool LLFlatListView::selectNextItemPair(bool is_up_direction, bool reset_selection)
{
@@ -696,53 +707,53 @@ bool LLFlatListView::selectNextItemPair(bool is_up_direction, bool reset_selecti
if ( !mItemPairs.size() )
return false;
- item_pair_t* cur_sel_pair = NULL;
+
item_pair_t* to_sel_pair = NULL;
-
+ item_pair_t* cur_sel_pair = NULL;
if ( mSelectedItemPairs.size() )
{
// Take the last selected pair
cur_sel_pair = mSelectedItemPairs.back();
- }
- else
- {
- // If there weren't selected items then choose the first one bases on given direction
- cur_sel_pair = (is_up_direction) ? mItemPairs.back() : mItemPairs.front();
- // Force selection to first item
- to_sel_pair = cur_sel_pair;
- }
-
- // Bases on given direction choose next item to select
- if ( is_up_direction )
- {
- // Find current selected item position in mItemPairs list
- pairs_list_t::reverse_iterator sel_it = std::find(mItemPairs.rbegin(), mItemPairs.rend(), cur_sel_pair);
-
- for (;++sel_it != mItemPairs.rend();)
+ // Bases on given direction choose next item to select
+ if ( is_up_direction )
{
- // skip invisible items
- if ( (*sel_it)->first->getVisible() )
+ // Find current selected item position in mItemPairs list
+ pairs_list_t::reverse_iterator sel_it = std::find(mItemPairs.rbegin(), mItemPairs.rend(), cur_sel_pair);
+
+ for (;++sel_it != mItemPairs.rend();)
{
- to_sel_pair = *sel_it;
- break;
+ // skip invisible items
+ if ( (*sel_it)->first->getVisible() )
+ {
+ to_sel_pair = *sel_it;
+ break;
+ }
}
}
- }
- else
- {
- // Find current selected item position in mItemPairs list
- pairs_list_t::iterator sel_it = std::find(mItemPairs.begin(), mItemPairs.end(), cur_sel_pair);
-
- for (;++sel_it != mItemPairs.end();)
+ else
{
- // skip invisible items
- if ( (*sel_it)->first->getVisible() )
+ // Find current selected item position in mItemPairs list
+ pairs_list_t::iterator sel_it = std::find(mItemPairs.begin(), mItemPairs.end(), cur_sel_pair);
+
+ for (;++sel_it != mItemPairs.end();)
{
- to_sel_pair = *sel_it;
- break;
+ // skip invisible items
+ if ( (*sel_it)->first->getVisible() )
+ {
+ to_sel_pair = *sel_it;
+ break;
+ }
}
}
}
+ else
+ {
+ // If there weren't selected items then choose the first one bases on given direction
+ cur_sel_pair = (is_up_direction) ? mItemPairs.back() : mItemPairs.front();
+ // Force selection to first item
+ to_sel_pair = cur_sel_pair;
+ }
+
if ( to_sel_pair )
{
@@ -920,4 +931,26 @@ void LLFlatListView::onFocusLost()
mSelectedItemsBorder->setVisible(FALSE);
}
+//virtual
+S32 LLFlatListView::notify(const LLSD& info)
+{
+ if(info.has("action"))
+ {
+ std::string str_action = info["action"];
+ if(str_action == "select_first")
+ {
+ setFocus(true);
+ selectFirstItem();
+ return 1;
+ }
+ else if(str_action == "select_last")
+ {
+ setFocus(true);
+ selectLastItem();
+ return 1;
+ }
+ }
+ return 0;
+}
+
//EOF
diff --git a/indra/llui/llflatlistview.h b/indra/llui/llflatlistview.h
index 3867e910c0..ba824ff2df 100644
--- a/indra/llui/llflatlistview.h
+++ b/indra/llui/llflatlistview.h
@@ -279,6 +279,12 @@ public:
bool updateValue(const LLSD& old_value, const LLSD& new_value);
+
+ void selectFirstItem ();
+ void selectLastItem ();
+
+ virtual S32 notify(const LLSD& info) ;
+
protected:
/** Pairs LLpanel representing a single item LLPanel and LLSD associated with it */
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index a63187678e..fd7b64af02 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -74,7 +74,6 @@ std::string LLFloater::sButtonNames[BUTTON_COUNT] =
"llfloater_minimize_btn", //BUTTON_MINIMIZE
"llfloater_tear_off_btn", //BUTTON_TEAR_OFF
"llfloater_dock_btn", //BUTTON_DOCK
- "llfloater_undock_btn", //BUTTON_UNDOCK
"llfloater_help_btn" //BUTTON_HELP
};
@@ -91,7 +90,6 @@ std::string LLFloater::sButtonToolTipsIndex[BUTTON_COUNT]=
"BUTTON_MINIMIZE", //"Minimize", //BUTTON_MINIMIZE
"BUTTON_TEAR_OFF", //"Tear Off", //BUTTON_TEAR_OFF
"BUTTON_DOCK",
- "BUTTON_UNDOCK",
"BUTTON_HELP"
};
@@ -102,7 +100,6 @@ LLFloater::click_callback LLFloater::sButtonCallbacks[BUTTON_COUNT] =
LLFloater::onClickMinimize, //BUTTON_MINIMIZE
LLFloater::onClickTearOff, //BUTTON_TEAR_OFF
LLFloater::onClickDock, //BUTTON_DOCK
- LLFloater::onClickDock, //BUTTON_UNDOCK
LLFloater::onClickHelp //BUTTON_HELP
};
@@ -179,14 +176,12 @@ LLFloater::Params::Params()
minimize_image("minimize_image"),
tear_off_image("tear_off_image"),
dock_image("dock_image"),
- undock_image("undock_image"),
help_image("help_image"),
close_pressed_image("close_pressed_image"),
restore_pressed_image("restore_pressed_image"),
minimize_pressed_image("minimize_pressed_image"),
tear_off_pressed_image("tear_off_pressed_image"),
dock_pressed_image("dock_pressed_image"),
- undock_pressed_image("undock_pressed_image"),
help_pressed_image("help_pressed_image"),
open_callback("open_callback"),
close_callback("close_callback")
@@ -1395,12 +1390,10 @@ void LLFloater::setCanDock(bool b)
if(mCanDock)
{
mButtonsEnabled[BUTTON_DOCK] = !mDocked;
- mButtonsEnabled[BUTTON_UNDOCK] = mDocked;
}
else
{
mButtonsEnabled[BUTTON_DOCK] = FALSE;
- mButtonsEnabled[BUTTON_UNDOCK] = FALSE;
}
}
updateButtons();
@@ -1412,7 +1405,6 @@ void LLFloater::setDocked(bool docked, bool pop_on_undock)
{
mDocked = docked;
mButtonsEnabled[BUTTON_DOCK] = !mDocked;
- mButtonsEnabled[BUTTON_UNDOCK] = mDocked;
updateButtons();
storeDockStateControl();
@@ -1864,8 +1856,6 @@ LLUIImage* LLFloater::getButtonImage(const Params& p, EFloaterButton e)
return p.tear_off_image;
case BUTTON_DOCK:
return p.dock_image;
- case BUTTON_UNDOCK:
- return p.undock_image;
case BUTTON_HELP:
return p.help_image;
}
@@ -1887,8 +1877,6 @@ LLUIImage* LLFloater::getButtonPressedImage(const Params& p, EFloaterButton e)
return p.tear_off_pressed_image;
case BUTTON_DOCK:
return p.dock_pressed_image;
- case BUTTON_UNDOCK:
- return p.undock_pressed_image;
case BUTTON_HELP:
return p.help_pressed_image;
}
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index b5c835cb47..daf558de24 100644
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -90,7 +90,6 @@ public:
BUTTON_MINIMIZE,
BUTTON_TEAR_OFF,
BUTTON_DOCK,
- BUTTON_UNDOCK,
BUTTON_HELP,
BUTTON_COUNT
};
@@ -121,14 +120,12 @@ public:
minimize_image,
tear_off_image,
dock_image,
- undock_image,
help_image;
Optional<LLUIImage*> close_pressed_image,
restore_pressed_image,
minimize_pressed_image,
tear_off_pressed_image,
dock_pressed_image,
- undock_pressed_image,
help_pressed_image;
Optional<CommitCallbackParam> open_callback,
diff --git a/indra/llui/llnotificationsutil.cpp b/indra/llui/llnotificationsutil.cpp
index 2cd165f1b3..f343d27cb4 100644
--- a/indra/llui/llnotificationsutil.cpp
+++ b/indra/llui/llnotificationsutil.cpp
@@ -89,3 +89,8 @@ S32 LLNotificationsUtil::getSelectedOption(const LLSD& notification, const LLSD&
{
return LLNotification::getSelectedOption(notification, response);
}
+
+void LLNotificationsUtil::cancel(LLNotificationPtr pNotif)
+{
+ LLNotifications::instance().cancel(pNotif);
+}
diff --git a/indra/llui/llnotificationsutil.h b/indra/llui/llnotificationsutil.h
index a0801b338f..d552fa915b 100644
--- a/indra/llui/llnotificationsutil.h
+++ b/indra/llui/llnotificationsutil.h
@@ -63,6 +63,8 @@ namespace LLNotificationsUtil
boost::function<void (const LLSD&, const LLSD&)> functor);
S32 getSelectedOption(const LLSD& notification, const LLSD& response);
+
+ void cancel(LLNotificationPtr pNotif);
}
#endif
diff --git a/indra/llui/llscrollcontainer.cpp b/indra/llui/llscrollcontainer.cpp
index f6caed4617..a5e47e8547 100644
--- a/indra/llui/llscrollcontainer.cpp
+++ b/indra/llui/llscrollcontainer.cpp
@@ -235,18 +235,37 @@ BOOL LLScrollContainer::handleKeyHere(KEY key, MASK mask)
BOOL LLScrollContainer::handleScrollWheel( S32 x, S32 y, S32 clicks )
{
- if(LLUICtrl::handleScrollWheel(x,y,clicks))
+ // Give event to my child views - they may have scroll bars
+ // (Bad UI design, but technically possible.)
+ if (LLUICtrl::handleScrollWheel(x,y,clicks))
return TRUE;
- for( S32 i = 0; i < SCROLLBAR_COUNT; i++ )
- {
- // Note: tries vertical and then horizontal
+ // When the vertical scrollbar is visible, scroll wheel
+ // only affects vertical scrolling. It's confusing to have
+ // scroll wheel perform both vertical and horizontal in a
+ // single container.
+ LLScrollbar* vertical = mScrollbar[VERTICAL];
+ if (vertical->getVisible()
+ && vertical->getEnabled())
+ {
// Pretend the mouse is over the scrollbar
- if( mScrollbar[i]->handleScrollWheel( 0, 0, clicks ) )
+ if (vertical->handleScrollWheel( 0, 0, clicks ) )
{
updateScroll();
- return TRUE;
}
+ // Always eat the event
+ return TRUE;
+ }
+
+ LLScrollbar* horizontal = mScrollbar[HORIZONTAL];
+ // Test enablement and visibility for consistency with
+ // LLView::childrenHandleScrollWheel().
+ if (horizontal->getVisible()
+ && horizontal->getEnabled()
+ && horizontal->handleScrollWheel( 0, 0, clicks ) )
+ {
+ updateScroll();
+ return TRUE;
}
return FALSE;
}
diff --git a/indra/llui/llsearcheditor.cpp b/indra/llui/llsearcheditor.cpp
index fad2b7bc99..6fa99df82e 100644
--- a/indra/llui/llsearcheditor.cpp
+++ b/indra/llui/llsearcheditor.cpp
@@ -141,6 +141,15 @@ void LLSearchEditor::clear()
}
}
+//virtual
+void LLSearchEditor::setFocus( BOOL b )
+{
+ if (mSearchEditor)
+ {
+ mSearchEditor->setFocus(b);
+ }
+}
+
void LLSearchEditor::onClearButtonClick(const LLSD& data)
{
setText(LLStringUtil::null);
diff --git a/indra/llui/llsearcheditor.h b/indra/llui/llsearcheditor.h
index f395e7e816..bd2d595174 100644
--- a/indra/llui/llsearcheditor.h
+++ b/indra/llui/llsearcheditor.h
@@ -83,6 +83,7 @@ public:
virtual BOOL setLabelArg( const std::string& key, const LLStringExplicit& text );
virtual void setLabel( const LLStringExplicit &new_label );
virtual void clear();
+ virtual void setFocus( BOOL b );
void setKeystrokeCallback( commit_callback_t cb ) { mKeystrokeCallback = cb; }
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 82a3c5cf47..2a9515171a 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -194,7 +194,7 @@ LLTextBase::LLTextBase(const LLTextBase::Params &p)
mHAlign(p.font_halign),
mLineSpacingMult(p.line_spacing.multiple),
mLineSpacingPixels(p.line_spacing.pixels),
- mClipPartial(p.clip_partial),
+ mClipPartial(p.clip_partial && !p.allow_scroll),
mTrackEnd( p.track_end ),
mScrollIndex(-1),
mSelectionStart( 0 ),
@@ -529,11 +529,6 @@ void LLTextBase::drawText()
S32 next_line = cur_line + 1;
line_info& line = mLineInfoList[cur_line];
- if ((line.mRect.mTop - scrolled_view_rect.mBottom) < mTextRect.mBottom)
- {
- break;
- }
-
S32 next_start = -1;
S32 line_end = text_len;
@@ -543,17 +538,9 @@ void LLTextBase::drawText()
line_end = next_start;
}
- // A patch for EXT-1944 "Implement ellipses in message well"
- // introduced a regression where text in SansSerif ending in the
- // letter "r" is clipped. This may be due to an off-by-one in
- // font width information out of FreeType with our fractional font
- // sizes. For now, just make an extra pixel of space to resolve
- // EXT-2971 "Letter R doesn't show when it's the last letter in a
- // text block". See James/Richard for details.
- const S32 FIX_CLIPPING_HACK = 1;
LLRect text_rect(line.mRect.mLeft + mTextRect.mLeft - scrolled_view_rect.mLeft,
line.mRect.mTop - scrolled_view_rect.mBottom + mTextRect.mBottom,
- llmin(mDocumentView->getRect().getWidth(), line.mRect.mRight) - scrolled_view_rect.mLeft + FIX_CLIPPING_HACK,
+ llmin(mDocumentView->getRect().getWidth(), line.mRect.mRight) - scrolled_view_rect.mLeft,
line.mRect.mBottom - scrolled_view_rect.mBottom + mTextRect.mBottom);
// draw a single line of text
@@ -1086,6 +1073,10 @@ void LLTextBase::reflow(S32 start_index)
{
mReflowNeeded = FALSE;
+ // shrink document to minimum size (visible portion of text widget)
+ // to force inlined widgets with follows set to shrink
+ mDocumentView->setShape(mTextRect);
+
bool scrolled_to_bottom = mScroller ? mScroller->isAtBottom() : false;
LLRect old_cursor_rect = getLocalRectFromDocIndex(mCursorPos);
@@ -1348,13 +1339,11 @@ std::pair<S32, S32> LLTextBase::getVisibleLines(bool fully_visible)
if (fully_visible)
{
- // binary search for line that starts before top of visible buffer and starts before end of visible buffer
first_iter = std::lower_bound(mLineInfoList.begin(), mLineInfoList.end(), visible_region.mTop, compare_top());
last_iter = std::lower_bound(mLineInfoList.begin(), mLineInfoList.end(), visible_region.mBottom, compare_bottom());
}
else
{
- // binary search for line that starts before top of visible buffer and starts before end of visible buffer
first_iter = std::lower_bound(mLineInfoList.begin(), mLineInfoList.end(), visible_region.mTop, compare_bottom());
last_iter = std::lower_bound(mLineInfoList.begin(), mLineInfoList.end(), visible_region.mBottom, compare_top());
}
@@ -2105,7 +2094,7 @@ void LLTextBase::updateRects()
LLRect doc_rect = mContentsRect;
// use old mTextRect constraint document to width of viewable region
doc_rect.mLeft = 0;
- doc_rect.mRight = mTextRect.getWidth();
+ doc_rect.mRight = llmax(mTextRect.getWidth(), mContentsRect.mRight);
mDocumentView->setShape(doc_rect);
@@ -2125,7 +2114,7 @@ void LLTextBase::updateRects()
}
// update document container again, using new mTextRect
- doc_rect.mRight = doc_rect.mLeft + mTextRect.getWidth();
+ doc_rect.mRight = llmax(mTextRect.getWidth(), mContentsRect.mRight);
mDocumentView->setShape(doc_rect);
}
@@ -2218,6 +2207,12 @@ LLNormalTextSegment::LLNormalTextSegment( const LLStyleSP& style, S32 start, S32
mEditor(editor)
{
mFontHeight = llceil(mStyle->getFont()->getLineHeight());
+
+ LLUIImagePtr image = mStyle->getImage();
+ if (image.notNull())
+ {
+ mImageLoadedConnection = image->addLoadedCallback(boost::bind(&LLTextBase::needsReflow, &mEditor));
+ }
}
LLNormalTextSegment::LLNormalTextSegment( const LLColor4& color, S32 start, S32 end, LLTextBase& editor, BOOL is_visible)
@@ -2230,6 +2225,12 @@ LLNormalTextSegment::LLNormalTextSegment( const LLColor4& color, S32 start, S32
mFontHeight = llceil(mStyle->getFont()->getLineHeight());
}
+LLNormalTextSegment::~LLNormalTextSegment()
+{
+ mImageLoadedConnection.disconnect();
+}
+
+
F32 LLNormalTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect)
{
if( end - start > 0 )
@@ -2243,7 +2244,7 @@ F32 LLNormalTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selec
// Center the image vertically
S32 image_bottom = draw_rect.getCenterY() - (style_image_height/2);
image->draw(draw_rect.mLeft, image_bottom,
- style_image_width, style_image_height);
+ style_image_width, style_image_height, color);
}
return drawClippedSegment( getStart() + start, getStart() + end, selection_start, selection_end, draw_rect);
diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h
index c60b040655..0138ca3704 100644
--- a/indra/llui/lltextbase.h
+++ b/indra/llui/lltextbase.h
@@ -136,7 +136,6 @@ public:
// TODO: move into LLTextSegment?
void createUrlContextMenu(S32 x, S32 y, const std::string &url); // create a popup context menu for the given Url
-
// Text accessors
// TODO: add optional style parameter
virtual void setText(const LLStringExplicit &utf8str , const LLStyle::Params& input_params = LLStyle::Params()); // uses default style
@@ -148,6 +147,8 @@ public:
LLWString getWText() const;
void appendText(const std::string &new_text, bool prepend_newline, const LLStyle::Params& input_params = LLStyle::Params());
+ // force reflow of text
+ void needsReflow() { mReflowNeeded = TRUE; }
S32 getLength() const { return getWText().length(); }
S32 getLineCount() const { return mLineInfoList.size(); }
@@ -162,7 +163,6 @@ public:
S32 getVPad() { return mVPad; }
S32 getHPad() { return mHPad; }
-
S32 getDocIndexFromLocalCoord( S32 local_x, S32 local_y, BOOL round ) const;
LLRect getLocalRectFromDocIndex(S32 pos) const;
LLRect getDocRectFromDocIndex(S32 pos) const;
@@ -180,6 +180,7 @@ public:
void changePage( S32 delta );
void changeLine( S32 delta );
+
const LLFontGL* getDefaultFont() const { return mDefaultFont; }
public:
@@ -303,7 +304,6 @@ protected:
// misc
void updateRects();
- void needsReflow() { mReflowNeeded = TRUE; }
void needsScroll() { mScrollNeeded = TRUE; }
void replaceUrlLabel(const std::string &url, const std::string &label);
@@ -426,6 +426,7 @@ class LLNormalTextSegment : public LLTextSegment
public:
LLNormalTextSegment( const LLStyleSP& style, S32 start, S32 end, LLTextBase& editor );
LLNormalTextSegment( const LLColor4& color, S32 start, S32 end, LLTextBase& editor, BOOL is_visible = TRUE);
+ ~LLNormalTextSegment();
/*virtual*/ bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const;
/*virtual*/ S32 getOffset(S32 segment_local_x_coord, S32 start_offset, S32 num_chars, bool round) const;
@@ -457,6 +458,7 @@ protected:
S32 mFontHeight;
LLKeywordToken* mToken;
std::string mTooltip;
+ boost::signals2::connection mImageLoadedConnection;
};
class LLIndexSegment : public LLTextSegment
diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp
index 4cf503b413..6603887905 100644
--- a/indra/llui/llui.cpp
+++ b/indra/llui/llui.cpp
@@ -1847,8 +1847,8 @@ LLControlGroup& LLUI::getControlControlGroup (const std::string& controlname)
// spawn_x and spawn_y are top left corner of view in screen GL coordinates
void LLUI::positionViewNearMouse(LLView* view, S32 spawn_x, S32 spawn_y)
{
- const S32 CURSOR_HEIGHT = 18; // Approximate "normal" cursor size
- const S32 CURSOR_WIDTH = 9;
+ const S32 CURSOR_HEIGHT = 16; // Approximate "normal" cursor size
+ const S32 CURSOR_WIDTH = 8;
LLView* parent = view->getParent();
@@ -1866,7 +1866,7 @@ void LLUI::positionViewNearMouse(LLView* view, S32 spawn_x, S32 spawn_y)
LLRect virtual_window_rect = parent->getLocalRect();
LLRect mouse_rect;
- const S32 MOUSE_CURSOR_PADDING = 5;
+ const S32 MOUSE_CURSOR_PADDING = 1;
mouse_rect.setLeftTopAndSize(mouse_x - MOUSE_CURSOR_PADDING,
mouse_y + MOUSE_CURSOR_PADDING,
CURSOR_WIDTH + MOUSE_CURSOR_PADDING * 2,
diff --git a/indra/llui/lluiimage.cpp b/indra/llui/lluiimage.cpp
index a8683e55c3..f941f391eb 100644
--- a/indra/llui/lluiimage.cpp
+++ b/indra/llui/lluiimage.cpp
@@ -39,18 +39,20 @@
#include "lluiimage.h"
#include "llui.h"
-LLUIImage::LLUIImage(const std::string& name, LLPointer<LLTexture> image) :
- mName(name),
- mImage(image),
- mScaleRegion(0.f, 1.f, 1.f, 0.f),
- mClipRegion(0.f, 1.f, 1.f, 0.f),
- mUniformScaling(TRUE),
- mNoClip(TRUE)
+LLUIImage::LLUIImage(const std::string& name, LLPointer<LLTexture> image)
+: mName(name),
+ mImage(image),
+ mScaleRegion(0.f, 1.f, 1.f, 0.f),
+ mClipRegion(0.f, 1.f, 1.f, 0.f),
+ mUniformScaling(TRUE),
+ mNoClip(TRUE),
+ mImageLoaded(NULL)
{
}
LLUIImage::~LLUIImage()
{
+ delete mImageLoaded;
}
void LLUIImage::setClipRegion(const LLRectf& region)
@@ -138,6 +140,25 @@ S32 LLUIImage::getTextureHeight() const
return mImage->getHeight(0);
}
+boost::signals2::connection LLUIImage::addLoadedCallback( const image_loaded_signal_t::slot_type& cb )
+{
+ if (!mImageLoaded)
+ {
+ mImageLoaded = new image_loaded_signal_t();
+ }
+ return mImageLoaded->connect(cb);
+}
+
+
+void LLUIImage::onImageLoaded()
+{
+ if (mImageLoaded)
+ {
+ (*mImageLoaded)();
+ }
+}
+
+
namespace LLInitParam
{
LLUIImage* TypedParam<LLUIImage*>::getValueFromBlock() const
@@ -170,3 +191,4 @@ namespace LLInitParam
return (a == b);
}
}
+
diff --git a/indra/llui/lluiimage.h b/indra/llui/lluiimage.h
index 9d734bcfdf..5fa9610ab2 100644
--- a/indra/llui/lluiimage.h
+++ b/indra/llui/lluiimage.h
@@ -39,6 +39,7 @@
#include "llrefcount.h"
#include "llrect.h"
#include <boost/function.hpp>
+#include <boost/signals2.hpp>
#include "llinitparam.h"
#include "lltexture.h"
@@ -47,6 +48,8 @@ extern const LLColor4 UI_VERTEX_COLOR;
class LLUIImage : public LLRefCount
{
public:
+ typedef boost::signals2::signal<void (void)> image_loaded_signal_t;
+
LLUIImage(const std::string& name, LLPointer<LLTexture> image);
virtual ~LLUIImage();
@@ -77,7 +80,13 @@ public:
S32 getTextureWidth() const;
S32 getTextureHeight() const;
+ boost::signals2::connection addLoadedCallback( const image_loaded_signal_t::slot_type& cb );
+
+ void onImageLoaded();
+
protected:
+ image_loaded_signal_t* mImageLoaded;
+
std::string mName;
LLRectf mScaleRegion;
LLRectf mClipRegion;
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp
index b51709e208..7694d02837 100644
--- a/indra/llui/llurlentry.cpp
+++ b/indra/llui/llurlentry.cpp
@@ -386,36 +386,24 @@ std::string LLUrlEntryGroup::getLabel(const std::string &url, const LLUrlLabelCa
//
// LLUrlEntryInventory Describes a Second Life inventory Url, e.g.,
-// secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/select
+// secondlife:///app/inventory/0e346d8b-4433-4d66-a6b0-fd37083abc4c/select
//
LLUrlEntryInventory::LLUrlEntryInventory()
{
- mPattern = boost::regex("secondlife:///app/inventory/[\\da-f-]+/\\w+",
+ //*TODO: add supporting of inventory item names with whitespaces
+ //this pattern cann't parse for example
+ //secondlife:///app/inventory/0e346d8b-4433-4d66-a6b0-fd37083abc4c/select?name=name with spaces&param2=value
+ mPattern = boost::regex("secondlife:///app/inventory/[\\da-f-]+/\\w+\\S*",
boost::regex::perl|boost::regex::icase);
mMenuName = "menu_url_inventory.xml";
}
std::string LLUrlEntryInventory::getLabel(const std::string &url, const LLUrlLabelCallback &cb)
{
- return unescapeUrl(url);
- // TODO: Figure out if we can somehow access the inventory from here to get the actual item name
- /*
- std::string inventory_id_string = getIDStringFromUrl(url);
- if (inventory_id_string.empty())
- {
- // something went wrong, give raw url
- return unescapeUrl(url);
- }
- LLUUID inventory_id(inventory_id_string);
- LLInventoryItem* item = gInventory.getItem(inventory_id);
- if(!item)
- {
- return unescapeUrl(url);
- }
- return item->getName(); */
+ std::string label = getStringAfterToken(url, "name=");
+ return LLURI::unescape(label.empty() ? url : label);
}
-
///
/// LLUrlEntryParcel Describes a Second Life parcel Url, e.g.,
/// secondlife:///app/parcel/0000060e-4b39-e00b-d0c3-d98b1934e3a8/about
diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp
index b2f084e5ac..f47db2db1a 100644
--- a/indra/llui/llurlregistry.cpp
+++ b/indra/llui/llurlregistry.cpp
@@ -53,9 +53,11 @@ LLUrlRegistry::LLUrlRegistry()
registerUrl(new LLUrlEntryTeleport());
registerUrl(new LLUrlEntryWorldMap());
registerUrl(new LLUrlEntryPlace());
+ registerUrl(new LLUrlEntryInventory());
+ //LLUrlEntrySL and LLUrlEntrySLLabel have more common pattern,
+ //so it should be registered in the end of list
registerUrl(new LLUrlEntrySL());
registerUrl(new LLUrlEntrySLLabel());
- registerUrl(new LLUrlEntryInventory());
}
LLUrlRegistry::~LLUrlRegistry()
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index 6f8455774d..8917e4b813 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -2850,18 +2850,21 @@ LLView::default_widget_map_t& LLView::getDefaultWidgetMap() const
return *mDefaultWidgets;
}
-void LLView::notifyParent(const LLSD& info)
+S32 LLView::notifyParent(const LLSD& info)
{
LLView* parent = getParent();
if(parent)
- parent->notifyParent(info);
+ return parent->notifyParent(info);
+ return 0;
}
-void LLView::notifyChildren(const LLSD& info)
+bool LLView::notifyChildren(const LLSD& info)
{
+ bool ret = false;
for ( child_list_iter_t child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it)
{
- (*child_it)->notifyChildren(info);
+ ret |= (*child_it)->notifyChildren(info);
}
+ return ret;
}
// convenient accessor for draw context
diff --git a/indra/llui/llview.h b/indra/llui/llview.h
index d485244a05..f8460f5361 100644
--- a/indra/llui/llview.h
+++ b/indra/llui/llview.h
@@ -511,8 +511,15 @@ public:
virtual void handleReshape(const LLRect& rect, bool by_user);
virtual void dirtyRect();
- virtual void notifyParent(const LLSD& info);
- virtual void notifyChildren(const LLSD& info);
+ //send custom notification to LLView parent
+ virtual S32 notifyParent(const LLSD& info);
+
+ //send custom notification to all view childrend
+ // return true if _any_ children return true. otherwise false.
+ virtual bool notifyChildren(const LLSD& info);
+
+ //send custom notification to current view
+ virtual S32 notify(const LLSD& info) { return 0;};
static const LLViewDrawContext& getDrawContext();
diff --git a/indra/llwindow/llwindow.h b/indra/llwindow/llwindow.h
index 8602225108..127dbf45e0 100644
--- a/indra/llwindow/llwindow.h
+++ b/indra/llwindow/llwindow.h
@@ -70,6 +70,8 @@ public:
virtual BOOL getMinimized() = 0;
virtual BOOL getMaximized() = 0;
virtual BOOL maximize() = 0;
+ virtual void minimize() = 0;
+ virtual void restore() = 0;
BOOL getFullscreen() { return mFullscreen; };
virtual BOOL getPosition(LLCoordScreen *position) = 0;
virtual BOOL getSize(LLCoordScreen *size) = 0;
diff --git a/indra/llwindow/llwindowheadless.h b/indra/llwindow/llwindowheadless.h
index 3cffd2bbf6..59fc2ec657 100644
--- a/indra/llwindow/llwindowheadless.h
+++ b/indra/llwindow/llwindowheadless.h
@@ -45,6 +45,8 @@ public:
/*virtual*/ BOOL getMinimized() {return FALSE;};
/*virtual*/ BOOL getMaximized() {return FALSE;};
/*virtual*/ BOOL maximize() {return FALSE;};
+ /*virtual*/ void minimize() {};
+ /*virtual*/ void restore() {};
/*virtual*/ BOOL getFullscreen() {return FALSE;};
/*virtual*/ BOOL getPosition(LLCoordScreen *position) {return FALSE;};
/*virtual*/ BOOL getSize(LLCoordScreen *size) {return FALSE;};
diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp
index af9a30cb25..ed62faece6 100644
--- a/indra/llwindow/llwindowmacosx.cpp
+++ b/indra/llwindow/llwindowmacosx.cpp
@@ -1033,6 +1033,7 @@ void LLWindowMacOSX::hide()
HideWindow(mWindow);
}
+//virtual
void LLWindowMacOSX::minimize()
{
setMouseClipping(FALSE);
@@ -1040,6 +1041,7 @@ void LLWindowMacOSX::minimize()
CollapseWindow(mWindow, true);
}
+//virtual
void LLWindowMacOSX::restore()
{
show();
@@ -1441,7 +1443,7 @@ static void fixOrigin(void)
::GetPortBounds(port, &portrect);
if((portrect.left != 0) || (portrect.top != 0))
{
- // Mozilla sometimes changes our port origin. Fuckers.
+ // Mozilla sometimes changes our port origin.
::SetOrigin(0,0);
}
}
diff --git a/indra/llwindow/llwindowmacosx.h b/indra/llwindow/llwindowmacosx.h
index 17074080eb..fbfa07fab4 100644
--- a/indra/llwindow/llwindowmacosx.h
+++ b/indra/llwindow/llwindowmacosx.h
@@ -56,6 +56,8 @@ public:
/*virtual*/ BOOL getMinimized();
/*virtual*/ BOOL getMaximized();
/*virtual*/ BOOL maximize();
+ /*virtual*/ void minimize();
+ /*virtual*/ void restore();
/*virtual*/ BOOL getFullscreen();
/*virtual*/ BOOL getPosition(LLCoordScreen *position);
/*virtual*/ BOOL getSize(LLCoordScreen *size);
@@ -139,9 +141,6 @@ protected:
// Restore the display resolution to its value before we ran the app.
BOOL resetDisplayResolution();
- void minimize();
- void restore();
-
BOOL shouldPostQuit() { return mPostQuit; }
diff --git a/indra/llwindow/llwindowmesaheadless.h b/indra/llwindow/llwindowmesaheadless.h
index 46b62b914c..06146afde7 100644
--- a/indra/llwindow/llwindowmesaheadless.h
+++ b/indra/llwindow/llwindowmesaheadless.h
@@ -49,6 +49,8 @@ public:
/*virtual*/ BOOL getMinimized() {return FALSE;};
/*virtual*/ BOOL getMaximized() {return FALSE;};
/*virtual*/ BOOL maximize() {return FALSE;};
+ /*virtual*/ void minimize() {};
+ /*virtual*/ void restore() {};
/*virtual*/ BOOL getFullscreen() {return FALSE;};
/*virtual*/ BOOL getPosition(LLCoordScreen *position) {return FALSE;};
/*virtual*/ BOOL getSize(LLCoordScreen *size) {return FALSE;};
diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp
index e671fc8a83..bfdf1147a1 100644
--- a/indra/llwindow/llwindowsdl.cpp
+++ b/indra/llwindow/llwindowsdl.cpp
@@ -839,11 +839,13 @@ void LLWindowSDL::hide()
// *FIX: What to do with SDL?
}
+//virtual
void LLWindowSDL::minimize()
{
// *FIX: What to do with SDL?
}
+//virtual
void LLWindowSDL::restore()
{
// *FIX: What to do with SDL?
diff --git a/indra/llwindow/llwindowsdl.h b/indra/llwindow/llwindowsdl.h
index dcf41291ec..0ba1c861da 100644
--- a/indra/llwindow/llwindowsdl.h
+++ b/indra/llwindow/llwindowsdl.h
@@ -62,6 +62,8 @@ public:
/*virtual*/ BOOL getMinimized();
/*virtual*/ BOOL getMaximized();
/*virtual*/ BOOL maximize();
+ /*virtual*/ void minimize();
+ /*virtual*/ void restore();
/*virtual*/ BOOL getFullscreen();
/*virtual*/ BOOL getPosition(LLCoordScreen *position);
/*virtual*/ BOOL getSize(LLCoordScreen *size);
@@ -165,9 +167,6 @@ protected:
// Go back to last fullscreen display resolution.
BOOL setFullscreenResolution();
- void minimize();
- void restore();
-
BOOL shouldPostQuit() { return mPostQuit; }
protected:
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index c608c21d05..3b9c840e72 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -643,6 +643,7 @@ void LLWindowWin32::hide()
ShowWindow(mWindowHandle, SW_HIDE);
}
+//virtual
void LLWindowWin32::minimize()
{
setMouseClipping(FALSE);
@@ -650,7 +651,7 @@ void LLWindowWin32::minimize()
ShowWindow(mWindowHandle, SW_MINIMIZE);
}
-
+//virtual
void LLWindowWin32::restore()
{
ShowWindow(mWindowHandle, SW_RESTORE);
diff --git a/indra/llwindow/llwindowwin32.h b/indra/llwindow/llwindowwin32.h
index e14324c9f1..e4e9179db7 100644
--- a/indra/llwindow/llwindowwin32.h
+++ b/indra/llwindow/llwindowwin32.h
@@ -54,6 +54,8 @@ public:
/*virtual*/ BOOL getMinimized();
/*virtual*/ BOOL getMaximized();
/*virtual*/ BOOL maximize();
+ /*virtual*/ void minimize();
+ /*virtual*/ void restore();
/*virtual*/ BOOL getFullscreen();
/*virtual*/ BOOL getPosition(LLCoordScreen *position);
/*virtual*/ BOOL getSize(LLCoordScreen *size);
@@ -137,9 +139,6 @@ protected:
// Restore the display resolution to its value before we ran the app.
BOOL resetDisplayResolution();
- void minimize();
- void restore();
-
BOOL shouldPostQuit() { return mPostQuit; }
void fillCompositionForm(const LLRect& bounds, COMPOSITIONFORM *form);
diff --git a/indra/media_plugins/base/media_plugin_base.cpp b/indra/media_plugins/base/media_plugin_base.cpp
index 8c8fa24a65..658783e064 100644
--- a/indra/media_plugins/base/media_plugin_base.cpp
+++ b/indra/media_plugins/base/media_plugin_base.cpp
@@ -2,6 +2,8 @@
* @file media_plugin_base.cpp
* @brief Media plugin base class for LLMedia API plugin system
*
+ * All plugins should be a subclass of MediaPluginBase.
+ *
* @cond
* $LicenseInfo:firstyear=2008&license=viewergpl$
*
@@ -37,7 +39,10 @@
// TODO: Make sure that the only symbol exported from this library is LLPluginInitEntryPoint
////////////////////////////////////////////////////////////////////////////////
-//
+/// Media plugin constructor.
+///
+/// @param[in] host_send_func Function for sending messages from plugin to plugin loader shell
+/// @param[in] host_user_data Message data for messages from plugin to plugin loader shell
MediaPluginBase::MediaPluginBase(
LLPluginInstance::sendMessageFunction host_send_func,
@@ -55,6 +60,12 @@ MediaPluginBase::MediaPluginBase(
mStatus = STATUS_NONE;
}
+/**
+ * Converts current media status enum value into string (STATUS_LOADING into "loading", etc.)
+ *
+ * @return Media status string ("loading", "playing", "paused", etc)
+ *
+ */
std::string MediaPluginBase::statusString()
{
std::string result;
@@ -75,6 +86,12 @@ std::string MediaPluginBase::statusString()
return result;
}
+/**
+ * Set media status.
+ *
+ * @param[in] status Media status (STATUS_LOADING, STATUS_PLAYING, STATUS_PAUSED, etc)
+ *
+ */
void MediaPluginBase::setStatus(EStatus status)
{
if(mStatus != status)
@@ -85,6 +102,13 @@ void MediaPluginBase::setStatus(EStatus status)
}
+/**
+ * Receive message from plugin loader shell.
+ *
+ * @param[in] message_string Message string
+ * @param[in] user_data Message data
+ *
+ */
void MediaPluginBase::staticReceiveMessage(const char *message_string, void **user_data)
{
MediaPluginBase *self = (MediaPluginBase*)*user_data;
@@ -102,12 +126,27 @@ void MediaPluginBase::staticReceiveMessage(const char *message_string, void **us
}
}
+/**
+ * Send message to plugin loader shell.
+ *
+ * @param[in] message Message data being sent to plugin loader shell
+ *
+ */
void MediaPluginBase::sendMessage(const LLPluginMessage &message)
{
std::string output = message.generate();
mHostSendFunction(output.c_str(), &mHostUserData);
}
+/**
+ * Notifies plugin loader shell that part of display area needs to be redrawn.
+ *
+ * @param[in] left Left X coordinate of area to redraw (0,0 is at top left corner)
+ * @param[in] top Top Y coordinate of area to redraw (0,0 is at top left corner)
+ * @param[in] right Right X-coordinate of area to redraw (0,0 is at top left corner)
+ * @param[in] bottom Bottom Y-coordinate of area to redraw (0,0 is at top left corner)
+ *
+ */
void MediaPluginBase::setDirty(int left, int top, int right, int bottom)
{
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "updated");
@@ -120,6 +159,10 @@ void MediaPluginBase::setDirty(int left, int top, int right, int bottom)
sendMessage(message);
}
+/**
+ * Sends "media_status" message to plugin loader shell ("loading", "playing", "paused", etc.)
+ *
+ */
void MediaPluginBase::sendStatus()
{
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "media_status");
@@ -143,6 +186,17 @@ extern "C"
LLSYMEXPORT int LLPluginInitEntryPoint(LLPluginInstance::sendMessageFunction host_send_func, void *host_user_data, LLPluginInstance::sendMessageFunction *plugin_send_func, void **plugin_user_data);
}
+/**
+ * Plugin initialization and entry point. Establishes communication channel for messages between plugin and plugin loader shell. TODO:DOC - Please check!
+ *
+ * @param[in] host_send_func Function for sending messages from plugin to plugin loader shell
+ * @param[in] host_user_data Message data for messages from plugin to plugin loader shell
+ * @param[out] plugin_send_func Function for plugin to receive messages from plugin loader shell
+ * @param[out] plugin_user_data Pointer to plugin instance
+ *
+ * @return int, where 0=success
+ *
+ */
LLSYMEXPORT int
LLPluginInitEntryPoint(LLPluginInstance::sendMessageFunction host_send_func, void *host_user_data, LLPluginInstance::sendMessageFunction *plugin_send_func, void **plugin_user_data)
{
diff --git a/indra/media_plugins/base/media_plugin_base.h b/indra/media_plugins/base/media_plugin_base.h
index 4dd157a07c..ed4dc0cfa9 100644
--- a/indra/media_plugins/base/media_plugin_base.h
+++ b/indra/media_plugins/base/media_plugin_base.h
@@ -42,14 +42,17 @@ class MediaPluginBase
{
public:
MediaPluginBase(LLPluginInstance::sendMessageFunction host_send_func, void *host_user_data);
+ /** Media plugin destructor. */
virtual ~MediaPluginBase() {}
+ /** Handle received message from plugin loader shell. */
virtual void receiveMessage(const char *message_string) = 0;
static void staticReceiveMessage(const char *message_string, void **user_data);
protected:
+ /** Plugin status. */
typedef enum
{
STATUS_NONE,
@@ -61,10 +64,13 @@ protected:
STATUS_DONE
} EStatus;
+ /** Plugin shared memory. */
class SharedSegmentInfo
{
public:
+ /** Shared memory address. */
void *mAddress;
+ /** Shared memory size. */
size_t mSize;
};
@@ -73,42 +79,56 @@ protected:
std::string statusString();
void setStatus(EStatus status);
- // The quicktime plugin overrides this to add current time and duration to the message...
+ /// Note: The quicktime plugin overrides this to add current time and duration to the message.
virtual void setDirty(int left, int top, int right, int bottom);
+ /** Map of shared memory names to shared memory. */
typedef std::map<std::string, SharedSegmentInfo> SharedSegmentMap;
+ /** Function to send message from plugin to plugin loader shell. */
LLPluginInstance::sendMessageFunction mHostSendFunction;
+ /** Message data being sent to plugin loader shell by mHostSendFunction. */
void *mHostUserData;
+ /** Flag to delete plugin instance (self). */
bool mDeleteMe;
+ /** Pixel array to display. TODO:DOC are pixels always 24-bit RGB format, aligned on 32-bit boundary? Also: calling this a pixel array may be misleading since 1 pixel > 1 char. */
unsigned char* mPixels;
+ /** TODO:DOC what's this for -- does a texture have its own piece of shared memory? updated on size_change_request, cleared on shm_remove */
std::string mTextureSegmentName;
+ /** Width of plugin display in pixels. */
int mWidth;
+ /** Height of plugin display in pixels. */
int mHeight;
+ /** Width of plugin texture. */
int mTextureWidth;
+ /** Height of plugin texture. */
int mTextureHeight;
+ /** Pixel depth (pixel size in bytes). */
int mDepth;
+ /** Current status of plugin. */
EStatus mStatus;
+ /** Map of shared memory segments. */
SharedSegmentMap mSharedSegments;
};
-// The plugin must define this function to create its instance.
+/** The plugin <b>must</b> define this function to create its instance.
+ * It should look something like this:
+ * @code
+ * {
+ * MediaPluginFoo *self = new MediaPluginFoo(host_send_func, host_user_data);
+ * *plugin_send_func = MediaPluginFoo::staticReceiveMessage;
+ * *plugin_user_data = (void*)self;
+ *
+ * return 0;
+ * }
+ * @endcode
+ */
int init_media_plugin(
LLPluginInstance::sendMessageFunction host_send_func,
void *host_user_data,
LLPluginInstance::sendMessageFunction *plugin_send_func,
void **plugin_user_data);
-// It should look something like this:
-/*
-{
- MediaPluginFoo *self = new MediaPluginFoo(host_send_func, host_user_data);
- *plugin_send_func = MediaPluginFoo::staticReceiveMessage;
- *plugin_user_data = (void*)self;
-
- return 0;
-}
-*/
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index c2ca366ce4..57d67bd560 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -410,6 +410,7 @@ set(viewer_SOURCE_FILES
lltexturestats.cpp
lltexturestatsuploader.cpp
lltextureview.cpp
+ lltextutil.cpp
lltoast.cpp
lltoastalertpanel.cpp
lltoastgroupnotifypanel.cpp
@@ -447,12 +448,13 @@ set(viewer_SOURCE_FILES
llurlsimstring.cpp
llurlwhitelist.cpp
llvectorperfoptions.cpp
+ llversioninfo.cpp
llviewchildren.cpp
llviewerassetstorage.cpp
llviewerassettype.cpp
llvieweraudio.cpp
llviewercamera.cpp
- llviewerchat.cpp
+ llviewerchat.cpp
llviewercontrol.cpp
llviewercontrollistener.cpp
llviewerdisplay.cpp
@@ -462,6 +464,7 @@ set(viewer_SOURCE_FILES
llviewergesture.cpp
llviewerhelp.cpp
llviewerhelputil.cpp
+ llviewerhome.cpp
llviewerinventory.cpp
llviewerjoint.cpp
llviewerjointattachment.cpp
@@ -911,6 +914,7 @@ set(viewer_HEADER_FILES
lltexturestats.h
lltexturestatsuploader.h
lltextureview.h
+ lltextutil.h
lltoast.h
lltoastalertpanel.h
lltoastgroupnotifypanel.h
@@ -949,13 +953,13 @@ set(viewer_HEADER_FILES
llurlsimstring.h
llurlwhitelist.h
llvectorperfoptions.h
+ llversioninfo.h
llviewchildren.h
llviewerassetstorage.h
llviewerassettype.h
llvieweraudio.h
- llviewerbuild.h
llviewercamera.h
- llviewerchat.h
+ llviewerchat.h
llviewercontrol.h
llviewercontrollistener.h
llviewerdisplay.h
@@ -964,6 +968,7 @@ set(viewer_HEADER_FILES
llviewergenericmessage.h
llviewergesture.h
llviewerhelp.h
+ llviewerhome.h
llviewerinventory.h
llviewerjoint.h
llviewerjointattachment.h
@@ -1115,22 +1120,13 @@ if (WINDOWS)
# the .pch file.
# All sources added to viewer_SOURCE_FILES
# at this point use it.
- set_source_files_properties(llviewerprecompiledheaders.cpp
- PROPERTIES
- COMPILE_FLAGS "/Ycllviewerprecompiledheaders.h"
- )
- foreach( src_file ${viewer_SOURCE_FILES} )
- set_source_files_properties(
- ${src_file}
+ if(USE_PRECOMPILED_HEADERS)
+ set_source_files_properties(llviewerprecompiledheaders.cpp
PROPERTIES
- COMPILE_FLAGS "/Yullviewerprecompiledheaders.h"
- )
- endforeach( src_file ${viewer_SOURCE_FILES} )
- list(APPEND viewer_SOURCE_FILES llviewerprecompiledheaders.cpp)
- # llstartup.cpp needs special symbols for audio libraries, so it resets
- # COMPILE_FLAGS below. Make sure it maintains precompiled header settings.
- set(LLSTARTUP_COMPILE_FLAGS
- "${LLSTARTUP_COMPILE_FLAGS} /Yullviewerprecompiledheaders.h")
+ COMPILE_FLAGS "/Ycllviewerprecompiledheaders.h"
+ )
+ set(viewer_SOURCE_FILES "${viewer_SOURCE_FILES}" llviewerprecompiledheaders.cpp)
+ endif(USE_PRECOMPILED_HEADERS)
# Add resource files to the project.
# viewerRes.rc is the only buildable file, but
@@ -1382,6 +1378,13 @@ if (WINDOWS)
LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO"
LINK_FLAGS_RELEASE ${release_flags}
)
+ if(USE_PRECOMPILED_HEADERS)
+ set_target_properties(
+ ${VIEWER_BINARY_NAME}
+ PROPERTIES
+ COMPILE_FLAGS "/Yullviewerprecompiledheaders.h"
+ )
+ endif(USE_PRECOMPILED_HEADERS)
# sets the 'working directory' for debugging from visual studio.
if (NOT UNATTENDED)
@@ -1520,7 +1523,7 @@ target_link_libraries(${VIEWER_BINARY_NAME}
${BOOST_REGEX_LIBRARY}
${DBUSGLIB_LIBRARIES}
${OPENGL_LIBRARIES}
- ${FMODWRAPPER_LIBRARY}
+ ${FMODWRAPPER_LIBRARY} # must come after LLAudio
${OPENGL_LIBRARIES}
${SDL_LIBRARY}
${SMARTHEAP_LIBRARY}
@@ -1668,15 +1671,26 @@ if (LL_TESTS)
llviewerhelputil.cpp
lllogininstance.cpp
)
- set_source_files_properties(
- ${viewer_TEST_SOURCE_FILES}
- PROPERTIES
- LL_TEST_ADDITIONAL_SOURCE_FILES llviewerprecompiledheaders.cpp
- )
+ ##################################################
+ # DISABLING PRECOMPILED HEADERS USAGE FOR TESTS
+ ##################################################
+ # if(USE_PRECOMPILED_HEADERS)
+ # set_source_files_properties(
+ # ${viewer_TEST_SOURCE_FILES}
+ # PROPERTIES
+ # LL_TEST_ADDITIONAL_SOURCE_FILES llviewerprecompiledheaders.cpp
+ # )
+ # endif(USE_PRECOMPILED_HEADERS)
LL_ADD_PROJECT_UNIT_TESTS(${VIEWER_BINARY_NAME} "${viewer_TEST_SOURCE_FILES}")
#set(TEST_DEBUG on)
- set(test_sources llcapabilitylistener.cpp llviewerprecompiledheaders.cpp)
+ set(test_sources llcapabilitylistener.cpp)
+ ##################################################
+ # DISABLING PRECOMPILED HEADERS USAGE FOR TESTS
+ ##################################################
+ # if(USE_PRECOMPILED_HEADERS)
+ # set(test_sources "${test_sources}" llviewerprecompiledheaders.cpp)
+ # endif(USE_PRECOMPILED_HEADERS)
set(test_libs
${LLMESSAGE_LIBRARIES}
${WINDOWS_LIBRARIES}
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 76bc9b1d57..c43032a3cf 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -386,17 +386,6 @@
<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>
@@ -1055,7 +1044,7 @@
<key>Type</key>
<string>S32</string>
<key>Value</key>
- <integer>10</integer>
+ <integer>4</integer>
</map>
<key>ButtonHeight</key>
<map>
@@ -1066,7 +1055,7 @@
<key>Type</key>
<string>S32</string>
<key>Value</key>
- <integer>20</integer>
+ <integer>23</integer>
</map>
<key>ButtonHeightSmall</key>
<map>
@@ -1077,7 +1066,7 @@
<key>Type</key>
<string>S32</string>
<key>Value</key>
- <integer>16</integer>
+ <integer>23</integer>
</map>
<key>ButtonVPad</key>
<map>
@@ -3598,6 +3587,17 @@
<key>Value</key>
<string>http://viewer-help.secondlife.com/[LANGUAGE]/[CHANNEL]/[VERSION]/[TOPIC]</string>
</map>
+ <key>HomeSidePanelURL</key>
+ <map>
+ <key>Comment</key>
+ <string>URL for the web page to display in the Home side panel</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string>http://www.secondlife.com/</string>
+ </map>
<key>HighResSnapshot</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index b52b58f9e2..3114a37ada 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -37,7 +37,6 @@
#include "llcallbacklist.h"
#include "llfloatercustomize.h"
-#include "llfloaterinventory.h"
#include "llinventorybridge.h"
#include "llinventoryobserver.h"
#include "llinventorypanel.h"
@@ -704,6 +703,7 @@ U32 LLAgentWearables::pushWearable(const EWearableType type, LLWearable *wearabl
void LLAgentWearables::wearableUpdated(LLWearable *wearable)
{
mAvatarObject->wearableUpdated(wearable->getType(), TRUE);
+ wearable->refreshName();
wearable->setLabelUpdated();
// Hack pt 2. If the wearable we just loaded has definition version 24,
@@ -1361,10 +1361,10 @@ void LLAgentWearables::makeNewOutfitDone(S32 type, U32 index)
// Open the inventory and select the first item we added.
if (first_item_id.notNull())
{
- LLFloaterInventory* view = LLFloaterInventory::getActiveInventory();
- if (view)
+ LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel();
+ if (active_panel)
{
- view->getPanel()->setSelection(first_item_id, TAKE_FOCUS_NO);
+ active_panel->setSelection(first_item_id, TAKE_FOCUS_NO);
}
}
}
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index c7f05d99f7..d91b9d7ea4 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -512,6 +512,21 @@ void LLAppearanceManager::updateCOF(const LLUUID& category, bool append)
{
const LLUUID cof = getCOF();
+ // Deactivate currently active gestures in the COF, if replacing outfit
+ if (!append)
+ {
+ LLInventoryModel::item_array_t gest_items;
+ getDescendentsOfAssetType(cof, gest_items, LLAssetType::AT_GESTURE, false);
+ for(S32 i = 0; i < gest_items.count(); ++i)
+ {
+ LLViewerInventoryItem *gest_item = gest_items.get(i);
+ if ( LLGestureManager::instance().isGestureActive( gest_item->getLinkedUUID()) )
+ {
+ LLGestureManager::instance().deactivateGesture( gest_item->getLinkedUUID() );
+ }
+ }
+ }
+
// Collect and filter descendents to determine new COF contents.
// - Body parts: always include COF contents as a fallback in case any
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index eb08707b61..508badcc6f 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -35,7 +35,7 @@
#include "llappviewer.h"
// Viewer includes
-#include "llversionviewer.h"
+#include "llversioninfo.h"
#include "llfeaturemanager.h"
#include "lluictrlfactory.h"
#include "lltexteditor.h"
@@ -647,12 +647,9 @@ bool LLAppViewer::init()
writeSystemInfo();
// Build a string representing the current version number.
- gCurrentVersion = llformat("%s %d.%d.%d.%d",
- gSavedSettings.getString("VersionChannelName").c_str(),
- LL_VERSION_MAJOR,
- LL_VERSION_MINOR,
- LL_VERSION_PATCH,
- LL_VERSION_BUILD );
+ gCurrentVersion = llformat("%s %s",
+ gSavedSettings.getString("VersionChannelName").c_str(),
+ LLVersionInfo::getVersion().c_str());
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
@@ -899,6 +896,8 @@ bool LLAppViewer::init()
loadEventHostModule(gSavedSettings.getS32("QAModeEventHostPort"));
}
+ LLViewerMedia::initClass();
+
return true;
}
@@ -1666,7 +1665,7 @@ bool LLAppViewer::initThreads()
// Image decoding
LLAppViewer::sImageDecodeThread = new LLImageDecodeThread(enable_threads && true);
LLAppViewer::sTextureCache = new LLTextureCache(enable_threads && true);
- LLAppViewer::sTextureFetch = new LLTextureFetch(LLAppViewer::getTextureCache(), sImageDecodeThread, enable_threads && true);
+ LLAppViewer::sTextureFetch = new LLTextureFetch(LLAppViewer::getTextureCache(), sImageDecodeThread, enable_threads && false);
LLImage::initClass();
if (LLFastTimer::sLog || LLFastTimer::sMetricLog)
@@ -1871,7 +1870,7 @@ bool LLAppViewer::initConfiguration()
gSavedSettings.setString("ClientSettingsFile",
gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("Default", "Global")));
- gSavedSettings.setString("VersionChannelName", LL_CHANNEL);
+ gSavedSettings.setString("VersionChannelName", LLVersionInfo::getChannel());
#ifndef LL_RELEASE_FOR_DOWNLOAD
// provide developer build only overrides for these control variables that are not
@@ -2482,10 +2481,10 @@ void LLAppViewer::writeSystemInfo()
gDebugInfo["SLLog"] = LLError::logFileName();
gDebugInfo["ClientInfo"]["Name"] = gSavedSettings.getString("VersionChannelName");
- gDebugInfo["ClientInfo"]["MajorVersion"] = LL_VERSION_MAJOR;
- gDebugInfo["ClientInfo"]["MinorVersion"] = LL_VERSION_MINOR;
- gDebugInfo["ClientInfo"]["PatchVersion"] = LL_VERSION_PATCH;
- gDebugInfo["ClientInfo"]["BuildVersion"] = LL_VERSION_BUILD;
+ gDebugInfo["ClientInfo"]["MajorVersion"] = LLVersionInfo::getMajor();
+ gDebugInfo["ClientInfo"]["MinorVersion"] = LLVersionInfo::getMinor();
+ gDebugInfo["ClientInfo"]["PatchVersion"] = LLVersionInfo::getPatch();
+ gDebugInfo["ClientInfo"]["BuildVersion"] = LLVersionInfo::getBuild();
gDebugInfo["CAFilename"] = gDirUtilp->getCAFile();
@@ -2519,8 +2518,7 @@ void LLAppViewer::writeSystemInfo()
// Dump some debugging info
LL_INFOS("SystemInfo") << LLTrans::getString("APP_NAME")
- << " version " << LL_VERSION_MAJOR << "." << LL_VERSION_MINOR << "." << LL_VERSION_PATCH
- << LL_ENDL;
+ << " version " << LLVersionInfo::getShortVersion() << LL_ENDL;
// Dump the local time and time zone
time_t now;
@@ -2574,10 +2572,10 @@ void LLAppViewer::handleViewerCrash()
//to check against no matter what
gDebugInfo["ClientInfo"]["Name"] = gSavedSettings.getString("VersionChannelName");
- gDebugInfo["ClientInfo"]["MajorVersion"] = LL_VERSION_MAJOR;
- gDebugInfo["ClientInfo"]["MinorVersion"] = LL_VERSION_MINOR;
- gDebugInfo["ClientInfo"]["PatchVersion"] = LL_VERSION_PATCH;
- gDebugInfo["ClientInfo"]["BuildVersion"] = LL_VERSION_BUILD;
+ gDebugInfo["ClientInfo"]["MajorVersion"] = LLVersionInfo::getMajor();
+ gDebugInfo["ClientInfo"]["MinorVersion"] = LLVersionInfo::getMinor();
+ gDebugInfo["ClientInfo"]["PatchVersion"] = LLVersionInfo::getPatch();
+ gDebugInfo["ClientInfo"]["BuildVersion"] = LLVersionInfo::getBuild();
LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
if ( parcel && parcel->getMusicURL()[0])
@@ -4151,10 +4149,10 @@ void LLAppViewer::handleLoginComplete()
// Store some data to DebugInfo in case of a freeze.
gDebugInfo["ClientInfo"]["Name"] = gSavedSettings.getString("VersionChannelName");
- gDebugInfo["ClientInfo"]["MajorVersion"] = LL_VERSION_MAJOR;
- gDebugInfo["ClientInfo"]["MinorVersion"] = LL_VERSION_MINOR;
- gDebugInfo["ClientInfo"]["PatchVersion"] = LL_VERSION_PATCH;
- gDebugInfo["ClientInfo"]["BuildVersion"] = LL_VERSION_BUILD;
+ gDebugInfo["ClientInfo"]["MajorVersion"] = LLVersionInfo::getMajor();
+ gDebugInfo["ClientInfo"]["MinorVersion"] = LLVersionInfo::getMinor();
+ gDebugInfo["ClientInfo"]["PatchVersion"] = LLVersionInfo::getPatch();
+ gDebugInfo["ClientInfo"]["BuildVersion"] = LLVersionInfo::getBuild();
LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
if ( parcel && parcel->getMusicURL()[0])
diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp
index d5f9f7ca5d..1d03cc8823 100644
--- a/indra/newview/llassetuploadresponders.cpp
+++ b/indra/newview/llassetuploadresponders.cpp
@@ -42,7 +42,6 @@
#include "llnotify.h"
#include "llinventoryobserver.h"
#include "llinventorypanel.h"
-#include "llfloaterinventory.h"
#include "llpermissionsflags.h"
#include "llpreviewnotecard.h"
#include "llpreviewscript.h"
@@ -287,19 +286,18 @@ void LLNewAgentInventoryResponder::uploadComplete(const LLSD& content)
// Show the preview panel for textures and sounds to let
// user know that the image (or snapshot) arrived intact.
- LLFloaterInventory* view = LLFloaterInventory::getActiveInventory();
- if(view)
+ LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel();
+ if (active_panel)
{
- LLFocusableElement* focus = gFocusMgr.getKeyboardFocus();
-
- view->getPanel()->setSelection(content["new_inventory_item"].asUUID(), TAKE_FOCUS_NO);
+ active_panel->setSelection(content["new_inventory_item"].asUUID(), TAKE_FOCUS_NO);
if((LLAssetType::AT_TEXTURE == asset_type || LLAssetType::AT_SOUND == asset_type)
&& LLFilePicker::instance().getFileCount() <= FILE_COUNT_DISPLAY_THRESHOLD)
{
- view->getPanel()->openSelected();
+ active_panel->openSelected();
}
//LLFloaterInventory::dumpSelectionInformation((void*)view);
// restore keyboard focus
+ LLFocusableElement* focus = gFocusMgr.getKeyboardFocus();
gFocusMgr.setKeyboardFocus(focus);
}
}
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index a7a6da3ac2..5af023f565 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -487,6 +487,13 @@ void LLAvatarActions::requestFriendship(const LLUUID& target_id, const std::stri
IM_ONLINE,
IM_FRIENDSHIP_OFFERED,
calling_card_folder_id);
+
+ LLSD args;
+ args["TO_NAME"] = target_name;
+ LLSD payload;
+ payload["SESSION_NAME"] = target_name;
+ payload["SUPPRES_TOST"] = true;
+ LLNotificationsUtil::add("FriendshipOffered", args, payload);
}
//static
diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp
index 202fbdebd4..3bd4f898c8 100644
--- a/indra/newview/llavatarlist.cpp
+++ b/indra/newview/llavatarlist.cpp
@@ -262,9 +262,18 @@ void LLAvatarList::refresh()
bool dirty = add_limit_exceeded || (have_filter && !have_names);
setDirty(dirty);
- // Refreshed all items, lets send refresh_complete signal.
+ // Refreshed all items.
if(!dirty)
{
+ // Highlight items matching the filter.
+ std::vector<LLPanel*> items;
+ getItems(items);
+ for( std::vector<LLPanel*>::const_iterator it = items.begin(); it != items.end(); it++)
+ {
+ static_cast<LLAvatarListItem*>(*it)->setHighlight(mNameFilter);
+ }
+
+ // Send refresh_complete signal.
std::vector<LLSD> cur_values;
getValues(cur_values);
mRefreshCompleteSignal(this, LLSD((S32)cur_values.size()));
diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp
index 59ed391c06..072eebdf2d 100644
--- a/indra/newview/llavatarlistitem.cpp
+++ b/indra/newview/llavatarlistitem.cpp
@@ -40,6 +40,7 @@
#include "llagent.h"
#include "lloutputmonitorctrl.h"
#include "llavatariconctrl.h"
+#include "lltextutil.h"
#include "llbutton.h"
LLAvatarListItem::LLAvatarListItem(bool not_from_ui_factory/* = true*/)
@@ -155,13 +156,8 @@ void LLAvatarListItem::setOnline(bool online)
mOnlineStatus = (EOnlineStatus) online;
// Change avatar name font style depending on the new online status.
- LLStyle::Params style_params;
- style_params.color = online ? LLColor4::white : LLColor4::grey;
-
- // Rebuild the text to change its style.
- std::string text = mAvatarName->getText();
- mAvatarName->setText(LLStringUtil::null);
- mAvatarName->appendText(text, false, style_params);
+ mAvatarNameStyle.color = online ? LLColor4::white : LLColor4::grey;
+ setNameInternal(mAvatarName->getText(), mHighlihtSubstring);
// Make the icon fade if the avatar goes offline.
mAvatarIcon->setColor(online ? LLColor4::white : LLColor4::smoke);
@@ -169,8 +165,12 @@ void LLAvatarListItem::setOnline(bool online)
void LLAvatarListItem::setName(const std::string& name)
{
- mAvatarName->setValue(name);
- mAvatarName->setToolTip(name);
+ setNameInternal(name, mHighlihtSubstring);
+}
+
+void LLAvatarListItem::setHighlight(const std::string& highlight)
+{
+ setNameInternal(mAvatarName->getText(), mHighlihtSubstring = highlight);
}
void LLAvatarListItem::setAvatarId(const LLUUID& id, bool ignore_status_changes)
@@ -310,11 +310,18 @@ const std::string LLAvatarListItem::getAvatarName() const
return mAvatarName->getValue();
}
+//== PRIVATE SECITON ==========================================================
+
+void LLAvatarListItem::setNameInternal(const std::string& name, const std::string& highlight)
+{
+ LLTextUtil::textboxSetHighlightedVal(mAvatarName, mAvatarNameStyle, name, highlight);
+ mAvatarName->setToolTip(name);
+}
+
void LLAvatarListItem::onNameCache(const std::string& first_name, const std::string& last_name)
{
std::string name = first_name + " " + last_name;
- mAvatarName->setValue(name);
- mAvatarName->setToolTip(name);
+ setName(name);
}
void LLAvatarListItem::reshapeAvatarName()
diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h
index a7b080098d..aa1b7593f5 100644
--- a/indra/newview/llavatarlistitem.h
+++ b/indra/newview/llavatarlistitem.h
@@ -37,6 +37,7 @@
#include "lloutputmonitorctrl.h"
#include "llbutton.h"
#include "lltextbox.h"
+#include "llstyle.h"
#include "llcallingcard.h" // for LLFriendObserver
@@ -71,6 +72,7 @@ public:
void setOnline(bool online);
void setName(const std::string& name);
+ void setHighlight(const std::string& highlight);
void setAvatarId(const LLUUID& id, bool ignore_status_changes = false);
void setLastInteractionTime(U32 secs_since);
//Show/hide profile/info btn, translating speaker indicator and avatar name coordinates accordingly
@@ -112,6 +114,7 @@ private:
E_UNKNOWN,
} EOnlineStatus;
+ void setNameInternal(const std::string& name, const std::string& highlight);
void onNameCache(const std::string& first_name, const std::string& last_name);
std::string formatSeconds(U32 secs);
@@ -119,12 +122,14 @@ private:
LLAvatarIconCtrl* mAvatarIcon;
LLTextBox* mAvatarName;
LLTextBox* mLastInteractionTime;
+ LLStyle::Params mAvatarNameStyle;
LLButton* mInfoBtn;
LLButton* mProfileBtn;
ContextMenu* mContextMenu;
LLUUID mAvatarId;
+ std::string mHighlihtSubstring; // substring to highlight
EOnlineStatus mOnlineStatus;
//Flag indicating that info/profile button shouldn't be shown at all.
//Speaker indicator and avatar name coords are translated accordingly
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp
index 96c06b1665..8c793873f4 100644
--- a/indra/newview/llbottomtray.cpp
+++ b/indra/newview/llbottomtray.cpp
@@ -54,25 +54,24 @@ template class LLBottomTray* LLSingleton<class LLBottomTray>::getInstance();
LLBottomTray::LLBottomTray(const LLSD&)
: mChicletPanel(NULL),
- mSysWell(NULL),
mSpeakPanel(NULL),
mSpeakBtn(NULL),
mNearbyChatBar(NULL),
mToolbarStack(NULL)
, mMovementButton(NULL)
, mResizeState(RS_NORESIZE)
-// Add more members
+, mBottomTrayContextMenu(NULL)
+, mMovementPanel(NULL)
+, mCamPanel(NULL)
+, mSnapshotPanel(NULL)
+, mGesturePanel(NULL)
+, mCamButton(NULL)
{
mFactoryMap["chat_bar"] = LLCallbackMap(LLBottomTray::createNearbyChatBar, NULL);
LLUICtrlFactory::getInstance()->buildPanel(this,"panel_bottomtray.xml");
mChicletPanel = getChild<LLChicletPanel>("chiclet_list");
- mSysWell = getChild<LLNotificationChiclet>("sys_well");
-
- // init mSysWell
- // set handler for a Click operation
- mSysWell->setClickCallback(boost::bind(&LLSysWellWindow::onChicletClick, LLFloaterReg::getTypedInstance<LLSysWellWindow>("syswell_window")));
mChicletPanel->setChicletClickedCallback(boost::bind(&LLBottomTray::onChicletClick,this,_1));
@@ -391,7 +390,7 @@ bool LLBottomTray::onContextMenuItemEnabled(const LLSD& userdata)
}
else if (item == "can_select_all")
{
- return edit_box->canSelectAll();
+ return edit_box->canSelectAll() && (edit_box->getLength()>0);
}
return true;
}
diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h
index 91ec01654b..fa204ee9ea 100644
--- a/indra/newview/llbottomtray.h
+++ b/indra/newview/llbottomtray.h
@@ -66,7 +66,6 @@ public:
BOOL postBuild();
LLChicletPanel* getChicletPanel() {return mChicletPanel;}
- LLNotificationChiclet* getSysWell() {return mSysWell;}
LLNearbyChatBar* getNearbyChatBar() {return mNearbyChatBar;}
void onCommitGesture(LLUICtrl* ctrl);
@@ -189,7 +188,6 @@ protected:
LLIMChiclet* createIMChiclet(const LLUUID& session_id);
LLChicletPanel* mChicletPanel;
- LLNotificationChiclet* mSysWell;
LLPanel* mSpeakPanel;
LLSpeakButton* mSpeakBtn;
LLNearbyChatBar* mNearbyChatBar;
diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp
index ad59c780f3..895b4ed80e 100644
--- a/indra/newview/llcallfloater.cpp
+++ b/indra/newview/llcallfloater.cpp
@@ -127,7 +127,7 @@ void LLCallFloater::onOpen(const LLSD& /*key*/)
void LLCallFloater::leaveCall()
{
LLVoiceChannel* voice_channel = LLVoiceChannel::getCurrentVoiceChannel();
- if (voice_channel && voice_channel->isActive())
+ if (voice_channel)
{
voice_channel->deactivate();
}
diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp
index 94c303a30f..415c118ff1 100644
--- a/indra/newview/llchannelmanager.cpp
+++ b/indra/newview/llchannelmanager.cpp
@@ -129,7 +129,7 @@ void LLChannelManager::onLoginCompleted()
S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth");
mStartUpChannel->init(channel_right_bound - channel_width, channel_right_bound);
- mStartUpChannel->setMouseDownCallback(boost::bind(&LLSysWellWindow::onStartUpToastClick, LLFloaterReg::getTypedInstance<LLSysWellWindow>("syswell_window"), _2, _3, _4));
+ mStartUpChannel->setMouseDownCallback(boost::bind(&LLNotificationWellWindow::onStartUpToastClick, LLNotificationWellWindow::getInstance(), _2, _3, _4));
mStartUpChannel->setCommitCallback(boost::bind(&LLChannelManager::onStartUpToastClose, this));
mStartUpChannel->createStartUpToast(away_notifications, gSavedSettings.getS32("StartUpToastLifeTime"));
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 5e17770314..efe9ea4c35 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -43,6 +43,7 @@
#include "lltrans.h"
#include "llfloaterreg.h"
#include "llmutelist.h"
+#include "llstylemap.h"
#include "llsidetray.h"//for blocked objects panel
@@ -210,6 +211,10 @@ public:
{
icon->setValue(chat.mFromID);
}
+ else if (userName->getValue().asString()==LLTrans::getString("SECOND_LIFE"))
+ {
+ icon->setValue(LLSD("SL_Logo"));
+ }
}
@@ -355,6 +360,7 @@ void LLChatHistory::clear()
{
mLastFromName.clear();
LLTextEditor::clear();
+ mLastFromID = LLUUID::null;
}
void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_chat_history, const LLStyle::Params& input_append_params)
@@ -371,13 +377,25 @@ void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_
style_params.font.size(font_size);
style_params.font.style(input_append_params.font.style);
- std::string header_text = "[" + chat.mTimeStr + "] ";
- if (utf8str_trim(chat.mFromName).size() != 0 && chat.mFromName != SYSTEM_FROM)
- header_text += chat.mFromName + ": ";
-
if (use_plain_text_chat_history)
{
- appendText(header_text, getText().size() != 0, style_params);
+ appendText("[" + chat.mTimeStr + "] ", getText().size() != 0, style_params);
+
+ if (utf8str_trim(chat.mFromName).size() != 0)
+ {
+ // Don't hotlink any messages from the system (e.g. "Second Life:"), so just add those in plain text.
+ if ( chat.mFromName != SYSTEM_FROM && chat.mFromID.notNull() )
+ {
+ LLStyle::Params link_params(style_params);
+ link_params.fillFrom(LLStyleMap::instance().lookupAgent(chat.mFromID));
+ // Convert the name to a hotlink and add to message.
+ appendText(chat.mFromName + ": ", false, link_params);
+ }
+ else
+ {
+ appendText(chat.mFromName + ": ", false, style_params);
+ }
+ }
}
else
{
@@ -389,9 +407,11 @@ void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_
LLDate new_message_time = LLDate::now();
- if (mLastFromName == chat.mFromName &&
- mLastMessageTime.notNull() &&
- (new_message_time.secondsSinceEpoch() - mLastMessageTime.secondsSinceEpoch()) < 60.0 )
+ if (mLastFromName == chat.mFromName
+ && mLastFromID == chat.mFromID
+ && mLastMessageTime.notNull()
+ && (new_message_time.secondsSinceEpoch() - mLastMessageTime.secondsSinceEpoch()) < 60.0
+ )
{
view = getSeparator();
p.top_pad = mTopSeparatorPad;
@@ -417,8 +437,13 @@ void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_
view->reshape(target_rect.getWidth(), view->getRect().getHeight());
view->setOrigin(target_rect.mLeft, view->getRect().mBottom);
+ std::string header_text = "[" + chat.mTimeStr + "] ";
+ if (utf8str_trim(chat.mFromName).size() != 0 && chat.mFromName != SYSTEM_FROM)
+ header_text += chat.mFromName + ": ";
+
appendWidget(p, header_text, false);
mLastFromName = chat.mFromName;
+ mLastFromID = chat.mFromID;
mLastMessageTime = new_message_time;
}
//Handle IRC styled /me messages.
diff --git a/indra/newview/llchathistory.h b/indra/newview/llchathistory.h
index d2cfa53d8b..8ca7dd1d58 100644
--- a/indra/newview/llchathistory.h
+++ b/indra/newview/llchathistory.h
@@ -114,6 +114,7 @@ class LLChatHistory : public LLTextEditor
private:
std::string mLastFromName;
+ LLUUID mLastFromID;
LLDate mLastMessageTime;
std::string mMessageHeaderFilename;
std::string mMessageSeparatorFilename;
diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp
index efdaff3f6a..92df281307 100644
--- a/indra/newview/llchatitemscontainerctrl.cpp
+++ b/indra/newview/llchatitemscontainerctrl.cpp
@@ -122,7 +122,6 @@ void LLNearbyChatToastPanel::addMessage(LLSD& notification)
if(notification["chat_style"].asInteger()== CHAT_STYLE_IRC)
{
- messageText = messageText.substr(3);
style_params.font.style = "ITALIC";
}
else if( chat_type == CHAT_TYPE_SHOUT)
@@ -208,7 +207,6 @@ void LLNearbyChatToastPanel::init(LLSD& notification)
if(notification["chat_style"].asInteger()== CHAT_STYLE_IRC)
{
- messageText = messageText.substr(3);
style_params.font.style = "ITALIC";
}
else if( chat_type == CHAT_TYPE_SHOUT)
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index 588855d088..4b3b7a99d8 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -55,6 +55,7 @@
#include "lltransientfloatermgr.h"
static LLDefaultChildRegistry::Register<LLChicletPanel> t1("chiclet_panel");
+static LLDefaultChildRegistry::Register<LLIMWellChiclet> t2_0("chiclet_im_well");
static LLDefaultChildRegistry::Register<LLNotificationChiclet> t2("chiclet_notification");
static LLDefaultChildRegistry::Register<LLIMP2PChiclet> t3("chiclet_im_p2p");
static LLDefaultChildRegistry::Register<LLIMGroupChiclet> t4("chiclet_im_group");
@@ -69,7 +70,6 @@ static const S32 OVERLAY_ICON_SHIFT = 2; // used for shifting of an overlay icon
// static
const S32 LLChicletPanel::s_scroll_ratio = 10;
-S32 LLNotificationChiclet::mUreadSystemNotifications = 0;
boost::signals2::signal<LLChiclet* (const LLUUID&),
LLIMChiclet::CollectChicletCombiner<std::list<LLChiclet*> > >
@@ -78,7 +78,7 @@ boost::signals2::signal<LLChiclet* (const LLUUID&),
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
-LLNotificationChiclet::Params::Params()
+LLSysWellChiclet::Params::Params()
: button("button")
, unread_notifications("unread_notifications")
{
@@ -88,7 +88,7 @@ LLNotificationChiclet::Params::Params()
}
-LLNotificationChiclet::LLNotificationChiclet(const Params& p)
+LLSysWellChiclet::LLSysWellChiclet(const Params& p)
: LLChiclet(p)
, mButton(NULL)
, mCounter(0)
@@ -96,30 +96,14 @@ LLNotificationChiclet::LLNotificationChiclet(const Params& p)
LLButton::Params button_params = p.button;
mButton = LLUICtrlFactory::create<LLButton>(button_params);
addChild(mButton);
-
- // connect counter handlers to the signals
- connectCounterUpdatersToSignal("notify");
- connectCounterUpdatersToSignal("groupnotify");
- connectCounterUpdatersToSignal("offer");
}
-LLNotificationChiclet::~LLNotificationChiclet()
+LLSysWellChiclet::~LLSysWellChiclet()
{
}
-void LLNotificationChiclet::connectCounterUpdatersToSignal(std::string notification_type)
-{
- LLNotificationsUI::LLNotificationManager* manager = LLNotificationsUI::LLNotificationManager::getInstance();
- LLNotificationsUI::LLEventHandler* n_handler = manager->getHandlerForNotification(notification_type);
- if(n_handler)
- {
- n_handler->setNewNotificationCallback(boost::bind(&LLNotificationChiclet::incUreadSystemNotifications, this));
- n_handler->setDelNotification(boost::bind(&LLNotificationChiclet::decUreadSystemNotifications, this));
- }
-}
-
-void LLNotificationChiclet::setCounter(S32 counter)
+void LLSysWellChiclet::setCounter(S32 counter)
{
std::string s_count;
if(counter != 0)
@@ -132,16 +116,64 @@ void LLNotificationChiclet::setCounter(S32 counter)
mCounter = counter;
}
-boost::signals2::connection LLNotificationChiclet::setClickCallback(
+boost::signals2::connection LLSysWellChiclet::setClickCallback(
const commit_callback_t& cb)
{
return mButton->setClickedCallback(cb);
}
-void LLNotificationChiclet::setToggleState(BOOL toggled) {
+void LLSysWellChiclet::setToggleState(BOOL toggled) {
mButton->setToggleState(toggled);
}
+
+/************************************************************************/
+/* LLIMWellChiclet implementation */
+/************************************************************************/
+LLIMWellChiclet::LLIMWellChiclet(const Params& p)
+: LLSysWellChiclet(p)
+{
+ LLIMModel::instance().addNewMsgCallback(boost::bind(&LLIMWellChiclet::messageCountChanged, this, _1));
+ LLIMModel::instance().addNoUnreadMsgsCallback(boost::bind(&LLIMWellChiclet::messageCountChanged, this, _1));
+
+ LLIMMgr::getInstance()->addSessionObserver(this);
+}
+
+LLIMWellChiclet::~LLIMWellChiclet()
+{
+ LLIMMgr::getInstance()->removeSessionObserver(this);
+}
+
+void LLIMWellChiclet::messageCountChanged(const LLSD& session_data)
+{
+ S32 total_unread = LLIMMgr::instance().getNumberOfUnreadParticipantMessages();
+ setCounter(total_unread);
+}
+
+/************************************************************************/
+/* LLNotificationChiclet implementation */
+/************************************************************************/
+LLNotificationChiclet::LLNotificationChiclet(const Params& p)
+: LLSysWellChiclet(p)
+, mUreadSystemNotifications(0)
+{
+ // connect counter handlers to the signals
+ connectCounterUpdatersToSignal("notify");
+ connectCounterUpdatersToSignal("groupnotify");
+ connectCounterUpdatersToSignal("offer");
+}
+
+void LLNotificationChiclet::connectCounterUpdatersToSignal(const std::string& notification_type)
+{
+ LLNotificationsUI::LLNotificationManager* manager = LLNotificationsUI::LLNotificationManager::getInstance();
+ LLNotificationsUI::LLEventHandler* n_handler = manager->getHandlerForNotification(notification_type);
+ if(n_handler)
+ {
+ n_handler->setNewNotificationCallback(boost::bind(&LLNotificationChiclet::incUreadSystemNotifications, this));
+ n_handler->setDelNotification(boost::bind(&LLNotificationChiclet::decUreadSystemNotifications, this));
+ }
+}
+
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
@@ -395,6 +427,10 @@ LLIMP2PChiclet::LLIMP2PChiclet(const Params& p)
sendChildToFront(mNewMessagesIcon);
setShowSpeaker(p.show_speaker);
+
+ //since mShowSpeaker initialized with false
+ //setShowSpeaker(false) will not hide mSpeakerCtrl
+ mSpeakerCtrl->setVisible(getShowSpeaker());
}
void LLIMP2PChiclet::setCounter(S32 counter)
@@ -880,16 +916,7 @@ LLChicletPanel::~LLChicletPanel()
void im_chiclet_callback(LLChicletPanel* panel, const LLSD& data){
LLUUID session_id = data["session_id"].asUUID();
- LLUUID from_id = data["from_id"].asUUID();
- const std::string from = data["from"].asString();
- S32 unread = data["num_unread"].asInteger();
-
- // if new message came
- if(unread != 0)
- {
- //we do not show balloon (indicator of new messages) for system messages and our own messages
- if (from_id.isNull() || from_id == gAgentID || SYSTEM_FROM == from) return;
- }
+ S32 unread = data["participant_unread"].asInteger();
LLIMFloater* im_floater = LLIMFloater::findInstance(session_id);
if (im_floater && im_floater->getVisible())
diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h
index c75ad2b546..609ce16713 100644
--- a/indra/newview/llchiclet.h
+++ b/indra/newview/llchiclet.h
@@ -39,6 +39,7 @@
#include "lltextbox.h"
#include "lloutputmonitorctrl.h"
#include "llgroupmgr.h"
+#include "llimview.h"
class LLVoiceControlPanel;
class LLMenuGL;
@@ -746,7 +747,7 @@ private:
* Implements notification chiclet. Used to display total amount of unread messages
* across all IM sessions, total amount of system notifications.
*/
-class LLNotificationChiclet : public LLChiclet
+class LLSysWellChiclet : public LLChiclet
{
public:
@@ -768,28 +769,68 @@ public:
boost::signals2::connection setClickCallback(const commit_callback_t& cb);
- /*virtual*/ ~LLNotificationChiclet();
+ /*virtual*/ ~LLSysWellChiclet();
- // methods for updating a number of unread System notifications
- void incUreadSystemNotifications() { setCounter(++mUreadSystemNotifications); }
- void decUreadSystemNotifications() { setCounter(--mUreadSystemNotifications); }
void setToggleState(BOOL toggled);
protected:
- // connect counter updaters to the corresponding signals
- void connectCounterUpdatersToSignal(std::string notification_type);
- LLNotificationChiclet(const Params& p);
+ LLSysWellChiclet(const Params& p);
friend class LLUICtrlFactory;
- static S32 mUreadSystemNotifications;
-
protected:
LLButton* mButton;
S32 mCounter;
};
/**
+ * Class represented a chiclet for IM Well Icon.
+ *
+ * It displays a count of unread messages from other participants in all IM sessions.
+ */
+class LLIMWellChiclet : public LLSysWellChiclet, LLIMSessionObserver
+{
+ friend class LLUICtrlFactory;
+public:
+ virtual void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) {}
+ virtual void sessionRemoved(const LLUUID& session_id) { messageCountChanged(LLSD()); }
+ virtual void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id) {}
+
+ ~LLIMWellChiclet();
+protected:
+ LLIMWellChiclet(const Params& p);
+
+ /**
+ * Handles changes in a session (message was added, messages were read, etc.)
+ *
+ * It get total count of unread messages from a LLIMMgr in all opened sessions and display it.
+ *
+ * @param[in] session_data contains session related data, is not used now
+ * ["session_id"] - id of an appropriate session
+ * ["participant_unread"] - count of unread messages from "real" participants.
+ *
+ * @see LLIMMgr::getNumberOfUnreadParticipantMessages()
+ */
+ void messageCountChanged(const LLSD& session_data);
+};
+
+class LLNotificationChiclet : public LLSysWellChiclet
+{
+ friend class LLUICtrlFactory;
+protected:
+ LLNotificationChiclet(const Params& p);
+
+ // connect counter updaters to the corresponding signals
+ void connectCounterUpdatersToSignal(const std::string& notification_type);
+
+ // methods for updating a number of unread System notifications
+ void incUreadSystemNotifications() { setCounter(++mUreadSystemNotifications); }
+ void decUreadSystemNotifications() { setCounter(--mUreadSystemNotifications); }
+
+ S32 mUreadSystemNotifications;
+};
+
+/**
* Storage class for all IM chiclets. Provides mechanism to display,
* scroll, create, remove chiclets.
*/
diff --git a/indra/newview/llcurrencyuimanager.cpp b/indra/newview/llcurrencyuimanager.cpp
index 544711a862..00c05445e1 100644
--- a/indra/newview/llcurrencyuimanager.cpp
+++ b/indra/newview/llcurrencyuimanager.cpp
@@ -36,7 +36,7 @@
#include "lltextbox.h"
#include "lllineeditor.h"
#include "llviewercontrol.h"
-#include "llversionviewer.h"
+#include "llversioninfo.h"
#include "llcurrencyuimanager.h"
@@ -170,10 +170,10 @@ void LLCurrencyUIManager::Impl::updateCurrencyInfo()
gAgent.getSecureSessionID().asString());
keywordArgs.appendInt("currencyBuy", mUserCurrencyBuy);
keywordArgs.appendString("viewerChannel", gSavedSettings.getString("VersionChannelName"));
- keywordArgs.appendInt("viewerMajorVersion", LL_VERSION_MAJOR);
- keywordArgs.appendInt("viewerMinorVersion", LL_VERSION_MINOR);
- keywordArgs.appendInt("viewerPatchVersion", LL_VERSION_PATCH);
- keywordArgs.appendInt("viewerBuildVersion", LL_VERSION_BUILD);
+ keywordArgs.appendInt("viewerMajorVersion", LLVersionInfo::getMajor());
+ keywordArgs.appendInt("viewerMinorVersion", LLVersionInfo::getMinor());
+ keywordArgs.appendInt("viewerPatchVersion", LLVersionInfo::getPatch());
+ keywordArgs.appendInt("viewerBuildVersion", LLVersionInfo::getBuild());
LLXMLRPCValue params = LLXMLRPCValue::createArray();
params.append(keywordArgs);
@@ -244,10 +244,10 @@ void LLCurrencyUIManager::Impl::startCurrencyBuy(const std::string& password)
keywordArgs.appendString("password", password);
}
keywordArgs.appendString("viewerChannel", gSavedSettings.getString("VersionChannelName"));
- keywordArgs.appendInt("viewerMajorVersion", LL_VERSION_MAJOR);
- keywordArgs.appendInt("viewerMinorVersion", LL_VERSION_MINOR);
- keywordArgs.appendInt("viewerPatchVersion", LL_VERSION_PATCH);
- keywordArgs.appendInt("viewerBuildVersion", LL_VERSION_BUILD);
+ keywordArgs.appendInt("viewerMajorVersion", LLVersionInfo::getMajor());
+ keywordArgs.appendInt("viewerMinorVersion", LLVersionInfo::getMinor());
+ keywordArgs.appendInt("viewerPatchVersion", LLVersionInfo::getPatch());
+ keywordArgs.appendInt("viewerBuildVersion", LLVersionInfo::getBuild());
LLXMLRPCValue params = LLXMLRPCValue::createArray();
params.append(keywordArgs);
diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp
index 68fc69b4f7..e80499688e 100644
--- a/indra/newview/llfloaterabout.cpp
+++ b/indra/newview/llfloaterabout.cpp
@@ -45,8 +45,7 @@
#include "llviewercontrol.h"
#include "llviewerstats.h"
#include "llviewerregion.h"
-#include "llversionviewer.h"
-#include "llviewerbuild.h"
+#include "llversioninfo.h"
#include "llweb.h"
// Linden library includes
@@ -212,15 +211,12 @@ LLSD LLFloaterAbout::getInfo()
// LLFloaterAbout.
LLSD info;
LLSD version;
- version.append(LL_VERSION_MAJOR);
- version.append(LL_VERSION_MINOR);
- version.append(LL_VERSION_PATCH);
- version.append(LL_VERSION_BUILD);
+ version.append(LLVersionInfo::getMajor());
+ version.append(LLVersionInfo::getMinor());
+ version.append(LLVersionInfo::getPatch());
+ version.append(LLVersionInfo::getBuild());
info["VIEWER_VERSION"] = version;
- info["VIEWER_VERSION_STR"] = STRINGIZE(version[0].asInteger() << '.' <<
- version[1].asInteger() << '.' <<
- version[2].asInteger() << '.' <<
- version[3].asInteger());
+ info["VIEWER_VERSION_STR"] = LLVersionInfo::getVersion();
info["BUILD_DATE"] = __DATE__;
info["BUILD_TIME"] = __TIME__;
info["CHANNEL"] = gSavedSettings.getString("VersionChannelName");
@@ -286,15 +282,9 @@ LLSD LLFloaterAbout::getInfo()
static std::string get_viewer_release_notes_url()
{
- std::ostringstream version;
- version << LL_VERSION_MAJOR << "."
- << LL_VERSION_MINOR << "."
- << LL_VERSION_PATCH << "."
- << LL_VERSION_BUILD;
-
LLSD query;
query["channel"] = gSavedSettings.getString("VersionChannelName");
- query["version"] = version.str();
+ query["version"] = LLVersionInfo::getVersion();
std::ostringstream url;
url << LLTrans::getString("RELEASE_NOTES_BASE_URL") << LLURI::mapToQueryString(query);
diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp
index 07bb6f832b..6e3d5499a2 100644
--- a/indra/newview/llfloateravatarpicker.cpp
+++ b/indra/newview/llfloateravatarpicker.cpp
@@ -140,9 +140,14 @@ BOOL LLFloaterAvatarPicker::postBuild()
return TRUE;
}
+void LLFloaterAvatarPicker::setOkBtnEnableCb(validate_callback_t cb)
+{
+ mOkButtonValidateSignal.connect(cb);
+}
+
void LLFloaterAvatarPicker::onTabChanged()
{
- childSetEnabled("ok_btn", visibleItemsSelected());
+ childSetEnabled("ok_btn", isSelectBtnEnabled());
}
// Destroys the object
@@ -175,6 +180,10 @@ void LLFloaterAvatarPicker::onBtnSelect(void* userdata)
{
LLFloaterAvatarPicker* self = (LLFloaterAvatarPicker*)userdata;
+ // If select btn not enabled then do not callback
+ if (!self || !self->isSelectBtnEnabled())
+ return;
+
if(self->mCallback)
{
std::string acvtive_panel_name;
@@ -244,7 +253,7 @@ void LLFloaterAvatarPicker::onList(LLUICtrl* ctrl, void* userdata)
LLFloaterAvatarPicker* self = (LLFloaterAvatarPicker*)userdata;
if (self)
{
- self->childSetEnabled("ok_btn", self->visibleItemsSelected());
+ self->childSetEnabled("ok_btn", self->isSelectBtnEnabled());
}
}
@@ -477,3 +486,43 @@ BOOL LLFloaterAvatarPicker::handleKeyHere(KEY key, MASK mask)
return LLFloater::handleKeyHere(key, mask);
}
+
+bool LLFloaterAvatarPicker::isSelectBtnEnabled()
+{
+ bool ret_val = visibleItemsSelected();
+
+ if ( ret_val && mOkButtonValidateSignal.num_slots() )
+ {
+ std::string acvtive_panel_name;
+ LLScrollListCtrl* list = NULL;
+ LLPanel* active_panel = childGetVisibleTab("ResidentChooserTabs");
+
+ if(active_panel)
+ {
+ acvtive_panel_name = active_panel->getName();
+ }
+
+ if(acvtive_panel_name == "SearchPanel")
+ {
+ list = getChild<LLScrollListCtrl>("SearchResults");
+ }
+ else if(acvtive_panel_name == "NearMePanel")
+ {
+ list = getChild<LLScrollListCtrl>("NearMe");
+ }
+ else if (acvtive_panel_name == "FriendsPanel")
+ {
+ list = getChild<LLScrollListCtrl>("Friends");
+ }
+
+ if(list)
+ {
+ std::vector<LLUUID> avatar_ids;
+ std::vector<std::string> avatar_names;
+ getSelectedAvatarData(list, avatar_names, avatar_ids);
+ return mOkButtonValidateSignal(avatar_ids);
+ }
+ }
+
+ return ret_val;
+}
diff --git a/indra/newview/llfloateravatarpicker.h b/indra/newview/llfloateravatarpicker.h
index b8ace985d9..13e491834e 100644
--- a/indra/newview/llfloateravatarpicker.h
+++ b/indra/newview/llfloateravatarpicker.h
@@ -40,6 +40,9 @@
class LLFloaterAvatarPicker : public LLFloater
{
public:
+ typedef boost::signals2::signal<bool(const std::vector<LLUUID>&), boost_boolean_combiner> validate_signal_t;
+ typedef validate_signal_t::slot_type validate_callback_t;
+
// Call this to select an avatar.
// The callback function will be called with an avatar name and UUID.
typedef void(*callback_t)(const std::vector<std::string>&, const std::vector<LLUUID>&, void*);
@@ -53,6 +56,8 @@ public:
virtual BOOL postBuild();
+ void setOkBtnEnableCb(validate_callback_t cb);
+
static void processAvatarPickerReply(class LLMessageSystem* msg, void**);
private:
@@ -65,7 +70,8 @@ private:
static void onBtnClose(void* userdata);
static void onList(class LLUICtrl* ctrl, void* userdata);
void onTabChanged();
-
+ bool isSelectBtnEnabled();
+
void populateNearMe();
void populateFriend();
BOOL visibleItemsSelected() const; // Returns true if any items in the current tab are selected.
@@ -83,6 +89,7 @@ private:
void (*mCallback)(const std::vector<std::string>& name, const std::vector<LLUUID>& id, void* userdata);
void* mCallbackUserdata;
+ validate_signal_t mOkButtonValidateSignal;
};
#endif
diff --git a/indra/newview/llfloaterinventory.cpp b/indra/newview/llfloaterinventory.cpp
index 4a2e1913cd..76c0a7637c 100644
--- a/indra/newview/llfloaterinventory.cpp
+++ b/indra/newview/llfloaterinventory.cpp
@@ -120,28 +120,6 @@ LLFloaterInventory* LLFloaterInventory::showAgentInventory()
}
// static
-LLFloaterInventory* LLFloaterInventory::getActiveInventory()
-{
- LLFloaterInventory* res = NULL;
- LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("inventory");
- S32 z_min = S32_MAX;
- for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end(); ++iter)
- {
- LLFloaterInventory* iv = dynamic_cast<LLFloaterInventory*>(*iter);
- if (iv)
- {
- S32 z_order = gFloaterView->getZOrder(iv);
- if (z_order < z_min)
- {
- res = iv;
- z_min = z_order;
- }
- }
- }
- return res;
-}
-
-// static
void LLFloaterInventory::cleanup()
{
LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("inventory");
diff --git a/indra/newview/llfloaterinventory.h b/indra/newview/llfloaterinventory.h
index c0de89bff2..b661c391a7 100644
--- a/indra/newview/llfloaterinventory.h
+++ b/indra/newview/llfloaterinventory.h
@@ -55,11 +55,6 @@ public:
BOOL postBuild();
- // Return the active inventory view if there is one. Active is
- // defined as the inventory that is the closest to the front, and
- // is visible.
- static LLFloaterInventory* getActiveInventory();
-
// This method makes sure that an inventory view exists, is
// visible, and has focus. The view chosen is returned.
static LLFloaterInventory* showAgentInventory();
diff --git a/indra/newview/llfloateropenobject.cpp b/indra/newview/llfloateropenobject.cpp
index 6caa0d60f9..56a86c2cb7 100644
--- a/indra/newview/llfloateropenobject.cpp
+++ b/indra/newview/llfloateropenobject.cpp
@@ -195,10 +195,10 @@ void LLFloaterOpenObject::callbackMoveInventory(S32 result, void* data)
if (result == 0)
{
LLFloaterInventory::showAgentInventory();
- LLFloaterInventory* view = LLFloaterInventory::getActiveInventory();
- if (view)
+ LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel();
+ if (active_panel)
{
- view->getPanel()->setSelection(cat->mCatID, TAKE_FOCUS_NO);
+ active_panel->setSelection(cat->mCatID, TAKE_FOCUS_NO);
}
}
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 1c1f27a259..ab27375b87 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -251,7 +251,7 @@ bool callback_skip_dialogs(const LLSD& notification, const LLSD& response, LLFlo
{
floater->setAllIgnored();
LLFirstUse::disableFirstUse();
- LLFloaterPreference::buildLists(floater);
+ floater->buildPopupLists();
}
}
return false;
@@ -266,7 +266,7 @@ bool callback_reset_dialogs(const LLSD& notification, const LLSD& response, LLFl
{
floater->resetAllIgnored();
LLFirstUse::resetFirstUse();
- LLFloaterPreference::buildLists(floater);
+ floater->buildPopupLists();
}
}
return false;
@@ -391,6 +391,7 @@ LLFloaterPreference::~LLFloaterPreference()
ctrl_window_size->setCurrentByIndex(i);
}
}
+
void LLFloaterPreference::draw()
{
BOOL has_first_selected = (getChildRef<LLScrollListCtrl>("disabled_popups").getFirstSelected()!=NULL);
@@ -548,17 +549,17 @@ void LLFloaterPreference::cancel()
void LLFloaterPreference::onOpen(const LLSD& key)
{
gAgent.sendAgentUserInfoRequest();
+
/////////////////////////// From LLPanelGeneral //////////////////////////
// if we have no agent, we can't let them choose anything
// if we have an agent, then we only let them choose if they have a choice
- bool canChoose = gAgent.getID().notNull() &&
- (gAgent.isMature() || gAgent.isGodlike());
+ bool can_choose_maturity =
+ gAgent.getID().notNull() && (gAgent.isMature() || gAgent.isGodlike());
LLComboBox* maturity_combo = getChild<LLComboBox>("maturity_desired_combobox");
- if (canChoose)
- {
-
+ if (can_choose_maturity)
+ {
// if they're not adult or a god, they shouldn't see the adult selection, so delete it
if (!gAgent.isAdult() && !gAgent.isGodlike())
{
@@ -568,8 +569,7 @@ void LLFloaterPreference::onOpen(const LLSD& key)
maturity_combo->remove(0);
}
childSetVisible("maturity_desired_combobox", true);
- childSetVisible("maturity_desired_textbox", false);
-
+ childSetVisible("maturity_desired_textbox", false);
}
else
{
@@ -577,6 +577,10 @@ void LLFloaterPreference::onOpen(const LLSD& key)
childSetVisible("maturity_desired_combobox", false);
}
+ // Enabled/disabled popups, might have been changed by user actions
+ // while preferences floater was closed.
+ buildPopupLists();
+
LLPanelLogin::setAlwaysRefresh(true);
refresh();
@@ -717,14 +721,6 @@ void LLFloaterPreference::updateMeterText(LLUICtrl* ctrl)
m1->setVisible(two_digits);
m2->setVisible(!two_digits);
}
-/*
-void LLFloaterPreference::onClickClearCache()
-{
- // flag client cache for clearing next time the client runs
- gSavedSettings.setBOOL("PurgeCacheOnNextStartup", TRUE);
- LLNotificationsUtil::add("CacheWillClear");
-}
-*/
void LLFloaterPreference::onClickBrowserClearCache()
{
@@ -794,12 +790,13 @@ void LLFloaterPreference::refreshSkin(void* data)
self->getChild<LLRadioGroup>("skin_selection", true)->setValue(sSkin);
}
-// static
-void LLFloaterPreference::buildLists(void* data)
+
+void LLFloaterPreference::buildPopupLists()
{
- LLPanel*self = (LLPanel*)data;
- LLScrollListCtrl& disabled_popups = self->getChildRef<LLScrollListCtrl>("disabled_popups");
- LLScrollListCtrl& enabled_popups = self->getChildRef<LLScrollListCtrl>("enabled_popups");
+ LLScrollListCtrl& disabled_popups =
+ getChildRef<LLScrollListCtrl>("disabled_popups");
+ LLScrollListCtrl& enabled_popups =
+ getChildRef<LLScrollListCtrl>("enabled_popups");
disabled_popups.deleteAllItems();
enabled_popups.deleteAllItems();
@@ -861,8 +858,7 @@ void LLFloaterPreference::buildLists(void* data)
}
void LLFloaterPreference::refreshEnabledState()
-{
-
+{
LLCheckBoxCtrl* ctrl_reflections = getChild<LLCheckBoxCtrl>("Reflections");
LLRadioGroup* radio_reflection_detail = getChild<LLRadioGroup>("ReflectionDetailRadio");
@@ -1111,7 +1107,7 @@ void LLFloaterPreference::onClickEnablePopup()
LLUI::sSettingGroups["ignores"]->setBOOL(notification_name, TRUE);
}
- buildLists(this);
+ buildPopupLists();
}
void LLFloaterPreference::onClickDisablePopup()
@@ -1128,8 +1124,9 @@ void LLFloaterPreference::onClickDisablePopup()
LLUI::sSettingGroups["ignores"]->setBOOL(notification_name, FALSE);
}
- buildLists(this);
+ buildPopupLists();
}
+
void LLFloaterPreference::resetAllIgnored()
{
for (LLNotifications::TemplateMap::const_iterator iter = LLNotifications::instance().templatesBegin();
@@ -1428,17 +1425,11 @@ BOOL LLPanelPreference::postBuild()
}
}
- ////////////////////////Panel Popups/////////////////
- if(hasChild("disabled_popups") && hasChild("enabled_popups"))
- {
- LLFloaterPreference::buildLists(this);
- }
- //////
+
if(hasChild("online_visibility") && hasChild("send_im_to_email"))
{
childSetText("email_address",getString("log_in_to_change") );
-// childSetText("busy_response", getString("log_in_to_change"));
-
+// childSetText("busy_response", getString("log_in_to_change"));
}
@@ -1573,8 +1564,7 @@ void LLPanelPreference::saveSettings()
{
view_stack.push_back(*iter);
}
- }
-
+ }
}
void LLPanelPreference::cancel()
@@ -1607,4 +1597,3 @@ void LLPanelPreference::setControlFalse(const LLSD& user_data)
if (control)
control->set(LLSD(FALSE));
}
-
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index a30422564a..d292f3bb7b 100644
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -85,7 +85,6 @@ protected:
void onBtnCancel();
void onBtnApply();
-// void onClickClearCache();
void onClickBrowserClearCache();
// if the custom settings box is clicked
@@ -141,7 +140,7 @@ public:
static void initWindowSizeControls(LLPanel* panelp);
- static void buildLists(void* data);
+ void buildPopupLists();
static void refreshSkin(void* data);
static void cleanupBadSetting();
static F32 sAspectRatio;
@@ -153,7 +152,6 @@ private:
bool mOriginalHideOnlineStatus;
std::string mDirectoryVisibility;
-
};
class LLPanelPreference : public LLPanel
diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp
index 1f3bd50d5b..408303a1e0 100644
--- a/indra/newview/llfloaterreporter.cpp
+++ b/indra/newview/llfloaterreporter.cpp
@@ -45,7 +45,6 @@
#include "llnotificationsutil.h"
#include "llstring.h"
#include "llsys.h"
-#include "llversionviewer.h"
#include "message.h"
#include "v3math.h"
@@ -76,7 +75,7 @@
#include "llfloateravatarpicker.h"
#include "lldir.h"
#include "llselectmgr.h"
-#include "llviewerbuild.h"
+#include "llversioninfo.h"
#include "lluictrlfactory.h"
#include "llviewernetwork.h"
@@ -609,10 +608,7 @@ LLSD LLFloaterReporter::gatherReport()
std::ostringstream details;
- details << "V" << LL_VERSION_MAJOR << "." // client version moved to body of email for abuse reports
- << LL_VERSION_MINOR << "."
- << LL_VERSION_PATCH << "."
- << LL_VIEWER_BUILD << std::endl << std::endl;
+ details << "V" << LLVersionInfo::getVersion() << std::endl << std::endl; // client version moved to body of email for abuse reports
std::string object_name = childGetText("object_name");
if (!object_name.empty() && !mOwnerName.empty())
@@ -629,10 +625,8 @@ LLSD LLFloaterReporter::gatherReport()
std::string version_string;
version_string = llformat(
- "%d.%d.%d %s %s %s %s",
- LL_VERSION_MAJOR,
- LL_VERSION_MINOR,
- LL_VERSION_PATCH,
+ "%s %s %s %s %s",
+ LLVersionInfo::getShortVersion().c_str(),
platform,
gSysCPU.getFamily().c_str(),
gGLManager.mGLRenderer.c_str(),
diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp
index 4d3724a758..2c618263ec 100644
--- a/indra/newview/llfloatersearch.cpp
+++ b/indra/newview/llfloatersearch.cpp
@@ -144,6 +144,10 @@ void LLFloaterSearch::search(const LLSD &key)
// add the current localization information
url += "&lang=" + LLUI::getLanguage();
+ // add the user's god status
+ std::string godlike = gAgent.isGodlike() ? "1" : "0";
+ url += "&g=" + godlike;
+
// and load the URL in the web view
mBrowser->navigateTo(url);
}
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 6a3462f201..4e77b42187 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -2208,9 +2208,9 @@ void LLFolderView::setFilterPermMask( PermissionMask filter_perm_mask )
mFilter->setFilterPermissions(filter_perm_mask);
}
-U32 LLFolderView::getFilterTypes() const
+U32 LLFolderView::getFilterObjectTypes() const
{
- return mFilter->getFilterTypes();
+ return mFilter->getFilterObjectTypes();
}
PermissionMask LLFolderView::getFilterPermissions() const
diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h
index eaaba8c13d..4adf6c2fbf 100644
--- a/indra/newview/llfolderview.h
+++ b/indra/newview/llfolderview.h
@@ -71,9 +71,6 @@ class LLUICtrl;
// that only work folders or only work on items, but I'll worry about
// that later when it's determined to be too slow.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-
-
class LLFolderViewFunctor
{
public:
@@ -119,7 +116,7 @@ public:
// filter is never null
LLInventoryFilter* getFilter();
const std::string getFilterSubString(BOOL trim = FALSE);
- U32 getFilterTypes() const;
+ U32 getFilterObjectTypes() const;
PermissionMask getFilterPermissions() const;
// JAMESDEBUG use getFilter()->getShowFolderState();
//LLInventoryFilter::EFolderShow getShowFolderState();
diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp
index 63511301b3..5bef306485 100644
--- a/indra/newview/llfolderviewitem.cpp
+++ b/indra/newview/llfolderviewitem.cpp
@@ -62,6 +62,7 @@ const F32 LLFolderViewItem::FOLDER_OPEN_TIME_CONSTANT = 0.03f;
const LLColor4U DEFAULT_WHITE(255, 255, 255);
+
//static
LLFontGL* LLFolderViewItem::getLabelFontForStyle(U8 style)
{
@@ -387,7 +388,9 @@ BOOL LLFolderViewItem::addToFolder(LLFolderViewFolder* folder, LLFolderView* roo
// makes sure that this view and it's children are the right size.
S32 LLFolderViewItem::arrange( S32* width, S32* height, S32 filter_generation)
{
- mIndentation = getParentFolder() && getParentFolder()->getParentFolder()
+ mIndentation = (getParentFolder()
+ && getParentFolder()->getParentFolder()
+ && getParentFolder()->getParentFolder()->getParentFolder())
? mParentFolder->getIndentation() + LEFT_INDENTATION
: 0;
if (mLabelWidthDirty)
@@ -735,15 +738,6 @@ BOOL LLFolderViewItem::handleDoubleClick( S32 x, S32 y, MASK mask )
return TRUE;
}
-BOOL LLFolderViewItem::handleScrollWheel(S32 x, S32 y, S32 clicks)
-{
- if (getParent())
- {
- return getParent()->handleScrollWheel(x, y, clicks);
- }
- return FALSE;
-}
-
BOOL LLFolderViewItem::handleMouseUp( S32 x, S32 y, MASK mask )
{
if (LLView::childrenHandleMouseUp(x, y, mask))
@@ -2153,12 +2147,6 @@ BOOL LLFolderViewFolder::handleHover(S32 x, S32 y, MASK mask)
handled = LLFolderViewItem::handleHover(x, y, mask);
}
- //if(x < LEFT_INDENTATION + mIndentation && x > mIndentation - LEFT_PAD && y > getRect().getHeight() - )
- //{
- // gViewerWindow->setCursor(UI_CURSOR_ARROW);
- // mExpanderHighlighted = TRUE;
- // handled = TRUE;
- //}
return handled;
}
@@ -2171,7 +2159,7 @@ BOOL LLFolderViewFolder::handleMouseDown( S32 x, S32 y, MASK mask )
}
if( !handled )
{
- if(x < LEFT_INDENTATION + mIndentation && x > mIndentation - LEFT_PAD)
+ if(mIndentation < x && x < mIndentation + ARROW_SIZE + TEXT_PAD)
{
toggleOpen();
handled = TRUE;
@@ -2205,7 +2193,7 @@ BOOL LLFolderViewFolder::handleDoubleClick( S32 x, S32 y, MASK mask )
}
if( !handled )
{
- if(x < LEFT_INDENTATION + mIndentation && x > mIndentation - LEFT_PAD)
+ if(mIndentation < x && x < mIndentation + ARROW_SIZE + TEXT_PAD)
{
// don't select when user double-clicks plus sign
// so as not to contradict single-click behavior
diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h
index f6264ec968..0ea031108b 100644
--- a/indra/newview/llfolderviewitem.h
+++ b/indra/newview/llfolderviewitem.h
@@ -110,7 +110,7 @@ public:
// layout constants
static const S32 LEFT_PAD = 5;
- static const S32 LEFT_INDENTATION = 8;
+ static const S32 LEFT_INDENTATION = 2;
static const S32 ICON_PAD = 2;
static const S32 ICON_WIDTH = 16;
static const S32 TEXT_PAD = 1;
@@ -319,7 +319,6 @@ public:
virtual BOOL handleHover( S32 x, S32 y, MASK mask );
virtual BOOL handleMouseUp( S32 x, S32 y, MASK mask );
virtual BOOL handleDoubleClick( S32 x, S32 y, MASK mask );
- virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
// virtual void handleDropped();
virtual void draw();
diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp
index 18ff53c127..4f487ddf04 100644
--- a/indra/newview/llgesturemgr.cpp
+++ b/indra/newview/llgesturemgr.cpp
@@ -57,6 +57,7 @@
#include "llvoavatarself.h"
#include "llviewerstats.h"
#include "llnearbychatbar.h"
+#include "llappearancemgr.h"
// Longest time, in seconds, to wait for all animations to stop playing
const F32 MAX_WAIT_ANIM_SECS = 30.f;
@@ -303,6 +304,8 @@ void LLGestureManager::deactivateGesture(const LLUUID& item_id)
gAgent.sendReliableMessage();
+ LLAppearanceManager::instance().removeCOFItemLinks(base_item_id, false);
+
notifyObservers();
}
diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp
index 97cf139f1d..80b706a215 100644
--- a/indra/newview/llgrouplist.cpp
+++ b/indra/newview/llgrouplist.cpp
@@ -44,6 +44,7 @@
#include "llagent.h"
#include "llgroupactions.h"
#include "llfloaterreg.h"
+#include "lltextutil.h"
#include "llviewercontrol.h" // for gSavedSettings
static LLDefaultChildRegistry::Register<LLGroupList> r("group_list");
@@ -133,17 +134,17 @@ void LLGroupList::refresh()
const LLGroupData& group_data = gAgent.mGroups.get(i);
if (have_filter && !findInsensitive(group_data.mName, mNameFilter))
continue;
- addNewItem(id, group_data.mName, group_data.mInsigniaID, highlight_id == id, ADD_BOTTOM);
+ addNewItem(id, group_data.mName, group_data.mInsigniaID, ADD_BOTTOM);
}
// Sort the list.
sort();
- // add "none" to list at top
+ // Add "none" to list at top if filter not set (what's the point of filtering "none"?).
+ if (!have_filter)
{
std::string loc_none = LLTrans::getString("GroupsNone");
- if (have_filter || findInsensitive(loc_none, mNameFilter))
- addNewItem(LLUUID::null, loc_none, LLUUID::null, highlight_id.isNull(), ADD_TOP);
+ addNewItem(LLUUID::null, loc_none, LLUUID::null, ADD_TOP);
}
selectItemByUUID(highlight_id);
@@ -171,12 +172,12 @@ void LLGroupList::toggleIcons()
// PRIVATE Section
//////////////////////////////////////////////////////////////////////////
-void LLGroupList::addNewItem(const LLUUID& id, const std::string& name, const LLUUID& icon_id, BOOL is_bold, EAddPosition pos)
+void LLGroupList::addNewItem(const LLUUID& id, const std::string& name, const LLUUID& icon_id, EAddPosition pos)
{
LLGroupListItem* item = new LLGroupListItem();
- item->setName(name);
item->setGroupID(id);
+ item->setName(name, mNameFilter);
item->setGroupIconID(icon_id);
// item->setContextMenu(mContextMenu);
@@ -267,10 +268,10 @@ void LLGroupListItem::onMouseLeave(S32 x, S32 y, MASK mask)
LLPanel::onMouseLeave(x, y, mask);
}
-void LLGroupListItem::setName(const std::string& name)
+void LLGroupListItem::setName(const std::string& name, const std::string& highlight)
{
mGroupName = name;
- mGroupNameBox->setValue(name);
+ LLTextUtil::textboxSetHighlightedVal(mGroupNameBox, mGroupNameStyle, name, highlight);
mGroupNameBox->setToolTip(name);
}
@@ -308,6 +309,8 @@ void LLGroupListItem::setGroupIconVisible(bool visible)
//////////////////////////////////////////////////////////////////////////
void LLGroupListItem::setActive(bool active)
{
+ // *BUG: setName() overrides the style params.
+
// Active group should be bold.
LLFontDescriptor new_desc(mGroupNameBox->getDefaultFont()->getFontDesc());
@@ -316,15 +319,12 @@ void LLGroupListItem::setActive(bool active)
// is predefined as bold (SansSerifSmallBold, for example)
new_desc.setStyle(active ? LLFontGL::BOLD : LLFontGL::NORMAL);
LLFontGL* new_font = LLFontGL::getFont(new_desc);
- LLStyle::Params style_params;
- style_params.font = new_font;
+ mGroupNameStyle.font = new_font;
// *NOTE: You cannot set the style on a text box anymore, you must
// rebuild the text. This will cause problems if the text contains
// hyperlinks, as their styles will be wrong.
- std::string text = mGroupNameBox->getText();
- mGroupNameBox->setText(LLStringUtil::null);
- mGroupNameBox->appendText(text, false, style_params);
+ mGroupNameBox->setText(mGroupName, mGroupNameStyle);
}
void LLGroupListItem::onInfoBtnClick()
diff --git a/indra/newview/llgrouplist.h b/indra/newview/llgrouplist.h
index 8dbc13997c..41b4d01711 100644
--- a/indra/newview/llgrouplist.h
+++ b/indra/newview/llgrouplist.h
@@ -37,6 +37,7 @@
#include "llflatlistview.h"
#include "llpanel.h"
#include "llpointer.h"
+#include "llstyle.h"
/**
* Auto-updating list of agent groups.
@@ -66,7 +67,7 @@ public:
private:
void setDirty(bool val = true) { mDirty = val; }
void refresh();
- void addNewItem(const LLUUID& id, const std::string& name, const LLUUID& icon_id, BOOL is_bold, EAddPosition pos = ADD_BOTTOM);
+ void addNewItem(const LLUUID& id, const std::string& name, const LLUUID& icon_id, EAddPosition pos = ADD_BOTTOM);
bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata); // called on agent group list changes
bool mShowIcons;
@@ -90,7 +91,7 @@ public:
const LLUUID& getGroupID() const { return mGroupID; }
const std::string& getGroupName() const { return mGroupName; }
- void setName(const std::string& name);
+ void setName(const std::string& name, const std::string& highlight = LLStringUtil::null);
void setGroupID(const LLUUID& group_id);
void setGroupIconID(const LLUUID& group_icon_id);
void setGroupIconVisible(bool visible);
@@ -106,6 +107,7 @@ private:
LLButton* mInfoBtn;
std::string mGroupName;
+ LLStyle::Params mGroupNameStyle;
static S32 sIconWidth; // icon width + padding
};
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index 9de0b1f827..2bc07d0c27 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -237,7 +237,6 @@ BOOL LLIMFloater::postBuild()
mInputEditor->setLabel(LLTrans::getString("IM_to_label") + " " + session_name);
- LLStringUtil::toUpper(session_name);
setTitle(session_name);
childSetCommitCallback("chat_editor", onSendMsg, this);
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 5481ca97cd..6c4af0522f 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -88,6 +88,10 @@ const static std::string IM_TEXT("message");
const static std::string IM_FROM("from");
const static std::string IM_FROM_ID("from_id");
+std::string LLCallDialogManager::sPreviousSessionlName = "";
+std::string LLCallDialogManager::sCurrentSessionlName = "";
+LLIMModel::LLIMSession* LLCallDialogManager::sSession = NULL;
+
//
// Globals
//
@@ -144,11 +148,13 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string&
: mSessionID(session_id),
mName(name),
mType(type),
+ mParticipantUnreadMessageCount(0),
mNumUnread(0),
mOtherParticipantID(other_participant_id),
mInitialTargetIDs(ids),
mVoiceChannel(NULL),
mSpeakers(NULL),
+ mCallDialogManager(NULL),
mSessionInitialized(false),
mCallBackEnabled(true),
mTextIMPossible(true),
@@ -165,8 +171,11 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string&
if(mVoiceChannel)
{
- mVoiceChannel->setStateChangedCallback(boost::bind(&LLIMSession::onVoiceChannelStateChanged, this, _1, _2));
+ mVoiceChannelStateChangeConnection = mVoiceChannel->setStateChangedCallback(boost::bind(&LLIMSession::onVoiceChannelStateChanged, this, _1, _2));
}
+ // define what type of session was opened
+ setSessionType();
+
mSpeakers = new LLIMSpeakerMgr(mVoiceChannel);
// All participants will be added to the list of people we've recently interacted with.
@@ -199,8 +208,35 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string&
}
}
+void LLIMModel::LLIMSession::setSessionType()
+{
+ // set P2P type by default
+ mSessionType = P2P_SESSION;
+
+ if (dynamic_cast<LLVoiceChannelP2P*>(mVoiceChannel) && !mOtherParticipantIsAvatar) // P2P AVALINE channel was opened
+ {
+ mSessionType = AVALINE_SESSION;
+ return;
+ }
+ else if(dynamic_cast<LLVoiceChannelGroup*>(mVoiceChannel)) // GROUP channel was opened
+ {
+ if (mType == IM_SESSION_CONFERENCE_START)
+ {
+ mSessionType = ADHOC_SESSION;
+ return;
+ }
+ else if(mType == IM_SESSION_GROUP_START)
+ {
+ mSessionType = GROUP_SESSION;
+ return;
+ }
+ }
+}
+
void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state)
{
+ // *TODO: remove hardcoded string!!!!!!!!!!!
+
bool is_p2p_session = dynamic_cast<LLVoiceChannelP2P*>(mVoiceChannel);
bool is_incoming_call = false;
std::string other_avatar_name;
@@ -251,6 +287,9 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES
LLIMModel::LLIMSession::~LLIMSession()
{
+ delete mCallDialogManager;
+ mCallDialogManager = NULL;
+
delete mSpeakers;
mSpeakers = NULL;
@@ -270,9 +309,11 @@ LLIMModel::LLIMSession::~LLIMSession()
}
}
+ mVoiceChannelStateChangeConnection.disconnect();
+
// HAVE to do this here -- if it happens in the LLVoiceChannel destructor it will call the wrong version (since the object's partially deconstructed at that point).
mVoiceChannel->deactivate();
-
+
delete mVoiceChannel;
mVoiceChannel = NULL;
}
@@ -456,10 +497,12 @@ void LLIMModel::getMessages(const LLUUID& session_id, std::list<LLSD>& messages,
}
session->mNumUnread = 0;
+ session->mParticipantUnreadMessageCount = 0;
LLSD arg;
arg["session_id"] = session_id;
arg["num_unread"] = 0;
+ arg["participant_unread"] = session->mParticipantUnreadMessageCount;
mNoUnreadMsgsSignal(arg);
}
@@ -536,10 +579,18 @@ bool LLIMModel::addMessage(const LLUUID& session_id, const std::string& from, co
session->mNumUnread++;
+ //update count of unread messages from real participant
+ if (!(from_id.isNull() || from_id == gAgentID || SYSTEM_FROM == from))
+ {
+ ++(session->mParticipantUnreadMessageCount);
+ }
+
+
// notify listeners
LLSD arg;
arg["session_id"] = session_id;
arg["num_unread"] = session->mNumUnread;
+ arg["participant_unread"] = session->mParticipantUnreadMessageCount;
arg["message"] = utf8_text;
arg["from"] = from;
arg["from_id"] = from_id;
@@ -1182,21 +1233,141 @@ LLIMMgr::onConfirmForceCloseError(
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-// Class LLOutgoingCallDialog
+// Class LLCallDialogManager
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-LLOutgoingCallDialog::LLOutgoingCallDialog(const LLSD& payload) :
- LLDockableFloater(NULL, false, payload),
- mPayload(payload)
+
+LLCallDialogManager::LLCallDialogManager()
+{
+}
+
+LLCallDialogManager::~LLCallDialogManager()
+{
+}
+
+void LLCallDialogManager::initClass()
+{
+ LLVoiceChannel::setCurrentVoiceChannelChangedCallback(LLCallDialogManager::onVoiceChannelChanged);
+}
+
+void LLCallDialogManager::onVoiceChannelChanged(const LLUUID &session_id)
+{
+ LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(session_id);
+ if(!session)
+ {
+ sPreviousSessionlName = sCurrentSessionlName;
+ sCurrentSessionlName = ""; // Empty string results in "Nearby Voice Chat" after substitution
+ return;
+ }
+ sSession = session;
+ sSession->mVoiceChannel->setStateChangedCallback(LLCallDialogManager::onVoiceChannelStateChanged);
+ sPreviousSessionlName = sCurrentSessionlName;
+ sCurrentSessionlName = session->mName;
+}
+
+void LLCallDialogManager::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state)
+{
+ LLSD mCallDialogPayload;
+ LLOutgoingCallDialog* ocd;
+
+ mCallDialogPayload["session_id"] = sSession->mSessionID;
+ mCallDialogPayload["session_name"] = sSession->mName;
+ mCallDialogPayload["other_user_id"] = sSession->mOtherParticipantID;
+ mCallDialogPayload["old_channel_name"] = sPreviousSessionlName;
+
+ switch(new_state)
+ {
+ case LLVoiceChannel::STATE_CALL_STARTED :
+ // do not show "Calling to..." if it is incoming P2P call
+ if(sSession->mSessionType == LLIMModel::LLIMSession::P2P_SESSION && static_cast<LLVoiceChannelP2P*>(sSession->mVoiceChannel)->isIncomingCall())
+ {
+ return;
+ }
+
+ ocd = dynamic_cast<LLOutgoingCallDialog*>(LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE));
+ if (ocd)
+ {
+ ocd->getChild<LLTextBox>("calling")->setVisible(true);
+ ocd->getChild<LLTextBox>("leaving")->setVisible(true);
+ ocd->getChild<LLTextBox>("connecting")->setVisible(false);
+ ocd->getChild<LLTextBox>("noanswer")->setVisible(false);
+ }
+ return;
+
+ case LLVoiceChannel::STATE_RINGING :
+ ocd = dynamic_cast<LLOutgoingCallDialog*>(LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE));
+ if (ocd)
+ {
+ ocd->getChild<LLTextBox>("calling")->setVisible(false);
+ ocd->getChild<LLTextBox>("leaving")->setVisible(true);
+ ocd->getChild<LLTextBox>("connecting")->setVisible(true);
+ ocd->getChild<LLTextBox>("noanswer")->setVisible(false);
+ }
+ return;
+
+ case LLVoiceChannel::STATE_ERROR :
+ ocd = dynamic_cast<LLOutgoingCallDialog*>(LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE));
+ if (ocd)
+ {
+ ocd->getChild<LLTextBox>("calling")->setVisible(false);
+ ocd->getChild<LLTextBox>("leaving")->setVisible(false);
+ ocd->getChild<LLTextBox>("connecting")->setVisible(false);
+ ocd->getChild<LLTextBox>("noanswer")->setVisible(true);
+ }
+ return;
+
+ case LLVoiceChannel::STATE_CONNECTED :
+ case LLVoiceChannel::STATE_HUNG_UP :
+ ocd = dynamic_cast<LLOutgoingCallDialog*>(LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE));
+ if (ocd)
+ {
+ ocd->closeFloater();
+ }
+ return;
+
+ default:
+ break;
+ }
+
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// Class LLCallDialog
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+LLCallDialog::LLCallDialog(const LLSD& payload) :
+LLDockableFloater(NULL, false, payload),
+mPayload(payload)
{
}
-void LLOutgoingCallDialog::getAllowedRect(LLRect& rect)
+void LLCallDialog::getAllowedRect(LLRect& rect)
{
rect = gViewerWindow->getWorldViewRectScaled();
}
+void LLCallDialog::onOpen(const LLSD& key)
+{
+ // dock the dialog to the Speak Button, where other sys messages appear
+ setDockControl(new LLDockControl(LLBottomTray::getInstance()->getChild<LLPanel>("speak_panel"),
+ this, getDockTongue(), LLDockControl::TOP, boost::bind(&LLCallDialog::getAllowedRect, this, _1)));
+}
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// Class LLOutgoingCallDialog
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+LLOutgoingCallDialog::LLOutgoingCallDialog(const LLSD& payload) :
+LLCallDialog(payload)
+{
+ LLOutgoingCallDialog* instance = LLFloaterReg::findTypedInstance<LLOutgoingCallDialog>("outgoing_call", payload);
+ if(instance && instance->getVisible())
+ {
+ instance->onCancel(instance);
+ }
+}
+
void LLOutgoingCallDialog::onOpen(const LLSD& key)
{
+ LLCallDialog::onOpen(key);
+
// tell the user which voice channel they are leaving
if (!mPayload["old_channel_name"].asString().empty())
{
@@ -1244,22 +1415,15 @@ BOOL LLOutgoingCallDialog::postBuild()
childSetAction("Cancel", onCancel, this);
- // dock the dialog to the sys well, where other sys messages appear
- setDockControl(new LLDockControl(LLBottomTray::getInstance()->getChild<LLPanel>("speak_panel"),
- this, getDockTongue(), LLDockControl::TOP,
- boost::bind(&LLOutgoingCallDialog::getAllowedRect, this, _1)));
-
return success;
}
-
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLIncomingCallDialog
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LLIncomingCallDialog::LLIncomingCallDialog(const LLSD& payload) :
- LLDockableFloater(NULL, false, payload),
- mPayload(payload)
+LLCallDialog(payload)
{
}
@@ -1303,13 +1467,11 @@ BOOL LLIncomingCallDialog::postBuild()
return TRUE;
}
-void LLIncomingCallDialog::getAllowedRect(LLRect& rect)
-{
- rect = gViewerWindow->getWorldViewRectScaled();
-}
void LLIncomingCallDialog::onOpen(const LLSD& key)
{
+ LLCallDialog::onOpen(key);
+
// tell the user which voice channel they would be leaving
LLVoiceChannel *voice = LLVoiceChannel::getCurrentVoiceChannel();
if (voice && !voice->getSessionName().empty())
@@ -1320,11 +1482,6 @@ void LLIncomingCallDialog::onOpen(const LLSD& key)
{
childSetTextArg("question", "[CURRENT_CHAT]", getString("localchat"));
}
-
- // dock the dialog to the sys well, where other sys messages appear
- setDockControl(new LLDockControl(LLBottomTray::getInstance()->getChild<LLPanel>("speak_panel"),
- this, getDockTongue(), LLDockControl::TOP,
- boost::bind(&LLIncomingCallDialog::getAllowedRect, this, _1)));
}
//static
@@ -1392,13 +1549,13 @@ void LLIncomingCallDialog::processCallResponse(S32 response)
}
else
{
- LLUUID session_id = gIMMgr->addSession(
+ LLUUID new_session_id = gIMMgr->addSession(
mPayload["session_name"].asString(),
type,
session_id);
- if (session_id != LLUUID::null)
+ if (new_session_id != LLUUID::null)
{
- LLIMFloater::show(session_id);
+ LLIMFloater::show(new_session_id);
}
std::string url = gAgent.getRegion()->getCapability(
@@ -1486,13 +1643,13 @@ bool inviteUserResponse(const LLSD& notification, const LLSD& response)
}
else
{
- LLUUID session_id = gIMMgr->addSession(
+ LLUUID new_session_id = gIMMgr->addSession(
payload["session_name"].asString(),
type,
session_id);
- if (session_id != LLUUID::null)
+ if (new_session_id != LLUUID::null)
{
- LLIMFloater::show(session_id);
+ LLIMFloater::show(new_session_id);
}
std::string url = gAgent.getRegion()->getCapability(
@@ -1749,6 +1906,19 @@ S32 LLIMMgr::getNumberOfUnreadIM()
return num;
}
+S32 LLIMMgr::getNumberOfUnreadParticipantMessages()
+{
+ std::map<LLUUID, LLIMModel::LLIMSession*>::iterator it;
+
+ S32 num = 0;
+ for(it = LLIMModel::getInstance()->mId2SessionMap.begin(); it != LLIMModel::getInstance()->mId2SessionMap.end(); ++it)
+ {
+ num += (*it).second->mParticipantUnreadMessageCount;
+ }
+
+ return num;
+}
+
void LLIMMgr::clearNewIMNotification()
{
mIMReceived = FALSE;
@@ -1964,18 +2134,7 @@ void LLIMMgr::inviteToSession(
}
else
{
- if (notify_box_type == "VoiceInviteP2P" || notify_box_type == "VoiceInviteAdHoc")
- {
- LLFloaterReg::showInstance("incoming_call", payload, TRUE);
- }
- else
- {
- LLSD args;
- args["NAME"] = caller_name;
- args["GROUP"] = session_name;
-
- LLNotificationsUtil::add(notify_box_type, args, payload, &inviteUserResponse);
- }
+ LLFloaterReg::showInstance("incoming_call", payload, TRUE);
}
mPendingInvitations[session_id.asString()] = LLSD();
}
@@ -1988,21 +2147,7 @@ void LLIMMgr::onInviteNameLookup(LLSD payload, const LLUUID& id, const std::stri
std::string notify_box_type = payload["notify_box_type"].asString();
- if (notify_box_type == "VoiceInviteP2P" || notify_box_type == "VoiceInviteAdHoc")
- {
- LLFloaterReg::showInstance("incoming_call", payload, TRUE);
- }
- else
- {
- LLSD args;
- args["NAME"] = payload["caller_name"].asString();
-
- LLNotificationsUtil::add(
- payload["notify_box_type"].asString(),
- args,
- payload,
- &inviteUserResponse);
- }
+ LLFloaterReg::showInstance("incoming_call", payload, TRUE);
}
void LLIMMgr::disconnectAllSessions()
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index 66f92c83a5..c002434a18 100644
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -48,6 +48,7 @@ class LLFloaterChatterBox;
class LLUUID;
class LLFloaterIMPanel;
class LLFriendObserver;
+class LLCallDialogManager;
class LLIMModel : public LLSingleton<LLIMModel>
{
@@ -55,12 +56,20 @@ public:
struct LLIMSession
{
+ typedef enum e_session_type
+ { // for now we have 4 predefined types for a session
+ P2P_SESSION,
+ GROUP_SESSION,
+ ADHOC_SESSION,
+ AVALINE_SESSION,
+ } SType;
+
LLIMSession(const LLUUID& session_id, const std::string& name,
const EInstantMessage& type, const LLUUID& other_participant_id, const std::vector<LLUUID>& ids);
virtual ~LLIMSession();
void sessionInitReplyReceived(const LLUUID& new_session_id);
-
+ void setSessionType(); //define what type of session was opened
void addMessagesFromHistory(const std::list<LLSD>& history);
void addMessage(const std::string& from, const LLUUID& from_id, const std::string& utf8_text, const std::string& time);
void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state);
@@ -69,10 +78,18 @@ public:
LLUUID mSessionID;
std::string mName;
EInstantMessage mType;
+ SType mSessionType;
LLUUID mOtherParticipantID;
std::vector<LLUUID> mInitialTargetIDs;
+ LLCallDialogManager* mCallDialogManager;
+
+ // connection to voice channel state change signal
+ boost::signals2::connection mVoiceChannelStateChangeConnection;
- //does NOT include system messages
+ //does NOT include system messages and agent's messages
+ S32 mParticipantUnreadMessageCount;
+
+ // does include all incoming messages
S32 mNumUnread;
std::list<LLSD> mMsgs;
@@ -316,9 +333,14 @@ public:
// IM received that you haven't seen yet
BOOL getIMReceived() const;
- // Calc number of unread IMs
+ // Calc number of all unread IMs
S32 getNumberOfUnreadIM();
+ /**
+ * Calculates number of unread IMs from real participants in all stored sessions
+ */
+ S32 getNumberOfUnreadParticipantMessages();
+
// This method is used to go through all active sessions and
// disable all of them. This method is usally called when you are
// forced to log out or similar situations where you do not have a
@@ -416,7 +438,36 @@ private:
LLSD mPendingAgentListUpdates;
};
-class LLIncomingCallDialog : public LLDockableFloater
+class LLCallDialogManager : public LLInitClass<LLCallDialogManager>
+{
+public:
+ LLCallDialogManager();
+ ~LLCallDialogManager();
+
+ static void initClass();
+ static void onVoiceChannelChanged(const LLUUID &session_id);
+ static void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state);
+
+protected:
+ static std::string sPreviousSessionlName;
+ static std::string sCurrentSessionlName;
+ static LLIMModel::LLIMSession* sSession;
+};
+
+class LLCallDialog : public LLDockableFloater
+{
+public:
+ LLCallDialog(const LLSD& payload);
+ ~LLCallDialog() {}
+
+ virtual void onOpen(const LLSD& key);
+
+protected:
+ virtual void getAllowedRect(LLRect& rect);
+ LLSD mPayload;
+};
+
+class LLIncomingCallDialog : public LLCallDialog
{
public:
LLIncomingCallDialog(const LLSD& payload);
@@ -430,12 +481,9 @@ public:
private:
void processCallResponse(S32 response);
- void getAllowedRect(LLRect& rect);
-
- LLSD mPayload;
};
-class LLOutgoingCallDialog : public LLDockableFloater
+class LLOutgoingCallDialog : public LLCallDialog
{
public:
LLOutgoingCallDialog(const LLSD& payload);
@@ -446,9 +494,6 @@ public:
static void onCancel(void* user_data);
private:
- void getAllowedRect(LLRect& rect);
-
- LLSD mPayload;
};
// Globals
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index ac6aa307f2..4c28d5e2df 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -38,7 +38,6 @@
#include "llappearancemgr.h"
#include "llavataractions.h"
#include "llfloatercustomize.h"
-#include "llfloaterinventory.h"
#include "llfloateropenobject.h"
#include "llfloaterreg.h"
#include "llfloaterworldmap.h"
@@ -125,8 +124,8 @@ std::string ICON_NAME[ICON_NAME_COUNT] =
"Inv_Animation",
"Inv_Gesture",
- "inv_item_linkitem.tga",
- "inv_item_linkfolder.tga"
+ "Inv_LinkItem",
+ "Inv_LinkFolder"
};
// +=================================================+
@@ -513,37 +512,44 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id,
std::vector<std::string> &disabled_items, U32 flags)
{
const LLInventoryObject *obj = getInventoryObject();
- if (obj && obj->getIsLinkType())
- {
- items.push_back(std::string("Find Original"));
- if (LLAssetType::lookupIsLinkType(obj->getType()))
- {
- disabled_items.push_back(std::string("Find Original"));
- }
- }
- else
+ if (obj)
{
- items.push_back(std::string("Rename"));
- if (!isItemRenameable() || (flags & FIRST_SELECTED_ITEM) == 0)
- {
- disabled_items.push_back(std::string("Rename"));
- }
-
- if (show_asset_id)
+ if (obj->getIsLinkType())
{
- items.push_back(std::string("Copy Asset UUID"));
- if ( (! ( isItemPermissive() || gAgent.isGodlike() ) )
- || (flags & FIRST_SELECTED_ITEM) == 0)
+ items.push_back(std::string("Find Original"));
+ if (isLinkedObjectMissing())
{
- disabled_items.push_back(std::string("Copy Asset UUID"));
+ disabled_items.push_back(std::string("Find Original"));
}
}
- items.push_back(std::string("Copy Separator"));
-
- items.push_back(std::string("Copy"));
- if (!isItemCopyable())
+ else
{
- disabled_items.push_back(std::string("Copy"));
+ if (LLAssetType::lookupCanLink(obj->getType()))
+ {
+ items.push_back(std::string("Find Links"));
+ }
+ items.push_back(std::string("Rename"));
+ if (!isItemRenameable() || (flags & FIRST_SELECTED_ITEM) == 0)
+ {
+ disabled_items.push_back(std::string("Rename"));
+ }
+
+ if (show_asset_id)
+ {
+ items.push_back(std::string("Copy Asset UUID"));
+ if ( (! ( isItemPermissive() || gAgent.isGodlike() ) )
+ || (flags & FIRST_SELECTED_ITEM) == 0)
+ {
+ disabled_items.push_back(std::string("Copy Asset UUID"));
+ }
+ }
+ items.push_back(std::string("Copy Separator"));
+
+ items.push_back(std::string("Copy"));
+ if (!isItemCopyable())
+ {
+ disabled_items.push_back(std::string("Copy"));
+ }
}
}
@@ -666,6 +672,20 @@ BOOL LLInvFVBridge::isLinkedObjectInTrash() const
return FALSE;
}
+BOOL LLInvFVBridge::isLinkedObjectMissing() const
+{
+ const LLInventoryObject *obj = getInventoryObject();
+ if (!obj)
+ {
+ return TRUE;
+ }
+ if (obj->getIsLinkType() && LLAssetType::lookupIsLinkType(obj->getType()))
+ {
+ return TRUE;
+ }
+ return FALSE;
+}
+
BOOL LLInvFVBridge::isAgentInventory() const
{
const LLInventoryModel* model = getInventoryModel();
@@ -856,9 +876,6 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type,
new_listener = new LLFolderBridge(inventory, uuid);
break;
case LLAssetType::AT_LINK:
- // Only should happen for broken links.
- new_listener = new LLLinkItemBridge(inventory, uuid);
- break;
case LLAssetType::AT_LINK_FOLDER:
// Only should happen for broken links.
new_listener = new LLLinkItemBridge(inventory, uuid);
@@ -921,6 +938,7 @@ void LLItemBridge::performAction(LLFolderView* folder, LLInventoryModel* model,
{
gotoItem(folder);
}
+
if ("open" == action)
{
openItem();
@@ -1055,7 +1073,7 @@ void LLItemBridge::gotoItem(LLFolderView *folder)
LLInventoryObject *obj = getInventoryObject();
if (obj && obj->getIsLinkType())
{
- LLInventoryPanel* active_panel = LLFloaterInventory::getActiveInventory()->getPanel();
+ LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel();
if (active_panel)
{
active_panel->setSelection(obj->getLinkedUUID(), TAKE_FOCUS_NO);
@@ -2941,9 +2959,9 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
// everything in the active window so that we don't follow
// the selection to its new location (which is very
// annoying).
- if (LLFloaterInventory::getActiveInventory())
+ LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel();
+ if (active_panel)
{
- LLInventoryPanel* active_panel = LLFloaterInventory::getActiveInventory()->getPanel();
LLInventoryPanel* panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get());
if (active_panel && (panel != active_panel))
{
@@ -3758,8 +3776,14 @@ void LLGestureBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
getClipboardEntries(true, items, disabled_items, flags);
items.push_back(std::string("Gesture Separator"));
- items.push_back(std::string("Activate"));
- items.push_back(std::string("Deactivate"));
+ if (LLGestureManager::instance().isGestureActive(getUUID()))
+ {
+ items.push_back(std::string("Deactivate"));
+ }
+ else
+ {
+ items.push_back(std::string("Activate"));
+ }
}
hide_context_entries(menu, items, disabled_items);
}
@@ -4091,7 +4115,7 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
items.push_back(std::string("Detach From Yourself"));
}
else
- if( !isInTrash() && !isLinkedObjectInTrash() )
+ if( !isInTrash() && !isLinkedObjectInTrash() && !isLinkedObjectMissing())
{
items.push_back(std::string("Attach Separator"));
items.push_back(std::string("Object Wear"));
@@ -4490,16 +4514,20 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
}
else
{ // FWIW, it looks like SUPPRESS_OPEN_ITEM is not set anywhere
- BOOL no_open = ((flags & SUPPRESS_OPEN_ITEM) == SUPPRESS_OPEN_ITEM);
+ BOOL can_open = ((flags & SUPPRESS_OPEN_ITEM) != SUPPRESS_OPEN_ITEM);
// If we have clothing, don't add "Open" as it's the same action as "Wear" SL-18976
LLViewerInventoryItem* item = getItem();
- if( !no_open && item )
+ if (can_open && item)
+ {
+ can_open = (item->getType() != LLAssetType::AT_CLOTHING) &&
+ (item->getType() != LLAssetType::AT_BODYPART);
+ }
+ if (isLinkedObjectMissing())
{
- no_open = (item->getType() == LLAssetType::AT_CLOTHING) ||
- (item->getType() == LLAssetType::AT_BODYPART);
+ can_open = FALSE;
}
- if (!no_open)
+ if (can_open)
{
items.push_back(std::string("Open"));
}
@@ -4519,7 +4547,7 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
disabled_items.push_back(std::string("Wearable Edit"));
}
// Don't allow items to be worn if their baseobj is in the trash.
- if (isLinkedObjectInTrash())
+ if (isLinkedObjectInTrash() || isLinkedObjectMissing())
{
disabled_items.push_back(std::string("Wearable Wear"));
disabled_items.push_back(std::string("Wearable Add"));
@@ -5091,7 +5119,7 @@ LLUIImagePtr LLLinkItemBridge::getIcon() const
{
if (LLViewerInventoryItem *item = getItem())
{
- return get_item_icon(item->getActualType(), LLInventoryType::IT_NONE, 0, FALSE);
+ return get_item_icon(item->getActualType(), item->getInventoryType(), 0, FALSE);
}
return get_item_icon(LLAssetType::AT_LINK, LLInventoryType::IT_NONE, 0, FALSE);
}
@@ -5103,6 +5131,9 @@ void LLLinkItemBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
std::vector<std::string> items;
std::vector<std::string> disabled_items;
+ items.push_back(std::string("Find Original"));
+ disabled_items.push_back(std::string("Find Original"));
+
if(isInTrash())
{
items.push_back(std::string("Purge Item"));
@@ -5115,6 +5146,7 @@ void LLLinkItemBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
}
else
{
+ items.push_back(std::string("Properties"));
items.push_back(std::string("Delete"));
if (!isItemRemovable())
{
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index ef340af0cb..63be9dcdb8 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -154,7 +154,6 @@ public:
virtual std::string getLabelSuffix() const { return LLStringUtil::null; }
virtual void openItem() {}
virtual void closeItem() {}
- virtual void gotoItem(LLFolderView *folder) {} // for links
virtual void previewItem() {openItem();}
virtual void showProperties();
virtual BOOL isItemRenameable() const { return TRUE; }
@@ -191,6 +190,7 @@ protected:
BOOL isInTrash() const;
BOOL isLinkedObjectInTrash() const; // Is this obj or its baseobj in the trash?
+ BOOL isLinkedObjectMissing() const; // Is this a linked obj whose baseobj is not in inventory?
BOOL isAgentInventory() const; // false if lost or in the inventory library
BOOL isCOFFolder() const; // true if COF or descendent of.
@@ -240,7 +240,6 @@ public:
virtual void restoreItem();
virtual void restoreToWorld();
virtual void gotoItem(LLFolderView *folder);
-
virtual LLUIImagePtr getIcon() const;
virtual const std::string& getDisplayName() const;
virtual std::string getLabelSuffix() const;
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index 085c96c93d..4c5e4d5607 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -44,6 +44,19 @@
// linden library includes
#include "lltrans.h"
+LLInventoryFilter::FilterOps::FilterOps() :
+ mFilterObjectTypes(0xffffffffffffffffULL),
+ mFilterCategoryTypes(0xffffffffffffffffULL),
+ mMinDate(time_min()),
+ mMaxDate(time_max()),
+ mHoursAgo(0),
+ mShowFolderState(SHOW_NON_EMPTY_FOLDERS),
+ mPermissions(PERM_NONE),
+ mFilterTypes(FILTERTYPE_OBJECT),
+ mFilterUUID(LLUUID::null)
+{
+}
+
///----------------------------------------------------------------------------
/// Class LLInventoryFilter
///----------------------------------------------------------------------------
@@ -52,14 +65,6 @@ LLInventoryFilter::LLInventoryFilter(const std::string& name)
mModified(FALSE),
mNeedTextRebuild(TRUE)
{
- mFilterOps.mFilterTypes = 0xffffffffffffffffULL;
- mFilterOps.mMinDate = time_min();
- mFilterOps.mMaxDate = time_max();
- mFilterOps.mHoursAgo = 0;
- mFilterOps.mShowFolderState = SHOW_NON_EMPTY_FOLDERS;
- mFilterOps.mPermissions = PERM_NONE;
- mFilterOps.mFilterForCategories = FALSE;
-
mOrder = SO_FOLDERS_BY_NAME; // This gets overridden by a pref immediately
mSubStringMatchOffset = 0;
@@ -81,11 +86,17 @@ LLInventoryFilter::~LLInventoryFilter()
{
}
-BOOL LLInventoryFilter::check(LLFolderViewItem* item)
+BOOL LLInventoryFilter::check(const LLFolderViewItem* item)
{
- time_t earliest;
+ // If it's a folder and we're showing all folders, return TRUE automatically.
+ const BOOL is_folder = (dynamic_cast<const LLFolderViewFolder*>(item) != NULL);
+ if (is_folder && (mFilterOps.mShowFolderState == LLInventoryFilter::SHOW_ALL_FOLDERS))
+ {
+ return TRUE;
+ }
- earliest = time_corrected() - mFilterOps.mHoursAgo * 3600;
+ const U16 HOURS_TO_SECONDS = 3600;
+ time_t earliest = time_corrected() - mFilterOps.mHoursAgo * HOURS_TO_SECONDS;
if (mFilterOps.mMinDate > time_min() && mFilterOps.mMinDate < earliest)
{
earliest = mFilterOps.mMinDate;
@@ -94,59 +105,73 @@ BOOL LLInventoryFilter::check(LLFolderViewItem* item)
{
earliest = 0;
}
- LLFolderViewEventListener* listener = item->getListener();
+
+ const LLFolderViewEventListener* listener = item->getListener();
mSubStringMatchOffset = mFilterSubString.size() ? item->getSearchableLabel().find(mFilterSubString) : std::string::npos;
- bool passed_type = false;
- if (mFilterOps.mFilterForCategories)
+ const BOOL passed_filtertype = checkAgainstFilterType(item);
+ const BOOL passed = passed_filtertype &&
+ (mFilterSubString.size() == 0 || mSubStringMatchOffset != std::string::npos) &&
+ ((listener->getPermissionMask() & mFilterOps.mPermissions) == mFilterOps.mPermissions) &&
+ (listener->getCreationDate() >= earliest && listener->getCreationDate() <= mFilterOps.mMaxDate);
+
+ return passed;
+}
+
+BOOL LLInventoryFilter::checkAgainstFilterType(const LLFolderViewItem* item)
+{
+ const LLFolderViewEventListener* listener = item->getListener();
+ if (!listener) return FALSE;
+
+ const LLInventoryType::EType object_type = listener->getInventoryType();
+ const LLUUID object_id = listener->getUUID();
+ const LLInventoryObject *object = gInventory.getObject(object_id);
+
+ if (!object) return FALSE;
+
+ const U32 filterTypes = mFilterOps.mFilterTypes;
+
+ // Pass if this item's type is of the correct filter type
+ if (filterTypes & FILTERTYPE_OBJECT)
{
- // Pass if this item is a category of the filter type, or
- // if its parent is a category of the filter type.
- LLUUID uuid = listener->getUUID();
- if (listener->getInventoryType() != LLInventoryType::IT_CATEGORY)
+ // If it has no type, pass it, unless it's a link.
+ if (object_type == LLInventoryType::IT_NONE)
{
- const LLInventoryObject *obj = gInventory.getObject(uuid);
- uuid = obj->getParentUUID();
- }
- LLViewerInventoryCategory *cat = gInventory.getCategory(uuid);
- if (cat)
- {
- passed_type |= ((1LL << cat->getPreferredType() & mFilterOps.mFilterTypes) != U64(0));
+ if (object->getIsLinkType())
+ return FALSE;
}
+ if ((1LL << object_type & mFilterOps.mFilterObjectTypes) == U64(0))
+ return FALSE;
}
- else
+
+ // Pass if this item is a category of the filter type, or
+ // if its parent is a category of the filter type.
+ if (filterTypes & FILTERTYPE_CATEGORY)
{
- LLInventoryType::EType type = listener->getInventoryType();
- passed_type |= ((1LL << type & mFilterOps.mFilterTypes) != U64(0));
- if (type == LLInventoryType::IT_NONE)
+ LLUUID cat_id = object_id;
+ if (listener->getInventoryType() != LLInventoryType::IT_CATEGORY)
{
- const LLInventoryObject *obj = gInventory.getObject(listener->getUUID());
- if (obj && obj->getIsLinkType())
- {
- passed_type = FALSE;
- }
- else
- {
- passed_type = TRUE;
- }
+ cat_id = object->getParentUUID();
}
+ const LLViewerInventoryCategory *cat = gInventory.getCategory(cat_id);
+ if (!cat)
+ return FALSE;
+ if ((1LL << cat->getPreferredType() & mFilterOps.mFilterCategoryTypes) == U64(0))
+ return FALSE;
}
- BOOL passed = passed_type
- && (mFilterSubString.size() == 0 || mSubStringMatchOffset != std::string::npos)
- && ((listener->getPermissionMask() & mFilterOps.mPermissions) == mFilterOps.mPermissions)
- && (listener->getCreationDate() >= earliest && listener->getCreationDate() <= mFilterOps.mMaxDate);
-
- BOOL is_folder = (dynamic_cast<LLFolderViewFolder*>(item) != NULL);
- if (is_folder && mFilterOps.mShowFolderState == LLInventoryFilter::SHOW_ALL_FOLDERS)
+ // Pass if this item is the target UUID or if it links to the target UUID
+ if (filterTypes & FILTERTYPE_UUID)
{
- passed = TRUE;
+ if (object->getLinkedUUID() != mFilterOps.mFilterUUID)
+ return FALSE;
}
- return passed;
+ return TRUE;
}
-const std::string LLInventoryFilter::getFilterSubString(BOOL trim)
+
+const std::string& LLInventoryFilter::getFilterSubString(BOOL trim) const
{
return mFilterSubString;
}
@@ -157,9 +182,9 @@ std::string::size_type LLInventoryFilter::getStringMatchOffset() const
}
// has user modified default filter params?
-BOOL LLInventoryFilter::isNotDefault()
+BOOL LLInventoryFilter::isNotDefault() const
{
- return mFilterOps.mFilterTypes != mDefaultFilterOps.mFilterTypes
+ return mFilterOps.mFilterObjectTypes != mDefaultFilterOps.mFilterObjectTypes
|| mFilterSubString.size()
|| mFilterOps.mPermissions != mDefaultFilterOps.mPermissions
|| mFilterOps.mMinDate != mDefaultFilterOps.mMinDate
@@ -167,9 +192,9 @@ BOOL LLInventoryFilter::isNotDefault()
|| mFilterOps.mHoursAgo != mDefaultFilterOps.mHoursAgo;
}
-BOOL LLInventoryFilter::isActive()
+BOOL LLInventoryFilter::isActive() const
{
- return mFilterOps.mFilterTypes != 0xffffffffffffffffULL
+ return mFilterOps.mFilterObjectTypes != 0xffffffffffffffffULL
|| mFilterSubString.size()
|| mFilterOps.mPermissions != PERM_NONE
|| mFilterOps.mMinDate != time_min()
@@ -177,7 +202,7 @@ BOOL LLInventoryFilter::isActive()
|| mFilterOps.mHoursAgo != 0;
}
-BOOL LLInventoryFilter::isModified()
+BOOL LLInventoryFilter::isModified() const
{
return mModified;
}
@@ -189,15 +214,43 @@ BOOL LLInventoryFilter::isModifiedAndClear()
return ret;
}
-void LLInventoryFilter::setFilterTypes(U64 types, BOOL filter_for_categories)
+void LLInventoryFilter::setFilterObjectTypes(U64 types)
+{
+ if (mFilterOps.mFilterObjectTypes != types)
+ {
+ // keep current items only if no type bits getting turned off
+ BOOL fewer_bits_set = (mFilterOps.mFilterObjectTypes & ~types);
+ BOOL more_bits_set = (~mFilterOps.mFilterObjectTypes & types);
+
+ mFilterOps.mFilterObjectTypes = types;
+ if (more_bits_set && fewer_bits_set)
+ {
+ // neither less or more restrive, both simultaneously
+ // so we need to filter from scratch
+ setModified(FILTER_RESTART);
+ }
+ else if (more_bits_set)
+ {
+ // target is only one of all requested types so more type bits == less restrictive
+ setModified(FILTER_LESS_RESTRICTIVE);
+ }
+ else if (fewer_bits_set)
+ {
+ setModified(FILTER_MORE_RESTRICTIVE);
+ }
+ }
+ mFilterOps.mFilterTypes |= FILTERTYPE_OBJECT;
+}
+
+void LLInventoryFilter::setFilterCategoryTypes(U64 types)
{
- if (mFilterOps.mFilterTypes != types)
+ if (mFilterOps.mFilterCategoryTypes != types)
{
// keep current items only if no type bits getting turned off
- BOOL fewer_bits_set = (mFilterOps.mFilterTypes & ~types);
- BOOL more_bits_set = (~mFilterOps.mFilterTypes & types);
+ BOOL fewer_bits_set = (mFilterOps.mFilterCategoryTypes & ~types);
+ BOOL more_bits_set = (~mFilterOps.mFilterCategoryTypes & types);
- mFilterOps.mFilterTypes = types;
+ mFilterOps.mFilterCategoryTypes = types;
if (more_bits_set && fewer_bits_set)
{
// neither less or more restrive, both simultaneously
@@ -214,7 +267,21 @@ void LLInventoryFilter::setFilterTypes(U64 types, BOOL filter_for_categories)
setModified(FILTER_MORE_RESTRICTIVE);
}
}
- mFilterOps.mFilterForCategories = filter_for_categories;
+ mFilterOps.mFilterTypes |= FILTERTYPE_CATEGORY;
+}
+
+void LLInventoryFilter::setFilterUUID(const LLUUID& object_id)
+{
+ if (mFilterOps.mFilterUUID == LLUUID::null)
+ {
+ setModified(FILTER_MORE_RESTRICTIVE);
+ }
+ else
+ {
+ setModified(FILTER_RESTART);
+ }
+ mFilterOps.mFilterUUID = object_id;
+ mFilterOps.mFilterTypes = FILTERTYPE_UUID;
}
void LLInventoryFilter::setFilterSubString(const std::string& string)
@@ -222,9 +289,11 @@ void LLInventoryFilter::setFilterSubString(const std::string& string)
if (mFilterSubString != string)
{
// hitting BACKSPACE, for example
- BOOL less_restrictive = mFilterSubString.size() >= string.size() && !mFilterSubString.substr(0, string.size()).compare(string);
+ const BOOL less_restrictive = mFilterSubString.size() >= string.size() && !mFilterSubString.substr(0, string.size()).compare(string);
+
// appending new characters
- BOOL more_restrictive = mFilterSubString.size() < string.size() && !string.substr(0, mFilterSubString.size()).compare(mFilterSubString);
+ const BOOL more_restrictive = mFilterSubString.size() < string.size() && !string.substr(0, mFilterSubString.size()).compare(mFilterSubString);
+
mFilterSubString = string;
LLStringUtil::toUpper(mFilterSubString);
LLStringUtil::trimHead(mFilterSubString);
@@ -241,6 +310,14 @@ void LLInventoryFilter::setFilterSubString(const std::string& string)
{
setModified(FILTER_RESTART);
}
+
+ // Cancel out UUID once the search string is modified
+ if (mFilterOps.mFilterTypes == FILTERTYPE_UUID)
+ {
+ mFilterOps.mFilterTypes &= ~FILTERTYPE_UUID;
+ mFilterOps.mFilterUUID == LLUUID::null;
+ setModified(FILTER_RESTART);
+ }
}
}
@@ -298,12 +375,18 @@ void LLInventoryFilter::setDateRangeLastLogoff(BOOL sl)
}
}
-BOOL LLInventoryFilter::isSinceLogoff()
+BOOL LLInventoryFilter::isSinceLogoff() const
{
return (mFilterOps.mMinDate == (time_t)mLastLogoff) &&
(mFilterOps.mMaxDate == time_max());
}
+void LLInventoryFilter::clearModified()
+{
+ mModified = FALSE;
+ mFilterBehavior = FILTER_NONE;
+}
+
void LLInventoryFilter::setHoursAgo(U32 hours)
{
if (mFilterOps.mHoursAgo != hours)
@@ -417,12 +500,12 @@ void LLInventoryFilter::setModified(EFilterBehavior behavior)
}
}
-BOOL LLInventoryFilter::isFilterWith(LLInventoryType::EType t)
+BOOL LLInventoryFilter::isFilterObjectTypesWith(LLInventoryType::EType t) const
{
- return mFilterOps.mFilterTypes & (1LL << t);
+ return mFilterOps.mFilterObjectTypes & (1LL << t);
}
-std::string LLInventoryFilter::getFilterText()
+const std::string& LLInventoryFilter::getFilterText()
{
if (!mNeedTextRebuild)
{
@@ -437,7 +520,7 @@ std::string LLInventoryFilter::getFilterText()
S32 num_filter_types = 0;
mFilterText.clear();
- if (isFilterWith(LLInventoryType::IT_ANIMATION))
+ if (isFilterObjectTypesWith(LLInventoryType::IT_ANIMATION))
{
//filtered_types += " Animations,";
filtered_types += LLTrans::getString("Animations");
@@ -452,7 +535,7 @@ std::string LLInventoryFilter::getFilterText()
filtered_by_all_types = FALSE;
}
- if (isFilterWith(LLInventoryType::IT_CALLINGCARD))
+ if (isFilterObjectTypesWith(LLInventoryType::IT_CALLINGCARD))
{
//filtered_types += " Calling Cards,";
filtered_types += LLTrans::getString("Calling Cards");
@@ -466,7 +549,7 @@ std::string LLInventoryFilter::getFilterText()
filtered_by_all_types = FALSE;
}
- if (isFilterWith(LLInventoryType::IT_WEARABLE))
+ if (isFilterObjectTypesWith(LLInventoryType::IT_WEARABLE))
{
//filtered_types += " Clothing,";
filtered_types += LLTrans::getString("Clothing");
@@ -480,7 +563,7 @@ std::string LLInventoryFilter::getFilterText()
filtered_by_all_types = FALSE;
}
- if (isFilterWith(LLInventoryType::IT_GESTURE))
+ if (isFilterObjectTypesWith(LLInventoryType::IT_GESTURE))
{
//filtered_types += " Gestures,";
filtered_types += LLTrans::getString("Gestures");
@@ -494,7 +577,7 @@ std::string LLInventoryFilter::getFilterText()
filtered_by_all_types = FALSE;
}
- if (isFilterWith(LLInventoryType::IT_LANDMARK))
+ if (isFilterObjectTypesWith(LLInventoryType::IT_LANDMARK))
{
//filtered_types += " Landmarks,";
filtered_types += LLTrans::getString("Landmarks");
@@ -508,7 +591,7 @@ std::string LLInventoryFilter::getFilterText()
filtered_by_all_types = FALSE;
}
- if (isFilterWith(LLInventoryType::IT_NOTECARD))
+ if (isFilterObjectTypesWith(LLInventoryType::IT_NOTECARD))
{
//filtered_types += " Notecards,";
filtered_types += LLTrans::getString("Notecards");
@@ -522,7 +605,7 @@ std::string LLInventoryFilter::getFilterText()
filtered_by_all_types = FALSE;
}
- if (isFilterWith(LLInventoryType::IT_OBJECT) && isFilterWith(LLInventoryType::IT_ATTACHMENT))
+ if (isFilterObjectTypesWith(LLInventoryType::IT_OBJECT) && isFilterObjectTypesWith(LLInventoryType::IT_ATTACHMENT))
{
//filtered_types += " Objects,";
filtered_types += LLTrans::getString("Objects");
@@ -536,7 +619,7 @@ std::string LLInventoryFilter::getFilterText()
filtered_by_all_types = FALSE;
}
- if (isFilterWith(LLInventoryType::IT_LSL))
+ if (isFilterObjectTypesWith(LLInventoryType::IT_LSL))
{
//filtered_types += " Scripts,";
filtered_types += LLTrans::getString("Scripts");
@@ -550,7 +633,7 @@ std::string LLInventoryFilter::getFilterText()
filtered_by_all_types = FALSE;
}
- if (isFilterWith(LLInventoryType::IT_SOUND))
+ if (isFilterObjectTypesWith(LLInventoryType::IT_SOUND))
{
//filtered_types += " Sounds,";
filtered_types += LLTrans::getString("Sounds");
@@ -564,7 +647,7 @@ std::string LLInventoryFilter::getFilterText()
filtered_by_all_types = FALSE;
}
- if (isFilterWith(LLInventoryType::IT_TEXTURE))
+ if (isFilterObjectTypesWith(LLInventoryType::IT_TEXTURE))
{
//filtered_types += " Textures,";
filtered_types += LLTrans::getString("Textures");
@@ -578,7 +661,7 @@ std::string LLInventoryFilter::getFilterText()
filtered_by_all_types = FALSE;
}
- if (isFilterWith(LLInventoryType::IT_SNAPSHOT))
+ if (isFilterObjectTypesWith(LLInventoryType::IT_SNAPSHOT))
{
//filtered_types += " Snapshots,";
filtered_types += LLTrans::getString("Snapshots");
@@ -619,9 +702,9 @@ std::string LLInventoryFilter::getFilterText()
return mFilterText;
}
-void LLInventoryFilter::toLLSD(LLSD& data)
+void LLInventoryFilter::toLLSD(LLSD& data) const
{
- data["filter_types"] = (LLSD::Integer)getFilterTypes();
+ data["filter_types"] = (LLSD::Integer)getFilterObjectTypes();
data["min_date"] = (LLSD::Integer)getMinDate();
data["max_date"] = (LLSD::Integer)getMaxDate();
data["hours_ago"] = (LLSD::Integer)getHoursAgo();
@@ -636,7 +719,7 @@ void LLInventoryFilter::fromLLSD(LLSD& data)
{
if(data.has("filter_types"))
{
- setFilterTypes((U32)data["filter_types"].asInteger());
+ setFilterObjectTypes((U32)data["filter_types"].asInteger());
}
if(data.has("min_date") && data.has("max_date"))
@@ -674,3 +757,71 @@ void LLInventoryFilter::fromLLSD(LLSD& data)
setDateRangeLastLogoff((bool)data["since_logoff"].asBoolean());
}
}
+
+U32 LLInventoryFilter::getFilterObjectTypes() const
+{
+ return mFilterOps.mFilterObjectTypes;
+}
+
+BOOL LLInventoryFilter::hasFilterString() const
+{
+ return mFilterSubString.size() > 0;
+}
+
+PermissionMask LLInventoryFilter::getFilterPermissions() const
+{
+ return mFilterOps.mPermissions;
+}
+
+time_t LLInventoryFilter::getMinDate() const
+{
+ return mFilterOps.mMinDate;
+}
+
+time_t LLInventoryFilter::getMaxDate() const
+{
+ return mFilterOps.mMaxDate;
+}
+U32 LLInventoryFilter::getHoursAgo() const
+{
+ return mFilterOps.mHoursAgo;
+}
+LLInventoryFilter::EFolderShow LLInventoryFilter::getShowFolderState() const
+{
+ return mFilterOps.mShowFolderState;
+}
+U32 LLInventoryFilter::getSortOrder() const
+{
+ return mOrder;
+}
+const std::string& LLInventoryFilter::getName() const
+{
+ return mName;
+}
+
+void LLInventoryFilter::setFilterCount(S32 count)
+{
+ mFilterCount = count;
+}
+S32 LLInventoryFilter::getFilterCount() const
+{
+ return mFilterCount;
+}
+
+void LLInventoryFilter::decrementFilterCount()
+{
+ mFilterCount--;
+}
+
+S32 LLInventoryFilter::getCurrentGeneration() const
+{
+ return mFilterGeneration;
+}
+S32 LLInventoryFilter::getMinRequiredGeneration() const
+{
+ return mMinRequiredGeneration;
+}
+S32 LLInventoryFilter::getMustPassGeneration() const
+{
+ return mMustPassGeneration;
+}
diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h
index b803df110b..d65fb8f27c 100644
--- a/indra/newview/llinventoryfilter.h
+++ b/indra/newview/llinventoryfilter.h
@@ -33,30 +33,38 @@
#ifndef LLINVENTORYFILTER_H
#define LLINVENTORYFILTER_H
-// lots of includes here
#include "llinventorytype.h"
-#include "llpermissionsflags.h" // PermissionsMask
+#include "llpermissionsflags.h"
class LLFolderViewItem;
class LLInventoryFilter
{
public:
- typedef enum e_folder_show
+ enum EFolderShow
{
SHOW_ALL_FOLDERS,
SHOW_NON_EMPTY_FOLDERS,
SHOW_NO_FOLDERS
- } EFolderShow;
+ };
- typedef enum e_filter_behavior
+ enum EFilterBehavior
{
FILTER_NONE, // nothing to do, already filtered
FILTER_RESTART, // restart filtering from scratch
FILTER_LESS_RESTRICTIVE, // existing filtered items will certainly pass this filter
FILTER_MORE_RESTRICTIVE // if you didn't pass the previous filter, you definitely won't pass this one
- } EFilterBehavior;
+ };
+
+ enum EFilterType
+ {
+ FILTERTYPE_NONE = 0,
+ FILTERTYPE_OBJECT = 1, // normal default search-by-object-type
+ FILTERTYPE_CATEGORY = 2, // search by folder type
+ FILTERTYPE_UUID = 4 // find the object with UUID and any links to it
+ };
+ // REFACTOR: Change this to an enum.
static const U32 SO_DATE = 1;
static const U32 SO_FOLDERS_BY_NAME = 2;
static const U32 SO_SYSTEM_FOLDERS_TO_TOP = 4;
@@ -64,89 +72,121 @@ public:
LLInventoryFilter(const std::string& name);
virtual ~LLInventoryFilter();
- void setFilterTypes(U64 types, BOOL filter_for_categories = FALSE); // if filter_for_categories is true, operate on folder preferred asset type
- U32 getFilterTypes() const { return mFilterOps.mFilterTypes; }
-
- void setFilterSubString(const std::string& string);
- const std::string getFilterSubString(BOOL trim = FALSE);
-
- void setFilterPermissions(PermissionMask perms);
- PermissionMask getFilterPermissions() const { return mFilterOps.mPermissions; }
-
- void setDateRange(time_t min_date, time_t max_date);
- void setDateRangeLastLogoff(BOOL sl);
- time_t getMinDate() const { return mFilterOps.mMinDate; }
- time_t getMaxDate() const { return mFilterOps.mMaxDate; }
-
- void setHoursAgo(U32 hours);
- U32 getHoursAgo() const { return mFilterOps.mHoursAgo; }
-
- void setShowFolderState( EFolderShow state);
- EFolderShow getShowFolderState() { return mFilterOps.mShowFolderState; }
-
- void setSortOrder(U32 order);
- U32 getSortOrder() { return mOrder; }
-
- BOOL check(LLFolderViewItem* item);
+ // +-------------------------------------------------------------------+
+ // + Execution And Results
+ // +-------------------------------------------------------------------+
+ BOOL check(const LLFolderViewItem* item);
+ BOOL checkAgainstFilterType(const LLFolderViewItem* item);
std::string::size_type getStringMatchOffset() const;
- BOOL isActive();
- BOOL isNotDefault();
- BOOL isModified();
- BOOL isModifiedAndClear();
- BOOL isSinceLogoff();
- bool hasFilterString() { return mFilterSubString.size() > 0; }
- void clearModified() { mModified = FALSE; mFilterBehavior = FILTER_NONE; }
- const std::string getName() const { return mName; }
- std::string getFilterText();
- void setFilterCount(S32 count) { mFilterCount = count; }
- S32 getFilterCount() { return mFilterCount; }
- void decrementFilterCount() { mFilterCount--; }
+ // +-------------------------------------------------------------------+
+ // + Parameters
+ // +-------------------------------------------------------------------+
+ void setFilterObjectTypes(U64 types);
+ U32 getFilterObjectTypes() const;
+ BOOL isFilterObjectTypesWith(LLInventoryType::EType t) const;
+ void setFilterCategoryTypes(U64 types);
+ void setFilterUUID(const LLUUID &object_id);
+
+ void setFilterSubString(const std::string& string);
+ const std::string& getFilterSubString(BOOL trim = FALSE) const;
+ BOOL hasFilterString() const;
+
+ void setFilterPermissions(PermissionMask perms);
+ PermissionMask getFilterPermissions() const;
+
+ void setDateRange(time_t min_date, time_t max_date);
+ void setDateRangeLastLogoff(BOOL sl);
+ time_t getMinDate() const;
+ time_t getMaxDate() const;
+
+ void setHoursAgo(U32 hours);
+ U32 getHoursAgo() const;
+
+ void setShowFolderState( EFolderShow state);
+ EFolderShow getShowFolderState() const;
+
+ void setSortOrder(U32 order);
+ U32 getSortOrder() const;
+
+ // +-------------------------------------------------------------------+
+ // + Status
+ // +-------------------------------------------------------------------+
+ BOOL isActive() const;
+ BOOL isModified() const;
+ BOOL isModifiedAndClear();
+ BOOL isSinceLogoff() const;
+ void clearModified();
+ const std::string& getName() const;
+ const std::string& getFilterText();
+ //RN: this is public to allow system to externally force a global refilter
+ void setModified(EFilterBehavior behavior = FILTER_RESTART);
+
+ // +-------------------------------------------------------------------+
+ // + Count
+ // +-------------------------------------------------------------------+
+ void setFilterCount(S32 count);
+ S32 getFilterCount() const;
+ void decrementFilterCount();
+
+ // +-------------------------------------------------------------------+
+ // + Default
+ // +-------------------------------------------------------------------+
+ BOOL isNotDefault() const;
+ void markDefault();
+ void resetDefault();
+
+ // +-------------------------------------------------------------------+
+ // + Generation
+ // +-------------------------------------------------------------------+
+ S32 getCurrentGeneration() const;
+ S32 getMinRequiredGeneration() const;
+ S32 getMustPassGeneration() const;
+
+ // +-------------------------------------------------------------------+
+ // + Conversion
+ // +-------------------------------------------------------------------+
+ void toLLSD(LLSD& data) const;
+ void fromLLSD(LLSD& data);
- void markDefault();
- void resetDefault();
+private:
+ struct FilterOps
+ {
+ FilterOps();
+ U32 mFilterTypes;
- BOOL isFilterWith(LLInventoryType::EType t);
+ U64 mFilterObjectTypes; // For _ITEM
+ U64 mFilterCategoryTypes; // For _ITEM
+ LLUUID mFilterUUID; // for UUID
- S32 getCurrentGeneration() const { return mFilterGeneration; }
- S32 getMinRequiredGeneration() const { return mMinRequiredGeneration; }
- S32 getMustPassGeneration() const { return mMustPassGeneration; }
+ time_t mMinDate;
+ time_t mMaxDate;
+ U32 mHoursAgo;
+ EFolderShow mShowFolderState;
+ PermissionMask mPermissions;
+ };
- //RN: this is public to allow system to externally force a global refilter
- void setModified(EFilterBehavior behavior = FILTER_RESTART);
+ U32 mOrder;
+ U32 mLastLogoff;
- void toLLSD(LLSD& data);
- void fromLLSD(LLSD& data);
+ FilterOps mFilterOps;
+ FilterOps mDefaultFilterOps;
-protected:
- struct filter_ops
- {
- U64 mFilterTypes;
- BOOL mFilterForCategories;
- time_t mMinDate;
- time_t mMaxDate;
- U32 mHoursAgo;
- EFolderShow mShowFolderState;
- PermissionMask mPermissions;
- };
- filter_ops mFilterOps;
- filter_ops mDefaultFilterOps;
std::string::size_type mSubStringMatchOffset;
- std::string mFilterSubString;
- U32 mOrder;
- const std::string mName;
- S32 mFilterGeneration;
- S32 mMustPassGeneration;
- S32 mMinRequiredGeneration;
- S32 mFilterCount;
- S32 mNextFilterGeneration;
- EFilterBehavior mFilterBehavior;
+ std::string mFilterSubString;
+ const std::string mName;
-private:
- U32 mLastLogoff;
- BOOL mModified;
- BOOL mNeedTextRebuild;
- std::string mFilterText;
+ S32 mFilterGeneration;
+ S32 mMustPassGeneration;
+ S32 mMinRequiredGeneration;
+ S32 mNextFilterGeneration;
+
+ S32 mFilterCount;
+ EFilterBehavior mFilterBehavior;
+
+ BOOL mModified;
+ BOOL mNeedTextRebuild;
+ std::string mFilterText;
};
#endif
diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h
index 95cc68ddbe..9916a2351c 100644
--- a/indra/newview/llinventoryfunctions.h
+++ b/indra/newview/llinventoryfunctions.h
@@ -34,32 +34,9 @@
#ifndef LL_LLINVENTORYFUNCTIONS_H
#define LL_LLINVENTORYFUNCTIONS_H
-#include "llassetstorage.h"
-#include "lldarray.h"
-#include "llfloater.h"
-#include "llinventory.h"
-#include "llinventoryfilter.h"
+#include "llinventorytype.h"
#include "llfolderview.h"
-#include "llinventorymodel.h"
-#include "lluictrlfactory.h"
-#include <set>
-
-
-class LLFolderViewItem;
-class LLInventoryFilter;
-class LLInventoryModel;
-class LLInventoryPanel;
-class LLInvFVBridge;
-class LLInventoryFVBridgeBuilder;
-class LLMenuBarGL;
-class LLCheckBoxCtrl;
-class LLSpinCtrl;
-class LLScrollContainer;
-class LLTextBox;
-class LLIconCtrl;
-class LLSaveFolderState;
-class LLFilterEditor;
-class LLTabContainer;
+#include "llfolderviewitem.h"
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 9f96ebc366..fb9be1e04f 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -36,10 +36,10 @@
#include "llagent.h"
#include "llagentwearables.h"
#include "llinventorypanel.h"
-#include "llfloaterinventory.h"
#include "llinventorybridge.h"
#include "llinventoryfunctions.h"
#include "llinventoryobserver.h"
+#include "llinventorypanel.h"
#include "llnotificationsutil.h"
#include "llwindow.h"
#include "llviewercontrol.h"
@@ -211,6 +211,25 @@ BOOL LLInventoryModel::isObjectDescendentOf(const LLUUID& obj_id,
return FALSE;
}
+const LLViewerInventoryCategory *LLInventoryModel::getFirstNondefaultParent(const LLUUID& obj_id) const
+{
+ const LLInventoryObject* obj = getObject(obj_id);
+ const LLUUID& parent_id = obj->getParentUUID();
+ while (!parent_id.isNull())
+ {
+ const LLViewerInventoryCategory *cat = getCategory(parent_id);
+ if (!cat) break;
+ const LLFolderType::EType folder_type = cat->getPreferredType();
+ if (folder_type != LLFolderType::FT_NONE &&
+ folder_type != LLFolderType::FT_ROOT_INVENTORY &&
+ !LLFolderType::lookupIsEnsembleType(folder_type))
+ {
+ return cat;
+ }
+ }
+ return NULL;
+}
+
// Get the object by id. Returns NULL if not found.
LLInventoryObject* LLInventoryModel::getObject(const LLUUID& id) const
{
@@ -871,46 +890,48 @@ void LLInventoryModel::moveObject(const LLUUID& object_id, const LLUUID& cat_id)
// Delete a particular inventory object by ID.
void LLInventoryModel::deleteObject(const LLUUID& id)
{
- // Disabling this; let users manually purge linked objects.
- // purgeLinkedObjects(id);
lldebugs << "LLInventoryModel::deleteObject()" << llendl;
LLPointer<LLInventoryObject> obj = getObject(id);
- if(obj)
+ if (!obj)
{
- lldebugs << "Deleting inventory object " << id << llendl;
- mLastItem = NULL;
- LLUUID parent_id = obj->getParentUUID();
- mCategoryMap.erase(id);
- mItemMap.erase(id);
- //mInventory.erase(id);
- item_array_t* item_list = getUnlockedItemArray(parent_id);
- if(item_list)
- {
- LLViewerInventoryItem* item = (LLViewerInventoryItem*)((LLInventoryObject*)obj);
- item_list->removeObj(item);
- }
- cat_array_t* cat_list = getUnlockedCatArray(parent_id);
- if(cat_list)
- {
- LLViewerInventoryCategory* cat = (LLViewerInventoryCategory*)((LLInventoryObject*)obj);
- cat_list->removeObj(cat);
- }
- item_list = getUnlockedItemArray(id);
- if(item_list)
- {
- delete item_list;
- mParentChildItemTree.erase(id);
- }
- cat_list = getUnlockedCatArray(id);
- if(cat_list)
- {
- delete cat_list;
- mParentChildCategoryTree.erase(id);
- }
- addChangedMask(LLInventoryObserver::REMOVE, id);
- obj = NULL; // delete obj
- gInventory.notifyObservers();
+ llwarns << "Deleting non-existent object [ id: " << id << " ] " << llendl;
+ return;
}
+
+ lldebugs << "Deleting inventory object " << id << llendl;
+ mLastItem = NULL;
+ LLUUID parent_id = obj->getParentUUID();
+ mCategoryMap.erase(id);
+ mItemMap.erase(id);
+ //mInventory.erase(id);
+ item_array_t* item_list = getUnlockedItemArray(parent_id);
+ if(item_list)
+ {
+ LLViewerInventoryItem* item = (LLViewerInventoryItem*)((LLInventoryObject*)obj);
+ item_list->removeObj(item);
+ }
+ cat_array_t* cat_list = getUnlockedCatArray(parent_id);
+ if(cat_list)
+ {
+ LLViewerInventoryCategory* cat = (LLViewerInventoryCategory*)((LLInventoryObject*)obj);
+ cat_list->removeObj(cat);
+ }
+ item_list = getUnlockedItemArray(id);
+ if(item_list)
+ {
+ delete item_list;
+ mParentChildItemTree.erase(id);
+ }
+ cat_list = getUnlockedCatArray(id);
+ if(cat_list)
+ {
+ delete cat_list;
+ mParentChildCategoryTree.erase(id);
+ }
+ addChangedMask(LLInventoryObserver::REMOVE, id);
+ obj = NULL; // delete obj
+ updateLinkedObjectsFromPurge(id);
+ gInventory.notifyObservers();
}
// Delete a particular inventory item by ID, and remove it from the server.
@@ -926,26 +947,23 @@ void LLInventoryModel::purgeObject(const LLUUID &id)
}
}
-void LLInventoryModel::purgeLinkedObjects(const LLUUID &id)
+void LLInventoryModel::updateLinkedObjectsFromPurge(const LLUUID &baseobj_id)
{
- LLInventoryObject* objectp = getObject(id);
- if (!objectp) return;
-
- if (objectp->getIsLinkType())
- {
- return;
- }
+ LLInventoryModel::item_array_t item_array = collectLinkedItems(baseobj_id);
- LLInventoryModel::item_array_t item_array = collectLinkedItems(id);
-
- for (LLInventoryModel::item_array_t::iterator iter = item_array.begin();
+ // REBUILD is expensive, so clear the current change list first else
+ // everything else on the changelist will also get rebuilt.
+ gInventory.notifyObservers();
+ for (LLInventoryModel::item_array_t::const_iterator iter = item_array.begin();
iter != item_array.end();
iter++)
{
- LLViewerInventoryItem *linked_item = (*iter);
- if (linked_item->getUUID() == id) continue;
- purgeObject(linked_item->getUUID());
+ const LLViewerInventoryItem *linked_item = (*iter);
+ const LLUUID &item_id = linked_item->getUUID();
+ if (item_id == baseobj_id) continue;
+ addChangedMask(LLInventoryObserver::REBUILD, item_id);
}
+ gInventory.notifyObservers();
}
// This is a method which collects the descendents of the id
@@ -3048,10 +3066,10 @@ void LLInventoryModel::processUpdateInventoryFolder(LLMessageSystem* msg,
gInventory.notifyObservers();
// *HACK: Do the 'show' logic for a new item in the inventory.
- LLFloaterInventory* view = LLFloaterInventory::getActiveInventory();
- if(view)
+ LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel();
+ if (active_panel)
{
- view->getPanel()->setSelection(lastfolder->getUUID(), TAKE_FOCUS_NO);
+ active_panel->setSelection(lastfolder->getUUID(), TAKE_FOCUS_NO);
}
}
diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h
index 50f54cb842..b744d821c7 100644
--- a/indra/newview/llinventorymodel.h
+++ b/indra/newview/llinventorymodel.h
@@ -82,6 +82,8 @@ public:
// These are used a lot...
typedef LLDynamicArray<LLPointer<LLViewerInventoryCategory> > cat_array_t;
typedef LLDynamicArray<LLPointer<LLViewerInventoryItem> > item_array_t;
+ typedef std::set<LLUUID> changed_items_t;
+
// construction & destruction
LLInventoryModel();
~LLInventoryModel();
@@ -106,10 +108,12 @@ public:
// Accessors
//
- // This is a convenience function to check if one object has a
- // parent chain up to the category specified by UUID.
+ // Check if one object has a parent chain up to the category specified by UUID.
BOOL isObjectDescendentOf(const LLUUID& obj_id, const LLUUID& cat_id) const;
+ // Get whatever special folder this object is a child of, if any.
+ const LLViewerInventoryCategory *getFirstNondefaultParent(const LLUUID& obj_id) const;
+
// Get the object by id. Returns NULL if not found.
// * WARNING: use the pointer returned for read operations - do
// not modify the object values in place or you will break stuff.
@@ -214,9 +218,9 @@ public:
void deleteObject(const LLUUID& id);
// delete a particular inventory object by ID, and delete it from
- // the server. Also purges linked items via purgeLinkedObjects.
+ // the server. Also updates linked items.
void purgeObject(const LLUUID& id);
- void purgeLinkedObjects(const LLUUID& id);
+ void updateLinkedObjectsFromPurge(const LLUUID& baseobj_id);
// This is a method which collects the descendants of the id
// provided. If the category is not found, no action is
@@ -269,7 +273,7 @@ public:
// that the next notify will include that notification.
void addChangedMask(U32 mask, const LLUUID& referent);
- const std::set<LLUUID>& getChangedIDs() { return mChangedItemIDs; }
+ const changed_items_t& getChangedIDs() const { return mChangedItemIDs; }
// This method to prepares a set of mock inventory which provides
// minimal functionality before the actual arrival of inventory.
@@ -451,7 +455,6 @@ protected:
private:
// Variables used to track what has changed since the last notify.
U32 mModifyMask;
- typedef std::set<LLUUID> changed_items_t;
changed_items_t mChangedItemIDs;
std::map<LLUUID, bool> mCategoryLock;
diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h
index 4ee6c48cb1..99e6dbe3c8 100644
--- a/indra/newview/llinventoryobserver.h
+++ b/indra/newview/llinventoryobserver.h
@@ -56,11 +56,12 @@ public:
{
NONE = 0,
LABEL = 1, // name changed
- INTERNAL = 2, // internal change, eg, asset uuid different
+ INTERNAL = 2, // internal change (e.g. asset uuid different)
ADD = 4, // something added
REMOVE = 8, // something deleted
- STRUCTURE = 16, // structural change, eg, item or folder moved
- CALLING_CARD = 32, // online, grant status, cancel, etc change
+ STRUCTURE = 16, // structural change (eg item or folder moved)
+ CALLING_CARD = 32, // (eg online, grant status, cancel)
+ REBUILD = 64, // item UI changed (eg item type different)
ALL = 0xffffffff
};
LLInventoryObserver();
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 0c893dddd6..4cbf27b725 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -31,20 +31,22 @@
*/
#include "llviewerprecompiledheaders.h"
+#include "llinventorypanel.h"
#include <utility> // for std::pair<>
-#include "llinventorypanel.h"
-
#include "llagent.h"
#include "llagentwearables.h"
#include "llappearancemgr.h"
+#include "llfloaterinventory.h"
#include "llfloaterreg.h"
+#include "llimfloater.h"
#include "llimview.h"
#include "llinventorybridge.h"
+#include "llsidepanelinventory.h"
+#include "llsidetray.h"
#include "llscrollcontainer.h"
#include "llviewerfoldertype.h"
-#include "llimfloater.h"
#include "llvoavatarself.h"
static LLDefaultChildRegistry::Register<LLInventoryPanel> r("inventory_panel");
@@ -65,7 +67,10 @@ class LLInventoryPanelObserver : public LLInventoryObserver
public:
LLInventoryPanelObserver(LLInventoryPanel* ip) : mIP(ip) {}
virtual ~LLInventoryPanelObserver() {}
- virtual void changed(U32 mask);
+ virtual void changed(U32 mask)
+ {
+ mIP->modelChanged(mask);
+ }
protected:
LLInventoryPanel* mIP;
};
@@ -109,7 +114,7 @@ BOOL LLInventoryPanel::postBuild()
mCommitCallbackRegistrar.pushScope(); // registered as a widget; need to push callback scope ourselves
- // create root folder
+ // Create root folder
{
LLRect folder_rect(0,
0,
@@ -128,7 +133,7 @@ BOOL LLInventoryPanel::postBuild()
mFolders->setCallbackRegistrar(&mCommitCallbackRegistrar);
- // scroller
+ // Scroller
{
LLRect scroller_view_rect = getRect();
scroller_view_rect.translate(-scroller_view_rect.mLeft, -scroller_view_rect.mBottom);
@@ -139,23 +144,21 @@ BOOL LLInventoryPanel::postBuild()
p.reserve_scroll_corner(true);
p.tab_stop(true);
mScroller = LLUICtrlFactory::create<LLScrollContainer>(p);
+ addChild(mScroller);
+ mScroller->addChild(mFolders);
+ mFolders->setScrollContainer(mScroller);
}
- addChild(mScroller);
- mScroller->addChild(mFolders);
-
- mFolders->setScrollContainer(mScroller);
- // set up the callbacks from the inventory we're viewing, and then
- // build everything.
+ // Set up the callbacks from the inventory we're viewing, and then build everything.
mInventoryObserver = new LLInventoryPanelObserver(this);
mInventory->addObserver(mInventoryObserver);
- // build view of inventory if we need default full hierarchy and inventory ready, otherwise wait for modelChanged() callback
+ // Build view of inventory if we need default full hierarchy and inventory ready,
+ // otherwise wait for idle callback.
if (mBuildDefaultHierarchy && mInventory->isInventoryUsable() && !mViewsInitialized)
{
initializeViews();
}
-
gIdleCallbacks.addFunction(onIdle, (void*)this);
if (mSortOrderSetting != INHERIT_SORT_ORDER)
@@ -166,14 +169,13 @@ BOOL LLInventoryPanel::postBuild()
{
setSortOrder(gSavedSettings.getU32(DEFAULT_SORT_ORDER));
}
- mFolders->setSortOrder(mFolders->getFilter()->getSortOrder());
+ mFolders->setSortOrder(getFilter()->getSortOrder());
return TRUE;
}
LLInventoryPanel::~LLInventoryPanel()
{
- // should this be a global setting?
if (mFolders)
{
U32 sort_order = mFolders->getSortOrder();
@@ -189,39 +191,44 @@ LLInventoryPanel::~LLInventoryPanel()
mScroller = NULL;
}
-LLMemType mt(LLMemType::MTYPE_INVENTORY_FROM_XML); // ! BUG ! Should this be removed?
void LLInventoryPanel::draw()
{
- // select the desired item (in case it wasn't loaded when the selection was requested)
+ // Select the desired item (in case it wasn't loaded when the selection was requested)
mFolders->updateSelection();
LLPanel::draw();
}
LLInventoryFilter* LLInventoryPanel::getFilter()
{
- if (mFolders) return mFolders->getFilter();
+ if (mFolders)
+ {
+ return mFolders->getFilter();
+ }
return NULL;
}
-void LLInventoryPanel::setFilterTypes(U64 filter_types, BOOL filter_for_categories)
+void LLInventoryPanel::setFilterTypes(U64 types, LLInventoryFilter::EFilterType filter_type)
{
- mFolders->getFilter()->setFilterTypes(filter_types, filter_for_categories);
-}
+ if (filter_type == LLInventoryFilter::FILTERTYPE_OBJECT)
+ getFilter()->setFilterObjectTypes(types);
+ if (filter_type == LLInventoryFilter::FILTERTYPE_CATEGORY)
+ getFilter()->setFilterCategoryTypes(types);
+}
void LLInventoryPanel::setFilterPermMask(PermissionMask filter_perm_mask)
{
- mFolders->getFilter()->setFilterPermissions(filter_perm_mask);
+ getFilter()->setFilterPermissions(filter_perm_mask);
}
void LLInventoryPanel::setFilterSubString(const std::string& string)
{
- mFolders->getFilter()->setFilterSubString(string);
+ getFilter()->setFilterSubString(string);
}
void LLInventoryPanel::setSortOrder(U32 order)
{
- mFolders->getFilter()->setSortOrder(order);
- if (mFolders->getFilter()->isModified())
+ getFilter()->setSortOrder(order);
+ if (getFilter()->isModified())
{
mFolders->setSortOrder(order);
// try to keep selection onscreen, even if it wasn't to start with
@@ -231,151 +238,170 @@ void LLInventoryPanel::setSortOrder(U32 order)
void LLInventoryPanel::setSinceLogoff(BOOL sl)
{
- mFolders->getFilter()->setDateRangeLastLogoff(sl);
+ getFilter()->setDateRangeLastLogoff(sl);
}
void LLInventoryPanel::setHoursAgo(U32 hours)
{
- mFolders->getFilter()->setHoursAgo(hours);
+ getFilter()->setHoursAgo(hours);
}
void LLInventoryPanel::setShowFolderState(LLInventoryFilter::EFolderShow show)
{
- mFolders->getFilter()->setShowFolderState(show);
+ getFilter()->setShowFolderState(show);
}
LLInventoryFilter::EFolderShow LLInventoryPanel::getShowFolderState()
{
- return mFolders->getFilter()->getShowFolderState();
+ return getFilter()->getShowFolderState();
}
-static LLFastTimer::DeclareTimer FTM_REFRESH("Inventory Refresh");
-
void LLInventoryPanel::modelChanged(U32 mask)
{
+ static LLFastTimer::DeclareTimer FTM_REFRESH("Inventory Refresh");
LLFastTimer t2(FTM_REFRESH);
bool handled = false;
- if (!mViewsInitialized)
- {
- return;
- }
+ if (!mViewsInitialized) return;
- if (mask & LLInventoryObserver::LABEL)
- {
- handled = true;
- // label change - empty out the display name for each object
- // in this change set.
- const std::set<LLUUID>& changed_items = gInventory.getChangedIDs();
- std::set<LLUUID>::const_iterator id_it = changed_items.begin();
- std::set<LLUUID>::const_iterator id_end = changed_items.end();
- LLFolderViewItem* view = NULL;
- LLInvFVBridge* bridge = NULL;
- for (;id_it != id_end; ++id_it)
+ const LLInventoryModel* model = getModel();
+ if (!model) return;
+
+ const LLInventoryModel::changed_items_t& changed_items = model->getChangedIDs();
+ if (changed_items.empty()) return;
+
+ for (LLInventoryModel::changed_items_t::const_iterator items_iter = changed_items.begin();
+ items_iter != changed_items.end();
+ ++items_iter)
+ {
+ const LLUUID& item_id = (*items_iter);
+ const LLInventoryObject* model_item = model->getObject(item_id);
+ LLFolderViewItem* view_item = mFolders->getItemByID(item_id);
+
+ //////////////////////////////
+ // LABEL Operation
+ // Empty out the display name for relabel.
+ if (mask & LLInventoryObserver::LABEL)
{
- view = mFolders->getItemByID(*id_it);
- if(view)
+ handled = true;
+ if (view_item)
{
- // request refresh on this item (also flags for filtering)
- bridge = (LLInvFVBridge*)view->getListener();
+ // Request refresh on this item (also flags for filtering)
+ LLInvFVBridge* bridge = (LLInvFVBridge*)view_item->getListener();
if(bridge)
{ // Clear the display name first, so it gets properly re-built during refresh()
bridge->clearDisplayName();
}
- view->refresh();
+ view_item->refresh();
}
}
- }
- // We don't really care which of these masks the item is actually flagged with, since the masks
- // may not be accurate (e.g. in the main inventory panel, I move an item from My Inventory into
- // Landmarks; this is a STRUCTURE change for that panel but is an ADD change for the Landmarks
- // panel). What's relevant is that the item and UI are probably out of sync and thus need to be
- // resynchronized.
- if (mask & (LLInventoryObserver::STRUCTURE |
- LLInventoryObserver::ADD |
- LLInventoryObserver::REMOVE))
- {
- handled = true;
- // Record which folders are open by uuid.
- LLInventoryModel* model = getModel();
- if (model)
+ //////////////////////////////
+ // REBUILD Operation
+ // Destroy and regenerate the UI.
+ if (mask & LLInventoryObserver::REBUILD)
{
- const std::set<LLUUID>& changed_items = gInventory.getChangedIDs();
+ handled = true;
+ if (model_item && view_item)
+ {
+ view_item->destroyView();
+ }
+ buildNewViews(item_id);
+ }
- std::set<LLUUID>::const_iterator id_it = changed_items.begin();
- std::set<LLUUID>::const_iterator id_end = changed_items.end();
- for (;id_it != id_end; ++id_it)
+ //////////////////////////////
+ // INTERNAL Operation
+ // This could be anything. For now, just refresh the item.
+ if (mask & LLInventoryObserver::INTERNAL)
+ {
+ if (view_item)
{
- // sync view with model
- LLInventoryObject* model_item = model->getObject(*id_it);
- LLFolderViewItem* view_item = mFolders->getItemByID(*id_it);
+ view_item->refresh();
+ }
+ }
+
+ // We don't typically care which of these masks the item is actually flagged with, since the masks
+ // may not be accurate (e.g. in the main inventory panel, I move an item from My Inventory into
+ // Landmarks; this is a STRUCTURE change for that panel but is an ADD change for the Landmarks
+ // panel). What's relevant is that the item and UI are probably out of sync and thus need to be
+ // resynchronized.
+ if (mask & (LLInventoryObserver::STRUCTURE |
+ LLInventoryObserver::ADD |
+ LLInventoryObserver::REMOVE))
+ {
+ handled = true;
- // Item exists in memory but a UI element hasn't been created for it.
- if (model_item && !view_item)
+ //////////////////////////////
+ // ADD Operation
+ // Item exists in memory but a UI element hasn't been created for it.
+ if (model_item && !view_item)
+ {
+ // Add the UI element for this item.
+ buildNewViews(item_id);
+ // Select any newly created object that has the auto rename at top of folder root set.
+ if(mFolders->getRoot()->needsAutoRename())
{
- // Add the UI element for this item.
- buildNewViews(*id_it);
- // Select any newly created object that has the auto rename at top of folder root set.
- if(mFolders->getRoot()->needsAutoRename())
- {
- setSelection(*id_it, FALSE);
- }
+ setSelection(item_id, FALSE);
}
+ }
- // This item already exists in both memory and UI. It was probably moved
- // around in the panel's directory structure (i.e. reparented).
- if (model_item && view_item)
+ //////////////////////////////
+ // STRUCTURE Operation
+ // This item already exists in both memory and UI. It was probably reparented.
+ if (model_item && view_item)
+ {
+ // Don't process the item if it's hanging from the root, since its
+ // model_item's parent will be NULL.
+ if (view_item->getRoot() != view_item->getParent())
{
- // Don't process the item if it's hanging from the root, since its
- // model_item's parent will be NULL.
- if (view_item->getRoot() != view_item->getParent())
+ LLFolderViewFolder* new_parent = (LLFolderViewFolder*)mFolders->getItemByID(model_item->getParentUUID());
+ // Item has been moved.
+ if (view_item->getParentFolder() != new_parent)
{
- LLFolderViewFolder* new_parent = (LLFolderViewFolder*)mFolders->getItemByID(model_item->getParentUUID());
- // Item has been moved.
- if (view_item->getParentFolder() != new_parent)
+ if (new_parent != NULL)
{
- if (new_parent != NULL)
- {
- // Item is to be moved and we found its new parent in the panel's directory, so move the item's UI.
- view_item->getParentFolder()->extractItem(view_item);
- view_item->addToFolder(new_parent, mFolders);
- }
- else
- {
- // Item is to be moved outside the panel's directory (e.g. moved to trash for a panel that
- // doesn't include trash). Just remove the item's UI.
- view_item->destroyView();
- }
+ // Item is to be moved and we found its new parent in the panel's directory, so move the item's UI.
+ view_item->getParentFolder()->extractItem(view_item);
+ view_item->addToFolder(new_parent, mFolders);
+ }
+ else
+ {
+ // Item is to be moved outside the panel's directory (e.g. moved to trash for a panel that
+ // doesn't include trash). Just remove the item's UI.
+ view_item->destroyView();
}
}
}
-
- // This item has been removed from memory, but its associated UI element still exists.
- if (!model_item && view_item)
- {
- // Remove the item's UI.
- view_item->destroyView();
- }
+ }
+
+ //////////////////////////////
+ // REMOVE Operation
+ // This item has been removed from memory, but its associated UI element still exists.
+ if (!model_item && view_item)
+ {
+ // Remove the item's UI.
+ view_item->destroyView();
}
}
}
+ /* I don't think we need this code, but not positive -- Seraph
if (!handled)
{
- // it's a small change that only requires a refresh.
+ // It's a small change that only requires a refresh.
// *TODO: figure out a more efficient way to do the refresh
// since it is expensive on large inventories
mFolders->refresh();
}
+ */
}
// static
void LLInventoryPanel::onIdle(void *userdata)
{
LLInventoryPanel *self = (LLInventoryPanel*)userdata;
- // inventory just initialized, do complete build
+ // Inventory just initialized, do complete build
if (!self->mViewsInitialized && gInventory.isInventoryUsable())
{
self->initializeViews();
@@ -388,8 +414,7 @@ void LLInventoryPanel::onIdle(void *userdata)
void LLInventoryPanel::initializeViews()
{
- if (!gInventory.isInventoryUsable())
- return;
+ if (!gInventory.isInventoryUsable()) return;
// Determine the root folder in case specified, and
// build the views starting with that folder.
@@ -412,7 +437,7 @@ void LLInventoryPanel::initializeViews()
void LLInventoryPanel::rebuildViewsFor(const LLUUID& id)
{
- // Destroy the old view for this ID so we can rebuild it
+ // Destroy the old view for this ID so we can rebuild it.
LLFolderViewItem* old_view = mFolders->getItemByID(id);
if (old_view && id.notNull())
{
@@ -437,21 +462,21 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id)
}
else if ((mStartFolderID != LLUUID::null) && (!gInventory.isObjectDescendentOf(id, mStartFolderID)))
{
- // This item exists outside the inventory's hierarchy,
- // so don't add it.
+ // This item exists outside the inventory's hierarchy, so don't add it.
return;
}
if (objectp->getType() <= LLAssetType::AT_NONE ||
objectp->getType() >= LLAssetType::AT_COUNT)
{
- llwarns << "LLInventoryPanel::buildNewViews called with invalid objectp->mType : " <<
- ((S32) objectp->getType()) << " name " << objectp->getName() << " UUID " << objectp->getUUID() << llendl;
+ llwarns << "LLInventoryPanel::buildNewViews called with invalid objectp->mType : "
+ << ((S32) objectp->getType()) << " name " << objectp->getName() << " UUID " << objectp->getUUID()
+ << llendl;
return;
}
- if (objectp->getType() == LLAssetType::AT_CATEGORY &&
- objectp->getActualType() != LLAssetType::AT_LINK_FOLDER)
+ if ((objectp->getType() == LLAssetType::AT_CATEGORY) &&
+ (objectp->getActualType() != LLAssetType::AT_LINK_FOLDER))
{
LLInvFVBridge* new_listener = mInvFVBridgeBuilder->createBridge(objectp->getType(),
objectp->getType(),
@@ -471,9 +496,8 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id)
folderp->setItemSortOrder(mFolders->getSortOrder());
itemp = folderp;
- // Hide the root folder, so we can show the contents of a folder
- // flat but still have the parent folder present for listener-related
- // operations.
+ // Hide the root folder, so we can show the contents of a folder flat
+ // but still have the parent folder present for listener-related operations.
if (id == mStartFolderID)
{
folderp->setDontShowInHierarchy(TRUE);
@@ -482,7 +506,7 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id)
}
else
{
- // Build new view for item
+ // Build new view for item.
LLInventoryItem* item = (LLInventoryItem*)objectp;
LLInvFVBridge* new_listener = mInvFVBridgeBuilder->createBridge(item->getType(),
item->getActualType(),
@@ -518,23 +542,26 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id)
{
LLViewerInventoryCategory::cat_array_t* categories;
LLViewerInventoryItem::item_array_t* items;
-
mInventory->lockDirectDescendentArrays(id, categories, items);
+
if(categories)
{
- S32 count = categories->count();
- for(S32 i = 0; i < count; ++i)
+ for (LLViewerInventoryCategory::cat_array_t::const_iterator cat_iter = categories->begin();
+ cat_iter != categories->end();
+ ++cat_iter)
{
- LLInventoryCategory* cat = categories->get(i);
+ const LLViewerInventoryCategory* cat = (*cat_iter);
buildNewViews(cat->getUUID());
}
}
+
if(items)
{
- S32 count = items->count();
- for(S32 i = 0; i < count; ++i)
+ for (LLViewerInventoryItem::item_array_t::const_iterator item_iter = items->begin();
+ item_iter != items->end();
+ ++item_iter)
{
- LLInventoryItem* item = items->get(i);
+ const LLViewerInventoryItem* item = (*item_iter);
buildNewViews(item->getUUID());
}
}
@@ -562,39 +589,6 @@ void LLInventoryPanel::defaultOpenInventory()
}
}
-struct LLConfirmPurgeData
-{
- LLUUID mID;
- LLInventoryModel* mModel;
-};
-
-class LLIsNotWorn : public LLInventoryCollectFunctor
-{
-public:
- LLIsNotWorn() {}
- virtual ~LLIsNotWorn() {}
- virtual bool operator()(LLInventoryCategory* cat,
- LLInventoryItem* item)
- {
- return !gAgentWearables.isWearingItem(item->getUUID());
- }
-};
-
-class LLOpenFolderByID : public LLFolderViewFunctor
-{
-public:
- LLOpenFolderByID(const LLUUID& id) : mID(id) {}
- virtual ~LLOpenFolderByID() {}
- virtual void doFolder(LLFolderViewFolder* folder)
- {
- if (folder->getListener() && folder->getListener()->getUUID() == mID) folder->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_UP);
- }
- virtual void doItem(LLFolderViewItem* item) {}
-protected:
- const LLUUID& mID;
-};
-
-
void LLInventoryPanel::openSelected()
{
LLFolderViewItem* folder_item = mFolders->getCurSelectedItem();
@@ -659,7 +653,6 @@ void LLInventoryPanel::onFocusReceived()
LLPanel::onFocusReceived();
}
-
void LLInventoryPanel::openAllFolders()
{
mFolders->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_DOWN);
@@ -696,8 +689,6 @@ void LLInventoryPanel::onSelectionChange(const std::deque<LLFolderViewItem*>& it
// Seraph - Put determineFolderType in here for ensemble typing?
}
-//----------------------------------------------------------------------------
-
void LLInventoryPanel::doToSelected(const LLSD& userdata)
{
mFolders->doToSelected(&gInventory, userdata);
@@ -855,55 +846,73 @@ bool LLInventoryPanel::attachObject(const LLSD& userdata)
return true;
}
+BOOL LLInventoryPanel::getSinceLogoff()
+{
+ return getFilter()->isSinceLogoff();
+}
-//----------------------------------------------------------------------------
-
-// static DEBUG ONLY:
+// DEBUG ONLY
+// static
void LLInventoryPanel::dumpSelectionInformation(void* user_data)
{
LLInventoryPanel* iv = (LLInventoryPanel*)user_data;
iv->mFolders->dumpSelectionInformation();
}
-BOOL LLInventoryPanel::getSinceLogoff()
+BOOL is_inventorysp_active()
{
- return mFolders->getFilter()->isSinceLogoff();
+ if (!LLSideTray::getInstance()->isPanelActive("sidepanel_inventory")) return FALSE;
+ LLSidepanelInventory *inventorySP = dynamic_cast<LLSidepanelInventory *>(LLSideTray::getInstance()->getPanel("sidepanel_inventory"));
+ if (!inventorySP) return FALSE;
+ return inventorySP->isMainInventoryPanelActive();
}
-void example_param_block_usage()
+// static
+LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open)
{
- LLInventoryPanel::Params param_block;
- param_block.name(std::string("inventory"));
-
- param_block.sort_order_setting(LLInventoryPanel::RECENTITEMS_SORT_ORDER);
- param_block.allow_multi_select(true);
- param_block.filter(LLInventoryPanel::Filter()
- .sort_order(1)
- .types(0xffff0000));
- param_block.inventory(&gInventory);
- param_block.has_border(true);
-
- LLUICtrlFactory::create<LLInventoryPanel>(param_block);
-
- param_block = LLInventoryPanel::Params();
- param_block.name(std::string("inventory"));
-
- //LLSD param_block_sd;
- //param_block_sd["sort_order_setting"] = LLInventoryPanel::RECENTITEMS_SORT_ORDER;
- //param_block_sd["allow_multi_select"] = true;
- //param_block_sd["filter"]["sort_order"] = 1;
- //param_block_sd["filter"]["types"] = (S32)0xffff0000;
- //param_block_sd["has_border"] = true;
-
- //LLInitParam::LLSDParser(param_block_sd).parse(param_block);
+ // A. If the inventory side panel is open, use that preferably.
+ if (is_inventorysp_active())
+ {
+ LLSidepanelInventory *inventorySP = dynamic_cast<LLSidepanelInventory *>(LLSideTray::getInstance()->getPanel("sidepanel_inventory"));
+ if (inventorySP)
+ {
+ return inventorySP->getActivePanel();
+ }
+ }
+
+ // B. Iterate through the inventory floaters and return whichever is on top.
+ LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("inventory");
+ S32 z_min = S32_MAX;
+ LLInventoryPanel* res = NULL;
+ for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end(); ++iter)
+ {
+ LLFloaterInventory* iv = dynamic_cast<LLFloaterInventory*>(*iter);
+ if (iv && iv->getVisible())
+ {
+ S32 z_order = gFloaterView->getZOrder(iv);
+ if (z_order < z_min)
+ {
+ res = iv->getPanel();
+ z_min = z_order;
+ }
+ }
+ }
+ if (res) return res;
+
+ // C. If no panels are open and we don't want to force open a panel, then just abort out.
+ if (!auto_open) return NULL;
+
+ // D. Open the inventory side panel and use that.
+ LLSideTray *side_tray = LLSideTray::getInstance();
+ LLSidepanelInventory *sidepanel_inventory =
+ dynamic_cast<LLSidepanelInventory *>(side_tray->getPanel("sidepanel_inventory"));
- LLUICtrlFactory::create<LLInventoryPanel>(param_block);
-}
+ // Use the inventory side panel only if it is already active.
+ // Activating it may unexpectedly switch off the currently active tab in some cases.
+ if (sidepanel_inventory && (LLPanel*)side_tray->getActiveTab() == (LLPanel*)sidepanel_inventory)
+ {
+ return sidepanel_inventory->getActivePanel();
+ }
-// +=================================================+
-// | LLInventoryPanelObserver |
-// +=================================================+
-void LLInventoryPanelObserver::changed(U32 mask)
-{
- mIP->modelChanged(mask);
+ return NULL;
}
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index fd83729630..cbbd433c1d 100644
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -126,8 +126,8 @@ public:
void setSelectCallback(const LLFolderView::signal_t::slot_type& cb) { if (mFolders) mFolders->setSelectCallback(cb); }
void clearSelection();
LLInventoryFilter* getFilter();
- void setFilterTypes(U64 filter, BOOL filter_for_categories = FALSE); // if filter_for_categories is true, operate on folder preferred asset type
- U32 getFilterTypes() const { return mFolders->getFilterTypes(); }
+ void setFilterTypes(U64 filter, LLInventoryFilter::EFilterType = LLInventoryFilter::FILTERTYPE_OBJECT);
+ U32 getFilterObjectTypes() const { return mFolders->getFilterObjectTypes(); }
void setFilterPermMask(PermissionMask filter_perm_mask);
U32 getFilterPermMask() const { return mFolders->getFilterPermissions(); }
void setFilterSubString(const std::string& string);
@@ -162,11 +162,10 @@ public:
static void onIdle(void* user_data);
-private:
+ // Find whichever inventory panel is active / on top.
+ // "Auto_open" determines if we open an inventory panel if none are open.
+ static LLInventoryPanel *getActiveInventoryPanel(BOOL auto_open = TRUE);
- // Given the id and the parent, build all of the folder views.
- void rebuildViewsFor(const LLUUID& id);
- virtual void buildNewViews(const LLUUID& id); // made virtual to support derived classes. EXT-719
protected:
void defaultOpenInventory(); // open the first level of inventory
@@ -193,12 +192,14 @@ protected:
public:
BOOL getIsViewsInitialized() const { return mViewsInitialized; }
const LLUUID& getStartFolderID() const { return mStartFolderID; }
-private:
+protected:
// Builds the UI. Call this once the inventory is usable.
void initializeViews();
+ void rebuildViewsFor(const LLUUID& id); // Given the id and the parent, build all of the folder views.
+ virtual void buildNewViews(const LLUUID& id);
+private:
BOOL mBuildDefaultHierarchy; // default inventory hierarchy should be created in postBuild()
BOOL mViewsInitialized; // Views have been generated
-
// UUID of category from which hierarchy should be built. Set with the
// "start_folder" xml property. Default is LLUUID::null that means total Inventory hierarchy.
std::string mStartFolderString;
diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp
index ab26399c1a..98ca339f0c 100644
--- a/indra/newview/lllocationinputctrl.cpp
+++ b/indra/newview/lllocationinputctrl.cpp
@@ -810,13 +810,8 @@ void LLLocationInputCtrl::updateWidgetlayout()
{
const LLRect& rect = getLocalRect();
const LLRect& hist_btn_rect = mButton->getRect();
- LLRect info_btn_rect = mInfoBtn->getRect();
- // info button
- info_btn_rect.setOriginAndSize(
- 2, (rect.getHeight() - info_btn_rect.getHeight()) / 2,
- info_btn_rect.getWidth(), info_btn_rect.getHeight());
- mInfoBtn->setRect(info_btn_rect);
+ // Info button is set in the XUI XML location_input.xml
// "Add Landmark" button
LLRect al_btn_rect = mAddLandmarkBtn->getRect();
@@ -912,7 +907,7 @@ bool LLLocationInputCtrl::onLocationContextMenuItemEnabled(const LLSD& userdata)
}
else if (item == "can_select_all")
{
- return mTextEntry->canSelectAll();
+ return mTextEntry->canSelectAll() && (mTextEntry->getLength() > 0);
}
else if(item == "show_coordinates")
{
diff --git a/indra/newview/llloginhandler.cpp b/indra/newview/llloginhandler.cpp
index 2a1f42c3c4..1be3430e07 100644
--- a/indra/newview/llloginhandler.cpp
+++ b/indra/newview/llloginhandler.cpp
@@ -40,9 +40,12 @@
#include "llurlsimstring.h"
#include "llviewercontrol.h" // gSavedSettings
#include "llviewernetwork.h" // EGridInfo
+#include "llviewerwindow.h" // getWindow()
// library includes
#include "llmd5.h"
+#include "llweb.h"
+#include "llwindow.h"
// Must have instance to auto-register with LLCommandDispatcher
@@ -174,6 +177,32 @@ bool LLLoginHandler::handle(const LLSD& tokens,
return true;
}
+ if (tokens.size() == 1
+ && tokens[0].asString() == "reg")
+ {
+ LLWindow* window = gViewerWindow->getWindow();
+ window->incBusyCount();
+ window->setCursor(UI_CURSOR_ARROW);
+
+ // Do this first, as it may be slow and we want to keep something
+ // on the user's screen as long as possible
+ LLWeb::loadURLExternal( "http://join.eniac15.lindenlab.com/" );
+
+ window->decBusyCount();
+ window->setCursor(UI_CURSOR_ARROW);
+
+ // Then hide the window
+ window->minimize();
+ return true;
+ }
+
+ // Make sure window is visible
+ LLWindow* window = gViewerWindow->getWindow();
+ if (window->getMinimized())
+ {
+ window->restore();
+ }
+
parse(query_map);
//if we haven't initialized stuff yet, this is
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index 955347bce2..7d3da152c1 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -189,8 +189,7 @@ void LLLoginInstance::constructAuthParams(const LLSD& credentials)
bool LLLoginInstance::handleLoginEvent(const LLSD& event)
{
- std::cout << "LoginListener called!: \n";
- std::cout << event << "\n";
+ LL_DEBUGS("Login") << "LoginListener called!: \n" << event << LL_ENDL;
if(!(event.has("state") && event.has("change") && event.has("progress")))
{
diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp
index 9e46a4422a..c17427bec1 100644
--- a/indra/newview/llmoveview.cpp
+++ b/indra/newview/llmoveview.cpp
@@ -603,7 +603,7 @@ BOOL LLPanelStandStopFlying::handleToolTip(S32 x, S32 y, MASK mask)
LLToolTipMgr::instance().show(mStopFlyingButton->getToolTip());
}
- return TRUE;
+ return LLPanel::handleToolTip(x, y, mask);
}
void LLPanelStandStopFlying::reparent(LLFloaterMove* move_view)
diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp
index e65b7d8a0c..9797c01371 100644
--- a/indra/newview/llnavigationbar.cpp
+++ b/indra/newview/llnavigationbar.cpp
@@ -82,9 +82,24 @@ public:
struct Params : public LLInitParam::Block<Params, LLMenuItemCallGL::Params>
{
- Mandatory<EType> item_type;
-
- Params() {}
+ Mandatory<EType> item_type;
+ Optional<const LLFontGL*> back_item_font,
+ current_item_font,
+ forward_item_font;
+ Optional<std::string> back_item_image,
+ forward_item_image;
+ Optional<S32> image_hpad,
+ image_vpad;
+ Params()
+ : item_type(),
+ back_item_font("back_item_font"),
+ current_item_font("current_item_font"),
+ forward_item_font("forward_item_font"),
+ back_item_image("back_item_image"),
+ forward_item_image("forward_item_image"),
+ image_hpad("image_hpad"),
+ image_vpad("image_vpad")
+ {}
};
/*virtual*/ void draw();
@@ -97,33 +112,38 @@ private:
static const S32 ICON_WIDTH = 16;
static const S32 ICON_HEIGHT = 16;
- static const std::string ICON_IMG_BACKWARD;
- static const std::string ICON_IMG_FORWARD;
LLIconCtrl* mArrowIcon;
};
-const std::string LLTeleportHistoryMenuItem::ICON_IMG_BACKWARD("teleport_history_backward.tga");
-const std::string LLTeleportHistoryMenuItem::ICON_IMG_FORWARD("teleport_history_forward.tga");
+static LLDefaultChildRegistry::Register<LLTeleportHistoryMenuItem> r("teleport_history_menu_item");
+
LLTeleportHistoryMenuItem::LLTeleportHistoryMenuItem(const Params& p)
: LLMenuItemCallGL(p),
mArrowIcon(NULL)
{
// Set appearance depending on the item type.
- if (p.item_type == TYPE_CURRENT)
+ if (p.item_type == TYPE_BACKWARD)
+ {
+ setFont( p.back_item_font );
+ setLabel(std::string(" ") + std::string(p.label));
+ }
+ else if (p.item_type == TYPE_CURRENT)
{
- setFont(LLFontGL::getFontSansSerifBold());
+ setFont( p.current_item_font );
}
else
{
- setFont(LLFontGL::getFontSansSerif());
+ setFont( p.forward_item_font );
setLabel(std::string(" ") + std::string(p.label));
}
LLIconCtrl::Params icon_params;
icon_params.name("icon");
- icon_params.rect(LLRect(0, ICON_HEIGHT, ICON_WIDTH, 0));
+ LLRect rect(0, ICON_HEIGHT, ICON_WIDTH, 0);
+ rect.translate( p.image_hpad, p.image_vpad );
+ icon_params.rect( rect );
icon_params.mouse_opaque(false);
icon_params.follows.flags(FOLLOWS_LEFT | FOLLOWS_TOP);
icon_params.visible(false);
@@ -132,9 +152,9 @@ LLTeleportHistoryMenuItem::LLTeleportHistoryMenuItem(const Params& p)
// no image for the current item
if (p.item_type == TYPE_BACKWARD)
- mArrowIcon->setValue(ICON_IMG_BACKWARD);
+ mArrowIcon->setValue( p.back_item_image() );
else if (p.item_type == TYPE_FORWARD)
- mArrowIcon->setValue(ICON_IMG_FORWARD);
+ mArrowIcon->setValue( p.forward_item_image() );
addChild(mArrowIcon);
}
diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp
index 4349f80d6b..3a1ae5bf46 100644
--- a/indra/newview/llnearbychat.cpp
+++ b/indra/newview/llnearbychat.cpp
@@ -54,10 +54,11 @@
#include "llstylemap.h"
#include "lldraghandle.h"
-#include "lltrans.h"
+
#include "llbottomtray.h"
#include "llnearbychatbar.h"
#include "llfloaterreg.h"
+#include "lltrans.h"
static const S32 RESIZE_BAR_THICKNESS = 3;
@@ -146,6 +147,7 @@ std::string appendTime()
return timeStr;
}
+
void LLNearbyChat::addMessage(const LLChat& chat,bool archive)
{
if (chat.mChatType == CHAT_TYPE_DEBUG_MSG)
@@ -167,18 +169,15 @@ void LLNearbyChat::addMessage(const LLChat& chat,bool archive)
}
}
+ LLChat& tmp_chat = const_cast<LLChat&>(chat);
+
+ if(tmp_chat.mTimeStr.empty())
+ tmp_chat.mTimeStr = appendTime();
+
bool use_plain_text_chat_history = gSavedSettings.getBOOL("PlainTextChatHistory");
if (!chat.mMuted)
{
- std::string message = chat.mText;
-
-
- LLChat& tmp_chat = const_cast<LLChat&>(chat);
-
- if(tmp_chat.mTimeStr.empty())
- tmp_chat.mTimeStr = appendTime();
-
if (chat.mChatStyle == CHAT_STYLE_IRC)
{
LLColor4 txt_color = LLUIColorTable::instance().getColor("White");
@@ -191,17 +190,9 @@ void LLNearbyChat::addMessage(const LLChat& chat,bool archive)
append_style_params.readonly_color(txt_color);
append_style_params.font.name(font_name);
append_style_params.font.size(font_size);
- if (chat.mFromName.size() > 0)
- {
- append_style_params.font.style = "ITALIC";
- LLChat add_chat=chat;
- add_chat.mText = chat.mFromName + " ";
- mChatHistory->appendMessage(add_chat, use_plain_text_chat_history, append_style_params);
- }
-
- message = message.substr(3);
append_style_params.font.style = "ITALIC";
- mChatHistory->appendText(message, FALSE, append_style_params);
+
+ mChatHistory->appendMessage(chat, use_plain_text_chat_history, append_style_params);
}
else
{
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp
index b0b6db682c..169560f688 100644
--- a/indra/newview/llnearbychathandler.cpp
+++ b/indra/newview/llnearbychathandler.cpp
@@ -318,6 +318,8 @@ void LLNearbyChatHandler::initChannel()
mChannel->init(channel_right_bound - channel_width, channel_right_bound);
}
+
+
void LLNearbyChatHandler::processChat(const LLChat& chat_msg)
{
if(chat_msg.mMuted == TRUE)
@@ -327,6 +329,22 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg)
if(chat_msg.mText.empty())
return;//don't process empty messages
+
+ LLChat& tmp_chat = const_cast<LLChat&>(chat_msg);
+
+ if (tmp_chat.mChatStyle == CHAT_STYLE_IRC)
+ {
+ if(!tmp_chat.mFromName.empty())
+ tmp_chat.mText = tmp_chat.mFromName + " " + tmp_chat.mText.substr(3);
+ else
+ tmp_chat.mText = tmp_chat.mText.substr(3);
+ }
+
+ {
+ //sometimes its usefull to have no name at all...
+ //if(tmp_chat.mFromName.empty() && tmp_chat.mFromID!= LLUUID::null)
+ // tmp_chat.mFromName = tmp_chat.mFromID.asString();
+ }
LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD());
nearby_chat->addMessage(chat_msg);
diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h
index da8928321a..5c240aa54a 100644
--- a/indra/newview/llnotificationhandler.h
+++ b/indra/newview/llnotificationhandler.h
@@ -266,6 +266,11 @@ public:
static bool canLogToIM(const LLNotificationPtr& notification);
/**
+ * Checks sufficient conditions to spawn IM session.
+ */
+ static bool canSpawnIMSession(const LLNotificationPtr& notification);
+
+ /**
* Writes notification message to IM session.
*/
static void logToIM(const EInstantMessage& session_type,
diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp
index 857b7e9796..6748bd7982 100644
--- a/indra/newview/llnotificationhandlerutil.cpp
+++ b/indra/newview/llnotificationhandlerutil.cpp
@@ -43,14 +43,27 @@ using namespace LLNotificationsUI;
const static std::string GRANTED_MODIFY_RIGHTS("GrantedModifyRights"),
REVOKED_MODIFY_RIGHTS("RevokedModifyRights"), OBJECT_GIVE_ITEM(
"ObjectGiveItem"), OBJECT_GIVE_ITEM_UNKNOWN_USER(
- "ObjectGiveItemUnknownUser"), PAYMENT_RECIVED("PaymentRecived");
+ "ObjectGiveItemUnknownUser"), PAYMENT_RECIVED("PaymentRecived"),
+ ADD_FRIEND_WITH_MESSAGE("AddFriendWithMessage"),
+ USER_GIVE_ITEM("UserGiveItem"), OFFER_FRIENDSHIP("OfferFriendship"),
+ FRIENDSHIP_ACCEPTED("FriendshipAccepted"),
+ FRIENDSHIP_OFFERED("FriendshipOffered");
// static
bool LLHandlerUtil::canLogToIM(const LLNotificationPtr& notification)
{
return GRANTED_MODIFY_RIGHTS == notification->getName()
|| REVOKED_MODIFY_RIGHTS == notification->getName()
- || PAYMENT_RECIVED == notification->getName();
+ || PAYMENT_RECIVED == notification->getName()
+ || FRIENDSHIP_OFFERED == notification->getName();
+}
+
+// static
+bool LLHandlerUtil::canSpawnIMSession(const LLNotificationPtr& notification)
+{
+ return ADD_FRIEND_WITH_MESSAGE == notification->getName()
+ || OFFER_FRIENDSHIP == notification->getName()
+ || FRIENDSHIP_ACCEPTED == notification->getName();
}
// static
@@ -92,13 +105,16 @@ void LLHandlerUtil::logToIMP2P(const LLNotificationPtr& notification)
notification->getSubstitutions().has("NAME") ? notification->getSubstitutions()["NAME"]
: notification->getSubstitutions()["[NAME]"];
+ const std::string session_name = notification->getPayload().has(
+ "SESSION_NAME") ? notification->getPayload()["SESSION_NAME"].asString() : name;
+
// don't create IM p2p session with objects, it's necessary condition to log
if (notification->getName() != OBJECT_GIVE_ITEM && notification->getName()
!= OBJECT_GIVE_ITEM_UNKNOWN_USER)
{
LLUUID from_id = notification->getPayload()["from_id"];
- logToIM(IM_NOTHING_SPECIAL, name, name, notification->getMessage(),
+ logToIM(IM_NOTHING_SPECIAL, session_name, name, notification->getMessage(),
from_id, from_id);
}
}
diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp
index 4f353bf6a5..4d64c5c0e4 100644
--- a/indra/newview/llnotificationofferhandler.cpp
+++ b/indra/newview/llnotificationofferhandler.cpp
@@ -40,6 +40,8 @@
#include "llnotificationmanager.h"
#include "llnotifications.h"
#include "llscriptfloater.h"
+#include "llimview.h"
+#include "llnotificationsutil.h"
using namespace LLNotificationsUI;
@@ -101,20 +103,48 @@ bool LLOfferHandler::processNotification(const LLSD& notify)
}
else
{
- LLToastNotifyPanel* notify_box = new LLToastNotifyPanel(notification);
-
- LLToast::Params p;
- p.notif_id = notification->getID();
- p.notification = notification;
- p.panel = notify_box;
- p.on_delete_toast = boost::bind(&LLOfferHandler::onDeleteToast, this, _1);
-
- LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
- if(channel)
- channel->addToast(p);
-
- // send a signal to the counter manager
- mNewNotificationSignal();
+ if (LLHandlerUtil::canSpawnIMSession(notification))
+ {
+ const std::string name = notification->getSubstitutions().has(
+ "NAME") ? notification->getSubstitutions()["NAME"]
+ : notification->getSubstitutions()["[NAME]"];
+
+ LLUUID from_id = notification->getPayload()["from_id"];
+
+ LLUUID session_id = LLIMMgr::computeSessionID(
+ IM_NOTHING_SPECIAL, from_id);
+
+ LLIMModel::LLIMSession* session =
+ LLIMModel::instance().findIMSession(session_id);
+ if (session == NULL)
+ {
+ LLIMMgr::instance().addSession(name, IM_NOTHING_SPECIAL,
+ from_id);
+ }
+ }
+
+ if (notification->getPayload().has("SUPPRES_TOST")
+ && notification->getPayload()["SUPPRES_TOST"])
+ {
+ LLNotificationsUtil::cancel(notification);
+ }
+ else
+ {
+ LLToastNotifyPanel* notify_box = new LLToastNotifyPanel(notification);
+
+ LLToast::Params p;
+ p.notif_id = notification->getID();
+ p.notification = notification;
+ p.panel = notify_box;
+ p.on_delete_toast = boost::bind(&LLOfferHandler::onDeleteToast, this, _1);
+
+ LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
+ if(channel)
+ channel->addToast(p);
+
+ // send a signal to the counter manager
+ mNewNotificationSignal();
+ }
}
}
else if (notify["sigtype"].asString() == "delete")
diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp
index 5834c50fbb..6210973dae 100644
--- a/indra/newview/llpanelgroupnotices.cpp
+++ b/indra/newview/llpanelgroupnotices.cpp
@@ -304,6 +304,9 @@ BOOL LLPanelGroupNotices::postBuild()
void LLPanelGroupNotices::activate()
{
+ if(mNoticesList)
+ mNoticesList->deleteAllItems();
+
BOOL can_send = gAgent.hasPowerInGroup(mGroupID,GP_NOTICES_SEND);
BOOL can_receive = gAgent.hasPowerInGroup(mGroupID,GP_NOTICES_RECEIVE);
diff --git a/indra/newview/llpanelhome.cpp b/indra/newview/llpanelhome.cpp
index de7a85836d..92b6d2f619 100644
--- a/indra/newview/llpanelhome.cpp
+++ b/indra/newview/llpanelhome.cpp
@@ -35,6 +35,7 @@
#include "llpanelhome.h"
#include "llmediactrl.h"
+#include "llviewerhome.h"
static LLRegisterPanelClassWrapper<LLPanelHome> t_people("panel_sidetray_home");
@@ -62,51 +63,17 @@ BOOL LLPanelHome::postBuild()
mBrowser = getChild<LLMediaCtrl>("browser");
if (mBrowser)
{
+ // read the URL to display from settings.xml
+ std::string url = LLViewerHome::getHomeURL();
+
mBrowser->addObserver(this);
mBrowser->setTrusted(true);
- mBrowser->setHomePageUrl("http://www.secondlife.com/");
-
- childSetAction("back", onClickBack, this);
- childSetAction("forward", onClickForward, this);
- childSetAction("home", onClickHome, this);
+ mBrowser->setHomePageUrl(url);
}
return TRUE;
}
-//static
-void LLPanelHome::onClickBack(void* user_data)
-{
- LLPanelHome *self = (LLPanelHome*)user_data;
- if (self && self->mBrowser)
- {
- self->mBrowser->navigateBack();
- }
-}
-
-//static
-void LLPanelHome::onClickForward(void* user_data)
-{
- LLPanelHome *self = (LLPanelHome*)user_data;
- if (self && self->mBrowser)
- {
- self->mBrowser->navigateForward();
- }
-}
-
-//static
-void LLPanelHome::onClickHome(void* user_data)
-{
- LLPanelHome *self = (LLPanelHome*)user_data;
- if (self && self->mBrowser)
- {
- self->mBrowser->navigateHome();
- }
-}
-
void LLPanelHome::handleMediaEvent(LLPluginClassMedia *self, EMediaEvent event)
{
- // update back/forward button state
- childSetEnabled("back", mBrowser->canNavigateBack());
- childSetEnabled("forward", mBrowser->canNavigateForward());
}
diff --git a/indra/newview/llpanelhome.h b/indra/newview/llpanelhome.h
index b5ca48b23f..dfeca45b29 100644
--- a/indra/newview/llpanelhome.h
+++ b/indra/newview/llpanelhome.h
@@ -53,10 +53,6 @@ public:
/*virtual*/ BOOL postBuild();
/*virtual*/ void onOpen(const LLSD& key);
- static void onClickBack(void* user_data);
- static void onClickForward(void* user_data);
- static void onClickHome(void* user_data);
-
private:
// inherited from LLViewerMediaObserver
/*virtual*/ void handleMediaEvent(LLPluginClassMedia *self, EMediaEvent event);
diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp
index 405c95fc22..8c19865550 100644
--- a/indra/newview/llpanelimcontrolpanel.cpp
+++ b/indra/newview/llpanelimcontrolpanel.cpp
@@ -71,6 +71,11 @@ void LLPanelChatControlPanel::onVoiceChannelStateChanged(const LLVoiceChannel::E
childSetVisible("call_btn", ! is_call_started);
}
+LLPanelChatControlPanel::~LLPanelChatControlPanel()
+{
+ mVoiceChannelStateChangeConnection.disconnect();
+}
+
BOOL LLPanelChatControlPanel::postBuild()
{
childSetAction("call_btn", boost::bind(&LLPanelChatControlPanel::onCallButtonClicked, this));
@@ -113,7 +118,9 @@ void LLPanelChatControlPanel::setSessionId(const LLUUID& session_id)
mSessionId = session_id;
LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(mSessionId);
if(voice_channel)
- voice_channel->setStateChangedCallback(boost::bind(&LLPanelChatControlPanel::onVoiceChannelStateChanged, this, _1, _2));
+ {
+ mVoiceChannelStateChangeConnection = voice_channel->setStateChangedCallback(boost::bind(&LLPanelChatControlPanel::onVoiceChannelStateChanged, this, _1, _2));
+ }
}
LLPanelIMControlPanel::LLPanelIMControlPanel()
diff --git a/indra/newview/llpanelimcontrolpanel.h b/indra/newview/llpanelimcontrolpanel.h
index a590232a0b..871779b273 100644
--- a/indra/newview/llpanelimcontrolpanel.h
+++ b/indra/newview/llpanelimcontrolpanel.h
@@ -47,7 +47,7 @@ public:
LLPanelChatControlPanel() :
mSessionId(LLUUID()),
mInitialized(false) {};
- ~LLPanelChatControlPanel() {};
+ ~LLPanelChatControlPanel();
virtual BOOL postBuild();
virtual void draw();
@@ -64,6 +64,9 @@ public:
private:
LLUUID mSessionId;
bool mInitialized;
+
+ // connection to voice channel state change signal
+ boost::signals2::connection mVoiceChannelStateChangeConnection;
};
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index 4ce6d14faa..e87b70f6a5 100644
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -122,17 +122,21 @@ void LLLandmarksPanel::onSearchEdit(const std::string& string)
for (accordion_tabs_t::const_iterator iter = mAccordionTabs.begin(); iter != mAccordionTabs.end(); ++iter)
{
LLAccordionCtrlTab* tab = *iter;
- if (tab && !tab->getVisible())
- tab->setVisible(TRUE);
+ tab->setVisible(TRUE);
// expand accordion to see matched items in each one. See EXT-2014.
- tab->changeOpenClose(false);
+ if (string != "")
+ {
+ tab->changeOpenClose(false);
+ }
LLInventorySubTreePanel* inventory_list = dynamic_cast<LLInventorySubTreePanel*>(tab->getAccordionView());
if (NULL == inventory_list) continue;
if (inventory_list->getFilter())
+ {
filter_list(inventory_list, string);
+ }
}
if (sFilterSubString != string)
@@ -333,8 +337,12 @@ void LLLandmarksPanel::initLandmarksInventoryPanel()
initLandmarksPanel(mLandmarksInventoryPanel);
+ // Check if mLandmarksInventoryPanel is properly initialized and has a Filter created.
+ // In case of a dummy widget getFilter() will return NULL.
if (mLandmarksInventoryPanel->getFilter())
+ {
mLandmarksInventoryPanel->setShowFolderState(LLInventoryFilter::SHOW_ALL_FOLDERS);
+ }
// subscribe to have auto-rename functionality while creating New Folder
mLandmarksInventoryPanel->setSelectCallback(boost::bind(&LLInventoryPanel::onSelectionChange, mLandmarksInventoryPanel, _1, _2));
@@ -362,6 +370,8 @@ void LLLandmarksPanel::initLibraryInventoryPanel()
void LLLandmarksPanel::initLandmarksPanel(LLInventorySubTreePanel* inventory_list)
{
+ // In case of a dummy widget further we have no Folder View widget and no Filter,
+ // so further initialization leads to crash.
if (!inventory_list->getFilter())
return;
@@ -388,8 +398,6 @@ void LLLandmarksPanel::initLandmarksPanel(LLInventorySubTreePanel* inventory_lis
void LLLandmarksPanel::initAccordion(const std::string& accordion_tab_name, LLInventorySubTreePanel* inventory_list)
{
LLAccordionCtrlTab* accordion_tab = getChild<LLAccordionCtrlTab>(accordion_tab_name);
- if (!accordion_tab)
- return;
mAccordionTabs.push_back(accordion_tab);
accordion_tab->setDropDownStateChangedCallback(
@@ -744,8 +752,8 @@ void LLLandmarksPanel::updateFilteredAccordions()
for (accordion_tabs_t::const_iterator iter = mAccordionTabs.begin(); iter != mAccordionTabs.end(); ++iter)
{
accordion_tab = *iter;
- if (accordion_tab && !accordion_tab->getVisible())
- accordion_tab->setVisible(TRUE);
+
+ accordion_tab->setVisible(TRUE);
inventory_list = dynamic_cast<LLInventorySubTreePanel*> (accordion_tab->getAccordionView());
if (NULL == inventory_list) continue;
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 4bae6af12e..a729b8c06f 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -39,7 +39,6 @@
#include "llfontgl.h"
#include "llmd5.h"
#include "llsecondlifeurls.h"
-#include "llversionviewer.h"
#include "v4color.h"
#include "llbutton.h"
@@ -57,7 +56,7 @@
#include "llui.h"
#include "lluiconstants.h"
#include "llurlsimstring.h"
-#include "llviewerbuild.h"
+#include "llversioninfo.h"
#include "llviewerhelp.h"
#include "llviewertexturelist.h"
#include "llviewermenu.h" // for handle_preferences()
@@ -71,7 +70,6 @@
#include "llmediactrl.h"
#include "llrootview.h"
-
#include "llfloatertos.h"
#include "lltrans.h"
#include "llglheaders.h"
@@ -248,11 +246,9 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
getChild<LLPanel>("login_widgets")->setDefaultBtn("connect_btn");
std::string channel = gSavedSettings.getString("VersionChannelName");
- std::string version = llformat("%d.%d.%d (%d)",
- LL_VERSION_MAJOR,
- LL_VERSION_MINOR,
- LL_VERSION_PATCH,
- LL_VIEWER_BUILD );
+ std::string version = llformat("%s (%d)",
+ LLVersionInfo::getShortVersion().c_str(),
+ LLVersionInfo::getBuild());
LLTextBox* channel_text = getChild<LLTextBox>("channel_text");
channel_text->setTextArg("[CHANNEL]", channel); // though not displayed
channel_text->setTextArg("[VERSION]", version);
@@ -263,6 +259,9 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
LLTextBox* create_new_account_text = getChild<LLTextBox>("create_new_account_text");
create_new_account_text->setClickedCallback(onClickNewAccount, NULL);
+
+ LLTextBox* need_help_text = getChild<LLTextBox>("login_help");
+ need_help_text->setClickedCallback(onClickHelp, NULL);
#endif
// get the web browser control
@@ -741,8 +740,9 @@ void LLPanelLogin::loadLoginPage()
}
// Channel and Version
- std::string version = llformat("%d.%d.%d (%d)",
- LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VIEWER_BUILD);
+ std::string version = llformat("%s (%d)",
+ LLVersionInfo::getShortVersion().c_str(),
+ LLVersionInfo::getBuild());
char* curl_channel = curl_escape(gSavedSettings.getString("VersionChannelName").c_str(), 0);
char* curl_version = curl_escape(version.c_str(), 0);
@@ -966,6 +966,16 @@ void LLPanelLogin::onClickForgotPassword(void*)
}
}
+//static
+void LLPanelLogin::onClickHelp(void*)
+{
+ if (sInstance)
+ {
+ LLViewerHelp* vhelp = LLViewerHelp::getInstance();
+ vhelp->showTopic(vhelp->getTopicFromFocus());
+ }
+}
+
// static
void LLPanelLogin::onPassKey(LLLineEditor* caller, void* user_data)
{
diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h
index acb2001c22..e3d30d7d0c 100644
--- a/indra/newview/llpanellogin.h
+++ b/indra/newview/llpanellogin.h
@@ -96,6 +96,7 @@ private:
// static bool newAccountAlertCallback(const LLSD& notification, const LLSD& response);
static void onClickVersion(void*);
static void onClickForgotPassword(void*);
+ static void onClickHelp(void*);
static void onPassKey(LLLineEditor* caller, void* user_data);
static void onSelectServer(LLUICtrl*, void*);
static void onServerComboLostFocus(LLFocusableElement*);
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 74c1420cf3..9fd92725dc 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -653,7 +653,7 @@ void LLFloaterInventoryFinder::updateElementsFromFilter()
return;
// Get data needed for filter display
- U32 filter_types = mFilter->getFilterTypes();
+ U32 filter_types = mFilter->getFilterObjectTypes();
std::string filter_string = mFilter->getFilterSubString();
LLInventoryFilter::EFolderShow show_folders = mFilter->getShowFolderState();
U32 hours = mFilter->getHoursAgo();
@@ -966,6 +966,46 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata)
preview_texture->openToSave();
}
}
+ // This doesn't currently work, since the viewer can't change an assetID an item.
+ if (command_name == "regenerate_link")
+ {
+ LLInventoryPanel *active_panel = getActivePanel();
+ LLFolderViewItem* current_item = active_panel->getRootFolder()->getCurSelectedItem();
+ if (!current_item)
+ {
+ return;
+ }
+ const LLUUID item_id = current_item->getListener()->getUUID();
+ LLViewerInventoryItem *item = gInventory.getItem(item_id);
+ item->regenerateLink();
+ active_panel->setSelection(item_id, TAKE_FOCUS_NO);
+ }
+ if (command_name == "find_original")
+ {
+ LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem();
+ if (!current_item)
+ {
+ return;
+ }
+ current_item->getListener()->performAction(getActivePanel()->getRootFolder(), getActivePanel()->getModel(), "goto");
+ }
+
+ if (command_name == "find_links")
+ {
+ LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem();
+ if (!current_item)
+ {
+ return;
+ }
+ const LLUUID& item_id = current_item->getListener()->getUUID();
+ const std::string &item_name = current_item->getListener()->getName();
+ LLInventoryFilter *filter = mActivePanel->getFilter();
+ filter->setFilterSubString(item_name);
+ mFilterEditor->setText(item_name);
+ mFilterEditor->setFocus(TRUE);
+ filter->setFilterUUID(item_id);
+ filter->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
+ }
}
BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata)
@@ -1001,6 +1041,45 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata)
}
return FALSE;
}
+ if (command_name == "find_original")
+ {
+ LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem();
+ if (!current_item) return FALSE;
+ const LLUUID& item_id = current_item->getListener()->getUUID();
+ const LLViewerInventoryItem *item = gInventory.getItem(item_id);
+ if (item && item->getIsLinkType() && !item->getIsBrokenLink())
+ {
+ return TRUE;
+ }
+ return FALSE;
+ }
+
+ if (command_name == "find_links")
+ {
+ LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem();
+ if (!current_item) return FALSE;
+ const LLUUID& item_id = current_item->getListener()->getUUID();
+ const LLInventoryObject *obj = gInventory.getObject(item_id);
+ if (obj && !obj->getIsLinkType() && LLAssetType::lookupCanLink(obj->getType()))
+ {
+ return TRUE;
+ }
+ return FALSE;
+ }
+ // This doesn't currently work, since the viewer can't change an assetID an item.
+ if (command_name == "regenerate_link")
+ {
+ LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem();
+ if (!current_item) return FALSE;
+ const LLUUID& item_id = current_item->getListener()->getUUID();
+ const LLViewerInventoryItem *item = gInventory.getItem(item_id);
+ if (item && item->getIsBrokenLink())
+ {
+ return TRUE;
+ }
+ return FALSE;
+ }
+
return TRUE;
}
diff --git a/indra/newview/llpanelme.cpp b/indra/newview/llpanelme.cpp
index 046118cf75..ece93125b3 100644
--- a/indra/newview/llpanelme.cpp
+++ b/indra/newview/llpanelme.cpp
@@ -71,7 +71,7 @@ void LLPanelMe::onOpen(const LLSD& key)
LLPanelProfile::onOpen(key);
}
-void LLPanelMe::notifyChildren(const LLSD& info)
+bool LLPanelMe::notifyChildren(const LLSD& info)
{
if (info.has("task-panel-action") && info["task-panel-action"].asString() == "handle-tri-state")
{
@@ -104,10 +104,10 @@ void LLPanelMe::notifyChildren(const LLSD& info)
if (on_default_view)
LLSideTray::getInstance()->collapseSideBar();
- return; // this notification is only supposed to be handled by task panels
+ return true; // this notification is only supposed to be handled by task panels
}
- LLPanel::notifyChildren(info);
+ return LLPanel::notifyChildren(info);
}
void LLPanelMe::buildEditPanel()
@@ -220,6 +220,7 @@ BOOL LLPanelMyProfileEdit::postBuild()
initTexturePickerMouseEvents();
childSetTextArg("partner_edit_link", "[URL]", getString("partner_edit_link_url"));
+ childSetTextArg("my_account_link", "[URL]", getString("my_account_link_url"));
return LLPanelAvatarProfile::postBuild();
}
diff --git a/indra/newview/llpanelme.h b/indra/newview/llpanelme.h
index 17d367132e..1325192bbf 100644
--- a/indra/newview/llpanelme.h
+++ b/indra/newview/llpanelme.h
@@ -54,7 +54,7 @@ public:
LLPanelMe();
/*virtual*/ void onOpen(const LLSD& key);
- /*virtual*/ void notifyChildren(const LLSD& info);
+ /*virtual*/ bool notifyChildren(const LLSD& info);
/*virtual*/ BOOL postBuild();
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index 79e84efd5f..4f8aff6f78 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -50,6 +50,7 @@
#include "llfloaterbuycurrency.h"
#include "llfloaterreg.h"
#include "llinventorybridge.h"
+#include "llinventoryfilter.h"
#include "llinventoryfunctions.h"
#include "llpreviewanim.h"
#include "llpreviewgesture.h"
@@ -1959,4 +1960,4 @@ void LLPanelObjectInventory::onFocusReceived()
LLEditMenuHandler::gEditMenuHandler = mFolders;
LLPanel::onFocusReceived();
-} \ No newline at end of file
+}
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index 951e74abf9..6aba8c0ebb 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -353,7 +353,7 @@ void LLPanelOutfitsInventory::initAccordionPanels()
mAccordionPanels.resize(2);
LLInventoryPanel *myoutfits_panel = getChild<LLInventoryPanel>("outfitslist_accordionpanel");
- myoutfits_panel->setFilterTypes(1LL << LLFolderType::FT_OUTFIT, TRUE);
+ myoutfits_panel->setFilterTypes(1LL << LLFolderType::FT_OUTFIT, LLInventoryFilter::FILTERTYPE_CATEGORY);
myoutfits_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
mAccordionPanels[0] = myoutfits_panel;
mActivePanel = myoutfits_panel;
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index 1743df52fc..1e4682701e 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -1003,10 +1003,28 @@ void LLPanelPeople::onAddFriendButtonClicked()
}
}
+bool LLPanelPeople::isItemsFreeOfFriends(const std::vector<LLUUID>& uuids)
+{
+ const LLAvatarTracker& av_tracker = LLAvatarTracker::instance();
+ for ( std::vector<LLUUID>::const_iterator
+ id = uuids.begin(),
+ id_end = uuids.end();
+ id != id_end; ++id )
+ {
+ if (av_tracker.isBuddy (*id))
+ {
+ return false;
+ }
+ }
+ return true;
+}
+
void LLPanelPeople::onAddFriendWizButtonClicked()
{
// Show add friend wizard.
LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(onAvatarPicked, NULL, FALSE, TRUE);
+ // Need to disable 'ok' button when friend occurs in selection
+ if (picker) picker->setOkBtnEnableCb(boost::bind(&LLPanelPeople::isItemsFreeOfFriends, this, _1));
LLFloater* root_floater = gFloaterView->getParentFloater(this);
if (root_floater)
{
@@ -1284,7 +1302,7 @@ void LLPanelPeople::onOpen(const LLSD& key)
reSelectedCurrentTab();
}
-void LLPanelPeople::notifyChildren(const LLSD& info)
+bool LLPanelPeople::notifyChildren(const LLSD& info)
{
if (info.has("task-panel-action") && info["task-panel-action"].asString() == "handle-tri-state")
{
@@ -1292,7 +1310,7 @@ void LLPanelPeople::notifyChildren(const LLSD& info)
if (!container)
{
llwarns << "Cannot find People panel container" << llendl;
- return;
+ return true;
}
if (container->getCurrentPanelIndex() > 0)
@@ -1303,10 +1321,10 @@ void LLPanelPeople::notifyChildren(const LLSD& info)
else
LLSideTray::getInstance()->collapseSideBar();
- return; // this notification is only supposed to be handled by task panels
+ return true; // this notification is only supposed to be handled by task panels
}
- LLPanel::notifyChildren(info);
+ return LLPanel::notifyChildren(info);
}
void LLPanelPeople::showAccordion(const std::string name, bool show)
diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h
index 5ac5bcc1d7..a9cc6d0ccb 100644
--- a/indra/newview/llpanelpeople.h
+++ b/indra/newview/llpanelpeople.h
@@ -51,7 +51,7 @@ public:
/*virtual*/ BOOL postBuild();
/*virtual*/ void onOpen(const LLSD& key);
- /*virtual*/ void notifyChildren(const LLSD& info);
+ /*virtual*/ bool notifyChildren(const LLSD& info);
// internals
class Updater;
@@ -72,6 +72,7 @@ private:
void updateRecentList();
bool isFriendOnline(const LLUUID& id);
+ bool isItemsFreeOfFriends(const std::vector<LLUUID>& uuids);
void updateButtons();
std::string getActiveTabName() const;
diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp
index 7dea5eaf67..57f3d86d53 100644
--- a/indra/newview/llpanelpeoplemenus.cpp
+++ b/indra/newview/llpanelpeoplemenus.cpp
@@ -97,7 +97,7 @@ LLContextMenu* NearbyMenu::createMenu()
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.Call", boost::bind(&LLAvatarActions::startCall, id));
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
@@ -117,7 +117,7 @@ LLContextMenu* NearbyMenu::createMenu()
// 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.Call", boost::bind(&LLAvatarActions::startAdhocCall, mUUIDs));
// 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));
diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp
index cc6e88a9d2..59a68bc12d 100644
--- a/indra/newview/llpanelpicks.cpp
+++ b/indra/newview/llpanelpicks.cpp
@@ -161,6 +161,9 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type)
std::string name, second_name;
gCacheName->getName(getAvatarId(),name,second_name);
childSetTextArg("pick_title", "[NAME]",name);
+
+ // Save selection, to be able to edit same item after saving changes. See EXT-3023.
+ LLUUID selected_id = mPicksList->getSelectedValue()[PICK_ID];
mPicksList->clear();
@@ -186,6 +189,10 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type)
mPicksList->addItem(picture, pick_value);
+ // Restore selection by item id.
+ if ( pick_id == selected_id )
+ mPicksList->selectItemByValue(pick_value);
+
picture->setDoubleClickCallback(boost::bind(&LLPanelPicks::onDoubleClickPickItem, this, _1));
picture->setRightMouseUpCallback(boost::bind(&LLPanelPicks::onRightMouseUpItem, this, _1, _2, _3, _4));
picture->setMouseUpCallback(boost::bind(&LLPanelPicks::updateButtons, this));
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index cd4bcb6c0a..f7f3c5830d 100644
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -261,6 +261,10 @@ void LLPanelPlaces::onOpen(const LLSD& key)
}
mLandmarkInfo->displayParcelInfo(LLUUID(), mPosGlobal);
+
+ // Disable Save button because there is no item to save yet.
+ // The button will be enabled in onLandmarkLoaded callback.
+ mSaveBtn->setEnabled(FALSE);
}
else if (mPlaceInfoType == LANDMARK_INFO_TYPE)
{
@@ -380,11 +384,16 @@ void LLPanelPlaces::onLandmarkLoaded(LLLandmark* landmark)
landmark->getRegionID(region_id);
landmark->getGlobalPos(mPosGlobal);
mLandmarkInfo->displayParcelInfo(region_id, mPosGlobal);
+
+ mSaveBtn->setEnabled(TRUE);
}
void LLPanelPlaces::onFilterEdit(const std::string& search_string, bool force_filter)
{
- if (force_filter || LLPanelPlacesTab::sFilterSubString != search_string)
+ if (!mActivePanel)
+ return;
+
+ if (force_filter || mActivePanel->getFilterSubString() != search_string)
{
std::string string = search_string;
@@ -392,8 +401,7 @@ void LLPanelPlaces::onFilterEdit(const std::string& search_string, bool force_fi
LLStringUtil::toUpper(string);
LLStringUtil::trimHead(string);
- if (mActivePanel)
- mActivePanel->onSearchEdit(string);
+ mActivePanel->onSearchEdit(string);
}
}
@@ -403,7 +411,7 @@ void LLPanelPlaces::onTabSelected()
if (!mActivePanel)
return;
- onFilterEdit(LLPanelPlacesTab::sFilterSubString, true);
+ onFilterEdit(mActivePanel->getFilterSubString(), true);
mActivePanel->updateVerbs();
}
@@ -814,7 +822,7 @@ void LLPanelPlaces::changedInventory(U32 mask)
// Filter applied to show all items.
if (mActivePanel)
- mActivePanel->onSearchEdit(LLPanelPlacesTab::sFilterSubString);
+ mActivePanel->onSearchEdit(mActivePanel->getFilterSubString());
// we don't need to monitor inventory changes anymore,
// so remove the observer
diff --git a/indra/newview/llpanelplacestab.h b/indra/newview/llpanelplacestab.h
index b4d839452e..ce77a42259 100644
--- a/indra/newview/llpanelplacestab.h
+++ b/indra/newview/llpanelplacestab.h
@@ -56,13 +56,15 @@ public:
const LLUUID& snapshot_id,
bool teleport);
-public:
- // Search string for filtering landmarks and teleport history locations
- static std::string sFilterSubString;
+ const std::string& getFilterSubString() { return sFilterSubString; }
+ void setFilterSubString(const std::string& string) { sFilterSubString = string; }
protected:
LLButton* mTeleportBtn;
LLButton* mShowOnMapBtn;
+
+ // Search string for filtering landmarks and teleport history locations
+ static std::string sFilterSubString;
};
#endif //LL_LLPANELPLACESTAB_H
diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp
index e86123d565..aa2b7d4554 100644
--- a/indra/newview/llpanelprimmediacontrols.cpp
+++ b/indra/newview/llpanelprimmediacontrols.cpp
@@ -54,6 +54,7 @@
#include "llpanelprimmediacontrols.h"
#include "llpluginclassmedia.h"
#include "llprogressbar.h"
+#include "llsliderctrl.h"
#include "llstring.h"
#include "llviewercontrol.h"
#include "llviewerparcelmgr.h"
@@ -63,6 +64,8 @@
#include "llweb.h"
#include "llwindow.h"
+#include "llfloatertools.h" // to enable hide if build tools are up
+
glh::matrix4f glh_get_current_modelview();
glh::matrix4f glh_get_current_projection();
@@ -88,7 +91,8 @@ LLPanelPrimMediaControls::LLPanelPrimMediaControls() :
mTargetImplID(LLUUID::null),
mTargetObjectNormal(LLVector3::zero),
mZoomObjectID(LLUUID::null),
- mZoomObjectFace(0)
+ mZoomObjectFace(0),
+ mVolumeSliderVisible(false)
{
mCommitCallbackRegistrar.add("MediaCtrl.Close", boost::bind(&LLPanelPrimMediaControls::onClickClose, this));
mCommitCallbackRegistrar.add("MediaCtrl.Back", boost::bind(&LLPanelPrimMediaControls::onClickBack, this));
@@ -105,7 +109,9 @@ LLPanelPrimMediaControls::LLPanelPrimMediaControls() :
mCommitCallbackRegistrar.add("MediaCtrl.JumpProgress", boost::bind(&LLPanelPrimMediaControls::onCommitSlider, this));
mCommitCallbackRegistrar.add("MediaCtrl.CommitVolumeUp", boost::bind(&LLPanelPrimMediaControls::onCommitVolumeUp, this));
mCommitCallbackRegistrar.add("MediaCtrl.CommitVolumeDown", boost::bind(&LLPanelPrimMediaControls::onCommitVolumeDown, this));
+ mCommitCallbackRegistrar.add("MediaCtrl.Volume", boost::bind(&LLPanelPrimMediaControls::onCommitVolumeSlider, this));
mCommitCallbackRegistrar.add("MediaCtrl.ToggleMute", boost::bind(&LLPanelPrimMediaControls::onToggleMute, this));
+ mCommitCallbackRegistrar.add("MediaCtrl.ShowVolumeSlider", boost::bind(&LLPanelPrimMediaControls::showVolumeSlider, this));
mCommitCallbackRegistrar.add("MediaCtrl.SkipBack", boost::bind(&LLPanelPrimMediaControls::onClickSkipBack, this));
mCommitCallbackRegistrar.add("MediaCtrl.SkipForward", boost::bind(&LLPanelPrimMediaControls::onClickSkipForward, this));
@@ -147,12 +153,14 @@ BOOL LLPanelPrimMediaControls::postBuild()
mVolumeBtn = getChild<LLButton>("media_volume_button");
mVolumeUpCtrl = getChild<LLUICtrl>("volume_up");
mVolumeDownCtrl = getChild<LLUICtrl>("volume_down");
+ mVolumeSliderCtrl = getChild<LLSliderCtrl>("volume_slider");
mWhitelistIcon = getChild<LLIconCtrl>("media_whitelist_flag");
mSecureLockIcon = getChild<LLIconCtrl>("media_secure_lock_flag");
mMediaControlsStack = getChild<LLLayoutStack>("media_controls");
mLeftBookend = getChild<LLUICtrl>("left_bookend");
mRightBookend = getChild<LLUICtrl>("right_bookend");
mBackgroundImage = LLUI::getUIImage(getString("control_background_image_name"));
+ mVolumeSliderBackgroundImage = LLUI::getUIImage(getString("control_background_image_name"));
LLStringUtil::convertToF32(getString("skip_step"), mSkipStep);
LLStringUtil::convertToS32(getString("min_width"), mMinWidth);
LLStringUtil::convertToS32(getString("min_height"), mMinHeight);
@@ -267,7 +275,7 @@ void LLPanelPrimMediaControls::updateShape()
LLViewerMediaImpl* media_impl = getTargetMediaImpl();
LLViewerObject* objectp = getTargetObject();
- if(!media_impl)
+ if(!media_impl || gFloaterTools->getVisible())
{
setVisible(FALSE);
return;
@@ -296,11 +304,13 @@ void LLPanelPrimMediaControls::updateShape()
LLMediaEntry *media_data = objectp->getTE(mTargetObjectFace)->getMediaData();
if (media_data && NULL != dynamic_cast<LLVOVolume*>(objectp))
{
- // Don't show the media HUD if we do not have permissions
+ // Don't show the media controls if we do not have permissions
enabled = dynamic_cast<LLVOVolume*>(objectp)->hasMediaPermission(media_data, LLVOVolume::MEDIA_PERM_CONTROL);
mini_controls = (LLMediaEntry::MINI == media_data->getControls());
}
+ const bool is_hud = objectp->isHUDAttachment();
+
//
// Set the state of the buttons
//
@@ -323,8 +333,8 @@ void LLPanelPrimMediaControls::updateShape()
mWhitelistIcon->setVisible(!mini_controls && (media_data)?media_data->getWhiteListEnable():false);
// Disable zoom if HUD
- mZoomCtrl->setEnabled(!objectp->isHUDAttachment());
- mUnzoomCtrl->setEnabled(!objectp->isHUDAttachment());
+ mZoomCtrl->setEnabled(!is_hud);
+ mUnzoomCtrl->setEnabled(!is_hud);
mSecureLockIcon->setVisible(false);
mCurrentURL = media_impl->getCurrentMediaURL();
@@ -355,6 +365,8 @@ void LLPanelPrimMediaControls::updateShape()
mVolumeUpCtrl->setVisible(has_focus);
mVolumeDownCtrl->setVisible(has_focus);
mVolumeCtrl->setEnabled(has_focus);
+ mVolumeSliderCtrl->setEnabled(has_focus && mVolumeSliderVisible);
+ mVolumeSliderCtrl->setVisible(has_focus && mVolumeSliderVisible);
mWhitelistIcon->setVisible(false);
mSecureLockIcon->setVisible(false);
@@ -411,6 +423,7 @@ void LLPanelPrimMediaControls::updateShape()
mVolumeUpCtrl->setEnabled(TRUE);
mVolumeDownCtrl->setEnabled(TRUE);
}
+ mVolumeSliderCtrl->setValue(volume);
switch(result)
{
@@ -456,9 +469,11 @@ void LLPanelPrimMediaControls::updateShape()
mVolumeCtrl->setVisible(FALSE);
mVolumeUpCtrl->setVisible(FALSE);
mVolumeDownCtrl->setVisible(FALSE);
+ mVolumeSliderCtrl->setVisible(FALSE);
mVolumeCtrl->setEnabled(FALSE);
mVolumeUpCtrl->setEnabled(FALSE);
mVolumeDownCtrl->setEnabled(FALSE);
+ mVolumeSliderCtrl->setEnabled(FALSE);
if (mMediaPanelScroll)
{
@@ -548,56 +563,58 @@ void LLPanelPrimMediaControls::updateShape()
//
// Calculate position and shape of the controls
//
+ LLVector3 min, max;
+
glh::matrix4f mat = glh_get_current_projection()*glh_get_current_modelview();
std::vector<LLVector3>::iterator vert_it;
std::vector<LLVector3>::iterator vert_end;
std::vector<LLVector3> vect_face;
-
+
LLVolume* volume = objectp->getVolume();
-
+
if (volume)
{
const LLVolumeFace& vf = volume->getVolumeFace(mTargetObjectFace);
-
+
const LLVector3* ext = vf.mExtents;
-
+
LLVector3 center = (ext[0]+ext[1])*0.5f;
LLVector3 size = (ext[1]-ext[0])*0.5f;
LLVector3 vert[] =
- {
- center + size.scaledVec(LLVector3(1,1,1)),
- center + size.scaledVec(LLVector3(-1,1,1)),
- center + size.scaledVec(LLVector3(1,-1,1)),
- center + size.scaledVec(LLVector3(-1,-1,1)),
- center + size.scaledVec(LLVector3(1,1,-1)),
- center + size.scaledVec(LLVector3(-1,1,-1)),
- center + size.scaledVec(LLVector3(1,-1,-1)),
- center + size.scaledVec(LLVector3(-1,-1,-1)),
- };
-
+ {
+ center + size.scaledVec(LLVector3(1,1,1)),
+ center + size.scaledVec(LLVector3(-1,1,1)),
+ center + size.scaledVec(LLVector3(1,-1,1)),
+ center + size.scaledVec(LLVector3(-1,-1,1)),
+ center + size.scaledVec(LLVector3(1,1,-1)),
+ center + size.scaledVec(LLVector3(-1,1,-1)),
+ center + size.scaledVec(LLVector3(1,-1,-1)),
+ center + size.scaledVec(LLVector3(-1,-1,-1)),
+ };
+
LLVOVolume* vo = (LLVOVolume*) objectp;
-
+
for (U32 i = 0; i < 8; i++)
{
- vect_face.push_back(vo->volumePositionToAgent(vert[i]));
+ vect_face.push_back(vo->volumePositionToAgent(vert[i]));
}
}
vert_it = vect_face.begin();
vert_end = vect_face.end();
-
- LLVector3 min = LLVector3(1,1,1);
- LLVector3 max = LLVector3(-1,-1,-1);
+
+ min = LLVector3(1,1,1);
+ max = LLVector3(-1,-1,-1);
for(; vert_it != vert_end; ++vert_it)
{
// project silhouette vertices into screen space
glh::vec3f screen_vert = glh::vec3f(vert_it->mV);
mat.mult_matrix_vec(screen_vert);
-
+
// add to screenspace bounding box
update_min_max(min, max, LLVector3(screen_vert.v));
}
-
- LLCoordGL screen_min;
+
+ LLCoordGL screen_min;
screen_min.mX = llround((F32)gViewerWindow->getWorldViewWidthScaled() * (min.mV[VX] + 1.f) * 0.5f);
screen_min.mY = llround((F32)gViewerWindow->getWorldViewHeightScaled() * (min.mV[VY] + 1.f) * 0.5f);
@@ -607,17 +624,16 @@ void LLPanelPrimMediaControls::updateShape()
// grow panel so that screenspace bounding box fits inside "media_region" element of HUD
LLRect media_controls_rect;
+ S32 volume_slider_height = mVolumeSliderCtrl->getRect().getHeight() - /*fudge*/ 2;
getParent()->screenRectToLocal(LLRect(screen_min.mX, screen_max.mY, screen_max.mX, screen_min.mY), &media_controls_rect);
media_controls_rect.mLeft -= mMediaRegion->getRect().mLeft;
- media_controls_rect.mBottom -= mMediaRegion->getRect().mBottom;
+ media_controls_rect.mBottom -= mMediaRegion->getRect().mBottom - volume_slider_height;
media_controls_rect.mTop += getRect().getHeight() - mMediaRegion->getRect().mTop;
media_controls_rect.mRight += getRect().getWidth() - mMediaRegion->getRect().mRight;
// keep all parts of HUD on-screen
media_controls_rect.intersectWith(getParent()->getLocalRect());
- if (mCurrentZoom != ZOOM_NONE)
- media_controls_rect.mBottom -= mMediaControlsStack->getRect().getHeight() + mMediaProgressPanel->getRect().getHeight();
-
+
// clamp to minimum size, keeping centered
media_controls_rect.setCenterAndSize(media_controls_rect.getCenterX(), media_controls_rect.getCenterY(),
llmax(mMinWidth, media_controls_rect.getWidth()), llmax(mMinHeight, media_controls_rect.getHeight()));
@@ -681,6 +697,7 @@ void LLPanelPrimMediaControls::draw()
setVisible(FALSE);
mClearFaceOnFade = false;
+ mVolumeSliderVisible = false;
mTargetImplID = LLUUID::null;
mTargetObjectID = LLUUID::null;
mTargetObjectFace = 0;
@@ -692,16 +709,29 @@ void LLPanelPrimMediaControls::draw()
// Assumes layout_stack is a direct child of this panel
mMediaControlsStack->updateLayout();
LLRect icon_area = mMediaControlsStack->getRect();
+
+ // adjust to ignore space from volume slider
+ icon_area.mTop -= mVolumeSliderCtrl->getRect().getHeight();
// adjust to ignore space from left bookend padding
icon_area.mLeft += mLeftBookend->getRect().getWidth();
// ignore space from right bookend padding
icon_area.mRight -= mRightBookend->getRect().getWidth();
-
- // get UI image
+
+ // draw control background UI image
mBackgroundImage->draw( icon_area, UI_VERTEX_COLOR % alpha);
+ // draw volume slider background UI image
+ if (mVolumeSliderCtrl->getVisible())
+ {
+ LLRect volume_slider_rect = mVolumeSliderCtrl->getRect();
+ // For some reason the rect is not in the right place (??)
+ // This translates the bg to under the slider
+ volume_slider_rect.translate(mVolumeSliderCtrl->getParent()->getRect().mLeft, icon_area.getHeight());
+ mVolumeSliderBackgroundImage->draw(volume_slider_rect, UI_VERTEX_COLOR % alpha);
+ }
+
{
LLViewDrawContext context(alpha);
LLPanel::draw();
@@ -1187,6 +1217,16 @@ void LLPanelPrimMediaControls::onCommitVolumeDown()
}
}
+void LLPanelPrimMediaControls::onCommitVolumeSlider()
+{
+ focusOnTarget();
+
+ LLViewerMediaImpl* media_impl = getTargetMediaImpl();
+ if (media_impl)
+ {
+ media_impl->setVolume(mVolumeSliderCtrl->getValueF32());
+ }
+}
void LLPanelPrimMediaControls::onToggleMute()
{
@@ -1208,3 +1248,7 @@ void LLPanelPrimMediaControls::onToggleMute()
}
}
+void LLPanelPrimMediaControls::showVolumeSlider()
+{
+ mVolumeSliderVisible = true;
+}
diff --git a/indra/newview/llpanelprimmediacontrols.h b/indra/newview/llpanelprimmediacontrols.h
index fe8f100abe..06163051a5 100644
--- a/indra/newview/llpanelprimmediacontrols.h
+++ b/indra/newview/llpanelprimmediacontrols.h
@@ -40,6 +40,7 @@ class LLCoordWindow;
class LLIconCtrl;
class LLLayoutStack;
class LLProgressBar;
+class LLSliderCtrl;
class LLViewerMediaImpl;
class LLPanelPrimMediaControls : public LLPanel
@@ -106,7 +107,9 @@ private:
void onCommitVolumeUp();
void onCommitVolumeDown();
+ void onCommitVolumeSlider();
void onToggleMute();
+ void showVolumeSlider();
static void onScrollUp(void* user_data);
static void onScrollUpHeld(void* user_data);
@@ -153,12 +156,14 @@ private:
LLButton *mVolumeBtn;
LLUICtrl *mVolumeUpCtrl;
LLUICtrl *mVolumeDownCtrl;
+ LLSliderCtrl *mVolumeSliderCtrl;
LLIconCtrl *mWhitelistIcon;
LLIconCtrl *mSecureLockIcon;
LLLayoutStack *mMediaControlsStack;
LLUICtrl *mLeftBookend;
LLUICtrl *mRightBookend;
LLUIImage* mBackgroundImage;
+ LLUIImage* mVolumeSliderBackgroundImage;
F32 mSkipStep;
S32 mMinWidth;
S32 mMinHeight;
@@ -198,6 +203,8 @@ private:
LLUUID mZoomObjectID;
S32 mZoomObjectFace;
+
+ bool mVolumeSliderVisible;
};
#endif // LL_PANELPRIMMEDIACONTROLS_H
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index 1830d00f68..3274820174 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -220,15 +220,15 @@ void LLPanelProfile::openPanel(LLPanel* panel, const LLSD& params)
panel->setRect(new_rect);
}
-void LLPanelProfile::notifyParent(const LLSD& info)
+S32 LLPanelProfile::notifyParent(const LLSD& info)
{
std::string action = info["action"];
// lets update Picks list after Pick was saved
if("save_new_pick" == action)
{
onOpen(info);
- return;
+ return 1;
}
- LLPanel::notifyParent(info);
+ return LLPanel::notifyParent(info);
}
diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h
index 067beb248b..bcf4bdd0ec 100644
--- a/indra/newview/llpanelprofile.h
+++ b/indra/newview/llpanelprofile.h
@@ -55,7 +55,7 @@ public:
virtual void openPanel(LLPanel* panel, const LLSD& params);
- void notifyParent(const LLSD& info);
+ S32 notifyParent(const LLSD& info);
protected:
diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp
index 523487fa14..43f80f6d6a 100644
--- a/indra/newview/llpanelteleporthistory.cpp
+++ b/indra/newview/llpanelteleporthistory.cpp
@@ -38,6 +38,8 @@
#include "llsidetray.h"
#include "llworldmap.h"
#include "llteleporthistorystorage.h"
+#include "lltextutil.h"
+
#include "llaccordionctrl.h"
#include "llaccordionctrltab.h"
#include "llflatlistview.h"
@@ -57,7 +59,7 @@ static const std::string COLLAPSED_BY_USER = "collapsed_by_user";
class LLTeleportHistoryFlatItem : public LLPanel
{
public:
- LLTeleportHistoryFlatItem(S32 index, LLTeleportHistoryPanel::ContextMenu *context_menu, const std::string &region_name);
+ LLTeleportHistoryFlatItem(S32 index, LLTeleportHistoryPanel::ContextMenu *context_menu, const std::string &region_name, const std::string &hl);
virtual ~LLTeleportHistoryFlatItem() {};
virtual BOOL postBuild();
@@ -82,13 +84,15 @@ private:
S32 mIndex;
std::string mRegionName;
+ std::string mHighlight;
};
-LLTeleportHistoryFlatItem::LLTeleportHistoryFlatItem(S32 index, LLTeleportHistoryPanel::ContextMenu *context_menu, const std::string &region_name)
+LLTeleportHistoryFlatItem::LLTeleportHistoryFlatItem(S32 index, LLTeleportHistoryPanel::ContextMenu *context_menu, const std::string &region_name, const std::string &hl)
: LLPanel(),
mIndex(index),
mContextMenu(context_menu),
- mRegionName(region_name)
+ mRegionName(region_name),
+ mHighlight(hl)
{
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_teleport_history_item.xml");
}
@@ -96,8 +100,7 @@ LLTeleportHistoryFlatItem::LLTeleportHistoryFlatItem(S32 index, LLTeleportHistor
//virtual
BOOL LLTeleportHistoryFlatItem::postBuild()
{
- LLTextBox *region = getChild<LLTextBox>("region");
- region->setValue(mRegionName);
+ LLTextUtil::textboxSetHighlightedVal(getChild<LLTextBox>("region"), LLStyle::Params(), mRegionName, mHighlight);
mProfileBtn = getChild<LLButton>("profile_btn");
@@ -316,11 +319,8 @@ void LLTeleportHistoryPanel::draw()
// virtual
void LLTeleportHistoryPanel::onSearchEdit(const std::string& string)
{
- if (sFilterSubString != string)
- {
- sFilterSubString = string;
- showTeleportHistory();
- }
+ sFilterSubString = string;
+ showTeleportHistory();
}
// virtual
@@ -521,7 +521,7 @@ void LLTeleportHistoryPanel::refresh()
if (curr_flat_view)
{
- LLTeleportHistoryFlatItem* item = new LLTeleportHistoryFlatItem(mCurrentItem, &mContextMenu, items[mCurrentItem].mTitle);
+ LLTeleportHistoryFlatItem* item = new LLTeleportHistoryFlatItem(mCurrentItem, &mContextMenu, items[mCurrentItem].mTitle, mFilterSubString);
curr_flat_view->addItem(item);
if (mLastSelectedItemIndex == mCurrentItem)
@@ -568,7 +568,8 @@ void LLTeleportHistoryPanel::replaceItem(S32 removed_index)
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
+ history_items[history_items.size() - 1].mTitle, // Most recent item, it was
+ mFilterSubString);
// added instead of removed
fv->addItem(item, LLUUID::null, ADD_TOP);
diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index 24ba288c49..4f0c873c61 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -162,6 +162,8 @@ void LLScreenChannel::addToast(const LLToast::Params& p)
if(mControlHovering)
{
new_toast_elem.toast->setOnToastHoverCallback(boost::bind(&LLScreenChannel::onToastHover, this, _1, _2));
+ new_toast_elem.toast->setMouseEnterCallback(boost::bind(&LLScreenChannel::stopFadingToasts, this));
+ new_toast_elem.toast->setMouseLeaveCallback(boost::bind(&LLScreenChannel::startFadingToasts, this));
}
if(show_toast)
@@ -586,6 +588,37 @@ void LLScreenChannel::closeStartUpToast()
}
}
+void LLNotificationsUI::LLScreenChannel::stopFadingToasts()
+{
+ if (!mToastList.size()) return;
+
+ if (!mHoveredToast) return;
+
+ std::vector<ToastElem>::iterator it = mToastList.begin();
+ while (it != mToastList.end())
+ {
+ ToastElem& elem = *it;
+ elem.toast->stopFading();
+ ++it;
+ }
+}
+
+void LLNotificationsUI::LLScreenChannel::startFadingToasts()
+{
+ if (!mToastList.size()) return;
+
+ //because onMouseLeave is processed after onMouseEnter
+ if (mHoveredToast) return;
+
+ std::vector<ToastElem>::iterator it = mToastList.begin();
+ while (it != mToastList.end())
+ {
+ ToastElem& elem = *it;
+ elem.toast->startFading();
+ ++it;
+ }
+}
+
//--------------------------------------------------------------------------
void LLScreenChannel::hideToastsFromScreen()
{
@@ -713,6 +746,8 @@ void LLScreenChannel::updateShowToastsState()
}
}
+ // *TODO: mantipov: what we have to do with derived classes: LLNotificationWellWindow & LLIMWelWindow?
+ // See EXT-3081 for details
// for Message Well floater showed in a docked state - adjust channel's height
if(dynamic_cast<LLSysWellWindow*>(floater))
{
diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h
index f39b94b89d..67f1c9bdc6 100644
--- a/indra/newview/llscreenchannel.h
+++ b/indra/newview/llscreenchannel.h
@@ -184,6 +184,13 @@ public:
// close the StartUp Toast
void closeStartUpToast();
+
+ /** Stop fading all toasts */
+ virtual void stopFadingToasts();
+
+ /** Start fading all toasts */
+ virtual void startFadingToasts();
+
// get StartUp Toast's state
static bool getStartUpToastShown() { return mWasStartUpToastShown; }
// tell all channels that the StartUp toast was shown and allow them showing of toasts
diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp
index 155172128b..8de99a48aa 100644
--- a/indra/newview/llscriptfloater.cpp
+++ b/indra/newview/llscriptfloater.cpp
@@ -62,15 +62,15 @@ LLUUID notification_id_to_object_id(const LLUUID& notification_id)
//////////////////////////////////////////////////////////////////////////
LLScriptFloater::LLScriptFloater(const LLSD& key)
-: LLTransientDockableFloater(NULL, true, key)
+: LLDockableFloater(NULL, true, key)
, mScriptForm(NULL)
-, mObjectId(key.asUUID())
{
}
bool LLScriptFloater::toggle(const LLUUID& object_id)
{
- LLScriptFloater* floater = LLFloaterReg::findTypedInstance<LLScriptFloater>("script_floater", object_id);
+ LLUUID notification_id = LLScriptFloaterManager::getInstance()->findNotificationId(object_id);
+ LLScriptFloater* floater = LLFloaterReg::findTypedInstance<LLScriptFloater>("script_floater", notification_id);
// show existing floater
if(floater)
@@ -97,7 +97,10 @@ bool LLScriptFloater::toggle(const LLUUID& object_id)
LLScriptFloater* LLScriptFloater::show(const LLUUID& object_id)
{
- LLScriptFloater* floater = LLFloaterReg::showTypedInstance<LLScriptFloater>("script_floater", object_id);
+ LLUUID notification_id = LLScriptFloaterManager::getInstance()->findNotificationId(object_id);
+
+ LLScriptFloater* floater = LLFloaterReg::showTypedInstance<LLScriptFloater>("script_floater", notification_id);
+ floater->setObjectId(object_id);
floater->createForm(object_id);
if (floater->getDockControl() == NULL)
@@ -156,19 +159,22 @@ void LLScriptFloater::createForm(const LLUUID& object_id)
void LLScriptFloater::onClose(bool app_quitting)
{
- LLScriptFloaterManager::getInstance()->removeNotificationByObjectId(getObjectId());
+ if(getObjectId().notNull())
+ {
+ LLScriptFloaterManager::getInstance()->removeNotificationByObjectId(getObjectId());
+ }
}
void LLScriptFloater::setDocked(bool docked, bool pop_on_undock /* = true */)
{
- LLTransientDockableFloater::setDocked(docked, pop_on_undock);
+ LLDockableFloater::setDocked(docked, pop_on_undock);
hideToastsIfNeeded();
}
void LLScriptFloater::setVisible(BOOL visible)
{
- LLTransientDockableFloater::setVisible(visible);
+ LLDockableFloater::setVisible(visible);
hideToastsIfNeeded();
}
@@ -201,12 +207,23 @@ void LLScriptFloaterManager::onAddNotification(const LLUUID& notification_id)
return;
}
+ // Need to indicate of "new message" for object chiclets according to requirements
+ // specified in the Message Bar design specification. See EXT-3142.
+ bool set_new_message = false;
+
// If an Object spawns more-than-one floater, only the newest one is shown.
// The previous is automatically closed.
script_notification_map_t::iterator it = mNotifications.find(object_id);
if(it != mNotifications.end())
{
- onRemoveNotification(notification_id);
+ LLScriptFloater* floater = LLFloaterReg::findTypedInstance<LLScriptFloater>("script_floater", it->second.notification_id);
+ if(floater)
+ {
+ // Generate chiclet with a "new message" indicator if a docked window was opened. See EXT-3142.
+ set_new_message = floater->isShown();
+ }
+
+ onRemoveNotification(it->second.notification_id);
}
LLNotificationData nd = {notification_id};
@@ -223,12 +240,12 @@ void LLScriptFloaterManager::onAddNotification(const LLUUID& notification_id)
LLBottomTray::getInstance()->getChicletPanel()->createChiclet<LLScriptChiclet>(object_id);
}
- toggleScriptFloater(object_id);
+ toggleScriptFloater(object_id, set_new_message);
}
void LLScriptFloaterManager::onRemoveNotification(const LLUUID& notification_id)
{
- LLUUID object_id = notification_id_to_object_id(notification_id);
+ LLUUID object_id = findObjectId(notification_id);
if(object_id.isNull())
{
llwarns << "Invalid notification, no object id" << llendl;
@@ -241,22 +258,24 @@ void LLScriptFloaterManager::onRemoveNotification(const LLUUID& notification_id)
LLUUID channel_id(gSavedSettings.getString("NotificationChannelUUID"));
LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>
(LLChannelManager::getInstance()->findChannelByID(channel_id));
- if(channel)
+ LLUUID n_toast_id = findNotificationToastId(object_id);
+ if(channel && n_toast_id.notNull())
{
- channel->killToastByNotificationID(findNotificationToastId(object_id));
+ channel->killToastByNotificationID(n_toast_id);
}
- mNotifications.erase(object_id);
-
// remove related chiclet
LLBottomTray::getInstance()->getChicletPanel()->removeChiclet(object_id);
// close floater
- LLScriptFloater* floater = LLFloaterReg::findTypedInstance<LLScriptFloater>("script_floater", object_id);
+ LLScriptFloater* floater = LLFloaterReg::findTypedInstance<LLScriptFloater>("script_floater", notification_id);
if(floater)
{
+ floater->setObjectId(LLUUID::null);
floater->closeFloater();
}
+
+ mNotifications.erase(object_id);
}
void LLScriptFloaterManager::removeNotificationByObjectId(const LLUUID& object_id)
@@ -270,13 +289,13 @@ void LLScriptFloaterManager::removeNotificationByObjectId(const LLUUID& object_i
}
}
-void LLScriptFloaterManager::toggleScriptFloater(const LLUUID& object_id)
+void LLScriptFloaterManager::toggleScriptFloater(const LLUUID& object_id, bool set_new_message)
{
// hide "new message" icon from chiclet
LLIMChiclet* chiclet = LLBottomTray::getInstance()->getChicletPanel()->findChiclet<LLIMChiclet>(object_id);
if(chiclet)
{
- chiclet->setShowNewMessagesIcon(false);
+ chiclet->setShowNewMessagesIcon(set_new_message);
}
// kill toast
@@ -301,6 +320,22 @@ void LLScriptFloaterManager::setNotificationToastId(const LLUUID& object_id, con
}
}
+LLUUID LLScriptFloaterManager::findObjectId(const LLUUID& notification_id)
+{
+ if(notification_id.notNull())
+ {
+ script_notification_map_t::const_iterator it = mNotifications.begin();
+ for(; mNotifications.end() != it; ++it)
+ {
+ if(notification_id == it->second.notification_id)
+ {
+ return it->first;
+ }
+ }
+ }
+ return LLUUID::null;
+}
+
LLUUID LLScriptFloaterManager::findNotificationId(const LLUUID& object_id)
{
script_notification_map_t::const_iterator it = mNotifications.find(object_id);
diff --git a/indra/newview/llscriptfloater.h b/indra/newview/llscriptfloater.h
index 0e1a7f36b7..8de7a28d0f 100644
--- a/indra/newview/llscriptfloater.h
+++ b/indra/newview/llscriptfloater.h
@@ -43,6 +43,9 @@ class LLToastNotifyPanel;
*/
class LLScriptFloaterManager : public LLSingleton<LLScriptFloaterManager>
{
+ // *TODO
+ // LLScriptFloaterManager and LLScriptFloater will need some refactoring after we
+ // know how script notifications should look like.
public:
/**
@@ -67,7 +70,9 @@ public:
* Toggles script floater.
* Removes "new message" icon from chiclet and removes notification toast.
*/
- void toggleScriptFloater(const LLUUID& object_id);
+ void toggleScriptFloater(const LLUUID& object_id, bool set_new_message = false);
+
+ LLUUID findObjectId(const LLUUID& notification_id);
LLUUID findNotificationId(const LLUUID& object_id);
@@ -102,7 +107,7 @@ private:
* LLScriptFloater will create script form based on notification data and
* will auto fit the form.
*/
-class LLScriptFloater : public LLTransientDockableFloater
+class LLScriptFloater : public LLDockableFloater
{
public:
@@ -125,6 +130,8 @@ public:
const LLUUID& getObjectId() { return mObjectId; }
+ void setObjectId(const LLUUID& id) { mObjectId = id; }
+
/**
* Close notification if script floater is closed.
*/
@@ -154,8 +161,6 @@ protected:
*/
static void hideToastsIfNeeded();
- void setObjectId(const LLUUID& id) { mObjectId = id; }
-
private:
LLToastNotifyPanel* mScriptForm;
LLUUID mObjectId;
diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp
index 824def3d92..ca7a3b663a 100644
--- a/indra/newview/llsidepanelinventory.cpp
+++ b/indra/newview/llsidepanelinventory.cpp
@@ -128,10 +128,6 @@ void LLSidepanelInventory::onOpen(const LLSD& key)
mTaskPanel->setObjectSelection(LLSelectMgr::getInstance()->getSelection());
showTaskInfoPanel();
}
- if (key.has("select"))
- {
- mPanelMainInventory->getPanel()->setSelection(key["select"].asUUID(), TAKE_FOCUS_NO);
- }
}
void LLSidepanelInventory::onInfoButtonClicked()
@@ -277,3 +273,21 @@ LLInventoryItem *LLSidepanelInventory::getSelectedItem()
LLInventoryItem *item = gInventory.getItem(item_id);
return item;
}
+
+LLInventoryPanel *LLSidepanelInventory::getActivePanel()
+{
+ if (!getVisible())
+ {
+ return NULL;
+ }
+ if (mInventoryPanel->getVisible())
+ {
+ return mPanelMainInventory->getActivePanel();
+ }
+ return NULL;
+}
+
+BOOL LLSidepanelInventory::isMainInventoryPanelActive() const
+{
+ return mInventoryPanel->getVisible();
+}
diff --git a/indra/newview/llsidepanelinventory.h b/indra/newview/llsidepanelinventory.h
index 6aa9cc745f..231cdac9e1 100644
--- a/indra/newview/llsidepanelinventory.h
+++ b/indra/newview/llsidepanelinventory.h
@@ -36,6 +36,7 @@
class LLFolderViewItem;
class LLInventoryItem;
+class LLInventoryPanel;
class LLPanelMainInventory;
class LLSidepanelItemInfo;
class LLSidepanelTaskInfo;
@@ -49,6 +50,9 @@ public:
/*virtual*/ BOOL postBuild();
/*virtual*/ void onOpen(const LLSD& key);
+ LLInventoryPanel* getActivePanel(); // Returns an active inventory panel, if any.
+ BOOL isMainInventoryPanelActive() const;
+
protected:
// Tracks highlighted (selected) item in inventory panel.
LLInventoryItem *getSelectedItem();
diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp
index 9333465052..a1af2e5411 100644
--- a/indra/newview/llsidetray.cpp
+++ b/indra/newview/llsidetray.cpp
@@ -128,6 +128,7 @@ public:
void onOpen (const LLSD& key);
+ LLPanel *getPanel();
private:
std::string mTabTitle;
std::string mImage;
@@ -199,11 +200,17 @@ void LLSideTrayTab::reshape (S32 width, S32 height, BOOL called_from_parent )
void LLSideTrayTab::onOpen (const LLSD& key)
{
- LLPanel* panel = dynamic_cast<LLPanel*>(mMainPanel);
+ LLPanel *panel = getPanel();
if(panel)
panel->onOpen(key);
}
+LLPanel* LLSideTrayTab::getPanel()
+{
+ LLPanel* panel = dynamic_cast<LLPanel*>(mMainPanel);
+ return panel;
+}
+
LLSideTrayTab* LLSideTrayTab::createInstance ()
{
LLSideTrayTab::Params tab_params;
@@ -653,6 +660,23 @@ LLPanel* LLSideTray::getPanel (const std::string& panel_name)
return NULL;
}
+LLPanel* LLSideTray::getActivePanel()
+{
+ if (mActiveTab && !mCollapsed)
+ {
+ return mActiveTab->getPanel();
+ }
+ return NULL;
+}
+
+bool LLSideTray::isPanelActive(const std::string& panel_name)
+{
+ LLPanel *panel = getActivePanel();
+ if (!panel) return false;
+ return (panel->getName() == panel_name);
+}
+
+
// *TODO: Eliminate magic constants.
static const S32 fake_offset = 132;
static const S32 fake_top_offset = 18;
diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h
index 7321574681..de2cfe9711 100644
--- a/indra/newview/llsidetray.h
+++ b/indra/newview/llsidetray.h
@@ -100,6 +100,12 @@ public:
* get the panel (don't show it or do anything else with it)
*/
LLPanel* getPanel (const std::string& panel_name);
+ LLPanel* getActivePanel ();
+ bool isPanelActive (const std::string& panel_name);
+ /*
+ * get currently active tab
+ */
+ const LLSideTrayTab* getActiveTab() const { return mActiveTab; }
/*
* collapse SideBar, hiding visible tab and moving tab buttons
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 58df2ffb19..be0c92a76d 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -77,7 +77,7 @@
#include "llsecondlifeurls.h"
#include "llstring.h"
#include "lluserrelations.h"
-#include "llversionviewer.h"
+#include "llversioninfo.h"
#include "llviewercontrol.h"
#include "llvfs.h"
#include "llxorcipher.h" // saved password, MAC address
@@ -542,9 +542,9 @@ bool idle_startup()
if(!start_messaging_system(
message_template_path,
port,
- LL_VERSION_MAJOR,
- LL_VERSION_MINOR,
- LL_VERSION_PATCH,
+ LLVersionInfo::getMajor(),
+ LLVersionInfo::getMinor(),
+ LLVersionInfo::getPatch(),
FALSE,
std::string(),
responder,
diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp
index 539536b527..bef7f5d6aa 100644
--- a/indra/newview/llsyswellwindow.cpp
+++ b/indra/newview/llsyswellwindow.cpp
@@ -33,6 +33,7 @@
#include "llviewerprecompiledheaders.h" // must be first include
#include "llflatlistview.h"
+#include "llfloaterreg.h"
#include "llsyswellwindow.h"
@@ -44,16 +45,15 @@
#include "lltoastpanel.h"
#include "llnotificationmanager.h"
-
//---------------------------------------------------------------------------------
LLSysWellWindow::LLSysWellWindow(const LLSD& key) : LLDockableFloater(NULL, key),
mChannel(NULL),
mMessageList(NULL),
- mSeparator(NULL)
-{
- LLIMMgr::getInstance()->addSessionObserver(this);
- LLIMChiclet::sFindChicletsSignal.connect(boost::bind(&LLSysWellWindow::findIMChiclet, this, _1));
+ mSeparator(NULL),
+ NOTIFICATION_WELL_ANCHOR_NAME("notification_well_panel"),
+ IM_WELL_ANCHOR_NAME("im_well_panel")
+{
mTypedItemsCount[IT_NOTIFICATION] = 0;
mTypedItemsCount[IT_INSTANT_MESSAGE] = 0;
}
@@ -63,11 +63,6 @@ BOOL LLSysWellWindow::postBuild()
{
mMessageList = getChild<LLFlatListView>("notification_list");
- // init connections to the list's update events
- connectListUpdaterToSignal("notify");
- connectListUpdaterToSignal("groupnotify");
- connectListUpdaterToSignal("offer");
-
// get a corresponding channel
initChannel();
@@ -89,81 +84,19 @@ BOOL LLSysWellWindow::postBuild()
//---------------------------------------------------------------------------------
void LLSysWellWindow::setMinimized(BOOL minimize)
{
- // we don't show empty Message Well window
- if (!minimize && isWindowEmpty())
- {
- return;
- }
-
LLDockableFloater::setMinimized(minimize);
}
//---------------------------------------------------------------------------------
-void LLSysWellWindow::connectListUpdaterToSignal(std::string notification_type)
-{
- LLNotificationsUI::LLNotificationManager* manager = LLNotificationsUI::LLNotificationManager::getInstance();
- LLNotificationsUI::LLEventHandler* n_handler = manager->getHandlerForNotification(notification_type);
- if(n_handler)
- {
- n_handler->setNotificationIDCallback(boost::bind(&LLSysWellWindow::removeItemByID, this, _1));
- }
- else
- {
- llwarns << "LLSysWellWindow::connectListUpdaterToSignal() - could not get a handler for '" << notification_type <<"' type of notifications" << llendl;
- }
-}
-
-//---------------------------------------------------------------------------------
void LLSysWellWindow::onStartUpToastClick(S32 x, S32 y, MASK mask)
{
- onChicletClick();
-}
-
-//---------------------------------------------------------------------------------
-void LLSysWellWindow::onChicletClick()
-{
- // 1 - remove StartUp toast and channel if present
- if(!LLNotificationsUI::LLScreenChannel::getStartUpToastShown())
- {
- LLNotificationsUI::LLChannelManager::getInstance()->onStartUpToastClose();
- }
-
- // 2 - toggle instance of SysWell's chiclet-window
- toggleWindow();
+ // just set floater visible. Screen channels will be cleared.
+ setVisible(TRUE);
}
//---------------------------------------------------------------------------------
LLSysWellWindow::~LLSysWellWindow()
{
- LLIMMgr::getInstance()->removeSessionObserver(this);
-}
-
-//---------------------------------------------------------------------------------
-void LLSysWellWindow::addItem(LLSysWellItem::Params p)
-{
- LLSD value = p.notification_id;
- // do not add clones
- if( mMessageList->getItemByValue(value))
- return;
-
- LLSysWellItem* new_item = new LLSysWellItem(p);
- if (mMessageList->addItem(new_item, value, ADD_TOP))
- {
- handleItemAdded(IT_NOTIFICATION);
-
- reshapeWindow();
-
- new_item->setOnItemCloseCallback(boost::bind(&LLSysWellWindow::onItemClose, this, _1));
- new_item->setOnItemClickCallback(boost::bind(&LLSysWellWindow::onItemClick, this, _1));
- }
- else
- {
- llwarns << "Unable to add Notification into the list, notification ID: " << p.notification_id
- << ", title: " << p.title
- << llendl;
-
- new_item->die();
- }
}
//---------------------------------------------------------------------------------
@@ -194,42 +127,13 @@ void LLSysWellWindow::removeItemByID(const LLUUID& id)
}
//---------------------------------------------------------------------------------
-void LLSysWellWindow::onItemClick(LLSysWellItem* item)
-{
- LLUUID id = item->getID();
- if(mChannel)
- mChannel->loadStoredToastByNotificationIDToChannel(id);
-}
-
-//---------------------------------------------------------------------------------
-void LLSysWellWindow::onItemClose(LLSysWellItem* item)
-{
- LLUUID id = item->getID();
- removeItemByID(id);
- if(mChannel)
- mChannel->killToastByNotificationID(id);
-}
-
-//--------------------------------------------------------------------------
-void LLSysWellWindow::onStoreToast(LLPanel* info_panel, LLUUID id)
-{
- LLSysWellItem::Params p;
- p.notification_id = id;
- p.title = static_cast<LLToastPanel*>(info_panel)->getTitle();
- addItem(p);
-}
-
//---------------------------------------------------------------------------------
void LLSysWellWindow::initChannel()
{
LLNotificationsUI::LLScreenChannelBase* channel = LLNotificationsUI::LLChannelManager::getInstance()->findChannelByID(
LLUUID(gSavedSettings.getString("NotificationChannelUUID")));
mChannel = dynamic_cast<LLNotificationsUI::LLScreenChannel*>(channel);
- if(mChannel)
- {
- mChannel->setOnStoreToastCallback(boost::bind(&LLSysWellWindow::onStoreToast, this, _1, _2));
- }
- else
+ if(NULL == mChannel)
{
llwarns << "LLSysWellWindow::initChannel() - could not get a requested screen channel" << llendl;
}
@@ -242,57 +146,24 @@ void LLSysWellWindow::getAllowedRect(LLRect& rect)
}
//---------------------------------------------------------------------------------
-void LLSysWellWindow::toggleWindow()
-{
- if (getDockControl() == NULL)
- {
- setDockControl(new LLDockControl(
- LLBottomTray::getInstance()->getSysWell(), this,
- getDockTongue(), LLDockControl::TOP, boost::bind(&LLSysWellWindow::getAllowedRect, this, _1)));
- }
- if(!getVisible() || isMinimized())
- {
- if(mChannel)
- {
- mChannel->removeAndStoreAllStorableToasts();
- }
- if(isWindowEmpty())
- {
- return;
- }
-
- setVisible(TRUE);
- }
- else if (isDocked())
- {
- setVisible(FALSE);
- }
- else if(!isDocked())
- {
- // bring to front undocked floater
- setVisible(TRUE);
- }
-}
//---------------------------------------------------------------------------------
void LLSysWellWindow::setVisible(BOOL visible)
{
- if(visible)
+ if (visible)
{
- if (LLBottomTray::instanceExists())
+ if (NULL == getDockControl() && getDockTongue().notNull())
{
- LLBottomTray::getInstance()->getSysWell()->setToggleState(TRUE);
- }
- }
- else
- {
- if (LLBottomTray::instanceExists())
- {
- LLBottomTray::getInstance()->getSysWell()->setToggleState(FALSE);
+ setDockControl(new LLDockControl(
+ LLBottomTray::getInstance()->getChild<LLView>(getAnchorViewName()), this,
+ getDockTongue(), LLDockControl::TOP, boost::bind(&LLSysWellWindow::getAllowedRect, this, _1)));
}
}
+ // do not show empty window
+ if (NULL == mMessageList || isWindowEmpty()) visible = FALSE;
+
LLDockableFloater::setVisible(visible);
// update notification channel state
@@ -303,6 +174,12 @@ void LLSysWellWindow::setVisible(BOOL visible)
}
//---------------------------------------------------------------------------------
+void LLSysWellWindow::onFocusLost()
+{
+ setVisible(false);
+}
+
+//---------------------------------------------------------------------------------
void LLSysWellWindow::setDocked(bool docked, bool pop_on_undock)
{
LLDockableFloater::setDocked(docked, pop_on_undock);
@@ -347,104 +224,13 @@ void LLSysWellWindow::reshapeWindow()
}
//---------------------------------------------------------------------------------
-LLChiclet* LLSysWellWindow::findIMChiclet(const LLUUID& sessionId)
-{
- LLChiclet* res = NULL;
- RowPanel* panel = mMessageList->getTypedItemByValue<RowPanel>(sessionId);
- if (panel != NULL)
- {
- res = panel->mChiclet;
- }
-
- return res;
-}
-
-//---------------------------------------------------------------------------------
-void LLSysWellWindow::addIMRow(const LLUUID& sessionId, S32 chicletCounter,
- const std::string& name, const LLUUID& otherParticipantId)
-{
- RowPanel* item = new RowPanel(this, sessionId, chicletCounter, name, otherParticipantId);
- if (mMessageList->insertItemAfter(mSeparator, item, sessionId))
- {
- handleItemAdded(IT_INSTANT_MESSAGE);
- }
- else
- {
- llwarns << "Unable to add IM Row into the list, sessionID: " << sessionId
- << ", name: " << name
- << ", other participant ID: " << otherParticipantId
- << llendl;
-
- item->die();
- }
-}
-
-//---------------------------------------------------------------------------------
-void LLSysWellWindow::delIMRow(const LLUUID& sessionId)
-{
- if (mMessageList->removeItemByValue(sessionId))
- {
- handleItemRemoved(IT_INSTANT_MESSAGE);
- }
- else
- {
- llwarns << "Unable to remove IM Row from the list, sessionID: " << sessionId
- << llendl;
- }
-
- // remove all toasts that belong to this session from a screen
- if(mChannel)
- mChannel->removeToastsBySessionID(sessionId);
-
- // hide chiclet window if there are no items left
- if(isWindowEmpty())
- {
- setVisible(FALSE);
- }
-}
-
-//---------------------------------------------------------------------------------
bool LLSysWellWindow::isWindowEmpty()
{
// keep in mind, mSeparator is always in the list
return mMessageList->size() == 1;
}
-//---------------------------------------------------------------------------------
-//virtual
-void LLSysWellWindow::sessionAdded(const LLUUID& session_id,
- const std::string& name, const LLUUID& other_participant_id)
-{
- if (mMessageList->getItemByValue(session_id) == NULL)
- {
- S32 chicletCounter = LLIMModel::getInstance()->getNumUnread(session_id);
- if (chicletCounter > -1)
- {
- addIMRow(session_id, chicletCounter, name, other_participant_id);
- reshapeWindow();
- }
- }
-}
-
-//---------------------------------------------------------------------------------
-//virtual
-void LLSysWellWindow::sessionRemoved(const LLUUID& sessionId)
-{
- delIMRow(sessionId);
- reshapeWindow();
-}
-
-void LLSysWellWindow::sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id)
-{
- //for outgoing ad-hoc and group im sessions only
- LLChiclet* chiclet = findIMChiclet(old_session_id);
- if (chiclet)
- {
- chiclet->setSessionId(new_session_id);
- mMessageList->updateValue(old_session_id, new_session_id);
- }
-}
-
+// *TODO: mantipov: probably is deprecated
void LLSysWellWindow::handleItemAdded(EItemType added_item_type)
{
bool should_be_shown = ++mTypedItemsCount[added_item_type] == 1 && anotherTypeExists(added_item_type);
@@ -492,8 +278,12 @@ bool LLSysWellWindow::anotherTypeExists(EItemType item_type)
return exists;
}
+/************************************************************************/
+/* RowPanel implementation */
+/************************************************************************/
+
//---------------------------------------------------------------------------------
-LLSysWellWindow::RowPanel::RowPanel(const LLSysWellWindow* parent, const LLUUID& sessionId,
+LLIMWellWindow::RowPanel::RowPanel(const LLSysWellWindow* parent, const LLUUID& sessionId,
S32 chicletCounter, const std::string& name, const LLUUID& otherParticipantId) :
LLPanel(LLPanel::Params()), mChiclet(NULL), mParent(parent)
{
@@ -528,36 +318,36 @@ LLSysWellWindow::RowPanel::RowPanel(const LLSysWellWindow* parent, const LLUUID&
contactName->setValue(name);
mCloseBtn = getChild<LLButton>("hide_btn");
- mCloseBtn->setCommitCallback(boost::bind(&LLSysWellWindow::RowPanel::onClosePanel, this));
+ mCloseBtn->setCommitCallback(boost::bind(&LLIMWellWindow::RowPanel::onClosePanel, this));
}
//---------------------------------------------------------------------------------
-LLSysWellWindow::RowPanel::~RowPanel()
+LLIMWellWindow::RowPanel::~RowPanel()
{
}
//---------------------------------------------------------------------------------
-void LLSysWellWindow::RowPanel::onClosePanel()
+void LLIMWellWindow::RowPanel::onClosePanel()
{
gIMMgr->leaveSession(mChiclet->getSessionId());
// This row panel will be removed from the list in LLSysWellWindow::sessionRemoved().
}
//---------------------------------------------------------------------------------
-void LLSysWellWindow::RowPanel::onMouseEnter(S32 x, S32 y, MASK mask)
+void LLIMWellWindow::RowPanel::onMouseEnter(S32 x, S32 y, MASK mask)
{
setTransparentColor(LLUIColorTable::instance().getColor("SysWellItemSelected"));
}
//---------------------------------------------------------------------------------
-void LLSysWellWindow::RowPanel::onMouseLeave(S32 x, S32 y, MASK mask)
+void LLIMWellWindow::RowPanel::onMouseLeave(S32 x, S32 y, MASK mask)
{
setTransparentColor(LLUIColorTable::instance().getColor("SysWellItemUnselected"));
}
//---------------------------------------------------------------------------------
// virtual
-BOOL LLSysWellWindow::RowPanel::handleMouseDown(S32 x, S32 y, MASK mask)
+BOOL LLIMWellWindow::RowPanel::handleMouseDown(S32 x, S32 y, MASK mask)
{
// Pass the mouse down event to the chiclet (EXT-596).
if (!mChiclet->pointInView(x, y) && !mCloseBtn->getRect().pointInRect(x, y)) // prevent double call of LLIMChiclet::onMouseDown()
@@ -566,4 +356,263 @@ BOOL LLSysWellWindow::RowPanel::handleMouseDown(S32 x, S32 y, MASK mask)
return LLPanel::handleMouseDown(x, y, mask);
}
+
+
+/************************************************************************/
+/* LLNotificationWellWindow implementation */
+/************************************************************************/
+
+//////////////////////////////////////////////////////////////////////////
+// PUBLIC METHODS
+LLNotificationWellWindow::LLNotificationWellWindow(const LLSD& key)
+: LLSysWellWindow(key)
+{
+ // init connections to the list's update events
+ connectListUpdaterToSignal("notify");
+ connectListUpdaterToSignal("groupnotify");
+ connectListUpdaterToSignal("offer");
+}
+
+// static
+LLNotificationWellWindow* LLNotificationWellWindow::getInstance(const LLSD& key /*= LLSD()*/)
+{
+ return LLFloaterReg::getTypedInstance<LLNotificationWellWindow>("notification_well_window", key);
+}
+
+// virtual
+BOOL LLNotificationWellWindow::postBuild()
+{
+ BOOL rv = LLSysWellWindow::postBuild();
+ setTitle(getString("title_notification_well_window"));
+ return rv;
+}
+
+// virtual
+void LLNotificationWellWindow::setVisible(BOOL visible)
+{
+ if (visible)
+ {
+ // when Notification channel is cleared, storable toasts will be added into the list.
+ clearScreenChannels();
+ }
+
+ LLSysWellWindow::setVisible(visible);
+}
+
+//---------------------------------------------------------------------------------
+void LLNotificationWellWindow::addItem(LLSysWellItem::Params p)
+{
+ LLSD value = p.notification_id;
+ // do not add clones
+ if( mMessageList->getItemByValue(value))
+ return;
+
+ LLSysWellItem* new_item = new LLSysWellItem(p);
+ if (mMessageList->addItem(new_item, value, ADD_TOP))
+ {
+ handleItemAdded(IT_NOTIFICATION);
+
+ reshapeWindow();
+
+ new_item->setOnItemCloseCallback(boost::bind(&LLNotificationWellWindow::onItemClose, this, _1));
+ new_item->setOnItemClickCallback(boost::bind(&LLNotificationWellWindow::onItemClick, this, _1));
+ }
+ else
+ {
+ llwarns << "Unable to add Notification into the list, notification ID: " << p.notification_id
+ << ", title: " << p.title
+ << llendl;
+
+ new_item->die();
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////
+// PRIVATE METHODS
+void LLNotificationWellWindow::initChannel()
+{
+ LLSysWellWindow::initChannel();
+ if(mChannel)
+ {
+ mChannel->setOnStoreToastCallback(boost::bind(&LLNotificationWellWindow::onStoreToast, this, _1, _2));
+ }
+}
+
+void LLNotificationWellWindow::clearScreenChannels()
+{
+ // 1 - remove StartUp toast and channel if present
+ if(!LLNotificationsUI::LLScreenChannel::getStartUpToastShown())
+ {
+ LLNotificationsUI::LLChannelManager::getInstance()->onStartUpToastClose();
+ }
+
+ // 2 - remove toasts in Notification channel
+ if(mChannel)
+ {
+ mChannel->removeAndStoreAllStorableToasts();
+ }
+}
+
+void LLNotificationWellWindow::onStoreToast(LLPanel* info_panel, LLUUID id)
+{
+ LLSysWellItem::Params p;
+ p.notification_id = id;
+ p.title = static_cast<LLToastPanel*>(info_panel)->getTitle();
+ addItem(p);
+}
+
+void LLNotificationWellWindow::connectListUpdaterToSignal(std::string notification_type)
+{
+ LLNotificationsUI::LLNotificationManager* manager = LLNotificationsUI::LLNotificationManager::getInstance();
+ LLNotificationsUI::LLEventHandler* n_handler = manager->getHandlerForNotification(notification_type);
+ if(n_handler)
+ {
+ n_handler->setNotificationIDCallback(boost::bind(&LLNotificationWellWindow::removeItemByID, this, _1));
+ }
+ else
+ {
+ llwarns << "LLSysWellWindow::connectListUpdaterToSignal() - could not get a handler for '" << notification_type <<"' type of notifications" << llendl;
+ }
+}
+
+void LLNotificationWellWindow::onItemClick(LLSysWellItem* item)
+{
+ LLUUID id = item->getID();
+ if(mChannel)
+ mChannel->loadStoredToastByNotificationIDToChannel(id);
+}
+
+void LLNotificationWellWindow::onItemClose(LLSysWellItem* item)
+{
+ LLUUID id = item->getID();
+ removeItemByID(id);
+ if(mChannel)
+ mChannel->killToastByNotificationID(id);
+}
+
+
+
+/************************************************************************/
+/* LLIMWellWindow implementation */
+/************************************************************************/
+
+//////////////////////////////////////////////////////////////////////////
+// PUBLIC METHODS
+LLIMWellWindow::LLIMWellWindow(const LLSD& key)
+: LLSysWellWindow(key)
+{
+ LLIMMgr::getInstance()->addSessionObserver(this);
+ LLIMChiclet::sFindChicletsSignal.connect(boost::bind(&LLIMWellWindow::findIMChiclet, this, _1));
+}
+
+LLIMWellWindow::~LLIMWellWindow()
+{
+ LLIMMgr::getInstance()->removeSessionObserver(this);
+}
+
+// static
+LLIMWellWindow* LLIMWellWindow::getInstance(const LLSD& key /*= LLSD()*/)
+{
+ return LLFloaterReg::getTypedInstance<LLIMWellWindow>("im_well_window", key);
+}
+
+BOOL LLIMWellWindow::postBuild()
+{
+ BOOL rv = LLSysWellWindow::postBuild();
+ setTitle(getString("title_im_well_window"));
+ return rv;
+}
+
+//virtual
+void LLIMWellWindow::sessionAdded(const LLUUID& session_id,
+ const std::string& name, const LLUUID& other_participant_id)
+{
+ if (mMessageList->getItemByValue(session_id) == NULL)
+ {
+ S32 chicletCounter = LLIMModel::getInstance()->getNumUnread(session_id);
+ if (chicletCounter > -1)
+ {
+ addIMRow(session_id, chicletCounter, name, other_participant_id);
+ reshapeWindow();
+ }
+ }
+}
+
+//virtual
+void LLIMWellWindow::sessionRemoved(const LLUUID& sessionId)
+{
+ delIMRow(sessionId);
+ reshapeWindow();
+}
+
+//virtual
+void LLIMWellWindow::sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id)
+{
+ //for outgoing ad-hoc and group im sessions only
+ LLChiclet* chiclet = findIMChiclet(old_session_id);
+ if (chiclet)
+ {
+ chiclet->setSessionId(new_session_id);
+ mMessageList->updateValue(old_session_id, new_session_id);
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////
+// PRIVATE METHODS
+LLChiclet* LLIMWellWindow::findIMChiclet(const LLUUID& sessionId)
+{
+ LLChiclet* res = NULL;
+ RowPanel* panel = mMessageList->getTypedItemByValue<RowPanel>(sessionId);
+ if (panel != NULL)
+ {
+ res = panel->mChiclet;
+ }
+
+ return res;
+}
+
+//---------------------------------------------------------------------------------
+void LLIMWellWindow::addIMRow(const LLUUID& sessionId, S32 chicletCounter,
+ const std::string& name, const LLUUID& otherParticipantId)
+{
+ RowPanel* item = new RowPanel(this, sessionId, chicletCounter, name, otherParticipantId);
+ if (mMessageList->insertItemAfter(mSeparator, item, sessionId))
+ {
+ handleItemAdded(IT_INSTANT_MESSAGE);
+ }
+ else
+ {
+ llwarns << "Unable to add IM Row into the list, sessionID: " << sessionId
+ << ", name: " << name
+ << ", other participant ID: " << otherParticipantId
+ << llendl;
+
+ item->die();
+ }
+}
+
+//---------------------------------------------------------------------------------
+void LLIMWellWindow::delIMRow(const LLUUID& sessionId)
+{
+ if (mMessageList->removeItemByValue(sessionId))
+ {
+ handleItemRemoved(IT_INSTANT_MESSAGE);
+ }
+ else
+ {
+ llwarns << "Unable to remove IM Row from the list, sessionID: " << sessionId
+ << llendl;
+ }
+
+ // remove all toasts that belong to this session from a screen
+ if(mChannel)
+ mChannel->removeToastsBySessionID(sessionId);
+
+ // hide chiclet window if there are no items left
+ if(isWindowEmpty())
+ {
+ setVisible(FALSE);
+ }
+}
+
// EOF
diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h
index 3e4cdbdcbe..adbc83677d 100644
--- a/indra/newview/llsyswellwindow.h
+++ b/indra/newview/llsyswellwindow.h
@@ -47,7 +47,9 @@ class LLFlatListView;
class LLChiclet;
class LLIMChiclet;
-class LLSysWellWindow : public LLDockableFloater, LLIMSessionObserver
+
+
+class LLSysWellWindow : public LLDockableFloater
{
public:
LLSysWellWindow(const LLSD& key);
@@ -59,31 +61,28 @@ public:
bool isWindowEmpty();
// Operating with items
- void addItem(LLSysWellItem::Params p);
void clear( void );
void removeItemByID(const LLUUID& id);
// Operating with outfit
virtual void setVisible(BOOL visible);
void adjustWindowPosition();
- void toggleWindow();
- /*virtual*/ BOOL canClose() { return FALSE; }
/*virtual*/ void setDocked(bool docked, bool pop_on_undock = true);
// override LLFloater's minimization according to EXT-1216
/*virtual*/ void setMinimized(BOOL minimize);
- // Handlers
- void onItemClick(LLSysWellItem* item);
- void onItemClose(LLSysWellItem* item);
- void onStoreToast(LLPanel* info_panel, LLUUID id);
- void onChicletClick();
+ /**
+ * Hides window when user clicks away from it (EXT-3084)
+ */
+ /*virtual*/ void onFocusLost();
+
void onStartUpToastClick(S32 x, S32 y, MASK mask);
// size constants for the window and for its elements
static const S32 MAX_WINDOW_HEIGHT = 200;
static const S32 MIN_WINDOW_WIDTH = 318;
-private:
+protected:
typedef enum{
IT_NOTIFICATION,
@@ -92,25 +91,19 @@ private:
// gets a rect that bounds possible positions for the SysWellWindow on a screen (EXT-1111)
void getAllowedRect(LLRect& rect);
- // connect counter and list updaters to the corresponding signals
- void connectListUpdaterToSignal(std::string notification_type);
+
+
// init Window's channel
- void initChannel();
+ virtual void initChannel();
void handleItemAdded(EItemType added_item_type);
void handleItemRemoved(EItemType removed_item_type);
bool anotherTypeExists(EItemType item_type) ;
+ const std::string NOTIFICATION_WELL_ANCHOR_NAME;
+ const std::string IM_WELL_ANCHOR_NAME;
+ virtual const std::string& getAnchorViewName() = 0;
-
- class RowPanel;
void reshapeWindow();
- LLChiclet * findIMChiclet(const LLUUID& sessionId);
- void addIMRow(const LLUUID& sessionId, S32 chicletCounter, const std::string& name, const LLUUID& otherParticipantId);
- void delIMRow(const LLUUID& sessionId);
- // LLIMSessionObserver observe triggers
- virtual void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id);
- virtual void sessionRemoved(const LLUUID& session_id);
- void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id);
// pointer to a corresponding channel's instance
LLNotificationsUI::LLScreenChannel* mChannel;
@@ -126,7 +119,77 @@ private:
typedef std::map<EItemType, S32> typed_items_count_t;
typed_items_count_t mTypedItemsCount;
+};
+
+/**
+ * Class intended to manage incoming notifications.
+ *
+ * It contains a list of notifications that have not been responded to.
+ */
+class LLNotificationWellWindow : public LLSysWellWindow, public LLInitClass<LLNotificationWellWindow>
+{
+public:
+ LLNotificationWellWindow(const LLSD& key);
+ static LLNotificationWellWindow* getInstance(const LLSD& key = LLSD());
+
+ static void initClass() { getInstance(); }
+
+ /*virtual*/ BOOL postBuild();
+ /*virtual*/ void setVisible(BOOL visible);
+
+ // Operating with items
+ void addItem(LLSysWellItem::Params p);
+
+protected:
+ /*virtual*/ const std::string& getAnchorViewName() { return NOTIFICATION_WELL_ANCHOR_NAME; }
+
+private:
+ // init Window's channel
+ void initChannel();
+ void clearScreenChannels();
+
+
+ void onStoreToast(LLPanel* info_panel, LLUUID id);
+
+ // connect counter and list updaters to the corresponding signals
+ void connectListUpdaterToSignal(std::string notification_type);
+
+ // Handlers
+ void onItemClick(LLSysWellItem* item);
+ void onItemClose(LLSysWellItem* item);
+
+};
+
+/**
+ * Class intended to manage incoming messages in IM chats.
+ *
+ * It contains a list list of all active IM sessions.
+ */
+class LLIMWellWindow : public LLSysWellWindow, LLIMSessionObserver, LLInitClass<LLIMWellWindow>
+{
+public:
+ LLIMWellWindow(const LLSD& key);
+ ~LLIMWellWindow();
+
+ static LLIMWellWindow* getInstance(const LLSD& key = LLSD());
+ static void initClass() { getInstance(); }
+
+ /*virtual*/ BOOL postBuild();
+
+ // LLIMSessionObserver observe triggers
+ /*virtual*/ void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id);
+ /*virtual*/ void sessionRemoved(const LLUUID& session_id);
+ /*virtual*/ void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id);
+
+protected:
+ /*virtual*/ const std::string& getAnchorViewName() { return IM_WELL_ANCHOR_NAME; }
+
private:
+ LLChiclet * findIMChiclet(const LLUUID& sessionId);
+ void addIMRow(const LLUUID& sessionId, S32 chicletCounter, const std::string& name, const LLUUID& otherParticipantId);
+ void delIMRow(const LLUUID& sessionId);
+
+
/**
* Scrolling row panel.
*/
diff --git a/indra/newview/llteleporthistory.cpp b/indra/newview/llteleporthistory.cpp
index cc4689062e..1315887c37 100644
--- a/indra/newview/llteleporthistory.cpp
+++ b/indra/newview/llteleporthistory.cpp
@@ -167,7 +167,10 @@ void LLTeleportHistory::onHistoryChanged()
void LLTeleportHistory::purgeItems()
{
- mItems.erase(mItems.begin(), mItems.end()-1);
+ if (mItems.size() > 0)
+ {
+ mItems.erase(mItems.begin(), mItems.end()-1);
+ }
// reset the count
mRequestedItem = -1;
mCurrentItem = 0;
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 9bb2a4ad0a..ef49d7f057 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -736,7 +736,8 @@ bool LLTextureFetchWorker::doWork(S32 param)
}
else
{
- llwarns << "Region not found for host: " << mHost << llendl;
+ // This will happen if not logged in or if a region deoes not have HTTP Texture enabled
+ //llwarns << "Region not found for host: " << mHost << llendl;
}
}
if (!mUrl.empty())
@@ -943,11 +944,14 @@ bool LLTextureFetchWorker::doWork(S32 param)
{
llerrs << "Decode entered with invalid mFormattedImage. ID = " << mID << llendl;
}
+ if (mLoadedDiscard < 0)
+ {
+ llerrs << "Decode entered with invalid mLoadedDiscard. ID = " << mID << llendl;
+ }
setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); // Set priority first since Responder may change it
mRawImage = NULL;
mAuxImage = NULL;
llassert_always(mFormattedImage.notNull());
- llassert_always(mLoadedDiscard >= 0);
S32 discard = mHaveAllData ? 0 : mLoadedDiscard;
U32 image_priority = LLWorkerThread::PRIORITY_NORMAL | mWorkPriority;
mDecoded = FALSE;
diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp
index bf485b7e65..fc7c029a17 100644
--- a/indra/newview/lltoast.cpp
+++ b/indra/newview/lltoast.cpp
@@ -244,15 +244,15 @@ void LLToast::onMouseEnter(S32 x, S32 y, MASK mask)
mOnToastHoverSignal(this, MOUSE_ENTER);
setBackgroundOpaque(TRUE);
- if(mCanFade)
- {
- mTimer.stop();
- }
+
+ //toasts fading is management by Screen Channel
sendChildToFront(mHideBtn);
if(mHideBtn && mHideBtn->getEnabled())
mHideBtn->setVisible(TRUE);
mOnMouseEnterSignal(this);
+
+ LLModalDialog::onMouseEnter(x, y, mask);
}
//--------------------------------------------------------------------------
@@ -260,10 +260,8 @@ void LLToast::onMouseLeave(S32 x, S32 y, MASK mask)
{
mOnToastHoverSignal(this, MOUSE_LEAVE);
- if(mCanFade)
- {
- mTimer.start();
- }
+ //toasts fading is management by Screen Channel
+
if(mHideBtn && mHideBtn->getEnabled())
{
if( mHideBtnPressed )
@@ -273,6 +271,25 @@ void LLToast::onMouseLeave(S32 x, S32 y, MASK mask)
}
mHideBtn->setVisible(FALSE);
}
+
+ LLModalDialog::onMouseLeave(x, y, mask);
+}
+
+
+void LLNotificationsUI::LLToast::stopFading()
+{
+ if(mCanFade)
+ {
+ stopTimer();
+ }
+}
+
+void LLNotificationsUI::LLToast::startFading()
+{
+ if(mCanFade)
+ {
+ resetTimer();
+ }
}
//--------------------------------------------------------------------------
diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h
index 769b2ba122..d08e46e160 100644
--- a/indra/newview/lltoast.h
+++ b/indra/newview/lltoast.h
@@ -88,6 +88,15 @@ public:
virtual void onMouseEnter(S32 x, S32 y, MASK mask);
virtual void onMouseLeave(S32 x, S32 y, MASK mask);
+ //Fading
+
+ /** Stop fading timer */
+ virtual void stopFading();
+
+ /** Start fading timer */
+ virtual void startFading();
+
+
// Operating with toasts
// insert a panel to a toast
void insertPanel(LLPanel* panel);
diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp
index f928b5f243..7beba59c83 100644
--- a/indra/newview/lltoastimpanel.cpp
+++ b/indra/newview/lltoastimpanel.cpp
@@ -40,8 +40,7 @@ const S32 LLToastIMPanel::DEFAULT_MESSAGE_MAX_LINE_COUNT = 6;
//--------------------------------------------------------------------------
LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notification),
mAvatar(NULL), mUserName(NULL),
- mTime(NULL), mMessage(NULL),
- mReplyBtn(NULL)
+ mTime(NULL), mMessage(NULL)
{
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_instant_message.xml");
@@ -50,7 +49,6 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif
mUserName = getChild<LLTextBox>("user_name");
mTime = getChild<LLTextBox>("time_box");
mMessage = getChild<LLTextBox>("message");
- mReplyBtn = getChild<LLButton>("reply");
LLStyle::Params style_params;
style_params.font.name(LLFontGL::nameFromFont(style_params.font));
@@ -76,18 +74,10 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif
mSessionID = p.session_id;
mNotification = p.notification;
- // if message comes from the system - there shouldn't be a reply btn
if(p.from == SYSTEM_FROM)
{
mAvatar->setVisible(FALSE);
sys_msg_icon->setVisible(TRUE);
-
- mReplyBtn->setVisible(FALSE);
- S32 btn_height = mReplyBtn->getRect().getHeight();
- LLRect msg_rect = mMessage->getRect();
- mMessage->reshape(msg_rect.getWidth(), msg_rect.getHeight() + btn_height);
- msg_rect.setLeftTopAndSize(msg_rect.mLeft, msg_rect.mTop, msg_rect.getWidth(), msg_rect.getHeight() + btn_height);
- mMessage->setRect(msg_rect);
}
else
{
@@ -95,7 +85,7 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif
sys_msg_icon->setVisible(FALSE);
mAvatar->setValue(p.avatar_id);
- mReplyBtn->setClickedCallback(boost::bind(&LLToastIMPanel::onClickReplyBtn, this));
+ setMouseDownCallback(boost::bind(&LLToastIMPanel::onClickToastIM, this));
}
S32 maxLinesCount;
@@ -113,7 +103,7 @@ LLToastIMPanel::~LLToastIMPanel()
}
//--------------------------------------------------------------------------
-void LLToastIMPanel::onClickReplyBtn()
+void LLToastIMPanel::onClickToastIM()
{
mNotification->respond(mNotification->getResponseTemplate());
}
diff --git a/indra/newview/lltoastimpanel.h b/indra/newview/lltoastimpanel.h
index af21b07a3d..23f08ef610 100644
--- a/indra/newview/lltoastimpanel.h
+++ b/indra/newview/lltoastimpanel.h
@@ -61,7 +61,7 @@ public:
private:
static const S32 DEFAULT_MESSAGE_MAX_LINE_COUNT;
- void onClickReplyBtn();
+ void onClickToastIM();
LLNotificationPtr mNotification;
LLUUID mSessionID;
@@ -69,7 +69,6 @@ private:
LLTextBox* mUserName;
LLTextBox* mTime;
LLTextBox* mMessage;
- LLButton* mReplyBtn;
};
#endif // LLTOASTIMPANEL_H_
diff --git a/indra/newview/lltoolbar.cpp b/indra/newview/lltoolbar.cpp
index 268a18d2a2..bf6d715c31 100644
--- a/indra/newview/lltoolbar.cpp
+++ b/indra/newview/lltoolbar.cpp
@@ -56,6 +56,7 @@
#include "llfloaterchatterbox.h"
#include "llfloaterfriends.h"
#include "llfloatersnapshot.h"
+#include "llinventorypanel.h"
#include "lltoolmgr.h"
#include "llui.h"
#include "llviewermenu.h"
@@ -157,12 +158,11 @@ BOOL LLToolBar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
LLButton* inventory_btn = getChild<LLButton>("inventory_btn");
if (!inventory_btn) return FALSE;
- LLFloaterInventory* active_inventory = LLFloaterInventory::getActiveInventory();
-
LLRect button_screen_rect;
inventory_btn->localRectToScreen(inventory_btn->getRect(),&button_screen_rect);
-
- if(active_inventory && active_inventory->getVisible())
+
+ const LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel();
+ if(active_panel)
{
mInventoryAutoOpen = FALSE;
}
@@ -170,8 +170,8 @@ BOOL LLToolBar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
{
if (mInventoryAutoOpen)
{
- if (!(active_inventory && active_inventory->getVisible()) &&
- mInventoryAutoOpenTimer.getElapsedTimeF32() > sInventoryAutoOpenTime)
+ if (!active_panel &&
+ mInventoryAutoOpenTimer.getElapsedTimeF32() > sInventoryAutoOpenTime)
{
LLFloaterInventory::showAgentInventory();
}
diff --git a/indra/newview/llversioninfo.cpp b/indra/newview/llversioninfo.cpp
new file mode 100644
index 0000000000..148931d3ad
--- /dev/null
+++ b/indra/newview/llversioninfo.cpp
@@ -0,0 +1,109 @@
+/**
+ * @file llversioninfo.cpp
+ * @brief Routines to access the viewer version and build information
+ * @author Martin Reddy
+ *
+ * $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 "llversioninfo.h"
+
+#include "llversionviewer.h"
+
+//
+// Set the version numbers in indra/llcommon/llversionviewer.h
+//
+
+//static
+S32 LLVersionInfo::getMajor()
+{
+ return LL_VERSION_MAJOR;
+}
+
+//static
+S32 LLVersionInfo::getMinor()
+{
+ return LL_VERSION_MINOR;
+}
+
+//static
+S32 LLVersionInfo::getPatch()
+{
+ return LL_VERSION_PATCH;
+}
+
+//static
+S32 LLVersionInfo::getBuild()
+{
+ return LL_VERSION_BUILD;
+}
+
+//static
+const std::string &LLVersionInfo::getVersion()
+{
+ static std::string version("");
+
+ if (version.empty())
+ {
+ // cache the version string
+ std::ostringstream stream;
+ stream << LL_VERSION_MAJOR << "."
+ << LL_VERSION_MINOR << "."
+ << LL_VERSION_PATCH << "."
+ << LL_VERSION_BUILD;
+ version = stream.str();
+ }
+
+ return version;
+}
+
+//static
+const std::string &LLVersionInfo::getShortVersion()
+{
+ static std::string version("");
+
+ if (version.empty())
+ {
+ // cache the version string
+ std::ostringstream stream;
+ stream << LL_VERSION_MAJOR << "."
+ << LL_VERSION_MINOR << "."
+ << LL_VERSION_PATCH;
+ version = stream.str();
+ }
+
+ return version;
+}
+
+//static
+const std::string &LLVersionInfo::getChannel()
+{
+ static std::string name(LL_CHANNEL);
+ return name;
+}
diff --git a/indra/newview/llversioninfo.h b/indra/newview/llversioninfo.h
new file mode 100644
index 0000000000..b05109e478
--- /dev/null
+++ b/indra/newview/llversioninfo.h
@@ -0,0 +1,71 @@
+/**
+ * @file llversioninfo.h
+ * @brief Routines to access the viewer version and build information
+ * @author Martin Reddy
+ *
+ * $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_LLVERSIONINFO_H
+#define LL_LLVERSIONINFO_H
+
+#include <string>
+
+///
+/// This API provides version information for the viewer. This
+/// includes access to the major, minor, patch, and build integer
+/// values, as well as human-readable string representations. All
+/// viewer code that wants to query the current version should
+/// use this API.
+///
+class LLVersionInfo
+{
+public:
+ /// return the major verion number as an integer
+ static S32 getMajor();
+
+ /// return the minor verion number as an integer
+ static S32 getMinor();
+
+ /// return the patch verion number as an integer
+ static S32 getPatch();
+
+ /// return the build number as an integer
+ static S32 getBuild();
+
+ /// return the full viewer version as a string like "2.0.0.200030"
+ static const std::string &getVersion();
+
+ /// return the viewer version as a string like "2.0.0"
+ static const std::string &getShortVersion();
+
+ /// return the channel name, e.g. "Second Life"
+ static const std::string &getChannel();
+};
+
+#endif
diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp
index c32e67ef90..a041f3ac98 100644
--- a/indra/newview/llviewerassetstorage.cpp
+++ b/indra/newview/llviewerassetstorage.cpp
@@ -36,7 +36,6 @@
#include "llagent.h"
#include "llviewerassetstorage.h"
-#include "llviewerbuild.h"
#include "llvfile.h"
#include "llvfs.h"
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 5e23a7e114..6339d23fa7 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -67,7 +67,6 @@
#include "lloverlaybar.h"
#include "llkeyboard.h"
#include "llerrorcontrol.h"
-#include "llversionviewer.h"
#include "llappviewer.h"
#include "llvosurfacepatch.h"
#include "llvowlsky.h"
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index 7bff92fe98..35c9a1d367 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -176,6 +176,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("impanel", "floater_im_session.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLIMFloater>);
LLFloaterReg::add("im_container", "floater_im_container.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLIMFloaterContainer>);
+ LLFloaterReg::add("im_well_window", "floater_sys_well.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLIMWellWindow>);
LLFloaterReg::add("incoming_call", "floater_incoming_call.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLIncomingCallDialog>);
LLFloaterReg::add("inventory", "floater_inventory.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterInventory>);
LLFloaterReg::add("inspect", "floater_inspect.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterInspect>);
@@ -195,11 +196,10 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("moveview", "floater_moveview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMove>);
LLFloaterReg::add("mute_object_by_name", "floater_mute_object.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterGetBlockedObjectName>);
LLFloaterReg::add("mini_map", "floater_map.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMap>);
- LLFloaterReg::add("syswell_window", "floater_sys_well.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLSysWellWindow>);
LLFloaterReg::add("nearby_media", "floater_nearby_media.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNearbyMedia>);
-
LLFloaterReg::add("notifications_console", "floater_notifications_console.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNotificationConsole>);
+ LLFloaterReg::add("notification_well_window", "floater_sys_well.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLNotificationWellWindow>);
LLFloaterReg::add("openobject", "floater_openobject.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterOpenObject>);
LLFloaterReg::add("outgoing_call", "floater_outgoing_call.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLOutgoingCallDialog>);
@@ -255,7 +255,6 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("upload_sound", "floater_sound_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSoundPreview>, "upload");
LLFloaterReg::add("volume_pulldown", "floater_volume_pulldown.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterVolumePulldown>);
- LLFloaterReg::add("voice_call", "floater_call.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCall>);
LLFloaterReg::add("voice_controls", "floater_voice_controls.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLCallFloater>);
LLFloaterReg::add("whitelist_entry", "floater_whitelist_entry.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWhiteListEntry>);
diff --git a/indra/newview/llviewerfoldertype.cpp b/indra/newview/llviewerfoldertype.cpp
index 6aabcb11b8..db54a79610 100644
--- a/indra/newview/llviewerfoldertype.cpp
+++ b/indra/newview/llviewerfoldertype.cpp
@@ -43,12 +43,14 @@ struct ViewerFolderEntry : public LLDictionaryEntry
{
// Constructor for non-ensembles
ViewerFolderEntry(const std::string &new_category_name, // default name when creating a new category of this type
- const std::string &icon_name // name of the folder icon
+ const std::string &icon_name, // name of the folder icon
+ BOOL is_quiet // folder doesn't need a UI update when changed
)
:
LLDictionaryEntry(empty_string), // no reverse lookup needed on non-ensembles, so just leave this blank
mIconName(icon_name),
- mNewCategoryName(new_category_name)
+ mNewCategoryName(new_category_name),
+ mIsQuiet(is_quiet)
{
mAllowedNames.clear();
}
@@ -62,7 +64,8 @@ struct ViewerFolderEntry : public LLDictionaryEntry
:
LLDictionaryEntry(xui_name),
mIconName(icon_name),
- mNewCategoryName(new_category_name)
+ mNewCategoryName(new_category_name),
+ mIsQuiet(FALSE)
{
const std::string delims (",");
LLStringUtilBase<char>::getTokens(allowed_names, mAllowedNames, delims);
@@ -85,6 +88,7 @@ struct ViewerFolderEntry : public LLDictionaryEntry
const std::string mNewCategoryName;
typedef std::vector<std::string> name_vec_t;
name_vec_t mAllowedNames;
+ BOOL mIsQuiet;
};
class LLViewerFolderDictionary : public LLSingleton<LLViewerFolderDictionary>,
@@ -100,31 +104,31 @@ LLViewerFolderDictionary::LLViewerFolderDictionary()
{
initEnsemblesFromFile();
- // NEW CATEGORY NAME FOLDER ICON NAME
- // |-------------------------|---------------------------|
- addEntry(LLFolderType::FT_TEXTURE, new ViewerFolderEntry("Textures", "inv_folder_texture.tga"));
- addEntry(LLFolderType::FT_SOUND, new ViewerFolderEntry("Sounds", "inv_folder_sound.tga"));
- addEntry(LLFolderType::FT_CALLINGCARD, new ViewerFolderEntry("Calling Cards", "inv_folder_callingcard.tga"));
- addEntry(LLFolderType::FT_LANDMARK, new ViewerFolderEntry("Landmarks", "inv_folder_landmark.tga"));
- addEntry(LLFolderType::FT_CLOTHING, new ViewerFolderEntry("Clothing", "inv_folder_clothing.tga"));
- addEntry(LLFolderType::FT_OBJECT, new ViewerFolderEntry("Objects", "inv_folder_object.tga"));
- addEntry(LLFolderType::FT_NOTECARD, new ViewerFolderEntry("Notecards", "inv_folder_notecard.tga"));
- addEntry(LLFolderType::FT_ROOT_INVENTORY, new ViewerFolderEntry("My Inventory", ""));
- addEntry(LLFolderType::FT_LSL_TEXT, new ViewerFolderEntry("Scripts", "inv_folder_script.tga"));
- addEntry(LLFolderType::FT_BODYPART, new ViewerFolderEntry("Body Parts", "inv_folder_bodypart.tga"));
- addEntry(LLFolderType::FT_TRASH, new ViewerFolderEntry("Trash", "inv_folder_trash.tga"));
- addEntry(LLFolderType::FT_SNAPSHOT_CATEGORY, new ViewerFolderEntry("Photo Album", "inv_folder_snapshot.tga"));
- addEntry(LLFolderType::FT_LOST_AND_FOUND, new ViewerFolderEntry("Lost And Found", "inv_folder_lostandfound.tga"));
- addEntry(LLFolderType::FT_ANIMATION, new ViewerFolderEntry("Animations", "inv_folder_animation.tga"));
- addEntry(LLFolderType::FT_GESTURE, new ViewerFolderEntry("Gestures", "inv_folder_gesture.tga"));
- addEntry(LLFolderType::FT_FAVORITE, new ViewerFolderEntry("Favorite", "inv_folder_plain_closed.tga"));
+ // NEW CATEGORY NAME FOLDER ICON NAME QUIET?
+ // |-------------------------|-------------------------------|-----------|
+ addEntry(LLFolderType::FT_TEXTURE, new ViewerFolderEntry("Textures", "inv_folder_texture.tga", FALSE));
+ addEntry(LLFolderType::FT_SOUND, new ViewerFolderEntry("Sounds", "inv_folder_sound.tga", FALSE));
+ addEntry(LLFolderType::FT_CALLINGCARD, new ViewerFolderEntry("Calling Cards", "inv_folder_callingcard.tga", FALSE));
+ addEntry(LLFolderType::FT_LANDMARK, new ViewerFolderEntry("Landmarks", "inv_folder_landmark.tga", FALSE));
+ addEntry(LLFolderType::FT_CLOTHING, new ViewerFolderEntry("Clothing", "inv_folder_clothing.tga", FALSE));
+ addEntry(LLFolderType::FT_OBJECT, new ViewerFolderEntry("Objects", "inv_folder_object.tga", FALSE));
+ addEntry(LLFolderType::FT_NOTECARD, new ViewerFolderEntry("Notecards", "inv_folder_notecard.tga", FALSE));
+ addEntry(LLFolderType::FT_ROOT_INVENTORY, new ViewerFolderEntry("My Inventory", "", FALSE));
+ addEntry(LLFolderType::FT_LSL_TEXT, new ViewerFolderEntry("Scripts", "inv_folder_script.tga", FALSE));
+ addEntry(LLFolderType::FT_BODYPART, new ViewerFolderEntry("Body Parts", "inv_folder_bodypart.tga", FALSE));
+ addEntry(LLFolderType::FT_TRASH, new ViewerFolderEntry("Trash", "inv_folder_trash.tga", TRUE));
+ addEntry(LLFolderType::FT_SNAPSHOT_CATEGORY, new ViewerFolderEntry("Photo Album", "inv_folder_snapshot.tga", FALSE));
+ addEntry(LLFolderType::FT_LOST_AND_FOUND, new ViewerFolderEntry("Lost And Found", "inv_folder_lostandfound.tga", TRUE));
+ addEntry(LLFolderType::FT_ANIMATION, new ViewerFolderEntry("Animations", "inv_folder_animation.tga", FALSE));
+ addEntry(LLFolderType::FT_GESTURE, new ViewerFolderEntry("Gestures", "inv_folder_gesture.tga", FALSE));
+ addEntry(LLFolderType::FT_FAVORITE, new ViewerFolderEntry("Favorite", "inv_folder_plain_closed.tga", FALSE));
- addEntry(LLFolderType::FT_CURRENT_OUTFIT, new ViewerFolderEntry("Current Outfit", "inv_folder_current_outfit.tga"));
- addEntry(LLFolderType::FT_OUTFIT, new ViewerFolderEntry("New Outfit", "inv_folder_outfit.tga"));
- addEntry(LLFolderType::FT_MY_OUTFITS, new ViewerFolderEntry("My Outfits", "inv_folder_my_outfits.tga"));
- addEntry(LLFolderType::FT_INBOX, new ViewerFolderEntry("Inbox", "inv_folder_inbox.tga"));
+ addEntry(LLFolderType::FT_CURRENT_OUTFIT, new ViewerFolderEntry("Current Outfit", "inv_folder_current_outfit.tga",TRUE));
+ addEntry(LLFolderType::FT_OUTFIT, new ViewerFolderEntry("New Outfit", "inv_folder_outfit.tga", TRUE));
+ addEntry(LLFolderType::FT_MY_OUTFITS, new ViewerFolderEntry("My Outfits", "inv_folder_my_outfits.tga", TRUE));
+ addEntry(LLFolderType::FT_INBOX, new ViewerFolderEntry("Inbox", "inv_folder_inbox.tga", FALSE));
- addEntry(LLFolderType::FT_NONE, new ViewerFolderEntry("New Folder", "inv_folder_plain_closed.tga"));
+ addEntry(LLFolderType::FT_NONE, new ViewerFolderEntry("New Folder", "inv_folder_plain_closed.tga", FALSE));
}
bool LLViewerFolderDictionary::initEnsemblesFromFile()
@@ -219,6 +223,17 @@ const std::string &LLViewerFolderType::lookupIconName(LLFolderType::EType folder
return badLookup();
}
+BOOL LLViewerFolderType::lookupIsQuietType(LLFolderType::EType folder_type)
+{
+ const ViewerFolderEntry *entry = LLViewerFolderDictionary::getInstance()->lookup(folder_type);
+ if (entry)
+ {
+ return entry->mIsQuiet;
+ }
+ return FALSE;
+}
+
+
const std::string &LLViewerFolderType::lookupNewCategoryName(LLFolderType::EType folder_type)
{
const ViewerFolderEntry *entry = LLViewerFolderDictionary::getInstance()->lookup(folder_type);
diff --git a/indra/newview/llviewerfoldertype.h b/indra/newview/llviewerfoldertype.h
index a6aea62b2a..dd9360da90 100644
--- a/indra/newview/llviewerfoldertype.h
+++ b/indra/newview/llviewerfoldertype.h
@@ -44,11 +44,13 @@ public:
static const std::string& lookupXUIName(EType folder_type); // name used by the UI
static LLFolderType::EType lookupTypeFromXUIName(const std::string& name);
- static const std::string& lookupIconName(EType asset_type); // folder icon name
+ static const std::string& lookupIconName(EType folder_type); // folder icon name
+ static BOOL lookupIsQuietType(EType folder_type); // folder doesn't require UI update when changes have occured
static const std::string& lookupNewCategoryName(EType folder_type); // default name when creating new category
static LLFolderType::EType lookupTypeFromNewCategoryName(const std::string& name); // default name when creating new category
static U64 lookupValidFolderTypes(const std::string& item_name); // which folders allow an item of this type?
+
protected:
LLViewerFolderType() {}
~LLViewerFolderType() {}
diff --git a/indra/newview/llviewerhelp.cpp b/indra/newview/llviewerhelp.cpp
index 056260791c..297c0cc111 100644
--- a/indra/newview/llviewerhelp.cpp
+++ b/indra/newview/llviewerhelp.cpp
@@ -37,7 +37,6 @@
#include "llfloaterreg.h"
#include "llfocusmgr.h"
#include "llviewercontrol.h"
-#include "llversionviewer.h"
#include "llappviewer.h"
#include "lllogininstance.h"
diff --git a/indra/newview/llviewerhelputil.cpp b/indra/newview/llviewerhelputil.cpp
index c1555eacdc..df08470518 100644
--- a/indra/newview/llviewerhelputil.cpp
+++ b/indra/newview/llviewerhelputil.cpp
@@ -32,22 +32,13 @@
*/
#include "llviewerprecompiledheaders.h"
+#include "llviewerhelputil.h"
-#include "llversionviewer.h"
-
-//#include "llfloaterhelpbrowser.h"
-//#include "llfloaterreg.h"
-//#include "llfocusmgr.h"
-//#include "llviewercontrol.h"
-//#include "llappviewer.h"
-
+#include "llcontrol.h"
#include "llstring.h"
-#include "lluri.h"
#include "llsys.h"
-
-#include "llcontrol.h"
-
-#include "llviewerhelputil.h"
+#include "lluri.h"
+#include "llversioninfo.h"
//////////////////////////////////////////////
@@ -86,18 +77,11 @@ std::string LLViewerHelpUtil::buildHelpURL( const std::string &topic,
substitution["CHANNEL"] = helpURLEncode(savedSettings.getString("VersionChannelName"));
- // *TODO: We should put this version pattern in a central place; this and near
- // equivalents are replicated in other code - what's a good location?
- std::ostringstream version;
- version << LL_VERSION_MAJOR << "."
- << LL_VERSION_MINOR << "."
- << LL_VERSION_PATCH << "."
- << LL_VERSION_BUILD;
- substitution["VERSION"] = helpURLEncode(version.str());
- substitution["VERSION_MAJOR"] = buildHelpVersion(LL_VERSION_MAJOR);
- substitution["VERSION_MINOR"] = buildHelpVersion(LL_VERSION_MINOR);
- substitution["VERSION_PATCH"] = buildHelpVersion(LL_VERSION_PATCH);
- substitution["VERSION_BUILD"] = buildHelpVersion(LL_VERSION_BUILD);
+ substitution["VERSION"] = helpURLEncode(LLVersionInfo::getVersion());
+ substitution["VERSION_MAJOR"] = buildHelpVersion(LLVersionInfo::getMajor());
+ substitution["VERSION_MINOR"] = buildHelpVersion(LLVersionInfo::getMinor());
+ substitution["VERSION_PATCH"] = buildHelpVersion(LLVersionInfo::getPatch());
+ substitution["VERSION_BUILD"] = buildHelpVersion(LLVersionInfo::getBuild());
substitution["OS"] = helpURLEncode(osinfo.getOSStringSimple());
diff --git a/indra/newview/llviewerhome.cpp b/indra/newview/llviewerhome.cpp
new file mode 100644
index 0000000000..58630978c4
--- /dev/null
+++ b/indra/newview/llviewerhome.cpp
@@ -0,0 +1,73 @@
+/**
+ * @file llviewerhome.cpp
+ * @brief Model (non-View) component for the web-based Home side panel
+ * @author Martin Reddy
+ *
+ * $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 "llviewerhome.h"
+
+#include "lllogininstance.h"
+#include "llui.h"
+#include "lluri.h"
+#include "llsd.h"
+#include "llversioninfo.h"
+#include "llviewercontrol.h"
+#include "llviewernetwork.h"
+
+//static
+std::string LLViewerHome::getHomeURL()
+{
+ // Return the URL to display in the Home side tray. We read
+ // this value from settings.xml and support various substitutions
+
+ LLSD substitution;
+ substitution["VERSION"] = LLVersionInfo::getVersion();
+ substitution["CHANNEL"] = LLURI::escape(gSavedSettings.getString("VersionChannelName"));
+ substitution["LANGUAGE"] = LLUI::getLanguage();
+ substitution["AUTH_KEY"] = LLURI::escape(getAuthKey());
+ substitution["GRID"] = LLViewerLogin::getInstance()->getGridLabel();
+
+ std::string homeURL = gSavedSettings.getString("HomeSidePanelURL");
+ LLStringUtil::format(homeURL, substitution);
+
+ return homeURL;
+}
+
+//static
+std::string LLViewerHome::getAuthKey()
+{
+ // return the value of the (optional) auth token returned by login.cgi
+ // this lets the server provide an authentication token that we can
+ // blindly pass to the Home web page for it to perform authentication.
+ static const std::string authKeyName("home_sidetray_token");
+ return LLLoginInstance::getInstance()->getResponse(authKeyName);
+}
+
diff --git a/indra/newview/llviewerhome.h b/indra/newview/llviewerhome.h
new file mode 100644
index 0000000000..50454a71b7
--- /dev/null
+++ b/indra/newview/llviewerhome.h
@@ -0,0 +1,49 @@
+/**
+ * @file llviewerhome.h
+ * @brief Model (non-View) component for the web-based Home side panel
+ * @author Martin Reddy
+ *
+ * $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_LLVIEWERHOME_H
+#define LL_LLVIEWERHOME_H
+
+#include <string>
+
+class LLViewerHome
+{
+public:
+ /// return the URL to use for the web-based Home side panel
+ static std::string getHomeURL();
+
+ /// return the authentication key for the Home web site
+ static std::string getAuthKey();
+};
+
+#endif
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index f9e1a94def..4482683400 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -85,7 +85,8 @@ public:
{
std::vector<LLUUID> items_to_open;
items_to_open.push_back(inventory_id);
- open_inventory_offer(items_to_open, "");
+ //inventory_handler is just a stub, because we don't know from who this offer
+ open_inventory_offer(items_to_open, "inventory_handler");
return true;
}
@@ -509,11 +510,13 @@ bool LLViewerInventoryCategory::fetchDescendents()
// This comes from LLInventoryFilter from llfolderview.h
U32 sort_order = gSavedSettings.getU32("InventorySortOrder") & 0x1;
- // *NOTE
- // Temporary workaround for bug EXT-2879, see ticket for details.
- // Commented gAgent.getRegion()->getCapability in order to use the old system.
- std::string url;//= gAgent.getRegion()->getCapability("WebFetchInventoryDescendents");
-
+ // *NOTE: For bug EXT-2879, originally commented out
+ // gAgent.getRegion()->getCapability in order to use the old
+ // message-based system. This has been uncommented now that
+ // AIS folks are aware of the issue and have a fix in process.
+ // see ticket for details.
+
+ std::string url = gAgent.getRegion()->getCapability("WebFetchInventoryDescendents");
if (!url.empty()) //Capability found. Build up LLSD and use it.
{
LLInventoryModel::startBackgroundFetch(mUUID);
@@ -912,8 +915,20 @@ void link_inventory_item(
}
LLUUID transaction_id;
- std::string desc = "Link";
+ std::string desc = "Broken link"; // This should only show if the object can't find its baseobj.
LLInventoryType::EType inv_type = LLInventoryType::IT_NONE;
+ if (dynamic_cast<const LLInventoryCategory *>(baseobj))
+ {
+ inv_type = LLInventoryType::IT_CATEGORY;
+ }
+ else
+ {
+ const LLViewerInventoryItem *baseitem = dynamic_cast<const LLViewerInventoryItem *>(baseobj);
+ if (baseitem)
+ {
+ inv_type = baseitem->getInventoryType();
+ }
+ }
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_LinkInventoryItem);
@@ -1423,3 +1438,74 @@ void LLViewerInventoryItem::onCallingCardNameLookup(const LLUUID& id, const std:
gInventory.notifyObservers();
}
+class LLRegenerateLinkCollector : public LLInventoryCollectFunctor
+{
+public:
+ LLRegenerateLinkCollector(const LLViewerInventoryItem *target_item) : mTargetItem(target_item) {}
+ virtual ~LLRegenerateLinkCollector() {}
+ virtual bool operator()(LLInventoryCategory* cat,
+ LLInventoryItem* item)
+ {
+ if (item)
+ {
+ if ((item->getName() == mTargetItem->getName()) &&
+ (item->getInventoryType() == mTargetItem->getInventoryType()) &&
+ (!item->getIsLinkType()))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+protected:
+ const LLViewerInventoryItem* mTargetItem;
+};
+
+LLUUID find_possible_item_for_regeneration(const LLViewerInventoryItem *target_item)
+{
+ LLViewerInventoryCategory::cat_array_t cats;
+ LLViewerInventoryItem::item_array_t items;
+
+ LLRegenerateLinkCollector candidate_matches(target_item);
+ gInventory.collectDescendentsIf(gInventory.getRootFolderID(),
+ cats,
+ items,
+ LLInventoryModel::EXCLUDE_TRASH,
+ candidate_matches);
+ for (LLViewerInventoryItem::item_array_t::const_iterator item_iter = items.begin();
+ item_iter != items.end();
+ ++item_iter)
+ {
+ const LLViewerInventoryItem *item = (*item_iter);
+ if (true) return item->getUUID();
+ }
+ return LLUUID::null;
+}
+
+// This currently dosen't work, because the sim does not allow us
+// to change an item's assetID.
+BOOL LLViewerInventoryItem::regenerateLink()
+{
+ const LLUUID target_item_id = find_possible_item_for_regeneration(this);
+ if (target_item_id.isNull())
+ return FALSE;
+ LLViewerInventoryCategory::cat_array_t cats;
+ LLViewerInventoryItem::item_array_t items;
+ LLAssetIDMatches asset_id_matches(getAssetUUID());
+ gInventory.collectDescendentsIf(gInventory.getRootFolderID(),
+ cats,
+ items,
+ LLInventoryModel::EXCLUDE_TRASH,
+ asset_id_matches);
+ for (LLViewerInventoryItem::item_array_t::iterator item_iter = items.begin();
+ item_iter != items.end();
+ item_iter++)
+ {
+ LLViewerInventoryItem *item = (*item_iter);
+ item->setAssetUUID(target_item_id);
+ item->updateServer(FALSE);
+ gInventory.addChangedMask(LLInventoryObserver::REBUILD, item->getUUID());
+ }
+ gInventory.notifyObservers();
+ return TRUE;
+}
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h
index d27faffdd9..0156e7dab1 100644
--- a/indra/newview/llviewerinventory.h
+++ b/indra/newview/llviewerinventory.h
@@ -161,7 +161,10 @@ public:
// callback
void onCallingCardNameLookup(const LLUUID& id, const std::string& first_name, const std::string& last_name);
-
+
+ // If this is a broken link, try to fix it and any other identical link.
+ BOOL regenerateLink();
+
public:
BOOL mIsComplete;
LLTransactionID mTransactionID;
diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp
index 8fd646ee93..f757155b94 100644
--- a/indra/newview/llviewerkeyboard.cpp
+++ b/indra/newview/llviewerkeyboard.cpp
@@ -538,8 +538,9 @@ void start_chat( EKeystate s )
void start_gesture( EKeystate s )
{
+ LLUICtrl* focus_ctrlp = dynamic_cast<LLUICtrl*>(gFocusMgr.getKeyboardFocus());
if (KEYSTATE_UP == s &&
- !(gFocusMgr.getKeyboardFocus() && dynamic_cast<LLUICtrl*>(gFocusMgr.getKeyboardFocus())->acceptsTextInput()))
+ ! (focus_ctrlp && focus_ctrlp->acceptsTextInput()))
{
if (LLNearbyChatBar::getInstance()->getCurrentChat().empty())
{
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index d5fd23ac51..952de00272 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -37,14 +37,17 @@
#include "llviewermediafocus.h"
#include "llmimetypes.h"
#include "llmediaentry.h"
+#include "llversioninfo.h"
#include "llviewercontrol.h"
#include "llviewertexture.h"
#include "llviewerparcelmedia.h"
#include "llviewerparcelmgr.h"
-#include "llversionviewer.h"
#include "llviewertexturelist.h"
#include "llvovolume.h"
#include "llpluginclassmedia.h"
+#include "llviewerwindow.h"
+#include "llfocusmgr.h"
+#include "llcallbacklist.h"
#include "llevent.h" // LLSimpleListener
#include "llnotificationsutil.h"
@@ -55,7 +58,7 @@
#include <boost/bind.hpp> // for SkinFolder listener
#include <boost/signals2.hpp>
-/*static*/ const char* LLViewerMedia::AUTO_PLAY_MEDIA_SETTING = "AutoPlayMedia";
+/*static*/ const char* LLViewerMedia::AUTO_PLAY_MEDIA_SETTING = "ParcelMediaAutoPlayEnable";
// Move this to its own file.
@@ -327,6 +330,8 @@ viewer_media_t LLViewerMedia::updateMediaImpl(LLMediaEntry* media_entry, const s
media_impl->mMediaLoop = media_entry->getAutoLoop();
media_impl->mMediaWidth = media_entry->getWidthPixels();
media_impl->mMediaHeight = media_entry->getHeightPixels();
+ media_impl->mMediaAutoPlay = media_entry->getAutoPlay();
+ media_impl->mMediaEntryURL = media_entry->getCurrentURL();
if (media_impl->mMediaSource)
{
media_impl->mMediaSource->setAutoScale(media_impl->mMediaAutoScale);
@@ -334,8 +339,8 @@ viewer_media_t LLViewerMedia::updateMediaImpl(LLMediaEntry* media_entry, const s
media_impl->mMediaSource->setSize(media_entry->getWidthPixels(), media_entry->getHeightPixels());
}
- bool url_changed = (media_entry->getCurrentURL() != previous_url);
- if(media_entry->getCurrentURL().empty())
+ bool url_changed = (media_impl->mMediaEntryURL != previous_url);
+ if(media_impl->mMediaEntryURL.empty())
{
if(url_changed)
{
@@ -350,7 +355,7 @@ viewer_media_t LLViewerMedia::updateMediaImpl(LLMediaEntry* media_entry, const s
// The current media URL is not empty.
// If (the media was already loaded OR the media was set to autoplay) AND this update didn't come from this agent,
// do a navigate.
- bool auto_play = (media_entry->getAutoPlay() && gSavedSettings.getBOOL(AUTO_PLAY_MEDIA_SETTING));
+ bool auto_play = (media_impl->mMediaAutoPlay && gSavedSettings.getBOOL(AUTO_PLAY_MEDIA_SETTING));
if((was_loaded || auto_play) && !update_from_self)
{
@@ -372,8 +377,10 @@ viewer_media_t LLViewerMedia::updateMediaImpl(LLMediaEntry* media_entry, const s
media_entry->getAutoLoop());
media_impl->setHomeURL(media_entry->getHomeURL());
+ media_impl->mMediaAutoPlay = media_entry->getAutoPlay();
+ media_impl->mMediaEntryURL = media_entry->getCurrentURL();
- if(media_entry->getAutoPlay() && gSavedSettings.getBOOL(AUTO_PLAY_MEDIA_SETTING))
+ if(media_impl->mMediaAutoPlay && gSavedSettings.getBOOL(AUTO_PLAY_MEDIA_SETTING))
{
needs_navigate = true;
}
@@ -381,21 +388,20 @@ viewer_media_t LLViewerMedia::updateMediaImpl(LLMediaEntry* media_entry, const s
if(media_impl)
{
- std::string url = media_entry->getCurrentURL();
if(needs_navigate)
{
- media_impl->navigateTo(url, "", true, true);
- lldebugs << "navigating to URL " << url << llendl;
+ media_impl->navigateTo(media_impl->mMediaEntryURL, "", true, true);
+ lldebugs << "navigating to URL " << media_impl->mMediaEntryURL << llendl;
}
- else if(!media_impl->mMediaURL.empty() && (media_impl->mMediaURL != url))
+ else if(!media_impl->mMediaURL.empty() && (media_impl->mMediaURL != media_impl->mMediaEntryURL))
{
// If we already have a non-empty media URL set and we aren't doing a navigate, update the media URL to match the media entry.
- media_impl->mMediaURL = url;
+ media_impl->mMediaURL = media_impl->mMediaEntryURL;
// If this causes a navigate at some point (such as after a reload), it should be considered server-driven so it isn't broadcast.
media_impl->mNavigateServerRequest = true;
- lldebugs << "updating URL in the media impl to " << url << llendl;
+ lldebugs << "updating URL in the media impl to " << media_impl->mMediaEntryURL << llendl;
}
}
@@ -440,7 +446,7 @@ std::string LLViewerMedia::getCurrentUserAgent()
// http://www.mozilla.org/build/revised-user-agent-strings.html
std::ostringstream codec;
codec << "SecondLife/";
- codec << LL_VERSION_MAJOR << "." << LL_VERSION_MINOR << "." << LL_VERSION_PATCH << "." << LL_VERSION_BUILD;
+ codec << LLVersionInfo::getVersion();
codec << " (" << channel << "; " << skin_name << " skin)";
llinfos << codec.str() << llendl;
@@ -625,7 +631,7 @@ static bool proximity_comparitor(const LLViewerMediaImpl* i1, const LLViewerMedi
//////////////////////////////////////////////////////////////////////////////////////////
// static
-void LLViewerMedia::updateMedia()
+void LLViewerMedia::updateMedia(void *dummy_arg)
{
impl_list::iterator iter = sViewerMediaImplList.begin();
impl_list::iterator end = sViewerMediaImplList.end();
@@ -668,7 +674,7 @@ void LLViewerMedia::updateMedia()
LLPluginClassMedia::EPriority new_priority = LLPluginClassMedia::PRIORITY_NORMAL;
- if(pimpl->isForcedUnloaded() || (impl_count_total > (int)max_instances))
+ if(pimpl->isForcedUnloaded() || (impl_count_total >= (int)max_instances))
{
// Never load muted or failed impls.
// Hard limit on the number of instances that will be loaded at one time
@@ -747,6 +753,19 @@ void LLViewerMedia::updateMedia()
impl_count_total++;
}
+ // Overrides if the window is minimized or we lost focus (taking care
+ // not to accidentally "raise" the priority either)
+ if (!gViewerWindow->getActive() /* viewer window minimized? */
+ && new_priority > LLPluginClassMedia::PRIORITY_HIDDEN)
+ {
+ new_priority = LLPluginClassMedia::PRIORITY_HIDDEN;
+ }
+ else if (!gFocusMgr.getAppHasFocus() /* viewer window lost focus? */
+ && new_priority > LLPluginClassMedia::PRIORITY_LOW)
+ {
+ new_priority = LLPluginClassMedia::PRIORITY_LOW;
+ }
+
pimpl->setPriority(new_priority);
if(pimpl->getUsedInUI())
@@ -785,9 +804,16 @@ void LLViewerMedia::updateMedia()
//////////////////////////////////////////////////////////////////////////////////////////
// static
+void LLViewerMedia::initClass()
+{
+ gIdleCallbacks.addFunction(LLViewerMedia::updateMedia, NULL);
+}
+
+//////////////////////////////////////////////////////////////////////////////////////////
+// static
void LLViewerMedia::cleanupClass()
{
- // This is no longer necessary, since sViewerMediaImplList is no longer smart pointers.
+ gIdleCallbacks.deleteFunction(LLViewerMedia::updateMedia, NULL);
}
//////////////////////////////////////////////////////////////////////////////////////////
@@ -830,6 +856,7 @@ LLViewerMediaImpl::LLViewerMediaImpl( const LLUUID& texture_id,
mProximity(-1),
mProximityDistance(0.0f),
mMimeTypeProbe(NULL),
+ mMediaAutoPlay(false),
mIsUpdated(false)
{
@@ -1911,6 +1938,33 @@ void LLViewerMediaImpl::resetPreviousMediaState()
mPreviousMediaTime = 0.0f;
}
+
+//////////////////////////////////////////////////////////////////////////////////////////
+//
+void LLViewerMediaImpl::setDisabled(bool disabled)
+{
+ if(mIsDisabled != disabled)
+ {
+ // Only do this on actual state transitions.
+ mIsDisabled = disabled;
+
+ if(mIsDisabled)
+ {
+ // We just disabled this media. Clear all state.
+ unload();
+ }
+ else
+ {
+ // We just (re)enabled this media. Do a navigate if auto-play is in order.
+ if(mMediaAutoPlay && gSavedSettings.getBOOL(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING))
+ {
+ navigateTo(mMediaEntryURL, "", true, true);
+ }
+ }
+
+ }
+};
+
//////////////////////////////////////////////////////////////////////////////////////////
//
bool LLViewerMediaImpl::isForcedUnloaded() const
diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h
index e2d159304f..713eb2710b 100644
--- a/indra/newview/llviewermedia.h
+++ b/indra/newview/llviewermedia.h
@@ -96,9 +96,10 @@ class LLViewerMedia
static bool textureHasMedia(const LLUUID& texture_id);
static void setVolume(F32 volume);
- static void updateMedia();
+ static void updateMedia(void* dummy_arg = NULL);
static bool isMusicPlaying();
+ static void initClass();
static void cleanupClass();
static void toggleMusicPlay(void*);
@@ -201,7 +202,7 @@ public:
bool isMediaFailed() const { return mMediaSourceFailed; };
void resetPreviousMediaState();
- void setDisabled(bool disabled) { mIsDisabled = disabled; };
+ void setDisabled(bool disabled);
bool isMediaDisabled() const { return mIsDisabled; };
// returns true if this instance should not be loaded (disabled, muted object, crashed, etc.)
@@ -345,6 +346,8 @@ public:
S32 mProximity;
F64 mProximityDistance;
LLMimeDiscoveryResponder *mMimeTypeProbe;
+ bool mMediaAutoPlay;
+ std::string mMediaEntryURL;
private:
BOOL mIsUpdated ;
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 0b40492391..431b4d3c0a 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -31,188 +31,76 @@
*/
#include "llviewerprecompiledheaders.h"
-
#include "llviewermenu.h"
-// system library includes
-#include <iostream>
-#include <fstream>
-#include <sstream>
-
// linden library includes
-#include "llaudioengine.h"
#include "llfloaterreg.h"
-#include "indra_constants.h"
-#include "llassetstorage.h"
-#include "llchat.h"
#include "llcombobox.h"
-#include "llfeaturemanager.h"
-#include "llfocusmgr.h"
-#include "llfontgl.h"
-#include "llinstantmessage.h"
#include "llinventorypanel.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
-#include "llpermissionsflags.h"
-#include "llrect.h"
-#include "llsecondlifeurls.h"
-#include "lltransactiontypes.h"
-#include "llui.h"
-#include "llview.h"
-#include "llxfermanager.h"
-#include "message.h"
-#include "raytrace.h"
-#include "llsdserialize.h"
-#include "lltimer.h"
-#include "llvfile.h"
-#include "llvolumemgr.h"
// newview includes
#include "llagent.h"
#include "llagentwearables.h"
#include "llagentpilot.h"
-#include "llbox.h"
-#include "llcallingcard.h"
-#include "llclipboard.h"
#include "llcompilequeue.h"
#include "llconsole.h"
-#include "llviewercontrol.h"
#include "lldebugview.h"
-#include "lldir.h"
-#include "lldrawable.h"
-#include "lldrawpoolalpha.h"
-#include "lldrawpooltree.h"
-#include "llface.h"
#include "llfilepicker.h"
#include "llfirstuse.h"
-#include "llfloater.h"
-#include "llfloaterabout.h"
-#include "llfloaterbuycurrency.h"
-#include "llfloateractivespeakers.h"
-#include "llfloateranimpreview.h"
-#include "llfloateravatartextures.h"
-#include "llfloaterbuildoptions.h"
-#include "llfloaterbump.h"
#include "llfloaterbuy.h"
#include "llfloaterbuycontents.h"
#include "llfloaterbuycurrency.h"
-#include "llfloaterbuyland.h"
#include "llfloaterchat.h"
#include "llfloatercustomize.h"
-#include "llfloaterdaycycle.h"
#include "llfloaterchatterbox.h"
-#include "llfloaterfonttest.h"
#include "llfloatergodtools.h"
-#include "llfloatergroupinvite.h"
-#include "llfloatergroups.h"
-#include "llfloaterhud.h"
-#include "llfloaterinspect.h"
-#include "llfloaterlagmeter.h"
#include "llfloaterland.h"
-#include "llfloaterlandholdings.h"
-#include "llfloatermap.h"
-#include "llfloateropenobject.h"
#include "llfloaterpay.h"
-#include "llfloaterperms.h"
-#include "llfloaterpostprocess.h"
-#include "llfloaterpreference.h"
-#include "llfloaterreg.h"
-#include "llfloaterregioninfo.h"
#include "llfloaterreporter.h"
#include "llfloaterscriptdebug.h"
-#include "llfloatersettingsdebug.h"
-#include "llfloaterenvsettings.h"
#include "llfloatertools.h"
-#include "llfloaterwater.h"
-#include "llfloaterwindlight.h"
#include "llfloaterworldmap.h"
-#include "llfloatermemleak.h"
-#include "llfasttimerview.h"
#include "llavataractions.h"
#include "lllandmarkactions.h"
-#include "llmemoryview.h"
#include "llgroupmgr.h"
#include "lltooltip.h"
#include "llhudeffecttrail.h"
#include "llhudmanager.h"
-#include "llimage.h"
-#include "llimagebmp.h"
-#include "llimagej2c.h"
-#include "llimagetga.h"
#include "llinventorybridge.h"
-#include "llinventorymodel.h"
-#include "llfloaterinventory.h"
-#include "llkeyboard.h"
#include "llpanellogin.h"
#include "llpanelblockedlist.h"
#include "llmenucommands.h"
-#include "llmenugl.h"
-#include "llmimetypes.h"
#include "llmoveview.h"
-#include "llmutelist.h"
-#include "llnotify.h"
-#include "llpanelobject.h"
#include "llparcel.h"
-#include "llprimitive.h"
-#include "llresmgr.h"
#include "llrootview.h"
#include "llselectmgr.h"
#include "llsidetray.h"
-#include "llsky.h"
#include "llstatusbar.h"
-#include "llstatview.h"
-#include "llstring.h"
-#include "llsurfacepatch.h"
-#include "llimview.h"
#include "lltextureview.h"
-#include "lltool.h"
#include "lltoolbar.h"
#include "lltoolcomp.h"
-#include "lltoolfocus.h"
-#include "lltoolgrab.h"
#include "lltoolmgr.h"
#include "lltoolpie.h"
#include "lltoolselectland.h"
-#include "lltrans.h"
-#include "lluictrlfactory.h"
-#include "lluploaddialog.h"
-#include "lluserauth.h"
-#include "lluuid.h"
-#include "llviewercamera.h"
#include "llviewergenericmessage.h"
#include "llviewerhelp.h"
-#include "llviewertexturelist.h" // gTextureList
-#include "llviewerinventory.h"
#include "llviewermenufile.h" // init_menu_file()
#include "llviewermessage.h"
#include "llviewernetwork.h"
#include "llviewerobjectlist.h"
#include "llviewerparcelmgr.h"
-#include "llviewerparceloverlay.h"
-#include "llviewerregion.h"
#include "llviewerstats.h"
-#include "llviewerwindow.h"
-#include "llvoavatar.h"
#include "llvoavatarself.h"
-#include "llvolume.h"
-#include "llweb.h"
-#include "llworld.h"
#include "llworldmap.h"
-#include "object_flags.h"
#include "pipeline.h"
-#include "llappviewer.h"
-#include "roles_constants.h"
#include "llviewerjoystick.h"
#include "llwlanimator.h"
#include "llwlparammanager.h"
-#include "llwaterparammanager.h"
-#include "llfloaternotificationsconsole.h"
#include "llfloatercamera.h"
#include "lluilistener.h"
-
-#include "lltexlayer.h"
#include "llappearancemgr.h"
-#include "llimfloater.h"
using namespace LLVOAvatarDefines;
@@ -600,7 +488,7 @@ class LLAdvancedToggleConsole : public view_listener_t
}
else if ("debug" == console_type)
{
- toggle_visibility( (void*)((LLView*)gDebugView->mDebugConsolep) );
+ toggle_visibility( (void*)static_cast<LLUICtrl*>(gDebugView->mDebugConsolep));
}
else if (gTextureSizeView && "texture size" == console_type)
{
@@ -5634,11 +5522,6 @@ class LLShowFloater : public view_listener_t
{
LLFloaterScriptDebug::show(LLUUID::null);
}
- else if (floater_name == "help f1")
- {
- LLViewerHelp* vhelp = LLViewerHelp::getInstance();
- vhelp->showTopic(vhelp->getTopicFromFocus());
- }
else if (floater_name == "complaint reporter")
{
// Prevent menu from appearing in screen shot.
@@ -5675,6 +5558,26 @@ class LLFloaterVisible : public view_listener_t
}
};
+class LLShowHelp : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ std::string help_topic = userdata.asString();
+
+ LLViewerHelp* vhelp = LLViewerHelp::getInstance();
+ if (help_topic.empty())
+ {
+ vhelp->showTopic(vhelp->getTopicFromFocus());
+ }
+ else
+ {
+ vhelp->showTopic(help_topic);
+ }
+
+ return true;
+ }
+};
+
class LLShowSidetrayPanel : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@@ -6963,16 +6866,15 @@ void handle_grab_texture(void* data)
gInventory.updateItem(item);
gInventory.notifyObservers();
- LLFloaterInventory* view = LLFloaterInventory::getActiveInventory();
-
// Show the preview panel for textures to let
// user know that the image is now in inventory.
- if(view)
+ LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel();
+ if(active_panel)
{
LLFocusableElement* focus_ctrl = gFocusMgr.getKeyboardFocus();
- view->getPanel()->setSelection(item_id, TAKE_FOCUS_NO);
- view->getPanel()->openSelected();
+ active_panel->setSelection(item_id, TAKE_FOCUS_NO);
+ active_panel->openSelected();
//LLFloaterInventory::dumpSelectionInformation((void*)view);
// restore keyboard focus
gFocusMgr.setKeyboardFocus(focus_ctrl);
@@ -8039,6 +7941,7 @@ void initialize_menus()
// Generic actions
view_listener_t::addMenu(new LLShowFloater(), "ShowFloater");
+ view_listener_t::addMenu(new LLShowHelp(), "ShowHelp");
view_listener_t::addMenu(new LLPromptShowURL(), "PromptShowURL");
view_listener_t::addMenu(new LLShowAgentProfile(), "ShowAgentProfile");
view_listener_t::addMenu(new LLToggleControl(), "ToggleControl");
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 23d02af73d..8c0529e344 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -31,70 +31,31 @@
*/
#include "llviewerprecompiledheaders.h"
-
#include "llviewermessage.h"
-#include <deque>
-
#include "llaudioengine.h"
-#include "indra_constants.h"
#include "lscript_byteformat.h"
-#include "mean_collision_data.h"
-#include "llfloaterbump.h"
-#include "llassetstorage.h"
-#include "llcachename.h"
-
-#include "lldbstrings.h"
#include "lleconomy.h"
-#include "llfilepicker.h"
#include "llfloaterreg.h"
-#include "llfocusmgr.h"
#include "llfollowcamparams.h"
-#include "llinstantmessage.h"
-#include "llquantize.h"
-#include "llregionflags.h"
-#include "llregionhandle.h"
#include "llsdserialize.h"
-#include "llstring.h"
-#include "llteleportflags.h"
-#include "lltracker.h"
#include "lltransactionflags.h"
-#include "llxfermanager.h"
-#include "message.h"
-#include "sound_ids.h"
-#include "lltimer.h"
-#include "llmd5.h"
#include "llagent.h"
#include "llcallingcard.h"
-#include "llconsole.h"
-#include "llvieweraudio.h"
-#include "llviewercontrol.h"
-#include "lldrawpool.h"
#include "llfirstuse.h"
-#include "llfloateranimpreview.h"
#include "llfloaterbuycurrency.h"
#include "llfloaterbuyland.h"
#include "llfloaterchat.h"
-#include "llfloaterimagepreview.h"
#include "llfloaterland.h"
#include "llfloaterregioninfo.h"
#include "llfloaterlandholdings.h"
-#include "llurldispatcher.h"
#include "llfloaterpostcard.h"
#include "llfloaterpreference.h"
-#include "llfollowcam.h"
-#include "llgroupnotify.h"
-#include "llhudeffect.h"
#include "llhudeffecttrail.h"
#include "llhudmanager.h"
-#include "llinventorymodel.h"
#include "llinventoryobserver.h"
#include "llinventorypanel.h"
-#include "llfloaterinventory.h"
-#include "llmenugl.h"
-#include "llmoveview.h"
-#include "llmutelist.h"
#include "llnearbychat.h"
#include "llnotifications.h"
#include "llnotificationsutil.h"
@@ -111,22 +72,13 @@
#include "llstatenums.h"
#include "llstatusbar.h"
#include "llimview.h"
-#include "lltool.h"
-#include "lltoolbar.h"
-#include "lltoolmgr.h"
#include "lltrans.h"
-#include "llui.h" // for make_ui_sound
-#include "lluploaddialog.h"
-#include "llviewercamera.h"
-#include "llviewerchat.h"
+#include "llviewerfoldertype.h"
+#include "lluri.h"
#include "llviewergenericmessage.h"
-#include "llviewerinventory.h"
#include "llviewermenu.h"
-#include "llviewerobject.h"
#include "llviewerobjectlist.h"
#include "llviewerparcelmgr.h"
-#include "llviewerpartsource.h"
-#include "llviewerregion.h"
#include "llviewerstats.h"
#include "llviewertexteditor.h"
#include "llviewerthrottle.h"
@@ -134,10 +86,8 @@
#include "llvlmanager.h"
#include "llvoavatarself.h"
#include "llvotextbubble.h"
-#include "llweb.h"
#include "llworld.h"
#include "pipeline.h"
-#include "llappviewer.h"
#include "llfloaterworldmap.h"
#include "llviewerdisplay.h"
#include "llkeythrottle.h"
@@ -146,15 +96,13 @@
#include "llpanelblockedlist.h"
#include "llpanelplaceprofile.h"
-#include <boost/tokenizer.hpp>
-#include <boost/algorithm/string/split.hpp>
+#include <boost/algorithm/string/split.hpp> //
#if LL_WINDOWS // For Windows specific error handler
#include "llwindebug.h" // For the invalid message handler
#endif
-//#include "llnearbychathistory.h"
-#include "llnotificationmanager.h"
+#include "llnotificationmanager.h" //
//
// Constants
@@ -878,111 +826,98 @@ bool check_offer_throttle(const std::string& from_name, bool check_only)
void open_inventory_offer(const std::vector<LLUUID>& items, const std::string& from_name)
{
- std::vector<LLUUID>::const_iterator it = items.begin();
- std::vector<LLUUID>::const_iterator end = items.end();
- const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH);
- LLInventoryItem* item;
- for(; it != end; ++it)
- {
- const LLUUID& id = *it;
- item = gInventory.getItem(id);
+ for (std::vector<LLUUID>::const_iterator item_iter = items.begin();
+ item_iter != items.end();
+ ++item_iter)
+ {
+ const LLUUID& item_id = (*item_iter);
+ LLInventoryItem* item = gInventory.getItem(item_id);
if(!item)
{
- LL_WARNS("Messaging") << "Unable to show inventory item: " << id << LL_ENDL;
+ LL_WARNS("Messaging") << "Unable to show inventory item: " << item_id << LL_ENDL;
continue;
}
- if(gInventory.isObjectDescendentOf(id, trash_id))
+
+ ////////////////////////////////////////////////////////////////////////////////
+ // Don't highlight if it's in certain "quiet" folders which don't need UI
+ // notification (e.g. trash, cof, lost-and-found).
+ const BOOL user_is_away = gAwayTimer.getStarted();
+ if(!user_is_away)
{
- continue;
+ const LLViewerInventoryCategory *parent = gInventory.getFirstNondefaultParent(item_id);
+ if (parent)
+ {
+ const LLFolderType::EType parent_type = parent->getPreferredType();
+ if (LLViewerFolderType::lookupIsQuietType(parent_type))
+ {
+ continue;
+ }
+ }
}
- LLAssetType::EType asset_type = item->getType();
- //if we are throttled, don't display them
- if (check_offer_throttle(from_name, false))
+ ////////////////////////////////////////////////////////////////////////////////
+ // Special handling for various types.
+ const LLAssetType::EType asset_type = item->getType();
+ if (check_offer_throttle(from_name, false)) // If we are throttled, don't display
{
+ LL_DEBUGS("Messaging") << "Highlighting inventory item: " << item->getUUID() << LL_ENDL;
// If we opened this ourselves, focus it
- BOOL take_focus = from_name.empty() ? TAKE_FOCUS_YES : TAKE_FOCUS_NO;
+ const BOOL take_focus = from_name.empty() ? TAKE_FOCUS_YES : TAKE_FOCUS_NO;
switch(asset_type)
{
case LLAssetType::AT_NOTECARD:
- LLFloaterReg::showInstance("preview_notecard", LLSD(id), take_focus);
- break;
+ {
+ LLFloaterReg::showInstance("preview_notecard", LLSD(item_id), take_focus);
+ break;
+ }
case LLAssetType::AT_LANDMARK:
{
LLInventoryCategory* parent_folder = gInventory.getCategory(item->getParentUUID());
- LLSD args;
- args["LANDMARK_NAME"] = item->getName();
- args["FOLDER_NAME"] = std::string(parent_folder ? parent_folder->getName() : "unknown");
- LLNotificationsUtil::add("LandmarkCreated", args);
-
- // Created landmark is passed to Places panel to allow its editing.
- LLPanelPlaces *panel = dynamic_cast<LLPanelPlaces*>(LLSideTray::getInstance()->showPanel("panel_places", LLSD()));
- if (panel)
+ if ("inventory_handler" == from_name)
{
- panel->setItem(item);
+ //we have to filter inventory_handler messages to avoid notification displaying
+ LLSideTray::getInstance()->showPanel("panel_places",
+ LLSD().with("type", "landmark").with("id", item->getUUID()));
}
- }
+ else if(from_name.empty())
+ {
+ // we receive a message from LLOpenTaskOffer, it mean that new landmark has been added.
+ LLSD args;
+ args["LANDMARK_NAME"] = item->getName();
+ args["FOLDER_NAME"] = std::string(parent_folder ? parent_folder->getName() : "unknown");
+ LLNotificationsUtil::add("LandmarkCreated", args);
+ // Created landmark is passed to Places panel to allow its editing. In fact panel should be already displayed.
+ //TODO*:: dserduk(7/12/09) remove LLPanelPlaces dependency from here
+ LLPanelPlaces *places_panel = dynamic_cast<LLPanelPlaces*>(LLSideTray::getInstance()->showPanel("panel_places", LLSD()));
+ if (places_panel)
+ {
+ places_panel->setItem(item);
+ }
+ }
+ }
break;
case LLAssetType::AT_TEXTURE:
- LLFloaterReg::showInstance("preview_texture", LLSD(id), take_focus);
- break;
+ {
+ LLFloaterReg::showInstance("preview_texture", LLSD(item_id), take_focus);
+ break;
+ }
default:
break;
}
}
- //highlight item, if it's not in the trash or lost+found
- // Don't auto-open the inventory floater
- LLFloaterInventory* view = NULL;
- if(gSavedSettings.getBOOL("ShowInInventory") &&
- asset_type != LLAssetType::AT_CALLINGCARD &&
- item->getInventoryType() != LLInventoryType::IT_ATTACHMENT &&
- !from_name.empty())
- {
- view = LLFloaterInventory::showAgentInventory();
- //TODO:this should be moved to the end of method after all the checks,
- //but first decide what to do with active inventory if any (EK)
- LLSD key;
- key["select"] = item->getUUID();
- LLSideTray::getInstance()->showPanel("sidepanel_inventory", key);
- }
- else
- {
- view = LLFloaterInventory::getActiveInventory();
- }
- if(!view)
- {
- return;
- }
-
- //Trash Check
- const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH);
- if(gInventory.isObjectDescendentOf(item->getUUID(), trash_id))
- {
- return;
- }
- const LLUUID lost_and_found_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND);
- //BOOL inventory_has_focus = gFocusMgr.childHasKeyboardFocus(view);
- BOOL user_is_away = gAwayTimer.getStarted();
-
- // don't select lost and found items if the user is active
- if (gInventory.isObjectDescendentOf(item->getUUID(), lost_and_found_id)
- && !user_is_away)
- {
- return;
- }
-
- //Not sure about this check. Could make it easy to miss incoming items.
- //don't dick with highlight while the user is working
- //if(inventory_has_focus && !user_is_away)
- // break;
- LL_DEBUGS("Messaging") << "Highlighting" << item->getUUID() << LL_ENDL;
- //highlight item
-
- if (view->getPanel())
- {
+ ////////////////////////////////////////////////////////////////////////////////
+ // Highlight item if it's not in the trash, lost+found, or COF
+ const BOOL auto_open = gSavedSettings.getBOOL("ShowInInventory") &&
+ (asset_type != LLAssetType::AT_CALLINGCARD) &&
+ (item->getInventoryType() != LLInventoryType::IT_ATTACHMENT) &&
+ !from_name.empty();
+ LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(auto_open);
+ if(active_panel)
+ {
+ LL_DEBUGS("Messaging") << "Highlighting" << item_id << LL_ENDL;
LLFocusableElement* focus_ctrl = gFocusMgr.getKeyboardFocus();
- view->getPanel()->setSelection(item->getUUID(), TAKE_FOCUS_NO);
+ active_panel->setSelection(item_id, TAKE_FOCUS_NO);
gFocusMgr.setKeyboardFocus(focus_ctrl);
}
}
@@ -1525,7 +1460,7 @@ void inventory_offer_handler(LLOfferInfo* info)
args["OBJECTFROMNAME"] = info->mFromName;
args["NAME"] = info->mFromName;
args["NAME_SLURL"] = LLSLURL::buildCommand("agent", info->mFromID, "about");
- std::string verb = "select?name=" + msg;
+ std::string verb = "select?name=" + LLURI::escape(msg);
args["ITEM_SLURL"] = LLSLURL::buildCommand("inventory", info->mObjectID, verb.c_str());
LLNotification::Params p("ObjectGiveItem");
@@ -1564,14 +1499,15 @@ void inventory_offer_handler(LLOfferInfo* info)
}
// Pop up inv offer notification and let the user accept (keep), or reject (and silently delete) the inventory.
- LLNotifications::instance().add(p);
+ LLNotifications::instance().add(p);
+ // TODO(EM): Recheck this after we will know how script notifications should look like.
// Inform user that there is a script floater via toast system
- {
- payload["give_inventory_notification"] = TRUE;
- LLNotificationPtr notification = LLNotifications::instance().add(p.payload(payload));
- LLScriptFloaterManager::getInstance()->setNotificationToastId(object_id, notification->getID());
- }
+ // {
+ // payload["give_inventory_notification"] = TRUE;
+ // LLNotificationPtr notification = LLNotifications::instance().add(p.payload(payload));
+ // LLScriptFloaterManager::getInstance()->setNotificationToastId(object_id, notification->getID());
+ // }
}
bool lure_callback(const LLSD& notification, const LLSD& response)
@@ -2074,13 +2010,17 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
case IM_INVENTORY_ACCEPTED:
{
args["NAME"] = name;
- LLNotificationsUtil::add("InventoryAccepted", args);
+ LLSD payload;
+ payload["from_id"] = from_id;
+ LLNotificationsUtil::add("InventoryAccepted", args, payload);
break;
}
case IM_INVENTORY_DECLINED:
{
args["NAME"] = name;
- LLNotificationsUtil::add("InventoryDeclined", args);
+ LLSD payload;
+ payload["from_id"] = from_id;
+ LLNotificationsUtil::add("InventoryDeclined", args, payload);
break;
}
// TODO: _DEPRECATED suffix as part of vote removal - DEV-24856
@@ -5038,7 +4978,7 @@ void container_inventory_arrived(LLViewerObject* object,
gAgent.changeCameraToDefault();
}
- LLFloaterInventory* view = LLFloaterInventory::getActiveInventory();
+ LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel();
if (inventory->size() > 2)
{
@@ -5076,9 +5016,9 @@ void container_inventory_arrived(LLViewerObject* object,
}
}
gInventory.notifyObservers();
- if(view)
+ if(active_panel)
{
- view->getPanel()->setSelection(cat_id, TAKE_FOCUS_NO);
+ active_panel->setSelection(cat_id, TAKE_FOCUS_NO);
}
}
else if (inventory->size() == 2)
@@ -5112,9 +5052,9 @@ void container_inventory_arrived(LLViewerObject* object,
new_item->updateServer(TRUE);
gInventory.updateItem(new_item);
gInventory.notifyObservers();
- if(view)
+ if(active_panel)
{
- view->getPanel()->setSelection(item_id, TAKE_FOCUS_NO);
+ active_panel->setSelection(item_id, TAKE_FOCUS_NO);
}
}
@@ -5583,17 +5523,6 @@ void process_script_dialog(LLMessageSystem* msg, void**)
notification = LLNotifications::instance().add(
LLNotification::Params("ScriptDialogGroup").substitutions(args).payload(payload).form_elements(form.asLLSD()));
}
-
- // "ScriptDialog" and "ScriptDialogGroup" are handles by LLScriptFloaterManager.
- // We want to inform user that there is a script floater, lets add "ScriptToast"
- LLNotification::Params p("ScriptToast");
- p.substitutions(args).payload(payload).functor.function(boost::bind(
- LLScriptFloaterManager::onToastButtonClick, _1, _2));
-
- notification = LLNotifications::instance().add(p);
-
- LLScriptFloaterManager::getInstance()->setNotificationToastId(
- object_id, notification->getID());
}
//---------------------------------------------------------------------------
diff --git a/indra/newview/llviewerprecompiledheaders.h b/indra/newview/llviewerprecompiledheaders.h
index 86f59b6e2f..6a0ad5757f 100644
--- a/indra/newview/llviewerprecompiledheaders.h
+++ b/indra/newview/llviewerprecompiledheaders.h
@@ -109,7 +109,6 @@
#include "llthread.h"
#include "lltimer.h"
#include "lluuidhashmap.h"
-//#include "llversionviewer.h"
//#include "processor.h"
#include "stdenums.h"
#include "stdtypes.h"
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index dbcf563010..e066546bd8 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -614,10 +614,6 @@ void LLViewerTextureList::updateImages(F32 max_time)
didone = image->doLoadedCallbacks();
}
}
- if (!gNoRender && !gGLManager.mIsDisabled)
- {
- LLViewerMedia::updateMedia();
- }
updateImagesUpdateStats();
}
@@ -1458,6 +1454,8 @@ void LLUIImageList::onUIImageLoaded( BOOL success, LLViewerFetchedTexture *src_v
llclamp((F32)scale_rect.mRight / (F32)imagep->getWidth(), 0.f, 1.f),
llclamp((F32)scale_rect.mBottom / (F32)imagep->getHeight(), 0.f, 1.f)));
}
+
+ imagep->onImageLoaded();
}
}
}
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 9ba056a17c..8529a93527 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1011,6 +1011,7 @@ BOOL LLViewerWindow::handleActivate(LLWindow *window, BOOL activated)
else
{
mActive = FALSE;
+
if (gSavedSettings.getBOOL("AllowIdleAFK"))
{
gAgent.setAFK();
@@ -3244,8 +3245,7 @@ LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, BOOL pick_trans
}
else
{
- llwarns << "List of last picks is empty" << llendl;
- llwarns << "Using stub pick" << llendl;
+ lldebugs << "List of last picks is empty: Using stub pick" << llendl;
mLastPick = LLPickInfo();
}
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index a9194c0c3b..93b0ad4a5b 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -3834,15 +3834,6 @@ U32 LLVOAvatar::renderTransparent(BOOL first_pass)
gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f);
}
- bool should_alpha_mask = shouldAlphaMask();
-
- LLGLState test(GL_ALPHA_TEST, should_alpha_mask);
-
- if (should_alpha_mask)
- {
- gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.5f);
- }
-
if (isTextureVisible(TEX_HEAD_BAKED))
{
num_indices += mMeshLOD[MESH_ID_EYELASH]->render(mAdjustedPixelArea, first_pass, mIsDummy);
@@ -6011,8 +6002,7 @@ void LLVOAvatar::updateMeshTextures()
}
}
else if (mBakedTextureDatas[i].mTexLayerSet
- && !other_culled
- && (i != BAKED_HAIR || mSupportsAlphaLayers)) // ! BACKWARDS COMPATIBILITY ! workaround for old viewers.
+ && !other_culled)
{
mBakedTextureDatas[i].mTexLayerSet->createComposite();
mBakedTextureDatas[i].mTexLayerSet->setUpdatesEnabled( TRUE );
@@ -6024,9 +6014,10 @@ void LLVOAvatar::updateMeshTextures()
}
}
- // ! BACKWARDS COMPATIBILITY !
- // Workaround for viewing avatars from old viewers that haven't baked hair textures.
- if (!mSupportsAlphaLayers)
+ // set texture and color of hair manually if we are not using a baked image.
+ // This can happen while loading hair for yourself, or for clients that did not
+ // bake a hair texture. Still needed for yourself after 1.22 is depricated.
+ if (!is_layer_baked[BAKED_HAIR] || self_customizing)
{
const LLColor4 color = mTexHairColor ? mTexHairColor->getColor() : LLColor4(1,1,1,1);
LLViewerTexture* hair_img = getImage( TEX_HAIR, 0 );
diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp
index a0396bc790..175b6f1d10 100644
--- a/indra/newview/llvoicechannel.cpp
+++ b/indra/newview/llvoicechannel.cpp
@@ -316,6 +316,8 @@ void LLVoiceChannel::activate()
}
}
+ sCurrentVoiceChannelChangedSignal(this->mSessionID);
+
if (mState == STATE_NO_CHANNEL_INFO)
{
// responsible for setting status to active
@@ -325,8 +327,6 @@ void LLVoiceChannel::activate()
{
setState(STATE_CALL_STARTED);
}
-
- sCurrentVoiceChannelChangedSignal(this->mSessionID);
}
void LLVoiceChannel::getChannelInfo()
@@ -408,28 +408,6 @@ void LLVoiceChannel::doSetState(const EState& new_state)
mStateChangedCallback(old_state, mState);
}
-void LLVoiceChannel::toggleCallWindowIfNeeded(EState state)
-{
- LLFloaterCall* floater = dynamic_cast<LLFloaterCall*>(LLFloaterReg::getInstance("voice_call", mSessionID));
- if (!floater)
- return;
-
- if (state == STATE_CONNECTED)
- {
- floater->init(mSessionID);
- floater->openFloater(mSessionID);
- }
- // By checking that current state is CONNECTED we make sure that the call window
- // has been shown, hence there's something to hide. This helps when user presses
- // the "End call" button right after initiating the call.
- // *TODO: move this check to LLFloaterCall?
- else if (state == STATE_HUNG_UP && mState == STATE_CONNECTED)
- {
- floater->reset();
- floater->closeFloater();
- }
-}
-
//static
void LLVoiceChannel::initClass()
{
@@ -630,9 +608,6 @@ void LLVoiceChannelGroup::handleError(EStatusType status)
void LLVoiceChannelGroup::setState(EState state)
{
- // HACK: Open/close the call window if needed.
- toggleCallWindowIfNeeded(state);
-
switch(state)
{
case STATE_RINGING:
@@ -886,9 +861,6 @@ void LLVoiceChannelP2P::setSessionHandle(const std::string& handle, const std::s
void LLVoiceChannelP2P::setState(EState state)
{
- // *HACK: Open/close the call window if needed.
- toggleCallWindowIfNeeded(state);
-
llinfos << "P2P CALL STATE CHANGE: incoming=" << int(mReceivedCall) << " oldstate=" << mState << " newstate=" << state << llendl;
if (mReceivedCall) // incoming call
@@ -902,61 +874,6 @@ void LLVoiceChannelP2P::setState(EState state)
return;
}
}
- else // outgoing call
- {
- mCallDialogPayload["session_id"] = mSessionID;
- mCallDialogPayload["session_name"] = mSessionName;
- mCallDialogPayload["other_user_id"] = mOtherUserID;
- if (state == STATE_RINGING ||
- state == STATE_CALL_STARTED)
- {
- // *HACK: open outgoing call floater if needed, might be better done elsewhere.
- // *TODO: should move this squirrelly ui-fudging crap into LLOutgoingCallDialog itself
- if (!mSessionName.empty())
- {
- LLOutgoingCallDialog *ocd = dynamic_cast<LLOutgoingCallDialog*>(LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE));
- if (ocd)
- {
- ocd->getChild<LLTextBox>("calling")->setVisible(true);
- ocd->getChild<LLTextBox>("leaving")->setVisible(true);
- ocd->getChild<LLTextBox>("connecting")->setVisible(false);
- ocd->getChild<LLTextBox>("noanswer")->setVisible(false);
- }
- }
- }
- /*else if (state == STATE_CONNECTED)
- {
- LLOutgoingCallDialog *ocd = dynamic_cast<LLOutgoingCallDialog*>(LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE));
- if (ocd)
- {
- ocd->getChild<LLTextBox>("calling")->setVisible(false);
- ocd->getChild<LLTextBox>("leaving")->setVisible(false);
- ocd->getChild<LLTextBox>("connecting")->setVisible(true);
- ocd->getChild<LLTextBox>("noanswer")->setVisible(false);
- }
- }*/
- else if (state == STATE_ERROR)
- {
- LLOutgoingCallDialog *ocd = dynamic_cast<LLOutgoingCallDialog*>(LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE));
- if (ocd)
- {
- ocd->getChild<LLTextBox>("calling")->setVisible(false);
- ocd->getChild<LLTextBox>("leaving")->setVisible(false);
- ocd->getChild<LLTextBox>("connecting")->setVisible(false);
- ocd->getChild<LLTextBox>("noanswer")->setVisible(true);
- }
- }
- else if (state == STATE_HUNG_UP ||
- state == STATE_CONNECTED)
- {
- // hide popup
- LLOutgoingCallDialog *ocd = dynamic_cast<LLOutgoingCallDialog*>(LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE));
- if (ocd)
- {
- ocd->closeFloater();
- }
- }
- }
LLVoiceChannel::setState(state);
}
diff --git a/indra/newview/llvoicechannel.h b/indra/newview/llvoicechannel.h
index fe0114d687..1bed329ba2 100644
--- a/indra/newview/llvoicechannel.h
+++ b/indra/newview/llvoicechannel.h
@@ -101,7 +101,6 @@ protected:
* Use this method if you want mStateChangedCallback to be executed while state is changed
*/
void doSetState(const EState& state);
- void toggleCallWindowIfNeeded(EState state);
void setURI(std::string uri);
std::string mURI;
diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp
index 3cb0ec4bad..0405b9d28b 100644
--- a/indra/newview/llwearable.cpp
+++ b/indra/newview/llwearable.cpp
@@ -1094,6 +1094,16 @@ void LLWearable::setLabelUpdated() const
gInventory.addChangedMask(LLInventoryObserver::LABEL, getItemID());
}
+void LLWearable::refreshName()
+{
+ LLUUID item_id = getItemID();
+ LLInventoryItem* item = gInventory.getItem(item_id);
+ if( item )
+ {
+ mName = item->getName();
+ }
+}
+
struct LLWearableSaveData
{
EWearableType mType;
diff --git a/indra/newview/llwearable.h b/indra/newview/llwearable.h
index 43ffa12420..82d388ab7e 100644
--- a/indra/newview/llwearable.h
+++ b/indra/newview/llwearable.h
@@ -133,6 +133,10 @@ public:
// Something happened that requires the wearable's label to be updated (e.g. worn/unworn).
void setLabelUpdated() const;
+ // the wearable was worn. make sure the name of the wearable object matches the LLViewerInventoryItem,
+ // not the wearable asset itself.
+ void refreshName();
+
private:
typedef std::map<S32, LLLocalTextureObject*> te_map_t;
typedef std::map<S32, LLVisualParam *> visual_param_index_map_t;
diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml
index acb3262093..cdbeed111e 100644
--- a/indra/newview/skins/default/colors.xml
+++ b/indra/newview/skins/default/colors.xml
@@ -648,7 +648,7 @@
reference="LtGray" />
<color
name="TextFgTentativeColor"
- value="0 0 0 .33" />
+ value="0.4 0.4 0.4 1" />
<color
name="TimeTextColor"
reference="LtGray" />
diff --git a/indra/newview/skins/default/textures/icons/Inv_LinkFolder.png b/indra/newview/skins/default/textures/icons/Inv_LinkFolder.png
new file mode 100644
index 0000000000..73a708782c
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Inv_LinkFolder.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Inv_LinkItem.png b/indra/newview/skins/default/textures/icons/Inv_LinkItem.png
new file mode 100644
index 0000000000..73a708782c
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Inv_LinkItem.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_BuildNo_Dark.png b/indra/newview/skins/default/textures/icons/Parcel_BuildNo_Dark.png
new file mode 100644
index 0000000000..fb1f7d3a6d
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Parcel_BuildNo_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_BuildNo_Light.png b/indra/newview/skins/default/textures/icons/Parcel_BuildNo_Light.png
new file mode 100644
index 0000000000..e6f614b844
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Parcel_BuildNo_Light.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_Build_Dark.png b/indra/newview/skins/default/textures/icons/Parcel_Build_Dark.png
new file mode 100644
index 0000000000..84a96a60cb
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Parcel_Build_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_DamageNo_Dark.png b/indra/newview/skins/default/textures/icons/Parcel_DamageNo_Dark.png
new file mode 100644
index 0000000000..d55ebd7c67
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Parcel_DamageNo_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_Damage_Dark.png b/indra/newview/skins/default/textures/icons/Parcel_Damage_Dark.png
new file mode 100644
index 0000000000..ae4077488b
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Parcel_Damage_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_Exp_Color.png b/indra/newview/skins/default/textures/icons/Parcel_Exp_Color.png
new file mode 100644
index 0000000000..4813d37198
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Parcel_Exp_Color.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_FlyNo_Dark.png b/indra/newview/skins/default/textures/icons/Parcel_FlyNo_Dark.png
new file mode 100644
index 0000000000..0455a52fdc
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Parcel_FlyNo_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_FlyNo_Light.png b/indra/newview/skins/default/textures/icons/Parcel_FlyNo_Light.png
new file mode 100644
index 0000000000..be0c379d84
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Parcel_FlyNo_Light.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_Fly_Dark.png b/indra/newview/skins/default/textures/icons/Parcel_Fly_Dark.png
new file mode 100644
index 0000000000..ed4a512e04
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Parcel_Fly_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_ForSale_Light.png b/indra/newview/skins/default/textures/icons/Parcel_ForSale_Light.png
new file mode 100644
index 0000000000..d28e5357df
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Parcel_ForSale_Light.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_Health_Dark.png b/indra/newview/skins/default/textures/icons/Parcel_Health_Dark.png
new file mode 100644
index 0000000000..d72f02f708
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Parcel_Health_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_M_Dark.png b/indra/newview/skins/default/textures/icons/Parcel_M_Dark.png
new file mode 100644
index 0000000000..2f5871b8ff
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Parcel_M_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_M_Light.png b/indra/newview/skins/default/textures/icons/Parcel_M_Light.png
new file mode 100644
index 0000000000..724ac22744
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Parcel_M_Light.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_NoScripts_Light.png b/indra/newview/skins/default/textures/icons/Parcel_NoScripts_Light.png
new file mode 100644
index 0000000000..f82354959e
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Parcel_NoScripts_Light.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_PG_Dark.png b/indra/newview/skins/default/textures/icons/Parcel_PG_Dark.png
new file mode 100644
index 0000000000..f0565f02dd
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Parcel_PG_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_PG_Light.png b/indra/newview/skins/default/textures/icons/Parcel_PG_Light.png
new file mode 100644
index 0000000000..f32b0570a1
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Parcel_PG_Light.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_PushNo_Dark.png b/indra/newview/skins/default/textures/icons/Parcel_PushNo_Dark.png
new file mode 100644
index 0000000000..8f0fe6a04d
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Parcel_PushNo_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_PushNo_Light.png b/indra/newview/skins/default/textures/icons/Parcel_PushNo_Light.png
new file mode 100644
index 0000000000..eba7070b4d
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Parcel_PushNo_Light.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_Push_Dark.png b/indra/newview/skins/default/textures/icons/Parcel_Push_Dark.png
new file mode 100644
index 0000000000..08c2a18ac3
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Parcel_Push_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_R_Dark.png b/indra/newview/skins/default/textures/icons/Parcel_R_Dark.png
new file mode 100644
index 0000000000..e0e6e14cca
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Parcel_R_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_R_Light.png b/indra/newview/skins/default/textures/icons/Parcel_R_Light.png
new file mode 100644
index 0000000000..efca6776da
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Parcel_R_Light.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_ScriptsNo_Dark.png b/indra/newview/skins/default/textures/icons/Parcel_ScriptsNo_Dark.png
new file mode 100644
index 0000000000..8f9f37a1bf
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Parcel_ScriptsNo_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_Scripts_Dark.png b/indra/newview/skins/default/textures/icons/Parcel_Scripts_Dark.png
new file mode 100644
index 0000000000..8b1d6c5e14
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Parcel_Scripts_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_VoiceNo_Dark.png b/indra/newview/skins/default/textures/icons/Parcel_VoiceNo_Dark.png
new file mode 100644
index 0000000000..eace54ae79
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Parcel_VoiceNo_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_VoiceNo_Light.png b/indra/newview/skins/default/textures/icons/Parcel_VoiceNo_Light.png
new file mode 100644
index 0000000000..0d07e552b1
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Parcel_VoiceNo_Light.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_Voice_Dark.png b/indra/newview/skins/default/textures/icons/Parcel_Voice_Dark.png
new file mode 100644
index 0000000000..b36a9bd2f0
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Parcel_Voice_Dark.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Parcel_Voice_Light.png b/indra/newview/skins/default/textures/icons/Parcel_Voice_Light.png
new file mode 100644
index 0000000000..86ce19474a
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Parcel_Voice_Light.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index 7b8a9d561d..607df10048 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -57,6 +57,9 @@ with the same filename but different name
<texture name="Arrow_Small_Left" file_name="widgets/Arrow_Small_Left.png" preload="true" />
<texture name="Arrow_Small_Right" file_name="widgets/Arrow_Small_Right.png" preload="true" />
+ <texture name="Arrow_Down" file_name="widgets/Arrow_Down.png" preload="true" />
+ <texture name="Arrow_Up" file_name="widgets/Arrow_Up.png" preload="true" />
+
<texture name="AudioMute_Off" file_name="icons/AudioMute_Off.png" preload="false" />
<texture name="AudioMute_Over" file_name="icons/AudioMute_Over.png" preload="false" />
<texture name="AudioMute_Press" file_name="icons/AudioMute_Press.png" preload="false" />
@@ -194,8 +197,8 @@ with the same filename but different name
<texture name="Icon_Gear_Foreground" file_name="windows/Icon_Gear_Foreground.png" preload="false" />
<texture name="Icon_Gear_Press" file_name="windows/Icon_Gear_Press.png" preload="false" />
- <texture name="Icon_Help_Foreground" file_name="windows/Icon_Help_Foreground.png" preload="false" />
- <texture name="Icon_Help_Press" file_name="windows/Icon_Help_Press.png" preload="false" />
+ <texture name="Icon_Help_Foreground" file_name="windows/Icon_Help_Foreground.png" preload="true" />
+ <texture name="Icon_Help_Press" file_name="windows/Icon_Help_Press.png" preload="true" />
<texture name="Icon_Info" file_name="windows/Icon_Info.png" preload="false" />
<texture name="Icon_Minimize_Foreground" file_name="windows/Icon_Minimize_Foreground.png" preload="true" />
@@ -204,9 +207,6 @@ with the same filename but different name
<texture name="Icon_Restore_Foreground" file_name="windows/Icon_Restore_Foreground.png" preload="false" />
<texture name="Icon_Restore_Press" file_name="windows/Icon_Restore_Press.png" preload="false" />
- <texture name="Icon_Undock_Foreground" file_name="windows/Icon_Undock_Foreground.png" preload="false" />
- <texture name="Icon_Undock_Press" file_name="windows/Icon_Undock_Press.png" preload="false" />
-
<texture name="Info" file_name="icons/Info.png" preload="false" />
<texture name="Info_Small" file_name="icons/Info_Small.png" preload="false" />
<texture name="Info_Off" file_name="navbar/Info_Off.png" preload="false" />
@@ -230,6 +230,8 @@ with the same filename but different name
<texture name="Inv_Gesture" file_name="icons/Inv_Gesture.png" preload="false" />
<texture name="Inv_Gloves" file_name="icons/Inv_Gloves.png" preload="false" />
<texture name="Inv_Hair" file_name="icons/Inv_Hair.png" preload="false" />
+ <texture name="Inv_LinkItem" file_name="icons/Inv_LinkItem.png" preload="false" />
+ <texture name="Inv_LinkFolder" file_name="icons/Inv_LinkFolder.png" preload="false" />
<texture name="Inv_Jacket" file_name="icons/Inv_Jacket.png" preload="false" />
<texture name="Inv_LookFolderOpen" file_name="icons/Inv_LookFolderOpen.png" preload="false" />
<texture name="Inv_LookFolderClosed" file_name="icons/Inv_LookFolderClosed.png" preload="false" />
@@ -333,49 +335,49 @@ with the same filename but different name
<texture name="Overhead_M" file_name="world/Overhead_M.png" preload="false" />
<texture name="Overhead_S" file_name="world/Overhead_S.png" preload="false" />
- <texture name="parcel_color_EVRY" file_name="icons/parcel_color_EVRY.png" preload="false" />
- <texture name="parcel_color_EXP" file_name="icons/parcel_color_EXP.png" preload="false" />
- <texture name="parcel_color_M" file_name="icons/parcel_color_M.png" preload="false" />
-
- <texture name="parcel_drk_Build" file_name="icons/parcel_drk_Build.png" preload="false" />
- <texture name="parcel_drk_BuildNo" file_name="icons/parcel_drk_BuildNo.png" preload="false" />
- <texture name="parcel_drk_Damage" file_name="icons/parcel_drk_Damage.png" preload="false" />
- <texture name="parcel_drk_DamageNo" file_name="icons/parcel_drk_DamageNo.png" preload="false" />
- <texture name="parcel_drk_EVRY" file_name="icons/parcel_drk_EVRY.png" preload="false" />
- <texture name="parcel_drk_EXP" file_name="icons/parcel_drk_EXP.png" preload="false" />
- <texture name="parcel_drk_Fly" file_name="icons/parcel_drk_Fly.png" preload="false" />
- <texture name="parcel_drk_FlyNo" file_name="icons/parcel_drk_FlyNo.png" preload="false" />
- <texture name="parcel_drk_ForSale" file_name="icons/parcel_drk_ForSale.png" preload="false" />
- <texture name="parcel_drk_ForSaleNo" file_name="icons/parcel_drk_ForSaleNo.png" preload="false" />
- <texture name="parcel_drk_M" file_name="icons/parcel_drk_M.png" preload="false" />
- <texture name="parcel_drk_PG" file_name="icons/parcel_drk_PG.png" preload="false" />
- <texture name="parcel_drk_Push" file_name="icons/parcel_drk_Push.png" preload="false" />
- <texture name="parcel_drk_PushNo" file_name="icons/parcel_drk_PushNo.png" preload="false" />
- <texture name="parcel_drk_R" file_name="icons/parcel_drk_R.png" preload="false" />
- <texture name="parcel_drk_Scripts" file_name="icons/parcel_drk_Scripts.png" preload="false" />
- <texture name="parcel_drk_ScriptsNo" file_name="icons/parcel_drk_ScriptsNo.png" preload="false" />
- <texture name="parcel_drk_Voice" file_name="icons/parcel_drk_Voice.png" preload="false" />
- <texture name="parcel_drk_VoiceNo" file_name="icons/parcel_drk_VoiceNo.png" preload="false" />
-
- <texture name="parcel_lght_Build" file_name="icons/parcel_lght_Build.png" preload="false" />
- <texture name="parcel_lght_BuildNo" file_name="icons/parcel_lght_BuildNo.png" preload="false" />
- <texture name="parcel_lght_Damage" file_name="icons/parcel_lght_Damage.png" preload="false" />
- <texture name="parcel_lght_DamageNo" file_name="icons/parcel_lght_DamageNo.png" preload="false" />
- <texture name="parcel_lght_EVRY" file_name="icons/parcel_lght_EVRY.png" preload="false" />
- <texture name="parcel_lght_EXP" file_name="icons/parcel_lght_EXP.png" preload="false" />
- <texture name="parcel_lght_Fly" file_name="icons/parcel_lght_Fly.png" preload="false" />
- <texture name="parcel_lght_FlyNo" file_name="icons/parcel_lght_FlyNo.png" preload="false" />
- <texture name="parcel_lght_ForSale" file_name="icons/parcel_lght_ForSale.png" preload="false" />
- <texture name="parcel_lght_ForSaleNo" file_name="icons/parcel_lght_ForSaleNo.png" preload="false" />
- <texture name="parcel_lght_M" file_name="icons/parcel_lght_M.png" preload="false" />
- <texture name="parcel_lght_PG" file_name="icons/parcel_lght_PG.png" preload="false" />
- <texture name="parcel_lght_Push" file_name="icons/parcel_lght_Push.png" preload="false" />
- <texture name="parcel_lght_PushNo" file_name="icons/parcel_lght_PushNo.png" preload="false" />
- <texture name="parcel_lght_R" file_name="icons/parcel_lght_R.png" preload="false" />
- <texture name="parcel_lght_Scripts" file_name="icons/parcel_lght_Scripts.png" preload="false" />
- <texture name="parcel_lght_ScriptsNo" file_name="icons/parcel_lght_ScriptsNo.png" preload="false" />
- <texture name="parcel_lght_Voice" file_name="icons/parcel_lght_Voice.png" preload="false" />
- <texture name="parcel_lght_VoiceNo" file_name="icons/parcel_lght_VoiceNo.png" preload="false" />
+ <texture name="Parcel_Evry_Color" file_name="icons/Parcel_Evry_Color.png" preload="false" />
+ <texture name="Parcel_Exp_Color" file_name="icons/Parcel_Exp_Color.png" preload="false" />
+ <texture name="Parcel_M_Color" file_name="icons/Parcel_M_Color.png" preload="false" />
+
+ <texture name="Parcel_Build_Dark" file_name="icons/Parcel_Build_Dark.png" preload="false" />
+ <texture name="Parcel_BuildNo_Dark" file_name="icons/Parcel_BuildNo_Dark.png" preload="false" />
+ <texture name="Parcel_Damage_Dark" file_name="icons/Parcel_Damage_Dark.png" preload="false" />
+ <texture name="Parcel_DamageNo_Dark" file_name="icons/Parcel_DamageNo_Dark.png" preload="false" />
+ <texture name="Parcel_Evry_Dark" file_name="icons/Parcel_Evry_Dark.png" preload="false" />
+ <texture name="Parcel_Exp_Dark" file_name="icons/Parcel_Exp_Dark.png" preload="false" />
+ <texture name="Parcel_Fly_Dark" file_name="icons/Parcel_Fly_Dark.png" preload="false" />
+ <texture name="Parcel_FlyNo_Dark" file_name="icons/Parcel_FlyNo_Dark.png" preload="false" />
+ <texture name="Parcel_ForSale_Dark" file_name="icons/Parcel_ForSale_Dark.png" preload="false" />
+ <texture name="Parcel_ForSaleNo_Dark" file_name="icons/Parcel_ForSaleNo_Dark.png" preload="false" />
+ <texture name="Parcel_M_Dark" file_name="icons/Parcel_M_Dark.png" preload="false" />
+ <texture name="Parcel_PG_Dark" file_name="icons/Parcel_PG_Dark.png" preload="false" />
+ <texture name="Parcel_Push_Dark" file_name="icons/Parcel_Push_Dark.png" preload="false" />
+ <texture name="Parcel_PushNo_Dark" file_name="icons/Parcel_PushNo_Dark.png" preload="false" />
+ <texture name="Parcel_R_Dark" file_name="icons/Parcel_R_Dark.png" preload="false" />
+ <texture name="Parcel_Scripts_Dark" file_name="icons/Parcel_Scripts_Dark.png" preload="false" />
+ <texture name="Parcel_ScriptsNo_Dark" file_name="icons/Parcel_ScriptsNo_Dark.png" preload="false" />
+ <texture name="Parcel_Voice_Dark" file_name="icons/Parcel_Voice_Dark.png" preload="false" />
+ <texture name="Parcel_VoiceNo_Dark" file_name="icons/Parcel_VoiceNo_Dark.png" preload="false" />
+
+ <texture name="Parcel_Build_Light" file_name="icons/Parcel_Build_Light.png" preload="false" />
+ <texture name="Parcel_BuildNo_Light" file_name="icons/Parcel_BuildNo_Light.png" preload="false" />
+ <texture name="Parcel_Damage_Light" file_name="icons/Parcel_Damage_Light.png" preload="false" />
+ <texture name="Parcel_DamageNo_Light" file_name="icons/Parcel_DamageNo_Light.png" preload="false" />
+ <texture name="Parcel_Evry_Light" file_name="icons/Parcel_Evry_Light.png" preload="false" />
+ <texture name="Parcel_Exp_Light" file_name="icons/Parcel_Exp_Light.png" preload="false" />
+ <texture name="Parcel_Fly_Light" file_name="icons/Parcel_Fly_Light.png" preload="false" />
+ <texture name="Parcel_FlyNo_Light" file_name="icons/Parcel_FlyNo_Light.png" preload="false" />
+ <texture name="Parcel_ForSale_Light" file_name="icons/Parcel_ForSale_Light.png" preload="false" />
+ <texture name="Parcel_ForSaleNo_Light" file_name="icons/Parcel_ForSaleNo_Light.png" preload="false" />
+ <texture name="Parcel_M_Light" file_name="icons/Parcel_M_Light.png" preload="false" />
+ <texture name="Parcel_PG_Light" file_name="icons/Parcel_PG_Light.png" preload="false" />
+ <texture name="Parcel_Push_Light" file_name="icons/Parcel_Push_Light.png" preload="false" />
+ <texture name="Parcel_PushNo_Light" file_name="icons/Parcel_PushNo_Light.png" preload="false" />
+ <texture name="Parcel_R_Light" file_name="icons/Parcel_R_Light.png" preload="false" />
+ <texture name="Parcel_Scripts_Light" file_name="icons/Parcel_Scripts_Light.png" preload="false" />
+ <texture name="Parcel_ScriptsNo_Light" file_name="icons/Parcel_ScriptsNo_Light.png" preload="false" />
+ <texture name="Parcel_Voice_Light" file_name="icons/Parcel_Voice_Light.png" preload="false" />
+ <texture name="Parcel_VoiceNo_Light" file_name="icons/Parcel_VoiceNo_Light.png" preload="false" />
<texture name="Pause_Off" file_name="icons/Pause_Off.png" preload="false" />
<texture name="Pause_Over" file_name="icons/Pause_Over.png" preload="false" />
@@ -481,6 +483,7 @@ with the same filename but different name
<texture name="SliderThumb_Off" file_name="widgets/SliderThumb_Off.png" />
<texture name="SliderThumb_Disabled" file_name="widgets/SliderThumb_Disabled.png" />
<texture name="SliderThumb_Press" file_name="widgets/SliderThumb_Press.png" />
+ <texture name="SL_Logo" file_name="map_infohub.tga" />
<texture name="Snapshot_Off" file_name="bottomtray/Snapshot_Off.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" />
<texture name="Snapshot_Over" file_name="bottomtray/Snapshot_Over.png" preload="false" />
diff --git a/indra/newview/skins/default/xui/en/floater_aaa.xml b/indra/newview/skins/default/xui/en/floater_aaa.xml
index 6ecdd76573..f89ad2f997 100644
--- a/indra/newview/skins/default/xui/en/floater_aaa.xml
+++ b/indra/newview/skins/default/xui/en/floater_aaa.xml
@@ -17,6 +17,7 @@
save_visibility="true"
single_instance="true"
width="320">
+ <string name="nudge_parabuild">Nudge 1</string>
<chat_history
allow_html="true"
bg_readonly_color="ChatHistoryBgColor"
diff --git a/indra/newview/skins/default/xui/en/floater_lagmeter.xml b/indra/newview/skins/default/xui/en/floater_lagmeter.xml
index 19f5155f88..b24c745bdd 100644
--- a/indra/newview/skins/default/xui/en/floater_lagmeter.xml
+++ b/indra/newview/skins/default/xui/en/floater_lagmeter.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
legacy_header_height="18"
- height="150"
+ height="170"
layout="topleft"
name="floater_lagmeter"
help_topic="floater_lagmeter"
@@ -328,7 +328,7 @@
left="10"
name="minimize"
tool_tip="Toggle floater size"
- top_delta="4"
+ top_delta="24"
width="40">
<button.commit_callback
function="LagMeter.ClickShrink" />
diff --git a/indra/newview/skins/default/xui/en/floater_search.xml b/indra/newview/skins/default/xui/en/floater_search.xml
index d363452204..82e4d87b28 100644
--- a/indra/newview/skins/default/xui/en/floater_search.xml
+++ b/indra/newview/skins/default/xui/en/floater_search.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
- legacy_header_height="18"
+ legacy_header_height="13"
can_resize="true"
- height="512"
+ height="646"
layout="topleft"
min_height="140"
min_width="467"
@@ -11,10 +11,10 @@
save_rect="true"
single_instance="true"
title="FIND"
- width="620">
+ width="670">
<floater.string
name="search_url">
- http://eniac21.lindenlab.com:10001/viewer
+ http://int.searchwww-phx0.damballah.lindenlab.com/viewer
</floater.string>
<floater.string
name="loading_text">
@@ -25,21 +25,20 @@
Done
</floater.string>
<layout_stack
- bottom="512"
+ bottom="641"
follows="left|right|top|bottom"
layout="topleft"
left="10"
name="stack1"
top="20"
- width="600">
+ width="650">
<layout_panel
- height="12"
layout="topleft"
left_delta="0"
- name="external_controls"
top_delta="0"
+ name="browser_layout"
user_resize="false"
- width="570">
+ width="650">
<web_browser
bottom="-10"
follows="left|right|top|bottom"
@@ -48,7 +47,8 @@
name="browser"
top="0"
start_url="data:text/html,%3Chtml%3E%3Cbody bgcolor=%22#2A2A2A%22%3E%3C/body%3E%3C/html%3E"
- width="570" />
+ height="600"
+ width="650" />
<text
follows="bottom|left"
height="16"
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 af4fdff044..6050aede79 100644
--- a/indra/newview/skins/default/xui/en/floater_select_key.xml
+++ b/indra/newview/skins/default/xui/en/floater_select_key.xml
@@ -4,30 +4,31 @@
border="false"
can_close="false"
can_minimize="false"
- height="100"
+ height="90"
layout="topleft"
name="modal container"
width="240">
- <button
- height="20"
- label="Cancel"
- label_selected="Cancel"
- layout="topleft"
- left="138"
- name="Cancel"
- top="70"
- width="82" />
<text
type="string"
+ halign="center"
length="1"
follows="left|top"
- font="SansSerif"
- height="16"
+ height="30"
layout="topleft"
- left="20"
+ left="10"
name="Save item as:"
- top="10"
- width="200">
- Press a key to select
+ top="25"
+ word_wrap="true"
+ width="220">
+ Press a key to set your
+Speak button toggle
</text>
+ <button
+ height="23"
+ label="Cancel"
+ label_selected="Cancel"
+ layout="topleft"
+ right="-10"
+ name="Cancel"
+ width="100" />
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_sell_land.xml b/indra/newview/skins/default/xui/en/floater_sell_land.xml
index e6a78563f3..409f46b960 100644
--- a/indra/newview/skins/default/xui/en/floater_sell_land.xml
+++ b/indra/newview/skins/default/xui/en/floater_sell_land.xml
@@ -182,7 +182,7 @@
width="130">
<combo_box.item
enabled="false"
- label="-- select one --"
+ label="- Select one -"
name="--selectone--"
value="select" />
<combo_box.item
diff --git a/indra/newview/skins/default/xui/en/floater_sys_well.xml b/indra/newview/skins/default/xui/en/floater_sys_well.xml
index be6d63716c..3fc57372de 100644
--- a/indra/newview/skins/default/xui/en/floater_sys_well.xml
+++ b/indra/newview/skins/default/xui/en/floater_sys_well.xml
@@ -6,20 +6,30 @@
top="0"
follows="right|bottom"
layout="topleft"
- name="notification_chiclet"
+ name="sys_well_window"
help_topic="notification_chiclet"
save_rect="true"
title="NOTIFICATIONS"
width="320"
min_width="320"
height="23"
- can_minimize="true"
+ can_minimize="false"
can_tear_off="false"
can_resize="true"
can_drag_on_left="false"
- can_close="false"
can_dock="true"
+ save_visibility="true"
+ single_instance="true"
>
+ <string
+ name="title_im_well_window">
+ IM SESSIONS
+ </string>
+ <string
+ name="title_notification_well_window">
+ NOTIFICATIONS
+ </string>
+
<flat_list_view
color="FloaterDefaultBackgroundColor"
follows="all"
diff --git a/indra/newview/skins/default/xui/en/floater_telehub.xml b/indra/newview/skins/default/xui/en/floater_telehub.xml
index 374f014908..bb463edd4d 100644
--- a/indra/newview/skins/default/xui/en/floater_telehub.xml
+++ b/indra/newview/skins/default/xui/en/floater_telehub.xml
@@ -6,7 +6,7 @@
name="telehub"
help_topic="telehub"
title="TELEHUB"
- width="280">
+ width="330">
<text
type="string"
length="1"
@@ -16,7 +16,7 @@
left="10"
name="status_text_connected"
top="24"
- width="200">
+ width="315">
Telehub connected to object [OBJECT]
</text>
<text
@@ -28,7 +28,7 @@
left_delta="0"
name="status_text_not_connected"
top_delta="0"
- width="200">
+ width="315">
No telehub connected.
</text>
<text
@@ -40,7 +40,7 @@
left_delta="0"
name="help_text_connected"
top_delta="16"
- width="260">
+ width="315">
To remove, click Disconnect.
</text>
<text
@@ -52,78 +52,73 @@
left_delta="0"
name="help_text_not_connected"
top_delta="0"
- width="260">
+ width="315">
Select object and click Connect Telehub.
</text>
<button
follows="top|left"
- height="20"
+ height="23"
label="Connect Telehub"
layout="topleft"
left_delta="0"
name="connect_btn"
top_delta="20"
- width="110" />
+ width="130" />
<button
follows="top|left"
- height="20"
+ height="23"
label="Disconnect"
layout="topleft"
left_pad="10"
name="disconnect_btn"
top_delta="0"
- width="110" />
+ width="130" />
<text
type="string"
length="1"
follows="left|top"
- height="16"
+ height="14"
layout="topleft"
left="10"
name="spawn_points_text"
top="84"
- width="200">
+ width="315">
Spawn Points (positions, not objects):
</text>
<scroll_list
follows="left|top"
height="60"
layout="topleft"
- left_delta="0"
name="spawn_points_list"
- top_delta="16"
- width="230" />
+ width="315" />
<button
follows="top|left"
- height="20"
+ height="23"
label="Add Spawn"
layout="topleft"
- left_delta="0"
name="add_spawn_point_btn"
- top_pad="5"
- width="110" />
+ width="130" />
<button
follows="top|left"
- height="20"
+ height="23"
label="Remove Spawn"
layout="topleft"
left_pad="10"
name="remove_spawn_point_btn"
- top_delta="0"
- width="110" />
+ width="130" />
<text
type="string"
length="1"
follows="top|left"
- height="80"
+ height="56"
layout="topleft"
left="10"
name="spawn_point_help"
- top="190"
- width="260">
- Select object and click Add to specify position.
-You may then move or delete the object.
+ word_wrap="true"
+ width="317">
+ Select object and click "Add Spawn" to specify position.
+You can then move or delete the object.
Positions are relative to the telehub center.
-Select item in list to show position in world.
+Select an item in list to highlight it inworld.
</text>
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_test_text_editor.xml b/indra/newview/skins/default/xui/en/floater_test_text_editor.xml
index b0aa5c7c4f..8be0c28c5c 100644
--- a/indra/newview/skins/default/xui/en/floater_test_text_editor.xml
+++ b/indra/newview/skins/default/xui/en/floater_test_text_editor.xml
@@ -9,7 +9,6 @@
<text_editor
height="50"
follows="top|left|bottom"
- layout="topleft"
left="10"
name="test_text_editor"
tool_tip="text editor"
@@ -17,4 +16,15 @@
width="200">
Text Editor
</text_editor>
+ <text_editor
+ height="50"
+ follows="top|left|bottom"
+ font="SansSerif"
+ left="10"
+ name="test_text_editor"
+ tool_tip="text editor"
+ top_pad="10"
+ width="200">
+ This contains long text and should scroll horizontally to the right
+ </text_editor>
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_top_objects.xml b/indra/newview/skins/default/xui/en/floater_top_objects.xml
index d2db26daec..68bb500c78 100644
--- a/indra/newview/skins/default/xui/en/floater_top_objects.xml
+++ b/indra/newview/skins/default/xui/en/floater_top_objects.xml
@@ -8,7 +8,7 @@
min_width="450"
name="top_objects"
help_topic="top_objects"
- title="LOADING..."
+ title="Top Objects"
width="550">
<floater.string
name="top_scripts_title">
@@ -46,24 +46,24 @@
type="string"
length="1"
follows="left|top"
- font="SansSerif"
height="20"
layout="topleft"
left="10"
name="title_text"
- top="30"
+ top="20"
+ text_color="EmphasisColor"
width="400">
Loading...
</text>
<scroll_list
draw_heading="true"
- follows="left|top|bottom|right"
- height="150"
+ follows="all"
+ height="170"
layout="topleft"
left_delta="0"
multi_select="true"
name="objects_list"
- top_delta="20"
+ top_delta="17"
width="530">
<scroll_list.columns
label="Score"
@@ -109,16 +109,16 @@
follows="left|bottom|right"
height="20"
layout="topleft"
- left_delta="70"
+ left_pad="3"
name="id_editor"
top_delta="-3"
- width="350" />
+ width="325" />
<button
follows="bottom|right"
- height="20"
+ height="23"
label="Show Beacon"
layout="topleft"
- left_pad="10"
+ left_pad="5"
name="show_beacon_btn"
top_delta="0"
width="100">
@@ -132,25 +132,25 @@
height="20"
layout="topleft"
left="10"
+ top_pad="5"
name="obj_name_text"
- top="237"
width="100">
- Object Name:
+ Object name:
</text>
<line_editor
follows="left|bottom|right"
height="20"
layout="topleft"
- left_delta="70"
+ left_pad="3"
name="object_name_editor"
top_delta="-3"
- width="350" />
+ width="325" />
<button
follows="bottom|right"
- height="20"
+ height="23"
label="Filter"
layout="topleft"
- left_pad="10"
+ left_pad="5"
name="filter_object_btn"
top_delta="0"
width="100">
@@ -164,25 +164,25 @@
height="20"
layout="topleft"
left="10"
+ top_pad="5"
name="owner_name_text"
- top="264"
width="100">
- Owner Name:
+ Owner:
</text>
<line_editor
follows="left|bottom|right"
height="20"
layout="topleft"
- left_delta="70"
+ left_pad="3"
name="owner_name_editor"
top_delta="-3"
- width="350" />
+ width="325" />
<button
follows="bottom|right"
- height="20"
+ height="23"
label="Filter"
layout="topleft"
- left_pad="10"
+ left_pad="5"
name="filter_owner_btn"
top_delta="0"
width="100">
@@ -190,20 +190,32 @@
function="TopObjects.GetByOwnerName" />
</button>
<button
+ follows="top|left"
+ height="22"
+ image_overlay="Refresh_Off"
+ layout="topleft"
+ name="refresh_btn"
+ right="-8"
+ top_pad="5"
+ width="23">
+ <button.commit_callback
+ function="TopObjects.Refresh" />
+ </button>
+ <button
follows="bottom|left"
- height="20"
+ height="23"
label="Return Selected"
layout="topleft"
- left="10"
+ left="112"
+ top_delta="0"
name="return_selected_btn"
- top="295"
width="130">
<button.commit_callback
function="TopObjects.ReturnSelected" />
</button>
<button
follows="bottom|left"
- height="20"
+ height="23"
label="Return All"
layout="topleft"
left_pad="10"
@@ -215,19 +227,19 @@
</button>
<button
follows="bottom|left"
- height="20"
+ height="23"
label="Disable Selected"
layout="topleft"
- left="10"
+
+ left="112"
name="disable_selected_btn"
- top="320"
width="130">
<button.commit_callback
function="TopObjects.DisableSelected" />
</button>
<button
follows="bottom|left"
- height="20"
+ height="23"
label="Disable All"
layout="topleft"
left_pad="10"
@@ -237,16 +249,4 @@
<button.commit_callback
function="TopObjects.DisableAll" />
</button>
- <button
- bottom="315"
- follows="bottom|right"
- height="20"
- label="Refresh"
- layout="topleft"
- name="refresh_btn"
- right="-10"
- width="100">
- <button.commit_callback
- function="TopObjects.Refresh" />
- </button>
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_water.xml b/indra/newview/skins/default/xui/en/floater_water.xml
index b13a11c05d..89492d8abc 100644
--- a/indra/newview/skins/default/xui/en/floater_water.xml
+++ b/indra/newview/skins/default/xui/en/floater_water.xml
@@ -116,7 +116,7 @@
layout="topleft"
left="10"
name="WaterFogDensText"
- top="74"
+ top="84"
width="200">
Fog Density Exponent
</text>
@@ -130,7 +130,7 @@
left="24"
max_val="10"
name="WaterFogDensity"
- top="110"
+ top="124"
width="200" />
<text
type="string"
@@ -141,7 +141,7 @@
layout="topleft"
left_delta="-14"
name="WaterUnderWaterFogModText"
- top_delta="4"
+ top="124"
width="200">
Underwater Fog Modifier
</text>
@@ -155,7 +155,7 @@
left="24"
max_val="2"
name="WaterUnderWaterFogMod"
- top="150"
+ top="164"
width="200" />
<text
type="string"
@@ -180,7 +180,7 @@
layout="topleft"
max_val="10"
name="WaterNormalScaleX"
- top_pad="20"
+ top_pad="24"
width="200" />
<slider
control_name="WaterNormalScaleY"
@@ -192,7 +192,7 @@
layout="topleft"
max_val="10"
name="WaterNormalScaleY"
- top_pad="0"
+ top_pad="4"
width="200" />
<slider
control_name="WaterNormalScaleZ"
@@ -204,7 +204,7 @@
layout="topleft"
max_val="10"
name="WaterNormalScaleZ"
- top_pad="0"
+ top_pad="4"
width="200" />
<text
type="string"
@@ -214,7 +214,7 @@
height="16"
layout="topleft"
name="HDText"
- top_pad="-10"
+ top="84"
width="200">
Fresnel Scale
</text>
@@ -227,7 +227,7 @@
initial_value="0.7"
layout="topleft"
name="WaterFresnelScale"
- top_pad="20"
+ top="124"
width="200" />
<text
type="string"
@@ -237,7 +237,7 @@
height="16"
layout="topleft"
name="FresnelOffsetText"
- top_pad="-10"
+ top="124"
width="200">
Fresnel Offset
</text>
@@ -250,7 +250,7 @@
initial_value="0.7"
layout="topleft"
name="WaterFresnelOffset"
- top_pad="20"
+ top="164"
width="200" />
<text
type="string"
@@ -275,7 +275,7 @@
layout="topleft"
left="494"
name="WaterScaleAbove"
- top="40"
+ top="44"
width="200" />
<text
type="string"
@@ -286,7 +286,7 @@
layout="topleft"
left_delta="-14"
name="WaterScaleBelowText"
- top_delta="-3"
+ top="44"
width="200">
Refract Scale Below
</text>
@@ -300,7 +300,7 @@
layout="topleft"
left="494"
name="WaterScaleBelow"
- top="73"
+ top="84"
width="200" />
<text
type="string"
@@ -311,7 +311,7 @@
layout="topleft"
left_delta="-14"
name="MaxAltText"
- top_delta="-2"
+ top="84"
width="200">
Blur Multiplier
</text>
@@ -325,7 +325,7 @@
left="494"
max_val="0.16"
name="WaterBlurMult"
- top="107"
+ top="124"
width="200" />
</panel>
<panel
diff --git a/indra/newview/skins/default/xui/en/floater_world_map.xml b/indra/newview/skins/default/xui/en/floater_world_map.xml
index 9c11a88c34..e632b67d11 100644
--- a/indra/newview/skins/default/xui/en/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/en/floater_world_map.xml
@@ -62,7 +62,7 @@
left="4"
layout="topleft"
name="Show My Location"
- tool_tip="Center map on your avatar&apos;s location"
+ tool_tip="Center map on my avatar&apos;s location"
top="6"
width="24" >
<button.commit_callback
@@ -235,7 +235,7 @@
left="136"
top="6"
name="Go Home"
- tool_tip="Teleport home"
+ tool_tip="Teleport to my home location"
width="24" >
<button.commit_callback
function="WMap.GoHome" />
diff --git a/indra/newview/skins/default/xui/en/inspect_remote_object.xml b/indra/newview/skins/default/xui/en/inspect_remote_object.xml
index b5f2abf52a..ef3dd844cd 100644
--- a/indra/newview/skins/default/xui/en/inspect_remote_object.xml
+++ b/indra/newview/skins/default/xui/en/inspect_remote_object.xml
@@ -6,10 +6,10 @@
<floater
legacy_header_height="18"
bevel_style="in"
- bg_opaque_image="Inspector_Background"
+ bg_opaque_image="Inspector_Background"
can_close="false"
can_minimize="false"
- height="145"
+ height="130"
layout="topleft"
name="inspect_remote_object"
single_instance="true"
@@ -18,79 +18,78 @@
width="300">
<text
follows="all"
- font="SansSerifLargeBold"
- height="16"
+ font="SansSerifLarge"
+ font_style="BOLD"
+ height="30"
left="8"
name="object_name"
text_color="White"
top="5"
use_ellipses="true"
- width="290">
- Test Object Name That Is Really Long
+ word_wrap="true"
+ width="291">
+ Test Object Name That Is Really Long OMG so long I can't believe how long the name of this object is, I mean really.
</text>
<text
- follows="all"
- font="SansSerif"
- height="20"
+ follows="top|left"
+ font="SansSerifSmall"
+ height="16"
left="8"
name="object_owner_label"
width="55"
- top_pad="20">
+ top_pad="12">
Owner:
</text>
<text
follows="top|left"
- font="SansSerif"
- height="20"
- left_pad="10"
+ height="16"
+ left_pad="5"
name="object_owner"
use_ellipses="true"
- width="200"
+ width="230"
word_wrap="false">
Longavatarname Johnsonlongstonnammer
</text>
- <text
+ <!--<text
follows="top|left"
- font="SansSerif"
- height="20"
+ height="16"
left="8"
name="object_slurl_label"
- top_pad="10"
+ top_pad="5"
width="55">
Location:
- </text>
+ </text>-->
<text
follows="top|left"
- height="20"
- left_pad="10"
+ height="16"
+ left="8"
name="object_slurl"
- width="240"
+ width="290"
use_ellipses="true"
word_wrap="false">
http://slurl.com/Ahern/50/50/50
</text>
<button
follows="top|left"
- height="20"
+ height="23"
label="Map"
- left="10"
+ left="8"
+ top_pad="8"
name="map_btn"
- top="114"
- width="75" />
+ width="90" />
<button
follows="top|left"
- height="20"
+ height="23"
label="Block"
- left_pad="5"
+ left_pad="8"
name="block_btn"
- top_delta="0"
- width="75" />
+ width="90" />
<button
follows="top|left"
- height="20"
+ height="23"
label="Close"
- right="-10"
+ right="-8"
name="close_btn"
- top_delta="0"
- width="75" />
+ left_pad="5"
+ width="90" />
</floater>
diff --git a/indra/newview/skins/default/xui/en/main_view.xml b/indra/newview/skins/default/xui/en/main_view.xml
index a11ebf5af8..65a545d2ed 100644
--- a/indra/newview/skins/default/xui/en/main_view.xml
+++ b/indra/newview/skins/default/xui/en/main_view.xml
@@ -19,6 +19,7 @@
mouse_opaque="false"
name="nav_bar_container"
width="1024"
+ user_resize="false"
visible="false">
</layout_panel>
<layout_panel auto_resize="true"
@@ -43,7 +44,7 @@
layout="topleft"
mouse_opaque="false"
name="non_side_tray_view"
- user_resize="true"
+ user_resize="false"
width="500">
<view bottom="500"
follows="all"
diff --git a/indra/newview/skins/default/xui/en/menu_avatar_icon.xml b/indra/newview/skins/default/xui/en/menu_avatar_icon.xml
index df510d68eb..50910dff32 100644
--- a/indra/newview/skins/default/xui/en/menu_avatar_icon.xml
+++ b/indra/newview/skins/default/xui/en/menu_avatar_icon.xml
@@ -9,7 +9,7 @@
visible="false"
width="128">
<menu_item_call
- label="Show Profile..."
+ label="View Profile"
layout="topleft"
name="Show Profile">
<menu_item_call.on_click
diff --git a/indra/newview/skins/default/xui/en/menu_imchiclet_p2p.xml b/indra/newview/skins/default/xui/en/menu_imchiclet_p2p.xml
index 6891aaca32..038b8328cb 100644
--- a/indra/newview/skins/default/xui/en/menu_imchiclet_p2p.xml
+++ b/indra/newview/skins/default/xui/en/menu_imchiclet_p2p.xml
@@ -9,7 +9,7 @@
visible="false"
width="128">
<menu_item_call
- label="Show Profile"
+ label="View Profile"
layout="topleft"
name="Show Profile">
<menu_item_call.on_click
diff --git a/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml b/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml
index 435a3e6d34..4e6a07d020 100644
--- a/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml
@@ -76,7 +76,9 @@
function="Inventory.GearDefault.Custom.Action"
parameter="empty_lostnfound" />
</menu_item_call>
- <menu_item_call
+ <menu_item_separator
+ layout="topleft" />
+ <menu_item_call
label="Save Texture As"
layout="topleft"
name="Save Texture As">
@@ -87,4 +89,26 @@
function="Inventory.GearDefault.Enable"
parameter="save_texture" />
</menu_item_call>
+ <menu_item_call
+ label="Find Original"
+ layout="topleft"
+ name="Find Original">
+ <on_click
+ function="Inventory.GearDefault.Custom.Action"
+ parameter="find_original" />
+ <on_enable
+ function="Inventory.GearDefault.Enable"
+ parameter="find_original" />
+ </menu_item_call>
+ <menu_item_call
+ label="Find All Links"
+ layout="topleft"
+ name="Find All Links">
+ <on_click
+ function="Inventory.GearDefault.Custom.Action"
+ parameter="find_links" />
+ <on_enable
+ function="Inventory.GearDefault.Enable"
+ parameter="find_links" />
+ </menu_item_call>
</menu>
diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml
index a22dc80f4e..9b439c16e0 100644
--- a/indra/newview/skins/default/xui/en/menu_login.xml
+++ b/indra/newview/skins/default/xui/en/menu_login.xml
@@ -45,8 +45,7 @@
name="Second Life Help"
shortcut="F1">
<menu_item_call.on_click
- function="ShowFloater"
- parameter="help f1" />
+ function="ShowHelp" />
</menu_item_call>
<menu_item_separator />
<menu_item_call
diff --git a/indra/newview/skins/default/xui/en/menu_navbar.xml b/indra/newview/skins/default/xui/en/menu_navbar.xml
index e17eeb46f6..b71b866c4b 100644
--- a/indra/newview/skins/default/xui/en/menu_navbar.xml
+++ b/indra/newview/skins/default/xui/en/menu_navbar.xml
@@ -27,6 +27,8 @@
<menu_item_check.on_check
control="NavBarShowParcelProperties" />
</menu_item_check>
+ <menu_item_separator
+ name="Separator" />
<!-- Label of 'Landmark' item is changing in runtime,
see AddLandmarkNavBarMenu/EditLandmarkNavBarMenu in strings.xml -->
<menu_item_call
diff --git a/indra/newview/skins/default/xui/en/menu_participant_list.xml b/indra/newview/skins/default/xui/en/menu_participant_list.xml
index c3283c6014..5ab327a182 100644
--- a/indra/newview/skins/default/xui/en/menu_participant_list.xml
+++ b/indra/newview/skins/default/xui/en/menu_participant_list.xml
@@ -2,6 +2,67 @@
<context_menu
layout="topleft"
name="Participant List Context Menu">
+ <menu_item_call
+ label="View Profile"
+ layout="topleft"
+ name="View Profile">
+ <menu_item_call.on_click
+ function="Avatar.Profile" />
+ </menu_item_call>
+ <menu_item_call
+ label="Add Friend"
+ layout="topleft"
+ name="Add Friend">
+ <menu_item_call.on_click
+ function="Avatar.AddFriend" />
+ <menu_item_call.on_enable
+ function="Avatar.EnableItem"
+ parameter="can_add" />
+ </menu_item_call>
+ <menu_item_call
+ label="IM"
+ layout="topleft"
+ name="IM">
+ <menu_item_call.on_click
+ function="Avatar.IM" />
+ </menu_item_call>
+ <menu_item_call
+ label="Call"
+ layout="topleft"
+ name="Call">
+ <menu_item_call.on_click
+ function="Avatar.Call" />
+ </menu_item_call>
+ <menu_item_call
+ enabled="false"
+ label="Share"
+ layout="topleft"
+ name="Share">
+ <menu_item_call.on_click
+ function="Avatar.Share" />
+ </menu_item_call>
+ <menu_item_call
+ label="Pay"
+ layout="topleft"
+ name="Pay">
+ <menu_item_call.on_click
+ function="Avatar.Pay" />
+ </menu_item_call>
+ <menu_item_check
+ label="Block/Unblock"
+ layout="topleft"
+ name="Block/Unblock">
+ <menu_item_check.on_click
+ function="Avatar.BlockUnblock" />
+ <menu_item_check.on_check
+ function="Avatar.CheckItem"
+ parameter="is_blocked" />
+ <menu_item_check.on_enable
+ function="Avatar.EnableItem"
+ parameter="can_block" />
+ </menu_item_check>
+ <menu_item_separator
+ layout="topleft" />
<menu_item_check
label="Mute Text"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby.xml b/indra/newview/skins/default/xui/en/menu_people_nearby.xml
index 643336cf6c..c3a2540b2e 100644
--- a/indra/newview/skins/default/xui/en/menu_people_nearby.xml
+++ b/indra/newview/skins/default/xui/en/menu_people_nearby.xml
@@ -27,7 +27,6 @@
function="Avatar.IM" />
</menu_item_call>
<menu_item_call
- enabled="false"
label="Call"
layout="topleft"
name="Call">
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index ae8a1599a9..861b0de2cf 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -68,7 +68,7 @@
parameter="inventory" />
</menu_item_check>
<menu_item_call
- label="Show Sidetray Inventory"
+ label="Show Inventory in Side Tray"
name="ShowSidetrayInventory"
shortcut="control|I"
visible="false">
@@ -433,6 +433,8 @@
</menu_item_check>
<menu_item_separator
layout="topleft" />-->
+ <menu_item_separator
+ layout="topleft" />
<menu_item_call
label="Snapshot"
layout="topleft"
@@ -442,6 +444,8 @@
function="Floater.Show"
parameter="snapshot" />
</menu_item_call>
+ <menu_item_separator
+ layout="topleft" />
<menu
create_jump_keys="true"
label="Sun"
@@ -1060,8 +1064,7 @@
name="Second Life Help"
shortcut="F1">
<menu_item_call.on_click
- function="ShowFloater"
- parameter="help f1" />
+ function="ShowHelp" />
</menu_item_call>
<menu_item_call
label="Tutorial"
@@ -1081,6 +1084,14 @@
function="ShowFloater"
parameter="complaint reporter" />
</menu_item_call>
+ <menu_item_call
+ label="Report Bug"
+ layout="topleft"
+ name="Report Bug">
+ <menu_item_call.on_click
+ function="ShowHelp"
+ parameter="report_bug" />
+ </menu_item_call>
<menu_item_separator
layout="topleft" />
<menu_item_call
@@ -3268,6 +3279,17 @@
</menu>
<menu_item_separator
layout="topleft" />
+ <menu_item_check
+ label="HTTP Textures"
+ layout="topleft"
+ name="HTTP Textures">
+ <menu_item_check.on_check
+ function="CheckControl"
+ parameter="ImagePipelineUseHTTP" />
+ <menu_item_check.on_click
+ function="ToggleControl"
+ parameter="ImagePipelineUseHTTP" />
+ </menu_item_check>
<menu_item_call
label="Compress Images"
layout="topleft"
@@ -3404,7 +3426,7 @@
name="Parcel"
tear_off="true">
<menu_item_call
- label="Owner To Me"
+ label="Force Owner To Me"
layout="topleft"
name="Owner To Me">
<menu_item_call.on_click
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index d8eb65322b..f659062cfe 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -4499,14 +4499,14 @@ You don&apos;t have permission to copy this.
<notification
icon="notifytip.tga"
name="InventoryAccepted"
- type="notifytip">
+ type="offer">
[NAME] received your inventory offer.
</notification>
<notification
icon="notifytip.tga"
name="InventoryDeclined"
- type="notifytip">
+ type="offer">
[NAME] declined your inventory offer.
</notification>
@@ -5128,6 +5128,13 @@ An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you [O
text="Decline"/>
</form>
</notification>
+
+ <notification
+ icon="notify.tga"
+ name="FriendshipOffered"
+ type="offer">
+ You have offered friendship to [TO_NAME]
+ </notification>
<notification
icon="notify.tga"
diff --git a/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml b/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml
index 3842c2a8db..970a2e6a8a 100644
--- a/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml
+++ b/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml
@@ -8,31 +8,31 @@
min_height="350"
min_width="240"
width="280">
- <text
+ <button
+ follows="top|left"
+ height="25"
+ image_overlay="BackArrow_Off"
+ layout="topleft"
+ name="back"
+ left="10"
+ tab_stop="false"
+ top="0"
+ width="25"/>
+ <text
follows="top|left|right"
- font="SansSerifHugeBold"
+ font="SansSerifLargeBold"
height="20"
layout="topleft"
- left="10"
+ left_pad="10"
name="title_text"
text_color="white"
- top="0"
+ top="5"
width="250">
Blocked List
</text>
- <button
- follows="top|right"
- height="25"
- image_overlay="BackArrow_Off"
- layout="topleft"
- name="back"
- right="-9"
- tab_stop="false"
- top="0"
- width="25"/>
<scroll_list
- follows="left|top|right|bottom"
- height="200"
+ follows="all"
+ height="190"
layout="topleft"
left="5"
name="blocked"
@@ -41,9 +41,8 @@
width="270" />
<button
follows="left|bottom"
- height="20"
- label="Block Resident..."
- label_selected="Block Resident..."
+ height="23"
+ label="Block person"
layout="topleft"
left_delta="0"
name="Block resident..."
@@ -55,9 +54,8 @@
</button>
<button
follows="left|bottom"
- height="20"
- label="Block object by name..."
- label_selected="Block object by name..."
+ height="23"
+ label="Block object by name"
layout="topleft"
left_delta="0"
name="Block object by name..."
@@ -70,9 +68,8 @@
<button
enabled="false"
follows="left|bottom"
- height="20"
+ height="23"
label="Unblock"
- label_selected="Unblock"
layout="topleft"
left_delta="0"
name="Unblock"
diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
index ec3f7ea7c5..7f847237ce 100644
--- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml
+++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
@@ -319,38 +319,82 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly.
layout="topleft"
min_height="28"
top="0"
- name="sys_well_panel"
- width="54"
- min_width="54"
+ name="im_well_panel"
+ width="34"
+ min_width="34"
+ user_resize="false">
+ <chiclet_im_well
+ follows="right"
+ height="23"
+ layout="topleft"
+ left="0"
+ name="im_well"
+ top="4"
+ width="34">
+ <button
+ auto_resize="true"
+ flash_color="EmphasisColor"
+ follows="right"
+ halign="center"
+ height="23"
+ image_overlay="Notices_Unread"
+ image_overlay_alignment="center"
+ image_pressed="PushButton_Press"
+ image_pressed_selected="PushButton_Selected_Press"
+ image_selected="PushButton_Selected_Press"
+ left="0"
+ name="Unread IM messages"
+ pad_left="0"
+ pad_right="0"
+ width="34" >
+ <button.init_callback
+ function="Button.SetDockableFloaterToggle"
+ parameter="im_well_window" />
+ </button>
+ </chiclet_im_well>
+ </layout_panel>
+ <layout_panel
+ auto_resize="false"
+ follows="right"
+ height="28"
+ layout="topleft"
+ min_height="28"
+ top="0"
+ name="notification_well_panel"
+ width="34"
+ min_width="34"
user_resize="false">
<chiclet_notification
follows="right"
height="23"
layout="topleft"
left="0"
- name="sys_well"
+ name="notification_well"
top="4"
- width="54">
+ width="34">
<button
image_selected="PushButton_Selected_Press"
image_pressed="PushButton_Press"
image_pressed_selected="PushButton_Selected_Press"
auto_resize="true"
- halign="right"
+ halign="center"
height="23"
follows="right"
flash_color="EmphasisColor"
left="0"
name="Unread"
image_overlay="Notices_Unread"
- image_overlay_alignment="right"
- pad_right="6"
- pad_left="6"
- width="54"
- />
+ image_overlay_alignment="center"
+ pad_right="0"
+ pad_left="0"
+ width="34" >
+ <button.init_callback
+ function="Button.SetDockableFloaterToggle"
+ parameter="notification_well_window" />
+ </button>
</chiclet_notification>
</layout_panel>
- <icon
+ <icon
auto_resize="false"
color="0 0 0 0"
follows="left|right"
diff --git a/indra/newview/skins/default/xui/en/panel_classified.xml b/indra/newview/skins/default/xui/en/panel_classified.xml
index 9622313786..c8293d3663 100644
--- a/indra/newview/skins/default/xui/en/panel_classified.xml
+++ b/indra/newview/skins/default/xui/en/panel_classified.xml
@@ -107,7 +107,7 @@
top="48"
width="130">
<combo_box.item
- label="- Select Mature -"
+ label="- Select one -"
name="select_mature"
value="Select" />
<combo_box.item
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 a833ad97d9..bbf86089cb 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_profile.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_profile.xml
@@ -51,6 +51,10 @@
http://www.secondlife.com/account/partners.php?lang=en
</string>
<string
+ name="my_account_link_url">
+ http://secondlife.com/my
+ </string>
+ <string
name="no_partner_text"
value="None" />
<scroll_container
@@ -256,7 +260,7 @@
layout="topleft"
left="10"
name="my_account_link"
- value="Go to My Dashboard"
+ value="[[URL] Go to My Dashboard]"
width="285" />
<text
follows="left|top|right"
diff --git a/indra/newview/skins/default/xui/en/panel_friends.xml b/indra/newview/skins/default/xui/en/panel_friends.xml
index 3a35465df2..ac731bcdf0 100644
--- a/indra/newview/skins/default/xui/en/panel_friends.xml
+++ b/indra/newview/skins/default/xui/en/panel_friends.xml
@@ -8,7 +8,7 @@
width="100">
<panel.string
name="Multiple">
- Multiple friends...
+ Multiple friends
</panel.string>
<scroll_list
bottom="337"
@@ -84,7 +84,7 @@
<button
follows="top|right"
height="22"
- label="Teleport..."
+ label="Teleport"
layout="topleft"
left_delta="0"
name="offer_teleport_btn"
@@ -94,7 +94,7 @@
<button
follows="top|right"
height="22"
- label="Pay..."
+ label="Pay"
layout="topleft"
left_delta="0"
name="pay_btn"
@@ -104,7 +104,7 @@
<button
follows="top|right"
height="22"
- label="Remove..."
+ label="Remove"
layout="topleft"
left_delta="0"
name="remove_btn"
@@ -114,7 +114,7 @@
<button
follows="top|right"
height="22"
- label="Add..."
+ label="Add"
layout="topleft"
left_delta="0"
name="add_btn"
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 889f29fc53..a5445a5783 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
@@ -1,14 +1,13 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
border="false"
- follows="left|top|right|bottom"
+ follows="all"
height="238"
name="panel_im_control_panel"
width="180">
-
<avatar_list
color="DkGray2"
- follows="left|top|right|bottom"
+ follows="all"
height="100"
ignore_online_status="true"
layout="topleft"
@@ -19,20 +18,18 @@
show_profile_btn="false"
show_speaking_indicator="false"
top="10"
- width="180"/>
-
+ width="180" />
<button
bottom_pad="0"
- follows="left|right|bottom"
- height="20"
- label="Group Info"
+ follows="left|right|bottom"
+ height="23"
+ label="Group Profile"
left_delta="28"
name="group_info_btn"
- width="125"/>
-
+ width="125" />
<panel
background_visible="true"
- bg_alpha_color="0.2 0.2 0.2 1"
+ bg_alpha_color="DkGray2"
border="false"
follows="left|right|bottom"
height="70"
@@ -41,34 +38,29 @@
name="panel_call_buttons"
top_pad="0"
width="180">
-
<button
bottom="10"
- follows="all"
- height="20"
+ follows="all"
+ height="23"
label="Call Group"
left_delta="28"
name="call_btn"
- width="125"/>
-
+ width="125" />
<button
bottom="40"
- follows="all"
- height="20"
+ follows="all"
+ height="23"
label="Leave Call"
name="end_call_btn"
visible="false"
- width="125"/>
-
+ width="125" />
<button
bottom="10"
- follows="all"
- height="20"
+ follows="all"
+ height="23"
label="Open Voice Controls"
name="voice_ctrls_btn"
visible="false"
- width="125"/>
-
+ width="125" />
</panel>
-
</panel>
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 043edd10e1..e5dc4df0f8 100644
--- a/indra/newview/skins/default/xui/en/panel_group_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_general.xml
@@ -145,7 +145,7 @@ Hover your mouse over the options for more help.
layout="topleft"
left="10"
name="group_mature_check"
- tool_tip="Sets whether your group information is considered moderate"
+ tool_tip="Sets whether your group contains information rated as Moderate"
top_pad="0"
width="190">
<combo_box.item
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 0dea81eefe..1b70b95a93 100644
--- a/indra/newview/skins/default/xui/en/panel_group_notices.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_notices.xml
@@ -10,11 +10,9 @@
width="310">
<panel.string
name="help_text">
- Notices let you send a message and
-an optionally attached item. Notices only go to
-group members in Roles with the ability to
-receive Notices. You can turn off Notices on
-the General tab.
+ Notices let you send a message and an optionally attached item.
+Notices only go to group members in Roles with the ability to receive Notices.
+You can turn off Notices on the General tab.
</panel.string>
<panel.string
name="no_notices_text">
@@ -31,7 +29,7 @@ the General tab.
name="lbl2"
top="5"
width="300">
- Notices are kept for 14 days
+ Notices are kept for 14 days.
Maximum 200 per group daily
</text>
<scroll_list
@@ -93,6 +91,7 @@ Maximum 200 per group daily
layout="topleft"
name="refresh_notices"
right="-5"
+ tool_tip="Refresh list of notices"
top_delta="0"
width="23" />
<panel
@@ -192,7 +191,7 @@ Maximum 200 per group daily
top_pad="15"
word_wrap="true"
width="150">
- Drag here to attach something -- >
+ Drag and drop item here to attach it:
</text>
<icon
height="72"
@@ -228,7 +227,7 @@ Maximum 200 per group daily
left="10"
layout="topleft"
name="drop_target"
- tool_tip="Drag an inventory item onto the message box to send it with the notice. You must have permission to copy and transfer the object to send it with the notice."
+ tool_tip="Drag an inventory item onto this target box to send it with this notice. You must have permission to copy and transfer the item in order to attach it."
width="280" />
</panel>
<panel
diff --git a/indra/newview/skins/default/xui/en/panel_group_roles.xml b/indra/newview/skins/default/xui/en/panel_group_roles.xml
index 5bae5c2711..9548119d58 100644
--- a/indra/newview/skins/default/xui/en/panel_group_roles.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_roles.xml
@@ -258,7 +258,7 @@ things in this group. There&apos;s a broad variety of Abilities.
name="static"
top_pad="5"
width="300">
- Assigned Roles
+ Assigned Members
</text>
<scroll_list
draw_stripes="true"
@@ -367,7 +367,7 @@ things in this group. There&apos;s a broad variety of Abilities.
<text_editor
type="string"
halign="left"
- height="50"
+ height="35"
layout="topleft"
left="0"
max_length="295"
@@ -426,6 +426,10 @@ things in this group. There&apos;s a broad variety of Abilities.
width="300">
<scroll_list.columns
label=""
+ name="icon"
+ width="2" />
+ <scroll_list.columns
+ label=""
name="checkbox"
width="20" />
<scroll_list.columns
diff --git a/indra/newview/skins/default/xui/en/panel_instant_message.xml b/indra/newview/skins/default/xui/en/panel_instant_message.xml
index 1e570bf207..ccd754ac5e 100644
--- a/indra/newview/skins/default/xui/en/panel_instant_message.xml
+++ b/indra/newview/skins/default/xui/en/panel_instant_message.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
background_visible="true"
- height="175"
+ height="152"
label="im_panel"
layout="topleft"
left="0"
@@ -83,13 +83,4 @@
width="285"
word_wrap="true"
max_length="350" />
- <button
- follows="bottom"
- height="23"
- label="Reply"
- layout="topleft"
- left="100"
- name="reply"
- top="144"
- width="100" />
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_landmark_info.xml b/indra/newview/skins/default/xui/en/panel_landmark_info.xml
index a219e30b8b..68e58b27ec 100644
--- a/indra/newview/skins/default/xui/en/panel_landmark_info.xml
+++ b/indra/newview/skins/default/xui/en/panel_landmark_info.xml
@@ -46,13 +46,13 @@
<!-- Texture names for rating icons -->
<string
name="icon_PG"
- value="parcel_drk_PG" />
+ value="Parcel_PG_Dark" />
<string
name="icon_M"
- value="parcel_drk_M" />
+ value="Parcel_M_Dark" />
<string
name="icon_R"
- value="parcel_drk_R" />
+ value="Parcel_R_Dark" />
<button
follows="top|right"
height="23"
diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml
index 0bc2b44ad5..22977b2274 100644
--- a/indra/newview/skins/default/xui/en/panel_login.xml
+++ b/indra/newview/skins/default/xui/en/panel_login.xml
@@ -75,16 +75,6 @@
tool_tip="[SECOND_LIFE] Last Name"
top_delta="0"
width="135" />
- <combo_box
- allow_text_entry="true"
- font="SansSerifSmall"
- follows="left|bottom"
- height="23"
- layout="topleft"
- top="60"
- name="server_combo"
- width="135"
- visible="false" />
<text
follows="left|bottom"
font="SansSerifSmall"
@@ -161,14 +151,24 @@
name="Typeregionname"
value="" />
</combo_box>
+ <combo_box
+ allow_text_entry="true"
+ font="SansSerifSmall"
+ follows="right|bottom"
+ height="23"
+ layout="topleft"
+ top_pad="2"
+ name="server_combo"
+ width="135"
+ visible="false" />
<text
follows="right|bottom"
font="SansSerifSmall"
text_color="EmphasisColor"
halign="right"
height="16"
- top="17"
- left_pad="10"
+ top="12"
+ left_pad="5"
right="-10"
name="create_new_account_text"
width="180">
@@ -188,6 +188,17 @@
<text
follows="right|bottom"
font="SansSerifSmall"
+ text_color="EmphasisColor"
+ halign="right"
+ height="16"
+ name="login_help"
+ top_pad="2"
+ width="180">
+ Need help logging in?
+ </text>
+ <text
+ follows="right|bottom"
+ font="SansSerifSmall"
halign="right"
height="28"
top_pad="2"
diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml
index 37d59de66f..aeb28e4c60 100644
--- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml
+++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml
@@ -30,13 +30,16 @@
layout="topleft"
left_delta="-4"
name="inventory filter tabs"
+ tab_min_width="70"
+ tab_height="30"
tab_position="top"
- top_pad="4"
+ top_pad="10"
+ halign="center"
width="305">
<inventory_panel
follows="left|top|right|bottom"
height="295"
- label="All Items"
+ label="ALL ITEMS"
layout="topleft"
left="1"
name="All Items"
@@ -45,7 +48,7 @@
<inventory_panel
follows="left|top|right|bottom"
height="295"
- label="Recent Items"
+ label="RECENT ITEMS"
layout="topleft"
left_delta="0"
name="Recent Items"
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 7d9350b45f..6e82713f06 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
@@ -35,10 +35,10 @@
right="-35"
width="16"
height="16"
- image_name="parcel_color_EXP"
+ image_name="Parcel_Exp_Color"
mouse_opaque="true"
follows="top|left"
- name="parcel_color_EXP"
+ name="Parcel_Exp_Color"
/>
<text
visible="true"
diff --git a/indra/newview/skins/default/xui/en/panel_my_profile.xml b/indra/newview/skins/default/xui/en/panel_my_profile.xml
index fe3e010cf9..d51893793c 100644
--- a/indra/newview/skins/default/xui/en/panel_my_profile.xml
+++ b/indra/newview/skins/default/xui/en/panel_my_profile.xml
@@ -27,7 +27,7 @@
<string
name="no_partner_text"
value="None" />
- <string
+ <string
name="RegisterDateFormat">
[REG_DATE] ([AGE])
</string>
@@ -156,8 +156,8 @@
Lorem ipsum dolor sit amet, consectetur adlkjpiscing elit moose moose. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet. adipiscing elit. Aenean rigviverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet sorbet ipsum. adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum.
</expandable_text>
</panel>
-
-
+
+
<!-- <panel
name="lifes_images_panel"
follows="left|top|right"
@@ -207,10 +207,10 @@
top="25"
width="18" />
</panel> -->
-
-
-
-
+
+
+
+
<text
type="string"
follows="left|top"
@@ -254,7 +254,7 @@
layout="topleft"
left="10"
name="register_date"
- value="05/31/1976"
+ value="05/31/2376"
width="280"
word_wrap="true" />
<text
@@ -351,11 +351,11 @@
name="profile_buttons_panel"
top_pad="2"
bottom="10"
- height="19"
+ height="23"
width="303">
<button
follows="bottom|left"
- height="19"
+ height="23"
label="Add Friend"
layout="topleft"
left="0"
@@ -365,7 +365,7 @@
width="75" />
<button
follows="bottom|left"
- height="19"
+ height="23"
label="IM"
layout="topleft"
name="im"
@@ -374,7 +374,7 @@
width="45" />
<button
follows="bottom|left"
- height="19"
+ height="23"
label="Call"
layout="topleft"
name="call"
@@ -384,7 +384,7 @@
<button
enabled="false"
follows="bottom|left"
- height="19"
+ height="23"
label="Map"
layout="topleft"
name="show_on_map_btn"
@@ -393,7 +393,7 @@
width="45" />
<button
follows="bottom|left"
- height="19"
+ height="23"
label="Teleport"
layout="topleft"
name="teleport"
@@ -408,21 +408,23 @@
top_pad="-17"
name="profile_me_buttons_panel"
visible="false"
- height="19"
+ height="23"
width="303">
<button
follows="bottom|right"
- height="19"
+ height="23"
left="10"
label="Edit Profile"
name="edit_profile_btn"
+ tool_tip="Edit your personal information"
width="130" />
<button
follows="bottom|right"
- height="19"
+ height="23"
label="Edit Appearance"
left_pad="10"
name="edit_appearance_btn"
+ tool_tip="Create/edit your appearance: physical data, clothes and etc."
right="-10"
width="130" />
</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 de612fbbc3..2543656a8b 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
@@ -22,6 +22,7 @@
label="Click here to chat."
layout="topleft"
left_delta="7"
+ text_pad_right="25"
left="0"
max_length="512"
name="chat_box"
@@ -37,7 +38,7 @@
left_pad="-24"
mouse_opaque="true"
name="chat_zone_indicator"
- top="1"
+ top="6"
visible="true"
width="20" />
<button
diff --git a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml
index d805209bf5..0567d722d5 100644
--- a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml
@@ -1,56 +1,52 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel name="Outfits"
- bottom="0"
- height="326"
- left="0"
- width="310"
- border="true"
- follows="left|top|right|bottom">
+<panel name="Outfits"
+ follows="all"
+border="false">
<accordion
- follows="left|top|right|bottom"
- height="315"
- layout="topleft"
+ single_expansion="true"
+ follows="top|left|bottom"
+ height="460"
+ layout="topleft"
left="0"
name="outfits_accordion"
- top="2"
- width="310">
- <accordion_tab
+ top="0"
+ width="333">
+ <accordion_tab
layout="topleft"
- name="tab_outfits"
- title="Outfits bar">
- <inventory_panel
- allow_multi_select="true"
- border="true"
+ name="tab_cof"
+ title="Current Outfit">
+ <inventory_panel
+ allow_multi_select="true"
+ border="false"
bottom="0"
- follows="left|top|right|bottom"
- height="326"
- left="0"
+ follows="all"
+ height="416"
+ left="0"
mouse_opaque="true"
- name="outfitslist_accordionpanel"
- width="310"
- start_folder="My Outfits"/>
+ name="cof_accordionpanel"
+ width="333"
+ start_folder="Current Outfit" />
</accordion_tab>
<accordion_tab
layout="topleft"
- name="tab_cof"
- title="Current Outfit bar">
- <inventory_panel
- allow_multi_select="true"
- border="true"
+ name="tab_outfits"
+ title="My Outfits">
+ <inventory_panel
+ allow_multi_select="true"
+ border="false"
bottom="0"
- follows="left|top|right|bottom"
- height="326"
- left="0"
+ follows="all"
+ height="415"
+ left="0"
mouse_opaque="true"
- name="cof_accordionpanel"
- width="310"
- start_folder="Current Outfit"/>
+ name="outfitslist_accordionpanel"
+ width="333"
+ start_folder="My Outfits" />
</accordion_tab>
</accordion>
-
- <button bottom="0"
+ <!--<button bottom="0"
halign="center"
- height="16"
+ height="23"
label=">"
enabled="false"
mouse_opaque="false"
@@ -59,54 +55,5 @@
left="0"
visible="false"
follows="right|bottom"
- tool_tip="View outfit properties"/>
- <panel
- background_visible="true"
- bevel_style="none"
- bottom="0"
- follows="left|right|bottom"
- height="30"
- layout="bottomleft"
- left="0"
- visible="true"
- name="bottom_panel"
- width="310">
- <button
- follows="bottom|left"
- tool_tip="Show additional options"
- height="18"
- image_disabled="OptionsMenu_Disabled"
- image_selected="OptionsMenu_Press"
- image_unselected="OptionsMenu_Off"
- layout="topleft"
- left="10"
- name="options_gear_btn"
- picture_style="true"
- top="6"
- width="18" />
- <button
- follows="bottom|left"
- height="18"
- image_selected="AddItem_Press"
- image_unselected="AddItem_Off"
- image_disabled="AddItem_Disabled"
- layout="topleft"
- left_pad="5"
- name="add_btn"
- picture_style="true"
- tool_tip="Add new item"
- width="18" />
- <dnd_button
- follows="bottom|right"
- height="18"
- image_selected="TrashItem_Press"
- image_unselected="TrashItem_Off"
- layout="topleft"
- right="-5"
- name="trash_btn"
- picture_style="true"
- tool_tip="Remove selected item"
- top="6"
- width="18" />
- </panel>
+ tool_tip="View outfit properties" />-->
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_picks.xml b/indra/newview/skins/default/xui/en/panel_picks.xml
index 4c2bd67337..4facedc7ea 100644
--- a/indra/newview/skins/default/xui/en/panel_picks.xml
+++ b/indra/newview/skins/default/xui/en/panel_picks.xml
@@ -106,7 +106,7 @@
layout="topleft"
left_pad="15"
name="new_btn"
- tool_tip="Create new pick at current location"
+ tool_tip="Create a new pick or classified at the current location"
top="5"
width="18" />
<button
@@ -138,6 +138,7 @@
left="5"
name="info_btn"
tab_stop="false"
+ tool_tip="Show pick information"
top="0"
width="55" />
<button
@@ -149,6 +150,7 @@
left_pad="5"
name="teleport_btn"
tab_stop="false"
+ tool_tip="Teleport to the corresponding area"
top="0"
width="77" />
<button
@@ -160,6 +162,7 @@
left_pad="5"
name="show_on_map_btn"
tab_stop="false"
+ tool_tip="Show the corresponding area on the World Map"
top="0"
width="50" />
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_place_profile.xml b/indra/newview/skins/default/xui/en/panel_place_profile.xml
index 3f5da66dce..b25d9a7dfc 100644
--- a/indra/newview/skins/default/xui/en/panel_place_profile.xml
+++ b/indra/newview/skins/default/xui/en/panel_place_profile.xml
@@ -95,49 +95,49 @@
<!-- Texture names for parcel permissions icons -->
<string
name="icon_PG"
- value="parcel_drk_PG" />
+ value="Parcel_PG_Dark" />
<string
name="icon_M"
- value="parcel_drk_M" />
+ value="Parcel_M_Dark" />
<string
name="icon_R"
- value="parcel_drk_R" />
+ value="Parcel_R_Dark" />
<string
name="icon_Voice"
- value="parcel_drk_Voice" />
+ value="Parcel_Voice_Dark" />
<string
name="icon_VoiceNo"
- value="parcel_drk_VoiceNo" />
+ value="Parcel_VoiceNo_Dark" />
<string
name="icon_Fly"
- value="parcel_drk_Fly" />
+ value="Parcel_Fly_Dark" />
<string
name="icon_FlyNo"
- value="parcel_drk_FlyNo" />
+ value="Parcel_FlyNo_Dark" />
<string
name="icon_Push"
- value="parcel_drk_Push" />
+ value="Parcel_Push_Dark" />
<string
name="icon_PushNo"
- value="parcel_drk_PushNo" />
+ value="Parcel_PushNo_Dark" />
<string
name="icon_Build"
- value="parcel_drk_Build" />
+ value="Parcel_Build_Dark" />
<string
name="icon_BuildNo"
- value="parcel_drk_BuildNo" />
+ value="Parcel_BuildNo_Dark" />
<string
name="icon_Scripts"
- value="parcel_drk_Scripts" />
+ value="Parcel_Scripts_Dark" />
<string
name="icon_ScriptsNo"
- value="parcel_drk_ScriptsNo" />
+ value="Parcel_ScriptsNo_Dark" />
<string
name="icon_Damage"
- value="parcel_drk_Damage" />
+ value="Parcel_Damage_Dark" />
<string
name="icon_DamageNo"
- value="parcel_drk_DamageNo" />
+ value="Parcel_DamageNo_Dark" />
<button
follows="top|right"
height="23"
@@ -335,7 +335,7 @@
<icon
follows="top|left"
height="16"
- image_name="parcel_drk_PG"
+ image_name="Parcel_PG_Dark"
layout="topleft"
left="10"
name="rating_icon"
@@ -361,7 +361,7 @@
<icon
follows="top|left"
height="18"
- image_name="parcel_drk_Voice"
+ image_name="Parcel_Voice_Dark"
layout="topleft"
left="10"
name="voice_icon"
@@ -388,7 +388,7 @@
<icon
follows="top|left"
height="18"
- image_name="parcel_drk_Fly"
+ image_name="Parcel_Fly_Dark"
layout="topleft"
left="10"
name="fly_icon"
@@ -414,7 +414,7 @@
<icon
follows="top|left"
height="18"
- image_name="parcel_drk_Push"
+ image_name="Parcel_Push_Dark"
layout="topleft"
left="10"
name="push_icon"
@@ -440,7 +440,7 @@
<icon
follows="top|left"
height="18"
- image_name="parcel_drk_Build"
+ image_name="Parcel_Build_Dark"
layout="topleft"
left="10"
name="build_icon"
@@ -466,7 +466,7 @@
<icon
follows="top|left"
height="18"
- image_name="parcel_drk_Scripts"
+ image_name="Parcel_Scripts_Dark"
layout="topleft"
left="10"
name="scripts_icon"
@@ -492,7 +492,7 @@
<icon
follows="top|left"
height="18"
- image_name="parcel_drk_Damage"
+ image_name="Parcel_Damage_Dark"
layout="topleft"
left="10"
name="damage_icon"
@@ -591,7 +591,7 @@
<icon
follows="top|left"
height="16"
- image_name="parcel_drk_PG"
+ image_name="Parcel_PG_Dark"
layout="topleft"
left_pad="0"
name="region_rating_icon"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
index 3aa5d3fae4..fff53c1de2 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
@@ -332,7 +332,7 @@
control_name="ChatWindow"
name="chat_window"
top_pad="10"
- tool_tip="Show chat in multiple windows(by default) or in one multi-tabbed window (requires restart)"
+ tool_tip="Show your Instant Messages in separate windows, or in one window with many tabs (Requires restart)"
width="331">
<radio_item
height="16"
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 23832ba120..29e9b476eb 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml
@@ -78,7 +78,7 @@
top_pad="10"
width="350" />
<check_box
- control_name="AutoPlayMedia"
+ control_name="ParcelMediaAutoPlayEnable"
height="16"
label="Allow Media Autoplay"
layout="topleft"
@@ -86,15 +86,6 @@
name="autoplay_enabled"
top_pad="10"
width="350" />
- <check_box
- control_name="ParcelMediaAutoPlayEnable"
- height="16"
- label="Automatically Play Parcel Media"
- layout="topleft"
- left="30"
- name="parcel_autoplay_enabled"
- top_pad="10"
- width="350" />
<text
type="string"
length="1"
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 8ef2cdfc37..854227619b 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
@@ -23,7 +23,7 @@
name="System Volume"
show_text="false"
slider_label.halign="right"
- top_pad="5"
+ top="10"
volume="true"
width="350">
<slider.commit_callback
@@ -34,8 +34,8 @@
control_name="MuteAudio"
follows="top|right"
height="18"
- image_selected="parcel_drk_VoiceNo"
- image_unselected="parcel_drk_Voice"
+ image_selected="Parcel_VoiceNo_Dark"
+ image_unselected="Parcel_Voice_Dark"
is_toggle="true"
layout="topleft"
left_pad="16"
@@ -79,8 +79,8 @@
disabled_control="MuteAudio"
follows="top|right"
height="18"
- image_selected="parcel_drk_VoiceNo"
- image_unselected="parcel_drk_Voice"
+ image_selected="Parcel_VoiceNo_Dark"
+ image_unselected="Parcel_Voice_Dark"
is_toggle="true"
layout="topleft"
left_pad="16"
@@ -114,8 +114,8 @@
disabled_control="MuteAudio"
follows="top|right"
height="18"
- image_selected="parcel_drk_VoiceNo"
- image_unselected="parcel_drk_Voice"
+ image_selected="Parcel_VoiceNo_Dark"
+ image_unselected="Parcel_Voice_Dark"
is_toggle="true"
layout="topleft"
left_pad="16"
@@ -149,8 +149,8 @@
disabled_control="MuteAudio"
follows="top|right"
height="18"
- image_selected="parcel_drk_VoiceNo"
- image_unselected="parcel_drk_Voice"
+ image_selected="Parcel_VoiceNo_Dark"
+ image_unselected="Parcel_Voice_Dark"
is_toggle="true"
layout="topleft"
left_pad="16"
@@ -184,8 +184,8 @@
disabled_control="MuteAudio"
follows="top|right"
height="18"
- image_selected="parcel_drk_VoiceNo"
- image_unselected="parcel_drk_Voice"
+ image_selected="Parcel_VoiceNo_Dark"
+ image_unselected="Parcel_Voice_Dark"
is_toggle="true"
layout="topleft"
left_pad="16"
@@ -219,8 +219,8 @@
disabled_control="MuteAudio"
follows="top|right"
height="18"
- image_selected="parcel_drk_VoiceNo"
- image_unselected="parcel_drk_Voice"
+ image_selected="Parcel_VoiceNo_Dark"
+ image_unselected="Parcel_Voice_Dark"
is_toggle="true"
layout="topleft"
left_pad="16"
@@ -230,12 +230,13 @@
width="22" />
<check_box
label_text.halign="left"
- follows="right|top"
- height="16"
- control_name ="EnableVoiceChat"
- disabled_control="CmdLineDisableVoice"
- label="Voice"
- left="50"
+ follows="left|top"
+ height="16"
+ control_name ="EnableVoiceChat"
+ disabled_control="CmdLineDisableVoice"
+ label="Enable voice"
+ layout="topleft"
+ left="28"
name="enable_voice_check"
top_pad="5"
width="110"
@@ -249,15 +250,16 @@
height="15"
increment="0.05"
initial_value="0.5"
- label_width="0"
+ label="Voice"
+ label_width="160"
layout="topleft"
- left="165"
- top_delta="0"
+ left="0"
+ top_delta="20"
name="Voice Volume"
show_text="false"
slider_label.halign="right"
volume="true"
- width="185">
+ width="350">
<slider.commit_callback
function="Pref.setControlFalse"
parameter="MuteVoice" />
@@ -268,8 +270,8 @@
disabled_control="MuteAudio"
follows="top|right"
height="18"
- image_selected="parcel_drk_VoiceNo"
- image_unselected="parcel_drk_Voice"
+ image_selected="Parcel_VoiceNo_Dark"
+ image_unselected="Parcel_Voice_Dark"
is_toggle="true"
layout="topleft"
left_pad="16"
@@ -283,63 +285,70 @@
follows="left|top"
height="13"
layout="topleft"
- left="170"
+ left="30"
name="Listen from"
- width="200">
+ width="200"
+ top="205">
Listen from:
</text>
<icon
- follows="left"
+ follows="left|top"
height="18"
image_name="Cam_FreeCam_Off"
+ layout="topleft"
name="camera_icon"
mouse_opaque="false"
visible="true"
- width="18" />
+ width="18"
+ left="80"
+ top="219"/>
<icon
- follows="left"
+ follows="left|top"
height="18"
image_name="Move_Walk_Off"
+ layout="topleft"
name="avatar_icon"
mouse_opaque="false"
visible="true"
- width="18" />
+ width="18"
+ top="239"
+ left="80"
+ />
<radio_group
enabled_control="EnableVoiceChat"
control_name="VoiceEarLocation"
draw_border="false"
- follows="left"
- left_delta="20"
- top = "210"
- width="221"
- height="38"
- name="ear_location">
- <radio_item
- height="16"
- label="Camera position"
- left_pad="1"
- follows="topleft"
- name="0"
- top_delta="-30"
- width="200" />
- <radio_item
- height="16"
- follows="topleft"
- label="Avatar position"
- left_delta="0"
- name="1"
- top_delta="19"
- width="200" />
- </radio_group>
+ follows="left|top"
+ layout="topleft"
+ left="100"
+ width="221"
+ height="38"
+ name="ear_location"
+ top="218">
+ <radio_item
+ height="16"
+ label="Camera position"
+ follows="left|top"
+ layout="topleft"
+ name="0"
+ width="200"/>
+ <radio_item
+ height="16"
+ follows="left|top"
+ label="Avatar position"
+ layout="topleft"
+ name="1"
+ width="200" />
+ </radio_group>
<button
control_name="ShowDeviceSettings"
- follows="left|bottom"
+ follows="left|top"
height="19"
is_toggle="true"
- label="Input/Output Devices"
+ label="Input/Output devices"
layout="topleft"
- left="165"
- top_pad="12"
+ left="30"
+ top="270"
name="device_settings_btn"
width="190">
</button>
@@ -475,7 +484,7 @@
</text>-->
<icon
height="18"
- image_name="parcel_lght_Voice"
+ image_name="Parcel_Voice_Light"
left="80"
name="speaker_icon"
mouse_opaque="false"
diff --git a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml
index 8b86067b03..e21de31498 100644
--- a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml
+++ b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml
@@ -3,7 +3,7 @@
follows="left|right|top|bottom"
name="MediaControls"
background_visible="false"
- height="192"
+ height="200"
layout="topleft"
mouse_opaque="false"
width="800">
@@ -16,20 +16,20 @@
<string name="zoom_far_padding">1.5</string>
<panel
name="media_region"
- bottom="125"
+ height="100"
follows="left|right|top|bottom"
layout="topleft"
mouse_opaque="false"
- top="20" />
+ top="0" />
<layout_stack
name="media_controls"
follows="left|right"
animate="false"
- height="26"
+ height="75"
layout="topleft"
left="0"
orientation="horizontal"
- top="128">
+ top="100">
<!-- outer layout_panels center the inner one -->
<layout_panel
name="left_bookend"
@@ -239,19 +239,6 @@
layout="topleft"
width="190"
min_width="90">
- <!--
- RE-ENABLE THIS WHEN WE HAVE A HISTORY DROP-DOWN AGAIN
- <combo_box
- name="media_address_url"
- allow_text_entry="true"
- height="22"
- layout="topleft"
- max_chars="1024"
- tool_tip = "Media URL">
- <combo_box.commit_callback
- function="MediaCtrl.CommitURL" />
- </combo_box>
- -->
<line_editor
name="media_address_url"
follows="left|right"
@@ -314,8 +301,9 @@
<slider_bar
name="media_play_slider"
follows="left|right|top"
- height="16"
- increment="0.05"
+ height="20"
+ bottom="88"
+ increment="0.01"
initial_value="0.5"
layout="topleft"
tool_tip="Movie play progress"
@@ -379,7 +367,8 @@
auto_resize="false"
user_resize="false"
layout="topleft"
- height="22"
+ top="-50"
+ height="72"
min_width="22"
width="22">
<!-- Note: this is not quite right either...the mute button is not the -->
@@ -397,138 +386,30 @@
layout="topleft"
scale_image="false"
tool_tip="Mute This Media"
- top_delta="18"
+ top="118"
min_width="22"
width="22" >
<button.commit_callback
function="MediaCtrl.ToggleMute" />
+ <button.mouseenter_callback
+ function="MediaCtrl.ShowVolumeSlider" />
</button>
- </layout_panel>
- <!-- We do not have a design yet for "volume", so this is a temporary -->
- <!-- solution. See DEV-42827. -->
- <layout_panel
- name="volume_up"
- auto_resize="false"
- user_resize="false"
- layout="topleft"
- min_width="14"
- height="14"
- width="14">
- <button
- image_overlay="media_btn_scrollup.png"
- image_disabled="PushButton_Disabled"
- image_disabled_selected="PushButton_Disabled"
- image_selected="PushButton_Selected"
- image_unselected="PushButton_Off"
- hover_glow_amount="0.15"
- top="-5"
- height="14"
- layout="topleft"
- tool_tip="Volume up"
- scale_image="true"
- min_width="14"
- width="14" >
- <button.commit_callback
- function="MediaCtrl.CommitVolumeUp" />
- </button>
- </layout_panel>
- <layout_panel
- name="volume_down"
- auto_resize="false"
- user_resize="false"
- layout="topleft"
- min_width="14"
- height="14"
- width="14">
- <button
- image_overlay="media_btn_scrolldown.png"
- image_disabled="PushButton_Disabled"
- image_disabled_selected="PushButton_Disabled"
- image_selected="PushButton_Selected"
- image_unselected="PushButton_Off"
- hover_glow_amount="0.15"
- layout="topleft"
- tool_tip="Volume down"
- scale_image="true"
- top="-5"
- height="14"
- min_width="14"
- width="14">
- <button.commit_callback
- function="MediaCtrl.CommitVolumeDown" />
- </button>
- </layout_panel>
- <!-- Scroll pad -->
- <!-- This was removed from the design, but is still here because it is -->
- <!-- complex, and recreating it would be hard. In case the design -->
- <!-- changes, here it lies: -->
- <!--
- <layout_panel
- name="media_panel_scroll"
- auto_resize="false"
- user_resize="false"
- height="32"
- follows="left|right|top|bottom"
- layout="topleft"
- min_width="32"
- width="32">
- <icon
- height="32"
- image_name="media_panel_scrollbg.png"
- layout="topleft"
- top="0"
- min_width="32"
- width="32" />
- <button
- name="scrollup"
- height="8"
- image_selected="media_btn_scrollup.png"
- image_unselected="media_btn_scrollup.png"
- layout="topleft"
- tool_tip="Scroll up"
- scale_image="false"
- left="12"
- top_delta="4"
- min_width="8"
- width="8" />
- <button
- name="scrollleft"
- height="8"
- image_selected="media_btn_scrollleft.png"
- image_unselected="media_btn_scrollleft.png"
- layout="topleft"
- left="3"
- tool_tip="Scroll left"
- scale_image="false"
- top="12"
- min_width="8"
- width="8" />
- <button
- name="scrollright"
- height="8"
- image_selected="media_btn_scrollright.png"
- image_unselected="media_btn_scrollright.png"
- layout="topleft"
- left_pad="9"
- tool_tip="Scroll right"
- scale_image="false"
- top_delta="0"
- min_width="8"
- width="8" />
- <button
- name="scrolldown"
- height="8"
- image_selected="media_btn_scrolldown.png"
- image_unselected="media_btn_scrolldown.png"
+ <slider
+ orientation="vertical"
+ left="0"
+ top="-2"
+ height="50"
layout="topleft"
- left="12"
- tool_tip="Scroll down"
- scale_image="false"
- top="20"
- min_width="8"
- width="8" />
+ increment="0.01"
+ initial_value="0.5"
+ name="volume_slider"
+ tool_tip="Media Volume"
+ show_text="false"
+ volume="true">
+ <slider.commit_callback
+ function="MediaCtrl.Volume"/>
+ </slider>
</layout_panel>
- -->
<panel
height="28"
layout="topleft"
@@ -628,7 +509,7 @@
animate="false"
left="0"
orientation="horizontal"
- top="150">
+ top="170">
<!-- outer layout_panels center the inner one -->
<layout_panel
width="0"
diff --git a/indra/newview/skins/default/xui/en/panel_profile.xml b/indra/newview/skins/default/xui/en/panel_profile.xml
index 947bb67152..6be203ef9c 100644
--- a/indra/newview/skins/default/xui/en/panel_profile.xml
+++ b/indra/newview/skins/default/xui/en/panel_profile.xml
@@ -287,7 +287,7 @@
mouse_opaque="false"
name="add_friend"
top="5"
- width="76" />
+ width="77" />
<button
follows="bottom|left"
height="19"
@@ -296,7 +296,7 @@
name="im"
top="5"
left_pad="5"
- width="31" />
+ width="33" />
<button
follows="bottom|left"
height="19"
@@ -315,7 +315,7 @@
name="show_on_map_btn"
top="5"
left_pad="5"
- width="42" />
+ width="44" />
<button
follows="bottom|left"
height="19"
@@ -324,7 +324,7 @@
name="teleport"
left_pad="5"
top="5"
- width="64" />
+ width="67" />
<button
follows="bottom|right"
height="19"
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 4b841b0a09..1dd4eb095c 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
@@ -20,58 +20,7 @@
top_pad="10"
width="313">
<layout_panel
- auto_resize="false"
- height="20"
- layout="topleft"
- left="0"
- name="nav_controls"
- top="0"
- user_resize="false"
- width="313">
- <button
- follows="left|top"
- enabled="false"
- height="20"
- label="Back"
- layout="topleft"
- tab_stop="false"
- left="0"
- name="back"
- top="0"
- width="70">
- <button.commit_callback
- function="MediaBrowser.Back" />
- </button>
- <button
- follows="left|top"
- height="20"
- enabled="false"
- label="Forward"
- layout="topleft"
- tab_stop="false"
- left_pad="3"
- name="forward"
- top_delta="0"
- width="70">
- <button.commit_callback
- function="MediaBrowser.Forward" />
- </button>
- <button
- follows="left|top"
- height="20"
- label="Home"
- layout="topleft"
- tab_stop="false"
- left_pad="2"
- name="home"
- top_delta="0"
- width="70">
- <button.commit_callback
- function="MediaBrowser.Home" />
- </button>
- </layout_panel>
- <layout_panel
- height="530"
+ height="550"
layout="topleft"
left_delta="0"
name="browser_layout"
@@ -80,7 +29,7 @@
<web_browser
border_visible="false"
follows="all"
- height="530"
+ height="550"
layout="topleft"
left="0"
name="browser"
diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml
index 5dcee9e965..57b090e5b4 100644
--- a/indra/newview/skins/default/xui/en/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml
@@ -72,8 +72,8 @@
<button
follows="right|bottom"
height="16"
- image_selected="parcel_drk_VoiceNo"
- image_unselected="parcel_drk_Voice"
+ image_selected="Parcel_VoiceNo_Dark"
+ image_unselected="Parcel_Voice_Dark"
is_toggle="true"
left_pad="18"
top="1"
diff --git a/indra/newview/skins/default/xui/en/panel_toast.xml b/indra/newview/skins/default/xui/en/panel_toast.xml
index 6479fc91ca..707b24c92c 100644
--- a/indra/newview/skins/default/xui/en/panel_toast.xml
+++ b/indra/newview/skins/default/xui/en/panel_toast.xml
@@ -46,7 +46,7 @@
</text>
<button
layout="topleft"
- top="-6"
+ top="-14"
left="293"
width="17"
height="17"
diff --git a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml
index 4dae8e48a0..886887c2b5 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml
@@ -1,111 +1,177 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
- background_visible="true"
- follows="all"
- height="400"
- label="Appearance"
- layout="topleft"
- min_height="350"
- min_width="240"
- name="appearance panel"
- width="333">
- <string
- name="No Outfit"
- value="No Outfit" />
- <panel
- left="5" width="320" height="55"
- background_visible="true"
- background_opaque="false"
- bg_alpha_color="0.2 0.2 0.2 1.0"
- name="panel_currentlook"
- follows="left|top|right">
- <button
- follows="left|right|top"
- font="SansSerif"
- top="28" right="-10" width="60" height="20"
- layout="topleft"
- label="Edit"
- name="editappearance_btn"/>
- <button
- follows="left|right|top"
- top="28" left="5" width="25" height="22"
- image_overlay="Inv_LookFolderOpen"
- layout="topleft"
- name="openoutfit_btn"
- picture_style="true" />
- <text
- top="10" width="150" left="5" height="15" follows="left|right|top"
- layout="topleft"
- font="SansSerif" text_color="LtGray" word_wrap="true"
- mouse_opaque="false" name="currentlook_title">
- Current Outfit:
- </text>
- <text
- top="32" width="150" left="32" height="15" follows="left|right|top"
- layout="topleft"
- font="SansSerifBold" text_color="white" word_wrap="true"
- mouse_opaque="false" name="currentlook_name" >
- MyOutfit
- </text>
- </panel>
-
+background_visible="true"
+ follows="all"
+ height="570"
+ label="My Appearance"
+ layout="topleft"
+ min_height="350"
+ name="appearance panel"
+ width="333">
+ <string
+name="No Outfit"
+value="No Outfit" />
+<panel
+ left="0"
+ top="0"
+ follows="top|left"
+layout="topleft"
+ width="333"
+ height="45"
+ background_visible="true"
+ background_opaque="false"
+ bg_alpha_color="MouseGray"
+ name="panel_currentlook"
+ >
+<button
+ follows="left|top"
+ top="0" width="1" height="1"
+ layout="topleft"
+ left="0"
+ name="editappearance_btn" />
+ <button
+ follows="left|top"
+ top="0" width="1" height="1"
+ layout="topleft"
+ left="3"
+ name="openoutfit_btn" />
+<icon
+ follows="top|left"
+ height="30"
+ image_name="TabIcon_Appearance_Off"
+ name="outfit_icon"
+ mouse_opaque="false"
+ visible="true"
+ left="5"
+ top="0"
+ width="30" />
+<text
+ width="292"
+ height="22"
+follows="top|left"
+ layout="topleft"
+ left_pad="5"
+font="SansSerifLarge"
+font.style="BOLD"
+word_wrap="false"
+use_ellipses="true"
+mouse_opaque="false"
+ text_color="white"
+ name="currentlook_name">
+MyOutfit With a really Long Name like MOOSE
+ </text>
+ <text
+width="290"
+left="40"
+height="1"
+follows="top|left"
+ layout="topleft"
+ top_pad="-2"
+mouse_opaque="false"
+ name="currentlook_title" >
+(now wearing)
+ </text>
+</panel>
<filter_editor
- follows="left|top|right"
- font="SansSerif"
- label="Filter"
- layout="topleft"
- left="15"
- width="313"
- height="20"
- name="Filter" />
+ follows="top|left"
+ height="23"
+ layout="topleft"
+ left="15"
+ label="Filter"
+ max_length="300"
+ name="Filter"
+ top_pad="7"
+ width="303" />
<panel
- class="panel_outfits_inventory"
- filename="panel_outfits_inventory.xml"
- name="panel_outfits_inventory"
- follows="all"
- height="271"
- halign="center"
- layout="topleft"
- left="10"
- top_pad="19"
- width="313" />
- <button
- follows="bottom|left"
- height="25"
- label="Wear"
- layout="topleft"
- left="10"
- name="wear_btn"
- top_pad="0"
- width="80" />
+ follows="top|left"
+ halign="center"
+ height="500"
+ layout="topleft"
+ class="panel_outfits_inventory"
+ filename="panel_outfits_inventory.xml"
+ name="panel_outfits_inventory"
+ min_height="300"
+ left="0"
+ top_pad="3"
+ width="333"
+ />
+ <panel
+ background_visible="true"
+ follows="top|left"
+ height="19"
+ layout="topleft"
+ left="0"
+ visible="true"
+ name="bottom_panel"
+ width="333">
+ <button
+ follows="bottom|left"
+ tool_tip="Show additional options"
+ height="18"
+ image_disabled="OptionsMenu_Disabled"
+ image_selected="OptionsMenu_Press"
+ image_unselected="OptionsMenu_Off"
+ layout="topleft"
+ left="10"
+ name="options_gear_btn"
+ top="6"
+ width="18" />
+ <button
+ follows="bottom|left"
+ height="18"
+ image_selected="AddItem_Press"
+ image_unselected="AddItem_Off"
+ image_disabled="AddItem_Disabled"
+ layout="topleft"
+ left_pad="5"
+ name="add_btn"
+ tool_tip="Add new item"
+ width="18" />
+ <dnd_button
+ follows="bottom|left"
+ height="18"
+ image_selected="TrashItem_Press"
+ image_unselected="TrashItem_Off"
+ layout="topleft"
+ right="-5"
+ name="trash_btn"
+ tool_tip="Remove selected item"
+ top="6"
+ width="18" />
<button
- follows="bottom|left"
- height="25"
- label="New Outfit"
- layout="topleft"
- left_pad="0"
- name="newlook_btn"
- top_delta="0"
- width="90" />
-
- <panel
- class="panel_look_info"
- filename="panel_look_info.xml"
- follows="all"
- layout="topleft"
- left="0"
- name="panel_look_info"
- top="-200"
- visible="false" />
-
- <panel
- class="panel_edit_wearable"
- filename="panel_edit_wearable.xml"
- follows="all"
- layout="topleft"
- left="0"
- name="panel_edit_wearable"
- top="-200"
- visible="false"
- width="333" />
+ follows="top|left"
+ height="23"
+ label="Wear"
+ layout="topleft"
+ name="wear_btn"
+ right="-5"
+ top_pad="0"
+ width="90" />
+ </panel>
+ <!-- <button
+ follows="bottom|left"
+ height="23"
+ label="New outfit"
+ layout="topleft"
+ left_pad="5"
+ right="-10"
+ name="newlook_btn"
+ width="100" />-->
+<panel
+ class="panel_look_info"
+ filename="panel_look_info.xml"
+ follows="all"
+ layout="topleft"
+ left="0"
+ name="panel_look_info"
+ visible="false" />
+<panel
+ class="panel_edit_wearable"
+ filename="panel_edit_wearable.xml"
+ follows="all"
+ layout="topleft"
+ left="0"
+ name="panel_edit_wearable"
+ visible="false"
+ width="333" />
</panel>
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index b014b8d1c0..7fafa63e57 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -88,7 +88,6 @@
<string name="BUTTON_MINIMIZE">Minimize</string>
<string name="BUTTON_TEAR_OFF">Tear Off</string>
<string name="BUTTON_DOCK">Dock</string>
- <string name="BUTTON_UNDOCK">Undock</string>
<string name="BUTTON_HELP">Show Help</string>
<!-- searching - generic -->
@@ -1771,7 +1770,8 @@ Clears (deletes) the media and all params from the given face.
<string name="tattoo">Tattoo</string>
<string name="invalid">invalid</string>
- <!-- notify -->
+ <!-- LLGroupNotify -->
+ <!-- used in the construction of a Group Notice blue dialog box, buttons, tooltip etc. Seems to be no longer utilized by code in Viewer 2.0 -->
<string name="next">Next</string>
<string name="ok">OK</string>
<string name="GroupNotifyGroupNotice">Group Notice</string>
@@ -1781,6 +1781,7 @@ Clears (deletes) the media and all params from the given face.
<string name="GroupNotifyViewPastNotices">View past notices or opt-out of receiving these messages here.</string>
<string name="GroupNotifyOpenAttachment">Open Attachment</string>
<string name="GroupNotifySaveAttachment">Save Attachment</string>
+
<string name="TeleportOffer">Teleport offering</string>
<!-- start-up toast's string-->
<string name="StartUpNotifications">New notifications arrived while you were away.</string>
@@ -1882,6 +1883,7 @@ this texture in your inventory
<string name="InvFolder All">All</string>
<!-- inventory FVBridge -->
+ <!-- This is used in llpanelinventory.cpp when constructing a context menu for an item for Sale -->
<string name="Buy">Buy</string>
<string name="BuyforL$">Buy for L$</string>
@@ -2008,8 +2010,8 @@ this texture in your inventory
<!-- groups -->
<string name="GroupsNone">none</string>
- <string name="Group" value=" (group)" />
- <string name="Unknown">(Unknown)</string>
+ <string name="Group" value=" (group)" />
+ <string name="Unknown">(Unknown)</string>
<string name="SummaryForTheWeek" value="Summary for this week, beginning on " />
<string name="NextStipendDay" value="The next stipend day is " />
<string name="GroupIndividualShare" value=" Group Individual Share" />
@@ -2019,7 +2021,8 @@ this texture in your inventory
<string name="Total">Total</string>
<string name="NoGroupDataFound">No group data found for group </string>
- <!-- floater IM -->
+ <!-- floater IM bonus_info: When a Linden with Admin/god status receives a new IM this displays the estate (Mainland vs. teen grid) of the source avatar.
+ This is to help Lindens when answering questions. -->
<string name="IMParentEstate">parent estate</string>
<string name="IMMainland">mainland</string>
<string name="IMTeen">teen</string>
@@ -2108,8 +2111,8 @@ this texture in your inventory
Unknown file extension .%s
Expected .wav, .tga, .bmp, .jpg, .jpeg, or .bvh
</string>
- <string name="AddLandmarkNavBarMenu">Add Landmark...</string>
- <string name="EditLandmarkNavBarMenu">Edit Landmark...</string>
+ <string name="AddLandmarkNavBarMenu">Add to My Landmarks...</string>
+ <string name="EditLandmarkNavBarMenu">Edit my Landmark...</string>
<!-- menu accelerators -->
<string name="accel-mac-control">&#8963;</string>
@@ -2388,8 +2391,8 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
<string name="Eyes Bugged">Eyes Bugged</string>
-<string name="Eyes Shear Left Up">Eyes Shear Left Up</string>
-<string name="Eyes Shear Right Up">Eyes Shear Right Up</string>
+
+
@@ -2780,7 +2783,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
<!-- Navigation bar location input control.
Strings are here because widget xml is not localizable -->
<string name="LocationCtrlAddLandmarkTooltip">Add to My Landmarks</string>
- <string name="LocationCtrlEditLandmarkTooltip">Edit My Landmark</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>
<string name="LocationCtrlForSaleTooltip">Buy this land</string>
diff --git a/indra/newview/skins/default/xui/en/widgets/filter_editor.xml b/indra/newview/skins/default/xui/en/widgets/filter_editor.xml
index 0e34243349..48baa2812d 100644
--- a/indra/newview/skins/default/xui/en/widgets/filter_editor.xml
+++ b/indra/newview/skins/default/xui/en/widgets/filter_editor.xml
@@ -4,6 +4,7 @@
search_button_visible="true"
text_pad_left="7"
select_on_focus="true"
+ text_tentative_color="TextFgTentativeColor"
background_image="TextField_Search_Off"
background_image_disabled="TextField_Search_Disabled"
background_image_focused="TextField_Search_Active">
diff --git a/indra/newview/skins/default/xui/en/widgets/floater.xml b/indra/newview/skins/default/xui/en/widgets/floater.xml
index b2bd9c38c9..19fb520b44 100644
--- a/indra/newview/skins/default/xui/en/widgets/floater.xml
+++ b/indra/newview/skins/default/xui/en/widgets/floater.xml
@@ -16,13 +16,11 @@
minimize_image="Icon_Minimize_Foreground"
tear_off_image="tearoffbox.tga"
dock_image="Icon_Dock_Foreground"
- undock_image="Icon_Undock_Foreground"
help_image="Icon_Help_Foreground"
close_pressed_image="Icon_Close_Press"
restore_pressed_image="Icon_Restore_Press"
minimize_pressed_image="Icon_Minimize_Press"
tear_off_pressed_image="tearoff_pressed.tga"
dock_pressed_image="Icon_Dock_Press"
- undock_pressed_image="Icon_Undock_Press"
help_pressed_image="Icon_Help_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 0e2700cb80..7ac44b412d 100644
--- a/indra/newview/skins/default/xui/en/widgets/location_input.xml
+++ b/indra/newview/skins/default/xui/en/widgets/location_input.xml
@@ -22,9 +22,12 @@
>
<!-- *NOTE: Tooltips are in strings.xml so they can be localized.
See LocationCtrlAddLandmarkTooltip etc. -->
- <info_button name="Place Information"
- width="16"
- height="16"
+ <info_button
+ name="Place Information"
+ width="16"
+ height="16"
+ left="4"
+ top="20"
follows="left|top"
hover_glow_amount="0.15"
image_unselected="Info_Off"
@@ -43,8 +46,8 @@
left="-3" />
<for_sale_button
name="for_sale_btn"
- image_unselected="parcel_lght_ForSale"
- image_selected="parcel_lght_ForSale"
+ image_unselected="Parcel_ForSale_Light"
+ image_selected="Parcel_ForSale_Light"
width="22"
height="18"
follows="right|top"
@@ -58,7 +61,7 @@
height="18"
top="21"
follows="right|top"
- image_name="parcel_lght_VoiceNo"
+ image_name="Parcel_VoiceNo_Light"
/>
<fly_icon
name="fly_icon"
@@ -66,7 +69,7 @@
height="18"
top="21"
follows="right|top"
- image_name="parcel_lght_FlyNo"
+ image_name="Parcel_FlyNo_Light"
/>
<push_icon
name="push_icon"
@@ -74,7 +77,7 @@
height="18"
top="21"
follows="right|top"
- image_name="parcel_lght_PushNo"
+ image_name="Parcel_PushNo_Light"
/>
<build_icon
name="build_icon"
@@ -82,7 +85,7 @@
height="18"
top="21"
follows="right|top"
- image_name="parcel_lght_BuildNo"
+ image_name="Parcel_BuildNo_Light"
/>
<scripts_icon
name="scripts_icon"
@@ -90,7 +93,7 @@
height="18"
top="21"
follows="right|top"
- image_name="parcel_lght_ScriptsNo"
+ image_name="Parcel_ScriptsNo_Light"
/>
<!-- NOTE: Placeholder icon, there is no dark grayscale version -->
<damage_icon
@@ -99,7 +102,7 @@
height="18"
top="21"
follows="right|top"
- image_name="parcel_lght_Damage"
+ image_name="Parcel_Damage_Light"
/>
<!-- Default text color is invisible on top of nav bar background -->
<damage_text
diff --git a/indra/newview/skins/default/xui/en/widgets/output_monitor.xml b/indra/newview/skins/default/xui/en/widgets/output_monitor.xml
index 98b3e2faaa..21b957d089 100644
--- a/indra/newview/skins/default/xui/en/widgets/output_monitor.xml
+++ b/indra/newview/skins/default/xui/en/widgets/output_monitor.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<output_monitor
- image_mute="parcel_lght_VoiceNo"
+ image_mute="Parcel_VoiceNo_Light"
image_off="VoicePTT_Off"
image_on="VoicePTT_On"
image_level_1="VoicePTT_Lvl1"
diff --git a/indra/newview/skins/default/xui/en/widgets/search_combo_box.xml b/indra/newview/skins/default/xui/en/widgets/search_combo_box.xml
index c2a70d4b39..5d429d5b5b 100644
--- a/indra/newview/skins/default/xui/en/widgets/search_combo_box.xml
+++ b/indra/newview/skins/default/xui/en/widgets/search_combo_box.xml
@@ -13,7 +13,8 @@
<combo_editor
name="child1"
select_on_focus="true"
- text_pad_left="30"
+ text_pad_left="30"
+ text_tentative_color="TextFgTentativeColor"
background_image="TextField_Search_Off"
background_image_disabled="TextField_Search_Disabled"
background_image_focused="TextField_Search_Active"/>
diff --git a/indra/newview/skins/default/xui/en/widgets/search_editor.xml b/indra/newview/skins/default/xui/en/widgets/search_editor.xml
index f644a710b2..1616e4c3f7 100644
--- a/indra/newview/skins/default/xui/en/widgets/search_editor.xml
+++ b/indra/newview/skins/default/xui/en/widgets/search_editor.xml
@@ -4,6 +4,7 @@
search_button_visible="true"
text_pad_left="6"
select_on_focus="true"
+ text_tentative_color="TextFgTentativeColor"
background_image="TextField_Search_Off"
background_image_disabled="TextField_Search_Disabled"
background_image_focused="TextField_Search_Active" >
diff --git a/indra/newview/skins/default/xui/en/widgets/spinner.xml b/indra/newview/skins/default/xui/en/widgets/spinner.xml
index ab3f8df5f8..d7af6077e5 100644
--- a/indra/newview/skins/default/xui/en/widgets/spinner.xml
+++ b/indra/newview/skins/default/xui/en/widgets/spinner.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<spinner text_enabled_color="LabelTextColor"
text_disabled_color="LabelDisabledColor"
- font="SansSerif"
+ font="SansSerifSmall"
decimal_digits="3"
label_width="40" >
<spinner.up_button name="SpinCtrl Up"
diff --git a/indra/newview/skins/default/xui/en/widgets/teleport_history_menu_item.xml b/indra/newview/skins/default/xui/en/widgets/teleport_history_menu_item.xml
new file mode 100644
index 0000000000..eaa68f5690
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/widgets/teleport_history_menu_item.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<!-- Menu items for the back button drop-down menu of locations.
+ Based on menu_item_call.xml -->
+<teleport_history_menu_item
+ back_item_font="SansSerif"
+ current_item_font="SansSerifBold"
+ forward_item_font="SansSerif"
+ back_item_image="teleport_history_backward.tga"
+ forward_item_image="teleport_history_forward.tga"
+ image_hpad="1"
+ image_vpad="0"
+ />
diff --git a/indra/newview/tests/llviewerhelputil_test.cpp b/indra/newview/tests/llviewerhelputil_test.cpp
index 988d28c301..68743357a6 100644
--- a/indra/newview/tests/llviewerhelputil_test.cpp
+++ b/indra/newview/tests/llviewerhelputil_test.cpp
@@ -36,6 +36,7 @@
#include "../test/lltut.h"
#include "../llviewerhelputil.h"
+#include "../llversioninfo.h"
#include "llcontrol.h"
#include "llsys.h"
@@ -75,6 +76,16 @@ std::string LLControlGroup::getString(const std::string& name)
return test_stringvec[name];
}
+S32 LLVersionInfo::getMajor() { return 2; }
+S32 LLVersionInfo::getMinor() { return 0; }
+S32 LLVersionInfo::getPatch() { return 0; }
+S32 LLVersionInfo::getBuild() { return 200099; }
+const std::string &LLVersionInfo::getVersion()
+{
+ static std::string version = "2.0.0.200099";
+ return version;
+}
+
//----------------------------------------------------------------------------
namespace tut
diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt
index cc9fa598f2..c1360987a5 100644
--- a/indra/test/CMakeLists.txt
+++ b/indra/test/CMakeLists.txt
@@ -119,8 +119,10 @@ get_target_property(TEST_EXE test LOCATION)
IF(WINDOWS)
set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR})
+ELSEIF(DARWIN)
+ set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources:/usr/lib)
ELSE(WINDOWS)
- set(LD_LIBRARY_PATH ${ARCH_PREBUILT_DIRS}:${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}:/usr/lib)
+ set(LD_LIBRARY_PATH ${SHARED_LIB_STAGING_DIR}:/usr/lib)
ENDIF(WINDOWS)
LL_TEST_COMMAND("${LD_LIBRARY_PATH}"
diff --git a/indra/test/llevents_tut.cpp b/indra/test/llevents_tut.cpp
index 31130c3c79..e58b10ce07 100644
--- a/indra/test/llevents_tut.cpp
+++ b/indra/test/llevents_tut.cpp
@@ -21,6 +21,7 @@
#define testable public
#include "llevents.h"
#undef testable
+#include "lllistenerwrapper.h"
// STL headers
// std headers
#include <iostream>
@@ -639,6 +640,33 @@ namespace tut
heaptest.post(2);
}
+ template<> template<>
+ void events_object::test<15>()
+ {
+ // This test ensures that using an LLListenerWrapper subclass doesn't
+ // block Boost.Signals2 from recognizing a bound LLEventTrackable
+ // subclass.
+ set_test_name("listen(llwrap<LLLogListener>(boost::bind(...TempTrackableListener ref...)))");
+ bool live = false;
+ LLEventPump& heaptest(pumps.obtain("heaptest"));
+ LLBoundListener connection;
+ {
+ TempTrackableListener tempListener("temp", live);
+ ensure("TempTrackableListener constructed", live);
+ connection = heaptest.listen(tempListener.getName(),
+ llwrap<LLLogListener>(
+ boost::bind(&TempTrackableListener::call,
+ boost::ref(tempListener), _1)));
+ heaptest.post(1);
+ check_listener("received", tempListener, 1);
+ } // presumably this will make tempListener go away?
+ // verify that
+ ensure("TempTrackableListener destroyed", ! live);
+ ensure("implicit disconnect", ! connection.connected());
+ // now just make sure we don't blow up trying to access a freed object!
+ heaptest.post(2);
+ }
+
class TempSharedListener: public TempListener,
public boost::enable_shared_from_this<TempSharedListener>
{
@@ -649,7 +677,7 @@ namespace tut
};
template<> template<>
- void events_object::test<15>()
+ void events_object::test<16>()
{
set_test_name("listen(boost::bind(...TempSharedListener ref...))");
#if 0
diff --git a/indra/test/llsdutil_tut.cpp b/indra/test/llsdutil_tut.cpp
index d125bb0005..aebb1f9770 100644
--- a/indra/test/llsdutil_tut.cpp
+++ b/indra/test/llsdutil_tut.cpp
@@ -207,7 +207,7 @@ namespace tut
map.insert("Date", LLSD::Date());
map.insert("URI", LLSD::URI());
map.insert("Binary", LLSD::Binary());
- map.insert("Map", LLSD().insert("foo", LLSD()));
+ map.insert("Map", LLSD().with("foo", LLSD()));
// Only an empty array can be constructed on the fly
LLSD array;
array.append(LLSD());
diff --git a/indra/viewer_components/login/tests/lllogin_test.cpp b/indra/viewer_components/login/tests/lllogin_test.cpp
index 99ea796ad0..69a8424e87 100644
--- a/indra/viewer_components/login/tests/lllogin_test.cpp
+++ b/indra/viewer_components/login/tests/lllogin_test.cpp
@@ -29,6 +29,20 @@
#include "llevents.h"
#include "stringize.h"
+#if LL_WINDOWS
+#define skipwin(arg) skip(arg)
+#define skipmac(arg)
+#define skiplinux(arg)
+#elif LL_DARWIN
+#define skipwin(arg)
+#define skipmac(arg) skip(arg)
+#define skiplinux(arg)
+#elif LL_LINUX
+#define skipwin(arg)
+#define skipmac(arg)
+#define skiplinux(arg) skip(arg)
+#endif
+
/*****************************************************************************
* Helper classes
*****************************************************************************/
@@ -416,8 +430,7 @@ namespace tut
ensure_equals("Failed to offline", listener.lastEvent()["state"].asString(), "offline");
}
-/*
- template<> template<>
+ template<> template<>
void llviewerlogin_object::test<5>()
{
DEBUG;
@@ -452,5 +465,4 @@ namespace tut
ensure_equals("SRV Failure", listener.lastEvent()["change"].asString(), "fail.login");
}
-*/
}
diff --git a/install.xml b/install.xml
index 3e49087726..2d60f07c11 100644
--- a/install.xml
+++ b/install.xml
@@ -193,30 +193,30 @@
<key>darwin</key>
<map>
<key>md5sum</key>
- <string>74f3a765644927c93fa3bc7acc730552</string>
+ <string>609c469ee1857723260b5a9943b9c2c1</string>
<key>url</key>
- <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/boost-1.34.1-darwin-20090805.tar.bz2</uri>
+ <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/boost-1.39.0-darwin-20091202.tar.bz2</uri>
</map>
<key>linux</key>
<map>
<key>md5sum</key>
- <string>8fb4151b883b5f5d2b12da19a6ff8e7d</string>
+ <string>7085044567999489d82b9ed28f16e480</string>
<key>url</key>
- <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/boost-1.34.1-linux-20090804.tar.bz2</uri>
+ <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/boost-1.39.0-linux-20091202.tar.bz2</uri>
</map>
<key>linux64</key>
<map>
<key>md5sum</key>
- <string>77237f33b1740daef0dc1e6c801f68e1</string>
+ <string>b4aeefcba3d749f1e9f2a12c6f70192b</string>
<key>url</key>
- <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/boost-1.34.1-linux64-20090804.tar.bz2</uri>
+ <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/boost-1.39.0-linux64-20091202.tar.bz2</uri>
</map>
<key>windows</key>
<map>
<key>md5sum</key>
- <string>4f05166629caa4c132a7448eefb8d592</string>
+ <string>6746ae9fd9aff98b15f7b9f0f40334ab</string>
<key>url</key>
- <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/boost-1.39.0-windows-20090917.tar.bz2</uri>
+ <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/boost-1.39.0-windows-20091204.tar.bz2</uri>
</map>
</map>
</map>
@@ -1367,23 +1367,23 @@ anguage Infrstructure (CLI) international standard</string>
<key>darwin</key>
<map>
<key>md5sum</key>
- <string>dd66471b31d369bb7bcbcc1a833d9070</string>
+ <string>90a08e3a1dffa2ea45c1227c4d4d01f7</string>
<key>url</key>
- <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-3.0.0006.7653-darwin-20091126.tar.bz2</uri>
+ <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-3.0.0006.7714-darwin-20091208.tar.bz2</uri>
</map>
<key>linux</key>
<map>
<key>md5sum</key>
- <string>e56745bc71fc22fc90f80cb359db7022</string>
+ <string>390fe4ed062cfb05bbc534772837ce5e</string>
<key>url</key>
- <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-3.0.0006.7653-linux-20091126.tar.bz2</uri>
+ <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-3.0.0006.7714-linux-20091208.tar.bz2</uri>
</map>
<key>windows</key>
<map>
<key>md5sum</key>
- <string>3081bcc821cdc016aa4127cb026e4311</string>
+ <string>0232fb487bd31ea756604d139b2a2e34</string>
<key>url</key>
- <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-3.0.0006.7653-windows-20091126.tar.bz2</uri>
+ <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-3.0.0006.7714-windows-20091208.tar.bz2</uri>
</map>
</map>
</map>
@@ -1447,9 +1447,9 @@ anguage Infrstructure (CLI) international standard</string>
<key>linux</key>
<map>
<key>md5sum</key>
- <string>1804b54034ef7f82832506a44acb06b8</string>
+ <string>26fe88213c213dc6153690ab142c25ca</string>
<key>url</key>
- <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/zlib-1.2.3-linux-20090603.tar.bz2</uri>
+ <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/zlib-1.2.3dfsg-linux-20091208.tar.bz2</uri>
</map>
<key>linux64</key>
<map>