Tag Firestorm-specific code in last commit

Ansariel 2014-10-28 22:39:16 +01:00
parent caa86284e1
commit 00bfbfae2b
4 changed files with 16 additions and 0 deletions

View File

@ -933,6 +933,7 @@ void LLLineEditor::removeChar()
}
}
// <FS> Ctrl-Backspace remove word
// Remove a word (set of characters up to next space/punctuation) from the text
void LLLineEditor::removeWord(bool prev)
{
@ -959,6 +960,7 @@ void LLLineEditor::removeWord(bool prev)
LLUI::reportBadKeystroke();
}
}
// </FS>
void LLLineEditor::addChar(const llwchar uni_char)
{
@ -1407,10 +1409,13 @@ BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask)
else
if( 0 < getCursor() )
{
// <FS> Ctrl-Backspace remove word
//removeChar();
if (mask == MASK_CONTROL)
removeWord(true);
else
removeChar();
// </FS>
}
else
{
@ -1420,6 +1425,7 @@ BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask)
handled = TRUE;
break;
// <FS> Ctrl-Backspace remove word
case KEY_DELETE:
if (!mReadOnly && mask == MASK_CONTROL)
{
@ -1427,6 +1433,7 @@ BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask)
handled = true;
}
break;
// </FS>
case KEY_PAGE_UP:
case KEY_HOME:

View File

@ -285,6 +285,7 @@ private:
void pasteHelper(bool is_primary);
void removeChar();
// <FS> Ctrl-Backspace remove word
void removeWord(bool prev);
void addChar(const llwchar c);
void setCursorAtLocalPos(S32 local_mouse_x);

View File

@ -1122,6 +1122,7 @@ void LLTextEditor::removeChar()
}
}
// <FS> Ctrl-Backspace remove word
// Remove a word (set of characters up to next space/punctuation) from the text
void LLTextEditor::removeWord(bool prev)
{
@ -1148,6 +1149,7 @@ void LLTextEditor::removeWord(bool prev)
LLUI::reportBadKeystroke();
}
}
// </FS>
// Add a single character to the text
S32 LLTextEditor::addChar(S32 pos, llwchar wc)
@ -1744,10 +1746,13 @@ BOOL LLTextEditor::handleSpecialKey(const KEY key, const MASK mask)
else
if( 0 < mCursorPos )
{
// <FS> Ctrl-Backspace remove word
//removeCharOrTab();
if (mask == MASK_CONTROL)
removeWord(true);
else
removeCharOrTab();
// </FS>
}
else
{
@ -1755,6 +1760,7 @@ BOOL LLTextEditor::handleSpecialKey(const KEY key, const MASK mask)
}
break;
// <FS> Ctrl-Backspace remove word
case KEY_DELETE:
if (getEnabled() && mask == MASK_CONTROL)
{
@ -1765,6 +1771,7 @@ BOOL LLTextEditor::handleSpecialKey(const KEY key, const MASK mask)
handled = false;
}
break;
// </FS>
case KEY_RETURN:
if (mask == MASK_NONE)

View File

@ -262,6 +262,7 @@ protected:
S32 overwriteChar(S32 pos, llwchar wc);
void removeChar();
S32 removeChar(S32 pos);
// <FS> Ctrl-Backspace remove word
void removeWord(bool prev);
S32 insert(S32 pos, const LLWString &wstr, bool group_with_next_op, LLTextSegmentPtr segment);
S32 remove(S32 pos, S32 length, bool group_with_next_op);