This makes LLStringUtil thread-safe by removing a rather unnecessary
LLFastTimer from LLStringUtil::format.
Same thing for LLTrans::getString and LLTrans::findString, where
even a comment stated that the author wasn't interested in measuring
cpu time at all. In this case I added some code back to make sure
that we're not calling LLTrans::getString() in an inner loop, which
was the reason that the LLFastTimer was added.
Made one string static to avoid 45000 look ups during login, which
kinda triggered the above test.
Finally, LLNotificationsUtil::add is made thread-safe by making
LLNotificationChannelBase::mItems thread-safe and defering a call
to LLNotifications::updateItem to the main thread when called
from another thread (using a little statemachine).
Instead of having several AI* classes, it turned out to be easier to
have a namespace: this allows me to define the classes in llcommon but
add (new) 'add' and 'add_modal' functions to 'AIAlert' in llui.
This is needed to avoid a collision with the 'add' functions in
LLNotificationsUtil.
The new add/add_modal makes it a lot easier to just show a caught
alert, prepending or appending new text: it turns out that that is
way more common then a re-throw.
Adjusted code as appropriate.
A system to throw errors that allow for easy error reporting to the user
by showing a translated pop-up alert box with the error message.
The messages use strings.xml for translation and allow the usual
replacement args (ie [FILE] is replaced with a filename).
The exceptions can be cascaded, by adding more (translated) text
when caught and then re-throwing the result.
Macros are being used to support adding a function name prefix
to a message of the current function that the exception is thrown
from.
The syntax is:
<macro>(<line>); to show 'line'
<macro>(<alert>, <line>); to append 'line' to a caught alert.
<macro>(<line>, <alert>); to prepend 'line' to a caught alert.
where <macro> is one of:
THROW_ALERT, THROW_MALERT, THROW_FALERT, THROW_FMALERT,
THROW_ALERTE, THROW_MALERTE, THROW_FALERTE, THROW_FMALERTE, where
M = modal, F = Function name.
and where <line> is one of:
<xmldesc>
<xmldesc>, AIArgs<args>
where <xmldesc> is a string literal that will be looked up
in strings.xml, and <args> is:
(<key>, <replacement>)[<args>]
There are more variations of the macros to throw an arbitrary
class (append _CLASS), include an int code (append C) or
to store the current errno as code (append E).
For example, THROW_MALERTC(code, ...), or THROW_FALERT_CLASS(Foobar, ...),
where the ... is the same as for the macros above.
Documentation and example usage has been added to aialert.h.
-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