summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2012-11-14 10:43:09 -0800
committerMerov Linden <merov@lindenlab.com>2012-11-14 10:43:09 -0800
commita5d6375dd9faf5a39f0320ed31073e157534761a (patch)
treee09140fe51e18bdd05aff9d4ae0d3b581b9af5a6 /indra/newview
parente15921e42b4ac14504b22b0acbb349aa6d19664b (diff)
parent33068c6da8f079c557e4fb520b074f6e5ce40ba4 (diff)
Merge
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llconversationmodel.cpp10
-rwxr-xr-xindra/newview/llconversationmodel.h1
-rwxr-xr-xindra/newview/llconversationview.cpp31
-rwxr-xr-xindra/newview/llconversationview.h8
-rw-r--r--indra/newview/llfloaterimcontainer.cpp22
-rw-r--r--indra/newview/llfloaterimcontainer.h5
-rw-r--r--indra/newview/llfloaterimsessiontab.cpp1
-rw-r--r--indra/newview/llfloaterimsessiontab.h2
-rw-r--r--indra/newview/lloutputmonitorctrl.cpp29
-rw-r--r--indra/newview/llspeakingindicatormanager.cpp7
-rw-r--r--indra/newview/llspeakingindicatormanager.h2
-rw-r--r--indra/newview/skins/default/xui/en/floater_im_container.xml42
-rw-r--r--indra/newview/skins/default/xui/en/floater_im_session.xml26
13 files changed, 164 insertions, 22 deletions
diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp
index 47a82bfe17..8aa740e5d1 100644
--- a/indra/newview/llconversationmodel.cpp
+++ b/indra/newview/llconversationmodel.cpp
@@ -440,6 +440,16 @@ void LLConversationItemParticipant::onAvatarNameCache(const LLAvatarName& av_nam
}
}
+LLConversationItemSession* LLConversationItemParticipant::getParentSession()
+{
+ LLConversationItemSession* parent_session = NULL;
+ if (hasParent())
+ {
+ parent_session = dynamic_cast<LLConversationItemSession*>(mParent);
+ }
+ return parent_session;
+}
+
void LLConversationItemParticipant::dumpDebugData()
{
llinfos << "Merov debug : participant, uuid = " << mUUID << ", name = " << mName << ", display name = " << mDisplayName << ", muted = " << mIsMuted << ", moderator = " << mIsModerator << llendl;
diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h
index 481d46af58..2ee21d0c16 100755
--- a/indra/newview/llconversationmodel.h
+++ b/indra/newview/llconversationmodel.h
@@ -195,6 +195,7 @@ public:
virtual const bool getDistanceToAgent(F64& dist) const { dist = mDistToAgent; return (dist >= 0.0); }
void fetchAvatarName();
+ LLConversationItemSession* getParentSession();
void dumpDebugData();
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index ad334869fb..cc7a76e353 100755
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -327,6 +327,7 @@ void LLConversationViewSession::onCurrentVoiceSessionChanged(const LLUUID& sessi
mSpeakingIndicator->setSpeakerId(is_active ? gAgentID : LLUUID::null);
}
+ llinfos << "Merov debug : onCurrentVoiceSessionChanged, switchIndicator is_active = " << is_active << llendl;
mSpeakingIndicator->switchIndicator(is_active);
mCallIconLayoutPanel->setVisible(is_active);
}
@@ -366,6 +367,11 @@ LLConversationViewParticipant::LLConversationViewParticipant( const LLConversati
{
}
+LLConversationViewParticipant::~LLConversationViewParticipant()
+{
+ mActiveVoiceChannelConnection.disconnect();
+}
+
void LLConversationViewParticipant::initFromParams(const LLConversationViewParticipant::Params& params)
{
LLAvatarIconCtrl::Params avatar_icon_params(params.avatar_icon());
@@ -392,6 +398,7 @@ BOOL LLConversationViewParticipant::postBuild()
mInfoBtn->setClickedCallback(boost::bind(&LLConversationViewParticipant::onInfoBtnClick, this));
mInfoBtn->setVisible(false);
+ mActiveVoiceChannelConnection = LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLConversationViewParticipant::onCurrentVoiceSessionChanged, this, _1));
mSpeakingIndicator = getChild<LLOutputMonitorCtrl>("speaking_indicator");
if (!sStaticInitialized)
@@ -445,6 +452,29 @@ S32 LLConversationViewParticipant::arrange(S32* width, S32* height)
return arranged;
}
+void LLConversationViewParticipant::onCurrentVoiceSessionChanged(const LLUUID& session_id)
+{
+ llinfos << "Merov debug : onCurrentVoiceSessionChanged begin, uuid = " << mUUID << ", session_id = " << session_id << llendl;
+ LLConversationItemParticipant* participant_model = dynamic_cast<LLConversationItemParticipant*>(getViewModelItem());
+ //llinfos << "Merov debug : onCurrentVoiceSessionChanged participant_model = " << participant_model << llendl;
+
+ if (participant_model)
+ {
+ //llinfos << "Merov debug : onCurrentVoiceSessionChanged enter if 1" << llendl;
+ LLConversationItemSession* parent_session = participant_model->getParentSession();
+ //llinfos << "Merov debug : onCurrentVoiceSessionChanged parent_session = " << parent_session << llendl;
+ if (parent_session)
+ {
+ //llinfos << "Merov debug : onCurrentVoiceSessionChanged enter if 2" << llendl;
+ bool is_active = (parent_session->getUUID() == session_id);
+ //llinfos << "Merov debug : onCurrentVoiceSessionChanged, is_active = " << is_active << llendl;
+ mSpeakingIndicator->switchIndicator(is_active);
+ //llinfos << "Merov debug : onCurrentVoiceSessionChanged switchIndicator done" << llendl;
+ }
+ }
+ //llinfos << "Merov debug : onCurrentVoiceSessionChanged end" << llendl;
+}
+
void LLConversationViewParticipant::refresh()
{
// Refresh the participant view from its model data
@@ -453,6 +483,7 @@ void LLConversationViewParticipant::refresh()
// *TODO: We should also do something with vmi->isModerator() to echo that state in the UI somewhat
mSpeakingIndicator->setIsMuted(vmi->isMuted());
+ //mSpeakingIndicator->switchIndicator(true);
// Do the regular upstream refresh
LLFolderViewItem::refresh();
diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h
index 3610ac67de..1baa8bb5ec 100755
--- a/indra/newview/llconversationview.h
+++ b/indra/newview/llconversationview.h
@@ -94,7 +94,7 @@ private:
bool mMinimizedMode;
LLVoiceClientStatusObserver* mVoiceClientObserver;
-
+
boost::signals2::connection mActiveVoiceChannelConnection;
};
@@ -116,7 +116,7 @@ public:
Params();
};
- virtual ~LLConversationViewParticipant( void ) { }
+ virtual ~LLConversationViewParticipant( void );
bool hasSameValue(const LLUUID& uuid) { return (uuid == mUUID); }
virtual void refresh();
@@ -141,6 +141,8 @@ protected:
void onInfoBtnClick();
private:
+ void onCurrentVoiceSessionChanged(const LLUUID& session_id);
+
LLAvatarIconCtrl* mAvatarIcon;
LLButton * mInfoBtn;
LLOutputMonitorCtrl* mSpeakingIndicator;
@@ -157,6 +159,8 @@ private:
static void initChildrenWidths(LLConversationViewParticipant* self);
void updateChildren();
LLView* getItemChildView(EAvatarListItemChildIndex child_view_index);
+
+ boost::signals2::connection mActiveVoiceChannelConnection;
};
#endif // LL_LLCONVERSATIONVIEW_H
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 2789b78c2d..2707e3dcbb 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -133,7 +133,6 @@ void LLFloaterIMContainer::onCurrentChannelChanged(const LLUUID& session_id)
}
}
-
BOOL LLFloaterIMContainer::postBuild()
{
mNewMessageConnection = LLIMModel::instance().mNewMsgSignal.connect(boost::bind(&LLFloaterIMContainer::onNewMessageReceived, this, _1));
@@ -141,6 +140,9 @@ BOOL LLFloaterIMContainer::postBuild()
// mTabContainer will be initialized in LLMultiFloater::addChild()
setTabContainer(getChild<LLTabContainer>("im_box_tab_container"));
+ mStubPanel = getChild<LLPanel>("stub_panel");
+ mStubTextBox = getChild<LLTextBox>("stub_textbox_2");
+ mStubTextBox->setURLClickedCallback(boost::bind(&LLFloaterIMContainer::returnFloaterToHost, this));
mConversationsStack = getChild<LLLayoutStack>("conversations_stack");
mConversationsPane = getChild<LLLayoutPanel>("conversations_layout_panel");
@@ -494,6 +496,24 @@ void LLFloaterIMContainer::tabClose()
}
}
+void LLFloaterIMContainer::showStub(bool stub_is_visible)
+{
+ if (stub_is_visible)
+ {
+ mTabContainer->hideAllTabs();
+ }
+
+ mStubPanel->setVisible(stub_is_visible);
+}
+
+// listener for click on mStubTextBox2
+void LLFloaterIMContainer::returnFloaterToHost()
+{
+ LLUUID session_id = this->getSelectedSession();
+ LLFloaterIMSessionTab* floater = LLFloaterIMSessionTab::getConversation(session_id);
+ floater->onTearOffClicked();
+}
+
void LLFloaterIMContainer::setVisible(BOOL visible)
{ LLFloaterIMNearbyChat* nearby_chat;
if (visible)
diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h
index f65e946dad..e60576a50d 100644
--- a/indra/newview/llfloaterimcontainer.h
+++ b/indra/newview/llfloaterimcontainer.h
@@ -65,12 +65,13 @@ public:
/*virtual*/ void addFloater(LLFloater* floaterp,
BOOL select_added_floater,
LLTabContainer::eInsertionPoint insertion_point = LLTabContainer::END);
-
+ void returnFloaterToHost();
void showConversation(const LLUUID& session_id);
void selectConversation(const LLUUID& session_id);
BOOL selectConversationPair(const LLUUID& session_id, bool select_widget);
/*virtual*/ void tabClose();
+ void showStub(bool visible);
static LLFloater* getCurrentVoiceFloater();
static LLFloaterIMContainer* findInstance();
@@ -146,6 +147,8 @@ private:
void openNearbyChat();
LLButton* mExpandCollapseBtn;
+ LLPanel* mStubPanel;
+ LLTextBox* mStubTextBox;
LLLayoutPanel* mMessagesPane;
LLLayoutPanel* mConversationsPane;
LLLayoutStack* mConversationsStack;
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index e78422145d..6b13f5f381 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -313,6 +313,7 @@ void LLFloaterIMSessionTab::onFocusReceived()
if (container)
{
container->selectConversationPair(mSessionID, true);
+ container->showStub(! getHost());
}
}
diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h
index 94854ee9ee..8f5a8c2c1b 100644
--- a/indra/newview/llfloaterimsessiontab.h
+++ b/indra/newview/llfloaterimsessiontab.h
@@ -91,6 +91,7 @@ public:
void buildConversationViewParticipant();
void setSortOrder(const LLConversationSort& order);
+ virtual void onTearOffClicked();
virtual void updateMessages() {}
@@ -106,7 +107,6 @@ protected:
bool onIMShowModesMenuItemCheck(const LLSD& userdata);
bool onIMShowModesMenuItemEnable(const LLSD& userdata);
static void onSlide(LLFloaterIMSessionTab *self);
- virtual void onTearOffClicked();
// refresh a visual state of the Call button
void updateCallBtnState(bool callIsActive);
diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp
index 4a9a50d96a..3569516388 100644
--- a/indra/newview/lloutputmonitorctrl.cpp
+++ b/indra/newview/lloutputmonitorctrl.cpp
@@ -278,21 +278,45 @@ BOOL LLOutputMonitorCtrl::handleMouseUp(S32 x, S32 y, MASK mask)
void LLOutputMonitorCtrl::setSpeakerId(const LLUUID& speaker_id, const LLUUID& session_id/* = LLUUID::null*/, bool show_other_participants_speaking /* = false */)
{
+ static LLUUID test_uuid("c684ce33-89fb-4544-8f7b-dae243c8b214");
+ bool test_on = (speaker_id == test_uuid);
+ if (test_on)
+ {
+ llinfos << "Merov debug : setSpeakerId, this = " << this << ", session_id = " << session_id << llendl;
+ }
if (speaker_id.isNull() && mSpeakerId.notNull())
{
LLSpeakingIndicatorManager::unregisterSpeakingIndicator(mSpeakerId, this);
}
- if (speaker_id.isNull() || speaker_id == mSpeakerId) return;
+ if (speaker_id.isNull() || speaker_id == mSpeakerId)
+ {
+ if (test_on)
+ {
+ llinfos << "Merov debug : setSpeakerId, nothing done because mSpeakerId == speaker_id" << llendl;
+ }
+ return;
+ }
if (mSpeakerId.notNull())
{
+ if (test_on)
+ {
+ llinfos << "Merov debug : setSpeakerId, unregisterSpeakingIndicator" << llendl;
+ }
// Unregister previous registration to avoid crash. EXT-4782.
- LLSpeakingIndicatorManager::unregisterSpeakingIndicator(mSpeakerId, this);
+ if (getTargetSessionID() == session_id)
+ {
+ LLSpeakingIndicatorManager::unregisterSpeakingIndicator(mSpeakerId, this);
+ }
}
mShowParticipantsSpeaking = show_other_participants_speaking;
mSpeakerId = speaker_id;
+ if (test_on)
+ {
+ llinfos << "Merov debug : setSpeakerId, registerSpeakingIndicator" << llendl;
+ }
LLSpeakingIndicatorManager::registerSpeakingIndicator(mSpeakerId, this, session_id);
//mute management
@@ -320,6 +344,7 @@ void LLOutputMonitorCtrl::onChange()
// virtual
void LLOutputMonitorCtrl::switchIndicator(bool switch_on)
{
+ llinfos << "Merov debug : switchIndicator, mSpeakerId = " << mSpeakerId << ", switch_on = " << switch_on << llendl;
// ensure indicator is visible in case it is not in visible chain
// to be called when parent became visible next time to notify parent that visibility is changed.
setVisible(TRUE);
diff --git a/indra/newview/llspeakingindicatormanager.cpp b/indra/newview/llspeakingindicatormanager.cpp
index 900379ae1e..316a2739b8 100644
--- a/indra/newview/llspeakingindicatormanager.cpp
+++ b/indra/newview/llspeakingindicatormanager.cpp
@@ -155,6 +155,7 @@ void SpeakingIndicatorManager::registerSpeakingIndicator(const LLUUID& speaker_i
BOOL is_in_same_voice = LLVoiceClient::getInstance()->isParticipant(speaker_id);
speakers_uuids.insert(speaker_id);
+ llinfos << "Merov debug : registerSpeakingIndicator call switchSpeakerIndicators, switch = " << is_in_same_voice << llendl;
switchSpeakerIndicators(speakers_uuids, is_in_same_voice);
}
@@ -195,6 +196,7 @@ SpeakingIndicatorManager::~SpeakingIndicatorManager()
void SpeakingIndicatorManager::sOnCurrentChannelChanged(const LLUUID& /*session_id*/)
{
+ llinfos << "Merov debug : sOnCurrentChannelChanged call switchSpeakerIndicators, FALSE" << llendl;
switchSpeakerIndicators(mSwitchedIndicatorsOn, FALSE);
mSwitchedIndicatorsOn.clear();
}
@@ -208,16 +210,21 @@ void SpeakingIndicatorManager::onParticipantsChanged()
LL_DEBUGS("SpeakingIndicator") << "Switching all OFF, count: " << mSwitchedIndicatorsOn.size() << LL_ENDL;
// switch all indicators off
+ llinfos << "Merov debug : onParticipantsChanged call switchSpeakerIndicators, FALSE" << llendl;
switchSpeakerIndicators(mSwitchedIndicatorsOn, FALSE);
+ llinfos << "Merov debug : onParticipantsChanged call switchSpeakerIndicators, end FALSE switch" << llendl;
mSwitchedIndicatorsOn.clear();
LL_DEBUGS("SpeakingIndicator") << "Switching all ON, count: " << speakers_uuids.size() << LL_ENDL;
// then switch current voice participants indicators on
+ llinfos << "Merov debug : onParticipantsChanged call switchSpeakerIndicators, TRUE" << llendl;
switchSpeakerIndicators(speakers_uuids, TRUE);
+ llinfos << "Merov debug : onParticipantsChanged call switchSpeakerIndicators, end TRUE switch" << llendl;
}
void SpeakingIndicatorManager::switchSpeakerIndicators(const speaker_ids_t& speakers_uuids, BOOL switch_on)
{
+ llinfos << "Merov debug : switchSpeakerIndicators, switch_on = " << switch_on << llendl;
LLVoiceChannel* voice_channel = LLVoiceChannel::getCurrentVoiceChannel();
LLUUID session_id;
if (voice_channel)
diff --git a/indra/newview/llspeakingindicatormanager.h b/indra/newview/llspeakingindicatormanager.h
index b0a147865b..c2cf2a3702 100644
--- a/indra/newview/llspeakingindicatormanager.h
+++ b/indra/newview/llspeakingindicatormanager.h
@@ -37,7 +37,7 @@ public:
virtual ~LLSpeakingIndicator(){}
virtual void switchIndicator(bool switch_on) = 0;
-private:
+//private:
friend class SpeakingIndicatorManager;
// Accessors for target voice session UUID.
// They are intended to be used only from SpeakingIndicatorManager to ensure target session is
diff --git a/indra/newview/skins/default/xui/en/floater_im_container.xml b/indra/newview/skins/default/xui/en/floater_im_container.xml
index 590ce45c33..1388b9e474 100644
--- a/indra/newview/skins/default/xui/en/floater_im_container.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_container.xml
@@ -124,7 +124,47 @@
left="0"
name="im_box_tab_container"
top="0"
- width="412"/>
+ width="412">
+ <panel
+ follows="all"
+ layout="topleft"
+ name="stub_panel"
+ opaque="true"
+ top_pad="0"
+ left="0"
+ height="430"
+ width="412">
+ <text
+ type="string"
+ clip_partial="false"
+ follows="left|top"
+ layout="topleft"
+ left="20"
+ right="-20"
+ name="stub_textbox_1"
+ top="10"
+ height="20"
+ valign="center"
+ wrap="true">
+ This conversation is in a separate window.
+ </text>
+ <text
+ type="string"
+ clip_partial="false"
+ follows="left|top"
+ layout="topleft"
+ left="20"
+ right="-20"
+ name="stub_textbox_2"
+ top="40"
+ height="20"
+ valign="center"
+ parse_urls="true"
+ wrap="true">
+ [secondlife:/// Bring it back.]
+ </text>
+ </panel>
+ </panel_container>
</layout_panel>
</layout_stack>
</multi_floater>
diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml
index a889eb7933..1d74f1bc25 100644
--- a/indra/newview/skins/default/xui/en/floater_im_session.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_session.xml
@@ -203,7 +203,7 @@
name="translate_chat_checkbox_lp"
top_delta="0"
visible="true"
- width="230">
+ width="210">
<check_box
top="10"
control_name="TranslateChat"
@@ -217,7 +217,7 @@
</layout_panel>
<layout_panel
height="248"
- width="230"
+ width="210"
layout="topleft"
follows="all"
left_delta="0"
@@ -227,17 +227,17 @@
user_resize="true"
auto_resize="true"
name="chat_holder">
- <chat_history
- font="SansSerifSmall"
- follows="all"
- visible="true"
- height="240"
- name="chat_history"
- parse_highlights="true"
- parse_urls="true"
- width="230"
- left="5">
- </chat_history>
+ <chat_history
+ font="SansSerifSmall"
+ follows="all"
+ visible="true"
+ height="240"
+ name="chat_history"
+ parse_highlights="true"
+ parse_urls="true"
+ right="-5"
+ left="5">
+ </chat_history>
</layout_panel>
</layout_stack>
</panel>