Port Viewer 2 indra/llvfs

This introduces some API changes, like the new LLDirIterator,
that causes changes elsewhere.

It also include Log Linden's cache changes that aren't in
viewer-development yet that increase the maximum cache size
to ~10 GB.
This commit is contained in:
Aleric Inglewood
2011-06-06 21:38:58 +02:00
parent b31dd134f6
commit 5d87098bd0
33 changed files with 837 additions and 856 deletions

View File

@@ -21,6 +21,7 @@
#include "llweb.h"
#include "llviewercontrol.h"
#include "llviewerwindow.h"
#include "lldiriterator.h"
#include "llfile.h"
#include "llhttpclient.h"
#include "lggdicdownload.h"
@@ -768,28 +769,18 @@ std::vector <std::string> lggHunSpell_Wrapper::getDicts()
{
std::vector<std::string> names;
std::string path_name(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "dictionaries", ""));
bool found = true;
while (found)
std::string name;
LLDirIterator app_iter(path_name, "*.aff");
while (app_iter.next(name))
{
std::string name;
found = gDirUtilp->getNextFileInDir(path_name, "*.aff", name, false);
if (found)
{
names.push_back(dictName2FullName(name));
}
names.push_back(dictName2FullName(name));
}
path_name = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "dictionaries", "");
found = true;
while (found)
LLDirIterator user_iter(path_name, "*.aff");
while (user_iter.next(name))
{
std::string name;
found = gDirUtilp->getNextFileInDir(path_name, "*.aff", name, false);
if (found)
{
names.push_back(dictName2FullName(name));
}
names.push_back(dictName2FullName(name));
}
return names;
}
@@ -797,26 +788,17 @@ std::vector <std::string> lggHunSpell_Wrapper::getExtraDicts()
{
std::vector<std::string> names;
std::string path_name(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "dictionaries", ""));
bool found = true;
while (found)
std::string name;
LLDirIterator app_iter(path_name, "*.dic");
while (app_iter.next(name))
{
std::string name;
found = gDirUtilp->getNextFileInDir(path_name, "*.dic", name, false);
if (found)
{
names.push_back(dictName2FullName(name));
}
names.push_back(dictName2FullName(name));
}
path_name = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "dictionaries", "");
found = true;
while (found)
LLDirIterator user_iter(path_name, "*.dic");
while (user_iter.next(name))
{
std::string name;
found = gDirUtilp->getNextFileInDir(path_name, "*.dic", name, false);
if (found)
{
names.push_back(dictName2FullName(name));
}
names.push_back(dictName2FullName(name));
}
return names;
}