CHUI-125 FIXED if a call is accept then open im-session's floater
parent
18aabdfd3d
commit
fd247320ce
|
|
@ -873,9 +873,10 @@ class LLIMWellChiclet : public LLSysWellChiclet, LLIMSessionObserver
|
|||
{
|
||||
friend class LLUICtrlFactory;
|
||||
public:
|
||||
virtual void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) {}
|
||||
virtual void sessionRemoved(const LLUUID& session_id) { messageCountChanged(LLSD()); }
|
||||
virtual void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id) {}
|
||||
/*virtual*/ void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) {}
|
||||
/*virtual*/ void sessionVoiceOrIMStarted(const LLUUID& session_id) {};
|
||||
/*virtual*/ void sessionRemoved(const LLUUID& session_id) { messageCountChanged(LLSD()); }
|
||||
/*virtual*/ void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id) {}
|
||||
|
||||
~LLIMWellChiclet();
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -57,19 +57,24 @@ LLChicletBar::LLChicletBar(const LLSD&)
|
|||
: mChicletPanel(NULL),
|
||||
mToolbarStack(NULL)
|
||||
{
|
||||
// Firstly add our self to IMSession observers, so we catch session events
|
||||
// before chiclets do that.
|
||||
LLIMMgr::getInstance()->addSessionObserver(this);
|
||||
// IM floaters are from now managed by LLIMFloaterContainer.
|
||||
// See LLIMFloaterContainer::sessionVoiceOrIMStarted() and CHUI-125
|
||||
|
||||
// // Firstly add our self to IMSession observers, so we catch session events
|
||||
// // before chiclets do that.
|
||||
// LLIMMgr::getInstance()->addSessionObserver(this);
|
||||
|
||||
buildFromFile("panel_chiclet_bar.xml");
|
||||
}
|
||||
|
||||
LLChicletBar::~LLChicletBar()
|
||||
{
|
||||
if (!LLSingleton<LLIMMgr>::destroyed())
|
||||
{
|
||||
LLIMMgr::getInstance()->removeSessionObserver(this);
|
||||
}
|
||||
// IM floaters are from now managed by LLIMFloaterContainer.
|
||||
// See LLIMFloaterContainer::sessionVoiceOrIMStarted() and CHUI-125
|
||||
// if (!LLSingleton<LLIMMgr>::destroyed())
|
||||
// {
|
||||
// LLIMMgr::getInstance()->removeSessionObserver(this);
|
||||
// }
|
||||
}
|
||||
|
||||
LLIMChiclet* LLChicletBar::createIMChiclet(const LLUUID& session_id)
|
||||
|
|
|
|||
|
|
@ -50,9 +50,10 @@ public:
|
|||
LLChicletPanel* getChicletPanel() { return mChicletPanel; }
|
||||
|
||||
// LLIMSessionObserver observe triggers
|
||||
virtual void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id);
|
||||
virtual void sessionRemoved(const LLUUID& session_id);
|
||||
void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id);
|
||||
/*virtual*/ void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id);
|
||||
/*virtual*/ void sessionVoiceOrIMStarted(const LLUUID& session_id) {};
|
||||
/*virtual*/ void sessionRemoved(const LLUUID& session_id);
|
||||
/*virtual*/ void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id);
|
||||
|
||||
S32 getTotalUnreadIMCount();
|
||||
|
||||
|
|
|
|||
|
|
@ -50,6 +50,9 @@ LLIMFloaterContainer::LLIMFloaterContainer(const LLSD& seed)
|
|||
: LLMultiFloater(seed)
|
||||
,mExpandCollapseBtn(NULL)
|
||||
{
|
||||
// Firstly add our self to IMSession observers, so we catch session events
|
||||
LLIMMgr::getInstance()->addSessionObserver(this);
|
||||
|
||||
mAutoResize = FALSE;
|
||||
LLTransientFloaterMgr::getInstance()->addControlView(LLTransientFloaterMgr::IM, this);
|
||||
}
|
||||
|
|
@ -61,8 +64,18 @@ LLIMFloaterContainer::~LLIMFloaterContainer()
|
|||
|
||||
gSavedPerAccountSettings.setBOOL("ConversationsListPaneCollapsed", mConversationsPane->isCollapsed());
|
||||
gSavedPerAccountSettings.setBOOL("ConversationsMessagePaneCollapsed", mMessagesPane->isCollapsed());
|
||||
|
||||
if (!LLSingleton<LLIMMgr>::destroyed())
|
||||
{
|
||||
LLIMMgr::getInstance()->removeSessionObserver(this);
|
||||
}
|
||||
}
|
||||
|
||||
void LLIMFloaterContainer::sessionVoiceOrIMStarted(const LLUUID& session_id)
|
||||
{
|
||||
LLIMFloater::show(session_id);
|
||||
};
|
||||
|
||||
BOOL LLIMFloaterContainer::postBuild()
|
||||
{
|
||||
mNewMessageConnection = LLIMModel::instance().mNewMsgSignal.connect(boost::bind(&LLIMFloaterContainer::onNewMessageReceived, this, _1));
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
#include "llimview.h"
|
||||
#include "llfloater.h"
|
||||
#include "llmultifloater.h"
|
||||
#include "llavatarpropertiesprocessor.h"
|
||||
|
|
@ -117,7 +118,9 @@ private:
|
|||
};
|
||||
// CHUI-137 : End
|
||||
|
||||
class LLIMFloaterContainer : public LLMultiFloater
|
||||
class LLIMFloaterContainer
|
||||
: public LLMultiFloater
|
||||
, public LLIMSessionObserver
|
||||
{
|
||||
public:
|
||||
LLIMFloaterContainer(const LLSD& seed);
|
||||
|
|
@ -144,6 +147,12 @@ public:
|
|||
|
||||
LLFolderViewItem* createConversationItemWidget(LLConversationItem* item);
|
||||
|
||||
// LLIMSessionObserver observe triggers
|
||||
/*virtual*/ void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) {};
|
||||
/*virtual*/ void sessionVoiceOrIMStarted(const LLUUID& session_id);
|
||||
/*virtual*/ void sessionRemoved(const LLUUID& session_id) {};
|
||||
/*virtual*/ void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id) {};
|
||||
|
||||
private:
|
||||
typedef std::map<LLUUID,LLFloater*> avatarID_panel_map_t;
|
||||
avatarID_panel_map_t mSessions;
|
||||
|
|
|
|||
|
|
@ -2582,7 +2582,9 @@ LLUUID LLIMMgr::addSession(
|
|||
{
|
||||
LLDynamicArray<LLUUID> ids;
|
||||
ids.put(other_participant_id);
|
||||
return addSession(name, dialog, other_participant_id, ids, voice);
|
||||
LLUUID session_id = addSession(name, dialog, other_participant_id, ids, voice);
|
||||
notifyObserverSessionVoiceOrIMStarted(session_id);
|
||||
return session_id;
|
||||
}
|
||||
|
||||
// Adds a session using the given session_id. If the session already exists
|
||||
|
|
@ -2609,7 +2611,8 @@ LLUUID LLIMMgr::addSession(
|
|||
|
||||
if (floater_id.notNull())
|
||||
{
|
||||
LLIMFloater* im_floater = LLIMFloater::findInstance(floater_id);
|
||||
LLIMFloater* im_floater = LLIMFloater::findInstance(session_id);
|
||||
|
||||
if (im_floater && im_floater->getStartConferenceInSameFloater())
|
||||
{
|
||||
// The IM floater should be initialized with a new session_id
|
||||
|
|
@ -2936,6 +2939,14 @@ void LLIMMgr::notifyObserverSessionAdded(const LLUUID& session_id, const std::st
|
|||
}
|
||||
}
|
||||
|
||||
void LLIMMgr::notifyObserverSessionVoiceOrIMStarted(const LLUUID& session_id)
|
||||
{
|
||||
for (session_observers_list_t::iterator it = mSessionObservers.begin(); it != mSessionObservers.end(); it++)
|
||||
{
|
||||
(*it)->sessionVoiceOrIMStarted(session_id);
|
||||
}
|
||||
}
|
||||
|
||||
void LLIMMgr::notifyObserverSessionRemoved(const LLUUID& session_id)
|
||||
{
|
||||
for (session_observers_list_t::iterator it = mSessionObservers.begin(); it != mSessionObservers.end(); it++)
|
||||
|
|
|
|||
|
|
@ -298,6 +298,7 @@ class LLIMSessionObserver
|
|||
public:
|
||||
virtual ~LLIMSessionObserver() {}
|
||||
virtual void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) = 0;
|
||||
virtual void sessionVoiceOrIMStarted(const LLUUID& session_id) = 0;
|
||||
virtual void sessionRemoved(const LLUUID& session_id) = 0;
|
||||
virtual void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id) = 0;
|
||||
};
|
||||
|
|
@ -462,6 +463,7 @@ private:
|
|||
static void onInviteNameLookup(LLSD payload, const LLUUID& id, const std::string& name, bool is_group);
|
||||
|
||||
void notifyObserverSessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id);
|
||||
void notifyObserverSessionVoiceOrIMStarted(const LLUUID& session_id);
|
||||
void notifyObserverSessionRemoved(const LLUUID& session_id);
|
||||
void notifyObserverSessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id);
|
||||
|
||||
|
|
|
|||
|
|
@ -169,6 +169,7 @@ public:
|
|||
|
||||
// LLIMSessionObserver observe triggers
|
||||
/*virtual*/ void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id);
|
||||
/*virtual*/ void sessionVoiceOrIMStarted(const LLUUID& session_id) {};
|
||||
/*virtual*/ void sessionRemoved(const LLUUID& session_id);
|
||||
/*virtual*/ void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue