Age | Commit message (Collapse) | Author |
|
|
|
The previous implementation went to some effort to crash if anyone attempted
to create or destroy an LLInstanceTracker subclass instance during traversal.
That restriction is manageable within a single thread, but becomes unworkable
if it's possible that a given subclass might be used on more than one thread.
Remove LLInstanceTracker::instance_iter, beginInstances(), endInstances(),
also key_iter, beginKeys() and endKeys(). Instead, introduce key_snapshot()
and instance_snapshot(), the only means of iterating over LLInstanceTracker
instances. (These are intended to resemble functions, but in fact the current
implementation simply presents the classes.) Iterating over a captured
snapshot defends against container modifications during traversal. The term
'snapshot' reminds the coder that a new instance created during traversal will
not be considered. To defend against instance deletion during traversal, a
snapshot stores std::weak_ptrs which it lazily dereferences, skipping on the
fly any that have expired.
Dereferencing instance_snapshot::iterator gets you a reference rather than a
pointer. Because some use cases want to delete all existing instances, add an
instance_snapshot::deleteAll() method that extracts the pointer. Those cases
used to require explicitly copying instance pointers into a separate
container; instance_snapshot() now takes care of that. It remains the caller's
responsibility to ensure that all instances of that LLInstanceTracker subclass
were allocated on the heap.
Replace unkeyed static LLInstanceTracker::getInstance(T*) -- which returned
nullptr if that instance had been destroyed -- with new getWeak() method
returning std::weak_ptr<T>. Caller must detect expiration of that weak_ptr.
Adjust tests accordingly.
Use of std::weak_ptr to detect expired instances requires engaging
std::shared_ptr in the constructor. We now store shared_ptrs in the static
containers (std::map for keyed, std::set for unkeyed).
Make LLInstanceTrackerBase a template parameterized on the type of the static
data it manages. For that reason, hoist static data class declarations out of
the class definitions to an LLInstanceTrackerStuff namespace.
Remove the static atomic sIterationNestDepth and its methods incrementDepth(),
decrementDepth() and getDepth(), since they were used only to forbid creation
and destruction during traversal.
Add a std::mutex to static data. Introduce an internal LockStatic class that
locks the mutex while providing a pointer to static data, making that the only
way to access the static data.
The LLINSTANCETRACKER_DTOR_NOEXCEPT macro goes away because we no longer
expect ~LLInstanceTracker() to throw an exception in test programs.
That affects LLTrace::StatBase as well as LLInstanceTracker itself.
Adapt consumers to the new LLInstanceTracker API.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Reviewed by Kelly
|
|
|
|
|
|
foo to find some pointers
|
|
In a number of different places, for different reasons, the viewer wants to
load a UI-related file that might be overridden by a non-default skin; and
within that skin, might further be overridden by a non-default language.
Apparently, for each of those use cases, every individual developer approached
it as an entirely new problem, solving it idiosyncratically for that one case.
Not only is this a maintenance problem, but it rubs one's nose in the fact
that most such solutions consider only a subset of the relevant skin
directories.
Richard and I evolved an API intended to address all such cases: a central
LLDir method returning a list of relevant pathnames, from most general to most
localized, filtered to present only existing files; plus a couple of
convenience methods to specifically obtain the most general and most localized
available file.
There were several load-skinned-file methods (LLFloater::buildFromFile(),
LLPanel::buildFromFile() and LLUICtrlFactory::createFromFile() -- apparently
cloned-and-modified from each other) that contained funky bolted-on logic to
output the loaded data to an optional passed LLXMLNodePtr param. The trouble
is that passing that param forced each of these methods to subvert its normal
search: specifically for that case, it needed to find the baseline XML file
instead of the localized one. Richard agreed that for the intended usage
(reformatting XML files) we should use XML schema instead, and that the hacky
functionality should be removed. Remove it. Also remove
LLUICtrlFactory::getLocalizedXMLNode(), only used for those three special cases.
Some callers explicitly passed the optional LLXMLNodePtr param as NULL. Remove
that.
Remove LLFloaterUIPreview::displayFloater(save) param, which relied on the
optional output LLXMLNodePtr param. Make onClickSaveFloater() and
onClickSaveAll() emit popupAndPrintWarning() about discontinued functionality.
Recast LLFloater::buildFromFile(), LLPanel::buildFromFile(),
LLUICtrlFactory::createFromFile(), LLNotifications::loadTemplates(),
LLUI::locateSkin(), LLFontRegistry::parseFontInfo(),
LLUIColorTable::loadFromSettings(), LLUICtrlFactory::loadWidgetTemplate(),
LLUICtrlFactory::getLayeredXMLNode(), LLUIImageList::initFromFile(),
LLAppViewer::launchUpdater() and LLMediaCtrl::navigateToLocalPage() to use
findSkinnedFilenames(). (Is LLAppViewer::launchUpdater() ever called any more?
Apparently so -- though the linux-updater.bin logic to process the relevant
command-line switch has been disabled. Shrug.) (Is
LLMediaCtrl::navigateToLocalPage() ever used?? If so, why?)
Remove LLUI::setupPaths(), getXUIPaths(), getSkinPath() and
getLocalizedSkinPath(). Remove the skins/paths.xml file read by setupPaths().
The only configuration it contained was the pair of partial paths "xui/en" and
"xui/[LANGUAGE]" -- hardly likely to change. getSkinPath() specifically
returned the first of these, while getLocalizedSkinPath() specifically
returned the second. This knowledge is now embedded in findSkinnedFilenames().
Also remove paths.xml from viewer_manifest.py.
Remove injected xui_paths from LLFontGL::initClass() and
LLFontRegistry::LLFontRegistry(). These are no longer needed since
LLFontRegistry can now directly consult LLDir for its path search. Stop
passing LLUI::getXUIPaths() to LLFontGL::initClass() in LLViewerWindow's
constructor and initFonts() method.
Add LLDir::append() and add() methods for the simple task of combining two
path components separated by getDirDelimiter() -- but only if they're both
non-empty. Amazing how often that logic is replicated. Replace some existing
concatenations with add() or append().
New LLDir::findSkinnedFilenames() method must know current language. Allow
injecting current language by adding an LLDir::setSkinFolder(language) param,
and pass it where LLAppViewer::init() and initConfiguration() currently call
setSkinFolder(). Also add LLDir::getSkinFolder() and getLanguage() methods.
Change LLFLoaterUIPreview's LLLocalizationResetForcer helper to "forcibly
reset language" using LLDir::setSkinFolder() instead of LLUI::setupPaths().
Update LLDir stubs in lldir_stub.cpp and llupdaterservice_test.cpp.
Add LLDir::getUserDefaultSkinDir() to obtain often-overlooked possible skin
directory -- like getUserSkinDir() but with "default" in place of the current
skin name as the last path component. (However, we hope findSkinnedFilenames()
obviates most explicit use of such individual skin directory pathnames.)
Add LLDir unit tests for new findSkinnedFilenames() and add() methods -- the
latter exercises append() as well.
Tweak indra/integration_tests/llui_libtest/llui_libtest.cpp for all the above.
Notably, comment out its export_test_floaters() function, since the essential
LLFloater::buildFromFile(optional LLXMLNodePtr) functionality has been
removed. This may mean that llui_libtest.cpp has little remaining value, not
sure.
|
|
notifications
|
|
- Refactoring of LLToast and LLScreenChannel classes: moved LLToast signals to the private section.
- Modified the screen channel's lists of toasts to store LLHandles instead of pointers and screen channel code to work with toast LLHandles.
|
|
cleaned up font positioning on buttons
|
|
notifications in quick succession crashes to desktop
* Moved toast logic for mouse hover out of the draw call to avoid chain of callbacks that lead to reordering of the draw list while we are iterating over it.
|
|
leave events.
The mouse position is checked every frame in relation to the toast to catch the mouse leaving the toast "i" button when the toast is moved by the screen channel.
The fix is intended to avoid the toasts that don't fade in the following scenario:
1. Have User A Send 4 IM messages to User B: a, b, c, d
2. Have User B hover their mouse over the i on toast c (don't click on it just hover)
3. As the other toasts fade observe toast c moves up to the top and does not fade
|
|
other floater like avatar inspector.
This is a kind of a workaround: perhaps the logic of updating the toast fade timer should be refactored to start/stop the timer from onMouseLeave/onMouseEnter callbacks instead of using "IsHovered" flag for each toast.
|
|
in minimal and standard skin
|
|
transparency settings:
* Normally toasts are as opaque as specified by "inactive floater opacity" setting.
* When mouse is hovering a toast, the toast uses "active floater opacity" setting.
* Fading toasts have 1/2 of "inactive floater opacity".
|
|
|
|
|
|
before it fades. Please add fade time back to Chat preferences.
- Added two spinners to the Chat preferences tab that control NearbyToastLifeTime and NearbyToastFadingTime
- Added callbacks to the LLNearbyChatScreenChannel that update these properties if they were changed
Refactoring of LLToast:
- Removed code that was making toast transparent from LLToast::draw()
- Modified LLToast interface that relates to showing and hiding toast, so that all screen channels can use LLToast universally.
- Replaced in LLScreenChannel calling methods of old interface to new ones.
|
|
away (all toasts used to freeze).
|
|
|
|
streamlined LLUICtrlFactory's interface
|
|
|
|
|
|
Added virtual method LLToast::reshape to prevent calling LLModalDialog::reshape method that changes toasts position. Toasts position should be controlled by toast screen channel. Ideally toasts should have different implementation for alerts and other kind of toasts, but it will leads to vast unwilling for 2.1 changes.
reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/666/
--HG--
branch : product-engine
|
|
the toast logic to set visibility on dialogs in reverse order was bringing older modal dialogs to the front
|
|
Reverted toast fading logic.
reviewed by Mike Antipov https://codereview.productengine.com/secondlife/r/292/
--HG--
branch : product-engine
|
|
LLPanelGenericTip classes.
* decoupled tip toast panel related logic from class LLTast;
* moved documentation comment of LLPanelGenericTip constructor from .cpp to .h file;
* corrected name attribute in panel_generic_tip.xml;
reviewed by Mike Antipov and Vadim Savchuk at https://codereview.productengine.com/secondlife/r/230/
--HG--
branch : product-engine
|
|
and EXT-6714 Normal Old chat toast is shown while chat log is open
reviwed https://codereview.productengine.com/secondlife/r/212/ manttipov
--HG--
branch : product-engine
|
|
replaced toast timer LLTimer with LLEventTimer implementation that not depends on draw method;
reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/148/
--HG--
branch : product-engine
|
|
host spot.
Close button is partially positioned out of toast(floater). Usually, hovering or clicking
that "outer" part of the button can not be handled. The workaround is to position the button
on the floater and make the floater background invisible. Now close button is properly handled,
but toast is transparent. To fix this i added wrapper_panel that looks and behaves like a floater.
--HG--
branch : product-engine
|
|
opaque) even when in focus”,
made toast opaque when became hovered;
--HG--
branch : product-engine
|
|
semi-transparent (not opaque) even when in focus)
--HG--
branch : product-engine
|
|
--HG--
branch : product-engine
|
|
--HG--
branch : product-engine
|
|
is now being reset for all toasts on hovering
--HG--
branch : product-engine
|
|
llviewermessages.cpp
|
|
Fixed many more includes
|
|
notification toasts fade away
- reduced a number of show-hide cycles for toasts
- only toasts showed for the first time will appear in foreground now (using of mFirstLook from LLFloater)
--HG--
branch : product-engine
|