Revision: 5759
http://skim-app.svn.sourceforge.net/skim-app/?rev=5759&view=rev
Author: hofman
Date: 2009-09-19 11:55:18 +0000 (Sat, 19 Sep 2009)
Log Message:
-----------
remove old button after animation of table on Leopard
Modified Paths:
--------------
trunk/SKMainWindowController.m
Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m 2009-09-18 21:29:22 UTC (rev 5758)
+++ trunk/SKMainWindowController.m 2009-09-19 11:55:18 UTC (rev 5759)
@@ -1678,25 +1678,25 @@
[newView setFrame:[oldView frame]];
if (animate == NO) {
+ [contentView replaceSubview:oldView with:newView];
if (changeButton)
[[oldButton superview] replaceSubview:oldButton with:newButton];
- [contentView replaceSubview:oldView with:newView];
[[firstResponder window] makeFirstResponder:firstResponder];
} else if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_5) {
mwcFlags.isAnimating = 1;
+ [contentView setWantsLayer:YES];
+ [contentView displayIfNeeded];
if (changeButton) {
[buttonView setWantsLayer:YES];
[buttonView displayIfNeeded];
}
- [contentView setWantsLayer:YES];
- [contentView displayIfNeeded];
[NSAnimationContext beginGrouping];
[[NSAnimationContext currentContext] setDuration:0.7];
+ [[contentView animator] replaceSubview:oldView with:newView];
if (changeButton)
[[buttonView animator] replaceSubview:oldButton with:newButton];
- [[contentView animator] replaceSubview:oldView with:newView];
[NSAnimationContext endGrouping];
NSMutableDictionary *info = [NSMutableDictionary dictionary];
@@ -1707,14 +1707,13 @@
[self performSelector:@selector(finishTableAnimation:) withObject:info
afterDelay:0.7];
} else {
+ [newView setHidden:YES];
+ [[oldView superview] addSubview:newView];
if (changeButton) {
[newButton setHidden:YES];
[[oldButton superview] addSubview:newButton];
}
- [newView setHidden:animate];
- [[oldView superview] addSubview:newView];
-
NSArray *viewAnimations = [NSArray arrayWithObjects:
[NSDictionary dictionaryWithObjectsAndKeys:oldView,
NSViewAnimationTargetKey, NSViewAnimationFadeOutEffect,
NSViewAnimationEffectKey, nil],
[NSDictionary dictionaryWithObjectsAndKeys:newView,
NSViewAnimationTargetKey, NSViewAnimationFadeInEffect,
NSViewAnimationEffectKey, nil], nil];
@@ -1745,8 +1744,8 @@
[[newView window] recalculateKeyViewLoop];
if (changeButton) {
+ [oldButton removeFromSuperview];
[oldButton setHidden:NO];
- [newButton setHidden:NO];
}
}
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit