[LLIMMgr/LLIMPanel Revision] More Miscellaneous Code Cleanup
This commit is contained in:
@@ -216,17 +216,10 @@ bool send_start_session_messages(
|
|||||||
other_participant_id,
|
other_participant_id,
|
||||||
dialog);
|
dialog);
|
||||||
|
|
||||||
switch(dialog)
|
gMessageSystem->addBinaryDataFast(
|
||||||
{
|
_PREHASH_BinaryBucket,
|
||||||
case IM_SESSION_GROUP_START:
|
EMPTY_BINARY_BUCKET,
|
||||||
gMessageSystem->addBinaryDataFast(
|
EMPTY_BINARY_BUCKET_SIZE);
|
||||||
_PREHASH_BinaryBucket,
|
|
||||||
EMPTY_BINARY_BUCKET,
|
|
||||||
EMPTY_BINARY_BUCKET_SIZE);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
gAgent.sendReliableMessage();
|
gAgent.sendReliableMessage();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -470,7 +463,7 @@ BOOL LLFloaterIMPanel::postBuild()
|
|||||||
{
|
{
|
||||||
mInputEditor = getChild<LLLineEditor>("chat_editor");
|
mInputEditor = getChild<LLLineEditor>("chat_editor");
|
||||||
mInputEditor->setFocusReceivedCallback( boost::bind(&LLFloaterIMPanel::onInputEditorFocusReceived, this) );
|
mInputEditor->setFocusReceivedCallback( boost::bind(&LLFloaterIMPanel::onInputEditorFocusReceived, this) );
|
||||||
mFocusLostSignal = mInputEditor->setFocusLostCallback( boost::bind(&LLFloaterIMPanel::onInputEditorFocusLost, this) );
|
mFocusLostSignal = mInputEditor->setFocusLostCallback(boost::bind(&LLFloaterIMPanel::setTyping, this, false));
|
||||||
mInputEditor->setKeystrokeCallback( boost::bind(&LLFloaterIMPanel::onInputEditorKeystroke, this, _1) );
|
mInputEditor->setKeystrokeCallback( boost::bind(&LLFloaterIMPanel::onInputEditorKeystroke, this, _1) );
|
||||||
mInputEditor->setCommitCallback( boost::bind(&LLFloaterIMPanel::onSendMsg,this) );
|
mInputEditor->setCommitCallback( boost::bind(&LLFloaterIMPanel::onSendMsg,this) );
|
||||||
mInputEditor->setCommitOnFocusLost( FALSE );
|
mInputEditor->setCommitOnFocusLost( FALSE );
|
||||||
@@ -502,11 +495,6 @@ BOOL LLFloaterIMPanel::postBuild()
|
|||||||
mHistoryEditor->setParseHTML(TRUE);
|
mHistoryEditor->setParseHTML(TRUE);
|
||||||
mHistoryEditor->setParseHighlights(TRUE);
|
mHistoryEditor->setParseHighlights(TRUE);
|
||||||
|
|
||||||
if ( IM_SESSION_GROUP_START == mDialog )
|
|
||||||
{
|
|
||||||
childSetEnabled("profile_btn", FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
sTitleString = getString("title_string");
|
sTitleString = getString("title_string");
|
||||||
sTypingStartString = getString("typing_start_string");
|
sTypingStartString = getString("typing_start_string");
|
||||||
sSessionStartString = getString("session_start_string");
|
sSessionStartString = getString("session_start_string");
|
||||||
@@ -593,7 +581,8 @@ void LLFloaterIMPanel::draw()
|
|||||||
// show speakers window when voice first connects
|
// show speakers window when voice first connects
|
||||||
if (mShowSpeakersOnConnect && mVoiceChannel->isActive())
|
if (mShowSpeakersOnConnect && mVoiceChannel->isActive())
|
||||||
{
|
{
|
||||||
childSetVisible("active_speakers_panel", true);
|
if (mSpeakerPanel) mSpeakerPanel->setVisible(true);
|
||||||
|
mShowSpeakersOnConnect = false;
|
||||||
}
|
}
|
||||||
if (LLUICtrl* ctrl = findChild<LLUICtrl>("toggle_active_speakers_btn"))
|
if (LLUICtrl* ctrl = findChild<LLUICtrl>("toggle_active_speakers_btn"))
|
||||||
ctrl->setValue(getChildView("active_speakers_panel")->getVisible());
|
ctrl->setValue(getChildView("active_speakers_panel")->getVisible());
|
||||||
@@ -1045,11 +1034,6 @@ void LLFloaterIMPanel::onInputEditorFocusReceived()
|
|||||||
mHistoryEditor->setCursorAndScrollToEnd();
|
mHistoryEditor->setCursorAndScrollToEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLFloaterIMPanel::onInputEditorFocusLost()
|
|
||||||
{
|
|
||||||
setTyping(FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
void LLFloaterIMPanel::onInputEditorKeystroke(LLLineEditor* caller)
|
void LLFloaterIMPanel::onInputEditorKeystroke(LLLineEditor* caller)
|
||||||
{
|
{
|
||||||
// Deleting all text counts as stopping typing.
|
// Deleting all text counts as stopping typing.
|
||||||
|
|||||||
@@ -37,7 +37,6 @@
|
|||||||
#include "lllogchat.h"
|
#include "lllogchat.h"
|
||||||
|
|
||||||
class LLAvatarName;
|
class LLAvatarName;
|
||||||
class LLButton;
|
|
||||||
class LLIMSpeakerMgr;
|
class LLIMSpeakerMgr;
|
||||||
class LLIMInfo;
|
class LLIMInfo;
|
||||||
class LLInventoryCategory;
|
class LLInventoryCategory;
|
||||||
@@ -99,7 +98,6 @@ public:
|
|||||||
|
|
||||||
void onFocusReceived();
|
void onFocusReceived();
|
||||||
void onInputEditorFocusReceived();
|
void onInputEditorFocusReceived();
|
||||||
void onInputEditorFocusLost();
|
|
||||||
void onInputEditorKeystroke(LLLineEditor* caller);
|
void onInputEditorKeystroke(LLLineEditor* caller);
|
||||||
|
|
||||||
void onClickHistory();
|
void onClickHistory();
|
||||||
@@ -245,10 +243,10 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
CachedUICtrl<LLUICtrl> mVolumeSlider;
|
CachedUICtrl<LLUICtrl> mVolumeSlider;
|
||||||
CachedUICtrl<LLButton> mEndCallBtn;
|
CachedUICtrl<LLUICtrl> mEndCallBtn;
|
||||||
CachedUICtrl<LLButton> mStartCallBtn;
|
CachedUICtrl<LLUICtrl> mStartCallBtn;
|
||||||
CachedUICtrl<LLButton> mSendBtn;
|
CachedUICtrl<LLUICtrl> mSendBtn;
|
||||||
CachedUICtrl<LLButton> mMuteBtn;
|
CachedUICtrl<LLUICtrl> mMuteBtn;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -427,20 +427,19 @@ void LLIMMgr::addMessage(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
LLFloaterIMPanel* floater;
|
|
||||||
LLUUID new_session_id = session_id;
|
LLUUID new_session_id = session_id;
|
||||||
if (new_session_id.isNull())
|
if (new_session_id.isNull())
|
||||||
{
|
{
|
||||||
//no session ID...compute new one
|
//no session ID...compute new one
|
||||||
new_session_id = computeSessionID(dialog, other_participant_id);
|
new_session_id = computeSessionID(dialog, other_participant_id);
|
||||||
}
|
}
|
||||||
floater = findFloaterBySession(new_session_id);
|
LLFloaterIMPanel* floater = findFloaterBySession(new_session_id);
|
||||||
if (!floater)
|
if (!floater)
|
||||||
{
|
{
|
||||||
floater = findFloaterBySession(other_participant_id);
|
floater = findFloaterBySession(other_participant_id);
|
||||||
if (floater)
|
if (floater)
|
||||||
{
|
{
|
||||||
llinfos << "found the IM session " << session_id
|
llinfos << "found the IM session " << new_session_id
|
||||||
<< " by participant " << other_participant_id << llendl;
|
<< " by participant " << other_participant_id << llendl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -454,11 +453,7 @@ void LLIMMgr::addMessage(
|
|||||||
if (getIgnoreGroup(session_id) && gAgent.isInGroup(session_id))
|
if (getIgnoreGroup(session_id) && gAgent.isInGroup(session_id))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
std::string name = from;
|
std::string name = (session_name.size() > 1) ? session_name : from;
|
||||||
if(!session_name.empty() && session_name.size()>1)
|
|
||||||
{
|
|
||||||
name = session_name;
|
|
||||||
}
|
|
||||||
|
|
||||||
floater = createFloater(new_session_id, other_participant_id, name, dialog);
|
floater = createFloater(new_session_id, other_participant_id, name, dialog);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user