Revision: 6587
http://skim-app.svn.sourceforge.net/skim-app/?rev=6587&view=rev
Author: hofman
Date: 2010-06-11 18:04:41 +0000 (Fri, 11 Jun 2010)
Log Message:
-----------
code reaorganization
Modified Paths:
--------------
trunk/SKApplicationController.m
Modified: trunk/SKApplicationController.m
===================================================================
--- trunk/SKApplicationController.m 2010-06-10 11:13:33 UTC (rev 6586)
+++ trunk/SKApplicationController.m 2010-06-11 18:04:41 UTC (rev 6587)
@@ -182,12 +182,12 @@
}
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification{
- [[NSUserDefaults standardUserDefaults] removeObjectForKey:SKIsRelaunchKey];
+ NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
+ [sud removeObjectForKey:SKIsRelaunchKey];
+
[NSApp setServicesProvider:self];
- NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
-
NSString *versionString = [[[NSBundle mainBundle] infoDictionary]
objectForKey:(NSString *)kCFBundleVersionKey];
NSString *lastVersionString = [sud stringForKey:SKLastVersionLaunchedKey];
if (lastVersionString == nil || [SKVersionNumber
compareVersionString:lastVersionString toVersionString:versionString] ==
NSOrderedAscending) {
@@ -204,10 +204,8 @@
[remoteControl
instantiateAndAddRemoteControlDeviceWithClass:[KeyspanFrontRowControl class]];
if ([sud boolForKey:SKEnableKeyboardRemoteSimulationKey])
[remoteControl
instantiateAndAddRemoteControlDeviceWithClass:[GlobalKeyboardDevice class]];
- if ([remoteControl count] == 0) {
- [remoteControl release];
- remoteControl = nil;
- }
+ if ([remoteControl count] == 0)
+ SKDESTROY(remoteControl);
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
[nc addObserver:self selector:@selector(registerCurrentDocuments:)
@@ -239,8 +237,7 @@
- (void)applicationWillTerminate:(NSNotification *)aNotification {
[remoteControl setListeningToRemote:NO];
- [remoteControl release];
- remoteControl = nil;
+ SKDESTROY(remoteControl);
}
#pragma mark Updater
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit