Commit Graph

28 Commits (8243d30f02abd56dc2abdc1925f16ccf81fbbb49)

Author SHA1 Message Date
Nat Goodspeed 3653727e7f Introduce new LLDir::findSkinnedFilenames() method. Use as needed.
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.
2012-10-10 14:57:43 -04:00
Richard Linden 81ae3c5fc9 SOCIAL-822 FIX UI and Sizing issues with hints in Basic and Advanced modes
fixed crash for advanced mode
2011-04-01 18:15:07 -07:00
Richard Linden 453b0c700a SOCIAL-822 FIX UI and Sizing issues with hints in Basic and Advanced modes
fixed crash for advanced mode
2011-04-01 16:42:30 -07:00
Richard Linden 760e672e80 SOCIAL-822 FIX UI and Sizing issues with hints in Basic and Advanced modes 2011-04-01 00:10:05 -07:00
Richard Linden f443f3e847 SOCIAL-717 FIX Artwork for click to move hint
updated resize logic for hint popups to accomodate image size
2011-03-25 19:13:32 -07:00
Richard Linden 50d21a75a7 merge 2010-11-15 15:52:54 -08:00
Richard Linden 95c9989186 VWR-23444 FIXED Double clicking x on UI hint crashes Skylight Viewer 2010-10-29 14:58:35 -07:00
Richard Linden 7df1671299 EXP-229 FIXED Double clicking x on UI hint crashes Skylight Viewer 2010-10-15 14:05:11 -07:00
Richard Nelson 01b28ddf5d EXP-156 WIP Implement custom Skylight hints 2010-10-06 20:10:36 -07:00
Leyla Farazha 3059e13098 Fixed issue where non-visible hint wasn't allowing mouse events to pass through 2010-10-08 17:01:32 -07:00
Leyla Farazha 7ffc9b06c8 Created a floater for setting display name 2010-10-08 16:56:02 -07:00
Monroe Linden b124d45b4e Fix "no newline at end of file". 2010-09-22 17:14:41 -07:00
Richard Nelson 7c0a6df30a EXP-60 FIX not showing after Re-enabling Hints in same session 2010-09-20 16:21:00 -07:00
Richard Linden 325991a002 EXP-60 Hints not showing after Re-enabling Hints in same session 2010-09-17 23:12:13 -07:00
Richard Linden 7a3fc995c3 EXP-63 FIX Hint marked as acted upon if hints are disabled while specific UI hint is open 2010-09-16 15:36:23 -07:00
Richard Nelson e2257bc78e EXP-24 FIX Menu disable all viewer hints 2010-09-10 18:54:30 -07:00
Richard Nelson fbcde28736 EXP-23 FIX Tail for chat box hint should be slantways instead of horizontal 2010-09-10 18:06:42 -07:00
Monroe Linden e3856e1894 Update license block for new files. 2010-08-27 17:45:02 -07:00
Richard Nelson 77c42fc77e merge 2010-08-24 10:50:50 -07:00
Richard Linden 4115decfa1 merge 2010-08-23 22:37:30 -07:00
Richard Nelson 65c9914d23 made Params parsers not act as singletons 2010-08-23 11:03:19 -07:00
Richard Nelson 02d8197019 changed buildPanel/buildFloater to member functions buildFromFile
streamlined LLUICtrlFactory's interface
2010-08-20 10:14:28 -07:00
Richard Linden b7266b13c9 eliminated spam when parsing hints llsd 2010-08-19 17:35:49 -07:00
Richard Nelson 32e4cda7dc made hints only expire when explicitly responded to, not implicitly after first seeing them
added hint_popup.xml for hint styling
2010-08-16 15:01:39 -07:00
Richard Nelson 4ef75f35c1 stopped hints from appearing temporarily when retriggered 2010-08-13 12:56:28 -07:00
Richard Linden 2c999688c4 added remaining hints and fade in/fade out behavior 2010-08-12 15:18:25 -07:00
Richard Linden bd897431e1 remaining hints defined 2010-08-12 12:20:38 -07:00
Richard Nelson e16c1f6fdd forgot some files 2010-08-12 10:08:39 -07:00