Revision: 4456
http://skim-app.svn.sourceforge.net/skim-app/?rev=4456&view=rev
Author: hofman
Date: 2008-08-26 22:18:46 +0000 (Tue, 26 Aug 2008)
Log Message:
-----------
Don't periodically save open documents. Crashes are the exception, polling is
not a good thing to do.
Modified Paths:
--------------
trunk/SKApplicationController.h
trunk/SKApplicationController.m
Modified: trunk/SKApplicationController.h
===================================================================
--- trunk/SKApplicationController.h 2008-08-26 19:51:27 UTC (rev 4455)
+++ trunk/SKApplicationController.h 2008-08-26 22:18:46 UTC (rev 4456)
@@ -43,7 +43,6 @@
@class RemoteControl;
@interface SKApplicationController : NSObject {
- NSTimer *currentDocumentsTimer;
RemoteControl *remoteControl;
BOOL remoteScrolling;
}
@@ -62,8 +61,6 @@
- (IBAction)editBookmarks:(id)sender;
- (IBAction)openBookmark:(id)sender;
-- (void)saveCurrentOpenDocuments:(id)sender;
-
- (NSArray *)applicationSupportDirectories;
- (NSString *)pathForApplicationSupportFile:(NSString *)file ofType:(NSString
*)extension;
- (NSString *)pathForApplicationSupportFile:(NSString *)file ofType:(NSString
*)extension inDirectory:(NSString *)subpath;
Modified: trunk/SKApplicationController.m
===================================================================
--- trunk/SKApplicationController.m 2008-08-26 19:51:27 UTC (rev 4455)
+++ trunk/SKApplicationController.m 2008-08-26 22:18:46 UTC (rev 4456)
@@ -176,8 +176,6 @@
[[NSUserDefaults standardUserDefaults] setObject:versionString
forKey:SKLastVersionLaunchedKey];
}
- currentDocumentsTimer = [[NSTimer scheduledTimerWithTimeInterval:60.0
target:self selector:@selector(saveCurrentOpenDocuments:) userInfo:nil
repeats:YES] retain];
-
NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
RemoteControlContainer *container = [[RemoteControlContainer alloc]
initWithDelegate:self];
if ([sud boolForKey:SKEnableAppleRemoteKey])
@@ -203,10 +201,8 @@
}
- (void)applicationStartsTerminating:(NSNotification *)aNotification {
- [currentDocumentsTimer invalidate];
- [currentDocumentsTimer release];
- currentDocumentsTimer = nil;
- [self saveCurrentOpenDocuments:nil];
+ [[NSUserDefaults standardUserDefaults] setObject:[[[NSDocumentController
sharedDocumentController] documents] valueForKey:SKCurrentDocumentSetupKey]
forKey:SKLastOpenFileNamesKey];
+ [[[NSDocumentController sharedDocumentController] documents]
makeObjectsPerformSelector:@selector(saveRecentDocumentInfo)];
}
- (void)applicationWillTerminate:(NSNotification *)aNotification {
@@ -374,7 +370,7 @@
else
[controller doGoToPreviousPage:nil];
break;
- case kRemoteButtonPlay:
+ case kRemoteButtonPlay:
[controller togglePresentation:nil];
break;
case kRemoteButtonMenu:
@@ -391,11 +387,6 @@
}
}
-- (void)saveCurrentOpenDocuments:(id)sender {
- [[NSUserDefaults standardUserDefaults] setObject:[[[NSDocumentController
sharedDocumentController] documents] valueForKey:SKCurrentDocumentSetupKey]
forKey:SKLastOpenFileNamesKey];
- [[[NSDocumentController sharedDocumentController] documents]
makeObjectsPerformSelector:@selector(saveRecentDocumentInfo)];
-}
-
- (NSArray *)applicationSupportDirectories {
static NSArray *applicationSupportDirectories = nil;
if (applicationSupportDirectories == nil) {
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 the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit