diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-06-22 16:41:50 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-06-22 16:41:50 -0400 |
commit | d12be5978eb948adbb4f3c41f2d90a826af1fc89 (patch) | |
tree | 028a6991be06be4db7df1375429dfd9b7d980c2e /indra | |
parent | 449de8e6085c1ddb7a4bd9dcd835aecbf45a7d11 (diff) | |
parent | 566a6191131249e5f2fbb0015522092d04d26b93 (diff) |
merge
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llcommon/llstring.cpp | 9 | ||||
-rw-r--r-- | indra/llwindow/llwindowmacosx-objc.mm | 5 | ||||
-rw-r--r-- | indra/newview/Info-SecondLife.plist | 48 |
3 files changed, 37 insertions, 25 deletions
diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp index f14d947734..1561bda201 100644 --- a/indra/llcommon/llstring.cpp +++ b/indra/llcommon/llstring.cpp @@ -994,7 +994,14 @@ void LLStringUtil::formatNumber(std::string& numStr, std::string decimals) convertToS32 (decimals, intDecimals); if (!sLocale.empty()) { - strStream.imbue (std::locale(sLocale.c_str())); + // std::locale() throws if the locale is unknown! (EXT-7926) + try + { + strStream.imbue(std::locale(sLocale.c_str())); + } catch (const std::exception &) + { + LL_WARNS_ONCE("Locale") << "Cannot set locale to " << sLocale << LL_ENDL; + } } if (!intDecimals) diff --git a/indra/llwindow/llwindowmacosx-objc.mm b/indra/llwindow/llwindowmacosx-objc.mm index 59b25e1726..3a822a93a6 100644 --- a/indra/llwindow/llwindowmacosx-objc.mm +++ b/indra/llwindow/llwindowmacosx-objc.mm @@ -49,6 +49,11 @@ void setupCocoa() { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + // The following prevents the Cocoa command line parser from trying to open 'unknown' arguements as documents. + // ie. running './secondlife -set Language fr' would cause a pop-up saying can't open document 'fr' + // when init'ing the Cocoa App window. + [[NSUserDefaults standardUserDefaults] setObject:@"NO" forKey:@"NSTreatUnknownArgumentsAsOpen"]; + // This is a bit of voodoo taken from the Apple sample code "CarbonCocoa_PictureCursor": // http://developer.apple.com/samplecode/CarbonCocoa_PictureCursor/index.html diff --git a/indra/newview/Info-SecondLife.plist b/indra/newview/Info-SecondLife.plist index 97e24a0bd5..9bc95f9b95 100644 --- a/indra/newview/Info-SecondLife.plist +++ b/indra/newview/Info-SecondLife.plist @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> @@ -18,33 +18,33 @@ <string>APPL</string> <key>CFBundleSignature</key> <string>????</string> - <key>CFBundleDocumentTypes</key> - <array> - <dict> - <key>CFBundleTypeExtensions</key> - <array> - <string>slurl</string> - </array> - <key>CFBundleTypeIconFile</key> - <string>seconlife</string> - <key>CFBundleTypeMIMETypes</key> - <array> - <string>application/x-grid-location-info</string> - </array> - <key>CFBundleTypeName</key> - <string>Secondlife SLURL</string> + <key>CFBundleDocumentTypes</key> + <array> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>slurl</string> + </array> + <key>CFBundleTypeIconFile</key> + <string>seconlife</string> + <key>CFBundleTypeMIMETypes</key> + <array> + <string>application/x-grid-location-info</string> + </array> + <key>CFBundleTypeName</key> + <string>Secondlife SLURL</string> <key>CFBundleTypeOSTypes</key> <array> - <string>SLRL</string> + <string>SLRL</string> </array> - <key>CFBundleTypeRole</key> - <string>Viewer</string> - <key>LSTypeIsPackage</key> + <key>CFBundleTypeRole</key> + <string>Viewer</string> + <key>LSTypeIsPackage</key> <true/> - <key>NSDocumentClass</key> - <string>SecondLifeSLURL</string> - </dict> - </array> + <key>NSDocumentClass</key> + <string>SecondLifeSLURL</string> + </dict> + </array> <key>CFBundleURLTypes</key> <array> <dict> |