Huge update to ITFoundation. I've gone through every file (except queue.h
[ITFoundation.git] / ITLoginItem.m
diff --git a/ITLoginItem.m b/ITLoginItem.m
deleted file mode 100755 (executable)
index fe49255..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- *  ITLoginItem.c
- *  ITFoundation
- *
- *  Created by Kent Sutherland on Sun May 16 2004.
- *  Copyright (c) 2004 __MyCompanyName__. All rights reserved.
- *
- */
-
-#import "ITLoginItem.h"
-#import "ITDebug.h"
-
-BOOL ITSetLaunchApplicationOnLogin(NSString *path, BOOL flag)
-{
-    NSUserDefaults *df = [NSUserDefaults standardUserDefaults];
-    NSMutableDictionary *loginwindow;
-    NSMutableArray *loginarray;
-    FSRef fileRef;
-    AliasHandle alias;
-    NSData *aliasData;
-    
-    ITDebugLog(@"Set if MenuPrefs launches at login to %i.", flag);
-    [df synchronize];
-    loginwindow = [[df persistentDomainForName:@"loginwindow"] mutableCopy];
-    loginarray = [loginwindow objectForKey:@"AutoLaunchedApplicationDictionary"];
-    
-    //Create the alias data
-    FSMakeRefWithPath([path UTF8String], &fileRef);
-    FSNewAlias(NULL, &fileRef, &alias);
-    aliasData = [NSData dataWithBytes:&alias length:sizeof(alias)];
-    
-    if (flag) {
-        NSDictionary *itemDict = [NSDictionary dictionaryWithObjectsAndKeys:
-        [[NSBundle mainBundle] bundlePath], @"Path",
-        [NSNumber numberWithInt:0], @"Hide",
-        aliasData, @"AliasData", nil, nil];
-        [loginarray addObject:itemDict];
-    } else {
-        int i;
-        for (i = 0; i < [loginarray count]; i++) {
-            NSDictionary *tempDict = [loginarray objectAtIndex:i];
-            if ([[[tempDict objectForKey:@"Path"] lastPathComponent] isEqualToString:[[[NSBundle mainBundle] bundlePath] lastPathComponent]]) {
-                [loginarray removeObjectAtIndex:i];
-                break;
-            }
-        }
-    }
-    [df setPersistentDomain:loginwindow forName:@"loginwindow"];
-    [df synchronize];
-    [loginwindow release];
-    return YES;
-}
\ No newline at end of file