summaryrefslogtreecommitdiff
path: root/indra/llwindow/llwindowsdl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llwindow/llwindowsdl.cpp')
-rw-r--r--indra/llwindow/llwindowsdl.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp
index 1f705f9e60..399d284402 100644
--- a/indra/llwindow/llwindowsdl.cpp
+++ b/indra/llwindow/llwindowsdl.cpp
@@ -2074,6 +2074,9 @@ void LLWindowSDL::initCursors()
mSDLCursors[UI_CURSOR_TOOLPAUSE] = makeSDLCursorFromBMP("toolpause.BMP",0,0);
mSDLCursors[UI_CURSOR_TOOLMEDIAOPEN] = makeSDLCursorFromBMP("toolmediaopen.BMP",0,0);
mSDLCursors[UI_CURSOR_PIPETTE] = makeSDLCursorFromBMP("lltoolpipette.BMP",2,28);
+ mSDLCursors[UI_CURSOR_TOOLSIT] = makeSDLCursorFromBMP("toolsit.BMP",20,15);
+ mSDLCursors[UI_CURSOR_TOOLBUY] = makeSDLCursorFromBMP("toolbuy.BMP",20,15);
+ mSDLCursors[UI_CURSOR_TOOLOPEN] = makeSDLCursorFromBMP("toolopen.BMP",20,15);
if (getenv("LL_ATI_MOUSE_CURSOR_BUG") != NULL) {
llinfos << "Disabling cursor updating due to LL_ATI_MOUSE_CURSOR_BUG" << llendl;
@@ -2465,7 +2468,7 @@ void exec_cmd(const std::string& cmd, const std::string& arg)
// Open a URL with the user's default web browser.
// Must begin with protocol identifier.
-void LLWindowSDL::spawnWebBrowser(const std::string& escaped_url)
+void LLWindowSDL::spawnWebBrowser(const std::string& escaped_url, bool async)
{
llinfos << "spawn_web_browser: " << escaped_url << llendl;
@@ -2543,6 +2546,7 @@ std::vector<std::string> LLWindowSDL::getDynamicFallbackFontList()
// Use libfontconfig to find us a nice ordered list of fallback fonts
// specific to this system.
std::string final_fallback("/usr/share/fonts/truetype/kochi/kochi-gothic.ttf");
+ const int max_font_count_cutoff = 40; // fonts are expensive in the current system, don't enumerate an arbitrary number of them
// Our 'ideal' font properties which define the sorting results.
// slant=0 means Roman, index=0 means the first face in a font file
// (the one we actually use), weight=80 means medium weight,
@@ -2558,7 +2562,6 @@ std::vector<std::string> LLWindowSDL::getDynamicFallbackFontList()
std::vector<std::string> rtns;
FcFontSet *fs = NULL;
FcPattern *sortpat = NULL;
- int font_count = 0;
llinfos << "Getting system font list from FontConfig..." << llendl;
@@ -2602,12 +2605,13 @@ std::vector<std::string> LLWindowSDL::getDynamicFallbackFontList()
FcPatternDestroy(sortpat);
}
+ int found_font_count = 0;
if (fs)
{
// Get the full pathnames to the fonts, where available,
// which is what we really want.
- int i;
- for (i=0; i<fs->nfont; ++i)
+ found_font_count = fs->nfont;
+ for (int i=0; i<fs->nfont; ++i)
{
FcChar8 *filename;
if (FcResultMatch == FcPatternGetString(fs->fonts[i],
@@ -2616,7 +2620,8 @@ std::vector<std::string> LLWindowSDL::getDynamicFallbackFontList()
&& filename)
{
rtns.push_back(std::string((const char*)filename));
- ++font_count;
+ if (rtns.size() >= max_font_count_cutoff)
+ break; // hit limit
}
}
FcFontSetDestroy (fs);
@@ -2629,7 +2634,7 @@ std::vector<std::string> LLWindowSDL::getDynamicFallbackFontList()
{
lldebugs << " file: " << *it << llendl;
}
- llinfos << "Using " << font_count << " system font(s)." << llendl;
+ llinfos << "Using " << rtns.size() << "/" << found_font_count << " system fonts." << llendl;
rtns.push_back(final_fallback);
return rtns;