merging in latest changes
commit
18e5fa5bbd
|
|
@ -296,10 +296,14 @@ void LLAvatarActions::startConference(const uuid_vec_t& ids, const LLUUID& float
|
|||
}
|
||||
const std::string title = LLTrans::getString("conference-title");
|
||||
LLUUID session_id = gIMMgr->addSession(title, IM_SESSION_CONFERENCE_START, ids[0], id_array, false, floater_id);
|
||||
if (session_id != LLUUID::null)
|
||||
|
||||
if (session_id == LLUUID::null)
|
||||
{
|
||||
LLIMFloater::show(session_id);
|
||||
return;
|
||||
}
|
||||
|
||||
LLIMFloater::show(session_id);
|
||||
|
||||
make_ui_sound("UISndStartIM");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -596,6 +596,14 @@ LLChatHistory::LLChatHistory(const LLChatHistory::Params& p)
|
|||
mEditor = LLUICtrlFactory::create<LLTextEditor>(editor_params, this);
|
||||
}
|
||||
|
||||
LLSD LLChatHistory::getValue() const
|
||||
{
|
||||
LLSD* text=new LLSD();
|
||||
text->assign(mEditor->getText());
|
||||
return *text;
|
||||
|
||||
}
|
||||
|
||||
LLChatHistory::~LLChatHistory()
|
||||
{
|
||||
this->clear();
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ class LLChatHistory : public LLUICtrl
|
|||
|
||||
public:
|
||||
~LLChatHistory();
|
||||
|
||||
LLSD getValue() const;
|
||||
void initFromParams(const Params&);
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -286,32 +286,21 @@ void LLIMFloaterContainer::onCloseFloater(LLUUID& id)
|
|||
// virtual
|
||||
void LLIMFloaterContainer::computeResizeLimits(S32& new_min_width, S32& new_min_height)
|
||||
{
|
||||
bool is_left_pane_expanded = !mConversationsPane->isCollapsed();
|
||||
bool is_right_pane_expanded = !mMessagesPane->isCollapsed();
|
||||
|
||||
S32 conversations_pane_min_dim = mConversationsPane->getMinDim();
|
||||
|
||||
if (is_right_pane_expanded)
|
||||
// possibly increase floater's minimum height according to children's minimums
|
||||
for (S32 tab_idx = 0; tab_idx < mTabContainer->getTabCount(); ++tab_idx)
|
||||
{
|
||||
S32 conversations_pane_width =
|
||||
(is_left_pane_expanded ? gSavedPerAccountSettings.getS32("ConversationsListPaneWidth") : conversations_pane_min_dim);
|
||||
|
||||
// possibly increase minimum size constraint due to children's minimums.
|
||||
for (S32 tab_idx = 0; tab_idx < mTabContainer->getTabCount(); ++tab_idx)
|
||||
LLFloater* floaterp = dynamic_cast<LLFloater*>(mTabContainer->getPanelByIndex(tab_idx));
|
||||
if (floaterp)
|
||||
{
|
||||
LLFloater* floaterp = dynamic_cast<LLFloater*>(mTabContainer->getPanelByIndex(tab_idx));
|
||||
if (floaterp)
|
||||
{
|
||||
new_min_width = llmax(new_min_width,
|
||||
floaterp->getMinWidth() + conversations_pane_width + LLPANEL_BORDER_WIDTH * 2);
|
||||
new_min_height = llmax(new_min_height, floaterp->getMinHeight());
|
||||
}
|
||||
new_min_height = llmax(new_min_height, floaterp->getMinHeight());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
new_min_width = conversations_pane_min_dim;
|
||||
}
|
||||
|
||||
S32 conversations_pane_min_dim = mConversationsPane->getRelevantMinDim();
|
||||
S32 messages_pane_min_dim = mMessagesPane->getRelevantMinDim();
|
||||
|
||||
// set floater's minimum width according to relevant minimal children's dimensionals
|
||||
new_min_width = conversations_pane_min_dim + messages_pane_min_dim + LLPANEL_BORDER_WIDTH*2;
|
||||
}
|
||||
|
||||
void LLIMFloaterContainer::onNewMessageReceived(const LLSD& data)
|
||||
|
|
|
|||
|
|
@ -255,6 +255,47 @@ bool LLSpeakersDelayActionsStorage::onTimerActionCallback(const LLUUID& speaker_
|
|||
}
|
||||
|
||||
|
||||
//
|
||||
// ModerationResponder
|
||||
//
|
||||
|
||||
class ModerationResponder : public LLHTTPClient::Responder
|
||||
{
|
||||
public:
|
||||
ModerationResponder(const LLUUID& session_id)
|
||||
{
|
||||
mSessionID = session_id;
|
||||
}
|
||||
|
||||
virtual void error(U32 status, const std::string& reason)
|
||||
{
|
||||
llwarns << status << ": " << reason << llendl;
|
||||
|
||||
if ( gIMMgr )
|
||||
{
|
||||
//403 == you're not a mod
|
||||
//should be disabled if you're not a moderator
|
||||
if ( 403 == status )
|
||||
{
|
||||
gIMMgr->showSessionEventError(
|
||||
"mute",
|
||||
"not_a_mod_error",
|
||||
mSessionID);
|
||||
}
|
||||
else
|
||||
{
|
||||
gIMMgr->showSessionEventError(
|
||||
"mute",
|
||||
"generic_request_error",
|
||||
mSessionID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
LLUUID mSessionID;
|
||||
};
|
||||
|
||||
//
|
||||
// LLSpeakerMgr
|
||||
//
|
||||
|
|
@ -480,6 +521,28 @@ void LLSpeakerMgr::updateSpeakerList()
|
|||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Check if the list is empty, except if it's Nearby Chat (session_id NULL).
|
||||
LLUUID session_id = getSessionID();
|
||||
if ((mSpeakers.size() == 0) && (!session_id.isNull()))
|
||||
{
|
||||
// If the list is empty, we update it with whatever was used to initiate the call so that it doesn't stay empty too long.
|
||||
// *TODO: Fix the server side code that sometimes forgets to send back the list of agents after a chat started
|
||||
// (IOW, fix why we get no ChatterBoxSessionAgentListUpdates message after the initial ChatterBoxSessionStartReply)
|
||||
LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(session_id);
|
||||
for (uuid_vec_t::iterator it = session->mInitialTargetIDs.begin();it!=session->mInitialTargetIDs.end();++it)
|
||||
{
|
||||
// We only add avatars that are on line
|
||||
if (LLAvatarTracker::instance().isBuddyOnline(*it))
|
||||
{
|
||||
setSpeaker(*it, "", LLSpeaker::STATUS_VOICE_ACTIVE, LLSpeaker::SPEAKER_AGENT);
|
||||
}
|
||||
}
|
||||
// Also add the current agent
|
||||
setSpeaker(gAgentID, "", LLSpeaker::STATUS_VOICE_ACTIVE, LLSpeaker::SPEAKER_AGENT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLSpeakerMgr::setSpeakerNotInChannel(LLSpeaker* speakerp)
|
||||
|
|
@ -733,43 +796,6 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update)
|
|||
}
|
||||
}
|
||||
|
||||
class ModerationResponder : public LLHTTPClient::Responder
|
||||
{
|
||||
public:
|
||||
ModerationResponder(const LLUUID& session_id)
|
||||
{
|
||||
mSessionID = session_id;
|
||||
}
|
||||
|
||||
virtual void error(U32 status, const std::string& reason)
|
||||
{
|
||||
llwarns << status << ": " << reason << llendl;
|
||||
|
||||
if ( gIMMgr )
|
||||
{
|
||||
//403 == you're not a mod
|
||||
//should be disabled if you're not a moderator
|
||||
if ( 403 == status )
|
||||
{
|
||||
gIMMgr->showSessionEventError(
|
||||
"mute",
|
||||
"not_a_mod_error",
|
||||
mSessionID);
|
||||
}
|
||||
else
|
||||
{
|
||||
gIMMgr->showSessionEventError(
|
||||
"mute",
|
||||
"generic_request_error",
|
||||
mSessionID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
LLUUID mSessionID;
|
||||
};
|
||||
|
||||
void LLIMSpeakerMgr::toggleAllowTextChat(const LLUUID& speaker_id)
|
||||
{
|
||||
LLPointer<LLSpeaker> speakerp = findSpeaker(speaker_id);
|
||||
|
|
|
|||
Loading…
Reference in New Issue