From f388efa49a75206223137c328f2a1fe0853d02a7 Mon Sep 17 00:00:00 2001 From: palange Date: Tue, 22 Jun 2010 13:03:56 -0700 Subject: EXT-7925 FIX Added NSTreatUnknownArgumentsAsOpen to setupCocoa() to prevent pop-ups --- indra/llwindow/llwindowmacosx-objc.mm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/llwindow') 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 -- cgit v1.2.3