adium 4100:674679183733: Removed empty Xcode-folders and unused ...

commits at adium.im commits at adium.im
Mon Aug 1 19:31:41 UTC 2011


details:	http://hg.adium.im/adium/rev/674679183733
revision:	4100:674679183733
branch:		(none)
author:		Patrick Steinhardt <steinhardt.p at me.com>
date:		Mon Aug 01 21:14:23 2011 +0200

Removed empty Xcode-folders and unused source files.

diffs (885 lines):

diff -r ab44879691a8 -r 674679183733 Adium.xcodeproj/project.pbxproj
--- a/Adium.xcodeproj/project.pbxproj	Mon Aug 01 20:40:33 2011 +0200
+++ b/Adium.xcodeproj/project.pbxproj	Mon Aug 01 21:14:23 2011 +0200
@@ -343,12 +343,7 @@
 		34483A990BC869680083723B /* AdvancedPreferences.nib in Resources */ = {isa = PBXBuildFile; fileRef = 34483A980BC869680083723B /* AdvancedPreferences.nib */; };
 		3448758E06D1EBDF00DA778C /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3448758D06D1EBDF00DA778C /* Cocoa.framework */; };
 		3448761406D1EC0C00DA778C /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3448758D06D1EBDF00DA778C /* Cocoa.framework */; };
-		344D97470C3C442600498CA1 /* AddressBookUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 344D97390C3C442500498CA1 /* AddressBookUtils.m */; };
-		344D97490C3C442600498CA1 /* Buddy.m in Sources */ = {isa = PBXBuildFile; fileRef = 344D973B0C3C442500498CA1 /* Buddy.m */; };
-		344D974B0C3C442600498CA1 /* Chat.m in Sources */ = {isa = PBXBuildFile; fileRef = 344D973D0C3C442500498CA1 /* Chat.m */; };
-		344D974D0C3C442600498CA1 /* FileAttributes.m in Sources */ = {isa = PBXBuildFile; fileRef = 344D973F0C3C442500498CA1 /* FileAttributes.m */; };
 		344D974F0C3C442600498CA1 /* InstantMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 344D97410C3C442500498CA1 /* InstantMessage.m */; };
-		344D97510C3C442600498CA1 /* Person.m in Sources */ = {isa = PBXBuildFile; fileRef = 344D97430C3C442500498CA1 /* Person.m */; };
 		344D97530C3C442600498CA1 /* Presentity.m in Sources */ = {isa = PBXBuildFile; fileRef = 344D97450C3C442600498CA1 /* Presentity.m */; };
 		3456231C0A3771D800E7FC97 /* ESRankingCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 3456231A0A3771D800E7FC97 /* ESRankingCell.m */; };
 		345623200A3771E100E7FC97 /* AIChatLog.m in Sources */ = {isa = PBXBuildFile; fileRef = 3456231E0A3771E100E7FC97 /* AIChatLog.m */; };
