Revision: 6623
http://skim-app.svn.sourceforge.net/skim-app/?rev=6623&view=rev
Author: hofman
Date: 2010-07-16 15:32:00 +0000 (Fri, 16 Jul 2010)
Log Message:
-----------
remove nav window at end of fade out, go through separate method to close
animated windows when fading out
Modified Paths:
--------------
trunk/SKAnimatedBorderlessWindow.h
trunk/SKAnimatedBorderlessWindow.m
trunk/SKNavigationWindow.m
trunk/SKPDFView.m
Modified: trunk/SKAnimatedBorderlessWindow.h
===================================================================
--- trunk/SKAnimatedBorderlessWindow.h 2010-07-16 15:23:45 UTC (rev 6622)
+++ trunk/SKAnimatedBorderlessWindow.h 2010-07-16 15:32:00 UTC (rev 6623)
@@ -52,6 +52,8 @@
- (void)fadeIn;
- (void)fadeOut;
+- (void)remove;
+
- (void)orderOut:(id)sender;
- (void)orderFront:(id)sender;
- (void)orderFrontRegardless;
Modified: trunk/SKAnimatedBorderlessWindow.m
===================================================================
--- trunk/SKAnimatedBorderlessWindow.m 2010-07-16 15:23:45 UTC (rev 6622)
+++ trunk/SKAnimatedBorderlessWindow.m 2010-07-16 15:32:00 UTC (rev 6623)
@@ -90,7 +90,7 @@
- (void)cancelDelayedAnimations {
[[self class] cancelPreviousPerformRequestsWithTarget:self
selector:@selector(fadeOut) object:nil];
- [[self class] cancelPreviousPerformRequestsWithTarget:self
selector:@selector(orderOut:) object:nil];
+ [[self class] cancelPreviousPerformRequestsWithTarget:self
selector:@selector(remove) object:nil];
}
- (void)fadeOutAfterTimeout {
@@ -120,6 +120,10 @@
[self setAlphaValue:[self defaultAlphaValue]];
}
+- (void)remove {
+ [self orderOut:nil];
+}
+
- (void)fadeOut {
[self stopAnimation];
@@ -127,13 +131,13 @@
[self willClose];
if ([[NSUserDefaults standardUserDefaults]
boolForKey:SKDisableAnimationsKey]) {
- [self orderOut:nil];
+ [self remove];
} else {
[NSAnimationContext beginGrouping];
[[NSAnimationContext currentContext] setDuration:[self
fadeOutDuration]];
[[self animator] setAlphaValue:0.0];
[NSAnimationContext endGrouping];
- [self performSelector:@selector(orderOut:) withObject:nil
afterDelay:[self fadeOutDuration]];
+ [self performSelector:@selector(remove) withObject:nil
afterDelay:[self fadeOutDuration]];
}
}
Modified: trunk/SKNavigationWindow.m
===================================================================
--- trunk/SKNavigationWindow.m 2010-07-16 15:23:45 UTC (rev 6622)
+++ trunk/SKNavigationWindow.m 2010-07-16 15:32:00 UTC (rev 6623)
@@ -279,8 +279,12 @@
[self orderFront:self];
}
+- (void)remove {
+ [[self parentWindow] removeChildWindow:self];
+ [super remove];
+}
+
- (void)orderOut:(id)sender {
- [[self parentWindow] removeChildWindow:self];
[super orderOut:sender];
SKDESTROY(view);
}
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2010-07-16 15:23:45 UTC (rev 6622)
+++ trunk/SKPDFView.m 2010-07-16 15:32:00 UTC (rev 6623)
@@ -2408,8 +2408,7 @@
- (void)handleWindowWillCloseNotification:(NSNotification *)notification {
if ([self isEditing] && [self commitEditing] == NO)
[self discardEditing];
- [[navWindow parentWindow] removeChildWindow:navWindow];
- [navWindow orderOut:self];
+ [navWindow remove];
}
- (void)enableNavigationForScreen:(NSScreen *)screen {
@@ -2417,8 +2416,7 @@
// always recreate the navWindow, since moving between screens of
different resolution can mess up the location (in spite of moveToScreen:)
if (navWindow != nil) {
- [[navWindow parentWindow] removeChildWindow:navWindow];
- [navWindow orderOut:nil];
+ [navWindow remove];
[navWindow release];
} else {
[[NSNotificationCenter defaultCenter] addObserver: self selector:
@selector(handleWindowWillCloseNotification:)
@@ -2436,8 +2434,7 @@
[self showNavWindow:NO];
[self doAutohide:NO];
- [[navWindow parentWindow] removeChildWindow:navWindow];
- [navWindow orderOut:self];
+ [navWindow remove];
}
- (void)doAutohideDelayed {
@@ -2445,10 +2442,8 @@
return;
if (interactionMode == SKPresentationMode)
[NSCursor setHiddenUntilMouseMoves:YES];
- if (interactionMode != SKNormalMode) {
- [[navWindow parentWindow] removeChildWindow:navWindow];
+ if (interactionMode != SKNormalMode)
[navWindow fadeOut];
- }
}
- (void)doAutohide:(BOOL)flag {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit