Revision: 7167
http://skim-app.svn.sourceforge.net/skim-app/?rev=7167&view=rev
Author: hofman
Date: 2011-03-17 11:22:48 +0000 (Thu, 17 Mar 2011)
Log Message:
-----------
reset SKIsRelaunchKey after opening files on launch
Modified Paths:
--------------
trunk/SKApplicationController.m
Modified: trunk/SKApplicationController.m
===================================================================
--- trunk/SKApplicationController.m 2011-03-15 18:32:07 UTC (rev 7166)
+++ trunk/SKApplicationController.m 2011-03-17 11:22:48 UTC (rev 7167)
@@ -157,9 +157,13 @@
#pragma mark NSApplication delegate
- (BOOL)applicationShouldOpenUntitledFile:(NSApplication *)sender{
+ NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
- if ([[NSUserDefaults standardUserDefaults]
boolForKey:SKReopenLastOpenFilesKey] || [[NSUserDefaults standardUserDefaults]
boolForKey:SKIsRelaunchKey]) {
- NSArray *files = [[NSUserDefaults standardUserDefaults]
objectForKey:SKLastOpenFileNamesKey];
+ if ([sud boolForKey:SKReopenLastOpenFilesKey] || [sud
boolForKey:SKIsRelaunchKey]) {
+ // just remove this in case opening the last open files crashes the
app after a relaunch
+ [sud removeObjectForKey:SKIsRelaunchKey];
+
+ NSArray *files = [sud objectForKey:SKLastOpenFileNamesKey];
NSEnumerator *fileEnum = [files reverseObjectEnumerator];
NSDictionary *dict;
NSError *error;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit