adium 3069:fca2770e97c0: Declare protocols invoked through @sele...

commits at adium.im commits at adium.im
Thu Dec 24 03:46:02 UTC 2009


details:	http://hg.adium.im/adium/rev/fca2770e97c0
revision:	3069:fca2770e97c0
author:		Stephen Holt <sholt at adium.im>
date:		Wed Dec 23 22:45:17 2009 -0500

Declare protocols invoked through @selectors
Subject: adium 3070:067d554925e4: Add defines to allow platform specific math functions to be used for compat with CGFloat and NSU?Integer.

details:	http://hg.adium.im/adium/rev/067d554925e4
revision:	3070:067d554925e4
author:		Stephen Holt <sholt at adium.im>
date:		Wed Dec 23 22:45:18 2009 -0500

Add defines to allow platform specific math functions to be used for compat with CGFloat and NSU?Integer.
Subject: adium 3071:b21c2cff5c86: Fix datatypes for safety on both 32 and 64 bit arches.

details:	http://hg.adium.im/adium/rev/b21c2cff5c86
revision:	3071:b21c2cff5c86
author:		Stephen Holt <sholt at adium.im>
date:		Wed Dec 23 22:45:19 2009 -0500

Fix datatypes for safety on both 32 and 64 bit arches.

diffs (truncated from 1680 to 1000 lines):

diff -r 5d42a071bebd -r b21c2cff5c86 Adium.xcodeproj/project.pbxproj
--- a/Adium.xcodeproj/project.pbxproj	Wed Dec 23 16:53:01 2009 -1000
+++ b/Adium.xcodeproj/project.pbxproj	Wed Dec 23 22:45:19 2009 -0500
@@ -1457,6 +1457,7 @@
 		7E824CE106387FAF00813072 /* SHAutoValidatingTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E824CD206387FAF00813072 /* SHAutoValidatingTextView.m */; };
 		7E824CE306387FAF00813072 /* SHLinkEditorWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E824CD406387FAF00813072 /* SHLinkEditorWindowController.m */; };
 		7E824CEB06387FAF00813072 /* SHLinkManagementPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E824CDC06387FAF00813072 /* SHLinkManagementPlugin.m */; };
+		7E959AD010E3187000C26397 /* AIMathCompatibility.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E959ACF10E3187000C26397 /* AIMathCompatibility.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		811033510CDE170B00EC6038 /* ssl-cdsa.c in Sources */ = {isa = PBXBuildFile; fileRef = 811033500CDE170B00EC6038 /* ssl-cdsa.c */; };
 		811034050CDE216F00EC6038 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 340C1ABE0BD58FAB00D09235 /* Security.framework */; };
 		811035180CDE783800EC6038 /* SecurityInterface.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 811035170CDE783800EC6038 /* SecurityInterface.framework */; };
@@ -4640,6 +4641,7 @@
 		7E824CD406387FAF00813072 /* SHLinkEditorWindowController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = SHLinkEditorWindowController.m; sourceTree = "<group>"; };
 		7E824CDB06387FAF00813072 /* SHLinkManagementPlugin.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SHLinkManagementPlugin.h; sourceTree = "<group>"; };
 		7E824CDC06387FAF00813072 /* SHLinkManagementPlugin.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = SHLinkManagementPlugin.m; sourceTree = "<group>"; };
+		7E959ACF10E3187000C26397 /* AIMathCompatibility.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AIMathCompatibility.h; path = "Frameworks/AIUtilities Framework/Source/AIMathCompatibility.h"; sourceTree = "<group>"; };
 		7E9A8CB2104DEBC400F210CC /* Growl.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Growl.framework; path = Frameworks/Growl.framework; sourceTree = "<group>"; };
 		811033500CDE170B00EC6038 /* ssl-cdsa.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "ssl-cdsa.c"; sourceTree = "<group>"; };
 		811035170CDE783800EC6038 /* SecurityInterface.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SecurityInterface.framework; path = /System/Library/Frameworks/SecurityInterface.framework; sourceTree = "<absolute>"; };
@@ -7533,6 +7535,7 @@
 				6334FF050F9C14BF003C77A9 /* Fun New Classes */,
 				6334FF020F9C14BF003C77A9 /* Functions */,
 				1156F03D1049E83F002673FC /* AILeopardCompatibility.h */,
+				7E959ACF10E3187000C26397 /* AIMathCompatibility.h */,
 			);
 			name = AIUtilities;
 			sourceTree = "<group>";
@@ -9332,6 +9335,7 @@
 				634DC5570F9C3B2F007B6479 /* AIStringUtilities.h in Headers */,
 				63BB1CB90F9EDD2B00424B80 /* AISharedWriterQueue.h in Headers */,
 				11AA10130FCE0969003908B6 /* AIProgressDataUploader.h in Headers */,
