UI cleanup.
-Added ui-local transformation matrix. -Gutted legacy commitcallbacks throughout ui widget ctors. -Created filter_editor ui widget which issues commit on keypress -search_editor commits on focus loss/enter press -search_editor and filter_editor now have a built in 'x' button to clear text. -LLComboBox::setPrearrangeCallback now uses boost::function -LLComboBox::setTextEntryCallback now uses boost::function -LLLineEditor::setKeystrokeCallback now uses boost::function -LLLineEditor::setPrevalidate now uses boost::function -LLPanel::childSetKeystrokeCallback removed -LLPanel::childSetPrevalidate removed -LLPanel::childSetActionTextbox now uses boost::function -LLTextBox::setClickedCallback now uses boost::function -LLTextEditor::setKeystrokeCallback added. -Cleaned up JCFloaterAreaSearch
This commit is contained in:
@@ -1349,12 +1349,12 @@ BOOL LLFloaterIMPanel::postBuild()
|
||||
mInputEditor = getChild<LLLineEditor>("chat_editor");
|
||||
mInputEditor->setFocusReceivedCallback( boost::bind(&LLFloaterIMPanel::onInputEditorFocusReceived, this) );
|
||||
mFocusLostSignal = mInputEditor->setFocusLostCallback( boost::bind(&LLFloaterIMPanel::onInputEditorFocusLost, this) );
|
||||
mInputEditor->setKeystrokeCallback( onInputEditorKeystroke );
|
||||
mInputEditor->setCommitCallback( onCommitChat );
|
||||
mInputEditor->setCallbackUserData(this);
|
||||
mInputEditor->setKeystrokeCallback( boost::bind(&LLFloaterIMPanel::onInputEditorKeystroke, this, _1) );
|
||||
mInputEditor->setCommitCallback( boost::bind(&LLFloaterIMPanel::onSendMsg,this) );
|
||||
mInputEditor->setCommitOnFocusLost( FALSE );
|
||||
mInputEditor->setRevertOnEsc( FALSE );
|
||||
mInputEditor->setReplaceNewlinesWithSpaces( FALSE );
|
||||
mInputEditor->setPassDelete( TRUE );
|
||||
|
||||
if (LLButton* btn = findChild<LLButton>("profile_callee_btn"))
|
||||
{
|
||||
@@ -1371,7 +1371,7 @@ BOOL LLFloaterIMPanel::postBuild()
|
||||
|
||||
childSetAction("start_call_btn", onClickStartCall, this);
|
||||
childSetAction("end_call_btn", onClickEndCall, this);
|
||||
childSetAction("send_btn", onClickSend, this);
|
||||
getChild<LLButton>("send_btn")->setCommitCallback(boost::bind(&LLFloaterIMPanel::onSendMsg,this));
|
||||
if (LLButton* btn = findChild<LLButton>("toggle_active_speakers_btn"))
|
||||
btn->setCommitCallback(boost::bind(&LLFloaterIMPanel::onClickToggleActiveSpeakers, this, _2));
|
||||
|
||||
@@ -1755,7 +1755,7 @@ BOOL LLFloaterIMPanel::handleKeyHere( KEY key, MASK mask )
|
||||
BOOL handled = FALSE;
|
||||
if( KEY_RETURN == key && mask == MASK_NONE)
|
||||
{
|
||||
sendMsg();
|
||||
onSendMsg();
|
||||
handled = TRUE;
|
||||
|
||||
// Close talk panels on hitting return
|
||||
@@ -1960,25 +1960,11 @@ void LLFloaterIMPanel::onClickEndCall(void* userdata)
|
||||
self->getVoiceChannel()->deactivate();
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterIMPanel::onClickSend(void* userdata)
|
||||
{
|
||||
LLFloaterIMPanel* self = (LLFloaterIMPanel*)userdata;
|
||||
self->sendMsg();
|
||||
}
|
||||
|
||||
void LLFloaterIMPanel::onClickToggleActiveSpeakers(const LLSD& value)
|
||||
{
|
||||
childSetVisible("active_speakers_panel", !value);
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterIMPanel::onCommitChat(LLUICtrl* caller, void* userdata)
|
||||
{
|
||||
LLFloaterIMPanel* self= (LLFloaterIMPanel*) userdata;
|
||||
self->sendMsg();
|
||||
}
|
||||
|
||||
void LLFloaterIMPanel::onInputEditorFocusReceived()
|
||||
{
|
||||
mHistoryEditor->setCursorAndScrollToEnd();
|
||||
@@ -1989,19 +1975,17 @@ void LLFloaterIMPanel::onInputEditorFocusLost()
|
||||
setTyping(FALSE);
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterIMPanel::onInputEditorKeystroke(LLLineEditor* caller, void* userdata)
|
||||
void LLFloaterIMPanel::onInputEditorKeystroke(LLLineEditor* caller)
|
||||
{
|
||||
LLFloaterIMPanel* self = (LLFloaterIMPanel*)userdata;
|
||||
std::string text = self->mInputEditor->getText();
|
||||
std::string text = caller->getText();
|
||||
if (!text.empty())
|
||||
{
|
||||
self->setTyping(TRUE);
|
||||
setTyping(TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Deleting all text counts as stopping typing.
|
||||
self->setTyping(FALSE);
|
||||
setTyping(FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2109,7 +2093,7 @@ void deliver_message(const std::string& utf8_text,
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterIMPanel::sendMsg()
|
||||
void LLFloaterIMPanel::onSendMsg()
|
||||
{
|
||||
if (!gAgent.isGodlike()
|
||||
&& (mDialog == IM_NOTHING_SPECIAL)
|
||||
|
||||
Reference in New Issue
Block a user