summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-02-01 16:59:52 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2010-02-01 16:59:52 +0000
commita8f42e51903bfc35dc56c4dc5f050d1570110634 (patch)
treea010c7f3ed662f666a242d3056a811794d309350 /indra
parentf7f73568b5b3d63ffe589aeabad02dcb2a6c671c (diff)
parent7bcba326b32e1aca678edfb4495d1e2d4d44cb71 (diff)
merge
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/lldockablefloater.cpp2
-rw-r--r--indra/llui/llfloater.h1
-rw-r--r--indra/newview/llfloatermap.cpp4
-rw-r--r--indra/newview/llimfloater.cpp19
-rw-r--r--indra/newview/llimfloater.h1
-rw-r--r--indra/newview/llimview.cpp7
-rw-r--r--indra/newview/llnamelistctrl.cpp2
-rw-r--r--indra/newview/llnotificationhandlerutil.cpp8
-rw-r--r--indra/newview/lloutputmonitorctrl.cpp5
-rw-r--r--indra/newview/llspeakingindicatormanager.cpp41
-rw-r--r--indra/newview/skins/default/xui/en/floater_map.xml40
11 files changed, 100 insertions, 30 deletions
diff --git a/indra/llui/lldockablefloater.cpp b/indra/llui/lldockablefloater.cpp
index 74438b184a..57baf28dab 100644
--- a/indra/llui/lldockablefloater.cpp
+++ b/indra/llui/lldockablefloater.cpp
@@ -146,7 +146,7 @@ void LLDockableFloater::setVisible(BOOL visible)
if (visible)
{
- LLFloater::setFrontmost(TRUE);
+ LLFloater::setFrontmost(getAutoFocus());
}
LLFloater::setVisible(visible);
}
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index 8c9dacbd20..2166d8db8a 100644
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -301,6 +301,7 @@ protected:
const LLRect& getExpandedRect() const { return mExpandedRect; }
void setAutoFocus(BOOL focus) { mAutoFocus = focus; } // whether to automatically take focus when opened
+ BOOL getAutoFocus() const { return mAutoFocus; }
LLDragHandle* getDragHandle() const { return mDragHandle; }
void destroy() { die(); } // Don't call this directly. You probably want to call closeFloater()
diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp
index 568f4b254e..051ab585e2 100644
--- a/indra/newview/llfloatermap.cpp
+++ b/indra/newview/llfloatermap.cpp
@@ -142,8 +142,8 @@ void LLFloaterMap::setDirectionPos( LLTextBox* text_box, F32 rotation )
// Rotation is in radians.
// Rotation of 0 means x = 1, y = 0 on the unit circle.
- F32 map_half_height = (F32)(getRect().getHeight() / 2);
- F32 map_half_width = (F32)(getRect().getWidth() / 2);
+ F32 map_half_height = (F32)(getRect().getHeight() / 2) - getHeaderHeight()/2;
+ F32 map_half_width = (F32)(getRect().getWidth() / 2) ;
F32 text_half_height = (F32)(text_box->getRect().getHeight() / 2);
F32 text_half_width = (F32)(text_box->getRect().getWidth() / 2);
F32 radius = llmin( map_half_height - text_half_height, map_half_width - text_half_width );
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index 9e52d4c6c2..4a18c8640f 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -510,6 +510,20 @@ void LLIMFloater::setVisible(BOOL visible)
}
}
+BOOL LLIMFloater::getVisible()
+{
+ if(isChatMultiTab())
+ {
+ LLIMFloaterContainer* im_container = LLIMFloaterContainer::getInstance();
+ // Tabbed IM window is "visible" when we minimize it.
+ return !im_container->isMinimized() && im_container->getVisible();
+ }
+ else
+ {
+ return LLTransientDockableFloater::getVisible();
+ }
+}
+
//static
bool LLIMFloater::toggle(const LLUUID& session_id)
{
@@ -585,6 +599,9 @@ void LLIMFloater::updateMessages()
{
// LLUIColor chat_color = LLUIColorTable::instance().getColor("IMChatColor");
+ LLSD chat_args;
+ chat_args["use_plain_text_chat_history"] = use_plain_text_chat_history;
+
std::ostringstream message;
std::list<LLSD>::const_reverse_iterator iter = messages.rbegin();
std::list<LLSD>::const_reverse_iterator iter_end = messages.rend();
@@ -614,7 +631,7 @@ void LLIMFloater::updateMessages()
chat.mText = message;
}
- mChatHistory->appendMessage(chat, use_plain_text_chat_history);
+ mChatHistory->appendMessage(chat, chat_args);
mLastMessageIndex = msg["index"].asInteger();
}
}
diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h
index 9552b30737..2f034d02b8 100644
--- a/indra/newview/llimfloater.h
+++ b/indra/newview/llimfloater.h
@@ -58,6 +58,7 @@ public:
// LLView overrides
/*virtual*/ BOOL postBuild();
/*virtual*/ void setVisible(BOOL visible);
+ /*virtual*/ BOOL getVisible();
// Check typing timeout timer.
/*virtual*/ void draw();
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index b7d4db853e..db6b2041f8 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -1467,6 +1467,7 @@ LLCallDialog::LLCallDialog(const LLSD& payload)
mPayload(payload),
mLifetime(DEFAULT_LIFETIME)
{
+ setAutoFocus(FALSE);
}
void LLCallDialog::getAllowedRect(LLRect& rect)
@@ -1794,7 +1795,7 @@ BOOL LLIncomingCallDialog::postBuild()
childSetAction("Accept", onAccept, this);
childSetAction("Reject", onReject, this);
childSetAction("Start IM", onStartIM, this);
- childSetFocus("Accept");
+ setDefaultBtn("Accept");
std::string notify_box_type = mPayload["notify_box_type"].asString();
if(notify_box_type != "VoiceInviteGroup" && notify_box_type != "VoiceInviteAdHoc")
@@ -2424,7 +2425,7 @@ void LLIMMgr::inviteToSession(
}
else
{
- LLFloaterReg::showInstance("incoming_call", payload, TRUE);
+ LLFloaterReg::showInstance("incoming_call", payload, FALSE);
}
mPendingInvitations[session_id.asString()] = LLSD();
}
@@ -2437,7 +2438,7 @@ void LLIMMgr::onInviteNameLookup(LLSD payload, const LLUUID& id, const std::stri
std::string notify_box_type = payload["notify_box_type"].asString();
- LLFloaterReg::showInstance("incoming_call", payload, TRUE);
+ LLFloaterReg::showInstance("incoming_call", payload, FALSE);
}
//*TODO disconnects all sessions
diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp
index 9f04558d50..8c875c9b63 100644
--- a/indra/newview/llnamelistctrl.cpp
+++ b/indra/newview/llnamelistctrl.cpp
@@ -162,7 +162,7 @@ BOOL LLNameListCtrl::handleToolTip(S32 x, S32 y, MASK mask)
localRectToScreen(cell_rect, &sticky_rect);
// Spawn at right side of cell
- LLCoordGL pos( sticky_rect.mRight - 16, sticky_rect.mTop );
+ LLCoordGL pos( sticky_rect.mRight - 16, sticky_rect.mTop + (sticky_rect.getHeight()-16)/2 );
LLPointer<LLUIImage> icon = LLUI::getUIImage("Info_Small");
// Should we show a group or an avatar inspector?
diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp
index 16218f6d53..e2a748a1c5 100644
--- a/indra/newview/llnotificationhandlerutil.cpp
+++ b/indra/newview/llnotificationhandlerutil.cpp
@@ -153,7 +153,7 @@ void LLHandlerUtil::logToIMP2P(const LLNotificationPtr& notification, bool to_fi
{
const std::string name = LLHandlerUtil::getSubstitutionName(notification);
- const std::string session_name = notification->getPayload().has(
+ 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
@@ -162,6 +162,12 @@ void LLHandlerUtil::logToIMP2P(const LLNotificationPtr& notification, bool to_fi
{
LLUUID from_id = notification->getPayload()["from_id"];
+ //*HACK for ServerObjectMessage the sesson name is really weird, see EXT-4779
+ if (SERVER_OBJECT_MESSAGE == notification->getName())
+ {
+ session_name = "chat";
+ }
+
if(to_file_only)
{
logToIM(IM_NOTHING_SPECIAL, session_name, name, notification->getMessage(),
diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp
index f816dc589d..388fdeea7a 100644
--- a/indra/newview/lloutputmonitorctrl.cpp
+++ b/indra/newview/lloutputmonitorctrl.cpp
@@ -251,6 +251,11 @@ void LLOutputMonitorCtrl::setSpeakerId(const LLUUID& speaker_id)
{
if (speaker_id.isNull() || speaker_id == mSpeakerId) return;
+ if (mSpeakerId.notNull())
+ {
+ // Unregister previous registration to avoid crash. EXT-4782.
+ LLSpeakingIndicatorManager::unregisterSpeakingIndicator(mSpeakerId, this);
+ }
mSpeakerId = speaker_id;
LLSpeakingIndicatorManager::registerSpeakingIndicator(mSpeakerId, this);
diff --git a/indra/newview/llspeakingindicatormanager.cpp b/indra/newview/llspeakingindicatormanager.cpp
index 5e1d408e8d..d33c050ee4 100644
--- a/indra/newview/llspeakingindicatormanager.cpp
+++ b/indra/newview/llspeakingindicatormanager.cpp
@@ -114,6 +114,13 @@ private:
void switchSpeakerIndicators(const speaker_ids_t& speakers_uuids, BOOL switch_on);
/**
+ * Ensures that passed instance of Speaking Indicator does not exist among registered ones.
+ * If yes, it will be removed.
+ */
+ void ensureInstanceDoesNotExist(LLSpeakingIndicator* const speaking_indicator);
+
+
+ /**
* Multimap with all registered speaking indicators
*/
speaking_indicators_mmap_t mSpeakingIndicators;
@@ -135,7 +142,11 @@ void SpeakingIndicatorManager::registerSpeakingIndicator(const LLUUID& speaker_i
{
// do not exclude agent's indicators. They should be processed in the same way as others. See EXT-3889.
- LL_DEBUGS("SpeakingIndicator") << "Registering indicator: " << speaker_id << LL_ENDL;
+ LL_DEBUGS("SpeakingIndicator") << "Registering indicator: " << speaker_id << "|"<< speaking_indicator << LL_ENDL;
+
+
+ ensureInstanceDoesNotExist(speaking_indicator);
+
speaking_indicator_value_t value_type(speaker_id, speaking_indicator);
mSpeakingIndicators.insert(value_type);
@@ -148,12 +159,14 @@ void SpeakingIndicatorManager::registerSpeakingIndicator(const LLUUID& speaker_i
void SpeakingIndicatorManager::unregisterSpeakingIndicator(const LLUUID& speaker_id, const LLSpeakingIndicator* const speaking_indicator)
{
+ LL_DEBUGS("SpeakingIndicator") << "Unregistering indicator: " << speaker_id << "|"<< speaking_indicator << LL_ENDL;
speaking_indicators_mmap_t::iterator it;
it = mSpeakingIndicators.find(speaker_id);
for (;it != mSpeakingIndicators.end(); ++it)
{
if (it->second == speaking_indicator)
{
+ LL_DEBUGS("SpeakingIndicator") << "Unregistered." << LL_ENDL;
mSpeakingIndicators.erase(it);
break;
}
@@ -231,6 +244,32 @@ void SpeakingIndicatorManager::switchSpeakerIndicators(const speaker_ids_t& spea
}
}
+void SpeakingIndicatorManager::ensureInstanceDoesNotExist(LLSpeakingIndicator* const speaking_indicator)
+{
+ LL_DEBUGS("SpeakingIndicator") << "Searching for an registered indicator instance: " << speaking_indicator << LL_ENDL;
+ speaking_indicators_mmap_t::iterator it = mSpeakingIndicators.begin();
+ for (;it != mSpeakingIndicators.end(); ++it)
+ {
+ if (it->second == speaking_indicator)
+ {
+ LL_DEBUGS("SpeakingIndicator") << "Found" << LL_ENDL;
+ break;
+ }
+ }
+
+ // It is possible with LLOutputMonitorCtrl the same instance of indicator is registered several
+ // times with different UUIDs. This leads to crash after instance is destroyed because the
+ // only one (specified by UUID in unregisterSpeakingIndicator()) is removed from the map.
+ // So, using stored deleted pointer leads to crash. See EXT-4782.
+ if (it != mSpeakingIndicators.end())
+ {
+ llwarns << "The same instance of indicator has already been registered, removing it: " << it->first << "|"<< speaking_indicator << llendl;
+ llassert(it == mSpeakingIndicators.end());
+ mSpeakingIndicators.erase(it);
+ }
+}
+
+
/************************************************************************/
/* LLSpeakingIndicatorManager namespace implementation */
/************************************************************************/
diff --git a/indra/newview/skins/default/xui/en/floater_map.xml b/indra/newview/skins/default/xui/en/floater_map.xml
index 3ddb7bc349..1903e7c714 100644
--- a/indra/newview/skins/default/xui/en/floater_map.xml
+++ b/indra/newview/skins/default/xui/en/floater_map.xml
@@ -6,7 +6,7 @@
center_horiz="true"
center_vert="true"
follows="top|right"
- height="225"
+ height="218"
layout="topleft"
min_height="60"
min_width="174"
@@ -55,116 +55,116 @@
</floater.string>
<net_map
bg_color="NetMapBackgroundColor"
- bottom="225"
follows="top|left|bottom|right"
layout="topleft"
left="0"
mouse_opaque="false"
name="Net Map"
- right="198"
- top="2" />
+ width="200"
+ height="200"
+ top="18"/>
<text
type="string"
length="1"
- bottom="225"
+ bottom="218"
label="N"
layout="topleft"
left="0"
name="floater_map_north"
right="10"
text_color="1 1 1 0.7"
- top="215">
+ top="209">
N
</text>
<text
type="string"
length="1"
- bottom="225"
+ bottom="218"
label="E"
layout="topleft"
left="0"
name="floater_map_east"
right="10"
text_color="1 1 1 0.7"
- top="215">
+ top="209">
E
</text>
<text
type="string"
length="1"
- bottom="225"
+ bottom="205"
label="W"
layout="topleft"
left="0"
name="floater_map_west"
right="11"
text_color="1 1 1 0.7"
- top="215">
+ top="195">
W
</text>
<text
type="string"
length="1"
- bottom="225"
+ bottom="218"
label="S"
layout="topleft"
left="0"
name="floater_map_south"
right="10"
text_color="1 1 1 0.7"
- top="215">
+ top="209">
S
</text>
<text
type="string"
length="1"
- bottom="225"
+ bottom="218"
label="SE"
layout="topleft"
left="0"
name="floater_map_southeast"
right="20"
text_color="1 1 1 0.7"
- top="215">
+ top="209">
SE
</text>
<text
type="string"
length="1"
- bottom="225"
+ bottom="218"
label="NE"
layout="topleft"
left="0"
name="floater_map_northeast"
right="20"
text_color="1 1 1 0.7"
- top="215">
+ top="209">
NE
</text>
<text
type="string"
length="1"
- bottom="225"
+ bottom="218"
label="SW"
layout="topleft"
left="0"
name="floater_map_southwest"
right="20"
text_color="1 1 1 0.7"
- top="215">
+ top="209">
SW
</text>
<text
type="string"
length="1"
- bottom="225"
+ bottom="218"
label="NW"
layout="topleft"
left="0"
name="floater_map_northwest"
right="20"
text_color="1 1 1 0.7"
- top="215">
+ top="209">
NW
</text>
</floater>