summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llcallfloater.cpp15
-rw-r--r--indra/newview/llcallfloater.h6
-rw-r--r--indra/newview/llchathistory.cpp29
-rw-r--r--indra/newview/llchathistory.h1
-rw-r--r--indra/newview/llchatitemscontainerctrl.cpp2
-rw-r--r--indra/newview/llimfloater.cpp1
-rw-r--r--indra/newview/llpanelimcontrolpanel.cpp9
-rw-r--r--indra/newview/llpanelimcontrolpanel.h6
-rw-r--r--indra/newview/llspeakbutton.cpp41
-rw-r--r--indra/newview/llspeakbutton.h2
-rw-r--r--indra/newview/llviewerfloaterreg.cpp4
-rw-r--r--indra/newview/skins/default/colors.xml6
-rw-r--r--indra/newview/skins/default/xui/en/floater_voice_controls.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_bottomtray.xml8
14 files changed, 74 insertions, 58 deletions
diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp
index eaa048f5aa..2c77933b68 100644
--- a/indra/newview/llcallfloater.cpp
+++ b/indra/newview/llcallfloater.cpp
@@ -36,17 +36,18 @@
#include "llcallfloater.h"
#include "llavatarlist.h"
+#include "llbottomtray.h"
#include "llparticipantlist.h"
#include "llspeakers.h"
-LLCallFloater::LLCallFloater()
-: LLFloater(LLSD())
+LLCallFloater::LLCallFloater(const LLSD& key)
+: LLDockableFloater(NULL, key)
, mSpeakerManager(NULL)
, mPaticipants(NULL)
, mAvatarList(NULL)
{
- LLUICtrlFactory::getInstance()->buildFloater(this, "floater_voice_controls.xml", NULL);
+
}
LLCallFloater::~LLCallFloater()
@@ -58,12 +59,18 @@ LLCallFloater::~LLCallFloater()
// virtual
BOOL LLCallFloater::postBuild()
{
- LLFloater::postBuild();
+ LLDockableFloater::postBuild();
mAvatarList = getChild<LLAvatarList>("speakers_list");
mSpeakerManager = LLLocalSpeakerMgr::getInstance();
mPaticipants = new LLParticipantList(mSpeakerManager, mAvatarList);
+ LLView *anchor_panel = LLBottomTray::getInstance()->getChild<LLView>("speak_panel");
+
+ setDockControl(new LLDockControl(
+ anchor_panel, this,
+ getDockTongue(), LLDockControl::TOP));
+
return TRUE;
}
//EOF
diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h
index f1afddb1cc..8c4a204943 100644
--- a/indra/newview/llcallfloater.h
+++ b/indra/newview/llcallfloater.h
@@ -34,7 +34,7 @@
#ifndef LL_LLCALLFLOATER_H
#define LL_LLCALLFLOATER_H
-#include "llfloater.h"
+#include "lldockablefloater.h"
class LLAvatarList;
class LLParticipantList;
@@ -51,10 +51,10 @@ class LLSpeakerMgr;
* When the Resident is engaged in Group Voice Chat, the Voice Control Panel also provides an
* 'End Call' button to allow the Resident to leave that voice channel.
*/
-class LLCallFloater : public LLFloater
+class LLCallFloater : public LLDockableFloater
{
public:
- LLCallFloater();
+ LLCallFloater(const LLSD& key);
~LLCallFloater();
/*virtual*/ BOOL postBuild();
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 2c9b38b82a..caf9c08057 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -199,7 +199,7 @@ public:
userName->setValue(SL);
}
- setTimeField(chat.mTimeStr);
+ setTimeField(chat);
LLAvatarIconCtrl* icon = getChild<LLAvatarIconCtrl>("avatar_icon");
@@ -267,11 +267,29 @@ protected:
}
private:
- void setTimeField(const std::string& time_value)
+ std::string appendTime(const LLChat& chat)
+ {
+ time_t utc_time;
+ utc_time = time_corrected();
+ std::string timeStr ="["+ LLTrans::getString("TimeHour")+"]:["
+ +LLTrans::getString("TimeMin")+"] ";
+
+ LLSD substitution;
+
+ substitution["datetime"] = (S32) utc_time;
+ LLStringUtil::format (timeStr, substitution);
+
+ return timeStr;
+ }
+
+ void setTimeField(const LLChat& chat)
{
LLTextBox* time_box = getChild<LLTextBox>("time_box");
LLRect rect_before = time_box->getRect();
+
+ std::string time_value = appendTime(chat);
+
time_box->setValue(time_value);
// set necessary textbox width to fit all text
@@ -386,7 +404,11 @@ void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_
p.left_pad = mLeftWidgetPad;
p.right_pad = mRightWidgetPad;
- if (mLastFromName == chat.mFromName)
+ LLDate new_message_time = LLDate::now();
+
+ if (mLastFromName == chat.mFromName &&
+ mLastMessageTime.notNull() &&
+ (new_message_time.secondsSinceEpoch() - mLastMessageTime.secondsSinceEpoch()) < 60.0 )
{
view = getSeparator();
p.top_pad = mTopSeparatorPad;
@@ -414,6 +436,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_
appendWidget(p, header_text, false);
mLastFromName = chat.mFromName;
+ mLastMessageTime = new_message_time;
}
//Handle IRC styled /me messages.
std::string prefix = chat.mText.substr(0, 4);
diff --git a/indra/newview/llchathistory.h b/indra/newview/llchathistory.h
index ef5839ff2f..d2cfa53d8b 100644
--- a/indra/newview/llchathistory.h
+++ b/indra/newview/llchathistory.h
@@ -114,6 +114,7 @@ class LLChatHistory : public LLTextEditor
private:
std::string mLastFromName;
+ LLDate mLastMessageTime;
std::string mMessageHeaderFilename;
std::string mMessageSeparatorFilename;
diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp
index 90956d4aa0..4acb9fd480 100644
--- a/indra/newview/llchatitemscontainerctrl.cpp
+++ b/indra/newview/llchatitemscontainerctrl.cpp
@@ -182,7 +182,7 @@ void LLNearbyChatToastPanel::init(LLSD& notification)
{
LLStyle::Params style_params_name;
- LLColor4 userNameColor = LLUIColorTable::instance().getColor("ChatToastUserNameColor");
+ LLColor4 userNameColor = LLUIColorTable::instance().getColor("ChatToastAgentNameColor");
style_params_name.color(userNameColor);
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index ee93a9349a..310eaaec27 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -529,7 +529,6 @@ void LLIMFloater::onInputEditorFocusReceived( LLFocusableElement* caller, void*
//in disconnected state IM input editor should be disabled
self->mInputEditor->setEnabled(!gDisconnected);
}
- self->mChatHistory->setCursorAndScrollToEnd();
}
// static
diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp
index 40319d949d..ed651790f0 100644
--- a/indra/newview/llpanelimcontrolpanel.cpp
+++ b/indra/newview/llpanelimcontrolpanel.cpp
@@ -120,6 +120,7 @@ LLPanelIMControlPanel::LLPanelIMControlPanel()
LLPanelIMControlPanel::~LLPanelIMControlPanel()
{
+ LLAvatarTracker::instance().removeParticularFriendObserver(mAvatarID, this);
}
BOOL LLPanelIMControlPanel::postBuild()
@@ -175,7 +176,9 @@ void LLPanelIMControlPanel::setSessionId(const LLUUID& session_id)
LLIMModel& im_model = LLIMModel::instance();
+ LLAvatarTracker::instance().removeParticularFriendObserver(mAvatarID, this);
mAvatarID = im_model.getOtherParticipantID(session_id);
+ LLAvatarTracker::instance().addParticularFriendObserver(mAvatarID, this);
// Disable "Add friend" button for friends.
childSetEnabled("add_friend_btn", !LLAvatarActions::isFriend(mAvatarID));
@@ -204,6 +207,12 @@ void LLPanelIMControlPanel::setSessionId(const LLUUID& session_id)
}
}
+//virtual
+void LLPanelIMControlPanel::changed(U32 mask)
+{
+ childSetEnabled("add_friend_btn", !LLAvatarActions::isFriend(mAvatarID));
+}
+
void LLPanelIMControlPanel::nameUpdatedCallback(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group)
{
if ( id == mAvatarID )
diff --git a/indra/newview/llpanelimcontrolpanel.h b/indra/newview/llpanelimcontrolpanel.h
index 7bfc432ef2..a590232a0b 100644
--- a/indra/newview/llpanelimcontrolpanel.h
+++ b/indra/newview/llpanelimcontrolpanel.h
@@ -35,6 +35,7 @@
#include "llpanel.h"
#include "llvoicechannel.h"
+#include "llcallingcard.h"
class LLSpeakerMgr;
class LLAvatarList;
@@ -66,7 +67,7 @@ private:
};
-class LLPanelIMControlPanel : public LLPanelChatControlPanel
+class LLPanelIMControlPanel : public LLPanelChatControlPanel, LLFriendObserver
{
public:
LLPanelIMControlPanel();
@@ -76,6 +77,9 @@ public:
void setSessionId(const LLUUID& session_id);
+ // LLFriendObserver trigger
+ virtual void changed(U32 mask);
+
protected:
void nameUpdatedCallback(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group);
diff --git a/indra/newview/llspeakbutton.cpp b/indra/newview/llspeakbutton.cpp
index 9562d7828c..5edc4804ca 100644
--- a/indra/newview/llspeakbutton.cpp
+++ b/indra/newview/llspeakbutton.cpp
@@ -33,6 +33,7 @@
#include "llviewerprecompiledheaders.h" // must be first include
#include "llbutton.h"
+#include "llfloaterreg.h"
#include "llagent.h"
#include "llbottomtray.h"
@@ -95,8 +96,8 @@ LLSpeakButton::LLSpeakButton(const Params& p)
addChild(mShowBtn);
LLTransientFloaterMgr::getInstance()->addControlView(mShowBtn);
- mShowBtn->setClickedCallback(boost::bind(&LLSpeakButton::onClick_ShowBtn, this));
- mShowBtn->setToggleState(FALSE);
+// mShowBtn->setClickedCallback(boost::bind(&LLSpeakButton::onClick_ShowBtn, this));
+// mShowBtn->setToggleState(FALSE);
static const S32 MONITOR_RIGHT_PAD = 2;
@@ -168,39 +169,3 @@ void LLSpeakButton::onMouseUp_SpeakBtn()
gVoiceClient->inputUserControlState(down);
}
-void LLSpeakButton::onClick_ShowBtn()
-{
- if(!mShowBtn->getToggleState())
- {
- if (!mPrivateCallPanel.isDead())
- {
- LLFloater* instance = mPrivateCallPanel.get();
- instance->onClickClose(instance);
- }
- mShowBtn->setToggleState(FALSE);
- return;
- }
-
- S32 x = mSpeakBtn->getRect().mLeft;
- S32 y = 0;
-
- localPointToScreen(x, y, &x, &y);
-
- LLCallFloater* instance = new LLCallFloater;
- mPrivateCallPanel = instance->getHandle();
-
- // *TODO: mantipov: why we are adding this floater to Root View? It is in FloaterView by default
- getRootView()->addChild(instance);
-
- y = LLBottomTray::getInstance()->getRect().getHeight() + instance->getRect().getHeight();
-
- LLRect rect;
- rect.setLeftTopAndSize(x, y, instance->getRect().getWidth(), instance->getRect().getHeight());
- instance->setRect(rect);
-
- instance->setVisible(TRUE);
- instance->setFrontmost(TRUE);
-
- mShowBtn->setToggleState(TRUE);
-}
-
diff --git a/indra/newview/llspeakbutton.h b/indra/newview/llspeakbutton.h
index 33f7c9fa28..6660b50240 100644
--- a/indra/newview/llspeakbutton.h
+++ b/indra/newview/llspeakbutton.h
@@ -86,8 +86,6 @@ protected:
void onMouseDown_SpeakBtn();
void onMouseUp_SpeakBtn();
- void onClick_ShowBtn();
-
private:
LLButton* mSpeakBtn;
LLButton* mShowBtn;
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index 642df92379..227f6c4971 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -38,6 +38,7 @@
#include "llviewerfloaterreg.h"
#include "llcompilequeue.h"
+#include "llcallfloater.h"
#include "llfloaterabout.h"
#include "llfloateractivespeakers.h"
#include "llfloateranimpreview.h"
@@ -174,7 +175,6 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("impanel", "floater_im_session.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLIMFloater>);
LLFloaterReg::add("im_container", "floater_im_container.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLIMFloaterContainer>);
- LLFloaterReg::add("script_floater", "floater_script.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLScriptFloater>);
LLFloaterReg::add("incoming_call", "floater_incoming_call.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLIncomingCallDialog>);
LLFloaterReg::add("inventory", "floater_inventory.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterInventory>);
LLFloaterReg::add("inspect", "floater_inspect.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterInspect>);
@@ -234,6 +234,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("script_debug", "floater_script_debug.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterScriptDebug>);
LLFloaterReg::add("script_debug_output", "floater_script_debug_panel.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterScriptDebugOutput>);
+ LLFloaterReg::add("script_floater", "floater_script.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLScriptFloater>);
LLFloaterReg::add("sell_land", "floater_sell_land.xml", &LLFloaterSellLand::buildFloater);
LLFloaterReg::add("settings_debug", "floater_settings_debug.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSettingsDebug>);
LLFloaterReg::add("stats", "floater_stats.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloater>);
@@ -248,6 +249,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("upload_sound", "floater_sound_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSoundPreview>, "upload");
LLFloaterReg::add("voice_call", "floater_call.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCall>);
+ LLFloaterReg::add("voice_controls", "floater_voice_controls.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLCallFloater>);
LLFloaterReg::add("whitelist_entry", "floater_whitelist_entry.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWhiteListEntry>);
LLFloaterReg::add("world_map", "floater_world_map.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWorldMap>);
diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml
index 9be8b4c73f..295f4259fd 100644
--- a/indra/newview/skins/default/colors.xml
+++ b/indra/newview/skins/default/colors.xml
@@ -81,7 +81,7 @@
<color
name="AgentChatColor"
- reference="LtGray" />
+ reference="White" />
<color
name="AlertBoxColor"
value="0.24 0.24 0.24 1" />
@@ -669,7 +669,7 @@
reference="LtGray" />
<color
name="UserChatColor"
- reference="LtGray" />
+ reference="White" />
<color
name="llOwnerSayChatColor"
reference="LtGray" />
@@ -685,7 +685,7 @@
name="SysWellItemSelected"
value="0.3 0.3 0.3 1.0" />
<color
- name="ChatToastUserNameColor"
+ name="ChatToastAgentNameColor"
value="1.0 0.3 1.0 1.0" />
</colors>
diff --git a/indra/newview/skins/default/xui/en/floater_voice_controls.xml b/indra/newview/skins/default/xui/en/floater_voice_controls.xml
index 82b4372a4b..b718cc40fe 100644
--- a/indra/newview/skins/default/xui/en/floater_voice_controls.xml
+++ b/indra/newview/skins/default/xui/en/floater_voice_controls.xml
@@ -5,6 +5,8 @@
layout="topleft"
name="floater_voice_controls"
title="Voice Controls"
+ save_visibility="true"
+ single_instance="true"
width="282">
<panel
bevel_style="in"
diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
index da8006d545..ec3f7ea7c5 100644
--- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml
+++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
@@ -72,7 +72,13 @@
left="0"
name="talk"
top="4"
- width="100" />
+ width="100">
+ <show_button>
+ <show_button.init_callback
+ function="Button.SetDockableFloaterToggle"
+ parameter="voice_controls" />
+ </show_button>
+ </talk_button>
</layout_panel>
<icon
auto_resize="false"