@@ -2601,20 +2596,10 @@
 		344AB2C40579136900384CEE /* ESOpenMessageWindowContactAlertPlugin.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ESOpenMessageWindowContactAlertPlugin.m; path = "Plugins/Open Message Window Contact Alert/ESOpenMessageWindowContactAlertPlugin.m"; sourceTree = "<group>"; };
 		344C0D4E06B6D63800DA7200 /* ESApplescriptabilityController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = ESApplescriptabilityController.m; path = "Frameworks/Adium Framework/Source/ESApplescriptabilityController.m"; sourceTree = "<group>"; };
 		344C0D4F06B6D63800DA7200 /* ESApplescriptabilityController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ESApplescriptabilityController.h; path = "Frameworks/Adium Framework/Source/ESApplescriptabilityController.h"; sourceTree = "<group>"; };
-		344D97390C3C442500498CA1 /* AddressBookUtils.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = AddressBookUtils.m; path = Source/Logorrhea/AddressBookUtils.m; sourceTree = SOURCE_ROOT; };
-		344D973A0C3C442500498CA1 /* Buddy.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = Buddy.h; path = Source/Logorrhea/Buddy.h; sourceTree = SOURCE_ROOT; };
-		344D973B0C3C442500498CA1 /* Buddy.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = Buddy.m; path = Source/Logorrhea/Buddy.m; sourceTree = SOURCE_ROOT; };
-		344D973C0C3C442500498CA1 /* Chat.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = Chat.h; path = Source/Logorrhea/Chat.h; sourceTree = SOURCE_ROOT; };
-		344D973D0C3C442500498CA1 /* Chat.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = Chat.m; path = Source/Logorrhea/Chat.m; sourceTree = SOURCE_ROOT; };
-		344D973E0C3C442500498CA1 /* FileAttributes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = FileAttributes.h; path = Source/Logorrhea/FileAttributes.h; sourceTree = SOURCE_ROOT; };
-		344D973F0C3C442500498CA1 /* FileAttributes.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = FileAttributes.m; path = Source/Logorrhea/FileAttributes.m; sourceTree = SOURCE_ROOT; };
 		344D97400C3C442500498CA1 /* InstantMessage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = InstantMessage.h; path = Source/Logorrhea/InstantMessage.h; sourceTree = SOURCE_ROOT; };
 		344D97410C3C442500498CA1 /* InstantMessage.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = InstantMessage.m; path = Source/Logorrhea/InstantMessage.m; sourceTree = SOURCE_ROOT; };
-		344D97420C3C442500498CA1 /* Person.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = Person.h; path = Source/Logorrhea/Person.h; sourceTree = SOURCE_ROOT; };
-		344D97430C3C442500498CA1 /* Person.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = Person.m; path = Source/Logorrhea/Person.m; sourceTree = SOURCE_ROOT; };
 		344D97440C3C442600498CA1 /* Presentity.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = Presentity.h; path = Source/Logorrhea/Presentity.h; sourceTree = SOURCE_ROOT; };
 		344D97450C3C442600498CA1 /* Presentity.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = Presentity.m; path = Source/Logorrhea/Presentity.m; sourceTree = SOURCE_ROOT; };
-		344D97460C3C442600498CA1 /* AddressBookUtils.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = AddressBookUtils.h; path = Source/Logorrhea/AddressBookUtils.h; sourceTree = SOURCE_ROOT; };
 		344DE8A10E43899B005FF022 /* nb */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = nb; path = Resources/nb.lproj/OTRPrefs.nib; sourceTree = "<group>"; };
 		34503C7E058F96C400FB7AD1 /* AIEmoticon.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = AIEmoticon.m; path = "Frameworks/Adium Framework/Source/AIEmoticon.m"; sourceTree = "<group>"; };
 		34503C7F058F96C400FB7AD1 /* AIEmoticon.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = AIEmoticon.h; path = "Frameworks/Adium Framework/Source/AIEmoticon.h"; sourceTree = "<group>"; };
@@ -4435,7 +4420,6 @@
 		6334FFFC0F9C14C1003C77A9 /* AIPasteboardAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AIPasteboardAdditions.h; path = "Frameworks/AIUtilities Framework/Source/AIPasteboardAdditions.h"; sourceTree = "<group>"; };
 		6334FFFD0F9C14C1003C77A9 /* AIPasteboardAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AIPasteboardAdditions.m; path = "Frameworks/AIUtilities Framework/Source/AIPasteboardAdditions.m"; sourceTree = "<group>"; };
 		633D4FA40F9D3073004F491E /* AdiumSpotlightImporter.mdimporter */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AdiumSpotlightImporter.mdimporter; sourceTree = BUILT_PRODUCTS_DIR; };
-		633D4FA50F9D3073004F491E /* Spotlight Importer-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Spotlight Importer-Info.plist"; sourceTree = "<group>"; };
 		633D4FAD0F9D30E3004F491E /* GetMetadataForHTMLLog-Additions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "GetMetadataForHTMLLog-Additions.h"; path = "Other/Adium Spotlight Importer/GetMetadataForHTMLLog-Additions.h"; sourceTree = "<group>"; };
 		633D4FAE0F9D30E3004F491E /* GetMetadataForHTMLLog-Additions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "GetMetadataForHTMLLog-Additions.m"; path = "Other/Adium Spotlight Importer/GetMetadataForHTMLLog-Additions.m"; sourceTree = "<group>"; };
 		633D4FB00F9D30E3004F491E /* AdiumSpotlightImporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AdiumSpotlightImporter.h; path = "Other/Adium Spotlight Importer/AdiumSpotlightImporter.h"; sourceTree = "<group>"; };
@@ -5205,7 +5189,6 @@
 				344458F3070B5BF500D8E932 /* Debugging */,
 				9EB3C52304F94DB7001D1F74 /* Source */,
 				F50A325A03B5798301A8010A /* Resources */,
-				340C1A210BD58E7E00D09235 /* Other */,
 				349C2F310867ACF7000BF883 /* ApplescriptRunner */,
 				312ED3D80C7E89CC00A6BDA9 /* Unit tests */,
 				29B97323FDCFA39411CA2CEA /* Linked Frameworks */,
@@ -5287,13 +5270,6 @@
 			name = "User Icon Handling";
 			sourceTree = "<group>";
 		};