+				7E959AD010E3187000C26397 /* AIMathCompatibility.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
diff -r 5d42a071bebd -r b21c2cff5c86 Frameworks/AIUtilities Framework/AIUtilities.framework_Prefix.pch
--- a/Frameworks/AIUtilities Framework/AIUtilities.framework_Prefix.pch	Wed Dec 23 16:53:01 2009 -1000
+++ b/Frameworks/AIUtilities Framework/AIUtilities.framework_Prefix.pch	Wed Dec 23 22:45:19 2009 -0500
@@ -2,6 +2,8 @@
 // Prefix header for all source files of the 'AIUtilities' target in the 'AIUtilities.framework' project.
 //
 
+#include "AIMathCompatibility.h"
+
 #ifdef __OBJC__
 	#import <Cocoa/Cocoa.h>
 
diff -r 5d42a071bebd -r b21c2cff5c86 Frameworks/AIUtilities Framework/Source/AIAlternatingRowOutlineView.m
--- a/Frameworks/AIUtilities Framework/Source/AIAlternatingRowOutlineView.m	Wed Dec 23 16:53:01 2009 -1000
+++ b/Frameworks/AIUtilities Framework/Source/AIAlternatingRowOutlineView.m	Wed Dec 23 22:45:19 2009 -0500
@@ -29,6 +29,7 @@
 @interface AIAlternatingRowOutlineView ()
 - (void)initAlternatingRowOutlineView;
 - (void)_drawGridInClipRect:(NSRect)rect;
+- (void)alternatingRowOutlineViewSelectionDidChange:(NSNotification *)notification;
 @end
 
 @interface NSOutlineView (Undocumented)
@@ -58,7 +59,7 @@
 	[self setUsesAlternatingRowBackgroundColors:NO];
 	drawsBackground = YES;
 	drawsGradientSelection = NO;
-	alternatingRowColor = [[NSColor colorWithCalibratedRed:(237.0/255.0) green:(243.0/255.0) blue:(254.0/255.0) alpha:1.0] retain];
+	alternatingRowColor = [[NSColor colorWithCalibratedRed:(237.0f/255.0f) green:(243.0f/255.0f) blue:(254.0f/255.0f) alpha:1.0f] retain];
 
 	[[NSNotificationCenter defaultCenter] addObserver:self
 											 selector:@selector(alternatingRowOutlineViewSelectionDidChange:)
@@ -132,7 +133,7 @@
 	NSInteger numberOfRows = [self numberOfRows];
 	CGFloat rowHeight = [self rowHeight];
     
-	NSRectArray gridRects = (NSRectArray)alloca(sizeof(NSRect) * (numberOfRows + ((NSInteger)round(((rect.size.height / rowHeight) / 2) + 0.5))));
+	NSRectArray gridRects = (NSRectArray)alloca(sizeof(NSRect) * (numberOfRows + ((NSInteger)round(((rect.size.height / rowHeight) / 2) + 0.5f))));
 	for (unsigned row = 0; row < numberOfRows; row += 2) {
 		if (row < numberOfRows) {
 			NSRect	thisRect = [self rectOfRow:row];
@@ -198,7 +199,7 @@
 					thisRect = startRow;
 				}
 
-				[gradient drawInRect:thisRect angle:90.0];
+				[gradient drawInRect:thisRect angle:90.0f];
 				
 				//Draw a line at the light side, to make it look a lot cleaner
 				thisRect.size.height = 1;
@@ -252,11 +253,11 @@
 {
     NSEnumerator	*enumerator;
     NSTableColumn	*column;
-    CGFloat		xPos = 0.5;
+    CGFloat		xPos = 0.5f;
     CGFloat			intercellWidth = [self intercellSpacing].width;
     
     [[self gridColor] set];
-    [NSBezierPath setDefaultLineWidth:1.0];
+    [NSBezierPath setDefaultLineWidth:1.0f];
 
     enumerator = [[self tableColumns] objectEnumerator];
     while ((column = [enumerator nextObject])) {
diff -r 5d42a071bebd -r b21c2cff5c86 Frameworks/AIUtilities Framework/Source/AIAttributedStringAdditions.m
--- a/Frameworks/AIUtilities Framework/Source/AIAttributedStringAdditions.m	Wed Dec 23 16:53:01 2009 -1000
+++ b/Frameworks/AIUtilities Framework/Source/AIAttributedStringAdditions.m	Wed Dec 23 22:45:19 2009 -0500
@@ -118,15 +118,15 @@
         //--check brightness--
         brightness = [fontColor brightnessComponent];
         deltaBrightness = backgroundBrightness - brightness;
-        if (deltaBrightness >= 0 && deltaBrightness < 0.4) { //too close                    
+        if (deltaBrightness >= 0 && deltaBrightness < 0.4f) { //too close                    
                                                            //change the color
-            fontColor = [NSColor colorWithCalibratedHue:[fontColor hueComponent] saturation:[fontColor saturationComponent] brightness:backgroundBrightness - 0.4 alpha:[fontColor alphaComponent]];
+            fontColor = [NSColor colorWithCalibratedHue:[fontColor hueComponent] saturation:[fontColor saturationComponent] brightness:backgroundBrightness - 0.4f alpha:[fontColor alphaComponent]];
             fontColor = [fontColor colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
                 colorChanged = YES;
             
-        } else if (deltaBrightness < 0 && deltaBrightness > -0.4) { //too close
+        } else if (deltaBrightness < 0 && deltaBrightness > -0.4f) { //too close
                                                                  //change the color
-            fontColor = [NSColor colorWithCalibratedHue:[fontColor hueComponent] saturation:[fontColor saturationComponent] brightness:backgroundBrightness + 0.4 alpha:[fontColor alphaComponent]];
+            fontColor = [NSColor colorWithCalibratedHue:[fontColor hueComponent] saturation:[fontColor saturationComponent] brightness:backgroundBrightness + 0.4f alpha:[fontColor alphaComponent]];
             fontColor = [fontColor colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
             
             colorChanged = YES;
@@ -135,9 +135,9 @@
         //--check components--
         sum = [fontColor redComponent] + [fontColor greenComponent] + [fontColor blueComponent];
         deltaSum = backgroundSum - sum;
-        if (deltaSum < 1.0 && deltaSum > -1.0) { //still too similar                    
+        if (deltaSum < 1.0f && deltaSum > -1.0f) { //still too similar                    
                                                //just give up and make the color black or white
-            if (backgroundBrightness <= 0.5) {
+            if (backgroundBrightness <= 0.5f) {
                 fontColor = [[NSColor whiteColor] colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
             } else {
                 fontColor = [[NSColor blackColor] colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
@@ -208,13 +208,13 @@
             if (!backgroundIsDark && fontBackIsDark) {
                 newBrightness = brightness - (deltaBrightness)/2;
                 if (newBrightness <= 0)
-                    newBrightness = .2;
+                    newBrightness = .2f;
                 colorChanged = YES;
             }
             else if (backgroundIsDark && !fontBackIsDark) {
                 newBrightness = brightness + (deltaBrightness)/2;
                 if (newBrightness >= 1)
-                    newBrightness = .8;
+                    newBrightness = .8f;
                 colorChanged = YES;
             }
             
@@ -227,14 +227,14 @@
         //--check brightness--
         brightness = [fontColor brightnessComponent];
         deltaBrightness = backgroundBrightness - brightness;       
-        if (deltaBrightness >= 0 && deltaBrightness <= 0.4) {    //too close 
-            fontColor = [fontColor adjustHue:0.0 saturation:0.0 brightness:-.4]; //change the color
+        if (deltaBrightness >= 0 && deltaBrightness <= 0.4f) {    //too close 
+            fontColor = [fontColor adjustHue:0.0f saturation:0.0f brightness:-.4f]; //change the color
             colorChanged = YES;
             
-        } else if (deltaBrightness >= -0.4 && deltaBrightness <0) { //too close
+        } else if (deltaBrightness >= -0.4f && deltaBrightness <0) { //too close
                                                                  //change the color
 
-            fontColor = [fontColor adjustHue:0.0 saturation:0.0 brightness:.4];
+            fontColor = [fontColor adjustHue:0.0f saturation:0.0f brightness:.4f];
             
             colorChanged = YES;
         }
@@ -248,8 +248,8 @@
             
         deltaSum = backLuminance - fontLuminance;
         
-        if (deltaSum >= -0.3 && deltaSum <= 0.3) { //still too similar     
-            if (backgroundBrightness <= 0.5) {
+        if (deltaSum >= -0.3f && deltaSum <= 0.3f) { //still too similar     
+            if (backgroundBrightness <= 0.5f) {
                fontColor = [[NSColor whiteColor] colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
             } else {
                 fontColor = [[NSColor blackColor] colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
@@ -413,7 +413,7 @@
 {
 	NSAttributedString	*string = [[[NSAttributedString alloc] initWithString:FONT_HEIGHT_STRING
 																   attributes:attributes] autorelease];
-	return [string heightWithWidth:1e7];
+	return [string heightWithWidth:1e7f];
 }
 
 + (NSAttributedString *)stringWithString:(NSString *)inString
@@ -456,11 +456,11 @@
 {	
     //Setup the layout manager and text container
     NSTextStorage *textStorage = [[NSTextStorage alloc] initWithAttributedString:self];
-    NSTextContainer *textContainer = [[NSTextContainer alloc] initWithContainerSize:NSMakeSize(width, 1e7)];
+    NSTextContainer *textContainer = [[NSTextContainer alloc] initWithContainerSize:NSMakeSize(width, 1e7f)];
     NSLayoutManager *layoutManager = [[NSLayoutManager alloc] init];
 
     //Configure
-    [textContainer setLineFragmentPadding:0.0];
+    [textContainer setLineFragmentPadding:0.0f];
     [layoutManager addTextContainer:textContainer];
     [textStorage addLayoutManager:layoutManager];
 
diff -r 5d42a071bebd -r b21c2cff5c86 Frameworks/AIUtilities Framework/Source/AIAutoScrollView.m
--- a/Frameworks/AIUtilities Framework/Source/AIAutoScrollView.m	Wed Dec 23 16:53:01 2009 -1000
+++ b/Frameworks/AIUtilities Framework/Source/AIAutoScrollView.m	Wed Dec 23 22:45:19 2009 -0500
@@ -19,6 +19,7 @@
 
 @interface AIAutoScrollView ()
 - (void)_initAutoScrollView;
+- (void)documentFrameDidChange:(NSNotification *)notification;
 @end
 
 @implementation AIAutoScrollView
diff -r 5d42a071bebd -r b21c2cff5c86 Frameworks/AIUtilities Framework/Source/AIBezierPathAdditions.m
--- a/Frameworks/AIUtilities Framework/Source/AIBezierPathAdditions.m	Wed Dec 23 16:53:01 2009 -1000
+++ b/Frameworks/AIUtilities Framework/Source/AIBezierPathAdditions.m	Wed Dec 23 22:45:19 2009 -0500
@@ -21,12 +21,12 @@
 
 #import "AIBezierPathAdditions.h"
 
-#define ONE_THIRD  (1.0/3.0)
-#define TWO_THIRDS (2.0/3.0)
-#define ONE_HALF    0.5
+#define ONE_THIRD  (1.0f/3.0f)
+#define TWO_THIRDS (2.0f/3.0f)
+#define ONE_HALF    0.5f
 
 #define DEFAULT_SHAFT_WIDTH ONE_THIRD
-#define DEFAULT_SHAFT_LENGTH_MULTI 1.0
+#define DEFAULT_SHAFT_LENGTH_MULTI 1.0f
 
 @implementation NSBezierPath (AIBezierPathAdditions)
 
@@ -41,7 +41,7 @@
 
 + (NSBezierPath *)bezierPathWithRoundedRect:(NSRect)bounds
 {
-	return [self bezierPathWithRoundedRect:bounds radius:MIN(bounds.size.width, bounds.size.height) / 2.0];
+	return [self bezierPathWithRoundedRect:bounds radius:MIN(bounds.size.width, bounds.size.height) / 2.0f];
 }
 
 + (NSBezierPath *)bezierPathWithRoundedRect:(NSRect)rect radius:(CGFloat)radius
@@ -127,21 +127,21 @@
 	const CGFloat shaftLength = ONE_HALF * shaftLengthMulti;
 	const CGFloat shaftEndY = -(shaftLength - ONE_HALF); //the end of the arrow shaft (points 1-2).
 	//wing width = the distance between 6 and 7 and 3 and 4.
-	const CGFloat wingWidth = (1.0 - shaftWidth) * 0.5;
+	const CGFloat wingWidth = (1.0f - shaftWidth) * 0.5f;
 
 	//start with the bottom vertex.
 	[arrowPath moveToPoint:NSMakePoint(wingWidth,  shaftEndY)]; //1
-	[arrowPath relativeLineToPoint:NSMakePoint(shaftWidth, 0.0)]; //2
+	[arrowPath relativeLineToPoint:NSMakePoint(shaftWidth, 0.0f)]; //2
 	//up to the inner right corner.
-	[arrowPath relativeLineToPoint:NSMakePoint(0.0, shaftLength)]; //3
+	[arrowPath relativeLineToPoint:NSMakePoint(0.0f, shaftLength)]; //3
 	//far right.
-	[arrowPath relativeLineToPoint:NSMakePoint(wingWidth,  0.0)]; //4
+	[arrowPath relativeLineToPoint:NSMakePoint(wingWidth,  0.0f)]; //4
 	//top center - the point of the arrow.
-	[arrowPath lineToPoint:NSMakePoint(ONE_HALF,  1.0)]; //5
+	[arrowPath lineToPoint:NSMakePoint(ONE_HALF,  1.0f)]; //5
 	//far left.
-	[arrowPath lineToPoint:NSMakePoint(0.0,  ONE_HALF)]; //6
+	[arrowPath lineToPoint:NSMakePoint(0.0f,  ONE_HALF)]; //6
 	//inner left corner.
-	[arrowPath relativeLineToPoint:NSMakePoint(wingWidth,  0.0)]; //7
+	[arrowPath relativeLineToPoint:NSMakePoint(wingWidth,  0.0f)]; //7
 	//to the finish line! yay!
 	[arrowPath closePath];
 
@@ -168,8 +168,8 @@
 	NSAffineTransform *transform = [NSAffineTransform transform];
 
 	//adapted from http://developer.apple.com/documentation/Carbon/Conceptual/QuickDrawToQuartz2D/tq_other/chapter_3_section_2.html
-	[transform translateXBy: 1.0 yBy: 0.0];
-	[transform     scaleXBy:-1.0 yBy: 1.0];
+	[transform translateXBy: 1.0f yBy: 0.0f];
+	[transform     scaleXBy:-1.0f yBy: 1.0f];
 
 	[self transformUsingAffineTransform:transform];
 	return self;
@@ -178,8 +178,8 @@
 	NSAffineTransform *transform = [NSAffineTransform transform];
 
 	//http://developer.apple.com/documentation/Carbon/Conceptual/QuickDrawToQuartz2D/tq_other/chapter_3_section_2.html
-	[transform translateXBy: 0.0 yBy: 1.0];
-	[transform     scaleXBy: 1.0 yBy:-1.0];
+	[transform translateXBy: 0.0f yBy: 1.0f];
+	[transform     scaleXBy: 1.0f yBy:-1.0f];
 
 	[self transformUsingAffineTransform:transform];
 	return self;
diff -r 5d42a071bebd -r b21c2cff5c86 Frameworks/AIUtilities Framework/Source/AIColorAdditions.m
--- a/Frameworks/AIUtilities Framework/Source/AIColorAdditions.m	Wed Dec 23 16:53:01 2009 -1000
+++ b/Frameworks/AIUtilities Framework/Source/AIColorAdditions.m	Wed Dec 23 22:45:19 2009 -0500
@@ -24,9 +24,9 @@
 static NSArray *defaultValidColors = nil;
 #define VALID_COLORS_ARRAY [[NSArray alloc] initWithObjects:@"aqua", @"aquamarine", @"blue", @"blueviolet", @"brown", @"burlywood", @"cadetblue", @"chartreuse", @"chocolate", @"coral", @"cornflowerblue", @"crimson", @"cyan", @"darkblue", @"darkcyan", @"darkgoldenrod", @"darkgreen", @"darkgrey", @"darkkhaki", @"darkmagenta", @"darkolivegreen", @"darkorange", @"darkorchid", @"darkred", @"darksalmon", @"darkseagreen", @"darkslateblue", @"darkslategrey", @"darkturquoise", @"darkviolet", @"deeppink", @"deepskyblue", @"dimgrey", @"dodgerblue", @"firebrick", @"forestgreen", @"fuchsia", @"gold", @"goldenrod", @"green", @"greenyellow", @"grey", @"hotpink", @"indianred", @"indigo", @"lawngreen", @"lightblue", @"lightcoral", @"lightgreen", @"lightgrey", @"lightpink", @"lightsalmon", @"lightseagreen", @"lightskyblue", @"lightslategrey", @"lightsteelblue", @"lime", @"limegreen", @"magenta", @"maroon", @"mediumaquamarine", @"mediumblue", @"mediumorchid", @"mediumpurple", @"mediumseagreen", @"mediumslateblue", @"mediumspringgreen", @"mediumturquoise", @"mediumvioletred", @"midnightblue", @"navy", @"olive", @"olivedrab", @"orange", @"orangered", @"orchid", @"palegreen", @"paleturquoise", @"palevioletred", @"peru", @"pink", @"plum", @"powderblue", @"purple", @"red", @"rosybrown", @"royalblue", @"saddlebrown", @"salmon", @"sandybrown", @"seagreen", @"sienna", @"silver", @"skyblue", @"slateblue", @"slategrey", @"springgreen", @"steelblue", @"tan", @"teal", @"thistle", @"tomato", @"turquoise", @"violet", @"yellowgreen", nil]
 
-static const CGFloat ONE_THIRD = 1.0/3.0;
-static const CGFloat ONE_SIXTH = 1.0/6.0;
-static const CGFloat TWO_THIRD = 2.0/3.0;
+static const CGFloat ONE_THIRD = 1.0f/3.0f;
+static const CGFloat ONE_SIXTH = 1.0f/6.0f;
+static const CGFloat TWO_THIRD = 2.0f/3.0f;
 
 static NSMutableDictionary *RGBColorValues = nil;
 
@@ -103,7 +103,7 @@
 				NSColor *color = [NSColor colorWithCalibratedRed:state.red
 														   green:state.green
 															blue:state.blue
-														   alpha:1.0];
+														   alpha:1.0f];
 				[mutableDict setObject:color forKey:name];
 				NSString *lowercaseName = [name lowercaseString];
 				if (![mutableDict objectForKey:lowercaseName]) {
@@ -120,13 +120,13 @@
 			} else {
 				if (!state.redStart) {
 					state.redStart = &ch[i];
-					state.red = (float)(strtod(state.redStart, (char **)&state.redEnd) / 255.0);
+					state.red = (float)(strtod(state.redStart, (char **)&state.redEnd) / 255.0f);
 				} else if ((!state.greenStart) && state.redEnd && (&ch[i] >= state.redEnd)) {
 					state.greenStart = &ch[i];
-					state.green = (float)(strtod(state.greenStart, (char **)&state.greenEnd) / 255.0);
+					state.green = (float)(strtod(state.greenStart, (char **)&state.greenEnd) / 255.0f);
 				} else if ((!state.blueStart) && state.greenEnd && (&ch[i] >= state.greenEnd)) {
 					state.blueStart = &ch[i];
-					state.blue = (float)(strtod(state.blueStart, (char **)&state.blueEnd) / 255.0);
+					state.blue = (float)(strtod(state.blueStart, (char **)&state.blueEnd) / 255.0f);
 				} else if ((!state.nameStart) && state.blueEnd && (&ch[i] >= state.blueEnd)) {
 					state.nameStart  = &ch[i];
 				}
@@ -209,13 +209,13 @@
 //Returns YES if this color is dark
 - (BOOL)colorIsDark
 {
-    return ([[self colorUsingColorSpaceName:NSCalibratedRGBColorSpace] brightnessComponent] < 0.5);
+    return ([[self colorUsingColorSpaceName:NSCalibratedRGBColorSpace] brightnessComponent] < 0.5f);
 }
 
 - (BOOL)colorIsMedium
 {
 	CGFloat brightness = [[self colorUsingColorSpaceName:NSCalibratedRGBColorSpace] brightnessComponent];
-	return (0.35 < brightness && brightness < 0.65);
+	return (0.35f < brightness && brightness < 0.65f);
 }
 
 //Percent should be -1.0 to 1.0 (negatives will make the color brighter)
@@ -234,7 +234,7 @@
     NSColor	*convertedColor = [self colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
     
     return [NSColor colorWithCalibratedHue:[convertedColor hueComponent]
-                                saturation:(([convertedColor saturationComponent] == 0.0) ? [convertedColor saturationComponent] : ([convertedColor saturationComponent] + amount))
+                                saturation:(([convertedColor saturationComponent] == 0.0f) ? [convertedColor saturationComponent] : ([convertedColor saturationComponent] + amount))
                                 brightness:([convertedColor brightnessComponent] - amount)
                                      alpha:[convertedColor alphaComponent]];
 }
@@ -250,10 +250,10 @@
     [convertedColor getHue:&h saturation:&s brightness:&l alpha:NULL];
 
     //Invert L
-    l = 1.0 - l;
+    l = 1.0f - l;
 
     //Return the new color
-    return [NSColor colorWithCalibratedHue:h saturation:s brightness:l alpha:1.0];
+    return [NSColor colorWithCalibratedHue:h saturation:s brightness:l alpha:1.0f];
 }
 
 //Returns a color that contrasts well with this one
@@ -267,10 +267,10 @@
 
 	} else {
 		NSColor *rgbColor = [self colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
-		return [NSColor colorWithCalibratedRed:(1.0 - [rgbColor redComponent])
-										 green:(1.0 - [rgbColor greenComponent])
-										  blue:(1.0 - [rgbColor blueComponent])
-										 alpha:1.0];
+		return [NSColor colorWithCalibratedRed:(1.0f - [rgbColor redComponent])
+										 green:(1.0f - [rgbColor greenComponent])
+										  blue:(1.0f - [rgbColor blueComponent])
+										 alpha:1.0f];
 	}
 }
 
@@ -287,7 +287,7 @@
     [self getHue:&hue saturation:&sat brightness:&brit alpha:&alpha];
 
 	//For some reason, redColor's hue is 1.0f, not 0.0f, as of Mac OS X 10.4.10 and 10.5.2. Therefore, we must normalize any multiple of 1.0 to 0.0. We do this by taking the remainder of hue ÷ 1.
-	hue = fmod(hue, 1.0);
+	hue = AIfmod(hue, 1.0f);
 
     hue += dHue;
     cap(hue);
@@ -313,15 +313,15 @@
     convertedColor = [self colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
     [convertedColor getRed:&red green:&green blue:&blue alpha:NULL];
     
-    tempNum = (red * 255.0);
+    tempNum = (red * 255.0f);
     hexString[0] = intToHex(tempNum / 16);
     hexString[1] = intToHex(tempNum % 16);
 
-    tempNum = (green * 255.0);
+    tempNum = (green * 255.0f);
     hexString[2] = intToHex(tempNum / 16);
     hexString[3] = intToHex(tempNum % 16);
 
-    tempNum = (blue * 255.0);
+    tempNum = (blue * 255.0f);
     hexString[4] = intToHex(tempNum / 16);
     hexString[5] = intToHex(tempNum % 16);
     hexString[6] = '\0';
@@ -357,9 +357,9 @@
 		NSColor *rgb = [self colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
 		//CSS3 defines rgba() to take 0..255 for the color components, but 0..1 for the alpha component. Thus, we must multiply by 255 for the color components, but not for the alpha component.
 		return [NSString stringWithFormat:@"rgba(%@,%@,%@,%@)",
-			[NSString stringWithCGFloat:[rgb redComponent]   * 255.0 maxDigits:6],
-			[NSString stringWithCGFloat:[rgb greenComponent] * 255.0 maxDigits:6],
-			[NSString stringWithCGFloat:[rgb blueComponent]  * 255.0 maxDigits:6],
+			[NSString stringWithCGFloat:[rgb redComponent]   * 255.0f maxDigits:6],
+			[NSString stringWithCGFloat:[rgb greenComponent] * 255.0f maxDigits:6],
+			[NSString stringWithCGFloat:[rgb blueComponent]  * 255.0f maxDigits:6],
 			[NSString stringWithCGFloat:alpha                         maxDigits:6]];
 	} else {
 		return [@"#" stringByAppendingString:[self hexString]];
@@ -401,7 +401,7 @@
 		goto scanFailed;
 	}
 
-    return [NSColor colorWithCalibratedRed:(r/255.0) green:(g/255.0) blue:(b/255.0) alpha:(a/255.0)] ;
+    return [NSColor colorWithCalibratedRed:(r/255) green:(g/255) blue:(b/255) alpha:(a/255)] ;
 scanFailed:
 	return nil;
 }
@@ -431,7 +431,7 @@
 	if (!isdigit(*selfUTF8)) goto scanFailed;
 	b = strtoul(selfUTF8, (char **)&selfUTF8, /*base*/ 10);
 
