When LLTextEditor calls onCommit, update its setting value if applicable.

Hook up commit on focus lost, too, have the autoresponse messages do that.
This commit is contained in:
Lirusaito
2016-06-12 15:52:20 -04:00
parent e486b9b1e8
commit a41ce2d281
2 changed files with 9 additions and 4 deletions

View File

@@ -362,6 +362,7 @@ LLTextEditor::LLTextEditor(
menu->setCanTearOff(FALSE);
menu->setVisible(FALSE);
mPopupMenuHandle = menu->getHandle();
setCommitCallback(boost::bind(&LLTextEditor::setControlValue, this, _2));
}
@@ -4820,6 +4821,10 @@ LLView* LLTextEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory
node->getAttributeBOOL("hide_scrollbar",hide_scrollbar);
text_editor->setHideScrollbarForShortDocs(hide_scrollbar);
BOOL commit_on_focus_lost = FALSE;
node->getAttributeBOOL("commit_on_focus_lost",commit_on_focus_lost);
text_editor->setCommitOnFocusLost(commit_on_focus_lost);
text_editor->initFromXML(node, parent);
return text_editor;

View File

@@ -121,27 +121,27 @@ The following wildcards are available to enhance your autoresponses: #n for user
<check_box bottom_delta="0" left_delta="150" follows="left|top" control_name="AutoresponseAnyoneFriendsOnly" name="AutoresponseAnyoneFriendsOnly" label="for friends only" tool_tip="Avoids sending this response to those you don't know"/>
<check_box bottom_delta="0" left_delta="100" follows="left|top" control_name="AutoresponseAnyoneItem" name="AutoresponseAnyoneItem" label="Send item"/>
<check_box bottom_delta="0" left_delta="80" follows="left|top" control_name="AutoresponseAnyoneShow" name="AutoresponseAnyoneShow" label="Show that this was sent"/>
<text_editor bottom_delta="-147" left="8" font="SansSerifSmall" follows="left|top" height="145" max_length="1100" control_name="AutoresponseAnyoneMessage" name="AutoresponseAnyoneMessage" width="480" word_wrap="true" spell_check="true" hide_scrollbar="true"/>
<text_editor bottom_delta="-147" left="8" font="SansSerifSmall" follows="left|top" height="145" max_length="1100" control_name="AutoresponseAnyoneMessage" name="AutoresponseAnyoneMessage" width="480" word_wrap="true" spell_check="true" commit_on_focus_lost="true" hide_scrollbar="true"/>
<drop_target bottom_delta="-37" left="8" height="17" width="480" fill_parent="true" control_name="AutoresponseAnyoneItemID" name="AutoresponseAnyoneItemID" tool_tip="Drop an item here to have it sent with the above response."/>
</panel>
<panel border="true" left="1" bottom="0" height="208" width="500" label="Nonfriends" name="Nonfriends">
<check_box bottom="-20" left="6" follows="left|top" control_name="AutoresponseNonFriends" name="AutoresponseNonFriends" label="Enable" tool_tip="Send the message in the box below to people who are not your friends"/>
<check_box bottom_delta="0" left_delta="250" follows="left|top" control_name="AutoresponseNonFriendsItem" name="AutoresponseNonFriendsItem" label="Send item"/>
<check_box bottom_delta="0" left_delta="80" follows="left|top" control_name="AutoresponseNonFriendsShow" name="AutoresponseNonFriendsShow" label="Show that this was sent"/>
<text_editor bottom_delta="-147" left="8" font="SansSerifSmall" follows="left|top" height="145" max_length="1100" control_name="AutoresponseNonFriendsMessage" name="AutoresponseNonFriendsMessage" width="480" word_wrap="true" spell_check="true" hide_scrollbar="true"/>
<text_editor bottom_delta="-147" left="8" font="SansSerifSmall" follows="left|top" height="145" max_length="1100" control_name="AutoresponseNonFriendsMessage" name="AutoresponseNonFriendsMessage" width="480" word_wrap="true" spell_check="true" commit_on_focus_lost="true" hide_scrollbar="true"/>
<drop_target bottom_delta="-37" left="8" height="17" width="480" fill_parent="true" control_name="AutoresponseNonFriendsItemID" name="AutoresponseNonFriendsItemID" tool_tip="Drop an item here to have it sent with the above response."/>
</panel>
<panel border="true" left="1" bottom="0" height="208" width="500" label="Muted" name="Muted">
<check_box bottom="-20" left="6" follows="left|top" control_name="AutoresponseMuted" name="AutoresponseMuted" label="Enable" tool_tip="Send the message in the box below to people you have muted."/>
<check_box bottom_delta="0" left_delta="250" follows="left|top" control_name="AutoresponseMutedItem" name="AutoresponseMutedItem" label="Send item"/>
<check_box bottom_delta="0" left_delta="80" follows="left|top" control_name="AutoresponseMutedShow" name="AutoresponseMutedShow" label="Show that this was sent"/>
<text_editor bottom_delta="-147" left="8" font="SansSerifSmall" follows="left|top" height="145" max_length="1100" control_name="AutoresponseMutedMessage" name="AutoresponseMutedMessage" width="480" word_wrap="true" spell_check="true" hide_scrollbar="true"/>
<text_editor bottom_delta="-147" left="8" font="SansSerifSmall" follows="left|top" height="145" max_length="1100" control_name="AutoresponseMutedMessage" name="AutoresponseMutedMessage" width="480" word_wrap="true" spell_check="true" commit_on_focus_lost="true" hide_scrollbar="true"/>
<drop_target bottom_delta="-37" left="8" height="17" width="480" fill_parent="true" control_name="AutoresponseMutedItemID" name="AutoresponseMutedItemID" tool_tip="Drop an item here to have it sent with the above response."/>
</panel>
<panel border="true" left="1" bottom="0" height="208" width="500" label="Busy Mode" name="Busy Mode" tool_tip="Send the message in the box below to people who message when you are busy.">
<check_box bottom="-20" left="258" follows="left|top" control_name="BusyModeResponseItem" name="BusyModeResponseItem" label="Send item"/>
<check_box bottom_delta="0" left_delta="80" follows="left|top" control_name="BusyModeResponseShow" name="BusyModeResponseShow" label="Show that this was sent"/>
<text_editor bottom_delta="-147" left="8" font="SansSerifSmall" follows="left|top" height="145" max_length="1100" control_name="BusyModeResponse" name="BusyModeResponse" width="480" word_wrap="true" spell_check="true" hide_scrollbar="true"/>
<text_editor bottom_delta="-147" left="8" font="SansSerifSmall" follows="left|top" height="145" max_length="1100" control_name="BusyModeResponse" name="BusyModeResponse" width="480" word_wrap="true" spell_check="true" commit_on_focus_lost="true" hide_scrollbar="true"/>
<drop_target bottom_delta="-37" left="8" height="17" width="480" fill_parent="true" control_name="BusyModeResponseItemID" name="BusyModeResponseItemID" tool_tip="Drop an item here to have it sent with the above response."/>
</panel>
</tab_container>