Revision: 4496
http://skim-app.svn.sourceforge.net/skim-app/?rev=4496&view=rev
Author: hofman
Date: 2008-09-01 12:58:26 +0000 (Mon, 01 Sep 2008)
Log Message:
-----------
Always initially create a remote control container, but remove it when there's
no concrete control registered.
Modified Paths:
--------------
trunk/SKApplicationController.m
Modified: trunk/SKApplicationController.m
===================================================================
--- trunk/SKApplicationController.m 2008-09-01 11:21:26 UTC (rev 4495)
+++ trunk/SKApplicationController.m 2008-09-01 12:58:26 UTC (rev 4496)
@@ -190,17 +190,16 @@
[self doSpotlightImportIfNeeded];
- if ([sud boolForKey:SKEnableAppleRemoteKey]) {
- if (remoteControl == nil) remoteControl = [[RemoteControlContainer
alloc] initWithDelegate:self];
+ remoteControl = [[RemoteControlContainer alloc] initWithDelegate:self];
+ if ([sud boolForKey:SKEnableAppleRemoteKey])
[remoteControl
instantiateAndAddRemoteControlDeviceWithClass:[AppleRemote class]];
- }
- if ([sud boolForKey:SKEnableKeyspanFrontRowControlKey]) {
- if (remoteControl == nil) remoteControl = [[RemoteControlContainer
alloc] initWithDelegate:self];
+ if ([sud boolForKey:SKEnableKeyspanFrontRowControlKey])
[remoteControl
instantiateAndAddRemoteControlDeviceWithClass:[KeyspanFrontRowControl class]];
- }
- if ([sud boolForKey:SKEnableKeyboardRemoteSimulationKey]) {
- if (remoteControl == nil) remoteControl = [[RemoteControlContainer
alloc] initWithDelegate:self];
+ if ([sud boolForKey:SKEnableKeyboardRemoteSimulationKey])
[remoteControl
instantiateAndAddRemoteControlDeviceWithClass:[GlobalKeyboardDevice class]];
+ if ([remoteControl count] == 0) {
+ [remoteControl release];
+ remoteControl = nil;
}
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
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