-    return [NSColor colorWithCalibratedRed:(r/255.0) green:(g/255.0) blue:(b/255.0) alpha:alpha];
+    return [NSColor colorWithCalibratedRed:(r/255) green:(g/255) blue:(b/255) alpha:alpha];
 scanFailed:
 	return nil;
 }
@@ -442,17 +442,17 @@
 
 + (NSColor *)randomColor
 {
-	return [NSColor colorWithCalibratedRed:(arc4random() % 65536) / 65536.0
-	                                 green:(arc4random() % 65536) / 65536.0
-	                                  blue:(arc4random() % 65536) / 65536.0
-	                                 alpha:1.0];
+	return [NSColor colorWithCalibratedRed:(arc4random() % 65536) / 65536.0f
+	                                 green:(arc4random() % 65536) / 65536.0f
+	                                  blue:(arc4random() % 65536) / 65536.0f
+	                                 alpha:1.0f];
 }
 + (NSColor *)randomColorWithAlpha
 {
-	return [NSColor colorWithCalibratedRed:(arc4random() % 65536) / 65536.0
-	                                 green:(arc4random() % 65536) / 65536.0
-	                                  blue:(arc4random() % 65536) / 65536.0
-	                                 alpha:(arc4random() % 65536) / 65536.0];
+	return [NSColor colorWithCalibratedRed:(arc4random() % 65536) / 65536.0f
+	                                 green:(arc4random() % 65536) / 65536.0f
+	                                  blue:(arc4random() % 65536) / 65536.0f
+	                                 alpha:(arc4random() % 65536) / 65536.0f];
 }
 
 @end
