summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llavatarlistitem.cpp31
-rw-r--r--indra/newview/llfloatergodtools.cpp6
-rw-r--r--indra/newview/llfloaterworldmap.cpp7
-rw-r--r--indra/newview/llimfloater.cpp7
-rw-r--r--indra/newview/llimfloatercontainer.cpp12
-rw-r--r--indra/newview/llimfloatercontainer.h2
-rw-r--r--indra/newview/lllocationinputctrl.cpp11
-rw-r--r--indra/newview/llpanelmaininventory.cpp5
-rw-r--r--indra/newview/llpreviewscript.cpp6
-rw-r--r--indra/newview/lltoolpie.cpp3
-rw-r--r--indra/newview/llviewermenu.cpp13
-rw-r--r--indra/newview/llvoiceclient.cpp23
12 files changed, 88 insertions, 38 deletions
diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp
index 846b2843dd..5011b191f4 100644
--- a/indra/newview/llavatarlistitem.cpp
+++ b/indra/newview/llavatarlistitem.cpp
@@ -526,21 +526,30 @@ void LLAvatarListItem::updateChildren()
LLView* LLAvatarListItem::getItemChildView(EAvatarListItemChildIndex child_view_index)
{
LLView* child_view = mAvatarName;
- if (child_view_index < 0 || ALIC_COUNT <= child_view_index)
- {
- LL_WARNS("AvatarItemReshape") << "Child view index is out of range: " << child_view_index << LL_ENDL;
- return child_view;
- }
+
switch (child_view_index)
{
- case ALIC_ICON: child_view = mAvatarIcon; break;
- case ALIC_NAME: child_view = mAvatarName; break;
- case ALIC_INTERACTION_TIME: child_view = mLastInteractionTime; break;
- case ALIC_SPEAKER_INDICATOR: child_view = mSpeakingIndicator; break;
- case ALIC_INFO_BUTTON: child_view = mInfoBtn; break;
- case ALIC_PROFILE_BUTTON: child_view = mProfileBtn; break;
+ case ALIC_ICON:
+ child_view = mAvatarIcon;
+ break;
+ case ALIC_NAME:
+ child_view = mAvatarName;
+ break;
+ case ALIC_INTERACTION_TIME:
+ child_view = mLastInteractionTime;
+ break;
+ case ALIC_SPEAKER_INDICATOR:
+ child_view = mSpeakingIndicator;
+ break;
+ case ALIC_INFO_BUTTON:
+ child_view = mInfoBtn;
+ break;
+ case ALIC_PROFILE_BUTTON:
+ child_view = mProfileBtn;
+ break;
default:
LL_WARNS("AvatarItemReshape") << "Unexpected child view index is passed: " << child_view_index << LL_ENDL;
+ // leave child_view untouched
}
return child_view;
diff --git a/indra/newview/llfloatergodtools.cpp b/indra/newview/llfloatergodtools.cpp
index 5294f09e64..eb56f387cd 100644
--- a/indra/newview/llfloatergodtools.cpp
+++ b/indra/newview/llfloatergodtools.cpp
@@ -213,6 +213,9 @@ void LLFloaterGodTools::showPanel(const std::string& panel_name)
// static
void LLFloaterGodTools::processRegionInfo(LLMessageSystem* msg)
{
+ llassert(msg);
+ if (!msg) return;
+
LLHost host = msg->getSender();
if (host != gAgent.getRegionHost())
{
@@ -270,8 +273,7 @@ void LLFloaterGodTools::processRegionInfo(LLMessageSystem* msg)
if ( gAgent.isGodlike()
&& LLFloaterReg::instanceVisible("god_tools")
&& god_tools->mPanelRegionTools
- && god_tools->mPanelObjectTools
- && msg )
+ && god_tools->mPanelObjectTools)
{
LLPanelRegionTools* rtool = god_tools->mPanelRegionTools;
god_tools->mCurrentHost = host;
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index f4d4ea3553..b6de409611 100644
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -788,8 +788,11 @@ void LLFloaterWorldMap::friendsChanged()
if(avatar_id.notNull())
{
LLCtrlSelectionInterface *iface = childGetSelectionInterface("friend combo");
- if(!iface || !iface->setCurrentByID(avatar_id) ||
- !t.getBuddyInfo(avatar_id)->isRightGrantedFrom(LLRelationship::GRANT_MAP_LOCATION) || gAgent.isGodlike())
+ const LLRelationship* buddy_info = t.getBuddyInfo(avatar_id);
+ if(!iface ||
+ !iface->setCurrentByID(avatar_id) ||
+ (buddy_info && !buddy_info->isRightGrantedFrom(LLRelationship::GRANT_MAP_LOCATION)) ||
+ gAgent.isGodlike())
{
LLTracker::stopTracking(NULL);
}
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index 94b540a7e1..52312b87a5 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -514,6 +514,13 @@ BOOL LLIMFloater::getVisible()
// Treat inactive floater as invisible.
bool is_active = im_container->getActiveFloater() == this;
+
+ //torn off floater is always inactive
+ if (!is_active && getHost() != im_container)
+ {
+ return LLTransientDockableFloater::getVisible();
+ }
+
// getVisible() returns TRUE when Tabbed IM window is minimized.
return is_active && !im_container->isMinimized() && im_container->getVisible();
}
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp
index 49521b5987..a775115ac9 100644
--- a/indra/newview/llimfloatercontainer.cpp
+++ b/indra/newview/llimfloatercontainer.cpp
@@ -145,4 +145,16 @@ LLIMFloaterContainer* LLIMFloaterContainer::getInstance()
return LLFloaterReg::getTypedInstance<LLIMFloaterContainer>("im_container");
}
+void LLIMFloaterContainer::setMinimized(BOOL b)
+{
+ LLMultiFloater::setMinimized(b);
+
+ if (isMinimized()) return;
+
+ if (getActiveFloater())
+ {
+ getActiveFloater()->setVisible(TRUE);
+ }
+}
+
// EOF
diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h
index 46c0617c01..f6cdc25ebd 100644
--- a/indra/newview/llimfloatercontainer.h
+++ b/indra/newview/llimfloatercontainer.h
@@ -63,6 +63,8 @@ public:
static LLIMFloaterContainer* getInstance();
+ virtual void setMinimized(BOOL b);
+
private:
typedef std::map<LLUUID,LLFloater*> avatarID_panel_map_t;
avatarID_panel_map_t mSessions;
diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp
index f48c96190f..c66d067779 100644
--- a/indra/newview/lllocationinputctrl.cpp
+++ b/indra/newview/lllocationinputctrl.cpp
@@ -833,10 +833,13 @@ void LLLocationInputCtrl::refreshParcelIcons()
mDamageText->setVisible(false);
}
- S32 left_pad, right_pad;
- mTextEntry->getTextPadding(&left_pad, &right_pad);
- right_pad = mTextEntry->getRect().mRight - x;
- mTextEntry->setTextPadding(left_pad, right_pad);
+ if (mTextEntry)
+ {
+ S32 left_pad, right_pad;
+ mTextEntry->getTextPadding(&left_pad, &right_pad);
+ right_pad = mTextEntry->getRect().mRight - x;
+ mTextEntry->setTextPadding(left_pad, right_pad);
+ }
}
void LLLocationInputCtrl::refreshHealth()
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 1895993a8e..2d3401966b 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -1003,7 +1003,10 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata)
}
const LLUUID item_id = current_item->getListener()->getUUID();
LLViewerInventoryItem *item = gInventory.getItem(item_id);
- item->regenerateLink();
+ if (item)
+ {
+ item->regenerateLink();
+ }
active_panel->setSelection(item_id, TAKE_FOCUS_NO);
}
if (command_name == "find_original")
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index 3221745fa3..f5a9f82d50 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -955,8 +955,12 @@ BOOL LLPreviewLSL::postBuild()
{
const LLInventoryItem* item = getItem();
+ llassert(item);
+ if (item)
+ {
+ childSetText("desc", item->getDescription());
+ }
childSetCommitCallback("desc", LLPreview::onText, this);
- childSetText("desc", item->getDescription());
childSetPrevalidate("desc", &LLTextValidate::validateASCIIPrintableNoPipe);
return LLPreview::postBuild();
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index fdf9e1df2e..fb78b6a415 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -1263,11 +1263,10 @@ bool LLToolPie::handleMediaClick(const LLPickInfo& pick)
return false;
LLMediaEntry* mep = (tep->hasMedia()) ? tep->getMediaData() : NULL;
-
if(!mep)
return false;
- viewer_media_t media_impl = mep ? LLViewerMedia::getMediaImplFromTextureID(mep->getMediaID()) : NULL;
+ viewer_media_t media_impl = LLViewerMedia::getMediaImplFromTextureID(mep->getMediaID());
if (gSavedSettings.getBOOL("MediaOnAPrimUI"))
{
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 8c61ba7558..24a788aaed 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -3554,9 +3554,15 @@ bool LLHaveCallingcard::operator()(LLInventoryCategory* cat,
BOOL is_agent_mappable(const LLUUID& agent_id)
{
- return (LLAvatarActions::isFriend(agent_id) &&
- LLAvatarTracker::instance().getBuddyInfo(agent_id)->isOnline() &&
- LLAvatarTracker::instance().getBuddyInfo(agent_id)->isRightGrantedFrom(LLRelationship::GRANT_MAP_LOCATION)
+ const LLRelationship* buddy_info = NULL;
+ bool is_friend = LLAvatarActions::isFriend(agent_id);
+
+ if (is_friend)
+ buddy_info = LLAvatarTracker::instance().getBuddyInfo(agent_id);
+
+ return (buddy_info &&
+ buddy_info->isOnline() &&
+ buddy_info->isRightGrantedFrom(LLRelationship::GRANT_MAP_LOCATION)
);
}
@@ -6402,7 +6408,6 @@ class LLToolsSelectedScriptAction : public view_listener_t
else
{
llwarns << "Failed to generate LLFloaterScriptQueue with action: " << action << llendl;
- delete queue;
}
return true;
}
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp
index f3bfc2e86c..3d153db733 100644
--- a/indra/newview/llvoiceclient.cpp
+++ b/indra/newview/llvoiceclient.cpp
@@ -5377,24 +5377,25 @@ LLVoiceClient::sessionState* LLVoiceClient::startUserIMSession(const LLUUID &uui
// No session with user, need to start one.
std::string uri = sipURIFromID(uuid);
session = addSession(uri);
+
+ llassert(session);
+ if (!session) return NULL;
+
session->mIsSpatial = false;
session->mReconnect = false;
session->mIsP2P = true;
session->mCallerID = uuid;
}
- if(session)
+ if(session->mHandle.empty())
{
- if(session->mHandle.empty())
- {
- // Session isn't active -- start it up.
- sessionCreateSendMessage(session, false, true);
- }
- else
- {
- // Session is already active -- start up text.
- sessionTextConnectSendMessage(session);
- }
+ // Session isn't active -- start it up.
+ sessionCreateSendMessage(session, false, true);
+ }
+ else
+ {
+ // Session is already active -- start up text.
+ sessionTextConnectSendMessage(session);
}
return session;