summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-02-11 10:58:20 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2010-02-11 10:58:20 +0000
commitfc1af768b800c890cda8ef3e8b9ee2537ca1d92a (patch)
tree40474e1e2ee190cae30603ce960e58238929c445 /indra
parent4805c9bea7a0f316dbb95bd04b5b0cec7052602e (diff)
parentde7ca5abb26930025b16c7f50aa7469c3b33c09e (diff)
PE merge.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llchathistory.cpp15
-rw-r--r--indra/newview/llimview.cpp20
-rw-r--r--indra/newview/llimview.h2
-rw-r--r--indra/newview/llpanelplaces.cpp3
-rw-r--r--indra/newview/llstylemap.cpp4
-rw-r--r--indra/newview/lltoastimpanel.cpp37
-rw-r--r--indra/newview/llvoicechannel.cpp11
-rw-r--r--indra/newview/llvoicechannel.h4
-rw-r--r--indra/newview/skins/default/xui/en/floater_outgoing_call.xml13
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_notices.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_instant_message.xml10
11 files changed, 61 insertions, 59 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 13a5df353d..7a5d8be84a 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -66,6 +66,8 @@ static LLDefaultChildRegistry::Register<LLChatHistory> r("chat_history");
const static std::string NEW_LINE(rawstr_to_utf8("\n"));
+const static U32 LENGTH_OF_TIME_STR = std::string("12:00").length();
+
// support for secondlife:///app/objectim/{UUID}/ SLapps
class LLObjectIMHandler : public LLCommandHandler
{
@@ -544,6 +546,7 @@ void LLChatHistory::clear()
void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LLStyle::Params& input_append_params)
{
bool use_plain_text_chat_history = args["use_plain_text_chat_history"].asBoolean();
+
if (!mEditor->scrolledToEnd() && chat.mFromID != gAgent.getID() && !chat.mFromName.empty())
{
mUnreadChatSources.insert(chat.mFromName);
@@ -609,6 +612,14 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
style_params.font.style = "ITALIC";
}
+ //*HACK we graying out chat history by graying out messages that contains full date in a time string
+ bool message_from_log = chat.mTimeStr.length() > LENGTH_OF_TIME_STR;
+ if (message_from_log)
+ {
+ style_params.color(LLColor4::grey);
+ style_params.readonly_color(LLColor4::grey);
+ }
+
if (use_plain_text_chat_history)
{
mEditor->appendText("[" + chat.mTimeStr + "] ", mEditor->getText().size() != 0, style_params);
@@ -644,10 +655,10 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
mEditor->appendText("<nolink>" + chat.mFromName + "</nolink>" + delimiter,
false, link_params);
}
- else if ( chat.mFromName != SYSTEM_FROM && chat.mFromID.notNull() )
+ else if ( chat.mFromName != SYSTEM_FROM && chat.mFromID.notNull() && !message_from_log)
{
LLStyle::Params link_params(style_params);
- link_params.fillFrom(LLStyleMap::instance().lookupAgent(chat.mFromID));
+ link_params.overwriteFrom(LLStyleMap::instance().lookupAgent(chat.mFromID));
// Convert the name to a hotlink and add to message.
mEditor->appendText(chat.mFromName + delimiter, false, link_params);
}
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 32482a065c..0965cbd0dc 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -77,6 +77,9 @@ const static std::string IM_FROM_ID("from_id");
const static std::string NO_SESSION("(IM Session Doesn't Exist)");
const static std::string ADHOC_NAME_SUFFIX(" Conference");
+const static std::string NEARBY_P2P_BY_OTHER("nearby_P2P_by_other");
+const static std::string NEARBY_P2P_BY_AGENT("nearby_P2P_by_agent");
+
std::string LLCallDialogManager::sPreviousSessionlName = "";
LLIMModel::LLIMSession::SType LLCallDialogManager::sPreviousSessionType = LLIMModel::LLIMSession::P2P_SESSION;
std::string LLCallDialogManager::sCurrentSessionlName = "";
@@ -1372,7 +1375,7 @@ void LLCallDialogManager::onVoiceChannelChanged(const LLUUID &session_id)
}
sSession = session;
- sSession->mVoiceChannel->setStateChangedCallback(boost::bind(LLCallDialogManager::onVoiceChannelStateChanged, _1, _2, _3));
+ sSession->mVoiceChannel->setStateChangedCallback(boost::bind(LLCallDialogManager::onVoiceChannelStateChanged, _1, _2, _3, _4));
if(sCurrentSessionlName != session->mName)
{
sPreviousSessionlName = sCurrentSessionlName;
@@ -1403,7 +1406,7 @@ void LLCallDialogManager::onVoiceChannelChanged(const LLUUID &session_id)
}
-void LLCallDialogManager::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction)
+void LLCallDialogManager::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction, bool ended_by_agent)
{
LLSD mCallDialogPayload;
LLOutgoingCallDialog* ocd = NULL;
@@ -1423,6 +1426,7 @@ void LLCallDialogManager::onVoiceChannelStateChanged(const LLVoiceChannel::EStat
mCallDialogPayload["state"] = new_state;
mCallDialogPayload["disconnected_channel_name"] = sSession->mName;
mCallDialogPayload["session_type"] = sSession->mSessionType;
+ mCallDialogPayload["ended_by_agent"] = ended_by_agent;
switch(new_state)
{
@@ -1618,14 +1622,16 @@ void LLOutgoingCallDialog::show(const LLSD& key)
channel_name = LLTextUtil::formatPhoneNumber(channel_name);
}
childSetTextArg("nearby", "[VOICE_CHANNEL_NAME]", channel_name);
- childSetTextArg("nearby_P2P", "[VOICE_CHANNEL_NAME]", mPayload["disconnected_channel_name"].asString());
+ childSetTextArg("nearby_P2P_by_other", "[VOICE_CHANNEL_NAME]", mPayload["disconnected_channel_name"].asString());
// skipping "You will now be reconnected to nearby" in notification when call is ended by disabling voice,
// so no reconnection to nearby chat happens (EXT-4397)
bool voice_works = LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking();
std::string reconnect_nearby = voice_works ? LLTrans::getString("reconnect_nearby") : std::string();
childSetTextArg("nearby", "[RECONNECT_NEARBY]", reconnect_nearby);
- childSetTextArg("nearby_P2P", "[RECONNECT_NEARBY]", reconnect_nearby);
+
+ const std::string& nearby_str = mPayload["ended_by_agent"] ? NEARBY_P2P_BY_AGENT : NEARBY_P2P_BY_OTHER;
+ childSetTextArg(nearby_str, "[RECONNECT_NEARBY]", reconnect_nearby);
}
std::string callee_name = mPayload["session_name"].asString();
@@ -1680,7 +1686,8 @@ void LLOutgoingCallDialog::show(const LLSD& key)
case LLVoiceChannel::STATE_HUNG_UP :
if (mPayload["session_type"].asInteger() == LLIMModel::LLIMSession::P2P_SESSION)
{
- getChild<LLTextBox>("nearby_P2P")->setVisible(true);
+ const std::string& nearby_str = mPayload["ended_by_agent"] ? NEARBY_P2P_BY_AGENT : NEARBY_P2P_BY_OTHER;
+ getChild<LLTextBox>(nearby_str)->setVisible(true);
}
else
{
@@ -1699,7 +1706,8 @@ void LLOutgoingCallDialog::hideAllText()
getChild<LLTextBox>("calling")->setVisible(false);
getChild<LLTextBox>("leaving")->setVisible(false);
getChild<LLTextBox>("connecting")->setVisible(false);
- getChild<LLTextBox>("nearby_P2P")->setVisible(false);
+ getChild<LLTextBox>("nearby_P2P_by_other")->setVisible(false);
+ getChild<LLTextBox>("nearby_P2P_by_agent")->setVisible(false);
getChild<LLTextBox>("nearby")->setVisible(false);
getChild<LLTextBox>("noanswer")->setVisible(false);
}
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index 21c7626109..ad6cede727 100644
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -452,7 +452,7 @@ public:
static void initClass();
static void onVoiceChannelChanged(const LLUUID &session_id);
- static void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction);
+ static void onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction, bool ended_by_agent);
protected:
static std::string sPreviousSessionlName;
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index 17a970cfcf..26b57c003b 100644
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -1048,14 +1048,13 @@ void LLPanelPlaces::updateVerbs()
mTeleportBtn->setVisible(!is_create_landmark_visible && !isLandmarkEditModeOn);
mShowOnMapBtn->setVisible(!is_create_landmark_visible && !isLandmarkEditModeOn);
- mOverflowBtn->setVisible(!is_create_landmark_visible && !isLandmarkEditModeOn);
+ mOverflowBtn->setVisible(is_place_info_visible && !is_create_landmark_visible && !isLandmarkEditModeOn);
mEditBtn->setVisible(mPlaceInfoType == LANDMARK_INFO_TYPE && !isLandmarkEditModeOn);
mSaveBtn->setVisible(isLandmarkEditModeOn);
mCancelBtn->setVisible(isLandmarkEditModeOn);
mCloseBtn->setVisible(is_create_landmark_visible && !isLandmarkEditModeOn);
mShowOnMapBtn->setEnabled(!is_create_landmark_visible && !isLandmarkEditModeOn && have_3d_pos);
- mOverflowBtn->setEnabled(is_place_info_visible && !is_create_landmark_visible);
if (is_place_info_visible)
{
diff --git a/indra/newview/llstylemap.cpp b/indra/newview/llstylemap.cpp
index 2485563cbc..61705c4eb3 100644
--- a/indra/newview/llstylemap.cpp
+++ b/indra/newview/llstylemap.cpp
@@ -49,6 +49,7 @@ const LLStyle::Params &LLStyleMap::lookupAgent(const LLUUID &source)
if (source != LLUUID::null && source != gAgent.getID() )
{
style_params.color.control = "HTMLLinkColor";
+ style_params.readonly_color.control = "HTMLLinkColor";
style_params.link_href =
LLSLURL::buildCommand("agent", source, "inspect");
}
@@ -56,6 +57,7 @@ const LLStyle::Params &LLStyleMap::lookupAgent(const LLUUID &source)
{
// Make the resident's own name white and don't make the name clickable.
style_params.color = LLColor4::white;
+ style_params.readonly_color = LLColor4::white;
}
mMap[source] = style_params;
@@ -75,11 +77,13 @@ const LLStyle::Params &LLStyleMap::lookup(const LLUUID& id, const std::string& l
if (id != LLUUID::null && !link.empty())
{
style_params.color.control = "HTMLLinkColor";
+ style_params.readonly_color.control = "HTMLLinkColor";
style_params.link_href = link;
}
else
{
style_params.color = LLColor4::white;
+ style_params.readonly_color = LLColor4::white;
}
mMap[id] = style_params;
}
diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp
index 7ae2404203..cb43beb819 100644
--- a/indra/newview/lltoastimpanel.cpp
+++ b/indra/newview/lltoastimpanel.cpp
@@ -141,32 +141,6 @@ BOOL LLToastIMPanel::handleToolTip(S32 x, S32 y, MASK mask)
return LLToastPanel::handleToolTip(x, y, mask);
}
-void LLToastIMPanel::showInspector()
-{
- LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(mSessionID);
- if(!im_session)
- {
- llwarns << "Invalid IM session" << llendl;
- return;
- }
-
- switch(im_session->mSessionType)
- {
- case LLIMModel::LLIMSession::P2P_SESSION:
- LLFloaterReg::showInstance("inspect_avatar", LLSD().with("avatar_id", mAvatarID));
- break;
- case LLIMModel::LLIMSession::GROUP_SESSION:
- LLFloaterReg::showInstance("inspect_group", LLSD().with("group_id", mSessionID));
- break;
- case LLIMModel::LLIMSession::ADHOC_SESSION:
- LLFloaterReg::showInstance("inspect_avatar", LLSD().with("avatar_id", im_session->mOtherParticipantID));
- break;
- default:
- llwarns << "Unknown IM session type" << llendl;
- break;
- }
-}
-
void LLToastIMPanel::spawnNameToolTip()
{
// Spawn at right side of the name textbox.
@@ -176,7 +150,7 @@ void LLToastIMPanel::spawnNameToolTip()
LLToolTip::Params params;
params.background_visible(false);
- params.click_callback(boost::bind(&LLToastIMPanel::showInspector, this));
+ params.click_callback(boost::bind(&LLFloaterReg::showInstance, "inspect_avatar", LLSD().with("avatar_id", mAvatarID), FALSE));
params.delay_time(0.0f); // spawn instantly on hover
params.image(LLUI::getUIImage("Info_Small"));
params.message("");
@@ -201,7 +175,7 @@ void LLToastIMPanel::spawnGroupIconToolTip()
LLInspector::Params params;
params.fillFrom(LLUICtrlFactory::instance().getDefaultParams<LLInspector>());
- params.click_callback(boost::bind(&LLToastIMPanel::showInspector, this));
+ params.click_callback(boost::bind(&LLFloaterReg::showInstance, "inspect_group", LLSD().with("group_id", mSessionID), FALSE));
params.delay_time(0.100f);
params.image(LLUI::getUIImage("Info_Small"));
params.message(g_data.mName);
@@ -214,16 +188,15 @@ void LLToastIMPanel::spawnGroupIconToolTip()
void LLToastIMPanel::initIcon()
{
- LLIconCtrl* sys_msg_icon = getChild<LLIconCtrl>("sys_msg_icon");
-
mAvatarIcon->setVisible(FALSE);
mGroupIcon->setVisible(FALSE);
- sys_msg_icon->setVisible(FALSE);
mAdhocIcon->setVisible(FALSE);
if(mAvatarName->getValue().asString() == SYSTEM_FROM)
{
- sys_msg_icon->setVisible(TRUE);
+ // "sys_msg_icon" was disabled by Erica in the changeset: 5109 (85181bc92cbe)
+ // and "dummy widget" warnings appeared in log.
+ // It does not make sense to have such image with empty name. Removed for EXT-5057.
}
else
{
diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp
index bb09a18cc3..dfd67d0c38 100644
--- a/indra/newview/llvoicechannel.cpp
+++ b/indra/newview/llvoicechannel.cpp
@@ -122,7 +122,8 @@ LLVoiceChannel::LLVoiceChannel(const LLUUID& session_id, const std::string& sess
mState(STATE_NO_CHANNEL_INFO),
mSessionName(session_name),
mCallDirection(OUTGOING_CALL),
- mIgnoreNextSessionLeave(FALSE)
+ mIgnoreNextSessionLeave(FALSE),
+ mCallEndedByAgent(false)
{
mNotifyArgs["VOICE_CHANNEL_NAME"] = mSessionName;
@@ -412,7 +413,7 @@ void LLVoiceChannel::doSetState(const EState& new_state)
EState old_state = mState;
mState = new_state;
if (!mStateChangedCallback.empty())
- mStateChangedCallback(old_state, mState, mCallDirection);
+ mStateChangedCallback(old_state, mState, mCallDirection, mCallEndedByAgent);
}
//static
@@ -779,7 +780,8 @@ void LLVoiceChannelP2P::handleStatusChange(EStatusType type)
}
else
{
- // other user hung up
+ // other user hung up, so we didn't end the call
+ mCallEndedByAgent = false;
}
deactivate();
}
@@ -810,6 +812,9 @@ void LLVoiceChannelP2P::activate()
{
if (callStarted()) return;
+ //call will be counted as ended by user unless this variable is changed in handleStatusChange()
+ mCallEndedByAgent = true;
+
LLVoiceChannel::activate();
if (callStarted())
diff --git a/indra/newview/llvoicechannel.h b/indra/newview/llvoicechannel.h
index cb86671305..941cccacc3 100644
--- a/indra/newview/llvoicechannel.h
+++ b/indra/newview/llvoicechannel.h
@@ -58,7 +58,7 @@ public:
OUTGOING_CALL
} EDirection;
- typedef boost::signals2::signal<void(const EState& old_state, const EState& new_state, const EDirection& direction)> state_changed_signal_t;
+ typedef boost::signals2::signal<void(const EState& old_state, const EState& new_state, const EDirection& direction, bool ended_by_agent)> state_changed_signal_t;
// on current channel changed signal
typedef boost::function<void(const LLUUID& session_id)> channel_changed_callback_t;
@@ -122,6 +122,8 @@ protected:
std::string mSessionName;
LLSD mNotifyArgs;
LLSD mCallDialogPayload;
+ // true if call was ended by agent
+ bool mCallEndedByAgent;
BOOL mIgnoreNextSessionLeave;
LLHandle<LLPanel> mLoginNotificationHandle;
diff --git a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml
index cc9afe4474..2bafd1bdef 100644
--- a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml
+++ b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml
@@ -96,13 +96,24 @@ No Answer. Please try again later.
height="40"
layout="topleft"
left="77"
- name="nearby_P2P"
+ name="nearby_P2P_by_other"
top="27"
width="315"
word_wrap="true">
[VOICE_CHANNEL_NAME] has ended the call. [RECONNECT_NEARBY]
</text>
<text
+ font="SansSerifLarge"
+ height="40"
+ layout="topleft"
+ left="77"
+ name="nearby_P2P_by_agent"
+ top="27"
+ width="315"
+ word_wrap="true">
+ You have ended the call. [RECONNECT_NEARBY]
+ </text>
+ <text
font="SansSerif"
height="50"
layout="topleft"
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 1f16aea2ef..5f46ad7860 100644
--- a/indra/newview/skins/default/xui/en/panel_group_notices.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_notices.xml
@@ -159,7 +159,6 @@ Maximum 200 per group daily
left_pad="3"
max_length="511"
name="create_message"
- text_type="ascii"
top_delta="0"
width="220"
word_wrap="true" />
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 a0ad38cf76..34fd3352a3 100644
--- a/indra/newview/skins/default/xui/en/panel_instant_message.xml
+++ b/indra/newview/skins/default/xui/en/panel_instant_message.xml
@@ -56,16 +56,6 @@
name="adhoc_icon"
top="3"
width="18" />
- <!--<icon
- follows="right"
- height="20"
- image_name=""
- layout="topleft"
- left="3"
- mouse_opaque="true"
- name="sys_msg_icon"
- top="0"
- width="20" />-->
<text
follows="left|right"
font.style="BOLD"