summaryrefslogtreecommitdiff
path: root/indra/llui
AgeCommit message (Collapse)Author
2024-09-03Use Lua result-set logic for "LLFloaterReg"s "getFloaterNames" op.Nat Goodspeed
This is the query that produced so many results that, before we lifted the infinite-loop interrupt limit, inspect(result) hit the limit and terminated.
2024-08-06code clean upMnikolenko Productengine
2024-08-05Allow getting the list of floater names, hide top menu items; add demo scriptMnikolenko Productengine
2024-08-02Lua api for adjusting toolbarsMnikolenko Productengine
2024-07-18Ditch `LLEventTrackable` aka `boost::signals2::trackable`.Nat Goodspeed
Remove documented `LLEventPump` support for `LLEventTrackable`. That claimed support was always a little bit magical/fragile. IF: * a class included `LLEventTrackable` as a base class AND * an instance of that class was managed by `boost::shared_ptr` AND * you passed one of that class's methods and the `boost::shared_ptr` specifically to `boost::bind()` AND * the resulting `boost::bind()` object was passed into `LLEventPump::listen()` THEN the promise was that on destruction of that object, that listener would automatically be disconnected -- instead of leaving a dangling pointer bound into the `LLEventPump`, causing a crash on the next `LLEventPump::post()` call. The only existing code in the viewer code base that exercised `LLEventTrackable` functionality was in test programs. When the viewer calls `LLEventPump::listen()`, it typically stores the resulting connection object in an `LLTempBoundListener` variable, which guarantees disconnection on destruction of that variable. The fact that `LLEventTrackable` support is specific to `boost::bind()`, that it silently fails to keep its promise with `std::bind()` or a lambda or any other form of C++ callable, makes it untrustworthy for new code. Note that the code base still uses `boost::signals2::trackable` for other `boost::signals2::signal` instances not associated with `LLEventPump`. We are not changing those at this time.
2024-06-25Add wear/detach actions to Appearance listener; update example scriptMnikolenko Productengine
2024-06-10Merge branch 'release/luau-scripting' into lua-ui-callbacksMnikolenko Productengine
2024-06-10Remove SharedCommitCallbackRegistry; add helpers CommitRegistrarHelper and ↵Mnikolenko Productengine
ScopedRegistrarHelper
2024-05-31Cherry-pick leap.lua changes; other clean upMnikolenko Productengine
2024-05-30Merge branch release/luau-scriptingMnikolenko Productengine
2024-05-24Merge branch 'release/luau-scripting' into lua-timersNat Goodspeed
2024-05-24Nat's ideas from PR #1547Nat Goodspeed
2024-05-22Add support for sending messages to Nearby chat from Lua scriptMnikolenko Productengine
2024-05-16set UNTRUSTED_ALLOW as default; some LLCommitCallbackInfo clean upMnikolenko Productengine
2024-05-16Merge branch 'lua-ui-callbacks' into release/luau-scriptingMnikolenko Productengine
2024-05-16adjust the flag to be untrusted block/allow/throttleMnikolenko Productengine
2024-05-15Fix missing #include in lltextvalidate.cppNat Goodspeed
2024-05-15Merge branch 'release/luau-scripting' into lua-timers after Maint XNat Goodspeed
2024-05-15Manual whitespace cleanup (fix_whitespace.py).Nat Goodspeed
2024-05-15Merge commit 'e7eced3' into lua-timers for whitespace fixes.Nat Goodspeed
2024-05-15Add trusted flag to UI callbacks, so not everything is accessible from the ↵Mnikolenko Productengine
script
2024-05-15Merge branch 'main' into release/luau-scripting for Maint X release.Nat Goodspeed
2024-05-15Manual whitespace fixes (fix_whitespace.py).Nat Goodspeed
2024-05-15Merge commit 'e7eced3' into release/luau-scripting: whitespace fix.Nat Goodspeed
2024-05-08Merge branch 'nat/cleanup-timers' into lua-timers.Nat Goodspeed
2024-05-02WIP: In llcallbacklist.h, add singleton LLLater for time delays.Nat Goodspeed
The big idea is to reduce the number of per-tick callbacks asking, "Is it time yet? Is it time yet?" We do that for LLEventTimer and LLEventTimeout. LLLater presents doAtTime(LLDate), with doAfterInterval() and doPeriodically() methods implemented using doAtTime(). All return handles. The free functions doAfterInterval() and doPeriodically() now forward to the corresponding LLLater methods. LLLater also presents isRunning(handle) and cancel(handle). LLLater borrows the tactic of LLEventTimer: while there's at least one running timer, it registers an LLCallbackList tick() callback to service ready timers. But instead of looping over all of them asking, "Are you ready?" it keeps them in a priority queue ordered by desired timestamp, and only touches those whose timestamp has been reached. Also, it honors a maximum time slice: once the ready timers have run for longer than the limit, it defers processing other ready timers to the next tick() call. The intent is to consume fewer cycles per tick() call, both by the management machinery and the timers themselves. Revamp LLCallbackList to accept C++ callables in addition to (classic C function pointer, void*) pairs. Make addFunction() return a handle (different than LLLater handles) that can be passed to a new deleteFunction() overload, since std::function instances can't be compared for equality. In fact, implement LLCallbackList using boost::signals2::signal, which provides almost exactly what we want. LLCallbackList continues to accept (function pointer, void*) pairs, but now we store a lambda that calls the function pointer with that void*. It takes less horsing around to create a C++ callable from a (function pointer, void*) pair than the other way around. For containsFunction() and deleteFunction(), such pairs are the keys for a lookup table whose values are handles. Instead of having a static global LLCallbackList gIdleCallbacks, make LLCallbackList an LLSingleton to guarantee initialization. For backwards compatibility, gIdleCallbacks is now a macro for LLCallbackList::instance(). Move doOnIdleOneTime() and doOnIdleRepeating() functions to LLCallbackList methods, but for backwards compatibility continue providing free functions. Reimplement LLEventTimer using LLLater::doPeriodically(). One implication is that LLEventTimer need no longer be derived from LLInstanceTracker, which we used to iterate over all instances every tick. Give it start() and stop() methods, since some subclasses (e.g. LLFlashTimer) used to call its member LLTimer's start() and stop(). Remove updateClass(): LLCallbackList::callFunctions() now takes care of that. Remove LLToastLifeTimer::start() and stop(), since LLEventTimer now provides those. Remove getRemainingTimeF32(), since LLLater does not (yet) provide that feature. While at it, make LLEventTimer::tick() return bool instead of BOOL, and change existing overrides. Make LLApp::stepFrame() call LLCallbackList::callFunctions() instead of LLEventTimer::updateClass(). We could have refactored LLEventTimer to use the mechanism now built into LLLater, but frankly the LLEventTimer API is rather clumsy. You MUST derive a subclass and override tick(), and you must instantiate your subclass on the heap because, when your tick() override returns false, LLEventTimer deletes its subclass instance. The LLLater API is simpler to use, and LLEventTimer is much simplified by using it. Merge lleventfilter.h's LLEventTimeoutBase into LLEventTimeout, and likewise merge LLEventThrottleBase into LLEventThrottle. The separation was for testability, but now that they're no longer based on LLTimer, it becomes harder to use dummy time for testing. Temporarily skip tests based on LLEventTimeoutBase and LLEventThrottleBase. Instead of listening for LLEventPump("mainloop") ticks and using LLTimer, LLEventTimeout now uses LLLater::doAfterInterval(). Instead of LLTimer and LLEventTimeout, LLEventThrottle likewise now uses LLLater::doAfterInterval(). Recast a couple local LLEventTimeout pre-lambda callable classes with lambdas. Dignify F64 with a new typedef LLDate::timestamp. LLDate heavily depends on that as its base time representation, but there are those who question use of floating-point for time. This is a step towards insulating us from any future change.
2024-05-01Merge branch 'marchcat/w-whitespace' into marchcat/x-ws-mergeAndrey Lihatskiy
2024-04-29#824 Process source files in bulk: replace tabs with spaces, convert CRLF to ↵Andrey Lihatskiy
LF, and trim trailing whitespaces as needed
2024-04-26viewer#1308 LLFloaterView::restoreAll CrashAndrey Kleshchev
2024-04-24Merge 'main' into release/luau-scripting on promotion of Maint YZNat Goodspeed
2024-04-24Merge branch 'main' into marchcat/x-mergeAndrey Lihatskiy
2024-04-16Merge branch 'main' into release/luau-scriptingNat Goodspeed
2024-04-12Merge branch 'main' into marchcat/x-mergeAndrey Lihatskiy
# Conflicts: # indra/llimage/llimageworker.cpp # indra/llimage/llimageworker.h # indra/newview/llcontrolavatar.cpp # indra/newview/llfloaterprofiletexture.cpp # indra/newview/lloutfitslist.cpp # indra/newview/lloutfitslist.h # indra/newview/lltexturefetch.cpp
2024-04-10Merge branch 'main' into marchcat/y-mergeAndrey Lihatskiy
# Conflicts: # autobuild.xml # indra/llcommon/llsys.cpp
2024-04-03Merge branch 'main' into release/luau-scripting.Nat Goodspeed
2024-04-03Introduce fsyspath subclass of std::filesystem::path.Nat Goodspeed
Our std::strings are UTF-8 encoded, so conversion from std::string to std::filesystem::path must use UTF-8 decoding. The native Windows std::filesystem::path constructor and assignment operator accepting std::string use "native narrow encoding," which mangles path strings containing UTF-8 encoded non-ASCII characters. fsyspath's std::string constructor and assignment operator explicitly engage std::filesystem::u8path() to handle encoding. u8path() is deprecated in C++20, but once we adapt fsyspath's conversion to C++20 conventions, consuming code need not be modified.
2024-03-27viewer#1069 Crash after getting list of notification filesAndrey Kleshchev
2024-03-27secondlife/viewer#944 Display should be consistent between llDialog text and ↵Alexander Gavriliuk
llDialog buttons
2024-03-27Merge branch 'main' into marchcat/yz-mergeAndrey Lihatskiy
2024-03-27Merge branch 'main' into DRTVWR-591-maint-XAndrey Lihatskiy
# Conflicts: # indra/llui/lltransutil.cpp # indra/newview/app_settings/settings.xml # indra/newview/llfloaterenvironmentadjust.cpp # indra/newview/llpaneleditwater.cpp # indra/newview/llpanelface.cpp # indra/newview/lltexturectrl.cpp # indra/newview/lltexturectrl.h
2024-03-27Merge remote-tracking branch 'origin/main' into DRTVWR-588-maint-WAndrey Lihatskiy
# Conflicts: # .github/workflows/build.yaml
2024-03-25mac build fixMaxim Nikolenko
2024-03-25Add keystroke event support and allow adding text lines to the line editorMnikolenko Productengine
2024-03-24viewer#1033 Crash at syncFloaterTabOrderAndrey Kleshchev
2024-03-24Revert "SL-20416 Fix Crash Report 1409376 (update)"Andrey Kleshchev
This reverts commit cc43f42e6b7401c2cdd3204a16f757f5169bd95b.
2024-03-22Add Develop menu option 'Debug Camera Controls'Alexander Gavriliuk
2024-03-21mac build fixMnikolenko Productengine
2024-03-21Accept an array for "add_list_item" and change EVENT_LIST typeMnikolenko Productengine
2024-03-21Switch to LLDispatchListenerMnikolenko Productengine
2024-03-20LLLuaFloater code clean upMnikolenko Productengine