@@ -481,11 +481,11 @@
 		if (secondChar != 0x0) {
 			int secondDigit = hexToInt(secondChar);
 			if (secondDigit != -1)
-				hexValue = (hexValue * 16.0 + secondDigit) / 255.0;
+				hexValue = (hexValue * 16.0f + secondDigit) / 255.0f;
 			else
 				hexValue = 0;
 		} else {
-			hexValue /= 15.0;
+			hexValue /= 15.0f;
 		}
 
 	} else {
@@ -555,7 +555,7 @@
 	const char *hexString = hexStringArray;
 
 	CGFloat		red,green,blue;
-	CGFloat		alpha = 1.0;
+	CGFloat		alpha = 1.0f;
 
 	//skip # if present.
 	if (*hexString == '#') {
diff -r 5d42a071bebd -r b21c2cff5c86 Frameworks/AIUtilities Framework/Source/AIDateAdditions.m
--- a/Frameworks/AIUtilities Framework/Source/AIDateAdditions.m	Wed Dec 23 16:53:01 2009 -1000
+++ b/Frameworks/AIUtilities Framework/Source/AIDateAdditions.m	Wed Dec 23 22:45:19 2009 -0500
@@ -20,7 +20,7 @@
 	NSTimeInterval	workIntervalSeconds = interval;
 
 	if (outSeconds) *outSeconds = fmod(workIntervalSeconds, 60.0); //Get the fraction of a minute in seconds.
-	NSInteger workInterval = workIntervalSeconds / 60.0; //Now it's minutes.
+	NSInteger workInterval = (NSInteger)(workIntervalSeconds / 60.0); //Now it's minutes.
 
 	if (outMinutes) *outMinutes = workInterval % 60; //Get the fraction of an hour in minutes.
 	workInterval = workInterval / 60; //Now it's hours.
diff -r 5d42a071bebd -r b21c2cff5c86 Frameworks/AIUtilities Framework/Source/AIDividedAlternatingRowOutlineView.m
--- a/Frameworks/AIUtilities Framework/Source/AIDividedAlternatingRowOutlineView.m	Wed Dec 23 16:53:01 2009 -1000
+++ b/Frameworks/AIUtilities Framework/Source/AIDividedAlternatingRowOutlineView.m	Wed Dec 23 22:45:19 2009 -0500
@@ -51,7 +51,7 @@
 	
 	//This could be done better. Ask the dataSource for color and width!
 	[[NSColor headerColor] set];
-	[NSBezierPath setDefaultLineWidth:1.5];
+	[NSBezierPath setDefaultLineWidth:1.5f];
 
 	//Drawing the divider
 	switch (dividerPosition) {
@@ -69,8 +69,8 @@
 			
 		case AIDividerPositionIsDivider:
 			//The item itself is the divider
-			[NSBezierPath strokeLineFromPoint:NSMakePoint(NSMinX(rowRect)+5, (NSMaxY(rowRect)+NSMinY(rowRect)) / 2.0)
-									  toPoint:NSMakePoint(NSMaxX(rowRect)-5, (NSMaxY(rowRect)+NSMinY(rowRect)) / 2.0)];
+			[NSBezierPath strokeLineFromPoint:NSMakePoint(NSMinX(rowRect)+5, (NSMaxY(rowRect)+NSMinY(rowRect)) / 2.0f)
+									  toPoint:NSMakePoint(NSMaxX(rowRect)-5, (NSMaxY(rowRect)+NSMinY(rowRect)) / 2.0f)];
 			break;
 			
 		case AIDividerPositionNone:
diff -r 5d42a071bebd -r b21c2cff5c86 Frameworks/AIUtilities Framework/Source/AIDockingWindow.m
--- a/Frameworks/AIUtilities Framework/Source/AIDockingWindow.m	Wed Dec 23 16:53:01 2009 -1000
+++ b/Frameworks/AIUtilities Framework/Source/AIDockingWindow.m	Wed Dec 23 22:45:19 2009 -0500
@@ -21,6 +21,10 @@
 - (void)_toolbarPillButtonClicked:(id)sender;
 @end
 
+ at interface NSObject (FriendsDontLetFriendsUsePrivateNSWindowDelegateMethods)
+- (void)windowDidToggleToolbarShown:(id)sender;
+ at end
+
 @implementation AIDockingWindow
 
 - (id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)aStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)flag
diff -r 5d42a071bebd -r b21c2cff5c86 Frameworks/AIUtilities Framework/Source/AIFloater.m
--- a/Frameworks/AIUtilities Framework/Source/AIFloater.m	Wed Dec 23 16:53:01 2009 -1000
+++ b/Frameworks/AIUtilities Framework/Source/AIFloater.m	Wed Dec 23 22:45:19 2009 -0500
@@ -7,12 +7,12 @@
 #import "AIFloater.h"
 #import "AIEventAdditions.h"
 
-#define WINDOW_FADE_FPS                         24.0
-#define WINDOW_FADE_STEP                        0.3
-#define WINDOW_FADE_SLOW_STEP                   0.1
-#define WINDOW_FADE_MAX                         1.0
-#define WINDOW_FADE_MIN                         0.0
-#define WINDOW_FADE_SNAP                        0.05 //How close to min/max we must get before fade is finished
+#define WINDOW_FADE_FPS                         24.0f
+#define WINDOW_FADE_STEP                        0.3f
+#define WINDOW_FADE_SLOW_STEP                   0.1f
+#define WINDOW_FADE_MAX                         1.0f
+#define WINDOW_FADE_MIN                         0.0f
+#define WINDOW_FADE_SNAP                        0.05f //How close to min/max we must get before fade is finished
 
 @interface AIFloater ()
 - (id)initWithImage:(NSImage *)inImage styleMask:(unsigned int)styleMask;
@@ -111,11 +111,11 @@
 					nil];
                 fadeAnimation = [[NSViewAnimation alloc] initWithViewAnimations:[NSArray arrayWithObject:animDict]];
 
-				//1.0 / FPS = duration per step
-				//1.0 / step = number of steps (e.g.: If step = 0.1, 1.0 / step = 10 steps)
+				//1.0f / FPS = duration per step
+				//1.0f / step = number of steps (e.g.: If step = 0.1f, 1.0f / step = 10 steps)
 				//duration per step * number of steps = total duration
 				NSTimeInterval step = [[NSApp currentEvent] shiftKey] ? WINDOW_FADE_SLOW_STEP : WINDOW_FADE_STEP;
-				fadeAnimation.duration = (1.0 / step) * (1.0 / WINDOW_FADE_FPS);
+				fadeAnimation.duration = (1.0f / step) * (1.0f / WINDOW_FADE_FPS);
 
 				[fadeAnimation startAnimation];
             }
