X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=OSX%2FSaverRunner.m;h=3fd451d9ae2b23cb7680e6d34cb3f3b93bc06e5c;hp=60233a087b6b7c5028b54357b2d99b7ad76d4e7b;hb=6f5482d73adb0165c0130bb47d852644ab0c4869;hpb=c70f94f648d51bb4828193124f325fa52b0e57f3 diff --git a/OSX/SaverRunner.m b/OSX/SaverRunner.m index 60233a08..3fd451d9 100644 --- a/OSX/SaverRunner.m +++ b/OSX/SaverRunner.m @@ -29,10 +29,11 @@ of bundles that have executable code in them. Bleh. */ +#import #import "SaverRunner.h" #import "SaverListController.h" #import "XScreenSaverGLView.h" -#import +#import "yarandom.h" #ifdef USE_IPHONE @@ -417,11 +418,10 @@ relabel_menus (NSObject *v, NSString *old_str, NSString *new_str) [prefs synchronize]; if (saverName && [saverName isEqualToString: name]) { - if (launch && ![saverView isAnimating]) { - [window addSubview: saverView]; - [saverView startAnimation]; - } - return; + if ([saverView isAnimating]) + return; + else + goto LAUNCH; } saverName = name; @@ -452,8 +452,11 @@ relabel_menus (NSObject *v, NSString *old_str, NSString *new_str) selector:@selector(didRotate:) name:UIDeviceOrientationDidChangeNotification object:nil]; + LAUNCH: if (launch) { + [self saveScreenshot]; [window addSubview: saverView]; + [saverView becomeFirstResponder]; [saverView startAnimation]; } # endif // USE_IPHONE @@ -466,9 +469,10 @@ relabel_menus (NSObject *v, NSString *old_str, NSString *new_str) } +# ifndef USE_IPHONE + - (void)aboutPanel:(id)sender { -# ifndef USE_IPHONE NSDictionary *bd = [saverBundle infoDictionary]; NSMutableDictionary *d = [NSMutableDictionary dictionaryWithCapacity:20]; @@ -484,28 +488,9 @@ relabel_menus (NSObject *v, NSString *old_str, NSString *new_str) [[NSApplication sharedApplication] orderFrontStandardAboutPanelWithOptions:d]; - -# else // USE_IPHONE - - NSDictionary *bd = [[NSBundle mainBundle] infoDictionary]; - NSString *body = [bd objectForKey:@"CFBundleGetInfoString"]; - - body = [body stringByReplacingOccurrencesOfString:@", " withString:@",\n"]; - body = [body stringByAppendingString: - @"\n\n" - "Double-tap to run.\n\n" - "Double-tap again to\n" - "return to this list."]; - - [[[UIAlertView alloc] initWithTitle: @"" - message: body - delegate: nil - cancelButtonTitle: @"OK" - otherButtonTitles: nil] - show]; +} # endif // USE_IPHONE -} @@ -916,6 +901,7 @@ relabel_menus (NSObject *v, NSString *old_str, NSString *new_str) initWithNames:saverNames descriptions:[self makeDescTable]]; [rootViewController pushViewController:menu animated:YES]; + [menu becomeFirstResponder]; [window makeKeyAndVisible]; [window setAutoresizesSubviews:YES]; @@ -923,8 +909,7 @@ relabel_menus (NSObject *v, NSString *old_str, NSString *new_str) (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)]; - // Has to be after the list window is up, or we get black. - [self saveScreenshot]; + application.applicationSupportsShakeToEdit = YES; # endif // USE_IPHONE