-		340C1A210BD58E7E00D09235 /* Other */ = {
-			isa = PBXGroup;
-			children = (
-			);
-			name = Other;
-			sourceTree = "<group>";
-		};
 		340F444F06D87A830072E2FA /* Contact List */ = {
 			isa = PBXGroup;
 			children = (
@@ -5706,7 +5682,6 @@
 		3459CBE00A25FFA100ECC256 /* Log Indexing */ = {
 			isa = PBXGroup;
 			children = (
-				633D4FA50F9D3073004F491E /* Spotlight Importer-Info.plist */,
 				639DFB440F981C7C003C9A32 /* NSCalendarDate+ISO8601Parsing.h */,
 				3459CBEA0A25FFBE00ECC256 /* GetMetadataForHTMLLog.h */,
 				3459CBE90A25FFBE00ECC256 /* GetMetadataForHTMLLog.m */,
@@ -6124,13 +6099,6 @@
 			name = "Safari Link Toolbar Item";
 			sourceTree = "<group>";
 		};
-		34A6FE8007D7E07300972830 /* Type Select Table View */ = {
-			isa = PBXGroup;
-			children = (
-			);
-			name = "Type Select Table View";
-			sourceTree = "<group>";
-		};
 		34B3241D09B9FF6900029361 /* IRC */ = {
 			isa = PBXGroup;
 			children = (
@@ -6403,7 +6371,6 @@
 			isa = PBXGroup;
 			children = (
 				34D834CD07CBE7A3006466F2 /* Text field for previewing font preferences */,
-				34A6FE8007D7E07300972830 /* Type Select Table View */,
 				348B25C70A50FBF300B2B972 /* KNShelfSplitView.h */,
 				348B25C60A50FBF300B2B972 /* KNShelfSplitView.m */,
 				340670790A55A044004E22AC /* sourceListBackground.png */,
@@ -7543,15 +7510,6 @@
 		633400D10F9C1501003C77A9 /* External Frameworks and Libraries */ = {
 			isa = PBXGroup;
 			children = (
-				633400DC0F9C1501003C77A9 /* Other Frameworks */,
-				633400D20F9C1501003C77A9 /* Linked Frameworks */,
-			);
-			name = "External Frameworks and Libraries";
-			sourceTree = "<group>";
-		};
-		633400D20F9C1501003C77A9 /* Linked Frameworks */ = {
-			isa = PBXGroup;
-			children = (
 				633400D30F9C1501003C77A9 /* ImageKit.framework */,
 				633400D40F9C1501003C77A9 /* AddressBook.framework */,
 				633400D50F9C1501003C77A9 /* AudioUnit.framework */,
@@ -7562,14 +7520,7 @@
 				633400DA0F9C1501003C77A9 /* Carbon.framework */,
 				633400DB0F9C1501003C77A9 /* Cocoa.framework */,
 			);
-			name = "Linked Frameworks";
-			sourceTree = "<group>";
-		};
-		633400DC0F9C1501003C77A9 /* Other Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-			);
-			name = "Other Frameworks";
+			name = "External Frameworks and Libraries";
 			sourceTree = "<group>";
 		};
 		6334FBED0F9C116D003C77A9 /* AIUtilities */ = {
@@ -7579,7 +7530,6 @@
 				63A3A9660F9C35D3006C9CB0 /* Resources */,
 				633400D10F9C1501003C77A9 /* External Frameworks and Libraries */,
 				633400CE0F9C14E0003C77A9 /* Other Sources */,
-				6334FFFE0F9C14C1003C77A9 /* External Sources */,
 				6334FFA90F9C14C1003C77A9 /* Additions */,
 				6334FFA60F9C14C0003C77A9 /* Scrollbar auto-hiding */,
 				6334FF950F9C14C0003C77A9 /* Working Around System Bugs */,
@@ -8124,13 +8074,6 @@
 			name = Additions;
 			sourceTree = "<group>";
 		};
-		6334FFFE0F9C14C1003C77A9 /* External Sources */ = {
-			isa = PBXGroup;
-			children = (
-			);
-			name = "External Sources";
-			sourceTree = "<group>";
-		};
 		633D4F950F9D2F62004F491E /* Spotlight Importer */ = {
 			isa = PBXGroup;
 			children = (
@@ -8570,20 +8513,10 @@
 		C4D29CA00C3C2D9C001545A2 /* From Logorrhea */ = {
 			isa = PBXGroup;
 			children = (
-				344D97390C3C442500498CA1 /* AddressBookUtils.m */,
-				344D973A0C3C442500498CA1 /* Buddy.h */,
-				344D973B0C3C442500498CA1 /* Buddy.m */,
-				344D973C0C3C442500498CA1 /* Chat.h */,
-				344D973D0C3C442500498CA1 /* Chat.m */,
-				344D973E0C3C442500498CA1 /* FileAttributes.h */,
-				344D973F0C3C442500498CA1 /* FileAttributes.m */,
 				344D97400C3C442500498CA1 /* InstantMessage.h */,
 				344D97410C3C442500498CA1 /* InstantMessage.m */,
-				344D97420C3C442500498CA1 /* Person.h */,
-				344D97430C3C442500498CA1 /* Person.m */,
 				344D97440C3C442600498CA1 /* Presentity.h */,
 				344D97450C3C442600498CA1 /* Presentity.m */,
-				344D97460C3C442600498CA1 /* AddressBookUtils.h */,
 			);
 			name = "From Logorrhea";
 			sourceTree = "<group>";
@@ -10517,12 +10450,7 @@
 				34847ADE0C1A62C40019EF08 /* AIOutlineViewAnimation.m in Sources */,
 				C4D29CC40C3C2E3C001545A2 /* BGICImportController.m in Sources */,
 				C4D29CC60C3C2E3C001545A2 /* BGICLogImportController.m in Sources */,
-				344D97470C3C442600498CA1 /* AddressBookUtils.m in Sources */,
-				344D97490C3C442600498CA1 /* Buddy.m in Sources */,
-				344D974B0C3C442600498CA1 /* Chat.m in Sources */,
-				344D974D0C3C442600498CA1 /* FileAttributes.m in Sources */,
 				344D974F0C3C442600498CA1 /* InstantMessage.m in Sources */,
-				344D97510C3C442600498CA1 /* Person.m in Sources */,
 				344D97530C3C442600498CA1 /* Presentity.m in Sources */,
 				0C79A2D90C5E633F005AE6FA /* AIMoveCommand.m in Sources */,
 				0C27C8650C75A23F002AA363 /* NSStringScriptingAdditions.m in Sources */,
diff -r ab44879691a8 -r 674679183733 Source/Logorrhea/AddressBookUtils.h
--- a/Source/Logorrhea/AddressBookUtils.h	Mon Aug 01 20:40:33 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-//
-//  AddressBookUtils.h
-//  Logtastic
-//
-//  Created by Ladd Van Tol on Sat Mar 29 2003.
-//  Copyright (c) 2003 Spiny. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-#import <AddressBook/AddressBook.h>
-
-
- at interface AddressBookUtils : NSObject
-{
-
-}
-
-+ (NSString *) lookupRealNameForIMNick:(NSString*) nick;
-
- at end
diff -r ab44879691a8 -r 674679183733 Source/Logorrhea/AddressBookUtils.m
--- a/Source/Logorrhea/AddressBookUtils.m	Mon Aug 01 20:40:33 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-//
-//  AddressBookUtils.m
-//  Logtastic
-//
-//  Created by Ladd Van Tol on Sat Mar 29 2003.
-//  Copyright (c) 2003 Spiny. All rights reserved.
-//
-
-#import "AddressBookUtils.h"
-
-
- at implementation AddressBookUtils
-+ (NSString *) lookupRealNameForIMNick:(NSString*) nick
-{
-	ABAddressBook *AB = [ABAddressBook sharedAddressBook];
-	ABSearchElement *imNick = [ABPerson searchElementForProperty:kABAIMInstantProperty label:nil key:nil value:nick comparison:kABEqualCaseInsensitive];
-	NSArray *peopleFound = [AB recordsMatchingSearchElement:imNick];
-	
-	if (peopleFound && [peopleFound count] > 0)
-	{
-		ABRecord *record = [peopleFound objectAtIndex:0];
-		
-		NSString *firstName = [record valueForProperty:kABFirstNameProperty];
-		NSString *lastName = [record valueForProperty:kABLastNameProperty];
-		
-		if (firstName && lastName)
-		{
-			return [[firstName stringByAppendingString:@" "] stringByAppendingString:lastName];
-		}
-	}
-	
-	return NULL;
-}
-
- at end
diff -r ab44879691a8 -r 674679183733 Source/Logorrhea/Buddy.h
--- a/Source/Logorrhea/Buddy.h	Mon Aug 01 20:40:33 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-//
-//  Buddy.h
-//  Logtastic
-//
-//  Created by Jan Van Tol on Sat Dec 14 2002.
-//  Copyright (c) 2002 Spiny Software. All rights reserved.
-//
-
-#import "Chat.h"
-
- at class Chat;
-
- at interface Buddy : NSObject {
-    NSString *myName;
-    NSMutableArray *chats;
-}
-
-- (id)initWithName:(NSString *)name;
-- (NSUInteger)numberOfChats;
-- (Chat *)chatAtIndex:(NSInteger)index;
-- (NSMutableArray *)chatsWithString:(NSString *)string;
-- (id) addChatFile:(NSString *)pathToLog;
-- (void) doSort;
-- (NSComparisonResult)caseInsensitiveCompare:(id)anObject;
-- (void) deleteChat:(Chat *) c;
-
- at end
diff -r ab44879691a8 -r 674679183733 Source/Logorrhea/Buddy.m
--- a/Source/Logorrhea/Buddy.m	Mon Aug 01 20:40:33 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-//
-//  Buddy.m
-//  Logtastic
-//
-//  Created by Jan Van Tol on Sat Dec 14 2002.
-//  Copyright (c) 2002 Spiny Software. All rights reserved.
-//
-
-#import "Buddy.h"
-#import "FileAttributes.h"
-
- at implementation Buddy
-
-- (id)initWithName:(NSString *)name
-{
-    self = [super init];
-        
-    //myName stores the buddies own name.
-    myName = [name retain];
-    //Inits chats, which is filled with Chat objects each representing a chat log.
-    chats = [[NSMutableArray alloc] init];
-
-	return self;
-}
-
-- (id) addChatFile:(NSString *)pathToLog
-{		
-	//Creates a new chat object, inits it with the log, and sets the date.
-	Chat *chat = [[Chat alloc] initWithBuddy:self path:pathToLog];
-	
-	//Adds the chat to the array of chats for this buddy.
-	[chats addObject: chat];
-    
-	[chat release];
-	
-    return self;
-}
-
-- (void) deleteChat:(Chat *) c
-{
-	NSInteger idx = [chats indexOfObjectIdenticalTo:c];
-	if (idx != -1)
-		[chats removeObjectAtIndex:idx];
-}
-
-- (void) doSort
-{
-    //Sort chats by date.
-    [chats sortUsingSelector:@selector(compareByDate:)];
-}
-
-- (NSUInteger)numberOfChats
-{
-    return [chats count];
-}
-
-- (Chat *)chatAtIndex:(NSInteger)idx
-{
-    return [chats objectAtIndex:idx];
-}
-
-//Asks each Chat if it contains string, if so, add that chat to chatsWithString.
-- (NSMutableArray *)chatsWithString:(NSString *)string {
-    
-    NSMutableArray *chatsWithString = [[NSMutableArray alloc] init];
-    for (NSUInteger i=0; i < [chats count]; i++) {
-        if ([[chats objectAtIndex: i] logContainsString: string]) {
-            [chatsWithString addObject: [chats objectAtIndex: i]];
-        }
-    }
-    
-    return [chatsWithString autorelease];
-}
-
-- (NSString *)description {
-    return myName;
-}
-
-- (NSUInteger)hash
-{
-	NSInteger hash = [myName hash];
-	
-	return hash;
-}
-
-- (BOOL)isEqual:(id)anObject
-{
-	return [myName isEqual:[anObject description]];
-}
-
-- (NSComparisonResult)caseInsensitiveCompare:(id)anObject
-{
-	return [myName caseInsensitiveCompare:[anObject description]];
-	
-}
-
- at end
diff -r ab44879691a8 -r 674679183733 Source/Logorrhea/Chat.h
--- a/Source/Logorrhea/Chat.h	Mon Aug 01 20:40:33 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-//
-//  Chat.h
-//  Logtastic
-//
-//  Created by Jan Van Tol on Sat Dec 14 2002.
-//  Copyright (c) 2002 Spiny Software. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-#import "Buddy.h"
-
- at class Buddy;
-
- at interface Chat : NSObject {
-	NSArray		*chatContents;
-	NSArray 	*instantMessages;
-		
-	NSString 	*myPath;
-    Buddy 		*myBuddy;
-    NSDate 		*creationDate;
-}
-
-- (id)initWithBuddy:(Buddy *)buddy path:(NSString *)path;
-- (void)setCreationDate:(NSDate *)date;
-- (NSDate *)creationDate;
-- (Buddy *)buddy;
-- (NSString *)path;
-- (NSString *)description;
-- (void)open;
-- (void) loadContents;
-
-//Sorting and searching
-- (NSComparisonResult)compareByDate:(Chat *)otherChat;
-- (BOOL)logContainsString:(NSString *)string;
-- (NSAttributedString *) getFormattedContents;
-- (NSAttributedString *) getFormattedContentsWithSearchTermsHilighted:(NSString *) searchTermsStr firstFoundIndex:(NSInteger *) foundIndex;
-- (NSString *) exportableContents;
-
- at end
diff -r ab44879691a8 -r 674679183733 Source/Logorrhea/Chat.m
--- a/Source/Logorrhea/Chat.m	Mon Aug 01 20:40:33 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,317 +0,0 @@
-//
-//  Chat.m
-//  Logtastic
-//
-//  Created by Jan Van Tol on Sat Dec 14 2002.
-//  Copyright (c) 2002 Spiny Software. All rights reserved.
-//
-
-#import "Chat.h"
-#import "InstantMessage.h"
-#import "FileAttributes.h"
-#import "AddressBookUtils.h"
-
- at implementation Chat
-
-- (id)initWithBuddy:(Buddy *)buddy path:(NSString *)path
-{
-    self = [super init];
-    
-    myBuddy = [buddy retain];
-	creationDate = [[FileAttributes getCreationDateForPath:path] retain];
-    myPath = [path retain];
-    
-    return self;
-}
-
-- (void)setCreationDate:(NSDate *)date
-{
-    creationDate = date;
-    [creationDate retain];
-}
-
-//Accessor methods.
-- (NSDate *)creationDate
-{
-    return creationDate;
-}
-
-- (Buddy *)buddy
-{ 
-    return myBuddy;
-}
-
-- (NSString *)path
-{
-    return myPath;
-}
-
-//Opens in iChat.
-- (void)open
-{
-    [[NSWorkspace sharedWorkspace] openFile:[myPath stringByExpandingTildeInPath] withApplication:@"iChat"];
-}
-
-//Returns a description of the Chat - a nicely formatted date string. We strip the leading zero on the hour so it'll look cleaner.
-- (NSString *)description
-{
-    NSCalendarDate *createdDate = [creationDate dateWithCalendarFormat:@"%c" timeZone:nil];
-    NSString *hourWithoutLeadingZero;
-    if ([[[createdDate descriptionWithCalendarFormat:@"%I"] substringToIndex:1] isEqualToString:@"0"])
-	{
-        hourWithoutLeadingZero = [[createdDate descriptionWithCalendarFormat:@"%I"] substringFromIndex:1];
-    }
-	else
-	{
-        hourWithoutLeadingZero = [createdDate descriptionWithCalendarFormat:@"%I"];
-    }
-    
-    NSString *dateDescription = [createdDate descriptionWithCalendarFormat:@"%a %b %e %Y, "];
-    dateDescription = [dateDescription stringByAppendingString: hourWithoutLeadingZero];
-    dateDescription = [dateDescription stringByAppendingString: [createdDate descriptionWithCalendarFormat:@":%M %p"]];
-    
-    return dateDescription;
-}
-
-//Comparison method for sorting by date
-- (NSComparisonResult)compareByDate:(Chat *)otherChat
-{
-    return (NSComparisonResult) - [creationDate compare:[otherChat creationDate]];
-}
-
-//Comparison method for sorting by buddy name
-- (NSComparisonResult)compareByBuddy:(Chat *)otherChat
-{
-    return [[myBuddy description] compare:[[otherChat buddy] description]];
-}
-
-- (void) loadContents
-{
-	if (chatContents == nil)
-	{
-		NSData *chatLog = [[NSData alloc] initWithContentsOfMappedFile:myPath];
-		if ([myPath hasSuffix:@".ichat"]) // check for tiger-style chat transcript
-		{
-			NS_DURING
-				chatContents = [[NSKeyedUnarchiver unarchiveObjectWithData:chatLog] retain];
-			NS_HANDLER
-				NSLog(@"Caught exception from NSKeyedUnarchiver - %@", [localException reason]);
-				chatContents = nil;
-			NS_ENDHANDLER
-			[chatLog release];
-		}
-		else
-		{
-			NS_DURING
-				chatContents = [[NSUnarchiver unarchiveObjectWithData:chatLog] retain];
-			NS_HANDLER
-				NSLog(@"Caught exception from NSUnarchiver - %@", [localException reason]);
-				chatContents = nil;
-			NS_ENDHANDLER
-			[chatLog release];
-		}
-		
-		if (![chatContents isKindOfClass:[NSArray class]])
-		{
-			[chatContents release];
-			chatContents = nil;
-		}
-		
-		if (chatContents != nil)
-		{
-			for (unsigned int i=0; i < [chatContents count]; i++)
-			{
-				id obj = [chatContents objectAtIndex:i];
-				if ([obj isKindOfClass:[NSArray class]])
-				{
-					instantMessages = [obj retain];
-					break;
-				}
-			}
-		}
-	}
-}
-
-//Search method.
-- (BOOL)logContainsString:(NSString *)string
-{
- 
-	[self loadContents];
-	
-	if (instantMessages != nil)
-	{
-		//Divide into an array of terms, so we don't search for phrases only. TO DO: More advanced searching, allowing quotes around terms to search for a phrase, and more.
-		NSArray *searchTerms = [string componentsSeparatedByString:@" "];
-
-		int foundCount = 0;
-
-		NSUInteger searchTermsCount = [searchTerms count];
-		for (int i=0; i < searchTermsCount; i++)
-		{
-			NSString *searchTerm = [searchTerms objectAtIndex:i];
-			
-			for (NSUInteger j=0; j < [instantMessages count]; j++)
-			{
-				InstantMessage *im = [instantMessages objectAtIndex:j];
-				
-				if (im)
-				{
-					NSString *searchString = [[im text] string];
-					//We use a case-insensitive search, but there could be an option to control this.
-					if ([searchString rangeOfString:searchTerm options:NSCaseInsensitiveSearch].location != NSNotFound)
-					{
-						foundCount++;
-						break;
-					}
-				}
-			}
-			
-			if (foundCount >= searchTermsCount)
-			{
-				return YES;
-			}
-		}
-	}
-	
-    return NO;
-}
-
-- (NSAttributedString *) getFormattedContentsWithSearchTermsHilighted:(NSString *) searchTermsStr firstFoundIndex:(NSInteger *) foundIndex
-{
-	BOOL firstFound = false;
-	
-	NSAttributedString *ret = [self getFormattedContents];
-	if (searchTermsStr && [searchTermsStr length] > 0)
-	{
-		NSArray *searchTerms = [searchTermsStr componentsSeparatedByString:@" "];
-
-		NSMutableAttributedString *retWithHilite = [[NSMutableAttributedString alloc] initWithAttributedString:ret];
-		NSString *retAsString = [retWithHilite string];
-		NSDictionary *colorAttrib = [NSDictionary dictionaryWithObject:[NSColor yellowColor] forKey:NSBackgroundColorAttributeName];
-		
-		for (NSUInteger i=0; i < [searchTerms count]; i++)
-		{
-			NSUInteger strLength = [retAsString length];
-			NSString *searchTerm = [searchTerms objectAtIndex:i];
-		
-			NSRange searchRange = NSMakeRange(0, strLength);
-			
-			while (true && (searchRange.location + searchRange.length) <= strLength)
-			{
-				NSRange foundRange = [retAsString rangeOfString:searchTerm options:NSCaseInsensitiveSearch range:searchRange];
-				if (foundRange.location == NSNotFound)
-					break;
-				else
-				{					
-					searchRange.location = foundRange.location + 1;
-					searchRange.length = strLength - searchRange.location;
-					
-					[retWithHilite addAttributes:colorAttrib range:foundRange];
-
-					if (!firstFound)
-					{
-						*foundIndex = searchRange.location;
-						firstFound = true;
-					}
-				}
-			}
-		}
-		
-		return [retWithHilite autorelease];
-	}
-	else
-	{
-		return ret;
-	}
-}
-
-- (NSAttributedString *) getFormattedContents
-{
-	[self loadContents];
-	NSMutableAttributedString *buf = [[NSMutableAttributedString alloc] initWithString:@""];
-	NSDictionary *gapAttrib = [NSDictionary dictionaryWithObject:[NSFont userFontOfSize:3.0f] forKey:NSFontAttributeName];
-	NSAttributedString *gap = [[NSAttributedString alloc] initWithString:@"\n" attributes:gapAttrib];
-
-	[buf appendAttributedString:gap];
-	
-	for (unsigned int i=0; i < [instantMessages count]; i++)
-	{
-		InstantMessage *im = [instantMessages objectAtIndex:i];
-		Presentity *sender = [im sender];
-		NSAttributedString *text = [im text];
-		
-		NSDictionary *attribsOfText = nil;
-		
-		if (text && [text length] > 0)
-			attribsOfText = [text attributesAtIndex:0 effectiveRange:nil];
-		
-		if (sender)
-		{
-			NSString *realName = [AddressBookUtils lookupRealNameForIMNick:[sender senderID]];
-			if (!realName)
-				realName = [sender senderID];
-			
-			NSString *formattedName = [realName stringByAppendingString:@": "];
-			NSAttributedString *senderName = [[NSAttributedString alloc] initWithString:formattedName attributes:attribsOfText];
-			[buf appendAttributedString:senderName];
-			[senderName release];
-		}
-		[buf appendAttributedString:text];
-				
-		NSAttributedString *lineBreak = [[NSAttributedString alloc] initWithString:@"\n" attributes:attribsOfText];
-		[buf appendAttributedString:lineBreak];
-		[lineBreak release];
-		
-		[buf appendAttributedString:gap];
-	}
-
-	[gap release];
-	
-										
-	//[buf addAttributes:baselineAttrib range:NSMakeRange(0, [[buf string] length])];
-	
-	return [buf autorelease];
-}
-
-//Get tab delimited text version of chat
-- (NSString *) exportableContents
-{
-    [self loadContents];
-    NSMutableString *buf = [[NSMutableString alloc] initWithString:@""];
-    
-    for (unsigned int i=0; i < [instantMessages count]; i++)
-	{
-        InstantMessage *im = [instantMessages objectAtIndex:i];
-        Presentity *sender = [im sender];
-		NSAttributedString *text = [im text];
-		NSDate *date = [im date];
-        if (sender)
-		{
-            [buf appendString:[[NSArray arrayWithObjects:
-                [self buddy],
-                [sender senderID],
-                [date descriptionWithCalendarFormat:@"%m/%d/%Y" timeZone:nil locale:nil],
-                [date descriptionWithCalendarFormat:@"%H:%M:%S" timeZone:nil locale:nil],
-                [text string],nil]
-                  componentsJoinedByString:@"\t"]];
-            [buf appendString:@"\r"];
-        }
-    }
-    return [buf autorelease];
-}
-
-- (NSArray *) participants
-{
-	NSMutableSet *participantSet = [[[NSMutableSet alloc] init] autorelease];
-	
-    for (unsigned int i=0; i < [instantMessages count]; i++)
-	{
-        InstantMessage *im = [instantMessages objectAtIndex:i];
-        Presentity *sender = [im sender];
-		[participantSet addObject:[sender senderID]];
-    }
-	
-	return [participantSet allObjects];
-}
-
- at end
diff -r ab44879691a8 -r 674679183733 Source/Logorrhea/FileAttributes.h
--- a/Source/Logorrhea/FileAttributes.h	Mon Aug 01 20:40:33 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-//
-//  FileAttributes.h
-//  Logtastic
-//
-//  Created by Ladd Van Tol on Sat Mar 29 2003.
-//  Copyright (c) 2003 Spiny. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-
- at interface FileAttributes : NSObject
-{
-}
-
-+ (NSDate *) getCreationDateForPath:(NSString *) path;
-
- at end
diff -r ab44879691a8 -r 674679183733 Source/Logorrhea/FileAttributes.m
--- a/Source/Logorrhea/FileAttributes.m	Mon Aug 01 20:40:33 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-//
-//  FileAttributes.m
-//  Logtastic
-//
-//  Created by Ladd Van Tol on Sat Mar 29 2003.
-//  Copyright (c) 2003 Spiny. All rights reserved.
-//
-
-#import "FileAttributes.h"
-
-NSDate* convertUTCtoNSDate(UTCDateTime input);
-NSDate* dateForJan1904();
-UTCDateTime convertNSDatetoUTC(NSDate* date);
-
-NSDate* dateForJan1904()
-{		// utility to return a singleton reference NSDate
-	static NSDate* Jan1904 = nil;
-	if (!Jan1904) {
-		Jan1904 = [[NSDate dateWithString:@"1904-01-01 00:00:00 +0000"] retain];
-	}
-	return Jan1904;
-}
-
-NSDate* convertUTCtoNSDate(UTCDateTime input)
-{
-	NSDate* result = nil;
-	union
-	{
-		UTCDateTime local;
-		UInt64 shifted;
-	} u_time;
-	u_time.local = input;
-	if (u_time.shifted)
-	{
-		result = [[[NSDate alloc] initWithTimeInterval:u_time.shifted/65536
-			sinceDate:dateForJan1904()] autorelease];
-	}
-	return result;
-}
-
- at implementation FileAttributes
-
-+ (NSDate *) getCreationDateForPath:(NSString *) path
-{
-	FSCatalogInfo catalogInfo;
-	FSRef fsRef;
-	OSStatus err = noErr;
-	
-	err = FSPathMakeRef((UInt8 *) [path UTF8String], &fsRef, NULL);
-	if (err == noErr)
-	{
-		err = FSGetCatalogInfo(&fsRef, kFSCatInfoCreateDate, &catalogInfo, NULL, NULL, NULL);
-		if (err == noErr)
-		{
-			return convertUTCtoNSDate(catalogInfo.createDate);
-		}
-	}
-	
-	return NULL;
-}
-
- at end
diff -r ab44879691a8 -r 674679183733 Source/Logorrhea/Person.h
--- a/Source/Logorrhea/Person.h	Mon Aug 01 20:40:33 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-//
-//  Person.h
-//  Logtastic
-//
-//  Created by Ladd Van Tol on Fri Mar 28 2003.
-//  Copyright (c) 2003 Spiny. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-
- at interface Person : NSObject <NSCoding>
-{
-
-}
-
-- (void)encodeWithCoder:(NSCoder *)encoder;
-- (id)initWithCoder:(NSCoder *)decoder;
-
- at end
diff -r ab44879691a8 -r 674679183733 Source/Logorrhea/Person.m
--- a/Source/Logorrhea/Person.m	Mon Aug 01 20:40:33 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-//
-//  Person.m
-//  Logtastic
-//
-//  Created by Ladd Van Tol on Fri Mar 28 2003.
-//  Copyright (c) 2003 Spiny. All rights reserved.
-//
-
-#import "Person.h"
-
-
- at implementation Person
-
-- (void)encodeWithCoder:(NSCoder *)encoder
-{
-	NSLog(@"encodeWithCoder called on %@", [self class]);
-}
-
-- (id)initWithCoder:(NSCoder *)decoder
-{
-	NSLog(@"initWithCoder called on %@", [self class]);
-	return self;
-}
-
- at end




More information about the commits mailing list