From 73efd4802b8f02f86599e6b7ab7220b9f9fe2dc0 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Fri, 30 Oct 2009 19:30:23 +0200 Subject: Implemented major task EXT-2022 (Show profile online status for non-friend avatar too.) - imlemented like in viewer 1.23 behavior: show Online status according to avatar properties requested from server. --HG-- branch : product-engine --- indra/newview/llpanelprofileview.cpp | 51 +++++++++++++++++++++++++++++++++--- indra/newview/llpanelprofileview.h | 8 ++++-- 2 files changed, 54 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelprofileview.cpp b/indra/newview/llpanelprofileview.cpp index 1d16c4ef5e..d4ab5013f9 100644 --- a/indra/newview/llpanelprofileview.cpp +++ b/indra/newview/llpanelprofileview.cpp @@ -32,10 +32,12 @@ #include "llviewerprecompiledheaders.h" +#include "llavatarconstants.h" #include "lluserrelations.h" #include "llpanelprofileview.h" +#include "llavatarpropertiesprocessor.h" #include "llcallingcard.h" #include "llpanelavatar.h" #include "llpanelpicks.h" @@ -48,14 +50,46 @@ static std::string PANEL_NOTES = "panel_notes"; static const std::string PANEL_PROFILE = "panel_profile"; static const std::string PANEL_PICKS = "panel_picks"; + +class AvatarStatusObserver : public LLAvatarPropertiesObserver +{ +public: + AvatarStatusObserver(LLPanelProfileView* profile_view) + { + mProfileView = profile_view; + } + + void processProperties(void* data, EAvatarProcessorType type) + { + if(APT_PROPERTIES != type) return; + const LLAvatarData* avatar_data = static_cast(data); + if(avatar_data && mProfileView->getAvatarId() == avatar_data->avatar_id) + { + mProfileView->processOnlineStatus(avatar_data->flags & AVATAR_ONLINE); + LLAvatarPropertiesProcessor::instance().removeObserver(mProfileView->getAvatarId(), this); + } + } + + void subscribe() + { + LLAvatarPropertiesProcessor::instance().addObserver(mProfileView->getAvatarId(), this); + } + +private: + LLPanelProfileView* mProfileView; +}; + LLPanelProfileView::LLPanelProfileView() : LLPanelProfile() , mStatusText(NULL) +, mAvatarStatusObserver(NULL) { + mAvatarStatusObserver = new AvatarStatusObserver(this); } LLPanelProfileView::~LLPanelProfileView(void) { + delete mAvatarStatusObserver; } /*virtual*/ @@ -66,6 +100,9 @@ void LLPanelProfileView::onOpen(const LLSD& key) { id = key["id"]; } + + // subscribe observer to get online status. Request will be sent by LLPanelAvatarProfile itself + mAvatarStatusObserver->subscribe(); if(id.notNull() && getAvatarId() != id) { setAvatarId(id); @@ -74,10 +111,12 @@ void LLPanelProfileView::onOpen(const LLSD& key) // Update the avatar name. gCacheName->get(getAvatarId(), FALSE, boost::bind(&LLPanelProfileView::onAvatarNameCached, this, _1, _2, _3, _4)); - +/* +// disable this part of code according to EXT-2022. See processOnlineStatus // status should only show if viewer has permission to view online/offline. EXT-453 mStatusText->setVisible(isGrantedToSeeOnlineStatus()); updateOnlineStatus(); +*/ LLPanelProfile::onOpen(key); } @@ -93,6 +132,7 @@ BOOL LLPanelProfileView::postBuild() getTabContainer()[PANEL_PROFILE]->childSetVisible("status_combo", FALSE); mStatusText = getChild("status"); + mStatusText->setVisible(false); childSetCommitCallback("back",boost::bind(&LLPanelProfileView::onBackBtnClick,this),NULL); @@ -135,13 +175,18 @@ void LLPanelProfileView::updateOnlineStatus() return; bool online = relationship->isOnline(); -// std::string statusName(); std::string status = getString(online ? "status_online" : "status_offline"); mStatusText->setValue(status); } +void LLPanelProfileView::processOnlineStatus(bool online) +{ + mAvatarIsOnline = online; + mStatusText->setVisible(online); +} + void LLPanelProfileView::onAvatarNameCached(const LLUUID& id, const std::string& first_name, const std::string& last_name, BOOL is_group) { llassert(getAvatarId() == id); @@ -155,7 +200,7 @@ void LLPanelProfileView::togglePanel(LLPanel* panel) { // LLPanelProfile::togglePanel shows/hides all children, // we don't want to display online status for non friends, so re-hide it here - mStatusText->setVisible(isGrantedToSeeOnlineStatus()); + mStatusText->setVisible(mAvatarIsOnline); } } diff --git a/indra/newview/llpanelprofileview.h b/indra/newview/llpanelprofileview.h index 07a6c3a9a0..e89ed07b53 100644 --- a/indra/newview/llpanelprofileview.h +++ b/indra/newview/llpanelprofileview.h @@ -49,6 +49,7 @@ class LLPanelProfileView : public LLPanelProfile { LOG_CLASS(LLPanelProfileView); friend class LLUICtrlFactory; + friend class AvatarStatusObserver; public: @@ -65,8 +66,9 @@ public: protected: void onBackBtnClick(); - bool isGrantedToSeeOnlineStatus(); - void updateOnlineStatus(); + bool isGrantedToSeeOnlineStatus(); // deprecated after EXT-2022 is implemented + void updateOnlineStatus(); // deprecated after EXT-2022 is implemented + void processOnlineStatus(bool online); private: // LLCacheName will call this function when avatar name is loaded from server. @@ -78,6 +80,8 @@ private: BOOL is_group); LLTextBox* mStatusText; + AvatarStatusObserver* mAvatarStatusObserver; + bool mAvatarIsOnline; }; #endif //LL_LLPANELPROFILEVIEW_H -- cgit v1.2.3 From 272a8f8d444124b8acb84d4bc711e9bb7b588b1e Mon Sep 17 00:00:00 2001 From: Denis Serdjuk Date: Fri, 30 Oct 2009 20:31:14 +0200 Subject: linux build fixed. Forward declaration for AvatarStatusObserver has been added. --HG-- branch : product-engine --- indra/newview/llpanelprofileview.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/newview/llpanelprofileview.h b/indra/newview/llpanelprofileview.h index e89ed07b53..b59d1d42f3 100644 --- a/indra/newview/llpanelprofileview.h +++ b/indra/newview/llpanelprofileview.h @@ -40,6 +40,7 @@ class LLPanelProfile; class LLPanelProfileTab; class LLTextBox; +class AvatarStatusObserver; /** * Panel for displaying Avatar's profile. It consists of three sub panels - Profile, -- cgit v1.2.3 From 7912ce0bb36ecd49de1012a676fb71873a4ac717 Mon Sep 17 00:00:00 2001 From: Denis Serdjuk Date: Fri, 30 Oct 2009 20:32:50 +0200 Subject: minor changes for EXT-1334 --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/floater_avatar_picker.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/floater_avatar_picker.xml b/indra/newview/skins/default/xui/en/floater_avatar_picker.xml index 3f4f8b197f..1fd9b95318 100644 --- a/indra/newview/skins/default/xui/en/floater_avatar_picker.xml +++ b/indra/newview/skins/default/xui/en/floater_avatar_picker.xml @@ -104,9 +104,9 @@ layout="topleft" left="10" name="InstructSelectFriend" - top="15" + top="5" width="200"> - Select a friend(s): + Select a person: -- cgit v1.2.3 From 2a79326ff63d26f6f7d51ae195dfc7ab4600b407 Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Mon, 2 Nov 2009 14:23:40 -0800 Subject: Removed tabs. Fixed errant 'else(APPLE)' --- indra/cmake/LLSharedLibs.cmake | 44 +++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'indra') diff --git a/indra/cmake/LLSharedLibs.cmake b/indra/cmake/LLSharedLibs.cmake index 3be22ab401..a8c81609bb 100644 --- a/indra/cmake/LLSharedLibs.cmake +++ b/indra/cmake/LLSharedLibs.cmake @@ -3,29 +3,29 @@ # search_dirs: a list of dirs to search for the dependencies # dst_path: path to copy deps to, relative to the output location of the target_exe macro(ll_deploy_sharedlibs_command target_exe search_dirs dst_path) - get_target_property(OUTPUT_LOCATION ${target_exe} LOCATION) + get_target_property(OUTPUT_LOCATION ${target_exe} LOCATION) - if(DARWIN) - get_target_property(IS_BUNDLE ${target_exe} MACOSX_BUNDLE) - if(IS_BUNDLE) - get_filename_component(TARGET_FILE ${OUTPUT_LOCATION} NAME) - set(OUTPUT_PATH ${OUTPUT_LOCATION}.app/Contents/MacOS) - set(OUTPUT_LOCATION ${OUTPUT_PATH}/${TARGET_FILE}) - endif(IS_BUNDLE) - else(APPLE) - message(FATAL_ERROR "Only darwin currently supported!") - endif(DARWIN) - - add_custom_command( - TARGET ${target_exe} POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS - "-DBIN_NAME=\"${OUTPUT_LOCATION}\"" - "-DSEARCH_DIRS=\"${search_dirs}\"" - "-DDST_PATH=\"${OUTPUT_PATH}/${dst_path}\"" - "-P" - "${CMAKE_SOURCE_DIR}/cmake/DeploySharedLibs.cmake" - ) + if(DARWIN) + get_target_property(IS_BUNDLE ${target_exe} MACOSX_BUNDLE) + if(IS_BUNDLE) + get_filename_component(TARGET_FILE ${OUTPUT_LOCATION} NAME) + set(OUTPUT_PATH ${OUTPUT_LOCATION}.app/Contents/MacOS) + set(OUTPUT_LOCATION ${OUTPUT_PATH}/${TARGET_FILE}) + endif(IS_BUNDLE) + else(DARWIN) + message(FATAL_ERROR "Only darwin currently supported!") + endif(DARWIN) + + add_custom_command( + TARGET ${target_exe} POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS + "-DBIN_NAME=\"${OUTPUT_LOCATION}\"" + "-DSEARCH_DIRS=\"${search_dirs}\"" + "-DDST_PATH=\"${OUTPUT_PATH}/${dst_path}\"" + "-P" + "${CMAKE_SOURCE_DIR}/cmake/DeploySharedLibs.cmake" + ) endmacro(ll_deploy_sharedlibs_command) -- cgit v1.2.3 From 44eea89d001ccb09343dda973af0dabecb1ec48d Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Mon, 2 Nov 2009 15:10:08 -0800 Subject: Make the "default hover controls" be the "authored" controls (and I made a debug setting that can override this) --- indra/newview/app_settings/settings.xml | 12 +++++++++++- indra/newview/llpanelprimmediacontrols.cpp | 9 ++++++--- indra/newview/llviewermedia.h | 2 +- 3 files changed, 18 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index c4722b772e..768fdd4103 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -5294,7 +5294,6 @@ Value 1 - PluginInstancesCPULimit Comment @@ -5360,6 +5359,17 @@ U32 Value 13 + + PrimMediaControlsUseHoverControlSet + + Comment + Whether or not hovering over prim media uses minimal "hover" controls or the authored control set. + Persist + 1 + Type + Boolean + Value + 0 PrimMediaMaxRetries diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index e4b32c4820..58ca481b77 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -228,7 +228,10 @@ void LLPanelPrimMediaControls::updateShape() bool can_navigate = parcel->getMediaAllowNavigate(); bool enabled = false; - bool has_focus = media_impl->hasFocus(); + // There is no such thing as "has_focus" being different from normal controls set + // anymore (as of user feedback from bri 10/09). So we cheat here and force 'has_focus' + // to 'true' (or, actually, we use a setting) + bool has_focus = (gSavedSettings.getBOOL("PrimMediaControlsUseHoverControlSet")) ? media_impl->hasFocus() : true; setVisible(enabled); if (objectp) @@ -310,8 +313,8 @@ void LLPanelPrimMediaControls::updateShape() fwd_ctrl->setEnabled(has_focus); media_address_ctrl->setVisible(false); media_address_ctrl->setEnabled(false); - media_play_slider_panel->setVisible(!mini_controls); - media_play_slider_panel->setEnabled(!mini_controls); + media_play_slider_panel->setVisible(has_focus && !mini_controls); + media_play_slider_panel->setEnabled(has_focus && !mini_controls); volume_ctrl->setVisible(has_focus); volume_up_ctrl->setVisible(has_focus); diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index 517a76ce3d..d6dde0c93e 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -258,7 +258,7 @@ public: void calculateInterest(); F64 getInterest() const { return mInterest; }; F64 getApproximateTextureInterest(); - S32 getProximity() { return mProximity; }; + S32 getProximity() const { return mProximity; }; // Mark this object as being used in a UI panel instead of on a prim // This will be used as part of the interest sorting algorithm. -- cgit v1.2.3 From 8af4e3359cb01f62089787aba7a436b7856d6098 Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Mon, 2 Nov 2009 23:44:21 +0000 Subject: EXT-1588: Remove support for automatic hyperlinking of URLs in notecards until this issue can be addressed correctly. The best solution would be to implement support for alternative display strings for URL text segments. That way, the raw text will contain the original URL string, but we can show a display-only alternate label for the URL. Until I get round to doing this, I'm turning off URL hyperlinking in notecards to avoid the potential for data loss. --- indra/newview/skins/default/xui/en/floater_preview_notecard.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/floater_preview_notecard.xml b/indra/newview/skins/default/xui/en/floater_preview_notecard.xml index 3797055054..b44de8e178 100644 --- a/indra/newview/skins/default/xui/en/floater_preview_notecard.xml +++ b/indra/newview/skins/default/xui/en/floater_preview_notecard.xml @@ -75,7 +75,7 @@ left="4" max_length="65536" name="Notecard Editor" - allow_html="true" + allow_html="false" handle_edit_keys_directly="true" tab_group="1" top="46" -- cgit v1.2.3 From f344c5b7ecf721329ef87044eeec06c6669618d8 Mon Sep 17 00:00:00 2001 From: "Eric M. Tulla (BigPapi)" Date: Mon, 2 Nov 2009 18:50:50 -0500 Subject: Fix for EXT-894: upload anim preview was using bad texture data instead of grey. Switched rendering of dummy mesh for previews (anim, etc) to use default image, instead of default avatar image. -Reviewed by nyx --- indra/newview/llviewerjointmesh.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp index cd60a8d560..5b8902dec4 100644 --- a/indra/newview/llviewerjointmesh.cpp +++ b/indra/newview/llviewerjointmesh.cpp @@ -582,7 +582,7 @@ U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy) } else { - gGL.getTexUnit(0)->bind(LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT_AVATAR)); + gGL.getTexUnit(0)->bind(LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT)); } if (gRenderForSelect) -- cgit v1.2.3 From 3c1c0d7544805df7d77b7f2af4ab1f83ebf0839c Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Mon, 2 Nov 2009 17:58:10 -0800 Subject: Changed the operation of the "mute all" button in the nearby media floater to be closer to spec-compliant, per a design discussion this afternoon. --- indra/newview/llviewermediafocus.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra') diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp index 2f7040aaa3..657c58364f 100644 --- a/indra/newview/llviewermediafocus.cpp +++ b/indra/newview/llviewermediafocus.cpp @@ -86,6 +86,9 @@ void LLViewerMediaFocus::setFocusFace(LLPointer objectp, S32 fac mFocusedObjectID = objectp->getID(); mFocusedObjectFace = face; mFocusedObjectNormal = pick_normal; + + // Focusing on a media face clears its disable flag. + media_impl->setDisabled(false); LLTextureEntry* tep = objectp->getTE(face); if(tep->hasMedia()) -- cgit v1.2.3