diff --git a/AveNoAnimationsInMailPlugin.xcodeproj/project.xcworkspace/xcuserdata/ave.xcuserdatad/UserInterfaceState.xcuserstate b/AveNoAnimationsInMailPlugin.xcodeproj/project.xcworkspace/xcuserdata/ave.xcuserdatad/UserInterfaceState.xcuserstate index ad4af99..ed6fbfa 100644 Binary files a/AveNoAnimationsInMailPlugin.xcodeproj/project.xcworkspace/xcuserdata/ave.xcuserdatad/UserInterfaceState.xcuserstate and b/AveNoAnimationsInMailPlugin.xcodeproj/project.xcworkspace/xcuserdata/ave.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/AveNoAnimationsInMailPlugin/AveHookBootstrapper.m b/AveNoAnimationsInMailPlugin/AveHookBootstrapper.m index f2111e8..7fe41fa 100644 --- a/AveNoAnimationsInMailPlugin/AveHookBootstrapper.m +++ b/AveNoAnimationsInMailPlugin/AveHookBootstrapper.m @@ -63,11 +63,33 @@ +(void)swizzlePerformSendAnimation method_exchangeImplementations(orig, repl); } +#pragma mark - WindowTransformAnimation (Fullscreen animations) + +-(NSTimeInterval)duration +{ + return 0.0; // the animation should end immediately +} + ++(void)aveSwizzleWindowTransformAnimation +{ + // Swizzle Mail.app's -[WindowTransformAnimation duration] to be a very short animation, so + // the animation is not noticavle. this is for fullscreen window animations + Class class = NSClassFromString(@"WindowTransformAnimation"); + Method orig = class_getInstanceMethod(class, @selector(duration)); + Method repl = class_getInstanceMethod(self, @selector(duration)); + NSLog(@"Ave: Swizzle addMethod [WindowTransformAnimation duration]: %p -> %p", orig, repl); + + class_addMethod(class, @selector(duration), method_getImplementation(repl), method_getTypeEncoding(repl)); +} + +#pragma mark - bootstrap + +(void)load { NSLog(@"Ave: Loaded, time to start swizzling"); [self aveSwizzlePopoutAnimation]; [self swizzlePerformSendAnimation]; + [self aveSwizzleWindowTransformAnimation]; } #pragma mark MVMailBundle class methods diff --git a/AveNoAnimationsInMailPlugin/AveNoAnimationsInMailPlugin-Info.plist b/AveNoAnimationsInMailPlugin/AveNoAnimationsInMailPlugin-Info.plist index 59dbbe8..2883ba2 100644 --- a/AveNoAnimationsInMailPlugin/AveNoAnimationsInMailPlugin-Info.plist +++ b/AveNoAnimationsInMailPlugin/AveNoAnimationsInMailPlugin-Info.plist @@ -21,9 +21,9 @@ CFBundleSignature ???? CFBundleVersion - 1 + 1.1 NSHumanReadableCopyright - Copyright © 2013 AveApps. All rights reserved. + Copyright © 2014 AveApps. All rights reserved. NSPrincipalClass AveHookBootstrapper SupportedPluginCompatibilityUUIDs diff --git a/Output/.DS_Store b/Output/.DS_Store deleted file mode 100644 index ebd677e..0000000 Binary files a/Output/.DS_Store and /dev/null differ diff --git a/Output/AveNoAnimationsInMailPlugin.mailbundle.zip b/Output/AveNoAnimationsInMailPlugin.mailbundle.zip index 7a89d3b..0be4410 100644 Binary files a/Output/AveNoAnimationsInMailPlugin.mailbundle.zip and b/Output/AveNoAnimationsInMailPlugin.mailbundle.zip differ diff --git a/Output/AveNoAnimationsInMailPlugin.mailbundle/.DS_Store b/Output/AveNoAnimationsInMailPlugin.mailbundle/.DS_Store deleted file mode 100644 index a41fefe..0000000 Binary files a/Output/AveNoAnimationsInMailPlugin.mailbundle/.DS_Store and /dev/null differ diff --git a/Output/AveNoAnimationsInMailPlugin.mailbundle/Contents/Info.plist b/Output/AveNoAnimationsInMailPlugin.mailbundle/Contents/Info.plist index 3cb6002..2ee92b1 100644 --- a/Output/AveNoAnimationsInMailPlugin.mailbundle/Contents/Info.plist +++ b/Output/AveNoAnimationsInMailPlugin.mailbundle/Contents/Info.plist @@ -21,7 +21,7 @@ CFBundleSignature ???? CFBundleVersion - 1 + 1.1 DTCompiler com.apple.compilers.llvm.clang.1_0 DTPlatformBuild @@ -37,7 +37,7 @@ DTXcodeBuild 5B1008 NSHumanReadableCopyright - Copyright © 2013 AveApps. All rights reserved. + Copyright © 2014 AveApps. All rights reserved. NSPrincipalClass AveHookBootstrapper SupportedPluginCompatibilityUUIDs diff --git a/Output/AveNoAnimationsInMailPlugin.mailbundle/Contents/MacOS/AveNoAnimationsInMailPlugin b/Output/AveNoAnimationsInMailPlugin.mailbundle/Contents/MacOS/AveNoAnimationsInMailPlugin index 5ae7e33..994b468 100755 Binary files a/Output/AveNoAnimationsInMailPlugin.mailbundle/Contents/MacOS/AveNoAnimationsInMailPlugin and b/Output/AveNoAnimationsInMailPlugin.mailbundle/Contents/MacOS/AveNoAnimationsInMailPlugin differ