From 8f89681e068365a2c352c76eb408b99784621c04 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Thu, 28 Jan 2010 20:06:57 +0200 Subject: Fixed normal bug (EXT-4610) [BSI] parcel settings icons do not match parcel settings - Changed parcel settings behavior to match viewer 1.23. --HG-- branch : product-engine --- indra/newview/lllocationinputctrl.cpp | 6 ++++-- indra/newview/llviewerparcelmgr.cpp | 4 ++-- indra/newview/skins/default/xui/en/widgets/location_input.xml | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 7f49a7defb..050cfcc3d9 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -39,6 +39,7 @@ #include "llbutton.h" #include "llfocusmgr.h" #include "llmenugl.h" +#include "llparcel.h" #include "llstring.h" #include "lltrans.h" #include "lluictrlfactory.h" @@ -672,11 +673,12 @@ void LLLocationInputCtrl::refreshParcelIcons() if (show_properties) { LLViewerParcelMgr* vpm = LLViewerParcelMgr::getInstance(); - bool allow_buy = vpm->canAgentBuyParcel( vpm->getAgentParcel(), false); + LLParcel* agent_parcel = vpm->getAgentParcel(); + bool allow_buy = vpm->canAgentBuyParcel( agent_parcel, false); bool allow_voice = vpm->allowAgentVoice(); bool allow_fly = vpm->allowAgentFly(); bool allow_push = vpm->allowAgentPush(); - bool allow_build = vpm->allowAgentBuild(); + bool allow_build = agent_parcel && agent_parcel->getAllowModify(); // true when anyone is allowed to build. See EXT-4610. bool allow_scripts = vpm->allowAgentScripts(); bool allow_damage = vpm->allowAgentDamage(); diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index 10a95443f1..b3450a8f36 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -706,8 +706,8 @@ bool LLViewerParcelMgr::allowAgentScripts() const bool LLViewerParcelMgr::allowAgentDamage() const { LLViewerRegion* region = gAgent.getRegion(); - return region && region->getAllowDamage() - && mAgentParcel && mAgentParcel->getAllowDamage(); + return (region && region->getAllowDamage()) + || (mAgentParcel && mAgentParcel->getAllowDamage()); } BOOL LLViewerParcelMgr::isOwnedAt(const LLVector3d& pos_global) const 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 1c0a8ba7c5..70a58b8e03 100644 --- a/indra/newview/skins/default/xui/en/widgets/location_input.xml +++ b/indra/newview/skins/default/xui/en/widgets/location_input.xml @@ -96,7 +96,7 @@ name="damage_icon" width="14" height="13" - top="25" + top="21" left="2" follows="right|top" image_name="Parcel_Damage_Dark" -- cgit v1.2.3 From fbe21db8572c6d0e6a429a3ca209da6e26badf56 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Thu, 28 Jan 2010 20:07:25 +0200 Subject: No ticket. Fixed possible build error. --HG-- branch : product-engine --- indra/newview/llpanelplaces.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelplaces.h b/indra/newview/llpanelplaces.h index 5de78b1595..110d7a1054 100644 --- a/indra/newview/llpanelplaces.h +++ b/indra/newview/llpanelplaces.h @@ -32,9 +32,9 @@ #ifndef LL_LLPANELPLACES_H #define LL_LLPANELPLACES_H -#include "llpanel.h" +#include "lltimer.h" -class LLTimer; +#include "llpanel.h" class LLInventoryItem; class LLFilterEditor; -- cgit v1.2.3 From 1b46e8894a40d46df948a034dd0413e97147748d Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Thu, 28 Jan 2010 17:17:55 +0200 Subject: Fixed normal bug EXT-4734 - In profile side-panels, area for homepage URL appears clickable without URL. --HG-- branch : product-engine --- indra/newview/llpanelavatar.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index fe5b20813a..48dd5513bd 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -635,6 +635,9 @@ void LLPanelAvatarProfile::fillCommonData(const LLAvatarData* avatar_data) childSetValue("2nd_life_pic", avatar_data->image_id); childSetValue("real_world_pic", avatar_data->fl_image_id); childSetValue("homepage_edit", avatar_data->profile_url); + + // Hide home page textbox if no page was set to fix "homepage URL appears clickable without URL - EXT-4734" + childSetVisible("homepage_edit", !avatar_data->profile_url.empty()); } void LLPanelAvatarProfile::fillPartnerData(const LLAvatarData* avatar_data) -- cgit v1.2.3 From 3b0e95bf3c36896b21cd6e82bda2d6ceaf356320 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Thu, 28 Jan 2010 20:10:40 +0200 Subject: Renamed some members of LLToastIMPanel to make them self-explanatory. --HG-- branch : product-engine --- indra/newview/lltoastimpanel.cpp | 14 +++++++------- indra/newview/lltoastimpanel.h | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp index d62017cc2f..7717ae9e01 100644 --- a/indra/newview/lltoastimpanel.cpp +++ b/indra/newview/lltoastimpanel.cpp @@ -41,14 +41,14 @@ const S32 LLToastIMPanel::DEFAULT_MESSAGE_MAX_LINE_COUNT = 6; //-------------------------------------------------------------------------- LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notification), - mAvatar(NULL), mUserName(NULL), + mAvatarIcon(NULL), mAvatarName(NULL), mTime(NULL), mMessage(NULL) { LLUICtrlFactory::getInstance()->buildPanel(this, "panel_instant_message.xml"); LLIconCtrl* sys_msg_icon = getChild("sys_msg_icon"); - mAvatar = getChild("avatar_icon"); - mUserName = getChild("user_name"); + mAvatarIcon = getChild("avatar_icon"); + mAvatarName = getChild("user_name"); mTime = getChild("time_box"); mMessage = getChild("message"); @@ -77,22 +77,22 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif mMessage->setValue(p.message); } - mUserName->setValue(p.from); + mAvatarName->setValue(p.from); mTime->setValue(p.time); mSessionID = p.session_id; mNotification = p.notification; if(p.from == SYSTEM_FROM) { - mAvatar->setVisible(FALSE); + mAvatarIcon->setVisible(FALSE); sys_msg_icon->setVisible(TRUE); } else { - mAvatar->setVisible(TRUE); + mAvatarIcon->setVisible(TRUE); sys_msg_icon->setVisible(FALSE); - mAvatar->setValue(p.avatar_id); + mAvatarIcon->setValue(p.avatar_id); } S32 maxLinesCount; diff --git a/indra/newview/lltoastimpanel.h b/indra/newview/lltoastimpanel.h index 53661f2cf6..42d9a97c3f 100644 --- a/indra/newview/lltoastimpanel.h +++ b/indra/newview/lltoastimpanel.h @@ -63,8 +63,8 @@ private: LLNotificationPtr mNotification; LLUUID mSessionID; - LLAvatarIconCtrl* mAvatar; - LLTextBox* mUserName; + LLAvatarIconCtrl* mAvatarIcon; + LLTextBox* mAvatarName; LLTextBox* mTime; LLTextBox* mMessage; }; -- cgit v1.2.3 From d383adfc92e099676313ed930b2c1c8b1a315ae3 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Thu, 28 Jan 2010 22:02:31 +0200 Subject: Fixed bug EXT-3773 (Group chat toasts should have inspectors for names). Added on-hover icons to invoke avatar inspector to IM toasts. --HG-- branch : product-engine --- indra/newview/lltoastimpanel.cpp | 37 +++++++++++++++++++++++++++++++++++++ indra/newview/lltoastimpanel.h | 3 +++ 2 files changed, 40 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp index 7717ae9e01..89a58cd736 100644 --- a/indra/newview/lltoastimpanel.cpp +++ b/indra/newview/lltoastimpanel.cpp @@ -33,8 +33,11 @@ #include "llviewerprecompiledheaders.h" #include "lltoastimpanel.h" +#include "llfloaterreg.h" #include "llnotifications.h" #include "llinstantmessage.h" +#include "lltooltip.h" + #include "llviewerchat.h" const S32 LLToastIMPanel::DEFAULT_MESSAGE_MAX_LINE_COUNT = 6; @@ -80,6 +83,7 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif mAvatarName->setValue(p.from); mTime->setValue(p.time); mSessionID = p.session_id; + mAvatarID = p.avatar_id; mNotification = p.notification; if(p.from == SYSTEM_FROM) @@ -119,3 +123,36 @@ BOOL LLToastIMPanel::handleMouseDown(S32 x, S32 y, MASK mask) return TRUE; } + +//virtual +BOOL LLToastIMPanel::handleToolTip(S32 x, S32 y, MASK mask) +{ + // It's not our direct child, so parentPointInView() doesn't work. + LLRect name_rect; + mAvatarName->localRectToOtherView(mAvatarName->getLocalRect(), &name_rect, this); + if (!name_rect.pointInRect(x, y)) + return LLToastPanel::handleToolTip(x, y, mask); + + // Spawn at right side of the name textbox. + LLRect sticky_rect = mAvatarName->calcScreenRect(); + S32 icon_x = llmin(sticky_rect.mLeft + mAvatarName->getTextPixelWidth() + 3, sticky_rect.mRight - 16); + LLCoordGL pos(icon_x, sticky_rect.mTop); + + LLToolTip::Params params; + params.background_visible(false); + params.click_callback(boost::bind(&LLToastIMPanel::showInspector, this)); + params.delay_time(0.0f); // spawn instantly on hover + params.image(LLUI::getUIImage("Info_Small")); + params.message(""); + params.padding(0); + params.pos(pos); + params.sticky_rect(sticky_rect); + + LLToolTipMgr::getInstance()->show(params); + return TRUE; +} + +void LLToastIMPanel::showInspector() +{ + LLFloaterReg::showInstance("inspect_avatar", LLSD().with("avatar_id", mAvatarID)); +} diff --git a/indra/newview/lltoastimpanel.h b/indra/newview/lltoastimpanel.h index 42d9a97c3f..154e6dae16 100644 --- a/indra/newview/lltoastimpanel.h +++ b/indra/newview/lltoastimpanel.h @@ -58,11 +58,14 @@ public: LLToastIMPanel(LLToastIMPanel::Params &p); virtual ~LLToastIMPanel(); /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask); + /*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask); private: + void showInspector(); static const S32 DEFAULT_MESSAGE_MAX_LINE_COUNT; LLNotificationPtr mNotification; LLUUID mSessionID; + LLUUID mAvatarID; LLAvatarIconCtrl* mAvatarIcon; LLTextBox* mAvatarName; LLTextBox* mTime; -- cgit v1.2.3