diff -r 5d42a071bebd -r b21c2cff5c86 Frameworks/AIUtilities Framework/Source/AIFunctions.m
--- a/Frameworks/AIUtilities Framework/Source/AIFunctions.m	Wed Dec 23 16:53:01 2009 -1000
+++ b/Frameworks/AIUtilities Framework/Source/AIFunctions.m	Wed Dec 23 22:45:19 2009 -0500
@@ -19,7 +19,7 @@
 
 CGFloat AICoordinateForRect_edge_(const NSRect rect, const NSRectEdge edge)
 {
-	CGFloat coordinate = 0.0;
+	CGFloat coordinate = 0.0f;
 	switch (edge) {
 		case NSMinXEdge : coordinate = NSMinX(rect); break;
 		case NSMinYEdge : coordinate = NSMinY(rect); break;
@@ -34,7 +34,7 @@
 // on the interior side of the edge, the number returned will be negative
 CGFloat AISignedExteriorDistanceRect_edge_toPoint_(const NSRect rect, const NSRectEdge edge, const NSPoint point)
 {
-	CGFloat distanceOutside = 0.0;
+	CGFloat distanceOutside = 0.0f;
 	CGFloat rectEdgeCoordinate = AICoordinateForRect_edge_(rect, edge);
 	switch (edge) {
 		case NSMinXEdge: distanceOutside = rectEdgeCoordinate - point.x; break;
@@ -77,11 +77,6 @@
 
 BOOL AIRectIsAligned_edge_toRect_edge_tolerance_(const NSRect rect1, const NSRectEdge edge1, const NSRect rect2, const NSRectEdge edge2, const CGFloat tolerance)
 {
-#ifdef __LP64__
-	#define AIfabs( X ) fabs((X))
-#else
-	#define AIfabs( X ) fabsf((X))
-#endif
 	return AIfabs(AICoordinateForRect_edge_(rect1, edge1) - AICoordinateForRect_edge_(rect2, edge2)) < tolerance;
 }
 
diff -r 5d42a071bebd -r b21c2cff5c86 Frameworks/AIUtilities Framework/Source/AIGenericViewCell.m
--- a/Frameworks/AIUtilities Framework/Source/AIGenericViewCell.m	Wed Dec 23 16:53:01 2009 -1000
+++ b/Frameworks/AIUtilities Framework/Source/AIGenericViewCell.m	Wed Dec 23 22:45:19 2009 -0500
@@ -89,7 +89,7 @@
 		[subImage drawInRect:subFrame
 					fromRect:subUsableFrame
 				   operation:NSCompositeSourceOver
-					fraction:1.0];
+					fraction:1.0f];
 	}
 	[image unlockFocus];
 
@@ -97,7 +97,7 @@
 	[image drawInRect:cellFrame
 			 fromRect:usableFrame
 			operation:NSCompositeSourceOver
-			 fraction:1.0];	
+			 fraction:1.0f];	
 }
 
 - (NSUInteger)hitTestForEvent:(NSEvent *)event inRect:(NSRect)cellFrame ofView:(NSView *)controlView
diff -r 5d42a071bebd -r b21c2cff5c86 Frameworks/AIUtilities Framework/Source/AIGradientAdditions.m
--- a/Frameworks/AIUtilities Framework/Source/AIGradientAdditions.m	Wed Dec 23 16:53:01 2009 -1000
+++ b/Frameworks/AIUtilities Framework/Source/AIGradientAdditions.m	Wed Dec 23 22:45:19 2009 -0500
@@ -23,7 +23,7 @@
 	static NSGradient *grad;
 	if (!grad) {
 		NSColor *selectedColor = [NSColor alternateSelectedControlColor];
-		grad = [[NSGradient alloc] initWithStartingColor:[selectedColor darkenAndAdjustSaturationBy:-0.1] endingColor:[selectedColor darkenAndAdjustSaturationBy:0.1]];
+		grad = [[NSGradient alloc] initWithStartingColor:[selectedColor darkenAndAdjustSaturationBy:-0.1f] endingColor:[selectedColor darkenAndAdjustSaturationBy:0.1f]];
 	}
 	
 	return grad;
diff -r 5d42a071bebd -r b21c2cff5c86 Frameworks/AIUtilities Framework/Source/AIHostReachabilityMonitor.m
--- a/Frameworks/AIUtilities Framework/Source/AIHostReachabilityMonitor.m	Wed Dec 23 16:53:01 2009 -1000
+++ b/Frameworks/AIUtilities Framework/Source/AIHostReachabilityMonitor.m	Wed Dec 23 22:45:19 2009 -0500
@@ -26,6 +26,8 @@
 
 - (void)beginMonitorngIPChanges;
 - (void)stopMonitoringIPChanges;
+
+- (void)systemDidWake:(NSNotification *)notification;
 @end
 
 @implementation AIHostReachabilityMonitor
diff -r 5d42a071bebd -r b21c2cff5c86 Frameworks/AIUtilities Framework/Source/AIImageAdditions.m
--- a/Frameworks/AIUtilities Framework/Source/AIImageAdditions.m	Wed Dec 23 16:53:01 2009 -1000
+++ b/Frameworks/AIUtilities Framework/Source/AIImageAdditions.m	Wed Dec 23 22:45:19 2009 -0500
@@ -175,7 +175,7 @@
 	[self lockFocus];
 	
 	NSSize size = [self size];
-	NSRect rect = NSMakeRect(0.0, 0.0, size.width, size.height);
+	NSRect rect = NSMakeRect(0.0f, 0.0f, size.width, size.height);
 	NSBitmapImageRep	*bm = [[[NSBitmapImageRep alloc] initWithFocusedViewRect:rect] autorelease];
 	
 	[self unlockFocus];
@@ -315,7 +315,7 @@
 	while (data.length > maximumSize) {
 		// New width/height using our ratio
 		NSUInteger width = (imageRep.pixelsWide - 100);
-		NSUInteger height = ((CGFloat)imageRep.pixelsWide - 100.0)*ratio;
+		NSUInteger height = ((CGFloat)imageRep.pixelsWide - 100.0f)*ratio;
 		
 		// Create a new rep with the lowered size
 		NSBitmapImageRep *newImageRep = [[[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL
diff -r 5d42a071bebd -r b21c2cff5c86 Frameworks/AIUtilities Framework/Source/AIImageButton.m
--- a/Frameworks/AIUtilities Framework/Source/AIImageButton.m	Wed Dec 23 16:53:01 2009 -1000
+++ b/Frameworks/AIUtilities Framework/Source/AIImageButton.m	Wed Dec 23 22:45:19 2009 -0500
@@ -9,6 +9,10 @@
 #import "AIImageButton.h"
 #import "AIFloater.h"
 
+ at interface AIImageButton (PRIVATE)
+- (void)destroyImageFloater;
+ at end
+
 @implementation AIImageButton
 
 - (id)initWithFrame:(NSRect)frame
@@ -70,7 +74,7 @@
 		}
 
 		imageFloater = [[AIFloater floaterWithImage:bigImage styleMask:NSBorderlessWindowMask] retain];
-		[imageFloater setMaxOpacity:1.00];
+		[imageFloater setMaxOpacity:1.00f];
 		[imageFloater moveFloaterToPoint:point];
 		[imageFloater setVisible:YES animate:NO];
 		imageFloaterShouldBeOpen = TRUE;
diff -r 5d42a071bebd -r b21c2cff5c86 Frameworks/AIUtilities Framework/Source/AIImageDrawingAdditions.m
--- a/Frameworks/AIUtilities Framework/Source/AIImageDrawingAdditions.m	Wed Dec 23 16:53:01 2009 -1000
+++ b/Frameworks/AIUtilities Framework/Source/AIImageDrawingAdditions.m	Wed Dec 23 22:45:19 2009 -0500
@@ -13,10 +13,10 @@
 //Draw this image in a rect, tiling if the rect is larger than the image
 - (void)tileInRect:(NSRect)rect
 {
-    NSSize  size = [self size];
-    NSRect  destRect = NSMakeRect(rect.origin.x, rect.origin.y, size.width, size.height);
-    double  top = rect.origin.y + rect.size.height;
-    double  right = rect.origin.x + rect.size.width;
+    NSSize	size = [self size];
+    NSRect	destRect = NSMakeRect(rect.origin.x, rect.origin.y, size.width, size.height);
+    CGFloat	top = rect.origin.y + rect.size.height;
+    CGFloat	right = rect.origin.x + rect.size.width;
     
     //Tile vertically
     while (destRect.origin.y < top) {
@@ -42,7 +42,7 @@
 
 - (NSImage *)imageByScalingToSize:(NSSize)size
 {
-	return ([self imageByScalingToSize:size fraction:1.0 flipImage:NO proportionally:YES allowAnimation:YES]);
+	return ([self imageByScalingToSize:size fraction:1.0f flipImage:NO proportionally:YES allowAnimation:YES]);
 }
 
 - (NSImage *)imageByFadingToFraction:(CGFloat)delta
@@ -58,7 +58,7 @@
 - (NSImage *)imageByScalingForMenuItem
 {
 	return [self imageByScalingToSize:NSMakeSize(16,16)
-							 fraction:1.0
+							 fraction:1.0f
 							flipImage:NO
 					   proportionally:YES
 					   allowAnimation:NO];	
@@ -293,7 +293,7 @@
 //General purpose draw image rounded in a NSRect.
 - (NSRect)drawRoundedInRect:(NSRect)rect radius:(CGFloat)radius
 {
-	return [self drawRoundedInRect:rect atSize:NSMakeSize(0,0) position:0 fraction:1.0 radius:radius];
+	return [self drawRoundedInRect:rect atSize:NSMakeSize(0,0) position:0 fraction:1.0f radius:radius];
 }
 
 //Perhaps if you desired to draw it rounded in the tooltip.
diff -r 5d42a071bebd -r b21c2cff5c86 Frameworks/AIUtilities Framework/Source/AIImageGridView.m
--- a/Frameworks/AIUtilities Framework/Source/AIImageGridView.m	Wed Dec 23 16:53:01 2009 -1000
+++ b/Frameworks/AIUtilities Framework/Source/AIImageGridView.m	Wed Dec 23 22:45:19 2009 -0500
@@ -202,12 +202,12 @@
 	columns = newFrame.size.width / (imageSize.width + MIN_PADDING);
 	
 	//Increase padding to stretch the columns to the full width of our view
-	padding.width = round((newFrame.size.width - (columns * imageSize.width)) / (columns + 1));
+	padding.width = AIround((newFrame.size.width - (columns * imageSize.width)) / (columns + 1));
 	padding.height = padding.width;
 	
 	//Resize our view so it's tall enuogh to display enough rows for all our images and that it always
 	//covers the entire visible area in our scroll view.
-	rows = ceil((double)numberOfImages / (double)columns);
+	rows = AIceil(numberOfImages / columns);
 	newFrame.size.height = rows * (imageSize.height + padding.height) + padding.height;
 	if (scrollView && [scrollView contentSize].height > newFrame.size.height) {
 		newFrame.size.height = [scrollView contentSize].height;
diff -r 5d42a071bebd -r b21c2cff5c86 Frameworks/AIUtilities Framework/Source/AIImageTextCell.m
--- a/Frameworks/AIUtilities Framework/Source/AIImageTextCell.m	Wed Dec 23 16:53:01 2009 -1000
+++ b/Frameworks/AIUtilities Framework/Source/AIImageTextCell.m	Wed Dec 23 22:45:19 2009 -0500
@@ -255,7 +255,7 @@
 	 }
 	 
 	if (destRect.size.height < cellFrame.size.height) {
-		destRect.origin.y += (cellFrame.size.height - destRect.size.height) / 2.0;
+		destRect.origin.y += (cellFrame.size.height - destRect.size.height) / 2.0f;
 	} 
 	
 	BOOL flippedIt = NO;
@@ -269,7 +269,7 @@
 	[image drawInRect:destRect
 			 fromRect:NSMakeRect(0,0,size.width,size.height)
 			operation:NSCompositeSourceOver
-			 fraction:1.0];
+			 fraction:1.0f];
 	[NSGraphicsContext restoreGraphicsState];
 
 	if (flippedIt) {
@@ -296,7 +296,7 @@
 		
 		//Shift the origin over to the right edge of the image we just drew
 		NSAffineTransform *imageTranslation = [NSAffineTransform transform];
-		[imageTranslation translateXBy:(imageTextPadding + drawnImageSize.width) yBy:0.0];
+		[imageTranslation translateXBy:(imageTextPadding + drawnImageSize.width) yBy:0.0f];
 		[imageTranslation concat];
 	}
 	
@@ -305,7 +305,7 @@
 		NSAttributedString	*attributedMainString = nil, *attributedSubString = nil;
 		NSColor				*mainTextColor, *subStringTextColor;
 		NSDictionary		*mainAttributes = nil, *subStringAttributes = nil;
-		CGFloat				mainStringHeight = 0.0, subStringHeight = 0.0, textSpacing = 0.0;
+		CGFloat				mainStringHeight = 0.0f, subStringHeight = 0.0f, textSpacing = 0.0f;
 
 		//Determine the correct text color
 		NSWindow			*window;
@@ -321,11 +321,11 @@
 			if ([self isEnabled]) {
 				// Draw the text regular
 				mainTextColor = [NSColor controlTextColor];
-				subStringTextColor = [NSColor colorWithCalibratedWhite:0.4 alpha:1.0];
+				subStringTextColor = [NSColor colorWithCalibratedWhite:0.4f alpha:1.0f];
 			} else {
 				// Draw the text disabled
 				mainTextColor = [NSColor grayColor];
-				subStringTextColor = [NSColor colorWithCalibratedWhite:0.8 alpha:1.0];
+				subStringTextColor = [NSColor colorWithCalibratedWhite:0.8f alpha:1.0f];
 			}
 		}
 		
@@ -392,13 +392,13 @@
 		//Calculate the centered rect
 		if (!subString && mainStringHeight < cellFrame.size.height) {
 			// Space out the main string evenly
-			cellFrame.origin.y += (cellFrame.size.height - mainStringHeight) / 2.0;
+			cellFrame.origin.y += (cellFrame.size.height - mainStringHeight) / 2.0f;
 		} else if (subString) {
 			// Space out our extra space evenly
-			textSpacing = (cellFrame.size.height - mainStringHeight - subStringHeight) / 3.0;
+			textSpacing = (cellFrame.size.height - mainStringHeight - subStringHeight) / 3.0f;
 			// In case we don't have enough height..
-			if (textSpacing < 0.0)
-				textSpacing = 0.0;
+			if (textSpacing < 0.0f)
+				textSpacing = 0.0f;
 			cellFrame.origin.y += textSpacing;
 		}
 
@@ -413,7 +413,7 @@
 			NSSize attributedMainStringSize = [attributedMainString size];
 
 			NSAffineTransform *spacingTranslation = [NSAffineTransform transform];
-			[spacingTranslation translateXBy:(imageTextPadding + attributedMainStringSize.width) yBy:-(attributedMainStringSize.height / 2.0)];
+			[spacingTranslation translateXBy:(imageTextPadding + attributedMainStringSize.width) yBy:-(attributedMainStringSize.height / 2.0f)];
 			[spacingTranslation concat];
 
 			[self drawImage:image withFrame:cellFrame];
@@ -426,7 +426,7 @@
 		//Draw the substring
 		if (subString) {
 			NSAffineTransform *subStringTranslation = [NSAffineTransform transform];
-			[subStringTranslation translateXBy:0.0 yBy:mainStringHeight + textSpacing];
+			[subStringTranslation translateXBy:0.0f yBy:mainStringHeight + textSpacing];
 			[subStringTranslation concat];
 			
 			//Draw the substring
diff -r 5d42a071bebd -r b21c2cff5c86 Frameworks/AIUtilities Framework/Source/AIImageViewWithImagePicker.m
--- a/Frameworks/AIUtilities Framework/Source/AIImageViewWithImagePicker.m	Wed Dec 23 16:53:01 2009 -1000
+++ b/Frameworks/AIUtilities Framework/Source/AIImageViewWithImagePicker.m	Wed Dec 23 22:45:19 2009 -0500
@@ -294,7 +294,7 @@
 	
 	//Draw our original image as 50% transparent
 	[dragImage lockFocus];
-	[[self image] dissolveToPoint:NSZeroPoint fraction:0.5];
+	[[self image] dissolveToPoint:NSZeroPoint fraction:0.5f];
 	[dragImage unlockFocus];
 	
 	//We want the image to resize
diff -r 5d42a071bebd -r b21c2cff5c86 Frameworks/AIUtilities Framework/Source/AILinkTextView.m
--- a/Frameworks/AIUtilities Framework/Source/AILinkTextView.m	Wed Dec 23 16:53:01 2009 -1000
+++ b/Frameworks/AIUtilities Framework/Source/AILinkTextView.m	Wed Dec 23 22:45:19 2009 -0500
@@ -22,6 +22,7 @@
 
 @interface AILinkTextView ()
 - (void)_initLinkTextView;
+- (void)frameDidChange:(NSNotification *)notification;
 @end
 
 @implementation AILinkTextView
diff -r 5d42a071bebd -r b21c2cff5c86 Frameworks/AIUtilities Framework/Source/AILinkTrackingController.m
--- a/Frameworks/AIUtilities Framework/Source/AILinkTrackingController.m	Wed Dec 23 16:53:01 2009 -1000
+++ b/Frameworks/AIUtilities Framework/Source/AILinkTrackingController.m	Wed Dec 23 22:45:19 2009 -0500
@@ -36,6 +36,7 @@
 - (void)_beginCursorTrackingInRect:(NSRect)visibleRect withOffset:(NSPoint)offset;
 - (void)_endCursorTracking;
 - (void)_setMouseOverLink:(AIFlexibleLink *)inHoveredLink atPoint:(NSPoint)inPoint;
+- (void)copyLink:(id)sender;
 @end
 
 BOOL _mouseInRects(NSPoint aPoint, NSRectArray someRects, NSUInteger arraySize, BOOL flipped);
diff -r 5d42a071bebd -r b21c2cff5c86 Frameworks/AIUtilities Framework/Source/AIMathCompatibility.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Frameworks/AIUtilities Framework/Source/AIMathCompatibility.h	Wed Dec 23 22:45:19 2009 -0500
@@ -0,0 +1,27 @@
+/*
+ *  AIMathCompatibility.h
+ *  Adium
+ *
+ *  Created by Stephen Holt on 12/23/09.
+ *  Copyright 2009. All rights reserved.
+ *
+ */
+
+#ifndef AIMathCompatibility
+#define AIMathCompatibility
+
+#ifdef __LP64__
+	#define AIfabs( X ) fabs((X))
+	#define AIround( X ) round((X))
+	#define AIceil( X ) ceil((X))
+	#define AIfloor( X ) floor((X))
+	#define AIfmod( X, Y ) fmod((X),(Y))
+#else
+	#define AIfabs( X ) fabsf((X))
+	#define AIround( X ) roundf((X))
+	#define AIceil( X ) ceilf((X))
+	#define AIfloor( X ) floorf((X))
+	#define AIfmod( X, Y ) fmodf((X),(Y))
+#endif
+
+#endif
diff -r 5d42a071bebd -r b21c2cff5c86 Frameworks/AIUtilities Framework/Source/AIOutlineView.m
--- a/Frameworks/AIUtilities Framework/Source/AIOutlineView.m	Wed Dec 23 16:53:01 2009 -1000
+++ b/Frameworks/AIUtilities Framework/Source/AIOutlineView.m	Wed Dec 23 22:45:19 2009 -0500
@@ -19,6 +19,7 @@
 @interface AIOutlineView ()
 - (void)_initOutlineView;
 - (void)expandOrCollapseItemsOfItem:(id)rootItem;
+- (void)_reloadData;
 @end
 
 @interface AIOutlineView (KFTypeSelectTableViewSupport)
diff -r 5d42a071bebd -r b21c2cff5c86 Frameworks/AIUtilities Framework/Source/AIPlasticButtonCell.m
--- a/Frameworks/AIUtilities Framework/Source/AIPlasticButtonCell.m	Wed Dec 23 16:53:01 2009 -1000
+++ b/Frameworks/AIUtilities Framework/Source/AIPlasticButtonCell.m	Wed Dec 23 22:45:19 2009 -0500
@@ -18,7 +18,7 @@
 #define IMAGE_OFFSET_Y	0
 
 #define PLASTIC_ARROW_WIDTH		8
-#define PLASTIC_ARROW_HEIGHT	(PLASTIC_ARROW_WIDTH/2.0)
+#define PLASTIC_ARROW_HEIGHT	(PLASTIC_ARROW_WIDTH/2.0f)
 #define PLASTIC_ARROW_XOFFSET	12
 #define PLASTIC_ARROW_YOFFSET	12
 #define PLASTIC_ARROW_PADDING	8
@@ -144,7 +144,7 @@
     //Precalc some sizes
     NSSize capsSize = [caps size];
     frame = cellFrame;//[controlView bounds];
-    capWidth = capsSize.width / 2.0;
+    capWidth = capsSize.width / 2.0f;
     capHeight = capsSize.height;
     middleRight = ((frame.origin.x + frame.size.width) - capWidth);
 
@@ -153,7 +153,7 @@
     [caps drawInRect:destRect
 			fromRect:NSMakeRect(0, 0, capWidth, capHeight)
 		   operation:NSCompositeSourceOver
-			fraction:1.0];
+			fraction:1.0f];
 
     //Draw the middle, which tiles across the button (excepting the areas drawn by the left and right caps)
     NSSize middleSize = [middle size];
@@ -169,7 +169,7 @@
         [middle drawInRect:destRect
 				  fromRect:sourceRect
 				 operation:NSCompositeSourceOver
-				  fraction:1.0];
+				  fraction:1.0f];
         destRect.origin.x += destRect.size.width;
     }
 	
@@ -178,7 +178,7 @@
 	[caps drawInRect:destRect
 			fromRect:NSMakeRect(capWidth, 0, capWidth, capHeight)
 		   operation:NSCompositeSourceOver
-			fraction:1.0];
+			fraction:1.0f];
 	
     //Draw Label
 #warning XXX handle NSCellImagePosition values other than these two correctly
@@ -186,14 +186,14 @@
 		NSString *title = [self title];
 		if (title) {
 			//Prep attributes
-			NSColor *color = [self isEnabled] ? [NSColor blackColor] : [NSColor colorWithCalibratedWhite:0.0 alpha:0.5];
+			NSColor *color = [self isEnabled] ? [NSColor blackColor] : [NSColor colorWithCalibratedWhite:0.0f alpha:0.5f];
 
 			NSDictionary *attributes = [NSDictionary dictionaryWithObjectsAndKeys:[self font], NSFontAttributeName, color, NSForegroundColorAttributeName, nil];
 
 			//Calculate center
 			NSSize size = [title sizeWithAttributes:attributes];
-			NSPoint centeredPoint = NSMakePoint(frame.origin.x + round((frame.size.width - size.width) / 2.0) + LABEL_OFFSET_X,
-										frame.origin.y + round((frame.size.height - size.height) / 2.0) + LABEL_OFFSET_Y);
+			NSPoint centeredPoint = NSMakePoint(frame.origin.x + AIround((frame.size.width - size.width) / 2.0f) + LABEL_OFFSET_X,
+										frame.origin.y + AIround((frame.size.height - size.height) / 2.0f) + LABEL_OFFSET_Y);
 
 			//Draw
 			[title drawAtPoint:centeredPoint withAttributes:attributes];
@@ -209,8 +209,8 @@




More information about the commits mailing list