Permalink
Browse files

Changed formatting for function opening braces

  • Loading branch information...
1 parent b0380a6 commit e34855b1f0f26f650301e0536c6505b32f6f8945 Andy Kim committed Jan 20, 2011
Showing with 11 additions and 22 deletions.
  1. +1 −2 LetsMoveAppDelegate.h
  2. +2 −4 LetsMoveAppDelegate.m
  3. +7 −14 PFMoveApplication.m
  4. +1 −2 main.m
View
@@ -14,8 +14,7 @@
#define APPLICATION_DELEGATE
#endif
-@interface LetsMoveAppDelegate : NSObject APPLICATION_DELEGATE
-{
+@interface LetsMoveAppDelegate : NSObject APPLICATION_DELEGATE {
IBOutlet NSWindow *window;
}
View
@@ -11,13 +11,11 @@
@implementation LetsMoveAppDelegate
-- (NSWindow *)window
-{
+- (NSWindow *)window {
return window;
}
-- (void)applicationWillFinishLaunching:(NSNotification *)aNotification
-{
+- (void)applicationWillFinishLaunching:(NSNotification *)aNotification {
// Offer to the move the Application if necessary.
// Note that if the user chooses to move the application,
// this call will never return. Therefore you can suppress
View
@@ -58,8 +58,7 @@
// Main worker function
-void PFMoveToApplicationsFolderIfNecessary()
-{
+void PFMoveToApplicationsFolderIfNecessary() {
// Skip if user suppressed the alert before
if ([[NSUserDefaults standardUserDefaults] boolForKey:AlertSuppressKey]) return;
@@ -254,8 +253,7 @@ void PFMoveToApplicationsFolderIfNecessary()
#pragma mark -
#pragma mark Helper Functions
-static NSString *PreferredInstallLocation(BOOL *isUserDirectory)
-{
+static NSString *PreferredInstallLocation(BOOL *isUserDirectory) {
// Return the preferred install location.
// Assume that if the user has a ~/Applications folder, they'd prefer their
// applications to go there.
@@ -279,8 +277,7 @@ void PFMoveToApplicationsFolderIfNecessary()
return [NSSearchPathForDirectoriesInDomains(NSApplicationDirectory, NSLocalDomainMask, YES) lastObject];
}
-static BOOL IsInApplicationsFolder(NSString *path)
-{
+static BOOL IsInApplicationsFolder(NSString *path) {
// Check all the normal Application directories
NSEnumerator *e = [NSSearchPathForDirectoriesInDomains(NSApplicationDirectory, NSAllDomainsMask, YES) objectEnumerator];
NSString *appDirPath = nil;
@@ -297,8 +294,7 @@ static BOOL IsInApplicationsFolder(NSString *path)
return NO;
}
-static BOOL IsInDownloadsFolder(NSString *path)
-{
+static BOOL IsInDownloadsFolder(NSString *path) {
#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_4
// 10.5 or higher has NSDownloadsDirectory
if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_4) {
@@ -316,8 +312,7 @@ static BOOL IsInDownloadsFolder(NSString *path)
return [[[path stringByDeletingLastPathComponent] lastPathComponent] isEqualToString:@"Downloads"];
}
-static BOOL Trash(NSString *path)
-{
+static BOOL Trash(NSString *path) {
if ([[NSWorkspace sharedWorkspace] performFileOperation:NSWorkspaceRecycleOperation
source:[path stringByDeletingLastPathComponent]
destination:@""
@@ -331,8 +326,7 @@ static BOOL Trash(NSString *path)
}
}
-static BOOL AuthorizedInstall(NSString *srcPath, NSString *dstPath, BOOL *canceled)
-{
+static BOOL AuthorizedInstall(NSString *srcPath, NSString *dstPath, BOOL *canceled) {
if (canceled) *canceled = NO;
// Make sure that the destination path is an app bundle. We're essentially running 'sudo rm -rf'
@@ -391,8 +385,7 @@ static BOOL AuthorizedInstall(NSString *srcPath, NSString *dstPath, BOOL *cancel
return NO;
}
-static BOOL CopyBundle(NSString *srcPath, NSString *dstPath)
-{
+static BOOL CopyBundle(NSString *srcPath, NSString *dstPath) {
NSFileManager *fm = [NSFileManager defaultManager];
#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_4
View
3 main.m
@@ -8,7 +8,6 @@
#import <Cocoa/Cocoa.h>
-int main(int argc, char *argv[])
-{
+int main(int argc, char *argv[]) {
return NSApplicationMain(argc, (const char **) argv);
}

0 comments on commit e34855b

Please sign in to comment.