Revision: 6534
http://skim-app.svn.sourceforge.net/skim-app/?rev=6534&view=rev
Author: hofman
Date: 2010-05-13 17:29:44 +0000 (Thu, 13 May 2010)
Log Message:
-----------
don't delay actions after animation when animations are diabled
Modified Paths:
--------------
trunk/SKMainWindowController_Actions.m
trunk/SKSideWindow.m
Modified: trunk/SKMainWindowController_Actions.m
===================================================================
--- trunk/SKMainWindowController_Actions.m 2010-05-13 16:42:54 UTC (rev
6533)
+++ trunk/SKMainWindowController_Actions.m 2010-05-13 17:29:44 UTC (rev
6534)
@@ -729,19 +729,19 @@
}
- (IBAction)searchPDF:(id)sender {
- BOOL wasClosed = NO;
+ BOOL selectImmediate = YES;
if ([self isFullScreen]) {
if ([leftSideWindow state] == NSDrawerClosedState || [leftSideWindow
state] == NSDrawerClosingState)
[leftSideWindow expand];
} else if ([self leftSidePaneIsOpen] == NO) {
- wasClosed = YES;
+ selectImmediate = [[NSUserDefaults standardUserDefaults]
boolForKey:SKDisableAnimationsKey];
[self toggleLeftSidePane:sender];
}
// workaround for an AppKit bug: when selecting immediately before the
animation, the search fields does not display its text
- if (wasClosed)
+ if (selectImmediate)
+ [leftSideController.searchField selectText:self];
+ else
[leftSideController.searchField performSelector:@selector(selectText:)
withObject:nil afterDelay:[[NSAnimationContext currentContext] duration]];
- else
- [leftSideController.searchField selectText:self];
}
- (IBAction)performFit:(id)sender {
@@ -1000,8 +1000,9 @@
if ([secondaryPdfView window]) {
+ NSTimeInterval delay = [[NSUserDefaults standardUserDefaults]
boolForKey:SKDisableAnimationsKey] ? 0.0 : [[NSAnimationContext currentContext]
duration];
[pdfSplitView setPosition:[pdfSplitView
maxPossiblePositionOfDividerAtIndex:0] ofDividerAtIndex:0 animate:YES];
- [secondaryPdfContentView
performSelector:@selector(removeFromSuperview) withObject:nil
afterDelay:[[NSAnimationContext currentContext] duration]];
+ [secondaryPdfContentView
performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:delay];
} else {
Modified: trunk/SKSideWindow.m
===================================================================
--- trunk/SKSideWindow.m 2010-05-13 16:42:54 UTC (rev 6533)
+++ trunk/SKSideWindow.m 2010-05-13 17:29:44 UTC (rev 6534)
@@ -194,7 +194,8 @@
[[controller window] makeKeyAndOrderFront:self];
state = NSDrawerClosedState;
if (hideWhenClosed != SKClosedSidePanelCollapse) {
- [self performSelector:@selector(makeTransparent) withObject:nil
afterDelay:[[NSAnimationContext currentContext] duration]];
+ NSTimeInterval delay = [[NSUserDefaults standardUserDefaults]
boolForKey:SKDisableAnimationsKey] ? 0.0 : [[NSAnimationContext currentContext]
duration];
+ [self performSelector:@selector(makeTransparent) withObject:nil
afterDelay:delay];
}
}
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit