From 828374749682a5febc6ebac81321e80dee11085e Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Mon, 12 Nov 2012 16:25:35 +0200 Subject: CHUI-386 FIXED Vertical scrollbar not fully showing in conversation message panel --- .../skins/default/xui/en/floater_im_session.xml | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'indra') 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"> - - + + -- cgit v1.2.3 From 2813e49d198400a0f6416e01f720bdeb5f506144 Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Fri, 9 Nov 2012 15:13:52 +0200 Subject: CHUI-362 WIP (Torn off conversation name is highlighted when selected in conversation list with different conversation showing in message panel): implemented method for a switch off tabs (switching to an invisible state) --- indra/llui/lltabcontainer.cpp | 11 +++++++++++ indra/llui/lltabcontainer.h | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index d0920685bf..c24eb2ee90 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -1556,6 +1556,17 @@ BOOL LLTabContainer::setTab(S32 which) return is_visible; } + +void LLTabContainer::hideAllTabs() +{ + setCurrentPanelIndex(-1); + for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter) + { + (* iter)->mTabPanel->setVisible(FALSE); + } +} + + BOOL LLTabContainer::selectTabByName(const std::string& name) { LLPanel* panel = getPanelByName(name); diff --git a/indra/llui/lltabcontainer.h b/indra/llui/lltabcontainer.h index cebace2ceb..a9cdf22b16 100644 --- a/indra/llui/lltabcontainer.h +++ b/indra/llui/lltabcontainer.h @@ -188,10 +188,11 @@ public: void selectFirstTab(); void selectLastTab(); void selectNextTab(); - void selectPrevTab(); + void selectPrevTab(); BOOL selectTabPanel( LLPanel* child ); BOOL selectTab(S32 which); BOOL selectTabByName(const std::string& title); + void hideAllTabs(); BOOL getTabPanelFlashing(LLPanel* child); void setTabPanelFlashing(LLPanel* child, BOOL state); -- cgit v1.2.3 From 3d42133ecb7671d8284bc0309f8df9e6e7f2df9c Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Fri, 9 Nov 2012 17:04:21 +0200 Subject: CHUI-362 WIP (Torn off conversation name is highlighted when selected in conversation list with different conversation showing in message panel): implemented the stub panel and a control of it's visibility --- indra/newview/llfloaterimcontainer.cpp | 12 +++++++ indra/newview/llfloaterimcontainer.h | 3 ++ indra/newview/llfloaterimsessiontab.cpp | 1 + .../skins/default/xui/en/floater_im_container.xml | 42 +++++++++++++++++++++- 4 files changed, 57 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 2789b78c2d..994a76189a 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -141,6 +141,8 @@ BOOL LLFloaterIMContainer::postBuild() // mTabContainer will be initialized in LLMultiFloater::addChild() setTabContainer(getChild("im_box_tab_container")); + mStubPanel = getChild("stub_panel"); + mStubTextBox = getChild("stub_textbox"); mConversationsStack = getChild("conversations_stack"); mConversationsPane = getChild("conversations_layout_panel"); @@ -494,6 +496,16 @@ void LLFloaterIMContainer::tabClose() } } +void LLFloaterIMContainer::showStub(bool stub_is_visible) +{ + if (stub_is_visible) + { + mTabContainer->hideAllTabs(); + } + + mStubPanel->setVisible(stub_is_visible); +} + void LLFloaterIMContainer::setVisible(BOOL visible) { LLFloaterIMNearbyChat* nearby_chat; if (visible) diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h index f65e946dad..a09cde60f5 100644 --- a/indra/newview/llfloaterimcontainer.h +++ b/indra/newview/llfloaterimcontainer.h @@ -71,6 +71,7 @@ public: 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 c39319b373..3a1cc2880a 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/skins/default/xui/en/floater_im_container.xml b/indra/newview/skins/default/xui/en/floater_im_container.xml index 590ce45c33..e3db3d52ed 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"> + + + This conversation is in a separate window. + + + Bring it back. + + + -- cgit v1.2.3 From ab5a0a1d4d0a029dd92c9fc108638736a57ce7c6 Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Mon, 12 Nov 2012 15:06:42 +0200 Subject: CHUI-362 FIXED (Torn off conversation name is highlighted when selected in conversation list with different conversation showing in message panel): connect new method "returnFloaterToHost" to click on quasi-URL "Bring it back" --- indra/newview/llfloaterimcontainer.cpp | 12 ++++++++++-- indra/newview/llfloaterimcontainer.h | 2 +- indra/newview/llfloaterimsessiontab.h | 2 +- indra/newview/skins/default/xui/en/floater_im_container.xml | 4 ++-- 4 files changed, 14 insertions(+), 6 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 994a76189a..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)); @@ -142,7 +141,8 @@ BOOL LLFloaterIMContainer::postBuild() setTabContainer(getChild("im_box_tab_container")); mStubPanel = getChild("stub_panel"); - mStubTextBox = getChild("stub_textbox"); + mStubTextBox = getChild("stub_textbox_2"); + mStubTextBox->setURLClickedCallback(boost::bind(&LLFloaterIMContainer::returnFloaterToHost, this)); mConversationsStack = getChild("conversations_stack"); mConversationsPane = getChild("conversations_layout_panel"); @@ -506,6 +506,14 @@ void LLFloaterIMContainer::showStub(bool stub_is_visible) 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 a09cde60f5..e60576a50d 100644 --- a/indra/newview/llfloaterimcontainer.h +++ b/indra/newview/llfloaterimcontainer.h @@ -65,7 +65,7 @@ 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); 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/skins/default/xui/en/floater_im_container.xml b/indra/newview/skins/default/xui/en/floater_im_container.xml index e3db3d52ed..1388b9e474 100644 --- a/indra/newview/skins/default/xui/en/floater_im_container.xml +++ b/indra/newview/skins/default/xui/en/floater_im_container.xml @@ -159,9 +159,9 @@ top="40" height="20" valign="center" - parse_urls="false" + parse_urls="true" wrap="true"> - Bring it back. + [secondlife:/// Bring it back.] -- cgit v1.2.3 From 33068c6da8f079c557e4fb520b074f6e5ce40ba4 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 14 Nov 2012 10:40:51 -0800 Subject: CHUI-479 : WIP : Add debug tracing into speaking indicator manager and monitors (to be deleted eventually). --- indra/newview/llconversationmodel.cpp | 10 +++++++++ indra/newview/llconversationmodel.h | 1 + indra/newview/llconversationview.cpp | 32 ++++++++++++++++++++++++++++ indra/newview/llconversationview.h | 8 +++++-- indra/newview/lloutputmonitorctrl.cpp | 29 +++++++++++++++++++++++-- indra/newview/llspeakingindicatormanager.cpp | 7 ++++++ indra/newview/llspeakingindicatormanager.h | 2 +- 7 files changed, 84 insertions(+), 5 deletions(-) (limited to 'indra') 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(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 295dd2ae6d..11eef3f7dc 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("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(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(); @@ -471,6 +502,7 @@ void LLConversationViewParticipant::addToFolder(LLFolderViewFolder* folder) mAvatarIcon->setValue(mUUID); //Allows the speaker indicator to be activated based on the user and conversation +// llinfos << "Merov debug : setSpeakerId of " << mUUID << ", session id = " << vmi->getUUID() << llendl; mSpeakingIndicator->setSpeakerId(mUUID, vmi->getUUID()); } } diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h index cc6995c207..4b2c9b2d76 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(); @@ -140,6 +140,8 @@ protected: void onInfoBtnClick(); private: + void onCurrentVoiceSessionChanged(const LLUUID& session_id); + LLAvatarIconCtrl* mAvatarIcon; LLButton * mInfoBtn; LLOutputMonitorCtrl* mSpeakingIndicator; @@ -156,6 +158,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/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 -- cgit v1.2.3