Commits

Jeff Laing committed 97c7248

Removed ReadMe.markdown from the project
Try to fix the horrid tab/space mischmasch that Xcode caused

Comments (0)

Files changed (4)

Bluetooth Toggle.xcodeproj/project.pbxproj

 		1FA61B39154CB84B00237ABA /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = "<group>"; };
 		1FA61B3A154CB84B00237ABA /* Icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-72.png"; sourceTree = "<group>"; };
 		1FA61B3B154CB84B00237ABA /* Icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon@2x.png"; sourceTree = "<group>"; };
-		1FA61B62154CFA1B00237ABA /* ReadMe.markdown */ = {isa = PBXFileReference; lastKnownFileType = text; path = ReadMe.markdown; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
 		1FA61AFA154B938C00237ABA /* Bluetooth Toggle */ = {
 			isa = PBXGroup;
 			children = (
-				1FA61B62154CFA1B00237ABA /* ReadMe.markdown */,
 				1FA61AFC154B938C00237ABA /* Bluetooth Toggle-Info.plist */,
 				1FA61AFD154B938C00237ABA /* InfoPlist.strings */,
 				1FA61B00154B938C00237ABA /* main.m */,

Bluetooth Toggle/AppDelegate.m

 {
 	self.toggler = nil;
 	[_window release];
-    [super dealloc];
+	[super dealloc];
 }
 
 // This is queued to run 5 seconds after the toggler lets us
 	[self.toggler toggle];
 
 	// update the screen to show what the current state is
-    self.window.backgroundColor = toggler.enabled ? [UIColor greenColor] : [UIColor redColor];
+	self.window.backgroundColor = toggler.enabled ? [UIColor greenColor] : [UIColor redColor];
 
 	// and queue up our termination - we could make this a configurable
 	// constant - left as an exercise for a student.
 	long long time = 2;
 	dispatch_after(
-				   dispatch_time(DISPATCH_TIME_NOW, 1000000000LL*time),	// nanoseconds
-				   dispatch_get_main_queue(),
-				   ^{
-					   [self performSelectorOnMainThread:@selector(dropDead)
-											  withObject:nil
-										   waitUntilDone:NO];
-				   }
-				);
+		dispatch_time(DISPATCH_TIME_NOW, 1000000000LL*time),	// nanoseconds
+		dispatch_get_main_queue(),
+		^{
+			[self performSelectorOnMainThread:@selector(dropDead)
+			withObject:nil
+			waitUntilDone:NO];
+		}
+	);
 
 }
 
 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
 {
-    self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
+	self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
 
 	// Make the screen look blue - that means we are waiting.
-    self.window.backgroundColor = [UIColor blueColor];
-    [self.window makeKeyAndVisible];
+	self.window.backgroundColor = [UIColor blueColor];
+	[self.window makeKeyAndVisible];
 
 	// now start the toggler - this asynchronously lets us know when we can change the state
 	self.toggler = [[[BluetoothToggler alloc] initWithDelegate:self] autorelease];
 
-    return YES;
+	return YES;
 }
 
 - (void)applicationWillTerminate:(UIApplication *)application

Bluetooth Toggle/BluetoothToggler.m

 		err = BTLocalDeviceGetModulePower(_device, 1, &state);
 		if (err) {
 			@throw [NSException
-					exceptionWithName:@"GetPowerFailed"
-					reason:@"BTLocalDeviceGetModulePower failed"
-					userInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithInt:err],@"err", nil] ];
+				exceptionWithName:@"GetPowerFailed"
+				reason:@"BTLocalDeviceGetModulePower failed"
+				userInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithInt:err],@"err", nil] ];
 			return;
 		}
 		_enabled = (state != PowerOff);
 		[me sessionDisconnected:session];
 		break;
 	}
-	
+
 	return 0;
 }
 
 				&btCallbacks,
 				self,
 				&_session);
-		
+
 		if (err) {
 			@throw [NSException
-                exceptionWithName:@"AttachFailed"
-                reason:@"BTSessionAttachWithRunLoopAsync failed"
-                userInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithInt:err],@"err", nil] ];
+				exceptionWithName:@"AttachFailed"
+				reason:@"BTSessionAttachWithRunLoopAsync failed"
+				userInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithInt:err],@"err", nil] ];
 		}
 	}
 	return self;

Bluetooth Toggle/main.m

 int main(int argc, char *argv[])
 {
 	@autoreleasepool {
-	    return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
+		return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
 	}
 }